|  |  |  | GOK - Gnome Onscreen Keyboard |  | 
|---|---|---|---|---|
#define GOK_PREDICTOR_MAX_VERTICES Gok_Predictor gok_predictor_open (); void gok_predictor_close (const Gok_Predictor gok_predictor); void gok_predictor_add_key (const Gok_Predictor gok_predictor, const Command_Vertex_Data vertex_data); const Arraylist gok_predictor_get (const Gok_Predictor gok_predictor, const int num_predictions, const char *keyboard_id, const Prediction_Algorithm algorithm); void gok_predictor_remove_keyboard (const Gok_Predictor gok_predictor, const char *keyboard_id); void gok_predictor_remove_key (const Gok_Predictor gok_predictor, const Command_Vertex_Data vertex_data); void gok_predictor_on (gboolean bOnOff); void gok_predictor_change_number_predictions (int Number); gboolean gok_predictor_add_prediction_keys (GokKeyboard *pKeyboard); int gok_predictor_predict (Gok_Predictor gP); GokKey* gok_predictor_get_real (gchar *pKeyboardName, gchar *pKeyLabel); void gok_predictor_log (Gok_Predictor gP, gchar *keyboardID, gchar *keyID); Gok_Predictor gok_main_get_command_predictor (void);
Gok_Predictor gok_predictor_open ();
Initialization function. If a session file exists, it will recreate the previous state.
| Returns : | a new Gok_Predictor object. | 
void gok_predictor_close (const Gok_Predictor gok_predictor);
Tear down function. Releases the resources used by a Gok_Predictor object. Also dumps the data to a session file.
| gok_predictor: | the instance of Gok_Predictor object to destroy | 
void        gok_predictor_add_key           (const Gok_Predictor gok_predictor,
                                             const Command_Vertex_Data vertex_data);
Adds a key to be used for upcoming predictions.
| gok_predictor: | the instance of Gok_Predictor object | 
| vertex_data: | a Command_Vertex_Data object that is created by command_vertex_data_create(char *keyboard_id, char *key_id, COMMAND_VERTEX_DATA_DEFAULT_WEIGHT) | 
const Arraylist gok_predictor_get           (const Gok_Predictor gok_predictor,
                                             const int num_predictions,
                                             const char *keyboard_id,
                                             const Prediction_Algorithm algorithm);
Gets the next n predictions according to the algorithm.
| gok_predictor: | the instance of Gok_Predictor object | 
| num_predictions: | number of key predictions to return | 
| keyboard_id: | NOT IMPLEMENTED | 
| algorithm: | an enumerated type that defines the algorithm used for the prediction | 
| Returns : | an Arraylist of Command_Vertex_Data objects | 
void        gok_predictor_remove_keyboard   (const Gok_Predictor gok_predictor,
                                             const char *keyboard_id);
Function to remove a whole keyboard from the prediction.
| gok_predictor: | the instance of Gok_Predictor object | 
| keyboard_id: | id of keyboard to remove from prediction | 
void        gok_predictor_remove_key        (const Gok_Predictor gok_predictor,
                                             const Command_Vertex_Data vertex_data);
Function to remove a key from the prediction.
| gok_predictor: | the instance of Gok_Predictor object | 
| vertex_data: | a Command_Vertex_Data object that is created by command_vertex_data_create(char *keyboard_id, char *key_id, COMMAND_VERTEX_DATA_DEFAULT_WEIGHT) | 
void gok_predictor_on (gboolean bOnOff);
Turns on (or off) the predictor. This adds (or removes) the predictor keys to every keyboard that supports command prediction.
| bOnOff: | 
void        gok_predictor_change_number_predictions
                                            (int Number);
Number: Number of prediction keys.
Changes the number of word prediction keys displayed on the keyboard. This should be called after the user has selected a new number from the settings dialog.
| Number: | 
gboolean    gok_predictor_add_prediction_keys
                                            (GokKeyboard *pKeyboard);
pKeyboard: Pointer to the keyboard that gets the new prediction keys.
Adds a row of prediction keys to the given keyboard.
| pKeyboard: | |
| Returns : | TRUE if the prediction keys were added, FALSE if not. | 
int gok_predictor_predict (Gok_Predictor gP);
Makes a prediction. If the currently displayed keyboard is showing prediction keys then they are filled in with the predictions.
| gP: | |
| Returns : | The number of words predicted. | 
GokKey*     gok_predictor_get_real          (gchar *pKeyboardName,
                                             gchar *pKeyLabel);
| pKeyboardName: | |
| pKeyLabel: | |
| Returns : | 
void        gok_predictor_log               (Gok_Predictor gP,
                                             gchar *keyboardID,
                                             gchar *keyID);
| gP: | |
| keyboardID: | |
| keyID: |