SkkDict

SkkDict — Base abstract class of dictionaries.

Functions

Properties

gboolean read-only Read
gboolean read-only Read

Types and Values

Object Hierarchy

    GObject
    ╰── SkkDict
        ├── SkkCdbDict
        ├── SkkEmptyDict
        ├── SkkFileDict
        ├── SkkSkkServ
        ╰── SkkUserDict

Description

Functions

skk_dict_reload ()

void
skk_dict_reload (SkkDict *self,
                 GError **error);

Reload the dictionary.

GError will be returned in error

when reading the dictionary failed.

Parameters

self

the SkkDict instance

 

error

location to store the error occurring, or NULL to ignore

 

skk_dict_lookup ()

SkkCandidate **
skk_dict_lookup (SkkDict *self,
                 const gchar *midasi,
                 gboolean okuri,
                 gint *result_length1);

Lookup candidates in the dictionary.

Parameters

self

the SkkDict instance

 

midasi

 .

a midasi (title) string to lookup

.

[in]

okuri

 .

whether to search okuri-ari entries or okuri-nasi entries

.

[in]

Returns

an array of Candidate

.

[array length=result_length1]


skk_dict_complete ()

gchar **
skk_dict_complete (SkkDict *self,
                   const gchar *midasi,
                   gint *result_length1);

Return an array of strings which matches midasi.

Parameters

self

the SkkDict instance

 

midasi

 .

a midasi (title) string to lookup

.

[in]

Returns

an array of strings

.

[array length=result_length1]


skk_dict_select_candidate ()

gboolean
skk_dict_select_candidate (SkkDict *self,
                           SkkCandidate *candidate);

Select a candidate in the dictionary.

Parameters

self

the SkkDict instance

 

candidate

 .

an Candidate

.

[in]

Returns

`true` if the dictionary is modified, `false` otherwise.


skk_dict_purge_candidate ()

gboolean
skk_dict_purge_candidate (SkkDict *self,
                          SkkCandidate *candidate);

Purge a candidate in the dictionary.

Parameters

self

the SkkDict instance

 

candidate

 .

an Candidate

.

[in]

Returns

`true` if the dictionary is modified, `false` otherwise.


skk_dict_save ()

void
skk_dict_save (SkkDict *self,
               GError **error);

Save the dictionary on disk.

GError will be returned in error

if the dictionary cannot be saved.

Parameters

self

the SkkDict instance

 

error

location to store the error occurring, or NULL to ignore

 

skk_dict_get_read_only ()

gboolean
skk_dict_get_read_only (SkkDict *self);

Get and return the current value of the "read-only" property.

Flag to indicate whether the dictionary is read only.

Parameters

self

the SkkDict instance to query

 

Returns

the value of the "read-only" property


skk_empty_dict_new ()

SkkEmptyDict *
skk_empty_dict_new (void);

Types and Values

SKK_TYPE_DICT

#define SKK_TYPE_DICT (skk_dict_get_type ())

The type for SkkDict.


struct SkkDict

struct SkkDict;

Base abstract class of dictionaries.


struct SkkDictClass

struct SkkDictClass {
	GObjectClass parent_class;
	void (*reload) (SkkDict* self, GError** error);
	SkkCandidate** (*lookup) (SkkDict* self, const gchar* midasi, gboolean okuri, gint* result_length1);
	gchar** (*complete) (SkkDict* self, const gchar* midasi, gint* result_length1);
	gboolean (*select_candidate) (SkkDict* self, SkkCandidate* candidate);
	gboolean (*purge_candidate) (SkkDict* self, SkkCandidate* candidate);
	void (*save) (SkkDict* self, GError** error);
	gboolean (*get_read_only) (SkkDict* self);
};

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

Members

reload ()

virtual method called by skk_dict_reload()

 

lookup ()

virtual method called by skk_dict_lookup()

 

complete ()

virtual method called by skk_dict_complete()

 

select_candidate ()

virtual method called by skk_dict_select_candidate()

 

purge_candidate ()

virtual method called by skk_dict_purge_candidate()

 

save ()

virtual method called by skk_dict_save()

 

get_read_only ()

getter method for the abstract property "read-only"

 

SKK_TYPE_EMPTY_DICT

#define SKK_TYPE_EMPTY_DICT (skk_empty_dict_get_type ())

The type for SkkEmptyDict.


struct SkkEmptyDict

struct SkkEmptyDict;

Null implementation of Dict.


struct SkkEmptyDictClass

struct SkkEmptyDictClass {
	SkkDictClass parent_class;
};

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

Members

Property Details

The “read-only” property

  “read-only”                gboolean

Flag to indicate whether the dictionary is read only.

Owner: SkkDict

Flags: Read

Default value: FALSE


The “read-only” property

  “read-only”                gboolean

read-only.

Owner: SkkEmptyDict

Flags: Read

Default value: FALSE