diff options
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h new file mode 100644 index 00000000000..c3a1662c1e1 --- /dev/null +++ b/source/blender/windowmanager/WM_types.h @@ -0,0 +1,70 @@ +/** + * $Id: + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2007 Blender Foundation. + * All rights reserved. + * + * + * Contributor(s): Blender Foundation + * + * ***** END GPL LICENSE BLOCK ***** + */ +#ifndef WM_TYPES_H +#define WM_TYPES_H + +/* exported types for WM */ + +/* ************** wmOperatorType ************************ */ + +/* flag */ +#define OPTYPE_REGISTER 1 + +/* ************** wmKeyMap ************************ */ + +/* modifier */ +#define KM_SHIFT 1 +#define KM_CTRL 2 +#define KM_ALT 4 +#define KM_OSKEY 8 + /* means modifier should be pressed 2nd */ +#define KM_SHIFT2 16 +#define KM_CTRL2 32 +#define KM_ALT2 64 +#define KM_OSKEY2 128 + +/* val */ +#define KM_PRESS 2 +#define KM_RELEASE 1 + + +/* ************** custom wmEvent data ************** */ + +#define DEV_STYLUS 1 +#define DEV_ERASER 2 + +typedef struct wmTabletData { + int Active; /* 0=None, 1=Stylus, 2=Eraser */ + float Pressure; /* range 0.0 (not touching) to 1.0 (full pressure) */ + float Xtilt; /* range 0.0 (upright) to 1.0 (tilted fully against the tablet surface) */ + float Ytilt; /* as above */ +} wmTabletData; + + +#endif /* WM_TYPES_H */ + |