NAME
ucpgba - functions for doing bidirectional reordering of Unicode text, and logical and visual cursor motion
#include <ucdata.h>
#include <ucpgba.h>
ucstring_t *ucstring_create(unsigned long *source, unsigned long start, unsigned long end, int default_direction, int cursor_motion)
void ucstring_free(ucstring_t *string)
int ucstring_set_cursor_motion(ucstring_t *string, int cursor_motion)
int ucstring_cursor_right(ucstring_t *string, int count)
int ucstring_cursor_left(ucstring_t *string, int count)
void ucstring_cursor_info(ucstring_t *string, int *direction, unsigned long *position)
DESCRIPTION
Macros
ucstring_create()
The `default_direction' parameter should be one of UCPGBA_LTR or UCPGBA_RTL and is used only in cases where a string contains no characters with strong directionality.
The `cursor_motion' parameter should be one of UCPGBA_CURSOR_VISUAL or UCPGBA_CURSOR_LOGICAL, and is used to specify the initial cursor motion behavior. This behavior can be switched at any time using ustring_set_cursor_motion().
ucstring_free()
ucstring_cursor_info()
ucstring_cursor_right()
If no cursor motion is performed, it returns 0. Otherwise it will return a 1.
ucstring_cursor_left()
If no cursor motion is performed, it returns 0. Otherwise it will return a 1.