2 * WindowMaker external notification definitions
4 * Copyright (c) 1998 Peter Bentley (pete@sorted.org)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
25 /* Make a notification ID from a category and an 'event' */
26 #define WMN_MAKE_ID(cat, ev) ( ((cat)<<4) | (ev) )
28 /* Split an ID into category and 'event' */
29 #define WMN_CATEGORY_OF( id ) ( ((id) & 0x00f0) >> 4 )
30 #define WMN_EVENT_OF( id ) ( (id) & 0x000f )
32 /* Make notification mask from categories or ids */
33 #define WMN_CATEGORY_TO_MASK( cat ) ( 0x0001 << ( cat ))
34 #define WMN_ID_TO_MASK( id ) WMN_CATEGORY_TO_MASK( WMN_CATEGORY_OF( id ))
36 /* Constant and mask for "all events in all categories" */
37 #define WMN_NOTIFY_ALL 0x0000
38 #define WMN_MASK_ALL 0x00ff
40 /* Extract the notify type from an int or long which may have other data */
41 #define WMN_GET_VALUE( val ) ( (val) & 0x00ff )
43 /* Notification categories */
44 #define WMN_CAT_SYSTEM 0x0001
45 #define WMN_CAT_WORKSPACE 0x0002
46 #define WMN_CAT_APPLICATION 0x0003
47 #define WMN_CAT_WINOP 0x0004
49 /* System notifications */
50 #define WMN_SYS_START WMN_MAKE_ID( WMN_CAT_SYSTEM, 0x0001 )
51 #define WMN_SYS_QUIT WMN_MAKE_ID( WMN_CAT_SYSTEM, 0x0002 )
52 #define WMN_SYS_RESTART WMN_MAKE_ID( WMN_CAT_SYSTEM, 0x0003 )
53 #define WMN_SYS_DEFLOAD WMN_MAKE_ID( WMN_CAT_SYSTEM, 0x0004 )
55 /* Workspace notifications */
56 #define WMN_WS_CHANGE WMN_MAKE_ID( WMN_CAT_WORKSPACE, 0x0001 )
57 #define WMN_WS_CREATE WMN_MAKE_ID( WMN_CAT_WORKSPACE, 0x0002 )
58 #define WMN_WS_DESTROY WMN_MAKE_ID( WMN_CAT_WORKSPACE, 0x0003 )
59 #define WMN_WS_RENAME WMN_MAKE_ID( WMN_CAT_WORKSPACE, 0x0004 )
61 /* Application notifications */
62 #define WMN_APP_START WMN_MAKE_ID( WMN_CAT_APPLICATION, 0x0001 )
63 #define WMN_APP_EXIT WMN_MAKE_ID( WMN_CAT_APPLICATION, 0x0002 )
65 /* Window operation notifications */
66 #define WMN_WIN_MAXIMIZE WMN_MAKE_ID( WMN_CAT_WINOP, 0x0001 )
67 #define WMN_WIN_UNMAXIMIZE WMN_MAKE_ID( WMN_CAT_WINOP, 0x0002 )
68 #define WMN_WIN_SHADE WMN_MAKE_ID( WMN_CAT_WINOP, 0x0003 )
69 #define WMN_WIN_UNSHADE WMN_MAKE_ID( WMN_CAT_WINOP, 0x0004 )
70 #define WMN_WIN_ICONIFY WMN_MAKE_ID( WMN_CAT_WINOP, 0x0005 )
71 #define WMN_WIN_DEICONIFY WMN_MAKE_ID( WMN_CAT_WINOP, 0x0006 )
72 #define WMN_WIN_MOVE WMN_MAKE_ID( WMN_CAT_WINOP, 0x0007 )
73 #define WMN_WIN_RESIZE WMN_MAKE_ID( WMN_CAT_WINOP, 0x0008 )
74 #define WMN_WIN_HIDE WMN_MAKE_ID( WMN_CAT_WINOP, 0x0009 )
75 #define WMN_WIN_UNHIDE WMN_MAKE_ID( WMN_CAT_WINOP, 0x000a )
76 #define WMN_WIN_FOCUS WMN_MAKE_ID( WMN_CAT_WINOP, 0x000a )
77 #define WMN_WIN_UNFOCUS WMN_MAKE_ID( WMN_CAT_WINOP, 0x000b )
80 #endif /*WMNOTDEF_H_*/