2
* Copyright (C) 2010, Intel Corporation.
4
* Author: Raymond Liu <raymond.liu@intel.com>
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public License
8
* version 2.1 as published by the Free Software Foundation.
10
* This library is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21
#ifndef _MEEGO_IM_PROXY_H
22
#define _MEEGO_IM_PROXY_H
25
#include <glib-object.h>
29
typedef struct _MeegoIMProxy MeegoIMProxy;
30
typedef struct _MeegoIMProxyClass MeegoIMProxyClass;
31
typedef struct _MeegoImProxyPrivate MeegoImProxyPrivate;
33
#define MEEGO_TYPE_IM_PROXY (meego_im_proxy_get_type())
34
#define MEEGO_IM_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), MEEGO_TYPE_IM_PROXY, MeegoIMProxy))
35
#define MEEGO_IM_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), MEEGO_TYPE_IM_PROXY, MeegoIMProxyClass))
36
#define MEEGO_IS_IM_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), MEEGO_TYPE_IM_PROXY))
37
#define MEEGO_IS_IM_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MEEGO_TYPE_IM_PROXY))
38
#define MEEGO_IM_PROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), MEEGO_TYPE_IM_PROXY, MeegoIMProxyClass))
41
typedef gboolean (*MeegoIMProxyLoadPluginSettingsFunction) (MeegoIMProxy *proxy, const gchar *locale_name);
43
struct _MeegoIMProxy {
45
MeegoImProxyPrivate *priv;
47
/* Used to observe calls during testing
48
* Over time it may make sense to convert all functions into
49
* c/glib style vfuncs to allow "inheritance" */
50
MeegoIMProxyLoadPluginSettingsFunction load_plugin_settings_observer;
53
struct _MeegoIMProxyClass {
57
GType meego_im_proxy_get_type(void);
59
MeegoIMProxy *meego_im_proxy_new(void);
60
void meego_im_proxy_connect(MeegoIMProxy *proxy, gpointer connection);
61
gboolean meego_im_proxy_activate_context(MeegoIMProxy *proxy);
62
gboolean meego_im_proxy_app_orientation_changed(MeegoIMProxy *proxy, const gint angle);
63
gboolean meego_im_proxy_hide_input_method(MeegoIMProxy *proxy);
65
// Not yet really implemented
66
gboolean meego_im_proxy_mouse_clicked_on_preedit(MeegoIMProxy *proxy, const GValueArray *pos,
67
const GValueArray *preedit_rect);
70
gboolean meego_im_proxy_update_widget_info(MeegoIMProxy *proxy, const GHashTable *state_information, gboolean focus_changed);
72
gboolean meego_im_proxy_process_key_event(MeegoIMProxy *proxy, const gint type, const gint code,
73
const gint modifiers, const char *text,
74
const gboolean auto_repeat, const gint count,
75
const guint native_scan_code,
76
const guint native_modifiers,
79
gboolean meego_im_proxy_reset(MeegoIMProxy *proxy);
80
gboolean meego_im_proxy_set_context_object(MeegoIMProxy *proxy, const char *object_name);
81
gboolean meego_im_proxy_set_copy_paste_state(MeegoIMProxy *proxy, const gboolean copy_available,
82
const gboolean paste_available);
83
gboolean meego_im_proxy_set_preedit(MeegoIMProxy *proxy, const char *text, const gint cursor_pos);
84
gboolean meego_im_proxy_show_input_method(MeegoIMProxy *proxy);
87
meego_im_proxy_register_extension (MeegoIMProxy *proxy,
89
const gchar *filename);
92
meego_im_proxy_unregister_extension (MeegoIMProxy *proxy,
96
meego_im_proxy_set_extended_attribute (MeegoIMProxy *proxy,
99
const gchar* target_item,
100
const gchar *attribute,
104
meego_im_proxy_load_plugin_settings (MeegoIMProxy *proxy,
105
const gchar *locale_name);
109
#endif //_MEEGO_IM_PROXY_H