TomoeChar

## TomoeChar TomoeChar — An object of character data. |

## Synopsis

    #define             TOMOE_CHAR_PRIVATE_USE_AREA_START
    #define             TOMOE_CHAR_PRIVATE_USE_AREA_END
                        TomoeChar;
    TomoeChar*          tomoe_char_new                      (void);
    TomoeChar*          tomoe_char_new_from_xml_data        (const gchar *data,
                                                             gssize len);
    const gchar*        tomoe_char_get_utf8                 (TomoeChar *chr);
    void                tomoe_char_set_utf8                 (TomoeChar *chr,
                                                             const char *utf8);
    gint                tomoe_char_get_n_strokes            (TomoeChar *chr);
    void                tomoe_char_set_n_strokes            (TomoeChar *chr,
                                                             gint n_strokes);
    const GList*        tomoe_char_get_readings             (TomoeChar *chr);
    void                tomoe_char_add_reading              (TomoeChar *chr,
                                                             TomoeReading *reading);
    const GList*        tomoe_char_get_radicals             (TomoeChar *chr);
    void                tomoe_char_add_radical              (TomoeChar *chr,
                                                             const gchar *radical);
    TomoeWriting*       tomoe_char_get_writing              (TomoeChar *chr);
    void                tomoe_char_set_writing              (TomoeChar *chr,
                                                             TomoeWriting *writing);
    const gchar*        tomoe_char_get_variant              (TomoeChar *chr);
    void                tomoe_char_set_variant              (TomoeChar *chr,
                                                             const gchar *variant);
    const gchar*        tomoe_char_get_meta_data            (TomoeChar *chr,
                                                             const gchar *key);
    void                tomoe_char_register_meta_data       (TomoeChar *chr,
                                                             const gchar *key,
                                                             const gchar *value);
    gboolean            tomoe_char_has_meta_data            (TomoeChar *chr);
    void                tomoe_char_meta_data_foreach        (TomoeChar *chr,
                                                             GHFunc func,
                                                             gpointer user_data);
    gint                tomoe_char_compare                  (const TomoeChar *a,
                                                             const TomoeChar *b);
    gchar*              tomoe_char_to_xml                   (TomoeChar *chr);

## Object Hierarchy

      GObject
       +----TomoeChar

## Properties

      "n-strokes"                gint                  : Read / Write
      "utf8"                     gchararray            : Read / Write
      "variant"                  gchararray            : Read / Write
      "writing"                  TomoeWriting          : Read / Write

## Description

## Details

### TOMOE_CHAR_PRIVATE_USE_AREA_START

    #define TOMOE_CHAR_PRIVATE_USE_AREA_START 0xE000

### TOMOE_CHAR_PRIVATE_USE_AREA_END

    #define TOMOE_CHAR_PRIVATE_USE_AREA_END   0xF8FF

### TomoeChar

    typedef struct _TomoeChar TomoeChar;

The TomoeChar struct contains only private fields and should not be directly accessed.

### tomoe_char_new ()

    TomoeChar*          tomoe_char_new                      (void);

Create a new TomoeChar.

Returns : | a new TomoeChar

### tomoe_char_new_from_xml_data ()

    TomoeChar*          tomoe_char_new_from_xml_data        (const gchar *data,
                                                             gssize len);

`data` : |
`len` : |
Returns : |

### tomoe_char_get_utf8 ()

    const gchar*        tomoe_char_get_utf8                 (TomoeChar *chr);

`chr` : |
Returns : |

### tomoe_char_set_utf8 ()

    void                tomoe_char_set_utf8                 (TomoeChar *chr,
                                                             const char *utf8);

`chr` : |
`utf8` : |

### tomoe_char_get_n_strokes ()

    gint                tomoe_char_get_n_strokes            (TomoeChar *chr);

`chr` : |
Returns : |

### tomoe_char_set_n_strokes ()

    void                tomoe_char_set_n_strokes            (TomoeChar *chr,
                                                             gint n_strokes);

`chr` : |
`n_strokes` : |

### tomoe_char_get_readings ()

    const GList*        tomoe_char_get_readings             (TomoeChar *chr);

`chr` : |
Returns : |

### tomoe_char_add_reading ()

    void                tomoe_char_add_reading              (TomoeChar *chr,
                                                             TomoeReading *reading);

`chr` : |
`reading` : |

### tomoe_char_get_radicals ()

    const GList*        tomoe_char_get_radicals             (TomoeChar *chr);

`chr` : |
Returns : |

### tomoe_char_add_radical ()

    void                tomoe_char_add_radical              (TomoeChar *chr,
                                                             const gchar *radical);

`chr` : |
`radical` : |

### tomoe_char_get_writing ()

    TomoeWriting*       tomoe_char_get_writing              (TomoeChar *chr);

`chr` : |
Returns : |

### tomoe_char_set_writing ()

    void                tomoe_char_set_writing              (TomoeChar *chr,
                                                             TomoeWriting *writing);

`chr` : |
`writing` : |

### tomoe_char_get_variant ()

    const gchar*        tomoe_char_get_variant              (TomoeChar *chr);

`chr` : |
Returns : |

### tomoe_char_set_variant ()

    void                tomoe_char_set_variant              (TomoeChar *chr,
                                                             const gchar *variant);

`chr` : |
`variant` : |

### tomoe_char_get_meta_data ()

    const gchar*        tomoe_char_get_meta_data            (TomoeChar *chr,
                                                             const gchar *key);

`chr` : |
`key` : |
Returns : |

### tomoe_char_register_meta_data ()

    void                tomoe_char_register_meta_data       (TomoeChar *chr,
                                                             const gchar *key,
                                                             const gchar *value);

`chr` : |
`key` : |
`value` : |

### tomoe_char_has_meta_data ()

    gboolean            tomoe_char_has_meta_data            (TomoeChar *chr);

`chr` : |
Returns : |

### tomoe_char_meta_data_foreach ()

    void                tomoe_char_meta_data_foreach        (TomoeChar *chr,
                                                             GHFunc func,
                                                             gpointer user_data);

`chr` : |
`func` : |
`user_data` : |

### tomoe_char_compare ()

    gint                tomoe_char_compare                  (const TomoeChar *a,
                                                             const TomoeChar *b);

Compare to TomoeChar objects with its own utf8 character.

`a` : | a TomoeChar object.
`b` : | a TomoeChar object to compare with.
Returns : | -1 a < b, 0 a= b, 1 a > b

### tomoe_char_to_xml ()

    gchar*              tomoe_char_to_xml                   (TomoeChar *chr);

`chr` : |
Returns : |

## Property Details

### The "`n-strokes`" property

      "n-strokes"                gint                  : Read / Write

Number of strokes of the character.

Allowed values: >= -1

Default value: -1

### The "`utf8`" property

      "utf8"                     gchararray            : Read / Write

UTF8 encoding of the character.

Default value: NULL

### The "`variant`" property

      "variant"                  gchararray            : Read / Write

Variant of the character.

Default value: NULL

### The "`writing`" property

      "writing"                  TomoeWriting          : Read / Write

Writing of the character.