4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (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 Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * The Original Code is Copyright (C) 2007 Blender Foundation.
21 * All rights reserved.
24 * Contributor(s): Blender Foundation
26 * ***** END GPL LICENSE BLOCK *****
31 /* exported types for WM */
33 #include "wm_cursors.h"
34 #include "wm_event_types.h"
36 /* ************** wmOperatorType ************************ */
39 #define OPTYPE_REGISTER 1
41 /* ************** wmEvent ************************ */
43 /* each event should have full modifier state */
44 /* event comes from eventmanager and from keymap */
45 typedef struct wmEvent {
46 struct wmEvent *next, *prev;
48 short type; /* event code itself (short, is also in keymap) */
49 short val; /* press, release, scrollvalue */
50 short x, y; /* mouse pointer position */
51 short unicode; /* future, ghost? */
52 char ascii; /* from ghost */
56 short shift, ctrl, alt, oskey; /* oskey is apple or windowskey, value denotes order of pressed */
57 short keymodifier; /* rawkey modifier */
59 /* keymap item, set by handler (weak?) */
60 const char *keymap_idname;
63 short custom; /* custom data type, stylus, 6dof, see wm_event_types.h */
64 void *customdata; /* ascii, unicode, mouse coords, angles, vectors, dragdrop info */
69 /* ************** wmKeyMap ************************ */
76 /* means modifier should be pressed 2nd */
87 /* ************** notifiers ****************** */
89 typedef struct wmNotifier {
90 struct wmNotifier *prev, *next;
92 struct wmWindow *window;
102 WM_NOTE_WINDOW_REDRAW,
103 WM_NOTE_SCREEN_CHANGED,
104 WM_NOTE_OBJECT_CHANGED,
109 /* ************** custom wmEvent data ************** */
114 typedef struct wmTabletData {
115 int Active; /* 0=None, 1=Stylus, 2=Eraser */
116 float Pressure; /* range 0.0 (not touching) to 1.0 (full pressure) */
117 float Xtilt; /* range 0.0 (upright) to 1.0 (tilted fully against the tablet surface) */
118 float Ytilt; /* as above */
122 /* *************** migrated stuff, clean later? ******************************** */
124 typedef struct RecentFile {
125 struct RecentFile *next, *prev;
130 #endif /* WM_TYPES_H */