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>2011-02-13 17:16:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-13 17:16:36 +0300
commit4124804b4e67c7a1d15abaac220d08497e37d34a (patch)
treeaf2825d24495aab4bcb061013c6d5ad482eba035 /source/blender/editors/interface
parent63cc6b44e74d8538a4ba9b4f29929914d627d8f5 (diff)
many functions in blender are not marked static but should be.
most local modifier,GPU,ImBuf and Interface functions are now static. also fixed an error were the fluid modifier definition and the header didnt have the same number of args.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface.c4
-rw-r--r--source/blender/editors/interface/interface_draw.c10
-rw-r--r--source/blender/editors/interface/interface_handlers.c2
-rw-r--r--source/blender/editors/interface/interface_layout.c5
-rw-r--r--source/blender/editors/interface/interface_ops.c12
-rw-r--r--source/blender/editors/interface/interface_panel.c12
-rw-r--r--source/blender/editors/interface/interface_regions.c10
-rw-r--r--source/blender/editors/interface/interface_templates.c4
-rw-r--r--source/blender/editors/interface/interface_widgets.c2
-rw-r--r--source/blender/editors/interface/view2d_ops.c22
10 files changed, 41 insertions, 42 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 48141a4eeb4..bfa9f17a4fb 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -660,7 +660,7 @@ static void ui_menu_block_set_keyaccels(uiBlock *block)
}
-void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block)
+static void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block)
{
uiBut *but;
IDProperty *prop;
@@ -919,7 +919,7 @@ static int uibut_contains_pt(uiBut *UNUSED(but), short *UNUSED(mval))
}
-uiBut *ui_get_valid_link_button(uiBlock *block, uiBut *but, short *mval)
+static uiBut *ui_get_valid_link_button(uiBlock *block, uiBut *but, short *mval)
{
uiBut *bt;
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index d6258d20b52..f16d633de6f 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -381,7 +381,7 @@ void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad)
}
/* plain fake antialiased unfilled round rectangle */
-void uiRoundRectFakeAA(float minx, float miny, float maxx, float maxy, float rad, float asp)
+static void uiRoundRectFakeAA(float minx, float miny, float maxx, float maxy, float rad, float asp)
{
float color[4], alpha;
float raddiff;
@@ -715,7 +715,7 @@ static void draw_scope_end(rctf *rect, GLint *scissor)
uiDrawBox(GL_LINE_LOOP, rect->xmin-1, rect->ymin, rect->xmax+1, rect->ymax+1, 3.0f);
}
-void histogram_draw_one(float r, float g, float b, float alpha, float x, float y, float w, float h, float *data, int res)
+static void histogram_draw_one(float r, float g, float b, float alpha, float x, float y, float w, float h, float *data, int res)
{
int i;
@@ -961,17 +961,17 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol),
draw_scope_end(&rect, scissor);
}
-float polar_to_x(float center, float diam, float ampli, float angle)
+static float polar_to_x(float center, float diam, float ampli, float angle)
{
return center + diam * ampli * cosf(angle);
}
-float polar_to_y(float center, float diam, float ampli, float angle)
+static float polar_to_y(float center, float diam, float ampli, float angle)
{
return center + diam * ampli * sinf(angle);
}
-void vectorscope_draw_target(float centerx, float centery, float diam, float r, float g, float b)
+static void vectorscope_draw_target(float centerx, float centery, float diam, float r, float g, float b)
{
float y,u,v;
float tangle=0.f, tampli;
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 8c91030704c..92b4e622d7e 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -5467,7 +5467,7 @@ static int ui_mouse_motion_towards_check(uiBlock *block, uiPopupBlockHandle *men
return menu->dotowards;
}
-int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu, int UNUSED(topmenu))
+static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu, int UNUSED(topmenu))
{
ARegion *ar;
uiBlock *block;
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 18bee084f40..330c81fbcb2 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1114,7 +1114,7 @@ typedef struct CollItemSearch {
int iconid;
} CollItemSearch;
-int sort_search_items_list(void *a, void *b)
+static int sort_search_items_list(void *a, void *b)
{
CollItemSearch *cis1 = (CollItemSearch *)a;
CollItemSearch *cis2 = (CollItemSearch *)b;
@@ -2576,8 +2576,7 @@ void uiBlockLayoutResolve(uiBlock *block, int *x, int *y)
/* XXX silly trick, interface_templates.c doesn't get linked
* because it's not used by other files in this module? */
{
- void ui_template_fix_linking(void);
- ui_template_fix_linking();
+ UI_template_fix_linking();
}
}
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 95c52d20c37..9734150ab5c 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -177,7 +177,7 @@ static int eyedropper_poll(bContext *C)
else return 1;
}
-void UI_OT_eyedropper(wmOperatorType *ot)
+static void UI_OT_eyedropper(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Eyedropper";
@@ -207,7 +207,7 @@ static int reset_default_theme_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-void UI_OT_reset_default_theme(wmOperatorType *ot)
+static void UI_OT_reset_default_theme(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Reset to Default Theme";
@@ -247,7 +247,7 @@ static int copy_data_path_button_exec(bContext *C, wmOperator *UNUSED(op))
return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
}
-void UI_OT_copy_data_path_button(wmOperatorType *ot)
+static void UI_OT_copy_data_path_button(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Copy Data Path";
@@ -297,7 +297,7 @@ static int reset_default_button_exec(bContext *C, wmOperator *op)
return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
}
-void UI_OT_reset_default_button(wmOperatorType *ot)
+static void UI_OT_reset_default_button(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Reset to Default Value";
@@ -389,7 +389,7 @@ static int copy_to_selected_button_exec(bContext *C, wmOperator *op)
return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
}
-void UI_OT_copy_to_selected_button(wmOperatorType *ot)
+static void UI_OT_copy_to_selected_button(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Copy To Selected";
@@ -439,7 +439,7 @@ static int reports_to_text_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-void UI_OT_reports_to_textblock(wmOperatorType *ot)
+static void UI_OT_reports_to_textblock(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Reports to Text Block";
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index db4af4c11e5..93b5305fd12 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -309,7 +309,7 @@ static void ui_offset_panel_block(uiBlock *block)
/**************************** drawing *******************************/
/* extern used by previewrender */
-void uiPanelPush(uiBlock *block)
+static void uiPanelPush(uiBlock *block)
{
glPushMatrix();
@@ -317,14 +317,14 @@ void uiPanelPush(uiBlock *block)
glTranslatef((float)block->panel->ofsx, (float)block->panel->ofsy, 0.0);
}
-void uiPanelPop(uiBlock *UNUSED(block))
+static void uiPanelPop(uiBlock *UNUSED(block))
{
glPopMatrix();
}
/* triangle 'icon' for panel header */
/* NOTE - this seems to be only used for hiding nodes now */
-void ui_draw_tria_icon(float x, float y, char dir)
+void UI_DrawTriIcon(float x, float y, char dir)
{
if(dir=='h') {
ui_draw_anti_tria( x-3,y-5, x-3,y+5, x+7,y );
@@ -335,7 +335,7 @@ void ui_draw_tria_icon(float x, float y, char dir)
}
/* triangle 'icon' inside rect */
-void ui_draw_tria_rect(rctf *rect, char dir)
+static void ui_draw_tria_rect(rctf *rect, char dir)
{
if(dir=='h') {
float half= 0.5f*(rect->ymax - rect->ymin);
@@ -347,7 +347,7 @@ void ui_draw_tria_rect(rctf *rect, char dir)
}
}
-void ui_draw_anti_x(float x1, float y1, float x2, float y2)
+static void ui_draw_anti_x(float x1, float y1, float x2, float y2)
{
/* set antialias line */
@@ -655,7 +655,7 @@ static int compare_panel(const void *a1, const void *a2)
/* this doesnt draw */
/* returns 1 when it did something */
-int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
+static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
{
uiStyle *style= U.uistyles.first;
Panel *pa;
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 4574c1fd4ad..31523685527 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -130,7 +130,7 @@ static void menudata_add_item(MenuData *md, const char *str, int retval, int ico
md->nitems++;
}
-void menudata_free(MenuData *md)
+static void menudata_free(MenuData *md)
{
MEM_freeN(md->instr);
if (md->items)
@@ -151,7 +151,7 @@ void menudata_free(MenuData *md)
* @param str String to be parsed.
* @retval new menudata structure, free with menudata_free()
*/
-MenuData *decompose_menu_string(char *str)
+static MenuData *decompose_menu_string(char *str)
{
char *instr= BLI_strdup(str);
MenuData *md= menudata_new(instr);
@@ -272,7 +272,7 @@ int ui_step_name_menu(uiBut *but, int step)
/******************** Creating Temporary regions ******************/
-ARegion *ui_add_temporary_region(bScreen *sc)
+static ARegion *ui_add_temporary_region(bScreen *sc)
{
ARegion *ar;
@@ -285,7 +285,7 @@ ARegion *ui_add_temporary_region(bScreen *sc)
return ar;
}
-void ui_remove_temporary_region(bContext *C, bScreen *sc, ARegion *ar)
+static void ui_remove_temporary_region(bContext *C, bScreen *sc, ARegion *ar)
{
if(CTX_wm_window(C))
wm_draw_region_clear(CTX_wm_window(C), ar);
@@ -1620,7 +1620,7 @@ void ui_set_but_hsv(uiBut *but)
}
/* also used by small picker, be careful with name checks below... */
-void ui_update_block_buts_rgb(uiBlock *block, float *rgb)
+static void ui_update_block_buts_rgb(uiBlock *block, float *rgb)
{
uiBut *bt;
float *hsv= ui_block_hsv_get(block);
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 14d9773ef14..b0707a8b34b 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -59,7 +59,7 @@
#include "BLF_api.h"
-void ui_template_fix_linking(void)
+void UI_template_fix_linking(void)
{
}
@@ -876,7 +876,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
#define REMAKEIPO 8
#define B_DIFF 9
-void do_constraint_panels(bContext *C, void *ob_pt, int event)
+static void do_constraint_panels(bContext *C, void *ob_pt, int event)
{
Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index a431fc300d0..e3c465dd4c8 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -1698,7 +1698,7 @@ void ui_hsvcircle_vals_from_pos(float *valrad, float *valdist, rcti *rect, float
*valrad= atan2(mx, my)/(2.0f*M_PI) + 0.5f;
}
-void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, rcti *rect)
+static void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, rcti *rect)
{
/* gouraud triangle fan */
float radstep, ang= 0.0f;
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index fcc72cba321..92e0d0011f4 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -280,7 +280,7 @@ static int view_pan_cancel(bContext *UNUSED(C), wmOperator *op)
return OPERATOR_CANCELLED;
}
-void VIEW2D_OT_pan(wmOperatorType *ot)
+static void VIEW2D_OT_pan(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Pan View";
@@ -330,7 +330,7 @@ static int view_scrollright_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void VIEW2D_OT_scroll_right(wmOperatorType *ot)
+static void VIEW2D_OT_scroll_right(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroll Right";
@@ -374,7 +374,7 @@ static int view_scrollleft_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void VIEW2D_OT_scroll_left(wmOperatorType *ot)
+static void VIEW2D_OT_scroll_left(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroll Left";
@@ -422,7 +422,7 @@ static int view_scrolldown_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void VIEW2D_OT_scroll_down(wmOperatorType *ot)
+static void VIEW2D_OT_scroll_down(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroll Down";
@@ -472,7 +472,7 @@ static int view_scrollup_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void VIEW2D_OT_scroll_up(wmOperatorType *ot)
+static void VIEW2D_OT_scroll_up(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroll Up";
@@ -699,7 +699,7 @@ static int view_zoomin_invoke(bContext *C, wmOperator *op, wmEvent *event)
return view_zoomin_exec(C, op);
}
-void VIEW2D_OT_zoom_in(wmOperatorType *ot)
+static void VIEW2D_OT_zoom_in(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Zoom In";
@@ -756,7 +756,7 @@ static int view_zoomout_invoke(bContext *C, wmOperator *op, wmEvent *event)
return view_zoomout_exec(C, op);
}
-void VIEW2D_OT_zoom_out(wmOperatorType *ot)
+static void VIEW2D_OT_zoom_out(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Zoom Out";
@@ -1040,7 +1040,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_RUNNING_MODAL;
}
-void VIEW2D_OT_zoom(wmOperatorType *ot)
+static void VIEW2D_OT_zoom(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Zoom View";
@@ -1140,7 +1140,7 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-void VIEW2D_OT_zoom_border(wmOperatorType *ot)
+static void VIEW2D_OT_zoom_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Zoom to Border";
@@ -1537,7 +1537,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
/* LMB-Drag in Scrollers - not repeatable operator! */
-void VIEW2D_OT_scroller_activate(wmOperatorType *ot)
+static void VIEW2D_OT_scroller_activate(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scroller Activate";
@@ -1603,7 +1603,7 @@ static int reset_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-void VIEW2D_OT_reset(wmOperatorType *ot)
+static void VIEW2D_OT_reset(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Reset View";