Top | ![]() |
![]() |
![]() |
![]() |
GokKeyboard *
gok_keyboard_new (void
);
Allocates memory for a new keyboard and initializes the GokKeyboard structure. Call gok_keyboard_delete on this when done with it.
GokKeyboard *
gok_keyboard_read (const gchar *Filename
);
Reads in the given keyboard file. Note: Call 'gok_keyboard_delete' on this keyboard when done with it.
void gok_keyboard_delete (GokKeyboard *pKeyboard
,gboolean bForce
);
Deletes the given keyboard. This must be called on every keyboard that has been created. Don't use the given keyboard after calling this.
void
gok_keyboard_count_rows_columns (GokKeyboard *pKeyboard
);
Counts the number of rows and columns in the keyboard and updates members of the GokKeyboard structure.
gboolean gok_keyboard_add_keys (GokKeyboard *pKeyboard
,xmlDoc *pDoc
);
Adds the keys from the given DOM to this keyboard. The keys will all be deleted when gok_keyboard_delete is called.
gboolean
gok_keyboard_get_supports_wordcomplete
(GokKeyboard *pKeyboard
);
void gok_keyboard_set_wordcomplete_keys_added (GokKeyboard *pKeyboard
,gboolean bTrueFalse
);
gboolean
gok_keyboard_get_wordcomplete_keys_added
(GokKeyboard *pKeyboard
);
gboolean gok_keyboard_display (GokKeyboard *pKeyboard
,GokKeyboard *pKeyboardCurrent
,GtkWidget *pWindowMain
,gboolean CallbackScanner
);
Displays the given keyboard in the GOK window.
xmlNode * gok_keyboard_find_node (xmlNode *pNode
,gchar *NameNode
);
void gok_keyboard_position_keys (GokKeyboard *pKeyboard
,GtkWidget *pWindow
);
Positions the keys on the keyboard. The key cell coordinates are converted into window locations.
void
gok_keyboard_initialize (void
);
Initializes global data for all keyboards. Call this once at the beginning of the program.
void gok_key_delete (GokKey *pKey
,GokKeyboard *pKeyboard
,gboolean bDeleteButton
);
Deletes the given key. This must be called on every key that has been created. Don't use the given key after calling this. This unhooks the key from the next/previous list of keys.
pKey |
Pointer to the key that gets deleted. |
|
pKeyboard |
Pointer to the keyboard that contains the key (can be NULL). If pKeyboard is not NULL then the key is unhooked from the keyboard. |
|
bDeleteButton |
Flag that determines if the GTK button associated with the key should also be deleted. This should be set to TRUE if the key is deleted while the program is running. At the end of the program, when the GOK window is destroyed and the GTK buttons are destroyed, this should be set to FALSE. |
GokKey * gok_key_new (GokKey *pKeyPrevious
,GokKey *pKeyNext
,GokKeyboard *pKeyboard
);
Allocates memory for a new key and initializes the GokKey structure. Returns a pointer to the new key, NULL if it can't be created. Call gok_key_delete on this when done with it.
gboolean gok_keyboard_layout (GokKeyboard *pKeyboard
,KeyboardLayouts layout
,KeyboardShape shape
,gboolean force
);
Arranges the keys on the keyboard. Predefined keyboards are already laid out. Runtime keyboards require this.
gboolean gok_keyboard_branch_gui (AccessibleNode *pNodeAccessible
,GokSpySearchType type
);
Displays the generic gui keyboard - currently used for widgets inside windowish things
gboolean gok_keyboard_branch_gui_actions (GokKeyboard *keyboard
,AccessibleNode *pNodeAccessible
,gint action_ndx
);
Widgets can have multiple actions - build a keyboard of them.
gboolean
gok_chunker_chunk (GokKeyboard *pKeyboard
);
Breaks the keyboard ginto chunks (rows, columns etc.). The list of chunks is stored on the keyboard
void
gok_chunker_initialize (void
);
Initializes the chunker. This must be called before using the chunker.
gboolean gok_chunker_chunk_rows_ttb (GokKeyboard *pKeyboard
,gint ChunkOrder
);
Keys are placed in the row in which they appear - starting at the top row and working towards the bottom row. If a key spans more than one row it will be placed in the topmost row it occupies. The given keyboard should not have any chunks (call gok_chunker_delete_chunks before calling this).
gboolean gok_chunker_chunk_rows_btt (GokKeyboard *pKeyboard
,gint ChunkOrder
);
Keys are placed in the row in which they appear - starting at the bottom row and working towards the top row. If a key spans more than one row it will be placed in the lowest row it occupies. The given keyboard should not have any chunks (call gok_chunker_delete_chunks before calling this).
gboolean gok_chunker_chunk_cols_ltr (GokKeyboard *pKeyboard
,gint ChunkOrder
);
Keys are placed in the column in which they appear - starting at the left column and working towards the right row. If a key spans more than one column it will be placed in the leftmost columns it occupies. The given keyboard should not have any chunks (call gok_chunker_delete_chunks before calling this).
gboolean gok_chunker_chunk_cols_rtl (GokKeyboard *pKeyboard
,gint ChunkOrder
);
Keys are placed in the column in which they appear - starting at the right row and working towards the left column. If a key spans more than one row it will be placed in the rightmost row it occupies. The given keyboard should not have any chunks (call gok_chunker_delete_chunks before calling this).
gboolean gok_chunker_chunk_recursive (GokKeyboard *pKeyboard
,gint ChunkOrder
,gint Groups
);
Breaks the keyboard into recursive groups until a group consists of only one key.
GokKey * gok_chunker_find_center (GokKeyboard *pKeyboard
,gint centerRow
,gint centerColumn
,gint *pRowsDistant
,gint *pColumnsDistant
);
Check pRowsDistant and pColumnsDistant to find out how close this key is to the center. If both pRowsDistant and pColumnsDistant are 0 then the key returned is directly at the center.
pKeyboard |
Keyboard that you want to find the center of. |
|
CenterRow |
Center row of the keyboard. |
|
CenterColumn |
Center column of the keyboard. |
|
pRowsDistant |
(out) Key returned is this number of rows away from the center. |
|
pColumnsDistant |
(out) Key returned is this number of columns away from the center. |
GokKey *
gok_keyboard_output_selectedkey (void
);
Performs the events associated with the currently selected key
gboolean
gok_keyboard_validate_dynamic_keys (Accessible *pAccessibleForeground
);
Enables or disables the keys that branch to the dynamic keyboards keyboards.
void gok_keyboard_fill_row (GokKeyboard *pKeyboard
,gint RowNumber
);
This function resizes the keys in the given row so they fill the entire row. This should be used only on keyboards that are synamically created (not predefined).
void
gok_keyboard_insert_array (GokKey *pKey
);
Adds the given key to our array in order of the rightmost key location.
void
gok_keyboard_on_window_resize (void
);
This will be called when the window has been resized. Change the key size, update the gok_data and settings dialog with the new key size. If we resize the window (by branching) then the m_bIgnoreResizeEvent flag will be set so we ignore the resize. This flag is needed because we can't get a message from the system letting us know that it was the user that resized the window.
gint gok_keyboard_get_keywidth_for_window (gint WidthWindow
,GokKeyboard *pKeyboard
);
Calculates a key width for the current keyboard given the window width.
gint gok_keyboard_get_keyheight_for_window (gint HeightWindow
,GokKeyboard *pKeyboard
);
Calculates a key height for the current keyboard given the window height.
void
gok_keyboard_set_ignore_resize (gboolean bFlag
);
Sets/clears a flag so that the next resize event will be ignored.
void gok_keyboard_set_accessible (GokKeyboard *pKeyboard
,Accessible *pAccessible
);
void
gok_keyboard_calculate_font_size (GokKeyboard *pKeyboard
);
Sets the font size for each key on the given keyboard. Each key may be assigned to a a font size group (FSG). If the FSG is not specified then the key belongs to group FONT_SIZE_GROUP_UNDEFINED. If the FSG is FONT_SIZE_GROUP_UNIQUE then the key does not belong to any group and calculate a font size for that key.
void gok_keyboard_calculate_font_size_group (GokKeyboard *pKeyboard
,gint GroupNumber
,gboolean bOverride
);
Sets the font size for each key that belongs to the given group on the given keyboard.
gboolean
gok_keyboard_update_dynamic (GokKeyboard *pKeyboard
);
Creates all the keys for the given dynamic keyboard.