- Scrollbars for the console (use View2D functions)
[blender-staging.git] / source / blender / makesdna / DNA_windowmanager_types.h
index 9a60e3c92b88c9afc3cc8a0a4db269b18d68dedc..69ab45d3389d6cfdb5472a468cfb1a849acf9e98 100644 (file)
@@ -52,6 +52,44 @@ struct wmTimer;
 struct StructRNA;
 struct PointerRNA;
 struct ReportList;
+struct Report;
+
+typedef enum ReportType {
+       RPT_DEBUG                                       = 1<<0,
+       RPT_INFO                                        = 1<<1,
+       RPT_OPERATOR                            = 1<<2,
+       RPT_WARNING                                     = 1<<3,
+       RPT_ERROR                                       = 1<<4,
+       RPT_ERROR_INVALID_INPUT         = 1<<5,
+       RPT_ERROR_INVALID_CONTEXT       = 1<<6,
+       RPT_ERROR_OUT_OF_MEMORY         = 1<<7
+} ReportType;
+
+#define RPT_DEBUG_ALL          (RPT_DEBUG)
+#define RPT_INFO_ALL           (RPT_INFO)
+#define RPT_OPERATOR_ALL       (RPT_OPERATOR)
+#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,
+};
+typedef struct Report {
+       struct Report *next, *prev;
+       int type; /* ReportType */
+       int len; /* strlen(message), saves some time calculating the word wrap  */
+       char *typestr;
+       char *message;
+} Report;
+typedef struct ReportList {
+       ListBase list;
+       int printlevel; /* ReportType */
+       int storelevel; /* ReportType */
+       int flag, pad;
+} ReportList;
+/* reports need to be before wmWindowManager */
+
 
 /* windowmanager is saved, tag WMAN */
 typedef struct wmWindowManager {
@@ -68,7 +106,7 @@ typedef struct wmWindowManager {
        
        ListBase queue;                 /* refresh/redraw wmNotifier structs */
        
-       struct ReportList *reports;     /* information and error reports */
+       struct ReportList reports;      /* information and error reports */
        
        ListBase jobs;                  /* threaded jobs manager */
        
@@ -258,6 +296,5 @@ typedef enum wmRadialControlMode {
        WM_RADIALCONTROL_ANGLE
 } wmRadialControlMode;
 
-
 #endif /* DNA_WINDOWMANAGER_TYPES_H */