Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:27

0001 /* 
0002  * Motif
0003  *
0004  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
0005  *
0006  * These libraries and programs are free software; you can
0007  * redistribute them and/or modify them under the terms of the GNU
0008  * Lesser General Public License as published by the Free Software
0009  * Foundation; either version 2 of the License, or (at your option)
0010  * any later version.
0011  *
0012  * These libraries and programs are distributed in the hope that
0013  * they will be useful, but WITHOUT ANY WARRANTY; without even the
0014  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
0015  * PURPOSE. See the GNU Lesser General Public License for more
0016  * details.
0017  *
0018  * You should have received a copy of the GNU Lesser General Public
0019  * License along with these librararies and programs; if not, write
0020  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
0021  * Floor, Boston, MA 02110-1301 USA
0022 */ 
0023 #ifndef _XmMwmUtil_h
0024 #define _XmMwmUtil_h
0025 
0026 #include <X11/X.h>  /* for Window typedefs */
0027 #include <X11/Xmd.h>    /* for protocol typedefs */
0028 
0029 #ifdef __cplusplus
0030 extern "C" {
0031 #endif
0032 
0033 /*
0034  * Contents of the _MWM_HINTS property.
0035  */
0036 
0037 typedef struct
0038 {
0039     /* These correspond to XmRInt resources. (VendorSE.c) */
0040     int          flags;
0041     int      functions;
0042     int      decorations;
0043     int      input_mode;
0044     int      status;
0045 } MotifWmHints;
0046 
0047 typedef MotifWmHints    MwmHints;
0048 
0049 /* bit definitions for MwmHints.flags */
0050 #define MWM_HINTS_FUNCTIONS (1L << 0)
0051 #define MWM_HINTS_DECORATIONS   (1L << 1)
0052 #define MWM_HINTS_INPUT_MODE    (1L << 2)
0053 #define MWM_HINTS_STATUS    (1L << 3)
0054 
0055 /* bit definitions for MwmHints.functions */
0056 #define MWM_FUNC_ALL        (1L << 0)
0057 #define MWM_FUNC_RESIZE     (1L << 1)
0058 #define MWM_FUNC_MOVE       (1L << 2)
0059 #define MWM_FUNC_MINIMIZE   (1L << 3)
0060 #define MWM_FUNC_MAXIMIZE   (1L << 4)
0061 #define MWM_FUNC_CLOSE      (1L << 5)
0062 
0063 /* bit definitions for MwmHints.decorations */
0064 #define MWM_DECOR_ALL       (1L << 0)
0065 #define MWM_DECOR_BORDER    (1L << 1)
0066 #define MWM_DECOR_RESIZEH   (1L << 2)
0067 #define MWM_DECOR_TITLE     (1L << 3)
0068 #define MWM_DECOR_MENU      (1L << 4)
0069 #define MWM_DECOR_MINIMIZE  (1L << 5)
0070 #define MWM_DECOR_MAXIMIZE  (1L << 6)
0071 
0072 
0073 /* definitions for running automated tests */
0074 
0075 
0076 #define WINDOW_MINIMIZE_INFO            0
0077 #define WINDOW_MAXIMIZE_INFO            1
0078 #define WINDOW_MOVE_INFO            2
0079 #define WINDOW_RAISE_INFO           3
0080 #define WINDOW_RESIZE_NORTH_INFO        4
0081 #define WINDOW_RESIZE_SOUTH_INFO        5
0082 #define WINDOW_RESIZE_EAST_INFO         6
0083 #define WINDOW_RESIZE_WEST_INFO         7
0084 #define WINDOW_RESIZE_NORTHEAST_INFO    8
0085 #define WINDOW_RESIZE_NORTHWEST_INFO    9
0086 #define WINDOW_RESIZE_SOUTHEAST_INFO    10
0087 #define WINDOW_RESIZE_SOUTHWEST_INFO    11
0088 #define WINDOW_MENU_ITEM_SELECT_INFO    12  
0089 #define WINDOW_DEICONIFY_INFO           13
0090 #define WINDOW_MENU_POST_INFO       14
0091 #define WINDOW_FOCUS_INFO               15  
0092 #define WINDOW_MENU_UNPOST_INFO     16
0093 #define WINDOW_MENU_ITEM_CHECK_INFO     17
0094 #define ICON_MOVE_INFO              18
0095 #define ICON_MENU_POST_INFO             19
0096 #define ICON_MENU_UNPOST_INFO       20
0097 #define ICON_MENU_ITEM_SELECT_INFO      21
0098 
0099 #define WM_NORTHWEST                    0
0100 #define WM_NORTH                        1
0101 #define WM_NORTHEAST                    2
0102 #define WM_WEST                         3
0103 #define WM_EAST                         4
0104 #define WM_SOUTHWEST                    5
0105 #define WM_SOUTH                        6
0106 #define WM_SOUTHEAST                    7
0107 
0108 #define INVALID -1
0109 #define MAX_MENU_ITEMS 20
0110 #define MAX_NAME_LEN 95
0111 
0112 
0113 /* values for MwmHints.input_mode */
0114 #define MWM_INPUT_MODELESS          0
0115 #define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1
0116 #define MWM_INPUT_SYSTEM_MODAL          2
0117 #define MWM_INPUT_FULL_APPLICATION_MODAL    3
0118 
0119 /* bit definitions for MwmHints.status */
0120 #define MWM_TEAROFF_WINDOW  (1L << 0)
0121 
0122 /*
0123  * The following is for compatibility only. It use is deprecated.
0124  */
0125 #define MWM_INPUT_APPLICATION_MODAL MWM_INPUT_PRIMARY_APPLICATION_MODAL
0126 
0127 
0128 /*
0129  * Contents of the _MWM_INFO property.
0130  */
0131 
0132 typedef struct
0133 {
0134     long    flags;
0135     Window  wm_window;
0136 } MotifWmInfo;
0137 
0138 typedef MotifWmInfo MwmInfo;
0139 
0140 /* bit definitions for MotifWmInfo .flags */
0141 #define MWM_INFO_STARTUP_STANDARD   (1L << 0)
0142 #define MWM_INFO_STARTUP_CUSTOM     (1L << 1)
0143 
0144 
0145 
0146 /*
0147  * Definitions for the _MWM_HINTS property.
0148  */
0149 
0150 typedef struct
0151 {
0152     /* 32-bit property items are stored as long on the client (whether
0153      * that means 32 bits or 64).  XChangeProperty handles the conversion
0154      * to the actual 32-bit quantities sent to the server.
0155      */
0156     unsigned long   flags;
0157     unsigned long   functions;
0158     unsigned long   decorations;
0159     long            inputMode;
0160     unsigned long   status;
0161 } PropMotifWmHints;
0162 
0163 typedef PropMotifWmHints    PropMwmHints;
0164 
0165 
0166 /* number of elements of size 32 in _MWM_HINTS */
0167 #define PROP_MOTIF_WM_HINTS_ELEMENTS    5
0168 #define PROP_MWM_HINTS_ELEMENTS     PROP_MOTIF_WM_HINTS_ELEMENTS
0169 
0170 /* atom name for _MWM_HINTS property */
0171 #define _XA_MOTIF_WM_HINTS  "_MOTIF_WM_HINTS"
0172 #define _XA_MWM_HINTS       _XA_MOTIF_WM_HINTS
0173 
0174 /*
0175  * Definitions for the _MWM_MESSAGES property.
0176  */
0177 
0178 #define _XA_MOTIF_WM_MESSAGES   "_MOTIF_WM_MESSAGES"
0179 #define _XA_MWM_MESSAGES    _XA_MOTIF_WM_MESSAGES
0180 
0181 /* atom that enables client frame offset messages */
0182 #define _XA_MOTIF_WM_OFFSET "_MOTIF_WM_OFFSET"
0183 
0184 /*
0185  * Definitions for the _MWM_MENU property.
0186  */
0187 
0188 /* atom name for _MWM_MENU property */
0189 #define _XA_MOTIF_WM_MENU   "_MOTIF_WM_MENU"
0190 #define _XA_MWM_MENU        _XA_MOTIF_WM_MENU
0191 
0192 
0193 /*
0194  * Definitions for the _MWM_INFO property.
0195  */
0196 
0197 typedef struct
0198 {
0199   /* 32-bit property items are stored as long on the client (whether
0200    * that means 32 bits or 64).  XChangeProperty handles the conversion
0201    * to the actual 32-bit quantities sent to the server.
0202    */
0203   long      flags;
0204   Window    wmWindow;
0205 } PropMotifWmInfo;
0206 
0207 typedef PropMotifWmInfo PropMwmInfo;
0208 
0209 
0210 /* number of elements of size 32 in _MWM_INFO */
0211 #define PROP_MOTIF_WM_INFO_ELEMENTS 2
0212 #define PROP_MWM_INFO_ELEMENTS      PROP_MOTIF_WM_INFO_ELEMENTS
0213 
0214 /* atom name for _MWM_INFO property */
0215 #define _XA_MOTIF_WM_INFO   "_MOTIF_WM_INFO"
0216 #define _XA_MWM_INFO        _XA_MOTIF_WM_INFO
0217 
0218 
0219 /*
0220  * Miscellaneous atom definitions
0221  */
0222 
0223 /* atom for motif input bindings */
0224 #define _XA_MOTIF_BINDINGS  "_MOTIF_BINDINGS"
0225 
0226 #ifdef __cplusplus
0227 }  /* Close scope of 'extern "C"' declaration which encloses file. */
0228 #endif
0229 
0230 #endif /* _XmMwmUtil_h */