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:
authorCampbell Barton <ideasman42@gmail.com>2019-01-07 14:19:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-07 16:43:00 +0300
commit5a43406e1bad973a8cb32702b4fdb588068a6dcd (patch)
treeb47ac75f429b586950dab5300669c373023efab8 /source/blender/makesdna/DNA_screen_types.h
parent0215caeac2ad013fa03e2799049f5358d951ebfa (diff)
Cleanup: move DNA comments before struct members
Needed for clang-format in some cases, see: T53211
Diffstat (limited to 'source/blender/makesdna/DNA_screen_types.h')
-rw-r--r--source/blender/makesdna/DNA_screen_types.h302
1 files changed, 200 insertions, 102 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index cdf67f1e11d..4b7eaf3dab3 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -58,35 +58,56 @@ typedef struct bScreen {
/* TODO Should become ScrAreaMap now.
* ** NOTE: KEEP ORDER IN SYNC WITH ScrAreaMap! (see AREAMAP_FROM_SCREEN macro above) ** */
- ListBase vertbase; /* screens have vertices/edges to define areas */
+ /** Screens have vertices/edges to define areas. */
+ ListBase vertbase;
ListBase edgebase;
ListBase areabase;
- ListBase regionbase; /* screen level regions (menus), runtime only */
+ /** Screen level regions (menus), runtime only. */
+ ListBase regionbase;
struct Scene *scene DNA_DEPRECATED;
- short flag; /* general flags */
- short winid; /* winid from WM, starts with 1 */
- short redraws_flag; /* user-setting for which editors get redrawn during anim playback (used to be time->redraws) */
-
- char temp; /* temp screen in a temp window, don't save (like user prefs) */
- char state; /* temp screen for image render display or fileselect */
- char do_draw; /* notifier for drawing edges */
- char do_refresh; /* notifier for scale screen, changed screen, etc */
- char do_draw_gesture; /* notifier for gesture draw. */
- char do_draw_paintcursor; /* notifier for paint cursor draw. */
- char do_draw_drag; /* notifier for dragging draw. */
- char skip_handling; /* set to delay screen handling after switching back from maximized area */
- char scrubbing; /* set when scrubbing to avoid some costly updates */
+ /** General flags. */
+ short flag;
+ /** Winid from WM, starts with 1. */
+ short winid;
+ /**
+ * User-setting for which editors get redrawn during anim playback
+ * (used to be time->redraws).
+ */
+ short redraws_flag;
+
+ /** Temp screen in a temp window, don't save (like user prefs). */
+ char temp;
+ /** Temp screen for image render display or fileselect. */
+ char state;
+ /** Notifier for drawing edges. */
+ char do_draw;
+ /** Notifier for scale screen, changed screen, etc. */
+ char do_refresh;
+ /** Notifier for gesture draw. */
+ char do_draw_gesture;
+ /** Notifier for paint cursor draw. */
+ char do_draw_paintcursor;
+ /** Notifier for dragging draw. */
+ char do_draw_drag;
+ /** Set to delay screen handling after switching back from maximized area. */
+ char skip_handling;
+ /** Set when scrubbing to avoid some costly updates. */
+ char scrubbing;
char pad[1];
- struct ARegion *active_region; /* active region that has mouse focus */
+ /** Active region that has mouse focus. */
+ struct ARegion *active_region;
- struct wmTimer *animtimer; /* if set, screen has timer handler added in window */
- void *context; /* context callback */
+ /** If set, screen has timer handler added in window. */
+ struct wmTimer *animtimer;
+ /** Context callback. */
+ void *context;
- struct wmTooltipState *tool_tip; /* runtime */
+ /** Runtime. */
+ struct wmTooltipState *tool_tip;
PreviewImage *preview;
} bScreen;
@@ -101,7 +122,8 @@ typedef struct ScrVert {
typedef struct ScrEdge {
struct ScrEdge *next, *prev;
ScrVert *v1, *v2;
- short border; /* 1 when at edge of screen */
+ /** 1 when at edge of screen. */
+ short border;
short flag;
int pad;
} ScrEdge;
@@ -109,30 +131,45 @@ typedef struct ScrEdge {
typedef struct ScrAreaMap {
/* ** NOTE: KEEP ORDER IN SYNC WITH LISTBASES IN bScreen! ** */
- ListBase vertbase; /* ScrVert - screens have vertices/edges to define areas */
- ListBase edgebase; /* ScrEdge */
- ListBase areabase; /* ScrArea */
+ /** ScrVert - screens have vertices/edges to define areas. */
+ ListBase vertbase;
+ /** ScrEdge. */
+ ListBase edgebase;
+ /** ScrArea. */
+ ListBase areabase;
} ScrAreaMap;
-typedef struct Panel { /* the part from uiBlock that needs saved in file */
+/** The part from uiBlock that needs saved in file. */
+typedef struct Panel {
struct Panel *next, *prev;
- struct PanelType *type; /* runtime */
- struct uiLayout *layout; /* runtime for drawing */
-
- char panelname[64], tabname[64]; /* defined as UI_MAX_NAME_STR */
- char drawname[64]; /* panelname is identifier for restoring location */
- int ofsx, ofsy; /* offset within the region */
- int sizex, sizey; /* panel size including children */
- int blocksizex, blocksizey; /* panel size excluding children */
+ /** Runtime. */
+ struct PanelType *type;
+ /** Runtime for drawing. */
+ struct uiLayout *layout;
+
+ /** Defined as UI_MAX_NAME_STR. */
+ char panelname[64], tabname[64];
+ /** Panelname is identifier for restoring location. */
+ char drawname[64];
+ /** Offset within the region. */
+ int ofsx, ofsy;
+ /** Panel size including children. */
+ int sizex, sizey;
+ /** Panel size excluding children. */
+ int blocksizex, blocksizey;
short labelofs, pad;
short flag, runtime_flag;
short control;
short snap;
- int sortorder; /* panels are aligned according to increasing sortorder */
- struct Panel *paneltab; /* this panel is tabbed in *paneltab */
- void *activedata; /* runtime for panel manipulation */
- ListBase children; /* sub panels */
+ /** Panels are aligned according to increasing sortorder. */
+ int sortorder;
+ /** This panel is tabbed in *paneltab. */
+ struct Panel *paneltab;
+ /** Runtime for panel manipulation. */
+ void *activedata;
+ /** Sub panels. */
+ ListBase children;
} Panel;
@@ -170,32 +207,43 @@ typedef struct PanelCategoryStack {
#
#
typedef struct uiListDyn {
- int height; /* Number of rows needed to draw all elements. */
- int visual_height; /* Actual visual height of the list (in rows). */
- int visual_height_min; /* Minimal visual height of the list (in rows). */
-
- int items_len; /* Number of items in collection. */
- int items_shown; /* Number of items actually visible after filtering. */
-
- /* Those are temp data used during drag-resize with GRIP button (they are in pixels, the meaningful data is the
+ /** Number of rows needed to draw all elements. */
+ int height;
+ /** Actual visual height of the list (in rows). */
+ int visual_height;
+ /** Minimal visual height of the list (in rows). */
+ int visual_height_min;
+
+ /** Number of items in collection. */
+ int items_len;
+ /** Number of items actually visible after filtering. */
+ int items_shown;
+
+ /* Those are temp data used during drag-resize with GRIP button
+ * (they are in pixels, the meaningful data is the
* difference between resize_prev and resize)...
*/
int resize;
int resize_prev;
/* Filtering data. */
- int *items_filter_flags; /* items_len length. */
- int *items_filter_neworder; /* org_idx -> new_idx, items_len length. */
+ /** Items_len length. */
+ int *items_filter_flags;
+ /** Org_idx -> new_idx, items_len length. */
+ int *items_filter_neworder;
} uiListDyn;
typedef struct uiList { /* some list UI data need to be saved in file */
struct uiList *next, *prev;
- struct uiListType *type; /* runtime */
+ /** Runtime. */
+ struct uiListType *type;
- char list_id[64]; /* defined as UI_MAX_NAME_STR */
+ /** Defined as UI_MAX_NAME_STR. */
+ char list_id[64];
- int layout_type; /* How items are layedout in the list */
+ /** How items are layedout in the list. */
+ int layout_type;
int flag;
int list_scroll;
@@ -204,7 +252,8 @@ typedef struct uiList { /* some list UI data need to be saved in file
int list_last_activei;
/* Filtering data. */
- char filter_byname[64]; /* defined as UI_MAX_NAME_STR */
+ /** Defined as UI_MAX_NAME_STR. */
+ char filter_byname[64];
int filter_flag;
int filter_sort_flag;
@@ -217,7 +266,8 @@ typedef struct uiList { /* some list UI data need to be saved in file
typedef struct TransformOrientation {
struct TransformOrientation *next, *prev;
- char name[64]; /* MAX_NAME */
+ /** MAX_NAME. */
+ char name[64];
float mat[3][3];
int pad;
} TransformOrientation;
@@ -225,7 +275,8 @@ typedef struct TransformOrientation {
typedef struct uiPreview { /* some preview UI data need to be saved in file */
struct uiPreview *next, *prev;
- char preview_id[64]; /* defined as UI_MAX_NAME_STR */
+ /** Defined as UI_MAX_NAME_STR. */
+ char preview_id[64];
short height;
short pad1[3];
} uiPreview;
@@ -244,9 +295,11 @@ typedef struct ScrGlobalAreaData {
* if they are 'collapsed' or not. Value is set on area creation and not
* touched afterwards. */
short size_min, size_max;
- short align; /* GlobalAreaAlign */
+ /** GlobalAreaAlign. */
+ short align;
- short flag; /* GlobalAreaFlag */
+ /** GlobalAreaFlag. */
+ short flag;
short pad;
} ScrGlobalAreaData;
@@ -268,28 +321,43 @@ typedef struct ScrArea_Runtime {
typedef struct ScrArea {
struct ScrArea *next, *prev;
- ScrVert *v1, *v2, *v3, *v4; /* ordered (bl, tl, tr, br) */
- bScreen *full; /* if area==full, this is the parent */
+ /** Ordered (bl, tl, tr, br). */
+ ScrVert *v1, *v2, *v3, *v4;
+ /** If area==full, this is the parent. */
+ bScreen *full;
- rcti totrct; /* rect bound by v1 v2 v3 v4 */
+ /** Rect bound by v1 v2 v3 v4. */
+ rcti totrct;
- char spacetype; /* eSpace_Type (SPACE_FOO) */
- /* Temporarily used while switching area type, otherwise this should be
- * SPACE_EMPTY. Also, versioning uses it to nicely replace deprecated
- * editors. It's been there for ages, name doesn't fit any more... */
- char butspacetype; /* eSpace_Type (SPACE_FOO) */
+ /**
+ * eSpace_Type (SPACE_FOO).
+ *
+ * Temporarily used while switching area type, otherwise this should be SPACE_EMPTY.
+ * Also, versioning uses it to nicely replace deprecated * editors.
+ * It's been there for ages, name doesn't fit any more.
+ */
+ char spacetype;
+ /** ESpace_Type (SPACE_FOO). */
+ char butspacetype;
short butspacetype_subtype;
- short winx, winy; /* size */
+ /** Size. */
+ short winx, winy;
- char headertype DNA_DEPRECATED;/* OLD! 0=no header, 1= down, 2= up */
- char do_refresh; /* private, for spacetype refresh callback */
+ /** OLD! 0=no header, 1= down, 2= up. */
+ char headertype DNA_DEPRECATED;
+ /** Private, for spacetype refresh callback. */
+ char do_refresh;
short flag;
- short region_active_win; /* index of last used region of 'RGN_TYPE_WINDOW'
- * runtime variable, updated by executing operators */
+ /**
+ * Index of last used region of 'RGN_TYPE_WINDOW'
+ * runtime variable, updated by executing operators.
+ */
+ short region_active_win;
char temp, pad;
- struct SpaceType *type; /* callbacks for this space type */
+ /** Callbacks for this space type. */
+ struct SpaceType *type;
/* Non-NULL if this area is global. */
ScrGlobalAreaData *global;
@@ -298,14 +366,18 @@ typedef struct ScrArea {
* changing the editor type, we try to reuse old editor data from this list.
* The first item is the active/visible one.
*/
- ListBase spacedata; /* SpaceLink */
+ /** SpaceLink. */
+ ListBase spacedata;
/* NOTE: This region list is the one from the active/visible editor (first item in
* spacedata list). Use SpaceLink.regionbase if it's inactive (but only then)!
*/
- ListBase regionbase; /* ARegion */
- ListBase handlers; /* wmEventHandler */
+ /** ARegion. */
+ ListBase regionbase;
+ /** WmEventHandler. */
+ ListBase handlers;
- ListBase actionzones; /* AZone */
+ /** AZone. */
+ ListBase actionzones;
ScrArea_Runtime runtime;
} ScrArea;
@@ -319,41 +391,67 @@ typedef struct ARegion_Runtime {
typedef struct ARegion {
struct ARegion *next, *prev;
- View2D v2d; /* 2D-View scrolling/zoom info (most regions are 2d anyways) */
- rcti winrct; /* coordinates of region */
- rcti drawrct; /* runtime for partial redraw, same or smaller than winrct */
- short winx, winy; /* size */
-
- short visible; /* region is currently visible on screen */
- short regiontype; /* window, header, etc. identifier for drawing */
- short alignment; /* how it should split */
- short flag; /* hide, ... */
-
- float fsize; /* current split size in float (unused) */
- short sizex, sizey; /* current split size in pixels (if zero it uses regiontype) */
+ /** 2D-View scrolling/zoom info (most regions are 2d anyways). */
+ View2D v2d;
+ /** Coordinates of region. */
+ rcti winrct;
+ /** Runtime for partial redraw, same or smaller than winrct. */
+ rcti drawrct;
+ /** Size. */
+ short winx, winy;
+
+ /** Region is currently visible on screen. */
+ short visible;
+ /** Window, header, etc. identifier for drawing. */
+ short regiontype;
+ /** How it should split. */
+ short alignment;
+ /** Hide, .... */
+ short flag;
- short do_draw; /* private, cached notifier events */
- short do_draw_overlay; /* private, cached notifier events */
- short overlap; /* private, set for indicate drawing overlapped */
- short flagfullscreen; /* temporary copy of flag settings for clean fullscreen */
+ /** Current split size in float (unused). */
+ float fsize;
+ /** Current split size in pixels (if zero it uses regiontype). */
+ short sizex, sizey;
+
+ /** Private, cached notifier events. */
+ short do_draw;
+ /** Private, cached notifier events. */
+ short do_draw_overlay;
+ /** Private, set for indicate drawing overlapped. */
+ short overlap;
+ /** Temporary copy of flag settings for clean fullscreen. */
+ short flagfullscreen;
short pad1, pad2;
- struct ARegionType *type; /* callbacks for this region type */
-
- ListBase uiblocks; /* uiBlock */
- ListBase panels; /* Panel */
- ListBase panels_category_active; /* Stack of panel categories */
- ListBase ui_lists; /* uiList */
- ListBase ui_previews; /* uiPreview */
- ListBase handlers; /* wmEventHandler */
- ListBase panels_category; /* Panel categories runtime */
-
- struct wmGizmoMap *gizmo_map; /* gizmo-map of this region */
- struct wmTimer *regiontimer; /* blend in/out */
+ /** Callbacks for this region type. */
+ struct ARegionType *type;
+
+ /** UiBlock. */
+ ListBase uiblocks;
+ /** Panel. */
+ ListBase panels;
+ /** Stack of panel categories. */
+ ListBase panels_category_active;
+ /** UiList. */
+ ListBase ui_lists;
+ /** UiPreview. */
+ ListBase ui_previews;
+ /** WmEventHandler. */
+ ListBase handlers;
+ /** Panel categories runtime. */
+ ListBase panels_category;
+
+ /** Gizmo-map of this region. */
+ struct wmGizmoMap *gizmo_map;
+ /** Blend in/out. */
+ struct wmTimer *regiontimer;
struct wmDrawBuffer *draw_buffer;
- char *headerstr; /* use this string to draw info */
- void *regiondata; /* XXX 2.50, need spacedata equivalent? */
+ /** Use this string to draw info. */
+ char *headerstr;
+ /** XXX 2.50, need spacedata equivalent?. */
+ void *regiondata;
ARegion_Runtime runtime;
} ARegion;