diff options
Diffstat (limited to 'source/blender/blenfont/BLF_api.h')
-rw-r--r-- | source/blender/blenfont/BLF_api.h | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index eb3f9805240..4de7e704a7e 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -98,13 +98,13 @@ void BLF_batch_draw_flush(void); void BLF_batch_draw_end(void); /* Draw the string using the current font. */ -void BLF_draw_ex(int fontid, const char *str, size_t len, struct ResultBLF *r_info) +void BLF_draw_ex(int fontid, const char *str, size_t str_len, struct ResultBLF *r_info) ATTR_NONNULL(2); -void BLF_draw(int fontid, const char *str, size_t len) ATTR_NONNULL(2); -void BLF_draw_ascii_ex(int fontid, const char *str, size_t len, struct ResultBLF *r_info) +void BLF_draw(int fontid, const char *str, size_t str_len) ATTR_NONNULL(2); +void BLF_draw_ascii_ex(int fontid, const char *str, size_t str_len, struct ResultBLF *r_info) ATTR_NONNULL(2); -void BLF_draw_ascii(int fontid, const char *str, size_t len) ATTR_NONNULL(2); -int BLF_draw_mono(int fontid, const char *str, size_t len, int cwidth) ATTR_NONNULL(2); +void BLF_draw_ascii(int fontid, const char *str, size_t str_len) ATTR_NONNULL(2); +int BLF_draw_mono(int fontid, const char *str, size_t str_len, int cwidth) ATTR_NONNULL(2); typedef bool (*BLF_GlyphBoundsFn)(const char *str, const size_t str_step_ofs, @@ -116,43 +116,45 @@ typedef bool (*BLF_GlyphBoundsFn)(const char *str, void BLF_boundbox_foreach_glyph_ex(int fontid, const char *str, - size_t len, + size_t str_len, BLF_GlyphBoundsFn user_fn, void *user_data, struct ResultBLF *r_info) ATTR_NONNULL(2); void BLF_boundbox_foreach_glyph(int fontid, const char *str, - size_t len, + size_t str_len, BLF_GlyphBoundsFn user_fn, void *user_data) ATTR_NONNULL(2); /* Get the string byte offset that fits within a given width */ -size_t BLF_width_to_strlen(int fontid, const char *str, size_t len, float width, float *r_width) - ATTR_NONNULL(2); +size_t BLF_width_to_strlen( + int fontid, const char *str, size_t str_len, float width, float *r_width) ATTR_NONNULL(2); /* Same as BLF_width_to_strlen but search from the string end */ -size_t BLF_width_to_rstrlen(int fontid, const char *str, size_t len, float width, float *r_width) - ATTR_NONNULL(2); +size_t BLF_width_to_rstrlen( + int fontid, const char *str, size_t str_len, float width, float *r_width) ATTR_NONNULL(2); /* This function return the bounding box of the string * and are not multiplied by the aspect. */ void BLF_boundbox_ex(int fontid, const char *str, - size_t len, + size_t str_len, struct rctf *box, struct ResultBLF *r_info) ATTR_NONNULL(2); -void BLF_boundbox(int fontid, const char *str, size_t len, struct rctf *box) ATTR_NONNULL(); +void BLF_boundbox(int fontid, const char *str, size_t str_len, struct rctf *box) ATTR_NONNULL(); /* The next both function return the width and height * of the string, using the current font and both value * are multiplied by the aspect of the font. */ -float BLF_width_ex(int fontid, const char *str, size_t len, struct ResultBLF *r_info) +float BLF_width_ex(int fontid, const char *str, size_t str_len, struct ResultBLF *r_info) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2); -float BLF_width(int fontid, const char *str, size_t len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); -float BLF_height_ex(int fontid, const char *str, size_t len, struct ResultBLF *r_info) +float BLF_width(int fontid, const char *str, size_t str_len) ATTR_WARN_UNUSED_RESULT + ATTR_NONNULL(); +float BLF_height_ex(int fontid, const char *str, size_t str_len, struct ResultBLF *r_info) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2); -float BLF_height(int fontid, const char *str, size_t len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); +float BLF_height(int fontid, const char *str, size_t str_len) ATTR_WARN_UNUSED_RESULT + ATTR_NONNULL(); /* Return dimensions of the font without any sample text. */ int BLF_height_max(int fontid) ATTR_WARN_UNUSED_RESULT; @@ -163,8 +165,8 @@ float BLF_ascender(int fontid) ATTR_WARN_UNUSED_RESULT; /* The following function return the width and height of the string, but * just in one call, so avoid extra freetype2 stuff. */ -void BLF_width_and_height(int fontid, const char *str, size_t len, float *r_width, float *r_height) - ATTR_NONNULL(); +void BLF_width_and_height( + int fontid, const char *str, size_t str_len, float *r_width, float *r_height) ATTR_NONNULL(); /* For fixed width fonts only, returns the width of a * character. @@ -221,9 +223,9 @@ void BLF_buffer_col(int fontid, const float rgba[4]) ATTR_NONNULL(2); /* Draw the string into the buffer, this function draw in both buffer, * float and unsigned char _BUT_ it's not necessary set both buffer, NULL is valid here. */ -void BLF_draw_buffer_ex(int fontid, const char *str, size_t len, struct ResultBLF *r_info) +void BLF_draw_buffer_ex(int fontid, const char *str, size_t str_len, struct ResultBLF *r_info) ATTR_NONNULL(2); -void BLF_draw_buffer(int fontid, const char *str, size_t len) ATTR_NONNULL(2); +void BLF_draw_buffer(int fontid, const char *str, size_t str_len) ATTR_NONNULL(2); /* Add a path to the font dir paths. */ void BLF_dir_add(const char *path) ATTR_NONNULL(); @@ -254,8 +256,9 @@ void BLF_default_dpi(int dpi); void BLF_default_set(int fontid); int BLF_default(void); /* get default font ID so we can pass it to other functions */ /* Draw the string using the default font, size and dpi. */ -void BLF_draw_default(float x, float y, float z, const char *str, size_t len) ATTR_NONNULL(); -void BLF_draw_default_ascii(float x, float y, float z, const char *str, size_t len) ATTR_NONNULL(); +void BLF_draw_default(float x, float y, float z, const char *str, size_t str_len) ATTR_NONNULL(); +void BLF_draw_default_ascii(float x, float y, float z, const char *str, size_t str_len) + ATTR_NONNULL(); /* Set size and DPI, and return default font ID. */ int BLF_set_default(void); |