SkkRomKanaConverter

SkkRomKanaConverter — Romaji-to-kana converter.

Synopsis

#define             SKK_TYPE_ROM_KANA_CONVERTER
gboolean            skk_rom_kana_converter_is_valid     (SkkRomKanaConverter *self,
                                                         gunichar uc);
gboolean            skk_rom_kana_converter_output_nn_if_any
                                                        (SkkRomKanaConverter *self);
void                skk_rom_kana_converter_append_text  (SkkRomKanaConverter *self,
                                                         const gchar *text);
gboolean            skk_rom_kana_converter_append       (SkkRomKanaConverter *self,
                                                         gunichar uc);
gboolean            skk_rom_kana_converter_can_consume  (SkkRomKanaConverter *self,
                                                         gunichar uc,
                                                         gboolean preedit_only,
                                                         gboolean no_carryover);
void                skk_rom_kana_converter_reset        (SkkRomKanaConverter *self);
gboolean            skk_rom_kana_converter_delete       (SkkRomKanaConverter *self);
SkkRomKanaConverter * skk_rom_kana_converter_new        (void);
SkkKanaMode         skk_rom_kana_converter_get_kana_mode
                                                        (SkkRomKanaConverter *self);
void                skk_rom_kana_converter_set_kana_mode
                                                        (SkkRomKanaConverter *self,
                                                         SkkKanaMode value);
SkkPeriodStyle      skk_rom_kana_converter_get_period_style
                                                        (SkkRomKanaConverter *self);
void                skk_rom_kana_converter_set_period_style
                                                        (SkkRomKanaConverter *self,
                                                         SkkPeriodStyle value);
const gchar *       skk_rom_kana_converter_get_output   (SkkRomKanaConverter *self);
const gchar *       skk_rom_kana_converter_get_preedit  (SkkRomKanaConverter *self);
struct              SkkRomKanaConverter;
struct              SkkRomKanaConverterClass;
enum                SkkKanaMode;
enum                SkkPeriodStyle;

Object Hierarchy

  GObject
   +----SkkRomKanaConverter
  GEnum
   +----SkkKanaMode
  GEnum
   +----SkkPeriodStyle

Properties

  "kana-mode"                SkkKanaMode           : Read / Write
  "output"                   gchar*                : Read / Write
  "period-style"             SkkPeriodStyle        : Read / Write
  "preedit"                  gchar*                : Read
  "rule"                     SkkRomKanaMapFile*    : Read / Write

Description

Details

SKK_TYPE_ROM_KANA_CONVERTER

#define SKK_TYPE_ROM_KANA_CONVERTER (skk_rom_kana_converter_get_type ())

The type for SkkRomKanaConverter.


skk_rom_kana_converter_is_valid ()

gboolean            skk_rom_kana_converter_is_valid     (SkkRomKanaConverter *self,
                                                         gunichar uc);

self :

the SkkRomKanaConverter instance

skk_rom_kana_converter_output_nn_if_any ()

gboolean            skk_rom_kana_converter_output_nn_if_any
                                                        (SkkRomKanaConverter *self);

Output "nn" if preedit ends with "n".

self :

the SkkRomKanaConverter instance

skk_rom_kana_converter_append_text ()

void                skk_rom_kana_converter_append_text  (SkkRomKanaConverter *self,
                                                         const gchar *text);

Append text to the internal buffer.

self :

the SkkRomKanaConverter instance

text :

a string. [in]

skk_rom_kana_converter_append ()

gboolean            skk_rom_kana_converter_append       (SkkRomKanaConverter *self,
                                                         gunichar uc);

Append a character to the internal buffer.

self :

the SkkRomKanaConverter instance

uc :

an ASCII character. [in]

Returns :

`true` if the character is handled, `false` otherwise

skk_rom_kana_converter_can_consume ()

gboolean            skk_rom_kana_converter_can_consume  (SkkRomKanaConverter *self,
                                                         gunichar uc,
                                                         gboolean preedit_only,
                                                         gboolean no_carryover);

Check if a character will be consumed by the current conversion.

self :

the SkkRomKanaConverter instance

uc :

an ASCII character. [in]

preedit_only :

only checks if preedit is active. [in]

no_carryover :

return false if there will be carryover. [in]

Returns :

`true` if the character can be consumed

skk_rom_kana_converter_reset ()

void                skk_rom_kana_converter_reset        (SkkRomKanaConverter *self);

Reset the internal state of the converter.

self :

the SkkRomKanaConverter instance

skk_rom_kana_converter_delete ()

gboolean            skk_rom_kana_converter_delete       (SkkRomKanaConverter *self);

Delete the trailing character from the internal buffer.

self :

the SkkRomKanaConverter instance

Returns :

`true` if any character is removed, `false` otherwise

skk_rom_kana_converter_new ()

SkkRomKanaConverter * skk_rom_kana_converter_new        (void);

skk_rom_kana_converter_get_kana_mode ()

SkkKanaMode         skk_rom_kana_converter_get_kana_mode
                                                        (SkkRomKanaConverter *self);

Get and return the current value of the "kana-mode" property.

self :

the SkkRomKanaConverter instance to query

Returns :

the value of the "kana-mode" property

skk_rom_kana_converter_set_kana_mode ()

void                skk_rom_kana_converter_set_kana_mode
                                                        (SkkRomKanaConverter *self,
                                                         SkkKanaMode value);

Set the value of the "kana-mode" property to value.

self :

the SkkRomKanaConverter instance to modify

value :

the new value of the "kana-mode" property

skk_rom_kana_converter_get_period_style ()

SkkPeriodStyle      skk_rom_kana_converter_get_period_style
                                                        (SkkRomKanaConverter *self);

Get and return the current value of the "period-style" property.

self :

the SkkRomKanaConverter instance to query

Returns :

the value of the "period-style" property

skk_rom_kana_converter_set_period_style ()

void                skk_rom_kana_converter_set_period_style
                                                        (SkkRomKanaConverter *self,
                                                         SkkPeriodStyle value);

Set the value of the "period-style" property to value.

self :

the SkkRomKanaConverter instance to modify

value :

the new value of the "period-style" property

skk_rom_kana_converter_get_output ()

const gchar *       skk_rom_kana_converter_get_output   (SkkRomKanaConverter *self);

Get and return the current value of the "output" property.

self :

the SkkRomKanaConverter instance to query

Returns :

the value of the "output" property

skk_rom_kana_converter_get_preedit ()

const gchar *       skk_rom_kana_converter_get_preedit  (SkkRomKanaConverter *self);

Get and return the current value of the "preedit" property.

self :

the SkkRomKanaConverter instance to query

Returns :

the value of the "preedit" property

struct SkkRomKanaConverter

struct SkkRomKanaConverter;

Romaji-to-kana converter.


struct SkkRomKanaConverterClass

struct SkkRomKanaConverterClass {
	GObjectClass parent_class;
};

The class structure for SKK_TYPE_ROM_KANA_CONVERTER. All the fields in this structure are private and should never be accessed directly.

GObjectClass parent_class;

the parent class structure

enum SkkKanaMode

typedef enum {
	SKK_KANA_MODE_HIRAGANA,
	SKK_KANA_MODE_KATAKANA,
	SKK_KANA_MODE_HANKAKU_KATAKANA
} SkkKanaMode;

Type representing kana scripts.

SKK_KANA_MODE_HIRAGANA

Hiragana like "あいう...".

SKK_KANA_MODE_KATAKANA

Katakana like "アイウ...".

SKK_KANA_MODE_HANKAKU_KATAKANA

Half-width katakana like "アイウ...".

enum SkkPeriodStyle

typedef enum {
	SKK_PERIOD_STYLE_JA_JA,
	SKK_PERIOD_STYLE_EN_EN,
	SKK_PERIOD_STYLE_JA_EN,
	SKK_PERIOD_STYLE_EN_JA
} SkkPeriodStyle;

Type to specify how "." and "," are converted.

SKK_PERIOD_STYLE_JA_JA

Use "。" and "、" for "." and ",".

SKK_PERIOD_STYLE_EN_EN

Use "." and "," for "." and ",".

SKK_PERIOD_STYLE_JA_EN

Use "。" and "," for "." and ",".

SKK_PERIOD_STYLE_EN_JA

Use "." and "、" for "." and ",".

Property Details

The "kana-mode" property

  "kana-mode"                SkkKanaMode           : Read / Write

kana-mode.

Default value: SKK_KANA_MODE_HIRAGANA


The "output" property

  "output"                   gchar*                : Read / Write

output.

Default value: NULL


The "period-style" property

  "period-style"             SkkPeriodStyle        : Read / Write

period-style.

Default value: SKK_PERIOD_STYLE_JA_JA


The "preedit" property

  "preedit"                  gchar*                : Read

preedit.

Default value: NULL


The "rule" property

  "rule"                     SkkRomKanaMapFile*    : Read / Write

rule.