RNA
[blender.git] / source / blender / editors / curve / editfont.c
index 722dfcdbd1d4d51e9455d96528e411e1d3214b74..5389db9e2eebca4d309d5f55b395156e96490bdd 100644 (file)
@@ -226,7 +226,7 @@ void update_string(Curve *cu)
        wcs2utf8s(cu->str, ef->textbuf);
 }
 
-static int insert_into_textbuf(Object *obedit, unsigned long c)
+static int insert_into_textbuf(Object *obedit, uintptr_t c)
 {
        Curve *cu= obedit->data;
        
@@ -401,11 +401,11 @@ static int paste_file_invoke(bContext *C, wmOperator *op, wmEvent *event)
        return OPERATOR_RUNNING_MODAL;
 }
 
-void FONT_OT_paste_file(wmOperatorType *ot)
+void FONT_OT_file_paste(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Paste File";
-       ot->idname= "FONT_OT_paste_file";
+       ot->idname= "FONT_OT_file_paste";
        
        /* api callbacks */
        ot->exec= paste_file_exec;
@@ -449,11 +449,11 @@ static int paste_buffer_exec(bContext *C, wmOperator *op)
        return paste_file(C, NULL, filename);
 }
 
-void FONT_OT_paste_buffer(wmOperatorType *ot)
+void FONT_OT_buffer_paste(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Paste Buffer";
-       ot->idname= "FONT_OT_paste_buffer";
+       ot->idname= "FONT_OT_buffer_paste";
        
        /* api callbacks */
        ot->exec= paste_buffer_exec;
@@ -607,10 +607,10 @@ static int kill_selection(Object *obedit, int ins)        /* 1 == new character */
 /******************* set style operator ********************/
 
 static EnumPropertyItem style_items[]= {
-       {CU_BOLD, "BOLD", "Bold", ""},
-       {CU_ITALIC, "ITALIC", "Italic", ""},
-       {CU_UNDERLINE, "UNDERLINE", "Underline", ""},
-       {0, NULL, NULL, NULL}};
+       {CU_BOLD, "BOLD", 0, "Bold", ""},
+       {CU_ITALIC, "ITALIC", 0, "Italic", ""},
+       {CU_UNDERLINE, "UNDERLINE", 0, "Underline", ""},
+       {0, NULL, 0, NULL, NULL}};
 
 static int set_style(bContext *C, int style, int clear)
 {
@@ -646,11 +646,11 @@ static int set_style_exec(bContext *C, wmOperator *op)
        return set_style(C, style, clear);
 }
 
-void FONT_OT_set_style(wmOperatorType *ot)
+void FONT_OT_style_set(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Set Style";
-       ot->idname= "FONT_OT_set_style";
+       ot->idname= "FONT_OT_style_set";
        
        /* api callbacks */
        ot->exec= set_style_exec;
@@ -683,11 +683,11 @@ static int toggle_style_exec(bContext *C, wmOperator *op)
        return set_style(C, style, clear);
 }
 
-void FONT_OT_toggle_style(wmOperatorType *ot)
+void FONT_OT_style_toggle(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Toggle Style";
-       ot->idname= "FONT_OT_toggle_style";
+       ot->idname= "FONT_OT_style_toggle";
        
        /* api callbacks */
        ot->exec= toggle_style_exec;
@@ -727,11 +727,11 @@ static int set_material_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-void FONT_OT_set_material(wmOperatorType *ot)
+void FONT_OT_material_set(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Set Material";
-       ot->idname= "FONT_OT_set_material";
+       ot->idname= "FONT_OT_material_set";
        
        /* api callbacks */
        ot->exec= set_material_exec;
@@ -769,11 +769,11 @@ static int copy_text_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-void FONT_OT_copy_text(wmOperatorType *ot)
+void FONT_OT_text_copy(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Copy Text";
-       ot->idname= "FONT_OT_copy_text";
+       ot->idname= "FONT_OT_text_copy";
        
        /* api callbacks */
        ot->exec= copy_text_exec;
@@ -799,11 +799,11 @@ static int cut_text_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-void FONT_OT_cut_text(wmOperatorType *ot)
+void FONT_OT_text_cut(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Cut Text";
-       ot->idname= "FONT_OT_cut_text";
+       ot->idname= "FONT_OT_text_cut";
        
        /* api callbacks */
        ot->exec= cut_text_exec;
@@ -856,11 +856,11 @@ static int paste_text_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-void FONT_OT_paste_text(wmOperatorType *ot)
+void FONT_OT_text_paste(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Paste Text";
-       ot->idname= "FONT_OT_paste_text";
+       ot->idname= "FONT_OT_text_paste";
        
        /* api callbacks */
        ot->exec= paste_text_exec;
@@ -873,17 +873,17 @@ void FONT_OT_paste_text(wmOperatorType *ot)
 /************************ move operator ************************/
 
 static EnumPropertyItem move_type_items[]= {
-       {LINE_BEGIN, "LINE_BEGIN", "Line Begin", ""},
-       {LINE_END, "LINE_END", "Line End", ""},
-       {PREV_CHAR, "PREVIOUS_CHARACTER", "Previous Character", ""},
-       {NEXT_CHAR, "NEXT_CHARACTER", "Next Character", ""},
-       {PREV_WORD, "PREVIOUS_WORD", "Previous Word", ""},
-       {NEXT_WORD, "NEXT_WORD", "Next Word", ""},
-       {PREV_LINE, "PREVIOUS_LINE", "Previous Line", ""},
-       {NEXT_LINE, "NEXT_LINE", "Next Line", ""},
-       {PREV_PAGE, "PREVIOUS_PAGE", "Previous Page", ""},
-       {NEXT_PAGE, "NEXT_PAGE", "Next Page", ""},
-       {0, NULL, NULL, NULL}};
+       {LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""},
+       {LINE_END, "LINE_END", 0, "Line End", ""},
+       {PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
+       {NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""},
+       {PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""},
+       {NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""},
+       {PREV_LINE, "PREVIOUS_LINE", 0, "Previous Line", ""},
+       {NEXT_LINE, "NEXT_LINE", 0, "Next Line", ""},
+       {PREV_PAGE, "PREVIOUS_PAGE", 0, "Previous Page", ""},
+       {NEXT_PAGE, "NEXT_PAGE", 0, "Next Page", ""},
+       {0, NULL, 0, NULL, NULL}};
 
 static int move_cursor(bContext *C, int type, int select)
 {
@@ -1164,13 +1164,13 @@ void FONT_OT_line_break(wmOperatorType *ot)
 /******************* delete operator **********************/
 
 static EnumPropertyItem delete_type_items[]= {
-       {DEL_ALL, "ALL", "All", ""},
-       {DEL_NEXT_CHAR, "NEXT_CHARACTER", "Next Character", ""},
-       {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", "Previous Character", ""},
-       {DEL_SELECTION, "SELECTION", "Selection", ""},
-       {DEL_NEXT_SEL, "NEXT_OR_SELECTION", "Next or Selection", ""},
-       {DEL_PREV_SEL, "PREVIOUS_OR_SELECTION", "Previous or Selection", ""},
-       {0, NULL, NULL, NULL}};
+       {DEL_ALL, "ALL", 0, "All", ""},
+       {DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""},
+       {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
+       {DEL_SELECTION, "SELECTION", 0, "Selection", ""},
+       {DEL_NEXT_SEL, "NEXT_OR_SELECTION", 0, "Next or Selection", ""},
+       {DEL_PREV_SEL, "PREVIOUS_OR_SELECTION", 0, "Previous or Selection", ""},
+       {0, NULL, 0, NULL, NULL}};
 
 static int delete_exec(bContext *C, wmOperator *op)
 {
@@ -1290,7 +1290,7 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt)
        Curve *cu= obedit->data;
        EditFont *ef= cu->editfont;
        static int accentcode= 0;
-       unsigned long ascii = evt->ascii;
+       uintptr_t ascii = evt->ascii;
        int alt= evt->alt, shift= evt->shift, ctrl= evt->ctrl;
        int event= evt->type, val= evt->val;
        wchar_t inserted_text[2]= {0};
@@ -1374,11 +1374,11 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt)
        return OPERATOR_FINISHED;
 }
 
-void FONT_OT_insert_text(wmOperatorType *ot)
+void FONT_OT_text_insert(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Insert Text";
-       ot->idname= "FONT_OT_insert_text";
+       ot->idname= "FONT_OT_text_insert";
        
        /* api callbacks */
        ot->exec= insert_text_exec;
@@ -1407,7 +1407,7 @@ void make_editText(Object *obedit)
                ef->copybuf= MEM_callocN((MAXTEXT+4)*sizeof(wchar_t), "texteditcopybuf");
                ef->copybufinfo= MEM_callocN((MAXTEXT+4)*sizeof(CharInfo), "texteditcopybufinfo");      
                ef->oldstr= MEM_callocN((MAXTEXT+4)*sizeof(wchar_t), "oldstrbuf");
-               ef->oldstrinfo= MEM_callocN((MAXTEXT+4)*sizeof(wchar_t), "oldstrbuf");
+               ef->oldstrinfo= MEM_callocN((MAXTEXT+4)*sizeof(CharInfo), "oldstrbuf");
        }
        
        // Convert the original text to wchar_t
@@ -1465,9 +1465,9 @@ void free_editText(Object *obedit)
 /********************** set case operator *********************/
 
 static EnumPropertyItem case_items[]= {
-       {CASE_LOWER, "LOWER", "Lower", ""},
-       {CASE_UPPER, "UPPER", "Upper", ""},
-       {0, NULL, NULL, NULL}};
+       {CASE_LOWER, "LOWER", 0, "Lower", ""},
+       {CASE_UPPER, "UPPER", 0, "Upper", ""},
+       {0, NULL, 0, NULL, NULL}};
 
 static int set_case(bContext *C, int ccase)
 {
@@ -1509,11 +1509,11 @@ static int set_case_exec(bContext *C, wmOperator *op)
        return set_case(C, RNA_enum_get(op->ptr, "case"));
 }
 
-void FONT_OT_set_case(wmOperatorType *ot)
+void FONT_OT_case_set(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Set Case";
-       ot->idname= "FONT_OT_set_case";
+       ot->idname= "FONT_OT_case_set";
        
        /* api callbacks */
        ot->exec= set_case_exec;
@@ -1551,11 +1551,11 @@ static int toggle_case_exec(bContext *C, wmOperator *op)
        return set_case(C, ccase);
 }
 
-void FONT_OT_toggle_case(wmOperatorType *ot)
+void FONT_OT_case_toggle(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Toggle Case";
-       ot->idname= "FONT_OT_toggle_case";
+       ot->idname= "FONT_OT_case_toggle";
        
        /* api callbacks */
        ot->exec= toggle_case_exec;