<HTML><BODY>Look at <a href="http://planet.racket-lang.org/package-source/Dima_/Tray.plt/1/0/main.rkt" target="_blank">http://planet.racket-lang.org/package-source/Dima_/Tray.plt/1/0/main.rkt</a><br><br>You can get GTK/win32/cocoa handle from any widget via get-handle (<a href="http://docs.racket-lang.org/gui/window___.html#%28meth._%28%28%28lib._mred%2Fmain..rkt%29._window~3c~25~3e%29._get-handle%29%29">http://docs.racket-lang.org/gui/window___.html#%28meth._%28%28%28lib._mred%2Fmain..rkt%29._window~3c~25~3e%29._get-handle%29%29</a>)<br><br><br>Wed, 10 Dec 2014 21:35:54 -0800 от Alexis King <lexi.lambda@gmail.com>:<br>
<blockquote style="border-left:1px solid #0857A6;margin:10px;padding:0 0 0 10px;">
<div>
<div>
<div>
<div>The Racket GUI system is nice, but as with almost any GUI system, sometimes I yearn for the simplicity of HTML rendering. CSS and JavaScript let properly-styled HTML be easily inserted into almost any application without anyone realizing it isn’t native, so long as it’s fast and seamless.<br><br>Basically, I want to try and create a wrapper for a <a href="https://code.google.com/p/chromiumembedded/" target="_blank">Chromium web view</a> to be able to add to a Racket GUI in the same way that I can add, say, a horizontal-panel%. However, even putting the logistics of the complications that would involve aside, the question becomes… is it even possible to implement a new native UI component without sticking it into the internals of MrEd?<br><br>Currently, all of the plumbing that handles the linkage of the GUI classes with their underlying native counterparts is tightly woven into the gui library itself. There’s no way for an external package to hook into that system and add something new, as far as I can tell. Ideally, I’d like to be able to write a native library for each platform to define a GTK widget, a Cocoa view, and a Windows… whatever they’re called in Windows. (I don’t do Windows development.) Then I’d be able to write my own plumbing to connect those native components with a Racket class that would provide the adequate abstractions.<br><br>I’m willing to work out those problems, but in order to do that, I do need to figure out a suitable method for actually adding a GUI component. I’d love for adding a web view to be as easy as typing (new web-view% [parent frame] [url "<span><a href="http://google" target="_blank">http://google</a>.com</span>"]) and have it just work.<div><br></div><div>Is this possible? Is it foreseeably possible? If not, what would be the best way to integrate such functionality so that it’s at least semi-composable with the existing libraries?</div><div><br></div><div>(As a note, rendering to a canvas% or something like that is most certainly out of the question. Chromium needs access to the window itself to get the hardware-accelerated performance necessary to actually make it feasible.)</div><div><br></div><div>Alexis</div>
</div>
<div>____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
<br>-- <br>Roman Klochkov<br></BODY></HTML>