sombok.h File Reference

Go to the source code of this file.

## Data Structures

struct | unistr_t
struct | gcchar_t
struct | mapent_t
struct | gcstring_t
struct | linebreak_t

## Typedefs

typedef unsigned int | unichar_t
typedef unsigned char | propval_t
typedef void(* | linebreak_ref_func_t) (void *, int, int)
typedef gcstring_t *(* | linebreak_format_func_t) (struct linebreak_t *, linebreak_state_t, gcstring_t *)
typedef double(* | linebreak_sizing_func_t) (struct linebreak_t *, double, gcstring_t *, gcstring_t *, gcstring_t *)
typedef gcstring_t *(* | linebreak_urgent_func_t) (struct linebreak_t *, gcstring_t *)
typedef gcstring_t *(* | linebreak_prep_func_t) (struct linebreak_t *, void *, unistr_t *, unistr_t *)
typedef gcstring_t *(* | linebreak_obs_prep_func_t) (struct linebreak_t *, unistr_t *)
typedef struct linebreak_t | linebreak_t

## Enumerations

enum | linebreak_state_t { LINEBREAK_STATE_NONE = 0, LINEBREAK_STATE_SOT, LINEBREAK_STATE_SOP, LINEBREAK_STATE_SOL, LINEBREAK_STATE_LINE, LINEBREAK_STATE_EOL, LINEBREAK_STATE_EOP, LINEBREAK_STATE_EOT, LINEBREAK_STATE_MAX }

## Functions

void | linebreak_charprop (linebreak_t *, unichar_t, propval_t *, propval_t *, propval_t *, propval_t *)
gcstring_t * | gcstring_new (unistr_t *, linebreak_t *)
gcstring_t * | gcstring_new_from_utf8 (char *, size_t, int, linebreak_t *)
gcstring_t * | gcstring_newcopy (unistr_t *, linebreak_t *)
gcstring_t * | gcstring_copy (gcstring_t *)
void | gcstring_destroy (gcstring_t *)
gcstring_t * | gcstring_append (gcstring_t *, gcstring_t *)
size_t | gcstring_columns (gcstring_t *)
int | gcstring_cmp (gcstring_t *, gcstring_t *)
gcstring_t * | gcstring_concat (gcstring_t *, gcstring_t *)
gcchar_t * | gcstring_next (gcstring_t *)
void | gcstring_setpos (gcstring_t *, int)
void | gcstring_shrink (gcstring_t *, int)
gcstring_t * | gcstring_substr (gcstring_t *, int, int)
gcstring_t * | gcstring_replace (gcstring_t *, int, int, gcstring_t *)
propval_t | gcstring_lbclass (gcstring_t *, int)
propval_t | gcstring_lbclass_ext (gcstring_t *, int)
linebreak_t * | linebreak_new (linebreak_ref_func_t)
linebreak_t * | linebreak_copy (linebreak_t *)
linebreak_t * | linebreak_incref (linebreak_t *)
void | linebreak_destroy (linebreak_t *)
void | linebreak_set_newline (linebreak_t *, unistr_t *)
void | linebreak_set_stash (linebreak_t *, void *)
void | linebreak_set_format (linebreak_t *, linebreak_format_func_t, void *)
void | linebreak_add_prep (linebreak_t *, linebreak_prep_func_t, void *)
void | linebreak_set_sizing (linebreak_t *, linebreak_sizing_func_t, void *)
void | linebreak_set_urgent (linebreak_t *, linebreak_urgent_func_t, void *)
void | linebreak_set_user (linebreak_t *, linebreak_obs_prep_func_t, void *)
void | linebreak_reset (linebreak_t *)
void | linebreak_update_lbclass (linebreak_t *, unichar_t, propval_t)
void | linebreak_clear_lbclass (linebreak_t *)
void | linebreak_update_eawidth (linebreak_t *, unichar_t, propval_t)
void | linebreak_clear_eawidth (linebreak_t *)
propval_t | linebreak_search_lbclass (linebreak_t *, unichar_t)
propval_t | linebreak_search_eawidth (linebreak_t *, unichar_t)
void | linebreak_merge_lbclass (linebreak_t *, linebreak_t *)
void | linebreak_merge_eawidth (linebreak_t *, linebreak_t *)
propval_t | linebreak_eawidth (linebreak_t *, unichar_t)
propval_t | linebreak_get_lbrule (linebreak_t *, propval_t, propval_t)
propval_t | linebreak_lbclass (linebreak_t *, unichar_t)
gcstring_t ** | linebreak_break (linebreak_t *, unistr_t *)
gcstring_t ** | linebreak_break_fast (linebreak_t *, unistr_t *)
gcstring_t ** | linebreak_break_from_utf8 (linebreak_t *, char *, size_t, int)
gcstring_t ** | linebreak_break_partial (linebreak_t *, unistr_t *)
void | linebreak_free_result (gcstring_t **, int)
propval_t | linebreak_lbrule (propval_t, propval_t)
void | linebreak_southeastasian_flagbreak (gcstring_t *)
unistr_t * | sombok_decode_utf8 (unistr_t *, size_t, const char *, size_t, int)
char * | sombok_encode_utf8 (char *, size_t *, size_t, unistr_t *)
gcstring_t * | linebreak_format_SIMPLE (linebreak_t *, linebreak_state_t, gcstring_t *)
gcstring_t * | linebreak_format_NEWLINE (linebreak_t *, linebreak_state_t, gcstring_t *)
gcstring_t * | linebreak_format_TRIM (linebreak_t *, linebreak_state_t, gcstring_t *)
gcstring_t * | linebreak_prep_URIBREAK (linebreak_t *, void *, unistr_t *, unistr_t *)
double | linebreak_sizing_UAX11 (linebreak_t *, double, gcstring_t *, gcstring_t *, gcstring_t *)
gcstring_t * | linebreak_urgent_ABORT (linebreak_t *, gcstring_t *)
gcstring_t * | linebreak_urgent_FORCE (linebreak_t *, gcstring_t *)

## Variables

const char * | linebreak_unicode_version
const char * | linebreak_propvals_EA []
const char * | linebreak_propvals_LB []
const char * | linebreak_southeastasian_supported

## Typedef Documentation

## linebreak_format_func_t

typedef gcstring_t*(* linebreak_format_func_t) (struct linebreak_t *, linebreak_state_t, gcstring_t *)

## linebreak_obs_prep_func_t

typedef gcstring_t*(* linebreak_obs_prep_func_t) (struct linebreak_t *, unistr_t *)

## linebreak_prep_func_t

typedef gcstring_t*(* linebreak_prep_func_t) (struct linebreak_t *, void *, unistr_t *, unistr_t *)

## linebreak_ref_func_t

typedef void(* linebreak_ref_func_t) (void *, int, int)

## linebreak_sizing_func_t

typedef double(* linebreak_sizing_func_t) (struct linebreak_t *, double, gcstring_t *, gcstring_t *, gcstring_t *)

## linebreak_urgent_func_t

typedef gcstring_t*(* linebreak_urgent_func_t) (struct linebreak_t *, gcstring_t *)

## unichar_t

typedef unsigned int unichar_t

Unicode character

## Function Documentation

## linebreak_charprop()

void linebreak_charprop | ( | linebreak_t * | obj,
|  | unichar_t | c,
|  | propval_t * | lbcptr,
|  | propval_t * | eawptr,
|  | propval_t * | gcbptr,
|  | propval_t * | scrptr
| ) |  |

Search for character properties.

Note
  this function is for internal use.

Configuration parameters of linebreak object:

- map, mapsiz: custom property map overriding built-in map.

Parameters

  [in] | obj | linebreak object.
  [in] | c | Unicode character.
  [out] | lbcptr | UAX #14 line breaking class.
  [out] | eawptr | UAX #11 East_Asian_Width property value.
  [out] | gcbptr | UAX #29 Grapheme_Cluster_Break property value.
  [out] | scrptr | Script (limited to several scripts).

Returns
  none.

Note
  As of 2.2.0, LINEBREAK_OPTION_EASTASIAN_CONTEXT and LINEBREAK_OPTION_NONSTARTER_LOOSE are not affect.

## Variable Documentation

## linebreak_propvals_EA

const char* linebreak_propvals_EA[]

## linebreak_propvals_LB

const char* linebreak_propvals_LB[]

## linebreak_unicode_version

const char* linebreak_unicode_version