diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_text.h')
-rw-r--r-- | source/blender/blenkernel/BKE_text.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h index 3d7b5d1c8e4..5e81fb85d76 100644 --- a/source/blender/blenkernel/BKE_text.h +++ b/source/blender/blenkernel/BKE_text.h @@ -45,16 +45,16 @@ struct SpaceText; void BKE_text_free (struct Text *text); void txt_set_undostate (int u); int txt_get_undostate (void); -struct Text* BKE_text_add (struct Main *bmain, const char *name); +struct Text *BKE_text_add (struct Main *bmain, const char *name); int txt_extended_ascii_as_utf8(char **str); int BKE_text_reload (struct Text *text); -struct Text* BKE_text_load (struct Main *bmain, const char *file, const char *relpath); -struct Text* BKE_text_copy (struct Text *ta); +struct Text *BKE_text_load (struct Main *bmain, const char *file, const char *relpath); +struct Text *BKE_text_copy (struct Text *ta); void BKE_text_unlink (struct Main *bmain, struct Text *text); void BKE_text_clear (struct Text *text); void BKE_text_write (struct Text *text, const char *str); -char* txt_to_buf (struct Text *text); +char *txt_to_buf (struct Text *text); void txt_clean_text (struct Text *text); void txt_order_cursors (struct Text *text); int txt_find_string (struct Text *text, const char *findstr, int wrap, int match_case); @@ -62,6 +62,8 @@ int txt_has_sel (struct Text *text); int txt_get_span (struct TextLine *from, struct TextLine *to); int txt_utf8_offset_to_index(const char *str, int offset); int txt_utf8_index_to_offset(const char *str, int index); +int txt_utf8_offset_to_column(const char *str, int offset); +int txt_utf8_column_to_offset(const char *str, int column); void txt_move_up (struct Text *text, short sel); void txt_move_down (struct Text *text, short sel); void txt_move_left (struct Text *text, short sel); @@ -80,7 +82,7 @@ void txt_delete_word (struct Text *text); void txt_delete_selected (struct Text *text); void txt_sel_all (struct Text *text); void txt_sel_line (struct Text *text); -char* txt_sel_to_buf (struct Text *text); +char *txt_sel_to_buf (struct Text *text); void txt_insert_buf (struct Text *text, const char *in_buffer); void txt_print_undo (struct Text *text); void txt_undo_add_op (struct Text *text, int op); @@ -98,7 +100,7 @@ void txt_indent (struct Text *text); void txt_uncomment (struct Text *text); void txt_move_lines (struct Text *text, const int direction); void txt_duplicate_line (struct Text *text); -int setcurr_tab_spaces (struct Text *text, int space); +int txt_setcurr_tab_spaces(struct Text *text, int space); /* utility functions, could be moved somewhere more generic but are python/text related */ int text_check_bracket(const char ch); |