SkkDict

SkkDict — Base abstract class of dictionaries.

Synopsis

#define             SKK_TYPE_DICT
SkkCandidate **     skk_dict_split_candidates           (SkkDict *self,
                                                         const gchar *midasi,
                                                         gboolean okuri,
                                                         const gchar *line,
                                                         int *result_length1);
gchar *             skk_dict_join_candidates            (SkkDict *self,
                                                         SkkCandidate **candidates,
                                                         int candidates_length1);
void                skk_dict_reload                     (SkkDict *self,
                                                         GError **error);
SkkCandidate **     skk_dict_lookup                     (SkkDict *self,
                                                         const gchar *midasi,
                                                         gboolean okuri,
                                                         int *result_length1);
gchar **            skk_dict_complete                   (SkkDict *self,
                                                         const gchar *midasi,
                                                         int *result_length1);
gboolean            skk_dict_select_candidate           (SkkDict *self,
                                                         SkkCandidate *candidate);
gboolean            skk_dict_purge_candidate            (SkkDict *self,
                                                         SkkCandidate *candidate);
void                skk_dict_save                       (SkkDict *self,
                                                         GError **error);
gboolean            skk_dict_get_read_only              (SkkDict *self);
struct              SkkDict;
struct              SkkDictClass;
#define             SKK_TYPE_EMPTY_DICT
SkkEmptyDict *      skk_empty_dict_new                  (void);
struct              SkkEmptyDict;
struct              SkkEmptyDictClass;

Object Hierarchy

  GObject
   +----SkkDict
         +----SkkCdbDict
         +----SkkEmptyDict
         +----SkkFileDict
         +----SkkSkkServ
         +----SkkUserDict
  GObject
   +----SkkDict
         +----SkkEmptyDict

Properties

  "read-only"                gboolean              : Read
  "read-only"                gboolean              : Read

Description

Details

SKK_TYPE_DICT

#define SKK_TYPE_DICT (skk_dict_get_type ())

The type for SkkDict.


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 "/".

self :

the SkkDict instance

line :

a line consisting of candidates. [in]

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.

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.

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.

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.

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.

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.

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.

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.

self :

the SkkDict instance to query

Returns :

the value of the "read-only" property

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.

GObjectClass parent_class;

the parent class structure

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.


skk_empty_dict_new ()

SkkEmptyDict *      skk_empty_dict_new                  (void);

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.

SkkDictClass parent_class;

the parent class structure

Property Details

The "read-only" property

  "read-only"                gboolean              : Read

Flag to indicate whether the dictionary is read only.

Default value: FALSE


The "read-only" property

  "read-only"                gboolean              : Read

read-only.

Default value: FALSE