home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / man / cat3 / xwindowattributes.0 < prev    next >
Encoding:
Text File  |  1996-10-17  |  9.7 KB  |  265 lines

  1.  
  2.  
  3.  
  4. XGetWindowAttributes(3X11)XLIB FUNCTIONSXGetWindowAttributes(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XGetWindowAttributes, XGetGeometry, XWindowAttributes -
  9.        get current window attribute or geometry and current win-
  10.        dow attributes structure
  11.  
  12. SSYYNNTTAAXX
  13.        Status XGetWindowAttributes(_d_i_s_p_l_a_y, _w,
  14.        _w_i_n_d_o_w___a_t_t_r_i_b_u_t_e_s___r_e_t_u_r_n)
  15.          Display *_d_i_s_p_l_a_y;
  16.          Window _w;
  17.          XWindowAttributes *_w_i_n_d_o_w___a_t_t_r_i_b_u_t_e_s___r_e_t_u_r_n;
  18.  
  19.        Status XGetGeometry(_d_i_s_p_l_a_y, _d, _r_o_o_t___r_e_t_u_r_n, _x___r_e_t_u_r_n,
  20.        _y___r_e_t_u_r_n, _w_i_d_t_h___r_e_t_u_r_n,
  21.                  _h_e_i_g_h_t___r_e_t_u_r_n, _b_o_r_d_e_r___w_i_d_t_h___r_e_t_u_r_n,
  22.        _d_e_p_t_h___r_e_t_u_r_n)
  23.            Display *_d_i_s_p_l_a_y;
  24.            Drawable _d;
  25.            Window *_r_o_o_t___r_e_t_u_r_n;
  26.            int *_x___r_e_t_u_r_n, *_y___r_e_t_u_r_n;
  27.            unsigned int *_w_i_d_t_h___r_e_t_u_r_n, *_h_e_i_g_h_t___r_e_t_u_r_n;
  28.            unsigned int *_b_o_r_d_e_r___w_i_d_t_h___r_e_t_u_r_n;
  29.            unsigned int *_d_e_p_t_h___r_e_t_u_r_n;
  30.  
  31. AARRGGUUMMEENNTTSS
  32.        _b_o_r_d_e_r___w_i_d_t_h___r_e_t_u_r_n
  33.          Returns the border width in pixels.
  34.  
  35.        _d     Specifies the drawable, which can be a window or
  36.          a pixmap.
  37.  
  38.        _d_e_p_t_h___r_e_t_u_r_n
  39.          Returns the depth of the drawable (bits per
  40.          pixel for the object).
  41.  
  42.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  43.  
  44.        _r_o_o_t___r_e_t_u_r_n
  45.          Returns the root window.
  46.  
  47.        _w     Specifies the window whose current attributes
  48.          you want to obtain.
  49.  
  50.        _w_i_d_t_h___r_e_t_u_r_n
  51.        _h_e_i_g_h_t___r_e_t_u_r_n
  52.          Return the drawable's dimensions (width and
  53.          height).
  54.  
  55.        _w_i_n_d_o_w___a_t_t_r_i_b_u_t_e_s___r_e_t_u_r_n
  56.          Returns the specified window's attributes in the
  57.          _X_W_i_n_d_o_w_A_t_t_r_i_b_u_t_e_s structure.
  58.  
  59.        _x___r_e_t_u_r_n
  60.        _y___r_e_t_u_r_n     Return the x and y coordinates that define the
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XGetWindowAttributes(3X11)XLIB FUNCTIONSXGetWindowAttributes(3X11)
  71.  
  72.  
  73.          location of the drawable.  For a window, these
  74.          coordinates specify the upper-left outer corner
  75.          relative to its parent's origin.  For pixmaps,
  76.          these coordinates are always zero.
  77.  
  78. DDEESSCCRRIIPPTTIIOONN
  79.        The _X_G_e_t_W_i_n_d_o_w_A_t_t_r_i_b_u_t_e_s function returns the current
  80.        attributes for the specified window to an _X_W_i_n_d_o_w_A_t_-
  81.        _t_r_i_b_u_t_e_s structure.
  82.  
  83.        _X_G_e_t_W_i_n_d_o_w_A_t_t_r_i_b_u_t_e_s can generate _B_a_d_D_r_a_w_a_b_l_e and _B_a_d_W_i_n_-
  84.        _d_o_w errors.
  85.  
  86.        The _X_G_e_t_G_e_o_m_e_t_r_y function returns the root window and the
  87.        current geometry of the drawable.  The geometry of the
  88.        drawable includes the x and y coordinates, width and
  89.        height, border width, and depth.     These are described in
  90.        the argument list.  It is legal to pass to this function a
  91.        window whose class is _I_n_p_u_t_O_n_l_y.
  92.  
  93. SSTTRRUUCCTTUURREESS
  94.        The _X_W_i_n_d_o_w_A_t_t_r_i_b_u_t_e_s structure contains:
  95.  
  96.        typedef struct {
  97.         int x, y;             /* location of window */
  98.         int width, height;         /* width and height of window */
  99.         int border_width;         /* border width of window */
  100.         int depth;             /* depth of window */
  101.         Visual *visual;         /* the associated visual structure */
  102.         Window root;         /* root of screen containing window */
  103.         int class;             /* InputOutput, InputOnly*/
  104.         int bit_gravity;         /* one of the bit gravity values */
  105.         int win_gravity;         /* one of the window gravity values */
  106.         int backing_store;         /* NotUseful, WhenMapped, Always */
  107.         unsigned long backing_planes;/* planes to be preserved if possible */
  108.         unsigned long backing_pixel;/* value to be used when restoring planes */
  109.         Bool save_under;         /* boolean, should bits under be saved? */
  110.         Colormap colormap;         /* color map to be associated with window */
  111.         Bool map_installed;         /* boolean, is color map currently installed*/
  112.         int map_state;         /* IsUnmapped, IsUnviewable, IsViewable */
  113.         long all_event_masks;    /* set of events all people have interest in*/
  114.         long your_event_mask;    /* my event mask */
  115.         long do_not_propagate_mask;/* set of events that should not propagate */
  116.         Bool override_redirect;  /* boolean value for override-redirect */
  117.         Screen *screen;         /* back pointer to correct screen */
  118.        } XWindowAttributes;
  119.  
  120.        The x and y members are set to the upper-left outer corner
  121.        relative to the parent window's origin.    The width and
  122.        height members are set to the inside size of the window,
  123.        not including the border.  The border_width member is set
  124.        to the window's border width in pixels.    The depth member
  125.        is set to the depth of the window (that is, bits per pixel
  126.        for the object).     The visual member is a pointer to the
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XGetWindowAttributes(3X11)XLIB FUNCTIONSXGetWindowAttributes(3X11)
  137.  
  138.  
  139.        screen's associated _V_i_s_u_a_l structure.  The root member is
  140.        set to the root window of the screen containing the win-
  141.        dow.  The class member is set to the window's class and
  142.        can be either _I_n_p_u_t_O_u_t_p_u_t or _I_n_p_u_t_O_n_l_y.
  143.  
  144.        The bit_gravity member is set to the window's bit gravity
  145.        and can be one of the following:
  146.  
  147.        _F_o_r_g_e_t_G_r_a_v_i_t_y     _E_a_s_t_G_r_a_v_i_t_y
  148.        _N_o_r_t_h_W_e_s_t_G_r_a_v_-     _S_o_u_t_h_W_e_s_t_G_r_a_v_-
  149.        _i_t_y         _i_t_y
  150.        _N_o_r_t_h_G_r_a_v_i_t_y     _S_o_u_t_h_G_r_a_v_i_t_y
  151.        _N_o_r_t_h_E_a_s_t_G_r_a_v_-     _S_o_u_t_h_E_a_s_t_G_r_a_v_-
  152.        _i_t_y         _i_t_y
  153.        _W_e_s_t_G_r_a_v_i_t_y     _S_t_a_t_i_c_G_r_a_v_i_t_y
  154.        _C_e_n_t_e_r_G_r_a_v_i_t_y
  155.  
  156.        The win_gravity member is set to the window's window grav-
  157.        ity and can be one of the following:
  158.  
  159.        _U_n_m_a_p_G_r_a_v_i_t_y     _E_a_s_t_G_r_a_v_i_t_y
  160.        _N_o_r_t_h_W_e_s_t_G_r_a_v_-     _S_o_u_t_h_W_e_s_t_G_r_a_v_-
  161.        _i_t_y         _i_t_y
  162.        _N_o_r_t_h_G_r_a_v_i_t_y     _S_o_u_t_h_G_r_a_v_i_t_y
  163.        _N_o_r_t_h_E_a_s_t_G_r_a_v_-     _S_o_u_t_h_E_a_s_t_G_r_a_v_-
  164.        _i_t_y         _i_t_y
  165.        _W_e_s_t_G_r_a_v_i_t_y     _S_t_a_t_i_c_G_r_a_v_i_t_y
  166.        _C_e_n_t_e_r_G_r_a_v_i_t_y
  167.  
  168.        For additional information on gravity, see section 3.3.
  169.  
  170.        The backing_store member is set to indicate how the X
  171.        server should maintain the contents of a window and can be
  172.        _W_h_e_n_M_a_p_p_e_d, _A_l_w_a_y_s, or _N_o_t_U_s_e_f_u_l.  The backing_planes mem-
  173.        ber is set to indicate (with bits set to 1) which bit
  174.        planes of the window hold dynamic data that must be pre-
  175.        served in backing_stores and during save_unders.     The
  176.        backing_pixel member is set to indicate what values to use
  177.        for planes not set in backing_planes.
  178.  
  179.        The save_under member is set to _T_r_u_e or _F_a_l_s_e.  The col-
  180.        ormap member is set to the colormap for the specified win-
  181.        dow and can be a colormap ID or _N_o_n_e.  The map_installed
  182.        member is set to indicate whether the colormap is cur-
  183.        rently installed and can be _T_r_u_e or _F_a_l_s_e.  The map_state
  184.        member is set to indicate the state of the window and can
  185.        be _I_s_U_n_m_a_p_p_e_d, _I_s_U_n_v_i_e_w_a_b_l_e, or _I_s_V_i_e_w_a_b_l_e.  _I_s_U_n_v_i_e_w_a_b_l_e
  186.        is used if the window is mapped but some ancestor is
  187.        unmapped.
  188.  
  189.        The all_event_masks member is set to the bitwise inclusive
  190.        OR of all event masks selected on the window by all
  191.        clients.     The your_event_mask member is set to the bitwise
  192.        inclusive OR of all event masks selected by the querying
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. XGetWindowAttributes(3X11)XLIB FUNCTIONSXGetWindowAttributes(3X11)
  203.  
  204.  
  205.        client.    The do_not_propagate_mask member is set to the
  206.        bitwise inclusive OR of the set of events that should not
  207.        propagate.
  208.  
  209.        The override_redirect member is set to indicate whether
  210.        this window overrides structure control facilities and can
  211.        be _T_r_u_e or _F_a_l_s_e.  Window manager clients should ignore
  212.        the window if this member is _T_r_u_e.
  213.  
  214.        The screen member is set to a screen pointer that gives
  215.        you a back pointer to the correct screen.  This makes it
  216.        easier to obtain the screen information without having to
  217.        loop over the root window fields to see which field
  218.        matches.
  219.  
  220. DDIIAAGGNNOOSSTTIICCSS
  221.        _B_a_d_D_r_a_w_a_b_l_e
  222.          A value for a Drawable argument does not name a
  223.          defined Window or Pixmap.
  224.  
  225.        _B_a_d_W_i_n_d_o_w A value for a Window argument does not name a
  226.          defined Window.
  227.  
  228. SSEEEE AALLSSOO
  229.        XQueryPointer(3X11), XQueryTree(3X11)
  230.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262. X Version 11           Release 6.1                4
  263.  
  264.  
  265.