2022-02-11 09:07:11 +11:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
* Copyright 2011 Blender Foundation. All rights reserved. */
|
2012-03-07 15:55:12 +00:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup bli
|
2012-03-07 15:55:12 +00:00
|
|
|
*/
|
|
|
|
|
|
2020-03-02 15:04:53 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2017-10-17 13:43:10 +11:00
|
|
|
typedef enum eStrCursorJumpType {
|
2012-03-07 15:55:12 +00:00
|
|
|
STRCUR_JUMP_NONE,
|
|
|
|
|
STRCUR_JUMP_DELIM,
|
2019-04-16 16:40:47 +02:00
|
|
|
STRCUR_JUMP_ALL,
|
2017-10-17 13:43:10 +11:00
|
|
|
} eStrCursorJumpType;
|
2012-03-07 15:55:12 +00:00
|
|
|
|
2017-10-17 13:43:10 +11:00
|
|
|
typedef enum eStrCursorJumpDirection {
|
2012-03-07 15:55:12 +00:00
|
|
|
STRCUR_DIR_PREV,
|
2019-04-16 16:40:47 +02:00
|
|
|
STRCUR_DIR_NEXT,
|
2017-10-17 13:43:10 +11:00
|
|
|
} eStrCursorJumpDirection;
|
2012-03-07 15:55:12 +00:00
|
|
|
|
2014-03-31 23:39:08 +11:00
|
|
|
bool BLI_str_cursor_step_next_utf8(const char *str, size_t maxlen, int *pos);
|
|
|
|
|
bool BLI_str_cursor_step_prev_utf8(const char *str, size_t maxlen, int *pos);
|
2012-03-07 15:55:12 +00:00
|
|
|
|
2017-10-17 13:43:10 +11:00
|
|
|
void BLI_str_cursor_step_utf8(const char *str,
|
|
|
|
|
size_t maxlen,
|
|
|
|
|
int *pos,
|
|
|
|
|
eStrCursorJumpDirection direction,
|
|
|
|
|
eStrCursorJumpType jump,
|
|
|
|
|
bool use_init_step);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-11-22 12:26:54 -03:00
|
|
|
void BLI_str_cursor_step_utf32(const char32_t *str,
|
2017-10-17 13:43:10 +11:00
|
|
|
size_t maxlen,
|
|
|
|
|
int *pos,
|
|
|
|
|
eStrCursorJumpDirection direction,
|
|
|
|
|
eStrCursorJumpType jump,
|
|
|
|
|
bool use_init_step);
|
2013-12-29 16:54:43 +11:00
|
|
|
|
2020-03-02 15:04:53 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|