SkkRule

SkkRule — Object representing a typing rule.

Synopsis

#define             SKK_TYPE_RULE
SkkRule *           skk_rule_new                        (const gchar *name,
                                                         GError **error);
void                skk_rule_get_metadata               (SkkRule *self,
                                                         SkkRuleMetadata *result);
SkkRuleMetadata *   skk_rule_find_rule                  (const gchar *name);
SkkRuleMetadata *   skk_rule_list                       (int *result_length1);
struct              SkkRule;
struct              SkkRuleClass;
enum                SkkRuleParseError;
gchar *             skk_rule_metadata_locate_map_file   (SkkRuleMetadata *self,
                                                         const gchar *type,
                                                         const gchar *name);
struct              SkkRuleMetadata;
SkkRuleMetadata *   skk_rule_metadata_dup               (const SkkRuleMetadata *self);
void                skk_rule_metadata_free              (SkkRuleMetadata *self);

Object Hierarchy

  GObject
   +----SkkRule
  GBoxed
   +----SkkRuleMetadata

Properties

  "metadata"                 SkkRuleMetadata*      : Read

Description

Details

SKK_TYPE_RULE

#define SKK_TYPE_RULE (skk_rule_get_type ())

The type for SkkRule.


skk_rule_new ()

SkkRule *           skk_rule_new                        (const gchar *name,
                                                         GError **error);

Create a rule.

name :

name of the rule to load. [in]

error :

location to store the error occuring, or NULL to ignore. [error-domains SkkRuleParseError]

Returns :

a new Rule

skk_rule_get_metadata ()

void                skk_rule_get_metadata               (SkkRule *self,
                                                         SkkRuleMetadata *result);

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

self :

the SkkRule instance to query

Returns :

the value of the "metadata" property

skk_rule_find_rule ()

SkkRuleMetadata *   skk_rule_find_rule                  (const gchar *name);

Locate a rule by name.

name :

name of the rule. [in]

Returns :

a RuleMetadata or `null`

skk_rule_list ()

SkkRuleMetadata *   skk_rule_list                       (int *result_length1);

List rules.

Returns :

an array of RuleMetadata. [array length=result_length1]

struct SkkRule

struct SkkRule;

Object representing a typing rule.


struct SkkRuleClass

struct SkkRuleClass {
	GObjectClass parent_class;
};

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

GObjectClass parent_class;

the parent class structure

enum SkkRuleParseError

typedef enum {
	SKK_RULE_PARSE_ERROR_FAILED
} SkkRuleParseError;

skk_rule_metadata_locate_map_file ()

gchar *             skk_rule_metadata_locate_map_file   (SkkRuleMetadata *self,
                                                         const gchar *type,
                                                         const gchar *name);

Return the path of the map file.

self :

the SkkRuleMetadata instance

type :

type of the map file. [in]

name :

name of the map file. [in]

Returns :

the absolute path of the map file

struct SkkRuleMetadata

struct SkkRuleMetadata {
	gchar* base_dir;
	gchar* name;
	gchar* label;
	gchar* description;
	gchar* filter;
};

Object describing a rule.

gchar *base_dir;

Base directory.

gchar *name;

Name of the rule.

gchar *label;

Label string of the rule.

gchar *description;

Description of the rule.

gchar *filter;

Name of key event filter.

skk_rule_metadata_dup ()

SkkRuleMetadata *   skk_rule_metadata_dup               (const SkkRuleMetadata *self);

skk_rule_metadata_free ()

void                skk_rule_metadata_free              (SkkRuleMetadata *self);

Property Details

The "metadata" property

  "metadata"                 SkkRuleMetadata*      : Read

Metadata associated with the rule.