home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / X11 / XGetWindowAttributes.z / XGetWindowAttributes
Encoding:
Text File  |  2002-10-03  |  13.1 KB  |  285 lines

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