]> Pileus Git - ~andy/gtk/blob - gdk/x11/MwmUtil.h
Change FSF Address
[~andy/gtk] / gdk / x11 / MwmUtil.h
1 /**
2  *
3  * $Id$
4  *
5  * Copyright (C) 1995 Free Software Foundation, Inc.
6  *
7  * This file is part of the GNU LessTif Library.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Library General Public
11  * License as published by the Free Software Foundation; either
12  * version 2 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Library General Public License for more details.
18  *
19  * You should have received a copy of the GNU Library General Public
20  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
21  *
22  *
23  * * Feb 21 1999 - George Lebl (jirka@5z.com)
24  *                 Owen Taylor (otaylor@redhat.com)
25  *
26  *   Modified so that the MotifWmHints structure defined here
27  *   is suitable for client side use on 64-bit architectures.
28  *   X expects fields with a format of 32 to be longs, even
29  *   when sizeof(long) == 8.
30  **/
31
32 #ifndef MWMUTIL_H_INCLUDED
33 #define MWMUTIL_H_INCLUDED
34
35 #include <X11/Xmd.h>
36
37 G_BEGIN_DECLS
38
39 typedef struct {
40     unsigned long flags;
41     unsigned long functions;
42     unsigned long decorations;
43     long input_mode;
44     unsigned long status;
45 } MotifWmHints, MwmHints;
46
47 #define MWM_HINTS_FUNCTIONS     (1L << 0)
48 #define MWM_HINTS_DECORATIONS   (1L << 1)
49 #define MWM_HINTS_INPUT_MODE    (1L << 2)
50 #define MWM_HINTS_STATUS        (1L << 3)
51
52 #define MWM_FUNC_ALL            (1L << 0)
53 #define MWM_FUNC_RESIZE         (1L << 1)
54 #define MWM_FUNC_MOVE           (1L << 2)
55 #define MWM_FUNC_MINIMIZE       (1L << 3)
56 #define MWM_FUNC_MAXIMIZE       (1L << 4)
57 #define MWM_FUNC_CLOSE          (1L << 5)
58
59 #define MWM_DECOR_ALL           (1L << 0)
60 #define MWM_DECOR_BORDER        (1L << 1)
61 #define MWM_DECOR_RESIZEH       (1L << 2)
62 #define MWM_DECOR_TITLE         (1L << 3)
63 #define MWM_DECOR_MENU          (1L << 4)
64 #define MWM_DECOR_MINIMIZE      (1L << 5)
65 #define MWM_DECOR_MAXIMIZE      (1L << 6)
66
67 #define MWM_INPUT_MODELESS 0
68 #define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1
69 #define MWM_INPUT_SYSTEM_MODAL 2
70 #define MWM_INPUT_FULL_APPLICATION_MODAL 3
71 #define MWM_INPUT_APPLICATION_MODAL MWM_INPUT_PRIMARY_APPLICATION_MODAL
72
73 #define MWM_TEAROFF_WINDOW      (1L<<0)
74
75 /*
76  * atoms
77  */
78 #define _XA_MOTIF_BINDINGS              "_MOTIF_BINDINGS"
79 #define _XA_MOTIF_WM_HINTS              "_MOTIF_WM_HINTS"
80 #define _XA_MOTIF_WM_MESSAGES           "_MOTIF_WM_MESSAGES"
81 #define _XA_MOTIF_WM_OFFSET             "_MOTIF_WM_OFFSET"
82 #define _XA_MOTIF_WM_MENU               "_MOTIF_WM_MENU"
83 #define _XA_MOTIF_WM_INFO               "_MOTIF_WM_INFO"
84 #define _XA_MWM_HINTS                   _XA_MOTIF_WM_HINTS
85 #define _XA_MWM_MESSAGES                _XA_MOTIF_WM_MESSAGES
86 #define _XA_MWM_MENU                    _XA_MOTIF_WM_MENU
87 #define _XA_MWM_INFO                    _XA_MOTIF_WM_INFO
88
89
90 /*
91  * _MWM_INFO property
92  */
93 typedef struct {
94     long flags;
95     Window wm_window;
96 } MotifWmInfo;
97
98 typedef MotifWmInfo MwmInfo;
99
100 #define MWM_INFO_STARTUP_STANDARD       (1L<<0)
101 #define MWM_INFO_STARTUP_CUSTOM         (1L<<1)
102
103 /*
104  * _MWM_HINTS property
105  */
106 typedef struct {
107     unsigned long flags;
108     unsigned long functions;
109     unsigned long decorations;
110     long inputMode;
111     unsigned long status;
112 } PropMotifWmHints;
113
114 typedef PropMotifWmHints PropMwmHints;
115
116 #define PROP_MOTIF_WM_HINTS_ELEMENTS 5
117 #define PROP_MWM_HINTS_ELEMENTS PROP_MOTIF_WM_HINTS_ELEMENTS
118
119 /*
120  * _MWM_INFO property, slight return
121  */
122 typedef struct {
123     unsigned long flags;
124     unsigned long wmWindow;
125 } PropMotifWmInfo;
126
127 typedef PropMotifWmInfo PropMwmInfo;
128
129 #define PROP_MOTIF_WM_INFO_ELEMENTS 2
130 #define PROP_MWM_INFO_ELEMENTS PROP_MOTIF_WM_INFO_ELEMENTS
131
132 G_END_DECLS
133
134 #endif /* MWMUTIL_H_INCLUDED */