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:
authorTon Roosendaal <ton@blender.org>2009-01-04 20:45:54 +0300
committerTon Roosendaal <ton@blender.org>2009-01-04 20:45:54 +0300
commit3aeb63cad2340d92c17df375bbe55629299661c0 (patch)
tree026caa458a44d8c6478040faa1568647c2fff7af /source/blender/editors/screen/area.c
parentf7cb86df3a9ceccc4d649e42735732a608169157 (diff)
2.5
WM: added area-listener, which can be used to tag refreshes for either the drawing call, or use the new ED_area_tag_refresh() function which will automatically call, after all notifiers were handled, an the spacetype->refresh() you provided. Added for Joshua, after reviewing Action/Dopesheet requirements. Joshua: I've made two dummy functions in space_action.c: - action_listener() - action_refresh() Wich now does a printf on activating a new object.
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index bf7b76cc7f8..6f912ce393f 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -104,6 +104,7 @@ void ED_region_pixelspace(ARegion *ar)
wmLoadIdentity();
}
+/* only exported for WM */
void ED_region_do_listen(ARegion *ar, wmNotifier *note)
{
/* generic notes first */
@@ -121,7 +122,27 @@ void ED_region_do_listen(ARegion *ar, wmNotifier *note)
}
}
+/* only exported for WM */
+void ED_area_do_listen(ScrArea *sa, wmNotifier *note)
+{
+ /* no generic notes? */
+ if(sa->type && sa->type->listener) {
+ sa->type->listener(sa, note);
+ }
+}
+
+/* only exported for WM */
+void ED_area_do_refresh(bContext *C, ScrArea *sa)
+{
+ /* no generic notes? */
+ if(sa->type && sa->type->refresh) {
+ sa->type->refresh(C, sa);
+ }
+ sa->do_refresh= 0;
+}
+
/* based on screen region draw tags, set draw tags in azones, and future region tabs etc */
+/* only exported for WM */
void ED_area_overdraw_flush(bContext *C)
{
ScrArea *sa;
@@ -146,6 +167,7 @@ void ED_area_overdraw_flush(bContext *C)
}
}
+/* only exported for WM */
void ED_area_overdraw(bContext *C)
{
wmWindow *win= CTX_wm_window(C);
@@ -174,6 +196,7 @@ void ED_area_overdraw(bContext *C)
}
+/* only exported for WM */
void ED_region_do_draw(bContext *C, ARegion *ar)
{
wmWindow *win= CTX_wm_window(C);
@@ -216,7 +239,7 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
/* **********************************
maybe silly, but let's try for now
- to keep do_draw tags protected
+ to keep these tags protected
********************************** */
void ED_region_tag_redraw(ARegion *ar)
@@ -234,6 +257,11 @@ void ED_area_tag_redraw(ScrArea *sa)
ar->do_draw= 1;
}
+void ED_area_tag_refresh(ScrArea *sa)
+{
+ if(sa)
+ sa->do_refresh= 1;
+}
/* *************************************************************** */