#include <scim_panel_client.h>
Public Member Functions | |
| PanelClient () | |
| ~PanelClient () | |
| int | open_connection (const String &config, const String &display) |
| Open socket connection to the Panel. | |
| void | close_connection () |
| Close the connection to Panel. | |
| int | get_connection_number () const |
| Return the connection id, which was returned by PanelClient::open_connection(). | |
| bool | is_connected () const |
| Return whether this PanelClient has been connected to a Panel. | |
| bool | has_pending_event () const |
| Check if there are any events available to be processed. | |
| bool | filter_event () |
| Filter the events sent from Panel daemon. | |
| bool | prepare (int icid) |
| Prepare the send transation for an IC. | |
| bool | send () |
| Send the transaction to Panel. | |
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.
| scim::PanelClient::PanelClient | ( | ) |
| scim::PanelClient::~PanelClient | ( | ) |
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.
| 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. |
| void scim::PanelClient::close_connection | ( | ) |
Close the connection to Panel.
| int scim::PanelClient::get_connection_number | ( | ) | const |
Return the connection id, which was returned by PanelClient::open_connection().
| bool scim::PanelClient::is_connected | ( | ) | const |
Return whether this PanelClient has been connected to a Panel.
| bool scim::PanelClient::has_pending_event | ( | ) | const |
Check if there are any events available to be processed.
If it returns true then FrontEnd should call PanelClient::filter_event() to process them.
| bool scim::PanelClient::filter_event | ( | ) |
Filter the events sent from Panel daemon.
Corresponding signal will be emitted in this method.
| bool scim::PanelClient::prepare | ( | int | icid | ) |
Prepare the send transation for an IC.
This method should be called before any events would be sent to Panel.
| icid | The id of the IC which has events to be sent to Panel. |
| bool scim::PanelClient::send | ( | ) |
Send the transaction to Panel.
| void scim::PanelClient::turn_on | ( | int | icid | ) |
| void scim::PanelClient::turn_off | ( | int | icid | ) |
| void scim::PanelClient::update_screen | ( | int | icid, | |
| int | screen | |||
| ) |
| void scim::PanelClient::show_help | ( | int | icid, | |
| const String & | help | |||
| ) |
| void scim::PanelClient::show_factory_menu | ( | int | icid, | |
| const std::vector< PanelFactoryInfo > & | menu | |||
| ) |
| void scim::PanelClient::focus_in | ( | int | icid, | |
| const String & | uuid | |||
| ) |
| void scim::PanelClient::focus_out | ( | int | icid | ) |
| void scim::PanelClient::update_factory_info | ( | int | icid, | |
| const PanelFactoryInfo & | info | |||
| ) |
| void scim::PanelClient::update_spot_location | ( | int | icid, | |
| int | x, | |||
| int | y | |||
| ) |
| void scim::PanelClient::show_preedit_string | ( | int | icid | ) |
| void scim::PanelClient::show_aux_string | ( | int | icid | ) |
| void scim::PanelClient::show_lookup_table | ( | int | icid | ) |
| void scim::PanelClient::hide_preedit_string | ( | int | icid | ) |
| void scim::PanelClient::hide_aux_string | ( | int | icid | ) |
| void scim::PanelClient::hide_lookup_table | ( | int | icid | ) |
| void scim::PanelClient::update_preedit_string | ( | int | icid, | |
| const WideString & | str, | |||
| const AttributeList & | attrs | |||
| ) |
| void scim::PanelClient::update_preedit_caret | ( | int | icid, | |
| int | caret | |||
| ) |
| void scim::PanelClient::update_aux_string | ( | int | icid, | |
| const WideString & | str, | |||
| const AttributeList & | attrs | |||
| ) |
| void scim::PanelClient::update_lookup_table | ( | int | icid, | |
| const LookupTable & | table | |||
| ) |
| void scim::PanelClient::register_properties | ( | int | icid, | |
| const PropertyList & | properties | |||
| ) |
| void scim::PanelClient::update_property | ( | int | icid, | |
| const Property & | property | |||
| ) |
| void scim::PanelClient::start_helper | ( | int | icid, | |
| const String & | helper_uuid | |||
| ) |
| void scim::PanelClient::stop_helper | ( | int | icid, | |
| const String & | helper_uuid | |||
| ) |
| void scim::PanelClient::send_helper_event | ( | int | icid, | |
| const String & | helper_uuid, | |||
| const Transaction & | trans | |||
| ) |
| void scim::PanelClient:: |