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

  1.  
  2.  
  3.  
  4. XParseGeometry(3X11)      XLIB FUNCTIONS     XParseGeometry(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XParseGeometry, XWMGeometry - parse window geometry
  9.  
  10. SSYYNNTTAAXX
  11.        int XParseGeometry(_p_a_r_s_e_s_t_r_i_n_g, _x___r_e_t_u_r_n, _y___r_e_t_u_r_n,
  12.        _w_i_d_t_h___r_e_t_u_r_n, _h_e_i_g_h_t___r_e_t_u_r_n)
  13.          char *_p_a_r_s_e_s_t_r_i_n_g;
  14.          int *_x___r_e_t_u_r_n, *_y___r_e_t_u_r_n;
  15.          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;
  16.  
  17.        int XWMGeometry(_d_i_s_p_l_a_y, _s_c_r_e_e_n, _u_s_e_r___g_e_o_m, _d_e_f___g_e_o_m,
  18.        _b_w_i_d_t_h, _h_i_n_t_s, _x___r_e_t_u_r_n, _y___r_e_t_u_r_n,
  19.                _w_i_d_t_h___r_e_t_u_r_n, _h_e_i_g_h_t___r_e_t_u_r_n,
  20.        _g_r_a_v_i_t_y___r_e_t_u_r_n)
  21.          Display *_d_i_s_p_l_a_y;
  22.          int _s_c_r_e_e_n;
  23.          char *_u_s_e_r___g_e_o_m;
  24.          char *_d_e_f___g_e_o_m;
  25.          unsigned int _b_w_i_d_t_h;
  26.          XSizeHints *_h_i_n_t_s;
  27.          int *_x___r_e_t_u_r_n, *_y___r_e_t_u_r_n;
  28.          int *_w_i_d_t_h___r_e_t_u_r_n;
  29.          int *_h_e_i_g_h_t___r_e_t_u_r_n;
  30.          int *_g_r_a_v_i_t_y___r_e_t_u_r_n;
  31.  
  32. AARRGGUUMMEENNTTSS
  33.        _p_o_s_i_t_i_o_n
  34.        _d_e_f_a_u_l_t___p_o_s_i_t_i_o_n
  35.          Specify the geometry specifications.
  36.  
  37.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  38.  
  39.        _f_h_e_i_g_h_t
  40.        _f_w_i_d_t_h     Specify the font height and width in pixels
  41.          (increment size).
  42.  
  43.        _p_a_r_s_e_s_t_r_i_n_g
  44.          Specifies the string you want to parse.
  45.  
  46.        _s_c_r_e_e_n     Specifies the screen.
  47.  
  48.        _w_i_d_t_h___r_e_t_u_r_n
  49.        _h_e_i_g_h_t___r_e_t_u_r_n
  50.          Return the width and height determined.
  51.  
  52.        _x_a_d_d_e_r
  53.        _y_a_d_d_e_r     Specify additional interior padding needed in
  54.          the window.
  55.  
  56.        _x___r_e_t_u_r_n
  57.        _y___r_e_t_u_r_n     Return the x and y offsets.
  58.  
  59.        _b_w_i_d_t_h     Specifies the border width.
  60.  
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XParseGeometry(3X11)      XLIB FUNCTIONS     XParseGeometry(3X11)
  71.  
  72.  
  73.        _h_i_n_t_s     Specifies the size hints for the window in its
  74.          normal state.
  75.  
  76.        _d_e_f___g_e_o_m     Specifies the application's default geometry or
  77.          NULL.
  78.  
  79.        _g_r_a_v_i_t_y___r_e_t_u_r_n
  80.          Returns the window gravity.
  81.  
  82.        _u_s_e_r___g_e_o_m Specifies the user-specified geometry or NULL.
  83.  
  84. DDEESSCCRRIIPPTTIIOONN
  85.        By convention, X applications use a standard string to
  86.        indicate window size and placement.  _X_P_a_r_s_e_G_e_o_m_e_t_r_y makes
  87.        it easier to conform to this standard because it allows
  88.        you to parse the standard window geometry.  Specifically,
  89.        this function lets you parse strings of the form:
  90.  
  91.        [=][<_w_i_d_t_h>{xX}<_h_e_i_g_h_t>][{+-}<_x_o_f_f_s_e_t>{+-}<_y_o_f_f_s_e_t>]
  92.  
  93.        The fields map into the arguments associated with this
  94.        function.  (Items enclosed in <> are integers, items in []
  95.        are optional, and items enclosed in {} indicate ``choose
  96.        one of.''  Note that the brackets should not appear in the
  97.        actual string.)    If the string is not in the Host Portable
  98.        Character Encoding, the result is implementation-
  99.        dependent.
  100.  
  101.        The _X_P_a_r_s_e_G_e_o_m_e_t_r_y function returns a bitmask that indi-
  102.        cates which of the four values (width, height, xoffset,
  103.        and yoffset) were actually found in the string and whether
  104.        the x and y values are negative.     By convention, -0 is not
  105.        equal to +0, because the user needs to be able to say
  106.        ``position the window relative to the right or bottom
  107.        edge.''    For each value found, the corresponding argument
  108.        is updated.  For each value not found, the argument is
  109.        left unchanged.    The bits are represented by _X_V_a_l_u_e,
  110.        _Y_V_a_l_u_e, _W_i_d_t_h_V_a_l_u_e, _H_e_i_g_h_t_V_a_l_u_e, _X_N_e_g_a_t_i_v_e, or _Y_N_e_g_a_t_i_v_e
  111.        and are defined in <_X_1_1_/_X_u_t_i_l_._h>.  They will be set when-
  112.        ever one of the values is defined or one of the signs is
  113.        set.
  114.  
  115.        If the function returns either the _X_V_a_l_u_e or _Y_V_a_l_u_e flag,
  116.        you should place the window at the requested position.
  117.  
  118.        The _X_W_M_G_e_o_m_e_t_r_y function combines any geometry information
  119.        (given in the format used by _X_P_a_r_s_e_G_e_o_m_e_t_r_y) specified by
  120.        the user and by the calling program with size hints (usu-
  121.        ally the ones to be stored in WM_NORMAL_HINTS) and returns
  122.        the position, size, and gravity (_N_o_r_t_h_W_e_s_t_G_r_a_v_i_t_y,
  123.        _N_o_r_t_h_E_a_s_t_G_r_a_v_i_t_y, _S_o_u_t_h_E_a_s_t_G_r_a_v_i_t_y, or _S_o_u_t_h_W_e_s_t_G_r_a_v_i_t_y)
  124.        that describe the window.  If the base size is not set in
  125.        the _X_S_i_z_e_H_i_n_t_s structure, the minimum size is used if set.
  126.        Otherwise, a base size of zero is assumed.  If no minimum
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XParseGeometry(3X11)      XLIB FUNCTIONS     XParseGeometry(3X11)
  137.  
  138.  
  139.        size is set in the hints structure, the base size is used.
  140.        A mask (in the form returned by _X_P_a_r_s_e_G_e_o_m_e_t_r_y) that
  141.        describes which values came from the user specification
  142.        and whether or not the position coordinates are relative
  143.        to the right and bottom edges is returned.  Note that
  144.        these coordinates will have already been accounted for in
  145.        the x_return and y_return values.
  146.  
  147.        Note that invalid geometry specifications can cause a
  148.        width or height of zero to be returned.    The caller may
  149.        pass the address of the hints win_gravity field as grav-
  150.        ity_return to update the hints directly.
  151.  
  152. SSEEEE AALLSSOO
  153.        XSetWMProperties(3X11)
  154.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.