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-2014 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"
53 * @ingroup InputServiceFramework
54 * The accessory classes to help develop and manage Client Helper objects.
57 class EAPI HelperError: public Exception
60 HelperError (const String& what_arg)
61 : Exception (String("scim::Helper: ") + what_arg) { }
65 * @brief Helper option indicates that it's a stand alone Helper.
67 * Stand alone Helper has no corresponding IMEngine Factory,
68 * Such Helper can not be started by IMEngine Factory.
69 * So Panel must provide a menu, or something else, which contains
70 * all stand alone Helper items, so that user can start them by
73 const uint32 SCIM_HELPER_STAND_ALONE = 1;
76 * @brief Helper option indicates that it must be started
77 * automatically when Panel starts.
79 * If Helper objects want to start itself as soon as
80 * the Panel starts, set this option.
82 const uint32 SCIM_HELPER_AUTO_START = (1<<1);
85 * @brief Helper option indicates that it should be restarted
86 * when it exits abnormally.
88 * This option should not be used with #SCIM_HELPER_STAND_ALONE.
90 const uint32 SCIM_HELPER_AUTO_RESTART = (1<<2);
93 * @brief Helper option indicates that it needs the screen update
96 * Helper object with this option will receive the UPDATE_SCREEN event
97 * when the screen of focused ic is changed.
99 const uint32 SCIM_HELPER_NEED_SCREEN_INFO = (1<<3);
102 * @brief Helper option indicates that it needs the spot location
105 * Helper object with this option will receive the SPOT_LOCATION_INFO event
106 * when the spot location of focused ic is changed.
108 const uint32 SCIM_HELPER_NEED_SPOT_LOCATION_INFO = (1<<4);
111 * @brief ISE option indicates whether helper ISE handles the keyboard keyevent
113 const uint32 ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT = (1<<16);
116 * @brief ISE option indicates whether it should be hidden in control panel.
118 const uint32 ISM_ISE_HIDE_IN_CONTROL_PANEL = (1<<17);
122 * @brief Structure to hold the information of a Helper object.
126 String uuid; /**< The UUID of this Helper object */
127 String name; /**< The Name of this Helper object, UTF-8 encoding. */
128 String icon; /**< The Icon file path of this Helper object. */
129 String description; /**< The short description of this Helper object. */
130 uint32 option; /**< The options of this Helper object. @sa #SCIM_HELPER_STAND_ALONE etc.*/
132 HelperInfo (const String &puuid = String (),
133 const String &pname = String (),
134 const String &picon = String (),
135 const String &pdesc = String (),
154 typedef Slot3<void, const HelperAgent *, int, const String &>
157 typedef Slot4<void, const HelperAgent *, int, const String &, const String &>
158 HelperAgentSlotString;
160 typedef Slot4<void, const HelperAgent *, int, const String &, const std::vector<String> &>
161 HelperAgentSlotStringVector;
163 typedef Slot5<void, const HelperAgent *, int, const String &, const String &, const String &>
164 HelperAgentSlotString2;
166 typedef Slot4<void, const HelperAgent *, int, const String &, int>
169 typedef Slot5<void, const HelperAgent *, int, const String &, int, int>
170 HelperAgentSlotIntInt;
172 typedef Slot4<void, const HelperAgent *, int, const String &, const Transaction &>
173 HelperAgentSlotTransaction;
175 typedef Slot4<void, const HelperAgent *, int, const String &, const rectinfo &>
178 typedef Slot2<void, const HelperAgent *, struct rectinfo &>
181 typedef Slot2<void, const HelperAgent *, uint32 &>
182 HelperAgentSlotUintVoid;
184 typedef Slot3<void, const HelperAgent *, int, uint32 &>
185 HelperAgentSlotIntUint;
187 typedef Slot3<void, const HelperAgent *, char *, size_t &>
188 HelperAgentSlotRawVoid;
190 typedef Slot3<void, const HelperAgent *, char **, size_t &>
191 HelperAgentSlotGetRawVoid;
193 typedef Slot4<void, const HelperAgent *, int, char *, size_t &>
194 HelperAgentSlotIntRawVoid;
196 typedef Slot3<void, const HelperAgent *, int, char **>
197 HelperAgentSlotIntGetStringVoid;
199 typedef Slot2<void, const HelperAgent *, const std::vector<uint32> &>
200 HelperAgentSlotUintVector;
202 typedef Slot2<void, const HelperAgent *, LookupTable &>
203 HelperAgentSlotLookupTable;
204 typedef Slot3<void, const HelperAgent *, KeyEvent &, uint32 &>
205 HelperAgentSlotKeyEventUint;
208 * @brief The accessory class to write a Helper object.
210 * This class implements all Socket Transaction protocol between
211 * Helper object and Panel.
213 class EAPI HelperAgent
215 class HelperAgentImpl;
216 HelperAgentImpl *m_impl;
218 HelperAgent (const HelperAgent &);
219 const HelperAgent & operator = (const HelperAgent &);
226 * @brief Open socket connection to the Panel.
228 * Helper objects and Panel communicate with each other via the Socket
229 * created by Panel, just same as the Socket between FrontEnds and Panel.
231 * Helper object can select/poll on the connection id returned by this function
232 * to see if there are any data available to be read. If any data are available,
233 * Helper object should call HelperAgent::filter_event() to process the data.
235 * This method should be called after the necessary signal-slots are connected.
236 * If this Helper is started by an IMEngine Instance, then signal attach_input_context
237 * will be emitted during this call.
239 * Signal update_screen will be emitted during this call as well to set the startup
240 * screen of this Helper. The ic and ic_uuid parameters are invalid here.
242 * @param info The information of this Helper object.
243 * @param display The display which this Helper object should run on.
245 * @return The connection socket id. -1 means failed to create
248 int open_connection (const HelperInfo &info,
249 const String &display);
252 * @brief Close the socket connection to Panel.
254 void close_connection ();
257 * @brief Get the connection id previously returned by open_connection().
259 * @return the connection id
261 int get_connection_number () const;
264 * @brief Check whether this HelperAgent has been connected to a Panel.
266 * Return true when it is connected to panel, otherwise return false.
268 bool is_connected () const;
271 * @brief Check if there are any events available to be processed.
273 * If it returns true then Helper object should call
274 * HelperAgent::filter_event() to process them.
276 * @return true if there are any events available.
278 bool has_pending_event () const;
281 * @brief Process the pending events.
283 * This function will emit the corresponding signals according
286 * @return false if the connection is broken, otherwise return true.
288 bool filter_event ();
291 * @brief Request SCIM to reload all configuration.
293 * This function should only by used by Setup Helper to request
294 * scim's reloading the configuration.
296 void reload_config () const;
299 * @brief Register some properties into Panel.
301 * This function send the request to Panel to register a list
304 * @param properties The list of Properties to be registered into Panel.
306 * @sa scim::Property.
308 void register_properties (const PropertyList &properties) const;
311 * @brief Update a registered property.
313 * @param property The property to be updated.
315 void update_property (const Property &property) const;
318 * @brief Send a set of events to an IMEngineInstance.
320 * All events should be put into a Transaction.
321 * And the events can only be received by one IMEngineInstance object.
323 * @param ic The handle of the Input Context to receive the events.
324 * @param ic_uuid The UUID of the Input Context.
325 * @param trans The Transaction object holds the events.
327 void send_imengine_event (int ic,
328 const String &ic_uuid,
329 const Transaction &trans) const;
332 * @brief Send a KeyEvent to an IMEngineInstance.
334 * @param ic The handle of the IMEngineInstance to receive the event.
335 * -1 means the currently focused IMEngineInstance.
336 * @param ic_uuid The UUID of the IMEngineInstance. Empty means don't match.
337 * @param key The KeyEvent to be sent.
339 void send_key_event (int ic,
340 const String &ic_uuid,
341 const KeyEvent &key) const;
344 * @brief Forward a KeyEvent to client application directly.
346 * @param ic The handle of the client Input Context to receive the event.
347 * -1 means the currently focused Input Context.
348 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
349 * Empty means don't match.
350 * @param key The KeyEvent to be forwarded.
352 void forward_key_event (int ic,
353 const String &ic_uuid,
354 const KeyEvent &key) const;
357 * @brief Commit a WideString to client application directly.
359 * @param ic The handle of the client Input Context to receive the WideString.
360 * -1 means the currently focused Input Context.
361 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
362 * Empty means don't match.
363 * @param wstr The WideString to be committed.
365 void commit_string (int ic,
366 const String &ic_uuid,
367 const WideString &wstr) const;
370 * @brief Commit a UTF-8 String to client application directly.
372 * @param ic The handle of the client Input Context to receive the commit string.
373 * -1 means the currently focused Input Context.
374 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
375 * Empty means don't match.
376 * @param buf The byte array of UTF-8 string to be committed.
377 * @param buflen The buf size in bytes.
379 void commit_string (int ic,
380 const String &ic_uuid,
385 * @brief Request to show preedit string.
387 * @param ic The handle of the client Input Context to receive the request.
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.
392 void show_preedit_string (int ic,
393 const String &ic_uuid) const;
396 * @brief Request to show aux string.
398 void show_aux_string (void) const;
401 * @brief Request to show candidate string.
403 void show_candidate_string (void) const;
406 * @brief Request to show associate string.
408 void show_associate_string (void) const;
411 * @brief Request to hide preedit string.
413 * @param ic The handle of the client Input Context to receive the request.
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.
418 void hide_preedit_string (int ic,
419 const String &ic_uuid) const;
422 * @brief Request to hide aux string.
424 void hide_aux_string (void) const;
427 * @brief Request to hide candidate string.
429 void hide_candidate_string (void) const;
432 * @brief Request to hide associate string.
434 void hide_associate_string (void) const;
437 * @brief Update a new WideString for preedit.
439 * @param ic The handle of the client Input Context to receive the WideString.
440 * -1 means the currently focused Input Context.
441 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
442 * Empty means don't match.
443 * @param wstr The WideString to be updated.
444 * @param attrs The attribute list for preedit string.
446 void update_preedit_string (int ic,
447 const String &ic_uuid,
448 const WideString &wstr,
449 const AttributeList &attrs) const;
452 * @brief Update a new UTF-8 string for preedit.
454 * @param ic The handle of the client Input Context to receive the UTF-8 String.
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.
458 * @param buf The byte array of UTF-8 string to be updated.
459 * @param buflen The buf size in bytes.
460 * @param attrs The attribute list for preedit string.
462 void update_preedit_string (int ic,
463 const String &ic_uuid,
466 const AttributeList &attrs) const;
469 * @brief Update a new WideString and caret for preedit.
471 * @param ic The handle of the client Input Context to receive the WideString.
472 * -1 means the currently focused Input Context.
473 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
474 * Empty means don't match.
475 * @param wstr The WideString to be updated.
476 * @param attrs The attribute list for preedit string.
477 * @param caret The caret position in preedit string.
479 void update_preedit_string (int ic,
480 const String &ic_uuid,
481 const WideString &wstr,
482 const AttributeList &attrs,
486 * @brief Update a new UTF-8 string and caret for preedit.
488 * @param ic The handle of the client Input Context to receive the UTF-8 String.
489 * -1 means the currently focused Input Context.
490 * @param ic_uuid The UUID of the IMEngine used by the Input Context.
491 * Empty means don't match.
492 * @param buf The byte array of UTF-8 string to be updated.
493 * @param buflen The buf size in bytes.
494 * @param attrs The attribute list for preedit string.
495 * @param caret The caret position in preedit string.
497 void update_preedit_string (int ic,
498 const String &ic_uuid,
501 const AttributeList &attrs,
505 * @brief Update a new string for aux.
507 * @param str The string to be updated.
508 * @param attrs The attribute list for aux string.
510 void update_aux_string (const String &str,
511 const AttributeList &attrs) const;
514 * @brief Request to update candidate.
516 * @param table The lookup table for candidate.
518 void update_candidate_string (const LookupTable &table) const;
521 * @brief Request to update associate.
523 * @param table The lookup table for associate.
525 void update_associate_string (const LookupTable &table) const;
528 * @brief When the input context of ISE is changed,
529 * ISE can call this function to notify application
531 * @param type type of event.
532 * @param value value of event.
534 void update_input_context (uint32 type,
538 * @brief Request to get surrounding text.
540 * @param uuid The helper ISE UUID.
541 * @param maxlen_before The max length of before.
542 * @param maxlen_after The max length of after.
544 void get_surrounding_text (const String &uuid,
546 int maxlen_after) const;
549 * @brief Request to delete surrounding text.
551 * @param offset The offset for cursor position.
552 * @param len The length for delete text.
554 void delete_surrounding_text (int offset,
558 * @brief Request to get selection.
560 * @param uuid The helper ISE UUID.
562 void get_selection (const String &uuid) const;
565 * @brief Request to selected text.
567 * @param start The start position in text.
568 * @param end The end position in text.
570 void set_selection (int start,
574 * @brief Set candidate position in screen.
576 * @param left The x position in screen.
577 * @param top The y position in screen.
579 void set_candidate_position (int left,
583 * @brief Request to hide candidate window.
585 void candidate_hide (void) const;
588 * @brief Request to get candidate window size and position.
590 * @param uuid The helper ISE UUID.
592 void get_candidate_window_geometry (const String &uuid) const;
595 * @brief Set current keyboard ISE.
597 * @param uuid The keyboard ISE UUID.
599 void set_keyboard_ise_by_uuid (const String &uuid) const;
602 * @brief Request to get current keyboard ISE information.
604 * @param uuid The helper ISE UUID.
606 void get_keyboard_ise (const String &uuid) const;
609 * @brief Request to get uuid list of all keyboard ISEs.
611 * @param uuid The helper ISE UUID.
613 void get_keyboard_ise_list (const String &uuid) const;
616 * @brief Update ISE window geometry.
618 * @param x The x position in screen.
619 * @param y The y position in screen.
620 * @param width The ISE window width.
621 * @param height The ISE window height.
623 void update_geometry (int x,
629 * @brief Request to expand candidate window.
631 void expand_candidate (void) const;
634 * @brief Request to contract candidate window.
636 void contract_candidate (void) const;
639 * @brief Send selected candidate string index number.
641 void select_candidate (int index) const;
644 * @brief Update ise exit status
646 void update_ise_exit (void) const;
649 * @brief Update the preedit caret position in the preedit string.
651 * @param caret - the new position of the preedit caret.
653 void update_preedit_caret (int caret) const;
656 * @brief Set candidate style.
658 * @param portrait_line - the displayed line number for portrait.
659 * @param mode - candidate window mode.
661 void set_candidate_style (ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line = ONE_LINE_CANDIDATE,
662 ISF_CANDIDATE_MODE_T mode = FIXED_CANDIDATE_WINDOW) const;
665 * @brief Request to reset keyboard ISE.
667 void reset_keyboard_ise (void) const;
670 * @brief Send a private command to an application
672 * @param command The private command sent from IME.
674 void send_private_command (const String &command) const;
678 * @brief Connect a slot to Helper exit signal.
680 * This signal is used to let the Helper exit.
682 * The prototype of the slot is:
684 * void exit (const HelperAgent *agent, int ic, const String &ic_uuid);
687 * - agent The pointer to the HelperAgent object which emits this signal.
688 * - ic An opaque handle of the currently focused input context.
689 * - ic_uuid The UUID of the IMEngineInstance associated with the focused input context.
691 Connection signal_connect_exit (HelperAgentSlotVoid *slot);
694 * @brief Connect a slot to Helper attach input context signal.
696 * This signal is used to attach an input context to this helper.
698 * When an input context requst to start this helper, then this
699 * signal will be emitted as soon as the helper is started.
701 * When an input context want to start an already started helper,
702 * this signal will also be emitted.
704 * Helper can send some events back to the IMEngineInstance in this
705 * signal-slot, to inform that it has been started sccessfully.
707 * The prototype of the slot is:
709 * void attach_input_context (const HelperAgent *agent, int ic, const String &ic_uuid);
711 Connection signal_connect_attach_input_context (HelperAgentSlotVoid *slot);
714 * @brief Connect a slot to Helper detach input context signal.
716 * This signal is used to detach an input context from this helper.
718 * When an input context requst to stop this helper, then this
719 * signal will be emitted.
721 * Helper shouldn't send any event back to the IMEngineInstance, because
722 * the IMEngineInstance attached to the ic should have been destroyed.
724 * The prototype of the slot is:
726 * void detach_input_context (const HelperAgent *agent, int ic, const String &ic_uuid);
728 Connection signal_connect_detach_input_context (HelperAgentSlotVoid *slot);
731 * @brief Connect a slot to Helper reload config signal.
733 * This signal is used to let the Helper reload configuration.
735 * The prototype of the slot is:
737 * void reload_config (const HelperAgent *agent, int ic, const String &ic_uuid);
739 Connection signal_connect_reload_config (HelperAgentSlotVoid *slot);
742 * @brief Connect a slot to Helper update screen signal.
744 * This signal is used to let the Helper move its GUI to another screen.
745 * It can only be emitted when SCIM_HELPER_NEED_SCREEN_INFO is set in HelperInfo.option.
747 * The prototype of the slot is:
749 * void update_screen (const HelperAgent *agent, int ic, const String &ic_uuid, int screen_number);
751 Connection signal_connect_update_screen (HelperAgentSlotInt *slot);
754 * @brief Connect a slot to Helper update spot location signal.
756 * This signal is used to let the Helper move its GUI according to the current spot location.
757 * It can only be emitted when SCIM_HELPER_NEED_SPOT_LOCATION_INFO is set in HelperInfo.option.
759 * The prototype of the slot is:
760 * void update_spot_location (const HelperAgent *agent, int ic, const String &ic_uuid, int x, int y);
762 Connection signal_connect_update_spot_location (HelperAgentSlotIntInt *slot);
765 * @brief Connect a slot to Helper update cursor position signal.
767 * This signal is used to let the Helper get the cursor position information.
769 * The prototype of the slot is:
770 * void update_cursor_position (const HelperAgent *agent, int ic, const String &ic_uuid, int cursor_pos);
772 Connection signal_connect_update_cursor_position (HelperAgentSlotInt *slot);
775 * @brief Connect a slot to Helper update surrounding text signal.
777 * This signal is used to let the Helper get the surrounding text.
779 * The prototype of the slot is:
780 * void update_surrounding_text (const HelperAgent *agent, int ic, const String &text, int cursor);
782 Connection signal_connect_update_surrounding_text (HelperAgentSlotInt *slot);
785 * @brief Connect a slot to Helper update selection signal.
787 * This signal is used to let the Helper get the selection.
789 * The prototype of the slot is:
790 * void update_selection (const HelperAgent *agent, int ic, const String &text);
792 Connection signal_connect_update_selection (HelperAgentSlotVoid *slot);
795 * @brief Connect a slot to Helper trigger property signal.
797 * This signal is used to trigger a property registered by this Helper.
798 * A property will be triggered when user clicks on it.
800 * The prototype of the slot is:
801 * void trigger_property (const HelperAgent *agent, int ic, const String &ic_uuid, const String &property);
803 Connection signal_connect_trigger_property (HelperAgentSlotString *slot);
806 * @brief Connect a slot to Helper process imengine event signal.
808 * This signal is used to deliver the events sent from IMEngine to Helper.
810 * The prototype of the slot is:
811 * void process_imengine_event (const HelperAgent *agent, int ic, const String &ic_uuid, const Transaction &transaction);
813 Connection signal_connect_process_imengine_event (HelperAgentSlotTransaction *slot);
816 * @brief Connect a slot to Helper focus out signal.
818 * This signal is used to do something when input context is focus out.
820 * The prototype of the slot is:
821 * void focus_out (const HelperAgent *agent, int ic, const String &ic_uuid);
823 Connection signal_connect_focus_out (HelperAgentSlotVoid *slot);
826 * @brief Connect a slot to Helper focus in signal.
828 * This signal is used to do something when input context is focus in.
830 * The prototype of the slot is:
831 * void focus_in (const HelperAgent *agent, int ic, const String &ic_uuid);
833 Connection signal_connect_focus_in (HelperAgentSlotVoid *slot);
836 * @brief Connect a slot to Helper show signal.
838 * This signal is used to show Helper ISE window.
840 * The prototype of the slot is:
841 * void ise_show (const HelperAgent *agent, int ic, char *buf, size_t &len);
843 Connection signal_connect_ise_show (HelperAgentSlotIntRawVoid *slot);
846 * @brief Connect a slot to Helper hide signal.
848 * This signal is used to hide Helper ISE window.
850 * The prototype of the slot is:
851 * void ise_hide (const HelperAgent *agent, int ic, const String &ic_uuid);
853 Connection signal_connect_ise_hide (HelperAgentSlotVoid *slot);
856 * @brief Connect a slot to Helper get ISE window geometry signal.
858 * This signal is used to get Helper ISE window size and position.
860 * The prototype of the slot is:
861 * void get_geometry (const HelperAgent *agent, struct rectinfo &info);
863 Connection signal_connect_get_geometry (HelperAgentSlotSize *slot);
866 * @brief Connect a slot to Helper set mode signal.
868 * This signal is used to set Helper ISE mode.
870 * The prototype of the slot is:
871 * void set_mode (const HelperAgent *agent, uint32 &mode);
873 Connection signal_connect_set_mode (HelperAgentSlotUintVoid *slot);
876 * @brief Connect a slot to Helper set language signal.
878 * This signal is used to set Helper ISE language.
880 * The prototype of the slot is:
881 * void set_language (const HelperAgent *agent, uint32 &language);
883 Connection signal_connect_set_language (HelperAgentSlotUintVoid *slot);
886 * @brief Connect a slot to Helper set im data signal.
888 * This signal is used to send im data to Helper ISE.
890 * The prototype of the slot is:
891 * void set_imdata (const HelperAgent *agent, char *buf, size_t &len);
893 Connection signal_connect_set_imdata (HelperAgentSlotRawVoid *slot);
896 * @brief Connect a slot to Helper get im data signal.
898 * This signal is used to get im data from Helper ISE.
900 * The prototype of the slot is:
901 * void get_imdata (const HelperAgent *, char **buf, size_t &len);
903 Connection signal_connect_get_imdata (HelperAgentSlotGetRawVoid *slot);
906 * @brief Connect a slot to Helper get language locale.
908 * This signal is used to get language locale from Helper ISE.
910 * The prototype of the slot is:
911 * void get_language_locale (const HelperAgent *, int ic, char **locale);
913 Connection signal_connect_get_language_locale (HelperAgentSlotIntGetStringVoid *slot);
916 * @brief Connect a slot to Helper set return key type signal.
918 * This signal is used to set return key type to Helper ISE.
920 * The prototype of the slot is:
921 * void set_return_key_type (const HelperAgent *agent, uint32 &type);
923 Connection signal_connect_set_return_key_type (HelperAgentSlotUintVoid *slot);
926 * @brief Connect a slot to Helper get return key type signal.
928 * This signal is used to get return key type from Helper ISE.
930 * The prototype of the slot is:
931 * void get_return_key_type (const HelperAgent *agent, uint32 &type);
933 Connection signal_connect_get_return_key_type (HelperAgentSlotUintVoid *slot);
936 * @brief Connect a slot to Helper set return key disable signal.
938 * This signal is used to set return key disable to Helper ISE.
940 * The prototype of the slot is:
941 * void set_return_key_disable (const HelperAgent *agent, uint32 &disabled);
943 Connection signal_connect_set_return_key_disable (HelperAgentSlotUintVoid *slot);
946 * @brief Connect a slot to Helper get return key disable signal.
948 * This signal is used to get return key disable from Helper ISE.
950 * The prototype of the slot is:
951 * void get_return_key_disable (const HelperAgent *agent, uint32 &disabled);
953 Connection signal_connect_get_return_key_disable (HelperAgentSlotUintVoid *slot);
956 * @brief Connect a slot to Helper get layout signal.
958 * This signal is used to get Helper ISE layout.
960 * The prototype of the slot is:
961 * void get_layout (const HelperAgent *agent, uint32 &layout);
963 Connection signal_connect_get_layout (HelperAgentSlotUintVoid *slot);
966 * @brief Connect a slot to Helper set layout signal.
968 * This signal is used to set Helper ISE layout.
970 * The prototype of the slot is:
971 * void set_layout (const HelperAgent *agent, uint32 &layout);
973 Connection signal_connect_set_layout (HelperAgentSlotUintVoid *slot);
976 * @brief Connect a slot to Helper set shift mode signal.
978 * This signal is used to set Helper shift mode.
980 * The prototype of the slot is:
981 * void set_caps_mode (const HelperAgent *agent, uint32 &mode);
983 Connection signal_connect_set_caps_mode (HelperAgentSlotUintVoid *slot);
986 * @brief Connect a slot to Helper reset input context signal.
988 * This signal is used to reset Helper ISE input context.
990 * The prototype of the slot is:
991 * void reset_input_context (const HelperAgent *agent, int ic, const String &uuid);
993 Connection signal_connect_reset_input_context (HelperAgentSlotVoid *slot);
996 * @brief Connect a slot to Helper update candidate window geometry signal.
998 * This signal is used to get candidate window size and position.
1000 * The prototype of the slot is:
1001 * void update_candidate_geometry (const HelperAgent *agent, int ic, const String &uuid, const rectinfo &info);
1003 Connection signal_connect_update_candidate_geometry (HelperAgentSlotRect *slot);
1006 * @brief Connect a slot to Helper update keyboard ISE signal.
1008 * This signal is used to get current keyboard ISE name and uuid.
1010 * The prototype of the slot is:
1011 * void update_keyboard_ise (const HelperAgent *agent, int ic, const String &uuid,
1012 * const String &ise_name, const String &ise_uuid);
1014 Connection signal_connect_update_keyboard_ise (HelperAgentSlotString2 *slot);
1017 * @brief Connect a slot to Helper update keyboard ISE list signal.
1019 * This signal is used to get uuid list of all keyboard ISEs.
1021 * The prototype of the slot is:
1022 * void update_keyboard_ise_list (const HelperAgent *agent, int ic, const String &uuid,
1023 * const std::vector<String> &ise_list);
1025 Connection signal_connect_update_keyboard_ise_list (HelperAgentSlotStringVector *slot);
1028 * @brief Connect a slot to Helper candidate more window show signal.
1030 * This signal is used to do someting when candidate more window is showed.
1032 * The prototype of the slot is:
1033 * void candidate_more_window_show (const HelperAgent *agent, int ic, const String &uuid);
1035 Connection signal_connect_candidate_more_window_show (HelperAgentSlotVoid *slot);
1038 * @brief Connect a slot to Helper candidate more window hide signal.
1040 * This signal is used to do someting when candidate more window is hidden.
1042 * The prototype of the slot is:
1043 * void candidate_more_window_hide (const HelperAgent *agent, int ic, const String &uuid);
1045 Connection signal_connect_candidate_more_window_hide (HelperAgentSlotVoid *slot);
1048 * @brief Connect a slot to Helper candidate show signal.
1050 * This signal is used to do candidate show.
1052 * The prototype of the slot is:
1053 * void candidate_show (const HelperAgent *agent, int ic, const String &uuid);
1055 Connection signal_connect_candidate_show (HelperAgentSlotVoid *slot);
1058 * @brief Connect a slot to Helper candidate hide signal.
1060 * This signal is used to do candidate hide.
1062 * The prototype of the slot is:
1063 * void candidate_hide (const HelperAgent *agent,int ic, const String &uuid);
1065 Connection signal_connect_candidate_hide (HelperAgentSlotVoid *slot);
1068 * @brief Connect a slot to Helper update lookup table signal.
1070 * This signal is used to do someting when update lookup table.
1072 * The prototype of the slot is:
1073 * void update_lookup_table (const HelperAgent *agent, int ic, const String &uuid, LookupTable &Table);
1075 Connection signal_connect_update_lookup_table (HelperAgentSlotLookupTable *slot);
1078 * @brief Connect a slot to Helper select aux signal.
1080 * This signal is used to do something when aux is selected.
1082 * The prototype of the slot is:
1083 * void select_aux (const HelperAgent *agent, int ic, const String &uuid, int index);
1085 Connection signal_connect_select_aux (HelperAgentSlotInt *slot);
1088 * @brief Connect a slot to Helper select candidate signal.
1090 * This signal is used to do something when candidate is selected.
1092 * The prototype of the slot is:
1093 * void select_candidate (const HelperAgent *agent, int ic, const String &uuid, int index);
1095 Connection signal_connect_select_candidate (HelperAgentSlotInt *slot);
1098 * @brief Connect a slot to Helper candidate table page up signal.
1100 * This signal is used to do something when candidate table is paged up.
1102 * The prototype of the slot is:
1103 * void candidate_table_page_up (const HelperAgent *agent, int ic, const String &uuid);
1105 Connection signal_connect_candidate_table_page_up (HelperAgentSlotVoid *slot);
1108 * @brief Connect a slot to Helper candidate table page down signal.
1110 * This signal is used to do something when candidate table is paged down.
1112 * The prototype of the slot is:
1113 * void candidate_table_page_down (const HelperAgent *agent, int ic, const String &uuid);
1115 Connection signal_connect_candidate_table_page_down (HelperAgentSlotVoid *slot);
1118 * @brief Connect a slot to Helper update candidate table page size signal.
1120 * This signal is used to do something when candidate table page size is changed.
1122 * The prototype of the slot is:
1123 * void update_candidate_table_page_size (const HelperAgent *, int ic, const String &uuid, int page_size);
1125 Connection signal_connect_update_candidate_table_page_size (HelperAgentSlotInt *slot);
1128 * @brief Connect a slot to Helper select associate signal.
1130 * This signal is used to do something when associate is selected.
1132 * The prototype of the slot is:
1133 * void select_associate (const HelperAgent *agent, int ic, const String &uuid, int index);
1135 Connection signal_connect_select_associate (HelperAgentSlotInt *slot);
1138 * @brief Connect a slot to Helper associate table page up signal.
1140 * This signal is used to do something when associate table is paged up.
1142 * The prototype of the slot is:
1143 * void associate_table_page_up (const HelperAgent *agent, int ic, const String &uuid);
1145 Connection signal_connect_associate_table_page_up (HelperAgentSlotVoid *slot);
1148 * @brief Connect a slot to Helper associate table page down signal.
1150 * This signal is used to do something when associate table is paged down.
1152 * The prototype of the slot is:
1153 * void associate_table_page_down (const HelperAgent *agent, int ic, const String &uuid);
1155 Connection signal_connect_associate_table_page_down (HelperAgentSlotVoid *slot);
1158 * @brief Connect a slot to Helper update associate table page size signal.
1160 * This signal is used to do something when associate table page size is changed.
1162 * The prototype of the slot is:
1163 * void update_associate_table_page_size (const HelperAgent *, int ic, const String &uuid, int page_size);
1165 Connection signal_connect_update_associate_table_page_size (HelperAgentSlotInt *slot);
1168 * @brief Connect a slot to Helper turn on log signal.
1170 * This signal is used to turn on Helper ISE debug information.
1172 * The prototype of the slot is:
1173 * void turn_on_log (const HelperAgent *agent, uint32 &on);
1175 Connection signal_connect_turn_on_log (HelperAgentSlotUintVoid *slot);
1178 * @brief Connect a slot to Helper update displayed candidate number signal.
1180 * This signal is used to inform helper ISE displayed candidate number.
1182 * The prototype of the slot is:
1183 * void update_displayed_candidate_number (const HelperAgent *, int ic, const String &uuid, int number);
1185 Connection signal_connect_update_displayed_candidate_number (HelperAgentSlotInt *slot);
1188 * @brief Connect a slot to Helper longpress candidate signal.
1190 * This signal is used to do something when candidate is longpress.
1192 * The prototype of the slot is:
1193 * void longpress_candidate (const HelperAgent *agent, int ic, const String &uuid, int index);
1195 Connection signal_connect_longpress_candidate (HelperAgentSlotInt *slot);
1198 * @brief Connect a slot to Helper update candidate item layout signal.
1200 * The prototype of the slot is:
1201 * void update_candidate_item_layout (const HelperAgent *, const std::vector<uint32> &row_items);
1203 Connection signal_connect_update_candidate_item_layout (HelperAgentSlotUintVector *slot);
1206 * @brief Connect a slot to Helper process key event signal.
1208 * The prototype of the slot is:
1209 * void process_key_event (const HelperAgent *, KeyEvent &key, uint32 &ret);
1211 Connection signal_connect_process_key_event (HelperAgentSlotKeyEventUint *slot);
1214 * @brief Connect a slot to Helper set input mode signal.
1216 * This signal is used to set Helper ISE input mode.
1218 * The prototype of the slot is:
1219 * void set_input_mode (const HelperAgent *agent, uint32 &input_mode);
1221 Connection signal_connect_set_input_mode (HelperAgentSlotUintVoid *slot);
1224 * @brief Connect a slot to Helper set input hint signal.
1226 * This signal is used to set Helper ISE input hint.
1228 * The prototype of the slot is:
1229 * void set_input_hint (const HelperAgent *agent, uint32 &input_hint);
1231 Connection signal_connect_set_input_hint (HelperAgentSlotUintVoid *slot);
1234 * @brief Connect a slot to Helper update bidi direction signal.
1236 * This signal is used to update Helper ISE bidi direction.
1238 * The prototype of the slot is:
1239 * void update_bidi_direction (const HelperAgent *agent, uint32 &bidi_direction);
1241 Connection signal_connect_update_bidi_direction (HelperAgentSlotUintVoid *slot);
1246 } /* namespace scim */
1254 #endif /* __SCIM_HELPER_H */
1257 vi:ts=4:nowrap:ai:expandtab