Commit: ac310a840dfc453b18b1963ee8697a7d8c23f782
Author: Campbell Barton
Date:   Tue Dec 30 20:56:48 2014 +1100
Branches: temp-text_editor_cursor_api
https://developer.blender.org/rBac310a840dfc453b18b1963ee8697a7d8c23f782

rename for consistency

===================================================================

M       source/blender/editors/include/ED_text.h
M       source/blender/editors/space_text/text_draw.c
M       source/blender/makesrna/intern/rna_space_api.c
M       source/blenderplayer/bad_level_call_stubs/stubs.c

===================================================================

diff --git a/source/blender/editors/include/ED_text.h 
b/source/blender/editors/include/ED_text.h
index b902641..5df7d9c 100644
--- a/source/blender/editors/include/ED_text.h
+++ b/source/blender/editors/include/ED_text.h
@@ -35,7 +35,7 @@ struct SpaceText;
 struct ARegion;
 
 void ED_text_undo_step(struct bContext *C, int step);
-bool ED_text_cursor_to_pixel_space(struct SpaceText *st, struct ARegion *ar, 
const int cursor_co[2], int r_pixel_co[2]);
+bool ED_text_region_location_from_cursor(struct SpaceText *st, struct ARegion 
*ar, const int cursor_co[2], int r_pixel_co[2]);
 
 #endif /* __ED_TEXT_H__ */
 
diff --git a/source/blender/editors/space_text/text_draw.c 
b/source/blender/editors/space_text/text_draw.c
index 53c2ddd..4c5894e 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1553,7 +1553,7 @@ void text_update_cursor_moved(bContext *C)
 /**
  * Takes a cursor (row, character) and returns x,y pixel coords.
  */
-bool ED_text_cursor_to_pixel_space(SpaceText *st, ARegion* ar, const int 
cursor_co[2], int r_pixel_co[2])
+bool ED_text_region_location_from_cursor(SpaceText *st, ARegion* ar, const int 
cursor_co[2], int r_pixel_co[2])
 {
        TextLine* line = NULL;
 
diff --git a/source/blender/makesrna/intern/rna_space_api.c 
b/source/blender/makesrna/intern/rna_space_api.c
index ae12e47..4196637 100644
--- a/source/blender/makesrna/intern/rna_space_api.c
+++ b/source/blender/makesrna/intern/rna_space_api.c
@@ -51,13 +51,13 @@ static void rna_RegionView3D_update(ID *id, RegionView3D 
*rv3d)
        }
 }
 
-static void rna_SpaceTextEditor_cursor_to_pixel_space(ID *id, SpaceText *st, 
int cursor_co[2], int r_pixel_pos[2])
+static void rna_SpaceTextEditor_region_location_from_cursor(ID *id, SpaceText 
*st, int cursor_co[2], int r_pixel_pos[2])
 {
        bScreen *sc = (bScreen *)id;
        ScrArea *sa = BKE_screen_find_area_from_space(sc, (SpaceLink *)st);
        if (sa) {
                ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
-               ED_text_cursor_to_pixel_space(st, ar, cursor_co, r_pixel_pos);
+               ED_text_region_location_from_cursor(st, ar, cursor_co, 
r_pixel_pos);
        }
 }
 
@@ -91,7 +91,7 @@ void RNA_api_space_text(StructRNA *srna)
        FunctionRNA *func;
        PropertyRNA *parm;
 
-       func = RNA_def_function(srna, "cursor_to_pixel_space", 
"rna_SpaceTextEditor_cursor_to_pixel_space");
+       func = RNA_def_function(srna, "region_location_from_cursor", 
"rna_SpaceTextEditor_region_location_from_cursor");
        RNA_def_function_ui_description(func, "Retrieve the screen position in 
pixels from the given line and character position");
        RNA_def_function_flag(func, FUNC_USE_SELF_ID);
        parm = RNA_def_int_array(func, "cursor", 2, 0, 0, INT_MAX, "", "Text 
Position, line and character in line", 0, INT_MAX);
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c 
b/source/blenderplayer/bad_level_call_stubs/stubs.c
index e277e21..8a7c761 100644
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ b/source/blenderplayer/bad_level_call_stubs/stubs.c
@@ -483,7 +483,7 @@ bool ED_texture_context_check_lamp(const struct bContext 
*C) RET_ZERO
 bool ED_texture_context_check_particles(const struct bContext *C) RET_ZERO
 bool ED_texture_context_check_others(const struct bContext *C) RET_ZERO
 
-bool ED_text_cursor_to_pixel_space(SpaceText *st, ARegion *ar, const int 
cursor_co[2], int r_pixel_co[2]) RET_ZERO
+bool ED_text_region_location_from_cursor(SpaceText *st, ARegion *ar, const int 
cursor_co[2], int r_pixel_co[2]) RET_ZERO
 
 bool snapObjectsRayEx(struct Scene *scene, struct Base *base_act, struct 
View3D *v3d, struct ARegion *ar, struct Object *obedit, short snap_mode,
                       struct Object **r_ob, float r_obmat[4][4],

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to