![]() |
![]() |
![]() |
WritRecogn Reference Manual | ![]() |
---|---|---|---|---|
gchar* inputMethod_to_string (InputMethod method); InputMethod inputMethod_parse (const char *str); InputCodeRec* inputCodeRec_new (InputMethod method, const gchar *inputCode); void inputCodeRec_free (InputCodeRec *iRec); void inputCodeRec_copy (InputCodeRec *dest, InputCodeRec *src); gchar* inputCodeRec_to_string (InputCodeRec *self); InputCodeRecList* inputCodeRecList_new (); gchar* inputCodeRecList_free (InputCodeRecList *self, gboolean free_segment); guint inputCodeRecList_size (InputCodeRecList *self); gboolean inputCodeRecList_has_inputMethod (InputCodeRecList *self, InputMethod im); gchar* inputCodeRecList_get_inputCode (InputCodeRecList *self, InputMethod im); gchar** inputCodeRecList_get_inputCode_array (InputCodeRecList *self, InputMethod im); InputCodeRec* inputCodeRecList_index (InputCodeRecList *self, guint index); void inputCodeRecList_copy (InputCodeRecList *self, InputCodeRecList *src); void inputCodeRecList_reset (InputCodeRecList *self); gint inputCodeRecList_find_inputCodeRec_index (InputCodeRecList *self, InputCodeRec *iRec); InputCodeRec* inputCodeRecList_find_inputCodeRec (InputCodeRecList *self, InputCodeRec *iRec); void inputCodeRecList_append (InputCodeRecList *self, InputCodeRec *iRec); gboolean inputCodeRecList_remove (InputCodeRecList *self, InputCodeRec *iRec);
A input code records (InputCodeRec) consists input method and corresponding input code. Functions of input method and input code record can be found here, while the data structures is located at (InputCodeRec).
gchar* inputMethod_to_string (InputMethod method);
|
input method |
Returns : |
string representation of the given input method. Return string representation of the given input method. |
InputMethod inputMethod_parse (const char *str);
|
the string to be parsed. |
Returns : |
Corresponding input method, IM_INVALID if str cannot be parsed.
|
InputCodeRec* inputCodeRec_new (InputMethod method, const gchar *inputCode);
Allocate a new input code record.
|
the input method for the new inputCodeRec. |
|
the input code for the new inputCodeRec. |
Returns : |
New inputCodeRec with given input method an input code. |
void inputCodeRec_free (InputCodeRec *iRec);
Free the given input code record.
|
the input code record. |
void inputCodeRec_copy (InputCodeRec *dest, InputCodeRec *src);
Deep copy from source input code record.
|
the destination input code record. |
|
the source input code record. |
gchar* inputCodeRec_to_string (InputCodeRec *self);
Return string representation of input code record as:
Method=method
Code=[inputCode
]
|
the input code record |
Returns : |
string representation of input code record. |
InputCodeRecList* inputCodeRecList_new ();
Returns : |
an array of input code records, It can be expended as needed. |
gchar* inputCodeRecList_free (InputCodeRecList *self, gboolean free_segment);
Free the input code record list. The behavior is similar to g_array_free
Set free_segment
to FALSE to keep the elements in the list, while free_segment
=TRUE indicates to free the elements as well.
|
the input code record list |
|
whether the elements in the list be freed as well. |
Returns : |
A pointer to the elements of the list if free_segment is FALSE; NULL otherwise.
|
guint inputCodeRecList_size (InputCodeRecList *self);
Return the number of input code records in the list.
|
the input code record list |
Returns : |
the number of input code records in the list. |
gboolean inputCodeRecList_has_inputMethod (InputCodeRecList *self, InputMethod im);
Whether the list has an input code record.
|
the input code record list |
|
input method to be searched. |
Returns : |
TRUE if at least one of the input code records have that input method; FALSE otherwise. |
gchar* inputCodeRecList_get_inputCode (InputCodeRecList *self, InputMethod im);
Return corresponding inputCode. Note: space will be used as delimiter if multiple input code records match.
|
the input code record list |
|
the inputMethod, use IM_NOT_SPECIFIED if all input codes are required. |
Returns : |
input code, separated by space. |
gchar** inputCodeRecList_get_inputCode_array (InputCodeRecList *self, InputMethod im);
A convenient call to get the array of inputCode.
Free the array using g_strfreev()
|
the input code record list |
|
the inputMethod, use IM_NOT_SPECIFIED if all input codes are required. |
Returns : |
corresponding array of inputCode |
InputCodeRec* inputCodeRecList_index (InputCodeRecList *self, guint index);
Return the input code record at the given index.
|
the input code record list |
|
the index of the input code record to be returned. |
Returns : |
the input code record in self at index given by index .
|
void inputCodeRecList_copy (InputCodeRecList *self, InputCodeRecList *src);
Deep copy from src
to self
.
|
the input code record list. |
|
the source input code record list. |
void inputCodeRecList_reset (InputCodeRecList *self);
Reset (remove all elements) the given input code record list.
|
the input code record list |
gint inputCodeRecList_find_inputCodeRec_index (InputCodeRecList *self, InputCodeRec *iRec);
Return the index of first matched input code record.
See also inputCodeRecList_find_inputCodeRec()
.
|
the input code record list |
|
the input code record to be found. |
Returns : |
the index of first matched input code record, negative if not found. |
InputCodeRec* inputCodeRecList_find_inputCodeRec (InputCodeRecList *self, InputCodeRec *iRec);
Return the first matched input code record.
See also inputCodeRecList_find_inputCodeRec_index()
.
|
the input code record list |
|
the input code record to be found. |
Returns : |
the first matched input code record, negative if not found. |
void inputCodeRecList_append (InputCodeRecList *self, InputCodeRec *iRec);
Append iRec
to the input code record list self
.
As the iRec
will be duplicated to array elements, g_free()
iRec
if it is
no longer needed.
|
the input code record list |
|
the input code record to be appended. |
gboolean inputCodeRecList_remove (InputCodeRecList *self, InputCodeRec *iRec);
Return TRUE if the input code record was in the list and removed, FALSE if iRec
was not in self
.
|
the input code record list. |
|
the input code record to be removed. |
Returns : |
TRUE if the input code record was in the list and removed, FALSE if iRec was not in self .
|