diff --git a/doc/ChangeLog b/doc/ChangeLog index 9537b4c7a..0a7a615c3 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2003-11-17 John Luke + + * en/Gtk/Socket.xml: documented + 2003-11-16 John Luke * en/Gdk/Atom.xml: documented diff --git a/doc/en/Gtk/Socket.xml b/doc/en/Gtk/Socket.xml index 0b0bbf889..f88b67c02 100644 --- a/doc/en/Gtk/Socket.xml +++ b/doc/en/Gtk/Socket.xml @@ -1,16 +1,32 @@ - + gtk-sharp - + + 0.0.0.0 neutral Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added - To be added + Container for widgets from other processes. + + Together with , provides the ability to embed widgets from one process into another process in a fashion that is transparent to the user. One process creates a widget and, passes the window ID of that widget to the other process, which then creates a with that window ID. Any widgets contained in the then will appear inside the first applications window. + The window ID of the is obtained by using . Before using this function, the socket must have been realized, and therefore, have been added to its parent. + + +Gtk.Socket socket = new Gtk.Socket; +socket.Show (); +parent.Add (socket); +Console.WriteLine ("The ID of the sockets window is {0}", socket.Id); + + + Note that if you pass the window ID of the socket to another process that will create a plug in the socket, you must make sure that the socket widget is not destroyed until that plug is created. Violating this rule will cause unpredictable consequences, the most likely consequence being that the plug will appear as a separate toplevel window. You can check if the plug has been created by examining the plug_window field of the structure. If this field is non-, then the plug has been successfully created inside of the socket. + When Gtk# is notified that the embedded window has been destroyed, then it will destroy the socket as well. You should always, therefore, be prepared for your sockets to be destroyed at any time when the main event loop is running. + The communication between a and a follows the XEmbed protocol. This protocol has also been implemented in other toolkits, e.g. Qt, allowing the same level of integration when embedding a Qt widget in GTK or vice versa. + A socket can also be used to swallow arbitrary pre-existing top-level windows using , though the integration when this is done will not be as close as between a and a . + Gtk.Container @@ -41,9 +57,13 @@ - To be added - To be added: an object of type 'uint' - To be added + Adds an XEMBED client, such as a , to the . + an object of type + + The client may be in the same process or in a different process. + To embed a in a , you can either create the with , call to get the window ID of the plug, and then pass that to the , or you can call to get the window ID for the socket, and call passing in that ID. + The must have already be added into a toplevel window before you can make this call. + @@ -80,9 +100,10 @@ - To be added - To be added: an object of type 'Gtk.Socket' - To be added + Default constructor + an object of type + + @@ -92,8 +113,8 @@ System.UInt32 - The GLib Type for Gtk.Socket - The GLib Type for the Gtk.Socket class. + The for + The for the class. @@ -104,9 +125,9 @@ System.UInt32 - To be added - To be added: an object of type 'uint' - To be added + The window ID of a widget. + an object of type + This can be used to create a client embedded inside the socket, for instance with . The must have already be added into a toplevel window before you can make this call. @@ -117,8 +138,9 @@ - To be added - To be added + This event is emitted when a client is successfully added to the socket. + + @@ -129,8 +151,8 @@ - To be added - To be added + This event is emitted when a client is removed from the socket. + The default action is to destroy the widget, so if you want to reuse it you must add a signal handler that returns . diff --git a/doc/en/Gtk/TODO b/doc/en/Gtk/TODO index 52a40527b..6583b80b3 100644 --- a/doc/en/Gtk/TODO +++ b/doc/en/Gtk/TODO @@ -1,6 +1,6 @@ TODO doc for Gtk namespace. -There are in total 324 xml to document in Gtk. Right now there are 165 xml not documented in any proportion. +There are in total 324 xml to document in Gtk. Right now there are 164 xml not documented in any proportion. The idea is to have a easy way to know what documentation is missing, if you want to help or are helping please take out the xml that you commit from the missing list. For documentation that take some time to finish (like HTML, TextBuffer, etc) the best is that you but your name and email next to the file in this list to acknowledge that you are working in it (is recommendable that you suscribe to the mono-docs mailing list). @@ -110,7 +110,6 @@ Settings.xml SettingsPropertyValue.xml SettingsValue.xml SignalFunc.xml -Socket.xml StockManager.xml Style.xml Submenu.xml