~ctwm/ctwm/trunk

484 by Matthew Fuller
Consistently rename all the include guards so they match the filename,
1
#ifndef _CTWM_MWMHINTS_H
2
#define _CTWM_MWMHINTS_H
252.1.1 by Olaf 'Rhialto' Seibert
Look at some _MOTIF_WM_HINTS; proof of concept version.
3
252.1.2 by Olaf 'Rhialto' Seibert
Integrate MWM hints for titlebar and border better in the existing
4
/*
5
 * Contents of the _MOTIF_WM_HINTS property.
6
 */
7
8
#undef FULL_MWM_DATA
9
304.1.2 by Matthew Fuller
Run 'make indent' to reindent the world.
10
typedef struct {
11
	int          flags;
12
	int          functions;
13
	int          decorations;
252.1.2 by Olaf 'Rhialto' Seibert
Integrate MWM hints for titlebar and border better in the existing
14
#ifdef FULL_MWM_DATA
304.1.2 by Matthew Fuller
Run 'make indent' to reindent the world.
15
	int          input_mode;
16
	int          status;
252.1.2 by Olaf 'Rhialto' Seibert
Integrate MWM hints for titlebar and border better in the existing
17
#endif
18
} MotifWmHints;
19
20
/* bit definitions for MwmHints.flags */
304.1.2 by Matthew Fuller
Run 'make indent' to reindent the world.
21
#define MWM_HINTS_FUNCTIONS     (1L << 0)
22
#define MWM_HINTS_DECORATIONS   (1L << 1)
23
#define MWM_HINTS_INPUT_MODE    (1L << 2)
24
#define MWM_HINTS_STATUS        (1L << 3)
252.1.2 by Olaf 'Rhialto' Seibert
Integrate MWM hints for titlebar and border better in the existing
25
26
/* bit definitions for MwmHints.functions */
304.1.2 by Matthew Fuller
Run 'make indent' to reindent the world.
27
#define MWM_FUNC_ALL            (1L << 0)
28
#define MWM_FUNC_RESIZE         (1L << 1)
29
#define MWM_FUNC_MOVE           (1L << 2)
30
#define MWM_FUNC_MINIMIZE       (1L << 3)
31
#define MWM_FUNC_MAXIMIZE       (1L << 4)
32
#define MWM_FUNC_CLOSE          (1L << 5)
252.1.2 by Olaf 'Rhialto' Seibert
Integrate MWM hints for titlebar and border better in the existing
33
34
/* bit definitions for MwmHints.decorations */
304.1.2 by Matthew Fuller
Run 'make indent' to reindent the world.
35
#define MWM_DECOR_ALL           (1L << 0)       /* [v] */
36
#define MWM_DECOR_BORDER        (1L << 1)       /* [v] */
37
#define MWM_DECOR_RESIZEH       (1L << 2)
38
#define MWM_DECOR_TITLE         (1L << 3)       /* [v] */
39
#define MWM_DECOR_MENU          (1L << 4)
40
#define MWM_DECOR_MINIMIZE      (1L << 5)
41
#define MWM_DECOR_MAXIMIZE      (1L << 6)
252.1.2 by Olaf 'Rhialto' Seibert
Integrate MWM hints for titlebar and border better in the existing
42
43
/* values for MwmHints.input_mode */
304.1.2 by Matthew Fuller
Run 'make indent' to reindent the world.
44
#define MWM_INPUT_MODELESS                      0
45
#define MWM_INPUT_PRIMARY_APPLICATION_MODAL     1
46
#define MWM_INPUT_SYSTEM_MODAL                  2
47
#define MWM_INPUT_FULL_APPLICATION_MODAL        3
252.1.2 by Olaf 'Rhialto' Seibert
Integrate MWM hints for titlebar and border better in the existing
48
49
/* bit definitions for MwmHints.status */
304.1.2 by Matthew Fuller
Run 'make indent' to reindent the world.
50
#define MWM_TEAROFF_WINDOW      (1L << 0)
252.1.2 by Olaf 'Rhialto' Seibert
Integrate MWM hints for titlebar and border better in the existing
51
276 by Olaf 'Rhialto' Seibert
Make provenance of MWM definitions clear.
52
/*
53
 * The above includes some contents from <Xm/MwmUtil.h>.
54
 *
55
 * Copyright (c) 1987-2012, The Open Group. All rights reserved.
56
 *
57
 * These libraries and programs are free software; you can
58
 * redistribute them and/or modify them under the terms of the GNU
59
 * Lesser General Public License as published by the Free Software
60
 * Foundation; either version 2 of the License, or (at your option)
61
 * any later version.
62
 */
63
473.1.1 by Matthew Fuller
Switch to using C99 bool for GetMWMHints instead of int, since it's
64
bool GetMWMHints(Window w, MotifWmHints *mwmHints);
252.1.1 by Olaf 'Rhialto' Seibert
Look at some _MOTIF_WM_HINTS; proof of concept version.
65
473.1.4 by Matthew Fuller
Let mwm_has_border() return a trivalent answer, and create a
66
int mwm_has_border(MotifWmHints *hints);
67
bool mwm_sets_title(MotifWmHints *hints);
473.1.2 by Matthew Fuller
Add some simple test wrappers, to hide away some of the internals.
68
bool mwm_has_title(MotifWmHints *hints);
69
252.1.1 by Olaf 'Rhialto' Seibert
Look at some _MOTIF_WM_HINTS; proof of concept version.
70
#endif /* include guard */