84ef5e6daddb6b805831c26db53d3901ede8d851
[platform/core/uifw/isf.git] / ism / src / scim_helper.h
1 /**
2  * @file scim_helper.h
3  * @brief Defines scim::HelperAgent and it's related types.
4  *
5  * scim::HelperAgent is a class used to write Client Helper modules.
6  *
7  */
8
9 /* ISF is based on SCIM 1.4.7 and extended for supporting more mobile fitable. */
10
11 /*
12  * Smart Common Input Method
13  *
14  * Copyright (c) 2004-2005 James Su <suzhe@tsinghua.org.cn>
15  * Copyright (c) 2012-2015 Samsung Electronics Co., Ltd.
16  *
17  *
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.
22  *
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.
27  *
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
32  *
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 ()
40  *
41  * $Id: scim_helper.h,v 1.16 2005/05/24 12:22:51 suzhe Exp $
42  */
43
44 #ifndef __SCIM_HELPER_H
45 #define __SCIM_HELPER_H
46
47 #include "scim_utility.h"
48
49 #ifndef SCIM_HELPER_LAUNCHER_PROGRAM
50 #define SCIM_HELPER_LAUNCHER_PROGRAM  (SCIM_LIBEXECDIR "/scim-helper-launcher")
51 #endif
52
53 namespace scim {
54
55 /**
56  * @addtogroup Helper
57  * @ingroup InputServiceFramework
58  * The accessory classes to help develop and manage Client Helper objects.
59  * @{
60  */
61 class EXAPI HelperError: public Exception
62 {
63 public:
64     HelperError (const String& what_arg)
65         : Exception (String("scim::Helper: ") + what_arg) { }
66 };
67
68 /**
69  * @brief Helper option indicates that it's a stand alone Helper.
70  *
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
75  * clicking the items.
76  */
77 const uint32 SCIM_HELPER_STAND_ALONE             = 1;
78
79 /**
80  * @brief Helper option indicates that it must be started
81  * automatically when Panel starts.
82  *
83  * If Helper objects want to start itself as soon as
84  * the Panel starts, set this option.
85  */
86 const uint32 SCIM_HELPER_AUTO_START              = (1<<1);
87
88 /**
89  * @brief Helper option indicates that it should be restarted
90  * when it exits abnormally.
91  *
92  * This option should not be used with #SCIM_HELPER_STAND_ALONE.
93  */
94 const uint32 SCIM_HELPER_AUTO_RESTART            = (1<<2);
95
96 /**
97  * @brief Helper option indicates that it needs the screen update
98  * information.
99  *
100  * Helper object with this option will receive the UPDATE_SCREEN event
101  * when the screen of focused ic is changed.
102  */
103 const uint32 SCIM_HELPER_NEED_SCREEN_INFO        = (1<<3);
104
105 /**
106  * @brief Helper option indicates that it needs the spot location
107  * information.
108  *
109  * Helper object with this option will receive the SPOT_LOCATION_INFO event
110  * when the spot location of focused ic is changed.
111  */
112 const uint32 SCIM_HELPER_NEED_SPOT_LOCATION_INFO = (1<<4);
113
114 /**
115  * @brief ISE option indicates whether helper ISE handles the keyboard keyevent
116  */
117 const uint32 ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT = (1<<16);
118
119 /**
120  * @brief ISE option indicates whether it should be hidden in control panel.
121  */
122 const uint32 ISM_ISE_HIDE_IN_CONTROL_PANEL       = (1<<17);
123
124 /**
125  * @brief ISE option for 3rd party; IMEngine is not available.
126  */
127 const uint32 ISM_HELPER_WITHOUT_IMENGINE         = (1<<18);
128
129 /**
130  * @brief Structure to hold the information of a Helper object.
131  */
132 struct HelperInfo
133 {
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 */
139
140     HelperInfo (const String &puuid = String (),
141                 const String &pname = String (),
142                 const String &picon = String (),
143                 const String &pdesc = String (),
144                 uint32 opt = 0)
145         : uuid (puuid),
146           name (pname),
147           icon (picon),
148           description (pdesc),
149           option (opt) {
150     }
151 };
152
153 enum HelperState
154 {
155     HELPER_SHOWED,
156     HELPER_HIDED,
157     HELPER_INVALID_STATE
158 };
159
160 class MessageItem;
161 class HelperAgent;
162
163 typedef Slot3<void, const HelperAgent *, int, const String &>
164         HelperAgentSlotVoid;
165
166 typedef Slot4<void, const HelperAgent *, int, const String &, const String &>
167         HelperAgentSlotString;
168
169 typedef Slot4<void, const HelperAgent *, int, const String &, const std::vector<String> &>
170         HelperAgentSlotStringVector;
171
172 typedef Slot5<void, const HelperAgent *, int, const String &, const String &, const String &>
173         HelperAgentSlotString2;
174
175 typedef Slot4<void, const HelperAgent *, int, const String &, int>
176         HelperAgentSlotInt;
177
178 typedef Slot5<void, const HelperAgent *, int, const String &, int, int>
179         HelperAgentSlotIntInt;
180
181 typedef Slot4<void, const HelperAgent *, int, const String &, const Transaction &>
182         HelperAgentSlotTransaction;
183
184 typedef Slot4<void, const HelperAgent *, int, const String &, const rectinfo &>
185         HelperAgentSlotRect;
186
187 typedef Slot2<void, const HelperAgent *, struct rectinfo &>
188         HelperAgentSlotSize;
189
190 typedef Slot2<void, const HelperAgent *, uint32 &>
191         HelperAgentSlotUintVoid;
192
193 typedef Slot3<void, const HelperAgent *, int, uint32 &>
194         HelperAgentSlotIntUint;
195
196 typedef Slot3<void, const HelperAgent *, char *, size_t &>
197         HelperAgentSlotRawVoid;
198
199 typedef Slot3<void, const HelperAgent *, char **, size_t &>
200         HelperAgentSlotGetRawVoid;
201
202 typedef Slot4<void, const HelperAgent *, int, char *, size_t &>
203         HelperAgentSlotIntRawVoid;
204
205 typedef Slot3<void, const HelperAgent *, int, char **>
206         HelperAgentSlotIntGetStringVoid;
207
208 typedef Slot2<void, const HelperAgent *, const std::vector<uint32> &>
209         HelperAgentSlotUintVector;
210
211 typedef Slot2<void, const HelperAgent *, LookupTable &>
212         HelperAgentSlotLookupTable;
213
214 typedef Slot3<void, const HelperAgent *, KeyEvent &, uint32 &>
215         HelperAgentSlotKeyEventUint;
216
217 typedef Slot3<void, const HelperAgent *, KeyEvent &, uint32>
218         HelperAgentSlotKeyEventUint2;
219
220 typedef Slot4<void, const HelperAgent *, KeyEvent &, uint32 &, uint32>
221         HelperAgentSlotKeyEventUintUint;
222
223 typedef Slot5<void, const HelperAgent *, uint32 &, char *, size_t &, uint32 &>
224         HelperAgentSlotUintCharSizeUint;
225
226 typedef Slot2<void, const HelperAgent *, const String &>
227         HelperAgentSlotStringVoid;
228
229 /**
230  * @brief The accessory class to write a Helper object.
231  *
232  * This class implements all Socket Transaction protocol between
233  * Helper object and Panel.
234  */
235 class EXAPI HelperAgent
236 {
237     class HelperAgentImpl;
238     HelperAgentImpl *m_impl;
239
240     HelperAgent (const HelperAgent &);
241     const HelperAgent & operator = (const HelperAgent &);
242
243 public:
244     HelperAgent  ();
245     ~HelperAgent ();
246
247     /**
248      * @brief Open socket connection to the Panel.
249      *
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.
252      *
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.
256      *
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.
260      *
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.
263      *
264      * @param info The information of this Helper object.
265      * @param display The display which this Helper object should run on.
266      *
267      * @return The connection socket id. -1 means failed to create
268      *         the connection.
269      */
270     int  open_connection        (const HelperInfo   &info,
271                                  const String       &display);
272
273     /**
274      * @brief Close the socket connection to Panel.
275      */
276     void close_connection       ();
277
278     /**
279      * @brief Get the connection id previously returned by open_connection().
280      *
281      * @return the connection id
282      */
283     int  get_connection_number  () const;
284
285     /**
286      * @brief Check whether this HelperAgent has been connected to a Panel.
287      *
288      * Return true when it is connected to panel, otherwise return false.
289      */
290     bool is_connected           () const;
291
292     /**
293      * @brief Check if there are any events available to be processed.
294      *
295      * If it returns true then Helper object should call
296      * HelperAgent::filter_event() to process them.
297      *
298      * @return true if there are any events available.
299      */
300     bool has_pending_event      () const;
301
302     /**
303      * @brief Process the pending events.
304      *
305      * This function will emit the corresponding signals according
306      * to the events.
307      *
308      * @return false if the connection is broken, otherwise return true.
309      */
310     bool filter_event           ();
311
312     /**
313     * @brief Read messages from socket buffer, and see if there is a message with the given cmd.
314     *
315     * @return false if the connection is broken, or no message available with given cmd. Otherwise return true.
316     */
317     bool wait_for_message       (int cmd, int timeout);
318
319     /**
320     * @brief Process one message that is in our message queue.
321     *
322     * This function will emit the corresponding signals according
323     * to the events.
324     *
325     * @param message The message that needs to be handled.
326     *
327     * @return false if the connection is broken, otherwise return true.
328     */
329     bool handle_message         (MessageItem *message);
330
331     /**
332      * @brief Request SCIM to reload all configuration.
333      *
334      * This function should only by used by Setup Helper to request
335      * scim's reloading the configuration.
336      */
337     void reload_config          () const;
338
339     /**
340      * @brief Register some properties into Panel.
341      *
342      * This function send the request to Panel to register a list
343      * of Properties.
344      *
345      * @param properties The list of Properties to be registered into Panel.
346      *
347      * @sa scim::Property.
348      */
349     void register_properties    (const PropertyList &properties) const;
350
351     /**
352      * @brief Update a registered property.
353      *
354      * @param property The property to be updated.
355      */
356     void update_property        (const Property     &property) const;
357
358     /**
359      * @brief Send a set of events to an IMEngineInstance.
360      *
361      * All events should be put into a Transaction.
362      * And the events can only be received by one IMEngineInstance object.
363      *
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.
367      */
368     void send_imengine_event    (int                 ic,
369                                  const String       &ic_uuid,
370                                  const Transaction  &trans) const;
371
372     /**
373      * @brief Send a KeyEvent to an IMEngineInstance.
374      *
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.
379      */
380     void send_key_event         (int                 ic,
381                                  const String       &ic_uuid,
382                                  const KeyEvent     &key) const;
383
384     /**
385      * @brief Forward a KeyEvent to client application directly.
386      *
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.
392      */
393     void forward_key_event      (int                 ic,
394                                  const String       &ic_uuid,
395                                  const KeyEvent     &key) const;
396
397     /**
398      * @brief Commit a WideString to client application directly.
399      *
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.
405      */
406     void commit_string          (int                 ic,
407                                  const String       &ic_uuid,
408                                  const WideString   &wstr) const;
409
410     /**
411      * @brief Commit a UTF-8 String to client application directly.
412      *
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.
419      */
420     void commit_string          (int                 ic,
421                                  const String       &ic_uuid,
422                                  const char         *buf,
423                                  int                 buflen) const;
424
425     /**
426      * @brief Request to show preedit string.
427      *
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.
432      */
433     void show_preedit_string    (int                 ic,
434                                  const String       &ic_uuid) const;
435
436     /**
437      * @brief Request to show aux string.
438      */
439     void show_aux_string        (void) const;
440
441     /**
442      * @brief Request to show candidate string.
443      */
444     void show_candidate_string  (void) const;
445
446     /**
447      * @brief Request to show associate string.
448      */
449     void show_associate_string  (void) const;
450
451     /**
452      * @brief Request to hide preedit string.
453      *
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.
458      */
459     void hide_preedit_string    (int                 ic,
460                                  const String       &ic_uuid) const;
461
462     /**
463      * @brief Request to hide aux string.
464      */
465     void hide_aux_string        (void) const;
466
467     /**
468      * @brief Request to hide candidate string.
469      */
470     void hide_candidate_string  (void) const;
471
472     /**
473      * @brief Request to hide associate string.
474      */
475     void hide_associate_string  (void) const;
476
477     /**
478      * @brief Update a new WideString for preedit.
479      *
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.
486      */
487     void update_preedit_string  (int                 ic,
488                                  const String       &ic_uuid,
489                                  const WideString   &wstr,
490                                  const AttributeList &attrs) const;
491
492     /**
493      * @brief Update a new UTF-8 string for preedit.
494      *
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.
502      */
503     void update_preedit_string  (int                 ic,
504                                  const String       &ic_uuid,
505                                  const char         *buf,
506                                  int                 buflen,
507                                  const AttributeList &attrs) const;
508
509     /**
510      * @brief Update a new WideString and caret for preedit.
511      *
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.
519      */
520     void update_preedit_string  (int                 ic,
521                                  const String       &ic_uuid,
522                                  const WideString    &wstr,
523                                  const AttributeList &attrs,
524                                  int                 caret) const;
525
526     /**
527      * @brief Update a new UTF-8 string and caret for preedit.
528      *
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.
537      */
538     void update_preedit_string  (int                 ic,
539                                  const String       &ic_uuid,
540                                  const char         *buf,
541                                  int                 buflen,
542                                  const AttributeList &attrs,
543                                  int                 caret) const;
544
545     /**
546      * @brief Update a new WideString and caret for preedit.
547      *
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.
556      *
557      * The commit string can be used to replace the preedit string on reset
558      * for example on unfocus.
559      */
560
561     void update_preedit_string (int                  ic,
562                                             const String        &ic_uuid,
563                                             const WideString    &preedit,
564                                             const WideString    &commit,
565                                             const AttributeList &attrs,
566                                             int                  caret) const;
567
568     /**
569      * @brief Update a new string for aux.
570      *
571      * @param str The string to be updated.
572      * @param attrs The attribute list for aux string.
573      */
574     void update_aux_string      (const String       &str,
575                                  const AttributeList &attrs) const;
576
577     /**
578      * @brief Request to update candidate.
579      *
580      * @param table The lookup table for candidate.
581      */
582     void update_candidate_string (const LookupTable &table) const;
583
584     /**
585      * @brief Request to update associate.
586      *
587      * @param table The lookup table for associate.
588      */
589     void update_associate_string (const LookupTable &table) const;
590
591     /**
592      * @brief When the input context of ISE is changed,
593      *         ISE can call this function to notify application
594      *
595      * @param type  type of event.
596      * @param value value of event.
597      */
598     void update_input_context     (uint32                       type,
599                                    uint32                       value) const;
600
601     /**
602      * @brief Request to get surrounding text asynchronously.
603      *
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.
607      */
608     void get_surrounding_text     (const String                &uuid,
609                                    int                          maxlen_before,
610                                    int                          maxlen_after) const;
611
612     /**
613      * @brief Request to get surrounding text synchronously.
614      *
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.
619      */
620     void get_surrounding_text (int maxlen_before, int maxlen_after, String &text, int &cursor);
621
622     /**
623      * @brief Request to delete surrounding text.
624      *
625      * @param offset The offset for cursor position.
626      * @param len The length for delete text.
627      */
628     void delete_surrounding_text  (int                          offset,
629                                    int                          len) const;
630
631     /**
632      * @brief Request to get selection.
633      *
634      * @param uuid The helper ISE UUID.
635      */
636     void get_selection       (const String                &uuid) const;
637
638     /**
639      * @brief Request to get selection text synchronously.
640      *
641      * @param text The selection text.
642      */
643     void get_selection_text       (String                      &text);
644
645     /**
646      * @brief Request to selected text.
647      *
648      * @param start The start position in text.
649      * @param end The end position in text.
650      */
651     void set_selection       (int                          start,
652                               int                          end) const;
653
654     /**
655      * @brief Set candidate position in screen.
656      *
657      * @param left The x position in screen.
658      * @param top The y position in screen.
659      */
660     void set_candidate_position   (int                          left,
661                                    int                          top) const;
662
663     /**
664      * @brief Request to hide candidate window.
665      */
666     void candidate_hide           (void) const;
667
668     /**
669      * @brief Request to get candidate window size and position.
670      *
671      * @param uuid The helper ISE UUID.
672      */
673     void get_candidate_window_geometry (const String           &uuid) const;
674
675     /**
676      * @brief Set current keyboard ISE.
677      *
678      * @param uuid The keyboard ISE UUID.
679      */
680     void set_keyboard_ise_by_uuid (const String                &uuid) const;
681
682     /**
683      * @brief Request to get current keyboard ISE information.
684      *
685      * @param uuid The helper ISE UUID.
686      */
687     void get_keyboard_ise         (const String                &uuid) const;
688
689     /**
690      * @brief Request to get uuid list of all keyboard ISEs.
691      *
692      * @param uuid The helper ISE UUID.
693      */
694     void get_keyboard_ise_list    (const String                &uuid) const;
695
696     /**
697      * @brief Update ISE window geometry.
698      *
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.
703      */
704     void update_geometry          (int                          x,
705                                    int                          y,
706                                    int                          width,
707                                    int                          height) const;
708
709     /**
710      * @brief Request to expand candidate window.
711      */
712     void expand_candidate         (void) const;
713
714     /**
715      * @brief Request to contract candidate window.
716      */
717     void contract_candidate       (void) const;
718
719     /**
720      * @brief Send selected candidate string index number.
721      */
722     void select_candidate         (int index) const;
723
724     /**
725      * @brief Update ise exit status
726      */
727     void update_ise_exit          (void) const;
728
729     /**
730      * @brief Update the preedit caret position in the preedit string.
731      *
732      * @param caret - the new position of the preedit caret.
733      */
734     void update_preedit_caret     (int                          caret) const;
735
736     /**
737      * @brief Set candidate style.
738      *
739      * @param portrait_line - the displayed line number for portrait.
740      * @param mode          - candidate window mode.
741      */
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;
744
745     /**
746      * @brief Request to reset keyboard ISE.
747      */
748     void reset_keyboard_ise       (void) const;
749
750     /**
751      * @brief Request to flush keyboard ISE.
752      */
753     void flush_keyboard_ise       (void) const;
754
755     /**
756      * @brief Send a private command to an application
757      *
758      * @param command The private command sent from IME.
759      */
760     void send_private_command     (const String                &command) const;
761
762     /**
763      * @brief Commit content to an application
764      *
765      * @param content The content sent from IME.
766      */
767     void commit_content           (const String                &content,
768                                    const String                &description,
769                                    const String                &mime_types) const;
770
771     /**
772      * @brief Request panel to hide ISE, since in some cases ISE cannot hide itself (e.g. WAYLAND)
773      */
774     void request_ise_hide         (void) const;
775
776     void recapture_string         (int                  ic,
777                                    const String        &ic_uuid,
778                                    int                  offset,
779                                    int                  len,
780                                    const WideString    &preedit_str,
781                                    const WideString    &commit_str,
782                                    const AttributeList &attrs) const;
783
784     void set_engine_loader_flag   (bool                          flag);
785
786     void send_key_event_processing_result   (KeyEvent     &key,
787                                              uint32        serial,
788                                              bool          is_success) const;
789
790 public:
791     /**
792      * @brief Connect a slot to Helper exit signal.
793      *
794      * This signal is used to let the Helper exit.
795      *
796      * The prototype of the slot is:
797      *
798      * void exit (const HelperAgent *agent, int ic, const String &ic_uuid);
799      *
800      * Parameters:
801      * - agent    The pointer to the HelperAgent object which emits this signal.
802      * - ic       An opaque handle of the currently focused input context.
803      * - ic_uuid  The UUID of the IMEngineInstance associated with the focused input context.
804      */
805     Connection signal_connect_exit                   (HelperAgentSlotVoid        *slot);
806
807     /**
808      * @brief Connect a slot to Helper attach input context signal.
809      *
810      * This signal is used to attach an input context to this helper.
811      *
812      * When an input context requst to start this helper, then this
813      * signal will be emitted as soon as the helper is started.
814      *
815      * When an input context want to start an already started helper,
816      * this signal will also be emitted.
817      *
818      * Helper can send some events back to the IMEngineInstance in this
819      * signal-slot, to inform that it has been started sccessfully.
820      *
821      * The prototype of the slot is:
822      *
823      * void attach_input_context (const HelperAgent *agent, int ic, const String &ic_uuid);
824      */
825     Connection signal_connect_attach_input_context   (HelperAgentSlotVoid        *slot);
826
827     /**
828      * @brief Connect a slot to Helper detach input context signal.
829      *
830      * This signal is used to detach an input context from this helper.
831      *
832      * When an input context requst to stop this helper, then this
833      * signal will be emitted.
834      *
835      * Helper shouldn't send any event back to the IMEngineInstance, because
836      * the IMEngineInstance attached to the ic should have been destroyed.
837      *
838      * The prototype of the slot is:
839      *
840      * void detach_input_context (const HelperAgent *agent, int ic, const String &ic_uuid);
841      */
842     Connection signal_connect_detach_input_context   (HelperAgentSlotVoid        *slot);
843
844     /**
845      * @brief Connect a slot to Helper reload config signal.
846      *
847      * This signal is used to let the Helper reload configuration.
848      *
849      * The prototype of the slot is:
850      *
851      * void reload_config (const HelperAgent *agent, int ic, const String &ic_uuid);
852      */
853     Connection signal_connect_reload_config          (HelperAgentSlotVoid        *slot);
854
855     /**
856      * @brief Connect a slot to Helper update screen signal.
857      *
858      * This signal is used to let the Helper move its GUI to another screen.
859      * It can only be emitted when SCIM_HELPER_NEED_SCREEN_INFO is set in HelperInfo.option.
860      *
861      * The prototype of the slot is:
862      *
863      * void update_screen (const HelperAgent *agent, int ic, const String &ic_uuid, int screen_number);
864      */
865     Connection signal_connect_update_screen          (HelperAgentSlotInt         *slot);
866
867     /**
868      * @brief Connect a slot to Helper update spot location signal.
869      *
870      * This signal is used to let the Helper move its GUI according to the current spot location.
871      * It can only be emitted when SCIM_HELPER_NEED_SPOT_LOCATION_INFO is set in HelperInfo.option.
872      *
873      * The prototype of the slot is:
874      * void update_spot_location (const HelperAgent *agent, int ic, const String &ic_uuid, int x, int y);
875      */
876     Connection signal_connect_update_spot_location   (HelperAgentSlotIntInt      *slot);
877
878     /**
879      * @brief Connect a slot to Helper update cursor position signal.
880      *
881      * This signal is used to let the Helper get the cursor position information.
882      *
883      * The prototype of the slot is:
884      * void update_cursor_position (const HelperAgent *agent, int ic, const String &ic_uuid, int cursor_pos);
885      */
886     Connection signal_connect_update_cursor_position (HelperAgentSlotInt         *slot);
887
888     /**
889      * @brief Connect a slot to Helper update surrounding text signal.
890      *
891      * This signal is used to let the Helper get the surrounding text.
892      *
893      * The prototype of the slot is:
894      * void update_surrounding_text (const HelperAgent *agent, int ic, const String &text, int cursor);
895      */
896     Connection signal_connect_update_surrounding_text (HelperAgentSlotInt        *slot);
897
898     /**
899      * @brief Connect a slot to Helper update selection signal.
900      *
901      * This signal is used to let the Helper get the selection.
902      *
903      * The prototype of the slot is:
904      * void update_selection (const HelperAgent *agent, int ic, const String &text);
905      */
906     Connection signal_connect_update_selection (HelperAgentSlotVoid        *slot);
907
908     /**
909      * @brief Connect a slot to Helper trigger property signal.
910      *
911      * This signal is used to trigger a property registered by this Helper.
912      * A property will be triggered when user clicks on it.
913      *
914      * The prototype of the slot is:
915      * void trigger_property (const HelperAgent *agent, int ic, const String &ic_uuid, const String &property);
916      */
917     Connection signal_connect_trigger_property       (HelperAgentSlotString      *slot);
918
919     /**
920      * @brief Connect a slot to Helper process imengine event signal.
921      *
922      * This signal is used to deliver the events sent from IMEngine to Helper.
923      *
924      * The prototype of the slot is:
925      * void process_imengine_event (const HelperAgent *agent, int ic, const String &ic_uuid, const Transaction &transaction);
926      */
927     Connection signal_connect_process_imengine_event (HelperAgentSlotTransaction *slot);
928
929     /**
930      * @brief Connect a slot to Helper focus out signal.
931      *
932      * This signal is used to do something when input context is focus out.
933      *
934      * The prototype of the slot is:
935      * void focus_out (const HelperAgent *agent, int ic, const String &ic_uuid);
936      */
937     Connection signal_connect_focus_out                         (HelperAgentSlotVoid                *slot);
938
939     /**
940      * @brief Connect a slot to Helper focus in signal.
941      *
942      * This signal is used to do something when input context is focus in.
943      *
944      * The prototype of the slot is:
945      * void focus_in (const HelperAgent *agent, int ic, const String &ic_uuid);
946      */
947     Connection signal_connect_focus_in                          (HelperAgentSlotVoid                *slot);
948
949     /**
950      * @brief Connect a slot to Helper show signal.
951      *
952      * This signal is used to show Helper ISE window.
953      *
954      * The prototype of the slot is:
955      * void ise_show (const HelperAgent *agent, int ic, char *buf, size_t &len);
956      */
957     Connection signal_connect_ise_show                          (HelperAgentSlotIntRawVoid          *slot);
958
959     /**
960      * @brief Connect a slot to Helper hide signal.
961      *
962      * This signal is used to hide Helper ISE window.
963      *
964      * The prototype of the slot is:
965      * void ise_hide (const HelperAgent *agent, int ic, const String &ic_uuid);
966      */
967     Connection signal_connect_ise_hide                          (HelperAgentSlotVoid                *slot);
968
969     /**
970      * @brief Connect a slot to Helper get ISE window geometry signal.
971      *
972      * This signal is used to get Helper ISE window size and position.
973      *
974      * The prototype of the slot is:
975      * void get_geometry (const HelperAgent *agent, struct rectinfo &info);
976      */
977     Connection signal_connect_get_geometry                      (HelperAgentSlotSize                *slot);
978
979     /**
980      * @brief Connect a slot to Helper set mode signal.
981      *
982      * This signal is used to set Helper ISE mode.
983      *
984      * The prototype of the slot is:
985      * void set_mode (const HelperAgent *agent, uint32 &mode);
986      */
987     Connection signal_connect_set_mode                          (HelperAgentSlotUintVoid            *slot);
988
989     /**
990      * @brief Connect a slot to Helper set language signal.
991      *
992      * This signal is used to set Helper ISE language.
993      *
994      * The prototype of the slot is:
995      * void set_language (const HelperAgent *agent, uint32 &language);
996      */
997     Connection signal_connect_set_language                      (HelperAgentSlotUintVoid            *slot);
998
999     /**
1000      * @brief Connect a slot to Helper set im data signal.
1001      *
1002      * This signal is used to send im data to Helper ISE.
1003      *
1004      * The prototype of the slot is:
1005      * void set_imdata (const HelperAgent *agent, char *buf, size_t &len);
1006      */
1007     Connection signal_connect_set_imdata                        (HelperAgentSlotRawVoid             *slot);
1008
1009     /**
1010      * @brief Connect a slot to Helper get im data signal.
1011      *
1012      * This signal is used to get im data from Helper ISE.
1013      *
1014      * The prototype of the slot is:
1015      * void get_imdata (const HelperAgent *, char **buf, size_t &len);
1016      */
1017     Connection signal_connect_get_imdata                        (HelperAgentSlotGetRawVoid          *slot);
1018
1019     /**
1020      * @brief Connect a slot to Helper get language locale.
1021      *
1022      * This signal is used to get language locale from Helper ISE.
1023      *
1024      * The prototype of the slot is:
1025      * void get_language_locale (const HelperAgent *, int ic, char **locale);
1026      */
1027     Connection signal_connect_get_language_locale               (HelperAgentSlotIntGetStringVoid    *slot);
1028
1029     /**
1030      * @brief Connect a slot to Helper set return key type signal.
1031      *
1032      * This signal is used to set return key type to Helper ISE.
1033      *
1034      * The prototype of the slot is:
1035      * void set_return_key_type (const HelperAgent *agent, uint32 &type);
1036      */
1037     Connection signal_connect_set_return_key_type               (HelperAgentSlotUintVoid            *slot);
1038
1039     /**
1040      * @brief Connect a slot to Helper get return key type signal.
1041      *
1042      * This signal is used to get return key type from Helper ISE.
1043      *
1044      * The prototype of the slot is:
1045      * void get_return_key_type (const HelperAgent *agent, uint32 &type);
1046      */
1047     Connection signal_connect_get_return_key_type               (HelperAgentSlotUintVoid            *slot);
1048
1049     /**
1050      * @brief Connect a slot to Helper set return key disable signal.
1051      *
1052      * This signal is used to set return key disable to Helper ISE.
1053      *
1054      * The prototype of the slot is:
1055      * void set_return_key_disable (const HelperAgent *agent, uint32 &disabled);
1056      */
1057     Connection signal_connect_set_return_key_disable            (HelperAgentSlotUintVoid            *slot);
1058
1059     /**
1060      * @brief Connect a slot to Helper get return key disable signal.
1061      *
1062      * This signal is used to get return key disable from Helper ISE.
1063      *
1064      * The prototype of the slot is:
1065      * void get_return_key_disable (const HelperAgent *agent, uint32 &disabled);
1066      */
1067     Connection signal_connect_get_return_key_disable            (HelperAgentSlotUintVoid            *slot);
1068
1069     /**
1070      * @brief Connect a slot to Helper get layout signal.
1071      *
1072      * This signal is used to get Helper ISE layout.
1073      *
1074      * The prototype of the slot is:
1075      * void get_layout (const HelperAgent *agent, uint32 &layout);
1076      */
1077     Connection signal_connect_get_layout                        (HelperAgentSlotUintVoid            *slot);
1078
1079     /**
1080      * @brief Connect a slot to Helper set layout signal.
1081      *
1082      * This signal is used to set Helper ISE layout.
1083      *
1084      * The prototype of the slot is:
1085      * void set_layout (const HelperAgent *agent, uint32 &layout);
1086      */
1087     Connection signal_connect_set_layout                        (HelperAgentSlotUintVoid            *slot);
1088
1089     /**
1090      * @brief Connect a slot to Helper set shift mode signal.
1091      *
1092      * This signal is used to set Helper shift mode.
1093      *
1094      * The prototype of the slot is:
1095      * void set_caps_mode (const HelperAgent *agent, uint32 &mode);
1096      */
1097     Connection signal_connect_set_caps_mode                     (HelperAgentSlotUintVoid            *slot);
1098
1099     /**
1100      * @brief Connect a slot to Helper reset input context signal.
1101      *
1102      * This signal is used to reset Helper ISE input context.
1103      *
1104      * The prototype of the slot is:
1105      * void reset_input_context (const HelperAgent *agent, int ic, const String &uuid);
1106      */
1107     Connection signal_connect_reset_input_context               (HelperAgentSlotVoid                *slot);
1108
1109     /**
1110      * @brief Connect a slot to Helper update candidate window geometry signal.
1111      *
1112      * This signal is used to get candidate window size and position.
1113      *
1114      * The prototype of the slot is:
1115      * void update_candidate_geometry (const HelperAgent *agent, int ic, const String &uuid, const rectinfo &info);
1116      */
1117     Connection signal_connect_update_candidate_geometry         (HelperAgentSlotRect                *slot);
1118
1119     /**
1120      * @brief Connect a slot to Helper update keyboard ISE signal.
1121      *
1122      * This signal is used to get current keyboard ISE name and uuid.
1123      *
1124      * The prototype of the slot is:
1125      * void update_keyboard_ise (const HelperAgent *agent, int ic, const String &uuid,
1126      *                           const String &ise_name, const String &ise_uuid);
1127      */
1128     Connection signal_connect_update_keyboard_ise               (HelperAgentSlotString2             *slot);
1129
1130     /**
1131      * @brief Connect a slot to Helper update keyboard ISE list signal.
1132      *
1133      * This signal is used to get uuid list of all keyboard ISEs.
1134      *
1135      * The prototype of the slot is:
1136      * void update_keyboard_ise_list (const HelperAgent *agent, int ic, const String &uuid,
1137      *                                const std::vector<String> &ise_list);
1138      */
1139     Connection signal_connect_update_keyboard_ise_list          (HelperAgentSlotStringVector        *slot);
1140
1141     /**
1142      * @brief Connect a slot to Helper candidate more window show signal.
1143      *
1144      * This signal is used to do someting when candidate more window is showed.
1145      *
1146      * The prototype of the slot is:
1147      * void candidate_more_window_show (const HelperAgent *agent, int ic, const String &uuid);
1148      */
1149     Connection signal_connect_candidate_more_window_show        (HelperAgentSlotVoid                *slot);
1150
1151     /**
1152      * @brief Connect a slot to Helper candidate more window hide signal.
1153      *
1154      * This signal is used to do someting when candidate more window is hidden.
1155      *
1156      * The prototype of the slot is:
1157      * void candidate_more_window_hide (const HelperAgent *agent, int ic, const String &uuid);
1158      */
1159     Connection signal_connect_candidate_more_window_hide        (HelperAgentSlotVoid                *slot);
1160
1161     /**
1162      * @brief Connect a slot to Helper candidate show signal.
1163      *
1164      * This signal is used to do candidate show.
1165      *
1166      * The prototype of the slot is:
1167      * void candidate_show (const HelperAgent *agent, int ic, const String &uuid);
1168      */
1169     Connection signal_connect_candidate_show                    (HelperAgentSlotVoid                *slot);
1170
1171     /**
1172      * @brief Connect a slot to Helper candidate hide signal.
1173      *
1174      * This signal is used to do candidate hide.
1175      *
1176      * The prototype of the slot is:
1177      * void candidate_hide (const HelperAgent *agent,int ic, const String &uuid);
1178      */
1179     Connection signal_connect_candidate_hide                    (HelperAgentSlotVoid                *slot);
1180
1181     /**
1182      * @brief Connect a slot to Helper update lookup table signal.
1183      *
1184      * This signal is used to do someting when update lookup table.
1185      *
1186      * The prototype of the slot is:
1187      * void update_lookup_table (const HelperAgent *agent, int ic, const String &uuid, LookupTable &Table);
1188      */
1189     Connection signal_connect_update_lookup_table               (HelperAgentSlotLookupTable          *slot);
1190
1191     /**
1192      * @brief Connect a slot to Helper select aux signal.
1193      *
1194      * This signal is used to do something when aux is selected.
1195      *
1196      * The prototype of the slot is:
1197      * void select_aux (const HelperAgent *agent, int ic, const String &uuid, int index);
1198      */
1199     Connection signal_connect_select_aux                        (HelperAgentSlotInt                 *slot);
1200
1201     /**
1202      * @brief Connect a slot to Helper select candidate signal.
1203      *
1204      * This signal is used to do something when candidate is selected.
1205      *
1206      * The prototype of the slot is:
1207      * void select_candidate (const HelperAgent *agent, int ic, const String &uuid, int index);
1208      */
1209     Connection signal_connect_select_candidate                  (HelperAgentSlotInt                 *slot);
1210
1211     /**
1212      * @brief Connect a slot to Helper candidate table page up signal.
1213      *
1214      * This signal is used to do something when candidate table is paged up.
1215      *
1216      * The prototype of the slot is:
1217      * void candidate_table_page_up (const HelperAgent *agent, int ic, const String &uuid);
1218      */
1219     Connection signal_connect_candidate_table_page_up           (HelperAgentSlotVoid                *slot);
1220
1221     /**
1222      * @brief Connect a slot to Helper candidate table page down signal.
1223      *
1224      * This signal is used to do something when candidate table is paged down.
1225      *
1226      * The prototype of the slot is:
1227      * void candidate_table_page_down (const HelperAgent *agent, int ic, const String &uuid);
1228      */
1229     Connection signal_connect_candidate_table_page_down         (HelperAgentSlotVoid                *slot);
1230
1231     /**
1232      * @brief Connect a slot to Helper update candidate table page size signal.
1233      *
1234      * This signal is used to do something when candidate table page size is changed.
1235      *
1236      * The prototype of the slot is:
1237      * void update_candidate_table_page_size (const HelperAgent *, int ic, const String &uuid, int page_size);
1238      */
1239     Connection signal_connect_update_candidate_table_page_size  (HelperAgentSlotInt                 *slot);
1240
1241     /**
1242      * @brief Connect a slot to Helper select associate signal.
1243      *
1244      * This signal is used to do something when associate is selected.
1245      *
1246      * The prototype of the slot is:
1247      * void select_associate (const HelperAgent *agent, int ic, const String &uuid, int index);
1248      */
1249     Connection signal_connect_select_associate                  (HelperAgentSlotInt                 *slot);
1250
1251     /**
1252      * @brief Connect a slot to Helper associate table page up signal.
1253      *
1254      * This signal is used to do something when associate table is paged up.
1255      *
1256      * The prototype of the slot is:
1257      * void associate_table_page_up (const HelperAgent *agent, int ic, const String &uuid);
1258      */
1259     Connection signal_connect_associate_table_page_up           (HelperAgentSlotVoid                *slot);
1260
1261     /**
1262      * @brief Connect a slot to Helper associate table page down signal.
1263      *
1264      * This signal is used to do something when associate table is paged down.
1265      *
1266      * The prototype of the slot is:
1267      * void associate_table_page_down (const HelperAgent *agent, int ic, const String &uuid);
1268      */
1269     Connection signal_connect_associate_table_page_down         (HelperAgentSlotVoid                *slot);
1270
1271     /**
1272      * @brief Connect a slot to Helper update associate table page size signal.
1273      *
1274      * This signal is used to do something when associate table page size is changed.
1275      *
1276      * The prototype of the slot is:
1277      * void update_associate_table_page_size (const HelperAgent *, int ic, const String &uuid, int page_size);
1278      */
1279     Connection signal_connect_update_associate_table_page_size  (HelperAgentSlotInt                 *slot);
1280
1281     /**
1282      * @brief Connect a slot to Helper turn on log signal.
1283      *
1284      * This signal is used to turn on Helper ISE debug information.
1285      *
1286      * The prototype of the slot is:
1287      * void turn_on_log (const HelperAgent *agent, uint32 &on);
1288      */
1289     Connection signal_connect_turn_on_log                       (HelperAgentSlotUintVoid            *slot);
1290
1291     /**
1292      * @brief Connect a slot to Helper update displayed candidate number signal.
1293      *
1294      * This signal is used to inform helper ISE displayed candidate number.
1295      *
1296      * The prototype of the slot is:
1297      * void update_displayed_candidate_number (const HelperAgent *, int ic, const String &uuid, int number);
1298      */
1299     Connection signal_connect_update_displayed_candidate_number (HelperAgentSlotInt                 *slot);
1300
1301     /**
1302      * @brief Connect a slot to Helper longpress candidate signal.
1303      *
1304      * This signal is used to do something when candidate is longpress.
1305      *
1306      * The prototype of the slot is:
1307      * void longpress_candidate (const HelperAgent *agent, int ic, const String &uuid, int index);
1308      */
1309     Connection signal_connect_longpress_candidate               (HelperAgentSlotInt                 *slot);
1310
1311     /**
1312      * @brief Connect a slot to Helper update candidate item layout signal.
1313      *
1314      * The prototype of the slot is:
1315      * void update_candidate_item_layout (const HelperAgent *, const std::vector<uint32> &row_items);
1316      */
1317     Connection signal_connect_update_candidate_item_layout      (HelperAgentSlotUintVector          *slot);
1318
1319      /**
1320      * @brief Connect a slot to Helper process key event signal.
1321      *
1322      * The prototype of the slot is:
1323      * void process_key_event (const HelperAgent *, KeyEvent &key, uint32 &ret);
1324      */
1325     Connection signal_connect_process_key_event (HelperAgentSlotKeyEventUint *slot);
1326
1327     /**
1328      * @brief Connect a slot to Helper process key event with keycode signal.
1329      *
1330      * The prototype of the slot is:
1331      * void process_key_event_with_keycode (const HelperAgent *, KeyEvent &key, uint32 &ret, uint32 keycode);
1332      */
1333     Connection signal_connect_process_key_event_with_keycode (HelperAgentSlotKeyEventUintUint *slot);
1334
1335     /**
1336      * @brief Connect a slot to Helper set input mode signal.
1337      *
1338      * This signal is used to set Helper ISE input mode.
1339      *
1340      * The prototype of the slot is:
1341      * void set_input_mode (const HelperAgent *agent, uint32 &input_mode);
1342      */
1343     Connection signal_connect_set_input_mode                        (HelperAgentSlotUintVoid            *slot);
1344
1345     /**
1346      * @brief Connect a slot to Helper set input hint signal.
1347      *
1348      * This signal is used to set Helper ISE input hint.
1349      *
1350      * The prototype of the slot is:
1351      * void set_input_hint (const HelperAgent *agent, uint32 &input_hint);
1352      */
1353     Connection signal_connect_set_input_hint                        (HelperAgentSlotUintVoid            *slot);
1354
1355     /**
1356      * @brief Connect a slot to Helper update bidi direction signal.
1357      *
1358      * This signal is used to update Helper ISE bidi direction.
1359      *
1360      * The prototype of the slot is:
1361      * void update_bidi_direction (const HelperAgent *agent, uint32 &bidi_direction);
1362      */
1363     Connection signal_connect_update_bidi_direction                 (HelperAgentSlotUintVoid            *slot);
1364
1365     /**
1366      * @brief Connect a slot to Helper show option window.
1367      *
1368      * This signal is used to do request the ISE to show option window.
1369      *
1370      * The prototype of the slot is:
1371      * void show_option_window (const HelperAgent *agent, int ic, const String &uuid);
1372      */
1373     Connection signal_connect_show_option_window                    (HelperAgentSlotVoid                *slot);
1374
1375     /**
1376      * @brief Connect a slot to Helper resume option window.
1377      *
1378      * This signal is used to do request the ISE to resume option window.
1379      *
1380      * The prototype of the slot is:
1381      * void resume_option_window (const HelperAgent *agent, int ic, const String &uuid);
1382      */
1383     Connection signal_connect_resume_option_window                    (HelperAgentSlotVoid                *slot);
1384
1385     /**
1386      * @brief Connect a slot to Helper check if the option is available.
1387      *
1388      * This signal is used to request ISE to reply if the option (setting) is available.
1389      *
1390      * The prototype of the slot is:
1391      * void check_option_window (const HelperAgent *agent, uint32 &avail);
1392      */
1393     Connection signal_connect_check_option_window                   (HelperAgentSlotUintVoid            *slot);
1394
1395     /**
1396     * @brief Connect a slot to Helper process unconventional input device event signal.
1397     *
1398     * The prototype of the slot is:
1399     * void process_input_device_event (const HelperAgent *, uint32 &type, char *data, size_t &size, uint32 &ret);
1400     */
1401     Connection signal_connect_process_input_device_event            (HelperAgentSlotUintCharSizeUint *slot);
1402
1403     /**
1404      * @brief Connect a slot to Helper set prediction hint signal.
1405      *
1406      * This signal is used to send prediction hint to Helper ISE.
1407      *
1408      * The prototype of the slot is:
1409      * void set_prediction_hint (const HelperAgent *agent, char *prediction_hint);
1410      */
1411     Connection signal_connect_set_prediction_hint                   (HelperAgentSlotStringVoid          *slot);
1412
1413     /**
1414      * @brief Connect a slot to Helper set mime type signal.
1415      *
1416      * This signal is used to send mime type to Helper ISE.
1417      *
1418      * The prototype of the slot is:
1419      * void set_mime_type (const HelperAgent *agent, char *mime_type);
1420      */
1421     Connection signal_connect_set_mime_type                         (HelperAgentSlotStringVoid          *slot);
1422
1423     /**
1424      * @brief Connect a slot to Helper set prediction hint data signal.
1425      *
1426      * This signal is used to send prediction hint data to Helper ISE.
1427      *
1428      * The prototype of the slot is:
1429      * void set_prediction_hint_data (const HelperAgent *agent, char *key, char *value);
1430      */
1431     Connection signal_connect_set_prediction_hint_data              (HelperAgentSlotString              *slot);
1432
1433     /**
1434      * @brief Connect a slot to Helper set optimization hint signal.
1435      *
1436      * This signal is used to send optimization hint to Helper ISE.
1437      *
1438      * The prototype of the slot is:
1439      * void set_optimization_hint (const HelperAgent *agent, uint32 &hint);
1440      */
1441     Connection signal_connect_set_optimization_hint                 (HelperAgentSlotUintVoid            *slot);
1442
1443     /**
1444      * @brief Connect a slot to Helper process key event with imengine signal.
1445      *
1446      * The prototype of the slot is:
1447      * void process_key_event_with_imengine (const HelperAgent *, KeyEvent &key, uint32 serial);
1448      */
1449     Connection signal_connect_process_key_event_with_imengine       (HelperAgentSlotKeyEventUint2       *slot);
1450
1451     /**
1452      * @brief Connect a slot to Helper set autocapital type signal.
1453      *
1454      * This signal is used to send autocapital type to imengine.
1455      *
1456      * The prototype of the slot is:
1457      * void set_autocapital_type (const HelperAgent *agent, uint32 &type);
1458      */
1459     Connection signal_connect_set_autocapital_type                  (HelperAgentSlotUintVoid            *slot);
1460
1461     /**
1462      * @brief Connect a slot to Helper set prediction allow signal.
1463      *
1464      * This signal is used to send prediction allow to imengine.
1465      *
1466      * The prototype of the slot is:
1467      * void set_prediction_allow (const HelperAgent *agent, uint32 &prediction_allow);
1468      */
1469     Connection signal_connect_set_prediction_allow                  (HelperAgentSlotUintVoid            *slot);
1470 };
1471
1472 /**  @} */
1473
1474 } /* namespace scim */
1475
1476 struct ArgInfo
1477 {
1478     char **argv;
1479     int    argc;
1480 };
1481
1482 #endif /* __SCIM_HELPER_H */
1483
1484 /*
1485 vi:ts=4:nowrap:ai:expandtab
1486 */
1487