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/makesdna/DNA_screen_types.h')
-rw-r--r--source/blender/makesdna/DNA_screen_types.h108
1 files changed, 85 insertions, 23 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index 9f0a70d9bca..40374f56967 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -1,6 +1,4 @@
/**
- * blenlib/DNA_screen_types.h (mar-2001 nzc)
- *
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@@ -22,9 +20,7 @@
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
+ * Contributor(s): Blender Foundation
*
* ***** END GPL LICENSE BLOCK *****
*/
@@ -38,17 +34,34 @@
#include "DNA_scriptlink_types.h"
struct Scene;
+struct SpaceType;
+struct SpaceLink;
+struct ARegionType;
+struct bContext;
+struct wmNotifier;
+struct wmWindowManager;
+
typedef struct bScreen {
ID id;
- ListBase vertbase, edgebase, areabase;
+
+ ListBase vertbase, edgebase;
+ ListBase areabase;
+ ListBase regionbase; /* screen level regions, runtime only */
struct Scene *scene;
- short startx, endx, starty, endy; /* framebuffer coords */
- short sizex, sizey;
+
short scenenr, screennr; /* only for pupmenu */
- short full, pad;
- short mainwin, winakt;
- short handler[8]; /* similar to space handler now */
+
+ short full, winid; /* winid from WM, starts with 1 */
+ short do_draw; /* notifier for drawing edges */
+ short do_refresh; /* notifier for scale screen, changed screen, etc */
+ short do_gesture; /* notifier for gesture draw. */
+ short pad[3];
+
+ short mainwin; /* screensize subwindow, for screenedges and global menus */
+ short subwinactive; /* active subwindow */
+
+ short handler[8]; /* similar to space handler */
} bScreen;
typedef struct ScrVert {
@@ -79,6 +92,7 @@ typedef unsigned short dna_ushort_fix;
typedef struct Panel { /* the part from uiBlock that needs saved in file */
struct Panel *next, *prev;
+
char panelname[64], tabname[64]; /* defined as UI_MAX_NAME_STR */
char drawname[64]; /* panelname is identifier for restoring location */
short ofsx, ofsy, sizex, sizey;
@@ -92,36 +106,65 @@ typedef struct Panel { /* the part from uiBlock that needs saved in file */
typedef struct ScrArea {
struct ScrArea *next, *prev;
+
ScrVert *v1, *v2, *v3, *v4;
bScreen *full; /* if area==full, this is the parent */
- float winmat[4][4];
- rcti totrct, headrct, winrct;
- short headwin, win;
- short headertype; /* 0=no header, 1= down, 2= up */
- char spacetype, butspacetype; /* SPACE_... */
- short winx, winy; /* size */
- char head_swap, head_equal;
- char win_swap, win_equal;
+ rcti totrct; /* rect bound by v1 v2 v3 v4 */
+
+ char spacetype, butspacetype; /* SPACE_..., butspacetype is button arg */
+ short winx, winy; /* size */
- short headbutlen, headbutofs;
+ short headertype; /* OLD! 0=no header, 1= down, 2= up */
+ short headbutlen, headbutofs; /* OLD! */
short cursor, flag;
ScriptLink scriptlink;
-
+
+ struct SpaceType *type; /* callbacks for this space type */
+
ListBase spacedata;
ListBase uiblocks;
ListBase panels;
+ ListBase regionbase; /* ARegion */
+ ListBase handlers; /* wmEventHandler */
+ ListBase modalops; /* wmOperator */
+
+ ListBase actionzones; /* AZone */
} ScrArea;
-#define MAXWIN 128
+typedef struct ARegion {
+ struct ARegion *next, *prev;
+
+ rcti winrct;
+ short swinid;
+ short regiontype; /* window, header, etc. identifier for drawing */
+ short alignment; /* how it should split */
+ short size; /* current split size in pixels */
+ short minsize; /* set by spacedata's region init */
+ short flag; /* hide, ... */
+
+ float fsize; /* current split size in float */
+
+ int pad;
+ short do_draw, do_refresh; /* cached notifier events */
+
+ struct ARegionType *type; /* callbacks for this region type */
+
+ ListBase uiblocks;
+ ListBase handlers; /* wmEventHandler */
+ ListBase modalops; /* wmOperator */
+
+ void *regiondata; /* XXX 2.50, need spacedata equivalent? */
+} ARegion;
/* area->flag */
#define HEADER_NO_PULLDOWN 1
+#define AREA_FLAG_DRAWJOINTO 2
+#define AREA_FLAG_DRAWJOINFROM 4
/* If you change EDGEWIDTH, also do the global arrat edcol[] */
#define EDGEWIDTH 1
-#define EDGEWIDTH2 0
#define AREAGRID 4
#define AREAMINX 32
#define HEADERY 26
@@ -164,5 +207,24 @@ typedef struct ScrArea {
#define SCREEN_HANDLER_PYTHON 2
#define SCREEN_HANDLER_VERSE 3
+/* regiontype, first two are the default set */
+#define RGN_TYPE_WINDOW 0
+#define RGN_TYPE_HEADER 1
+#define RGN_TYPE_TEMPORARY 2
+
+/* region alignment */
+#define RGN_ALIGN_NONE 0
+#define RGN_ALIGN_TOP 1
+#define RGN_ALIGN_BOTTOM 2
+#define RGN_ALIGN_LEFT 3
+#define RGN_ALIGN_RIGHT 4
+#define RGN_ALIGN_HSPLIT 5
+#define RGN_ALIGN_VSPLIT 6
+#define RGN_ALIGN_FLOAT 7
+
+/* region flag */
+#define RGN_FLAG_HIDDEN 1
+#define RGN_FLAG_TOO_SMALL 2
+
#endif