|
| PanelClient () |
|
| ~PanelClient () |
|
int | open_connection (const String &config, const String &display) |
| Open socket connection to the Panel. More...
|
|
void | close_connection () |
| Close the connection to Panel. More...
|
|
int | get_connection_number () const |
| Return the connection id, which was returned by PanelClient::open_connection(). More...
|
|
bool | is_connected () const |
| Return whether this PanelClient has been connected to a Panel. More...
|
|
bool | has_pending_event () const |
| Check if there are any events available to be processed. More...
|
|
bool | filter_event () |
| Filter the events sent from Panel daemon. More...
|
|
bool | prepare (int icid) |
| Prepare the send transation for an IC. More...
|
|
bool | send () |
| Send the transaction to Panel. More...
|
|
|
void | turn_on (int icid) |
|
void | turn_off (int icid) |
|
void | update_screen (int icid, int screen) |
|
void | show_help (int icid, const String &help) |
|
void | show_factory_menu (int icid, const std::vector< PanelFactoryInfo > &menu) |
|
void | focus_in (int icid, const String &uuid) |
|
void | focus_out (int icid) |
|
void | update_factory_info (int icid, const PanelFactoryInfo &info) |
|
void | update_spot_location (int icid, int x, int y) |
|
void | show_preedit_string (int icid) |
|
void | show_aux_string (int icid) |
|
void | show_lookup_table (int icid) |
|
void | hide_preedit_string (int icid) |
|
void | hide_aux_string (int icid) |
|
void | hide_lookup_table (int icid) |
|
void | update_preedit_string (int icid, const WideString &str, const AttributeList &attrs) |
|
void | update_preedit_caret (int icid, int caret) |
|
void | update_aux_string (int icid, const WideString &str, const AttributeList &attrs) |
|
void | update_lookup_table (int icid, const LookupTable &table) |
|
void | register_properties (int icid, const PropertyList &properties) |
|
void | update_property (int icid, const Property &property) |
|
void | start_helper (int icid, const String &helper_uuid) |
|
void | stop_helper (int icid, const String &helper_uuid) |
|
void | send_helper_event (int icid, const String &helper_uuid, const Transaction &trans) |
|
void | register_input_context (int icid, const String &uuid) |
|
void | remove_input_context (int icid) |
|
|
These functions are used by FrontEnds to connect their corresponding slots to this PanelClient's signals.
The first parameter of each slot method is always "int context", which is the id of the input method context.
|
Connection | signal_connect_reload_config (PanelClientSlotVoid *slot) |
| Signal: reload configuration. More...
|
|
Connection | signal_connect_exit (PanelClientSlotVoid *slot) |
| Signal: exit the FrontEnd. More...
|
|
Connection | signal_connect_update_lookup_table_page_size (PanelClientSlotInt *slot) |
| Signal: update lookup table page size. More...
|
|
Connection | signal_connect_lookup_table_page_up (PanelClientSlotVoid *slot) |
| Signal: lookup table page up. More...
|
|
Connection | signal_connect_lookup_table_page_down (PanelClientSlotVoid *slot) |
| Signal: lookup table page down. More...
|
|
Connection | signal_connect_trigger_property (PanelClientSlotString *slot) |
| Signal: trigger property. More...
|
|
Connection | signal_connect_process_helper_event (PanelClientSlotStringStringTransaction *slot) |
| Signal: process helper event. More...
|
|
Connection | signal_connect_move_preedit_caret (PanelClientSlotInt *slot) |
| Signal: move preedit caret. More...
|
|
Connection | signal_connect_select_candidate (PanelClientSlotInt *slot) |
| Signal: select candidate. More...
|
|
Connection | signal_connect_process_key_event (PanelClientSlotKeyEvent *slot) |
| Signal: process key event. More...
|
|
Connection | signal_connect_commit_string (PanelClientSlotWideString *slot) |
| Signal: commit string. More...
|
|
Connection | signal_connect_forward_key_event (PanelClientSlotKeyEvent *slot) |
| Signal: forward key event. More...
|
|
Connection | signal_connect_request_help (PanelClientSlotVoid *slot) |
| Signal: request help. More...
|
|
Connection | signal_connect_request_factory_menu (PanelClientSlotVoid *slot) |
| Signal: request factory menu. More...
|
|
Connection | signal_connect_change_factory (PanelClientSlotString *slot) |
| Signal: change factory. More...
|
|
PanelClient is used by FrontEnd to communicate with Panel daemon.
All socket communication between FrontEnd and Panel is handled by this class. FrontEnd may just register some slots to the corresponding signals to handle the events sent from Panel.
int scim::PanelClient::open_connection |
( |
const String & |
config, |
|
|
const String & |
display |
|
) |
| |
Open socket connection to the Panel.
FrontEnd and Panel communicate with each other via the Socket created by Panel.
FrontEnd can select/poll on the connection id returned by this method to see if there are any data available to be read. If any data are available, PanelClient::filter_event() should be called to process the data.
If PanelClient::filter_event() returns false, then it means that the connection is broken and should be re-established by calling PanelClient::close_connection() and PanelClient::open_connection() again.
This method would try to launch the panel daemon and make connection again, if the connection could not be established successfully. So this method should always success, unless the panel could not be started on the certain display.
- Parameters
-
config | The config module name which should be used by launching the panel daemon. |
display | The display name which the panel daemon should run on. |
- Returns
- The id of the socket connection, -1 means connection is failed.