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_split_candidates ()

SkkCandidate **
skk_dict_split_candidates (SkkDict *self,
                           const gchar *midasi,
                           gboolean okuri,
                           const gchar *line,
                           int *result_length1);

Parse a line consisting of candidates separated by "/".

Parameters

self

the SkkDict instance

 

line

 .

a line consisting of candidates

.

[in]

midasi

 

 

okuri

 

 

Returns

an array of Candidates

.

[array length=result_length1]


skk_dict_join_candidates ()

gchar *
skk_dict_join_candidates (SkkDict *self,
                          SkkCandidate **candidates,
                          int candidates_length1);

Format an array of Candidates to be saved in a dictionary file.

Parameters

self

the SkkDict instance

 

candidates

 .

an array of Candidate

.

[in][array length=candidates_length1]

candidates_length1

length of the candidates array

 

Returns

a string


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 occuring, or NULL to ignore

 

skk_dict_lookup ()

SkkCandidate **
skk_dict_lookup (SkkDict *self,
                 const gchar *midasi,
                 gboolean okuri,
                 int *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,
                   int *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 occuring, 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, int* result_length1);
	gchar** (*complete) (SkkDict* self, const gchar* midasi, int* 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.

Flags: Read

Default value: FALSE


The “read-only” property

  “read-only”                gboolean

read-only.

Flags: Read

Default value: FALSE