#include <scim_server.h>
Inheritance diagram for scim::ServerInstanceBase:
Public Member Functions | |
ServerInstanceBase (ServerFactoryBase *factory, const String &encoding, int id=-1) | |
Constructor. | |
virtual | ~ServerInstanceBase () |
Virtual destructor. | |
bool | set_encoding (const String &encoding) |
Set the working encoding for this instance. | |
String | get_encoding () const |
Get the working encoding of this instance. | |
int | get_id () const |
Get the unique id of this instance. | |
String | get_factory_uuid () const |
Get the UUID of the server factory. | |
Signal connection functions. | |
These functions are used by FrontEnds to connect their corresponding slots to this ServerInstance's signals. | |
Connection | signal_connect_show_preedit_string (ServerSlotVoid *slot) |
Connection | signal_connect_show_status_string (ServerSlotVoid *slot) |
Connection | signal_connect_show_aux_string (ServerSlotVoid *slot) |
Connection | signal_connect_show_lookup_table (ServerSlotVoid *slot) |
Connection | signal_connect_hide_preedit_string (ServerSlotVoid *slot) |
Connection | signal_connect_hide_status_string (ServerSlotVoid *slot) |
Connection | signal_connect_hide_aux_string (ServerSlotVoid *slot) |
Connection | signal_connect_hide_lookup_table (ServerSlotVoid *slot) |
Connection | signal_connect_update_preedit_caret (ServerSlotInt *slot) |
Connection | signal_connect_update_preedit_string (ServerSlotWideStringAttributeList *slot) |
Connection | signal_connect_update_status_string (ServerSlotWideStringAttributeList *slot) |
Connection | signal_connect_update_aux_string (ServerSlotWideStringAttributeList *slot) |
Connection | signal_connect_update_lookup_table (ServerSlotLookupTable *slot) |
Connection | signal_connect_commit_string (ServerSlotWideString *slot) |
Connection | signal_connect_forward_keyevent (ServerSlotKeyEvent *slot) |
Connection | signal_connect_update_full_width_punctuation (ServerSlotBool *slot) |
Connection | signal_connect_update_full_width_letter (ServerSlotBool *slot) |
Action functions. | |
These functions will be called by FrontEnds to send events to this ServerInstance. | |
virtual bool | process_key_event (const KeyEvent &key)=0 |
Process a key event. | |
virtual void | move_preedit_caret (unsigned int pos)=0 |
Move the preedit caret in the preedit string. | |
virtual void | select_lookup_table (unsigned int item)=0 |
Select the item in current lookup table. | |
virtual void | update_lookup_table_page_size (unsigned int page_size)=0 |
Update the page size of current lookup table. | |
virtual void | reset ()=0 |
Reset this server instance. | |
virtual void | focus_in ()=0 |
Focus in this server instance. | |
virtual void | focus_out ()=0 |
Focus out this server instance. | |
virtual void | toggle_full_width_punctuation ()=0 |
Toggle full/half width punctuation state. | |
virtual void | toggle_full_width_letter ()=0 |
Toggle full/half width letter state. | |
virtual void | toggle_input_status ()=0 |
Toggle the current input status of this server instance. | |
Protected Member Functions | |
Signal activation functions | |
These functions should be called by derived classes to fire the corresponding signals. The FrontEnd connected to those signals will receive and process them. | |
void | show_preedit_string () |
Show the preedit string area. | |
void | show_status_string () |
Show the status string area. | |
void | show_aux_string () |
Show the aux string area. | |
void | show_lookup_table () |
Show the lookup table area. | |
void | hide_preedit_string () |
Hide the preedit string area. | |
void | hide_status_string () |
Hide the status string area. | |
void | hide_aux_string () |
Hide the aux string area. | |
void | hide_lookup_table () |
Hide the lookup table area. | |
void | update_preedit_caret (int caret) |
Update the preedit caret position in the preedit string. | |
void | update_preedit_string (const WideString &str, const AttributeList &attrs=AttributeList()) |
Update the content of the preedit string,. | |
void | update_status_string (const WideString &str, const AttributeList &attrs=AttributeList()) |
Update the content of the status string,. | |
void | update_aux_string (const WideString &str, const AttributeList &attrs=AttributeList()) |
Update the content of the aux string,. | |
void | update_lookup_table (const LookupTable &table) |
Update the content of the lookup table,. | |
void | commit_string (const WideString &str) |
Commit a string to the client application. | |
void | forward_keyevent (const KeyEvent &key) |
Forward a key event to the client application. | |
void | update_full_width_punctuation (bool full) |
Update the punctuation input mode indicator. | |
void | update_full_width_letter (bool full) |
Update the letter input mode indicator. |
Each input method should implement a class derived from scim::ServerInstanceBase, which takes charge of recording Input Context status and processing user input events.
Definition at line 293 of file scim_server.h.
|
Constructor.
|
|
Virtual destructor.
|
|
Set the working encoding for this instance. One server instance can only support one encoding at the same time. This encoding must be supported by the ServerFactory as well.
|
|
Get the working encoding of this instance.
|
|
Get the unique id of this instance.
|
|
Get the UUID of the server factory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Process a key event.
Implemented in scim::DummyServerInstance. |
|
Move the preedit caret in the preedit string.
Implemented in scim::DummyServerInstance. |
|
Select the item in current lookup table.
Implemented in scim::DummyServerInstance. |
|
Update the page size of current lookup table. In the next time, the lookup table should page down by this size.
Implemented in scim::DummyServerInstance. |
|
Reset this server instance. All status of this server instance should be reset, including the working encoding. Implemented in scim::DummyServerInstance. |
|
Focus in this server instance. This function should update/show/hide the status area, preedit area and lookup table, and update the full width punctuation/letter state. Implemented in scim::DummyServerInstance. |
|
Focus out this server instance.
Implemented in scim::DummyServerInstance. |
|
Toggle full/half width punctuation state.
Implemented in scim::DummyServerInstance. |
|
Toggle full/half width letter state.
Implemented in scim::DummyServerInstance. |
|
Toggle the current input status of this server instance. This action will be called when the status button is pressed by user. It indicates that user want to switch among the input modes, eg. Chinese/English etc. Implemented in scim::DummyServerInstance. |
|
Show the preedit string area. The preedit string should be updated by calling update_preedit_string before or right after this call. Definition at line 500 of file scim_server.h. |
|
Show the status string area. The status string should be updated by calling update_status_string before or right after this call. Definition at line 510 of file scim_server.h. |
|
Show the aux string area. The aux string should be updated by calling update_aux_string before or right after this call. The aux string can contain any additional information whatever the input method server want. Definition at line 523 of file scim_server.h. |
|
Show the lookup table area. The lookup table should be updated by calling update_lookup_table before or right after this call. Definition at line 533 of file scim_server.h. |
|
Hide the preedit string area.
Definition at line 540 of file scim_server.h. |
|
Hide the status string area.
Definition at line 547 of file scim_server.h. |
|
Hide the aux string area.
Definition at line 554 of file scim_server.h. |
|
Hide the lookup table area.
Definition at line 561 of file scim_server.h. |
|
Update the preedit caret position in the preedit string.
Definition at line 570 of file scim_server.h. |
|
Update the content of the preedit string,.
Definition at line 580 of file scim_server.h. References scim::AttributeList, and scim::WideString. |
|
Update the content of the status string,.
Definition at line 591 of file scim_server.h. References scim::AttributeList, and scim::WideString. |
|
Update the content of the aux string,.
Definition at line 602 of file scim_server.h. References scim::AttributeList, and scim::WideString. |
|
Update the content of the lookup table,. FrontEnd may reduce the page size of the table according to screen resolution. If the page size is changed, FrontEnd will inform this server instance by calling update_lookup_table_page_size method.
Definition at line 617 of file scim_server.h. |
|
Commit a string to the client application. The preedit string should be hid before calling this method. Otherwise the clients which use OnTheSpot input mode will flicker annoyingly.
Definition at line 630 of file scim_server.h. References scim::WideString. |
|
Forward a key event to the client application.
Definition at line 639 of file scim_server.h. |
|
Update the punctuation input mode indicator.
Definition at line 648 of file scim_server.h. |
|
Update the letter input mode indicator.
Definition at line 657 of file scim_server.h. |