GtkSocket               package:RGtk2               R Documentation

_G_t_k_S_o_c_k_e_t

_D_e_s_c_r_i_p_t_i_o_n:

     Container for widgets from other processes

_M_e_t_h_o_d_s _a_n_d _F_u_n_c_t_i_o_n_s:

     'gtkSocketNew(show = TRUE)'
      'gtkSocketSteal(object, wid)'
      'gtkSocketAddId(object, window.id)'
      'gtkSocketGetId(object)'
      'gtkSocket(show = TRUE)'

_H_i_e_r_a_r_c_h_y:

     GObject
        +----GInitiallyUnowned
              +----GtkObject
                    +----GtkWidget
                          +----GtkContainer
                                +----GtkSocket 

_I_n_t_e_r_f_a_c_e_s:

     GtkSocket implements AtkImplementorIface and  'GtkBuildable'.

_D_e_t_a_i_l_e_d _D_e_s_c_r_i_p_t_i_o_n:

     Together with 'GtkPlug', 'GtkSocket' 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 'GtkSocket' widget
     and, passes the that widget's window ID to the other process, 
     which then creates a 'GtkPlug' with that window ID. Any widgets
     contained in the 'GtkPlug' then will appear inside the first
     applications window.

     The socket's window ID is obtained by using 'gtkSocketGetId'.
     Before using this function, the socket must have been realized,
     and for hence, have been added to its parent.

     _Obtaining the window ID of a socket._


     socket <- gtkSocket()
     parent$add(socket)

     ## The following call is only necessary if one of
     ## the ancestors of the socket is not yet visible.
     socket$realize()
     print(paste("The ID of the sockets window is", socket$getId()))

     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
     'GtkSocket' structure. If this field is non-'NULL',  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. To prevent this from
     happening, you can connect to the '"plug-removed"' signal.

     The communication between a 'GtkSocket' and a 'GtkPlug' follows
     the  XEmbed (<URL:
     http://www.freedesktop.org/standards/xembed-spec>) 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
     'gtkSocketSteal', though the integration when this is done will
     not be as close as between a 'GtkPlug' and a 'GtkSocket'.  *PLEASE
     NOTE:* The 'GtkPlug' and 'GtkSocket' widgets are currently not
     available  on all platforms supported by GTK+.

_S_t_r_u_c_t_u_r_e_s:


     '_G_t_k_S_o_c_k_e_t' The 'GtkSocket' structure contains the 'plug_window'
          field.  (This field should be considered read-only. It should
          never be set by an application.)


_C_o_n_v_e_n_i_e_n_t _C_o_n_s_t_r_u_c_t_i_o_n:

     'gtkSocket' is the equivalent of 'gtkSocketNew'.

_S_i_g_n_a_l_s:


     '_p_l_u_g-_a_d_d_e_d(_s_o_c_k_e_t., _u_s_e_r._d_a_t_a)' This signal is emitted when a
          client is successfully added to the socket.  

          '_s_o_c_k_e_t.' ['GtkSocket']  the object which received the signal

          '_u_s_e_r._d_a_t_a' [R object] user data set when the signal handler
               was connected.


     '_p_l_u_g-_r_e_m_o_v_e_d(_s_o_c_k_e_t., _u_s_e_r._d_a_t_a)' This signal is emitted when a
          client is removed from the socket.  The default action is to
          destroy the 'GtkSocket' widget, so if you  want to reuse it
          you must add a signal handler that returns 'TRUE'.  

          '_s_o_c_k_e_t.' ['GtkSocket']  the object which received the signal

          '_u_s_e_r._d_a_t_a' [R object] user data set when the signal handler
               was connected.

          _Returns:_ [logical] 'TRUE' to stop other handlers from being
          invoked.


_A_u_t_h_o_r(_s):

     Derived by RGtkGen from GTK+ documentation

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://developer.gnome.org/doc/API/2.0/gtk/GtkSocket.html>

