gok-data

gok-data

Functions

Types and Values

Description

Functions

gok_data_initialize ()

void
gok_data_initialize (void);

Call this before using the Data. All data is initialized here.


gok_data_construct_setting ()

GokSetting *
gok_data_construct_setting (void);

Creates a new GokSetting structure.

Returns

A pointer to the new setting, NULL if setting was not created.


gok_data_read_settings ()

gboolean
gok_data_read_settings (void);

Reads in the settings from disk. The settings are stored in a list with the first item * in m_pSettingFirst.

Returns

TRUE if the settings were read in correctly, FALSE if not.


gok_data_write_settings ()

gboolean
gok_data_write_settings (void);


gok_data_get_setting ()

gboolean
gok_data_get_setting (gchar *NameAccessMethod,
                      gchar *NameSetting,
                      gint *Value,
                      gchar **ValueString);

Gets a value for an access method setting.

Parameters

NameAccessMethod

Name of the access method that contains the setting.

 

NameSetting

Name of the setting you want. This string may specify more than one setting with the various names seperated by '+'. In this case, only the first name will be used.

 

Value

Will contain the setting value if the function returns TRUE. This may be NULL in which case it will not be filled in.

 

ValueString

Will contain a pointer to the value string. This name be NULL in which case it will not be filled in.

 

Returns

TRUE if the GokData has the setting, FALSE if not.


gok_data_create_setting ()

gboolean
gok_data_create_setting (gchar *NameAccessMethod,
                         gchar *NameSetting,
                         gint Value,
                         gchar *pValueString);

Creates a new setting and stores it in GConf.

Parameters

NameAccessMethod

Name of the access method that uses the setting.

 

NameSetting

Name of the setting.

 

Value

Setting value.

 

Returns

TRUE if the new setting was created, FALSE if not.


gok_data_close ()

void
gok_data_close (void);

Frees any memory used by the data.


gok_data_set_setting ()

gboolean
gok_data_set_setting (gchar *NameAccessMethod,
                      gchar *NameSetting,
                      gint Value,
                      gchar *ValueString);

Sets a value for an access method.

Parameters

NameAccessMethod

Name of the access method that contains the setting.

 

NameSetting

Name of the setting you want. You may specify more than one setting by seperating the setting names by "+".

 

Value

Will contain the setting value if the function returns TRUE.

 

Returns

TRUE if the setting was changed, FALSE if not.


gok_data_get_key_width ()

gint
gok_data_get_key_width (void);

Returns

The key width.


gok_data_set_key_width ()

void
gok_data_set_key_width (gint Width);

Parameters

Width

The new key width

 

gok_data_get_key_height ()

gint
gok_data_get_key_height (void);

Returns

The key height.


gok_data_set_key_height ()

void
gok_data_set_key_height (gint Height);

Parameters

Height

The new key height.

 

gok_data_get_key_spacing ()

gint
gok_data_get_key_spacing (void);

Returns

The key spacing.


gok_data_set_key_spacing ()

void
gok_data_set_key_spacing (gint Spacing);

Parameters

Spacing

The new key spacing.

 

gok_data_get_keyboard_x ()

gint
gok_data_get_keyboard_x (void);

Returns

The horizontal location of the keyboard.


gok_data_set_keyboard_x ()

void
gok_data_set_keyboard_x (gint X);

Parameters

X

Horizontal position of the keyboard.

 

gok_data_get_keyboard_y ()

gint
gok_data_get_keyboard_y (void);

Returns

The vertical position of the keyboard.


gok_data_set_keyboard_y ()

void
gok_data_set_keyboard_y (gint Y);

Parameters

Y

Vertical position of the keyboard.

 

gok_data_get_keysize_priority ()

gboolean
gok_data_get_keysize_priority (void);

Returns

TRUE if the keyboard should use the keysize to determine the keyboard size, FALSE if not.


gok_data_set_keysize_priority ()

void
gok_data_set_keysize_priority (gboolean bFlag);

Parameters

bFlag

TRUE if the keysize should be used to determine keyboard size.

 

gok_data_get_name_accessmethod ()

char *
gok_data_get_name_accessmethod (void);

Returns

Pointer to the name of the current access method.


gok_data_set_name_accessmethod ()

void
gok_data_set_name_accessmethod (const gchar *Name);

Records the new access method and stores it in GConf.

Parameters

Name

Name of the current access method.

 

gok_data_get_wordcomplete ()

gboolean
gok_data_get_wordcomplete (void);

Returns

TRUE if word completion is turned on, FALSE if it's turned off.


gok_data_set_wordcomplete ()

void
gok_data_set_wordcomplete (gboolean bTrueFalse);

Parameters

bTrueFalse

The flag setting the word completion state.

 

gok_data_get_num_predictions ()

gint
gok_data_get_num_predictions (void);

Returns

The maximum number of word predictions.


gok_data_set_num_predictions ()

void
gok_data_set_num_predictions (gint Number);

Parameters

Number

Maximum number of word predictions.

 

gok_data_restore_settings ()

gboolean
gok_data_restore_settings (void);

Restores the values for all the settings.

Returns

TRUE if any restored setting was different from the current setting. Returns FALSE if all the restored settings are the same as the current settings.


gok_data_backup_setting ()

void
gok_data_backup_setting (GokSetting *pSetting);

Backs up the values for the given setting.

Parameters

pSetting

Pointer to the setting that will be backed up.

 

gok_data_restore_setting ()

gboolean
gok_data_restore_setting (GokSetting *pSetting);

Restores the values for the given setting.

Parameters

pSetting

Pointer to the setting that will be restored.

 

Returns

TRUE if the backup setting is different from the current setting. Returns FALSE if the backup setting is the same as the current setting.


gok_data_get_control_values ()

gboolean
gok_data_get_control_values (GokControl *pControl);

Gets the values from the settings for the given control.

Returns

TRUE if the value was updated, FALSE if not.


gok_data_get_use_gtkplus_theme ()

gboolean
gok_data_get_use_gtkplus_theme (void);

Returns

TRUE if we should use the Gtk+ theme, FALSE if we should not.


gok_data_set_use_gtkplus_theme ()

void
gok_data_set_use_gtkplus_theme (gboolean bTrueFalse);

Parameters

bTrueFalse

The flag setting whether to use the Gtk+ theme or not.

 

Types and Values

GOK_SETTINGS_FILE

#define GOK_SETTINGS_FILE "gok-settings.xml"


MAX_KEY_SPACING

#define MAX_KEY_SPACING 100


MAX_KEY_WIDTH

#define MAX_KEY_WIDTH 200


MIN_KEY_WIDTH

#define MIN_KEY_WIDTH 5


MAX_KEY_HEIGHT

#define MAX_KEY_HEIGHT 100


MIN_KEY_HEIGHT

#define MIN_KEY_HEIGHT 5