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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-12-18 05:56:48 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-12-18 05:56:48 +0300
commitecc4e55b6666bdb20ed8e2e8e9a7fc2fbeff3731 (patch)
tree35b5a56c8b43fdf6d61a01302b2e458f6245bfe8 /source/blender/blenkernel/BKE_screen.h
parent241dbe6e85a916cc55b5e749596aaf0ef3dffd90 (diff)
2.5
Context API This adds the context API as described here. The main practical change now is that C is not longer directly accessible but has to be accessed through accessor functions. This basically adds the implementation of the API and adaption of existing code with some minor changes. The next task of course is to actually use this design to cleanup of bad level calls and global access, in blenkernel, blenloader. http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Context Error, Warning and Debug Info Reporting This adds the error reporting API as described here. It should help clean up error() calls in non-ui code, but eventually can become used for gathering messages for a console window, and throwing exceptions in python scripts when an error happens executing something. http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Reports
Diffstat (limited to 'source/blender/blenkernel/BKE_screen.h')
-rw-r--r--source/blender/blenkernel/BKE_screen.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index bb3188de511..acb9814b64a 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -31,14 +31,17 @@
#ifndef BKE_SCREEN_H
#define BKE_SCREEN_H
-struct SpaceType;
-struct ScrArea;
-struct bScreen;
struct ARegion;
+struct bContext;
+struct bContextDataMember;
+struct bContextDataResult;
+struct bScreen;
+struct ListBase;
+struct ScrArea;
+struct SpaceType;
struct wmNotifier;
-struct wmWindowManager;
struct wmWindow;
-struct ListBase;
+struct wmWindowManager;
/* spacetype has everything stored to get an editor working, it gets initialized via
ED_spacetypes_init() in editors/area/spacetypes.c */
@@ -73,6 +76,9 @@ typedef struct SpaceType {
/* sets default cursor per region */
void (*cursor)(struct wmWindow *win, struct ARegion *ar);
+ /* return context data */
+ int (*context)(const struct bContext *, const struct bContextDataMember *, struct bContextDataResult *);
+
/* region type definitions */
ListBase regiontypes;
@@ -104,6 +110,9 @@ typedef struct ARegionType {
/* add own items to keymap */
void (*keymap)(struct wmWindowManager *);
+ /* return context data */
+ int (*context)(const struct bContext *, const struct bContextDataMember *, struct bContextDataResult *);
+
/* hardcoded constraints, smaller than these values region is not visible */
int minsizex, minsizey;
/* default keymaps to add */