Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r--source/blender/windowmanager/WM_types.h116
1 files changed, 73 insertions, 43 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index bcdef5c2278..a0202d2b4cc 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -1,4 +1,4 @@
-/**
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@@ -25,9 +25,18 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
+
+/** \file blender/windowmanager/WM_types.h
+ * \ingroup wm
+ */
+
#ifndef WM_TYPES_H
#define WM_TYPES_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct bContext;
struct wmEvent;
struct wmWindowManager;
@@ -51,6 +60,7 @@ struct ImBuf;
#define OPTYPE_BLOCKING 4 /* let blender grab all input from the WM (X11) */
#define OPTYPE_MACRO 8
#define OPTYPE_GRAB_POINTER 16 /* */
+#define OPTYPE_PRESET 32 /* show preset menu */
/* context to call operator in for WM_operator_name_call */
/* rna_ui.c contains EnumPropertyItem's of these, keep in sync */
@@ -167,6 +177,8 @@ typedef struct wmNotifier {
#define ND_ANIMPLAY (4<<16)
#define ND_GPENCIL (5<<16)
#define ND_EDITOR_CHANGED (6<<16) /*sent to new editors after switching to them*/
+#define ND_SCREENSET (7<<16)
+#define ND_SKETCH (8<<16)
/* NC_SCENE Scene */
#define ND_SCENEBROWSE (1<<16)
@@ -177,27 +189,33 @@ typedef struct wmNotifier {
#define ND_SEQUENCER (6<<16)
#define ND_OB_ACTIVE (7<<16)
#define ND_OB_SELECT (8<<16)
-#define ND_MODE (9<<16)
-#define ND_RENDER_RESULT (10<<16)
-#define ND_COMPO_RESULT (11<<16)
-#define ND_KEYINGSET (12<<16)
-#define ND_TOOLSETTINGS (13<<16)
-#define ND_LAYER (14<<16)
-#define ND_FRAME_RANGE (15<<16)
+#define ND_OB_VISIBLE (9<<16)
+#define ND_OB_RENDER (10<<16)
+#define ND_MODE (11<<16)
+#define ND_RENDER_RESULT (12<<16)
+#define ND_COMPO_RESULT (13<<16)
+#define ND_KEYINGSET (14<<16)
+#define ND_TOOLSETTINGS (15<<16)
+#define ND_LAYER (16<<16)
+#define ND_FRAME_RANGE (17<<16)
+#define ND_TRANSFORM_DONE (18<<16)
+#define ND_WORLD (92<<16)
+#define ND_LAYER_CONTENT (101<<16)
#define ND_LAYER_CONTENT (101<<16)
/* NC_OBJECT Object */
-#define ND_TRANSFORM (16<<16)
-#define ND_OB_SHADING (17<<16)
-#define ND_POSE (18<<16)
-#define ND_BONE_ACTIVE (19<<16)
-#define ND_BONE_SELECT (20<<16)
-#define ND_DRAW (21<<16)
-#define ND_MODIFIER (22<<16)
-#define ND_KEYS (23<<16)
-#define ND_CONSTRAINT (24<<16)
-#define ND_PARTICLE (25<<16)
-#define ND_POINTCACHE (26<<16)
+#define ND_TRANSFORM (18<<16)
+#define ND_OB_SHADING (19<<16)
+#define ND_POSE (20<<16)
+#define ND_BONE_ACTIVE (21<<16)
+#define ND_BONE_SELECT (22<<16)
+#define ND_DRAW (23<<16)
+#define ND_MODIFIER (24<<16)
+#define ND_KEYS (25<<16)
+#define ND_CONSTRAINT (26<<16)
+#define ND_PARTICLE (27<<16)
+#define ND_POINTCACHE (28<<16)
+#define ND_PARENT (29<<16)
/* NC_MATERIAL Material */
#define ND_SHADING (30<<16)
@@ -210,6 +228,7 @@ typedef struct wmNotifier {
/* NC_WORLD World */
#define ND_WORLD_DRAW (45<<16)
+#define ND_WORLD_STARS (46<<16)
/* NC_TEXT Text */
#define ND_CURSOR (50<<16)
@@ -232,23 +251,23 @@ typedef struct wmNotifier {
/* NC_SPACE */
#define ND_SPACE_CONSOLE (1<<16) /* general redraw */
-#define ND_SPACE_CONSOLE_REPORT (2<<16) /* update for reports, could specify type */
-#define ND_SPACE_INFO (2<<16)
-#define ND_SPACE_IMAGE (3<<16)
-#define ND_SPACE_FILE_PARAMS (4<<16)
-#define ND_SPACE_FILE_LIST (5<<16)
-#define ND_SPACE_NODE (6<<16)
-#define ND_SPACE_OUTLINER (7<<16)
-#define ND_SPACE_VIEW3D (8<<16)
-#define ND_SPACE_PROPERTIES (9<<16)
-#define ND_SPACE_TEXT (10<<16)
-#define ND_SPACE_TIME (11<<16)
-#define ND_SPACE_GRAPH (12<<16)
-#define ND_SPACE_DOPESHEET (13<<16)
-#define ND_SPACE_NLA (14<<16)
-#define ND_SPACE_SEQUENCER (15<<16)
-#define ND_SPACE_NODE_VIEW (16<<16)
-#define ND_SPACE_CHANGED (17<<16) /*sent to a new editor type after it's replaced an old one*/
+#define ND_SPACE_INFO_REPORT (2<<16) /* update for reports, could specify type */
+#define ND_SPACE_INFO (3<<16)
+#define ND_SPACE_IMAGE (4<<16)
+#define ND_SPACE_FILE_PARAMS (5<<16)
+#define ND_SPACE_FILE_LIST (6<<16)
+#define ND_SPACE_NODE (7<<16)
+#define ND_SPACE_OUTLINER (8<<16)
+#define ND_SPACE_VIEW3D (9<<16)
+#define ND_SPACE_PROPERTIES (10<<16)
+#define ND_SPACE_TEXT (11<<16)
+#define ND_SPACE_TIME (12<<16)
+#define ND_SPACE_GRAPH (13<<16)
+#define ND_SPACE_DOPESHEET (14<<16)
+#define ND_SPACE_NLA (15<<16)
+#define ND_SPACE_SEQUENCER (16<<16)
+#define ND_SPACE_NODE_VIEW (17<<16)
+#define ND_SPACE_CHANGED (18<<16) /*sent to a new editor type after it's replaced an old one*/
/* subtype, 256 entries too */
#define NOTE_SUBTYPE 0x0000FF00
@@ -376,15 +395,21 @@ typedef struct wmTimer {
typedef struct wmOperatorType {
struct wmOperatorType *next, *prev;
- char *name; /* text for ui, undo */
- char *idname; /* unique identifier */
- char *description; /* tooltips and python docs */
+ const char *name; /* text for ui, undo */
+ const char *idname; /* unique identifier */
+ const char *description; /* tooltips and python docs */
/* this callback executes the operator without any interactive input,
* parameters may be provided through operator properties. cannot use
* any interface code or input device state.
* - see defines below for return values */
int (*exec)(struct bContext *, struct wmOperator *);
+
+ /* this callback executes on a running operator whenever as property
+ * is changed. It can correct its own properties or report errors for
+ * invalid settings in exceptional cases.
+ * Boolean return value, True denotes a change has been made and to redraw */
+ int (*check)(struct bContext *, struct wmOperator *);
/* for modal temporary operators, initially invoke is called. then
* any further events are handled in modal. if the operation is
@@ -444,9 +469,9 @@ enum {
typedef struct wmReport {
struct wmReport *next, *prev;
- int type;
const char *typestr;
char *message;
+ int type;
} wmReport;
/* *************** Drag and drop *************** */
@@ -464,14 +489,14 @@ typedef struct wmDrag {
int icon, type; /* type, see WM_DRAG defines above */
void *poin;
- char path[FILE_MAX];
+ char path[240]; /* FILE_MAX */
double value;
struct ImBuf *imb; /* if no icon but imbuf should be drawn around cursor */
float scale;
short sx, sy;
- char opname[FILE_MAX]; /* if set, draws operator name*/
+ char opname[240]; /* FILE_MAX */ /* if set, draws operator name*/
} wmDrag;
/* dropboxes are like keymaps, part of the screen/area/region definition */
@@ -487,7 +512,8 @@ typedef struct wmDropBox {
/* if poll survives, operator is called */
wmOperatorType *ot; /* not saved in file, so can be pointer */
-
+ short opcontext; /* default invoke */
+
struct IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */
struct PointerRNA *ptr; /* rna pointer to access properties */
@@ -501,5 +527,9 @@ typedef struct RecentFile {
} RecentFile;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* WM_TYPES_H */