diff options
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/space_text.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_python.c | 14 |
5 files changed, 27 insertions, 27 deletions
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index 4e1bc818ce4..06346bc89ed 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -59,7 +59,7 @@ /* ******************** default callbacks for text space ***************** */ -static SpaceLink *text_new(const bContext *C) +static SpaceLink *text_new(const bContext *UNUSED(C)) { ARegion *ar; SpaceText *stext; @@ -97,7 +97,7 @@ static void text_free(SpaceLink *sl) /* spacetype; init callback */ -static void text_init(struct wmWindowManager *wm, ScrArea *sa) +static void text_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa)) { } @@ -395,7 +395,7 @@ static void text_main_area_draw(const bContext *C, ARegion *ar) /* scrollers? */ } -static void text_cursor(wmWindow *win, ScrArea *sa, ARegion *ar) +static void text_cursor(wmWindow *win, ScrArea *UNUSED(sa), ARegion *UNUSED(ar)) { WM_cursor_set(win, BC_TEXTEDITCURSOR); } @@ -404,7 +404,7 @@ static void text_cursor(wmWindow *win, ScrArea *sa, ARegion *ar) /* ************* dropboxes ************* */ -static int text_drop_poll(bContext *C, wmDrag *drag, wmEvent *event) +static int text_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event)) { if(drag->type==WM_DRAG_PATH) if(ELEM(drag->icon, 0, ICON_FILE_BLANK)) /* rule might not work? */ @@ -433,7 +433,7 @@ static void text_dropboxes(void) /****************** header region ******************/ /* add handlers, stuff you only do once or on area/region changes */ -static void text_header_area_init(wmWindowManager *wm, ARegion *ar) +static void text_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index c6036eb354b..024eef9092a 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -67,11 +67,11 @@ static void text_font_begin(SpaceText *st) BLF_size(mono, st->lheight, 72); } -static void text_font_end(SpaceText *st) +static void text_font_end(SpaceText *UNUSED(st)) { } -static int text_font_draw(SpaceText *st, int x, int y, char *str) +static int text_font_draw(SpaceText *UNUSED(st), int x, int y, char *str) { BLF_position(mono, x, y, 0); BLF_draw(mono, str); @@ -92,7 +92,7 @@ static int text_font_draw_character(SpaceText *st, int x, int y, char c) return st->cwidth; } -int text_font_width(SpaceText *st, char *str) +int text_font_width(SpaceText *UNUSED(st), char *str) { return BLF_width(mono, str); } @@ -1173,7 +1173,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll) CLAMP(st->txtscroll.ymax, pix_bottom_margin, ar->winy - pix_top_margin); } -static void draw_textscroll(SpaceText *st, ARegion *ar, rcti *scroll) +static void draw_textscroll(SpaceText *st, rcti *scroll) { bTheme *btheme= U.themes.first; uiWidgetColors wcol= btheme->tui.wcol_scroll; @@ -1781,7 +1781,7 @@ void draw_text_main(SpaceText *st, ARegion *ar) draw_brackets(st, ar); draw_markers(st, ar); glTranslatef(0.375f, 0.375f, 0.0f); /* XXX scroll requires exact pixel space */ - draw_textscroll(st, ar, &scroll); + draw_textscroll(st, &scroll); draw_documentation(st, ar); draw_suggestion_list(st, ar); diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h index 81968221765..c229e685aba 100644 --- a/source/blender/editors/space_text/text_intern.h +++ b/source/blender/editors/space_text/text_intern.h @@ -53,7 +53,7 @@ int text_check_whitespace(char ch); int text_font_width_character(struct SpaceText *st); int text_font_width(struct SpaceText *st, char *str); -void text_update_line_edited(struct Text *text, struct TextLine *line); +void text_update_line_edited(struct TextLine *line); void text_update_edited(struct Text *text); void text_update_character_width(struct SpaceText *st); void text_update_cursor_moved(struct bContext *C); diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 0d6c226c6d4..90fab7b2902 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -66,7 +66,7 @@ /************************ poll ***************************/ -static int text_new_poll(bContext *C) +static int text_new_poll(bContext *UNUSED(C)) { return 1; } @@ -125,7 +125,7 @@ static int text_region_edit_poll(bContext *C) /********************** updates *********************/ -void text_update_line_edited(Text *text, TextLine *line) +void text_update_line_edited(TextLine *line) { if(!line) return; @@ -142,7 +142,7 @@ void text_update_edited(Text *text) TextLine *line; for(line=text->lines.first; line; line=line->next) - text_update_line_edited(text, line); + text_update_line_edited(line); } /******************* new operator *********************/ @@ -938,8 +938,8 @@ static int line_break_exec(bContext *C, wmOperator *UNUSED(op)) if(text->curl) { if(text->curl->prev) - text_update_line_edited(text, text->curl->prev); - text_update_line_edited(text, text->curl); + text_update_line_edited(text->curl->prev); + text_update_line_edited(text->curl); } text_update_cursor_moved(C); @@ -1417,7 +1417,7 @@ static int text_get_cursor_rel(SpaceText* st, ARegion *ar, TextLine *linein, int return selc; } -static int cursor_skip_find_line(SpaceText* st, ARegion *ar, Text *text, +static int cursor_skip_find_line(SpaceText* st, ARegion *ar, int lines, TextLine **linep, int *charp, int *rell, int *relc) { int offl, offc, visible_lines; @@ -1713,7 +1713,7 @@ static void cursor_skip(SpaceText* st, ARegion *ar, Text *text, int lines, int s int rell, relc; /* find line and offsets inside it needed to set cursor position */ - if(cursor_skip_find_line(st, ar, text, lines, linep, charp, &rell, &relc)) + if(cursor_skip_find_line(st, ar, lines, linep, charp, &rell, &relc)) *charp= text_get_cursor_rel (st, ar, *linep, rell, relc); } else { while (lines>0 && (*linep)->next) { @@ -1918,7 +1918,7 @@ static int delete_exec(bContext *C, wmOperator *op) else if(type == DEL_NEXT_CHAR) txt_delete_char(text); - text_update_line_edited(text, text->curl); + text_update_line_edited(text->curl); text_update_cursor_moved(C); WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); @@ -2587,7 +2587,7 @@ static int insert_exec(bContext *C, wmOperator *op) if(!done) return OPERATOR_CANCELLED; - text_update_line_edited(text, text->curl); + text_update_line_edited(text->curl); text_update_cursor_moved(C); WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c index 9be554924c9..6e64bef4c85 100644 --- a/source/blender/editors/space_text/text_python.c +++ b/source/blender/editors/space_text/text_python.c @@ -204,7 +204,7 @@ short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short val) if(tools & TOOL_SUGG_LIST) { if((ascii != '_' && ascii != '*' && ispunct(ascii)) || text_check_whitespace(ascii)) { confirm_suggestion(st->text, 0); - text_update_line_edited(st->text, st->text->curl); + text_update_line_edited(st->text->curl); } else if((st->overwrite && txt_replace_char(st->text, ascii)) || txt_add_char(st->text, ascii)) { get_suggest_prefix(st->text, 0); @@ -230,7 +230,7 @@ short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short val) case MIDDLEMOUSE: if(text_do_suggest_select(st, ar)) { confirm_suggestion(st->text, 0); - text_update_line_edited(st->text, st->text->curl); + text_update_line_edited(st->text->curl); swallow= 1; } else { @@ -248,7 +248,7 @@ short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short val) case RETKEY: if(tools & TOOL_SUGG_LIST) { confirm_suggestion(st->text, 0); - text_update_line_edited(st->text, st->text->curl); + text_update_line_edited(st->text->curl); swallow= 1; draw= 1; } @@ -430,11 +430,11 @@ short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val) if(s!=c) txt_move_to(text, mrk->lineno, mrk->start+s, 1); if(st->overwrite) { if(txt_replace_char(text, ascii)) - text_update_line_edited(st->text, st->text->curl); + text_update_line_edited(st->text->curl); } else { if(txt_add_char(text, ascii)) { - text_update_line_edited(st->text, st->text->curl); + text_update_line_edited(st->text->curl); } } @@ -459,7 +459,7 @@ short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val) txt_move_to(text, mrk->lineno, mrk->start+c, 0); if(s!=c) txt_move_to(text, mrk->lineno, mrk->start+s, 1); txt_backspace_char(text); - text_update_line_edited(st->text, st->text->curl); + text_update_line_edited(st->text->curl); if(mrk==marker || mrk==nxt) break; mrk= nxt; } @@ -479,7 +479,7 @@ short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val) txt_move_to(text, mrk->lineno, mrk->start+c, 0); if(s!=c) txt_move_to(text, mrk->lineno, mrk->start+s, 1); txt_delete_char(text); - text_update_line_edited(st->text, st->text->curl); + text_update_line_edited(st->text->curl); if(mrk==marker || mrk==nxt) break; mrk= nxt; } |