Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

scim::PanelClient Class Reference
[Panel]

PanelClient is used by FrontEnd to communicate with Panel daemon. More...

#include <scim_panel_client.h>

List of all members.

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.
Action methods to send events to Panel.
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)
Signal connection functions.
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.
Connection signal_connect_exit (PanelClientSlotVoid *slot)
 Signal: exit the FrontEnd.
Connection signal_connect_update_lookup_table_page_size (PanelClientSlotInt *slot)
 Signal: update lookup table page size.
Connection signal_connect_lookup_table_page_up (PanelClientSlotVoid *slot)
 Signal: lookup table page up.
Connection signal_connect_lookup_table_page_down (PanelClientSlotVoid *slot)
 Signal: lookup table page down.
Connection signal_connect_trigger_property (PanelClientSlotString *slot)
 Signal: trigger property.
Connection signal_connect_process_helper_event (PanelClientSlotStringStringTransaction *slot)
 Signal: process helper event.
Connection signal_connect_move_preedit_caret (PanelClientSlotInt *slot)
 Signal: move preedit caret.
Connection signal_connect_select_candidate (PanelClientSlotInt *slot)
 Signal: select candidate.
Connection signal_connect_process_key_event (PanelClientSlotKeyEvent *slot)
 Signal: process key event.
Connection signal_connect_commit_string (PanelClientSlotWideString *slot)
 Signal: commit string.
Connection signal_connect_forward_key_event (PanelClientSlotKeyEvent *slot)
 Signal: forward key event.
Connection signal_connect_request_help (PanelClientSlotVoid *slot)
 Signal: request help.
Connection signal_connect_request_factory_menu (PanelClientSlotVoid *slot)
 Signal: request factory menu.
Connection signal_connect_change_factory (PanelClientSlotString *slot)
 Signal: change factory.


Detailed Description

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.


Constructor & Destructor Documentation

scim::PanelClient::PanelClient  ) 
 

scim::PanelClient::~PanelClient  ) 
 


Member Function Documentation

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.

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.

Returns:
true if there are any events available.

bool scim::PanelClient::filter_event  ) 
 

Filter the events sent from Panel daemon.

Corresponding signal will be emitted in this method.

Returns:
false if the connection is broken, otherwise return true.

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.

Parameters:
icid The id of the IC which has events to be sent to Panel.
Returns:
true if the preparation is ok.

bool scim::PanelClient::send  ) 
 

Send the transaction to Panel.

Returns:
true if sent successfully.

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::register_input_context int  icid,
const String uuid
 

void scim::PanelClient::remove_input_context int  icid  ) 
 

Connection scim::PanelClient::signal_connect_reload_config PanelClientSlotVoid slot  ) 
 

Signal: reload configuration.

slot prototype: void reload_config (int context);

The context parameter is useless here.

Connection scim::PanelClient::signal_connect_exit PanelClientSlotVoid slot  ) 
 

Signal: exit the FrontEnd.

slot prototype: void exit (int context);

The context parameter is useless here.

Connection scim::PanelClient::signal_connect_update_lookup_table_page_size PanelClientSlotInt slot  ) 
 

Signal: update lookup table page size.

slot prototype: void update_lookup_table_page_size (int context, int page_size);

Connection scim::PanelClient::signal_connect_lookup_table_page_up PanelClientSlotVoid slot  ) 
 

Signal: lookup table page up.

slot prototype: void lookup_table_page_up (int context);

Connection scim::PanelClient::signal_connect_lookup_table_page_down PanelClientSlotVoid slot  ) 
 

Signal: lookup table page down.

slot prototype: void lookup_table_page_down (int context);

Connection scim::PanelClient::signal_connect_trigger_property PanelClientSlotString slot  ) 
 

Signal: trigger property.

slot prototype: void trigger_property (int context, const String &property);

Connection scim::PanelClient::signal_connect_process_helper_event PanelClientSlotStringStringTransaction slot  ) 
 

Signal: process helper event.

slot prototype: void process_helper_event (int context, const String &target_uuid, const String &helper_uuid, const Transaction &trans);

  • target_uuid is UUID of the IMEngineInstance object which should handle the events.
  • helper_uuid is UUID of the Helper which sent the events.
  • trans contains the events.

Connection scim::PanelClient::signal_connect_move_preedit_caret PanelClientSlotInt slot  ) 
 

Signal: move preedit caret.

slot prototype: void move_preedit_caret (int context, int caret_pos);

Connection scim::PanelClient::signal_connect_select_candidate PanelClientSlotInt slot  ) 
 

Signal: select candidate.

slot prototype: void select_candidate (int context, int cand_index);

Connection scim::PanelClient::signal_connect_process_key_event PanelClientSlotKeyEvent slot  ) 
 

Signal: process key event.

slot prototype: void process_key_event (int context, const KeyEvent &key);

Connection scim::PanelClient::signal_connect_commit_string PanelClientSlotWideString slot  ) 
 

Signal: commit string.

slot prototype: void commit_string (int context, const WideString &wstr);

Connection scim::PanelClient::signal_connect_forward_key_event PanelClientSlotKeyEvent slot  ) 
 

Signal: forward key event.

slot prototype: void forward_key_event (int context, const KeyEvent &key);

Connection scim::PanelClient::signal_connect_request_help PanelClientSlotVoid slot  ) 
 

Signal: request help.

slot prototype: void request_help (int context);

Connection scim::PanelClient::signal_connect_request_factory_menu PanelClientSlotVoid slot  ) 
 

Signal: request factory menu.

slot prototype: void request_factory_menu (int context);

Connection scim::PanelClient::signal_connect_change_factory PanelClientSlotString slot  ) 
 

Signal: change factory.

slot prototype: void change_factory (int context, const String &uuid);


The documentation for this class was generated from the following file:
Generated on Wed Jul 13 22:11:31 2005 for scim by  doxygen 1.4.1