diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_screen.h')
-rw-r--r-- | source/blender/blenkernel/BKE_screen.h | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index c560e4d4de1..f284e633c5e 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -64,7 +64,7 @@ struct ScrAreaMap; #include "RNA_types.h" -/* spacetype has everything stored to get an editor working, it gets initialized via +/* spacetype has everything stored to get an editor working, it gets initialized via * ED_spacetypes_init() in editors/space_api/spacetypes.c */ /* an editor in Blender is a combined ScrArea + SpaceType + SpaceData */ @@ -72,17 +72,17 @@ struct ScrAreaMap; typedef struct SpaceType { struct SpaceType *next, *prev; - + char name[BKE_ST_MAXNAME]; /* for menus */ int spaceid; /* unique space identifier */ int iconid; /* icon lookup for menus */ - + /* Initial allocation, after this WM will call init() too. Some editors need * area and scene data (e.g. frame range) to set their initial scrolling. */ struct SpaceLink *(*new)(const struct ScrArea *sa, const struct Scene *scene); /* not free spacelink itself */ void (*free)(struct SpaceLink *sl); - + /* init is to cope with file load, screen (size) changes, check handlers */ void (*init)(struct wmWindowManager *wm, struct ScrArea *sa); /* exit is called when the area is hidden or removed */ @@ -91,10 +91,10 @@ typedef struct SpaceType { void (*listener)(struct bScreen *sc, struct ScrArea *sa, struct wmNotifier *wmn, struct Scene *scene, struct WorkSpace *workspace); - + /* refresh context, called after filereads, ED_area_tag_refresh() */ void (*refresh)(const struct bContext *C, struct ScrArea *sa); - + /* after a spacedata copy, an init should result in exact same situation */ struct SpaceLink *(*duplicate)(struct SpaceLink *sl); @@ -120,30 +120,30 @@ typedef struct SpaceType { /* region type definitions */ ListBase regiontypes; - + /* tool shelf definitions */ ListBase toolshelf; - + /* read and write... */ - + /* default keymaps to add */ int keymapflag; - + } SpaceType; /* region types are also defined using spacetypes_init, via a callback */ typedef struct ARegionType { struct ARegionType *next, *prev; - + int regionid; /* unique identifier within this space, defines RGN_TYPE_xxxx */ - + /* add handlers, stuff you only do once or on area/region type/size changes */ void (*init)(struct wmWindowManager *wm, struct ARegion *ar); /* exit is called when the region is hidden or removed */ void (*exit)(struct wmWindowManager *wm, struct ARegion *ar); /* draw entirely, view changes should be handled here */ - void (*draw)(const struct bContext *wm, struct ARegion *ar); + void (*draw)(const struct bContext *C, struct ARegion *ar); /* optional, compute button layout before drawing for dynamic size */ void (*layout)(const struct bContext *C, struct ARegion *ar); /* snap the size of the region (can be NULL for no snapping). */ @@ -163,7 +163,7 @@ typedef struct ARegionType { /* split region, copy data optionally */ void *(*duplicate)(void *poin); - + /* register operator types on startup */ void (*operatortypes)(void); /* add own items to keymap */ @@ -182,7 +182,7 @@ typedef struct ARegionType { /* header type definitions */ ListBase headertypes; - + /* hardcoded constraints, smaller than these values region is not visible */ int minsizex, minsizey; /* when new region opens (region prefsizex/y are zero then */ @@ -199,7 +199,7 @@ typedef struct ARegionType { typedef struct PanelType { struct PanelType *next, *prev; - + char idname[BKE_ST_MAXNAME]; /* unique name */ char label[BKE_ST_MAXNAME]; /* for panel header */ char translation_context[BKE_ST_MAXNAME]; @@ -349,7 +349,7 @@ float BKE_screen_view3d_zoom_to_fac(float camzoom); float BKE_screen_view3d_zoom_from_fac(float zoomfac); /* screen */ -void BKE_screen_free(struct bScreen *sc); +void BKE_screen_free(struct bScreen *sc); void BKE_screen_area_map_free(struct ScrAreaMap *area_map) ATTR_NONNULL(); unsigned int BKE_screen_visible_layers(struct bScreen *screen, struct Scene *scene); @@ -361,4 +361,3 @@ void BKE_screen_remove_unused_scredges(struct bScreen *sc); void BKE_screen_remove_unused_scrverts(struct bScreen *sc); #endif - |