3 * @brief Defines scim::HelperAgent and it's related types.
5 * scim::HelperAgent is a class used to write Client Helper modules.
9 /* ISF is based on SCIM 1.4.7 and extended for supporting more mobile fitable. */
12 * Smart Common Input Method
14 * Copyright (c) 2004-2005 James Su <suzhe@tsinghua.org.cn>
15 * Copyright (c) 2012-2015 Samsung Electronics Co., Ltd.
18 * This library is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU Lesser General Public
20 * License as published by the Free Software Foundation; either
21 * version 2 of the License, or (at your option) any later version.
23 * This library is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU Lesser General Public License for more details.
28 * You should have received a copy of the GNU Lesser General Public
29 * License along with this program; if not, write to the
30 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
31 * Boston, MA 02111-1307 USA
33 * Modifications by Samsung Electronics Co., Ltd.
34 * 1. Add new interface APIs for keyboard ISE
35 * a. expand_candidate (), contract_candidate () and set_candidate_style ()
36 * b. set_keyboard_ise_by_uuid () and reset_keyboard_ise ()
37 * c. get_surrounding_text () and delete_surrounding_text ()
38 * d. show_preedit_string (), hide_preedit_string (), update_preedit_string () and update_preedit_caret ()
39 * e. show_candidate_string (), hide_candidate_string () and update_candidate_string ()
41 * $Id: scim_helper.h,v 1.16 2005/05/24 12:22:51 suzhe Exp $
44 #ifndef __SCIM_HELPER_H
45 #define __SCIM_HELPER_H
47 #include "scim_utility.h"
49 #ifndef SCIM_HELPER_LAUNCHER_PROGRAM
50 #define SCIM_HELPER_LAUNCHER_PROGRAM (SCIM_LIBEXECDIR "/scim-helper-launcher")
57 * @ingroup InputServiceFramework
58 * The accessory classes to help develop and manage Client Helper objects.
61 class EXAPI HelperError: public Exception
64 HelperError (const String& what_arg)
65 : Exception (String("scim::Helper: ") + what_arg) { }
69 * @brief Helper option indicates that it's a stand alone Helper.
71 * Stand alone Helper has no corresponding IMEngine Factory,
72 * Such Helper can not be started by IMEngine Factory.
73 * So Panel must provide a menu, or something else, which contains
74 * all stand alone Helper items, so that user can start them by
77 const uint32 SCIM_HELPER_STAND_ALONE = 1;
80 * @brief Helper option indicates that it must be started
81 * automatically when Panel starts.
83 * If Helper objects want to start itself as soon as
84 * the Panel starts, set this option.
86 const uint32 SCIM_HELPER_AUTO_START = (1<<1);
89 * @brief Helper option indicates that it should be restarted
90 * when it exits abnormally.
92 * This option should not be used with #SCIM_HELPER_STAND_ALONE.
94 const uint32 SCIM_HELPER_AUTO_RESTART = (1<<2);
97 * @brief Helper option indicates that it needs the screen update
100 * Helper object with this option will receive the UPDATE_SCREEN event
101 * when the screen of focused ic is changed.
103 const uint32 SCIM_HELPER_NEED_SCREEN_INFO = (1<<3);
106 * @brief Helper option indicates that it needs the spot location
109 * Helper object with this option will receive the SPOT_LOCATION_INFO event
110 * when the spot location of focused ic is changed.
112 const uint32 SCIM_HELPER_NEED_SPOT_LOCATION_INFO = (1<<4);
115 * @brief ISE option indicates whether helper ISE handles the keyboard keyevent
117 const uint32 ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT = (1<<16);
120 * @brief ISE option indicates whether it should be hidden in control panel.
122 const uint32 ISM_ISE_HIDE_IN_CONTROL_PANEL = (1<<17);
125 * @brief ISE option for 3rd party; IMEngine is not available.
127 const uint32 ISM_HELPER_WITHOUT_IMENGINE = (1<<18);
130 * @brief Structure to hold the information of a Helper object.
134 String uuid; /**< The UUID of this Helper object, replaced with Application ID since tizen 2.4 */
135 String name; /**< The Name of this Helper object, UTF-8 encoding. Deprecated since tizen 2.4 */
136 String icon; /**< The Icon file path of this Helper object. Deprecated since tizen 2.4 */
137 String description; /**< The short description of this Helper object. Deprecated since tizen 2.4 */
138 uint32 option; /**< The options of this Helper object. @sa #SCIM_HELPER_STAND_ALONE etc. Deprecated since tizen 2.4 */
140 HelperInfo (const String &puuid = String (),
141 const String &pname = String (),
142 const String &picon = String (),
143 const String &pdesc = String (),
163 typedef Slot3<void, const HelperAgent *, int, const String &>
166 typedef Slot4<void, const HelperAgent *, int, const String &, const String &>
167 HelperAgentSlotString;
169 typedef Slot4<void, const HelperAgent *, int, const String &, const std::vector<String> &>
170 HelperAgentSlotStringVector;
172 typedef Slot5<void, const HelperAgent *, int, const String &, const String &, const String &>
173 HelperAgentSlotString2;
175 typedef Slot4<void, const HelperAgent *, int, const String &, int>
178 typedef Slot5<void, const HelperAgent *, int, const String &, int, int>
179 HelperAgentSlotIntInt;
181 typedef Slot4<void, const HelperAgent *, int, const String &, const Transaction &>
182 HelperAgentSlotTransaction;
184 typedef Slot4<void, const HelperAgent *, int, const String &, const rectinfo &>
187 typedef Slot2<void, const HelperAgent *, struct rectinfo &>
190 typedef Slot2<void, const HelperAgent *, uint32 &>
191 HelperAgentSlotUintVoid;
193 typedef Slot3<void, const HelperAgent *, int, uint32 &>
194 HelperAgentSlotIntUint;
196 typedef Slot3<void, const HelperAgent *, char *, size_t &>
197 HelperAgentSlotRawVoid;
199 typedef Slot3<void, const HelperAgent *, char **, size_t &>
200 HelperAgentSlotGetRawVoid;
202 typedef Slot4<void, const HelperAgent *, int, char *, size_t &>
203 HelperAgentSlotIntRawVoid;
205 typedef Slot3<void, const HelperAgent *, int, char **>
206 HelperAgentSlotIntGetStringVoid;
208 typedef Slot2<void, const HelperAgent *, const std::vector<uint32> &>
209 HelperAgentSlotUintVector;
211 typedef Slot2<void, const HelperAgent *, LookupTable &>
212 HelperAgentSlotLookupTable;
214 typedef Slot3<void, const HelperAgent *, KeyEvent &, uint32 &>
215 HelperAgentSlotKeyEventUint;
217 typedef Slot3<void, const HelperAgent *, KeyEvent &, uint32>
218 HelperAgentSlotKeyEventUint2;
220 typedef Slot4<void, const HelperAgent *, KeyEvent &, uint32 &, uint32>
221 HelperAgentSlotKeyEventUintUint;
223 typedef Slot5<void, const HelperAgent *, uint32 &, char *, size_t &, uint32 &>
224 HelperAgentSlotUintCharSizeUint;
226 typedef Slot2<void, const HelperAgent *, const String &>
227 HelperAgentSlotStringVoid;
230 * @brief The accessory class to write a Helper object.
232 * This class implements all Socket Transaction protocol between
233 * Helper object and Panel.
235 class EXAPI HelperAgent
237 class HelperAgentImpl;
238 HelperAgentImpl *m_impl;
240 HelperAgent (const HelperAgent &);
241 const HelperAgent & operator = (const HelperAgent &);
248 * @brief Open socket connection to the Panel.
250 * Helper objects and Panel communicate with each other via the Socket
251 * created by Panel, just same as the Socket between FrontEnds and Panel.
253 * Helper object can select/poll on the connection id returned by this function
254 * to see if there are any data available to be read. If any data are available,
255 * Helper object should call HelperAgent::filter_event() to process the data.
257 * This method should be called after the necessary signal-slots are connected.
258 * If this Helper is started by an IMEngine Instance, then signal attach_input_context
259 * will be emitted during this call.
261 * Signal update_screen will be emitted during this call as well to set the startup
262 * screen of this Helper. The ic and ic_uuid parameters are invalid here.
264 * @param info The information of this Helper object.
265 * @param display The display which this Helper object should run on.
267 * @return The connection socket id. -1 means failed to create
270 int open_connection (const HelperInfo &info,
271 const String &display);
274 * @brief Close the socket connection to Panel.
276 void close_connection ();
279 * @brief Get the connection id previously returned by open_connection().
281 * @return the connection id
283 int get_connection_number () const;
286 * @brief Check whether this HelperAgent has been connected to a Panel.
288 * Return true when it is connected to panel, otherwise return false.
290 bool is_connected () const;
293 * @brief Check if there are any events available to be processed.
295 * If it returns true then Helper object should call
296 * HelperAgent::filter_event() to process them.
298 * @return true if there are any events available.
300 bool has_pending_event () const;
303 * @brief Process the pending events.
305 * This function will emit the corresponding signals according
308 * @return false if the connection is broken, otherwise return true.
310 bool filter_event ();
313 * @brief Read messages from socket buffer, and see if there is a message with the given cmd.
315 * @return false if the connection is broken, or no message available with given cmd. Otherwise return true.
317 bool wait_for_message (int cmd, int timeout);
320 * @brief Process one message that is in our message queue.
322 * This function will emit the corresponding signals according
325 * @param message The message that needs to be handled.
327 * @return false if the connection is broken, otherwise return true.
329 bool handle_message (MessageItem *message);
332 * @brief Request SCIM to reload all configuration.
334 * This function should only by used by Setup Helper to request
335 * scim's reloading the configuration.
337 void reload_config () const;
340 * @brief Register some properties into Panel.
342 * This function send the request to Panel to register a list
345 * @param properties The list of Properties to be registered into Panel.
347 * @sa scim::Property.
349 void register_properties (const PropertyList &properties) const;
352 * @brief Update a registered property.
354 * @param property The property to be updated.
356 void update_property (const Property &property) const;
359 * @brief Send a set of events to an IMEngineInstance.
361 * All events should be put into a Transaction.
362 * And the events can only be received by one IMEngineInstance object.
364 * @param ic The handle of the Input Context to receive the events.
365 * @param ic_uuid The UUID of the Input Context.
366 * @param trans The Transaction object holds the events.
368 void send_imengine_event (int ic,
369 const String &ic_uuid,
370 const Transaction &trans) const;
373 * @brief Send a KeyEvent to an IMEngineInstance.
375 * @param ic The handle of the IMEngineInstance to receive the event.
376 * -1 means the currently focused IMEngineInstance.
377 * @param ic_uuid The UUID of the IMEngineInstance. Empty means don't match.
378 * @param key The KeyEvent to be sent.
380 void send_key_event (int ic,
381 const String &ic_uuid,
382 const KeyEvent &key) const;
385 * @brief Forward a KeyEvent to client application directly.
387 * @param ic The handle of the client Input Context to receive the event.
388 * -1 means the currently focused Input Context.
389 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
390 * Empty means don't match.
391 * @param key The KeyEvent to be forwarded.
393 void forward_key_event (int ic,
394 const String &ic_uuid,
395 const KeyEvent &key) const;
398 * @brief Commit a WideString to client application directly.
400 * @param ic The handle of the client Input Context to receive the WideString.
401 * -1 means the currently focused Input Context.
402 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
403 * Empty means don't match.
404 * @param wstr The WideString to be committed.
406 void commit_string (int ic,
407 const String &ic_uuid,
408 const WideString &wstr) const;
411 * @brief Commit a UTF-8 String to client application directly.
413 * @param ic The handle of the client Input Context to receive the commit string.
414 * -1 means the currently focused Input Context.
415 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
416 * Empty means don't match.
417 * @param buf The byte array of UTF-8 string to be committed.
418 * @param buflen The buf size in bytes.
420 void commit_string (int ic,
421 const String &ic_uuid,
426 * @brief Request to show preedit string.
428 * @param ic The handle of the client Input Context to receive the request.
429 * -1 means the currently focused Input Context.
430 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
431 * Empty means don't match.
433 void show_preedit_string (int ic,
434 const String &ic_uuid) const;
437 * @brief Request to show aux string.
439 void show_aux_string (void) const;
442 * @brief Request to show candidate string.
444 void show_candidate_string (void) const;
447 * @brief Request to show associate string.
449 void show_associate_string (void) const;
452 * @brief Request to hide preedit string.
454 * @param ic The handle of the client Input Context to receive the request.
455 * -1 means the currently focused Input Context.
456 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
457 * Empty means don't match.
459 void hide_preedit_string (int ic,
460 const String &ic_uuid) const;
463 * @brief Request to hide aux string.
465 void hide_aux_string (void) const;
468 * @brief Request to hide candidate string.
470 void hide_candidate_string (void) const;
473 * @brief Request to hide associate string.
475 void hide_associate_string (void) const;
478 * @brief Update a new WideString for preedit.
480 * @param ic The handle of the client Input Context to receive the WideString.
481 * -1 means the currently focused Input Context.
482 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
483 * Empty means don't match.
484 * @param wstr The WideString to be updated.
485 * @param attrs The attribute list for preedit string.
487 void update_preedit_string (int ic,
488 const String &ic_uuid,
489 const WideString &wstr,
490 const AttributeList &attrs) const;
493 * @brief Update a new UTF-8 string for preedit.
495 * @param ic The handle of the client Input Context to receive the UTF-8 String.
496 * -1 means the currently focused Input Context.
497 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
498 * Empty means don't match.
499 * @param buf The byte array of UTF-8 string to be updated.
500 * @param buflen The buf size in bytes.
501 * @param attrs The attribute list for preedit string.
503 void update_preedit_string (int ic,
504 const String &ic_uuid,
507 const AttributeList &attrs) const;
510 * @brief Update a new WideString and caret for preedit.
512 * @param ic The handle of the client Input Context to receive the WideString.
513 * -1 means the currently focused Input Context.
514 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
515 * Empty means don't match.
516 * @param wstr The WideString to be updated.
517 * @param attrs The attribute list for preedit string.
518 * @param caret The caret position in preedit string.
520 void update_preedit_string (int ic,
521 const String &ic_uuid,
522 const WideString &wstr,
523 const AttributeList &attrs,
527 * @brief Update a new UTF-8 string and caret for preedit.
529 * @param ic The handle of the client Input Context to receive the UTF-8 String.
530 * -1 means the currently focused Input Context.
531 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
532 * Empty means don't match.
533 * @param buf The byte array of UTF-8 string to be updated.
534 * @param buflen The buf size in bytes.
535 * @param attrs The attribute list for preedit string.
536 * @param caret The caret position in preedit string.
538 void update_preedit_string (int ic,
539 const String &ic_uuid,
542 const AttributeList &attrs,
546 * @brief Update a new WideString and caret for preedit.
548 * @param ic The handle of the client Input Context to receive the WideString.
549 * -1 means the currently focused Input Context.
550 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
551 * Empty means don't match.
552 * @param preedit The WideString to be updated.
553 * @param commit The WideString to be commited on reset.
554 * @param attrs The attribute list for preedit string.
555 * @param caret The caret position in preedit string.
557 * The commit string can be used to replace the preedit string on reset
558 * for example on unfocus.
561 void update_preedit_string (int ic,
562 const String &ic_uuid,
563 const WideString &preedit,
564 const WideString &commit,
565 const AttributeList &attrs,
569 * @brief Update a new string for aux.
571 * @param str The string to be updated.
572 * @param attrs The attribute list for aux string.
574 void update_aux_string (const String &str,
575 const AttributeList &attrs) const;
578 * @brief Request to update candidate.
580 * @param table The lookup table for candidate.
582 void update_candidate_string (const LookupTable &table) const;
585 * @brief Request to update associate.
587 * @param table The lookup table for associate.
589 void update_associate_string (const LookupTable &table) const;
592 * @brief When the input context of ISE is changed,
593 * ISE can call this function to notify application
595 * @param type type of event.
596 * @param value value of event.
598 void update_input_context (uint32 type,
602 * @brief Request to get surrounding text asynchronously.
604 * @param uuid The helper ISE UUID.
605 * @param maxlen_before The max length of before.
606 * @param maxlen_after The max length of after.
608 void get_surrounding_text (const String &uuid,
610 int maxlen_after) const;
613 * @brief Request to get surrounding text synchronously.
615 * @param maxlen_before The max length of before.
616 * @param maxlen_after The max length of after.
617 * @param text The surounding text.
618 * @param cursor The cursor position.
620 void get_surrounding_text (int maxlen_before, int maxlen_after, String &text, int &cursor);
623 * @brief Request to delete surrounding text.
625 * @param offset The offset for cursor position.
626 * @param len The length for delete text.
628 void delete_surrounding_text (int offset,
632 * @brief Request to get selection.
634 * @param uuid The helper ISE UUID.
636 void get_selection (const String &uuid) const;
639 * @brief Request to get selection text synchronously.
641 * @param text The selection text.
643 void get_selection_text (String &text);
646 * @brief Request to selected text.
648 * @param start The start position in text.
649 * @param end The end position in text.
651 void set_selection (int start,
655 * @brief Set candidate position in screen.
657 * @param left The x position in screen.
658 * @param top The y position in screen.
660 void set_candidate_position (int left,
664 * @brief Request to hide candidate window.
666 void candidate_hide (void) const;
669 * @brief Request to get candidate window size and position.
671 * @param uuid The helper ISE UUID.
673 void get_candidate_window_geometry (const String &uuid) const;
676 * @brief Set current keyboard ISE.
678 * @param uuid The keyboard ISE UUID.
680 void set_keyboard_ise_by_uuid (const String &uuid) const;
683 * @brief Request to get current keyboard ISE information.
685 * @param uuid The helper ISE UUID.
687 void get_keyboard_ise (const String &uuid) const;
690 * @brief Request to get uuid list of all keyboard ISEs.
692 * @param uuid The helper ISE UUID.
694 void get_keyboard_ise_list (const String &uuid) const;
697 * @brief Update ISE window geometry.
699 * @param x The x position in screen.
700 * @param y The y position in screen.
701 * @param width The ISE window width.
702 * @param height The ISE window height.
704 void update_geometry (int x,
710 * @brief Request to expand candidate window.
712 void expand_candidate (void) const;
715 * @brief Request to contract candidate window.
717 void contract_candidate (void) const;
720 * @brief Send selected candidate string index number.
722 void select_candidate (int index) const;
725 * @brief Update ise exit status
727 void update_ise_exit (void) const;
730 * @brief Update the preedit caret position in the preedit string.
732 * @param caret - the new position of the preedit caret.
734 void update_preedit_caret (int caret) const;
737 * @brief Set candidate style.
739 * @param portrait_line - the displayed line number for portrait.
740 * @param mode - candidate window mode.
742 void set_candidate_style (ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line = ONE_LINE_CANDIDATE,
743 ISF_CANDIDATE_MODE_T mode = SOFT_CANDIDATE_WINDOW) const;
746 * @brief Request to reset keyboard ISE.
748 void reset_keyboard_ise (void) const;
751 * @brief Request to flush keyboard ISE.
753 void flush_keyboard_ise (void) const;
756 * @brief Send a private command to an application
758 * @param command The private command sent from IME.
760 void send_private_command (const String &command) const;
763 * @brief Commit content to an application
765 * @param content The content sent from IME.
767 void commit_content (const String &content,
768 const String &description,
769 const String &mime_types) const;
772 * @brief Request panel to hide ISE, since in some cases ISE cannot hide itself (e.g. WAYLAND)
774 void request_ise_hide (void) const;
776 void recapture_string (int ic,
777 const String &ic_uuid,
780 const WideString &preedit_str,
781 const WideString &commit_str,
782 const AttributeList &attrs) const;
784 void set_engine_loader_flag (bool flag);
786 void send_key_event_processing_result (KeyEvent &key,
788 bool is_success) const;
790 void set_floating_mode (bool floating_mode);
792 void set_floating_drag_enabled (bool enabled);
796 * @brief Connect a slot to Helper exit signal.
798 * This signal is used to let the Helper exit.
800 * The prototype of the slot is:
802 * void exit (const HelperAgent *agent, int ic, const String &ic_uuid);
805 * - agent The pointer to the HelperAgent object which emits this signal.
806 * - ic An opaque handle of the currently focused input context.
807 * - ic_uuid The UUID of the IMEngineInstance associated with the focused input context.
809 Connection signal_connect_exit (HelperAgentSlotVoid *slot);
812 * @brief Connect a slot to Helper attach input context signal.
814 * This signal is used to attach an input context to this helper.
816 * When an input context requst to start this helper, then this
817 * signal will be emitted as soon as the helper is started.
819 * When an input context want to start an already started helper,
820 * this signal will also be emitted.
822 * Helper can send some events back to the IMEngineInstance in this
823 * signal-slot, to inform that it has been started sccessfully.
825 * The prototype of the slot is:
827 * void attach_input_context (const HelperAgent *agent, int ic, const String &ic_uuid);
829 Connection signal_connect_attach_input_context (HelperAgentSlotVoid *slot);
832 * @brief Connect a slot to Helper detach input context signal.
834 * This signal is used to detach an input context from this helper.
836 * When an input context requst to stop this helper, then this
837 * signal will be emitted.
839 * Helper shouldn't send any event back to the IMEngineInstance, because
840 * the IMEngineInstance attached to the ic should have been destroyed.
842 * The prototype of the slot is:
844 * void detach_input_context (const HelperAgent *agent, int ic, const String &ic_uuid);
846 Connection signal_connect_detach_input_context (HelperAgentSlotVoid *slot);
849 * @brief Connect a slot to Helper reload config signal.
851 * This signal is used to let the Helper reload configuration.
853 * The prototype of the slot is:
855 * void reload_config (const HelperAgent *agent, int ic, const String &ic_uuid);
857 Connection signal_connect_reload_config (HelperAgentSlotVoid *slot);
860 * @brief Connect a slot to Helper update screen signal.
862 * This signal is used to let the Helper move its GUI to another screen.
863 * It can only be emitted when SCIM_HELPER_NEED_SCREEN_INFO is set in HelperInfo.option.
865 * The prototype of the slot is:
867 * void update_screen (const HelperAgent *agent, int ic, const String &ic_uuid, int screen_number);
869 Connection signal_connect_update_screen (HelperAgentSlotInt *slot);
872 * @brief Connect a slot to Helper update spot location signal.
874 * This signal is used to let the Helper move its GUI according to the current spot location.
875 * It can only be emitted when SCIM_HELPER_NEED_SPOT_LOCATION_INFO is set in HelperInfo.option.
877 * The prototype of the slot is:
878 * void update_spot_location (const HelperAgent *agent, int ic, const String &ic_uuid, int x, int y);
880 Connection signal_connect_update_spot_location (HelperAgentSlotIntInt *slot);
883 * @brief Connect a slot to Helper update cursor position signal.
885 * This signal is used to let the Helper get the cursor position information.
887 * The prototype of the slot is:
888 * void update_cursor_position (const HelperAgent *agent, int ic, const String &ic_uuid, int cursor_pos);
890 Connection signal_connect_update_cursor_position (HelperAgentSlotInt *slot);
893 * @brief Connect a slot to Helper update surrounding text signal.
895 * This signal is used to let the Helper get the surrounding text.
897 * The prototype of the slot is:
898 * void update_surrounding_text (const HelperAgent *agent, int ic, const String &text, int cursor);
900 Connection signal_connect_update_surrounding_text (HelperAgentSlotInt *slot);
903 * @brief Connect a slot to Helper update selection signal.
905 * This signal is used to let the Helper get the selection.
907 * The prototype of the slot is:
908 * void update_selection (const HelperAgent *agent, int ic, const String &text);
910 Connection signal_connect_update_selection (HelperAgentSlotVoid *slot);
913 * @brief Connect a slot to Helper trigger property signal.
915 * This signal is used to trigger a property registered by this Helper.
916 * A property will be triggered when user clicks on it.
918 * The prototype of the slot is:
919 * void trigger_property (const HelperAgent *agent, int ic, const String &ic_uuid, const String &property);
921 Connection signal_connect_trigger_property (HelperAgentSlotString *slot);
924 * @brief Connect a slot to Helper process imengine event signal.
926 * This signal is used to deliver the events sent from IMEngine to Helper.
928 * The prototype of the slot is:
929 * void process_imengine_event (const HelperAgent *agent, int ic, const String &ic_uuid, const Transaction &transaction);
931 Connection signal_connect_process_imengine_event (HelperAgentSlotTransaction *slot);
934 * @brief Connect a slot to Helper focus out signal.
936 * This signal is used to do something when input context is focus out.
938 * The prototype of the slot is:
939 * void focus_out (const HelperAgent *agent, int ic, const String &ic_uuid);
941 Connection signal_connect_focus_out (HelperAgentSlotVoid *slot);
944 * @brief Connect a slot to Helper focus in signal.
946 * This signal is used to do something when input context is focus in.
948 * The prototype of the slot is:
949 * void focus_in (const HelperAgent *agent, int ic, const String &ic_uuid);
951 Connection signal_connect_focus_in (HelperAgentSlotVoid *slot);
954 * @brief Connect a slot to Helper show signal.
956 * This signal is used to show Helper ISE window.
958 * The prototype of the slot is:
959 * void ise_show (const HelperAgent *agent, int ic, char *buf, size_t &len);
961 Connection signal_connect_ise_show (HelperAgentSlotIntRawVoid *slot);
964 * @brief Connect a slot to Helper hide signal.
966 * This signal is used to hide Helper ISE window.
968 * The prototype of the slot is:
969 * void ise_hide (const HelperAgent *agent, int ic, const String &ic_uuid);
971 Connection signal_connect_ise_hide (HelperAgentSlotVoid *slot);
974 * @brief Connect a slot to Helper get ISE window geometry signal.
976 * This signal is used to get Helper ISE window size and position.
978 * The prototype of the slot is:
979 * void get_geometry (const HelperAgent *agent, struct rectinfo &info);
981 Connection signal_connect_get_geometry (HelperAgentSlotSize *slot);
984 * @brief Connect a slot to Helper set mode signal.
986 * This signal is used to set Helper ISE mode.
988 * The prototype of the slot is:
989 * void set_mode (const HelperAgent *agent, uint32 &mode);
991 Connection signal_connect_set_mode (HelperAgentSlotUintVoid *slot);
994 * @brief Connect a slot to Helper set language signal.
996 * This signal is used to set Helper ISE language.
998 * The prototype of the slot is:
999 * void set_language (const HelperAgent *agent, uint32 &language);
1001 Connection signal_connect_set_language (HelperAgentSlotUintVoid *slot);
1004 * @brief Connect a slot to Helper set im data signal.
1006 * This signal is used to send im data to Helper ISE.
1008 * The prototype of the slot is:
1009 * void set_imdata (const HelperAgent *agent, char *buf, size_t &len);
1011 Connection signal_connect_set_imdata (HelperAgentSlotRawVoid *slot);
1014 * @brief Connect a slot to Helper get im data signal.
1016 * This signal is used to get im data from Helper ISE.
1018 * The prototype of the slot is:
1019 * void get_imdata (const HelperAgent *, char **buf, size_t &len);
1021 Connection signal_connect_get_imdata (HelperAgentSlotGetRawVoid *slot);
1024 * @brief Connect a slot to Helper get language locale.
1026 * This signal is used to get language locale from Helper ISE.
1028 * The prototype of the slot is:
1029 * void get_language_locale (const HelperAgent *, int ic, char **locale);
1031 Connection signal_connect_get_language_locale (HelperAgentSlotIntGetStringVoid *slot);
1034 * @brief Connect a slot to Helper set return key type signal.
1036 * This signal is used to set return key type to Helper ISE.
1038 * The prototype of the slot is:
1039 * void set_return_key_type (const HelperAgent *agent, uint32 &type);
1041 Connection signal_connect_set_return_key_type (HelperAgentSlotUintVoid *slot);
1044 * @brief Connect a slot to Helper get return key type signal.
1046 * This signal is used to get return key type from Helper ISE.
1048 * The prototype of the slot is:
1049 * void get_return_key_type (const HelperAgent *agent, uint32 &type);
1051 Connection signal_connect_get_return_key_type (HelperAgentSlotUintVoid *slot);
1054 * @brief Connect a slot to Helper set return key disable signal.
1056 * This signal is used to set return key disable to Helper ISE.
1058 * The prototype of the slot is:
1059 * void set_return_key_disable (const HelperAgent *agent, uint32 &disabled);
1061 Connection signal_connect_set_return_key_disable (HelperAgentSlotUintVoid *slot);
1064 * @brief Connect a slot to Helper get return key disable signal.
1066 * This signal is used to get return key disable from Helper ISE.
1068 * The prototype of the slot is:
1069 * void get_return_key_disable (const HelperAgent *agent, uint32 &disabled);
1071 Connection signal_connect_get_return_key_disable (HelperAgentSlotUintVoid *slot);
1074 * @brief Connect a slot to Helper get layout signal.
1076 * This signal is used to get Helper ISE layout.
1078 * The prototype of the slot is:
1079 * void get_layout (const HelperAgent *agent, uint32 &layout);
1081 Connection signal_connect_get_layout (HelperAgentSlotUintVoid *slot);
1084 * @brief Connect a slot to Helper set layout signal.
1086 * This signal is used to set Helper ISE layout.
1088 * The prototype of the slot is:
1089 * void set_layout (const HelperAgent *agent, uint32 &layout);
1091 Connection signal_connect_set_layout (HelperAgentSlotUintVoid *slot);
1094 * @brief Connect a slot to Helper set shift mode signal.
1096 * This signal is used to set Helper shift mode.
1098 * The prototype of the slot is:
1099 * void set_caps_mode (const HelperAgent *agent, uint32 &mode);
1101 Connection signal_connect_set_caps_mode (HelperAgentSlotUintVoid *slot);
1104 * @brief Connect a slot to Helper reset input context signal.
1106 * This signal is used to reset Helper ISE input context.
1108 * The prototype of the slot is:
1109 * void reset_input_context (const HelperAgent *agent, int ic, const String &uuid);
1111 Connection signal_connect_reset_input_context (HelperAgentSlotVoid *slot);
1114 * @brief Connect a slot to Helper update candidate window geometry signal.
1116 * This signal is used to get candidate window size and position.
1118 * The prototype of the slot is:
1119 * void update_candidate_geometry (const HelperAgent *agent, int ic, const String &uuid, const rectinfo &info);
1121 Connection signal_connect_update_candidate_geometry (HelperAgentSlotRect *slot);
1124 * @brief Connect a slot to Helper update keyboard ISE signal.
1126 * This signal is used to get current keyboard ISE name and uuid.
1128 * The prototype of the slot is:
1129 * void update_keyboard_ise (const HelperAgent *agent, int ic, const String &uuid,
1130 * const String &ise_name, const String &ise_uuid);
1132 Connection signal_connect_update_keyboard_ise (HelperAgentSlotString2 *slot);
1135 * @brief Connect a slot to Helper update keyboard ISE list signal.
1137 * This signal is used to get uuid list of all keyboard ISEs.
1139 * The prototype of the slot is:
1140 * void update_keyboard_ise_list (const HelperAgent *agent, int ic, const String &uuid,
1141 * const std::vector<String> &ise_list);
1143 Connection signal_connect_update_keyboard_ise_list (HelperAgentSlotStringVector *slot);
1146 * @brief Connect a slot to Helper candidate more window show signal.
1148 * This signal is used to do someting when candidate more window is showed.
1150 * The prototype of the slot is:
1151 * void candidate_more_window_show (const HelperAgent *agent, int ic, const String &uuid);
1153 Connection signal_connect_candidate_more_window_show (HelperAgentSlotVoid *slot);
1156 * @brief Connect a slot to Helper candidate more window hide signal.
1158 * This signal is used to do someting when candidate more window is hidden.
1160 * The prototype of the slot is:
1161 * void candidate_more_window_hide (const HelperAgent *agent, int ic, const String &uuid);
1163 Connection signal_connect_candidate_more_window_hide (HelperAgentSlotVoid *slot);
1166 * @brief Connect a slot to Helper candidate show signal.
1168 * This signal is used to do candidate show.
1170 * The prototype of the slot is:
1171 * void candidate_show (const HelperAgent *agent, int ic, const String &uuid);
1173 Connection signal_connect_candidate_show (HelperAgentSlotVoid *slot);
1176 * @brief Connect a slot to Helper candidate hide signal.
1178 * This signal is used to do candidate hide.
1180 * The prototype of the slot is:
1181 * void candidate_hide (const HelperAgent *agent,int ic, const String &uuid);
1183 Connection signal_connect_candidate_hide (HelperAgentSlotVoid *slot);
1186 * @brief Connect a slot to Helper update lookup table signal.
1188 * This signal is used to do someting when update lookup table.
1190 * The prototype of the slot is:
1191 * void update_lookup_table (const HelperAgent *agent, int ic, const String &uuid, LookupTable &Table);
1193 Connection signal_connect_update_lookup_table (HelperAgentSlotLookupTable *slot);
1196 * @brief Connect a slot to Helper select aux signal.
1198 * This signal is used to do something when aux is selected.
1200 * The prototype of the slot is:
1201 * void select_aux (const HelperAgent *agent, int ic, const String &uuid, int index);
1203 Connection signal_connect_select_aux (HelperAgentSlotInt *slot);
1206 * @brief Connect a slot to Helper select candidate signal.
1208 * This signal is used to do something when candidate is selected.
1210 * The prototype of the slot is:
1211 * void select_candidate (const HelperAgent *agent, int ic, const String &uuid, int index);
1213 Connection signal_connect_select_candidate (HelperAgentSlotInt *slot);
1216 * @brief Connect a slot to Helper candidate table page up signal.
1218 * This signal is used to do something when candidate table is paged up.
1220 * The prototype of the slot is:
1221 * void candidate_table_page_up (const HelperAgent *agent, int ic, const String &uuid);
1223 Connection signal_connect_candidate_table_page_up (HelperAgentSlotVoid *slot);
1226 * @brief Connect a slot to Helper candidate table page down signal.
1228 * This signal is used to do something when candidate table is paged down.
1230 * The prototype of the slot is:
1231 * void candidate_table_page_down (const HelperAgent *agent, int ic, const String &uuid);
1233 Connection signal_connect_candidate_table_page_down (HelperAgentSlotVoid *slot);
1236 * @brief Connect a slot to Helper update candidate table page size signal.
1238 * This signal is used to do something when candidate table page size is changed.
1240 * The prototype of the slot is:
1241 * void update_candidate_table_page_size (const HelperAgent *, int ic, const String &uuid, int page_size);
1243 Connection signal_connect_update_candidate_table_page_size (HelperAgentSlotInt *slot);
1246 * @brief Connect a slot to Helper select associate signal.
1248 * This signal is used to do something when associate is selected.
1250 * The prototype of the slot is:
1251 * void select_associate (const HelperAgent *agent, int ic, const String &uuid, int index);
1253 Connection signal_connect_select_associate (HelperAgentSlotInt *slot);
1256 * @brief Connect a slot to Helper associate table page up signal.
1258 * This signal is used to do something when associate table is paged up.
1260 * The prototype of the slot is:
1261 * void associate_table_page_up (const HelperAgent *agent, int ic, const String &uuid);
1263 Connection signal_connect_associate_table_page_up (HelperAgentSlotVoid *slot);
1266 * @brief Connect a slot to Helper associate table page down signal.
1268 * This signal is used to do something when associate table is paged down.
1270 * The prototype of the slot is:
1271 * void associate_table_page_down (const HelperAgent *agent, int ic, const String &uuid);
1273 Connection signal_connect_associate_table_page_down (HelperAgentSlotVoid *slot);
1276 * @brief Connect a slot to Helper update associate table page size signal.
1278 * This signal is used to do something when associate table page size is changed.
1280 * The prototype of the slot is:
1281 * void update_associate_table_page_size (const HelperAgent *, int ic, const String &uuid, int page_size);
1283 Connection signal_connect_update_associate_table_page_size (HelperAgentSlotInt *slot);
1286 * @brief Connect a slot to Helper turn on log signal.
1288 * This signal is used to turn on Helper ISE debug information.
1290 * The prototype of the slot is:
1291 * void turn_on_log (const HelperAgent *agent, uint32 &on);
1293 Connection signal_connect_turn_on_log (HelperAgentSlotUintVoid *slot);
1296 * @brief Connect a slot to Helper update displayed candidate number signal.
1298 * This signal is used to inform helper ISE displayed candidate number.
1300 * The prototype of the slot is:
1301 * void update_displayed_candidate_number (const HelperAgent *, int ic, const String &uuid, int number);
1303 Connection signal_connect_update_displayed_candidate_number (HelperAgentSlotInt *slot);
1306 * @brief Connect a slot to Helper longpress candidate signal.
1308 * This signal is used to do something when candidate is longpress.
1310 * The prototype of the slot is:
1311 * void longpress_candidate (const HelperAgent *agent, int ic, const String &uuid, int index);
1313 Connection signal_connect_longpress_candidate (HelperAgentSlotInt *slot);
1316 * @brief Connect a slot to Helper update candidate item layout signal.
1318 * The prototype of the slot is:
1319 * void update_candidate_item_layout (const HelperAgent *, const std::vector<uint32> &row_items);
1321 Connection signal_connect_update_candidate_item_layout (HelperAgentSlotUintVector *slot);
1324 * @brief Connect a slot to Helper process key event signal.
1326 * The prototype of the slot is:
1327 * void process_key_event (const HelperAgent *, KeyEvent &key, uint32 &ret);
1329 Connection signal_connect_process_key_event (HelperAgentSlotKeyEventUint *slot);
1332 * @brief Connect a slot to Helper process key event with keycode signal.
1334 * The prototype of the slot is:
1335 * void process_key_event_with_keycode (const HelperAgent *, KeyEvent &key, uint32 &ret, uint32 keycode);
1337 Connection signal_connect_process_key_event_with_keycode (HelperAgentSlotKeyEventUintUint *slot);
1340 * @brief Connect a slot to Helper set input mode signal.
1342 * This signal is used to set Helper ISE input mode.
1344 * The prototype of the slot is:
1345 * void set_input_mode (const HelperAgent *agent, uint32 &input_mode);
1347 Connection signal_connect_set_input_mode (HelperAgentSlotUintVoid *slot);
1350 * @brief Connect a slot to Helper set input hint signal.
1352 * This signal is used to set Helper ISE input hint.
1354 * The prototype of the slot is:
1355 * void set_input_hint (const HelperAgent *agent, uint32 &input_hint);
1357 Connection signal_connect_set_input_hint (HelperAgentSlotUintVoid *slot);
1360 * @brief Connect a slot to Helper update bidi direction signal.
1362 * This signal is used to update Helper ISE bidi direction.
1364 * The prototype of the slot is:
1365 * void update_bidi_direction (const HelperAgent *agent, uint32 &bidi_direction);
1367 Connection signal_connect_update_bidi_direction (HelperAgentSlotUintVoid *slot);
1370 * @brief Connect a slot to Helper show option window.
1372 * This signal is used to do request the ISE to show option window.
1374 * The prototype of the slot is:
1375 * void show_option_window (const HelperAgent *agent, int ic, const String &uuid);
1377 Connection signal_connect_show_option_window (HelperAgentSlotVoid *slot);
1380 * @brief Connect a slot to Helper resume option window.
1382 * This signal is used to do request the ISE to resume option window.
1384 * The prototype of the slot is:
1385 * void resume_option_window (const HelperAgent *agent, int ic, const String &uuid);
1387 Connection signal_connect_resume_option_window (HelperAgentSlotVoid *slot);
1390 * @brief Connect a slot to Helper check if the option is available.
1392 * This signal is used to request ISE to reply if the option (setting) is available.
1394 * The prototype of the slot is:
1395 * void check_option_window (const HelperAgent *agent, uint32 &avail);
1397 Connection signal_connect_check_option_window (HelperAgentSlotUintVoid *slot);
1400 * @brief Connect a slot to Helper process unconventional input device event signal.
1402 * The prototype of the slot is:
1403 * void process_input_device_event (const HelperAgent *, uint32 &type, char *data, size_t &size, uint32 &ret);
1405 Connection signal_connect_process_input_device_event (HelperAgentSlotUintCharSizeUint *slot);
1408 * @brief Connect a slot to Helper set prediction hint signal.
1410 * This signal is used to send prediction hint to Helper ISE.
1412 * The prototype of the slot is:
1413 * void set_prediction_hint (const HelperAgent *agent, char *prediction_hint);
1415 Connection signal_connect_set_prediction_hint (HelperAgentSlotStringVoid *slot);
1418 * @brief Connect a slot to Helper set mime type signal.
1420 * This signal is used to send mime type to Helper ISE.
1422 * The prototype of the slot is:
1423 * void set_mime_type (const HelperAgent *agent, char *mime_type);
1425 Connection signal_connect_set_mime_type (HelperAgentSlotStringVoid *slot);
1428 * @brief Connect a slot to Helper set prediction hint data signal.
1430 * This signal is used to send prediction hint data to Helper ISE.
1432 * The prototype of the slot is:
1433 * void set_prediction_hint_data (const HelperAgent *agent, char *key, char *value);
1435 Connection signal_connect_set_prediction_hint_data (HelperAgentSlotString *slot);
1438 * @brief Connect a slot to Helper set optimization hint signal.
1440 * This signal is used to send optimization hint to Helper ISE.
1442 * The prototype of the slot is:
1443 * void set_optimization_hint (const HelperAgent *agent, uint32 &hint);
1445 Connection signal_connect_set_optimization_hint (HelperAgentSlotUintVoid *slot);
1448 * @brief Connect a slot to Helper process key event with imengine signal.
1450 * The prototype of the slot is:
1451 * void process_key_event_with_imengine (const HelperAgent *, KeyEvent &key, uint32 serial);
1453 Connection signal_connect_process_key_event_with_imengine (HelperAgentSlotKeyEventUint2 *slot);
1456 * @brief Connect a slot to Helper set autocapital type signal.
1458 * This signal is used to send autocapital type to imengine.
1460 * The prototype of the slot is:
1461 * void set_autocapital_type (const HelperAgent *agent, uint32 &type);
1463 Connection signal_connect_set_autocapital_type (HelperAgentSlotUintVoid *slot);
1466 * @brief Connect a slot to Helper set prediction allow signal.
1468 * This signal is used to send prediction allow to imengine.
1470 * The prototype of the slot is:
1471 * void set_prediction_allow (const HelperAgent *agent, uint32 &prediction_allow);
1473 Connection signal_connect_set_prediction_allow (HelperAgentSlotUintVoid *slot);
1478 } /* namespace scim */
1486 #endif /* __SCIM_HELPER_H */
1489 vi:ts=4:nowrap:ai:expandtab