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

  1.  
  2.  
  3.  
  4. XAllocWMHints(3X11)      XLIB FUNCTIONS      XAllocWMHints(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XAllocWMHints, XSetWMHints, XGetWMHints, XWMHints - allo-
  9.        cate window manager hints structure and set or read a win-
  10.        dow's WM_HINTS property
  11.  
  12. SSYYNNTTAAXX
  13.        XWMHints *XAllocWMHints()
  14.  
  15.        XSetWMHints(_d_i_s_p_l_a_y, _w, _w_m_h_i_n_t_s)
  16.          Display *_d_i_s_p_l_a_y;
  17.          Window _w;
  18.          XWMHints *_w_m_h_i_n_t_s;
  19.  
  20.  
  21.        XWMHints *XGetWMHints(_d_i_s_p_l_a_y, _w)
  22.          Display *_d_i_s_p_l_a_y;
  23.          Window _w;
  24.  
  25. AARRGGUUMMEENNTTSS
  26.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  27.  
  28.        _w     Specifies the window.
  29.  
  30.        _w_m_h_i_n_t_s     Specifies the _X_W_M_H_i_n_t_s structure to be used.
  31.  
  32. DDEESSCCRRIIPPTTIIOONN
  33.        The _X_A_l_l_o_c_W_M_H_i_n_t_s function allocates and returns a pointer
  34.        to a _X_W_M_H_i_n_t_s structure.     Note that all fields in the
  35.        _X_W_M_H_i_n_t_s structure are initially set to zero.  If insuffi-
  36.        cient memory is available, _X_A_l_l_o_c_W_M_H_i_n_t_s returns NULL.  To
  37.        free the memory allocated to this structure, use _X_F_r_e_e.
  38.  
  39.        The _X_S_e_t_W_M_H_i_n_t_s function sets the window manager hints
  40.        that include icon information and location, the initial
  41.        state of the window, and whether the application relies on
  42.        the window manager to get keyboard input.
  43.  
  44.        _X_S_e_t_W_M_H_i_n_t_s can generate _B_a_d_A_l_l_o_c and _B_a_d_W_i_n_d_o_w errors.
  45.  
  46.        The _X_G_e_t_W_M_H_i_n_t_s function reads the window manager hints
  47.        and returns NULL if no WM_HINTS property was set on the
  48.        window or returns a pointer to a _X_W_M_H_i_n_t_s structure if it
  49.        succeeds.  When finished with the data, free the space
  50.        used for it by calling _X_F_r_e_e.
  51.  
  52.        _X_G_e_t_W_M_H_i_n_t_s can generate a _B_a_d_W_i_n_d_o_w error.
  53.  
  54. PPRROOPPEERRTTIIEESS
  55.        WM_HINTS     Additional hints set by the client for use by
  56.          the window manager.  The C type of this property
  57.          is _X_W_M_H_i_n_t_s.
  58.  
  59. SSTTRRUUCCTTUURREESS
  60.        The _X_W_M_H_i_n_t_s structure contains:
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XAllocWMHints(3X11)      XLIB FUNCTIONS      XAllocWMHints(3X11)
  71.  
  72.  
  73.        /* Window manager hints mask bits */
  74.        #define     _I_n_p_u_t_H_i_n_t             (1L << 0)
  75.        #define     _S_t_a_t_e_H_i_n_t             (1L << 1)
  76.        #define     _I_c_o_n_P_i_x_m_a_p_H_i_n_t             (1L << 2)
  77.        #define     _I_c_o_n_W_i_n_d_o_w_H_i_n_t             (1L << 3)
  78.        #define     _I_c_o_n_P_o_s_i_t_i_o_n_H_i_n_t         (1L << 4)
  79.        #define     _I_c_o_n_M_a_s_k_H_i_n_t             (1L << 5)
  80.        #define     _W_i_n_d_o_w_G_r_o_u_p_H_i_n_t         (1L << 6)
  81.        #define     _U_r_g_e_n_c_y_H_i_n_t             (1L << 8)
  82.        #define     _A_l_l_H_i_n_t_s             (InputHint|StateHint|IconPixmapHint|
  83.                          IconWin-
  84.                          dowHint|IconPositionHint|
  85.                          Icon-
  86.                          MaskHint|WindowGroupHint)
  87.        /* Values */
  88.  
  89.        typedef struct {
  90.         long flags;        /* marks which fields in this structure are defined */
  91.         Bool input;        /* does this application rely on the window manager to
  92.                 get keyboard input? */
  93.         int initial_state;    /* see below */
  94.         Pixmap icon_pixmap; /* pixmap to be used as icon */
  95.         Window icon_window; /* window to be used as icon */
  96.         int icon_x, icon_y; /* initial position of icon */
  97.         Pixmap icon_mask;    /* pixmap to be used as mask for icon_pixmap */
  98.         XID window_group;    /* id of related window group */
  99.         /* this structure may be extended in the future */
  100.        } XWMHints;
  101.  
  102.        The input member is used to communicate to the window man-
  103.        ager the input focus model used by the application.
  104.        Applications that expect input but never explicitly set
  105.        focus to any of their subwindows (that is, use the push
  106.        model of focus management), such as X Version 10 style
  107.        applications that use real-estate driven focus, should set
  108.        this member to _T_r_u_e.  Similarly, applications that set
  109.        input focus to their subwindows only when it is given to
  110.        their top-level window by a window manager should also set
  111.        this member to _T_r_u_e.  Applications that manage their own
  112.        input focus by explicitly setting focus to one of their
  113.        subwindows whenever they want keyboard input (that is, use
  114.        the pull model of focus management) should set this member
  115.        to _F_a_l_s_e.  Applications that never expect any keyboard
  116.        input also should set this member to _F_a_l_s_e.
  117.  
  118.        Pull model window managers should make it possible for
  119.        push model applications to get input by setting input
  120.        focus to the top-level windows of applications whose input
  121.        member is _T_r_u_e.    Push model window managers should make
  122.        sure that pull model applications do not break them by
  123.        resetting input focus to _P_o_i_n_t_e_r_R_o_o_t when it is appropri-
  124.        ate (for example, whenever an application whose input mem-
  125.        ber is _F_a_l_s_e sets input focus to one of its subwindows).
  126.  
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XAllocWMHints(3X11)      XLIB FUNCTIONS      XAllocWMHints(3X11)
  137.  
  138.  
  139.        The definitions for the initial_state flag are:
  140.        #define     _W_i_t_h_d_r_a_w_n_S_t_a_t_e        0
  141.        #define     _N_o_r_m_a_l_S_t_a_t_e        1    /* most applications start
  142.                          this way */
  143.        #define     _I_c_o_n_i_c_S_t_a_t_e        3    /* application wants to
  144.                          start as an icon */
  145.        The icon_mask specifies which pixels of the icon_pixmap
  146.        should be used as the icon.  This allows for nonrectangu-
  147.        lar icons.  Both icon_pixmap and icon_mask must be
  148.        bitmaps.     The icon_window lets an application provide a
  149.        window for use as an icon for window managers that support
  150.        such use.  The window_group lets you specify that this
  151.        window belongs to a group of other windows.  For example,
  152.        if a single application manipulates multiple top-level
  153.        windows, this allows you to provide enough information
  154.        that a window manager can iconify all of the windows
  155.        rather than just the one window.
  156.  
  157.        The _U_r_g_e_n_c_y_H_i_n_t flag, if set in the flags field, indicates
  158.        that the client deems the window contents to be urgent,
  159.        requiring the timely response of the user.  The window
  160.        manager will make some effort to draw the user's attention
  161.        to this window while this flag is set.  The client must
  162.        provide some means by which the user can cause the urgency
  163.        flag to be cleared (either mitigating the condition that
  164.        made the window urgent or merely shutting off the alarm)
  165.        or the window to be withdrawn.
  166.  
  167. DDIIAAGGNNOOSSTTIICCSS
  168.        _B_a_d_A_l_l_o_c     The server failed to allocate the requested
  169.          resource or server memory.
  170.  
  171.        _B_a_d_W_i_n_d_o_w A value for a Window argument does not name a
  172.          defined Window.
  173.  
  174. SSEEEE AALLSSOO
  175.        XAllocClassHint(3X11), XAllocIconSize(3X11), XAllocSize-
  176.        Hints(3X11), XFree(3X11), XSetCommand(3X11), XSetTran-
  177.        sientForHint(3X11), XSetTextProperty(3X11), XSetWMClient-
  178.        Machine(3X11), XSetWMColormapWindows(3X11), XSetWMIcon-
  179.        Name(3X11), XSetWMName(3X11), XSetWMProperties(3X11),
  180.        XSetWMProtocols(3X11), XStringListToTextProperty(3X11)
  181.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  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.