gtkWindowGetSize            package:RGtk2            R Documentation

_g_t_k_W_i_n_d_o_w_G_e_t_S_i_z_e

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

     Obtains the current size of 'window'. If 'window' is not onscreen,
     it returns the size GTK+ will suggest to the window manager for
     the initial window size (but this is not reliably the same as the
     size the window manager will actually select). The size obtained
     by 'gtkWindowGetSize' is the last size received in a
     'GdkEventConfigure', that is, GTK+ uses its locally-stored size,
     rather than querying the X server for the size. As a result, if
     you call 'gtkWindowResize' then immediately call
     'gtkWindowGetSize', the size won't have taken effect yet. After
     the window manager processes the resize request, GTK+ receives
     notification that the size has changed via a configure event, and
     the size of the window gets updated.

_U_s_a_g_e:

     gtkWindowGetSize(object)

_A_r_g_u_m_e_n_t_s:

'object': ['GtkWindow']  a 'GtkWindow'

_D_e_t_a_i_l_s:

     Note 1: Nearly any use of this function creates a race condition,
     because the size of the window may change between the time that
     you get the size and the time that you perform some action
     assuming that size is the current size. To avoid race conditions,
     connect to "configure_event" on the window and adjust your
     size-dependent state to match the size delivered in the
     'GdkEventConfigure'.

     Note 2: The returned size does _not_ include the size of the
     window manager decorations (aka the window frame or border). Those
     are not drawn by GTK+ and GTK+ has no reliable method of
     determining their size.

     Note 3: If you are getting a window size in order to position the
     window onscreen, there may be a better way. The preferred way is
     to simply set the window's semantic type with
     'gtkWindowSetTypeHint', which allows the window manager to e.g.
     center dialogs. Also, if you set the transient parent of dialogs
     with 'gtkWindowSetTransientFor' window managers will often center
     the dialog over its parent window. It's much preferred to let the
     window manager handle these things rather than doing it yourself,
     because all apps will behave consistently and according to user
     prefs if the window manager handles it. Also, the window manager
     can take the size of the window decorations/border into account,
     while your application cannot.

     In any case, if you insist on application-specified window
     positioning, there's _still_ a better way than doing it yourself -
     'gtkWindowSetPosition' will frequently handle the details for you.

_V_a_l_u_e:

     A list containing the following elements: 

 'width': [integer]  return location for width, or 'NULL'

'height': [integer]  return location for height, or 'NULL'

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

     Derived by RGtkGen from GTK+ documentation

