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>2010-12-03 15:30:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-03 15:30:59 +0300
commitcd972535027a73ba70069051fe9038b6a8b5696a (patch)
treeb50696bddbc710192b89e34fcdd1e82e6c8073b7 /source/blender/windowmanager
parentaca76ddb502cbf0ee7888c3356f9f35240919410 (diff)
- added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings. - removed/renamed various shadowed vars. - removed BGE lamp.colour, only allow lamp.color attribute.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/WM_api.h4
-rw-r--r--source/blender/windowmanager/intern/wm_draw.c6
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c12
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c8
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c56
5 files changed, 42 insertions, 44 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 3c86d0d4d45..90145251fc0 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -56,8 +56,8 @@ typedef struct wmJob wmJob;
/* general API */
void WM_setprefsize (int stax, int stay, int sizx, int sizy);
-void WM_setinitialstate_fullscreen();
-void WM_setinitialstate_normal();
+void WM_setinitialstate_fullscreen(void);
+void WM_setinitialstate_normal(void);
void WM_init (struct bContext *C, int argc, char **argv);
void WM_exit (struct bContext *C);
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 39467381a66..18aa4694d58 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -79,13 +79,13 @@ static void wm_paintcursor_draw(bContext *C, ARegion *ar)
if(screen->subwinactive == ar->swinid) {
for(pc= wm->paintcursors.first; pc; pc= pc->next) {
if(pc->poll == NULL || pc->poll(C)) {
- ARegion *ar= CTX_wm_region(C);
+ ARegion *ar_other= CTX_wm_region(C);
if (ELEM(win->grabcursor, GHOST_kGrabWrap, GHOST_kGrabHide)) {
int x = 0, y = 0;
wm_get_cursor_position(win, &x, &y);
- pc->draw(C, x - ar->winrct.xmin, y - ar->winrct.ymin, pc->customdata);
+ pc->draw(C, x - ar_other->winrct.xmin, y - ar_other->winrct.ymin, pc->customdata);
} else {
- pc->draw(C, win->eventstate->x - ar->winrct.xmin, win->eventstate->y - ar->winrct.ymin, pc->customdata);
+ pc->draw(C, win->eventstate->x - ar_other->winrct.xmin, win->eventstate->y - ar_other->winrct.ymin, pc->customdata);
}
}
}
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 6aec8659533..8be7cc2d702 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -250,8 +250,6 @@ void wm_event_do_notifiers(bContext *C)
/* the notifiers are sent without context, to keep it clean */
while( (note=wm_notifier_next(wm)) ) {
- wmWindow *win;
-
for(win= wm->windows.first; win; win= win->next) {
/* filter out notifiers */
@@ -1805,11 +1803,11 @@ void wm_event_do_handlers(bContext *C)
/* only add mousemove when queue was read entirely */
if(win->addmousemove && win->eventstate) {
- wmEvent event= *(win->eventstate);
- event.type= MOUSEMOVE;
- event.prevx= event.x;
- event.prevy= event.y;
- wm_event_add(win, &event);
+ wmEvent tevent= *(win->eventstate);
+ tevent.type= MOUSEMOVE;
+ tevent.prevx= tevent.x;
+ tevent.prevy= tevent.y;
+ wm_event_add(win, &tevent);
win->addmousemove= 0;
}
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index f75a1c0fb7f..d1fe841d467 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -325,10 +325,10 @@ extern wchar_t *copybuf;
extern wchar_t *copybufinfo;
// XXX copy/paste buffer stuff...
-extern void free_anim_copybuf();
-extern void free_anim_drivers_copybuf();
-extern void free_fmodifiers_copybuf();
-extern void free_posebuf();
+extern void free_anim_copybuf(void);
+extern void free_anim_drivers_copybuf(void);
+extern void free_fmodifiers_copybuf(void);
+extern void free_posebuf(void);
/* called in creator.c even... tsk, split this! */
void WM_exit(bContext *C)
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 6a0b04346dc..e9e2f702238 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -669,10 +669,10 @@ static void operator_enum_search_cb(const struct bContext *C, void *arg_ot, cons
PointerRNA ptr;
EnumPropertyItem *item, *item_array;
- int free;
+ int do_free;
RNA_pointer_create(NULL, ot->srna, NULL, &ptr);
- RNA_property_enum_items((bContext *)C, &ptr, prop, &item_array, NULL, &free);
+ RNA_property_enum_items((bContext *)C, &ptr, prop, &item_array, NULL, &do_free);
for(item= item_array; item->identifier; item++) {
/* note: need to give the intex rather then the dientifier because the enum can be freed */
@@ -681,7 +681,7 @@ static void operator_enum_search_cb(const struct bContext *C, void *arg_ot, cons
break;
}
- if(free)
+ if(do_free)
MEM_freeN(item_array);
}
}
@@ -2369,18 +2369,18 @@ static void tweak_gesture_modal(bContext *C, wmEvent *event)
rect->ymax= event->y - sy;
if((val= wm_gesture_evaluate(gesture))) {
- wmEvent event;
+ wmEvent tevent;
- event= *(window->eventstate);
+ tevent= *(window->eventstate);
if(gesture->event_type==LEFTMOUSE)
- event.type= EVT_TWEAK_L;
+ tevent.type= EVT_TWEAK_L;
else if(gesture->event_type==RIGHTMOUSE)
- event.type= EVT_TWEAK_R;
+ tevent.type= EVT_TWEAK_R;
else
- event.type= EVT_TWEAK_M;
- event.val= val;
+ tevent.type= EVT_TWEAK_M;
+ tevent.val= val;
/* mouse coords! */
- wm_event_add(window, &event);
+ wm_event_add(window, &tevent);
WM_gesture_end(C, gesture); /* frees gesture itself, and unregisters from window */
}
@@ -3425,7 +3425,7 @@ void wm_window_keymap(wmKeyConfig *keyconf)
}
/* Generic itemf's for operators that take library args */
-static EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), int *free, ID *id, int local)
+static EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), int *do_free, ID *id, int local)
{
EnumPropertyItem item_tmp= {0}, *item= NULL;
int totitem= 0;
@@ -3440,44 +3440,44 @@ static EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(pt
}
RNA_enum_item_end(&item, &totitem);
- *free= 1;
+ *do_free= 1;
return item;
}
/* can add more as needed */
-EnumPropertyItem *RNA_action_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_action_itemf(bContext *C, PointerRNA *ptr, int *do_free)
{
- return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->action.first : NULL, FALSE);
+ return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->action.first : NULL, FALSE);
}
-EnumPropertyItem *RNA_action_local_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_action_local_itemf(bContext *C, PointerRNA *ptr, int *do_free)
{
- return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->action.first : NULL, TRUE);
+ return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->action.first : NULL, TRUE);
}
-EnumPropertyItem *RNA_group_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_group_itemf(bContext *C, PointerRNA *ptr, int *do_free)
{
- return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->group.first : NULL, FALSE);
+ return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->group.first : NULL, FALSE);
}
-EnumPropertyItem *RNA_group_local_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_group_local_itemf(bContext *C, PointerRNA *ptr, int *do_free)
{
- return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->group.first : NULL, TRUE);
+ return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->group.first : NULL, TRUE);
}
-EnumPropertyItem *RNA_image_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_image_itemf(bContext *C, PointerRNA *ptr, int *do_free)
{
- return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->image.first : NULL, FALSE);
+ return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->image.first : NULL, FALSE);
}
-EnumPropertyItem *RNA_image_local_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_image_local_itemf(bContext *C, PointerRNA *ptr, int *do_free)
{
- return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->image.first : NULL, TRUE);
+ return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->image.first : NULL, TRUE);
}
-EnumPropertyItem *RNA_scene_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_scene_itemf(bContext *C, PointerRNA *ptr, int *do_free)
{
- return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, FALSE);
+ return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, FALSE);
}
-EnumPropertyItem *RNA_scene_local_itemf(bContext *C, PointerRNA *ptr, int *free)
+EnumPropertyItem *RNA_scene_local_itemf(bContext *C, PointerRNA *ptr, int *do_free)
{
- return rna_id_itemf(C, ptr, free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, TRUE);
+ return rna_id_itemf(C, ptr, do_free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, TRUE);
}