Re: plug/socket and Win32

Hans Breuer <hans breuer org> writes:

> At 16:41 18.04.01 -0400, Owen Taylor wrote:
> >
> >I'm working currently on some major changes to plug/socket on
> >X11, and wanted to get some advice on the handling of Win32.
> >
> >I've basically always considered Plug/Socket to be X-specific
> >code, and certainly they are that way now, except that at
> >some point, a bit of non-functioning Win32 code was added to
> >gtkplug.c.

> It appears to me that the main problem for not fully implementing 
> it on windoze was not a lack of ability but a lack of requirement.
> Neither Gimp nor Dia does use GtkPlug/GtkSocket and there seems to
> be not even a test/demo program in Gtk+.

There is a test case in GTK+-2.0 now.

Plug/socket implements interapplication embedding. Putting a widget
from one process inside an application from another process. It's
used extensively in GNOME for panel "applets", control center
"capplets", and Bonobo, but most standalone applications aren't
going to have much reason to use it.
> To port it one of my requirements would be to understand what it 
> is supposed to do. The win32 code in gtkplug.c looks ok, but could
> probably be improved for readability by some new Gdk functions, i.e.
> - gdk_set_focus
> - gdk_forward_key_press
> - gdk_forward_event

In GTK+-2.0 (as of a recent commit, but planned for a while) none of
this functionality is used by the X11 port, (except maybe for fallback
compatibility with GTK+-1.2 embedding.)  GTK+ now uses the XEMBED
protocol which mostly works by exchanging client messages.

So, I don't see the point in encapsulating this functionality in GDK,
when it isn't something that you want cross-platform.

The right approach for Win32 is to figure out how to do
inter-application embedding in Win32, then figure out what primitives
you need for that. Not to take the primitives from the X11 port and
try and use them verbatim for Win32.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]