[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60770] trunk/blender/source/blender/ makesdna/DNA_windowmanager_types.h: Style cleanup (defines -> enums, bit flags values as bitshifts, etc.).
Bastien Montagne
montagne29 at wanadoo.fr
Tue Oct 15 10:05:57 CEST 2013
Revision: 60770
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60770
Author: mont29
Date: 2013-10-15 08:05:57 +0000 (Tue, 15 Oct 2013)
Log Message:
-----------
Style cleanup (defines -> enums, bit flags values as bitshifts, etc.).
Modified Paths:
--------------
trunk/blender/source/blender/makesdna/DNA_windowmanager_types.h
Modified: trunk/blender/source/blender/makesdna/DNA_windowmanager_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_windowmanager_types.h 2013-10-15 07:35:12 UTC (rev 60769)
+++ trunk/blender/source/blender/makesdna/DNA_windowmanager_types.h 2013-10-15 08:05:57 UTC (rev 60770)
@@ -60,42 +60,44 @@
struct Report;
struct uiLayout;
-#define OP_MAX_TYPENAME 64
-#define KMAP_MAX_NAME 64
+#define OP_MAX_TYPENAME 64
+#define KMAP_MAX_NAME 64
/* keep in sync with 'wm_report_items' in wm_rna.c */
typedef enum ReportType {
- RPT_DEBUG = 1 << 0,
- RPT_INFO = 1 << 1,
- RPT_OPERATOR = 1 << 2,
- RPT_PROPERTY = 1 << 3,
- RPT_WARNING = 1 << 4,
- RPT_ERROR = 1 << 5,
- RPT_ERROR_INVALID_INPUT = 1 << 6,
- RPT_ERROR_INVALID_CONTEXT = 1 << 7,
- RPT_ERROR_OUT_OF_MEMORY = 1 << 8
+ RPT_DEBUG = (1 << 0),
+ RPT_INFO = (1 << 1),
+ RPT_OPERATOR = (1 << 2),
+ RPT_PROPERTY = (1 << 3),
+ RPT_WARNING = (1 << 4),
+ RPT_ERROR = (1 << 5),
+ RPT_ERROR_INVALID_INPUT = (1 << 6),
+ RPT_ERROR_INVALID_CONTEXT = (1 << 7),
+ RPT_ERROR_OUT_OF_MEMORY = (1 << 8),
} ReportType;
-#define RPT_DEBUG_ALL (RPT_DEBUG)
-#define RPT_INFO_ALL (RPT_INFO)
-#define RPT_OPERATOR_ALL (RPT_OPERATOR)
-#define RPT_PROPERTY_ALL (RPT_PROPERTY)
-#define RPT_WARNING_ALL (RPT_WARNING)
-#define RPT_ERROR_ALL (RPT_ERROR|RPT_ERROR_INVALID_INPUT|RPT_ERROR_INVALID_CONTEXT|RPT_ERROR_OUT_OF_MEMORY)
+#define RPT_DEBUG_ALL (RPT_DEBUG)
+#define RPT_INFO_ALL (RPT_INFO)
+#define RPT_OPERATOR_ALL (RPT_OPERATOR)
+#define RPT_PROPERTY_ALL (RPT_PROPERTY)
+#define RPT_WARNING_ALL (RPT_WARNING)
+#define RPT_ERROR_ALL (RPT_ERROR|RPT_ERROR_INVALID_INPUT|RPT_ERROR_INVALID_CONTEXT|RPT_ERROR_OUT_OF_MEMORY)
enum ReportListFlags {
- RPT_PRINT = 1,
- RPT_STORE = 2,
- RPT_FREE = 4,
- RPT_OP_HOLD = 8 /* don't move them into the operator global list (caller will use) */
+ RPT_PRINT = (1 << 0),
+ RPT_STORE = (1 << 1),
+ RPT_FREE = (1 << 2),
+ RPT_OP_HOLD = (1 << 3), /* don't move them into the operator global list (caller will use) */
};
+
+/* These two Lines with # tell makesdna this struct can be excluded. */
#
#
typedef struct Report {
struct Report *next, *prev;
- short type; /* ReportType */
+ short type; /* ReportType */
short flag;
- int len; /* strlen(message), saves some time calculating the word wrap */
+ int len; /* strlen(message), saves some time calculating the word wrap */
const char *typestr;
const char *message;
} Report;
@@ -103,13 +105,14 @@
/* saved in the wm, don't remove */
typedef struct ReportList {
ListBase list;
- int printlevel; /* ReportType */
- int storelevel; /* ReportType */
+ int printlevel; /* ReportType */
+ int storelevel; /* ReportType */
int flag, pad;
struct wmTimer *reporttimer;
} ReportList;
/* timer customdata to control reports display */
+/* These two Lines with # tell makesdna this struct can be excluded. */
#
#
typedef struct ReportTimerInfo {
@@ -124,84 +127,86 @@
/* windowmanager is saved, tag WMAN */
typedef struct wmWindowManager {
ID id;
-
- struct wmWindow *windrawable, *winactive; /* separate active from drawable */
+
+ struct wmWindow *windrawable, *winactive; /* separate active from drawable */
ListBase windows;
-
- int initialized; /* set on file read */
- short file_saved; /* indicator whether data was saved */
- short op_undo_depth; /* operator stack depth to avoid nested undo pushes */
-
- ListBase operators; /* operator registry */
-
- ListBase queue; /* refresh/redraw wmNotifier structs */
-
- struct ReportList reports; /* information and error reports */
-
- ListBase jobs; /* threaded jobs manager */
-
- ListBase paintcursors; /* extra overlay cursors to draw, like circles */
-
- ListBase drags; /* active dragged items */
-
- ListBase keyconfigs; /* known key configurations */
- struct wmKeyConfig *defaultconf; /* default configuration */
- struct wmKeyConfig *addonconf; /* addon configuration */
- struct wmKeyConfig *userconf; /* user configuration */
- ListBase timers; /* active timers */
- struct wmTimer *autosavetimer; /* timer for auto save */
+ int initialized; /* set on file read */
+ short file_saved; /* indicator whether data was saved */
+ short op_undo_depth; /* operator stack depth to avoid nested undo pushes */
+
+ ListBase operators; /* operator registry */
+
+ ListBase queue; /* refresh/redraw wmNotifier structs */
+
+ struct ReportList reports; /* information and error reports */
+
+ ListBase jobs; /* threaded jobs manager */
+
+ ListBase paintcursors; /* extra overlay cursors to draw, like circles */
+
+ ListBase drags; /* active dragged items */
+
+ ListBase keyconfigs; /* known key configurations */
+ struct wmKeyConfig *defaultconf; /* default configuration */
+ struct wmKeyConfig *addonconf; /* addon configuration */
+ struct wmKeyConfig *userconf; /* user configuration */
+
+ ListBase timers; /* active timers */
+ struct wmTimer *autosavetimer; /* timer for auto save */
} wmWindowManager;
/* wmWindowManager.initialized */
-#define WM_INIT_WINDOW (1<<0)
-#define WM_INIT_KEYMAP (1<<1)
+enum {
+ WM_INIT_WINDOW = (1<<0),
+ WM_INIT_KEYMAP = (1<<1),
+};
/* the savable part, rest of data is local in ghostwinlay */
typedef struct wmWindow {
struct wmWindow *next, *prev;
-
- void *ghostwin; /* don't want to include ghost.h stuff */
-
- int winid; /* winid also in screens, is for retrieving this window after read */
- short grabcursor; /* cursor grab mode */
+ void *ghostwin; /* don't want to include ghost.h stuff */
+
+ int winid; /* winid also in screens, is for retrieving this window after read */
+
+ short grabcursor; /* cursor grab mode */
short pad;
-
- struct bScreen *screen; /* active screen */
- struct bScreen *newscreen; /* temporary when switching */
- char screenname[64]; /* MAX_ID_NAME for matching window with active screen after file read */
-
- short posx, posy, sizex, sizey; /* window coords */
- short windowstate; /* borderless, full */
- short monitor; /* multiscreen... no idea how to store yet */
- short active; /* set to 1 if an active window, for quick rejects */
- short cursor; /* current mouse cursor type */
- short lastcursor; /* previous cursor when setting modal one */
- short modalcursor; /* the current modal cursor */
- short addmousemove; /* internal: tag this for extra mousemove event, makes cursors/buttons active on UI switching */
+
+ struct bScreen *screen; /* active screen */
+ struct bScreen *newscreen; /* temporary when switching */
+ char screenname[64]; /* MAX_ID_NAME for matching window with active screen after file read */
+
+ short posx, posy, sizex, sizey; /* window coords */
+ short windowstate; /* borderless, full */
+ short monitor; /* multiscreen... no idea how to store yet */
+ short active; /* set to 1 if an active window, for quick rejects */
+ short cursor; /* current mouse cursor type */
+ short lastcursor; /* previous cursor when setting modal one */
+ short modalcursor; /* the current modal cursor */
+ short addmousemove; /* internal: tag this for extra mousemove event, makes cursors/buttons active on UI switching */
short pad2;
- struct wmEvent *eventstate; /* storage for event system */
-
- struct wmSubWindow *curswin; /* internal for wm_subwindow.c only */
+ struct wmEvent *eventstate; /* storage for event system */
- struct wmGesture *tweak; /* internal for wm_operators.c */
-
- int drawmethod, drawfail; /* internal for wm_draw.c only */
- void *drawdata; /* internal for wm_draw.c only */
-
- ListBase queue; /* all events (ghost level events were handled) */
- ListBase handlers; /* window+screen handlers, handled last */
- ListBase modalhandlers; /* priority handlers, handled first */
-
- ListBase subwindows; /* opengl stuff for sub windows, see notes in wm_subwindow.c */
- ListBase gesture; /* gesture stuff */
+ struct wmSubWindow *curswin; /* internal for wm_subwindow.c only */
+
+ struct wmGesture *tweak; /* internal for wm_operators.c */
+
+ int drawmethod, drawfail; /* internal for wm_draw.c only */
+ void *drawdata; /* internal for wm_draw.c only */
+
+ ListBase queue; /* all events (ghost level events were handled) */
+ ListBase handlers; /* window+screen handlers, handled last */
+ ListBase modalhandlers; /* priority handlers, handled first */
+
+ ListBase subwindows; /* opengl stuff for sub windows, see notes in wm_subwindow.c */
+ ListBase gesture; /* gesture stuff */
} wmWindow;
+/* These two Lines with # tell makesdna this struct can be excluded. */
/* should be something like DNA_EXCLUDE
* but the preprocessor first removes all comments, spaces etc */
-
#
#
typedef struct wmOperatorTypeMacro {
@@ -210,37 +215,36 @@
/* operator id */
char idname[64];
/* rna pointer to access properties, like keymap */
- struct IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */
+ struct IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */
struct PointerRNA *ptr;
-
} wmOperatorTypeMacro;
/* partial copy of the event, for matching by eventhandler */
typedef struct wmKeyMapItem {
struct wmKeyMapItem *next, *prev;
-
+
/* operator */
- char idname[64]; /* used to retrieve operator type pointer */
- IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */
-
+ char idname[64]; /* used to retrieve operator type pointer */
+ IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */
+
/* modal */
- char propvalue_str[64]; /* runtime temporary storage for loading */
- short propvalue; /* if used, the item is from modal map */
+ char propvalue_str[64]; /* runtime temporary storage for loading */
+ short propvalue; /* if used, the item is from modal map */
/* event */
- short type; /* event code itself */
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list