diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 6f1e6b3ec..000000000 --- a/.gitignore +++ /dev/null @@ -1,48 +0,0 @@ -*.pyc -*.la -*.lo -*.loT -*.o -*.so -*.bak -*~ -tags -TAGS -Makefile.qmake -Makefile -Makefile.in -.deps -.libs -ABOUT-NLS -INSTALL -aclocal.m4 -autom4te.cache -compile -config.guess -config.h -config.h.in -config.log -config.rpath -config.status -config.sub -configure -depcomp -gtk-doc.make -install-sh -libtool -ltmain.sh -missing -stamp-h1 -py-compile -ibus-*.tar.* -ibus.spec -ibus-1.0.pc -i386 -x86_64 -ChangeLog -intltool-extract.in -intltool-merge.in -intltool-update.in -mkinstalldirs -.* -rpm diff --git a/AUTHORS b/AUTHORS index 0dc42fdb0..0951c2edb 100644 --- a/AUTHORS +++ b/AUTHORS @@ -15,6 +15,8 @@ da.po: Kris Thomsen de.po: Fabian Affolter +en_GB.po: +Steven Panek es.po: Domingo Becker fr.po: @@ -43,6 +45,8 @@ pa.po: Amanpreet Singh pl.po: Piotr Drąg +pt_BR.po: +Glaucia Freitas ru.po: koterpillar sr.po sr@latin.po: diff --git a/Makefile.am b/Makefile.am index c5aec9984..e648e44c8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,44 +20,54 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA -if ENABLE_PYTHON -PYTHON_DIRS = \ - ibus \ - setup \ - $(NULL) +NULL = + +UI_DIR = ui + +if ENABLE_SETUP +SETUP_DIR = setup endif -if ENABLE_GCONF -GCONF_DIRS = \ - gconf \ +if ENABLE_PYTHON_LIBRARY +PYTHON_LIB_DIRS = ibus +endif + +if ENABLE_DAEMON +DAEMON_DIR = \ + bus \ $(NULL) endif SUBDIRS = \ src \ - bus \ util \ + conf \ client \ + engine \ + tools \ data \ m4 \ po \ docs \ - ui \ bindings \ - $(PYTHON_DIRS) \ - $(GCONF_DIRS) \ + $(UI_DIR) \ + $(DAEMON_DIR) \ + $(PYTHON_LIB_DIRS) \ + $(SETUP_DIR) \ $(NULL) ACLOCAL_AMFLAGS = -I m4 pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = ibus-1.0.pc +pkgconfig_DATA = ibus-@IBUS_API_VERSION@.pc +ibus_pc_in = ibus-@IBUS_API_VERSION@.pc.in EXTRA_DIST = \ autogen.sh \ - ibus-1.0.pc.in \ + $(ibus_pc_in) \ ibus.spec.in \ python-config.py \ + xinput-ibus \ $(NULL) noinst_DIST = \ @@ -73,6 +83,7 @@ install-data-hook: DISTCHECK_CONFIGURE_FLAGS = \ --enable-gtk-doc \ --disable-schemas-install \ + --disable-introspection \ $(NULL) dist-hook: @@ -80,6 +91,15 @@ dist-hook: git log --name-status --date=iso > $(distdir)/ChangeLog ; \ fi +distclean-local: + if test "x$(srcdir)" = "x."; then :; else \ + rm -f ChangeLog; \ + fi + +MAINTAINERCLEANFILES = \ + $(srcdir)/ChangeLog \ + $(NULL) + rpm: dist @PACKAGE_NAME@.spec rpmbuild -bb \ --define "_sourcedir `pwd`" \ @@ -102,11 +122,12 @@ srpm: dist @PACKAGE_NAME@.spec debian/changelog: $(AM_V_GEN) \ ( \ + . /etc/lsb-release; \ date=`date -R`; \ version=@VERSION@; \ serie=$(serie); \ if test -z "$$serie"; then \ - serie=lucid; \ + serie=$$DISTRIB_CODENAME; \ fi; \ if test -z "$$release"; then \ release=1; \ @@ -127,6 +148,17 @@ ppa: dist debian/changelog debuild -S -sa ; \ ) +dpkg: dist debian/changelog + $(AM_V_GEN) \ + ( \ + mkdir ppa; \ + cd ppa; \ + tar zxvf ../$(distdir).tar.gz ; \ + cd $(distdir); \ + cp -a ../../debian . ; \ + cd debian; \ + debuild -b -us -uc; \ + ) clean-rpm: $(RM) -r "`uname -i`" @@ -137,4 +169,23 @@ git-tag: git tag -s @PACKAGE_VERSION@ git-clean-tree: - git clean -d -f -x + git clean -d -f -x + +GITIGNOREFILES = \ + INSTALL \ + aclocal.m4 \ + compile \ + config.guess \ + config.h.in \ + config.sub \ + depcomp \ + gtk-doc.make \ + install-sh \ + ltmain.sh \ + missing \ + mkinstalldirs \ + py-compile \ + stamp-h* \ + $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/autogen.sh b/autogen.sh index 1e020c408..c4cea1a42 100755 --- a/autogen.sh +++ b/autogen.sh @@ -22,4 +22,4 @@ which gnome-autogen.sh || { touch $srcdir/ChangeLog } -ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4" REQUIRED_AUTOMAKE_VERSION=1.8 . gnome-autogen.sh +ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4" REQUIRED_AUTOMAKE_VERSION=1.10 CFLAGS="-Wall $CFLAGS" . gnome-autogen.sh diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 6e5bb6e57..135849c75 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -27,3 +27,5 @@ endif SUBDIRS = \ $(VALA_DIR) \ $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/bindings/vala/IBus-1.0-custom.vala b/bindings/vala/IBus-1.0-custom.vala new file mode 100644 index 000000000..144d75e22 --- /dev/null +++ b/bindings/vala/IBus-1.0-custom.vala @@ -0,0 +1,9 @@ +namespace IBus { + // For some reason, ibus_text_new_from_static_string is hidden in GIR + // https://github.com/ibus/ibus/commit/37e6e587 + [CCode (type_id = "ibus_text_get_type ()", cheader_filename = "ibus.h")] + public class Text : IBus.Serializable { + [CCode (cname = "ibus_text_new_from_static_string", has_construct_function = false)] + public Text.from_static_string (string str); + } +} diff --git a/bindings/vala/IBus-1.0.metadata b/bindings/vala/IBus-1.0.metadata new file mode 100644 index 000000000..79158d046 --- /dev/null +++ b/bindings/vala/IBus-1.0.metadata @@ -0,0 +1 @@ +IBus cheader_filename="ibus.h" diff --git a/bindings/vala/Makefile.am b/bindings/vala/Makefile.am index 26b6494f8..074140ee5 100644 --- a/bindings/vala/Makefile.am +++ b/bindings/vala/Makefile.am @@ -22,8 +22,30 @@ vapidir = $(datadir)/vala/vapi dist_vapi_DATA = \ - ibus-1.0.vapi \ + ibus-@IBUS_API_VERSION@.vapi \ + ibus-@IBUS_API_VERSION@.deps \ $(NULL) -ibus-1.0.vapi: - vapigen --library ibus-1.0 ibus-1.0/ibus-1.0.gi ibus-1.0/ibus-1.0-custom.vala +# Don't rebuild vapi every time gir is updated. +vapi_deps = \ + $(srcdir)/IBus-1.0.metadata \ + $(srcdir)/IBus-1.0-custom.vala \ + | \ + $(top_srcdir)/src/IBus-@IBUS_API_VERSION@.gir \ + $(NULL) + +ibus-@IBUS_API_VERSION@.vapi: $(vapi_deps) + $(AM_V_GEN) $(VAPIGEN) --library ibus-@IBUS_API_VERSION@ \ + --pkg gio-2.0 \ + --metadatadir=$(srcdir) \ + $(top_srcdir)/src/IBus-@IBUS_API_VERSION@.gir \ + $(srcdir)/IBus-1.0-custom.vala + +EXTRA_DIST = \ + IBus-1.0.metadata \ + IBus-1.0-custom.vala \ + $(NULL) + +MAINTAINERCLEANFILES = ibus-@IBUS_API_VERSION@.vapi + +-include $(top_srcdir)/git.mk diff --git a/bindings/vala/ibus-1.0.deps b/bindings/vala/ibus-1.0.deps new file mode 100644 index 000000000..cd10dfde4 --- /dev/null +++ b/bindings/vala/ibus-1.0.deps @@ -0,0 +1 @@ +gio-2.0 diff --git a/bindings/vala/ibus-1.0.vapi b/bindings/vala/ibus-1.0.vapi deleted file mode 100644 index 218c03a77..000000000 --- a/bindings/vala/ibus-1.0.vapi +++ /dev/null @@ -1,4813 +0,0 @@ -/* ibus-1.0.vapi generated by vapigen, do not modify. */ - -[CCode (cprefix = "IBus", lower_case_cprefix = "ibus_", gir_namespace = "IBus", gir_version = "2.0")] -namespace IBus { - [CCode (cheader_filename = "ibus.h")] - public class AttrList : IBus.Serializable { - public weak GLib.Array attributes; - [CCode (has_construct_function = false)] - public AttrList (); - public void append (IBus.Attribute attr); - public unowned IBus.Attribute @get (uint index); - } - [CCode (cheader_filename = "ibus.h")] - public class Attribute : IBus.Serializable { - public uint end_index; - public uint start_index; - public uint type; - public uint value; - [CCode (has_construct_function = false)] - public Attribute (uint type, uint value, uint start_index, uint end_index); - } - [CCode (cheader_filename = "ibus.h")] - public class Bus : IBus.Object { - [CCode (has_construct_function = false)] - public Bus (); - public void add_match (string rule); - public unowned IBus.InputContext create_input_context (string client_name); - public unowned string current_input_context (); - public bool exit (bool restart); - public unowned IBus.Config get_config (); - public unowned IBus.Connection get_connection (); - public unowned IBus.EngineDesc get_global_engine (); - public string get_name_owner (string name); - public bool get_use_global_engine (); - public bool get_use_sys_layout (); - public unowned string hello (); - public bool is_connected (); - public bool is_global_engine_enabled (); - public GLib.List list_active_engines (); - public GLib.List list_engines (); - public GLib.List list_names (); - public bool name_has_owner (string name); - public bool register_component (IBus.Component component); - public uint release_name (string name); - public void remove_match (string rule); - public uint request_name (string name, uint flags); - public bool set_global_engine (string global_engine); - public virtual signal void connected (); - public virtual signal void disconnected (); - public virtual signal void global_engine_changed (); - } - [Compact] - [CCode (cheader_filename = "ibus.h")] - public class BusComponent { - } - [CCode (cheader_filename = "ibus.h")] - public class Component : IBus.Serializable { - public weak string author; - public uint child_source_id; - public weak string description; - public weak GLib.List engines; - public weak string exec; - public weak string homepage; - public weak string license; - public weak string name; - public weak GLib.List observed_paths; - public void* pdummy; - public GLib.Pid pid; - public weak string textdomain; - public weak string version; - [CCode (has_construct_function = false)] - public Component (string name, string description, string version, string license, string author, string homepage, string exec, string textdomain); - public void add_engine (IBus.EngineDesc engine); - public void add_observed_path (string path, bool access_fs); - public bool check_modification (); - [CCode (has_construct_function = false)] - public Component.from_file (string filename); - [CCode (has_construct_function = false)] - public Component.from_xml_node (IBus.XMLNode node); - public unowned GLib.List get_engines (); - public static unowned IBus.Component get_from_engine (IBus.EngineDesc engine); - public bool is_running (); - public void output (GLib.StringBuilder output, int indent); - public void output_engines (GLib.StringBuilder output, int indent); - public bool start (bool verbose); - public bool stop (); - } - [CCode (cheader_filename = "ibus.h")] - public class Config : IBus.Proxy { - [CCode (has_construct_function = false)] - public Config (IBus.Connection connection); - public bool get_value (string section, string name, GLib.Value value); - public bool set_value (string section, string name, GLib.Value value); - public bool unset (string section, string name); - public virtual signal void value_changed (string p0, string p1, GLib.Value p2); - } - [CCode (cheader_filename = "ibus.h")] - public class ConfigService : IBus.Service { - [CCode (has_construct_function = false)] - public ConfigService (IBus.Connection connection); - [NoWrapper] - public virtual bool get_value (string section, string name, GLib.Value value, out unowned IBus.Error error); - [NoWrapper] - public virtual bool set_value (string section, string name, GLib.Value value, out unowned IBus.Error error); - [NoWrapper] - public virtual bool unset (string section, string name, out unowned IBus.Error error); - public void value_changed (string section, string name, GLib.Value value); - [NoAccessorMethod] - public IBus.Connection connection { owned get; construct; } - } - [CCode (cheader_filename = "ibus.h")] - public class Connection : IBus.Object { - [CCode (has_construct_function = false)] - public Connection (); - public bool call (string name, string path, string @interface, string member, out unowned IBus.Error error, ...); - public unowned IBus.Message call_with_reply (string name, string path, string @interface, string member, out unowned IBus.Error error, ...); - public void close (); - public void flush (); - public unowned IBus.DBusConnection get_connection (); - public long get_unix_user (); - public bool is_authenticated (); - public bool is_connected (); - public static unowned IBus.Connection open (string address); - public static unowned IBus.Connection open_private (string address); - public bool read_write_dispatch (int timeout); - public bool register_object_path (string path, IBus.MessageFunc message_func); - public bool send (IBus.Message message); - public bool send_signal (string path, string @interface, string name, ...); - public bool send_signal_valist (string path, string @interface, string name, GLib.Type first_arg_type, void* args); - public bool send_valist (int message_type, string path, string @interface, string name, GLib.Type first_arg_type, void* args); - public bool send_with_reply (IBus.Message message, out unowned IBus.PendingCall pending_return, int timeout_milliseconds); - public unowned IBus.Message send_with_reply_and_block (IBus.Message message, int timeout_milliseconds, out unowned IBus.Error error); - public void set_connection (IBus.DBusConnection dbus_connection, bool shared); - public bool unregister_object_path (string path); - public virtual signal bool authenticate_unix_user (ulong uid); - public virtual signal void disconnected (); - public virtual signal bool ibus_message (void* message); - public virtual signal void ibus_message_sent (void* message); - public virtual signal bool ibus_signal (void* message); - } - [Compact] - [CCode (cheader_filename = "ibus.h")] - public class DBusConnection { - } - [Compact] - [CCode (cheader_filename = "ibus.h")] - public class DBusError { - } - [Compact] - [CCode (cheader_filename = "ibus.h")] - public class DBusMessage { - } - [Compact] - [CCode (cheader_filename = "ibus.h")] - public class DBusMessageIter { - } - [Compact] - [CCode (cheader_filename = "ibus.h")] - public class DBusPendingCall { - } - [Compact] - [CCode (cheader_filename = "ibus.h")] - public class DBusServer { - } - [CCode (cheader_filename = "ibus.h")] - public class Engine : IBus.Service { - public uint client_capabilities; - public weak IBus.Rectangle cursor_area; - public bool enabled; - public bool has_focus; - [CCode (has_construct_function = false)] - public Engine (string name, string path, IBus.Connection connection); - public void commit_text (IBus.Text text); - public void delete_surrounding_text (int offset, uint nchars); - public void forward_key_event (uint keyval, uint keycode, uint state); - public unowned string get_name (); - public void hide_auxiliary_text (); - public void hide_lookup_table (); - public void hide_preedit_text (); - public void register_properties (IBus.PropList prop_list); - public void show_auxiliary_text (); - public void show_lookup_table (); - public void show_preedit_text (); - public void update_auxiliary_text (IBus.Text text, bool visible); - public void update_lookup_table (IBus.LookupTable lookup_table, bool visible); - public void update_lookup_table_fast (IBus.LookupTable lookup_table, bool visible); - public void update_preedit_text (IBus.Text text, uint cursor_pos, bool visible); - public void update_preedit_text_with_mode (IBus.Text text, uint cursor_pos, bool visible, IBus.PreeditFocusMode mode); - public void update_property (IBus.Property prop); - [NoAccessorMethod] - public IBus.Connection connection { owned get; construct; } - public string name { get; construct; } - public virtual signal void candidate_clicked (uint index, uint button, uint state); - public virtual signal void cursor_down (); - public virtual signal void cursor_up (); - public virtual signal void disable (); - public virtual signal void enable (); - public virtual signal void focus_in (); - public virtual signal void focus_out (); - public virtual signal void page_down (); - public virtual signal void page_up (); - public virtual signal bool process_key_event (uint keyval, uint keycode, uint state); - public virtual signal void property_activate (string prop_name, uint prop_state); - public virtual signal void property_hide (string prop_name); - public virtual signal void property_show (string prop_name); - public virtual signal void reset (); - public virtual signal void set_capabilities (uint caps); - public virtual signal void set_cursor_location (int x, int y, int w, int h); - } - [CCode (cheader_filename = "ibus.h")] - public class EngineDesc : IBus.Serializable { - public weak string author; - public weak string description; - public weak string icon; - public weak string language; - public weak string layout; - public weak string license; - public weak string longname; - public weak string name; - public uint rank; - [CCode (has_construct_function = false)] - public EngineDesc (string name, string longname, string description, string language, string license, string author, string icon, string layout); - [CCode (has_construct_function = false)] - public EngineDesc.from_xml_node (IBus.XMLNode node); - public void output (GLib.StringBuilder output, int indent); - } - [Compact] - [CCode (cheader_filename = "ibus.h")] - public class Error { - [CCode (has_construct_function = false)] - public Error (); - [CCode (has_construct_function = false)] - public Error.from_message (IBus.DBusMessage message); - [CCode (has_construct_function = false)] - public Error.from_printf (string name, string format_message); - [CCode (has_construct_function = false)] - public Error.from_text (string name, string message); - } - [CCode (cheader_filename = "ibus.h")] - public class Factory : IBus.Service { - [CCode (has_construct_function = false)] - public Factory (IBus.Connection connection); - public void add_engine (string engine_name, GLib.Type engine_type); - [NoAccessorMethod] - public IBus.Connection connection { owned get; construct; } - } - [CCode (cheader_filename = "ibus.h")] - public class HotkeyProfile : IBus.Serializable { - [CCode (has_construct_function = false)] - public HotkeyProfile (); - public bool add_hotkey (uint keyval, uint modifiers, GLib.Quark event); - public bool add_hotkey_from_string (string str, GLib.Quark event); - public GLib.Quark filter_key_event (uint keyval, uint modifiers, uint prev_keyval, uint prev_modifiers); - public bool remove_hotkey (uint keyval, uint modifiers); - public bool remove_hotkey_by_event (GLib.Quark event); - public virtual signal void trigger (uint event, void* user_data); - } - [CCode (cheader_filename = "ibus.h")] - public class InputContext : IBus.Proxy { - [CCode (has_construct_function = false)] - public InputContext (string path, IBus.Connection connection); - public void disable (); - public void enable (); - public void focus_in (); - public void focus_out (); - public unowned IBus.EngineDesc get_engine (); - public static unowned IBus.InputContext get_input_context (string path, IBus.Connection connection); - public bool is_enabled (); - public bool process_key_event (uint32 keyval, uint32 keycode, uint32 state); - public void property_activate (string prop_name, int32 state); - public void reset (); - public void set_capabilities (uint32 capabilities); - public void set_cursor_location (int32 x, int32 y, int32 w, int32 h); - public void set_engine (string name); - public virtual signal void commit_text (IBus.Text p0); - public virtual signal void cursor_down_lookup_table (); - public virtual signal void cursor_up_lookup_table (); - public virtual signal void delete_surrounding_text (int p0, uint p1); - public virtual signal void disabled (); - public virtual signal void enabled (); - public virtual signal void forward_key_event (uint p0, uint p1, uint p2); - public virtual signal void hide_auxiliary_text (); - public virtual signal void hide_lookup_table (); - public virtual signal void hide_preedit_text (); - public virtual signal void page_down_lookup_table (); - public virtual signal void page_up_lookup_table (); - public virtual signal void register_properties (IBus.PropList p0); - public virtual signal void show_auxiliary_text (); - public virtual signal void show_lookup_table (); - public virtual signal void show_preedit_text (); - public virtual signal void update_auxiliary_text (IBus.Text p0, bool p1); - public virtual signal void update_lookup_table (IBus.LookupTable p0, bool p1); - public virtual signal void update_preedit_text (IBus.Text p0, uint p1, bool p2); - public virtual signal void update_property (IBus.Property p0); - } - [CCode (cheader_filename = "ibus.h")] - public class Keymap : IBus.Object { - [CCode (array_length = false)] - public weak uint[] keymap; - public weak string name; - [CCode (has_construct_function = false)] - public Keymap (string name); - public static unowned IBus.Keymap @get (string name); - public uint lookup_keysym (uint16 keycode, uint32 state); - } - [CCode (cheader_filename = "ibus.h")] - public class LookupTable : IBus.Serializable { - public weak GLib.Array candidates; - public uint cursor_pos; - public bool cursor_visible; - public weak GLib.Array labels; - public int orientation; - public uint page_size; - public bool round; - [CCode (has_construct_function = false)] - public LookupTable (uint page_size, uint cursor_pos, bool cursor_visible, bool round); - public void append_candidate (IBus.Text text); - public void append_label (IBus.Text text); - public void clear (); - public bool cursor_down (); - public bool cursor_up (); - public unowned IBus.Text get_candidate (uint index); - public uint get_cursor_in_page (); - public uint get_cursor_pos (); - public unowned IBus.Text get_label (uint index); - public uint get_number_of_candidates (); - public int get_orientation (); - public uint get_page_size (); - public bool is_cursor_visible (); - public bool is_round (); - public bool page_down (); - public bool page_up (); - public void set_cursor_pos (uint cursor_pos); - public void set_cursor_visible (bool visible); - public void set_label (uint index, IBus.Text text); - public void set_orientation (int orientation); - public void set_page_size (uint page_size); - public void set_round (bool round); - } - [Compact] - [CCode (ref_function = "ibus_message_ref", unref_function = "ibus_message_unref", cheader_filename = "ibus.h")] - public class Message { - [CCode (has_construct_function = false)] - public Message (int message_type); - public bool append_args (...); - public bool append_args_valist (GLib.Type first_arg_type, void* va_args); - [CCode (has_construct_function = false)] - public Message.error (IBus.Message reply_to, string error_name, string error_message); - [CCode (has_construct_function = false)] - public Message.error_printf (IBus.Message reply_to, string error_name, string error_format); - public bool get_args (out unowned IBus.Error error, ...); - public bool get_args_valist (out unowned IBus.Error error, GLib.Type first_arg_type, void* va_args); - public unowned string get_destination (); - public unowned string get_error_message (); - public unowned string get_error_name (); - public unowned string get_interface (); - public unowned string get_member (); - public bool get_no_reply (); - public unowned string get_path (); - public uint32 get_reply_serial (); - public unowned string get_sender (); - public uint32 get_serial (); - public bool is_error (string error_name); - public bool is_method_call (string @interface, string method); - public bool is_signal (string @interface, string signal_name); - [CCode (has_construct_function = false)] - public Message.method_call (string destination, string path, string @interface, string method); - [CCode (has_construct_function = false)] - public Message.method_return (IBus.Message reply_to); - public bool set_destination (string destination); - public bool set_error_name (string error_name); - public bool set_interface (string @interface); - public bool set_member (string member); - public void set_no_reply (bool no_reply); - public bool set_path (string path); - public bool set_reply_serial (uint32 reply_serial); - public bool set_sender (string sender); - [CCode (has_construct_function = false)] - public Message.@signal (string path, string @interface, string method); - public unowned string to_string (); - } - [Compact] - [CCode (cheader_filename = "ibus.h")] - public class MessageIter { - public bool append (GLib.Type type, void* value); - public bool close_container (IBus.MessageIter sub); - public bool copy_data (IBus.MessageIter src); - public bool @get (GLib.Type type, void* value); - public GLib.Type get_arg_type (); - public void get_basic (void* value); - public GLib.Type get_element_type (); - public bool has_next (); - public static bool init (IBus.Message message, IBus.MessageIter iter); - public static void init_append (IBus.Message message, IBus.MessageIter iter); - public bool next (); - public bool open_container (GLib.Type type, string contained_signature, IBus.MessageIter sub); - public bool recurse (GLib.Type type, IBus.MessageIter sub); - } - [CCode (cheader_filename = "ibus.h")] - public class Object : GLib.InitiallyUnowned { - public uint32 flags; - [CCode (has_construct_function = false)] - public Object (); - [HasEmitter] - public virtual signal void destroy (); - } - [CCode (cheader_filename = "ibus.h")] - public class ObservedPath : IBus.Serializable { - public bool is_dir; - public bool is_exist; - public long mtime; - public weak string path; - [CCode (has_construct_function = false)] - public ObservedPath (string path, bool fill_stat); - public bool check_modification (); - [CCode (has_construct_function = false)] - public ObservedPath.from_xml_node (IBus.XMLNode node, bool fill_stat); - public void output (GLib.StringBuilder output, int indent); - public unowned GLib.List traverse (); - } - [CCode (cheader_filename = "ibus.h")] - public class PanelService : IBus.Service { - [CCode (has_construct_function = false)] - public PanelService (IBus.Connection connection); - public void candidate_clicked (uint index, uint button, uint state); - public void cursor_down (); - [NoWrapper] - public virtual bool cursor_down_lookup_table (out unowned IBus.Error error); - public void cursor_up (); - [NoWrapper] - public virtual bool cursor_up_lookup_table (out unowned IBus.Error error); - [NoWrapper] - public virtual bool destroy (out unowned IBus.Error error); - [NoWrapper] - public virtual bool focus_in (string input_context_path, out unowned IBus.Error error); - [NoWrapper] - public virtual bool focus_out (string input_context_path, out unowned IBus.Error error); - [NoWrapper] - public virtual bool hide_auxiliary_text (out unowned IBus.Error error); - [NoWrapper] - public virtual bool hide_language_bar (out unowned IBus.Error error); - [NoWrapper] - public virtual bool hide_lookup_table (out unowned IBus.Error error); - [NoWrapper] - public virtual bool hide_preedit_text (out unowned IBus.Error error); - public void page_down (); - [NoWrapper] - public virtual bool page_down_lookup_table (out unowned IBus.Error error); - public void page_up (); - [NoWrapper] - public virtual bool page_up_lookup_table (out unowned IBus.Error error); - public void property_active (string prop_name, int prop_state); - public void property_hide (string prop_name); - public void property_show (string prop_name); - [NoWrapper] - public virtual bool register_properties (IBus.PropList prop_list, out unowned IBus.Error error); - [NoWrapper] - public virtual bool reset (out unowned IBus.Error error); - [NoWrapper] - public virtual bool set_cursor_location (int x, int y, int w, int h, out unowned IBus.Error error); - [NoWrapper] - public virtual bool show_auxiliary_text (out unowned IBus.Error error); - [NoWrapper] - public virtual bool show_language_bar (out unowned IBus.Error error); - [NoWrapper] - public virtual bool show_lookup_table (out unowned IBus.Error error); - [NoWrapper] - public virtual bool show_preedit_text (out unowned IBus.Error error); - [NoWrapper] - public virtual bool start_setup (out unowned IBus.Error error); - [NoWrapper] - public virtual bool state_changed (out unowned IBus.Error error); - [NoWrapper] - public virtual bool update_auxiliary_text (IBus.Text text, bool visible, out unowned IBus.Error error); - [NoWrapper] - public virtual bool update_lookup_table (IBus.LookupTable lookup_table, bool visible, out unowned IBus.Error error); - [NoWrapper] - public virtual bool update_preedit_text (IBus.Text text, uint cursor_pos, bool visible, out unowned IBus.Error error); - [NoWrapper] - public virtual bool update_property (IBus.Property prop, out unowned IBus.Error error); - [NoAccessorMethod] - public IBus.Connection connection { owned get; construct; } - } - [Compact] - [CCode (ref_function = "ibus_pending_call_ref", unref_function = "ibus_pending_call_unref", cheader_filename = "ibus.h")] - public class PendingCall { - public static bool allocate_data_slot (int slot_p); - public void block (); - public void cancel (); - public static void free_data_slot (int slot_p); - public bool get_completed (); - public void* get_data (int slot); - public bool set_data (int slot, void* data, GLib.DestroyNotify free_data_func); - public bool set_notify (IBus.PendingCallNotifyFunction function, GLib.DestroyNotify free_user_data); - public unowned IBus.Message steal_reply (); - public void wait (); - } - [CCode (cheader_filename = "ibus.h")] - public class PropList : IBus.Serializable { - public weak GLib.Array properties; - [CCode (has_construct_function = false)] - public PropList (); - public void append (IBus.Property prop); - public unowned IBus.Property @get (uint index); - public bool update_property (IBus.Property prop); - } - [CCode (cheader_filename = "ibus.h")] - public class Property : IBus.Serializable { - public weak string icon; - public weak string key; - public weak IBus.Text label; - public bool sensitive; - public uint state; - public weak IBus.PropList sub_props; - public weak IBus.Text tooltip; - public uint type; - public bool visible; - [CCode (has_construct_function = false)] - public Property (string key, IBus.PropType type, IBus.Text label, string icon, IBus.Text tooltip, bool sensitive, bool visible, IBus.PropState state, IBus.PropList prop_list); - public void set_icon (string icon); - public void set_label (IBus.Text label); - public void set_sensitive (bool sensitive); - public void set_state (IBus.PropState state); - public void set_sub_props (IBus.PropList prop_list); - public void set_tooltip (IBus.Text tooltip); - public void set_visible (bool visible); - public bool update (IBus.Property prop_update); - } - [CCode (cheader_filename = "ibus.h")] - public class Proxy : IBus.Object { - [CCode (has_construct_function = false)] - public Proxy (string name, string path, IBus.Connection connection); - public bool call (string method, ...); - public bool call_with_reply (string method, out unowned IBus.PendingCall pending, int timeout_milliseconds, out unowned IBus.Error error, ...); - public unowned IBus.Message call_with_reply_and_block (string method, int timeout_milliseconds, out unowned IBus.Error error, ...); - public unowned IBus.Connection get_connection (); - public unowned string get_interface (); - public unowned string get_name (); - public unowned string get_path (); - public unowned string get_unique_name (); - public bool handle_signal (IBus.Message message); - public bool send (IBus.Message message); - public bool send_with_reply (IBus.Message message, out unowned IBus.PendingCall pending, int timeout_milliseconds); - public unowned IBus.Message send_with_reply_and_block (IBus.Message message); - public IBus.Connection connection { get; construct; } - public string @interface { get; construct; } - public string name { get; construct; } - public string path { get; construct; } - public virtual signal bool ibus_signal (void* message); - } - [Compact] - [CCode (cheader_filename = "ibus.h")] - public class Rectangle { - public int height; - public int width; - public int x; - public int y; - } - [CCode (cheader_filename = "ibus.h")] - public class Serializable : IBus.Object { - public uint32 flags; - [CCode (has_construct_function = false)] - public Serializable (); - public virtual bool copy (); - public virtual bool deserialize (IBus.MessageIter iter); - public GLib.Value get_qattachment (GLib.Quark key); - public void remove_qattachment (GLib.Quark key); - public virtual bool serialize (IBus.MessageIter iter); - public bool set_qattachment (GLib.Quark key, GLib.Value value); - } - [CCode (cheader_filename = "ibus.h")] - public class Server : IBus.Object { - [CCode (has_construct_function = false)] - public Server (); - public void disconnect (); - public unowned string get_address (); - public unowned string get_id (); - public bool is_connected (); - public bool listen (string address); - public bool set_auth_mechanisms (string mechanisms); - [NoAccessorMethod] - public GLib.Type connection_type { get; set; } - public virtual signal void new_connection (GLib.Object connectin); - } - [CCode (cheader_filename = "ibus.h")] - public class Service : IBus.Object { - [CCode (has_construct_function = false)] - public Service (string path); - public bool add_to_connection (IBus.Connection connection); - public GLib.List get_connections (); - public unowned string get_path (); - public bool handle_message (IBus.Connection connection, IBus.Message message); - public bool remove_from_all_connections (); - public bool remove_from_connection (IBus.Connection connection); - public bool send_signal (string @interface, string name, ...); - public string path { get; construct; } - public virtual signal bool ibus_message (void* connection, void* message); - public virtual signal bool ibus_signal (void* connection, void* message); - } - [CCode (cheader_filename = "ibus.h")] - public class Text : IBus.Serializable { - public weak IBus.AttrList attrs; - public bool is_static; - public weak string text; - public void append_attribute (uint type, uint value, uint start_index, int end_index); - [CCode (has_construct_function = false)] - public Text.from_printf (string fmt); - [CCode (has_construct_function = false)] - public Text.from_static_string (string str); - [CCode (has_construct_function = false)] - public Text.from_string (string str); - [CCode (has_construct_function = false)] - public Text.from_ucs4 (unichar str); - [CCode (has_construct_function = false)] - public Text.from_unichar (unichar c); - public uint get_length (); - } - [Compact] - [CCode (cheader_filename = "ibus.h")] - public class XMLNode { - public weak string attributes; - public weak string name; - public weak GLib.List sub_nodes; - public weak string text; - } - [CCode (cprefix = "IBUS_ATTR_TYPE_", has_type_id = false, cheader_filename = "ibus.h")] - public enum AttrType { - UNDERLINE, - FOREGROUND, - BACKGROUND - } - [CCode (cprefix = "IBUS_ATTR_UNDERLINE_", has_type_id = false, cheader_filename = "ibus.h")] - public enum AttrUnderline { - NONE, - SINGLE, - DOUBLE, - LOW, - ERROR - } - [CCode (cprefix = "IBUS_CAP_", has_type_id = false, cheader_filename = "ibus.h")] - public enum Capabilite { - PREEDIT_TEXT, - AUXILIARY_TEXT, - LOOKUP_TABLE, - FOCUS, - PROPERTY, - SURROUNDING_TEXT - } - [CCode (cprefix = "IBUS_", has_type_id = false, cheader_filename = "ibus.h")] - public enum ModifierType { - SHIFT_MASK, - LOCK_MASK, - CONTROL_MASK, - MOD1_MASK, - MOD2_MASK, - MOD3_MASK, - MOD4_MASK, - MOD5_MASK, - BUTTON1_MASK, - BUTTON2_MASK, - BUTTON3_MASK, - BUTTON4_MASK, - BUTTON5_MASK, - HANDLED_MASK, - FORWARD_MASK, - IGNORED_MASK, - SUPER_MASK, - HYPER_MASK, - META_MASK, - RELEASE_MASK, - MODIFIER_MASK - } - [CCode (cprefix = "IBUS_", has_type_id = false, cheader_filename = "ibus.h")] - public enum ObjectFlags { - IN_DESTRUCTION, - DESTROYED, - RESERVED_1, - RESERVED_2 - } - [CCode (cprefix = "IBUS_ORIENTATION_", has_type_id = false, cheader_filename = "ibus.h")] - public enum Orientation { - HORIZONTAL, - VERTICAL, - SYSTEM - } - [CCode (cprefix = "IBUS_ENGINE_PREEDIT_", has_type_id = false, cheader_filename = "ibus.h")] - public enum PreeditFocusMode { - CLEAR, - COMMIT - } - [CCode (cprefix = "PROP_STATE_", has_type_id = false, cheader_filename = "ibus.h")] - public enum PropState { - UNCHECKED, - CHECKED, - INCONSISTENT - } - [CCode (cprefix = "PROP_TYPE_", has_type_id = false, cheader_filename = "ibus.h")] - public enum PropType { - NORMAL, - TOGGLE, - RADIO, - MENU, - SEPARATOR - } - [CCode (cheader_filename = "ibus.h")] - public delegate void ConnectionReplyFunc (IBus.Connection connection, IBus.Message reply); - [CCode (cheader_filename = "ibus.h")] - public delegate void DBusConnectionSetupFunc (IBus.DBusConnection connection); - [CCode (cheader_filename = "ibus.h")] - public delegate void DBusServerSetupFunc (IBus.DBusServer server); - [CCode (cheader_filename = "ibus.h", has_target = false)] - public delegate void FreeFunc (void* object); - [CCode (cheader_filename = "ibus.h", has_target = false)] - public delegate bool IBusMessageFunc (IBus.Connection connection, IBus.Message message); - [CCode (cheader_filename = "ibus.h", has_target = false)] - public delegate bool IBusSignalFunc (IBus.Connection connection, IBus.Message message); - [CCode (cheader_filename = "ibus.h")] - public delegate bool MessageFunc (IBus.Connection connection, IBus.Message message); - [CCode (cheader_filename = "ibus.h", has_target = false)] - public delegate void NewConnectionFunc (IBus.Server server, IBus.Connection connection); - [CCode (cheader_filename = "ibus.h", has_target = false)] - public delegate void ObjectDestroyFunc (IBus.Object p1); - [CCode (cheader_filename = "ibus.h")] - public delegate void PendingCallNotifyFunction (IBus.PendingCall pending); - [CCode (cheader_filename = "ibus.h", has_target = false)] - public delegate bool SerializableCopyFunc (IBus.Serializable dest, IBus.Serializable src); - [CCode (cheader_filename = "ibus.h", has_target = false)] - public delegate bool SerializableDeserializeFunc (IBus.Serializable object, IBus.MessageIter iter); - [CCode (cheader_filename = "ibus.h", has_target = false)] - public delegate bool SerializableSerializeFunc (IBus.Serializable object, IBus.MessageIter iter); - [CCode (cheader_filename = "ibus.h", has_target = false)] - public delegate bool ServiceIBusMessageFunc (IBus.Service service, IBus.Connection connection, IBus.Message message); - [CCode (cheader_filename = "ibus.h", has_target = false)] - public delegate bool ServiceIBusSignalFunc (IBus.Service service, IBus.Connection connection, IBus.Message message); - [CCode (cheader_filename = "ibus.h")] - public const int @0; - [CCode (cheader_filename = "ibus.h")] - public const int @1; - [CCode (cheader_filename = "ibus.h")] - public const int @2; - [CCode (cheader_filename = "ibus.h")] - public const int @3; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_AltCursor; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Attn; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_BackTab; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_ChangeScreen; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Copy; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_CursorBlink; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_CursorSelect; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_DeleteWord; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Duplicate; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Enter; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_EraseEOF; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_EraseInput; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_ExSelect; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_FieldMark; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Ident; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Jump; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_KeyClick; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Left2; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_PA1; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_PA2; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_PA3; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Play; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_PrintScreen; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Quit; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Record; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Reset; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Right2; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Rule; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Setup; - [CCode (cheader_filename = "ibus.h")] - public const int @3270_Test; - [CCode (cheader_filename = "ibus.h")] - public const int @4; - [CCode (cheader_filename = "ibus.h")] - public const int @5; - [CCode (cheader_filename = "ibus.h")] - public const int @6; - [CCode (cheader_filename = "ibus.h")] - public const int @7; - [CCode (cheader_filename = "ibus.h")] - public const int @8; - [CCode (cheader_filename = "ibus.h")] - public const int @9; - [CCode (cheader_filename = "ibus.h")] - public const int A; - [CCode (cheader_filename = "ibus.h")] - public const int AE; - [CCode (cheader_filename = "ibus.h")] - public const int Aacute; - [CCode (cheader_filename = "ibus.h")] - public const int Abelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int Abreve; - [CCode (cheader_filename = "ibus.h")] - public const int Abreveacute; - [CCode (cheader_filename = "ibus.h")] - public const int Abrevebelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int Abrevegrave; - [CCode (cheader_filename = "ibus.h")] - public const int Abrevehook; - [CCode (cheader_filename = "ibus.h")] - public const int Abrevetilde; - [CCode (cheader_filename = "ibus.h")] - public const int AccessX_Enable; - [CCode (cheader_filename = "ibus.h")] - public const int AccessX_Feedback_Enable; - [CCode (cheader_filename = "ibus.h")] - public const int Acircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int Acircumflexacute; - [CCode (cheader_filename = "ibus.h")] - public const int Acircumflexbelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int Acircumflexgrave; - [CCode (cheader_filename = "ibus.h")] - public const int Acircumflexhook; - [CCode (cheader_filename = "ibus.h")] - public const int Acircumflextilde; - [CCode (cheader_filename = "ibus.h")] - public const int Adiaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int Agrave; - [CCode (cheader_filename = "ibus.h")] - public const int Ahook; - [CCode (cheader_filename = "ibus.h")] - public const int Alt_L; - [CCode (cheader_filename = "ibus.h")] - public const int Alt_R; - [CCode (cheader_filename = "ibus.h")] - public const int Amacron; - [CCode (cheader_filename = "ibus.h")] - public const int Aogonek; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_0; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_1; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_2; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_3; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_4; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_5; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_6; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_7; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_8; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_9; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_ain; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_alef; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_alefmaksura; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_beh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_comma; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_dad; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_dal; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_damma; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_dammatan; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_ddal; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_farsi_yeh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_fatha; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_fathatan; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_feh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_fullstop; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_gaf; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_ghain; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_ha; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_hah; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_hamza; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_hamza_above; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_hamza_below; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_hamzaonalef; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_hamzaonwaw; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_hamzaonyeh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_hamzaunderalef; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_heh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_heh_doachashmee; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_heh_goal; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_jeem; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_jeh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_kaf; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_kasra; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_kasratan; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_keheh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_khah; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_lam; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_madda_above; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_maddaonalef; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_meem; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_noon; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_noon_ghunna; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_peh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_percent; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_qaf; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_question_mark; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_ra; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_rreh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_sad; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_seen; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_semicolon; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_shadda; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_sheen; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_sukun; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_superscript_alef; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_switch; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_tah; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_tatweel; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_tcheh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_teh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_tehmarbuta; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_thal; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_theh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_tteh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_veh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_waw; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_yeh; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_yeh_baree; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_zah; - [CCode (cheader_filename = "ibus.h")] - public const int Arabic_zain; - [CCode (cheader_filename = "ibus.h")] - public const int Aring; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_AT; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_AYB; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_BEN; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_CHA; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_DA; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_DZA; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_E; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_FE; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_GHAT; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_GIM; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_HI; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_HO; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_INI; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_JE; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_KE; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_KEN; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_KHE; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_LYUN; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_MEN; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_NU; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_O; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_PE; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_PYUR; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_RA; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_RE; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_SE; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_SHA; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_TCHE; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_TO; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_TSA; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_TSO; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_TYUN; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_VEV; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_VO; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_VYUN; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_YECH; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_ZA; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_ZHE; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_accent; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_amanak; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_apostrophe; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_at; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_ayb; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_ben; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_but; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_cha; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_da; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_dza; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_e; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_exclam; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_fe; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_full_stop; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_ghat; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_gim; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_hi; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_ho; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_hyphen; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_ini; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_je; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_ke; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_ken; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_khe; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_ligature_ew; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_lyun; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_men; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_nu; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_o; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_paruyk; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_pe; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_pyur; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_question; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_ra; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_re; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_se; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_separation_mark; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_sha; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_shesht; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_tche; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_to; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_tsa; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_tso; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_tyun; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_verjaket; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_vev; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_vo; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_vyun; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_yech; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_yentamna; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_za; - [CCode (cheader_filename = "ibus.h")] - public const int Armenian_zhe; - [CCode (cheader_filename = "ibus.h")] - public const int Atilde; - [CCode (cheader_filename = "ibus.h")] - public const int AudibleBell_Enable; - [CCode (cheader_filename = "ibus.h")] - public const int B; - [CCode (cheader_filename = "ibus.h")] - public const int Babovedot; - [CCode (cheader_filename = "ibus.h")] - public const int BackSpace; - [CCode (cheader_filename = "ibus.h")] - public const int Begin; - [CCode (cheader_filename = "ibus.h")] - public const int BounceKeys_Enable; - [CCode (cheader_filename = "ibus.h")] - public const int Break; - [CCode (cheader_filename = "ibus.h")] - public const int Byelorussian_SHORTU; - [CCode (cheader_filename = "ibus.h")] - public const int Byelorussian_shortu; - [CCode (cheader_filename = "ibus.h")] - public const int C; - [CCode (cheader_filename = "ibus.h")] - public const int Cabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int Cacute; - [CCode (cheader_filename = "ibus.h")] - public const int Cancel; - [CCode (cheader_filename = "ibus.h")] - public const int Caps_Lock; - [CCode (cheader_filename = "ibus.h")] - public const int Ccaron; - [CCode (cheader_filename = "ibus.h")] - public const int Ccedilla; - [CCode (cheader_filename = "ibus.h")] - public const int Ccircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int Clear; - [CCode (cheader_filename = "ibus.h")] - public const int Codeinput; - [CCode (cheader_filename = "ibus.h")] - public const int ColonSign; - [CCode (cheader_filename = "ibus.h")] - public const int Control_L; - [CCode (cheader_filename = "ibus.h")] - public const int Control_R; - [CCode (cheader_filename = "ibus.h")] - public const int CruzeiroSign; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_A; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_BE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_CHE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_CHE_descender; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_CHE_vertstroke; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_DE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_DZHE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_E; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_EF; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_EL; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_EM; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_EN; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_EN_descender; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ER; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ES; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_GHE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_GHE_bar; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_HA; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_HARDSIGN; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_HA_descender; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_I; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_IE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_IO; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_I_macron; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_JE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_KA; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_KA_descender; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_KA_vertstroke; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_LJE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_NJE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_O; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_O_bar; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_PE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_SCHWA; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_SHA; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_SHCHA; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_SHHA; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_SHORTI; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_SOFTSIGN; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_TE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_TSE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_U; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_U_macron; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_U_straight; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_U_straight_bar; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_VE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_YA; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_YERU; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_YU; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ZE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ZHE; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ZHE_descender; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_a; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_be; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_che; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_che_descender; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_che_vertstroke; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_de; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_dzhe; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_e; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ef; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_el; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_em; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_en; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_en_descender; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_er; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_es; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ghe; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ghe_bar; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ha; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ha_descender; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_hardsign; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_i; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_i_macron; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ie; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_io; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_je; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ka; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ka_descender; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ka_vertstroke; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_lje; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_nje; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_o; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_o_bar; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_pe; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_schwa; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_sha; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_shcha; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_shha; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_shorti; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_softsign; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_te; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_tse; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_u; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_u_macron; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_u_straight; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_u_straight_bar; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ve; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ya; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_yeru; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_yu; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_ze; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_zhe; - [CCode (cheader_filename = "ibus.h")] - public const int Cyrillic_zhe_descender; - [CCode (cheader_filename = "ibus.h")] - public const int D; - [CCode (cheader_filename = "ibus.h")] - public const int Dabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int Dcaron; - [CCode (cheader_filename = "ibus.h")] - public const int Delete; - [CCode (cheader_filename = "ibus.h")] - public const int DongSign; - [CCode (cheader_filename = "ibus.h")] - public const int Down; - [CCode (cheader_filename = "ibus.h")] - public const int Dstroke; - [CCode (cheader_filename = "ibus.h")] - public const int E; - [CCode (cheader_filename = "ibus.h")] - public const int ENG; - [CCode (cheader_filename = "ibus.h")] - public const int ETH; - [CCode (cheader_filename = "ibus.h")] - public const int Eabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int Eacute; - [CCode (cheader_filename = "ibus.h")] - public const int Ebelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int Ecaron; - [CCode (cheader_filename = "ibus.h")] - public const int Ecircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int Ecircumflexacute; - [CCode (cheader_filename = "ibus.h")] - public const int Ecircumflexbelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int Ecircumflexgrave; - [CCode (cheader_filename = "ibus.h")] - public const int Ecircumflexhook; - [CCode (cheader_filename = "ibus.h")] - public const int Ecircumflextilde; - [CCode (cheader_filename = "ibus.h")] - public const int EcuSign; - [CCode (cheader_filename = "ibus.h")] - public const int Ediaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int Egrave; - [CCode (cheader_filename = "ibus.h")] - public const int Ehook; - [CCode (cheader_filename = "ibus.h")] - public const int Eisu_Shift; - [CCode (cheader_filename = "ibus.h")] - public const int Eisu_toggle; - [CCode (cheader_filename = "ibus.h")] - public const int Emacron; - [CCode (cheader_filename = "ibus.h")] - public const int End; - [CCode (cheader_filename = "ibus.h")] - public const int Eogonek; - [CCode (cheader_filename = "ibus.h")] - public const int Escape; - [CCode (cheader_filename = "ibus.h")] - public const int Eth; - [CCode (cheader_filename = "ibus.h")] - public const int Etilde; - [CCode (cheader_filename = "ibus.h")] - public const int EuroSign; - [CCode (cheader_filename = "ibus.h")] - public const int Execute; - [CCode (cheader_filename = "ibus.h")] - public const int F; - [CCode (cheader_filename = "ibus.h")] - public const int F1; - [CCode (cheader_filename = "ibus.h")] - public const int F10; - [CCode (cheader_filename = "ibus.h")] - public const int F11; - [CCode (cheader_filename = "ibus.h")] - public const int F12; - [CCode (cheader_filename = "ibus.h")] - public const int F13; - [CCode (cheader_filename = "ibus.h")] - public const int F14; - [CCode (cheader_filename = "ibus.h")] - public const int F15; - [CCode (cheader_filename = "ibus.h")] - public const int F16; - [CCode (cheader_filename = "ibus.h")] - public const int F17; - [CCode (cheader_filename = "ibus.h")] - public const int F18; - [CCode (cheader_filename = "ibus.h")] - public const int F19; - [CCode (cheader_filename = "ibus.h")] - public const int F2; - [CCode (cheader_filename = "ibus.h")] - public const int F20; - [CCode (cheader_filename = "ibus.h")] - public const int F21; - [CCode (cheader_filename = "ibus.h")] - public const int F22; - [CCode (cheader_filename = "ibus.h")] - public const int F23; - [CCode (cheader_filename = "ibus.h")] - public const int F24; - [CCode (cheader_filename = "ibus.h")] - public const int F25; - [CCode (cheader_filename = "ibus.h")] - public const int F26; - [CCode (cheader_filename = "ibus.h")] - public const int F27; - [CCode (cheader_filename = "ibus.h")] - public const int F28; - [CCode (cheader_filename = "ibus.h")] - public const int F29; - [CCode (cheader_filename = "ibus.h")] - public const int F3; - [CCode (cheader_filename = "ibus.h")] - public const int F30; - [CCode (cheader_filename = "ibus.h")] - public const int F31; - [CCode (cheader_filename = "ibus.h")] - public const int F32; - [CCode (cheader_filename = "ibus.h")] - public const int F33; - [CCode (cheader_filename = "ibus.h")] - public const int F34; - [CCode (cheader_filename = "ibus.h")] - public const int F35; - [CCode (cheader_filename = "ibus.h")] - public const int F4; - [CCode (cheader_filename = "ibus.h")] - public const int F5; - [CCode (cheader_filename = "ibus.h")] - public const int F6; - [CCode (cheader_filename = "ibus.h")] - public const int F7; - [CCode (cheader_filename = "ibus.h")] - public const int F8; - [CCode (cheader_filename = "ibus.h")] - public const int F9; - [CCode (cheader_filename = "ibus.h")] - public const int FFrancSign; - [CCode (cheader_filename = "ibus.h")] - public const int Fabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int Farsi_0; - [CCode (cheader_filename = "ibus.h")] - public const int Farsi_1; - [CCode (cheader_filename = "ibus.h")] - public const int Farsi_2; - [CCode (cheader_filename = "ibus.h")] - public const int Farsi_3; - [CCode (cheader_filename = "ibus.h")] - public const int Farsi_4; - [CCode (cheader_filename = "ibus.h")] - public const int Farsi_5; - [CCode (cheader_filename = "ibus.h")] - public const int Farsi_6; - [CCode (cheader_filename = "ibus.h")] - public const int Farsi_7; - [CCode (cheader_filename = "ibus.h")] - public const int Farsi_8; - [CCode (cheader_filename = "ibus.h")] - public const int Farsi_9; - [CCode (cheader_filename = "ibus.h")] - public const int Farsi_yeh; - [CCode (cheader_filename = "ibus.h")] - public const int Find; - [CCode (cheader_filename = "ibus.h")] - public const int First_Virtual_Screen; - [CCode (cheader_filename = "ibus.h")] - public const int G; - [CCode (cheader_filename = "ibus.h")] - public const int Gabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int Gbreve; - [CCode (cheader_filename = "ibus.h")] - public const int Gcaron; - [CCode (cheader_filename = "ibus.h")] - public const int Gcedilla; - [CCode (cheader_filename = "ibus.h")] - public const int Gcircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_an; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_ban; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_can; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_char; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_chin; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_cil; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_don; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_en; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_fi; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_gan; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_ghan; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_hae; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_har; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_he; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_hie; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_hoe; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_in; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_jhan; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_jil; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_kan; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_khar; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_las; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_man; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_nar; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_on; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_par; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_phar; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_qar; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_rae; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_san; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_shin; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_tan; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_tar; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_un; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_vin; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_we; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_xan; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_zen; - [CCode (cheader_filename = "ibus.h")] - public const int Georgian_zhar; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_ALPHA; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_ALPHAaccent; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_BETA; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_CHI; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_DELTA; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_EPSILON; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_EPSILONaccent; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_ETA; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_ETAaccent; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_GAMMA; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_IOTA; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_IOTAaccent; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_IOTAdiaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_IOTAdieresis; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_KAPPA; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_LAMBDA; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_LAMDA; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_MU; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_NU; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_OMEGA; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_OMEGAaccent; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_OMICRON; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_OMICRONaccent; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_PHI; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_PI; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_PSI; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_RHO; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_SIGMA; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_TAU; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_THETA; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_UPSILON; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_UPSILONaccent; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_UPSILONdieresis; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_XI; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_ZETA; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_accentdieresis; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_alpha; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_alphaaccent; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_beta; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_chi; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_delta; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_epsilon; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_epsilonaccent; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_eta; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_etaaccent; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_finalsmallsigma; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_gamma; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_horizbar; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_iota; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_iotaaccent; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_iotaaccentdieresis; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_iotadieresis; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_kappa; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_lambda; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_lamda; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_mu; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_nu; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_omega; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_omegaaccent; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_omicron; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_omicronaccent; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_phi; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_pi; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_psi; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_rho; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_sigma; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_switch; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_tau; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_theta; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_upsilon; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_upsilonaccent; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_upsilonaccentdieresis; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_upsilondieresis; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_xi; - [CCode (cheader_filename = "ibus.h")] - public const int Greek_zeta; - [CCode (cheader_filename = "ibus.h")] - public const int H; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_A; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_AE; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_AraeA; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_AraeAE; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Banja; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Cieuc; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Codeinput; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Dikeud; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_E; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_EO; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_EU; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_End; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Hanja; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Hieuh; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_I; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Ieung; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_Cieuc; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_Dikeud; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_Hieuh; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_Ieung; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_Jieuj; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_Khieuq; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_Kiyeog; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_KiyeogSios; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_KkogjiDalrinIeung; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_Mieum; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_Nieun; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_NieunHieuh; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_NieunJieuj; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_PanSios; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_Phieuf; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_Pieub; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_PieubSios; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_Rieul; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_RieulHieuh; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_RieulKiyeog; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_RieulMieum; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_RieulPhieuf; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_RieulPieub; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_RieulSios; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_RieulTieut; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_Sios; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_SsangKiyeog; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_SsangSios; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_Tieut; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_J_YeorinHieuh; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Jamo; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Jeonja; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Jieuj; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Khieuq; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Kiyeog; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_KiyeogSios; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_KkogjiDalrinIeung; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Mieum; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_MultipleCandidate; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Nieun; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_NieunHieuh; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_NieunJieuj; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_O; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_OE; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_PanSios; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Phieuf; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Pieub; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_PieubSios; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_PostHanja; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_PreHanja; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_PreviousCandidate; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Rieul; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_RieulHieuh; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_RieulKiyeog; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_RieulMieum; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_RieulPhieuf; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_RieulPieub; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_RieulSios; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_RieulTieut; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_RieulYeorinHieuh; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Romaja; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_SingleCandidate; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Sios; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Special; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_SsangDikeud; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_SsangJieuj; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_SsangKiyeog; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_SsangPieub; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_SsangSios; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Start; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_SunkyeongeumMieum; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_SunkyeongeumPhieuf; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_SunkyeongeumPieub; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_Tieut; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_U; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_WA; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_WAE; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_WE; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_WEO; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_WI; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_YA; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_YAE; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_YE; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_YEO; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_YI; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_YO; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_YU; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_YeorinHieuh; - [CCode (cheader_filename = "ibus.h")] - public const int Hangul_switch; - [CCode (cheader_filename = "ibus.h")] - public const int Hankaku; - [CCode (cheader_filename = "ibus.h")] - public const int Hcircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int Hebrew_switch; - [CCode (cheader_filename = "ibus.h")] - public const int Help; - [CCode (cheader_filename = "ibus.h")] - public const int Henkan; - [CCode (cheader_filename = "ibus.h")] - public const int Henkan_Mode; - [CCode (cheader_filename = "ibus.h")] - public const int Hiragana; - [CCode (cheader_filename = "ibus.h")] - public const int Hiragana_Katakana; - [CCode (cheader_filename = "ibus.h")] - public const int Home; - [CCode (cheader_filename = "ibus.h")] - public const int Hstroke; - [CCode (cheader_filename = "ibus.h")] - public const int Hyper_L; - [CCode (cheader_filename = "ibus.h")] - public const int Hyper_R; - [CCode (cheader_filename = "ibus.h")] - public const int I; - [CCode (cheader_filename = "ibus.h")] - public const string INTERFACE_CONFIG; - [CCode (cheader_filename = "ibus.h")] - public const string INTERFACE_ENGINE; - [CCode (cheader_filename = "ibus.h")] - public const string INTERFACE_FACTORY; - [CCode (cheader_filename = "ibus.h")] - public const string INTERFACE_IBUS; - [CCode (cheader_filename = "ibus.h")] - public const string INTERFACE_INPUT_CONTEXT; - [CCode (cheader_filename = "ibus.h")] - public const string INTERFACE_NOTIFICATIONS; - [CCode (cheader_filename = "ibus.h")] - public const string INTERFACE_PANEL; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Center_Object; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Continuous_Underline; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Discontinuous_Underline; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Emphasize; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Enter; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Fast_Cursor_Down; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Fast_Cursor_Left; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Fast_Cursor_Right; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Fast_Cursor_Up; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_First_Group; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_First_Group_Lock; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Group_Latch; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Group_Lock; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Group_Shift; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Last_Group; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Last_Group_Lock; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Left_Tab; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Level2_Latch; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Level3_Latch; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Level3_Lock; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Level3_Shift; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Level5_Latch; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Level5_Lock; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Level5_Shift; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Lock; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Move_Line_Down; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Move_Line_Up; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Next_Group; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Next_Group_Lock; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Partial_Line_Down; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Partial_Line_Up; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Partial_Space_Left; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Partial_Space_Right; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Prev_Group; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Prev_Group_Lock; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Release_Both_Margins; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Release_Margin_Left; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Release_Margin_Right; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Set_Margin_Left; - [CCode (cheader_filename = "ibus.h")] - public const int ISO_Set_Margin_Right; - [CCode (cheader_filename = "ibus.h")] - public const int Iabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int Iacute; - [CCode (cheader_filename = "ibus.h")] - public const int Ibelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int Ibreve; - [CCode (cheader_filename = "ibus.h")] - public const int Icircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int Idiaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int Igrave; - [CCode (cheader_filename = "ibus.h")] - public const int Ihook; - [CCode (cheader_filename = "ibus.h")] - public const int Imacron; - [CCode (cheader_filename = "ibus.h")] - public const int Insert; - [CCode (cheader_filename = "ibus.h")] - public const int Iogonek; - [CCode (cheader_filename = "ibus.h")] - public const int Itilde; - [CCode (cheader_filename = "ibus.h")] - public const int J; - [CCode (cheader_filename = "ibus.h")] - public const int Jcircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int K; - [CCode (cheader_filename = "ibus.h")] - public const int KP_0; - [CCode (cheader_filename = "ibus.h")] - public const int KP_1; - [CCode (cheader_filename = "ibus.h")] - public const int KP_2; - [CCode (cheader_filename = "ibus.h")] - public const int KP_3; - [CCode (cheader_filename = "ibus.h")] - public const int KP_4; - [CCode (cheader_filename = "ibus.h")] - public const int KP_5; - [CCode (cheader_filename = "ibus.h")] - public const int KP_6; - [CCode (cheader_filename = "ibus.h")] - public const int KP_7; - [CCode (cheader_filename = "ibus.h")] - public const int KP_8; - [CCode (cheader_filename = "ibus.h")] - public const int KP_9; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Add; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Begin; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Decimal; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Delete; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Divide; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Down; - [CCode (cheader_filename = "ibus.h")] - public const int KP_End; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Enter; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Equal; - [CCode (cheader_filename = "ibus.h")] - public const int KP_F1; - [CCode (cheader_filename = "ibus.h")] - public const int KP_F2; - [CCode (cheader_filename = "ibus.h")] - public const int KP_F3; - [CCode (cheader_filename = "ibus.h")] - public const int KP_F4; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Home; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Insert; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Left; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Multiply; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Next; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Page_Down; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Page_Up; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Prior; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Right; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Separator; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Space; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Subtract; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Tab; - [CCode (cheader_filename = "ibus.h")] - public const int KP_Up; - [CCode (cheader_filename = "ibus.h")] - public const int Kana_Lock; - [CCode (cheader_filename = "ibus.h")] - public const int Kana_Shift; - [CCode (cheader_filename = "ibus.h")] - public const int Kanji; - [CCode (cheader_filename = "ibus.h")] - public const int Kanji_Bangou; - [CCode (cheader_filename = "ibus.h")] - public const int Katakana; - [CCode (cheader_filename = "ibus.h")] - public const int Kcedilla; - [CCode (cheader_filename = "ibus.h")] - public const int Korean_Won; - [CCode (cheader_filename = "ibus.h")] - public const int L; - [CCode (cheader_filename = "ibus.h")] - public const int L1; - [CCode (cheader_filename = "ibus.h")] - public const int L10; - [CCode (cheader_filename = "ibus.h")] - public const int L2; - [CCode (cheader_filename = "ibus.h")] - public const int L3; - [CCode (cheader_filename = "ibus.h")] - public const int L4; - [CCode (cheader_filename = "ibus.h")] - public const int L5; - [CCode (cheader_filename = "ibus.h")] - public const int L6; - [CCode (cheader_filename = "ibus.h")] - public const int L7; - [CCode (cheader_filename = "ibus.h")] - public const int L8; - [CCode (cheader_filename = "ibus.h")] - public const int L9; - [CCode (cheader_filename = "ibus.h")] - public const int Lacute; - [CCode (cheader_filename = "ibus.h")] - public const int Last_Virtual_Screen; - [CCode (cheader_filename = "ibus.h")] - public const int Lbelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int Lcaron; - [CCode (cheader_filename = "ibus.h")] - public const int Lcedilla; - [CCode (cheader_filename = "ibus.h")] - public const int Left; - [CCode (cheader_filename = "ibus.h")] - public const int Linefeed; - [CCode (cheader_filename = "ibus.h")] - public const int LiraSign; - [CCode (cheader_filename = "ibus.h")] - public const int Lstroke; - [CCode (cheader_filename = "ibus.h")] - public const int M; - [CCode (cheader_filename = "ibus.h")] - public const int MAJOR_VERSION; - [CCode (cheader_filename = "ibus.h")] - public const int MICRO_VERSION; - [CCode (cheader_filename = "ibus.h")] - public const int MINOR_VERSION; - [CCode (cheader_filename = "ibus.h")] - public const int Mabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int Macedonia_DSE; - [CCode (cheader_filename = "ibus.h")] - public const int Macedonia_GJE; - [CCode (cheader_filename = "ibus.h")] - public const int Macedonia_KJE; - [CCode (cheader_filename = "ibus.h")] - public const int Macedonia_dse; - [CCode (cheader_filename = "ibus.h")] - public const int Macedonia_gje; - [CCode (cheader_filename = "ibus.h")] - public const int Macedonia_kje; - [CCode (cheader_filename = "ibus.h")] - public const int Mae_Koho; - [CCode (cheader_filename = "ibus.h")] - public const int Massyo; - [CCode (cheader_filename = "ibus.h")] - public const int Menu; - [CCode (cheader_filename = "ibus.h")] - public const int Meta_L; - [CCode (cheader_filename = "ibus.h")] - public const int Meta_R; - [CCode (cheader_filename = "ibus.h")] - public const int MillSign; - [CCode (cheader_filename = "ibus.h")] - public const int Mode_switch; - [CCode (cheader_filename = "ibus.h")] - public const int MouseKeys_Accel_Enable; - [CCode (cheader_filename = "ibus.h")] - public const int MouseKeys_Enable; - [CCode (cheader_filename = "ibus.h")] - public const int Muhenkan; - [CCode (cheader_filename = "ibus.h")] - public const int Multi_key; - [CCode (cheader_filename = "ibus.h")] - public const int MultipleCandidate; - [CCode (cheader_filename = "ibus.h")] - public const int N; - [CCode (cheader_filename = "ibus.h")] - public const int Nacute; - [CCode (cheader_filename = "ibus.h")] - public const int NairaSign; - [CCode (cheader_filename = "ibus.h")] - public const int Ncaron; - [CCode (cheader_filename = "ibus.h")] - public const int Ncedilla; - [CCode (cheader_filename = "ibus.h")] - public const int NewSheqelSign; - [CCode (cheader_filename = "ibus.h")] - public const int Next; - [CCode (cheader_filename = "ibus.h")] - public const int Next_Virtual_Screen; - [CCode (cheader_filename = "ibus.h")] - public const int Ntilde; - [CCode (cheader_filename = "ibus.h")] - public const int Num_Lock; - [CCode (cheader_filename = "ibus.h")] - public const int O; - [CCode (cheader_filename = "ibus.h")] - public const int OE; - [CCode (cheader_filename = "ibus.h")] - public const int Oacute; - [CCode (cheader_filename = "ibus.h")] - public const int Obarred; - [CCode (cheader_filename = "ibus.h")] - public const int Obelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int Ocaron; - [CCode (cheader_filename = "ibus.h")] - public const int Ocircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int Ocircumflexacute; - [CCode (cheader_filename = "ibus.h")] - public const int Ocircumflexbelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int Ocircumflexgrave; - [CCode (cheader_filename = "ibus.h")] - public const int Ocircumflexhook; - [CCode (cheader_filename = "ibus.h")] - public const int Ocircumflextilde; - [CCode (cheader_filename = "ibus.h")] - public const int Odiaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int Odoubleacute; - [CCode (cheader_filename = "ibus.h")] - public const int Ograve; - [CCode (cheader_filename = "ibus.h")] - public const int Ohook; - [CCode (cheader_filename = "ibus.h")] - public const int Ohorn; - [CCode (cheader_filename = "ibus.h")] - public const int Ohornacute; - [CCode (cheader_filename = "ibus.h")] - public const int Ohornbelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int Ohorngrave; - [CCode (cheader_filename = "ibus.h")] - public const int Ohornhook; - [CCode (cheader_filename = "ibus.h")] - public const int Ohorntilde; - [CCode (cheader_filename = "ibus.h")] - public const int Omacron; - [CCode (cheader_filename = "ibus.h")] - public const int Ooblique; - [CCode (cheader_filename = "ibus.h")] - public const int Oslash; - [CCode (cheader_filename = "ibus.h")] - public const int Otilde; - [CCode (cheader_filename = "ibus.h")] - public const int Overlay1_Enable; - [CCode (cheader_filename = "ibus.h")] - public const int Overlay2_Enable; - [CCode (cheader_filename = "ibus.h")] - public const int P; - [CCode (cheader_filename = "ibus.h")] - public const string PATH_CONFIG; - [CCode (cheader_filename = "ibus.h")] - public const string PATH_FACTORY; - [CCode (cheader_filename = "ibus.h")] - public const string PATH_IBUS; - [CCode (cheader_filename = "ibus.h")] - public const string PATH_INPUT_CONTEXT; - [CCode (cheader_filename = "ibus.h")] - public const string PATH_NOTIFICATIONS; - [CCode (cheader_filename = "ibus.h")] - public const string PATH_PANEL; - [CCode (cheader_filename = "ibus.h")] - public const int Pabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int Page_Down; - [CCode (cheader_filename = "ibus.h")] - public const int Page_Up; - [CCode (cheader_filename = "ibus.h")] - public const int Pause; - [CCode (cheader_filename = "ibus.h")] - public const int PesetaSign; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Accelerate; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Button1; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Button2; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Button3; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Button4; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Button5; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Button_Dflt; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_DblClick1; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_DblClick2; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_DblClick3; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_DblClick4; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_DblClick5; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_DblClick_Dflt; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_DfltBtnNext; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_DfltBtnPrev; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Down; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_DownLeft; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_DownRight; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Drag1; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Drag2; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Drag3; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Drag4; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Drag5; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Drag_Dflt; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_EnableKeys; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Left; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Right; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_Up; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_UpLeft; - [CCode (cheader_filename = "ibus.h")] - public const int Pointer_UpRight; - [CCode (cheader_filename = "ibus.h")] - public const int Prev_Virtual_Screen; - [CCode (cheader_filename = "ibus.h")] - public const int PreviousCandidate; - [CCode (cheader_filename = "ibus.h")] - public const int Print; - [CCode (cheader_filename = "ibus.h")] - public const int Prior; - [CCode (cheader_filename = "ibus.h")] - public const int Q; - [CCode (cheader_filename = "ibus.h")] - public const int R; - [CCode (cheader_filename = "ibus.h")] - public const int R1; - [CCode (cheader_filename = "ibus.h")] - public const int R10; - [CCode (cheader_filename = "ibus.h")] - public const int R11; - [CCode (cheader_filename = "ibus.h")] - public const int R12; - [CCode (cheader_filename = "ibus.h")] - public const int R13; - [CCode (cheader_filename = "ibus.h")] - public const int R14; - [CCode (cheader_filename = "ibus.h")] - public const int R15; - [CCode (cheader_filename = "ibus.h")] - public const int R2; - [CCode (cheader_filename = "ibus.h")] - public const int R3; - [CCode (cheader_filename = "ibus.h")] - public const int R4; - [CCode (cheader_filename = "ibus.h")] - public const int R5; - [CCode (cheader_filename = "ibus.h")] - public const int R6; - [CCode (cheader_filename = "ibus.h")] - public const int R7; - [CCode (cheader_filename = "ibus.h")] - public const int R8; - [CCode (cheader_filename = "ibus.h")] - public const int R9; - [CCode (cheader_filename = "ibus.h")] - public const int Racute; - [CCode (cheader_filename = "ibus.h")] - public const int Rcaron; - [CCode (cheader_filename = "ibus.h")] - public const int Rcedilla; - [CCode (cheader_filename = "ibus.h")] - public const int Redo; - [CCode (cheader_filename = "ibus.h")] - public const int RepeatKeys_Enable; - [CCode (cheader_filename = "ibus.h")] - public const int Return; - [CCode (cheader_filename = "ibus.h")] - public const int Right; - [CCode (cheader_filename = "ibus.h")] - public const int Romaji; - [CCode (cheader_filename = "ibus.h")] - public const int RupeeSign; - [CCode (cheader_filename = "ibus.h")] - public const int S; - [CCode (cheader_filename = "ibus.h")] - public const int SCHWA; - [CCode (cheader_filename = "ibus.h")] - public const string SERVICE_CONFIG; - [CCode (cheader_filename = "ibus.h")] - public const string SERVICE_IBUS; - [CCode (cheader_filename = "ibus.h")] - public const string SERVICE_NOTIFICATIONS; - [CCode (cheader_filename = "ibus.h")] - public const string SERVICE_PANEL; - [CCode (cheader_filename = "ibus.h")] - public const int Sabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int Sacute; - [CCode (cheader_filename = "ibus.h")] - public const int Scaron; - [CCode (cheader_filename = "ibus.h")] - public const int Scedilla; - [CCode (cheader_filename = "ibus.h")] - public const int Scircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int Scroll_Lock; - [CCode (cheader_filename = "ibus.h")] - public const int Select; - [CCode (cheader_filename = "ibus.h")] - public const int Serbian_DJE; - [CCode (cheader_filename = "ibus.h")] - public const int Serbian_DZE; - [CCode (cheader_filename = "ibus.h")] - public const int Serbian_JE; - [CCode (cheader_filename = "ibus.h")] - public const int Serbian_LJE; - [CCode (cheader_filename = "ibus.h")] - public const int Serbian_NJE; - [CCode (cheader_filename = "ibus.h")] - public const int Serbian_TSHE; - [CCode (cheader_filename = "ibus.h")] - public const int Serbian_dje; - [CCode (cheader_filename = "ibus.h")] - public const int Serbian_dze; - [CCode (cheader_filename = "ibus.h")] - public const int Serbian_je; - [CCode (cheader_filename = "ibus.h")] - public const int Serbian_lje; - [CCode (cheader_filename = "ibus.h")] - public const int Serbian_nje; - [CCode (cheader_filename = "ibus.h")] - public const int Serbian_tshe; - [CCode (cheader_filename = "ibus.h")] - public const int Shift_L; - [CCode (cheader_filename = "ibus.h")] - public const int Shift_Lock; - [CCode (cheader_filename = "ibus.h")] - public const int Shift_R; - [CCode (cheader_filename = "ibus.h")] - public const int SingleCandidate; - [CCode (cheader_filename = "ibus.h")] - public const int SlowKeys_Enable; - [CCode (cheader_filename = "ibus.h")] - public const int StickyKeys_Enable; - [CCode (cheader_filename = "ibus.h")] - public const int Super_L; - [CCode (cheader_filename = "ibus.h")] - public const int Super_R; - [CCode (cheader_filename = "ibus.h")] - public const int Sys_Req; - [CCode (cheader_filename = "ibus.h")] - public const int T; - [CCode (cheader_filename = "ibus.h")] - public const int THORN; - [CCode (cheader_filename = "ibus.h")] - public const int Tab; - [CCode (cheader_filename = "ibus.h")] - public const int Tabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int Tcaron; - [CCode (cheader_filename = "ibus.h")] - public const int Tcedilla; - [CCode (cheader_filename = "ibus.h")] - public const int Terminate_Server; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_baht; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_bobaimai; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_chochan; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_chochang; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_choching; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_chochoe; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_dochada; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_dodek; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_fofa; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_fofan; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_hohip; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_honokhuk; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_khokhai; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_khokhon; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_khokhuat; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_khokhwai; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_khorakhang; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_kokai; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_lakkhangyao; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_lekchet; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_lekha; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_lekhok; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_lekkao; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_leknung; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_lekpaet; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_leksam; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_leksi; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_leksong; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_leksun; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_lochula; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_loling; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_lu; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_maichattawa; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_maiek; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_maihanakat; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_maihanakat_maitho; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_maitaikhu; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_maitho; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_maitri; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_maiyamok; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_moma; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_ngongu; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_nikhahit; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_nonen; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_nonu; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_oang; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_paiyannoi; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_phinthu; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_phophan; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_phophung; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_phosamphao; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_popla; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_rorua; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_ru; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_saraa; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_saraaa; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_saraae; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_saraaimaimalai; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_saraaimaimuan; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_saraam; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_sarae; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_sarai; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_saraii; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_sarao; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_sarau; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_saraue; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_sarauee; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_sarauu; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_sorusi; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_sosala; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_soso; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_sosua; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_thanthakhat; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_thonangmontho; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_thophuthao; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_thothahan; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_thothan; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_thothong; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_thothung; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_topatak; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_totao; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_wowaen; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_yoyak; - [CCode (cheader_filename = "ibus.h")] - public const int Thai_yoying; - [CCode (cheader_filename = "ibus.h")] - public const int Thorn; - [CCode (cheader_filename = "ibus.h")] - public const int Touroku; - [CCode (cheader_filename = "ibus.h")] - public const int Tslash; - [CCode (cheader_filename = "ibus.h")] - public const int U; - [CCode (cheader_filename = "ibus.h")] - public const int Uacute; - [CCode (cheader_filename = "ibus.h")] - public const int Ubelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int Ubreve; - [CCode (cheader_filename = "ibus.h")] - public const int Ucircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int Udiaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int Udoubleacute; - [CCode (cheader_filename = "ibus.h")] - public const int Ugrave; - [CCode (cheader_filename = "ibus.h")] - public const int Uhook; - [CCode (cheader_filename = "ibus.h")] - public const int Uhorn; - [CCode (cheader_filename = "ibus.h")] - public const int Uhornacute; - [CCode (cheader_filename = "ibus.h")] - public const int Uhornbelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int Uhorngrave; - [CCode (cheader_filename = "ibus.h")] - public const int Uhornhook; - [CCode (cheader_filename = "ibus.h")] - public const int Uhorntilde; - [CCode (cheader_filename = "ibus.h")] - public const int Ukrainian_GHE_WITH_UPTURN; - [CCode (cheader_filename = "ibus.h")] - public const int Ukrainian_I; - [CCode (cheader_filename = "ibus.h")] - public const int Ukrainian_IE; - [CCode (cheader_filename = "ibus.h")] - public const int Ukrainian_YI; - [CCode (cheader_filename = "ibus.h")] - public const int Ukrainian_ghe_with_upturn; - [CCode (cheader_filename = "ibus.h")] - public const int Ukrainian_i; - [CCode (cheader_filename = "ibus.h")] - public const int Ukrainian_ie; - [CCode (cheader_filename = "ibus.h")] - public const int Ukrainian_yi; - [CCode (cheader_filename = "ibus.h")] - public const int Ukranian_I; - [CCode (cheader_filename = "ibus.h")] - public const int Ukranian_JE; - [CCode (cheader_filename = "ibus.h")] - public const int Ukranian_YI; - [CCode (cheader_filename = "ibus.h")] - public const int Ukranian_i; - [CCode (cheader_filename = "ibus.h")] - public const int Ukranian_je; - [CCode (cheader_filename = "ibus.h")] - public const int Ukranian_yi; - [CCode (cheader_filename = "ibus.h")] - public const int Umacron; - [CCode (cheader_filename = "ibus.h")] - public const int Undo; - [CCode (cheader_filename = "ibus.h")] - public const int Uogonek; - [CCode (cheader_filename = "ibus.h")] - public const int Up; - [CCode (cheader_filename = "ibus.h")] - public const int Uring; - [CCode (cheader_filename = "ibus.h")] - public const int Utilde; - [CCode (cheader_filename = "ibus.h")] - public const int V; - [CCode (cheader_filename = "ibus.h")] - public const int VoidSymbol; - [CCode (cheader_filename = "ibus.h")] - public const int W; - [CCode (cheader_filename = "ibus.h")] - public const int Wacute; - [CCode (cheader_filename = "ibus.h")] - public const int Wcircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int Wdiaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int Wgrave; - [CCode (cheader_filename = "ibus.h")] - public const int WonSign; - [CCode (cheader_filename = "ibus.h")] - public const int X; - [CCode (cheader_filename = "ibus.h")] - public const int Xabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int Y; - [CCode (cheader_filename = "ibus.h")] - public const int Yacute; - [CCode (cheader_filename = "ibus.h")] - public const int Ybelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int Ycircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int Ydiaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int Ygrave; - [CCode (cheader_filename = "ibus.h")] - public const int Yhook; - [CCode (cheader_filename = "ibus.h")] - public const int Ytilde; - [CCode (cheader_filename = "ibus.h")] - public const int Z; - [CCode (cheader_filename = "ibus.h")] - public const int Zabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int Zacute; - [CCode (cheader_filename = "ibus.h")] - public const int Zcaron; - [CCode (cheader_filename = "ibus.h")] - public const int Zen_Koho; - [CCode (cheader_filename = "ibus.h")] - public const int Zenkaku; - [CCode (cheader_filename = "ibus.h")] - public const int Zenkaku_Hankaku; - [CCode (cheader_filename = "ibus.h")] - public const int Zstroke; - [CCode (cheader_filename = "ibus.h")] - public const int a; - [CCode (cheader_filename = "ibus.h")] - public const int aacute; - [CCode (cheader_filename = "ibus.h")] - public const int abelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int abovedot; - [CCode (cheader_filename = "ibus.h")] - public const int abreve; - [CCode (cheader_filename = "ibus.h")] - public const int abreveacute; - [CCode (cheader_filename = "ibus.h")] - public const int abrevebelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int abrevegrave; - [CCode (cheader_filename = "ibus.h")] - public const int abrevehook; - [CCode (cheader_filename = "ibus.h")] - public const int abrevetilde; - [CCode (cheader_filename = "ibus.h")] - public const int acircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int acircumflexacute; - [CCode (cheader_filename = "ibus.h")] - public const int acircumflexbelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int acircumflexgrave; - [CCode (cheader_filename = "ibus.h")] - public const int acircumflexhook; - [CCode (cheader_filename = "ibus.h")] - public const int acircumflextilde; - [CCode (cheader_filename = "ibus.h")] - public const int acute; - [CCode (cheader_filename = "ibus.h")] - public const int adiaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int ae; - [CCode (cheader_filename = "ibus.h")] - public const int agrave; - [CCode (cheader_filename = "ibus.h")] - public const int ahook; - [CCode (cheader_filename = "ibus.h")] - public const int amacron; - [CCode (cheader_filename = "ibus.h")] - public const int ampersand; - [CCode (cheader_filename = "ibus.h")] - public const int aogonek; - [CCode (cheader_filename = "ibus.h")] - public const int apostrophe; - [CCode (cheader_filename = "ibus.h")] - public const int approxeq; - [CCode (cheader_filename = "ibus.h")] - public const int approximate; - [CCode (cheader_filename = "ibus.h")] - public const int aring; - [CCode (cheader_filename = "ibus.h")] - public const int asciicircum; - [CCode (cheader_filename = "ibus.h")] - public const int asciitilde; - [CCode (cheader_filename = "ibus.h")] - public const int asterisk; - [CCode (cheader_filename = "ibus.h")] - public const int at; - [CCode (cheader_filename = "ibus.h")] - public const int atilde; - [CCode (cheader_filename = "ibus.h")] - public const int b; - [CCode (cheader_filename = "ibus.h")] - public const int babovedot; - [CCode (cheader_filename = "ibus.h")] - public const int backslash; - [CCode (cheader_filename = "ibus.h")] - public const int ballotcross; - [CCode (cheader_filename = "ibus.h")] - public const int bar; - [CCode (cheader_filename = "ibus.h")] - public const int because; - [CCode (cheader_filename = "ibus.h")] - public const int blank; - [CCode (cheader_filename = "ibus.h")] - public const int botintegral; - [CCode (cheader_filename = "ibus.h")] - public const int botleftparens; - [CCode (cheader_filename = "ibus.h")] - public const int botleftsqbracket; - [CCode (cheader_filename = "ibus.h")] - public const int botleftsummation; - [CCode (cheader_filename = "ibus.h")] - public const int botrightparens; - [CCode (cheader_filename = "ibus.h")] - public const int botrightsqbracket; - [CCode (cheader_filename = "ibus.h")] - public const int botrightsummation; - [CCode (cheader_filename = "ibus.h")] - public const int bott; - [CCode (cheader_filename = "ibus.h")] - public const int botvertsummationconnector; - [CCode (cheader_filename = "ibus.h")] - public const int braceleft; - [CCode (cheader_filename = "ibus.h")] - public const int braceright; - [CCode (cheader_filename = "ibus.h")] - public const int bracketleft; - [CCode (cheader_filename = "ibus.h")] - public const int bracketright; - [CCode (cheader_filename = "ibus.h")] - public const int braille_blank; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dot_1; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dot_10; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dot_2; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dot_3; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dot_4; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dot_5; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dot_6; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dot_7; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dot_8; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dot_9; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_123; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1234; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12345; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_123456; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1234567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12345678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1234568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_123457; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1234578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_123458; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12346; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_123467; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1234678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_123468; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12347; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_123478; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12348; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1235; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12356; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_123567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1235678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_123568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12357; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_123578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12358; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1236; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12367; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_123678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12368; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1237; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12378; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1238; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_124; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1245; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12456; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_124567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1245678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_124568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12457; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_124578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12458; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1246; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12467; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_124678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12468; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1247; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12478; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1248; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_125; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1256; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_125678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1257; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1258; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_126; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1267; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_12678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1268; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_127; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1278; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_128; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_13; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_134; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1345; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_13456; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_134567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1345678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_134568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_13457; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_134578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_13458; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1346; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_13467; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_134678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_13468; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1347; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_13478; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1348; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_135; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1356; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_13567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_135678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_13568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1357; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_13578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1358; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_136; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1367; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_13678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1368; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_137; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1378; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_138; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_14; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_145; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1456; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_14567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_145678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_14568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1457; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_14578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1458; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_146; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1467; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_14678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1468; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_147; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1478; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_148; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_15; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_156; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_15678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_157; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_158; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_16; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_167; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_1678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_168; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_17; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_178; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_18; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_23; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_234; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2345; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_23456; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_234567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2345678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_234568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_23457; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_234578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_23458; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2346; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_23467; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_234678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_23468; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2347; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_23478; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2348; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_235; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2356; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_23567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_235678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_23568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2357; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_23578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2358; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_236; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2367; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_23678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2368; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_237; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2378; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_238; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_24; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_245; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2456; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_24567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_245678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_24568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2457; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_24578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2458; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_246; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2467; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_24678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2468; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_247; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2478; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_248; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_25; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_256; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_25678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_257; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_258; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_26; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_267; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_2678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_268; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_27; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_278; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_28; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_3; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_34; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_345; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_3456; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_34567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_345678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_34568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_3457; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_34578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_3458; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_346; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_3467; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_34678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_3468; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_347; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_3478; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_348; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_35; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_356; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_3567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_35678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_3568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_357; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_3578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_358; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_36; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_367; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_3678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_368; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_37; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_378; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_38; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_4; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_45; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_456; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_4567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_45678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_4568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_457; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_4578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_458; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_46; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_467; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_4678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_468; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_47; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_478; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_48; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_5; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_56; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_567; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_5678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_568; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_57; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_578; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_58; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_6; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_67; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_678; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_68; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_7; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_78; - [CCode (cheader_filename = "ibus.h")] - public const int braille_dots_8; - [CCode (cheader_filename = "ibus.h")] - public const int breve; - [CCode (cheader_filename = "ibus.h")] - public const int brokenbar; - [CCode (cheader_filename = "ibus.h")] - public const int c; - [CCode (cheader_filename = "ibus.h")] - public const int cabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int cacute; - [CCode (cheader_filename = "ibus.h")] - public const int careof; - [CCode (cheader_filename = "ibus.h")] - public const int caret; - [CCode (cheader_filename = "ibus.h")] - public const int caron; - [CCode (cheader_filename = "ibus.h")] - public const int ccaron; - [CCode (cheader_filename = "ibus.h")] - public const int ccedilla; - [CCode (cheader_filename = "ibus.h")] - public const int ccircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int cedilla; - [CCode (cheader_filename = "ibus.h")] - public const int cent; - [CCode (cheader_filename = "ibus.h")] - public const int checkerboard; - [CCode (cheader_filename = "ibus.h")] - public const int checkmark; - [CCode (cheader_filename = "ibus.h")] - public const int circle; - [CCode (cheader_filename = "ibus.h")] - public const int club; - [CCode (cheader_filename = "ibus.h")] - public const int colon; - [CCode (cheader_filename = "ibus.h")] - public const int comma; - [CCode (cheader_filename = "ibus.h")] - public const int containsas; - [CCode (cheader_filename = "ibus.h")] - public const int copyright; - [CCode (cheader_filename = "ibus.h")] - public const int cr; - [CCode (cheader_filename = "ibus.h")] - public const int crossinglines; - [CCode (cheader_filename = "ibus.h")] - public const int cuberoot; - [CCode (cheader_filename = "ibus.h")] - public const int currency; - [CCode (cheader_filename = "ibus.h")] - public const int cursor; - [CCode (cheader_filename = "ibus.h")] - public const int d; - [CCode (cheader_filename = "ibus.h")] - public const int dabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int dagger; - [CCode (cheader_filename = "ibus.h")] - public const int dcaron; - [CCode (cheader_filename = "ibus.h")] - public const int dead_abovecomma; - [CCode (cheader_filename = "ibus.h")] - public const int dead_abovedot; - [CCode (cheader_filename = "ibus.h")] - public const int dead_abovereversedcomma; - [CCode (cheader_filename = "ibus.h")] - public const int dead_abovering; - [CCode (cheader_filename = "ibus.h")] - public const int dead_acute; - [CCode (cheader_filename = "ibus.h")] - public const int dead_belowbreve; - [CCode (cheader_filename = "ibus.h")] - public const int dead_belowcircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int dead_belowdiaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int dead_belowdot; - [CCode (cheader_filename = "ibus.h")] - public const int dead_belowmacron; - [CCode (cheader_filename = "ibus.h")] - public const int dead_belowring; - [CCode (cheader_filename = "ibus.h")] - public const int dead_belowtilde; - [CCode (cheader_filename = "ibus.h")] - public const int dead_breve; - [CCode (cheader_filename = "ibus.h")] - public const int dead_caron; - [CCode (cheader_filename = "ibus.h")] - public const int dead_cedilla; - [CCode (cheader_filename = "ibus.h")] - public const int dead_circumflex; - [CCode (cheader_filename = "ibus.h")] - public const int dead_dasia; - [CCode (cheader_filename = "ibus.h")] - public const int dead_diaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int dead_doubleacute; - [CCode (cheader_filename = "ibus.h")] - public const int dead_grave; - [CCode (cheader_filename = "ibus.h")] - public const int dead_hook; - [CCode (cheader_filename = "ibus.h")] - public const int dead_horn; - [CCode (cheader_filename = "ibus.h")] - public const int dead_iota; - [CCode (cheader_filename = "ibus.h")] - public const int dead_macron; - [CCode (cheader_filename = "ibus.h")] - public const int dead_ogonek; - [CCode (cheader_filename = "ibus.h")] - public const int dead_perispomeni; - [CCode (cheader_filename = "ibus.h")] - public const int dead_psili; - [CCode (cheader_filename = "ibus.h")] - public const int dead_semivoiced_sound; - [CCode (cheader_filename = "ibus.h")] - public const int dead_stroke; - [CCode (cheader_filename = "ibus.h")] - public const int dead_tilde; - [CCode (cheader_filename = "ibus.h")] - public const int dead_voiced_sound; - [CCode (cheader_filename = "ibus.h")] - public const int decimalpoint; - [CCode (cheader_filename = "ibus.h")] - public const int degree; - [CCode (cheader_filename = "ibus.h")] - public const int diaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int diamond; - [CCode (cheader_filename = "ibus.h")] - public const int digitspace; - [CCode (cheader_filename = "ibus.h")] - public const int dintegral; - [CCode (cheader_filename = "ibus.h")] - public const int division; - [CCode (cheader_filename = "ibus.h")] - public const int dollar; - [CCode (cheader_filename = "ibus.h")] - public const int doubbaselinedot; - [CCode (cheader_filename = "ibus.h")] - public const int doubleacute; - [CCode (cheader_filename = "ibus.h")] - public const int doubledagger; - [CCode (cheader_filename = "ibus.h")] - public const int doublelowquotemark; - [CCode (cheader_filename = "ibus.h")] - public const int downarrow; - [CCode (cheader_filename = "ibus.h")] - public const int downcaret; - [CCode (cheader_filename = "ibus.h")] - public const int downshoe; - [CCode (cheader_filename = "ibus.h")] - public const int downstile; - [CCode (cheader_filename = "ibus.h")] - public const int downtack; - [CCode (cheader_filename = "ibus.h")] - public const int dstroke; - [CCode (cheader_filename = "ibus.h")] - public const int e; - [CCode (cheader_filename = "ibus.h")] - public const int eabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int eacute; - [CCode (cheader_filename = "ibus.h")] - public const int ebelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int ecaron; - [CCode (cheader_filename = "ibus.h")] - public const int ecircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int ecircumflexacute; - [CCode (cheader_filename = "ibus.h")] - public const int ecircumflexbelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int ecircumflexgrave; - [CCode (cheader_filename = "ibus.h")] - public const int ecircumflexhook; - [CCode (cheader_filename = "ibus.h")] - public const int ecircumflextilde; - [CCode (cheader_filename = "ibus.h")] - public const int ediaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int egrave; - [CCode (cheader_filename = "ibus.h")] - public const int ehook; - [CCode (cheader_filename = "ibus.h")] - public const int eightsubscript; - [CCode (cheader_filename = "ibus.h")] - public const int eightsuperior; - [CCode (cheader_filename = "ibus.h")] - public const int elementof; - [CCode (cheader_filename = "ibus.h")] - public const int ellipsis; - [CCode (cheader_filename = "ibus.h")] - public const int em3space; - [CCode (cheader_filename = "ibus.h")] - public const int em4space; - [CCode (cheader_filename = "ibus.h")] - public const int emacron; - [CCode (cheader_filename = "ibus.h")] - public const int emdash; - [CCode (cheader_filename = "ibus.h")] - public const int emfilledcircle; - [CCode (cheader_filename = "ibus.h")] - public const int emfilledrect; - [CCode (cheader_filename = "ibus.h")] - public const int emopencircle; - [CCode (cheader_filename = "ibus.h")] - public const int emopenrectangle; - [CCode (cheader_filename = "ibus.h")] - public const int emptyset; - [CCode (cheader_filename = "ibus.h")] - public const int emspace; - [CCode (cheader_filename = "ibus.h")] - public const int endash; - [CCode (cheader_filename = "ibus.h")] - public const int enfilledcircbullet; - [CCode (cheader_filename = "ibus.h")] - public const int enfilledsqbullet; - [CCode (cheader_filename = "ibus.h")] - public const int eng; - [CCode (cheader_filename = "ibus.h")] - public const int enopencircbullet; - [CCode (cheader_filename = "ibus.h")] - public const int enopensquarebullet; - [CCode (cheader_filename = "ibus.h")] - public const int enspace; - [CCode (cheader_filename = "ibus.h")] - public const int eogonek; - [CCode (cheader_filename = "ibus.h")] - public const int equal; - [CCode (cheader_filename = "ibus.h")] - public const int eth; - [CCode (cheader_filename = "ibus.h")] - public const int etilde; - [CCode (cheader_filename = "ibus.h")] - public const int exclam; - [CCode (cheader_filename = "ibus.h")] - public const int exclamdown; - [CCode (cheader_filename = "ibus.h")] - public const int f; - [CCode (cheader_filename = "ibus.h")] - public const int fabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int femalesymbol; - [CCode (cheader_filename = "ibus.h")] - public const int ff; - [CCode (cheader_filename = "ibus.h")] - public const int figdash; - [CCode (cheader_filename = "ibus.h")] - public const int filledlefttribullet; - [CCode (cheader_filename = "ibus.h")] - public const int filledrectbullet; - [CCode (cheader_filename = "ibus.h")] - public const int filledrighttribullet; - [CCode (cheader_filename = "ibus.h")] - public const int filledtribulletdown; - [CCode (cheader_filename = "ibus.h")] - public const int filledtribulletup; - [CCode (cheader_filename = "ibus.h")] - public const int fiveeighths; - [CCode (cheader_filename = "ibus.h")] - public const int fivesixths; - [CCode (cheader_filename = "ibus.h")] - public const int fivesubscript; - [CCode (cheader_filename = "ibus.h")] - public const int fivesuperior; - [CCode (cheader_filename = "ibus.h")] - public const int fourfifths; - [CCode (cheader_filename = "ibus.h")] - public const int foursubscript; - [CCode (cheader_filename = "ibus.h")] - public const int foursuperior; - [CCode (cheader_filename = "ibus.h")] - public const int fourthroot; - [CCode (cheader_filename = "ibus.h")] - public const int function; - [CCode (cheader_filename = "ibus.h")] - public const int g; - [CCode (cheader_filename = "ibus.h")] - public const int gabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int gbreve; - [CCode (cheader_filename = "ibus.h")] - public const int gcaron; - [CCode (cheader_filename = "ibus.h")] - public const int gcedilla; - [CCode (cheader_filename = "ibus.h")] - public const int gcircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int grave; - [CCode (cheader_filename = "ibus.h")] - public const int greater; - [CCode (cheader_filename = "ibus.h")] - public const int greaterthanequal; - [CCode (cheader_filename = "ibus.h")] - public const int guillemotleft; - [CCode (cheader_filename = "ibus.h")] - public const int guillemotright; - [CCode (cheader_filename = "ibus.h")] - public const int h; - [CCode (cheader_filename = "ibus.h")] - public const int hairspace; - [CCode (cheader_filename = "ibus.h")] - public const int hcircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int heart; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_aleph; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_ayin; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_bet; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_beth; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_chet; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_dalet; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_daleth; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_doublelowline; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_finalkaph; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_finalmem; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_finalnun; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_finalpe; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_finalzade; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_finalzadi; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_gimel; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_gimmel; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_he; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_het; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_kaph; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_kuf; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_lamed; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_mem; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_nun; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_pe; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_qoph; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_resh; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_samech; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_samekh; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_shin; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_taf; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_taw; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_tet; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_teth; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_waw; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_yod; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_zade; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_zadi; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_zain; - [CCode (cheader_filename = "ibus.h")] - public const int hebrew_zayin; - [CCode (cheader_filename = "ibus.h")] - public const int hexagram; - [CCode (cheader_filename = "ibus.h")] - public const int horizconnector; - [CCode (cheader_filename = "ibus.h")] - public const int horizlinescan1; - [CCode (cheader_filename = "ibus.h")] - public const int horizlinescan3; - [CCode (cheader_filename = "ibus.h")] - public const int horizlinescan5; - [CCode (cheader_filename = "ibus.h")] - public const int horizlinescan7; - [CCode (cheader_filename = "ibus.h")] - public const int horizlinescan9; - [CCode (cheader_filename = "ibus.h")] - public const int hstroke; - [CCode (cheader_filename = "ibus.h")] - public const int ht; - [CCode (cheader_filename = "ibus.h")] - public const int hyphen; - [CCode (cheader_filename = "ibus.h")] - public const int i; - [CCode (cheader_filename = "ibus.h")] - public const int iacute; - [CCode (cheader_filename = "ibus.h")] - public const int ibelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int ibreve; - [CCode (cheader_filename = "ibus.h")] - public const int icircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int identical; - [CCode (cheader_filename = "ibus.h")] - public const int idiaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int idotless; - [CCode (cheader_filename = "ibus.h")] - public const int ifonlyif; - [CCode (cheader_filename = "ibus.h")] - public const int igrave; - [CCode (cheader_filename = "ibus.h")] - public const int ihook; - [CCode (cheader_filename = "ibus.h")] - public const int imacron; - [CCode (cheader_filename = "ibus.h")] - public const int implies; - [CCode (cheader_filename = "ibus.h")] - public const int includedin; - [CCode (cheader_filename = "ibus.h")] - public const int includes; - [CCode (cheader_filename = "ibus.h")] - public const int infinity; - [CCode (cheader_filename = "ibus.h")] - public const int integral; - [CCode (cheader_filename = "ibus.h")] - public const int intersection; - [CCode (cheader_filename = "ibus.h")] - public const int iogonek; - [CCode (cheader_filename = "ibus.h")] - public const int itilde; - [CCode (cheader_filename = "ibus.h")] - public const int j; - [CCode (cheader_filename = "ibus.h")] - public const int jcircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int jot; - [CCode (cheader_filename = "ibus.h")] - public const int k; - [CCode (cheader_filename = "ibus.h")] - public const int kana_A; - [CCode (cheader_filename = "ibus.h")] - public const int kana_CHI; - [CCode (cheader_filename = "ibus.h")] - public const int kana_E; - [CCode (cheader_filename = "ibus.h")] - public const int kana_FU; - [CCode (cheader_filename = "ibus.h")] - public const int kana_HA; - [CCode (cheader_filename = "ibus.h")] - public const int kana_HE; - [CCode (cheader_filename = "ibus.h")] - public const int kana_HI; - [CCode (cheader_filename = "ibus.h")] - public const int kana_HO; - [CCode (cheader_filename = "ibus.h")] - public const int kana_HU; - [CCode (cheader_filename = "ibus.h")] - public const int kana_I; - [CCode (cheader_filename = "ibus.h")] - public const int kana_KA; - [CCode (cheader_filename = "ibus.h")] - public const int kana_KE; - [CCode (cheader_filename = "ibus.h")] - public const int kana_KI; - [CCode (cheader_filename = "ibus.h")] - public const int kana_KO; - [CCode (cheader_filename = "ibus.h")] - public const int kana_KU; - [CCode (cheader_filename = "ibus.h")] - public const int kana_MA; - [CCode (cheader_filename = "ibus.h")] - public const int kana_ME; - [CCode (cheader_filename = "ibus.h")] - public const int kana_MI; - [CCode (cheader_filename = "ibus.h")] - public const int kana_MO; - [CCode (cheader_filename = "ibus.h")] - public const int kana_MU; - [CCode (cheader_filename = "ibus.h")] - public const int kana_N; - [CCode (cheader_filename = "ibus.h")] - public const int kana_NA; - [CCode (cheader_filename = "ibus.h")] - public const int kana_NE; - [CCode (cheader_filename = "ibus.h")] - public const int kana_NI; - [CCode (cheader_filename = "ibus.h")] - public const int kana_NO; - [CCode (cheader_filename = "ibus.h")] - public const int kana_NU; - [CCode (cheader_filename = "ibus.h")] - public const int kana_O; - [CCode (cheader_filename = "ibus.h")] - public const int kana_RA; - [CCode (cheader_filename = "ibus.h")] - public const int kana_RE; - [CCode (cheader_filename = "ibus.h")] - public const int kana_RI; - [CCode (cheader_filename = "ibus.h")] - public const int kana_RO; - [CCode (cheader_filename = "ibus.h")] - public const int kana_RU; - [CCode (cheader_filename = "ibus.h")] - public const int kana_SA; - [CCode (cheader_filename = "ibus.h")] - public const int kana_SE; - [CCode (cheader_filename = "ibus.h")] - public const int kana_SHI; - [CCode (cheader_filename = "ibus.h")] - public const int kana_SO; - [CCode (cheader_filename = "ibus.h")] - public const int kana_SU; - [CCode (cheader_filename = "ibus.h")] - public const int kana_TA; - [CCode (cheader_filename = "ibus.h")] - public const int kana_TE; - [CCode (cheader_filename = "ibus.h")] - public const int kana_TI; - [CCode (cheader_filename = "ibus.h")] - public const int kana_TO; - [CCode (cheader_filename = "ibus.h")] - public const int kana_TSU; - [CCode (cheader_filename = "ibus.h")] - public const int kana_TU; - [CCode (cheader_filename = "ibus.h")] - public const int kana_U; - [CCode (cheader_filename = "ibus.h")] - public const int kana_WA; - [CCode (cheader_filename = "ibus.h")] - public const int kana_WO; - [CCode (cheader_filename = "ibus.h")] - public const int kana_YA; - [CCode (cheader_filename = "ibus.h")] - public const int kana_YO; - [CCode (cheader_filename = "ibus.h")] - public const int kana_YU; - [CCode (cheader_filename = "ibus.h")] - public const int kana_a; - [CCode (cheader_filename = "ibus.h")] - public const int kana_closingbracket; - [CCode (cheader_filename = "ibus.h")] - public const int kana_comma; - [CCode (cheader_filename = "ibus.h")] - public const int kana_conjunctive; - [CCode (cheader_filename = "ibus.h")] - public const int kana_e; - [CCode (cheader_filename = "ibus.h")] - public const int kana_fullstop; - [CCode (cheader_filename = "ibus.h")] - public const int kana_i; - [CCode (cheader_filename = "ibus.h")] - public const int kana_middledot; - [CCode (cheader_filename = "ibus.h")] - public const int kana_o; - [CCode (cheader_filename = "ibus.h")] - public const int kana_openingbracket; - [CCode (cheader_filename = "ibus.h")] - public const int kana_switch; - [CCode (cheader_filename = "ibus.h")] - public const int kana_tsu; - [CCode (cheader_filename = "ibus.h")] - public const int kana_tu; - [CCode (cheader_filename = "ibus.h")] - public const int kana_u; - [CCode (cheader_filename = "ibus.h")] - public const int kana_ya; - [CCode (cheader_filename = "ibus.h")] - public const int kana_yo; - [CCode (cheader_filename = "ibus.h")] - public const int kana_yu; - [CCode (cheader_filename = "ibus.h")] - public const int kappa; - [CCode (cheader_filename = "ibus.h")] - public const int kcedilla; - [CCode (cheader_filename = "ibus.h")] - public const int kra; - [CCode (cheader_filename = "ibus.h")] - public const int l; - [CCode (cheader_filename = "ibus.h")] - public const int lacute; - [CCode (cheader_filename = "ibus.h")] - public const int latincross; - [CCode (cheader_filename = "ibus.h")] - public const int lbelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int lcaron; - [CCode (cheader_filename = "ibus.h")] - public const int lcedilla; - [CCode (cheader_filename = "ibus.h")] - public const int leftanglebracket; - [CCode (cheader_filename = "ibus.h")] - public const int leftarrow; - [CCode (cheader_filename = "ibus.h")] - public const int leftcaret; - [CCode (cheader_filename = "ibus.h")] - public const int leftdoublequotemark; - [CCode (cheader_filename = "ibus.h")] - public const int leftmiddlecurlybrace; - [CCode (cheader_filename = "ibus.h")] - public const int leftopentriangle; - [CCode (cheader_filename = "ibus.h")] - public const int leftpointer; - [CCode (cheader_filename = "ibus.h")] - public const int leftradical; - [CCode (cheader_filename = "ibus.h")] - public const int leftshoe; - [CCode (cheader_filename = "ibus.h")] - public const int leftsinglequotemark; - [CCode (cheader_filename = "ibus.h")] - public const int leftt; - [CCode (cheader_filename = "ibus.h")] - public const int lefttack; - [CCode (cheader_filename = "ibus.h")] - public const int less; - [CCode (cheader_filename = "ibus.h")] - public const int lessthanequal; - [CCode (cheader_filename = "ibus.h")] - public const int lf; - [CCode (cheader_filename = "ibus.h")] - public const int logicaland; - [CCode (cheader_filename = "ibus.h")] - public const int logicalor; - [CCode (cheader_filename = "ibus.h")] - public const int lowleftcorner; - [CCode (cheader_filename = "ibus.h")] - public const int lowrightcorner; - [CCode (cheader_filename = "ibus.h")] - public const int lstroke; - [CCode (cheader_filename = "ibus.h")] - public const int m; - [CCode (cheader_filename = "ibus.h")] - public const int mabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int macron; - [CCode (cheader_filename = "ibus.h")] - public const int malesymbol; - [CCode (cheader_filename = "ibus.h")] - public const int maltesecross; - [CCode (cheader_filename = "ibus.h")] - public const int marker; - [CCode (cheader_filename = "ibus.h")] - public const int masculine; - [CCode (cheader_filename = "ibus.h")] - public const int minus; - [CCode (cheader_filename = "ibus.h")] - public const int minutes; - [CCode (cheader_filename = "ibus.h")] - public const int mu; - [CCode (cheader_filename = "ibus.h")] - public const int multiply; - [CCode (cheader_filename = "ibus.h")] - public const int musicalflat; - [CCode (cheader_filename = "ibus.h")] - public const int musicalsharp; - [CCode (cheader_filename = "ibus.h")] - public const int n; - [CCode (cheader_filename = "ibus.h")] - public const int nabla; - [CCode (cheader_filename = "ibus.h")] - public const int nacute; - [CCode (cheader_filename = "ibus.h")] - public const int ncaron; - [CCode (cheader_filename = "ibus.h")] - public const int ncedilla; - [CCode (cheader_filename = "ibus.h")] - public const int ninesubscript; - [CCode (cheader_filename = "ibus.h")] - public const int ninesuperior; - [CCode (cheader_filename = "ibus.h")] - public const int nl; - [CCode (cheader_filename = "ibus.h")] - public const int nobreakspace; - [CCode (cheader_filename = "ibus.h")] - public const int notapproxeq; - [CCode (cheader_filename = "ibus.h")] - public const int notelementof; - [CCode (cheader_filename = "ibus.h")] - public const int notequal; - [CCode (cheader_filename = "ibus.h")] - public const int notidentical; - [CCode (cheader_filename = "ibus.h")] - public const int notsign; - [CCode (cheader_filename = "ibus.h")] - public const int ntilde; - [CCode (cheader_filename = "ibus.h")] - public const int numbersign; - [CCode (cheader_filename = "ibus.h")] - public const int numerosign; - [CCode (cheader_filename = "ibus.h")] - public const int o; - [CCode (cheader_filename = "ibus.h")] - public const int oacute; - [CCode (cheader_filename = "ibus.h")] - public const int obarred; - [CCode (cheader_filename = "ibus.h")] - public const int obelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int ocaron; - [CCode (cheader_filename = "ibus.h")] - public const int ocircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int ocircumflexacute; - [CCode (cheader_filename = "ibus.h")] - public const int ocircumflexbelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int ocircumflexgrave; - [CCode (cheader_filename = "ibus.h")] - public const int ocircumflexhook; - [CCode (cheader_filename = "ibus.h")] - public const int ocircumflextilde; - [CCode (cheader_filename = "ibus.h")] - public const int odiaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int odoubleacute; - [CCode (cheader_filename = "ibus.h")] - public const int oe; - [CCode (cheader_filename = "ibus.h")] - public const int ogonek; - [CCode (cheader_filename = "ibus.h")] - public const int ograve; - [CCode (cheader_filename = "ibus.h")] - public const int ohook; - [CCode (cheader_filename = "ibus.h")] - public const int ohorn; - [CCode (cheader_filename = "ibus.h")] - public const int ohornacute; - [CCode (cheader_filename = "ibus.h")] - public const int ohornbelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int ohorngrave; - [CCode (cheader_filename = "ibus.h")] - public const int ohornhook; - [CCode (cheader_filename = "ibus.h")] - public const int ohorntilde; - [CCode (cheader_filename = "ibus.h")] - public const int omacron; - [CCode (cheader_filename = "ibus.h")] - public const int oneeighth; - [CCode (cheader_filename = "ibus.h")] - public const int onefifth; - [CCode (cheader_filename = "ibus.h")] - public const int onehalf; - [CCode (cheader_filename = "ibus.h")] - public const int onequarter; - [CCode (cheader_filename = "ibus.h")] - public const int onesixth; - [CCode (cheader_filename = "ibus.h")] - public const int onesubscript; - [CCode (cheader_filename = "ibus.h")] - public const int onesuperior; - [CCode (cheader_filename = "ibus.h")] - public const int onethird; - [CCode (cheader_filename = "ibus.h")] - public const int ooblique; - [CCode (cheader_filename = "ibus.h")] - public const int openrectbullet; - [CCode (cheader_filename = "ibus.h")] - public const int openstar; - [CCode (cheader_filename = "ibus.h")] - public const int opentribulletdown; - [CCode (cheader_filename = "ibus.h")] - public const int opentribulletup; - [CCode (cheader_filename = "ibus.h")] - public const int ordfeminine; - [CCode (cheader_filename = "ibus.h")] - public const int oslash; - [CCode (cheader_filename = "ibus.h")] - public const int otilde; - [CCode (cheader_filename = "ibus.h")] - public const int overbar; - [CCode (cheader_filename = "ibus.h")] - public const int overline; - [CCode (cheader_filename = "ibus.h")] - public const int p; - [CCode (cheader_filename = "ibus.h")] - public const int pabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int paragraph; - [CCode (cheader_filename = "ibus.h")] - public const int parenleft; - [CCode (cheader_filename = "ibus.h")] - public const int parenright; - [CCode (cheader_filename = "ibus.h")] - public const int partdifferential; - [CCode (cheader_filename = "ibus.h")] - public const int partialderivative; - [CCode (cheader_filename = "ibus.h")] - public const int percent; - [CCode (cheader_filename = "ibus.h")] - public const int period; - [CCode (cheader_filename = "ibus.h")] - public const int periodcentered; - [CCode (cheader_filename = "ibus.h")] - public const int phonographcopyright; - [CCode (cheader_filename = "ibus.h")] - public const int plus; - [CCode (cheader_filename = "ibus.h")] - public const int plusminus; - [CCode (cheader_filename = "ibus.h")] - public const int prescription; - [CCode (cheader_filename = "ibus.h")] - public const int prolongedsound; - [CCode (cheader_filename = "ibus.h")] - public const int punctspace; - [CCode (cheader_filename = "ibus.h")] - public const int q; - [CCode (cheader_filename = "ibus.h")] - public const int quad; - [CCode (cheader_filename = "ibus.h")] - public const int question; - [CCode (cheader_filename = "ibus.h")] - public const int questiondown; - [CCode (cheader_filename = "ibus.h")] - public const int quotedbl; - [CCode (cheader_filename = "ibus.h")] - public const int quoteleft; - [CCode (cheader_filename = "ibus.h")] - public const int quoteright; - [CCode (cheader_filename = "ibus.h")] - public const int r; - [CCode (cheader_filename = "ibus.h")] - public const int racute; - [CCode (cheader_filename = "ibus.h")] - public const int radical; - [CCode (cheader_filename = "ibus.h")] - public const int rcaron; - [CCode (cheader_filename = "ibus.h")] - public const int rcedilla; - [CCode (cheader_filename = "ibus.h")] - public const int registered; - [CCode (cheader_filename = "ibus.h")] - public const int rightanglebracket; - [CCode (cheader_filename = "ibus.h")] - public const int rightarrow; - [CCode (cheader_filename = "ibus.h")] - public const int rightcaret; - [CCode (cheader_filename = "ibus.h")] - public const int rightdoublequotemark; - [CCode (cheader_filename = "ibus.h")] - public const int rightmiddlecurlybrace; - [CCode (cheader_filename = "ibus.h")] - public const int rightmiddlesummation; - [CCode (cheader_filename = "ibus.h")] - public const int rightopentriangle; - [CCode (cheader_filename = "ibus.h")] - public const int rightpointer; - [CCode (cheader_filename = "ibus.h")] - public const int rightshoe; - [CCode (cheader_filename = "ibus.h")] - public const int rightsinglequotemark; - [CCode (cheader_filename = "ibus.h")] - public const int rightt; - [CCode (cheader_filename = "ibus.h")] - public const int righttack; - [CCode (cheader_filename = "ibus.h")] - public const int s; - [CCode (cheader_filename = "ibus.h")] - public const int sabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int sacute; - [CCode (cheader_filename = "ibus.h")] - public const int scaron; - [CCode (cheader_filename = "ibus.h")] - public const int scedilla; - [CCode (cheader_filename = "ibus.h")] - public const int schwa; - [CCode (cheader_filename = "ibus.h")] - public const int scircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int script_switch; - [CCode (cheader_filename = "ibus.h")] - public const int seconds; - [CCode (cheader_filename = "ibus.h")] - public const int section; - [CCode (cheader_filename = "ibus.h")] - public const int semicolon; - [CCode (cheader_filename = "ibus.h")] - public const int semivoicedsound; - [CCode (cheader_filename = "ibus.h")] - public const int seveneighths; - [CCode (cheader_filename = "ibus.h")] - public const int sevensubscript; - [CCode (cheader_filename = "ibus.h")] - public const int sevensuperior; - [CCode (cheader_filename = "ibus.h")] - public const int signaturemark; - [CCode (cheader_filename = "ibus.h")] - public const int signifblank; - [CCode (cheader_filename = "ibus.h")] - public const int similarequal; - [CCode (cheader_filename = "ibus.h")] - public const int singlelowquotemark; - [CCode (cheader_filename = "ibus.h")] - public const int sixsubscript; - [CCode (cheader_filename = "ibus.h")] - public const int sixsuperior; - [CCode (cheader_filename = "ibus.h")] - public const int slash; - [CCode (cheader_filename = "ibus.h")] - public const int soliddiamond; - [CCode (cheader_filename = "ibus.h")] - public const int space; - [CCode (cheader_filename = "ibus.h")] - public const int squareroot; - [CCode (cheader_filename = "ibus.h")] - public const int ssharp; - [CCode (cheader_filename = "ibus.h")] - public const int sterling; - [CCode (cheader_filename = "ibus.h")] - public const int stricteq; - [CCode (cheader_filename = "ibus.h")] - public const int t; - [CCode (cheader_filename = "ibus.h")] - public const int tabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int tcaron; - [CCode (cheader_filename = "ibus.h")] - public const int tcedilla; - [CCode (cheader_filename = "ibus.h")] - public const int telephone; - [CCode (cheader_filename = "ibus.h")] - public const int telephonerecorder; - [CCode (cheader_filename = "ibus.h")] - public const int therefore; - [CCode (cheader_filename = "ibus.h")] - public const int thinspace; - [CCode (cheader_filename = "ibus.h")] - public const int thorn; - [CCode (cheader_filename = "ibus.h")] - public const int threeeighths; - [CCode (cheader_filename = "ibus.h")] - public const int threefifths; - [CCode (cheader_filename = "ibus.h")] - public const int threequarters; - [CCode (cheader_filename = "ibus.h")] - public const int threesubscript; - [CCode (cheader_filename = "ibus.h")] - public const int threesuperior; - [CCode (cheader_filename = "ibus.h")] - public const int tintegral; - [CCode (cheader_filename = "ibus.h")] - public const int topintegral; - [CCode (cheader_filename = "ibus.h")] - public const int topleftparens; - [CCode (cheader_filename = "ibus.h")] - public const int topleftradical; - [CCode (cheader_filename = "ibus.h")] - public const int topleftsqbracket; - [CCode (cheader_filename = "ibus.h")] - public const int topleftsummation; - [CCode (cheader_filename = "ibus.h")] - public const int toprightparens; - [CCode (cheader_filename = "ibus.h")] - public const int toprightsqbracket; - [CCode (cheader_filename = "ibus.h")] - public const int toprightsummation; - [CCode (cheader_filename = "ibus.h")] - public const int topt; - [CCode (cheader_filename = "ibus.h")] - public const int topvertsummationconnector; - [CCode (cheader_filename = "ibus.h")] - public const int trademark; - [CCode (cheader_filename = "ibus.h")] - public const int trademarkincircle; - [CCode (cheader_filename = "ibus.h")] - public const int tslash; - [CCode (cheader_filename = "ibus.h")] - public const int twofifths; - [CCode (cheader_filename = "ibus.h")] - public const int twosubscript; - [CCode (cheader_filename = "ibus.h")] - public const int twosuperior; - [CCode (cheader_filename = "ibus.h")] - public const int twothirds; - [CCode (cheader_filename = "ibus.h")] - public const int u; - [CCode (cheader_filename = "ibus.h")] - public const int uacute; - [CCode (cheader_filename = "ibus.h")] - public const int ubelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int ubreve; - [CCode (cheader_filename = "ibus.h")] - public const int ucircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int udiaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int udoubleacute; - [CCode (cheader_filename = "ibus.h")] - public const int ugrave; - [CCode (cheader_filename = "ibus.h")] - public const int uhook; - [CCode (cheader_filename = "ibus.h")] - public const int uhorn; - [CCode (cheader_filename = "ibus.h")] - public const int uhornacute; - [CCode (cheader_filename = "ibus.h")] - public const int uhornbelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int uhorngrave; - [CCode (cheader_filename = "ibus.h")] - public const int uhornhook; - [CCode (cheader_filename = "ibus.h")] - public const int uhorntilde; - [CCode (cheader_filename = "ibus.h")] - public const int umacron; - [CCode (cheader_filename = "ibus.h")] - public const int underbar; - [CCode (cheader_filename = "ibus.h")] - public const int underscore; - [CCode (cheader_filename = "ibus.h")] - public const int union; - [CCode (cheader_filename = "ibus.h")] - public const int uogonek; - [CCode (cheader_filename = "ibus.h")] - public const int uparrow; - [CCode (cheader_filename = "ibus.h")] - public const int upcaret; - [CCode (cheader_filename = "ibus.h")] - public const int upleftcorner; - [CCode (cheader_filename = "ibus.h")] - public const int uprightcorner; - [CCode (cheader_filename = "ibus.h")] - public const int upshoe; - [CCode (cheader_filename = "ibus.h")] - public const int upstile; - [CCode (cheader_filename = "ibus.h")] - public const int uptack; - [CCode (cheader_filename = "ibus.h")] - public const int uring; - [CCode (cheader_filename = "ibus.h")] - public const int utilde; - [CCode (cheader_filename = "ibus.h")] - public const int v; - [CCode (cheader_filename = "ibus.h")] - public const int variation; - [CCode (cheader_filename = "ibus.h")] - public const int vertbar; - [CCode (cheader_filename = "ibus.h")] - public const int vertconnector; - [CCode (cheader_filename = "ibus.h")] - public const int voicedsound; - [CCode (cheader_filename = "ibus.h")] - public const int vt; - [CCode (cheader_filename = "ibus.h")] - public const int w; - [CCode (cheader_filename = "ibus.h")] - public const int wacute; - [CCode (cheader_filename = "ibus.h")] - public const int wcircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int wdiaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int wgrave; - [CCode (cheader_filename = "ibus.h")] - public const int x; - [CCode (cheader_filename = "ibus.h")] - public const int xabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int y; - [CCode (cheader_filename = "ibus.h")] - public const int yacute; - [CCode (cheader_filename = "ibus.h")] - public const int ybelowdot; - [CCode (cheader_filename = "ibus.h")] - public const int ycircumflex; - [CCode (cheader_filename = "ibus.h")] - public const int ydiaeresis; - [CCode (cheader_filename = "ibus.h")] - public const int yen; - [CCode (cheader_filename = "ibus.h")] - public const int ygrave; - [CCode (cheader_filename = "ibus.h")] - public const int yhook; - [CCode (cheader_filename = "ibus.h")] - public const int ytilde; - [CCode (cheader_filename = "ibus.h")] - public const int z; - [CCode (cheader_filename = "ibus.h")] - public const int zabovedot; - [CCode (cheader_filename = "ibus.h")] - public const int zacute; - [CCode (cheader_filename = "ibus.h")] - public const int zcaron; - [CCode (cheader_filename = "ibus.h")] - public const int zerosubscript; - [CCode (cheader_filename = "ibus.h")] - public const int zerosuperior; - [CCode (cheader_filename = "ibus.h")] - public const int zstroke; - [CCode (cheader_filename = "ibus.h")] - public static unowned IBus.Attribute attr_background_new (uint color, uint start_index, uint end_index); - [CCode (cheader_filename = "ibus.h")] - public static unowned IBus.Attribute attr_foreground_new (uint color, uint start_index, uint end_index); - [CCode (cheader_filename = "ibus.h")] - public static unowned IBus.Attribute attr_underline_new (uint underline_type, uint start_index, uint end_index); - [CCode (cheader_filename = "ibus.h")] - public static void dbus_connection_setup (IBus.DBusConnection connection); - [CCode (cheader_filename = "ibus.h")] - public static void dbus_server_setup (IBus.DBusServer server); - [CCode (cheader_filename = "ibus.h")] - public static void free_strv (string strv); - [CCode (cheader_filename = "ibus.h")] - public static unowned string get_address (); - [CCode (cheader_filename = "ibus.h")] - public static long get_daemon_uid (); - [CCode (cheader_filename = "ibus.h")] - public static unowned string get_local_machine_id (); - [CCode (cheader_filename = "ibus.h")] - public static unowned string get_socket_path (); - [CCode (cheader_filename = "ibus.h")] - public static unowned string get_user_name (); - [CCode (cheader_filename = "ibus.h")] - public static void init (); - [CCode (cheader_filename = "ibus.h")] - public static bool key_event_from_string (string str, uint keyval, uint modifiers); - [CCode (cheader_filename = "ibus.h")] - public static unowned string key_event_to_string (uint keyval, uint modifiers); - [CCode (cheader_filename = "ibus.h")] - public static uint keyval_from_name (string keyval_name); - [CCode (cheader_filename = "ibus.h")] - public static unowned string keyval_name (uint keyval); - [CCode (cheader_filename = "ibus.h")] - public static void main (); - [CCode (cheader_filename = "ibus.h")] - public static void mainloop_setup (IBus.DBusConnectionSetupFunc connection_func, IBus.DBusServerSetupFunc server_func); - [CCode (cheader_filename = "ibus.h")] - public static void quit (); - [CCode (cheader_filename = "ibus.h")] - public static void set_display (string display); - [CCode (cheader_filename = "ibus.h")] - public static GLib.Type type_get_array (); - [CCode (cheader_filename = "ibus.h")] - public static GLib.Type type_get_dict_entry (); - [CCode (cheader_filename = "ibus.h")] - public static GLib.Type type_get_object_path (); - [CCode (cheader_filename = "ibus.h")] - public static GLib.Type type_get_struct (); - [CCode (cheader_filename = "ibus.h")] - public static GLib.Type type_get_variant (); - [CCode (cheader_filename = "ibus.h")] - public static void write_address (string address); - [CCode (cheader_filename = "ibus.h")] - public static void xml_free (IBus.XMLNode node); - [CCode (cheader_filename = "ibus.h")] - public static void xml_output (IBus.XMLNode node, GLib.StringBuilder output); - [CCode (cheader_filename = "ibus.h")] - public static unowned IBus.XMLNode xml_parse_buffer (string buffer); - [CCode (cheader_filename = "ibus.h")] - public static unowned IBus.XMLNode xml_parse_file (string name); -} diff --git a/bindings/vala/ibus-1.0/ibus-1.0-custom.vala b/bindings/vala/ibus-1.0/ibus-1.0-custom.vala deleted file mode 100644 index 8b1378917..000000000 --- a/bindings/vala/ibus-1.0/ibus-1.0-custom.vala +++ /dev/null @@ -1 +0,0 @@ - diff --git a/bindings/vala/ibus-1.0/ibus-1.0.excludes b/bindings/vala/ibus-1.0/ibus-1.0.excludes deleted file mode 100644 index 1c588245f..000000000 --- a/bindings/vala/ibus-1.0/ibus-1.0.excludes +++ /dev/null @@ -1,4 +0,0 @@ -stamp-ibusenumtypes.h -stamp-ibusmarshalers.h -ibusenumtypes.h -ibusmarshalers.h diff --git a/bindings/vala/ibus-1.0/ibus-1.0.files b/bindings/vala/ibus-1.0/ibus-1.0.files deleted file mode 100644 index 5e2d7aaa2..000000000 --- a/bindings/vala/ibus-1.0/ibus-1.0.files +++ /dev/null @@ -1,2 +0,0 @@ -include/ibus-1.0/ -lib/libibus.so diff --git a/bindings/vala/ibus-1.0/ibus-1.0.gi b/bindings/vala/ibus-1.0/ibus-1.0.gi deleted file mode 100644 index 17203f6f0..000000000 --- a/bindings/vala/ibus-1.0/ibus-1.0.gi +++ /dev/null @@ -1,4958 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bindings/vala/ibus-1.0/ibus-1.0.metadata b/bindings/vala/ibus-1.0/ibus-1.0.metadata deleted file mode 100644 index 7cf55fab9..000000000 --- a/bindings/vala/ibus-1.0/ibus-1.0.metadata +++ /dev/null @@ -1,7 +0,0 @@ -IBus cheader_filename="ibus.h" gir_namespace="IBus" gir_version="2.0" -IBusObject::destroy has_emitter="1" -ibus_bus_list_engines transfer_ownership="1" type_arguments="EngineDesc" -ibus_bus_list_active_engines transfer_ownership="1" type_arguments="EngineDesc" -ibus_bus_list_names transfer_ownership="1" type_arguments="string" -ibus_bus_get_name_owner transfer_ownership="1" -ibus_service_get_connections transfer_ownership="1" type_arguments="unowned Connection" diff --git a/bindings/vala/ibus-1.0/ibus-1.0.namespace b/bindings/vala/ibus-1.0/ibus-1.0.namespace deleted file mode 100644 index 5fa58c2f1..000000000 --- a/bindings/vala/ibus-1.0/ibus-1.0.namespace +++ /dev/null @@ -1 +0,0 @@ -IBus diff --git a/bindings/vala/test/Makefile b/bindings/vala/test/Makefile index abe55a77a..3bac28411 100644 --- a/bindings/vala/test/Makefile +++ b/bindings/vala/test/Makefile @@ -1,3 +1,19 @@ -ibus-engine-vala: test.vala - valac --pkg ibus-1.0 --pkg enchant $^ -C - valac -g --pkg ibus-1.0 --pkg enchant $^ -o $@ +TARGETS = \ + ibus-engine-enchant \ + ibus-config \ + $(NULL) + +all: $(TARGETS) + +ibus_pkgname = ibus-1.0 + +ibus-engine-enchant: enchant.vala + valac --vapidir .. --pkg $(ibus_pkgname) --pkg enchant $^ -C + valac -g --vapidir .. --pkg $(ibus_pkgname) --pkg enchant $^ -o $@ + +ibus-config: config.vala + valac --vapidir .. --pkg $(ibus_pkgname) --pkg gio-2.0 --pkg vala-0.10 $^ -C + valac -g --vapidir .. --pkg $(ibus_pkgname) --pkg gio-2.0 --pkg vala-0.10 $^ -o $@ + +clean: + $(RM) $(TARGETS) diff --git a/bindings/vala/test/config.vala b/bindings/vala/test/config.vala new file mode 100644 index 000000000..ade8cd3bb --- /dev/null +++ b/bindings/vala/test/config.vala @@ -0,0 +1,48 @@ +/* vim:set et sts=4 ai: */ +using Vala; +using GLib; +using IBus; + +class MemoryConfig : ConfigService { + private HashMap> values; + + construct { + values = new HashMap> (str_hash, str_equal); + } + + public override bool set_value (string section, + string name, + Variant _value) { + if (!values.contains (section)) + values[section] = new HashMap (str_hash, str_equal); + values[section][name] = _value; + value_changed (section, name, _value); + return true; + } + + public override Variant get_value (string section, + string name) throws GLib.Error { + if (!values.contains (section) || !values[section].contains(name)) + throw new DBusError.FAILED("Can not get value %s", name); + return values[section][name]; + } + + public static void main (string []argv) { + var bus = new IBus.Bus(); + + if (!bus.is_connected ()) { + stderr.printf ("Can not connect to ibus-daemon!\n"); + return; + } + + Type type = typeof (MemoryConfig); + ConfigService config = + (ConfigService) GLib.Object.new (type, + "connection", bus.get_connection (), + "object-path", "/org/freedesktop/IBus/Config"); + bus.request_name ("org.freedesktop.IBus.Config", 0); + IBus.main (); + config = null; + } + +} diff --git a/bindings/vala/test/test.vala b/bindings/vala/test/enchant.vala similarity index 76% rename from bindings/vala/test/test.vala rename to bindings/vala/test/enchant.vala index d957a6e84..3128dba9c 100644 --- a/bindings/vala/test/test.vala +++ b/bindings/vala/test/enchant.vala @@ -1,3 +1,4 @@ +/* vim:set et sts=4 ai: */ using GLib; using Enchant; using IBus; @@ -135,28 +136,34 @@ class TestEngine : Engine { base.update_auxiliary_text (new Text.from_string(words[i]), true); } } -} -void main (string []argv) { - var bus = new Bus(); - var factory = new Factory(bus.get_connection()); - factory.add_engine("vala-debug", typeof(TestEngine)); - var component = new Component ( - "org.freedesktop.IBus.Vala", - "ValaTest", "0.0.1", "GPL", - "Peng Huang ", - "http://code.google.com/p/ibus/", - "", - "ibus-vala"); - var engine = new EngineDesc ("vala-debug", - "Vala (debug)", - "Vala demo input method", - "zh_CN", - "GPL", - "Peng Huang ", - "", - "us"); - component.add_engine (engine); - bus.register_component (component); - IBus.main (); + public static void main (string []argv) { + var bus = new IBus.Bus(); + + if (!bus.is_connected ()) { + stderr.printf ("Can not connect to ibus-daemon!\n"); + return; + } + + var factory = new Factory(bus.get_connection()); + factory.add_engine("vala-debug", typeof(TestEngine)); + var component = new Component ( + "org.freedesktop.IBus.Vala", + "ValaTest", "0.0.1", "GPL", + "Peng Huang ", + "http://code.google.com/p/ibus/", + "", + "ibus-vala"); + var engine = new EngineDesc ("vala-debug", + "Vala (debug)", + "Vala demo input method", + "zh_CN", + "GPL", + "Peng Huang ", + "", + "us"); + component.add_engine (engine); + bus.register_component (component); + IBus.main (); + } } diff --git a/bus/.gitignore b/bus/.gitignore deleted file mode 100644 index 3e078dc3f..000000000 --- a/bus/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -ibus-daemon -test-matchrule -ibus.desktop diff --git a/bus/Makefile.am b/bus/Makefile.am index e9dffa9f8..2b619edc8 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -20,51 +20,37 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA -libibus = $(top_builddir)/src/libibus.la +NULL = -INCLUDES = \ - -I$(top_srcdir)/src \ +libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la + +INCLUDES = \ + -I$(top_srcdir)/src \ -I$(top_builddir)/src \ $(NULL) AM_CFLAGS = \ @GLIB2_CFLAGS@ \ + @GIO2_CFLAGS@ \ @GTHREAD2_CFLAGS@ \ - @DBUS_CFLAGS@ \ -DG_LOG_DOMAIN=\"IBUS\" \ -DPKGDATADIR=\"$(pkgdatadir)\" \ -DLIBEXECDIR=\"$(libexecdir)\" \ -DBINDIR=\"@bindir@\" \ + -DIBUS_DISABLE_DEPRECATED \ $(INCLUDES) \ $(NULL) AM_LDADD = \ @GOBJECT2_LIBS@ \ @GLIB2_LIBS@ \ + @GIO2_LIBS@ \ @GTHREAD2_LIBS@ \ - @DBUS_LIBS@ \ $(libibus) \ $(NULL) -TESTS = \ - test-matchrule \ - $(NULL) -xdgautostart_DATA = \ - ibus.desktop \ - $(NULL) -xdgautostartdir = $(sysconfdir)/xdg/autostart - -desktopdir = $(datadir)/applications -desktop_in_files = ibus.desktop.in -desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) -@INTLTOOL_DESKTOP_RULE@ - -noinst_PROGRAMS = $(TESTS) -bin_PROGRAMS = ibus-daemon -ibus_daemon_DEPENDENCIES = \ - $(libibus) \ - $(NULL) -ibus_daemon_SOURCES = \ - main.c \ +commonsrc = \ + component.c \ + component.h \ dbusimpl.c \ dbusimpl.h \ ibusimpl.c \ @@ -77,6 +63,8 @@ ibus_daemon_SOURCES = \ panelproxy.h \ factoryproxy.c \ factoryproxy.h \ + global.c \ + global.h \ server.c \ server.h \ connection.c \ @@ -85,7 +73,18 @@ ibus_daemon_SOURCES = \ matchrule.h \ registry.c \ registry.h \ - option.h \ + marshalers.c \ + marshalers.h \ + types.h \ + $(NULL) + +bin_PROGRAMS = ibus-daemon +ibus_daemon_DEPENDENCIES = \ + $(libibus) \ + $(NULL) +ibus_daemon_SOURCES = \ + $(commonsrc) \ + main.c \ $(NULL) ibus_daemon_CFLAGS = \ $(AM_CFLAGS) \ @@ -94,17 +93,46 @@ ibus_daemon_LDADD = \ $(AM_LDADD) \ $(NULL) -# test_registry_SOURCES = \ -# registry.c \ -# registry.h \ -# factoryproxy.c \ -# factoryproxy.h \ -# test-registry.c \ -# $(NULL) +BUILT_SOURCES = \ + marshalers.h \ + marshalers.c \ + $(NULL) + +# gen marshal +marshalers.h: marshalers.list + $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=bus_marshal $(srcdir)/marshalers.list --header --internal > $@.tmp && \ + mv $@.tmp $@ + +marshalers.c: marshalers.h marshalers.list + $(AM_V_GEN) (echo "#include \"marshalers.h\""; \ + $(GLIB_GENMARSHAL) --prefix=bus_marshal $(srcdir)/marshalers.list --body --internal) > $@.tmp && \ + mv $@.tmp $@ + + +TESTS = \ + test-matchrule \ + test-registry \ + test-stress \ + $(NULL) + +noinst_PROGRAMS = $(TESTS) +test_registry_SOURCES = \ + $(commonsrc) \ + test-registry.c \ + $(NULL) +test_registry_CFLAGS = \ + $(AM_CFLAGS) \ + $(NULL) +test_registry_LDADD = \ + $(AM_LDADD) \ + $(NULL) + +test_matchrule_DEPENDENCIES = \ + $(libibus) \ + $(NULL) test_matchrule_SOURCES = \ - connection.c \ - matchrule.c \ + $(commonsrc) \ test-matchrule.c \ $(NULL) test_matchrule_CFLAGS = \ @@ -114,18 +142,42 @@ test_matchrule_LDADD = \ $(AM_LDADD) \ $(NULL) -EXTRA_DIST = \ - $(desktop_in_files) \ +test_stress_SOURCES = \ + test-client.c \ + test-client.h \ + test-stress.c \ + $(NULL) +test_stress_CFLAGS = \ + $(AM_CFLAGS) \ + @GTK2_CFLAGS@ \ + @X11_CFLAGS@ \ + $(NULL) +test_stress_LDADD = \ + $(AM_LDADD) \ + @GTK2_LIBS@ \ + @X11_LIBS@ \ + $(NULL) + +EXTRA_DIST = \ + $(desktop_in_files) \ + marshalers.list \ $(NULL) -DISTCLEANFILES = \ - $(desktop_DATA) \ +DISTCLEANFILES = \ + $(desktop_DATA) \ $(NULL) $(libibus): $(MAKE) -C $(top_builddir)/src test: ibus-daemon - $(ENV) \ + $(ENV_IBUS_TEST) \ G_DEBUG=fatal_warnings \ $(builddir)/ibus-daemon -v + +desktopdir = $(datadir)/applications +desktop_in_files = ibus.desktop.in +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) +@INTLTOOL_DESKTOP_RULE@ + +-include $(top_srcdir)/git.mk diff --git a/bus/component.c b/bus/component.c new file mode 100644 index 000000000..868aa16c3 --- /dev/null +++ b/bus/component.c @@ -0,0 +1,424 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* bus - The Input Bus + * Copyright (C) 2010 Peng Huang + * Copyright (C) 2010 Google Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#include "component.h" + +#include +#include +#include +#include + +#include "global.h" +#include "marshalers.h" +#include "types.h" + +enum { + LAST_SIGNAL, +}; + +enum { + PROP_0 = 0, + PROP_COMPONENT, + PROP_FACTORY, +}; + +struct _BusComponent { + IBusObject parent; + + /* instance members */ + + /* an object which represents one XML file in the ibus/component/ directory. */ + IBusComponent *component; + /* a proxy object which starts an engine. */ + BusFactoryProxy *factory; + + /* TRUE if the component started in the verbose mode. */ + gboolean verbose; + /* TRUE if the component needs to be restarted when it dies. */ + gboolean restart; + /* TRUE if the component will be destroyed with factory. */ + gboolean destroy_with_factory; + + /* process id of the process (e.g. ibus-config, ibus-engine-*, ..) of the component. */ + GPid pid; + guint child_source_id; +}; + +struct _BusComponentClass { + IBusObjectClass parent; + /* class members */ +}; + +/* functions prototype */ +static GObject* bus_component_constructor (GType type, + guint n_construct_params, + GObjectConstructParam *construct_params); +static void bus_component_set_property (BusComponent *component, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void bus_component_get_property (BusComponent *component, + guint prop_id, + GValue *value, + GParamSpec *pspec); +static void bus_component_destroy (BusComponent *component); + +G_DEFINE_TYPE (BusComponent, bus_component, IBUS_TYPE_OBJECT) + +static void +bus_component_class_init (BusComponentClass *class) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class); + + gobject_class->constructor = bus_component_constructor; + gobject_class->set_property = (GObjectSetPropertyFunc) bus_component_set_property; + gobject_class->get_property = (GObjectGetPropertyFunc) bus_component_get_property; + ibus_object_class->destroy = (IBusObjectDestroyFunc) bus_component_destroy; + + /* install properties */ + g_object_class_install_property (gobject_class, + PROP_COMPONENT, + g_param_spec_object ("component", /* canonical name of the property */ + "component", /* nick name */ + "component", /* description */ + IBUS_TYPE_COMPONENT, /* object type */ + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + g_object_class_install_property (gobject_class, + PROP_FACTORY, + g_param_spec_object ("factory", + "factory", + "factory", + BUS_TYPE_FACTORY_PROXY, + G_PARAM_READWRITE)); +} + +static void +bus_component_init (BusComponent *component) +{ +} + +/** + * bus_component_constructor: + * + * A constructor method which is called after bus_component_init is called. + */ +static GObject* +bus_component_constructor (GType type, + guint n_construct_params, + GObjectConstructParam *construct_params) +{ + GObject *object; + object = G_OBJECT_CLASS (bus_component_parent_class)->constructor (type, + n_construct_params, + construct_params); + BusComponent *component = (BusComponent *) object; + /* we have to override the _constructor method since in _init method, the component->component property is not set yet. */ + g_assert (IBUS_IS_COMPONENT (component->component)); + + static GQuark quark = 0; + if (quark == 0) { + quark = g_quark_from_static_string ("BusComponent"); + } + + /* associate each engine with BusComponent. a component might have one or more components. For example, ibus-engine-pinyin would + * have two - 'pinyin' and 'bopomofo' and ibus-engine-m17n has many. On the other hand, the gtkpanel component does not have an + * engine, of course. */ + GList *engines = ibus_component_get_engines (component->component); + GList *p; + for (p = engines; p != NULL; p = p->next) { + g_object_set_qdata ((GObject *) p->data, quark, component); + } + g_list_free (engines); + + return object; +} + +static void +bus_component_set_property (BusComponent *component, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + switch (prop_id) { + case PROP_COMPONENT: + g_assert (component->component == NULL); + component->component = g_value_dup_object (value); + break; + case PROP_FACTORY: + bus_component_set_factory (component, (BusFactoryProxy *) g_value_get_object (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (component, prop_id, pspec); + } +} + +static void +bus_component_get_property (BusComponent *component, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + switch (prop_id) { + case PROP_COMPONENT: + g_value_set_object (value, bus_component_get_component (component)); + break; + case PROP_FACTORY: + g_value_set_object (value, bus_component_get_factory (component)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (component, prop_id, pspec); + } +} + +static void +bus_component_destroy (BusComponent *component) +{ + if (component->pid != 0) { + bus_component_stop (component); + g_spawn_close_pid (component->pid); + component->pid = 0; + } + + if (component->child_source_id != 0) { + g_source_remove (component->child_source_id); + component->child_source_id = 0; + } + + if (component->component != NULL) { + g_object_unref (component->component); + component->component = NULL; + } + + IBUS_OBJECT_CLASS (bus_component_parent_class)->destroy (IBUS_OBJECT (component)); +} + +BusComponent * +bus_component_new (IBusComponent *component, + BusFactoryProxy *factory) +{ + g_assert (IBUS_IS_COMPONENT (component)); + + return (BusComponent *) g_object_new (BUS_TYPE_COMPONENT, + /* properties below will be set via the bus_component_set_property function. */ + "component", component, + "factory", factory, + NULL); +} + +static void +bus_component_factory_destroy_cb (BusFactoryProxy *factory, + BusComponent *component) +{ + g_return_if_fail (component->factory == factory); + + g_object_unref (component->factory); + component->factory = NULL; + /* emit the "notify" signal for the factory property on component. */ + g_object_notify ((GObject *) component, "factory"); + + if (component->destroy_with_factory) + ibus_object_destroy ((IBusObject *) component); +} + +IBusComponent * +bus_component_get_component (BusComponent *component) +{ + g_assert (BUS_IS_COMPONENT (component)); + return component->component; +} + +void +bus_component_set_factory (BusComponent *component, + BusFactoryProxy *factory) +{ + g_assert (BUS_IS_COMPONENT (component)); + + if (component->factory == factory) { + return; + } + + if (component->factory) { + g_signal_handlers_disconnect_by_func (component->factory, + bus_component_factory_destroy_cb, + component); + g_object_unref (component->factory); + component->factory = NULL; + } + + if (factory) { + g_assert (BUS_IS_FACTORY_PROXY (factory)); + component->factory = (BusFactoryProxy *) g_object_ref (factory); + g_signal_connect (factory, "destroy", + G_CALLBACK (bus_component_factory_destroy_cb), component); + } + + /* emit the "notify" signal for the factory property on component. */ + g_object_notify ((GObject*) component, "factory"); +} + +BusFactoryProxy * +bus_component_get_factory (BusComponent *component) +{ + g_assert (BUS_IS_COMPONENT (component)); + return component->factory; +} + +const gchar * +bus_component_get_name (BusComponent *component) +{ + g_assert (BUS_IS_COMPONENT (component)); + + return ibus_component_get_name (component->component); +} + +GList * +bus_component_get_engines (BusComponent *component) +{ + g_assert (BUS_IS_COMPONENT (component)); + + return ibus_component_get_engines (component->component); +} + +void +bus_component_set_destroy_with_factory (BusComponent *component, + gboolean with_factory) +{ + g_assert (BUS_IS_COMPONENT (component)); + + component->destroy_with_factory = with_factory; +} + +void +bus_component_set_restart (BusComponent *component, + gboolean restart) +{ + g_assert (BUS_IS_COMPONENT (component)); + component->restart = restart; +} + +/** + * bus_component_child_cb: + * + * A callback function to be called when the child process is terminated. + */ +static void +bus_component_child_cb (GPid pid, + gint status, + BusComponent *component) +{ + g_assert (BUS_IS_COMPONENT (component)); + g_assert (component->pid == pid); + g_spawn_close_pid (pid); + component->pid = 0; + component->child_source_id = 0; + + if (component->restart) { + bus_component_start (component, component->verbose); + } +} + +gboolean +bus_component_start (BusComponent *component, + gboolean verbose) +{ + g_assert (BUS_IS_COMPONENT (component)); + + if (component->pid != 0) + return TRUE; + + component->verbose = verbose; + + gint argc; + gchar **argv; + gboolean retval; + + GError *error = NULL; + if (!g_shell_parse_argv (ibus_component_get_exec (component->component), + &argc, + &argv, + &error)) { + g_warning ("Can not parse component %s exec: %s", + ibus_component_get_name (component->component), + error->message); + g_error_free (error); + return FALSE; + } + + error = NULL; + GSpawnFlags flags = G_SPAWN_DO_NOT_REAP_CHILD; + if (!verbose) { + flags |= G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL; + } + retval = g_spawn_async (NULL, argv, NULL, + flags, + NULL, NULL, + &(component->pid), &error); + g_strfreev (argv); + if (!retval) { + g_warning ("Can not execute component %s: %s", + ibus_component_get_name (component->component), + error->message); + g_error_free (error); + return FALSE; + } + + component->child_source_id = + g_child_watch_add (component->pid, + (GChildWatchFunc) bus_component_child_cb, + component); + + return TRUE; +} + +gboolean +bus_component_stop (BusComponent *component) +{ + g_assert (BUS_IS_COMPONENT (component)); + + if (component->pid == 0) + return TRUE; + + kill (component->pid, SIGTERM); + return TRUE; +} + +gboolean +bus_component_is_running (BusComponent *component) +{ + g_assert (BUS_IS_COMPONENT (component)); + + return (component->pid != 0); +} + +BusComponent * +bus_component_from_engine_desc (IBusEngineDesc *engine) +{ + g_assert (IBUS_IS_ENGINE_DESC (engine)); + + static GQuark quark = 0; + if (quark == 0) { + quark = g_quark_from_static_string ("BusComponent"); + } + + return (BusComponent *) g_object_get_qdata ((GObject *) engine, quark); +} diff --git a/bus/component.h b/bus/component.h new file mode 100644 index 000000000..e675eab21 --- /dev/null +++ b/bus/component.h @@ -0,0 +1,106 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* bus - The Input Bus + * Copyright (C) 2010 Peng Huang + * Copyright (C) 2010 Google Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifndef __BUS_COMPONENT_H_ +#define __BUS_COMPONENT_H_ + +#include +#include "factoryproxy.h" + +/* + * Type macros. + */ + +/* define GOBJECT macros */ +#define BUS_TYPE_COMPONENT \ + (bus_component_get_type ()) +#define BUS_COMPONENT(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUS_TYPE_COMPONENT, BusComponent)) +#define BUS_COMPONENT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), BUS_TYPE_COMPONENT, BusComponentClass)) +#define BUS_IS_COMPONENT(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUS_TYPE_COMPONENT)) +#define BUS_IS_COMPONENT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), BUS_TYPE_COMPONENT)) +#define BUS_COMPONENT_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), BUS_TYPE_COMPONENT, BusComponentClass)) + +G_BEGIN_DECLS + +typedef struct _BusComponent BusComponent; +typedef struct _BusComponentClass BusComponentClass; + +GType bus_component_get_type (void); +BusComponent *bus_component_new (IBusComponent *component, + BusFactoryProxy *factory); +IBusComponent *bus_component_get_component (BusComponent *component); +void bus_component_set_factory (BusComponent *compinent, + BusFactoryProxy *factory); +BusFactoryProxy *bus_component_get_factory (BusComponent *factory); +void bus_component_set_destroy_with_factory + (BusComponent *component, + gboolean with_factory); + +/** + * bus_component_get_name: + * + * Return a component name such as "org.freedesktop.IBus.Panel" and "com.google.IBus.Mozc" + */ +const gchar *bus_component_get_name (BusComponent *component); + +/** + * bus_component_get_engines: + * + * Return a list of IBusEngineDesc objects the component has. + */ +GList *bus_component_get_engines (BusComponent *component); + +/** + * bus_component_start: + * @verbose: if TRUE, the stdout and stderr of the child process is not redirected to /dev/null. + * @returns: TRUE if the component is successfully started. + * + * Start the component by forking and executing an executable file for the component. + */ +gboolean bus_component_start (BusComponent *component, + gboolean verbose); + +/** + * bus_component_stop: + * @returns: TRUE + * + * Kill a process for the component. + */ +gboolean bus_component_stop (BusComponent *component); + +/** + * bus_component_stop: + * @returns: TRUE if a process for the component exists. + */ +gboolean bus_component_is_running (BusComponent *component); + +void bus_component_set_restart (BusComponent *component, + gboolean restart); +BusComponent *bus_component_from_engine_desc (IBusEngineDesc *engine); + +G_END_DECLS +#endif + diff --git a/bus/connection.c b/bus/connection.c index c1f6fcd90..5273fcc16 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -23,116 +24,138 @@ #include "connection.h" #include "matchrule.h" -#define BUS_CONNECTION_GET_PRIVATE(o) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((o), BUS_TYPE_CONNECTION, BusConnectionPrivate)) +struct _BusConnection { + IBusObject parent; -/* BusConnectionPriv */ -struct _BusConnectionPrivate { + /* instance members */ + + /* underlying GDBus connetion */ + GDBusConnection *connection; + /* a unique name of the connection like ":1.0" */ + gchar *unique_name; + /* list for well known names */ + GList *names; + + guint filter_id; }; -typedef struct _BusConnectionPrivate BusConnectionPrivate; -// static guint _signals[LAST_SIGNAL] = { 0 }; +struct _BusConnectionClass { + IBusObjectClass parent; + + /* class members */ +}; + +/* static guint _signals[LAST_SIGNAL] = { 0 }; */ /* functions prototype */ -static void bus_connection_destroy (BusConnection *connection); -static gboolean bus_connection_authenticate_unix_user - (IBusConnection *connection, - gulong uid); -static gboolean bus_connection_ibus_message (BusConnection *connection, - IBusMessage *message); -#if 0 -static gboolean bus_connection_dbus_signal (BusConnection *connection, - DBusMessage *message); -#endif - -G_DEFINE_TYPE (BusConnection, bus_connection, IBUS_TYPE_CONNECTION) +static void bus_connection_destroy (BusConnection *connection); +static void bus_connection_set_dbus_connection + (BusConnection *connection, + GDBusConnection *dbus_connection); +static void bus_connection_dbus_connection_closed_cb + (GDBusConnection *dbus_connection, + gboolean remote_peer_vanished, + GError *error, + BusConnection *connection); +static GQuark bus_connection_quark (void); -BusConnection * -bus_connection_new (void) -{ - BusConnection *connection = BUS_CONNECTION (g_object_new (BUS_TYPE_CONNECTION, NULL)); - return connection; -} +#define BUS_CONNECTION_QUARK (bus_connection_quark ()) + +G_DEFINE_TYPE (BusConnection, bus_connection, IBUS_TYPE_OBJECT) static void -bus_connection_class_init (BusConnectionClass *klass) +bus_connection_class_init (BusConnectionClass *class) { - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); - IBusConnectionClass *ibus_connection_class = IBUS_CONNECTION_CLASS (klass); + IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class); ibus_object_class->destroy = (IBusObjectDestroyFunc) bus_connection_destroy; - - ibus_connection_class->authenticate_unix_user = bus_connection_authenticate_unix_user; - ibus_connection_class->ibus_message = - (IBusIBusMessageFunc) bus_connection_ibus_message; - } static void bus_connection_init (BusConnection *connection) { - connection->unique_name = NULL; - connection->names = NULL; } static void bus_connection_destroy (BusConnection *connection) { - GList *name; - - IBUS_OBJECT_CLASS(bus_connection_parent_class)->destroy (IBUS_OBJECT (connection)); + if (connection->connection) { + /* disconnect from closed signal */ + g_signal_handlers_disconnect_by_func (connection->connection, + G_CALLBACK (bus_connection_dbus_connection_closed_cb), connection); + + /* remove filter */ + bus_connection_set_filter (connection, NULL, NULL, NULL); + + /* disconnect busconnection with dbus connection */ + g_object_set_qdata ((GObject *)connection->connection, BUS_CONNECTION_QUARK, NULL); + if (!g_dbus_connection_is_closed (connection->connection)) { + g_dbus_connection_close (connection->connection, NULL, NULL, NULL); + } + g_object_unref (connection->connection); + connection->connection = NULL; + } if (connection->unique_name) { g_free (connection->unique_name); connection->unique_name = NULL; } - for (name = connection->names; name != NULL; name = name->next) { - g_free (name->data); - } - g_list_free (connection->names); + g_list_free_full (connection->names, g_free); connection->names = NULL; + + IBUS_OBJECT_CLASS(bus_connection_parent_class)->destroy (IBUS_OBJECT (connection)); } -static gboolean -bus_connection_authenticate_unix_user (IBusConnection *connection, - gulong uid) +static void +bus_connection_dbus_connection_closed_cb (GDBusConnection *dbus_connection, + gboolean remote_peer_vanished, + GError *error, + BusConnection *connection) { - /* just allow root or same user connect to ibus */ - if (uid == 0 || uid == getuid ()) - return TRUE; - return FALSE; + ibus_object_destroy ((IBusObject *) connection); } -static gboolean -bus_connection_ibus_message (BusConnection *connection, - IBusMessage *message) +static void +bus_connection_set_dbus_connection (BusConnection *connection, + GDBusConnection *dbus_connection) { - gboolean retval; + connection->connection = dbus_connection; + g_object_ref (connection->connection); + g_object_set_qdata_full ((GObject *) dbus_connection, + BUS_CONNECTION_QUARK, + g_object_ref (connection), + (GDestroyNotify) g_object_unref); + g_signal_connect (connection->connection, "closed", + G_CALLBACK (bus_connection_dbus_connection_closed_cb), connection); +} -#if 0 - gchar *str = ibus_message_to_string (message); - g_debug ("%s", str); - g_free(str); -#endif +static GQuark +bus_connection_quark (void) +{ + static GQuark quark = 0; + if (quark == 0) { + quark = g_quark_from_static_string ("BUS_CONNECTION"); + } + return quark; +} - retval = IBUS_CONNECTION_CLASS (bus_connection_parent_class)->ibus_message ( - (IBusConnection *)connection, - message); - return retval; +BusConnection * +bus_connection_new (GDBusConnection *dbus_connection) +{ + g_return_val_if_fail (bus_connection_lookup (dbus_connection) == NULL, NULL); + BusConnection *connection = BUS_CONNECTION (g_object_new (BUS_TYPE_CONNECTION, NULL)); + bus_connection_set_dbus_connection (connection, dbus_connection); + return connection; } -#if 0 -static gboolean -bus_connection_dbus_signal (BusConnection *connection, - DBusMessage *message) +BusConnection * +bus_connection_lookup (GDBusConnection *dbus_connection) { - gboolean retval; - retval = IBUS_CONNECTION_CLASS (bus_connection_parent_class)->dbus_signal ( - IBUS_CONNECTION (connection), message); - return retval; + g_return_val_if_fail (G_IS_DBUS_CONNECTION (dbus_connection), NULL); + return (BusConnection *) g_object_get_qdata ((GObject *) dbus_connection, + BUS_CONNECTION_QUARK); } -#endif const gchar * bus_connection_get_unique_name (BusConnection *connection) @@ -144,7 +167,7 @@ void bus_connection_set_unique_name (BusConnection *connection, const gchar *name) { - g_assert (connection->unique_name == NULL); + g_assert (connection->unique_name == NULL); /* we don't allow rewriting the unique_name. */ connection->unique_name = g_strdup (name); } @@ -156,7 +179,7 @@ bus_connection_get_names (BusConnection *connection) const gchar * bus_connection_add_name (BusConnection *connection, - const gchar *name) + const gchar *name) { gchar *new_name; @@ -168,50 +191,51 @@ bus_connection_add_name (BusConnection *connection, gboolean bus_connection_remove_name (BusConnection *connection, - const gchar *name) + const gchar *name) { - GList *link; - - link = g_list_find_custom (connection->names, name, (GCompareFunc) g_strcmp0); + GList *list = g_list_find_custom (connection->names, name, (GCompareFunc) g_strcmp0); - if (link) { - g_free (link->data); - connection->names = g_list_delete_link (connection->names, link); + if (list) { + g_free (list->data); + connection->names = g_list_delete_link (connection->names, list); return TRUE; } return FALSE; } gboolean -bus_connection_add_match (BusConnection *connection, - const gchar *rule) +bus_connection_has_name (BusConnection *connection, + const gchar *name) { - g_assert (BUS_IS_CONNECTION (connection)); - g_assert (rule != NULL); + GList *list = g_list_find_custom (connection->names, name, (GCompareFunc) g_strcmp0); + return list != NULL; +} - BusMatchRule *p; - GList *link; +GDBusConnection * +bus_connection_get_dbus_connection (BusConnection *connection) +{ + g_assert (BUS_IS_CONNECTION (connection)); + return connection->connection; +} - p = bus_match_rule_new (rule); - if (p == NULL) - return FALSE; +void +bus_connection_set_filter (BusConnection *connection, + GDBusMessageFilterFunction filter_func, + gpointer user_data, + GDestroyNotify user_data_free_func) +{ + g_assert (BUS_IS_CONNECTION (connection)); - for (link = connection->rules; link != NULL; link = link->next) { - if (bus_match_rule_is_equal (p, (BusMatchRule *)link->data)) { - g_object_unref (p); - return TRUE; - } + if (connection->filter_id != 0) { + g_dbus_connection_remove_filter (connection->connection, connection->filter_id); + connection->filter_id = 0; } - connection->rules = g_list_append (connection->rules, p); - return TRUE; - -} - -gboolean -bus_connection_remove_match (BusConnection *connection, - const gchar *rule) -{ - return FALSE; + if (filter_func != NULL) { + connection->filter_id = g_dbus_connection_add_filter (connection->connection, + filter_func, + user_data, + user_data_free_func); + /* Note: g_dbus_connection_add_filter seems not to return zero as a valid id. */ + } } - diff --git a/bus/connection.h b/bus/connection.h index 0e027ed6c..2a34319f1 100644 --- a/bus/connection.h +++ b/bus/connection.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,8 +19,8 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#ifndef __CONNECTION_H_ -#define __CONNECTION_H_ +#ifndef __BUS_CONNECTION_H_ +#define __BUS_CONNECTION_H_ #include @@ -46,32 +47,82 @@ G_BEGIN_DECLS typedef struct _BusConnection BusConnection; typedef struct _BusConnectionClass BusConnectionClass; -struct _BusConnection { - IBusConnection parent; +GType bus_connection_get_type (void); - /* instance members */ - gchar *unique_name; - /* list for well known names */ - GList *names; - GList *rules; -}; +/** + * bus_connection_new: + * + * Create a BusConnection object from a low-level GDBus connection. + */ +BusConnection *bus_connection_new (GDBusConnection *connection); -struct _BusConnectionClass { - IBusConnectionClass parent; +/** + * bus_connection_lookup: + * + * Lookup the BusConnection object which corresponds to the low-level connection. + */ +BusConnection *bus_connection_lookup (GDBusConnection *connection); - /* class members */ -}; +const gchar *bus_connection_get_unique_name (BusConnection *connection); +void bus_connection_set_unique_name (BusConnection *connection, + const gchar *name); + +/** + * bus_connection_get_names: + * + * Get the list of well-known names of the connection. + */ +const GList *bus_connection_get_names (BusConnection *connection); + +/** + * bus_connection_add_name: + * @name: a well-known name for the connection. + * @returns: g_strdup (name) + * + * Add the well-known name to the connection. + */ +const gchar *bus_connection_add_name (BusConnection *connection, + const gchar *name); + +/** + * bus_connection_remove_name: + * @name: a well-known name for the connection. + * @returns: TRUE on success. + * + * Remove the well-known name from the connection. + */ +gboolean bus_connection_remove_name (BusConnection *connection, + const gchar *name); + +/** + * bus_connection_has_name: + * @name: a well-known name for the connection. + * @returns: TRUE if found the name. + * + * Lookup the well-known name from the connection. + */ +gboolean bus_connection_has_name (BusConnection *connection, + const gchar *name); + +/** + * bus_connection_get_dbus_connection: + * + * Get the underlying GDBus connection. + */ +GDBusConnection *bus_connection_get_dbus_connection (BusConnection *connection); + +/** + * bus_connection_set_filter: + * + * Set a filter function which will be called on all incoming and outgoing messages on the connection. + * WARNING - this filter function could be called by the GDBus's worker thread. So the function should not call thread unsafe IBus functions. + */ +void bus_connection_set_filter (BusConnection *connection, + GDBusMessageFilterFunction + filter_func, + gpointer user_data, + GDestroyNotify user_data_free_func); -GType bus_connection_get_type (void); -BusConnection *bus_connection_new (void); -const gchar *bus_connection_get_unique_name (BusConnection *connection); -void bus_connection_set_unique_name (BusConnection *connection, - const gchar *name); -const GList *bus_connection_get_names (BusConnection *connection); -const gchar *bus_connection_add_name (BusConnection *connection, - const gchar *name); -gboolean bus_connection_remove_name (BusConnection *connection, - const gchar *name); G_END_DECLS #endif diff --git a/bus/dbusimpl.c b/bus/dbusimpl.c index 68e742315..3ff24cac9 100644 --- a/bus/dbusimpl.c +++ b/bus/dbusimpl.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -19,18 +20,21 @@ * Boston, MA 02111-1307, USA. */ -#include -#include -#include -#include #include "dbusimpl.h" -#include "connection.h" + +#include + +#include "global.h" +#include "ibusimpl.h" +#include "marshalers.h" #include "matchrule.h" +#include "registry.h" +#include "types.h" enum { - NAME_ACQUIRED, - NAME_LOST, NAME_OWNER_CHANGED, + NAME_LOST, + NAME_ACQUIRED, LAST_SIGNAL, }; @@ -40,78 +44,550 @@ enum { static guint dbus_signals[LAST_SIGNAL] = { 0 }; +struct _BusDBusImpl { + IBusService parent; + + /* instance members */ + /* a map from a unique bus name (e.g. ":1.0") to a BusConnection. */ + GHashTable *unique_names; + /* a map from a requested well-known name (e.g. "org.freedesktop.IBus.Panel") to a BusNameService. */ + GHashTable *names; + /* a list of IBusService objects. */ + GList *objects; + /* a list of active BusConnections. */ + GList *connections; + /* a list of BusMatchRules requested by the connections above. */ + GList *rules; + /* a serial number used to generate a unique name of a bus. */ + guint id; + + GMutex *dispatch_lock; + GList *dispatch_queue; + + GMutex *forward_lock; + GList *forward_queue; + + /* a list of BusMethodCall to be used to reply when services are + really available */ + GList *start_service_calls; +}; + +struct _BusDBusImplClass { + IBusServiceClass parent; + + /* class members */ + void (* name_owner_changed) (BusDBusImpl *dbus, + BusConnection *connection, + gchar *name, + gchar *old_name, + gchar *new_name); + + void (* name_lost) (BusDBusImpl *dbus, + BusConnection *connection, + gchar *name); + + void (* name_acquired) (BusDBusImpl *dbus, + BusConnection *connection, + gchar *name); +}; + +typedef struct _BusDispatchData BusDispatchData; +struct _BusDispatchData { + GDBusMessage *message; + BusConnection *skip_connection; +}; + +typedef struct _BusNameService BusNameService; +struct _BusNameService { + gchar *name; + GSList *owners; +}; + +typedef struct _BusConnectionOwner BusConnectionOwner; +struct _BusConnectionOwner { + BusConnection *conn; + + guint allow_replacement : 1; + guint do_not_queue : 1; +}; + +typedef struct _BusMethodCall BusMethodCall; +struct _BusMethodCall { + BusDBusImpl *dbus; + BusConnection *connection; + GVariant *parameters; + GDBusMethodInvocation *invocation; + guint timeout_id; +}; + /* functions prototype */ static void bus_dbus_impl_destroy (BusDBusImpl *dbus); -static gboolean bus_dbus_impl_ibus_message (BusDBusImpl *dbus, +static void bus_dbus_impl_service_method_call + (IBusService *service, + GDBusConnection *dbus_connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation + *invocation); +static GVariant *bus_dbus_impl_service_get_property + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error); +static gboolean bus_dbus_impl_service_set_property + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error); +static void bus_dbus_impl_name_owner_changed + (BusDBusImpl *dbus, BusConnection *connection, - IBusMessage *message); -static void bus_dbus_impl_name_owner_changed(BusDBusImpl *dbus, gchar *name, gchar *old_name, gchar *new_name); - - -static void _connection_destroy_cb (BusConnection *connection, +static void bus_dbus_impl_name_lost + (BusDBusImpl *dbus, + BusConnection *connection, + gchar *name); +static void bus_dbus_impl_name_acquired + (BusDBusImpl *dbus, + BusConnection *connection, + gchar *name); +static void bus_dbus_impl_connection_destroy_cb + (BusConnection *connection, + BusDBusImpl *dbus); +static void bus_dbus_impl_rule_destroy_cb (BusMatchRule *rule, BusDBusImpl *dbus); -static void _rule_destroy_cb (BusMatchRule *rule, +static void bus_dbus_impl_object_destroy_cb(IBusService *object, BusDBusImpl *dbus); G_DEFINE_TYPE(BusDBusImpl, bus_dbus_impl, IBUS_TYPE_SERVICE) -BusDBusImpl * -bus_dbus_impl_get_default (void) +/* The D-Bus interfaces available in this class, which consists of a list of methods this class implements and + * a list of signals this class may emit. See bus_dbus_impl_new_connection and ibusservice.c for more details. */ +static const gchar introspection_xml[] = + "" + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; + +static void +bus_connection_owner_set_flags (BusConnectionOwner *owner, + guint32 flags) { - static BusDBusImpl *dbus = NULL; + owner->allow_replacement = + (flags & IBUS_BUS_NAME_FLAG_ALLOW_REPLACEMENT) != 0; - if (dbus == NULL) { - dbus = (BusDBusImpl *) g_object_new (BUS_TYPE_DBUS_IMPL, - "path", DBUS_PATH_DBUS, - NULL); + owner->do_not_queue = + (flags & IBUS_BUS_NAME_FLAG_DO_NOT_QUEUE) != 0; +} + +static BusConnectionOwner * +bus_connection_owner_new (BusConnection *connection, + guint32 flags) +{ + BusConnectionOwner *owner = NULL; + + g_assert (BUS_IS_CONNECTION (connection)); + + owner = g_slice_new (BusConnectionOwner); + if (owner != NULL) { + owner->conn = g_object_ref (connection); + bus_connection_owner_set_flags (owner, flags); } - return dbus; + return owner; +} + +static void +bus_connection_owner_free (BusConnectionOwner *owner) +{ + g_assert (owner != NULL); + + g_object_unref (owner->conn); + owner->conn = NULL; + g_slice_free (BusConnectionOwner, owner); +} + +static GSList * +bus_name_service_find_owner_link (BusNameService *service, + BusConnection *connection) +{ + GSList *owners = service->owners; + + while (owners) { + BusConnectionOwner *owner = (BusConnectionOwner *) owners->data; + if (owner->conn == connection) { + break; + } + owners = owners->next; + } + + return owners; +} + +static BusNameService * +bus_name_service_new (const gchar *name) +{ + BusNameService *service = NULL; + + g_assert (name != NULL); + + service = g_slice_new (BusNameService); + g_assert (service != NULL); + + service->name = g_strdup (name); + service->owners = NULL; + + return service; +} + +static void +bus_name_service_free (BusNameService *service) +{ + GSList *list = NULL; + + g_assert (service != NULL); + + g_slist_free_full (service->owners, + (GDestroyNotify) bus_connection_owner_free); + service->owners = NULL; + + g_free (service->name); + g_slice_free (BusNameService, service); +} + +static void +bus_name_service_set_primary_owner (BusNameService *service, + BusConnectionOwner *owner, + BusDBusImpl *dbus) +{ + g_assert (service != NULL); + g_assert (owner != NULL); + g_assert (dbus != NULL); + + BusConnectionOwner *old = service->owners != NULL ? + (BusConnectionOwner *)service->owners->data : NULL; + + if (old != NULL) { + g_signal_emit (dbus, + dbus_signals[NAME_LOST], + 0, + old->conn, + service->name); + } + + g_signal_emit (dbus, + dbus_signals[NAME_ACQUIRED], + 0, + owner->conn, + service->name ? service->name : ""); + + g_signal_emit (dbus, + dbus_signals[NAME_OWNER_CHANGED], + 0, + owner->conn, + service->name, + old != NULL ? bus_connection_get_unique_name (old->conn) : "", + bus_connection_get_unique_name (owner->conn)); + + if (old != NULL && old->do_not_queue != 0) { + /* If old primary owner does not want to be in queue, we remove it. */ + service->owners = g_slist_remove (service->owners, old); + bus_connection_remove_name (old->conn, service->name); + bus_connection_owner_free (old); + } + + service->owners = g_slist_prepend (service->owners, (gpointer) owner); +} + +static BusConnectionOwner * +bus_name_service_get_primary_owner (BusNameService *service) +{ + g_assert (service != NULL); + + if (service->owners == NULL) { + return NULL; + } + + return (BusConnectionOwner *) service->owners->data; +} + +static void +bus_name_service_add_non_primary_owner (BusNameService *service, + BusConnectionOwner *owner, + BusDBusImpl *dbus) +{ + g_assert (service != NULL); + g_assert (owner != NULL); + g_assert (dbus != NULL); + g_assert (service->owners != NULL); + + service->owners = g_slist_append (service->owners, (gpointer) owner); +} + +static BusConnectionOwner * +bus_name_service_find_owner (BusNameService *service, + BusConnection *connection) +{ + g_assert (service != NULL); + g_assert (connection != NULL); + + GSList *owners = bus_name_service_find_owner_link (service, connection); + if (owners != NULL) + return (BusConnectionOwner *)owners->data; + return NULL; +} + +static void +bus_name_service_remove_owner (BusNameService *service, + BusConnectionOwner *owner, + BusDBusImpl *dbus) +{ + GSList *owners; + + g_assert (service != NULL); + g_assert (owner != NULL); + + + owners = bus_name_service_find_owner_link (service, owner->conn); + g_assert (owners != NULL); + + if (owners->data == bus_name_service_get_primary_owner (service)) { + BusConnectionOwner *_new = NULL; + if (owners->next != NULL) { + _new = (BusConnectionOwner *)owners->next->data; + } + + if (dbus != NULL) { + g_signal_emit (dbus, + dbus_signals[NAME_LOST], + 0, + owner->conn, + service->name); + if (_new != NULL) { + g_signal_emit (dbus, + dbus_signals[NAME_ACQUIRED], + 0, + _new->conn, + service->name); + } + g_signal_emit (dbus, + dbus_signals[NAME_OWNER_CHANGED], + 0, + _new != NULL ? _new->conn : NULL, + service->name, + bus_connection_get_unique_name (owner->conn), + _new != NULL ? bus_connection_get_unique_name (_new->conn) : ""); + + } + } + + service->owners = g_slist_remove_link (service->owners, (gpointer) owners); +} + +static gboolean +bus_name_service_get_allow_replacement (BusNameService *service) +{ + BusConnectionOwner *owner = NULL; + + g_assert (service != NULL); + + owner = bus_name_service_get_primary_owner (service); + if (owner == NULL) { + return TRUE; + } + return owner->allow_replacement; +} + +static BusMethodCall * +bus_method_call_new (BusDBusImpl *dbus, + BusConnection *connection, + GVariant *parameters, + GDBusMethodInvocation *invocation) +{ + BusMethodCall *call = g_slice_new0 (BusMethodCall); + call->dbus = g_object_ref (dbus); + call->connection = g_object_ref (connection); + call->parameters = g_variant_ref (parameters); + call->invocation = g_object_ref (invocation); + return call; +} + +static void +bus_method_call_free (BusMethodCall *call) +{ + if (call->timeout_id != 0) { + g_source_remove (call->timeout_id); + } + + g_object_unref (call->dbus); + g_object_unref (call->connection); + g_variant_unref (call->parameters); + g_object_unref (call->invocation); + g_slice_free (BusMethodCall, call); } static void -bus_dbus_impl_class_init (BusDBusImplClass *klass) +bus_dbus_impl_class_init (BusDBusImplClass *class) { - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - IBusServiceClass *service_class = IBUS_SERVICE_CLASS (klass); + GObjectClass *gobject_class = G_OBJECT_CLASS (class); IBUS_OBJECT_CLASS (gobject_class)->destroy = (IBusObjectDestroyFunc) bus_dbus_impl_destroy; - service_class->ibus_message = (ServiceIBusMessageFunc) bus_dbus_impl_ibus_message; + /* override the default implementations in the parent class. */ + IBUS_SERVICE_CLASS (class)->service_method_call = bus_dbus_impl_service_method_call; + IBUS_SERVICE_CLASS (class)->service_get_property = bus_dbus_impl_service_get_property; + IBUS_SERVICE_CLASS (class)->service_set_property = bus_dbus_impl_service_set_property; + + ibus_service_class_add_interfaces (IBUS_SERVICE_CLASS (class), introspection_xml); + + /* register a handler of the name-owner-changed signal below. */ + class->name_owner_changed = bus_dbus_impl_name_owner_changed; - klass->name_owner_changed = bus_dbus_impl_name_owner_changed; + /* register a handler of the name-lost signal below. */ + class->name_lost = bus_dbus_impl_name_lost; + + /* register a handler of the name-acquired signal below. */ + class->name_acquired = bus_dbus_impl_name_acquired; /* install signals */ dbus_signals[NAME_OWNER_CHANGED] = g_signal_new (I_("name-owner-changed"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (BusDBusImplClass, name_owner_changed), NULL, NULL, - ibus_marshal_VOID__STRING_STRING_STRING, + bus_marshal_VOID__OBJECT_STRING_STRING_STRING, G_TYPE_NONE, - 3, + 4, + BUS_TYPE_CONNECTION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); + dbus_signals[NAME_LOST] = + g_signal_new (I_("name-lost"), + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (BusDBusImplClass, name_lost), + NULL, NULL, + bus_marshal_VOID__OBJECT_STRING, + G_TYPE_NONE, + 2, + BUS_TYPE_CONNECTION, + G_TYPE_STRING); + + dbus_signals[NAME_ACQUIRED] = + g_signal_new (I_("name-acquired"), + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (BusDBusImplClass, name_acquired), + NULL, NULL, + bus_marshal_VOID__OBJECT_STRING, + G_TYPE_NONE, + 2, + BUS_TYPE_CONNECTION, + G_TYPE_STRING); } static void bus_dbus_impl_init (BusDBusImpl *dbus) { dbus->unique_names = g_hash_table_new (g_str_hash, g_str_equal); - dbus->names = g_hash_table_new (g_str_hash, g_str_equal); - dbus->objects = g_hash_table_new (g_str_hash, g_str_equal); - dbus->connections = NULL; - dbus->rules = NULL; - dbus->id = 1; + dbus->names = g_hash_table_new_full (g_str_hash, g_str_equal, + NULL, + (GDestroyNotify) bus_name_service_free); - g_object_ref (dbus); - g_hash_table_insert (dbus->objects, DBUS_PATH_DBUS, dbus); + dbus->dispatch_lock = g_mutex_new (); + dbus->forward_lock = g_mutex_new (); + + /* other members are automatically zero-initialized. */ } static void @@ -119,9 +595,20 @@ bus_dbus_impl_destroy (BusDBusImpl *dbus) { GList *p; + for (p = dbus->objects; p != NULL; p = p->next) { + IBusService *object = (IBusService *) p->data; + g_signal_handlers_disconnect_by_func (object, + G_CALLBACK (bus_dbus_impl_object_destroy_cb), dbus); + ibus_object_destroy ((IBusObject *) object); + g_object_unref (object); + } + g_list_free (dbus->objects); + dbus->objects = NULL; + for (p = dbus->rules; p != NULL; p = p->next) { BusMatchRule *rule = BUS_MATCH_RULE (p->data); - g_signal_handlers_disconnect_by_func (rule, _rule_destroy_cb, dbus); + g_signal_handlers_disconnect_by_func (rule, + G_CALLBACK (bus_dbus_impl_rule_destroy_cb), dbus); ibus_object_destroy ((IBusObject *) rule); g_object_unref (rule); } @@ -130,9 +617,9 @@ bus_dbus_impl_destroy (BusDBusImpl *dbus) for (p = dbus->connections; p != NULL; p = p->next) { BusConnection *connection = BUS_CONNECTION (p->data); - g_signal_handlers_disconnect_by_func (connection, _connection_destroy_cb, dbus); - ibus_connection_close ((IBusConnection *) connection); - ibus_object_destroy ((IBusObject *) connection); + g_signal_handlers_disconnect_by_func (connection, + bus_dbus_impl_connection_destroy_cb, dbus); + ibus_object_destroy (IBUS_OBJECT (connection)); g_object_unref (connection); } g_list_free (dbus->connections); @@ -140,801 +627,1015 @@ bus_dbus_impl_destroy (BusDBusImpl *dbus) g_hash_table_remove_all (dbus->unique_names); g_hash_table_remove_all (dbus->names); - g_hash_table_remove_all (dbus->objects); dbus->unique_names = NULL; dbus->names = NULL; - dbus->objects = NULL; - - G_OBJECT_CLASS(bus_dbus_impl_parent_class)->dispose (G_OBJECT (dbus)); -} - -/* introspectable interface */ -static IBusMessage * -_dbus_introspect (BusDBusImpl *dbus, - IBusMessage *message, - BusConnection *connection) -{ - static const gchar *introspect = - DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE - "\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" -#if 0 - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" -#endif - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" -#if 0 - " \n" - " \n" - " \n" -#endif - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" -#if 0 - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" -#endif - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" -#if 0 - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" -#endif - " \n" - "\n"; - - IBusMessage *reply_message; - reply_message = ibus_message_new_method_return (message); - ibus_message_append_args (reply_message, - G_TYPE_STRING, &introspect, - G_TYPE_INVALID); - - return reply_message; -} + g_list_free_full (dbus->start_service_calls, + (GDestroyNotify) bus_method_call_free); + dbus->start_service_calls = NULL; - -/* dbus interface */ -static IBusMessage * -_dbus_no_implement (BusDBusImpl *dbus, - IBusMessage *message, - BusConnection *connection) -{ - IBusMessage *reply_message; - reply_message = ibus_message_new_error_printf (message, - DBUS_ERROR_UNKNOWN_METHOD, - "IBus does not support %s.", - ibus_message_get_member (message)); - return reply_message; + /* FIXME destruct _lock and _queue members. */ + IBUS_OBJECT_CLASS(bus_dbus_impl_parent_class)->destroy ((IBusObject *) dbus); } - -static IBusMessage * -_dbus_hello (BusDBusImpl *dbus, - IBusMessage *message, - BusConnection *connection) +/** + * bus_dbus_impl_hello: + * + * Implement the "Hello" method call of the org.freedesktop.DBus interface. + * Assign a unique bus name like ":1.0" for the connection and return the name (as a D-Bus reply.) + */ +static void +bus_dbus_impl_hello (BusDBusImpl *dbus, + BusConnection *connection, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - IBusMessage *reply_message; - if (bus_connection_get_unique_name (connection) != NULL) { - reply_message = ibus_message_new_error (message, - DBUS_ERROR_FAILED, - "Already handled an Hello message"); + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Already handled an Hello message"); } else { - gchar *name; - - name = g_strdup_printf (":1.%d", dbus->id ++); + gchar *name = g_strdup_printf (":1.%u", ++dbus->id); bus_connection_set_unique_name (connection, name); g_free (name); name = (gchar *) bus_connection_get_unique_name (connection); g_hash_table_insert (dbus->unique_names, name, connection); - - reply_message = ibus_message_new_method_return (message); - ibus_message_append_args (reply_message, - G_TYPE_STRING, &name, - G_TYPE_INVALID); - - ibus_connection_send ((IBusConnection *) connection, reply_message); - ibus_message_unref (reply_message); - ibus_connection_flush ((IBusConnection *) connection); - reply_message = NULL; + g_dbus_method_invocation_return_value (invocation, g_variant_new ("(s)", name)); g_signal_emit (dbus, dbus_signals[NAME_OWNER_CHANGED], 0, + connection, name, "", name); - } - - return reply_message; } -static IBusMessage * -_dbus_list_names (BusDBusImpl *dbus, - IBusMessage *message, - BusConnection *connection) +/** + * bus_dbus_impl_list_names: + * + * Implement the "ListNames" method call of the org.freedesktop.DBus interface. + * Return all bus names (e.g. ":1.0", "org.freedesktop.IBus.Panel") as a D-Bus reply. + */ +static void +bus_dbus_impl_list_names (BusDBusImpl *dbus, + BusConnection *connection, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - IBusMessage *reply_message; - IBusMessageIter iter, sub_iter; - GList *name, *names; - gchar *v; - - reply_message = ibus_message_new_method_return (message); - - ibus_message_iter_init_append (reply_message, &iter); - ibus_message_iter_open_container (&iter, IBUS_TYPE_ARRAY, "s", &sub_iter); - - v = DBUS_SERVICE_DBUS; - ibus_message_iter_append (&sub_iter, G_TYPE_STRING, &v); + GVariantBuilder builder; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("as")); - v = IBUS_SERVICE_IBUS; - ibus_message_iter_append (&sub_iter, G_TYPE_STRING, &v); + /* FIXME should add them? */ + g_variant_builder_add (&builder, "s", "org.freedesktop.DBus"); + g_variant_builder_add (&builder, "s", "org.freedesktop.IBus"); - // append well-known names + /* append well-known names */ + GList *names, *name; names = g_hash_table_get_keys (dbus->names); - names = g_list_sort (names, (GCompareFunc) g_strcmp0); for (name = names; name != NULL; name = name->next) { - ibus_message_iter_append (&sub_iter, G_TYPE_STRING, &(name->data)); + g_variant_builder_add (&builder, "s", name->data); } g_list_free (names); - // append unique names + /* append unique names */ names = g_hash_table_get_keys (dbus->unique_names); - - names = g_list_sort (names, (GCompareFunc) g_strcmp0); for (name = names; name != NULL; name = name->next) { - ibus_message_iter_append (&sub_iter, G_TYPE_STRING, &(name->data)); + g_variant_builder_add (&builder, "s", name->data); } g_list_free (names); - ibus_message_iter_close_container (&iter, &sub_iter); - - return reply_message; + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(as)", &builder)); } -static IBusMessage * -_dbus_name_has_owner (BusDBusImpl *dbus, - IBusMessage *message, - BusConnection *connection) +/** + * bus_dbus_impl_list_names: + * + * Implement the "NameHasOwner" method call of the org.freedesktop.DBus interface. + * Return TRUE (as a D-Bus reply) if the name is available in dbus->unique_names or is a well-known name. + */ +static void +bus_dbus_impl_name_has_owner (BusDBusImpl *dbus, + BusConnection *connection, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - gchar *name; - gboolean retval; - gboolean has_owner; - IBusMessage *reply_message; - IBusError *error; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, &name, - G_TYPE_INVALID); + const gchar *name = NULL; + g_variant_get (parameters, "(&s)", &name); - if (! retval) { - reply_message = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); - return reply_message; + gboolean has_owner; + if (!g_dbus_is_name (name)) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, + G_DBUS_ERROR_FAILED, + "'%s' is not a legal bus name"); + return; } - if (name[0] == ':') { + if (g_dbus_is_unique_name (name)) { has_owner = g_hash_table_lookup (dbus->unique_names, name) != NULL; } else { - has_owner = g_hash_table_lookup (dbus->names, name) != NULL; + if (g_strcmp0 (name, "org.freedesktop.DBus") == 0 || + g_strcmp0 (name, "org.freedesktop.IBus") == 0) + has_owner = TRUE; + else + has_owner = g_hash_table_lookup (dbus->names, name) != NULL; } - - reply_message = ibus_message_new_method_return (message); - ibus_message_append_args (reply_message, - G_TYPE_BOOLEAN, &has_owner, - G_TYPE_INVALID); - - return reply_message; + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(b)", has_owner)); } - -static IBusMessage * -_dbus_get_name_owner (BusDBusImpl *dbus, - IBusMessage *message, - BusConnection *connection) +/** + * bus_dbus_impl_get_name_owner: + * + * Implement the "GetNameOwner" method call of the org.freedesktop.DBus interface. + */ +static void +bus_dbus_impl_get_name_owner (BusDBusImpl *dbus, + BusConnection *connection, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - gchar *name; - BusConnection *owner; - gboolean retval; - const gchar *owner_name = NULL; - IBusMessage *reply_message; - IBusError *error; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, &name, - G_TYPE_INVALID); - - if (! retval) { - reply_message = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); - return reply_message; - } + const gchar *name_owner = NULL; + const gchar *name = NULL; + g_variant_get (parameters, "(&s)", &name); - if (g_strcmp0 (name, DBUS_SERVICE_DBUS) == 0 || - g_strcmp0 (name, IBUS_SERVICE_IBUS) == 0) { - owner_name = name; + if (g_strcmp0 (name, "org.freedesktop.DBus") == 0 || + g_strcmp0 (name, "org.freedesktop.IBus") == 0) { + name_owner = name; } else { - owner = bus_dbus_impl_get_connection_by_name (dbus, name); + BusConnection *owner = bus_dbus_impl_get_connection_by_name (dbus, name); if (owner != NULL) { - owner_name = bus_connection_get_unique_name (owner); + name_owner = bus_connection_get_unique_name (owner); } } - if (owner_name != NULL) { - reply_message = ibus_message_new_method_return (message); - ibus_message_append_args (reply_message, - G_TYPE_STRING, &owner_name, - G_TYPE_INVALID); + if (name_owner == NULL) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_NAME_HAS_NO_OWNER, + "Can not get name owner of '%s': no such name", name); } else { - reply_message = ibus_message_new_error_printf (message, - DBUS_ERROR_NAME_HAS_NO_OWNER, - "Name '%s' does have owner", - name); + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(s)", name_owner)); } - - return reply_message; } -static IBusMessage * -_dbus_get_id (BusDBusImpl *dbus, - IBusMessage *message, - BusConnection *connection) +/** + * bus_dbus_impl_list_queued_owners: + * + * Implement the "ListQueuedOwners" method call of the org.freedesktop.DBus interface. + */ +static void +bus_dbus_impl_list_queued_owners (BusDBusImpl *dbus, + BusConnection *connection, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - IBusMessage *reply_message; - const gchar *name; + const gchar *name = NULL; + const gchar *name_owner = NULL; + GVariantBuilder builder; + BusConnection *named_conn = NULL; + + g_variant_get (parameters, "(&s)", &name); + + g_assert (BUS_IS_DBUS_IMPL (dbus)); + g_assert (name != NULL); - name = bus_connection_get_unique_name (connection); + g_variant_builder_init (&builder, G_VARIANT_TYPE ("as")); - if (name == NULL) { - reply_message = ibus_message_new_error (message, - DBUS_ERROR_FAILED, - "Can not GetId before Hello"); - return reply_message; + if (G_LIKELY (g_dbus_is_unique_name (name))) { + named_conn = (BusConnection *) g_hash_table_lookup (dbus->unique_names, name); + if (named_conn == NULL) { + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(as)", &builder)); + return; + } + name_owner = bus_connection_get_unique_name (named_conn); + if (name_owner == NULL) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_NAME_HAS_NO_OWNER, + "Can not get name owner of '%s': no such name", name); + return; + } + g_variant_builder_add (&builder, "s", name_owner); + } + else { + BusNameService *service; + GSList *owners; + + service = (BusNameService *) g_hash_table_lookup (dbus->names, name); + if (service == NULL) { + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(as)", &builder)); + return; + } + for (owners = service->owners; owners; owners = owners->next) { + BusConnectionOwner *owner = (BusConnectionOwner *) owners->data; + if (owner == NULL) { + continue; + } + named_conn = owner->conn; + if (named_conn == NULL) { + continue; + } + name_owner = bus_connection_get_unique_name (named_conn); + if (name_owner == NULL) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_NAME_HAS_NO_OWNER, + "Can not get name owner of '%s': no such name", name); + return; + } + g_variant_builder_add (&builder, "s", name_owner); + } } - reply_message = ibus_message_new_method_return (message); - ibus_message_append_args (reply_message, - G_TYPE_STRING, &name, - G_TYPE_INVALID); - return reply_message; + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(as)", &builder)); } +/** + * bus_dbus_impl_get_id: + * + * Implement the "GetId" method call of the org.freedesktop.DBus interface. + * This function is not implemented yet and always returns a dummy string - "FIXME". + */ static void -_rule_destroy_cb (BusMatchRule *rule, - BusDBusImpl *dbus) +bus_dbus_impl_get_id (BusDBusImpl *dbus, + BusConnection *connection, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (BUS_IS_MATCH_RULE (rule)); - g_assert (BUS_IS_DBUS_IMPL (dbus)); + /* FIXME */ + const gchar *uuid = "FIXME"; + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(s)", uuid)); +} +/** + * bus_dbus_impl_rule_destroy_cb: + * + * A function to be called when one of the dbus->rules is destroyed. + */ +static void +bus_dbus_impl_rule_destroy_cb (BusMatchRule *rule, + BusDBusImpl *dbus) +{ dbus->rules = g_list_remove (dbus->rules, rule); g_object_unref (rule); } -static IBusMessage * -_dbus_add_match (BusDBusImpl *dbus, - IBusMessage *message, - BusConnection *connection) +/** + * bus_dbus_impl_get_id: + * + * Implement the "AddMatch" method call of the org.freedesktop.DBus interface. + */ +static void +bus_dbus_impl_add_match (BusDBusImpl *dbus, + BusConnection *connection, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - IBusMessage *reply_message; - IBusError *error; - gboolean retval; - gchar *rule_text; - BusMatchRule *rule; - GList *link; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, &rule_text, - G_TYPE_INVALID); - - if (!retval) { - reply_message = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); - return reply_message; - } - - rule = bus_match_rule_new (rule_text); + const gchar *rule_text = NULL; + g_variant_get (parameters, "(&s)", &rule_text); + BusMatchRule *rule = bus_match_rule_new (rule_text); if (rule == NULL) { - reply_message = ibus_message_new_error_printf (message, - DBUS_ERROR_MATCH_RULE_INVALID, - "Parse rule [%s] failed", - rule_text); - return reply_message; + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_MATCH_RULE_INVALID, + "Parse match rule [%s] failed", rule_text); + return; } - for (link = dbus->rules; link != NULL; link = link->next) { - if (bus_match_rule_is_equal (rule, BUS_MATCH_RULE (link->data))) { - bus_match_rule_add_recipient (BUS_MATCH_RULE (link->data), connection); + g_dbus_method_invocation_return_value (invocation, NULL); + GList *p; + for (p = dbus->rules; p != NULL; p = p->next) { + if (bus_match_rule_is_equal (rule, (BusMatchRule *) p->data)) { + /* The same rule is already registered. Just reuse it. */ + bus_match_rule_add_recipient ((BusMatchRule *) p->data, connection); g_object_unref (rule); - rule = NULL; - break; + return; } } if (rule) { bus_match_rule_add_recipient (rule, connection); dbus->rules = g_list_append (dbus->rules, rule); - g_signal_connect (rule, "destroy", G_CALLBACK (_rule_destroy_cb), dbus); + g_signal_connect (rule, "destroy", G_CALLBACK (bus_dbus_impl_rule_destroy_cb), dbus); } - - reply_message = ibus_message_new_method_return (message); - return reply_message; } -static IBusMessage * -_dbus_remove_match (BusDBusImpl *dbus, - IBusMessage *message, - BusConnection *connection) +/** + * bus_dbus_impl_get_id: + * + * Implement the "RemoveMatch" method call of the org.freedesktop.DBus interface. + */ +static void +bus_dbus_impl_remove_match (BusDBusImpl *dbus, + BusConnection *connection, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - IBusMessage *reply_message; - IBusError *error; - gchar *rule_text; - BusMatchRule *rule; - GList *link; - - if (!ibus_message_get_args (message, - &error, - G_TYPE_STRING, &rule_text, - G_TYPE_INVALID)) { - reply_message = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); - return reply_message; - } - - rule = bus_match_rule_new (rule_text); + const gchar *rule_text = NULL; + g_variant_get (parameters, "(&s)", &rule_text); - if (rule == NULL ) { - reply_message = ibus_message_new_error_printf (message, - DBUS_ERROR_MATCH_RULE_INVALID, - "Parse rule [%s] failed", - rule_text); - return reply_message; + BusMatchRule *rule = bus_match_rule_new (rule_text); + if (rule == NULL) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_MATCH_RULE_INVALID, + "Parse match rule [%s] failed", rule_text); + return; } - for (link = dbus->rules; link != NULL; link = link->next) { - if (bus_match_rule_is_equal (rule, BUS_MATCH_RULE (link->data))) { - bus_match_rule_remove_recipient (BUS_MATCH_RULE (link->data), connection); + g_dbus_method_invocation_return_value (invocation, NULL); + GList *p; + for (p = dbus->rules; p != NULL; p = p->next) { + if (bus_match_rule_is_equal (rule, (BusMatchRule *) p->data)) { + /* p->data will be destroyed when the final recipient is removed. */ + bus_match_rule_remove_recipient ((BusMatchRule *) p->data, connection); break; } + /* FIXME should we return G_DBUS_ERROR if rule is not found in dbus->rules */ } - g_object_unref (rule); - - reply_message = ibus_message_new_method_return (message); - return reply_message; } -static IBusMessage * -_dbus_request_name (BusDBusImpl *dbus, - IBusMessage *message, - BusConnection *connection) +/** + * bus_dbus_impl_request_name: + * + * Implement the "RequestName" method call of the org.freedesktop.DBus interface. + */ +static void +bus_dbus_impl_request_name (BusDBusImpl *dbus, + BusConnection *connection, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - IBusMessage *reply_message; - IBusError *error; - gchar *name; - guint flags; - guint retval; + const gchar *name = NULL; // e.g. "org.freedesktop.IBus.Panel" + guint32 flags = 0; + BusNameService *service = NULL; + BusConnectionOwner *primary_owner = NULL; + BusConnectionOwner *owner = NULL; + + g_variant_get (parameters, "(&su)", &name, &flags); + + if (name == NULL || + !g_dbus_is_name (name) || + g_dbus_is_unique_name (name)) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, + "'%s' is not a legal service name.", name); + return; + } - if (!ibus_message_get_args (message, - &error, - G_TYPE_STRING, &name, - G_TYPE_UINT, &flags, - G_TYPE_INVALID)) { - reply_message = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); - return reply_message; - } - - if (g_strcmp0 (name, DBUS_SERVICE_DBUS) == 0 || - g_strcmp0 (name, IBUS_SERVICE_IBUS) == 0 || - g_hash_table_lookup (dbus->names, name) != NULL) { - reply_message = ibus_message_new_error_printf (message, - DBUS_ERROR_FAILED, - "Name %s has owner", - name); - return reply_message; - } - - retval = 1; - g_hash_table_insert (dbus->names, - (gpointer )bus_connection_add_name (connection, name), - connection); - reply_message = ibus_message_new_method_return (message); - ibus_message_append_args (reply_message, - G_TYPE_UINT, &retval, - G_TYPE_INVALID); - - ibus_connection_send ((IBusConnection *) connection, reply_message); - ibus_message_unref (reply_message); - ibus_connection_flush ((IBusConnection *) connection); + if (g_strcmp0 (name, "org.freedesktop.DBus") == 0 || + g_strcmp0 (name, "org.freedesktop.IBus") == 0) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, + "Can not acquire the service name '%s', it is reserved by IBus", name); + return; + } - g_signal_emit (dbus, - dbus_signals[NAME_OWNER_CHANGED], - 0, - name, - "", - bus_connection_get_unique_name (connection)); + enum { + ACTION_INVALID, + ACTION_IN_QUEUE, + ACTION_REPLACE, + ACTION_EXISTS, + ACTION_ALREADY_OWN, + } action = ACTION_INVALID; + + service = (BusNameService *) g_hash_table_lookup (dbus->names, name); + + /* If the name servise does not exist, we will create one. */ + if (service == NULL) { + service = bus_name_service_new (name); + g_hash_table_insert (dbus->names, + service->name, + service); + } + else { + primary_owner = bus_name_service_get_primary_owner (service); + } - return NULL; + if (primary_owner != NULL) { + if (primary_owner->conn == connection) { + action = ACTION_ALREADY_OWN; + } + else { + action = (flags & IBUS_BUS_NAME_FLAG_DO_NOT_QUEUE) ? + ACTION_EXISTS : ACTION_IN_QUEUE; + if ((bus_name_service_get_allow_replacement (service) == TRUE) && + (flags & IBUS_BUS_NAME_FLAG_REPLACE_EXISTING)) { + action = ACTION_REPLACE; + } + } + } + else { + action = ACTION_REPLACE; + } + + if (action == ACTION_ALREADY_OWN) { + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(u)", IBUS_BUS_REQUEST_NAME_REPLY_ALREADY_OWNER)); + return; + } + + owner = bus_name_service_find_owner (service, connection); + /* If connection already in queue, we need remove it at first. */ + if (owner != NULL) { + bus_connection_remove_name (connection, name); + bus_name_service_remove_owner (service, owner, NULL); + bus_connection_owner_free (owner); + } + + switch (action) { + case ACTION_EXISTS: + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(u)", IBUS_BUS_REQUEST_NAME_REPLY_EXISTS)); + return; + + case ACTION_IN_QUEUE: + owner = bus_connection_owner_new (connection, flags); + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(u)", IBUS_BUS_REQUEST_NAME_REPLY_IN_QUEUE)); + bus_name_service_add_non_primary_owner (service, owner, dbus); + return; + + case ACTION_REPLACE: + bus_connection_add_name (connection, name); + owner = bus_connection_owner_new (connection, flags); + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(u)", IBUS_BUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)); + bus_name_service_set_primary_owner (service, owner, dbus); + return; + + default: + g_assert_not_reached (); + } } -static IBusMessage * -_dbus_release_name (BusDBusImpl *dbus, - IBusMessage *message, - BusConnection *connection) +/** + * bus_dbus_impl_release_name: + * + * Implement the "ReleaseName" method call of the org.freedesktop.DBus interface. + */ +static void +bus_dbus_impl_release_name (BusDBusImpl *dbus, + BusConnection *connection, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - IBusMessage *reply_message; - IBusError *error; - gchar *name; - guint retval; + const gchar *name= NULL; + g_variant_get (parameters, "(&s)", &name); + + if (name == NULL || + !g_dbus_is_name (name) || + g_dbus_is_unique_name (name)) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, + "'%s' is not a legal service name.", name); + return; + } - if (!ibus_message_get_args (message, - &error, - G_TYPE_STRING, &name, - G_TYPE_INVALID)) { - reply_message = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); - return reply_message; + if (g_strcmp0 (name, "org.freedesktop.DBus") == 0 || + g_strcmp0 (name, "org.freedesktop.IBus") == 0) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, + "Service name '%s' is owned by IBus.", name); + return; } - reply_message = ibus_message_new_method_return (message); - if (bus_connection_remove_name (connection, name)) { - retval = 1; + guint retval; + if (g_hash_table_lookup (dbus->names, name) == NULL) { + retval = 2; /* DBUS_RELEASE_NAME_REPLY_NON_EXISTENT */ } else { - retval = 2; + if (bus_connection_remove_name (connection, name)) { + retval = 1; /* DBUS_RELEASE_NAME_REPLY_RELEASED */ + } + else { + retval = 3; /* DBUS_RELEASE_NAME_REPLY_NOT_OWNER */ + } } - - ibus_message_append_args (message, - G_TYPE_UINT, &retval, - G_TYPE_INVALID); - - return reply_message; + g_dbus_method_invocation_return_value (invocation, g_variant_new ("(u)", retval)); } - static gboolean -bus_dbus_impl_ibus_message (BusDBusImpl *dbus, - BusConnection *connection, - IBusMessage *message) +start_service_timeout_cb (BusMethodCall *call) { - g_assert (BUS_IS_DBUS_IMPL (dbus)); - g_assert (BUS_IS_CONNECTION (connection)); - g_assert (message != NULL); + const gchar *name= NULL; + guint32 flags; /* currently not used in the D-Bus spec */ + g_variant_get (call->parameters, "(&su)", &name, &flags); - gint i; - IBusMessage *reply_message = NULL; + g_dbus_method_invocation_return_error (call->invocation, + G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Timeout reached before starting %s", name); - static const struct { - const gchar *interface; - const gchar *name; - IBusMessage *(* handler) (BusDBusImpl *, IBusMessage *, BusConnection *); - } handlers[] = { - /* Introspectable interface */ - { DBUS_INTERFACE_INTROSPECTABLE, - "Introspect", _dbus_introspect }, - /* DBus interface */ - { DBUS_INTERFACE_DBUS, "Hello", _dbus_hello }, - { DBUS_INTERFACE_DBUS, "ListNames", _dbus_list_names }, - { DBUS_INTERFACE_DBUS, "ListActivatableNames", - _dbus_no_implement }, - { DBUS_INTERFACE_DBUS, "NameHasOwner", - _dbus_name_has_owner }, - { DBUS_INTERFACE_DBUS, "StartServiceByName", - _dbus_no_implement }, - { DBUS_INTERFACE_DBUS, "GetNameOwner", - _dbus_get_name_owner }, - { DBUS_INTERFACE_DBUS, "GetConnectionUnixUser", - _dbus_no_implement }, - { DBUS_INTERFACE_DBUS, "AddMatch", _dbus_add_match }, - { DBUS_INTERFACE_DBUS, "RemoveMatch", - _dbus_remove_match }, - { DBUS_INTERFACE_DBUS, "GetId", _dbus_get_id }, - { DBUS_INTERFACE_DBUS, "RequestName", _dbus_request_name }, - { DBUS_INTERFACE_DBUS, "ReleaseName", _dbus_release_name }, - { NULL, NULL, NULL } - }; + GList *p = g_list_find (call->dbus->start_service_calls, call); + g_return_val_if_fail (p != NULL, FALSE); - ibus_message_set_destination (message, DBUS_SERVICE_DBUS); + bus_method_call_free ((BusMethodCall *) p->data); + call->dbus->start_service_calls = + g_list_delete_link (call->dbus->start_service_calls, p); - for (i = 0; handlers[i].interface != NULL; i++) { - if (ibus_message_is_method_call (message, - handlers[i].interface, - handlers[i].name)) { + return FALSE; +} - reply_message = handlers[i].handler (dbus, message, connection); - if (reply_message) { +/** + * bus_dbus_impl_start_service_by_name: + * + * Implement the "StartServiceByName" method call of the + * org.freedesktop.DBus interface. + */ +static void +bus_dbus_impl_start_service_by_name (BusDBusImpl *dbus, + BusConnection *connection, + GVariant *parameters, + GDBusMethodInvocation *invocation) +{ + const gchar *name= NULL; + guint32 flags; /* currently not used in the D-Bus spec */ + g_variant_get (parameters, "(&su)", &name, &flags); + + if (name == NULL || + !g_dbus_is_name (name) || + g_dbus_is_unique_name (name)) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, + "'%s' is not a legal service name.", name); + return; + } - ibus_message_set_sender (reply_message, DBUS_SERVICE_DBUS); - ibus_message_set_destination (reply_message, - bus_connection_get_unique_name (connection)); - ibus_message_set_no_reply (reply_message, TRUE); + if (g_strcmp0 (name, "org.freedesktop.DBus") == 0 || + g_strcmp0 (name, "org.freedesktop.IBus") == 0) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, + "Service name '%s' is owned by IBus.", name); + return; + } - ibus_connection_send (IBUS_CONNECTION (connection), reply_message); - ibus_message_unref (reply_message); - } + if (g_hash_table_lookup (dbus->names, name) != NULL) { + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(u)", + IBUS_BUS_START_REPLY_ALREADY_RUNNING)); + return; + } - g_signal_stop_emission_by_name (dbus, "ibus-message"); - return TRUE; - } + BusRegistry *registry = BUS_DEFAULT_REGISTRY; + BusComponent *component = bus_registry_lookup_component_by_name (registry, + name); + + if (component == NULL || !bus_component_start (component, g_verbose)) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Failed to start %s", name); + return; } - return IBUS_SERVICE_CLASS (bus_dbus_impl_parent_class)->ibus_message ( - (IBusService *) dbus, - (IBusConnection *) connection, - message); + BusMethodCall *call = bus_method_call_new (dbus, + connection, + parameters, + invocation); + call->timeout_id = g_timeout_add (g_gdbus_timeout, + (GSourceFunc) start_service_timeout_cb, + call); + dbus->start_service_calls = g_list_prepend (dbus->start_service_calls, + (gpointer) call); } +/** + * bus_dbus_impl_name_owner_changed: + * + * The function is called on name-owner-changed signal, typically when g_signal_emit (dbus, NAME_OWNER_CHANGED) + * is called, and broadcasts the signal to clients. + */ static void bus_dbus_impl_name_owner_changed (BusDBusImpl *dbus, + BusConnection *connection, gchar *name, - gchar *old_name, - gchar *new_name) + gchar *old_owner, + gchar *new_owner) { g_assert (BUS_IS_DBUS_IMPL (dbus)); g_assert (name != NULL); - g_assert (old_name != NULL); - g_assert (new_name != NULL); + g_assert (old_owner != NULL); + g_assert (new_owner != NULL); - IBusMessage *message; + GDBusMessage *message = g_dbus_message_new_signal ("/org/freedesktop/DBus", + "org.freedesktop.DBus", + "NameOwnerChanged"); + g_dbus_message_set_sender (message, "org.freedesktop.DBus"); - message = ibus_message_new_signal (DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "NameOwnerChanged"); - ibus_message_append_args (message, - G_TYPE_STRING, &name, - G_TYPE_STRING, &old_name, - G_TYPE_STRING, &new_name, - G_TYPE_INVALID); - ibus_message_set_sender (message, DBUS_SERVICE_DBUS); + /* set a non-zero serial to make libdbus happy */ + g_dbus_message_set_serial (message, 1); + g_dbus_message_set_body (message, + g_variant_new ("(sss)", name, old_owner, new_owner)); + /* broadcast the message to clients that listen to the signal. */ bus_dbus_impl_dispatch_message_by_rule (dbus, message, NULL); + g_object_unref (message); +} - ibus_message_unref (message); +/** + * bus_dbus_impl_name_lost: + * + * The function is called on name-lost signal, typically when g_signal_emit (dbus, NAME_LOST) + * is called, and broadcasts the signal to clients. + */ +static void +bus_dbus_impl_name_lost (BusDBusImpl *dbus, + BusConnection *connection, + gchar *name) +{ + g_assert (BUS_IS_DBUS_IMPL (dbus)); + g_assert (name != NULL); + + GDBusMessage *message = g_dbus_message_new_signal ("/org/freedesktop/DBus", + "org.freedesktop.DBus", + "NameLost"); + g_dbus_message_set_sender (message, "org.freedesktop.DBus"); + g_dbus_message_set_destination (message, bus_connection_get_unique_name (connection)); + /* set a non-zero serial to make libdbus happy */ + g_dbus_message_set_serial (message, 1); + g_dbus_message_set_body (message, + g_variant_new ("(s)", name)); + + bus_dbus_impl_forward_message (dbus, connection, message); + g_object_unref (message); } -static gboolean -_connection_ibus_message_cb (BusConnection *connection, - IBusMessage *message, - BusDBusImpl *dbus) +/** + * bus_dbus_impl_name_acquired: + * + * The function is called on name-acquired signal, typically when g_signal_emit (dbus, NAME_ACQUIRED) + * is called, and broadcasts the signal to clients. + */ +static void +bus_dbus_impl_name_acquired (BusDBusImpl *dbus, + BusConnection *connection, + gchar *name) { - g_assert (BUS_IS_CONNECTION (connection)); - g_assert (message != NULL); g_assert (BUS_IS_DBUS_IMPL (dbus)); + g_assert (name != NULL); - const gchar *dest; + GDBusMessage *message = g_dbus_message_new_signal ("/org/freedesktop/DBus", + "org.freedesktop.DBus", + "NameAcquired"); + g_dbus_message_set_sender (message, "org.freedesktop.DBus"); + g_dbus_message_set_destination (message, bus_connection_get_unique_name (connection)); + + /* set a non-zero serial to make libdbus happy */ + g_dbus_message_set_serial (message, 1); + g_dbus_message_set_body (message, + g_variant_new ("(s)", name)); + + bus_dbus_impl_forward_message (dbus, connection, message); + g_object_unref (message); + + GList *p = dbus->start_service_calls; + while (p != NULL) { + BusMethodCall *call = p->data; + const gchar *_name= NULL; + guint32 flags; + GList *next = p->next; + + g_variant_get (call->parameters, "(&su)", &_name, &flags); + if (g_strcmp0 (name, _name) == 0) { + g_dbus_method_invocation_return_value (call->invocation, + g_variant_new ("(u)", + IBUS_BUS_START_REPLY_SUCCESS)); + bus_method_call_free ((BusMethodCall *) p->data); + + dbus->start_service_calls = + g_list_delete_link (dbus->start_service_calls, p); + } + p = next; + } +} - if (G_UNLIKELY (IBUS_OBJECT_DESTROYED (dbus))) { - return FALSE; +/** + * bus_dbus_impl_service_method_call: + * + * Handle a D-Bus method call from a client. This function overrides an implementation in src/ibusservice.c. + */ +static void +bus_dbus_impl_service_method_call (IBusService *service, + GDBusConnection *dbus_connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation) +{ + BusDBusImpl *dbus = BUS_DBUS_IMPL (service); + + if (g_strcmp0 (interface_name, "org.freedesktop.DBus") != 0) { + IBUS_SERVICE_CLASS (bus_dbus_impl_parent_class)->service_method_call ( + (IBusService *) dbus, + dbus_connection, + sender, + object_path, + interface_name, + method_name, + parameters, + invocation); + return; } - if (ibus_message_is_signal (message, - DBUS_INTERFACE_LOCAL, - "Disconnected")) { - /* ignore signal from local interface */ - return FALSE; + static const struct { + const gchar *method_name; + void (* method) (BusDBusImpl *, BusConnection *, GVariant *, GDBusMethodInvocation *); + } methods[] = { + /* DBus interface */ + { "Hello", bus_dbus_impl_hello }, + { "ListNames", bus_dbus_impl_list_names }, + { "NameHasOwner", bus_dbus_impl_name_has_owner }, + { "GetNameOwner", bus_dbus_impl_get_name_owner }, + { "ListQueuedOwners", bus_dbus_impl_list_queued_owners }, + { "GetId", bus_dbus_impl_get_id }, + { "AddMatch", bus_dbus_impl_add_match }, + { "RemoveMatch", bus_dbus_impl_remove_match }, + { "RequestName", bus_dbus_impl_request_name }, + { "ReleaseName", bus_dbus_impl_release_name }, + { "StartServiceByName", bus_dbus_impl_start_service_by_name }, + }; + + gint i; + for (i = 0; i < G_N_ELEMENTS (methods); i++) { + if (g_strcmp0 (method_name, methods[i].method_name) == 0) { + BusConnection *connection = bus_connection_lookup (dbus_connection); + g_assert (BUS_IS_CONNECTION (connection)); + methods[i].method (dbus, connection, parameters, invocation); + return; + } } - ibus_message_set_sender (message, bus_connection_get_unique_name (connection)); - - switch (ibus_message_get_type (message)) { -#if 1 - case DBUS_MESSAGE_TYPE_ERROR: - g_debug ("From :%s to %s, Error: %s : %s", - ibus_message_get_sender (message), - ibus_message_get_destination (message), - ibus_message_get_error_name (message), - ibus_message_get_error_message (message)); - break; -#endif -#if 0 - case DBUS_MESSAGE_TYPE_SIGNAL: - g_debug ("From :%s to %s, Signal: %s @ %s", - ibus_message_get_sender (message), - ibus_message_get_destination (message), - ibus_message_get_member (message), - ibus_message_get_path (message) - ); - break; -#endif -#if 0 - case DBUS_MESSAGE_TYPE_METHOD_CALL: - g_debug("From %s to %s, Method %s on %s", - ibus_message_get_sender (message), - ibus_message_get_destination (message), - ibus_message_get_path (message), - ibus_message_get_member (message)); - break; -#endif - } - - dest = ibus_message_get_destination (message); - - if (dest == NULL || - strcmp ((gchar *)dest, IBUS_SERVICE_IBUS) == 0 || - strcmp ((gchar *)dest, DBUS_SERVICE_DBUS) == 0) { - /* this message is sent to ibus-daemon */ - - switch (ibus_message_get_type (message)) { - case DBUS_MESSAGE_TYPE_SIGNAL: - case DBUS_MESSAGE_TYPE_METHOD_RETURN: - case DBUS_MESSAGE_TYPE_ERROR: - bus_dbus_impl_dispatch_message_by_rule (dbus, message, NULL); - return FALSE; - case DBUS_MESSAGE_TYPE_METHOD_CALL: - { - const gchar *path; - IBusService *object; - - path = ibus_message_get_path (message); - - object = g_hash_table_lookup (dbus->objects, path); - - if (object == NULL || - ibus_service_handle_message (object, - (IBusConnection *) connection, - message) == FALSE) { - IBusMessage *error; - error = ibus_message_new_error_printf (message, - DBUS_ERROR_UNKNOWN_METHOD, - "Unknown method %s on %s", - ibus_message_get_member (message), - path); - ibus_connection_send ((IBusConnection *) connection, error); - ibus_message_unref (error); - } - - /* dispatch message */ + /* unsupported methods */ + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, + "org.freedesktop.DBus does not support %s", method_name); +} + +/** + * bus_dbus_impl_service_get_property: + * + * Handle a D-Bus method call from a client. This function overrides an implementation in src/ibusservice.c. + */ +static GVariant * +bus_dbus_impl_service_get_property (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error) +{ + /* FIXME implement the function. */ + return IBUS_SERVICE_CLASS (bus_dbus_impl_parent_class)-> + service_get_property (service, + connection, + sender, + object_path, + interface_name, + property_name, + error); +} + +/** + * bus_dbus_impl_service_set_property: + * + * Handle a D-Bus method call from a client. This function overrides an implementation in src/ibusservice.c. + */ +static gboolean +bus_dbus_impl_service_set_property (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error) +{ + /* FIXME implement the function. */ + return IBUS_SERVICE_CLASS (bus_dbus_impl_parent_class)-> + service_set_property (service, + connection, + sender, + object_path, + interface_name, + property_name, + value, + error); + +} + +/** + * bus_dbus_impl_connection_filter_cb: + * @returns: A GDBusMessage that will be processed by bus_dbus_impl_service_method_call. NULL when dropping the message. + * + * A filter function that is called for all incoming and outgoing messages. + * WARNING - this function could be called by the GDBus's worker thread. So you should not call thread unsafe IBus functions. + */ +static GDBusMessage * +bus_dbus_impl_connection_filter_cb (GDBusConnection *dbus_connection, + GDBusMessage *message, + gboolean incoming, + gpointer user_data) +{ + g_assert (G_IS_DBUS_CONNECTION (dbus_connection)); + g_assert (G_IS_DBUS_MESSAGE (message)); + g_assert (BUS_IS_DBUS_IMPL (user_data)); + + BusDBusImpl *dbus = (BusDBusImpl *) user_data; + BusConnection *connection = bus_connection_lookup (dbus_connection); + g_assert (connection != NULL); + + if (incoming) { + /* is incoming message */ + + /* get the destination aka bus name of the message. the destination is set by g_dbus_connection_call_sync (for DBus and IBus messages + * in the IBusBus class) or g_initable_new (for config and context messages in the IBusProxy sub classes.) */ + const gchar *destination = g_dbus_message_get_destination (message); + GDBusMessageType message_type = g_dbus_message_get_message_type (message); + + if (g_dbus_message_get_locked (message)) { + /* If the message is locked, we need make a copy of it. */ + GDBusMessage *new_message = g_dbus_message_copy (message, NULL); + g_assert (new_message != NULL); + g_object_unref (message); + message = new_message; + } + + /* connection unique name as sender of the message*/ + g_dbus_message_set_sender (message, bus_connection_get_unique_name (connection)); + + if (g_strcmp0 (destination, "org.freedesktop.IBus") == 0) { + /* the message is sent to IBus service. messages from ibusbus and ibuscontext may fall into this category. */ + switch (message_type) { + case G_DBUS_MESSAGE_TYPE_METHOD_CALL: + case G_DBUS_MESSAGE_TYPE_METHOD_RETURN: + case G_DBUS_MESSAGE_TYPE_ERROR: + /* dispatch messages by match rule */ + bus_dbus_impl_dispatch_message_by_rule (dbus, message, NULL); + return message; + case G_DBUS_MESSAGE_TYPE_SIGNAL: + /* notreached - signals should not be sent to IBus service. dispatch signal messages by match rule, just in case. */ bus_dbus_impl_dispatch_message_by_rule (dbus, message, NULL); + g_object_unref (message); + g_return_val_if_reached (NULL); /* return NULL since the service does not handle signals. */ + default: + g_object_unref (message); + g_return_val_if_reached (NULL); /* return NULL since the service does not handle signals. */ + } + } + else if (g_strcmp0 (destination, "org.freedesktop.DBus") == 0) { + /* the message is sent to DBus service. messages from ibusbus may fall into this category. */ + switch (message_type) { + case G_DBUS_MESSAGE_TYPE_METHOD_CALL: + case G_DBUS_MESSAGE_TYPE_METHOD_RETURN: + case G_DBUS_MESSAGE_TYPE_ERROR: + /* dispatch messages by match rule */ + bus_dbus_impl_dispatch_message_by_rule (dbus, message, NULL); + return message; + case G_DBUS_MESSAGE_TYPE_SIGNAL: + /* notreached - signals should not be sent to IBus service. dispatch signal messages by match rule, just in case. */ + bus_dbus_impl_dispatch_message_by_rule (dbus, message, NULL); + g_object_unref (message); + g_return_val_if_reached (NULL); /* return NULL since the service does not handle signals. */ + default: + g_object_unref (message); + g_return_val_if_reached (NULL); /* return NULL since the service does not handle signals. */ } - break; - default: - g_assert (FALSE); + } + else if (destination == NULL) { + /* the message is sent to the current connection. communications between ibus-daemon and panel/engines may fall into this + * category since the panel/engine proxies created by ibus-daemon does not set bus name. */ + switch (message_type) { + case G_DBUS_MESSAGE_TYPE_SIGNAL: + case G_DBUS_MESSAGE_TYPE_METHOD_RETURN: + case G_DBUS_MESSAGE_TYPE_ERROR: + /* dispatch messages by match rule */ + bus_dbus_impl_dispatch_message_by_rule (dbus, message, NULL); + return message; + case G_DBUS_MESSAGE_TYPE_METHOD_CALL: + g_warning ("Unknown method call: destination=NULL, path='%s', interface='%s', member='%s'", + g_dbus_message_get_path (message), + g_dbus_message_get_interface (message), + g_dbus_message_get_member (message)); + bus_dbus_impl_dispatch_message_by_rule (dbus, message, NULL); + return message; /* return the message, GDBus library will handle it */ + default: + /* notreached. */ + g_object_unref (message); + g_return_val_if_reached (NULL); /* return NULL since the service does not handle messages. */ + } + } + else { + /* The message is sent to an other service. Forward it. + * For example, the config proxy class in src/ibusconfig.c sets its "g-name" property (i.e. destination) to IBUS_SERVICE_CONFIG. */ + bus_dbus_impl_forward_message (dbus, connection, message); + g_object_unref (message); + return NULL; } } else { - /* If the destination is not IBus or DBus, the message will be forwanded. */ - bus_dbus_impl_dispatch_message (dbus, message); - } + /* is outgoing message */ + if (g_dbus_message_get_sender (message) == NULL) { + if (g_dbus_message_get_locked (message)) { + GDBusMessage *new_message = g_dbus_message_copy (message, NULL); + g_assert (new_message != NULL); + g_object_unref (message); + message = new_message; + } + /* If the message is sending from ibus-daemon directly, + * we set the sender to org.freedesktop.DBus */ + g_dbus_message_set_sender (message, "org.freedesktop.DBus"); + } - g_signal_stop_emission_by_name (connection, "ibus-message"); - return TRUE; + /* dispatch the outgoing message by rules. */ + bus_dbus_impl_dispatch_message_by_rule (dbus, message, connection); + return message; + } } -static void -_connection_ibus_message_sent_cb (BusConnection *connection, - IBusMessage *message, - BusDBusImpl *dbus) +BusDBusImpl * +bus_dbus_impl_get_default (void) { - bus_dbus_impl_dispatch_message_by_rule (dbus, message, connection); + static BusDBusImpl *dbus = NULL; + + if (dbus == NULL) { + dbus = (BusDBusImpl *) g_object_new (BUS_TYPE_DBUS_IMPL, + "object-path", "/org/freedesktop/DBus", + NULL); + } + + return dbus; } static void -_connection_destroy_cb (BusConnection *connection, - BusDBusImpl *dbus) +bus_dbus_impl_connection_destroy_cb (BusConnection *connection, + BusDBusImpl *dbus) { - g_assert (BUS_IS_CONNECTION (connection)); - g_assert (BUS_IS_DBUS_IMPL (dbus)); - - /* - ibus_service_remove_from_connection ( - IBUS_SERVICE (dbus), - IBUS_CONNECTION (connection)); - */ - const gchar *unique_name = bus_connection_get_unique_name (connection); + const GList *names = NULL; + BusNameService *service = NULL; + if (unique_name != NULL) { + GList *p = dbus->start_service_calls; + while (p != NULL) { + BusMethodCall *call = p->data; + GList *next = p->next; + + if (call->connection == connection) { + bus_method_call_free ((BusMethodCall *) p->data); + dbus->start_service_calls = + g_list_delete_link (dbus->start_service_calls, p); + } + p = next; + } + g_hash_table_remove (dbus->unique_names, unique_name); g_signal_emit (dbus, dbus_signals[NAME_OWNER_CHANGED], 0, + connection, unique_name, unique_name, ""); } - const GList *name = bus_connection_get_names (connection); - - while (name != NULL) { - g_hash_table_remove (dbus->names, name->data); - g_signal_emit (dbus, - dbus_signals[NAME_OWNER_CHANGED], - 0, - name->data, - unique_name, - ""); - name = name->next; + /* service->owners is the queue of connections. + * If the connection is the primary owner and + * bus_name_service_remove_owner() is called, the owner is removed + * in the queue and the next owner will become the primary owner + * automatically because service->owners is just a GSList. + * If service->owners == NULL, it's good to remove the service in + * dbus->names. + * I suppose dbus->names are the global queue for every connection + * and connection->names are the private queue of the connection. + */ + names = bus_connection_get_names (connection); + while (names != NULL) { + const gchar *name = (const gchar *)names->data; + service = (BusNameService *) g_hash_table_lookup (dbus->names, + name); + g_assert (service != NULL); + BusConnectionOwner *owner = bus_name_service_find_owner (service, + connection); + g_assert (owner != NULL); + bus_name_service_remove_owner (service, owner, dbus); + if (service->owners == NULL) { + g_hash_table_remove (dbus->names, service->name); + } + bus_connection_owner_free (owner); + names = names->next; } dbus->connections = g_list_remove (dbus->connections, connection); @@ -943,36 +1644,36 @@ _connection_destroy_cb (BusConnection *connection, gboolean -bus_dbus_impl_new_connection (BusDBusImpl *dbus, - BusConnection *connection) +bus_dbus_impl_new_connection (BusDBusImpl *dbus, + BusConnection *connection) { g_assert (BUS_IS_DBUS_IMPL (dbus)); g_assert (BUS_IS_CONNECTION (connection)); - g_assert (g_list_find (dbus->connections, connection) == NULL); g_object_ref_sink (connection); dbus->connections = g_list_append (dbus->connections, connection); - g_signal_connect (connection, - "ibus-message", - G_CALLBACK (_connection_ibus_message_cb), - dbus); - - g_signal_connect (connection, - "ibus-message-sent", - G_CALLBACK (_connection_ibus_message_sent_cb), - dbus); - + bus_connection_set_filter (connection, + bus_dbus_impl_connection_filter_cb, g_object_ref (dbus), g_object_unref); g_signal_connect (connection, "destroy", - G_CALLBACK (_connection_destroy_cb), + G_CALLBACK (bus_dbus_impl_connection_destroy_cb), dbus); + + /* add introspection_xml[] (see above) to the connection. */ + ibus_service_register ((IBusService *) dbus, + bus_connection_get_dbus_connection (connection), NULL); + GList *p; + for (p = dbus->objects; p != NULL; p = p->next) { + /* add all introspection xmls in dbus->objects to the connection. */ + ibus_service_register ((IBusService *) p->data, + bus_connection_get_dbus_connection (connection), NULL); + } return TRUE; } - BusConnection * bus_dbus_impl_get_connection_by_name (BusDBusImpl *dbus, const gchar *name) @@ -980,110 +1681,248 @@ bus_dbus_impl_get_connection_by_name (BusDBusImpl *dbus, g_assert (BUS_IS_DBUS_IMPL (dbus)); g_assert (name != NULL); - BusConnection *connection = NULL; - - if (name[0] == ':') { - connection = BUS_CONNECTION (g_hash_table_lookup ( - dbus->unique_names, - name)); + if (G_LIKELY (g_dbus_is_unique_name (name))) { + return (BusConnection *) g_hash_table_lookup (dbus->unique_names, name); } else { - connection = BUS_CONNECTION (g_hash_table_lookup ( - dbus->names, - name)); - } + BusNameService *service; + BusConnectionOwner *owner; - return connection; + service = (BusNameService *) g_hash_table_lookup (dbus->names, name); + if (service == NULL) { + return NULL; + } + owner = bus_name_service_get_primary_owner (service); + return owner ? owner->conn : NULL; + } } +typedef struct _BusForwardData BusForwardData; +struct _BusForwardData { + GDBusMessage *message; + BusConnection *sender_connection; +}; -void -bus_dbus_impl_dispatch_message (BusDBusImpl *dbus, - IBusMessage *message) +/** + * bus_dbus_impl_forward_message_ible_cb: + * + * Process the first element of the dbus->forward_queue. The first element is forwarded by g_dbus_connection_send_message. + */ +static gboolean +bus_dbus_impl_forward_message_idle_cb (BusDBusImpl *dbus) { - g_assert (BUS_IS_DBUS_IMPL (dbus)); - g_assert (message != NULL); - - const gchar *destination; - BusConnection *dest_connection = NULL; - - if (G_UNLIKELY (IBUS_OBJECT_DESTROYED (dbus))) { - return; - } - - destination = ibus_message_get_destination (message); - - if (destination != NULL) { - dest_connection = bus_dbus_impl_get_connection_by_name (dbus, destination); - + g_return_val_if_fail (dbus->forward_queue != NULL, FALSE); + + g_mutex_lock (dbus->forward_lock); + BusForwardData *data = (BusForwardData *) dbus->forward_queue->data; + dbus->forward_queue = g_list_delete_link (dbus->forward_queue, dbus->forward_queue); + gboolean has_message = (dbus->forward_queue != NULL); + g_mutex_unlock (dbus->forward_lock); + + do { + const gchar *destination = g_dbus_message_get_destination (data->message); + BusConnection *dest_connection = NULL; + if (destination != NULL) + dest_connection = bus_dbus_impl_get_connection_by_name (dbus, destination); if (dest_connection != NULL) { - ibus_connection_send (IBUS_CONNECTION (dest_connection), message); + /* FIXME workaround for gdbus. gdbus can not set an empty body message with signature '()' */ + if (g_dbus_message_get_body (data->message) == NULL) + g_dbus_message_set_signature (data->message, NULL); + GError *error = NULL; + gboolean retval = g_dbus_connection_send_message ( + bus_connection_get_dbus_connection (dest_connection), + data->message, + G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL, + NULL, &error); + if (retval) + break; + g_warning ("forward message failed: %s.", error->message); + g_error_free (error); } - else { - IBusMessage *reply_message; - reply_message = ibus_message_new_error_printf (message, - DBUS_ERROR_SERVICE_UNKNOWN, - "Can not find service %s", - destination); - bus_dbus_impl_dispatch_message (dbus, reply_message); - ibus_message_unref (reply_message); + /* can not forward message */ + if (g_dbus_message_get_message_type (data->message) != G_DBUS_MESSAGE_TYPE_METHOD_CALL) { + /* skip non method messages */ + break; } - } - bus_dbus_impl_dispatch_message_by_rule (dbus, message, dest_connection); + /* reply an error message, if forward method call message failed. */ + GDBusMessage *reply_message = g_dbus_message_new_method_error (data->message, + "org.freedesktop.DBus.Error.ServiceUnknown ", + "The service name is '%s'.", destination); + g_dbus_message_set_sender (reply_message, "org.freedesktop.DBus"); + g_dbus_message_set_destination (reply_message, bus_connection_get_unique_name (data->sender_connection)); + g_dbus_connection_send_message (bus_connection_get_dbus_connection (data->sender_connection), + reply_message, + G_DBUS_SEND_MESSAGE_FLAGS_NONE, + NULL, NULL); + g_object_unref (reply_message); + } while (0); + + g_object_unref (data->message); + g_object_unref (data->sender_connection); + g_slice_free (BusForwardData, data); + return has_message; } void -bus_dbus_impl_dispatch_message_by_rule (BusDBusImpl *dbus, - IBusMessage *message, - BusConnection *skip_connection) +bus_dbus_impl_forward_message (BusDBusImpl *dbus, + BusConnection *connection, + GDBusMessage *message) { + /* WARNING - this function could be called by the GDBus's worker thread. So you should not call thread unsafe IBus functions. */ g_assert (BUS_IS_DBUS_IMPL (dbus)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (skip_connection) || skip_connection == NULL); + g_assert (BUS_IS_CONNECTION (connection)); + g_assert (G_IS_DBUS_MESSAGE (message)); - GList *recipients = NULL; - GList *link = NULL; + if (G_UNLIKELY (IBUS_OBJECT_DESTROYED (dbus))) + return; + /* FIXME the check above might not be sufficient. dbus object could be destroyed in the main thread right after the check, though the + * dbus structure itself would not be freed (since the dbus object is ref'ed in bus_dbus_impl_new_connection.) + * Anyway, it'd be better to investigate whether the thread safety issue could cause any real problems. */ + + BusForwardData *data = g_slice_new (BusForwardData); + data->message = g_object_ref (message); + data->sender_connection = g_object_ref (connection); + + g_mutex_lock (dbus->forward_lock); + gboolean is_running = (dbus->forward_queue != NULL); + dbus->forward_queue = g_list_append (dbus->forward_queue, data); + g_mutex_unlock (dbus->forward_lock); + + if (!is_running) { + g_idle_add_full (G_PRIORITY_DEFAULT, + (GSourceFunc) bus_dbus_impl_forward_message_idle_cb, + g_object_ref (dbus), (GDestroyNotify) g_object_unref); + /* the idle callback function will be called from the ibus's main thread. */ + } +} - static gint32 data_slot = -1; +static BusDispatchData * +bus_dispatch_data_new (GDBusMessage *message, + BusConnection *skip_connection) +{ + BusDispatchData *data = g_slice_new (BusDispatchData); - if (G_UNLIKELY (IBUS_OBJECT_DESTROYED (dbus))) { - return; + data->message = (GDBusMessage *) g_object_ref (message); + if (skip_connection) { + data->skip_connection = (BusConnection *) g_object_ref (skip_connection); } + else { + data->skip_connection = NULL; + } + return data; +} + +static void +bus_dispatch_data_free (BusDispatchData *data) +{ + g_object_unref (data->message); + if (data->skip_connection) + g_object_unref (data->skip_connection); + g_slice_free (BusDispatchData, data); +} + +/** + * bus_dbus_impl_dispatch_message_by_rule_idle_cb: + * + * Process the first element of the dbus->dispatch_queue. + */ +static gboolean +bus_dbus_impl_dispatch_message_by_rule_idle_cb (BusDBusImpl *dbus) +{ + g_return_val_if_fail (dbus->dispatch_queue != NULL, FALSE); - if (data_slot == -1) { - dbus_message_allocate_data_slot (&data_slot); + if (G_UNLIKELY (IBUS_OBJECT_DESTROYED (dbus))) { + /* dbus was destryed */ + g_mutex_lock (dbus->dispatch_lock); + g_list_free_full (dbus->dispatch_queue, + (GDestroyNotify) bus_dispatch_data_free); + dbus->dispatch_queue = NULL; + g_mutex_unlock (dbus->dispatch_lock); + return FALSE; /* return FALSE to prevent this callback to be called again. */ } - /* If this message has been dispatched by rule, it will be ignored. */ - if (dbus_message_get_data (message, data_slot) != NULL) - return; + /* remove fist node */ + g_mutex_lock (dbus->dispatch_lock); + BusDispatchData *data = (BusDispatchData *) dbus->dispatch_queue->data; + dbus->dispatch_queue = g_list_delete_link (dbus->dispatch_queue, dbus->dispatch_queue); + gboolean has_message = (dbus->dispatch_queue != NULL); + g_mutex_unlock (dbus->dispatch_lock); - dbus_message_set_data (message, data_slot, (gpointer) TRUE, NULL); + GList *link = NULL; + GList *recipients = NULL; + /* check each match rules, and get recipients */ for (link = dbus->rules; link != NULL; link = link->next) { - GList *list = bus_match_rule_get_recipients (BUS_MATCH_RULE (link->data), - message); + GList *list = bus_match_rule_get_recipients ((BusMatchRule *) link->data, + data->message); recipients = g_list_concat (recipients, list); } + /* send message to each recipients */ for (link = recipients; link != NULL; link = link->next) { - BusConnection *connection = BUS_CONNECTION (link->data); - if (connection != skip_connection) { - ibus_connection_send (IBUS_CONNECTION (connection), message); + BusConnection *connection = (BusConnection *) link->data; + if (G_LIKELY (connection != data->skip_connection)) { + g_dbus_connection_send_message (bus_connection_get_dbus_connection (connection), + data->message, + G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL, + NULL, NULL); } } g_list_free (recipients); + bus_dispatch_data_free (data); + + return has_message; /* remove this idle callback if no message is left by returning FALSE. */ } +void +bus_dbus_impl_dispatch_message_by_rule (BusDBusImpl *dbus, + GDBusMessage *message, + BusConnection *skip_connection) +{ + /* WARNING - this function could be called by the GDBus's worker thread. So you should not call thread unsafe IBus functions. */ + g_assert (BUS_IS_DBUS_IMPL (dbus)); + g_assert (message != NULL); + g_assert (skip_connection == NULL || BUS_IS_CONNECTION (skip_connection)); + + if (G_UNLIKELY (IBUS_OBJECT_DESTROYED (dbus))) + return; + /* FIXME - see the FIXME comment in bus_dbus_impl_forward_message. */ + + static GQuark dispatched_quark = 0; + if (dispatched_quark == 0) { + dispatched_quark = g_quark_from_static_string ("DISPATCHED"); + } + + /* A message sent or forwarded by bus_dbus_impl_dispatch_message_by_rule_idle_cb is also processed by the filter callback. + * If this message has been dispatched by rule, do nothing. */ + if (g_object_get_qdata ((GObject *) message, dispatched_quark) != NULL) + return; + g_object_set_qdata ((GObject *) message, dispatched_quark, GINT_TO_POINTER (1)); + + /* append dispatch data into the queue, and start idle task if necessary */ + g_mutex_lock (dbus->dispatch_lock); + gboolean is_running = (dbus->dispatch_queue != NULL); + dbus->dispatch_queue = g_list_append (dbus->dispatch_queue, + bus_dispatch_data_new (message, skip_connection)); + g_mutex_unlock (dbus->dispatch_lock); + if (!is_running) { + g_idle_add_full (G_PRIORITY_DEFAULT, + (GSourceFunc) bus_dbus_impl_dispatch_message_by_rule_idle_cb, + g_object_ref (dbus), + (GDestroyNotify) g_object_unref); + /* the idle callback function will be called from the ibus's main thread. */ + } +} static void -_object_destroy_cb (IBusService *object, - BusDBusImpl *dbus) +bus_dbus_impl_object_destroy_cb (IBusService *object, + BusDBusImpl *dbus) { bus_dbus_impl_unregister_object (dbus, object); } + gboolean bus_dbus_impl_register_object (BusDBusImpl *dbus, IBusService *object) @@ -1091,23 +1930,21 @@ bus_dbus_impl_register_object (BusDBusImpl *dbus, g_assert (BUS_IS_DBUS_IMPL (dbus)); g_assert (IBUS_IS_SERVICE (object)); - const gchar *path; - if (G_UNLIKELY (IBUS_OBJECT_DESTROYED (dbus))) { return FALSE; } - path = ibus_service_get_path (object); - - g_return_val_if_fail (path, FALSE); - - g_return_val_if_fail (g_hash_table_lookup (dbus->objects, path) == NULL, FALSE); - - g_object_ref_sink (object); - g_hash_table_insert (dbus->objects, (gpointer)path, object); - - g_signal_connect (object, "destroy", G_CALLBACK (_object_destroy_cb), dbus); + dbus->objects = g_list_prepend (dbus->objects, g_object_ref (object)); + g_signal_connect (object, "destroy", + G_CALLBACK (bus_dbus_impl_object_destroy_cb), dbus); + GList *p; + for (p = dbus->connections; p != NULL; p = p->next) { + GDBusConnection *connection = bus_connection_get_dbus_connection ((BusConnection *) p->data); + if (connection != ibus_service_get_connection ((IBusService *) object)) + ibus_service_register ((IBusService *) object, + bus_connection_get_dbus_connection ((BusConnection *) p->data), NULL); + } return TRUE; } @@ -1118,20 +1955,20 @@ bus_dbus_impl_unregister_object (BusDBusImpl *dbus, g_assert (BUS_IS_DBUS_IMPL (dbus)); g_assert (IBUS_IS_SERVICE (object)); - const gchar *path; - - if (G_UNLIKELY (IBUS_OBJECT_DESTROYED (dbus))) { + GList *p = g_list_find (dbus->objects, object); + if (p == NULL) return FALSE; - } - - path = ibus_service_get_path (object); - g_return_val_if_fail (path, FALSE); - g_return_val_if_fail (g_hash_table_lookup (dbus->objects, path) == object, FALSE); - - g_signal_handlers_disconnect_by_func (object, G_CALLBACK (_object_destroy_cb), dbus); - - g_hash_table_remove (dbus->objects, path); + g_signal_handlers_disconnect_by_func (object, + G_CALLBACK (bus_dbus_impl_object_destroy_cb), dbus); + dbus->objects = g_list_delete_link (dbus->objects, p); + if (!IBUS_OBJECT_DESTROYED (object)) { + GList *p; + for (p = dbus->connections; p != NULL; p = p->next) { + ibus_service_unregister ((IBusService *) object, + bus_connection_get_dbus_connection ((BusConnection *) p->data)); + } + } g_object_unref (object); return TRUE; diff --git a/bus/dbusimpl.h b/bus/dbusimpl.h index 34ce6bb48..13cdde676 100644 --- a/bus/dbusimpl.h +++ b/bus/dbusimpl.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,9 +19,10 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#ifndef __DBUS_IMPL_H_ -#define __DBUS_IMPL_H_ +#ifndef __BUS_DBUS_IMPL_H_ +#define __BUS_DBUS_IMPL_H_ +#include #include #include "connection.h" @@ -50,45 +52,77 @@ G_BEGIN_DECLS typedef struct _BusDBusImpl BusDBusImpl; typedef struct _BusDBusImplClass BusDBusImplClass; -struct _BusDBusImpl { - IBusService parent; - /* instance members */ - GHashTable *unique_names; - GHashTable *names; - GHashTable *objects; - GList *connections; - GList *rules; - gint id; -}; - -struct _BusDBusImplClass { - IBusServiceClass parent; - - /* class members */ - void (* name_owner_changed) (BusDBusImpl *dbus, - gchar *name, - gchar *old_name, - gchar *new_name); -}; - GType bus_dbus_impl_get_type (void); + +/** + * bus_dbus_impl_get_default: + * @returns: a BusDBusImpl object which is a singleton. + * + * Instantiate a BusDBusImpl object (if necessary) and return the object. + */ BusDBusImpl *bus_dbus_impl_get_default (void); + +/** + * bus_dbus_impl_new_connection: + * @connection: A new connection. + * @returns: TRUE + * + * Register all IBusServices (e.g. DBus, IBus, IBus.InputContext) to the connection so that the service_method_call function + * for each service could be called. + */ gboolean bus_dbus_impl_new_connection (BusDBusImpl *dbus, BusConnection *connection); +/** + * bus_dbus_impl_get_connection_by_name: + * @name: A connection name like ":1.0" and "org.freedesktop.IBus.Panel". + * @returns: A BusConnection object which corresponds to the name. + * + * Search for an active connection whose name is name. If not found, return NULL. + */ BusConnection *bus_dbus_impl_get_connection_by_name (BusDBusImpl *dbus, const gchar *name); -void bus_dbus_impl_dispatch_message (BusDBusImpl *dbus, - DBusMessage *message); + +/** + * bus_dbus_impl_forward_message: + * + * Push the message to the queue (dbus->forward_queue) and schedule a idle function call (bus_dbus_impl_forward_message_idle_cb) which + * actually forwards the message to the destination. Note that the destination of the message is embedded in the message. + */ +void bus_dbus_impl_forward_message (BusDBusImpl *dbus, + BusConnection *connection, + GDBusMessage *message); + +/** + * bus_dbus_impl_dispatch_message_by_rule: + * + * Push the message to the queue (dbus->dispatch_queue) and schedule a idle function call (bus_dbus_impl_dispatch_message_by_rule_idle_cb) + * which actually dispatch the message by rule. + */ void bus_dbus_impl_dispatch_message_by_rule (BusDBusImpl *dbus, - DBusMessage *message, + GDBusMessage *message, BusConnection *skip_connection); + +/** + * bus_dbus_impl_register_object: + * @object: A new service which implements IBusService, like BusIBusImpl and BusInputContext. + * @returns: FALSE if dbus is already destroyed. otherwise TRUE. + * + * Add the IBusService to the daemon. See bus_dbus_impl_new_connection for details. + */ gboolean bus_dbus_impl_register_object (BusDBusImpl *dbus, IBusService *object); + +/** + * bus_dbus_impl_unregister_object: + * @object: A new service which implements IBusService, like BusIBusImpl and BusInputContext. + * @returns: FALSE if dbus is already destroyed. otherwise TRUE. + * + * Remove the IBusService from the daemon. + */ gboolean bus_dbus_impl_unregister_object(BusDBusImpl *dbus, IBusService *object); - G_END_DECLS #endif diff --git a/bus/engineproxy.c b/bus/engineproxy.c index adda91c9d..417b47c0b 100644 --- a/bus/engineproxy.c +++ b/bus/engineproxy.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,17 +19,54 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include -#include -#include -#include "ibusimpl.h" + #include "engineproxy.h" -#include "option.h" + +#include "global.h" +#include "ibusimpl.h" +#include "marshalers.h" +#include "types.h" + +struct _BusEngineProxy { + IBusProxy parent; + + /* instance members */ + /* TRUE if the engine has a focus (local copy of the engine's status.) */ + gboolean has_focus; + /* TRUE if the engine is enabled (local copy of the engine's status.) */ + gboolean enabled; + /* A set of capabilities the current client supports (local copy of the engine's flag.) */ + guint capabilities; + /* The current cursor location that are sent to the engine. */ + gint x; + gint y; + gint w; + gint h; + + /* an engine desc used to create the proxy. */ + IBusEngineDesc *desc; + + /* a key mapping for the engine that converts keycode into keysym. the mapping is used only when use_sys_layout is FALSE. */ + IBusKeymap *keymap; + /* private member */ + + /* cached surrounding text (see also IBusEnginePrivate and + IBusInputContextPrivate) */ + IBusText *surrounding_text; + guint surrounding_cursor_pos; + guint selection_anchor_pos; +}; + +struct _BusEngineProxyClass { + IBusProxyClass parent; + /* class members */ +}; enum { COMMIT_TEXT, FORWARD_KEY_EVENT, DELETE_SURROUNDING_TEXT, + REQUIRE_SURROUNDING_TEXT, UPDATE_PREEDIT_TEXT, SHOW_PREEDIT_TEXT, HIDE_PREEDIT_TEXT, @@ -47,80 +85,85 @@ enum { LAST_SIGNAL, }; +enum { + PROP_0 = 0, + PROP_ENGINE_DESC, +}; static guint engine_signals[LAST_SIGNAL] = { 0 }; -// static guint engine_signals[LAST_SIGNAL] = { 0 }; - -/* functions prototype */ -static void bus_engine_proxy_real_destroy (BusEngineProxy *engine); - -static gboolean bus_engine_proxy_ibus_signal (IBusProxy *proxy, - IBusMessage *message); -G_DEFINE_TYPE (BusEngineProxy, bus_engine_proxy, IBUS_TYPE_PROXY) +static IBusText *text_empty = NULL; -BusEngineProxy * -bus_engine_proxy_new (const gchar *path, - IBusEngineDesc *desc, - BusConnection *connection) -{ - g_assert (path); - g_assert (IBUS_IS_ENGINE_DESC (desc)); - g_assert (BUS_IS_CONNECTION (connection)); - - BusEngineProxy *engine; - - engine = (BusEngineProxy *) g_object_new (BUS_TYPE_ENGINE_PROXY, - "name", NULL, - "path", path, - "connection", connection, - NULL); - - engine->desc = desc; - g_object_ref_sink (desc); - if (desc->layout != NULL && desc->layout[0] != '\0') { - engine->keymap = ibus_keymap_get (desc->layout); - } - - if (engine->keymap == NULL) { - engine->keymap = ibus_keymap_get ("us"); - } - - return engine; -} +/* functions prototype */ +static void bus_engine_proxy_set_property (BusEngineProxy *engine, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void bus_engine_proxy_get_property (BusEngineProxy *engine, + guint prop_id, + GValue *value, + GParamSpec *pspec); +static void bus_engine_proxy_real_destroy (IBusProxy *proxy); +static void bus_engine_proxy_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters); +static void bus_engine_proxy_initable_iface_init + (GInitableIface *initable_iface); + +G_DEFINE_TYPE_WITH_CODE (BusEngineProxy, bus_engine_proxy, IBUS_TYPE_PROXY, + G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, bus_engine_proxy_initable_iface_init) + ); + +static GInitableIface *parent_initable_iface = NULL; static void -bus_engine_proxy_class_init (BusEngineProxyClass *klass) +bus_engine_proxy_class_init (BusEngineProxyClass *class) { - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); - IBusProxyClass *proxy_class = IBUS_PROXY_CLASS (klass); - - - bus_engine_proxy_parent_class = (IBusProxyClass *) g_type_class_peek_parent (klass); - - ibus_object_class->destroy = (IBusObjectDestroyFunc) bus_engine_proxy_real_destroy; - - proxy_class->ibus_signal = bus_engine_proxy_ibus_signal; - - /* install signals */ + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + + gobject_class->set_property = (GObjectSetPropertyFunc)bus_engine_proxy_set_property; + gobject_class->get_property = (GObjectGetPropertyFunc)bus_engine_proxy_get_property; + + IBUS_PROXY_CLASS (class)->destroy = bus_engine_proxy_real_destroy; + G_DBUS_PROXY_CLASS (class)->g_signal = bus_engine_proxy_g_signal; + + parent_initable_iface = + (GInitableIface *)g_type_interface_peek (bus_engine_proxy_parent_class, G_TYPE_INITABLE); + + /* install properties */ + g_object_class_install_property (gobject_class, + PROP_ENGINE_DESC, + g_param_spec_object ("desc", + "desc", + "desc", + IBUS_TYPE_ENGINE_DESC, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_BLURB | + G_PARAM_STATIC_NICK + )); + + /* install glib signals that will be sent when corresponding D-Bus signals are sent from an engine process. */ engine_signals[COMMIT_TEXT] = g_signal_new (I_("commit-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT, + bus_marshal_VOID__OBJECT, G_TYPE_NONE, 1, IBUS_TYPE_TEXT); engine_signals[FORWARD_KEY_EVENT] = g_signal_new (I_("forward-key-event"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__UINT_UINT_UINT, + bus_marshal_VOID__UINT_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, @@ -129,23 +172,33 @@ bus_engine_proxy_class_init (BusEngineProxyClass *klass) engine_signals[DELETE_SURROUNDING_TEXT] = g_signal_new (I_("delete-surrounding-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__INT_UINT, + bus_marshal_VOID__INT_UINT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_UINT); + engine_signals[REQUIRE_SURROUNDING_TEXT] = + g_signal_new (I_("require-surrounding-text"), + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + bus_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + engine_signals[UPDATE_PREEDIT_TEXT] = g_signal_new (I_("update-preedit-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT_UINT_BOOLEAN_UINT, + bus_marshal_VOID__OBJECT_UINT_BOOLEAN_UINT, G_TYPE_NONE, 4, IBUS_TYPE_TEXT, @@ -155,31 +208,31 @@ bus_engine_proxy_class_init (BusEngineProxyClass *klass) engine_signals[SHOW_PREEDIT_TEXT] = g_signal_new (I_("show-preedit-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); engine_signals[HIDE_PREEDIT_TEXT] = g_signal_new (I_("hide-preedit-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); engine_signals[UPDATE_AUXILIARY_TEXT] = g_signal_new (I_("update-auxiliary-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT_BOOLEAN, + bus_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2, IBUS_TYPE_TEXT, @@ -187,31 +240,31 @@ bus_engine_proxy_class_init (BusEngineProxyClass *klass) engine_signals[SHOW_AUXILIARY_TEXT] = g_signal_new (I_("show-auxiliary-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); engine_signals[HIDE_AUXILIARY_TEXT] = g_signal_new (I_("hide-auxiliary-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); engine_signals[UPDATE_LOOKUP_TABLE] = g_signal_new (I_("update-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__BOXED_BOOLEAN, + bus_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2, IBUS_TYPE_LOOKUP_TABLE, @@ -219,110 +272,132 @@ bus_engine_proxy_class_init (BusEngineProxyClass *klass) engine_signals[SHOW_LOOKUP_TABLE] = g_signal_new (I_("show-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); engine_signals[HIDE_LOOKUP_TABLE] = g_signal_new (I_("hide-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); engine_signals[PAGE_UP_LOOKUP_TABLE] = g_signal_new (I_("page-up-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); engine_signals[PAGE_DOWN_LOOKUP_TABLE] = g_signal_new (I_("page-down-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); engine_signals[CURSOR_UP_LOOKUP_TABLE] = g_signal_new (I_("cursor-up-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); engine_signals[CURSOR_DOWN_LOOKUP_TABLE] = g_signal_new (I_("cursor-down-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); engine_signals[REGISTER_PROPERTIES] = g_signal_new (I_("register-properties"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT, + bus_marshal_VOID__OBJECT, G_TYPE_NONE, 1, IBUS_TYPE_PROP_LIST); engine_signals[UPDATE_PROPERTY] = g_signal_new (I_("update-property"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT, + bus_marshal_VOID__OBJECT, G_TYPE_NONE, 1, IBUS_TYPE_PROPERTY); + text_empty = ibus_text_new_from_static_string (""); + g_object_ref_sink (text_empty); } static void bus_engine_proxy_init (BusEngineProxy *engine) { - engine->has_focus = FALSE; - engine->enabled = FALSE; - engine->x = 0; - engine->y = 0; - engine->w = 0; - engine->h = 0; - engine->enabled = FALSE; - engine->desc = NULL; - engine->keymap = NULL; + engine->surrounding_text = g_object_ref_sink (text_empty); } static void -bus_engine_proxy_real_destroy (BusEngineProxy *engine) +bus_engine_proxy_set_property (BusEngineProxy *engine, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { - if (ibus_proxy_get_connection ((IBusProxy *) engine)) { - ibus_proxy_call ((IBusProxy *) engine, - "Destroy", - G_TYPE_INVALID); + switch (prop_id) { + case PROP_ENGINE_DESC: + g_assert (engine->desc == NULL); + engine->desc = g_value_dup_object (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (engine, prop_id, pspec); } +} + +static void +bus_engine_proxy_get_property (BusEngineProxy *engine, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + switch (prop_id) { + case PROP_ENGINE_DESC: + g_value_set_object (value, bus_engine_proxy_get_desc (engine)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (engine, prop_id, pspec); + } + +} + +static void +bus_engine_proxy_real_destroy (IBusProxy *proxy) +{ + BusEngineProxy *engine = (BusEngineProxy *)proxy; if (engine->desc) { g_object_unref (engine->desc); @@ -334,26 +409,38 @@ bus_engine_proxy_real_destroy (BusEngineProxy *engine) engine->keymap = NULL; } - IBUS_OBJECT_CLASS(bus_engine_proxy_parent_class)->destroy (IBUS_OBJECT (engine)); + if (engine->surrounding_text) { + g_object_unref (engine->surrounding_text); + engine->surrounding_text = NULL; + } + + IBUS_PROXY_CLASS (bus_engine_proxy_parent_class)->destroy ((IBusProxy *)engine); } -static gboolean -bus_engine_proxy_ibus_signal (IBusProxy *proxy, - IBusMessage *message) +static void +_g_object_unref_if_floating (gpointer instance) { - g_assert (BUS_IS_ENGINE_PROXY (proxy)); - g_assert (message != NULL); - g_assert (ibus_message_get_type (message) == DBUS_MESSAGE_TYPE_SIGNAL); + if (g_object_is_floating (instance)) + g_object_unref (instance); +} - const gchar *interface; - const gchar *name; - BusEngineProxy *engine; - IBusError *error; - gint i; +/** + * bus_engine_proxy_g_signal: + * + * Handle all D-Bus signals from the engine process. This function emits corresponding glib signal for the D-Bus signal. + */ +static void +bus_engine_proxy_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters) +{ + BusEngineProxy *engine = (BusEngineProxy *)proxy; + /* The list of nullary D-Bus signals. */ static const struct { - const gchar *member; - const guint signal_id; + const gchar *signal_name; + const guint signal_id; } signals [] = { { "ShowPreeditText", SHOW_PREEDIT_TEXT }, { "HidePreeditText", HIDE_PREEDIT_TEXT }, @@ -365,288 +452,478 @@ bus_engine_proxy_ibus_signal (IBusProxy *proxy, { "PageDownLookupTable", PAGE_DOWN_LOOKUP_TABLE }, { "CursorUpLookupTable", CURSOR_UP_LOOKUP_TABLE }, { "CursorDownLookupTable", CURSOR_DOWN_LOOKUP_TABLE }, + { "RequireSurroundingText", REQUIRE_SURROUNDING_TEXT }, }; - engine = BUS_ENGINE_PROXY (proxy); - interface = ibus_message_get_interface (message); - name = ibus_message_get_member (message); - - if (interface != NULL && g_strcmp0 (interface, IBUS_INTERFACE_ENGINE) != 0) - return FALSE; - + gint i; for (i = 0; i < G_N_ELEMENTS (signals); i++) { - if (g_strcmp0 (name, signals[i].member) == 0) { + if (g_strcmp0 (signal_name, signals[i].signal_name) == 0) { g_signal_emit (engine, engine_signals[signals[i].signal_id], 0); - goto handled; + return; } } - if (g_strcmp0 (name, "CommitText") == 0) { - IBusText *text; - gboolean retval; + /* Handle D-Bus signals with parameters. Deserialize them and emit a glib signal. */ + if (g_strcmp0 (signal_name, "CommitText") == 0) { + GVariant *arg0 = NULL; + g_variant_get (parameters, "(v)", &arg0); + g_return_if_fail (arg0 != NULL); - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_TEXT, &text, - G_TYPE_INVALID); - if (!retval) - goto failed; + IBusText *text = IBUS_TEXT (ibus_serializable_deserialize (arg0)); + g_variant_unref (arg0); + g_return_if_fail (text != NULL); g_signal_emit (engine, engine_signals[COMMIT_TEXT], 0, text); - g_object_unref (text); - } - else if (g_strcmp0 (name, "ForwardKeyEvent") == 0) { - guint32 keyval; - guint32 keycode; - guint32 states; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_UINT, &keyval, - G_TYPE_UINT, &keycode, - G_TYPE_UINT, &states, - G_TYPE_INVALID); - - if (!retval) - goto failed; + _g_object_unref_if_floating (text); + return; + } + + if (g_strcmp0 (signal_name, "ForwardKeyEvent") == 0) { + guint32 keyval = 0; + guint32 keycode = 0; + guint32 states = 0; + g_variant_get (parameters, "(uuu)", &keyval, &keycode, &states); + g_signal_emit (engine, engine_signals[FORWARD_KEY_EVENT], 0, keyval, keycode, states); + return; + } + + if (g_strcmp0 (signal_name, "DeleteSurroundingText") == 0) { + gint offset_from_cursor = 0; + guint nchars = 0; + g_variant_get (parameters, "(iu)", &offset_from_cursor, &nchars); + + g_signal_emit (engine, + engine_signals[DELETE_SURROUNDING_TEXT], + 0, offset_from_cursor, nchars); + return; + } + + if (g_strcmp0 (signal_name, "UpdatePreeditText") == 0) { + GVariant *arg0 = NULL; + guint cursor_pos = 0; + gboolean visible = FALSE; + guint mode = 0; + + g_variant_get (parameters, "(vubu)", &arg0, &cursor_pos, &visible, &mode); + g_return_if_fail (arg0 != NULL); + + IBusText *text = IBUS_TEXT (ibus_serializable_deserialize (arg0)); + g_variant_unref (arg0); + g_return_if_fail (text != NULL); + + g_signal_emit (engine, + engine_signals[UPDATE_PREEDIT_TEXT], + 0, text, cursor_pos, visible, mode); + + _g_object_unref_if_floating (text); + return; } - else if (g_strcmp0 (name, "DeleteSurroundingText") == 0) { - gint offset_from_cursor; - guint nchars; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_INT, &offset_from_cursor, - G_TYPE_UINT, &nchars, - G_TYPE_INVALID); - - if (!retval) - goto failed; - g_signal_emit (engine, engine_signals[DELETE_SURROUNDING_TEXT], 0, offset_from_cursor, nchars); - } - else if (g_strcmp0 (name, "UpdatePreeditText") == 0) { - IBusText *text; - gint cursor_pos; - gboolean visible; - gboolean retval; - guint mode; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_TEXT, &text, - G_TYPE_UINT, &cursor_pos, - G_TYPE_BOOLEAN, &visible, - G_TYPE_UINT, &mode, - G_TYPE_INVALID); - - if (!retval) - goto failed; - - g_signal_emit (engine, engine_signals[UPDATE_PREEDIT_TEXT], 0, - text, cursor_pos, visible, mode); - if (g_object_is_floating (text)) - g_object_unref (text); - } - else if (g_strcmp0 (name, "UpdateAuxiliaryText") == 0) { - IBusText *text; - gboolean visible; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_TEXT, &text, - G_TYPE_BOOLEAN, &visible, - G_TYPE_INVALID); - - if (!retval) - goto failed; + + if (g_strcmp0 (signal_name, "UpdateAuxiliaryText") == 0) { + GVariant *arg0 = NULL; + gboolean visible = FALSE; + + g_variant_get (parameters, "(vb)", &arg0, &visible); + g_return_if_fail (arg0 != NULL); + + IBusText *text = IBUS_TEXT (ibus_serializable_deserialize (arg0)); + g_variant_unref (arg0); + g_return_if_fail (text != NULL); g_signal_emit (engine, engine_signals[UPDATE_AUXILIARY_TEXT], 0, text, visible); - if (g_object_is_floating (text)) - g_object_unref (text); + _g_object_unref_if_floating (text); + return; } - else if (g_strcmp0 (name, "UpdateLookupTable") == 0) { - IBusLookupTable *table; - gboolean visible; - gboolean retval; - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_LOOKUP_TABLE, &table, - G_TYPE_BOOLEAN, &visible, - G_TYPE_INVALID); + if (g_strcmp0 (signal_name, "UpdateLookupTable") == 0) { + GVariant *arg0 = NULL; + gboolean visible = FALSE; + + g_variant_get (parameters, "(vb)", &arg0, &visible); + g_return_if_fail (arg0 != NULL); - if (!retval) - goto failed; + IBusLookupTable *table = IBUS_LOOKUP_TABLE (ibus_serializable_deserialize (arg0)); + g_variant_unref (arg0); + g_return_if_fail (table != NULL); g_signal_emit (engine, engine_signals[UPDATE_LOOKUP_TABLE], 0, table, visible); - if (g_object_is_floating (table)) - g_object_unref (table); - } - else if (g_strcmp0 (name, "RegisterProperties") == 0) { - gboolean retval; - IBusPropList *prop_list; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_PROP_LIST, &prop_list, - G_TYPE_INVALID); - if (!retval) { - goto failed; - } - g_signal_emit (engine, engine_signals[REGISTER_PROPERTIES], 0, prop_list); + _g_object_unref_if_floating (table); + return; + } - if (g_object_is_floating (prop_list)) - g_object_unref (prop_list); + if (g_strcmp0 (signal_name, "RegisterProperties") == 0) { + GVariant *arg0 = NULL; + g_variant_get (parameters, "(v)", &arg0); + g_return_if_fail (arg0 != NULL); + IBusPropList *prop_list = IBUS_PROP_LIST (ibus_serializable_deserialize (arg0)); + g_variant_unref (arg0); + g_return_if_fail (prop_list != NULL); + + g_signal_emit (engine, engine_signals[REGISTER_PROPERTIES], 0, prop_list); + _g_object_unref_if_floating (prop_list); + return; } - else if (g_strcmp0 (name, "UpdateProperty") == 0) { - IBusProperty *prop; - gboolean retval; - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_PROPERTY, &prop, - G_TYPE_INVALID); + if (g_strcmp0 (signal_name, "UpdateProperty") == 0) { + GVariant *arg0 = NULL; + g_variant_get (parameters, "(v)", &arg0); + g_return_if_fail (arg0 != NULL); - if (!retval) - goto failed; + IBusProperty *prop = IBUS_PROPERTY (ibus_serializable_deserialize (arg0)); + g_variant_unref (arg0); + g_return_if_fail (prop != NULL); g_signal_emit (engine, engine_signals[UPDATE_PROPERTY], 0, prop); - if (g_object_is_floating (prop)) - g_object_unref (prop); + _g_object_unref_if_floating (prop); + return; } - else - return FALSE; -handled: - g_signal_stop_emission_by_name (engine, "ibus-signal"); - return TRUE; + g_return_if_reached (); +} -failed: - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - return FALSE; +static BusEngineProxy * +bus_engine_proxy_new_internal (const gchar *path, + IBusEngineDesc *desc, + GDBusConnection *connection) +{ + g_assert (path); + g_assert (IBUS_IS_ENGINE_DESC (desc)); + g_assert (G_IS_DBUS_CONNECTION (connection)); + + GDBusProxyFlags flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START | + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES; + BusEngineProxy *engine = + (BusEngineProxy *) g_initable_new (BUS_TYPE_ENGINE_PROXY, + NULL, + NULL, + "desc", desc, + "g-connection", connection, + "g-interface-name", IBUS_INTERFACE_ENGINE, + "g-object-path", path, + "g-default-timeout", g_gdbus_timeout, + "g-flags", flags, + NULL); + const gchar *layout = ibus_engine_desc_get_layout (desc); + if (layout != NULL && layout[0] != '\0') { + engine->keymap = ibus_keymap_get (layout); + } + return engine; } typedef struct { - GFunc func; - gpointer user_data; - BusEngineProxy *engine; -} CallData; + GSimpleAsyncResult *simple; + IBusEngineDesc *desc; + BusComponent *component; + BusFactoryProxy *factory; + GCancellable *cancellable; + gulong cancelled_handler_id; + guint handler_id; + guint timeout_id; + gint timeout; +} EngineProxyNewData; static void -bus_engine_proxy_process_key_event_reply_cb (IBusPendingCall *pending, - CallData *call_data) -{ - IBusMessage *reply_message; - IBusError *error; - gboolean retval = FALSE; - - reply_message = dbus_pending_call_steal_reply (pending); - - if (reply_message == NULL) { - /* reply timeout */ - IBusObject *connection; - connection = (IBusObject *) ibus_proxy_get_connection ((IBusProxy *)call_data->engine); - ibus_object_destroy (connection); - goto _out; - } - else if ((error = ibus_error_new_from_message (reply_message)) != NULL) { - if (g_strcmp0 (error->name, DBUS_ERROR_NO_REPLY) == 0) { - /* reply timeout */ - IBusObject *connection; - connection = (IBusObject *) ibus_proxy_get_connection ((IBusProxy *)call_data->engine); - ibus_object_destroy (connection); +engine_proxy_new_data_free (EngineProxyNewData *data) +{ + if (data->simple != NULL) { + g_object_unref (data->simple); + } + + if (data->desc != NULL) { + g_object_unref (data->desc); + } + + if (data->component != NULL) { + if (data->handler_id != 0) { + g_signal_handler_disconnect (data->component, data->handler_id); } - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - goto _out; + g_object_unref (data->component); } - if (!ibus_message_get_args (reply_message, - &error, - G_TYPE_BOOLEAN, &retval, - G_TYPE_INVALID)) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - goto _out; + if (data->factory != NULL) { + g_object_unref (data->factory); } -_out: - if (reply_message) { - ibus_message_unref (reply_message); + if (data->timeout_id != 0) { + g_source_remove (data->timeout_id); } - g_object_unref (call_data->engine); - call_data->func (GINT_TO_POINTER (retval), call_data->user_data); - g_slice_free (CallData, call_data); + + if (data->cancellable != NULL) { + if (data->cancelled_handler_id != 0) { + g_cancellable_disconnect (data->cancellable, + data->cancelled_handler_id); + } + g_object_unref (data->cancellable); + } + + g_slice_free (EngineProxyNewData, data); } -void -bus_engine_proxy_process_key_event (BusEngineProxy *engine, - guint keyval, - guint keycode, - guint state, - GFunc return_cb, - gpointer user_data) +/** + * create_engine_ready_cb: + * + * A callback function to be called when bus_factory_proxy_create_engine finishes. + * Create an BusEngineProxy object and call the GAsyncReadyCallback. + */ +static void +create_engine_ready_cb (BusFactoryProxy *factory, + GAsyncResult *res, + EngineProxyNewData *data) { - g_assert (BUS_IS_ENGINE_PROXY (engine)); - g_assert (return_cb); + g_return_if_fail (data->simple != NULL); + + GError *error = NULL; + gchar *path = bus_factory_proxy_create_engine_finish (factory, + res, + &error); + if (path == NULL) { + g_simple_async_result_set_from_error (data->simple, error); + g_simple_async_result_complete_in_idle (data->simple); + engine_proxy_new_data_free (data); + return; + } + + BusEngineProxy *engine = + bus_engine_proxy_new_internal (path, + data->desc, + g_dbus_proxy_get_connection ((GDBusProxy *)data->factory)); + g_free (path); + + /* FIXME: set destroy callback ? */ + g_simple_async_result_set_op_res_gpointer (data->simple, engine, NULL); + g_simple_async_result_complete_in_idle (data->simple); - IBusPendingCall *pending = NULL; - CallData *call_data; - IBusError *error; - gboolean retval; + engine_proxy_new_data_free (data); +} + +/** + * notify_factory_cb: + * + * A callback function to be called when bus_component_start() emits "notify::factory" signal within 5 seconds. + * Call bus_factory_proxy_create_engine to create the engine proxy asynchronously. + */ +static void +notify_factory_cb (BusComponent *component, + GParamSpec *spec, + EngineProxyNewData *data) +{ + data->factory = bus_component_get_factory (data->component); + + if (data->factory != NULL) { + g_object_ref (data->factory); + /* Timeout should be removed */ + if (data->timeout_id != 0) { + g_source_remove (data->timeout_id); + data->timeout_id = 0; + } + /* Handler of notify::factory should be removed. */ + if (data->handler_id != 0) { + g_signal_handler_disconnect (data->component, data->handler_id); + data->handler_id = 0; + } - if (keycode != 0 && !BUS_DEFAULT_IBUS->use_sys_layout && engine->keymap != NULL) { - guint t = ibus_keymap_lookup_keysym (engine->keymap, keycode, state); - if (t != IBUS_VoidSymbol) { - keyval = t; + /* We *have to* disconnect the cancelled_cb here, since g_dbus_proxy_call + * calls create_engine_ready_cb even if the proxy call is cancelled, and + * in this case, create_engine_ready_cb itself will return error using + * g_simple_async_result_set_from_error and g_simple_async_result_complete. + * Otherwise, g_simple_async_result_complete might be called twice for a + * single data->simple twice (first in cancelled_cb and later in + * create_engine_ready_cb). */ + if (data->cancellable && data->cancelled_handler_id != 0) { + g_cancellable_disconnect (data->cancellable, data->cancelled_handler_id); + data->cancelled_handler_id = 0; } + + /* Create engine from factory. */ + bus_factory_proxy_create_engine (data->factory, + data->desc, + data->timeout, + data->cancellable, + (GAsyncReadyCallback) create_engine_ready_cb, + data); } + /* If factory is NULL, we will continue wait for + * factory notify signal or timeout */ +} + +/** + * timeout_cb: + * + * A callback function to be called when bus_component_start() does not emit "notify::factory" signal within 5 seconds. + * Call the GAsyncReadyCallback and stop the 5 sec timer. + */ +static gboolean +timeout_cb (EngineProxyNewData *data) +{ + g_simple_async_result_set_error (data->simple, + G_DBUS_ERROR, + G_DBUS_ERROR_FAILED, + "Timeout was reached"); + g_simple_async_result_complete_in_idle (data->simple); + + engine_proxy_new_data_free (data); + + return FALSE; +} + +/** + * cancelled_cb: + * + * A callback function to be called when someone calls g_cancellable_cancel() + * for the cancellable object for bus_engine_proxy_new. + * Call the GAsyncReadyCallback. + */ +static gboolean +cancelled_idle_cb (EngineProxyNewData *data) +{ + g_simple_async_result_set_error (data->simple, + G_DBUS_ERROR, + G_DBUS_ERROR_FAILED, + "Operation was cancelled"); + g_simple_async_result_complete_in_idle (data->simple); + + engine_proxy_new_data_free (data); + + return FALSE; +} + +static void +cancelled_cb (GCancellable *cancellable, + EngineProxyNewData *data) +{ + /* Cancel the bus_engine_proxy_new() in idle to avoid deadlock. + * And use HIGH priority to avoid timeout event happening before + * idle callback. */ + g_idle_add_full (G_PRIORITY_HIGH, + (GSourceFunc) cancelled_idle_cb, + data, NULL); +} - retval = ibus_proxy_call_with_reply ((IBusProxy *) engine, - "ProcessKeyEvent", - &pending, - g_dbus_timeout, - &error, - G_TYPE_UINT, &keyval, - G_TYPE_UINT, &keycode, - G_TYPE_UINT, &state, - G_TYPE_INVALID); - if (!retval) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - return_cb (GINT_TO_POINTER (FALSE), user_data); +void +bus_engine_proxy_new (IBusEngineDesc *desc, + gint timeout, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_assert (IBUS_IS_ENGINE_DESC (desc)); + g_assert (cancellable == NULL || G_IS_CANCELLABLE (cancellable)); + g_assert (callback); + + GSimpleAsyncResult *simple = + g_simple_async_result_new (NULL, + callback, + user_data, + bus_engine_proxy_new); + + if (g_cancellable_is_cancelled (cancellable)) { + g_simple_async_result_set_error (simple, + G_DBUS_ERROR, + G_DBUS_ERROR_FAILED, + "Operation was cancelled"); + g_simple_async_result_complete_in_idle (simple); + g_object_unref (simple); return; } - call_data = g_slice_new0 (CallData); - call_data->func = return_cb; - call_data->user_data = user_data; - g_object_ref (engine); - call_data->engine = engine; + EngineProxyNewData *data = g_slice_new0 (EngineProxyNewData); + data->desc = g_object_ref (desc); + data->component = bus_component_from_engine_desc (desc); + g_object_ref (data->component); + data->simple = simple; + data->timeout = timeout; + + data->factory = bus_component_get_factory (data->component); + + if (data->factory == NULL) { + /* The factory is not ready yet. Create the factory first, and wait for + * the "notify::factory" signal. In the handler of "notify::factory", + * we'll create the engine proxy. */ + data->handler_id = g_signal_connect (data->component, + "notify::factory", + G_CALLBACK (notify_factory_cb), + data); + data->timeout_id = g_timeout_add (timeout, + (GSourceFunc) timeout_cb, + data); + if (cancellable) { + data->cancellable = (GCancellable *) g_object_ref (cancellable); + data->cancelled_handler_id = g_cancellable_connect (cancellable, + (GCallback) cancelled_cb, + data, + NULL); + } + bus_component_start (data->component, g_verbose); + } + else { + /* The factory is ready. We'll create the engine proxy directly. */ + g_object_ref (data->factory); + + /* We don't have to connect to cancelled_cb here, since g_dbus_proxy_call + * calls create_engine_ready_cb even if the proxy call is cancelled, and + * in this case, create_engine_ready_cb itself can return error using + * g_simple_async_result_set_from_error and g_simple_async_result_complete. */ + bus_factory_proxy_create_engine (data->factory, + data->desc, + timeout, + cancellable, + (GAsyncReadyCallback) create_engine_ready_cb, + data); + } +} - retval = ibus_pending_call_set_notify (pending, - (IBusPendingCallNotifyFunction) bus_engine_proxy_process_key_event_reply_cb, - call_data, - NULL); - ibus_pending_call_unref (pending); +BusEngineProxy * +bus_engine_proxy_new_finish (GAsyncResult *res, + GError **error) +{ + GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res); - if (!retval) { - g_object_unref (call_data->engine); - g_slice_free (CallData, call_data); - g_warning ("%s : ProcessKeyEvent", DBUS_ERROR_NO_MEMORY); - return_cb (GINT_TO_POINTER (FALSE), user_data); - return; + g_assert (error == NULL || *error == NULL); + g_assert (g_simple_async_result_get_source_tag (simple) == bus_engine_proxy_new); + + if (g_simple_async_result_propagate_error (simple, error)) + return NULL; + + return (BusEngineProxy *) g_simple_async_result_get_op_res_gpointer(simple); +} + +void +bus_engine_proxy_process_key_event (BusEngineProxy *engine, + guint keyval, + guint keycode, + guint state, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_assert (BUS_IS_ENGINE_PROXY (engine)); + + if (keycode != 0 && bus_ibus_impl_is_use_sys_layout (BUS_DEFAULT_IBUS) == FALSE) { + /* Since use_sys_layout is false, we don't rely on XKB. Try to convert keyval from keycode by using our own mapping. */ + IBusKeymap *keymap = engine->keymap; + if (keymap == NULL) + keymap = BUS_DEFAULT_KEYMAP; + if (keymap != NULL) { + guint t = ibus_keymap_lookup_keysym (keymap, keycode, state); + if (t != IBUS_KEY_VoidSymbol) { + keyval = t; + } + } } + + g_dbus_proxy_call ((GDBusProxy *)engine, + "ProcessKeyEvent", + g_variant_new ("(uuu)", keyval, keycode, state), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + callback, + user_data); } void @@ -663,16 +940,51 @@ bus_engine_proxy_set_cursor_location (BusEngineProxy *engine, engine->y = y; engine->w = w; engine->h = h; - ibus_proxy_call ((IBusProxy *) engine, - "SetCursorLocation", - G_TYPE_INT, &x, - G_TYPE_INT, &y, - G_TYPE_INT, &w, - G_TYPE_INT, &h, - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *)engine, + "SetCursorLocation", + g_variant_new ("(iiii)", x, y, w, h), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); } } +void +bus_engine_proxy_process_hand_writing_event + (BusEngineProxy *engine, + GVariant *coordinates) +{ + g_assert (BUS_IS_ENGINE_PROXY (engine)); + + g_dbus_proxy_call ((GDBusProxy *)engine, + "ProcessHandWritingEvent", + coordinates, + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); +} + +void +bus_engine_proxy_cancel_hand_writing + (BusEngineProxy *engine, + guint n_strokes) +{ + g_assert (BUS_IS_ENGINE_PROXY (engine)); + + g_dbus_proxy_call ((GDBusProxy *)engine, + "CancelHandWriting", + g_variant_new ("(u)", n_strokes), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); +} + void bus_engine_proxy_set_capabilities (BusEngineProxy *engine, guint caps) @@ -681,10 +993,14 @@ bus_engine_proxy_set_capabilities (BusEngineProxy *engine, if (engine->capabilities != caps) { engine->capabilities = caps; - ibus_proxy_call ((IBusProxy *) engine, - "SetCapabilities", - G_TYPE_UINT, &caps, - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *)engine, + "SetCapabilities", + g_variant_new ("(u)", caps), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); } } @@ -696,11 +1012,14 @@ bus_engine_proxy_property_activate (BusEngineProxy *engine, g_assert (BUS_IS_ENGINE_PROXY (engine)); g_assert (prop_name != NULL); - ibus_proxy_call ((IBusProxy *) engine, - "PropertyActivate", - G_TYPE_STRING, &prop_name, - G_TYPE_UINT, &prop_state, - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *)engine, + "PropertyActivate", + g_variant_new ("(su)", prop_name, prop_state), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); } void @@ -710,10 +1029,14 @@ bus_engine_proxy_property_show (BusEngineProxy *engine, g_assert (BUS_IS_ENGINE_PROXY (engine)); g_assert (prop_name != NULL); - ibus_proxy_call ((IBusProxy *) engine, - "PropertyShow", - G_TYPE_STRING, &prop_name, - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *)engine, + "PropertyShow", + g_variant_new ("(s)", prop_name), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); } void bus_engine_proxy_property_hide (BusEngineProxy *engine, @@ -722,20 +1045,60 @@ void bus_engine_proxy_property_hide (BusEngineProxy *engine, g_assert (BUS_IS_ENGINE_PROXY (engine)); g_assert (prop_name != NULL); - ibus_proxy_call ((IBusProxy *) engine, - "PropertyHide", - G_TYPE_STRING, &prop_name, - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *)engine, + "PropertyHide", + g_variant_new ("(s)", prop_name), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); } +void bus_engine_proxy_set_surrounding_text (BusEngineProxy *engine, + IBusText *text, + guint cursor_pos, + guint anchor_pos) +{ + g_assert (BUS_IS_ENGINE_PROXY (engine)); + g_assert (text != NULL); + + if (!engine->surrounding_text || + g_strcmp0 (text->text, engine->surrounding_text->text) != 0 || + cursor_pos != engine->surrounding_cursor_pos || + anchor_pos != engine->selection_anchor_pos) { + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)text); + if (engine->surrounding_text) + g_object_unref (engine->surrounding_text); + engine->surrounding_text = (IBusText *) g_object_ref_sink (text); + engine->surrounding_cursor_pos = cursor_pos; + engine->selection_anchor_pos = anchor_pos; + + g_dbus_proxy_call ((GDBusProxy *)engine, + "SetSurroundingText", + g_variant_new ("(vuu)", + variant, + cursor_pos, + anchor_pos), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); + } +} + +/* a macro to generate a function to call a nullary D-Bus method. */ #define DEFINE_FUNCTION(Name, name) \ void \ bus_engine_proxy_##name (BusEngineProxy *engine) \ { \ g_assert (BUS_IS_ENGINE_PROXY (engine)); \ - ibus_proxy_call ((IBusProxy *) engine, \ - #Name, \ - G_TYPE_INVALID); \ + g_dbus_proxy_call ((GDBusProxy *)engine, \ + #Name, \ + NULL, \ + G_DBUS_CALL_FLAGS_NONE, \ + -1, NULL, NULL, NULL); \ } DEFINE_FUNCTION (Reset, reset) @@ -752,9 +1115,14 @@ bus_engine_proxy_focus_in (BusEngineProxy *engine) g_assert (BUS_IS_ENGINE_PROXY (engine)); if (!engine->has_focus) { engine->has_focus = TRUE; - ibus_proxy_call ((IBusProxy *) engine, - "FocusIn", - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *)engine, + "FocusIn", + NULL, + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); } } @@ -764,9 +1132,14 @@ bus_engine_proxy_focus_out (BusEngineProxy *engine) g_assert (BUS_IS_ENGINE_PROXY (engine)); if (engine->has_focus) { engine->has_focus = FALSE; - ibus_proxy_call ((IBusProxy *) engine, - "FocusOut", - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *)engine, + "FocusOut", + NULL, + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); } } @@ -776,9 +1149,14 @@ bus_engine_proxy_enable (BusEngineProxy *engine) g_assert (BUS_IS_ENGINE_PROXY (engine)); if (!engine->enabled) { engine->enabled = TRUE; - ibus_proxy_call ((IBusProxy *) engine, - "Enable", - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *)engine, + "Enable", + NULL, + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); } } @@ -788,9 +1166,14 @@ bus_engine_proxy_disable (BusEngineProxy *engine) g_assert (BUS_IS_ENGINE_PROXY (engine)); if (engine->enabled) { engine->enabled = FALSE; - ibus_proxy_call ((IBusProxy *) engine, - "Disable", - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *)engine, + "Disable", + NULL, + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); } } @@ -802,12 +1185,14 @@ bus_engine_proxy_candidate_clicked (BusEngineProxy *engine, { g_assert (BUS_IS_ENGINE_PROXY (engine)); - ibus_proxy_call ((IBusProxy *) engine, - "CandidateClicked", - G_TYPE_UINT, &index, - G_TYPE_UINT, &button, - G_TYPE_UINT, &state, - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *)engine, + "CandidateClicked", + g_variant_new ("(uuu)", index, button, state), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + NULL, + NULL); } IBusEngineDesc * @@ -825,3 +1210,27 @@ bus_engine_proxy_is_enabled (BusEngineProxy *engine) return engine->enabled; } + +static gboolean +initable_init (GInitable *initable, + GCancellable *cancellable, + GError **error) +{ + BusEngineProxy *engine = BUS_ENGINE_PROXY (initable); + if (engine->desc == NULL) { + *error = g_error_new (G_DBUS_ERROR, + G_DBUS_ERROR_FAILED, + "Desc is NULL"); + return FALSE; + } + + return parent_initable_iface->init (initable, + cancellable, + error); +} + +static void +bus_engine_proxy_initable_iface_init (GInitableIface *initable_iface) +{ + initable_iface->init = initable_init; +} diff --git a/bus/engineproxy.h b/bus/engineproxy.h index 7c2626f0f..f61fc343e 100644 --- a/bus/engineproxy.h +++ b/bus/engineproxy.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,9 +19,10 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#ifndef __ENGINE_PROXY_H_ -#define __ENGINE_PROXY_H_ +#ifndef __BUS_ENGINE_PROXY_H_ +#define __BUS_ENGINE_PROXY_H_ +#include #include #include "connection.h" @@ -47,69 +49,199 @@ G_BEGIN_DECLS typedef struct _BusEngineProxy BusEngineProxy; typedef struct _BusEngineProxyClass BusEngineProxyClass; -struct _BusEngineProxy { - IBusProxy parent; - /* instance members */ - gboolean has_focus; - gboolean enabled; - guint capabilities; - /* cursor location */ - gint x; - gint y; - gint w; - gint h; - - IBusEngineDesc *desc; - IBusKeymap *keymap; - IBusPropList *prop_list; - - /* private member */ -}; - -struct _BusEngineProxyClass { - IBusProxyClass parent; - /* class members */ -}; - GType bus_engine_proxy_get_type (void); -BusEngineProxy *bus_engine_proxy_new (const gchar *path, - IBusEngineDesc *desc, - BusConnection *connection); -IBusEngineDesc *bus_engine_proxy_get_desc (BusEngineProxy *engine); -void bus_engine_proxy_process_key_event (BusEngineProxy *engine, - guint keyval, - guint keycode, - guint state, - GFunc return_cn, - gpointer user_data); + +/** + * bus_engine_proxy_new: + * @desc: the engine to create. + * @timeout: timeout in msec, or -1 to use the default timeout value. + * @cancellable: a object that could be used to cancel the operation. + * @callback: a function to be called when the method invocation is done. + * @user_data: a pointer that will be passed to the callback. + */ +void bus_engine_proxy_new (IBusEngineDesc *desc, + gint timeout, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +/** + * bus_engine_proxy_new_finish: + * @returns: On success, return an engine object. On error, return NULL. + * + * Get the result of bus_engine_proxy_new call. You have to call this function in the GAsyncReadyCallback function. + */ +BusEngineProxy *bus_engine_proxy_new_finish (GAsyncResult *res, + GError **error); + +/** + * bus_engine_proxy_get_desc: + * + * Get an IBusEngineDesc object associated with the engine. + */ +IBusEngineDesc *bus_engine_proxy_get_desc (BusEngineProxy *engine); + +/** + * bus_engine_proxy_process_key_event: + * @callback: a function to be called when the method invocation is done. + * + * Call "ProcessKeyEvent" method of an engine asynchronously. + */ +void bus_engine_proxy_process_key_event (BusEngineProxy *engine, + guint keyval, + guint keycode, + guint state, + GAsyncReadyCallback callback, + gpointer user_data); +/** + * bus_engine_proxy_set_cursor_location: + * + * Call "SetCursorLocation" method of an engine asynchronously. Unlike bus_engine_proxy_process_key_event, there's no way to know the + * result of the method invocation. If the same coordinate is given twice or more, the function does nothing from the second time. + */ void bus_engine_proxy_set_cursor_location - (BusEngineProxy *engine, - gint x, - gint y, - gint w, - gint h); -void bus_engine_proxy_focus_in (BusEngineProxy *engine); -void bus_engine_proxy_focus_out (BusEngineProxy *engine); -void bus_engine_proxy_reset (BusEngineProxy *engine); -void bus_engine_proxy_set_capabilities (BusEngineProxy *engine, - guint caps); -void bus_engine_proxy_page_up (BusEngineProxy *engine); -void bus_engine_proxy_page_down (BusEngineProxy *engine); -void bus_engine_proxy_cursor_up (BusEngineProxy *engine); -void bus_engine_proxy_cursor_down (BusEngineProxy *engine); -void bus_engine_proxy_candidate_clicked (BusEngineProxy *engine, - guint index, - guint button, - guint state); -void bus_engine_proxy_enable (BusEngineProxy *engine); -void bus_engine_proxy_disable (BusEngineProxy *engine); -void bus_engine_proxy_property_activate (BusEngineProxy *engine, - const gchar *prop_name, - guint state); -void bus_engine_proxy_property_show (BusEngineProxy *engine, - const gchar *prop_name); + (BusEngineProxy *engine, + gint x, + gint y, + gint w, + gint h); +/** + * bus_engine_proxy_focus_in: + * + * Call "FocusIn" method of an engine asynchronously. Do nothing if the engine already has a focus. + */ +void bus_engine_proxy_focus_in (BusEngineProxy *engine); + +/** + * bus_engine_proxy_focus_out: + * + * Call "FocusOut" method of an engine asynchronously. Do nothing if the engine does not have a focus. + */ +void bus_engine_proxy_focus_out (BusEngineProxy *engine); + +/** + * bus_engine_proxy_reset: + * + * Call "Reset" method of an engine asynchronously. + */ +void bus_engine_proxy_reset (BusEngineProxy *engine); + +/** + * bus_engine_proxy_set_capabilities: + * + * Call "SetCapabilities" method of an engine asynchronously. + */ +void bus_engine_proxy_set_capabilities (BusEngineProxy *engine, + guint caps); +/** + * bus_engine_proxy_page_up: + * + * Call "PageUp" method of an engine asynchronously. + */ +void bus_engine_proxy_page_up (BusEngineProxy *engine); + +/** + * bus_engine_proxy_page_down: + * + * Call "PageDown" method of an engine asynchronously. + */ +void bus_engine_proxy_page_down (BusEngineProxy *engine); + +/** + * bus_engine_proxy_cursor_up: + * + * Call "CursorUp" method of an engine asynchronously. + */ +void bus_engine_proxy_cursor_up (BusEngineProxy *engine); + +/** + * bus_engine_proxy_cursor_down: + * + * Call "CursorDown" method of an engine asynchronously. + */ +void bus_engine_proxy_cursor_down (BusEngineProxy *engine); + +/** + * bus_engine_proxy_candidate_clicked: + * + * Call "CandidateClicked" method of an engine asynchronously. + */ +void bus_engine_proxy_candidate_clicked (BusEngineProxy *engine, + guint index, + guint button, + guint state); +/** + * bus_engine_proxy_enable: + * + * Call "Enable" method of an engine asynchronously. Do nothing if the engine is already enabled. + */ +void bus_engine_proxy_enable (BusEngineProxy *engine); + +/** + * bus_engine_proxy_disable: + * + * Call "Disable" method of an engine asynchronously. Do nothing if the engine is already disabled. + */ +void bus_engine_proxy_disable (BusEngineProxy *engine); + +/** + * bus_engine_proxy_property_activate: + * + * Call "PropertyActivate" method of an engine asynchronously. + */ +void bus_engine_proxy_property_activate (BusEngineProxy *engine, + const gchar *prop_name, + guint state); +/** + * bus_engine_proxy_property_show: + * + * Call "PropertyShow" method of an engine asynchronously. + */ +void bus_engine_proxy_property_show (BusEngineProxy *engine, + const gchar *prop_name); +/** + * bus_engine_proxy_property_hide: + * + * Call "PropertyHide" method of an engine asynchronously. + */ void bus_engine_proxy_property_hide (BusEngineProxy *engine, const gchar *prop_name); +/** + * bus_engine_proxy_is_enabled: + * @returns: TRUE if the engine is enabled. + */ gboolean bus_engine_proxy_is_enabled (BusEngineProxy *engine); + +/** + * bus_engine_proxy_set_surrounding_text: + * + * Call "SetSurroundingText" method of an engine asynchronously. + */ +void bus_engine_proxy_set_surrounding_text + (BusEngineProxy *engine, + IBusText *text, + guint cursor_pos, + guint anchor_pos); + +/** + * bus_engine_proxy_process_hand_writing_event: + * + * Call "ProcessHandWritingEvent" method of an engine asynchronously. The type of the GVariant should be "(ad)". + * See ibus_input_context_process_hand_writing_event for details. + */ +void bus_engine_proxy_process_hand_writing_event + (BusEngineProxy *engine, + GVariant *coordinates); + +/** + * bus_engine_proxy_cancel_hand_writing: + * + * Call "CancelHandWriting" method of an engine asynchronously. + * See ibus_input_context_cancel_hand_writing for details. + */ +void bus_engine_proxy_cancel_hand_writing + (BusEngineProxy *engine, + guint n_strokes); + G_END_DECLS #endif diff --git a/bus/factoryproxy.c b/bus/factoryproxy.c index 0b6434ea6..973424e8a 100644 --- a/bus/factoryproxy.c +++ b/bus/factoryproxy.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,195 +19,105 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include -#include -#include -#include "dbusimpl.h" #include "factoryproxy.h" -#include "option.h" - -/* functions prototype */ -static void bus_factory_proxy_destroy (BusFactoryProxy *factory); - -G_DEFINE_TYPE (BusFactoryProxy, bus_factory_proxy, IBUS_TYPE_PROXY) - -BusFactoryProxy * -bus_factory_proxy_new (IBusComponent *component, - BusConnection *connection) -{ - g_assert (IBUS_IS_COMPONENT (component)); - - BusFactoryProxy *factory; - GList *p; - - if (connection == NULL) { - connection = bus_dbus_impl_get_connection_by_name (BUS_DEFAULT_DBUS, component->name); - } - if (connection == NULL) { - return NULL; - } - - factory = g_object_new (BUS_TYPE_FACTORY_PROXY, - "name", NULL, - "path", "/org/freedesktop/IBus/Factory", - "connection", connection, - NULL); +#include "dbusimpl.h" +#include "global.h" +#include "marshalers.h" +#include "types.h" - g_object_ref_sink (component); - factory->component = component; - g_object_set_data ((GObject *)factory->component, "factory", factory); +struct _BusFactoryProxy { + IBusProxy parent; + /* instance members */ +}; - factory->engine_list = ibus_component_get_engines (factory->component); +struct _BusFactoryProxyClass { + IBusProxyClass parent; + /* class members */ +}; - for (p = factory->engine_list; p != NULL; p = p->next) { - IBusEngineDesc *desc = (IBusEngineDesc *)p->data; - g_object_ref (desc); - g_object_set_data ((GObject *)desc, "factory", factory); - } +/* functions prototype */ +static void bus_factory_proxy_destroy (IBusProxy *proxy); - return factory; -} +G_DEFINE_TYPE (BusFactoryProxy, bus_factory_proxy, IBUS_TYPE_PROXY) static void -bus_factory_proxy_class_init (BusFactoryProxyClass *klass) +bus_factory_proxy_class_init (BusFactoryProxyClass *class) { - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); - - ibus_object_class->destroy = (IBusObjectDestroyFunc) bus_factory_proxy_destroy; + IBUS_PROXY_CLASS (class)->destroy = bus_factory_proxy_destroy; } static void bus_factory_proxy_init (BusFactoryProxy *factory) { - factory->component = NULL; } static void -bus_factory_proxy_destroy (BusFactoryProxy *factory) -{ - GList *p; - - for (p = factory->engine_list; p != NULL ; p = p->next) { - IBusEngineDesc *desc = (IBusEngineDesc *)p->data; - g_object_steal_data ((GObject *)desc, "factory"); - g_object_unref (desc); - } - g_list_free (factory->engine_list); - factory->engine_list = NULL; - - if (factory->component) { - g_object_steal_data ((GObject *)factory->component, "factory"); - g_object_unref (factory->component); - factory->component = NULL; - } - - IBUS_OBJECT_CLASS(bus_factory_proxy_parent_class)->destroy (IBUS_OBJECT (factory)); -} - -IBusComponent * -bus_factory_proxy_get_component (BusFactoryProxy *factory) +bus_factory_proxy_destroy (IBusProxy *proxy) { - return factory->component; + IBUS_PROXY_CLASS (bus_factory_proxy_parent_class)->destroy (IBUS_PROXY (proxy)); } BusFactoryProxy * -bus_factory_proxy_get_from_component (IBusComponent *component) +bus_factory_proxy_new (BusConnection *connection) { - IBUS_IS_COMPONENT (component); - + g_assert (BUS_IS_CONNECTION (connection)); BusFactoryProxy *factory; - factory = (BusFactoryProxy *) g_object_get_data ((GObject *)component, "factory"); + GDBusProxyFlags flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START | + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES; + factory = (BusFactoryProxy *) g_initable_new ( + BUS_TYPE_FACTORY_PROXY, + NULL, NULL, + "g-object-path", IBUS_PATH_FACTORY, + "g-interface-name", IBUS_INTERFACE_FACTORY, + "g-connection", bus_connection_get_dbus_connection (connection), + "g-default-timeout", g_gdbus_timeout, + "g-flags", flags, + NULL); return factory; } -BusFactoryProxy * -bus_factory_proxy_get_from_engine (IBusEngineDesc *desc) -{ - - IBUS_IS_ENGINE_DESC (desc); - - BusFactoryProxy *factory; - - factory = (BusFactoryProxy *) g_object_get_data ((GObject *)desc, "factory"); - - return factory; -} - -BusEngineProxy * -bus_factory_proxy_create_engine (BusFactoryProxy *factory, - IBusEngineDesc *desc) +void +bus_factory_proxy_create_engine (BusFactoryProxy *factory, + IBusEngineDesc *desc, + gint timeout, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { g_assert (BUS_IS_FACTORY_PROXY (factory)); g_assert (IBUS_IS_ENGINE_DESC (desc)); + g_assert (cancellable == NULL || G_IS_CANCELLABLE (cancellable)); + + g_dbus_proxy_call ((GDBusProxy *) factory, + "CreateEngine", + g_variant_new ("(s)", ibus_engine_desc_get_name (desc)), + G_DBUS_CALL_FLAGS_NONE, + timeout, + cancellable, + callback, + user_data); +} - IBusPendingCall *pending = NULL; - IBusMessage *reply_message; - IBusError *error; - BusEngineProxy *engine; - gchar *object_path; - gboolean retval; - - if (g_list_find (factory->component->engines, desc) == NULL) { - return NULL; - } - - retval = ibus_proxy_call_with_reply ((IBusProxy *) factory, - "CreateEngine", - &pending, - g_dbus_timeout, - &error, - G_TYPE_STRING, &(desc->name), - G_TYPE_INVALID); - - if (!retval) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - return NULL; - } - - ibus_pending_call_wait (pending); - reply_message = ibus_pending_call_steal_reply (pending); - ibus_pending_call_unref (pending); - - if (reply_message == NULL) { - IBusObject *connection; - connection = (IBusObject *) ibus_proxy_get_connection ((IBusProxy *)factory); - ibus_object_destroy (connection); - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - return NULL; - } - - if ((error = ibus_error_new_from_message (reply_message)) != NULL) { - if (g_strcmp0 (error->name, DBUS_ERROR_NO_REPLY) == 0) { - IBusObject *connection; - connection = (IBusObject *) ibus_proxy_get_connection ((IBusProxy *)factory); - ibus_object_destroy (connection); - } - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - ibus_message_unref (reply_message); - return NULL; - } - - if (!ibus_message_get_args (reply_message, - &error, - IBUS_TYPE_OBJECT_PATH, &object_path, - G_TYPE_INVALID)) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - ibus_message_unref (reply_message); +gchar * +bus_factory_proxy_create_engine_finish (BusFactoryProxy *factory, + GAsyncResult *res, + GError **error) +{ + GVariant *retval = g_dbus_proxy_call_finish ((GDBusProxy *) factory, + res, + error); + if (retval == NULL) return NULL; - } - IBusConnection *connection = ibus_proxy_get_connection ((IBusProxy *) factory); - engine = bus_engine_proxy_new (object_path, desc, (BusConnection *) connection); - ibus_message_unref (reply_message); + gchar *object_path = NULL; + g_variant_get (retval, "(o)", &object_path); + g_variant_unref (retval); - return engine; + return object_path; } + diff --git a/bus/factoryproxy.h b/bus/factoryproxy.h index 07718ab38..504501901 100644 --- a/bus/factoryproxy.h +++ b/bus/factoryproxy.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,8 +19,8 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#ifndef __FACTORY_PROXY_H_ -#define __FACTORY_PROXY_H_ +#ifndef __BUS_FACTORY_PROXY_H_ +#define __BUS_FACTORY_PROXY_H_ #include #include "connection.h" @@ -48,37 +49,40 @@ G_BEGIN_DECLS typedef struct _BusFactoryProxy BusFactoryProxy; typedef struct _BusFactoryProxyClass BusFactoryProxyClass; -struct _BusFactoryProxy { - IBusProxy parent; - /* instance members */ - - IBusComponent *component; - GList *engine_list; -}; +GType bus_factory_proxy_get_type (void); -struct _BusFactoryProxyClass { - IBusProxyClass parent; - /* class members */ -}; +/** + * bus_factory_proxy_new: + * @connection: the connection between ibus-daemon and an engine process. + * @returns: a new proxy object. + */ +BusFactoryProxy *bus_factory_proxy_new (BusConnection *connection); -GType bus_factory_proxy_get_type (void); -BusFactoryProxy *bus_factory_proxy_new (IBusComponent *component, - BusConnection *connection); -IBusComponent *bus_factory_proxy_get_component(BusFactoryProxy *factory); -BusEngineProxy *bus_factory_proxy_create_engine(BusFactoryProxy *factory, - IBusEngineDesc *desc); -BusFactoryProxy *bus_factory_proxy_get_from_component - (IBusComponent *component); -BusFactoryProxy *bus_factory_proxy_get_from_engine - (IBusEngineDesc *desc); +/** + * bus_factory_proxy_create_engine: + * @desc: an engine description to create. + * @timeout: timeout in msec, or -1 to use the default timeout value. + * + * Invoke "CreateEngine" method of the "org.freedesktop.IBus.Factory" interface asynchronously. + */ +void bus_factory_proxy_create_engine + (BusFactoryProxy *factory, + IBusEngineDesc *desc, + gint timeout, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); -#if 0 -const gchar *bus_factory_proxy_get_name (BusFactoryProxy *factory); -const gchar *bus_factory_proxy_get_lang (BusFactoryProxy *factory); -const gchar *bus_factory_proxy_get_icon (BusFactoryProxy *factory); -const gchar *bus_factory_proxy_get_authors (BusFactoryProxy *factory); -const gchar *bus_factory_proxy_get_credits (BusFactoryProxy *factory); -#endif +/** + * bus_factory_proxy_create_engine_finish: + * @returns: On success, return an D-Bus object path of the new engine. On error, returns NULL. + * + * Get the result of bus_factory_proxy_create_engine call. You have to call this function in the GAsyncReadyCallback function. + */ +gchar *bus_factory_proxy_create_engine_finish + (BusFactoryProxy *factory, + GAsyncResult *res, + GError **error); G_END_DECLS #endif diff --git a/bus/global.c b/bus/global.c new file mode 100644 index 000000000..47b872189 --- /dev/null +++ b/bus/global.c @@ -0,0 +1,35 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* ibus - The Input Bus + * Copyright (C) 2008-2010 Peng Huang + * Copyright (C) 2008-2010 Red Hat, Inc. + * Copyright (c) 2012 Google, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "global.h" + +gchar **g_argv = NULL; +gchar *g_address = "unix:tmpdir=/tmp"; +gchar *g_cache = "auto"; +gboolean g_mempro = FALSE; +gboolean g_verbose = FALSE; +gint g_gdbus_timeout = 5000; +#ifdef G_THREADS_ENABLED +gint g_monitor_timeout = 0; +#endif + diff --git a/src/ibusdbus.h b/bus/global.h similarity index 68% rename from src/ibusdbus.h rename to bus/global.h index 75e7e7ab8..7bf2a1a12 100644 --- a/src/ibusdbus.h +++ b/bus/global.h @@ -2,6 +2,7 @@ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang * Copyright (C) 2008-2010 Red Hat, Inc. + * Copyright (c) 2012 Google, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,28 +19,26 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -/** - * SECTION: ibusdbus - * @Title: IBusDBus - * @Short_description: DBus types - * @Stability: Stable - * - */ -#ifndef __IBUS_DBUS_H_ -#define __IBUS_DBUS_H_ +#ifndef __BUS_GLOBAL_H_ +#define __BUS_GLOBAL_H_ + +#include G_BEGIN_DECLS -#ifndef DBUS_H -typedef struct DBusError DBusError; -typedef struct DBusMessage DBusMessage; -typedef struct DBusMessageIter DBusMessageIter; -typedef struct DBusPendingCall DBusPendingCall; -typedef struct DBusServer DBusServer; -typedef struct DBusConnection DBusConnection; -#else +#define DEFAULT_ENGINE "xkb:us::eng" + +extern gchar **g_argv; +extern gchar *g_address; +extern gchar *g_cache; +extern gboolean g_mempro; +extern gboolean g_verbose; +extern gint g_gdbus_timeout; +#ifdef G_THREADS_ENABLED +extern gint g_monitor_timeout; #endif G_END_DECLS #endif + diff --git a/bus/ibus.desktop.in b/bus/ibus.desktop.in index 9212d5a2b..9784f1142 100644 --- a/bus/ibus.desktop.in +++ b/bus/ibus.desktop.in @@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 _Name=IBus _GenericName=Input Method Framework _Comment=Start IBus Input Method Framework diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c index c14831c74..7d804577c 100644 --- a/bus/ibusimpl.c +++ b/bus/ibusimpl.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -19,24 +20,64 @@ * Boston, MA 02111-1307, USA. */ -#include -#include -#include -#include -#include +#include "ibusimpl.h" + #include -#include +#include #include -#include -#include "ibusimpl.h" -#include "dbusimpl.h" -#include "server.h" +#include +#include +#include + #include "connection.h" -#include "registry.h" +#include "dbusimpl.h" #include "factoryproxy.h" -#include "panelproxy.h" +#include "global.h" #include "inputcontext.h" -#include "option.h" +#include "panelproxy.h" +#include "registry.h" +#include "server.h" +#include "types.h" + +struct _BusIBusImpl { + IBusService parent; + /* instance members */ + GHashTable *factory_dict; + + /* registered components */ + GList *registered_components; + GList *contexts; + + /* a fake input context for global engine support */ + BusInputContext *fake_context; + + /* a list of engines that are started by a user (without the --ibus command line flag.) */ + GList *register_engine_list; + + /* if TRUE, ibus-daemon uses a keysym translated by the system (i.e. XKB) as-is. + * otherwise, ibus-daemon itself converts keycode into keysym. */ + gboolean use_sys_layout; + + gboolean embed_preedit_text; + + BusRegistry *registry; + + BusInputContext *focused_context; + BusPanelProxy *panel; + + /* a default keymap of ibus-daemon (usually "us") which is used only when use_sys_layout is FALSE. */ + IBusKeymap *keymap; + + gboolean use_global_engine; + gchar *global_engine_name; + gchar *global_previous_engine_name; +}; + +struct _BusIBusImplClass { + IBusServiceClass parent; + + /* class members */ +}; enum { LAST_SIGNAL, @@ -46,92 +87,143 @@ enum { PROP_0, }; -// static guint _signals[LAST_SIGNAL] = { 0 }; +/* +static guint _signals[LAST_SIGNAL] = { 0 }; +*/ /* functions prototype */ -static void bus_ibus_impl_destroy (BusIBusImpl *ibus); -static gboolean bus_ibus_impl_ibus_message (BusIBusImpl *ibus, - BusConnection *connection, - IBusMessage *message); -static void bus_ibus_impl_add_factory (BusIBusImpl *ibus, - BusFactoryProxy *factory); -static void bus_ibus_impl_set_trigger (BusIBusImpl *ibus, - GValue *value); -static void bus_ibus_impl_set_next_engine_in_menu - (BusIBusImpl *ibus, - GValue *value); -static void bus_ibus_impl_set_previous_engine - (BusIBusImpl *ibus, - GValue *value); - -static void bus_ibus_impl_set_preload_engines - (BusIBusImpl *ibus, - GValue *value); -static void bus_ibus_impl_set_use_sys_layout - (BusIBusImpl *ibus, - GValue *value); -static void bus_ibus_impl_set_embed_preedit_text - (BusIBusImpl *ibus, - GValue *value); -static void bus_ibus_impl_set_enable_by_default - (BusIBusImpl *ibus, - GValue *value); - -static void bus_ibus_impl_set_use_global_engine - (BusIBusImpl *ibus, - GValue *value); -static void bus_ibus_impl_set_global_engine (BusIBusImpl *ibus, - BusEngineProxy *engine); - +static void bus_ibus_impl_destroy (BusIBusImpl *ibus); +static void bus_ibus_impl_service_method_call + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation + *invocation); +/* TODO use property to replace some getter and setter in future */ +#if 0 +static GVariant *ibus_ibus_impl_service_get_property + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error); +static gboolean ibus_ibus_impl_service_set_property + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error); +#endif static void bus_ibus_impl_registry_changed (BusIBusImpl *ibus); static void bus_ibus_impl_global_engine_changed (BusIBusImpl *ibus); - -static void _factory_destroy_cb (BusFactoryProxy *factory, - BusIBusImpl *ibus); - -static void bus_ibus_impl_set_context_engine(BusIBusImpl *ibus, +static void bus_ibus_impl_set_context_engine_from_desc + (BusIBusImpl *ibus, BusInputContext *context, - BusEngineProxy *engine); - -static gchar *bus_ibus_impl_load_global_engine_name_from_config - (BusIBusImpl *ibus); -static void bus_ibus_impl_save_global_engine_name_to_config - (BusIBusImpl *ibus); - -static gchar *bus_ibus_impl_load_global_previous_engine_name_from_config - (BusIBusImpl *ibus); -static void bus_ibus_impl_save_global_previous_engine_name_to_config - (BusIBusImpl *ibus); - -G_DEFINE_TYPE(BusIBusImpl, bus_ibus_impl, IBUS_TYPE_SERVICE) + IBusEngineDesc *desc); +static BusInputContext + *bus_ibus_impl_create_input_context + (BusIBusImpl *ibus, + BusConnection *connection, + const gchar *client); +static IBusEngineDesc + *bus_ibus_impl_get_engine_desc (BusIBusImpl *ibus, + const gchar *engine_name); +static void bus_ibus_impl_set_focused_context + (BusIBusImpl *ibus, + BusInputContext *context); +/* some callback functions */ +static void _context_engine_changed_cb (BusInputContext *context, + BusIBusImpl *ibus); -BusIBusImpl * -bus_ibus_impl_get_default (void) -{ - static BusIBusImpl *ibus = NULL; - - if (ibus == NULL) { - ibus = (BusIBusImpl *) g_object_new (BUS_TYPE_IBUS_IMPL, - "path", IBUS_PATH_IBUS, - NULL); - bus_dbus_impl_register_object (BUS_DEFAULT_DBUS, - (IBusService *)ibus); - } - return ibus; -} +/* The interfaces available in this class, which consists of a list of methods this class implements and + * a list of signals this class may emit. Method calls to the interface that are not defined in this XML + * will be automatically rejected by the GDBus library (see src/ibusservice.c for details.) */ +static const gchar introspection_xml[] = + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n"; + + +G_DEFINE_TYPE (BusIBusImpl, bus_ibus_impl, IBUS_TYPE_SERVICE) static void -bus_ibus_impl_class_init (BusIBusImplClass *klass) +bus_ibus_impl_class_init (BusIBusImplClass *class) { - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); - - ibus_object_class->destroy = (IBusObjectDestroyFunc) bus_ibus_impl_destroy; - - IBUS_SERVICE_CLASS (klass)->ibus_message = (ServiceIBusMessageFunc) bus_ibus_impl_ibus_message; + IBUS_OBJECT_CLASS (class)->destroy = (IBusObjectDestroyFunc) bus_ibus_impl_destroy; + /* override the parent class's implementation. */ + IBUS_SERVICE_CLASS (class)->service_method_call = bus_ibus_impl_service_method_call; + /* register the xml so that bus_ibus_impl_service_method_call will be called on a method call defined in the xml (e.g. 'GetAddress'.) */ + ibus_service_class_add_interfaces (IBUS_SERVICE_CLASS (class), introspection_xml); } +/** + * _panel_destroy_cb: + * + * A callback function which is called when (1) the connection to the panel process is terminated, + * or (2) ibus_proxy_destroy (ibus->panel); is called. See src/ibusproxy.c for details. + */ static void _panel_destroy_cb (BusPanelProxy *panel, BusIBusImpl *ibus) @@ -145,348 +237,6 @@ _panel_destroy_cb (BusPanelProxy *panel, g_object_unref (panel); } -static void -bus_ibus_impl_set_hotkey (BusIBusImpl *ibus, - GQuark hotkey, - GValue *value) -{ - g_assert (BUS_IS_IBUS_IMPL (ibus)); - - GValueArray *array; - gint i; - - ibus_hotkey_profile_remove_hotkey_by_event (ibus->hotkey_profile, hotkey); - - if (value == NULL) { - return; - } - - g_return_if_fail (G_VALUE_TYPE (value) == G_TYPE_VALUE_ARRAY); - array = g_value_get_boxed (value); - - for (i = 0; i < array->n_values; i++) { - GValue *str; - - str = g_value_array_get_nth (array, i); - g_return_if_fail (G_VALUE_TYPE (str) == G_TYPE_STRING); - - ibus_hotkey_profile_add_hotkey_from_string (ibus->hotkey_profile, - g_value_get_string (str), - hotkey); - } - -} - -static void -bus_ibus_impl_set_trigger (BusIBusImpl *ibus, - GValue *value) -{ - GQuark hotkey = g_quark_from_static_string ("trigger"); - bus_ibus_impl_set_hotkey (ibus, hotkey, value); - if (value == NULL) { - ibus_hotkey_profile_add_hotkey (ibus->hotkey_profile, - IBUS_space, - IBUS_CONTROL_MASK, - hotkey); - } -} - -static void -bus_ibus_impl_set_next_engine_in_menu (BusIBusImpl *ibus, - GValue *value) -{ - GQuark hotkey = g_quark_from_static_string ("next-engine-in-menu"); - bus_ibus_impl_set_hotkey (ibus, hotkey, value); -} - -static void -bus_ibus_impl_set_previous_engine (BusIBusImpl *ibus, - GValue *value) -{ - GQuark hotkey = g_quark_from_static_string ("previous-engine"); - bus_ibus_impl_set_hotkey (ibus, hotkey, value); -} - -static void -bus_ibus_impl_set_preload_engines (BusIBusImpl *ibus, - GValue *value) -{ - GList *engine_list = NULL; - - g_list_foreach (ibus->engine_list, (GFunc) g_object_unref, NULL); - g_list_free (ibus->engine_list); - - if (value != NULL && G_VALUE_TYPE (value) == G_TYPE_VALUE_ARRAY) { - GValueArray *array; - gint i; - - array = (GValueArray *) g_value_get_boxed (value); - for (i = 0; array && i < array->n_values; i++) { - const gchar *engine_name; - IBusEngineDesc *engine; - - if (G_VALUE_TYPE (&array->values[i]) != G_TYPE_STRING) - continue; - - engine_name = g_value_get_string (&array->values[i]); - - engine = bus_registry_find_engine_by_name (ibus->registry, engine_name); - - if (engine == NULL || g_list_find (engine_list, engine) != NULL) - continue; - - engine_list = g_list_append (engine_list, engine); - } - } - - g_list_foreach (engine_list, (GFunc) g_object_ref, NULL); - ibus->engine_list = engine_list; - - if (ibus->engine_list) { - IBusComponent *component; - - component = ibus_component_get_from_engine ((IBusEngineDesc *) ibus->engine_list->data); - if (component && !ibus_component_is_running (component)) { - ibus_component_start (component, g_verbose); - } - } -} - -static void -bus_ibus_impl_set_use_sys_layout (BusIBusImpl *ibus, - GValue *value) -{ - if (value != NULL && G_VALUE_TYPE (value) == G_TYPE_BOOLEAN) { - ibus->use_sys_layout = g_value_get_boolean (value); - } -} - -static void -bus_ibus_impl_set_embed_preedit_text (BusIBusImpl *ibus, - GValue *value) -{ - if (value != NULL && G_VALUE_TYPE (value) == G_TYPE_BOOLEAN) { - ibus->embed_preedit_text = g_value_get_boolean (value); - } -} - -static void -bus_ibus_impl_set_enable_by_default (BusIBusImpl *ibus, - GValue *value) -{ - if (value != NULL && G_VALUE_TYPE (value) == G_TYPE_BOOLEAN) { - ibus->enable_by_default = g_value_get_boolean (value); - } -} - -static void -bus_ibus_impl_set_use_global_engine (BusIBusImpl *ibus, - GValue *value) -{ - gboolean new_value; - - if (value == NULL || G_VALUE_TYPE (value) != G_TYPE_BOOLEAN) { - return; - } - - new_value = g_value_get_boolean (value); - if (ibus->use_global_engine == new_value) { - return; - } - - if (new_value == TRUE) { - BusEngineProxy *engine; - /* turn on use_global_engine option */ - ibus->use_global_engine = TRUE; - engine = ibus->focused_context != NULL ? - bus_input_context_get_engine (ibus->focused_context) : NULL; - if (engine) { - bus_ibus_impl_set_global_engine (ibus, engine); - } - } - else { - /* turn off use_global_engine option */ - bus_ibus_impl_set_global_engine (ibus, NULL); - ibus->use_global_engine = FALSE; - - g_free (ibus->global_previous_engine_name); - } -} - -static gint -_engine_desc_cmp (IBusEngineDesc *desc1, - IBusEngineDesc *desc2) -{ - return - ((gint) desc1->rank) + ((gint) desc2->rank); -} - -static void -bus_ibus_impl_set_default_preload_engines (BusIBusImpl *ibus) -{ - g_assert (BUS_IS_IBUS_IMPL (ibus)); - - static gboolean done = FALSE; - GValue value = { 0 }; - GList *engines, *list; - gchar *lang, *p; - GValueArray *array; - - if (done || ibus->config == NULL) { - return; - } - - if (ibus_config_get_value (ibus->config, "general", "preload_engines", &value)) { - done = TRUE; - g_value_unset (&value); - return; - } - - done = TRUE; - lang = g_strdup (setlocale (LC_ALL, NULL)); - p = index (lang, '.'); - if (p) { - *p = '\0'; - } - - engines = bus_registry_get_engines_by_language (ibus->registry, lang); - if (engines == NULL) { - p = index (lang, '_'); - if (p) { - *p = '\0'; - engines = bus_registry_get_engines_by_language (ibus->registry, lang); - } - } - g_free (lang); - - /* sort engines by rank */ - engines = g_list_sort (engines, (GCompareFunc) _engine_desc_cmp); - - g_value_init (&value, G_TYPE_VALUE_ARRAY); - array = g_value_array_new (5); - for (list = engines; list != NULL; list = list->next) { - IBusEngineDesc *desc; - GValue name = { 0 }; - desc = (IBusEngineDesc *)list->data; - - /* ignore engines with rank <== 0 */ - if (desc->rank <= 0) - break; - g_value_init (&name, G_TYPE_STRING); - g_value_set_string (&name, desc->name); - g_value_array_append (array, &name); - } - g_value_take_boxed (&value, array); - ibus_config_set_value (ibus->config, "general", "preload_engines", &value); - g_value_unset (&value); - g_list_free (engines); -} - -static void -bus_ibus_impl_reload_config (BusIBusImpl *ibus) -{ - g_assert (BUS_IS_IBUS_IMPL (ibus)); - - gint i; - GValue value = { 0 }; - - const static struct { - gchar *section; - gchar *key; - void ( *func) (BusIBusImpl *, GValue *); - } entries [] = { - { "general/hotkey", "trigger", bus_ibus_impl_set_trigger }, - #if 0 - /* Only for backward compatibility, shall be removed later. */ - { "general/hotkey", "next_engine", bus_ibus_impl_set_next_engine_in_menu }, - #endif - { "general/hotkey", "next_engine_in_menu", bus_ibus_impl_set_next_engine_in_menu }, - #if 0 - /* Only for backward compatibility, shall be removed later. */ - { "general/hotkey", "prev_engine", bus_ibus_impl_set_previous_engine }, - #endif - { "general/hotkey", "previous_engine", bus_ibus_impl_set_previous_engine }, - { "general", "preload_engines", bus_ibus_impl_set_preload_engines }, - { "general", "use_system_keyboard_layout", bus_ibus_impl_set_use_sys_layout }, - { "general", "use_global_engine", bus_ibus_impl_set_use_global_engine }, - { "general", "embed_preedit_text", bus_ibus_impl_set_embed_preedit_text }, - { "general", "enable_by_default", bus_ibus_impl_set_enable_by_default }, - }; - - for (i = 0; i < G_N_ELEMENTS (entries); i++) { - if (ibus->config != NULL && - ibus_config_get_value (ibus->config, - entries[i].section, - entries[i].key, - &value)) { - entries[i].func (ibus, &value); - g_value_unset (&value); - } - else { - entries[i].func (ibus, NULL); - } - } -} - -static void -_config_value_changed_cb (IBusConfig *config, - gchar *section, - gchar *key, - GValue *value, - BusIBusImpl *ibus) -{ - g_assert (IBUS_IS_CONFIG (config)); - g_assert (section); - g_assert (key); - g_assert (value); - g_assert (BUS_IS_IBUS_IMPL (ibus)); - - gint i; - - const static struct { - gchar *section; - gchar *key; - void ( *func) (BusIBusImpl *, GValue *); - } entries [] = { - { "general/hotkey", "trigger", bus_ibus_impl_set_trigger }, - #if 0 - /* Only for backward compatibility, shall be removed later. */ - { "general/hotkey", "next_engine", bus_ibus_impl_set_next_engine_in_menu }, - #endif - { "general/hotkey", "next_engine_in_menu", bus_ibus_impl_set_next_engine_in_menu }, - #if 0 - /* Only for backward compatibility, shall be removed later. */ - { "general/hotkey", "prev_engine", bus_ibus_impl_set_previous_engine }, - #endif - { "general/hotkey", "previous_engine", bus_ibus_impl_set_previous_engine }, - { "general", "preload_engines", bus_ibus_impl_set_preload_engines }, - { "general", "use_system_keyboard_layout", bus_ibus_impl_set_use_sys_layout }, - { "general", "use_global_engine", bus_ibus_impl_set_use_global_engine }, - { "general", "embed_preedit_text", bus_ibus_impl_set_embed_preedit_text }, - { "general", "enable_by_default", bus_ibus_impl_set_enable_by_default }, - }; - - for (i = 0; i < G_N_ELEMENTS (entries); i++) { - if (g_strcmp0 (entries[i].section, section) == 0 && - g_strcmp0 (entries[i].key, key) == 0) { - entries[i].func (ibus, value); - break; - } - } -} - -static void -_config_destroy_cb (IBusConfig *config, - BusIBusImpl *ibus) -{ - g_assert (IBUS_IS_CONFIG (config)); - g_assert (BUS_IS_IBUS_IMPL (ibus)); - - g_assert (ibus->config == config); - - g_object_unref (ibus->config); - ibus->config = NULL; -} - static void _registry_changed_cb (BusRegistry *registry, BusIBusImpl *ibus) @@ -494,12 +244,19 @@ _registry_changed_cb (BusRegistry *registry, bus_ibus_impl_registry_changed (ibus); } +/* + * _dbus_name_owner_changed_cb: + * + * A callback function to be called when the name-owner-changed signal is sent to the dbus object. + * This usually means a client (e.g. a panel/config/engine process or an application) is connected/disconnected to/from the bus. + */ static void -_dbus_name_owner_changed_cb (BusDBusImpl *dbus, - const gchar *name, - const gchar *old_name, - const gchar *new_name, - BusIBusImpl *ibus) +_dbus_name_owner_changed_cb (BusDBusImpl *dbus, + BusConnection *orig_connection, + const gchar *name, + const gchar *old_name, + const gchar *new_name, + BusIBusImpl *ibus) { g_assert (BUS_IS_DBUS_IMPL (dbus)); g_assert (name != NULL); @@ -507,15 +264,14 @@ _dbus_name_owner_changed_cb (BusDBusImpl *dbus, g_assert (new_name != NULL); g_assert (BUS_IS_IBUS_IMPL (ibus)); - BusFactoryProxy *factory; - if (g_strcmp0 (name, IBUS_SERVICE_PANEL) == 0) { if (g_strcmp0 (new_name, "") != 0) { + /* a Panel process is started. */ BusConnection *connection; if (ibus->panel != NULL) { - ibus_object_destroy (IBUS_OBJECT (ibus->panel)); - /* panel should be NULL after destroy */ + ibus_proxy_destroy ((IBusProxy *) ibus->panel); + /* panel should be NULL after destroy. See _panel_destroy_cb for details. */ g_assert (ibus->panel == NULL); } @@ -523,7 +279,6 @@ _dbus_name_owner_changed_cb (BusDBusImpl *dbus, g_return_if_fail (connection != NULL); ibus->panel = bus_panel_proxy_new (connection); - g_object_ref_sink (ibus->panel); g_signal_connect (ibus->panel, "destroy", @@ -533,50 +288,20 @@ _dbus_name_owner_changed_cb (BusDBusImpl *dbus, if (ibus->focused_context != NULL) { bus_panel_proxy_focus_in (ibus->panel, ibus->focused_context); } - } - } - else if (g_strcmp0 (name, IBUS_SERVICE_CONFIG) == 0) { - if (g_strcmp0 (new_name, "") != 0) { - BusConnection *connection; - - if (ibus->config != NULL) { - ibus_object_destroy (IBUS_OBJECT (ibus->config)); - /* config should be NULL */ - g_assert (ibus->config == NULL); + else if (ibus->use_global_engine) { + bus_panel_proxy_focus_in (ibus->panel, ibus->fake_context); } - - connection = bus_dbus_impl_get_connection_by_name (BUS_DEFAULT_DBUS, new_name); - g_return_if_fail (connection != NULL); - - ibus->config = g_object_new (IBUS_TYPE_CONFIG, - "name", NULL, - "path", IBUS_PATH_CONFIG, - "connection", connection, - NULL); - g_object_ref_sink (ibus->config); - - g_signal_connect (ibus->config, - "value-changed", - G_CALLBACK (_config_value_changed_cb), - ibus); - - g_signal_connect (ibus->config, - "destroy", - G_CALLBACK (_config_destroy_cb), - ibus); - - bus_ibus_impl_set_default_preload_engines (ibus); - bus_ibus_impl_reload_config (ibus); } } - factory = bus_registry_name_owner_changed (ibus->registry, name, old_name, new_name); - - if (factory) { - bus_ibus_impl_add_factory (ibus, factory); - } + bus_registry_name_owner_changed (ibus->registry, name, old_name, new_name); } +/** + * bus_ibus_impl_init: + * + * The constructor of BusIBusImpl. Initialize all member variables of a BusIBusImpl object. + */ static void bus_ibus_impl_init (BusIBusImpl *ibus) { @@ -586,13 +311,24 @@ bus_ibus_impl_init (BusIBusImpl *ibus) NULL, (GDestroyNotify) g_object_unref); - ibus->engine_list = NULL; + ibus->fake_context = bus_input_context_new (NULL, "fake"); + g_object_ref_sink (ibus->fake_context); + bus_dbus_impl_register_object (BUS_DEFAULT_DBUS, + (IBusService *) ibus->fake_context); + bus_input_context_set_capabilities (ibus->fake_context, + IBUS_CAP_PREEDIT_TEXT | + IBUS_CAP_FOCUS | + IBUS_CAP_SURROUNDING_TEXT); + g_signal_connect (ibus->fake_context, + "engine-changed", + G_CALLBACK (_context_engine_changed_cb), + ibus); + bus_input_context_focus_in (ibus->fake_context); + ibus->register_engine_list = NULL; ibus->contexts = NULL; ibus->focused_context = NULL; ibus->panel = NULL; - ibus->config = NULL; - ibus->registry = bus_registry_new (); g_signal_connect (ibus->registry, @@ -602,21 +338,22 @@ bus_ibus_impl_init (BusIBusImpl *ibus) #ifdef G_THREADS_ENABLED extern gint g_monitor_timeout; if (g_monitor_timeout != 0) { + /* Start the monitor of registry changes. */ bus_registry_start_monitor_changes (ibus->registry); } #endif - ibus->hotkey_profile = ibus_hotkey_profile_new (); ibus->keymap = ibus_keymap_get ("us"); - ibus->use_sys_layout = FALSE; + ibus->use_sys_layout = TRUE; ibus->embed_preedit_text = TRUE; - ibus->enable_by_default = FALSE; - ibus->use_global_engine = FALSE; - ibus->global_engine = NULL; + ibus->use_global_engine = TRUE; + ibus->global_engine_name = NULL; ibus->global_previous_engine_name = NULL; - bus_ibus_impl_reload_config (ibus); + /* focus the fake_context, if use_global_engine is enabled. */ + if (ibus->use_global_engine) + bus_ibus_impl_set_focused_context (ibus, ibus->fake_context); g_signal_connect (BUS_DEFAULT_DBUS, "name-owner-changed", @@ -624,6 +361,11 @@ bus_ibus_impl_init (BusIBusImpl *ibus) ibus); } +/** + * bus_ibus_impl_destroy: + * + * The destructor of BusIBusImpl. + */ static void bus_ibus_impl_destroy (BusIBusImpl *ibus) { @@ -650,6 +392,7 @@ bus_ibus_impl_destroy (BusIBusImpl *ibus) if (flag == FALSE) { gpointer old; old = signal (SIGTERM, SIG_IGN); + /* send TERM signal to the whole process group (i.e. engines, panel, and config daemon.) */ kill (-getpid (), SIGTERM); signal (SIGTERM, old); flag = TRUE; @@ -660,14 +403,9 @@ bus_ibus_impl_destroy (BusIBusImpl *ibus) } } } - }; - - g_list_foreach (ibus->engine_list, (GFunc) g_object_unref, NULL); - g_list_free (ibus->engine_list); - ibus->engine_list = NULL; + } - g_list_foreach (ibus->register_engine_list, (GFunc) g_object_unref, NULL); - g_list_free (ibus->register_engine_list); + g_list_free_full (ibus->register_engine_list, g_object_unref); ibus->register_engine_list = NULL; if (ibus->factory_dict != NULL) { @@ -675,423 +413,285 @@ bus_ibus_impl_destroy (BusIBusImpl *ibus) ibus->factory_dict = NULL; } - if (ibus->hotkey_profile != NULL) { - g_object_unref (ibus->hotkey_profile); - ibus->hotkey_profile = NULL; - } - if (ibus->keymap != NULL) { g_object_unref (ibus->keymap); ibus->keymap = NULL; } - if (ibus->global_engine) { - g_object_unref (ibus->global_engine); - ibus->global_engine = NULL; - } + g_free (ibus->global_engine_name); + ibus->global_engine_name = NULL; g_free (ibus->global_previous_engine_name); + ibus->global_previous_engine_name = NULL; - bus_server_quit (BUS_DEFAULT_SERVER); - ibus_object_destroy ((IBusObject *) BUS_DEFAULT_SERVER); - IBUS_OBJECT_CLASS(bus_ibus_impl_parent_class)->destroy (IBUS_OBJECT (ibus)); -} + if (ibus->fake_context) { + g_object_unref (ibus->fake_context); + ibus->fake_context = NULL; + } -/* introspectable interface */ -static IBusMessage * -_ibus_introspect (BusIBusImpl *ibus, - IBusMessage *message, - BusConnection *connection) -{ - static const gchar *introspect = - DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE - "\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - "\n"; - - IBusMessage *reply_message; - reply_message = ibus_message_new_method_return (message); - ibus_message_append_args (reply_message, - G_TYPE_STRING, &introspect, - G_TYPE_INVALID); - - return reply_message; + IBUS_OBJECT_CLASS (bus_ibus_impl_parent_class)->destroy (IBUS_OBJECT (ibus)); } - - -static IBusMessage * -_ibus_get_address (BusIBusImpl *ibus, - IBusMessage *message, - BusConnection *connection) +/** + * _ibus_get_address: + * + * Implement the "GetAddress" method call of the org.freedesktop.IBus interface. + */ +static void +_ibus_get_address (BusIBusImpl *ibus, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - const gchar *address; - IBusMessage *reply; - - address = ibus_server_get_address (IBUS_SERVER (BUS_DEFAULT_SERVER)); - - reply = ibus_message_new_method_return (message); - ibus_message_append_args (reply, - G_TYPE_STRING, &address, - G_TYPE_INVALID); - - return reply; -} - -static BusEngineProxy * -bus_ibus_impl_create_engine (IBusEngineDesc *engine_desc) -{ - IBusComponent *comp; - BusFactoryProxy *factory; - BusEngineProxy *engine; - GTimeVal t1, t2; - - factory = bus_factory_proxy_get_from_engine (engine_desc); - - if (factory == NULL) { - /* try to execute the engine */ - comp = ibus_component_get_from_engine (engine_desc); - g_assert (comp); - - if (!ibus_component_is_running (comp)) { - ibus_component_start (comp, g_verbose); - g_get_current_time (&t1); - while (1) { - if (g_main_context_pending (NULL)) { - g_main_context_iteration (NULL, FALSE); - factory = bus_factory_proxy_get_from_engine (engine_desc); - if (factory != NULL) { - break; - } - } - g_get_current_time (&t2); - if (t2.tv_sec - t1.tv_sec >= 5) - break; - } - } - else { - factory = bus_factory_proxy_get_from_engine (engine_desc); - } - } - - if (factory == NULL) { - return NULL; - } - - g_object_ref (factory); - engine = bus_factory_proxy_create_engine (factory, engine_desc); - g_object_unref (factory); - - return engine; + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(s)", bus_server_get_address ())); } static IBusEngineDesc * -_find_engine_desc_by_name(BusIBusImpl *ibus, - gchar *engine_name) +_find_engine_desc_by_name (BusIBusImpl *ibus, + const gchar *engine_name) { - IBusEngineDesc *engine_desc = NULL; + IBusEngineDesc *desc = NULL; GList *p; /* find engine in registered engine list */ for (p = ibus->register_engine_list; p != NULL; p = p->next) { - engine_desc = (IBusEngineDesc *)p->data; - if (g_strcmp0 (engine_desc->name, engine_name) == 0) - return engine_desc; - } - - /* find engine in preload engine list */ - for (p = ibus->engine_list; p != NULL; p = p->next) { - engine_desc = (IBusEngineDesc *)p->data; - if (g_strcmp0 (engine_desc->name, engine_name) == 0) - return engine_desc; + desc = (IBusEngineDesc *) p->data; + if (g_strcmp0 (ibus_engine_desc_get_name (desc), engine_name) == 0) + return desc; } return NULL; } -static void +/** + * _context_request_engine_cb: + * + * A callback function to be called when the "request-engine" signal is sent to the context. + */ +static IBusEngineDesc * _context_request_engine_cb (BusInputContext *context, - gchar *engine_name, + const gchar *engine_name, BusIBusImpl *ibus) { - IBusEngineDesc *engine_desc = NULL; - BusEngineProxy *engine; + if (engine_name == NULL || engine_name[0] == '\0') + engine_name = DEFAULT_ENGINE; - /* context should has focus before request an engine */ - g_return_if_fail (bus_input_context_has_focus (context)); + return bus_ibus_impl_get_engine_desc (ibus, engine_name); +} - if (engine_name == NULL || engine_name[0] == '\0') { - /* Use global engine if possible. */ - if (ibus->use_global_engine) { - if (ibus->global_engine) { - bus_ibus_impl_set_context_engine (ibus, context, ibus->global_engine); - return; - } - else { - engine_name = bus_ibus_impl_load_global_engine_name_from_config (ibus); - if (engine_name) { - engine_desc = _find_engine_desc_by_name (ibus, engine_name); - g_free (engine_name); - } - } - } - /* request default engine */ - if (!engine_desc) { - if (ibus->register_engine_list) { - engine_desc = (IBusEngineDesc *)ibus->register_engine_list->data; - } - else if (ibus->engine_list) { - engine_desc = (IBusEngineDesc *)ibus->engine_list->data; - } - } - } - else { - /* request engine by name */ - engine_desc = _find_engine_desc_by_name (ibus, engine_name); - } +/** + * bus_ibus_impl_get_engine_desc: + * + * Get the IBusEngineDesc by engine_name. If the engine_name is NULL, return + * a default engine desc. + */ +static IBusEngineDesc * +bus_ibus_impl_get_engine_desc (BusIBusImpl *ibus, + const gchar *engine_name) +{ + g_return_val_if_fail (engine_name != NULL, NULL); + g_return_val_if_fail (engine_name[0] != '\0', NULL); - if (engine_desc != NULL) { - engine = bus_ibus_impl_create_engine (engine_desc); - if (engine != NULL) { - bus_ibus_impl_set_context_engine (ibus, context, engine); - } + IBusEngineDesc *desc = _find_engine_desc_by_name (ibus, engine_name); + if (desc == NULL) { + desc = bus_registry_find_engine_by_name (ibus->registry, engine_name); } + return desc; } static void -bus_ibus_impl_context_request_next_engine_in_menu (BusIBusImpl *ibus, - BusInputContext *context) +bus_ibus_impl_set_context_engine_from_desc (BusIBusImpl *ibus, + BusInputContext *context, + IBusEngineDesc *desc) { - BusEngineProxy *engine; - IBusEngineDesc *desc; - IBusEngineDesc *next_desc = NULL; - GList *p; + bus_input_context_set_engine_by_desc (context, + desc, + g_gdbus_timeout, /* timeout in msec. */ + NULL, /* we do not cancel the call. */ + NULL, /* use the default callback function. */ + NULL); +} + +/** + * bus_ibus_impl_set_focused_context: + * + * Set the current focused context. + */ +static void +bus_ibus_impl_set_focused_context (BusIBusImpl *ibus, + BusInputContext *context) +{ + g_assert (BUS_IS_IBUS_IMPL (ibus)); + g_assert (context == NULL || BUS_IS_INPUT_CONTEXT (context)); + g_assert (context == NULL || bus_input_context_get_capabilities (context) & IBUS_CAP_FOCUS); - engine = bus_input_context_get_engine (context); - if (engine == NULL) { - _context_request_engine_cb (context, NULL, ibus); + /* Do noting if it is focused context. */ + if (ibus->focused_context == context) { return; } - desc = bus_engine_proxy_get_desc (engine); + BusEngineProxy *engine = NULL; - p = g_list_find (ibus->register_engine_list, desc); - if (p != NULL) { - p = p->next; - } - if (p == NULL) { - p = g_list_find (ibus->engine_list, desc); - if (p != NULL) { - p = p->next; + if (ibus->focused_context) { + if (ibus->use_global_engine) { + /* dettach engine from the focused context */ + engine = bus_input_context_get_engine (ibus->focused_context); + if (engine) { + g_object_ref (engine); + bus_input_context_set_engine (ibus->focused_context, NULL); + } } - } - if (p != NULL) { - next_desc = (IBusEngineDesc*) p->data; + if (ibus->panel != NULL) + bus_panel_proxy_focus_out (ibus->panel, ibus->focused_context); + + g_object_unref (ibus->focused_context); + ibus->focused_context = NULL; } - else { - if (ibus->register_engine_list) { - next_desc = (IBusEngineDesc *)ibus->register_engine_list->data; - } - else if (ibus->engine_list) { - next_desc = (IBusEngineDesc *)ibus->engine_list->data; - } + + if (context == NULL && ibus->use_global_engine) { + context = ibus->fake_context; } - if (next_desc != NULL) { - engine = bus_ibus_impl_create_engine (next_desc); + if (context) { + ibus->focused_context = (BusInputContext *) g_object_ref (context); + /* attach engine to the focused context */ if (engine != NULL) { - bus_ibus_impl_set_context_engine (ibus, context, engine); + bus_input_context_set_engine (context, engine); + bus_input_context_enable (context); } - } -} -static void -bus_ibus_impl_context_request_previous_engine (BusIBusImpl *ibus, - BusInputContext *context) -{ - gchar *engine_name = NULL; - if (!ibus->use_global_engine) { - engine_name = (gchar *) g_object_get_data (G_OBJECT (context), "previous-engine-name"); - } - else { - if (!ibus->global_previous_engine_name) { - ibus->global_previous_engine_name = bus_ibus_impl_load_global_previous_engine_name_from_config (ibus); - } - engine_name = ibus->global_previous_engine_name; + if (ibus->panel != NULL) + bus_panel_proxy_focus_in (ibus->panel, context); } - _context_request_engine_cb (context, engine_name, ibus); + if (engine != NULL) + g_object_unref (engine); } static void -_global_engine_destroy_cb (BusEngineProxy *engine, - BusIBusImpl *ibus) +bus_ibus_impl_set_global_engine (BusIBusImpl *ibus, + BusEngineProxy *engine) { - if (ibus->global_engine != engine) { + if (!ibus->use_global_engine) return; - } - g_signal_handlers_disconnect_by_func (ibus->global_engine, - G_CALLBACK (_global_engine_destroy_cb), ibus); - g_object_unref (ibus->global_engine); - ibus->global_engine = NULL; + if (ibus->focused_context) { + bus_input_context_set_engine (ibus->focused_context, engine); + } else if (ibus->fake_context) { + bus_input_context_set_engine (ibus->fake_context, engine); + } } static void -bus_ibus_impl_set_global_engine (BusIBusImpl *ibus, - BusEngineProxy *engine) +bus_ibus_impl_set_global_engine_by_name (BusIBusImpl *ibus, + const gchar *name) { - g_assert (ibus->use_global_engine == TRUE); - - if (ibus->global_engine == engine) { + if (!ibus->use_global_engine) return; - } - g_free (ibus->global_previous_engine_name); - ibus->global_previous_engine_name = NULL; - if (ibus->global_engine) { - /* Save the current global engine's name as previous engine. */ - ibus->global_previous_engine_name = g_strdup (bus_engine_proxy_get_desc (ibus->global_engine)->name); + BusInputContext *context = + ibus->focused_context != NULL ? ibus->focused_context : ibus->fake_context; - ibus_object_destroy ((IBusObject *)ibus->global_engine); - /* global_engine should be NULL */ - g_assert (ibus->global_engine == NULL); + if (context == NULL) { + return; } - if (engine != NULL && !IBUS_OBJECT_DESTROYED (engine)) { - g_object_ref (engine); - ibus->global_engine = engine; - g_signal_connect (ibus->global_engine, "destroy", - G_CALLBACK (_global_engine_destroy_cb), ibus); + if (g_strcmp0 (name, ibus->global_engine_name) == 0) { + /* If the user requested the same global engine, then we just enable the + * original one. */ + bus_input_context_enable (context); + return; } - bus_ibus_impl_save_global_engine_name_to_config (ibus); - bus_ibus_impl_save_global_previous_engine_name_to_config (ibus); - bus_ibus_impl_global_engine_changed (ibus); -} - -static void -bus_ibus_impl_set_context_engine (BusIBusImpl *ibus, - BusInputContext *context, - BusEngineProxy *engine) { - g_object_set_data (G_OBJECT (context), "previous-engine-name", NULL); - - /* If use_global_engine is disabled, then we need to save the previous engine - * of each input context. */ - if (!ibus->use_global_engine) { - BusEngineProxy *previous_engine = bus_input_context_get_engine (context); - if (previous_engine) { - g_object_set_data_full (G_OBJECT (context), "previous-engine-name", - g_strdup (bus_engine_proxy_get_desc (previous_engine)->name), - g_free); - } - } - - bus_input_context_set_engine (context, engine); + /* If there is a focused input context, then we just change the engine of + * the focused context, which will then change the global engine + * automatically. Otherwise, we need to change the global engine directly. + */ + IBusEngineDesc *desc = NULL; + desc = bus_ibus_impl_get_engine_desc (ibus, name); + if (desc != NULL) { + bus_ibus_impl_set_context_engine_from_desc (ibus, + context, + desc); + } } +/* When preload_engines and register_engiens are changed, this function + * will check the global engine. If necessay, it will change the global engine. + */ static void -_context_engine_changed_cb (BusInputContext *context, - BusIBusImpl *ibus) +bus_ibus_impl_check_global_engine (BusIBusImpl *ibus) { - BusEngineProxy *engine; + GList *engine_list = NULL; - if (context != ibus->focused_context || !ibus->use_global_engine) { + /* do nothing */ + if (!ibus->use_global_engine) return; - } - engine = bus_input_context_get_engine (context); - if (engine != NULL) { - /* only set global engine if engine is not NULL */ - bus_ibus_impl_set_global_engine (ibus, engine); + /* The current global engine is not removed, so do nothing. */ + if (ibus->global_engine_name != NULL && + _find_engine_desc_by_name (ibus, ibus->global_engine_name)) { + return; } -} -static void -_context_focus_out_cb (BusInputContext *context, - BusIBusImpl *ibus) -{ - g_assert (BUS_IS_IBUS_IMPL (ibus)); - g_assert (BUS_IS_INPUT_CONTEXT (context)); - - /* Do noting if context does not support focus. - * Actually, the context should emit focus signals, if it does not support focus */ - if ((bus_input_context_get_capabilities (context) & IBUS_CAP_FOCUS) == 0) { + /* If the previous engine is available, then just switch to it. */ + if (ibus->global_previous_engine_name != NULL && + _find_engine_desc_by_name (ibus, ibus->global_previous_engine_name)) { + bus_ibus_impl_set_global_engine_by_name ( + ibus, ibus->global_previous_engine_name); return; } - /* Do noting if it is not focused context. */ - if (ibus->focused_context != context) { + /* Just switch to the fist engine in the list. */ + engine_list = ibus->register_engine_list; + + if (engine_list) { + IBusEngineDesc *engine_desc = (IBusEngineDesc *)engine_list->data; + bus_ibus_impl_set_global_engine_by_name (ibus, + ibus_engine_desc_get_name (engine_desc)); return; } - ibus->focused_context = NULL; + /* No engine available? Just disable global engine. */ + bus_ibus_impl_set_global_engine (ibus, NULL); +} - if (ibus->panel != NULL) { - bus_panel_proxy_focus_out (ibus->panel, context); - } +/** + * _context_engine_changed_cb: + * + * A callback function to be called when the "engine-changed" signal is sent to the context. + * Update global engine as well if necessary. + */ +static void +_context_engine_changed_cb (BusInputContext *context, + BusIBusImpl *ibus) +{ + if (!ibus->use_global_engine) + return; - /* If the use_global_engine option is enabled, - * the global engine shoule be detached from the focused context. */ - if (ibus->use_global_engine) { - bus_ibus_impl_set_context_engine (ibus, context, NULL); + if ((context == ibus->focused_context) || + (ibus->focused_context == NULL && context == ibus->fake_context)) { + BusEngineProxy *engine = bus_input_context_get_engine (context); + if (engine != NULL) { + /* only set global engine if engine is not NULL */ + const gchar *name = ibus_engine_desc_get_name (bus_engine_proxy_get_desc (engine)); + if (g_strcmp0 (name, ibus->global_engine_name) == 0) + return; + g_free (ibus->global_previous_engine_name); + ibus->global_previous_engine_name = ibus->global_engine_name; + ibus->global_engine_name = g_strdup (name); + bus_ibus_impl_global_engine_changed (ibus); + } } - - g_object_unref (context); } +/** + * _context_focus_in_cb: + * + * A callback function to be called when the "focus-in" signal is sent to the context. + * If necessary, enables the global engine on the context and update ibus->focused_context. + */ static void _context_focus_in_cb (BusInputContext *context, BusIBusImpl *ibus) @@ -1105,119 +705,90 @@ _context_focus_in_cb (BusInputContext *context, return; } - /* Do nothing if it is focused context already. */ - if (ibus->focused_context == context) { - return; - } - - if (ibus->focused_context) { - /* focus out context */ - bus_input_context_focus_out (ibus->focused_context); - g_assert (ibus->focused_context == NULL); - } - - /* If the use_global_engine option is enabled, then we need: - * - Switch the context to use the global engine or save the context's - * existing engine as global engine. - * - Set the context's enabled state according to the saved state. - * Note: we get this signal only if the context supports IBUS_CAP_FOCUS. */ - if (ibus->use_global_engine) { - if (!ibus->global_engine) { - bus_ibus_impl_set_global_engine (ibus, bus_input_context_get_engine (context)); - } - else { - bus_ibus_impl_set_context_engine (ibus, context, ibus->global_engine); - if (ibus->global_engine && bus_engine_proxy_is_enabled (ibus->global_engine)) { - bus_input_context_enable (context); - } - } - } - - if (ibus->panel != NULL) { - bus_panel_proxy_focus_in (ibus->panel, context); - } - - g_object_ref (context); - ibus->focused_context = context; + bus_ibus_impl_set_focused_context (ibus, context); } +/** + * _context_focus_out_cb: + * + * A callback function to be called when the "focus-out" signal is sent to the context. + */ static void -_context_destroy_cb (BusInputContext *context, - BusIBusImpl *ibus) +_context_focus_out_cb (BusInputContext *context, + BusIBusImpl *ibus) { g_assert (BUS_IS_IBUS_IMPL (ibus)); g_assert (BUS_IS_INPUT_CONTEXT (context)); - if (context == ibus->focused_context) { - /* focus out context */ - bus_input_context_focus_out (ibus->focused_context); - g_assert (ibus->focused_context == NULL); + /* Do noting if context does not support focus. + * Actually, the context should emit focus signals, if it does not support focus */ + if ((bus_input_context_get_capabilities (context) & IBUS_CAP_FOCUS) == 0) { + return; } - ibus->contexts = g_list_remove (ibus->contexts, context); - g_object_unref (context); -} + /* Do noting if it is not focused context. */ + if (ibus->focused_context != context) { + return; + } -#if 0 -static void -_context_enabled_cb (BusInputContext *context, - BusIBusImpl *ibus) -{ -} -static void -_context_disabled_cb (BusInputContext *context, - BusIBusImpl *ibus) -{ + if (ibus->use_global_engine == FALSE) { + /* Do not change the focused context, if use_global_engine option is enabled. + * If focused context swith to NULL, users can not swith engine in panel anymore. + **/ + bus_ibus_impl_set_focused_context (ibus, NULL); + } } -#endif -static IBusMessage * -_ibus_create_input_context (BusIBusImpl *ibus, - IBusMessage *message, - BusConnection *connection) +/** + * _context_destroy_cb: + * + * A callback function to be called when the "destroy" signal is sent to the context. + */ +static void +_context_destroy_cb (BusInputContext *context, + BusIBusImpl *ibus) { g_assert (BUS_IS_IBUS_IMPL (ibus)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); + g_assert (BUS_IS_INPUT_CONTEXT (context)); - gint i; - gchar *client; - IBusError *error; - IBusMessage *reply; - BusInputContext *context; - const gchar *path; - - if (!ibus_message_get_args (message, - &error, - G_TYPE_STRING, &client, - G_TYPE_INVALID)) { - reply = ibus_message_new_error (message, - DBUS_ERROR_INVALID_ARGS, - "Argument 1 of CreateInputContext should be an string"); - ibus_error_free (error); - return reply; + if (context == ibus->focused_context) { + bus_ibus_impl_set_focused_context (ibus, NULL); } - context = bus_input_context_new (connection, client); + ibus->contexts = g_list_remove (ibus->contexts, context); + g_object_unref (context); +} + +/** + * bus_ibus_impl_create_input_context: + * @client: A name of a client. e.g. "gtk-im" + * @returns: A BusInputContext object. + * + * Create a new BusInputContext object for the client. + */ +static BusInputContext * +bus_ibus_impl_create_input_context (BusIBusImpl *ibus, + BusConnection *connection, + const gchar *client) +{ + BusInputContext *context = bus_input_context_new (connection, client); g_object_ref_sink (context); ibus->contexts = g_list_append (ibus->contexts, context); + /* Installs glib signal handlers so that the ibus object could be notified when e.g. an IBus.InputContext D-Bus method is called. */ static const struct { gchar *name; GCallback callback; } signals [] = { - { "request-engine", G_CALLBACK (_context_request_engine_cb) }, + { "request-engine", G_CALLBACK (_context_request_engine_cb) }, { "engine-changed", G_CALLBACK (_context_engine_changed_cb) }, { "focus-in", G_CALLBACK (_context_focus_in_cb) }, { "focus-out", G_CALLBACK (_context_focus_out_cb) }, { "destroy", G_CALLBACK (_context_destroy_cb) }, - #if 0 - { "enabled", G_CALLBACK (_context_enabled_cb) }, - { "disabled", G_CALLBACK (_context_disabled_cb) }, - #endif }; + gint i; for (i = 0; i < G_N_ELEMENTS (signals); i++) { g_signal_connect (context, signals[i].name, @@ -1225,489 +796,504 @@ _ibus_create_input_context (BusIBusImpl *ibus, ibus); } - if (ibus->enable_by_default) { - bus_input_context_enable (context); - } - - path = ibus_service_get_path ((IBusService *) context); - reply = ibus_message_new_method_return (message); - ibus_message_append_args (reply, - IBUS_TYPE_OBJECT_PATH, &path, - G_TYPE_INVALID); + bus_input_context_enable (context); + /* register the context object so that the object could handle IBus.InputContext method calls. */ bus_dbus_impl_register_object (BUS_DEFAULT_DBUS, - (IBusService *)context); - return reply; + (IBusService *) context); + g_object_ref (context); + return context; } -static IBusMessage * -_ibus_current_input_context (BusIBusImpl *ibus, - IBusMessage *message, - BusConnection *connection) +/** + * _ibus_create_input_context: + * + * Implement the "CreateInputContext" method call of the org.freedesktop.IBus interface. + */ +static void +_ibus_create_input_context (BusIBusImpl *ibus, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (BUS_IS_IBUS_IMPL (ibus)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); - - IBusMessage *reply; - const gchar *path; + const gchar *client_name = NULL; // e.g. "gtk-im" + g_variant_get (parameters, "(&s)", &client_name); + + BusConnection *connection = + bus_connection_lookup (g_dbus_method_invocation_get_connection (invocation)); + BusInputContext *context = + bus_ibus_impl_create_input_context (ibus, + connection, + client_name); + if (context) { + const gchar *path = ibus_service_get_object_path ((IBusService *) context); + /* the format-string 'o' is for a D-Bus object path. */ + g_dbus_method_invocation_return_value (invocation, g_variant_new ("(o)", path)); + g_object_unref (context); + } + else { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, + G_DBUS_ERROR_FAILED, + "Create input context failed!"); + } +} +/** + * _ibus_current_input_context: + * + * Implement the "CurrentInputContext" method call of the org.freedesktop.IBus interface. + */ +static void +_ibus_current_input_context (BusIBusImpl *ibus, + GVariant *parameters, + GDBusMethodInvocation *invocation) +{ if (!ibus->focused_context) { - reply = ibus_message_new_error (message, - DBUS_ERROR_FAILED, - "No input context focused"); - return reply; + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "No focused input context"); + } + else { + const gchar *path = ibus_service_get_object_path ((IBusService *) ibus->focused_context); + /* the format-string 'o' is for a D-Bus object path. */ + g_dbus_method_invocation_return_value (invocation, g_variant_new ("(o)", path)); } - - reply = ibus_message_new_method_return (message); - path = ibus_service_get_path((IBusService *)ibus->focused_context); - ibus_message_append_args (reply, - IBUS_TYPE_OBJECT_PATH, &path, - G_TYPE_INVALID); - - return reply; } static void -_factory_destroy_cb (BusFactoryProxy *factory, - BusIBusImpl *ibus) +_component_destroy_cb (BusComponent *component, + BusIBusImpl *ibus) { g_assert (BUS_IS_IBUS_IMPL (ibus)); - g_assert (BUS_IS_FACTORY_PROXY (factory)); - - IBusComponent *component; - GList *engines, *p; - - ibus->factory_list = g_list_remove (ibus->factory_list, factory); + g_assert (BUS_IS_COMPONENT (component)); - component = bus_factory_proxy_get_component (factory); + ibus->registered_components = g_list_remove (ibus->registered_components, component); - if (component != NULL) { - p = engines = ibus_component_get_engines (component); - for (; p != NULL; p = p->next) { - if (g_list_find (ibus->register_engine_list, p->data)) { - ibus->register_engine_list = g_list_remove (ibus->register_engine_list, p->data); - g_object_unref (p->data); - } + /* remove engines from engine_list */ + GList *engines = bus_component_get_engines (component); + GList *p; + for (p = engines; p != NULL; p = p->next) { + if (g_list_find (ibus->register_engine_list, p->data)) { + ibus->register_engine_list = g_list_remove (ibus->register_engine_list, p->data); + g_object_unref (p->data); } - g_list_free (engines); } + g_list_free (engines); - g_object_unref (factory); -} - -static void -bus_ibus_impl_add_factory (BusIBusImpl *ibus, - BusFactoryProxy *factory) -{ - g_assert (BUS_IS_IBUS_IMPL (ibus)); - g_assert (BUS_IS_FACTORY_PROXY (factory)); - - g_object_ref_sink (factory); - ibus->factory_list = g_list_append (ibus->factory_list, factory); + g_object_unref (component); - g_signal_connect (factory, "destroy", G_CALLBACK (_factory_destroy_cb), ibus); + bus_ibus_impl_check_global_engine (ibus); } - -static IBusMessage * -_ibus_register_component (BusIBusImpl *ibus, - IBusMessage *message, - BusConnection *connection) +/** + * _ibus_register_component: + * + * Implement the "RegisterComponent" method call of the org.freedesktop.IBus interface. + */ +static void +_ibus_register_component (BusIBusImpl *ibus, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - IBusMessage *reply; - IBusError *error; - gboolean retval; - GList *engines; - IBusComponent *component; - BusFactoryProxy *factory; - - retval = ibus_message_get_args (message, &error, - IBUS_TYPE_COMPONENT, &component, - G_TYPE_INVALID); - - if (!retval) { - reply = ibus_message_new_error_printf (message, - DBUS_ERROR_INVALID_ARGS, - "1st Argument must be IBusComponent: %s", - error->message); - ibus_error_free (error); - return reply; + GVariant *variant = g_variant_get_child_value (parameters, 0); + IBusComponent *component = (IBusComponent *) ibus_serializable_deserialize (variant); + + if (!IBUS_IS_COMPONENT (component)) { + if (component) + g_object_unref (component); + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "The first argument should be an IBusComponent."); + return; } - g_object_ref_sink (component); - factory = bus_factory_proxy_new (component, connection); + BusConnection *connection = bus_connection_lookup (g_dbus_method_invocation_get_connection (invocation)); + BusFactoryProxy *factory = bus_factory_proxy_new (connection); if (factory == NULL) { - reply = ibus_message_new_error (message, - DBUS_ERROR_FAILED, - "Can not create factory"); - return reply; + g_object_unref (component); + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Create factory failed."); + return; } - bus_ibus_impl_add_factory (ibus, factory); + g_object_ref_sink (component); - engines = ibus_component_get_engines (component); + BusComponent *buscomp = bus_component_new (component, factory); + bus_component_set_destroy_with_factory (buscomp, TRUE); + g_object_unref (component); + g_object_unref (factory); + ibus->registered_components = g_list_append (ibus->registered_components, + g_object_ref_sink (buscomp)); + GList *engines = bus_component_get_engines (buscomp); g_list_foreach (engines, (GFunc) g_object_ref, NULL); - ibus->register_engine_list = g_list_concat (ibus->register_engine_list, engines); - g_object_unref (component); + ibus->register_engine_list = g_list_concat (ibus->register_engine_list, + engines); + + g_signal_connect (buscomp, "destroy", G_CALLBACK (_component_destroy_cb), ibus); - reply = ibus_message_new_method_return (message); - return reply; + g_dbus_method_invocation_return_value (invocation, NULL); } -static IBusMessage * -_ibus_list_engines (BusIBusImpl *ibus, - IBusMessage *message, - BusConnection *connection) +/** + * _ibus_list_engines: + * + * Implement the "ListEngines" method call of the org.freedesktop.IBus interface. + */ +static void +_ibus_list_engines (BusIBusImpl *ibus, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - IBusMessage *reply; - IBusMessageIter iter, sub_iter; - GList *engines, *p; - - reply = ibus_message_new_method_return (message); + GVariantBuilder builder; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("av")); - ibus_message_iter_init_append (reply, &iter); - ibus_message_iter_open_container (&iter, IBUS_TYPE_ARRAY, "v", &sub_iter); - - engines = bus_registry_get_engines (ibus->registry); + GList *engines = bus_registry_get_engines (ibus->registry); + GList *p; for (p = engines; p != NULL; p = p->next) { - ibus_message_iter_append (&sub_iter, IBUS_TYPE_ENGINE_DESC, &(p->data)); + g_variant_builder_add (&builder, "v", ibus_serializable_serialize ((IBusSerializable *) p->data)); } g_list_free (engines); - ibus_message_iter_close_container (&iter, &sub_iter); - - return reply; + g_dbus_method_invocation_return_value (invocation, g_variant_new ("(av)", &builder)); } -static IBusMessage * -_ibus_list_active_engines (BusIBusImpl *ibus, - IBusMessage *message, - BusConnection *connection) +/** + * _ibus_get_engines_by_names: + * + * Implement the "GetEnginesByNames" method call of the org.freedesktop.IBus interface. + */ +static void +_ibus_get_engines_by_names (BusIBusImpl *ibus, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - IBusMessage *reply; - IBusMessageIter iter, sub_iter; - GList *p; - - reply = ibus_message_new_method_return (message); - - ibus_message_iter_init_append (reply, &iter); - ibus_message_iter_open_container (&iter, IBUS_TYPE_ARRAY, "v", &sub_iter); + const gchar **names = NULL; + g_variant_get (parameters, "(^a&s)", &names); + + g_assert (names != NULL); + + gint i = 0; + GVariantBuilder builder; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("av")); + while (names[i] != NULL) { + IBusEngineDesc *desc = bus_registry_find_engine_by_name ( + ibus->registry, names[i++]); + if (desc == NULL) + continue; + g_variant_builder_add ( + &builder, + "v", + ibus_serializable_serialize ((IBusSerializable *)desc)); + } + g_dbus_method_invocation_return_value (invocation, g_variant_new ("(av)", &builder)); +} - for (p = ibus->engine_list; p != NULL; p = p->next) { - ibus_message_iter_append (&sub_iter, IBUS_TYPE_ENGINE_DESC, &(p->data)); - } +/** + * _ibus_list_active_engines: + * + * Implement the "ListActiveEngines" method call of the org.freedesktop.IBus interface. + */ +static void +_ibus_list_active_engines (BusIBusImpl *ibus, + GVariant *parameters, + GDBusMethodInvocation *invocation) +{ + GVariantBuilder builder; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("av")); + GList *p; for (p = ibus->register_engine_list; p != NULL; p = p->next) { - ibus_message_iter_append (&sub_iter, IBUS_TYPE_ENGINE_DESC, &(p->data)); + g_variant_builder_add (&builder, "v", ibus_serializable_serialize ((IBusSerializable *) p->data)); } - ibus_message_iter_close_container (&iter, &sub_iter); - - return reply; + g_dbus_method_invocation_return_value (invocation, g_variant_new ("(av)", &builder)); } - -static IBusMessage * -_ibus_exit (BusIBusImpl *ibus, - IBusMessage *message, - BusConnection *connection) +/** + * _ibus_exit: + * + * Implement the "Exit" method call of the org.freedesktop.IBus interface. + */ +static void +_ibus_exit (BusIBusImpl *ibus, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - IBusMessage *reply; - IBusError *error; - gboolean restart; - - if (!ibus_message_get_args (message, - &error, - G_TYPE_BOOLEAN, &restart, - G_TYPE_INVALID)) { - reply = ibus_message_new_error (message, - DBUS_ERROR_INVALID_ARGS, - "Argument 1 of Exit should be an boolean"); - ibus_error_free (error); - return reply; - } - - reply = ibus_message_new_method_return (message); - ibus_connection_send ((IBusConnection *) connection, reply); - ibus_connection_flush ((IBusConnection *) connection); - ibus_message_unref (reply); - - ibus_object_destroy ((IBusObject *) BUS_DEFAULT_SERVER); - - if (!restart) { - exit (0); - } - else { - extern gchar **g_argv; - gchar *exe; - gint fd; - - exe = g_strdup_printf ("/proc/%d/exe", getpid ()); - exe = g_file_read_link (exe, NULL); - - if (exe == NULL) - exe = BINDIR"/ibus-daemon"; - - /* close all fds except stdin, stdout, stderr */ - for (fd = 3; fd <= sysconf (_SC_OPEN_MAX); fd ++) { - close (fd); - } - - execv (exe, g_argv); + gboolean restart = FALSE; + g_variant_get (parameters, "(b)", &restart); - /* If the server binary is replaced while the server is running, - * "readlink /proc/[pid]/exe" might return a path with " (deleted)" - * suffix. */ - const gchar suffix[] = " (deleted)"; - if (g_str_has_suffix (exe, suffix)) { - exe [strlen (exe) - sizeof (suffix) + 1] = '\0'; - execv (exe, g_argv); - } - g_warning ("execv %s failed!", g_argv[0]); - exit (-1); - } + g_dbus_method_invocation_return_value (invocation, NULL); - /* should not reach here */ - g_assert_not_reached (); + /* Make sure the reply has been sent out before exit */ + g_dbus_connection_flush_sync (g_dbus_method_invocation_get_connection (invocation), + NULL, + NULL); - return NULL; + bus_server_quit (restart); } -static IBusMessage * -_ibus_ping (BusIBusImpl *ibus, - IBusMessage *message, - BusConnection *connection) +/** + * _ibus_ping: + * + * Implement the "Ping" method call of the org.freedesktop.IBus interface. + */ +static void +_ibus_ping (BusIBusImpl *ibus, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - IBusMessage *reply; - IBusMessageIter src, dst; - - reply = ibus_message_new_method_return (message); - - ibus_message_iter_init (message, &src); - ibus_message_iter_init_append (reply, &dst); + g_dbus_method_invocation_return_value (invocation, parameters); +} - ibus_message_iter_copy_data (&dst, &src); +/** + * _ibus_get_use_sys_layout: + * + * Implement the "GetUseSysLayout" method call of the org.freedesktop.IBus interface. + */ +static void +_ibus_get_use_sys_layout (BusIBusImpl *ibus, + GVariant *parameters, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(b)", ibus->use_sys_layout)); +} - return reply; +/** + * _ibus_get_use_global_engine: + * + * Implement the "GetUseGlobalEngine" method call of the org.freedesktop.IBus interface. + */ +static void +_ibus_get_use_global_engine (BusIBusImpl *ibus, + GVariant *parameters, + GDBusMethodInvocation *invocation) +{ + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(b)", ibus->use_global_engine)); } -static IBusMessage * -_ibus_get_use_sys_layout (BusIBusImpl *ibus, - IBusMessage *message, - BusConnection *connection) +/** + * _ibus_get_global_engine: + * + * Implement the "GetGlobalEngine" method call of the org.freedesktop.IBus interface. + */ +static void +_ibus_get_global_engine (BusIBusImpl *ibus, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - IBusMessage *reply; + IBusEngineDesc *desc = NULL; - reply = ibus_message_new_method_return (message); - ibus_message_append_args (reply, - G_TYPE_BOOLEAN, &ibus->use_sys_layout, - G_TYPE_INVALID); + do { + if (!ibus->use_global_engine) + break; + BusInputContext *context = ibus->focused_context; + if (context == NULL) + context = ibus->fake_context; - return reply; -} + desc = bus_input_context_get_engine_desc (context); -static IBusMessage * -_ibus_get_use_global_engine (BusIBusImpl *ibus, - IBusMessage *message, - BusConnection *connection) -{ - IBusMessage *reply; + if (desc == NULL) + break; - reply = ibus_message_new_method_return (message); - ibus_message_append_args (reply, - G_TYPE_BOOLEAN, &ibus->use_global_engine, - G_TYPE_INVALID); + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *) desc); + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(v)", variant)); + return; + } while (0); - return reply; + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "No global engine."); } -static IBusMessage * -_ibus_get_global_engine (BusIBusImpl *ibus, - IBusMessage *message, - BusConnection *connection) +struct _SetGlobalEngineData { + BusIBusImpl *ibus; + GDBusMethodInvocation *invocation; +}; +typedef struct _SetGlobalEngineData SetGlobalEngineData; + +static void +_ibus_set_global_engine_ready_cb (BusInputContext *context, + GAsyncResult *res, + SetGlobalEngineData *data) { - IBusMessage *reply; - - if (ibus->use_global_engine && ibus->global_engine) { - IBusEngineDesc *desc = bus_engine_proxy_get_desc (ibus->global_engine); - if (desc != NULL) { - reply = ibus_message_new_method_return (message); - ibus_message_append_args (reply, - IBUS_TYPE_ENGINE_DESC, &desc, - G_TYPE_INVALID); - return reply; + BusIBusImpl *ibus = data->ibus; + + GError *error = NULL; + if (!bus_input_context_set_engine_by_desc_finish (context, res, &error)) { + g_error_free (error); + g_dbus_method_invocation_return_error (data->invocation, + G_DBUS_ERROR, + G_DBUS_ERROR_FAILED, + "Set global engine failed."); + + } + else { + g_dbus_method_invocation_return_value (data->invocation, NULL); + + if (ibus->use_global_engine && (context != ibus->focused_context)) { + /* context and ibus->focused_context don't match. This means that + * the focus is moved before _ibus_set_global_engine() asynchronous + * call finishes. In this case, the engine for the context currently + * being focused hasn't been updated. Update the engine here so that + * subsequent _ibus_get_global_engine() call could return a + * consistent engine name. */ + BusEngineProxy *engine = bus_input_context_get_engine (context); + if (engine && ibus->focused_context != NULL) { + g_object_ref (engine); + bus_input_context_set_engine (context, NULL); + bus_input_context_set_engine (ibus->focused_context, engine); + g_object_unref (engine); + } } } - reply = ibus_message_new_error (message, DBUS_ERROR_FAILED, - "No global engine."); - return reply; + g_object_unref (ibus); + g_slice_free (SetGlobalEngineData, data); } -static IBusMessage * -_ibus_set_global_engine (BusIBusImpl *ibus, - IBusMessage *message, - BusConnection *connection) +/** + * _ibus_set_global_engine: + * + * Implement the "SetGlobalEngine" method call of the org.freedesktop.IBus interface. + */ +static void +_ibus_set_global_engine (BusIBusImpl *ibus, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - gboolean retval; - IBusMessage *reply; - IBusError *error; - gchar *new_engine_name; - gchar *old_engine_name; - if (!ibus->use_global_engine) { - reply = ibus_message_new_error (message, DBUS_ERROR_FAILED, - "Global engine feature is disable."); - return reply; - } - - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, &new_engine_name, - G_TYPE_INVALID); - if (!retval) { - reply = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); - return reply; + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Global engine feature is disabled."); + return; } - reply = ibus_message_new_method_return (message); - old_engine_name = NULL; - - if (ibus->global_engine) { - old_engine_name = bus_engine_proxy_get_desc (ibus->global_engine)->name; - } + BusInputContext *context = ibus->focused_context; + if (context == NULL) + context = ibus->fake_context; - if (g_strcmp0 (new_engine_name, old_engine_name) == 0) { - /* If the user requested the same global engine, then we just enable the - * original one. */ - if (ibus->focused_context) { - bus_input_context_enable (ibus->focused_context); - } - else if (ibus->global_engine) { - bus_engine_proxy_enable (ibus->global_engine); - } - return reply; - } + const gchar *engine_name = NULL; + g_variant_get (parameters, "(&s)", &engine_name); - /* If there is a focused input context, then we just change the engine of - * the focused context, which will then change the global engine - * automatically. Otherwise, we need to change the global engine directly. - */ - if (ibus->focused_context) { - _context_request_engine_cb (ibus->focused_context, new_engine_name, ibus); - } - else { - IBusEngineDesc *engine_desc = _find_engine_desc_by_name (ibus, new_engine_name); - if (engine_desc != NULL) { - BusEngineProxy *new_engine = bus_ibus_impl_create_engine (engine_desc); - if (new_engine != NULL) { - /* Enable the global engine by default, because the user - * selected it explicitly. */ - bus_engine_proxy_enable (new_engine); - - /* Assume the ownership of the new global engine. Normally it's - * done by the input context. But as we need to change the global - * engine directly, so we need to do it here. */ - g_object_ref_sink (new_engine); - bus_ibus_impl_set_global_engine (ibus, new_engine); - - /* The global engine should already be referenced. */ - g_object_unref (new_engine); - } - } + IBusEngineDesc *desc = bus_ibus_impl_get_engine_desc(ibus, engine_name); + if (desc == NULL) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, + G_DBUS_ERROR_FAILED, + "Can not find engine %s.", + engine_name); + return; } - return reply; + SetGlobalEngineData *data = g_slice_new0 (SetGlobalEngineData); + data->ibus = g_object_ref (ibus); + data->invocation = invocation; + bus_input_context_set_engine_by_desc (context, + desc, + g_gdbus_timeout, /* timeout in msec. */ + NULL, /* we do not cancel the call. */ + (GAsyncReadyCallback) _ibus_set_global_engine_ready_cb, + data); } -static IBusMessage * -_ibus_is_global_engine_enabled (BusIBusImpl *ibus, - IBusMessage *message, - BusConnection *connection) +/** + * _ibus_is_global_engine_enabled: + * + * Implement the "IsGlobalEngineEnabled" method call of the org.freedesktop.IBus interface. + */ +static void +_ibus_is_global_engine_enabled (BusIBusImpl *ibus, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - IBusMessage *reply; - gboolean enabled = (ibus->use_global_engine && ibus->global_engine && - bus_engine_proxy_is_enabled (ibus->global_engine)); - - reply = ibus_message_new_method_return (message); - ibus_message_append_args (reply, - G_TYPE_BOOLEAN, &enabled, - G_TYPE_INVALID); - return reply; -} + gboolean enabled = FALSE; + do { + if (!ibus->use_global_engine) + break; -static gboolean -bus_ibus_impl_ibus_message (BusIBusImpl *ibus, - BusConnection *connection, - IBusMessage *message) -{ - g_assert (BUS_IS_IBUS_IMPL (ibus)); - g_assert (BUS_IS_CONNECTION (connection)); - g_assert (message != NULL); + BusInputContext *context = ibus->focused_context; + if (context == NULL) + context = ibus->fake_context; + if (context == NULL) + break; - gint i; - IBusMessage *reply_message = NULL; + enabled = TRUE; + } while (0); + + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(b)", enabled)); +} + +/** + * bus_ibus_impl_service_method_call: + * + * Handle a D-Bus method call whose destination and interface name are both "org.freedesktop.IBus" + */ +static void +bus_ibus_impl_service_method_call (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation) +{ + if (g_strcmp0 (interface_name, "org.freedesktop.IBus") != 0) { + IBUS_SERVICE_CLASS (bus_ibus_impl_parent_class)->service_method_call ( + service, connection, sender, object_path, interface_name, method_name, + parameters, invocation); + return; + } + /* all methods in the xml definition above should be listed here. */ static const struct { - const gchar *interface; - const gchar *name; - IBusMessage *(* handler) (BusIBusImpl *, IBusMessage *, BusConnection *); - } handlers[] = { - /* Introspectable interface */ - { DBUS_INTERFACE_INTROSPECTABLE, - "Introspect", _ibus_introspect }, + const gchar *method_name; + void (* method_callback) (BusIBusImpl *, GVariant *, GDBusMethodInvocation *); + } methods [] = { /* IBus interface */ - { IBUS_INTERFACE_IBUS, "GetAddress", _ibus_get_address }, - { IBUS_INTERFACE_IBUS, "CreateInputContext", _ibus_create_input_context }, - { IBUS_INTERFACE_IBUS, "CurrentInputContext", _ibus_current_input_context }, - { IBUS_INTERFACE_IBUS, "RegisterComponent", _ibus_register_component }, - { IBUS_INTERFACE_IBUS, "ListEngines", _ibus_list_engines }, - { IBUS_INTERFACE_IBUS, "ListActiveEngines", _ibus_list_active_engines }, - { IBUS_INTERFACE_IBUS, "Exit", _ibus_exit }, - { IBUS_INTERFACE_IBUS, "Ping", _ibus_ping }, - { IBUS_INTERFACE_IBUS, "GetUseSysLayout", _ibus_get_use_sys_layout }, - { IBUS_INTERFACE_IBUS, "GetUseGlobalEngine", _ibus_get_use_global_engine }, - { IBUS_INTERFACE_IBUS, "GetGlobalEngine", _ibus_get_global_engine }, - { IBUS_INTERFACE_IBUS, "SetGlobalEngine", _ibus_set_global_engine }, - { IBUS_INTERFACE_IBUS, "IsGlobalEngineEnabled", _ibus_is_global_engine_enabled }, + { "GetAddress", _ibus_get_address }, + { "CreateInputContext", _ibus_create_input_context }, + { "CurrentInputContext", _ibus_current_input_context }, + { "RegisterComponent", _ibus_register_component }, + { "ListEngines", _ibus_list_engines }, + { "GetEnginesByNames", _ibus_get_engines_by_names }, + { "ListActiveEngines", _ibus_list_active_engines }, + { "Exit", _ibus_exit }, + { "Ping", _ibus_ping }, + { "GetUseSysLayout", _ibus_get_use_sys_layout }, + { "GetUseGlobalEngine", _ibus_get_use_global_engine }, + { "GetGlobalEngine", _ibus_get_global_engine }, + { "SetGlobalEngine", _ibus_set_global_engine }, + { "IsGlobalEngineEnabled", _ibus_is_global_engine_enabled }, }; - ibus_message_set_sender (message, bus_connection_get_unique_name (connection)); - ibus_message_set_destination (message, DBUS_SERVICE_DBUS); - - if (ibus_message_get_type (message) == DBUS_MESSAGE_TYPE_METHOD_CALL) { - for (i = 0; i < G_N_ELEMENTS (handlers); i++) { - if (ibus_message_is_method_call (message, - handlers[i].interface, - handlers[i].name)) { - - reply_message = handlers[i].handler (ibus, message, connection); - if (reply_message) { + gint i; + for (i = 0; i < G_N_ELEMENTS (methods); i++) { + if (g_strcmp0 (methods[i].method_name, method_name) == 0) { + methods[i].method_callback ((BusIBusImpl *) service, parameters, invocation); + return; + } + } - ibus_message_set_sender (reply_message, DBUS_SERVICE_DBUS); - ibus_message_set_destination (reply_message, bus_connection_get_unique_name (connection)); - ibus_message_set_no_reply (reply_message, TRUE); + /* notreached - unknown method calls that are not in the introspection_xml should be handled by the GDBus library. */ + g_return_if_reached (); +} - ibus_connection_send ((IBusConnection *) connection, reply_message); - ibus_message_unref (reply_message); - } +BusIBusImpl * +bus_ibus_impl_get_default (void) +{ + static BusIBusImpl *ibus = NULL; - g_signal_stop_emission_by_name (ibus, "ibus-message"); - return TRUE; - } - } + if (ibus == NULL) { + ibus = (BusIBusImpl *) g_object_new (BUS_TYPE_IBUS_IMPL, + "object-path", IBUS_PATH_IBUS, + NULL); } - - return IBUS_SERVICE_CLASS(bus_ibus_impl_parent_class)->ibus_message ( - (IBusService *) ibus, - (IBusConnection *) connection, - message); + return ibus; } BusFactoryProxy * @@ -1723,14 +1309,6 @@ bus_ibus_impl_lookup_factory (BusIBusImpl *ibus, return factory; } -IBusHotkeyProfile * -bus_ibus_impl_get_hotkey_profile (BusIBusImpl *ibus) -{ - g_assert (BUS_IS_IBUS_IMPL (ibus)); - - return ibus->hotkey_profile; -} - IBusKeymap * bus_ibus_impl_get_keymap (BusIBusImpl *ibus) { @@ -1749,161 +1327,62 @@ bus_ibus_impl_get_registry (BusIBusImpl *ibus) return ibus->registry; } +/** + * bus_ibus_impl_emit_signal: + * + * Send a D-Bus signal to buses (connections) that are listening to the signal. + */ static void -bus_ibus_impl_registry_changed (BusIBusImpl *ibus) +bus_ibus_impl_emit_signal (BusIBusImpl *ibus, + const gchar *signal_name, + GVariant *parameters) { - g_assert (BUS_IS_IBUS_IMPL (ibus)); - - IBusMessage *message; - - message = ibus_message_new_signal (IBUS_PATH_IBUS, - IBUS_INTERFACE_IBUS, - "RegistryChanged"); - ibus_message_append_args (message, - G_TYPE_INVALID); - ibus_message_set_sender (message, IBUS_SERVICE_IBUS); - + GDBusMessage *message = g_dbus_message_new_signal ("/org/freedesktop/IBus", + "org.freedesktop.IBus", + signal_name); + /* set a non-zero serial to make libdbus happy */ + g_dbus_message_set_serial (message, 1); + g_dbus_message_set_sender (message, "org.freedesktop.IBus"); + if (parameters) + g_dbus_message_set_body (message, parameters); bus_dbus_impl_dispatch_message_by_rule (BUS_DEFAULT_DBUS, message, NULL); - - ibus_message_unref (message); - + g_object_unref (message); } static void -bus_ibus_impl_global_engine_changed (BusIBusImpl *ibus) -{ - g_assert (BUS_IS_IBUS_IMPL (ibus)); - - IBusMessage *message; - - message = ibus_message_new_signal (IBUS_PATH_IBUS, - IBUS_INTERFACE_IBUS, - "GlobalEngineChanged"); - ibus_message_append_args (message, - G_TYPE_INVALID); - ibus_message_set_sender (message, IBUS_SERVICE_IBUS); - - bus_dbus_impl_dispatch_message_by_rule (BUS_DEFAULT_DBUS, message, NULL); - - ibus_message_unref (message); -} - -gboolean -bus_ibus_impl_filter_keyboard_shortcuts (BusIBusImpl *ibus, - BusInputContext *context, - guint keyval, - guint modifiers, - guint prev_keyval, - guint prev_modifiers) +bus_ibus_impl_registry_changed (BusIBusImpl *ibus) { - static GQuark trigger = 0; - static GQuark next = 0; - static GQuark previous = 0; - - if (trigger == 0) { - trigger = g_quark_from_static_string ("trigger"); - next = g_quark_from_static_string ("next-engine-in-menu"); - previous = g_quark_from_static_string ("previous-engine"); - } - - GQuark event = ibus_hotkey_profile_filter_key_event (ibus->hotkey_profile, - keyval, - modifiers, - prev_keyval, - prev_modifiers, - 0); - - if (event == trigger) { - gboolean enabled = bus_input_context_is_enabled (context); - if (enabled) { - bus_input_context_disable (context); - } - else { - bus_input_context_enable (context); - } - return (enabled != bus_input_context_is_enabled (context)); - } - if (event == next) { - if (bus_input_context_is_enabled(context)) { - bus_ibus_impl_context_request_next_engine_in_menu (ibus, context); - } - else { - bus_input_context_enable (context); - } - return TRUE; - } - if (event == previous) { - if (bus_input_context_is_enabled(context)) { - bus_ibus_impl_context_request_previous_engine (ibus, context); - } - else { - bus_input_context_enable (context); - } - return TRUE; - } - return FALSE; + bus_ibus_impl_emit_signal (ibus, "RegistryChanged", NULL); } -static gchar* -bus_ibus_impl_load_global_engine_name_from_config (BusIBusImpl *ibus) +static void +bus_ibus_impl_global_engine_changed (BusIBusImpl *ibus) { - GValue value = { 0 }; - gchar *global_engine_name = NULL; - - g_assert (IBUS_IS_CONFIG (ibus->config)); - - if (ibus_config_get_value (ibus->config, "general", "global_engine", &value) && - G_VALUE_TYPE (&value) == G_TYPE_STRING) { - global_engine_name = g_value_dup_string (&value); - g_value_unset (&value); - } - - return global_engine_name; + const gchar *name = ibus->global_engine_name ? ibus->global_engine_name : ""; + bus_ibus_impl_emit_signal (ibus, "GlobalEngineChanged", + g_variant_new ("(s)", name)); } -static void -bus_ibus_impl_save_global_engine_name_to_config (BusIBusImpl *ibus) +gboolean +bus_ibus_impl_is_use_sys_layout (BusIBusImpl *ibus) { - g_assert (IBUS_IS_CONFIG (ibus->config)); - - if (ibus->use_global_engine && ibus->global_engine) { - GValue value = { 0 }; - g_value_init (&value, G_TYPE_STRING); - g_value_set_static_string (&value, bus_engine_proxy_get_desc (ibus->global_engine)->name); + g_assert (BUS_IS_IBUS_IMPL (ibus)); - ibus_config_set_value (ibus->config, "general", "global_engine", &value); - g_value_unset (&value); - } + return ibus->use_sys_layout; } -static gchar* -bus_ibus_impl_load_global_previous_engine_name_from_config (BusIBusImpl *ibus) +gboolean +bus_ibus_impl_is_embed_preedit_text (BusIBusImpl *ibus) { - GValue value = { 0 }; - gchar *global_previous_engine_name = NULL; - - g_assert (IBUS_IS_CONFIG (ibus->config)); - - if (ibus_config_get_value (ibus->config, "general", "global_previous_engine", &value) && - G_VALUE_TYPE (&value) == G_TYPE_STRING) { - global_previous_engine_name = g_value_dup_string (&value); - g_value_unset (&value); - } + g_assert (BUS_IS_IBUS_IMPL (ibus)); - return global_previous_engine_name; + return ibus->embed_preedit_text; } -static void -bus_ibus_impl_save_global_previous_engine_name_to_config (BusIBusImpl *ibus) +BusInputContext * +bus_ibus_impl_get_focused_input_context (BusIBusImpl *ibus) { - g_assert (IBUS_IS_CONFIG (ibus->config)); - - if (ibus->use_global_engine && ibus->global_previous_engine_name) { - GValue value = { 0 }; - g_value_init (&value, G_TYPE_STRING); - g_value_set_static_string (&value, ibus->global_previous_engine_name); + g_assert (BUS_IS_IBUS_IMPL (ibus)); - ibus_config_set_value (ibus->config, "general", "global_previous_engine", &value); - g_value_unset (&value); - } + return ibus->focused_context; } diff --git a/bus/ibusimpl.h b/bus/ibusimpl.h index 7eda87175..ade022bbd 100644 --- a/bus/ibusimpl.h +++ b/bus/ibusimpl.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,8 +19,8 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#ifndef __IBUS_IMPL_H_ -#define __IBUS_IMPL_H_ +#ifndef __BUS_IBUS_IMPL_H_ +#define __BUS_IBUS_IMPL_H_ #include #include "connection.h" @@ -49,8 +50,6 @@ #define BUS_DEFAULT_IBUS \ (bus_ibus_impl_get_default ()) -#define BUS_DEFAULT_HOTKEY_PROFILE \ - (bus_ibus_impl_get_hotkey_profile (BUS_DEFAULT_IBUS)) #define BUS_DEFAULT_KEYMAP \ (bus_ibus_impl_get_keymap (BUS_DEFAULT_IBUS)) #define BUS_DEFAULT_REGISTRY \ @@ -61,62 +60,27 @@ G_BEGIN_DECLS typedef struct _BusIBusImpl BusIBusImpl; typedef struct _BusIBusImplClass BusIBusImplClass; -struct _BusIBusImpl { - IBusService parent; - /* instance members */ - - GHashTable *factory_dict; - GList *factory_list; - GList *contexts; - - GList *engine_list; - GList *register_engine_list; - GList *component_list; - - gboolean use_sys_layout; - gboolean embed_preedit_text; - gboolean enable_by_default; - - BusRegistry *registry; - - BusInputContext *focused_context; - BusPanelProxy *panel; - IBusConfig *config; - IBusHotkeyProfile *hotkey_profile; - IBusKeymap *keymap; - - gboolean use_global_engine; - BusEngineProxy *global_engine; - gchar *global_previous_engine_name; -}; +GType bus_ibus_impl_get_type (void); -struct _BusIBusImplClass { - IBusServiceClass parent; +/** + * bus_ibus_impl_get_default: + * @returns: a BusIBusImpl object which is a singleton. + * + * Instantiate a BusIBusImpl object (if necessary) and return the object. + */ +BusIBusImpl *bus_ibus_impl_get_default (void); - /* class members */ -}; -GType bus_ibus_impl_get_type (void); -BusIBusImpl *bus_ibus_impl_get_default (void); -BusFactoryProxy *bus_ibus_impl_get_default_factory (BusIBusImpl *ibus); -BusFactoryProxy *bus_ibus_impl_get_next_factory (BusIBusImpl *ibus, - BusFactoryProxy *factory); -BusFactoryProxy *bus_ibus_impl_get_previous_factory (BusIBusImpl *ibus, - BusFactoryProxy *factory); +/* accessors */ BusFactoryProxy *bus_ibus_impl_lookup_factory (BusIBusImpl *ibus, const gchar *path); -IBusHotkeyProfile - *bus_ibus_impl_get_hotkey_profile (BusIBusImpl *ibus); IBusKeymap *bus_ibus_impl_get_keymap (BusIBusImpl *ibus); BusRegistry *bus_ibus_impl_get_registry (BusIBusImpl *ibus); - -gboolean bus_ibus_impl_filter_keyboard_shortcuts - (BusIBusImpl *ibus, - BusInputContext *context, - guint keyval, - guint modifiers, - guint prev_keyval, - guint prev_modifiers); +gboolean bus_ibus_impl_is_use_sys_layout (BusIBusImpl *ibus); +gboolean bus_ibus_impl_is_embed_preedit_text + (BusIBusImpl *ibus); +BusInputContext *bus_ibus_impl_get_focused_input_context + (BusIBusImpl *ibus); G_END_DECLS #endif diff --git a/bus/inputcontext.c b/bus/inputcontext.c index 10cb62575..49c4a2694 100644 --- a/bus/inputcontext.c +++ b/bus/inputcontext.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,13 +19,84 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include -#include -#include -#include "ibusimpl.h" #include "inputcontext.h" + +#include + #include "engineproxy.h" #include "factoryproxy.h" +#include "global.h" +#include "ibusimpl.h" +#include "marshalers.h" +#include "types.h" + +struct _SetEngineByDescData { + /* context related to the data */ + BusInputContext *context; + /* set engine by desc result, cancellable */ + GSimpleAsyncResult *simple; + /* a object to cancel bus_engine_proxy_new call */ + GCancellable *cancellable; + /* a object being passed to the bus_input_context_set_engine_by_desc function. if origin_cancellable is cancelled by someone, + * we cancel the cancellable above as well. */ + GCancellable *origin_cancellable; + gulong cancelled_handler_id; +}; +typedef struct _SetEngineByDescData SetEngineByDescData; + +struct _BusInputContext { + IBusService parent; + + /* instance members */ + BusConnection *connection; + BusEngineProxy *engine; + gchar *client; + + gboolean has_focus; + + /* client capabilities */ + guint capabilities; + + /* cursor location */ + gint x; + gint y; + gint w; + gint h; + + /* prev key event that are used for handling hot-keys */ + guint prev_keyval; + guint prev_modifiers; + + /* preedit text */ + IBusText *preedit_text; + guint preedit_cursor_pos; + gboolean preedit_visible; + guint preedit_mode; + + /* auxiliary text */ + IBusText *auxiliary_text; + gboolean auxiliary_visible; + + /* lookup table */ + IBusLookupTable *lookup_table; + gboolean lookup_table_visible; + + /* filter release */ + gboolean filter_release; + + /* is fake context */ + gboolean fake; + + /* incompleted set engine by desc request */ + SetEngineByDescData *data; +}; + +struct _BusInputContextClass { + IBusServiceClass parent; + + /* class members */ + IBusEngineDesc *default_engine_desc; +}; enum { PROCESS_KEY_EVENT, @@ -46,8 +118,6 @@ enum { CURSOR_DOWN_LOOKUP_TABLE, REGISTER_PROPERTIES, UPDATE_PROPERTY, - ENABLED, - DISABLED, ENGINE_CHANGED, REQUEST_ENGINE, LAST_SIGNAL, @@ -63,19 +133,15 @@ static guint context_signals[LAST_SIGNAL] = { 0 }; /* functions prototype */ static void bus_input_context_destroy (BusInputContext *context); -static gboolean bus_input_context_ibus_message (BusInputContext *context, - BusConnection *connection, - IBusMessage *message); -static gboolean bus_input_context_filter_keyboard_shortcuts - (BusInputContext *context, - guint keyval, - guint keycode, - guint modifiers); -static gboolean bus_input_context_send_signal (BusInputContext *context, - const gchar *signal_name, - GType first_arg_type, - ...); - +static void bus_input_context_service_method_call + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation); static void bus_input_context_unset_engine (BusInputContext *context); static void bus_input_context_commit_text (BusInputContext *context, IBusText *text); @@ -122,93 +188,159 @@ static void bus_input_context_update_property static void _engine_destroy_cb (BusEngineProxy *factory, BusInputContext *context); -static guint id = 0; static IBusText *text_empty = NULL; static IBusLookupTable *lookup_table_empty = NULL; static IBusPropList *props_empty = NULL; +/* The interfaces available in this class, which consists of a list of methods this class implements and + * a list of signals this class may emit. Method calls to the interface that are not defined in this XML + * will be automatically rejected by the GDBus library (see src/ibusservice.c for details.) */ +static const gchar introspection_xml[] = + "" + " " + /* methods */ + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + + /* signals */ + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; + G_DEFINE_TYPE (BusInputContext, bus_input_context, IBUS_TYPE_SERVICE) -/* when send preedit to client */ +/* TRUE if we can send preedit text to client. FALSE if the panel has to handle it. Note that we check IBUS_CAP_FOCUS here since + * when the capability is not set, the client has to handle a preedit text regardless of the embed_preedit_text config. */ #define PREEDIT_CONDITION \ ((context->capabilities & IBUS_CAP_PREEDIT_TEXT) && \ - (BUS_DEFAULT_IBUS->embed_preedit_text || (context->capabilities & IBUS_CAP_FOCUS) == 0)) + (bus_ibus_impl_is_embed_preedit_text (BUS_DEFAULT_IBUS) || (context->capabilities & IBUS_CAP_FOCUS) == 0)) static void _connection_destroy_cb (BusConnection *connection, BusInputContext *context) -{ - BUS_IS_CONNECTION (connection); - BUS_IS_INPUT_CONTEXT (context); - - ibus_object_destroy (IBUS_OBJECT (context)); -} - - -BusInputContext * -bus_input_context_new (BusConnection *connection, - const gchar *client) { g_assert (BUS_IS_CONNECTION (connection)); - g_assert (client != NULL); - - BusInputContext *context; - gchar *path; - - path = g_strdup_printf (IBUS_PATH_INPUT_CONTEXT, ++id); - - context = (BusInputContext *) g_object_new (BUS_TYPE_INPUT_CONTEXT, - "path", path, - NULL); - g_free (path); - -#if 0 - ibus_service_add_to_connection (IBUS_SERVICE (context), - IBUS_CONNECTION (connection)); -#endif - - g_object_ref_sink (connection); - context->connection = connection; - context->client = g_strdup (client); - - g_signal_connect (context->connection, - "destroy", - (GCallback) _connection_destroy_cb, - context); + g_assert (BUS_IS_INPUT_CONTEXT (context)); - return context; + ibus_object_destroy (IBUS_OBJECT (context)); } static void -bus_input_context_class_init (BusInputContextClass *klass) +bus_input_context_class_init (BusInputContextClass *class) { - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); + IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class); + + class->default_engine_desc = ibus_engine_desc_new ("dummy", + "", + "", + "", + "", + "", + "ibus-engine", + ""); + g_object_ref_sink (class->default_engine_desc); ibus_object_class->destroy = (IBusObjectDestroyFunc) bus_input_context_destroy; - IBUS_SERVICE_CLASS (klass)->ibus_message = - (ServiceIBusMessageFunc) bus_input_context_ibus_message; + /* override the parent class's implementation. */ + IBUS_SERVICE_CLASS (class)->service_method_call = bus_input_context_service_method_call; + /* register the xml so that bus_ibus_impl_service_method_call will be called on a method call defined in the xml (e.g. 'FocusIn'.) */ + ibus_service_class_add_interfaces (IBUS_SERVICE_CLASS (class), introspection_xml); - /* install signals */ + /* install glib signals that would be handled by other classes like ibusimpl.c and panelproxy.c. */ context_signals[PROCESS_KEY_EVENT] = g_signal_new (I_("process-key-event"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_BOOL__UINT_UINT, + bus_marshal_BOOL__UINT_UINT_UINT, G_TYPE_BOOLEAN, - 2, + 3, + G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); context_signals[SET_CURSOR_LOCATION] = g_signal_new (I_("set-cursor-location"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__INT_INT_INT_INT, + bus_marshal_VOID__INT_INT_INT_INT, G_TYPE_NONE, 4, G_TYPE_INT, @@ -218,29 +350,29 @@ bus_input_context_class_init (BusInputContextClass *klass) context_signals[FOCUS_IN] = g_signal_new (I_("focus-in"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); context_signals[FOCUS_OUT] = g_signal_new (I_("focus-out"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); context_signals[UPDATE_PREEDIT_TEXT] = g_signal_new (I_("update-preedit-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT_UINT_BOOLEAN, + bus_marshal_VOID__OBJECT_UINT_BOOLEAN, G_TYPE_NONE, 3, IBUS_TYPE_TEXT, @@ -249,31 +381,31 @@ bus_input_context_class_init (BusInputContextClass *klass) context_signals[SHOW_PREEDIT_TEXT] = g_signal_new (I_("show-preedit-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); context_signals[HIDE_PREEDIT_TEXT] = g_signal_new (I_("hide-preedit-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); context_signals[UPDATE_AUXILIARY_TEXT] = g_signal_new (I_("update-auxiliary-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT_BOOLEAN, + bus_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2, IBUS_TYPE_TEXT, @@ -281,31 +413,31 @@ bus_input_context_class_init (BusInputContextClass *klass) context_signals[SHOW_AUXILIARY_TEXT] = g_signal_new (I_("show-auxiliary-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); context_signals[HIDE_AUXILIARY_TEXT] = g_signal_new (I_("hide-auxiliary-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); context_signals[UPDATE_LOOKUP_TABLE] = g_signal_new (I_("update-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT_BOOLEAN, + bus_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2, IBUS_TYPE_LOOKUP_TABLE, @@ -313,124 +445,106 @@ bus_input_context_class_init (BusInputContextClass *klass) context_signals[SHOW_LOOKUP_TABLE] = g_signal_new (I_("show-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); context_signals[HIDE_LOOKUP_TABLE] = g_signal_new (I_("hide-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); context_signals[PAGE_UP_LOOKUP_TABLE] = g_signal_new (I_("page-up-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); context_signals[PAGE_DOWN_LOOKUP_TABLE] = g_signal_new (I_("page-down-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); context_signals[CURSOR_UP_LOOKUP_TABLE] = g_signal_new (I_("cursor-up-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); context_signals[CURSOR_DOWN_LOOKUP_TABLE] = g_signal_new (I_("cursor-down-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); context_signals[REGISTER_PROPERTIES] = g_signal_new (I_("register-properties"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT, + bus_marshal_VOID__OBJECT, G_TYPE_NONE, 1, IBUS_TYPE_PROP_LIST); context_signals[UPDATE_PROPERTY] = g_signal_new (I_("update-property"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT, + bus_marshal_VOID__OBJECT, G_TYPE_NONE, 1, IBUS_TYPE_PROPERTY); - context_signals[ENABLED] = - g_signal_new (I_("enabled"), - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, - ibus_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - - context_signals[DISABLED] = - g_signal_new (I_("disabled"), - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - 0, - NULL, NULL, - ibus_marshal_VOID__VOID, - G_TYPE_NONE, - 0); - context_signals[ENGINE_CHANGED] = g_signal_new (I_("engine-changed"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); + /* This signal is not for notifying an event on this object, but is for requesting an engine as the name shows. + * On the signal emission, ibusimpl.c will immediately update the context->engine variable. */ context_signals[REQUEST_ENGINE] = g_signal_new (I_("request-engine"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__STRING, - G_TYPE_NONE, + bus_marshal_OBJECT__STRING, + IBUS_TYPE_ENGINE_DESC, 1, G_TYPE_STRING); text_empty = ibus_text_new_from_string (""); g_object_ref_sink (text_empty); - lookup_table_empty = ibus_lookup_table_new (9, 0, FALSE, FALSE); + lookup_table_empty = ibus_lookup_table_new (9 /* page size */, 0, FALSE, FALSE); g_object_ref_sink (lookup_table_empty); props_empty = ibus_prop_list_new (); g_object_ref_sink (props_empty); @@ -439,36 +553,15 @@ bus_input_context_class_init (BusInputContextClass *klass) static void bus_input_context_init (BusInputContext *context) { - context->connection = NULL; - context->client = NULL; - context->engine = NULL; - context->has_focus = FALSE; - context->enabled = FALSE; - - context->prev_keyval = IBUS_VoidSymbol; - context->prev_modifiers = 0; - - context->capabilities = 0; - - context->x = 0; - context->y = 0; - context->w = 0; - context->h = 0; - + context->prev_keyval = IBUS_KEY_VoidSymbol; g_object_ref_sink (text_empty); context->preedit_text = text_empty; - context->preedit_cursor_pos = 0; - context->preedit_visible = FALSE; context->preedit_mode = IBUS_ENGINE_PREEDIT_CLEAR; - g_object_ref_sink (text_empty); context->auxiliary_text = text_empty; - context->auxiliary_visible = FALSE; - g_object_ref_sink (lookup_table_empty); context->lookup_table = lookup_table_empty; - context->lookup_table_visible = FALSE; - + /* other member variables will automatically be zero-cleared. */ } static void @@ -511,640 +604,440 @@ bus_input_context_destroy (BusInputContext *context) context->client = NULL; } - IBUS_OBJECT_CLASS(bus_input_context_parent_class)->destroy (IBUS_OBJECT (context)); -} - -/* introspectable interface */ -static IBusMessage * -_ibus_introspect (BusInputContext *context, - IBusMessage *message, - BusConnection *connection) -{ - static const gchar *introspect = - DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE - "\n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - - /* methods */ - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - - /* signals */ - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - - " \n" - "\n"; - - IBusMessage *reply_message; - reply_message = ibus_message_new_method_return (message); - ibus_message_append_args (reply_message, - G_TYPE_STRING, &introspect, - G_TYPE_INVALID); - - return reply_message; -} - -typedef struct { - BusInputContext *context; - IBusMessage *message; -} CallData; + IBUS_OBJECT_CLASS (bus_input_context_parent_class)->destroy (IBUS_OBJECT (context)); +} -static void -_ic_process_key_event_reply_cb (gpointer data, - gpointer user_data) +/** + * bus_input_context_emit_signal: + * @signal_name: The D-Bus signal name to emit which is in the introspection_xml. + * + * Emit the D-Bus signal. + */ +static gboolean +bus_input_context_emit_signal (BusInputContext *context, + const gchar *signal_name, + GVariant *parameters, + GError **error) { - gboolean retval; - CallData *call_data; - - retval = (gboolean) GPOINTER_TO_INT (data); - call_data = (CallData *) user_data; - - /* make sure the connection is alive */ - if (G_LIKELY (call_data->context->connection != NULL)) { - IBusMessage *reply; - reply = ibus_message_new_method_return (call_data->message); - ibus_message_append_args (reply, - G_TYPE_BOOLEAN, &retval, - G_TYPE_INVALID); + if (context->connection == NULL) + return TRUE; + + GDBusMessage *message = g_dbus_message_new_signal (ibus_service_get_object_path ((IBusService *)context), + "org.freedesktop.IBus.InputContext", + signal_name); + g_dbus_message_set_sender (message, "org.freedesktop.IBus"); + g_dbus_message_set_destination (message, bus_connection_get_unique_name (context->connection)); + if (parameters != NULL) + g_dbus_message_set_body (message, parameters); + + gboolean retval = g_dbus_connection_send_message (bus_connection_get_dbus_connection (context->connection), + message, + G_DBUS_SEND_MESSAGE_FLAGS_NONE, + NULL, error); + g_object_unref (message); + return retval; +} - ibus_connection_send ((IBusConnection *)call_data->context->connection, reply); - ibus_message_unref (reply); +/** + * _ic_process_key_event_reply_cb: + * + * A GAsyncReadyCallback function to be called when bus_engine_proxy_process_key_event() is finished. + */ +static void +_ic_process_key_event_reply_cb (GObject *source, + GAsyncResult *res, + GDBusMethodInvocation *invocation) +{ + GError *error = NULL; + GVariant *value = g_dbus_proxy_call_finish ((GDBusProxy *)source, + res, + &error); + if (value != NULL) { + g_dbus_method_invocation_return_value (invocation, value); + g_variant_unref (value); + } + else { + g_dbus_method_invocation_return_gerror (invocation, error); + g_error_free (error); } - - g_object_unref (call_data->context); - ibus_message_unref (call_data->message); - g_slice_free (CallData, call_data); } -static IBusMessage * -_ic_process_key_event (BusInputContext *context, - IBusMessage *message, - BusConnection *connection) +/** + * _ic_process_key_event: + * + * Implement the "ProcessKeyEvent" method call of the org.freedesktop.IBus.InputContext interface. + */ +static void +_ic_process_key_event (BusInputContext *context, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); - - IBusMessage *reply; - guint keyval, keycode, modifiers; - gboolean retval; - IBusError *error; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_UINT, &keyval, - G_TYPE_UINT, &keycode, - G_TYPE_UINT, &modifiers, - G_TYPE_INVALID); - - if (!retval) { - reply = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); - return reply; - } + guint keyval = IBUS_KEY_VoidSymbol; + guint keycode = 0; + guint modifiers = 0; + g_variant_get (parameters, "(uuu)", &keyval, &keycode, &modifiers); if (G_UNLIKELY (!context->has_focus)) { /* workaround: set focus if context does not have focus */ - bus_input_context_focus_in (context); - } - - if (G_LIKELY (context->has_focus)) { - retval = bus_input_context_filter_keyboard_shortcuts (context, keyval, keycode, modifiers); - /* If it is keyboard shortcut, reply TRUE to client */ - if (G_UNLIKELY (retval)) { - reply = ibus_message_new_method_return (message); - ibus_message_append_args (reply, - G_TYPE_BOOLEAN, &retval, - G_TYPE_INVALID); - return reply; + BusInputContext *focused_context = bus_ibus_impl_get_focused_input_context (BUS_DEFAULT_IBUS); + if (focused_context == NULL || + focused_context->fake == TRUE || + context->fake == FALSE) { + /* grab focus, if context is a real IC or current focused IC is fake */ + bus_input_context_focus_in (context); } } - if (context->has_focus && context->enabled && context->engine) { - CallData *call_data; - - call_data = g_slice_new (CallData); - - g_object_ref (context); - ibus_message_ref (message); - - call_data->context = context; - call_data->message = message; - + /* ignore key events, if it is a fake input context */ + if (context->has_focus && context->engine && context->fake == FALSE) { bus_engine_proxy_process_key_event (context->engine, keyval, keycode, modifiers, - (GFunc) _ic_process_key_event_reply_cb, - call_data); - return NULL; + (GAsyncReadyCallback) _ic_process_key_event_reply_cb, + invocation); } else { - retval = FALSE; - reply = ibus_message_new_method_return (message); - ibus_message_append_args (reply, - G_TYPE_BOOLEAN, &retval, - G_TYPE_INVALID); - return reply; + g_dbus_method_invocation_return_value (invocation, g_variant_new ("(b)", FALSE)); } } -static IBusMessage * -_ic_set_cursor_location (BusInputContext *context, - IBusMessage *message, - BusConnection *connection) +/** + * _ic_set_cursor_location: + * + * Implement the "SetCursorLocation" method call of the org.freedesktop.IBus.InputContext interface. + */ +static void +_ic_set_cursor_location (BusInputContext *context, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); - - IBusMessage *reply; - guint x, y, w, h; - gboolean retval; - IBusError *error; + g_dbus_method_invocation_return_value (invocation, NULL); - retval = ibus_message_get_args (message, &error, - G_TYPE_INT, &x, - G_TYPE_INT, &y, - G_TYPE_INT, &w, - G_TYPE_INT, &h, - G_TYPE_INVALID); + g_variant_get (parameters, "(iiii)", + &context->x, &context->y, &context->w, &context->h); - if (!retval) { - reply = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); - return reply; - } - - context->x = x; - context->y = y; - context->h = h; - context->w = w; - - if (context->has_focus && context->enabled && context->engine) { - bus_engine_proxy_set_cursor_location (context->engine, x, y, w, h); + if (context->has_focus && context->engine) { + bus_engine_proxy_set_cursor_location (context->engine, + context->x, context->y, context->w, context->h); } if (context->capabilities & IBUS_CAP_FOCUS) { g_signal_emit (context, context_signals[SET_CURSOR_LOCATION], 0, - x, - y, - w, - h); + context->x, + context->y, + context->w, + context->h); } +} - reply = ibus_message_new_method_return (message); - return reply; +static void +_ic_process_hand_writing_event (BusInputContext *context, + GVariant *parameters, + GDBusMethodInvocation *invocation) +{ + /* do nothing if it is a fake input context */ + if (context->has_focus && + context->engine && context->fake == FALSE) { + bus_engine_proxy_process_hand_writing_event (context->engine, parameters); + } + g_dbus_method_invocation_return_value (invocation, NULL); } -static IBusMessage * -_ic_focus_in (BusInputContext *context, - IBusMessage *message, - BusConnection *connection) +static void +_ic_cancel_hand_writing (BusInputContext *context, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); + guint n_strokes = 0; + g_variant_get (parameters, "(u)", &n_strokes); - IBusMessage *reply; + /* do nothing if it is a fake input context */ + if (context->has_focus && + context->engine && context->fake == FALSE) { + bus_engine_proxy_cancel_hand_writing (context->engine, n_strokes); + } + g_dbus_method_invocation_return_value (invocation, NULL); +} +/** + * _ic_focus_in: + * + * Implement the "FocusIn" method call of the org.freedesktop.IBus.InputContext interface. + */ +static void +_ic_focus_in (BusInputContext *context, + GVariant *parameters, + GDBusMethodInvocation *invocation) +{ if (context->capabilities & IBUS_CAP_FOCUS) { bus_input_context_focus_in (context); - reply = ibus_message_new_method_return (message); + g_dbus_method_invocation_return_value (invocation, NULL); } else { - reply = ibus_message_new_error (message, - DBUS_ERROR_FAILED, - "The input context does not support focus."); + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "The input context does not support focus."); } - - return reply; } -static IBusMessage * -_ic_focus_out (BusInputContext *context, - IBusMessage *message, - BusConnection *connection) +/** + * _ic_focus_out: + * + * Implement the "FocusOut" method call of the org.freedesktop.IBus.InputContext interface. + */ +static void +_ic_focus_out (BusInputContext *context, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); - - IBusMessage *reply; - if (context->capabilities & IBUS_CAP_FOCUS) { bus_input_context_focus_out (context); - reply = ibus_message_new_method_return (message); + g_dbus_method_invocation_return_value (invocation, NULL); } else { - reply = ibus_message_new_error (message, - DBUS_ERROR_FAILED, - "The input context does not support focus."); + g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "The input context does not support focus."); } - - return reply; } -static IBusMessage * -_ic_reset (BusInputContext *context, - IBusMessage *message, - BusConnection *connection) +/** + * _ic_reset: + * + * Implement the "Reset" method call of the org.freedesktop.IBus.InputContext interface. + */ +static void +_ic_reset (BusInputContext *context, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); - - IBusMessage *reply; - - if (context->enabled && context->engine) { + if (context->engine) { bus_engine_proxy_reset (context->engine); } - - reply = ibus_message_new_method_return (message); - return reply; + g_dbus_method_invocation_return_value (invocation, NULL); } -static IBusMessage * -_ic_set_capabilities (BusInputContext *context, - IBusMessage *message, - BusConnection *connection) +/** + * _ic_set_capabilities: + * + * Implement the "SetCapabilities" method call of the org.freedesktop.IBus.InputContext interface. + */ +static void +_ic_set_capabilities (BusInputContext *context, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); - - IBusMessage *reply; - guint caps; - gboolean retval; - IBusError *error; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_UINT, &caps, - G_TYPE_INVALID); - - if (!retval) { - reply = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); - return reply; - } + guint caps = 0; + g_variant_get (parameters, "(u)", &caps); - if (context->capabilities != caps) { - context->capabilities = caps; + bus_input_context_set_capabilities (context, caps); - /* If the context does not support IBUS_CAP_FOCUS, then we always assume - * it has focus. */ - if ((caps & IBUS_CAP_FOCUS) == 0) { - bus_input_context_focus_in (context); - } - - if (context->engine) { - bus_engine_proxy_set_capabilities (context->engine, caps); - } - } - - reply = ibus_message_new_method_return (message); - return reply; + g_dbus_method_invocation_return_value (invocation, NULL); } -static IBusMessage * -_ic_property_activate (BusInputContext *context, - IBusMessage *message, - BusConnection *connection) +/** + * _ic_property_activate: + * + * Implement the "PropertyActivate" method call of the org.freedesktop.IBus.InputContext interface. + */ +static void +_ic_property_activate (BusInputContext *context, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); - - IBusMessage *reply; - gchar *prop_name; - gint prop_state; - gboolean retval; - IBusError *error; + gchar *prop_name = NULL; + guint prop_state = 0; + g_variant_get (parameters, "(&su)", &prop_name, &prop_state); - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, &prop_name, - G_TYPE_INT, &prop_state, - G_TYPE_INVALID); - - if (!retval) { - reply = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); - return reply; - } - - if (context->enabled && context->engine) { + if (context->engine) { bus_engine_proxy_property_activate (context->engine, prop_name, prop_state); } - reply = ibus_message_new_method_return (message); - return reply; -} - -static IBusMessage * -_ic_enable (BusInputContext *context, - IBusMessage *message, - BusConnection *connection) -{ - g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); - - IBusMessage *reply; - - bus_input_context_enable (context); - - reply = ibus_message_new_method_return (message); - return reply; -} - -static IBusMessage * -_ic_disable (BusInputContext *context, - IBusMessage *message, - BusConnection *connection) -{ - g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); - - IBusMessage *reply; - - bus_input_context_disable (context); +#ifdef OS_CHROMEOS + /* Global engine is always enabled in chromeos, + * so pass PropertyActivate signal to the focused context. + */ + else if (context->fake) { + BusInputContext *focused_context = bus_ibus_impl_get_focused_input_context (BUS_DEFAULT_IBUS); + if (focused_context && focused_context->engine) + bus_engine_proxy_property_activate (focused_context->engine, prop_name, prop_state); + } +#endif - reply = ibus_message_new_method_return (message); - return reply; + g_dbus_method_invocation_return_value (invocation, NULL); } -static IBusMessage * -_ic_is_enabled (BusInputContext *context, - IBusMessage *message, - BusConnection *connection) +static void +_ic_set_engine_done (BusInputContext *context, + GAsyncResult *res, + GDBusMethodInvocation *invocation) { - g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); - - IBusMessage *reply; + gboolean retval = FALSE; + GError *error = NULL; - reply = ibus_message_new_method_return (message); - ibus_message_append_args (reply, - G_TYPE_BOOLEAN, &context->enabled, - G_TYPE_INVALID); + retval = bus_input_context_set_engine_by_desc_finish (context, + res, &error); - return reply; + if (!retval) { + g_dbus_method_invocation_return_gerror (invocation, error); + g_error_free (error); + } + else { + g_dbus_method_invocation_return_value (invocation, NULL); + } } -static IBusMessage * -_ic_set_engine (BusInputContext *context, - IBusMessage *message, - BusConnection *connection) +/** + * _ic_set_engine: + * + * Implement the "SetEngine" method call of the org.freedesktop.IBus.InputContext interface. + */ +static void +_ic_set_engine (BusInputContext *context, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); - - gboolean retval; - IBusMessage *reply; - IBusError *error; - gchar *engine_name; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, &engine_name, - G_TYPE_INVALID); - if (!retval) { - reply = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); - return reply; + gchar *engine_name = NULL; + g_variant_get (parameters, "(&s)", &engine_name); + + if (!bus_input_context_has_focus (context)) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Context which does not has focus can not change engine to %s.", + engine_name); + return; } - g_signal_emit (context, context_signals[REQUEST_ENGINE], 0, engine_name); - - if (context->engine == NULL) { - reply = ibus_message_new_error_printf (message, - "org.freedesktop.IBus.NoEngine", - "can not find engine with name %s", - engine_name); - return reply; + IBusEngineDesc *desc = NULL; + g_signal_emit (context, + context_signals[REQUEST_ENGINE], 0, + engine_name, + &desc); + if (desc == NULL) { + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Can not find engine %s.", engine_name); + return; } - bus_input_context_enable (context); - - reply = ibus_message_new_method_return (message); - return reply; + bus_input_context_set_engine_by_desc (context, + desc, + g_gdbus_timeout, + NULL, + (GAsyncReadyCallback)_ic_set_engine_done, + invocation); } -static IBusMessage * -_ic_get_engine (BusInputContext *context, - IBusMessage *message, - BusConnection *connection) +/** + * _ic_get_engine: + * + * Implement the "GetEngine" method call of the org.freedesktop.IBus.InputContext interface. + */ +static void +_ic_get_engine (BusInputContext *context, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); + IBusEngineDesc *desc = context->engine ? + bus_engine_proxy_get_desc (context->engine) : + BUS_INPUT_CONTEXT_GET_CLASS (context)->default_engine_desc; - IBusMessage *reply; - IBusEngineDesc *desc; - - if (context->engine) { - desc = bus_engine_proxy_get_desc (context->engine); - if (desc != NULL) { - reply = ibus_message_new_method_return (message); - ibus_message_append_args (reply, - IBUS_TYPE_ENGINE_DESC, &desc, - G_TYPE_INVALID); - return reply; - } - } - reply = ibus_message_new_error (message, - DBUS_ERROR_FAILED, - "InputContext does not have factory."); - return reply; + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(v)", ibus_serializable_serialize ((IBusSerializable *)desc))); } -static IBusMessage * -_ic_destroy (BusInputContext *context, - IBusMessage *message, - BusConnection *connection) +/** + * bus_input_context_service_method_call: + * + * Handle a D-Bus method call whose destination and interface name are both "org.freedesktop.IBus.InputContext" + */ +static void +_ic_set_surrounding_text (BusInputContext *context, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (message != NULL); - g_assert (BUS_IS_CONNECTION (connection)); - - IBusMessage *reply; - reply = ibus_message_new_method_return (message); - - ibus_connection_send ((IBusConnection *) connection, reply); - ibus_connection_flush ((IBusConnection *) connection); - ibus_message_unref (reply); - - ibus_object_destroy ((IBusObject *) context); - - return NULL; + GVariant *variant = NULL; + IBusText *text; + guint cursor_pos = 0; + guint anchor_pos = 0; + + g_variant_get (parameters, + "(vuu)", + &variant, + &cursor_pos, + &anchor_pos); + text = IBUS_TEXT (ibus_serializable_deserialize (variant)); + g_variant_unref (variant); + + if ((context->capabilities & IBUS_CAP_SURROUNDING_TEXT) && + context->has_focus && context->engine) { + bus_engine_proxy_set_surrounding_text (context->engine, + text, + cursor_pos, + anchor_pos); + } + + if (g_object_is_floating (text)) + g_object_unref (text); + + g_dbus_method_invocation_return_value (invocation, NULL); } -static gboolean -bus_input_context_ibus_message (BusInputContext *context, - BusConnection *connection, - IBusMessage *message) +static void +bus_input_context_service_method_call (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (BUS_IS_CONNECTION (connection)); - g_assert (message != NULL); - - gint i; - IBusMessage *reply_message = NULL; + if (g_strcmp0 (interface_name, IBUS_INTERFACE_INPUT_CONTEXT) != 0) { + IBUS_SERVICE_CLASS (bus_input_context_parent_class)->service_method_call ( + service, + connection, + sender, + object_path, + interface_name, + method_name, + parameters, + invocation); + return; + } static const struct { - const gchar *interface; - const gchar *name; - IBusMessage *(* handler) (BusInputContext *, IBusMessage *, BusConnection *); - } handlers[] = { - /* Introspectable interface */ - { DBUS_INTERFACE_INTROSPECTABLE, - "Introspect", _ibus_introspect }, - /* IBus interface */ - { IBUS_INTERFACE_INPUT_CONTEXT, "ProcessKeyEvent", _ic_process_key_event }, - { IBUS_INTERFACE_INPUT_CONTEXT, "SetCursorLocation", _ic_set_cursor_location }, - { IBUS_INTERFACE_INPUT_CONTEXT, "FocusIn", _ic_focus_in }, - { IBUS_INTERFACE_INPUT_CONTEXT, "FocusOut", _ic_focus_out }, - { IBUS_INTERFACE_INPUT_CONTEXT, "Reset", _ic_reset }, - { IBUS_INTERFACE_INPUT_CONTEXT, "SetCapabilities", _ic_set_capabilities }, - { IBUS_INTERFACE_INPUT_CONTEXT, "PropertyActivate", _ic_property_activate }, - { IBUS_INTERFACE_INPUT_CONTEXT, "Enable", _ic_enable }, - { IBUS_INTERFACE_INPUT_CONTEXT, "Disable", _ic_disable }, - { IBUS_INTERFACE_INPUT_CONTEXT, "IsEnabled", _ic_is_enabled }, - { IBUS_INTERFACE_INPUT_CONTEXT, "SetEngine", _ic_set_engine }, - { IBUS_INTERFACE_INPUT_CONTEXT, "GetEngine", _ic_get_engine }, - { IBUS_INTERFACE_INPUT_CONTEXT, "Destroy", _ic_destroy }, + const gchar *method_name; + void (* method_callback) (BusInputContext *, GVariant *, GDBusMethodInvocation *); + } methods [] = { + { "ProcessKeyEvent", _ic_process_key_event }, + { "SetCursorLocation", _ic_set_cursor_location }, + { "ProcessHandWritingEvent", + _ic_process_hand_writing_event }, + { "CancelHandWriting", _ic_cancel_hand_writing }, + { "FocusIn", _ic_focus_in }, + { "FocusOut", _ic_focus_out }, + { "Reset", _ic_reset }, + { "SetCapabilities", _ic_set_capabilities }, + { "PropertyActivate", _ic_property_activate }, + { "SetEngine", _ic_set_engine }, + { "GetEngine", _ic_get_engine }, + { "SetSurroundingText", _ic_set_surrounding_text}, }; - ibus_message_set_sender (message, bus_connection_get_unique_name (connection)); - ibus_message_set_destination (message, DBUS_SERVICE_DBUS); - - for (i = 0; i < G_N_ELEMENTS (handlers); i++) { - if (ibus_message_is_method_call (message, - handlers[i].interface, - handlers[i].name)) { - - reply_message = handlers[i].handler (context, message, connection); - if (reply_message) { - - ibus_message_set_sender (reply_message, - DBUS_SERVICE_DBUS); - ibus_message_set_destination (reply_message, - bus_connection_get_unique_name (connection)); - ibus_message_set_no_reply (reply_message, TRUE); - - ibus_connection_send (IBUS_CONNECTION (connection), reply_message); - ibus_message_unref (reply_message); - } - - g_signal_stop_emission_by_name (context, "ibus-message"); - return TRUE; + gint i; + for (i = 0; i < G_N_ELEMENTS (methods); i++) { + if (g_strcmp0 (method_name, methods[i].method_name) == 0) { + methods[i].method_callback ((BusInputContext *)service, parameters, invocation); + return; } } - return IBUS_SERVICE_CLASS (bus_input_context_parent_class)->ibus_message ( - (IBusService *)context, - (IBusConnection *)connection, - message); + g_return_if_reached (); } - gboolean bus_input_context_has_focus (BusInputContext *context) { @@ -1163,11 +1056,12 @@ bus_input_context_focus_in (BusInputContext *context) context->has_focus = TRUE; - if (context->engine == NULL && context->enabled) { - g_signal_emit (context, context_signals[REQUEST_ENGINE], 0, NULL); - } + /* To make sure that we won't use an old value left before we losing focus + * last time. */ + context->prev_keyval = IBUS_KEY_VoidSymbol; + context->prev_modifiers = 0; - if (context->engine && context->enabled) { + if (context->engine) { bus_engine_proxy_focus_in (context->engine); bus_engine_proxy_enable (context->engine); bus_engine_proxy_set_capabilities (context->engine, context->capabilities); @@ -1176,8 +1070,10 @@ bus_input_context_focus_in (BusInputContext *context) if (context->capabilities & IBUS_CAP_FOCUS) { g_signal_emit (context, context_signals[FOCUS_IN], 0); - if (context->engine && context->enabled) { - if (context->preedit_visible && !PREEDIT_CONDITION) { + if (context->engine) { + /* if necessary, emit glib signals to the context object to update panel status. see the comment for PREEDIT_CONDITION + * for details. */ + if (context->preedit_visible && !PREEDIT_CONDITION) { g_signal_emit (context, context_signals[UPDATE_PREEDIT_TEXT], 0, @@ -1203,6 +1099,11 @@ bus_input_context_focus_in (BusInputContext *context) } } +/** + * bus_input_context_clear_preedit_text: + * + * Clear context->preedit_text. If the preedit mode is IBUS_ENGINE_PREEDIT_COMMIT, commit it before clearing. + */ static void bus_input_context_clear_preedit_text (BusInputContext *context) { @@ -1231,7 +1132,7 @@ bus_input_context_focus_out (BusInputContext *context) bus_input_context_update_lookup_table (context, lookup_table_empty, FALSE); bus_input_context_register_properties (context, props_empty); - if (context->engine && context->enabled) { + if (context->engine) { bus_engine_proxy_focus_out (context->engine); } @@ -1248,15 +1149,15 @@ bus_input_context_focus_out (BusInputContext *context) { \ g_assert (BUS_IS_INPUT_CONTEXT (context)); \ \ - if (context->has_focus && context->enabled && context->engine) { \ + if (context->has_focus && context->engine) { \ bus_engine_proxy_##name (context->engine); \ } \ } -DEFINE_FUNC(page_up) -DEFINE_FUNC(page_down) -DEFINE_FUNC(cursor_up) -DEFINE_FUNC(cursor_down) +DEFINE_FUNC (page_up) +DEFINE_FUNC (page_down) +DEFINE_FUNC (cursor_up) +DEFINE_FUNC (cursor_down) #undef DEFINE_FUNC @@ -1268,7 +1169,7 @@ bus_input_context_candidate_clicked (BusInputContext *context, { g_assert (BUS_IS_INPUT_CONTEXT (context)); - if (context->enabled && context->engine) { + if (context->engine) { bus_engine_proxy_candidate_clicked (context->engine, index, button, @@ -1283,7 +1184,7 @@ bus_input_context_property_activate (BusInputContext *context, { g_assert (BUS_IS_INPUT_CONTEXT (context)); - if (context->enabled && context->engine) { + if (context->engine) { bus_engine_proxy_property_activate (context->engine, prop_name, prop_state); } } @@ -1294,18 +1195,21 @@ bus_input_context_commit_text (BusInputContext *context, { g_assert (BUS_IS_INPUT_CONTEXT (context)); - if (!context->enabled) - return; - if (text == text_empty || text == NULL) return; - bus_input_context_send_signal (context, + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)text); + bus_input_context_emit_signal (context, "CommitText", - IBUS_TYPE_TEXT, &text, - G_TYPE_INVALID); + g_variant_new ("(v)", variant), + NULL); } +/** + * bus_input_context_update_preedit_text: + * + * Update a preedit text. Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_update_preedit_text (BusInputContext *context, IBusText *text, @@ -1325,12 +1229,11 @@ bus_input_context_update_preedit_text (BusInputContext *context, context->preedit_mode = mode; if (PREEDIT_CONDITION) { - bus_input_context_send_signal (context, + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)context->preedit_text); + bus_input_context_emit_signal (context, "UpdatePreeditText", - IBUS_TYPE_TEXT, &(context->preedit_text), - G_TYPE_UINT, &(context->preedit_cursor_pos), - G_TYPE_BOOLEAN, &(context->preedit_visible), - G_TYPE_INVALID); + g_variant_new ("(vub)", variant, context->preedit_cursor_pos, context->preedit_visible), + NULL); } else { g_signal_emit (context, @@ -1342,6 +1245,11 @@ bus_input_context_update_preedit_text (BusInputContext *context, } } +/** + * bus_input_context_show_preedit_text: + * + * Show a preedit text. Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_show_preedit_text (BusInputContext *context) { @@ -1354,9 +1262,10 @@ bus_input_context_show_preedit_text (BusInputContext *context) context->preedit_visible = TRUE; if (PREEDIT_CONDITION) { - bus_input_context_send_signal (context, + bus_input_context_emit_signal (context, "ShowPreeditText", - G_TYPE_INVALID); + NULL, + NULL); } else { g_signal_emit (context, @@ -1365,6 +1274,11 @@ bus_input_context_show_preedit_text (BusInputContext *context) } } +/** + * bus_input_context_hide_preedit_text: + * + * Hide a preedit text. Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_hide_preedit_text (BusInputContext *context) { @@ -1377,9 +1291,10 @@ bus_input_context_hide_preedit_text (BusInputContext *context) context->preedit_visible = FALSE; if (PREEDIT_CONDITION) { - bus_input_context_send_signal (context, + bus_input_context_emit_signal (context, "HidePreeditText", - G_TYPE_INVALID); + NULL, + NULL); } else { g_signal_emit (context, @@ -1388,6 +1303,11 @@ bus_input_context_hide_preedit_text (BusInputContext *context) } } +/** + * bus_input_context_update_auxiliary_text: + * + * Update an aux text. Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_update_auxiliary_text (BusInputContext *context, IBusText *text, @@ -1403,11 +1323,11 @@ bus_input_context_update_auxiliary_text (BusInputContext *context, context->auxiliary_visible = visible; if (context->capabilities & IBUS_CAP_AUXILIARY_TEXT) { - bus_input_context_send_signal (context, + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)text); + bus_input_context_emit_signal (context, "UpdateAuxiliaryText", - IBUS_TYPE_TEXT, &(context->auxiliary_text), - G_TYPE_BOOLEAN, &(context->auxiliary_visible), - G_TYPE_INVALID); + g_variant_new ("(vb)", variant, visible), + NULL); } else { g_signal_emit (context, @@ -1418,6 +1338,11 @@ bus_input_context_update_auxiliary_text (BusInputContext *context, } } +/** + * bus_input_context_show_auxiliary_text: + * + * Show an aux text. Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_show_auxiliary_text (BusInputContext *context) { @@ -1430,9 +1355,10 @@ bus_input_context_show_auxiliary_text (BusInputContext *context) context->auxiliary_visible = TRUE; if ((context->capabilities & IBUS_CAP_AUXILIARY_TEXT) == IBUS_CAP_AUXILIARY_TEXT) { - bus_input_context_send_signal (context, + bus_input_context_emit_signal (context, "ShowAuxiliaryText", - G_TYPE_INVALID); + NULL, + NULL); } else { g_signal_emit (context, @@ -1441,6 +1367,11 @@ bus_input_context_show_auxiliary_text (BusInputContext *context) } } +/** + * bus_input_context_hide_auxiliary_text: + * + * Hide an aux text. Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_hide_auxiliary_text (BusInputContext *context) { @@ -1453,9 +1384,10 @@ bus_input_context_hide_auxiliary_text (BusInputContext *context) context->auxiliary_visible = FALSE; if ((context->capabilities & IBUS_CAP_AUXILIARY_TEXT) == IBUS_CAP_AUXILIARY_TEXT) { - bus_input_context_send_signal (context, + bus_input_context_emit_signal (context, "HideAuxiliaryText", - G_TYPE_INVALID); + NULL, + NULL); } else { g_signal_emit (context, @@ -1464,6 +1396,12 @@ bus_input_context_hide_auxiliary_text (BusInputContext *context) } } +/** + * bus_input_context_update_lookup_table: + * + * Update contents in the lookup table. + * Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_update_lookup_table (BusInputContext *context, IBusLookupTable *table, @@ -1479,11 +1417,11 @@ bus_input_context_update_lookup_table (BusInputContext *context, context->lookup_table_visible = visible; if (context->capabilities & IBUS_CAP_LOOKUP_TABLE) { - bus_input_context_send_signal (context, + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)table); + bus_input_context_emit_signal (context, "UpdateLookupTable", - IBUS_TYPE_LOOKUP_TABLE, &(context->lookup_table), - G_TYPE_BOOLEAN, &(context->lookup_table_visible), - G_TYPE_INVALID); + g_variant_new ("(vb)", variant, visible), + NULL); } else { g_signal_emit (context, @@ -1494,6 +1432,11 @@ bus_input_context_update_lookup_table (BusInputContext *context, } } +/** + * bus_input_context_show_lookup_table: + * + * Show the lookup table. Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_show_lookup_table (BusInputContext *context) { @@ -1506,9 +1449,10 @@ bus_input_context_show_lookup_table (BusInputContext *context) context->lookup_table_visible = TRUE; if ((context->capabilities & IBUS_CAP_LOOKUP_TABLE) == IBUS_CAP_LOOKUP_TABLE) { - bus_input_context_send_signal (context, + bus_input_context_emit_signal (context, "ShowLookupTable", - G_TYPE_INVALID); + NULL, + NULL); } else { g_signal_emit (context, @@ -1517,6 +1461,11 @@ bus_input_context_show_lookup_table (BusInputContext *context) } } +/** + * bus_input_context_hide_lookup_table: + * + * Hide the lookup table. Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_hide_lookup_table (BusInputContext *context) { @@ -1529,9 +1478,10 @@ bus_input_context_hide_lookup_table (BusInputContext *context) context->lookup_table_visible = FALSE; if ((context->capabilities & IBUS_CAP_LOOKUP_TABLE) == IBUS_CAP_LOOKUP_TABLE) { - bus_input_context_send_signal (context, + bus_input_context_emit_signal (context, "HideLookupTable", - G_TYPE_INVALID); + NULL, + NULL); } else { g_signal_emit (context, @@ -1540,6 +1490,11 @@ bus_input_context_hide_lookup_table (BusInputContext *context) } } +/** + * bus_input_context_page_up_lookup_table: + * + * Change cursor position. Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_page_up_lookup_table (BusInputContext *context) { @@ -1550,9 +1505,10 @@ bus_input_context_page_up_lookup_table (BusInputContext *context) } if ((context->capabilities & IBUS_CAP_LOOKUP_TABLE) == IBUS_CAP_LOOKUP_TABLE) { - bus_input_context_send_signal (context, + bus_input_context_emit_signal (context, "PageUpLookupTable", - G_TYPE_INVALID); + NULL, + NULL); } else { g_signal_emit (context, @@ -1561,6 +1517,11 @@ bus_input_context_page_up_lookup_table (BusInputContext *context) } } +/** + * bus_input_context_page_down_lookup_table: + * + * Change cursor position. Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_page_down_lookup_table (BusInputContext *context) { @@ -1571,9 +1532,10 @@ bus_input_context_page_down_lookup_table (BusInputContext *context) } if ((context->capabilities & IBUS_CAP_LOOKUP_TABLE) == IBUS_CAP_LOOKUP_TABLE) { - bus_input_context_send_signal (context, + bus_input_context_emit_signal (context, "PageDownLookupTable", - G_TYPE_INVALID); + NULL, + NULL); } else { g_signal_emit (context, @@ -1582,6 +1544,11 @@ bus_input_context_page_down_lookup_table (BusInputContext *context) } } +/** + * bus_input_context_cursor_up_lookup_table: + * + * Change cursor position. Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_cursor_up_lookup_table (BusInputContext *context) { @@ -1592,9 +1559,10 @@ bus_input_context_cursor_up_lookup_table (BusInputContext *context) } if ((context->capabilities & IBUS_CAP_LOOKUP_TABLE) == IBUS_CAP_LOOKUP_TABLE) { - bus_input_context_send_signal (context, + bus_input_context_emit_signal (context, "CursorUpLookupTable", - G_TYPE_INVALID); + NULL, + NULL); } else { g_signal_emit (context, @@ -1603,6 +1571,11 @@ bus_input_context_cursor_up_lookup_table (BusInputContext *context) } } +/** + * bus_input_context_cursor_down_lookup_table: + * + * Change cursor position. Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_cursor_down_lookup_table (BusInputContext *context) { @@ -1613,9 +1586,10 @@ bus_input_context_cursor_down_lookup_table (BusInputContext *context) } if ((context->capabilities & IBUS_CAP_LOOKUP_TABLE) == IBUS_CAP_LOOKUP_TABLE) { - bus_input_context_send_signal (context, + bus_input_context_emit_signal (context, "CursorDownLookupTable", - G_TYPE_INVALID); + NULL, + NULL); } else { g_signal_emit (context, @@ -1624,6 +1598,11 @@ bus_input_context_cursor_down_lookup_table (BusInputContext *context) } } +/** + * bus_input_context_register_properties: + * + * Register properties. Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_register_properties (BusInputContext *context, IBusPropList *props) @@ -1632,10 +1611,11 @@ bus_input_context_register_properties (BusInputContext *context, g_assert (IBUS_IS_PROP_LIST (props)); if (context->capabilities & IBUS_CAP_PROPERTY) { - bus_input_context_send_signal (context, + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)props); + bus_input_context_emit_signal (context, "RegisterProperties", - IBUS_TYPE_PROP_LIST, &props, - G_TYPE_INVALID); + g_variant_new ("(v)", variant), + NULL); } else { g_signal_emit (context, @@ -1645,6 +1625,11 @@ bus_input_context_register_properties (BusInputContext *context, } } +/** + * bus_input_context_update_property: + * + * Update property. Send D-Bus signal to update status of client or send glib signal to the panel, depending on capabilities of the client. + */ static void bus_input_context_update_property (BusInputContext *context, IBusProperty *prop) @@ -1653,10 +1638,11 @@ bus_input_context_update_property (BusInputContext *context, g_assert (IBUS_IS_PROPERTY (prop)); if (context->capabilities & IBUS_CAP_PROPERTY) { - bus_input_context_send_signal (context, + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)prop); + bus_input_context_emit_signal (context, "UpdateProperty", - IBUS_TYPE_PROPERTY, &prop, - G_TYPE_INVALID); + g_variant_new ("(v)", variant), + NULL); } else { g_signal_emit (context, @@ -1666,6 +1652,12 @@ bus_input_context_update_property (BusInputContext *context, } } +/** + * _engine_destroy_cb: + * + * A function to be called when "destroy" glib signal is sent to the engine object. + * Remove the engine from the context. + */ static void _engine_destroy_cb (BusEngineProxy *engine, BusInputContext *context) @@ -1678,6 +1670,11 @@ _engine_destroy_cb (BusEngineProxy *engine, bus_input_context_set_engine (context, NULL); } +/** + * _engine_commit_text_cb: + * + * A function to be called when "commit-text" glib signal is sent to the engine object. + */ static void _engine_commit_text_cb (BusEngineProxy *engine, IBusText *text, @@ -1692,6 +1689,11 @@ _engine_commit_text_cb (BusEngineProxy *engine, bus_input_context_commit_text (context, text); } +/** + * _engine_forward_key_event_cb: + * + * A function to be called when "forward-key-event" glib signal is sent to the engine object. + */ static void _engine_forward_key_event_cb (BusEngineProxy *engine, guint keyval, @@ -1704,17 +1706,17 @@ _engine_forward_key_event_cb (BusEngineProxy *engine, g_assert (context->engine == engine); - if (!context->enabled) - return; - - bus_input_context_send_signal (context, + bus_input_context_emit_signal (context, "ForwardKeyEvent", - G_TYPE_UINT, &keyval, - G_TYPE_UINT, &keycode, - G_TYPE_UINT, &state, - G_TYPE_INVALID); + g_variant_new ("(uuu)", keyval, keycode, state), + NULL); } +/** + * _engine_delete_surrounding_text_cb: + * + * A function to be called when "delete-surrounding-text" glib signal is sent to the engine object. + */ static void _engine_delete_surrounding_text_cb (BusEngineProxy *engine, gint offset_from_cursor, @@ -1726,16 +1728,37 @@ _engine_delete_surrounding_text_cb (BusEngineProxy *engine, g_assert (context->engine == engine); - if (!context->enabled) - return; - - bus_input_context_send_signal (context, + bus_input_context_emit_signal (context, "DeleteSurroundingText", - G_TYPE_INT, &offset_from_cursor, - G_TYPE_UINT, &nchars, - G_TYPE_INVALID); + g_variant_new ("(iu)", offset_from_cursor, nchars), + NULL); +} + +/** + * _engine_require_surrounding_text_cb: + * + * A function to be called when "require-surrounding-text" glib signal is sent to the engine object. + */ +static void +_engine_require_surrounding_text_cb (BusEngineProxy *engine, + BusInputContext *context) +{ + g_assert (BUS_IS_ENGINE_PROXY (engine)); + g_assert (BUS_IS_INPUT_CONTEXT (context)); + + g_assert (context->engine == engine); + + bus_input_context_emit_signal (context, + "RequireSurroundingText", + NULL, + NULL); } +/** + * _engine_update_preedit_text_cb: + * + * A function to be called when "update-preedit-text" glib signal is sent to the engine object. + */ static void _engine_update_preedit_text_cb (BusEngineProxy *engine, IBusText *text, @@ -1750,12 +1773,14 @@ _engine_update_preedit_text_cb (BusEngineProxy *engine, g_assert (context->engine == engine); - if (!context->enabled) - return; - bus_input_context_update_preedit_text (context, text, cursor_pos, visible, mode); } +/** + * _engine_update_auxiliary_text_cb: + * + * A function to be called when "update-auxiliary-text" glib signal is sent to the engine object. + */ static void _engine_update_auxiliary_text_cb (BusEngineProxy *engine, IBusText *text, @@ -1768,12 +1793,14 @@ _engine_update_auxiliary_text_cb (BusEngineProxy *engine, g_assert (context->engine == engine); - if (!context->enabled) - return; - bus_input_context_update_auxiliary_text (context, text, visible); } +/** + * _engine_update_lookup_table_cb: + * + * A function to be called when "update-lookup-table" glib signal is sent to the engine object. + */ static void _engine_update_lookup_table_cb (BusEngineProxy *engine, IBusLookupTable *table, @@ -1786,12 +1813,14 @@ _engine_update_lookup_table_cb (BusEngineProxy *engine, g_assert (context->engine == engine); - if (!context->enabled) - return; - bus_input_context_update_lookup_table (context, table, visible); } +/** + * _engine_register_properties_cb: + * + * A function to be called when "register-properties" glib signal is sent to the engine object. + */ static void _engine_register_properties_cb (BusEngineProxy *engine, IBusPropList *props, @@ -1803,12 +1832,14 @@ _engine_register_properties_cb (BusEngineProxy *engine, g_assert (context->engine == engine); - if (!context->enabled) - return; - bus_input_context_register_properties (context, props); } +/** + * _engine_update_property_cb: + * + * A function to be called when "update-property" glib signal is sent to the engine object. + */ static void _engine_update_property_cb (BusEngineProxy *engine, IBusProperty *prop, @@ -1820,9 +1851,6 @@ _engine_update_property_cb (BusEngineProxy *engine, g_assert (context->engine == engine); - if (!context->enabled) - return; - bus_input_context_update_property (context, prop); } @@ -1836,9 +1864,6 @@ _engine_update_property_cb (BusEngineProxy *engine, \ g_assert (context->engine == engine); \ \ - if (!context->enabled) \ - return; \ - \ bus_input_context_##name (context); \ } @@ -1854,37 +1879,80 @@ DEFINE_FUNCTION (cursor_up_lookup_table) DEFINE_FUNCTION (cursor_down_lookup_table) #undef DEFINE_FUNCTION +BusInputContext * +bus_input_context_new (BusConnection *connection, + const gchar *client) +{ + static guint id = 0; + + g_assert (connection == NULL || BUS_IS_CONNECTION (connection)); + g_assert (client != NULL); + + gchar *path = g_strdup_printf (IBUS_PATH_INPUT_CONTEXT, ++id); + + BusInputContext *context = NULL; + if (connection) { + context = (BusInputContext *) g_object_new (BUS_TYPE_INPUT_CONTEXT, + "object-path", path, + "connection", bus_connection_get_dbus_connection (connection), + NULL); + } + else { + context = (BusInputContext *) g_object_new (BUS_TYPE_INPUT_CONTEXT, + "object-path", path, + NULL); + } + g_free (path); + + context->client = g_strdup (client); + + /* it is a fake input context, just need process hotkey */ + context->fake = (strncmp (client, "fake", 4) == 0); + + if (connection) { + g_object_ref_sink (connection); + context->connection = connection; + g_signal_connect (context->connection, + "destroy", + (GCallback) _connection_destroy_cb, + context); + } + + return context; +} + void bus_input_context_enable (BusInputContext *context) { g_assert (BUS_IS_INPUT_CONTEXT (context)); if (!context->has_focus) { - context->enabled = TRUE; - /* TODO: Do we need to emit "enabled" signal? */ return; } if (context->engine == NULL) { - g_signal_emit (context, context_signals[REQUEST_ENGINE], 0, NULL); + IBusEngineDesc *desc = NULL; + g_signal_emit (context, + context_signals[REQUEST_ENGINE], 0, + NULL, + &desc); + if (desc != NULL) { + bus_input_context_set_engine_by_desc (context, + desc, + g_gdbus_timeout, /* timeout in msec. */ + NULL, /* we do not cancel the call. */ + NULL, /* use the default callback function. */ + NULL); + } } if (context->engine == NULL) return; - context->enabled = TRUE; - - bus_engine_proxy_enable (context->engine); bus_engine_proxy_focus_in (context->engine); + bus_engine_proxy_enable (context->engine); bus_engine_proxy_set_capabilities (context->engine, context->capabilities); bus_engine_proxy_set_cursor_location (context->engine, context->x, context->y, context->w, context->h); - - bus_input_context_send_signal (context, - "Enabled", - G_TYPE_INVALID); - g_signal_emit (context, - context_signals[ENABLED], - 0); } void @@ -1901,49 +1969,33 @@ bus_input_context_disable (BusInputContext *context) bus_engine_proxy_focus_out (context->engine); bus_engine_proxy_disable (context->engine); } - - bus_input_context_send_signal (context, - "Disabled", - G_TYPE_INVALID); - g_signal_emit (context, - context_signals[DISABLED], - 0); - - context->enabled = FALSE; -} - -gboolean -bus_input_context_is_enabled (BusInputContext *context) -{ - g_assert (BUS_IS_INPUT_CONTEXT (context)); - - return context->enabled; } +/* A list of signals (and their handler functions) that could be emit by the engine proxy object. */ const static struct { const gchar *name; GCallback callback; -} signals [] = { - { "commit-text", G_CALLBACK (_engine_commit_text_cb) }, - { "forward-key-event", G_CALLBACK (_engine_forward_key_event_cb) }, - { "delete-surrounding-text", G_CALLBACK (_engine_delete_surrounding_text_cb) }, - { "update-preedit-text", G_CALLBACK (_engine_update_preedit_text_cb) }, - { "show-preedit-text", G_CALLBACK (_engine_show_preedit_text_cb) }, - { "hide-preedit-text", G_CALLBACK (_engine_hide_preedit_text_cb) }, - { "update-auxiliary-text", G_CALLBACK (_engine_update_auxiliary_text_cb) }, - { "show-auxiliary-text", G_CALLBACK (_engine_show_auxiliary_text_cb) }, - { "hide-auxiliary-text", G_CALLBACK (_engine_hide_auxiliary_text_cb) }, - { "update-lookup-table", G_CALLBACK (_engine_update_lookup_table_cb) }, - { "show-lookup-table", G_CALLBACK (_engine_show_lookup_table_cb) }, - { "hide-lookup-table", G_CALLBACK (_engine_hide_lookup_table_cb) }, - { "page-up-lookup-table", G_CALLBACK (_engine_page_up_lookup_table_cb) }, - { "page-down-lookup-table", G_CALLBACK (_engine_page_down_lookup_table_cb) }, - { "cursor-up-lookup-table", G_CALLBACK (_engine_cursor_up_lookup_table_cb) }, +} engine_signals [] = { + { "commit-text", G_CALLBACK (_engine_commit_text_cb) }, + { "forward-key-event", G_CALLBACK (_engine_forward_key_event_cb) }, + { "delete-surrounding-text", G_CALLBACK (_engine_delete_surrounding_text_cb) }, + { "require-surrounding-text", G_CALLBACK (_engine_require_surrounding_text_cb) }, + { "update-preedit-text", G_CALLBACK (_engine_update_preedit_text_cb) }, + { "show-preedit-text", G_CALLBACK (_engine_show_preedit_text_cb) }, + { "hide-preedit-text", G_CALLBACK (_engine_hide_preedit_text_cb) }, + { "update-auxiliary-text", G_CALLBACK (_engine_update_auxiliary_text_cb) }, + { "show-auxiliary-text", G_CALLBACK (_engine_show_auxiliary_text_cb) }, + { "hide-auxiliary-text", G_CALLBACK (_engine_hide_auxiliary_text_cb) }, + { "update-lookup-table", G_CALLBACK (_engine_update_lookup_table_cb) }, + { "show-lookup-table", G_CALLBACK (_engine_show_lookup_table_cb) }, + { "hide-lookup-table", G_CALLBACK (_engine_hide_lookup_table_cb) }, + { "page-up-lookup-table", G_CALLBACK (_engine_page_up_lookup_table_cb) }, + { "page-down-lookup-table", G_CALLBACK (_engine_page_down_lookup_table_cb) }, + { "cursor-up-lookup-table", G_CALLBACK (_engine_cursor_up_lookup_table_cb) }, { "cursor-down-lookup-table", G_CALLBACK (_engine_cursor_down_lookup_table_cb) }, - { "register-properties", G_CALLBACK (_engine_register_properties_cb) }, - { "update-property", G_CALLBACK (_engine_update_property_cb) }, - { "destroy", G_CALLBACK (_engine_destroy_cb) }, - { NULL, 0 } + { "register-properties", G_CALLBACK (_engine_register_properties_cb) }, + { "update-property", G_CALLBACK (_engine_update_property_cb) }, + { "destroy", G_CALLBACK (_engine_destroy_cb) }, }; static void @@ -1958,10 +2010,11 @@ bus_input_context_unset_engine (BusInputContext *context) if (context->engine) { gint i; - for (i = 0; signals[i].name != NULL; i++) { - g_signal_handlers_disconnect_by_func (context->engine, signals[i].callback, context); + /* uninstall signal handlers for the engine. */ + for (i = 0; i < G_N_ELEMENTS(engine_signals); i++) { + g_signal_handlers_disconnect_by_func (context->engine, + engine_signals[i].callback, context); } - /* Do not destroy the engine anymore, because of global engine feature */ g_object_unref (context->engine); context->engine = NULL; } @@ -1986,15 +2039,16 @@ bus_input_context_set_engine (BusInputContext *context, else { gint i; context->engine = engine; - g_object_ref_sink (context->engine); + g_object_ref (context->engine); - for (i = 0; signals[i].name != NULL; i++) { + /* handle signals from the engine. */ + for (i = 0; i < G_N_ELEMENTS(engine_signals); i++) { g_signal_connect (context->engine, - signals[i].name, - signals[i].callback, + engine_signals[i].name, + engine_signals[i].callback, context); } - if (context->has_focus && context->enabled) { + if (context->has_focus) { bus_engine_proxy_focus_in (context->engine); bus_engine_proxy_enable (context->engine); bus_engine_proxy_set_capabilities (context->engine, context->capabilities); @@ -2006,92 +2060,225 @@ bus_input_context_set_engine (BusInputContext *context, 0); } -BusEngineProxy * -bus_input_context_get_engine (BusInputContext *context) +static void set_engine_by_desc_data_free (SetEngineByDescData *data) { - g_assert (BUS_IS_INPUT_CONTEXT (context)); + if (data->context != NULL) { + if (data->context->data == data) + data->context->data = NULL; + g_object_unref (data->context); + } - return context->engine; + if (data->simple != NULL) { + g_object_unref (data->simple); + } + + if (data->cancellable != NULL) + g_object_unref (data->cancellable); + + if (data->origin_cancellable != NULL) { + if (data->cancelled_handler_id != 0) + g_cancellable_disconnect (data->origin_cancellable, + data->cancelled_handler_id); + g_object_unref (data->origin_cancellable); + } + + g_slice_free (SetEngineByDescData, data); } -static gboolean -bus_input_context_filter_keyboard_shortcuts (BusInputContext *context, - guint keyval, - guint keycode, - guint modifiers) +/** + * new_engine_cb: + * + * A callback function to be called when bus_engine_proxy_new() is finished. + */ +static void +new_engine_cb (GObject *obj, + GAsyncResult *res, + SetEngineByDescData *data) { - g_assert (BUS_IS_INPUT_CONTEXT (context)); + GError *error = NULL; + BusEngineProxy *engine = bus_engine_proxy_new_finish (res, &error); - gboolean retval = FALSE; - - if (context->filter_release){ - if(modifiers & IBUS_RELEASE_MASK) { - /* filter release key event */ - return TRUE; + if (engine == NULL) { + g_simple_async_result_set_from_error (data->simple, error); + g_error_free (error); + } + else { + if (data->context->data != data) { + /* Request has been overriden or cancelled */ + g_object_unref (engine); + g_simple_async_result_set_error (data->simple, + G_IO_ERROR, + G_IO_ERROR_CANCELLED, + "Opertation was cancelled"); } else { - /* stop filter release key event */ - context->filter_release = FALSE; + /* Let BusEngineProxy call a Disable signal. */ + bus_input_context_disable (data->context); + bus_input_context_set_engine (data->context, engine); + g_object_unref (engine); + bus_input_context_enable (data->context); + g_simple_async_result_set_op_res_gboolean (data->simple, TRUE); } } - if (keycode != 0 && !BUS_DEFAULT_IBUS->use_sys_layout) { - IBusKeymap *keymap = BUS_DEFAULT_KEYMAP; - if (keymap != NULL) { - guint tmp = ibus_keymap_lookup_keysym (keymap, - keycode, - modifiers); - if (tmp != IBUS_VoidSymbol) - keyval = tmp; + /* Call the callback function for bus_input_context_set_engine_by_desc(). */ + g_simple_async_result_complete_in_idle (data->simple); + + set_engine_by_desc_data_free (data); +} + +static void +cancel_set_engine_by_desc (SetEngineByDescData *data) +{ + if (data->context->data == data) + data->context->data = NULL; + + if (data->origin_cancellable != NULL) { + if (data->cancelled_handler_id != 0) { + g_cancellable_disconnect (data->origin_cancellable, + data->cancelled_handler_id); + data->cancelled_handler_id = 0; } - } - retval = bus_ibus_impl_filter_keyboard_shortcuts (BUS_DEFAULT_IBUS, - context, - keyval, - modifiers, - context->prev_keyval, - context->prev_modifiers); - context->prev_keyval = keyval; - context->prev_modifiers = modifiers; + g_object_unref (data->origin_cancellable); + data->origin_cancellable = NULL; + } - if (retval == TRUE) { - /* begin filter release key event */ - context->filter_release = TRUE; + if (data->cancellable != NULL) { + g_cancellable_cancel (data->cancellable); + g_object_unref (data->cancellable); + data->cancellable = NULL; } +} - return retval; +static gboolean +set_engine_by_desc_cancelled_idle_cb (SetEngineByDescData *data) +{ + cancel_set_engine_by_desc (data); + return FALSE; +} + +static void +set_engine_by_desc_cancelled_cb (GCancellable *cancellable, + SetEngineByDescData *data) +{ + /* Cancel in idle to avoid deadlock */ + g_idle_add ((GSourceFunc) set_engine_by_desc_cancelled_idle_cb, data); } +/** + * set_engine_by_desc_ready_cb: + * + * A default callback function for bus_input_context_set_engine_by_desc(). + */ +static void +set_engine_by_desc_ready_cb (BusInputContext *context, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + if (!bus_input_context_set_engine_by_desc_finish (context, res, &error)) { + g_warning ("Set context engine failed: %s", error->message); + g_error_free (error); + } +} -static gboolean -bus_input_context_send_signal (BusInputContext *context, - const gchar *signal_name, - GType first_arg_type, - ...) +void +bus_input_context_set_engine_by_desc (BusInputContext *context, + IBusEngineDesc *desc, + gint timeout, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { g_assert (BUS_IS_INPUT_CONTEXT (context)); - g_assert (signal_name != NULL); - g_assert (context->connection != NULL); + g_assert (IBUS_IS_ENGINE_DESC (desc)); + g_assert (cancellable == NULL || G_IS_CANCELLABLE (cancellable)); + + if (context->data != NULL) { + /* Cancel previous set_engine_by_desc() request */ + cancel_set_engine_by_desc (context->data); + } + + /* Previous request must be completed or cancelled */ + g_assert (context->data == NULL); - va_list args; - gboolean retval; - IBusMessage *message; + if (callback == NULL) + callback = (GAsyncReadyCallback) set_engine_by_desc_ready_cb; - message = ibus_message_new_signal (ibus_service_get_path ((IBusService *)context), - IBUS_INTERFACE_INPUT_CONTEXT, - signal_name); + GSimpleAsyncResult *simple = + g_simple_async_result_new ((GObject *) context, + callback, + user_data, + bus_input_context_set_engine_by_desc); - ibus_message_set_sender (message, IBUS_SERVICE_IBUS); + if (g_cancellable_is_cancelled (cancellable)) { + g_simple_async_result_set_error (simple, + G_IO_ERROR, + G_IO_ERROR_CANCELLED, + "Operation was cancelled"); + g_simple_async_result_complete_in_idle (simple); + g_object_unref (simple); + return; + } + + SetEngineByDescData *data = g_slice_new0 (SetEngineByDescData); + context->data = data; + data->context = context; + g_object_ref (context); + data->simple = simple; + + if (cancellable != NULL) { + data->origin_cancellable = cancellable; + g_object_ref (cancellable); + data->cancelled_handler_id = + g_cancellable_connect (data->origin_cancellable, + (GCallback) set_engine_by_desc_cancelled_cb, + data, + NULL); + } + + data->cancellable = g_cancellable_new (); + /* We can cancel the bus_engine_proxy_new() call by data->cancellable; + * See cancel_set_engine_by_desc() and set_engine_by_desc_cancelled_cb(). */ + bus_engine_proxy_new (desc, + timeout, + data->cancellable, + (GAsyncReadyCallback) new_engine_cb, + data); +} - va_start (args, first_arg_type); - ibus_message_append_args_valist (message, first_arg_type, args); - va_end (args); +gboolean +bus_input_context_set_engine_by_desc_finish (BusInputContext *context, + GAsyncResult *res, + GError **error) +{ + GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (res); - retval = ibus_connection_send ((IBusConnection *)context->connection, message); - ibus_message_unref (message); + g_assert (BUS_IS_INPUT_CONTEXT (context)); + g_assert (g_simple_async_result_get_source_tag (simple) == + bus_input_context_set_engine_by_desc); - return retval; + if (g_simple_async_result_propagate_error (simple, error)) + return FALSE; + return TRUE; +} + +BusEngineProxy * +bus_input_context_get_engine (BusInputContext *context) +{ + g_assert (BUS_IS_INPUT_CONTEXT (context)); + + return context->engine; +} + +IBusEngineDesc * +bus_input_context_get_engine_desc (BusInputContext *context) +{ + g_assert (BUS_IS_INPUT_CONTEXT (context)); + if (context->engine) + return bus_engine_proxy_get_desc (context->engine); + return NULL; } guint @@ -2100,3 +2287,40 @@ bus_input_context_get_capabilities (BusInputContext *context) g_assert (BUS_IS_INPUT_CONTEXT (context)); return context->capabilities; } + +void +bus_input_context_set_capabilities (BusInputContext *context, + guint capabilities) +{ + g_assert (BUS_IS_INPUT_CONTEXT (context)); + + /* If the context does not support IBUS_CAP_FOCUS, then the client application have to handle all information such as + * preedit and auxiliary text. */ + if ((capabilities & IBUS_CAP_FOCUS) == 0) { + capabilities |= (IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_AUXILIARY_TEXT | IBUS_CAP_LOOKUP_TABLE | IBUS_CAP_PROPERTY); + } + + if (context->capabilities != capabilities) { + context->capabilities = capabilities; + + /* If the context does not support IBUS_CAP_FOCUS, then we always assume + * it has focus. */ + if ((capabilities & IBUS_CAP_FOCUS) == 0) { + bus_input_context_focus_in (context); + } + + if (context->engine) { + bus_engine_proxy_set_capabilities (context->engine, capabilities); + } + } + + context->capabilities = capabilities; +} + + +const gchar * +bus_input_context_get_client (BusInputContext *context) +{ + g_assert (BUS_IS_INPUT_CONTEXT (context)); + return context->client; +} diff --git a/bus/inputcontext.h b/bus/inputcontext.h index ba3fdb27e..43e04cd85 100644 --- a/bus/inputcontext.h +++ b/bus/inputcontext.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,10 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#ifndef __INPUT_CONTEXT_H_ -#define __INPUT_CONTEXT_H_ +#ifndef __BUS_INPUT_CONTEXT_H_ +#define __BUS_INPUT_CONTEXT_H_ #include + #include "connection.h" #include "factoryproxy.h" @@ -48,78 +50,163 @@ G_BEGIN_DECLS typedef struct _BusInputContext BusInputContext; typedef struct _BusInputContextClass BusInputContextClass; -struct _BusInputContext { - IBusService parent; - - /* instance members */ - BusConnection *connection; - BusEngineProxy *engine; - gchar *client; - - gboolean has_focus; - gboolean enabled; - - /* capabilities */ - guint capabilities; - - /* cursor location */ - gint x; - gint y; - gint w; - gint h; - - /* prev key event */ - guint prev_keyval; - guint prev_modifiers; - - /* preedit text */ - IBusText *preedit_text; - guint preedit_cursor_pos; - gboolean preedit_visible; - guint preedit_mode; - - /* auxiliary text */ - IBusText *auxiliary_text; - gboolean auxiliary_visible; - - /* lookup table */ - IBusLookupTable *lookup_table; - gboolean lookup_table_visible; - - /* filter release */ - gboolean filter_release; -}; - -struct _BusInputContextClass { - IBusServiceClass parent; - - /* class members */ -}; - GType bus_input_context_get_type (void); BusInputContext *bus_input_context_new (BusConnection *connection, const gchar *client); + +/** + * bus_input_context_focus_in: + * + * Give a focus to the context. Call FocusIn, Enable, SetCapabilities, and SetCursorLocation methods of the engine for the context, + * and then emit glib signals to the context object. This function does nothing if the context already has a focus. + */ void bus_input_context_focus_in (BusInputContext *context); + +/** + * bus_input_context_focus_out: + * + * Remove a focus from the context. Call FocusOut method of the engine for the context. + * This function does nothing if the context does not have a focus. + */ void bus_input_context_focus_out (BusInputContext *context); + +/** + * bus_input_context_has_focus: + * @returns: context->has_focus. + */ gboolean bus_input_context_has_focus (BusInputContext *context); + +/** + * bus_input_context_enable: + * + * Enable the current engine for the context. Request an engine (if needed), call FocusIn, Enable, SetCapabilities, and SetCursorLocation methods + * of the engine for the context, and then emit glib and D-Bus "enabled" signals. + */ void bus_input_context_enable (BusInputContext *context); + +/** + * bus_input_context_disable: + * + * Disable the current engine for the context. Request an engine (if needed), call FocusIn, Enable, SetCapabilities, and SetCursorLocation methods + * of the engine for the context, and then emit glib and D-Bus "enabled" signals. + */ void bus_input_context_disable (BusInputContext *context); -gboolean bus_input_context_is_enabled (BusInputContext *context); + +/** + * bus_input_context_page_up: + * + * Call page_up method of the current engine proxy. + */ void bus_input_context_page_up (BusInputContext *context); + +/** + * bus_input_context_page_down: + * + * Call page_down method of the current engine proxy. + */ void bus_input_context_page_down (BusInputContext *context); + +/** + * bus_input_context_cursor_up: + * + * Call cursor_up method of the current engine proxy. + */ void bus_input_context_cursor_up (BusInputContext *context); + +/** + * bus_input_context_cursor_down: + * + * Call cursor_down method of the current engine proxy. + */ void bus_input_context_cursor_down (BusInputContext *context); + +/** + * bus_input_context_candidate_clicked: + * + * Call candidate_clicked method of the current engine proxy. + */ void bus_input_context_candidate_clicked(BusInputContext *context, guint index, guint button, guint state); + +/** + * bus_input_context_set_engine: + * + * Use the engine on the context. + */ void bus_input_context_set_engine (BusInputContext *context, - BusEngineProxy *factory); + BusEngineProxy *engine); + +/** + * bus_input_context_set_engine_by_desc: + * @desc: the engine to use on the context. + * @timeout: timeout (in ms) for D-Bus calls. + * @callback: a function to be called when bus_input_context_set_engine_by_desc is finished. if NULL, the default callback + * function, which just calls bus_input_context_set_engine_by_desc_finish, is used. + * + * Create a new BusEngineProxy object and use it on the context. + */ +void bus_input_context_set_engine_by_desc + (BusInputContext *context, + IBusEngineDesc *desc, + gint timeout, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +/** + * bus_input_context_set_engine_by_desc_finish: + * + * A function to be called by the GAsyncReadyCallback function for bus_input_context_set_engine_by_desc. + */ +gboolean bus_input_context_set_engine_by_desc_finish + (BusInputContext *context, + GAsyncResult *res, + GError **error); + +/** + * bus_input_context_get_engine: + * + * Get a BusEngineProxy object of the current engine. + */ BusEngineProxy *bus_input_context_get_engine (BusInputContext *context); + +/** + * bus_input_context_get_engine_desc: + * + * Get an IBusEngineDesc object of the current engine. + */ +IBusEngineDesc *bus_input_context_get_engine_desc (BusInputContext *context); + +/** + * bus_input_context_property_activate: + * + * Call property_activate method of the current engine proxy. + */ void bus_input_context_property_activate(BusInputContext *context, const gchar *prop_name, gint prop_state); + +/** + * bus_input_context_get_capabilities: + * @returns: context->capabilities. + */ guint bus_input_context_get_capabilities (BusInputContext *context); +/** + * bus_input_context_set_capabilities: + * + * Call set_capabilities method of the current engine proxy. + */ +void bus_input_context_set_capabilities (BusInputContext *context, + guint capabilities); + +/** + * bus_input_context_get_client: + * @returns: context->client. + */ +const gchar *bus_input_context_get_client (BusInputContext *context); + G_END_DECLS #endif diff --git a/bus/main.c b/bus/main.c index 2357ae8dc..d59b5b74c 100644 --- a/bus/main.c +++ b/bus/main.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -19,18 +20,21 @@ * Boston, MA 02111-1307, USA. */ #include -#include -#include -#include #include -#include -#include +#include +#include +#include #include +#include #include -#include "server.h" -#include "ibusimpl.h" +#include +#include +#include +#include -gchar **g_argv = NULL; +#include "global.h" +#include "ibusimpl.h" +#include "server.h" static gboolean daemonize = FALSE; static gboolean single = FALSE; @@ -40,14 +44,6 @@ static gboolean restart = FALSE; static gchar *panel = "default"; static gchar *config = "default"; static gchar *desktop = "gnome"; -static gchar *address = ""; -gboolean g_rescan = FALSE; -gboolean g_mempro = FALSE; -gboolean g_verbose = FALSE; -gint g_dbus_timeout = 5000; -#ifdef G_THREADS_ENABLED -gint g_monitor_timeout = 0; -#endif static void show_version_and_quit (void) @@ -63,12 +59,12 @@ static const GOptionEntry entries[] = { "single", 's', 0, G_OPTION_ARG_NONE, &single, "do not execute panel and config module.", NULL }, { "xim", 'x', 0, G_OPTION_ARG_NONE, &xim, "execute ibus XIM server.", NULL }, { "desktop", 'n', 0, G_OPTION_ARG_STRING, &desktop, "specify the name of desktop session. [default=gnome]", "name" }, - { "panel", 'p', 0, G_OPTION_ARG_STRING, &panel, "specify the cmdline of panel program.", "cmdline" }, - { "config", 'c', 0, G_OPTION_ARG_STRING, &config, "specify the cmdline of config program.", "cmdline" }, - { "address", 'a', 0, G_OPTION_ARG_STRING, &address, "specify the address of ibus daemon.", "address" }, + { "panel", 'p', 0, G_OPTION_ARG_STRING, &panel, "specify the cmdline of panel program. pass 'disable' not to start a panel program.", "cmdline" }, + { "config", 'c', 0, G_OPTION_ARG_STRING, &config, "specify the cmdline of config program. pass 'disable' not to start a config program.", "cmdline" }, + { "address", 'a', 0, G_OPTION_ARG_STRING, &g_address, "specify the address of ibus daemon.", "address" }, { "replace", 'r', 0, G_OPTION_ARG_NONE, &replace, "if there is an old ibus-daemon is running, it will be replaced.", NULL }, - { "re-scan", 't', 0, G_OPTION_ARG_NONE, &g_rescan, "force to re-scan components, and re-create registry cache.", NULL }, - { "timeout", 'o', 0, G_OPTION_ARG_INT, &g_dbus_timeout, "dbus reply timeout in milliseconds.", "timeout [default is 2000]" }, + { "cache", 't', 0, G_OPTION_ARG_STRING, &g_cache, "specify the cache mode. [auto/refresh/none]", NULL }, + { "timeout", 'o', 0, G_OPTION_ARG_INT, &g_gdbus_timeout, "gdbus reply timeout in milliseconds. pass -1 to use the default timeout of gdbus.", "timeout [default is 5000]" }, #ifdef G_THREADS_ENABLED { "monitor-timeout", 'j', 0, G_OPTION_ARG_INT, &g_monitor_timeout, "timeout of poll changes of engines in seconds. 0 to disable it. ", "timeout [default is 0]" }, #endif @@ -78,17 +74,22 @@ static const GOptionEntry entries[] = { NULL }, }; +/** + * execute_cmdline: + * @cmdline: An absolute path of the executable and its parameters, e.g. "/usr/lib/ibus/ibus-x11 --kill-daemon". + * @returns: TRUE if both parsing cmdline and executing the command succeed. + * + * Execute cmdline. Child process's stdin, stdout, and stderr are attached to /dev/null. + * You don't have to handle SIGCHLD from the child process since glib will do. + */ static gboolean execute_cmdline (const gchar *cmdline) { g_assert (cmdline); - gint argc; - gchar **argv; - gboolean retval; - GError *error; - - error = NULL; + gint argc = 0; + gchar **argv = NULL; + GError *error = NULL; if (!g_shell_parse_argv (cmdline, &argc, &argv, &error)) { g_warning ("Can not parse cmdline `%s` exec: %s", cmdline, error->message); g_error_free (error); @@ -96,7 +97,7 @@ execute_cmdline (const gchar *cmdline) } error = NULL; - retval = g_spawn_async (NULL, argv, NULL, + gboolean retval = g_spawn_async (NULL, argv, NULL, G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, NULL, &error); @@ -154,17 +155,12 @@ daemon (gint nochdir, gint noclose) } #endif -static void -_my_log_handler (const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *message, - gpointer user_data) -{ - if (g_verbose) { - g_log_default_handler (log_domain, log_level, message, user_data); - } -} - +/* + * _sig_usr2_handler: + * @sig: the signal number, which is usually SIGUSR2. + * + * A signal handler for SIGUSR2 signal. Dump a summary of memory usage to stderr. + */ static void _sig_usr2_handler (int sig) { @@ -174,21 +170,20 @@ _sig_usr2_handler (int sig) gint main (gint argc, gchar **argv) { - GOptionContext *context; - BusServer *server; - IBusBus *bus; - - GError *error = NULL; - setlocale (LC_ALL, ""); - context = g_option_context_new ("- ibus daemon"); - + GOptionContext *context = g_option_context_new ("- ibus daemon"); g_option_context_add_main_entries (context, entries, "ibus-daemon"); g_argv = g_strdupv (argv); + GError *error = NULL; if (!g_option_context_parse (context, &argc, &argv, &error)) { g_printerr ("Option parsing failed: %s\n", error->message); + g_error_free (error); + exit (-1); + } + if (g_gdbus_timeout < -1) { + g_printerr ("Bad timeout (must be >= -1): %d\n", g_gdbus_timeout); exit (-1); } @@ -217,22 +212,19 @@ main (gint argc, gchar **argv) } } - /* create a new process group */ + /* create a new process group. this is important to kill all of its children by SIGTERM at a time in bus_ibus_impl_destroy. */ setpgid (0, 0); - g_type_init (); + ibus_init (); #ifdef G_THREADS_ENABLED g_thread_init (NULL); #endif - g_log_set_handler (G_LOG_DOMAIN, - G_LOG_LEVEL_WARNING | G_LOG_LEVEL_DEBUG | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, - _my_log_handler, - NULL); + ibus_set_log_handler (g_verbose); /* check if ibus-daemon is running in this session */ if (ibus_get_address () != NULL) { - bus = ibus_bus_new (); + IBusBus *bus = ibus_bus_new (); if (ibus_bus_is_connected (bus)) { if (!replace) { @@ -245,22 +237,18 @@ main (gint argc, gchar **argv) } } g_object_unref (bus); - bus = NULL; } - /* create ibus server */ - server = bus_server_get_default (); - bus_server_listen (server); - + bus_server_init (); if (!single) { /* execute config component */ if (g_strcmp0 (config, "default") == 0) { - IBusComponent *component; + BusComponent *component; component = bus_registry_lookup_component_by_name (BUS_DEFAULT_REGISTRY, IBUS_SERVICE_CONFIG); if (component) { - ibus_component_set_restart (component, restart); + bus_component_set_restart (component, restart); } - if (component == NULL || !ibus_component_start (component, g_verbose)) { + if (component == NULL || !bus_component_start (component, g_verbose)) { g_printerr ("Can not execute default config program\n"); exit (-1); } @@ -269,14 +257,14 @@ main (gint argc, gchar **argv) exit (-1); } - /* execut panel component */ + /* execute panel component */ if (g_strcmp0 (panel, "default") == 0) { - IBusComponent *component; + BusComponent *component; component = bus_registry_lookup_component_by_name (BUS_DEFAULT_REGISTRY, IBUS_SERVICE_PANEL); if (component) { - ibus_component_set_restart (component, restart); + bus_component_set_restart (component, restart); } - if (component == NULL || !ibus_component_start (component, g_verbose)) { + if (component == NULL || !bus_component_start (component, g_verbose)) { g_printerr ("Can not execute default panel program\n"); exit (-1); } @@ -288,11 +276,10 @@ main (gint argc, gchar **argv) /* execute ibus xim server */ if (xim) { - if (!execute_cmdline (LIBEXECDIR"/ibus-x11 --kill-daemon")) + if (!execute_cmdline (LIBEXECDIR "/ibus-x11 --kill-daemon")) exit (-1); } - bus_server_run (server); - + bus_server_run (); return 0; } diff --git a/bus/marshalers.list b/bus/marshalers.list new file mode 100644 index 000000000..7bc5dc3a9 --- /dev/null +++ b/bus/marshalers.list @@ -0,0 +1,14 @@ +BOOL:UINT,UINT,UINT +OBJECT:STRING +VOID:INT,UINT +VOID:INT,INT,INT,INT +VOID:OBJECT +VOID:OBJECT,BOOLEAN +VOID:OBJECT,STRING +VOID:OBJECT,UINT,BOOLEAN +VOID:OBJECT,UINT,BOOLEAN,UINT +VOID:OBJECT,STRING,STRING,STRING +VOID:STRING +VOID:STRING,INT +VOID:UINT,UINT,UINT +VOID:VOID diff --git a/bus/matchrule.c b/bus/matchrule.c index b40efce17..836e71eff 100644 --- a/bus/matchrule.c +++ b/bus/matchrule.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,24 +19,98 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include -#include -#include "matchrule.h" -#define BUS_CONFIG_PROXY_GET_PRIVATE(o) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((o), BUS_TYPE_CONFIG_PROXY, BusMatchRulePrivate)) +#include "matchrule.h" +#include -static void bus_match_rule_destroy (BusMatchRule *rule); -static void _connection_destroy_cb (BusConnection *connection, +#include "dbusimpl.h" + +typedef enum { + MATCH_TYPE = 1 << 0, + MATCH_INTERFACE = 1 << 1, + MATCH_MEMBER = 1 << 2, + MATCH_SENDER = 1 << 3, + MATCH_DESTINATION = 1 << 4, + MATCH_PATH = 1 << 5, + MATCH_ARGS = 1 << 6, +} BusMatchFlags; + +struct _BusMatchRule { + IBusObject parent; + /* instance members */ + gint flags; + gint message_type; + gchar *interface; + gchar *member; + gchar *sender; + gchar *destination; + gchar *path; + GArray *args; + GList *recipients; +}; + +struct _BusMatchRuleClass { + IBusObjectClass parent; + /* class members */ +}; + +typedef struct _BusRecipient BusRecipient; +struct _BusRecipient { + BusConnection *connection; + gint refcount; +}; + +static BusRecipient *bus_recipient_new (BusConnection *connection); +static void bus_recipient_free (BusRecipient *recipient); +static BusRecipient *bus_recipient_ref (BusRecipient *recipient); +static gboolean bus_recipient_unref (BusRecipient *recipient); +static void bus_match_rule_destroy (BusMatchRule *rule); +static void bus_match_rule_connection_destroy_cb + (BusConnection *connection, BusMatchRule *rule); +static BusRecipient * +bus_recipient_new (BusConnection *connection) +{ + BusRecipient *recipient = g_slice_new (BusRecipient); + g_object_ref (connection); + recipient->connection = connection; + recipient->refcount = 1; + return recipient; +} + +static void +bus_recipient_free (BusRecipient *recipient) +{ + g_object_unref (recipient->connection); + g_slice_free (BusRecipient, recipient); +} + +static BusRecipient * +bus_recipient_ref (BusRecipient *recipient) +{ + recipient->refcount ++; + return recipient; +} + +static gboolean +bus_recipient_unref (BusRecipient *recipient) +{ + recipient->refcount --; + if (recipient->refcount == 0) { + bus_recipient_free (recipient); + return TRUE; + } + return FALSE; +} + G_DEFINE_TYPE (BusMatchRule, bus_match_rule, IBUS_TYPE_OBJECT) static void -bus_match_rule_class_init (BusMatchRuleClass *klass) +bus_match_rule_class_init (BusMatchRuleClass *class) { - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); + IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class); ibus_object_class->destroy = (IBusObjectDestroyFunc) bus_match_rule_destroy; } @@ -44,7 +119,7 @@ static void bus_match_rule_init (BusMatchRule *rule) { rule->flags = 0; - rule->message_type = DBUS_MESSAGE_TYPE_INVALID; + rule->message_type = G_DBUS_MESSAGE_TYPE_INVALID; rule->interface = NULL; rule->member = NULL; rule->sender = NULL; @@ -63,19 +138,17 @@ bus_match_rule_destroy (BusMatchRule *rule) g_free (rule->path); gint i; - GList *link; - for (i = 0; i < rule->args->len; i++) { g_free (g_array_index (rule->args, gchar *, i)); } g_array_free (rule->args, TRUE); - for (link = rule->recipients; link != NULL; link = link->next) { - BusRecipient *recipient = (BusRecipient *) link->data; + GList *p; + for (p = rule->recipients; p != NULL; p = p->next) { + BusRecipient *recipient = (BusRecipient *) p->data; g_signal_handlers_disconnect_by_func (recipient->connection, - G_CALLBACK (_connection_destroy_cb), rule); - g_object_unref (recipient->connection); - g_slice_free (BusRecipient, recipient); + G_CALLBACK (bus_match_rule_connection_destroy_cb), rule); + bus_recipient_free (recipient); } g_list_free (rule->recipients); @@ -89,7 +162,7 @@ typedef struct _Token { } Token; #define SKIP_WHITE(a) \ - while (*(a) == ' ' || *(a) == '\t') { (a)++; } + while (*(a) == ' ' || *(a) == '\t' || *(a) == '\n') { (a)++; } #define IS_ALPHA(a) \ ((*(a) >= 'a' && *(a) <= 'z') || (*(a) >= 'A' && *(a) <= 'Z')) #define IS_NUMBER(a) \ @@ -199,7 +272,6 @@ tokenize_rule (const gchar *text) return (Token *)g_array_free (tokens, FALSE); failed: - for (i = 0; i < tokens->len; i++) { Token *p = &g_array_index (tokens, Token, i); g_free (p->key); @@ -251,36 +323,47 @@ bus_match_rule_new (const gchar *text) /* parse rule */ tokens = tokenize_rule (text); + if (tokens == NULL) + goto failed; + for (p = tokens; p != NULL && p->key != 0; p++) { if (g_strcmp0 (p->key, "type") == 0) { if (g_strcmp0 (p->value, "signal") == 0) { - bus_match_rule_set_message_type (rule, DBUS_MESSAGE_TYPE_SIGNAL); + bus_match_rule_set_message_type (rule, G_DBUS_MESSAGE_TYPE_SIGNAL); } else if (g_strcmp0 (p->value, "method_call") == 0) { - bus_match_rule_set_message_type (rule, DBUS_MESSAGE_TYPE_METHOD_CALL); + bus_match_rule_set_message_type (rule, G_DBUS_MESSAGE_TYPE_METHOD_CALL); } else if (g_strcmp0 (p->value, "method_return") == 0) { - bus_match_rule_set_message_type (rule, DBUS_MESSAGE_TYPE_METHOD_RETURN); + bus_match_rule_set_message_type (rule, G_DBUS_MESSAGE_TYPE_METHOD_RETURN); } else if (g_strcmp0 (p->value, "error") == 0) { - bus_match_rule_set_message_type (rule, DBUS_MESSAGE_TYPE_ERROR); + bus_match_rule_set_message_type (rule, G_DBUS_MESSAGE_TYPE_ERROR); } else goto failed; } else if (g_strcmp0 (p->key, "sender") == 0) { + if (!g_dbus_is_name (p->value)) + goto failed; bus_match_rule_set_sender (rule, p->value); } else if (g_strcmp0 (p->key, "interface") == 0) { + if (!g_dbus_is_interface_name (p->value)) + goto failed; bus_match_rule_set_interface (rule, p->value); } else if (g_strcmp0 (p->key, "member") == 0) { + if (!g_dbus_is_member_name (p->value)) + goto failed; bus_match_rule_set_member (rule, p->value); } else if (g_strcmp0 (p->key, "path") == 0) { bus_match_rule_set_path (rule, p->value); } else if (g_strcmp0 (p->key, "destination") == 0) { + if (!g_dbus_is_name (p->value)) + goto failed; bus_match_rule_set_destination (rule, p->value); } else if (strncmp (p->key, "arg", 3) == 0) { @@ -307,10 +390,10 @@ bus_match_rule_set_message_type (BusMatchRule *rule, gint type) { g_assert (rule != NULL); - g_assert (type == DBUS_MESSAGE_TYPE_SIGNAL || - type == DBUS_MESSAGE_TYPE_METHOD_CALL || - type == DBUS_MESSAGE_TYPE_METHOD_RETURN || - type == DBUS_MESSAGE_TYPE_ERROR); + g_assert (type == G_DBUS_MESSAGE_TYPE_SIGNAL || + type == G_DBUS_MESSAGE_TYPE_METHOD_CALL || + type == G_DBUS_MESSAGE_TYPE_METHOD_RETURN || + type == G_DBUS_MESSAGE_TYPE_ERROR); rule->flags |= MATCH_TYPE; rule->message_type = type; @@ -411,68 +494,84 @@ bus_match_rule_set_arg (BusMatchRule *rule, return TRUE; } +static gboolean +bus_match_rule_match_name (const gchar *name, + const gchar *match_name) +{ + if (g_dbus_is_unique_name (name) && !g_dbus_is_unique_name (match_name)) { + BusConnection *connection = + bus_dbus_impl_get_connection_by_name (BUS_DEFAULT_DBUS, match_name); + if (connection == NULL) + return FALSE; + return g_strcmp0 (name, bus_connection_get_unique_name (connection)) == 0; + } + return g_strcmp0 (name, match_name) == 0; +} + gboolean bus_match_rule_match (BusMatchRule *rule, - DBusMessage *message) + GDBusMessage *message) { g_assert (rule != NULL); g_assert (message != NULL); if (rule->flags & MATCH_TYPE) { - if (ibus_message_get_type (message) != rule->message_type) + if (g_dbus_message_get_message_type (message) != rule->message_type) return FALSE; } if (rule->flags & MATCH_INTERFACE) { - if (g_strcmp0 (ibus_message_get_interface (message), rule->interface) != 0) + if (g_strcmp0 (g_dbus_message_get_interface (message), rule->interface) != 0) return FALSE; } if (rule->flags & MATCH_MEMBER) { - if (g_strcmp0 (ibus_message_get_member (message), rule->member) != 0) + if (g_strcmp0 (g_dbus_message_get_member (message), rule->member) != 0) return FALSE; } if (rule->flags & MATCH_SENDER) { - if (g_strcmp0 (ibus_message_get_sender (message), rule->sender) != 0) + if (!bus_match_rule_match_name (g_dbus_message_get_sender (message), rule->sender)) return FALSE; } if (rule->flags & MATCH_DESTINATION) { - if (g_strcmp0 (ibus_message_get_destination (message), rule->destination) != 0) + if (!bus_match_rule_match_name (g_dbus_message_get_destination (message), rule->destination)) return FALSE; } if (rule->flags & MATCH_PATH) { - if (g_strcmp0 (ibus_message_get_path (message), rule->path) != 0) + if (g_strcmp0 (g_dbus_message_get_path (message), rule->path) != 0) return FALSE; } if (rule->flags & MATCH_ARGS) { guint i; - DBusMessageIter iter; - - ibus_message_iter_init (message, &iter); + GVariant *arguments = g_dbus_message_get_body (message); + if (arguments == NULL) + return FALSE; for (i = 0; i < rule->args->len; i++) { - gchar *arg = g_array_index (rule->args, gchar *, i); - if (arg != NULL) { - gint type; - gchar *value; - - type = ibus_message_iter_get_arg_type (&iter); - if (type != G_TYPE_STRING && type != IBUS_TYPE_OBJECT_PATH) - return FALSE; - - ibus_message_iter_get_basic (&iter, &value); - - if (g_strcmp0 (arg, value) != 0) - return FALSE; + const gchar *arg = g_array_index (rule->args, const gchar *, i); + if (arg == NULL) + continue; + GVariant * variant = g_variant_get_child_value (arguments, i); + if (variant == NULL) + return FALSE; + switch (g_variant_classify (variant)) { + case G_VARIANT_CLASS_STRING: + case G_VARIANT_CLASS_OBJECT_PATH: + if (g_strcmp0 (arg, g_variant_get_string (variant, NULL)) == 0) { + g_variant_unref (variant); + continue; + } + default: + break; } - ibus_message_iter_next (&iter); + g_variant_unref (variant); + return FALSE; } } - return TRUE; } @@ -533,22 +632,16 @@ bus_match_rule_is_equal (BusMatchRule *a, } static void -_connection_destroy_cb (BusConnection *connection, - BusMatchRule *rule) +bus_match_rule_connection_destroy_cb (BusConnection *connection, + BusMatchRule *rule) { - g_assert (BUS_IS_MATCH_RULE (rule)); - g_assert (BUS_IS_CONNECTION (connection)); - - GList *link; - BusRecipient *recipient; - - for (link = rule->recipients; link != NULL; link = link->next) { - recipient = (BusRecipient *)link->data; + GList *p; + for (p = rule->recipients; p != NULL; p = p->next) { + BusRecipient *recipient = (BusRecipient *)p->data; if (recipient->connection == connection) { - rule->recipients = g_list_remove_link (rule->recipients, link); - g_object_unref (connection); - g_slice_free (BusRecipient, recipient); + rule->recipients = g_list_remove_link (rule->recipients, p); + bus_recipient_free (recipient); return; } @@ -560,57 +653,46 @@ _connection_destroy_cb (BusConnection *connection, } void -bus_match_rule_add_recipient (BusMatchRule *rule, - BusConnection *connection) +bus_match_rule_add_recipient (BusMatchRule *rule, + BusConnection *connection) { g_assert (BUS_IS_MATCH_RULE (rule)); g_assert (BUS_IS_CONNECTION (connection)); - GList *link; - BusRecipient *recipient; - - for (link = rule->recipients; link != NULL; link = link->next) { - recipient = (BusRecipient *) link->data; + GList *p; + for (p = rule->recipients; p != NULL; p = p->next) { + BusRecipient *recipient = (BusRecipient *) p->data; if (connection == recipient->connection) { - recipient->refcount ++; + bus_recipient_ref (recipient); return; } } - recipient = g_slice_new (BusRecipient); - - g_object_ref_sink (connection); - recipient->connection = connection; - recipient->refcount = 1; - + /* alloc a new recipient */ + BusRecipient *recipient = bus_recipient_new (connection); rule->recipients = g_list_append (rule->recipients, recipient); g_signal_connect (connection, "destroy", - G_CALLBACK (_connection_destroy_cb), + G_CALLBACK (bus_match_rule_connection_destroy_cb), rule); } void -bus_match_rule_remove_recipient (BusMatchRule *rule, - BusConnection *connection) +bus_match_rule_remove_recipient (BusMatchRule *rule, + BusConnection *connection) { g_assert (BUS_IS_MATCH_RULE (rule)); g_assert (BUS_IS_CONNECTION (connection)); - GList *link; - BusRecipient *recipient; - - for (link = rule->recipients; link != NULL; link = link->next) { - recipient = (BusRecipient *) link->data; + GList *p; + for (p = rule->recipients; p != NULL; p = p->next) { + BusRecipient *recipient = (BusRecipient *) p->data; if (connection == recipient->connection) { - recipient->refcount --; - if (recipient->refcount == 0) { - rule->recipients = g_list_remove_link (rule->recipients, link); - g_slice_free (BusRecipient, recipient); + if (bus_recipient_unref (recipient)) { + rule->recipients = g_list_remove_link (rule->recipients, p); g_signal_handlers_disconnect_by_func (connection, - G_CALLBACK (_connection_destroy_cb), + G_CALLBACK (bus_match_rule_connection_destroy_cb), rule); - g_object_unref (connection); } if (rule->recipients == NULL ) { @@ -619,13 +701,12 @@ bus_match_rule_remove_recipient (BusMatchRule *rule, return; } } - - g_warning ("Remove recipient failed"); + g_return_if_reached (); } GList * bus_match_rule_get_recipients (BusMatchRule *rule, - DBusMessage *message) + GDBusMessage *message) { g_assert (BUS_IS_MATCH_RULE (rule)); g_assert (message != NULL); diff --git a/bus/matchrule.h b/bus/matchrule.h index 3d73f0eae..3ecc18855 100644 --- a/bus/matchrule.h +++ b/bus/matchrule.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,10 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#ifndef __MATCH_RULE_H_ -#define __MATCH_RULE_H_ +#ifndef __BUS_MATCH_RULE_H_ +#define __BUS_MATCH_RULE_H_ #include + #include "connection.h" /* @@ -47,77 +49,42 @@ G_BEGIN_DECLS typedef struct _BusMatchRule BusMatchRule; typedef struct _BusMatchRuleClass BusMatchRuleClass; -typedef enum { - MATCH_TYPE = 1 << 0, - MATCH_INTERFACE = 1 << 1, - MATCH_MEMBER = 1 << 2, - MATCH_SENDER = 1 << 3, - MATCH_DESTINATION = 1 << 4, - MATCH_PATH = 1 << 5, - MATCH_ARGS = 1 << 6, -} BusMatchFlags; - -typedef struct _BusRecipient BusRecipient; -struct _BusRecipient { - BusConnection *connection; - gint refcount; -}; - -struct _BusMatchRule { - IBusObject parent; - /* instance members */ - gint flags; - gint message_type; - gchar *interface; - gchar *member; - gchar *sender; - gchar *destination; - gchar *path; - GArray *args; - GList *recipients; -}; - -struct _BusMatchRuleClass { - IBusObjectClass parent; - /* class members */ -}; - GType bus_match_rule_get_type (void); -BusMatchRule *bus_match_rule_new (const gchar *text); -BusMatchRule *bus_match_rule_ref (BusMatchRule *rule); -void bus_match_rule_unref (BusMatchRule *rule); -void bus_match_rule_free (BusMatchRule *rule); +BusMatchRule *bus_match_rule_new (const gchar *text); +BusMatchRule *bus_match_rule_ref (BusMatchRule *rule); +void bus_match_rule_unref (BusMatchRule *rule); +void bus_match_rule_free (BusMatchRule *rule); gboolean bus_match_rule_set_message_type - (BusMatchRule *rule, - gint type); -gboolean bus_match_rule_set_sender (BusMatchRule *rule, - const gchar *sender); + (BusMatchRule *rule, + gint type); +gboolean bus_match_rule_set_sender (BusMatchRule *rule, + const gchar *sender); gboolean bus_match_rule_set_interface - (BusMatchRule *rule, - const gchar *interface); -gboolean bus_match_rule_set_member (BusMatchRule *rule, - const gchar *member); -gboolean bus_match_rule_set_path (BusMatchRule *rule, - const gchar *path); + (BusMatchRule *rule, + const gchar *interface); +gboolean bus_match_rule_set_member (BusMatchRule *rule, + const gchar *member); +gboolean bus_match_rule_set_path (BusMatchRule *rule, + const gchar *path); gboolean bus_match_rule_set_destination - (BusMatchRule *rule, - const gchar *dest); -gboolean bus_match_rule_set_arg (BusMatchRule *rule, - guint arg_i, - const gchar *arg); -gboolean bus_match_rule_match (BusMatchRule *rule, - DBusMessage *message); -gboolean bus_match_rule_is_equal (BusMatchRule *a, - BusMatchRule *b); + (BusMatchRule *rule, + const gchar *dest); +gboolean bus_match_rule_set_arg (BusMatchRule *rule, + guint arg_i, + const gchar *arg); +gboolean bus_match_rule_match (BusMatchRule *rule, + GDBusMessage *message); +gboolean bus_match_rule_is_equal (BusMatchRule *a, + BusMatchRule *b); void bus_match_rule_add_recipient - (BusMatchRule *rule, - BusConnection *connection); + (BusMatchRule *rule, + BusConnection *connection); void bus_match_rule_remove_recipient - (BusMatchRule *rule, - BusConnection *connection); + (BusMatchRule *rule, + BusConnection *connection); GList *bus_match_rule_get_recipients (BusMatchRule *rule, - DBusMessage *message); + GDBusMessage *message); G_END_DECLS #endif diff --git a/bus/panelproxy.c b/bus/panelproxy.c index ac48691a9..abca0741e 100644 --- a/bus/panelproxy.c +++ b/bus/panelproxy.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,11 +19,27 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include -#include -#include #include "panelproxy.h" +#include "global.h" +#include "marshalers.h" +#include "types.h" + +/* panelproxy.c is a very simple proxy class for the panel component that does only the following: + * + * 1. Handle D-Bus signals from the panel process. For the list of the D-Bus signals, you can check the bus_panel_proxy_g_signal function, or + * introspection_xml in src/ibuspanelservice.c. The bus_panel_proxy_g_signal function simply emits a corresponding glib signal for each + * D-Bus signal. + * 2. Handle glib signals for a BusPanelProxy object (which is usually emitted by bus_panel_proxy_g_signal.) The list of such glib signals is + * in the bus_panel_proxy_class_init function. The signal handler function, e.g. bus_panel_proxy_candidate_clicked, simply calls the + * corresponding function in inputcontext.c, e.g. bus_input_context_candidate_clicked, using the current focused context. + * 3. Provide a way to call D-Bus methods in the panel process. For the list of the D-Bus methods, you can check the header file (panelproxy.h) + * or introspection_xml in src/ibuspanelservice.c. Functions that calls g_dbus_proxy_call, e.g. bus_panel_proxy_set_cursor_location, would + * fall into this category. + * 4. Handle glib signals for a BusInputContext object. The list of such glib signals is in the input_context_signals[] array. The signal handler + * function, e.g. _context_set_cursor_location_cb, simply invokes a D-Bus method by calling a function like bus_panel_proxy_set_cursor_location. + */ + enum { PAGE_UP, PAGE_DOWN, @@ -35,15 +52,40 @@ enum { LAST_SIGNAL, }; +struct _BusPanelProxy { + IBusProxy parent; + + /* instance members */ + BusInputContext *focused_context; +}; + +struct _BusPanelProxyClass { + IBusProxyClass parent; + /* class members */ + + void (* page_up) (BusPanelProxy *panel); + void (* page_down) (BusPanelProxy *panel); + void (* cursor_up) (BusPanelProxy *panel); + void (* cursor_down) (BusPanelProxy *panel); + void (* candidate_clicked) (BusPanelProxy *panel, + guint index, + guint button, + guint state); + + void (* property_activate) (BusPanelProxy *panel, + const gchar *prop_name, + gint prop_state); +}; + static guint panel_signals[LAST_SIGNAL] = { 0 }; -// static guint engine_signals[LAST_SIGNAL] = { 0 }; /* functions prototype */ static void bus_panel_proxy_init (BusPanelProxy *panel); -static void bus_panel_proxy_real_destroy (BusPanelProxy *panel); - -static gboolean bus_panel_proxy_ibus_signal (IBusProxy *proxy, - IBusMessage *message); +static void bus_panel_proxy_real_destroy (IBusProxy *proxy); +static void bus_panel_proxy_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters); static void bus_panel_proxy_page_up (BusPanelProxy *panel); static void bus_panel_proxy_page_down (BusPanelProxy *panel); static void bus_panel_proxy_cursor_up (BusPanelProxy *panel); @@ -58,7 +100,6 @@ static void bus_panel_proxy_property_activate const gchar *prop_name, gint prop_state); - G_DEFINE_TYPE(BusPanelProxy, bus_panel_proxy, IBUS_TYPE_PROXY) BusPanelProxy * @@ -67,77 +108,76 @@ bus_panel_proxy_new (BusConnection *connection) g_assert (BUS_IS_CONNECTION (connection)); GObject *obj; - obj = g_object_new (BUS_TYPE_PANEL_PROXY, - "name", NULL, - "path", IBUS_PATH_PANEL, - "connection", connection, - NULL); + obj = g_initable_new (BUS_TYPE_PANEL_PROXY, + NULL, + NULL, + "g-object-path", IBUS_PATH_PANEL, + "g-interface-name", IBUS_INTERFACE_PANEL, + "g-connection", bus_connection_get_dbus_connection (connection), + "g-default-timeout", g_gdbus_timeout, + "g-flags", G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START | G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, + NULL); return BUS_PANEL_PROXY (obj); } static void -bus_panel_proxy_class_init (BusPanelProxyClass *klass) +bus_panel_proxy_class_init (BusPanelProxyClass *class) { - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); - IBusProxyClass *proxy_class = IBUS_PROXY_CLASS (klass); + IBUS_PROXY_CLASS (class)->destroy = bus_panel_proxy_real_destroy; + G_DBUS_PROXY_CLASS (class)->g_signal = bus_panel_proxy_g_signal; - klass->page_up = bus_panel_proxy_page_up; - klass->page_down = bus_panel_proxy_page_down; - klass->cursor_up = bus_panel_proxy_cursor_up; - klass->cursor_down = bus_panel_proxy_cursor_down; - - klass->candidate_clicked = bus_panel_proxy_candidate_clicked; - klass->property_activate = bus_panel_proxy_property_activate; - - ibus_object_class->destroy = (IBusObjectDestroyFunc) bus_panel_proxy_real_destroy; - - proxy_class->ibus_signal = bus_panel_proxy_ibus_signal; + class->page_up = bus_panel_proxy_page_up; + class->page_down = bus_panel_proxy_page_down; + class->cursor_up = bus_panel_proxy_cursor_up; + class->cursor_down = bus_panel_proxy_cursor_down; + class->candidate_clicked = bus_panel_proxy_candidate_clicked; + class->property_activate = bus_panel_proxy_property_activate; /* install signals */ panel_signals[PAGE_UP] = g_signal_new (I_("page-up"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(BusPanelProxyClass, page_up), NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); panel_signals[PAGE_DOWN] = g_signal_new (I_("page-down"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(BusPanelProxyClass, page_down), NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); panel_signals[CURSOR_UP] = g_signal_new (I_("cursor-up"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(BusPanelProxyClass, cursor_up), NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); panel_signals[CURSOR_DOWN] = g_signal_new (I_("cursor-down"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(BusPanelProxyClass, cursor_down), NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); panel_signals[CANDIDATE_CLICKED] = g_signal_new (I_("candidate-clicked"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(BusPanelProxyClass, candidate_clicked), NULL, NULL, - ibus_marshal_VOID__UINT_UINT_UINT, + bus_marshal_VOID__UINT_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, @@ -145,32 +185,32 @@ bus_panel_proxy_class_init (BusPanelProxyClass *klass) panel_signals[PROPERTY_ACTIVATE] = g_signal_new (I_("property-activate"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(BusPanelProxyClass, property_activate), NULL, NULL, - ibus_marshal_VOID__STRING_INT, + bus_marshal_VOID__STRING_INT, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_INT); panel_signals[PROPERTY_SHOW] = g_signal_new (I_("property-show"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__STRING, + bus_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); panel_signals[PROPERTY_HIDE] = g_signal_new (I_("property-hide"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__STRING, + bus_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); @@ -179,40 +219,39 @@ bus_panel_proxy_class_init (BusPanelProxyClass *klass) static void bus_panel_proxy_init (BusPanelProxy *panel) { - panel->focused_context = NULL; + /* member variables will automatically be zero-cleared. */ } static void -bus_panel_proxy_real_destroy (BusPanelProxy *panel) +bus_panel_proxy_real_destroy (IBusProxy *proxy) { - if (ibus_proxy_get_connection ((IBusProxy *)panel) != NULL) { - ibus_proxy_call ((IBusProxy *) panel, - "Destroy", - G_TYPE_INVALID); - } + BusPanelProxy *panel = (BusPanelProxy *)proxy; if (panel->focused_context) { bus_panel_proxy_focus_out (panel, panel->focused_context); panel->focused_context = NULL; } - IBUS_OBJECT_CLASS(bus_panel_proxy_parent_class)->destroy (IBUS_OBJECT (panel)); + IBUS_PROXY_CLASS(bus_panel_proxy_parent_class)->destroy ((IBusProxy *)panel); } -static gboolean -bus_panel_proxy_ibus_signal (IBusProxy *proxy, - IBusMessage *message) +/** + * bus_panel_proxy_g_signal: + * + * Handle all D-Bus signals from the panel process. This function emits a corresponding glib signal for each D-Bus signal. + */ +static void +bus_panel_proxy_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters) { - g_assert (BUS_IS_PANEL_PROXY (proxy)); - g_assert (message != NULL); - - BusPanelProxy *panel; - IBusError *error; - gint i; + BusPanelProxy *panel = (BusPanelProxy *)proxy; + /* The list of nullary D-Bus signals. */ static const struct { - const gchar *member; - const guint signal_id; + const gchar *signal_name; + const guint signal_id; } signals [] = { { "PageUp", PAGE_UP }, { "PageDown", PAGE_DOWN }, @@ -220,82 +259,51 @@ bus_panel_proxy_ibus_signal (IBusProxy *proxy, { "CursorDown", CURSOR_DOWN }, }; - panel = BUS_PANEL_PROXY (proxy); - + gint i; for (i = 0; i < G_N_ELEMENTS (signals); i++) { - if (ibus_message_is_signal (message, IBUS_INTERFACE_PANEL, signals[i].member)) { + if (g_strcmp0 (signal_name, signals[i].signal_name) == 0) { g_signal_emit (panel, panel_signals[signals[i].signal_id], 0); - goto handled; + return; } } - if (ibus_message_is_signal (message, IBUS_INTERFACE_PANEL, "CandidateClicked")) { - guint index, button, state; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_UINT, &index, - G_TYPE_UINT, &button, - G_TYPE_UINT, &state, - G_TYPE_INVALID); - if (!retval) - goto failed; - + /* Handle D-Bus signals with parameters. Deserialize them and emit a glib signal. */ + if (g_strcmp0 ("CandidateClicked", signal_name) == 0) { + guint index = 0; + guint button = 0; + guint state = 0; + g_variant_get (parameters, "(uuu)", &index, &button, &state); g_signal_emit (panel, panel_signals[CANDIDATE_CLICKED], 0, index, button, state); + return; } - else if (ibus_message_is_signal (message, IBUS_INTERFACE_PANEL, "PropertyActivate")) { - gchar *prop_name; - gint prop_state; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, &prop_name, - G_TYPE_INT, &prop_state, - G_TYPE_INVALID); - if (!retval) - goto failed; + if (g_strcmp0 ("PropertyActivate", signal_name) == 0) { + gchar *prop_name = NULL; + gint prop_state = 0; + g_variant_get (parameters, "(&su)", &prop_name, &prop_state); g_signal_emit (panel, panel_signals[PROPERTY_ACTIVATE], 0, prop_name, prop_state); + return; } - else if (ibus_message_is_signal (message, IBUS_INTERFACE_PANEL, "PropertyShow")) { - gchar *prop_name; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, &prop_name, - G_TYPE_INVALID); - if (!retval) - goto failed; + + if (g_strcmp0 ("PropertyShow", signal_name) == 0) { + gchar *prop_name = NULL; + g_variant_get (parameters, "(&s)", &prop_name); g_signal_emit (panel, panel_signals[PROPERTY_SHOW], 0, prop_name); + return; } - else if (ibus_message_is_signal (message, IBUS_INTERFACE_PANEL, "PropertyHide")) { - gchar *prop_name; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, &prop_name, - G_TYPE_INVALID); - if (!retval) - goto failed; + + if (g_strcmp0 ("PropertyHide", signal_name) == 0) { + gchar *prop_name = NULL; + g_variant_get (parameters, "(&s)", &prop_name); g_signal_emit (panel, panel_signals[PROPERTY_HIDE], 0, prop_name); + return; } -handled: - g_signal_stop_emission_by_name (panel, "ibus-signal"); - return TRUE; - -failed: - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - return FALSE; + /* shound not be reached */ + g_return_if_reached (); } - void bus_panel_proxy_set_cursor_location (BusPanelProxy *panel, gint x, @@ -304,14 +312,11 @@ bus_panel_proxy_set_cursor_location (BusPanelProxy *panel, gint h) { g_assert (BUS_IS_PANEL_PROXY (panel)); - - ibus_proxy_call ((IBusProxy *) panel, - "SetCursorLocation", - G_TYPE_INT, &x, - G_TYPE_INT, &y, - G_TYPE_INT, &w, - G_TYPE_INT, &h, - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *)panel, + "SetCursorLocation", + g_variant_new ("(iiii)", x, y, w, h), + G_DBUS_CALL_FLAGS_NONE, + -1, NULL, NULL, NULL); } void @@ -321,14 +326,14 @@ bus_panel_proxy_update_preedit_text (BusPanelProxy *panel, gboolean visible) { g_assert (BUS_IS_PANEL_PROXY (panel)); - g_assert (text != NULL); - - ibus_proxy_call ((IBusProxy *) panel, - "UpdatePreeditText", - IBUS_TYPE_TEXT, &text, - G_TYPE_UINT, &cursor_pos, - G_TYPE_BOOLEAN, &visible, - G_TYPE_INVALID); + g_assert (IBUS_IS_TEXT (text)); + + GVariant *variant = ibus_serializable_serialize ((IBusSerializable* )text); + g_dbus_proxy_call ((GDBusProxy *)panel, + "UpdatePreeditText", + g_variant_new ("(vub)", variant, cursor_pos, visible), + G_DBUS_CALL_FLAGS_NONE, + -1, NULL, NULL, NULL); } void @@ -337,13 +342,14 @@ bus_panel_proxy_update_auxiliary_text (BusPanelProxy *panel, gboolean visible) { g_assert (BUS_IS_PANEL_PROXY (panel)); - g_assert (text != NULL); - - ibus_proxy_call ((IBusProxy *) panel, - "UpdateAuxiliaryText", - IBUS_TYPE_TEXT, &text, - G_TYPE_BOOLEAN, &visible, - G_TYPE_INVALID); + g_assert (IBUS_IS_TEXT (text)); + + GVariant *variant = ibus_serializable_serialize ((IBusSerializable* )text); + g_dbus_proxy_call ((GDBusProxy *)panel, + "UpdateAuxiliaryText", + g_variant_new ("(vb)", variant, visible), + G_DBUS_CALL_FLAGS_NONE, + -1, NULL, NULL, NULL); } void @@ -352,13 +358,14 @@ bus_panel_proxy_update_lookup_table (BusPanelProxy *panel, gboolean visible) { g_assert (BUS_IS_PANEL_PROXY (panel)); - g_assert (table != NULL); - - ibus_proxy_call ((IBusProxy *) panel, - "UpdateLookupTable", - IBUS_TYPE_LOOKUP_TABLE, &table, - G_TYPE_BOOLEAN, &visible, - G_TYPE_INVALID); + g_assert (IBUS_IS_LOOKUP_TABLE (table)); + + GVariant *variant = ibus_serializable_serialize ((IBusSerializable* )table); + g_dbus_proxy_call ((GDBusProxy *)panel, + "UpdateLookupTable", + g_variant_new ("(vb)", variant, visible), + G_DBUS_CALL_FLAGS_NONE, + -1, NULL, NULL, NULL); } void @@ -366,13 +373,14 @@ bus_panel_proxy_register_properties (BusPanelProxy *panel, IBusPropList *prop_list) { g_assert (BUS_IS_PANEL_PROXY (panel)); - g_assert (prop_list != NULL); - - ibus_proxy_call ((IBusProxy *) panel, - "RegisterProperties", - IBUS_TYPE_PROP_LIST, &prop_list, - G_TYPE_INVALID); - ibus_connection_flush (ibus_proxy_get_connection((IBusProxy *)panel)); + g_assert (IBUS_IS_PROP_LIST (prop_list)); + + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)prop_list); + g_dbus_proxy_call ((GDBusProxy *)panel, + "RegisterProperties", + g_variant_new ("(v)", variant), + G_DBUS_CALL_FLAGS_NONE, + -1, NULL, NULL, NULL); } void @@ -380,12 +388,14 @@ bus_panel_proxy_update_property (BusPanelProxy *panel, IBusProperty *prop) { g_assert (BUS_IS_PANEL_PROXY (panel)); - g_assert (prop != NULL); - - ibus_proxy_call ((IBusProxy *) panel, - "UpdateProperty", - IBUS_TYPE_PROPERTY, &prop, - G_TYPE_INVALID); + g_assert (IBUS_IS_PROPERTY (prop)); + + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)prop); + g_dbus_proxy_call ((GDBusProxy *)panel, + "UpdateProperty", + g_variant_new ("(v)", variant), + G_DBUS_CALL_FLAGS_NONE, + -1, NULL, NULL, NULL); } #define DEFINE_FUNC(name) \ @@ -437,9 +447,11 @@ bus_panel_proxy_property_activate (BusPanelProxy *panel, void bus_panel_proxy_##name (BusPanelProxy *panel) \ { \ g_assert (BUS_IS_PANEL_PROXY (panel)); \ - ibus_proxy_call ((IBusProxy *) panel, \ - #Name, \ - G_TYPE_INVALID); \ + g_dbus_proxy_call ((GDBusProxy *) panel, \ + #Name, \ + NULL, \ + G_DBUS_CALL_FLAGS_NONE, \ + -1, NULL, NULL, NULL); \ } DEFINE_FUNCTION (ShowPreeditText, show_preedit_text) @@ -551,7 +563,6 @@ _context_update_property_cb (BusInputContext *context, prop); } -#if 0 static void _context_destroy_cb (BusInputContext *context, BusPanelProxy *panel) @@ -563,7 +574,6 @@ _context_destroy_cb (BusInputContext *context, bus_panel_proxy_focus_out (panel, context); } -#endif #define DEFINE_FUNCTION(name) \ static void _context_##name##_cb (BusInputContext *context, \ @@ -591,10 +601,10 @@ DEFINE_FUNCTION (state_changed) #undef DEFINE_FUNCTION -static const struct _SignalCallbackTable { +static const struct { gchar *name; GCallback callback; -} __signals[] = { +} input_context_signals[] = { { "set-cursor-location", G_CALLBACK (_context_set_cursor_location_cb) }, { "update-preedit-text", G_CALLBACK (_context_update_preedit_text_cb) }, @@ -616,11 +626,9 @@ static const struct _SignalCallbackTable { { "register-properties", G_CALLBACK (_context_register_properties_cb) }, { "update-property", G_CALLBACK (_context_update_property_cb) }, - { "enabled", G_CALLBACK (_context_state_changed_cb) }, - { "disabled", G_CALLBACK (_context_state_changed_cb) }, { "engine-changed", G_CALLBACK (_context_state_changed_cb) }, - // { "destroy", G_CALLBACK (_context_destroy_cb) }, + { "destroy", G_CALLBACK (_context_destroy_cb) }, }; void @@ -639,19 +647,20 @@ bus_panel_proxy_focus_in (BusPanelProxy *panel, g_object_ref_sink (context); panel->focused_context = context; - const gchar *path = ibus_service_get_path ((IBusService *)context); + const gchar *path = ibus_service_get_object_path ((IBusService *)context); - ibus_proxy_call ((IBusProxy *) panel, - "FocusIn", - IBUS_TYPE_OBJECT_PATH, &path, - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *)panel, + "FocusIn", + g_variant_new ("(o)", path), + G_DBUS_CALL_FLAGS_NONE, + -1, NULL, NULL, NULL); /* install signal handlers */ gint i; - for (i = 0; i < G_N_ELEMENTS (__signals); i++) { + for (i = 0; i < G_N_ELEMENTS (input_context_signals); i++) { g_signal_connect (context, - __signals[i].name, - __signals[i].callback, + input_context_signals[i].name, + input_context_signals[i].callback, panel); } } @@ -667,18 +676,19 @@ bus_panel_proxy_focus_out (BusPanelProxy *panel, /* uninstall signal handlers */ gint i; - for (i = 0; i < G_N_ELEMENTS (__signals); i++) { + for (i = 0; i < G_N_ELEMENTS (input_context_signals); i++) { g_signal_handlers_disconnect_by_func (context, - __signals[i].callback, + input_context_signals[i].callback, panel); } - const gchar *path = ibus_service_get_path ((IBusService *)context); + const gchar *path = ibus_service_get_object_path ((IBusService *)context); - ibus_proxy_call ((IBusProxy *) panel, - "FocusOut", - IBUS_TYPE_OBJECT_PATH, &path, - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *)panel, + "FocusOut", + g_variant_new ("(o)", path), + G_DBUS_CALL_FLAGS_NONE, + -1, NULL, NULL, NULL); g_object_unref (panel->focused_context); panel->focused_context = NULL; diff --git a/bus/panelproxy.h b/bus/panelproxy.h index 9c2c85d2b..427e409f9 100644 --- a/bus/panelproxy.h +++ b/bus/panelproxy.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,8 +19,8 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#ifndef __PANEL_PROXY_H_ -#define __PANEL_PROXY_H_ +#ifndef __BUS_PANEL_PROXY_H_ +#define __BUS_PANEL_PROXY_H_ #include #include "connection.h" @@ -48,33 +49,10 @@ G_BEGIN_DECLS typedef struct _BusPanelProxy BusPanelProxy; typedef struct _BusPanelProxyClass BusPanelProxyClass; -struct _BusPanelProxy { - IBusProxy parent; - - /* instance members */ - BusInputContext *focused_context; -}; - -struct _BusPanelProxyClass { - IBusProxyClass parent; - /* class members */ - - void (* page_up) (BusPanelProxy *panel); - void (* page_down) (BusPanelProxy *panel); - void (* cursor_up) (BusPanelProxy *panel); - void (* cursor_down) (BusPanelProxy *panel); - void (* candidate_clicked) (BusPanelProxy *panel, - guint index, - guint button, - guint state); - - void (* property_activate) (BusPanelProxy *panel, - const gchar *prop_name, - gint prop_state); -}; - GType bus_panel_proxy_get_type (void); BusPanelProxy *bus_panel_proxy_new (BusConnection *connection); + +/* functions that invoke D-Bus methods of the panel component. */ void bus_panel_proxy_focus_in (BusPanelProxy *panel, BusInputContext *context); void bus_panel_proxy_focus_out (BusPanelProxy *panel, diff --git a/bus/registry.c b/bus/registry.c index 1878ef273..cece1f7f3 100644 --- a/bus/registry.c +++ b/bus/registry.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,13 +19,17 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include +#include "registry.h" + #include +#include #include #include -#include -#include "registry.h" -#include "option.h" + +#include "dbusimpl.h" +#include "global.h" +#include "marshalers.h" +#include "types.h" enum { CHANGED, @@ -33,6 +38,33 @@ enum { static guint _signals[LAST_SIGNAL] = { 0 }; +struct _BusRegistry { + IBusObject parent; + + /* instance members */ + + /* a list of IBusObservedPath objects. */ + GList *observed_paths; + /* a list of BusComponent objects that are created from component XML files (or from the cache of them). */ + GList *components; + /* a mapping from an engine name (e.g. 'pinyin') to the corresponding IBusEngineDesc object. */ + GHashTable *engine_table; + +#ifdef G_THREADS_ENABLED + GThread *thread; + gboolean thread_running; + GMutex *mutex; + GCond *cond; + gboolean changed; +#endif +}; + +struct _BusRegistryClass { + IBusObjectClass parent; + + /* class members */ +}; + /* functions prototype */ static void bus_registry_destroy (BusRegistry *registry); static void bus_registry_load (BusRegistry *registry); @@ -46,18 +78,18 @@ static void bus_registry_remove_all (BusRegistry *reg G_DEFINE_TYPE (BusRegistry, bus_registry, IBUS_TYPE_OBJECT) static void -bus_registry_class_init (BusRegistryClass *klass) +bus_registry_class_init (BusRegistryClass *class) { - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class); _signals[CHANGED] = g_signal_new (I_("changed"), G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, - 0, + 0, /* does not associate a method in this class. the "changed" signal would be handled in other classes. */ NULL, NULL, - ibus_marshal_VOID__VOID, + bus_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -73,6 +105,14 @@ bus_registry_init (BusRegistry *registry) registry->engine_table = g_hash_table_new (g_str_hash, g_str_equal); #ifdef G_THREADS_ENABLED + /* If glib supports thread, we'll create a thread to monitor changes in IME + * XML files and related files, so users can use newly installed IMEs + * immediatlly. + * Note that we don't use GFileMonitor for watching as we need to monitor + * not only XML files but also other related files that can be scattered in + * many places. Monitoring these files with GFileMonitor would be make it + * complicated. hence we use a thread to poll the changes. + */ registry->thread = NULL; registry->thread_running = TRUE; registry->mutex = g_mutex_new (); @@ -80,35 +120,48 @@ bus_registry_init (BusRegistry *registry) registry->changed = FALSE; #endif - if (g_rescan || - bus_registry_load_cache (registry) == FALSE || - bus_registry_check_modification (registry)) { - bus_registry_remove_all (registry); + if (g_strcmp0 (g_cache, "none") == 0) { + /* Only load registry, but not read and write cache. */ + bus_registry_load (registry); + } + else if (g_strcmp0 (g_cache, "refresh") == 0) { + /* Load registry and overwrite the cache. */ bus_registry_load (registry); bus_registry_save_cache (registry); } + else { + /* Load registry from cache. If the cache does not exist or + * it is outdated, then generate it. + */ + if (bus_registry_load_cache (registry) == FALSE || + bus_registry_check_modification (registry)) { + bus_registry_remove_all (registry); + bus_registry_load (registry); + bus_registry_save_cache (registry); + } + } for (p = registry->components; p != NULL; p = p->next) { - IBusComponent *comp = (IBusComponent *)p->data; + BusComponent *comp = (BusComponent *) p->data; + GList *engines = bus_component_get_engines (comp); GList *p1; - - for (p1 = comp->engines; p1 != NULL; p1 = p1->next) { - IBusEngineDesc *desc = (IBusEngineDesc *)p1->data; - g_hash_table_insert (registry->engine_table, desc->name, desc); - g_object_set_data ((GObject *)desc, "component", comp); + for (p1 = engines; p1 != NULL; p1 = p1->next) { + IBusEngineDesc *desc = (IBusEngineDesc *) p1->data; + g_hash_table_insert (registry->engine_table, + (gpointer) ibus_engine_desc_get_name (desc), + desc); } + g_list_free (engines); } } static void bus_registry_remove_all (BusRegistry *registry) { - g_list_foreach (registry->observed_paths, (GFunc) g_object_unref, NULL); - g_list_free (registry->observed_paths); + g_list_free_full (registry->observed_paths, g_object_unref); registry->observed_paths = NULL; - g_list_foreach (registry->components, (GFunc) g_object_unref, NULL); - g_list_free (registry->components); + g_list_free_full (registry->components, g_object_unref); registry->components = NULL; g_hash_table_remove_all (registry->engine_table); @@ -122,8 +175,14 @@ bus_registry_destroy (BusRegistry *registry) g_mutex_lock (registry->mutex); registry->thread_running = FALSE; g_mutex_unlock (registry->mutex); + + /* Raise a signal to cause the loop in _checks_changes() exits + * immediately, and then wait until the thread finishes, and release all + * resources of the thread. + */ g_cond_signal (registry->cond); g_thread_join (registry->thread); + registry->thread = NULL; } #endif @@ -144,7 +203,11 @@ bus_registry_destroy (BusRegistry *registry) IBUS_OBJECT_CLASS (bus_registry_parent_class)->destroy (IBUS_OBJECT (registry)); } - +/** + * bus_registry_load: + * + * Read all XML files in the PKGDATADIR (typically /usr/share/ibus/components/ *.xml) and update the registry object. + */ static void bus_registry_load (BusRegistry *registry) { @@ -162,19 +225,21 @@ bus_registry_load (BusRegistry *registry) g_free (dirname); +#if 0 + /* FIXME Should we support install some IME in user dir? */ dirname = g_build_filename (g_get_user_data_dir (), "ibus", "component", NULL); path = ibus_observed_path_new (dirname, TRUE); registry->observed_paths = g_list_append (registry->observed_paths, path); - if (g_file_test(dirname, G_FILE_TEST_EXISTS)) { + if (g_file_test (dirname, G_FILE_TEST_EXISTS)) { bus_registry_load_in_dir (registry, dirname); } g_free (dirname); +#endif } - #define g_string_append_indent(string, indent) \ { \ gint i; \ @@ -226,8 +291,11 @@ bus_registry_load_cache (BusRegistry *registry) IBusComponent *component; component = ibus_component_new_from_xml_node (pp->data); if (component) { - g_object_ref_sink (component); - registry->components = g_list_append (registry->components, component); + BusComponent *buscomp = bus_component_new (component, + NULL /* factory */); + g_object_ref_sink (buscomp); + registry->components = + g_list_append (registry->components, buscomp); } } @@ -246,12 +314,12 @@ bus_registry_check_modification (BusRegistry *registry) GList *p; for (p = registry->observed_paths; p != NULL; p = p->next) { - if (ibus_observed_path_check_modification ((IBusObservedPath *)p->data)) + if (ibus_observed_path_check_modification ((IBusObservedPath *) p->data)) return TRUE; } for (p = registry->components; p != NULL; p = p->next) { - if (ibus_component_check_modification ((IBusComponent *)p->data)) + if (ibus_component_check_modification (bus_component_get_component ((BusComponent *) p->data))) return TRUE; } @@ -268,6 +336,7 @@ bus_registry_save_cache (BusRegistry *registry) GString *output; GList *p; FILE *pf; + size_t items = 0; cachedir = g_build_filename (g_get_user_cache_dir (), "ibus", "bus", NULL); filename = g_build_filename (cachedir, "registry.xml", NULL); @@ -292,7 +361,7 @@ bus_registry_save_cache (BusRegistry *registry) g_string_append_indent (output, 1); g_string_append (output, "\n"); for (p = registry->observed_paths; p != NULL; p = p->next) { - ibus_observed_path_output ((IBusObservedPath *)p->data, + ibus_observed_path_output ((IBusObservedPath *) p->data, output, 2); } g_string_append_indent (output, 1); @@ -303,20 +372,25 @@ bus_registry_save_cache (BusRegistry *registry) g_string_append_indent (output, 1); g_string_append (output, "\n"); for (p = registry->components; p != NULL; p = p->next) { - ibus_component_output ((IBusComponent *)p->data, - output, 2); + ibus_component_output (bus_component_get_component ((BusComponent *) p->data), + output, 2); } g_string_append_indent (output, 1); g_string_append (output, "\n"); } g_string_append (output, "\n"); - fwrite (output->str, output->len, 1, pf); + items = fwrite (output->str, output->len, 1, pf); g_string_free (output, TRUE); fclose (pf); - return TRUE; + return (items == 1 ? TRUE : FALSE); } +/** + * bus_registry_load_in_dir: + * + * Read all XML files in dirname, create a BusComponent object for each file, and add the component objects to the registry. + */ static void bus_registry_load_in_dir (BusRegistry *registry, const gchar *dirname) @@ -342,14 +416,17 @@ bus_registry_load_in_dir (BusRegistry *registry, IBusComponent *component; size = g_utf8_strlen (filename, -1); - if (g_strcmp0 (MAX (filename, filename + size -4), ".xml" ) != 0) + if (g_strcmp0 (MAX (filename, filename + size - 4), ".xml") != 0) continue; path = g_build_filename (dirname, filename, NULL); component = ibus_component_new_from_file (path); if (component != NULL) { - g_object_ref_sink (component); - registry->components = g_list_append (registry->components, component); + BusComponent *buscomp = bus_component_new (component, + NULL /* factory */); + g_object_ref_sink (buscomp); + registry->components = + g_list_append (registry->components, buscomp); } g_free (path); @@ -363,21 +440,21 @@ BusRegistry * bus_registry_new (void) { BusRegistry *registry; - registry = (BusRegistry *)g_object_new (BUS_TYPE_REGISTRY, NULL); + registry = (BusRegistry *) g_object_new (BUS_TYPE_REGISTRY, NULL); return registry; } static gint -_component_is_name (IBusComponent *component, - const gchar *name) +bus_register_component_is_name_cb (BusComponent *component, + const gchar *name) { - g_assert (IBUS_IS_COMPONENT (component)); + g_assert (BUS_IS_COMPONENT (component)); g_assert (name); - return g_strcmp0 (component->name, name); + return g_strcmp0 (bus_component_get_name (component), name); } -IBusComponent * +BusComponent * bus_registry_lookup_component_by_name (BusRegistry *registry, const gchar *name) { @@ -387,9 +464,9 @@ bus_registry_lookup_component_by_name (BusRegistry *registry, GList *p; p = g_list_find_custom (registry->components, name, - (GCompareFunc)_component_is_name); + (GCompareFunc) bus_register_component_is_name_cb); if (p) { - return (IBusComponent *)p->data; + return (BusComponent *) p->data; } else { return NULL; @@ -412,7 +489,6 @@ bus_registry_get_engines (BusRegistry *registry) return g_hash_table_get_values (registry->engine_table); } - GList * bus_registry_get_engines_by_language (BusRegistry *registry, const gchar *language) @@ -431,7 +507,7 @@ bus_registry_get_engines_by_language (BusRegistry *registry, for (p2 = p1; p2 != NULL; p2 = p2->next) { IBusEngineDesc *desc = (IBusEngineDesc *) p2->data; - if (strncmp (desc->language, language, n) == 0) { + if (strncmp (ibus_engine_desc_get_language (desc), language, n) == 0) { engines = g_list_append (engines, desc); } } @@ -455,7 +531,7 @@ bus_registry_stop_all_components (BusRegistry *registry) { g_assert (BUS_IS_REGISTRY (registry)); - g_list_foreach (registry->components, (GFunc) ibus_component_stop, NULL); + g_list_foreach (registry->components, (GFunc) bus_component_stop, NULL); } @@ -480,10 +556,25 @@ _check_changes (BusRegistry *registry) GTimeVal tv; g_get_current_time (&tv); g_time_val_add (&tv, g_monitor_timeout * G_USEC_PER_SEC); - + /* Wait for the condition change or timeout. It will also unlock + * the mutex, so that other thread could obay the lock and modify + * the condition value. + * Note that we use g_cond_timed_wait() here rather than sleep() so + * that the loop can terminate immediately when the registry object + * is destroyed. See also comments in bus_registry_destroy(). + */ if (g_cond_timed_wait (registry->cond, registry->mutex, &tv) == FALSE) { - /* timeout */ + /* Timeout happens. We check the modification of all IMEs' xml files + * and related files specified in in xml files. + * If any file is changed, the changed signal will be emitted in + * main thread. It is for finding install/uninstall/upgrade of IMEs. + * On Linux desktop, ibus will popup UI to notificate users that + * some IMEs are changed and ibus need a restart. + */ if (bus_registry_check_modification (registry)) { + /* Emit the changed signal in main thread, and terminate + * this thread. + */ registry->changed = TRUE; g_idle_add ((GSourceFunc) _emit_changed_signal_cb, registry); break; @@ -496,6 +587,11 @@ _check_changes (BusRegistry *registry) return NULL; } +/** + * bus_registry_start_monitor_changes: + * + * Start the monitor thread. + */ void bus_registry_start_monitor_changes (BusRegistry *registry) { @@ -505,7 +601,7 @@ bus_registry_start_monitor_changes (BusRegistry *registry) g_return_if_fail (registry->changed == FALSE); registry->thread_running = TRUE; - registry->thread = g_thread_create ((GThreadFunc)_check_changes, + registry->thread = g_thread_create ((GThreadFunc) _check_changes, registry, TRUE, NULL); @@ -519,7 +615,7 @@ bus_registry_is_changed (BusRegistry *registry) } #endif -BusFactoryProxy * +void bus_registry_name_owner_changed (BusRegistry *registry, const gchar *name, const gchar *old_name, @@ -530,27 +626,37 @@ bus_registry_name_owner_changed (BusRegistry *registry, g_assert (old_name); g_assert (new_name); - IBusComponent *component; + BusComponent *component; BusFactoryProxy *factory; component = bus_registry_lookup_component_by_name (registry, name); if (component == NULL) { - return NULL; + /* name is a unique name, or a well-known name we don't know. */ + return; } if (g_strcmp0 (old_name, "") != 0) { - factory = bus_factory_proxy_get_from_component (component); + /* the component is stopped. */ + factory = bus_component_get_factory (component); if (factory != NULL) { - ibus_object_destroy ((IBusObject *)factory); + ibus_proxy_destroy ((IBusProxy *) factory); } } if (g_strcmp0 (new_name, "") != 0) { - factory = bus_factory_proxy_new (component, NULL); - return factory; + /* the component is started. */ + BusConnection *connection = + bus_dbus_impl_get_connection_by_name (BUS_DEFAULT_DBUS, + new_name); + if (connection == NULL) + return; + + factory = bus_factory_proxy_new (connection); + if (factory == NULL) + return; + bus_component_set_factory (component, factory); + g_object_unref (factory); } - - return NULL; } diff --git a/bus/registry.h b/bus/registry.h index 0bd564a55..cdabec094 100644 --- a/bus/registry.h +++ b/bus/registry.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,11 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#ifndef __REGISTRY_H_ -#define __REGISTRY_H_ +#ifndef __BUS_REGISTRY_H_ +#define __BUS_REGISTRY_H_ #include -#include "factoryproxy.h" +#include "component.h" /* * Type macros. @@ -47,52 +48,71 @@ G_BEGIN_DECLS typedef struct _BusRegistry BusRegistry; typedef struct _BusRegistryClass BusRegistryClass; -struct _BusRegistry { - IBusObject parent; - - /* instance members */ - GList *observed_paths; - GList *components; - - GHashTable *engine_table; - GList *active_engines; - - -#ifdef G_THREADS_ENABLED - GThread *thread; - gboolean thread_running; - GMutex *mutex; - GCond *cond; - gboolean changed; -#endif -}; - -struct _BusRegistryClass { - IBusObjectClass parent; - - /* class members */ -}; - GType bus_registry_get_type (void); BusRegistry *bus_registry_new (void); + +/** + * bus_registry_get_components: + * @returns: a list of BusComponent objects. The caller has to call g_list_free for the returned list. + */ GList *bus_registry_get_components (BusRegistry *registry); + +/** + * bus_registry_get_components: + * @returns: a list of all IBusEngineDesc objects available. The caller has to call g_list_free for the returned list. + */ GList *bus_registry_get_engines (BusRegistry *registry); + +/** + * bus_registry_get_components: + * @language: a language name like 'ja' + * @returns: a list of IBusEngineDesc objects for the language. The caller has to call g_list_free for the returned list. + */ GList *bus_registry_get_engines_by_language (BusRegistry *registry, const gchar *language); + +/** + * bus_registry_stop_all_components: + * + * Terminate all component processes. + */ void bus_registry_stop_all_components (BusRegistry *registry); -IBusComponent *bus_registry_lookup_component_by_name +/** + * bus_registry_lookup_component_by_name: + * @name: a component name such as 'org.freedesktop.IBus.Panel' and 'com.google.IBus.Mozc' + * @returns: a BusComponent object, or NULL if such component is not found. + */ +BusComponent *bus_registry_lookup_component_by_name (BusRegistry *registry, const gchar *name); + +/** + * bus_registry_find_engine_by_name: + * @name: an engine name like 'pinyin' + * @returns: an IBusEngineDesc object, or NULL if not found. + */ IBusEngineDesc *bus_registry_find_engine_by_name (BusRegistry *registry, const gchar *name); -BusFactoryProxy *bus_registry_name_owner_changed(BusRegistry *registry, + +/** + * bus_registry_name_owner_changed: + * @name: a unique or well-known name like ":1.1", "org.freedesktop.IBus.Config", "com.google.IBus.Mozc". + * @old_name: a unique name like ":1.1", or empty string "" when the client is started. + * @new_name: a unique name like ":1.1", or empty string "" when the client is stopped. + * + * Handle the "name-owner-changed" glib signal from dbusimpl. If a component is stopped, remove a BusFactoryProxy object from the + * bus for the component. If a component is started, create a new BusFactoryProxy object for the bus. + */ +void bus_registry_name_owner_changed + (BusRegistry *registry, const gchar *name, const gchar *old_name, const gchar *new_name); + #ifdef G_THREADS_ENABLED void bus_registry_start_monitor_changes (BusRegistry *registry); diff --git a/bus/server.c b/bus/server.c index 6c1478092..ed384602f 100644 --- a/bus/server.c +++ b/bus/server.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,139 +19,155 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include -#include -#include +#include "server.h" + +#include #include +#include -#include "server.h" -#include "connection.h" #include "dbusimpl.h" #include "ibusimpl.h" +#include "global.h" -/* functions prototype */ -static void bus_server_destroy (BusServer *server); -static void bus_server_new_connection - (BusServer *server, - BusConnection *connection); -G_DEFINE_TYPE (BusServer, bus_server, IBUS_TYPE_SERVER) +static GDBusServer *server = NULL; +static GMainLoop *mainloop = NULL; +static BusDBusImpl *dbus = NULL; +static BusIBusImpl *ibus = NULL; +static gchar *address = NULL; +static gboolean _restart = FALSE; static void -bus_server_class_init (BusServerClass *klass) +_restart_server (void) { - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); + extern gchar **g_argv; + gchar *exe; + gint fd; - ibus_object_class->destroy = (IBusObjectDestroyFunc) bus_server_destroy; + exe = g_strdup_printf ("/proc/%d/exe", getpid ()); + exe = g_file_read_link (exe, NULL); - IBUS_SERVER_CLASS (klass)->new_connection = - (IBusNewConnectionFunc) bus_server_new_connection; -} + if (exe == NULL) + exe = BINDIR "/ibus-daemon"; -BusServer * -bus_server_get_default (void) -{ - static BusServer *server = NULL; - - if (server == NULL) { - server = (BusServer *) g_object_new (BUS_TYPE_SERVER, - "connection-type", BUS_TYPE_CONNECTION, - NULL); - bus_dbus_impl_get_default (); - bus_ibus_impl_get_default (); + /* close all fds except stdin, stdout, stderr */ + for (fd = 3; fd <= sysconf (_SC_OPEN_MAX); fd ++) { + close (fd); } - return server; -} - -gboolean -bus_server_listen (BusServer *server) -{ - g_assert (BUS_IS_SERVER (server)); - const gchar *mechanisms[] = { - "EXTERNAL", - NULL - }; + _restart = FALSE; + execv (exe, g_argv); - const gchar *address = "unix:tmpdir=/tmp/"; - gboolean retval; - -#if 0 - path = ibus_get_socket_folder (); - mkdir (path, 0700); - chmod (path, 0700); - - address = ibus_get_address (); -#endif - - retval = ibus_server_listen (IBUS_SERVER (server), address); - -#if 0 - chmod (ibus_get_socket_path (), 0600); -#endif - - ibus_server_set_auth_mechanisms ((IBusServer *)server, mechanisms); - - if (!retval) { -#if 0 - g_printerr ("Can not listen on %s! Please try remove directory %s and run again.", address, path); -#else - g_printerr ("Can not listen on %s!", address); -#endif - exit (-1); + /* If the server binary is replaced while the server is running, + * "readlink /proc/[pid]/exe" might return a path with " (deleted)" + * suffix. */ + const gchar suffix[] = " (deleted)"; + if (g_str_has_suffix (exe, suffix)) { + exe [strlen (exe) - sizeof (suffix) + 1] = '\0'; + execv (exe, g_argv); } - - ibus_write_address (ibus_server_get_address (IBUS_SERVER (server))); - - return retval; + g_warning ("execv %s failed!", g_argv[0]); + exit (-1); } -void -bus_server_run (BusServer *server) +/** + * bus_new_connection_cb: + * @user_data: always NULL. + * @returns: TRUE when the function can handle the connection. + * + * Handle incoming connections. + */ +static gboolean +bus_new_connection_cb (GDBusServer *server, + GDBusConnection *dbus_connection, + gpointer user_data) { - g_assert (BUS_IS_SERVER (server)); - - g_main_loop_run (server->loop); + BusConnection *connection = bus_connection_new (dbus_connection); + bus_dbus_impl_new_connection (dbus, connection); + + if (g_object_is_floating (connection)) { + /* bus_dbus_impl_new_connection couldn't handle the connection. just delete the connection and return TRUE + * (so that other connection handler will not handle the deleted connection.) */ + ibus_object_destroy ((IBusObject *)connection); + g_object_unref (connection); + } + return TRUE; } void -bus_server_quit (BusServer *server) +bus_server_init (void) { - g_assert (BUS_IS_SERVER (server)); - - g_main_loop_quit (server->loop); + dbus = bus_dbus_impl_get_default (); + ibus = bus_ibus_impl_get_default (); + bus_dbus_impl_register_object (dbus, (IBusService *)ibus); + + /* init server */ + GDBusServerFlags flags = G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS; + gchar *guid = g_dbus_generate_guid (); + server = g_dbus_server_new_sync ( + g_address, /* the place where the socket file lives, e.g. /tmp, abstract namespace, etc. */ + flags, guid, + NULL /* observer */, + NULL /* cancellable */, + NULL /* error */); + g_free (guid); + + g_signal_connect (server, "new-connection", G_CALLBACK (bus_new_connection_cb), NULL); + + g_dbus_server_start (server); + + address = g_strdup_printf ("%s,guid=%s", + g_dbus_server_get_client_address (server), + g_dbus_server_get_guid (server)); + + /* write address to file */ + ibus_write_address (address); } -static void -bus_server_init (BusServer *server) +const gchar * +bus_server_get_address (void) { - server->loop = g_main_loop_new (NULL, FALSE); - server->dbus = bus_dbus_impl_get_default (); - server->ibus = bus_ibus_impl_get_default (); + return address; } -static void -bus_server_new_connection (BusServer *server, - BusConnection *connection) +void +bus_server_run (void) { - g_assert (BUS_IS_SERVER (server)); - bus_dbus_impl_new_connection (server->dbus, connection); + g_return_if_fail (server); + + /* create and run main loop */ + mainloop = g_main_loop_new (NULL, FALSE); + g_main_loop_run (mainloop); + + /* bus_server_quit is called. stop server */ + g_dbus_server_stop (server); + + ibus_object_destroy ((IBusObject *)dbus); + ibus_object_destroy ((IBusObject *)ibus); + + /* release resources */ + g_object_unref (server); + g_main_loop_unref (mainloop); + mainloop = NULL; + g_free (address); + address = NULL; + + /* When _ibus_exit() is called, bus_ibus_impl_destroy() needs + * to be called so that waitpid() prevents the processes from + * becoming the daemons. So we run execv() after + * ibus_object_destroy(ibus) is called here. */ + if (_restart) { + _restart_server (); + + /* should not reach here */ + g_assert_not_reached (); + } } -static void -bus_server_destroy (BusServer *server) +void +bus_server_quit (gboolean restart) { - g_assert (BUS_IS_SERVER (server)); - - ibus_object_destroy ((IBusObject *) server->dbus); - g_object_unref (server->dbus); - ibus_object_destroy ((IBusObject *) server->ibus); - g_object_unref (server->ibus); - - while (g_main_loop_is_running (server->loop)) { - g_main_loop_quit (server->loop); - } - g_main_loop_unref (server->loop); - - IBUS_OBJECT_CLASS (bus_server_parent_class)->destroy (IBUS_OBJECT (server)); + _restart = restart; + if (mainloop) + g_main_loop_quit (mainloop); } diff --git a/bus/server.h b/bus/server.h index ee056d084..e1cb3ecf6 100644 --- a/bus/server.h +++ b/bus/server.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,61 +19,44 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#ifndef __SERVER_H_ -#define __SERVER_H_ +#ifndef __BUS_SERVER_H_ +#define __BUS_SERVER_H_ #include -#include "dbusimpl.h" -#include "ibusimpl.h" - -/* - * Type macros. - */ - -/* define GOBJECT macros */ -#define BUS_TYPE_SERVER \ - (bus_server_get_type ()) -#define BUS_SERVER(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUS_TYPE_SERVER, BusServer)) -#define BUS_SERVER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), BUS_TYPE_SERVER, BusServerClass)) -#define BUS_IS_SERVER(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUS_TYPE_SERVER)) -#define BUS_IS_SERVER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), BUS_TYPE_SERVER)) -#define BUS_SERVER_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), BUS_TYPE_SERVER, BusServerClass)) -#define BUS_DEFAULT_SERVER \ - (bus_server_get_default ()) G_BEGIN_DECLS -typedef struct _BusServer BusServer; -typedef struct _BusServerClass BusServerClass; - -struct _BusServer { - IBusServer parent; - - /* instance members */ - GMainLoop *loop; - - BusDBusImpl *dbus; - BusIBusImpl *ibus; - -}; +/** + * bus_server_init: + * + * Initialize GDBus server and write the server address to a file, which is (usually) in ~/.config/ibus/bus/. + * Note that the function does not call g_main_loop_run. + */ +void bus_server_init (void); -struct _BusServerClass { - IBusServerClass parent; +/** + * bus_server_run: + * + * Enter the glib main loop. You have to call bus_server_init before calling this function. + */ +void bus_server_run (void); - /* class members */ -}; +/** + * bus_server_quit: + * @restart: TRUE if ibus-daemon restarts. + * + * Quit the glib main loop. + */ +void bus_server_quit (gboolean restart); -GType bus_server_get_type (void); -BusServer *bus_server_get_default (void); -gboolean bus_server_listen (BusServer *server); -void bus_server_run (BusServer *server); -void bus_server_quit (BusServer *server); +/** + * bus_server_get_address: + * @returns: The server address, e.g. "unix:abstract=/tmp/dbus-aEUnr11L,guid=8b343aaa69eabb9b282dce6f4cdbb4aa" + * + * Get the server address. This function might return NULL if it is called before initializing the server by + * calling bus_server_init. + */ +const gchar *bus_server_get_address (void); G_END_DECLS #endif - diff --git a/bus/test-client.c b/bus/test-client.c new file mode 100644 index 000000000..be7c8256a --- /dev/null +++ b/bus/test-client.c @@ -0,0 +1,397 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* bus - The Input Bus + * Copyright (C) 2010 Google Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include + +#include "test-client.h" + +#ifdef DEBUG +# define IDEBUG g_debug +#else +# define IDEBUG(a...) +#endif +/* functions prototype */ +static void bus_test_client_class_init (BusTestClientClass *class); +static void bus_test_client_destroy (IBusObject *object); + +/* static methods*/ +static gchar* _get_active_engine_name (void); +static void _store_modifier_state (BusTestClient *client, + guint modifier); +static gboolean _is_shift_set (BusTestClient *client); +static gboolean _is_modifier_set (BusTestClient *client, + guint modifier); +static gboolean _is_modifier_key (guint modifier); +static guint _get_modifiers_to_mask (BusTestClient *client); +static gint16 _get_keysym_to_keycode (guint keysym); + +static void _bus_disconnected_cb (IBusBus *ibusbus, + BusTestClient *client); +static void _bus_disabled_cb (IBusInputContext *ibuscontext, + BusTestClient *client); + +static IBusBus *_bus = NULL; +static Display *_xdisplay = NULL; + + +G_DEFINE_TYPE (BusTestClient, bus_test_client, IBUS_TYPE_OBJECT) + +static void +bus_test_client_class_init (BusTestClientClass *class) +{ + IDEBUG ("%s", __FUNCTION__); + + IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class); + + ibus_object_class->destroy = bus_test_client_destroy; + + /* init display object */ + if (_xdisplay == NULL) { + _xdisplay = XOpenDisplay (gdk_display_get_name (gdk_display_get_default ())); + } + + /* init bus object */ + if (_bus == NULL) { + ibus_set_display (XDisplayString (_xdisplay)); + _bus = ibus_bus_new(); + } + + g_signal_connect (_bus, "disconnected", G_CALLBACK (_bus_disconnected_cb), NULL); +} + +static void +bus_test_client_init (BusTestClient *client) +{ + IDEBUG ("%s", __FUNCTION__); + gchar *active_engine_name; + client->connected = FALSE; + client->enabled = FALSE; + + g_return_if_fail (ibus_bus_is_connected (_bus)); + client->connected = TRUE; + + client->ibuscontext = ibus_bus_create_input_context (_bus, "test-client"); + + g_return_if_fail (client->ibuscontext != NULL); + + g_signal_connect (client->ibuscontext, + "disabled", + G_CALLBACK (_bus_disabled_cb), + client); + + bus_test_client_clear_modifier (client); + + client->caps = IBUS_CAP_FOCUS; + ibus_input_context_set_capabilities (client->ibuscontext, client->caps); + + active_engine_name = _get_active_engine_name (); + + g_return_if_fail (active_engine_name != NULL); + IDEBUG ("engine:%s", active_engine_name); + ibus_input_context_focus_in (client->ibuscontext); + ibus_input_context_set_engine (client->ibuscontext, active_engine_name); + g_free (active_engine_name); + + client->enabled = TRUE; +} + +static void +bus_test_client_destroy (IBusObject *object) +{ + IDEBUG ("%s", __FUNCTION__); + BusTestClient *client = BUS_TEST_CLIENT (object); + + g_object_unref (client->ibuscontext); +} + +BusTestClient * +bus_test_client_new (void) +{ + IDEBUG ("%s", __FUNCTION__); + BusTestClient *client = BUS_TEST_CLIENT (g_object_new (BUS_TYPE_TEST_CLIENT, NULL)); + + if (client->connected && client->enabled) { + return client; + } else { + return NULL; + } +} + +gboolean +bus_test_client_is_enabled (BusTestClient *client) +{ + IDEBUG ("%s", __FUNCTION__); + return client->enabled; +} + +gboolean +bus_test_client_is_connected (BusTestClient *client) +{ + IDEBUG ("%s", __FUNCTION__); + return client->connected; +} + +gboolean +bus_test_client_send_key (BusTestClient *client, + guint keysym) +{ + gboolean is_modifier = _is_modifier_key (keysym); + gint16 keycode; + guint state; + + if (is_modifier) { + IDEBUG ("key: %d is modifier.", keysym); + gboolean is_modifier_set = _is_modifier_set (client, keysym); + keycode = _get_keysym_to_keycode (keysym); + state = _get_modifiers_to_mask (client); + + if (is_modifier_set) { + state |= IBUS_RELEASE_MASK; + } + ibus_input_context_process_key_event (client->ibuscontext, + keysym, + keycode, + state); + _store_modifier_state (client, keysym); + } else { + IDEBUG ("key: %d is not modifier.", keysym); + gboolean is_upper = !gdk_keyval_is_lower (keysym); + gboolean is_shift_set = _is_shift_set (client); + + if (is_upper && !is_shift_set) { + _store_modifier_state (client, IBUS_KEY_Shift_L); + } + keycode = _get_keysym_to_keycode (keysym); + state = _get_modifiers_to_mask (client); + ibus_input_context_process_key_event (client->ibuscontext, + keysym, + keycode, + state); + state |= IBUS_RELEASE_MASK; + ibus_input_context_process_key_event (client->ibuscontext, + keysym, + keycode, + state); + if (is_upper && !is_shift_set) { + _store_modifier_state (client, IBUS_KEY_Shift_L); + } + } + return TRUE; +} + +void bus_test_client_clear_modifier (BusTestClient *client) +{ + int i; + for (i = 0; i < MODIFIER_KEY_NUM; i++) { + (client->modifier)[i] = FALSE; + } +} + +static gchar * +_get_active_engine_name (void) +{ + GList *engines; + gchar *result; + + engines = ibus_bus_list_active_engines (_bus); + if (engines == NULL) { + return NULL; + } + + IBusEngineDesc *engine_desc = IBUS_ENGINE_DESC (engines->data); + if (engine_desc != NULL) { + result = g_strdup (ibus_engine_desc_get_name(engine_desc)); + } else { + result = NULL; + } + + for (; engines != NULL; engines = g_list_next (engines)) { + g_object_unref (IBUS_ENGINE_DESC (engines->data)); + } + g_list_free (engines); + + return result; +} + +static void +_store_modifier_state (BusTestClient *client, + guint modifier) +{ + switch(modifier) { + case IBUS_KEY_Shift_L: + case IBUS_KEY_Shift_R: + /* ShiftMask */ + client->modifier[0] = !client->modifier[0]; + break; + case IBUS_KEY_Shift_Lock: + case IBUS_KEY_Caps_Lock: + /* LockMask */ + client->modifier[1] = !client->modifier[1]; + break; + case IBUS_KEY_Control_L: + case IBUS_KEY_Control_R: + /* ControlMask */ + client->modifier[2] = !client->modifier[2]; + break; + case IBUS_KEY_Alt_L: + case IBUS_KEY_Alt_R: + case IBUS_KEY_Meta_L: + /* Mod1Mask */ + client->modifier[3] = !client->modifier[3]; + break; + case IBUS_KEY_Num_Lock: + /* Mod2Mask */ + client->modifier[4] = !client->modifier[4]; + break; + case IBUS_KEY_Super_L: + case IBUS_KEY_Hyper_L: + /* Mod4Mask */ + client->modifier[5] = !client->modifier[5]; + break; + case IBUS_KEY_ISO_Level3_Shift: + case IBUS_KEY_Mode_switch: + /* Mod5Mask */ + client->modifier[6] = !client->modifier[6]; + break; + default: + break; + } +} + +static gint16 +_get_keysym_to_keycode (guint keysym) +{ + return XKeysymToKeycode (_xdisplay, keysym); +} + +static gboolean +_is_shift_set (BusTestClient *client) +{ + return client->modifier[0]; +} + +static gboolean +_is_modifier_set (BusTestClient *client, + guint modifier) +{ + switch(modifier) { + case IBUS_KEY_Shift_L: + case IBUS_KEY_Shift_R: + /* ShiftMask */ + return client->modifier[0]; + case IBUS_KEY_Shift_Lock: + case IBUS_KEY_Caps_Lock: + /* LockMask */ + return client->modifier[1]; + case IBUS_KEY_Control_L: + case IBUS_KEY_Control_R: + /* ControlMask */ + return client->modifier[2]; + case IBUS_KEY_Alt_L: + case IBUS_KEY_Alt_R: + case IBUS_KEY_Meta_L: + /* Mod1Mask */ + return client->modifier[3]; + case IBUS_KEY_Num_Lock: + /* Mod2Mask */ + return client->modifier[4]; + case IBUS_KEY_Super_L: + case IBUS_KEY_Hyper_L: + /* Mod4Mask */ + return client->modifier[5]; + case IBUS_KEY_ISO_Level3_Shift: + case IBUS_KEY_Mode_switch: + /* Mod5Mask */ + return client->modifier[6]; + default: + return FALSE; + } +} + +static gboolean +_is_modifier_key (guint modifier) +{ + switch(modifier) { + case IBUS_KEY_Shift_L: + case IBUS_KEY_Shift_R: + case IBUS_KEY_Shift_Lock: + case IBUS_KEY_Caps_Lock: + case IBUS_KEY_Control_L: + case IBUS_KEY_Control_R: + case IBUS_KEY_Alt_L: + case IBUS_KEY_Alt_R: + case IBUS_KEY_Meta_L: + case IBUS_KEY_Num_Lock: + case IBUS_KEY_Super_L: + case IBUS_KEY_Hyper_L: + case IBUS_KEY_ISO_Level3_Shift: + case IBUS_KEY_Mode_switch: + return TRUE; + default: + return FALSE; + } +} + +static guint +_get_modifiers_to_mask (BusTestClient *client) +{ + guint retval = 0; + if(client->modifier[0]) + retval |= IBUS_SHIFT_MASK; + if(client->modifier[1]) + retval |= IBUS_LOCK_MASK; + if(client->modifier[2]) + retval |= IBUS_CONTROL_MASK; + if(client->modifier[3]) + retval |= IBUS_MOD1_MASK; + if(client->modifier[4]) + retval |= IBUS_MOD2_MASK; + if(client->modifier[5]) + retval |= IBUS_MOD4_MASK; + if(client->modifier[6]) + retval |= IBUS_MOD5_MASK; + return retval; +} + +static void +_bus_disconnected_cb (IBusBus *ibusbus, + BusTestClient *client) +{ + g_assert (IBUS_IS_BUS (ibusbus)); + g_assert (BUS_IS_TEST_CLIENT (client)); + IDEBUG ("%s", __FUNCTION__); + client->connected = FALSE; + IDEBUG ("Disconnected ibus daemon"); +} + +static void +_bus_disabled_cb (IBusInputContext *ibuscontext, + BusTestClient *client) +{ + g_assert (IBUS_IS_INPUT_CONTEXT (ibuscontext)); + g_assert (BUS_IS_TEST_CLIENT (client)); + IDEBUG ("%s", __FUNCTION__); + client->enabled = FALSE; + IDEBUG ("Disabled ibus engine"); +} + diff --git a/bus/test-client.h b/bus/test-client.h new file mode 100644 index 000000000..6a059d17b --- /dev/null +++ b/bus/test-client.h @@ -0,0 +1,81 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* bus - The Input Bus + * Copyright (C) 2010 Google Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __BUS_TEST_CLIENT_H_ +#define __BUS_TEST_CLIENT_H_ + +#include + +/* + * Type macros. + */ + +/* define GOBJECT macros */ +#define BUS_TYPE_TEST_CLIENT \ + (bus_test_client_get_type ()) +#define BUS_TEST_CLIENT(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), BUS_TYPE_TEST_CLIENT, BusTestClient)) +#define BUS_TEST_CLIENT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), BUS_TYPE_TEST_CLIENT, BusTestClientClass)) +#define BUS_IS_TEST_CLIENT(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BUS_TYPE_TEST_CLIENT)) +#define BUS_IS_TEST_CLIENT_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), BUS_TYPE_TEST_CLIENT)) +#define BUS_TEST_CLIENT_GET_CLASS(obj) \ + (G_TYPE_CHECK_GET_CLASS ((obj), BUS_TYPE_TEST_CLIENT, BusTestClientClass)) + +#define MODIFIER_KEY_NUM 7 + +G_BEGIN_DECLS +typedef struct _BusTestClient BusTestClient; +typedef struct _BusTestClientClass BusTestClientClass; + +struct _BusTestClient { + IBusObject parent; + /* instance members */ + IBusInputContext *ibuscontext; + /* modifier key state */ + gboolean modifier[MODIFIER_KEY_NUM]; + + gint caps; + /* engine is enabled */ + gboolean enabled; + /* ibus-daemon is enabled */ + gboolean connected; + /* private member */ +}; + +struct _BusTestClientClass { + IBusObjectClass parent; + /* class members */ +}; + +GType bus_test_client_get_type (void); +BusTestClient *bus_test_client_new (void); +gboolean bus_test_client_is_enabled (BusTestClient *client); +gboolean bus_test_client_is_connected (BusTestClient *client); +gboolean bus_test_client_send_key (BusTestClient *client, + guint keysym); +void bus_test_client_clear_modifier (BusTestClient *client); + +G_END_DECLS +#endif + diff --git a/bus/test-matchrule.c b/bus/test-matchrule.c index 07cbf1c6c..07df607e6 100644 --- a/bus/test-matchrule.c +++ b/bus/test-matchrule.c @@ -1,41 +1,60 @@ -#include +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ + #include "matchrule.h" +struct _BusMatchRule { + IBusObject parent; + /* instance members */ + gint flags; + gint message_type; + gchar *interface; + gchar *member; + gchar *sender; + gchar *destination; + gchar *path; + GArray *args; + GList *recipients; +}; + int main(gint argc, gchar **argv) { - BusMatchRule *rule, *rule1; - g_type_init (); - - rule = bus_match_rule_new (" type='signal' , interface = 'org.freedesktop.IBus' "); - g_assert (rule->message_type == DBUS_MESSAGE_TYPE_SIGNAL); - g_assert (g_strcmp0 (rule->interface, "org.freedesktop.IBus") == 0 ); - g_object_unref (rule); - - rule = bus_match_rule_new ("type='method_call', interface='org.freedesktop.IBus' "); - g_assert (rule->message_type == DBUS_MESSAGE_TYPE_METHOD_CALL); - g_assert (g_strcmp0 (rule->interface, "org.freedesktop.IBus") == 0 ); - g_object_unref (rule); - - rule = bus_match_rule_new ("type='signal'," - "interface='org.freedesktop.DBus'," - "member='NameOwnerChanged'," - "arg0='ibus.freedesktop.IBus.config'," - "arg0='ibus.freedesktop.IBus.config'," - "arg2='ibus.freedesktop.IBus.config'"); - g_assert (rule->message_type == DBUS_MESSAGE_TYPE_SIGNAL); - g_assert (g_strcmp0 (rule->interface, "org.freedesktop.DBus") == 0 ); - rule1 = bus_match_rule_new ("type='signal'," - "interface='org.freedesktop.DBus'," - "member='NameOwnerChanged'," - "arg0='ibus.freedesktop.IBus.config'," - "arg0='ibus.freedesktop.IBus.config'," - "arg2='ibus.freedesktop.IBus.config'"); - - g_assert (bus_match_rule_is_equal (rule, rule1)); - - g_object_unref (rule); - g_object_unref (rule1); - - return 0; + BusMatchRule *rule, *rule1; + g_type_init (); + + rule = bus_match_rule_new (" type='signal' , interface = 'org.freedesktop.IBus' "); + g_assert (rule->message_type == G_DBUS_MESSAGE_TYPE_SIGNAL); + g_assert (g_strcmp0 (rule->interface, "org.freedesktop.IBus") == 0 ); + g_object_unref (rule); + + rule = bus_match_rule_new ("type='method_call' ,\n" + " interface='org.freedesktop.IBus' "); + g_assert (rule->message_type == G_DBUS_MESSAGE_TYPE_METHOD_CALL); + g_assert (g_strcmp0 (rule->interface, "org.freedesktop.IBus") == 0 ); + g_object_unref (rule); + + rule = bus_match_rule_new ("type='signal'," + "interface='org.freedesktop.DBus'," + "member='NameOwnerChanged'," + "arg0='ibus.freedesktop.IBus.config'," + "arg0='ibus.freedesktop.IBus.config'," + "arg2='ibus.freedesktop.IBus.config'"); + g_assert (rule->message_type == G_DBUS_MESSAGE_TYPE_SIGNAL); + g_assert (g_strcmp0 (rule->interface, "org.freedesktop.DBus") == 0 ); + rule1 = bus_match_rule_new ("type='signal'," + "interface='org.freedesktop.DBus'," + "member='NameOwnerChanged'," + "arg0='ibus.freedesktop.IBus.config'," + "arg0='ibus.freedesktop.IBus.config'," + "arg2='ibus.freedesktop.IBus.config'"); + + g_assert (bus_match_rule_is_equal (rule, rule1)); + + g_object_unref (rule); + g_object_unref (rule1); + + rule = bus_match_rule_new ("type='method_call',interface='org.freedesktop.IBus "); + g_assert (rule == NULL); + + return 0; } diff --git a/bus/test-registry.c b/bus/test-registry.c index fdcbba87d..97f05790c 100644 --- a/bus/test-registry.c +++ b/bus/test-registry.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ #include "registry.h" int main() diff --git a/bus/test-stress.c b/bus/test-stress.c new file mode 100644 index 000000000..b05129554 --- /dev/null +++ b/bus/test-stress.c @@ -0,0 +1,117 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* bus - The Input Bus + * Copyright (C) 2010 Google Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#include +#include + +#include +#include +#include +#include +#include "test-client.h" + +#define MAX_SEND_KEY_NUM 100 +#define MAX_RANDOM_SPACE 5 + +static gboolean +_sleep_cb (gpointer user_data) +{ + gtk_main_quit (); + return FALSE; +} + +static void +_sleep (guint millisecond) +{ + g_timeout_add (millisecond, (GSourceFunc) _sleep_cb, NULL); + gtk_main (); +} + +/* ibus stress test + Send random key press and release event message to ibus-daemon. + Key kind are a-z and space. + Check ibus-daemon and ibus engine crash. +*/ +gint +main (gint argc, gchar **argv) +{ + GTimer *timer; + GRand *rnd; + BusTestClient *client; + /* num of send space key */ + guint32 seed = (guint32) time (NULL); + int count = 0; + int send_key_num = 0; + + setlocale (LC_ALL, ""); + gtk_set_locale (); + gtk_init (&argc, &argv); + + /* need to set active engine */ + client = bus_test_client_new (); + if (client == NULL) { + g_printerr ("don't create test-client instance."); + exit(1); + } + + timer = g_timer_new (); + rnd = g_rand_new (); + g_rand_set_seed (rnd, seed); + g_print("random seed:%u\n",seed); + g_timer_start (timer); + + while (1) { + guint keysym; + if (send_key_num > MAX_SEND_KEY_NUM) { + break; + } + if (!bus_test_client_is_connected (client)) { + g_printerr ("ibus-daemon is disconnected\n"); + break; + } + if (!bus_test_client_is_enabled (client)) { + g_printerr ("ibus engine is enabled\n"); + break; + } + + if(count>0 || g_rand_int_range (rnd, 0, 5) == 0) { + /* send space key 20% */ + if (count == 0) { + count = g_rand_int_range (rnd, 0, MAX_RANDOM_SPACE) + 1; + } + if (count-- == 1) { + keysym = IBUS_KEY_Return; + } else { + keysym = IBUS_KEY_space; + } + } else { + /* send random a-z key */ + keysym = g_rand_int_range (rnd, 0, 'z'-'a'+1) + 'a'; + } + bus_test_client_send_key (client, keysym); + send_key_num += 1; + /* limit the typing rate to 800 hits/minutes */ + _sleep (1000 * 60 / 800); + } + + g_print ("%f sec\n", g_timer_elapsed (timer, NULL)); + + return 0; +} diff --git a/bus/option.h b/bus/types.h similarity index 81% rename from bus/option.h rename to bus/types.h index 080eff8c5..efb914f70 100644 --- a/bus/option.h +++ b/bus/types.h @@ -1,7 +1,8 @@ /* vim:set et sts=4: */ -/* bus - The Input Bus +/* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang * Copyright (C) 2008-2010 Red Hat, Inc. + * Copyright (c) 2010 Google, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,16 +19,12 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#ifndef __OPTION_H_ -#define __OPTION_H_ +#ifndef __BUS_TYPES_H_ +#define __BUS_TYPES_H_ -G_BEGIN_DECLS +#include -extern gboolean g_rescan; -extern gboolean g_mempro; -extern gboolean g_verbose; -extern gint g_dbus_timeout; +#define I_(string) g_intern_static_string (string) -G_END_DECLS #endif diff --git a/client/Makefile.am b/client/Makefile.am index fa3cee6c2..535610245 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -37,3 +37,5 @@ SUBDIRS = \ $(GTK3) \ $(X11) \ $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/client/gtk2/Makefile.am b/client/gtk2/Makefile.am index 8fb3d30d6..471a11c66 100644 --- a/client/gtk2/Makefile.am +++ b/client/gtk2/Makefile.am @@ -20,7 +20,7 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA -libibus = $(top_builddir)/src/libibus.la +libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la INCLUDES = \ -I$(top_srcdir)/src \ @@ -62,3 +62,5 @@ EXTRA_DIST = \ test: all GTK_IM_MODULE=ibus gedit + +-include $(top_srcdir)/git.mk diff --git a/client/gtk2/ibusim.c b/client/gtk2/ibusim.c index f50f28941..13c738002 100644 --- a/client/gtk2/ibusim.c +++ b/client/gtk2/ibusim.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et ts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -19,7 +20,6 @@ * Boston, MA 02111-1307, USA. */ -#include #include #include #include @@ -51,7 +51,7 @@ im_module_init (GTypeModule *type_module) { /* make module resident */ g_type_module_use (type_module); - + ibus_init (); ibus_im_context_register_type (type_module); } diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c index 2bd37a9d1..1fcd2b2c2 100644 --- a/client/gtk2/ibusimcontext.c +++ b/client/gtk2/ibusimcontext.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -23,16 +24,16 @@ # include #endif -#include -#include -#include -#include -#include -#include #include +#include +#include #include #include "ibusimcontext.h" +#if !GTK_CHECK_VERSION (2, 91, 0) +# define DEPRECATED_GDK_KEYSYMS 1 +#endif + #ifdef DEBUG # define IDEBUG g_debug #else @@ -46,8 +47,6 @@ struct _IBusIMContext { GtkIMContext *slave; GdkWindow *client_window; - /* enabled */ - gboolean enable; IBusInputContext *ibuscontext; /* preedit status */ @@ -59,8 +58,11 @@ struct _IBusIMContext { GdkRectangle cursor_area; gboolean has_focus; + guint32 time; gint caps; + /* cancellable */ + GCancellable *cancellable; }; struct _IBusIMContextClass { @@ -75,13 +77,20 @@ static guint _signal_preedit_end_id = 0; static guint _signal_delete_surrounding_id = 0; static guint _signal_retrieve_surrounding_id = 0; -static const gchar *_snooper_apps = SNOOPER_APPS; +static const gchar *_no_snooper_apps = NO_SNOOPER_APPS; static gboolean _use_key_snooper = ENABLE_SNOOPER; +static guint _key_snooper_id = 0; + +static gboolean _use_sync_mode = FALSE; static GtkIMContext *_focus_im_context = NULL; +static IBusInputContext *_fake_context = NULL; +static GdkWindow *_input_window = NULL; +static GtkWidget *_input_widget = NULL; /* functions prototype */ -static void ibus_im_context_class_init (IBusIMContextClass *klass); +static void ibus_im_context_class_init (IBusIMContextClass *class); +static void ibus_im_context_class_fini (IBusIMContextClass *class); static void ibus_im_context_init (GObject *obj); static void ibus_im_context_finalize (GObject *obj); static void ibus_im_context_reset (GtkIMContext *context); @@ -104,11 +113,17 @@ static void ibus_im_context_set_cursor_location static void ibus_im_context_set_use_preedit (GtkIMContext *context, gboolean use_preedit); +static void ibus_im_context_set_surrounding + (GtkIMContext *slave, + const gchar *text, + gint len, + gint cursor_index); + /* static methods*/ static void _create_input_context (IBusIMContext *context); -static void _set_cursor_location_internal - (GtkIMContext *context); +static gboolean _set_cursor_location_internal + (IBusIMContext *context); static void _bus_connected_cb (IBusBus *bus, IBusIMContext *context); @@ -122,14 +137,16 @@ static void _slave_preedit_start_cb (GtkIMContext *slave, IBusIMContext *context); static void _slave_preedit_end_cb (GtkIMContext *slave, IBusIMContext *context); -static void _slave_retrieve_surrounding_cb +static gboolean _slave_retrieve_surrounding_cb (GtkIMContext *slave, - IBusIMContext *context); -static void _slave_delete_surrounding_cb + IBusIMContext *context); +static gboolean _slave_delete_surrounding_cb (GtkIMContext *slave, - gint offset_from_cursor, - guint nchars, - IBusIMContext *context); + gint offset_from_cursor, + guint nchars, + IBusIMContext *context); +static void _request_surrounding_text (IBusIMContext *context); +static void _create_fake_input_context (void); @@ -145,17 +162,17 @@ ibus_im_context_register_type (GTypeModule *type_module) static const GTypeInfo ibus_im_context_info = { sizeof (IBusIMContextClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, (GClassInitFunc) ibus_im_context_class_init, - NULL, /* class finialize */ + (GClassFinalizeFunc) ibus_im_context_class_fini, NULL, /* class data */ sizeof (IBusIMContext), 0, (GInstanceInitFunc) ibus_im_context_init, }; - if (! _ibus_type_im_context ) { + if (!_ibus_type_im_context) { if (type_module) { _ibus_type_im_context = g_type_module_register_type (type_module, @@ -196,6 +213,79 @@ ibus_im_context_new (void) return IBUS_IM_CONTEXT (obj); } +static gboolean +_focus_in_cb (GtkWidget *widget, + GdkEventFocus *event, + gpointer user_data) +{ + if (_focus_im_context == NULL && _fake_context != NULL) { + ibus_input_context_focus_in (_fake_context); + } + return FALSE; +} + +static gboolean +_focus_out_cb (GtkWidget *widget, + GdkEventFocus *event, + gpointer user_data) +{ + if (_focus_im_context == NULL && _fake_context != NULL) { + ibus_input_context_focus_out (_fake_context); + } + return FALSE; +} + +static void +_process_key_event_done (GObject *object, + GAsyncResult *res, + gpointer user_data) +{ + IBusInputContext *context = (IBusInputContext *)object; + GdkEventKey *event = (GdkEventKey *) user_data; + + GError *error = NULL; + gboolean retval = ibus_input_context_process_key_event_async_finish ( + context, + res, + &error); + + if (error != NULL) { + g_warning ("Process Key Event failed: %s.", error->message); + g_error_free (error); + } + + if (retval == FALSE) { + event->state |= IBUS_IGNORED_MASK; + gdk_event_put ((GdkEvent *)event); + } + gdk_event_free ((GdkEvent *)event); +} + + +/* emit "retrieve-surrounding" glib signal of GtkIMContext, if + * context->caps has IBUS_CAP_SURROUNDING_TEXT and the current IBus + * engine needs surrounding-text. + */ +static void +_request_surrounding_text (IBusIMContext *context) +{ + if (context && + (context->caps & IBUS_CAP_SURROUNDING_TEXT) != 0 && + context->ibuscontext != NULL && + ibus_input_context_needs_surrounding_text (context->ibuscontext)) { + gboolean return_value; + IDEBUG ("requesting surrounding text"); + g_signal_emit (context, _signal_retrieve_surrounding_id, 0, + &return_value); + if (!return_value) { + context->caps &= ~IBUS_CAP_SURROUNDING_TEXT; + ibus_input_context_set_capabilities (context->ibuscontext, + context->caps); + } + } +} + + static gint _key_snooper_cb (GtkWidget *widget, GdkEventKey *event, @@ -204,15 +294,21 @@ _key_snooper_cb (GtkWidget *widget, IDEBUG ("%s", __FUNCTION__); gboolean retval = FALSE; - IBusIMContext *ibusimcontext = (IBusIMContext *)_focus_im_context; - - if (G_UNLIKELY (!_use_key_snooper)) - return retval; + IBusIMContext *ibusimcontext = (IBusIMContext *) _focus_im_context; + IBusInputContext *ibuscontext = NULL; - if (ibusimcontext == NULL) - return FALSE; + if (ibusimcontext != NULL && + ibusimcontext->has_focus == TRUE) { + /* has IC with focus and use_key_snooper is true */ + if (_use_key_snooper) + ibuscontext = ibusimcontext->ibuscontext; + } + else { + /* If no IC has focus, and fake IC has been created, then pass key events to fake IC. */ + ibuscontext = _fake_context; + } - if (G_UNLIKELY (ibusimcontext->ibuscontext == NULL || ibusimcontext->has_focus == FALSE)) + if (ibuscontext == NULL) return FALSE; if (G_UNLIKELY (event->state & IBUS_HANDLED_MASK)) @@ -221,22 +317,90 @@ _key_snooper_cb (GtkWidget *widget, if (G_UNLIKELY (event->state & IBUS_IGNORED_MASK)) return FALSE; - switch (event->type) { - case GDK_KEY_RELEASE: - retval = ibus_input_context_process_key_event (ibusimcontext->ibuscontext, - event->keyval, - event->hardware_keycode - 8, - event->state | IBUS_RELEASE_MASK); - break; - case GDK_KEY_PRESS: - retval = ibus_input_context_process_key_event (ibusimcontext->ibuscontext, - event->keyval, - event->hardware_keycode - 8, - event->state); - break; - default: - retval = FALSE; - break; + do { + if (_fake_context != ibuscontext) + break; + + /* window has input focus is not changed */ + if (_input_window == event->window) + break; + + if (_input_window != NULL) { + g_object_remove_weak_pointer ((GObject *) _input_window, + (gpointer *) &_input_window); + } + if (event->window != NULL) { + g_object_add_weak_pointer ((GObject *) event->window, + (gpointer *) &_input_window); + } + _input_window = event->window; + + /* Trace widget has input focus, and listen focus events of it. + * It is workaround for Alt+Shift+Tab shortcut key issue(crosbug.com/8855). + * gtk_get_event_widget returns the widget that is associated with the + * GdkWindow of the GdkEvent. + * */ + GtkWidget *widget = gtk_get_event_widget ((GdkEvent *)event); + /* g_assert (_input_widget != widget). */ + if (_input_widget == widget) + break; + + if (_input_widget != NULL) { + g_signal_handlers_disconnect_by_func (_input_widget, + (GCallback) _focus_in_cb, + NULL); + g_signal_handlers_disconnect_by_func (_input_widget, + (GCallback) _focus_out_cb, + NULL); + g_object_remove_weak_pointer ((GObject *) _input_widget, + (gpointer *) &_input_widget); + } + + if (widget != NULL) { + g_signal_connect (widget, + "focus-in-event", + (GCallback) _focus_in_cb, + NULL); + g_signal_connect (widget, + "focus-out-event", + (GCallback) _focus_out_cb, + NULL); + g_object_add_weak_pointer ((GObject *) widget, + (gpointer *) &_input_widget); + } + _input_widget = widget; + + } while (0); + + if (ibusimcontext != NULL) { + _request_surrounding_text (ibusimcontext); + ibusimcontext->time = event->time; + } + + guint state = event->state; + if (event->type == GDK_KEY_RELEASE) { + state |= IBUS_RELEASE_MASK; + } + + if (_use_sync_mode) { + retval = ibus_input_context_process_key_event ( + ibuscontext, + event->keyval, + event->hardware_keycode - 8, + state); + } + else { + ibus_input_context_process_key_event_async ( + ibuscontext, + event->keyval, + event->hardware_keycode - 8, + state, + -1, + NULL, + _process_key_event_done, + gdk_event_copy ((GdkEvent *) event)); + retval = TRUE; + } if (retval) { @@ -249,15 +413,34 @@ _key_snooper_cb (GtkWidget *widget, return retval; } +static gboolean +_get_boolean_env(const gchar *name, + gboolean defval) +{ + const gchar *value = g_getenv (name); + + if (value == NULL) + return defval; + + if (g_strcmp0 (value, "") == 0 || + g_strcmp0 (value, "0") == 0 || + g_strcmp0 (value, "false") == 0 || + g_strcmp0 (value, "False") == 0 || + g_strcmp0 (value, "FALSE") == 0) + return FALSE; + + return TRUE; +} + static void -ibus_im_context_class_init (IBusIMContextClass *klass) +ibus_im_context_class_init (IBusIMContextClass *class) { IDEBUG ("%s", __FUNCTION__); - GtkIMContextClass *im_context_class = GTK_IM_CONTEXT_CLASS (klass); - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + GtkIMContextClass *im_context_class = GTK_IM_CONTEXT_CLASS (class); + GObjectClass *gobject_class = G_OBJECT_CLASS (class); - parent_class = (GtkIMContextClass *) g_type_class_peek_parent (klass); + parent_class = (GtkIMContextClass *) g_type_class_peek_parent (class); im_context_class->reset = ibus_im_context_reset; im_context_class->focus_in = ibus_im_context_focus_in; @@ -267,71 +450,111 @@ ibus_im_context_class_init (IBusIMContextClass *klass) im_context_class->set_client_window = ibus_im_context_set_client_window; im_context_class->set_cursor_location = ibus_im_context_set_cursor_location; im_context_class->set_use_preedit = ibus_im_context_set_use_preedit; + im_context_class->set_surrounding = ibus_im_context_set_surrounding; gobject_class->finalize = ibus_im_context_finalize; _signal_commit_id = - g_signal_lookup ("commit", G_TYPE_FROM_CLASS (klass)); + g_signal_lookup ("commit", G_TYPE_FROM_CLASS (class)); g_assert (_signal_commit_id != 0); _signal_preedit_changed_id = - g_signal_lookup ("preedit-changed", G_TYPE_FROM_CLASS (klass)); + g_signal_lookup ("preedit-changed", G_TYPE_FROM_CLASS (class)); g_assert (_signal_preedit_changed_id != 0); _signal_preedit_start_id = - g_signal_lookup ("preedit-start", G_TYPE_FROM_CLASS (klass)); + g_signal_lookup ("preedit-start", G_TYPE_FROM_CLASS (class)); g_assert (_signal_preedit_start_id != 0); _signal_preedit_end_id = - g_signal_lookup ("preedit-end", G_TYPE_FROM_CLASS (klass)); + g_signal_lookup ("preedit-end", G_TYPE_FROM_CLASS (class)); g_assert (_signal_preedit_end_id != 0); _signal_delete_surrounding_id = - g_signal_lookup ("delete-surrounding", G_TYPE_FROM_CLASS (klass)); + g_signal_lookup ("delete-surrounding", G_TYPE_FROM_CLASS (class)); g_assert (_signal_delete_surrounding_id != 0); _signal_retrieve_surrounding_id = - g_signal_lookup ("retrieve-surrounding", G_TYPE_FROM_CLASS (klass)); + g_signal_lookup ("retrieve-surrounding", G_TYPE_FROM_CLASS (class)); g_assert (_signal_retrieve_surrounding_id != 0); - const gchar *ibus_snooper = g_getenv ("IBUS_SNOOPER"); - if (ibus_snooper) { - /* env IBUS_SNOOPER exist */ - if (g_strcmp0 (ibus_snooper, "") == 0 || - g_strcmp0 (ibus_snooper, "0") == 0 || - g_strcmp0 (ibus_snooper, "false") == 0 || - g_strcmp0 (ibus_snooper, "FALSE") == 0) { - _use_key_snooper = FALSE; + _use_key_snooper = !_get_boolean_env ("IBUS_DISABLE_SNOOPER", + !(ENABLE_SNOOPER)); + _use_sync_mode = _get_boolean_env ("IBUS_ENABLE_SYNC_MODE", FALSE); + + /* env IBUS_DISABLE_SNOOPER does not exist */ + if (_use_key_snooper) { + /* disable snooper if app is in _no_snooper_apps */ + const gchar * prgname = g_get_prgname (); + if (g_getenv ("IBUS_NO_SNOOPER_APPS")) { + _no_snooper_apps = g_getenv ("IBUS_NO_SNOOPER_APPS"); } - else { - _use_key_snooper = TRUE; + gchar **p; + gchar ** apps = g_strsplit (_no_snooper_apps, ",", 0); + for (p = apps; *p != NULL; p++) { + if (g_regex_match_simple (*p, prgname, 0, 0)) { + _use_key_snooper = FALSE; + break; + } } + g_strfreev (apps); } - else { - /* env IBUS_SNOOPER does not exist */ - if (!_use_key_snooper) { - /* disable snooper if app is in _no_snooper_apps */ - const gchar * prgname = g_get_prgname (); - if (g_getenv ("IBUS_SNOOPER_APPS")) { - _snooper_apps = g_getenv ("IBUS_SNOOPER_APPS"); - } - gchar **p; - gchar ** apps = g_strsplit (_snooper_apps, ",", 0); - for (p = apps; *p != NULL; p++) { - if (g_regex_match_simple (*p, prgname, 0, 0)) { - _use_key_snooper = TRUE; - break; - } - } - g_strfreev (apps); + + /* init bus object */ + if (_bus == NULL) { + ibus_set_display (gdk_display_get_name (gdk_display_get_default ())); + _bus = ibus_bus_new (); + + /* init the global fake context */ + if (ibus_bus_is_connected (_bus)) { + _create_fake_input_context (); } + + g_signal_connect (_bus, "connected", G_CALLBACK (_bus_connected_cb), NULL); } - IDEBUG ("snooper = %d", _use_key_snooper); - if (_use_key_snooper) { - gtk_key_snooper_install (_key_snooper_cb, NULL); + + /* always install snooper */ + if (_key_snooper_id == 0) + _key_snooper_id = gtk_key_snooper_install (_key_snooper_cb, NULL); +} + +static void +ibus_im_context_class_fini (IBusIMContextClass *class) +{ + if (_key_snooper_id != 0) { + IDEBUG ("snooper is terminated."); + gtk_key_snooper_remove (_key_snooper_id); + _key_snooper_id = 0; } } +/* Copied from gtk+2.0-2.20.1/modules/input/imcedilla.c to fix crosbug.com/11421. + * Overwrite the original Gtk+'s compose table in gtk+-2.x.y/gtk/gtkimcontextsimple.c. */ + +/* The difference between this and the default input method is the handling + * of C+acute - this method produces C WITH CEDILLA rather than C WITH ACUTE. + * For languages that use CCedilla and not acute, this is the preferred mapping, + * and is particularly important for pt_BR, where the us-intl keyboard is + * used extensively. + */ +static guint16 cedilla_compose_seqs[] = { +#ifdef DEPRECATED_GDK_KEYSYMS + GDK_dead_acute, GDK_C, 0, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */ + GDK_dead_acute, GDK_c, 0, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */ + GDK_Multi_key, GDK_apostrophe, GDK_C, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */ + GDK_Multi_key, GDK_apostrophe, GDK_c, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */ + GDK_Multi_key, GDK_C, GDK_apostrophe, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */ + GDK_Multi_key, GDK_c, GDK_apostrophe, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */ +#else + GDK_KEY_dead_acute, GDK_KEY_C, 0, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */ + GDK_KEY_dead_acute, GDK_KEY_c, 0, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */ + GDK_KEY_Multi_key, GDK_KEY_apostrophe, GDK_KEY_C, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */ + GDK_KEY_Multi_key, GDK_KEY_apostrophe, GDK_KEY_c, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */ + GDK_KEY_Multi_key, GDK_KEY_C, GDK_KEY_apostrophe, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */ + GDK_KEY_Multi_key, GDK_KEY_c, GDK_KEY_apostrophe, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */ +#endif +}; + static void ibus_im_context_init (GObject *obj) { @@ -341,9 +564,6 @@ ibus_im_context_init (GObject *obj) ibusimcontext->client_window = NULL; - // Init ibus status - ibusimcontext->enable = FALSE; - // Init preedit status ibusimcontext->preedit_string = NULL; ibusimcontext->preedit_attrs = NULL; @@ -358,11 +578,21 @@ ibus_im_context_init (GObject *obj) ibusimcontext->ibuscontext = NULL; ibusimcontext->has_focus = FALSE; + ibusimcontext->time = GDK_CURRENT_TIME; +#ifdef ENABLE_SURROUNDING ibusimcontext->caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS | IBUS_CAP_SURROUNDING_TEXT; +#else + ibusimcontext->caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS; +#endif // Create slave im context ibusimcontext->slave = gtk_im_context_simple_new (); + gtk_im_context_simple_add_table (GTK_IM_CONTEXT_SIMPLE (ibusimcontext->slave), + cedilla_compose_seqs, + 4, + G_N_ELEMENTS (cedilla_compose_seqs) / (4 + 2)); + g_signal_connect (ibusimcontext->slave, "commit", G_CALLBACK (_slave_commit_cb), @@ -388,12 +618,6 @@ ibus_im_context_init (GObject *obj) G_CALLBACK (_slave_delete_surrounding_cb), ibusimcontext); - /* init bus object */ - if (_bus == NULL) { - ibus_set_display (gdk_display_get_name (gdk_display_get_default ())); - _bus = ibus_bus_new(); - } - if (ibus_bus_is_connected (_bus)) { _create_input_context (ibusimcontext); } @@ -411,7 +635,7 @@ ibus_im_context_finalize (GObject *obj) g_signal_handlers_disconnect_by_func (_bus, G_CALLBACK (_bus_connected_cb), obj); if (ibusimcontext->ibuscontext) { - ibus_object_destroy ((IBusObject *)ibusimcontext->ibuscontext); + ibus_proxy_destroy ((IBusProxy *)ibusimcontext->ibuscontext); } ibus_im_context_set_client_window ((GtkIMContext *)ibusimcontext, NULL); @@ -456,21 +680,35 @@ ibus_im_context_filter_keypress (GtkIMContext *context, if (ibusimcontext->client_window == NULL && event->window != NULL) gtk_im_context_set_client_window ((GtkIMContext *)ibusimcontext, event->window); - switch (event->type) { - case GDK_KEY_RELEASE: - retval = ibus_input_context_process_key_event (ibusimcontext->ibuscontext, - event->keyval, - event->hardware_keycode - 8, - event->state | IBUS_RELEASE_MASK); - break; - case GDK_KEY_PRESS: - retval = ibus_input_context_process_key_event (ibusimcontext->ibuscontext, - event->keyval, - event->hardware_keycode - 8, - event->state); - break; - default: - retval = FALSE; + _request_surrounding_text (ibusimcontext); + + if (ibusimcontext != NULL) { + ibusimcontext->time = event->time; + } + + guint state = event->state; + if (event->type == GDK_KEY_RELEASE) { + state |= IBUS_RELEASE_MASK; + } + + if (_use_sync_mode) { + retval = ibus_input_context_process_key_event ( + ibusimcontext->ibuscontext, + event->keyval, + event->hardware_keycode - 8, + state); + } + else { + ibus_input_context_process_key_event_async ( + ibusimcontext->ibuscontext, + event->keyval, + event->hardware_keycode - 8, + state, + -1, + NULL, + _process_key_event_done, + gdk_event_copy ((GdkEvent *) event)); + retval = TRUE; } if (retval) { @@ -487,25 +725,40 @@ ibus_im_context_filter_keypress (GtkIMContext *context, } } -static void -_weak_notify_cb (gpointer data, - GObject *context) -{ - if (_focus_im_context == (GtkIMContext *)context) - _focus_im_context = NULL; -} - static void ibus_im_context_focus_in (GtkIMContext *context) { IDEBUG ("%s", __FUNCTION__); - IBusIMContext *ibusimcontext = IBUS_IM_CONTEXT (context); + IBusIMContext *ibusimcontext = (IBusIMContext *) context; + + if (ibusimcontext->has_focus) + return; + + /* don't set focus on password entry */ + if (ibusimcontext->client_window != NULL) { + GtkWidget *widget; + + gdk_window_get_user_data (ibusimcontext->client_window, + (gpointer *)&widget); + + if (GTK_IS_ENTRY (widget) && + !gtk_entry_get_visibility (GTK_ENTRY (widget))) { + return; + } + } - if (_focus_im_context != NULL && _focus_im_context != context) { + if (_focus_im_context != NULL) { + g_assert (_focus_im_context != context); gtk_im_context_focus_out (_focus_im_context); g_assert (_focus_im_context == NULL); } + else { + /* focus out fake context */ + if (_fake_context != NULL) { + ibus_input_context_focus_out (_fake_context); + } + } ibusimcontext->has_focus = TRUE; if (ibusimcontext->ibuscontext) { @@ -514,31 +767,48 @@ ibus_im_context_focus_in (GtkIMContext *context) gtk_im_context_focus_in (ibusimcontext->slave); - _set_cursor_location_internal (context); + /* set_cursor_location_internal() will get origin from X server, + * it blocks UI. So delay it to idle callback. */ + g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, + (GSourceFunc) _set_cursor_location_internal, + g_object_ref (ibusimcontext), + (GDestroyNotify) g_object_unref); - if (_focus_im_context != context) { - g_object_weak_ref ((GObject *) context, _weak_notify_cb, NULL); - _focus_im_context = context; - } + /* retrieve the initial surrounding-text (regardless of whether + * the current IBus engine needs surrounding-text) */ + _request_surrounding_text (ibusimcontext); + + g_object_add_weak_pointer ((GObject *) context, + (gpointer *) &_focus_im_context); + _focus_im_context = context; } static void ibus_im_context_focus_out (GtkIMContext *context) { IDEBUG ("%s", __FUNCTION__); + IBusIMContext *ibusimcontext = (IBusIMContext *) context; - IBusIMContext *ibusimcontext = IBUS_IM_CONTEXT (context); - - if (_focus_im_context == context) { - g_object_weak_unref ((GObject *)_focus_im_context, _weak_notify_cb, NULL); - _focus_im_context = NULL; + if (ibusimcontext->has_focus == FALSE) { + return; } + g_assert (context == _focus_im_context); + g_object_remove_weak_pointer ((GObject *) context, + (gpointer *) &_focus_im_context); + _focus_im_context = NULL; + ibusimcontext->has_focus = FALSE; if (ibusimcontext->ibuscontext) { ibus_input_context_focus_out (ibusimcontext->ibuscontext); } + gtk_im_context_focus_out (ibusimcontext->slave); + + /* focus in the fake ic */ + if (_fake_context != NULL) { + ibus_input_context_focus_in (_fake_context); + } } static void @@ -565,36 +835,31 @@ ibus_im_context_get_preedit_string (GtkIMContext *context, IBusIMContext *ibusimcontext = IBUS_IM_CONTEXT (context); - if (ibusimcontext->enable) { - if (ibusimcontext->preedit_visible) { - if (str) { - *str = g_strdup (ibusimcontext->preedit_string ? ibusimcontext->preedit_string: ""); - } - - if (attrs) { - *attrs = ibusimcontext->preedit_attrs ? - pango_attr_list_ref (ibusimcontext->preedit_attrs): - pango_attr_list_new (); - } + if (ibusimcontext->preedit_visible) { + if (str) { + *str = g_strdup (ibusimcontext->preedit_string ? ibusimcontext->preedit_string: ""); + } - if (cursor_pos) { - *cursor_pos = ibusimcontext->preedit_cursor_pos; - } + if (attrs) { + *attrs = ibusimcontext->preedit_attrs ? + pango_attr_list_ref (ibusimcontext->preedit_attrs): + pango_attr_list_new (); } - else { - if (str) { - *str = g_strdup (""); - } - if (attrs) { - *attrs = pango_attr_list_new (); - } - if (cursor_pos) { - *cursor_pos = 0; - } + + if (cursor_pos) { + *cursor_pos = ibusimcontext->preedit_cursor_pos; } } else { - gtk_im_context_get_preedit_string (ibusimcontext->slave, str, attrs, cursor_pos); + if (str) { + *str = g_strdup (""); + } + if (attrs) { + *attrs = pango_attr_list_new (); + } + if (cursor_pos) { + *cursor_pos = 0; + } } IDEBUG ("str=%s", *str); } @@ -619,33 +884,38 @@ ibus_im_context_set_client_window (GtkIMContext *context, GdkWindow *client) gtk_im_context_set_client_window (ibusimcontext->slave, client); } -static void -_set_cursor_location_internal (GtkIMContext *context) +static gboolean +_set_cursor_location_internal (IBusIMContext *ibusimcontext) { - IBusIMContext *ibusimcontext = IBUS_IM_CONTEXT (context); GdkRectangle area; - gint x, y; - if(ibusimcontext->client_window == NULL || ibusimcontext->ibuscontext == NULL) { - return; + if(ibusimcontext->client_window == NULL || + ibusimcontext->ibuscontext == NULL) { + return FALSE; } area = ibusimcontext->cursor_area; if (area.x == -1 && area.y == -1 && area.width == 0 && area.height == 0) { +#if GTK_CHECK_VERSION (2, 91, 0) + area.x = 0; + area.y += gdk_window_get_height (ibusimcontext->client_window); +#else gint w, h; gdk_drawable_get_size (ibusimcontext->client_window, &w, &h); area.y += h; area.x = 0; +#endif } - gdk_window_get_origin (ibusimcontext->client_window, &x, &y); - area.x += x; - area.y += y; + gdk_window_get_root_coords (ibusimcontext->client_window, + area.x, area.y, + &area.x, &area.y); ibus_input_context_set_cursor_location (ibusimcontext->ibuscontext, area.x, area.y, area.width, area.height); + return FALSE; } static void @@ -655,8 +925,14 @@ ibus_im_context_set_cursor_location (GtkIMContext *context, GdkRectangle *area) IBusIMContext *ibusimcontext = IBUS_IM_CONTEXT (context); + if (ibusimcontext->cursor_area.x == area->x && + ibusimcontext->cursor_area.y == area->y && + ibusimcontext->cursor_area.width == area->width && + ibusimcontext->cursor_area.height == area->height) { + return; + } ibusimcontext->cursor_area = *area; - _set_cursor_location_internal (context); + _set_cursor_location_internal (ibusimcontext); gtk_im_context_set_cursor_location (ibusimcontext->slave, area); } @@ -667,27 +943,128 @@ ibus_im_context_set_use_preedit (GtkIMContext *context, gboolean use_preedit) IBusIMContext *ibusimcontext = IBUS_IM_CONTEXT (context); + if (use_preedit) { + ibusimcontext->caps |= IBUS_CAP_PREEDIT_TEXT; + } + else { + ibusimcontext->caps &= ~IBUS_CAP_PREEDIT_TEXT; + } if(ibusimcontext->ibuscontext) { - if (use_preedit) { - ibusimcontext->caps |= IBUS_CAP_PREEDIT_TEXT; - } - else { - ibusimcontext->caps &= ~IBUS_CAP_PREEDIT_TEXT; - } - ibus_input_context_set_capabilities (ibusimcontext->ibuscontext, ibusimcontext->caps); + ibus_input_context_set_capabilities (ibusimcontext->ibuscontext, + ibusimcontext->caps); } gtk_im_context_set_use_preedit (ibusimcontext->slave, use_preedit); } +static guint +get_selection_anchor_point (IBusIMContext *ibusimcontext, + guint cursor_pos, + guint surrounding_text_len) +{ + GtkWidget *widget; + if (ibusimcontext->client_window == NULL) { + return cursor_pos; + } + gdk_window_get_user_data (ibusimcontext->client_window, (gpointer *)&widget); + + if (!GTK_IS_TEXT_VIEW (widget)){ + return cursor_pos; + } + + GtkTextView *text_view = GTK_TEXT_VIEW (widget); + GtkTextBuffer *buffer = gtk_text_view_get_buffer (text_view); + + if (!gtk_text_buffer_get_has_selection (buffer)) { + return cursor_pos; + } + + GtkTextIter start_iter, end_iter, cursor_iter; + if (!gtk_text_buffer_get_selection_bounds (buffer, &start_iter, &end_iter)) { + return cursor_pos; + } + + gtk_text_buffer_get_iter_at_mark (buffer, + &cursor_iter, + gtk_text_buffer_get_insert (buffer)); + + guint start_index = gtk_text_iter_get_offset (&start_iter); + guint end_index = gtk_text_iter_get_offset (&end_iter); + guint cursor_index = gtk_text_iter_get_offset (&cursor_iter); + + guint anchor; + + if (start_index == cursor_index) { + anchor = end_index; + } else if (end_index == cursor_index) { + anchor = start_index; + } else { + return cursor_pos; + } + + // Change absolute index to relative position. + guint relative_origin = cursor_index - cursor_pos; + + if (anchor < relative_origin) { + return cursor_pos; + } + anchor -= relative_origin; + + if (anchor > surrounding_text_len) { + return cursor_pos; + } + + return anchor; +} + +static void +ibus_im_context_set_surrounding (GtkIMContext *context, + const gchar *text, + gint len, + gint cursor_index) +{ + g_return_if_fail (context != NULL); + g_return_if_fail (IBUS_IS_IM_CONTEXT (context)); + g_return_if_fail (text != NULL); + g_return_if_fail (strlen (text) >= len); + g_return_if_fail (0 <= cursor_index && cursor_index <= len); + + IBusIMContext *ibusimcontext = IBUS_IM_CONTEXT (context); + + if (ibusimcontext->ibuscontext) { + IBusText *ibustext; + guint cursor_pos; + guint utf8_len; + gchar *p; + + p = g_strndup (text, len); + cursor_pos = g_utf8_strlen (p, cursor_index); + utf8_len = g_utf8_strlen(p, len); + ibustext = ibus_text_new_from_string (p); + g_free (p); + + guint anchor_pos = get_selection_anchor_point (ibusimcontext, + cursor_pos, + utf8_len); + ibus_input_context_set_surrounding_text (ibusimcontext->ibuscontext, + ibustext, + cursor_pos, + anchor_pos); + } + gtk_im_context_set_surrounding (ibusimcontext->slave, + text, + len, + cursor_index); +} + static void _bus_connected_cb (IBusBus *bus, IBusIMContext *ibusimcontext) { IDEBUG ("%s", __FUNCTION__); - g_assert (IBUS_IS_IM_CONTEXT (ibusimcontext)); - g_assert (ibusimcontext->ibuscontext == NULL); - - _create_input_context (ibusimcontext); + if (ibusimcontext) + _create_input_context (ibusimcontext); + else + _create_fake_input_context (); } static void @@ -698,6 +1075,8 @@ _ibus_context_commit_text_cb (IBusInputContext *ibuscontext, IDEBUG ("%s", __FUNCTION__); g_signal_emit (ibusimcontext, _signal_commit_id, 0, text->text); + + _request_surrounding_text (ibusimcontext); } static gboolean @@ -707,6 +1086,7 @@ _key_is_modifier (guint keyval) * really should be implemented */ switch (keyval) { +#ifdef DEPRECATED_GDK_KEYSYMS case GDK_Shift_L: case GDK_Shift_R: case GDK_Control_L: @@ -733,6 +1113,34 @@ _key_is_modifier (guint keyval) case GDK_ISO_Group_Latch: case GDK_ISO_Group_Lock: return TRUE; +#else + case GDK_KEY_Shift_L: + case GDK_KEY_Shift_R: + case GDK_KEY_Control_L: + case GDK_KEY_Control_R: + case GDK_KEY_Caps_Lock: + case GDK_KEY_Shift_Lock: + case GDK_KEY_Meta_L: + case GDK_KEY_Meta_R: + case GDK_KEY_Alt_L: + case GDK_KEY_Alt_R: + case GDK_KEY_Super_L: + case GDK_KEY_Super_R: + case GDK_KEY_Hyper_L: + case GDK_KEY_Hyper_R: + case GDK_KEY_ISO_Lock: + case GDK_KEY_ISO_Level2_Latch: + case GDK_KEY_ISO_Level3_Shift: + case GDK_KEY_ISO_Level3_Latch: + case GDK_KEY_ISO_Level3_Lock: + case GDK_KEY_ISO_Level5_Shift: + case GDK_KEY_ISO_Level5_Latch: + case GDK_KEY_ISO_Level5_Lock: + case GDK_KEY_ISO_Group_Shift: + case GDK_KEY_ISO_Group_Latch: + case GDK_KEY_ISO_Group_Lock: + return TRUE; +#endif default: return FALSE; } @@ -746,13 +1154,36 @@ _create_gdk_event (IBusIMContext *ibusimcontext, { gunichar c = 0; gchar buf[8]; - GdkEventKey *event; - event = (GdkEventKey *)gdk_event_new ((state & IBUS_RELEASE_MASK) ? GDK_KEY_RELEASE : GDK_KEY_PRESS); + GdkEventKey *event = (GdkEventKey *)gdk_event_new ((state & IBUS_RELEASE_MASK) ? GDK_KEY_RELEASE : GDK_KEY_PRESS); - if (ibusimcontext->client_window) + if (ibusimcontext && ibusimcontext->client_window) event->window = g_object_ref (ibusimcontext->client_window); - event->time = GDK_CURRENT_TIME; + else if (_input_window) + event->window = g_object_ref (_input_window); + + /* The time is copied the latest value from the previous + * GdkKeyEvent in filter_keypress(). + * + * We understand the best way would be to pass the all time value + * to IBus functions process_key_event() and IBus DBus functions + * ProcessKeyEvent() in IM clients and IM engines so that the + * _create_gdk_event() could get the correct time values. + * However it would causes to change many functions and the time value + * would not provide the useful meanings for each IBus engines but just + * pass the original value to ForwardKeyEvent(). + * We use the saved value at the moment. + * + * Another idea might be to have the time implementation in X servers + * but some Xorg uses clock_gettime() and others use gettimeofday() + * and the values would be different in each implementation and + * locale/remote X server. So probably that idea would not work. */ + if (ibusimcontext) { + event->time = ibusimcontext->time; + } else { + event->time = GDK_CURRENT_TIME; + } + event->send_event = FALSE; event->state = state; event->keyval = keyval; @@ -762,7 +1193,11 @@ _create_gdk_event (IBusIMContext *ibusimcontext, event->group = 0; event->is_modifier = _key_is_modifier (keyval); +#ifdef DEPRECATED_GDK_KEYSYMS if (keyval != GDK_VoidSymbol) +#else + if (keyval != GDK_KEY_VoidSymbol) +#endif c = gdk_keyval_to_unicode (keyval); if (c) { @@ -792,12 +1227,21 @@ _create_gdk_event (IBusIMContext *ibusimcontext, NULL); if (event->string) event->length = bytes_written; +#ifdef DEPRECATED_GDK_KEYSYMS } else if (keyval == GDK_Escape) { +#else + } else if (keyval == GDK_KEY_Escape) { +#endif event->length = 1; event->string = g_strdup ("\033"); } +#ifdef DEPRECATED_GDK_KEYSYMS else if (keyval == GDK_Return || keyval == GDK_KP_Enter) { +#else + else if (keyval == GDK_KEY_Return || + keyval == GDK_KEY_KP_Enter) { +#endif event->length = 1; event->string = g_strdup ("\r"); } @@ -818,7 +1262,6 @@ _ibus_context_forward_key_event_cb (IBusInputContext *ibuscontext, IBusIMContext *ibusimcontext) { IDEBUG ("%s", __FUNCTION__); - GdkEventKey *event = _create_gdk_event (ibusimcontext, keyval, keycode, state); gdk_event_put ((GdkEvent *)event); gdk_event_free ((GdkEvent *)event); @@ -928,6 +1371,8 @@ _ibus_context_show_preedit_text_cb (IBusInputContext *ibuscontext, ibusimcontext->preedit_visible = TRUE; g_signal_emit (ibusimcontext, _signal_preedit_start_id, 0); g_signal_emit (ibusimcontext, _signal_preedit_changed_id, 0); + + _request_surrounding_text (ibusimcontext); } static void @@ -945,20 +1390,14 @@ _ibus_context_hide_preedit_text_cb (IBusInputContext *ibuscontext, } static void -_ibus_context_enabled_cb (IBusInputContext *ibuscontext, +_ibus_context_destroy_cb (IBusInputContext *ibuscontext, IBusIMContext *ibusimcontext) { IDEBUG ("%s", __FUNCTION__); + g_assert (ibusimcontext->ibuscontext == ibuscontext); - ibusimcontext->enable = TRUE; -} - -static void -_ibus_context_disabled_cb (IBusInputContext *ibuscontext, - IBusIMContext *ibusimcontext) -{ - IDEBUG ("%s", __FUNCTION__); - ibusimcontext->enable = FALSE; + g_object_unref (ibusimcontext->ibuscontext); + ibusimcontext->ibuscontext = NULL; /* clear preedit */ ibusimcontext->preedit_visible = FALSE; @@ -971,25 +1410,64 @@ _ibus_context_disabled_cb (IBusInputContext *ibuscontext, } static void -_ibus_context_destroy_cb (IBusInputContext *ibuscontext, - IBusIMContext *ibusimcontext) +_create_input_context_done (IBusBus *bus, + GAsyncResult *res, + IBusIMContext *ibusimcontext) { - IDEBUG ("%s", __FUNCTION__); - g_assert (ibusimcontext->ibuscontext == ibuscontext); + GError *error = NULL; + IBusInputContext *context = ibus_bus_create_input_context_async_finish ( + _bus, res, &error); - g_object_unref (ibusimcontext->ibuscontext); - ibusimcontext->ibuscontext = NULL; + if (ibusimcontext->cancellable != NULL) { + g_object_unref (ibusimcontext->cancellable); + ibusimcontext->cancellable = NULL; + } - ibusimcontext->enable = FALSE; + if (context == NULL) { + g_warning ("Create input context failed: %s.", error->message); + g_error_free (error); + } + else { - /* clear preedit */ - ibusimcontext->preedit_visible = FALSE; - ibusimcontext->preedit_cursor_pos = 0; - g_free (ibusimcontext->preedit_string); - ibusimcontext->preedit_string = NULL; + ibusimcontext->ibuscontext = context; + + g_signal_connect (ibusimcontext->ibuscontext, + "commit-text", + G_CALLBACK (_ibus_context_commit_text_cb), + ibusimcontext); + g_signal_connect (ibusimcontext->ibuscontext, + "forward-key-event", + G_CALLBACK (_ibus_context_forward_key_event_cb), + ibusimcontext); + g_signal_connect (ibusimcontext->ibuscontext, + "delete-surrounding-text", + G_CALLBACK (_ibus_context_delete_surrounding_text_cb), + ibusimcontext); + g_signal_connect (ibusimcontext->ibuscontext, + "update-preedit-text", + G_CALLBACK (_ibus_context_update_preedit_text_cb), + ibusimcontext); + g_signal_connect (ibusimcontext->ibuscontext, + "show-preedit-text", + G_CALLBACK (_ibus_context_show_preedit_text_cb), + ibusimcontext); + g_signal_connect (ibusimcontext->ibuscontext, + "hide-preedit-text", + G_CALLBACK (_ibus_context_hide_preedit_text_cb), + ibusimcontext); + g_signal_connect (ibusimcontext->ibuscontext, "destroy", + G_CALLBACK (_ibus_context_destroy_cb), + ibusimcontext); - g_signal_emit (ibusimcontext, _signal_preedit_changed_id, 0); - g_signal_emit (ibusimcontext, _signal_preedit_end_id, 0); + ibus_input_context_set_capabilities (ibusimcontext->ibuscontext, ibusimcontext->caps); + + if (ibusimcontext->has_focus) { + ibus_input_context_focus_in (ibusimcontext->ibuscontext); + _set_cursor_location_internal (ibusimcontext); + } + } + + g_object_unref (ibusimcontext); } static void @@ -999,52 +1477,20 @@ _create_input_context (IBusIMContext *ibusimcontext) g_assert (ibusimcontext->ibuscontext == NULL); - ibusimcontext->ibuscontext = ibus_bus_create_input_context (_bus, "gtk-im"); - - g_return_if_fail (ibusimcontext->ibuscontext != NULL); - g_object_ref_sink (ibusimcontext->ibuscontext); - - g_signal_connect (ibusimcontext->ibuscontext, - "commit-text", - G_CALLBACK (_ibus_context_commit_text_cb), - ibusimcontext); - g_signal_connect (ibusimcontext->ibuscontext, - "forward-key-event", - G_CALLBACK (_ibus_context_forward_key_event_cb), - ibusimcontext); - g_signal_connect (ibusimcontext->ibuscontext, - "delete-surrounding-text", - G_CALLBACK (_ibus_context_delete_surrounding_text_cb), - ibusimcontext); - g_signal_connect (ibusimcontext->ibuscontext, - "update-preedit-text", - G_CALLBACK (_ibus_context_update_preedit_text_cb), - ibusimcontext); - g_signal_connect (ibusimcontext->ibuscontext, - "show-preedit-text", - G_CALLBACK (_ibus_context_show_preedit_text_cb), - ibusimcontext); - g_signal_connect (ibusimcontext->ibuscontext, - "hide-preedit-text", - G_CALLBACK (_ibus_context_hide_preedit_text_cb), - ibusimcontext); - g_signal_connect (ibusimcontext->ibuscontext, - "enabled", - G_CALLBACK (_ibus_context_enabled_cb), - ibusimcontext); - g_signal_connect (ibusimcontext->ibuscontext, - "disabled", - G_CALLBACK (_ibus_context_disabled_cb), - ibusimcontext); - g_signal_connect (ibusimcontext->ibuscontext, "destroy", - G_CALLBACK (_ibus_context_destroy_cb), - ibusimcontext); + if (ibusimcontext->cancellable != NULL) { + /* Cancel previous create input context request */ + g_cancellable_cancel (ibusimcontext->cancellable); + g_object_unref (ibusimcontext->cancellable); + ibusimcontext->cancellable = NULL; + } - ibus_input_context_set_capabilities (ibusimcontext->ibuscontext, ibusimcontext->caps); + ibusimcontext->cancellable = g_cancellable_new (); - if (ibusimcontext->has_focus) { - gtk_im_context_focus_in (GTK_IM_CONTEXT (ibusimcontext)); - } + ibus_bus_create_input_context_async (_bus, + "gtk-im", -1, + ibusimcontext->cancellable, + (GAsyncReadyCallback)_create_input_context_done, + g_object_ref (ibusimcontext)); } /* Callback functions for slave context */ @@ -1053,10 +1499,6 @@ _slave_commit_cb (GtkIMContext *slave, gchar *string, IBusIMContext *ibusimcontext) { -#if 0 - if ((GtkIMContext *)context == CURRENT_CONTEXT && ibus_im_client_is_enabled (_client)) - return; -#endif g_signal_emit (ibusimcontext, _signal_commit_id, 0, string); } @@ -1064,7 +1506,7 @@ static void _slave_preedit_changed_cb (GtkIMContext *slave, IBusIMContext *ibusimcontext) { - if (ibusimcontext->enable && ibusimcontext->ibuscontext) { + if (ibusimcontext->ibuscontext) { return; } @@ -1075,7 +1517,7 @@ static void _slave_preedit_start_cb (GtkIMContext *slave, IBusIMContext *ibusimcontext) { - if (ibusimcontext->enable && ibusimcontext->ibuscontext) { + if (ibusimcontext->ibuscontext) { return; } @@ -1086,23 +1528,27 @@ static void _slave_preedit_end_cb (GtkIMContext *slave, IBusIMContext *ibusimcontext) { - if (ibusimcontext->enable && ibusimcontext->ibuscontext) { + if (ibusimcontext->ibuscontext) { return; } g_signal_emit (ibusimcontext, _signal_preedit_end_id, 0); } -static void +static gboolean _slave_retrieve_surrounding_cb (GtkIMContext *slave, IBusIMContext *ibusimcontext) { - if (ibusimcontext->enable && ibusimcontext->ibuscontext) { - return; + gboolean return_value; + + if (ibusimcontext->ibuscontext) { + return FALSE; } - g_signal_emit (ibusimcontext, _signal_retrieve_surrounding_id, 0); + g_signal_emit (ibusimcontext, _signal_retrieve_surrounding_id, 0, + &return_value); + return return_value; } -static void +static gboolean _slave_delete_surrounding_cb (GtkIMContext *slave, gint offset_from_cursor, guint nchars, @@ -1110,9 +1556,94 @@ _slave_delete_surrounding_cb (GtkIMContext *slave, { gboolean return_value; - if (ibusimcontext->enable && ibusimcontext->ibuscontext) { - return; + if (ibusimcontext->ibuscontext) { + return FALSE; } g_signal_emit (ibusimcontext, _signal_delete_surrounding_id, 0, offset_from_cursor, nchars, &return_value); + return return_value; +} + +#ifdef OS_CHROMEOS +static void +_ibus_fake_context_destroy_cb (IBusInputContext *ibuscontext, + gpointer user_data) +{ + /* The fack IC may be destroyed when the connection is lost. + * Should release it. */ + g_assert (ibuscontext == _fake_context); + g_object_unref (_fake_context); + _fake_context = NULL; +} + +static GCancellable *_fake_cancellable = NULL; + +static void +_create_fake_input_context_done (IBusBus *bus, + GAsyncResult *res, + IBusIMContext *ibusimcontext) +{ + GError *error = NULL; + IBusInputContext *context = ibus_bus_create_input_context_async_finish ( + _bus, res, &error); + + if (_fake_cancellable != NULL) { + g_object_unref (_fake_cancellable); + _fake_cancellable = NULL; + } + + if (context == NULL) { + g_warning ("Create fake input context failed: %s.", error->message); + g_error_free (error); + return; + } + + _fake_context = context; + + g_signal_connect (_fake_context, "forward-key-event", + G_CALLBACK (_ibus_context_forward_key_event_cb), + NULL); + g_signal_connect (_fake_context, "destroy", + G_CALLBACK (_ibus_fake_context_destroy_cb), + NULL); + + guint32 caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS | IBUS_CAP_SURROUNDING_TEXT; + ibus_input_context_set_capabilities (_fake_context, caps); + + /* focus in/out the fake context */ + if (_focus_im_context == NULL) + ibus_input_context_focus_in (_fake_context); + else + ibus_input_context_focus_out (_fake_context); } +static void +_create_fake_input_context (void) +{ + g_return_if_fail (_fake_context == NULL); + + /* Global engine is always enabled in Chrome OS, + * so create fake IC, and set focus if no other IC has focus. + */ + + if (_fake_cancellable != NULL) { + g_cancellable_cancel (_fake_cancellable); + g_object_unref (_fake_cancellable); + _fake_cancellable = NULL; + } + + _fake_cancellable = g_cancellable_new (); + + ibus_bus_create_input_context_async (_bus, + "fake-gtk-im", -1, + _fake_cancellable, + (GAsyncReadyCallback)_create_fake_input_context_done, + NULL); + +} +#else +static void +_create_fake_input_context (void) +{ + /* For Linux desktop, do not use fake IC. */ +} +#endif diff --git a/client/gtk2/ibusimcontext.h b/client/gtk2/ibusimcontext.h index b92c0990b..56cece40f 100644 --- a/client/gtk2/ibusimcontext.h +++ b/client/gtk2/ibusimcontext.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et ts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang diff --git a/client/gtk3/Makefile.am b/client/gtk3/Makefile.am index ac757e328..450562241 100644 --- a/client/gtk3/Makefile.am +++ b/client/gtk3/Makefile.am @@ -20,7 +20,7 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA -libibus = $(top_builddir)/src/libibus.la +libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la INCLUDES = \ -I$(top_srcdir)/src \ @@ -62,3 +62,5 @@ EXTRA_DIST = \ test: all GTK_IM_MODULE=ibus gedit + +-include $(top_srcdir)/git.mk diff --git a/client/x11/.gitignore b/client/x11/.gitignore deleted file mode 100644 index bdff9a1f6..000000000 --- a/client/x11/.gitignore +++ /dev/null @@ -1 +0,0 @@ -ibus-x11 diff --git a/client/x11/Makefile.am b/client/x11/Makefile.am index 19108833d..91d97ddc5 100644 --- a/client/x11/Makefile.am +++ b/client/x11/Makefile.am @@ -22,7 +22,7 @@ libIMdkit = $(top_builddir)/util/IMdkit/libIMdkit.la -libibus = $(top_builddir)/src/libibus.la +libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la libexec_PROGRAMS = ibus-x11 @@ -70,3 +70,5 @@ locales.h: uniq | sort | \ xargs python -c 'import sys;print "#define LOCALES_STRING \"%s\"" % ",".join(sys.argv[1:])' \ ) > $@ + +-include $(top_srcdir)/git.mk diff --git a/client/x11/gdk-private.c b/client/x11/gdk-private.c index 30d45adec..9e42a3ae2 100644 --- a/client/x11/gdk-private.c +++ b/client/x11/gdk-private.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* ibus * Copyright (C) 2008 Peng Huang * Copyright (C) 2008 Red Hat, Inc. @@ -19,6 +20,9 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#include "config.h" + #include #include #include diff --git a/client/x11/gdk-private.h b/client/x11/gdk-private.h index 92ee8fab9..e79e45c54 100644 --- a/client/x11/gdk-private.h +++ b/client/x11/gdk-private.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* ibus * Copyright (C) 2008 Peng Huang * Copyright (C) 2008 Red Hat, Inc. diff --git a/client/x11/locales.h b/client/x11/locales.h index 8c752239b..0155e22ad 100644 --- a/client/x11/locales.h +++ b/client/x11/locales.h @@ -1 +1,2 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ #define LOCALES_STRING "aa,af,am,an,ar,as,ast,az,be,ber,bg,bn,bo,br,bs,byn,C,ca,crh,cs,csb,cy,da,de,dz,el,en,es,et,eu,fa,fi,fil,fo,fr,fur,fy,ga,gd,gez,gl,gu,gv,ha,he,hi,hne,hr,hsb,ht,hu,hy,id,ig,ik,is,it,iu,iw,ja,ka,kk,kl,km,kn,ko,ks,ku,kw,ky,lg,li,lo,lt,lv,mai,mg,mi,mk,ml,mn,mr,ms,mt,nan,nb,nds,ne,nl,nn,no,nr,nso,oc,om,or,pa,pa,pap,pl,pt,ro,ru,rw,sa,sc,sd,se,shs,si,sid,sk,sl,so,sq,sr,ss,st,sv,ta,te,tg,th,ti,tig,tk,tl,tn,tr,ts,tt,ug,uk,ur,uz,ve,vi,wa,wo,xh,yi,yo,zh,zu" diff --git a/client/x11/main.c b/client/x11/main.c index 3d93c2ad8..65451abaf 100644 --- a/client/x11/main.c +++ b/client/x11/main.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus * Copyright (C) 2007-2010 Peng Huang @@ -115,6 +116,8 @@ static gint g_debug_level = 0; static IBusBus *_bus = NULL; +static gboolean _use_sync_mode = FALSE; + static void _xim_preedit_start (XIMS xims, const X11IC *x11ic) { @@ -244,7 +247,9 @@ _xim_preedit_callback_draw (XIMS xims, X11IC *x11ic, const gchar *preedit_string text.feedback = feedback; if (len > 0) { - Xutf8TextListToTextProperty (GDK_DISPLAY (), (char **)&preedit_string, 1, XCompoundTextStyle, &tp); + Xutf8TextListToTextProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), + (char **)&preedit_string, + 1, XCompoundTextStyle, &tp); text.encoding_is_wchar = 0; text.length = strlen ((char*)tp.value); text.string.multi_byte = (char*)tp.value; @@ -271,22 +276,22 @@ _xim_store_ic_values (X11IC *x11ic, IMChangeICStruct *call_data) guint32 attrs = 1; g_return_val_if_fail (x11ic != NULL, 0); - for (i=0; i< (int) call_data->ic_attr_num; ++i, ++ic_attr) { + for (i = 0; i < (int)call_data->ic_attr_num; ++i, ++ic_attr) { if (g_strcmp0 (XNInputStyle, ic_attr->name) == 0) { x11ic->input_style = *(gint32 *) ic_attr->value; } else if (g_strcmp0 (XNClientWindow, ic_attr->name) == 0) { - x11ic->client_window = *(Window *) call_data->ic_attr[i].value; + x11ic->client_window = (Window)(*(CARD32 *) call_data->ic_attr[i].value); } else if (g_strcmp0 (XNFocusWindow, ic_attr->name) == 0) { - x11ic->focus_window = *(Window *) call_data->ic_attr[i].value; + x11ic->focus_window = (Window)(*(CARD32 *) call_data->ic_attr[i].value); } else { LOG (1, "Unknown ic attribute: %s", ic_attr->name); } } - for (i=0; i< (int) call_data->preedit_attr_num; ++i, ++pre_attr) { + for (i = 0; i < (int)call_data->preedit_attr_num; ++i, ++pre_attr) { if (g_strcmp0 (XNSpotLocation, pre_attr->name) == 0) { x11ic->has_preedit_area = TRUE; x11ic->preedit_area.x = ((XPoint *)pre_attr->value)->x; @@ -298,7 +303,7 @@ _xim_store_ic_values (X11IC *x11ic, IMChangeICStruct *call_data) } for (i=0; i< (int) call_data->status_attr_num; ++i, ++sts_attr) { - LOG (1, "Unkown status attribute: %s", sts_attr->name); + LOG (1, "Unknown status attribute: %s", sts_attr->name); } return attrs; @@ -310,7 +315,6 @@ xim_create_ic (XIMS xims, IMChangeICStruct *call_data) { static int base_icid = 1; X11IC *x11ic; - int i; call_data->icid = base_icid ++; @@ -329,7 +333,7 @@ xim_create_ic (XIMS xims, IMChangeICStruct *call_data) g_return_val_if_reached (0); } - i = _xim_store_ic_values (x11ic, call_data); + _xim_store_ic_values (x11ic, call_data); x11ic->context = ibus_bus_create_input_context (_bus, "xim"); @@ -383,7 +387,7 @@ xim_destroy_ic (XIMS xims, IMChangeICStruct *call_data) g_return_val_if_fail (x11ic != NULL, 0); if (x11ic->context) { - ibus_object_destroy ((IBusObject *)x11ic->context); + ibus_proxy_destroy ((IBusProxy *)x11ic->context); g_object_unref (x11ic->context); x11ic->context = NULL; } @@ -441,6 +445,31 @@ xim_unset_ic_focus (XIMS xims, IMChangeFocusStruct *call_data) } +static void +_process_key_event_done (GObject *object, + GAsyncResult *res, + gpointer user_data) +{ + IBusInputContext *context = (IBusInputContext *)object; + IMForwardEventStruct *pfe = (IMForwardEventStruct*) user_data; + + GError *error = NULL; + gboolean retval = ibus_input_context_process_key_event_async_finish ( + context, + res, + &error); + + if (error != NULL) { + g_warning ("Process Key Event failed: %s.", error->message); + g_error_free (error); + } + + if (retval == FALSE) { + IMForwardEvent (_xims, (XPointer) pfe); + } + g_slice_free (IMForwardEventStruct, pfe); +} + static int xim_forward_event (XIMS xims, IMForwardEventStruct *call_data) { @@ -468,30 +497,56 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data) event.state |= IBUS_RELEASE_MASK; } - retval = ibus_input_context_process_key_event (x11ic->context, - event.keyval, - event.hardware_keycode - 8, - event.state); - if (retval) { - if (! x11ic->has_preedit_area) { - _xim_set_cursor_location (x11ic); + if (_use_sync_mode) { + retval = ibus_input_context_process_key_event ( + x11ic->context, + event.keyval, + event.hardware_keycode - 8, + event.state); + if (retval) { + if (! x11ic->has_preedit_area) { + _xim_set_cursor_location (x11ic); + } + return 1; } - return 1; - } - IMForwardEventStruct fe; - memset (&fe, 0, sizeof (fe)); + IMForwardEventStruct fe; + memset (&fe, 0, sizeof (fe)); - fe.major_code = XIM_FORWARD_EVENT; - fe.icid = x11ic->icid; - fe.connect_id = x11ic->connect_id; - fe.sync_bit = 0; - fe.serial_number = 0L; - fe.event = call_data->event; + fe.major_code = XIM_FORWARD_EVENT; + fe.icid = x11ic->icid; + fe.connect_id = x11ic->connect_id; + fe.sync_bit = 0; + fe.serial_number = 0L; + fe.event = call_data->event; - IMForwardEvent (_xims, (XPointer) &fe); + IMForwardEvent (_xims, (XPointer) &fe); - return 1; + retval = 1; + } + else { + IMForwardEventStruct *pfe; + + pfe = g_slice_new0 (IMForwardEventStruct); + pfe->major_code = XIM_FORWARD_EVENT; + pfe->icid = x11ic->icid; + pfe->connect_id = x11ic->connect_id; + pfe->sync_bit = 0; + pfe->serial_number = 0L; + pfe->event = call_data->event; + + ibus_input_context_process_key_event_async ( + x11ic->context, + event.keyval, + event.hardware_keycode - 8, + event.state, + -1, + NULL, + _process_key_event_done, + pfe); + retval = 1; + } + return retval; } @@ -524,6 +579,7 @@ _free_ic (gpointer data, gpointer user_data) g_return_if_fail (x11ic != NULL); g_free (x11ic->preedit_string); + x11ic->preedit_string = NULL; if (x11ic->preedit_attrs) { g_object_unref (x11ic->preedit_attrs); @@ -531,7 +587,7 @@ _free_ic (gpointer data, gpointer user_data) } if (x11ic->context) { - ibus_object_destroy ((IBusObject *)x11ic->context); + ibus_proxy_destroy ((IBusProxy *)x11ic->context); g_object_unref (x11ic->context); x11ic->context = NULL; } @@ -582,9 +638,9 @@ _xim_set_cursor_location (X11IC *x11ic) XWindowAttributes xwa; Window child; - XGetWindowAttributes (GDK_DISPLAY(), w, &xwa); + XGetWindowAttributes (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), w, &xwa); if (preedit_area.x <= 0 && preedit_area.y <= 0) { - XTranslateCoordinates (GDK_DISPLAY(), w, + XTranslateCoordinates (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), w, xwa.root, 0, xwa.height, @@ -593,7 +649,7 @@ _xim_set_cursor_location (X11IC *x11ic) &child); } else { - XTranslateCoordinates (GDK_DISPLAY(), w, + XTranslateCoordinates (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), w, xwa.root, preedit_area.x, preedit_area.y, @@ -718,7 +774,7 @@ ims_protocol_handler (XIMS xims, IMProtocol *call_data) LOG (1, "XIM_SYNC_REPLY"); return 0; default: - LOG (1, "Unkown (%d)", call_data->major_code); + LOG (1, "Unknown (%d)", call_data->major_code); return 0; } } @@ -738,11 +794,11 @@ _xim_forward_key_event (X11IC *x11ic, xkp.xkey.serial = 0L; xkp.xkey.send_event = False; xkp.xkey.same_screen = True; - xkp.xkey.display = GDK_DISPLAY(); + xkp.xkey.display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); xkp.xkey.window = x11ic->focus_window ? x11ic->focus_window : x11ic->client_window; xkp.xkey.subwindow = None; - xkp.xkey.root = DefaultRootWindow (GDK_DISPLAY()); + xkp.xkey.root = DefaultRootWindow (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ())); xkp.xkey.time = 0; xkp.xkey.state = state; @@ -780,7 +836,7 @@ _context_commit_text_cb (IBusInputContext *context, XTextProperty tp; IMCommitStruct cms = {0}; - Xutf8TextListToTextProperty (GDK_DISPLAY (), + Xutf8TextListToTextProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), (gchar **)&(text->text), 1, XCompoundTextStyle, &tp); cms.major_code = XIM_COMMIT; @@ -895,6 +951,25 @@ _context_disabled_cb (IBusInputContext *context, _xim_preedit_end (_xims, x11ic); } +static gboolean +_get_boolean_env(const gchar *name, + gboolean defval) +{ + const gchar *value = g_getenv (name); + + if (value == NULL) + return defval; + + if (g_strcmp0 (value, "") == 0 || + g_strcmp0 (value, "0") == 0 || + g_strcmp0 (value, "false") == 0 || + g_strcmp0 (value, "False") == 0 || + g_strcmp0 (value, "FALSE") == 0) + return FALSE; + + return TRUE; +} + static void _init_ibus (void) { @@ -907,6 +982,8 @@ _init_ibus (void) g_signal_connect (_bus, "disconnected", G_CALLBACK (_bus_disconnected_cb), NULL); + + _use_sync_mode = _get_boolean_env ("IBUS_ENABLE_SYNC_MODE", FALSE); } static void @@ -960,7 +1037,7 @@ _xim_init_IMdkit () sizeof (ims_encodings)/sizeof (XIMEncoding) - 1; encodings.supported_encodings = ims_encodings; - _xims = IMOpenIM(GDK_DISPLAY(), + _xims = IMOpenIM(GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), IMModifiers, "Xi18n", IMServerWindow, GDK_WINDOW_XWINDOW(win), IMServerName, _server_name != NULL ? _server_name : "ibus", diff --git a/codereview.settings b/codereview.settings new file mode 100644 index 000000000..71ecbeeb8 --- /dev/null +++ b/codereview.settings @@ -0,0 +1,2 @@ +# This file is used by "git cl" to get code review information. +CODE_REVIEW_SERVER: codereview.appspot.com diff --git a/conf/Makefile.am b/conf/Makefile.am new file mode 100644 index 000000000..86127b2f8 --- /dev/null +++ b/conf/Makefile.am @@ -0,0 +1,47 @@ +# vim:set noet ts=4: +# +# ibus - The Input Bus +# +# Copyright (c) 2007-2010 Peng Huang +# Copyright (c) 2007-2010 Red Hat, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307 USA + +if ENABLE_GCONF +GCONF_DIR = \ + gconf \ + $(NULL) +endif + +if ENABLE_MEMCONF +MEMCONF_DIR = \ + memconf \ + $(NULL) +endif + +if ENABLE_DCONF +DCONF_DIR = \ + dconf \ + $(NULL) +endif + +SUBDIRS = \ + $(DCONF_DIR) \ + $(GCONF_DIR) \ + $(MEMCONF_DIR) \ + $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/conf/dconf/Makefile.am b/conf/dconf/Makefile.am new file mode 100644 index 000000000..148ba621f --- /dev/null +++ b/conf/dconf/Makefile.am @@ -0,0 +1,83 @@ +# vim:set noet ts=4: +# +# ibus - The Input Bus +# +# Copyright (c) 2007-2010 Peng Huang +# Copyright (c) 2007-2010 Red Hat, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307 USA + +libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la + +libexec_PROGRAMS = \ + ibus-dconf \ + $(NULL) + +ibus_dconf_SOURCES = \ + main.c \ + config.c \ + config.h \ + $(NULL) +ibus_dconf_CFLAGS = \ + @GLIB2_CFLAGS@ \ + @GIO2_CFLAGS@ \ + @DCONF_CFLAGS@ \ + -DG_LOG_DOMAIN=\"IBUS\" \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ + $(NULL) +ibus_dconf_LDADD = \ + @GOBJECT2_LIBS@ \ + @GLIB2_LIBS@ \ + @GIO2_LIBS@ \ + @DCONF_LIBS@ \ + $(libibus) \ + $(NULL) +ibus_dconf_DEPENDENCIES = \ + $(libibus) \ + $(NULL) + +component_DATA = \ + dconf.xml \ + $(NULL) + +componentdir = $(pkgdatadir)/component + +CLEANFILES = \ + dconf.xml \ + *.pyc \ + $(NULL) + +DISTCLEANFILES = \ + dconf-override-db \ + $(NULL) + +EXTRA_DIST = \ + dconf.xml.in.in \ + $(NULL) + +dconf.xml: dconf.xml.in + $(AM_V_GEN) \ + ( \ + libexecdir=${libexecdir}; \ + s=`cat $<`; \ + eval "echo \"$${s}\""; \ + ) > $@ + +$(libibus): + $(MAKE) -C $(top_builddir)/src + +-include $(top_srcdir)/git.mk diff --git a/conf/dconf/config.c b/conf/dconf/config.c new file mode 100644 index 000000000..02506fbad --- /dev/null +++ b/conf/dconf/config.c @@ -0,0 +1,429 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* ibus - The Input Bus + * Copyright (C) 2008-2010 Peng Huang + * Copyright (C) 2011 Daiki Ueno + * Copyright (C) 2008-2011 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include "config.h" + +#define DCONF_PREFIX "/desktop/ibus" +#define DCONF_PRESERVE_NAME_PREFIXES_KEY \ + DCONF_PREFIX"/general/dconf-preserve-name-prefixes" + +struct _IBusConfigDConf { + IBusConfigService parent; + DConfClient *client; + + /* if a dconf path matches one of preserve_name_prefixes, don't convert + key names from/to GSettings key names (see _to_gsettings_name + and _from_gsettings_name) */ + GSList *preserve_name_prefixes; +}; + +struct _IBusConfigDConfClass { + IBusConfigServiceClass parent; +}; + +/* functions prototype */ +static void ibus_config_dconf_class_init (IBusConfigDConfClass *class); +static void ibus_config_dconf_init (IBusConfigDConf *config); +static void ibus_config_dconf_destroy (IBusConfigDConf *config); +static gboolean ibus_config_dconf_set_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GVariant *value, + GError **error); +static GVariant *ibus_config_dconf_get_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error); +static GVariant *ibus_config_dconf_get_values (IBusConfigService *config, + const gchar *section, + GError **error); +static gboolean ibus_config_dconf_unset_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error); + +G_DEFINE_TYPE (IBusConfigDConf, ibus_config_dconf, IBUS_TYPE_CONFIG_SERVICE) + +static void +ibus_config_dconf_class_init (IBusConfigDConfClass *class) +{ + IBusObjectClass *object_class = IBUS_OBJECT_CLASS (class); + IBusConfigServiceClass *config_class = IBUS_CONFIG_SERVICE_CLASS (class); + + object_class->destroy = (IBusObjectDestroyFunc) ibus_config_dconf_destroy; + config_class->set_value = ibus_config_dconf_set_value; + config_class->get_value = ibus_config_dconf_get_value; + config_class->get_values = ibus_config_dconf_get_values; + config_class->unset_value = ibus_config_dconf_unset_value; +} + +static gboolean +_has_prefixes (const gchar *path, GSList *prefixes) +{ + GSList *head = prefixes; + for (; head; head = head->next) { + if (g_str_has_prefix (path, head->data)) { + return TRUE; + } + } + return FALSE; +} + +/* Convert key names from/to GSettings names. While GSettings only + * accepts lowercase letters / numbers / and dash ('-'), IBus uses + * underscore ('_') and some engines even use uppercase letters. + * + * To minimize the gap, we do the following conversion: + * + * - when converting from IBus names to GSettings names, first convert + * all letters to lowercase and then replace underscores with dashes. + * - when converting from GSettings names to IBus names, simply + * replace dashes with underscores. + * + * Note that though the conversion does not always roundtrip, it does + * in most cases. + */ +static gchar * +_to_gsettings_name (const gchar *name) +{ + return g_strcanon (g_ascii_strdown (name, -1), + "abcdefghijklmnopqrstuvwxyz0123456789-", + '-'); +} + +static gchar * +_from_gsettings_name (const gchar *name) +{ + gchar *retval = g_strdup (name), *p; + for (p = retval; *p != '\0'; p++) + if (*p == '-') + *p = '_'; + return retval; +} + +typedef gchar *(* NameConvFunc) (const gchar *); + +static gchar * +_conv_path (const gchar *path, NameConvFunc conv_func) +{ + gchar **strv = g_strsplit (path, "/", -1), **p; + gchar *retval; + + for (p = strv; *p; p++) { + gchar *canon; + canon = (*conv_func) (*p); + g_free (*p); + *p = canon; + } + + retval = g_strjoinv ("/", strv); + g_strfreev (strv); + return retval; +} + +static gchar * +_to_gsettings_path (const gchar *path) +{ + return _conv_path (path, _to_gsettings_name); +} + +static gchar * +_from_gsettings_path (const gchar *gpath) +{ + return _conv_path (gpath, _from_gsettings_name); +} + +static void +_watch_func (DConfClient *client, + const gchar *gpath, + const gchar * const *items, + gint n_items, + const gchar *tag, + IBusConfigDConf *config) +{ + gchar **gkeys = NULL; + gint i; + + g_return_if_fail (gpath != NULL); + g_return_if_fail (n_items >= 0); + + if (dconf_is_key (gpath, NULL)) { + /* If path is a key, the notification should be taken to mean + that one key may have changed. */ + n_items = 1; + gkeys = g_malloc0_n (n_items + 1, sizeof (gchar *)); + gkeys[0] = g_strdup (gpath); + } else { + if (n_items == 0) { + /* If path is a dir and items is empty then it is an + indication that any key under path may have + changed. */ + gkeys = dconf_client_list (config->client, gpath, &n_items); + } else { + gkeys = g_boxed_copy (G_TYPE_STRV, items); + } + for (i = 0; i < n_items; i++) { + gchar *gname = gkeys[i]; + gkeys[i] = g_strdup_printf ("%s/%s", gpath, gname); + g_free (gname); + } + } + + for (i = 0; i < n_items; i++) { + gchar *gname, *path, *name; + GVariant *variant = dconf_client_read (config->client, gkeys[i]); + + if (variant == NULL) { + /* Use a empty tuple for a unset value */ + variant = g_variant_new_tuple (NULL, 0); + } + + gname = strrchr (gkeys[i], '/'); + g_assert (gname); + *gname++ = '\0'; + + if (_has_prefixes (gkeys[i], config->preserve_name_prefixes)) { + path = gkeys[i]; + name = gname; + } else { + path = _from_gsettings_path (gkeys[i]); + name = _from_gsettings_name (gname); + } + + ibus_config_service_value_changed ((IBusConfigService *) config, + path + sizeof (DCONF_PREFIX), + name, + variant); + if (path != gkeys[i]) { + g_free (path); + } + if (name != gname) { + g_free (name); + } + g_variant_unref (variant); + } + g_strfreev (gkeys); +} + +static void +ibus_config_dconf_init (IBusConfigDConf *config) +{ + GVariant *variant; + GError *error; + + config->client = dconf_client_new ("ibus", + (DConfWatchFunc)_watch_func, + config, + NULL); + + error = NULL; + if (!dconf_client_watch (config->client, DCONF_PREFIX"/", NULL, &error)) + g_warning ("Can not watch dconf path %s", DCONF_PREFIX"/"); + + config->preserve_name_prefixes = NULL; + variant = dconf_client_read (config->client, + DCONF_PRESERVE_NAME_PREFIXES_KEY); + if (variant != NULL) { + GVariantIter iter; + GVariant *child; + + g_variant_iter_init (&iter, variant); + while ((child = g_variant_iter_next_value (&iter))) { + char *prefix = g_variant_dup_string (child, NULL); + config->preserve_name_prefixes = + g_slist_prepend (config->preserve_name_prefixes, + prefix); + g_variant_unref (child); + } + g_variant_unref (variant); + } +} + +static void +ibus_config_dconf_destroy (IBusConfigDConf *config) +{ + if (config->client) { + GError *error = NULL; + if (!dconf_client_unwatch (config->client, DCONF_PREFIX"/", NULL, &error)) + g_warning ("Can not unwatch dconf path %s", DCONF_PREFIX"/"); + + g_object_unref (config->client); + config->client = NULL; + } + + g_slist_free_full (config->preserve_name_prefixes, (GDestroyNotify) g_free); + config->preserve_name_prefixes = NULL; + + IBUS_OBJECT_CLASS (ibus_config_dconf_parent_class)-> + destroy ((IBusObject *)config); +} + +static gboolean +ibus_config_dconf_set_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GVariant *value, + GError **error) +{ + IBusConfigDConf *dconf = IBUS_CONFIG_DCONF (config); + DConfClient *client = dconf->client; + gchar *path, *gpath, *gname, *gkey; + gboolean retval; + + path = g_strdup_printf (DCONF_PREFIX"/%s", section); + gpath = _to_gsettings_path (path); + g_free (path); + + if (_has_prefixes (gpath, dconf->preserve_name_prefixes)) { + gname = (char *) name; + } else { + gname = _to_gsettings_name (name); + } + gkey = g_strconcat (gpath, "/", gname, NULL); + g_free (gpath); + if (gname != name) { + g_free (gname); + } + + retval = dconf_client_write (client, + gkey, + value, + NULL, /* tag */ + NULL, /* cancellable */ + error); + g_free (gkey); + + /* notify the caller that the value has changed, as dconf does not + call watch_func when the caller is the process itself */ + if (retval) { + if (value == NULL) { + /* Use a empty tuple for a unset value */ + value = g_variant_new_tuple (NULL, 0); + } + ibus_config_service_value_changed (config, section, name, value); + } + return retval; +} + +static GVariant * +ibus_config_dconf_get_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error) +{ + IBusConfigDConf *dconf = IBUS_CONFIG_DCONF (config); + DConfClient *client = dconf->client; + gchar *path, *gpath, *gname, *gkey; + GVariant *variant; + + path = g_strdup_printf (DCONF_PREFIX"/%s", section); + gpath = _to_gsettings_path (path); + g_free (path); + + if (_has_prefixes (gpath, dconf->preserve_name_prefixes)) { + gname = (char *) name; + } else { + gname = _to_gsettings_name (name); + } + gkey = g_strconcat (gpath, "/", gname, NULL); + g_free (gpath); + if (gname != name) { + g_free (gname); + } + + variant = dconf_client_read (client, gkey); + g_free (gkey); + + if (variant == NULL) { + *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Config value [%s:%s] does not exist.", section, name); + return NULL; + } + + return variant; +} + +static GVariant * +ibus_config_dconf_get_values (IBusConfigService *config, + const gchar *section, + GError **error) +{ + IBusConfigDConf *dconf = IBUS_CONFIG_DCONF (config); + DConfClient *client = dconf->client; + gchar *dir, *gdir; + gint len; + gchar **entries, **p; + GVariantBuilder *builder; + gboolean preserve_name; + + dir = g_strdup_printf (DCONF_PREFIX"/%s/", section); + gdir = _to_gsettings_path (dir); + g_free (dir); + + preserve_name = _has_prefixes (gdir, dconf->preserve_name_prefixes); + + entries = dconf_client_list (client, gdir, &len); + builder = g_variant_builder_new (G_VARIANT_TYPE ("a{sv}")); + for (p = entries; *p != NULL; p++) { + gchar *gkey = g_strconcat (gdir, *p, NULL); + GVariant *value = dconf_client_read (client, gkey); + g_free (gkey); + if (value) { + gchar *name = *p; + if (!preserve_name) { + name = _from_gsettings_name (*p); + } + g_variant_builder_add (builder, "{sv}", name, value); + if (name != *p) { + g_free (name); + } + g_variant_unref (value); + } + } + g_strfreev (entries); + g_free (gdir); + + return g_variant_builder_end (builder); +} + +static gboolean +ibus_config_dconf_unset_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error) +{ + return ibus_config_dconf_set_value (config, section, name, NULL, error); +} + +IBusConfigDConf * +ibus_config_dconf_new (GDBusConnection *connection) +{ + IBusConfigDConf *config; + config = (IBusConfigDConf *) g_object_new (IBUS_TYPE_CONFIG_DCONF, + "object-path", IBUS_PATH_CONFIG, + "connection", connection, + NULL); + return config; +} diff --git a/conf/dconf/config.h b/conf/dconf/config.h new file mode 100644 index 000000000..9f602d6ad --- /dev/null +++ b/conf/dconf/config.h @@ -0,0 +1,47 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* ibus - The Input Bus + * Copyright (C) 2008-2010 Peng Huang + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifndef __CONFIG_DCONF_H__ +#define __CONFIG_DCONF_H__ + +#include +#include + +#define IBUS_TYPE_CONFIG_DCONF \ + (ibus_config_dconf_get_type ()) +#define IBUS_CONFIG_DCONF(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_CONFIG_DCONF, IBusConfigDConf)) +#define IBUS_CONFIG_DCONF_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_CONFIG_DCONF, IBusConfigDConfClass)) +#define IBUS_IS_CONFIG_DCONF(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_CONFIG_DCONF)) +#define IBUS_IS_CONFIG_DCONF_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_CONFIG_DCONF)) +#define IBUS_CONFIG_DCONF_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_CONFIG_DCONF, IBusConfigDConfClass)) + +typedef struct _IBusConfigDConf IBusConfigDConf; +typedef struct _IBusConfigDConfClass IBusConfigDConfClass; + +GType ibus_config_dconf_get_type (void); +IBusConfigDConf *ibus_config_dconf_new (GDBusConnection *connection); + +#endif diff --git a/conf/dconf/dconf.xml.in.in b/conf/dconf/dconf.xml.in.in new file mode 100644 index 000000000..0367008e5 --- /dev/null +++ b/conf/dconf/dconf.xml.in.in @@ -0,0 +1,12 @@ + + + + org.freedesktop.IBus.Config + Dconf Config Component + ${libexecdir}/ibus-dconf + @VERSION@ + Daiki Ueno <ueno@unixuser.org> + GPL + http://code.google.com/p/ibus + ibus + diff --git a/conf/dconf/main.c b/conf/dconf/main.c new file mode 100644 index 000000000..1b69baa3b --- /dev/null +++ b/conf/dconf/main.c @@ -0,0 +1,87 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* ibus - The Input Bus + * Copyright (C) 2008-2010 Peng Huang + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include "config.h" + +static IBusBus *bus = NULL; +static IBusConfigDConf *config = NULL; + +/* options */ +static gboolean ibus = FALSE; +static gboolean verbose = FALSE; + +static const GOptionEntry entries[] = +{ + { "ibus", 'i', 0, G_OPTION_ARG_NONE, &ibus, "component is executed by ibus", + NULL }, + { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "verbose", NULL }, + { NULL }, +}; + + +static void +ibus_disconnected_cb (IBusBus *bus, + gpointer user_data) +{ + ibus_quit (); +} + +static void +ibus_dconf_start (void) +{ + ibus_init (); + bus = ibus_bus_new (); + if (!ibus_bus_is_connected (bus)) { + exit (1); + } + g_signal_connect (bus, "disconnected", G_CALLBACK (ibus_disconnected_cb), + NULL); + config = ibus_config_dconf_new (ibus_bus_get_connection (bus)); + ibus_bus_request_name (bus, IBUS_SERVICE_CONFIG, 0); + ibus_main (); +} + +gint +main (gint argc, gchar **argv) +{ + GError *error = NULL; + GOptionContext *context; + + setlocale (LC_ALL, ""); + + context = g_option_context_new ("- ibus dconf component"); + + g_option_context_add_main_entries (context, entries, "ibus-dconf"); + + if (!g_option_context_parse (context, &argc, &argv, &error)) { + g_print ("Option parsing failed: %s\n", error->message); + exit (-1); + } + + ibus_set_log_handler (verbose); + ibus_dconf_start (); + + return 0; +} diff --git a/gconf/Makefile.am b/conf/gconf/Makefile.am similarity index 92% rename from gconf/Makefile.am rename to conf/gconf/Makefile.am index 70bcf34af..cf74a4aba 100644 --- a/gconf/Makefile.am +++ b/conf/gconf/Makefile.am @@ -20,7 +20,7 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA -libibus = $(top_builddir)/src/libibus.la +libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la libexec_PROGRAMS = \ ibus-gconf \ @@ -33,8 +33,8 @@ ibus_gconf_SOURCES = \ $(NULL) ibus_gconf_CFLAGS = \ @GLIB2_CFLAGS@ \ + @GIO2_CFLAGS@ \ @GCONF_CFLAGS@ \ - @DBUS_CFLAGS@ \ -DG_LOG_DOMAIN=\"IBUS\" \ -I$(top_srcdir)/src \ -I$(top_builddir)/src \ @@ -42,19 +42,17 @@ ibus_gconf_CFLAGS = \ ibus_gconf_LDADD = \ @GOBJECT2_LIBS@ \ @GLIB2_LIBS@ \ + @GIO2_LIBS@ \ @GCONF_LIBS@ \ - @DBUS_LIBS@ \ $(libibus) \ $(NULL) ibus_gconf_DEPENDENCIES = \ $(libibus) \ $(NULL) -if ENABLE_GCONF component_DATA = \ gconf.xml \ $(NULL) -endif componentdir = $(pkgdatadir)/component @@ -77,3 +75,5 @@ gconf.xml: gconf.xml.in $(libibus): $(MAKE) -C $(top_builddir)/src + +-include $(top_srcdir)/git.mk diff --git a/conf/gconf/config.c b/conf/gconf/config.c new file mode 100644 index 000000000..64f1c47db --- /dev/null +++ b/conf/gconf/config.c @@ -0,0 +1,346 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ + +#include +#include +#include "config.h" + +#define GCONF_PREFIX "/desktop/ibus" + +struct _IBusConfigGConf { + IBusConfigService parent; + GConfClient *client; +}; + +struct _IBusConfigGConfClass { + IBusConfigServiceClass parent; + +}; + +/* functions prototype */ +static void ibus_config_gconf_class_init (IBusConfigGConfClass *class); +static void ibus_config_gconf_init (IBusConfigGConf *config); +static void ibus_config_gconf_destroy (IBusConfigGConf *config); +static gboolean ibus_config_gconf_set_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GVariant *value, + GError **error); +static GVariant *ibus_config_gconf_get_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error); +static GVariant *ibus_config_gconf_get_values (IBusConfigService *config, + const gchar *section, + GError **error); +static gboolean ibus_config_gconf_unset_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error); +static GConfValue *_to_gconf_value (GVariant *value); +static GVariant *_from_gconf_value (const GConfValue *gvalue); + +G_DEFINE_TYPE (IBusConfigGConf, ibus_config_gconf, IBUS_TYPE_CONFIG_SERVICE) + +static void +ibus_config_gconf_class_init (IBusConfigGConfClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + IBUS_OBJECT_CLASS (object_class)->destroy = (IBusObjectDestroyFunc) ibus_config_gconf_destroy; + IBUS_CONFIG_SERVICE_CLASS (object_class)->set_value = ibus_config_gconf_set_value; + IBUS_CONFIG_SERVICE_CLASS (object_class)->get_value = ibus_config_gconf_get_value; + IBUS_CONFIG_SERVICE_CLASS (object_class)->get_values = ibus_config_gconf_get_values; + IBUS_CONFIG_SERVICE_CLASS (object_class)->unset_value = ibus_config_gconf_unset_value; +} + +static void +_value_changed_cb (GConfClient *client, + const gchar *key, + GConfValue *value, + IBusConfigGConf *config) +{ + gchar *p, *section, *name; + + g_return_if_fail (key != NULL); + + p = g_strdup (key); + section = p + sizeof (GCONF_PREFIX); + name = rindex (p, '/') + 1; + *(name - 1) = '\0'; + + GVariant *variant; + if (value) { + variant = _from_gconf_value (value); + } + else { + /* Use a empty typle for a unset value */ + variant = g_variant_new_tuple (NULL, 0); + } + g_return_if_fail (variant != NULL); + ibus_config_service_value_changed ((IBusConfigService *) config, + section, + name, + variant); + g_variant_unref (variant); + g_free (p); +} + +static void +ibus_config_gconf_init (IBusConfigGConf *config) +{ + config->client = gconf_client_get_default (); + gconf_client_add_dir (config->client, + GCONF_PREFIX, + GCONF_CLIENT_PRELOAD_RECURSIVE, + NULL); + g_signal_connect (config->client, "value-changed", G_CALLBACK (_value_changed_cb), config); +} + +static void +ibus_config_gconf_destroy (IBusConfigGConf *config) +{ + if (config->client) { + g_signal_handlers_disconnect_by_func (config->client, G_CALLBACK (_value_changed_cb), config); + g_object_unref (config->client); + config->client = NULL; + } + + IBUS_OBJECT_CLASS (ibus_config_gconf_parent_class)->destroy ((IBusObject *)config); +} + +static GConfValue * +_to_gconf_value (GVariant *value) +{ + GConfValue *gv = NULL; + + switch (g_variant_classify (value)) { + case G_VARIANT_CLASS_STRING: + { + gv = gconf_value_new (GCONF_VALUE_STRING); + gconf_value_set_string (gv, g_variant_get_string (value, NULL)); + } + break; + case G_VARIANT_CLASS_INT32: + { + gv = gconf_value_new (GCONF_VALUE_INT); + gconf_value_set_int (gv, g_variant_get_int32 (value)); + } + break; + case G_VARIANT_CLASS_BOOLEAN: + { + gv = gconf_value_new (GCONF_VALUE_BOOL); + gconf_value_set_bool (gv, g_variant_get_boolean (value)); + } + break; + case G_VARIANT_CLASS_DOUBLE: + { + gv = gconf_value_new (GCONF_VALUE_FLOAT); + gconf_value_set_float (gv, g_variant_get_double (value)); + } + break; + case G_VARIANT_CLASS_ARRAY: + { + const GVariantType *element_type = g_variant_type_element (g_variant_get_type (value)); + + GConfValueType type = GCONF_VALUE_INVALID; + if (g_variant_type_equal (element_type, G_VARIANT_TYPE_STRING)) + type = GCONF_VALUE_STRING; + else if (g_variant_type_equal (element_type, G_VARIANT_TYPE_INT32)) + type = GCONF_VALUE_INT; + else if (g_variant_type_equal (element_type, G_VARIANT_TYPE_BOOLEAN)) + type = GCONF_VALUE_BOOL; + else if (g_variant_type_equal (element_type, G_VARIANT_TYPE_DOUBLE)) + type = GCONF_VALUE_FLOAT; + else + g_return_val_if_reached (NULL); + + gv = gconf_value_new (GCONF_VALUE_LIST); + gconf_value_set_list_type (gv, type); + + GSList *elements = NULL; + GVariantIter iter; + GVariant *child; + g_variant_iter_init (&iter, value); + while ((child = g_variant_iter_next_value (&iter)) != NULL) { + elements = g_slist_append (elements, _to_gconf_value (child)); + g_variant_unref (child); + } + gconf_value_set_list_nocopy (gv, elements); + } + break; + default: + g_return_val_if_reached (NULL); + } + + return gv; +} + +static GVariant * +_from_gconf_value (const GConfValue *gv) +{ + g_assert (gv != NULL); + + switch (gv->type) { + case GCONF_VALUE_STRING: + return g_variant_new_string (gconf_value_get_string (gv)); + case GCONF_VALUE_INT: + return g_variant_new_int32 (gconf_value_get_int (gv)); + case GCONF_VALUE_FLOAT: + return g_variant_new_double (gconf_value_get_float (gv)); + case GCONF_VALUE_BOOL: + return g_variant_new_boolean (gconf_value_get_bool (gv)); + case GCONF_VALUE_LIST: + { + GVariantBuilder builder; + switch (gconf_value_get_list_type (gv)) { + case GCONF_VALUE_STRING: + g_variant_builder_init (&builder, G_VARIANT_TYPE("as")); break; + case GCONF_VALUE_INT: + g_variant_builder_init (&builder, G_VARIANT_TYPE("ai")); break; + case GCONF_VALUE_FLOAT: + g_variant_builder_init (&builder, G_VARIANT_TYPE("ad")); break; + case GCONF_VALUE_BOOL: + g_variant_builder_init (&builder, G_VARIANT_TYPE("ab")); break; + break; + default: + g_assert_not_reached (); + } + + GSList *list = gconf_value_get_list (gv); + GSList *p = list; + while (p != NULL) { + switch (gconf_value_get_list_type (gv)) { + case GCONF_VALUE_STRING: + g_variant_builder_add (&builder, "s", gconf_value_get_string ((GConfValue *)p->data)); + break; + case GCONF_VALUE_INT: + g_variant_builder_add (&builder, "i", gconf_value_get_int ((GConfValue *)p->data)); + break; + case GCONF_VALUE_FLOAT: + g_variant_builder_add (&builder, "d", gconf_value_get_float ((GConfValue *)p->data)); + break; + case GCONF_VALUE_BOOL: + g_variant_builder_add (&builder, "b", gconf_value_get_bool ((GConfValue *)p->data)); + break; + default: + g_assert_not_reached (); + } + p = p->next; + } + return g_variant_builder_end (&builder); + } + default: + g_assert_not_reached (); + } +} + + +static gboolean +ibus_config_gconf_set_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GVariant *value, + GError **error) +{ + gchar *key; + GConfValue *gv; + + gv = _to_gconf_value (value); + if (gv == NULL) { + gchar *str = g_variant_print (value, TRUE); + *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Can not set config value [%s:%s] to %s.", + section, name, str); + g_free (str); + return FALSE; + } + key = g_strdup_printf (GCONF_PREFIX"/%s/%s", section, name); + gconf_client_set (((IBusConfigGConf *)config)->client, key, gv, error); + + g_free (key); + gconf_value_free (gv); + + if (*error != NULL) { + return FALSE; + } + return TRUE; +} + +static GVariant * +ibus_config_gconf_get_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error) +{ + gchar *key = g_strdup_printf (GCONF_PREFIX"/%s/%s", section, name); + + GConfValue *gv = gconf_client_get (((IBusConfigGConf *) config)->client, key, NULL); + + g_free (key); + + if (gv == NULL) { + *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Config value [%s:%s] does not exist.", section, name); + return NULL; + } + + GVariant *variant = _from_gconf_value (gv); + gconf_value_free (gv); + + return variant; +} + +static GVariant * +ibus_config_gconf_get_values (IBusConfigService *config, + const gchar *section, + GError **error) +{ + gchar *dir = g_strdup_printf (GCONF_PREFIX"/%s", section); + gint len = strlen(dir) + 1; + GSList *entries = gconf_client_all_entries (((IBusConfigGConf *) config)->client, dir, NULL); + g_free (dir); + + GSList *p; + GVariantBuilder *builder = g_variant_builder_new (G_VARIANT_TYPE ("a{sv}")); + for (p = entries; p != NULL; p = p->next) { + GConfEntry *entry = (GConfEntry *)p->data; + if (entry->key != NULL && entry->value != NULL) { + const gchar *name = entry->key + len; + GVariant *value = _from_gconf_value (entry->value); + g_variant_builder_add (builder, "{sv}", name, value); + } + gconf_entry_free (entry); + } + g_slist_free (entries); + + return g_variant_builder_end (builder); +} + +static gboolean +ibus_config_gconf_unset_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error) +{ + gchar *key = g_strdup_printf (GCONF_PREFIX"/%s/%s", section, name); + + gconf_client_unset (((IBusConfigGConf *)config)->client, key, error); + g_free (key); + + if (*error != NULL) { + return FALSE; + } + return TRUE; +} + +IBusConfigGConf * +ibus_config_gconf_new (GDBusConnection *connection) +{ + IBusConfigGConf *config; + config = (IBusConfigGConf *) g_object_new (IBUS_TYPE_CONFIG_GCONF, + "object-path", IBUS_PATH_CONFIG, + "connection", connection, + NULL); + return config; +} diff --git a/conf/gconf/config.h b/conf/gconf/config.h new file mode 100644 index 000000000..32becaae2 --- /dev/null +++ b/conf/gconf/config.h @@ -0,0 +1,28 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +#ifndef __CONFIG_GCONF_H__ +#define __CONFIG_GCONF_H__ + +#include +#include + +#define IBUS_TYPE_CONFIG_GCONF \ + (ibus_config_gconf_get_type ()) +#define IBUS_CONFIG_GCONF(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_CONFIG_GCONF, IBusConfigGConf)) +#define IBUS_CONFIG_GCONF_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_CONFIG_GCONF, IBusConfigGConfClass)) +#define IBUS_IS_CONFIG_GCONF(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_CONFIG_GCONF)) +#define IBUS_IS_CONFIG_GCONF_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_CONFIG_GCONF)) +#define IBUS_CONFIG_GCONF_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_CONFIG_GCONF, IBusConfigGConfClass)) + +typedef struct _IBusConfigGConf IBusConfigGConf; +typedef struct _IBusConfigGConfClass IBusConfigGConfClass; + +GType ibus_config_gconf_get_type (void); +IBusConfigGConf *ibus_config_gconf_new (GDBusConnection *connection); + +#endif diff --git a/gconf/gconf.xml.in.in b/conf/gconf/gconf.xml.in.in similarity index 100% rename from gconf/gconf.xml.in.in rename to conf/gconf/gconf.xml.in.in diff --git a/gconf/main.c b/conf/gconf/main.c similarity index 95% rename from gconf/main.c rename to conf/gconf/main.c index b2c6c8377..b1100aa0a 100644 --- a/gconf/main.c +++ b/conf/gconf/main.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ #include @@ -24,7 +25,6 @@ static void ibus_disconnected_cb (IBusBus *bus, gpointer user_data) { - g_debug ("bus disconnected"); ibus_quit (); } @@ -42,7 +42,7 @@ ibus_gconf_start (void) ibus_main (); } -int +gint main (gint argc, gchar **argv) { GError *error = NULL; diff --git a/conf/memconf/Makefile.am b/conf/memconf/Makefile.am new file mode 100644 index 000000000..f5f5c082a --- /dev/null +++ b/conf/memconf/Makefile.am @@ -0,0 +1,76 @@ +# vim:set noet ts=4: +# +# ibus - The Input Bus +# +# Copyright (c) 2010, Google Inc. All rights reserved. +# Copyright (c) 2007-2010 Peng Huang +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307 USA + +libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la + +libexec_PROGRAMS = \ + ibus-memconf \ + $(NULL) + +ibus_memconf_SOURCES = \ + main.c \ + config.c \ + config.h \ + $(NULL) +ibus_memconf_CFLAGS = \ + @GLIB2_CFLAGS@ \ + @GIO2_CFLAGS@ \ + -DG_LOG_DOMAIN=\"IBUS\" \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ + $(NULL) +ibus_memconf_LDADD = \ + @GOBJECT2_LIBS@ \ + @GLIB2_LIBS@ \ + @GIO2_LIBS@ \ + $(libibus) \ + $(NULL) +ibus_memconf_DEPENDENCIES = \ + $(libibus) \ + $(NULL) + +component_DATA = \ + memconf.xml \ + $(NULL) + +componentdir = $(pkgdatadir)/component + +CLEANFILES = \ + memconf.xml \ + $(NULL) + +EXTRA_DIST = \ + memconf.xml.in.in \ + $(NULL) + +memconf.xml: memconf.xml.in + $(AM_V_GEN) \ + ( \ + libexecdir=${libexecdir}; \ + s=`cat $<`; \ + eval "echo \"$${s}\""; \ + ) > $@ + +$(libibus): + $(MAKE) -C $(top_builddir)/src + +-include $(top_srcdir)/git.mk diff --git a/conf/memconf/config.c b/conf/memconf/config.c new file mode 100644 index 000000000..dd18f2e70 --- /dev/null +++ b/conf/memconf/config.c @@ -0,0 +1,202 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* ibus - The Input Bus + * Copyright (c) 2010, Google Inc. All rights reserved. + * Copyright (C) 2010 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#include +#include +#include "config.h" + + +typedef struct _IBusConfigMemconfClass IBusConfigMemconfClass; + +struct _IBusConfigMemconf { + IBusConfigService parent; + GHashTable *values; +}; + +struct _IBusConfigMemconfClass { + IBusConfigServiceClass parent; +}; + +/* functions prototype */ +static void ibus_config_memconf_class_init (IBusConfigMemconfClass *class); +static void ibus_config_memconf_init (IBusConfigMemconf *config); +static void ibus_config_memconf_destroy (IBusConfigMemconf *config); +static gboolean ibus_config_memconf_set_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GVariant *value, + GError **error); +static GVariant *ibus_config_memconf_get_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error); +static GVariant *ibus_config_memconf_get_values (IBusConfigService *config, + const gchar *section, + GError **error); +static gboolean ibus_config_memconf_unset_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error); + +G_DEFINE_TYPE (IBusConfigMemconf, ibus_config_memconf, IBUS_TYPE_CONFIG_SERVICE) + +static void +ibus_config_memconf_class_init (IBusConfigMemconfClass *class) +{ + GObjectClass *object_class = G_OBJECT_CLASS (class); + + IBUS_OBJECT_CLASS (object_class)->destroy = (IBusObjectDestroyFunc) ibus_config_memconf_destroy; + IBUS_CONFIG_SERVICE_CLASS (object_class)->set_value = ibus_config_memconf_set_value; + IBUS_CONFIG_SERVICE_CLASS (object_class)->get_value = ibus_config_memconf_get_value; + IBUS_CONFIG_SERVICE_CLASS (object_class)->get_values = ibus_config_memconf_get_values; + IBUS_CONFIG_SERVICE_CLASS (object_class)->unset_value = ibus_config_memconf_unset_value; +} + +static void +ibus_config_memconf_init (IBusConfigMemconf *config) +{ + config->values = g_hash_table_new_full (g_str_hash, + g_str_equal, + (GDestroyNotify)g_free, + (GDestroyNotify)g_variant_unref); +} + +static void +ibus_config_memconf_destroy (IBusConfigMemconf *config) +{ + g_hash_table_destroy (config->values); + IBUS_OBJECT_CLASS (ibus_config_memconf_parent_class)->destroy ((IBusObject *)config); +} + +static gboolean +ibus_config_memconf_set_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GVariant *value, + GError **error) +{ + g_assert (IBUS_IS_CONFIG_MEMCONF (config)); + g_assert (section); + g_assert (name); + g_assert (value); + g_assert (error == NULL || *error == NULL); + + gchar *key = g_strdup_printf ("%s:%s", section, name); + + g_hash_table_insert (IBUS_CONFIG_MEMCONF (config)->values, + key, g_variant_ref_sink (value)); + + ibus_config_service_value_changed (config, section, name, value); + + return TRUE; +} + +static GVariant * +ibus_config_memconf_get_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error) +{ + g_assert (IBUS_IS_CONFIG_MEMCONF (config)); + g_assert (section); + g_assert (name); + g_assert (error == NULL || *error == NULL); + + gchar *key = g_strdup_printf ("%s:%s", section, name); + GVariant *value = (GVariant *)g_hash_table_lookup (IBUS_CONFIG_MEMCONF (config)->values, key); + g_free (key); + + if (value != NULL) { + g_variant_ref (value); + } + else if (error != NULL) { + *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Config value [%s:%s] does not exist.", section, name); + } + return value; +} + +static GVariant * +ibus_config_memconf_get_values (IBusConfigService *config, + const gchar *section, + GError **error) +{ + g_assert (IBUS_IS_CONFIG_MEMCONF (config)); + g_assert (section); + g_assert (error == NULL || *error == NULL); + + GHashTableIter iter; + const gchar *key; + GVariant *value; + + GVariantBuilder *builder = g_variant_builder_new (G_VARIANT_TYPE ("a{sv}")); + g_hash_table_iter_init (&iter, IBUS_CONFIG_MEMCONF (config)->values); + while (g_hash_table_iter_next (&iter, (gpointer *)&key, (gpointer *)&value)) { + gchar **v = g_strsplit (key, ":", 2); + if (g_strcmp0 (v[0], section) == 0) { + g_variant_builder_add (builder, "{sv}", v[1], value); + } + g_strfreev(v); + } + + return g_variant_builder_end (builder); +} + +static gboolean +ibus_config_memconf_unset_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error) +{ + g_assert (IBUS_IS_CONFIG_MEMCONF (config)); + g_assert (section); + g_assert (name); + g_assert (error == NULL || *error == NULL); + + gchar *key = g_strdup_printf ("%s:%s", section, name); + gboolean retval = g_hash_table_remove (IBUS_CONFIG_MEMCONF (config)->values, key); + g_free (key); + + if (retval) { + ibus_config_service_value_changed (config, + section, + name, + g_variant_new_tuple (NULL, 0)); + } + else { + if (error && *error) { + *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Config value [%s:%s] does not exist.", section, name); + } + } + return retval; +} + +IBusConfigMemconf * +ibus_config_memconf_new (GDBusConnection *connection) +{ + IBusConfigMemconf *config; + config = (IBusConfigMemconf *) g_object_new (IBUS_TYPE_CONFIG_MEMCONF, + "object-path", IBUS_PATH_CONFIG, + "connection", connection, + NULL); + return config; +} diff --git a/conf/memconf/config.h b/conf/memconf/config.h new file mode 100644 index 000000000..2b745d4f4 --- /dev/null +++ b/conf/memconf/config.h @@ -0,0 +1,45 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* ibus - The Input Bus + * Copyright (c) 2010, Google Inc. All rights reserved. + * Copyright (C) 2010 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifndef __CONFIG_MEMCONF_H__ +#define __CONFIG_MEMCONF_H__ + +#include + +#define IBUS_TYPE_CONFIG_MEMCONF \ + (ibus_config_memconf_get_type ()) +#define IBUS_CONFIG_MEMCONF(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_CONFIG_MEMCONF, IBusConfigMemconf)) +#define IBUS_CONFIG_MEMCONF_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_CONFIG_MEMCONF, IBusConfigMemconfClass)) +#define IBUS_IS_CONFIG_MEMCONF(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_CONFIG_MEMCONF)) +#define IBUS_IS_CONFIG_MEMCONF_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_CONFIG_MEMCONF)) +#define IBUS_CONFIG_MEMCONF_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_CONFIG_MEMCONF, IBusConfigMemconfClass)) + +typedef struct _IBusConfigMemconf IBusConfigMemconf; + +GType ibus_config_memconf_get_type (void); +IBusConfigMemconf *ibus_config_memconf_new (GDBusConnection *connection); + +#endif diff --git a/conf/memconf/main.c b/conf/memconf/main.c new file mode 100644 index 000000000..51dfd7f1d --- /dev/null +++ b/conf/memconf/main.c @@ -0,0 +1,83 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* ibus - The Input Bus + * Copyright (c) 2010, Google Inc. All rights reserved. + * Copyright (C) 2010 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#include +#include +#include +#include "config.h" + +static IBusBus *bus = NULL; +static IBusConfigMemconf *config = NULL; + +/* options */ +static gboolean ibus = FALSE; +static gboolean verbose = FALSE; + +static const GOptionEntry entries[] = +{ + { "ibus", 'i', 0, G_OPTION_ARG_NONE, &ibus, "component is executed by ibus", NULL }, + { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "verbose", NULL }, + { NULL }, +}; + + +static void +ibus_disconnected_cb (IBusBus *bus, + gpointer user_data) +{ + ibus_quit (); +} + +static void +ibus_memconf_start (void) +{ + ibus_init (); + bus = ibus_bus_new (); + if (!ibus_bus_is_connected (bus)) { + exit (-1); + } + g_signal_connect (bus, "disconnected", G_CALLBACK (ibus_disconnected_cb), NULL); + config = ibus_config_memconf_new (ibus_bus_get_connection (bus)); + ibus_bus_request_name (bus, IBUS_SERVICE_CONFIG, 0); + ibus_main (); +} + +gint +main (gint argc, gchar **argv) +{ + GError *error = NULL; + GOptionContext *context; + + setlocale (LC_ALL, ""); + + context = g_option_context_new ("- ibus memconf component"); + + g_option_context_add_main_entries (context, entries, "ibus-memconf"); + + if (!g_option_context_parse (context, &argc, &argv, &error)) { + g_print ("Option parsing failed: %s\n", error->message); + exit (-1); + } + + ibus_memconf_start (); + + return 0; +} diff --git a/conf/memconf/memconf.xml.in.in b/conf/memconf/memconf.xml.in.in new file mode 100644 index 000000000..b60dbf2e8 --- /dev/null +++ b/conf/memconf/memconf.xml.in.in @@ -0,0 +1,11 @@ + + + org.freedesktop.IBus.Config + On-memory Config Component + ${libexecdir}/ibus-memconf + @VERSION@ + Peng Huang <shawn.p.huang@gmail.com>, modified by the Chromium OS Authors + GPL + http://code.google.com/p/ibus + ibus + diff --git a/configure.ac b/configure.ac index 975ef3936..8dbba3a58 100644 --- a/configure.ac +++ b/configure.ac @@ -20,74 +20,125 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA -# if not 1, append datestamp to the version number. + +# If ibus_released is 0, append datestamp to the version number. m4_define([ibus_released], [0]) -m4_define([ibus_major_version], [1]) -m4_define([ibus_minor_version], [3]) -m4_define([ibus_micro_version], [5]) -m4_define(ibus_maybe_datestamp, - m4_esyscmd([if test x]ibus_released[ != x1; then date +.%Y%m%d | tr -d '\n\r'; fi])) +m4_define([ibus_major_version], [1]) +m4_define([ibus_minor_version], [4]) +m4_define([ibus_micro_version], [99]) +m4_define([ibus_interface_age], [0]) +m4_define([ibus_binary_age], + [m4_eval(100 * ibus_minor_version + ibus_micro_version)]) +m4_define([ibus_maybe_datestamp], + m4_esyscmd([test x]ibus_released[ != x1 && date +.%Y%m%d | tr -d '\n\r'])) m4_define([ibus_version], ibus_major_version.ibus_minor_version.ibus_micro_version[]ibus_maybe_datestamp) +m4_define([ibus_api_version], [1.0]) -AC_INIT([ibus], [ibus_version], [http://code.google.com/p/ibus/issues/entry],[ibus]) -AM_INIT_AUTOMAKE([1.10]) -AC_GNU_SOURCE +AC_PREFEQ([2.62]) +AC_INIT([ibus], [ibus_version], + [http://code.google.com/p/ibus/issues/entry], + [ibus]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) -m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) -# define PACKAGE_VERSION_* variables -AS_VERSION -AS_NANO -AM_MAINTAINER_MODE -AM_DISABLE_STATIC -AC_PROG_CC -AM_PROG_CC_C_O -AC_PROG_CXX -AC_ISC_POSIX -AC_HEADER_STDC -AM_PROG_LIBTOOL -IT_PROG_INTLTOOL([0.35.0]) +m4_define([ibus_binary_version], [1.0.0]) + +# Required versions of other packages. +m4_define([glib_required_version], [2.26.0]) + + +# Init automake. +AM_INIT_AUTOMAKE([1.10]) +AM_MAINTAINER_MODE([enable]) +AC_GNU_SOURCE + +# Support silent build rules. Disable +# by either passing --disable-silent-rules to configure or passing V=1 +# to make +AM_SILENT_RULES([yes]) + +# Define sustituted variables: +IBUS_MAJOR_VERSION=ibus_major_version +IBUS_MINOR_VERSION=ibus_minor_version +IBUS_MICRO_VERSION=ibus_micro_version +IBUS_INTERFACE_AGE=ibus_interface_age +IBUS_BINARY_AGE=ibus_binary_age +IBUS_VERSION=ibus_version +IBUS_API_VERSION=ibus_api_version +IBUS_BINARY_VERSION=ibus_binary_version +AC_SUBST(IBUS_MAJOR_VERSION) +AC_SUBST(IBUS_MINOR_VERSION) +AC_SUBST(IBUS_MICRO_VERSION) +AC_SUBST(IBUS_INTERFACE_AGE) +AC_SUBST(IBUS_BINARY_AGE) +AC_SUBST(IBUS_API_VERSION) +AC_SUBST(IBUS_VERSION) +AC_SUBST(IBUS_BINARY_VERSION) + +# libtool versioning +m4_define([lt_current], + [m4_eval(100 * ibus_minor_version + ibus_micro_version - ibus_interface_age)]) +m4_define([lt_revision], [ibus_interface_age]) +m4_define([lt_age], [m4_eval(ibus_binary_age - ibus_interface_age)]) +LT_VERSION_INFO="lt_current:lt_revision:lt_age" +LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age) +AC_SUBST(LT_VERSION_INFO) +AC_SUBST(LT_CURRENT_MINUS_AGE) + +# Define GETTEXT_* variables. +GETTEXT_PACKAGE=ibus10 +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", + [The prefix for out gettext translation domains.]) -# For dislpay Date +# For dislpay date. m4_define(ibus_datedisplay, m4_esyscmd(date '+%a %b %d %Y' | tr -d '\n\r')) DATE_DISPLAY="ibus_datedisplay" AC_SUBST(DATE_DISPLAY) -# If only source code changed, lt_revision + 1 -# If any interface added, lt_age + 1 -# If any interfaces changed or removed, lt_current + 1, lt_revision = 0, lt_age = 0 -m4_define([lt_current], [2]) -m4_define([lt_revision], [0]) -m4_define([lt_age], [0]) -LT_VERSION_INFO="lt_current:lt_revision:lt_age" -AC_SUBST(LT_VERSION_INFO) -# check inotify -AC_CHECK_HEADERS([sys/inotify.h]) +# Check for programs. +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_CC_STDC +AM_PROG_VALAC([0.14]) +AC_PROG_INSTALL +AC_PROG_MAKE_SET + +# i18n stuff +AM_GLIB_GNU_GETTEXT + +# Define PACKAGE_VERSION_* variables. +AM_DISABLE_STATIC +AC_ISC_POSIX +AC_HEADER_STDC +AM_PROG_LIBTOOL +IT_PROG_INTLTOOL([0.35.0]) -# check funcs +# Check functions. AC_CHECK_FUNCS(daemon) -# check glib2 +# Check packages. +# Check glib2. AM_PATH_GLIB_2_0 PKG_CHECK_MODULES(GLIB2, [ - glib-2.0 >= 2.18 + glib-2.0 >= glib_required_version ]) PKG_CHECK_MODULES(GOBJECT2, [ - gobject-2.0 >= 2.18 + gobject-2.0 >= glib_required_version ]) PKG_CHECK_MODULES(GIO2, [ - gio-2.0 >= 2.18 + gio-2.0 >= glib_required_version ]) PKG_CHECK_MODULES(GTHREAD2, [ - gthread-2.0 >= 2.18 + gthread-2.0 >= glib_required_version ]) +# --disable-gtk2 option. AC_ARG_ENABLE(gtk2, AS_HELP_STRING([--disable-gtk2], [Do not build gtk2 im module]), @@ -96,14 +147,16 @@ AC_ARG_ENABLE(gtk2, ) AM_CONDITIONAL([ENABLE_GTK2], [test x"$enable_gtk2" = x"yes"]) +# --disable-gtk3 option. AC_ARG_ENABLE(gtk3, - AS_HELP_STRING([--enable-gtk3], - [Build gtk3 im module]), + AS_HELP_STRING([--disable-gtk3], + [Do not build gtk3 im module]), [enable_gtk3=$enableval], - [enable_gtk3=no] + [enable_gtk3=yes] ) AM_CONDITIONAL([ENABLE_GTK3], [test x"$enable_gtk3" = x"yes"]) +# --disable-xim option. AC_ARG_ENABLE(xim, AS_HELP_STRING([--disable-xim], [Do not build xim server]), @@ -112,12 +165,16 @@ AC_ARG_ENABLE(xim, ) AM_CONDITIONAL([ENABLE_XIM], [test x"$enable_xim" = x"yes"]) +# --disable-vala option. AC_ARG_ENABLE(vala, AS_HELP_STRING([--disable-vala], [Do not build ibus vala binding]), [enable_vala=$enableval], [enable_vala=yes] ) +if test x"$enable_vala" = x"yes"; then + AC_PATH_PROG([VAPIGEN], [vapigen], [false]) +fi AM_CONDITIONAL([ENABLE_VALA], [test x"$enable_vala" = x"yes"]) if test x"$enable_vala" != x"yes"; then enable_vala="no (disabled, use --enable-vala to enable)" @@ -171,23 +228,37 @@ fi # GObject introspection GOBJECT_INTROSPECTION_CHECK([0.6.8]) -# check for gtk-doc +IBUS_GIR_SCANNERFLAGS= +if test x"$found_introspection" = x"yes" ; then + IBUS_GIR_SCANNERFLAGS="--identifier-prefix=IBus --symbol-prefix=ibus" + PKG_CHECK_EXISTS([gobject-introspection-1.0 >= 0.9.6], + [gir_symbol_prefix=yes], + [gir_symbol_prefix=no]) + if test x"$gir_symbol_prefix" = x"no" ; then + IBUS_GIR_SCANNERFLAGS="--strip-prefix=IBus" + fi +fi +AC_SUBST(IBUS_GIR_SCANNERFLAGS) + +# Check for gtk-doc. GTK_DOC_CHECK(1.9) if test x"$enable_gtk_doc" = x"no"; then enable_gtk_doc="no (disabled, use --enable-gtk-doc to enable)" fi -# check for dbus-glib + +# Check for dbus. PKG_CHECK_MODULES(DBUS, [ dbus-1 ]) +# --disable-gconf option. AC_ARG_ENABLE(gconf, AS_HELP_STRING([--disable-gconf], [Do not use GConf code]), [enable_gconf=$enableval], [enable_gconf=yes] ) -AM_CONDITIONAL([ENABLE_GCONF], [test "x$enable_gconf" = "xyes"]) +AM_CONDITIONAL([ENABLE_GCONF], [test x"$enable_gconf" = x"yes"]) if test x"$enable_gconf" = x"yes"; then # check gconf @@ -207,22 +278,59 @@ else enable_gconf="no (disabled, use --enable-gconf to enable)" fi -# check env -AC_PATH_PROG(ENV, env) -AC_SUBST(ENV) +# --enable-memconf option. +AC_ARG_ENABLE(memconf, + AS_HELP_STRING([--enable-memconf], + [Enable configure base on memory]), + [enable_memconf=$enableval], + [enable_memconf=no] +) +AM_CONDITIONAL([ENABLE_MEMCONF], [test "x$enable_memconf" = "xyes"]) -AC_ARG_ENABLE(python, - AS_HELP_STRING([--disable-python], - [Do not use Python code]), - [enable_python=$enableval], - [enable_python=yes] +AC_ARG_ENABLE(dconf, + AS_HELP_STRING([--enable-dconf], + [Enable configure base on dconf]), + [enable_dconf=$enableval], + [enable_dconf=no] ) -AM_CONDITIONAL([ENABLE_PYTHON], [test "x$enable_python" = "xyes"]) +if test x"$enable_dconf" = x"yes"; then + # check dconf + PKG_CHECK_MODULES(DCONF, + [dconf >= 0.7.5], , + enable_dconf=no + ) + # check glib-compile-schemas + GLIB_GSETTINGS +fi +AM_CONDITIONAL([ENABLE_DCONF], [test x"$enable_dconf" = x"yes"]) -if test x"$enable_python" = x"yes"; then - # check python - AM_PATH_PYTHON([2.5]) +# Check env. +AC_PATH_PROG(ENV_IBUS_TEST, env) +AC_SUBST(ENV_IBUS_TEST) + +AC_ARG_ENABLE(python-library, + AS_HELP_STRING([--enable-python-library], + [Use ibus python library]), + [enable_python_library=$enableval], + [enable_python_library=no] +) + +AC_ARG_ENABLE(setup, + AS_HELP_STRING([--disable-setup], + [Do not use setup ui.]), + [enable_setup=$enableval], + [enable_setup=yes] +) + +AM_CONDITIONAL([ENABLE_PYTHON_LIBRARY], [test x"$enable_python_library" = x"yes"]) +AM_CONDITIONAL([ENABLE_SETUP], [test x"$enable_setup" = x"yes"]) +AM_CONDITIONAL([ENABLE_DAEMON], [true]) + +AM_PATH_PYTHON([2.5]) + +if test x"$enable_python_library" = x"yes"; then + # Check python. AC_PATH_PROG(PYTHON_CONFIG, python$PYTHON_VERSION-config) if test x"$PYTHON_CONFIG" = x""; then AC_PATH_PROG(PYTHON_CONFIG, python-config) @@ -239,21 +347,10 @@ if test x"$enable_python" = x"yes"; then AC_SUBST(PYTHON_INCLUDES) AC_SUBST(PYTHON_LIBS) else - enable_python="no (disabled, use --enable-python to enable)" + enable_python_library="no (disabled, use --enable-python-library to enable)" fi -# -# REBUILD = \# -# AC_SUBST(REBUILD) - -# define GETTEXT_* variables -GETTEXT_PACKAGE=ibus -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package]) - -AM_GLIB_GNU_GETTEXT - -# define gtk2 immodule dir +# Define gtk2 immodule dir. AC_ARG_WITH(gtk2-im-module-dir, AS_HELP_STRING([--with-gtk2-im-module-dir[=DIR]], [Select gtk2 immodule dir]), @@ -261,7 +358,7 @@ AC_ARG_WITH(gtk2-im-module-dir, ) AC_SUBST(GTK2_IM_MODULEDIR) -# define gtk3 immodule dir +# Define gtk3 immodule dir. AC_ARG_WITH(gtk3-im-module-dir, AS_HELP_STRING([--with-gtk3-im-module-dir[=DIR]], [Select gtk3 immodule dir]), @@ -270,7 +367,7 @@ AC_ARG_WITH(gtk3-im-module-dir, AC_SUBST(GTK3_IM_MODULEDIR) if test x"$enable_python" = x"yes"; then - # check for dbus-python + # Check for dbus-python. AC_ARG_ENABLE(dbus-python-check, AS_HELP_STRING([--disable-dbus-python-check], [Do not check dbus-python]), @@ -291,12 +388,12 @@ if test x"$enable_python" = x"yes"; then fi fi -# option for always enable snooper applications +# Option for always disable snooper applications. AC_ARG_ENABLE(key-snooper, - AS_HELP_STRING([--enable-key-snooper], - [Always enable key snooper in gtk im module]), + AS_HELP_STRING([--disable-key-snooper], + [Always disable key snooper in gtk im module]), [enable_key_snooper=$enableval], - [enable_key_snooper=no] + [enable_key_snooper=yes] ) if test x"$enable_key_snooper" = x"yes"; then AC_DEFINE(ENABLE_SNOOPER, TRUE, [Enable key snooper]) @@ -305,17 +402,47 @@ else enable_key_snooper="no (disabled, use --enable-key-snooper to enable)" fi -# option for no snooper applications -AC_ARG_WITH(snooper-apps, - AS_HELP_STRING([--with-snooper-apps[=regex1,regex2]], - [Enable keyboard snooper in those applications (default: xchat,pidgin,empathy)]), - SNOOPER_APPS=$with_snooper_apps, - SNOOPER_APPS=[xchat,pidgin,empathy] +# Option for no snooper applications. +AC_ARG_WITH(no-snooper-apps, + AS_HELP_STRING([--with-no-snooper-apps[=regex1,regex2]], + [Does not enable keyboard snooper in those applications (like: .*chrome.*,firefox.*)]), + NO_SNOOPER_APPS=$with_no_snooper_apps, + NO_SNOOPER_APPS=[.*chrome.*,.*chromium.*,firefox.*,Do.*] +) +AC_DEFINE_UNQUOTED(NO_SNOOPER_APPS, "$NO_SNOOPER_APPS", + [Does not enbale keyboard snooper in those applications]) + +# GNOME 3 uses the theme's icon. +AC_ARG_WITH(panel-icon-keyboard, + AS_HELP_STRING([--with-panel-icon-keyboard[=icon_name]], + [Set the default panel icon (default: "input-keyboard-symbolic")]), + [if test x"$with_panel_icon_keyboard" = x"yes" -o \ + x"$with_panel_icon_keyboard" = x; then + with_panel_icon_keyboard="input-keyboard-symbolic" + fi + if test x"$with_panel_icon_keyboard" = x"legacy"; then + with_panel_icon_keyboard="ibus-keyboard" + fi + IBUS_ICON_KEYBOARD=$with_panel_icon_keyboard + ], + IBUS_ICON_KEYBOARD="input-keyboard-symbolic" ) -AC_DEFINE_UNQUOTED(SNOOPER_APPS, "$SNOOPER_APPS", - [Enbale keyboard snooper in those applications]) +AC_SUBST(IBUS_ICON_KEYBOARD) + +# --disable-surrounding-text option. +AC_ARG_ENABLE(surrounding-text, + AS_HELP_STRING([--disable-surrounding-text], + [Enable surrounding-text support]), + [enable_surrounding_text=$enableval], + [enable_surrounding_text=yes] +) +if test x"$enable_surrounding_text" = x"yes"; then + AC_DEFINE(ENABLE_SURROUNDING, TRUE, [Enable surrounding-text support]) +else + enable_surrounding_text="no (disabled, use --enable-surrounding-text to enable)" +fi -# check iso-codes +# Check iso-codes. PKG_CHECK_MODULES(ISOCODES, [ iso-codes ]) @@ -327,19 +454,22 @@ AC_CONFIG_FILES([ po/Makefile.in Makefile ibus-1.0.pc ibus.spec -xinput-ibus client/Makefile client/gtk2/Makefile client/gtk3/Makefile client/x11/Makefile src/Makefile src/ibusversion.h +src/tests/Makefile bus/Makefile +engine/Makefile +engine/simple.xml.in util/Makefile util/IMdkit/Makefile data/Makefile data/icons/Makefile data/keymaps/Makefile +data/dconf/Makefile docs/Makefile docs/reference/Makefile docs/reference/ibus/ibus-docs.sgml @@ -349,35 +479,46 @@ ibus/_config.py ibus/Makefile ibus/interface/Makefile ui/Makefile -ui/gtk/Makefile -ui/gtk/ibus-ui-gtk -ui/gtk/gtkpanel.xml.in +ui/gtk3/Makefile +ui/gtk3/gtkpanel.xml.in setup/Makefile setup/ibus-setup -gconf/Makefile -gconf/gconf.xml.in bindings/Makefile bindings/vala/Makefile +conf/Makefile +conf/gconf/Makefile +conf/gconf/gconf.xml.in +conf/dconf/Makefile +conf/dconf/dconf.xml.in +conf/memconf/Makefile +conf/memconf/memconf.xml.in +tools/Makefile ]) AC_OUTPUT AC_MSG_RESULT([ Build options: - Version $VERSION + Version $IBUS_VERSION Install prefix $prefix Build shared libs $enable_shared Build static libs $enable_static + CFLAGS $CFLAGS Gtk2 immodule dir $GTK2_IM_MODULEDIR Gtk3 immodule dir $GTK3_IM_MODULEDIR Build gtk2 immodule $enable_gtk2 Build gtk3 immodule $enable_gtk3 Build XIM agent server $enable_xim - Build python modules $enable_python + Build python library $enable_python_library Build gconf modules $enable_gconf + Build memconf modules $enable_memconf + Build dconf modules $enable_dconf Build introspection $found_introspection + IBus-1.0.gir scannerflags "$IBUS_GIR_SCANNERFLAGS" Build vala binding $enable_vala Build document $enable_gtk_doc Enable key snooper $enable_key_snooper - Snooper regexes "$SNOOPER_APPS" + No snooper regexes "$NO_SNOOPER_APPS" + Panel icon "$IBUS_ICON_KEYBOARD" + Enable surrounding-text $enable_surrounding_text ]) diff --git a/data/.gitignore b/data/.gitignore deleted file mode 100644 index 461264b09..000000000 --- a/data/.gitignore +++ /dev/null @@ -1 +0,0 @@ -ibus.schemas diff --git a/data/Makefile.am b/data/Makefile.am index 4ea669d6d..99be41c95 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -25,6 +25,10 @@ SUBDIRS = \ keymaps \ $(NULL) +if ENABLE_DCONF +SUBDIRS += dconf +endif + schemasdir = $(GCONF_SCHEMA_FILE_DIR) schemas_in_files = ibus.schemas.in schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) @@ -47,3 +51,5 @@ EXTRA_DIST = \ DISTCLEANFILES = \ $(schemas_DATA) \ $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/data/dconf/Makefile.am b/data/dconf/Makefile.am new file mode 100644 index 000000000..daea8968a --- /dev/null +++ b/data/dconf/Makefile.am @@ -0,0 +1,62 @@ +# vim:set noet ts=4: +# +# ibus - The Input Bus +# +# Copyright (c) 2007-2010 Peng Huang +# Copyright (c) 2011 Daiki Ueno +# Copyright (c) 2007-2011 Red Hat, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307 USA + +gsettings_schemas_in_files = org.freedesktop.ibus.gschema.xml.in +gsettings_SCHEMAS = $(gsettings_schemas_in_files:.gschema.xml.in=.gschema.xml) +gsettingsconvertdir = $(datadir)/GConf/gsettings +dist_gsettingsconvert_DATA = ibus.convert +@GSETTINGS_RULES@ +@INTLTOOL_XML_NOMERGE_RULE@ + +EXTRA_DIST = \ + $(gsettings_schemas_in_files) \ + make-dconf-override-db.sh \ + profile/ibus \ + $(NULL) + +DISTCLEANFILES = \ + $(gsettings_SCHEMAS) \ + $(NULL) + +MAINTAINERCLEANFILES = \ + $(gsettings_schemas_in_files) \ + $(NULL) + +CLEANFILES = \ + db/ibus \ + $(NULL) + +dconfprofiledir = $(sysconfdir)/dconf +nobase_dconfprofile_DATA = db/ibus profile/ibus + +org.freedesktop.ibus.gschema.xml.in: $(top_srcdir)/data/ibus.schemas.in + $(AM_V_GEN) gsettings-schema-convert --force --gconf --xml \ + --schema-id "org.freedesktop.ibus" \ + --output $@ $< + +db/ibus: $(srcdir)/make-dconf-override-db.sh $(gsettings_SCHEMAS) + @$(MKDIR_P) db + $(AM_V_GEN) $(srcdir)/make-dconf-override-db.sh $@ || \ + { rc=$$?; $(RM) -rf $@; exit $$rc; } + +-include $(top_srcdir)/git.mk diff --git a/data/dconf/ibus.convert b/data/dconf/ibus.convert new file mode 100644 index 000000000..ff35e51bc --- /dev/null +++ b/data/dconf/ibus.convert @@ -0,0 +1,25 @@ +[org.freedesktop.ibus.general] +embed-preedit-text = /desktop/ibus/general/embed_preedit_text +enable-by-default = /desktop/ibus/general/enable_by_default +preload-engines = /desktop/ibus/general/preload_engines +use-global-engine = /desktop/ibus/general/use_global_engine +use-system-keyboard-layout = /desktop/ibus/general/use_system_keyboard_layout + +[org.freedesktop.ibus.general.hotkey] +disable-unconditional = /desktop/ibus/general/disable_unconditional +enable-unconditional = /desktop/ibus/general/enable_unconditional +next-engine = /desktop/ibus/general/next_engine +next-engine-in-menu = /desktop/ibus/general/next_engine_in_menu +prev-engine = /desktop/ibus/general/prev_engine +previous-engine = /desktop/ibus/general/previous_engine +trigger = /desktop/ibus/general/trigger + +[org.freedesktop.ibus.panel] +custom-font = /desktop/ibus/general/custom_font +lookup-table-orientation = /desktop/ibus/general/lookup_table_orientation +show = /desktop/ibus/general/show +show-icon-on-systray = /desktop/ibus/general/show_icon_on_systray +show-im-name = /desktop/ibus/general/show_im_name +use-custom-font = /desktop/ibus/general/use_custom_font +x = /desktop/ibus/general/x +y = /desktop/ibus/general/y diff --git a/data/dconf/make-dconf-override-db.sh b/data/dconf/make-dconf-override-db.sh new file mode 100755 index 000000000..0d8456b06 --- /dev/null +++ b/data/dconf/make-dconf-override-db.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -e + +export TMPDIR=$(mktemp -d --tmpdir="$PWD") +export XDG_CONFIG_HOME="$TMPDIR/config" +export XDG_CACHE_HOME="$TMPDIR/cache" +export GSETTINGS_SCHEMA_DIR="$TMPDIR/schemas" +mkdir -p $XDG_CONFIG_HOME $XDG_CACHE_HOME $GSETTINGS_SCHEMA_DIR + +eval `dbus-launch --sh-syntax` + +trap 'rm -rf $TMPDIR; kill $DBUS_SESSION_BUS_PID' ERR + +# in case that schema is not installed on the system +glib-compile-schemas --targetdir "$GSETTINGS_SCHEMA_DIR" "$PWD" + +gsettings list-recursively org.freedesktop.ibus.general | \ +while read schema key val; do + gsettings set "$schema" "$key" "$val" +done + +gsettings list-recursively org.freedesktop.ibus.panel | \ +while read schema key val; do + gsettings set "$schema" "$key" "$val" +done + +mv $XDG_CONFIG_HOME/dconf/user "$1" +rm -rf $TMPDIR + +kill $DBUS_SESSION_BUS_PID diff --git a/data/dconf/profile/ibus b/data/dconf/profile/ibus new file mode 100644 index 000000000..c4ac80e9e --- /dev/null +++ b/data/dconf/profile/ibus @@ -0,0 +1,2 @@ +user +ibus diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in index 4695d0b15..68def4068 100644 --- a/data/ibus.schemas.in +++ b/data/ibus.schemas.in @@ -6,6 +6,7 @@ /desktop/ibus/general/preload_engines ibus list + [] string Preload engines @@ -18,13 +19,36 @@ ibus list string - [Control+space,Zenkaku_Hankaku,Alt+Zenkaku_Hankaku,Alt+grave,Hangul,Alt+Release+Alt_R] + [Control+space,Zenkaku_Hankaku,Alt+Kanji,Alt+grave,Hangul,Alt+Release+Alt_R] Trigger shortcut keys The shortcut keys for turning input method on or off - + + /schemas/desktop/ibus/general/hotkey/enable_unconditional + /desktop/ibus/general/hotkey/enable_unconditional + ibus + list + string + [] + + Enable shortcut keys + The shortcut keys for turning input method on + + + + /schemas/desktop/ibus/general/hotkey/disable_unconditional + /desktop/ibus/general/hotkey/disable_unconditional + ibus + list + string + [] + + Disable shortcut keys + The shortcut keys for turning input method off + + /schemas/desktop/ibus/general/hotkey/next_engine @@ -223,5 +247,18 @@ focus + + + /schemas/desktop/ibus/general/dconf_preserve_name_prefixes + /desktop/ibus/general/dconf_preserve_name_prefixes + ibus + list + [/desktop/ibus/engine/pinyin,/desktop/ibus/engine/bopomofo,/desktop/ibus/engine/hangul] + string + + DConf preserve name prefixes + Prefixes of DConf keys to stop name conversion + + diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am index 1d405a6ef..c1862a191 100644 --- a/data/icons/Makefile.am +++ b/data/icons/Makefile.am @@ -72,3 +72,5 @@ EXTRA_DIST = \ $(hicolor_icon_48_DATA) \ $(hicolor_icon_scalable_DATA) \ $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/data/keymaps/Makefile.am b/data/keymaps/Makefile.am index c21be4d9b..61d864458 100644 --- a/data/keymaps/Makefile.am +++ b/data/keymaps/Makefile.am @@ -37,6 +37,7 @@ # fr-ch \ # hr \ # hu \ +# in \ # is \ # it \ # jp \ @@ -64,6 +65,7 @@ keymaps = \ us \ jp \ kr \ + in \ $(NULL) keymaps_DATA = $(keymaps) @@ -72,3 +74,5 @@ keymapsdir = $(pkgdatadir)/keymaps EXTRA_DIST = \ $(keymaps) \ $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/data/keymaps/in b/data/keymaps/in new file mode 100644 index 000000000..f737bfaa2 --- /dev/null +++ b/data/keymaps/in @@ -0,0 +1,2 @@ +include us +keycode 100 = ISO_Level3_Shift diff --git a/debian/clean b/debian/clean index 9350766a0..7d90c680c 100644 --- a/debian/clean +++ b/debian/clean @@ -1,4 +1,4 @@ config.guess config.sub -po/ibus.pot +po/ibus10.pot install-stamp diff --git a/debian/control b/debian/control index 4f9bcefab..0d5a89dcc 100644 --- a/debian/control +++ b/debian/control @@ -8,13 +8,14 @@ Build-Depends: debhelper (>= 7), autoconf, automake, dpatch, + gtk-doc-tools, gobject-introspection (>= 0.6.8), libgirepository1.0-dev (>= 0.6.8), intltool (>= 0.40.0), iso-codes, - libdbus-glib-1-dev, libgconf2-dev, libgtk2.0-dev, + libgtk-3-dev, libtool, python-support (>= 0.6), python-dev, @@ -29,7 +30,7 @@ Package: ibus Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-glade2, python-ibus (= ${source:Version}), python-xdg, librsvg2-common -Recommends: im-switch, ibus-gtk | ibus-qt4 +Recommends: im-switch, ibus-gtk2, ibus-gtk3, ibus-qt4 Conflicts: ibus-anthy (<< 1.2), ibus-table (<< 1.2), ibus-pinyin (<< 1.2.99), @@ -41,7 +42,7 @@ Description: New input method framework using dbus OS. It provides full featured and user friendly input method user interface. It also may help developers to develop input method easily. -Package: libibus2 +Package: libibus-1.0-0 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} @@ -50,12 +51,15 @@ Description: New input method framework using dbus OS. It provides full featured and user friendly input method user interface. It also may help developers to develop input method easily. . - libibus2 is the library of ibus. + libibus-1.0-0 is the library of ibus. Package: libibus-dev Section: libdevel Architecture: any -Depends: libibus2 (= ${binary:Version}), libglib2.0-dev, libdbus-1-dev, ${shlibs:Depends}, ${misc:Depends} +Depends: ${misc:Depends}, + ${shlibs:Depends}, + libibus-1.0-0 (= ${binary:Version}), + libglib2.0-dev Description: New input method framework using dbus IBus is an Intelligent Input Bus. It is a new input framework for Linux OS. It provides full featured and user friendly input method user interface. @@ -64,7 +68,7 @@ Description: New input method framework using dbus This package contains the header files and static libraries which is needed for developing the IBus applications. -Package: ibus-gtk +Package: ibus-gtk2 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: New input method framework using dbus @@ -72,7 +76,17 @@ Description: New input method framework using dbus OS. It provides full featured and user friendly input method user interface. It also may help developers to develop input method easily. . - ibus-gtk is the GTK+ client of ibus, it provide a gtk-immodule for ibus. + ibus-gtk2 is the GTK+-2.0 client of ibus, it provide a gtk-immodule for ibus. + +Package: ibus-gtk3 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: New input method framework using dbus + IBus is an Intelligent Input Bus. It is a new input framework for Linux + OS. It provides full featured and user friendly input method user interface. + It also may help developers to develop input method easily. + . + ibus-gtk3 is the GTK+-3.0 client of ibus, it provide a gtk-immodule for ibus. Package: python-ibus Section: python diff --git a/debian/ibus-gtk.install b/debian/ibus-gtk2.install similarity index 100% rename from debian/ibus-gtk.install rename to debian/ibus-gtk2.install diff --git a/debian/ibus-gtk3.install b/debian/ibus-gtk3.install new file mode 100644 index 000000000..6906adcaa --- /dev/null +++ b/debian/ibus-gtk3.install @@ -0,0 +1 @@ +usr/lib/gtk-3.0/3.0.0/immodules/im-ibus.so diff --git a/debian/libibus2.install b/debian/libibus-1.0-0.install similarity index 52% rename from debian/libibus2.install rename to debian/libibus-1.0-0.install index 15c8243c9..b6fcee942 100644 --- a/debian/libibus2.install +++ b/debian/libibus-1.0-0.install @@ -1,2 +1,2 @@ -debian/tmp/usr/lib/libibus.so.2* +debian/tmp/usr/lib/libibus-*.so.* debian/tmp/usr/lib/girepository-1.0/* diff --git a/debian/libibus-1.0-0.symbols b/debian/libibus-1.0-0.symbols new file mode 100644 index 000000000..778b4ead1 --- /dev/null +++ b/debian/libibus-1.0-0.symbols @@ -0,0 +1,328 @@ +libibus-1.0.so.0 libibus-1.0-0 #MINVER# + ibus_attr_background_new@Base 1.3.99.20101019 + ibus_attr_foreground_new@Base 1.3.99.20101019 + ibus_attr_list_append@Base 1.3.99.20101019 + ibus_attr_list_get@Base 1.3.99.20101019 + ibus_attr_list_get_type@Base 1.3.99.20101019 + ibus_attr_list_new@Base 1.3.99.20101019 + ibus_attr_type_get_type@Base 1.3.99.20101019 + ibus_attr_underline_get_type@Base 1.3.99.20101019 + ibus_attr_underline_new@Base 1.3.99.20101019 + ibus_attribute_get_type@Base 1.3.99.20101019 + ibus_attribute_new@Base 1.3.99.20101019 + ibus_bus_add_match@Base 1.3.99.20101019 + ibus_bus_add_match_async@Base 1.3.99.20110309 + ibus_bus_add_match_async_finish@Base 1.3.99.20110309 + ibus_bus_create_input_context@Base 1.3.99.20101019 + ibus_bus_create_input_context_async@Base 1.3.99.20110309 + ibus_bus_create_input_context_async_finish@Base 1.3.99.20110309 + ibus_bus_current_input_context@Base 1.3.99.20101019 + ibus_bus_current_input_context_async@Base 1.3.99.20110309 + ibus_bus_current_input_context_async_finish@Base 1.3.99.20110309 + ibus_bus_exit@Base 1.3.99.20101019 + ibus_bus_exit_async@Base 1.3.99.20110309 + ibus_bus_exit_async_finish@Base 1.3.99.20110309 + ibus_bus_get_config@Base 1.3.99.20101019 + ibus_bus_get_connection@Base 1.3.99.20101019 + ibus_bus_get_global_engine@Base 1.3.99.20101019 + ibus_bus_get_global_engine_async@Base 1.3.99.20110309 + ibus_bus_get_global_engine_async_finish@Base 1.3.99.20110309 + ibus_bus_get_name_owner@Base 1.3.99.20101019 + ibus_bus_get_name_owner_async@Base 1.3.99.20110309 + ibus_bus_get_name_owner_async_finish@Base 1.3.99.20110309 + ibus_bus_get_type@Base 1.3.99.20101019 + ibus_bus_get_use_global_engine@Base 1.3.99.20101019 + ibus_bus_get_use_global_engine_async@Base 1.3.99.20110309 + ibus_bus_get_use_global_engine_async_finish@Base 1.3.99.20110309 + ibus_bus_get_use_sys_layout@Base 1.3.99.20101019 + ibus_bus_get_use_sys_layout_async@Base 1.3.99.20110309 + ibus_bus_get_use_sys_layout_async_finish@Base 1.3.99.20110309 + ibus_bus_hello@Base 1.3.99.20101019 + ibus_bus_is_connected@Base 1.3.99.20101019 + ibus_bus_is_global_engine_enabled@Base 1.3.99.20101019 + ibus_bus_is_global_engine_enabled_async@Base 1.3.99.20110309 + ibus_bus_is_global_engine_enabled_async_finish@Base 1.3.99.20110309 + ibus_bus_list_active_engines@Base 1.3.99.20101019 + ibus_bus_list_active_engines_async@Base 1.3.99.20110309 + ibus_bus_list_active_engines_async_finish@Base 1.3.99.20110309 + ibus_bus_list_engines@Base 1.3.99.20101019 + ibus_bus_list_engines_async@Base 1.3.99.20110309 + ibus_bus_list_engines_async_finish@Base 1.3.99.20110309 + ibus_bus_list_names@Base 1.3.99.20101019 + ibus_bus_list_queued_owners@Base 1.3.99.20110405 + ibus_bus_name_flag_get_type@Base 1.3.99.20110405 + ibus_bus_name_has_owner@Base 1.3.99.20101019 + ibus_bus_name_has_owner_async@Base 1.3.99.20110309 + ibus_bus_name_has_owner_async_finish@Base 1.3.99.20110309 + ibus_bus_new@Base 1.3.99.20101019 + ibus_bus_register_component@Base 1.3.99.20101019 + ibus_bus_register_component_async@Base 1.3.99.20110309 + ibus_bus_register_component_async_finish@Base 1.3.99.20110309 + ibus_bus_release_name@Base 1.3.99.20101019 + ibus_bus_release_name_async@Base 1.3.99.20110309 + ibus_bus_release_name_async_finish@Base 1.3.99.20110309 + ibus_bus_remove_match@Base 1.3.99.20101019 + ibus_bus_remove_match_async@Base 1.3.99.20110309 + ibus_bus_remove_match_async_finish@Base 1.3.99.20110309 + ibus_bus_request_name@Base 1.3.99.20101019 + ibus_bus_request_name_async@Base 1.3.99.20110309 + ibus_bus_request_name_async_finish@Base 1.3.99.20110309 + ibus_bus_request_name_reply_get_type@Base 1.3.99.20110405 + ibus_bus_set_global_engine@Base 1.3.99.20101019 + ibus_bus_set_global_engine_async@Base 1.3.99.20110217 + ibus_bus_set_global_engine_async_finish@Base 1.3.99.20110217 + ibus_bus_set_watch_dbus_signal@Base 1.3.99.20101019 + ibus_bus_set_watch_ibus_signal@Base 1.3.99.20110117 + ibus_capabilite_get_type@Base 1.3.99.20101019 + ibus_component_add_engine@Base 1.3.99.20101019 + ibus_component_add_observed_path@Base 1.3.99.20101019 + ibus_component_check_modification@Base 1.3.99.20101019 + ibus_component_get_author@Base 1.3.99.20101019 + ibus_component_get_description@Base 1.3.99.20101019 + ibus_component_get_engines@Base 1.3.99.20101019 + ibus_component_get_exec@Base 1.3.99.20101019 + ibus_component_get_homepage@Base 1.3.99.20101019 + ibus_component_get_license@Base 1.3.99.20101019 + ibus_component_get_name@Base 1.3.99.20101019 + ibus_component_get_textdomain@Base 1.3.99.20101019 + ibus_component_get_type@Base 1.3.99.20101019 + ibus_component_get_version@Base 1.3.99.20101019 + ibus_component_new@Base 1.3.99.20101019 + ibus_component_new_from_file@Base 1.3.99.20101019 + ibus_component_new_from_xml_node@Base 1.3.99.20101019 + ibus_component_new_varargs@Base 1.3.99.20101101 + ibus_component_output@Base 1.3.99.20101019 + ibus_component_output_engines@Base 1.3.99.20101019 + ibus_config_get_type@Base 1.3.99.20101019 + ibus_config_get_value@Base 1.3.99.20101019 + ibus_config_get_value_async@Base 1.3.99.20101115 + ibus_config_get_value_async_finish@Base 1.3.99.20101115 + ibus_config_get_values@Base 1.3.99.20110616 + ibus_config_get_values_async@Base 1.3.99.20110616 + ibus_config_get_values_async_finish@Base 1.3.99.20110616 + ibus_config_new@Base 1.3.99.20101019 + ibus_config_new_async@Base 1.3.99.20110606 + ibus_config_new_async_finish@Base 1.3.99.20110606 + ibus_config_service_get_type@Base 1.3.99.20101019 + ibus_config_service_new@Base 1.3.99.20101019 + ibus_config_service_value_changed@Base 1.3.99.20101019 + ibus_config_set_value@Base 1.3.99.20101019 + ibus_config_set_value_async@Base 1.3.99.20110217 + ibus_config_set_value_async_finish@Base 1.3.99.20110217 + ibus_config_unset@Base 1.3.99.20101019 + ibus_engine_commit_text@Base 1.3.99.20101019 + ibus_engine_delete_surrounding_text@Base 1.3.99.20101019 + ibus_engine_desc_get_author@Base 1.3.99.20101019 + ibus_engine_desc_get_description@Base 1.3.99.20101019 + ibus_engine_desc_get_hotkeys@Base 1.3.99.20101019 + ibus_engine_desc_get_icon@Base 1.3.99.20101019 + ibus_engine_desc_get_language@Base 1.3.99.20101019 + ibus_engine_desc_get_layout@Base 1.3.99.20101019 + ibus_engine_desc_get_license@Base 1.3.99.20101019 + ibus_engine_desc_get_longname@Base 1.3.99.20101019 + ibus_engine_desc_get_name@Base 1.3.99.20101019 + ibus_engine_desc_get_rank@Base 1.3.99.20101019 + ibus_engine_desc_get_symbol@Base 1.3.99.20110616 + ibus_engine_desc_get_type@Base 1.3.99.20101019 + ibus_engine_desc_new@Base 1.3.99.20101019 + ibus_engine_desc_new_from_xml_node@Base 1.3.99.20101019 + ibus_engine_desc_new_varargs@Base 1.3.99.20101101 + ibus_engine_desc_output@Base 1.3.99.20101019 + ibus_engine_forward_key_event@Base 1.3.99.20101019 + ibus_engine_get_name@Base 1.3.99.20101019 + ibus_engine_get_surrounding_text@Base 1.3.99.20110405 + ibus_engine_get_type@Base 1.3.99.20101019 + ibus_engine_hide_auxiliary_text@Base 1.3.99.20101019 + ibus_engine_hide_lookup_table@Base 1.3.99.20101019 + ibus_engine_hide_preedit_text@Base 1.3.99.20101019 + ibus_engine_new@Base 1.3.99.20101019 + ibus_engine_new_type@Base 1.3.99.20101019 + ibus_engine_register_properties@Base 1.3.99.20101019 + ibus_engine_show_auxiliary_text@Base 1.3.99.20101019 + ibus_engine_show_lookup_table@Base 1.3.99.20101019 + ibus_engine_show_preedit_text@Base 1.3.99.20101019 + ibus_engine_update_auxiliary_text@Base 1.3.99.20101019 + ibus_engine_update_lookup_table@Base 1.3.99.20101019 + ibus_engine_update_lookup_table_fast@Base 1.3.99.20101019 + ibus_engine_update_preedit_text@Base 1.3.99.20101019 + ibus_engine_update_preedit_text_with_mode@Base 1.3.99.20101019 + ibus_engine_update_property@Base 1.3.99.20101019 + ibus_error_get_type@Base 1.3.99.20110606 + ibus_error_quark@Base 1.3.99.20110606 + ibus_factory_add_engine@Base 1.3.99.20101019 + ibus_factory_get_type@Base 1.3.99.20101019 + ibus_factory_new@Base 1.3.99.20101019 + ibus_free_strv@Base 1.3.99.20101019 + ibus_get_address@Base 1.3.99.20101019 + ibus_get_daemon_uid@Base 1.3.99.20101019 + ibus_get_language_name@Base 1.3.99.20110405 + ibus_get_local_machine_id@Base 1.3.99.20101019 + ibus_get_session_id@Base 1.3.99.20101019 + ibus_get_socket_path@Base 1.3.99.20101019 + ibus_get_timeout@Base 1.3.99.20110117 + ibus_get_user_name@Base 1.3.99.20101019 + ibus_hotkey_get_type@Base 1.3.99.20101019 + ibus_hotkey_profile_add_hotkey@Base 1.3.99.20101019 + ibus_hotkey_profile_add_hotkey_from_string@Base 1.3.99.20101019 + ibus_hotkey_profile_filter_key_event@Base 1.3.99.20101019 + ibus_hotkey_profile_get_type@Base 1.3.99.20101019 + ibus_hotkey_profile_lookup_hotkey@Base 1.3.99.20101019 + ibus_hotkey_profile_new@Base 1.3.99.20101019 + ibus_hotkey_profile_remove_hotkey@Base 1.3.99.20101019 + ibus_hotkey_profile_remove_hotkey_by_event@Base 1.3.99.20101019 + ibus_init@Base 1.3.99.20101019 + ibus_input_context_cancel_hand_writing@Base 1.3.99.20110430 + ibus_input_context_cursor_down@Base 1.3.99.20101019 + ibus_input_context_cursor_up@Base 1.3.99.20101019 + ibus_input_context_disable@Base 1.3.99.20101019 + ibus_input_context_enable@Base 1.3.99.20101019 + ibus_input_context_focus_in@Base 1.3.99.20101019 + ibus_input_context_focus_out@Base 1.3.99.20101019 + ibus_input_context_get_engine@Base 1.3.99.20101019 + ibus_input_context_get_engine_async@Base 1.3.99.20110322 + ibus_input_context_get_engine_async_finish@Base 1.3.99.20110322 + ibus_input_context_get_input_context@Base 1.3.99.20101019 + ibus_input_context_get_input_context_async@Base 1.3.99.20110316 + ibus_input_context_get_input_context_async_finish@Base 1.3.99.20110316 + ibus_input_context_get_type@Base 1.3.99.20101019 + ibus_input_context_is_enabled@Base 1.3.99.20101019 + ibus_input_context_is_enabled_async@Base 1.3.99.20110322 + ibus_input_context_is_enabled_async_finish@Base 1.3.99.20110322 + ibus_input_context_needs_surrounding_text@Base 1.3.99.20110405 + ibus_input_context_new@Base 1.3.99.20101019 + ibus_input_context_new_async@Base 1.3.99.20110316 + ibus_input_context_new_async_finish@Base 1.3.99.20110316 + ibus_input_context_page_down@Base 1.3.99.20101019 + ibus_input_context_page_up@Base 1.3.99.20101019 + ibus_input_context_process_hand_writing_event@Base 1.3.99.20110430 + ibus_input_context_process_key_event@Base 1.3.99.20101019 + ibus_input_context_process_key_event_async@Base 1.3.99.20110124 + ibus_input_context_process_key_event_async_finish@Base 1.3.99.20110124 + ibus_input_context_property_activate@Base 1.3.99.20101019 + ibus_input_context_property_hide@Base 1.3.99.20101019 + ibus_input_context_property_show@Base 1.3.99.20101019 + ibus_input_context_reset@Base 1.3.99.20101019 + ibus_input_context_set_capabilities@Base 1.3.99.20101019 + ibus_input_context_set_cursor_location@Base 1.3.99.20101019 + ibus_input_context_set_engine@Base 1.3.99.20101019 + ibus_input_context_set_surrounding_text@Base 1.3.99.20110405 + ibus_key_event_from_string@Base 1.3.99.20101019 + ibus_key_event_to_string@Base 1.3.99.20101019 + ibus_keymap_fill@Base 1.3.99.20101019 + ibus_keymap_get@Base 1.3.99.20101019 + ibus_keymap_get_type@Base 1.3.99.20101019 + ibus_keymap_lookup_keysym@Base 1.3.99.20101019 + ibus_keymap_new@Base 1.3.99.20101019 + ibus_keyval_from_name@Base 1.3.99.20101019 + ibus_keyval_name@Base 1.3.99.20101019 + ibus_lookup_table_append_candidate@Base 1.3.99.20101019 + ibus_lookup_table_append_label@Base 1.3.99.20101019 + ibus_lookup_table_clear@Base 1.3.99.20101019 + ibus_lookup_table_cursor_down@Base 1.3.99.20101019 + ibus_lookup_table_cursor_up@Base 1.3.99.20101019 + ibus_lookup_table_get_candidate@Base 1.3.99.20101019 + ibus_lookup_table_get_cursor_in_page@Base 1.3.99.20101019 + ibus_lookup_table_get_cursor_pos@Base 1.3.99.20101019 + ibus_lookup_table_get_label@Base 1.3.99.20101019 + ibus_lookup_table_get_number_of_candidates@Base 1.3.99.20101019 + ibus_lookup_table_get_orientation@Base 1.3.99.20101019 + ibus_lookup_table_get_page_size@Base 1.3.99.20101019 + ibus_lookup_table_get_type@Base 1.3.99.20101019 + ibus_lookup_table_is_cursor_visible@Base 1.3.99.20101019 + ibus_lookup_table_is_round@Base 1.3.99.20101019 + ibus_lookup_table_new@Base 1.3.99.20101019 + ibus_lookup_table_page_down@Base 1.3.99.20101019 + ibus_lookup_table_page_up@Base 1.3.99.20101019 + ibus_lookup_table_set_cursor_pos@Base 1.3.99.20101019 + ibus_lookup_table_set_cursor_visible@Base 1.3.99.20101019 + ibus_lookup_table_set_label@Base 1.3.99.20101019 + ibus_lookup_table_set_orientation@Base 1.3.99.20101019 + ibus_lookup_table_set_page_size@Base 1.3.99.20101019 + ibus_lookup_table_set_round@Base 1.3.99.20101019 + ibus_main@Base 1.3.99.20101019 + ibus_modifier_type_get_type@Base 1.3.99.20101019 + ibus_object_destroy@Base 1.3.99.20101019 + ibus_object_flags_get_type@Base 1.3.99.20101019 + ibus_object_get_type@Base 1.3.99.20101019 + ibus_object_new@Base 1.3.99.20101019 + ibus_observed_path_check_modification@Base 1.3.99.20101019 + ibus_observed_path_get_type@Base 1.3.99.20101019 + ibus_observed_path_new@Base 1.3.99.20101019 + ibus_observed_path_new_from_xml_node@Base 1.3.99.20101019 + ibus_observed_path_output@Base 1.3.99.20101019 + ibus_observed_path_traverse@Base 1.3.99.20101019 + ibus_orientation_get_type@Base 1.3.99.20101019 + ibus_panel_service_candidate_clicked@Base 1.3.99.20101019 + ibus_panel_service_cursor_down@Base 1.3.99.20101019 + ibus_panel_service_cursor_up@Base 1.3.99.20101019 + ibus_panel_service_get_type@Base 1.3.99.20101019 + ibus_panel_service_new@Base 1.3.99.20101019 + ibus_panel_service_page_down@Base 1.3.99.20101019 + ibus_panel_service_page_up@Base 1.3.99.20101019 + ibus_panel_service_property_activate@Base 1.3.99.20101019 + ibus_panel_service_property_hide@Base 1.3.99.20101019 + ibus_panel_service_property_show@Base 1.3.99.20101019 + ibus_preedit_focus_mode_get_type@Base 1.3.99.20101019 + ibus_prop_list_append@Base 1.3.99.20101019 + ibus_prop_list_get@Base 1.3.99.20101019 + ibus_prop_list_get_type@Base 1.3.99.20101019 + ibus_prop_list_new@Base 1.3.99.20101019 + ibus_prop_list_update_property@Base 1.3.99.20101019 + ibus_prop_state_get_type@Base 1.3.99.20101019 + ibus_prop_type_get_type@Base 1.3.99.20101019 + ibus_property_get_icon@Base 1.3.99.20110405 + ibus_property_get_key@Base 1.3.99.20110405 + ibus_property_get_label@Base 1.3.99.20110405 + ibus_property_get_prop_type@Base 1.3.99.20110405 + ibus_property_get_sensitive@Base 1.3.99.20110405 + ibus_property_get_state@Base 1.3.99.20110405 + ibus_property_get_sub_props@Base 1.3.99.20110405 + ibus_property_get_tooltip@Base 1.3.99.20110405 + ibus_property_get_type@Base 1.3.99.20101019 + ibus_property_get_visible@Base 1.3.99.20110405 + ibus_property_new@Base 1.3.99.20101019 + ibus_property_set_icon@Base 1.3.99.20101019 + ibus_property_set_label@Base 1.3.99.20101019 + ibus_property_set_sensitive@Base 1.3.99.20101019 + ibus_property_set_state@Base 1.3.99.20101019 + ibus_property_set_sub_props@Base 1.3.99.20101019 + ibus_property_set_tooltip@Base 1.3.99.20101019 + ibus_property_set_visible@Base 1.3.99.20101019 + ibus_property_update@Base 1.3.99.20101019 + ibus_proxy_destroy@Base 1.3.99.20101019 + ibus_proxy_get_type@Base 1.3.99.20101019 + ibus_quit@Base 1.3.99.20101019 + ibus_serializable_copy@Base 1.3.99.20101019 + ibus_serializable_deserialize@Base 1.3.99.20101019 + ibus_serializable_get_qattachment@Base 1.3.99.20101019 + ibus_serializable_get_type@Base 1.3.99.20101019 + ibus_serializable_new@Base 1.3.99.20101019 + ibus_serializable_remove_qattachment@Base 1.3.99.20101019 + ibus_serializable_serialize@Base 1.3.99.20101019 + ibus_serializable_set_qattachment@Base 1.3.99.20101019 + ibus_service_class_add_interfaces@Base 1.3.99.20101019 + ibus_service_emit_signal@Base 1.3.99.20101019 + ibus_service_get_connection@Base 1.3.99.20101019 + ibus_service_get_object_path@Base 1.3.99.20101019 + ibus_service_get_type@Base 1.3.99.20101019 + ibus_service_new@Base 1.3.99.20101019 + ibus_service_register@Base 1.3.99.20101019 + ibus_service_unregister@Base 1.3.99.20101019 + ibus_set_display@Base 1.3.99.20101019 + ibus_set_log_handler@Base 1.3.99.20101019 + ibus_text_append_attribute@Base 1.3.99.20101019 + ibus_text_get_attributes@Base 1.3.99.20110405 + ibus_text_get_is_static@Base 1.3.99.20110405 + ibus_text_get_length@Base 1.3.99.20101019 + ibus_text_get_text@Base 1.3.99.20110405 + ibus_text_get_type@Base 1.3.99.20101019 + ibus_text_new_from_printf@Base 1.3.99.20101019 + ibus_text_new_from_static_string@Base 1.3.99.20101019 + ibus_text_new_from_string@Base 1.3.99.20101019 + ibus_text_new_from_ucs4@Base 1.3.99.20101019 + ibus_text_new_from_unichar@Base 1.3.99.20101019 + ibus_write_address@Base 1.3.99.20101019 + ibus_xml_free@Base 1.3.99.20101019 + ibus_xml_output@Base 1.3.99.20101019 + ibus_xml_parse_buffer@Base 1.3.99.20101019 + ibus_xml_parse_file@Base 1.3.99.20101019 diff --git a/debian/libibus-dev.install b/debian/libibus-dev.install index 51e89e763..34eb19e8f 100644 --- a/debian/libibus-dev.install +++ b/debian/libibus-dev.install @@ -1,6 +1,6 @@ debian/tmp/usr/include/* -debian/tmp/usr/lib/libibus.so -debian/tmp/usr/lib/libibus.a +debian/tmp/usr/lib/libibus-*.so +debian/tmp/usr/lib/libibus-*.a debian/tmp/usr/lib/pkgconfig/* debian/tmp/usr/share/gir-1.0/* debian/tmp/usr/share/vala/vapi/* diff --git a/debian/libibus2.symbols b/debian/libibus2.symbols deleted file mode 100644 index c94c87177..000000000 --- a/debian/libibus2.symbols +++ /dev/null @@ -1,365 +0,0 @@ -libibus.so.2 libibus2 #MINVER# - ibus_attr_background_new@Base 1.2.99.20100202 - ibus_attr_foreground_new@Base 1.2.99.20100202 - ibus_attr_list_append@Base 1.2.99.20100202 - ibus_attr_list_get@Base 1.2.99.20100202 - ibus_attr_list_get_type@Base 1.2.99.20100202 - ibus_attr_list_new@Base 1.2.99.20100202 - ibus_attr_type_get_type@Base 1.2.99.20100202 - ibus_attr_underline_get_type@Base 1.2.99.20100202 - ibus_attr_underline_new@Base 1.2.99.20100202 - ibus_attribute_get_type@Base 1.2.99.20100202 - ibus_attribute_new@Base 1.2.99.20100202 - ibus_bus_add_match@Base 1.2.99.20100202 - ibus_bus_call@Base 1.3.5.20100705 - ibus_bus_call_with_reply@Base 1.3.5.20100705 - ibus_bus_call_with_reply_valist@Base 1.3.5.20100705 - ibus_bus_create_input_context@Base 1.2.99.20100202 - ibus_bus_current_input_context@Base 1.2.99.20100202 - ibus_bus_exit@Base 1.2.99.20100202 - ibus_bus_get_config@Base 1.2.99.20100202 - ibus_bus_get_connection@Base 1.2.99.20100202 - ibus_bus_get_global_engine@Base 1.3.5.20100705 - ibus_bus_get_name_owner@Base 1.2.99.20100202 - ibus_bus_get_type@Base 1.2.99.20100202 - ibus_bus_get_use_global_engine@Base 1.3.5.20100705 - ibus_bus_get_use_sys_layout@Base 1.3.5.20100705 - ibus_bus_hello@Base 1.2.99.20100202 - ibus_bus_is_connected@Base 1.2.99.20100202 - ibus_bus_is_global_engine_enabled@Base 1.3.5.20100705 - ibus_bus_list_active_engines@Base 1.2.99.20100202 - ibus_bus_list_engines@Base 1.2.99.20100202 - ibus_bus_list_names@Base 1.2.99.20100202 - ibus_bus_name_has_owner@Base 1.2.99.20100202 - ibus_bus_new@Base 1.2.99.20100202 - ibus_bus_register_component@Base 1.2.99.20100202 - ibus_bus_release_name@Base 1.2.99.20100202 - ibus_bus_remove_match@Base 1.2.99.20100202 - ibus_bus_request_name@Base 1.2.99.20100202 - ibus_bus_set_global_engine@Base 1.3.5.20100705 - ibus_bus_set_watch_dbus_signal@Base 1.2.99.20100202 - ibus_capabilite_get_type@Base 1.2.99.20100202 - ibus_component_add_engine@Base 1.2.99.20100202 - ibus_component_add_observed_path@Base 1.2.99.20100202 - ibus_component_check_modification@Base 1.2.99.20100202 - ibus_component_get_engines@Base 1.2.99.20100202 - ibus_component_get_from_engine@Base 1.2.99.20100202 - ibus_component_get_type@Base 1.2.99.20100202 - ibus_component_is_running@Base 1.2.99.20100202 - ibus_component_new@Base 1.2.99.20100202 - ibus_component_new_from_file@Base 1.2.99.20100202 - ibus_component_new_from_xml_node@Base 1.2.99.20100202 - ibus_component_output@Base 1.2.99.20100202 - ibus_component_output_engines@Base 1.2.99.20100202 - ibus_component_set_restart@Base 1.3.5.20100705 - ibus_component_start@Base 1.2.99.20100202 - ibus_component_stop@Base 1.2.99.20100202 - ibus_config_get_type@Base 1.2.99.20100202 - ibus_config_get_value@Base 1.2.99.20100202 - ibus_config_new@Base 1.2.99.20100202 - ibus_config_service_get_type@Base 1.2.99.20100202 - ibus_config_service_new@Base 1.2.99.20100202 - ibus_config_service_value_changed@Base 1.2.99.20100202 - ibus_config_set_value@Base 1.2.99.20100202 - ibus_config_unset@Base 1.2.99.20100202 - ibus_connection_call@Base 1.2.99.20100202 - ibus_connection_call_with_reply@Base 1.3.5.20100705 - ibus_connection_close@Base 1.2.99.20100202 - ibus_connection_flush@Base 1.2.99.20100202 - ibus_connection_get_connection@Base 1.2.99.20100202 - ibus_connection_get_type@Base 1.2.99.20100202 - ibus_connection_get_unix_user@Base 1.2.99.20100202 - ibus_connection_is_authenticated@Base 1.2.99.20100202 - ibus_connection_is_connected@Base 1.2.99.20100202 - ibus_connection_new@Base 1.2.99.20100202 - ibus_connection_open@Base 1.2.99.20100202 - ibus_connection_open_private@Base 1.2.99.20100202 - ibus_connection_read_write_dispatch@Base 1.2.99.20100202 - ibus_connection_register_object_path@Base 1.2.99.20100202 - ibus_connection_send@Base 1.2.99.20100202 - ibus_connection_send_signal@Base 1.2.99.20100202 - ibus_connection_send_signal_valist@Base 1.2.99.20100202 - ibus_connection_send_valist@Base 1.2.99.20100202 - ibus_connection_send_with_reply@Base 1.2.99.20100202 - ibus_connection_send_with_reply_and_block@Base 1.2.99.20100202 - ibus_connection_set_connection@Base 1.2.99.20100202 - ibus_connection_unregister_object_path@Base 1.2.99.20100202 - ibus_dbus_connection_setup@Base 1.2.99.20100202 - ibus_dbus_server_setup@Base 1.2.99.20100202 - ibus_engine_commit_text@Base 1.2.99.20100202 - ibus_engine_delete_surrounding_text@Base 1.2.99.20100202 - ibus_engine_desc_get_type@Base 1.2.99.20100202 - ibus_engine_desc_new@Base 1.2.99.20100202 - ibus_engine_desc_new_from_xml_node@Base 1.2.99.20100202 - ibus_engine_desc_output@Base 1.2.99.20100202 - ibus_engine_forward_key_event@Base 1.2.99.20100202 - ibus_engine_get_name@Base 1.2.99.20100202 - ibus_engine_get_type@Base 1.2.99.20100202 - ibus_engine_hide_auxiliary_text@Base 1.2.99.20100202 - ibus_engine_hide_lookup_table@Base 1.2.99.20100202 - ibus_engine_hide_preedit_text@Base 1.2.99.20100202 - ibus_engine_new@Base 1.2.99.20100202 - ibus_engine_register_properties@Base 1.2.99.20100202 - ibus_engine_show_auxiliary_text@Base 1.2.99.20100202 - ibus_engine_show_lookup_table@Base 1.2.99.20100202 - ibus_engine_show_preedit_text@Base 1.2.99.20100202 - ibus_engine_update_auxiliary_text@Base 1.2.99.20100202 - ibus_engine_update_lookup_table@Base 1.2.99.20100202 - ibus_engine_update_lookup_table_fast@Base 1.2.99.20100202 - ibus_engine_update_preedit_text@Base 1.2.99.20100202 - ibus_engine_update_preedit_text_with_mode@Base 1.3.0 - ibus_engine_update_property@Base 1.2.99.20100202 - ibus_error_free@Base 1.2.99.20100202 - ibus_error_new@Base 1.2.99.20100202 - ibus_error_new_from_message@Base 1.2.99.20100202 - ibus_error_new_from_printf@Base 1.2.99.20100202 - ibus_error_new_from_text@Base 1.2.99.20100202 - ibus_factory_add_engine@Base 1.2.99.20100202 - ibus_factory_get_type@Base 1.2.99.20100202 - ibus_factory_new@Base 1.2.99.20100202 - ibus_free_strv@Base 1.2.99.20100202 - ibus_get_address@Base 1.2.99.20100202 - ibus_get_daemon_uid@Base 1.2.99.20100202 - ibus_get_local_machine_id@Base 1.2.99.20100202 - ibus_get_session_id@Base 1.2.99.20100202 - ibus_get_socket_path@Base 1.2.99.20100202 - ibus_get_user_name@Base 1.2.99.20100202 - ibus_hotkey_get_type@Base 1.2.99.20100202 - ibus_hotkey_profile_add_hotkey@Base 1.2.99.20100202 - ibus_hotkey_profile_add_hotkey_from_string@Base 1.2.99.20100202 - ibus_hotkey_profile_filter_key_event@Base 1.2.99.20100202 - ibus_hotkey_profile_get_type@Base 1.2.99.20100202 - ibus_hotkey_profile_new@Base 1.2.99.20100202 - ibus_hotkey_profile_remove_hotkey@Base 1.2.99.20100202 - ibus_hotkey_profile_remove_hotkey_by_event@Base 1.2.99.20100202 - ibus_init@Base 1.2.99.20100202 - ibus_input_context_cursor_down@Base 1.2.99.20100202 - ibus_input_context_cursor_up@Base 1.2.99.20100202 - ibus_input_context_disable@Base 1.2.99.20100202 - ibus_input_context_enable@Base 1.2.99.20100202 - ibus_input_context_focus_in@Base 1.2.99.20100202 - ibus_input_context_focus_out@Base 1.2.99.20100202 - ibus_input_context_get_engine@Base 1.2.99.20100202 - ibus_input_context_get_input_context@Base 1.2.99.20100202 - ibus_input_context_get_type@Base 1.2.99.20100202 - ibus_input_context_is_enabled@Base 1.2.99.20100202 - ibus_input_context_new@Base 1.2.99.20100202 - ibus_input_context_page_down@Base 1.2.99.20100202 - ibus_input_context_page_up@Base 1.2.99.20100202 - ibus_input_context_process_key_event@Base 1.2.99.20100202 - ibus_input_context_property_activate@Base 1.2.99.20100202 - ibus_input_context_property_hide@Base 1.2.99.20100202 - ibus_input_context_property_show@Base 1.2.99.20100202 - ibus_input_context_reset@Base 1.2.99.20100202 - ibus_input_context_set_capabilities@Base 1.2.99.20100202 - ibus_input_context_set_cursor_location@Base 1.2.99.20100202 - ibus_input_context_set_engine@Base 1.2.99.20100202 - ibus_key_event_from_string@Base 1.2.99.20100202 - ibus_key_event_to_string@Base 1.2.99.20100202 - ibus_keymap_fill@Base 1.2.99.20100202 - ibus_keymap_get@Base 1.2.99.20100202 - ibus_keymap_get_type@Base 1.2.99.20100202 - ibus_keymap_lookup_keysym@Base 1.2.99.20100202 - ibus_keymap_new@Base 1.2.99.20100202 - ibus_keyval_from_name@Base 1.2.99.20100202 - ibus_keyval_name@Base 1.2.99.20100202 - ibus_lookup_table_append_candidate@Base 1.2.99.20100202 - ibus_lookup_table_append_label@Base 1.2.99.20100202 - ibus_lookup_table_clear@Base 1.2.99.20100202 - ibus_lookup_table_cursor_down@Base 1.2.99.20100202 - ibus_lookup_table_cursor_up@Base 1.2.99.20100202 - ibus_lookup_table_get_candidate@Base 1.2.99.20100202 - ibus_lookup_table_get_cursor_in_page@Base 1.2.99.20100202 - ibus_lookup_table_get_cursor_pos@Base 1.2.99.20100202 - ibus_lookup_table_get_label@Base 1.2.99.20100202 - ibus_lookup_table_get_number_of_candidates@Base 1.2.99.20100202 - ibus_lookup_table_get_orientation@Base 1.2.99.20100202 - ibus_lookup_table_get_page_size@Base 1.2.99.20100202 - ibus_lookup_table_get_type@Base 1.2.99.20100202 - ibus_lookup_table_is_cursor_visible@Base 1.2.99.20100202 - ibus_lookup_table_is_round@Base 1.2.99.20100202 - ibus_lookup_table_new@Base 1.2.99.20100202 - ibus_lookup_table_page_down@Base 1.2.99.20100202 - ibus_lookup_table_page_up@Base 1.2.99.20100202 - ibus_lookup_table_set_cursor_pos@Base 1.2.99.20100202 - ibus_lookup_table_set_cursor_visible@Base 1.2.99.20100202 - ibus_lookup_table_set_label@Base 1.3.5.20100705 - ibus_lookup_table_set_orientation@Base 1.2.99.20100202 - ibus_lookup_table_set_page_size@Base 1.2.99.20100202 - ibus_lookup_table_set_round@Base 1.2.99.20100202 - ibus_main@Base 1.2.99.20100202 - ibus_mainloop_setup@Base 1.2.99.20100202 - ibus_marshal_BOOLEAN__POINTER@Base 1.2.99.20100202 - ibus_marshal_BOOLEAN__POINTER_POINTER@Base 1.2.99.20100202 - ibus_marshal_BOOLEAN__UINT_UINT@Base 1.2.99.20100202 - ibus_marshal_BOOLEAN__UINT_UINT_UINT@Base 1.2.99.20100202 - ibus_marshal_BOOLEAN__ULONG@Base 1.2.99.20100202 - ibus_marshal_VOID__BOXED_BOOLEAN@Base 1.2.99.20100202 - ibus_marshal_VOID__INT_INT_INT_INT@Base 1.2.99.20100202 - ibus_marshal_VOID__INT_UINT@Base 1.2.99.20100202 - ibus_marshal_VOID__OBJECT_BOOLEAN@Base 1.2.99.20100202 - ibus_marshal_VOID__OBJECT_UINT_BOOLEAN@Base 1.2.99.20100202 - ibus_marshal_VOID__OBJECT_UINT_BOOLEAN_UINT@Base 1.3.5.20100705 - ibus_marshal_VOID__STRING_INT@Base 1.2.99.20100202 - ibus_marshal_VOID__STRING_STRING_BOXED@Base 1.2.99.20100202 - ibus_marshal_VOID__STRING_STRING_STRING@Base 1.2.99.20100202 - ibus_marshal_VOID__STRING_UINT@Base 1.2.99.20100202 - ibus_marshal_VOID__UINT_UINT@Base 1.2.99.20100202 - ibus_marshal_VOID__UINT_UINT_UINT@Base 1.2.99.20100202 - ibus_message_append_args@Base 1.2.99.20100202 - ibus_message_append_args_valist@Base 1.2.99.20100202 - ibus_message_get_args@Base 1.2.99.20100202 - ibus_message_get_args_valist@Base 1.2.99.20100202 - ibus_message_get_destination@Base 1.2.99.20100202 - ibus_message_get_error_message@Base 1.2.99.20100202 - ibus_message_get_error_name@Base 1.2.99.20100202 - ibus_message_get_interface@Base 1.2.99.20100202 - ibus_message_get_member@Base 1.2.99.20100202 - ibus_message_get_no_reply@Base 1.2.99.20100202 - ibus_message_get_path@Base 1.2.99.20100202 - ibus_message_get_reply_serial@Base 1.2.99.20100202 - ibus_message_get_sender@Base 1.2.99.20100202 - ibus_message_get_serial@Base 1.2.99.20100202 - ibus_message_get_type@Base 1.2.99.20100202 - ibus_message_is_error@Base 1.2.99.20100202 - ibus_message_is_method_call@Base 1.2.99.20100202 - ibus_message_is_signal@Base 1.2.99.20100202 - ibus_message_iter_append@Base 1.2.99.20100202 - ibus_message_iter_close_container@Base 1.2.99.20100202 - ibus_message_iter_copy_data@Base 1.2.99.20100202 - ibus_message_iter_get@Base 1.2.99.20100202 - ibus_message_iter_get_arg_type@Base 1.2.99.20100202 - ibus_message_iter_get_basic@Base 1.2.99.20100202 - ibus_message_iter_get_element_type@Base 1.2.99.20100202 - ibus_message_iter_has_next@Base 1.2.99.20100202 - ibus_message_iter_init@Base 1.2.99.20100202 - ibus_message_iter_init_append@Base 1.2.99.20100202 - ibus_message_iter_next@Base 1.2.99.20100202 - ibus_message_iter_open_container@Base 1.2.99.20100202 - ibus_message_iter_recurse@Base 1.2.99.20100202 - ibus_message_new@Base 1.2.99.20100202 - ibus_message_new_error@Base 1.2.99.20100202 - ibus_message_new_error_printf@Base 1.2.99.20100202 - ibus_message_new_method_call@Base 1.2.99.20100202 - ibus_message_new_method_return@Base 1.2.99.20100202 - ibus_message_new_signal@Base 1.2.99.20100202 - ibus_message_ref@Base 1.2.99.20100202 - ibus_message_set_destination@Base 1.2.99.20100202 - ibus_message_set_error_name@Base 1.2.99.20100202 - ibus_message_set_interface@Base 1.2.99.20100202 - ibus_message_set_member@Base 1.2.99.20100202 - ibus_message_set_no_reply@Base 1.2.99.20100202 - ibus_message_set_path@Base 1.2.99.20100202 - ibus_message_set_reply_serial@Base 1.2.99.20100202 - ibus_message_set_sender@Base 1.2.99.20100202 - ibus_message_to_string@Base 1.2.99.20100202 - ibus_message_unref@Base 1.2.99.20100202 - ibus_modifier_type_get_type@Base 1.2.99.20100202 - ibus_object_destroy@Base 1.2.99.20100202 - ibus_object_flags_get_type@Base 1.2.99.20100202 - ibus_object_get_type@Base 1.2.99.20100202 - ibus_object_new@Base 1.2.99.20100202 - ibus_observed_path_check_modification@Base 1.2.99.20100202 - ibus_observed_path_get_type@Base 1.2.99.20100202 - ibus_observed_path_new@Base 1.2.99.20100202 - ibus_observed_path_new_from_xml_node@Base 1.2.99.20100202 - ibus_observed_path_output@Base 1.2.99.20100202 - ibus_observed_path_traverse@Base 1.2.99.20100202 - ibus_orientation_get_type@Base 1.2.99.20100202 - ibus_panel_service_candidate_clicked@Base 1.2.99.20100202 - ibus_panel_service_cursor_down@Base 1.2.99.20100202 - ibus_panel_service_cursor_up@Base 1.2.99.20100202 - ibus_panel_service_get_type@Base 1.2.99.20100202 - ibus_panel_service_new@Base 1.2.99.20100202 - ibus_panel_service_page_down@Base 1.2.99.20100202 - ibus_panel_service_page_up@Base 1.2.99.20100202 - ibus_panel_service_property_active@Base 1.2.99.20100202 - ibus_panel_service_property_hide@Base 1.2.99.20100202 - ibus_panel_service_property_show@Base 1.2.99.20100202 - ibus_pending_call_allocate_data_slot@Base 1.2.99.20100202 - ibus_pending_call_block@Base 1.2.99.20100202 - ibus_pending_call_cancel@Base 1.2.99.20100202 - ibus_pending_call_free_data_slot@Base 1.2.99.20100202 - ibus_pending_call_get_completed@Base 1.2.99.20100202 - ibus_pending_call_get_data@Base 1.2.99.20100202 - ibus_pending_call_ref@Base 1.2.99.20100202 - ibus_pending_call_set_data@Base 1.2.99.20100202 - ibus_pending_call_set_notify@Base 1.2.99.20100202 - ibus_pending_call_steal_reply@Base 1.2.99.20100202 - ibus_pending_call_unref@Base 1.2.99.20100202 - ibus_pending_call_wait@Base 1.2.99.20100202 - ibus_preedit_focus_mode_get_type@Base 1.3.0 - ibus_prop_list_append@Base 1.2.99.20100202 - ibus_prop_list_get@Base 1.2.99.20100202 - ibus_prop_list_get_type@Base 1.2.99.20100202 - ibus_prop_list_new@Base 1.2.99.20100202 - ibus_prop_list_update_property@Base 1.2.99.20100202 - ibus_prop_state_get_type@Base 1.2.99.20100202 - ibus_prop_type_get_type@Base 1.2.99.20100202 - ibus_property_get_type@Base 1.2.99.20100202 - ibus_property_new@Base 1.2.99.20100202 - ibus_property_set_icon@Base 1.2.99.20100202 - ibus_property_set_label@Base 1.2.99.20100202 - ibus_property_set_sensitive@Base 1.2.99.20100202 - ibus_property_set_state@Base 1.2.99.20100202 - ibus_property_set_sub_props@Base 1.2.99.20100202 - ibus_property_set_tooltip@Base 1.2.99.20100202 - ibus_property_set_visible@Base 1.2.99.20100202 - ibus_property_update@Base 1.2.99.20100202 - ibus_proxy_call@Base 1.2.99.20100202 - ibus_proxy_call_with_reply@Base 1.2.99.20100202 - ibus_proxy_call_with_reply_and_block@Base 1.2.99.20100202 - ibus_proxy_get_connection@Base 1.2.99.20100202 - ibus_proxy_get_interface@Base 1.2.99.20100202 - ibus_proxy_get_name@Base 1.2.99.20100202 - ibus_proxy_get_path@Base 1.2.99.20100202 - ibus_proxy_get_type@Base 1.2.99.20100202 - ibus_proxy_get_unique_name@Base 1.2.99.20100202 - ibus_proxy_handle_signal@Base 1.2.99.20100202 - ibus_proxy_new@Base 1.2.99.20100202 - ibus_proxy_send@Base 1.2.99.20100202 - ibus_quit@Base 1.2.99.20100202 - ibus_serializable_copy@Base 1.2.99.20100202 - ibus_serializable_deserialize@Base 1.2.99.20100202 - ibus_serializable_get_qattachment@Base 1.2.99.20100202 - ibus_serializable_get_type@Base 1.2.99.20100202 - ibus_serializable_new@Base 1.2.99.20100202 - ibus_serializable_remove_qattachment@Base 1.2.99.20100202 - ibus_serializable_serialize@Base 1.2.99.20100202 - ibus_serializable_set_qattachment@Base 1.2.99.20100202 - ibus_server_disconnect@Base 1.2.99.20100202 - ibus_server_get_address@Base 1.2.99.20100202 - ibus_server_get_id@Base 1.2.99.20100202 - ibus_server_get_type@Base 1.2.99.20100202 - ibus_server_is_connected@Base 1.2.99.20100202 - ibus_server_listen@Base 1.2.99.20100202 - ibus_server_new@Base 1.2.99.20100202 - ibus_server_set_auth_mechanisms@Base 1.2.99.20100202 - ibus_service_add_to_connection@Base 1.2.99.20100202 - ibus_service_get_connections@Base 1.2.99.20100202 - ibus_service_get_path@Base 1.2.99.20100202 - ibus_service_get_type@Base 1.2.99.20100202 - ibus_service_handle_message@Base 1.2.99.20100202 - ibus_service_new@Base 1.2.99.20100202 - ibus_service_remove_from_all_connections@Base 1.2.99.20100202 - ibus_service_remove_from_connection@Base 1.2.99.20100202 - ibus_service_send_signal@Base 1.2.99.20100202 - ibus_set_display@Base 1.2.99.20100202 - ibus_text_append_attribute@Base 1.2.99.20100202 - ibus_text_get_length@Base 1.2.99.20100202 - ibus_text_get_type@Base 1.2.99.20100202 - ibus_text_new_from_printf@Base 1.2.99.20100202 - ibus_text_new_from_static_string@Base 1.2.99.20100202 - ibus_text_new_from_string@Base 1.2.99.20100202 - ibus_text_new_from_ucs4@Base 1.2.99.20100202 - ibus_text_new_from_unichar@Base 1.2.99.20100202 - ibus_type_get_array@Base 1.2.99.20100202 - ibus_type_get_dict_entry@Base 1.2.99.20100202 - ibus_type_get_object_path@Base 1.2.99.20100202 - ibus_type_get_struct@Base 1.2.99.20100202 - ibus_type_get_variant@Base 1.2.99.20100202 - ibus_write_address@Base 1.2.99.20100202 - ibus_xml_free@Base 1.2.99.20100202 - ibus_xml_output@Base 1.3.5.20100705 - ibus_xml_parse_buffer@Base 1.2.99.20100202 - ibus_xml_parse_file@Base 1.2.99.20100202 diff --git a/debian/rules b/debian/rules index a8b88360a..a3bc5f107 100755 --- a/debian/rules +++ b/debian/rules @@ -6,23 +6,33 @@ build: patch ln -sf /usr/share/misc/config.sub config.sub ln -sf /usr/share/misc/config.guess config.guess dh $@ --before auto_configure - dh_auto_configure -- --enable-static LDFLAGS="-Wl,--as-needed" + dh_auto_configure -- \ + --enable-gtk3 \ + --enable-static \ + --enable-surrounding-text \ + --enable-gtk-doc \ + --with-panel-icon-keyboard=ibus-keyboard \ + LDFLAGS="-Wl,--as-needed" dh $@ --before auto_test - cd po; make ibus.pot # https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/188690 + cd po; make ibus10.pot # https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/188690 dh $@ --after auto_test install: dh $@ --until auto_install - rm -rf $(CURDIR)/debian/tmp/usr/lib/libibus.la \ + rm -rf $(CURDIR)/debian/tmp/usr/lib/libibus*.la \ $(CURDIR)/debian/tmp/usr/lib/gtk-2.0/2.10.0/immodules/im-ibus.a \ $(CURDIR)/debian/tmp/usr/lib/gtk-2.0/2.10.0/immodules/im-ibus.la \ + $(CURDIR)/debian/tmp/usr/lib/gtk-3.0/3.0.0/immodules/im-ibus.a \ + $(CURDIR)/debian/tmp/usr/lib/gtk-3.0/3.0.0/immodules/im-ibus.la \ $(CURDIR)/debian/tmp/etc/xdg \ $(CURDIR)/debian/tmp/usr/share/applications/ibus.desktop dh_install --list-missing --fail-missing dh_installdocs # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552293 dh $@ --after installdocs - LD_LIBRARY_PATH=debian/libibus2/usr/lib:$(LD_LIBRARY_PATH) \ - dh_gtkmodules -p ibus-gtk -s + LD_LIBRARY_PATH=debian/libibus-1.0-0/usr/lib:$(LD_LIBRARY_PATH) \ + dh_gtkmodules -p ibus-gtk2 -s + LD_LIBRARY_PATH=debian/libibus-1.0-0/usr/lib:$(LD_LIBRARY_PATH) \ + dh_gtkmodules -p ibus-gtk3 -s install-stamp: install touch $@ @@ -37,7 +47,8 @@ binary-indep: install-stamp binary-arch: install-stamp dh_strip -s - dh_makeshlibs -Nibus-gtk -s + dh_makeshlibs -Nibus-gtk2 -s + dh_makeshlibs -Nibus-gtk3 -s dh_shlibdeps -s dh_installdeb -s dh_gencontrol -s diff --git a/debian/xinput/ibus b/debian/xinput/ibus index 229686463..12069462a 100644 --- a/debian/xinput/ibus +++ b/debian/xinput/ibus @@ -12,5 +12,5 @@ if [ -e /usr/lib/qt4/plugins/inputmethods/libqtim-ibus.so ]; then else QT_IM_MODULE=xim fi -DEPENDS="ibus, ibus-gtk|ibus-qt4" +DEPENDS="ibus, ibus-gtk2, ibus-gtk3|ibus-qt4" # vim:ft=sh: diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index c4ba32c3f..000000000 --- a/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -trim-build.stamp diff --git a/docs/Makefile.am b/docs/Makefile.am index 71ed95318..962d37dd8 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -23,3 +23,5 @@ SUBDIRS = \ reference \ $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index 95f497319..050c78d2f 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -23,3 +23,5 @@ SUBDIRS = \ ibus \ $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/docs/reference/ibus/.gitignore b/docs/reference/ibus/.gitignore deleted file mode 100644 index e5c6e9d41..000000000 --- a/docs/reference/ibus/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -ibus-decl-list.txt -ibus-decl.txt -ibus-overrides.txt -ibus-undeclared.txt -ibus-undocumented.txt -ibus-unused.txt -ibus-sections.txt.old -html -tmpl -xml -html-build.stamp -html.stamp -ibus.args -ibus.hierarchy -ibus.interfaces -ibus.prerequisites -ibus.signals -scan-build.stamp -sgml-build.stamp -sgml.stamp -tmpl-build.stamp -tmpl.stamp - diff --git a/docs/reference/ibus/Makefile.am b/docs/reference/ibus/Makefile.am index 288e34df1..75e3815ec 100644 --- a/docs/reference/ibus/Makefile.am +++ b/docs/reference/ibus/Makefile.am @@ -25,11 +25,11 @@ SCANGOBJ_OPTIONS= # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" -# SCAN_OPTIONS= --rebuild-sections +SCAN_OPTIONS= --rebuild-sections # Extra options to supply to gtkdoc-mkdb. -# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml -MKDB_OPTIONS=--sgml-mode --output-format=xml +# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml +MKDB_OPTIONS=--xml-mode --output-format=xml # Extra options to supply to gtkdoc-mktmpl # e.g. MKTMPL_OPTIONS=--only-section-tmpl @@ -45,7 +45,7 @@ FIXXREF_OPTIONS= HFILE_GLOB=$(top_srcdir)/src/*.h CFILE_GLOB=$(top_srcdir)/src/*.c -# Header files to ignore when scanning. +# Header files to ignore when scanning. Use base file/dir names # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h IGNORE_HFILES= \ ibusconfigprivate.h \ @@ -71,30 +71,25 @@ content_files= # e.g. expand_content_files=running.sgml expand_content_files= -CFLAGS= \ +# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. +# Only needed if you are using gtkdoc-scangobj to dynamically query widget +# signals and properties. +# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) +# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) +GTKDOC_CFLAGS= \ @GLIB2_CFLAGS@ \ @GOBJECT2_CFLAGS@ \ @GIO2_CFLAGS@ \ @DBUS_CFLAGS@ \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ $(NULL) -LDFLAGS= \ +GTKDOC_LIBS= \ @GLIB2_LIBS@ \ @GOBJECT2_LIBS@ \ @GIO2_LIBS@ \ @DBUS_LIBS@ \ - $(NULL) - -# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library. -# Only needed if you are using gtkdoc-scangobj to dynamically query widget -# signals and properties. -# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) -# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) -INCLUDES = \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src \ - $(NULL) -GTKDOC_LIBS = \ - $(top_builddir)/src/libibus.la \ + $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la \ $(NULL) # This includes the standard gtk-doc make rules, copied by gtkdocize. @@ -102,26 +97,28 @@ include $(top_srcdir)/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in -EXTRA_DIST += +EXTRA_DIST += trim.sed # Files not to distribute # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types # for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt DISTCLEANFILES = $(DOC_MODULE)-sections.txt -# Comment this out if you want your docs-status tested during 'make check' +# Comment this out if you want 'make check' to test you doc status +# and run some sanity checks +if ENABLE_GTK_DOC +TESTS_ENVIRONMENT = cd $(srcdir) && \ + DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ + SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) #TESTS = $(GTKDOC_CHECK) +endif trim-build.stamp: scan-build.stamp $(AM_V_GEN) \ - sed " \ - /IBusObjectFlags/d;\ - /IBUS_OBJECT_FLAGS/d;\ - /IBUS_OBJECT_SET_FLAGS/d;\ - /IBUS_OBJECT_UNSET_FLAGS/d" \ - -i.bak $(srcdir)/$(DOC_MODULE)-sections.txt - $(RM) $(srcdir)/$(DOC_MODULE)-sections.txt.bak - touch trim-build.stamp + $(SED) -f $(srcdir)/trim.sed -i.bak \ + $(builddir)/$(DOC_MODULE)-sections.txt && \ + $(RM) $(builddir)/$(DOC_MODULE)-sections.txt.bak && \ + touch trim-build.stamp tmpl-build.stamp: trim-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-overrides.txt @@ -130,3 +127,4 @@ tmpl-build.stamp: trim-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DO CLEANFILES+= *.stamp +-include $(top_srcdir)/git.mk diff --git a/docs/reference/ibus/ibus-sections.txt b/docs/reference/ibus/ibus-sections.txt deleted file mode 100644 index a5a622579..000000000 --- a/docs/reference/ibus/ibus-sections.txt +++ /dev/null @@ -1,2756 +0,0 @@ -
-ibusproplist -IBusPropList -IBusPropList -IBusPropListClass -ibus_prop_list_new -ibus_prop_list_append -ibus_prop_list_get -ibus_prop_list_update_property - -IBUS_PROP_LIST -IBUS_IS_PROP_LIST -IBUS_TYPE_PROP_LIST -ibus_prop_list_get_type -IBUS_PROP_LIST_CLASS -IBUS_IS_PROP_LIST_CLASS -IBUS_PROP_LIST_GET_CLASS -
- -
-ibusconfig -IBusConfig -IBusConfig -IBusConfigClass -ibus_config_new -ibus_config_get_value -ibus_config_set_value -ibus_config_unset - -IBUS_CONFIG -IBUS_IS_CONFIG -IBUS_TYPE_CONFIG -ibus_config_get_type -IBUS_CONFIG_CLASS -IBUS_IS_CONFIG_CLASS -IBUS_CONFIG_GET_CLASS -
- -
-ibusobject -IBusObject -IBUS_OBJECT_DESTROYED -IBusObject -IBusObjectClass -ibus_object_new -ibus_object_destroy - -IBUS_OBJECT -IBUS_IS_OBJECT -IBUS_TYPE_OBJECT -ibus_object_get_type -IBUS_OBJECT_CLASS -IBUS_IS_OBJECT_CLASS -IBUS_OBJECT_GET_CLASS -
- -
-ibusbus -IBusBus -IBusBus -IBusBusClass -ibus_bus_new -ibus_bus_is_connected -ibus_bus_hello -ibus_bus_request_name -ibus_bus_release_name -ibus_bus_name_has_owner -ibus_bus_list_names -ibus_bus_add_match -ibus_bus_remove_match -ibus_bus_get_name_owner -ibus_bus_exit -ibus_bus_current_input_context -ibus_bus_register_component -ibus_bus_list_engines -ibus_bus_list_active_engines -ibus_bus_get_use_sys_layout -ibus_bus_get_use_global_engine -ibus_bus_is_global_engine_enabled -ibus_bus_set_global_engine -ibus_bus_get_config - -IBUS_BUS -IBUS_IS_BUS -IBUS_TYPE_BUS -ibus_bus_get_type -IBUS_BUS_CLASS -IBUS_IS_BUS_CLASS -IBUS_BUS_GET_CLASS -
- -
-ibuscomponent -IBusComponent -IBusComponent -IBusComponentClass -ibus_component_new -ibus_component_new_from_xml_node -ibus_component_new_from_file -ibus_component_add_observed_path -ibus_component_add_engine -ibus_component_get_engines -ibus_component_output -ibus_component_output_engines -ibus_component_check_modification -ibus_component_start -ibus_component_stop -ibus_component_is_running -ibus_component_get_from_engine -ibus_component_set_restart - -IBUS_COMPONENT -IBUS_IS_COMPONENT -IBUS_TYPE_COMPONENT -ibus_component_get_type -IBUS_COMPONENT_CLASS -IBUS_IS_COMPONENT_CLASS -IBUS_COMPONENT_GET_CLASS -
- -
-ibusservice -IBusService -IBusService -IBusServiceClass -ServiceIBusMessageFunc -ServiceIBusSignalFunc -ibus_service_new -ibus_service_get_path -ibus_service_handle_message -ibus_service_add_to_connection -ibus_service_get_connections -ibus_service_remove_from_connection -ibus_service_remove_from_all_connections -ibus_service_send_signal - -IBUS_SERVICE -IBUS_IS_SERVICE -IBUS_TYPE_SERVICE -ibus_service_get_type -IBUS_SERVICE_CLASS -IBUS_IS_SERVICE_CLASS -IBUS_SERVICE_GET_CLASS -
- -
-ibusenginedesc -IBusEngineDesc -IBusEngineDesc -IBusEngineDescClass -BusComponent -ibus_engine_desc_new -ibus_engine_desc_new_from_xml_node -ibus_engine_desc_output - -IBUS_ENGINE_DESC -IBUS_IS_ENGINE_DESC -IBUS_TYPE_ENGINE_DESC -ibus_engine_desc_get_type -IBUS_ENGINE_DESC_CLASS -IBUS_IS_ENGINE_DESC_CLASS -IBUS_ENGINE_DESC_GET_CLASS -
- -
-ibusobservedpath -IBusObservedPath -IBusObservedPath -IBusObservedPathClass -ibus_observed_path_new_from_xml_node -ibus_observed_path_new -ibus_observed_path_traverse -ibus_observed_path_check_modification -ibus_observed_path_output - -IBUS_OBSERVED_PATH -IBUS_IS_OBSERVED_PATH -IBUS_TYPE_OBSERVED_PATH -ibus_observed_path_get_type -IBUS_OBSERVED_PATH_CLASS -IBUS_IS_OBSERVED_PATH_CLASS -IBUS_OBSERVED_PATH_GET_CLASS -
- -
-ibusserializable -IBusSerializable -ibus_serializable_set_attachment -ibus_serializable_get_attachment -ibus_serializable_remove_attachment -IBusSerializable -IBusSerializableClass -IBusSerializableSerializeFunc -IBusSerializableDeserializeFunc -IBusSerializableCopyFunc -ibus_serializable_new -ibus_serializable_set_qattachment -ibus_serializable_get_qattachment -ibus_serializable_remove_qattachment -ibus_serializable_copy -ibus_serializable_serialize -ibus_serializable_deserialize - -IBUS_SERIALIZABLE -IBUS_IS_SERIALIZABLE -IBUS_TYPE_SERIALIZABLE -ibus_serializable_get_type -IBUS_SERIALIZABLE_CLASS -IBUS_IS_SERIALIZABLE_CLASS -IBUS_SERIALIZABLE_GET_CLASS -
- -
-ibusconnection -IBusConnection -IBusConnection -IBusConnectionClass -IBusIBusMessageFunc -IBusIBusSignalFunc -IBusMessageFunc -ibus_connection_new -ibus_connection_set_connection -ibus_connection_open -ibus_connection_open_private -ibus_connection_close -ibus_connection_is_connected -ibus_connection_is_authenticated -ibus_connection_get_connection -ibus_connection_get_unix_user -ibus_connection_read_write_dispatch -ibus_connection_send -ibus_connection_send_signal -ibus_connection_send_signal_valist -ibus_connection_send_valist -ibus_connection_send_with_reply -ibus_connection_send_with_reply_and_block -ibus_connection_call -ibus_connection_call_with_reply -ibus_connection_flush -ibus_connection_register_object_path -ibus_connection_unregister_object_path - -IBUS_CONNECTION -IBUS_IS_CONNECTION -IBUS_TYPE_CONNECTION -ibus_connection_get_type -IBUS_CONNECTION_CLASS -IBUS_IS_CONNECTION_CLASS -IBUS_CONNECTION_GET_CLASS -
- -
-ibuslookuptable -IBusLookupTable -IBusLookupTable -IBusLookupTableClass -ibus_lookup_table_new -ibus_lookup_table_append_candidate -ibus_lookup_table_get_number_of_candidates -ibus_lookup_table_get_candidate -ibus_lookup_table_append_label -ibus_lookup_table_set_label -ibus_lookup_table_get_label -ibus_lookup_table_set_cursor_pos -ibus_lookup_table_get_cursor_pos -ibus_lookup_table_set_cursor_visible -ibus_lookup_table_is_cursor_visible -ibus_lookup_table_get_cursor_in_page -ibus_lookup_table_set_page_size -ibus_lookup_table_get_page_size -ibus_lookup_table_set_round -ibus_lookup_table_is_round -ibus_lookup_table_set_orientation -ibus_lookup_table_get_orientation -ibus_lookup_table_clear -ibus_lookup_table_page_up -ibus_lookup_table_page_down -ibus_lookup_table_cursor_up -ibus_lookup_table_cursor_down - -IBUS_LOOKUP_TABLE -IBUS_IS_LOOKUP_TABLE -IBUS_TYPE_LOOKUP_TABLE -ibus_lookup_table_get_type -IBUS_LOOKUP_TABLE_CLASS -IBUS_IS_LOOKUP_TABLE_CLASS -IBUS_LOOKUP_TABLE_GET_CLASS -
- -
-ibushotkey -IBusHotkeyProfile -IBusHotkeyProfile -IBusHotkeyProfileClass -ibus_hotkey_profile_add_hotkey -ibus_hotkey_profile_add_hotkey_from_string -ibus_hotkey_profile_remove_hotkey -ibus_hotkey_profile_remove_hotkey_by_event -ibus_hotkey_profile_filter_key_event - -IBUS_HOTKEY_PROFILE -IBUS_IS_HOTKEY_PROFILE -IBUS_TYPE_HOTKEY_PROFILE -ibus_hotkey_profile_get_type -IBUS_HOTKEY_PROFILE_CLASS -IBUS_IS_HOTKEY_PROFILE_CLASS -IBUS_HOTKEY_PROFILE_GET_CLASS -
- -
-ibusattrlist -IBusAttrList -IBusAttrList -IBusAttrListClass -ibus_attr_list_new -ibus_attr_list_append -ibus_attr_list_get - -IBUS_ATTR_LIST -IBUS_IS_ATTR_LIST -IBUS_TYPE_ATTR_LIST -ibus_attr_list_get_type -IBUS_ATTR_LIST_CLASS -IBUS_IS_ATTR_LIST_CLASS -IBUS_ATTR_LIST_GET_CLASS -
- -
-ibuskeymap -IBusKeymap -IBusKeymap -IBusKeymapClass -ibus_keymap_new -ibus_keymap_get -ibus_keymap_lookup_keysym - -IBUS_KEYMAP -IBUS_IS_KEYMAP -IBUS_TYPE_KEYMAP -ibus_keymap_get_type -IBUS_KEYMAP_CLASS -IBUS_IS_KEYMAP_CLASS -IBUS_KEYMAP_GET_CLASS -
- -
-ibusattribute -IBusAttribute -IBusAttrType -IBusAttrUnderline -IBusAttribute -IBusAttributeClass -ibus_attribute_new -ibus_attr_underline_new -ibus_attr_foreground_new -ibus_attr_background_new - -IBUS_ATTRIBUTE -IBUS_IS_ATTRIBUTE -IBUS_TYPE_ATTRIBUTE -ibus_attribute_get_type -IBUS_ATTRIBUTE_CLASS -IBUS_IS_ATTRIBUTE_CLASS -IBUS_ATTRIBUTE_GET_CLASS -
- -
-ibuspanelservice -IBusPanelService -IBusPanelService -IBusPanelServiceClass -ibus_panel_service_new -ibus_panel_service_candidate_clicked -ibus_panel_service_cursor_down -ibus_panel_service_cursor_up -ibus_panel_service_page_down -ibus_panel_service_page_up -ibus_panel_service_property_active -ibus_panel_service_property_show -ibus_panel_service_property_hide - -IBUS_PANEL_SERVICE -IBUS_IS_PANEL_SERVICE -IBUS_TYPE_PANEL_SERVICE -ibus_panel_service_get_type -IBUS_PANEL_SERVICE_CLASS -IBUS_IS_PANEL_SERVICE_CLASS -IBUS_PANEL_SERVICE_GET_CLASS -
- -
-ibusfactory -IBusFactory -IBusFactory -IBusFactoryClass -ibus_factory_new -ibus_factory_add_engine - -IBUS_FACTORY -IBUS_IS_FACTORY -IBUS_TYPE_FACTORY -ibus_factory_get_type -IBUS_FACTORY_CLASS -IBUS_IS_FACTORY_CLASS -IBUS_FACTORY_GET_CLASS -
- -
-ibusproperty -IBusProperty -IBusPropType -IBusPropState -IBusProperty -IBusPropertyClass -IBusPropList -IBusPropListClass -ibus_property_new -ibus_property_set_label -ibus_property_set_icon -ibus_property_set_tooltip -ibus_property_set_sensitive -ibus_property_set_visible -ibus_property_set_state -ibus_property_set_sub_props -ibus_property_update - -IBUS_PROPERTY -IBUS_IS_PROPERTY -IBUS_TYPE_PROPERTY -ibus_property_get_type -IBUS_PROPERTY_CLASS -IBUS_IS_PROPERTY_CLASS -IBUS_PROPERTY_GET_CLASS -
- -
-ibusengine -IBusEngine -IBusEngine -IBusEngineClass -ibus_engine_new -ibus_engine_commit_text -ibus_engine_update_preedit_text -ibus_engine_update_preedit_text_with_mode -ibus_engine_show_preedit_text -ibus_engine_hide_preedit_text -ibus_engine_update_auxiliary_text -ibus_engine_show_auxiliary_text -ibus_engine_hide_auxiliary_text -ibus_engine_update_lookup_table -ibus_engine_update_lookup_table_fast -ibus_engine_show_lookup_table -ibus_engine_hide_lookup_table -ibus_engine_forward_key_event -ibus_engine_register_properties -ibus_engine_update_property -ibus_engine_delete_surrounding_text -ibus_engine_get_name - -IBUS_ENGINE -IBUS_IS_ENGINE -IBUS_TYPE_ENGINE -ibus_engine_get_type -IBUS_ENGINE_CLASS -IBUS_IS_ENGINE_CLASS -IBUS_ENGINE_GET_CLASS -
- -
-ibusinputcontext -IBusInputContext -IBusInputContext -IBusInputContextClass -ibus_input_context_process_key_event -ibus_input_context_set_cursor_location -ibus_input_context_set_capabilities -ibus_input_context_property_activate -ibus_input_context_focus_in -ibus_input_context_focus_out -ibus_input_context_reset -ibus_input_context_enable -ibus_input_context_disable -ibus_input_context_is_enabled -ibus_input_context_set_engine - -IBUS_INPUT_CONTEXT -IBUS_IS_INPUT_CONTEXT -IBUS_TYPE_INPUT_CONTEXT -ibus_input_context_get_type -IBUS_INPUT_CONTEXT_CLASS -IBUS_IS_INPUT_CONTEXT_CLASS -IBUS_INPUT_CONTEXT_GET_CLASS -
- -
-ibustext -IBusText -IBusText -IBusTextClass -ibus_text_new_from_string -ibus_text_new_from_ucs4 -ibus_text_new_from_static_string -ibus_text_new_from_printf -ibus_text_new_from_unichar -ibus_text_append_attribute -ibus_text_get_length - -IBUS_TEXT -IBUS_IS_TEXT -IBUS_TYPE_TEXT -ibus_text_get_type -IBUS_TEXT_CLASS -IBUS_IS_TEXT_CLASS -IBUS_TEXT_GET_CLASS -
- -
-ibusserver -IBusServer -IBusServer -IBusServerClass -IBusNewConnectionFunc -ibus_server_new -ibus_server_listen -ibus_server_disconnect -ibus_server_get_address -ibus_server_get_id -ibus_server_is_connected -ibus_server_set_auth_mechanisms - -IBUS_SERVER -IBUS_IS_SERVER -IBUS_TYPE_SERVER -ibus_server_get_type -IBUS_SERVER_CLASS -IBUS_IS_SERVER_CLASS -IBUS_SERVER_GET_CLASS -
- -
-ibusconfigservice -IBusConfigService -IBusConfigService -IBusConfigServiceClass -ibus_config_service_new -ibus_config_service_value_changed - -IBUS_CONFIG_SERVICE -IBUS_IS_CONFIG_SERVICE -IBUS_TYPE_CONFIG_SERVICE -ibus_config_service_get_type -IBUS_CONFIG_SERVICE_CLASS -IBUS_IS_CONFIG_SERVICE_CLASS -IBUS_CONFIG_SERVICE_GET_CLASS -
- -
-ibusproxy -IBusProxy -IBusProxy -IBusProxyClass -ibus_proxy_new -ibus_proxy_send -ibus_proxy_call -ibus_proxy_call_with_reply -ibus_proxy_call_with_reply_and_block -ibus_proxy_send_with_reply -ibus_proxy_send_with_reply_and_block -ibus_proxy_handle_signal -ibus_proxy_get_name -ibus_proxy_get_unique_name -ibus_proxy_get_path -ibus_proxy_get_interface -ibus_proxy_get_connection - -IBUS_PROXY -IBUS_IS_PROXY -IBUS_TYPE_PROXY -ibus_proxy_get_type -IBUS_PROXY_CLASS -IBUS_IS_PROXY_CLASS -IBUS_PROXY_GET_CLASS -
- -
-ibusdebug -ibus_warning -
- -
-ibusxml -XMLNode -ibus_xml_parse_file -ibus_xml_parse_buffer -ibus_xml_free -ibus_xml_output -
- -
-ibuskeysyms -IBUS_VoidSymbol -IBUS_BackSpace -IBUS_Tab -IBUS_Linefeed -IBUS_Clear -IBUS_Return -IBUS_Pause -IBUS_Scroll_Lock -IBUS_Sys_Req -IBUS_Escape -IBUS_Delete -IBUS_Multi_key -IBUS_Codeinput -IBUS_SingleCandidate -IBUS_MultipleCandidate -IBUS_PreviousCandidate -IBUS_Kanji -IBUS_Muhenkan -IBUS_Henkan_Mode -IBUS_Henkan -IBUS_Romaji -IBUS_Hiragana -IBUS_Katakana -IBUS_Hiragana_Katakana -IBUS_Zenkaku -IBUS_Hankaku -IBUS_Zenkaku_Hankaku -IBUS_Touroku -IBUS_Massyo -IBUS_Kana_Lock -IBUS_Kana_Shift -IBUS_Eisu_Shift -IBUS_Eisu_toggle -IBUS_Kanji_Bangou -IBUS_Zen_Koho -IBUS_Mae_Koho -IBUS_Home -IBUS_Left -IBUS_Up -IBUS_Right -IBUS_Down -IBUS_Prior -IBUS_Page_Up -IBUS_Next -IBUS_Page_Down -IBUS_End -IBUS_Begin -IBUS_Select -IBUS_Print -IBUS_Execute -IBUS_Insert -IBUS_Undo -IBUS_Redo -IBUS_Menu -IBUS_Find -IBUS_Cancel -IBUS_Help -IBUS_Break -IBUS_Mode_switch -IBUS_script_switch -IBUS_Num_Lock -IBUS_KP_Space -IBUS_KP_Tab -IBUS_KP_Enter -IBUS_KP_F1 -IBUS_KP_F2 -IBUS_KP_F3 -IBUS_KP_F4 -IBUS_KP_Home -IBUS_KP_Left -IBUS_KP_Up -IBUS_KP_Right -IBUS_KP_Down -IBUS_KP_Prior -IBUS_KP_Page_Up -IBUS_KP_Next -IBUS_KP_Page_Down -IBUS_KP_End -IBUS_KP_Begin -IBUS_KP_Insert -IBUS_KP_Delete -IBUS_KP_Equal -IBUS_KP_Multiply -IBUS_KP_Add -IBUS_KP_Separator -IBUS_KP_Subtract -IBUS_KP_Decimal -IBUS_KP_Divide -IBUS_KP_0 -IBUS_KP_1 -IBUS_KP_2 -IBUS_KP_3 -IBUS_KP_4 -IBUS_KP_5 -IBUS_KP_6 -IBUS_KP_7 -IBUS_KP_8 -IBUS_KP_9 -IBUS_F1 -IBUS_F2 -IBUS_F3 -IBUS_F4 -IBUS_F5 -IBUS_F6 -IBUS_F7 -IBUS_F8 -IBUS_F9 -IBUS_F10 -IBUS_F11 -IBUS_L1 -IBUS_F12 -IBUS_L2 -IBUS_F13 -IBUS_L3 -IBUS_F14 -IBUS_L4 -IBUS_F15 -IBUS_L5 -IBUS_F16 -IBUS_L6 -IBUS_F17 -IBUS_L7 -IBUS_F18 -IBUS_L8 -IBUS_F19 -IBUS_L9 -IBUS_F20 -IBUS_L10 -IBUS_F21 -IBUS_R1 -IBUS_F22 -IBUS_R2 -IBUS_F23 -IBUS_R3 -IBUS_F24 -IBUS_R4 -IBUS_F25 -IBUS_R5 -IBUS_F26 -IBUS_R6 -IBUS_F27 -IBUS_R7 -IBUS_F28 -IBUS_R8 -IBUS_F29 -IBUS_R9 -IBUS_F30 -IBUS_R10 -IBUS_F31 -IBUS_R11 -IBUS_F32 -IBUS_R12 -IBUS_F33 -IBUS_R13 -IBUS_F34 -IBUS_R14 -IBUS_F35 -IBUS_R15 -IBUS_Shift_L -IBUS_Shift_R -IBUS_Control_L -IBUS_Control_R -IBUS_Caps_Lock -IBUS_Shift_Lock -IBUS_Meta_L -IBUS_Meta_R -IBUS_Alt_L -IBUS_Alt_R -IBUS_Super_L -IBUS_Super_R -IBUS_Hyper_L -IBUS_Hyper_R -IBUS_ISO_Lock -IBUS_ISO_Level2_Latch -IBUS_ISO_Level3_Shift -IBUS_ISO_Level3_Latch -IBUS_ISO_Level3_Lock -IBUS_ISO_Level5_Shift -IBUS_ISO_Level5_Latch -IBUS_ISO_Level5_Lock -IBUS_ISO_Group_Shift -IBUS_ISO_Group_Latch -IBUS_ISO_Group_Lock -IBUS_ISO_Next_Group -IBUS_ISO_Next_Group_Lock -IBUS_ISO_Prev_Group -IBUS_ISO_Prev_Group_Lock -IBUS_ISO_First_Group -IBUS_ISO_First_Group_Lock -IBUS_ISO_Last_Group -IBUS_ISO_Last_Group_Lock -IBUS_ISO_Left_Tab -IBUS_ISO_Move_Line_Up -IBUS_ISO_Move_Line_Down -IBUS_ISO_Partial_Line_Up -IBUS_ISO_Partial_Line_Down -IBUS_ISO_Partial_Space_Left -IBUS_ISO_Partial_Space_Right -IBUS_ISO_Set_Margin_Left -IBUS_ISO_Set_Margin_Right -IBUS_ISO_Release_Margin_Left -IBUS_ISO_Release_Margin_Right -IBUS_ISO_Release_Both_Margins -IBUS_ISO_Fast_Cursor_Left -IBUS_ISO_Fast_Cursor_Right -IBUS_ISO_Fast_Cursor_Up -IBUS_ISO_Fast_Cursor_Down -IBUS_ISO_Continuous_Underline -IBUS_ISO_Discontinuous_Underline -IBUS_ISO_Emphasize -IBUS_ISO_Center_Object -IBUS_ISO_Enter -IBUS_dead_grave -IBUS_dead_acute -IBUS_dead_circumflex -IBUS_dead_tilde -IBUS_dead_perispomeni -IBUS_dead_macron -IBUS_dead_breve -IBUS_dead_abovedot -IBUS_dead_diaeresis -IBUS_dead_abovering -IBUS_dead_doubleacute -IBUS_dead_caron -IBUS_dead_cedilla -IBUS_dead_ogonek -IBUS_dead_iota -IBUS_dead_voiced_sound -IBUS_dead_semivoiced_sound -IBUS_dead_belowdot -IBUS_dead_hook -IBUS_dead_horn -IBUS_dead_stroke -IBUS_dead_abovecomma -IBUS_dead_psili -IBUS_dead_abovereversedcomma -IBUS_dead_dasia -IBUS_dead_belowring -IBUS_dead_belowmacron -IBUS_dead_belowcircumflex -IBUS_dead_belowtilde -IBUS_dead_belowbreve -IBUS_dead_belowdiaeresis -IBUS_First_Virtual_Screen -IBUS_Prev_Virtual_Screen -IBUS_Next_Virtual_Screen -IBUS_Last_Virtual_Screen -IBUS_Terminate_Server -IBUS_AccessX_Enable -IBUS_AccessX_Feedback_Enable -IBUS_RepeatKeys_Enable -IBUS_SlowKeys_Enable -IBUS_BounceKeys_Enable -IBUS_StickyKeys_Enable -IBUS_MouseKeys_Enable -IBUS_MouseKeys_Accel_Enable -IBUS_Overlay1_Enable -IBUS_Overlay2_Enable -IBUS_AudibleBell_Enable -IBUS_Pointer_Left -IBUS_Pointer_Right -IBUS_Pointer_Up -IBUS_Pointer_Down -IBUS_Pointer_UpLeft -IBUS_Pointer_UpRight -IBUS_Pointer_DownLeft -IBUS_Pointer_DownRight -IBUS_Pointer_Button_Dflt -IBUS_Pointer_Button1 -IBUS_Pointer_Button2 -IBUS_Pointer_Button3 -IBUS_Pointer_Button4 -IBUS_Pointer_Button5 -IBUS_Pointer_DblClick_Dflt -IBUS_Pointer_DblClick1 -IBUS_Pointer_DblClick2 -IBUS_Pointer_DblClick3 -IBUS_Pointer_DblClick4 -IBUS_Pointer_DblClick5 -IBUS_Pointer_Drag_Dflt -IBUS_Pointer_Drag1 -IBUS_Pointer_Drag2 -IBUS_Pointer_Drag3 -IBUS_Pointer_Drag4 -IBUS_Pointer_Drag5 -IBUS_Pointer_EnableKeys -IBUS_Pointer_Accelerate -IBUS_Pointer_DfltBtnNext -IBUS_Pointer_DfltBtnPrev -IBUS_3270_Duplicate -IBUS_3270_FieldMark -IBUS_3270_Right2 -IBUS_3270_Left2 -IBUS_3270_BackTab -IBUS_3270_EraseEOF -IBUS_3270_EraseInput -IBUS_3270_Reset -IBUS_3270_Quit -IBUS_3270_PA1 -IBUS_3270_PA2 -IBUS_3270_PA3 -IBUS_3270_Test -IBUS_3270_Attn -IBUS_3270_CursorBlink -IBUS_3270_AltCursor -IBUS_3270_KeyClick -IBUS_3270_Jump -IBUS_3270_Ident -IBUS_3270_Rule -IBUS_3270_Copy -IBUS_3270_Play -IBUS_3270_Setup -IBUS_3270_Record -IBUS_3270_ChangeScreen -IBUS_3270_DeleteWord -IBUS_3270_ExSelect -IBUS_3270_CursorSelect -IBUS_3270_PrintScreen -IBUS_3270_Enter -IBUS_space -IBUS_exclam -IBUS_quotedbl -IBUS_numbersign -IBUS_dollar -IBUS_percent -IBUS_ampersand -IBUS_apostrophe -IBUS_quoteright -IBUS_parenleft -IBUS_parenright -IBUS_asterisk -IBUS_plus -IBUS_comma -IBUS_minus -IBUS_period -IBUS_slash -IBUS_0 -IBUS_1 -IBUS_2 -IBUS_3 -IBUS_4 -IBUS_5 -IBUS_6 -IBUS_7 -IBUS_8 -IBUS_9 -IBUS_colon -IBUS_semicolon -IBUS_less -IBUS_equal -IBUS_greater -IBUS_question -IBUS_at -IBUS_A -IBUS_B -IBUS_C -IBUS_D -IBUS_E -IBUS_F -IBUS_G -IBUS_H -IBUS_I -IBUS_J -IBUS_K -IBUS_L -IBUS_M -IBUS_N -IBUS_O -IBUS_P -IBUS_Q -IBUS_R -IBUS_S -IBUS_T -IBUS_U -IBUS_V -IBUS_W -IBUS_X -IBUS_Y -IBUS_Z -IBUS_bracketleft -IBUS_backslash -IBUS_bracketright -IBUS_asciicircum -IBUS_underscore -IBUS_grave -IBUS_quoteleft -IBUS_a -IBUS_b -IBUS_c -IBUS_d -IBUS_e -IBUS_f -IBUS_g -IBUS_h -IBUS_i -IBUS_j -IBUS_k -IBUS_l -IBUS_m -IBUS_n -IBUS_o -IBUS_p -IBUS_q -IBUS_r -IBUS_s -IBUS_t -IBUS_u -IBUS_v -IBUS_w -IBUS_x -IBUS_y -IBUS_z -IBUS_braceleft -IBUS_bar -IBUS_braceright -IBUS_asciitilde -IBUS_nobreakspace -IBUS_exclamdown -IBUS_cent -IBUS_sterling -IBUS_currency -IBUS_yen -IBUS_brokenbar -IBUS_section -IBUS_diaeresis -IBUS_copyright -IBUS_ordfeminine -IBUS_guillemotleft -IBUS_notsign -IBUS_hyphen -IBUS_registered -IBUS_macron -IBUS_degree -IBUS_plusminus -IBUS_twosuperior -IBUS_threesuperior -IBUS_acute -IBUS_mu -IBUS_paragraph -IBUS_periodcentered -IBUS_cedilla -IBUS_onesuperior -IBUS_masculine -IBUS_guillemotright -IBUS_onequarter -IBUS_onehalf -IBUS_threequarters -IBUS_questiondown -IBUS_Agrave -IBUS_Aacute -IBUS_Acircumflex -IBUS_Atilde -IBUS_Adiaeresis -IBUS_Aring -IBUS_AE -IBUS_Ccedilla -IBUS_Egrave -IBUS_Eacute -IBUS_Ecircumflex -IBUS_Ediaeresis -IBUS_Igrave -IBUS_Iacute -IBUS_Icircumflex -IBUS_Idiaeresis -IBUS_ETH -IBUS_Eth -IBUS_Ntilde -IBUS_Ograve -IBUS_Oacute -IBUS_Ocircumflex -IBUS_Otilde -IBUS_Odiaeresis -IBUS_multiply -IBUS_Oslash -IBUS_Ooblique -IBUS_Ugrave -IBUS_Uacute -IBUS_Ucircumflex -IBUS_Udiaeresis -IBUS_Yacute -IBUS_THORN -IBUS_Thorn -IBUS_ssharp -IBUS_agrave -IBUS_aacute -IBUS_acircumflex -IBUS_atilde -IBUS_adiaeresis -IBUS_aring -IBUS_ae -IBUS_ccedilla -IBUS_egrave -IBUS_eacute -IBUS_ecircumflex -IBUS_ediaeresis -IBUS_igrave -IBUS_iacute -IBUS_icircumflex -IBUS_idiaeresis -IBUS_eth -IBUS_ntilde -IBUS_ograve -IBUS_oacute -IBUS_ocircumflex -IBUS_otilde -IBUS_odiaeresis -IBUS_division -IBUS_oslash -IBUS_ooblique -IBUS_ugrave -IBUS_uacute -IBUS_ucircumflex -IBUS_udiaeresis -IBUS_yacute -IBUS_thorn -IBUS_ydiaeresis -IBUS_Aogonek -IBUS_breve -IBUS_Lstroke -IBUS_Lcaron -IBUS_Sacute -IBUS_Scaron -IBUS_Scedilla -IBUS_Tcaron -IBUS_Zacute -IBUS_Zcaron -IBUS_Zabovedot -IBUS_aogonek -IBUS_ogonek -IBUS_lstroke -IBUS_lcaron -IBUS_sacute -IBUS_caron -IBUS_scaron -IBUS_scedilla -IBUS_tcaron -IBUS_zacute -IBUS_doubleacute -IBUS_zcaron -IBUS_zabovedot -IBUS_Racute -IBUS_Abreve -IBUS_Lacute -IBUS_Cacute -IBUS_Ccaron -IBUS_Eogonek -IBUS_Ecaron -IBUS_Dcaron -IBUS_Dstroke -IBUS_Nacute -IBUS_Ncaron -IBUS_Odoubleacute -IBUS_Rcaron -IBUS_Uring -IBUS_Udoubleacute -IBUS_Tcedilla -IBUS_racute -IBUS_abreve -IBUS_lacute -IBUS_cacute -IBUS_ccaron -IBUS_eogonek -IBUS_ecaron -IBUS_dcaron -IBUS_dstroke -IBUS_nacute -IBUS_ncaron -IBUS_odoubleacute -IBUS_udoubleacute -IBUS_rcaron -IBUS_uring -IBUS_tcedilla -IBUS_abovedot -IBUS_Hstroke -IBUS_Hcircumflex -IBUS_Iabovedot -IBUS_Gbreve -IBUS_Jcircumflex -IBUS_hstroke -IBUS_hcircumflex -IBUS_idotless -IBUS_gbreve -IBUS_jcircumflex -IBUS_Cabovedot -IBUS_Ccircumflex -IBUS_Gabovedot -IBUS_Gcircumflex -IBUS_Ubreve -IBUS_Scircumflex -IBUS_cabovedot -IBUS_ccircumflex -IBUS_gabovedot -IBUS_gcircumflex -IBUS_ubreve -IBUS_scircumflex -IBUS_kra -IBUS_kappa -IBUS_Rcedilla -IBUS_Itilde -IBUS_Lcedilla -IBUS_Emacron -IBUS_Gcedilla -IBUS_Tslash -IBUS_rcedilla -IBUS_itilde -IBUS_lcedilla -IBUS_emacron -IBUS_gcedilla -IBUS_tslash -IBUS_ENG -IBUS_eng -IBUS_Amacron -IBUS_Iogonek -IBUS_Eabovedot -IBUS_Imacron -IBUS_Ncedilla -IBUS_Omacron -IBUS_Kcedilla -IBUS_Uogonek -IBUS_Utilde -IBUS_Umacron -IBUS_amacron -IBUS_iogonek -IBUS_eabovedot -IBUS_imacron -IBUS_ncedilla -IBUS_omacron -IBUS_kcedilla -IBUS_uogonek -IBUS_utilde -IBUS_umacron -IBUS_Babovedot -IBUS_babovedot -IBUS_Dabovedot -IBUS_Wgrave -IBUS_Wacute -IBUS_dabovedot -IBUS_Ygrave -IBUS_Fabovedot -IBUS_fabovedot -IBUS_Mabovedot -IBUS_mabovedot -IBUS_Pabovedot -IBUS_wgrave -IBUS_pabovedot -IBUS_wacute -IBUS_Sabovedot -IBUS_ygrave -IBUS_Wdiaeresis -IBUS_wdiaeresis -IBUS_sabovedot -IBUS_Wcircumflex -IBUS_Tabovedot -IBUS_Ycircumflex -IBUS_wcircumflex -IBUS_tabovedot -IBUS_ycircumflex -IBUS_OE -IBUS_oe -IBUS_Ydiaeresis -IBUS_overline -IBUS_kana_fullstop -IBUS_kana_openingbracket -IBUS_kana_closingbracket -IBUS_kana_comma -IBUS_kana_conjunctive -IBUS_kana_middledot -IBUS_kana_WO -IBUS_kana_a -IBUS_kana_i -IBUS_kana_u -IBUS_kana_e -IBUS_kana_o -IBUS_kana_ya -IBUS_kana_yu -IBUS_kana_yo -IBUS_kana_tsu -IBUS_kana_tu -IBUS_prolongedsound -IBUS_kana_A -IBUS_kana_I -IBUS_kana_U -IBUS_kana_E -IBUS_kana_O -IBUS_kana_KA -IBUS_kana_KI -IBUS_kana_KU -IBUS_kana_KE -IBUS_kana_KO -IBUS_kana_SA -IBUS_kana_SHI -IBUS_kana_SU -IBUS_kana_SE -IBUS_kana_SO -IBUS_kana_TA -IBUS_kana_CHI -IBUS_kana_TI -IBUS_kana_TSU -IBUS_kana_TU -IBUS_kana_TE -IBUS_kana_TO -IBUS_kana_NA -IBUS_kana_NI -IBUS_kana_NU -IBUS_kana_NE -IBUS_kana_NO -IBUS_kana_HA -IBUS_kana_HI -IBUS_kana_FU -IBUS_kana_HU -IBUS_kana_HE -IBUS_kana_HO -IBUS_kana_MA -IBUS_kana_MI -IBUS_kana_MU -IBUS_kana_ME -IBUS_kana_MO -IBUS_kana_YA -IBUS_kana_YU -IBUS_kana_YO -IBUS_kana_RA -IBUS_kana_RI -IBUS_kana_RU -IBUS_kana_RE -IBUS_kana_RO -IBUS_kana_WA -IBUS_kana_N -IBUS_voicedsound -IBUS_semivoicedsound -IBUS_kana_switch -IBUS_Farsi_0 -IBUS_Farsi_1 -IBUS_Farsi_2 -IBUS_Farsi_3 -IBUS_Farsi_4 -IBUS_Farsi_5 -IBUS_Farsi_6 -IBUS_Farsi_7 -IBUS_Farsi_8 -IBUS_Farsi_9 -IBUS_Arabic_percent -IBUS_Arabic_superscript_alef -IBUS_Arabic_tteh -IBUS_Arabic_peh -IBUS_Arabic_tcheh -IBUS_Arabic_ddal -IBUS_Arabic_rreh -IBUS_Arabic_comma -IBUS_Arabic_fullstop -IBUS_Arabic_0 -IBUS_Arabic_1 -IBUS_Arabic_2 -IBUS_Arabic_3 -IBUS_Arabic_4 -IBUS_Arabic_5 -IBUS_Arabic_6 -IBUS_Arabic_7 -IBUS_Arabic_8 -IBUS_Arabic_9 -IBUS_Arabic_semicolon -IBUS_Arabic_question_mark -IBUS_Arabic_hamza -IBUS_Arabic_maddaonalef -IBUS_Arabic_hamzaonalef -IBUS_Arabic_hamzaonwaw -IBUS_Arabic_hamzaunderalef -IBUS_Arabic_hamzaonyeh -IBUS_Arabic_alef -IBUS_Arabic_beh -IBUS_Arabic_tehmarbuta -IBUS_Arabic_teh -IBUS_Arabic_theh -IBUS_Arabic_jeem -IBUS_Arabic_hah -IBUS_Arabic_khah -IBUS_Arabic_dal -IBUS_Arabic_thal -IBUS_Arabic_ra -IBUS_Arabic_zain -IBUS_Arabic_seen -IBUS_Arabic_sheen -IBUS_Arabic_sad -IBUS_Arabic_dad -IBUS_Arabic_tah -IBUS_Arabic_zah -IBUS_Arabic_ain -IBUS_Arabic_ghain -IBUS_Arabic_tatweel -IBUS_Arabic_feh -IBUS_Arabic_qaf -IBUS_Arabic_kaf -IBUS_Arabic_lam -IBUS_Arabic_meem -IBUS_Arabic_noon -IBUS_Arabic_ha -IBUS_Arabic_heh -IBUS_Arabic_waw -IBUS_Arabic_alefmaksura -IBUS_Arabic_yeh -IBUS_Arabic_fathatan -IBUS_Arabic_dammatan -IBUS_Arabic_kasratan -IBUS_Arabic_fatha -IBUS_Arabic_damma -IBUS_Arabic_kasra -IBUS_Arabic_shadda -IBUS_Arabic_sukun -IBUS_Arabic_madda_above -IBUS_Arabic_hamza_above -IBUS_Arabic_hamza_below -IBUS_Arabic_jeh -IBUS_Arabic_veh -IBUS_Arabic_keheh -IBUS_Arabic_gaf -IBUS_Arabic_noon_ghunna -IBUS_Arabic_heh_doachashmee -IBUS_Farsi_yeh -IBUS_Arabic_farsi_yeh -IBUS_Arabic_yeh_baree -IBUS_Arabic_heh_goal -IBUS_Arabic_switch -IBUS_Cyrillic_GHE_bar -IBUS_Cyrillic_ghe_bar -IBUS_Cyrillic_ZHE_descender -IBUS_Cyrillic_zhe_descender -IBUS_Cyrillic_KA_descender -IBUS_Cyrillic_ka_descender -IBUS_Cyrillic_KA_vertstroke -IBUS_Cyrillic_ka_vertstroke -IBUS_Cyrillic_EN_descender -IBUS_Cyrillic_en_descender -IBUS_Cyrillic_U_straight -IBUS_Cyrillic_u_straight -IBUS_Cyrillic_U_straight_bar -IBUS_Cyrillic_u_straight_bar -IBUS_Cyrillic_HA_descender -IBUS_Cyrillic_ha_descender -IBUS_Cyrillic_CHE_descender -IBUS_Cyrillic_che_descender -IBUS_Cyrillic_CHE_vertstroke -IBUS_Cyrillic_che_vertstroke -IBUS_Cyrillic_SHHA -IBUS_Cyrillic_shha -IBUS_Cyrillic_SCHWA -IBUS_Cyrillic_schwa -IBUS_Cyrillic_I_macron -IBUS_Cyrillic_i_macron -IBUS_Cyrillic_O_bar -IBUS_Cyrillic_o_bar -IBUS_Cyrillic_U_macron -IBUS_Cyrillic_u_macron -IBUS_Serbian_dje -IBUS_Macedonia_gje -IBUS_Cyrillic_io -IBUS_Ukrainian_ie -IBUS_Ukranian_je -IBUS_Macedonia_dse -IBUS_Ukrainian_i -IBUS_Ukranian_i -IBUS_Ukrainian_yi -IBUS_Ukranian_yi -IBUS_Cyrillic_je -IBUS_Serbian_je -IBUS_Cyrillic_lje -IBUS_Serbian_lje -IBUS_Cyrillic_nje -IBUS_Serbian_nje -IBUS_Serbian_tshe -IBUS_Macedonia_kje -IBUS_Ukrainian_ghe_with_upturn -IBUS_Byelorussian_shortu -IBUS_Cyrillic_dzhe -IBUS_Serbian_dze -IBUS_numerosign -IBUS_Serbian_DJE -IBUS_Macedonia_GJE -IBUS_Cyrillic_IO -IBUS_Ukrainian_IE -IBUS_Ukranian_JE -IBUS_Macedonia_DSE -IBUS_Ukrainian_I -IBUS_Ukranian_I -IBUS_Ukrainian_YI -IBUS_Ukranian_YI -IBUS_Cyrillic_JE -IBUS_Serbian_JE -IBUS_Cyrillic_LJE -IBUS_Serbian_LJE -IBUS_Cyrillic_NJE -IBUS_Serbian_NJE -IBUS_Serbian_TSHE -IBUS_Macedonia_KJE -IBUS_Ukrainian_GHE_WITH_UPTURN -IBUS_Byelorussian_SHORTU -IBUS_Cyrillic_DZHE -IBUS_Serbian_DZE -IBUS_Cyrillic_yu -IBUS_Cyrillic_a -IBUS_Cyrillic_be -IBUS_Cyrillic_tse -IBUS_Cyrillic_de -IBUS_Cyrillic_ie -IBUS_Cyrillic_ef -IBUS_Cyrillic_ghe -IBUS_Cyrillic_ha -IBUS_Cyrillic_i -IBUS_Cyrillic_shorti -IBUS_Cyrillic_ka -IBUS_Cyrillic_el -IBUS_Cyrillic_em -IBUS_Cyrillic_en -IBUS_Cyrillic_o -IBUS_Cyrillic_pe -IBUS_Cyrillic_ya -IBUS_Cyrillic_er -IBUS_Cyrillic_es -IBUS_Cyrillic_te -IBUS_Cyrillic_u -IBUS_Cyrillic_zhe -IBUS_Cyrillic_ve -IBUS_Cyrillic_softsign -IBUS_Cyrillic_yeru -IBUS_Cyrillic_ze -IBUS_Cyrillic_sha -IBUS_Cyrillic_e -IBUS_Cyrillic_shcha -IBUS_Cyrillic_che -IBUS_Cyrillic_hardsign -IBUS_Cyrillic_YU -IBUS_Cyrillic_A -IBUS_Cyrillic_BE -IBUS_Cyrillic_TSE -IBUS_Cyrillic_DE -IBUS_Cyrillic_IE -IBUS_Cyrillic_EF -IBUS_Cyrillic_GHE -IBUS_Cyrillic_HA -IBUS_Cyrillic_I -IBUS_Cyrillic_SHORTI -IBUS_Cyrillic_KA -IBUS_Cyrillic_EL -IBUS_Cyrillic_EM -IBUS_Cyrillic_EN -IBUS_Cyrillic_O -IBUS_Cyrillic_PE -IBUS_Cyrillic_YA -IBUS_Cyrillic_ER -IBUS_Cyrillic_ES -IBUS_Cyrillic_TE -IBUS_Cyrillic_U -IBUS_Cyrillic_ZHE -IBUS_Cyrillic_VE -IBUS_Cyrillic_SOFTSIGN -IBUS_Cyrillic_YERU -IBUS_Cyrillic_ZE -IBUS_Cyrillic_SHA -IBUS_Cyrillic_E -IBUS_Cyrillic_SHCHA -IBUS_Cyrillic_CHE -IBUS_Cyrillic_HARDSIGN -IBUS_Greek_ALPHAaccent -IBUS_Greek_EPSILONaccent -IBUS_Greek_ETAaccent -IBUS_Greek_IOTAaccent -IBUS_Greek_IOTAdieresis -IBUS_Greek_IOTAdiaeresis -IBUS_Greek_OMICRONaccent -IBUS_Greek_UPSILONaccent -IBUS_Greek_UPSILONdieresis -IBUS_Greek_OMEGAaccent -IBUS_Greek_accentdieresis -IBUS_Greek_horizbar -IBUS_Greek_alphaaccent -IBUS_Greek_epsilonaccent -IBUS_Greek_etaaccent -IBUS_Greek_iotaaccent -IBUS_Greek_iotadieresis -IBUS_Greek_iotaaccentdieresis -IBUS_Greek_omicronaccent -IBUS_Greek_upsilonaccent -IBUS_Greek_upsilondieresis -IBUS_Greek_upsilonaccentdieresis -IBUS_Greek_omegaaccent -IBUS_Greek_ALPHA -IBUS_Greek_BETA -IBUS_Greek_GAMMA -IBUS_Greek_DELTA -IBUS_Greek_EPSILON -IBUS_Greek_ZETA -IBUS_Greek_ETA -IBUS_Greek_THETA -IBUS_Greek_IOTA -IBUS_Greek_KAPPA -IBUS_Greek_LAMDA -IBUS_Greek_LAMBDA -IBUS_Greek_MU -IBUS_Greek_NU -IBUS_Greek_XI -IBUS_Greek_OMICRON -IBUS_Greek_PI -IBUS_Greek_RHO -IBUS_Greek_SIGMA -IBUS_Greek_TAU -IBUS_Greek_UPSILON -IBUS_Greek_PHI -IBUS_Greek_CHI -IBUS_Greek_PSI -IBUS_Greek_OMEGA -IBUS_Greek_alpha -IBUS_Greek_beta -IBUS_Greek_gamma -IBUS_Greek_delta -IBUS_Greek_epsilon -IBUS_Greek_zeta -IBUS_Greek_eta -IBUS_Greek_theta -IBUS_Greek_iota -IBUS_Greek_kappa -IBUS_Greek_lamda -IBUS_Greek_lambda -IBUS_Greek_mu -IBUS_Greek_nu -IBUS_Greek_xi -IBUS_Greek_omicron -IBUS_Greek_pi -IBUS_Greek_rho -IBUS_Greek_sigma -IBUS_Greek_finalsmallsigma -IBUS_Greek_tau -IBUS_Greek_upsilon -IBUS_Greek_phi -IBUS_Greek_chi -IBUS_Greek_psi -IBUS_Greek_omega -IBUS_Greek_switch -IBUS_leftradical -IBUS_topleftradical -IBUS_horizconnector -IBUS_topintegral -IBUS_botintegral -IBUS_vertconnector -IBUS_topleftsqbracket -IBUS_botleftsqbracket -IBUS_toprightsqbracket -IBUS_botrightsqbracket -IBUS_topleftparens -IBUS_botleftparens -IBUS_toprightparens -IBUS_botrightparens -IBUS_leftmiddlecurlybrace -IBUS_rightmiddlecurlybrace -IBUS_topleftsummation -IBUS_botleftsummation -IBUS_topvertsummationconnector -IBUS_botvertsummationconnector -IBUS_toprightsummation -IBUS_botrightsummation -IBUS_rightmiddlesummation -IBUS_lessthanequal -IBUS_notequal -IBUS_greaterthanequal -IBUS_integral -IBUS_therefore -IBUS_variation -IBUS_infinity -IBUS_nabla -IBUS_approximate -IBUS_similarequal -IBUS_ifonlyif -IBUS_implies -IBUS_identical -IBUS_radical -IBUS_includedin -IBUS_includes -IBUS_intersection -IBUS_union -IBUS_logicaland -IBUS_logicalor -IBUS_partialderivative -IBUS_function -IBUS_leftarrow -IBUS_uparrow -IBUS_rightarrow -IBUS_downarrow -IBUS_blank -IBUS_soliddiamond -IBUS_checkerboard -IBUS_ht -IBUS_ff -IBUS_cr -IBUS_lf -IBUS_nl -IBUS_vt -IBUS_lowrightcorner -IBUS_uprightcorner -IBUS_upleftcorner -IBUS_lowleftcorner -IBUS_crossinglines -IBUS_horizlinescan1 -IBUS_horizlinescan3 -IBUS_horizlinescan5 -IBUS_horizlinescan7 -IBUS_horizlinescan9 -IBUS_leftt -IBUS_rightt -IBUS_bott -IBUS_topt -IBUS_vertbar -IBUS_emspace -IBUS_enspace -IBUS_em3space -IBUS_em4space -IBUS_digitspace -IBUS_punctspace -IBUS_thinspace -IBUS_hairspace -IBUS_emdash -IBUS_endash -IBUS_signifblank -IBUS_ellipsis -IBUS_doubbaselinedot -IBUS_onethird -IBUS_twothirds -IBUS_onefifth -IBUS_twofifths -IBUS_threefifths -IBUS_fourfifths -IBUS_onesixth -IBUS_fivesixths -IBUS_careof -IBUS_figdash -IBUS_leftanglebracket -IBUS_decimalpoint -IBUS_rightanglebracket -IBUS_marker -IBUS_oneeighth -IBUS_threeeighths -IBUS_fiveeighths -IBUS_seveneighths -IBUS_trademark -IBUS_signaturemark -IBUS_trademarkincircle -IBUS_leftopentriangle -IBUS_rightopentriangle -IBUS_emopencircle -IBUS_emopenrectangle -IBUS_leftsinglequotemark -IBUS_rightsinglequotemark -IBUS_leftdoublequotemark -IBUS_rightdoublequotemark -IBUS_prescription -IBUS_minutes -IBUS_seconds -IBUS_latincross -IBUS_hexagram -IBUS_filledrectbullet -IBUS_filledlefttribullet -IBUS_filledrighttribullet -IBUS_emfilledcircle -IBUS_emfilledrect -IBUS_enopencircbullet -IBUS_enopensquarebullet -IBUS_openrectbullet -IBUS_opentribulletup -IBUS_opentribulletdown -IBUS_openstar -IBUS_enfilledcircbullet -IBUS_enfilledsqbullet -IBUS_filledtribulletup -IBUS_filledtribulletdown -IBUS_leftpointer -IBUS_rightpointer -IBUS_club -IBUS_diamond -IBUS_heart -IBUS_maltesecross -IBUS_dagger -IBUS_doubledagger -IBUS_checkmark -IBUS_ballotcross -IBUS_musicalsharp -IBUS_musicalflat -IBUS_malesymbol -IBUS_femalesymbol -IBUS_telephone -IBUS_telephonerecorder -IBUS_phonographcopyright -IBUS_caret -IBUS_singlelowquotemark -IBUS_doublelowquotemark -IBUS_cursor -IBUS_leftcaret -IBUS_rightcaret -IBUS_downcaret -IBUS_upcaret -IBUS_overbar -IBUS_downtack -IBUS_upshoe -IBUS_downstile -IBUS_underbar -IBUS_jot -IBUS_quad -IBUS_uptack -IBUS_circle -IBUS_upstile -IBUS_downshoe -IBUS_rightshoe -IBUS_leftshoe -IBUS_lefttack -IBUS_righttack -IBUS_hebrew_doublelowline -IBUS_hebrew_aleph -IBUS_hebrew_bet -IBUS_hebrew_beth -IBUS_hebrew_gimel -IBUS_hebrew_gimmel -IBUS_hebrew_dalet -IBUS_hebrew_daleth -IBUS_hebrew_he -IBUS_hebrew_waw -IBUS_hebrew_zain -IBUS_hebrew_zayin -IBUS_hebrew_chet -IBUS_hebrew_het -IBUS_hebrew_tet -IBUS_hebrew_teth -IBUS_hebrew_yod -IBUS_hebrew_finalkaph -IBUS_hebrew_kaph -IBUS_hebrew_lamed -IBUS_hebrew_finalmem -IBUS_hebrew_mem -IBUS_hebrew_finalnun -IBUS_hebrew_nun -IBUS_hebrew_samech -IBUS_hebrew_samekh -IBUS_hebrew_ayin -IBUS_hebrew_finalpe -IBUS_hebrew_pe -IBUS_hebrew_finalzade -IBUS_hebrew_finalzadi -IBUS_hebrew_zade -IBUS_hebrew_zadi -IBUS_hebrew_qoph -IBUS_hebrew_kuf -IBUS_hebrew_resh -IBUS_hebrew_shin -IBUS_hebrew_taw -IBUS_hebrew_taf -IBUS_Hebrew_switch -IBUS_Thai_kokai -IBUS_Thai_khokhai -IBUS_Thai_khokhuat -IBUS_Thai_khokhwai -IBUS_Thai_khokhon -IBUS_Thai_khorakhang -IBUS_Thai_ngongu -IBUS_Thai_chochan -IBUS_Thai_choching -IBUS_Thai_chochang -IBUS_Thai_soso -IBUS_Thai_chochoe -IBUS_Thai_yoying -IBUS_Thai_dochada -IBUS_Thai_topatak -IBUS_Thai_thothan -IBUS_Thai_thonangmontho -IBUS_Thai_thophuthao -IBUS_Thai_nonen -IBUS_Thai_dodek -IBUS_Thai_totao -IBUS_Thai_thothung -IBUS_Thai_thothahan -IBUS_Thai_thothong -IBUS_Thai_nonu -IBUS_Thai_bobaimai -IBUS_Thai_popla -IBUS_Thai_phophung -IBUS_Thai_fofa -IBUS_Thai_phophan -IBUS_Thai_fofan -IBUS_Thai_phosamphao -IBUS_Thai_moma -IBUS_Thai_yoyak -IBUS_Thai_rorua -IBUS_Thai_ru -IBUS_Thai_loling -IBUS_Thai_lu -IBUS_Thai_wowaen -IBUS_Thai_sosala -IBUS_Thai_sorusi -IBUS_Thai_sosua -IBUS_Thai_hohip -IBUS_Thai_lochula -IBUS_Thai_oang -IBUS_Thai_honokhuk -IBUS_Thai_paiyannoi -IBUS_Thai_saraa -IBUS_Thai_maihanakat -IBUS_Thai_saraaa -IBUS_Thai_saraam -IBUS_Thai_sarai -IBUS_Thai_saraii -IBUS_Thai_saraue -IBUS_Thai_sarauee -IBUS_Thai_sarau -IBUS_Thai_sarauu -IBUS_Thai_phinthu -IBUS_Thai_maihanakat_maitho -IBUS_Thai_baht -IBUS_Thai_sarae -IBUS_Thai_saraae -IBUS_Thai_sarao -IBUS_Thai_saraaimaimuan -IBUS_Thai_saraaimaimalai -IBUS_Thai_lakkhangyao -IBUS_Thai_maiyamok -IBUS_Thai_maitaikhu -IBUS_Thai_maiek -IBUS_Thai_maitho -IBUS_Thai_maitri -IBUS_Thai_maichattawa -IBUS_Thai_thanthakhat -IBUS_Thai_nikhahit -IBUS_Thai_leksun -IBUS_Thai_leknung -IBUS_Thai_leksong -IBUS_Thai_leksam -IBUS_Thai_leksi -IBUS_Thai_lekha -IBUS_Thai_lekhok -IBUS_Thai_lekchet -IBUS_Thai_lekpaet -IBUS_Thai_lekkao -IBUS_Hangul -IBUS_Hangul_Start -IBUS_Hangul_End -IBUS_Hangul_Hanja -IBUS_Hangul_Jamo -IBUS_Hangul_Romaja -IBUS_Hangul_Codeinput -IBUS_Hangul_Jeonja -IBUS_Hangul_Banja -IBUS_Hangul_PreHanja -IBUS_Hangul_PostHanja -IBUS_Hangul_SingleCandidate -IBUS_Hangul_MultipleCandidate -IBUS_Hangul_PreviousCandidate -IBUS_Hangul_Special -IBUS_Hangul_switch -IBUS_Hangul_Kiyeog -IBUS_Hangul_SsangKiyeog -IBUS_Hangul_KiyeogSios -IBUS_Hangul_Nieun -IBUS_Hangul_NieunJieuj -IBUS_Hangul_NieunHieuh -IBUS_Hangul_Dikeud -IBUS_Hangul_SsangDikeud -IBUS_Hangul_Rieul -IBUS_Hangul_RieulKiyeog -IBUS_Hangul_RieulMieum -IBUS_Hangul_RieulPieub -IBUS_Hangul_RieulSios -IBUS_Hangul_RieulTieut -IBUS_Hangul_RieulPhieuf -IBUS_Hangul_RieulHieuh -IBUS_Hangul_Mieum -IBUS_Hangul_Pieub -IBUS_Hangul_SsangPieub -IBUS_Hangul_PieubSios -IBUS_Hangul_Sios -IBUS_Hangul_SsangSios -IBUS_Hangul_Ieung -IBUS_Hangul_Jieuj -IBUS_Hangul_SsangJieuj -IBUS_Hangul_Cieuc -IBUS_Hangul_Khieuq -IBUS_Hangul_Tieut -IBUS_Hangul_Phieuf -IBUS_Hangul_Hieuh -IBUS_Hangul_A -IBUS_Hangul_AE -IBUS_Hangul_YA -IBUS_Hangul_YAE -IBUS_Hangul_EO -IBUS_Hangul_E -IBUS_Hangul_YEO -IBUS_Hangul_YE -IBUS_Hangul_O -IBUS_Hangul_WA -IBUS_Hangul_WAE -IBUS_Hangul_OE -IBUS_Hangul_YO -IBUS_Hangul_U -IBUS_Hangul_WEO -IBUS_Hangul_WE -IBUS_Hangul_WI -IBUS_Hangul_YU -IBUS_Hangul_EU -IBUS_Hangul_YI -IBUS_Hangul_I -IBUS_Hangul_J_Kiyeog -IBUS_Hangul_J_SsangKiyeog -IBUS_Hangul_J_KiyeogSios -IBUS_Hangul_J_Nieun -IBUS_Hangul_J_NieunJieuj -IBUS_Hangul_J_NieunHieuh -IBUS_Hangul_J_Dikeud -IBUS_Hangul_J_Rieul -IBUS_Hangul_J_RieulKiyeog -IBUS_Hangul_J_RieulMieum -IBUS_Hangul_J_RieulPieub -IBUS_Hangul_J_RieulSios -IBUS_Hangul_J_RieulTieut -IBUS_Hangul_J_RieulPhieuf -IBUS_Hangul_J_RieulHieuh -IBUS_Hangul_J_Mieum -IBUS_Hangul_J_Pieub -IBUS_Hangul_J_PieubSios -IBUS_Hangul_J_Sios -IBUS_Hangul_J_SsangSios -IBUS_Hangul_J_Ieung -IBUS_Hangul_J_Jieuj -IBUS_Hangul_J_Cieuc -IBUS_Hangul_J_Khieuq -IBUS_Hangul_J_Tieut -IBUS_Hangul_J_Phieuf -IBUS_Hangul_J_Hieuh -IBUS_Hangul_RieulYeorinHieuh -IBUS_Hangul_SunkyeongeumMieum -IBUS_Hangul_SunkyeongeumPieub -IBUS_Hangul_PanSios -IBUS_Hangul_KkogjiDalrinIeung -IBUS_Hangul_SunkyeongeumPhieuf -IBUS_Hangul_YeorinHieuh -IBUS_Hangul_AraeA -IBUS_Hangul_AraeAE -IBUS_Hangul_J_PanSios -IBUS_Hangul_J_KkogjiDalrinIeung -IBUS_Hangul_J_YeorinHieuh -IBUS_Korean_Won -IBUS_Armenian_ligature_ew -IBUS_Armenian_full_stop -IBUS_Armenian_verjaket -IBUS_Armenian_separation_mark -IBUS_Armenian_but -IBUS_Armenian_hyphen -IBUS_Armenian_yentamna -IBUS_Armenian_exclam -IBUS_Armenian_amanak -IBUS_Armenian_accent -IBUS_Armenian_shesht -IBUS_Armenian_question -IBUS_Armenian_paruyk -IBUS_Armenian_AYB -IBUS_Armenian_ayb -IBUS_Armenian_BEN -IBUS_Armenian_ben -IBUS_Armenian_GIM -IBUS_Armenian_gim -IBUS_Armenian_DA -IBUS_Armenian_da -IBUS_Armenian_YECH -IBUS_Armenian_yech -IBUS_Armenian_ZA -IBUS_Armenian_za -IBUS_Armenian_E -IBUS_Armenian_e -IBUS_Armenian_AT -IBUS_Armenian_at -IBUS_Armenian_TO -IBUS_Armenian_to -IBUS_Armenian_ZHE -IBUS_Armenian_zhe -IBUS_Armenian_INI -IBUS_Armenian_ini -IBUS_Armenian_LYUN -IBUS_Armenian_lyun -IBUS_Armenian_KHE -IBUS_Armenian_khe -IBUS_Armenian_TSA -IBUS_Armenian_tsa -IBUS_Armenian_KEN -IBUS_Armenian_ken -IBUS_Armenian_HO -IBUS_Armenian_ho -IBUS_Armenian_DZA -IBUS_Armenian_dza -IBUS_Armenian_GHAT -IBUS_Armenian_ghat -IBUS_Armenian_TCHE -IBUS_Armenian_tche -IBUS_Armenian_MEN -IBUS_Armenian_men -IBUS_Armenian_HI -IBUS_Armenian_hi -IBUS_Armenian_NU -IBUS_Armenian_nu -IBUS_Armenian_SHA -IBUS_Armenian_sha -IBUS_Armenian_VO -IBUS_Armenian_vo -IBUS_Armenian_CHA -IBUS_Armenian_cha -IBUS_Armenian_PE -IBUS_Armenian_pe -IBUS_Armenian_JE -IBUS_Armenian_je -IBUS_Armenian_RA -IBUS_Armenian_ra -IBUS_Armenian_SE -IBUS_Armenian_se -IBUS_Armenian_VEV -IBUS_Armenian_vev -IBUS_Armenian_TYUN -IBUS_Armenian_tyun -IBUS_Armenian_RE -IBUS_Armenian_re -IBUS_Armenian_TSO -IBUS_Armenian_tso -IBUS_Armenian_VYUN -IBUS_Armenian_vyun -IBUS_Armenian_PYUR -IBUS_Armenian_pyur -IBUS_Armenian_KE -IBUS_Armenian_ke -IBUS_Armenian_O -IBUS_Armenian_o -IBUS_Armenian_FE -IBUS_Armenian_fe -IBUS_Armenian_apostrophe -IBUS_Georgian_an -IBUS_Georgian_ban -IBUS_Georgian_gan -IBUS_Georgian_don -IBUS_Georgian_en -IBUS_Georgian_vin -IBUS_Georgian_zen -IBUS_Georgian_tan -IBUS_Georgian_in -IBUS_Georgian_kan -IBUS_Georgian_las -IBUS_Georgian_man -IBUS_Georgian_nar -IBUS_Georgian_on -IBUS_Georgian_par -IBUS_Georgian_zhar -IBUS_Georgian_rae -IBUS_Georgian_san -IBUS_Georgian_tar -IBUS_Georgian_un -IBUS_Georgian_phar -IBUS_Georgian_khar -IBUS_Georgian_ghan -IBUS_Georgian_qar -IBUS_Georgian_shin -IBUS_Georgian_chin -IBUS_Georgian_can -IBUS_Georgian_jil -IBUS_Georgian_cil -IBUS_Georgian_char -IBUS_Georgian_xan -IBUS_Georgian_jhan -IBUS_Georgian_hae -IBUS_Georgian_he -IBUS_Georgian_hie -IBUS_Georgian_we -IBUS_Georgian_har -IBUS_Georgian_hoe -IBUS_Georgian_fi -IBUS_Xabovedot -IBUS_Ibreve -IBUS_Zstroke -IBUS_Gcaron -IBUS_Ocaron -IBUS_Obarred -IBUS_xabovedot -IBUS_ibreve -IBUS_zstroke -IBUS_gcaron -IBUS_ocaron -IBUS_obarred -IBUS_SCHWA -IBUS_schwa -IBUS_Lbelowdot -IBUS_lbelowdot -IBUS_Abelowdot -IBUS_abelowdot -IBUS_Ahook -IBUS_ahook -IBUS_Acircumflexacute -IBUS_acircumflexacute -IBUS_Acircumflexgrave -IBUS_acircumflexgrave -IBUS_Acircumflexhook -IBUS_acircumflexhook -IBUS_Acircumflextilde -IBUS_acircumflextilde -IBUS_Acircumflexbelowdot -IBUS_acircumflexbelowdot -IBUS_Abreveacute -IBUS_abreveacute -IBUS_Abrevegrave -IBUS_abrevegrave -IBUS_Abrevehook -IBUS_abrevehook -IBUS_Abrevetilde -IBUS_abrevetilde -IBUS_Abrevebelowdot -IBUS_abrevebelowdot -IBUS_Ebelowdot -IBUS_ebelowdot -IBUS_Ehook -IBUS_ehook -IBUS_Etilde -IBUS_etilde -IBUS_Ecircumflexacute -IBUS_ecircumflexacute -IBUS_Ecircumflexgrave -IBUS_ecircumflexgrave -IBUS_Ecircumflexhook -IBUS_ecircumflexhook -IBUS_Ecircumflextilde -IBUS_ecircumflextilde -IBUS_Ecircumflexbelowdot -IBUS_ecircumflexbelowdot -IBUS_Ihook -IBUS_ihook -IBUS_Ibelowdot -IBUS_ibelowdot -IBUS_Obelowdot -IBUS_obelowdot -IBUS_Ohook -IBUS_ohook -IBUS_Ocircumflexacute -IBUS_ocircumflexacute -IBUS_Ocircumflexgrave -IBUS_ocircumflexgrave -IBUS_Ocircumflexhook -IBUS_ocircumflexhook -IBUS_Ocircumflextilde -IBUS_ocircumflextilde -IBUS_Ocircumflexbelowdot -IBUS_ocircumflexbelowdot -IBUS_Ohornacute -IBUS_ohornacute -IBUS_Ohorngrave -IBUS_ohorngrave -IBUS_Ohornhook -IBUS_ohornhook -IBUS_Ohorntilde -IBUS_ohorntilde -IBUS_Ohornbelowdot -IBUS_ohornbelowdot -IBUS_Ubelowdot -IBUS_ubelowdot -IBUS_Uhook -IBUS_uhook -IBUS_Uhornacute -IBUS_uhornacute -IBUS_Uhorngrave -IBUS_uhorngrave -IBUS_Uhornhook -IBUS_uhornhook -IBUS_Uhorntilde -IBUS_uhorntilde -IBUS_Uhornbelowdot -IBUS_uhornbelowdot -IBUS_Ybelowdot -IBUS_ybelowdot -IBUS_Yhook -IBUS_yhook -IBUS_Ytilde -IBUS_ytilde -IBUS_Ohorn -IBUS_ohorn -IBUS_Uhorn -IBUS_uhorn -IBUS_EcuSign -IBUS_ColonSign -IBUS_CruzeiroSign -IBUS_FFrancSign -IBUS_LiraSign -IBUS_MillSign -IBUS_NairaSign -IBUS_PesetaSign -IBUS_RupeeSign -IBUS_WonSign -IBUS_NewSheqelSign -IBUS_DongSign -IBUS_EuroSign -IBUS_zerosuperior -IBUS_foursuperior -IBUS_fivesuperior -IBUS_sixsuperior -IBUS_sevensuperior -IBUS_eightsuperior -IBUS_ninesuperior -IBUS_zerosubscript -IBUS_onesubscript -IBUS_twosubscript -IBUS_threesubscript -IBUS_foursubscript -IBUS_fivesubscript -IBUS_sixsubscript -IBUS_sevensubscript -IBUS_eightsubscript -IBUS_ninesubscript -IBUS_partdifferential -IBUS_emptyset -IBUS_elementof -IBUS_notelementof -IBUS_containsas -IBUS_squareroot -IBUS_cuberoot -IBUS_fourthroot -IBUS_dintegral -IBUS_tintegral -IBUS_because -IBUS_approxeq -IBUS_notapproxeq -IBUS_notidentical -IBUS_stricteq -IBUS_braille_dot_1 -IBUS_braille_dot_2 -IBUS_braille_dot_3 -IBUS_braille_dot_4 -IBUS_braille_dot_5 -IBUS_braille_dot_6 -IBUS_braille_dot_7 -IBUS_braille_dot_8 -IBUS_braille_dot_9 -IBUS_braille_dot_10 -IBUS_braille_blank -IBUS_braille_dots_1 -IBUS_braille_dots_2 -IBUS_braille_dots_12 -IBUS_braille_dots_3 -IBUS_braille_dots_13 -IBUS_braille_dots_23 -IBUS_braille_dots_123 -IBUS_braille_dots_4 -IBUS_braille_dots_14 -IBUS_braille_dots_24 -IBUS_braille_dots_124 -IBUS_braille_dots_34 -IBUS_braille_dots_134 -IBUS_braille_dots_234 -IBUS_braille_dots_1234 -IBUS_braille_dots_5 -IBUS_braille_dots_15 -IBUS_braille_dots_25 -IBUS_braille_dots_125 -IBUS_braille_dots_35 -IBUS_braille_dots_135 -IBUS_braille_dots_235 -IBUS_braille_dots_1235 -IBUS_braille_dots_45 -IBUS_braille_dots_145 -IBUS_braille_dots_245 -IBUS_braille_dots_1245 -IBUS_braille_dots_345 -IBUS_braille_dots_1345 -IBUS_braille_dots_2345 -IBUS_braille_dots_12345 -IBUS_braille_dots_6 -IBUS_braille_dots_16 -IBUS_braille_dots_26 -IBUS_braille_dots_126 -IBUS_braille_dots_36 -IBUS_braille_dots_136 -IBUS_braille_dots_236 -IBUS_braille_dots_1236 -IBUS_braille_dots_46 -IBUS_braille_dots_146 -IBUS_braille_dots_246 -IBUS_braille_dots_1246 -IBUS_braille_dots_346 -IBUS_braille_dots_1346 -IBUS_braille_dots_2346 -IBUS_braille_dots_12346 -IBUS_braille_dots_56 -IBUS_braille_dots_156 -IBUS_braille_dots_256 -IBUS_braille_dots_1256 -IBUS_braille_dots_356 -IBUS_braille_dots_1356 -IBUS_braille_dots_2356 -IBUS_braille_dots_12356 -IBUS_braille_dots_456 -IBUS_braille_dots_1456 -IBUS_braille_dots_2456 -IBUS_braille_dots_12456 -IBUS_braille_dots_3456 -IBUS_braille_dots_13456 -IBUS_braille_dots_23456 -IBUS_braille_dots_123456 -IBUS_braille_dots_7 -IBUS_braille_dots_17 -IBUS_braille_dots_27 -IBUS_braille_dots_127 -IBUS_braille_dots_37 -IBUS_braille_dots_137 -IBUS_braille_dots_237 -IBUS_braille_dots_1237 -IBUS_braille_dots_47 -IBUS_braille_dots_147 -IBUS_braille_dots_247 -IBUS_braille_dots_1247 -IBUS_braille_dots_347 -IBUS_braille_dots_1347 -IBUS_braille_dots_2347 -IBUS_braille_dots_12347 -IBUS_braille_dots_57 -IBUS_braille_dots_157 -IBUS_braille_dots_257 -IBUS_braille_dots_1257 -IBUS_braille_dots_357 -IBUS_braille_dots_1357 -IBUS_braille_dots_2357 -IBUS_braille_dots_12357 -IBUS_braille_dots_457 -IBUS_braille_dots_1457 -IBUS_braille_dots_2457 -IBUS_braille_dots_12457 -IBUS_braille_dots_3457 -IBUS_braille_dots_13457 -IBUS_braille_dots_23457 -IBUS_braille_dots_123457 -IBUS_braille_dots_67 -IBUS_braille_dots_167 -IBUS_braille_dots_267 -IBUS_braille_dots_1267 -IBUS_braille_dots_367 -IBUS_braille_dots_1367 -IBUS_braille_dots_2367 -IBUS_braille_dots_12367 -IBUS_braille_dots_467 -IBUS_braille_dots_1467 -IBUS_braille_dots_2467 -IBUS_braille_dots_12467 -IBUS_braille_dots_3467 -IBUS_braille_dots_13467 -IBUS_braille_dots_23467 -IBUS_braille_dots_123467 -IBUS_braille_dots_567 -IBUS_braille_dots_1567 -IBUS_braille_dots_2567 -IBUS_braille_dots_12567 -IBUS_braille_dots_3567 -IBUS_braille_dots_13567 -IBUS_braille_dots_23567 -IBUS_braille_dots_123567 -IBUS_braille_dots_4567 -IBUS_braille_dots_14567 -IBUS_braille_dots_24567 -IBUS_braille_dots_124567 -IBUS_braille_dots_34567 -IBUS_braille_dots_134567 -IBUS_braille_dots_234567 -IBUS_braille_dots_1234567 -IBUS_braille_dots_8 -IBUS_braille_dots_18 -IBUS_braille_dots_28 -IBUS_braille_dots_128 -IBUS_braille_dots_38 -IBUS_braille_dots_138 -IBUS_braille_dots_238 -IBUS_braille_dots_1238 -IBUS_braille_dots_48 -IBUS_braille_dots_148 -IBUS_braille_dots_248 -IBUS_braille_dots_1248 -IBUS_braille_dots_348 -IBUS_braille_dots_1348 -IBUS_braille_dots_2348 -IBUS_braille_dots_12348 -IBUS_braille_dots_58 -IBUS_braille_dots_158 -IBUS_braille_dots_258 -IBUS_braille_dots_1258 -IBUS_braille_dots_358 -IBUS_braille_dots_1358 -IBUS_braille_dots_2358 -IBUS_braille_dots_12358 -IBUS_braille_dots_458 -IBUS_braille_dots_1458 -IBUS_braille_dots_2458 -IBUS_braille_dots_12458 -IBUS_braille_dots_3458 -IBUS_braille_dots_13458 -IBUS_braille_dots_23458 -IBUS_braille_dots_123458 -IBUS_braille_dots_68 -IBUS_braille_dots_168 -IBUS_braille_dots_268 -IBUS_braille_dots_1268 -IBUS_braille_dots_368 -IBUS_braille_dots_1368 -IBUS_braille_dots_2368 -IBUS_braille_dots_12368 -IBUS_braille_dots_468 -IBUS_braille_dots_1468 -IBUS_braille_dots_2468 -IBUS_braille_dots_12468 -IBUS_braille_dots_3468 -IBUS_braille_dots_13468 -IBUS_braille_dots_23468 -IBUS_braille_dots_123468 -IBUS_braille_dots_568 -IBUS_braille_dots_1568 -IBUS_braille_dots_2568 -IBUS_braille_dots_12568 -IBUS_braille_dots_3568 -IBUS_braille_dots_13568 -IBUS_braille_dots_23568 -IBUS_braille_dots_123568 -IBUS_braille_dots_4568 -IBUS_braille_dots_14568 -IBUS_braille_dots_24568 -IBUS_braille_dots_124568 -IBUS_braille_dots_34568 -IBUS_braille_dots_134568 -IBUS_braille_dots_234568 -IBUS_braille_dots_1234568 -IBUS_braille_dots_78 -IBUS_braille_dots_178 -IBUS_braille_dots_278 -IBUS_braille_dots_1278 -IBUS_braille_dots_378 -IBUS_braille_dots_1378 -IBUS_braille_dots_2378 -IBUS_braille_dots_12378 -IBUS_braille_dots_478 -IBUS_braille_dots_1478 -IBUS_braille_dots_2478 -IBUS_braille_dots_12478 -IBUS_braille_dots_3478 -IBUS_braille_dots_13478 -IBUS_braille_dots_23478 -IBUS_braille_dots_123478 -IBUS_braille_dots_578 -IBUS_braille_dots_1578 -IBUS_braille_dots_2578 -IBUS_braille_dots_12578 -IBUS_braille_dots_3578 -IBUS_braille_dots_13578 -IBUS_braille_dots_23578 -IBUS_braille_dots_123578 -IBUS_braille_dots_4578 -IBUS_braille_dots_14578 -IBUS_braille_dots_24578 -IBUS_braille_dots_124578 -IBUS_braille_dots_34578 -IBUS_braille_dots_134578 -IBUS_braille_dots_234578 -IBUS_braille_dots_1234578 -IBUS_braille_dots_678 -IBUS_braille_dots_1678 -IBUS_braille_dots_2678 -IBUS_braille_dots_12678 -IBUS_braille_dots_3678 -IBUS_braille_dots_13678 -IBUS_braille_dots_23678 -IBUS_braille_dots_123678 -IBUS_braille_dots_4678 -IBUS_braille_dots_14678 -IBUS_braille_dots_24678 -IBUS_braille_dots_124678 -IBUS_braille_dots_34678 -IBUS_braille_dots_134678 -IBUS_braille_dots_234678 -IBUS_braille_dots_1234678 -IBUS_braille_dots_5678 -IBUS_braille_dots_15678 -IBUS_braille_dots_25678 -IBUS_braille_dots_125678 -IBUS_braille_dots_35678 -IBUS_braille_dots_135678 -IBUS_braille_dots_235678 -IBUS_braille_dots_1235678 -IBUS_braille_dots_45678 -IBUS_braille_dots_145678 -IBUS_braille_dots_245678 -IBUS_braille_dots_1245678 -IBUS_braille_dots_345678 -IBUS_braille_dots_1345678 -IBUS_braille_dots_2345678 -IBUS_braille_dots_12345678 -
- -
-ibusmainloop -DBusConnectionSetupFunc -DBusServerSetupFunc -ibus_mainloop_setup -ibus_dbus_server_setup -ibus_dbus_connection_setup -
- -
-ibusdbus -DBusError -DBusMessage -DBusMessageIter -DBusPendingCall -DBusServer -DBusConnection -
- -
-ibuspendingcall -IBusPendingCall -IBusPendingCallNotifyFunction -ibus_pending_call_ref -ibus_pending_call_unref -ibus_pending_call_set_notify -ibus_pending_call_cancel -ibus_pending_call_get_completed -ibus_pending_call_steal_reply -ibus_pending_call_block -ibus_pending_call_wait -ibus_pending_call_allocate_data_slot -ibus_pending_call_free_data_slot -ibus_pending_call_set_data -ibus_pending_call_get_data -
- -
-ibuserror -IBusError -ibus_error_new -ibus_error_new_from_text -ibus_error_new_from_printf -ibus_error_new_from_message -ibus_error_free -
- -
-ibusshare -IBUS_SERVICE_IBUS -IBUS_SERVICE_PANEL -IBUS_SERVICE_CONFIG -IBUS_SERVICE_NOTIFICATIONS -IBUS_PATH_IBUS -IBUS_PATH_FACTORY -IBUS_PATH_PANEL -IBUS_PATH_CONFIG -IBUS_PATH_NOTIFICATIONS -IBUS_PATH_INPUT_CONTEXT -IBUS_INTERFACE_IBUS -IBUS_INTERFACE_INPUT_CONTEXT -IBUS_INTERFACE_FACTORY -IBUS_INTERFACE_ENGINE -IBUS_INTERFACE_PANEL -IBUS_INTERFACE_CONFIG -IBUS_INTERFACE_NOTIFICATIONS -ibus_get_local_machine_id -ibus_set_display -ibus_get_address -ibus_write_address -ibus_get_user_name -ibus_get_daemon_uid -ibus_get_socket_path -ibus_keyval_name -ibus_keyval_from_name -ibus_free_strv -ibus_key_event_to_string -ibus_key_event_from_string -ibus_init -ibus_main -ibus_quit -
- -
-ibustypes -IBusModifierType -IBusCapabilite -IBusPreeditFocusMode -IBusOrientation -IBusRectangle -IBusFreeFunc -
- -
-ibusversion -IBUS_MAJOR_VERSION -IBUS_MINOR_VERSION -IBUS_MICRO_VERSION -IBUS_CHECK_VERSION -
- -
-ibusmessage -IBUS_TYPE_OBJECT_PATH -IBUS_TYPE_ARRAY -IBUS_TYPE_STRUCT -IBUS_TYPE_DICT_ENTRY -IBUS_TYPE_VARIANT -IBusMessage -IBusMessageIter -ibus_type_get_object_path -ibus_type_get_array -ibus_type_get_struct -ibus_type_get_dict_entry -ibus_type_get_variant -ibus_message_new -ibus_message_ref -ibus_message_unref -ibus_message_new_method_call -ibus_message_new_method_return -ibus_message_new_error -ibus_message_new_error_printf -ibus_message_new_signal -ibus_message_is_method_call -ibus_message_is_error -ibus_message_is_signal -ibus_message_set_destination -ibus_message_set_sender -ibus_message_set_error_name -ibus_message_set_interface -ibus_message_set_member -ibus_message_set_path -ibus_message_set_no_reply -ibus_message_set_reply_serial -ibus_message_get_type -ibus_message_get_destination -ibus_message_get_sender -ibus_message_get_error_name -ibus_message_get_error_message -ibus_message_get_interface -ibus_message_get_member -ibus_message_get_path -ibus_message_get_no_reply -ibus_message_get_reply_serial -ibus_message_get_serial -ibus_message_append_args -ibus_message_append_args_valist -ibus_message_get_args -ibus_message_get_args_valist -ibus_message_iter_init_append -ibus_message_iter_append -ibus_message_iter_copy_data -ibus_message_iter_init -ibus_message_iter_get_basic -ibus_message_iter_get -ibus_message_iter_next -ibus_message_iter_has_next -ibus_message_iter_open_container -ibus_message_iter_close_container -ibus_message_iter_recurse -ibus_message_iter_get_arg_type -ibus_message_iter_get_element_type -ibus_message_to_string -
- diff --git a/docs/reference/ibus/ibus.types b/docs/reference/ibus/ibus.types index f992c6500..016e9ceac 100644 --- a/docs/reference/ibus/ibus.types +++ b/docs/reference/ibus/ibus.types @@ -1,4 +1,3 @@ -ibus_connection_get_type ibus_hotkey_profile_get_type ibus_object_get_type ibus_config_get_type @@ -12,11 +11,9 @@ ibus_prop_state_get_type ibus_modifier_type_get_type ibus_capabilite_get_type ibus_orientation_get_type -ibus_service_get_type ibus_factory_get_type ibus_text_get_type ibus_config_service_get_type -ibus_server_get_type ibus_attribute_get_type ibus_attr_list_get_type ibus_engine_desc_get_type diff --git a/docs/reference/ibus/trim.sed b/docs/reference/ibus/trim.sed new file mode 100755 index 000000000..f310ae47f --- /dev/null +++ b/docs/reference/ibus/trim.sed @@ -0,0 +1,8 @@ +#!/bin/sed -f + +/IBusObjectFlags/d; +/IBUS_OBJECT_FLAGS/d; +/IBUS_OBJECT_SET_FLAGS/d; +/IBUS_OBJECT_UNSET_FLAGS/d; +/IBus.*Private/d; + diff --git a/engine/Makefile.am b/engine/Makefile.am new file mode 100644 index 000000000..b3b46bef5 --- /dev/null +++ b/engine/Makefile.am @@ -0,0 +1,100 @@ +# vim:set noet ts=4: +# +# ibus - The Input Bus +# +# Copyright (c) 2010, Google Inc. All rights reserved. +# Copyright (c) 2007-2010 Peng Huang +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307 USA + +libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la + +INCLUDES = \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ + $(NULL) + +AM_CFLAGS = \ + @GLIB2_CFLAGS@ \ + @GIO2_CFLAGS@ \ + @GTHREAD2_CFLAGS@ \ + $(INCLUDES) \ + -DG_LOG_DOMAIN=\"IBUS\" \ + -DPKGDATADIR=\"$(pkgdatadir)\" \ + -DLIBEXECDIR=\"$(libexecdir)\" \ + -DBINDIR=\"@bindir@\" \ + -DIBUS_DISABLE_DEPRECATED \ + -Wno-unused-variable \ + -Wno-unused-but-set-variable \ + -Wno-unused-function \ + $(NULL) + +AM_LDADD = \ + @GOBJECT2_LIBS@ \ + @GLIB2_LIBS@ \ + @GIO2_LIBS@ \ + @GTHREAD2_LIBS@ \ + $(libibus) \ + $(NULL) + +AM_VALAFLAGS = \ + --vapidir=$(top_builddir)/bindings/vala \ + --pkg=ibus-1.0 \ + $(NULL) + +libexec_PROGRAMS = \ + ibus-engine-simple \ + $(NULL) + +ibus_engine_simple_SOURCES = \ + main.vala \ + $(NULL) +ibus_engine_simple_CFLAGS = \ + $(AM_CFLAGS) \ + $(NULL) +ibus_engine_simple_LDADD = \ + $(AM_LDADD) \ + $(NULL) +ibus_engine_simple_DEPENDENCIES = \ + $(libibus) \ + $(NULL) + +component_DATA = \ + simple.xml \ + $(NULL) + +componentdir = $(pkgdatadir)/component + +CLEANFILES = \ + simple.xml \ + $(NULL) + +EXTRA_DIST = \ + simple.xml.in.in \ + $(NULL) + +simple.xml: simple.xml.in + $(AM_V_GEN) \ + ( \ + libexecdir=${libexecdir}; \ + s=`cat $<`; \ + eval "echo \"$${s}\""; \ + ) > $@ + +$(libibus): + $(MAKE) -C $(top_builddir)/src + +-include $(top_srcdir)/git.mk diff --git a/engine/gensimple.py b/engine/gensimple.py new file mode 100644 index 000000000..9dd06ead5 --- /dev/null +++ b/engine/gensimple.py @@ -0,0 +1,118 @@ +# vim:set et sts=4 sw=4: +# +# ibus - The Input Bus +# +# Copyright (c) 2007-2010 Peng Huang +# Copyright (c) 2007-2010 Red Hat, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307 USA + +import cgi +import urllib2 +from xml.dom import minidom + +def simplfy_dom(node): + name = node.nodeName + children = {} + if len(node.childNodes) == 1 and node.childNodes[0].nodeType == node.TEXT_NODE: + return name, node.childNodes[0].nodeValue + for child in node.childNodes: + if child.nodeType != node.ELEMENT_NODE: + continue + child_name, child_value = simplfy_dom(child) + if child_name not in children: + children[child_name] = [] + children[child_name].append(child_value) + return name, children + +def parse_xml(): + filename = "/usr/share/X11/xkb/rules/evdev.xml" + dom = minidom.parse(file(filename)) + name, root = simplfy_dom(dom) + + layouts = root['xkbConfigRegistry'][0]['layoutList'][0]['layout'] + for layout in layouts: + config = layout['configItem'][0] + name = config['name'][0] + short_desc = config.get('shortDescription', [''])[0] + desc = config.get('description', [''])[0] + languages = config.get('languageList', [{}])[0].get('iso639Id', []) + variants = layout.get('variantList', [{}])[0].get('variant', []) + yield name, '', short_desc, desc, languages + for variant in variants: + variant_config = variant['configItem'][0] + variant_name = variant_config['name'][0] + variant_short_desc = variant_config.get('shortDescription', [''])[0] + variant_desc = variant_config.get('description', [''])[0] + variant_languages = variant_config.get('languageList', [{}])[0].get('iso639Id', []) + if not isinstance(variant_languages, list): + variant_languages = [variant_languages] + yield name, variant_name, variant_short_desc, variant_desc, languages + variant_languages + +def gen_xml(): + header = u""" + org.freedesktop.IBus.Simple + A table based simple engine + ${libexecdir}/ibus-engine-simple + @VERSION@ + Peng Huang <shawn.p.huang@gmail.com> + GPL + http://code.google.com/p/ibus + ibus + """ + engine = u"""\t\t + %s + %s + GPL + Peng Huang <shawn.p.huang@gmail.com> + %s + %s + %s + ibus-keyboard + %d + """ + footer = u"""\t +""" + + print header + + whitelist = parse_whitelist() + for name, vname, sdesc, desc, languages in parse_xml(): + layout = "%s(%s)" % (name, vname) if vname else name + for lang in languages: + ibus_name = "xkb:%s:%s:%s" % (name, vname, lang) + if ibus_name not in whitelist: + continue + desc = cgi.escape(desc) + out = engine % (ibus_name, lang, layout, desc, desc, 99) + print out.encode("utf8") + + print footer + +def parse_whitelist(): + url = "http://git.chromium.org/gitweb/?p=chromium/chromium.git;a=blob_plain;f=chrome/browser/chromeos/input_method/ibus_input_methods.txt;hb=HEAD" + whitelist = [] + for line in urllib2.urlopen(url): + line = line.strip() + if not line: + continue + if line.startswith("#"): + continue + whitelist.append(line.split()[0]) + return set(whitelist) + +if __name__ == "__main__": + gen_xml() diff --git a/engine/main.vala b/engine/main.vala new file mode 100644 index 000000000..e1fd1294b --- /dev/null +++ b/engine/main.vala @@ -0,0 +1,67 @@ +/* vim:set et sts=4 sw=4: + * + * ibus - The Input Bus + * + * Copyright(c) 2011 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or(at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +using IBus; + +class DummyEngine : IBus.EngineSimple { +} + +public int main(string[] args) { + IBus.init(); + + IBus.Bus bus = new IBus.Bus(); + if (!bus.is_connected()) { + warning("ibus-daemon does not exist."); + return 1; + } + + uint flags = + IBus.BusNameFlag.REPLACE_EXISTING | + IBus.BusNameFlag.ALLOW_REPLACEMENT; + uint retval = bus.request_name("org.freedesktop.IBus.Simple", flags); + + if (retval == 0) { + warning("Registry bus name org.freedesktop.IBus.Simple failed!"); + return 1; + } + + bus.disconnected.connect((bus) => { + debug("bus disconnected"); + IBus.quit(); + }); + + IBus.Factory factory = new IBus.Factory(bus.get_connection()); + + int id = 0; + + factory.create_engine.connect((factory, name) => { + const string path = "/org/freedesktop/IBus/engine/simple/%d"; + IBus.Engine engine = new IBus.Engine.with_type( + typeof(IBus.EngineSimple), name, + path.printf(++id), bus.get_connection()); + return engine; + }); + + IBus.main(); + + return 0; +} diff --git a/engine/simple.xml.in.in b/engine/simple.xml.in.in new file mode 100644 index 000000000..25db57821 --- /dev/null +++ b/engine/simple.xml.in.in @@ -0,0 +1,540 @@ + + org.freedesktop.IBus.Simple + A table based simple engine + ${libexecdir}/ibus-engine-simple + @VERSION@ + Peng Huang <shawn.p.huang@gmail.com> + GPL + http://code.google.com/p/ibus + ibus + + + xkb:us::eng + eng + GPL + Peng Huang <shawn.p.huang@gmail.com> + us + English (US) + English (US) + ibus-keyboard + 99 + + + xkb:us:intl:eng + eng + GPL + Peng Huang <shawn.p.huang@gmail.com> + us(intl) + English (US, international with dead keys) + English (US, international with dead keys) + ibus-keyboard + 99 + + + xkb:us:colemak:eng + eng + GPL + Peng Huang <shawn.p.huang@gmail.com> + us(colemak) + English (Colemak) + English (Colemak) + ibus-keyboard + 99 + + + xkb:us:dvorak:eng + eng + GPL + Peng Huang <shawn.p.huang@gmail.com> + us(dvorak) + English (Dvorak) + English (Dvorak) + ibus-keyboard + 99 + + + xkb:us:altgr-intl:eng + eng + GPL + Peng Huang <shawn.p.huang@gmail.com> + us(altgr-intl) + English (international AltGr dead keys) + English (international AltGr dead keys) + ibus-keyboard + 99 + + + xkb:us:altgr-intl:eng + eng + GPL + Peng Huang <shawn.p.huang@gmail.com> + us(altgr-intl) + English (international AltGr dead keys) + English (international AltGr dead keys) + ibus-keyboard + 99 + + + xkb:be::ger + ger + GPL + Peng Huang <shawn.p.huang@gmail.com> + be + Belgian + Belgian + ibus-keyboard + 99 + + + xkb:be::nld + nld + GPL + Peng Huang <shawn.p.huang@gmail.com> + be + Belgian + Belgian + ibus-keyboard + 99 + + + xkb:be::fra + fra + GPL + Peng Huang <shawn.p.huang@gmail.com> + be + Belgian + Belgian + ibus-keyboard + 99 + + + xkb:br::por + por + GPL + Peng Huang <shawn.p.huang@gmail.com> + br + Portuguese (Brazil) + Portuguese (Brazil) + ibus-keyboard + 99 + + + xkb:bg::bul + bul + GPL + Peng Huang <shawn.p.huang@gmail.com> + bg + Bulgarian + Bulgarian + ibus-keyboard + 99 + + + xkb:bg:phonetic:bul + bul + GPL + Peng Huang <shawn.p.huang@gmail.com> + bg(phonetic) + Bulgarian (traditional phonetic) + Bulgarian (traditional phonetic) + ibus-keyboard + 99 + + + xkb:ca::fra + fra + GPL + Peng Huang <shawn.p.huang@gmail.com> + ca + French (Canada) + French (Canada) + ibus-keyboard + 99 + + + xkb:ca:eng:eng + eng + GPL + Peng Huang <shawn.p.huang@gmail.com> + ca(eng) + English (Canada) + English (Canada) + ibus-keyboard + 99 + + + xkb:hr::scr + scr + GPL + Peng Huang <shawn.p.huang@gmail.com> + hr + Croatian + Croatian + ibus-keyboard + 99 + + + xkb:cz::cze + cze + GPL + Peng Huang <shawn.p.huang@gmail.com> + cz + Czech + Czech + ibus-keyboard + 99 + + + xkb:dk::dan + dan + GPL + Peng Huang <shawn.p.huang@gmail.com> + dk + Danish + Danish + ibus-keyboard + 99 + + + xkb:ee::est + est + GPL + Peng Huang <shawn.p.huang@gmail.com> + ee + Estonian + Estonian + ibus-keyboard + 99 + + + xkb:fi::fin + fin + GPL + Peng Huang <shawn.p.huang@gmail.com> + fi + Finnish + Finnish + ibus-keyboard + 99 + + + xkb:fr::fra + fra + GPL + Peng Huang <shawn.p.huang@gmail.com> + fr + French + French + ibus-keyboard + 99 + + + xkb:de::ger + ger + GPL + Peng Huang <shawn.p.huang@gmail.com> + de + German + German + ibus-keyboard + 99 + + + xkb:de:neo:ger + ger + GPL + Peng Huang <shawn.p.huang@gmail.com> + de(neo) + German (Neo 2) + German (Neo 2) + ibus-keyboard + 99 + + + xkb:gr::gre + gre + GPL + Peng Huang <shawn.p.huang@gmail.com> + gr + Greek + Greek + ibus-keyboard + 99 + + + xkb:hu::hun + hun + GPL + Peng Huang <shawn.p.huang@gmail.com> + hu + Hungarian + Hungarian + ibus-keyboard + 99 + + + xkb:il::heb + heb + GPL + Peng Huang <shawn.p.huang@gmail.com> + il + Hebrew + Hebrew + ibus-keyboard + 99 + + + xkb:it::ita + ita + GPL + Peng Huang <shawn.p.huang@gmail.com> + it + Italian + Italian + ibus-keyboard + 99 + + + xkb:jp::jpn + jpn + GPL + Peng Huang <shawn.p.huang@gmail.com> + jp + Japanese + Japanese + ibus-keyboard + 99 + + + xkb:latam::spa + spa + GPL + Peng Huang <shawn.p.huang@gmail.com> + latam + Spanish (Latin American) + Spanish (Latin American) + ibus-keyboard + 99 + + + xkb:lt::lit + lit + GPL + Peng Huang <shawn.p.huang@gmail.com> + lt + Lithuanian + Lithuanian + ibus-keyboard + 99 + + + xkb:lv:apostrophe:lav + lav + GPL + Peng Huang <shawn.p.huang@gmail.com> + lv(apostrophe) + Latvian (apostrophe variant) + Latvian (apostrophe variant) + ibus-keyboard + 99 + + + xkb:pl::pol + pol + GPL + Peng Huang <shawn.p.huang@gmail.com> + pl + Polish + Polish + ibus-keyboard + 99 + + + xkb:pt::por + por + GPL + Peng Huang <shawn.p.huang@gmail.com> + pt + Portuguese + Portuguese + ibus-keyboard + 99 + + + xkb:ro::rum + rum + GPL + Peng Huang <shawn.p.huang@gmail.com> + ro + Romanian + Romanian + ibus-keyboard + 99 + + + xkb:ru::rus + rus + GPL + Peng Huang <shawn.p.huang@gmail.com> + ru + Russian + Russian + ibus-keyboard + 99 + + + xkb:ru:phonetic:rus + rus + GPL + Peng Huang <shawn.p.huang@gmail.com> + ru(phonetic) + Russian (phonetic) + Russian (phonetic) + ibus-keyboard + 99 + + + xkb:rs::srp + srp + GPL + Peng Huang <shawn.p.huang@gmail.com> + rs + Serbian + Serbian + ibus-keyboard + 99 + + + xkb:si::slv + slv + GPL + Peng Huang <shawn.p.huang@gmail.com> + si + Slovenian + Slovenian + ibus-keyboard + 99 + + + xkb:sk::slo + slo + GPL + Peng Huang <shawn.p.huang@gmail.com> + sk + Slovak + Slovak + ibus-keyboard + 99 + + + xkb:es::spa + spa + GPL + Peng Huang <shawn.p.huang@gmail.com> + es + Spanish + Spanish + ibus-keyboard + 99 + + + xkb:es:cat:cat + cat + GPL + Peng Huang <shawn.p.huang@gmail.com> + es(cat) + Catalan (Spain, with middle-dot L) + Catalan (Spain, with middle-dot L) + ibus-keyboard + 99 + + + xkb:se::swe + swe + GPL + Peng Huang <shawn.p.huang@gmail.com> + se + Swedish + Swedish + ibus-keyboard + 99 + + + xkb:ch::ger + ger + GPL + Peng Huang <shawn.p.huang@gmail.com> + ch + German (Switzerland) + German (Switzerland) + ibus-keyboard + 99 + + + xkb:ch:fr:fra + fra + GPL + Peng Huang <shawn.p.huang@gmail.com> + ch(fr) + French (Switzerland) + French (Switzerland) + ibus-keyboard + 99 + + + xkb:tr::tur + tur + GPL + Peng Huang <shawn.p.huang@gmail.com> + tr + Turkish + Turkish + ibus-keyboard + 99 + + + xkb:ua::ukr + ukr + GPL + Peng Huang <shawn.p.huang@gmail.com> + ua + Ukrainian + Ukrainian + ibus-keyboard + 99 + + + xkb:gb:extd:eng + eng + GPL + Peng Huang <shawn.p.huang@gmail.com> + gb(extd) + English (UK, extended WinKeys) + English (UK, extended WinKeys) + ibus-keyboard + 99 + + + xkb:gb:dvorak:eng + eng + GPL + Peng Huang <shawn.p.huang@gmail.com> + gb(dvorak) + English (UK, Dvorak) + English (UK, Dvorak) + ibus-keyboard + 99 + + + xkb:kr:kr104:kor + kor + GPL + Peng Huang <shawn.p.huang@gmail.com> + kr(kr104) + Korean (101/104 key compatible) + Korean (101/104 key compatible) + ibus-keyboard + 99 + + + diff --git a/gconf/.gitignore b/gconf/.gitignore deleted file mode 100644 index d8adae8e6..000000000 --- a/gconf/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -ibus-gconf -gconf.xml -gconf.xml.in diff --git a/gconf/config.c b/gconf/config.c deleted file mode 100644 index 6ee039b56..000000000 --- a/gconf/config.c +++ /dev/null @@ -1,349 +0,0 @@ -/* vim:set et sts=4: */ - -#include -#include -#include -#include "config.h" - -#define GCONF_PREFIX "/desktop/ibus" - -/* functions prototype */ -static void ibus_config_gconf_class_init (IBusConfigGConfClass *klass); -static void ibus_config_gconf_init (IBusConfigGConf *config); -static void ibus_config_gconf_destroy (IBusConfigGConf *config); -static gboolean ibus_config_gconf_set_value (IBusConfigService *config, - const gchar *section, - const gchar *name, - const GValue *value, - IBusError **error); -static gboolean ibus_config_gconf_get_value (IBusConfigService *config, - const gchar *section, - const gchar *name, - GValue *value, - IBusError **error); -static gboolean ibus_config_gconf_unset (IBusConfigService *config, - const gchar *section, - const gchar *name, - IBusError **error); - -static GConfValue *_to_gconf_value (const GValue *value); -static void _from_gconf_value (GValue *value, - const GConfValue *gvalue); - -static IBusConfigServiceClass *parent_class = NULL; - -GType -ibus_config_gconf_get_type (void) -{ - static GType type = 0; - - static const GTypeInfo type_info = { - sizeof (IBusConfigGConfClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) ibus_config_gconf_class_init, - NULL, - NULL, - sizeof (IBusConfigGConf), - 0, - (GInstanceInitFunc) ibus_config_gconf_init, - }; - - if (type == 0) { - type = g_type_register_static (IBUS_TYPE_CONFIG_SERVICE, - "IBusConfigGConf", - &type_info, - (GTypeFlags) 0); - } - - return type; -} - -static void -ibus_config_gconf_class_init (IBusConfigGConfClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - - parent_class = (IBusConfigServiceClass *) g_type_class_peek_parent (klass); - - IBUS_OBJECT_CLASS (object_class)->destroy = (IBusObjectDestroyFunc) ibus_config_gconf_destroy; - IBUS_CONFIG_SERVICE_CLASS (object_class)->set_value = ibus_config_gconf_set_value; - IBUS_CONFIG_SERVICE_CLASS (object_class)->get_value = ibus_config_gconf_get_value; - IBUS_CONFIG_SERVICE_CLASS (object_class)->unset = ibus_config_gconf_unset; -} - -static void -_value_changed_cb (GConfClient *client, - const gchar *key, - GConfValue *value, - IBusConfigGConf *config) -{ - gchar *p, *section, *name; - GValue v = { 0 }; - - g_return_if_fail (key != NULL); - g_return_if_fail (value != NULL); - - p = g_strdup (key); - section = p + sizeof (GCONF_PREFIX); - name = rindex (p, '/') + 1; - *(name - 1) = '\0'; - - - _from_gconf_value (&v, value); - ibus_config_service_value_changed ((IBusConfigService *) config, - section, - name, - &v); - g_free (p); - g_value_unset (&v); -} - -static void -ibus_config_gconf_init (IBusConfigGConf *config) -{ - config->client = gconf_client_get_default (); - gconf_client_add_dir (config->client, - GCONF_PREFIX, - GCONF_CLIENT_PRELOAD_RECURSIVE, - NULL); - g_signal_connect (config->client, "value-changed", G_CALLBACK (_value_changed_cb), config); -} - -static void -ibus_config_gconf_destroy (IBusConfigGConf *config) -{ - if (config->client) { - g_signal_handlers_disconnect_by_func (config->client, G_CALLBACK (_value_changed_cb), config); - g_object_unref (config->client); - config->client = NULL; - } - - IBUS_OBJECT_CLASS (parent_class)->destroy ((IBusObject *)config); -} - -static GConfValue * -_to_gconf_value (const GValue *value) -{ - GConfValue *gv; - GType type = G_VALUE_TYPE (value); - - switch (type) { - case G_TYPE_STRING: - { - gv = gconf_value_new (GCONF_VALUE_STRING); - gconf_value_set_string (gv, g_value_get_string (value)); - } - break; - case G_TYPE_INT: - { - gv = gconf_value_new (GCONF_VALUE_INT); - gconf_value_set_int (gv, g_value_get_int (value)); - } - break; - case G_TYPE_UINT: - { - gv = gconf_value_new (GCONF_VALUE_INT); - gconf_value_set_int (gv, g_value_get_uint (value)); - } - break; - case G_TYPE_BOOLEAN: - { - gv = gconf_value_new (GCONF_VALUE_BOOL); - gconf_value_set_bool (gv, g_value_get_boolean (value)); - } - break; - case G_TYPE_DOUBLE: - { - gv = gconf_value_new (GCONF_VALUE_FLOAT); - gconf_value_set_float (gv, g_value_get_double (value)); - } - break; - case G_TYPE_FLOAT: - { - gv = gconf_value_new (GCONF_VALUE_FLOAT); - gconf_value_set_float (gv, g_value_get_float (value)); - } - break; - default: - if (type == G_TYPE_VALUE_ARRAY) { - - GSList *l = NULL; - GType list_type = G_TYPE_STRING; - GValueArray *array = g_value_get_boxed (value); - gint i; - - if (array && array->n_values > 0) { - list_type = G_VALUE_TYPE (&(array->values[0])); - } - - gv = gconf_value_new (GCONF_VALUE_LIST); - - switch (list_type) { - case G_TYPE_STRING: - gconf_value_set_list_type (gv, GCONF_VALUE_STRING); break; - case G_TYPE_INT: - case G_TYPE_UINT: - gconf_value_set_list_type (gv, GCONF_VALUE_INT); break; - case G_TYPE_BOOLEAN: - gconf_value_set_list_type (gv, GCONF_VALUE_BOOL); break; - case G_TYPE_FLOAT: - case G_TYPE_DOUBLE: - gconf_value_set_list_type (gv, GCONF_VALUE_FLOAT); break; - default: - g_assert_not_reached (); - } - - for (i = 0; array && i < array->n_values; i++) { - GConfValue *tmp; - g_assert (G_VALUE_TYPE (&(array->values[i])) == list_type); - tmp = _to_gconf_value (&(array->values[i])); - l = g_slist_append (l, tmp); - } - gconf_value_set_list_nocopy (gv, l); - } - else - g_assert_not_reached (); - } - return gv; -} - -static void -_from_gconf_value (GValue *value, - const GConfValue *gv) -{ - g_assert (value); - g_assert (gv); - - switch (gv->type) { - case GCONF_VALUE_STRING: - g_value_init (value, G_TYPE_STRING); - g_value_set_string (value, gconf_value_get_string (gv)); - return; - case GCONF_VALUE_INT: - g_value_init (value, G_TYPE_INT); - g_value_set_int (value, gconf_value_get_int (gv)); - return; - case GCONF_VALUE_FLOAT: - g_value_init (value, G_TYPE_DOUBLE); - g_value_set_double (value, gconf_value_get_float (gv)); - return; - case GCONF_VALUE_BOOL: - g_value_init (value, G_TYPE_BOOLEAN); - g_value_set_boolean (value, gconf_value_get_bool (gv)); - return; - case GCONF_VALUE_LIST: - { - g_value_init (value, G_TYPE_VALUE_ARRAY); - - GSList *list, *p; - GValueArray *va; - - list = gconf_value_get_list (gv); - va = g_value_array_new (g_slist_length (list)); - for (p = list; p != NULL; p = p->next) { - GValue tmp = {0}; - _from_gconf_value (&tmp, (GConfValue *) p->data); - g_value_array_append (va, &tmp); - } - - g_value_take_boxed (value, va); - } - return; - default: - g_assert_not_reached (); - break; - } -} - - -static gboolean -ibus_config_gconf_set_value (IBusConfigService *config, - const gchar *section, - const gchar *name, - const GValue *value, - IBusError **error) -{ - gchar *key; - GConfValue *gv; - GError *gerror = NULL; - - gv = _to_gconf_value (value); - - key = g_strdup_printf (GCONF_PREFIX"/%s/%s", section, name); - - gconf_client_set (((IBusConfigGConf *)config)->client, key, gv, &gerror); - g_free (key); - gconf_value_free (gv); - - if (gerror != NULL) { - if (error) { - *error = ibus_error_new_from_text (DBUS_ERROR_FAILED, gerror->message); - g_error_free (gerror); - } - return FALSE; - } - - return TRUE; -} -static gboolean -ibus_config_gconf_get_value (IBusConfigService *config, - const gchar *section, - const gchar *name, - GValue *value, - IBusError **error) -{ - gchar *key; - GConfValue *gv; - - key = g_strdup_printf (GCONF_PREFIX"/%s/%s", section, name); - - gv = gconf_client_get (((IBusConfigGConf *) config)->client, key, NULL); - g_free (key); - - if (gv == NULL) { - *error = ibus_error_new_from_printf (DBUS_ERROR_FAILED, - "Can not get value [%s->%s]", section, name); - return FALSE; - } - - _from_gconf_value (value, gv); - gconf_value_free (gv); - return TRUE; -} -static gboolean -ibus_config_gconf_unset (IBusConfigService *config, - const gchar *section, - const gchar *name, - IBusError **error) -{ - gchar *key; - GError *gerror = NULL; - - key = g_strdup_printf (GCONF_PREFIX"/%s/%s", section, name); - - gconf_client_unset (((IBusConfigGConf *)config)->client, key, &gerror); - g_free (key); - - if (gerror != NULL) { - if (error) { - *error = ibus_error_new_from_text (DBUS_ERROR_FAILED, gerror->message); - g_error_free (gerror); - } - return FALSE; - } - - return TRUE; -} - -IBusConfigGConf * -ibus_config_gconf_new (IBusConnection *connection) -{ - IBusConfigGConf *config; - - config = (IBusConfigGConf *) g_object_new (IBUS_TYPE_CONFIG_GCONF, - "path", IBUS_PATH_CONFIG, - "connection", connection, - NULL); - return config; -} diff --git a/gconf/config.h b/gconf/config.h deleted file mode 100644 index e2b5356c2..000000000 --- a/gconf/config.h +++ /dev/null @@ -1,28 +0,0 @@ -/* vim:set et sts=4: */ -#ifndef __CONFIG_GCONF_H__ -#define __CONFIG_GCONF_H__ - -#include -#include - -#define IBUS_TYPE_CONFIG_GCONF \ - (ibus_config_gconf_get_type ()) - -typedef struct _IBusConfigGConf IBusConfigGConf; -typedef struct _IBusConfigGConfClass IBusConfigGConfClass; - -struct _IBusConfigGConf { - IBusConfigService parent; - GConfClient *client; -}; - -struct _IBusConfigGConfClass { - IBusConfigServiceClass parent; - -}; - - -GType ibus_config_gconf_get_type (void); -IBusConfigGConf *ibus_config_gconf_new (IBusConnection *connection); - -#endif diff --git a/git.mk b/git.mk new file mode 100644 index 000000000..ff5c0c3d1 --- /dev/null +++ b/git.mk @@ -0,0 +1,206 @@ +# git.mk +# +# Copyright 2009, Red Hat, Inc. +# Copyright 2010,2011 Behdad Esfahbod +# Written by Behdad Esfahbod +# +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. +# +# The canonical source for this file is https://github.com/behdad/git.mk. +# +# To use in your project, import this file in your git repo's toplevel, +# then do "make -f git.mk". This modifies all Makefile.am files in +# your project to -include git.mk. Remember to add that line to new +# Makefile.am files you create in your project, or just rerun the +# "make -f git.mk". +# +# This enables automatic .gitignore generation. If you need to ignore +# more files, add them to the GITIGNOREFILES variable in your Makefile.am. +# But think twice before doing that. If a file has to be in .gitignore, +# chances are very high that it's a generated file and should be in one +# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES. +# +# The only case that you need to manually add a file to GITIGNOREFILES is +# when remove files in one of mostlyclean-local, clean-local, distclean-local, +# or maintainer-clean-local make targets. +# +# Note that for files like editor backup, etc, there are better places to +# ignore them. See "man gitignore". +# +# If "make maintainer-clean" removes the files but they are not recognized +# by this script (that is, if "git status" shows untracked files still), send +# me the output of "git status" as well as your Makefile.am and Makefile for +# the directories involved and I'll diagnose. +# +# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see +# Makefile.am.sample in the git.mk git repo. +# +# Don't EXTRA_DIST this file. It is supposed to only live in git clones, +# not tarballs. It serves no useful purpose in tarballs and clutters the +# build dir. +# +# This file knows how to handle autoconf, automake, libtool, gtk-doc, +# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings. +# +# +# KNOWN ISSUES: +# +# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the +# submodule doesn't find us. If you have configure.{in,ac} files in +# subdirs, add a proxy git.mk file in those dirs that simply does: +# "include $(top_srcdir)/../git.mk". Add more ..'s to your taste. +# And add those files to git. See vte/gnome-pty-helper/git.mk for +# example. +# + +git-all: git-mk-install + +git-mk-install: + @echo Installing git makefile + @any_failed=; \ + find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \ + if grep 'include .*/git.mk' $$x >/dev/null; then \ + echo $$x already includes git.mk; \ + else \ + failed=; \ + echo "Updating $$x"; \ + { cat $$x; \ + echo ''; \ + echo '-include $$(top_srcdir)/git.mk'; \ + } > $$x.tmp || failed=1; \ + if test x$$failed = x; then \ + mv $$x.tmp $$x || failed=1; \ + fi; \ + if test x$$failed = x; then : else \ + echo Failed updating $$x; >&2 \ + any_failed=1; \ + fi; \ + fi; done; test -z "$$any_failed" + +.PHONY: git-all git-mk-install + + +### .gitignore generation + +$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk + $(AM_V_GEN) \ + { \ + if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \ + for x in \ + $(DOC_MODULE)-decl-list.txt \ + $(DOC_MODULE)-decl.txt \ + tmpl/$(DOC_MODULE)-unused.sgml \ + "tmpl/*.bak" \ + xml html \ + ; do echo /$$x; done; \ + fi; \ + if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \ + for x in \ + $(_DOC_C_DOCS) \ + $(_DOC_LC_DOCS) \ + $(_DOC_OMF_ALL) \ + $(_DOC_DSK_ALL) \ + $(_DOC_HTML_ALL) \ + $(_DOC_MOFILES) \ + $(_DOC_POFILES) \ + $(DOC_H_FILE) \ + "*/.xml2po.mo" \ + "*/*.omf.out" \ + ; do echo /$$x; done; \ + fi; \ + if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \ + for x in \ + $(_HELP_LC_FILES) \ + $(_HELP_LC_STAMPS) \ + $(_HELP_MOFILES) \ + ; do echo /$$x; done; \ + fi; \ + if test "x$(gsettings_SCHEMAS)" = x; then :; else \ + for x in \ + $(gsettings_SCHEMAS:.xml=.valid) \ + $(gsettings__enum_file) \ + ; do echo /$$x; done; \ + fi; \ + if test -f $(srcdir)/po/Makefile.in.in; then \ + for x in \ + po/Makefile.in.in \ + po/Makefile.in \ + po/Makefile \ + po/POTFILES \ + po/stamp-it \ + po/.intltool-merge-cache \ + "po/*.gmo" \ + "po/*.mo" \ + po/$(GETTEXT_PACKAGE).pot \ + intltool-extract.in \ + intltool-merge.in \ + intltool-update.in \ + ; do echo /$$x; done; \ + fi; \ + if test -f $(srcdir)/configure; then \ + for x in \ + autom4te.cache \ + configure \ + config.h \ + stamp-h1 \ + libtool \ + config.lt \ + ; do echo /$$x; done; \ + fi; \ + for x in \ + .gitignore \ + $(GITIGNOREFILES) \ + $(CLEANFILES) \ + $(PROGRAMS) \ + $(check_PROGRAMS) \ + $(EXTRA_PROGRAMS) \ + $(LTLIBRARIES) \ + so_locations \ + .libs _libs \ + $(MOSTLYCLEANFILES) \ + "*.$(OBJEXT)" \ + "*.lo" \ + $(DISTCLEANFILES) \ + $(am__CONFIG_DISTCLEAN_FILES) \ + $(CONFIG_CLEAN_FILES) \ + TAGS ID GTAGS GRTAGS GSYMS GPATH tags \ + "*.tab.c" \ + $(MAINTAINERCLEANFILES) \ + $(BUILT_SOURCES) \ + $(DEPDIR) \ + Makefile \ + Makefile.in \ + "*.orig" \ + "*.rej" \ + "*.bak" \ + "*~" \ + ".*.sw[nop]" \ + ".dirstamp" \ + ; do echo /$$x; done; \ + } | \ + sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \ + sed 's@/[.]/@/@g' | \ + LC_ALL=C sort | uniq > $@.tmp && \ + mv $@.tmp $@; + +all: $(srcdir)/.gitignore gitignore-recurse-maybe +gitignore-recurse-maybe: + @if test "x$(SUBDIRS)" = "x$(DIST_SUBDIRS)"; then :; else \ + $(MAKE) $(AM_MAKEFLAGS) gitignore-recurse; \ + fi; +gitignore-recurse: + @for subdir in $(DIST_SUBDIRS); do \ + case " $(SUBDIRS) " in \ + *" $$subdir "*) :;; \ + *) test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir");; \ + esac; \ + done +gitignore: $(srcdir)/.gitignore gitignore-recurse + +maintainer-clean: gitignore-clean +gitignore-clean: + -rm -f $(srcdir)/.gitignore + +.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe diff --git a/ibus-1.0.pc.in b/ibus-1.0.pc.in index 3595775a9..9f593abca 100644 --- a/ibus-1.0.pc.in +++ b/ibus-1.0.pc.in @@ -2,10 +2,12 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ +datadir=@datadir@ +pkgdatadir=@datadir@/ibus Name: IBus Description: IBus Library Version: @VERSION@ -Requires: gobject-2.0 -Libs: -L${libdir} -libus -Cflags: -I${includedir}/ibus-1.0 +Requires: gobject-2.0 gio-2.0 +Libs: -L${libdir} -libus-@IBUS_API_VERSION@ +Cflags: -I${includedir}/ibus-@IBUS_API_VERSION@ diff --git a/ibus.spec.in b/ibus.spec.in index 778d524b0..58cac3863 100644 --- a/ibus.spec.in +++ b/ibus.spec.in @@ -2,13 +2,16 @@ %{!?gtk2_binary_version: %define gtk2_binary_version %(pkg-config --variable=gtk_binary_version gtk+-2.0)} %{!?gtk3_binary_version: %define gtk3_binary_version %(pkg-config --variable=gtk_binary_version gtk+-3.0)} +# Build flags +%define build_python_library 0 + %define glib_ver %([ -a %{_libdir}/pkgconfig/glib-2.0.pc ] && pkg-config --modversion glib-2.0 | cut -d. -f 1,2 || echo -n "999") %define gconf2_version 2.12.0 %define dbus_python_version 0.83.0 %define im_chooser_version 1.2.5 Name: ibus -Version: @PACKAGE_VERSION@ +Version: @IBUS_VERSION@ Release: 1%{?dist} Summary: Intelligent Input Bus for Linux OS License: LGPLv2+ @@ -120,13 +123,16 @@ The ibus-devel-docs package contains developer documentation for ibus # %patch0 -p1 %build -%configure \ - --disable-static \ - --enable-gtk2 \ - --enable-gtk3 \ - --enable-xim \ - --disable-gtk-doc \ - --enable-introspection + +OPTIONS="--disable-static --enable-gtk2 --enable-gtk3 --enable-xim --disable-gtk-doc --enable-introspection" + +%if %{build_python_library} +OPTIONS="$OPTIONS --enable-python-library" +%else +OPTIONS="$OPTIONS --disable-python-library" +%endif + +%configure $OPTIONS # make -C po update-gmo make %{?_smp_mflags} @@ -134,7 +140,7 @@ make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install -rm -f $RPM_BUILD_ROOT%{_libdir}/libibus.la +rm -f $RPM_BUILD_ROOT%{_libdir}/libibus-1.0.la rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-2.0/%{gtk2_binary_version}/immodules/im-ibus.la rm -f $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/%{gtk3_binary_version}/immodules/im-ibus.la @@ -144,13 +150,11 @@ install -pm 644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_xinputconf} # install .desktop files echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus.desktop echo "NoDisplay=true" >> $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup.desktop -echo "X-GNOME-Autostart-enabled=false" >> $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/ibus.desktop -rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/ibus.desktop desktop-file-install --delete-original \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ $RPM_BUILD_ROOT%{_datadir}/applications/* -%find_lang %{name} +%find_lang %{name}10 %clean rm -rf $RPM_BUILD_ROOT @@ -206,27 +210,37 @@ fi %postun gtk3 %{_bindir}/gtk-query-immodules-3.0-%{__isa_bits} --update-cache -%files -f %{name}.lang +%files -f %{name}10.lang %defattr(-,root,root,-) %doc AUTHORS COPYING README -%dir %{python_sitelib}/ibus -%{python_sitelib}/ibus/* + +%if %{build_python_library} + %dir %{python_sitelib}/ibus + %{python_sitelib}/ibus/* +%endif + %dir %{_datadir}/ibus/ +%{_bindir}/ibus %{_bindir}/ibus-daemon %{_bindir}/ibus-setup %{_datadir}/ibus/* %{_datadir}/applications/* %{_datadir}/icons/hicolor/*/apps/* %{_libexecdir}/ibus-gconf -%{_libexecdir}/ibus-ui-gtk +%if %{build_python_library} + %{_libexecdir}/ibus-ui-gtk +%endif +%{_libexecdir}/ibus-ui-gtk3 %{_libexecdir}/ibus-x11 +%{_libexecdir}/ibus-engine-simple # %{_sysconfdir}/xdg/autostart/ibus.desktop %{_sysconfdir}/gconf/schemas/ibus.schemas +%{_sysconfdir}/bash_completion.d/ibus.bash %config %{_xinputconf} %files libs %defattr(-,root,root,-) -%{_libdir}/libibus.so.* +%{_libdir}/libibus-1.0.so.* %{_libdir}/girepository-1.0/IBus-1.0.typelib %files gtk2 @@ -244,11 +258,12 @@ fi %{_includedir}/* %{_datadir}/gir-1.0/IBus-1.0.gir %{_datadir}/vala/vapi/ibus-1.0.vapi +%{_datadir}/vala/vapi/ibus-1.0.deps %files devel-docs %defattr(-,root,root,-) %{_datadir}/gtk-doc/html/* %changelog -* @DATE_DISPLAY@ Peng Huang - @VERSION@-1 +* @DATE_DISPLAY@ Peng Huang - @IBUS_VERSION@-1 - Current version. diff --git a/ibus/.gitignore b/ibus/.gitignore deleted file mode 100644 index 56b6ff10a..000000000 --- a/ibus/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_config.py diff --git a/ibus/Makefile.am b/ibus/Makefile.am index d1cd750da..c71df1b76 100644 --- a/ibus/Makefile.am +++ b/ibus/Makefile.am @@ -69,3 +69,5 @@ CLEANFILES = \ DISTCLEANFILES = \ _config.py \ $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/ibus/__init__.py b/ibus/__init__.py index 7c8f8bec1..933bba7e3 100644 --- a/ibus/__init__.py +++ b/ibus/__init__.py @@ -20,6 +20,10 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA +import warnings +warnings.warn("The ibus module is deprecated; " + "Please use gobject-introspection instead", DeprecationWarning) + from object import * from attribute import * from property import * diff --git a/ibus/_config.py.in b/ibus/_config.py.in index 5aa4bd045..098d805af 100644 --- a/ibus/_config.py.in +++ b/ibus/_config.py.in @@ -24,12 +24,14 @@ __all__ = ( "get_version", "get_copyright", "get_license", - "ISOCODES_PREFIX" + "get_ICON_KEYBOARD", + "ISOCODES_PREFIX", + "_" ) import gettext -_ = lambda a: gettext.dgettext("ibus", a) +_ = lambda a: gettext.dgettext("@GETTEXT_PACKAGE@", a) def get_version(): return '@PACKAGE_VERSION@' @@ -41,4 +43,16 @@ Copyright (c) 2007-2010 Red Hat, Inc.''') def get_license(): return 'LGPL' +def get_ICON_KEYBOARD(): + import gtk + icon = '@IBUS_ICON_KEYBOARD@' + fallback_icon = 'ibus-keyboard' + settings = gtk.settings_get_default() + if settings.get_property('gtk-icon-theme-name') != 'gnome': + return fallback_icon + theme = gtk.icon_theme_get_default() + if not theme.lookup_icon(icon, 18, 0): + return fallback_icon + return icon + ISOCODES_PREFIX='@ISOCODES_PREFIX@' diff --git a/ibus/bus.py b/ibus/bus.py index 4b7e57c9d..179fd4eae 100644 --- a/ibus/bus.py +++ b/ibus/bus.py @@ -59,11 +59,14 @@ class Bus(object.Object): def __init__(self): super(Bus, self).__init__() self.__dbusconn = dbus.connection.Connection(common.get_address()) - self.__dbus = self.__dbusconn.get_object(dbus.BUS_DAEMON_NAME, - dbus.BUS_DAEMON_PATH) + _dbus = self.__dbusconn.get_object(dbus.BUS_DAEMON_NAME, + dbus.BUS_DAEMON_PATH) + self.__dbus = dbus.Interface (_dbus, dbus_interface="org.freedesktop.DBus") self.__unique_name = self.hello() - self.__ibus = self.__dbusconn.get_object(common.IBUS_SERVICE_IBUS, - common.IBUS_PATH_IBUS) + + _ibus = self.__dbusconn.get_object(common.IBUS_SERVICE_IBUS, + common.IBUS_PATH_IBUS) + self.__ibus = dbus.Interface (_ibus, dbus_interface='org.freedesktop.IBus') self.__ibus.connect_to_signal("RegistryChanged", self.__registry_changed_cb) self.__dbusconn.call_on_disconnection(self.__dbusconn_disconnected_cb) @@ -105,6 +108,12 @@ def request_name(self, name, flags): def release_name(self, name): return self.__dbus.ReleaseName(name) + def start_service_by_name(self, name, flags): + return self.__dbus.StartServiceByName(name, dbus.UInt32 (flags)) + + def list_queued_owners(self, name): + return self.__dbus.ListQueuedOwners(name) + def get_name_owner(self, name): return self.__dbus.GetNameOwner(name) @@ -128,11 +137,18 @@ def register_component(self, component): def list_engines(self): engines = self.__ibus.ListEngines() return map(serializable.deserialize_object, engines) + + def get_engines_by_names(self, names): + engines = self.__ibus.GetEnginesByNames(names) + return map(serializable.deserialize_object, engines) def list_active_engines(self): engines = self.__ibus.ListActiveEngines() return map(serializable.deserialize_object, engines) + def set_global_engine(self, name): + return self.__ibus.SetGlobalEngine(name) + def create_input_context(self, client_name): return self.__ibus.CreateInputContext(client_name) diff --git a/ibus/common.py b/ibus/common.py index b2cdc3d3f..6483aaed6 100644 --- a/ibus/common.py +++ b/ibus/common.py @@ -33,20 +33,26 @@ "ORIENTATION_HORIZONTAL", "ORIENTATION_VERTICAL", "ORIENTATION_SYSTEM", + "BUS_NAME_FLAG_ALLOW_REPLACEMENT", + "BUS_NAME_FLAG_REPLACE_EXISTING", + "BUS_NAME_FLAG_DO_NOT_QUEUE", + "BUS_REQUEST_NAME_REPLY_PRIMARY_OWNER", + "BUS_REQUEST_NAME_REPLY_IN_QUEUE", + "BUS_REQUEST_NAME_REPLY_EXISTS", + "BUS_REQUEST_NAME_REPLY_ALREADY_OWNER", "default_reply_handler", "default_error_handler", "DEFAULT_ASYNC_HANDLERS", - "CONFIG_GENERAL_SHORTCUT_TRIGGER", - "CONFIG_GENERAL_SHORTCUT_NEXT_ENGINE", - "CONFIG_GENERAL_SHORTCUT_PREV_ENGINE", "CONFIG_GENERAL_SHORTCUT_TRIGGER_DEFAULT", + "CONFIG_GENERAL_SHORTCUT_ENABLE_DEFAULT", + "CONFIG_GENERAL_SHORTCUT_DISABLE_DEFAULT", "CONFIG_GENERAL_SHORTCUT_NEXT_ENGINE_DEFAULT", "CONFIG_GENERAL_SHORTCUT_PREV_ENGINE_DEFAULT", "main", "main_quit", "main_iteration", "get_address", - "get_socket_path" + "get_socket_path", ) import os @@ -98,7 +104,7 @@ # return None # return address -libibus = ctypes.CDLL("libibus.so.2") +libibus = ctypes.CDLL("libibus-1.0.so.0") get_address = libibus.ibus_get_address get_address.restype=ctypes.c_char_p @@ -120,7 +126,7 @@ IBUS_IFACE_PANEL = "org.freedesktop.IBus.Panel" IBUS_IFACE_CONFIG = "org.freedesktop.IBus.Config" IBUS_IFACE_ENGINE = "org.freedesktop.IBus.Engine" -IBUS_IFACE_ENGINE_FACTORY = "org.freedesktop.IBus.EngineFactory" +IBUS_IFACE_ENGINE_FACTORY = "org.freedesktop.IBus.Factory" IBUS_IFACE_INPUT_CONTEXT = "org.freedesktop.IBus.InputContext" IBUS_IFACE_NOTIFICATIONS = "org.freedesktop.IBus.Notifications" @@ -133,6 +139,17 @@ ORIENTATION_VERTICAL = 1 ORIENTATION_SYSTEM = 2 +# define bus name flag +BUS_NAME_FLAG_ALLOW_REPLACEMENT = (1 << 0) +BUS_NAME_FLAG_REPLACE_EXISTING = (1 << 1) +BUS_NAME_FLAG_DO_NOT_QUEUE = (1 << 2) + +# define bus request name reply +BUS_REQUEST_NAME_REPLY_PRIMARY_OWNER = 1 +BUS_REQUEST_NAME_REPLY_IN_QUEUE = 2 +BUS_REQUEST_NAME_REPLY_EXISTS = 3 +BUS_REQUEST_NAME_REPLY_ALREADY_OWNER = 4 + def default_reply_handler( *args): pass @@ -144,14 +161,13 @@ def default_error_handler(e): "error_handler" : default_error_handler } -CONFIG_GENERAL_SHORTCUT_TRIGGER = "/general/keyboard_shortcut_trigger" CONFIG_GENERAL_SHORTCUT_TRIGGER_DEFAULT = [ - "Ctrl+space", + "Control+space", "Zenkaku_Hankaku", "Hangul"] -CONFIG_GENERAL_SHORTCUT_NEXT_ENGINE = "/general/keyboard_shortcut_next_engine" +CONFIG_GENERAL_SHORTCUT_ENABLE_DEFAULT = [] +CONFIG_GENERAL_SHORTCUT_DISABLE_DEFAULT = [] CONFIG_GENERAL_SHORTCUT_NEXT_ENGINE_DEFAULT = [] -CONFIG_GENERAL_SHORTCUT_PREV_ENGINE = "/general/keyboard_shortcut_prev_engine" CONFIG_GENERAL_SHORTCUT_PREV_ENGINE_DEFAULT = [] __mainloop = None diff --git a/ibus/component.py b/ibus/component.py index 47db7305d..7255ee1c2 100644 --- a/ibus/component.py +++ b/ibus/component.py @@ -90,10 +90,15 @@ def get_engines(self): def add_observed_path(self, path): self.__observed_paths.append(ObservedPath(path)) - def add_engine(self, name="", longname="", description="", language="", license="", author="", icon="", layout=""): - engine = EngineDesc(name, longname, description, language, license, author, icon, layout) + def add_engine(self, name="", longname="", description="", language="", license="", author="", icon="", layout="", hotkeys=""): + engine = EngineDesc(name, longname, description, language, license, author, icon, layout, hotkeys) self.__engines.append(engine) + def add_engines(self, engines): + if not isinstance(engines, list): + raise TypeError("engines must be an instance of list") + self.__engines.extend(engines) + def serialize(self, struct): super(Component, self).serialize(struct) struct.append (dbus.String(self.__name)) diff --git a/ibus/config.py b/ibus/config.py index d4d100e2d..7a0557f44 100644 --- a/ibus/config.py +++ b/ibus/config.py @@ -43,10 +43,13 @@ def __init__(self, bus): def get_value(self, section, name): pass + def get_values(self, section): + pass + def set_value(self, section, name, value): pass - def unset(self, section, name): + def unset_value(self, section, name): pass def value_changed(self, section, name, value): @@ -62,11 +65,14 @@ def __init__ (self, config, dbusconn): def GetValue(self, section, name): return self.__config.get_value(section, name) + def GetValues(self, section): + return self.__config.get_values(section) + def SetValue(self, section, name, value): return self.__config.set_value(section, name, value) - def Unset(self, section, name): - return self.__config.unset(section, name) + def UnsetValue(self, section, name): + return self.__config.unset_value(section, name) def Destroy(self): self.__config.destroy() @@ -122,7 +128,8 @@ def __init_config(self, bus_name=None): self.__bus.remove_match(match_rule % self.__bus_name) self.__bus_name = None - self.__config = self.__bus.get_dbusconn().get_object(bus_name, IBUS_PATH_CONFIG) + _config = self.__bus.get_dbusconn().get_object(bus_name, IBUS_PATH_CONFIG) + self.__config = dbus.Interface(_config, dbus_interface="org.freedesktop.IBus.Config") self.__config.connect_to_signal("ValueChanged", self.__value_changed_cb) self.__bus_name = bus_name @@ -138,6 +145,12 @@ def get_value(self, section, name, default_value): except: return default_value + def get_values(self, section): + try: + return self.__config.GetValues(section) + except: + return None + def set_value(self, section, name, value): try: return self.__config.SetValue(section, name, value) @@ -147,8 +160,8 @@ def set_value(self, section, name, value): def set_list(self, section, name, value, signature): return self.set_value(section, name, dbus.Array(value, signature=signature)) - def unset(self, section, name): + def unset_value(self, section, name): try: - return self.__config.Unset(section, name) + return self.__config.UnsetValue(section, name) except: return diff --git a/ibus/engine.py b/ibus/engine.py index b1df2fe59..d6282063e 100644 --- a/ibus/engine.py +++ b/ibus/engine.py @@ -28,11 +28,15 @@ import object import serializable import interface +from text import Text class EngineBase(object.Object): def __init__(self, bus, object_path): super(EngineBase, self).__init__() self.__proxy = EngineProxy (self, bus.get_dbusconn(), object_path) + self.__surrounding_text = Text() + self.__surrounding_cursor_pos = 0 + self.__selection_anchor_pos = 0 def process_key_event(self, keyval, keycode, state): return False @@ -46,6 +50,35 @@ def focus_out(self): def set_cursor_location(self, x, y, w, h): pass + def set_surrounding_text(self, text, cursor_pos, anchor_pos): + text = serializable.deserialize_object(text) + self.__surrounding_text = text + self.__surrounding_cursor_pos = cursor_pos + self.__selection_anchor_pos = anchor_pos + + def get_surrounding_text(self): + # Tell the client that this engine will utilize surrounding-text + # feature, which causes periodical update. Note that the client + # should request the initial surrounding-text when the engine is + # enabled. + self.__proxy.RequireSurroundingText() + return (self.__surrounding_text, self.__surrounding_cursor_pos) + + def delete_surrounding_text(self, offset_from_cursor, nchars): + # Update surrounding-text cache. This is necessary since some + # engines call get_surrounding_text() immediately after + # delete_surrounding_text(). + text = self.__surrounding_text.get_text() + cursor_pos = self.__surrounding_cursor_pos + offset_from_cursor + if cursor_pos >= 0 and len(text) - cursor_pos >= nchars: + text = text[cursor_pos + nchars:] + self.__surrounding_text = Text(text) + self.__surrounding_cursor_pos = cursor_pos + else: + self.__surrounding_text = Text() + self.__surrounding_cursor_pos = 0 + self.__proxy.DeleteSurroundingText(offset_from_cursor, nchars) + def set_capabilities(self, cap): pass @@ -83,8 +116,8 @@ def commit_text(self, text): text = serializable.serialize_object(text) return self.__proxy.CommitText(text) - def forward_key_event(self, keyval, state): - return self.__proxy.ForwardKeyEvent(keyval, state) + def forward_key_event(self, keyval, keycode, state): + return self.__proxy.ForwardKeyEvent(keyval, keycode, state) def update_preedit_text(self, text, cursor_pos, visible, mode=common.IBUS_ENGINE_PREEDIT_CLEAR): text = serializable.serialize_object(text) @@ -163,6 +196,9 @@ def FocusOut(self): def SetCursorLocation(self, x, y, w, h): return self.__engine.set_cursor_location(x, y, w, h) + def SetSurroundingText(self, text, cursor_pos, anchor_pos): + return self.__engine.set_surrounding_text(text, cursor_pos, anchor_pos) + def SetCapabilities(self, caps): return self.__engine.set_capabilities(caps) @@ -203,4 +239,3 @@ def Destroy(self): self.__engine.destroy() self.__engine = None self.remove_from_connection () - diff --git a/ibus/enginedesc.py b/ibus/enginedesc.py index 3193932a5..055a3a0d7 100644 --- a/ibus/enginedesc.py +++ b/ibus/enginedesc.py @@ -31,7 +31,7 @@ class EngineDesc(Serializable): __gtype_name__ = "PYIBusEngineDesc" __NAME__ = "IBusEngineDesc" - def __init__(self, name="", longname="", description="", language="", license="", author="", icon="", layout="", rank=0): + def __init__(self, name="", longname="", description="", language="", license="", author="", icon="", layout="", hotkeys="", rank=0, symbol="", setup=""): super(EngineDesc, self).__init__() self.__name = name self.__longname = longname @@ -41,7 +41,10 @@ def __init__(self, name="", longname="", description="", language="", license="" self.__author = author self.__icon = icon self.__layout = layout - self.__rank = rank; + self.__rank = rank + self.__hotkeys = hotkeys + self.__symbol = symbol + self.__setup = setup def get_name(self): return self.__name @@ -70,6 +73,15 @@ def get_layout(self): def get_rank(self): return self.__rank + def get_hotkeys(self): + return self.__hotkeys + + def get_symbol(self): + return self.__symbol + + def get_setup(self): + return self.__setup + name = property(get_name) longname = property(get_longname) description = property(get_description) @@ -79,6 +91,9 @@ def get_rank(self): icon = property(get_icon) layout = property(get_layout) rank = property(get_rank) + hotkeys = property(get_hotkeys) + symbol = property(get_symbol) + setup = property(get_setup) def serialize(self, struct): super(EngineDesc, self).serialize(struct) @@ -91,6 +106,9 @@ def serialize(self, struct): struct.append(dbus.String(self.__icon)) struct.append(dbus.String(self.__layout)) struct.append(dbus.UInt32(self.__rank)) + struct.append(dbus.String(self.__hotkeys)) + struct.append(dbus.String(self.__symbol)) + struct.append(dbus.String(self.__setup)) def deserialize(self, struct): super(EngineDesc, self).deserialize(struct) @@ -103,9 +121,12 @@ def deserialize(self, struct): self.__icon = struct.pop(0) self.__layout = struct.pop(0) self.__rank = struct.pop(0) + self.__hotkeys = struct.pop(0) + self.__symbol = struct.pop(0) + self.__setup = struct.pop(0) def test(): - engine = EngineDesc("Hello", "", "", "", "", "", "", "") + engine = EngineDesc("Hello", "", "", "", "", "", "", "", "", 0, "", "") value = serialize_object(engine) engine = deserialize_object(value) diff --git a/ibus/inputcontext.py b/ibus/inputcontext.py index 9bec0a8cf..a2989091a 100644 --- a/ibus/inputcontext.py +++ b/ibus/inputcontext.py @@ -31,6 +31,7 @@ import object import common import serializable +from text import Text class InputContext(object.Object): __gtype_name__ = "PYIBusInputContext" @@ -115,14 +116,29 @@ class InputContext(object.Object): gobject.TYPE_NONE, () ), + "forward-key-event" : ( + gobject.SIGNAL_RUN_LAST, + gobject.TYPE_NONE, + (gobject.TYPE_UINT, gobject.TYPE_UINT, gobject.TYPE_UINT) + ), + "delete-surrounding-text" : ( + gobject.SIGNAL_RUN_LAST, + gobject.TYPE_NONE, + (gobject.TYPE_INT, gobject.TYPE_UINT) + ), } def __init__(self, bus, path, watch_signals=False): super(InputContext, self).__init__() self.__bus = bus - self.__context = bus.get_dbusconn().get_object(common.IBUS_SERVICE_IBUS, path) + _context = bus.get_dbusconn().get_object(common.IBUS_SERVICE_IBUS, path) + self.__context = dbus.Interface(_context, dbus_interface="org.freedesktop.IBus.InputContext") self.__signal_matches = [] + self.__needs_surrounding_text = False + self.__surrounding_text = Text() + self.__surrounding_cursor_pos = 0 + self.__selection_anchor_pos = 0 if not watch_signals: return @@ -135,8 +151,12 @@ def __init__(self, bus, path, watch_signals=False): self.__signal_matches.append(m) m = self.__context.connect_to_signal("UpdateLookupTable", self.__update_lookup_table_cb) self.__signal_matches.append(m) + m = self.__context.connect_to_signal("RequireSurroundingText", self.__require_surrounding_text_cb) + self.__signal_matches.append(m) - m = self.__context.connect_to_signal("Enabled", lambda *args: self.emit("enabled")) + m = self.__context.connect_to_signal("ForwardKeyEvent", lambda *args: self.emit("forward-key-event", *args)) + self.__signal_matches.append(m) + m = self.__context.connect_to_signal("DeleteSurroundingText", lambda *args: self.emit("delete-surrounding-text", *args)) self.__signal_matches.append(m) m = self.__context.connect_to_signal("Disabled", lambda *args: self.emit("disabled")) self.__signal_matches.append(m) @@ -181,6 +201,24 @@ def __update_lookup_table_cb(self, *args): visible = args[1] self.emit("update-lookup-table", table, visible) + def __require_surrounding_text_cb(self, *args): + self.__needs_surrounding_text = True + + def needs_surrounding_text(self): + return self.__needs_surrounding_text + + def set_surrounding_text(self, text, cursor_pos, anchor_pos): + if self.__surrounding_text.get_text() != text or \ + self.__surrounding_cursor_pos != cursor_pos or \ + self.__selection_anchor_pos != anchor_pos: + self.__surrounding_text = Text(text) + self.__surrounding_cursor_pos = cursor_pos + self.__selection_anchor_pos = anchor_pos + text = serializable.serialize_object(self.__surrounding_text) + cursor_pos = dbus.UInt32(self.__surrounding_cursor_pos) + anchor_pos = dbus.UInt32(self.__selection_anchor_pos) + self.__context.SetSurroundingText(text, cursor_pos, anchor_pos) + def process_key_event(self, keyval, keycode, modifiers): keyval = dbus.UInt32(keyval) keycode = dbus.UInt32(keycode) @@ -203,15 +241,6 @@ def focus_out(self): def reset(self): return self.__context.Reset() - def enable(self): - return self.__context.Enable() - - def disable(self): - return self.__context.Disable() - - def is_enabled(self): - return self.__context.IsEnabled() - def set_capabilities(self, caps): caps = dbus.UInt32(caps) return self.__context.SetCapabilities(caps) @@ -223,7 +252,6 @@ def detach_signals(self): def destroy(self): self.detach_signals() - self.__context.Destroy() super(InputContext, self).destroy() def get_engine(self): @@ -270,8 +298,6 @@ def __init__(self): self.__context.connect("show-preedit-text", self.__show_preedit_text_cb) self.__context.connect("update-auxiliary-text", self.__update_auxiliary_text_cb) self.__context.connect("update-lookup-table", self.__update_lookup_table_cb) - self.__context.connect("enabled", self.__enabled_cb) - self.__context.connect("disabled", self.__disabled_cb) self.set_events(gtk.gdk.KEY_PRESS_MASK | gtk.gdk.KEY_RELEASE_MASK | gtk.gdk.FOCUS_CHANGE_MASK) @@ -301,14 +327,6 @@ def __update_auxiliary_text_cb(self, context, text, visible): def __update_lookup_table_cb(self, context, table, visible): print "update-lookup-table:", visible - def __enabled_cb(self, context): - print "enabled" - info = context.get_factory_info() - print "factory = %s" % info.name - - def __disabled_cb(self, context): - print "disabled" - def __key_press_event_cb(self, widget, event): self.__context.process_key_event(event.keyval, event.state) @@ -320,4 +338,3 @@ def __key_release_event_cb(self, widget, event): if __name__ == "__main__": test() - diff --git a/ibus/interface/Makefile.am b/ibus/interface/Makefile.am index 49871ed2b..2d9ae4226 100644 --- a/ibus/interface/Makefile.am +++ b/ibus/interface/Makefile.am @@ -37,3 +37,5 @@ CLEANFILES = \ *.pyc \ $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/ibus/interface/iconfig.py b/ibus/interface/iconfig.py index 34dd97283..5f3f0404f 100644 --- a/ibus/interface/iconfig.py +++ b/ibus/interface/iconfig.py @@ -46,9 +46,15 @@ class IConfig(dbus.service.Object): @method(in_signature="ss", out_signature="v") def GetValue(self, section, name): pass + @method(in_signature="s", out_signature="s{sv}") + def GetValues(self, section): pass + @method(in_signature="ssv") def SetValue(self, section, name, value): pass + @method(in_signature="ss") + def UnsetValue(self, section, name): pass + @method() def Destroy(self): pass diff --git a/ibus/interface/iengine.py b/ibus/interface/iengine.py index 4d42c2d53..d04e70a2c 100644 --- a/ibus/interface/iengine.py +++ b/ibus/interface/iengine.py @@ -50,6 +50,9 @@ def ProcessKeyEvent(self, keyval, keycode, state): @method(in_signature="iiii") def SetCursorLocation(self, x, y, w, h): pass + @method(in_signature="vuu") + def SetSurroundingText(self, text, cursor_index, anchor_pos): pass + @method(in_signature="u") def SetCapabilities(self, cap): pass @@ -85,7 +88,7 @@ def Enable(self): pass @method() def Disable(self): pass - @method(in_signature="si") + @method(in_signature="su") def PropertyActivate(self, prop_name, prop_state): pass @method(in_signature="s") @@ -101,8 +104,8 @@ def Destroy(self): pass @signal(signature="v") def CommitText(self, text): pass - @signal(signature="uu") - def ForwardKeyEvent(self, keyval, state): pass + @signal(signature="uuu") + def ForwardKeyEvent(self, keyval, keycode, state): pass @signal(signature="vubu") def UpdatePreeditText(self, text, cursor_pos, visible, mode): pass @@ -149,3 +152,8 @@ def RegisterProperties(self, props): pass @signal(signature="v") def UpdateProperty(self, prop): pass + @signal(signature="iu") + def DeleteSurroundingText(self, offset_from_cursor, nchars): pass + + @signal() + def RequireSurroundingText(self): pass diff --git a/ibus/interface/iibus.py b/ibus/interface/iibus.py index e63caa392..99874c415 100644 --- a/ibus/interface/iibus.py +++ b/ibus/interface/iibus.py @@ -62,10 +62,16 @@ def RegisterComponent(self, components, dbusconn): pass @method(out_signature="av") def ListEngines(self, dbusconn): pass + + @method(in_signature="as", out_signature="av") + def GetEnginesByNames(self, names, dbusconn): pass @method(out_signature="av") def ListActiveEngines(self, dbusconn): pass + @method(in_signature="s") + def SetGlobalEngine(self, name, dbusconn):pass + @method(in_signature="b") def Exit(self, restart, dbusconn): pass diff --git a/ibus/interface/iinputcontext.py b/ibus/interface/iinputcontext.py index 89f6dbdb3..62047919f 100644 --- a/ibus/interface/iinputcontext.py +++ b/ibus/interface/iinputcontext.py @@ -49,6 +49,9 @@ def ProcessKeyEvent(self, keyval, keycode, state, reply_cb, error_cb): pass @method(in_signature="iiii") def SetCursorLocation(self, x, y, w, h): pass + @method(in_signature="vuu") + def SetSurroundingText(self, text, cursor_index, anchor_pos): pass + @method() def FocusIn(self): pass @@ -58,15 +61,6 @@ def FocusOut(self): pass @method() def Reset(self): pass - @method() - def Enable(self): pass - - @method() - def Disable(self): pass - - @method(out_signature="b") - def IsEnabled(self): pass - @method(in_signature="u") def SetCapabilities(self, caps): pass @@ -83,15 +77,12 @@ def Destroy(self): pass @signal(signature="v") def CommitText(self, text): pass - @signal() - def Enabled(self): pass - - @signal() - def Disabled(self): pass - @signal(signature="uuu") def ForwardKeyEvent(self, keyval, keycode, state): pass + @signal(signature="iu") + def DeleteSurroundingText(self, offset_from_cursor, nchars): pass + @signal(signature="vub") def UpdatePreeditText(self, text, cursor_pos, visible): pass @@ -136,5 +127,3 @@ def RegisterProperties(self, props): pass @signal(signature="v") def UpdateProperty(self, prop): pass - - diff --git a/ibus/interface/ipanel.py b/ibus/interface/ipanel.py index 4e946801a..26b6b03d9 100644 --- a/ibus/interface/ipanel.py +++ b/ibus/interface/ipanel.py @@ -130,7 +130,7 @@ def CandidateClicked(self, index, button, state): pass @signal() def CursorDown(self): pass - @signal(signature="si") + @signal(signature="su") def PropertyActivate(self, prop_name, prop_state): pass @signal(signature="s") diff --git a/ibus/property.py b/ibus/property.py index d4f87ecb3..a7ea5a955 100644 --- a/ibus/property.py +++ b/ibus/property.py @@ -185,7 +185,7 @@ def __init__(self): def append(self, prop): self.__props.append(prop) - def prepand(self, prop): + def prepend(self, prop): self.__props.insert(0, prop) def insert(self, index, prop): diff --git a/m4/.gitignore b/m4/.gitignore deleted file mode 100644 index 0f4126cd6..000000000 --- a/m4/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.m4 diff --git a/m4/Makefile.am b/m4/Makefile.am index 7c74bf443..3454042f5 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -23,3 +23,12 @@ EXTRA_DIST = \ as-version.m4 \ $(NULL) + +GITIGNOREFILES = \ + gtk-doc.m4 \ + intltool.m4 \ + libtool.m4 \ + lt*.m4 \ + $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/m4/introspection.m4 b/m4/introspection.m4 new file mode 100644 index 000000000..589721c5a --- /dev/null +++ b/m4/introspection.m4 @@ -0,0 +1,94 @@ +dnl -*- mode: autoconf -*- +dnl Copyright 2009 Johan Dahlin +dnl +dnl This file is free software; the author(s) gives unlimited +dnl permission to copy and/or distribute it, with or without +dnl modifications, as long as this notice is preserved. +dnl + +# serial 1 + +m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], +[ + AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first + AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + AC_BEFORE([LT_INIT],[$0])dnl setup libtool first + + dnl enable/disable introspection + m4_if([$2], [require], + [dnl + enable_introspection=yes + ],[dnl + AC_ARG_ENABLE(introspection, + AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], + [Enable introspection for this build]),, + [enable_introspection=auto]) + ])dnl + + AC_MSG_CHECKING([for gobject-introspection]) + + dnl presence/version checking + AS_CASE([$enable_introspection], + [no], [dnl + found_introspection="no (disabled, use --enable-introspection to enable)" + ],dnl + [yes],[dnl + PKG_CHECK_EXISTS([gobject-introspection-1.0],, + AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) + PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], + found_introspection=yes, + AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) + ],dnl + [auto],[dnl + PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) + ],dnl + [dnl + AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) + ])dnl + + AC_MSG_RESULT([$found_introspection]) + + INTROSPECTION_SCANNER= + INTROSPECTION_COMPILER= + INTROSPECTION_GENERATE= + INTROSPECTION_GIRDIR= + INTROSPECTION_TYPELIBDIR= + if test "x$found_introspection" = "xyes"; then + INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` + INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` + INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` + INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` + INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" + INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` + INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` + INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection + fi + AC_SUBST(INTROSPECTION_SCANNER) + AC_SUBST(INTROSPECTION_COMPILER) + AC_SUBST(INTROSPECTION_GENERATE) + AC_SUBST(INTROSPECTION_GIRDIR) + AC_SUBST(INTROSPECTION_TYPELIBDIR) + AC_SUBST(INTROSPECTION_CFLAGS) + AC_SUBST(INTROSPECTION_LIBS) + AC_SUBST(INTROSPECTION_MAKEFILE) + + AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") +]) + + +dnl Usage: +dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) + +AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], +[ + _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) +]) + +dnl Usage: +dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) + + +AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], +[ + _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) +]) diff --git a/po/.gitignore b/po/.gitignore deleted file mode 100644 index 88df1daca..000000000 --- a/po/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -Makefile -Makefile.in -Makefile.in.in -Makevars.template -POTFILES -Rules-quot -boldquot.sed -en@boldquot.header -en@quot.header -insert-header.sin -quot.sed -remove-potcdate.sed -remove-potcdate.sin -*.gmo -stamp-po -stamp-it -ibus.pot diff --git a/po/LINGUAS b/po/LINGUAS index 414144b02..10191ae9b 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -4,7 +4,9 @@ bn_IN ca da de +en_GB es +fa fr gu hi @@ -13,16 +15,21 @@ it ja kn ko +lv ml mr +nl or pa pl +pt_BR ru sr sr@latin ta te +tg +uk vi zh_CN zh_HK diff --git a/po/POTFILES.in b/po/POTFILES.in index cfa9c7c23..6121f10bf 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,12 +1,12 @@ src/ibusbus.c src/ibusconfig.c -src/ibusconnection.c src/ibusengine.c +src/ibusfactory.c src/ibushotkey.c src/ibusinputcontext.c src/ibusobject.c +src/ibuspanelservice.c src/ibusproxy.c -src/ibusserver.c src/ibusservice.c src/keyname-table.h bus/ibus.desktop.in diff --git a/po/ar.po b/po/ar.po index 84c99d1fa..a4144f840 100644 --- a/po/ar.po +++ b/po/ar.po @@ -3,15 +3,15 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: ibus\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" +"POT-Creation-Date: 2011-02-12 00:41+0900\n" "PO-Revision-Date: 2009-04-06 11:45+0800\n" "Last-Translator: Muayyad Alsadi \n" "Language-Team: Arabic \n" +"Language: ar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -30,7 +30,7 @@ msgstr "إطار إطرق الإدخال IBUS" msgid "Start IBus Input Method Framework" msgstr "إطار إطرق الإدخال IBUS" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -40,111 +40,119 @@ msgstr "" msgid "Other" msgstr "أخرى" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 #, fuzzy msgid "Previous page" msgstr "طريقة الإدخال السابقة" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 #, fuzzy msgid "Restart Now" msgstr "إعادة تشغيل" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 #, fuzzy msgid "Later" msgstr "أخرى" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "إطار إطرق الإدخال IBUS" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "إعادة تشغيل" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 #, fuzzy msgid "Turn off input method" msgstr "لا يوجد طريقة إدخال" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "نظام IBus هو ناقل إدخال ذكي لنظام لينكس ويونكس." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "Muayyad Alsadi " -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 #, fuzzy msgid "About the input method" msgstr "طرق الإدخال" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "تبديل طريقة الإدخال" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "حول" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 #, fuzzy msgid "About the Input Method" msgstr "طرق الإدخال" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, fuzzy, python-format msgid "Keyboard layout: %s\n" msgstr "اختصارات لوحة المفاتيح" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "زناد" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "" + +#: ../setup/main.py:135 msgid "next input method" msgstr "طريقة الإدخال التالية" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "طريقة الإدخال السابقة" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "خادم IBUS لم يبدأ من قبل. هل تريد تشغيله الآن؟" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" "IBus has been started! If you can not use IBus, please add below lines in " "$HOME/.bashrc, and relogin your desktop.\n" @@ -153,24 +161,24 @@ msgid "" " export QT_IM_MODULE=ibus" msgstr "" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "اختر الاختصار ل %s" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "اختصارات لوحة المفاتيح" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "كود المفتاح" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -178,7 +186,7 @@ msgstr "" "فضلا اضغط مفتاح أو (عدة مفاتيح).\n" "صندوق الحوار سيغلق عند ترك المفتاح." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "فضلا اضغط مفتاح أو عدة مفاتيح" @@ -187,16 +195,16 @@ msgid "Select an input method" msgstr "اختر طريقة الإدخال" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 #, fuzzy msgid "Input Method" msgstr "طرق الإدخال" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "تفضيلات IBus" @@ -269,11 +277,11 @@ msgstr "المحركات المحملة مسبقا عند بدء ibus" msgid "Prev engine shortcut keys" msgstr "مفتاح المحرك السابق" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "" @@ -282,7 +290,7 @@ msgstr "" msgid "Show input method name" msgstr "اسم الخط المخصص للوحة اللغة" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:45 #, fuzzy msgid "Show input method name on language bar" msgstr "اسم الخط المخصص للوحة اللغة" @@ -307,7 +315,7 @@ msgstr "" msgid "The shortcut keys for switching to the previous input method" msgstr "" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "" @@ -329,11 +337,11 @@ msgstr "استخدم خط مخصص في لوحة اللغة" msgid "Use global input method" msgstr "اختر طريقة الإدخال" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "" @@ -414,108 +422,116 @@ msgid "Custom" msgstr "خط مخصص:" #: ../setup/setup.ui.h:24 -msgid "Embed preedit text in application window" +msgid "Disable:" msgstr "" #: ../setup/setup.ui.h:25 -msgid "Embed the preedit text of input method in the application window" +msgid "Embed preedit text in application window" msgstr "" #: ../setup/setup.ui.h:26 -msgid "Embedded in menu" +msgid "Embed the preedit text of input method in the application window" msgstr "" #: ../setup/setup.ui.h:27 +msgid "Embedded in menu" +msgstr "" + +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "تفعيّل أو تثبيط:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "عام" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 #, fuzzy msgid "Horizontal" msgstr "" "أفقي\n" "عمودي" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 #, fuzzy msgid "Language panel position:" msgstr "إظهار لوحة اللغات:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "طريقة الإدخال التالية" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "طريقة الإدخال السابقة" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 #, fuzzy msgid "Show input method's name on language bar when check the checkbox" msgstr "اسم الخط المخصص للوحة اللغة" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "إظهار لوحة اللغات:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "بدء ibus عند الولوج" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 #, fuzzy msgid "Use custom font:" msgstr "استعمال خط مخصص" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 #, fuzzy msgid "When active" msgstr "" diff --git a/po/as.po b/po/as.po index 615b41187..2b1ad482f 100644 --- a/po/as.po +++ b/po/as.po @@ -1,37 +1,40 @@ +# translation of ibus.pot to Assamese +# Assamese translation of ibus. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# This file is distributed under the same license as the ibus package. # # Amitakhya Phukan , 2009. # Amitakhya Phukan , 2010. +# ngoswami , 2011. msgid "" msgstr "" "Project-Id-Version: ibus.master.ibus.as\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-05-05 16:04+0530\n" -"Last-Translator: Amitakhya Phukan \n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-03-08 12:32+0900\n" +"PO-Revision-Date: 2011-03-23 10:15+0000\n" +"Last-Translator: ngoswami \n" "Language-Team: Assamese \n" +"Language: as\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 1.0\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + #: ../bus/ibus.desktop.in.h:1 msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus input method framework" +msgstr "ইনপুট পদ্ধতি গাথনি" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus input method framework" +msgstr "IBus ইনপুট পদ্ধতি গাথনি আৰম্ভ কৰা" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -43,138 +46,145 @@ msgstr "" msgid "Other" msgstr "অন্য" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "পূৰ্ববৰ্তী পৃষ্ঠা" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "পৰবৰ্তী পৃষ্ঠা" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" -"কিছুমান নিবেশ পদ্ধতিক সংস্থাপন, আঁতৰুৱা বা উন্নত কৰা হৈছে । অনুগ্ৰহ কৰি ibus নিবেশৰ " -"মঞ্চ পুনৰাৰম্ভ কৰক ।" +"কিছুমান নিবেশ পদ্ধতিক সংস্থাপন, আঁতৰুৱা বা উন্নত কৰা হৈছে । অনুগ্ৰহ কৰি ibus" +" নিবেশৰ মঞ্চ পুনৰাৰম্ভ কৰক ।" -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 msgid "Restart Now" msgstr "এতিয়া পুনৰাৰম্ভ কৰক" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 msgid "Later" msgstr "পিছত" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "IBus input method framework" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "পুনৰাৰম্ভ" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 msgid "Turn off input method" msgstr "নিবেশ পদ্ধতি বন্ধ কৰক" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "নিবেশৰ সংযোগক্ষেত্ৰ নাই" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus এটা Linux/Unix ৰ কাৰণে বুদ্ধিমান নিবেশ bus ।" -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "অমিতাক্ষ ফুকন (aphukan@fedoraproject.org)" -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "নিবেশ পদ্ধতিৰ বিষয়ে" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "নিবেশ পদ্ধতি সলনি কৰক" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "বিষয়ে" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "নিবেশ পদ্ধতিৰ বিষয়ে" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "ভাষা: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "চাবিৰ ফলকৰ বিন্যাস: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "লিখক: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "বিৱৰণ:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "ট্ৰিগাৰ" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "সামৰ্থবান কৰা" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "অসামৰ্থবান কৰা" + +#: ../setup/main.py:135 msgid "next input method" msgstr "পিছৰ নিবেশ পদ্ধতি" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "আগৰ নিবেশ পদ্ধতি" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" -msgstr "IBus ডেমন আৰম্ভ কৰা হোৱা নাই । আপুনি ইয়াক এতিয়া আৰম্ভ কৰিব বিচাৰে নেকি ?" +msgstr "" +"IBus ডেমন আৰম্ভ কৰা হোৱা নাই । আপুনি ইয়াক এতিয়া আৰম্ভ কৰিব বিচাৰে নেকি ?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus আৰম্ভ কৰা হ'ল! IBus ব্যৱহাৰ কৰিব নোৱাৰিলে, এই শাৰী$HOME/.bashrc ত যোগ " -"দিয়ক, আৰু আপোনাৰ ডেষ্কট'পত পুনঃ প্ৰৱেশ কৰক ।\n" +"IBus আৰম্ভ কৰা হ'ল! IBus ব্যৱহাৰ কৰিব নোৱাৰিলে, এই শাৰী$HOME/.bashrc ত যোগ দিয়ক, আৰু আপোনাৰ ডেষ্কট'পত পুনঃ প্ৰৱেশ কৰক ।\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "%s ৰ কাৰণে চাবিফলকৰ চমুপথ নিৰ্ব্বাচন কৰক" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "কীবৰ্ডৰ চমুপথবোৰ" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "চাবিৰ কোড:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "পৰিবৰ্তক:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -182,7 +192,7 @@ msgstr "" "অনুগ্ৰহ কৰি এটা চাবি টিপক (বা এটা চাবিৰ মিশ্ৰণ) ।\n" "চাবি এৰিলে সম্বাদ বন্ধ হ'ব ।" -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "অনুগ্ৰহ কৰি এটা চাবি টিপক (বা এটা চাবিৰ মিশ্ৰণ)" @@ -191,22 +201,21 @@ msgid "Select an input method" msgstr "এটা নিবেশ পদ্ধতি নিৰ্ব্বাচন কৰক" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "নিবেশ পদ্ধতি" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus পছন্দ" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "IBus পছন্দ" +msgstr "IBus পছন্দসমূহ সংহতি কৰক" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -221,75 +230,84 @@ msgid "Custom font name for language panel" msgstr "ভাষাৰ পেনেলৰ বাবে স্বনিৰ্বাচিত ফন্ট" #: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "চৰ্টকাট কিসমূহ অসামৰ্থবান কৰক" + +#: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text" msgstr "প্ৰিএডিট টেক্সট প্ৰোথিত কৰক" -#: ../data/ibus.schemas.in.h:5 +#: ../data/ibus.schemas.in.h:6 msgid "Embed Preedit Text in Application Window" msgstr "অনুপ্ৰয়োগৰ সংযোগক্ষেত্ৰত প্ৰিএডিট টেক্সট প্ৰোথিত কৰক" -#: ../data/ibus.schemas.in.h:6 -#, fuzzy +#: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default" -msgstr "পিছৰ নিবেশ পদ্ধতি" +msgstr "ইনপুট পদ্ধতি অবিকল্পিতভাৱে সামৰ্থবান কৰক" -#: ../data/ibus.schemas.in.h:7 +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "" +"যেতিয়া অনুপ্ৰয়োগে ইনপুট ফকাচ প্ৰাপ্ত কৰে তেতিয়া অবিকল্পিতভাৱে ইনপুট পদ্ধতি " +"সামৰ্থবান কৰা" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "চৰ্টকাট কিসমূহ সামৰ্থবান কৰা" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "ভাষাৰ পেনেলৰ স্থান" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" msgstr "পৰবৰ্তী কলঘৰৰ বাবে ছৰ্টকাট চাবি" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "লুক-আপ টেবুলৰ দিশ" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "লুকআপ টেবুলৰ দিশ । ০ = অনুভূমিক, ১ = উলম্ব" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "কলঘৰ আগতে তুলি লোৱা হ'ব" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "ibus আৰম্ভৰ আগতে কলঘৰ তুলি লওক" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" msgstr "পূৰ্ববৰ্তী কলঘৰৰ ছৰ্টকাট চাবি" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "সকলো অনুপ্ৰয়োগৰ মাজত একেই নিবেশ পদ্ধতি অংশীদাৰ কৰক" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "প্ৰণালী ট্ৰত আইকন প্ৰদৰ্শন কৰা হ'ব" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "নিবেশ পদ্ধতিৰ নাম দেখুৱাব" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "ভাষাৰ বাৰত নিবেশ পদ্ধতিৰ নাম দেখুৱাব" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" msgstr "" -"ভাষাৰ পেনেলৰ আচৰণ । ০ = তালিকাত প্ৰোথিত, ১ = স্বয়ংক্ৰিয়ভাবে লুকাওক, ২ = সদায় " -"দেখুৱাওক" +"ভাষাৰ পেনেলৰ আচৰণ । ০ = তালিকাত প্ৰোথিত, ১ = স্বয়ংক্ৰিয়ভাবে লুকাওক, ২ = সদায়" +" দেখুৱাওক" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" @@ -297,41 +315,48 @@ msgstr "" "ভাষাৰ পেনেলৰ স্থান । 0 = ওপৰৰ বাওঁফালৰ কোণত, 1 = ওপৰৰ সোঁফালৰ কোণত, 2 = তলৰ " "বাওঁফালৰ কোণত, 3 = তলৰ সোঁফালৰ কোণত, 4 = স্বনিৰ্ধাৰিত" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" -msgstr "তালিকাত উপস্থিত পৰবৰ্তী নিবেশ পদ্ধতিলৈ পৰিবৰ্তনৰ বাবে প্ৰযোজ্য ছৰ্ট-কাট চাবি" +msgstr "তালিকাত থকা পৰৱৰ্তী ইনপুট পদ্ধতিলে যাবলে চৰ্টকাট কিসমূহ" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" -msgstr "তালিকাত উপস্থিত পূৰ্ববৰ্তী নিবেশ পদ্ধতিলৈ পৰিবৰ্তনৰ বাবে প্ৰযোজ্য ছৰ্ট-কাট চাবি" +msgstr "তালিকাত থকা পূৰ্বৱৰ্তী ইনপুট পদ্ধতিলে যাবলে চৰ্টকাট কিসমূহ" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "ইনপুট পদ্ধতি বন্ধ কৰিবলে চৰ্টকাট কিসমূহ" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "ইনপুট পদ্ধতি খুলিবলে চৰ্টকাট কিসমূহ" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" -msgstr "নিবেশ পদ্ধতি খোলা আৰু বন্ধ কৰাৰ বাবে প্ৰয়োজনীয় ছৰ্ট-কাট চাবি নিৰ্ধাৰণ কৰক" +msgstr "" +"নিবেশ পদ্ধতি খোলা আৰু বন্ধ কৰাৰ বাবে প্ৰয়োজনীয় ছৰ্ট-কাট চাবি নিৰ্ধাৰণ কৰক" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "ট্ৰিগাৰৰ ছৰ্টকাট চাবি" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "স্বনিৰ্বাচিত ফন্ট ব্যৱহাৰ কৰা হ'ব" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "ভাষাৰ পেনেলৰ বাবে স্বনিৰ্বাচিত ফন্টৰ নাম ব্যৱহাৰ কৰক" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "সৰ্বব্যাপী নিবেশ পদ্ধতি ব্যৱহাৰ কৰক" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "প্ৰণালী চাবিৰ ফলক (XKB) বিন্যাস প্ৰয়োগ কৰা হ'ব" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "প্ৰণালী চাবিৰ ফলক বিন্যাস প্ৰয়োগ কৰা হ'ব" @@ -412,262 +437,114 @@ msgid "Custom" msgstr "স্বনিৰ্ধাৰিত" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "অসামৰ্থবান কৰা:" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "অনুপ্ৰয়োগৰ সংযোগক্ষেত্ৰত প্ৰিএডিট টেক্সট প্ৰোথিত কৰক" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "অনুপ্ৰয়োগৰ সংযোগক্ষেত্ৰত নিবেশ পদ্ধতিৰ প্ৰিএডিট টেক্সট প্ৰোথিত কৰক" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "তালিকাত প্ৰোথিত" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "সক্ৰিয় বা নিষ্ক্ৰিয় কৰক:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "সামৰ্থবান কৰা:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "সাধাৰণ" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "অনুভূমিক" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "ভাষাৰ পেনেলৰ স্থান:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" -msgstr "নিৰ্বাচিত নিবেশ পদ্ধতিক সক্ৰিয় নিবেশ পদ্ধতিৰ তালিকাৰ তললৈ স্থানান্তৰ কৰক" +msgstr "" +"নিৰ্বাচিত নিবেশ পদ্ধতিক সক্ৰিয় নিবেশ পদ্ধতিৰ তালিকাৰ তললৈ স্থানান্তৰ কৰক" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" -msgstr "নিৰ্বাচিত নিবেশ পদ্ধতিক সক্ৰিয় নিবেশ পদ্ধতিৰ তালিকাৰ ওপৰলৈ স্থানান্তৰ কৰক" +msgstr "" +"নিৰ্বাচিত নিবেশ পদ্ধতিক সক্ৰিয় নিবেশ পদ্ধতিৰ তালিকাৰ ওপৰলৈ স্থানান্তৰ কৰক" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "পিছৰ নিবেশ পদ্ধতি:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "আগৰ নিবেশ পদ্ধতি" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "সক্ৰিয় নিবেশ পদ্ধতিৰ তালিকাৰ পৰা নিৰ্বাচিত নিবেশ পদ্ধতি আঁতৰুৱা হ'ব" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "ভাষাৰ বাৰ প্ৰদৰ্শন আৰু লুকুৱাৰ উদ্দেশ্যে ibus ৰ আচৰণ নিৰ্ধাৰণ কৰক" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "লুক-আপ টেবুলত প্ৰযোজ্য বিকল্পসমূহৰ দিশ নিৰ্ধাৰণ কৰক" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "নিৰ্বাচিত নিবেশ পদ্ধতি সংক্ৰান্ত তথ্য প্ৰদৰ্শন কৰা হ'ব" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "চেকবক্স নিৰ্বাচিত হ'লে ভাষাৰ বাৰত নিবেশ পদ্ধতিৰ নাম প্ৰদৰ্শন কৰা হ'ব" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "ভাষাৰ পেনেল দেখুৱাওক:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "প্ৰৱেশত ibus আৰম্ভ কৰক" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" -msgstr "তালিকাত উপস্থিত পৰবৰ্তী নিবেশ পদ্ধতিলৈ পৰিবৰ্তনৰ বাবে প্ৰযোজ্য ছৰ্ট-কাট চাবি" +msgstr "" +"তালিকাত উপস্থিত পৰবৰ্তী নিবেশ পদ্ধতিলৈ পৰিবৰ্তনৰ বাবে প্ৰযোজ্য ছৰ্ট-কাট চাবি" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" -msgstr "তালিকাত উপস্থিত পূৰ্ববৰ্তী নিবেশ পদ্ধতিলৈ পৰিবৰ্তনৰ বাবে প্ৰযোজ্য ছৰ্ট-কাট চাবি" +msgstr "" +"তালিকাত উপস্থিত পূৰ্ববৰ্তী নিবেশ পদ্ধতিলৈ পৰিবৰ্তনৰ বাবে প্ৰযোজ্য ছৰ্ট-কাট " +"চাবি" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "ওপৰৰ বাওঁফালৰ কোণত" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "ওপৰৰ সোঁফালৰ কোণত" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "স্বনিৰ্বাচিত ফন্ট ব্যৱহাৰ কৰক:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "উল্লম্ব" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "সক্ৰিয় অৱস্থাত" - -#~ msgid "Never" -#~ msgstr "কেতিয়াও নহয়" - -#, fuzzy -#~ msgid "Use global engine" -#~ msgstr "কলঘৰ আগতে তুলি লোৱা হ'ব" - -#, fuzzy -#~ msgid "Langauge panel position" -#~ msgstr "ভাষাৰ পেনেল দেখুৱাওক:" - -#~ msgid "Custom font:" -#~ msgstr "স্বনিৰ্বাচিত ফন্ট:" - -#, fuzzy -#~ msgid "Font for language bar and candidates" -#~ msgstr "ভাষাৰ পেনেলৰ বাবে স্বনিৰ্বাচিত ফন্ট" - -#, fuzzy -#~ msgid "Use custom font for language bar and candidates" -#~ msgstr "ভাষাৰ পেনেলৰ বাবে স্বনিৰ্বাচিত ফন্টৰ নাম ব্যৱহাৰ কৰক" - -#~ msgid "Custom Font" -#~ msgstr "স্বনিৰ্বাচিত ফন্ট" - -#, fuzzy -#~ msgid "Show IM name on language bar" -#~ msgstr "ভাষাৰ পেনেলৰ বাবে স্বনিৰ্বাচিত ফন্ট" - -#~ msgid "Use Custom Font" -#~ msgstr "স্বনিৰ্বাচিত ফন্ট ব্যৱহাৰ কৰা হ'ব" - -#~ msgid "Next engine hotkey for switch to next input method engine" -#~ msgstr "পিছৰ কলঘৰৰ Hotkey পিছৰ নিবেশ কলঘৰলৈ যাবলৈ" - -#~ msgid "Prev engine hotkey for switch to previous input method engine" -#~ msgstr "আগৰ কলঘৰৰ Hotkey পিছৰ নিবেশ কলঘৰলৈ যাবলৈ" - -#~ msgid "Trigger hotkey for enable or disable input context" -#~ msgstr "ট্ৰিগাৰ Hotkey নিবেশ সনদৰ্ভ সক্ৰিয় বা নিষ্ক্ৰিয় কৰিবলৈ" - -#~ msgid "[Control+space]" -#~ msgstr "[Control+space]" - -#~ msgid "keyboard label|BackSpace" -#~ msgstr "keyboard label|BackSpace" - -#~ msgid "keyboard label|Tab" -#~ msgstr "keyboard label|Tab" - -#~ msgid "keyboard label|Return" -#~ msgstr "keyboard label|Return" - -#~ msgid "keyboard label|Pause" -#~ msgstr "keyboard label|Pause" - -#~ msgid "keyboard label|Scroll_Lock" -#~ msgstr "keyboard label|Scroll_Lock" - -#~ msgid "keyboard label|Sys_Req" -#~ msgstr "keyboard label|Sys_Req" - -#~ msgid "keyboard label|Escape" -#~ msgstr "keyboard label|Escape" - -#~ msgid "keyboard label|Multi_key" -#~ msgstr "keyboard label|Multi_key" - -#~ msgid "keyboard label|Home" -#~ msgstr "keyboard label|Home" - -#~ msgid "keyboard label|Left" -#~ msgstr "keyboard label|Left" - -#~ msgid "keyboard label|Up" -#~ msgstr "keyboard label|Up" - -#~ msgid "keyboard label|Right" -#~ msgstr "keyboard label|Right" - -#~ msgid "keyboard label|Down" -#~ msgstr "keyboard label|Down" - -#~ msgid "keyboard label|Page_Up" -#~ msgstr "keyboard label|Page_Up" - -#~ msgid "keyboard label|Page_Down" -#~ msgstr "keyboard label|Page_Down" - -#~ msgid "keyboard label|End" -#~ msgstr "keyboard label|End" - -#~ msgid "keyboard label|Begin" -#~ msgstr "keyboard label|Begin" - -#~ msgid "keyboard label|Print" -#~ msgstr "keyboard label|Print" - -#~ msgid "keyboard label|Insert" -#~ msgstr "keyboard label|Insert" - -#~ msgid "keyboard label|Num_Lock" -#~ msgstr "keyboard label|Num_Lock" - -#~ msgid "keyboard label|KP_Space" -#~ msgstr "keyboard label|KP_Space" - -#~ msgid "keyboard label|KP_Tab" -#~ msgstr "keyboard label|KP_Tab" - -#~ msgid "keyboard label|KP_Enter" -#~ msgstr "keyboard label|KP_Enter" - -#~ msgid "keyboard label|KP_Home" -#~ msgstr "keyboard label|KP_Home" - -#~ msgid "keyboard label|KP_Left" -#~ msgstr "keyboard label|KP_Left" - -#~ msgid "keyboard label|KP_Up" -#~ msgstr "keyboard label|KP_Up" - -#~ msgid "keyboard label|KP_Right" -#~ msgstr "keyboard label|KP_Right" - -#~ msgid "keyboard label|KP_Down" -#~ msgstr "keyboard label|KP_Down" - -#~ msgid "keyboard label|KP_Page_Up" -#~ msgstr "keyboard label|KP_Page_Up" - -#~ msgid "keyboard label|KP_Prior" -#~ msgstr "keyboard label|KP_Prior" - -#~ msgid "keyboard label|KP_Page_Down" -#~ msgstr "keyboard label|KP_Page_Down" - -#~ msgid "keyboard label|KP_Next" -#~ msgstr "keyboard label|KP_Next" - -#~ msgid "keyboard label|KP_End" -#~ msgstr "keyboard label|KP_End" - -#~ msgid "keyboard label|KP_Begin" -#~ msgstr "keyboard label|KP_Begin" - -#~ msgid "keyboard label|KP_Insert" -#~ msgstr "keyboard label|KP_Insert" - -#~ msgid "keyboard label|KP_Delete" -#~ msgstr "keyboard label|KP_Delete" - -#~ msgid "keyboard label|Delete" -#~ msgstr "keyboard label|Delete" - -#~ msgid "Switch engine" -#~ msgstr "কলঘৰ সলনি কৰক" - -#~ msgid "prev engine" -#~ msgstr "আগৰ কলঘৰ" diff --git a/po/bn_IN.po b/po/bn_IN.po index 7682a97bc..8d960d060 100644 --- a/po/bn_IN.po +++ b/po/bn_IN.po @@ -1,4 +1,4 @@ -# translation of bn_IN.po to Bengali INDIA +# translation of ibus.master.po to Bengali INDIA # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # @@ -6,12 +6,13 @@ # Runa Bhattacharjee , 2009, 2010. msgid "" msgstr "" -"Project-Id-Version: bn_IN\n" +"Project-Id-Version: ibus.master\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-03-25 17:16+0530\n" +"POT-Creation-Date: 2011-02-12 00:41+0900\n" +"PO-Revision-Date: 2010-08-02 18:27+0530\n" "Last-Translator: Runa Bhattacharjee \n" "Language-Team: Bengali INDIA \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -23,16 +24,14 @@ msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus ইনপুট পদ্ধতির পরিকাঠামো" +msgstr "ইনপুট পদ্ধতির পরিকাঠামো" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus ইনপুট পদ্ধতির পরিকাঠামো" +msgstr "IBus ইনপুট পদ্ধতির পরিকাঠামো আরম্ভ করা হবে" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -44,15 +43,15 @@ msgstr "" msgid "Other" msgstr "অন্যান্য" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "পূর্ববর্তী পৃষ্ঠা" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "পরবর্তী পৃষ্ঠা" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." @@ -60,91 +59,99 @@ msgstr "" "কয়েকটি ইনপুট পদ্ধতি ইনস্টল, অপসারণ অথবা আপডেট করা হয়েছে। অনুগ্রহ করে ibus ইনপুট " "প্ল্যাটফর্ম পুনরায় আরম্ভ করুন।" -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 msgid "Restart Now" msgstr "অবিলম্বে পুনরারম্ভ" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 msgid "Later" msgstr "পরে" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "IBus ইনপুট পদ্ধতির পরিকাঠামো" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "পুনরারম্ভ" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 msgid "Turn off input method" msgstr "ইনপুট পদ্ধতি বন্ধ করুন" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "ইনপুটের উদ্দেশ্যে উইন্ডো অনুপস্থিত" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "Linux/Unix-র সাথে ব্যবহারযোগ্য বুদ্ধিবিশিষ্ট ইনপুট বাস হল IBus" -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "রুণা ভট্টাচার্য্য (runab@fedoraproject.org)" -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "ইনপুট পদ্ধতি পরিচিতি" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "ইনপুট পদ্ধতি পরিবর্তন করুন" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "পরিচিতি" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "ইনপুট পদ্ধতি পরিচিতি" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "ভাষা: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "কি-বোর্ড বিন্যাস: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "নির্মাতা: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "বিবরণ:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "ট্রিগার" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "" + +#: ../setup/main.py:135 msgid "next input method" msgstr "পরবর্তী ইনপুট পদ্ধতি" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "পূর্ববর্তী ইনপুট পদ্ধতি" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus ডেমন আরম্ভ করা হয়নি। এটি এখন আরম্ভ করা হবে কি?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" "IBus has been started! If you can not use IBus, please add below lines in " "$HOME/.bashrc, and relogin your desktop.\n" @@ -158,24 +165,24 @@ msgstr "" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "%s-র জন্য কি-বোর্ড শর্ট-কাট ধার্য করুন" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "কি-বোর্ড শর্ট-কাট" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "কি-র কোড:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "পরিবর্তক:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -183,7 +190,7 @@ msgstr "" "অনুগ্রহ করে কোনো কি (অথবা কি সংকলন) টিপুন।\n" "কি মুক্ত করা হলে এই ডায়লগ বক্সটি বন্ধ করা হবে।" -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "অনুগ্রহ করে একটি কি (অথবা কি সংকলন) টিপুন" @@ -192,22 +199,21 @@ msgid "Select an input method" msgstr "একটি ইনপুট পদ্ধতি নির্বাচন করুন" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "ইনপুট পদ্ধতি" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus সংক্রান্ত পছন্দ" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "IBus সংক্রান্ত পছন্দ" +msgstr "IBus সংক্রান্ত পছন্দ নির্ধারণ করুন" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -230,13 +236,14 @@ msgid "Embed Preedit Text in Application Window" msgstr "অ্যাপ্লিকেশন উইন্ডোর মধ্যে প্রি-এডিট টেক্সট সন্নিবেশ করা হবে" #: ../data/ibus.schemas.in.h:6 -#, fuzzy msgid "Enable input method by default" -msgstr "পরবর্তী ইনপুট পদ্ধতি" +msgstr "ডিফল্ট অবস্থায় ইনপুট পদ্ধতি সক্রিয় করা হবে" #: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default when the application gets input focus" msgstr "" +"ইনপুট প্রাপ্ত করার উদ্দেশ্যে অ্যাপ্লিকেশনে ফোকাস করা হলে, ডিফল্ট রূপে ইনপুট পদ্ধতি " +"সক্রিয় করা হবে" #: ../data/ibus.schemas.in.h:8 msgid "Language panel position" @@ -266,11 +273,11 @@ msgstr "ibus আরম্ভের সময় ইঞ্জিনগুলি প msgid "Prev engine shortcut keys" msgstr "পূর্ববর্তী ইঞ্জিনের শর্টকাট-কি" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "সকল অ্যাপ্লিকেশনের মধ্যে একই ইনপুট পদ্ধতি ব্যবহার করা হবে" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "সিস্টেম ট্রের মধ্যে আইকন প্রদর্শন করা হবে" @@ -278,7 +285,7 @@ msgstr "সিস্টেম ট্রের মধ্যে আইকন প msgid "Show input method name" msgstr "ইনপুট পদ্ধতির নাম প্রদর্শন করা হবে" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "ভাষার বারের মধ্যে ইনপুট পদ্ধতির নাম প্রদর্শন করা হবে" @@ -299,16 +306,14 @@ msgstr "" "নীচে বাঁদিকের কোণায়, 3 = নীচে ডানদিকের কোণায়, 4 = স্বনির্ধারিত" #: ../data/ibus.schemas.in.h:21 -#, fuzzy msgid "The shortcut keys for switching to the next input method in the list" msgstr "তালিকায় উপস্থিত পরবর্তী ইনপুট পদ্ধতিতে পরিবর্তনের জন্য প্রযোজ্য শর্ট-কাট কি" #: ../data/ibus.schemas.in.h:22 -#, fuzzy msgid "The shortcut keys for switching to the previous input method" msgstr "তালিকায় উপস্থিত পূর্ববর্তী ইনপুট পদ্ধতিতে পরিবর্তনের জন্য প্রযোজ্য শর্ট-কাট কি" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "ইনপুট পদ্ধতি খোলা ও বন্ধ করার জন্য প্রয়োজনীয় শর্ট-কাট কি নির্ধারণ করুন" @@ -328,11 +333,11 @@ msgstr "ভাষার প্যানেলের জন্য স্বনি msgid "Use global input method" msgstr "সার্বজনীন ইনপুট পদ্ধতি " -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "সিস্টেম কি-বোর্ড (XKB) বিন্যাস প্রয়োগ করা হবে" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "সিস্টেম কি-বোর্ড বিন্যাস প্রয়োগ করা হবে" @@ -414,101 +419,109 @@ msgid "Custom" msgstr "স্বনির্ধারিত" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "অ্যাপ্লিকেশনের উইন্ডোর মধ্যে প্রি-এডিট টেক্সট সন্নিবেশ করা হবে" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "অ্যাপ্লিকেশনের উইন্ডোর মধ্যে ইনপুট পদ্ধতির প্রি-এডিট টেক্সট সন্নিবেশ করা হবে" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "মেনুর মধ্যে সন্নিবিষ্ট" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "সক্রিয় অথা নিষ্ক্রিয় করুন:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "সাধারণ" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "অনুভূমিক" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "ভাষার প্যানেলের অবস্থান:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "নির্বাচিত ইনপুট পদ্ধতিটি, সক্রিয় ইনপুট পদ্ধতির তালিকায় নীচে স্থানান্তর করা হবে" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "নির্বাচিত ইনপুট পদ্ধতিটি, সক্রিয় ইনপুট পদ্ধতির তালিকায় উপরে স্থানান্তর করা হবে" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "পরবর্তী ইনপুট পদ্ধতি:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "পূর্ববর্তী ইনপুট পদ্ধতি:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "সক্রিয় ইনপুট পদ্ধতির তালিকা থেকে নির্বাচিত ইনপুট পদ্ধতিটি মুছে ফেলা হবে" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "ভাষার বার প্রদর্শন ও আড়াল করার উদ্দেশ্যে ibus-র আচরণ নির্ধারণ করুন" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "লুক-আপ টেবিলের মধ্যে প্রযোজ্য বিকল্পগুলির দিশা নির্ধারণ করুন" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "নির্বাচিত ইনপুট পদ্ধতি সংক্রান্ত তথ্য প্রদর্শন করা হবে" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "চেকবক্স নির্বাচিত হলে, ভাষার বারের মধ্যে ইনপুট পদ্ধতির নাম প্রদর্শন করা হবে" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "ভাষার প্যানেল প্রদর্শন করা হবে:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "লগ-ইন করার সময় ibus আরম্ভ করা হবে" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "তালিকায় উপস্থিত পরবর্তী ইনপুট পদ্ধতিতে পরিবর্তনের জন্য প্রযোজ্য শর্ট-কাট কি" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "তালিকায় উপস্থিত পূর্ববর্তী ইনপুট পদ্ধতিতে পরিবর্তনের জন্য প্রযোজ্য শর্ট-কাট কি" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "উপরে বাঁদিকের কোণায়" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "উপরে ডানদিকের কোণায়" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "স্বনির্ধারিত ফন্ট প্রয়োগ করুন:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "উল্লম্ব" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "সক্রিয় অবস্থায়" diff --git a/po/ca.po b/po/ca.po index 927d7906b..68a0d3047 100644 --- a/po/ca.po +++ b/po/ca.po @@ -1,367 +1,371 @@ -# Catalan translations for ibus package. -# Copyright © 2003-2008 Free Software Foundation, Inc. -# This file is distributed under the same license as the anaconda package. +# translation of ibus.pot to Catalan +# Catalan translation of ibus. +# Copyright (C) 2008 Peng Huang +# This file is distributed under the same license as the ibus package. +# +# Translators: +# Oscar Osta , 2011. # Oscar Osta Pueyo , 2009. -# -# This file is translated according to the glossary and style guide of -# Softcatalà. If you plan to modify this file, please read first the page -# of the Catalan translation team for the Fedora project at: -# http://www.softcatala.org/projectes/fedora/ -# and contact the previous translator -# -# Aquest fitxer s'ha de traduir d'acord amb el recull de termes i la guia -# d'estil de Softcatalà. Si voleu modificar aquest fitxer, llegiu si -# us plau la pàgina de catalanització del projecte Fedora a: -# http://www.softcatala.org/projectes/fedora/ -# i contacteu l'anterior traductor/a. -# -# msgid "" msgstr "" -"Project-Id-Version: ibus\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2009-09-19 20:43+0200\n" -"Last-Translator: Patricia Rivera Escuder \n" -"Language-Team: Catalan \n" +"Project-Id-Version: IBus\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-05-24 07:17+0000\n" +"Last-Translator: oostap \n" +"Language-Team: Catalan \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "Entorn de mètodes d'entrada IBus" +msgstr "Entorn de mètodes d'entrada" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "Entorn de mètodes d'entrada IBus" +msgstr "Inicia l'entorn de mètodes d'entrada IBus" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:40 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." msgstr "" +"Copyright (c) 2007-2010 Peng Huang\n" +"Copyright (c) 2007-2010 Red Hat, Inc." #: ../ibus/lang.py:41 msgid "Other" msgstr "Altres" -#: ../ui/gtk/candidatepanel.py:267 -#, fuzzy +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" -msgstr "Anterior mètode d'entrada:" +msgstr "Pàgina anterior" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" -msgstr "" +msgstr "Pàgina següent" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:62 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" +"S'han instal·lat, suprimit o actualitzat alguns mètodes d'entrada. Reinicieu" +" la plataforma d'entrada IBus." -#: ../ui/gtk/main.py:62 -#, fuzzy +#: ../ui/gtk/main.py:66 msgid "Restart Now" -msgstr "Reinicia" +msgstr "Reinicia ara" -#: ../ui/gtk/main.py:63 -#, fuzzy +#: ../ui/gtk/main.py:67 msgid "Later" -msgstr "Altres" +msgstr "Després" + +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "Quadre de l'IBus" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:122 msgid "IBus input method framework" msgstr "Entorn de mètodes d'entrada IBus" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:352 msgid "Restart" msgstr "Reinicia" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:439 msgid "Turn off input method" msgstr "Inhabilita el mètode d'entrada" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:478 msgid "No input window" msgstr "Cap finestra d'entrada" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:509 msgid "IBus is an intelligent input bus for Linux/Unix." -msgstr "IBus és un bus d'entrada intel·ligent per a Linux/Unix." +msgstr "L'IBus és un bus d'entrada intel·ligent per al Linux/Unix." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:513 msgid "translator-credits" msgstr "" "Oscar Osta Pueyo , 2009\n" "Patricia Rivera Escuder , 2009\n" -"Xavier Conde Rueda " +"Xavier Conde Rueda \n" +"Joan Duran " -#: ../ui/gtk/languagebar.py:107 -#, fuzzy +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "Quant al mètode d'entrada" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" -msgstr "Canvia el mètode d'entrada" +msgstr "Commuta el mètode d'entrada" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "Quant a" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "Quant al mètode d'entrada" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "Idioma: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "Disposició del teclat: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "Autor: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "Descripció: \n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "activador" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "habilita" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "inhabilita" + +#: ../setup/main.py:135 msgid "next input method" -msgstr "següent mètode d'entrada" +msgstr "mètode d'entrada següent" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" -msgstr "anterior mètode d'entrada" +msgstr "mètode d'entrada anterior" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" -msgstr "El dimoni IBus no està iniciat. Voleu iniciar-lo ara?" +msgstr "No s'ha iniciat el dimoni de l'IBus. Voleu iniciar-lo ara?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"L'IBus s'ha iniciat! Si no podeu utilitzar IBus, si us plau afegiu les " -"següents línies a $HOME/.bashrc, i torneu a entrar a l'escriptori.\n" +"S'ha iniciat l'IBus. Si no podeu utilitzar l'IBus, afegiu les línies següents a $HOME/.bashrc, i torneu a entrar a l'escriptori.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "Seleccioneu la drecera de teclat per a %s" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "Dreceres de teclat" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "Codi de lletra:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "Modificadors:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." msgstr "" -"Si us plau premeu una tecla (o una combinació de tecles).\n" +"Premeu una tecla (o una combinació de tecles).\n" "El diàleg es tancarà quan es deixi anar la tecla." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" -msgstr "Si us plau premeu una tecla (o una combinació de tecles)" +msgstr "Premeu una tecla (o una combinació de tecles)" #: ../setup/enginecombobox.py:120 msgid "Select an input method" -msgstr "Selecciona un mètode d'entrada" +msgstr "Seleccioneu un mètode d'entrada" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "Mètode d'entrada" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" -msgstr "Prefèrencies de l'IBus" +msgstr "Preferències de l'IBus" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "Prefèrencies de l'IBus" +msgstr "Estableix les preferències de l'IBus" #: ../data/ibus.schemas.in.h:1 -#, fuzzy msgid "Auto hide" msgstr "Oculta automàticament" #: ../data/ibus.schemas.in.h:2 -#, fuzzy msgid "Custom font" -msgstr "Tipus de lletra personalitzada:" +msgstr "Tipus de lletra personalitzat" #: ../data/ibus.schemas.in.h:3 msgid "Custom font name for language panel" msgstr "Tipus de lletra personalitzat per al quadre d'idiomes" #: ../data/ibus.schemas.in.h:4 -msgid "Embed Preedit Text" -msgstr "" +msgid "Disable shortcut keys" +msgstr "Inhabilita les dreceres de teclat" #: ../data/ibus.schemas.in.h:5 -msgid "Embed Preedit Text in Application Window" -msgstr "" +msgid "Embed Preedit Text" +msgstr "Integra el text editat prèviament" #: ../data/ibus.schemas.in.h:6 -#, fuzzy -msgid "Enable input method by default" -msgstr "següent mètode d'entrada" +msgid "Embed Preedit Text in Application Window" +msgstr "Integra el text editat prèviament en la finestra de l'aplicació" #: ../data/ibus.schemas.in.h:7 +msgid "Enable input method by default" +msgstr "Habilita els mètodes d'entrada per defecte" + +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "" +"Habilita els mètodes d'entrada per defecte quan l'aplicació obté el focus " +"d'entrada" -#: ../data/ibus.schemas.in.h:8 -#, fuzzy +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "Habilita les dreceres de teclat" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" -msgstr "Mostra el quadre d'idiomes:" +msgstr "Posició del quadre d'idiomes" -#: ../data/ibus.schemas.in.h:9 -#, fuzzy +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" -msgstr "Tecla del mètode següent" +msgstr "Dreceres de teclat del motor següent" -#: ../data/ibus.schemas.in.h:10 -#, fuzzy +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "Orientació de la taula de cerca" -#: ../data/ibus.schemas.in.h:11 -#, fuzzy +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" -msgstr "Orientació de la taula de cerca. 0 = Horitzontal, 1 = Vertical" +msgstr "Orientació de la taula de cerca. 0 = horitzontal, 1 = vertical" -#: ../data/ibus.schemas.in.h:12 -#, fuzzy +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" -msgstr "Carrega a l'inici" +msgstr "Precarrega els motors" -#: ../data/ibus.schemas.in.h:13 -#, fuzzy +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" -msgstr "Carrega els mètodes d'entrada a l'inici" +msgstr "Precarrega els motors durant l'inici de l'IBus" -#: ../data/ibus.schemas.in.h:14 -#, fuzzy +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" -msgstr "Tecla del mètode anterior" +msgstr "Dreceres de teclat del motor anterior" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" -msgstr "" +msgstr "Comparteix el mateix mètode d'entrada en totes les aplicacions" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" -msgstr "" +msgstr "Mostra la icona a la safata del sistema" -#: ../data/ibus.schemas.in.h:17 -#, fuzzy +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" -msgstr "Mostra el nom del mètode d'entrada a la barra d'idioma" +msgstr "Mostra el nom del mètode d'entrada" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "Mostra el nom del mètode d'entrada a la barra d'idioma" -#: ../data/ibus.schemas.in.h:19 -#, fuzzy +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" msgstr "" -"Comportament del quadre d'idiomes. 0 = Sempre ocult, 1 = Ocultar " -"automàticament, 2 = Sempre visible" +"El comportament del quadre d'idiomes. 0 = incrustat al menú, 1 = oculta " +"automàticament, 2 = mostra sempre" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" msgstr "" +"La posició del quadre d'idiomes. 0 = cantonada superior esquerra, 1 = " +"cantonada superior dreta, 2 = cantonada inferior esquerra, 3 = cantonada " +"inferior dreta, 4 = personalitzat" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" msgstr "" -"La drecera de teclat per canviar al següent mètode d'entrada de la llista" +"Les dreceres de teclat per commutar al mètode d'entrada següent de la llista" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" msgstr "" -"La drecera de teclat per canviar a l'anterior mètode d'entrada de la llista" +"Les dreceres de teclat per commutar al mètode d'entrada anterior de la " +"llista" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "Les dreceres de teclat per inhabilitar el mètode d'entrada" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "Les dreceres de teclat per habilitar el mètode d'entrada" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 -#, fuzzy +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "" -"Estableix les dreceres de teclat per activar o desactivar el mètode d'entrada" +"Les dreceres de teclat per habilitar o inhabilitar el mètode d'entrada" -#: ../data/ibus.schemas.in.h:24 -#, fuzzy +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" -msgstr "Tecla d'activació" +msgstr "Dreceres de teclat de l'activador" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" -msgstr "Empra un tipus de lletra personalitzat" +msgstr "Utilitza un tipus de lletra personalitzat" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" -msgstr "Empra el tipus de lletra personalitzat per al quadre d'idiomes" +msgstr "Utilitza un tipus de lletra personalitzat per al quadre d'idiomes" -#: ../data/ibus.schemas.in.h:27 -#, fuzzy +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" -msgstr "Selecciona un mètode d'entrada" +msgstr "Utilitza el mètode d'entrada global" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "Utilitza la disposició de teclat del sistema (XKB)" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "Utilitza la disposició de teclat del sistema" @@ -375,7 +379,7 @@ msgstr "Tipus de lletra i estil" #: ../setup/setup.ui.h:3 msgid "Global input method settings" -msgstr "Selecciona un mètode d'entrada" +msgstr "Paràmetres del mètode d'entrada global" #: ../setup/setup.ui.h:4 msgid "Keyboard Layout" @@ -410,13 +414,13 @@ msgid "" "The default input method is the top one in the list.\n" "You may use up/down buttons to change it." msgstr "" -"El mètode d'entrada per defecte és el primer de la llista.\n" -"Podeu fer servir els botons amunt/abaix per canviar-lo." +"El mètode d'entrada predeterminat és el primer de la llista.\n" +"Podeu utilitzar els botons de pujar i baixar per canviar-lo." #: ../setup/setup.ui.h:17 msgid "Add the selected input method into the enabled input methods" msgstr "" -"Afegeix el mètode d'entrada seleccionat als mètodes d'entrada activats." +"Afegeix el mètode d'entrada seleccionat als mètodes d'entrada habilitats" #: ../setup/setup.ui.h:18 msgid "Advanced" @@ -424,187 +428,141 @@ msgstr "Avançat" #: ../setup/setup.ui.h:19 msgid "Always" -msgstr "" +msgstr "Sempre" #: ../setup/setup.ui.h:20 msgid "Bottom left corner" -msgstr "" +msgstr "Cantonada inferior esquerra" #: ../setup/setup.ui.h:21 msgid "Bottom right corner" -msgstr "" +msgstr "Cantonada inferior dreta" #: ../setup/setup.ui.h:22 msgid "Candidates orientation:" msgstr "Orientació dels candidats:" #: ../setup/setup.ui.h:23 -#, fuzzy msgid "Custom" -msgstr "Tipus de lletra personalitzada:" +msgstr "Personalitzat" #: ../setup/setup.ui.h:24 -msgid "Embed preedit text in application window" -msgstr "" +msgid "Disable:" +msgstr "Inhabilita:" #: ../setup/setup.ui.h:25 -msgid "Embed the preedit text of input method in the application window" -msgstr "" +msgid "Embed preedit text in application window" +msgstr "Incrusta el text editat prèviament en la finestra d'aplicació" #: ../setup/setup.ui.h:26 -msgid "Embedded in menu" +msgid "Embed the preedit text of input method in the application window" msgstr "" +"Incrusta el text editat prèviament del mètode d'entrada en la finestra " +"d'aplicació" #: ../setup/setup.ui.h:27 -msgid "Enable or disable:" -msgstr "Activa o desactiva:" +msgid "Embedded in menu" +msgstr "Incrusta al menú" #: ../setup/setup.ui.h:28 +msgid "Enable or disable:" +msgstr "Habilita o inhabilita:" + +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "Habilita:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "General" -#: ../setup/setup.ui.h:29 -#, fuzzy +#: ../setup/setup.ui.h:31 msgid "Horizontal" -msgstr "" -"Horitzontal\n" -"Vertical" +msgstr "Horitzontal" -#: ../setup/setup.ui.h:32 -#, fuzzy +#: ../setup/setup.ui.h:34 msgid "Language panel position:" -msgstr "Mostra el quadre d'idiomes:" +msgstr "Posició del quadre d'idiomes:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" -msgstr "Abaixa el mètode d'entrada selecionat als mètodes d'entrada activats" +msgstr "" +"Baixa el mètode d'entrada seleccionat en els mètodes d'entrada habilitats" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" -msgstr "Apuja el mètode d'entrada seleccionat a la llista de mètodes activats" +msgstr "" +"Puja el mètode d'entrada seleccionat en la llista de mètodes habilitats" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" -msgstr "Següent mètode d'entrada:" +msgstr "Mètode d'entrada següent:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" -msgstr "Anterior mètode d'entrada:" +msgstr "Mètode d'entrada anterior:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "" -"Suprimeix el mètode d'entrada seleccionat dels mètodes d'entrada activats" +"Suprimeix el mètode d'entrada seleccionat dels mètodes d'entrada habilitats" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" -msgstr "Ajusta com l'ibus mostra o amaga la barra d'idioma" +msgstr "" +"Estableix el comportament de l'IBus sobre com mostrar o ocultar la barra " +"d'idiomes" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "Estableix l'orientació dels candidats a la taula de cerca" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "Mostra la informació del mètode d'entrada seleccionat" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" -msgstr "Mostra el nom del mètode a la barra d'idioma quan s'activi l'opció" +msgstr "" +"Mostra el nom del mètode d'entrada a la barra d'idiomes quan s'activi la " +"casella de selecció" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "Mostra el quadre d'idiomes:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" -msgstr "Inicia l'ibus en entrar" +msgstr "Inicia l'IBus en entrar" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "" -"La drecera de teclat per canviar al següent mètode d'entrada de la llista" +"Les dreceres de teclat per commutar al mètode d'entrada següent de la llista" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "" -"La drecera de teclat per canviar a l'anterior mètode d'entrada de la llista" +"Les dreceres de teclat per canviar al mètode d'entrada anterior de la llista" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" -msgstr "" +msgstr "Cantonada superior esquerra" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" -msgstr "" +msgstr "Cantonada superior dreta" -#: ../setup/setup.ui.h:52 -#, fuzzy +#: ../setup/setup.ui.h:54 msgid "Use custom font:" -msgstr "Empra un tipus de lletra personalitzat" +msgstr "Utilitza un tipus de lletra personalitzat:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" -msgstr "" +msgstr "Vertical" -#: ../setup/setup.ui.h:56 -#, fuzzy +#: ../setup/setup.ui.h:58 msgid "When active" -msgstr "" -"Mai\n" -"Quan s'activa\n" -"Sempre" - -#, fuzzy -#~ msgid "Use global engine" -#~ msgstr "Carrega a l'inici" - -#, fuzzy -#~ msgid "Langauge panel position" -#~ msgstr "Mostra el quadre d'idiomes:" - -#~ msgid "Custom font:" -#~ msgstr "Tipus de lletra personalitzada:" - -#, fuzzy -#~ msgid "Font for language bar and candidates" -#~ msgstr "Escolliu el tipus de lletra per a la barra d'idioma i els candidats" - -#~ msgid "Use custom font for language bar and candidates" -#~ msgstr "" -#~ "Empra un tipus de lletra personalitzat per a la barra d'idioma i els " -#~ "candidats" - -#~ msgid "Custom Font" -#~ msgstr "Tipus de lletra personalitzat" - -#~ msgid "Show IM Name" -#~ msgstr "Mostra el nom del mètode d'entrada" - -#~ msgid "Show IM name on language bar" -#~ msgstr "Mostra el nom del mètode d'entrada a la barra d'idioma" - -#~ msgid "Use Custom Font" -#~ msgstr "Empra el tipus de lletra personalitzat" - -#~ msgid "Next engine hotkey for switch to next input method engine" -#~ msgstr "Tecla ràpida per canviar al següent mètode d'entrada" - -#~ msgid "Prev engine hotkey for switch to previous input method engine" -#~ msgstr "Tecla ràpida per canviar a l'anterior mètode d'entrada" - -#~ msgid "Trigger hotkey for enable or disable input context" -#~ msgstr "Tecla per activar o desactivar el context d'entrada" - -#~ msgid "gtk-about" -#~ msgstr "gtk-about" - -#~ msgid "Use system keyboard (XKB) layout setting" -#~ msgstr "" -#~ "Utilitza la configuració de la disposició de teclat del sistema (XKB)" +msgstr "Quan estigui actiu" -#~ msgid "Use system keyboard layout (XKB) setting" -#~ msgstr "Usa la configuració de la disposició de teclat del sistema (XKB)" -#~ msgid "Use system keyboard layout setting" -#~ msgstr "Usa la configuració de la disposició de teclat del sistema" diff --git a/po/da.po b/po/da.po index bdf4e93b9..c1c387383 100644 --- a/po/da.po +++ b/po/da.po @@ -1,91 +1,97 @@ +# translation of ibus.pot to Danish # Danish translation of ibus. -# Copyright (C) 2009 +# Copyright (C) 2008 Peng Huang # This file is distributed under the same license as the ibus package. -# Kris Thomsen , 2009. -# +# +# Translators: +# Kris Thomsen , 2009, 2011. msgid "" msgstr "" -"Project-Id-Version: ibus\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2009-06-11 17:58+0200\n" -"Last-Translator: Kris Thomsen \n" +"Project-Id-Version: IBus\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-07-18 20:16+0000\n" +"Last-Translator: kristho \n" "Language-Team: Danish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: da\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus-ramme for inddatametode" +msgstr "Framework for inputmetode" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus-ramme for inddatametode" +msgstr "Start IBus, framework for inputmetode" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:40 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." msgstr "" +"Ophavsret (c) 2007-2010 Peng Huang\n" +"Ophavsret (c) 2007-2010 Red Hat, Inc." #: ../ibus/lang.py:41 msgid "Other" msgstr "Andre" -#: ../ui/gtk/candidatepanel.py:267 -#, fuzzy +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" -msgstr "Forrige inddatametode:" +msgstr "Forrige side" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" -msgstr "" +msgstr "Næste side" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:62 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" +"Nogen inputmetoder er blevet installeret, fjernet eller opdateret. Genstart " +"inputplatformen IBus." -#: ../ui/gtk/main.py:62 -#, fuzzy +#: ../ui/gtk/main.py:66 msgid "Restart Now" -msgstr "Genstart" +msgstr "Genstart nu" -#: ../ui/gtk/main.py:63 -#, fuzzy +#: ../ui/gtk/main.py:67 msgid "Later" -msgstr "Andre" +msgstr "Senere" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "IBus-panel" + +#: ../ui/gtk/panel.py:122 msgid "IBus input method framework" msgstr "IBus-ramme for inddatametode" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:352 msgid "Restart" msgstr "Genstart" -#: ../ui/gtk/panel.py:418 -#, fuzzy +#: ../ui/gtk/panel.py:439 msgid "Turn off input method" -msgstr "Ingen inddatametode" +msgstr "Sluk for inputmetode" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:478 msgid "No input window" -msgstr "" +msgstr "Intet inputvindue" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:509 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus er en intelligent inddatabus til Linux/Unix." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:513 msgid "translator-credits" msgstr "" "Kris Thomsen\n" @@ -93,92 +99,96 @@ msgstr "" "Dansk-gruppen \n" "Mere info: http://www.dansk-gruppen.dk" -#: ../ui/gtk/languagebar.py:107 -#, fuzzy +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" -msgstr "Inddatametoder" +msgstr "Om inputmetoden" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "Skift inddatametode" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "Om" -#: ../ui/gtk/languagebar.py:362 -#, fuzzy +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" -msgstr "Inddatametoder" +msgstr "Om inputmetoden" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" -msgstr "" +msgstr "Sprog: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 -#, fuzzy, python-format +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#, python-format msgid "Keyboard layout: %s\n" -msgstr "Tastaturgenveje" +msgstr "Tastaturlayout: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" -msgstr "" +msgstr "Forfatter: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" -msgstr "" +msgstr "Beskrivelse:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "udløser" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "aktivér" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "deaktivér" + +#: ../setup/main.py:135 msgid "next input method" msgstr "næste inddatametode" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "forrige inddatametode" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus-dæmonen er ikke startet. Vil du starte den nu?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus er blevet startet! Hvis du ikke kan bruge IBus, skal du tilføje disse " -"linjer i $HOME/.bashrc, og logge ind og ud igen til dit skrivebord.\n" +"IBus er blevet startet! Hvis du ikke kan bruge IBus, skal du tilføje disse linjer i $HOME/.bashrc, og logge ind og ud igen til dit skrivebord.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "Vælg tastaturgenveje til %s" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "Tastaturgenveje" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "Nøglekode:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "Kombinationstaster:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -186,7 +196,7 @@ msgstr "" "Tryk venligst på en tast (eller en tastekombination).\n" "Dialogen bliver lukket, når tasten slippes." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "Tryk venligst på en tast (eller en tastekombination)" @@ -195,165 +205,163 @@ msgid "Select an input method" msgstr "Vælg en inddatametode" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 -#, fuzzy +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" -msgstr "Inddatametoder" +msgstr "Inputmetode" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" -msgstr "" +msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "Indstillinger for IBus" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "Indstillinger for IBus" +msgstr "Angiv indstillinger for IBus" #: ../data/ibus.schemas.in.h:1 -#, fuzzy msgid "Auto hide" msgstr "Skjul automatisk" #: ../data/ibus.schemas.in.h:2 -#, fuzzy msgid "Custom font" -msgstr "Tilpasset skrifttype:" +msgstr "Brugertilpasset skrifttype" #: ../data/ibus.schemas.in.h:3 msgid "Custom font name for language panel" msgstr "Tilpasset skrifttypenavn til sprogpanel" #: ../data/ibus.schemas.in.h:4 -msgid "Embed Preedit Text" -msgstr "" +msgid "Disable shortcut keys" +msgstr "Deaktivér genvejstaster" #: ../data/ibus.schemas.in.h:5 -msgid "Embed Preedit Text in Application Window" -msgstr "" +msgid "Embed Preedit Text" +msgstr "Indbyg forudredigeret tekst" #: ../data/ibus.schemas.in.h:6 -#, fuzzy -msgid "Enable input method by default" -msgstr "næste inddatametode" +msgid "Embed Preedit Text in Application Window" +msgstr "Indlejr forudredigeret tekst i programvindue" #: ../data/ibus.schemas.in.h:7 +msgid "Enable input method by default" +msgstr "Aktivér inputmetode som standard" + +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "" +"Aktivér inputmetoder som standard når programmerne modtaget inputfokus" -#: ../data/ibus.schemas.in.h:8 -#, fuzzy +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "Aktivér genvejstaster" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" -msgstr "Vis sprogpanel:" +msgstr "Placering for sprogpanel" -#: ../data/ibus.schemas.in.h:9 -#, fuzzy +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" -msgstr "Næste tastaturgenvej til motor" +msgstr "Genvejstaster for næste motor" -#: ../data/ibus.schemas.in.h:10 -#, fuzzy +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "Orientering af opslagstabel" -#: ../data/ibus.schemas.in.h:11 -#, fuzzy +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" -msgstr "Orientering af opslagstabel. 0 = Vandret, 1 = Lodret" +msgstr "Orientering af opslagstabel. 0 = Horisontal, 1 = Vertikal" -#: ../data/ibus.schemas.in.h:12 -#, fuzzy +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "Forindlæs motorer" -#: ../data/ibus.schemas.in.h:13 -#, fuzzy +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" -msgstr "Forindlæs motorer under opstarten af ibus" +msgstr "Forindlæs motorer under opstarten af IBus" -#: ../data/ibus.schemas.in.h:14 -#, fuzzy +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" -msgstr "Forrige tastaturgenvej til motor" +msgstr "Genvejstaster for forrige motor" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" -msgstr "" +msgstr "Del den samme inputmetode i alle programmer" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" -msgstr "" +msgstr "Vis ikon i statusfelt" -#: ../data/ibus.schemas.in.h:17 -#, fuzzy +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" -msgstr "Tilpasset skrifttypenavn til sprogpanel" +msgstr "Vis navn på inputmetode" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 -#, fuzzy +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" -msgstr "Tilpasset skrifttypenavn til sprogpanel" +msgstr "Vis navn på inputmetode i sprogpanel" -#: ../data/ibus.schemas.in.h:19 -#, fuzzy +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" msgstr "" -"Sprogpanelets opførsel. 0 = Skjul altid, 1 = Skjul automatisk, 2 = Vis altid" +"Sprogpanelets opførsel. 0 = Indlejret i menu, 1 = Skjul automatisk, 2 = Vis " +"altid" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" msgstr "" +"Placering af sprogpanelet. 0 = Øverste venstre hjørne, 1 = Øverste højre " +"hjørne, 2 = Nederste venstre hjørne, 3 = Nederste højre hjørne, 4 = " +"Brugertilpasset" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" -msgstr "" -"Næste tastaturgenvej til motor til skift af næste motor for inddatametode" +msgstr "Genvejstasterne for at skrive til næste inputmetode i listen" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" -msgstr "" -"Forrige tastaturgenvej til motor til skift af forrige motor for inddatametode" +msgstr "Genvejstasterne for at skifte til forrige inputmetode" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 -#, fuzzy +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "Genvejstasterne for slukning af inputmetode" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "Genvejstasterne for at tænde inputmetode" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" -msgstr "" -"Forrige tastaturgenvej til motor til skift af forrige motor for inddatametode" +msgstr "Genvejstasterne for at tænde og slukke inputmetode" -#: ../data/ibus.schemas.in.h:24 -#, fuzzy +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" -msgstr "Udløser til tastaturgenvej" +msgstr "Udløser tastaturgenveje" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "Brug tilpasset skrifttype" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "Brug tilpasset skrifttypenavn til sprogpanel" -#: ../data/ibus.schemas.in.h:27 -#, fuzzy +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" -msgstr "Vælg en inddatametode" +msgstr "Brug global inputmetode" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" -msgstr "" +msgstr "Brug systemttastaturlayout (XKB)" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" -msgstr "" +msgstr "Brug tastaturlayout for system" #: ../setup/setup.ui.h:1 msgid "..." @@ -365,12 +373,11 @@ msgstr "Skrifttype og stil" #: ../setup/setup.ui.h:3 msgid "Global input method settings" -msgstr "Vælg en inddatametode" +msgstr "Indstillinger for global inputmetode" #: ../setup/setup.ui.h:4 -#, fuzzy msgid "Keyboard Layout" -msgstr "Tastaturgenveje" +msgstr "Tastaturlayout" #: ../setup/setup.ui.h:5 msgid "Keyboard Shortcuts" @@ -406,190 +413,137 @@ msgstr "" #: ../setup/setup.ui.h:17 msgid "Add the selected input method into the enabled input methods" -msgstr "" +msgstr "Tilføj de valgte inputmetoder i de aktiverede inputmetoder" #: ../setup/setup.ui.h:18 msgid "Advanced" -msgstr "" +msgstr "Avanceret" #: ../setup/setup.ui.h:19 msgid "Always" -msgstr "" +msgstr "Altid" #: ../setup/setup.ui.h:20 msgid "Bottom left corner" -msgstr "" +msgstr "Nederste venstre hjørne" #: ../setup/setup.ui.h:21 msgid "Bottom right corner" -msgstr "" +msgstr "Nederste højre hjørne" #: ../setup/setup.ui.h:22 msgid "Candidates orientation:" msgstr "Orientering for kandidater:" #: ../setup/setup.ui.h:23 -#, fuzzy msgid "Custom" -msgstr "Tilpasset skrifttype:" +msgstr "Brugertilpasset" #: ../setup/setup.ui.h:24 -msgid "Embed preedit text in application window" -msgstr "" +msgid "Disable:" +msgstr "Deaktivér:" #: ../setup/setup.ui.h:25 -msgid "Embed the preedit text of input method in the application window" -msgstr "" +msgid "Embed preedit text in application window" +msgstr "Indlejr forudredigeret tekst i programvindue" #: ../setup/setup.ui.h:26 -msgid "Embedded in menu" -msgstr "" +msgid "Embed the preedit text of input method in the application window" +msgstr "Indlejr forudredigeret tekst for inputmetode i programvinduet" #: ../setup/setup.ui.h:27 +msgid "Embedded in menu" +msgstr "Indlejret i menu" + +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "Aktivér eller deaktivér:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "Aktivér" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "Generelt" -#: ../setup/setup.ui.h:29 -#, fuzzy +#: ../setup/setup.ui.h:31 msgid "Horizontal" -msgstr "" -"Vandret\n" -"Lodret" +msgstr "Horisontal" -#: ../setup/setup.ui.h:32 -#, fuzzy +#: ../setup/setup.ui.h:34 msgid "Language panel position:" -msgstr "Vis sprogpanel:" +msgstr "Placering af sprogpanel:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" -msgstr "" +msgstr "Flyt den valgte inputmetode i de aktiverede inputmetoder ned" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" -msgstr "" +msgstr "Flyt den valgte inputmetode op i listen over aktiverede inputmetode" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "Næste inddatametode:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "Forrige inddatametode:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" -msgstr "" +msgstr "Fjern den valgte inputmetode fra de aktiverede inputmetoder" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "" +"Angiv adfæren for hvordan IBus skal vises eller skjules i sprogpanelet" -#: ../setup/setup.ui.h:39 -#, fuzzy +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" -msgstr "Orientering af opslagstabel" +msgstr "Angiv orientering af kandidater i opslagstabel" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" -msgstr "" +msgstr "Vis information om den valgte inputmetode" -#: ../setup/setup.ui.h:44 -#, fuzzy +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" -msgstr "Tilpasset skrifttypenavn til sprogpanel" +msgstr "Vis inputmetodens navn i sprogpanelet når tjek-boksen er vinget af" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "Vis sprogpanel:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "Start ibus ved logind" -#: ../setup/setup.ui.h:47 -#, fuzzy +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" -msgstr "" -"Næste tastaturgenvej til motor til skift af næste motor for inddatametode" +msgstr "Genvejstaster for skift til den næste inputmetode i listen" -#: ../setup/setup.ui.h:48 -#, fuzzy +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" -msgstr "" -"Forrige tastaturgenvej til motor til skift af forrige motor for inddatametode" +msgstr "Genvejstaster for skift til den forrige inputmetode i listen" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" -msgstr "" +msgstr "Øverste venstre hjørne" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" -msgstr "" +msgstr "Øverste højre hjørne" -#: ../setup/setup.ui.h:52 -#, fuzzy +#: ../setup/setup.ui.h:54 msgid "Use custom font:" -msgstr "Brug tilpasset skrifttype" +msgstr "Brug brugertilpasset skrifttype:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" -msgstr "" +msgstr "Vertikal" -#: ../setup/setup.ui.h:56 -#, fuzzy +#: ../setup/setup.ui.h:58 msgid "When active" -msgstr "" -"Aldrig\n" -"Hvis aktiv\n" -"Altid" - -#, fuzzy -#~ msgid "Use global engine" -#~ msgstr "Forindlæs motorer" - -#, fuzzy -#~ msgid "Langauge panel position" -#~ msgstr "Vis sprogpanel:" - -#~ msgid "Custom font:" -#~ msgstr "Tilpasset skrifttype:" - -#, fuzzy -#~ msgid "Font for language bar and candidates" -#~ msgstr "Tilpasset skrifttypenavn til sprogpanel" - -#, fuzzy -#~ msgid "Use custom font for language bar and candidates" -#~ msgstr "Brug tilpasset skrifttypenavn til sprogpanel" - -#~ msgid "Custom Font" -#~ msgstr "Tilpasset skrifttype" - -#, fuzzy -#~ msgid "Show IM name on language bar" -#~ msgstr "Tilpasset skrifttypenavn til sprogpanel" - -#~ msgid "Use Custom Font" -#~ msgstr "Brug tilpasset skrifttype" - -#~ msgid "Next engine hotkey for switch to next input method engine" -#~ msgstr "" -#~ "Næste tastaturgenvej til motor til skift af næste motor for inddatametode" - -#~ msgid "Prev engine hotkey for switch to previous input method engine" -#~ msgstr "" -#~ "Forrige tastaturgenvej til motor til skift af forrige motor for " -#~ "inddatametode" - -#~ msgid "Trigger hotkey for enable or disable input context" -#~ msgstr "" -#~ "Udløser til tastaturgenvej for at aktivere eller deaktivere " -#~ "inddatakontekst" - -#~ msgid "[Control+space]" -#~ msgstr "[Control+space]" +msgstr "Når aktiv" diff --git a/po/de.po b/po/de.po index 83cdd0cd5..1161a681d 100644 --- a/po/de.po +++ b/po/de.po @@ -1,23 +1,25 @@ -# translation of de.po to -# translation of ibus.master.de.po to -# German translation of iBus. -# Copyright (C) 2009 -# This file is distributed under the same license as the iBus package. -# +# translation of ibus.pot to German +# German translation of ibus. +# Copyright (C) 2008 Peng Huang +# This file is distributed under the same license as the ibus package. +# +# Translators: # Fabian Affolter , 2009. # Hedda Peters , 2009. -# sknirT omiT , 2010. +# Mario Blättermann , 2011. msgid "" msgstr "" -"Project-Id-Version: de\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2009-12-10 09:44+1000\n" -"Last-Translator: Hedda Peters \n" -"Language-Team: \n" +"Project-Id-Version: IBus\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-06-23 14:37+0000\n" +"Last-Translator: mariobl \n" +"Language-Team: German \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: German\n" "X-Generator: KBabel 1.11.4\n" @@ -26,16 +28,14 @@ msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus-Eingabemethode-Framework" +msgstr "Eingabemethode-Framework" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus-Eingabemethode-Framework" +msgstr "IBus-Eingabemethode-Framework starten" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:40 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -47,140 +47,150 @@ msgstr "" msgid "Other" msgstr "Sonstige" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "Vorherige Seite" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "Nächste Seite" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:62 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" -"Einige Eingabemethoden wurden installiert, entfernt oder aktualisiert. Bitte " -"starten Sie die IBus-Eingabe-Plattform erneut." +"Einige Eingabemethoden wurden installiert, entfernt oder aktualisiert. Bitte" +" starten Sie die IBus-Eingabe-Plattform erneut." -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:66 msgid "Restart Now" msgstr "Jetzt neu starten" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:67 msgid "Later" msgstr "Später" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "IBus-Panel" + +#: ../ui/gtk/panel.py:122 msgid "IBus input method framework" msgstr "IBus-Eingabemethode-Framework" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:352 msgid "Restart" msgstr "Neustart" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:439 msgid "Turn off input method" msgstr "Eingabemethode ausschalten" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:478 msgid "No input window" msgstr "Kein Eingabefenster" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:509 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus ist ein intelligenter Eingabe-Bus für Linux/Unix." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:513 msgid "translator-credits" msgstr "" "Fabian Affolter , 2009.\n" "Hedda Peters , 2009." -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "Über die Eingabemethode" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "Eingabemethode wechseln" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" -msgstr "Über" +msgstr "Info" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" -msgstr "Über die Eingabemethode" +msgstr "Info zu Eingabemethoden" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "Sprache: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "Tastaturbelegung: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "Autor: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "Beschreibung:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "Auslöser" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "aktivieren" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "deaktivieren" + +#: ../setup/main.py:135 msgid "next input method" msgstr "Nächste Eingabemethode" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "Vorherige Eingabemethode" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus-Daemon wurde nicht gestartet. Möchten Sie ihn jetzt starten?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus wurde gestartet! Falls Sie IBus nicht nutzen können, fügen Sie bitte " -"folgende Zeilen in $HOME/.bashrc hinzu und melden sich neu am Desktop an.\n" +"IBus wurde gestartet! Falls Sie IBus nicht nutzen können, fügen Sie bitte folgende Zeilen in $HOME/.bashrc hinzu und melden sich neu am Desktop an.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "Wählen Sie eine Tastenkombination für %s" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "Tastenkombinationen" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "Tasten-Code:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "Hilfstasten:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -188,7 +198,7 @@ msgstr "" "Bitte eine Taste (oder eine Tastenkombination drücken).\n" "Der Dialog wird geschlossen, wenn die Taste losgelassen wird." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "Bitte eine Taste (oder eine Tastenkombination drücken)" @@ -197,22 +207,21 @@ msgid "Select an input method" msgstr "Eingabemethode wählen" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "Eingabemethode" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus-Einstellungen" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "IBus-Einstellungen" +msgstr "IBus-Einstellungen konfigurieren" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -227,67 +236,76 @@ msgid "Custom font name for language panel" msgstr "Name der benutzerdefinierten Schriftart für Sprach-Panel" #: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "Tastenkürzel deaktivieren" + +#: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text" msgstr "Preedit-Text einbetten" -#: ../data/ibus.schemas.in.h:5 +#: ../data/ibus.schemas.in.h:6 msgid "Embed Preedit Text in Application Window" msgstr "Preedit-Text in Anwendungsfenster einbetten" -#: ../data/ibus.schemas.in.h:6 -#, fuzzy +#: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default" -msgstr "Nächste Eingabemethode" +msgstr "Eingabemethode standardmäßig aktivieren" -#: ../data/ibus.schemas.in.h:7 +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "" +"Eingabemethode standardmäßig aktivieren, wenn die Anwendung Eingabefokus " +"erlangt" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "Tastenkürzel aktivieren" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "Position des Sprach-Panels" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" -msgstr "Nächste Engine Tastenkombination" +msgstr "Nächste Engine-Tastenkombination" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "Ausrichtung der Lookup-Tabelle" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "Ausrichtung der Lookup-Tabelle. 0 = Horizontal, 1 = Vertikal" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "Engines vorladen" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "Engines vorladen, während IBus startet" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" -msgstr "Vorherige Engine Tastenkombination" +msgstr "Vorherige Engine-Tastenkombination" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "Dieselbe Eingabemethode für alle Anwendungen verwenden" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "Symbol im Benachrichtigungsfeld anzeigen" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "Name der Eingabemethode anzeigen" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "Name der Eingabemethode auf Sprachleiste anzeigen" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" @@ -295,51 +313,56 @@ msgstr "" "Verhalten des Sprach-Panels: 0 = Im Menü einbetten, 1 = Automatisch " "verstecken, 2 = Immer anzeigen" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" msgstr "" -"Die Position des Sprach-Panels: 0 = Ecke oben links, 1 = Ecke oben rechts, 2 " -"= Ecke unten links, 3 = Ecke unten rechts, 4 = Benutzerdefiniert" +"Die Position des Sprach-Panels: 0 = Ecke oben links, 1 = Ecke oben rechts, 2" +" = Ecke unten links, 3 = Ecke unten rechts, 4 = Benutzerdefiniert" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" msgstr "" "Tastenkombination zum Wechseln zur nächsten Eingabemethode in der Liste" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" -msgstr "" -"Tastenkombination zum Wechseln zur vorherigen Eingabemethode in der Liste" +msgstr "Tastenkombination zum Wechseln zur vorherigen Eingabemethode" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "Tastenkürzel zum Ausschalten der Eingabemethoden" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "Tastenkürzel zum Einschalten der Eingabemethoden" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "Tastenkombination zum An- oder Ausschalten der Eingabemethode" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" -msgstr "Auslöser Tastenkombination" +msgstr "Auslöser-Tastenkombination" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "Benutzerdefinierte Schriftart verwenden" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "Benutzerdefinierte Schriftart für Sprach-Panel verwenden" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "Globale Eingabemethode wählen" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "System-Tastatur (XKB) Belegung verwenden" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "System-Tastaturbelegung verwenden" @@ -388,8 +411,7 @@ msgid "" "The default input method is the top one in the list.\n" "You may use up/down buttons to change it." msgstr "" -"Die standardmäßige Eingabemethode steht in der Liste an erster " -"Stelle.\n" +"Die standardmäßige Eingabemethode steht in der Liste an erster Stelle.\n" "Sie können dies mit den Hoch/Runter-Schaltflächen ändern." #: ../setup/setup.ui.h:17 @@ -423,111 +445,121 @@ msgid "Custom" msgstr "Benutzerdefiniert" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "Deaktivieren:" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "Preedit-Text in Anwendungsfenster einbetten" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "Den Preedit-Text der Eingabemethode in Anwendungsfenster einbetten" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "In Menü eingebettet" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "Aktivieren oder deaktivieren:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "Aktivieren:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "Allgemein" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "Horizontal" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "Position des Sprach-Panels:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "" "Bewegen Sie die gewählte Eingabemethode in den aktivierten Eingabemethoden " "nach unten" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "" "Bewegen Sie die gewählte Eingabemethode in den aktivierten Eingabemethoden " "nach oben" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "Nächste Eingabemethode:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "Vorherige Eingabemethode:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "" -"Entfernen Sie die gewählte Eingabemethode aus den aktivierten Eingabemethoden" +"Entfernen Sie die gewählte Eingabemethode aus den aktivierten " +"Eingabemethoden" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "" -"Verhalten von IBus einstellen, das Sprach-Panel anzuzeigen oder zu verstecken" +"Verhalten von IBus einstellen, das Sprach-Panel anzuzeigen oder zu " +"verstecken" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "Ausrichtung der Kandidaten in Lookup-Tabelle einstellen" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "Informationen zur gewählten Eingabemethode anzeigen" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "" "Name der gewählten Eingabemethode auf Sprach-Panel anzeigen, wenn " -"Auswahlkästchen aktiviert" +"Ankreuzfeld aktiviert" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" -msgstr "Zeige Sprach-Panel:" +msgstr "Sprach-Panel anzeigen:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" -msgstr "Starte IBus bei der Anmeldung" +msgstr "IBus bei der Anmeldung starten" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "" "Tastenkombination zum Wechseln zur nächsten Eingabemethode in der Liste" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "" "Tastenkombination zum Wechseln zur vorherigen Eingabemethode in der Liste" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "Ecke oben links" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "Ecke oben rechts" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "Benutzerdefinierte Schriftart verwenden:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "Vertikal" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "Wenn aktiv" diff --git a/po/en_GB.po b/po/en_GB.po new file mode 100644 index 000000000..f332eada4 --- /dev/null +++ b/po/en_GB.po @@ -0,0 +1,543 @@ +# English translations for ibus package. +# Copyright (C) 2011 THE ibus'S COPYRIGHT HOLDER +# This file is distributed under the same license as the ibus package. +# Steven Panek , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: ibus 1.3.99.20110430\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-04-30 01:16-0400\n" +"PO-Revision-Date: 2011-04-30 01:19-0500\n" +"Last-Translator: Steven Panek (Espreon) \n" +"Language-Team: English (British)\n" +"Language: en_GB\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../bus/ibus.desktop.in.h:1 +msgid "IBus" +msgstr "IBus" + +#: ../bus/ibus.desktop.in.h:2 +msgid "Input Method Framework" +msgstr "Input Method Framework" + +#: ../bus/ibus.desktop.in.h:3 +msgid "Start IBus Input Method Framework" +msgstr "Start IBus Input Method Framework" + +#: ../ibus/_config.py.in:40 +msgid "" +"Copyright (c) 2007-2010 Peng Huang\n" +"Copyright (c) 2007-2010 Red Hat, Inc." +msgstr "" +"Copyright (c) 2007-2010 Peng Huang\n" +"Copyright (c) 2007-2010 Red Hat, Inc." + +#: ../ibus/lang.py:41 +msgid "Other" +msgstr "Other" + +#: ../ui/gtk/candidatepanel.py:264 +msgid "Previous page" +msgstr "Previous page" + +#: ../ui/gtk/candidatepanel.py:269 +msgid "Next page" +msgstr "Next page" + +#: ../ui/gtk/main.py:62 +msgid "Some input methods have been installed, removed or updated. Please restart ibus input platform." +msgstr "Some input methods have been installed, removed or updated. Please restart ibus input platform." + +#: ../ui/gtk/main.py:66 +msgid "Restart Now" +msgstr "Restart Now" + +#: ../ui/gtk/main.py:67 +msgid "Later" +msgstr "Later" + +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "IBus Panel" + +#: ../ui/gtk/panel.py:122 +msgid "IBus input method framework" +msgstr "IBus input method framework" + +#: ../ui/gtk/panel.py:352 +msgid "Restart" +msgstr "Restart" + +#: ../ui/gtk/panel.py:439 +msgid "Turn off input method" +msgstr "Turn off input method" + +#: ../ui/gtk/panel.py:478 +msgid "No input window" +msgstr "No input window" + +#: ../ui/gtk/panel.py:509 +msgid "IBus is an intelligent input bus for Linux/Unix." +msgstr "IBus is an intelligent input bus for Linux/Unix." + +#: ../ui/gtk/panel.py:513 +msgid "translator-credits" +msgstr "Steven Panek, " + +#: ../ui/gtk/languagebar.py:106 +msgid "About the input method" +msgstr "About the input method" + +#: ../ui/gtk/languagebar.py:214 +msgid "Switch input method" +msgstr "Switch input method" + +#: ../ui/gtk/languagebar.py:357 +#: ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 +#: ../setup/setup.ui.h:16 +msgid "About" +msgstr "About" + +#: ../ui/gtk/languagebar.py:361 +msgid "About the Input Method" +msgstr "About the Input Method" + +#: ../ui/gtk/engineabout.py:61 +#: ../setup/engineabout.py:61 +#, python-format +msgid "Language: %s\n" +msgstr "Language: %s\n" + +#: ../ui/gtk/engineabout.py:63 +#: ../setup/engineabout.py:63 +#, python-format +msgid "Keyboard layout: %s\n" +msgstr "Keyboard layout: %s\n" + +#: ../ui/gtk/engineabout.py:65 +#: ../setup/engineabout.py:65 +#, python-format +msgid "Author: %s\n" +msgstr "Author: %s\n" + +#: ../ui/gtk/engineabout.py:67 +#: ../setup/engineabout.py:67 +msgid "Description:\n" +msgstr "Description:\n" + +#: ../setup/main.py:102 +msgid "trigger" +msgstr "trigger" + +#: ../setup/main.py:113 +msgid "enable" +msgstr "enable" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "disable" + +#: ../setup/main.py:135 +msgid "next input method" +msgstr "next input method" + +#: ../setup/main.py:146 +msgid "previous input method" +msgstr "previous input method" + +#: ../setup/main.py:286 +msgid "IBus daemon is not started. Do you want to start it now?" +msgstr "IBus daemon is not started. Do you want to start it now?" + +#: ../setup/main.py:301 +msgid "" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" +" export GTK_IM_MODULE=ibus\n" +" export XMODIFIERS=@im=ibus\n" +" export QT_IM_MODULE=ibus" +msgstr "" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" +" export GTK_IM_MODULE=ibus\n" +" export XMODIFIERS=@im=ibus\n" +" export QT_IM_MODULE=ibus" + +#: ../setup/main.py:316 +#, python-format +msgid "Select keyboard shortcut for %s" +msgstr "Select keyboard shortcut for %s" + +#: ../setup/keyboardshortcut.py:52 +msgid "Keyboard shortcuts" +msgstr "Keyboard shortcuts" + +#: ../setup/keyboardshortcut.py:63 +msgid "Key code:" +msgstr "Key code:" + +#: ../setup/keyboardshortcut.py:78 +msgid "Modifiers:" +msgstr "Modifiers:" + +#: ../setup/keyboardshortcut.py:231 +msgid "" +"Please press a key (or a key combination).\n" +"The dialog will be closed when the key is released." +msgstr "" +"Please press a key (or a key combination).\n" +"The dialog will be closed when the key is released." + +#: ../setup/keyboardshortcut.py:233 +msgid "Please press a key (or a key combination)" +msgstr "Please press a key (or a key combination)" + +#: ../setup/enginecombobox.py:120 +msgid "Select an input method" +msgstr "Select an input method" + +#. create im name & icon column +#: ../setup/enginetreeview.py:64 +#: ../setup/setup.ui.h:33 +msgid "Input Method" +msgstr "Input Method" + +#: ../setup/enginetreeview.py:92 +msgid "Kbd" +msgstr "Kbd" + +#: ../setup/ibus-setup.desktop.in.h:1 +#: ../setup/setup.ui.h:32 +msgid "IBus Preferences" +msgstr "IBus Preferences" + +#: ../setup/ibus-setup.desktop.in.h:2 +msgid "Set IBus Preferences" +msgstr "Set IBus Preferences" + +#: ../data/ibus.schemas.in.h:1 +msgid "Auto hide" +msgstr "Auto hide" + +#: ../data/ibus.schemas.in.h:2 +msgid "Custom font" +msgstr "Custom font" + +#: ../data/ibus.schemas.in.h:3 +msgid "Custom font name for language panel" +msgstr "Custom font name for language panel" + +#: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "Disable shortcut keys" + +#: ../data/ibus.schemas.in.h:5 +msgid "Embed Preedit Text" +msgstr "Embed Pre-edit Text" + +#: ../data/ibus.schemas.in.h:6 +msgid "Embed Preedit Text in Application Window" +msgstr "Embed Pre-edit Text in Application Window" + +#: ../data/ibus.schemas.in.h:7 +msgid "Enable input method by default" +msgstr "Enable input method by default" + +#: ../data/ibus.schemas.in.h:8 +msgid "Enable input method by default when the application gets input focus" +msgstr "Enable input method by default when the application gets input focus" + +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "Enable shortcut keys" + +#: ../data/ibus.schemas.in.h:10 +msgid "Language panel position" +msgstr "Language panel position" + +#: ../data/ibus.schemas.in.h:11 +msgid "Next engine shortcut keys" +msgstr "Next engine shortcut keys" + +#: ../data/ibus.schemas.in.h:12 +msgid "Orientation of lookup table" +msgstr "Orientation of lookup table" + +#: ../data/ibus.schemas.in.h:13 +msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" +msgstr "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" + +#: ../data/ibus.schemas.in.h:14 +msgid "Preload engines" +msgstr "Preload engines" + +#: ../data/ibus.schemas.in.h:15 +msgid "Preload engines during ibus starts up" +msgstr "Preload engines during ibus starts up" + +#: ../data/ibus.schemas.in.h:16 +msgid "Prev engine shortcut keys" +msgstr "Prev engine shortcut keys" + +#: ../data/ibus.schemas.in.h:17 +#: ../setup/setup.ui.h:42 +msgid "Share the same input method among all applications" +msgstr "Share the same input method among all applications" + +#: ../data/ibus.schemas.in.h:18 +#: ../setup/setup.ui.h:43 +msgid "Show icon on system tray" +msgstr "Show icon on system tray" + +#: ../data/ibus.schemas.in.h:19 +msgid "Show input method name" +msgstr "Show input method name" + +#: ../data/ibus.schemas.in.h:20 +#: ../setup/setup.ui.h:45 +msgid "Show input method name on language bar" +msgstr "Show input method name on language bar" + +#: ../data/ibus.schemas.in.h:21 +msgid "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = Always show" +msgstr "The behaviour of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = Always show" + +#: ../data/ibus.schemas.in.h:22 +msgid "The position of the language panel. 0 = Top left corner, 1 = Top right corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" +msgstr "The position of the language panel. 0 = Top left corner, 1 = Top right corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" + +#: ../data/ibus.schemas.in.h:23 +msgid "The shortcut keys for switching to the next input method in the list" +msgstr "The shortcut keys for switching to the next input method in the list" + +#: ../data/ibus.schemas.in.h:24 +msgid "The shortcut keys for switching to the previous input method" +msgstr "The shortcut keys for switching to the previous input method" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "The shortcut keys for turning input method off" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "The shortcut keys for turning input method on" + +#: ../data/ibus.schemas.in.h:27 +#: ../setup/setup.ui.h:51 +msgid "The shortcut keys for turning input method on or off" +msgstr "The shortcut keys for turning input method on or off" + +#: ../data/ibus.schemas.in.h:28 +msgid "Trigger shortcut keys" +msgstr "Trigger shortcut keys" + +#: ../data/ibus.schemas.in.h:29 +msgid "Use custom font" +msgstr "Use custom font" + +#: ../data/ibus.schemas.in.h:30 +msgid "Use custom font name for language panel" +msgstr "Use custom font name for language panel" + +#: ../data/ibus.schemas.in.h:31 +msgid "Use global input method" +msgstr "Use global input method" + +#: ../data/ibus.schemas.in.h:32 +#: ../setup/setup.ui.h:55 +msgid "Use system keyboard (XKB) layout" +msgstr "Use system keyboard (XKB) layout" + +#: ../data/ibus.schemas.in.h:33 +#: ../setup/setup.ui.h:56 +msgid "Use system keyboard layout" +msgstr "Use system keyboard layout" + +#: ../setup/setup.ui.h:1 +msgid "..." +msgstr "..." + +#: ../setup/setup.ui.h:2 +msgid "Font and Style" +msgstr "Font and Style" + +#: ../setup/setup.ui.h:3 +msgid "Global input method settings" +msgstr "Global input method settings" + +#: ../setup/setup.ui.h:4 +msgid "Keyboard Layout" +msgstr "Keyboard Layout" + +#: ../setup/setup.ui.h:5 +msgid "Keyboard Shortcuts" +msgstr "Keyboard Shortcuts" + +#: ../setup/setup.ui.h:6 +msgid "Startup" +msgstr "Startup" + +#: ../setup/setup.ui.h:7 +msgid "" +"IBus\n" +"The intelligent input bus\n" +"Homepage: http://code.google.com/p/ibus\n" +"\n" +"\n" +"\n" +msgstr "" +"IBus\n" +"The intelligent input bus\n" +"Homepage: http://code.google.com/p/ibus\n" +"\n" +"\n" +"\n" + +#: ../setup/setup.ui.h:14 +msgid "" +"The default input method is the top one in the list.\n" +"You may use up/down buttons to change it." +msgstr "" +"The default input method is the top one in the list.\n" +"You may use up/down buttons to change it." + +#: ../setup/setup.ui.h:17 +msgid "Add the selected input method into the enabled input methods" +msgstr "Add the selected input method into the enabled input methods" + +#: ../setup/setup.ui.h:18 +msgid "Advanced" +msgstr "Advanced" + +#: ../setup/setup.ui.h:19 +msgid "Always" +msgstr "Always" + +#: ../setup/setup.ui.h:20 +msgid "Bottom left corner" +msgstr "Bottom left corner" + +#: ../setup/setup.ui.h:21 +msgid "Bottom right corner" +msgstr "Bottom right corner" + +#: ../setup/setup.ui.h:22 +msgid "Candidates orientation:" +msgstr "Candidates orientation:" + +#: ../setup/setup.ui.h:23 +msgid "Custom" +msgstr "Custom" + +#: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "Disable:" + +#: ../setup/setup.ui.h:25 +msgid "Embed preedit text in application window" +msgstr "Embed pre-edit text in application window" + +#: ../setup/setup.ui.h:26 +msgid "Embed the preedit text of input method in the application window" +msgstr "Embed the pre-edit text of input method in the application window" + +#: ../setup/setup.ui.h:27 +msgid "Embedded in menu" +msgstr "Embedded in menu" + +#: ../setup/setup.ui.h:28 +msgid "Enable or disable:" +msgstr "Enable or disable:" + +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "Enable:" + +#: ../setup/setup.ui.h:30 +msgid "General" +msgstr "General" + +#: ../setup/setup.ui.h:31 +msgid "Horizontal" +msgstr "Horizontal" + +#: ../setup/setup.ui.h:34 +msgid "Language panel position:" +msgstr "Language panel position:" + +#: ../setup/setup.ui.h:35 +msgid "Move down the selected input method in the enabled input methods" +msgstr "Move down the selected input method in the enabled input methods" + +#: ../setup/setup.ui.h:36 +msgid "Move up the selected input method in the enabled input methods list" +msgstr "Move up the selected input method in the enabled input methods list" + +#: ../setup/setup.ui.h:37 +msgid "Next input method:" +msgstr "Next input method:" + +#: ../setup/setup.ui.h:38 +msgid "Previous input method:" +msgstr "Previous input method:" + +#: ../setup/setup.ui.h:39 +msgid "Remove the selected input method from the enabled input methods" +msgstr "Remove the selected input method from the enabled input methods" + +#: ../setup/setup.ui.h:40 +msgid "Set the behavior of ibus how to show or hide language bar" +msgstr "Set the behaviour of ibus how to show or hide language bar" + +#: ../setup/setup.ui.h:41 +msgid "Set the orientation of candidates in lookup table" +msgstr "Set the orientation of candidates in lookup table" + +#: ../setup/setup.ui.h:44 +msgid "Show information of the selected input method" +msgstr "Show information of the selected input method" + +#: ../setup/setup.ui.h:46 +msgid "Show input method's name on language bar when check the checkbox" +msgstr "Show input method's name on language bar when check the checkbox" + +#: ../setup/setup.ui.h:47 +msgid "Show language panel:" +msgstr "Show language panel:" + +#: ../setup/setup.ui.h:48 +msgid "Start ibus on login" +msgstr "Start ibus on login" + +#: ../setup/setup.ui.h:49 +msgid "The shortcut keys for switching to next input method in the list" +msgstr "The shortcut keys for switching to next input method in the list" + +#: ../setup/setup.ui.h:50 +msgid "The shortcut keys for switching to previous input method in the list" +msgstr "The shortcut keys for switching to previous input method in the list" + +#: ../setup/setup.ui.h:52 +msgid "Top left corner" +msgstr "Top left corner" + +#: ../setup/setup.ui.h:53 +msgid "Top right corner" +msgstr "Top right corner" + +#: ../setup/setup.ui.h:54 +msgid "Use custom font:" +msgstr "Use custom font:" + +#: ../setup/setup.ui.h:57 +msgid "Vertical" +msgstr "Vertical" + +#: ../setup/setup.ui.h:58 +msgid "When active" +msgstr "When active" + diff --git a/po/es.po b/po/es.po index 323951671..c91ac2343 100644 --- a/po/es.po +++ b/po/es.po @@ -1,19 +1,24 @@ -# Fedora Spanish translation of ibus.master -# This file is distributed under the same license as the ibus.master package. -# -# Héctor Daniel Cabrera , 2009, 2010. -# +# translation of ibus.pot to Spanish +# Spanish translation of ibus. +# Copyright (C) 2008 Peng Huang +# This file is distributed under the same license as the ibus package. +# +# Translators: +# Claudio Rodrigo Pereyra Diaz , 2011. +# Héctor Daniel Cabrera , 2011. msgid "" msgstr "" -"Project-Id-Version: ibus\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-30 16:35+0000\n" -"PO-Revision-Date: \n" -"Last-Translator: Héctor Daniel Cabrera \n" -"Language-Team: Fedora Spanish \n" +"Project-Id-Version: IBus\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-05-17 11:48+0000\n" +"Last-Translator: elsupergomez \n" +"Language-Team: Spanish (Castilian) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: Spanish\n" "X-Poedit-Country: ARGENTINA\n" @@ -29,7 +34,7 @@ msgstr "Marco de trabajo para métodos de entrada" msgid "Start IBus Input Method Framework" msgstr "Inicie el marco de trabajo para métodos de entrada IBus" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:40 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -41,109 +46,119 @@ msgstr "" msgid "Other" msgstr "Otro" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "Página anterior" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "Siguiente página" -#: ../ui/gtk/main.py:57 -msgid "Some input methods have been installed, removed or updated. Please restart ibus input platform." -msgstr "Algunos métodos de entrada han sido instalados, eliminados o actualizados. Por favor, reinicie la plataforma de entrada ibus." - #: ../ui/gtk/main.py:62 +msgid "" +"Some input methods have been installed, removed or updated. Please restart " +"ibus input platform." +msgstr "" +"Algunos métodos de entrada han sido instalados, eliminados o actualizados. " +"Por favor, reinicie la plataforma de entrada ibus." + +#: ../ui/gtk/main.py:66 msgid "Restart Now" msgstr "Reiniciar ahora" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:67 msgid "Later" msgstr "Más tarde" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "Panel IBus" + +#: ../ui/gtk/panel.py:122 msgid "IBus input method framework" msgstr "Marco de trabajo para métodos de entrada IBus" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:352 msgid "Restart" msgstr "Reiniciar" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:439 msgid "Turn off input method" msgstr "Desactivar métodos de entrada" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:478 msgid "No input window" msgstr "Sin ventana de entrada" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:509 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus es un bus de entrada inteligente para Linux/Unix." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:513 msgid "translator-credits" msgstr "Domingo Becker, , 2009" -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "Acerca del método de entrada" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "Cambiar método de entrada" -#: ../ui/gtk/languagebar.py:358 -#: ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 -#: ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "Acerca de" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "Acerca del Método de Entrada" -#: ../ui/gtk/engineabout.py:63 -#: ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "Idioma: %s\n" -#: ../ui/gtk/engineabout.py:65 -#: ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "Diseño del teclado: %s\n" -#: ../ui/gtk/engineabout.py:67 -#: ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "Autor: %s\n" -#: ../ui/gtk/engineabout.py:69 -#: ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "Descripción:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "activador" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "habilitar" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "deshabilitar" + +#: ../setup/main.py:135 msgid "next input method" msgstr "siguiente método de entrada" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "método de entrada anterior" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "El demonio IBUS no fue iniciado. ¿Desea iniciarlo ahora?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" "IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" @@ -155,24 +170,24 @@ msgstr "" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "Seleccione la tecla de atajo para %s" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "Atajos de teclado" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "Código clave:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "Modificadores:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -180,7 +195,7 @@ msgstr "" "Por favor, presione una tecla (o una combinación de tecla).\n" "El diálogo será cerrado cuando la tecla sea soltada." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "Por favor, presione una tecla (o combinación de teclas)" @@ -189,17 +204,15 @@ msgid "Select an input method" msgstr "Seleccione un método de entrada" #. create im name & icon column -#: ../setup/enginetreeview.py:67 -#: ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "Métodos de Entrada" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 -#: ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "Preferencias de IBus" @@ -220,112 +233,137 @@ msgid "Custom font name for language panel" msgstr "Nombre de fuente personalizado para el panel de idioma" #: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "Deshabilitar atajos de teclado" + +#: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text" msgstr "Insertar texto preeditado" -#: ../data/ibus.schemas.in.h:5 +#: ../data/ibus.schemas.in.h:6 msgid "Embed Preedit Text in Application Window" msgstr "Insertar texto previamente editado en la ventana de la aplicación" -#: ../data/ibus.schemas.in.h:6 +#: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default" msgstr "Habilitar método de entrada en forma predeterminada" -#: ../data/ibus.schemas.in.h:7 +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" -msgstr "Habilitar método de entrada en forma predeterminada cuando la aplicación en uso solicite alguno" +msgstr "" +"Habilitar método de entrada en forma predeterminada cuando la aplicación en " +"uso solicite alguno" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "Habilitar atajos de teclado" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "Posición del panel de idioma" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" msgstr "Atajo de teclado para el siguiente motor" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "Orientación de búsqueda en la tabla " -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "Orientación de la tabla de búsqueda. 0 = Horizontal, 1 = Vertical" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "Precargar máquinas" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "Precargar los motores durante el inicio de ibus" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" msgstr "Atajo de teclado para la máquina previa" -#: ../data/ibus.schemas.in.h:15 -#: ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "Compartir el mismo método de entrada con todas las aplicaciones" -#: ../data/ibus.schemas.in.h:16 -#: ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "Mostrar un ícono en el área de notificación" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "Mostrar el nombre del método de entrada" -#: ../data/ibus.schemas.in.h:18 -#: ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "Mostrar el nombre del método de entrada en la barra de idioma" -#: ../data/ibus.schemas.in.h:19 -msgid "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = Always show" -msgstr "El comportamiento del panel de idioma. 0 = Incrustado en el menú, 1 = Ocultarlo automáticamente, 2 = Mostrarlo siempre" +#: ../data/ibus.schemas.in.h:21 +msgid "" +"The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " +"Always show" +msgstr "" +"El comportamiento del panel de idioma. 0 = Incrustado en el menú, 1 = " +"Ocultarlo automáticamente, 2 = Mostrarlo siempre" -#: ../data/ibus.schemas.in.h:20 -msgid "The position of the language panel. 0 = Top left corner, 1 = Top right corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" -msgstr "La posicion el panel de idioma. 0 = esquina superior izquierda, 1 = esquina superior derecha, 2 = esquina inferior izquierda, 3 = esquina inferior derecha, 4 = personalizado" +#: ../data/ibus.schemas.in.h:22 +msgid "" +"The position of the language panel. 0 = Top left corner, 1 = Top right " +"corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" +msgstr "" +"La posicion el panel de idioma. 0 = esquina superior izquierda, 1 = esquina " +"superior derecha, 2 = esquina inferior izquierda, 3 = esquina inferior " +"derecha, 4 = personalizado" -#: ../data/ibus.schemas.in.h:21 +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" -msgstr "Los atajos de teclado para avanzar al siguiente método de entrada de la lista" +msgstr "" +"Los atajos de teclado para avanzar al siguiente método de entrada de la " +"lista" -#: ../data/ibus.schemas.in.h:22 +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" -msgstr "Los atajos de teclado para retroceder al método de entrada anterior en la lista" +msgstr "" +"Los atajos de teclado para retroceder al método de entrada anterior en la " +"lista" -#: ../data/ibus.schemas.in.h:23 -#: ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "Los atajos de teclado para deshabilitar el método de entrada" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "Los atajos de teclado para habilitar el método de entrada" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "Atajo de teclado para encender o apagar el método de entrada" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "Activadora de los Atajos de teclado" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "Usar fuente personalizada" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "Usar nombre de fuente personalizada para el panel de idioma" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "Utilizar método de entrada global" -#: ../data/ibus.schemas.in.h:28 -#: ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "Usar el diseño del teclado del sistema (XKB)" -#: ../data/ibus.schemas.in.h:29 -#: ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "Usar el diseño del teclado del sistema" @@ -379,7 +417,9 @@ msgstr "" #: ../setup/setup.ui.h:17 msgid "Add the selected input method into the enabled input methods" -msgstr "Agregar el método de entrada seleccionado a los métodos de entrada habilitados" +msgstr "" +"Agregar el método de entrada seleccionado a los métodos de entrada " +"habilitados" #: ../setup/setup.ui.h:18 msgid "Advanced" @@ -406,136 +446,123 @@ msgid "Custom" msgstr "Personalizado" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "Deshabilitar:" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "Insertar texto previamente editado en la ventana de la aplicación" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" -msgstr "Insertar el texto previamente editado del método de entrada en la ventana de la aplicación" +msgstr "" +"Insertar el texto previamente editado del método de entrada en la ventana de" +" la aplicación" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "Menú incrustado" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "Habilitar o deshabilitar:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "Habilitar:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "General" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "Horizontal" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "Posición del panel de idioma:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" -msgstr "Mover abajo el método de entrada seleccionado en los métodos de entrada habilitados" +msgstr "" +"Mover abajo el método de entrada seleccionado en los métodos de entrada " +"habilitados" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" -msgstr "Mover arriba el método de entrada seleccionado en la lista de métodos de entrada habilitados" +msgstr "" +"Mover arriba el método de entrada seleccionado en la lista de métodos de " +"entrada habilitados" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "Siguiente método de entrada:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "Método de entrada anterior:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" -msgstr "Eliminar el método de entrada seleccionado de los métodos de entrada habilitados" +msgstr "" +"Eliminar el método de entrada seleccionado de los métodos de entrada " +"habilitados" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" -msgstr "Configurar el comportamiento de ibus sobre cómo mostrar u ocultar la barra de idiomas" +msgstr "" +"Configurar el comportamiento de ibus sobre cómo mostrar u ocultar la barra " +"de idiomas" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "Poner la orientación de la tabla de búsqueda de candidatos" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "Mostrar información sobre el método de entrada seleccionado" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" -msgstr "Mostrar el nombre del método de entrada en la barra de idioma cuando se marque la casilla" +msgstr "" +"Mostrar el nombre del método de entrada en la barra de idioma cuando se " +"marque la casilla" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "Mostrar el panel de idioma:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "Iniciar ibus al ingresar" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" -msgstr "Tecla programada para cambiar al siguiente método de entrada en la lista" +msgstr "" +"Tecla programada para cambiar al siguiente método de entrada en la lista" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" -msgstr "Tecla programada para cambiar al método de entrada anterior en la lista" +msgstr "" +"Tecla programada para cambiar al método de entrada anterior en la lista" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "Esquina superior izquierda" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "Esquina superior derecha" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "Usar fuente personalizada:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "Vertical" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "Cuando esté activo" - -#~ msgid "Never" -#~ msgstr "Nunca" - -#~ msgid "Show in Status Icon menu" -#~ msgstr "Mostrar en el menú de íconos de estado" - -#, fuzzy -#~ msgid "Use global engine" -#~ msgstr "Precargar máquinas" - -#, fuzzy -#~ msgid "Langauge panel position" -#~ msgstr "Mostrar el panel de idioma:" - -#~ msgid "Custom font:" -#~ msgstr "Fuente personalizada:" - -#~ msgid "Font for language bar and candidates" -#~ msgstr "Fuente para la barra de idioma y candidatos" - -#~ msgid "Use custom font for language bar and candidates" -#~ msgstr "Usar fuente personalizada para la barra de idiomas y candidatos" - -#~ msgid "Custom Font" -#~ msgstr "Fuente Personalizada" - -#~ msgid "Show IM Name" -#~ msgstr "Mostrar Nombre de ME" - -#~ msgid "Show IM name on language bar" -#~ msgstr "Mostrar nombre de ME en la barra de idioma" - -#~ msgid "Use Custom Font" -#~ msgstr "Usar Fuente Personalizada" diff --git a/po/fa.po b/po/fa.po new file mode 100644 index 000000000..abd6184d7 --- /dev/null +++ b/po/fa.po @@ -0,0 +1,525 @@ +# translation of ibus.pot to Persian +# Persian translation of ibus. +# Copyright (C) 2008 Peng Huang +# This file is distributed under the same license as the ibus package. +# +# Translators: +# Daniyal Yousefi , 2011. +# Mostafa Daneshvar , 2011. +msgid "" +msgstr "" +"Project-Id-Version: IBus\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-07-30 19:07+0000\n" +"Last-Translator: danialyousefi \n" +"Language-Team: Persian (http://www.transifex.net/projects/p/fedora/team/fa/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fa\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: ../bus/ibus.desktop.in.h:1 +msgid "IBus" +msgstr "IBus" + +#: ../bus/ibus.desktop.in.h:2 +msgid "Input Method Framework" +msgstr "" + +#: ../bus/ibus.desktop.in.h:3 +msgid "Start IBus Input Method Framework" +msgstr "" + +#: ../ibus/_config.py.in:40 +msgid "" +"Copyright (c) 2007-2010 Peng Huang\n" +"Copyright (c) 2007-2010 Red Hat, Inc." +msgstr "" +"Copyright (c) 2007-2010 Peng Huang\n" +"Copyright (c) 2007-2010 Red Hat, Inc." + +#: ../ibus/lang.py:41 +msgid "Other" +msgstr "دیگر" + +#: ../ui/gtk/candidatepanel.py:264 +msgid "Previous page" +msgstr "صفحهٔ قبل" + +#: ../ui/gtk/candidatepanel.py:269 +msgid "Next page" +msgstr "صفحهٔ بعد" + +#: ../ui/gtk/main.py:62 +msgid "" +"Some input methods have been installed, removed or updated. Please restart " +"ibus input platform." +msgstr "" + +#: ../ui/gtk/main.py:66 +msgid "Restart Now" +msgstr "راه‌اندازی مجدد، همین حالا" + +#: ../ui/gtk/main.py:67 +msgid "Later" +msgstr "بعداً" + +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "" + +#: ../ui/gtk/panel.py:122 +msgid "IBus input method framework" +msgstr "" + +#: ../ui/gtk/panel.py:352 +msgid "Restart" +msgstr "راه‌اندازی مجدد" + +#: ../ui/gtk/panel.py:439 +msgid "Turn off input method" +msgstr "" + +#: ../ui/gtk/panel.py:478 +msgid "No input window" +msgstr "" + +#: ../ui/gtk/panel.py:509 +msgid "IBus is an intelligent input bus for Linux/Unix." +msgstr "" + +#: ../ui/gtk/panel.py:513 +msgid "translator-credits" +msgstr "" + +#: ../ui/gtk/languagebar.py:106 +msgid "About the input method" +msgstr "" + +#: ../ui/gtk/languagebar.py:214 +msgid "Switch input method" +msgstr "" + +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 +msgid "About" +msgstr "درباره" + +#: ../ui/gtk/languagebar.py:361 +msgid "About the Input Method" +msgstr "" + +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 +#, python-format +msgid "Language: %s\n" +msgstr "زبان: %s\n" + +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#, python-format +msgid "Keyboard layout: %s\n" +msgstr "" + +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#, python-format +msgid "Author: %s\n" +msgstr "نویسنده: %s\n" + +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +msgid "Description:\n" +msgstr "شرح:\n" + +#: ../setup/main.py:102 +msgid "trigger" +msgstr "" + +#: ../setup/main.py:113 +msgid "enable" +msgstr "فعال" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "غیرفعال" + +#: ../setup/main.py:135 +msgid "next input method" +msgstr "" + +#: ../setup/main.py:146 +msgid "previous input method" +msgstr "" + +#: ../setup/main.py:286 +msgid "IBus daemon is not started. Do you want to start it now?" +msgstr "" + +#: ../setup/main.py:301 +msgid "" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" +" export GTK_IM_MODULE=ibus\n" +" export XMODIFIERS=@im=ibus\n" +" export QT_IM_MODULE=ibus" +msgstr "" + +#: ../setup/main.py:316 +#, python-format +msgid "Select keyboard shortcut for %s" +msgstr "" + +#: ../setup/keyboardshortcut.py:52 +msgid "Keyboard shortcuts" +msgstr "میانبرهای صفحه‌کلید" + +#: ../setup/keyboardshortcut.py:63 +msgid "Key code:" +msgstr "" + +#: ../setup/keyboardshortcut.py:78 +msgid "Modifiers:" +msgstr "" + +#: ../setup/keyboardshortcut.py:231 +msgid "" +"Please press a key (or a key combination).\n" +"The dialog will be closed when the key is released." +msgstr "" + +#: ../setup/keyboardshortcut.py:233 +msgid "Please press a key (or a key combination)" +msgstr "" + +#: ../setup/enginecombobox.py:120 +msgid "Select an input method" +msgstr "" + +#. create im name & icon column +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 +msgid "Input Method" +msgstr "" + +#: ../setup/enginetreeview.py:92 +msgid "Kbd" +msgstr "" + +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 +msgid "IBus Preferences" +msgstr "" + +#: ../setup/ibus-setup.desktop.in.h:2 +msgid "Set IBus Preferences" +msgstr "" + +#: ../data/ibus.schemas.in.h:1 +msgid "Auto hide" +msgstr "" + +#: ../data/ibus.schemas.in.h:2 +msgid "Custom font" +msgstr "" + +#: ../data/ibus.schemas.in.h:3 +msgid "Custom font name for language panel" +msgstr "" + +#: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "" + +#: ../data/ibus.schemas.in.h:5 +msgid "Embed Preedit Text" +msgstr "" + +#: ../data/ibus.schemas.in.h:6 +msgid "Embed Preedit Text in Application Window" +msgstr "" + +#: ../data/ibus.schemas.in.h:7 +msgid "Enable input method by default" +msgstr "" + +#: ../data/ibus.schemas.in.h:8 +msgid "Enable input method by default when the application gets input focus" +msgstr "" + +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "فعال‌کردن کلیدهای میانبر" + +#: ../data/ibus.schemas.in.h:10 +msgid "Language panel position" +msgstr "" + +#: ../data/ibus.schemas.in.h:11 +msgid "Next engine shortcut keys" +msgstr "" + +#: ../data/ibus.schemas.in.h:12 +msgid "Orientation of lookup table" +msgstr "" + +#: ../data/ibus.schemas.in.h:13 +msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" +msgstr "" + +#: ../data/ibus.schemas.in.h:14 +msgid "Preload engines" +msgstr "" + +#: ../data/ibus.schemas.in.h:15 +msgid "Preload engines during ibus starts up" +msgstr "" + +#: ../data/ibus.schemas.in.h:16 +msgid "Prev engine shortcut keys" +msgstr "" + +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 +msgid "Share the same input method among all applications" +msgstr "" + +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +msgid "Show icon on system tray" +msgstr "" + +#: ../data/ibus.schemas.in.h:19 +msgid "Show input method name" +msgstr "" + +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 +msgid "Show input method name on language bar" +msgstr "" + +#: ../data/ibus.schemas.in.h:21 +msgid "" +"The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " +"Always show" +msgstr "" + +#: ../data/ibus.schemas.in.h:22 +msgid "" +"The position of the language panel. 0 = Top left corner, 1 = Top right " +"corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" +msgstr "" + +#: ../data/ibus.schemas.in.h:23 +msgid "The shortcut keys for switching to the next input method in the list" +msgstr "" + +#: ../data/ibus.schemas.in.h:24 +msgid "The shortcut keys for switching to the previous input method" +msgstr "" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 +msgid "The shortcut keys for turning input method on or off" +msgstr "" + +#: ../data/ibus.schemas.in.h:28 +msgid "Trigger shortcut keys" +msgstr "" + +#: ../data/ibus.schemas.in.h:29 +msgid "Use custom font" +msgstr "" + +#: ../data/ibus.schemas.in.h:30 +msgid "Use custom font name for language panel" +msgstr "" + +#: ../data/ibus.schemas.in.h:31 +msgid "Use global input method" +msgstr "" + +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 +msgid "Use system keyboard (XKB) layout" +msgstr "" + +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 +msgid "Use system keyboard layout" +msgstr "" + +#: ../setup/setup.ui.h:1 +msgid "..." +msgstr "" + +#: ../setup/setup.ui.h:2 +msgid "Font and Style" +msgstr "" + +#: ../setup/setup.ui.h:3 +msgid "Global input method settings" +msgstr "" + +#: ../setup/setup.ui.h:4 +msgid "Keyboard Layout" +msgstr "" + +#: ../setup/setup.ui.h:5 +msgid "Keyboard Shortcuts" +msgstr "" + +#: ../setup/setup.ui.h:6 +msgid "Startup" +msgstr "" + +#: ../setup/setup.ui.h:7 +msgid "" +"IBus\n" +"The intelligent input bus\n" +"Homepage: http://code.google.com/p/ibus\n" +"\n" +"\n" +"\n" +msgstr "" + +#: ../setup/setup.ui.h:14 +msgid "" +"The default input method is the top one in the list.\n" +"You may use up/down buttons to change it." +msgstr "" + +#: ../setup/setup.ui.h:17 +msgid "Add the selected input method into the enabled input methods" +msgstr "" + +#: ../setup/setup.ui.h:18 +msgid "Advanced" +msgstr "پیشرفته" + +#: ../setup/setup.ui.h:19 +msgid "Always" +msgstr "همیشه" + +#: ../setup/setup.ui.h:20 +msgid "Bottom left corner" +msgstr "گوشه پایین سمت چپ" + +#: ../setup/setup.ui.h:21 +msgid "Bottom right corner" +msgstr "چوشه پایین سمت راست" + +#: ../setup/setup.ui.h:22 +msgid "Candidates orientation:" +msgstr "" + +#: ../setup/setup.ui.h:23 +msgid "Custom" +msgstr "انتخابی" + +#: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "غیرفعال:" + +#: ../setup/setup.ui.h:25 +msgid "Embed preedit text in application window" +msgstr "" + +#: ../setup/setup.ui.h:26 +msgid "Embed the preedit text of input method in the application window" +msgstr "" + +#: ../setup/setup.ui.h:27 +msgid "Embedded in menu" +msgstr "" + +#: ../setup/setup.ui.h:28 +msgid "Enable or disable:" +msgstr "فعال یا غیرفعال:" + +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "فعال:" + +#: ../setup/setup.ui.h:30 +msgid "General" +msgstr "اصلی" + +#: ../setup/setup.ui.h:31 +msgid "Horizontal" +msgstr "افقی" + +#: ../setup/setup.ui.h:34 +msgid "Language panel position:" +msgstr "موقعیت پنل زبان:" + +#: ../setup/setup.ui.h:35 +msgid "Move down the selected input method in the enabled input methods" +msgstr "" + +#: ../setup/setup.ui.h:36 +msgid "Move up the selected input method in the enabled input methods list" +msgstr "" + +#: ../setup/setup.ui.h:37 +msgid "Next input method:" +msgstr "" + +#: ../setup/setup.ui.h:38 +msgid "Previous input method:" +msgstr "" + +#: ../setup/setup.ui.h:39 +msgid "Remove the selected input method from the enabled input methods" +msgstr "" + +#: ../setup/setup.ui.h:40 +msgid "Set the behavior of ibus how to show or hide language bar" +msgstr "" + +#: ../setup/setup.ui.h:41 +msgid "Set the orientation of candidates in lookup table" +msgstr "" + +#: ../setup/setup.ui.h:44 +msgid "Show information of the selected input method" +msgstr "" + +#: ../setup/setup.ui.h:46 +msgid "Show input method's name on language bar when check the checkbox" +msgstr "" + +#: ../setup/setup.ui.h:47 +msgid "Show language panel:" +msgstr "نمایش پنل زبان:" + +#: ../setup/setup.ui.h:48 +msgid "Start ibus on login" +msgstr "" + +#: ../setup/setup.ui.h:49 +msgid "The shortcut keys for switching to next input method in the list" +msgstr "" + +#: ../setup/setup.ui.h:50 +msgid "The shortcut keys for switching to previous input method in the list" +msgstr "" + +#: ../setup/setup.ui.h:52 +msgid "Top left corner" +msgstr "گوشه بالا سمت چپ" + +#: ../setup/setup.ui.h:53 +msgid "Top right corner" +msgstr "گوشه بالا سمت راست" + +#: ../setup/setup.ui.h:54 +msgid "Use custom font:" +msgstr "استفاده از فونت انتخابی" + +#: ../setup/setup.ui.h:57 +msgid "Vertical" +msgstr "عمودی" + +#: ../setup/setup.ui.h:58 +msgid "When active" +msgstr "" + + diff --git a/po/fr.po b/po/fr.po index 650f2368e..db0eb820a 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,42 +1,43 @@ -# Japanese translation of ibus. -# Copyright (C) 2008 Huang Peng +# translation of ibus.pot to French +# French translation of ibus. +# Copyright (C) 2008 Peng Huang # This file is distributed under the same license as the ibus package. -# -# -# UTUMI Hirosi , 2008. +# +# Translators: # Charles-Antoine Couret , 2009. -# Humbert Julien , 2009, 2010. +# Julien Humbert , 2009, 2010, 2011. +# Sam Friedmann , 2010. +# dominique bribanick , 2011. msgid "" msgstr "" -"Project-Id-Version: ibus VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-06-04 12:06+0200\n" -"Last-Translator: \n" -"Language-Team: French \n" +"Project-Id-Version: IBus\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-07-16 04:21+0000\n" +"Last-Translator: dominique \n" +"Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Poedit-Language: French\n" "X-Poedit-Country: FRANCE\n" -"X-Generator: Lokalize 1.0\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Lokalize 1.2\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "Environnement de méthode de saisie iBus" +msgstr "Framework de méthode de saisie" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "Environnement de méthode de saisie iBus" +msgstr "Démarrer le framework de méthode de saisie IBus" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:40 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -48,15 +49,15 @@ msgstr "" msgid "Other" msgstr "Autre" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "Page précédente" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "Page suivante" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:62 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." @@ -64,123 +65,132 @@ msgstr "" "Certaines méthodes d'entrée ont été installées, supprimées ou mises à jour. " "Veuillez redémarrer iBus." -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:66 msgid "Restart Now" msgstr "Redémarrer IBus maintenant" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:67 msgid "Later" msgstr "Plus tard" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "Tableau de bord IBus" + +#: ../ui/gtk/panel.py:122 msgid "IBus input method framework" -msgstr "Environnement de méthode de saisie iBus" +msgstr "Framework de méthode de saisie iBus" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:352 msgid "Restart" msgstr "Redémarrer IBus" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:439 msgid "Turn off input method" msgstr "Désactiver la méthode d'entrée" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:478 msgid "No input window" msgstr "Aucune fenêtre de saisie" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:509 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus est un IME intelligent pour Linux/Unix" -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:513 msgid "translator-credits" -msgstr "HUMBERT Julien " +msgstr "Julien Humbert " -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "À propos de la méthode d'entrée" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "Changer de méthode d'entrée" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "À propos" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "À propos de la méthode d'entrée" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "Langue : %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "Disposition du clavier : %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "Auteur : %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "Description :\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "déclencheur" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "activer" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "désactiver" + +#: ../setup/main.py:135 msgid "next input method" msgstr "méthode d'entrée suivante" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "méthode d'entrée précédente" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "Le démon IBus n'est pas démarré. Voulez-vous le démarrer maintenant ?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus a été démarré ! Si vous ne pouvez pas utiliser IBus, veuillez ajouter " -"les lignes suivantes dans le fichier « $HOME/.bashrc », et veuillez vous " -"reconnecter.\n" +"IBus a été démarré ! Si vous ne pouvez pas utiliser IBus, veuillez ajouter les lignes suivantes dans le fichier « $HOME/.bashrc », et veuillez vous reconnecter.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "Raccourci clavier pour %s" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "Raccourci clavier" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "Touche :" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "Modificateurs :" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -188,7 +198,7 @@ msgstr "" "Veuillez appuyer sur une touche (ou une combinaison de touches).\n" "La boîte de dialogue se fermera lorsque la touche sera relâchée." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "Veuillez appuyer sur une touche (ou une combinaison de touches)" @@ -197,22 +207,21 @@ msgid "Select an input method" msgstr "Sélectionnez une méthode d'entrée" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "Méthode d'entrée" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" -msgstr "Préférences IBus" +msgstr "Préférences de IBus" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "Préférences IBus" +msgstr "Définir les préférences de IBus" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -227,75 +236,84 @@ msgid "Custom font name for language panel" msgstr "Police personnalisée pour le panneau de langue" #: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "Désactiver les raccourcis clavier" + +#: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text" msgstr "Insérer le texte en cours d'édition" -#: ../data/ibus.schemas.in.h:5 +#: ../data/ibus.schemas.in.h:6 msgid "Embed Preedit Text in Application Window" msgstr "Insérer le texte en cours d'édition dans la fenêtre de l'application" -#: ../data/ibus.schemas.in.h:6 +#: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default" msgstr "Par défaut, activer la méthode d'entrée" -#: ../data/ibus.schemas.in.h:7 +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "" -"Par défaut, activer la méthode d'entrée lorsque l'application reçoit le focus" +"Par défaut, activer la méthode d'entrée lorsque l'application reçoit le " +"focus" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "Activer les raccourcis clavier" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "Position de la barre" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" msgstr "Raccourci clavier pour passer au moteur suivant" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "Orientation de la liste des candidats" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "Orientation de la liste des candidats. 0 = Horizontale, 1 = Verticale" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "Précharger les moteurs" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "Précharger les moteurs au démarrage d'ibus" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" msgstr "Raccourci clavier pour revenir au moteur précédent" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "Partager la même méthode d'entrée pour toutes les applications" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "Afficher l'icône dans la boîte à miniatures" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "Afficher le nom de la méthode d'entrée" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "Afficher le nom de la méthode d'entrée sur la barre de langue" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" msgstr "" -"Sélection du comportement d'affichage de la liste des candidats. 0 = Insérée " -"dans le menu, 1 = Masquer automatiquement, 2 = Toujours afficher" +"Sélection du comportement d'affichage de la liste des candidats. 0 = Insérée" +" dans le menu, 1 = Masquer automatiquement, 2 = Toujours afficher" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" @@ -304,42 +322,50 @@ msgstr "" "supérieur droit, 2 = Coin inférieur gauche, 3 = Coin inférieur droit, 4 = " "Personnalisé" -#: ../data/ibus.schemas.in.h:21 +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" msgstr "" "Raccourci clavier pour passer à la méthode d'entrée suivante de la liste" -#: ../data/ibus.schemas.in.h:22 +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" msgstr "Raccourci clavier pour revenir à la méthode d'entrée précédente" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "Les raccourcis clavier pour la méthode d'entrée sont désactivés" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "Les raccourcis clavier pour la méthode d'entrée sont activés" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "" "Sélection des raccourcis claviers pour activer ou désactiver les méthodes " "d'entrées" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "Raccourci clavier déclencheur" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "Utiliser une police personnalisée :" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "Utiliser une police personnalisée pour la barre de langue" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "Utiliser la méthode d'éntrée globale" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "Utiliser la disposition clavier système (XKB)" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "Utiliser la disposition clavier système" @@ -393,7 +419,8 @@ msgstr "" #: ../setup/setup.ui.h:17 msgid "Add the selected input method into the enabled input methods" -msgstr "Ajouter la méthode d'entrée selectionnée aux méthodes d'entrée actives" +msgstr "" +"Ajouter la méthode d'entrée selectionnée aux méthodes d'entrée actives" #: ../setup/setup.ui.h:18 msgid "Advanced" @@ -420,161 +447,122 @@ msgid "Custom" msgstr "Personnalisée" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "Désactiver :" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "Insérer le texte en cours d'édition dans la fenêtre de l'application" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "" "Insérer le texte en cours d'édition par la méthode d'entrée dans la fenêtre " "de l'application" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "Insérée dans le menu" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "Activer / désactiver :" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "Activer :" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "Général" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "Horizontale" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "Afficher la barre de langue :" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "" "Déplacer vers le bas la méthode d'entrée selectionnée dans la liste des " "méthodes d'entrée actives" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "" "Déplacer vers le haut la méthode d'entrée selectionnée dans la liste des " "méthodes d'entrée actives" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "Méthode d'entrée suivante :" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "Méthode d'entrée précédente :" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "" "Supprimer la méthode d'entrée selectionnée des méthodes d'entrées actives" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "Permet de choisir l'affichage de la barre de langue d'ibus" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "Permet de choisir l'orientation de la liste des candidats" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "Afficher les informations de la méthode d'entrée selectionnée" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "" "Afficher le nom de la méthode d'entrée sur la barre de langue lorsque la " "case est cochée" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "Afficher la barre de langue :" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "Démarrer IBus lors de la connexion" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "" "Raccourci clavier pour passer à la méthode d'entrée suivante de la liste" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "" "Raccourci clavier pour revenir à la méthode d'entrée précédente de la liste" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "Coin supérieur gauche" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "Coin supérieur droit" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "Utiliser une police personnalisée :" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "Verticale" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "Uniquement lorsque active" -#~ msgid "Never" -#~ msgstr "Ne jamais afficher" - -#~ msgid "Show in Status Icon menu" -#~ msgstr "Afficher l'icône de statut dans le menu" - -#, fuzzy -#~ msgid "Use global engine" -#~ msgstr "Précharger les moteurs" - -#, fuzzy -#~ msgid "Langauge panel position" -#~ msgstr "Afficher la barre de langue :" - -#~ msgid "Custom font:" -#~ msgstr "Police personnalisée :" - -#, fuzzy -#~ msgid "Font for language bar and candidates" -#~ msgstr "" -#~ "Choix d'une police personnalisée pour la barre de langue et les candidats" - -#~ msgid "Use custom font for language bar and candidates" -#~ msgstr "" -#~ "Utiliser une police personnalisée pour le barre de langue et les candidats" - -#~ msgid "Custom Font" -#~ msgstr "Police personnalisée" - -#~ msgid "Show IM Name" -#~ msgstr "Afficher le nom de la méthode d'entrée" - -#~ msgid "Show IM name on language bar" -#~ msgstr "Afficher le nom de la méthode d'entrée sur la barre de langue" - -#~ msgid "Use Custom Font" -#~ msgstr "Utiliser une police personnalisée" - -#~ msgid "Next engine hotkey for switch to next input method engine" -#~ msgstr "Raccourci clavier pour passer au moteur de méthode d'entrée suivant" - -#~ msgid "Prev engine hotkey for switch to previous input method engine" -#~ msgstr "" -#~ "Raccourci clavier pour revenir au moteur de méthode d'entrée précédant" -#~ msgid "Trigger hotkey for enable or disable input context" -#~ msgstr "" -#~ "Raccourci clavier d'activation ou de désactivation la méthode d'entrée" diff --git a/po/gu.po b/po/gu.po index b35608dff..e8fd53b4b 100644 --- a/po/gu.po +++ b/po/gu.po @@ -1,39 +1,38 @@ -# translation of gu.po to Gujarati +# translation of ibus.master.gu.po to Gujarati +# Gujarati translation of ibus. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# This file is distributed under the same license as the ibus package. # -# Sweta Kothari , 2009, 2010. # Ankit Patel , 2010. +# Sweta Kothari , 2009-2011. msgid "" msgstr "" -"Project-Id-Version: gu\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-03-23 12:09+0530\n" +"Project-Id-Version: ibus.master.gu\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-03-08 12:32+0900\n" +"PO-Revision-Date: 2011-03-22 15:23+0000\n" "Last-Translator: Sweta Kothari \n" -"Language-Team: Gujarati\n" +"Language-Team: Gujarati \n" +"Language: gu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" -"Plural-Forms: nplurals=2; plural=(n!=1);\n" -"\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus ઇનપુટ પદ્દતિ ફ્રેમવર્ક" +msgstr "ઇનપુટ પદ્દતિ ફ્રેમવર્ક" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus ઇનપુટ પદ્દતિ ફ્રેમવર્ક" +msgstr "IBus ઇનપુટ પદ્દતિ ફ્રેમવર્કને શરૂ કરો" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -45,138 +44,144 @@ msgstr "" msgid "Other" msgstr "બીજા" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "પહેલાનુ પાનું" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "પછીનુ પાનું" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" -"અમુક ઇનપુટ પદ્દતિઓને સ્થાપિત, દૂર અથવા સુધારી દેવામાં આવી છે. મહેરબાની કરીને ibus ઇનપુટ " -"પ્લેટફોર્મને પુન:શરૂ કરો." +"અમુક ઇનપુટ પદ્દતિઓને સ્થાપિત, દૂર અથવા સુધારી દેવામાં આવી છે. મહેરબાની કરીને" +" ibus ઇનપુટ પ્લેટફોર્મને પુન:શરૂ કરો." -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 msgid "Restart Now" msgstr "હવે પુન:શરૂ કરો" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 msgid "Later" msgstr "પછી" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "IBus ઇનપુટ પદ્દતિ ફ્રેમવર્ક" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "પુન:શરૂ કરો" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 msgid "Turn off input method" msgstr "ઇનપુટ પદ્દતિને બંધ કરો" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "ઇનપુટ વિન્ડો નથી" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus એ Linux/Unix માટે હોશિયાર ઇનપુટ બસ છે." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "શ્ર્વેતા કોઠારી " -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "ઇનપુટ પદ્દતિ વિશે" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "ઇનપુટ પદ્દતિને બદલો" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "વિશે" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "ઇનપુટ પદ્દતિ વિશે" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "ભાષા: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "કિબોર્ડ લેઆઉટ: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "લેખક: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "વર્ણન:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "ટ્રીગર" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "સક્રિય" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "નિષ્ક્રિય" + +#: ../setup/main.py:135 msgid "next input method" msgstr "પછીની ઇનપુટ પદ્દતિ" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "પહેલાની ઇનપુટ પદ્દતિ" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus ડિમન એ શરૂ થયેલ નથી. શું તમે હવે તેને શરૂ કરવા ઇચ્છો છો?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus ને શરૂ કરી દેવામાં આવી છે! જો તમે IBus ને વાપરી શકતા ન હોય તો, મહેરબાની કરીને " -"નીચેનાં વાક્યમાં ઉમેરો$HOME/.bashrc, અને તમારા ડેસ્કટોપમાં ફરીથી પ્રવેશ કરો.\n" +"IBus ને શરૂ કરી દેવામાં આવી છે! જો તમે IBus ને વાપરી શકતા ન હોય તો, મહેરબાની કરીને નીચેનાં વાક્યમાં ઉમેરો$HOME/.bashrc, અને તમારા ડેસ્કટોપમાં ફરીથી પ્રવેશ કરો.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "%s માટે કિબોર્ડ ટૂંકાણોને પસંદ કરો" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "કિબોર્ડ ટૂંકાણો" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "કિ કોડ:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "બદલનારો:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -184,7 +189,7 @@ msgstr "" "મહેરબાની કરીને કીને દબાવો (અથવા કી સંયોજન).\n" "સંવાદ એ બંધ થયેલ હશે જ્યારે કી પ્રકાશિત થયેલ હોય તો." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "મહેરબાની કરીને કી ને દબાવો (અથવા કી સંયોજન)" @@ -193,22 +198,21 @@ msgid "Select an input method" msgstr "ઇનપુટ પદ્દતિને પસંદ કરો" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "ઇનપુટ પદ્દતિ" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus પસંદગીઓ" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "IBus પસંદગીઓ" +msgstr "IBus પસંદગીઓને સુયોજિત કરો" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -223,115 +227,130 @@ msgid "Custom font name for language panel" msgstr "ભાષા પેનલ માટે વૈવિધ્ય ફોન્ટ નામ" #: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "ટૂંકાણ કીઓને નિષ્ક્રિય કરો" + +#: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text" msgstr "બેસાડેલ Preedit લખાણ" -#: ../data/ibus.schemas.in.h:5 +#: ../data/ibus.schemas.in.h:6 msgid "Embed Preedit Text in Application Window" msgstr "કાર્યક્રમ વિન્ડોમાં બેસાડેલ Preedit લખાણ" -#: ../data/ibus.schemas.in.h:6 -#, fuzzy +#: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default" -msgstr "પછીની ઇનપુટ પદ્દતિ" +msgstr "મૂળભૂત રીતે ઇનપુટ પદ્દતિને સક્રિય કરો" -#: ../data/ibus.schemas.in.h:7 +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "" +"મૂળભૂત રીતે ઇનપુટ પદ્દતિને સક્રિય કરો જ્યારે કાર્યક્રમને ઇનપુટ ફોકસ મળે છે" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "ટૂંકાણ કીઓને સક્રિય કરો" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "ભાષા પેનલ સ્થાન" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" msgstr "પછીની એંજિન ટૂંકાણ કીઓ" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "કોષ્ટકને જોવાની દિશા" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "કોષ્ટકને જોવાની દિશા. 0 = આડુ, 1 = ઊભુ " -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "એંજિનોને ફરીથી લોડ કરો" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "ibus શરૂ કરવા દરમ્યાન એંજિનોને ફરીથી લોડ કરો" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" msgstr "પહેલાંની એંજિન ટૂંકાણ કીઓ" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "બધા કાર્યક્રમોમાં એજ ઇનપુટ પદ્દતિને વહેંચો" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "સિસ્ટમ ટ્રે પર ચિહ્નને બતાવો" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "ઇનપુટ પદ્દતિ નામને બતાવો" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "ભાષા પેનલ પર ઇનપુટ પદ્દતિ નામને બતાવો" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" -msgstr "ભાષા પેનલની વર્ણતૂક. 0 = હંમેશા છુપાવો, 1 = આપમેળે છુપાવો, 2 = હંમેશા બતાવો" +msgstr "" +"ભાષા પેનલની વર્ણતૂક. 0 = હંમેશા છુપાવો, 1 = આપમેળે છુપાવો, 2 = હંમેશા બતાવો" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" msgstr "" -"ભાષા પેનલનું સ્થાન. ૦ = ઉંચે ડાબી બાજુનો ખૂણો, ૧ = ઉંચે જમણી બાજુનો ખૂણો, ૨ = નીચે ડાબી " -"બાજુનો ખૂણો, ૩ = નીચે જમણી બાજુનો ખૂણો, ૪ = વૈવિધ્ય" +"ભાષા પેનલનું સ્થાન. ૦ = ઉંચે ડાબી બાજુનો ખૂણો, ૧ = ઉંચે જમણી બાજુનો ખૂણો, ૨ " +"= નીચે ડાબી બાજુનો ખૂણો, ૩ = નીચે જમણી બાજુનો ખૂણો, ૪ = વૈવિધ્ય" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" -msgstr "યાદીમાં પછીની ઇનપુટ પદ્દતિને ખસેડવા માટે ટૂંકાણ કીઓ" +msgstr "યાદીમાં પછીની ઇનપુટ પદ્દતિને બદલવા માટે ટૂંકાણ કીઓ" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" -msgstr "યાદીમાં પહેલાંની ઇનપુટ પદ્દતિને ખસેડવા માટે ટૂંકાણ કીઓ" +msgstr "યાદીમાં પહેલાંની ઇનપુટ પદ્દતિને લાવવા માટે ટૂંકાણ કીઓ" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "ઇનપુટ પદ્દતિને બંધ કરવા માટે ટૂંકાણ કીઓ" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "ઇનપુટ પદ્દતિને ચાલુ કરવા માટે ટૂંકાણ કીઓ" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "ઇનપુટ પદ્દતિને ફેરબદલી કરવાનું ચાલુ અથવા ા બંધ કરવા માટે ટૂંકાણ કીઓ" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "ટ્રીગર ટૂંકાણ કીઓ" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "વૈવિધ્ય ફોન્ટને વાપરો" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "ભાષા પેનલ માટે વૈવિધેય ફોન્ટ નામ ને વાપરો" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "વૈશ્ર્વિક ઇનપુટ પદ્દતિને વાપરો" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "સિસ્ટમ કિબોર્ડ (XKB) લેઆઉટને વાપરો" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "સિસ્ટમ કિબોર્ડ લેઆઉટને વાપરો" @@ -380,8 +399,8 @@ msgid "" "The default input method is the top one in the list.\n" "You may use up/down buttons to change it." msgstr "" -"મૂળભૂત ઇનપુટ પદ્દતિ એ યાદીમાં ઉપર છે.\n" -"તમારે તેને બદલવા માટે ઉપર/નીચે બટનોને વાપરી શકો છો." +"મૂળભૂત ઇનપુટ પદ્દતિ યાદીમાં ઉપર છે.\n" +"તેને બદલવા માટે તમે ઉપર કરો/નીચે કરો બટનોને વાપરી શકો છો." #: ../setup/setup.ui.h:17 msgid "Add the selected input method into the enabled input methods" @@ -412,101 +431,112 @@ msgid "Custom" msgstr "વૈવિધ્ય" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "નિષ્ક્રિય:" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "કાર્યક્રમ વિન્ડોમાં બેસાડેલ Preedit લખાણ" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "કાર યક્મ વિન્ડોમાં ઇનપુટ પદ્દતિનાં preedit લખાણને બેસાડો" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "મેનુમાં જડિત" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "સક્રિય અથવા નિષ્ક્રિય:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "સક્રિય:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "સામાન્ય" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "આડુ" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "ભાષા પેનલનું સ્થાન:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "સક્રિય થયેલ ઇનપુટ પદ્દતિઓમાં પસંદ થયેલ ઇનપુટ પદ્દતિને નીચે ખસેડો" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "સક્રિય થયેલ ઇનપુટ પદ્દતિઓ યાદીમાં પસંદ થયેલ ઇનપુટ પદ્દતિને ઉપર ખસેડો" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "પછીની ઇનપુટ પદ્દતિ:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "પહેલાંની ઇનપુટ પદ્દતિ:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "સક્રિય થયેલ ઇનપુટ પદ્દતિઓ માંથી પસંદ થયેલ ઇનપુટ પદ્દતિને દૂર કરો" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" -msgstr "ભાષા પેનલને કેવી રીતે બતાવવી અથવા છુપાડવી તે માટે ibus નાં વર્ણતૂકને સુયોજિત કરો" +msgstr "" +"ભાષા પેનલને કેવી રીતે બતાવવી અથવા છુપાડવી તે માટે ibus નાં વર્ણતૂકને સુયોજિત" +" કરો" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "કોષ્ટક જોવામાં સભ્યોની દિશાને સુયોજિત કરો" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "પસંદ થયેલ ઇનપુટ પદ્દતિની જાણકારીને બતાવો" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" -msgstr "જ્યારે ચેકબોક્સને ચકાસતા હોય ત્યારે ભાષા પેનલ પર ઇનપુટ પદ્દતિનાં નામને બતાવો" +msgstr "" +"જ્યારે ચેકબોક્સને ચકાસતા હોય ત્યારે ભાષા પેનલ પર ઇનપુટ પદ્દતિનાં નામને બતાવો" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "ભાષા પેનલને બતાવો:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "પ્રવેશ પર ibus ને શરૂ કરો" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "યાદીમાં પછીની ઇનપુટ પદ્દતિને ખસેડવા માટે ટૂંકાણ કીઓ" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "યાદીમાં પહેલાંની ઇનપુટ પદ્દતિને ખસેડવા માટે ટૂંકાણ કીઓ" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "ઉંચે ડાબી બાજુનો ખૂણો" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "ઉંચે જમણી બાજુનો ખૂણો" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "વૈવિધ્યપૂર્ણ ફોન્ટ વાપરો:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "ઊભું" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "જ્યારે સક્રિય હોય" diff --git a/po/hi.po b/po/hi.po index bb7db859d..9c8057387 100644 --- a/po/hi.po +++ b/po/hi.po @@ -1,44 +1,38 @@ -# translation of hi.po to Hindi +# translation of ibus.master.po to Hindi +# Hindi translation of ibus. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# This file is distributed under the same license as the ibus package. # -# Rajesh Ranjan , 2009, 2010. # Rajesh Ranjan , 2009. +# Rajesh Ranjan , 2009-2011. msgid "" msgstr "" -"Project-Id-Version: hi\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-05-06 13:55+0530\n" +"Project-Id-Version: ibus.master\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-03-08 12:32+0900\n" +"PO-Revision-Date: 2011-03-22 15:23+0000\n" "Last-Translator: Rajesh Ranjan \n" -"Language-Team: Hindi \n" +"Language-Team: Hindi \n" +"Language: hi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" -"Plural-Forms: nplurals=2; plural=(n!=1);\n" -"\n" -"\n" -"\n" -"\n" -"\n" -"\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus इनपुट विधि फ्रेमवर्क" +msgstr "IBus विधि फ्रेमवर्क" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus इनपुट विधि फ्रेमवर्क" +msgstr "IBus इनपुट विधि फ्रेमवर्क आरंभ करें" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -50,138 +44,144 @@ msgstr "" msgid "Other" msgstr "अन्य" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "पिछला पृष्ठ" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "अगला पृष्ठ" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" -"कुछ इनपुट विधियाँ संस्थापित, हटाई या अद्यतन की गई हैं. कृपया ibus इनपुट प्लैटफॉर्म को फिर " -"आरंभ करें." +"कुछ इनपुट विधियाँ संस्थापित, हटाई या अद्यतन की गई हैं. कृपया ibus इनपुट " +"प्लैटफॉर्म को फिर आरंभ करें." -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 msgid "Restart Now" msgstr "अब फिर प्रारंभ करें" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 msgid "Later" msgstr "बाद में" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "IBus इनपुट विधि फ्रेमवर्क" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "पुनः प्रारंभ करें" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 msgid "Turn off input method" msgstr "इनपुट विधि बंद करें" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "कोई इनपुट विंडो नहीं" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus Linux/Unix के लिए तेज तर्रार इनपुट बस है." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "राजेश रंजन (rranjan@redhat.com)" -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "इनपुट विधि का परिचय" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "इनपुट विधि बदलें" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "परिचय" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "इनपुट विधि का परिचय" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "भाषा: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "कुंजीपट लेआउट: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "लेखक: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "विवरण:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "ट्रिगर" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "सक्रिय करें" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "निष्क्रिय करें" + +#: ../setup/main.py:135 msgid "next input method" msgstr "अगली इनपुट विधि" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "पिछली इनपुट विधि" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus अबतक आरंभ नहीं हुआ है. क्या आप इसे आरंभ करना चाहते हैं?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus आरंभ किया गया है! यदि आप IBus का प्रयोग नहीं कर सकते हैं, कृपया नीचे की पंक्ति को " -"$HOME/.bashrc में जोड़ें, और अपने डेस्कटॉप में फिर लॉगिन करें.\n" +"IBus आरंभ किया गया है! यदि आप IBus का प्रयोग नहीं कर सकते हैं, कृपया नीचे की पंक्ति को $HOME/.bashrc में जोड़ें, और अपने डेस्कटॉप में फिर लॉगिन करें.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "%s के लिए कुंजीपटल शॉर्टकर्ट चुनें" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "कुंजीपटल शॉर्टकर्ट" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "कुंजी कोड:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "परिवर्तनकर्ता:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -189,7 +189,7 @@ msgstr "" "कृपया कोई कुंजी दबाएँ (या कोई कुंजी संयोग).\n" "यह संवाद कुंजी छोड़े जाने पर बंद हो जाएगा." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "कृपया कोई कुंजी दबाएँ (या कोई कुंजी संयोग)" @@ -198,22 +198,21 @@ msgid "Select an input method" msgstr "कोई इनपुट विधि चुनें" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "इनपुट विधि" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus वरीयता" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "IBus वरीयता" +msgstr "IBus वरीयताएँ सेट करें" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -228,116 +227,131 @@ msgid "Custom font name for language panel" msgstr "भाषा पटल के लिए मनपसंद फ़ॉन्ट नाम" #: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "शॉर्टकट कुँजियाँ निष्क्रिय करें" + +#: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text" msgstr "पूर्वसंपादित पाठ अंतःस्थापित करें" -#: ../data/ibus.schemas.in.h:5 +#: ../data/ibus.schemas.in.h:6 msgid "Embed Preedit Text in Application Window" msgstr "अनुप्रयोग विंडो में पूर्वसंपादित पाठ अंतःस्थापित करें" -#: ../data/ibus.schemas.in.h:6 -#, fuzzy +#: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default" -msgstr "अगली इनपुट विधि" +msgstr "इनपुट विधि को तयशुदा रूप से सक्रिय करें" -#: ../data/ibus.schemas.in.h:7 +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "" +"जब अनुप्रयोग इनपुट फोकस पाता है तो इनपुट विधि को तयशुदा रूप से सक्रिय करें" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "शॉर्टकट कुँजियाँ सक्रिय करें" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "भाषा पैनल स्थिति" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" msgstr "अगला इंजन शॉर्टकट कुंजी" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "लुकअप सारणी की दिशा" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "सारणी देखने के लिए दिशा. 0 = क्षैतिज, 1 = लंबवत" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "पहले से लोड इंजन" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "ibus आरंभन के दौरान पहले से लोड इंजन" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" msgstr "पिछला इंजन शॉर्टकट कुंजी" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "सभी अनुप्रयोगों के बीच समान इनपुट विधि को साझा करें" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "तंत्र तश्तरी पर प्रतीक दिखाएँ" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "इनपुट विधि नाम दिखाएँ" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "भाषा पट्टी पर इनपुट विधि नाम दिखाएँ" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" msgstr "" -"भाषा फलक का व्यवहार. 0 = मेन्यू में अंतःस्थापित, 1 = स्वतः छिपाएँ, 2 = हमेशा दिखाएँ" +"भाषा फलक का व्यवहार. 0 = मेन्यू में अंतःस्थापित, 1 = स्वतः छिपाएँ, 2 = हमेशा" +" दिखाएँ" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" msgstr "" -"भाषा पटल की स्थिति. 0 = ऊपरी बायाँ कोना, 1 = ऊपरी दाहिना कोना, 2 = निचला बायां " -"कोना, 3 = निचला दाहिना कोना, 4 = पसंदीदा" +"भाषा पटल की स्थिति. 0 = ऊपरी बायाँ कोना, 1 = ऊपरी दाहिना कोना, 2 = निचला " +"बायां कोना, 3 = निचला दाहिना कोना, 4 = पसंदीदा" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" -msgstr "सूची में अगली इनपुट विधि में जाने के लिए शॉर्टकट कुंजी" +msgstr "सूची में अगली इनपुट विधि में जाने के लिए शॉर्टकट कुंजियाँ" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" -msgstr "सूची में पिछली इनपुट विधि में जाने के लिए शॉर्टकट कुंजी" +msgstr "सूची में पिछली इनपुट विधि में जाने के लिए शॉर्टकट कुंजियाँ" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "इनपुट विधि को बंद करने के लिए शॉर्टकट कुँजियाँ" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "इनपुट विधि को चालू करने के लिए शॉर्टकट कुँजियाँ" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "इनपुट विधि को चालू या बंद रखने के लिए शॉर्टकट कुंजी" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "शॉर्टकट कुंजी ट्रिगर करें" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "मनपसंद फ़ॉन्ट का प्रयोग करें" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "भाषा पटल के लिए मनपसंद फ़ॉन्ट नाम का प्रयोग करें" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "लक्ष्य इनपुट विधि का प्रयोग करें" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "तंत्र कुंजीपट (XKB) लेआउट का प्रयोग करें" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "तंत्र कुंजीपट लेआउट का प्रयोग करें" @@ -418,101 +432,110 @@ msgid "Custom" msgstr "मनपसंद" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "निष्क्रिय करें:" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "अनुप्रयोग विंडो में पूर्वसंपादित पाठ अंतःस्थापित करें" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" -msgstr "इनपुट विधि के पूर्वसंपादित पाठ को अनुप्रयोग विंडो में अंतःस्थापित करें" +msgstr "" +"इनपुट विधि के पूर्वसंपादित पाठ को अनुप्रयोग विंडो में अंतःस्थापित करें" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "मेन्यू में अंतःस्थापित" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "सक्रिय या निष्क्रिय करें:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "सक्रिय करें:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "सामान्य" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "क्षैतिज" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "भाषा पैनल स्थिति:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "सक्रिय की गई इनपुट विधियों में चुनी गई इनपुट विधियों को खिसकाएँ" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "सक्रिय की गई इनपुट विधि सूची में चुनी गई इनपुट विधियों को ले जाएँ" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "अगली इनपुट विधि :" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "पिछली इनपुट विधि:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "सक्रिय की गई इनपुट विधियों में चुनी गई इनपुट विधियों हटाएँ" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "ibus का आचरण सेट करें कि कैसे भाषा पट्टी को दिखाना या छिपाना है" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "लुकअप सारणी में कंडीडेट की दिशा सेट करें" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "चुनी गई इनपुट विधि की सूचना दिखाएँ" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "भाषा पट्टी पर इनपुट विधि नाम दिखाएँ जब जाँचपेटी जाँचा गया है" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "भाषा पैनल दिखाएँ:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "लॉगिन पर ibus आरंभ करें" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "सूची में अगली इनपुट विधि में जाने के लिए शॉर्टकट कुंजी" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "सूची में पिछली इनपुट विधि में जाने के लिए शॉर्टकट कुंजी" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "ऊपरी बायां कोना" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "ऊपरी दाहिना कोना" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "मनपसंद फ़ॉन्ट का प्रयोग करें:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "लंबवत" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "जब सक्रिय हो" diff --git a/po/hu.po b/po/hu.po index b05597674..1f04a9639 100644 --- a/po/hu.po +++ b/po/hu.po @@ -1,152 +1,173 @@ -# Translation of the IBus master -# Copyright (C) 2009 -# This file is distributed under the same license as the IBus package. +# translation of ibus.pot to Hungarian +# Hungarian translation of ibus. +# Copyright (C) 2008 Peng Huang +# This file is distributed under the same license as the ibus package. +# +# Translators: +# kelemeng , 2011. # Sulyok Péter , 2009. -# msgid "" msgstr "" -"Project-Id-Version: IBus master\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2009-04-11 10:58+0200\n" -"Last-Translator: Sulyok Péter \n" -"Language-Team: Hungarian \n" +"Project-Id-Version: IBus\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-09-01 00:45+0000\n" +"Last-Translator: kelemeng \n" +"Language-Team: Hungarian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: hu\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus bevitel eljárás keretrendszer" +msgstr "Bevitelimód-keretrendszer" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus bevitel eljárás keretrendszer" +msgstr "IBus bevitelimód-keretrendszer elindítása" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:40 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." msgstr "" +"Copyright (c) 2007-2010 Peng Huang\n" +"Copyright (c) 2007-2010 Red Hat, Inc." #: ../ibus/lang.py:41 msgid "Other" msgstr "Más" -#: ../ui/gtk/candidatepanel.py:267 -#, fuzzy +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" -msgstr "Előző bevitel eljárás:" +msgstr "Előző oldal" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" -msgstr "" +msgstr "Következő oldal" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:62 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" +"Néhány beviteli mód telepítésre, eltávolításra vagy frissítésre került. " +"Indítsa újra az ibus beviteli rendszert." -#: ../ui/gtk/main.py:62 -#, fuzzy +#: ../ui/gtk/main.py:66 msgid "Restart Now" -msgstr "Újraindítás" +msgstr "Újraindítás most" -#: ../ui/gtk/main.py:63 -#, fuzzy +#: ../ui/gtk/main.py:67 msgid "Later" -msgstr "Más" +msgstr "Később" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "IBus panel" + +#: ../ui/gtk/panel.py:122 msgid "IBus input method framework" -msgstr "IBus bevitel eljárás keretrendszer" +msgstr "IBus bevitelimód-keretrendszer" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:352 msgid "Restart" msgstr "Újraindítás" -#: ../ui/gtk/panel.py:418 -#, fuzzy +#: ../ui/gtk/panel.py:439 msgid "Turn off input method" -msgstr "Nincs bevitel eljárás" +msgstr "Beviteli mód kikapcsolása" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:478 msgid "No input window" -msgstr "" +msgstr "Nincs beviteli ablak" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:509 msgid "IBus is an intelligent input bus for Linux/Unix." -msgstr "IBus egy okos bemenő csatorna Linux/Unixhoz" +msgstr "Az IBus egy intelligens beviteli busz Linux/Unix rendszerekhez" -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:513 msgid "translator-credits" -msgstr "Sulyok Péter , 2009." - -#: ../ui/gtk/languagebar.py:107 -#, fuzzy +msgstr "" +"Sulyok Péter , 2009.\n" +"\n" +"Launchpad Contributions:\n" +" Gabor Kelemen https://launchpad.net/~kelemeng\n" +" Muszela Balázs https://launchpad.net/~bazsi86-deactivatedaccount\n" +" Ocsovszki Dorián https://launchpad.net/~gorkhaan\n" +" Robert Roth https://launchpad.net/~evfool\n" +" Token https://launchpad.net/~kozmad\n" +" fergekolferol https://launchpad.net/~ferge-kolferol" + +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" -msgstr "Bevitel eljárások" +msgstr "A beviteli mód névjegye" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" -msgstr "Bevitel eljárás átváltás" +msgstr "Beviteli mód váltása" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "Névjegy" -#: ../ui/gtk/languagebar.py:362 -#, fuzzy +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" -msgstr "Bevitel eljárások" +msgstr "A beviteli mód névjegye" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" -msgstr "" +msgstr "Nyelv: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 -#, fuzzy, python-format +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#, python-format msgid "Keyboard layout: %s\n" -msgstr "Gyorsbillentyűk" +msgstr "Billentyűzetkiosztás: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" -msgstr "" +msgstr "Szerző: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" -msgstr "" +msgstr "Leírás:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" -msgstr "ravasz" +msgstr "aktiváló" + +#: ../setup/main.py:113 +msgid "enable" +msgstr "engedélyezés" -#: ../setup/main.py:117 +#: ../setup/main.py:124 +msgid "disable" +msgstr "letiltás" + +#: ../setup/main.py:135 msgid "next input method" -msgstr "következő bevitel eljárás" +msgstr "következő beviteli mód" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" -msgstr "előző bevitel eljárás" +msgstr "előző beviteli mód" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "Az IBus szolgáltatás áll. Beindítja?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" @@ -154,201 +175,200 @@ msgstr "" "IBus működik! Ha nem tudja IBus-t használni, kérem fűzze az \n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" -" export QT_IM_MODULE=ibussorokat a $HOME/.bashrc fájlhoz, majd lépjen be " -"újra." +" export QT_IM_MODULE=ibussorokat a $HOME/.bashrc fájlhoz, majd lépjen be újra." -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "%s gyorsbillentyűjének kiválasztása" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "Gyorsbillentyűk" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" -msgstr "Kulcs kód:" +msgstr "Billentyűkód:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "Módosítók:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." msgstr "" -"Kérem nyomjon egy billentyűt (vagy kombinációt).\n" -"Az ablak bezárul, amint a billentyűt felengedi." +"Nyomjon meg egy billentyűt (vagy billentyűkombinációt).\n" +"Az ablak a billentyű felengedésekor bezáródik." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" -msgstr "Kérem nyomjon egy billentyűt (vagy kombinációt)." +msgstr "Nyomjon meg egy billentyűt (vagy billentyűkombinációt)." #: ../setup/enginecombobox.py:120 msgid "Select an input method" -msgstr "Bevitel eljárás kiválasztása" +msgstr "Válasszon beviteli módot" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 -#, fuzzy +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" -msgstr "Bevitel eljárások" +msgstr "Beviteli mód" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" -msgstr "" +msgstr "Bill" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" -msgstr "IBus beállítás" +msgstr "IBus beállítások" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "IBus beállítás" +msgstr "IBus beállításai" #: ../data/ibus.schemas.in.h:1 -#, fuzzy msgid "Auto hide" -msgstr "Önműködő rejtés" +msgstr "Automatikus elrejtés" #: ../data/ibus.schemas.in.h:2 -#, fuzzy msgid "Custom font" -msgstr "Saját betű:" +msgstr "Egyéni betűkészlet" #: ../data/ibus.schemas.in.h:3 msgid "Custom font name for language panel" -msgstr "Saját betű neve a nyelv panelen" +msgstr "Egyéni betűkészlet neve a nyelv panelhez" #: ../data/ibus.schemas.in.h:4 -msgid "Embed Preedit Text" -msgstr "" +msgid "Disable shortcut keys" +msgstr "Gyorsbillentyűk letiltása" #: ../data/ibus.schemas.in.h:5 -msgid "Embed Preedit Text in Application Window" -msgstr "" +msgid "Embed Preedit Text" +msgstr "Előszerkesztett szöveg beágyazása" #: ../data/ibus.schemas.in.h:6 -#, fuzzy -msgid "Enable input method by default" -msgstr "következő bevitel eljárás" +msgid "Embed Preedit Text in Application Window" +msgstr "Előszerkesztett szöveg beágyazása az alkalmazásablakba" #: ../data/ibus.schemas.in.h:7 +msgid "Enable input method by default" +msgstr "Beviteli mód engedélyezése alapértelmezésben" + +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "" +"Beviteli mód engedélyezése alapértelmezésben, amikor az alkalmazás beviteli " +"fókuszba kerül" -#: ../data/ibus.schemas.in.h:8 -#, fuzzy +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "Gyorsbillentyűk engedélyezése" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" -msgstr "Nyelv panel mutatása:" +msgstr "Nyelvi panel pozíciója" -#: ../data/ibus.schemas.in.h:9 -#, fuzzy +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" -msgstr "Következő eljárás gyorsbillentyű" +msgstr "Következő alrendszer gyorsbillentyűi" -#: ../data/ibus.schemas.in.h:10 -#, fuzzy +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" -msgstr "Kereső táblázat iránya" +msgstr "Keresési tábla tájolása" -#: ../data/ibus.schemas.in.h:11 -#, fuzzy +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" -msgstr "Kereső táblázat iránya. 0 = vízszintes, 1 = függőleges" +msgstr "Kikeresési tábla tájolása. 0 = vízszintes, 1 = függőleges" -#: ../data/ibus.schemas.in.h:12 -#, fuzzy +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" -msgstr "Eljárások előtöltése" +msgstr "Alrendszerek előtöltése" -#: ../data/ibus.schemas.in.h:13 -#, fuzzy +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" -msgstr "Eljárások előre betöltése ibus indulásakor" +msgstr "Alrendszerek előtöltése az ibus indításakor" -#: ../data/ibus.schemas.in.h:14 -#, fuzzy +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" -msgstr "Előző eljárás gyorsbillentyű" +msgstr "Előző alrendszer gyorsbillentyűi" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" -msgstr "" +msgstr "Azonos beviteli mód megosztása minden alkalmazás közt" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" -msgstr "" +msgstr "Ikon megjelenítése az értesítési területen" -#: ../data/ibus.schemas.in.h:17 -#, fuzzy +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" -msgstr "Saját betű neve a nyelv panelen" +msgstr "Beviteli mód megjelenítése" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 -#, fuzzy +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" -msgstr "Saját betű neve a nyelv panelen" +msgstr "Beviteli mód megjelenítése a nyelvi eszköztáron" -#: ../data/ibus.schemas.in.h:19 -#, fuzzy +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" msgstr "" -"A nyelv panel viselkedése. 0 = mindig rejtve, 1 = rejtőzködő, 2 = mindig " -"látható" +"A nyelvi panel viselkedése. 0 = beágyazva a menübe, 1 = automatikus " +"elrejtés, 2 = megjelenítés mindig" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" msgstr "" +"A nyelv panel pozíciója. 0 = bal felső sarok, 1 = jobb felső sarok, 2 = bal " +"alsó sarok, 3 = jobb alsó sarok, 4 = egyéni" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" msgstr "" -"A következő eljárás gyorsbillentyű a következő bevitel eljárásra kapcsol" +"A lista következő beviteli módjára váltáshoz használandó gyorsbillentyű" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" -msgstr "Az előző eljárás gyorsbillentyű az előző bevitel eljárásra kapcsol" +msgstr "A lista előző beviteli módjára váltáshoz használandó gyorsbillentyű" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "Gyorsbillentyűk a beviteli mód kikapcsolásához " -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 -#, fuzzy +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "Gyorsbillentyűk a beviteli mód bekapcsolásához " + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" -msgstr "Az előző eljárás gyorsbillentyű az előző bevitel eljárásra kapcsol" +msgstr "Gyorsbillentyűk a beviteli mód ki- vagy bekapcsolásához" -#: ../data/ibus.schemas.in.h:24 -#, fuzzy +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" -msgstr "Ravasz gyorsbillentyű" +msgstr "Aktiváló gyorsbillentyűk" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" -msgstr "Saját betű használata" +msgstr "Egyéni betűkészlet használata" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" -msgstr "Saját betű használata a nyelv panelen" +msgstr "Egyéni betűkészlet használata a nyelv panelen" -#: ../data/ibus.schemas.in.h:27 -#, fuzzy +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" -msgstr "Bevitel eljárás kiválasztása" +msgstr "Globális beviteli mód használata" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" -msgstr "" +msgstr "A rendszer billentyűzetkiosztásának (XKB) használata" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" -msgstr "" +msgstr "Rendszer-billentyűzetkiosztás használata" #: ../setup/setup.ui.h:1 msgid "..." @@ -356,16 +376,15 @@ msgstr "…" #: ../setup/setup.ui.h:2 msgid "Font and Style" -msgstr "Betűtípus és stílus" +msgstr "Betűkészlet és stílus" #: ../setup/setup.ui.h:3 msgid "Global input method settings" -msgstr "Bevitel eljárás kiválasztása" +msgstr "Globális bevitelimód-beállítások" #: ../setup/setup.ui.h:4 -#, fuzzy msgid "Keyboard Layout" -msgstr "Gyorsbillentyűk" +msgstr "Billentyűzetkiosztás" #: ../setup/setup.ui.h:5 msgid "Keyboard Shortcuts" @@ -385,7 +404,7 @@ msgid "" "\n" msgstr "" "IBus\n" -"Az okos bemenő csatorna\n" +"Az intelligens beviteli busz\n" "Honlap: http://code.google.com/p/ibus\n" "\n" "\n" @@ -396,188 +415,149 @@ msgid "" "The default input method is the top one in the list.\n" "You may use up/down buttons to change it." msgstr "" +"Az alapértelmezett beviteli mód a listában a legfelső.\n" +"Ezt a fel/le billentyűk segítségével változtathatja meg." #: ../setup/setup.ui.h:17 msgid "Add the selected input method into the enabled input methods" msgstr "" +"A kiválasztott beviteli mód hozzáadása az engedélyezett beviteli módokhoz" #: ../setup/setup.ui.h:18 msgid "Advanced" -msgstr "" +msgstr "Speciális" #: ../setup/setup.ui.h:19 msgid "Always" -msgstr "" +msgstr "Mindig" #: ../setup/setup.ui.h:20 msgid "Bottom left corner" -msgstr "" +msgstr "Bal alsó sarok" #: ../setup/setup.ui.h:21 msgid "Bottom right corner" -msgstr "" +msgstr "Jobb alsó sarok" #: ../setup/setup.ui.h:22 msgid "Candidates orientation:" -msgstr "Jelöltek iránya:" +msgstr "Jelöltek tájolása:" #: ../setup/setup.ui.h:23 -#, fuzzy msgid "Custom" -msgstr "Saját betű:" +msgstr "Egyéni" #: ../setup/setup.ui.h:24 -msgid "Embed preedit text in application window" -msgstr "" +msgid "Disable:" +msgstr "Letiltás:" #: ../setup/setup.ui.h:25 -msgid "Embed the preedit text of input method in the application window" -msgstr "" +msgid "Embed preedit text in application window" +msgstr "Előszerkesztett szöveg beágyazása az alkalmazásablakba" #: ../setup/setup.ui.h:26 -msgid "Embedded in menu" +msgid "Embed the preedit text of input method in the application window" msgstr "" +"A beviteli mód előszerkesztett szövegének beágyazása az alkalmazásablakba" #: ../setup/setup.ui.h:27 -msgid "Enable or disable:" -msgstr "Engedés vagy tiltás" +msgid "Embedded in menu" +msgstr "Beágyazva a menübe" #: ../setup/setup.ui.h:28 +msgid "Enable or disable:" +msgstr "Engedélyezés vagy tiltás:" + +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "Engedélyezés:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "Általános" -#: ../setup/setup.ui.h:29 -#, fuzzy +#: ../setup/setup.ui.h:31 msgid "Horizontal" -msgstr "" -"vízszintes\n" -"függőleges" +msgstr "Vízszintes" -#: ../setup/setup.ui.h:32 -#, fuzzy +#: ../setup/setup.ui.h:34 msgid "Language panel position:" -msgstr "Nyelv panel mutatása:" +msgstr "A nyelvi panel elhelyezése:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "" +"A kiválasztott beviteli mód mozgatása lefelé az engedélyezett beviteli módok" +" között" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "" +"A kiválasztott beviteli mód mozgatása felfelé az engedélyezett beviteli " +"módok között" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" -msgstr "Következő bevitel eljárás:" +msgstr "Következő beviteli mód:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" -msgstr "Előző bevitel eljárás:" +msgstr "Előző beviteli mód:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "" +"A kiválasztott beviteli mód eltávolítása az engedélyezett beviteli módok " +"közül" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" -msgstr "" +msgstr "A nyelv panel megjelenítési vagy elrejtési módjának beállítása" -#: ../setup/setup.ui.h:39 -#, fuzzy +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" -msgstr "Kereső táblázat iránya" +msgstr "Jelöltek tájolásának beállítása a keresési táblában" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" -msgstr "" +msgstr "Információk megjelenítése a kiválasztott beviteli módról" -#: ../setup/setup.ui.h:44 -#, fuzzy +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" -msgstr "Saját betű neve a nyelv panelen" +msgstr "Beviteli mód nevének megjelenítése a nyelv panelen" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" -msgstr "Nyelv panel mutatása:" +msgstr "Nyelv panel megjelenítése:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" -msgstr "Belépve ibus indítása" +msgstr "Az IBus indítása bejelentkezéskor" -#: ../setup/setup.ui.h:47 -#, fuzzy +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" -msgstr "" -"A következő eljárás gyorsbillentyű a következő bevitel eljárásra kapcsol" +msgstr "Gyorsbillentyűk a következő beviteli módra váltáshoz" -#: ../setup/setup.ui.h:48 -#, fuzzy +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" -msgstr "Az előző eljárás gyorsbillentyű az előző bevitel eljárásra kapcsol" +msgstr "Gyorsbillentyűk az előző beviteli módra való váltáshoz" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" -msgstr "" +msgstr "Bal felső sarok" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" -msgstr "" +msgstr "Jobb felső sarok" -#: ../setup/setup.ui.h:52 -#, fuzzy +#: ../setup/setup.ui.h:54 msgid "Use custom font:" -msgstr "Saját betű használata" +msgstr "Egyéni betűkészlet használata:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" -msgstr "" +msgstr "Függőleges" -#: ../setup/setup.ui.h:56 -#, fuzzy +#: ../setup/setup.ui.h:58 msgid "When active" -msgstr "" -"soha\n" -"aktívan\n" -"mindig" - -#, fuzzy -#~ msgid "Use global engine" -#~ msgstr "Eljárások előtöltése" - -#, fuzzy -#~ msgid "Langauge panel position" -#~ msgstr "Nyelv panel mutatása:" - -#~ msgid "Custom font:" -#~ msgstr "Saját betű:" - -#, fuzzy -#~ msgid "Font for language bar and candidates" -#~ msgstr "Saját betű neve a nyelv panelen" - -#, fuzzy -#~ msgid "Use custom font for language bar and candidates" -#~ msgstr "Saját betű használata a nyelv panelen" - -#~ msgid "Custom Font" -#~ msgstr "Saját betű" - -#, fuzzy -#~ msgid "Show IM name on language bar" -#~ msgstr "Saját betű neve a nyelv panelen" - -#~ msgid "Use Custom Font" -#~ msgstr "Saját betű használata" - -#~ msgid "Next engine hotkey for switch to next input method engine" -#~ msgstr "" -#~ "A következő eljárás gyorsbillentyű a következő bevitel eljárásra kapcsol" - -#~ msgid "Prev engine hotkey for switch to previous input method engine" -#~ msgstr "Az előző eljárás gyorsbillentyű az előző bevitel eljárásra kapcsol" - -#~ msgid "Trigger hotkey for enable or disable input context" -#~ msgstr "A ravasz gyorsbillentyű engedi vagy tiltja bevitel környezetet" - -#~ msgid "[Control+space]" -#~ msgstr "[Ctrl+szóköz]" +msgstr "Amikor aktív" diff --git a/po/it.po b/po/it.po index e2bad3a8b..919a96a7a 100644 --- a/po/it.po +++ b/po/it.po @@ -1,3 +1,4 @@ +# translation of ibus.master.po to # translation of it.po to # Italian translation for ibus # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 @@ -8,12 +9,13 @@ # Milo Casagrande , 2009. msgid "" msgstr "" -"Project-Id-Version: it\n" +"Project-Id-Version: ibus.master\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2009-12-10 09:28+1000\n" +"POT-Creation-Date: 2011-02-12 00:41+0900\n" +"PO-Revision-Date: 2010-07-30 08:36+1000\n" "Last-Translator: \n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -25,16 +27,14 @@ msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "Ambiente del metodo di input IBus" +msgstr "Framework del metodo di input" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "Ambiente del metodo di input IBus" +msgstr "Avvia il framework del metodo di input di IBus" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -46,15 +46,15 @@ msgstr "" msgid "Other" msgstr "Altro" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "Pagina precedente" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "Pagina successiva" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." @@ -62,93 +62,101 @@ msgstr "" "Alcuni metodi di input sono stati installati, rimossi o aggiornati. " "Riavviare la piattaforma di input di ibus." -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 msgid "Restart Now" msgstr "Riavvia ora" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 msgid "Later" msgstr "Più tardi" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "Ambiente del metodo di input IBus" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "Riavvia" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 msgid "Turn off input method" msgstr "Disabilita metodo di input" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "Nessuna finestra di input" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus è un bus di input intelligente per Linux/Unix." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" " Sergio Zanchetta https://launchpad.net/~primes2h" -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "Informazioni sul metodo di input" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "Cambia metodo di input" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "Informazioni" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "Informazioni sul metodo di input" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "Lingua: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "Disposizione tastiera: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "Autore: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "Descrizione:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "l'avvio" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "" + +#: ../setup/main.py:135 msgid "next input method" msgstr "il metodo di input successivo" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "il metodo di input precedente" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "Il demone IBus non è in esecuzione. Avviarlo ora?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" "IBus has been started! If you can not use IBus, please add below lines in " "$HOME/.bashrc, and relogin your desktop.\n" @@ -162,24 +170,24 @@ msgstr "" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "Selezione delle scorciatoie da tastiera per %s" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "Scorciatoie da tastiera" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "Codice del tasto:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "Modificatori:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -187,7 +195,7 @@ msgstr "" "Premere un tasto (o una combinazione di tasti).\n" "La finestra verrà chiusa dopo il rilascio del tasto stesso." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "Premere un tasto (o una combinazione di tasti)" @@ -196,22 +204,21 @@ msgid "Select an input method" msgstr "Seleziona un metodo di input" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "Metodo di input" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "Preferenze di IBus" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "Preferenze di IBus" +msgstr "Imposta Preferenze di IBus" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -234,13 +241,14 @@ msgid "Embed Preedit Text in Application Window" msgstr "Inserire il testo pre-modificato nella finestra dell'applicazione" #: ../data/ibus.schemas.in.h:6 -#, fuzzy msgid "Enable input method by default" -msgstr "il metodo di input successivo" +msgstr "Abilita per impostazione predefinita il metodo di input" #: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default when the application gets input focus" msgstr "" +"Abilita per impostazione predefinita il metodo di input quando le " +"applicazioni ottengono l'input focus" #: ../data/ibus.schemas.in.h:8 msgid "Language panel position" @@ -270,11 +278,11 @@ msgstr "Precarica i motori durante l'avvio di ibus" msgid "Prev engine shortcut keys" msgstr "Motore dei tasti di scelta rapida precedente" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "Condivide lo stesso metodo di input tra le applicazioni" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "Mostrare l'icona nell'area di notifica" @@ -282,7 +290,7 @@ msgstr "Mostrare l'icona nell'area di notifica" msgid "Show input method name" msgstr "Mostra il nome del metodo di input" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "Mostrare il nome del metodo di input nella barra della lingua" @@ -304,18 +312,15 @@ msgstr "" "a destra, 4 = Personalizzata" #: ../data/ibus.schemas.in.h:21 -#, fuzzy msgid "The shortcut keys for switching to the next input method in the list" msgstr "" "I tasti scorciatoia per passare al metodo di input successivo nell'elenco" #: ../data/ibus.schemas.in.h:22 -#, fuzzy msgid "The shortcut keys for switching to the previous input method" -msgstr "" -"I tasti scorciatoia per passare al metodo di input precedente nell'elenco" +msgstr "I tasti scorciatoia per passare al metodo di input precedente" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "I tasti scorciatoia per abilitare o disabilitare i metodi di input" @@ -335,11 +340,11 @@ msgstr "Usa un tipo di carattere personalizzato per il pannello della lingua" msgid "Use global input method" msgstr "Usa il metodo di input globale" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "Usa la disposizione di tastiera del sistema (XKB)" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "Usa la disposizione di tastiera del sistema" @@ -420,109 +425,117 @@ msgid "Custom" msgstr "Personalizzato" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "Inserire il testo pre-modificato nella finestra dell'applicazione" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "" "Inserisce il testo premodificato del metodo di input nella finestra " "dell'applicazione" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "Inserito nel menu" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "Abilitare o disabilitare:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "Generali" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "Orizzontale" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "Posizione pannello della lingua:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "Sposta in basso il metodo selezionato nei metodi di input abilitati" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "Sposta in alto il metodo selezionato nei metodi di input abilitati" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "Metodo di input successivo:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "Metodo di input precedente:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "Rimuove il metodo selezionato dai metodi di input abilitati" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "" "Imposta il comportamento di IBus su come mostrare o nascondere la barra " "della lingua" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "Imposta l'orientamento dei candidati nella tabella di ricerca" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "Mostra le informazioni sul metodo di input selezionato" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "" "Quando la casella è spuntata mostra il nome del metodo di input nella barra " "della lingua" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "Mostrare pannello della lingua:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "Avvia IBus all'accesso" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "" "I tasti scorciatoia per passare al metodo di input successivo nell'elenco" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "" "I tasti scorciatoia per passare al metodo di input precedente nell'elenco" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "Angolo superiore sinistro" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "Angolo superiore destro" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "Usare carattere personalizzato:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "Verticale" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "Quando attivoB" diff --git a/po/ja.po b/po/ja.po index faaf42a9f..d4c5b91ae 100644 --- a/po/ja.po +++ b/po/ja.po @@ -8,37 +8,35 @@ # IWAI, Masaharu , 2009. # Hyu_gabaru Ryu_ichi , 2009. # Kiyoto Hashida , 2010. +# Makoto Mizukami , 2010. msgid "" msgstr "" "Project-Id-Version: ja\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-05-06 17:34+0900\n" -"Last-Translator: Kiyoto Hashida \n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-12-13 16:43+0900\n" +"PO-Revision-Date: 2011-12-13 18:00+0000\n" +"Last-Translator: Makoto Mizukami \n" "Language-Team: Japanese \n" +"Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Content-Transfer-Encoding: \n" "X-Generator: KBabel 1.11.4\n" -"Plural-Forms: Plural-Forms: nplurals=1; plural=0;\n" -"\n" -"\n" +"Plural-Forms: nplurals=1; plural=0;\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus インプットメソッドフレームワーク" +msgstr "インプットメソッドフレームワーク" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus インプットメソッドフレームワーク" +msgstr "IBus インプットメソッドフレームワークを起動" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:40 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -50,141 +48,149 @@ msgstr "" msgid "Other" msgstr "その他" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "前のページ" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "次のページ" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:62 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." -msgstr "" -"いくつかのインプットメソッドがインストール、削除、または更新されています。" -"IBus 入力プラットフォームを再起動してください。" +msgstr "いくつかのインプットメソッドがインストール、削除、または更新されています。IBus 入力プラットフォームを再起動してください。" -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:66 msgid "Restart Now" msgstr "今すぐに再起動する" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:67 msgid "Later" msgstr "後でする" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "IBus パネル" + +#: ../ui/gtk/panel.py:122 msgid "IBus input method framework" msgstr "IBus インプットメソッドフレームワーク" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:352 msgid "Restart" msgstr "再起動" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:439 msgid "Turn off input method" msgstr "インプットメソッドをオフにする" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:478 msgid "No input window" msgstr "入力ウィンドウがありません" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:509 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus は、Linux/Unix のためのインテリジェントなインプットバスです。" -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:513 msgid "translator-credits" msgstr "" "UTUMI Hirosi \n" "IWAI, Masaharu \n" "日向原 龍一 " -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "インプットメソッドについて" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "インプットメソッドがありません" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "情報" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "インプットメソッドについて" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "言語: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "キーボードレイアウト: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "作者: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "説明:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "トリガー" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "有効" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "無効" + +#: ../setup/main.py:135 msgid "next input method" msgstr "次のインプットメソッド" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "ひとつ前のインプットメソッド" -#: ../setup/main.py:268 +#: ../setup/main.py:332 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus デーモンが動いていません。起動しますか?" -#: ../setup/main.py:283 +#: ../setup/main.py:347 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus を開始しました。IBus を使えない場合は次の行を$HOME/.bashrc に書き加えて" -"再ログインしてください。\n" +"IBus を開始しました。IBus を使えない場合は次の行を$HOME/.bashrc に書き加えて再ログインしてください。\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:362 #, python-format msgid "Select keyboard shortcut for %s" msgstr "%s のキーボードショートカットを選択" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "キーボードショートカット" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "キーコード:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "モディファイア:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -192,7 +198,7 @@ msgstr "" "キーもしくはキーの組み合わせを入力してください。\n" "キーを離すとダイアログを閉じます" -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "キーもしくはキーの組み合わせを入力してください" @@ -201,20 +207,19 @@ msgid "Select an input method" msgstr "インプットメソッドの選択" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "インプットメソッド" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus の設定" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" msgstr "IBus の設定" @@ -231,117 +236,126 @@ msgid "Custom font name for language panel" msgstr "言語パネル用のカスタムフォント名" #: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "ショートカットキーを無効にする" + +#: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text" msgstr "前編集テキストを組み込む" -#: ../data/ibus.schemas.in.h:5 +#: ../data/ibus.schemas.in.h:6 msgid "Embed Preedit Text in Application Window" msgstr "アプリケーションウィンドウにプリエディットテキストを組み込む" -#: ../data/ibus.schemas.in.h:6 -#, fuzzy +#: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default" -msgstr "次のインプットメソッド" +msgstr "標準でインプットメソッドを有効にする" -#: ../data/ibus.schemas.in.h:7 +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" -msgstr "" +msgstr "アプリケーションに入力フォーカスが当たったとき標準でインプットメソッドを有効にする" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "ショートカットキーを有効にする" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "言語パネルの位置" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" msgstr "次のエンジンへのショートカットキー" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "検索テーブルの方位" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "検索テーブルの方位。0 = 横、1 = 縦" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "エンジンのプリロード" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "ibus の開始中にエンジンをプリロード" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" msgstr "前のエンジンへのショートカットキー" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "すべてのアプリケーション間で同じインプットメソッドを共有する" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "システムトレイにアイコンを表示する" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "インプットメソッド名を表示する" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "言語バーにインプットメソッド名を表示する" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" -msgstr "" -"言語パネルの動作。0 = メニューに組み込む、1 = 自動的に隠す、2 = 常に表示" +msgstr "言語パネルの動作。0 = メニューに組み込む、1 = 自動的に隠す、2 = 常に表示" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" -msgstr "" -"言語パネルの位置。0 = 左上隅、1 = 右上隅、2 = 左下隅、3 = 右下隅、4 = カスタ" -"ム" +msgstr "言語パネルの位置。0 = 左上隅、1 = 右上隅、2 = 左下隅、3 = 右下隅、4 = カスタム" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" -msgstr "リストの中で次のインプットメソッドに切り替えるためのショートカットキー" +msgstr "リスト中の次のインプットメソッドに切り替えるためのショートカットキー" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" -msgstr "" -"リストの中でひとつ前のインプットメソッドに切り替えるためのショートカットキー" +msgstr "リスト中のひとつ前のインプットメソッドに切り替えるためのショートカットキー" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "インプットメソッドをオフに切り替えるためのショートカットキー" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "インプットメソッドをオンに切り替えるためのショートカットキー" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:52 msgid "The shortcut keys for turning input method on or off" msgstr "インプットメソッドをオン、オフするためのショートカットキーを設定します" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "トリガーショートカットキー" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "カスタムフォントを使う" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "言語パネル用にカスタムフォント名を使用する" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "グローバルインプットメソッドを使用する" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:56 msgid "Use system keyboard (XKB) layout" msgstr "システムキーボード (XKB) レイアウトを使用する" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:57 msgid "Use system keyboard layout" msgstr "システムキーボードレイアウトを使用する" @@ -422,108 +436,113 @@ msgid "Custom" msgstr "カスタム" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "無効:" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "アプリケーションウィンドウに前編集テキストを組み込む" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" -msgstr "" -"アプリケーションウィンドウにインプットメソッドのプリエディットテキストを組み" -"込みます" +msgstr "アプリケーションウィンドウにインプットメソッドのプリエディットテキストを組み込みます" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "メニューに組み込む" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "切り替え" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "有効:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "一般" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "横" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "言語パネルの位置" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" -msgstr "" -"選択したインプットメソッドを有効なインプットメソッドの中で下へ移動します" +msgstr "選択したインプットメソッドを有効なインプットメソッドの中で下へ移動します" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" -msgstr "" -"選択したインプットメソッドを有効なインプットメソッドの中で上へ移動します" +msgstr "選択したインプットメソッドを有効なインプットメソッドの中で上へ移動します" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "次のインプットメソッド:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "ひとつ前のインプットメソッド:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "選択したインプットメソッドを有効なインプットメソッドから削除します" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "言語バーをどのように表示するもしくは隠すかの ibus の動作を設定します" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "ルックアップテーブルの中で候補ウィンドウの向きを設定します" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "選択したインプットメソッドの情報を表示します" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" -msgstr "" -"チェックボックスをチェックしたときに言語バー上でインプットメソッドの名前を表" -"示します" +msgstr "チェックボックスをチェックしたときに言語バー上でインプットメソッドの名前を表示します" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "言語パネルの表示:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 +msgid "Show setup of the selected input method" +msgstr "選択したインプットメソッドの設定を表示します" + +#: ../setup/setup.ui.h:49 msgid "Start ibus on login" msgstr "ログイン時に IBus を起動" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to next input method in the list" msgstr "リストの中で次のインプットメソッドに切り替えるためのショートカットキー" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:51 msgid "The shortcut keys for switching to previous input method in the list" -msgstr "" -"リストの中でひとつ前のインプットメソッドに切り替えるためのショートカットキー" +msgstr "リストの中でひとつ前のインプットメソッドに切り替えるためのショートカットキー" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:53 msgid "Top left corner" msgstr "左上隅" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:54 msgid "Top right corner" msgstr "右上隅" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:55 msgid "Use custom font:" msgstr "カスタムフォントを使う:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:58 msgid "Vertical" msgstr "縦" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:59 msgid "When active" msgstr "アクティブであるとき" diff --git a/po/kn.po b/po/kn.po index edd8d2f95..cd26c0b70 100644 --- a/po/kn.po +++ b/po/kn.po @@ -1,37 +1,39 @@ # translation of ibus.master.kn.po to Kannada +# Kannada translation of ibus. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# This file is distributed under the same license as the ibus package. # # Shankar Prasad , 2009, 2010. +# shanky , 2011. msgid "" msgstr "" "Project-Id-Version: ibus.master.kn\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-05-05 16:04+0530\n" -"Last-Translator: Shankar Prasad \n" -"Language-Team: kn-IN <>\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-03-08 12:32+0900\n" +"PO-Revision-Date: 2011-03-23 12:03+0000\n" +"Last-Translator: shanky \n" +"Language-Team: kn_IN \n" +"Language: kn\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 1.0\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=1; plural=0\n" + #: ../bus/ibus.desktop.in.h:1 msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus ಇನ್‌ಪುಟ್ ವಿಧಾನದ ಫ್ರೇಮ್‌ವರ್ಕ್" +msgstr "IBus ವಿಧಾನದ ಫ್ರೇಮ್‌ವರ್ಕ್" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus ಇನ್‌ಪುಟ್ ವಿಧಾನದ ಫ್ರೇಮ್‌ವರ್ಕ್" +msgstr "IBus ಇನ್‌ಪುಟ್ ವಿಧಾನದ ಫ್ರೇಮ್‌ವರ್ಕ್ ಅನ್ನು ಆರಂಭಿಸು" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -43,138 +45,144 @@ msgstr "" msgid "Other" msgstr "ಇತರೆ" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "ಹಿಂದಿನ ಪುಟ" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "ಮುಂದಿನ ಪುಟ" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" -"ಕೆಲವು ಇನ್‌ಪುಟ್ ವಿಧಾನಗಳನ್ನು ಅನುಸ್ಥಾಪಿಸಲಾಗಿದೆ, ತೆಗೆದುಹಾಕಲಾಗಿದೆ ಅಥವ ಅಪ್‌ಡೇಟ್ ಮಾಡಲಾಗಿದೆ. " -"ದಯವಿಟ್ಟು ನಿಮ್ಮ ibus ಇನ್‌ಪುಟ್ ಪ್ಲಾಟ್‌ಫಾರ್ಮ್ ಅನ್ನು ಮರಳಿ ಆರಂಭಿಸಿ." +"ಕೆಲವು ಇನ್‌ಪುಟ್ ವಿಧಾನಗಳನ್ನು ಅನುಸ್ಥಾಪಿಸಲಾಗಿದೆ, ತೆಗೆದುಹಾಕಲಾಗಿದೆ ಅಥವ ಅಪ್‌ಡೇಟ್ " +"ಮಾಡಲಾಗಿದೆ. ದಯವಿಟ್ಟು ನಿಮ್ಮ ibus ಇನ್‌ಪುಟ್ ಪ್ಲಾಟ್‌ಫಾರ್ಮ್ ಅನ್ನು ಮರಳಿ ಆರಂಭಿಸಿ." -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 msgid "Restart Now" msgstr "ಮರಳಿ ಆರಂಭಿಸು" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 msgid "Later" msgstr "ನಂತರ" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "IBus ಇನ್‌ಪುಟ್ ವಿಧಾನದ ಫ್ರೇಮ್‌ವರ್ಕ್" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "ಪುನರಾರಂಭಿಸು" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 msgid "Turn off input method" msgstr "ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಆಫ್‌ ಮಾಡಿ" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "ಯಾವುದೆ ಇನ್‌ಪುಟ್ ವಿಂಡೊ ಇಲ್ಲ" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus ಎನ್ನುವುದು Linux/Unix ಗಾಗಿನ ಒಂದು ಚತುರ ಇನ್‌ಪುಟ್ ಬಸ್." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "ಶಂಕರ್ ಪ್ರಸಾದ್ " -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "ಇನ್‌ಪುಟ್ ವಿಧಾನದ ಬಗೆಗೆ" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಬದಲಾಯಿಸು" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "ಇದರ ಬಗ್ಗೆ" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "ಇನ್‌ಪುಟ್ ವಿಧಾನದ ಬಗೆಗೆ" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "ಭಾಷೆ: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "ಕೀಲಿಮಣೆ ವಿನ್ಯಾಸ: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "ಕತೃ: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "ವಿವರಣೆ:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "ಟ್ರಿಗರ್" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "ಶಕ್ತಗೊಳಿಸು" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "ಅಶಕ್ತಗೊಳಿಸು" + +#: ../setup/main.py:135 msgid "next input method" msgstr "ಮುಂದಿನ ಇನ್‌ಪುಟ್ ವಿಧಾನ" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "ಹಿಂದಿನ ಇನ್‌ಪುಟ್ ವಿಧಾನ" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus ಡೀಮನ್ ಇನ್ನೂ ಸಹ ಆರಂಭಗೊಂಡಿಲ್ಲ. ನೀವದನ್ನು ಈಗಲೆ ಆರಂಭಿಸಲು ಬಯಸುತ್ತೀರೆ?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus ಅನ್ನು ಆರಂಭಿಸಲಾಗಿದೆ! ನಿಮಗೆ IBus ಅನ್ನು ಬಳಸಲು ಸಾಧ್ಯವಾಗದೆ ಇದ್ದಲ್ಲಿ, ನಿಮ್ಮ $HOME/." -"bashrc ಯಲ್ಲಿ ಈ ಕೆಳಗಿನ ಸಾಲನ್ನು ಸೇರಿಸಿ, ನಂತರ ನಿಮ್ಮ ಗಣಕತೆರೆಗೆ ಮರಳಿ ದಾಖಲಾಗಿ.\n" +"IBus ಅನ್ನು ಆರಂಭಿಸಲಾಗಿದೆ! ನಿಮಗೆ IBus ಅನ್ನು ಬಳಸಲು ಸಾಧ್ಯವಾಗದೆ ಇದ್ದಲ್ಲಿ, ನಿಮ್ಮ $HOME/.bashrc ಯಲ್ಲಿ ಈ ಕೆಳಗಿನ ಸಾಲನ್ನು ಸೇರಿಸಿ, ನಂತರ ನಿಮ್ಮ ಗಣಕತೆರೆಗೆ ಮರಳಿ ದಾಖಲಾಗಿ.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "%s ಗಾಗಿ ಕೀಲಿಮಣೆ ಶಾರ್ಟ್-ಕಟ್‌ ಕೀಲಿಯನ್ನು ಆಯ್ಕೆ ಮಾಡಿ" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "ಕೀಲಿಮಣೆ ಶಾರ್ಟ್-ಕಟ್‌ಗಳು" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "ಕೀಲಿ ಸಂಕೇತ:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "ಮಾರ್ಪಡಕಗಳು:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -182,7 +190,7 @@ msgstr "" "ದಯವಿಟ್ಟು ಒಂದು ಕೀಲಿಯನ್ನು (ಅಥವ ಒಂದು ಕೀಲಿ ಸಂಯೋಜನೆಯನ್ನು) ಒತ್ತಿ.\n" "ಕೀಲಿಯನ್ನು ಬಿಟ್ಟಾಗ ಸಂವಾದವು ಮುಚ್ಚಲ್ಪಡುತ್ತದೆ." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "ದಯವಿಟ್ಟು ಒಂದು ಕೀಲಿಯನ್ನು (ಅಥವ ಒಂದು ಕೀಲಿ ಸಂಯೋಜನೆಯನ್ನು) ಒತ್ತಿ" @@ -191,22 +199,21 @@ msgid "Select an input method" msgstr "ಒಂದು ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಆಯ್ಕೆ ಮಾಡಿ" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "ಇನ್‌ಪುಟ್ ವಿಧಾನ" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus ಆದ್ಯತೆಗಳು" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "IBus ಆದ್ಯತೆಗಳು" +msgstr "IBus ಆದ್ಯತೆಗಳನ್ನು ಸಿದ್ಧಗೊಳಿಸು" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -221,67 +228,76 @@ msgid "Custom font name for language panel" msgstr "ಭಾಷೆಯ ಫಲಕಕ್ಕಾಗಿನ ಇಚ್ಛೆಯ ಅಕ್ಷರಶೈಲಿಯ ಹೆಸರು" #: ../data/ibus.schemas.in.h:4 -msgid "Embed Preedit Text" -msgstr "Preedit ಪಠ್ಯವನ್ನು ಅಡಕಗೊಳಿಸು" +msgid "Disable shortcut keys" +msgstr "ಶಾರ್ಟ್-ಕಟ್ ಕೀಲಿಗಳನ್ನು ಅಶಕ್ತಗೊಳಿಸು" #: ../data/ibus.schemas.in.h:5 -msgid "Embed Preedit Text in Application Window" -msgstr "ಅನ್ವಯ ವಿಂಡೊದಲ್ಲಿ Preedit ಪಠ್ಯವನ್ನು ಅಡಕಗೊಳಿಸಿ" +msgid "Embed Preedit Text" +msgstr "ಪೂರ್ವ-ಸಂಪಾದನಾ(ಪ್ರಿ-ಎಡಿಟ್) ಪಠ್ಯವನ್ನು ಅಡಕಗೊಳಿಸು" #: ../data/ibus.schemas.in.h:6 -#, fuzzy -msgid "Enable input method by default" -msgstr "ಮುಂದಿನ ಇನ್‌ಪುಟ್ ವಿಧಾನ" +msgid "Embed Preedit Text in Application Window" +msgstr "ಅನ್ವಯ ವಿಂಡೊದಲ್ಲಿ ಪೂರ್ವ-ಸಂಪಾದನಾ(ಪ್ರಿ-ಎಡಿಟ್) ಪಠ್ಯವನ್ನು ಅಡಕಗೊಳಿಸು" #: ../data/ibus.schemas.in.h:7 +msgid "Enable input method by default" +msgstr "ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಪೂರ್ವನಿಯೋಜಿತವಾಗಿ ಶಕ್ತಗೊಳಿಸು" + +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "" +"ಅನ್ವಯವು ಇನ್‌ಪುಟ್ ಗಮನವನ್ನು ಪಡೆದುಕೊಂಡಾಗ ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಪೂರ್ವನಿಯೋಜಿತವಾಗಿ " +"ಶಕ್ತಗೊಳಿಸು" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "ಶಾರ್ಟ್-ಕಟ್ ಕೀಲಿಗಳನ್ನು ಶಕ್ತಗೊಳಿಸು" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "ಭಾಷೆಯ ಫಲಕವನ್ನು ತೋರಿಸು" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" msgstr "ಮುಂದಿನ ಎಂಜಿನ್ ಶಾರ್ಟ್-ಕಟ್ ಕೀಲಿಗಳು" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "ನೋಡಬೇಕಿರುವ (ಲುಕ್‌ಅಪ್‌) ಕೋಷ್ಟಕದ ಹೊಂದಿಕೆ" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "ನೋಡಬೇಕಿರುವ (ಲುಕ್‌ಅಪ್‌) ಕೋಷ್ಟಕದ ಹೊಂದಿಕೆ. 0 = ಅಡ್ಡಲಾಗಿ, 1 = ಲಂಬವಾಗಿ" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "ಎಂಜಿನ್‌ಗಳನ್ನು ಮೊದಲೆ ಲೋಡ್ ಮಾಡು" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "ibus ಆರಂಭಗೊಂಡಾಗ ಲೋಡ್ ಮಾಡಲಾದ ಎಂಜಿನ್‌ಗಳು" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" msgstr "ಹಿಂದಿನ ಎಂಜಿನ್ ಶಾರ್ಟ್-ಕಟ್ ಕೀಲಿಗಳು" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "ಒಂದೇ ಇನ್‌ಪುಟ್‌ ವಿಧಾನವನ್ನು ಎಲ್ಲಾ ಅನ್ವಯಗಳಲ್ಲೂ ಬಳಸು" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "ವ್ಯವಸ್ಥೆಯ ಟ್ರೇಯಲ್ಲಿ ಚಿಹ್ನೆಯನ್ನು ತೋರಿಸು" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "ಇನ್‌ಪುಟ್ ವಿಧಾನದ ಹೆಸರನ್ನು ತೋರಿಸು" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "ಭಾಷೆಯ ಫಲಕದಲ್ಲಿನ ಇನ್‌ಪುಟ್ ವಿಧಾನದ ಹೆಸರನ್ನು ತೋರಿಸು" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" @@ -289,7 +305,7 @@ msgstr "" "ಭಾಷೆಯ ಫಲಕದ ವರ್ತನೆ. 0 = ಮೆನುವಿನಲ್ಲಿ ಅಡಕಗೊಳಿಸಲಾಗಿದೆ, 1 = ಸ್ವಯಂ ಅಡಗಿಸು, 2 = " "ಯಾವಾಗಲೂ ತೋರಿಸು" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" @@ -297,41 +313,47 @@ msgstr "" "ಭಾಷೆಯ ಫಲಕವು ಇರುವ ಸ್ಥಳ. 0 = ಮೇಲಿನ ಎಡ ಮೂಲೆ, 1 = ಮೇಲಿನ ಬಲ ಮೂಲೆ, 2 = ಕೆಳಗಿನ ಎಡ " "ಮೂಲೆ, 3 = ಕೆಳಗಿನ ಬಲ ಮೂಲೆ, 4 = ಇಚ್ಛೆಯ" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" msgstr "ಪಟ್ಟಿಯಲ್ಲಿನ ಮುಂದಿನ ಇನ್‌ಪುಟ್ ವಿಧಾನಕ್ಕೆ ಬದಲಾಯಿಸಲು ಶಾರ್ಟ್-ಕಟ್‌ ಕೀಲಿಗಳು" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" -msgstr "ಪಟ್ಟಿಯಲ್ಲಿನ ಹಿಂದಿನ ಇನ್‌ಪುಟ್ ವಿಧಾನಕ್ಕೆ ಬದಲಾಯಿಸಲು ಶಾರ್ಟ್-ಕಟ್‌ ಕೀಲಿಗಳು" +msgstr "ಹಿಂದಿನ ಇನ್‌ಪುಟ್ ವಿಧಾನಕ್ಕೆ ಬದಲಾಯಿಸಲು ಶಾರ್ಟ್-ಕಟ್‌ ಕೀಲಿಗಳು" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಆಫ್ ಮಾಡಲು ಬಳಸಬಹುದಾದ ಶಾರ್ಟ್-ಕಟ್‌ ಕೀಲಿ" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಆನ್ ಮಾಡಲು ಬಳಸಬಹುದಾದ ಶಾರ್ಟ್-ಕಟ್‌ ಕೀಲಿ" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "ಇನ್‌ಪುಟ್‌ ವಿಧಾನಗಳನ್ನು ಆಫ್ ಹಾಗು ಆನ್ ಮಾಡಲು ಶಾರ್ಟ್-ಕೀಲಿಗಳು" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "ಶಾರ್ಟ್-ಕಟ್ ಕೀಲಿಗಳನ್ನು ಟ್ರಿಗರ್ ಮಾಡು" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" -msgstr "ಇಚ್ಛೆಯ ಅಕ್ಷರಶೈಲಿಯನ್ನು ಬಳಸಿ" +msgstr "ಇಚ್ಛೆಯ ಅಕ್ಷರಶೈಲಿಯನ್ನು ಬಳಸು" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "ಭಾಷೆಯ ಫಲಕಕ್ಕಾಗಿ ಇಚ್ಛೆಯ ಅಕ್ಷರಶೈಲಿಯ ಹೆಸರನ್ನು ಬಳಸಿ" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "ಜಾಗತಿಕ ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಬಳಸಿ" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "ವ್ಯವಸ್ಥೆಯ ಕೀಲಿಮಣೆ (XKB) ವಿನ್ಯಾಸವನ್ನು ಬಳಸಿ" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "ವ್ಯವಸ್ಥೆಯ ಕೀಲಿಮಣೆ ವಿನ್ಯಾಸವನ್ನು ಬಳಸಿ" @@ -381,11 +403,12 @@ msgid "" "You may use up/down buttons to change it." msgstr "" "ಪೂರ್ವನಿಯೋಜಿತ ಇನ್‌ಪುಟ್‌ ವಿಧಾನವು ಪಟ್ಟಿಯ ಮೇಲ್ಬಾಗದಲ್ಲಿದೆ.\n" -"ಅದನ್ನು ಬದಲಾಯಿಸಲು ನೀವು up/down ಗುಂಡಿಗಳನ್ನು ಬಳಸಬಹುದು." +"ಅದನ್ನು ಬದಲಾಯಿಸಲು ನೀವು ಮೇಲೆ/ಕೆಳಗಿನ ಬಾಣದ ಗುರುತಿನ ಗುಂಡಿಗಳನ್ನು ಬಳಸಬಹುದು." #: ../setup/setup.ui.h:17 msgid "Add the selected input method into the enabled input methods" -msgstr "ಆಯ್ಕೆ ಮಾಡಲಾದ ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಶಕ್ತಗೊಂಡಿರುವ ಇನ್‌ಪುಟ್‌ ವಿಧಾನಗಳಿಗೆ ಸೇರಿಸಿ" +msgstr "" +"ಆಯ್ಕೆ ಮಾಡಲಾದ ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಶಕ್ತಗೊಂಡಿರುವ ಇನ್‌ಪುಟ್‌ ವಿಧಾನಗಳಿಗೆ ಸೇರಿಸಿ" #: ../setup/setup.ui.h:18 msgid "Advanced" @@ -412,146 +435,119 @@ msgid "Custom" msgstr "ಇಚ್ಛೆಯ" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "ಅಶಕ್ತಗೊಳಿಸು:" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "ಅನ್ವಯ ವಿಂಡೊದಲ್ಲಿ Preedit ಪಠ್ಯವನ್ನು ಅಡಕಗೊಳಿಸಿ" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "ಅನ್ವಯ ವಿಂಡೊದಲ್ಲಿ ಇನ್‌ಪುಟ್ ವಿಧಾನದ Preedit ಪಠ್ಯವನ್ನು ಅಡಕಗೊಳಿಸಿ" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "ಮೆನುವನಲ್ಲಿ ಅಡಕಗೊಳಿಸಲಾದ" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "ಶಕ್ತಗೊಂಡ ಅಥವ ಅಶಕ್ತಗೊಂಡ:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "ಶಕ್ತಗೊಳಿಸು:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "ಸಾಮಾನ್ಯ" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "ಲಂಬ" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "ಭಾಷೆಯ ಫಲಕದ ಸ್ಥಳ:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "" -"ಆಯ್ಕೆ ಮಾಡಲಾದ ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಶಕ್ತಗೊಂಡಿರುವ ಇನ್‌ಪುಟ್‌ ವಿಧಾನಗಳ ಪಟ್ಟಿಯಲ್ಲಿ ಕೆಳಕ್ಕೆ ಜರುಗಿಸಿ" +"ಆಯ್ಕೆ ಮಾಡಲಾದ ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಶಕ್ತಗೊಂಡಿರುವ ಇನ್‌ಪುಟ್‌ ವಿಧಾನಗಳ ಪಟ್ಟಿಯಲ್ಲಿ " +"ಕೆಳಕ್ಕೆ ಜರುಗಿಸಿ" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "" -"ಆಯ್ಕೆ ಮಾಡಲಾದ ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಶಕ್ತಗೊಂಡಿರುವ ಇನ್‌ಪುಟ್‌ ವಿಧಾನಗಳ ಪಟ್ಟಿಯಲ್ಲಿ ಮೇಲಕ್ಕೆ ಜರುಗಿಸಿ" +"ಆಯ್ಕೆ ಮಾಡಲಾದ ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಶಕ್ತಗೊಂಡಿರುವ ಇನ್‌ಪುಟ್‌ ವಿಧಾನಗಳ ಪಟ್ಟಿಯಲ್ಲಿ " +"ಮೇಲಕ್ಕೆ ಜರುಗಿಸಿ" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "ಮುಂದಿನ ಇನ್‌ಪುಟ್ ವಿಧಾನ:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "ಹಿಂದಿನ ಇನ್‌ಪುಟ್ ವಿಧಾನ:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "" -"ಆಯ್ಕೆ ಮಾಡಲಾದ ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಶಕ್ತಗೊಂಡಿರುವ ಇನ್‌ಪುಟ್‌ ವಿಧಾನಗಳ ಪಟ್ಟಿಯಿಂದ ತೆಗೆದು ಹಾಕಿ" +"ಆಯ್ಕೆ ಮಾಡಲಾದ ಇನ್‌ಪುಟ್ ವಿಧಾನವನ್ನು ಶಕ್ತಗೊಂಡಿರುವ ಇನ್‌ಪುಟ್‌ ವಿಧಾನಗಳ ಪಟ್ಟಿಯಿಂದ " +"ತೆಗೆದು ಹಾಕಿ" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "" -"ಭಾಷಾ ಪಟ್ಟಿಕೆಯನ್ನು ಹೇಗೆ ತೋರಿಸಬೇಕು ಅಥವ ಅಡಗಿಸಬೇಕು ಎನ್ನುವ ibus ನ ವರ್ತನೆಯನ್ನು ಹೊಂದಿಸಿ" +"ಭಾಷಾ ಪಟ್ಟಿಕೆಯನ್ನು ಹೇಗೆ ತೋರಿಸಬೇಕು ಅಥವ ಅಡಗಿಸಬೇಕು ಎನ್ನುವ ibus ನ ವರ್ತನೆಯನ್ನು " +"ಹೊಂದಿಸಿ" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "ನೋಡಬೇಕಿರುವ (ಲುಕ್‌ಅಪ್‌) ಕೋಷ್ಟಕದ ವಾಲಿಕೆಯನ್ನು ಹೊಂದಿಸಿ" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "ಆಯ್ಕೆ ಮಾಡಲಾದ ಇನ್‌ಪುಟ್ ವಿಧಾನದ ಮಾಹಿತಿಯನ್ನು ತೋರಿಸು" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" -msgstr "ಗುರುತುಚೌಕದಲ್ಲಿ ಗುರುತು ಹಾಕಿದಾಗ ಭಾಷಾ ಪಟ್ಟಿಯಲ್ಲಿ ಇನ್‌ಪುಟ್ ವಿಧಾನದ ಹೆಸರನ್ನು ತೋರಿಸು" +msgstr "" +"ಗುರುತುಚೌಕದಲ್ಲಿ ಗುರುತು ಹಾಕಿದಾಗ ಭಾಷಾ ಪಟ್ಟಿಯಲ್ಲಿ ಇನ್‌ಪುಟ್ ವಿಧಾನದ ಹೆಸರನ್ನು " +"ತೋರಿಸು" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "ಭಾಷೆಯ ಫಲಕವನ್ನು ತೋರಿಸು:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "ಪ್ರವೇಶಿಸಿದಾಗ ibus ಅನ್ನು ಆರಂಭಿಸು" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "ಪಟ್ಟಿಯಲ್ಲಿನ ಮುಂದಿನ ಇನ್‌ಪುಟ್ ವಿಧಾನಕ್ಕೆ ಬದಲಾಯಿಸಲು ಶಾರ್ಟ್-ಕಟ್‌ ಕೀಲಿಗಳು" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "ಪಟ್ಟಿಯಲ್ಲಿನ ಹಿಂದಿನ ಇನ್‌ಪುಟ್ ವಿಧಾನಕ್ಕೆ ಬದಲಾಯಿಸಲು ಶಾರ್ಟ್-ಕಟ್‌ ಕೀಲಿಗಳು" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "ಮೇಲಿನ ಎಡ ಮೂಲೆ" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "ಮೇಲಿನ ಬಲ ಮೂಲೆ" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "ಇಚ್ಛೆಯ ಅಕ್ಷರಶೈಲಿಯನ್ನು ಬಳಸಿ:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "ಲಂಬ" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "ಸಕ್ರಿಯವಾಗಿದ್ದಾಗ" - -#~ msgid "Never" -#~ msgstr "ಎಂದಿಗೂ ಇಲ್ಲ" - -#, fuzzy -#~ msgid "Langauge panel position" -#~ msgstr "ಭಾಷೆಯ ಫಲಕವನ್ನು ತೋರಿಸು:" - -#~ msgid "Custom font:" -#~ msgstr "ಇಚ್ಛೆಯ ಅಕ್ಷರಶೈಲಿ:" - -#, fuzzy -#~ msgid "Font for language bar and candidates" -#~ msgstr "ಭಾಷೆಯ ಫಲಕ ಹಾಗು ಅಭ್ಯರ್ಥಿಗಾಗಿ ಇಚ್ಛೆಯ ಅಕ್ಷರಶೈಲಿ" - -#~ msgid "Use custom font for language bar and candidates" -#~ msgstr "ಭಾಷೆಯ ಫಲಕ ಹಾಗು ಅಭ್ಯರ್ಥಿಗಳಿಗಾಗಿ ಇಚ್ಛೆಯ ಅಕ್ಷರಶೈಲಿಯನ್ನು ಬಳಸಿ" - -#~ msgid "Custom Font" -#~ msgstr "ಇಚ್ಛೆಯ ಅಕ್ಷರಶೈಲಿ" - -#~ msgid "Show IM Name" -#~ msgstr "IM ಹೆಸರನ್ನು ತೋರಿಸು" - -#~ msgid "Show IM name on language bar" -#~ msgstr "IM ಹೆಸರು ಅಥವ ಭಾಷೆಯ ಫಲಕವನ್ನು ತೋರಿಸು" - -#~ msgid "Use Custom Font" -#~ msgstr "ಇಚ್ಛೆಯ ಅಕ್ಷರಶೈಲಿಯನ್ನು ಬಳಸಿ" - -#~ msgid "Next engine hotkey for switch to next input method engine" -#~ msgstr "ಮುಂದಿನ ಇನ್‌ಪುಟ್ ವಿಧಾನ ಎಂಜಿನ್‌ಗೆ ಬದಲಾಯಿಸಲು ಮುಂದಿನ ಎಂಜಿನ್ ಹಾಟ್‌ಕೀಲಿ" - -#~ msgid "Prev engine hotkey for switch to previous input method engine" -#~ msgstr "ಹಿಂದಿನ ಇನ್‌ಪುಟ್ ವಿಧಾನ ಎಂಜಿನ್‌ಗೆ ಬದಲಾಯಿಸಲು ಹಿಂದಿನ ಎಂಜಿನ್ ಹಾಟ್‌ಕೀಲಿ" - -#~ msgid "Trigger hotkey for enable or disable input context" -#~ msgstr "ಇನ್‌ಪುಟ್ ಸನ್ನಿವೇಶವನ್ನು ಶಕ್ತಗೊಳಿಸಲು ಅಥವ ಅಶಕ್ತಗೊಳಿಸಲು ಟ್ರಿಗರ್ ಹಾಟ್‌ಕೀಲಿ" - -#~ msgid "gtk-about" -#~ msgstr "gtk-about" diff --git a/po/ko.po b/po/ko.po index f8392082d..c4bbe831f 100644 --- a/po/ko.po +++ b/po/ko.po @@ -1,4 +1,4 @@ -# translation of ko.po to Korean +# translation of ibus.master.ko.po to Korean # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # @@ -6,12 +6,13 @@ # Hyunsok Oh , 2010. msgid "" msgstr "" -"Project-Id-Version: ko\n" +"Project-Id-Version: ibus.master.ko\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-03-31 14:16+1000\n" -"Last-Translator: Hyunsok Oh \n" -"Language-Team: Korean \n" +"POT-Creation-Date: 2011-02-12 00:41+0900\n" +"PO-Revision-Date: 2010-08-03 15:01+1000\n" +"Last-Translator: \n" +"Language-Team: Korean \n" +"Language: ko\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -23,16 +24,14 @@ msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus 입력 방식 프레임워크" +msgstr "입력 방식 프레임워크" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus 입력 방식 프레임워크" +msgstr "IBus 입력 방식 프레임워크 시작" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -44,15 +43,15 @@ msgstr "" msgid "Other" msgstr "기타" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "이전 페이지" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "다음 페이지" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." @@ -60,91 +59,99 @@ msgstr "" "입력 방식이 몇가지 설치되거나, 삭제되거나, 업데이트되었습니다. ibus 입력 플랫" "폼을 재시작 하십시오." -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 msgid "Restart Now" msgstr "지금 재시작" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 msgid "Later" msgstr "나중에" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "IBus 입력 방식 프레임워크" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "재시작" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 msgid "Turn off input method" msgstr "입력 방식 해제" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "입력 창이 없음 " -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus는 Linux/Unix를 위한 지능형 입력 버스입니다. " -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "김은주(eukim@redhat.com)" -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "입력 방식 정보" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "입력 방식 전환 " -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "정보 " -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "입력 방식 정보" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "언어: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "키보드 레이아웃: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "저자: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "설명:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "트리거 " -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "" + +#: ../setup/main.py:135 msgid "next input method" msgstr "다음 입력 방식 " -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "이전 입력 방식 " -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "Bus 데몬이 시작되지 않았습니다. 지금 시작하시겠습니까? " -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" "IBus has been started! If you can not use IBus, please add below lines in " "$HOME/.bashrc, and relogin your desktop.\n" @@ -158,24 +165,24 @@ msgstr "" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus " -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "%s의 단축키를 선택" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "단축키들 " -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "키 코드: " -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "수정자: " -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -183,7 +190,7 @@ msgstr "" "키 또는 키 조합을 입력하십시오.\n" "키를 입력하면 대화 상자가 닫히게 됩니다." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "키 또는 키 조합을 입력하십시오. " @@ -192,22 +199,21 @@ msgid "Select an input method" msgstr "입력 방식을 선택합니다" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "입력 방식 " -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus 환경 설정 " #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "IBus 환경 설정 " +msgstr "IBus 환경 설정" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -230,13 +236,12 @@ msgid "Embed Preedit Text in Application Window" msgstr "어플리케이션 창에 편집전 텍스트를 포함" #: ../data/ibus.schemas.in.h:6 -#, fuzzy msgid "Enable input method by default" -msgstr "다음 입력 방식 " +msgstr "입력기를 디폴트로 활성화" #: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default when the application gets input focus" -msgstr "" +msgstr "프로그램의 입력창에 포커스가 가면 디폴트로 입력기를 활성화합니다" #: ../data/ibus.schemas.in.h:8 msgid "Language panel position" @@ -266,11 +271,11 @@ msgstr "ibus 시작 시 엔진 미리 로드 " msgid "Prev engine shortcut keys" msgstr "이전 엔진 단축키" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "모든 어플리케이션에서 동일한 입력 방식 공유" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "시스템 트레이에 아이콘 보여주기" @@ -278,7 +283,7 @@ msgstr "시스템 트레이에 아이콘 보여주기" msgid "Show input method name" msgstr "입력 방식 이름 보여주기" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "언어 도구 모음에 입력 방식 이름 보여주기" @@ -297,16 +302,14 @@ msgstr "" "래, 4 = 사용자 지정" #: ../data/ibus.schemas.in.h:21 -#, fuzzy msgid "The shortcut keys for switching to the next input method in the list" -msgstr "목록에 있는 다음 입력 방식으로 전환하기 위한 단축키" +msgstr "목록에 있는 다음 입력 방식으로 전환하기 위한 단축 키" #: ../data/ibus.schemas.in.h:22 -#, fuzzy msgid "The shortcut keys for switching to the previous input method" -msgstr "목록에 있는 이전 입력 방식으로 전환하기 위한 단축키 " +msgstr "목록에 있는 이전 입력 방식으로 전환하기 위한 단축 키" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "입력 방식을 활성 또는 해제하기 위한 단축키" @@ -326,11 +329,11 @@ msgstr "언어 패널 용 사용자 정의 글꼴 이름 사용" msgid "Use global input method" msgstr "전역 입력 방식 사용" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "시스템 키보드 (XKB) 레이아웃 사용 " -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "시스템 키보드 레이아웃 사용 " @@ -411,101 +414,109 @@ msgid "Custom" msgstr "사용자 정의" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "어플리케이션 창에 편집전 텍스트 포함" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "입력 방식의 편집전 텍스트를 어플레케이션 창에 포함시킵니다" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "메뉴에 포함" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "활성화 또는 비활성화: " -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "일반 " -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "가로" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "언어 패널 위치:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "활성화된 입력 방식 목록에서 선택한 입력 방식을 아래로 이동합니다" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "활성화된 입력 방식 목록에서 선택한 입력 방식을 위로 이동합니다" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "다음 입력 방식:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "이전 입력 방식:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "활성화된 입력 방식 목록에서 선택한 입력 방식을 제거" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "ibus가 입력 도구 모음을 표시하거나 숨기는 방법 설정" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "검색 테이블에서 후보 창의 방향 설정 " -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "선택한 입력 방식의 정보 보여주기" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "확인란을 선택하면 입력 방식의 이름을 입력 도구 모음에 표시" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "언어 패널 표시: " -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "로그인 시 ibus 시작 " -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "목록에 있는 다음 입력 방식으로 전환하기 위한 단축키" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "목록에 있는 이전 입력 방식으로 전환하기 위한 단축키 " -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "왼쪽 위" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "오른쪽 위" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "사용자 정의 글꼴 사용:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "세로" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "활성화 되었을 때" diff --git a/po/lv.po b/po/lv.po new file mode 100644 index 000000000..e039591a6 --- /dev/null +++ b/po/lv.po @@ -0,0 +1,552 @@ +# translation of ibus.pot to Source +# Source translation of ibus. +# Copyright (C) 2008 Peng Huang +# This file is distributed under the same license as the ibus package. +# +# Translators: +# rudolfs.mazurs , 2011. +msgid "" +msgstr "" +"Project-Id-Version: IBus\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-09-28 14:03+0000\n" +"Last-Translator: Tranzistors \n" +"Language-Team: Latvian (http://www.transifex.net/projects/p/fedora/team/lv/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: lv\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);\n" + +#: ../bus/ibus.desktop.in.h:1 +msgid "IBus" +msgstr "IBus" + +#: ../bus/ibus.desktop.in.h:2 +msgid "Input Method Framework" +msgstr "Ievades metožu rāmja sistēma" + +#: ../bus/ibus.desktop.in.h:3 +msgid "Start IBus Input Method Framework" +msgstr "Startēt IBus ievades metožu rāmja sistēmu" + +#: ../ibus/_config.py.in:40 +msgid "" +"Copyright (c) 2007-2010 Peng Huang\n" +"Copyright (c) 2007-2010 Red Hat, Inc." +msgstr "" +"Autortiesības (c) 2007-2010 Peng Huang\n" +"Autortiesības (c) 2007-2010 Red Hat, Inc." + +#: ../ibus/lang.py:41 +msgid "Other" +msgstr "Cits" + +#: ../ui/gtk/candidatepanel.py:264 +msgid "Previous page" +msgstr "Iepriekšējā lapa" + +#: ../ui/gtk/candidatepanel.py:269 +msgid "Next page" +msgstr "Nākamā lapa" + +#: ../ui/gtk/main.py:62 +msgid "" +"Some input methods have been installed, removed or updated. Please restart " +"ibus input platform." +msgstr "" +"Dažas ievades metodes ir uzinstalētas, izņemtas vai atjauninātas. Lūdzu, " +"pārstartējiet ibus ievades platformu." + +#: ../ui/gtk/main.py:66 +msgid "Restart Now" +msgstr "Pārstartēt tagad" + +#: ../ui/gtk/main.py:67 +msgid "Later" +msgstr "Vēlāk" + +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "IBus panelis" + +#: ../ui/gtk/panel.py:122 +msgid "IBus input method framework" +msgstr "IBus ievades metodes rāmja sistēma" + +#: ../ui/gtk/panel.py:352 +msgid "Restart" +msgstr "Pārstartēt" + +#: ../ui/gtk/panel.py:439 +msgid "Turn off input method" +msgstr "Izslēgt ievades metodi" + +#: ../ui/gtk/panel.py:478 +msgid "No input window" +msgstr "Nav ievades loga" + +#: ../ui/gtk/panel.py:509 +msgid "IBus is an intelligent input bus for Linux/Unix." +msgstr "IBus ir inteliģenta ievades kopne Linux/Unix." + +#: ../ui/gtk/panel.py:513 +msgid "translator-credits" +msgstr "" +"Arvis Lācis\n" +"Pēteris Krišjānis\n" +"Rūdolfs Mazurs" + +#: ../ui/gtk/languagebar.py:106 +msgid "About the input method" +msgstr "Par ievades metodi" + +#: ../ui/gtk/languagebar.py:214 +msgid "Switch input method" +msgstr "Pārslēgt ievades metodi" + +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 +msgid "About" +msgstr "Par" + +#: ../ui/gtk/languagebar.py:361 +msgid "About the Input Method" +msgstr "Par ievades metodi" + +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 +#, python-format +msgid "Language: %s\n" +msgstr "Valoda: %s\n" + +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#, python-format +msgid "Keyboard layout: %s\n" +msgstr "Tastatūras izkārtojums: %s\n" + +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#, python-format +msgid "Author: %s\n" +msgstr "Autors: %s\n" + +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +msgid "Description:\n" +msgstr "Apraksts:\n" + +#: ../setup/main.py:102 +msgid "trigger" +msgstr "trigeris" + +#: ../setup/main.py:113 +msgid "enable" +msgstr "aktivēt" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "deaktivēt" + +#: ../setup/main.py:135 +msgid "next input method" +msgstr "nākošā ievades metode" + +#: ../setup/main.py:146 +msgid "previous input method" +msgstr "iepriekšējā ievades metode" + +#: ../setup/main.py:286 +msgid "IBus daemon is not started. Do you want to start it now?" +msgstr "IBus dēmons nav startēts. Vai vēlaties to startēt tagad?" + +#: ../setup/main.py:301 +msgid "" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" +" export GTK_IM_MODULE=ibus\n" +" export XMODIFIERS=@im=ibus\n" +" export QT_IM_MODULE=ibus" +msgstr "" +"IBus tika startēts! Ja nevarat izmantot IBus, pievienojiet sekojošās rindiņas failā $HOME/.bashrc, un atkal piesakieties sesijā.\n" +" export GTK_IM_MODULE=ibus\n" +" export XMODIFIERS=@im=ibus\n" +" export QT_IM_MODULE=ibus" + +#: ../setup/main.py:316 +#, python-format +msgid "Select keyboard shortcut for %s" +msgstr "Izvēlieties tastatūras saīsni priekš %s" + +#: ../setup/keyboardshortcut.py:52 +msgid "Keyboard shortcuts" +msgstr "Tastatūras saīsnes" + +#: ../setup/keyboardshortcut.py:63 +msgid "Key code:" +msgstr "Taustiņa kods:" + +#: ../setup/keyboardshortcut.py:78 +msgid "Modifiers:" +msgstr "Modifikatoru taustiņi:" + +#: ../setup/keyboardshortcut.py:231 +msgid "" +"Please press a key (or a key combination).\n" +"The dialog will be closed when the key is released." +msgstr "" +"Lūdzu, nospiediet taustiņu (vai taustiņu kombināciju).\n" +"Dialoga logs tiks aizvērts, kad taustiņš tiks atlaists." + +#: ../setup/keyboardshortcut.py:233 +msgid "Please press a key (or a key combination)" +msgstr "Lūdzu, nospiediet taustiņu (vai taustiņu kombināciju)" + +#: ../setup/enginecombobox.py:120 +msgid "Select an input method" +msgstr "Izvēlieties ievades metodi" + +#. create im name & icon column +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 +msgid "Input Method" +msgstr "Ievades metode" + +#: ../setup/enginetreeview.py:92 +msgid "Kbd" +msgstr "Kbd" + +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 +msgid "IBus Preferences" +msgstr "IBus iestatījumi" + +#: ../setup/ibus-setup.desktop.in.h:2 +msgid "Set IBus Preferences" +msgstr "Iestatīt IBus iestatījumus" + +#: ../data/ibus.schemas.in.h:1 +msgid "Auto hide" +msgstr "Autom. slēpšana" + +#: ../data/ibus.schemas.in.h:2 +msgid "Custom font" +msgstr "Izvēlēts fonts" + +#: ../data/ibus.schemas.in.h:3 +msgid "Custom font name for language panel" +msgstr "Izvēlētā fonta nosaukums valodas panelim" + +#: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "Deaktivēt īsinājumu taustiņus" + +#: ../data/ibus.schemas.in.h:5 +msgid "Embed Preedit Text" +msgstr "Iegult pirmsrediģēšanas tekstu" + +#: ../data/ibus.schemas.in.h:6 +msgid "Embed Preedit Text in Application Window" +msgstr "Iegult pirmsrediģēšanas tekstu lietotnes logā" + +#: ../data/ibus.schemas.in.h:7 +msgid "Enable input method by default" +msgstr "Aktivēt ievades metodi pēc noklusējuma" + +#: ../data/ibus.schemas.in.h:8 +msgid "Enable input method by default when the application gets input focus" +msgstr "Aktivēt ievades metodi pēc noklusējuma, kad lietotne saņem fokusu" + +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "Aktivēt īsinājuma taustiņus" + +#: ../data/ibus.schemas.in.h:10 +msgid "Language panel position" +msgstr "Valodas paneļa pozīcija" + +#: ../data/ibus.schemas.in.h:11 +msgid "Next engine shortcut keys" +msgstr "Nākošā dzinēja saīsņu taustiņi" + +#: ../data/ibus.schemas.in.h:12 +msgid "Orientation of lookup table" +msgstr "Apsekošanas tabulas novietojums" + +#: ../data/ibus.schemas.in.h:13 +msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" +msgstr "Apsekošanas tabulas novietojums. 0 = horizontāls, 1 = vertikāls" + +#: ../data/ibus.schemas.in.h:14 +msgid "Preload engines" +msgstr "Pārlādēt dzinējus" + +#: ../data/ibus.schemas.in.h:15 +msgid "Preload engines during ibus starts up" +msgstr "Laicīgi ielādēt dzinējus ibus ielādes laikā" + +#: ../data/ibus.schemas.in.h:16 +msgid "Prev engine shortcut keys" +msgstr "Iepriekšējā dzinēja saīsņu taustiņi" + +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 +msgid "Share the same input method among all applications" +msgstr "Starp lietotnēm izmantot vienu un to pašu ievades metodi" + +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +msgid "Show icon on system tray" +msgstr "Rādīt ikonu sistēmas ikonu joslā" + +#: ../data/ibus.schemas.in.h:19 +msgid "Show input method name" +msgstr "Rādīt ievades metodes nosaukumu" + +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 +msgid "Show input method name on language bar" +msgstr "Parādīt ievades metodes nosaukumu valodas joslā" + +#: ../data/ibus.schemas.in.h:21 +msgid "" +"The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " +"Always show" +msgstr "" +"Valodas paneļa uzvedība. 0 = iegults izvēlnē, 1 = automātiski slēpt, 2 = " +"vienmēr rādīt" + +#: ../data/ibus.schemas.in.h:22 +msgid "" +"The position of the language panel. 0 = Top left corner, 1 = Top right " +"corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" +msgstr "" +"Valodas paneļa pozīcija. 0 = augšējais kreisais stūris, 1 = augšējais labais" +" stūris, 2 = apakšējais kreisais stūris, 3 = apakšējais labais stūris, 4 = " +"izvēlēts" + +#: ../data/ibus.schemas.in.h:23 +msgid "The shortcut keys for switching to the next input method in the list" +msgstr "Saīsņu taustiņi, lai pārslēgtos uz nākamo ievades metodi sarakstā" + +#: ../data/ibus.schemas.in.h:24 +msgid "The shortcut keys for switching to the previous input method" +msgstr "" +"Saīsņu taustiņi, lai pārslēgtos uz iepriekšējo ievades metodi sarakstā" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "Saīsņu taustiņi, lai izslēgtu ievades metodi " + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "Saīsņu taustiņi, lai ieslēgtu ievades metodi " + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 +msgid "The shortcut keys for turning input method on or off" +msgstr "Saīsņu taustiņi, lai ieslēgtu vai izslēgtu ievades metodi" + +#: ../data/ibus.schemas.in.h:28 +msgid "Trigger shortcut keys" +msgstr "Trigera saīsņu taustiņi" + +#: ../data/ibus.schemas.in.h:29 +msgid "Use custom font" +msgstr "Izmantot izvēles fontu" + +#: ../data/ibus.schemas.in.h:30 +msgid "Use custom font name for language panel" +msgstr "Izmantojamais izvēles fonta nosaukums valodas panelim" + +#: ../data/ibus.schemas.in.h:31 +msgid "Use global input method" +msgstr "Izmantot globālo ievades metodi" + +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 +msgid "Use system keyboard (XKB) layout" +msgstr "Izmantot sistēmas tastatūras (XKB) izkārtojumu " + +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 +msgid "Use system keyboard layout" +msgstr "Izmantot sistēmas tastatūras izkārtojumu" + +#: ../setup/setup.ui.h:1 +msgid "..." +msgstr "..." + +#: ../setup/setup.ui.h:2 +msgid "Font and Style" +msgstr "Fonts un stils" + +#: ../setup/setup.ui.h:3 +msgid "Global input method settings" +msgstr "Globālās ievades metodes iestatījumi" + +#: ../setup/setup.ui.h:4 +msgid "Keyboard Layout" +msgstr "Tastatūras izkārtojums" + +#: ../setup/setup.ui.h:5 +msgid "Keyboard Shortcuts" +msgstr "Tastatūras īsceļi" + +#: ../setup/setup.ui.h:6 +msgid "Startup" +msgstr "Startēšana" + +#: ../setup/setup.ui.h:7 +msgid "" +"IBus\n" +"The intelligent input bus\n" +"Homepage: http://code.google.com/p/ibus\n" +"\n" +"\n" +"\n" +msgstr "" +"IBus\n" +"Inteliģentā ievades kopne\n" +"Mājas lapa: http://code.google.com/p/ibus\n" +"\n" +"\n" +"\n" + +#: ../setup/setup.ui.h:14 +msgid "" +"The default input method is the top one in the list.\n" +"You may use up/down buttons to change it." +msgstr "" +"Noklusētā ievades metode atrodas saraksta augšpusē.\n" +"Jūs varat izmantot pogas uz augšu/uz leju, lai to izmainītu." + +#: ../setup/setup.ui.h:17 +msgid "Add the selected input method into the enabled input methods" +msgstr "Pievienot izvēlēto ievades metodi pie aktivētajām ievades metodēm" + +#: ../setup/setup.ui.h:18 +msgid "Advanced" +msgstr "Paplašināti" + +#: ../setup/setup.ui.h:19 +msgid "Always" +msgstr "Vienmēr" + +#: ../setup/setup.ui.h:20 +msgid "Bottom left corner" +msgstr "Apakšējais kreisais stūris" + +#: ../setup/setup.ui.h:21 +msgid "Bottom right corner" +msgstr "Apakšējais labais stūris" + +#: ../setup/setup.ui.h:22 +msgid "Candidates orientation:" +msgstr "Kandidātu orientācija:" + +#: ../setup/setup.ui.h:23 +msgid "Custom" +msgstr "Izvēlēts" + +#: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "Deaktivēt:" + +#: ../setup/setup.ui.h:25 +msgid "Embed preedit text in application window" +msgstr "Iegult pirmsrediģēšanas tekstu lietotnes logā" + +#: ../setup/setup.ui.h:26 +msgid "Embed the preedit text of input method in the application window" +msgstr "Iegult ievades metodes pirmsrediģēšanas tekstu lietotnes logā" + +#: ../setup/setup.ui.h:27 +msgid "Embedded in menu" +msgstr "Iegults izvēlnē" + +#: ../setup/setup.ui.h:28 +msgid "Enable or disable:" +msgstr "Aktivēt vai deaktivēt:" + +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "Aktivēt:" + +#: ../setup/setup.ui.h:30 +msgid "General" +msgstr "Vispārīgi" + +#: ../setup/setup.ui.h:31 +msgid "Horizontal" +msgstr "Horizontāli" + +#: ../setup/setup.ui.h:34 +msgid "Language panel position:" +msgstr "Valodas paneļa pozīcija:" + +#: ../setup/setup.ui.h:35 +msgid "Move down the selected input method in the enabled input methods" +msgstr "" +"Pārvietojiet lejup izvēlēto ievades metodi ieslēgto ievades metožu sarakstā" + +#: ../setup/setup.ui.h:36 +msgid "Move up the selected input method in the enabled input methods list" +msgstr "" +"Pārvietojiet augšup izvēlēto ievades metodi ieslēgto ievades metožu sarakstā" + +#: ../setup/setup.ui.h:37 +msgid "Next input method:" +msgstr "Nākamā ievades metode" + +#: ../setup/setup.ui.h:38 +msgid "Previous input method:" +msgstr "Iepriekšējā ievades metode:" + +#: ../setup/setup.ui.h:39 +msgid "Remove the selected input method from the enabled input methods" +msgstr "Noņemt izvēlēto metodi no ieslēgto ievades metožu saraksta" + +#: ../setup/setup.ui.h:40 +msgid "Set the behavior of ibus how to show or hide language bar" +msgstr "Iestatīt ibus uzvedību kā rādīt vai slēpt valodas joslu" + +#: ../setup/setup.ui.h:41 +msgid "Set the orientation of candidates in lookup table" +msgstr "Iestatīt kandidātu orientāciju apsekošanas tabulā" + +#: ../setup/setup.ui.h:44 +msgid "Show information of the selected input method" +msgstr "Parādīt informāciju par izvēlēto ievades metodi" + +#: ../setup/setup.ui.h:46 +msgid "Show input method's name on language bar when check the checkbox" +msgstr "" +"Parādīt ievades metodes nosaukumu valodas joslā, kad tiek atzīmēta izvēles " +"rūtiņa" + +#: ../setup/setup.ui.h:47 +msgid "Show language panel:" +msgstr "Parādīt valodas paneli:" + +#: ../setup/setup.ui.h:48 +msgid "Start ibus on login" +msgstr "Startēt ibus līdz ar pieslēgšanos" + +#: ../setup/setup.ui.h:49 +msgid "The shortcut keys for switching to next input method in the list" +msgstr "Saīsņu taustiņi, lai pārslēgtos uz nākošo ievades metodi sarakstā" + +#: ../setup/setup.ui.h:50 +msgid "The shortcut keys for switching to previous input method in the list" +msgstr "" +"Saīsņu taustiņi, lai pārslēgtos uz iepriekšējo ievades metodi sarakstā" + +#: ../setup/setup.ui.h:52 +msgid "Top left corner" +msgstr "Augšējais kreisais stūris" + +#: ../setup/setup.ui.h:53 +msgid "Top right corner" +msgstr "Augšējais labais stūris" + +#: ../setup/setup.ui.h:54 +msgid "Use custom font:" +msgstr "Lietot izvēlētu fontu:" + +#: ../setup/setup.ui.h:57 +msgid "Vertical" +msgstr "Vertikāli" + +#: ../setup/setup.ui.h:58 +msgid "When active" +msgstr "Kad aktīvs" diff --git a/po/ml.po b/po/ml.po index f24429450..7d4006581 100644 --- a/po/ml.po +++ b/po/ml.po @@ -7,12 +7,13 @@ # msgid "" msgstr "" -"Project-Id-Version: ml\n" +"Project-Id-Version: ibus.master.ml\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-05-06 12:49+0530\n" +"POT-Creation-Date: 2011-02-12 00:41+0900\n" +"PO-Revision-Date: 2010-08-02 17:16+0530\n" "Last-Translator: \n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -23,16 +24,14 @@ msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus ഇന്‍പുട്ട് മെഥേഡ് ആകൃതി" +msgstr "ഇന്‍പുട്ട് മെഥേഡ് ആകൃതി" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus ഇന്‍പുട്ട് മെഥേഡ് ആകൃതി" +msgstr "IBus ഇന്‍പുട്ട് മെഥേഡ് ആകൃതി ആരംഭിയ്ക്കുക" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -44,15 +43,15 @@ msgstr "" msgid "Other" msgstr "മറ്റുള്ളവ" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "മുമ്പുള്ള താള്‍:" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "അടുത്ത താള്‍" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." @@ -60,91 +59,99 @@ msgstr "" "ചില ഇന്‍പുട്ട് മെഥേഡുകള്‍ക്കു് ചില മാറ്റങ്ങള്‍ വരുത്തിയിട്ടുണ്ടു്. ദയവായി ibus ഇന്‍പുട്ട് പ്ലാറ്റ്ഫോം " "വീണ്ടും ആരംഭിക്കുക." -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 msgid "Restart Now" msgstr "വീണ്ടും ഉടന്‍ ആരംഭിക്കുക" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 msgid "Later" msgstr "പിന്നീടു്" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "IBus ഇന്‍പുട്ട് മെഥേഡ് ആകൃതി" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "വീണ്ടും ആരംഭിക്കുക" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 msgid "Turn off input method" msgstr "ഇന്‍പുട്ട് മെഥേഡ് ഓഫ് ചെയ്യുക" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "ഇന്‍പുട്ട് ജാലകം ലഭ്യമല്ല" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "ലിനക്സ്/യുണിക്സിനുള്ള ഇന്റലിജന്റ് ഇന്‍പുട്ട് ബസാണു് IBus." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "അനി പീറ്റര്‍ " -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "ഇന്‍പുട്ട് മെഥേഡ് സംബന്ധിച്ചു്" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "ഇന്‍പുട്ട് മെഥേഡ് മാറ്റുക" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "സംബന്ധിച്ചു്" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "ഇന്‍പുട്ട് മെഥേഡ് സംബന്ധിച്ചു്" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "ഭാഷ: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "കീബോര്‍ഡ് മാതൃക: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "രചയിതാവു്: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "വിവരണം:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "ട്രിഗ്ഗര്‍ ചെയ്യുക" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "" + +#: ../setup/main.py:135 msgid "next input method" msgstr "അടുത്ത ഇന്‍പുട്ട് മെഥേഡ്" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "മുമ്പുള്ള ഇന്‍പുട്ട് മെഥേഡ്" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus ഡെമണ്‍ ആരംഭിച്ചിട്ടില്ല. നിങ്ങള്‍ക്കിതു് ഉടന്‍ ആരംഭിക്കണമോ?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" "IBus has been started! If you can not use IBus, please add below lines in " "$HOME/.bashrc, and relogin your desktop.\n" @@ -158,24 +165,24 @@ msgstr "" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "%s-നുള്ള കീബോര്‍ഡ് എളുപ്പവഴി തെരഞ്ഞെടുക്കുക" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "കീബോര്‍ഡ് എളുപ്പവഴികള്‍" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "കീ കോഡ്:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "മോഡിഫയറുകള്‍:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -183,7 +190,7 @@ msgstr "" "ദയവായി ഒരു കീ അമര്‍ത്തുക (അല്ലെങ്കില്‍ ഒരു കീ കൂട്ട്).\n" "കീ റിലീസ് ചെയ്യുമ്പോള്‍ ഡയലോഗ് അടയ്ക്കുന്നു." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "ദയവായി ഒരു കീ അമര്‍ത്തുക (അല്ലെങ്കില്‍ ഒരു കീ കൂട്ട്)" @@ -192,22 +199,21 @@ msgid "Select an input method" msgstr "ഒരു ഇന്‍പുട്ട് മെഥേഡ് തെരഞ്ഞെടുക്കുക" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "ഇന്‍പുട്ട് മെഥേഡ്" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus മുന്‍ഗണനകള്‍" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "IBus മുന്‍ഗണനകള്‍" +msgstr "IBus മുന്‍ഗണനകള്‍ സജ്ജമാക്കുക" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -230,13 +236,12 @@ msgid "Embed Preedit Text in Application Window" msgstr "പ്രയോഗത്തിനുള്ള ജാലകത്തില്‍ പ്രീഎഡിറ്റ് ടെക്സ്റ്റ് ചേര്‍ക്കുക" #: ../data/ibus.schemas.in.h:6 -#, fuzzy msgid "Enable input method by default" -msgstr "അടുത്ത ഇന്‍പുട്ട് മെഥേഡ്" +msgstr "സ്വതവേ ഇന്‍പുട്ട് മെഥേഡ് സജ്ജമാക്കുക" #: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default when the application gets input focus" -msgstr "" +msgstr "പ്രയോഗത്തിലേക്കു് ഇന്‍പുട്ട് ചെയ്യുവാന്‍ സാധിയ്ക്കുമ്പോള്‍ സ്വതവേ ഇന്‍പുട്ട് മെഥേഡ് സജ്ജമാക്കുക" #: ../data/ibus.schemas.in.h:8 msgid "Language panel position" @@ -266,11 +271,11 @@ msgstr "ibus ആരംഭിക്കുമ്പോള്‍ സംവിധാ msgid "Prev engine shortcut keys" msgstr "തൊട്ടു് മുമ്പുള്ള സംവിധാനത്തിനുള്ള എളുപ്പവഴികള്‍" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "എല്ലാ പ്രയോഗങ്ങളിലും ഒരേ ഇന്‍പുട്ട് രീതി ഉപയോഗിക്കുക" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "സിസ്റ്റം ട്രേയില്‍ ചിഹ്നം കാണിക്കുക" @@ -278,7 +283,7 @@ msgstr "സിസ്റ്റം ട്രേയില്‍ ചിഹ്നം msgid "Show input method name" msgstr "ഇന്‍പുട്ട് മെഥേഡിന്റെ പേരു് കാണിക്കുക" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "ഭാഷയുടെ പാനലില്‍ ഇന്‍പുട്ട് മെഥേഡിന്റെ പേരു് കാണിക്കുക" @@ -299,19 +304,14 @@ msgstr "" "കോണ്‍, 3 = താഴെ വലതു് കോണ്‍, 4 = യഥേഷ്ടം" #: ../data/ibus.schemas.in.h:21 -#, fuzzy msgid "The shortcut keys for switching to the next input method in the list" -msgstr "" -"അടുത്ത ഇന്‍പുട്ട് മെഥേഡ് സംവിധാനത്തിലേക്ക് മാറ്റുന്നതിനായി അടുത്ത സംവിധാനത്തിനുള്ള എളുപ്പവഴി" +msgstr "പട്ടികയിലുള്ള അടുത്ത ഇന്‍പുട്ട് മെഥേഡ് സംവിധാനത്തിലേക്ക് മാറ്റുന്നതിനുള്ള എളുപ്പവഴി" #: ../data/ibus.schemas.in.h:22 -#, fuzzy msgid "The shortcut keys for switching to the previous input method" -msgstr "" -"മുമ്പുള്ള ഇന്‍പുട്ട് മെഥേഡ് സംവിധാനത്തിലേക്ക് മാറ്റുന്നതിനായി തൊട്ടു് മുമ്പുള്ള സംവിധാനത്തിനുള്ള " -"എളുപ്പവഴി" +msgstr "മുമ്പുള്ള ഇന്‍പുട്ട് മെഥേഡ് സംവിധാനത്തിലേക്ക് മാറുന്നതിനുള്ള എളുപ്പവഴി" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "ഇന്‍പുട്ട് മെഥേഡ് ഓണ്‍ അല്ലെങ്കില്‍ ഓഫ് ചെയ്യുന്നതിനുള്ള എളുപ്പവളികള്‍ സജ്ജമാക്കുക" @@ -331,11 +331,11 @@ msgstr "ഭാഷ്ക്കുള്ള പാനലില്‍ നിങ് msgid "Use global input method" msgstr "ഗ്ലോബല്‍ ഇന്‍പുട്ട് മെഥേഡ് ഉപയോഗിക്കുക" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "സിസ്റ്റം കീബോര്‍ഡ് (XKB) മാതൃക ഉപയോഗിക്കുക" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "സിസ്റ്റം കീബോര്‍ഡ് മാതൃക ഉപയോഗിക്കുക" @@ -416,104 +416,112 @@ msgid "Custom" msgstr "യഥേഷ്ടം:" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "പ്രയോഗത്തിനുള്ള ജാലകത്തില്‍ പ്രീഎഡിറ്റ് ടെക്സ്റ്റ് ചേര്‍ക്കുക" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "പ്രയോഗത്തിനുള്ള ജാലകത്തില്‍ പ്രീഎഡിറ്റ് ടെക്സ്റ്റിനുള്ള ഇന്‍പുട്ട് രീകി ചേര്‍ക്കുക" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "മെനുവില്‍ ഉള്‍പ്പെടുത്തുക" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "സജ്ജമാക്കുക അല്ലെങ്കില്‍ നിര്‍ജ്ജീവമാക്കുക:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "സാധാരണ" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "കുറുകെയുള്ള" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "ഭാഷയുടെ പാനല്‍ സ്ഥാനം:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "സജ്ജമാക്കിയ ഇന്‍പുട്ട് മെഥേഡുകളില്‍ നിന്നും തെരഞ്ഞെടുത്ത ഇന്‍പുട്ട് മെഥേഡ് താഴേക്ക് നീക്കുക" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "സജ്ജമാക്കിയ ഇന്‍പുട്ട് മെഥേഡുകളില്‍ നിന്നും തെരഞ്ഞെടുത്ത ഇന്‍പുട്ട് മെഥേഡ് മുകളിലേക്ക് നീക്കുക" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "അടുത്ത ഇന്‍പുട്ട് മെഥേഡ്:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "മുമ്പുള്ള ഇന്‍പുട്ട് മെഥേഡ്:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "സജ്ജമാക്കിയ ഇന്‍പുട്ട് മെഥേഡുകളില്‍ നിന്നും തെരഞ്ഞെടുത്ത ഇന്‍പുട്ട് മെഥേഡ് നീക്കം ചെയ്യുക" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "ibus ഭാഷയുടെ പാനല്‍ കാണിക്കണമോ വേണ്ടയോ എന്നതു് സജ്ജമാക്കുക" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "ലുക്കപ്പ് പട്ടികയില്‍ ലഭ്യമായവയുടെ ക്രമീകരണം സജ്ജമാക്കുക" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "തെരഞ്ഞെടുത്ത ഇന്‍പുട്ട് മെഥേഡിനെപ്പറ്റിയുള്ള വിവരങ്ങള്‍ കാണിക്കുക" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "ചെക്ക്ബോക്സ് ചെക്ക് ചെയ്യുമ്പോള്‍ ഭാഷയുടെ പാനലില്‍ ഇന്‍പുട്ട് മെഥേഡിന്റെ പേരു് കാണിക്കുക" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "ഭാഷയുടെ പാനല്‍ കാണിക്കുക:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "പ്രവേശിക്കുമ്പോള്‍ തന്നെ ibus ആരംഭിക്കുക" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "" "അടുത്ത ഇന്‍പുട്ട് മെഥേഡ് സംവിധാനത്തിലേക്ക് മാറ്റുന്നതിനായി അടുത്ത സംവിധാനത്തിനുള്ള എളുപ്പവഴി" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "" "മുമ്പുള്ള ഇന്‍പുട്ട് മെഥേഡ് സംവിധാനത്തിലേക്ക് മാറ്റുന്നതിനായി തൊട്ടു് മുമ്പുള്ള സംവിധാനത്തിനുള്ള " "എളുപ്പവഴി" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "മുകളില്‍ ഇടതു് കോണ്‍ " -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "മുകളില്‍ വലതു് കോണ്‍ " -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "സജ്ജമാക്കിയ അക്ഷരസഞ്ചയം ഉപയോഗിക്കുക:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "നേരെയുള്ള" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "സജീവമാകുമ്പോള്‍" diff --git a/po/mr.po b/po/mr.po index 77d88b355..78ebc147f 100644 --- a/po/mr.po +++ b/po/mr.po @@ -1,37 +1,38 @@ # translation of mr.po to Marathi +# Marathi translation of ibus. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# This file is distributed under the same license as the ibus package. # -# Sandeep Shedmake , 2010. +# Sandeep Shedmake , 2010-2011. msgid "" msgstr "" "Project-Id-Version: mr\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-05-06 12:13+0530\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-03-08 12:32+0900\n" +"PO-Revision-Date: 2011-03-22 15:23+0000\n" "Last-Translator: Sandeep Shedmake \n" -"Language-Team: Marathi \n" +"Language-Team: Marathi \n" +"Language: mr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" -"Plural-Forms: nplurals=2; plural=(n!=1);\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + #: ../bus/ibus.desktop.in.h:1 msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus इन्पुट पद्धती मांडणी" +msgstr "इन्पुट पद्धत फ्रेमवर्क" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus इन्पुट पद्धती मांडणी" +msgstr "IBus इन्पुट पद्धती फ्रेमवर्क सुरू करा" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -43,140 +44,146 @@ msgstr "" msgid "Other" msgstr "इतर" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "पूर्वीचे पान" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "पुढचे पान" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" -"काहिक इंपुट पद्धत प्रतिष्ठापीत, काढून टाकले किंवा सुधारीत केले आहे. कृपया ibus इंपुट " -"प्लॅटफॉर्म पुनः सुरू करा." +"काहिक इंपुट पद्धत प्रतिष्ठापीत, काढून टाकले किंवा सुधारीत केले आहे. कृपया " +"ibus इंपुट प्लॅटफॉर्म पुनः सुरू करा." -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 msgid "Restart Now" msgstr "आत्ता पुनः सुरू करा" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 msgid "Later" msgstr "पुढे" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" -msgstr "IBus इन्पुट पद्धती मांडणी" +msgstr "IBus इन्पुट पद्धती फ्रेमवर्क" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "पुन्हा चालू करा" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 msgid "Turn off input method" msgstr "इंपुट पद्धत बंद करा" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "इंपुट खिडकी आढळली नाही" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "Linux/Unix करीता IBus हे एक हुशार इनपुट बस आहे." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "" -"संदिप शेडमाके , 2009; संदिप शेडमाके , 2009, 2010." +"संदिप शेडमाके , 2009; संदिप शेडमाके " +", 2009, 2010." -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "इंपुट पद्धत विषयी" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "इंपुट पद्धत बदला" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "विषयी" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "इंपुट पद्धत विषयी" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "भाषा: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "कळफलक मांडणी: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "लेखक: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "वर्णन:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "ट्रिगर" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "सुरू करा" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "बंद करा" + +#: ../setup/main.py:135 msgid "next input method" msgstr "पुढिल इंपुट पद्धत" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "मागील इंपुट पद्धत" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus डिमन सुरू केले गेले नाही. तुम्हाला आता सुरू करायचे?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus सुरू केले गेले आहे! तुम्ही IBus चा वापर करत नसल्यास, कृपया खालिल ओळ $HOME/.bashrc " -"अंतर्गत समावेष करा, व पुन्हा डेस्कटॉपवर पुन्हा प्रवेश करा.\n" +"IBus सुरू केले गेले आहे! तुम्ही IBus चा वापर करत नसल्यास, कृपया खालिल ओळ $HOME/.bashrc अंतर्गत समावेष करा, व पुन्हा डेस्कटॉपवर पुन्हा प्रवेश करा.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "%s करीता कळफलक शार्टकट नीवडा" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "कळफलक शार्टकट" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "कि कोड:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "मॉडिफायर:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -184,7 +191,7 @@ msgstr "" "कृपया कि (किंवा कि जोडणी) दाबा.\n" "कि सोडल्यावर संवाद बंद होईल." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "कृपया कि (किंवा कि जोडणी) दाबा" @@ -193,22 +200,21 @@ msgid "Select an input method" msgstr "इंपुट पद्धत नीवडा" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "इंपुट पद्धत" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus आवड निवड" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "IBus आवड निवड" +msgstr "IBus पसंती सुरू करा" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -223,115 +229,131 @@ msgid "Custom font name for language panel" msgstr "भाषा पटल करीता स्वपसंत फॉन्ट नाव" #: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "शार्टकट किज् बंद करा" + +#: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text" msgstr "प्रिएडीट मजकूर एम्बेड करा" -#: ../data/ibus.schemas.in.h:5 +#: ../data/ibus.schemas.in.h:6 msgid "Embed Preedit Text in Application Window" msgstr "ऍप्लिकेशन पटलात प्रिएडीट मजकूर एम्बेड करा" -#: ../data/ibus.schemas.in.h:6 -#, fuzzy +#: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default" -msgstr "पुढिल इंपुट पद्धत" +msgstr "पूर्वनितर्धारीतपणे इंपुट पद्धत सुरू करा" -#: ../data/ibus.schemas.in.h:7 +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "" +"ऍप्लिकेशनला इंपुट फोकस प्राप्त झाल्यावर इंपुट पद्धत पूर्वनिर्धारीतपणे सुरू " +"करा" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "शार्टकट किज् सुरू करा" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "भाषा पटलचे स्थान" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" msgstr "पुढील इंजीनचे शार्टकट किज्" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "लुकअप टेबलचे निर्देशन" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "लुकअप टेबलचे निर्देशन. 0 = Horizontal, 1 = Vertical" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "प्रीलोड इंजीन्स्" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "ibus सुरू होतेवेळी इंजीन आधिपासूनच लोड करा" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" msgstr "मागील इंजीनचे शॉर्टकट किज्" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "सर्व ऍप्लिकेशन्स् मध्ये एकसारखेच इंपुट पद्धत शेअर करा" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "चिन्ह प्रणाली ट्रेवर दाखवा" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "इंपुट पद्धतीचे नाव दाखवा" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "भाषा पट्टीवरील इंपुट पद्धतीचे नाव दाखवा" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" -msgstr "भाषा पटलचे वर्तन. 0 = Embedded in menu, 1 = Auto hide, 2 = Always show" +msgstr "" +"भाषा पटलचे वर्तन. 0 = Embedded in menu, 1 = Auto hide, 2 = Always show" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" msgstr "" -"भाषा पटलाचे स्थान. 0 = Top left corner, 1 = Top right corner, 2 = Bottom left " -"corner, 3 = Bottom right corner, 4 = Custom" +"भाषा पटलाचे स्थान. 0 = Top left corner, 1 = Top right corner, 2 = Bottom " +"left corner, 3 = Bottom right corner, 4 = Custom" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" -msgstr "सूचीतील पुढची इंपुट पद्धत नीवडण्याकरीता वापरण्याजोगी शार्टकट किज्" +msgstr "सूचीतील पुढील इंपुट पद्धत नीवडण्याकरीता वापरण्याजोगी शार्टकट किज्" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" -msgstr "सूचीतील मागील इंपुट पद्धत नीवडण्याकरीता वापरण्याजोगी शार्टकट किज्" +msgstr "मागील इंपुट पद्धत नीवडण्याकरीता वापरण्याजोगी शार्टकट किज्" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "इंपुट पद्धती बंद करण्यासाठी शार्टकट किज्" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "इंपुट पद्धती सुरू करण्यासाठी शार्टकट किज्" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "इंपुट पद्धत सुरू किंवा बंद करण्यासाठी शार्टकट किज्" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "शॉर्टकट किज् ट्रिगर करा" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "स्वपसंत फॉन्ट वापरा" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "भाषा पटल करीत स्वपसंत फॉन्ट नाव वापरा" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "ग्लोबल इंपुट पद्धत नीवडा" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "प्रणाली कळफलक (XKB) मांडणीचा वापर करा" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "प्रणाली कळफलक मांडणीचा वापर करा" @@ -412,101 +434,109 @@ msgid "Custom" msgstr "मनपसंत" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "बंद करा:" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "ऍप्लिकेशन पटलात प्रिएडीट मजूकर एम्बेड करा" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "ऍप्लिकेशन पटलात इंपुट पद्धतीचे प्रिएडीट मजकूर एम्बेड करा" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "मेन्यू मध्ये एम्बेड केले" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "कार्यान्वीत करा किंवा अकार्यान्वीत करा:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "सुरू करा:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "सर्वसाधारण" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "आडवे" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "भाषा पटलाचे स्थान:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "कार्यक्षम इंपुट पद्धतींमध्ये नीवडलेली इंपुट पद्धत खाली सरकवा" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "कार्यक्षम इंपुट पद्धतींमध्ये नीवडलेली इंपुट पद्धत वर सरकवा" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "पुढची इंपुट पद्धत:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "मागील इंपुट पद्धत:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "कार्यक्षम इंपुट पद्धतीपासून नीवडलेली इंपुट पद्धत काढून टाका" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "भाषा पट्टी कसे दाखवायचे किंवा लपवायचे यासाठी ibus चे वर्तन ठरवा" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "लुकअप टेबल मधील घटकांचे निर्देशन ठरवा" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "नीवडलेल्या इंपुट पद्धत विषयी माहिती दाखवा" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "चेकबॉक्स नीवडल्यानंतर भाषा पट्टीवरील इंपुट पद्धतीचे नाव दाखवा" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "भाषा पटल दाखवा:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "प्रवेशवेळी ibus सुरू करा" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "सूचीतील पुढची इंपुट पद्धत नीवडण्याकरीता वापरण्याजोगी शार्टकट किज्" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "सूचीतील मागील इंपुट पद्धत नीवडण्याकरीता वापरण्याजोगी शार्टकट किज्" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "वरील डावा कोपरा" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "वरील उजवा कोपरा" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "मनपसंत फॉन्टचा वापर करा:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "उभे" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "सक्रीय असल्यावर" diff --git a/po/nl.po b/po/nl.po new file mode 100644 index 000000000..43b4388d4 --- /dev/null +++ b/po/nl.po @@ -0,0 +1,555 @@ +# translation of nl.po to Dutch +# Dutch translation of ibus. +# This file is distributed under the same license as the ibus package. +# +# Geert Warrink , 2011. +msgid "" +msgstr "" +"Project-Id-Version: IBus\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-05-13 15:18+0000\n" +"Last-Translator: warrink \n" +"Language-Team: Dutch (http://www.transifex.net/projects/p/fedora/team/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + + +#: ../bus/ibus.desktop.in.h:1 +msgid "IBus" +msgstr "IBus" + +#: ../bus/ibus.desktop.in.h:2 +msgid "Input Method Framework" +msgstr "Invoer methode kader" + +#: ../bus/ibus.desktop.in.h:3 +msgid "Start IBus Input Method Framework" +msgstr "Start IBus invoer methode kader" + +#: ../ibus/_config.py.in:40 +msgid "" +"Copyright (c) 2007-2010 Peng Huang\n" +"Copyright (c) 2007-2010 Red Hat, Inc." +msgstr "" +"Copyright (c) 2007-2010 Peng Huang\n" +"Copyright (c) 2007-2010 Red Hat, Inc." + +#: ../ibus/lang.py:41 +msgid "Other" +msgstr "Andere" + +#: ../ui/gtk/candidatepanel.py:264 +msgid "Previous page" +msgstr "Vorige pagina" + +#: ../ui/gtk/candidatepanel.py:269 +msgid "Next page" +msgstr "Volgende pagina" + +#: ../ui/gtk/main.py:62 +msgid "" +"Some input methods have been installed, removed or updated. Please restart " +"ibus input platform." +msgstr "" +"Sommige invoermethoden zijn geïnstalleerd, verwijderd of bijgewerkt. Start " +"ibus invoer platform opnieuw op." + +#: ../ui/gtk/main.py:66 +msgid "Restart Now" +msgstr "Nu opnieuw opstarten" + +#: ../ui/gtk/main.py:67 +msgid "Later" +msgstr "Later" + +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "IBus paneel" + +#: ../ui/gtk/panel.py:122 +msgid "IBus input method framework" +msgstr "IBus invoermethode kader" + +#: ../ui/gtk/panel.py:352 +msgid "Restart" +msgstr "Opnieuw starten" + +#: ../ui/gtk/panel.py:439 +msgid "Turn off input method" +msgstr "Schakel invoer methode uit" + +#: ../ui/gtk/panel.py:478 +msgid "No input window" +msgstr "Geen input venster" + +#: ../ui/gtk/panel.py:509 +msgid "IBus is an intelligent input bus for Linux/Unix." +msgstr "IBus is een intelligente invoer bus voor Linux/Unix." + +#: ../ui/gtk/panel.py:513 +msgid "translator-credits" +msgstr "Geert Warrink" + +#: ../ui/gtk/languagebar.py:106 +msgid "About the input method" +msgstr "Over de invoer methode" + +#: ../ui/gtk/languagebar.py:214 +msgid "Switch input method" +msgstr "Schakel invoer methode om" + +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 +msgid "About" +msgstr "Over" + +#: ../ui/gtk/languagebar.py:361 +msgid "About the Input Method" +msgstr "Over de invoer methode" + +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 +#, python-format +msgid "Language: %s\n" +msgstr "Taal: %s\n" + +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#, python-format +msgid "Keyboard layout: %s\n" +msgstr "Toetsenbordindeling: %s\n" + +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#, python-format +msgid "Author: %s\n" +msgstr "Auteur: %s\n" + +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +msgid "Description:\n" +msgstr "Beschrijving:\n" + +#: ../setup/main.py:102 +msgid "trigger" +msgstr "trigger" + +#: ../setup/main.py:113 +msgid "enable" +msgstr "aanzetten" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "uitzetten" + +#: ../setup/main.py:135 +msgid "next input method" +msgstr "volgende invoermethode" + +#: ../setup/main.py:146 +msgid "previous input method" +msgstr "vorige invoermethode" + +#: ../setup/main.py:286 +msgid "IBus daemon is not started. Do you want to start it now?" +msgstr "IBus daemon was niet gestart. Wil je het nu starten?" + +#: ../setup/main.py:301 +msgid "" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" +" export GTK_IM_MODULE=ibus\n" +" export XMODIFIERS=@im=ibus\n" +" export QT_IM_MODULE=ibus" +msgstr "" +"IBus is gestart! Als je IBus niet kunt gebruiken, voeg dan de onderstaande regels toe aan $HOME/.bashrc, en log opnieuw in op je bureaublad.\n" +" export GTK_IM_MODULE=ibus\n" +" export XMODIFIERS=@im=ibus\n" +" export QT_IM_MODULE=ibus" + +#: ../setup/main.py:316 +#, python-format +msgid "Select keyboard shortcut for %s" +msgstr "Selecteer sneltoets voor %s" + +#: ../setup/keyboardshortcut.py:52 +msgid "Keyboard shortcuts" +msgstr "Sneltoetsen" + +#: ../setup/keyboardshortcut.py:63 +msgid "Key code:" +msgstr "Toetscode:" + +#: ../setup/keyboardshortcut.py:78 +msgid "Modifiers:" +msgstr "Modificatietoetsen:" + +#: ../setup/keyboardshortcut.py:231 +msgid "" +"Please press a key (or a key combination).\n" +"The dialog will be closed when the key is released." +msgstr "" +"Druk op een toets (of een toetsencombinatie).\n" +"De dialoog wordt afgesloten als de toets losgelaten wordt." + +#: ../setup/keyboardshortcut.py:233 +msgid "Please press a key (or a key combination)" +msgstr "Druk op een toets (of een toetsencombinatie)" + +#: ../setup/enginecombobox.py:120 +msgid "Select an input method" +msgstr "Selecteer een invoermethode" + +#. create im name & icon column +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 +msgid "Input Method" +msgstr "Invoermethode" + +#: ../setup/enginetreeview.py:92 +msgid "Kbd" +msgstr "Toetsenbord" + +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 +msgid "IBus Preferences" +msgstr "IBus voorkeuren" + +#: ../setup/ibus-setup.desktop.in.h:2 +msgid "Set IBus Preferences" +msgstr "Stel IBus voorkeuren in" + +#: ../data/ibus.schemas.in.h:1 +msgid "Auto hide" +msgstr "Automatisch verbergen" + +#: ../data/ibus.schemas.in.h:2 +msgid "Custom font" +msgstr "Aangepaste lettertype" + +#: ../data/ibus.schemas.in.h:3 +msgid "Custom font name for language panel" +msgstr "Aangepaste lettertype naam voor taal-paneel" + +#: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "Zet sneltoetsen uit" + +#: ../data/ibus.schemas.in.h:5 +msgid "Embed Preedit Text" +msgstr "Voeg pre-edit tekst in" + +#: ../data/ibus.schemas.in.h:6 +msgid "Embed Preedit Text in Application Window" +msgstr "Voeg pre-edit tekst in in toepassingsvenster" + +#: ../data/ibus.schemas.in.h:7 +msgid "Enable input method by default" +msgstr "Zet invoer-methode standaard aan" + +#: ../data/ibus.schemas.in.h:8 +msgid "Enable input method by default when the application gets input focus" +msgstr "Zet invoer-methode standaard aan als de toepassing input focus krijgt" + +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "Zet sneltoetsen aan" + +#: ../data/ibus.schemas.in.h:10 +msgid "Language panel position" +msgstr "Taal-paneel positie" + +#: ../data/ibus.schemas.in.h:11 +msgid "Next engine shortcut keys" +msgstr "Volgende engine sneltoetsen" + +#: ../data/ibus.schemas.in.h:12 +msgid "Orientation of lookup table" +msgstr "Oriëntatie van opzoektabel" + +#: ../data/ibus.schemas.in.h:13 +msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" +msgstr "Oriëntatie van opzoektabel. 0 = horizontaal, 1 = verticaal" + +#: ../data/ibus.schemas.in.h:14 +msgid "Preload engines" +msgstr "Engines voor-laden" + +#: ../data/ibus.schemas.in.h:15 +msgid "Preload engines during ibus starts up" +msgstr "Engines voor-laden tijdens opstarten van ibus" + +#: ../data/ibus.schemas.in.h:16 +msgid "Prev engine shortcut keys" +msgstr "Vorige engine sneltoetsen" + +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 +msgid "Share the same input method among all applications" +msgstr "Deel dezelfde input-methode voor alle toepassingen" + +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +msgid "Show icon on system tray" +msgstr "Toon icoon op systeemvak" + +#: ../data/ibus.schemas.in.h:19 +msgid "Show input method name" +msgstr "Toon naam van invoermethode" + +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 +msgid "Show input method name on language bar" +msgstr "Toon naam van invoermethode op taalbalk" + +#: ../data/ibus.schemas.in.h:21 +msgid "" +"The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " +"Always show" +msgstr "" +"Het gedrag van het taal paneel. 0 = Ingebed in het menu, 1 = Automatisch " +"verbergen, 2 = Altijd tonen" + +#: ../data/ibus.schemas.in.h:22 +msgid "" +"The position of the language panel. 0 = Top left corner, 1 = Top right " +"corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" +msgstr "" +"De positie van de taal paneel. 0 = linksboven, 1 = rechtsboven, 2 = " +"linksonder, 3 = rechtsonder, 4 = aangepast" + +#: ../data/ibus.schemas.in.h:23 +msgid "The shortcut keys for switching to the next input method in the list" +msgstr "" +"De sneltoetsen voor het omschakelen naar de volgende invoermethode in de " +"lijst" + +#: ../data/ibus.schemas.in.h:24 +msgid "The shortcut keys for switching to the previous input method" +msgstr "De sneltoetsen voor het omschakelen naar de vorige invoermethode" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "De sneltoetsen om invoermethode uit te zetten" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "De sneltoetsen om invoermethode aan te zetten" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 +msgid "The shortcut keys for turning input method on or off" +msgstr "De sneltoetsen om invoermethode aan of uit te zetten" + +#: ../data/ibus.schemas.in.h:28 +msgid "Trigger shortcut keys" +msgstr "Trigger sneltoetsen" + +#: ../data/ibus.schemas.in.h:29 +msgid "Use custom font" +msgstr "Gebruik aangepast lettertype" + +#: ../data/ibus.schemas.in.h:30 +msgid "Use custom font name for language panel" +msgstr "Gebruik aangepaste lettertype naam voor taal-paneel" + +#: ../data/ibus.schemas.in.h:31 +msgid "Use global input method" +msgstr "Gebruik globale invoermethode" + +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 +msgid "Use system keyboard (XKB) layout" +msgstr "Gebruik systeem toetsenbord (XKB) indeling" + +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 +msgid "Use system keyboard layout" +msgstr "Gebruik systeem toetsenbordindeling" + +#: ../setup/setup.ui.h:1 +msgid "..." +msgstr "..." + +#: ../setup/setup.ui.h:2 +msgid "Font and Style" +msgstr "Lettertype en stijl" + +#: ../setup/setup.ui.h:3 +msgid "Global input method settings" +msgstr "Globale invoermethode instellingen" + +#: ../setup/setup.ui.h:4 +msgid "Keyboard Layout" +msgstr "Toetsenbordindeling" + +#: ../setup/setup.ui.h:5 +msgid "Keyboard Shortcuts" +msgstr "Sneltoetsen" + +#: ../setup/setup.ui.h:6 +msgid "Startup" +msgstr "Opstarten" + +#: ../setup/setup.ui.h:7 +msgid "" +"IBus\n" +"The intelligent input bus\n" +"Homepage: http://code.google.com/p/ibus\n" +"\n" +"\n" +"\n" +msgstr "" +"IBus\n" +"De intelligente invoer bus\n" +"Homepagina: http://code.google.com/p/ibus\n" +"\n" +"\n" +"\n" + +#: ../setup/setup.ui.h:14 +msgid "" +"The default input method is the top one in the list.\n" +"You may use up/down buttons to change it." +msgstr "" +"De standaard invoermethode is de bovenste in de lijst.\n" +"je kunt op/neer toetsen gebruiken om dit te veranderen." + +#: ../setup/setup.ui.h:17 +msgid "Add the selected input method into the enabled input methods" +msgstr "" +"Voeg de geselecteerde invoermethode toe aan de ingeschakelde invoermethoden" + +#: ../setup/setup.ui.h:18 +msgid "Advanced" +msgstr "Geavanceerd" + +#: ../setup/setup.ui.h:19 +msgid "Always" +msgstr "Altijd" + +#: ../setup/setup.ui.h:20 +msgid "Bottom left corner" +msgstr "Linksonder" + +#: ../setup/setup.ui.h:21 +msgid "Bottom right corner" +msgstr "Rechtsonder" + +#: ../setup/setup.ui.h:22 +msgid "Candidates orientation:" +msgstr "Kandidaten oriëntatie:" + +#: ../setup/setup.ui.h:23 +msgid "Custom" +msgstr "Aangepast" + +#: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "Uitzetten:" + +#: ../setup/setup.ui.h:25 +msgid "Embed preedit text in application window" +msgstr "Insluiten van pre-edit tekst in toepassingsvenster" + +#: ../setup/setup.ui.h:26 +msgid "Embed the preedit text of input method in the application window" +msgstr "" +"Sluit de pre-edit tekst van invoermethode in in het toepassingsvenster" + +#: ../setup/setup.ui.h:27 +msgid "Embedded in menu" +msgstr "Ingebed in menu" + +#: ../setup/setup.ui.h:28 +msgid "Enable or disable:" +msgstr "Aan- of uitzetten:" + +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "Aanzetten:" + +#: ../setup/setup.ui.h:30 +msgid "General" +msgstr "Algemeen" + +#: ../setup/setup.ui.h:31 +msgid "Horizontal" +msgstr "Horizontaal" + +#: ../setup/setup.ui.h:34 +msgid "Language panel position:" +msgstr "Taal panel positie:" + +#: ../setup/setup.ui.h:35 +msgid "Move down the selected input method in the enabled input methods" +msgstr "" +"Verplaats de geselecteerde invoermethode omlaag in de aangezette " +"invoermethoden lijst" + +#: ../setup/setup.ui.h:36 +msgid "Move up the selected input method in the enabled input methods list" +msgstr "" +"Verplaats de geselecteerde invoermethode omhoog in de aangezette " +"invoermethoden lijst" + +#: ../setup/setup.ui.h:37 +msgid "Next input method:" +msgstr "Volgende invoermethode:" + +#: ../setup/setup.ui.h:38 +msgid "Previous input method:" +msgstr "Vorige invoermethode:" + +#: ../setup/setup.ui.h:39 +msgid "Remove the selected input method from the enabled input methods" +msgstr "" +"Verwijder de geselecteerde invoermethode uit de aangezette invoermethoden" + +#: ../setup/setup.ui.h:40 +msgid "Set the behavior of ibus how to show or hide language bar" +msgstr "" +"Stel het gedrag van ibus in voor het tonen of verbergen van de taalbalk" + +#: ../setup/setup.ui.h:41 +msgid "Set the orientation of candidates in lookup table" +msgstr "Stel de oriëntatie in van de kandidaten in de opzoektabel" + +#: ../setup/setup.ui.h:44 +msgid "Show information of the selected input method" +msgstr "Toon informatie over de geselecteerde invoermethode" + +#: ../setup/setup.ui.h:46 +msgid "Show input method's name on language bar when check the checkbox" +msgstr "" +"Toon de naam van de invoermethode op de taalbalk als je het selectievakje " +"aanvinkt" + +#: ../setup/setup.ui.h:47 +msgid "Show language panel:" +msgstr "Toon taal paneel:" + +#: ../setup/setup.ui.h:48 +msgid "Start ibus on login" +msgstr "Start ibus bij inloggen" + +#: ../setup/setup.ui.h:49 +msgid "The shortcut keys for switching to next input method in the list" +msgstr "" +"De sneltoetsen voor het schakelen naar de volgende invoermethode in de lijst" + +#: ../setup/setup.ui.h:50 +msgid "The shortcut keys for switching to previous input method in the list" +msgstr "" +"De sneltoetsen voor het schakelen naar de vorige invoermethode in de lijst" + +#: ../setup/setup.ui.h:52 +msgid "Top left corner" +msgstr "Linksboven" + +#: ../setup/setup.ui.h:53 +msgid "Top right corner" +msgstr "Rechtsboven" + +#: ../setup/setup.ui.h:54 +msgid "Use custom font:" +msgstr "Gebruik aangepast lettertype:" + +#: ../setup/setup.ui.h:57 +msgid "Vertical" +msgstr "Verticaal" + +#: ../setup/setup.ui.h:58 +msgid "When active" +msgstr "Als deze actief is" diff --git a/po/or.po b/po/or.po index 3ab4c3c84..d55e2ae15 100644 --- a/po/or.po +++ b/po/or.po @@ -1,46 +1,37 @@ -# translation of or.po to Oriya +# translation of ibus.master.or.po to Oriya +# Oriya translation of ibus. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# This file is distributed under the same license as the ibus package. # -# Manoj Kumar Giri , 2009, 2010. +# Manoj Kumar Giri , 2009-2011. msgid "" msgstr "" -"Project-Id-Version: or\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-04-15 14:17+0530\n" +"Project-Id-Version: ibus.master.or\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-03-08 12:32+0900\n" +"PO-Revision-Date: 2011-03-22 15:23+0000\n" "Last-Translator: Manoj Kumar Giri \n" "Language-Team: Oriya \n" +"Language: or\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" -"Plural-Forms: nplurals=2; plural=(n!=1);\n" -"\n" -"\n" -"\n" -"\n" -"\n" -"\n" -"\n" -"\n" -"\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus ନିବେଶ ପ୍ରଣାଳୀ ଫ୍ରେମୱର୍କ" +msgstr "ନିବେଶ ପ୍ରଣାଳୀ ଫ୍ରେମୱର୍କ" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus ନିବେଶ ପ୍ରଣାଳୀ ଫ୍ରେମୱର୍କ" +msgstr "IBus ନିବେଶ ପ୍ରଣାଳୀ ଫ୍ରେମୱର୍କକୁ ଆରମ୍ଭ କରନ୍ତୁ" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -52,138 +43,145 @@ msgstr "" msgid "Other" msgstr "ଅନ୍ୟାନ୍ୟ" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "ପୂର୍ବବର୍ତ୍ତୀ ପୃଷ୍ଠା" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "ପରବର୍ତ୍ତୀ ପୃଷ୍ଠା" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" -"କିଛି ନିବେଶ ପଦ୍ଧତିକୁ ସ୍ଥାପନ କରାଯାଇଛି, କଢ଼ାଯାଇଛି ଅଥବା ଅଦ୍ୟତନ କରାଯାଇଛି। ଦୟାକରି ibus ନିବେଶ " -"ପ୍ଲାଟଫର୍ମକୁ ପୁନର୍ଚାଳନ କରନ୍ତୁ।" +"କିଛି ନିବେଶ ପଦ୍ଧତିକୁ ସ୍ଥାପନ କରାଯାଇଛି, କଢ଼ାଯାଇଛି ଅଥବା ଅଦ୍ୟତନ କରାଯାଇଛି। ଦୟାକରି " +"ibus ନିବେଶ ପ୍ଲାଟଫର୍ମକୁ ପୁନର୍ଚାଳନ କରନ୍ତୁ।" -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 msgid "Restart Now" msgstr "ବର୍ତ୍ତମାନ ପୁନଃଚାଳନ କରନ୍ତୁ" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 msgid "Later" msgstr "ପରେ" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "IBus ନିବେଶ ପ୍ରଣାଳୀ ଫ୍ରେମୱର୍କ" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "ପୁନଃଚାଳନ" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 msgid "Turn off input method" msgstr "ନିବେଶ ପ୍ରଣୀଳୀକୁ ବନ୍ଦ କରନ୍ତୁ" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "କୌଣସି ନିବେଶ ୱିଣ୍ଡୋ ନାହିଁ" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus ହେଉଛି Linux/Unix ପାଇଁ ଗୋଟିଏ ବୁଦ୍ଧିମାନ ନିବେଶ ପରିପଥ।" -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "ମନୋଜ କୁମାର ଗିରି " -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "ନିବେଶ ପ୍ରଣାଳୀ ବିଷୟରେ" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "ନିବେଶ ପ୍ରଣୀଳିକୁ ବଦଳାନ୍ତୁ" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "ବିବରଣୀ" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "ନିବେଶ ପ୍ରଣାଳୀ ବିଷୟରେ" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "ଭାଷା: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "କିବୋର୍ଡ ବିନ୍ୟାସ: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "ଲେଖକ: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "ବର୍ଣ୍ଣନା:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "ଟ୍ରିଗର" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "ସକ୍ରିୟ କରନ୍ତୁ" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "ନିଷ୍କ୍ରିୟ କରନ୍ତୁ" + +#: ../setup/main.py:135 msgid "next input method" msgstr "ପରବର୍ତ୍ତି ନିବେଶ ପ୍ରଣାଳୀ" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "ପୂର୍ବ ନିବେଶ ପ୍ରଣାଳୀ" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" -msgstr "IBus ଡେମନଟି ଆରମ୍ଭ ହୋଇନାହିଁ। ଆପଣ ଏହାକୁ ବର୍ତ୍ତମାନ ଆରମ୍ଭ କରିବାକୁ ଚାହୁଁଛନ୍ତି କି?" +msgstr "" +"IBus ଡେମନଟି ଆରମ୍ଭ ହୋଇନାହିଁ। ଆପଣ ଏହାକୁ ବର୍ତ୍ତମାନ ଆରମ୍ଭ କରିବାକୁ ଚାହୁଁଛନ୍ତି କି?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus ଆରମ୍ଭ ହୋଇସାରିଛି! ଯଦି ଆପଣ IBus ବ୍ୟବହାର କରି ନପାରନ୍ତି, ତେବେ ଦୟାକରି ନିମ୍ନଲିଖିତ ଧାଡ଼ିଗୁଡ଼ିକୁ " -"$HOME/.bashrcରେ ଯୋଗ କରନ୍ତୁ, ଏବଂ ଆପଣଙ୍କର ଡେସ୍କଟପକୁ ପୁଣି ଲଗଇନ କରନ୍ତୁ।\n" +"IBus ଆରମ୍ଭ ହୋଇସାରିଛି! ଯଦି ଆପଣ IBus ବ୍ୟବହାର କରି ନପାରନ୍ତି, ତେବେ ଦୟାକରି ନିମ୍ନଲିଖିତ ଧାଡ଼ିଗୁଡ଼ିକୁ $HOME/.bashrcରେ ଯୋଗ କରନ୍ତୁ, ଏବଂ ଆପଣଙ୍କର ଡେସ୍କଟପକୁ ପୁଣି ଲଗଇନ କରନ୍ତୁ।\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "%s ପାଇଁ କିବୋର୍ଡ ସକ୍ଷିପ୍ତପଥ ବାଛନ୍ତୁ" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "କିବୋର୍ଡ ସକ୍ଷିପ୍ତପଥ" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "କି ସଂକେତ:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "ରୂପାନ୍ତରକ:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -191,7 +189,7 @@ msgstr "" "ଦୟାକରି ଗୋଟିଏ କି (କିମ୍ବା ଗୋଟିଏ କି ସଂଯୋଜନ) ଦବାନ୍ତୁ।\n" "କିକୁ ଛାଡ଼ିଦେଲାପରେ ସଂଳାପଟି ବନ୍ଦ ହୋଇଯିବ।" -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "ଦୟାକରି ଗୋଟିଏ କି (କିମ୍ବା ଗୋଟିଏ କି ସଂଯୋଜନ) ଦବାନ୍ତୁ।" @@ -200,22 +198,21 @@ msgid "Select an input method" msgstr "ଗୋଟିଏ ନିବେଶ ପ୍ରଣୀଳୀ ବାଛନ୍ତୁ" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "ନିବେଶ ପ୍ରଣାଳୀ" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus ପସନ୍ଦ" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "IBus ପସନ୍ଦ" +msgstr "IBus ପସନ୍ଦଗୁଡ଼ିକୁ ସେଟକରନ୍ତୁ" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -230,117 +227,132 @@ msgid "Custom font name for language panel" msgstr "ଭାଷା ତାଲିକା ପାଇଁ ଇଚ୍ଛାମୁତାବକ ଅକ୍ଷରରୂପ ନାମ" #: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "ସଂକ୍ଷିପ୍ତ ପଥ କି'ଗୁଡ଼ିକୁ ନିଷ୍କ୍ରିୟ କରନ୍ତୁ" + +#: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text" msgstr "ଅନ୍ତସ୍ଥାପିତ ପ୍ରୀଡିତ ପାଠ୍ୟ" -#: ../data/ibus.schemas.in.h:5 +#: ../data/ibus.schemas.in.h:6 msgid "Embed Preedit Text in Application Window" msgstr "ପ୍ରୟୋଗ ୱିଣ୍ଡୋରେ ଅନ୍ତସ୍ଥାପିତ ପ୍ରୀଡିତ ପାଠ୍ୟ" -#: ../data/ibus.schemas.in.h:6 -#, fuzzy +#: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default" -msgstr "ପରବର୍ତ୍ତି ନିବେଶ ପ୍ରଣାଳୀ" +msgstr "ପୂର୍ବନିର୍ଦ୍ଧାରିତ ଭାବରେ ନିବେଶ ପ୍ରଣାଳୀକୁ ସକ୍ରିୟ କରନ୍ତୁ" -#: ../data/ibus.schemas.in.h:7 +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "" +"ପୂର୍ବନିର୍ଦ୍ଧାରିତ ଭାବରେ ନିବେଶ ପ୍ରଣାଳୀକୁ ସକ୍ରିୟ କରନ୍ତୁ ଯେତେବେଳେ ପ୍ରୟୋଗକୁ ନିବେଶ" +" ଲକ୍ଷ୍ଯ ମିଳିଥାଏ" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "ସଂକ୍ଷିପ୍ତ ପଥ କି'ଗୁଡ଼ିକୁ ସକ୍ରିୟ କରନ୍ତୁ" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "ଭାଷା ଫଳକ ଅବସ୍ଥାନ" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" msgstr "ପରବର୍ତ୍ତି ଯନ୍ତ୍ର ସଂକ୍ଷିପ୍ତ ପଥ କି'ଗୁଡ଼ିକ" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "ଅବଲୋକନ ସାରଣୀର ଅନୁସ୍ଥାପନ" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "ଅବଲୋକନ ସାରଣୀର ଅନୁସ୍ଥାପନ। 0 = ଭୂ-ସମାନ୍ତର, 1 = ଭୂ-ଲମ୍ବ" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "ଯନ୍ତ୍ରକୁ ପ୍ରାକ ଧାରଣ କରନ୍ତୁ" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "ibus ଆରମ୍ଭ ସମୟରେ ଯନ୍ତ୍ର ପ୍ରାକ ଧାରଣ କରନ୍ତୁ" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" msgstr "ପୂର୍ବ ଯନ୍ତ୍ରର ସଂକ୍ଷିପ୍ତ ପଥ କି'ଗୁଡ଼ିକ" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "ସମସ୍ତ ପ୍ରୟୋଗଗୁଡ଼ିକ ମଧ୍ଯରେ ଏକା ପ୍ରକାରର ନିବେଶ ପଦ୍ଧତିକୁ ସହଭାଗ କରନ୍ତୁ" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "ତନ୍ତ୍ର ଟ୍ରେରେ ଚିତ୍ରସଂକେତଗୁଡ଼ିକୁ ଦର୍ଶାନ୍ତୁ" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "ନିବେଶ ପଦ୍ଧତି ନାମ ଦର୍ଶାନ୍ତୁ" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "ଭାଷା ତାଲିକା ପାଇଁ ନିବେଶ ପଦ୍ଧତି ନାମ ଦର୍ଶାନ୍ତୁ" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" msgstr "" -"ଭାଷା ତାଲିକାର ଆଚରଣ। 0 = ତାଲିକାରେ ସନ୍ନିହିତ, 1 = ସ୍ୱୟଂଚାଳିତ ଭାବରେ ଲୁଚାନ୍ତୁ, 2 = ସର୍ବଦା " -"ଦର୍ଶାନ୍ତୁ" +"ଭାଷା ତାଲିକାର ଆଚରଣ। 0 = ତାଲିକାରେ ସନ୍ନିହିତ, 1 = ସ୍ୱୟଂଚାଳିତ ଭାବରେ ଲୁଚାନ୍ତୁ, 2 =" +" ସର୍ବଦା ଦର୍ଶାନ୍ତୁ" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" msgstr "" -"ଭାଷା ଫଳକର ଅବସ୍ଥାନ। 0 = ଉପର ପାଖ ବାମ କୋଣ, 1 = ଉପର ପାଖ ଡାହାଣ କୋଣ, 2 = ତଳ ପାଖ ବାମ " -"କୋଣ, 3 = ତଳ ପାଖ ଡ଼ାହାଣ କୋଣ, 4 = ଇଚ୍ଛାମୁତାବକ" +"ଭାଷା ଫଳକର ଅବସ୍ଥାନ। 0 = ଉପର ପାଖ ବାମ କୋଣ, 1 = ଉପର ପାଖ ଡାହାଣ କୋଣ, 2 = ତଳ ପାଖ " +"ବାମ କୋଣ, 3 = ତଳ ପାଖ ଡ଼ାହାଣ କୋଣ, 4 = ଇଚ୍ଛାମୁତାବକ" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" msgstr "ତାଲିକାରେ ପରବର୍ତ୍ତୀ ନିବେଶ ପ୍ରଣାଳୀକୁ ବଦଳାଇବା ପାଇଁ ସକ୍ଷିପ୍ତ ପଥଗୁଡ଼ିକ" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" msgstr "ତାଲିକାରେ ପୂର୍ବ ନିବେଶ ପ୍ରଣାଳୀକୁ ବଦଳାଇବା ପାଇଁ ସକ୍ଷିପ୍ତ ପଥଗୁଡ଼ିକ" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "ନିବେଶ ପଦ୍ଧତିକୁ ଅଫ କରିବା ପାଇଁ ସକ୍ଷିପ୍ତ ପଥ କି ଗୁଡ଼ିକ" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "ନିବେଶ ପଦ୍ଧତିକୁ ଅନ କରିବା ପାଇଁ ସକ୍ଷିପ୍ତ ପଥ କି ଗୁଡ଼ିକ" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "ନିବେଶ ପଦ୍ଧତିକୁ ଅନ କିମ୍ବା ଅଫ କରିବା ପାଇଁ ସକ୍ଷିପ୍ତ ପଥଗୁଡ଼ିକ" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "ସଂକ୍ଷିପ୍ତ ପଥ କି'ଗୁଡ଼ିକୁ ଟ୍ରିଗର କରନ୍ତୁ" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "ଇଚ୍ଛାମୁତାବକ ଅକ୍ଷରରୂପ ବ୍ୟବହାର କରନ୍ତୁ" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "ଭାଷା ତାଲିକା ପାଇଁ ଇଚ୍ଛାମୁତାବକ ଅକ୍ଷରରୂପ ନାମକୁ ବ୍ୟବହାର କରନ୍ତୁ" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "ସର୍ବସାଧାରଣ ନିବେଶ ପ୍ରଣୀଳୀକୁ ବ୍ୟବହାର କରନ୍ତୁ" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "ତନ୍ତ୍ର କିବୋର୍ଡ (XKB) ବିନ୍ୟାସକୁ ବ୍ୟବହାର କରନ୍ତୁ" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "ତନ୍ତ୍ର କିବୋର୍ଡ ବିନ୍ୟାସକୁ ବ୍ୟବହାର କରନ୍ତୁ" @@ -421,101 +433,110 @@ msgid "Custom" msgstr "ଇଚ୍ଛାରୂପୀ" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "ନିଷ୍କ୍ରିୟ କରନ୍ତୁ:" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "ପ୍ରୟୋଗ ୱିଣ୍ଡୋରେ ଅନ୍ତସ୍ଥାପିତ ପ୍ରୀଡିତ ପାଠ୍ୟ" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "ନିବେଶ ପଦ୍ଧତିର ପ୍ରୀଡିତ ପାଠ୍ୟକୁ ପ୍ରୟୋଗ ୱିଣ୍ଡୋରେ ଅନ୍ତସ୍ଥାପିତ କରନ୍ତୁ" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "ତାଲିକାରେ ଅନ୍ତସ୍ଥାପିତ କରନ୍ତୁ" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "ସକ୍ରିୟ ଅଥବା ନିଷ୍କ୍ରିୟ:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "ସକ୍ରିୟ କରନ୍ତୁ:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "ସାଧାରଣ" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "ଭୂ-ସମାନ୍ତରାଳ" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "ଭାଷା ଫଳକ ଅବସ୍ଥାନ:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "ସକ୍ରିୟ ନିବେଶ ପଦ୍ଧତିଗୁଡ଼ିକରେ ବଚ୍ଛିତ ନିବେଶ ପ୍ରଣୀଳୀକୁ ତଳକୁ ଘୁଞ୍ଚାନ୍ତୁ" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "ସକ୍ରିୟ ନିବେଶ ପଦ୍ଧତି ତାଲିକାରେ ବଚ୍ଛିତ ନିବେଶ ପ୍ରଣୀଳୀକୁ ଉପରକୁ ଘୁଞ୍ଚାନ୍ତୁ" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "ପରବର୍ତ୍ତି ନିବେଶ ପ୍ରଣାଳୀ:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "ପୂର୍ବ ନିବେଶ ପ୍ରଣାଳୀ:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "ସକ୍ରିୟ ନିବେଶ ପଦ୍ଧତିରୁ ବଚ୍ଛିତ ନିବେଶ ପ୍ରଣୀଳୀକୁ କାଢ଼ିଦିଅନ୍ତୁ" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "ଭାଷା ସୂଚକକୁ ଦର୍ଶାଇବା ଅଥବା ଲୁଚାଇବା ପାଇଁ ibus ର ଆଚରଣକୁ ସେଟକରନ୍ତୁ" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "ଅବଲୋକନ ସାରଣୀରେ ବ୍ୟକ୍ତିମାନଙ୍କର ଅନୁସ୍ଥାପନ ସେଟକରନ୍ତୁ" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "ବଚ୍ଛିତ ନିବେଶ ପଦ୍ଧତିର ସୂଚନା ଦର୍ଶାନ୍ତୁ" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" -msgstr "ନିବେଶ ପଦ୍ଧତି ନାମକୁ ଭାଷା ସୂଚକରେ ଦର୍ଶାନ୍ତୁ ଯେତେବେଳେ ଯାଞ୍ଚବାକ୍ସକୁ ଯାଞ୍ଚକରୁଛନ୍ତି" +msgstr "" +"ନିବେଶ ପଦ୍ଧତି ନାମକୁ ଭାଷା ସୂଚକରେ ଦର୍ଶାନ୍ତୁ ଯେତେବେଳେ ଯାଞ୍ଚବାକ୍ସକୁ ଯାଞ୍ଚକରୁଛନ୍ତି" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "ଭାଷା ତାଲିକା ଦର୍ଶାନ୍ତୁ:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "ଲଗଇନ ସମୟରେ ibus କୁ ଆରମ୍ଭ କରନ୍ତୁ" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "ତାଲିକାରେ ପରବର୍ତ୍ତୀ ନିବେଶ ପ୍ରଣାଳୀକୁ ବଦଳାଇବା ପାଇଁ ସକ୍ଷିପ୍ତ ପଥଗୁଡ଼ିକ" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "ତାଲିକାରେ ପୂର୍ବ ନିବେଶ ପ୍ରଣାଳୀକୁ ବଦଳାଇବା ପାଇଁ ସକ୍ଷିପ୍ତ ପଥଗୁଡ଼ିକ" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "ଉପର ପାଖ ବାମ କୋଣ" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "ଉପର ପାଖ ଡ଼ାହାଣ କୋଣ" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "ଇଚ୍ଛାରୂପଣ ଅକ୍ଷରରୂପ ବ୍ୟବହାର କରନ୍ତୁ:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "ଭୂଲମ୍ବ" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "ସକ୍ରିୟ ଥିବା ସମୟରେ" diff --git a/po/pa.po b/po/pa.po index d1707d093..c9d5f7d33 100644 --- a/po/pa.po +++ b/po/pa.po @@ -1,38 +1,41 @@ -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# +# translation of ibus.pot to Panjabi +# Panjabi translation of ibus. +# Copyright (C) 2008 Peng Huang +# This file is distributed under the same license as the ibus package. +# +# Translators: # Amanpreet Singh , 2008. # A S Alam , 2009. +# A S Alam , 2011. # Jaswinder Singh , 2009, 2010. msgid "" msgstr "" -"Project-Id-Version: ibus\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-05-05 16:23+0530\n" -"Last-Translator: Jaswinder Singh \n" -"Language-Team: Punjabi/Panjabi \n" +"Project-Id-Version: IBus\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-08-18 01:36+0000\n" +"Last-Translator: aalam \n" +"Language-Team: Panjabi (Punjabi) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: pa\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Lokalize 1.0\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" -msgstr "IBus" +msgstr "ਆਈ-ਬੱਸ" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus ਇੰਪੁੱਟ ਢੰਗ ਫਰੇਮਵਰਕ" +msgstr "ਇੰਪੁੱਟ ਢੰਗ ਫਰੇਮਵਰਕ" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus ਇੰਪੁੱਟ ਢੰਗ ਫਰੇਮਵਰਕ" +msgstr "ਆਈਬਸ ਇੰਪੁੱਟ ਢੰਗ ਫਰੇਮਵਰਕ ਸ਼ੁਰੂ ਕਰੋ" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:40 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -44,139 +47,150 @@ msgstr "" msgid "Other" msgstr "ਹੋਰ" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "ਪਿਛਲਾ ਪੇਜ਼" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "ਅਗਲਾ ਪੇਜ਼" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:62 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" -"ਕੁਝ ਇੰਪੁੰਟ ਢੰਗ ਇੰਸਟਾਲ ਕੀਤੇ, ਹਟਾਏ ਜਾਂ ਅੱਪਡੇਟ ਕੀਤੇ ਗਏ ਹਨ। ਕਿਰਪਾ ਕਰਕੇ ibus ਇੰਪੁੱਟ ਪਲੇਟਫਾਰਮ ਮੁੜ-" -"ਚਾਲੂ ਕਰੋ।" +"ਕੁਝ ਇੰਪੁੰਟ ਢੰਗ ਇੰਸਟਾਲ ਕੀਤੇ, ਹਟਾਏ ਜਾਂ ਅੱਪਡੇਟ ਕੀਤੇ ਗਏ ਹਨ। ਕਿਰਪਾ ਕਰਕੇ ibus " +"ਇੰਪੁੱਟ ਪਲੇਟਫਾਰਮ ਮੁੜ-ਚਾਲੂ ਕਰੋ।" -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:66 msgid "Restart Now" -msgstr "ਹੁਣ ਮੁੜ-ਚਾਲੂ" +msgstr "ਹੁਣੇ ਮੁੜ-ਚਾਲੂ" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:67 msgid "Later" -msgstr "ਬਾਅਦ `ਚ" +msgstr "ਬਾਅਦ 'ਚ" + +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "ਆਈਬੱਸ ਪੈਨਲ" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:122 msgid "IBus input method framework" msgstr "IBus ਇੰਪੁੱਟ ਢੰਗ ਫਰੇਮਵਰਕ" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:352 msgid "Restart" -msgstr "ਮੁੜ-ਚਾਲੂ" +msgstr "ਮੁੜ-ਚਾਲੂ ਕਰੋ" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:439 msgid "Turn off input method" msgstr "ਇੰਪੁੱਟ ਢੰਗ ਬੰਦ ਕਰੋ" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:478 msgid "No input window" msgstr "ਕੋਈ ਇੰਪੁੱਟ ਵਿੰਡੋ ਨਹੀਂ" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:509 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus ਲੀਨਕਸ/ਯੂਨੈਕਸ ਲਈ ਮਾਹਰ ਇੰਪੁੱਟ ਬੱਸ ਹੈ।" -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:513 msgid "translator-credits" msgstr "" -"ਅਮਨਪਰੀਤ ਸਿੰਘ ਆਲਮ ੨੦੦੮-੨੦੦੯\n" +"ਅਮਨਪਰੀਤ ਸਿੰਘ ਆਲਮ ੨੦੦੮-੨੦੧੧\n" "http://www.satluj.com/" -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "ਇੰਪੁੱਟ ਢੰਗ ਬਾਰੇ" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "ਇੰਪੁੱਟ ਢੰਗ ਬਦਲੋ" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "ਇਸ ਬਾਰੇ" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "ਇੰਪੁੱਟ ਢੰਗ ਬਾਰੇ" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "ਭਾਸ਼ਾ: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "ਕੀਬੋਰਡ ਲੇਆਉਟ: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "ਲੇਖਕ: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "ਵੇਰਵਾ:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "ਟਰਿੱਗਰ" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "ਚਾਲੂ ਕਰੋ" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "ਬੰਦ ਕਰੋ" + +#: ../setup/main.py:135 msgid "next input method" msgstr "ਅਗਲਾ ਇੰਪੁੱਟ ਢੰਗ" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "ਪਿਛਲਾ ਇੰਪੁੱਟ ਢੰਗ" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus ਡੈਮਨ ਚੱਲਦੀ ਨਹੀਂ ਹੈ। ਕੀ ਤੁਸੀਂ ਇਸ ਨੂੰ ਸ਼ੁਰੂ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹੋ?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus ਸ਼ੁਰੂ ਹੋ ਗਈ ਹੈ! ਜੇ ਤੁਹਾਨੂੰ IBus ਨਾ ਵੇਖਾਈ ਦੇਵੇ ਤਾਂ ਅੱਗੇ ਦਿੱਤੀਆਂ ਲਾਈਨਾਂ ਨੂੰ
$HOME/.bashrc ਵਿੱਚ ਜੋੜੋ ਅਤੇ ਆਪਣੇ ਡੈਸਕਟਾਪ ਵਿੱਚ ਮੁੜ ਲਾਗਇਨ ਕਰੋ\n" -"
 export GTK_IM_MODULE=ibus\n" -"
 export XMODIFIERS=@im=ibus\n" -"
 export QT_IM_MODULE=ibus" +"IBus ਸ਼ੁਰੂ ਹੋ ਗਈ ਹੈ! ਜੇ ਤੁਹਾਨੂੰ IBus ਨਾ ਵਰਤ ਸਕੋ ਤਾਂ ਅੱਗੇ ਦਿੱਤੀਆਂ ਲਾਈਨਾਂ ਨੂੰ $HOME/.bashrc ਵਿੱਚ ਲਿਖੋ ਅਤੇ ਆਪਣੇ ਡੈਸਕਟਾਪ ਵਿੱਚ ਮੁੜ-ਲਾਗਇਨ ਕਰੋ।\n" +" export GTK_IM_MODULE=ibus⏎ \n" +" export XMODIFIERS=@im=ibus⏎ \n" +" export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "%s ਲਈ ਕੀਬੋਰਡ ਸ਼ਾਰਟਕੱਟ ਚੁਣੋ" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "ਕੀਬੋਰਡ ਸ਼ਾਰਟਕੱਟ" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "ਕੀ ਕੋਡ:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "ਮਾਡੀਫਾਇਰ:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -184,7 +198,7 @@ msgstr "" "ਕੋਈ ਵੀ ਸਵਿੱਚ ਦੱਬੋ (ਜਾਂ ਕੋਈ ਸਵਿੱਚ ਜੋੜ)।\n" "ਜਦੋਂ ਸਵਿੱਚ ਛੱਡੀ ਜਾਵੇਗੀ ਤਾਂ ਇਹ ਡਾਈਲਾਗ ਬੰਦ ਹੋ ਜਾਵੇਗਾ।" -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "ਕੋਈ ਵੀ ਸਵਿੱਚ ਦੱਬੋ (ਜਾਂ ਸਵਿੱਚ ਜੋੜ)" @@ -193,22 +207,21 @@ msgid "Select an input method" msgstr "ਇੱਕ ਇੰਪੁੱਟ ਢੰਗ ਚੁਣੋ" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "ਇੰਪੁੱਟ ਢੰਗ" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus ਪਸੰਦ" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "IBus ਪਸੰਦ" +msgstr "ਆਈਬਸ ਪਸੰਦ ਸੈੱਟ ਕਰੋ" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -223,115 +236,129 @@ msgid "Custom font name for language panel" msgstr "ਭਾਸ਼ਾ ਪੈਨਲ ਲਈ ਪਸੰਦੀਦਾ ਫੋਂਟ ਨਾਂ" #: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "ਸ਼ਾਰਟਕੱਟ ਸਵਿੱਚਾਂ ਬੰਦ ਕਰੋ" + +#: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text" msgstr "ਸ਼ਾਮਿਲ ਕੀਤਾ ਪਹਿਲਾਂ-ਸੋਧਿਆ ਪਾਠ" -#: ../data/ibus.schemas.in.h:5 +#: ../data/ibus.schemas.in.h:6 msgid "Embed Preedit Text in Application Window" msgstr "ਐਪਲੀਕੇਸ਼ਨ ਵਿੱਡੋ ਵਿੱਚ ਸ਼ਾਮਿਲ ਕੀਤਾ ਪਹਿਲਾਂ-ਸੋਧਿਆ ਪਾਠ" -#: ../data/ibus.schemas.in.h:6 -#, fuzzy +#: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default" -msgstr "ਅਗਲਾ ਇੰਪੁੱਟ ਢੰਗ" +msgstr "ਇੰਪੁੱਟ ਢੰਗ ਡਿਫਾਲਟ ਹੀ ਚਾਲੂ ਕਰੋ" -#: ../data/ibus.schemas.in.h:7 +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" -msgstr "" +msgstr "ਜਦੋਂ ਐਪਲੀਕੇਸ਼ਨ ਇੰਪੁੱਟ ਫੋਕਸ ਲਵੇ ਤਾਂ ਇੰਪੁੱਟ ਢੰਗ ਡਿਫਾਲਟ ਹੀ ਚਲਾਉ" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "ਸ਼ਾਰਟਕੱਟ ਸਵਿੱਚਾਂ ਚਾਲੂ ਕਰੋ" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "ਭਾਸ਼ਾ ਪੈਨਲ ਸਥਿਤੀ" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" msgstr "ਅਗਲਾ ਇੰਜਣ ਸ਼ਾਰਟਕੱਟ ਕੁੰਜੀਆਂ" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "ਖੋਜ ਟੇਬਲ ਦੀ ਸਥਿਤੀ" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" -msgstr "ਖੋਜ ਟੇਬਲ ਦੀ ਸਥਿਤੀ। 0 = ਹਰੀਜੱਟਲ, 1 =ਵਰਟੀਕਲ" +msgstr "ਖੋਜ ਟੇਬਲ ਦੀ ਸਥਿਤੀ। 0 = ਲੇਟਵਾਂ, 1 =ਖੜ੍ਹਵਾ" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "ਪ੍ਰੀ-ਲੋਡ ਇੰਜਣ" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "ibus ਸ਼ੁਰੂ ਹੋਣ ਸਮੇਂ ਪਹਿਲਾਂ ਲੋਡ ਕੀਤੇ ਇੰਜਣ" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" msgstr "ਪਿਛਲਾ ਇੰਜਣ ਸ਼ਾਰਟਕੱਟ ਕੁੰਜੀਆਂ" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "ਸਭ ਐਪਲੀਕੇਸ਼ਨਾਂ ਵਿਚਕਾਰ ਕੁਝ ਇੰਪੁੱਟ ਸਾਂਝੀ ਕਰੋ" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "ਸਿਸਟਮ ਟਰੇਅ ਵਿੱਚ ਆਈਕਾਨ ਵੇਖਾਓ" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "ਇੰਪੁੱਟ ਢੰਗ ਨਾਂ ਵੇਖਾਓ" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "ਭਾਸ਼ਾ ਪੱਟੀ ਉੱਤੇ ਇੰਪੁੱਟ ਨਾਂ ਵੇਖੋ" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" -msgstr "ਭਾਸ਼ਾ ਪੈਨਲ ਦਾ ਰਵੱਈਆ. 0 = ਹਮੇਸ਼ਾ ਓਹਲੇ, 1 = ਆਟੋਮੈਟਿਕ ਓਹਲੇ, 2 = ਹਮੇਸ਼ਾ ਵੇਖੋ" +msgstr "" +"ਭਾਸ਼ਾ ਪੈਨਲ ਦਾ ਰਵੱਈਆ. 0 = ਹਮੇਸ਼ਾ ਓਹਲੇ, 1 = ਆਟੋਮੈਟਿਕ ਓਹਲੇ, 2 = ਹਮੇਸ਼ਾ ਵੇਖੋ" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" msgstr "" -"ਭਾਸ਼ਾ ਪੈਨਲ ਦੀ ਸਥਿਤੀ. 0 = ਉੱਪਰ ਖੱਬਾ ਕੋਨਾ, 1 = ਉੱਪਰ ਸੱਜਾ ਕੋਨਾ, 2 = ਹੇਠਾਂ ਖੱਬਾ ਕੋਨਾ, 3 = " -"ਹੇਠਾਂ ਸੱਜਾ ਕੋਨਾ, 4 = ਪਸੰਦੀਦਾ" +"ਭਾਸ਼ਾ ਪੈਨਲ ਦੀ ਸਥਿਤੀ. 0 = ਉੱਪਰ ਖੱਬਾ ਕੋਨਾ, 1 = ਉੱਪਰ ਸੱਜਾ ਕੋਨਾ, 2 = ਹੇਠਾਂ ਖੱਬਾ " +"ਕੋਨਾ, 3 = ਹੇਠਾਂ ਸੱਜਾ ਕੋਨਾ, 4 = ਪਸੰਦੀਦਾ" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" -msgstr "ਲਿਸਟ ਵਿੱਚ ਅਗਲਾ ਇੰਪੁੱਟ ਢੰਗ ਬਦਲਣ ਲਈ ਸ਼ਾਰਟਕੱਟ ਸਵਿੱਚ" +msgstr "ਲਿਸਟ ਵਿੱਚ ਅਗਲਾ ਇੰਪੁੱਟ ਢੰਗ ਬਦਲਣ ਲਈ ਸ਼ਾਰਟਕੱਟ ਸਵਿੱਚਾਂ" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" -msgstr "ਲਿਸਟ ਵਿੱਚ ਪਿਛਲਾ ਇੰਪੁੱਟ ਢੰਗ ਬਦਲਣ ਲਈ ਸ਼ਾਰਟਕੱਟ ਸਵਿੱਚ" +msgstr "ਪਿਛਲਾ ਇੰਪੁੱਟ ਢੰਗ ਬਦਲਣ ਲਈ ਸ਼ਾਰਟਕੱਟ ਸਵਿੱਚਾਂ" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "ਇੰਪੁੱਟ ਢੰਗ ਬੰਦ ਕਰਨ ਲਈ ਸ਼ਾਰਟਕੱਟ ਸਵਿੱਚਾਂ" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "ਇੰਪੁੱਟ ਢੰਗ ਚਾਲੂ ਕਰਨ ਲਈ ਸ਼ਾਰਟਕੱਟ ਸਵਿੱਚਾਂ" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "ਇੰਪੁੱਟ ਢੰਗ ਬੰਦ ਕਰਨ ਜਾਂ ਚਾਲੂ ਕਰਨ ਲਈ ਸ਼ਾਰਟਕੱਟ ਕੁੰਜੀਆਂ" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "ਟਰਿੱਗਰ ਸ਼ਾਰਟਕੱਟ ਕੁੰਜੀਆਂ" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "ਪਸੰਦੀਦਾ ਫੋਂਟ ਵਰਤੋਂ" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "ਭਾਸ਼ਾ ਪੈਨਲ ਲਈ ਪਸੰਦੀਦਾ ਫੋਂਟ ਨਾਂ ਵਰਤੋਂ" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "ਗਲੋਬਲ ਇੰਪੁੱਟ ਢੰਗ ਵਰਤੋ" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "ਸਿਸਟਮ ਕੀਬੋਰਡ (XKB) ਲੇਆਉਟ ਵਰਤੋਂ" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "ਸਿਸਟਮ ਕੀਬੋਰਡ ਲੇਆਉਟ ਵਰਤੋਂ" @@ -369,11 +396,11 @@ msgid "" "\n" msgstr "" "IBus\n" -"
ਮਾਹਰ ਇੰਪੁੱਟ ਬੱਸ\n" -"
ਮੁੱਖ ਸਫ਼ਾ: http://code.google.com/p/ibus\n" -"
\n" -"
\n" -"
\n" +"ਇੰਟੈਲੀਜੈਂਟ ਇੰਪੁੱਟ ਢੰਗ\n" +"ਮੁੱਖ ਸਫ਼ਾ: http://code.google.com/p/ibus\n" +"\n" +"\n" +"\n" #: ../setup/setup.ui.h:14 msgid "" @@ -389,7 +416,7 @@ msgstr "ਚੁਣਿਆ ਇੰਪੁੱਟ ਢੰਗ ਚਾਲੂ ਕੀਤੇ #: ../setup/setup.ui.h:18 msgid "Advanced" -msgstr "ਮਾਹਰ" +msgstr "ਤਕਨੀਕੀ" #: ../setup/setup.ui.h:19 msgid "Always" @@ -412,305 +439,109 @@ msgid "Custom" msgstr "ਪਸੰਦੀਦਾ" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "ਬੰਦ:" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "ਐਪਲੀਕੇਸ਼ਨ ਵਿੰਡੋ ਵਿੱਚ ਸ਼ਾਮਿਲ ਕੀਤਾ ਪਹਿਲਾਂ-ਸੋਧਿਆ ਪਾਠ" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "ਐਪਲੀਕੇਸ਼ਨ ਵਿੰਡੋ ਵਿੱਚ ਇੰਪੁੱਟ ਢੰਗ ਦਾ ਸ਼ਾਮਿਲ ਕੀਤਾ ਪਹਿਲਾਂ-ਸੋਧਿਆ ਪਾਠ" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "ਮੇਨੂ ਵਿੱਚ ਸ਼ਾਮਿਲ" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "ਚਾਲੂ ਜਾਂ ਬੰਦ:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "ਚਾਲੂ:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "ਆਮ" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" -msgstr "ਹਰੀਜੱਟਲ" +msgstr "ਲੇਟਵਾਂ" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "ਭਾਸ਼ਾ ਪੈਨਲ ਸਥਿਤੀ:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "ਚੁਣਿਆ ਇੰਪੁੱਟ ਢੰਗ ਚਾਲੂ ਇੰਪੁੱਟ ਢੰਗਾਂ ਵਿੱਚ ਹੇਠਾਂ ਭੇਜੋ" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "ਚੁਣਿਆ ਇੰਪੁੱਟ ਢੰਗ ਚਾਲੂ ਇੰਪੁੱਟ ਢੰਗਾਂ ਵਿੱਚ ਉੱਤੇ ਭੇਜੋ" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "ਅਗਲਾ ਇੰਪੁੱਟ ਢੰਗ:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "ਪਿਛਲਾ ਇੰਪੁੱਟ ਢੰਗ:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "ਚੁਣਿਆ ਇੰਪੁੱਟ ਢੰਗ ਚਾਲੂ ਇੰਪੁੱਟ ਢੰਗਾਂ ਵਿੱਚੋਂ ਹਟਾਓ" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "ibus ਦਾ ਰਵੱਈਆ ਸੈੱਟ ਕਰੋ ਕਿ ਭਾਸ਼ਾ ਪੱਟੀ ਕਿਵੇਂ ਵੇਖਾਈ ਜਾਵੇ" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "ਖੋਜ ਟੇਬਲ ਵਿੱਚ ਉਮੀਦਵਾਰ ਦੀ ਸਥਿਤੀ ਸੈੱਟ ਕਰੋ" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "ਚੁਣੇ ਇੰਪੁੱਟ ਢੰਗ ਬਾਰੇ ਜਾਣਕਾਰੀ ਵੇਖੋ" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "ਜਦੋਂ ਚੈੱਕ ਬਾਕਸ ਚੁਣਿਆ ਹੋਵੇ ਤਾਂ ਇੰਪੁੱਟ ਢੰਗ ਨਾਂ ਭਾਸ਼ਾ ਪੱਟੀ ਉੱਤੇ ਵੇਖੋ" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "ਭਾਸ਼ਾ ਪੈਨਲ ਵੇਖੋ:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "ਲਾਗਇਨ ਸਮੇਂ ibus ਚਲਾਉ" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "ਲਿਸਟ ਵਿੱਚ ਅਗਲਾ ਇੰਪੁੱਟ ਢੰਗ ਬਦਲਣ ਲਈ ਸ਼ਾਰਟਕੱਟ ਸਵਿੱਚ" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "ਲਿਸਟ ਵਿੱਚ ਪਿਛਲਾ ਇੰਪੁੱਟ ਢੰਗ ਬਦਲਣ ਲਈ ਸ਼ਾਰਟਕੱਟ ਸਵਿੱਚ" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" -msgstr "ਉੱਪਰ ਖੱਬਾ ਕੋਨਾ" +msgstr "ਉੱਤੇ ਖੱਬਾ ਕੋਨਾ" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" -msgstr "ਉੱਪਰ ਸੱਜਾ ਕੋਨਾ" +msgstr "ਉੱਤੇ ਸੱਜਾ ਕੋਨਾ" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" -msgstr "ਪਸੰਦੀਦਾ ਫੋਂਟ ਵਰਤੋ:" +msgstr "ਪਸੰਦੀਦਾ ਫੋਂਟ ਵਰਤੋਂ:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" -msgstr "ਵਰਟੀਕਲ" +msgstr "ਖੜ੍ਹਵਾਂ" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "ਜਦੋਂ ਐਕਟਿਵ" - -#~ msgid "Never" -#~ msgstr "ਕਦੇ ਨਹੀਂ" - -#~ msgid "Show in Status Icon menu" -#~ msgstr "ਸਥਿਤੀ ਆਈਕਾਨ ਮੇਨੂ ਵਿੱਚ ਵੇਖਾਓ" - -#, fuzzy -#~ msgid "Use global engine" -#~ msgstr "ਪ੍ਰੀ-ਲੋਡ ਇੰਜਣ" - -#, fuzzy -#~ msgid "Langauge panel position" -#~ msgstr "ਭਾਸ਼ਾ ਪੈਨਲ ਵੇਖੋ:" - -#~ msgid "Custom font:" -#~ msgstr "ਪਸੰਦੀਦਾ ਫੋਂਟ:" - -#, fuzzy -#~ msgid "Font for language bar and candidates" -#~ msgstr "ਭਾਸ਼ਾ ਪੱਟੀ ਅਤੇ ਉਮੀਦਵਾਰ ਲਈ ਫੋਂਟ ਚੋਣ" - -#~ msgid "Use custom font for language bar and candidates" -#~ msgstr "ਭਾਸ਼ਾ ਪੱਟੀ ਅਤੇ ਉਮੀਦਵਾਰ ਲਈ ਕਸਟਮ ਫੋਂਟ" - -#~ msgid "Custom Font" -#~ msgstr "ਪਸੰਦੀਦਾ ਫੋਂਟ" - -#~ msgid "Show IM Name" -#~ msgstr "IM ਨਾਂ ਵੇਖੋ" - -#~ msgid "Show IM name on language bar" -#~ msgstr "ਭਾਸ਼ਾ ਪੱਟੀ ਉੱਤੇ IM ਨਾਂ ਵੇਖੋ" - -#~ msgid "Use Custom Font" -#~ msgstr "ਪਸੰਦੀਦਾ ਫੋਂਟ ਵਰਤੋਂ" - -#~ msgid "Next engine hotkey for switch to next input method engine" -#~ msgstr "ਅਗਲੇ ਇੰਪੁੱਟ ਢੰਗ ਇੰਜਣ ਲਈ ਬਦਲਣ ਵਾਸਤੇ ਅਗਲਾ ਇੰਜਣ ਹਾਟ-ਕੀ" - -#~ msgid "Prev engine hotkey for switch to previous input method engine" -#~ msgstr "ਪਿਛਲੇ ਇੰਪੁੱਟ ਢੰਗ ਇੰਜਣ ਲਈ ਬਦਲਣ ਵਾਸਤੇ ਪਿਛਲਾ ਇੰਜਣ ਹਾਟ-ਕੀ" - -#~ msgid "Trigger hotkey for enable or disable input context" -#~ msgstr "ਇੰਪੁੱਟ ਪਰਸੰਗ ਚਾਲੂ ਜਾਂ ਬੰਦ ਕਰਨ ਵਾਸਤੇ ਟਰਿੱਗਰ ਹਾਟ-ਕੀ" - -#~ msgid "gtk-about" -#~ msgstr "gtk-about" - -#~ msgid "[Control+space]" -#~ msgstr "[Control+space]" - -#~ msgid "Switch engine" -#~ msgstr "ਇੰਜਣ ਬਦਲੋ" - -#~ msgid "prev engine" -#~ msgstr "ਪਿਛਲਾ ਇੰਜਣ" - -#~ msgid "keyboard label|BackSpace" -#~ msgstr "BackSpace" - -#~ msgid "keyboard label|Tab" -#~ msgstr "Tab" - -#~ msgid "keyboard label|Return" -#~ msgstr "Return" - -#~ msgid "keyboard label|Pause" -#~ msgstr "Pause" - -#~ msgid "keyboard label|Scroll_Lock" -#~ msgstr "Scroll_Lock" - -#~ msgid "keyboard label|Sys_Req" -#~ msgstr "Sys_Req" - -#~ msgid "keyboard label|Escape" -#~ msgstr "Escape" - -#~ msgid "keyboard label|Multi_key" -#~ msgstr "Multi_key" - -#~ msgid "keyboard label|Home" -#~ msgstr "Home" - -#~ msgid "keyboard label|Left" -#~ msgstr "ਖੱਬੇ" - -#~ msgid "keyboard label|Up" -#~ msgstr "ਉੱਤੇ" - -#~ msgid "keyboard label|Right" -#~ msgstr "ਸੱਜੇ" - -#~ msgid "keyboard label|Down" -#~ msgstr "ਹੇਠਾਂ" - -#~ msgid "keyboard label|Page_Up" -#~ msgstr "Page_Up" - -#~ msgid "keyboard label|Page_Down" -#~ msgstr "Page_Down" - -#~ msgid "keyboard label|End" -#~ msgstr "End" - -#~ msgid "keyboard label|Begin" -#~ msgstr "Begin" - -#~ msgid "keyboard label|Print" -#~ msgstr "Print" - -#~ msgid "keyboard label|Insert" -#~ msgstr "Insert" - -#~ msgid "keyboard label|Num_Lock" -#~ msgstr "Num_Lock" - -#~ msgid "keyboard label|KP_Space" -#~ msgstr "KP_Space" - -#~ msgid "keyboard label|KP_Tab" -#~ msgstr "KP_Tab" - -#~ msgid "keyboard label|KP_Enter" -#~ msgstr "KP_Enter" - -#~ msgid "keyboard label|KP_Home" -#~ msgstr "KP_Home" - -#~ msgid "keyboard label|KP_Left" -#~ msgstr "KP_Left" - -#~ msgid "keyboard label|KP_Up" -#~ msgstr "KP_Up" - -#~ msgid "keyboard label|KP_Right" -#~ msgstr "KP_Right" - -#~ msgid "keyboard label|KP_Down" -#~ msgstr "KP_Down" - -#~ msgid "keyboard label|KP_Page_Up" -#~ msgstr "KP_Page_Up" - -#~ msgid "keyboard label|KP_Prior" -#~ msgstr "KP_Prior" - -#~ msgid "keyboard label|KP_Page_Down" -#~ msgstr "KP_Page_Down" - -#~ msgid "keyboard label|KP_Next" -#~ msgstr "KP_Next" - -#~ msgid "keyboard label|KP_End" -#~ msgstr "KP_End" - -#~ msgid "keyboard label|KP_Begin" -#~ msgstr "KP_Begin" - -#~ msgid "keyboard label|KP_Insert" -#~ msgstr "KP_Insert" - -#~ msgid "keyboard label|KP_Delete" -#~ msgstr "KP_Delete" - -#~ msgid "keyboard label|Delete" -#~ msgstr "Delete" - -#~ msgid "gtk-remove" -#~ msgstr "gtk-close" - -#~ msgid "gtk-close" -#~ msgstr "gtk-close" - -#~ msgid "IBus - Running" -#~ msgstr "IBus -  ਚੱਲ ਰਿਹਾ ਹੈ" - -#~ msgid "IBus - Setup" -#~ msgstr "IBus - ਸੈੱਟਅੱਪ" - -#~ msgid "Engine" -#~ msgstr "ਇੰਜਣ" - -#~ msgid "Started" -#~ msgstr "ਚਾਲੂ ਹੈ" - -#~ msgid "Cannot enable input engine" -#~ msgstr "ਇੰਪੁੱਟ ਇੰਜਣ ਯੋਗ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ" - -#~ msgid "" -#~ "IBus can not enable input engine, because IBus does not load any input " -#~ "engines!\n" -#~ "Please use ibus-setup program to load some input engines." -#~ msgstr "" -#~ "IBus ਕੋਈ ਇੰਪੁੱਟ ਇੰਜਣ ਯੋਗ ਨਹੀਂ ਕਰ ਸਕਦੀ ਹੈ, ਕਿਉਂਕਿ ਆਈ-ਬੱਸ ਕਿਸੇ ਇੰਪੁੱਟ ਇੰਜਣ ਨੂੰ ਲੋਡ ਨਹੀਂ ਕਰ " -#~ "ਸਕਦੀ ਹੈ!\n" -#~ "
ਕੁਝ ਇੰਪੁੱਟ ਇੰਜਣ ਨੂੰ ਲੋਡ ਕਰਨ ਵਾਸਤੇ ibus-setup ਪਰੋਗਰਾਮ ਵਰਤੋਂ।" - -#~ msgid "Setup" -#~ msgstr "ਸੈੱਟਅੱਪ" - -#~ msgid "Don't show this again" -#~ msgstr "ਇਹ ਮੁੜ ਨਾ ਵੇਖਾਓ" diff --git a/po/pl.po b/po/pl.po index 43428b37b..ed90c06d5 100644 --- a/po/pl.po +++ b/po/pl.po @@ -1,33 +1,36 @@ # translation of pl.po to Polish -# Piotr Drąg , 2009. +# Polish translation of ibus. +# This file is distributed under the same license as the ibus package. # +# Piotr Drąg , 2009. +# raven , 2011. msgid "" msgstr "" "Project-Id-Version: pl\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-05-14 00:15+0200\n" -"Last-Translator: Piotr Drąg \n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-05-13 07:46+0000\n" +"Last-Translator: raven \n" "Language-Team: Polish \n" +"Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" msgstr "iBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "Struktura metody wprowadzania iBus" +msgstr "Struktura metody wprowadzania" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "Struktura metody wprowadzania iBus" +msgstr "Uruchomienie struktury metody wprowadzania iBus" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:40 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -39,15 +42,15 @@ msgstr "" msgid "Other" msgstr "Inne" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "Poprzednia strona" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "Następna strona" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:62 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." @@ -55,122 +58,133 @@ msgstr "" "Metody wprowadzania zostały zainstalowane, usunięte lub zaktualizowane. " "Proszę ponownie uruchomić platformę wprowadzania iBus." -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:66 msgid "Restart Now" msgstr "Uruchom ponownie teraz" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:67 msgid "Later" msgstr "Później" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "Panel iBus" + +#: ../ui/gtk/panel.py:122 msgid "IBus input method framework" msgstr "Struktura metody wprowadzania iBus" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:352 msgid "Restart" msgstr "Uruchom ponownie" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:439 msgid "Turn off input method" msgstr "Wyłącz metodę wprowadzania" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:478 msgid "No input window" msgstr "Brak okna wprowadzania" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:509 msgid "IBus is an intelligent input bus for Linux/Unix." -msgstr "iBus jest inteligentną magistralą wprowadzania dla systemu Linux/UNIX." +msgstr "" +"iBus jest inteligentną magistralą wprowadzania dla systemu Linux/UNIX." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:513 msgid "translator-credits" msgstr "Piotr Drąg , 2009" -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "O metodzie wprowadzania" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "Przełącz metodę wprowadzania" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "O programie" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "O metodzie wprowadzania" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "Język: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "Układ klawiatury: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "Autor: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "Opis:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "przełącznik" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "włączenie" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "wyłączenie" + +#: ../setup/main.py:135 msgid "next input method" msgstr "następna metoda wprowadzania" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "poprzednia metoda wprowadzania" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "Demon iBus nie jest uruchomiony. Uruchomić go teraz?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"iBus został uruchomiony. Jeśli nie można używać iBus, należy dodać poniższe " -"wiersze do pliku $HOME/.bashrc i zalogować się ponownie.\n" +"iBus został uruchomiony. Jeśli nie można używać iBus, należy dodać poniższe wiersze do pliku $HOME/.bashrc i zalogować się ponownie.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "Wybór skrótu klawiszowego dla %s" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "Skróty klawiszowe" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "Kod klawisza:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "Modyfikatory:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -178,7 +192,7 @@ msgstr "" "Proszę nacisnąć klawisz (lub kombinację klawiszy).\n" "Okno dialogowe zostanie zamknięte po zwolnieniu klawisza." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "Proszę nacisnąć klawisz (lub kombinację klawiszy)" @@ -187,22 +201,21 @@ msgid "Select an input method" msgstr "Wybór metodę wprowadzania" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "Metoda wprowadzania" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "KBD" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" -msgstr "Preferencje programu iBus" +msgstr "Preferencje usługi iBus" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "Preferencje programu iBus" +msgstr "Ustawianie preferencji usługi iBus" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -217,67 +230,76 @@ msgid "Custom font name for language panel" msgstr "Nazwa własnej czcionki dla panelu języków" #: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "Wyłącza skróty klawiszowe" + +#: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text" msgstr "Osadzanie wcześniej wprowadzonego tekstu" -#: ../data/ibus.schemas.in.h:5 +#: ../data/ibus.schemas.in.h:6 msgid "Embed Preedit Text in Application Window" msgstr "Osadzanie wcześniej wprowadzonego tekstu w oknie aplikacji" -#: ../data/ibus.schemas.in.h:6 -#, fuzzy +#: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default" -msgstr "następna metoda wprowadzania" +msgstr "Domyślne włączanie metody wprowadzania" -#: ../data/ibus.schemas.in.h:7 +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "" +"Domyślne włączanie metody wprowadzania, kiedy aplikacja uzyskuje aktywność " +"wprowadzania" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "Włącza skróty klawiszowe" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "Pozycja panela języków" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" msgstr "Klawisze skrótów następnego mechanizmu" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "Orientacja tablicy wyszukiwania" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "Orientacja tablicy wyszukiwania. 0 = pozioma, 1 = pionowa" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "Wcześniejsze wczytanie mechanizmów" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "Wcześniejsze wczytanie mechanizmów podczas uruchamiania usługi iBus" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" msgstr "Klawisze skrótów poprzedniego mechanizmu" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "Używanie tej samej metody wprowadzania we wszystkich aplikacjach" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "Wyświetlanie ikony w obszarze powiadamiania" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "Wyświetlanie nazwy metody wprowadzania" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "Wyświetlanie nazwy metody wprowadzania na panelu języków" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" @@ -285,7 +307,7 @@ msgstr "" "Zachowanie panela języków. 0 = osadzony w menu, 1 = automatycznie ukrywany, " "2 = zawsze wyświetlany" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" @@ -293,43 +315,49 @@ msgstr "" "Pozycja panela języków. 0 = górny lewy róg, 1 = górny prawy róg, 2 = dolny " "lewy róg, 3 = dolny prawy róg, 4 = własna" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" msgstr "" -"Klawisz skrótu do przełączenia na następną metodę wprowadzania na liście" +"Klawisze skrótu do przełączania na następną metodę wprowadzania na liście" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" msgstr "" -"Klawisz skrótu do przełączenia na poprzednią metodę wprowadzania na liście" +"Klawisze skrótu do przełączania na poprzednią metodę wprowadzania na liście" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "Skróty klawiszowe do wyłączania metody wprowadzania" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "Skróty klawiszowe do włączania metody wprowadzania" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "Klawisze skrótów do włączania lub wyłączania metody wprowadzania" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "Klawisze skrótów przełącznika" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "Użycie własnej czcionki" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "Nazwa własnej czcionki użytej w panelu języków" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "Użycie globalnej metody wprowadzania" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "Użycie systemowego układu klawiatury (XKB)" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "Użycie systemowych ustawień układu klawiatury" @@ -410,111 +438,120 @@ msgid "Custom" msgstr "Własna" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "Wyłączone:" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "Osadzanie wcześniej wprowadzonego tekstu metody wejścia" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "" "Osadzanie wcześniej wprowadzonego tekstu metody wejścia w oknie aplikacji" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "Osadzanie w menu" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "Włączenie lub wyłączenie:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "Włączone:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "Ogólne" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "Poziomo" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "Pozycja panelu języków:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "" "Przeniesienie w dół zaznaczonej metody wprowadzania we włączonych metodach " "wprowadzania" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "" "Przeniesienie w górę zaznaczonej metody wprowadzania we włączonych metodach " "wprowadzania" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "Następna metoda wprowadzania:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "Poprzednia metoda wprowadzania:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "" -"Usunięcie zaznaczonej metody wprowadzania we włączonych metodach wprowadzania" +"Usunięcie zaznaczonej metody wprowadzania we włączonych metodach " +"wprowadzania" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "Ustawienie wyświetlania lub ukrywania panela języków usługi iBus" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "Ustawienie orientacji kandydatów w tablicy wyszukiwania" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "Wyświetlanie informacji o wybranej metodzie wprowadzania" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "" -"Wyświetlanie nazwy metody wprowadzania na panelu języków podczas zaznaczania " -"pola wyboru" +"Wyświetlanie nazwy metody wprowadzania na panelu języków podczas zaznaczania" +" pola wyboru" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "Wyświetlanie panelu języków:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "Uruchamianie iBus podczas logowania" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "" "Klawisz skrótu do przełączenia na następną metodę wprowadzania na liście" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "" "Klawisz skrótu do przełączenia na poprzednią metodę wprowadzania na liście" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "Górny lewy róg" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "Górny prawy róg" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "Użycie własnej czcionki:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "Pionowo" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "W czasie aktywności" diff --git a/po/pt_BR.po b/po/pt_BR.po new file mode 100644 index 000000000..dedafcd02 --- /dev/null +++ b/po/pt_BR.po @@ -0,0 +1,558 @@ +# translation of ibus.master.pt_BR.po to Portuguese +# Gujarati translations for el package. +# Copyright (C) 2010 THE el'S COPYRIGHT HOLDER +# This file is distributed under the same license as the ibus package. +# +# Automatically generated, 2010. +# Glaucia Cintra , 2010-2011. +msgid "" +msgstr "" +"Project-Id-Version: ibus.master.pt_BR\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-03-08 12:32+0900\n" +"PO-Revision-Date: 2011-03-22 15:23+0000\n" +"Last-Translator: Glaucia Cintra \n" +"Language-Team: Portuguese (Brazilian) \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: ../bus/ibus.desktop.in.h:1 +msgid "IBus" +msgstr "IBus" + +#: ../bus/ibus.desktop.in.h:2 +msgid "Input Method Framework" +msgstr "Framework do método de entrada" + +#: ../bus/ibus.desktop.in.h:3 +msgid "Start IBus Input Method Framework" +msgstr "Iniciar Framework do método de entrada IBus" + +#: ../ibus/_config.py.in:39 +msgid "" +"Copyright (c) 2007-2010 Peng Huang\n" +"Copyright (c) 2007-2010 Red Hat, Inc." +msgstr "" +"Copyright (c) 2007-2010 Peng Huang\n" +"Copyright (c) 2007-2010 Red Hat, Inc." + +#: ../ibus/lang.py:41 +msgid "Other" +msgstr "Outros" + +#: ../ui/gtk/candidatepanel.py:264 +msgid "Previous page" +msgstr "Página anterior" + +#: ../ui/gtk/candidatepanel.py:269 +msgid "Next page" +msgstr "Próxima página" + +#: ../ui/gtk/main.py:55 +msgid "" +"Some input methods have been installed, removed or updated. Please restart " +"ibus input platform." +msgstr "" +"Alguns métodos de entrada foram instalados, removidos ou atualizados. Por " +"favor, reinicie a plataforma de entrada do ibus. " + +#: ../ui/gtk/main.py:59 +msgid "Restart Now" +msgstr "Reinicie Agora" + +#: ../ui/gtk/main.py:60 +msgid "Later" +msgstr "Mais tarde" + +#: ../ui/gtk/panel.py:109 +msgid "IBus input method framework" +msgstr "Framework do método de entrada IBus" + +#: ../ui/gtk/panel.py:327 +msgid "Restart" +msgstr "Reinicie" + +#: ../ui/gtk/panel.py:414 +msgid "Turn off input method" +msgstr "Desligue o método de entrada" + +#: ../ui/gtk/panel.py:453 +msgid "No input window" +msgstr "Nenhuma janela de entrada" + +#: ../ui/gtk/panel.py:484 +msgid "IBus is an intelligent input bus for Linux/Unix." +msgstr "IBus é um bus de entrada inteligente para o Linux/Unix." + +#: ../ui/gtk/panel.py:488 +msgid "translator-credits" +msgstr "créditos-tradutor" + +#: ../ui/gtk/languagebar.py:106 +msgid "About the input method" +msgstr "Sobre o método de entrada" + +#: ../ui/gtk/languagebar.py:214 +msgid "Switch input method" +msgstr "Altere o método de entrada" + +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 +msgid "About" +msgstr "Sobre" + +#: ../ui/gtk/languagebar.py:361 +msgid "About the Input Method" +msgstr "A respeito do Método de Entrada" + +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 +#, python-format +msgid "Language: %s\n" +msgstr "Linguagem: %s\n" + +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#, python-format +msgid "Keyboard layout: %s\n" +msgstr "Desenho do teclado: %s\n" + +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#, python-format +msgid "Author: %s\n" +msgstr "Autor: %s\n" + +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +msgid "Description:\n" +msgstr "Descrição:\n" + +#: ../setup/main.py:102 +msgid "trigger" +msgstr "trigger" + +#: ../setup/main.py:113 +msgid "enable" +msgstr "habilitar" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "desabiltar" + +#: ../setup/main.py:135 +msgid "next input method" +msgstr "próximo método de entrada" + +#: ../setup/main.py:146 +msgid "previous input method" +msgstr "método de entrada anterior" + +#: ../setup/main.py:286 +msgid "IBus daemon is not started. Do you want to start it now?" +msgstr "O IBus daemon não foi inciado. Você deseja iniciá-lo agora?" + +#: ../setup/main.py:301 +msgid "" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" +" export GTK_IM_MODULE=ibus\n" +" export XMODIFIERS=@im=ibus\n" +" export QT_IM_MODULE=ibus" +msgstr "" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" +" export GTK_IM_MODULE=ibus\n" +" export XMODIFIERS=@im=ibus\n" +" export QT_IM_MODULE=ibus" + +#: ../setup/main.py:316 +#, python-format +msgid "Select keyboard shortcut for %s" +msgstr "Selecione o atalho do teclado para %s" + +#: ../setup/keyboardshortcut.py:52 +msgid "Keyboard shortcuts" +msgstr "Atalhos do teclado" + +#: ../setup/keyboardshortcut.py:63 +msgid "Key code:" +msgstr "Código de tecla:" + +#: ../setup/keyboardshortcut.py:78 +msgid "Modifiers:" +msgstr "Modificadores:" + +#: ../setup/keyboardshortcut.py:231 +msgid "" +"Please press a key (or a key combination).\n" +"The dialog will be closed when the key is released." +msgstr "" +"Por favor pressione uma tecla (ou uma combinação de tecla).\n" +"O diálogo será encerrado quando a tecla for liberada." + +#: ../setup/keyboardshortcut.py:233 +msgid "Please press a key (or a key combination)" +msgstr "Por favor pressione uma tecla (ou uma combinação de tecla)" + +#: ../setup/enginecombobox.py:120 +msgid "Select an input method" +msgstr "Selecione um método de entrada" + +#. create im name & icon column +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 +msgid "Input Method" +msgstr "Método de Entrada" + +#: ../setup/enginetreeview.py:92 +msgid "Kbd" +msgstr "Kbd" + +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 +msgid "IBus Preferences" +msgstr "Preferências do IBus" + +#: ../setup/ibus-setup.desktop.in.h:2 +msgid "Set IBus Preferences" +msgstr "Definir Preferências do IBus" + +#: ../data/ibus.schemas.in.h:1 +msgid "Auto hide" +msgstr "Ocultar Automaticamente" + +#: ../data/ibus.schemas.in.h:2 +msgid "Custom font" +msgstr "Fonte padrão" + +#: ../data/ibus.schemas.in.h:3 +msgid "Custom font name for language panel" +msgstr "Nome da fonte padrão para o painel de linguagem" + +#: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "Desabilitar teclas de atalho" + +#: ../data/ibus.schemas.in.h:5 +msgid "Embed Preedit Text" +msgstr "Embutir Texto de Pré-Edição " + +#: ../data/ibus.schemas.in.h:6 +msgid "Embed Preedit Text in Application Window" +msgstr "Embutir Texto de Pré-edição na Janela do Aplicativo" + +#: ../data/ibus.schemas.in.h:7 +msgid "Enable input method by default" +msgstr "Habilitar método de entrada por padrão" + +#: ../data/ibus.schemas.in.h:8 +msgid "Enable input method by default when the application gets input focus" +msgstr "" +"Habilitar método de entrada por padrão quando o aplicativo obtiver o foco de" +" entradas" + +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "Habilitar teclas de atalho" + +#: ../data/ibus.schemas.in.h:10 +msgid "Language panel position" +msgstr "Posição do Painel de Linguagem" + +#: ../data/ibus.schemas.in.h:11 +msgid "Next engine shortcut keys" +msgstr "Próximo mecanismo de teclas de atalho" + +#: ../data/ibus.schemas.in.h:12 +msgid "Orientation of lookup table" +msgstr "Orientação da tabela de pesquisa" + +#: ../data/ibus.schemas.in.h:13 +msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" +msgstr "Orientação da Tabela de Pesquisa. 0 = Horizontal, 1 = Vertical " + +#: ../data/ibus.schemas.in.h:14 +msgid "Preload engines" +msgstr "Mecanismos de carregamento" + +#: ../data/ibus.schemas.in.h:15 +msgid "Preload engines during ibus starts up" +msgstr "Mecanismos de pré-carregamento durante a inicialização do ibus" + +#: ../data/ibus.schemas.in.h:16 +msgid "Prev engine shortcut keys" +msgstr "Visualização do mecanismo das teclas de atalho " + +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 +msgid "Share the same input method among all applications" +msgstr "Compartilhar o mesmo método de entrada entre todos os aplicativos" + +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +msgid "Show icon on system tray" +msgstr "Apresenta um ícone na bandeja do sistema" + +#: ../data/ibus.schemas.in.h:19 +msgid "Show input method name" +msgstr "Apresenta o nome do método de entrada" + +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 +msgid "Show input method name on language bar" +msgstr "Apresenta o nome do método de entrada na barra de linguagem" + +#: ../data/ibus.schemas.in.h:21 +msgid "" +"The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " +"Always show" +msgstr "" +"O comportamento do painel de linguagem. 0 = Embutido no menu, 1 = Ocultar " +"automaticamente, 2 = Apresentar sempre" + +#: ../data/ibus.schemas.in.h:22 +msgid "" +"The position of the language panel. 0 = Top left corner, 1 = Top right " +"corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" +msgstr "" +"A posição do painel de linguagem. 0 = Canto esquerdo superior, 1 = Canto " +"direito superior, 2 = canto esquerdo inferior, 3 = canto direito inferior, 4" +" = Padrão " + +#: ../data/ibus.schemas.in.h:23 +msgid "The shortcut keys for switching to the next input method in the list" +msgstr "" +"As teclas de atalho para alteração ao próximo método de entrada na lista " + +#: ../data/ibus.schemas.in.h:24 +msgid "The shortcut keys for switching to the previous input method" +msgstr "Teclas de atalho para alteração ao método de entrada anterior" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "As teclas de atalho para desligar o método de entrada" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "As teclas de atalho para ligar o método de entrada" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 +msgid "The shortcut keys for turning input method on or off" +msgstr "As teclas de atalho para ligar ou desligar o método de entrada" + +#: ../data/ibus.schemas.in.h:28 +msgid "Trigger shortcut keys" +msgstr "Realiza o trigger nas teclas de atalho" + +#: ../data/ibus.schemas.in.h:29 +msgid "Use custom font" +msgstr "Usa a fonte padrão" + +#: ../data/ibus.schemas.in.h:30 +msgid "Use custom font name for language panel" +msgstr "Usa o nome da fonte padrão para o painel de linguagem" + +#: ../data/ibus.schemas.in.h:31 +msgid "Use global input method" +msgstr "Use o método de entrada global" + +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 +msgid "Use system keyboard (XKB) layout" +msgstr "Usa o desenho do teclado do sistema (XKB)" + +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 +msgid "Use system keyboard layout" +msgstr "Usa o desenho do teclado do sistema" + +#: ../setup/setup.ui.h:1 +msgid "..." +msgstr "..." + +#: ../setup/setup.ui.h:2 +msgid "Font and Style" +msgstr "Fonte e Estilo" + +#: ../setup/setup.ui.h:3 +msgid "Global input method settings" +msgstr "Configurações de Método de Entrada Global " + +#: ../setup/setup.ui.h:4 +msgid "Keyboard Layout" +msgstr "Desenho do Teclado" + +#: ../setup/setup.ui.h:5 +msgid "Keyboard Shortcuts" +msgstr "Atalhos do Teclado" + +#: ../setup/setup.ui.h:6 +msgid "Startup" +msgstr "Inicialização" + +#: ../setup/setup.ui.h:7 +msgid "" +"IBus\n" +"The intelligent input bus\n" +"Homepage: http://code.google.com/p/ibus\n" +"\n" +"\n" +"\n" +msgstr "" +"IBus\n" +"The intelligent input bus\n" +"Homepage: http://code.google.com/p/ibus\n" +"\n" +"\n" +"\n" + +#: ../setup/setup.ui.h:14 +msgid "" +"The default input method is the top one in the list.\n" +"You may use up/down buttons to change it." +msgstr "" +"O método de entrada padrão é o número um da lista. Você pode usar " +"os botões para mover o cursor para cima e para baixo para alterá-" +"lo." + +#: ../setup/setup.ui.h:17 +msgid "Add the selected input method into the enabled input methods" +msgstr "" +"Adicione o método de entrada selecionado nos métodos de entrada ativados" + +#: ../setup/setup.ui.h:18 +msgid "Advanced" +msgstr "Avançado" + +#: ../setup/setup.ui.h:19 +msgid "Always" +msgstr "Sempre" + +#: ../setup/setup.ui.h:20 +msgid "Bottom left corner" +msgstr "Canto esquerdo inferior" + +#: ../setup/setup.ui.h:21 +msgid "Bottom right corner" +msgstr "Canto direito superior" + +#: ../setup/setup.ui.h:22 +msgid "Candidates orientation:" +msgstr "Orientação dos candidatos:" + +#: ../setup/setup.ui.h:23 +msgid "Custom" +msgstr "Padrão" + +#: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "Desabilitar:" + +#: ../setup/setup.ui.h:25 +msgid "Embed preedit text in application window" +msgstr "Embutir texto de pré-edição na janela do aplicativo " + +#: ../setup/setup.ui.h:26 +msgid "Embed the preedit text of input method in the application window" +msgstr "" +"Embutir o texto de pré-edição do método de entrada na janela do aplicativo" + +#: ../setup/setup.ui.h:27 +msgid "Embedded in menu" +msgstr "Embutido no menu" + +#: ../setup/setup.ui.h:28 +msgid "Enable or disable:" +msgstr "Ativa ou desativa:" + +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "Habilitar:" + +#: ../setup/setup.ui.h:30 +msgid "General" +msgstr "Geral" + +#: ../setup/setup.ui.h:31 +msgid "Horizontal" +msgstr "Horizontal" + +#: ../setup/setup.ui.h:34 +msgid "Language panel position:" +msgstr "Posição do Painel de Linguagem:" + +#: ../setup/setup.ui.h:35 +msgid "Move down the selected input method in the enabled input methods" +msgstr "" +"Mova o método de entrada selecionado para baixo nos métodos de entrada " +"ativados" + +#: ../setup/setup.ui.h:36 +msgid "Move up the selected input method in the enabled input methods list" +msgstr "" +"Mova para cima o método de entrada selecionado na lista dos métodos de " +"entrada" + +#: ../setup/setup.ui.h:37 +msgid "Next input method:" +msgstr "Próximo método de entrada:" + +#: ../setup/setup.ui.h:38 +msgid "Previous input method:" +msgstr "Método de entrada anterior:" + +#: ../setup/setup.ui.h:39 +msgid "Remove the selected input method from the enabled input methods" +msgstr "" +"Remova o método de entrada selecionado a partir dos métodos de entrada " +"ativados" + +#: ../setup/setup.ui.h:40 +msgid "Set the behavior of ibus how to show or hide language bar" +msgstr "" +"Configure o comportamento do ibus para como demonstrar ou ocultar a barra de" +" linguagem" + +#: ../setup/setup.ui.h:41 +msgid "Set the orientation of candidates in lookup table" +msgstr "Configure a orientação dos candidatos na tabela de observação" + +#: ../setup/setup.ui.h:44 +msgid "Show information of the selected input method" +msgstr "Apresente a informação do método de entrada selecionado" + +#: ../setup/setup.ui.h:46 +msgid "Show input method's name on language bar when check the checkbox" +msgstr "" +"Apresente o nome do método de entrada na barra de linguagem quando " +"selecionando a caixa de seleção" + +#: ../setup/setup.ui.h:47 +msgid "Show language panel:" +msgstr "Apresente o painel de linguagem:" + +#: ../setup/setup.ui.h:48 +msgid "Start ibus on login" +msgstr "Inicie o ibus na conexão " + +#: ../setup/setup.ui.h:49 +msgid "The shortcut keys for switching to next input method in the list" +msgstr "" +"As teclas de atalho para alteração ao próximo método de entrada na lista" + +#: ../setup/setup.ui.h:50 +msgid "The shortcut keys for switching to previous input method in the list" +msgstr "" +"Teclas de atalho para alteração ao método de entrada anterior da lista" + +#: ../setup/setup.ui.h:52 +msgid "Top left corner" +msgstr "Canto esquerdo superior" + +#: ../setup/setup.ui.h:53 +msgid "Top right corner" +msgstr "Canto direito superior" + +#: ../setup/setup.ui.h:54 +msgid "Use custom font:" +msgstr "Usa a fonte padrão:" + +#: ../setup/setup.ui.h:57 +msgid "Vertical" +msgstr "Vertical" + +#: ../setup/setup.ui.h:58 +msgid "When active" +msgstr "Quando ativado" diff --git a/po/ru.po b/po/ru.po index 2256e3995..a69150af3 100644 --- a/po/ru.po +++ b/po/ru.po @@ -1,4 +1,4 @@ -# Russian translations for PACKAGE package. +# Russian translations for IBus package. # Copyright (C) 2009 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # @@ -8,15 +8,16 @@ msgid "" msgstr "" "Project-Id-Version: ru\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-05-06 12:12+1000\n" +"POT-Creation-Date: 2011-02-12 00:41+0900\n" +"PO-Revision-Date: 2010-07-30 10:25\n" "Last-Translator: Yulia \n" "Language-Team: Russian\n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" -"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Generator: KBabel 1.11.4\n" #: ../bus/ibus.desktop.in.h:1 @@ -24,16 +25,14 @@ msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "Система методов ввода IBus" +msgstr "Система методов ввода" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "Система методов ввода IBus" +msgstr "Запустить систему методов ввода IBus" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -45,109 +44,117 @@ msgstr "" msgid "Other" msgstr "Другие" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "Предыдущая страница" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "Следующая страница" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" -"Некоторые методы ввода были установлены, удалены или обновлены. " -"Перезапустите платформу ввода iBus." +"Методы ввода были установлены, удалены или обновлены. Перезапустите " +"платформу ввода iBus." -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 msgid "Restart Now" msgstr "Перезапустить сейчас" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 msgid "Later" msgstr "Позже" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "Система методов ввода IBus" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "Перезапустить" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 msgid "Turn off input method" msgstr "Отключить метод ввода" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "Нет окна ввода" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus — интеллектуальная система ввода для Linux и Unix." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "" "Alexey Kotlyarov , 2009.\n" "Yulia , 2010." -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "О методе ввода" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "Переключить метод ввода" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "О программе" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "О методе ввода" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "Язык: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "Раскладка клавиатуры: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "Автор: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "Описание:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "переключатель" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "" + +#: ../setup/main.py:135 msgid "next input method" msgstr "следующий метод ввода" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "предыдущий метод ввода" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "Служба IBus не запущена. Запустить?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" "IBus has been started! If you can not use IBus, please add below lines in " "$HOME/.bashrc, and relogin your desktop.\n" @@ -161,24 +168,24 @@ msgstr "" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "Выберите комбинацию клавиш для %s" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "Комбинации клавиш" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "Код клавиши:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "Модификаторы:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -186,7 +193,7 @@ msgstr "" "Нажмите клавишу (или сочетание клавиш).\n" "Когда клавиша будет отпущена, окно закроется." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "Нажмите клавишу (или сочетание клавиш)" @@ -195,22 +202,21 @@ msgid "Select an input method" msgstr "Выберите метод ввода" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "Метод ввода" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "Параметры IBus" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "Параметры IBus" +msgstr "Настроить параметры IBus" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -226,20 +232,20 @@ msgstr "Свой шрифт для языковой панели" #: ../data/ibus.schemas.in.h:4 msgid "Embed Preedit Text" -msgstr "Вставить текст метода ввода" +msgstr "Вставить готовый текст" #: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text in Application Window" -msgstr "Вставить текст метода ввода в окно приложения" +msgstr "Вставить готовый текст в окно приложения" #: ../data/ibus.schemas.in.h:6 -#, fuzzy msgid "Enable input method by default" -msgstr "следующий метод ввода" +msgstr "Включить метод ввода по умолчанию" #: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default when the application gets input focus" msgstr "" +"Включить метод ввода по умолчанию при получении приложением фокуса ввода" #: ../data/ibus.schemas.in.h:8 msgid "Language panel position" @@ -255,7 +261,7 @@ msgstr "Ориентация таблицы поиска" #: ../data/ibus.schemas.in.h:11 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" -msgstr "Ориентация таблицы просмотра. 0 = горизонтально, 1 = вертикально." +msgstr "Ориентация таблицы: 0 = горизонтально, 1 = вертикально." #: ../data/ibus.schemas.in.h:12 msgid "Preload engines" @@ -269,11 +275,11 @@ msgstr "Загружать методы ввода при запуске iBus" msgid "Prev engine shortcut keys" msgstr "Клавиши для предыдущего метода ввода" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "Использовать один метод ввода для всех приложений" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "Показать значок в области уведомлений" @@ -281,7 +287,7 @@ msgstr "Показать значок в области уведомлений" msgid "Show input method name" msgstr "Показывать название метода ввода" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "Показывать название метода ввода на языковой панели" @@ -302,22 +308,20 @@ msgstr "" "угол, 2 = левый нижний угол, 3 = правый нижний угол, 4 = произвольное" #: ../data/ibus.schemas.in.h:21 -#, fuzzy msgid "The shortcut keys for switching to the next input method in the list" -msgstr "Горячие клавиши для переключения на следующий метод ввода в списке:" +msgstr "Сочетание клавиш для переключения на следующий метод ввода в списке:" #: ../data/ibus.schemas.in.h:22 -#, fuzzy msgid "The shortcut keys for switching to the previous input method" -msgstr "Горячие клавиши для переключения на предыдущий метод ввода в списке:" +msgstr "Сочетание клавиш для переключения на предыдущий метод ввода в списке:" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" -msgstr "Горячие клавиши для включения/выключения метода ввода" +msgstr "Сочетание клавиш для включения/выключения метода ввода" #: ../data/ibus.schemas.in.h:24 msgid "Trigger shortcut keys" -msgstr "Горячие клавиши для включения/выключения" +msgstr "Сочетание клавиш для включения/выключения" #: ../data/ibus.schemas.in.h:25 msgid "Use custom font" @@ -331,11 +335,11 @@ msgstr "Использовать свой шрифт для языковой п msgid "Use global input method" msgstr "Использовать глобальный метод ввода" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" -msgstr "Использовать системную раскладку клавиатуры (XKB)" +msgstr "Использовать системную раскладку (XKB)" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "Использовать системную раскладку клавиатуры" @@ -416,102 +420,110 @@ msgid "Custom" msgstr "Свой" #: ../setup/setup.ui.h:24 -msgid "Embed preedit text in application window" -msgstr "Вставить текст метода ввода в окно приложения" +msgid "Disable:" +msgstr "" #: ../setup/setup.ui.h:25 +msgid "Embed preedit text in application window" +msgstr "Вставить готовый текст в окно приложения" + +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "Вставить готовый текст метода ввода в окно приложения" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "Встроена в меню" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "Включить или выключить:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "Основные" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "Горизонтально" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "Расположение языковой панели:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "Переместить выбранный метод ввода вниз в списке используемых" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "Переместить выбранный метод ввода вверх в списке используемых" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "Следующий метод ввода:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "Предыдущий метод ввода:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "Удалить выбранный метод ввода из списка" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "Установить поведение iBus для показа или скрытия языковой панели" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "Установить ориентацию кандидатов в таблице поиска" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "Показать информацию о выбранном методе ввода" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "" "Показывать название метода ввода на языковой панели, когда пункт выбран" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "Показывать языковую панель:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "Запускать iBus при входе в систему:" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "Горячие клавиши для переключения на следующий метод ввода в списке:" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "Горячие клавиши для переключения на предыдущий метод ввода в списке:" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "Левый верхний угол" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "Правый верхний угол" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "Произвольный шрифт:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "Вертикально" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "Когда активно" diff --git a/po/sr.po b/po/sr.po index b956b4ada..02f74d2dc 100644 --- a/po/sr.po +++ b/po/sr.po @@ -7,15 +7,16 @@ msgid "" msgstr "" "Project-Id-Version: ibus\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" +"POT-Creation-Date: 2011-02-12 00:41+0900\n" "PO-Revision-Date: 2009-04-01 19:58+0100\n" "Last-Translator: Miloš Komarčević \n" "Language-Team: Serbian \n" +"Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" -"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" @@ -31,7 +32,7 @@ msgstr "IBus радни оквир методе уноса" msgid "Start IBus Input Method Framework" msgstr "IBus радни оквир методе уноса" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -41,115 +42,123 @@ msgstr "" msgid "Other" msgstr "Друго" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 #, fuzzy msgid "Previous page" msgstr "Претходна метода уноса:" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 #, fuzzy msgid "Next page" msgstr "следећи погон" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 #, fuzzy msgid "Restart Now" msgstr "Покрени поново" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 #, fuzzy msgid "Later" msgstr "Друго" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "IBus радни оквир методе уноса" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "Покрени поново" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 #, fuzzy msgid "Turn off input method" msgstr "Нема методе уноса" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus је интелигентна магистрала уноса за Linux/Unix." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "Serbian " -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 #, fuzzy msgid "About the input method" msgstr "Методе уноса" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 #, fuzzy msgid "Switch input method" msgstr "Нема методе уноса" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "О програму" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 #, fuzzy msgid "About the Input Method" msgstr "Методе уноса" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, fuzzy, python-format msgid "Keyboard layout: %s\n" msgstr "Пречице тастатуре" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "окидач" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "" + +#: ../setup/main.py:135 #, fuzzy msgid "next input method" msgstr "Следећа метода уноса" -#: ../setup/main.py:128 +#: ../setup/main.py:146 #, fuzzy msgid "previous input method" msgstr "Претходна метода уноса" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus демон није покренут. Да ли желите да га сада покренете?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" "IBus has been started! If you can not use IBus, please add below lines in " "$HOME/.bashrc, and relogin your desktop.\n" @@ -163,24 +172,24 @@ msgstr "" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "Изаберите пречицу тастатуре за %s" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "Пречице тастатуре" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "Код тастера:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "Модификатори:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -188,7 +197,7 @@ msgstr "" "Притисните тастер (или комбинацију тастера).\n" "Прозорче ће бити затворено када се тастер отпусти." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "Притисните тастер (или комбинацију тастера)" @@ -197,16 +206,16 @@ msgid "Select an input method" msgstr "Изаберите методу уноса" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 #, fuzzy msgid "Input Method" msgstr "Методе уноса" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus поставке" @@ -281,11 +290,11 @@ msgstr "Унапред учитај погоне током ibus покрета msgid "Prev engine shortcut keys" msgstr "Пречица претходног погона" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "" @@ -294,7 +303,7 @@ msgstr "" msgid "Show input method name" msgstr "Назив прилагођеног фонта за језички панел" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:45 #, fuzzy msgid "Show input method name on language bar" msgstr "Назив прилагођеног фонта за језички панел" @@ -325,7 +334,7 @@ msgid "The shortcut keys for switching to the previous input method" msgstr "" "Пречица претходног погона за пребацивање на претходни погон методе уноса" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:51 #, fuzzy msgid "The shortcut keys for turning input method on or off" msgstr "" @@ -349,11 +358,11 @@ msgstr "Користи прилагођени фонт за језички па msgid "Use global input method" msgstr "Изаберите методу уноса" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "" @@ -434,113 +443,121 @@ msgid "Custom" msgstr "Прилагођени фонт:" #: ../setup/setup.ui.h:24 -msgid "Embed preedit text in application window" +msgid "Disable:" msgstr "" #: ../setup/setup.ui.h:25 -msgid "Embed the preedit text of input method in the application window" +msgid "Embed preedit text in application window" msgstr "" #: ../setup/setup.ui.h:26 -msgid "Embedded in menu" +msgid "Embed the preedit text of input method in the application window" msgstr "" #: ../setup/setup.ui.h:27 +msgid "Embedded in menu" +msgstr "" + +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "Укључи или искључи:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "Опште" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 #, fuzzy msgid "Horizontal" msgstr "" "Водоравно\n" "Усправно" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 #, fuzzy msgid "Language panel position:" msgstr "Прикажи језички панел:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "Следећа метода уноса:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 #, fuzzy msgid "Previous input method:" msgstr "Претходна метода уноса:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 #, fuzzy msgid "Set the orientation of candidates in lookup table" msgstr "Оријентација референтне табеле" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 #, fuzzy msgid "Show input method's name on language bar when check the checkbox" msgstr "Назив прилагођеног фонта за језички панел" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "Прикажи језички панел:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "Покрени ibus при пријави" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 #, fuzzy msgid "The shortcut keys for switching to next input method in the list" msgstr "Пречица следећег погона за пребацивање на следећи погон методе уноса" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 #, fuzzy msgid "The shortcut keys for switching to previous input method in the list" msgstr "" "Пречица претходног погона за пребацивање на претходни погон методе уноса" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 #, fuzzy msgid "Use custom font:" msgstr "Употреби прилагођени фонт" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 #, fuzzy msgid "When active" msgstr "" diff --git a/po/sr@latin.po b/po/sr@latin.po index 5b9523dd2..fecaeb48b 100644 --- a/po/sr@latin.po +++ b/po/sr@latin.po @@ -7,15 +7,16 @@ msgid "" msgstr "" "Project-Id-Version: ibus\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" +"POT-Creation-Date: 2011-02-12 00:41+0900\n" "PO-Revision-Date: 2009-04-01 19:58+0100\n" "Last-Translator: Miloš Komarčević \n" "Language-Team: Serbian \n" +"Language: sr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" -"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" @@ -31,7 +32,7 @@ msgstr "IBus radni okvir metode unosa" msgid "Start IBus Input Method Framework" msgstr "IBus radni okvir metode unosa" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -41,115 +42,123 @@ msgstr "" msgid "Other" msgstr "Drugo" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 #, fuzzy msgid "Previous page" msgstr "Prethodna metoda unosa:" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 #, fuzzy msgid "Next page" msgstr "sledeći pogon" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 #, fuzzy msgid "Restart Now" msgstr "Pokreni ponovo" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 #, fuzzy msgid "Later" msgstr "Drugo" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "IBus radni okvir metode unosa" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "Pokreni ponovo" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 #, fuzzy msgid "Turn off input method" msgstr "Nema metode unosa" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus je inteligentna magistrala unosa za Linux/Unix." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "Serbian " -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 #, fuzzy msgid "About the input method" msgstr "Metode unosa" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 #, fuzzy msgid "Switch input method" msgstr "Nema metode unosa" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "O programu" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 #, fuzzy msgid "About the Input Method" msgstr "Metode unosa" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, fuzzy, python-format msgid "Keyboard layout: %s\n" msgstr "Prečice tastature" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "okidač" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "" + +#: ../setup/main.py:135 #, fuzzy msgid "next input method" msgstr "sledeća metoda unosa" -#: ../setup/main.py:128 +#: ../setup/main.py:146 #, fuzzy msgid "previous input method" msgstr "prethodna metoda unosa" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus demon nije pokrenut. Da li želite da ga sada pokrenete?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" "IBus has been started! If you can not use IBus, please add below lines in " "$HOME/.bashrc, and relogin your desktop.\n" @@ -163,24 +172,24 @@ msgstr "" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "Izaberite prečicu tastature za %s" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "Prečice tastature" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "Kod tastera:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "Modifikatori:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -188,7 +197,7 @@ msgstr "" "Pritisnite taster (ili kombinaciju tastera).\n" "Prozorče će biti zatvoreno kada se taster otpusti." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "Pritisnite taster (ili kombinaciju tastera)" @@ -197,16 +206,16 @@ msgid "Select an input method" msgstr "Izaberite metodu unosa" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 #, fuzzy msgid "Input Method" msgstr "Metode unosa" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus postavke" @@ -281,11 +290,11 @@ msgstr "Unapred učitaj pogone tokom ibus pokretanja" msgid "Prev engine shortcut keys" msgstr "Prečica prethodnog pogona" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "" @@ -294,7 +303,7 @@ msgstr "" msgid "Show input method name" msgstr "Naziv prilagođenog fonta za jezički panel" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:45 #, fuzzy msgid "Show input method name on language bar" msgstr "Naziv prilagođenog fonta za jezički panel" @@ -325,7 +334,7 @@ msgid "The shortcut keys for switching to the previous input method" msgstr "" "Prečica prethodnog pogona za prebacivanje na prethodni pogon metode unosa" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:51 #, fuzzy msgid "The shortcut keys for turning input method on or off" msgstr "" @@ -349,11 +358,11 @@ msgstr "Koristi prilagođeni font za jezički panel" msgid "Use global input method" msgstr "Izaberite metodu unosa" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "" @@ -434,113 +443,121 @@ msgid "Custom" msgstr "Prilagođeni font:" #: ../setup/setup.ui.h:24 -msgid "Embed preedit text in application window" +msgid "Disable:" msgstr "" #: ../setup/setup.ui.h:25 -msgid "Embed the preedit text of input method in the application window" +msgid "Embed preedit text in application window" msgstr "" #: ../setup/setup.ui.h:26 -msgid "Embedded in menu" +msgid "Embed the preedit text of input method in the application window" msgstr "" #: ../setup/setup.ui.h:27 +msgid "Embedded in menu" +msgstr "" + +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "Uključi ili isključi:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "Opšte" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 #, fuzzy msgid "Horizontal" msgstr "" "Vodoravno\n" "Uspravno" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 #, fuzzy msgid "Language panel position:" msgstr "Prikaži jezički panel:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "Sledeća metoda unosa:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 #, fuzzy msgid "Previous input method:" msgstr "Prethodna metoda unosa:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 #, fuzzy msgid "Set the orientation of candidates in lookup table" msgstr "Orijentacija referentne tabele" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 #, fuzzy msgid "Show input method's name on language bar when check the checkbox" msgstr "Naziv prilagođenog fonta za jezički panel" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "Prikaži jezički panel:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "Pokreni ibus pri prijavi" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 #, fuzzy msgid "The shortcut keys for switching to next input method in the list" msgstr "Prečica sledećeg pogona za prebacivanje na sledeći pogon metode unosa" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 #, fuzzy msgid "The shortcut keys for switching to previous input method in the list" msgstr "" "Prečica prethodnog pogona za prebacivanje na prethodni pogon metode unosa" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 #, fuzzy msgid "Use custom font:" msgstr "Upotrebi prilagođeni font" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 #, fuzzy msgid "When active" msgstr "" diff --git a/po/ta.po b/po/ta.po index b0fd926d3..88d8eb9e4 100644 --- a/po/ta.po +++ b/po/ta.po @@ -1,38 +1,40 @@ # translation of ibus.master.ta.po to Tamil +# Tamil translation of ibus. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# This file is distributed under the same license as the ibus package. # # I. Felix , 2009. # I Felix , 2010. +# ifelix , 2011. msgid "" msgstr "" "Project-Id-Version: ibus.master.ta\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2009-12-08 22:26+0530\n" -"Last-Translator: I Felix \n" -"Language-Team: Tamil \n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-03-08 12:32+0900\n" +"PO-Revision-Date: 2011-03-22 15:23+0000\n" +"Last-Translator: ifelix \n" +"Language-Team: Tamil \n" +"Language: ta\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Lokalize 1.0\n" -"Plural-Forms: nplurals=2; plural=(n!=1);\\n\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + #: ../bus/ibus.desktop.in.h:1 msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus உள்ளீடு முறை ஃபிரேம்வொர்க்" +msgstr "உள்ளீடு முறை ஃபிரேம்வொர்க்" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus உள்ளீடு முறை ஃபிரேம்வொர்க்" +msgstr "IBus உள்ளீடு முறை ஃபிரேம்வொர்க்கை துவக்கு" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -44,138 +46,144 @@ msgstr "" msgid "Other" msgstr "வேறு" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "முந்தைய பக்கம்" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "அடுத்த பக்கம்" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" -"சில உள்ளீடு முறைகள் நிறுவப்பட்டுள்ளது, நீக்கப்பட்டுள்ளது அல்லது மேம்படுத்தப்பட்டுள்ளது. ibus " -"உள்ளீட்டை மறுதுவக்கவும்." +"சில உள்ளீடு முறைகள் நிறுவப்பட்டுள்ளது, நீக்கப்பட்டுள்ளது அல்லது " +"மேம்படுத்தப்பட்டுள்ளது. ibus உள்ளீட்டை மறுதுவக்கவும்." -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 msgid "Restart Now" msgstr "இப்போது மறுதுவக்கு" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 msgid "Later" msgstr "பின்னர்" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "IBus உள்ளீடு முறை ஃபிரேம்வொர்க்" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "மறுதுவக்கம்" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 msgid "Turn off input method" msgstr "உள்ளீடு முறையை நிறுத்து" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "உள்ளீடு சாளரம் இல்லை" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus Linux/Unixக்கான உள்ளிடு பஸ்." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "I. Felix " -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "உள்ளீடு முறை பற்றி" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "உள்ளீடு முறையை மாற்று" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "பற்றி" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "உள்ளீடு முறை பற்றி" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "மொழி: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "விசைப்பலகை அமைப்பு: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "ஆசிரியர்: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "விளக்கம்:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "ட்ரிகர்" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "செயல்படுத்து" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "செயல்நீக்கு" + +#: ../setup/main.py:135 msgid "next input method" msgstr "அடுத்த உள்ளீடு முறை" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "முந்தைய உள்ளீடு முறை" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus daemon துவக்கப்படவில்லை. இப்போது துவக்க வேண்டுமா?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus துவக்கப்பட்டது! உங்களால் IBusஐ பயன்படுத்த முடியவில்லையெனில், பின்வரும் வரியை " -"சேர்த்து $HOME/.bashrc, உங்கள் பணிமேடையை மறுதுவக்கவும்.\n" +"IBus துவக்கப்பட்டது! உங்களால் IBusஐ பயன்படுத்த முடியவில்லையெனில், பின்வரும் வரியை சேர்த்து $HOME/.bashrc, உங்கள் பணிமேடையை மறுதுவக்கவும்.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "%sக்கான விசைப்பலகை குறுக்குவழியை தேர்ந்தெடு" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "விசைப்பலகை குறுக்குவழிகள்" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "விசை குறியீடு:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "மாற்றிகள்;" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -183,7 +191,7 @@ msgstr "" "ஒரு விசையை அழுத்தவும் (அல்லது விசை கலவையை).\n" "விசையை விடுத்தால் உரையாடல் மூடப்படும்." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "ஒரு விசையை அழுத்தவும் (அல்லது ஒரு விசை கலவையை)" @@ -192,22 +200,21 @@ msgid "Select an input method" msgstr "ஒரு உள்ளீடு முறையை தேர்ந்தெடு" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "உள்ளீடு முறை" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus முன்னுரிமைகள்" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "IBus முன்னுரிமைகள்" +msgstr "IBus முன்னுரிமைகளை அமை" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" @@ -222,117 +229,131 @@ msgid "Custom font name for language panel" msgstr "தனிபயன் எழுத்துரு பெயர் மொழி பலகத்துக்கு" #: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "குறுக்குவிசைகளை செயல்நீக்கு" + +#: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text" msgstr "உட்பொதியப்பட்ட Preedit உரை" -#: ../data/ibus.schemas.in.h:5 +#: ../data/ibus.schemas.in.h:6 msgid "Embed Preedit Text in Application Window" msgstr "பயன்பாடு சாளரத்தில் உட்பொதியப்பட்ட Preedit உரை" -#: ../data/ibus.schemas.in.h:6 -#, fuzzy +#: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default" -msgstr "அடுத்த உள்ளீடு முறை" +msgstr "முன்னிருப்பாக உள்ளீடு முறையை செயல்படுத்து" -#: ../data/ibus.schemas.in.h:7 +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "" +"பயன்பாடு உள்ளீடுக்கு உட்படும்போது முன்னிருப்பாக உள்ளீடு முறையை செயல்படுத்து" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "குறுக்குவிசைக்களை செயல்படுத்து" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "மொழி பேனல் இடம்" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" msgstr "அடுத்த இயந்திர குறுக்குவிசை" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "காணும் அட்டவணையின் திசை" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "காணும் அட்டவணையின் திசை. 0 = கிடைமட்டம், 1 = செங்குத்து" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "முன்ஏற்றப்பட்ட இயந்திரங்கள்" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "ibus துவங்கும் போது முன்னேற்றப்பட்ட எந்திரங்கள் " -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" msgstr "முந்தைய இயந்திர குறுக்குவிசைகள்" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "அனைத்து பயன்பாடுகளிலும் சில உள்ளீடு முறையை பகிரவும்" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "கணினி தட்டில் சின்னத்தை காட்டு" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "உள்ளீடு முறையின் பெயரை காட்டு" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "மொழி பட்டையில் உள்ளீடு முறையின் பெயரை காட்டு" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" msgstr "" -"மொழி பலகத்தின் பண்புகள். 0 = மெனுவில் உட்பொதியப்பட்டது, 1 = தானாக மறை, 2 = எப்போதும் " -"காட்டு" +"மொழி பலகத்தின் பண்புகள். 0 = மெனுவில் உட்பொதியப்பட்டது, 1 = தானாக மறை, 2 = " +"எப்போதும் காட்டு" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" msgstr "" -"மொழி பேனலின் இடம். 0 = மேல் இடது ஓரம், 1 = மேல் வலது ஓரம், 2 = கீழ் இடது ஓரம், 3 = கீழ் " -"வலது ஓரம், 4 = தனிபயன்" +"மொழி பேனலின் இடம். 0 = மேல் இடது ஓரம், 1 = மேல் வலது ஓரம், 2 = கீழ் இடது " +"ஓரம், 3 = கீழ் வலது ஓரம், 4 = தனிபயன்" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" -msgstr "பட்டியலில் அடுத்த உள்ளீடு முறையை மாற்றுவதற்கான குறுக்குவழி விசைகள்" +msgstr "பட்டியலில் அடுத்த உள்ளீடு முறைக்கு மாற்றுவதற்கான குறுக்குவழி விசைகள்" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" -msgstr "பட்டியலில் முந்தைய உள்ளீடு முறையை மாற்றுவதற்கான குறுக்குவழி விசைகள்" +msgstr "முந்தைய உள்ளீடு முறைக்கு மாற்றுவதற்கான குறுக்குவழி விசைகள்" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "உள்ளீடு முறையை நிறுத்தும் குறுக்குவிசைகள்" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "உள்ளீடு முறையை இயக்கும் குறுக்குவிசைகள்" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "உள்ளீடு முறைமை துவக்க அல்லது நிறுத்த குறுக்குவிசைகளை அமை" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "ட்ரிகர் குறுக்குவிசை" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "தனிபயன் எழுத்துருவை பயன்படுத்து" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "மொழி பலகத்தில் தனிபயன் எழுத்துரு பெயர்" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "பொது உள்ளீடு முறையை பயன்படுத்து" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "கணினி விசைப்பலகை (XKB) அமைப்பை பயன்படுத்து" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "கணினி விசைப்பலகை அமைப்பை பயன்படுத்து" @@ -386,7 +407,8 @@ msgstr "" #: ../setup/setup.ui.h:17 msgid "Add the selected input method into the enabled input methods" -msgstr "செயல்படுத்தப்பட்ட உள்ளீடு முறைகளில் தேர்ந்தெடுக்கப்பட்ட உள்ளீடு முறையை சேர்" +msgstr "" +"செயல்படுத்தப்பட்ட உள்ளீடு முறைகளில் தேர்ந்தெடுக்கப்பட்ட உள்ளீடு முறையை சேர்" #: ../setup/setup.ui.h:18 msgid "Advanced" @@ -413,122 +435,116 @@ msgid "Custom" msgstr "தனிபயன்" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "செயல்நீக்கு:" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "பயன்பாடு சாளரத்தில் உட்பொதியப்பட்ட preedit உரை" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "பயன்பாட்டு சாளரத்தில் preedit உரையின் உள்ளீடு முறையை உட்பொதியவும்" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "மெனுவில் உட்பொதியப்பட்டது" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "செயல்படுத்து அல்லது செயல்நீக்கு:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "செயல்படுத்து:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "பொது" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "கிடைமட்டம்" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "மொழி பேனல் படம்:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" -msgstr "செயல்படுத்தப்பட்ட உள்ளீடு முறைகளில் தேர்ந்தெடுக்கப்பட்ட உள்ளீடு முறையை கீழே நகர்த்து" +msgstr "" +"செயல்படுத்தப்பட்ட உள்ளீடு முறைகளில் தேர்ந்தெடுக்கப்பட்ட உள்ளீடு முறையை கீழே " +"நகர்த்து" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "" -"செயல்படுத்தப்பட்ட உள்ளீடு முறைகள் பட்டியலில் தேர்ந்தெடுக்கப்பட்ட உள்ளீடு முறையை மேலே நகர்த்து" +"செயல்படுத்தப்பட்ட உள்ளீடு முறைகள் பட்டியலில் தேர்ந்தெடுக்கப்பட்ட உள்ளீடு " +"முறையை மேலே நகர்த்து" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "அடுத்த உள்ளீடு முறை:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "முந்தைய உள்ளீடு முறை:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" -msgstr "செயல்படுத்தப்பட்ட உள்ளீடு முறைகளிலிருந்து தேர்ந்தெடுக்கப்பட்ட உள்ளீடு முறையை நீக்கு" +msgstr "" +"செயல்படுத்தப்பட்ட உள்ளீடு முறைகளிலிருந்து தேர்ந்தெடுக்கப்பட்ட உள்ளீடு முறையை" +" நீக்கு" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "மொழி பட்டையை எவ்வாறு காட்ட அல்லது மறைக்க வேண்டும் என ibus பண்பினை அமை" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "காணும் அட்டவணையில் நபர்களின் திசையமைப்பை அமை" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "தேர்ந்தெடுக்கப்பட்ட உள்ளீடு முறையின் தகவலை காட்டு" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" -msgstr "சோதனை பெட்டியை சோதிக்கும் போது உள்ளீடு முறை பெயரை மொழி பட்டையில் காட்டு " +msgstr "" +"சோதனை பெட்டியை சோதிக்கும் போது உள்ளீடு முறை பெயரை மொழி பட்டையில் காட்டு " -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "மொழி பலகத்தை காட்டு:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "புகுபதிவில் ibusஐ துவக்கு" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "பட்டியலில் அடுத்த உள்ளீடு முறையை மாற்றுவதற்கான குறுக்குவழி விசைகள்" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "பட்டியலில் முந்தைய உள்ளீடு முறையை மாற்றுவதற்கான குறுக்குவழி விசைகள்" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "மேல் இடது ஓரம்" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "மேல் வலது ஓரம்" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "தனிபயன் எழுத்துருவை பயன்படுத்து:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "செங்குத்து" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "செயலிலிருக்கும் போது" - -#~ msgid "Never" -#~ msgstr "ஒருபோதும்" - -#, fuzzy -#~ msgid "Use global engine" -#~ msgstr "முன்ஏற்றப்பட்ட இயந்திரங்கள்" - -#, fuzzy -#~ msgid "Langauge panel position" -#~ msgstr "மொழி பலகத்தை காட்டு:" - -#~ msgid "Custom font:" -#~ msgstr "தனிபயன் எழுத்துரு:" - -#~ msgid "Font for language bar and candidates" -#~ msgstr "மொழி பட்டை மற்றும் நபர்களுக்கு எழுத்துரு தேர்வு" - -#~ msgid "Use custom font for language bar and candidates" -#~ msgstr "மொழி பட்டை மற்றும் நபர்களுக்கான தனிபயன் எழுத்துருவை பயன்படுத்து" diff --git a/po/te.po b/po/te.po index c94a9fd45..6dc78a7b0 100644 --- a/po/te.po +++ b/po/te.po @@ -1,187 +1,195 @@ -# translation of te.po to Telugu -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# Krishna Babu K , 2009, 2010. +# translation of ibus.pot to Telugu +# Telugu translation of ibus. +# Copyright (C) 2008 Peng Huang +# This file is distributed under the same license as the ibus package. +# +# Translators: +# Krishna Babu K , 2009. +# ప్రవీణ్ యిళ్ళ , 2011. msgid "" msgstr "" -"Project-Id-Version: te\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2010-05-05 16:34+0530\n" -"Last-Translator: Krishna Babu K \n" -"Language-Team: Telugu \n" +"Project-Id-Version: IBus\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-10-27 17:27+0000\n" +"Last-Translator: Praveen_Illa \n" +"Language-Team: Telugu (http://www.transifex.net/projects/p/fedora/team/te/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: te\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: KBabel 1.11.4\n" -"Plural-Forms: nplurals=2; plural=(n!=1);\n" -"\n" -"\n" -"\n" -"\n" -"\n" -"\n" -"\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" msgstr "IBus" #: ../bus/ibus.desktop.in.h:2 -#, fuzzy msgid "Input Method Framework" -msgstr "IBus ఇన్పుట్ పద్దతి ఆకృతి" +msgstr "ఇన్‌పుట్ పద్ధతి ఫ్రేమ్‌వర్క్" #: ../bus/ibus.desktop.in.h:3 -#, fuzzy msgid "Start IBus Input Method Framework" -msgstr "IBus ఇన్పుట్ పద్దతి ఆకృతి" +msgstr "IBus ఇన్‌పుట్ పద్ధతి ఫ్రేమ్‌వర్కును ప్రారంభించు" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:40 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." msgstr "" -"కాపీరైట్ (c) 2007-2010 Peng Huang\n" -"కాపీరైట్ (c) 2007-2010 Red Hat, Inc." +"నకలుహక్కు (c) 2007-2010 Peng Huang\n" +"నకలుహక్కు (c) 2007-2010 Red Hat, Inc." #: ../ibus/lang.py:41 msgid "Other" msgstr "ఇతర" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "మునుపటి పేజి" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "తరువాతి పేజి" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:62 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "" -"కొన్ని యిన్పుట్ విధానములు సంస్థాపించబడెను, తీసివేయబడెను, లేదా నవీకరించబడెను. దయచేసి ibus యిన్పుట్ " -"ప్లాట్‌ఫాంను పునఃప్రారంభించుము." +"కొన్ని ఇన్‌పుట్ విధానములు సంస్థాపించబడెను, తీసివేయబడెను, లేదా నవీకరించబడెను." +" దయచేసి ibus ఇన్‌పుట్ ప్లాట్‌ఫాంను పునఃప్రారంభించుము." -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:66 msgid "Restart Now" msgstr "ఇప్పుడు పునఃప్రారంభించుము" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:67 msgid "Later" msgstr "తరువాత" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "IBus ప్యానల్" + +#: ../ui/gtk/panel.py:122 msgid "IBus input method framework" -msgstr "IBus ఇన్పుట్ పద్దతి ఆకృతి" +msgstr "IBus ఇన్‌పుట్ పద్ధతి ఆకృతి" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:352 msgid "Restart" -msgstr "పునఃప్రారంభము" +msgstr "పునఃప్రారంభించు" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:439 msgid "Turn off input method" -msgstr "ఇన్పుట్ పద్దతి ఆఫ్ చేయుము" +msgstr "ఇన్‌పుట్ పద్ధతి ఆపు" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:478 msgid "No input window" -msgstr "ఇన్పుట్ విండో లేదు" +msgstr "ఇన్‌పుట్ విండో లేదు" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:509 msgid "IBus is an intelligent input bus for Linux/Unix." -msgstr "IBus అనునది Linux/Unix కొరకు తెలివైన ఇన్పుట్ బస్." +msgstr "IBus అనునది Linux/Unix కొరకు తెలివైన ఇన్‌పుట్ బస్." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:513 msgid "translator-credits" -msgstr "కృష్ణబాబు కె 2009." +msgstr "" +"కృష్ణబాబు కె 2009.\n" +"ప్రవీణ్ యిళ్ళ 2010-11." -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" -msgstr "ఇన్పుట్ పద్దతి గురించి" +msgstr "ఇన్‌పుట్ పద్ధతి గురించి" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" -msgstr "ఇన్పుట్ పద్దతి మార్చుము" +msgstr "ఇన్‌పుట్ పద్ధతిని మార్చు" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "గురించి" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" -msgstr "ఇన్పుట్ పద్దతి గురించి" +msgstr "ఇన్‌పుట్ పద్ధతి గురించి" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "భాష: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "కీబోర్డు నమూనా: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "మూలకర్త: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "వివరణ:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" -msgstr "బిస (ట్రిగ్గర్)" +msgstr "ట్రిగ్గర్" + +#: ../setup/main.py:113 +msgid "enable" +msgstr "చేతనపరుచు" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "అచేతనపరుచు" -#: ../setup/main.py:117 +#: ../setup/main.py:135 msgid "next input method" -msgstr "తరువాతి ఇన్పుట్ పద్దతి" +msgstr "తరువాతి ఇన్‌పుట్ పద్ధతి" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" -msgstr "మునుపటి ఇన్పుట్ పద్దతి" +msgstr "మునుపటి ఇన్‌పుట్ పద్ధతి" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" -msgstr "IBus డెమోన్ ప్రారంభమవలేదు. మీరు దానిని ప్రారంభించాలని అనుకొనుచున్నారా?" +msgstr "" +"IBus డెమోన్ ప్రారంభమవలేదు. మీరు దానిని ప్రారంభించాలని అనుకొనుచున్నారా?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus ప్రారంభమైంది! మీరు IBus వుపయోగించలేక పోతే, క్రింది వరుసలను $HOME/.bashrc నందు " -"జతచేయుము, మరియు మీ డెస్కుటాపునకు తిరిగి లాగిన్ అవ్వుము.\n" +"IBus ప్రారంభమైంది! మీరు IBus ఉపయోగించలేక పోతే, క్రింది వాటిని $HOME/.bashrc నందు జతచేయుము, మరియు మీ డెస్కుటాపునకు తిరిగి లాగిన్ అవ్వుము.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" -msgstr "%s కొరకు కీబోర్డు లఘువును యెంపికచేయుము" +msgstr "%s కొరకు కీబోర్డు లఘువును ఎంచుకోండి" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "కీబోర్డు లఘువులు" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "కీ కోడ్:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "సవరణిలు:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -189,158 +197,172 @@ msgstr "" "దయచేసి వొక కీను వత్తండి (లేదా కీ మిశ్రమాన్ని).\n" "కీ వదిలినప్పుడు డైలాగు మూయబడుతుంది." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "దయచేసి కీను వత్తండి (లేదా కీ మిశ్రమాన్ని)" #: ../setup/enginecombobox.py:120 msgid "Select an input method" -msgstr "ఇన్పుట్ పద్దతిని యెంపికచేయుము" +msgstr "ఒక ఇన్‌పుట్ పద్ధతిని ఎంచుకోండి" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" -msgstr "ఇన్పుట్ పద్దతి" +msgstr "ఇన్‌పుట్ పద్ధతి" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" -msgstr "IBus అభీష్టములు" +msgstr "IBus ప్రాధాన్యతలు" #: ../setup/ibus-setup.desktop.in.h:2 -#, fuzzy msgid "Set IBus Preferences" -msgstr "IBus అభీష్టములు" +msgstr "IBus ప్రాధాన్యతలను అమర్చు" #: ../data/ibus.schemas.in.h:1 msgid "Auto hide" -msgstr "స్వయంచాలకంగా మరుగునవుంచు" +msgstr "స్వయంచాలకంగా దాగిఉండు" #: ../data/ibus.schemas.in.h:2 msgid "Custom font" -msgstr "మలచుకొనిన ఫాంటు" +msgstr "అనురూపిత ఫాంటు" #: ../data/ibus.schemas.in.h:3 msgid "Custom font name for language panel" -msgstr "భాష ప్యానల్ కొరకు మలచుకొనిన ఫాంటు నామము" +msgstr "భాష ప్యానల్ కొరకు మలచుకొనిన ఫాంటు పేరు" #: ../data/ibus.schemas.in.h:4 -msgid "Embed Preedit Text" -msgstr "ఎంబెడెడ్ ప్రీడిట్ పాఠము" +msgid "Disable shortcut keys" +msgstr "అడ్డదారి కీలను అచేతనంచేయి" #: ../data/ibus.schemas.in.h:5 -msgid "Embed Preedit Text in Application Window" -msgstr "అనువర్తన విండోనందు ఎంబెడెడ్ ప్రీడిట్ పాఠము" +msgid "Embed Preedit Text" +msgstr "ఎంబెడెడ్ ప్రిఎడిట్ పాఠము" #: ../data/ibus.schemas.in.h:6 -#, fuzzy -msgid "Enable input method by default" -msgstr "తరువాతి ఇన్పుట్ పద్దతి" +msgid "Embed Preedit Text in Application Window" +msgstr "అనువర్తన విండోనందు ఎంబెడెడ్ ప్రిఎడిట్ పాఠము" #: ../data/ibus.schemas.in.h:7 +msgid "Enable input method by default" +msgstr "ఇన్‌పుట్ పద్ధతిని అప్రమేయంగా చేతనముచేయుము" + +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "" +"అనువర్తనము ఇన్‌పుట్ ఫోకస్‌ను పొందగానే ఇన్‌పుట్ పద్ధతిని అప్రమేయంగా చేతనము " +"చేయుము" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "లఘు కీ లను చేతనంచేయి" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "భాషా ప్యానల్ స్థానము" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" -msgstr "తరువాతి యింజన్‌కు లఘువులు" +msgstr "తరువాతి ఇంజన్‌కు లఘువులు" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "లుకప్ పట్టిక సర్దుబాటు" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "లుకప్ పట్టిక సర్దుబాటు. 0 = చదరముగా, 1 = నిలువుగా" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" -msgstr "ముందుగా లోడైన యింజన్లు" +msgstr "ముందుగా లోడైన ఇంజన్లు" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" -msgstr "ibus ప్రారంభమునందు యింజన్లు ముందుగా లోడుచేయి" +msgstr "ibus ప్రారంభమునందు ఇంజన్లు ముందుగా లోడుచేయి" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" -msgstr "మునుపటి యింజన్ లఘువులు" +msgstr "మునుపటి ఇంజన్ లఘువులు" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "అన్ని అనువర్తనములనందు యిన్పుట్ పద్దతిని భాగస్వామ్యపరచుము" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" -msgstr "సిస్టమ్ ట్రే నందు ప్రతిమను చూపుము" +msgstr "సిస్టమ్ ట్రే నందు ప్రతీకను చూపించు" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" -msgstr "యిన్పుట్ పద్దతి నామమును చూపుము" +msgstr "ఇన్‌పుట్ పద్ధతి పేరును చూపించు" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" -msgstr "భాషా పట్టీపై యిన్పుట్ పద్దతి నామము చూపుము" +msgstr "భాషా పట్టీపై ఇన్‌పుట్ పద్ధతి పేరును చూపించు" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" msgstr "" -"భాషా ప్యానల్ యొక్క ప్రవర్తన. 0 = మెనూనందు యెంబెడ్‌చేయి, 1 = స్వయంచాలకంగా మరుగునవుంచు, 2 = " -"ఎల్లప్పుడూ చూయించు" +"భాషా ప్యానల్ యొక్క ప్రవర్తన. 0 = మెనూనందు యెంబెడ్‌చేయి, 1 = స్వయంచాలకంగా " +"మరుగునవుంచు, 2 = ఎల్లప్పుడూ చూపించు" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" msgstr "" -"భాషా ప్యానల్ యొక్క స్థానము. 0 = పై ఎడమ మూల, 1 = పై కుడి మూల, 2 = క్రింది ఎడమ మూల, 3 = క్రింది " -"కుడి మూల, 4 = మలచుకొనిన" +"భాషా ప్యానల్ యొక్క స్థానము. 0 = పై ఎడమ మూల, 1 = పై కుడి మూల, 2 = క్రింది ఎడమ" +" మూల, 3 = క్రింది కుడి మూల, 4 = మలచుకొనిన" -#: ../data/ibus.schemas.in.h:21 -#, fuzzy +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" -msgstr "జాబితానందలి తరువాతి యిన్పుట్ పద్దతినకు మారుటకు లఘువులు" +msgstr "జాబితానందలి తరువాతి ఇన్పుట్ పద్ధతినకు మారుటకు లఘువులు" -#: ../data/ibus.schemas.in.h:22 -#, fuzzy +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" -msgstr "జాబితానందలి ముందరి యిన్పుట్ పద్దతినకు మారుటకు లఘువులు" +msgstr "జాబితానందలి ముందరి ఇన్‌పుట్ పద్ధతినకు మారుటకు లఘువులు" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "ఇన్‌పుట్ పద్ధతి ఆపుటకు కీ లఘువులు" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "ఇన్‌పుట్ పద్ధతి ఆన్ చేయుటకు కీ లఘువులు" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" -msgstr "ఇన్పుట్ పద్దతిని ఆన్ చేయుటకు లేదా ఆఫ్ చేయుటకు లఘువులు" +msgstr "ఇన్‌పుట్ పద్ధతిని ఆన్ చేయుటకు లేదా ఆఫ్ చేయుటకు లఘువులు" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "లఘవులను నొక్కుము" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" -msgstr "మలచుకొనిన ఫాంటు వుపయోగించుము" +msgstr "మలచుకొనిన ఫాంటు ఉపయోగించు" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "భాషా ప్యానల్ కొరకు మలచుకొనిన ఫాంట్ నామము వుపయోగించుము" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" -msgstr "గ్లోబల్ యిన్పుట్ పద్దతిని వుపయోగించుము" +msgstr "గ్లోబల్ ఇన్‌పుట్ పద్ధతిని ఉపయోగించు" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" -msgstr "సిస్టమ్ కీబోర్డు (XKB) నమూనా వుపయోగించుము" +msgstr "వ్యవస్థ కీబోర్డు (XKB) నమూనా ఉపయోగించు" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" -msgstr "సిస్టమ్ కీబోర్డు నమూనా వుపయోగించుము" +msgstr "వ్యవస్థ కీబోర్డు నమూనా ఉపయోగించు" #: ../setup/setup.ui.h:1 msgid "..." @@ -352,7 +374,7 @@ msgstr "ఫాంటు మరియు శైలి" #: ../setup/setup.ui.h:3 msgid "Global input method settings" -msgstr "గ్లోబల్ యిన్పుట్ పద్దతి అమరికలు" +msgstr "గ్లోబల్ ఇన్‌పుట్ పద్ధతి అమరికలు" #: ../setup/setup.ui.h:4 msgid "Keyboard Layout" @@ -376,7 +398,7 @@ msgid "" "\n" msgstr "" "IBus\n" -"తెలివైన ఇన్పుట్ బస్\n" +"తెలివైన ఇన్‌పుట్ బస్\n" "నివాసపుట: http://code.google.com/p/ibus\n" "\n" "\n" @@ -387,12 +409,12 @@ msgid "" "The default input method is the top one in the list.\n" "You may use up/down buttons to change it." msgstr "" -"జాబితాలో పైన వున్నది అప్రమేయ యిన్పుట్ విధానం అవుతుంది.\n" +"జాబితాలో పైన వున్నది అప్రమేయ ఇన్‌పుట్ విధానం అవుతుంది.\n" "దానిని మార్చుటకు మీరు పైకి/క్రిందకు బటన్సును వుపయోగించవచ్చు." #: ../setup/setup.ui.h:17 msgid "Add the selected input method into the enabled input methods" -msgstr "ఎంపికైన ఇన్పుట్ పద్దతిని చేతనమైన యిన్పుట్ పద్దతులలోనికి జతచేయుము" +msgstr "ఎంచుకున్న ఇన్‌పుట్ పద్ధతిని చేతనమైన ఇన్పుట్ పద్ధతులలోనికి జతచేయుము" #: ../setup/setup.ui.h:18 msgid "Advanced" @@ -419,101 +441,115 @@ msgid "Custom" msgstr "మలచుకొనిన" #: ../setup/setup.ui.h:24 -msgid "Embed preedit text in application window" -msgstr "అనువర్తనము విండో నందు ముందుగాసరికూర్చిన పాఠమును యెంబెడ్ చేయుము" +msgid "Disable:" +msgstr "అచేతనపరుచు:" #: ../setup/setup.ui.h:25 -msgid "Embed the preedit text of input method in the application window" -msgstr "అనువర్తనము విండోనందు యిన్పుట్ పద్దతి యొక్క ముందుగాసరికూర్చిన పాఠమును యెంబెడ్ చేయుము" +msgid "Embed preedit text in application window" +msgstr "అనువర్తనము విండో నందు ముందుగాసరికూర్చిన పాఠమును ఎంబెడెడ్ చేయుము" #: ../setup/setup.ui.h:26 -msgid "Embedded in menu" -msgstr "మెనూనందు యెంబెడ్ చేయబడెను" +msgid "Embed the preedit text of input method in the application window" +msgstr "" +"అనువర్తనము విండోనందు ఇన్‌పుట్ పద్ధతి యొక్క ముందుగా సరికూర్చిన పాఠమును " +"ఎంబెడెడ్ చేయుము" #: ../setup/setup.ui.h:27 +msgid "Embedded in menu" +msgstr "మెనూనందు ఎంబెడెడ్ చేయబడెను" + +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "చేతనముచేయి లేదా అచేతనముచేయి:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "చేతనపరుచు" + +#: ../setup/setup.ui.h:30 msgid "General" -msgstr "సాదారణ" +msgstr "సాధారణ" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "అడ్డముగా" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "భాషా ప్యానల్ స్థానము:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" -msgstr "చేతనమైన యిన్పుట్ పద్దతులలో యెంపికైన యిన్పుట్ పద్దతిని క్రిందకి కదుపుము" +msgstr "" +"చేతనమైన ఇన్‌పుట్ పద్ధతులలో ఎంచుకున్న ఇన్‌పుట్ పద్ధతిని క్రిందకి కదుపుము" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" -msgstr "చేతనమైన యిన్పుట్ పద్దతులలో యెంపికైన యిన్పుట్ పద్దతిని పైకి కదుపుము" +msgstr "" +"చేతనమైన ఇన్‌పుట్ పద్ధతుల జాబితాలో ఎంచుకున్న ఇన్‌పుట్ పద్ధతిని పైకి కదుపుము" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" -msgstr "తరువాతి ఇన్పుట్ పద్దతి:" +msgstr "తరువాతి ఇన్‌పుట్ పద్ధతి:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" -msgstr "మునుపటి ఇన్పుట్ పద్దతి:" +msgstr "మునుపటి ఇన్‌పుట్ పద్ధతి:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" -msgstr "చేతనమైన యిన్పుట్ పద్దతులలో యెంపికైన యిన్పుట్ పద్దతిని తీసివేయుము" +msgstr "చేతనమైన ఇన్‌పుట్ పద్ధతుల నుంచి ఎంపికచేసిన ఇన్‌పుట్ పద్ధతిని తొలగించు" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" -msgstr "భాషా పట్టీని యెలా చూపాలి మరియు దాయాలి అనేదానికి ibus ప్రవర్తనను అమర్చుము" +msgstr "" +"భాషా పట్టీని ఎలా చూపాలి మరియు దాయాలి అనేదానికి ibus ప్రవర్తనను అమర్చుము" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "లుకప్ పట్టికనందు కాండిడేట్ల సర్దుబాటును అమర్చుము" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" -msgstr "ఎంపికచేసిన యిన్పుట్ పద్దతి యొక్క సమాచారమును చూపుము" +msgstr "ఎంచుకున్న ఇన్‌పుట్ పద్ధతి యొక్క సమాచారాన్ని చూపించు" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" -msgstr "చెక్‌బాక్సు చెక్ చేసినప్పుడు భాషా పట్టీపై యిన్పుట్ పద్దతి నామము చూపుము" +msgstr "" +"చెక్‌బాక్సు చెక్ చేసినప్పుడు భాషా పట్టీపై ఇన్‌పుట్ పద్ధతి పేరును చూపించు" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" -msgstr "భాషా ప్యానల్ చూపుము:" +msgstr "భాషా ప్యానల్ చూపించు:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "లాగిన్‌నందు ibus ప్రారంభించుము" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" -msgstr "జాబితానందలి తరువాతి యిన్పుట్ పద్దతినకు మారుటకు లఘువులు" +msgstr "జాబితాలో ఉన్న తరువాతి ఇన్‌పుట్ పద్ధతినకు మారుటకు లఘువులు" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" -msgstr "జాబితానందలి ముందరి యిన్పుట్ పద్దతినకు మారుటకు లఘువులు" +msgstr "జాబితానందలి ముందరి ఇన్‌పుట్ పద్ధతినకు మారుటకు లఘువులు" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "పై ఎడమ మూల" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "పై కుడి మూల" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" -msgstr "మలచుకొనిన ఫాంటు వుపయోగించుము:" +msgstr "మలచుకొనిన ఫాంటు ఉపయోగించుము:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" -msgstr "వెర్టికల్" +msgstr "నిలువుగా" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" -msgstr "క్రియాశీలముగా వున్నప్పుడు" +msgstr "క్రియాశీలముగా ఉన్నప్పుడు" diff --git a/po/tg.po b/po/tg.po new file mode 100644 index 000000000..d2584846e --- /dev/null +++ b/po/tg.po @@ -0,0 +1,522 @@ +# translation of ibus.pot to Tajik +# Tajik translation of ibus. +# Copyright (C) 2008 Peng Huang +# This file is distributed under the same license as the ibus package. +# +# Translators: +# tajikfedora , 2011. +msgid "" +msgstr "" +"Project-Id-Version: IBus\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-12-09 09:55+0000\n" +"Last-Translator: tajikfedora \n" +"Language-Team: Tajik (http://www.transifex.net/projects/p/fedora/team/tg/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: tg\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../bus/ibus.desktop.in.h:1 +msgid "IBus" +msgstr "" + +#: ../bus/ibus.desktop.in.h:2 +msgid "Input Method Framework" +msgstr "" + +#: ../bus/ibus.desktop.in.h:3 +msgid "Start IBus Input Method Framework" +msgstr "" + +#: ../ibus/_config.py.in:40 +msgid "" +"Copyright (c) 2007-2010 Peng Huang\n" +"Copyright (c) 2007-2010 Red Hat, Inc." +msgstr "" + +#: ../ibus/lang.py:41 +msgid "Other" +msgstr "Дигар" + +#: ../ui/gtk/candidatepanel.py:264 +msgid "Previous page" +msgstr "Саҳифаи пешина" + +#: ../ui/gtk/candidatepanel.py:269 +msgid "Next page" +msgstr "Саҳифаи навбатӣ" + +#: ../ui/gtk/main.py:62 +msgid "" +"Some input methods have been installed, removed or updated. Please restart " +"ibus input platform." +msgstr "" + +#: ../ui/gtk/main.py:66 +msgid "Restart Now" +msgstr "" + +#: ../ui/gtk/main.py:67 +msgid "Later" +msgstr "Баъдтар" + +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "Лавҳаи IBus" + +#: ../ui/gtk/panel.py:122 +msgid "IBus input method framework" +msgstr "" + +#: ../ui/gtk/panel.py:352 +msgid "Restart" +msgstr "Бозоғозӣ" + +#: ../ui/gtk/panel.py:439 +msgid "Turn off input method" +msgstr "" + +#: ../ui/gtk/panel.py:478 +msgid "No input window" +msgstr "" + +#: ../ui/gtk/panel.py:509 +msgid "IBus is an intelligent input bus for Linux/Unix." +msgstr "" + +#: ../ui/gtk/panel.py:513 +msgid "translator-credits" +msgstr "" + +#: ../ui/gtk/languagebar.py:106 +msgid "About the input method" +msgstr "" + +#: ../ui/gtk/languagebar.py:214 +msgid "Switch input method" +msgstr "" + +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 +msgid "About" +msgstr "Дар бораи" + +#: ../ui/gtk/languagebar.py:361 +msgid "About the Input Method" +msgstr "" + +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 +#, python-format +msgid "Language: %s\n" +msgstr "Забон: %s\n" + +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#, python-format +msgid "Keyboard layout: %s\n" +msgstr "" + +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#, python-format +msgid "Author: %s\n" +msgstr "Муаллиф: %s\n" + +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +msgid "Description:\n" +msgstr "Шарҳ:\n" + +#: ../setup/main.py:102 +msgid "trigger" +msgstr "оғоздиҳӣ" + +#: ../setup/main.py:113 +msgid "enable" +msgstr "фаъол" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "ғайрифаъол" + +#: ../setup/main.py:135 +msgid "next input method" +msgstr "" + +#: ../setup/main.py:146 +msgid "previous input method" +msgstr "" + +#: ../setup/main.py:286 +msgid "IBus daemon is not started. Do you want to start it now?" +msgstr "" + +#: ../setup/main.py:301 +msgid "" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" +" export GTK_IM_MODULE=ibus\n" +" export XMODIFIERS=@im=ibus\n" +" export QT_IM_MODULE=ibus" +msgstr "" + +#: ../setup/main.py:316 +#, python-format +msgid "Select keyboard shortcut for %s" +msgstr "" + +#: ../setup/keyboardshortcut.py:52 +msgid "Keyboard shortcuts" +msgstr "Миёнбурҳои клавиатура" + +#: ../setup/keyboardshortcut.py:63 +msgid "Key code:" +msgstr "Рамзи тугма:" + +#: ../setup/keyboardshortcut.py:78 +msgid "Modifiers:" +msgstr "" + +#: ../setup/keyboardshortcut.py:231 +msgid "" +"Please press a key (or a key combination).\n" +"The dialog will be closed when the key is released." +msgstr "" + +#: ../setup/keyboardshortcut.py:233 +msgid "Please press a key (or a key combination)" +msgstr "" + +#: ../setup/enginecombobox.py:120 +msgid "Select an input method" +msgstr "" + +#. create im name & icon column +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 +msgid "Input Method" +msgstr "" + +#: ../setup/enginetreeview.py:92 +msgid "Kbd" +msgstr "Kbd" + +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 +msgid "IBus Preferences" +msgstr "" + +#: ../setup/ibus-setup.desktop.in.h:2 +msgid "Set IBus Preferences" +msgstr "" + +#: ../data/ibus.schemas.in.h:1 +msgid "Auto hide" +msgstr "Пинҳонкунии худкор" + +#: ../data/ibus.schemas.in.h:2 +msgid "Custom font" +msgstr "" + +#: ../data/ibus.schemas.in.h:3 +msgid "Custom font name for language panel" +msgstr "" + +#: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "" + +#: ../data/ibus.schemas.in.h:5 +msgid "Embed Preedit Text" +msgstr "" + +#: ../data/ibus.schemas.in.h:6 +msgid "Embed Preedit Text in Application Window" +msgstr "" + +#: ../data/ibus.schemas.in.h:7 +msgid "Enable input method by default" +msgstr "" + +#: ../data/ibus.schemas.in.h:8 +msgid "Enable input method by default when the application gets input focus" +msgstr "" + +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "" + +#: ../data/ibus.schemas.in.h:10 +msgid "Language panel position" +msgstr "" + +#: ../data/ibus.schemas.in.h:11 +msgid "Next engine shortcut keys" +msgstr "" + +#: ../data/ibus.schemas.in.h:12 +msgid "Orientation of lookup table" +msgstr "" + +#: ../data/ibus.schemas.in.h:13 +msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" +msgstr "" + +#: ../data/ibus.schemas.in.h:14 +msgid "Preload engines" +msgstr "" + +#: ../data/ibus.schemas.in.h:15 +msgid "Preload engines during ibus starts up" +msgstr "" + +#: ../data/ibus.schemas.in.h:16 +msgid "Prev engine shortcut keys" +msgstr "" + +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 +msgid "Share the same input method among all applications" +msgstr "" + +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +msgid "Show icon on system tray" +msgstr "" + +#: ../data/ibus.schemas.in.h:19 +msgid "Show input method name" +msgstr "" + +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 +msgid "Show input method name on language bar" +msgstr "" + +#: ../data/ibus.schemas.in.h:21 +msgid "" +"The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " +"Always show" +msgstr "" + +#: ../data/ibus.schemas.in.h:22 +msgid "" +"The position of the language panel. 0 = Top left corner, 1 = Top right " +"corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" +msgstr "" + +#: ../data/ibus.schemas.in.h:23 +msgid "The shortcut keys for switching to the next input method in the list" +msgstr "" + +#: ../data/ibus.schemas.in.h:24 +msgid "The shortcut keys for switching to the previous input method" +msgstr "" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 +msgid "The shortcut keys for turning input method on or off" +msgstr "" + +#: ../data/ibus.schemas.in.h:28 +msgid "Trigger shortcut keys" +msgstr "" + +#: ../data/ibus.schemas.in.h:29 +msgid "Use custom font" +msgstr "" + +#: ../data/ibus.schemas.in.h:30 +msgid "Use custom font name for language panel" +msgstr "" + +#: ../data/ibus.schemas.in.h:31 +msgid "Use global input method" +msgstr "" + +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 +msgid "Use system keyboard (XKB) layout" +msgstr "" + +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 +msgid "Use system keyboard layout" +msgstr "" + +#: ../setup/setup.ui.h:1 +msgid "..." +msgstr "..." + +#: ../setup/setup.ui.h:2 +msgid "Font and Style" +msgstr "" + +#: ../setup/setup.ui.h:3 +msgid "Global input method settings" +msgstr "" + +#: ../setup/setup.ui.h:4 +msgid "Keyboard Layout" +msgstr "" + +#: ../setup/setup.ui.h:5 +msgid "Keyboard Shortcuts" +msgstr "" + +#: ../setup/setup.ui.h:6 +msgid "Startup" +msgstr "" + +#: ../setup/setup.ui.h:7 +msgid "" +"IBus\n" +"The intelligent input bus\n" +"Homepage: http://code.google.com/p/ibus\n" +"\n" +"\n" +"\n" +msgstr "" + +#: ../setup/setup.ui.h:14 +msgid "" +"The default input method is the top one in the list.\n" +"You may use up/down buttons to change it." +msgstr "" + +#: ../setup/setup.ui.h:17 +msgid "Add the selected input method into the enabled input methods" +msgstr "" + +#: ../setup/setup.ui.h:18 +msgid "Advanced" +msgstr "" + +#: ../setup/setup.ui.h:19 +msgid "Always" +msgstr "Ҳамеша" + +#: ../setup/setup.ui.h:20 +msgid "Bottom left corner" +msgstr "" + +#: ../setup/setup.ui.h:21 +msgid "Bottom right corner" +msgstr "" + +#: ../setup/setup.ui.h:22 +msgid "Candidates orientation:" +msgstr "" + +#: ../setup/setup.ui.h:23 +msgid "Custom" +msgstr "Танзимот" + +#: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "Хомӯшкунӣ:" + +#: ../setup/setup.ui.h:25 +msgid "Embed preedit text in application window" +msgstr "" + +#: ../setup/setup.ui.h:26 +msgid "Embed the preedit text of input method in the application window" +msgstr "" + +#: ../setup/setup.ui.h:27 +msgid "Embedded in menu" +msgstr "" + +#: ../setup/setup.ui.h:28 +msgid "Enable or disable:" +msgstr "" + +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "Фаъолсозӣ:" + +#: ../setup/setup.ui.h:30 +msgid "General" +msgstr "Умумӣ" + +#: ../setup/setup.ui.h:31 +msgid "Horizontal" +msgstr "Уфуқӣ" + +#: ../setup/setup.ui.h:34 +msgid "Language panel position:" +msgstr "" + +#: ../setup/setup.ui.h:35 +msgid "Move down the selected input method in the enabled input methods" +msgstr "" + +#: ../setup/setup.ui.h:36 +msgid "Move up the selected input method in the enabled input methods list" +msgstr "" + +#: ../setup/setup.ui.h:37 +msgid "Next input method:" +msgstr "" + +#: ../setup/setup.ui.h:38 +msgid "Previous input method:" +msgstr "" + +#: ../setup/setup.ui.h:39 +msgid "Remove the selected input method from the enabled input methods" +msgstr "" + +#: ../setup/setup.ui.h:40 +msgid "Set the behavior of ibus how to show or hide language bar" +msgstr "" + +#: ../setup/setup.ui.h:41 +msgid "Set the orientation of candidates in lookup table" +msgstr "" + +#: ../setup/setup.ui.h:44 +msgid "Show information of the selected input method" +msgstr "" + +#: ../setup/setup.ui.h:46 +msgid "Show input method's name on language bar when check the checkbox" +msgstr "" + +#: ../setup/setup.ui.h:47 +msgid "Show language panel:" +msgstr "" + +#: ../setup/setup.ui.h:48 +msgid "Start ibus on login" +msgstr "" + +#: ../setup/setup.ui.h:49 +msgid "The shortcut keys for switching to next input method in the list" +msgstr "" + +#: ../setup/setup.ui.h:50 +msgid "The shortcut keys for switching to previous input method in the list" +msgstr "" + +#: ../setup/setup.ui.h:52 +msgid "Top left corner" +msgstr "" + +#: ../setup/setup.ui.h:53 +msgid "Top right corner" +msgstr "" + +#: ../setup/setup.ui.h:54 +msgid "Use custom font:" +msgstr "" + +#: ../setup/setup.ui.h:57 +msgid "Vertical" +msgstr "Амудӣ" + +#: ../setup/setup.ui.h:58 +msgid "When active" +msgstr "" + + diff --git a/po/uk.po b/po/uk.po new file mode 100644 index 000000000..aa53b710b --- /dev/null +++ b/po/uk.po @@ -0,0 +1,554 @@ +# translation of uk.po to Ukrainian +# Ukrainian translation of ibus. +# This file is distributed under the same license as the ibus package. +# +# Yuri Chornoivan , 2011. +msgid "" +msgstr "" +"Project-Id-Version: IBus\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-05-13 05:04+0000\n" +"Last-Translator: yurchor \n" +"Language-Team: Ukrainian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: uk\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: ../bus/ibus.desktop.in.h:1 +msgid "IBus" +msgstr "IBus" + +#: ../bus/ibus.desktop.in.h:2 +msgid "Input Method Framework" +msgstr "Оболонка способів введення" + +#: ../bus/ibus.desktop.in.h:3 +msgid "Start IBus Input Method Framework" +msgstr "Запуск оболонки способів введення IBus" + +#: ../ibus/_config.py.in:40 +msgid "" +"Copyright (c) 2007-2010 Peng Huang\n" +"Copyright (c) 2007-2010 Red Hat, Inc." +msgstr "" +"© Peng Huang, 2007–2010\n" +"© Red Hat, Inc., 2007–2010" + +#: ../ibus/lang.py:41 +msgid "Other" +msgstr "Інше" + +#: ../ui/gtk/candidatepanel.py:264 +msgid "Previous page" +msgstr "Попередня сторінка" + +#: ../ui/gtk/candidatepanel.py:269 +msgid "Next page" +msgstr "Наступна сторінка" + +#: ../ui/gtk/main.py:62 +msgid "" +"Some input methods have been installed, removed or updated. Please restart " +"ibus input platform." +msgstr "" +"Встановлено, вилучено або оновлено деякі зі способів введення. Будь ласка, " +"перезапустіть платформу введення ibus." + +#: ../ui/gtk/main.py:66 +msgid "Restart Now" +msgstr "Перезапустити зараз" + +#: ../ui/gtk/main.py:67 +msgid "Later" +msgstr "Пізніше" + +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "Панель IBus" + +#: ../ui/gtk/panel.py:122 +msgid "IBus input method framework" +msgstr "Оболонка способів введення IBus" + +#: ../ui/gtk/panel.py:352 +msgid "Restart" +msgstr "Перезапустити" + +#: ../ui/gtk/panel.py:439 +msgid "Turn off input method" +msgstr "Вимкнути спосіб введення" + +#: ../ui/gtk/panel.py:478 +msgid "No input window" +msgstr "Немає вікна введення" + +#: ../ui/gtk/panel.py:509 +msgid "IBus is an intelligent input bus for Linux/Unix." +msgstr "IBus — інтелектуальний канал введення даних у Linux/Unix." + +#: ../ui/gtk/panel.py:513 +msgid "translator-credits" +msgstr "Юрій Чорноіван " + +#: ../ui/gtk/languagebar.py:106 +msgid "About the input method" +msgstr "Про спосіб введення" + +#: ../ui/gtk/languagebar.py:214 +msgid "Switch input method" +msgstr "Перемкнути спосіб введення" + +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 +msgid "About" +msgstr "Інформація" + +#: ../ui/gtk/languagebar.py:361 +msgid "About the Input Method" +msgstr "Про спосіб введення" + +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 +#, python-format +msgid "Language: %s\n" +msgstr "Мова: %s\n" + +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#, python-format +msgid "Keyboard layout: %s\n" +msgstr "Розкладка клавіатури: %s\n" + +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#, python-format +msgid "Author: %s\n" +msgstr "Автор: %s\n" + +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +msgid "Description:\n" +msgstr "Опис:\n" + +#: ../setup/main.py:102 +msgid "trigger" +msgstr "перемикач" + +#: ../setup/main.py:113 +msgid "enable" +msgstr "увімкнути" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "вимкнути" + +#: ../setup/main.py:135 +msgid "next input method" +msgstr "наступний спосіб введення" + +#: ../setup/main.py:146 +msgid "previous input method" +msgstr "попередній спосіб введення" + +#: ../setup/main.py:286 +msgid "IBus daemon is not started. Do you want to start it now?" +msgstr "Фонову службу не запущено IBus. Запустити її зараз?" + +#: ../setup/main.py:301 +msgid "" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" +" export GTK_IM_MODULE=ibus\n" +" export XMODIFIERS=@im=ibus\n" +" export QT_IM_MODULE=ibus" +msgstr "" +"IBus запущено! Якщо ви не можете скористатися IBus, будь ласка, додайте наведені нижче рядки до вашого файла $HOME/.bashrc, вийдіть з облікового запису і знову до нього увійдіть.\n" +" export GTK_IM_MODULE=ibus\n" +" export XMODIFIERS=@im=ibus\n" +" export QT_IM_MODULE=ibus" + +#: ../setup/main.py:316 +#, python-format +msgid "Select keyboard shortcut for %s" +msgstr "Виберіть клавіатурне скорочення для дії %s" + +#: ../setup/keyboardshortcut.py:52 +msgid "Keyboard shortcuts" +msgstr "Клавіатурні скорочення" + +#: ../setup/keyboardshortcut.py:63 +msgid "Key code:" +msgstr "Код клавіші:" + +#: ../setup/keyboardshortcut.py:78 +msgid "Modifiers:" +msgstr "Модифікатори:" + +#: ../setup/keyboardshortcut.py:231 +msgid "" +"Please press a key (or a key combination).\n" +"The dialog will be closed when the key is released." +msgstr "" +"Будь ласка, натисніть клавішу (або комбінацію клавіш).\n" +"Діалогове вікно буде закрито після відпускання клавіші." + +#: ../setup/keyboardshortcut.py:233 +msgid "Please press a key (or a key combination)" +msgstr "Будь ласка, натисніть клавішу (або комбінацію клавіш)" + +#: ../setup/enginecombobox.py:120 +msgid "Select an input method" +msgstr "Виберіть спосіб введення" + +#. create im name & icon column +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 +msgid "Input Method" +msgstr "Спосіб введення" + +#: ../setup/enginetreeview.py:92 +msgid "Kbd" +msgstr "Kbd" + +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 +msgid "IBus Preferences" +msgstr "Налаштування IBus" + +#: ../setup/ibus-setup.desktop.in.h:2 +msgid "Set IBus Preferences" +msgstr "Налаштувати IBus" + +#: ../data/ibus.schemas.in.h:1 +msgid "Auto hide" +msgstr "Автоматично ховати" + +#: ../data/ibus.schemas.in.h:2 +msgid "Custom font" +msgstr "Нетиповий шрифт" + +#: ../data/ibus.schemas.in.h:3 +msgid "Custom font name for language panel" +msgstr "Назва нетипового шрифту для мовної панелі" + +#: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "Вимкнути клавіатурні скорочення" + +#: ../data/ibus.schemas.in.h:5 +msgid "Embed Preedit Text" +msgstr "Вбудувати попередньо створений текст" + +#: ../data/ibus.schemas.in.h:6 +msgid "Embed Preedit Text in Application Window" +msgstr "Вбудувати попередньо створений текст у вікно програми" + +#: ../data/ibus.schemas.in.h:7 +msgid "Enable input method by default" +msgstr "Типово увімкнути спосіб введення" + +#: ../data/ibus.schemas.in.h:8 +msgid "Enable input method by default when the application gets input focus" +msgstr "" +"Типово увімкнути спосіб введення, коли програма отримує фокус введення" + +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "Увімкнути клавіатурні скорочення" + +#: ../data/ibus.schemas.in.h:10 +msgid "Language panel position" +msgstr "Розташування мовної панелі" + +#: ../data/ibus.schemas.in.h:11 +msgid "Next engine shortcut keys" +msgstr "Скорочення для наступного рушія" + +#: ../data/ibus.schemas.in.h:12 +msgid "Orientation of lookup table" +msgstr "Орієнтація таблиці пошуку" + +#: ../data/ibus.schemas.in.h:13 +msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" +msgstr "Орієнтація таблиці пошуку. 0 = горизонтально, 1 = вертикально" + +#: ../data/ibus.schemas.in.h:14 +msgid "Preload engines" +msgstr "Попередньо завантажувати рушії" + +#: ../data/ibus.schemas.in.h:15 +msgid "Preload engines during ibus starts up" +msgstr "Попередньо завантажувати рушії під час запуску ibus" + +#: ../data/ibus.schemas.in.h:16 +msgid "Prev engine shortcut keys" +msgstr "Скорочення для попереднього рушія" + +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 +msgid "Share the same input method among all applications" +msgstr "Використовувати один спосіб введення для всіх програм" + +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +msgid "Show icon on system tray" +msgstr "Показувати піктограму у системному лотку" + +#: ../data/ibus.schemas.in.h:19 +msgid "Show input method name" +msgstr "Показувати назву способу введення" + +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 +msgid "Show input method name on language bar" +msgstr "Показувати назву способу введення на мовній панелі" + +#: ../data/ibus.schemas.in.h:21 +msgid "" +"The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " +"Always show" +msgstr "" +"Поведінка мовної панелі. 0 = вбудувати до меню, 1 = автоматично ховати, 2 = " +"завжди показувати" + +#: ../data/ibus.schemas.in.h:22 +msgid "" +"The position of the language panel. 0 = Top left corner, 1 = Top right " +"corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" +msgstr "" +"Розташування мовної панелі. 0 = у верхньому лівому куті, 1 = у верхньому " +"правому куті, 2 = у нижньому лівому куті, 3 = у нижньому правому куті, 4 = " +"нетипове" + +#: ../data/ibus.schemas.in.h:23 +msgid "The shortcut keys for switching to the next input method in the list" +msgstr "" +"Клавіатурні скорочення для перемикання на наступний спосіб введення у списку" + +#: ../data/ibus.schemas.in.h:24 +msgid "The shortcut keys for switching to the previous input method" +msgstr "Клавіатурне скорочення для перемикання на попередній спосіб введення" + +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "Клавіатурне скорочення для вимикання способів введення" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "Клавіатурне скорочення для вмикання способів введення" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 +msgid "The shortcut keys for turning input method on or off" +msgstr "Клавіатурне скорочення для вмикання і вимикання способів введення" + +#: ../data/ibus.schemas.in.h:28 +msgid "Trigger shortcut keys" +msgstr "Клавіатурні скорочення-перемикачі" + +#: ../data/ibus.schemas.in.h:29 +msgid "Use custom font" +msgstr "Використовувати нетиповий шрифт" + +#: ../data/ibus.schemas.in.h:30 +msgid "Use custom font name for language panel" +msgstr "Використовувати нетиповий шрифт для мовної панелі" + +#: ../data/ibus.schemas.in.h:31 +msgid "Use global input method" +msgstr "Використовувати загальний спосіб введення" + +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 +msgid "Use system keyboard (XKB) layout" +msgstr "Використовувати розкладку клавіатури системи (XKB)" + +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 +msgid "Use system keyboard layout" +msgstr "Використовувати розкладку клавіатури системи" + +#: ../setup/setup.ui.h:1 +msgid "..." +msgstr "…" + +#: ../setup/setup.ui.h:2 +msgid "Font and Style" +msgstr "Шрифт і стиль" + +#: ../setup/setup.ui.h:3 +msgid "Global input method settings" +msgstr "Загальні параметри способів введення" + +#: ../setup/setup.ui.h:4 +msgid "Keyboard Layout" +msgstr "Розкладка клавіатури" + +#: ../setup/setup.ui.h:5 +msgid "Keyboard Shortcuts" +msgstr "Клавіатурні скорочення" + +#: ../setup/setup.ui.h:6 +msgid "Startup" +msgstr "Запуск" + +#: ../setup/setup.ui.h:7 +msgid "" +"IBus\n" +"The intelligent input bus\n" +"Homepage: http://code.google.com/p/ibus\n" +"\n" +"\n" +"\n" +msgstr "" +"IBus\n" +"Інтелектуальний канал введення\n" +"Домашня сторінка: http://code.google.com/p/ibus\n" +"\n" +"\n" +"\n" + +#: ../setup/setup.ui.h:14 +msgid "" +"The default input method is the top one in the list.\n" +"You may use up/down buttons to change it." +msgstr "" +"Типовий спосіб введення — найвищий пункт у списку.\n" +"Змінити порядок пунктів можна за допомогою кнопок «Вгору/Вниз»." + +#: ../setup/setup.ui.h:17 +msgid "Add the selected input method into the enabled input methods" +msgstr "" +"Додати позначений спосіб введення до списку увімкнених способів введення" + +#: ../setup/setup.ui.h:18 +msgid "Advanced" +msgstr "Додатково" + +#: ../setup/setup.ui.h:19 +msgid "Always" +msgstr "Завжди" + +#: ../setup/setup.ui.h:20 +msgid "Bottom left corner" +msgstr "У нижньому лівому куті" + +#: ../setup/setup.ui.h:21 +msgid "Bottom right corner" +msgstr "У нижньому правому куті" + +#: ../setup/setup.ui.h:22 +msgid "Candidates orientation:" +msgstr "Орієнтація варіантів:" + +#: ../setup/setup.ui.h:23 +msgid "Custom" +msgstr "Нетиповий" + +#: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "Вимкнути:" + +#: ../setup/setup.ui.h:25 +msgid "Embed preedit text in application window" +msgstr "Вбудувати попередньо створений текст у вікно програми" + +#: ../setup/setup.ui.h:26 +msgid "Embed the preedit text of input method in the application window" +msgstr "" +"Вбудувати попередньо створений текст способу введення у вікно програми" + +#: ../setup/setup.ui.h:27 +msgid "Embedded in menu" +msgstr "Вбудувати у меню" + +#: ../setup/setup.ui.h:28 +msgid "Enable or disable:" +msgstr "Увімкнення або вимикання:" + +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "Увімкнути:" + +#: ../setup/setup.ui.h:30 +msgid "General" +msgstr "Загальне" + +#: ../setup/setup.ui.h:31 +msgid "Horizontal" +msgstr "Горизонтально" + +#: ../setup/setup.ui.h:34 +msgid "Language panel position:" +msgstr "Розташування мовної панелі:" + +#: ../setup/setup.ui.h:35 +msgid "Move down the selected input method in the enabled input methods" +msgstr "" +"Пересунути нижче позначений спосіб введення у списку увімкнених способів " +"введення" + +#: ../setup/setup.ui.h:36 +msgid "Move up the selected input method in the enabled input methods list" +msgstr "" +"Пересунути вгору позначений спосіб введення у списку увімкнених способів " +"введення" + +#: ../setup/setup.ui.h:37 +msgid "Next input method:" +msgstr "Наступний спосіб введення:" + +#: ../setup/setup.ui.h:38 +msgid "Previous input method:" +msgstr "Попередній спосіб введення:" + +#: ../setup/setup.ui.h:39 +msgid "Remove the selected input method from the enabled input methods" +msgstr "" +"Вилучити позначений спосіб введення зі списку увімкнених способів введення" + +#: ../setup/setup.ui.h:40 +msgid "Set the behavior of ibus how to show or hide language bar" +msgstr "Визначає поведінку ibus: спосіб показу або приховування мовної панелі" + +#: ../setup/setup.ui.h:41 +msgid "Set the orientation of candidates in lookup table" +msgstr "Встановити орієнтацію варіантів у таблиці пошуку" + +#: ../setup/setup.ui.h:44 +msgid "Show information of the selected input method" +msgstr "Показати відомості щодо вибраного способу введення" + +#: ../setup/setup.ui.h:46 +msgid "Show input method's name on language bar when check the checkbox" +msgstr "" +"Показати назву способу введення на мовній панелі, якщо позначено цей пункт" + +#: ../setup/setup.ui.h:47 +msgid "Show language panel:" +msgstr "Показ мовної панелі:" + +#: ../setup/setup.ui.h:48 +msgid "Start ibus on login" +msgstr "Запускати ibus при вході" + +#: ../setup/setup.ui.h:49 +msgid "The shortcut keys for switching to next input method in the list" +msgstr "" +"Клавіатурні скорочення для перемикання на наступний спосіб введення у списку" + +#: ../setup/setup.ui.h:50 +msgid "The shortcut keys for switching to previous input method in the list" +msgstr "" +"Клавіатурне скорочення для перемикання на попередній спосіб введення у " +"списку" + +#: ../setup/setup.ui.h:52 +msgid "Top left corner" +msgstr "У верхньому лівому куті" + +#: ../setup/setup.ui.h:53 +msgid "Top right corner" +msgstr "У верхньому правому куті" + +#: ../setup/setup.ui.h:54 +msgid "Use custom font:" +msgstr "Нетиповий шрифт:" + +#: ../setup/setup.ui.h:57 +msgid "Vertical" +msgstr "Вертикально" + +#: ../setup/setup.ui.h:58 +msgid "When active" +msgstr "Якщо активна" diff --git a/po/vi.po b/po/vi.po index 00ed2b8a1..205be9c1d 100644 --- a/po/vi.po +++ b/po/vi.po @@ -7,10 +7,11 @@ msgid "" msgstr "" "Project-Id-Version: data 1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" +"POT-Creation-Date: 2011-02-12 00:41+0900\n" "PO-Revision-Date: 2010-06-01 13:17+0700\n" "Last-Translator: Lê Quốc Tuấn \n" "Language-Team: Vietnamese\n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -30,7 +31,7 @@ msgstr "Bộ gõ IBus" msgid "Start IBus Input Method Framework" msgstr "Bộ gõ IBus" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -42,15 +43,15 @@ msgstr "" msgid "Other" msgstr "Khác" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "Trang trước" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "Trang sau" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." @@ -58,92 +59,100 @@ msgstr "" "Một vài kiểu gõ vừa được cài đặt, xóa hoặc cập nhật. Vui lòng khởi động lại " "bộ gõ ibus." -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 msgid "Restart Now" msgstr "Khởi động lại ngay" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 msgid "Later" msgstr "Sau" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "Bộ gõ IBus" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "Khởi động lại" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 msgid "Turn off input method" msgstr "Tắt kiểu gõ" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "Không có cửa sổ nhập" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus là một bộ gõ thông minh cho Linux/Unix." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "Lê Quốc Tuấn " -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "Giới thiệu về kiểu gõ" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "Chuyển kiểu gõ" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "Giới thiệu" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "Giới thiệu về kiểu gõ" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "Ngôn ngữ: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "Bố trí bàn phím: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "Tác giả: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "Mô tả:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "kích hoạt" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "" + +#: ../setup/main.py:135 msgid "next input method" msgstr "chuyển đến kiểu gõ kế tiếp" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "chuyển đến kiểu gõ trước" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "" "Trình nền IBus chưa được khởi động. Bạn có muốn khởi động nó ngay bây giờ?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" "IBus has been started! If you can not use IBus, please add below lines in " "$HOME/.bashrc, and relogin your desktop.\n" @@ -157,24 +166,24 @@ msgstr "" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "Chọn phím tắt để %s" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "Những phím tắt" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "Mã phím:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "Phím bổ sung:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -182,7 +191,7 @@ msgstr "" "Vui lòng nhấn một phím (hoặc tổ hợp phím).\n" "Hộp thoại này sẽ được đóng lại khi bạn thả phím ấn." -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "Vui lòng nhấn một phím (hoặc tổ hợp phím)" @@ -191,15 +200,15 @@ msgid "Select an input method" msgstr "Chọn một kiểu gõ" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "Kiểu gõ" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "Tùy chọn IBus" @@ -265,11 +274,11 @@ msgstr "Nạp trước các kiểu gõ khi khởi động ibus" msgid "Prev engine shortcut keys" msgstr "Phím tắt cho kiểu gõ trước" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "Chia sẻ cùng kiểu gõ cho tất cả các ứng dụng" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "Hiển thị biểu tượng trên khay hệ thống" @@ -277,7 +286,7 @@ msgstr "Hiển thị biểu tượng trên khay hệ thống" msgid "Show input method name" msgstr "Hiển thị tên kiểu gõ" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "Hiển thị tên kiểu gõ trên thanh ngôn ngữ" @@ -307,7 +316,7 @@ msgstr "Phím tắt dùng để chuyển đến kiểu gõ kế tiếp trong dan msgid "The shortcut keys for switching to the previous input method" msgstr "Phím tắt dùng để chuyển về kiểu gõ trước trong danh sách" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "Phím tắt để bật hoặc tắt kiểu gõ" @@ -327,11 +336,11 @@ msgstr "Dùng phông tùy biến cho thanh ngôn ngữ" msgid "Use global input method" msgstr "Dùng chung kiểu gõ cho toàn hệ thống" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "Dùng kiểu bố trí bàn phím hệ thống (XKB)" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "Dùng kiểu bố trí bàn phím của hệ thống" @@ -412,103 +421,111 @@ msgid "Custom" msgstr "Tùy biến" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "Nhúng văn bản tiền soạn thảo trong cửa sổ ứng dụng" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "Nhúng văn bản tiền soạn thảo của bộ gõ trong cửa sổ ứng dụng" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "Nhúng vào menu" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "Bật hoặc tắt:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "Chung" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "Ngang" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "Vị trí thanh ngôn ngữ:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "" "Di chuyển kiểu gõ đã chọn xuống dưới trong những kiểu gõ cho phép sử dụng" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "" "Di chuyển kiểu gõ đã chọn lên trên trong những kiểu gõ cho phép sử dụng" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "Kiểu gõ kế tiếp:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "Kiểu gõ trước:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "Xóa kiểu gõ đã chọn ra khỏi những kiểu gõ cho phép sử dụng" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "Thiết lập việc ẩn hay hiển thị thanh ngôn ngữ" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "Đặt hướng của từ gợi ý trong bảng tra cứu" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "Hiển thị thông tin về kiểu gõ đã chọn" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "Hiển thị tên của kiểu gõ trên thanh ngôn ngữ khi đánh dấu vào ô kiểm" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "Hiển thị thanh ngôn ngữ:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "Khởi động ibus khi đăng nhập" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "Phím tắt dùng để chuyển đến kiểu gõ kế tiếp trong danh sách" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "Phím tắt dùng để chuyển về kiểu gõ trước trong danh sách" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "Góc trên bên trái" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "Góc trên bên phải" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "Dùng phông chữ tùy biến:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "Dọc" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "Khi hoạt động" diff --git a/po/zh_CN.po b/po/zh_CN.po index f5cf2dfa9..95667b8a9 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -1,20 +1,26 @@ -# Translation for ibus. +# translation of ibus.master.po to Simplified Chinese +# Simplified Chinese Translation for ibus. # Copyright (C) 2007-2010 Peng Huang # This file is distributed under the same license as the ibus package. -# Peng Huang , 2007-2010. # +# Peng Huang , 2007-2010. +# Leah Liu , 2010. +# ekd123 , 2011. +# simonyanix , 2011. msgid "" msgstr "" -"Project-Id-Version: 0.1.1.20080813\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" -"PO-Revision-Date: 2008-08-13 21:59+0800\n" -"Last-Translator: Peng Huang \n" -"Language-Team: Peng Huang \n" +"Project-Id-Version: ibus.master\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-05-14 07:23+0000\n" +"Last-Translator: simonyanix \n" +"Language-Team: Chinese (China) (http://www.transifex.net/projects/p/fedora/team/zh_CN/)\n" +"Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: KBabel 1.11.4\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" @@ -28,7 +34,7 @@ msgstr "输入法框架" msgid "Start IBus Input Method Framework" msgstr "启动IBus 输入法框架" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:40 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -40,136 +46,146 @@ msgstr "" msgid "Other" msgstr "其他" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "上一页" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "下一页" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:62 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "一些输入法已经被安装,删除或者更新了。请重新启动ibus输入平台。" -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:66 msgid "Restart Now" msgstr "现在重启" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:67 msgid "Later" msgstr "稍候" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "IBus面板" + +#: ../ui/gtk/panel.py:122 msgid "IBus input method framework" msgstr "IBus 输入法框架" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:352 msgid "Restart" msgstr "重新启动" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:439 msgid "Turn off input method" msgstr "关闭输入法" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:478 msgid "No input window" msgstr "没有输入窗口" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:509 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus is an intelligent input bus for Linux/Unix." -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:513 msgid "translator-credits" msgstr "Huang Peng " -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "关于输入法" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "切换输入法" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "关于" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "关于输入法" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "语言: %s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "键盘: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "作者: %s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "描述:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "开关" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "应用" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "禁用" + +#: ../setup/main.py:135 msgid "next input method" msgstr "下一输入法" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "上一输入法" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus 守护进程没有启动,您是否想现在启动它?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus 已经被成功启动!如果你不能正常使用IBus,请将下面代码加入到$HOME/.bashrc" -"中,并重新登录桌面。\n" +"IBus 已经被成功启动!如果你不能正常使用IBus,请将下面代码加入到$HOME/.bashrc中,并重新登录桌面。\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "选择%s的快捷键" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "快捷键" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "按键:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "修饰符:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -177,7 +193,7 @@ msgstr "" "请按一个键盘按键(或者一个组合按键)\n" "当您松开任意按键时,对话框会自动关闭。" -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "请按一个键盘按键(或者一个组合按键)" @@ -186,15 +202,15 @@ msgid "Select an input method" msgstr "选择输入法" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "输入法" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "Kbd" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus 设置" @@ -215,110 +231,126 @@ msgid "Custom font name for language panel" msgstr "自定义语言栏字体" #: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "禁用快捷键" + +#: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text" msgstr "内嵌编辑模式" -#: ../data/ibus.schemas.in.h:5 +#: ../data/ibus.schemas.in.h:6 msgid "Embed Preedit Text in Application Window" msgstr "在应用程序窗口中启用内嵌编辑模式" -#: ../data/ibus.schemas.in.h:6 +#: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default" msgstr "默认启动输入法" -#: ../data/ibus.schemas.in.h:7 +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" -msgstr "" +msgstr "当应用程序需要使用输入时自动启用输入法" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "应用快捷键" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "语言栏位置" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" msgstr "下一个引擎快捷键" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "候选词表方向" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "候选词表方向。0 = 水平,1 = 竖直。" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "预加载引擎" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "ibus启动时预加载的引擎" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" msgstr "上一个引擎快捷键" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "在所有应用程序中共享同一个输入法" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "在系统托盘上显示图标" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "在语言栏上显示输入法名字" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "在语言栏上显示输入法名字" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" msgstr "语言栏行为。0 = 嵌入菜单,1 = 自动隐藏,2 = 总是显示。" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" msgstr "语言栏位置" -#: ../data/ibus.schemas.in.h:21 +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" msgstr "切换下一个输入法快捷键" -#: ../data/ibus.schemas.in.h:22 +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" msgstr "切换上一个输入法快捷键" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "关闭输入法的快捷键" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "开启输入法的快捷键" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "打开关闭输入法的快捷键" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "触发快捷键" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "使用自定义字体" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "语言栏是否使用自定义字体" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "使用全局输入法" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "使用系统键盘(XKB)布局" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "使用系统键盘布局" @@ -399,104 +431,109 @@ msgid "Custom" msgstr "自定义" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "禁用:" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "在应用程序窗口中启用内嵌编辑模式" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "在应用程序窗口中启用输入法的内嵌编辑模式" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "嵌入菜单" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "开关:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "应用:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "常规" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "水平" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "语言栏位置:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "下移选中的输入法" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "上移选中的输入法" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "下一输入法:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "上一输入法:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "删除选中的输入法" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "设置显示隐藏语言栏的方式" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "设置候选词表方向" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "显示选中输入法的信息" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "在语言栏上显示输入法的名字" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "显示语言栏:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "启动桌面时自动启动IBus" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "切换下一个输入法快捷键" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "切换上一个输入法快捷键" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "左上角" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "右上角" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "使用自定义字体:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "竖直" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "活动时" - -#~ msgid "Never" -#~ msgstr "从不" diff --git a/po/zh_HK.po b/po/zh_HK.po index bcecb8c3e..7c4a89dce 100644 --- a/po/zh_HK.po +++ b/po/zh_HK.po @@ -9,10 +9,11 @@ msgid "" msgstr "" "Project-Id-Version: zh_TW\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-23 13:32+0800\n" +"POT-Creation-Date: 2011-02-12 00:41+0900\n" "PO-Revision-Date: 2010-05-06 13:25+1000\n" "Last-Translator: Terry Chuang \n" "Language-Team: Traditional Chinese \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -36,7 +37,7 @@ msgstr "IBus 輸入法框架" msgid "Start IBus Input Method Framework" msgstr "IBus 輸入法框架" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:39 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -48,107 +49,115 @@ msgstr "" msgid "Other" msgstr "其它" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "上一頁" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "下一頁" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:55 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "有些輸入法已經被安裝、移除或更新。請重新啟動 ibus 輸入平台。" -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:59 msgid "Restart Now" msgstr "現在重新啟動" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:60 msgid "Later" msgstr "稍候" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:109 msgid "IBus input method framework" msgstr "IBus 輸入法框架" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:327 msgid "Restart" msgstr "重新啟動" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:414 msgid "Turn off input method" msgstr "關閉輸入法" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:453 msgid "No input window" msgstr "無輸入視窗" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:484 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus 為 Linux/Unix 上的智慧型輸入法框架。" -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:488 msgid "translator-credits" msgstr "" "Ding-Yi Chen 陳定彞 , 2009\n" "Cheng-Chia Tseng , 2010" -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "關於輸入法" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "切換輸入法" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "關於" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "關於輸入法" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "語言:%s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "鍵盤配置: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "作者:%s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "描述:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "觸發" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "" + +#: ../setup/main.py:135 msgid "next input method" msgstr "下一個輸入法" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "上一個輸入法" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus 幕後程式没有啟動,您是否想現在啟動它?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" "IBus has been started! If you can not use IBus, please add below lines in " "$HOME/.bashrc, and relogin your desktop.\n" @@ -162,24 +171,24 @@ msgstr "" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "為 %s 選取鍵盤快捷鍵" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "鍵盤快捷鍵" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "按鍵碼:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "組合按鍵:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -187,7 +196,7 @@ msgstr "" "請按一個鍵盤按鍵 (或是按鍵組合)\n" "當您放開按鍵時,對話框會自動關閉。" -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "請按一個鍵盤按鍵 (或是按鍵組合)" @@ -196,15 +205,15 @@ msgid "Select an input method" msgstr "選取輸入法" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "輸入法" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "鍵盤" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus 偏好設定" @@ -270,11 +279,11 @@ msgstr "當 ibus 啟動時預先載入引擎" msgid "Prev engine shortcut keys" msgstr "「上一個引擎」快捷鍵" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "在所有的應用程式中共享同一個輸入法" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "在系統匣內顯示圖示" @@ -282,7 +291,7 @@ msgstr "在系統匣內顯示圖示" msgid "Show input method name" msgstr "顯示輸入法名稱" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "在語言列上顯示輸入法名稱" @@ -308,7 +317,7 @@ msgstr "用來切換到清單內下一個輸入法的快捷鍵" msgid "The shortcut keys for switching to the previous input method" msgstr "用來切換到清單內上一個輸入法的快捷鍵" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "用來開啟或關閉輸入法的快捷鍵" @@ -328,11 +337,11 @@ msgstr "語言面板是否使用自訂字型" msgid "Use global input method" msgstr "使用全域輸入法" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "使用系統鍵盤 (XKB) 配置" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "使用系統鍵盤配置" @@ -413,101 +422,109 @@ msgid "Custom" msgstr "自訂" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "在應用程式視窗中內嵌編輯模式" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "在應用程式視窗中內嵌輸入法的預先編輯文字" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "嵌入選單內" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "啟用或停用:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "通用" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "水平" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "語言面板位置:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "下移所選取的輸入法" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "上移所選取的輸入法" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "下一個輸入法:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "上一個輸入法:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "從已啟用的輸入法中移除所選的輸入法" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "設置 ibus 如何顯示或隱藏語言列的行為" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "設置查詢表單內候選字詞的排列方向" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "顯示所選取的輸入法資訊" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "當選取時在語言列上輸入法名稱" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "顯示語言面板:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "在登入時啟動 ibus" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "用來切換到清單內下一個輸入法的快捷鍵" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "用來切換到清單內上一個輸入法的快捷鍵" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "左上角" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "右上角" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "使用自訂字型:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "垂直" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "當啟用時" diff --git a/po/zh_TW.po b/po/zh_TW.po index 51316d157..1733a5cc2 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -1,23 +1,24 @@ -# translation of zh_TW.po to Traditional Chinese -# Traditional Chinese translation for ibus. -# Copyright (C) 2009, 2010 Huang Peng +# translation of ibus.pot to Traditional Chinese +# Traditional Chinese translation of ibus. +# Copyright (C) 2008 Peng Huang # This file is distributed under the same license as the ibus package. -# +# +# Translators: # Ding-Yi Chen 陳定彞 , 2009. -# Cheng-Chia Tseng , 2010. -# +# Cheng-Chia Tseng , 2010-2011. msgid "" msgstr "" -"Project-Id-Version: ibus\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-06-28 13:15+0800\n" -"PO-Revision-Date: 2010-06-28 13:10+0800\n" -"Last-Translator: Cheng-Chia Tseng \n" -"Language-Team: chinese-l10n \n" +"Project-Id-Version: IBus\n" +"Report-Msgid-Bugs-To: http://code.google.com/p/ibus/issues/list\n" +"POT-Creation-Date: 2011-05-13 11:21+0900\n" +"PO-Revision-Date: 2011-06-17 10:37+0000\n" +"Last-Translator: zerng07 \n" +"Language-Team: Chinese (Taiwan) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n!=1;\n" +"Language: zh_TW\n" +"Plural-Forms: nplurals=1; plural=0;\n" #: ../bus/ibus.desktop.in.h:1 msgid "IBus" @@ -31,7 +32,7 @@ msgstr "輸入法框架" msgid "Start IBus Input Method Framework" msgstr "啟動 IBus 輸入法框架" -#: ../ibus/_config.py.in:38 +#: ../ibus/_config.py.in:40 msgid "" "Copyright (c) 2007-2010 Peng Huang\n" "Copyright (c) 2007-2010 Red Hat, Inc." @@ -43,138 +44,148 @@ msgstr "" msgid "Other" msgstr "其它" -#: ../ui/gtk/candidatepanel.py:267 +#: ../ui/gtk/candidatepanel.py:264 msgid "Previous page" msgstr "上一頁" -#: ../ui/gtk/candidatepanel.py:272 +#: ../ui/gtk/candidatepanel.py:269 msgid "Next page" msgstr "下一頁" -#: ../ui/gtk/main.py:57 +#: ../ui/gtk/main.py:62 msgid "" "Some input methods have been installed, removed or updated. Please restart " "ibus input platform." msgstr "有些輸入法已經被安裝、移除或更新。請重新啟動 ibus 輸入平台。" -#: ../ui/gtk/main.py:62 +#: ../ui/gtk/main.py:66 msgid "Restart Now" msgstr "現在重新啟動" -#: ../ui/gtk/main.py:63 +#: ../ui/gtk/main.py:67 msgid "Later" msgstr "稍候" -#: ../ui/gtk/panel.py:113 +#: ../ui/gtk/panel.py:116 +msgid "IBus Panel" +msgstr "IBus 面板" + +#: ../ui/gtk/panel.py:122 msgid "IBus input method framework" msgstr "IBus 輸入法框架" -#: ../ui/gtk/panel.py:331 +#: ../ui/gtk/panel.py:352 msgid "Restart" msgstr "重新啟動" -#: ../ui/gtk/panel.py:418 +#: ../ui/gtk/panel.py:439 msgid "Turn off input method" msgstr "關閉輸入法" -#: ../ui/gtk/panel.py:457 +#: ../ui/gtk/panel.py:478 msgid "No input window" msgstr "無輸入視窗" -#: ../ui/gtk/panel.py:488 +#: ../ui/gtk/panel.py:509 msgid "IBus is an intelligent input bus for Linux/Unix." msgstr "IBus 為 Linux/Unix 上的智慧型輸入法框架。" -#: ../ui/gtk/panel.py:492 +#: ../ui/gtk/panel.py:513 msgid "translator-credits" msgstr "" "Ding-Yi Chen 陳定彞 , 2009.\n" "Cheng-Chia Tseng , 2010." -#: ../ui/gtk/languagebar.py:107 +#: ../ui/gtk/languagebar.py:106 msgid "About the input method" msgstr "關於輸入法" -#: ../ui/gtk/languagebar.py:215 +#: ../ui/gtk/languagebar.py:214 msgid "Switch input method" msgstr "切換輸入法" -#: ../ui/gtk/languagebar.py:358 ../ui/gtk/engineabout.py:35 -#: ../setup/engineabout.py:35 ../setup/setup.ui.h:16 +#: ../ui/gtk/languagebar.py:357 ../ui/gtk/engineabout.py:33 +#: ../setup/engineabout.py:33 ../setup/setup.ui.h:16 msgid "About" msgstr "關於" -#: ../ui/gtk/languagebar.py:362 +#: ../ui/gtk/languagebar.py:361 msgid "About the Input Method" msgstr "關於輸入法" -#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 +#: ../ui/gtk/engineabout.py:61 ../setup/engineabout.py:61 #, python-format msgid "Language: %s\n" msgstr "語言:%s\n" -#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 +#: ../ui/gtk/engineabout.py:63 ../setup/engineabout.py:63 #, python-format msgid "Keyboard layout: %s\n" msgstr "鍵盤配置: %s\n" -#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 +#: ../ui/gtk/engineabout.py:65 ../setup/engineabout.py:65 #, python-format msgid "Author: %s\n" msgstr "作者:%s\n" -#: ../ui/gtk/engineabout.py:69 ../setup/engineabout.py:69 +#: ../ui/gtk/engineabout.py:67 ../setup/engineabout.py:67 msgid "Description:\n" msgstr "描述:\n" -#: ../setup/main.py:106 +#: ../setup/main.py:102 msgid "trigger" msgstr "觸發" -#: ../setup/main.py:117 +#: ../setup/main.py:113 +msgid "enable" +msgstr "啟用" + +#: ../setup/main.py:124 +msgid "disable" +msgstr "停用" + +#: ../setup/main.py:135 msgid "next input method" msgstr "下一個輸入法" -#: ../setup/main.py:128 +#: ../setup/main.py:146 msgid "previous input method" msgstr "上一個輸入法" -#: ../setup/main.py:268 +#: ../setup/main.py:286 msgid "IBus daemon is not started. Do you want to start it now?" msgstr "IBus 幕後程式没有啟動,您是否想現在啟動它?" -#: ../setup/main.py:283 +#: ../setup/main.py:301 msgid "" -"IBus has been started! If you can not use IBus, please add below lines in " -"$HOME/.bashrc, and relogin your desktop.\n" +"IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" msgstr "" -"IBus 已經成功啟動!如果您無法使用 IBus,請將下列代碼加入到 $HOME/.bashrc 中," -"並重新登入桌面。\n" +"IBus 已經成功啟動!如果您無法使用 IBus,請將下列代碼加入到 $HOME/.bashrc 中,並重新登入桌面。\n" " export GTK_IM_MODULE=ibus\n" " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" -#: ../setup/main.py:298 +#: ../setup/main.py:316 #, python-format msgid "Select keyboard shortcut for %s" msgstr "為 %s 選取鍵盤快捷鍵" -#: ../setup/keyboardshortcut.py:55 +#: ../setup/keyboardshortcut.py:52 msgid "Keyboard shortcuts" msgstr "鍵盤快捷鍵" -#: ../setup/keyboardshortcut.py:66 +#: ../setup/keyboardshortcut.py:63 msgid "Key code:" msgstr "按鍵碼:" -#: ../setup/keyboardshortcut.py:81 +#: ../setup/keyboardshortcut.py:78 msgid "Modifiers:" msgstr "修飾鍵:" -#: ../setup/keyboardshortcut.py:234 +#: ../setup/keyboardshortcut.py:231 msgid "" "Please press a key (or a key combination).\n" "The dialog will be closed when the key is released." @@ -182,7 +193,7 @@ msgstr "" "請按一個鍵盤按鍵 (或是按鍵組合)\n" "當您放開按鍵時,對話框會自動關閉。" -#: ../setup/keyboardshortcut.py:236 +#: ../setup/keyboardshortcut.py:233 msgid "Please press a key (or a key combination)" msgstr "請按一個鍵盤按鍵 (或是按鍵組合)" @@ -191,15 +202,15 @@ msgid "Select an input method" msgstr "選取輸入法" #. create im name & icon column -#: ../setup/enginetreeview.py:67 ../setup/setup.ui.h:31 +#: ../setup/enginetreeview.py:64 ../setup/setup.ui.h:33 msgid "Input Method" msgstr "輸入法" -#: ../setup/enginetreeview.py:95 +#: ../setup/enginetreeview.py:92 msgid "Kbd" msgstr "鍵盤" -#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:30 +#: ../setup/ibus-setup.desktop.in.h:1 ../setup/setup.ui.h:32 msgid "IBus Preferences" msgstr "IBus 偏好設定" @@ -220,110 +231,126 @@ msgid "Custom font name for language panel" msgstr "為語言面板自訂字型" #: ../data/ibus.schemas.in.h:4 +msgid "Disable shortcut keys" +msgstr "停用快捷鍵" + +#: ../data/ibus.schemas.in.h:5 msgid "Embed Preedit Text" msgstr "內嵌編輯模式" -#: ../data/ibus.schemas.in.h:5 +#: ../data/ibus.schemas.in.h:6 msgid "Embed Preedit Text in Application Window" msgstr "在應用程式視窗中內嵌編輯模式" -#: ../data/ibus.schemas.in.h:6 +#: ../data/ibus.schemas.in.h:7 msgid "Enable input method by default" msgstr "預設啟用輸入法" -#: ../data/ibus.schemas.in.h:7 +#: ../data/ibus.schemas.in.h:8 msgid "Enable input method by default when the application gets input focus" msgstr "當應用程式取得輸入焦點時,預設將輸入法啟用" -#: ../data/ibus.schemas.in.h:8 +#: ../data/ibus.schemas.in.h:9 +msgid "Enable shortcut keys" +msgstr "啟用快捷鍵" + +#: ../data/ibus.schemas.in.h:10 msgid "Language panel position" msgstr "語言面板位置" -#: ../data/ibus.schemas.in.h:9 +#: ../data/ibus.schemas.in.h:11 msgid "Next engine shortcut keys" msgstr "「下一個引擎」快捷鍵" -#: ../data/ibus.schemas.in.h:10 +#: ../data/ibus.schemas.in.h:12 msgid "Orientation of lookup table" msgstr "查選表單表排列方向" -#: ../data/ibus.schemas.in.h:11 +#: ../data/ibus.schemas.in.h:13 msgid "Orientation of lookup table. 0 = Horizontal, 1 = Vertical" msgstr "查詢表單的排列方向。0 = 水平,1 = 垂直" -#: ../data/ibus.schemas.in.h:12 +#: ../data/ibus.schemas.in.h:14 msgid "Preload engines" msgstr "預先載入引擎" -#: ../data/ibus.schemas.in.h:13 +#: ../data/ibus.schemas.in.h:15 msgid "Preload engines during ibus starts up" msgstr "當 ibus 啟動時預先載入引擎" -#: ../data/ibus.schemas.in.h:14 +#: ../data/ibus.schemas.in.h:16 msgid "Prev engine shortcut keys" msgstr "「上一個引擎」快捷鍵" -#: ../data/ibus.schemas.in.h:15 ../setup/setup.ui.h:40 +#: ../data/ibus.schemas.in.h:17 ../setup/setup.ui.h:42 msgid "Share the same input method among all applications" msgstr "在所有的應用程式中共享同一個輸入法" -#: ../data/ibus.schemas.in.h:16 ../setup/setup.ui.h:41 +#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 msgid "Show icon on system tray" msgstr "在系統匣內顯示圖示" -#: ../data/ibus.schemas.in.h:17 +#: ../data/ibus.schemas.in.h:19 msgid "Show input method name" msgstr "顯示輸入法名稱" -#: ../data/ibus.schemas.in.h:18 ../setup/setup.ui.h:43 +#: ../data/ibus.schemas.in.h:20 ../setup/setup.ui.h:45 msgid "Show input method name on language bar" msgstr "在語言列上顯示輸入法名稱" -#: ../data/ibus.schemas.in.h:19 +#: ../data/ibus.schemas.in.h:21 msgid "" "The behavior of language panel. 0 = Embedded in menu, 1 = Auto hide, 2 = " "Always show" msgstr "語言面板行為。0 = 嵌入選單內,1 = 自動隱藏,2 = 永遠顯示" -#: ../data/ibus.schemas.in.h:20 +#: ../data/ibus.schemas.in.h:22 msgid "" "The position of the language panel. 0 = Top left corner, 1 = Top right " "corner, 2 = Bottom left corner, 3 = Bottom right corner, 4 = Custom" msgstr "語言列的位置。0 = 左上角, 1 = 右上角, 2 = 左下角, 3 = 右下角, 4 = 自訂" -#: ../data/ibus.schemas.in.h:21 +#: ../data/ibus.schemas.in.h:23 msgid "The shortcut keys for switching to the next input method in the list" msgstr "用來切換到清單內下一個輸入法的快捷鍵" -#: ../data/ibus.schemas.in.h:22 +#: ../data/ibus.schemas.in.h:24 msgid "The shortcut keys for switching to the previous input method" msgstr "用來切換到清單內上一個輸入法的快捷鍵" -#: ../data/ibus.schemas.in.h:23 ../setup/setup.ui.h:49 +#: ../data/ibus.schemas.in.h:25 +msgid "The shortcut keys for turning input method off" +msgstr "關閉輸入法的快捷鍵" + +#: ../data/ibus.schemas.in.h:26 +msgid "The shortcut keys for turning input method on" +msgstr "開啟輸入法的快捷鍵" + +#: ../data/ibus.schemas.in.h:27 ../setup/setup.ui.h:51 msgid "The shortcut keys for turning input method on or off" msgstr "用來開啟或關閉輸入法的快捷鍵" -#: ../data/ibus.schemas.in.h:24 +#: ../data/ibus.schemas.in.h:28 msgid "Trigger shortcut keys" msgstr "觸發用快捷鍵" -#: ../data/ibus.schemas.in.h:25 +#: ../data/ibus.schemas.in.h:29 msgid "Use custom font" msgstr "使用自訂字型" -#: ../data/ibus.schemas.in.h:26 +#: ../data/ibus.schemas.in.h:30 msgid "Use custom font name for language panel" msgstr "語言面板是否使用自訂字型" -#: ../data/ibus.schemas.in.h:27 +#: ../data/ibus.schemas.in.h:31 msgid "Use global input method" msgstr "使用全域輸入法" -#: ../data/ibus.schemas.in.h:28 ../setup/setup.ui.h:53 +#: ../data/ibus.schemas.in.h:32 ../setup/setup.ui.h:55 msgid "Use system keyboard (XKB) layout" msgstr "使用系統鍵盤 (XKB) 配置" -#: ../data/ibus.schemas.in.h:29 ../setup/setup.ui.h:54 +#: ../data/ibus.schemas.in.h:33 ../setup/setup.ui.h:56 msgid "Use system keyboard layout" msgstr "使用系統鍵盤配置" @@ -404,101 +431,109 @@ msgid "Custom" msgstr "自訂" #: ../setup/setup.ui.h:24 +msgid "Disable:" +msgstr "停用:" + +#: ../setup/setup.ui.h:25 msgid "Embed preedit text in application window" msgstr "在應用程式視窗中內嵌編輯模式" -#: ../setup/setup.ui.h:25 +#: ../setup/setup.ui.h:26 msgid "Embed the preedit text of input method in the application window" msgstr "在應用程式視窗中內嵌輸入法的預先編輯文字" -#: ../setup/setup.ui.h:26 +#: ../setup/setup.ui.h:27 msgid "Embedded in menu" msgstr "嵌入選單內" -#: ../setup/setup.ui.h:27 +#: ../setup/setup.ui.h:28 msgid "Enable or disable:" msgstr "啟用或停用:" -#: ../setup/setup.ui.h:28 +#: ../setup/setup.ui.h:29 +msgid "Enable:" +msgstr "啟用:" + +#: ../setup/setup.ui.h:30 msgid "General" msgstr "通用" -#: ../setup/setup.ui.h:29 +#: ../setup/setup.ui.h:31 msgid "Horizontal" msgstr "水平" -#: ../setup/setup.ui.h:32 +#: ../setup/setup.ui.h:34 msgid "Language panel position:" msgstr "語言面板位置:" -#: ../setup/setup.ui.h:33 +#: ../setup/setup.ui.h:35 msgid "Move down the selected input method in the enabled input methods" msgstr "下移所選取的輸入法" -#: ../setup/setup.ui.h:34 +#: ../setup/setup.ui.h:36 msgid "Move up the selected input method in the enabled input methods list" msgstr "上移所選取的輸入法" -#: ../setup/setup.ui.h:35 +#: ../setup/setup.ui.h:37 msgid "Next input method:" msgstr "下一個輸入法:" -#: ../setup/setup.ui.h:36 +#: ../setup/setup.ui.h:38 msgid "Previous input method:" msgstr "上一個輸入法:" -#: ../setup/setup.ui.h:37 +#: ../setup/setup.ui.h:39 msgid "Remove the selected input method from the enabled input methods" msgstr "從已啟用的輸入法中移除所選的輸入法" -#: ../setup/setup.ui.h:38 +#: ../setup/setup.ui.h:40 msgid "Set the behavior of ibus how to show or hide language bar" msgstr "設置 ibus 如何顯示或隱藏語言列的行為" -#: ../setup/setup.ui.h:39 +#: ../setup/setup.ui.h:41 msgid "Set the orientation of candidates in lookup table" msgstr "設置查詢表單內候選字詞的排列方向" -#: ../setup/setup.ui.h:42 +#: ../setup/setup.ui.h:44 msgid "Show information of the selected input method" msgstr "顯示所選取的輸入法資訊" -#: ../setup/setup.ui.h:44 +#: ../setup/setup.ui.h:46 msgid "Show input method's name on language bar when check the checkbox" msgstr "當選取時在語言列上輸入法名稱" -#: ../setup/setup.ui.h:45 +#: ../setup/setup.ui.h:47 msgid "Show language panel:" msgstr "顯示語言面板:" -#: ../setup/setup.ui.h:46 +#: ../setup/setup.ui.h:48 msgid "Start ibus on login" msgstr "在登入時啟動 ibus" -#: ../setup/setup.ui.h:47 +#: ../setup/setup.ui.h:49 msgid "The shortcut keys for switching to next input method in the list" msgstr "用來切換到清單內下一個輸入法的快捷鍵" -#: ../setup/setup.ui.h:48 +#: ../setup/setup.ui.h:50 msgid "The shortcut keys for switching to previous input method in the list" msgstr "用來切換到清單內上一個輸入法的快捷鍵" -#: ../setup/setup.ui.h:50 +#: ../setup/setup.ui.h:52 msgid "Top left corner" msgstr "左上角" -#: ../setup/setup.ui.h:51 +#: ../setup/setup.ui.h:53 msgid "Top right corner" msgstr "右上角" -#: ../setup/setup.ui.h:52 +#: ../setup/setup.ui.h:54 msgid "Use custom font:" msgstr "使用自訂字型:" -#: ../setup/setup.ui.h:55 +#: ../setup/setup.ui.h:57 msgid "Vertical" msgstr "垂直" -#: ../setup/setup.ui.h:56 +#: ../setup/setup.ui.h:58 msgid "When active" msgstr "當啟用時" diff --git a/setup/.gitignore b/setup/.gitignore deleted file mode 100644 index 1a6aff2fd..000000000 --- a/setup/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -ibus-setup -ibus-setup.desktop diff --git a/setup/Makefile.am b/setup/Makefile.am index 0b81bf360..9618d7fae 100644 --- a/setup/Makefile.am +++ b/setup/Makefile.am @@ -22,6 +22,7 @@ ibussetup_PYTHON = \ main.py \ + i18n.py \ icon.py \ enginecombobox.py \ enginetreeview.py \ @@ -57,9 +58,11 @@ DISTCLEANFILES = \ $(NULL) test: - $(ENV) \ + $(ENV_IBUS_TEST) \ PYTHONPATH=$(top_srcdir) \ IBUS_PREFIX="@prefix@" \ IBUS_LOCALEDIR="@localedir@" \ $(PYTHON) \ $(srcdir)/main.py + +-include $(top_srcdir)/git.mk diff --git a/setup/engineabout.py b/setup/engineabout.py deleted file mode 120000 index 433caa8b0..000000000 --- a/setup/engineabout.py +++ /dev/null @@ -1 +0,0 @@ -../ui/gtk/engineabout.py \ No newline at end of file diff --git a/setup/engineabout.py b/setup/engineabout.py new file mode 100644 index 000000000..7e2813a25 --- /dev/null +++ b/setup/engineabout.py @@ -0,0 +1,114 @@ +# vim:set et sts=4 sw=4: +# +# ibus - The Input Bus +# +# Copyright (c) 2007-2010 Peng Huang +# Copyright (c) 2007-2010 Red Hat, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307 USA + +from gi.repository import IBus +from gi.repository import Gdk +from gi.repository import GdkPixbuf +from gi.repository import Gtk +from gi.repository import Pango + +from i18n import _, N_ + +class EngineAbout(Gtk.Dialog): + def __init__(self, enginedesc): + self.__engine_desc = enginedesc + super(EngineAbout, self).__init__(_("About"), None, + Gtk.DialogFlags.MODAL, + (Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)) + + self.__init_ui() + + def __init_ui(self): + self.set_icon_name(Gtk.STOCK_ABOUT) + sw = Gtk.ScrolledWindow() + sw.set_shadow_type(Gtk.ShadowType.ETCHED_IN) + sw.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) + sw.set_size_request(400, 400) + self.__text_view = Gtk.TextView() + self.__text_view.set_editable(False) + sw.add(self.__text_view) + sw.show_all() + self.vbox.pack_start(sw, True, True, 0) + + self.__fill_text_view() + + def __fill_text_view(self): + text_buffer = self.__text_view.get_buffer() + self.__create_tags(text_buffer) + + iter = text_buffer.get_iter_at_offset(0) + text_buffer.insert_with_tags_by_name(iter, "\n ", + "left_margin_16") + text_buffer.insert_pixbuf(iter, + self.__load_icon(self.__engine_desc.get_icon())) + text_buffer.insert_with_tags_by_name(iter, + "\n%s\n" % self.__engine_desc.get_longname(), + "heading", "left_margin_16") + text_buffer.insert_with_tags_by_name(iter, + _("Language: %s\n") % IBus.get_language_name(self.__engine_desc.get_language()), + "small", "bold", "left_margin_16") + text_buffer.insert_with_tags_by_name(iter, + _("Keyboard layout: %s\n") % self.__engine_desc.get_layout(), + "small", "bold", "left_margin_16") + text_buffer.insert_with_tags_by_name(iter, + _("Author: %s\n") % self.__engine_desc.get_author(), + "small", "bold", "left_margin_16") + text_buffer.insert_with_tags_by_name(iter, + _("Description:\n"), "small", "bold", "left_margin_16") + text_buffer.insert_with_tags_by_name(iter, + self.__engine_desc.get_description(), + "wrap_text", "left_margin_32") + + + def __create_tags(self, text_buffer): + text_buffer.create_tag("heading", + weight=Pango.Weight.BOLD, + size = 16 * Pango.SCALE) + text_buffer.create_tag("bold", + weight=Pango.Weight.BOLD) + text_buffer.create_tag("italic", + style=Pango.Style.ITALIC) + text_buffer.create_tag("small", + scale=0.833333333333) # Pango.SCALE_SMALL ? + text_buffer.create_tag("gray_foreground", + foreground="dark gray") + text_buffer.create_tag("wrap_text", + wrap_mode=Gtk.WrapMode.WORD) + text_buffer.create_tag("left_margin_16", + left_margin=16) + text_buffer.create_tag("left_margin_32", + left_margin=32) + + def __load_icon(self, icon): + try: + pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(icon, 48, 48, True) + except: + theme = Gtk.IconTheme.get_default() + icon = theme.lookup_icon("ibus-engine", 48, 0) + if icon == None: + icon = theme.lookup_icon(Gtk.STOCK_MISSING_IMAGE, 48, 0) + pixbuf = icon.load_icon() + return pixbuf + +if __name__ == "__main__": + desc = IBus.EngineDesc() + EngineAbout(desc).run() diff --git a/setup/enginecombobox.py b/setup/enginecombobox.py index 90b6f6c0b..8d1424b85 100644 --- a/setup/enginecombobox.py +++ b/setup/enginecombobox.py @@ -20,23 +20,24 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA -import gtk -import gobject -import pango -import ibus -import gettext -from icon import load_icon +import locale + +from gi.repository import GObject +from gi.repository import Gtk +from gi.repository import IBus +from gi.repository import Pango -_ = lambda a : gettext.dgettext("ibus", a) +from icon import load_icon +from i18n import _, N_ -class EngineComboBox(gtk.ComboBox): +class EngineComboBox(Gtk.ComboBox): __gtype_name__ = 'EngineComboBox' __gproperties__ = { 'active-engine' : ( - gobject.TYPE_PYOBJECT, + object, 'selected engine', 'selected engine', - gobject.PARAM_READABLE) + GObject.ParamFlags.READABLE) } def __init__(self): @@ -45,51 +46,61 @@ def __init__(self): self.__model = None - renderer = gtk.CellRendererPixbuf() + renderer = Gtk.CellRendererPixbuf() renderer.set_property("xalign", 0) renderer.set_property("xpad", 2) self.pack_start(renderer, False) - self.set_cell_data_func(renderer, self.__icon_cell_data_cb) + self.set_cell_data_func(renderer, self.__icon_cell_data_cb, None) - renderer = gtk.CellRendererText() + renderer = Gtk.CellRendererText() renderer.set_property("xalign", 0) renderer.set_property("xpad", 2) self.pack_start(renderer, True) - self.set_cell_data_func(renderer, self.__name_cell_data_cb) + self.set_cell_data_func(renderer, self.__name_cell_data_cb, None) def set_engines(self, engines): - self.__model = gtk.TreeStore(gobject.TYPE_PYOBJECT) + self.__model = Gtk.TreeStore(object) iter1 = self.__model.append(None) self.__model.set(iter1, 0, 0) - lang = {} + langs = {} for e in engines: - l = ibus.get_language_name(e.language) - if l not in lang: - lang[l] = [] - lang[l].append(e) - - keys = lang.keys() - keys.sort() - if ibus.get_language_name("Other") in keys: - keys.remove(ibus.get_language_name("Other")) - keys += [ibus.get_language_name("Other")] + print e.get_language() + l = IBus.get_language_name(e.get_language()) + if l == None: + l = "" + if l not in langs: + langs[l] = [] + langs[l].append(e) + + keys = langs.keys() + keys.sort(locale.strcoll) + current_lang = IBus.get_language_name(locale.getlocale()[0]) + # move current language to the first place + if current_lang in keys: + keys.remove(current_lang) + keys.insert(0, current_lang) + + #add "Others" to the end of the combo box + if IBus.get_language_name("Other") in keys: + keys.remove(IBus.get_language_name("Other")) + keys += [IBus.get_language_name("Other")] for l in keys: iter1 = self.__model.append(None) self.__model.set(iter1, 0, l) def cmp_engine(a, b): - if a.rank == b.rank: - return cmp(a.longname, b.longname) - return int(b.rank - a.rank) - lang[l].sort(cmp_engine) - for e in lang[l]: + if a.get_rank() == b.get_rank(): + return locale.strcoll(a.get_longname(), b.get_longname()) + return int(b.get_rank() - a.get_rank()) + langs[l].sort(cmp_engine) + for e in langs[l]: iter2 = self.__model.append(iter1) self.__model.set(iter2, 0, e) self.set_model(self.__model) self.set_active(0) - def __icon_cell_data_cb(self, celllayout, renderer, model, iter): + def __icon_cell_data_cb(self, celllayout, renderer, model, iter, data): engine = self.__model.get_value(iter, 0) if isinstance(engine, str) or isinstance (engine, unicode): @@ -101,28 +112,30 @@ def __icon_cell_data_cb(self, celllayout, renderer, model, iter): else: renderer.set_property("visible", True) renderer.set_property("sensitive", True) - pixbuf = load_icon(engine.icon, gtk.ICON_SIZE_LARGE_TOOLBAR) + pixbuf = load_icon(engine.get_icon(), Gtk.IconSize.LARGE_TOOLBAR) if pixbuf == None: - pixbuf = load_icon("ibus-engine", gtk.ICON_SIZE_LARGE_TOOLBAR) + pixbuf = load_icon("ibus-engine", Gtk.IconSize.LARGE_TOOLBAR) if pixbuf == None: - pixbuf = load_icon("gtk-missing-image", gtk.ICON_SIZE_LARGE_TOOLBAR) + pixbuf = load_icon(Gtk.STOCK_MISSING_IMAGE, + Gtk.IconSize.LARGE_TOOLBAR) renderer.set_property("pixbuf", pixbuf) - def __name_cell_data_cb(self, celllayout, renderer, model, iter): + def __name_cell_data_cb(self, celllayout, renderer, model, iter, data): engine = self.__model.get_value(iter, 0) if isinstance (engine, str) or isinstance (engine, unicode): renderer.set_property("sensitive", False) renderer.set_property("text", engine) - renderer.set_property("weight", pango.WEIGHT_NORMAL) + renderer.set_property("weight", Pango.Weight.NORMAL) elif isinstance(engine, int): renderer.set_property("sensitive", True) renderer.set_property("text", _("Select an input method")) - renderer.set_property("weight", pango.WEIGHT_NORMAL) + renderer.set_property("weight", Pango.Weight.NORMAL) else: renderer.set_property("sensitive", True) - renderer.set_property("text", engine.longname) - renderer.set_property("weight", pango.WEIGHT_BOLD if engine.rank > 0 else pango.WEIGHT_NORMAL) + renderer.set_property("text", engine.get_longname()) + renderer.set_property("weight", + Pango.Weight.BOLD if engine.get_rank() > 0 else Pango.Weight.NORMAL) def __notify_active_cb(self, combobox, property): self.notify("active-engine") @@ -140,5 +153,10 @@ def do_get_property(self, property): def get_active_engine(self): return self.get_property("active-engine") - - +if __name__ == "__main__": + combo = EngineComboBox() + combo.set_engines([IBus.EngineDesc(language="zh")]) + w = Gtk.Window() + w.add(combo) + w.show_all() + Gtk.main() diff --git a/setup/enginetreeview.py b/setup/enginetreeview.py index 2dc7c3e82..8b3ef9ec9 100644 --- a/setup/enginetreeview.py +++ b/setup/enginetreeview.py @@ -20,31 +20,28 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA -import gtk -import glib -import gobject -import pango -import ibus +from gi.repository import GLib +from gi.repository import GObject +from gi.repository import Gtk +from gi.repository import IBus +from gi.repository import Pango from icon import load_icon +from i18n import _, N_ -from gettext import dgettext -_ = lambda a : dgettext("ibus", a) -N_ = lambda a : a - -class EngineTreeView(gtk.TreeView): +class EngineTreeView(Gtk.TreeView): __gtype_name__ = 'EngineTreeView' __gproperties__ = { 'active-engine' : ( - gobject.TYPE_PYOBJECT, + object, 'selected engine', 'selected engine', - gobject.PARAM_READABLE), + GObject.ParamFlags.READABLE), 'engines' : ( - gobject.TYPE_PYOBJECT, + object, 'engines', 'engines', - gobject.PARAM_READABLE) + GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE) } def __init__(self): @@ -56,7 +53,7 @@ def __init__(self): # self.set_headers_visible(True) self.set_reorderable(True) - self.__model = gtk.ListStore(gobject.TYPE_PYOBJECT, gobject.TYPE_STRING) + self.__model = Gtk.ListStore(GObject.TYPE_PYOBJECT, GObject.TYPE_STRING) self.set_model(self.__model) self.__model.connect("row-changed", self.__emit_changed_delay_cb, "row-changed") self.__model.connect("row-deleted", self.__emit_changed_delay_cb, "row-deleted") @@ -64,24 +61,24 @@ def __init__(self): self.__model.connect("rows-reordered", self.__emit_changed_delay_cb, "rows-reordered") # create im name & icon column - column = gtk.TreeViewColumn(_("Input Method")) + column = Gtk.TreeViewColumn(_("Input Method")) column.set_min_width(220) - renderer = gtk.CellRendererPixbuf() + renderer = Gtk.CellRendererPixbuf() renderer.set_property("xalign", 0) column.pack_start(renderer, False) column.set_cell_data_func(renderer, self.__icon_cell_data_cb) - renderer = gtk.CellRendererText() + renderer = Gtk.CellRendererText() renderer.set_property("xalign", 0) - renderer.set_property("ellipsize", pango.ELLIPSIZE_END) + renderer.set_property("ellipsize", Pango.EllipsizeMode.END) column.pack_start(renderer, True) column.set_cell_data_func(renderer, self.__name_cell_data_cb) self.append_column(column) # create im keyboard layout column - renderer = gtk.CellRendererCombo() - model = gtk.ListStore(gobject.TYPE_STRING) + renderer = Gtk.CellRendererCombo() + model = Gtk.ListStore(GObject.TYPE_STRING) model.append(("us",)) model.append(("jp",)) model.append(("xkb",)) @@ -92,15 +89,18 @@ def __init__(self): renderer.set_property("editable", True) renderer.connect("changed", self.__engine_layout_changed_cb) - column = gtk.TreeViewColumn(_("Kbd")) + column = Gtk.TreeViewColumn(_("Kbd")) column.set_expand(False) column.set_fixed_width(32) - column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) + column.set_sizing(Gtk.TreeViewColumnSizing.FIXED) column.pack_start(renderer, False) column.set_cell_data_func(renderer, self.__layout_cell_data_cb) # self.append_column(column) - self.get_selection().connect("changed", lambda *args: self.notify("active-engine")) + self.get_selection().connect("changed", self.__selection_changed_cb) + + def __selection_changed_cb(self, *args): + self.notify("active-engine"); def __emit_changed(self, *args): if self.__changed: @@ -110,64 +110,74 @@ def __emit_changed(self, *args): def __emit_changed_delay_cb(self, *args): if not self.__changed: self.__changed = True - glib.idle_add(self.__emit_changed) + GLib.idle_add(self.__emit_changed) - def __icon_cell_data_cb(self, celllayout, renderer, model, iter): - engine = self.__model.get_value(iter, 0) + def __icon_cell_data_cb(self, celllayout, renderer, model, it, data): + engine = self.__model.get_value(it, 0) - icon_size = gtk.icon_size_lookup(gtk.ICON_SIZE_LARGE_TOOLBAR)[0] - pixbuf = load_icon(engine.icon, gtk.ICON_SIZE_LARGE_TOOLBAR) + icon_size = Gtk.icon_size_lookup(Gtk.IconSize.LARGE_TOOLBAR)[0] + pixbuf = load_icon(engine.get_icon(), Gtk.IconSize.LARGE_TOOLBAR) if pixbuf == None: - pixbuf = load_icon("ibus-engine", gtk.ICON_SIZE_LARGE_TOOLBAR) + pixbuf = load_icon("ibus-engine", Gtk.IconSize.LARGE_TOOLBAR) if pixbuf == None: - pixbuf = load_icon("gtk-missing-image", gtk.ICON_SIZE_LARGE_TOOLBAR) + pixbuf = load_icon(Gtk.STOCK_MISSING_IMAGE, + Gtk.IconSize.LARGE_TOOLBAR) renderer.set_property("pixbuf", pixbuf) - def __name_cell_data_cb(self, celllayout, renderer, model, iter): - engine = self.__model.get_value(iter, 0) + def __name_cell_data_cb(self, celllayout, renderer, model, it, data): + engine = self.__model.get_value(it, 0) renderer.set_property("sensitive", True) - language = ibus.get_language_name(engine.language) - renderer.set_property("text", "%s - %s" % (language, engine.longname)) - if self.__model.get_path(iter)[0] == 0: + language = IBus.get_language_name(engine.get_language()) + renderer.set_property("text", + "%s - %s" % (language, engine.get_longname())) + if self.__model.get_path(it).get_indices()[0] == 0: # default engine - renderer.set_property("weight", pango.WEIGHT_BOLD) + renderer.set_property("weight", Pango.Weight.BOLD) else: - renderer.set_property("weight", pango.WEIGHT_NORMAL) + renderer.set_property("weight", Pango.Weight.NORMAL) - def __layout_cell_data_cb(self, celllayout, renderer, model, iter): - engine = self.__model.get_value(iter, 0) - layout = self.__model.get_value(iter, 1) + def __layout_cell_data_cb(self, celllayout, renderer, model, it, data): + engine = self.__model.get_value(it, 0) + layout = self.__model.get_value(it, 1) renderer.set_property("sensitive", True) if not layout: layout = engine.layout renderer.set_property("text", layout) - if self.__model.get_path(iter)[0] == 0: + if self.__model.get_path(it).get_indices()[0] == 0: #default engine - renderer.set_property("weight", pango.WEIGHT_BOLD) + renderer.set_property("weight", Pango.WEIGHT_BOLD) else: - renderer.set_property("weight", pango.WEIGHT_NORMAL) + renderer.set_property("weight", Pango.WEIGHT_NORMAL) - def __engine_layout_changed_cb(self, combo, path, iter): + def __engine_layout_changed_cb(self, combo, path, it): return i = self.__model.get_iter(path) - layout = combo.get_property("model").get_value(iter, 0) + layout = combo.get_property("model").get_value(it, 0) self.__model.set_value(i, 1, layout) - def do_get_property(self, property): - if property.name == "active-engine": - iter = self.get_selected_iter() - if iter == None: + def do_get_property(self, prop): + if prop.name == "active-engine": + it = self.get_selected_iter() + if it == None: return None - row = self.__model.get(iter, 0) + row = self.__model.get(it, 0) return row[0] - elif property.name == "engines": + elif prop.name == "engines": engines = [ r[0] for r in self.__model if r[0] != None] return engines else: - raise AttributeError, 'unknown property %s' % property.name + raise AttributeError, 'unknown property %s' % prop.name + + def do_set_property(self, prop, value): + if prop.name == "active-engine": + raise AttributeError, "active-engine is readonly" + elif prop.name == "engines": + set_engines(value) + else: + raise AttributeError, 'unknown property %s' % prop.name def set_engines(self, engines): self.__model.clear() @@ -175,8 +185,8 @@ def set_engines(self, engines): for e in engines: if e in self.__engines: continue - iter = self.__model.append(None) - self.__model.set(iter, 0, e) + it = self.__model.append(None) + self.__model.set(it, 0, e) self.__engines.add(e) self.__emit_changed() @@ -194,28 +204,28 @@ def get_active_engine(self): def prepend_engine(self, engine): if engine == None or engine in self.__engines: return - iter = self.__model.prepend(None) - self.__model.set(iter, 0, engine) + it = self.__model.prepend(None) + self.__model.set(it, 0, engine) self.__engines.add(engine) self.scroll_to_cell(self.__model[0].path, None) def append_engine(self, engine): if engine == None or engine in self.__engines: return - iter = self.__model.append(None) - self.__model.set(iter, 0, engine) + it = self.__model.append(None) + self.__model.set(it, 0, engine) self.__engines.add(engine) self.scroll_to_cell(self.__model[-1].path, None) def remove_engine(self): - iter = self.get_selected_iter() - if iter == None: + it = self.get_selected_iter() + if it == None: return - row = self.__model[iter] + row = self.__model[it] engine = row[0] self.__engines.remove(engine) - index = row.path[0] - self.__model.remove(iter) + index = row.path.get_indices()[0] + self.__model.remove(it) try: row = self.__model[index] selection = self.get_selection() @@ -224,27 +234,35 @@ def remove_engine(self): pass def move_up_engine(self): - iter = self.get_selected_iter() - if iter == None: + it = self.get_selected_iter() + if it == None: return - row = self.__model[iter] - index = row.path[0] + row = self.__model[it] + index = row.path.get_indices()[0] if index == 0: return - self.__model.swap(iter, self.__model[index - 1].iter) + self.__model.swap(it, self.__model[index - 1].iter) self.scroll_to_cell(row.path, None) def move_down_engine(self): - iter = self.get_selected_iter() - if iter == None: + it = self.get_selected_iter() + if it == None: return - row = self.__model[iter] - index = row.path[0] + row = self.__model[it] + index = row.path.get_indices()[0] last_row = self.__model[-1] - last_index = last_row.path[0] + last_index = last_row.path.get_indices()[0] if index == last_index: return - self.__model.swap(iter, self.__model[index + 1].iter) + self.__model.swap(it, self.__model[index + 1].iter) self.scroll_to_cell(row.path, None) -gobject.type_register(EngineTreeView) +GObject.type_register(EngineTreeView) + +if __name__ == "__main__": + tree = EngineTreeView() + tree.set_engines([IBus.EngineDesc(language="zh")]) + w = Gtk.Window() + w.add(tree) + w.show_all() + Gtk.main() diff --git a/setup/i18n.py b/setup/i18n.py new file mode 120000 index 000000000..307d56266 --- /dev/null +++ b/setup/i18n.py @@ -0,0 +1 @@ +../ui/gtk2/i18n.py \ No newline at end of file diff --git a/setup/ibus-setup.desktop.in b/setup/ibus-setup.desktop.in index 940a84d49..864b026ec 100644 --- a/setup/ibus-setup.desktop.in +++ b/setup/ibus-setup.desktop.in @@ -1,5 +1,4 @@ [Desktop Entry] -Encoding=UTF-8 _Name=IBus Preferences _Comment=Set IBus Preferences Exec=ibus-setup diff --git a/setup/ibus-setup.in b/setup/ibus-setup.in index 06bf34c61..f3c37309b 100644 --- a/setup/ibus-setup.in +++ b/setup/ibus-setup.in @@ -23,8 +23,10 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ datarootdir=@datarootdir@ +libexecdir=@libexecdir@ export IBUS_PREFIX=@prefix@ export IBUS_DATAROOTDIR=@datarootdir@ export IBUS_LOCALEDIR=@localedir@ -exec python @prefix@/share/ibus/setup/main.py $@ +export IBUS_LIBEXECDIR=${libexecdir} +exec @PYTHON@ @prefix@/share/ibus/setup/main.py $@ diff --git a/setup/icon.py b/setup/icon.py index 79ba25311..be8a38a1f 100644 --- a/setup/icon.py +++ b/setup/icon.py @@ -24,12 +24,13 @@ "load_icon" ) -import gtk -from gtk import gdk +from gi.repository import Gdk +from gi.repository import GdkPixbuf +from gi.repository import Gtk from os import path -icon_theme = gtk.icon_theme_get_default() +icon_theme = Gtk.IconTheme.get_default() dir = path.dirname(__file__) icondir = path.join(dir, "..", "icons") icon_theme.prepend_search_path(icondir) @@ -40,22 +41,29 @@ def load_icon(icon, size): if (icon, size) in icon_cache: return icon_cache[(icon, size)] - icon_size = gtk.icon_size_lookup(size)[0] + icon_size = Gtk.icon_size_lookup(size) + if icon_size[0]: + icon_size = icon_size[1] + pixbuf = None try: - pixbuf = gdk.pixbuf_new_from_file(icon) + pixbuf = GdkPixbuf.Pixbuf.new_from_file(icon) w, h = pixbuf.get_width(), pixbuf.get_height() rate = max(w, h) / float(icon_size) w = int(w / rate) h = int(h / rate) - pixbuf = pixbuf.scale_simple(w, h, gdk.INTERP_BILINEAR) + pixbuf = pixbuf.scale_simple(w, h, GdkPixbuf.InterpType.BILINEAR) except: + # import traceback + # traceback.print_exc() pass if pixbuf == None: try: - theme = gtk.icon_theme_get_default() + theme = Gtk.IconTheme.get_default() pixbuf = theme.load_icon(icon, icon_size, 0) except: + # import traceback + # traceback.print_exc() pass icon_cache[(icon, size)] = pixbuf return pixbuf diff --git a/setup/keyboardshortcut.py b/setup/keyboardshortcut.py index 58d15ee95..8972dafbb 100644 --- a/setup/keyboardshortcut.py +++ b/setup/keyboardshortcut.py @@ -25,74 +25,73 @@ "KeyboardShortcutSelectionDialog", ); -import gobject -import gtk -from gtk import gdk -from gtk import keysyms +from gi.repository import Gdk +from gi.repository import GObject +from gi.repository import Gtk +from gi.repository import IBus +from gi.repository import Pango -from gettext import dgettext -_ = lambda a : dgettext("ibus", a) -N_ = lambda a : a +from i18n import _, N_ MAX_HOTKEY = 6 -class KeyboardShortcutSelection(gtk.VBox): +class KeyboardShortcutSelection(Gtk.VBox): def __init__(self, shortcuts = None): super(KeyboardShortcutSelection, self).__init__() self.__init_ui() self.set_shortcuts(shortcuts) def __init_ui(self): - # label = gtk.Label(_("Keyboard shortcuts:")) - # label.set_justify(gtk.JUSTIFY_LEFT) + # label = Gtk.Label(_("Keyboard shortcuts:")) + # label.set_justify(Gtk.Justification.LEFT) # label.set_alignment(0.0, 0.5) # self.pack_start(label, False, True, 4) # shortcuts view - self.__shortcut_view = gtk.TreeView(gtk.ListStore(gobject.TYPE_STRING)) + self.__shortcut_view = Gtk.TreeView(Gtk.ListStore(GObject.TYPE_STRING)) self.__shortcut_view.set_size_request(-1, 100) - renderer = gtk.CellRendererText() - column = gtk.TreeViewColumn(_("Keyboard shortcuts"), renderer, text = 0) + renderer = Gtk.CellRendererText() + column = Gtk.TreeViewColumn(_("Keyboard shortcuts"), renderer, text = 0) self.__shortcut_view.append_column(column) self.__shortcut_view.connect("cursor-changed", self.__shortcut_view_cursor_changed_cb) - scrolledwindow = gtk.ScrolledWindow() - scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) + scrolledwindow = Gtk.ScrolledWindow() + scrolledwindow.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) scrolledwindow.add(self.__shortcut_view) - scrolledwindow.set_shadow_type(gtk.SHADOW_IN) + scrolledwindow.set_shadow_type(Gtk.ShadowType.IN) self.pack_start(scrolledwindow, True, True, 4) # key code - hbox = gtk.HBox() - label = gtk.Label(_("Key code:")) - label.set_justify(gtk.JUSTIFY_LEFT) + hbox = Gtk.HBox() + label = Gtk.Label(_("Key code:")) + label.set_justify(Gtk.Justification.LEFT) label.set_alignment(0.0, 0.5) hbox.pack_start(label, False, True, 4) - self.__keycode_entry = gtk.Entry() + self.__keycode_entry = Gtk.Entry() self.__keycode_entry.connect("notify::text", self.__keycode_entry_notify_cb) hbox.pack_start(self.__keycode_entry, True, True, 4) - self.__keycode_button = gtk.Button("...") + self.__keycode_button = Gtk.Button("...") self.__keycode_button.connect("clicked", self.__keycode_button_clicked_cb) hbox.pack_start(self.__keycode_button, False, True, 4) self.pack_start(hbox, False, True, 4) # modifiers - hbox = gtk.HBox() - label = gtk.Label(_("Modifiers:")) - label.set_justify(gtk.JUSTIFY_LEFT) + hbox = Gtk.HBox() + label = Gtk.Label(_("Modifiers:")) + label.set_justify(Gtk.Justification.LEFT) label.set_alignment(0.0, 0.5) hbox.pack_start(label, False, True, 4) - table = gtk.Table(4, 2) + table = Gtk.Table(4, 2) self.__modifier_buttons = [] - self.__modifier_buttons.append(("Control", gtk.CheckButton("_Control"), gdk.CONTROL_MASK)) - self.__modifier_buttons.append(("Alt", gtk.CheckButton("A_lt"), gdk.MOD1_MASK)) - self.__modifier_buttons.append(("Shift", gtk.CheckButton("_Shift"), gdk.SHIFT_MASK)) - self.__modifier_buttons.append(("Meta", gtk.CheckButton("_Meta"), gdk.META_MASK)) - self.__modifier_buttons.append(("Super", gtk.CheckButton("S_uper"), gdk.SUPER_MASK)) - self.__modifier_buttons.append(("Hyper", gtk.CheckButton("_Hyper"), gdk.HYPER_MASK)) - self.__modifier_buttons.append(("Capslock", gtk.CheckButton("Capsloc_k"), gdk.LOCK_MASK)) - self.__modifier_buttons.append(("Release", gtk.CheckButton("_Release"), gdk.RELEASE_MASK)) + self.__modifier_buttons.append(("Control", Gtk.CheckButton("_Control"), Gdk.ModifierType.CONTROL_MASK)) + self.__modifier_buttons.append(("Alt", Gtk.CheckButton("A_lt"), Gdk.ModifierType.MOD1_MASK)) + self.__modifier_buttons.append(("Shift", Gtk.CheckButton("_Shift"), Gdk.ModifierType.SHIFT_MASK)) + self.__modifier_buttons.append(("Meta", Gtk.CheckButton("_Meta"), Gdk.ModifierType.META_MASK)) + self.__modifier_buttons.append(("Super", Gtk.CheckButton("S_uper"), Gdk.ModifierType.SUPER_MASK)) + self.__modifier_buttons.append(("Hyper", Gtk.CheckButton("_Hyper"), Gdk.ModifierType.HYPER_MASK)) + self.__modifier_buttons.append(("Capslock", Gtk.CheckButton("Capsloc_k"), Gdk.ModifierType.LOCK_MASK)) + self.__modifier_buttons.append(("Release", Gtk.CheckButton("_Release"), Gdk.ModifierType.RELEASE_MASK)) for name, button, mask in self.__modifier_buttons: button.connect("toggled", self.__modifier_button_toggled_cb, name) @@ -108,22 +107,22 @@ def __init_ui(self): self.pack_start(hbox, False, True, 4) # buttons - hbox = gtk.HBox() + hbox = Gtk.HBox() # add button - self.__add_button = gtk.Button(stock = gtk.STOCK_ADD) + self.__add_button = Gtk.Button(stock = Gtk.STOCK_ADD) self.__add_button.set_sensitive(False) self.__add_button.connect("clicked", self.__add_button_clicked_cb) - hbox.pack_start(self.__add_button) + hbox.pack_start(self.__add_button, False, True, 0) # apply button - self.__apply_button = gtk.Button(stock = gtk.STOCK_APPLY) + self.__apply_button = Gtk.Button(stock = Gtk.STOCK_APPLY) self.__apply_button.set_sensitive(False) self.__apply_button.connect("clicked", self.__apply_button_clicked_cb) - hbox.pack_start(self.__apply_button) + hbox.pack_start(self.__apply_button, False, True, 0) # delete button - self.__delete_button = gtk.Button(stock = gtk.STOCK_DELETE) + self.__delete_button = Gtk.Button(stock = Gtk.STOCK_DELETE) self.__delete_button.set_sensitive(False) self.__delete_button.connect("clicked", self.__delete_button_clicked_cb) - hbox.pack_start(self.__delete_button) + hbox.pack_start(self.__delete_button, False, True, 0) self.pack_start(hbox, False, True, 4) def set_shortcuts(self, shortcuts = None): @@ -135,7 +134,8 @@ def set_shortcuts(self, shortcuts = None): added = [] for shortcut in shortcuts: if shortcut not in added: - model.insert(-1, (shortcut,)) + it = model.insert(0) + model[it][0] = shortcut added.append(shortcut) def get_shortcuts(self): @@ -151,15 +151,16 @@ def add_shortcut(self, shortcut): return if shortcut in self.get_shortcuts(): return - iter = model.insert(-1, (shortcut,)) + it = model.insert(0) + model[it][0] = shortcut self.__add_button.set_sensitive(False) - path = model.get_path(iter) - self.__shortcut_view.set_cursor(path) + path = model.get_path(it) + self.__shortcut_view.set_cursor(path, None, False) def __get_shortcut_from_buttons(self): modifiers = [] keycode = self.__keycode_entry.get_text() - if gdk.keyval_from_name(keycode) == 0: + if Gdk.keyval_from_name(keycode) == 0: return None for name, button, mask in self.__modifier_buttons: @@ -186,7 +187,7 @@ def __get_selected_shortcut(self): path, column = self.__shortcut_view.get_cursor() if path == None: return None - return model[path[0]][0] + return model[path.get_indices()[0]][0] def __set_selected_shortcut(self, shortcut): model = self.__shortcut_view.get_model() @@ -197,7 +198,7 @@ def __set_selected_shortcut(self, shortcut): def __del_selected_shortcut(self): model = self.__shortcut_view.get_model() path, column = self.__shortcut_view.get_cursor() - del model[path[0]] + model.remove(model.get_iter(path)) self.__update_add_and_apply_buttons() def __shortcut_view_cursor_changed_cb(self, treeview): @@ -230,48 +231,53 @@ def __keycode_entry_notify_cb(self, entry, arg): def __keycode_button_clicked_cb(self, button): out = [] - dlg = gtk.MessageDialog(parent = self.get_toplevel(), buttons = gtk.BUTTONS_CLOSE) + dlg = Gtk.MessageDialog(parent = self.get_toplevel(), buttons = Gtk.ButtonsType.CLOSE) message = _("Please press a key (or a key combination).\nThe dialog will be closed when the key is released.") dlg.set_markup(message) dlg.set_title(_("Please press a key (or a key combination)")) - def __key_release_event(d, k, out): + def __key_press_event(d, k, out): out.append(k.copy()) - d.response(gtk.RESPONSE_OK) - dlg.connect("key-release-event", __key_release_event, out) + def __key_release_event(d, k, out): + d.response(Gtk.ResponseType.OK) + + dlg.connect("key-press-event", __key_press_event, out) + dlg.connect("key-release-event", __key_release_event, None) id = dlg.run() dlg.destroy() - if id != gtk.RESPONSE_OK or not out: + if id != Gtk.ResponseType.OK or not out: return - keyevent = out[0] - state = keyevent.state & (gdk.CONTROL_MASK | \ - gdk.SHIFT_MASK | \ - gdk.MOD1_MASK | \ - gdk.META_MASK | \ - gdk.SUPER_MASK | \ - gdk.HYPER_MASK) + keyevent = out[len(out) - 1] + state = keyevent.state & (Gdk.ModifierType.CONTROL_MASK | \ + Gdk.ModifierType.SHIFT_MASK | \ + Gdk.ModifierType.MOD1_MASK | \ + Gdk.ModifierType.META_MASK | \ + Gdk.ModifierType.SUPER_MASK | \ + Gdk.ModifierType.HYPER_MASK) + + if state == 0: - state = state | gdk.RELEASE_MASK - elif keyevent.keyval in (keysyms.Control_L, keysyms.Control_R) and state == gdk.CONTROL_MASK: - state = state | gdk.RELEASE_MASK - elif keyevent.keyval in (keysyms.Shift_L, keysyms.Shift_R) and state == gdk.SHIFT_MASK: - state = state | gdk.RELEASE_MASK - elif keyevent.keyval in (keysyms.Alt_L, keysyms.Alt_R) and state == gdk.MOD1_MASK: - state = state | gdk.RELEASE_MASK - elif keyevent.keyval in (keysyms.Meta_L, keysyms.Meta_R) and state == gdk.META_MASK: - state = state | gdk.RELEASE_MASK - elif keyevent.keyval in (keysyms.Super_L, keysyms.Super_R) and state == gdk.SUPER_MASK: - state = state | gdk.RELEASE_MASK - elif keyevent.keyval in (keysyms.Hyper_L, keysyms.Hyper_R) and state == gdk.HYPER_MASK: - state = state | gdk.RELEASE_MASK + state = state | Gdk.ModifierType.RELEASE_MASK + elif keyevent.keyval in (Gdk.KEY_Control_L, Gdk.KEY_Control_R) and state == Gdk.ModifierType.CONTROL_MASK: + state = state | Gdk.ModifierType.RELEASE_MASK + elif keyevent.keyval in (Gdk.KEY_Shift_L, Gdk.KEY_Shift_R) and state == Gdk.ModifierType.SHIFT_MASK: + state = state | Gdk.ModifierType.RELEASE_MASK + elif keyevent.keyval in (Gdk.KEY_Alt_L, Gdk.KEY_Alt_R) and state == Gdk.ModifierType.MOD1_MASK: + state = state | Gdk.ModifierType.RELEASE_MASK + elif keyevent.keyval in (Gdk.KEY_Meta_L, Gdk.KEY_Meta_R) and state == Gdk.ModifierType.META_MASK: + state = state | Gdk.ModifierType.RELEASE_MASK + elif keyevent.keyval in (Gdk.KEY_Super_L, Gdk.KEY_Super_R) and state == Gdk.ModifierType.SUPER_MASK: + state = state | Gdk.ModifierType.RELEASE_MASK + elif keyevent.keyval in (Gdk.KEY_Hyper_L, Gdk.KEY_Hyper_R) and state == Gdk.ModifierType.HYPER_MASK: + state = state | Gdk.ModifierType.RELEASE_MASK for name, button, mask in self.__modifier_buttons: if state & mask: button.set_active(True) else: button.set_active(False) - self.__keycode_entry.set_text(gdk.keyval_name(keyevent.keyval)) + self.__keycode_entry.set_text(Gdk.keyval_name(keyevent.keyval)) def __add_button_clicked_cb(self, button): shortcut = self.__get_shortcut_from_buttons() @@ -286,11 +292,11 @@ def __delete_button_clicked_cb(self, button): self.__delete_button.set_sensitive(False) self.__apply_button.set_sensitive(False) -class KeyboardShortcutSelectionDialog(gtk.Dialog): +class KeyboardShortcutSelectionDialog(Gtk.Dialog): def __init__(self, title = None, parent = None, flags = 0, buttons = None): super(KeyboardShortcutSelectionDialog, self).__init__(title, parent, flags, buttons) self.__selection_view = KeyboardShortcutSelection() - self.vbox.pack_start(self.__selection_view) + self.vbox.pack_start(self.__selection_view, False, True, 0) self.vbox.show_all() def set_shortcuts(self, shotrcuts = None): @@ -307,7 +313,8 @@ def get_shortcuts(self): if __name__ == "__main__": dlg = KeyboardShortcutSelectionDialog( title = "Select test", - buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK)) + buttons = (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, + Gtk.STOCK_OK, Gtk.ResponseType.OK)) dlg.add_shortcut("Control+Shift+space") dlg.set_shortcuts(None) print dlg.run() diff --git a/setup/main.py b/setup/main.py index d778ac3d7..7cd3e3745 100644 --- a/setup/main.py +++ b/setup/main.py @@ -20,25 +20,23 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA -import gettext import os import signal import sys import time -import gtk -import gobject -import pango -import ibus -import keyboardshortcut + +from gi.repository import GLib +from gi.repository import Gtk +from gi.repository import IBus from os import path from xdg import BaseDirectory -from gtk import gdk + +import keyboardshortcut +import locale from enginecombobox import EngineComboBox from enginetreeview import EngineTreeView from engineabout import EngineAbout - -_ = lambda a : gettext.dgettext("ibus", a) -N_ = lambda a : a +from i18n import DOMAINNAME, _, N_, init as i18n_init ( COLUMN_NAME, @@ -63,135 +61,125 @@ class Setup(object): def __flush_gtk_events(self): - while gtk.events_pending(): - gtk.main_iteration() + while Gtk.events_pending(): + Gtk.main_iteration() def __init__(self): super(Setup, self).__init__() - localedir = os.getenv("IBUS_LOCALEDIR") - gettext.bindtextdomain("ibus", localedir) - gettext.bind_textdomain_codeset("ibus", "UTF-8") gtk_builder_file = path.join(path.dirname(__file__), "./setup.ui") - self.__builder = gtk.Builder() - self.__builder.set_translation_domain("ibus") + self.__builder = Gtk.Builder() + self.__builder.set_translation_domain(DOMAINNAME) self.__builder.add_from_file(gtk_builder_file); self.__bus = None self.__init_bus() self.__init_ui() - def __init_ui(self): - # add icon search path - self.__window = self.__builder.get_object("window_preferences") - self.__window.connect("delete-event", gtk.main_quit) + def __init_hotkey(self): + default_values = { + "trigger" : (N_("trigger"), ["Control+space"]), + "enable_unconditional" : (N_("enable"), []), + "disable_unconditional" : (N_("disable"), []) + } - self.__button_close = self.__builder.get_object("button_close") - self.__button_close.connect("clicked", gtk.main_quit) + values = dict(self.__config.get_values("general/hotkey")) - # auto start ibus - self.__checkbutton_auto_start = self.__builder.get_object("checkbutton_auto_start") - self.__checkbutton_auto_start.set_active(self.__is_auto_start()) - self.__checkbutton_auto_start.connect("toggled", self.__checkbutton_auto_start_toggled_cb) + for name, (label, shortcuts) in default_values.items(): + shortcuts = values.get(name, shortcuts) + button = self.__builder.get_object("button_%s" % name) + entry = self.__builder.get_object("entry_%s" % name) + entry.set_text("; ".join(shortcuts)) + entry.set_tooltip_text("\n".join(shortcuts)) + button.connect("clicked", self.__shortcut_button_clicked_cb, + label, "general/hotkey", name, entry) - # keyboard shortcut - # trigger - self.__config = self.__bus.get_config() - shortcuts = self.__config.get_value( - "general/hotkey", "trigger", - ibus.CONFIG_GENERAL_SHORTCUT_TRIGGER_DEFAULT) - button = self.__builder.get_object("button_trigger") - entry = self.__builder.get_object("entry_trigger") - entry.set_text("; ".join(shortcuts)) - entry.set_tooltip_text("\n".join(shortcuts)) - button.connect("clicked", self.__shortcut_button_clicked_cb, - N_("trigger"), "general/hotkey", "trigger", entry) - - # next engine - shortcuts = self.__config.get_value( - "general/hotkey", "next_engine_in_menu", - ibus.CONFIG_GENERAL_SHORTCUT_NEXT_ENGINE_DEFAULT) - button = self.__builder.get_object("button_next_engine") - entry = self.__builder.get_object("entry_next_engine") - entry.set_text("; ".join(shortcuts)) - entry.set_tooltip_text("\n".join(shortcuts)) - button.connect("clicked", self.__shortcut_button_clicked_cb, - N_("next input method"), "general/hotkey", "next_engine_in_menu", entry) - - # prev engine - shortcuts = self.__config.get_value( - "general/hotkey", "previous_engine", - ibus.CONFIG_GENERAL_SHORTCUT_PREV_ENGINE_DEFAULT) - button = self.__builder.get_object("button_prev_engine") - entry = self.__builder.get_object("entry_prev_engine") - entry.set_text("; ".join(shortcuts)) - entry.set_tooltip_text("\n".join(shortcuts)) - button.connect("clicked", self.__shortcut_button_clicked_cb, - N_("previous input method"), "general/hotkey", "previous_engine", entry) + def __init_panel(self): + values = dict(self.__config.get_values("panel")) # lookup table orientation - self.__combobox_lookup_table_orientation = self.__builder.get_object("combobox_lookup_table_orientation") + self.__combobox_lookup_table_orientation = self.__builder.get_object( + "combobox_lookup_table_orientation") self.__combobox_lookup_table_orientation.set_active( - self.__config.get_value("panel", "lookup_table_orientation", 0)) + values.get("lookup_table_orientation", 0)) self.__combobox_lookup_table_orientation.connect("changed", - self.__combobox_lookup_table_orientation_changed_cb) + self.__combobox_lookup_table_orientation_changed_cb) # auto hide - self.__combobox_panel_show = self.__builder.get_object("combobox_panel_show") - self.__combobox_panel_show.set_active( - self.__config.get_value("panel", "show", 0)) - self.__combobox_panel_show.connect("changed", self.__combobox_panel_show_changed_cb) + self.__combobox_panel_show = self.__builder.get_object( + "combobox_panel_show") + self.__combobox_panel_show.set_active(values.get("show", 0)) + self.__combobox_panel_show.connect("changed", + self.__combobox_panel_show_changed_cb) # panel position - self.__combobox_panel_position = self.__builder.get_object("combobox_panel_position") - self.__combobox_panel_position.set_active( - self.__config.get_value("panel", "position", 3)) - self.__combobox_panel_position.connect("changed", self.__combobox_panel_position_changed_cb) + self.__combobox_panel_position = self.__builder.get_object( + "combobox_panel_position") + self.__combobox_panel_position.set_active(values.get("position", 3)) + self.__combobox_panel_position.connect("changed", + self.__combobox_panel_position_changed_cb) # custom font - self.__checkbutton_custom_font = self.__builder.get_object("checkbutton_custom_font") + self.__checkbutton_custom_font = self.__builder.get_object( + "checkbutton_custom_font") self.__checkbutton_custom_font.set_active( - self.__config.get_value("panel", "use_custom_font", False)) - self.__checkbutton_custom_font.connect("toggled", self.__checkbutton_custom_font_toggled_cb) + values.get("use_custom_font", False)) + self.__checkbutton_custom_font.connect("toggled", + self.__checkbutton_custom_font_toggled_cb) - self.__fontbutton_custom_font = self.__builder.get_object("fontbutton_custom_font") - if self.__config.get_value("panel", "use_custom_font", False): + self.__fontbutton_custom_font = self.__builder.get_object( + "fontbutton_custom_font") + if values.get("use_custom_font", False): self.__fontbutton_custom_font.set_sensitive(True) else: self.__fontbutton_custom_font.set_sensitive(False) - font_name = gtk.settings_get_default().get_property("gtk-font-name") + font_name = Gtk.Settings.get_default().get_property("gtk-font-name") font_name = unicode(font_name, "utf-8") - font_name = self.__config.get_value("panel", "custom_font", font_name) - self.__fontbutton_custom_font.connect("notify::font-name", self.__fontbutton_custom_font_notify_cb) + font_name = values.get("custom_font", font_name) + self.__fontbutton_custom_font.connect("notify::font-name", + self.__fontbutton_custom_font_notify_cb) self.__fontbutton_custom_font.set_font_name(font_name) # show icon on system tray - self.__checkbutton_show_icon_on_systray = self.__builder.get_object("checkbutton_show_icon_on_systray") + self.__checkbutton_show_icon_on_systray = self.__builder.get_object( + "checkbutton_show_icon_on_systray") self.__checkbutton_show_icon_on_systray.set_active( - self.__config.get_value("panel", "show_icon_on_systray", True)) - self.__checkbutton_show_icon_on_systray.connect("toggled", self.__checkbutton_show_icon_on_systray_toggled_cb) + values.get("show_icon_on_systray", True)) + self.__checkbutton_show_icon_on_systray.connect("toggled", + self.__checkbutton_show_icon_on_systray_toggled_cb) # show ime name - self.__checkbutton_show_im_name = self.__builder.get_object("checkbutton_show_im_name") + self.__checkbutton_show_im_name = self.__builder.get_object( + "checkbutton_show_im_name") self.__checkbutton_show_im_name.set_active( - self.__config.get_value("panel", "show_im_name", False)) - self.__checkbutton_show_im_name.connect("toggled", self.__checkbutton_show_im_name_toggled_cb) + values.get("show_im_name", False)) + self.__checkbutton_show_im_name.connect("toggled", + self.__checkbutton_show_im_name_toggled_cb) + + def __init_general(self): + values = dict(self.__config.get_values("general")) # embed preedit text - self.__checkbutton_embed_preedit_text = self.__builder.get_object("checkbutton_embed_preedit_text") + self.__checkbutton_embed_preedit_text = self.__builder.get_object( + "checkbutton_embed_preedit_text") self.__checkbutton_embed_preedit_text.set_active( - self.__config.get_value("general", "embed_preedit_text", True)) - self.__checkbutton_embed_preedit_text.connect("toggled", self.__checkbutton_embed_preedit_text_toggled_cb) + values.get("embed_preedit_text", True)) + self.__checkbutton_embed_preedit_text.connect("toggled", + self.__checkbutton_embed_preedit_text_toggled_cb) # use system keyboard layout setting - self.__checkbutton_use_sys_layout = self.__builder.get_object("checkbutton_use_sys_layout") + self.__checkbutton_use_sys_layout = self.__builder.get_object( + "checkbutton_use_sys_layout") self.__checkbutton_use_sys_layout.set_active( - self.__config.get_value("general", "use_system_keyboard_layout", True)) - self.__checkbutton_use_sys_layout.connect("toggled", self.__checkbutton_use_sys_layout_toggled_cb) + values.get("use_system_keyboard_layout", True)) + self.__checkbutton_use_sys_layout.connect("toggled", + self.__checkbutton_use_sys_layout_toggled_cb) # use global ime setting - self.__checkbutton_use_global_engine = self.__builder.get_object("checkbutton_use_global_engine") + self.__checkbutton_use_global_engine = self.__builder.get_object( + "checkbutton_use_global_engine") self.__checkbutton_use_global_engine.set_active( - self.__config.get_value("general", "use_global_engine", False)) - self.__checkbutton_use_global_engine.connect("toggled", self.__checkbutton_use_global_engine_toggled_cb) + values.get("use_global_engine", False)) + self.__checkbutton_use_global_engine.connect("toggled", + self.__checkbutton_use_global_engine_toggled_cb) # init engine page self.__engines = self.__bus.list_engines() @@ -200,8 +188,8 @@ def __init_ui(self): tmp_dict = {} for e in self.__engines: - tmp_dict[e.name] = e - engine_names = self.__config.get_value("general", "preload_engines", []) + tmp_dict[e.get_name()] = e + engine_names = values.get("preload_engines", []) engines = [tmp_dict[name] for name in engine_names if name in tmp_dict] self.__treeview = self.__builder.get_object("treeview_engines") @@ -215,21 +203,68 @@ def __init_ui(self): button.connect("clicked", lambda *args:self.__treeview.move_up_engine()) button = self.__builder.get_object("button_engine_down") - button.connect("clicked", lambda *args:self.__treeview.move_down_engine()) + button.connect("clicked", + lambda *args:self.__treeview.move_down_engine()) button = self.__builder.get_object("button_engine_about") button.connect("clicked", self.__button_engine_about_cb) - self.__combobox.connect("notify::active-engine", self.__combobox_notify_active_engine_cb) - self.__treeview.connect("notify", self.__treeview_notify_cb) + self.__engine_setup_exec_list = {} + button = self.__builder.get_object("button_engine_preferences") + button.connect("clicked", self.__button_engine_preferences_cb) + + self.__combobox.connect("notify::active-engine", + self.__combobox_notify_active_engine_cb) + self.__treeview.connect("notify::active-engine", self.__treeview_notify_cb) + self.__treeview.connect("notify::engines", self.__treeview_notify_cb) + + def __init_ui(self): + # add icon search path + self.__window = self.__builder.get_object("window_preferences") + self.__window.connect("delete-event", Gtk.main_quit) + + self.__button_close = self.__builder.get_object("button_close") + self.__button_close.connect("clicked", Gtk.main_quit) + + # auto start ibus + self.__checkbutton_auto_start = self.__builder.get_object( + "checkbutton_auto_start") + self.__checkbutton_auto_start.set_active(self.__is_auto_start()) + self.__checkbutton_auto_start.connect("toggled", + self.__checkbutton_auto_start_toggled_cb) + + self.__config = self.__bus.get_config() + + self.__init_hotkey() + self.__init_panel() + self.__init_general() def __combobox_notify_active_engine_cb(self, combobox, property): engine = self.__combobox.get_active_engine() button = self.__builder.get_object("button_engine_add") - button.set_sensitive(engine != None and engine not in self.__treeview.get_engines()) - - def __treeview_notify_cb(self, treeview, property): - if property.name != "active-engine" and property.name != "engines": + button.set_sensitive( + engine != None and engine not in self.__treeview.get_engines()) + + def __get_engine_setup_exec_args(self, engine): + args = [] + if engine == None: + return args + setup = str(engine.get_setup()) + if len(setup) != 0: + args = setup.split() + args.insert(1, path.basename(args[0])) + return args + name = str(engine.name) + libexecdir = os.environ['IBUS_LIBEXECDIR'] + setup_path = (libexecdir + '/' + 'ibus-setup-' if libexecdir != None \ + else 'ibus-setup-') + name.split(':')[0] + if path.exists(setup_path): + args.append(setup_path) + args.append(path.basename(setup_path)) + return args + + def __treeview_notify_cb(self, treeview, prop): + if prop.name not in ("active-engine", "engines"): return engines = self.__treeview.get_engines() @@ -240,9 +275,16 @@ def __treeview_notify_cb(self, treeview, property): self.__builder.get_object("button_engine_up").set_sensitive(engine not in engines[:1]) self.__builder.get_object("button_engine_down").set_sensitive(engine not in engines[-1:]) - if property.name == "engines": - engine_names = map(lambda e: e.name, engines) - self.__config.set_list("general", "preload_engines", engine_names, "s") + # obj = self.__builder.get_object("button_engine_preferences") + # if len(self.__get_engine_setup_exec_args(engine)) != 0: + # obj.set_sensitive(True) + # else: + # obj.set_sensitive(False) + + if prop.name == "engines": + engine_names = map(lambda e: e.get_name(), engines) + value = GLib.Variant.new_strv(engine_names) + self.__config.set_value("general", "preload_engines", value) def __button_engine_add_cb(self, button): engine = self.__combobox.get_active_engine() @@ -255,9 +297,27 @@ def __button_engine_about_cb(self, button): about.run() about.destroy() + def __button_engine_preferences_cb(self, button): + engine = self.__treeview.get_active_engine() + args = self.__get_engine_setup_exec_args(engine) + if len(args) == 0: + return + name = engine.name + if name in self.__engine_setup_exec_list.keys(): + try: + wpid, sts = os.waitpid(self.__engine_setup_exec_list[name], + os.WNOHANG) + # the setup is still running. + if wpid == 0: + return + except OSError: + pass + del self.__engine_setup_exec_list[name] + self.__engine_setup_exec_list[name] = os.spawnl(os.P_NOWAIT, *args) + def __init_bus(self): try: - self.__bus = ibus.Bus() + self.__bus = IBus.Bus() # self.__bus.connect("config-value-changed", self.__config_value_changed_cb) # self.__bus.connect("config-reloaded", self.__config_reloaded_cb) # self.__bus.config_add_watch("/general") @@ -266,18 +326,18 @@ def __init_bus(self): except: while self.__bus == None: message = _("IBus daemon is not started. Do you want to start it now?") - dlg = gtk.MessageDialog(type = gtk.MESSAGE_QUESTION, - buttons = gtk.BUTTONS_YES_NO, + dlg = Gtk.MessageDialog(type = Gtk.MESSAGE_QUESTION, + buttons = Gtk.ButtonsType.YES_NO, message_format = message) id = dlg.run() dlg.destroy() self.__flush_gtk_events() - if id != gtk.RESPONSE_YES: + if id != Gtk.ResponseType.YES: sys.exit(0) pid = os.spawnlp(os.P_NOWAIT, "ibus-daemon", "ibus-daemon", "--xim") time.sleep(1) try: - self.__bus = ibus.Bus() + self.__bus = IBus.Bus() except: continue message = _("IBus has been started! " @@ -286,15 +346,16 @@ def __init_bus(self): " export XMODIFIERS=@im=ibus\n" " export QT_IM_MODULE=ibus" ) - dlg = gtk.MessageDialog(type = gtk.MESSAGE_INFO, - buttons = gtk.BUTTONS_OK, + dlg = Gtk.MessageDialog(type = Gtk.MESSAGE_INFO, + buttons = Gtk.ButtonsType.OK, message_format = message) id = dlg.run() dlg.destroy() self.__flush_gtk_events() def __shortcut_button_clicked_cb(self, button, name, section, _name, entry): - buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK) + buttons = (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, + Gtk.STOCK_OK, Gtk.ResponseType.OK) title = _("Select keyboard shortcut for %s") % _(name) dialog = keyboardshortcut.KeyboardShortcutSelectionDialog(buttons = buttons, title = title) text = entry.get_text() @@ -306,9 +367,9 @@ def __shortcut_button_clicked_cb(self, button, name, section, _name, entry): id = dialog.run() shortcuts = dialog.get_shortcuts() dialog.destroy() - if id != gtk.RESPONSE_OK: + if id != Gtk.ResponseType.OK: return - self.__config.set_list(section, _name, shortcuts, "s") + self.__config.set_value(section, _name, GLib.Variant.new_strv(shortcuts)) text = "; ".join(shortcuts) entry.set_text(text) entry.set_tooltip_text(text) @@ -325,8 +386,8 @@ def __item_started_column_toggled_cb(self, cell, path_str, model): try: self.__bus.register_start_engine(data[DATA_LANG], data[DATA_NAME]) except Exception, e: - dlg = gtk.MessageDialog(type = gtk.MESSAGE_ERROR, - buttons = gtk.BUTTONS_CLOSE, + dlg = Gtk.MessageDialog(type = Gtk.MESSAGE_ERROR, + buttons = Gtk.ButtonsType.CLOSE, message_format = str(e)) dlg.run() dlg.destroy() @@ -336,8 +397,8 @@ def __item_started_column_toggled_cb(self, cell, path_str, model): try: self.__bus.register_stop_engine(data[DATA_LANG], data[DATA_NAME]) except Exception, e: - dlg = gtk.MessageDialog(type = gtk.MESSAGE_ERROR, - buttons = gtk.BUTTONS_CLOSE, + dlg = Gtk.MessageDialog(type = Gtk.MESSAGE_ERROR, + buttons = Gtk.ButtonsType.CLOSE, message_format = str(e)) dlg.run() dlg.destroy() @@ -360,18 +421,20 @@ def __item_preload_column_toggled_cb(self, cell, path_str, model): if data[DATA_PRELOAD]: if engine not in self.__preload_engines: self.__preload_engines.add(engine) - self.__config.set_list("general", "preload_engines", list(self.__preload_engines), "s") + value = GLib.Variant.new_strv(list(self.__preload_engines)) + self.__config.set_value("general", "preload_engines", value) else: if engine in self.__preload_engines: self.__preload_engines.remove(engine) - self.__config.set_list("general", "preload_engines", list(self.__preload_engines), "s") + value = GLib.Variant.new_strv(list(self.__preload_engines)) + self.__config.set_value("general", "preload_engines", value) # set new value model.set(iter, COLUMN_PRELOAD, data[DATA_PRELOAD]) def __is_auto_start(self): - link_file = path.join(BaseDirectory.xdg_config_home, "autostart/ibus.desktop") - ibus_desktop = path.join(os.getenv("IBUS_PREFIX"), "share/applications/ibus.desktop") + link_file = path.join(BaseDirectory.xdg_config_home, "autostart/IBus.desktop") + ibus_desktop = path.join(os.getenv("IBUS_PREFIX"), "share/applications/IBus.desktop") if not path.exists(link_file): return False @@ -386,8 +449,8 @@ def __checkbutton_auto_start_toggled_cb(self, button): if not path.isdir(auto_start_dir): os.makedirs(auto_start_dir) - link_file = path.join(BaseDirectory.xdg_config_home, "autostart/ibus.desktop") - ibus_desktop = path.join(os.getenv("IBUS_PREFIX"), "share/applications/ibus.desktop") + link_file = path.join(BaseDirectory.xdg_config_home, "autostart/IBus.desktop") + ibus_desktop = path.join(os.getenv("IBUS_PREFIX"), "share/applications/IBus.desktop") # unlink file try: os.unlink(link_file) @@ -398,50 +461,58 @@ def __checkbutton_auto_start_toggled_cb(self, button): def __combobox_lookup_table_orientation_changed_cb(self, combobox): self.__config.set_value( - "panel", "lookup_table_orientation", - self.__combobox_lookup_table_orientation.get_active()) + "panel", "lookup_table_orientation", + GLib.Variant.new_int32(self.__combobox_lookup_table_orientation.get_active())) def __combobox_panel_show_changed_cb(self, combobox): self.__config.set_value( - "panel", "show", - self.__combobox_panel_show.get_active()) + "panel", "show", + GLib.Variant.new_int32(self.__combobox_panel_show.get_active())) def __combobox_panel_position_changed_cb(self, combobox): self.__config.set_value( - "panel", "position", - self.__combobox_panel_position.get_active()) + "panel", "position", + GLib.Variant.new_int32(self.__combobox_panel_position.get_active())) def __checkbutton_custom_font_toggled_cb(self, button): if self.__checkbutton_custom_font.get_active(): self.__fontbutton_custom_font.set_sensitive(True) - self.__config.set_value("panel", "use_custom_font", True) + self.__config.set_value("panel", "use_custom_font", + GLib.Variant.new_boolean(True)) else: self.__fontbutton_custom_font.set_sensitive(False) - self.__config.set_value("panel", "use_custom_font", False) + self.__config.set_value("panel", "use_custom_font", + GLib.Variant.new_boolean(False)) def __fontbutton_custom_font_notify_cb(self, button, arg): font_name = self.__fontbutton_custom_font.get_font_name() font_name = unicode(font_name, "utf-8") - self.__config.set_value("panel", "custom_font", font_name) + self.__config.set_value("panel", "custom_font", + GLib.Variant.new_string(font_name)) def __checkbutton_show_icon_on_systray_toggled_cb(self, button): value = self.__checkbutton_show_icon_on_systray.get_active() + value = GLib.Variant.new_boolean(value) self.__config.set_value("panel", "show_icon_on_systray", value) def __checkbutton_show_im_name_toggled_cb(self, button): value = self.__checkbutton_show_im_name.get_active() + value = GLib.Variant.new_boolean(value) self.__config.set_value("panel", "show_im_name", value) def __checkbutton_embed_preedit_text_toggled_cb(self, button): value = self.__checkbutton_embed_preedit_text.get_active() + value = GLib.Variant.new_boolean(value) self.__config.set_value("general", "embed_preedit_text", value) def __checkbutton_use_sys_layout_toggled_cb(self, button): value = self.__checkbutton_use_sys_layout.get_active() + value = GLib.Variant.new_boolean(value) self.__config.set_value("general", "use_system_keyboard_layout", value) def __checkbutton_use_global_engine_toggled_cb(self, button): value = self.__checkbutton_use_global_engine.get_active() + value = GLib.Variant.new_boolean(value) self.__config.set_value("general", "use_global_engine", value) def __config_value_changed_cb(self, bus, section, name, value): @@ -456,8 +527,10 @@ def __sigusr1_cb(self, *args): def run(self): self.__window.show_all() signal.signal(signal.SIGUSR1, self.__sigusr1_cb) - gtk.main() + Gtk.main() if __name__ == "__main__": + locale.setlocale(locale.LC_ALL, '') + i18n_init() setup = Setup() setup.run() diff --git a/setup/setup.ui b/setup/setup.ui index 0e31a78f3..e37cb323a 100644 --- a/setup/setup.ui +++ b/setup/setup.ui @@ -96,22 +96,10 @@ True - 3 + 5 2 12 6 - - - True - The shortcut keys for turning input method on or off - 0 - Enable or disable: - - - GTK_FILL - GTK_FILL - - True @@ -120,8 +108,8 @@ Next input method: - 1 - 2 + 3 + 4 GTK_FILL GTK_FILL @@ -135,8 +123,8 @@ Previous input method: - 2 - 3 + 4 + 5 GTK_FILL GTK_FILL @@ -205,8 +193,8 @@ 1 2 - 1 - 2 + 3 + 4 @@ -239,6 +227,114 @@ + + 1 + 2 + 4 + 5 + + + + + True + The shortcut keys for turning input method on or off + 0 + Enable or disable: + + + GTK_FILL + GTK_FILL + + + + + True + 0 + Enable: + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 6 + + + True + True + False + + + 0 + + + + + ... + True + True + True + True + + + False + 1 + + + + + 1 + 2 + 1 + 2 + + + + + True + 0 + Disable: + + + 2 + 3 + GTK_FILL + GTK_FILL + + + + + True + 6 + + + True + True + False + + + 0 + + + + + ... + True + True + True + True + + + False + 1 + + + 1 2 @@ -630,6 +726,22 @@ 4 + + + gtk-preferences + True + False + True + True + Show setup of the selected input method + True + + + False + False + 5 + + diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 4c91b3a97..000000000 --- a/src/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -ibusmarshalers.c -ibusmarshalers.h -test-attribute -test-bus -test-engine -test-keynames -test-lookuptable -test-proxy -test-server -test-text -test-keymap -stamp-ibusenumtypes.h -stamp-ibusmarshalers.h -keysymdef.h -ibusenumtypes.c -ibusenumtypes.h -ibusversion.h diff --git a/src/Makefile.am b/src/Makefile.am index cdd3d7c6e..b4d0dcf40 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -20,129 +20,165 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA +NULL = + +SUBDIRS = . tests + +# libibus = libibus-@IBUS_API_VERSION@.la +libibus = libibus-1.0.la + +# gobject introspection -include $(INTROSPECTION_MAKEFILE) INTROSPECTION_SCANNER_ARGS = INTROSPECTION_COMPILER_ARGS = \ - --includedir=$(srcdir) \ - --includedir=. \ - $(NULL) + --includedir=$(srcdir) \ + --includedir=. \ + $(NULL) INTROSPECTION_GIRS = CLEANFILES = - -INCLUDES = \ - -I$(top_srcdir) \ - $(NULL) +# C preprocessor flags +AM_CPPFLAGS = \ + -DG_LOG_DOMAIN=\"IBUS\" \ + @GLIB2_CFLAGS@ \ + @GOBJECT2_CFLAGS@ \ + @GIO2_CFLAGS@ \ + -DIBUS_DATA_DIR=\"$(pkgdatadir)\" \ + -DIBUS_COMPILATION \ + -DISOCODES_PREFIX=\"$(ISOCODES_PREFIX)\" \ + $(NULL) # ibus library -ibustargetlib = libibus.la -lib_LTLIBRARIES = $(ibustargetlib) -ibus_built_public_h_sources = \ - ibusmarshalers.h \ - ibusenumtypes.h \ - $(NULl) -ibus_built_c_sources = \ - ibusmarshalers.c \ - ibusenumtypes.c \ - $(NULL) -ibus_built_sources = \ - $(ibus_built_public_h_sources) \ - $(ibus_built_c_sources) \ - $(NULL) -ibus_public_h_sources = \ - ibus.h \ - ibusdbus.h \ - ibusversion.h \ - ibusshare.h \ - ibusdebug.h \ - ibusobject.h \ - ibusserializable.h \ - ibusconnection.h \ - ibusserver.h \ - ibusproxy.h \ - ibusservice.h \ - ibusfactory.h \ - ibusengine.h \ - ibustext.h \ - ibuskeymap.h \ - ibusattribute.h \ - ibusattrlist.h \ - ibusproperty.h \ - ibusproplist.h \ - ibuslookuptable.h \ - ibusinputcontext.h \ - ibusconfig.h \ - ibusconfigservice.h \ - ibuspanelservice.h \ - ibusmessage.h \ - ibuspendingcall.h \ - ibuserror.h \ - ibuskeysyms.h \ - ibustypes.h \ - ibusbus.h \ - ibushotkey.h \ - ibusxml.h \ - ibusenginedesc.h \ - ibusobservedpath.h \ - ibuscomponent.h \ - ibusmainloop.h \ - $(NULL) -ibus_h_sources = \ - ibusinternal.h \ - ibusconfigprivate.h \ - keyname-table.h \ - $(ibus_public_h_sources) \ - $(NULL) -ibus_c_sources = \ - ibusshare.c \ - ibusinternal.c \ - ibusobject.c \ - ibusserializable.c \ - ibusconnection.c \ - ibusserver.c \ - ibusproxy.c \ - ibusservice.c \ - ibusfactory.c \ - ibusengine.c \ - ibustext.c \ - ibuskeymap.c \ - ibusattribute.c \ - ibusattrlist.c \ - ibusproperty.c \ - ibusproplist.c \ - ibuslookuptable.c \ - ibusinputcontext.c \ - ibusconfig.c \ - ibusconfigservice.c \ - ibuspanelservice.c \ - ibusmessage.c \ - ibuspendingcall.c \ - ibuserror.c \ - ibusbus.c \ - ibuskeynames.c \ - ibushotkey.c \ - ibusxml.c \ - ibusenginedesc.c \ - ibusobservedpath.c \ - ibuscomponent.c \ - ibusmainloop.c \ - $(NULL) -ibusincludedir = $(includedir)/ibus-1.0 +lib_LTLIBRARIES = $(libibus) + +libibus_1_0_la_LIBADD = \ + @GLIB2_LIBS@ \ + @GOBJECT2_LIBS@ \ + @GIO2_LIBS@ \ + $(NULL) +libibus_1_0_la_LDFLAGS = \ + -no-undefined \ + -export-symbols-regex "ibus_.*" \ + -version-info @LT_VERSION_INFO@ \ + $(NULL) + +ibus_sources = \ + ibusshare.c \ + ibusobject.c \ + ibusserializable.c \ + ibusproxy.c \ + ibusservice.c \ + ibusfactory.c \ + ibusengine.c \ + ibuserror.c \ + ibustext.c \ + ibuskeymap.c \ + ibusattribute.c \ + ibusattrlist.c \ + ibusproperty.c \ + ibusproplist.c \ + ibuslookuptable.c \ + ibusinputcontext.c \ + ibusconfig.c \ + ibusconfigservice.c \ + ibuspanelservice.c \ + ibusbus.c \ + ibuskeynames.c \ + ibuskeyuni.c \ + ibushotkey.c \ + ibusxml.c \ + ibusenginedesc.c \ + ibusobservedpath.c \ + ibuscomponent.c \ + ibusutil.c \ + ibusenginesimple.c \ + $(NULL) +libibus_1_0_la_SOURCES = \ + $(ibus_sources) \ + ibusmarshalers.c \ + ibusenumtypes.c \ + $(NULL) +ibus_marshalers_sources = \ + ibusmarshalers.h \ + ibusmarshalers.c \ + $(NULL) +ibus_enumtypes_sources = \ + ibusenumtypes.h \ + ibusenumtypes.c \ + $(NULL) +ibus_headers = \ + ibus.h \ + ibusversion.h \ + ibusshare.h \ + ibusdebug.h \ + ibusobject.h \ + ibusserializable.h \ + ibusproxy.h \ + ibusservice.h \ + ibusfactory.h \ + ibusengine.h \ + ibuserror.h \ + ibustext.h \ + ibuskeymap.h \ + ibusattribute.h \ + ibusattrlist.h \ + ibusproperty.h \ + ibusproplist.h \ + ibuslookuptable.h \ + ibusinputcontext.h \ + ibusconfig.h \ + ibusconfigservice.h \ + ibuspanelservice.h \ + ibuskeysyms.h \ + ibuskeysyms-compat.h \ + ibuskeys.h \ + ibustypes.h \ + ibusbus.h \ + ibushotkey.h \ + ibusxml.h \ + ibusenginedesc.h \ + ibusobservedpath.h \ + ibuscomponent.h \ + ibusutil.h \ + ibusenginesimple.h \ + $(NULL) +ibusincludedir = $(includedir)/ibus-@IBUS_API_VERSION@ +ibus_public_headers = \ + $(ibus_headers) \ + ibusenumtypes.h \ + $(NULL) +ibusinclude_HEADERS = \ + $(ibus_public_headers) \ + $(NULL) +ibus_privite_headers = \ + ibusinternal.h \ + keyname-table.h \ + gtkimcontextsimpleseqs.h \ + $(NULL) +noinst_HEADERS = \ + $(ibus_privite_headers) \ + $(NULL) + +BUILT_SOURCES = \ + ibusmarshalers.h \ + ibusmarshalers.c \ + ibusenumtypes.h \ + ibusenumtypes.c \ + $(NULL) if HAVE_INTROSPECTION - -introspection_files = \ - $(ibus_public_h_sources) \ - $(ibus_c_sources) \ - ibusenumtypes.c \ - ibusenumtypes.h \ - $(NULL) -IBus-1.0.gir: $(ibustargetlib) Makefile -IBus_1_0_gir_SCANNERFLAGS = --strip-prefix=IBus --pkg=dbus-1,glib-2.0 -IBus_1_0_gir_INCLUDES = GLib-2.0 GObject-2.0 -IBus_1_0_gir_LIBS = $(ibustargetlib) +introspection_files = \ + $(ibus_public_headers) \ + $(ibus_sources) \ + ibusenumtypes.c \ + ibusenumtypes.h \ + $(NULL) +IBus-1.0.gir: $(libibus) Makefile +IBus_1_0_gir_SCANNERFLAGS = --pkg-export=ibus-1.0 $(IBUS_GIR_SCANNERFLAGS) +IBus_1_0_gir_INCLUDES = GLib-2.0 GObject-2.0 Gio-2.0 +IBus_1_0_gir_LIBS = $(libibus) IBus_1_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_files)) -IBus_1_0_gir_CFLAGS = $(INCLUDES) +IBus_1_0_gir_CFLAGS = -DIBUS_COMPILATION INTROSPECTION_GIRS += IBus-1.0.gir girdir = $(datadir)/gir-1.0 @@ -154,132 +190,46 @@ typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) CLEANFILES += $(dist_gir_DATA) $(typelibs_DATA) endif -ibusinclude_HEADERS = \ - $(ibus_public_h_sources) \ - $(ibus_built_public_h_sources) \ - $(NULL) -libibus_la_SOURCES = \ - $(ibus_h_sources) \ - $(ibus_c_sources) \ - $(NULL) -nodist_libibus_la_SOURCES = \ - $(ibus_built_h_sources) \ - $(ibus_built_c_sources) \ - $(NULL) -libibus_la_CFLAGS = \ - @X11_CFLAGS@ \ - @GLIB2_CFLAGS@ \ - @GOBJECT2_CFLAGS@ \ - @GIO2_CFLAGS@ \ - @DBUS_CFLAGS@ \ - -DG_LOG_DOMAIN=\"IBUS\" \ - -DIBUS_DATA_DIR=\"$(pkgdatadir)\" \ - $(NULL) -libibus_la_LIBADD = \ - @X11_LIBS@ \ - @GLIB2_LIBS@ \ - @GOBJECT2_LIBS@ \ - @GIO2_LIBS@ \ - @DBUS_LIBS@ \ - $(NULL) -libibus_la_LDFLAGS = \ - -export-symbols-regex "ibus_.*" \ - -version-info @LT_VERSION_INFO@ \ - $(NULL) - -BUILT_SOURCES = \ - $(ibus_built_sources) \ - $(NULL) - - -# test programs -DEPS = \ - libibus.la \ - $(NULL) -AM_CFLAGS = \ - @X11_CFLAGS@ \ - @GLIB2_CFLAGS@ \ - @GOBJECT2_CFLAGS@ \ - @GIO2_CFLAGS@ \ - @DBUS_CFLAGS@ \ - -DG_LOG_DOMAIN=\"IBUS\" \ - $(NULL) -AM_LDADD = \ - $(DEPS) \ - @GLIB2_LIBS@ \ - @GOBJECT2_LIBS@ \ - $(NULL) - -TESTS = \ - test-bus \ - test-text \ - test-keymap \ - test-keynames \ - test-attribute \ - test-lookuptable \ - test-global-engine \ - $(NULL) -noinst_PROGRAMS = $(TESTS) -test_bus_DEPENDENCIES = $(DEPS) -test_text_DEPENDENCIES = $(DEPS) -test_keymap_DEPENDENCIES = $(DEPS) -test_keynames_DEPENDENCIES = $(DEPS) -test_attribute_DEPENDENCIES = $(DEPS) -test_lookuptable_DEPENDENCIES = $(DEPS) -test_global_engine_DEPENDENCIES = $(DEPS) -test_bus_LDADD = $(AM_LDADD) -test_text_LDADD = $(AM_LDADD) -test_keymap_LDADD = $(AM_LDADD) -test_keynames_LDADD = $(AM_LDADD) -test_attribute_LDADD = $(AM_LDADD) -test_lookuptable_LDADD = $(AM_LDADD) -test_global_engine_LDADD = $(AM_LDADD) - # gen enum types -ibusenumtypes.h: stamp-ibusenumtypes.h - @true -stamp-ibusenumtypes.h: $(ibus_public_h_sources) ibusenumtypes.h.template - @( cd $(srcdir) && $(GLIB_MKENUMS) --template ibusenumtypes.h.template \ - $(ibus_public_h_sources) ) | sed 's/i_bus_/ibus_/g' | sed 's/I_TYPE_BUS_/IBUS_TYPE_/g' >> xgen-geth \ - && (cmp -s xgen-geth ibusenumtypes.h || cp xgen-geth ibusenumtypes.h ) \ - && rm -f xgen-geth \ - && echo timestamp > $(@F) -ibusenumtypes.c: $(ibus_public_h_sources) ibusenumtypes.c.template - $(AM_V_GEN) \ - ( cd $(srcdir) && $(GLIB_MKENUMS) --template ibusenumtypes.c.template \ - $(ibus_public_h_sources) ) | sed 's/i_bus_/ibus_/g' | sed 's/I_TYPE_BUS_/IBUS_TYPE_/g' > xgen-getc \ - && cp xgen-getc ibusenumtypes.c \ - && rm -f xgen-getc +ibusenumtypes.h: $(ibus_headers) ibusenumtypes.h.template + $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \ + cd $(srcdir) && $(GLIB_MKENUMS) --template ibusenumtypes.h.template $(ibus_headers) | \ + sed 's/i_bus_/ibus_/g' | \ + sed 's/I_TYPE_BUS_/IBUS_TYPE_/g') > \ + ibusenumtypes.h.tmp && mv ibusenumtypes.h.tmp ibusenumtypes.h + +ibusenumtypes.c: $(ibus_headers) ibusenumtypes.c.template + $(AM_V_GEN) ( top_builddir=`cd $(top_builddir) && pwd`; \ + cd $(srcdir) && $(GLIB_MKENUMS) --template ibusenumtypes.c.template $(ibus_headers) | \ + sed 's/i_bus_/ibus_/g' | \ + sed 's/I_TYPE_BUS_/IBUS_TYPE_/g') > \ + ibusenumtypes.c.tmp && mv ibusenumtypes.c.tmp ibusenumtypes.c # gen marshal -ibusmarshalers.h: stamp-ibusmarshalers.h - @true -stamp-ibusmarshalers.h: ibusmarshalers.list - @$(GLIB_GENMARSHAL) --prefix=ibus_marshal $(srcdir)/ibusmarshalers.list --header >> xgen-gmh \ - && (cmp -s xgen-gmh ibusmarshalers.h || cp xgen-gmh ibusmarshalers.h) \ - && rm -f xgen-gmh \ - && echo timestamp > $(@F) -ibusmarshalers.c: ibusmarshalers.list - $(AM_V_GEN) \ - (echo "#include \"ibusmarshalers.h\""; \ - $(GLIB_GENMARSHAL) --prefix=ibus_marshal $(srcdir)/ibusmarshalers.list --body; \ - echo ) >> xgen-gmc \ - && cp xgen-gmc ibusmarshalers.c \ - && rm -f xgen-gmc - -EXTRA_DIST = \ - ibusversion.h.in \ - ibusmarshalers.list \ - ibusenumtypes.h.template \ - ibusenumtypes.c.template \ - $(NULL) - -CLEANFILES += \ - $(BUILT_SOURCES) \ - stamp-ibusmarshalers.h \ - stamp-ibusenumtypes.h \ - $(NULL) - -DISTCLEANFILES = \ - ibusversion.h \ - $(NULL) +ibusmarshalers.h: ibusmarshalers.list + $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_ibus_marshal $(srcdir)/ibusmarshalers.list --header --internal > $@.tmp && \ + mv $@.tmp $@ + +ibusmarshalers.c: ibusmarshalers.h ibusmarshalers.list + $(AM_V_GEN) (echo "#include \"ibusmarshalers.h\""; \ + $(GLIB_GENMARSHAL) --prefix=_ibus_marshal $(srcdir)/ibusmarshalers.list --body --internal) > $@.tmp && \ + mv $@.tmp $@ + +EXTRA_DIST = \ + ibusversion.h.in \ + ibusmarshalers.list \ + ibusenumtypes.h.template \ + ibusenumtypes.c.template \ + $(NULL) + +CLEANFILES += \ + $(BUILT_SOURCES) \ + stamp-ibusmarshalers.h \ + stamp-ibusenumtypes.h \ + $(NULL) + +DISTCLEANFILES = \ + ibusversion.h \ + $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/src/gtkimcontextsimpleseqs.h b/src/gtkimcontextsimpleseqs.h new file mode 100644 index 000000000..fab1c6a96 --- /dev/null +++ b/src/gtkimcontextsimpleseqs.h @@ -0,0 +1,4486 @@ +/* GTK - The GIMP Tool Kit + * Copyright (C) 2007, 2008 GNOME Foundation + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* + * File auto-generated from script found at http://bugzilla.gnome.org/show_bug.cgi?id=321896 + * using the input files + * Input : http://gitweb.freedesktop.org/?p=xorg/lib/libX11.git;a=blob_plain;f=nls/en_US.UTF-8/Compose.pre + * Input : http://www.cl.cam.ac.uk/~mgk25/ucs/keysyms.txt + * Input : http://www.unicode.org/Public/UNIDATA/UnicodeData.txt + * + * This table is optimised for space and requires special handling to access the content. + * This table is used solely by http://svn.gnome.org/viewcvs/gtk%2B/trunk/gtk/gtkimcontextsimple.c + * + * The resulting file is placed at http://svn.gnome.org/viewcvs/gtk%2B/trunk/gtk/gtkimcontextsimpleseqs.h + * This file is described in bug report http://bugzilla.gnome.org/show_bug.cgi?id=321896 + */ + +/* + * Modified by the GTK+ Team and others 2007, 2008. See the AUTHORS + * file for a list of people on the GTK+ Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + +#ifndef __GTK_IM_CONTEXT_SIMPLE_SEQS_H__ +#define __GTK_IM_CONTEXT_SIMPLE_SEQS_H__ + +/* === These are the original comments of the file; we keep for historical purposes === + * + * The following table was generated from the X compose tables include with + * XFree86 4.0 using a set of Perl scripts. Contact Owen Taylor + * to obtain the relevant perl scripts. + * + * The following compose letter letter sequences confliced + * Dstroke/dstroke and ETH/eth; resolved to Dstroke (Croation, Vietnamese, Lappish), over + * ETH (Icelandic, Faroese, old English, IPA) [ D- -D d- -d ] + * Amacron/amacron and ordfeminine; resolved to ordfeminine [ _A A_ a_ _a ] + * Amacron/amacron and Atilde/atilde; resolved to atilde [ -A A- a- -a ] + * Omacron/Omacron and masculine; resolved to masculine [ _O O_ o_ _o ] + * Omacron/omacron and Otilde/atilde; resolved to otilde [ -O O- o- -o ] + * + * [ Amacron and Omacron are in Latin-4 (Baltic). ordfeminine and masculine are used for + * spanish. atilde and otilde are used at least for Portuguese ] + * + * at and Aring; resolved to Aring [ AA ] + * guillemotleft and caron; resolved to guillemotleft [ << ] + * ogonek and cedilla; resolved to cedilla [ ,, ] + * + * This probably should be resolved by first checking an additional set of compose tables + * that depend on the locale or selected input method. + */ + +static const guint16 gtk_compose_seqs_compact[] = { +IBUS_KEY_dead_stroke, 144, 232, 241, 241, 241, +IBUS_KEY_Greek_accentdieresis, 241, 245, 245, 245, 245, +IBUS_KEY_dead_grave, 245, 307, 394, 606, 606, +IBUS_KEY_dead_acute, 606, 670, 766, 1042, 1042, +IBUS_KEY_dead_circumflex, 1042, 1166, 1166, 1366, 1366, +IBUS_KEY_dead_tilde, 1366, 1450, 1513, 1653, 1653, +IBUS_KEY_dead_macron, 1653, 1699, 1699, 1771, 1771, +IBUS_KEY_dead_breve, 1771, 1821, 1821, 1845, 1845, +IBUS_KEY_dead_abovedot, 1845, 1875, 1878, 1910, 1910, +IBUS_KEY_dead_diaeresis, 1910, 1998, 2007, 2031, 2031, +IBUS_KEY_dead_abovering, 2031, 2041, 2041, 2041, 2041, +IBUS_KEY_dead_doubleacute, 2041, 2051, 2051, 2051, 2051, +IBUS_KEY_dead_caron, 2051, 2093, 2093, 2101, 2101, +IBUS_KEY_dead_cedilla, 2101, 2113, 2113, 2113, 2113, +IBUS_KEY_dead_ogonek, 2113, 2123, 2123, 2123, 2123, +IBUS_KEY_dead_iota, 2123, 2145, 2244, 2676, 3336, +IBUS_KEY_dead_voiced_sound, 3336, 3382, 3382, 3382, 3382, +IBUS_KEY_dead_semivoiced_sound, 3382, 3392, 3392, 3392, 3392, +IBUS_KEY_dead_belowdot, 3392, 3408, 3408, 3424, 3424, +IBUS_KEY_dead_hook, 3424, 3500, 3500, 3556, 3556, +IBUS_KEY_dead_horn, 3556, 3566, 3566, 3566, 3566, +IBUS_KEY_dead_psili, 3566, 3594, 3594, 3594, 3594, +IBUS_KEY_dead_dasia, 3594, 3626, 3626, 3626, 3626, +IBUS_KEY_Multi_key, 3626, 3626, 9566, 13274, 15139, +IBUS_KEY_space, 0x002F, +IBUS_KEY_2, 0x01BB, +IBUS_KEY_A, 0x023A, +IBUS_KEY_B, 0x0243, +IBUS_KEY_C, 0x023B, +IBUS_KEY_D, 0x0110, +IBUS_KEY_E, 0x0246, +IBUS_KEY_G, 0x01E4, +IBUS_KEY_H, 0x0126, +IBUS_KEY_I, 0x0197, +IBUS_KEY_J, 0x0248, +IBUS_KEY_L, 0x0141, +IBUS_KEY_O, 0x00D8, +IBUS_KEY_P, 0x2C63, +IBUS_KEY_R, 0x024C, +IBUS_KEY_T, 0x0166, +IBUS_KEY_U, 0x0244, +IBUS_KEY_Y, 0x024E, +IBUS_KEY_Z, 0x01B5, +IBUS_KEY_a, 0x2C65, +IBUS_KEY_b, 0x0180, +IBUS_KEY_c, 0x023C, +IBUS_KEY_d, 0x0111, +IBUS_KEY_e, 0x0247, +IBUS_KEY_g, 0x01E5, +IBUS_KEY_h, 0x0127, +IBUS_KEY_i, 0x0268, +IBUS_KEY_j, 0x0249, +IBUS_KEY_l, 0x0142, +IBUS_KEY_o, 0x00F8, +IBUS_KEY_p, 0x1D7D, +IBUS_KEY_r, 0x024D, +IBUS_KEY_t, 0x0167, +IBUS_KEY_u, 0x0289, +IBUS_KEY_y, 0x024F, +IBUS_KEY_z, 0x01B6, +IBUS_KEY_nobreakspace, 0x0338, +IBUS_KEY_Oacute, 0x01FE, +IBUS_KEY_oacute, 0x01FF, +0x0237, 0x025F, +0x0269, 0x1D7C, +IBUS_KEY_dead_stroke, 0x002F, +IBUS_KEY_lessthanequal, 0x2270, +IBUS_KEY_greaterthanequal, 0x2271, +IBUS_KEY_dead_acute, IBUS_KEY_O, 0x01FE, +IBUS_KEY_dead_acute, IBUS_KEY_o, 0x01FF, +IBUS_KEY_dead_abovedot, IBUS_KEY_j, 0x025F, +IBUS_KEY_Greek_iota, 0x0390, +IBUS_KEY_Greek_upsilon, 0x03B0, +IBUS_KEY_space, 0x0060, +IBUS_KEY_V, 0x01DB, +IBUS_KEY_v, 0x01DC, +IBUS_KEY_nobreakspace, 0x0300, +IBUS_KEY_Abreve, 0x1EB0, +IBUS_KEY_abreve, 0x1EB1, +IBUS_KEY_Emacron, 0x1E14, +IBUS_KEY_emacron, 0x1E15, +IBUS_KEY_Omacron, 0x1E50, +IBUS_KEY_omacron, 0x1E51, +IBUS_KEY_Cyrillic_ie, 0x0450, +IBUS_KEY_Cyrillic_i, 0x045D, +IBUS_KEY_Cyrillic_IE, 0x0400, +IBUS_KEY_Cyrillic_I, 0x040D, +IBUS_KEY_Greek_iotadieresis, 0x1FD2, +IBUS_KEY_Greek_upsilondieresis, 0x1FE2, +IBUS_KEY_Greek_ALPHA, 0x1FBA, +IBUS_KEY_Greek_EPSILON, 0x1FC8, +IBUS_KEY_Greek_ETA, 0x1FCA, +IBUS_KEY_Greek_IOTA, 0x1FDA, +IBUS_KEY_Greek_OMICRON, 0x1FF8, +IBUS_KEY_Greek_UPSILON, 0x1FEA, +IBUS_KEY_Greek_OMEGA, 0x1FFA, +IBUS_KEY_Greek_alpha, 0x1F70, +IBUS_KEY_Greek_epsilon, 0x1F72, +IBUS_KEY_Greek_eta, 0x1F74, +IBUS_KEY_Greek_iota, 0x1F76, +IBUS_KEY_Greek_omicron, 0x1F78, +IBUS_KEY_Greek_upsilon, 0x1F7A, +IBUS_KEY_Greek_omega, 0x1F7C, +IBUS_KEY_dead_grave, 0x0060, +IBUS_KEY_dead_diaeresis, IBUS_KEY_Greek_iota, 0x1FD2, +IBUS_KEY_dead_diaeresis, IBUS_KEY_Greek_upsilon, 0x1FE2, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F0A, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_EPSILON, 0x1F1A, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F2A, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_IOTA, 0x1F3A, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMICRON, 0x1F4A, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1F6A, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F02, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_epsilon, 0x1F12, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F22, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_iota, 0x1F32, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_omicron, 0x1F42, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_upsilon, 0x1F52, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1F62, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F0B, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_EPSILON, 0x1F1B, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F2B, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_IOTA, 0x1F3B, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMICRON, 0x1F4B, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_UPSILON, 0x1F5B, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1F6B, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F03, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_epsilon, 0x1F13, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F23, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_iota, 0x1F33, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omicron, 0x1F43, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_upsilon, 0x1F53, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1F63, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_U, 0x01DB, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_u, 0x01DC, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_Greek_iota, 0x1FD2, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_Greek_upsilon, 0x1FE2, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F0B, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_EPSILON, 0x1F1B, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F2B, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_IOTA, 0x1F3B, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMICRON, 0x1F4B, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_UPSILON, 0x1F5B, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1F6B, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F03, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_epsilon, 0x1F13, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F23, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_iota, 0x1F33, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_omicron, 0x1F43, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_upsilon, 0x1F53, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1F63, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F0A, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_EPSILON, 0x1F1A, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F2A, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_IOTA, 0x1F3A, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_OMICRON, 0x1F4A, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1F6A, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F02, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_epsilon, 0x1F12, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F22, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_iota, 0x1F32, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_omicron, 0x1F42, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_upsilon, 0x1F52, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1F62, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_O, 0x1EDC, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_U, 0x1EEA, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_o, 0x1EDD, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_u, 0x1EEB, +IBUS_KEY_Multi_key, IBUS_KEY_U, IBUS_KEY_A, 0x1EB0, +IBUS_KEY_Multi_key, IBUS_KEY_U, IBUS_KEY_a, 0x1EB1, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_A, 0x1EA6, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_E, 0x1EC0, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_O, 0x1ED2, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_a, 0x1EA7, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_e, 0x1EC1, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_o, 0x1ED3, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_E, 0x1E14, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_O, 0x1E50, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_e, 0x1E15, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_o, 0x1E51, +IBUS_KEY_Multi_key, IBUS_KEY_b, IBUS_KEY_A, 0x1EB0, +IBUS_KEY_Multi_key, IBUS_KEY_b, IBUS_KEY_a, 0x1EB1, +IBUS_KEY_Multi_key, IBUS_KEY_macron, IBUS_KEY_E, 0x1E14, +IBUS_KEY_Multi_key, IBUS_KEY_macron, IBUS_KEY_O, 0x1E50, +IBUS_KEY_Multi_key, IBUS_KEY_macron, IBUS_KEY_e, 0x1E15, +IBUS_KEY_Multi_key, IBUS_KEY_macron, IBUS_KEY_o, 0x1E51, +IBUS_KEY_space, 0x0027, +IBUS_KEY_V, 0x01D7, +IBUS_KEY_v, 0x01D8, +IBUS_KEY_nobreakspace, 0x0301, +IBUS_KEY_Abreve, 0x1EAE, +IBUS_KEY_abreve, 0x1EAF, +IBUS_KEY_Emacron, 0x1E16, +IBUS_KEY_emacron, 0x1E17, +IBUS_KEY_Utilde, 0x1E78, +IBUS_KEY_omacron, 0x1E53, +IBUS_KEY_utilde, 0x1E79, +IBUS_KEY_Cyrillic_ghe, 0x0453, +IBUS_KEY_Cyrillic_ka, 0x045C, +IBUS_KEY_Cyrillic_GHE, 0x0403, +IBUS_KEY_Cyrillic_KA, 0x040C, +IBUS_KEY_Greek_iotadieresis, 0x0390, +IBUS_KEY_Greek_upsilondieresis, 0x03B0, +IBUS_KEY_Greek_ALPHA, 0x0386, +IBUS_KEY_Greek_EPSILON, 0x0388, +IBUS_KEY_Greek_ETA, 0x0389, +IBUS_KEY_Greek_IOTA, 0x038A, +IBUS_KEY_Greek_OMICRON, 0x038C, +IBUS_KEY_Greek_UPSILON, 0x038E, +IBUS_KEY_Greek_OMEGA, 0x038F, +IBUS_KEY_Greek_alpha, 0x03AC, +IBUS_KEY_Greek_epsilon, 0x03AD, +IBUS_KEY_Greek_eta, 0x03AE, +IBUS_KEY_Greek_iota, 0x03AF, +IBUS_KEY_Greek_omicron, 0x03CC, +IBUS_KEY_Greek_upsilon, 0x03CD, +IBUS_KEY_Greek_omega, 0x03CE, +IBUS_KEY_dead_acute, 0x00B4, +IBUS_KEY_dead_stroke, IBUS_KEY_O, 0x01FE, +IBUS_KEY_dead_stroke, IBUS_KEY_o, 0x01FF, +IBUS_KEY_dead_diaeresis, IBUS_KEY_space, 0x0385, +IBUS_KEY_dead_diaeresis, IBUS_KEY_Greek_iota, 0x0390, +IBUS_KEY_dead_diaeresis, IBUS_KEY_Greek_upsilon, 0x03B0, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F0C, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_EPSILON, 0x1F1C, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F2C, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_IOTA, 0x1F3C, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMICRON, 0x1F4C, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1F6C, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F04, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_epsilon, 0x1F14, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F24, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_iota, 0x1F34, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_omicron, 0x1F44, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_upsilon, 0x1F54, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1F64, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F0D, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_EPSILON, 0x1F1D, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F2D, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_IOTA, 0x1F3D, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMICRON, 0x1F4D, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_UPSILON, 0x1F5D, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1F6D, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F05, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_epsilon, 0x1F15, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F25, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_iota, 0x1F35, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omicron, 0x1F45, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_upsilon, 0x1F55, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1F65, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_I, 0x1E2E, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_U, 0x01D7, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_i, 0x1E2F, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_u, 0x01D8, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_Greek_iota, 0x0390, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_Greek_upsilon, 0x03B0, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F0D, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_EPSILON, 0x1F1D, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F2D, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_IOTA, 0x1F3D, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMICRON, 0x1F4D, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_UPSILON, 0x1F5D, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1F6D, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F05, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_epsilon, 0x1F15, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F25, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_iota, 0x1F35, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_omicron, 0x1F45, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_upsilon, 0x1F55, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1F65, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F0C, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_EPSILON, 0x1F1C, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F2C, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_IOTA, 0x1F3C, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_OMICRON, 0x1F4C, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1F6C, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F04, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_epsilon, 0x1F14, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F24, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_iota, 0x1F34, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_omicron, 0x1F44, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_upsilon, 0x1F54, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1F64, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_O, 0x1EDA, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_U, 0x1EE8, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_o, 0x1EDB, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_u, 0x1EE9, +IBUS_KEY_Multi_key, IBUS_KEY_comma, IBUS_KEY_C, 0x1E08, +IBUS_KEY_Multi_key, IBUS_KEY_comma, IBUS_KEY_c, 0x1E09, +IBUS_KEY_Multi_key, IBUS_KEY_slash, IBUS_KEY_O, 0x01FE, +IBUS_KEY_Multi_key, IBUS_KEY_slash, IBUS_KEY_o, 0x01FF, +IBUS_KEY_Multi_key, IBUS_KEY_U, IBUS_KEY_A, 0x1EAE, +IBUS_KEY_Multi_key, IBUS_KEY_U, IBUS_KEY_a, 0x1EAF, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_A, 0x1EA4, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_E, 0x1EBE, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_O, 0x1ED0, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_a, 0x1EA5, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_e, 0x1EBF, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_o, 0x1ED1, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_E, 0x1E16, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_O, 0x1E52, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_e, 0x1E17, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_o, 0x1E53, +IBUS_KEY_Multi_key, IBUS_KEY_b, IBUS_KEY_A, 0x1EAE, +IBUS_KEY_Multi_key, IBUS_KEY_b, IBUS_KEY_a, 0x1EAF, +IBUS_KEY_Multi_key, IBUS_KEY_o, IBUS_KEY_A, 0x01FA, +IBUS_KEY_Multi_key, IBUS_KEY_o, IBUS_KEY_a, 0x01FB, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_O, 0x1E4C, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_U, 0x1E78, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_o, 0x1E4D, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_u, 0x1E79, +IBUS_KEY_Multi_key, IBUS_KEY_macron, IBUS_KEY_E, 0x1E16, +IBUS_KEY_Multi_key, IBUS_KEY_macron, IBUS_KEY_O, 0x1E52, +IBUS_KEY_Multi_key, IBUS_KEY_macron, IBUS_KEY_e, 0x1E17, +IBUS_KEY_Multi_key, IBUS_KEY_macron, IBUS_KEY_o, 0x1E53, +IBUS_KEY_Multi_key, IBUS_KEY_cedilla, IBUS_KEY_C, 0x1E08, +IBUS_KEY_Multi_key, IBUS_KEY_cedilla, IBUS_KEY_c, 0x1E09, +IBUS_KEY_Multi_key, IBUS_KEY_KP_Divide, IBUS_KEY_O, 0x01FE, +IBUS_KEY_Multi_key, IBUS_KEY_KP_Divide, IBUS_KEY_o, 0x01FF, +IBUS_KEY_space, 0x005E, +IBUS_KEY_parenleft, 0x207D, +IBUS_KEY_parenright, 0x207E, +IBUS_KEY_plus, 0x207A, +IBUS_KEY_minus, 0x207B, +IBUS_KEY_0, 0x2070, +IBUS_KEY_1, 0x00B9, +IBUS_KEY_2, 0x00B2, +IBUS_KEY_3, 0x00B3, +IBUS_KEY_4, 0x2074, +IBUS_KEY_5, 0x2075, +IBUS_KEY_6, 0x2076, +IBUS_KEY_7, 0x2077, +IBUS_KEY_8, 0x2078, +IBUS_KEY_9, 0x2079, +IBUS_KEY_equal, 0x207C, +IBUS_KEY_nobreakspace, 0x0302, +IBUS_KEY_Agrave, 0x1EA6, +IBUS_KEY_Aacute, 0x1EA4, +IBUS_KEY_Atilde, 0x1EAA, +IBUS_KEY_Egrave, 0x1EC0, +IBUS_KEY_Eacute, 0x1EBE, +IBUS_KEY_Ograve, 0x1ED2, +IBUS_KEY_Oacute, 0x1ED0, +IBUS_KEY_Otilde, 0x1ED6, +IBUS_KEY_agrave, 0x1EA7, +IBUS_KEY_aacute, 0x1EA5, +IBUS_KEY_atilde, 0x1EAB, +IBUS_KEY_egrave, 0x1EC1, +IBUS_KEY_eacute, 0x1EBF, +IBUS_KEY_ograve, 0x1ED3, +IBUS_KEY_oacute, 0x1ED1, +IBUS_KEY_otilde, 0x1ED7, +0x2212, 0x207B, +0x4E00, 0x3192, +0x4E01, 0x319C, +0x4E09, 0x3194, +0x4E0A, 0x3196, +0x4E0B, 0x3198, +0x4E19, 0x319B, +0x4E2D, 0x3197, +0x4E59, 0x319A, +0x4E8C, 0x3193, +0x4EBA, 0x319F, +0x56DB, 0x3195, +0x5730, 0x319E, +0x5929, 0x319D, +0x7532, 0x3199, +IBUS_KEY_dead_circumflex, 0x005E, +IBUS_KEY_KP_Space, 0x00B2, +IBUS_KEY_KP_Add, 0x207A, +IBUS_KEY_KP_0, 0x2070, +IBUS_KEY_KP_1, 0x00B9, +IBUS_KEY_KP_2, 0x00B2, +IBUS_KEY_KP_3, 0x00B3, +IBUS_KEY_KP_4, 0x2074, +IBUS_KEY_KP_5, 0x2075, +IBUS_KEY_KP_6, 0x2076, +IBUS_KEY_KP_7, 0x2077, +IBUS_KEY_KP_8, 0x2078, +IBUS_KEY_KP_9, 0x2079, +IBUS_KEY_KP_Equal, 0x207C, +IBUS_KEY_Multi_key, IBUS_KEY_exclam, IBUS_KEY_A, 0x1EAC, +IBUS_KEY_Multi_key, IBUS_KEY_exclam, IBUS_KEY_E, 0x1EC6, +IBUS_KEY_Multi_key, IBUS_KEY_exclam, IBUS_KEY_O, 0x1ED8, +IBUS_KEY_Multi_key, IBUS_KEY_exclam, IBUS_KEY_a, 0x1EAD, +IBUS_KEY_Multi_key, IBUS_KEY_exclam, IBUS_KEY_e, 0x1EC7, +IBUS_KEY_Multi_key, IBUS_KEY_exclam, IBUS_KEY_o, 0x1ED9, +IBUS_KEY_Multi_key, IBUS_KEY_S, IBUS_KEY_M, 0x2120, +IBUS_KEY_Multi_key, IBUS_KEY_S, IBUS_KEY_m, 0x2120, +IBUS_KEY_Multi_key, IBUS_KEY_T, IBUS_KEY_M, 0x2122, +IBUS_KEY_Multi_key, IBUS_KEY_T, IBUS_KEY_m, 0x2122, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_a, 0x00AA, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_h, 0x02B0, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_i, 0x2071, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_j, 0x02B2, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_l, 0x02E1, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_n, 0x207F, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_o, 0x00BA, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_r, 0x02B3, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_s, 0x02E2, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_w, 0x02B7, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_x, 0x02E3, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_y, 0x02B8, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, 0x0263, 0x02E0, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, 0x0266, 0x02B1, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, 0x0279, 0x02B4, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, 0x027B, 0x02B5, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, 0x0281, 0x02B6, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, 0x0295, 0x02E4, +IBUS_KEY_Multi_key, IBUS_KEY_s, IBUS_KEY_M, 0x2120, +IBUS_KEY_Multi_key, IBUS_KEY_s, IBUS_KEY_m, 0x2120, +IBUS_KEY_Multi_key, IBUS_KEY_t, IBUS_KEY_M, 0x2122, +IBUS_KEY_Multi_key, IBUS_KEY_t, IBUS_KEY_m, 0x2122, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, IBUS_KEY_a, 0x00AA, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, IBUS_KEY_h, 0x02B0, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, IBUS_KEY_i, 0x2071, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, IBUS_KEY_j, 0x02B2, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, IBUS_KEY_l, 0x02E1, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, IBUS_KEY_n, 0x207F, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, IBUS_KEY_o, 0x00BA, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, IBUS_KEY_r, 0x02B3, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, IBUS_KEY_s, 0x02E2, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, IBUS_KEY_w, 0x02B7, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, IBUS_KEY_x, 0x02E3, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, IBUS_KEY_y, 0x02B8, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, 0x0263, 0x02E0, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, 0x0266, 0x02B1, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, 0x0279, 0x02B4, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, 0x027B, 0x02B5, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, 0x0281, 0x02B6, +IBUS_KEY_Multi_key, IBUS_KEY_underbar, 0x0295, 0x02E4, +IBUS_KEY_space, 0x007E, +IBUS_KEY_less, 0x2272, +IBUS_KEY_equal, 0x2243, +IBUS_KEY_greater, 0x2273, +IBUS_KEY_nobreakspace, 0x0303, +IBUS_KEY_Oacute, 0x1E4C, +IBUS_KEY_Odiaeresis, 0x1E4E, +IBUS_KEY_Uacute, 0x1E78, +IBUS_KEY_oacute, 0x1E4D, +IBUS_KEY_odiaeresis, 0x1E4F, +IBUS_KEY_uacute, 0x1E79, +IBUS_KEY_Abreve, 0x1EB4, +IBUS_KEY_abreve, 0x1EB5, +IBUS_KEY_Omacron, 0x022C, +IBUS_KEY_omacron, 0x022D, +IBUS_KEY_Greek_iotadieresis, 0x1FD7, +IBUS_KEY_Greek_upsilondieresis, 0x1FE7, +IBUS_KEY_Greek_alpha, 0x1FB6, +IBUS_KEY_Greek_eta, 0x1FC6, +IBUS_KEY_Greek_iota, 0x1FD6, +IBUS_KEY_Greek_upsilon, 0x1FE6, +IBUS_KEY_Greek_omega, 0x1FF6, +0x1F00, 0x1F06, +0x1F01, 0x1F07, +0x1F08, 0x1F0E, +0x1F09, 0x1F0F, +0x1F20, 0x1F26, +0x1F21, 0x1F27, +0x1F28, 0x1F2E, +0x1F29, 0x1F2F, +0x1F30, 0x1F36, +0x1F31, 0x1F37, +0x1F38, 0x1F3E, +0x1F39, 0x1F3F, +0x1F50, 0x1F56, +0x1F51, 0x1F57, +0x1F59, 0x1F5F, +0x1F60, 0x1F66, +0x1F61, 0x1F67, +0x1F68, 0x1F6E, +0x1F69, 0x1F6F, +IBUS_KEY_dead_tilde, 0x007E, +IBUS_KEY_dead_diaeresis, IBUS_KEY_Greek_iota, 0x1FD7, +IBUS_KEY_dead_diaeresis, IBUS_KEY_Greek_upsilon, 0x1FE7, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F0E, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F2E, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_IOTA, 0x1F3E, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1F6E, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F06, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F26, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_iota, 0x1F36, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_upsilon, 0x1F56, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1F66, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F0F, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F2F, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_IOTA, 0x1F3F, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_UPSILON, 0x1F5F, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1F6F, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F07, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F27, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_iota, 0x1F37, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_upsilon, 0x1F57, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1F67, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_Greek_iota, 0x1FD7, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_Greek_upsilon, 0x1FE7, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F0F, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F2F, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_IOTA, 0x1F3F, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_UPSILON, 0x1F5F, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1F6F, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F07, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F27, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_iota, 0x1F37, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_upsilon, 0x1F57, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1F67, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F0E, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F2E, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_IOTA, 0x1F3E, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1F6E, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F06, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F26, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_iota, 0x1F36, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_upsilon, 0x1F56, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1F66, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_O, 0x1EE0, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_U, 0x1EEE, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_o, 0x1EE1, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_u, 0x1EEF, +IBUS_KEY_Multi_key, IBUS_KEY_U, IBUS_KEY_A, 0x1EB4, +IBUS_KEY_Multi_key, IBUS_KEY_U, IBUS_KEY_a, 0x1EB5, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_A, 0x1EAA, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_E, 0x1EC4, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_O, 0x1ED6, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_a, 0x1EAB, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_e, 0x1EC5, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_o, 0x1ED7, +IBUS_KEY_Multi_key, IBUS_KEY_b, IBUS_KEY_A, 0x1EB4, +IBUS_KEY_Multi_key, IBUS_KEY_b, IBUS_KEY_a, 0x1EB5, +IBUS_KEY_space, 0x00AF, +IBUS_KEY_V, 0x01D5, +IBUS_KEY_v, 0x01D6, +IBUS_KEY_nobreakspace, 0x0304, +IBUS_KEY_Egrave, 0x1E14, +IBUS_KEY_Eacute, 0x1E16, +IBUS_KEY_Ograve, 0x1E50, +IBUS_KEY_Oacute, 0x1E52, +IBUS_KEY_egrave, 0x1E15, +IBUS_KEY_eacute, 0x1E17, +IBUS_KEY_ograve, 0x1E51, +IBUS_KEY_oacute, 0x1E53, +IBUS_KEY_Cyrillic_i, 0x04E3, +IBUS_KEY_Cyrillic_u, 0x04EF, +IBUS_KEY_Cyrillic_I, 0x04E2, +IBUS_KEY_Cyrillic_U, 0x04EE, +IBUS_KEY_Greek_ALPHA, 0x1FB9, +IBUS_KEY_Greek_IOTA, 0x1FD9, +IBUS_KEY_Greek_UPSILON, 0x1FE9, +IBUS_KEY_Greek_alpha, 0x1FB1, +IBUS_KEY_Greek_iota, 0x1FD1, +IBUS_KEY_Greek_upsilon, 0x1FE1, +IBUS_KEY_dead_macron, 0x00AF, +IBUS_KEY_Multi_key, IBUS_KEY_exclam, IBUS_KEY_L, 0x1E38, +IBUS_KEY_Multi_key, IBUS_KEY_exclam, IBUS_KEY_R, 0x1E5C, +IBUS_KEY_Multi_key, IBUS_KEY_exclam, IBUS_KEY_l, 0x1E39, +IBUS_KEY_Multi_key, IBUS_KEY_exclam, IBUS_KEY_r, 0x1E5D, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_A, 0x01DE, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_O, 0x022A, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_U, 0x01D5, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_a, 0x01DF, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_o, 0x022B, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_u, 0x01D6, +IBUS_KEY_Multi_key, IBUS_KEY_period, IBUS_KEY_A, 0x01E0, +IBUS_KEY_Multi_key, IBUS_KEY_period, IBUS_KEY_O, 0x0230, +IBUS_KEY_Multi_key, IBUS_KEY_period, IBUS_KEY_a, 0x01E1, +IBUS_KEY_Multi_key, IBUS_KEY_period, IBUS_KEY_o, 0x0231, +IBUS_KEY_Multi_key, IBUS_KEY_semicolon, IBUS_KEY_O, 0x01EC, +IBUS_KEY_Multi_key, IBUS_KEY_semicolon, IBUS_KEY_o, 0x01ED, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_O, 0x022C, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_o, 0x022D, +IBUS_KEY_space, 0x02D8, +IBUS_KEY_nobreakspace, 0x0306, +IBUS_KEY_Agrave, 0x1EB0, +IBUS_KEY_Aacute, 0x1EAE, +IBUS_KEY_Atilde, 0x1EB4, +IBUS_KEY_agrave, 0x1EB1, +IBUS_KEY_aacute, 0x1EAF, +IBUS_KEY_atilde, 0x1EB5, +IBUS_KEY_Cyrillic_a, 0x04D1, +IBUS_KEY_Cyrillic_ie, 0x04D7, +IBUS_KEY_Cyrillic_i, 0x0439, +IBUS_KEY_Cyrillic_u, 0x045E, +IBUS_KEY_Cyrillic_zhe, 0x04C2, +IBUS_KEY_Cyrillic_A, 0x04D0, +IBUS_KEY_Cyrillic_IE, 0x04D6, +IBUS_KEY_Cyrillic_I, 0x0419, +IBUS_KEY_Cyrillic_U, 0x040E, +IBUS_KEY_Cyrillic_ZHE, 0x04C1, +IBUS_KEY_Greek_ALPHA, 0x1FB8, +IBUS_KEY_Greek_IOTA, 0x1FD8, +IBUS_KEY_Greek_UPSILON, 0x1FE8, +IBUS_KEY_Greek_alpha, 0x1FB0, +IBUS_KEY_Greek_iota, 0x1FD0, +IBUS_KEY_Greek_upsilon, 0x1FE0, +IBUS_KEY_dead_breve, 0x02D8, +IBUS_KEY_Multi_key, IBUS_KEY_exclam, IBUS_KEY_A, 0x1EB6, +IBUS_KEY_Multi_key, IBUS_KEY_exclam, IBUS_KEY_a, 0x1EB7, +IBUS_KEY_Multi_key, IBUS_KEY_comma, IBUS_KEY_E, 0x1E1C, +IBUS_KEY_Multi_key, IBUS_KEY_comma, IBUS_KEY_e, 0x1E1D, +IBUS_KEY_Multi_key, IBUS_KEY_cedilla, IBUS_KEY_E, 0x1E1C, +IBUS_KEY_Multi_key, IBUS_KEY_cedilla, IBUS_KEY_e, 0x1E1D, +IBUS_KEY_space, 0x02D9, +IBUS_KEY_L, 0x013F, +IBUS_KEY_i, 0x0131, +IBUS_KEY_j, 0x0237, +IBUS_KEY_l, 0x0140, +IBUS_KEY_nobreakspace, 0x0307, +IBUS_KEY_Sacute, 0x1E64, +IBUS_KEY_Scaron, 0x1E66, +IBUS_KEY_sacute, 0x1E65, +IBUS_KEY_scaron, 0x1E67, +IBUS_KEY_Amacron, 0x01E0, +IBUS_KEY_Omacron, 0x0230, +IBUS_KEY_amacron, 0x01E1, +IBUS_KEY_omacron, 0x0231, +IBUS_KEY_dead_abovedot, 0x02D9, +IBUS_KEY_dead_stroke, IBUS_KEY_j, 0x025F, +IBUS_KEY_Multi_key, IBUS_KEY_exclam, IBUS_KEY_S, 0x1E68, +IBUS_KEY_Multi_key, IBUS_KEY_exclam, IBUS_KEY_s, 0x1E69, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_S, 0x1E64, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_s, 0x1E65, +IBUS_KEY_Multi_key, IBUS_KEY_c, IBUS_KEY_S, 0x1E66, +IBUS_KEY_Multi_key, IBUS_KEY_c, IBUS_KEY_s, 0x1E67, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_S, 0x1E64, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_s, 0x1E65, +IBUS_KEY_space, 0x0022, +IBUS_KEY_apostrophe, 0x0344, +IBUS_KEY_nobreakspace, 0x0308, +IBUS_KEY_acute, 0x0344, +IBUS_KEY_Iacute, 0x1E2E, +IBUS_KEY_Ugrave, 0x01DB, +IBUS_KEY_Uacute, 0x01D7, +IBUS_KEY_iacute, 0x1E2F, +IBUS_KEY_ugrave, 0x01DC, +IBUS_KEY_uacute, 0x01D8, +0x01D3, 0x01D9, +0x01D4, 0x01DA, +IBUS_KEY_Amacron, 0x01DE, +IBUS_KEY_Umacron, 0x1E7A, +IBUS_KEY_amacron, 0x01DF, +IBUS_KEY_omacron, 0x022B, +IBUS_KEY_umacron, 0x1E7B, +IBUS_KEY_Ukrainian_i, 0x0457, +IBUS_KEY_Ukrainian_I, 0x0407, +IBUS_KEY_Cyrillic_a, 0x04D3, +IBUS_KEY_Cyrillic_ie, 0x0451, +IBUS_KEY_Cyrillic_i, 0x04E5, +IBUS_KEY_Cyrillic_o, 0x04E7, +IBUS_KEY_Cyrillic_u, 0x04F1, +IBUS_KEY_Cyrillic_zhe, 0x04DD, +IBUS_KEY_Cyrillic_yeru, 0x04F9, +IBUS_KEY_Cyrillic_ze, 0x04DF, +IBUS_KEY_Cyrillic_e, 0x04ED, +IBUS_KEY_Cyrillic_che, 0x04F5, +IBUS_KEY_Cyrillic_A, 0x04D2, +IBUS_KEY_Cyrillic_IE, 0x0401, +IBUS_KEY_Cyrillic_I, 0x04E4, +IBUS_KEY_Cyrillic_O, 0x04E6, +IBUS_KEY_Cyrillic_U, 0x04F0, +IBUS_KEY_Cyrillic_ZHE, 0x04DC, +IBUS_KEY_Cyrillic_YERU, 0x04F8, +IBUS_KEY_Cyrillic_ZE, 0x04DE, +IBUS_KEY_Cyrillic_E, 0x04EC, +IBUS_KEY_Cyrillic_CHE, 0x04F4, +IBUS_KEY_Greek_IOTA, 0x03AA, +IBUS_KEY_Greek_UPSILON, 0x03AB, +IBUS_KEY_Greek_iota, 0x03CA, +IBUS_KEY_Greek_upsilon, 0x03CB, +IBUS_KEY_dead_diaeresis, 0x00A8, +IBUS_KEY_dead_acute, IBUS_KEY_space, 0x0385, +IBUS_KEY_dead_acute, IBUS_KEY_Greek_iota, 0x0390, +IBUS_KEY_dead_acute, IBUS_KEY_Greek_upsilon, 0x03B0, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_U, 0x1E7A, +IBUS_KEY_Multi_key, IBUS_KEY_underscore, IBUS_KEY_u, 0x1E7B, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_O, 0x1E4E, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_o, 0x1E4F, +IBUS_KEY_Multi_key, IBUS_KEY_macron, IBUS_KEY_U, 0x1E7A, +IBUS_KEY_Multi_key, IBUS_KEY_macron, IBUS_KEY_u, 0x1E7B, +IBUS_KEY_space, 0x00B0, +IBUS_KEY_nobreakspace, 0x030A, +IBUS_KEY_Aacute, 0x01FA, +IBUS_KEY_aacute, 0x01FB, +IBUS_KEY_dead_abovering, 0x00B0, +IBUS_KEY_space, 0x02DD, +IBUS_KEY_nobreakspace, 0x030B, +IBUS_KEY_Cyrillic_u, 0x04F3, +IBUS_KEY_Cyrillic_U, 0x04F2, +IBUS_KEY_dead_doubleacute, 0x02DD, +IBUS_KEY_space, 0x02C7, +IBUS_KEY_parenleft, 0x208D, +IBUS_KEY_parenright, 0x208E, +IBUS_KEY_plus, 0x208A, +IBUS_KEY_minus, 0x208B, +IBUS_KEY_0, 0x2080, +IBUS_KEY_1, 0x2081, +IBUS_KEY_2, 0x2082, +IBUS_KEY_3, 0x2083, +IBUS_KEY_4, 0x2084, +IBUS_KEY_5, 0x2085, +IBUS_KEY_6, 0x2086, +IBUS_KEY_7, 0x2087, +IBUS_KEY_8, 0x2088, +IBUS_KEY_9, 0x2089, +IBUS_KEY_equal, 0x208C, +IBUS_KEY_V, 0x01D9, +IBUS_KEY_v, 0x01DA, +IBUS_KEY_nobreakspace, 0x030C, +0x01F2, 0x01C5, +IBUS_KEY_dead_caron, 0x02C7, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_U, 0x01D9, +IBUS_KEY_Multi_key, IBUS_KEY_quotedbl, IBUS_KEY_u, 0x01DA, +IBUS_KEY_space, 0x00B8, +IBUS_KEY_nobreakspace, 0x0327, +IBUS_KEY_cent, 0x20B5, +IBUS_KEY_Cacute, 0x1E08, +IBUS_KEY_cacute, 0x1E09, +IBUS_KEY_dead_cedilla, 0x00B8, +IBUS_KEY_space, 0x02DB, +IBUS_KEY_nobreakspace, 0x0328, +IBUS_KEY_Omacron, 0x01EC, +IBUS_KEY_omacron, 0x01ED, +IBUS_KEY_dead_ogonek, 0x02DB, +IBUS_KEY_space, 0x037A, +IBUS_KEY_Greek_alphaaccent, 0x1FB4, +IBUS_KEY_Greek_etaaccent, 0x1FC4, +IBUS_KEY_Greek_omegaaccent, 0x1FF4, +IBUS_KEY_Greek_ALPHA, 0x1FBC, +IBUS_KEY_Greek_ETA, 0x1FCC, +IBUS_KEY_Greek_OMEGA, 0x1FFC, +IBUS_KEY_Greek_alpha, 0x1FB3, +IBUS_KEY_Greek_eta, 0x1FC3, +IBUS_KEY_Greek_omega, 0x1FF3, +IBUS_KEY_dead_iota, 0x037A, +IBUS_KEY_dead_grave, IBUS_KEY_Greek_alpha, 0x1FB2, +IBUS_KEY_dead_grave, IBUS_KEY_Greek_eta, 0x1FC2, +IBUS_KEY_dead_grave, IBUS_KEY_Greek_omega, 0x1FF2, +IBUS_KEY_dead_acute, IBUS_KEY_Greek_alpha, 0x1FB4, +IBUS_KEY_dead_acute, IBUS_KEY_Greek_eta, 0x1FC4, +IBUS_KEY_dead_acute, IBUS_KEY_Greek_omega, 0x1FF4, +IBUS_KEY_dead_tilde, IBUS_KEY_Greek_alpha, 0x1FB7, +IBUS_KEY_dead_tilde, IBUS_KEY_Greek_eta, 0x1FC7, +IBUS_KEY_dead_tilde, IBUS_KEY_Greek_omega, 0x1FF7, +IBUS_KEY_dead_tilde, 0x1F00, 0x1F86, +IBUS_KEY_dead_tilde, 0x1F01, 0x1F87, +IBUS_KEY_dead_tilde, 0x1F08, 0x1F8E, +IBUS_KEY_dead_tilde, 0x1F09, 0x1F8F, +IBUS_KEY_dead_tilde, 0x1F20, 0x1F96, +IBUS_KEY_dead_tilde, 0x1F21, 0x1F97, +IBUS_KEY_dead_tilde, 0x1F28, 0x1F9E, +IBUS_KEY_dead_tilde, 0x1F29, 0x1F9F, +IBUS_KEY_dead_tilde, 0x1F60, 0x1FA6, +IBUS_KEY_dead_tilde, 0x1F61, 0x1FA7, +IBUS_KEY_dead_tilde, 0x1F68, 0x1FAE, +IBUS_KEY_dead_tilde, 0x1F69, 0x1FAF, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F88, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F98, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FA8, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F80, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F90, +IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA0, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F89, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F99, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FA9, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F81, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F91, +IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA1, +IBUS_KEY_dead_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F8A, +IBUS_KEY_dead_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F9A, +IBUS_KEY_dead_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FAA, +IBUS_KEY_dead_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F82, +IBUS_KEY_dead_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F92, +IBUS_KEY_dead_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA2, +IBUS_KEY_dead_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F8B, +IBUS_KEY_dead_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F9B, +IBUS_KEY_dead_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FAB, +IBUS_KEY_dead_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F83, +IBUS_KEY_dead_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F93, +IBUS_KEY_dead_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA3, +IBUS_KEY_dead_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F8C, +IBUS_KEY_dead_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F9C, +IBUS_KEY_dead_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FAC, +IBUS_KEY_dead_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F84, +IBUS_KEY_dead_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F94, +IBUS_KEY_dead_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA4, +IBUS_KEY_dead_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F8D, +IBUS_KEY_dead_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F9D, +IBUS_KEY_dead_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FAD, +IBUS_KEY_dead_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F85, +IBUS_KEY_dead_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F95, +IBUS_KEY_dead_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA5, +IBUS_KEY_dead_tilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F8E, +IBUS_KEY_dead_tilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F9E, +IBUS_KEY_dead_tilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FAE, +IBUS_KEY_dead_tilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F86, +IBUS_KEY_dead_tilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F96, +IBUS_KEY_dead_tilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA6, +IBUS_KEY_dead_tilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F8F, +IBUS_KEY_dead_tilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F9F, +IBUS_KEY_dead_tilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FAF, +IBUS_KEY_dead_tilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F87, +IBUS_KEY_dead_tilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F97, +IBUS_KEY_dead_tilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA7, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_Greek_alpha, 0x1FB4, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_Greek_eta, 0x1FC4, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_Greek_omega, 0x1FF4, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, 0x1F00, 0x1F84, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, 0x1F01, 0x1F85, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, 0x1F08, 0x1F8C, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, 0x1F09, 0x1F8D, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, 0x1F20, 0x1F94, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, 0x1F21, 0x1F95, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, 0x1F28, 0x1F9C, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, 0x1F29, 0x1F9D, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, 0x1F60, 0x1FA4, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, 0x1F61, 0x1FA5, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, 0x1F68, 0x1FAC, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, 0x1F69, 0x1FAD, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F89, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F99, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FA9, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F81, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F91, +IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA1, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F88, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F98, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FA8, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F80, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F90, +IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA0, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_Greek_alpha, 0x1FB2, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_Greek_eta, 0x1FC2, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_Greek_omega, 0x1FF2, +IBUS_KEY_Multi_key, IBUS_KEY_grave, 0x1F00, 0x1F82, +IBUS_KEY_Multi_key, IBUS_KEY_grave, 0x1F01, 0x1F83, +IBUS_KEY_Multi_key, IBUS_KEY_grave, 0x1F08, 0x1F8A, +IBUS_KEY_Multi_key, IBUS_KEY_grave, 0x1F09, 0x1F8B, +IBUS_KEY_Multi_key, IBUS_KEY_grave, 0x1F20, 0x1F92, +IBUS_KEY_Multi_key, IBUS_KEY_grave, 0x1F21, 0x1F93, +IBUS_KEY_Multi_key, IBUS_KEY_grave, 0x1F28, 0x1F9A, +IBUS_KEY_Multi_key, IBUS_KEY_grave, 0x1F29, 0x1F9B, +IBUS_KEY_Multi_key, IBUS_KEY_grave, 0x1F60, 0x1FA2, +IBUS_KEY_Multi_key, IBUS_KEY_grave, 0x1F61, 0x1FA3, +IBUS_KEY_Multi_key, IBUS_KEY_grave, 0x1F68, 0x1FAA, +IBUS_KEY_Multi_key, IBUS_KEY_grave, 0x1F69, 0x1FAB, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_Greek_alpha, 0x1FB7, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_Greek_eta, 0x1FC7, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_Greek_omega, 0x1FF7, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, 0x1F00, 0x1F86, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, 0x1F01, 0x1F87, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, 0x1F08, 0x1F8E, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, 0x1F09, 0x1F8F, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, 0x1F20, 0x1F96, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, 0x1F21, 0x1F97, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, 0x1F28, 0x1F9E, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, 0x1F29, 0x1F9F, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, 0x1F60, 0x1FA6, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, 0x1F61, 0x1FA7, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, 0x1F68, 0x1FAE, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, 0x1F69, 0x1FAF, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_Greek_alpha, 0x1FB4, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_Greek_eta, 0x1FC4, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_Greek_omega, 0x1FF4, +IBUS_KEY_Multi_key, IBUS_KEY_acute, 0x1F00, 0x1F84, +IBUS_KEY_Multi_key, IBUS_KEY_acute, 0x1F01, 0x1F85, +IBUS_KEY_Multi_key, IBUS_KEY_acute, 0x1F08, 0x1F8C, +IBUS_KEY_Multi_key, IBUS_KEY_acute, 0x1F09, 0x1F8D, +IBUS_KEY_Multi_key, IBUS_KEY_acute, 0x1F20, 0x1F94, +IBUS_KEY_Multi_key, IBUS_KEY_acute, 0x1F21, 0x1F95, +IBUS_KEY_Multi_key, IBUS_KEY_acute, 0x1F28, 0x1F9C, +IBUS_KEY_Multi_key, IBUS_KEY_acute, 0x1F29, 0x1F9D, +IBUS_KEY_Multi_key, IBUS_KEY_acute, 0x1F60, 0x1FA4, +IBUS_KEY_Multi_key, IBUS_KEY_acute, 0x1F61, 0x1FA5, +IBUS_KEY_Multi_key, IBUS_KEY_acute, 0x1F68, 0x1FAC, +IBUS_KEY_Multi_key, IBUS_KEY_acute, 0x1F69, 0x1FAD, +IBUS_KEY_dead_grave, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F8B, +IBUS_KEY_dead_grave, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F9B, +IBUS_KEY_dead_grave, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FAB, +IBUS_KEY_dead_grave, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F83, +IBUS_KEY_dead_grave, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F93, +IBUS_KEY_dead_grave, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA3, +IBUS_KEY_dead_grave, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F8A, +IBUS_KEY_dead_grave, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F9A, +IBUS_KEY_dead_grave, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FAA, +IBUS_KEY_dead_grave, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F82, +IBUS_KEY_dead_grave, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F92, +IBUS_KEY_dead_grave, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA2, +IBUS_KEY_dead_acute, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F8D, +IBUS_KEY_dead_acute, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F9D, +IBUS_KEY_dead_acute, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FAD, +IBUS_KEY_dead_acute, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F85, +IBUS_KEY_dead_acute, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F95, +IBUS_KEY_dead_acute, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA5, +IBUS_KEY_dead_acute, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F8C, +IBUS_KEY_dead_acute, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F9C, +IBUS_KEY_dead_acute, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FAC, +IBUS_KEY_dead_acute, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F84, +IBUS_KEY_dead_acute, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F94, +IBUS_KEY_dead_acute, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA4, +IBUS_KEY_dead_tilde, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F8F, +IBUS_KEY_dead_tilde, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F9F, +IBUS_KEY_dead_tilde, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FAF, +IBUS_KEY_dead_tilde, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F87, +IBUS_KEY_dead_tilde, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F97, +IBUS_KEY_dead_tilde, IBUS_KEY_Multi_key, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA7, +IBUS_KEY_dead_tilde, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F8E, +IBUS_KEY_dead_tilde, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F9E, +IBUS_KEY_dead_tilde, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FAE, +IBUS_KEY_dead_tilde, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F86, +IBUS_KEY_dead_tilde, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F96, +IBUS_KEY_dead_tilde, IBUS_KEY_Multi_key, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA6, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F8D, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F9D, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FAD, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F85, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F95, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA5, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F8C, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F9C, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FAC, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F84, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F94, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA4, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F8C, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F9C, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FAC, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F84, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F94, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA4, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F8D, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F9D, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FAD, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F85, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F95, +IBUS_KEY_Multi_key, IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA5, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F8B, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F9B, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FAB, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F83, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F93, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA3, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F8A, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F9A, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FAA, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F82, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F92, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA2, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F8A, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F9A, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FAA, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F82, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F92, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA2, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F8B, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F9B, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FAB, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F83, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F93, +IBUS_KEY_Multi_key, IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA3, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F8F, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F9F, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FAF, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F87, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F97, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA7, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F8E, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F9E, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FAE, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F86, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F96, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA6, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F8E, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F9E, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FAE, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F86, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F96, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA6, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F8F, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F9F, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FAF, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F87, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F97, +IBUS_KEY_Multi_key, IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA7, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F8D, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F9D, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FAD, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F85, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F95, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA5, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F8C, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F9C, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FAC, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F84, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F94, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA4, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F8C, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F9C, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FAC, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F84, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F94, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA4, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F8D, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F9D, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FAD, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F85, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F95, +IBUS_KEY_Multi_key, IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA5, +IBUS_KEY_kana_WO, 0x30FA, +IBUS_KEY_kana_U, 0x30F4, +IBUS_KEY_kana_KA, 0x30AC, +IBUS_KEY_kana_KI, 0x30AE, +IBUS_KEY_kana_KU, 0x30B0, +IBUS_KEY_kana_KE, 0x30B2, +IBUS_KEY_kana_KO, 0x30B4, +IBUS_KEY_kana_SA, 0x30B6, +IBUS_KEY_kana_SHI, 0x30B8, +IBUS_KEY_kana_SU, 0x30BA, +IBUS_KEY_kana_SE, 0x30BC, +IBUS_KEY_kana_SO, 0x30BE, +IBUS_KEY_kana_TA, 0x30C0, +IBUS_KEY_kana_CHI, 0x30C2, +IBUS_KEY_kana_TSU, 0x30C5, +IBUS_KEY_kana_TE, 0x30C7, +IBUS_KEY_kana_TO, 0x30C9, +IBUS_KEY_kana_HA, 0x30D0, +IBUS_KEY_kana_HI, 0x30D3, +IBUS_KEY_kana_FU, 0x30D6, +IBUS_KEY_kana_HE, 0x30D9, +IBUS_KEY_kana_HO, 0x30DC, +IBUS_KEY_kana_WA, 0x30F7, +IBUS_KEY_kana_HA, 0x30D1, +IBUS_KEY_kana_HI, 0x30D4, +IBUS_KEY_kana_FU, 0x30D7, +IBUS_KEY_kana_HE, 0x30DA, +IBUS_KEY_kana_HO, 0x30DD, +IBUS_KEY_space, 0x0323, +IBUS_KEY_plus, 0x2A25, +IBUS_KEY_minus, 0x2A2A, +IBUS_KEY_equal, 0x2A66, +IBUS_KEY_nobreakspace, 0x0323, +IBUS_KEY_Abreve, 0x1EB6, +IBUS_KEY_abreve, 0x1EB7, +IBUS_KEY_dead_belowdot, 0x0323, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_O, 0x1EE2, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_U, 0x1EF0, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_o, 0x1EE3, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_u, 0x1EF1, +IBUS_KEY_space, 0x0309, +IBUS_KEY_B, 0x0181, +IBUS_KEY_C, 0x0187, +IBUS_KEY_D, 0x018A, +IBUS_KEY_F, 0x0191, +IBUS_KEY_G, 0x0193, +IBUS_KEY_K, 0x0198, +IBUS_KEY_M, 0x2C6E, +IBUS_KEY_N, 0x019D, +IBUS_KEY_P, 0x01A4, +IBUS_KEY_T, 0x01AC, +IBUS_KEY_V, 0x01B2, +IBUS_KEY_W, 0x2C72, +IBUS_KEY_Z, 0x0224, +IBUS_KEY_b, 0x0253, +IBUS_KEY_c, 0x0188, +IBUS_KEY_d, 0x0257, +IBUS_KEY_f, 0x0192, +IBUS_KEY_g, 0x0260, +IBUS_KEY_h, 0x0266, +IBUS_KEY_k, 0x0199, +IBUS_KEY_m, 0x0271, +IBUS_KEY_n, 0x0272, +IBUS_KEY_p, 0x01A5, +IBUS_KEY_q, 0x02A0, +IBUS_KEY_s, 0x0282, +IBUS_KEY_t, 0x01AD, +IBUS_KEY_v, 0x028B, +IBUS_KEY_w, 0x2C73, +IBUS_KEY_z, 0x0225, +IBUS_KEY_nobreakspace, 0x0309, +IBUS_KEY_Abreve, 0x1EB2, +IBUS_KEY_abreve, 0x1EB3, +0x0256, 0x1D91, +0x025C, 0x025D, +0x025F, 0x0284, +0x0279, 0x027B, +IBUS_KEY_dead_hook, 0x0309, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_O, 0x1EDE, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_U, 0x1EEC, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_o, 0x1EDF, +IBUS_KEY_Multi_key, IBUS_KEY_plus, IBUS_KEY_u, 0x1EED, +IBUS_KEY_Multi_key, IBUS_KEY_U, IBUS_KEY_A, 0x1EB2, +IBUS_KEY_Multi_key, IBUS_KEY_U, IBUS_KEY_a, 0x1EB3, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_A, 0x1EA8, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_E, 0x1EC2, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_O, 0x1ED4, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_a, 0x1EA9, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_e, 0x1EC3, +IBUS_KEY_Multi_key, IBUS_KEY_asciicircum, IBUS_KEY_o, 0x1ED5, +IBUS_KEY_Multi_key, IBUS_KEY_b, IBUS_KEY_A, 0x1EB2, +IBUS_KEY_Multi_key, IBUS_KEY_b, IBUS_KEY_a, 0x1EB3, +IBUS_KEY_space, 0x031B, +IBUS_KEY_nobreakspace, 0x031B, +IBUS_KEY_Utilde, 0x1EEE, +IBUS_KEY_utilde, 0x1EEF, +IBUS_KEY_dead_horn, 0x031B, +IBUS_KEY_Greek_ALPHA, 0x1F08, +IBUS_KEY_Greek_EPSILON, 0x1F18, +IBUS_KEY_Greek_ETA, 0x1F28, +IBUS_KEY_Greek_IOTA, 0x1F38, +IBUS_KEY_Greek_OMICRON, 0x1F48, +IBUS_KEY_Greek_OMEGA, 0x1F68, +IBUS_KEY_Greek_alpha, 0x1F00, +IBUS_KEY_Greek_epsilon, 0x1F10, +IBUS_KEY_Greek_eta, 0x1F20, +IBUS_KEY_Greek_iota, 0x1F30, +IBUS_KEY_Greek_omicron, 0x1F40, +IBUS_KEY_Greek_rho, 0x1FE4, +IBUS_KEY_Greek_upsilon, 0x1F50, +IBUS_KEY_Greek_omega, 0x1F60, +IBUS_KEY_Greek_ALPHA, 0x1F09, +IBUS_KEY_Greek_EPSILON, 0x1F19, +IBUS_KEY_Greek_ETA, 0x1F29, +IBUS_KEY_Greek_IOTA, 0x1F39, +IBUS_KEY_Greek_OMICRON, 0x1F49, +IBUS_KEY_Greek_RHO, 0x1FEC, +IBUS_KEY_Greek_UPSILON, 0x1F59, +IBUS_KEY_Greek_OMEGA, 0x1F69, +IBUS_KEY_Greek_alpha, 0x1F01, +IBUS_KEY_Greek_epsilon, 0x1F11, +IBUS_KEY_Greek_eta, 0x1F21, +IBUS_KEY_Greek_iota, 0x1F31, +IBUS_KEY_Greek_omicron, 0x1F41, +IBUS_KEY_Greek_rho, 0x1FE5, +IBUS_KEY_Greek_upsilon, 0x1F51, +IBUS_KEY_Greek_omega, 0x1F61, +IBUS_KEY_space, IBUS_KEY_space, 0x00A0, +IBUS_KEY_space, IBUS_KEY_apostrophe, 0x0027, +IBUS_KEY_space, IBUS_KEY_parenleft, 0x02D8, +IBUS_KEY_space, IBUS_KEY_comma, 0x00B8, +IBUS_KEY_space, IBUS_KEY_minus, 0x007E, +IBUS_KEY_space, IBUS_KEY_period, 0x2008, +IBUS_KEY_space, IBUS_KEY_less, 0x02C7, +IBUS_KEY_space, IBUS_KEY_greater, 0x005E, +IBUS_KEY_space, IBUS_KEY_asciicircum, 0x005E, +IBUS_KEY_space, IBUS_KEY_grave, 0x0060, +IBUS_KEY_space, IBUS_KEY_asciitilde, 0x007E, +IBUS_KEY_exclam, IBUS_KEY_exclam, 0x00A1, +IBUS_KEY_exclam, IBUS_KEY_question, 0x203D, +IBUS_KEY_exclam, IBUS_KEY_A, 0x1EA0, +IBUS_KEY_exclam, IBUS_KEY_B, 0x1E04, +IBUS_KEY_exclam, IBUS_KEY_D, 0x1E0C, +IBUS_KEY_exclam, IBUS_KEY_E, 0x1EB8, +IBUS_KEY_exclam, IBUS_KEY_H, 0x1E24, +IBUS_KEY_exclam, IBUS_KEY_I, 0x1ECA, +IBUS_KEY_exclam, IBUS_KEY_K, 0x1E32, +IBUS_KEY_exclam, IBUS_KEY_L, 0x1E36, +IBUS_KEY_exclam, IBUS_KEY_M, 0x1E42, +IBUS_KEY_exclam, IBUS_KEY_N, 0x1E46, +IBUS_KEY_exclam, IBUS_KEY_O, 0x1ECC, +IBUS_KEY_exclam, IBUS_KEY_P, 0x00B6, +IBUS_KEY_exclam, IBUS_KEY_R, 0x1E5A, +IBUS_KEY_exclam, IBUS_KEY_S, 0x1E62, +IBUS_KEY_exclam, IBUS_KEY_T, 0x1E6C, +IBUS_KEY_exclam, IBUS_KEY_U, 0x1EE4, +IBUS_KEY_exclam, IBUS_KEY_V, 0x1E7E, +IBUS_KEY_exclam, IBUS_KEY_W, 0x1E88, +IBUS_KEY_exclam, IBUS_KEY_Y, 0x1EF4, +IBUS_KEY_exclam, IBUS_KEY_Z, 0x1E92, +IBUS_KEY_exclam, IBUS_KEY_asciicircum, 0x00A6, +IBUS_KEY_exclam, IBUS_KEY_a, 0x1EA1, +IBUS_KEY_exclam, IBUS_KEY_b, 0x1E05, +IBUS_KEY_exclam, IBUS_KEY_d, 0x1E0D, +IBUS_KEY_exclam, IBUS_KEY_e, 0x1EB9, +IBUS_KEY_exclam, IBUS_KEY_h, 0x1E25, +IBUS_KEY_exclam, IBUS_KEY_i, 0x1ECB, +IBUS_KEY_exclam, IBUS_KEY_k, 0x1E33, +IBUS_KEY_exclam, IBUS_KEY_l, 0x1E37, +IBUS_KEY_exclam, IBUS_KEY_m, 0x1E43, +IBUS_KEY_exclam, IBUS_KEY_n, 0x1E47, +IBUS_KEY_exclam, IBUS_KEY_o, 0x1ECD, +IBUS_KEY_exclam, IBUS_KEY_p, 0x00B6, +IBUS_KEY_exclam, IBUS_KEY_r, 0x1E5B, +IBUS_KEY_exclam, IBUS_KEY_s, 0x1E63, +IBUS_KEY_exclam, IBUS_KEY_t, 0x1E6D, +IBUS_KEY_exclam, IBUS_KEY_u, 0x1EE5, +IBUS_KEY_exclam, IBUS_KEY_v, 0x1E7F, +IBUS_KEY_exclam, IBUS_KEY_w, 0x1E89, +IBUS_KEY_exclam, IBUS_KEY_y, 0x1EF5, +IBUS_KEY_exclam, IBUS_KEY_z, 0x1E93, +IBUS_KEY_quotedbl, IBUS_KEY_quotedbl, 0x00A8, +IBUS_KEY_quotedbl, IBUS_KEY_apostrophe, 0x0344, +IBUS_KEY_quotedbl, IBUS_KEY_comma, 0x201E, +IBUS_KEY_quotedbl, IBUS_KEY_slash, 0x301E, +IBUS_KEY_quotedbl, IBUS_KEY_less, 0x201C, +IBUS_KEY_quotedbl, IBUS_KEY_greater, 0x201D, +IBUS_KEY_quotedbl, IBUS_KEY_A, 0x00C4, +IBUS_KEY_quotedbl, IBUS_KEY_E, 0x00CB, +IBUS_KEY_quotedbl, IBUS_KEY_H, 0x1E26, +IBUS_KEY_quotedbl, IBUS_KEY_I, 0x00CF, +IBUS_KEY_quotedbl, IBUS_KEY_O, 0x00D6, +IBUS_KEY_quotedbl, IBUS_KEY_U, 0x00DC, +IBUS_KEY_quotedbl, IBUS_KEY_W, 0x1E84, +IBUS_KEY_quotedbl, IBUS_KEY_X, 0x1E8C, +IBUS_KEY_quotedbl, IBUS_KEY_Y, 0x0178, +IBUS_KEY_quotedbl, IBUS_KEY_backslash, 0x301D, +IBUS_KEY_quotedbl, IBUS_KEY_a, 0x00E4, +IBUS_KEY_quotedbl, IBUS_KEY_e, 0x00EB, +IBUS_KEY_quotedbl, IBUS_KEY_h, 0x1E27, +IBUS_KEY_quotedbl, IBUS_KEY_i, 0x00EF, +IBUS_KEY_quotedbl, IBUS_KEY_o, 0x00F6, +IBUS_KEY_quotedbl, IBUS_KEY_t, 0x1E97, +IBUS_KEY_quotedbl, IBUS_KEY_u, 0x00FC, +IBUS_KEY_quotedbl, IBUS_KEY_w, 0x1E85, +IBUS_KEY_quotedbl, IBUS_KEY_x, 0x1E8D, +IBUS_KEY_quotedbl, IBUS_KEY_y, 0x00FF, +IBUS_KEY_quotedbl, IBUS_KEY_acute, 0x0344, +IBUS_KEY_quotedbl, IBUS_KEY_Otilde, 0x1E4E, +IBUS_KEY_quotedbl, IBUS_KEY_otilde, 0x1E4F, +IBUS_KEY_quotedbl, 0x03D2, 0x03D4, +IBUS_KEY_quotedbl, IBUS_KEY_Umacron, 0x1E7A, +IBUS_KEY_quotedbl, IBUS_KEY_umacron, 0x1E7B, +IBUS_KEY_quotedbl, 0x04D8, 0x04DA, +IBUS_KEY_quotedbl, 0x04D9, 0x04DB, +IBUS_KEY_quotedbl, 0x04E8, 0x04EA, +IBUS_KEY_quotedbl, 0x04E9, 0x04EB, +IBUS_KEY_quotedbl, IBUS_KEY_Ukrainian_i, 0x0457, +IBUS_KEY_quotedbl, IBUS_KEY_Ukrainian_I, 0x0407, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_a, 0x04D3, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_ie, 0x0451, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_i, 0x04E5, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_o, 0x04E7, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_u, 0x04F1, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_zhe, 0x04DD, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_yeru, 0x04F9, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_ze, 0x04DF, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_e, 0x04ED, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_che, 0x04F5, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_A, 0x04D2, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_IE, 0x0401, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_I, 0x04E4, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_O, 0x04E6, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_U, 0x04F0, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_ZHE, 0x04DC, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_YERU, 0x04F8, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_ZE, 0x04DE, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_E, 0x04EC, +IBUS_KEY_quotedbl, IBUS_KEY_Cyrillic_CHE, 0x04F4, +IBUS_KEY_quotedbl, IBUS_KEY_Greek_IOTA, 0x03AA, +IBUS_KEY_quotedbl, IBUS_KEY_Greek_UPSILON, 0x03AB, +IBUS_KEY_quotedbl, IBUS_KEY_Greek_iota, 0x03CA, +IBUS_KEY_quotedbl, IBUS_KEY_Greek_upsilon, 0x03CB, +IBUS_KEY_quotedbl, IBUS_KEY_dead_acute, 0x0344, +IBUS_KEY_numbersign, IBUS_KEY_numbersign, 0x266F, +IBUS_KEY_numbersign, IBUS_KEY_b, 0x266D, +IBUS_KEY_numbersign, IBUS_KEY_f, 0x266E, +IBUS_KEY_percent, IBUS_KEY_o, 0x2030, +IBUS_KEY_apostrophe, IBUS_KEY_space, 0x0027, +IBUS_KEY_apostrophe, IBUS_KEY_apostrophe, 0x00B4, +IBUS_KEY_apostrophe, IBUS_KEY_comma, 0x201A, +IBUS_KEY_apostrophe, IBUS_KEY_less, 0x2018, +IBUS_KEY_apostrophe, IBUS_KEY_greater, 0x2019, +IBUS_KEY_apostrophe, IBUS_KEY_A, 0x00C1, +IBUS_KEY_apostrophe, IBUS_KEY_C, 0x0106, +IBUS_KEY_apostrophe, IBUS_KEY_E, 0x00C9, +IBUS_KEY_apostrophe, IBUS_KEY_G, 0x01F4, +IBUS_KEY_apostrophe, IBUS_KEY_I, 0x00CD, +IBUS_KEY_apostrophe, IBUS_KEY_K, 0x1E30, +IBUS_KEY_apostrophe, IBUS_KEY_L, 0x0139, +IBUS_KEY_apostrophe, IBUS_KEY_M, 0x1E3E, +IBUS_KEY_apostrophe, IBUS_KEY_N, 0x0143, +IBUS_KEY_apostrophe, IBUS_KEY_O, 0x00D3, +IBUS_KEY_apostrophe, IBUS_KEY_P, 0x1E54, +IBUS_KEY_apostrophe, IBUS_KEY_R, 0x0154, +IBUS_KEY_apostrophe, IBUS_KEY_S, 0x015A, +IBUS_KEY_apostrophe, IBUS_KEY_U, 0x00DA, +IBUS_KEY_apostrophe, IBUS_KEY_W, 0x1E82, +IBUS_KEY_apostrophe, IBUS_KEY_Y, 0x00DD, +IBUS_KEY_apostrophe, IBUS_KEY_Z, 0x0179, +IBUS_KEY_apostrophe, IBUS_KEY_a, 0x00E1, +IBUS_KEY_apostrophe, IBUS_KEY_c, 0x0107, +IBUS_KEY_apostrophe, IBUS_KEY_e, 0x00E9, +IBUS_KEY_apostrophe, IBUS_KEY_g, 0x01F5, +IBUS_KEY_apostrophe, IBUS_KEY_i, 0x00ED, +IBUS_KEY_apostrophe, IBUS_KEY_k, 0x1E31, +IBUS_KEY_apostrophe, IBUS_KEY_l, 0x013A, +IBUS_KEY_apostrophe, IBUS_KEY_m, 0x1E3F, +IBUS_KEY_apostrophe, IBUS_KEY_n, 0x0144, +IBUS_KEY_apostrophe, IBUS_KEY_o, 0x00F3, +IBUS_KEY_apostrophe, IBUS_KEY_p, 0x1E55, +IBUS_KEY_apostrophe, IBUS_KEY_r, 0x0155, +IBUS_KEY_apostrophe, IBUS_KEY_s, 0x015B, +IBUS_KEY_apostrophe, IBUS_KEY_u, 0x00FA, +IBUS_KEY_apostrophe, IBUS_KEY_w, 0x1E83, +IBUS_KEY_apostrophe, IBUS_KEY_y, 0x00FD, +IBUS_KEY_apostrophe, IBUS_KEY_z, 0x017A, +IBUS_KEY_apostrophe, IBUS_KEY_Acircumflex, 0x1EA4, +IBUS_KEY_apostrophe, IBUS_KEY_Aring, 0x01FA, +IBUS_KEY_apostrophe, IBUS_KEY_AE, 0x01FC, +IBUS_KEY_apostrophe, IBUS_KEY_Ccedilla, 0x1E08, +IBUS_KEY_apostrophe, IBUS_KEY_Ecircumflex, 0x1EBE, +IBUS_KEY_apostrophe, IBUS_KEY_Idiaeresis, 0x1E2E, +IBUS_KEY_apostrophe, IBUS_KEY_Ocircumflex, 0x1ED0, +IBUS_KEY_apostrophe, IBUS_KEY_Otilde, 0x1E4C, +IBUS_KEY_apostrophe, IBUS_KEY_Ooblique, 0x01FE, +IBUS_KEY_apostrophe, IBUS_KEY_Udiaeresis, 0x01D7, +IBUS_KEY_apostrophe, IBUS_KEY_acircumflex, 0x1EA5, +IBUS_KEY_apostrophe, IBUS_KEY_aring, 0x01FB, +IBUS_KEY_apostrophe, IBUS_KEY_ae, 0x01FD, +IBUS_KEY_apostrophe, IBUS_KEY_ccedilla, 0x1E09, +IBUS_KEY_apostrophe, IBUS_KEY_ecircumflex, 0x1EBF, +IBUS_KEY_apostrophe, IBUS_KEY_idiaeresis, 0x1E2F, +IBUS_KEY_apostrophe, IBUS_KEY_ocircumflex, 0x1ED1, +IBUS_KEY_apostrophe, IBUS_KEY_otilde, 0x1E4D, +IBUS_KEY_apostrophe, IBUS_KEY_oslash, 0x01FF, +IBUS_KEY_apostrophe, IBUS_KEY_udiaeresis, 0x01D8, +IBUS_KEY_apostrophe, IBUS_KEY_Abreve, 0x1EAE, +IBUS_KEY_apostrophe, IBUS_KEY_abreve, 0x1EAF, +IBUS_KEY_apostrophe, IBUS_KEY_Emacron, 0x1E16, +IBUS_KEY_apostrophe, IBUS_KEY_emacron, 0x1E17, +IBUS_KEY_apostrophe, IBUS_KEY_Omacron, 0x1E52, +IBUS_KEY_apostrophe, IBUS_KEY_Utilde, 0x1E78, +IBUS_KEY_apostrophe, IBUS_KEY_omacron, 0x1E53, +IBUS_KEY_apostrophe, IBUS_KEY_utilde, 0x1E79, +IBUS_KEY_apostrophe, IBUS_KEY_Cyrillic_ghe, 0x0453, +IBUS_KEY_apostrophe, IBUS_KEY_Cyrillic_ka, 0x045C, +IBUS_KEY_apostrophe, IBUS_KEY_Cyrillic_GHE, 0x0403, +IBUS_KEY_apostrophe, IBUS_KEY_Cyrillic_KA, 0x040C, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_iotadieresis, 0x0390, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_upsilondieresis, 0x03B0, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_ALPHA, 0x0386, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_EPSILON, 0x0388, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_ETA, 0x0389, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_IOTA, 0x038A, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_OMICRON, 0x038C, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_UPSILON, 0x038E, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_OMEGA, 0x038F, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_alpha, 0x03AC, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_epsilon, 0x03AD, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_eta, 0x03AE, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_iota, 0x03AF, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_omicron, 0x03CC, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_upsilon, 0x03CD, +IBUS_KEY_apostrophe, IBUS_KEY_Greek_omega, 0x03CE, +IBUS_KEY_apostrophe, 0x1F00, 0x1F04, +IBUS_KEY_apostrophe, 0x1F01, 0x1F05, +IBUS_KEY_apostrophe, 0x1F08, 0x1F0C, +IBUS_KEY_apostrophe, 0x1F09, 0x1F0D, +IBUS_KEY_apostrophe, 0x1F10, 0x1F14, +IBUS_KEY_apostrophe, 0x1F11, 0x1F15, +IBUS_KEY_apostrophe, 0x1F18, 0x1F1C, +IBUS_KEY_apostrophe, 0x1F19, 0x1F1D, +IBUS_KEY_apostrophe, 0x1F20, 0x1F24, +IBUS_KEY_apostrophe, 0x1F21, 0x1F25, +IBUS_KEY_apostrophe, 0x1F28, 0x1F2C, +IBUS_KEY_apostrophe, 0x1F29, 0x1F2D, +IBUS_KEY_apostrophe, 0x1F30, 0x1F34, +IBUS_KEY_apostrophe, 0x1F31, 0x1F35, +IBUS_KEY_apostrophe, 0x1F38, 0x1F3C, +IBUS_KEY_apostrophe, 0x1F39, 0x1F3D, +IBUS_KEY_apostrophe, 0x1F40, 0x1F44, +IBUS_KEY_apostrophe, 0x1F41, 0x1F45, +IBUS_KEY_apostrophe, 0x1F48, 0x1F4C, +IBUS_KEY_apostrophe, 0x1F49, 0x1F4D, +IBUS_KEY_apostrophe, 0x1F50, 0x1F54, +IBUS_KEY_apostrophe, 0x1F51, 0x1F55, +IBUS_KEY_apostrophe, 0x1F59, 0x1F5D, +IBUS_KEY_apostrophe, 0x1F60, 0x1F64, +IBUS_KEY_apostrophe, 0x1F61, 0x1F65, +IBUS_KEY_apostrophe, 0x1F68, 0x1F6C, +IBUS_KEY_apostrophe, 0x1F69, 0x1F6D, +IBUS_KEY_parenleft, IBUS_KEY_space, 0x02D8, +IBUS_KEY_parenleft, IBUS_KEY_parenleft, 0x005B, +IBUS_KEY_parenleft, IBUS_KEY_minus, 0x007B, +IBUS_KEY_parenleft, IBUS_KEY_A, 0x0102, +IBUS_KEY_parenleft, IBUS_KEY_G, 0x011E, +IBUS_KEY_parenleft, IBUS_KEY_a, 0x0103, +IBUS_KEY_parenleft, IBUS_KEY_c, 0x00A9, +IBUS_KEY_parenleft, IBUS_KEY_g, 0x011F, +IBUS_KEY_parenleft, IBUS_KEY_r, 0x00AE, +IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F09, +IBUS_KEY_parenleft, IBUS_KEY_Greek_EPSILON, 0x1F19, +IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F29, +IBUS_KEY_parenleft, IBUS_KEY_Greek_IOTA, 0x1F39, +IBUS_KEY_parenleft, IBUS_KEY_Greek_OMICRON, 0x1F49, +IBUS_KEY_parenleft, IBUS_KEY_Greek_RHO, 0x1FEC, +IBUS_KEY_parenleft, IBUS_KEY_Greek_UPSILON, 0x1F59, +IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1F69, +IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F01, +IBUS_KEY_parenleft, IBUS_KEY_Greek_epsilon, 0x1F11, +IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F21, +IBUS_KEY_parenleft, IBUS_KEY_Greek_iota, 0x1F31, +IBUS_KEY_parenleft, IBUS_KEY_Greek_omicron, 0x1F41, +IBUS_KEY_parenleft, IBUS_KEY_Greek_rho, 0x1FE5, +IBUS_KEY_parenleft, IBUS_KEY_Greek_upsilon, 0x1F51, +IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1F61, +IBUS_KEY_parenright, IBUS_KEY_parenright, 0x005D, +IBUS_KEY_parenright, IBUS_KEY_minus, 0x007D, +IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F08, +IBUS_KEY_parenright, IBUS_KEY_Greek_EPSILON, 0x1F18, +IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F28, +IBUS_KEY_parenright, IBUS_KEY_Greek_IOTA, 0x1F38, +IBUS_KEY_parenright, IBUS_KEY_Greek_OMICRON, 0x1F48, +IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1F68, +IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F00, +IBUS_KEY_parenright, IBUS_KEY_Greek_epsilon, 0x1F10, +IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F20, +IBUS_KEY_parenright, IBUS_KEY_Greek_iota, 0x1F30, +IBUS_KEY_parenright, IBUS_KEY_Greek_omicron, 0x1F40, +IBUS_KEY_parenright, IBUS_KEY_Greek_rho, 0x1FE4, +IBUS_KEY_parenright, IBUS_KEY_Greek_upsilon, 0x1F50, +IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1F60, +IBUS_KEY_asterisk, IBUS_KEY_0, 0x00B0, +IBUS_KEY_asterisk, IBUS_KEY_A, 0x00C5, +IBUS_KEY_asterisk, IBUS_KEY_U, 0x016E, +IBUS_KEY_asterisk, IBUS_KEY_a, 0x00E5, +IBUS_KEY_asterisk, IBUS_KEY_u, 0x016F, +IBUS_KEY_plus, IBUS_KEY_plus, 0x0023, +IBUS_KEY_plus, IBUS_KEY_minus, 0x00B1, +IBUS_KEY_plus, IBUS_KEY_O, 0x01A0, +IBUS_KEY_plus, IBUS_KEY_U, 0x01AF, +IBUS_KEY_plus, IBUS_KEY_o, 0x01A1, +IBUS_KEY_plus, IBUS_KEY_u, 0x01B0, +IBUS_KEY_comma, IBUS_KEY_space, 0x00B8, +IBUS_KEY_comma, IBUS_KEY_quotedbl, 0x201E, +IBUS_KEY_comma, IBUS_KEY_apostrophe, 0x201A, +IBUS_KEY_comma, IBUS_KEY_comma, 0x00B8, +IBUS_KEY_comma, IBUS_KEY_minus, 0x00AC, +IBUS_KEY_comma, IBUS_KEY_A, 0x0104, +IBUS_KEY_comma, IBUS_KEY_C, 0x00C7, +IBUS_KEY_comma, IBUS_KEY_D, 0x1E10, +IBUS_KEY_comma, IBUS_KEY_E, 0x0118, +IBUS_KEY_comma, IBUS_KEY_G, 0x0122, +IBUS_KEY_comma, IBUS_KEY_H, 0x1E28, +IBUS_KEY_comma, IBUS_KEY_I, 0x012E, +IBUS_KEY_comma, IBUS_KEY_K, 0x0136, +IBUS_KEY_comma, IBUS_KEY_L, 0x013B, +IBUS_KEY_comma, IBUS_KEY_N, 0x0145, +IBUS_KEY_comma, IBUS_KEY_R, 0x0156, +IBUS_KEY_comma, IBUS_KEY_S, 0x015E, +IBUS_KEY_comma, IBUS_KEY_T, 0x0162, +IBUS_KEY_comma, IBUS_KEY_U, 0x0172, +IBUS_KEY_comma, IBUS_KEY_a, 0x0105, +IBUS_KEY_comma, IBUS_KEY_c, 0x00E7, +IBUS_KEY_comma, IBUS_KEY_d, 0x1E11, +IBUS_KEY_comma, IBUS_KEY_e, 0x0119, +IBUS_KEY_comma, IBUS_KEY_g, 0x0123, +IBUS_KEY_comma, IBUS_KEY_h, 0x1E29, +IBUS_KEY_comma, IBUS_KEY_i, 0x012F, +IBUS_KEY_comma, IBUS_KEY_k, 0x0137, +IBUS_KEY_comma, IBUS_KEY_l, 0x013C, +IBUS_KEY_comma, IBUS_KEY_n, 0x0146, +IBUS_KEY_comma, IBUS_KEY_r, 0x0157, +IBUS_KEY_comma, IBUS_KEY_s, 0x015F, +IBUS_KEY_comma, IBUS_KEY_t, 0x0163, +IBUS_KEY_comma, IBUS_KEY_u, 0x0173, +IBUS_KEY_minus, IBUS_KEY_space, 0x007E, +IBUS_KEY_minus, IBUS_KEY_parenleft, 0x007B, +IBUS_KEY_minus, IBUS_KEY_parenright, 0x007D, +IBUS_KEY_minus, IBUS_KEY_plus, 0x00B1, +IBUS_KEY_minus, IBUS_KEY_comma, 0x00AC, +IBUS_KEY_minus, IBUS_KEY_colon, 0x00F7, +IBUS_KEY_minus, IBUS_KEY_greater, 0x2192, +IBUS_KEY_minus, IBUS_KEY_A, 0x00C3, +IBUS_KEY_minus, IBUS_KEY_D, 0x0110, +IBUS_KEY_minus, IBUS_KEY_E, 0x0112, +IBUS_KEY_minus, IBUS_KEY_I, 0x012A, +IBUS_KEY_minus, IBUS_KEY_L, 0x00A3, +IBUS_KEY_minus, IBUS_KEY_N, 0x00D1, +IBUS_KEY_minus, IBUS_KEY_O, 0x00D5, +IBUS_KEY_minus, IBUS_KEY_U, 0x016A, +IBUS_KEY_minus, IBUS_KEY_Y, 0x00A5, +IBUS_KEY_minus, IBUS_KEY_asciicircum, 0x00AF, +IBUS_KEY_minus, IBUS_KEY_a, 0x0101, +IBUS_KEY_minus, IBUS_KEY_d, 0x0111, +IBUS_KEY_minus, IBUS_KEY_e, 0x0113, +IBUS_KEY_minus, IBUS_KEY_i, 0x012B, +IBUS_KEY_minus, IBUS_KEY_l, 0x00A3, +IBUS_KEY_minus, IBUS_KEY_n, 0x00F1, +IBUS_KEY_minus, IBUS_KEY_o, 0x014D, +IBUS_KEY_minus, IBUS_KEY_u, 0x016B, +IBUS_KEY_minus, IBUS_KEY_y, 0x00A5, +IBUS_KEY_period, IBUS_KEY_minus, 0x00B7, +IBUS_KEY_period, IBUS_KEY_period, 0x2026, +IBUS_KEY_period, IBUS_KEY_less, 0x2039, +IBUS_KEY_period, IBUS_KEY_equal, 0x2022, +IBUS_KEY_period, IBUS_KEY_greater, 0x203A, +IBUS_KEY_period, IBUS_KEY_A, 0x0226, +IBUS_KEY_period, IBUS_KEY_B, 0x1E02, +IBUS_KEY_period, IBUS_KEY_C, 0x010A, +IBUS_KEY_period, IBUS_KEY_D, 0x1E0A, +IBUS_KEY_period, IBUS_KEY_E, 0x0116, +IBUS_KEY_period, IBUS_KEY_F, 0x1E1E, +IBUS_KEY_period, IBUS_KEY_G, 0x0120, +IBUS_KEY_period, IBUS_KEY_H, 0x1E22, +IBUS_KEY_period, IBUS_KEY_I, 0x0130, +IBUS_KEY_period, IBUS_KEY_M, 0x1E40, +IBUS_KEY_period, IBUS_KEY_N, 0x1E44, +IBUS_KEY_period, IBUS_KEY_O, 0x022E, +IBUS_KEY_period, IBUS_KEY_P, 0x1E56, +IBUS_KEY_period, IBUS_KEY_R, 0x1E58, +IBUS_KEY_period, IBUS_KEY_S, 0x1E60, +IBUS_KEY_period, IBUS_KEY_T, 0x1E6A, +IBUS_KEY_period, IBUS_KEY_W, 0x1E86, +IBUS_KEY_period, IBUS_KEY_X, 0x1E8A, +IBUS_KEY_period, IBUS_KEY_Y, 0x1E8E, +IBUS_KEY_period, IBUS_KEY_Z, 0x017B, +IBUS_KEY_period, IBUS_KEY_asciicircum, 0x00B7, +IBUS_KEY_period, IBUS_KEY_a, 0x0227, +IBUS_KEY_period, IBUS_KEY_b, 0x1E03, +IBUS_KEY_period, IBUS_KEY_c, 0x010B, +IBUS_KEY_period, IBUS_KEY_d, 0x1E0B, +IBUS_KEY_period, IBUS_KEY_e, 0x0117, +IBUS_KEY_period, IBUS_KEY_f, 0x1E1F, +IBUS_KEY_period, IBUS_KEY_g, 0x0121, +IBUS_KEY_period, IBUS_KEY_h, 0x1E23, +IBUS_KEY_period, IBUS_KEY_i, 0x0131, +IBUS_KEY_period, IBUS_KEY_m, 0x1E41, +IBUS_KEY_period, IBUS_KEY_n, 0x1E45, +IBUS_KEY_period, IBUS_KEY_o, 0x022F, +IBUS_KEY_period, IBUS_KEY_p, 0x1E57, +IBUS_KEY_period, IBUS_KEY_r, 0x1E59, +IBUS_KEY_period, IBUS_KEY_s, 0x1E61, +IBUS_KEY_period, IBUS_KEY_t, 0x1E6B, +IBUS_KEY_period, IBUS_KEY_w, 0x1E87, +IBUS_KEY_period, IBUS_KEY_x, 0x1E8B, +IBUS_KEY_period, IBUS_KEY_y, 0x1E8F, +IBUS_KEY_period, IBUS_KEY_z, 0x017C, +IBUS_KEY_period, 0x017F, 0x1E9B, +IBUS_KEY_period, IBUS_KEY_Sacute, 0x1E64, +IBUS_KEY_period, IBUS_KEY_Scaron, 0x1E66, +IBUS_KEY_period, IBUS_KEY_sacute, 0x1E65, +IBUS_KEY_period, IBUS_KEY_scaron, 0x1E67, +IBUS_KEY_period, 0x1E62, 0x1E68, +IBUS_KEY_period, 0x1E63, 0x1E69, +IBUS_KEY_slash, IBUS_KEY_slash, 0x005C, +IBUS_KEY_slash, IBUS_KEY_less, 0x005C, +IBUS_KEY_slash, IBUS_KEY_equal, 0x2260, +IBUS_KEY_slash, IBUS_KEY_C, 0x20A1, +IBUS_KEY_slash, IBUS_KEY_D, 0x0110, +IBUS_KEY_slash, IBUS_KEY_G, 0x01E4, +IBUS_KEY_slash, IBUS_KEY_H, 0x0126, +IBUS_KEY_slash, IBUS_KEY_I, 0x0197, +IBUS_KEY_slash, IBUS_KEY_L, 0x0141, +IBUS_KEY_slash, IBUS_KEY_O, 0x00D8, +IBUS_KEY_slash, IBUS_KEY_T, 0x0166, +IBUS_KEY_slash, IBUS_KEY_U, 0x00B5, +IBUS_KEY_slash, IBUS_KEY_Z, 0x01B5, +IBUS_KEY_slash, IBUS_KEY_asciicircum, 0x007C, +IBUS_KEY_slash, IBUS_KEY_b, 0x0180, +IBUS_KEY_slash, IBUS_KEY_c, 0x00A2, +IBUS_KEY_slash, IBUS_KEY_d, 0x0111, +IBUS_KEY_slash, IBUS_KEY_g, 0x01E5, +IBUS_KEY_slash, IBUS_KEY_h, 0x0127, +IBUS_KEY_slash, IBUS_KEY_i, 0x0268, +IBUS_KEY_slash, IBUS_KEY_l, 0x0142, +IBUS_KEY_slash, IBUS_KEY_m, 0x20A5, +IBUS_KEY_slash, IBUS_KEY_o, 0x00F8, +IBUS_KEY_slash, IBUS_KEY_t, 0x0167, +IBUS_KEY_slash, IBUS_KEY_u, 0x00B5, +IBUS_KEY_slash, IBUS_KEY_z, 0x01B6, +IBUS_KEY_slash, 0x0294, 0x02A1, +IBUS_KEY_slash, 0x04AE, 0x04B0, +IBUS_KEY_slash, 0x04AF, 0x04B1, +IBUS_KEY_slash, IBUS_KEY_Cyrillic_ghe, 0x0493, +IBUS_KEY_slash, IBUS_KEY_Cyrillic_ka, 0x049F, +IBUS_KEY_slash, IBUS_KEY_Cyrillic_GHE, 0x0492, +IBUS_KEY_slash, IBUS_KEY_Cyrillic_KA, 0x049E, +IBUS_KEY_slash, IBUS_KEY_leftarrow, 0x219A, +IBUS_KEY_slash, IBUS_KEY_rightarrow, 0x219B, +IBUS_KEY_slash, 0x2194, 0x21AE, +IBUS_KEY_0, IBUS_KEY_asterisk, 0x00B0, +IBUS_KEY_0, IBUS_KEY_C, 0x00A9, +IBUS_KEY_0, IBUS_KEY_S, 0x00A7, +IBUS_KEY_0, IBUS_KEY_X, 0x00A4, +IBUS_KEY_0, IBUS_KEY_asciicircum, 0x00B0, +IBUS_KEY_0, IBUS_KEY_c, 0x00A9, +IBUS_KEY_0, IBUS_KEY_s, 0x00A7, +IBUS_KEY_0, IBUS_KEY_x, 0x00A4, +IBUS_KEY_1, IBUS_KEY_2, 0x00BD, +IBUS_KEY_1, IBUS_KEY_3, 0x2153, +IBUS_KEY_1, IBUS_KEY_4, 0x00BC, +IBUS_KEY_1, IBUS_KEY_5, 0x2155, +IBUS_KEY_1, IBUS_KEY_6, 0x2159, +IBUS_KEY_1, IBUS_KEY_8, 0x215B, +IBUS_KEY_1, IBUS_KEY_S, 0x00B9, +IBUS_KEY_1, IBUS_KEY_asciicircum, 0x00B9, +IBUS_KEY_1, IBUS_KEY_s, 0x00B9, +IBUS_KEY_2, IBUS_KEY_3, 0x2154, +IBUS_KEY_2, IBUS_KEY_5, 0x2156, +IBUS_KEY_2, IBUS_KEY_S, 0x00B2, +IBUS_KEY_2, IBUS_KEY_asciicircum, 0x00B2, +IBUS_KEY_2, IBUS_KEY_s, 0x00B2, +IBUS_KEY_3, IBUS_KEY_4, 0x00BE, +IBUS_KEY_3, IBUS_KEY_5, 0x2157, +IBUS_KEY_3, IBUS_KEY_8, 0x215C, +IBUS_KEY_3, IBUS_KEY_S, 0x00B3, +IBUS_KEY_3, IBUS_KEY_asciicircum, 0x00B3, +IBUS_KEY_3, IBUS_KEY_s, 0x00B3, +IBUS_KEY_4, IBUS_KEY_5, 0x2158, +IBUS_KEY_5, IBUS_KEY_6, 0x215A, +IBUS_KEY_5, IBUS_KEY_8, 0x215D, +IBUS_KEY_7, IBUS_KEY_8, 0x215E, +IBUS_KEY_colon, IBUS_KEY_parenleft, 0x2639, +IBUS_KEY_colon, IBUS_KEY_parenright, 0x263A, +IBUS_KEY_colon, IBUS_KEY_minus, 0x00F7, +IBUS_KEY_semicolon, IBUS_KEY_A, 0x0104, +IBUS_KEY_semicolon, IBUS_KEY_E, 0x0118, +IBUS_KEY_semicolon, IBUS_KEY_I, 0x012E, +IBUS_KEY_semicolon, IBUS_KEY_O, 0x01EA, +IBUS_KEY_semicolon, IBUS_KEY_U, 0x0172, +IBUS_KEY_semicolon, IBUS_KEY_a, 0x0105, +IBUS_KEY_semicolon, IBUS_KEY_e, 0x0119, +IBUS_KEY_semicolon, IBUS_KEY_i, 0x012F, +IBUS_KEY_semicolon, IBUS_KEY_o, 0x01EB, +IBUS_KEY_semicolon, IBUS_KEY_u, 0x0173, +IBUS_KEY_less, IBUS_KEY_space, 0x02C7, +IBUS_KEY_less, IBUS_KEY_quotedbl, 0x201C, +IBUS_KEY_less, IBUS_KEY_apostrophe, 0x2018, +IBUS_KEY_less, IBUS_KEY_minus, 0x2190, +IBUS_KEY_less, IBUS_KEY_slash, 0x005C, +IBUS_KEY_less, IBUS_KEY_3, 0x2665, +IBUS_KEY_less, IBUS_KEY_less, 0x00AB, +IBUS_KEY_less, IBUS_KEY_equal, 0x2264, +IBUS_KEY_less, IBUS_KEY_C, 0x010C, +IBUS_KEY_less, IBUS_KEY_D, 0x010E, +IBUS_KEY_less, IBUS_KEY_E, 0x011A, +IBUS_KEY_less, IBUS_KEY_L, 0x013D, +IBUS_KEY_less, IBUS_KEY_N, 0x0147, +IBUS_KEY_less, IBUS_KEY_R, 0x0158, +IBUS_KEY_less, IBUS_KEY_S, 0x0160, +IBUS_KEY_less, IBUS_KEY_T, 0x0164, +IBUS_KEY_less, IBUS_KEY_Z, 0x017D, +IBUS_KEY_less, IBUS_KEY_c, 0x010D, +IBUS_KEY_less, IBUS_KEY_d, 0x010F, +IBUS_KEY_less, IBUS_KEY_e, 0x011B, +IBUS_KEY_less, IBUS_KEY_l, 0x013E, +IBUS_KEY_less, IBUS_KEY_n, 0x0148, +IBUS_KEY_less, IBUS_KEY_r, 0x0159, +IBUS_KEY_less, IBUS_KEY_s, 0x0161, +IBUS_KEY_less, IBUS_KEY_t, 0x0165, +IBUS_KEY_less, IBUS_KEY_z, 0x017E, +IBUS_KEY_less, 0x0338, 0x226E, +IBUS_KEY_equal, IBUS_KEY_slash, 0x2260, +IBUS_KEY_equal, IBUS_KEY_C, 0x20AC, +IBUS_KEY_equal, IBUS_KEY_E, 0x20AC, +IBUS_KEY_equal, IBUS_KEY_L, 0x20A4, +IBUS_KEY_equal, IBUS_KEY_N, 0x20A6, +IBUS_KEY_equal, IBUS_KEY_O, 0x0150, +IBUS_KEY_equal, IBUS_KEY_U, 0x0170, +IBUS_KEY_equal, IBUS_KEY_W, 0x20A9, +IBUS_KEY_equal, IBUS_KEY_Y, 0x00A5, +IBUS_KEY_equal, IBUS_KEY_c, 0x20AC, +IBUS_KEY_equal, IBUS_KEY_e, 0x20AC, +IBUS_KEY_equal, IBUS_KEY_l, 0x00A3, +IBUS_KEY_equal, IBUS_KEY_o, 0x0151, +IBUS_KEY_equal, IBUS_KEY_u, 0x0171, +IBUS_KEY_equal, IBUS_KEY_y, 0x00A5, +IBUS_KEY_equal, 0x0338, 0x2260, +IBUS_KEY_equal, IBUS_KEY_Cyrillic_u, 0x04F3, +IBUS_KEY_equal, IBUS_KEY_Cyrillic_IE, 0x20AC, +IBUS_KEY_equal, IBUS_KEY_Cyrillic_ES, 0x20AC, +IBUS_KEY_equal, IBUS_KEY_Cyrillic_U, 0x04F2, +IBUS_KEY_greater, IBUS_KEY_space, 0x005E, +IBUS_KEY_greater, IBUS_KEY_quotedbl, 0x201D, +IBUS_KEY_greater, IBUS_KEY_apostrophe, 0x2019, +IBUS_KEY_greater, IBUS_KEY_equal, 0x2265, +IBUS_KEY_greater, IBUS_KEY_greater, 0x00BB, +IBUS_KEY_greater, IBUS_KEY_A, 0x00C2, +IBUS_KEY_greater, IBUS_KEY_E, 0x00CA, +IBUS_KEY_greater, IBUS_KEY_I, 0x00CE, +IBUS_KEY_greater, IBUS_KEY_O, 0x00D4, +IBUS_KEY_greater, IBUS_KEY_U, 0x00DB, +IBUS_KEY_greater, IBUS_KEY_a, 0x00E2, +IBUS_KEY_greater, IBUS_KEY_e, 0x00EA, +IBUS_KEY_greater, IBUS_KEY_i, 0x00EE, +IBUS_KEY_greater, IBUS_KEY_o, 0x00F4, +IBUS_KEY_greater, IBUS_KEY_u, 0x00FB, +IBUS_KEY_greater, 0x0338, 0x226F, +IBUS_KEY_question, IBUS_KEY_exclam, 0x2E18, +IBUS_KEY_question, IBUS_KEY_question, 0x00BF, +IBUS_KEY_question, IBUS_KEY_A, 0x1EA2, +IBUS_KEY_question, IBUS_KEY_E, 0x1EBA, +IBUS_KEY_question, IBUS_KEY_I, 0x1EC8, +IBUS_KEY_question, IBUS_KEY_O, 0x1ECE, +IBUS_KEY_question, IBUS_KEY_U, 0x1EE6, +IBUS_KEY_question, IBUS_KEY_Y, 0x1EF6, +IBUS_KEY_question, IBUS_KEY_a, 0x1EA3, +IBUS_KEY_question, IBUS_KEY_e, 0x1EBB, +IBUS_KEY_question, IBUS_KEY_i, 0x1EC9, +IBUS_KEY_question, IBUS_KEY_o, 0x1ECF, +IBUS_KEY_question, IBUS_KEY_u, 0x1EE7, +IBUS_KEY_question, IBUS_KEY_y, 0x1EF7, +IBUS_KEY_question, IBUS_KEY_Acircumflex, 0x1EA8, +IBUS_KEY_question, IBUS_KEY_Ecircumflex, 0x1EC2, +IBUS_KEY_question, IBUS_KEY_Ocircumflex, 0x1ED4, +IBUS_KEY_question, IBUS_KEY_acircumflex, 0x1EA9, +IBUS_KEY_question, IBUS_KEY_ecircumflex, 0x1EC3, +IBUS_KEY_question, IBUS_KEY_ocircumflex, 0x1ED5, +IBUS_KEY_question, IBUS_KEY_Abreve, 0x1EB2, +IBUS_KEY_question, IBUS_KEY_abreve, 0x1EB3, +IBUS_KEY_A, IBUS_KEY_quotedbl, 0x00C4, +IBUS_KEY_A, IBUS_KEY_apostrophe, 0x00C1, +IBUS_KEY_A, IBUS_KEY_parenleft, 0x0102, +IBUS_KEY_A, IBUS_KEY_asterisk, 0x00C5, +IBUS_KEY_A, IBUS_KEY_comma, 0x0104, +IBUS_KEY_A, IBUS_KEY_minus, 0x00C3, +IBUS_KEY_A, IBUS_KEY_greater, 0x00C2, +IBUS_KEY_A, IBUS_KEY_A, 0x00C5, +IBUS_KEY_A, IBUS_KEY_E, 0x00C6, +IBUS_KEY_A, IBUS_KEY_T, 0x0040, +IBUS_KEY_A, IBUS_KEY_asciicircum, 0x00C2, +IBUS_KEY_A, IBUS_KEY_underscore, 0x00AA, +IBUS_KEY_A, IBUS_KEY_grave, 0x00C0, +IBUS_KEY_A, IBUS_KEY_asciitilde, 0x00C3, +IBUS_KEY_A, IBUS_KEY_diaeresis, 0x00C4, +IBUS_KEY_A, IBUS_KEY_acute, 0x00C1, +IBUS_KEY_B, IBUS_KEY_period, 0x1E02, +IBUS_KEY_C, IBUS_KEY_apostrophe, 0x0106, +IBUS_KEY_C, IBUS_KEY_comma, 0x00C7, +IBUS_KEY_C, IBUS_KEY_period, 0x010A, +IBUS_KEY_C, IBUS_KEY_slash, 0x20A1, +IBUS_KEY_C, IBUS_KEY_0, 0x00A9, +IBUS_KEY_C, IBUS_KEY_less, 0x010C, +IBUS_KEY_C, IBUS_KEY_equal, 0x20AC, +IBUS_KEY_C, IBUS_KEY_E, 0x20A0, +IBUS_KEY_C, IBUS_KEY_O, 0x00A9, +IBUS_KEY_C, IBUS_KEY_o, 0x00A9, +IBUS_KEY_C, IBUS_KEY_r, 0x20A2, +IBUS_KEY_C, IBUS_KEY_bar, 0x00A2, +IBUS_KEY_D, IBUS_KEY_minus, 0x0110, +IBUS_KEY_D, IBUS_KEY_period, 0x1E0A, +IBUS_KEY_D, IBUS_KEY_less, 0x010E, +IBUS_KEY_D, IBUS_KEY_H, 0x00D0, +IBUS_KEY_E, IBUS_KEY_quotedbl, 0x00CB, +IBUS_KEY_E, IBUS_KEY_apostrophe, 0x00C9, +IBUS_KEY_E, IBUS_KEY_comma, 0x0118, +IBUS_KEY_E, IBUS_KEY_minus, 0x0112, +IBUS_KEY_E, IBUS_KEY_period, 0x0116, +IBUS_KEY_E, IBUS_KEY_less, 0x011A, +IBUS_KEY_E, IBUS_KEY_equal, 0x20AC, +IBUS_KEY_E, IBUS_KEY_greater, 0x00CA, +IBUS_KEY_E, IBUS_KEY_asciicircum, 0x00CA, +IBUS_KEY_E, IBUS_KEY_underscore, 0x0112, +IBUS_KEY_E, IBUS_KEY_grave, 0x00C8, +IBUS_KEY_E, IBUS_KEY_diaeresis, 0x00CB, +IBUS_KEY_E, IBUS_KEY_acute, 0x00C9, +IBUS_KEY_F, IBUS_KEY_period, 0x1E1E, +IBUS_KEY_F, IBUS_KEY_r, 0x20A3, +IBUS_KEY_G, IBUS_KEY_parenleft, 0x011E, +IBUS_KEY_G, IBUS_KEY_comma, 0x0122, +IBUS_KEY_G, IBUS_KEY_period, 0x0120, +IBUS_KEY_G, IBUS_KEY_U, 0x011E, +IBUS_KEY_G, IBUS_KEY_breve, 0x011E, +IBUS_KEY_I, IBUS_KEY_quotedbl, 0x00CF, +IBUS_KEY_I, IBUS_KEY_apostrophe, 0x00CD, +IBUS_KEY_I, IBUS_KEY_comma, 0x012E, +IBUS_KEY_I, IBUS_KEY_minus, 0x012A, +IBUS_KEY_I, IBUS_KEY_period, 0x0130, +IBUS_KEY_I, IBUS_KEY_greater, 0x00CE, +IBUS_KEY_I, IBUS_KEY_asciicircum, 0x00CE, +IBUS_KEY_I, IBUS_KEY_underscore, 0x012A, +IBUS_KEY_I, IBUS_KEY_grave, 0x00CC, +IBUS_KEY_I, IBUS_KEY_asciitilde, 0x0128, +IBUS_KEY_I, IBUS_KEY_diaeresis, 0x00CF, +IBUS_KEY_I, IBUS_KEY_acute, 0x00CD, +IBUS_KEY_K, IBUS_KEY_comma, 0x0136, +IBUS_KEY_L, IBUS_KEY_apostrophe, 0x0139, +IBUS_KEY_L, IBUS_KEY_comma, 0x013B, +IBUS_KEY_L, IBUS_KEY_minus, 0x00A3, +IBUS_KEY_L, IBUS_KEY_slash, 0x0141, +IBUS_KEY_L, IBUS_KEY_less, 0x013D, +IBUS_KEY_L, IBUS_KEY_equal, 0x00A3, +IBUS_KEY_L, IBUS_KEY_V, 0x007C, +IBUS_KEY_M, IBUS_KEY_period, 0x1E40, +IBUS_KEY_N, IBUS_KEY_apostrophe, 0x0143, +IBUS_KEY_N, IBUS_KEY_comma, 0x0145, +IBUS_KEY_N, IBUS_KEY_minus, 0x00D1, +IBUS_KEY_N, IBUS_KEY_less, 0x0147, +IBUS_KEY_N, IBUS_KEY_equal, 0x20A6, +IBUS_KEY_N, IBUS_KEY_G, 0x014A, +IBUS_KEY_N, IBUS_KEY_O, 0x2116, +IBUS_KEY_N, IBUS_KEY_o, 0x2116, +IBUS_KEY_N, IBUS_KEY_asciitilde, 0x00D1, +IBUS_KEY_O, IBUS_KEY_quotedbl, 0x00D6, +IBUS_KEY_O, IBUS_KEY_apostrophe, 0x00D3, +IBUS_KEY_O, IBUS_KEY_minus, 0x00D5, +IBUS_KEY_O, IBUS_KEY_slash, 0x00D8, +IBUS_KEY_O, IBUS_KEY_greater, 0x00D4, +IBUS_KEY_O, IBUS_KEY_A, 0x24B6, +IBUS_KEY_O, IBUS_KEY_C, 0x00A9, +IBUS_KEY_O, IBUS_KEY_E, 0x0152, +IBUS_KEY_O, IBUS_KEY_R, 0x00AE, +IBUS_KEY_O, IBUS_KEY_S, 0x00A7, +IBUS_KEY_O, IBUS_KEY_X, 0x00A4, +IBUS_KEY_O, IBUS_KEY_asciicircum, 0x00D4, +IBUS_KEY_O, IBUS_KEY_underscore, 0x00BA, +IBUS_KEY_O, IBUS_KEY_grave, 0x00D2, +IBUS_KEY_O, IBUS_KEY_c, 0x00A9, +IBUS_KEY_O, IBUS_KEY_r, 0x00AE, +IBUS_KEY_O, IBUS_KEY_x, 0x00A4, +IBUS_KEY_O, IBUS_KEY_asciitilde, 0x00D5, +IBUS_KEY_O, IBUS_KEY_diaeresis, 0x00D6, +IBUS_KEY_O, IBUS_KEY_acute, 0x00D3, +IBUS_KEY_P, IBUS_KEY_exclam, 0x00B6, +IBUS_KEY_P, IBUS_KEY_period, 0x1E56, +IBUS_KEY_P, IBUS_KEY_P, 0x00B6, +IBUS_KEY_P, IBUS_KEY_t, 0x20A7, +IBUS_KEY_R, IBUS_KEY_apostrophe, 0x0154, +IBUS_KEY_R, IBUS_KEY_comma, 0x0156, +IBUS_KEY_R, IBUS_KEY_less, 0x0158, +IBUS_KEY_R, IBUS_KEY_O, 0x00AE, +IBUS_KEY_R, IBUS_KEY_s, 0x20A8, +IBUS_KEY_S, IBUS_KEY_exclam, 0x00A7, +IBUS_KEY_S, IBUS_KEY_apostrophe, 0x015A, +IBUS_KEY_S, IBUS_KEY_comma, 0x015E, +IBUS_KEY_S, IBUS_KEY_period, 0x1E60, +IBUS_KEY_S, IBUS_KEY_0, 0x00A7, +IBUS_KEY_S, IBUS_KEY_1, 0x00B9, +IBUS_KEY_S, IBUS_KEY_2, 0x00B2, +IBUS_KEY_S, IBUS_KEY_3, 0x00B3, +IBUS_KEY_S, IBUS_KEY_less, 0x0160, +IBUS_KEY_S, IBUS_KEY_M, 0x2120, +IBUS_KEY_S, IBUS_KEY_O, 0x00A7, +IBUS_KEY_S, IBUS_KEY_S, 0x1E9E, +IBUS_KEY_S, IBUS_KEY_m, 0x2120, +IBUS_KEY_S, IBUS_KEY_cedilla, 0x015E, +IBUS_KEY_T, IBUS_KEY_minus, 0x0166, +IBUS_KEY_T, IBUS_KEY_period, 0x1E6A, +IBUS_KEY_T, IBUS_KEY_slash, 0x0166, +IBUS_KEY_T, IBUS_KEY_less, 0x0164, +IBUS_KEY_T, IBUS_KEY_H, 0x00DE, +IBUS_KEY_T, IBUS_KEY_M, 0x2122, +IBUS_KEY_T, IBUS_KEY_m, 0x2122, +IBUS_KEY_U, IBUS_KEY_quotedbl, 0x00DC, +IBUS_KEY_U, IBUS_KEY_apostrophe, 0x00DA, +IBUS_KEY_U, IBUS_KEY_asterisk, 0x016E, +IBUS_KEY_U, IBUS_KEY_comma, 0x0172, +IBUS_KEY_U, IBUS_KEY_minus, 0x016A, +IBUS_KEY_U, IBUS_KEY_slash, 0x00B5, +IBUS_KEY_U, IBUS_KEY_greater, 0x00DB, +IBUS_KEY_U, IBUS_KEY_A, 0x0102, +IBUS_KEY_U, IBUS_KEY_E, 0x0114, +IBUS_KEY_U, IBUS_KEY_G, 0x011E, +IBUS_KEY_U, IBUS_KEY_I, 0x012C, +IBUS_KEY_U, IBUS_KEY_O, 0x014E, +IBUS_KEY_U, IBUS_KEY_U, 0x016C, +IBUS_KEY_U, IBUS_KEY_asciicircum, 0x00DB, +IBUS_KEY_U, IBUS_KEY_underscore, 0x016A, +IBUS_KEY_U, IBUS_KEY_grave, 0x00D9, +IBUS_KEY_U, IBUS_KEY_a, 0x0103, +IBUS_KEY_U, IBUS_KEY_e, 0x0115, +IBUS_KEY_U, IBUS_KEY_g, 0x011F, +IBUS_KEY_U, IBUS_KEY_i, 0x012D, +IBUS_KEY_U, IBUS_KEY_o, 0x014F, +IBUS_KEY_U, IBUS_KEY_u, 0x016D, +IBUS_KEY_U, IBUS_KEY_asciitilde, 0x0168, +IBUS_KEY_U, IBUS_KEY_diaeresis, 0x00DC, +IBUS_KEY_U, IBUS_KEY_acute, 0x00DA, +IBUS_KEY_U, 0x0228, 0x1E1C, +IBUS_KEY_U, 0x0229, 0x1E1D, +IBUS_KEY_U, IBUS_KEY_Cyrillic_a, 0x04D1, +IBUS_KEY_U, IBUS_KEY_Cyrillic_ie, 0x04D7, +IBUS_KEY_U, IBUS_KEY_Cyrillic_i, 0x0439, +IBUS_KEY_U, IBUS_KEY_Cyrillic_u, 0x045E, +IBUS_KEY_U, IBUS_KEY_Cyrillic_zhe, 0x04C2, +IBUS_KEY_U, IBUS_KEY_Cyrillic_A, 0x04D0, +IBUS_KEY_U, IBUS_KEY_Cyrillic_IE, 0x04D6, +IBUS_KEY_U, IBUS_KEY_Cyrillic_I, 0x0419, +IBUS_KEY_U, IBUS_KEY_Cyrillic_U, 0x040E, +IBUS_KEY_U, IBUS_KEY_Cyrillic_ZHE, 0x04C1, +IBUS_KEY_U, IBUS_KEY_Greek_ALPHA, 0x1FB8, +IBUS_KEY_U, IBUS_KEY_Greek_IOTA, 0x1FD8, +IBUS_KEY_U, IBUS_KEY_Greek_UPSILON, 0x1FE8, +IBUS_KEY_U, IBUS_KEY_Greek_alpha, 0x1FB0, +IBUS_KEY_U, IBUS_KEY_Greek_iota, 0x1FD0, +IBUS_KEY_U, IBUS_KEY_Greek_upsilon, 0x1FE0, +IBUS_KEY_U, 0x1EA0, 0x1EB6, +IBUS_KEY_U, 0x1EA1, 0x1EB7, +IBUS_KEY_V, IBUS_KEY_L, 0x007C, +IBUS_KEY_W, IBUS_KEY_equal, 0x20A9, +IBUS_KEY_W, IBUS_KEY_asciicircum, 0x0174, +IBUS_KEY_X, IBUS_KEY_0, 0x00A4, +IBUS_KEY_X, IBUS_KEY_O, 0x00A4, +IBUS_KEY_X, IBUS_KEY_o, 0x00A4, +IBUS_KEY_Y, IBUS_KEY_quotedbl, 0x0178, +IBUS_KEY_Y, IBUS_KEY_apostrophe, 0x00DD, +IBUS_KEY_Y, IBUS_KEY_minus, 0x00A5, +IBUS_KEY_Y, IBUS_KEY_equal, 0x00A5, +IBUS_KEY_Y, IBUS_KEY_asciicircum, 0x0176, +IBUS_KEY_Y, IBUS_KEY_diaeresis, 0x0178, +IBUS_KEY_Y, IBUS_KEY_acute, 0x00DD, +IBUS_KEY_Z, IBUS_KEY_apostrophe, 0x0179, +IBUS_KEY_Z, IBUS_KEY_period, 0x017B, +IBUS_KEY_Z, IBUS_KEY_less, 0x017D, +IBUS_KEY_asciicircum, IBUS_KEY_space, 0x005E, +IBUS_KEY_asciicircum, IBUS_KEY_parenleft, 0x207D, +IBUS_KEY_asciicircum, IBUS_KEY_parenright, 0x207E, +IBUS_KEY_asciicircum, IBUS_KEY_plus, 0x207A, +IBUS_KEY_asciicircum, IBUS_KEY_minus, 0x00AF, +IBUS_KEY_asciicircum, IBUS_KEY_period, 0x00B7, +IBUS_KEY_asciicircum, IBUS_KEY_slash, 0x007C, +IBUS_KEY_asciicircum, IBUS_KEY_0, 0x2070, +IBUS_KEY_asciicircum, IBUS_KEY_1, 0x00B9, +IBUS_KEY_asciicircum, IBUS_KEY_2, 0x00B2, +IBUS_KEY_asciicircum, IBUS_KEY_3, 0x00B3, +IBUS_KEY_asciicircum, IBUS_KEY_4, 0x2074, +IBUS_KEY_asciicircum, IBUS_KEY_5, 0x2075, +IBUS_KEY_asciicircum, IBUS_KEY_6, 0x2076, +IBUS_KEY_asciicircum, IBUS_KEY_7, 0x2077, +IBUS_KEY_asciicircum, IBUS_KEY_8, 0x2078, +IBUS_KEY_asciicircum, IBUS_KEY_9, 0x2079, +IBUS_KEY_asciicircum, IBUS_KEY_equal, 0x207C, +IBUS_KEY_asciicircum, IBUS_KEY_A, 0x00C2, +IBUS_KEY_asciicircum, IBUS_KEY_C, 0x0108, +IBUS_KEY_asciicircum, IBUS_KEY_E, 0x00CA, +IBUS_KEY_asciicircum, IBUS_KEY_G, 0x011C, +IBUS_KEY_asciicircum, IBUS_KEY_H, 0x0124, +IBUS_KEY_asciicircum, IBUS_KEY_I, 0x00CE, +IBUS_KEY_asciicircum, IBUS_KEY_J, 0x0134, +IBUS_KEY_asciicircum, IBUS_KEY_O, 0x00D4, +IBUS_KEY_asciicircum, IBUS_KEY_S, 0x015C, +IBUS_KEY_asciicircum, IBUS_KEY_U, 0x00DB, +IBUS_KEY_asciicircum, IBUS_KEY_W, 0x0174, +IBUS_KEY_asciicircum, IBUS_KEY_Y, 0x0176, +IBUS_KEY_asciicircum, IBUS_KEY_Z, 0x1E90, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, 0x00AF, +IBUS_KEY_asciicircum, IBUS_KEY_a, 0x00E2, +IBUS_KEY_asciicircum, IBUS_KEY_c, 0x0109, +IBUS_KEY_asciicircum, IBUS_KEY_e, 0x00EA, +IBUS_KEY_asciicircum, IBUS_KEY_g, 0x011D, +IBUS_KEY_asciicircum, IBUS_KEY_h, 0x0125, +IBUS_KEY_asciicircum, IBUS_KEY_i, 0x00EE, +IBUS_KEY_asciicircum, IBUS_KEY_j, 0x0135, +IBUS_KEY_asciicircum, IBUS_KEY_o, 0x00F4, +IBUS_KEY_asciicircum, IBUS_KEY_s, 0x015D, +IBUS_KEY_asciicircum, IBUS_KEY_u, 0x00FB, +IBUS_KEY_asciicircum, IBUS_KEY_w, 0x0175, +IBUS_KEY_asciicircum, IBUS_KEY_y, 0x0177, +IBUS_KEY_asciicircum, IBUS_KEY_z, 0x1E91, +IBUS_KEY_asciicircum, 0x1EA0, 0x1EAC, +IBUS_KEY_asciicircum, 0x1EA1, 0x1EAD, +IBUS_KEY_asciicircum, 0x1EB8, 0x1EC6, +IBUS_KEY_asciicircum, 0x1EB9, 0x1EC7, +IBUS_KEY_asciicircum, 0x1ECC, 0x1ED8, +IBUS_KEY_asciicircum, 0x1ECD, 0x1ED9, +IBUS_KEY_asciicircum, 0x2212, 0x207B, +IBUS_KEY_asciicircum, 0x4E00, 0x3192, +IBUS_KEY_asciicircum, 0x4E01, 0x319C, +IBUS_KEY_asciicircum, 0x4E09, 0x3194, +IBUS_KEY_asciicircum, 0x4E0A, 0x3196, +IBUS_KEY_asciicircum, 0x4E0B, 0x3198, +IBUS_KEY_asciicircum, 0x4E19, 0x319B, +IBUS_KEY_asciicircum, 0x4E2D, 0x3197, +IBUS_KEY_asciicircum, 0x4E59, 0x319A, +IBUS_KEY_asciicircum, 0x4E8C, 0x3193, +IBUS_KEY_asciicircum, 0x4EBA, 0x319F, +IBUS_KEY_asciicircum, 0x56DB, 0x3195, +IBUS_KEY_asciicircum, 0x5730, 0x319E, +IBUS_KEY_asciicircum, 0x5929, 0x319D, +IBUS_KEY_asciicircum, 0x7532, 0x3199, +IBUS_KEY_asciicircum, IBUS_KEY_KP_Space, 0x00B2, +IBUS_KEY_asciicircum, IBUS_KEY_KP_Add, 0x207A, +IBUS_KEY_asciicircum, IBUS_KEY_KP_0, 0x2070, +IBUS_KEY_asciicircum, IBUS_KEY_KP_1, 0x00B9, +IBUS_KEY_asciicircum, IBUS_KEY_KP_2, 0x00B2, +IBUS_KEY_asciicircum, IBUS_KEY_KP_3, 0x00B3, +IBUS_KEY_asciicircum, IBUS_KEY_KP_4, 0x2074, +IBUS_KEY_asciicircum, IBUS_KEY_KP_5, 0x2075, +IBUS_KEY_asciicircum, IBUS_KEY_KP_6, 0x2076, +IBUS_KEY_asciicircum, IBUS_KEY_KP_7, 0x2077, +IBUS_KEY_asciicircum, IBUS_KEY_KP_8, 0x2078, +IBUS_KEY_asciicircum, IBUS_KEY_KP_9, 0x2079, +IBUS_KEY_asciicircum, IBUS_KEY_KP_Equal, 0x207C, +IBUS_KEY_underscore, IBUS_KEY_parenleft, 0x208D, +IBUS_KEY_underscore, IBUS_KEY_parenright, 0x208E, +IBUS_KEY_underscore, IBUS_KEY_plus, 0x208A, +IBUS_KEY_underscore, IBUS_KEY_0, 0x2080, +IBUS_KEY_underscore, IBUS_KEY_1, 0x2081, +IBUS_KEY_underscore, IBUS_KEY_2, 0x2082, +IBUS_KEY_underscore, IBUS_KEY_3, 0x2083, +IBUS_KEY_underscore, IBUS_KEY_4, 0x2084, +IBUS_KEY_underscore, IBUS_KEY_5, 0x2085, +IBUS_KEY_underscore, IBUS_KEY_6, 0x2086, +IBUS_KEY_underscore, IBUS_KEY_7, 0x2087, +IBUS_KEY_underscore, IBUS_KEY_8, 0x2088, +IBUS_KEY_underscore, IBUS_KEY_9, 0x2089, +IBUS_KEY_underscore, IBUS_KEY_equal, 0x208C, +IBUS_KEY_underscore, IBUS_KEY_A, 0x0100, +IBUS_KEY_underscore, IBUS_KEY_E, 0x0112, +IBUS_KEY_underscore, IBUS_KEY_G, 0x1E20, +IBUS_KEY_underscore, IBUS_KEY_I, 0x012A, +IBUS_KEY_underscore, IBUS_KEY_O, 0x014C, +IBUS_KEY_underscore, IBUS_KEY_U, 0x016A, +IBUS_KEY_underscore, IBUS_KEY_Y, 0x0232, +IBUS_KEY_underscore, IBUS_KEY_asciicircum, 0x00AF, +IBUS_KEY_underscore, IBUS_KEY_underscore, 0x00AF, +IBUS_KEY_underscore, IBUS_KEY_a, 0x0101, +IBUS_KEY_underscore, IBUS_KEY_e, 0x0113, +IBUS_KEY_underscore, IBUS_KEY_g, 0x1E21, +IBUS_KEY_underscore, IBUS_KEY_i, 0x012B, +IBUS_KEY_underscore, IBUS_KEY_o, 0x014D, +IBUS_KEY_underscore, IBUS_KEY_u, 0x016B, +IBUS_KEY_underscore, IBUS_KEY_y, 0x0233, +IBUS_KEY_underscore, IBUS_KEY_Adiaeresis, 0x01DE, +IBUS_KEY_underscore, IBUS_KEY_AE, 0x01E2, +IBUS_KEY_underscore, IBUS_KEY_Otilde, 0x022C, +IBUS_KEY_underscore, IBUS_KEY_Odiaeresis, 0x022A, +IBUS_KEY_underscore, IBUS_KEY_Udiaeresis, 0x01D5, +IBUS_KEY_underscore, IBUS_KEY_adiaeresis, 0x01DF, +IBUS_KEY_underscore, IBUS_KEY_ae, 0x01E3, +IBUS_KEY_underscore, IBUS_KEY_otilde, 0x022D, +IBUS_KEY_underscore, IBUS_KEY_odiaeresis, 0x022B, +IBUS_KEY_underscore, IBUS_KEY_udiaeresis, 0x01D6, +IBUS_KEY_underscore, 0x01EA, 0x01EC, +IBUS_KEY_underscore, 0x01EB, 0x01ED, +IBUS_KEY_underscore, 0x0226, 0x01E0, +IBUS_KEY_underscore, 0x0227, 0x01E1, +IBUS_KEY_underscore, 0x022E, 0x0230, +IBUS_KEY_underscore, 0x022F, 0x0231, +IBUS_KEY_underscore, IBUS_KEY_Cyrillic_i, 0x04E3, +IBUS_KEY_underscore, IBUS_KEY_Cyrillic_u, 0x04EF, +IBUS_KEY_underscore, IBUS_KEY_Cyrillic_I, 0x04E2, +IBUS_KEY_underscore, IBUS_KEY_Cyrillic_U, 0x04EE, +IBUS_KEY_underscore, IBUS_KEY_Greek_ALPHA, 0x1FB9, +IBUS_KEY_underscore, IBUS_KEY_Greek_IOTA, 0x1FD9, +IBUS_KEY_underscore, IBUS_KEY_Greek_UPSILON, 0x1FE9, +IBUS_KEY_underscore, IBUS_KEY_Greek_alpha, 0x1FB1, +IBUS_KEY_underscore, IBUS_KEY_Greek_iota, 0x1FD1, +IBUS_KEY_underscore, IBUS_KEY_Greek_upsilon, 0x1FE1, +IBUS_KEY_underscore, 0x1E36, 0x1E38, +IBUS_KEY_underscore, 0x1E37, 0x1E39, +IBUS_KEY_underscore, 0x1E5A, 0x1E5C, +IBUS_KEY_underscore, 0x1E5B, 0x1E5D, +IBUS_KEY_underscore, 0x2212, 0x208B, +IBUS_KEY_underscore, IBUS_KEY_KP_Space, 0x2082, +IBUS_KEY_underscore, IBUS_KEY_KP_Add, 0x208A, +IBUS_KEY_underscore, IBUS_KEY_KP_0, 0x2080, +IBUS_KEY_underscore, IBUS_KEY_KP_1, 0x2081, +IBUS_KEY_underscore, IBUS_KEY_KP_2, 0x2082, +IBUS_KEY_underscore, IBUS_KEY_KP_3, 0x2083, +IBUS_KEY_underscore, IBUS_KEY_KP_4, 0x2084, +IBUS_KEY_underscore, IBUS_KEY_KP_5, 0x2085, +IBUS_KEY_underscore, IBUS_KEY_KP_6, 0x2086, +IBUS_KEY_underscore, IBUS_KEY_KP_7, 0x2087, +IBUS_KEY_underscore, IBUS_KEY_KP_8, 0x2088, +IBUS_KEY_underscore, IBUS_KEY_KP_9, 0x2089, +IBUS_KEY_underscore, IBUS_KEY_KP_Equal, 0x208C, +IBUS_KEY_grave, IBUS_KEY_space, 0x0060, +IBUS_KEY_grave, IBUS_KEY_A, 0x00C0, +IBUS_KEY_grave, IBUS_KEY_E, 0x00C8, +IBUS_KEY_grave, IBUS_KEY_I, 0x00CC, +IBUS_KEY_grave, IBUS_KEY_N, 0x01F8, +IBUS_KEY_grave, IBUS_KEY_O, 0x00D2, +IBUS_KEY_grave, IBUS_KEY_U, 0x00D9, +IBUS_KEY_grave, IBUS_KEY_W, 0x1E80, +IBUS_KEY_grave, IBUS_KEY_Y, 0x1EF2, +IBUS_KEY_grave, IBUS_KEY_a, 0x00E0, +IBUS_KEY_grave, IBUS_KEY_e, 0x00E8, +IBUS_KEY_grave, IBUS_KEY_i, 0x00EC, +IBUS_KEY_grave, IBUS_KEY_n, 0x01F9, +IBUS_KEY_grave, IBUS_KEY_o, 0x00F2, +IBUS_KEY_grave, IBUS_KEY_u, 0x00F9, +IBUS_KEY_grave, IBUS_KEY_w, 0x1E81, +IBUS_KEY_grave, IBUS_KEY_y, 0x1EF3, +IBUS_KEY_grave, IBUS_KEY_Acircumflex, 0x1EA6, +IBUS_KEY_grave, IBUS_KEY_Ecircumflex, 0x1EC0, +IBUS_KEY_grave, IBUS_KEY_Ocircumflex, 0x1ED2, +IBUS_KEY_grave, IBUS_KEY_Udiaeresis, 0x01DB, +IBUS_KEY_grave, IBUS_KEY_acircumflex, 0x1EA7, +IBUS_KEY_grave, IBUS_KEY_ecircumflex, 0x1EC1, +IBUS_KEY_grave, IBUS_KEY_ocircumflex, 0x1ED3, +IBUS_KEY_grave, IBUS_KEY_udiaeresis, 0x01DC, +IBUS_KEY_grave, IBUS_KEY_Abreve, 0x1EB0, +IBUS_KEY_grave, IBUS_KEY_abreve, 0x1EB1, +IBUS_KEY_grave, IBUS_KEY_Emacron, 0x1E14, +IBUS_KEY_grave, IBUS_KEY_emacron, 0x1E15, +IBUS_KEY_grave, IBUS_KEY_Omacron, 0x1E50, +IBUS_KEY_grave, IBUS_KEY_omacron, 0x1E51, +IBUS_KEY_grave, IBUS_KEY_Cyrillic_ie, 0x0450, +IBUS_KEY_grave, IBUS_KEY_Cyrillic_i, 0x045D, +IBUS_KEY_grave, IBUS_KEY_Cyrillic_IE, 0x0400, +IBUS_KEY_grave, IBUS_KEY_Cyrillic_I, 0x040D, +IBUS_KEY_grave, IBUS_KEY_Greek_iotadieresis, 0x1FD2, +IBUS_KEY_grave, IBUS_KEY_Greek_upsilondieresis, 0x1FE2, +IBUS_KEY_grave, IBUS_KEY_Greek_ALPHA, 0x1FBA, +IBUS_KEY_grave, IBUS_KEY_Greek_EPSILON, 0x1FC8, +IBUS_KEY_grave, IBUS_KEY_Greek_ETA, 0x1FCA, +IBUS_KEY_grave, IBUS_KEY_Greek_IOTA, 0x1FDA, +IBUS_KEY_grave, IBUS_KEY_Greek_OMICRON, 0x1FF8, +IBUS_KEY_grave, IBUS_KEY_Greek_UPSILON, 0x1FEA, +IBUS_KEY_grave, IBUS_KEY_Greek_OMEGA, 0x1FFA, +IBUS_KEY_grave, IBUS_KEY_Greek_alpha, 0x1F70, +IBUS_KEY_grave, IBUS_KEY_Greek_epsilon, 0x1F72, +IBUS_KEY_grave, IBUS_KEY_Greek_eta, 0x1F74, +IBUS_KEY_grave, IBUS_KEY_Greek_iota, 0x1F76, +IBUS_KEY_grave, IBUS_KEY_Greek_omicron, 0x1F78, +IBUS_KEY_grave, IBUS_KEY_Greek_upsilon, 0x1F7A, +IBUS_KEY_grave, IBUS_KEY_Greek_omega, 0x1F7C, +IBUS_KEY_grave, 0x1F00, 0x1F02, +IBUS_KEY_grave, 0x1F01, 0x1F03, +IBUS_KEY_grave, 0x1F08, 0x1F0A, +IBUS_KEY_grave, 0x1F09, 0x1F0B, +IBUS_KEY_grave, 0x1F10, 0x1F12, +IBUS_KEY_grave, 0x1F11, 0x1F13, +IBUS_KEY_grave, 0x1F18, 0x1F1A, +IBUS_KEY_grave, 0x1F19, 0x1F1B, +IBUS_KEY_grave, 0x1F20, 0x1F22, +IBUS_KEY_grave, 0x1F21, 0x1F23, +IBUS_KEY_grave, 0x1F28, 0x1F2A, +IBUS_KEY_grave, 0x1F29, 0x1F2B, +IBUS_KEY_grave, 0x1F30, 0x1F32, +IBUS_KEY_grave, 0x1F31, 0x1F33, +IBUS_KEY_grave, 0x1F38, 0x1F3A, +IBUS_KEY_grave, 0x1F39, 0x1F3B, +IBUS_KEY_grave, 0x1F40, 0x1F42, +IBUS_KEY_grave, 0x1F41, 0x1F43, +IBUS_KEY_grave, 0x1F48, 0x1F4A, +IBUS_KEY_grave, 0x1F49, 0x1F4B, +IBUS_KEY_grave, 0x1F50, 0x1F52, +IBUS_KEY_grave, 0x1F51, 0x1F53, +IBUS_KEY_grave, 0x1F59, 0x1F5B, +IBUS_KEY_grave, 0x1F60, 0x1F62, +IBUS_KEY_grave, 0x1F61, 0x1F63, +IBUS_KEY_grave, 0x1F68, 0x1F6A, +IBUS_KEY_grave, 0x1F69, 0x1F6B, +IBUS_KEY_a, IBUS_KEY_quotedbl, 0x00E4, +IBUS_KEY_a, IBUS_KEY_apostrophe, 0x00E1, +IBUS_KEY_a, IBUS_KEY_parenleft, 0x0103, +IBUS_KEY_a, IBUS_KEY_asterisk, 0x00E5, +IBUS_KEY_a, IBUS_KEY_comma, 0x0105, +IBUS_KEY_a, IBUS_KEY_minus, 0x0101, +IBUS_KEY_a, IBUS_KEY_greater, 0x00E2, +IBUS_KEY_a, IBUS_KEY_asciicircum, 0x00E2, +IBUS_KEY_a, IBUS_KEY_underscore, 0x00AA, +IBUS_KEY_a, IBUS_KEY_grave, 0x00E0, +IBUS_KEY_a, IBUS_KEY_a, 0x00E5, +IBUS_KEY_a, IBUS_KEY_e, 0x00E6, +IBUS_KEY_a, IBUS_KEY_asciitilde, 0x00E3, +IBUS_KEY_a, IBUS_KEY_diaeresis, 0x00E4, +IBUS_KEY_a, IBUS_KEY_acute, 0x00E1, +IBUS_KEY_b, IBUS_KEY_period, 0x1E03, +IBUS_KEY_b, IBUS_KEY_A, 0x0102, +IBUS_KEY_b, IBUS_KEY_E, 0x0114, +IBUS_KEY_b, IBUS_KEY_G, 0x011E, +IBUS_KEY_b, IBUS_KEY_I, 0x012C, +IBUS_KEY_b, IBUS_KEY_O, 0x014E, +IBUS_KEY_b, IBUS_KEY_U, 0x016C, +IBUS_KEY_b, IBUS_KEY_a, 0x0103, +IBUS_KEY_b, IBUS_KEY_e, 0x0115, +IBUS_KEY_b, IBUS_KEY_g, 0x011F, +IBUS_KEY_b, IBUS_KEY_i, 0x012D, +IBUS_KEY_b, IBUS_KEY_o, 0x014F, +IBUS_KEY_b, IBUS_KEY_u, 0x016D, +IBUS_KEY_b, 0x0228, 0x1E1C, +IBUS_KEY_b, 0x0229, 0x1E1D, +IBUS_KEY_b, IBUS_KEY_Cyrillic_a, 0x04D1, +IBUS_KEY_b, IBUS_KEY_Cyrillic_ie, 0x04D7, +IBUS_KEY_b, IBUS_KEY_Cyrillic_i, 0x0439, +IBUS_KEY_b, IBUS_KEY_Cyrillic_u, 0x045E, +IBUS_KEY_b, IBUS_KEY_Cyrillic_zhe, 0x04C2, +IBUS_KEY_b, IBUS_KEY_Cyrillic_A, 0x04D0, +IBUS_KEY_b, IBUS_KEY_Cyrillic_IE, 0x04D6, +IBUS_KEY_b, IBUS_KEY_Cyrillic_I, 0x0419, +IBUS_KEY_b, IBUS_KEY_Cyrillic_U, 0x040E, +IBUS_KEY_b, IBUS_KEY_Cyrillic_ZHE, 0x04C1, +IBUS_KEY_b, IBUS_KEY_Greek_ALPHA, 0x1FB8, +IBUS_KEY_b, IBUS_KEY_Greek_IOTA, 0x1FD8, +IBUS_KEY_b, IBUS_KEY_Greek_UPSILON, 0x1FE8, +IBUS_KEY_b, IBUS_KEY_Greek_alpha, 0x1FB0, +IBUS_KEY_b, IBUS_KEY_Greek_iota, 0x1FD0, +IBUS_KEY_b, IBUS_KEY_Greek_upsilon, 0x1FE0, +IBUS_KEY_b, 0x1EA0, 0x1EB6, +IBUS_KEY_b, 0x1EA1, 0x1EB7, +IBUS_KEY_c, IBUS_KEY_apostrophe, 0x0107, +IBUS_KEY_c, IBUS_KEY_comma, 0x00E7, +IBUS_KEY_c, IBUS_KEY_period, 0x010B, +IBUS_KEY_c, IBUS_KEY_slash, 0x00A2, +IBUS_KEY_c, IBUS_KEY_0, 0x00A9, +IBUS_KEY_c, IBUS_KEY_less, 0x010D, +IBUS_KEY_c, IBUS_KEY_equal, 0x20AC, +IBUS_KEY_c, IBUS_KEY_A, 0x01CD, +IBUS_KEY_c, IBUS_KEY_C, 0x010C, +IBUS_KEY_c, IBUS_KEY_D, 0x010E, +IBUS_KEY_c, IBUS_KEY_E, 0x011A, +IBUS_KEY_c, IBUS_KEY_G, 0x01E6, +IBUS_KEY_c, IBUS_KEY_H, 0x021E, +IBUS_KEY_c, IBUS_KEY_I, 0x01CF, +IBUS_KEY_c, IBUS_KEY_K, 0x01E8, +IBUS_KEY_c, IBUS_KEY_L, 0x013D, +IBUS_KEY_c, IBUS_KEY_N, 0x0147, +IBUS_KEY_c, IBUS_KEY_O, 0x01D1, +IBUS_KEY_c, IBUS_KEY_R, 0x0158, +IBUS_KEY_c, IBUS_KEY_S, 0x0160, +IBUS_KEY_c, IBUS_KEY_T, 0x0164, +IBUS_KEY_c, IBUS_KEY_U, 0x01D3, +IBUS_KEY_c, IBUS_KEY_Z, 0x017D, +IBUS_KEY_c, IBUS_KEY_a, 0x01CE, +IBUS_KEY_c, IBUS_KEY_c, 0x010D, +IBUS_KEY_c, IBUS_KEY_d, 0x010F, +IBUS_KEY_c, IBUS_KEY_e, 0x011B, +IBUS_KEY_c, IBUS_KEY_g, 0x01E7, +IBUS_KEY_c, IBUS_KEY_h, 0x021F, +IBUS_KEY_c, IBUS_KEY_i, 0x01D0, +IBUS_KEY_c, IBUS_KEY_j, 0x01F0, +IBUS_KEY_c, IBUS_KEY_k, 0x01E9, +IBUS_KEY_c, IBUS_KEY_l, 0x013E, +IBUS_KEY_c, IBUS_KEY_n, 0x0148, +IBUS_KEY_c, IBUS_KEY_o, 0x01D2, +IBUS_KEY_c, IBUS_KEY_r, 0x0159, +IBUS_KEY_c, IBUS_KEY_s, 0x0161, +IBUS_KEY_c, IBUS_KEY_t, 0x0165, +IBUS_KEY_c, IBUS_KEY_u, 0x01D4, +IBUS_KEY_c, IBUS_KEY_z, 0x017E, +IBUS_KEY_c, IBUS_KEY_bar, 0x00A2, +IBUS_KEY_c, IBUS_KEY_Udiaeresis, 0x01D9, +IBUS_KEY_c, IBUS_KEY_udiaeresis, 0x01DA, +IBUS_KEY_c, 0x01B7, 0x01EE, +IBUS_KEY_c, 0x0292, 0x01EF, +IBUS_KEY_d, IBUS_KEY_minus, 0x20AB, +IBUS_KEY_d, IBUS_KEY_period, 0x1E0B, +IBUS_KEY_d, IBUS_KEY_less, 0x010F, +IBUS_KEY_d, IBUS_KEY_h, 0x00F0, +IBUS_KEY_e, IBUS_KEY_quotedbl, 0x00EB, +IBUS_KEY_e, IBUS_KEY_apostrophe, 0x00E9, +IBUS_KEY_e, IBUS_KEY_comma, 0x0119, +IBUS_KEY_e, IBUS_KEY_minus, 0x0113, +IBUS_KEY_e, IBUS_KEY_period, 0x0117, +IBUS_KEY_e, IBUS_KEY_less, 0x011B, +IBUS_KEY_e, IBUS_KEY_equal, 0x20AC, +IBUS_KEY_e, IBUS_KEY_greater, 0x00EA, +IBUS_KEY_e, IBUS_KEY_asciicircum, 0x00EA, +IBUS_KEY_e, IBUS_KEY_underscore, 0x0113, +IBUS_KEY_e, IBUS_KEY_grave, 0x00E8, +IBUS_KEY_e, IBUS_KEY_e, 0x0259, +IBUS_KEY_e, IBUS_KEY_diaeresis, 0x00EB, +IBUS_KEY_e, IBUS_KEY_acute, 0x00E9, +IBUS_KEY_f, IBUS_KEY_period, 0x1E1F, +IBUS_KEY_f, IBUS_KEY_S, 0x017F, +IBUS_KEY_f, IBUS_KEY_s, 0x017F, +IBUS_KEY_g, IBUS_KEY_parenleft, 0x011F, +IBUS_KEY_g, IBUS_KEY_comma, 0x0123, +IBUS_KEY_g, IBUS_KEY_period, 0x0121, +IBUS_KEY_g, IBUS_KEY_U, 0x011F, +IBUS_KEY_g, IBUS_KEY_breve, 0x011F, +IBUS_KEY_i, IBUS_KEY_quotedbl, 0x00EF, +IBUS_KEY_i, IBUS_KEY_apostrophe, 0x00ED, +IBUS_KEY_i, IBUS_KEY_comma, 0x012F, +IBUS_KEY_i, IBUS_KEY_minus, 0x012B, +IBUS_KEY_i, IBUS_KEY_period, 0x0131, +IBUS_KEY_i, IBUS_KEY_greater, 0x00EE, +IBUS_KEY_i, IBUS_KEY_asciicircum, 0x00EE, +IBUS_KEY_i, IBUS_KEY_underscore, 0x012B, +IBUS_KEY_i, IBUS_KEY_grave, 0x00EC, +IBUS_KEY_i, IBUS_KEY_asciitilde, 0x0129, +IBUS_KEY_i, IBUS_KEY_diaeresis, 0x00EF, +IBUS_KEY_i, IBUS_KEY_acute, 0x00ED, +IBUS_KEY_k, IBUS_KEY_comma, 0x0137, +IBUS_KEY_k, IBUS_KEY_k, 0x0138, +IBUS_KEY_l, IBUS_KEY_apostrophe, 0x013A, +IBUS_KEY_l, IBUS_KEY_comma, 0x013C, +IBUS_KEY_l, IBUS_KEY_minus, 0x00A3, +IBUS_KEY_l, IBUS_KEY_slash, 0x0142, +IBUS_KEY_l, IBUS_KEY_less, 0x013E, +IBUS_KEY_l, IBUS_KEY_equal, 0x00A3, +IBUS_KEY_l, IBUS_KEY_v, 0x007C, +IBUS_KEY_m, IBUS_KEY_period, 0x1E41, +IBUS_KEY_m, IBUS_KEY_slash, 0x20A5, +IBUS_KEY_m, IBUS_KEY_u, 0x00B5, +IBUS_KEY_n, IBUS_KEY_apostrophe, 0x0144, +IBUS_KEY_n, IBUS_KEY_comma, 0x0146, +IBUS_KEY_n, IBUS_KEY_minus, 0x00F1, +IBUS_KEY_n, IBUS_KEY_less, 0x0148, +IBUS_KEY_n, IBUS_KEY_g, 0x014B, +IBUS_KEY_n, IBUS_KEY_asciitilde, 0x00F1, +IBUS_KEY_o, IBUS_KEY_quotedbl, 0x00F6, +IBUS_KEY_o, IBUS_KEY_apostrophe, 0x00F3, +IBUS_KEY_o, IBUS_KEY_minus, 0x014D, +IBUS_KEY_o, IBUS_KEY_slash, 0x00F8, +IBUS_KEY_o, IBUS_KEY_greater, 0x00F4, +IBUS_KEY_o, IBUS_KEY_A, 0x00C5, +IBUS_KEY_o, IBUS_KEY_C, 0x00A9, +IBUS_KEY_o, IBUS_KEY_R, 0x00AE, +IBUS_KEY_o, IBUS_KEY_U, 0x016E, +IBUS_KEY_o, IBUS_KEY_X, 0x00A4, +IBUS_KEY_o, IBUS_KEY_asciicircum, 0x00F4, +IBUS_KEY_o, IBUS_KEY_underscore, 0x00BA, +IBUS_KEY_o, IBUS_KEY_grave, 0x00F2, +IBUS_KEY_o, IBUS_KEY_a, 0x00E5, +IBUS_KEY_o, IBUS_KEY_c, 0x00A9, +IBUS_KEY_o, IBUS_KEY_e, 0x0153, +IBUS_KEY_o, IBUS_KEY_o, 0x00B0, +IBUS_KEY_o, IBUS_KEY_r, 0x00AE, +IBUS_KEY_o, IBUS_KEY_s, 0x00A7, +IBUS_KEY_o, IBUS_KEY_u, 0x016F, +IBUS_KEY_o, IBUS_KEY_w, 0x1E98, +IBUS_KEY_o, IBUS_KEY_x, 0x00A4, +IBUS_KEY_o, IBUS_KEY_y, 0x1E99, +IBUS_KEY_o, IBUS_KEY_asciitilde, 0x00F5, +IBUS_KEY_o, IBUS_KEY_diaeresis, 0x00F6, +IBUS_KEY_o, IBUS_KEY_acute, 0x00F3, +IBUS_KEY_p, IBUS_KEY_exclam, 0x00B6, +IBUS_KEY_p, IBUS_KEY_period, 0x1E57, +IBUS_KEY_r, IBUS_KEY_apostrophe, 0x0155, +IBUS_KEY_r, IBUS_KEY_comma, 0x0157, +IBUS_KEY_r, IBUS_KEY_less, 0x0159, +IBUS_KEY_s, IBUS_KEY_exclam, 0x00A7, +IBUS_KEY_s, IBUS_KEY_apostrophe, 0x015B, +IBUS_KEY_s, IBUS_KEY_comma, 0x015F, +IBUS_KEY_s, IBUS_KEY_period, 0x1E61, +IBUS_KEY_s, IBUS_KEY_0, 0x00A7, +IBUS_KEY_s, IBUS_KEY_1, 0x00B9, +IBUS_KEY_s, IBUS_KEY_2, 0x00B2, +IBUS_KEY_s, IBUS_KEY_3, 0x00B3, +IBUS_KEY_s, IBUS_KEY_less, 0x0161, +IBUS_KEY_s, IBUS_KEY_M, 0x2120, +IBUS_KEY_s, IBUS_KEY_m, 0x2120, +IBUS_KEY_s, IBUS_KEY_o, 0x00A7, +IBUS_KEY_s, IBUS_KEY_s, 0x00DF, +IBUS_KEY_s, IBUS_KEY_cedilla, 0x015F, +IBUS_KEY_t, IBUS_KEY_minus, 0x0167, +IBUS_KEY_t, IBUS_KEY_period, 0x1E6B, +IBUS_KEY_t, IBUS_KEY_slash, 0x0167, +IBUS_KEY_t, IBUS_KEY_less, 0x0165, +IBUS_KEY_t, IBUS_KEY_M, 0x2122, +IBUS_KEY_t, IBUS_KEY_h, 0x00FE, +IBUS_KEY_t, IBUS_KEY_m, 0x2122, +IBUS_KEY_u, IBUS_KEY_quotedbl, 0x00FC, +IBUS_KEY_u, IBUS_KEY_apostrophe, 0x00FA, +IBUS_KEY_u, IBUS_KEY_asterisk, 0x016F, +IBUS_KEY_u, IBUS_KEY_comma, 0x0173, +IBUS_KEY_u, IBUS_KEY_minus, 0x016B, +IBUS_KEY_u, IBUS_KEY_slash, 0x00B5, +IBUS_KEY_u, IBUS_KEY_greater, 0x00FB, +IBUS_KEY_u, IBUS_KEY_asciicircum, 0x00FB, +IBUS_KEY_u, IBUS_KEY_underscore, 0x016B, +IBUS_KEY_u, IBUS_KEY_grave, 0x00F9, +IBUS_KEY_u, IBUS_KEY_u, 0x016D, +IBUS_KEY_u, IBUS_KEY_asciitilde, 0x0169, +IBUS_KEY_u, IBUS_KEY_diaeresis, 0x00FC, +IBUS_KEY_u, IBUS_KEY_acute, 0x00FA, +IBUS_KEY_v, IBUS_KEY_Z, 0x017D, +IBUS_KEY_v, IBUS_KEY_l, 0x007C, +IBUS_KEY_v, IBUS_KEY_z, 0x017E, +IBUS_KEY_w, IBUS_KEY_asciicircum, 0x0175, +IBUS_KEY_x, IBUS_KEY_0, 0x00A4, +IBUS_KEY_x, IBUS_KEY_O, 0x00A4, +IBUS_KEY_x, IBUS_KEY_o, 0x00A4, +IBUS_KEY_x, IBUS_KEY_x, 0x00D7, +IBUS_KEY_y, IBUS_KEY_quotedbl, 0x00FF, +IBUS_KEY_y, IBUS_KEY_apostrophe, 0x00FD, +IBUS_KEY_y, IBUS_KEY_minus, 0x00A5, +IBUS_KEY_y, IBUS_KEY_equal, 0x00A5, +IBUS_KEY_y, IBUS_KEY_asciicircum, 0x0177, +IBUS_KEY_y, IBUS_KEY_diaeresis, 0x00FF, +IBUS_KEY_y, IBUS_KEY_acute, 0x00FD, +IBUS_KEY_z, IBUS_KEY_apostrophe, 0x017A, +IBUS_KEY_z, IBUS_KEY_period, 0x017C, +IBUS_KEY_z, IBUS_KEY_less, 0x017E, +IBUS_KEY_bar, IBUS_KEY_C, 0x00A2, +IBUS_KEY_bar, IBUS_KEY_c, 0x00A2, +IBUS_KEY_asciitilde, IBUS_KEY_space, 0x007E, +IBUS_KEY_asciitilde, IBUS_KEY_A, 0x00C3, +IBUS_KEY_asciitilde, IBUS_KEY_E, 0x1EBC, +IBUS_KEY_asciitilde, IBUS_KEY_I, 0x0128, +IBUS_KEY_asciitilde, IBUS_KEY_N, 0x00D1, +IBUS_KEY_asciitilde, IBUS_KEY_O, 0x00D5, +IBUS_KEY_asciitilde, IBUS_KEY_U, 0x0168, +IBUS_KEY_asciitilde, IBUS_KEY_V, 0x1E7C, +IBUS_KEY_asciitilde, IBUS_KEY_Y, 0x1EF8, +IBUS_KEY_asciitilde, IBUS_KEY_a, 0x00E3, +IBUS_KEY_asciitilde, IBUS_KEY_e, 0x1EBD, +IBUS_KEY_asciitilde, IBUS_KEY_i, 0x0129, +IBUS_KEY_asciitilde, IBUS_KEY_n, 0x00F1, +IBUS_KEY_asciitilde, IBUS_KEY_o, 0x00F5, +IBUS_KEY_asciitilde, IBUS_KEY_u, 0x0169, +IBUS_KEY_asciitilde, IBUS_KEY_v, 0x1E7D, +IBUS_KEY_asciitilde, IBUS_KEY_y, 0x1EF9, +IBUS_KEY_asciitilde, IBUS_KEY_Acircumflex, 0x1EAA, +IBUS_KEY_asciitilde, IBUS_KEY_Ecircumflex, 0x1EC4, +IBUS_KEY_asciitilde, IBUS_KEY_Ocircumflex, 0x1ED6, +IBUS_KEY_asciitilde, IBUS_KEY_acircumflex, 0x1EAB, +IBUS_KEY_asciitilde, IBUS_KEY_ecircumflex, 0x1EC5, +IBUS_KEY_asciitilde, IBUS_KEY_ocircumflex, 0x1ED7, +IBUS_KEY_asciitilde, IBUS_KEY_Abreve, 0x1EB4, +IBUS_KEY_asciitilde, IBUS_KEY_abreve, 0x1EB5, +IBUS_KEY_asciitilde, IBUS_KEY_Greek_iotadieresis, 0x1FD7, +IBUS_KEY_asciitilde, IBUS_KEY_Greek_upsilondieresis, 0x1FE7, +IBUS_KEY_asciitilde, IBUS_KEY_Greek_alpha, 0x1FB6, +IBUS_KEY_asciitilde, IBUS_KEY_Greek_eta, 0x1FC6, +IBUS_KEY_asciitilde, IBUS_KEY_Greek_iota, 0x1FD6, +IBUS_KEY_asciitilde, IBUS_KEY_Greek_upsilon, 0x1FE6, +IBUS_KEY_asciitilde, IBUS_KEY_Greek_omega, 0x1FF6, +IBUS_KEY_asciitilde, 0x1F00, 0x1F06, +IBUS_KEY_asciitilde, 0x1F01, 0x1F07, +IBUS_KEY_asciitilde, 0x1F08, 0x1F0E, +IBUS_KEY_asciitilde, 0x1F09, 0x1F0F, +IBUS_KEY_asciitilde, 0x1F20, 0x1F26, +IBUS_KEY_asciitilde, 0x1F21, 0x1F27, +IBUS_KEY_asciitilde, 0x1F28, 0x1F2E, +IBUS_KEY_asciitilde, 0x1F29, 0x1F2F, +IBUS_KEY_asciitilde, 0x1F30, 0x1F36, +IBUS_KEY_asciitilde, 0x1F31, 0x1F37, +IBUS_KEY_asciitilde, 0x1F38, 0x1F3E, +IBUS_KEY_asciitilde, 0x1F39, 0x1F3F, +IBUS_KEY_asciitilde, 0x1F50, 0x1F56, +IBUS_KEY_asciitilde, 0x1F51, 0x1F57, +IBUS_KEY_asciitilde, 0x1F59, 0x1F5F, +IBUS_KEY_asciitilde, 0x1F60, 0x1F66, +IBUS_KEY_asciitilde, 0x1F61, 0x1F67, +IBUS_KEY_asciitilde, 0x1F68, 0x1F6E, +IBUS_KEY_asciitilde, 0x1F69, 0x1F6F, +IBUS_KEY_diaeresis, IBUS_KEY_apostrophe, 0x0385, +IBUS_KEY_diaeresis, IBUS_KEY_A, 0x00C4, +IBUS_KEY_diaeresis, IBUS_KEY_E, 0x00CB, +IBUS_KEY_diaeresis, IBUS_KEY_I, 0x00CF, +IBUS_KEY_diaeresis, IBUS_KEY_O, 0x00D6, +IBUS_KEY_diaeresis, IBUS_KEY_U, 0x00DC, +IBUS_KEY_diaeresis, IBUS_KEY_Y, 0x0178, +IBUS_KEY_diaeresis, IBUS_KEY_grave, 0x1FED, +IBUS_KEY_diaeresis, IBUS_KEY_a, 0x00E4, +IBUS_KEY_diaeresis, IBUS_KEY_e, 0x00EB, +IBUS_KEY_diaeresis, IBUS_KEY_i, 0x00EF, +IBUS_KEY_diaeresis, IBUS_KEY_o, 0x00F6, +IBUS_KEY_diaeresis, IBUS_KEY_u, 0x00FC, +IBUS_KEY_diaeresis, IBUS_KEY_y, 0x00FF, +IBUS_KEY_diaeresis, IBUS_KEY_asciitilde, 0x1FC1, +IBUS_KEY_diaeresis, IBUS_KEY_acute, 0x0385, +IBUS_KEY_diaeresis, IBUS_KEY_dead_grave, 0x1FED, +IBUS_KEY_diaeresis, IBUS_KEY_dead_acute, 0x0385, +IBUS_KEY_diaeresis, IBUS_KEY_dead_tilde, 0x1FC1, +IBUS_KEY_macron, IBUS_KEY_A, 0x0100, +IBUS_KEY_macron, IBUS_KEY_E, 0x0112, +IBUS_KEY_macron, IBUS_KEY_G, 0x1E20, +IBUS_KEY_macron, IBUS_KEY_I, 0x012A, +IBUS_KEY_macron, IBUS_KEY_O, 0x014C, +IBUS_KEY_macron, IBUS_KEY_U, 0x016A, +IBUS_KEY_macron, IBUS_KEY_Y, 0x0232, +IBUS_KEY_macron, IBUS_KEY_a, 0x0101, +IBUS_KEY_macron, IBUS_KEY_e, 0x0113, +IBUS_KEY_macron, IBUS_KEY_g, 0x1E21, +IBUS_KEY_macron, IBUS_KEY_i, 0x012B, +IBUS_KEY_macron, IBUS_KEY_o, 0x014D, +IBUS_KEY_macron, IBUS_KEY_u, 0x016B, +IBUS_KEY_macron, IBUS_KEY_y, 0x0233, +IBUS_KEY_macron, IBUS_KEY_Adiaeresis, 0x01DE, +IBUS_KEY_macron, IBUS_KEY_AE, 0x01E2, +IBUS_KEY_macron, IBUS_KEY_Otilde, 0x022C, +IBUS_KEY_macron, IBUS_KEY_Odiaeresis, 0x022A, +IBUS_KEY_macron, IBUS_KEY_Udiaeresis, 0x01D5, +IBUS_KEY_macron, IBUS_KEY_adiaeresis, 0x01DF, +IBUS_KEY_macron, IBUS_KEY_ae, 0x01E3, +IBUS_KEY_macron, IBUS_KEY_otilde, 0x022D, +IBUS_KEY_macron, IBUS_KEY_odiaeresis, 0x022B, +IBUS_KEY_macron, IBUS_KEY_udiaeresis, 0x01D6, +IBUS_KEY_macron, 0x01EA, 0x01EC, +IBUS_KEY_macron, 0x01EB, 0x01ED, +IBUS_KEY_macron, 0x0226, 0x01E0, +IBUS_KEY_macron, 0x0227, 0x01E1, +IBUS_KEY_macron, 0x022E, 0x0230, +IBUS_KEY_macron, 0x022F, 0x0231, +IBUS_KEY_macron, IBUS_KEY_Cyrillic_i, 0x04E3, +IBUS_KEY_macron, IBUS_KEY_Cyrillic_u, 0x04EF, +IBUS_KEY_macron, IBUS_KEY_Cyrillic_I, 0x04E2, +IBUS_KEY_macron, IBUS_KEY_Cyrillic_U, 0x04EE, +IBUS_KEY_macron, IBUS_KEY_Greek_ALPHA, 0x1FB9, +IBUS_KEY_macron, IBUS_KEY_Greek_IOTA, 0x1FD9, +IBUS_KEY_macron, IBUS_KEY_Greek_UPSILON, 0x1FE9, +IBUS_KEY_macron, IBUS_KEY_Greek_alpha, 0x1FB1, +IBUS_KEY_macron, IBUS_KEY_Greek_iota, 0x1FD1, +IBUS_KEY_macron, IBUS_KEY_Greek_upsilon, 0x1FE1, +IBUS_KEY_macron, 0x1E36, 0x1E38, +IBUS_KEY_macron, 0x1E37, 0x1E39, +IBUS_KEY_macron, 0x1E5A, 0x1E5C, +IBUS_KEY_macron, 0x1E5B, 0x1E5D, +IBUS_KEY_acute, IBUS_KEY_A, 0x00C1, +IBUS_KEY_acute, IBUS_KEY_C, 0x0106, +IBUS_KEY_acute, IBUS_KEY_E, 0x00C9, +IBUS_KEY_acute, IBUS_KEY_G, 0x01F4, +IBUS_KEY_acute, IBUS_KEY_I, 0x00CD, +IBUS_KEY_acute, IBUS_KEY_K, 0x1E30, +IBUS_KEY_acute, IBUS_KEY_L, 0x0139, +IBUS_KEY_acute, IBUS_KEY_M, 0x1E3E, +IBUS_KEY_acute, IBUS_KEY_N, 0x0143, +IBUS_KEY_acute, IBUS_KEY_O, 0x00D3, +IBUS_KEY_acute, IBUS_KEY_P, 0x1E54, +IBUS_KEY_acute, IBUS_KEY_R, 0x0154, +IBUS_KEY_acute, IBUS_KEY_S, 0x015A, +IBUS_KEY_acute, IBUS_KEY_U, 0x00DA, +IBUS_KEY_acute, IBUS_KEY_W, 0x1E82, +IBUS_KEY_acute, IBUS_KEY_Y, 0x00DD, +IBUS_KEY_acute, IBUS_KEY_Z, 0x0179, +IBUS_KEY_acute, IBUS_KEY_a, 0x00E1, +IBUS_KEY_acute, IBUS_KEY_c, 0x0107, +IBUS_KEY_acute, IBUS_KEY_e, 0x00E9, +IBUS_KEY_acute, IBUS_KEY_g, 0x01F5, +IBUS_KEY_acute, IBUS_KEY_i, 0x00ED, +IBUS_KEY_acute, IBUS_KEY_k, 0x1E31, +IBUS_KEY_acute, IBUS_KEY_l, 0x013A, +IBUS_KEY_acute, IBUS_KEY_m, 0x1E3F, +IBUS_KEY_acute, IBUS_KEY_n, 0x0144, +IBUS_KEY_acute, IBUS_KEY_o, 0x00F3, +IBUS_KEY_acute, IBUS_KEY_p, 0x1E55, +IBUS_KEY_acute, IBUS_KEY_r, 0x0155, +IBUS_KEY_acute, IBUS_KEY_s, 0x015B, +IBUS_KEY_acute, IBUS_KEY_u, 0x00FA, +IBUS_KEY_acute, IBUS_KEY_w, 0x1E83, +IBUS_KEY_acute, IBUS_KEY_y, 0x00FD, +IBUS_KEY_acute, IBUS_KEY_z, 0x017A, +IBUS_KEY_acute, IBUS_KEY_Acircumflex, 0x1EA4, +IBUS_KEY_acute, IBUS_KEY_Aring, 0x01FA, +IBUS_KEY_acute, IBUS_KEY_AE, 0x01FC, +IBUS_KEY_acute, IBUS_KEY_Ccedilla, 0x1E08, +IBUS_KEY_acute, IBUS_KEY_Ecircumflex, 0x1EBE, +IBUS_KEY_acute, IBUS_KEY_Idiaeresis, 0x1E2E, +IBUS_KEY_acute, IBUS_KEY_Ocircumflex, 0x1ED0, +IBUS_KEY_acute, IBUS_KEY_Otilde, 0x1E4C, +IBUS_KEY_acute, IBUS_KEY_Ooblique, 0x01FE, +IBUS_KEY_acute, IBUS_KEY_Udiaeresis, 0x01D7, +IBUS_KEY_acute, IBUS_KEY_acircumflex, 0x1EA5, +IBUS_KEY_acute, IBUS_KEY_aring, 0x01FB, +IBUS_KEY_acute, IBUS_KEY_ae, 0x01FD, +IBUS_KEY_acute, IBUS_KEY_ccedilla, 0x1E09, +IBUS_KEY_acute, IBUS_KEY_ecircumflex, 0x1EBF, +IBUS_KEY_acute, IBUS_KEY_idiaeresis, 0x1E2F, +IBUS_KEY_acute, IBUS_KEY_ocircumflex, 0x1ED1, +IBUS_KEY_acute, IBUS_KEY_otilde, 0x1E4D, +IBUS_KEY_acute, IBUS_KEY_oslash, 0x01FF, +IBUS_KEY_acute, IBUS_KEY_udiaeresis, 0x01D8, +IBUS_KEY_acute, IBUS_KEY_Abreve, 0x1EAE, +IBUS_KEY_acute, IBUS_KEY_abreve, 0x1EAF, +IBUS_KEY_acute, IBUS_KEY_Emacron, 0x1E16, +IBUS_KEY_acute, IBUS_KEY_emacron, 0x1E17, +IBUS_KEY_acute, IBUS_KEY_Omacron, 0x1E52, +IBUS_KEY_acute, IBUS_KEY_Utilde, 0x1E78, +IBUS_KEY_acute, IBUS_KEY_omacron, 0x1E53, +IBUS_KEY_acute, IBUS_KEY_utilde, 0x1E79, +IBUS_KEY_acute, IBUS_KEY_Cyrillic_ghe, 0x0453, +IBUS_KEY_acute, IBUS_KEY_Cyrillic_ka, 0x045C, +IBUS_KEY_acute, IBUS_KEY_Cyrillic_GHE, 0x0403, +IBUS_KEY_acute, IBUS_KEY_Cyrillic_KA, 0x040C, +IBUS_KEY_acute, IBUS_KEY_Greek_iotadieresis, 0x0390, +IBUS_KEY_acute, IBUS_KEY_Greek_upsilondieresis, 0x03B0, +IBUS_KEY_acute, IBUS_KEY_Greek_ALPHA, 0x0386, +IBUS_KEY_acute, IBUS_KEY_Greek_EPSILON, 0x0388, +IBUS_KEY_acute, IBUS_KEY_Greek_ETA, 0x0389, +IBUS_KEY_acute, IBUS_KEY_Greek_IOTA, 0x038A, +IBUS_KEY_acute, IBUS_KEY_Greek_OMICRON, 0x038C, +IBUS_KEY_acute, IBUS_KEY_Greek_UPSILON, 0x038E, +IBUS_KEY_acute, IBUS_KEY_Greek_OMEGA, 0x038F, +IBUS_KEY_acute, IBUS_KEY_Greek_alpha, 0x03AC, +IBUS_KEY_acute, IBUS_KEY_Greek_epsilon, 0x03AD, +IBUS_KEY_acute, IBUS_KEY_Greek_eta, 0x03AE, +IBUS_KEY_acute, IBUS_KEY_Greek_iota, 0x03AF, +IBUS_KEY_acute, IBUS_KEY_Greek_omicron, 0x03CC, +IBUS_KEY_acute, IBUS_KEY_Greek_upsilon, 0x03CD, +IBUS_KEY_acute, IBUS_KEY_Greek_omega, 0x03CE, +IBUS_KEY_acute, 0x1F00, 0x1F04, +IBUS_KEY_acute, 0x1F01, 0x1F05, +IBUS_KEY_acute, 0x1F08, 0x1F0C, +IBUS_KEY_acute, 0x1F09, 0x1F0D, +IBUS_KEY_acute, 0x1F10, 0x1F14, +IBUS_KEY_acute, 0x1F11, 0x1F15, +IBUS_KEY_acute, 0x1F18, 0x1F1C, +IBUS_KEY_acute, 0x1F19, 0x1F1D, +IBUS_KEY_acute, 0x1F20, 0x1F24, +IBUS_KEY_acute, 0x1F21, 0x1F25, +IBUS_KEY_acute, 0x1F28, 0x1F2C, +IBUS_KEY_acute, 0x1F29, 0x1F2D, +IBUS_KEY_acute, 0x1F30, 0x1F34, +IBUS_KEY_acute, 0x1F31, 0x1F35, +IBUS_KEY_acute, 0x1F38, 0x1F3C, +IBUS_KEY_acute, 0x1F39, 0x1F3D, +IBUS_KEY_acute, 0x1F40, 0x1F44, +IBUS_KEY_acute, 0x1F41, 0x1F45, +IBUS_KEY_acute, 0x1F48, 0x1F4C, +IBUS_KEY_acute, 0x1F49, 0x1F4D, +IBUS_KEY_acute, 0x1F50, 0x1F54, +IBUS_KEY_acute, 0x1F51, 0x1F55, +IBUS_KEY_acute, 0x1F59, 0x1F5D, +IBUS_KEY_acute, 0x1F60, 0x1F64, +IBUS_KEY_acute, 0x1F61, 0x1F65, +IBUS_KEY_acute, 0x1F68, 0x1F6C, +IBUS_KEY_acute, 0x1F69, 0x1F6D, +IBUS_KEY_cedilla, IBUS_KEY_C, 0x00C7, +IBUS_KEY_cedilla, IBUS_KEY_D, 0x1E10, +IBUS_KEY_cedilla, IBUS_KEY_E, 0x0228, +IBUS_KEY_cedilla, IBUS_KEY_G, 0x0122, +IBUS_KEY_cedilla, IBUS_KEY_H, 0x1E28, +IBUS_KEY_cedilla, IBUS_KEY_K, 0x0136, +IBUS_KEY_cedilla, IBUS_KEY_L, 0x013B, +IBUS_KEY_cedilla, IBUS_KEY_N, 0x0145, +IBUS_KEY_cedilla, IBUS_KEY_R, 0x0156, +IBUS_KEY_cedilla, IBUS_KEY_S, 0x015E, +IBUS_KEY_cedilla, IBUS_KEY_T, 0x0162, +IBUS_KEY_cedilla, IBUS_KEY_c, 0x00E7, +IBUS_KEY_cedilla, IBUS_KEY_d, 0x1E11, +IBUS_KEY_cedilla, IBUS_KEY_e, 0x0229, +IBUS_KEY_cedilla, IBUS_KEY_g, 0x0123, +IBUS_KEY_cedilla, IBUS_KEY_h, 0x1E29, +IBUS_KEY_cedilla, IBUS_KEY_k, 0x0137, +IBUS_KEY_cedilla, IBUS_KEY_l, 0x013C, +IBUS_KEY_cedilla, IBUS_KEY_n, 0x0146, +IBUS_KEY_cedilla, IBUS_KEY_r, 0x0157, +IBUS_KEY_cedilla, IBUS_KEY_s, 0x015F, +IBUS_KEY_cedilla, IBUS_KEY_t, 0x0163, +IBUS_KEY_breve, IBUS_KEY_G, 0x011E, +IBUS_KEY_breve, IBUS_KEY_g, 0x011F, +0x05B4, IBUS_KEY_hebrew_yod, 0xFB1D, +0x05B7, 0x05F2, 0xFB1F, +0x05B7, IBUS_KEY_hebrew_aleph, 0xFB2E, +0x05B8, IBUS_KEY_hebrew_aleph, 0xFB2F, +0x05B9, IBUS_KEY_hebrew_waw, 0xFB4B, +0x05BC, IBUS_KEY_hebrew_aleph, 0xFB30, +0x05BC, IBUS_KEY_hebrew_beth, 0xFB31, +0x05BC, IBUS_KEY_hebrew_gimmel, 0xFB32, +0x05BC, IBUS_KEY_hebrew_daleth, 0xFB33, +0x05BC, IBUS_KEY_hebrew_he, 0xFB34, +0x05BC, IBUS_KEY_hebrew_waw, 0xFB35, +0x05BC, IBUS_KEY_hebrew_zayin, 0xFB36, +0x05BC, IBUS_KEY_hebrew_teth, 0xFB38, +0x05BC, IBUS_KEY_hebrew_yod, 0xFB39, +0x05BC, IBUS_KEY_hebrew_finalkaph, 0xFB3A, +0x05BC, IBUS_KEY_hebrew_kaph, 0xFB3B, +0x05BC, IBUS_KEY_hebrew_lamed, 0xFB3C, +0x05BC, IBUS_KEY_hebrew_mem, 0xFB3E, +0x05BC, IBUS_KEY_hebrew_nun, 0xFB40, +0x05BC, IBUS_KEY_hebrew_samekh, 0xFB41, +0x05BC, IBUS_KEY_hebrew_finalpe, 0xFB43, +0x05BC, IBUS_KEY_hebrew_pe, 0xFB44, +0x05BC, IBUS_KEY_hebrew_zadi, 0xFB46, +0x05BC, IBUS_KEY_hebrew_qoph, 0xFB47, +0x05BC, IBUS_KEY_hebrew_resh, 0xFB48, +0x05BC, IBUS_KEY_hebrew_shin, 0xFB49, +0x05BC, IBUS_KEY_hebrew_taw, 0xFB4A, +0x05BF, IBUS_KEY_hebrew_beth, 0xFB4C, +0x05BF, IBUS_KEY_hebrew_kaph, 0xFB4D, +0x05BF, IBUS_KEY_hebrew_pe, 0xFB4E, +0x05C1, IBUS_KEY_hebrew_shin, 0xFB2A, +0x05C1, 0xFB49, 0xFB2C, +0x05C2, IBUS_KEY_hebrew_shin, 0xFB2B, +0x05C2, 0xFB49, 0xFB2D, +0x0653, IBUS_KEY_Arabic_alef, 0x0622, +0x0654, IBUS_KEY_Arabic_alef, 0x0623, +0x0654, IBUS_KEY_Arabic_waw, 0x0624, +0x0654, IBUS_KEY_Arabic_yeh, 0x0626, +0x0654, 0x06C1, 0x06C2, +0x0654, 0x06D2, 0x06D3, +0x0654, 0x06D5, 0x06C0, +0x0655, IBUS_KEY_Arabic_alef, 0x0625, +IBUS_KEY_Cyrillic_pe, IBUS_KEY_Cyrillic_a, 0x00A7, +IBUS_KEY_Cyrillic_IE, IBUS_KEY_equal, 0x20AC, +IBUS_KEY_Cyrillic_EN, IBUS_KEY_Cyrillic_o, 0x2116, +IBUS_KEY_Cyrillic_EN, IBUS_KEY_Cyrillic_O, 0x2116, +IBUS_KEY_Cyrillic_ES, IBUS_KEY_equal, 0x20AC, +IBUS_KEY_Greek_ALPHA, IBUS_KEY_apostrophe, 0x0386, +IBUS_KEY_Greek_EPSILON, IBUS_KEY_apostrophe, 0x0388, +IBUS_KEY_Greek_ETA, IBUS_KEY_apostrophe, 0x0389, +IBUS_KEY_Greek_IOTA, IBUS_KEY_quotedbl, 0x03AA, +IBUS_KEY_Greek_IOTA, IBUS_KEY_apostrophe, 0x038A, +IBUS_KEY_Greek_OMICRON, IBUS_KEY_apostrophe, 0x038C, +IBUS_KEY_Greek_UPSILON, IBUS_KEY_quotedbl, 0x03AB, +IBUS_KEY_Greek_UPSILON, IBUS_KEY_apostrophe, 0x038E, +IBUS_KEY_Greek_OMEGA, IBUS_KEY_apostrophe, 0x038F, +IBUS_KEY_Greek_alpha, IBUS_KEY_apostrophe, 0x03AC, +IBUS_KEY_Greek_epsilon, IBUS_KEY_apostrophe, 0x03AD, +IBUS_KEY_Greek_eta, IBUS_KEY_apostrophe, 0x03AE, +IBUS_KEY_Greek_iota, IBUS_KEY_quotedbl, 0x03CA, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, 0x03AF, +IBUS_KEY_Greek_iota, IBUS_KEY_Greek_alphaaccent, 0x1FB4, +IBUS_KEY_Greek_iota, IBUS_KEY_Greek_etaaccent, 0x1FC4, +IBUS_KEY_Greek_iota, IBUS_KEY_Greek_omegaaccent, 0x1FF4, +IBUS_KEY_Greek_iota, IBUS_KEY_Greek_ALPHA, 0x1FBC, +IBUS_KEY_Greek_iota, IBUS_KEY_Greek_ETA, 0x1FCC, +IBUS_KEY_Greek_iota, IBUS_KEY_Greek_OMEGA, 0x1FFC, +IBUS_KEY_Greek_iota, IBUS_KEY_Greek_alpha, 0x1FB3, +IBUS_KEY_Greek_iota, IBUS_KEY_Greek_eta, 0x1FC3, +IBUS_KEY_Greek_iota, IBUS_KEY_Greek_omega, 0x1FF3, +IBUS_KEY_Greek_iota, 0x1F00, 0x1F80, +IBUS_KEY_Greek_iota, 0x1F01, 0x1F81, +IBUS_KEY_Greek_iota, 0x1F02, 0x1F82, +IBUS_KEY_Greek_iota, 0x1F03, 0x1F83, +IBUS_KEY_Greek_iota, 0x1F04, 0x1F84, +IBUS_KEY_Greek_iota, 0x1F05, 0x1F85, +IBUS_KEY_Greek_iota, 0x1F06, 0x1F86, +IBUS_KEY_Greek_iota, 0x1F07, 0x1F87, +IBUS_KEY_Greek_iota, 0x1F08, 0x1F88, +IBUS_KEY_Greek_iota, 0x1F09, 0x1F89, +IBUS_KEY_Greek_iota, 0x1F0A, 0x1F8A, +IBUS_KEY_Greek_iota, 0x1F0B, 0x1F8B, +IBUS_KEY_Greek_iota, 0x1F0C, 0x1F8C, +IBUS_KEY_Greek_iota, 0x1F0D, 0x1F8D, +IBUS_KEY_Greek_iota, 0x1F0E, 0x1F8E, +IBUS_KEY_Greek_iota, 0x1F0F, 0x1F8F, +IBUS_KEY_Greek_iota, 0x1F20, 0x1F90, +IBUS_KEY_Greek_iota, 0x1F21, 0x1F91, +IBUS_KEY_Greek_iota, 0x1F22, 0x1F92, +IBUS_KEY_Greek_iota, 0x1F23, 0x1F93, +IBUS_KEY_Greek_iota, 0x1F24, 0x1F94, +IBUS_KEY_Greek_iota, 0x1F25, 0x1F95, +IBUS_KEY_Greek_iota, 0x1F26, 0x1F96, +IBUS_KEY_Greek_iota, 0x1F27, 0x1F97, +IBUS_KEY_Greek_iota, 0x1F28, 0x1F98, +IBUS_KEY_Greek_iota, 0x1F29, 0x1F99, +IBUS_KEY_Greek_iota, 0x1F2A, 0x1F9A, +IBUS_KEY_Greek_iota, 0x1F2B, 0x1F9B, +IBUS_KEY_Greek_iota, 0x1F2C, 0x1F9C, +IBUS_KEY_Greek_iota, 0x1F2D, 0x1F9D, +IBUS_KEY_Greek_iota, 0x1F2E, 0x1F9E, +IBUS_KEY_Greek_iota, 0x1F2F, 0x1F9F, +IBUS_KEY_Greek_iota, 0x1F60, 0x1FA0, +IBUS_KEY_Greek_iota, 0x1F61, 0x1FA1, +IBUS_KEY_Greek_iota, 0x1F62, 0x1FA2, +IBUS_KEY_Greek_iota, 0x1F63, 0x1FA3, +IBUS_KEY_Greek_iota, 0x1F64, 0x1FA4, +IBUS_KEY_Greek_iota, 0x1F65, 0x1FA5, +IBUS_KEY_Greek_iota, 0x1F66, 0x1FA6, +IBUS_KEY_Greek_iota, 0x1F67, 0x1FA7, +IBUS_KEY_Greek_iota, 0x1F68, 0x1FA8, +IBUS_KEY_Greek_iota, 0x1F69, 0x1FA9, +IBUS_KEY_Greek_iota, 0x1F6A, 0x1FAA, +IBUS_KEY_Greek_iota, 0x1F6B, 0x1FAB, +IBUS_KEY_Greek_iota, 0x1F6C, 0x1FAC, +IBUS_KEY_Greek_iota, 0x1F6D, 0x1FAD, +IBUS_KEY_Greek_iota, 0x1F6E, 0x1FAE, +IBUS_KEY_Greek_iota, 0x1F6F, 0x1FAF, +IBUS_KEY_Greek_iota, 0x1F70, 0x1FB2, +IBUS_KEY_Greek_iota, 0x1F74, 0x1FC2, +IBUS_KEY_Greek_iota, 0x1F7C, 0x1FF2, +IBUS_KEY_Greek_iota, 0x1FB6, 0x1FB7, +IBUS_KEY_Greek_iota, 0x1FC6, 0x1FC7, +IBUS_KEY_Greek_iota, 0x1FF6, 0x1FF7, +IBUS_KEY_Greek_omicron, IBUS_KEY_apostrophe, 0x03CC, +IBUS_KEY_Greek_upsilon, IBUS_KEY_quotedbl, 0x03CB, +IBUS_KEY_Greek_upsilon, IBUS_KEY_apostrophe, 0x03CD, +IBUS_KEY_Greek_omega, IBUS_KEY_apostrophe, 0x03CE, +IBUS_KEY_lessthanequal, 0x0338, 0x2270, +IBUS_KEY_greaterthanequal, 0x0338, 0x2271, +IBUS_KEY_approximate, 0x0338, 0x2247, +IBUS_KEY_identical, 0x0338, 0x2262, +IBUS_KEY_includedin, 0x0338, 0x2284, +IBUS_KEY_includes, 0x0338, 0x2285, +0x093C, 0x0915, 0x0958, +0x093C, 0x0916, 0x0959, +0x093C, 0x0917, 0x095A, +0x093C, 0x091C, 0x095B, +0x093C, 0x0921, 0x095C, +0x093C, 0x0922, 0x095D, +0x093C, 0x0928, 0x0929, +0x093C, 0x092B, 0x095E, +0x093C, 0x092F, 0x095F, +0x093C, 0x0930, 0x0931, +0x093C, 0x0933, 0x0934, +0x09BC, 0x09A1, 0x09DC, +0x09BC, 0x09A2, 0x09DD, +0x09BC, 0x09AF, 0x09DF, +0x09C7, 0x09BE, 0x09CB, +0x09C7, 0x09D7, 0x09CC, +0x0A3C, 0x0A16, 0x0A59, +0x0A3C, 0x0A17, 0x0A5A, +0x0A3C, 0x0A1C, 0x0A5B, +0x0A3C, 0x0A2B, 0x0A5E, +0x0A3C, 0x0A32, 0x0A33, +0x0A3C, 0x0A38, 0x0A36, +0x0B3C, 0x0B21, 0x0B5C, +0x0B3C, 0x0B22, 0x0B5D, +0x0B47, 0x0B3E, 0x0B4B, +0x0B47, 0x0B56, 0x0B48, +0x0B47, 0x0B57, 0x0B4C, +IBUS_KEY_leftcaret, 0x0338, 0x226E, +IBUS_KEY_rightcaret, 0x0338, 0x226F, +IBUS_KEY_underbar, IBUS_KEY_parenleft, 0x208D, +IBUS_KEY_underbar, IBUS_KEY_parenright, 0x208E, +IBUS_KEY_underbar, IBUS_KEY_plus, 0x208A, +IBUS_KEY_underbar, IBUS_KEY_0, 0x2080, +IBUS_KEY_underbar, IBUS_KEY_1, 0x2081, +IBUS_KEY_underbar, IBUS_KEY_2, 0x2082, +IBUS_KEY_underbar, IBUS_KEY_3, 0x2083, +IBUS_KEY_underbar, IBUS_KEY_4, 0x2084, +IBUS_KEY_underbar, IBUS_KEY_5, 0x2085, +IBUS_KEY_underbar, IBUS_KEY_6, 0x2086, +IBUS_KEY_underbar, IBUS_KEY_7, 0x2087, +IBUS_KEY_underbar, IBUS_KEY_8, 0x2088, +IBUS_KEY_underbar, IBUS_KEY_9, 0x2089, +IBUS_KEY_underbar, IBUS_KEY_equal, 0x208C, +0x0BC6, 0x0BBE, 0x0BCA, +0x0BC6, 0x0BD7, 0x0BCC, +IBUS_KEY_underbar, 0x2212, 0x208B, +IBUS_KEY_underbar, IBUS_KEY_KP_Space, 0x2082, +IBUS_KEY_underbar, IBUS_KEY_KP_Add, 0x208A, +IBUS_KEY_underbar, IBUS_KEY_KP_0, 0x2080, +IBUS_KEY_underbar, IBUS_KEY_KP_1, 0x2081, +IBUS_KEY_underbar, IBUS_KEY_KP_2, 0x2082, +IBUS_KEY_underbar, IBUS_KEY_KP_3, 0x2083, +IBUS_KEY_underbar, IBUS_KEY_KP_4, 0x2084, +IBUS_KEY_underbar, IBUS_KEY_KP_5, 0x2085, +IBUS_KEY_underbar, IBUS_KEY_KP_6, 0x2086, +IBUS_KEY_underbar, IBUS_KEY_KP_7, 0x2087, +IBUS_KEY_underbar, IBUS_KEY_KP_8, 0x2088, +IBUS_KEY_underbar, IBUS_KEY_KP_9, 0x2089, +IBUS_KEY_underbar, IBUS_KEY_KP_Equal, 0x208C, +0x0BC7, 0x0BBE, 0x0BCB, +0x0BD7, 0x0B92, 0x0B94, +IBUS_KEY_rightshoe, 0x0338, 0x2285, +IBUS_KEY_leftshoe, 0x0338, 0x2284, +IBUS_KEY_righttack, 0x0338, 0x22AC, +0x0C46, 0x0C56, 0x0C48, +0x0CBF, 0x0CD5, 0x0CC0, +0x0CC6, 0x0CC2, 0x0CCA, +0x0CC6, 0x0CD5, 0x0CC7, +0x0CC6, 0x0CD6, 0x0CC8, +0x0CCA, 0x0CD5, 0x0CCB, +0x0D46, 0x0D3E, 0x0D4A, +0x0D46, 0x0D57, 0x0D4C, +0x0D47, 0x0D3E, 0x0D4B, +0x0DD9, 0x0DCA, 0x0DDA, +0x0DD9, 0x0DCF, 0x0DDC, +0x0DD9, 0x0DDF, 0x0DDE, +0x0DDC, 0x0DCA, 0x0DDD, +0x0F71, 0x0F72, 0x0F73, +0x0F71, 0x0F74, 0x0F75, +0x0F71, 0x0F80, 0x0F81, +0x0F90, 0x0FB5, 0x0FB9, +0x0F92, 0x0FB7, 0x0F93, +0x0F9C, 0x0FB7, 0x0F9D, +0x0FA1, 0x0FB7, 0x0FA2, +0x0FA6, 0x0FB7, 0x0FA7, +0x0FAB, 0x0FB7, 0x0FAC, +0x0FB2, 0x0F80, 0x0F76, +0x0FB3, 0x0F80, 0x0F78, +0x0FB5, 0x0F40, 0x0F69, +0x0FB7, 0x0F42, 0x0F43, +0x0FB7, 0x0F4C, 0x0F4D, +0x0FB7, 0x0F51, 0x0F52, +0x0FB7, 0x0F56, 0x0F57, +0x0FB7, 0x0F5B, 0x0F5C, +0x102E, 0x1025, 0x1026, +0x1100, 0x1100, 0x1101, +0x1102, 0x1100, 0x1113, +0x1102, 0x1102, 0x1114, +0x1102, 0x1103, 0x1115, +0x1102, 0x1107, 0x1116, +0x1103, 0x1100, 0x1117, +0x1103, 0x1103, 0x1104, +0x1105, 0x1102, 0x1118, +0x1105, 0x1105, 0x1119, +0x1105, 0x110B, 0x111B, +0x1105, 0x1112, 0x111A, +0x1106, 0x1107, 0x111C, +0x1106, 0x110B, 0x111D, +0x1107, 0x1100, 0x111E, +0x1107, 0x1102, 0x111F, +0x1107, 0x1103, 0x1120, +0x1107, 0x1107, 0x1108, +0x1107, 0x1109, 0x1121, +0x1107, 0x110A, 0x1125, +0x1107, 0x110B, 0x112B, +0x1107, 0x110C, 0x1127, +0x1107, 0x110E, 0x1128, +0x1107, 0x1110, 0x1129, +0x1107, 0x1111, 0x112A, +0x1107, 0x112B, 0x112C, +0x1107, 0x112D, 0x1122, +0x1107, 0x112F, 0x1123, +0x1107, 0x1132, 0x1124, +0x1107, 0x1136, 0x1126, +0x1108, 0x110B, 0x112C, +0x1109, 0x1100, 0x112D, +0x1109, 0x1102, 0x112E, +0x1109, 0x1103, 0x112F, +0x1109, 0x1105, 0x1130, +0x1109, 0x1106, 0x1131, +0x1109, 0x1107, 0x1132, +0x1109, 0x1109, 0x110A, +0x1109, 0x110A, 0x1134, +0x1109, 0x110B, 0x1135, +0x1109, 0x110C, 0x1136, +0x1109, 0x110E, 0x1137, +0x1109, 0x110F, 0x1138, +0x1109, 0x1110, 0x1139, +0x1109, 0x1111, 0x113A, +0x1109, 0x1112, 0x113B, +0x1109, 0x111E, 0x1133, +0x110A, 0x1109, 0x1134, +0x110B, 0x1100, 0x1141, +0x110B, 0x1103, 0x1142, +0x110B, 0x1106, 0x1143, +0x110B, 0x1107, 0x1144, +0x110B, 0x1109, 0x1145, +0x110B, 0x110B, 0x1147, +0x110B, 0x110C, 0x1148, +0x110B, 0x110E, 0x1149, +0x110B, 0x1110, 0x114A, +0x110B, 0x1111, 0x114B, +0x110B, 0x1140, 0x1146, +0x110C, 0x110B, 0x114D, +0x110C, 0x110C, 0x110D, +0x110E, 0x110F, 0x1152, +0x110E, 0x1112, 0x1153, +0x1111, 0x1107, 0x1156, +0x1111, 0x110B, 0x1157, +0x1112, 0x1112, 0x1158, +0x1121, 0x1100, 0x1122, +0x1121, 0x1103, 0x1123, +0x1121, 0x1107, 0x1124, +0x1121, 0x1109, 0x1125, +0x1121, 0x110C, 0x1126, +0x1132, 0x1100, 0x1133, +0x113C, 0x113C, 0x113D, +0x113E, 0x113E, 0x113F, +0x114E, 0x114E, 0x114F, +0x1150, 0x1150, 0x1151, +0x1161, 0x1169, 0x1176, +0x1161, 0x116E, 0x1177, +0x1161, 0x1175, 0x1162, +0x1163, 0x1169, 0x1178, +0x1163, 0x116D, 0x1179, +0x1163, 0x1175, 0x1164, +0x1165, 0x1169, 0x117A, +0x1165, 0x116E, 0x117B, +0x1165, 0x1173, 0x117C, +0x1165, 0x1175, 0x1166, +0x1167, 0x1169, 0x117D, +0x1167, 0x116E, 0x117E, +0x1167, 0x1175, 0x1168, +0x1169, 0x1161, 0x116A, +0x1169, 0x1162, 0x116B, +0x1169, 0x1165, 0x117F, +0x1169, 0x1166, 0x1180, +0x1169, 0x1168, 0x1181, +0x1169, 0x1169, 0x1182, +0x1169, 0x116E, 0x1183, +0x1169, 0x1175, 0x116C, +0x116A, 0x1175, 0x116B, +0x116D, 0x1163, 0x1184, +0x116D, 0x1164, 0x1185, +0x116D, 0x1167, 0x1186, +0x116D, 0x1169, 0x1187, +0x116D, 0x1175, 0x1188, +0x116E, 0x1161, 0x1189, +0x116E, 0x1162, 0x118A, +0x116E, 0x1165, 0x116F, +0x116E, 0x1166, 0x1170, +0x116E, 0x1168, 0x118C, +0x116E, 0x116E, 0x118D, +0x116E, 0x1175, 0x1171, +0x116E, 0x117C, 0x118B, +0x116F, 0x1173, 0x118B, +0x116F, 0x1175, 0x1170, +0x1172, 0x1161, 0x118E, +0x1172, 0x1165, 0x118F, +0x1172, 0x1166, 0x1190, +0x1172, 0x1167, 0x1191, +0x1172, 0x1168, 0x1192, +0x1172, 0x116E, 0x1193, +0x1172, 0x1175, 0x1194, +0x1173, 0x116E, 0x1195, +0x1173, 0x1173, 0x1196, +0x1173, 0x1175, 0x1174, +0x1174, 0x116E, 0x1197, +0x1175, 0x1161, 0x1198, +0x1175, 0x1163, 0x1199, +0x1175, 0x1169, 0x119A, +0x1175, 0x116E, 0x119B, +0x1175, 0x1173, 0x119C, +0x1175, 0x119E, 0x119D, +0x119E, 0x1165, 0x119F, +0x119E, 0x116E, 0x11A0, +0x119E, 0x1175, 0x11A1, +0x119E, 0x119E, 0x11A2, +0x11A8, 0x11A8, 0x11A9, +0x11A8, 0x11AF, 0x11C3, +0x11A8, 0x11BA, 0x11AA, +0x11A8, 0x11E7, 0x11C4, +0x11AA, 0x11A8, 0x11C4, +0x11AB, 0x11A8, 0x11C5, +0x11AB, 0x11AE, 0x11C6, +0x11AB, 0x11BA, 0x11C7, +0x11AB, 0x11BD, 0x11AC, +0x11AB, 0x11C0, 0x11C9, +0x11AB, 0x11C2, 0x11AD, +0x11AB, 0x11EB, 0x11C8, +0x11AE, 0x11A8, 0x11CA, +0x11AE, 0x11AF, 0x11CB, +0x11AF, 0x11A8, 0x11B0, +0x11AF, 0x11AA, 0x11CC, +0x11AF, 0x11AB, 0x11CD, +0x11AF, 0x11AE, 0x11CE, +0x11AF, 0x11AF, 0x11D0, +0x11AF, 0x11B7, 0x11B1, +0x11AF, 0x11B8, 0x11B2, +0x11AF, 0x11B9, 0x11D3, +0x11AF, 0x11BA, 0x11B3, +0x11AF, 0x11BB, 0x11D6, +0x11AF, 0x11BF, 0x11D8, +0x11AF, 0x11C0, 0x11B4, +0x11AF, 0x11C1, 0x11B5, +0x11AF, 0x11C2, 0x11B6, +0x11AF, 0x11DA, 0x11D1, +0x11AF, 0x11DD, 0x11D2, +0x11AF, 0x11E5, 0x11D4, +0x11AF, 0x11E6, 0x11D5, +0x11AF, 0x11EB, 0x11D7, +0x11AF, 0x11F9, 0x11D9, +0x11B0, 0x11BA, 0x11CC, +0x11B1, 0x11A8, 0x11D1, +0x11B1, 0x11BA, 0x11D2, +0x11B2, 0x11BA, 0x11D3, +0x11B2, 0x11BC, 0x11D5, +0x11B2, 0x11C2, 0x11D4, +0x11B3, 0x11BA, 0x11D6, +0x11B7, 0x11A8, 0x11DA, +0x11B7, 0x11AF, 0x11DB, +0x11B7, 0x11B8, 0x11DC, +0x11B7, 0x11BA, 0x11DD, +0x11B7, 0x11BB, 0x11DE, +0x11B7, 0x11BC, 0x11E2, +0x11B7, 0x11BE, 0x11E0, +0x11B7, 0x11C2, 0x11E1, +0x11B7, 0x11EB, 0x11DF, +0x11B8, 0x11AF, 0x11E3, +0x11B8, 0x11BA, 0x11B9, +0x11B8, 0x11BC, 0x11E6, +0x11B8, 0x11C1, 0x11E4, +0x11B8, 0x11C2, 0x11E5, +0x11BA, 0x11A8, 0x11E7, +0x11BA, 0x11AE, 0x11E8, +0x11BA, 0x11AF, 0x11E9, +0x11BA, 0x11B8, 0x11EA, +0x11BA, 0x11BA, 0x11BB, +0x11BC, 0x11A8, 0x11EC, +0x11BC, 0x11A9, 0x11ED, +0x11BC, 0x11BC, 0x11EE, +0x11BC, 0x11BF, 0x11EF, +0x11C1, 0x11B8, 0x11F3, +0x11C1, 0x11BC, 0x11F4, +0x11C2, 0x11AB, 0x11F5, +0x11C2, 0x11AF, 0x11F6, +0x11C2, 0x11B7, 0x11F7, +0x11C2, 0x11B8, 0x11F8, +0x11CE, 0x11C2, 0x11CF, +0x11DD, 0x11BA, 0x11DE, +0x11EC, 0x11A8, 0x11ED, +0x11F0, 0x11BA, 0x11F1, +0x11F0, 0x11EB, 0x11F2, +0x1FBF, IBUS_KEY_apostrophe, 0x1FCE, +0x1FBF, IBUS_KEY_grave, 0x1FCD, +0x1FBF, IBUS_KEY_asciitilde, 0x1FCF, +0x1FBF, IBUS_KEY_acute, 0x1FCE, +0x1FBF, IBUS_KEY_dead_grave, 0x1FCD, +0x1FBF, IBUS_KEY_dead_acute, 0x1FCE, +0x1FBF, IBUS_KEY_dead_tilde, 0x1FCF, +0x1FFE, IBUS_KEY_apostrophe, 0x1FDE, +0x1FFE, IBUS_KEY_grave, 0x1FDD, +0x1FFE, IBUS_KEY_asciitilde, 0x1FDF, +0x1FFE, IBUS_KEY_acute, 0x1FDE, +0x1FFE, IBUS_KEY_dead_grave, 0x1FDD, +0x1FFE, IBUS_KEY_dead_acute, 0x1FDE, +0x1FFE, IBUS_KEY_dead_tilde, 0x1FDF, +0x2203, 0x0338, 0x2204, +0x2208, 0x0338, 0x2209, +0x220B, 0x0338, 0x220C, +0x2223, 0x0338, 0x2224, +0x2225, 0x0338, 0x2226, +0x223C, 0x0338, 0x2241, +0x2243, 0x0338, 0x2244, +0x2248, 0x0338, 0x2249, +0x224D, 0x0338, 0x226D, +0x2272, 0x0338, 0x2274, +0x2273, 0x0338, 0x2275, +0x2276, 0x0338, 0x2278, +0x2277, 0x0338, 0x2279, +0x227A, 0x0338, 0x2280, +0x227B, 0x0338, 0x2281, +0x227C, 0x0338, 0x22E0, +0x227D, 0x0338, 0x22E1, +0x2286, 0x0338, 0x2288, +0x2287, 0x0338, 0x2289, +0x2291, 0x0338, 0x22E2, +0x2292, 0x0338, 0x22E3, +0x22A8, 0x0338, 0x22AD, +0x22A9, 0x0338, 0x22AE, +0x22AB, 0x0338, 0x22AF, +0x22B2, 0x0338, 0x22EA, +0x22B3, 0x0338, 0x22EB, +0x22B4, 0x0338, 0x22EC, +0x22B5, 0x0338, 0x22ED, +0x2ADD, 0x0338, 0x2ADC, +IBUS_KEY_KP_Divide, IBUS_KEY_D, 0x0110, +IBUS_KEY_KP_Divide, IBUS_KEY_G, 0x01E4, +IBUS_KEY_KP_Divide, IBUS_KEY_H, 0x0126, +IBUS_KEY_KP_Divide, IBUS_KEY_I, 0x0197, +IBUS_KEY_KP_Divide, IBUS_KEY_L, 0x0141, +IBUS_KEY_KP_Divide, IBUS_KEY_O, 0x00D8, +IBUS_KEY_KP_Divide, IBUS_KEY_T, 0x0166, +IBUS_KEY_KP_Divide, IBUS_KEY_Z, 0x01B5, +IBUS_KEY_KP_Divide, IBUS_KEY_b, 0x0180, +IBUS_KEY_KP_Divide, IBUS_KEY_d, 0x0111, +IBUS_KEY_KP_Divide, IBUS_KEY_g, 0x01E5, +IBUS_KEY_KP_Divide, IBUS_KEY_h, 0x0127, +IBUS_KEY_KP_Divide, IBUS_KEY_i, 0x0268, +IBUS_KEY_KP_Divide, IBUS_KEY_l, 0x0142, +IBUS_KEY_KP_Divide, IBUS_KEY_o, 0x00F8, +IBUS_KEY_KP_Divide, IBUS_KEY_t, 0x0167, +IBUS_KEY_KP_Divide, IBUS_KEY_z, 0x01B6, +IBUS_KEY_KP_Divide, 0x0294, 0x02A1, +IBUS_KEY_KP_Divide, 0x04AE, 0x04B0, +IBUS_KEY_KP_Divide, 0x04AF, 0x04B1, +IBUS_KEY_KP_Divide, IBUS_KEY_Cyrillic_ghe, 0x0493, +IBUS_KEY_KP_Divide, IBUS_KEY_Cyrillic_ka, 0x049F, +IBUS_KEY_KP_Divide, IBUS_KEY_Cyrillic_GHE, 0x0492, +IBUS_KEY_KP_Divide, IBUS_KEY_Cyrillic_KA, 0x049E, +IBUS_KEY_KP_Divide, IBUS_KEY_leftarrow, 0x219A, +IBUS_KEY_KP_Divide, IBUS_KEY_rightarrow, 0x219B, +IBUS_KEY_KP_Divide, 0x2194, 0x21AE, +IBUS_KEY_KP_Equal, 0x0338, 0x2260, +IBUS_KEY_exclam, IBUS_KEY_plus, IBUS_KEY_O, 0x1EE2, +IBUS_KEY_exclam, IBUS_KEY_plus, IBUS_KEY_U, 0x1EF0, +IBUS_KEY_exclam, IBUS_KEY_plus, IBUS_KEY_o, 0x1EE3, +IBUS_KEY_exclam, IBUS_KEY_plus, IBUS_KEY_u, 0x1EF1, +IBUS_KEY_exclam, IBUS_KEY_dead_horn, IBUS_KEY_O, 0x1EE2, +IBUS_KEY_exclam, IBUS_KEY_dead_horn, IBUS_KEY_U, 0x1EF0, +IBUS_KEY_exclam, IBUS_KEY_dead_horn, IBUS_KEY_o, 0x1EE3, +IBUS_KEY_exclam, IBUS_KEY_dead_horn, IBUS_KEY_u, 0x1EF1, +IBUS_KEY_quotedbl, IBUS_KEY_apostrophe, IBUS_KEY_space, 0x0385, +IBUS_KEY_quotedbl, IBUS_KEY_apostrophe, IBUS_KEY_Greek_iota, 0x0390, +IBUS_KEY_quotedbl, IBUS_KEY_apostrophe, IBUS_KEY_Greek_upsilon, 0x03B0, +IBUS_KEY_quotedbl, IBUS_KEY_underscore, IBUS_KEY_U, 0x1E7A, +IBUS_KEY_quotedbl, IBUS_KEY_underscore, IBUS_KEY_u, 0x1E7B, +IBUS_KEY_quotedbl, IBUS_KEY_asciitilde, IBUS_KEY_O, 0x1E4E, +IBUS_KEY_quotedbl, IBUS_KEY_asciitilde, IBUS_KEY_o, 0x1E4F, +IBUS_KEY_quotedbl, IBUS_KEY_macron, IBUS_KEY_U, 0x1E7A, +IBUS_KEY_quotedbl, IBUS_KEY_macron, IBUS_KEY_u, 0x1E7B, +IBUS_KEY_quotedbl, IBUS_KEY_dead_tilde, IBUS_KEY_O, 0x1E4E, +IBUS_KEY_quotedbl, IBUS_KEY_dead_tilde, IBUS_KEY_o, 0x1E4F, +IBUS_KEY_quotedbl, IBUS_KEY_dead_macron, IBUS_KEY_U, 0x1E7A, +IBUS_KEY_quotedbl, IBUS_KEY_dead_macron, IBUS_KEY_u, 0x1E7B, +IBUS_KEY_apostrophe, IBUS_KEY_quotedbl, IBUS_KEY_space, 0x0385, +IBUS_KEY_apostrophe, IBUS_KEY_quotedbl, IBUS_KEY_I, 0x1E2E, +IBUS_KEY_apostrophe, IBUS_KEY_quotedbl, IBUS_KEY_U, 0x01D7, +IBUS_KEY_apostrophe, IBUS_KEY_quotedbl, IBUS_KEY_i, 0x1E2F, +IBUS_KEY_apostrophe, IBUS_KEY_quotedbl, IBUS_KEY_u, 0x01D8, +IBUS_KEY_apostrophe, IBUS_KEY_quotedbl, IBUS_KEY_Greek_iota, 0x0390, +IBUS_KEY_apostrophe, IBUS_KEY_quotedbl, IBUS_KEY_Greek_upsilon, 0x03B0, +IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F0D, +IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_EPSILON, 0x1F1D, +IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F2D, +IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_IOTA, 0x1F3D, +IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMICRON, 0x1F4D, +IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_UPSILON, 0x1F5D, +IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1F6D, +IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F05, +IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_epsilon, 0x1F15, +IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F25, +IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_iota, 0x1F35, +IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_omicron, 0x1F45, +IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_upsilon, 0x1F55, +IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1F65, +IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F0C, +IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_EPSILON, 0x1F1C, +IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F2C, +IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_IOTA, 0x1F3C, +IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_OMICRON, 0x1F4C, +IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1F6C, +IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F04, +IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_epsilon, 0x1F14, +IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F24, +IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_iota, 0x1F34, +IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_omicron, 0x1F44, +IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_upsilon, 0x1F54, +IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1F64, +IBUS_KEY_apostrophe, IBUS_KEY_plus, IBUS_KEY_O, 0x1EDA, +IBUS_KEY_apostrophe, IBUS_KEY_plus, IBUS_KEY_U, 0x1EE8, +IBUS_KEY_apostrophe, IBUS_KEY_plus, IBUS_KEY_o, 0x1EDB, +IBUS_KEY_apostrophe, IBUS_KEY_plus, IBUS_KEY_u, 0x1EE9, +IBUS_KEY_apostrophe, IBUS_KEY_slash, IBUS_KEY_O, 0x01FE, +IBUS_KEY_apostrophe, IBUS_KEY_slash, IBUS_KEY_o, 0x01FF, +IBUS_KEY_apostrophe, IBUS_KEY_asciicircum, IBUS_KEY_A, 0x1EA4, +IBUS_KEY_apostrophe, IBUS_KEY_asciicircum, IBUS_KEY_E, 0x1EBE, +IBUS_KEY_apostrophe, IBUS_KEY_asciicircum, IBUS_KEY_O, 0x1ED0, +IBUS_KEY_apostrophe, IBUS_KEY_asciicircum, IBUS_KEY_a, 0x1EA5, +IBUS_KEY_apostrophe, IBUS_KEY_asciicircum, IBUS_KEY_e, 0x1EBF, +IBUS_KEY_apostrophe, IBUS_KEY_asciicircum, IBUS_KEY_o, 0x1ED1, +IBUS_KEY_apostrophe, IBUS_KEY_underscore, IBUS_KEY_E, 0x1E16, +IBUS_KEY_apostrophe, IBUS_KEY_underscore, IBUS_KEY_O, 0x1E52, +IBUS_KEY_apostrophe, IBUS_KEY_underscore, IBUS_KEY_e, 0x1E17, +IBUS_KEY_apostrophe, IBUS_KEY_underscore, IBUS_KEY_o, 0x1E53, +IBUS_KEY_apostrophe, IBUS_KEY_b, IBUS_KEY_A, 0x1EAE, +IBUS_KEY_apostrophe, IBUS_KEY_b, IBUS_KEY_a, 0x1EAF, +IBUS_KEY_apostrophe, IBUS_KEY_asciitilde, IBUS_KEY_O, 0x1E4C, +IBUS_KEY_apostrophe, IBUS_KEY_asciitilde, IBUS_KEY_U, 0x1E78, +IBUS_KEY_apostrophe, IBUS_KEY_asciitilde, IBUS_KEY_o, 0x1E4D, +IBUS_KEY_apostrophe, IBUS_KEY_asciitilde, IBUS_KEY_u, 0x1E79, +IBUS_KEY_apostrophe, IBUS_KEY_macron, IBUS_KEY_E, 0x1E16, +IBUS_KEY_apostrophe, IBUS_KEY_macron, IBUS_KEY_O, 0x1E52, +IBUS_KEY_apostrophe, IBUS_KEY_macron, IBUS_KEY_e, 0x1E17, +IBUS_KEY_apostrophe, IBUS_KEY_macron, IBUS_KEY_o, 0x1E53, +IBUS_KEY_apostrophe, IBUS_KEY_cedilla, IBUS_KEY_C, 0x1E08, +IBUS_KEY_apostrophe, IBUS_KEY_cedilla, IBUS_KEY_c, 0x1E09, +IBUS_KEY_apostrophe, IBUS_KEY_dead_circumflex, IBUS_KEY_A, 0x1EA4, +IBUS_KEY_apostrophe, IBUS_KEY_dead_circumflex, IBUS_KEY_E, 0x1EBE, +IBUS_KEY_apostrophe, IBUS_KEY_dead_circumflex, IBUS_KEY_O, 0x1ED0, +IBUS_KEY_apostrophe, IBUS_KEY_dead_circumflex, IBUS_KEY_a, 0x1EA5, +IBUS_KEY_apostrophe, IBUS_KEY_dead_circumflex, IBUS_KEY_e, 0x1EBF, +IBUS_KEY_apostrophe, IBUS_KEY_dead_circumflex, IBUS_KEY_o, 0x1ED1, +IBUS_KEY_apostrophe, IBUS_KEY_dead_tilde, IBUS_KEY_O, 0x1E4C, +IBUS_KEY_apostrophe, IBUS_KEY_dead_tilde, IBUS_KEY_U, 0x1E78, +IBUS_KEY_apostrophe, IBUS_KEY_dead_tilde, IBUS_KEY_o, 0x1E4D, +IBUS_KEY_apostrophe, IBUS_KEY_dead_tilde, IBUS_KEY_u, 0x1E79, +IBUS_KEY_apostrophe, IBUS_KEY_dead_macron, IBUS_KEY_E, 0x1E16, +IBUS_KEY_apostrophe, IBUS_KEY_dead_macron, IBUS_KEY_O, 0x1E52, +IBUS_KEY_apostrophe, IBUS_KEY_dead_macron, IBUS_KEY_e, 0x1E17, +IBUS_KEY_apostrophe, IBUS_KEY_dead_macron, IBUS_KEY_o, 0x1E53, +IBUS_KEY_apostrophe, IBUS_KEY_dead_breve, IBUS_KEY_A, 0x1EAE, +IBUS_KEY_apostrophe, IBUS_KEY_dead_breve, IBUS_KEY_a, 0x1EAF, +IBUS_KEY_apostrophe, IBUS_KEY_dead_diaeresis, IBUS_KEY_I, 0x1E2E, +IBUS_KEY_apostrophe, IBUS_KEY_dead_diaeresis, IBUS_KEY_U, 0x01D7, +IBUS_KEY_apostrophe, IBUS_KEY_dead_diaeresis, IBUS_KEY_i, 0x1E2F, +IBUS_KEY_apostrophe, IBUS_KEY_dead_diaeresis, IBUS_KEY_u, 0x01D8, +IBUS_KEY_apostrophe, IBUS_KEY_dead_diaeresis, IBUS_KEY_Greek_iota, 0x0390, +IBUS_KEY_apostrophe, IBUS_KEY_dead_diaeresis, IBUS_KEY_Greek_upsilon, 0x03B0, +IBUS_KEY_apostrophe, IBUS_KEY_dead_abovering, IBUS_KEY_A, 0x01FA, +IBUS_KEY_apostrophe, IBUS_KEY_dead_abovering, IBUS_KEY_a, 0x01FB, +IBUS_KEY_apostrophe, IBUS_KEY_dead_cedilla, IBUS_KEY_C, 0x1E08, +IBUS_KEY_apostrophe, IBUS_KEY_dead_cedilla, IBUS_KEY_c, 0x1E09, +IBUS_KEY_apostrophe, IBUS_KEY_dead_horn, IBUS_KEY_O, 0x1EDA, +IBUS_KEY_apostrophe, IBUS_KEY_dead_horn, IBUS_KEY_U, 0x1EE8, +IBUS_KEY_apostrophe, IBUS_KEY_dead_horn, IBUS_KEY_o, 0x1EDB, +IBUS_KEY_apostrophe, IBUS_KEY_dead_horn, IBUS_KEY_u, 0x1EE9, +IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F0C, +IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_EPSILON, 0x1F1C, +IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F2C, +IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_IOTA, 0x1F3C, +IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMICRON, 0x1F4C, +IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1F6C, +IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F04, +IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_epsilon, 0x1F14, +IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F24, +IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_iota, 0x1F34, +IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omicron, 0x1F44, +IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_upsilon, 0x1F54, +IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1F64, +IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F0D, +IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_EPSILON, 0x1F1D, +IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F2D, +IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_IOTA, 0x1F3D, +IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMICRON, 0x1F4D, +IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_UPSILON, 0x1F5D, +IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1F6D, +IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F05, +IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_epsilon, 0x1F15, +IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F25, +IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_iota, 0x1F35, +IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omicron, 0x1F45, +IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_upsilon, 0x1F55, +IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1F65, +IBUS_KEY_apostrophe, IBUS_KEY_KP_Divide, IBUS_KEY_O, 0x01FE, +IBUS_KEY_apostrophe, IBUS_KEY_KP_Divide, IBUS_KEY_o, 0x01FF, +IBUS_KEY_parenleft, IBUS_KEY_0, IBUS_KEY_parenright, 0x24EA, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_parenright, 0x2460, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_parenright, 0x2461, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_parenright, 0x2462, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_parenright, 0x2463, +IBUS_KEY_parenleft, IBUS_KEY_5, IBUS_KEY_parenright, 0x2464, +IBUS_KEY_parenleft, IBUS_KEY_6, IBUS_KEY_parenright, 0x2465, +IBUS_KEY_parenleft, IBUS_KEY_7, IBUS_KEY_parenright, 0x2466, +IBUS_KEY_parenleft, IBUS_KEY_8, IBUS_KEY_parenright, 0x2467, +IBUS_KEY_parenleft, IBUS_KEY_9, IBUS_KEY_parenright, 0x2468, +IBUS_KEY_parenleft, IBUS_KEY_A, IBUS_KEY_parenright, 0x24B6, +IBUS_KEY_parenleft, IBUS_KEY_B, IBUS_KEY_parenright, 0x24B7, +IBUS_KEY_parenleft, IBUS_KEY_C, IBUS_KEY_parenright, 0x24B8, +IBUS_KEY_parenleft, IBUS_KEY_D, IBUS_KEY_parenright, 0x24B9, +IBUS_KEY_parenleft, IBUS_KEY_E, IBUS_KEY_parenright, 0x24BA, +IBUS_KEY_parenleft, IBUS_KEY_F, IBUS_KEY_parenright, 0x24BB, +IBUS_KEY_parenleft, IBUS_KEY_G, IBUS_KEY_parenright, 0x24BC, +IBUS_KEY_parenleft, IBUS_KEY_H, IBUS_KEY_parenright, 0x24BD, +IBUS_KEY_parenleft, IBUS_KEY_I, IBUS_KEY_parenright, 0x24BE, +IBUS_KEY_parenleft, IBUS_KEY_J, IBUS_KEY_parenright, 0x24BF, +IBUS_KEY_parenleft, IBUS_KEY_K, IBUS_KEY_parenright, 0x24C0, +IBUS_KEY_parenleft, IBUS_KEY_L, IBUS_KEY_parenright, 0x24C1, +IBUS_KEY_parenleft, IBUS_KEY_M, IBUS_KEY_parenright, 0x24C2, +IBUS_KEY_parenleft, IBUS_KEY_N, IBUS_KEY_parenright, 0x24C3, +IBUS_KEY_parenleft, IBUS_KEY_O, IBUS_KEY_parenright, 0x24C4, +IBUS_KEY_parenleft, IBUS_KEY_P, IBUS_KEY_parenright, 0x24C5, +IBUS_KEY_parenleft, IBUS_KEY_Q, IBUS_KEY_parenright, 0x24C6, +IBUS_KEY_parenleft, IBUS_KEY_R, IBUS_KEY_parenright, 0x24C7, +IBUS_KEY_parenleft, IBUS_KEY_S, IBUS_KEY_parenright, 0x24C8, +IBUS_KEY_parenleft, IBUS_KEY_T, IBUS_KEY_parenright, 0x24C9, +IBUS_KEY_parenleft, IBUS_KEY_U, IBUS_KEY_parenright, 0x24CA, +IBUS_KEY_parenleft, IBUS_KEY_V, IBUS_KEY_parenright, 0x24CB, +IBUS_KEY_parenleft, IBUS_KEY_W, IBUS_KEY_parenright, 0x24CC, +IBUS_KEY_parenleft, IBUS_KEY_X, IBUS_KEY_parenright, 0x24CD, +IBUS_KEY_parenleft, IBUS_KEY_Y, IBUS_KEY_parenright, 0x24CE, +IBUS_KEY_parenleft, IBUS_KEY_Z, IBUS_KEY_parenright, 0x24CF, +IBUS_KEY_parenleft, IBUS_KEY_a, IBUS_KEY_parenright, 0x24D0, +IBUS_KEY_parenleft, IBUS_KEY_b, IBUS_KEY_parenright, 0x24D1, +IBUS_KEY_parenleft, IBUS_KEY_c, IBUS_KEY_parenright, 0x24D2, +IBUS_KEY_parenleft, IBUS_KEY_d, IBUS_KEY_parenright, 0x24D3, +IBUS_KEY_parenleft, IBUS_KEY_e, IBUS_KEY_parenright, 0x24D4, +IBUS_KEY_parenleft, IBUS_KEY_f, IBUS_KEY_parenright, 0x24D5, +IBUS_KEY_parenleft, IBUS_KEY_g, IBUS_KEY_parenright, 0x24D6, +IBUS_KEY_parenleft, IBUS_KEY_h, IBUS_KEY_parenright, 0x24D7, +IBUS_KEY_parenleft, IBUS_KEY_i, IBUS_KEY_parenright, 0x24D8, +IBUS_KEY_parenleft, IBUS_KEY_j, IBUS_KEY_parenright, 0x24D9, +IBUS_KEY_parenleft, IBUS_KEY_k, IBUS_KEY_parenright, 0x24DA, +IBUS_KEY_parenleft, IBUS_KEY_l, IBUS_KEY_parenright, 0x24DB, +IBUS_KEY_parenleft, IBUS_KEY_m, IBUS_KEY_parenright, 0x24DC, +IBUS_KEY_parenleft, IBUS_KEY_n, IBUS_KEY_parenright, 0x24DD, +IBUS_KEY_parenleft, IBUS_KEY_o, IBUS_KEY_parenright, 0x24DE, +IBUS_KEY_parenleft, IBUS_KEY_p, IBUS_KEY_parenright, 0x24DF, +IBUS_KEY_parenleft, IBUS_KEY_q, IBUS_KEY_parenright, 0x24E0, +IBUS_KEY_parenleft, IBUS_KEY_r, IBUS_KEY_parenright, 0x24E1, +IBUS_KEY_parenleft, IBUS_KEY_s, IBUS_KEY_parenright, 0x24E2, +IBUS_KEY_parenleft, IBUS_KEY_t, IBUS_KEY_parenright, 0x24E3, +IBUS_KEY_parenleft, IBUS_KEY_u, IBUS_KEY_parenright, 0x24E4, +IBUS_KEY_parenleft, IBUS_KEY_v, IBUS_KEY_parenright, 0x24E5, +IBUS_KEY_parenleft, IBUS_KEY_w, IBUS_KEY_parenright, 0x24E6, +IBUS_KEY_parenleft, IBUS_KEY_x, IBUS_KEY_parenright, 0x24E7, +IBUS_KEY_parenleft, IBUS_KEY_y, IBUS_KEY_parenright, 0x24E8, +IBUS_KEY_parenleft, IBUS_KEY_z, IBUS_KEY_parenright, 0x24E9, +IBUS_KEY_parenleft, IBUS_KEY_kana_WO, IBUS_KEY_parenright, 0x32FE, +IBUS_KEY_parenleft, IBUS_KEY_kana_A, IBUS_KEY_parenright, 0x32D0, +IBUS_KEY_parenleft, IBUS_KEY_kana_I, IBUS_KEY_parenright, 0x32D1, +IBUS_KEY_parenleft, IBUS_KEY_kana_U, IBUS_KEY_parenright, 0x32D2, +IBUS_KEY_parenleft, IBUS_KEY_kana_E, IBUS_KEY_parenright, 0x32D3, +IBUS_KEY_parenleft, IBUS_KEY_kana_O, IBUS_KEY_parenright, 0x32D4, +IBUS_KEY_parenleft, IBUS_KEY_kana_KA, IBUS_KEY_parenright, 0x32D5, +IBUS_KEY_parenleft, IBUS_KEY_kana_KI, IBUS_KEY_parenright, 0x32D6, +IBUS_KEY_parenleft, IBUS_KEY_kana_KU, IBUS_KEY_parenright, 0x32D7, +IBUS_KEY_parenleft, IBUS_KEY_kana_KE, IBUS_KEY_parenright, 0x32D8, +IBUS_KEY_parenleft, IBUS_KEY_kana_KO, IBUS_KEY_parenright, 0x32D9, +IBUS_KEY_parenleft, IBUS_KEY_kana_SA, IBUS_KEY_parenright, 0x32DA, +IBUS_KEY_parenleft, IBUS_KEY_kana_SHI, IBUS_KEY_parenright, 0x32DB, +IBUS_KEY_parenleft, IBUS_KEY_kana_SU, IBUS_KEY_parenright, 0x32DC, +IBUS_KEY_parenleft, IBUS_KEY_kana_SE, IBUS_KEY_parenright, 0x32DD, +IBUS_KEY_parenleft, IBUS_KEY_kana_SO, IBUS_KEY_parenright, 0x32DE, +IBUS_KEY_parenleft, IBUS_KEY_kana_TA, IBUS_KEY_parenright, 0x32DF, +IBUS_KEY_parenleft, IBUS_KEY_kana_CHI, IBUS_KEY_parenright, 0x32E0, +IBUS_KEY_parenleft, IBUS_KEY_kana_TSU, IBUS_KEY_parenright, 0x32E1, +IBUS_KEY_parenleft, IBUS_KEY_kana_TE, IBUS_KEY_parenright, 0x32E2, +IBUS_KEY_parenleft, IBUS_KEY_kana_TO, IBUS_KEY_parenright, 0x32E3, +IBUS_KEY_parenleft, IBUS_KEY_kana_NA, IBUS_KEY_parenright, 0x32E4, +IBUS_KEY_parenleft, IBUS_KEY_kana_NI, IBUS_KEY_parenright, 0x32E5, +IBUS_KEY_parenleft, IBUS_KEY_kana_NU, IBUS_KEY_parenright, 0x32E6, +IBUS_KEY_parenleft, IBUS_KEY_kana_NE, IBUS_KEY_parenright, 0x32E7, +IBUS_KEY_parenleft, IBUS_KEY_kana_NO, IBUS_KEY_parenright, 0x32E8, +IBUS_KEY_parenleft, IBUS_KEY_kana_HA, IBUS_KEY_parenright, 0x32E9, +IBUS_KEY_parenleft, IBUS_KEY_kana_HI, IBUS_KEY_parenright, 0x32EA, +IBUS_KEY_parenleft, IBUS_KEY_kana_FU, IBUS_KEY_parenright, 0x32EB, +IBUS_KEY_parenleft, IBUS_KEY_kana_HE, IBUS_KEY_parenright, 0x32EC, +IBUS_KEY_parenleft, IBUS_KEY_kana_HO, IBUS_KEY_parenright, 0x32ED, +IBUS_KEY_parenleft, IBUS_KEY_kana_MA, IBUS_KEY_parenright, 0x32EE, +IBUS_KEY_parenleft, IBUS_KEY_kana_MI, IBUS_KEY_parenright, 0x32EF, +IBUS_KEY_parenleft, IBUS_KEY_kana_MU, IBUS_KEY_parenright, 0x32F0, +IBUS_KEY_parenleft, IBUS_KEY_kana_ME, IBUS_KEY_parenright, 0x32F1, +IBUS_KEY_parenleft, IBUS_KEY_kana_MO, IBUS_KEY_parenright, 0x32F2, +IBUS_KEY_parenleft, IBUS_KEY_kana_YA, IBUS_KEY_parenright, 0x32F3, +IBUS_KEY_parenleft, IBUS_KEY_kana_YU, IBUS_KEY_parenright, 0x32F4, +IBUS_KEY_parenleft, IBUS_KEY_kana_YO, IBUS_KEY_parenright, 0x32F5, +IBUS_KEY_parenleft, IBUS_KEY_kana_RA, IBUS_KEY_parenright, 0x32F6, +IBUS_KEY_parenleft, IBUS_KEY_kana_RI, IBUS_KEY_parenright, 0x32F7, +IBUS_KEY_parenleft, IBUS_KEY_kana_RU, IBUS_KEY_parenright, 0x32F8, +IBUS_KEY_parenleft, IBUS_KEY_kana_RE, IBUS_KEY_parenright, 0x32F9, +IBUS_KEY_parenleft, IBUS_KEY_kana_RO, IBUS_KEY_parenright, 0x32FA, +IBUS_KEY_parenleft, IBUS_KEY_kana_WA, IBUS_KEY_parenright, 0x32FB, +IBUS_KEY_parenleft, 0x1100, IBUS_KEY_parenright, 0x3260, +IBUS_KEY_parenleft, 0x1102, IBUS_KEY_parenright, 0x3261, +IBUS_KEY_parenleft, 0x1103, IBUS_KEY_parenright, 0x3262, +IBUS_KEY_parenleft, 0x1105, IBUS_KEY_parenright, 0x3263, +IBUS_KEY_parenleft, 0x1106, IBUS_KEY_parenright, 0x3264, +IBUS_KEY_parenleft, 0x1107, IBUS_KEY_parenright, 0x3265, +IBUS_KEY_parenleft, 0x1109, IBUS_KEY_parenright, 0x3266, +IBUS_KEY_parenleft, 0x110B, IBUS_KEY_parenright, 0x3267, +IBUS_KEY_parenleft, 0x110C, IBUS_KEY_parenright, 0x3268, +IBUS_KEY_parenleft, 0x110E, IBUS_KEY_parenright, 0x3269, +IBUS_KEY_parenleft, 0x110F, IBUS_KEY_parenright, 0x326A, +IBUS_KEY_parenleft, 0x1110, IBUS_KEY_parenright, 0x326B, +IBUS_KEY_parenleft, 0x1111, IBUS_KEY_parenright, 0x326C, +IBUS_KEY_parenleft, 0x1112, IBUS_KEY_parenright, 0x326D, +IBUS_KEY_parenleft, 0x30F0, IBUS_KEY_parenright, 0x32FC, +IBUS_KEY_parenleft, 0x30F1, IBUS_KEY_parenright, 0x32FD, +IBUS_KEY_parenleft, 0x4E00, IBUS_KEY_parenright, 0x3280, +IBUS_KEY_parenleft, 0x4E03, IBUS_KEY_parenright, 0x3286, +IBUS_KEY_parenleft, 0x4E09, IBUS_KEY_parenright, 0x3282, +IBUS_KEY_parenleft, 0x4E0A, IBUS_KEY_parenright, 0x32A4, +IBUS_KEY_parenleft, 0x4E0B, IBUS_KEY_parenright, 0x32A6, +IBUS_KEY_parenleft, 0x4E2D, IBUS_KEY_parenright, 0x32A5, +IBUS_KEY_parenleft, 0x4E5D, IBUS_KEY_parenright, 0x3288, +IBUS_KEY_parenleft, 0x4E8C, IBUS_KEY_parenright, 0x3281, +IBUS_KEY_parenleft, 0x4E94, IBUS_KEY_parenright, 0x3284, +IBUS_KEY_parenleft, 0x4F01, IBUS_KEY_parenright, 0x32AD, +IBUS_KEY_parenleft, 0x4F11, IBUS_KEY_parenright, 0x32A1, +IBUS_KEY_parenleft, 0x512A, IBUS_KEY_parenright, 0x329D, +IBUS_KEY_parenleft, 0x516B, IBUS_KEY_parenright, 0x3287, +IBUS_KEY_parenleft, 0x516D, IBUS_KEY_parenright, 0x3285, +IBUS_KEY_parenleft, 0x5199, IBUS_KEY_parenright, 0x32A2, +IBUS_KEY_parenleft, 0x52B4, IBUS_KEY_parenright, 0x3298, +IBUS_KEY_parenleft, 0x533B, IBUS_KEY_parenright, 0x32A9, +IBUS_KEY_parenleft, 0x5341, IBUS_KEY_parenright, 0x3289, +IBUS_KEY_parenleft, 0x5354, IBUS_KEY_parenright, 0x32AF, +IBUS_KEY_parenleft, 0x5370, IBUS_KEY_parenright, 0x329E, +IBUS_KEY_parenleft, 0x53F3, IBUS_KEY_parenright, 0x32A8, +IBUS_KEY_parenleft, 0x540D, IBUS_KEY_parenright, 0x3294, +IBUS_KEY_parenleft, 0x56DB, IBUS_KEY_parenright, 0x3283, +IBUS_KEY_parenleft, 0x571F, IBUS_KEY_parenright, 0x328F, +IBUS_KEY_parenleft, 0x591C, IBUS_KEY_parenright, 0x32B0, +IBUS_KEY_parenleft, 0x5973, IBUS_KEY_parenright, 0x329B, +IBUS_KEY_parenleft, 0x5B66, IBUS_KEY_parenright, 0x32AB, +IBUS_KEY_parenleft, 0x5B97, IBUS_KEY_parenright, 0x32AA, +IBUS_KEY_parenleft, 0x5DE6, IBUS_KEY_parenright, 0x32A7, +IBUS_KEY_parenleft, 0x65E5, IBUS_KEY_parenright, 0x3290, +IBUS_KEY_parenleft, 0x6708, IBUS_KEY_parenright, 0x328A, +IBUS_KEY_parenleft, 0x6709, IBUS_KEY_parenright, 0x3292, +IBUS_KEY_parenleft, 0x6728, IBUS_KEY_parenright, 0x328D, +IBUS_KEY_parenleft, 0x682A, IBUS_KEY_parenright, 0x3291, +IBUS_KEY_parenleft, 0x6B63, IBUS_KEY_parenright, 0x32A3, +IBUS_KEY_parenleft, 0x6C34, IBUS_KEY_parenright, 0x328C, +IBUS_KEY_parenleft, 0x6CE8, IBUS_KEY_parenright, 0x329F, +IBUS_KEY_parenleft, 0x706B, IBUS_KEY_parenright, 0x328B, +IBUS_KEY_parenleft, 0x7279, IBUS_KEY_parenright, 0x3295, +IBUS_KEY_parenleft, 0x7537, IBUS_KEY_parenright, 0x329A, +IBUS_KEY_parenleft, 0x76E3, IBUS_KEY_parenright, 0x32AC, +IBUS_KEY_parenleft, 0x793E, IBUS_KEY_parenright, 0x3293, +IBUS_KEY_parenleft, 0x795D, IBUS_KEY_parenright, 0x3297, +IBUS_KEY_parenleft, 0x79D8, IBUS_KEY_parenright, 0x3299, +IBUS_KEY_parenleft, 0x8CA1, IBUS_KEY_parenright, 0x3296, +IBUS_KEY_parenleft, 0x8CC7, IBUS_KEY_parenright, 0x32AE, +IBUS_KEY_parenleft, 0x9069, IBUS_KEY_parenright, 0x329C, +IBUS_KEY_parenleft, 0x91D1, IBUS_KEY_parenright, 0x328E, +IBUS_KEY_parenleft, 0x9805, IBUS_KEY_parenright, 0x32A0, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_parenright, 0x2461, +IBUS_KEY_parenleft, IBUS_KEY_KP_0, IBUS_KEY_parenright, 0x24EA, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_parenright, 0x2460, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_parenright, 0x2461, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_parenright, 0x2462, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_parenright, 0x2463, +IBUS_KEY_parenleft, IBUS_KEY_KP_5, IBUS_KEY_parenright, 0x2464, +IBUS_KEY_parenleft, IBUS_KEY_KP_6, IBUS_KEY_parenright, 0x2465, +IBUS_KEY_parenleft, IBUS_KEY_KP_7, IBUS_KEY_parenright, 0x2466, +IBUS_KEY_parenleft, IBUS_KEY_KP_8, IBUS_KEY_parenright, 0x2467, +IBUS_KEY_parenleft, IBUS_KEY_KP_9, IBUS_KEY_parenright, 0x2468, +IBUS_KEY_minus, IBUS_KEY_minus, IBUS_KEY_space, 0x00AD, +IBUS_KEY_minus, IBUS_KEY_minus, IBUS_KEY_minus, 0x2014, +IBUS_KEY_minus, IBUS_KEY_minus, IBUS_KEY_period, 0x2013, +IBUS_KEY_period, IBUS_KEY_exclam, IBUS_KEY_S, 0x1E68, +IBUS_KEY_period, IBUS_KEY_exclam, IBUS_KEY_s, 0x1E69, +IBUS_KEY_period, IBUS_KEY_apostrophe, IBUS_KEY_S, 0x1E64, +IBUS_KEY_period, IBUS_KEY_apostrophe, IBUS_KEY_s, 0x1E65, +IBUS_KEY_period, IBUS_KEY_acute, IBUS_KEY_S, 0x1E64, +IBUS_KEY_period, IBUS_KEY_acute, IBUS_KEY_s, 0x1E65, +IBUS_KEY_period, IBUS_KEY_dead_acute, IBUS_KEY_S, 0x1E64, +IBUS_KEY_period, IBUS_KEY_dead_acute, IBUS_KEY_s, 0x1E65, +IBUS_KEY_period, IBUS_KEY_dead_caron, IBUS_KEY_S, 0x1E66, +IBUS_KEY_period, IBUS_KEY_dead_caron, IBUS_KEY_s, 0x1E67, +IBUS_KEY_period, IBUS_KEY_dead_belowdot, IBUS_KEY_S, 0x1E68, +IBUS_KEY_period, IBUS_KEY_dead_belowdot, IBUS_KEY_s, 0x1E69, +IBUS_KEY_question, IBUS_KEY_plus, IBUS_KEY_O, 0x1EDE, +IBUS_KEY_question, IBUS_KEY_plus, IBUS_KEY_U, 0x1EEC, +IBUS_KEY_question, IBUS_KEY_plus, IBUS_KEY_o, 0x1EDF, +IBUS_KEY_question, IBUS_KEY_plus, IBUS_KEY_u, 0x1EED, +IBUS_KEY_question, IBUS_KEY_asciicircum, IBUS_KEY_A, 0x1EA8, +IBUS_KEY_question, IBUS_KEY_asciicircum, IBUS_KEY_E, 0x1EC2, +IBUS_KEY_question, IBUS_KEY_asciicircum, IBUS_KEY_O, 0x1ED4, +IBUS_KEY_question, IBUS_KEY_asciicircum, IBUS_KEY_a, 0x1EA9, +IBUS_KEY_question, IBUS_KEY_asciicircum, IBUS_KEY_e, 0x1EC3, +IBUS_KEY_question, IBUS_KEY_asciicircum, IBUS_KEY_o, 0x1ED5, +IBUS_KEY_question, IBUS_KEY_b, IBUS_KEY_A, 0x1EB2, +IBUS_KEY_question, IBUS_KEY_b, IBUS_KEY_a, 0x1EB3, +IBUS_KEY_question, IBUS_KEY_dead_circumflex, IBUS_KEY_A, 0x1EA8, +IBUS_KEY_question, IBUS_KEY_dead_circumflex, IBUS_KEY_E, 0x1EC2, +IBUS_KEY_question, IBUS_KEY_dead_circumflex, IBUS_KEY_O, 0x1ED4, +IBUS_KEY_question, IBUS_KEY_dead_circumflex, IBUS_KEY_a, 0x1EA9, +IBUS_KEY_question, IBUS_KEY_dead_circumflex, IBUS_KEY_e, 0x1EC3, +IBUS_KEY_question, IBUS_KEY_dead_circumflex, IBUS_KEY_o, 0x1ED5, +IBUS_KEY_question, IBUS_KEY_dead_breve, IBUS_KEY_A, 0x1EB2, +IBUS_KEY_question, IBUS_KEY_dead_breve, IBUS_KEY_a, 0x1EB3, +IBUS_KEY_question, IBUS_KEY_dead_horn, IBUS_KEY_O, 0x1EDE, +IBUS_KEY_question, IBUS_KEY_dead_horn, IBUS_KEY_U, 0x1EEC, +IBUS_KEY_question, IBUS_KEY_dead_horn, IBUS_KEY_o, 0x1EDF, +IBUS_KEY_question, IBUS_KEY_dead_horn, IBUS_KEY_u, 0x1EED, +IBUS_KEY_U, IBUS_KEY_exclam, IBUS_KEY_A, 0x1EB6, +IBUS_KEY_U, IBUS_KEY_exclam, IBUS_KEY_a, 0x1EB7, +IBUS_KEY_U, IBUS_KEY_comma, IBUS_KEY_E, 0x1E1C, +IBUS_KEY_U, IBUS_KEY_comma, IBUS_KEY_e, 0x1E1D, +IBUS_KEY_U, IBUS_KEY_cedilla, IBUS_KEY_E, 0x1E1C, +IBUS_KEY_U, IBUS_KEY_cedilla, IBUS_KEY_e, 0x1E1D, +IBUS_KEY_U, IBUS_KEY_dead_cedilla, IBUS_KEY_E, 0x1E1C, +IBUS_KEY_U, IBUS_KEY_dead_cedilla, IBUS_KEY_e, 0x1E1D, +IBUS_KEY_U, IBUS_KEY_dead_belowdot, IBUS_KEY_A, 0x1EB6, +IBUS_KEY_U, IBUS_KEY_dead_belowdot, IBUS_KEY_a, 0x1EB7, +IBUS_KEY_asciicircum, IBUS_KEY_exclam, IBUS_KEY_A, 0x1EAC, +IBUS_KEY_asciicircum, IBUS_KEY_exclam, IBUS_KEY_E, 0x1EC6, +IBUS_KEY_asciicircum, IBUS_KEY_exclam, IBUS_KEY_O, 0x1ED8, +IBUS_KEY_asciicircum, IBUS_KEY_exclam, IBUS_KEY_a, 0x1EAD, +IBUS_KEY_asciicircum, IBUS_KEY_exclam, IBUS_KEY_e, 0x1EC7, +IBUS_KEY_asciicircum, IBUS_KEY_exclam, IBUS_KEY_o, 0x1ED9, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, IBUS_KEY_a, 0x00AA, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, IBUS_KEY_h, 0x02B0, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, IBUS_KEY_i, 0x2071, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, IBUS_KEY_j, 0x02B2, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, IBUS_KEY_l, 0x02E1, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, IBUS_KEY_n, 0x207F, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, IBUS_KEY_o, 0x00BA, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, IBUS_KEY_r, 0x02B3, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, IBUS_KEY_s, 0x02E2, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, IBUS_KEY_w, 0x02B7, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, IBUS_KEY_x, 0x02E3, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, IBUS_KEY_y, 0x02B8, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, 0x0263, 0x02E0, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, 0x0266, 0x02B1, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, 0x0279, 0x02B4, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, 0x027B, 0x02B5, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, 0x0281, 0x02B6, +IBUS_KEY_asciicircum, IBUS_KEY_underscore, 0x0295, 0x02E4, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, IBUS_KEY_a, 0x00AA, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, IBUS_KEY_h, 0x02B0, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, IBUS_KEY_i, 0x2071, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, IBUS_KEY_j, 0x02B2, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, IBUS_KEY_l, 0x02E1, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, IBUS_KEY_n, 0x207F, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, IBUS_KEY_o, 0x00BA, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, IBUS_KEY_r, 0x02B3, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, IBUS_KEY_s, 0x02E2, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, IBUS_KEY_w, 0x02B7, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, IBUS_KEY_x, 0x02E3, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, IBUS_KEY_y, 0x02B8, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, 0x0263, 0x02E0, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, 0x0266, 0x02B1, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, 0x0279, 0x02B4, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, 0x027B, 0x02B5, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, 0x0281, 0x02B6, +IBUS_KEY_asciicircum, IBUS_KEY_underbar, 0x0295, 0x02E4, +IBUS_KEY_asciicircum, IBUS_KEY_dead_belowdot, IBUS_KEY_A, 0x1EAC, +IBUS_KEY_asciicircum, IBUS_KEY_dead_belowdot, IBUS_KEY_E, 0x1EC6, +IBUS_KEY_asciicircum, IBUS_KEY_dead_belowdot, IBUS_KEY_O, 0x1ED8, +IBUS_KEY_asciicircum, IBUS_KEY_dead_belowdot, IBUS_KEY_a, 0x1EAD, +IBUS_KEY_asciicircum, IBUS_KEY_dead_belowdot, IBUS_KEY_e, 0x1EC7, +IBUS_KEY_asciicircum, IBUS_KEY_dead_belowdot, IBUS_KEY_o, 0x1ED9, +IBUS_KEY_underscore, IBUS_KEY_exclam, IBUS_KEY_L, 0x1E38, +IBUS_KEY_underscore, IBUS_KEY_exclam, IBUS_KEY_R, 0x1E5C, +IBUS_KEY_underscore, IBUS_KEY_exclam, IBUS_KEY_l, 0x1E39, +IBUS_KEY_underscore, IBUS_KEY_exclam, IBUS_KEY_r, 0x1E5D, +IBUS_KEY_underscore, IBUS_KEY_quotedbl, IBUS_KEY_A, 0x01DE, +IBUS_KEY_underscore, IBUS_KEY_quotedbl, IBUS_KEY_O, 0x022A, +IBUS_KEY_underscore, IBUS_KEY_quotedbl, IBUS_KEY_U, 0x01D5, +IBUS_KEY_underscore, IBUS_KEY_quotedbl, IBUS_KEY_a, 0x01DF, +IBUS_KEY_underscore, IBUS_KEY_quotedbl, IBUS_KEY_o, 0x022B, +IBUS_KEY_underscore, IBUS_KEY_quotedbl, IBUS_KEY_u, 0x01D6, +IBUS_KEY_underscore, IBUS_KEY_period, IBUS_KEY_A, 0x01E0, +IBUS_KEY_underscore, IBUS_KEY_period, IBUS_KEY_O, 0x0230, +IBUS_KEY_underscore, IBUS_KEY_period, IBUS_KEY_a, 0x01E1, +IBUS_KEY_underscore, IBUS_KEY_period, IBUS_KEY_o, 0x0231, +IBUS_KEY_underscore, IBUS_KEY_semicolon, IBUS_KEY_O, 0x01EC, +IBUS_KEY_underscore, IBUS_KEY_semicolon, IBUS_KEY_o, 0x01ED, +IBUS_KEY_underscore, IBUS_KEY_asciitilde, IBUS_KEY_O, 0x022C, +IBUS_KEY_underscore, IBUS_KEY_asciitilde, IBUS_KEY_o, 0x022D, +IBUS_KEY_underscore, IBUS_KEY_dead_tilde, IBUS_KEY_O, 0x022C, +IBUS_KEY_underscore, IBUS_KEY_dead_tilde, IBUS_KEY_o, 0x022D, +IBUS_KEY_underscore, IBUS_KEY_dead_abovedot, IBUS_KEY_A, 0x01E0, +IBUS_KEY_underscore, IBUS_KEY_dead_abovedot, IBUS_KEY_O, 0x0230, +IBUS_KEY_underscore, IBUS_KEY_dead_abovedot, IBUS_KEY_a, 0x01E1, +IBUS_KEY_underscore, IBUS_KEY_dead_abovedot, IBUS_KEY_o, 0x0231, +IBUS_KEY_underscore, IBUS_KEY_dead_diaeresis, IBUS_KEY_A, 0x01DE, +IBUS_KEY_underscore, IBUS_KEY_dead_diaeresis, IBUS_KEY_O, 0x022A, +IBUS_KEY_underscore, IBUS_KEY_dead_diaeresis, IBUS_KEY_U, 0x01D5, +IBUS_KEY_underscore, IBUS_KEY_dead_diaeresis, IBUS_KEY_a, 0x01DF, +IBUS_KEY_underscore, IBUS_KEY_dead_diaeresis, IBUS_KEY_o, 0x022B, +IBUS_KEY_underscore, IBUS_KEY_dead_diaeresis, IBUS_KEY_u, 0x01D6, +IBUS_KEY_underscore, IBUS_KEY_dead_ogonek, IBUS_KEY_O, 0x01EC, +IBUS_KEY_underscore, IBUS_KEY_dead_ogonek, IBUS_KEY_o, 0x01ED, +IBUS_KEY_underscore, IBUS_KEY_dead_belowdot, IBUS_KEY_L, 0x1E38, +IBUS_KEY_underscore, IBUS_KEY_dead_belowdot, IBUS_KEY_R, 0x1E5C, +IBUS_KEY_underscore, IBUS_KEY_dead_belowdot, IBUS_KEY_l, 0x1E39, +IBUS_KEY_underscore, IBUS_KEY_dead_belowdot, IBUS_KEY_r, 0x1E5D, +IBUS_KEY_grave, IBUS_KEY_quotedbl, IBUS_KEY_U, 0x01DB, +IBUS_KEY_grave, IBUS_KEY_quotedbl, IBUS_KEY_u, 0x01DC, +IBUS_KEY_grave, IBUS_KEY_quotedbl, IBUS_KEY_Greek_iota, 0x1FD2, +IBUS_KEY_grave, IBUS_KEY_quotedbl, IBUS_KEY_Greek_upsilon, 0x1FE2, +IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F0B, +IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_EPSILON, 0x1F1B, +IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F2B, +IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_IOTA, 0x1F3B, +IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMICRON, 0x1F4B, +IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_UPSILON, 0x1F5B, +IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1F6B, +IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F03, +IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_epsilon, 0x1F13, +IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F23, +IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_iota, 0x1F33, +IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_omicron, 0x1F43, +IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_upsilon, 0x1F53, +IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1F63, +IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F0A, +IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_EPSILON, 0x1F1A, +IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F2A, +IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_IOTA, 0x1F3A, +IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_OMICRON, 0x1F4A, +IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1F6A, +IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F02, +IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_epsilon, 0x1F12, +IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F22, +IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_iota, 0x1F32, +IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_omicron, 0x1F42, +IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_upsilon, 0x1F52, +IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1F62, +IBUS_KEY_grave, IBUS_KEY_plus, IBUS_KEY_O, 0x1EDC, +IBUS_KEY_grave, IBUS_KEY_plus, IBUS_KEY_U, 0x1EEA, +IBUS_KEY_grave, IBUS_KEY_plus, IBUS_KEY_o, 0x1EDD, +IBUS_KEY_grave, IBUS_KEY_plus, IBUS_KEY_u, 0x1EEB, +IBUS_KEY_grave, IBUS_KEY_asciicircum, IBUS_KEY_A, 0x1EA6, +IBUS_KEY_grave, IBUS_KEY_asciicircum, IBUS_KEY_E, 0x1EC0, +IBUS_KEY_grave, IBUS_KEY_asciicircum, IBUS_KEY_O, 0x1ED2, +IBUS_KEY_grave, IBUS_KEY_asciicircum, IBUS_KEY_a, 0x1EA7, +IBUS_KEY_grave, IBUS_KEY_asciicircum, IBUS_KEY_e, 0x1EC1, +IBUS_KEY_grave, IBUS_KEY_asciicircum, IBUS_KEY_o, 0x1ED3, +IBUS_KEY_grave, IBUS_KEY_underscore, IBUS_KEY_E, 0x1E14, +IBUS_KEY_grave, IBUS_KEY_underscore, IBUS_KEY_O, 0x1E50, +IBUS_KEY_grave, IBUS_KEY_underscore, IBUS_KEY_e, 0x1E15, +IBUS_KEY_grave, IBUS_KEY_underscore, IBUS_KEY_o, 0x1E51, +IBUS_KEY_grave, IBUS_KEY_b, IBUS_KEY_A, 0x1EB0, +IBUS_KEY_grave, IBUS_KEY_b, IBUS_KEY_a, 0x1EB1, +IBUS_KEY_grave, IBUS_KEY_macron, IBUS_KEY_E, 0x1E14, +IBUS_KEY_grave, IBUS_KEY_macron, IBUS_KEY_O, 0x1E50, +IBUS_KEY_grave, IBUS_KEY_macron, IBUS_KEY_e, 0x1E15, +IBUS_KEY_grave, IBUS_KEY_macron, IBUS_KEY_o, 0x1E51, +IBUS_KEY_grave, IBUS_KEY_dead_circumflex, IBUS_KEY_A, 0x1EA6, +IBUS_KEY_grave, IBUS_KEY_dead_circumflex, IBUS_KEY_E, 0x1EC0, +IBUS_KEY_grave, IBUS_KEY_dead_circumflex, IBUS_KEY_O, 0x1ED2, +IBUS_KEY_grave, IBUS_KEY_dead_circumflex, IBUS_KEY_a, 0x1EA7, +IBUS_KEY_grave, IBUS_KEY_dead_circumflex, IBUS_KEY_e, 0x1EC1, +IBUS_KEY_grave, IBUS_KEY_dead_circumflex, IBUS_KEY_o, 0x1ED3, +IBUS_KEY_grave, IBUS_KEY_dead_macron, IBUS_KEY_E, 0x1E14, +IBUS_KEY_grave, IBUS_KEY_dead_macron, IBUS_KEY_O, 0x1E50, +IBUS_KEY_grave, IBUS_KEY_dead_macron, IBUS_KEY_e, 0x1E15, +IBUS_KEY_grave, IBUS_KEY_dead_macron, IBUS_KEY_o, 0x1E51, +IBUS_KEY_grave, IBUS_KEY_dead_breve, IBUS_KEY_A, 0x1EB0, +IBUS_KEY_grave, IBUS_KEY_dead_breve, IBUS_KEY_a, 0x1EB1, +IBUS_KEY_grave, IBUS_KEY_dead_diaeresis, IBUS_KEY_U, 0x01DB, +IBUS_KEY_grave, IBUS_KEY_dead_diaeresis, IBUS_KEY_u, 0x01DC, +IBUS_KEY_grave, IBUS_KEY_dead_diaeresis, IBUS_KEY_Greek_iota, 0x1FD2, +IBUS_KEY_grave, IBUS_KEY_dead_diaeresis, IBUS_KEY_Greek_upsilon, 0x1FE2, +IBUS_KEY_grave, IBUS_KEY_dead_horn, IBUS_KEY_O, 0x1EDC, +IBUS_KEY_grave, IBUS_KEY_dead_horn, IBUS_KEY_U, 0x1EEA, +IBUS_KEY_grave, IBUS_KEY_dead_horn, IBUS_KEY_o, 0x1EDD, +IBUS_KEY_grave, IBUS_KEY_dead_horn, IBUS_KEY_u, 0x1EEB, +IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F0A, +IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_EPSILON, 0x1F1A, +IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F2A, +IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_IOTA, 0x1F3A, +IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMICRON, 0x1F4A, +IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1F6A, +IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F02, +IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_epsilon, 0x1F12, +IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F22, +IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_iota, 0x1F32, +IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omicron, 0x1F42, +IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_upsilon, 0x1F52, +IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1F62, +IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F0B, +IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_EPSILON, 0x1F1B, +IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F2B, +IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_IOTA, 0x1F3B, +IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMICRON, 0x1F4B, +IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_UPSILON, 0x1F5B, +IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1F6B, +IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F03, +IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_epsilon, 0x1F13, +IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F23, +IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_iota, 0x1F33, +IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omicron, 0x1F43, +IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_upsilon, 0x1F53, +IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1F63, +IBUS_KEY_b, IBUS_KEY_exclam, IBUS_KEY_A, 0x1EB6, +IBUS_KEY_b, IBUS_KEY_exclam, IBUS_KEY_a, 0x1EB7, +IBUS_KEY_b, IBUS_KEY_comma, IBUS_KEY_E, 0x1E1C, +IBUS_KEY_b, IBUS_KEY_comma, IBUS_KEY_e, 0x1E1D, +IBUS_KEY_b, IBUS_KEY_cedilla, IBUS_KEY_E, 0x1E1C, +IBUS_KEY_b, IBUS_KEY_cedilla, IBUS_KEY_e, 0x1E1D, +IBUS_KEY_b, IBUS_KEY_dead_cedilla, IBUS_KEY_E, 0x1E1C, +IBUS_KEY_b, IBUS_KEY_dead_cedilla, IBUS_KEY_e, 0x1E1D, +IBUS_KEY_b, IBUS_KEY_dead_belowdot, IBUS_KEY_A, 0x1EB6, +IBUS_KEY_b, IBUS_KEY_dead_belowdot, IBUS_KEY_a, 0x1EB7, +IBUS_KEY_c, IBUS_KEY_quotedbl, IBUS_KEY_U, 0x01D9, +IBUS_KEY_c, IBUS_KEY_quotedbl, IBUS_KEY_u, 0x01DA, +IBUS_KEY_c, IBUS_KEY_dead_diaeresis, IBUS_KEY_U, 0x01D9, +IBUS_KEY_c, IBUS_KEY_dead_diaeresis, IBUS_KEY_u, 0x01DA, +IBUS_KEY_o, IBUS_KEY_apostrophe, IBUS_KEY_A, 0x01FA, +IBUS_KEY_o, IBUS_KEY_apostrophe, IBUS_KEY_a, 0x01FB, +IBUS_KEY_asciitilde, IBUS_KEY_quotedbl, IBUS_KEY_Greek_iota, 0x1FD7, +IBUS_KEY_asciitilde, IBUS_KEY_quotedbl, IBUS_KEY_Greek_upsilon, 0x1FE7, +IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F0F, +IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F2F, +IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_IOTA, 0x1F3F, +IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_UPSILON, 0x1F5F, +IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1F6F, +IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F07, +IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F27, +IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_iota, 0x1F37, +IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_upsilon, 0x1F57, +IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1F67, +IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F0E, +IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F2E, +IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_IOTA, 0x1F3E, +IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1F6E, +IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F06, +IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F26, +IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_iota, 0x1F36, +IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_upsilon, 0x1F56, +IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1F66, +IBUS_KEY_asciitilde, IBUS_KEY_plus, IBUS_KEY_O, 0x1EE0, +IBUS_KEY_asciitilde, IBUS_KEY_plus, IBUS_KEY_U, 0x1EEE, +IBUS_KEY_asciitilde, IBUS_KEY_plus, IBUS_KEY_o, 0x1EE1, +IBUS_KEY_asciitilde, IBUS_KEY_plus, IBUS_KEY_u, 0x1EEF, +IBUS_KEY_asciitilde, IBUS_KEY_asciicircum, IBUS_KEY_A, 0x1EAA, +IBUS_KEY_asciitilde, IBUS_KEY_asciicircum, IBUS_KEY_E, 0x1EC4, +IBUS_KEY_asciitilde, IBUS_KEY_asciicircum, IBUS_KEY_O, 0x1ED6, +IBUS_KEY_asciitilde, IBUS_KEY_asciicircum, IBUS_KEY_a, 0x1EAB, +IBUS_KEY_asciitilde, IBUS_KEY_asciicircum, IBUS_KEY_e, 0x1EC5, +IBUS_KEY_asciitilde, IBUS_KEY_asciicircum, IBUS_KEY_o, 0x1ED7, +IBUS_KEY_asciitilde, IBUS_KEY_b, IBUS_KEY_A, 0x1EB4, +IBUS_KEY_asciitilde, IBUS_KEY_b, IBUS_KEY_a, 0x1EB5, +IBUS_KEY_asciitilde, IBUS_KEY_dead_circumflex, IBUS_KEY_A, 0x1EAA, +IBUS_KEY_asciitilde, IBUS_KEY_dead_circumflex, IBUS_KEY_E, 0x1EC4, +IBUS_KEY_asciitilde, IBUS_KEY_dead_circumflex, IBUS_KEY_O, 0x1ED6, +IBUS_KEY_asciitilde, IBUS_KEY_dead_circumflex, IBUS_KEY_a, 0x1EAB, +IBUS_KEY_asciitilde, IBUS_KEY_dead_circumflex, IBUS_KEY_e, 0x1EC5, +IBUS_KEY_asciitilde, IBUS_KEY_dead_circumflex, IBUS_KEY_o, 0x1ED7, +IBUS_KEY_asciitilde, IBUS_KEY_dead_breve, IBUS_KEY_A, 0x1EB4, +IBUS_KEY_asciitilde, IBUS_KEY_dead_breve, IBUS_KEY_a, 0x1EB5, +IBUS_KEY_asciitilde, IBUS_KEY_dead_diaeresis, IBUS_KEY_Greek_iota, 0x1FD7, +IBUS_KEY_asciitilde, IBUS_KEY_dead_diaeresis, IBUS_KEY_Greek_upsilon, 0x1FE7, +IBUS_KEY_asciitilde, IBUS_KEY_dead_horn, IBUS_KEY_O, 0x1EE0, +IBUS_KEY_asciitilde, IBUS_KEY_dead_horn, IBUS_KEY_U, 0x1EEE, +IBUS_KEY_asciitilde, IBUS_KEY_dead_horn, IBUS_KEY_o, 0x1EE1, +IBUS_KEY_asciitilde, IBUS_KEY_dead_horn, IBUS_KEY_u, 0x1EEF, +IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F0E, +IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F2E, +IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_IOTA, 0x1F3E, +IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1F6E, +IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F06, +IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F26, +IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_iota, 0x1F36, +IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_upsilon, 0x1F56, +IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1F66, +IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F0F, +IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F2F, +IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_IOTA, 0x1F3F, +IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_UPSILON, 0x1F5F, +IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1F6F, +IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F07, +IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F27, +IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_iota, 0x1F37, +IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_upsilon, 0x1F57, +IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1F67, +IBUS_KEY_macron, IBUS_KEY_exclam, IBUS_KEY_L, 0x1E38, +IBUS_KEY_macron, IBUS_KEY_exclam, IBUS_KEY_R, 0x1E5C, +IBUS_KEY_macron, IBUS_KEY_exclam, IBUS_KEY_l, 0x1E39, +IBUS_KEY_macron, IBUS_KEY_exclam, IBUS_KEY_r, 0x1E5D, +IBUS_KEY_macron, IBUS_KEY_quotedbl, IBUS_KEY_A, 0x01DE, +IBUS_KEY_macron, IBUS_KEY_quotedbl, IBUS_KEY_O, 0x022A, +IBUS_KEY_macron, IBUS_KEY_quotedbl, IBUS_KEY_U, 0x01D5, +IBUS_KEY_macron, IBUS_KEY_quotedbl, IBUS_KEY_a, 0x01DF, +IBUS_KEY_macron, IBUS_KEY_quotedbl, IBUS_KEY_o, 0x022B, +IBUS_KEY_macron, IBUS_KEY_quotedbl, IBUS_KEY_u, 0x01D6, +IBUS_KEY_macron, IBUS_KEY_period, IBUS_KEY_A, 0x01E0, +IBUS_KEY_macron, IBUS_KEY_period, IBUS_KEY_O, 0x0230, +IBUS_KEY_macron, IBUS_KEY_period, IBUS_KEY_a, 0x01E1, +IBUS_KEY_macron, IBUS_KEY_period, IBUS_KEY_o, 0x0231, +IBUS_KEY_macron, IBUS_KEY_semicolon, IBUS_KEY_O, 0x01EC, +IBUS_KEY_macron, IBUS_KEY_semicolon, IBUS_KEY_o, 0x01ED, +IBUS_KEY_macron, IBUS_KEY_asciitilde, IBUS_KEY_O, 0x022C, +IBUS_KEY_macron, IBUS_KEY_asciitilde, IBUS_KEY_o, 0x022D, +IBUS_KEY_macron, IBUS_KEY_dead_tilde, IBUS_KEY_O, 0x022C, +IBUS_KEY_macron, IBUS_KEY_dead_tilde, IBUS_KEY_o, 0x022D, +IBUS_KEY_macron, IBUS_KEY_dead_abovedot, IBUS_KEY_A, 0x01E0, +IBUS_KEY_macron, IBUS_KEY_dead_abovedot, IBUS_KEY_O, 0x0230, +IBUS_KEY_macron, IBUS_KEY_dead_abovedot, IBUS_KEY_a, 0x01E1, +IBUS_KEY_macron, IBUS_KEY_dead_abovedot, IBUS_KEY_o, 0x0231, +IBUS_KEY_macron, IBUS_KEY_dead_diaeresis, IBUS_KEY_A, 0x01DE, +IBUS_KEY_macron, IBUS_KEY_dead_diaeresis, IBUS_KEY_O, 0x022A, +IBUS_KEY_macron, IBUS_KEY_dead_diaeresis, IBUS_KEY_U, 0x01D5, +IBUS_KEY_macron, IBUS_KEY_dead_diaeresis, IBUS_KEY_a, 0x01DF, +IBUS_KEY_macron, IBUS_KEY_dead_diaeresis, IBUS_KEY_o, 0x022B, +IBUS_KEY_macron, IBUS_KEY_dead_diaeresis, IBUS_KEY_u, 0x01D6, +IBUS_KEY_macron, IBUS_KEY_dead_ogonek, IBUS_KEY_O, 0x01EC, +IBUS_KEY_macron, IBUS_KEY_dead_ogonek, IBUS_KEY_o, 0x01ED, +IBUS_KEY_macron, IBUS_KEY_dead_belowdot, IBUS_KEY_L, 0x1E38, +IBUS_KEY_macron, IBUS_KEY_dead_belowdot, IBUS_KEY_R, 0x1E5C, +IBUS_KEY_macron, IBUS_KEY_dead_belowdot, IBUS_KEY_l, 0x1E39, +IBUS_KEY_macron, IBUS_KEY_dead_belowdot, IBUS_KEY_r, 0x1E5D, +IBUS_KEY_acute, IBUS_KEY_quotedbl, IBUS_KEY_I, 0x1E2E, +IBUS_KEY_acute, IBUS_KEY_quotedbl, IBUS_KEY_U, 0x01D7, +IBUS_KEY_acute, IBUS_KEY_quotedbl, IBUS_KEY_i, 0x1E2F, +IBUS_KEY_acute, IBUS_KEY_quotedbl, IBUS_KEY_u, 0x01D8, +IBUS_KEY_acute, IBUS_KEY_quotedbl, IBUS_KEY_Greek_iota, 0x0390, +IBUS_KEY_acute, IBUS_KEY_quotedbl, IBUS_KEY_Greek_upsilon, 0x03B0, +IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F0D, +IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_EPSILON, 0x1F1D, +IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F2D, +IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_IOTA, 0x1F3D, +IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMICRON, 0x1F4D, +IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_UPSILON, 0x1F5D, +IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1F6D, +IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F05, +IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_epsilon, 0x1F15, +IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F25, +IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_iota, 0x1F35, +IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_omicron, 0x1F45, +IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_upsilon, 0x1F55, +IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1F65, +IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F0C, +IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_EPSILON, 0x1F1C, +IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F2C, +IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_IOTA, 0x1F3C, +IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_OMICRON, 0x1F4C, +IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1F6C, +IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F04, +IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_epsilon, 0x1F14, +IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F24, +IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_iota, 0x1F34, +IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_omicron, 0x1F44, +IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_upsilon, 0x1F54, +IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1F64, +IBUS_KEY_acute, IBUS_KEY_plus, IBUS_KEY_O, 0x1EDA, +IBUS_KEY_acute, IBUS_KEY_plus, IBUS_KEY_U, 0x1EE8, +IBUS_KEY_acute, IBUS_KEY_plus, IBUS_KEY_o, 0x1EDB, +IBUS_KEY_acute, IBUS_KEY_plus, IBUS_KEY_u, 0x1EE9, +IBUS_KEY_acute, IBUS_KEY_comma, IBUS_KEY_C, 0x1E08, +IBUS_KEY_acute, IBUS_KEY_comma, IBUS_KEY_c, 0x1E09, +IBUS_KEY_acute, IBUS_KEY_slash, IBUS_KEY_O, 0x01FE, +IBUS_KEY_acute, IBUS_KEY_slash, IBUS_KEY_o, 0x01FF, +IBUS_KEY_acute, IBUS_KEY_asciicircum, IBUS_KEY_A, 0x1EA4, +IBUS_KEY_acute, IBUS_KEY_asciicircum, IBUS_KEY_E, 0x1EBE, +IBUS_KEY_acute, IBUS_KEY_asciicircum, IBUS_KEY_O, 0x1ED0, +IBUS_KEY_acute, IBUS_KEY_asciicircum, IBUS_KEY_a, 0x1EA5, +IBUS_KEY_acute, IBUS_KEY_asciicircum, IBUS_KEY_e, 0x1EBF, +IBUS_KEY_acute, IBUS_KEY_asciicircum, IBUS_KEY_o, 0x1ED1, +IBUS_KEY_acute, IBUS_KEY_underscore, IBUS_KEY_E, 0x1E16, +IBUS_KEY_acute, IBUS_KEY_underscore, IBUS_KEY_O, 0x1E52, +IBUS_KEY_acute, IBUS_KEY_underscore, IBUS_KEY_e, 0x1E17, +IBUS_KEY_acute, IBUS_KEY_underscore, IBUS_KEY_o, 0x1E53, +IBUS_KEY_acute, IBUS_KEY_b, IBUS_KEY_A, 0x1EAE, +IBUS_KEY_acute, IBUS_KEY_b, IBUS_KEY_a, 0x1EAF, +IBUS_KEY_acute, IBUS_KEY_asciitilde, IBUS_KEY_O, 0x1E4C, +IBUS_KEY_acute, IBUS_KEY_asciitilde, IBUS_KEY_U, 0x1E78, +IBUS_KEY_acute, IBUS_KEY_asciitilde, IBUS_KEY_o, 0x1E4D, +IBUS_KEY_acute, IBUS_KEY_asciitilde, IBUS_KEY_u, 0x1E79, +IBUS_KEY_acute, IBUS_KEY_macron, IBUS_KEY_E, 0x1E16, +IBUS_KEY_acute, IBUS_KEY_macron, IBUS_KEY_O, 0x1E52, +IBUS_KEY_acute, IBUS_KEY_macron, IBUS_KEY_e, 0x1E17, +IBUS_KEY_acute, IBUS_KEY_macron, IBUS_KEY_o, 0x1E53, +IBUS_KEY_acute, IBUS_KEY_cedilla, IBUS_KEY_C, 0x1E08, +IBUS_KEY_acute, IBUS_KEY_cedilla, IBUS_KEY_c, 0x1E09, +IBUS_KEY_acute, IBUS_KEY_dead_circumflex, IBUS_KEY_A, 0x1EA4, +IBUS_KEY_acute, IBUS_KEY_dead_circumflex, IBUS_KEY_E, 0x1EBE, +IBUS_KEY_acute, IBUS_KEY_dead_circumflex, IBUS_KEY_O, 0x1ED0, +IBUS_KEY_acute, IBUS_KEY_dead_circumflex, IBUS_KEY_a, 0x1EA5, +IBUS_KEY_acute, IBUS_KEY_dead_circumflex, IBUS_KEY_e, 0x1EBF, +IBUS_KEY_acute, IBUS_KEY_dead_circumflex, IBUS_KEY_o, 0x1ED1, +IBUS_KEY_acute, IBUS_KEY_dead_tilde, IBUS_KEY_O, 0x1E4C, +IBUS_KEY_acute, IBUS_KEY_dead_tilde, IBUS_KEY_U, 0x1E78, +IBUS_KEY_acute, IBUS_KEY_dead_tilde, IBUS_KEY_o, 0x1E4D, +IBUS_KEY_acute, IBUS_KEY_dead_tilde, IBUS_KEY_u, 0x1E79, +IBUS_KEY_acute, IBUS_KEY_dead_macron, IBUS_KEY_E, 0x1E16, +IBUS_KEY_acute, IBUS_KEY_dead_macron, IBUS_KEY_O, 0x1E52, +IBUS_KEY_acute, IBUS_KEY_dead_macron, IBUS_KEY_e, 0x1E17, +IBUS_KEY_acute, IBUS_KEY_dead_macron, IBUS_KEY_o, 0x1E53, +IBUS_KEY_acute, IBUS_KEY_dead_breve, IBUS_KEY_A, 0x1EAE, +IBUS_KEY_acute, IBUS_KEY_dead_breve, IBUS_KEY_a, 0x1EAF, +IBUS_KEY_acute, IBUS_KEY_dead_diaeresis, IBUS_KEY_I, 0x1E2E, +IBUS_KEY_acute, IBUS_KEY_dead_diaeresis, IBUS_KEY_U, 0x01D7, +IBUS_KEY_acute, IBUS_KEY_dead_diaeresis, IBUS_KEY_i, 0x1E2F, +IBUS_KEY_acute, IBUS_KEY_dead_diaeresis, IBUS_KEY_u, 0x01D8, +IBUS_KEY_acute, IBUS_KEY_dead_diaeresis, IBUS_KEY_Greek_iota, 0x0390, +IBUS_KEY_acute, IBUS_KEY_dead_diaeresis, IBUS_KEY_Greek_upsilon, 0x03B0, +IBUS_KEY_acute, IBUS_KEY_dead_abovering, IBUS_KEY_A, 0x01FA, +IBUS_KEY_acute, IBUS_KEY_dead_abovering, IBUS_KEY_a, 0x01FB, +IBUS_KEY_acute, IBUS_KEY_dead_cedilla, IBUS_KEY_C, 0x1E08, +IBUS_KEY_acute, IBUS_KEY_dead_cedilla, IBUS_KEY_c, 0x1E09, +IBUS_KEY_acute, IBUS_KEY_dead_horn, IBUS_KEY_O, 0x1EDA, +IBUS_KEY_acute, IBUS_KEY_dead_horn, IBUS_KEY_U, 0x1EE8, +IBUS_KEY_acute, IBUS_KEY_dead_horn, IBUS_KEY_o, 0x1EDB, +IBUS_KEY_acute, IBUS_KEY_dead_horn, IBUS_KEY_u, 0x1EE9, +IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F0C, +IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_EPSILON, 0x1F1C, +IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F2C, +IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_IOTA, 0x1F3C, +IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMICRON, 0x1F4C, +IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1F6C, +IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F04, +IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_epsilon, 0x1F14, +IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F24, +IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_iota, 0x1F34, +IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omicron, 0x1F44, +IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_upsilon, 0x1F54, +IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1F64, +IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F0D, +IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_EPSILON, 0x1F1D, +IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F2D, +IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_IOTA, 0x1F3D, +IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMICRON, 0x1F4D, +IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_UPSILON, 0x1F5D, +IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1F6D, +IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F05, +IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_epsilon, 0x1F15, +IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F25, +IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_iota, 0x1F35, +IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omicron, 0x1F45, +IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_upsilon, 0x1F55, +IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1F65, +IBUS_KEY_acute, IBUS_KEY_KP_Divide, IBUS_KEY_O, 0x01FE, +IBUS_KEY_acute, IBUS_KEY_KP_Divide, IBUS_KEY_o, 0x01FF, +0x05C1, 0x05BC, IBUS_KEY_hebrew_shin, 0xFB2C, +0x05C2, 0x05BC, IBUS_KEY_hebrew_shin, 0xFB2D, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_Greek_alpha, 0x1FB4, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_Greek_eta, 0x1FC4, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_Greek_omega, 0x1FF4, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, 0x1F00, 0x1F84, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, 0x1F01, 0x1F85, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, 0x1F08, 0x1F8C, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, 0x1F09, 0x1F8D, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, 0x1F20, 0x1F94, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, 0x1F21, 0x1F95, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, 0x1F28, 0x1F9C, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, 0x1F29, 0x1F9D, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, 0x1F60, 0x1FA4, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, 0x1F61, 0x1FA5, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, 0x1F68, 0x1FAC, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, 0x1F69, 0x1FAD, +IBUS_KEY_Greek_iota, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F89, +IBUS_KEY_Greek_iota, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F99, +IBUS_KEY_Greek_iota, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FA9, +IBUS_KEY_Greek_iota, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F81, +IBUS_KEY_Greek_iota, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F91, +IBUS_KEY_Greek_iota, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA1, +IBUS_KEY_Greek_iota, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F88, +IBUS_KEY_Greek_iota, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F98, +IBUS_KEY_Greek_iota, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FA8, +IBUS_KEY_Greek_iota, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F80, +IBUS_KEY_Greek_iota, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F90, +IBUS_KEY_Greek_iota, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA0, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_Greek_alpha, 0x1FB2, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_Greek_eta, 0x1FC2, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_Greek_omega, 0x1FF2, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, 0x1F00, 0x1F82, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, 0x1F01, 0x1F83, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, 0x1F08, 0x1F8A, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, 0x1F09, 0x1F8B, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, 0x1F20, 0x1F92, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, 0x1F21, 0x1F93, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, 0x1F28, 0x1F9A, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, 0x1F29, 0x1F9B, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, 0x1F60, 0x1FA2, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, 0x1F61, 0x1FA3, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, 0x1F68, 0x1FAA, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, 0x1F69, 0x1FAB, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_Greek_alpha, 0x1FB7, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_Greek_eta, 0x1FC7, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_Greek_omega, 0x1FF7, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, 0x1F00, 0x1F86, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, 0x1F01, 0x1F87, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, 0x1F08, 0x1F8E, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, 0x1F09, 0x1F8F, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, 0x1F20, 0x1F96, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, 0x1F21, 0x1F97, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, 0x1F28, 0x1F9E, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, 0x1F29, 0x1F9F, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, 0x1F60, 0x1FA6, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, 0x1F61, 0x1FA7, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, 0x1F68, 0x1FAE, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, 0x1F69, 0x1FAF, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_Greek_alpha, 0x1FB4, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_Greek_eta, 0x1FC4, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_Greek_omega, 0x1FF4, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, 0x1F00, 0x1F84, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, 0x1F01, 0x1F85, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, 0x1F08, 0x1F8C, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, 0x1F09, 0x1F8D, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, 0x1F20, 0x1F94, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, 0x1F21, 0x1F95, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, 0x1F28, 0x1F9C, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, 0x1F29, 0x1F9D, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, 0x1F60, 0x1FA4, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, 0x1F61, 0x1FA5, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, 0x1F68, 0x1FAC, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, 0x1F69, 0x1FAD, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_Greek_alpha, 0x1FB2, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_Greek_eta, 0x1FC2, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_Greek_omega, 0x1FF2, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, 0x1F00, 0x1F82, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, 0x1F01, 0x1F83, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, 0x1F08, 0x1F8A, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, 0x1F09, 0x1F8B, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, 0x1F20, 0x1F92, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, 0x1F21, 0x1F93, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, 0x1F28, 0x1F9A, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, 0x1F29, 0x1F9B, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, 0x1F60, 0x1FA2, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, 0x1F61, 0x1FA3, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, 0x1F68, 0x1FAA, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, 0x1F69, 0x1FAB, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_Greek_alpha, 0x1FB4, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_Greek_eta, 0x1FC4, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_Greek_omega, 0x1FF4, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, 0x1F00, 0x1F84, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, 0x1F01, 0x1F85, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, 0x1F08, 0x1F8C, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, 0x1F09, 0x1F8D, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, 0x1F20, 0x1F94, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, 0x1F21, 0x1F95, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, 0x1F28, 0x1F9C, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, 0x1F29, 0x1F9D, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, 0x1F60, 0x1FA4, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, 0x1F61, 0x1FA5, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, 0x1F68, 0x1FAC, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, 0x1F69, 0x1FAD, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_Greek_alpha, 0x1FB7, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_Greek_eta, 0x1FC7, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_Greek_omega, 0x1FF7, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, 0x1F00, 0x1F86, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, 0x1F01, 0x1F87, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, 0x1F08, 0x1F8E, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, 0x1F09, 0x1F8F, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, 0x1F20, 0x1F96, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, 0x1F21, 0x1F97, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, 0x1F28, 0x1F9E, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, 0x1F29, 0x1F9F, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, 0x1F60, 0x1FA6, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, 0x1F61, 0x1FA7, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, 0x1F68, 0x1FAE, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, 0x1F69, 0x1FAF, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F88, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F98, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FA8, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F80, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F90, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA0, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F89, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F99, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FA9, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F81, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F91, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA1, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_0, IBUS_KEY_parenright, 0x2469, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_1, IBUS_KEY_parenright, 0x246A, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_2, IBUS_KEY_parenright, 0x246B, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_3, IBUS_KEY_parenright, 0x246C, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_4, IBUS_KEY_parenright, 0x246D, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_5, IBUS_KEY_parenright, 0x246E, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_6, IBUS_KEY_parenright, 0x246F, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_7, IBUS_KEY_parenright, 0x2470, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_8, IBUS_KEY_parenright, 0x2471, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_9, IBUS_KEY_parenright, 0x2472, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_KP_Space, IBUS_KEY_parenright, 0x246B, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_KP_0, IBUS_KEY_parenright, 0x2469, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_KP_1, IBUS_KEY_parenright, 0x246A, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_KP_2, IBUS_KEY_parenright, 0x246B, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_KP_3, IBUS_KEY_parenright, 0x246C, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_KP_4, IBUS_KEY_parenright, 0x246D, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_KP_5, IBUS_KEY_parenright, 0x246E, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_KP_6, IBUS_KEY_parenright, 0x246F, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_KP_7, IBUS_KEY_parenright, 0x2470, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_KP_8, IBUS_KEY_parenright, 0x2471, +IBUS_KEY_parenleft, IBUS_KEY_1, IBUS_KEY_KP_9, IBUS_KEY_parenright, 0x2472, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_0, IBUS_KEY_parenright, 0x2473, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_1, IBUS_KEY_parenright, 0x3251, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_2, IBUS_KEY_parenright, 0x3252, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_3, IBUS_KEY_parenright, 0x3253, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_4, IBUS_KEY_parenright, 0x3254, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_5, IBUS_KEY_parenright, 0x3255, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_6, IBUS_KEY_parenright, 0x3256, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_7, IBUS_KEY_parenright, 0x3257, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_8, IBUS_KEY_parenright, 0x3258, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_9, IBUS_KEY_parenright, 0x3259, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_KP_Space, IBUS_KEY_parenright, 0x3252, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_KP_0, IBUS_KEY_parenright, 0x2473, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_KP_1, IBUS_KEY_parenright, 0x3251, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_KP_2, IBUS_KEY_parenright, 0x3252, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_KP_3, IBUS_KEY_parenright, 0x3253, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_KP_4, IBUS_KEY_parenright, 0x3254, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_KP_5, IBUS_KEY_parenright, 0x3255, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_KP_6, IBUS_KEY_parenright, 0x3256, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_KP_7, IBUS_KEY_parenright, 0x3257, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_KP_8, IBUS_KEY_parenright, 0x3258, +IBUS_KEY_parenleft, IBUS_KEY_2, IBUS_KEY_KP_9, IBUS_KEY_parenright, 0x3259, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_0, IBUS_KEY_parenright, 0x325A, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_1, IBUS_KEY_parenright, 0x325B, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_2, IBUS_KEY_parenright, 0x325C, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_3, IBUS_KEY_parenright, 0x325D, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_4, IBUS_KEY_parenright, 0x325E, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_5, IBUS_KEY_parenright, 0x325F, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_6, IBUS_KEY_parenright, 0x32B1, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_7, IBUS_KEY_parenright, 0x32B2, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_8, IBUS_KEY_parenright, 0x32B3, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_9, IBUS_KEY_parenright, 0x32B4, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_KP_Space, IBUS_KEY_parenright, 0x325C, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_KP_0, IBUS_KEY_parenright, 0x325A, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_KP_1, IBUS_KEY_parenright, 0x325B, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_KP_2, IBUS_KEY_parenright, 0x325C, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_KP_3, IBUS_KEY_parenright, 0x325D, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_KP_4, IBUS_KEY_parenright, 0x325E, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_KP_5, IBUS_KEY_parenright, 0x325F, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_KP_6, IBUS_KEY_parenright, 0x32B1, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_KP_7, IBUS_KEY_parenright, 0x32B2, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_KP_8, IBUS_KEY_parenright, 0x32B3, +IBUS_KEY_parenleft, IBUS_KEY_3, IBUS_KEY_KP_9, IBUS_KEY_parenright, 0x32B4, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_0, IBUS_KEY_parenright, 0x32B5, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_1, IBUS_KEY_parenright, 0x32B6, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_2, IBUS_KEY_parenright, 0x32B7, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_3, IBUS_KEY_parenright, 0x32B8, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_4, IBUS_KEY_parenright, 0x32B9, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_5, IBUS_KEY_parenright, 0x32BA, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_6, IBUS_KEY_parenright, 0x32BB, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_7, IBUS_KEY_parenright, 0x32BC, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_8, IBUS_KEY_parenright, 0x32BD, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_9, IBUS_KEY_parenright, 0x32BE, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_KP_Space, IBUS_KEY_parenright, 0x32B7, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_KP_0, IBUS_KEY_parenright, 0x32B5, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_KP_1, IBUS_KEY_parenright, 0x32B6, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_KP_2, IBUS_KEY_parenright, 0x32B7, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_KP_3, IBUS_KEY_parenright, 0x32B8, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_KP_4, IBUS_KEY_parenright, 0x32B9, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_KP_5, IBUS_KEY_parenright, 0x32BA, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_KP_6, IBUS_KEY_parenright, 0x32BB, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_KP_7, IBUS_KEY_parenright, 0x32BC, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_KP_8, IBUS_KEY_parenright, 0x32BD, +IBUS_KEY_parenleft, IBUS_KEY_4, IBUS_KEY_KP_9, IBUS_KEY_parenright, 0x32BE, +IBUS_KEY_parenleft, IBUS_KEY_5, IBUS_KEY_KP_0, IBUS_KEY_parenright, 0x32BF, +IBUS_KEY_parenleft, 0x1100, 0x1161, IBUS_KEY_parenright, 0x326E, +IBUS_KEY_parenleft, 0x1102, 0x1161, IBUS_KEY_parenright, 0x326F, +IBUS_KEY_parenleft, 0x1103, 0x1161, IBUS_KEY_parenright, 0x3270, +IBUS_KEY_parenleft, 0x1105, 0x1161, IBUS_KEY_parenright, 0x3271, +IBUS_KEY_parenleft, 0x1106, 0x1161, IBUS_KEY_parenright, 0x3272, +IBUS_KEY_parenleft, 0x1107, 0x1161, IBUS_KEY_parenright, 0x3273, +IBUS_KEY_parenleft, 0x1109, 0x1161, IBUS_KEY_parenright, 0x3274, +IBUS_KEY_parenleft, 0x110B, 0x1161, IBUS_KEY_parenright, 0x3275, +IBUS_KEY_parenleft, 0x110C, 0x1161, IBUS_KEY_parenright, 0x3276, +IBUS_KEY_parenleft, 0x110E, 0x1161, IBUS_KEY_parenright, 0x3277, +IBUS_KEY_parenleft, 0x110F, 0x1161, IBUS_KEY_parenright, 0x3278, +IBUS_KEY_parenleft, 0x1110, 0x1161, IBUS_KEY_parenright, 0x3279, +IBUS_KEY_parenleft, 0x1111, 0x1161, IBUS_KEY_parenright, 0x327A, +IBUS_KEY_parenleft, 0x1112, 0x1161, IBUS_KEY_parenright, 0x327B, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_0, IBUS_KEY_parenright, 0x2473, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_1, IBUS_KEY_parenright, 0x3251, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_2, IBUS_KEY_parenright, 0x3252, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_3, IBUS_KEY_parenright, 0x3253, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_4, IBUS_KEY_parenright, 0x3254, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_5, IBUS_KEY_parenright, 0x3255, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_6, IBUS_KEY_parenright, 0x3256, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_7, IBUS_KEY_parenright, 0x3257, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_8, IBUS_KEY_parenright, 0x3258, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_9, IBUS_KEY_parenright, 0x3259, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_KP_Space, IBUS_KEY_parenright, 0x3252, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_KP_0, IBUS_KEY_parenright, 0x2473, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_KP_1, IBUS_KEY_parenright, 0x3251, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_KP_2, IBUS_KEY_parenright, 0x3252, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_KP_3, IBUS_KEY_parenright, 0x3253, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_KP_4, IBUS_KEY_parenright, 0x3254, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_KP_5, IBUS_KEY_parenright, 0x3255, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_KP_6, IBUS_KEY_parenright, 0x3256, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_KP_7, IBUS_KEY_parenright, 0x3257, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_KP_8, IBUS_KEY_parenright, 0x3258, +IBUS_KEY_parenleft, IBUS_KEY_KP_Space, IBUS_KEY_KP_9, IBUS_KEY_parenright, 0x3259, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_0, IBUS_KEY_parenright, 0x2469, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_1, IBUS_KEY_parenright, 0x246A, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_2, IBUS_KEY_parenright, 0x246B, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_3, IBUS_KEY_parenright, 0x246C, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_4, IBUS_KEY_parenright, 0x246D, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_5, IBUS_KEY_parenright, 0x246E, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_6, IBUS_KEY_parenright, 0x246F, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_7, IBUS_KEY_parenright, 0x2470, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_8, IBUS_KEY_parenright, 0x2471, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_9, IBUS_KEY_parenright, 0x2472, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_KP_Space, IBUS_KEY_parenright, 0x246B, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_KP_0, IBUS_KEY_parenright, 0x2469, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_KP_1, IBUS_KEY_parenright, 0x246A, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_KP_2, IBUS_KEY_parenright, 0x246B, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_KP_3, IBUS_KEY_parenright, 0x246C, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_KP_4, IBUS_KEY_parenright, 0x246D, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_KP_5, IBUS_KEY_parenright, 0x246E, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_KP_6, IBUS_KEY_parenright, 0x246F, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_KP_7, IBUS_KEY_parenright, 0x2470, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_KP_8, IBUS_KEY_parenright, 0x2471, +IBUS_KEY_parenleft, IBUS_KEY_KP_1, IBUS_KEY_KP_9, IBUS_KEY_parenright, 0x2472, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_0, IBUS_KEY_parenright, 0x2473, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_1, IBUS_KEY_parenright, 0x3251, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_2, IBUS_KEY_parenright, 0x3252, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_3, IBUS_KEY_parenright, 0x3253, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_4, IBUS_KEY_parenright, 0x3254, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_5, IBUS_KEY_parenright, 0x3255, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_6, IBUS_KEY_parenright, 0x3256, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_7, IBUS_KEY_parenright, 0x3257, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_8, IBUS_KEY_parenright, 0x3258, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_9, IBUS_KEY_parenright, 0x3259, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_KP_Space, IBUS_KEY_parenright, 0x3252, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_KP_0, IBUS_KEY_parenright, 0x2473, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_KP_1, IBUS_KEY_parenright, 0x3251, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_KP_2, IBUS_KEY_parenright, 0x3252, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_KP_3, IBUS_KEY_parenright, 0x3253, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_KP_4, IBUS_KEY_parenright, 0x3254, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_KP_5, IBUS_KEY_parenright, 0x3255, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_KP_6, IBUS_KEY_parenright, 0x3256, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_KP_7, IBUS_KEY_parenright, 0x3257, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_KP_8, IBUS_KEY_parenright, 0x3258, +IBUS_KEY_parenleft, IBUS_KEY_KP_2, IBUS_KEY_KP_9, IBUS_KEY_parenright, 0x3259, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_0, IBUS_KEY_parenright, 0x325A, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_1, IBUS_KEY_parenright, 0x325B, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_2, IBUS_KEY_parenright, 0x325C, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_3, IBUS_KEY_parenright, 0x325D, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_4, IBUS_KEY_parenright, 0x325E, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_5, IBUS_KEY_parenright, 0x325F, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_6, IBUS_KEY_parenright, 0x32B1, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_7, IBUS_KEY_parenright, 0x32B2, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_8, IBUS_KEY_parenright, 0x32B3, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_9, IBUS_KEY_parenright, 0x32B4, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_KP_Space, IBUS_KEY_parenright, 0x325C, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_KP_0, IBUS_KEY_parenright, 0x325A, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_KP_1, IBUS_KEY_parenright, 0x325B, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_KP_2, IBUS_KEY_parenright, 0x325C, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_KP_3, IBUS_KEY_parenright, 0x325D, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_KP_4, IBUS_KEY_parenright, 0x325E, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_KP_5, IBUS_KEY_parenright, 0x325F, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_KP_6, IBUS_KEY_parenright, 0x32B1, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_KP_7, IBUS_KEY_parenright, 0x32B2, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_KP_8, IBUS_KEY_parenright, 0x32B3, +IBUS_KEY_parenleft, IBUS_KEY_KP_3, IBUS_KEY_KP_9, IBUS_KEY_parenright, 0x32B4, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_0, IBUS_KEY_parenright, 0x32B5, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_1, IBUS_KEY_parenright, 0x32B6, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_2, IBUS_KEY_parenright, 0x32B7, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_3, IBUS_KEY_parenright, 0x32B8, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_4, IBUS_KEY_parenright, 0x32B9, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_5, IBUS_KEY_parenright, 0x32BA, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_6, IBUS_KEY_parenright, 0x32BB, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_7, IBUS_KEY_parenright, 0x32BC, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_8, IBUS_KEY_parenright, 0x32BD, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_9, IBUS_KEY_parenright, 0x32BE, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_KP_Space, IBUS_KEY_parenright, 0x32B7, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_KP_0, IBUS_KEY_parenright, 0x32B5, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_KP_1, IBUS_KEY_parenright, 0x32B6, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_KP_2, IBUS_KEY_parenright, 0x32B7, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_KP_3, IBUS_KEY_parenright, 0x32B8, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_KP_4, IBUS_KEY_parenright, 0x32B9, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_KP_5, IBUS_KEY_parenright, 0x32BA, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_KP_6, IBUS_KEY_parenright, 0x32BB, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_KP_7, IBUS_KEY_parenright, 0x32BC, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_KP_8, IBUS_KEY_parenright, 0x32BD, +IBUS_KEY_parenleft, IBUS_KEY_KP_4, IBUS_KEY_KP_9, IBUS_KEY_parenright, 0x32BE, +IBUS_KEY_parenleft, IBUS_KEY_KP_5, IBUS_KEY_KP_0, IBUS_KEY_parenright, 0x32BF, +IBUS_KEY_C, IBUS_KEY_C, IBUS_KEY_C, IBUS_KEY_P, 0x262D, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F8D, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F9D, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FAD, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F85, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F95, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA5, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F8C, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F9C, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FAC, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F84, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F94, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA4, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F8C, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F9C, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FAC, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F84, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F94, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA4, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F8D, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F9D, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FAD, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F85, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F95, +IBUS_KEY_Greek_iota, IBUS_KEY_apostrophe, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA5, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F8B, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F9B, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FAB, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F83, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F93, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA3, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F8A, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F9A, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FAA, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F82, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F92, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA2, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F8A, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F9A, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FAA, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F82, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F92, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA2, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F8B, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F9B, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FAB, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F83, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F93, +IBUS_KEY_Greek_iota, IBUS_KEY_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA3, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F8F, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F9F, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FAF, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F87, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F97, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA7, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F8E, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F9E, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FAE, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F86, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F96, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA6, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F8E, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F9E, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FAE, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F86, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F96, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA6, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F8F, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F9F, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FAF, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F87, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F97, +IBUS_KEY_Greek_iota, IBUS_KEY_asciitilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA7, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F8D, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F9D, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FAD, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F85, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F95, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA5, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F8C, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F9C, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FAC, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F84, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F94, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA4, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F8C, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F9C, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FAC, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F84, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F94, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA4, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F8D, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F9D, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FAD, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F85, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F95, +IBUS_KEY_Greek_iota, IBUS_KEY_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA5, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F8B, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F9B, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FAB, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F83, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F93, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA3, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F8A, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F9A, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FAA, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F82, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F92, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA2, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F8A, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F9A, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FAA, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F82, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F92, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA2, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F8B, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F9B, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FAB, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F83, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F93, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_grave, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA3, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F8D, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F9D, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FAD, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F85, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F95, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA5, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F8C, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F9C, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FAC, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F84, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F94, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA4, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F8C, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F9C, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FAC, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F84, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F94, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA4, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F8D, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F9D, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FAD, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F85, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F95, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_acute, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_omega, 0x1FA5, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_ALPHA, 0x1F8F, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_ETA, 0x1F9F, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_OMEGA, 0x1FAF, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_alpha, 0x1F87, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_eta, 0x1F97, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_parenleft, IBUS_KEY_Greek_omega, 0x1FA7, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_parenright, IBUS_KEY_Greek_ALPHA, 0x1F8E, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_parenright, IBUS_KEY_Greek_ETA, 0x1F9E, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_parenright, IBUS_KEY_Greek_OMEGA, 0x1FAE, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_parenright, IBUS_KEY_Greek_alpha, 0x1F86, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_parenright, IBUS_KEY_Greek_eta, 0x1F96, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_parenright, IBUS_KEY_Greek_omega, 0x1FA6, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ALPHA, 0x1F8E, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_ETA, 0x1F9E, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_OMEGA, 0x1FAE, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_alpha, 0x1F86, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_eta, 0x1F96, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_dead_psili, IBUS_KEY_Greek_omega, 0x1FA6, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ALPHA, 0x1F8F, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_ETA, 0x1F9F, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_OMEGA, 0x1FAF, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_alpha, 0x1F87, +IBUS_KEY_Greek_iota, IBUS_KEY_dead_tilde, IBUS_KEY_dead_dasia, IBUS_KEY_Greek_eta, 0x1F97, +}; + +#endif /* __GTK_IM_CONTEXT_SIMPLE_SEQS_H__ */ + diff --git a/src/ibus.h b/src/ibus.h index d724b6a76..ef811a4cc 100644 --- a/src/ibus.h +++ b/src/ibus.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,32 +19,32 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + #ifndef __IBUS_H_ #define __IBUS_H_ +#define __IBUS_H_INSIDE__ + #include -#include #include #include #include #include #include #include -#include -#include #include #include #include #include +#include +#include #include #include #include #include #include #include -#include -#include -#include +#include #include #include #include @@ -52,7 +53,14 @@ #include #include #include -#include +#include +#include + +#ifndef IBUS_DISABLE_DEPRECATED +#include +#endif + +#undef __IBUS_H_INSIDE__ #endif diff --git a/src/ibusattribute.c b/src/ibusattribute.c index 3a7c7a37f..aac14d48a 100644 --- a/src/ibusattribute.c +++ b/src/ibusattribute.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -23,26 +24,22 @@ /* functions prototype */ // static void ibus_attribute_destroy (IBusAttribute *attr); static gboolean ibus_attribute_serialize (IBusAttribute *attr, - IBusMessageIter *iter); -static gboolean ibus_attribute_deserialize (IBusAttribute *attr, - IBusMessageIter *iter); + GVariantBuilder *builder); +static gint ibus_attribute_deserialize (IBusAttribute *attr, + GVariant *variant); static gboolean ibus_attribute_copy (IBusAttribute *dest, const IBusAttribute *src); G_DEFINE_TYPE (IBusAttribute, ibus_attribute, IBUS_TYPE_SERIALIZABLE) static void -ibus_attribute_class_init (IBusAttributeClass *klass) +ibus_attribute_class_init (IBusAttributeClass *class) { - IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (klass); - - // object_class->destroy = (IBusObjectDestroyFunc) ibus_attribute_destroy; + IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (class); serializable_class->serialize = (IBusSerializableSerializeFunc) ibus_attribute_serialize; serializable_class->deserialize = (IBusSerializableDeserializeFunc) ibus_attribute_deserialize; serializable_class->copy = (IBusSerializableCopyFunc) ibus_attribute_copy; - - g_string_append (serializable_class->signature, "uuuu"); } static void @@ -50,66 +47,38 @@ ibus_attribute_init (IBusAttribute *attr) { } -// static void -// ibus_attribute_destroy (IBusAttribute *attr) -// { -// IBUS_OBJECT (ibus_attribute_parent_class)->destroy ((IBusObject *)attr); -// } - static gboolean ibus_attribute_serialize (IBusAttribute *attr, - IBusMessageIter *iter) + GVariantBuilder *builder) { gboolean retval; - retval = IBUS_SERIALIZABLE_CLASS (ibus_attribute_parent_class)->serialize ((IBusSerializable *) attr, iter); - g_return_val_if_fail (retval, FALSE); - - g_return_val_if_fail (IBUS_IS_ATTRIBUTE (attr), FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_UINT, &attr->type); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_UINT, &attr->value); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_UINT, &attr->start_index); + retval = IBUS_SERIALIZABLE_CLASS (ibus_attribute_parent_class)->serialize ((IBusSerializable *) attr, builder); g_return_val_if_fail (retval, FALSE); - retval = ibus_message_iter_append (iter, G_TYPE_UINT, &attr->end_index); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (builder, "u", attr->type); + g_variant_builder_add (builder, "u", attr->value); + g_variant_builder_add (builder, "u", attr->start_index); + g_variant_builder_add (builder, "u", attr->end_index); return TRUE; } -static gboolean -ibus_attribute_deserialize (IBusAttribute *attr, - IBusMessageIter *iter) +static gint +ibus_attribute_deserialize (IBusAttribute *attr, + GVariant *variant) { - gboolean retval; + gint retval; - retval = IBUS_SERIALIZABLE_CLASS (ibus_attribute_parent_class)->deserialize ((IBusSerializable *) attr, iter); - g_return_val_if_fail (retval, FALSE); + retval = IBUS_SERIALIZABLE_CLASS (ibus_attribute_parent_class)->deserialize ((IBusSerializable *) attr, variant); + g_return_val_if_fail (retval, 0); - g_return_val_if_fail (IBUS_IS_ATTRIBUTE (attr), FALSE); + g_variant_get_child (variant, retval++, "u", &attr->type); + g_variant_get_child (variant, retval++, "u", &attr->value); + g_variant_get_child (variant, retval++, "u", &attr->start_index); + g_variant_get_child (variant, retval++, "u", &attr->end_index); - retval = ibus_message_iter_get (iter, G_TYPE_UINT, &attr->type); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - - retval = ibus_message_iter_get (iter, G_TYPE_UINT, &attr->value); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - - retval = ibus_message_iter_get (iter, G_TYPE_UINT, &attr->start_index); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - - retval = ibus_message_iter_get (iter, G_TYPE_UINT, &attr->end_index); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - - return TRUE; + return retval; } @@ -155,6 +124,30 @@ ibus_attribute_new (guint type, return attr; } +guint +ibus_attribute_get_attr_type (IBusAttribute *attr) +{ + return attr->type; +} + +guint +ibus_attribute_get_value (IBusAttribute *attr) +{ + return attr->value; +} + +guint +ibus_attribute_get_start_index (IBusAttribute *attr) +{ + return attr->start_index; +} + +guint +ibus_attribute_get_end_index (IBusAttribute *attr) +{ + return attr->end_index; +} + IBusAttribute * ibus_attr_underline_new (guint underline_type, guint start_index, diff --git a/src/ibusattribute.h b/src/ibusattribute.h index 74f2b06db..7a7fcb64d 100644 --- a/src/ibusattribute.h +++ b/src/ibusattribute.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusattribute * @short_description: Attributes of IBusText. @@ -124,7 +130,7 @@ GType ibus_attribute_get_type (); * @value: Value of the attribute. * @start_index: Where attribute starts. * @end_index: Where attribute ends. - * @returns: A newly allocated IBusAttribute. + * @returns: (transfer none): A newly allocated IBusAttribute. * * New an IBusAttribute. */ @@ -132,14 +138,53 @@ IBusAttribute *ibus_attribute_new (guint type, guint value, guint start_index, guint end_index); + +/** + * ibus_attribute_get_attr_type: + * @returns: An enum of #IBusAttrType. + * + * Returns an enum of #IBusAttrType. + */ +guint ibus_attribute_get_attr_type + (IBusAttribute *attr); + +/** + * ibus_attribute_get_value: + * @returns: An unsigned int value relative with #IBusAttrType. + * + * Returns an unsigned int value relative with #IBusAttrType. + * If the type is %IBUS_ATTR_TYPE_UNDERLINE, the return value is + * #IBusAttrUnderline. If the type is %IBUS_ATTR_TYPE_FOREGROUND, + * the return value is the color RGB. + */ +guint ibus_attribute_get_value (IBusAttribute *attr); + +/** + * ibus_attribute_get_start_index: + * @returns: A start unsigned index + * + * Returns a start unsigned index + */ +guint ibus_attribute_get_start_index + (IBusAttribute *attr); + +/** + * ibus_attribute_get_end_index: + * @returns: A end unsigned index + * + * Returns a end unsigned index + */ +guint ibus_attribute_get_end_index + (IBusAttribute *attr); + /** * ibus_attr_underline_new: * @underline_type: Type of underline. * @start_index: Where attribute starts. * @end_index: Where attribute ends. - * @returns: A newly allocated IBusAttribute. + * @returns: (transfer none): A newly allocated #IBusAttribute. * - * New an underline IBusAttribute. + * New an underline #IBusAttribute. */ IBusAttribute *ibus_attr_underline_new (guint underline_type, guint start_index, @@ -149,9 +194,9 @@ IBusAttribute *ibus_attr_underline_new (guint underline_type, * @color: Color in RGB. * @start_index: Where attribute starts. * @end_index: Where attribute ends. - * @returns: A newly allocated IBusAttribute. + * @returns: (transfer none): A newly allocated #IBusAttribute. * - * New an foreground IBusAttribute. + * New an foreground #IBusAttribute. */ IBusAttribute *ibus_attr_foreground_new (guint color, guint start_index, @@ -161,9 +206,9 @@ IBusAttribute *ibus_attr_foreground_new (guint color, * @color: Color in RGB. * @start_index: Where attribute starts. * @end_index: Where attribute ends. - * @returns: A newly allocated IBusAttribute. + * @returns: (transfer none): A newly allocated #IBusAttribute. * - * New an background IBusAttribute. + * New an background #IBusAttribute. */ IBusAttribute *ibus_attr_background_new (guint color, guint start_index, diff --git a/src/ibusattrlist.c b/src/ibusattrlist.c index 00238828c..b90077c01 100644 --- a/src/ibusattrlist.c +++ b/src/ibusattrlist.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,33 +19,30 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include #include "ibusattrlist.h" /* functions prototype */ static void ibus_attr_list_destroy (IBusAttrList *attr_list); static gboolean ibus_attr_list_serialize (IBusAttrList *attr_list, - IBusMessageIter *iter); -static gboolean ibus_attr_list_deserialize (IBusAttrList *attr_list, - IBusMessageIter *iter); + GVariantBuilder *builder); +static gint ibus_attr_list_deserialize (IBusAttrList *attr_list, + GVariant *variant); static gboolean ibus_attr_list_copy (IBusAttrList *dest, const IBusAttrList *src); G_DEFINE_TYPE (IBusAttrList, ibus_attr_list, IBUS_TYPE_SERIALIZABLE) static void -ibus_attr_list_class_init (IBusAttrListClass *klass) +ibus_attr_list_class_init (IBusAttrListClass *class) { - IBusObjectClass *object_class = IBUS_OBJECT_CLASS (klass); - IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (klass); + IBusObjectClass *object_class = IBUS_OBJECT_CLASS (class); + IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (class); object_class->destroy = (IBusObjectDestroyFunc) ibus_attr_list_destroy; serializable_class->serialize = (IBusSerializableSerializeFunc) ibus_attr_list_serialize; serializable_class->deserialize = (IBusSerializableDeserializeFunc) ibus_attr_list_deserialize; serializable_class->copy = (IBusSerializableCopyFunc) ibus_attr_list_copy; - - g_string_append (serializable_class->signature, "av"); } static void @@ -76,66 +74,48 @@ ibus_attr_list_destroy (IBusAttrList *attr_list) static gboolean ibus_attr_list_serialize (IBusAttrList *attr_list, - IBusMessageIter *iter) + GVariantBuilder *builder) { - IBusMessageIter array_iter; gboolean retval; guint i; - retval = IBUS_SERIALIZABLE_CLASS (ibus_attr_list_parent_class)->serialize ((IBusSerializable *)attr_list, iter); + retval = IBUS_SERIALIZABLE_CLASS (ibus_attr_list_parent_class)->serialize ((IBusSerializable *)attr_list, builder); g_return_val_if_fail (retval, FALSE); g_return_val_if_fail (IBUS_IS_ATTR_LIST (attr_list), FALSE); - retval = ibus_message_iter_open_container (iter, - IBUS_TYPE_ARRAY, - "v", - &array_iter); - g_return_val_if_fail (retval, FALSE); + GVariantBuilder array; + g_variant_builder_init (&array, G_VARIANT_TYPE ("av")); for (i = 0;; i++) { IBusAttribute *attr; - attr = ibus_attr_list_get (attr_list, i); if (attr == NULL) break; - - retval = ibus_message_iter_append (&array_iter, IBUS_TYPE_ATTRIBUTE, &attr); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (&array, "v", ibus_serializable_serialize ((IBusSerializable *)attr)); } - - retval = ibus_message_iter_close_container (iter, &array_iter); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (builder, "av", &array); return TRUE; } -static gboolean +static gint ibus_attr_list_deserialize (IBusAttrList *attr_list, - IBusMessageIter *iter) + GVariant *variant) { - DBusMessageIter array_iter; - gboolean retval; - - retval = IBUS_SERIALIZABLE_CLASS (ibus_attr_list_parent_class)->deserialize ((IBusSerializable *)attr_list, iter); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_recurse (iter, IBUS_TYPE_ARRAY, &array_iter); - g_return_val_if_fail (retval, FALSE); - - while (ibus_message_iter_get_arg_type (&array_iter) != G_TYPE_INVALID) { - IBusAttribute *attr; - - retval = ibus_message_iter_get (&array_iter, IBUS_TYPE_ATTRIBUTE, &attr); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (&array_iter); - + gint retval = IBUS_SERIALIZABLE_CLASS (ibus_attr_list_parent_class)->deserialize ((IBusSerializable *)attr_list, variant); + g_return_val_if_fail (retval, 0); + + GVariantIter *iter = NULL; + g_variant_get_child (variant, retval++, "av", &iter); + GVariant *var; + while (g_variant_iter_loop (iter, "v", &var)) { + IBusAttribute *attr = IBUS_ATTRIBUTE (ibus_serializable_deserialize (var)); ibus_attr_list_append (attr_list, attr); } + g_variant_iter_free (iter); - ibus_message_iter_next (iter); - - return TRUE; + return retval; } diff --git a/src/ibusattrlist.h b/src/ibusattrlist.h index 69f68fc54..bbdf4bd15 100644 --- a/src/ibusattrlist.h +++ b/src/ibusattrlist.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusattrlist * @Title: IBusAttrList diff --git a/src/ibusbus.c b/src/ibusbus.c index 40d456671..ceed16aa1 100644 --- a/src/ibusbus.c +++ b/src/ibusbus.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -19,20 +20,23 @@ * Boston, MA 02111-1307, USA. */ +#include "ibusbus.h" #include #include #include #include #include -#include -#include "ibusbus.h" +#include "ibusmarshalers.h" #include "ibusinternal.h" #include "ibusshare.h" -#include "ibusconnection.h" #include "ibusenginedesc.h" #include "ibusserializable.h" #include "ibusconfig.h" +#define DBUS_PATH_DBUS "/org/freedesktop/DBus" +#define DBUS_SERVICE_DBUS "org.freedesktop.DBus" +#define DBUS_INTERFACE_DBUS "org.freedesktop.DBus" + #define IBUS_BUS_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_BUS, IBusBusPrivate)) @@ -40,6 +44,7 @@ enum { CONNECTED, DISCONNECTED, GLOBAL_ENGINE_CHANGED, + NAME_OWNER_CHANGED, LAST_SIGNAL, }; @@ -47,140 +52,211 @@ enum { /* IBusBusPriv */ struct _IBusBusPrivate { GFileMonitor *monitor; - IBusConnection *connection; + GDBusConnection *connection; gboolean watch_dbus_signal; + guint watch_dbus_signal_id; + gboolean watch_ibus_signal; + guint watch_ibus_signal_id; IBusConfig *config; gchar *unique_name; }; -typedef struct _IBusBusPrivate IBusBusPrivate; static guint bus_signals[LAST_SIGNAL] = { 0 }; static IBusBus *_bus = NULL; /* functions prototype */ -static GObject* ibus_bus_constructor (GType type, - guint n_params, - GObjectConstructParam - *params); -static void ibus_bus_destroy (IBusObject *object); -static void ibus_bus_watch_dbus_signal - (IBusBus *bus); -static void ibus_bus_unwatch_dbus_signal - (IBusBus *bus); +static GObject *ibus_bus_constructor (GType type, + guint n_params, + GObjectConstructParam *params); +static void ibus_bus_destroy (IBusObject *object); +static void ibus_bus_watch_dbus_signal (IBusBus *bus); +static void ibus_bus_unwatch_dbus_signal (IBusBus *bus); +static void ibus_bus_watch_ibus_signal (IBusBus *bus); +static void ibus_bus_unwatch_ibus_signal (IBusBus *bus); +static GVariant *ibus_bus_call_sync (IBusBus *bus, + const gchar *service, + const gchar *path, + const gchar *interface, + const gchar *member, + GVariant *parameters, + const GVariantType *reply_type); +static void ibus_bus_call_async (IBusBus *bus, + const gchar *service, + const gchar *path, + const gchar *interface, + const gchar *member, + GVariant *parameters, + const GVariantType *reply_type, + gpointer source_tag, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); G_DEFINE_TYPE (IBusBus, ibus_bus, IBUS_TYPE_OBJECT) -IBusBus * -ibus_bus_new (void) -{ - IBusBus *bus = IBUS_BUS (g_object_new (IBUS_TYPE_BUS, NULL)); - - return bus; -} - static void -ibus_bus_class_init (IBusBusClass *klass) +ibus_bus_class_init (IBusBusClass *class) { - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); - - g_type_class_add_private (klass, sizeof (IBusBusPrivate)); + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class); gobject_class->constructor = ibus_bus_constructor; ibus_object_class->destroy = ibus_bus_destroy; - // install signals + /* install signals */ /** * IBusBus::connected: + * @bus: The #IBusBus object which recevied the signal * - * Emitted when IBusBus is connected. + * Emitted when #IBusBus is connected to ibus-daemon. * - * Argument @user_data is ignored in this function. */ bus_signals[CONNECTED] = g_signal_new (I_("connected"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * IBusBus::disconnected: + * @bus: The #IBusBus object which recevied the signal * - * Emitted when IBusBus is disconnected. + * Emitted when #IBusBus is disconnected from ibus-daemon. * - * Argument @user_data is ignored in this function. */ bus_signals[DISCONNECTED] = g_signal_new (I_("disconnected"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * IBusBus::global-engine-changed: + * @bus: The #IBusBus object which recevied the signal + * @name: The name of the new global engine. * * Emitted when global engine is changed. * - * Argument @user_data is ignored in this function. */ bus_signals[GLOBAL_ENGINE_CHANGED] = g_signal_new (I_("global-engine-changed"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__STRING, G_TYPE_NONE, - 0); + 1, + G_TYPE_STRING); + + /** + * IBusBus::name-owner-changed: + * @bus: The #IBusBus object which recevied the signal + * @name: The name which ower is changed. + * @old_owner: The unique bus name of the old owner. + * @new_owner: The unique bus name of the new owner. + * + * Emitted when D-Bus name owner is changed. + * + */ + bus_signals[NAME_OWNER_CHANGED] = + g_signal_new (I_("name-owner-changed"), + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + _ibus_marshal_VOID__STRING_STRING_STRING, + G_TYPE_NONE, + 3, + G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); + + g_type_class_add_private (class, sizeof (IBusBusPrivate)); } -static gboolean -_connection_ibus_signal_cb (IBusConnection *connection, - IBusMessage *message, - IBusBus *bus) +static void +_connection_dbus_signal_cb (GDBusConnection *connection, + const gchar *sender_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *signal_name, + GVariant *parameters, + gpointer user_data) { - IBusBusPrivate *priv; - priv = IBUS_BUS_GET_PRIVATE (bus); - - if (ibus_message_is_signal (message, IBUS_INTERFACE_IBUS, - "GlobalEngineChanged")) { - g_signal_emit (bus, bus_signals[GLOBAL_ENGINE_CHANGED], 0); - return TRUE; + g_return_if_fail (user_data != NULL); + g_return_if_fail (IBUS_IS_BUS (user_data)); + + if (g_strcmp0 (signal_name, "NameOwnerChanged") == 0) { + gchar *name = NULL; + gchar *old_owner = NULL; + gchar *new_owner = NULL; + g_variant_get (parameters, "(&s&s&s)", &name, &old_owner, &new_owner); + g_signal_emit (IBUS_BUS (user_data), + bus_signals[NAME_OWNER_CHANGED], 0, + name, old_owner, new_owner); } - return FALSE; + /* FIXME handle other D-Bus signals if needed */ } static void -_connection_destroy_cb (IBusConnection *connection, - IBusBus *bus) +_connection_ibus_signal_cb (GDBusConnection *connection, + const gchar *sender_name, + const gchar *object_path, + const gchar *interface_name, + const gchar *signal_name, + GVariant *parameters, + gpointer user_data) { - g_assert (IBUS_IS_BUS (bus)); - g_assert (IBUS_IS_CONNECTION (connection)); + g_return_if_fail (user_data != NULL); + g_return_if_fail (IBUS_IS_BUS (user_data)); + + if (g_strcmp0 (signal_name, "GlobalEngineChanged") == 0) { + gchar *engine_name = NULL; + g_variant_get (parameters, "(&s)", &engine_name); + g_signal_emit (IBUS_BUS (user_data), + bus_signals[GLOBAL_ENGINE_CHANGED], 0, + engine_name); + } + /* FIXME handle org.freedesktop.IBus.RegistryChanged signal if needed */ +} - IBusBusPrivate *priv; - priv = IBUS_BUS_GET_PRIVATE (bus); +static void +_connection_closed_cb (GDBusConnection *connection, + gboolean remote_peer_vanished, + GError *error, + IBusBus *bus) +{ + if (error) { + /* We replaced g_warning with g_debug here because + * currently when ibus-daemon restarts, GTK client calls this and + * _g_dbus_worker_do_read_cb() sets the error message: + * "Underlying GIOStream returned 0 bytes on an async read" + * http://git.gnome.org/browse/glib/tree/gio/gdbusprivate.c#n693 + * However we think the error message is almost harmless. */ + g_debug ("_connection_closed_cb: %s", error->message); + } - g_assert (priv->connection == connection); - g_signal_handlers_disconnect_by_func (priv->connection, - G_CALLBACK (_connection_destroy_cb), - bus); - g_signal_handlers_disconnect_by_func (priv->connection, - G_CALLBACK (_connection_ibus_signal_cb), + g_assert (bus->priv->connection == connection); + g_signal_handlers_disconnect_by_func (bus->priv->connection, + G_CALLBACK (_connection_closed_cb), bus); - g_object_unref (priv->connection); - priv->connection = NULL; + g_object_unref (bus->priv->connection); + bus->priv->connection = NULL; - g_free (priv->unique_name); - priv->unique_name = NULL; + g_free (bus->priv->unique_name); + bus->priv->unique_name = NULL; + + bus->priv->watch_dbus_signal_id = 0; + bus->priv->watch_ibus_signal_id = 0; g_signal_emit (bus, bus_signals[DISCONNECTED], 0); } @@ -188,53 +264,39 @@ _connection_destroy_cb (IBusConnection *connection, static void ibus_bus_connect (IBusBus *bus) { - IBusBusPrivate *priv; - priv = IBUS_BUS_GET_PRIVATE (bus); - -#if 0 - socket_path = ibus_get_socket_path (); - - if (stat (socket_path, &buf) != 0) { - g_warning ("Can not get stat from %s!", socket_path); - return; - } - if (buf.st_uid != ibus_get_daemon_uid ()) { - g_warning ("The owner of %s is not %s!", socket_path, ibus_get_user_name ()); - return; + /* unref the old connection at first */ + if (bus->priv->connection != NULL) { + g_signal_handlers_disconnect_by_func (bus->priv->connection, + G_CALLBACK (_connection_closed_cb), + bus); + g_object_unref (bus->priv->connection); + bus->priv->connection = NULL; } - if (priv->connection != NULL) { - ibus_object_destroy ((IBusObject *) priv->connection); - } -#endif if (ibus_get_address () != NULL) { - priv->connection = ibus_connection_open (ibus_get_address ()); + bus->priv->connection = + g_dbus_connection_new_for_address_sync (ibus_get_address (), + G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT | + G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION, + NULL, NULL, NULL); } - if (priv->connection) { + if (bus->priv->connection) { + /* FIXME */ ibus_bus_hello (bus); - g_signal_connect (priv->connection, - "destroy", - (GCallback) _connection_destroy_cb, + g_signal_connect (bus->priv->connection, + "closed", + (GCallback) _connection_closed_cb, bus); - g_signal_emit (bus, bus_signals[CONNECTED], 0); - - if (priv->watch_dbus_signal) { + if (bus->priv->watch_dbus_signal) { ibus_bus_watch_dbus_signal (bus); } + if (bus->priv->watch_ibus_signal) { + ibus_bus_watch_ibus_signal (bus); + } - /** Watch ibus signals. */ - const gchar *rule = - "type='signal'," - "path='" IBUS_PATH_IBUS "'," - "interface='" IBUS_INTERFACE_IBUS "'"; - - ibus_bus_add_match (bus, rule); - g_signal_connect (priv->connection, - "ibus-signal", - (GCallback) _connection_ibus_signal_cb, - bus); + g_signal_emit (bus, bus_signals[CONNECTED], 0); } } @@ -263,13 +325,15 @@ ibus_bus_init (IBusBus *bus) gchar *path; GFile *file; - IBusBusPrivate *priv; - priv = IBUS_BUS_GET_PRIVATE (bus); + bus->priv = IBUS_BUS_GET_PRIVATE (bus); - priv->config = NULL; - priv->connection = NULL; - priv->watch_dbus_signal = FALSE; - priv->unique_name = NULL; + bus->priv->config = NULL; + bus->priv->connection = NULL; + bus->priv->watch_dbus_signal = FALSE; + bus->priv->watch_dbus_signal_id = 0; + bus->priv->watch_ibus_signal = FALSE; + bus->priv->watch_ibus_signal_id = 0; + bus->priv->unique_name = NULL; path = g_path_get_dirname (ibus_get_socket_path ()); @@ -285,11 +349,10 @@ ibus_bus_init (IBusBus *bus) ibus_bus_connect (bus); - file = g_file_new_for_path (ibus_get_socket_path ()); - priv->monitor = g_file_monitor_file (file, 0, NULL, NULL); + bus->priv->monitor = g_file_monitor_file (file, 0, NULL, NULL); - g_signal_connect (priv->monitor, "changed", (GCallback) _changed_cb, bus); + g_signal_connect (bus->priv->monitor, "changed", (GCallback) _changed_cb, bus); g_object_unref (file); g_free (path); @@ -319,49 +382,123 @@ ibus_bus_constructor (GType type, static void ibus_bus_destroy (IBusObject *object) { - IBusBus *bus; - IBusBusPrivate *priv; - - bus = IBUS_BUS (object); - priv = IBUS_BUS_GET_PRIVATE (bus); - g_assert (_bus == (IBusBus *)object); + + IBusBus * bus = _bus; _bus = NULL; - if (priv->monitor) { - g_object_unref (priv->monitor); - priv->monitor = NULL; + if (bus->priv->monitor) { + g_object_unref (bus->priv->monitor); + bus->priv->monitor = NULL; } - if (priv->config) { - ibus_object_destroy ((IBusObject *) priv->config); - priv->config = NULL; + if (bus->priv->config) { + ibus_proxy_destroy ((IBusProxy *) bus->priv->config); + bus->priv->config = NULL; } - if (priv->connection) { - ibus_object_destroy ((IBusObject *) priv->connection); - priv->connection = NULL; + if (bus->priv->connection) { + g_signal_handlers_disconnect_by_func (bus->priv->connection, + G_CALLBACK (_connection_closed_cb), + bus); + /* FIXME should use async close function */ + g_dbus_connection_close_sync (bus->priv->connection, NULL, NULL); + g_object_unref (bus->priv->connection); + bus->priv->connection = NULL; } - g_free (priv->unique_name); - priv->unique_name = NULL; + g_free (bus->priv->unique_name); + bus->priv->unique_name = NULL; IBUS_OBJECT_CLASS (ibus_bus_parent_class)->destroy (object); } +static gboolean +_async_finish_void (GAsyncResult *res, + GError **error) +{ + GSimpleAsyncResult *simple = (GSimpleAsyncResult *) res; + if (g_simple_async_result_propagate_error (simple, error)) + return FALSE; + return TRUE; +} + +static gchar * +_async_finish_object_path (GAsyncResult *res, + GError **error) +{ + GSimpleAsyncResult *simple = (GSimpleAsyncResult *) res; + if (g_simple_async_result_propagate_error (simple, error)) + return NULL; + GVariant *variant = g_simple_async_result_get_op_res_gpointer (simple); + g_return_val_if_fail (variant != NULL, NULL); + gchar *path = NULL; + g_variant_get (variant, "(&o)", &path); + return path; +} + +static gchar * +_async_finish_string (GAsyncResult *res, + GError **error) +{ + GSimpleAsyncResult *simple = (GSimpleAsyncResult *) res; + if (g_simple_async_result_propagate_error (simple, error)) + return NULL; + GVariant *variant = g_simple_async_result_get_op_res_gpointer (simple); + g_return_val_if_fail (variant != NULL, NULL); + gchar *s = NULL; + g_variant_get (variant, "(&s)", &s); + return s; +} + +static gboolean +_async_finish_gboolean (GAsyncResult *res, + GError **error) +{ + GSimpleAsyncResult *simple = (GSimpleAsyncResult *) res; + if (g_simple_async_result_propagate_error (simple, error)) + return FALSE; + GVariant *variant = g_simple_async_result_get_op_res_gpointer (simple); + g_return_val_if_fail (variant != NULL, FALSE); + gboolean retval = FALSE; + g_variant_get (variant, "(b)", &retval); + return retval; +} + +static guint +_async_finish_guint (GAsyncResult *res, + GError **error) +{ + static const guint bad_id = 0; + GSimpleAsyncResult *simple = (GSimpleAsyncResult *) res; + if (g_simple_async_result_propagate_error (simple, error)) + return bad_id; + GVariant *variant = g_simple_async_result_get_op_res_gpointer (simple); + g_return_val_if_fail (variant != NULL, bad_id); + + guint id = 0; + g_variant_get (variant, "(u)", &id); + return id; +} + +IBusBus * +ibus_bus_new (void) +{ + IBusBus *bus = IBUS_BUS (g_object_new (IBUS_TYPE_BUS, NULL)); + + return bus; +} + + gboolean ibus_bus_is_connected (IBusBus *bus) { - g_assert (IBUS_IS_BUS (bus)); - - IBusBusPrivate *priv; - priv = IBUS_BUS_GET_PRIVATE (bus); + g_return_val_if_fail (IBUS_IS_BUS (bus), FALSE); - if (priv->connection) { - return ibus_connection_is_connected (priv->connection); - } + if (bus->priv->connection == NULL || g_dbus_connection_is_closed (bus->priv->connection)) + return FALSE; - return FALSE; + return TRUE; } @@ -369,233 +506,257 @@ IBusInputContext * ibus_bus_create_input_context (IBusBus *bus, const gchar *client_name) { - g_assert (IBUS_IS_BUS (bus)); - g_assert (client_name != NULL); - - g_return_val_if_fail (ibus_bus_is_connected (bus), NULL); + g_return_val_if_fail (IBUS_IS_BUS (bus), NULL); + g_return_val_if_fail (client_name != NULL, NULL); gchar *path; - DBusMessage *call = NULL; - DBusMessage *reply = NULL; - IBusError *error; IBusInputContext *context = NULL; - IBusBusPrivate *priv; - priv = IBUS_BUS_GET_PRIVATE (bus); - - call = ibus_message_new_method_call (IBUS_SERVICE_IBUS, - IBUS_PATH_IBUS, - IBUS_INTERFACE_IBUS, - "CreateInputContext"); - ibus_message_append_args (call, - G_TYPE_STRING, &client_name, - G_TYPE_INVALID); - - reply = ibus_connection_send_with_reply_and_block (priv->connection, - call, - -1, - &error); - ibus_message_unref (call); - - if (reply == NULL) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - return NULL; - } - - if ((error = ibus_error_new_from_message (reply)) != NULL) { - g_warning ("%s: %s", error->name, error->message); - ibus_message_unref (reply); - ibus_error_free (error); - return NULL; - } - - if (!ibus_message_get_args (reply, - &error, - IBUS_TYPE_OBJECT_PATH, &path, - G_TYPE_INVALID)) { - g_warning ("%s: %s", error->name, error->message); - ibus_message_unref (reply); - ibus_error_free (error); - - return NULL; + GVariant *result; + result = ibus_bus_call_sync (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "CreateInputContext", + g_variant_new ("(s)", client_name), + G_VARIANT_TYPE ("(o)")); + + if (result != NULL) { + GError *error = NULL; + g_variant_get (result, "(&o)", &path); + context = ibus_input_context_new (path, bus->priv->connection, NULL, &error); + g_variant_unref (result); + if (context == NULL) { + g_warning ("ibus_bus_create_input_context: %s", error->message); + g_error_free (error); + } } - context = ibus_input_context_new (path, priv->connection); - ibus_message_unref (reply); - return context; } -IBusMessage * -ibus_bus_call_with_reply_valist (IBusBus *bus, - const gchar *name, - const gchar *path, - const gchar *interface, - const gchar *member, - GType first_arg_type, - va_list va_args) +static void +_create_input_context_async_step_two_done (GObject *source_object, + GAsyncResult *res, + GSimpleAsyncResult *simple) { - g_assert (IBUS_IS_BUS (bus)); - g_assert (name != NULL); - g_assert (path != NULL); - g_assert (interface != NULL); - g_assert (member); - - IBusMessage *message, *reply; - IBusError *error; - IBusBusPrivate *priv; - - g_return_val_if_fail (ibus_bus_is_connected (bus), FALSE); - - priv = IBUS_BUS_GET_PRIVATE (bus); + GError *error = NULL; + IBusInputContext *context = + ibus_input_context_new_async_finish (res, &error); + if (context == NULL) { + g_simple_async_result_set_from_error (simple, error); + g_error_free (error); + } + else { + g_simple_async_result_set_op_res_gpointer (simple, context, NULL); + } + g_simple_async_result_complete_in_idle (simple); + g_object_unref (simple); +} - message = ibus_message_new_method_call (name, path, interface, member); +static void +_create_input_context_async_step_one_done (GDBusConnection *connection, + GAsyncResult *res, + GSimpleAsyncResult *simple) +{ + GError *error = NULL; + GVariant *variant = g_dbus_connection_call_finish (connection, res, &error); + + if (variant == NULL) { + g_simple_async_result_set_from_error (simple, error); + g_error_free (error); + g_simple_async_result_complete_in_idle (simple); + g_object_unref (simple); + return; + } - ibus_message_append_args_valist (message, first_arg_type, va_args); + if (g_dbus_connection_is_closed (connection)) { + /* + * The connection is closed, can not contine next steps, so complete + * the asynchronous request with error. + */ + g_simple_async_result_set_error (simple, + G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Connection is closed."); + g_simple_async_result_complete_in_idle (simple); + return; + } - reply = ibus_connection_send_with_reply_and_block ( - priv->connection, - message, - -1, - &error); - ibus_message_unref (message); + const gchar *path = NULL; + g_variant_get (variant, "(&o)", &path); - if (reply == NULL) { - g_warning ("%s : %s", error->name, error->message); - ibus_error_free (error); - return NULL; - } - if ((error = ibus_error_new_from_message (reply)) != NULL) { - g_warning ("%s : %s", error->name, error->message); - ibus_error_free (error); - ibus_message_unref (reply); - return NULL; - } + IBusBus *bus = (IBusBus *)g_async_result_get_source_object ( + (GAsyncResult *)simple); + g_assert (IBUS_IS_BUS (bus)); - return reply; + GCancellable *cancellable = + (GCancellable *)g_object_get_data ((GObject *)simple, + "cancellable"); + + ibus_input_context_new_async (path, + bus->priv->connection, + cancellable, + (GAsyncReadyCallback)_create_input_context_async_step_two_done, + simple); + /* release the reference from g_async_result_get_source_object() */ + g_object_unref (bus); } -IBusMessage * -ibus_bus_call_with_reply (IBusBus *bus, - const gchar *name, - const gchar *path, - const gchar *interface, - const gchar *member, - GType first_arg_type, - ...) +void +ibus_bus_create_input_context_async (IBusBus *bus, + const gchar *client_name, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { - IBusMessage *reply; - va_list va_args; - - va_start (va_args, first_arg_type); - reply = ibus_bus_call_with_reply_valist ( - bus, name, path, interface, member, first_arg_type, va_args); - va_end (va_args); + g_return_if_fail (IBUS_IS_BUS (bus)); + g_return_if_fail (client_name != NULL); + g_return_if_fail (callback != NULL); + + GSimpleAsyncResult *simple = g_simple_async_result_new ((GObject *)bus, + callback, user_data, ibus_bus_create_input_context_async); + + if (cancellable != NULL) { + g_object_set_data_full ((GObject *)simple, + "concellable", + g_object_ref (cancellable), + (GDestroyNotify)g_object_unref); + } - return reply; + /* do not use ibus_bus_call_async, instread use g_dbus_connection_call + * directly, because we need two async steps for create an IBusInputContext. + * 1. Call CreateInputContext to request ibus-daemon create a remote IC. + * 2. New local IBusInputContext proxy of the remote IC + */ + g_dbus_connection_call (bus->priv->connection, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "CreateInputContext", + g_variant_new ("(s)", client_name), + G_VARIANT_TYPE("(o)"), + G_DBUS_CALL_FLAGS_NO_AUTO_START, + timeout_msec, + cancellable, + (GAsyncReadyCallback)_create_input_context_async_step_one_done, + simple); } -gboolean -ibus_bus_call (IBusBus *bus, - const gchar *name, - const gchar *path, - const gchar *interface, - const gchar *member, - GType first_arg_type, - ...) -{ - IBusMessage *reply; - va_list va_args; - - va_start (va_args, first_arg_type); - reply = ibus_bus_call_with_reply_valist ( - bus, name, path, interface, member, first_arg_type, va_args); - va_end (va_args); - - if (reply) { - ibus_message_unref (reply); - return TRUE; - } +IBusInputContext * +ibus_bus_create_input_context_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) +{ + g_assert (IBUS_IS_BUS (bus)); + g_assert (g_simple_async_result_is_valid (res, (GObject *) bus, + ibus_bus_create_input_context_async)); - return FALSE; + GSimpleAsyncResult *simple = (GSimpleAsyncResult *) res; + if (g_simple_async_result_propagate_error (simple, error)) + return NULL; + IBusInputContext *context = + g_simple_async_result_get_op_res_gpointer (simple); + g_assert (IBUS_IS_INPUT_CONTEXT (context)); + return context; } gchar * -ibus_bus_current_input_context(IBusBus *bus) +ibus_bus_current_input_context (IBusBus *bus) { - g_assert (IBUS_IS_BUS (bus)); - g_return_val_if_fail (ibus_bus_is_connected (bus), NULL); + g_return_val_if_fail (IBUS_IS_BUS (bus), NULL); gchar *path = NULL; - IBusMessage *reply = NULL; - IBusError *error = NULL; - - reply = ibus_bus_call_with_reply (bus, - IBUS_SERVICE_IBUS, - IBUS_PATH_IBUS, - IBUS_INTERFACE_IBUS, - "CurrentInputContext", - G_TYPE_INVALID); - - if (reply) { - if (ibus_message_get_args (reply, &error, - IBUS_TYPE_OBJECT_PATH, &path, - G_TYPE_INVALID)) { - path = g_strdup (path); - } else { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - } - - ibus_message_unref (reply); + GVariant *result; + result = ibus_bus_call_sync (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "CurrentInputContext", + NULL, + G_VARIANT_TYPE ("(o)")); + + if (result != NULL) { + g_variant_get (result, "(o)", &path); + g_variant_unref (result); } return path; } -static void -ibus_bus_watch_dbus_signal (IBusBus *bus) +void +ibus_bus_current_input_context_async (IBusBus *bus, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { - g_assert (IBUS_IS_BUS (bus)); - - const gchar *rule; - - rule = "type='signal'," \ - "path='" DBUS_PATH_DBUS "'," \ - "interface='" DBUS_INTERFACE_DBUS "'"; + g_return_if_fail (IBUS_IS_BUS (bus)); + + ibus_bus_call_async (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "CurrentInputContext", + NULL, + G_VARIANT_TYPE ("(o)"), + ibus_bus_current_input_context_async, + timeout_msec, + cancellable, + callback, + user_data); +} - ibus_bus_add_match (bus, rule); +gchar * +ibus_bus_current_input_context_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) +{ + g_assert (IBUS_IS_BUS (bus)); + g_assert (g_simple_async_result_is_valid (res, (GObject *) bus, + ibus_bus_current_input_context_async)); + return g_strdup (_async_finish_object_path (res, error)); +} +static void +ibus_bus_watch_dbus_signal (IBusBus *bus) +{ + g_return_if_fail (bus->priv->connection != NULL); + g_return_if_fail (bus->priv->watch_dbus_signal_id == 0); + + /* Subscribe to dbus signals such as NameOwnerChanged. */ + bus->priv->watch_dbus_signal_id + = g_dbus_connection_signal_subscribe (bus->priv->connection, + DBUS_SERVICE_DBUS, + DBUS_INTERFACE_DBUS, + "NameOwnerChanged", + DBUS_PATH_DBUS, + NULL /* arg0 */, + (GDBusSignalFlags) 0, + _connection_dbus_signal_cb, + bus, + NULL /* user_data_free_func */); + /* FIXME handle other D-Bus signals if needed */ } static void ibus_bus_unwatch_dbus_signal (IBusBus *bus) { - g_assert (IBUS_IS_BUS (bus)); - - const gchar *rule; - - rule = "type='signal'," \ - "path='" DBUS_PATH_DBUS "'," \ - "interface='" DBUS_INTERFACE_DBUS "'"; - - ibus_bus_remove_match (bus, rule); + g_return_if_fail (bus->priv->watch_dbus_signal_id != 0); + g_dbus_connection_signal_unsubscribe (bus->priv->connection, + bus->priv->watch_dbus_signal_id); + bus->priv->watch_dbus_signal_id = 0; } void ibus_bus_set_watch_dbus_signal (IBusBus *bus, gboolean watch) { - g_assert (IBUS_IS_BUS (bus)); - - IBusBusPrivate *priv; - priv = IBUS_BUS_GET_PRIVATE (bus); + g_return_if_fail (IBUS_IS_BUS (bus)); - if (priv->watch_dbus_signal == watch) + if (bus->priv->watch_dbus_signal == watch) return; - priv->watch_dbus_signal = watch; + bus->priv->watch_dbus_signal = watch; if (ibus_bus_is_connected (bus)) { if (watch) { @@ -607,102 +768,223 @@ ibus_bus_set_watch_dbus_signal (IBusBus *bus, } } -const gchar * -ibus_bus_hello (IBusBus *bus) +static void +ibus_bus_watch_ibus_signal (IBusBus *bus) { - g_assert (IBUS_IS_BUS (bus)); + g_return_if_fail (bus->priv->connection != NULL); + g_return_if_fail (bus->priv->watch_ibus_signal_id == 0); + + /* Subscribe to ibus signals such as GlboalEngineChanged. */ + bus->priv->watch_ibus_signal_id + = g_dbus_connection_signal_subscribe (bus->priv->connection, + "org.freedesktop.IBus", + IBUS_INTERFACE_IBUS, + "GlobalEngineChanged", + IBUS_PATH_IBUS, + NULL /* arg0 */, + (GDBusSignalFlags) 0, + _connection_ibus_signal_cb, + bus, + NULL /* user_data_free_func */); + /* FIXME handle org.freedesktop.IBus.RegistryChanged signal if needed */ +} - gchar *unique_name = NULL; - IBusMessage *reply = NULL; - IBusError *error = NULL; - IBusBusPrivate *priv; +static void +ibus_bus_unwatch_ibus_signal (IBusBus *bus) +{ + g_return_if_fail (bus->priv->watch_ibus_signal_id != 0); + g_dbus_connection_signal_unsubscribe (bus->priv->connection, + bus->priv->watch_ibus_signal_id); + bus->priv->watch_ibus_signal_id = 0; +} - priv = IBUS_BUS_GET_PRIVATE (bus); +void +ibus_bus_set_watch_ibus_signal (IBusBus *bus, + gboolean watch) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); - g_free (priv->unique_name); - priv->unique_name = NULL; - - reply = ibus_bus_call_with_reply (bus, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "Hello", - G_TYPE_INVALID); - - if (reply) { - if (ibus_message_get_args (reply, &error, G_TYPE_STRING, &unique_name, - G_TYPE_INVALID)) { - priv->unique_name = g_strdup (unique_name); - } else { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - } + if (bus->priv->watch_ibus_signal == watch) + return; + + bus->priv->watch_ibus_signal = watch; - ibus_message_unref (reply); + if (ibus_bus_is_connected (bus)) { + if (watch) { + ibus_bus_watch_ibus_signal (bus); + } + else { + ibus_bus_unwatch_ibus_signal (bus); + } } +} + +const gchar * +ibus_bus_hello (IBusBus *bus) +{ + g_return_val_if_fail (IBUS_IS_BUS (bus), NULL); + g_return_val_if_fail (ibus_bus_is_connected (bus), NULL); - return priv->unique_name; + /* gdbus connection will say hello by self. */ + if (bus->priv->connection) + return g_dbus_connection_get_unique_name (bus->priv->connection); + return NULL; } -guint +guint32 ibus_bus_request_name (IBusBus *bus, const gchar *name, - guint flags) + guint32 flags) { - g_assert (IBUS_IS_BUS (bus)); - - IBusMessage *reply = NULL; - IBusError *error = NULL; - guint retval = 0; - - reply = ibus_bus_call_with_reply (bus, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "RequestName", - G_TYPE_STRING, &name, - G_TYPE_UINT, &flags, - G_TYPE_INVALID); - - if (reply) { - if (!ibus_message_get_args (reply, &error, G_TYPE_UINT, &retval, - G_TYPE_INVALID)) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - } - - ibus_message_unref (reply); + g_return_val_if_fail (IBUS_IS_BUS (bus), 0); + g_return_val_if_fail (name != NULL, 0); + + guint32 retval = 0; + GVariant *result; + result = ibus_bus_call_sync (bus, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + "RequestName", + g_variant_new ("(su)", name, flags), + G_VARIANT_TYPE ("(u)")); + + if (result) { + g_variant_get (result, "(u)", &retval); + g_variant_unref (result); } return retval; } +void +ibus_bus_request_name_async (IBusBus *bus, + const gchar *name, + guint flags, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + g_return_if_fail (name != NULL); + + ibus_bus_call_async (bus, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + "RequestName", + g_variant_new ("(su)", name, flags), + G_VARIANT_TYPE ("(u)"), + ibus_bus_request_name_async, + timeout_msec, + cancellable, + callback, + user_data); +} + +guint +ibus_bus_request_name_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) +{ + g_assert (IBUS_IS_BUS (bus)); + g_assert (g_simple_async_result_is_valid (res, (GObject *) bus, + ibus_bus_request_name_async)); + return _async_finish_guint (res, error); +} + guint ibus_bus_release_name (IBusBus *bus, const gchar *name) { - g_assert (IBUS_IS_BUS (bus)); + g_return_val_if_fail (IBUS_IS_BUS (bus), 0); + g_return_val_if_fail (name != NULL, 0); - IBusMessage *reply = NULL; - IBusError *error = NULL; guint retval = 0; + GVariant *result; + result = ibus_bus_call_sync (bus, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + "ReleaseName", + g_variant_new ("(s)", name), + G_VARIANT_TYPE ("(u)")); + + if (result) { + g_variant_get (result, "(u)", &retval); + g_variant_unref (result); + } - reply = ibus_bus_call_with_reply (bus, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "ReleaseName", - G_TYPE_STRING, &name, - G_TYPE_INVALID); - - if (reply) { - if (!ibus_message_get_args (reply, &error, G_TYPE_UINT, &retval, - G_TYPE_INVALID)) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - } + return retval; +} + +void +ibus_bus_release_name_async (IBusBus *bus, + const gchar *name, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + g_return_if_fail (name != NULL); + + ibus_bus_call_async (bus, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + "ReleaseName", + g_variant_new ("(s)", name), + G_VARIANT_TYPE ("(u)"), + ibus_bus_release_name_async, + timeout_msec, + cancellable, + callback, + user_data); +} - ibus_message_unref (reply); +guint +ibus_bus_release_name_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) +{ + g_assert (IBUS_IS_BUS (bus)); + g_assert (g_simple_async_result_is_valid (res, (GObject *) bus, + ibus_bus_release_name_async)); + return _async_finish_guint (res, error); +} + +GList * +ibus_bus_list_queued_owners (IBusBus *bus, + const gchar *name) +{ + GList *retval = NULL; + GVariant *result; + + g_return_val_if_fail (IBUS_IS_BUS (bus), NULL); + g_return_val_if_fail (name != NULL, NULL); + + result = ibus_bus_call_sync (bus, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + "ListQueuedOwners", + g_variant_new ("(s)", name), + G_VARIANT_TYPE ("(as)")); + + if (result) { + GVariantIter *iter = NULL; + const gchar *name = NULL; + g_variant_get (result, "(as)", &iter); + while (g_variant_iter_loop (iter, "&s", &name)) { + if (name == NULL) { + continue; + } + retval = g_list_append (retval, g_strdup (name)); + } + g_variant_iter_free (iter); + g_variant_unref (result); } return retval; @@ -712,230 +994,524 @@ gboolean ibus_bus_name_has_owner (IBusBus *bus, const gchar *name) { - g_assert (IBUS_IS_BUS (bus)); + g_return_val_if_fail (IBUS_IS_BUS (bus), FALSE); + g_return_val_if_fail (name != NULL, FALSE); - IBusMessage *reply = NULL; - IBusError *error = NULL; gboolean retval = FALSE; - - reply = ibus_bus_call_with_reply (bus, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "NameHasOwner", - G_TYPE_STRING, &name, - G_TYPE_INVALID); - - if (reply) { - if (!ibus_message_get_args (reply, &error, G_TYPE_BOOLEAN, &retval, - G_TYPE_INVALID)) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - } - - ibus_message_unref (reply); + GVariant *result; + result = ibus_bus_call_sync (bus, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + "NameHasOwner", + g_variant_new ("(s)", name), + G_VARIANT_TYPE ("(b)")); + + if (result) { + g_variant_get (result, "(b)", &retval); + g_variant_unref (result); } return retval; } +void +ibus_bus_name_has_owner_async (IBusBus *bus, + const gchar *name, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + g_return_if_fail (name != NULL); + + ibus_bus_call_async (bus, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + "NameHasOwner", + g_variant_new ("(s)", name), + G_VARIANT_TYPE ("(b)"), + ibus_bus_name_has_owner_async, + timeout_msec, + cancellable, + callback, + user_data); +} + +gboolean +ibus_bus_name_has_owner_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) +{ + g_assert (IBUS_IS_BUS (bus)); + g_assert (g_simple_async_result_is_valid (res, (GObject *) bus, + ibus_bus_name_has_owner_async)); + return _async_finish_gboolean (res, error); +} + GList * ibus_bus_list_names (IBusBus *bus) { + g_return_val_if_fail (IBUS_IS_BUS (bus), NULL); return NULL; } -void +gboolean ibus_bus_add_match (IBusBus *bus, const gchar *rule) { - g_assert (IBUS_IS_BUS (bus)); - - ibus_bus_call (bus, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "AddMatch", - G_TYPE_STRING, &rule, - G_TYPE_INVALID); + g_return_val_if_fail (IBUS_IS_BUS (bus), FALSE); + g_return_val_if_fail (rule != NULL, FALSE); + + GVariant *result; + result = ibus_bus_call_sync (bus, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + "AddMatch", + g_variant_new ("(s)", rule), + NULL); + + if (result) { + g_variant_unref (result); + return TRUE; + } + return FALSE; } void +ibus_bus_add_match_async (IBusBus *bus, + const gchar *rule, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + g_return_if_fail (rule != NULL); + + ibus_bus_call_async (bus, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + "AddMatch", + g_variant_new ("(s)", rule), + NULL, + ibus_bus_add_match_async, + timeout_msec, + cancellable, + callback, + user_data); +} + +gboolean +ibus_bus_add_match_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) +{ + g_assert (IBUS_IS_BUS (bus)); + g_assert (g_simple_async_result_is_valid (res, (GObject *) bus, + ibus_bus_add_match_async)); + return _async_finish_void (res, error); +} + +gboolean ibus_bus_remove_match (IBusBus *bus, const gchar *rule) { - g_assert (IBUS_IS_BUS (bus)); + g_return_val_if_fail (IBUS_IS_BUS (bus), FALSE); + g_return_val_if_fail (rule != NULL, FALSE); + + GVariant *result; + result = ibus_bus_call_sync (bus, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + "RemoveMatch", + g_variant_new ("(s)", rule), + NULL); + + if (result) { + g_variant_unref (result); + return TRUE; + } + return FALSE; +} - ibus_bus_call (bus, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "RemoveMatch", - G_TYPE_STRING, &rule, - G_TYPE_INVALID); +void +ibus_bus_remove_match_async (IBusBus *bus, + const gchar *rule, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + g_return_if_fail (rule != NULL); + + ibus_bus_call_async (bus, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + "RemoveMatch", + g_variant_new ("(s)", rule), + NULL, + ibus_bus_remove_match_async, + timeout_msec, + cancellable, + callback, + user_data); +} + +gboolean +ibus_bus_remove_match_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) +{ + g_assert (IBUS_IS_BUS (bus)); + g_assert (g_simple_async_result_is_valid (res, (GObject *) bus, + ibus_bus_remove_match_async)); + return _async_finish_void (res, error); } gchar * ibus_bus_get_name_owner (IBusBus *bus, const gchar *name) { - g_assert (IBUS_IS_BUS (bus)); - - gchar *owner = NULL; - IBusMessage *reply = NULL; - IBusError *error = NULL; - - reply = ibus_bus_call_with_reply (bus, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "GetNameOwner", - G_TYPE_STRING, &name, - G_TYPE_INVALID); - - if (reply) { - if (ibus_message_get_args (reply, &error, G_TYPE_STRING, &owner, - G_TYPE_INVALID)) { - owner = g_strdup (owner); - } else { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - } - - ibus_message_unref (reply); + g_return_val_if_fail (IBUS_IS_BUS (bus), NULL); + g_return_val_if_fail (name != NULL, NULL); + + gchar *retval = NULL; + GVariant *result; + result = ibus_bus_call_sync (bus, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + "GetNameOwner", + g_variant_new ("(s)", name), + G_VARIANT_TYPE ("(s)")); + + if (result) { + g_variant_get (result, "(s)", &retval); + g_variant_unref (result); } - return owner; + return retval; } -IBusConnection * -ibus_bus_get_connection (IBusBus *bus) +void +ibus_bus_get_name_owner_async (IBusBus *bus, + const gchar *name, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + g_return_if_fail (name != NULL); + + ibus_bus_call_async (bus, + DBUS_SERVICE_DBUS, + DBUS_PATH_DBUS, + DBUS_INTERFACE_DBUS, + "GetNameOwner", + g_variant_new ("(s)", name), + G_VARIANT_TYPE ("(s)"), + ibus_bus_get_name_owner_async, + timeout_msec, + cancellable, + callback, + user_data); +} + +gchar * +ibus_bus_get_name_owner_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) { g_assert (IBUS_IS_BUS (bus)); + g_assert (g_simple_async_result_is_valid (res, (GObject *) bus, + ibus_bus_get_name_owner_async)); + return g_strdup (_async_finish_string (res, error)); +} - IBusBusPrivate *priv; - priv = IBUS_BUS_GET_PRIVATE (bus); +GDBusConnection * +ibus_bus_get_connection (IBusBus *bus) +{ + g_return_val_if_fail (IBUS_IS_BUS (bus), NULL); - return priv->connection; + return bus->priv->connection; } gboolean ibus_bus_exit (IBusBus *bus, gboolean restart) { - g_assert (IBUS_IS_BUS (bus)); + g_return_val_if_fail (IBUS_IS_BUS (bus), FALSE); + + GVariant *result; + result = ibus_bus_call_sync (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "Exit", + g_variant_new ("(b)", restart), + NULL); + + if (result) { + g_variant_unref (result); + return TRUE; + } + return FALSE; +} - IBusBusPrivate *priv; - priv = IBUS_BUS_GET_PRIVATE (bus); +void +ibus_bus_exit_async (IBusBus *bus, + gboolean restart, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + + ibus_bus_call_async (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "Exit", + g_variant_new ("(b)", restart), + NULL, + ibus_bus_exit_async, + timeout_msec, + cancellable, + callback, + user_data); +} - gboolean result; - result = ibus_bus_call (bus, - IBUS_SERVICE_IBUS, - IBUS_PATH_IBUS, - IBUS_INTERFACE_IBUS, - "Exit", - G_TYPE_BOOLEAN, &restart, - G_TYPE_INVALID); - return result; +gboolean +ibus_bus_exit_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) +{ + g_assert (IBUS_IS_BUS (bus)); + g_assert (g_simple_async_result_is_valid (res, (GObject *) bus, + ibus_bus_exit_async)); + return _async_finish_void (res, error); } gboolean ibus_bus_register_component (IBusBus *bus, IBusComponent *component) { - g_assert (IBUS_IS_BUS (bus)); - g_assert (IBUS_IS_COMPONENT (component)); - - gboolean result; + g_return_val_if_fail (IBUS_IS_BUS (bus), FALSE); + g_return_val_if_fail (IBUS_IS_COMPONENT (component), FALSE); + + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)component); + GVariant *result = ibus_bus_call_sync (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "RegisterComponent", + g_variant_new ("(v)", variant), + NULL); + if (result) { + g_variant_unref (result); + return TRUE; + } + return FALSE; +} - result = ibus_bus_call (bus, - IBUS_SERVICE_IBUS, - IBUS_PATH_IBUS, - IBUS_INTERFACE_IBUS, - "RegisterComponent", - IBUS_TYPE_COMPONENT, &component, - G_TYPE_INVALID); +void +ibus_bus_register_component_async (IBusBus *bus, + IBusComponent *component, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + g_return_if_fail (IBUS_IS_COMPONENT (component)); + + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)component); + ibus_bus_call_async (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "RegisterComponent", + g_variant_new ("(v)", variant), + NULL, + ibus_bus_register_component_async, + timeout_msec, + cancellable, + callback, + user_data); +} - return result; +gboolean +ibus_bus_register_component_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) +{ + g_assert (IBUS_IS_BUS (bus)); + g_assert (g_simple_async_result_is_valid (res, (GObject *) bus, + ibus_bus_register_component_async)); + return _async_finish_void (res, error); } static GList * ibus_bus_do_list_engines (IBusBus *bus, gboolean active_engines_only) { - g_assert (IBUS_IS_BUS (bus)); - - IBusMessage *message, *reply; - IBusError *error; - gboolean retval; - IBusBusPrivate *priv; - IBusMessageIter iter, subiter; - GList *engines; - const gchar* member = active_engines_only ? "ListActiveEngines" : "ListEngines"; - - priv = IBUS_BUS_GET_PRIVATE (bus); - message = ibus_message_new_method_call (IBUS_SERVICE_IBUS, - IBUS_PATH_IBUS, - IBUS_INTERFACE_IBUS, - member); - reply = ibus_connection_send_with_reply_and_block (priv->connection, - message, - -1, - &error); - ibus_message_unref (message); - - if (reply == NULL) { - g_warning ("%s : %s", error->name, error->message); - ibus_error_free (error); - return NULL; + g_return_val_if_fail (IBUS_IS_BUS (bus), NULL); + + GList *retval = NULL; + GVariant *result; + result = ibus_bus_call_sync (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + active_engines_only ? "ListActiveEngines" : "ListEngines", + NULL, + G_VARIANT_TYPE ("(av)")); + + if (result) { + GVariantIter *iter = NULL; + g_variant_get (result, "(av)", &iter); + GVariant *var; + while (g_variant_iter_loop (iter, "v", &var)) { + IBusSerializable *serializable = ibus_serializable_deserialize (var); + g_object_ref_sink (serializable); + retval = g_list_append (retval, serializable); + } + g_variant_iter_free (iter); + g_variant_unref (result); } - if ((error = ibus_error_new_from_message (reply)) != NULL) { - g_warning ("%s : %s", error->name, error->message); - ibus_error_free (error); - ibus_message_unref (reply); - return NULL; - } + return retval; +} - retval = ibus_message_iter_init (reply, &iter); - if (!retval) { - error = ibus_error_new_from_printf (DBUS_ERROR_INVALID_ARGS, - "Message does not have arguments!"); - g_warning ("%s : %s", error->name, error->message); - ibus_error_free (error); - ibus_message_unref (reply); - return NULL; - } +GList * +ibus_bus_list_engines (IBusBus *bus) +{ + return ibus_bus_do_list_engines (bus, FALSE); +} + +void +ibus_bus_list_engines_async (IBusBus *bus, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + + ibus_bus_call_async (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "ListEngines", + NULL, + G_VARIANT_TYPE ("(av)"), + ibus_bus_list_engines_async, + timeout_msec, + cancellable, + callback, + user_data); +} - if (!ibus_message_iter_recurse (&iter, IBUS_TYPE_ARRAY, &subiter)) { - ibus_message_unref (reply); +GList * +ibus_bus_list_engines_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) +{ + GSimpleAsyncResult *simple = (GSimpleAsyncResult *) res; + if (g_simple_async_result_propagate_error (simple, error)) return NULL; + GVariant *variant = g_simple_async_result_get_op_res_gpointer (simple); + g_return_val_if_fail (variant != NULL, NULL); + + GList *retval = NULL; + GVariantIter *iter = NULL; + g_variant_get (variant, "(av)", &iter); + GVariant *var; + while (g_variant_iter_loop (iter, "v", &var)) { + IBusSerializable *serializable = ibus_serializable_deserialize (var); + g_object_ref_sink (serializable); + retval = g_list_append (retval, serializable); } + g_variant_iter_free (iter); + return retval; +} - engines = NULL; - while (ibus_message_iter_get_arg_type (&subiter) != G_TYPE_INVALID) { - IBusSerializable *object = NULL; - if (!ibus_message_iter_get (&subiter, IBUS_TYPE_ENGINE_DESC, &object) || !object) { - g_warning ("Unexpected type is returned from %s", member); - continue; - } - engines = g_list_append (engines, object); - ibus_message_iter_next (&subiter); - }; +GList * +ibus_bus_list_active_engines (IBusBus *bus) +{ + return ibus_bus_do_list_engines (bus, TRUE); +} - ibus_message_unref (reply); - return engines; +void +ibus_bus_list_active_engines_async (IBusBus *bus, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + + ibus_bus_call_async (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "ListActiveEngines", + NULL, + G_VARIANT_TYPE ("(av)"), + ibus_bus_list_active_engines_async, + timeout_msec, + cancellable, + callback, + user_data); } GList * -ibus_bus_list_engines (IBusBus *bus) +ibus_bus_list_active_engines_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) { - return ibus_bus_do_list_engines (bus, FALSE); + return ibus_bus_list_engines_async_finish (bus, res, error); } -GList * -ibus_bus_list_active_engines (IBusBus *bus) +IBusEngineDesc ** +ibus_bus_get_engines_by_names (IBusBus *bus, + const gchar * const *names) { - return ibus_bus_do_list_engines (bus, TRUE); + g_return_val_if_fail (IBUS_IS_BUS (bus), NULL); + + GVariant *result; + result = ibus_bus_call_sync (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "GetEnginesByNames", + g_variant_new("(^as)", names), + G_VARIANT_TYPE ("(av)")); + if (result == NULL) + return NULL; + + GArray *array = g_array_new (TRUE, TRUE, sizeof (IBusEngineDesc *)); + GVariantIter *iter = NULL; + g_variant_get (result, "(av)", &iter); + GVariant *var; + while (g_variant_iter_loop (iter, "v", &var)) { + IBusEngineDesc *desc = (IBusEngineDesc *) ibus_serializable_deserialize (var); + g_object_ref_sink (desc); + g_array_append_val (array, desc); + } + g_variant_iter_free (iter); + g_variant_unref (result); + + return (IBusEngineDesc **)g_array_free (array, FALSE); } static void @@ -961,7 +1537,7 @@ ibus_bus_get_config (IBusBus *bus) priv = IBUS_BUS_GET_PRIVATE (bus); if (priv->config == NULL && priv->connection) { - priv->config = ibus_config_new (priv->connection); + priv->config = ibus_config_new (priv->connection, NULL, NULL); if (priv->config) { g_signal_connect (priv->config, "destroy", G_CALLBACK (_config_destroy_cb), bus); } @@ -973,129 +1549,396 @@ ibus_bus_get_config (IBusBus *bus) gboolean ibus_bus_get_use_sys_layout (IBusBus *bus) { - g_assert (IBUS_IS_BUS (bus)); + g_return_val_if_fail (IBUS_IS_BUS (bus), FALSE); - IBusMessage *reply = NULL; - IBusError *error = NULL; - gboolean use_sys_layout = FALSE; - - reply = ibus_bus_call_with_reply (bus, - IBUS_SERVICE_IBUS, - IBUS_PATH_IBUS, - IBUS_INTERFACE_IBUS, - "GetUseSysLayout", - G_TYPE_INVALID); - if (reply) { - if (!ibus_message_get_args (reply, &error, G_TYPE_BOOLEAN, - &use_sys_layout, G_TYPE_INVALID)) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - } - - ibus_message_unref (reply); + gboolean retval = FALSE; + GVariant *result; + result = ibus_bus_call_sync (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "GetUseSysLayout", + NULL, + G_VARIANT_TYPE ("(b)")); + + if (result) { + g_variant_get (result, "(b)", &retval); + g_variant_unref (result); } - return use_sys_layout; + return retval; +} + +void +ibus_bus_get_use_sys_layout_async (IBusBus *bus, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + + ibus_bus_call_async (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "GetUseSysLayout", + NULL, + G_VARIANT_TYPE ("(b)"), + ibus_bus_get_use_sys_layout_async, + timeout_msec, + cancellable, + callback, + user_data); } gboolean -ibus_bus_get_use_global_engine (IBusBus *bus) +ibus_bus_get_use_sys_layout_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) { g_assert (IBUS_IS_BUS (bus)); + g_assert (g_simple_async_result_is_valid (res, (GObject *) bus, + ibus_bus_get_use_sys_layout_async)); + return _async_finish_gboolean (res, error); +} - IBusMessage *reply = NULL; - IBusError *error = NULL; - gboolean use_global_engine = FALSE; - - reply = ibus_bus_call_with_reply (bus, - IBUS_SERVICE_IBUS, - IBUS_PATH_IBUS, - IBUS_INTERFACE_IBUS, - "GetUseGlobalEngine", - G_TYPE_INVALID); - if (reply) { - if (!ibus_message_get_args (reply, &error, G_TYPE_BOOLEAN, - &use_global_engine, G_TYPE_INVALID)) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - } +gboolean +ibus_bus_get_use_global_engine (IBusBus *bus) +{ + g_return_val_if_fail (IBUS_IS_BUS (bus), FALSE); - ibus_message_unref (reply); + gboolean retval = FALSE; + GVariant *result; + result = ibus_bus_call_sync (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "GetUseGlobalEngine", + NULL, + G_VARIANT_TYPE ("(b)")); + + if (result) { + g_variant_get (result, "(b)", &retval); + g_variant_unref (result); } - return use_global_engine; + return retval; +} + +void +ibus_bus_get_use_global_engine_async (IBusBus *bus, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + + ibus_bus_call_async (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "GetUseGlobalEngine", + NULL, + G_VARIANT_TYPE ("(b)"), + ibus_bus_get_use_global_engine_async, + timeout_msec, + cancellable, + callback, + user_data); } gboolean -ibus_bus_is_global_engine_enabled (IBusBus *bus) +ibus_bus_get_use_global_engine_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) { g_assert (IBUS_IS_BUS (bus)); + g_assert (g_simple_async_result_is_valid (res, (GObject *) bus, + ibus_bus_get_use_global_engine_async)); + return _async_finish_gboolean (res, error); +} - IBusMessage *reply = NULL; - IBusError *error = NULL; - gboolean global_engine_enabled = FALSE; - - reply = ibus_bus_call_with_reply (bus, - IBUS_SERVICE_IBUS, - IBUS_PATH_IBUS, - IBUS_INTERFACE_IBUS, - "IsGlobalEngineEnabled", - G_TYPE_INVALID); - if (reply) { - if (!ibus_message_get_args (reply, &error, G_TYPE_BOOLEAN, - &global_engine_enabled, G_TYPE_INVALID)) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - } +gboolean +ibus_bus_is_global_engine_enabled (IBusBus *bus) +{ + g_return_val_if_fail (IBUS_IS_BUS (bus), FALSE); - ibus_message_unref (reply); + gboolean retval = FALSE; + GVariant *result; + result = ibus_bus_call_sync (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "IsGlobalEngineEnabled", + NULL, + G_VARIANT_TYPE ("(b)")); + + if (result) { + g_variant_get (result, "(b)", &retval); + g_variant_unref (result); } - return global_engine_enabled; + return retval; } -IBusEngineDesc * -ibus_bus_get_global_engine (IBusBus *bus) +void ibus_bus_is_global_engine_enabled_async (IBusBus *bus, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + + ibus_bus_call_async (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "IsGlobalEngineEnabled", + NULL, + G_VARIANT_TYPE ("(b)"), + ibus_bus_is_global_engine_enabled_async, + timeout_msec, + cancellable, + callback, + user_data); +} + +gboolean ibus_bus_is_global_engine_enabled_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) { g_assert (IBUS_IS_BUS (bus)); + g_assert (g_simple_async_result_is_valid (res, (GObject *) bus, + ibus_bus_is_global_engine_enabled_async)); + return _async_finish_gboolean (res, error); +} - IBusMessage *reply = NULL; - IBusError *error = NULL; - IBusEngineDesc *global_engine = NULL; - - reply = ibus_bus_call_with_reply (bus, - IBUS_SERVICE_IBUS, - IBUS_PATH_IBUS, - IBUS_INTERFACE_IBUS, - "GetGlobalEngine", - G_TYPE_INVALID); - if (reply) { - if (!ibus_message_get_args (reply, &error, IBUS_TYPE_ENGINE_DESC, - &global_engine, G_TYPE_INVALID)) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); +IBusEngineDesc * +ibus_bus_get_global_engine (IBusBus *bus) +{ + g_return_val_if_fail (IBUS_IS_BUS (bus), NULL); + + GVariant *result; + IBusEngineDesc *engine = NULL; + result = ibus_bus_call_sync (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "GetGlobalEngine", + NULL, + G_VARIANT_TYPE ("(v)")); + + if (result) { + GVariant *variant = NULL; + g_variant_get (result, "(v)", &variant); + if (variant) { + engine = IBUS_ENGINE_DESC (ibus_serializable_deserialize (variant)); + g_variant_unref (variant); } - - ibus_message_unref (reply); + g_variant_unref (result); } - return global_engine; + return engine; +} + +void +ibus_bus_get_global_engine_async (IBusBus *bus, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + + ibus_bus_call_async (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "GetGlobalEngine", + NULL, + G_VARIANT_TYPE ("(v)"), + ibus_bus_get_global_engine_async, + timeout_msec, + cancellable, + callback, + user_data); +} + +IBusEngineDesc * +ibus_bus_get_global_engine_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) +{ + GSimpleAsyncResult *simple = (GSimpleAsyncResult *) res; + if (g_simple_async_result_propagate_error (simple, error)) + return NULL; + GVariant *variant = g_simple_async_result_get_op_res_gpointer (simple); + g_return_val_if_fail (variant != NULL, NULL); + GVariant *inner_variant = NULL; + g_variant_get (variant, "(v)", &inner_variant); + + IBusEngineDesc *engine = NULL; + if (inner_variant) { + engine = IBUS_ENGINE_DESC (ibus_serializable_deserialize (inner_variant)); + g_variant_unref (inner_variant); + } + return engine; } gboolean ibus_bus_set_global_engine (IBusBus *bus, const gchar *global_engine) +{ + g_return_val_if_fail (IBUS_IS_BUS (bus), FALSE); + g_return_val_if_fail (global_engine != NULL, FALSE); + + GVariant *result; + result = ibus_bus_call_sync (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "SetGlobalEngine", + g_variant_new ("(s)", global_engine), + NULL); + + if (result) { + g_variant_unref (result); + return TRUE; + } + return FALSE; +} + +void +ibus_bus_set_global_engine_async (IBusBus *bus, + const gchar *global_engine, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (IBUS_IS_BUS (bus)); + g_return_if_fail (global_engine != NULL); + + ibus_bus_call_async (bus, + IBUS_SERVICE_IBUS, + IBUS_PATH_IBUS, + IBUS_INTERFACE_IBUS, + "SetGlobalEngine", + g_variant_new ("(s)", global_engine), + NULL, /* no return value */ + ibus_bus_set_global_engine_async, + timeout_msec, + cancellable, + callback, + user_data); +} + +gboolean +ibus_bus_set_global_engine_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error) +{ + g_assert (IBUS_IS_BUS (bus)); + g_assert (g_simple_async_result_is_valid (res, (GObject *) bus, + ibus_bus_set_global_engine_async)); + return _async_finish_void (res, error); +} + +static GVariant * +ibus_bus_call_sync (IBusBus *bus, + const gchar *bus_name, + const gchar *path, + const gchar *interface, + const gchar *member, + GVariant *parameters, + const GVariantType *reply_type) { g_assert (IBUS_IS_BUS (bus)); + g_assert (member != NULL); + g_return_val_if_fail (ibus_bus_is_connected (bus), NULL); - gboolean result; - result = ibus_bus_call (bus, - IBUS_SERVICE_IBUS, - IBUS_PATH_IBUS, - IBUS_INTERFACE_IBUS, - "SetGlobalEngine", - G_TYPE_STRING, &global_engine, - G_TYPE_INVALID); + GError *error = NULL; + GVariant *result; + result = g_dbus_connection_call_sync (bus->priv->connection, + bus_name, + path, + interface, + member, + parameters, + reply_type, + G_DBUS_CALL_FLAGS_NO_AUTO_START, + ibus_get_timeout (), + NULL, + &error); + + if (result == NULL) { + g_warning ("ibus_bus_call_sync: %s.%s: %s", interface, member, error->message); + g_error_free (error); + return NULL; + } return result; } + +static void +ibus_bus_call_async_done (GDBusConnection *connection, + GAsyncResult *res, + gpointer user_data) +{ + g_assert (G_IS_DBUS_CONNECTION (connection)); + + GSimpleAsyncResult *simple = (GSimpleAsyncResult *) user_data; + GError *error = NULL; + GVariant *variant = g_dbus_connection_call_finish (connection, res, &error); + + if (variant == NULL) { + /* Replace with g_simple_async_result_take_error in glib 2.28 */ + g_simple_async_result_set_from_error (simple, error); + g_error_free (error); + } + else { + g_simple_async_result_set_op_res_gpointer (simple, variant, + (GDestroyNotify) g_variant_unref); + } + g_simple_async_result_complete (simple); + g_object_unref (simple); +} + +static void +ibus_bus_call_async (IBusBus *bus, + const gchar *bus_name, + const gchar *path, + const gchar *interface, + const gchar *member, + GVariant *parameters, + const GVariantType *reply_type, + gpointer source_tag, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_assert (IBUS_IS_BUS (bus)); + g_assert (member != NULL); + g_return_if_fail (ibus_bus_is_connected (bus)); + + GSimpleAsyncResult *simple = g_simple_async_result_new ((GObject*) bus, + callback, + user_data, + source_tag); + + g_dbus_connection_call (bus->priv->connection, + bus_name, + path, + interface, + member, + parameters, + reply_type, + G_DBUS_CALL_FLAGS_NO_AUTO_START, + timeout_msec, + cancellable, + (GAsyncReadyCallback) ibus_bus_call_async_done, + simple); +} diff --git a/src/ibusbus.h b/src/ibusbus.h index c57774ab9..477ff8ce2 100644 --- a/src/ibusbus.h +++ b/src/ibusbus.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusbus * @short_description: Connect with IBus daemon. @@ -28,6 +34,7 @@ #ifndef __IBUS_BUS_H_ #define __IBUS_BUS_H_ +#include #include "ibusinputcontext.h" #include "ibusconfig.h" #include "ibuscomponent.h" @@ -54,6 +61,7 @@ G_BEGIN_DECLS typedef struct _IBusBus IBusBus; typedef struct _IBusBusClass IBusBusClass; +typedef struct _IBusBusPrivate IBusBusPrivate; /** * IBusBus: @@ -61,46 +69,49 @@ typedef struct _IBusBusClass IBusBusClass; * An opaque data type representing IBus bus (daemon communication) status. */ struct _IBusBus { - IBusObject parent; - /* instance members */ + IBusObject parent; + /* instance members */ + + IBusBusPrivate *priv; }; struct _IBusBusClass { - IBusObjectClass parent; - /* class members */ + IBusObjectClass parent; + /* class members */ }; GType ibus_bus_get_type (void); + /** * ibus_bus_new: - * @returns: A newly allocated IBusBus instance, and the instance is not floating. + * @returns: A newly allocated #IBusBus instance, and the instance is not floating. * - * New an IBusBus instance. + * New an #IBusBus instance. */ IBusBus *ibus_bus_new (void); /** * ibus_bus_is_connected: - * @bus: An IBusBus. - * @returns: TRUE if @bus is connected, FALSE otherwise. + * @bus: An #IBusBus. + * @returns: %TRUE if @bus is connected, %FALSE otherwise. * - * Return TRUE if @bus is connected to IBus daemon. + * Return %TRUE if @bus is connected to IBus daemon. */ gboolean ibus_bus_is_connected (IBusBus *bus); /** * ibus_bus_get_connection: - * @bus: An IBusBus. - * @returns: TRUE if @bus is connected, FALSE otherwise. + * @bus: An #IBusBus. + * @returns: (transfer none): A #GDBusConnection of an #IBusBus instance. * - * Return IBusConnection of an IBusIBus instance. + * Return #GDBusConnection of an #IBusBus instance. */ -IBusConnection - *ibus_bus_get_connection (IBusBus *bus); +GDBusConnection * + ibus_bus_get_connection (IBusBus *bus); /** * ibus_bus_hello: - * @bus: An IBusBus. + * @bus: An #IBusBus. * @returns: The unique name of IBus process in DBus. * * This function sends a "HELLO" message to DBus daemon, @@ -112,211 +123,866 @@ const gchar *ibus_bus_hello (IBusBus *bus); * ibus_bus_request_name: * @bus: the IBusBus instance to be processed. * @name: Name to be requested. + * @flags: IBusBusNameFlag. + * @returns: 0 if failed; IBusBusRequestNameReply otherwise. + * + * Request a name from IBus daemon synchronously. + */ +guint32 ibus_bus_request_name (IBusBus *bus, + const gchar *name, + guint32 flags); + +/** + * ibus_bus_request_name_async: + * @bus: An #IBusBus. + * @name: Name to be requested. * @flags: Flags (FixMe). - * @returns: 0 if failed; positive number otherwise. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL + * if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. * - * Request a name from IBus daemon. + * Request a name from IBus daemon asynchronously. */ -guint ibus_bus_request_name (IBusBus *bus, +void ibus_bus_request_name_async (IBusBus *bus, const gchar *name, - guint flags); + guint flags, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_request_name_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_request_name_async(). + * @error: Return location for error or %NULL. + * @returns: 0 if failed; positive number otherwise. + * + * Finishes an operation started with ibus_bus_request_name_async(). + */ +guint ibus_bus_request_name_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); /** * ibus_bus_release_name: - * @bus: An IBusBus. + * @bus: An #IBusBus. * @name: Name to be released. * @returns: 0 if failed; positive number otherwise. * - * Release a name to IBus daemon. + * Release a name to IBus daemon synchronously. */ guint ibus_bus_release_name (IBusBus *bus, const gchar *name); /** - * ibus_bus_name_has_owner: - * @bus: An IBusBus. + * ibus_bus_release_name_async: + * @bus: An #IBusBus. * @name: Name to be released. - * @returns: TRUE if the name has owner, FALSE otherwise. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied + * or %NULL if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * Release a name to IBus daemon asynchronously. + */ +void ibus_bus_release_name_async + (IBusBus *bus, + const gchar *name, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_release_name_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_release_name_async(). + * @error: Return location for error or %NULL. + * @returns: 0 if failed; positive number otherwise. * - * Whether the name has owner. + * Finishes an operation started with ibus_bus_release_name_async(). + */ +guint ibus_bus_release_name_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); + +/** + * ibus_bus_list_queued_owners: + * @bus: An IBusBus. + * @name: Name to be queried. + * @returns: (transfer full) (element-type utf8): + * The unique bus names of connections currently queued for @name. + * + * Lists the unique bus names of connections currently queued for a bus name. + * + * FIXME add an asynchronous version. + */ +GList * ibus_bus_list_queued_owners + (IBusBus *bus, + const gchar *name); + +/** + * ibus_bus_name_has_owner: + * @bus: An #IBusBus. + * @name: Name to be checked. + * @returns: %TRUE if the name has owner, %FALSE otherwise. + * + * Checks whether the name has owner synchronously. */ gboolean ibus_bus_name_has_owner (IBusBus *bus, const gchar *name); +/** + * ibus_bus_name_has_owner_async: + * @bus: An #IBusBus. + * @name: Name to be checked. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied + * or %NULL if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * Checks whether the name has owner asynchronously. + */ +void ibus_bus_name_has_owner_async + (IBusBus *bus, + const gchar *name, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_name_has_owner_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_name_has_owner_async(). + * @error: Return location for error or %NULL. + * @returns: %TRUE if the name has owner, %FALSE otherwise. + * + * Finishes an operation started with ibus_bus_name_has_owner_async(). + */ +gboolean ibus_bus_name_has_owner_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); + /** * ibus_bus_list_names: - * @bus: An IBusBus. + * @bus: An #IBusBus. * @returns: (transfer full) (element-type utf8): Lists that attached to @bus. * * Return lists that attached to @bus. * [FixMe] Not implemented yet, only return NULL. + * [FixMe] Add async version. */ GList *ibus_bus_list_names (IBusBus *bus); /** * ibus_bus_add_match: - * @bus: An IBusBus. + * @bus: An #IBusBus. * @rule: Match rule. + * @returns: %TRUE if the rule is added. %FALSE otherwise. * - * Add a match rule to an IBusBus. + * Add a match rule to an #IBusBus synchronously. */ -void ibus_bus_add_match (IBusBus *bus, +gboolean ibus_bus_add_match (IBusBus *bus, const gchar *rule); +/** + * ibus_bus_add_match_async: + * @bus: An #IBusBus. + * @rule: Match rule. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied + * or %NULL if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * Add a match rule to an #IBusBus asynchronously. + */ +void ibus_bus_add_match_async (IBusBus *bus, + const gchar *rule, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_add_match_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_add_match_async(). + * @error: Return location for error or %NULL. + * @returns: %TRUE if the rule is added. %FALSE otherwise. + * + * Finishes an operation started with ibus_bus_add_match_async(). + */ +gboolean ibus_bus_add_match_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); + /** * ibus_bus_remove_match: - * @bus: An IBusBus. + * @bus: An #IBusBus. * @rule: Match rule. + * @returns: %TRUE if the rule is removed. %FALSE otherwise. * - * Remove a match rule to an IBusBus. + * Remove a match rule to an #IBusBus synchronously. */ -void ibus_bus_remove_match (IBusBus *bus, +gboolean ibus_bus_remove_match (IBusBus *bus, const gchar *rule); +/** + * ibus_bus_remove_match_async: + * @bus: An #IBusBus. + * @rule: Match rule. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied + * or %NULL if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * Remove a match rule to an IBusBus asynchronously. + */ +void ibus_bus_remove_match_async + (IBusBus *bus, + const gchar *rule, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_remove_match_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_remove_match_async(). + * @error: Return location for error or %NULL. + * @returns: %TRUE if the rule is removed. %FALSE otherwise. + * + * Finishes an operation started with ibus_bus_remove_match_async(). + */ +gboolean ibus_bus_remove_match_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); + /** * ibus_bus_get_name_owner: - * @bus: An IBusBus. + * @bus: An #IBusBus. * @name: Name. * @returns: Owner of the name. The returned value must be freed with g_free(). * - * Return the name owner. + * Return the name owner synchronously. */ gchar *ibus_bus_get_name_owner (IBusBus *bus, const gchar *name); + +/** + * ibus_bus_get_name_owner_async: + * @bus: An #IBusBus. + * @name: Name. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied + * or %NULL if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * Return the name owner asynchronously. + */ +void ibus_bus_get_name_owner_async + (IBusBus *bus, + const gchar *name, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_get_name_owner_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_get_name_owner_async(). + * @error: Return location for error or %NULL. + * @returns: Owner of the name. The returned value must be freed with g_free(). + * + * Finishes an operation started with ibus_bus_get_name_owner_async(). + */ +gchar *ibus_bus_get_name_owner_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); /* declare ibus methods */ /** * ibus_bus_exit: - * @bus: An IBusBus. + * @bus: An #IBusBus. * @restart: Whether restarting the ibus. - * @returns: TRUE if the "Exit" call is suceeded, FALSE otherwise. + * @returns: %TRUE if the "Exit" call is suceeded, %FALSE otherwise. * - * Exit or restart an IBusBus. + * Exit or restart ibus-daemon synchronously. */ gboolean ibus_bus_exit (IBusBus *bus, gboolean restart); +/** + * ibus_bus_exit_async: + * @bus: An #IBusBus. + * @restart: Whether restarting the ibus. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied + * or %NULL if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * Exit or restart ibus-daemon asynchronously. + */ +void ibus_bus_exit_async (IBusBus *bus, + gboolean restart, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_exit_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_exit_async(). + * @error: Return location for error or %NULL. + * @returns: %TRUE if the "Exit" call is suceeded, %FALSE otherwise. + * + * Finishes an operation started with ibus_bus_exit_async(). + */ +gboolean ibus_bus_exit_async_finish (IBusBus *bus, + GAsyncResult *res, + GError **error); + /** * ibus_bus_create_input_context: - * @bus: An IBusBus. + * @bus: An #IBusBus. * @client_name: Name of client. - * @returns: An newly allocated IBusInputContext if the "CreateInputContext" call - * is suceeded, NULL otherwise. + * @returns: An newly allocated #IBusInputContext if the "CreateInputContext" + * call is suceeded, %NULL otherwise. * - * Create an input context for client. + * Create an input context for client synchronously. */ -IBusInputContext - *ibus_bus_create_input_context +IBusInputContext * + ibus_bus_create_input_context (IBusBus *bus, const gchar *client_name); +/** + * ibus_bus_create_input_context_async: + * @bus: An #IBusBus. + * @client_name: Name of client. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * It should not be %NULL. + * @user_data: The data to pass to callback. + * + * Create an input context for client asynchronously. + */ +void ibus_bus_create_input_context_async + (IBusBus *bus, + const gchar *client_name, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_create_input_context_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_create_input_context_async(). + * @error: Return location for error or %NULL. + * @returns: An newly allocated #IBusInputContext if the "CreateInputContext" + * call is suceeded, %NULL otherwise. + * + * Finishes an operation started with ibus_bus_create_input_context_async(). + */ +IBusInputContext * + ibus_bus_create_input_context_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); /** * ibus_bus_current_input_context: - * @bus: An IBusBus. - * @returns: The named of currently focued IBusInputContext if the - * "CurrentInputContext" call suceeded, NULL otherwise. The return + * @bus: An #IBusBus. + * @returns: The named of currently focued #IBusInputContext if the + * "CurrentInputContext" call suceeded, %NULL otherwise. The return * value must be freed with g_free(). * - * Get the current focused input context. + * Get the current focused input context synchronously. + */ +gchar *ibus_bus_current_input_context + (IBusBus *bus); + +/** + * ibus_bus_current_input_context_async: + * @bus: An #IBusBus. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied + * or %NULL if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * Get the current focused input context asynchronously. */ -gchar *ibus_bus_current_input_context(IBusBus *bus); +void ibus_bus_current_input_context_async + (IBusBus *bus, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); +/** + * ibus_bus_current_input_context_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_current_input_context_async(). + * @error: Return location for error or %NULL. + * @returns: The named of currently focued IBusInputContext if the + * "CurrentInputContext" call suceeded, %NULL otherwise. The return + * value must be freed with g_free(). + * + * Finishes an operation started with ibus_bus_current_input_context_async(). + */ +gchar *ibus_bus_current_input_context_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); /** * ibus_bus_register_component: - * @bus: An IBusBus. + * @bus: An #IBusBus. * @component: A input engine component. - * @returns: TRUE if the "RegisterComponent" call is suceeded, FALSE otherwise. + * @returns: %TRUE if the "RegisterComponent" call is suceeded, %FALSE otherwise. * - * Register a componet to an IBusBus. + * Register a componet to an #IBusBus synchronously. */ -gboolean ibus_bus_register_component(IBusBus *bus, +gboolean ibus_bus_register_component + (IBusBus *bus, IBusComponent *component); +/** + * ibus_bus_register_component_async: + * @bus: An #IBusBus. + * @component: A input engine component. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied + * or %NULL if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * Register a componet to an #IBusBus asynchronously. + */ +void ibus_bus_register_component_async + (IBusBus *bus, + IBusComponent *component, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_register_component_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_register_component_async(). + * @error: Return location for error or %NULL. + * @returns: %TRUE if the "RegisterComponent" call is suceeded, %FALSE otherwise. + * + * Finishes an operation started with ibus_bus_register_component_async(). + */ +gboolean ibus_bus_register_component_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); + /** * ibus_bus_list_engines: - * @bus: An IBusBus. - * @returns: (transfer full) (element-type IBusEngineDesc): A List of engines. + * @bus: An #IBusBus. + * @returns: (transfer container) (element-type IBusEngineDesc): A List of engines. * - * List engines. - * Note that this function is not yet implemented. + * List engines synchronously. */ GList *ibus_bus_list_engines (IBusBus *bus); +/** + * ibus_bus_list_engines_async: + * @bus: An #IBusBus. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL + * if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * List engines asynchronously. + */ +void ibus_bus_list_engines_async + (IBusBus *bus, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_list_engines_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_list_engines_async(). + * @error: Return location for error or %NULL. + * @returns: (transfer container) (element-type IBusEngineDesc): A List of engines. + * + * Finishes an operation started with ibus_bus_list_engines_async(). + */ +GList *ibus_bus_list_engines_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); + /** * ibus_bus_list_active_engines: - * @bus: An IBusBus. - * @returns: (transfer full) (element-type IBusEngineDesc): A List of active engines. + * @bus: An #IBusBus. + * @returns: (transfer container) (element-type IBusEngineDesc): A List of active engines. * - * List active engines. - * Note that this function is not yet implemented. - * Not yet implemented. + * List active engines synchronously. */ GList *ibus_bus_list_active_engines (IBusBus *bus); +/** + * ibus_bus_list_active_engines_async: + * @bus: An #IBusBus. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL + * if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * List active engines asynchronously. + */ +void ibus_bus_list_active_engines_async + (IBusBus *bus, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_list_active_engines_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_list_active_engines_async(). + * @error: Return location for error or %NULL. + * @returns: (transfer container) (element-type IBusEngineDesc): A List of active engines. + * + * Finishes an operation started with ibus_bus_list_active_engines_async(). + */ +GList *ibus_bus_list_active_engines_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); + +/** + * ibus_bus_get_engines_by_names: + * @bus: An #IBusBus. + * @names: (array zero-terminated=1): A %NULL-terminated array of names. + * @returns: (array zero-terminated=1) (transfer full): A %NULL-terminated array of engines. + * + * Get engines by given names synchronously. + * TODO(penghuang): add asynchronous version + */ +IBusEngineDesc ** + ibus_bus_get_engines_by_names + (IBusBus *bus, + const gchar * const *names); /** * ibus_bus_get_use_sys_layout: - * @bus: An IBusBus. + * @bus: An #IBusBus. + * @returns: %TRUE if "use_sys_layout" option is enabled. + * + * Check if the bus's "use_sys_layout" option is enabled or not synchronously. + */ +gboolean ibus_bus_get_use_sys_layout + (IBusBus *bus); + +/** + * ibus_bus_get_use_sys_layout_async: + * @bus: An #IBusBus. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied + * or %NULL if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * Check if the bus's "use_sys_layout" option is enabled or not asynchronously. + */ +void ibus_bus_get_use_sys_layout_async + (IBusBus *bus, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_get_use_sys_layout_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_get_use_sys_layout_async(). + * @error: Return location for error or %NULL. * @returns: TRUE if "use_sys_layout" option is enabled. * - * Check if the bus's "use_sys_layout" option is enabled or not. + * Finishes an operation started with ibus_bus_get_use_sys_layout_async(). */ -gboolean ibus_bus_get_use_sys_layout(IBusBus *bus); +gboolean ibus_bus_get_use_sys_layout_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); /** * ibus_bus_get_use_global_engine: - * @bus: An IBusBus. + * @bus: An #IBusBus. * @returns: TRUE if "use_global_engine" option is enabled. * - * Check if the bus's "use_global_engine" option is enabled or not. + * Check if the bus's "use_global_engine" option is enabled or not synchronously. */ gboolean ibus_bus_get_use_global_engine (IBusBus *bus); +/** + * ibus_bus_get_use_global_engine_async: + * @bus: An #IBusBus. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied + * or %NULL if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * Check if the bus's "use_global_engine" option is enabled or not asynchronously. + */ +void ibus_bus_get_use_global_engine_async + (IBusBus *bus, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_get_use_global_engine_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_get_use_global_engine_async(). + * @error: Return location for error or %NULL. + * @returns: %TRUE if "use_global_engine" option is enabled. + * + * Finishes an operation started with ibus_bus_get_use_global_engine_async(). + */ +gboolean ibus_bus_get_use_global_engine_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); /** * ibus_bus_is_global_engine_enabled: - * @bus: An IBusBus. - * @returns: TRUE if the current global engine is enabled. + * @bus: An #IBusBus. + * @returns: %TRUE if the current global engine is enabled. * - * Check if the current global engine is enabled or not. + * Check if the current global engine is enabled or not synchronously. */ gboolean ibus_bus_is_global_engine_enabled (IBusBus *bus); +/** + * ibus_bus_is_global_engine_enabled_async: + * @bus: An #IBusBus. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied + * or %NULL if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * Check if the current global engine is enabled or not asynchronously. + */ +void ibus_bus_is_global_engine_enabled_async + (IBusBus *bus, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_is_global_engine_enabled_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_is_global_engine_enabled_async(). + * @error: Return location for error or %NULL. + * @returns: %TRUE if the current global engine is enabled. + * + * Finishes an operation started with ibus_bus_is_global_engine_enabled_async(). + */ +gboolean ibus_bus_is_global_engine_enabled_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); + /** * ibus_bus_get_global_engine: - * @bus: An IBusBus. - * @returns: The description of current global engine, or NULL if there is no - * global engine. + * @bus: An #IBusBus. + * @returns: (transfer none): The description of current global engine, + * or %NULL if there is no global engine. + * + * Get the description of current global engine synchronously. + */ +IBusEngineDesc * + ibus_bus_get_global_engine (IBusBus *bus); + +/** + * ibus_bus_get_global_engine_async: + * @bus: An #IBusBus. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL + * if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. * - * Get the description of current global engine. + * Get the description of current global engine asynchronously. */ -IBusEngineDesc - *ibus_bus_get_global_engine (IBusBus *bus); +void ibus_bus_get_global_engine_async + (IBusBus *bus, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_get_global_engine_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_get_global_engine_async_finish(). + * @error: Return location for error or %NULL. + * @returns: (transfer none): The description of current global engine, + * or %NULL if there is no global engine. + * + * Finishes an operation started with ibus_bus_get_global_engine_async_finish(). + */ +IBusEngineDesc * + ibus_bus_get_global_engine_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); /** * ibus_bus_set_global_engine: - * @bus: An IBusBus. + * @bus: An #IBusBus. * @global_engine: A new engine name. - * @returns: TRUE if the global engine was set successfully. + * @returns: %TRUE if the global engine was set successfully. * - * Set current global engine. + * Set current global engine synchronously. */ gboolean ibus_bus_set_global_engine (IBusBus *bus, const gchar *global_engine); +/** + * ibus_bus_set_global_engine_async: + * @bus: An #IBusBus. + * @global_engine: A new engine name. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied + * or %NULL if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * Set current global engine asynchronously. + */ +void ibus_bus_set_global_engine_async + (IBusBus *bus, + const gchar *global_engine, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback + callback, + gpointer user_data); + +/** + * ibus_bus_set_global_engine_async_finish: + * @bus: An #IBusBus. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_bus_set_global_engine_async(). + * @error: Return location for error or %NULL. + * @returns: %TRUE if no IPC errros. %FALSE otherwise. + * + * Finishes an operation started with ibus_bus_set_global_engine_async(). + */ +gboolean ibus_bus_set_global_engine_async_finish + (IBusBus *bus, + GAsyncResult *res, + GError **error); + +/** + * ibus_bus_set_watch_dbus_signal: + * @bus: An #IBusBus. + * @watch: %TRUE if you want ibusbus to emit "name-owner-changed" signal when + * ibus-daemon emits the NameOwnerChanged DBus signal. + * + * Start or stop watching the NameOwnerChanged DBus signal. + */ +void ibus_bus_set_watch_dbus_signal + (IBusBus *bus, + gboolean watch); + +/** + * ibus_bus_set_watch_ibus_signal: + * @bus: An #IBusBus. + * @watch: %TRUE if you want ibusbus to emit "global-engine-changed" signal when + * ibus-daemon emits the GlobalEngineChanged IBus signal. + * + * Start or stop watching the GlobalEngineChanged IBus signal. + */ +void ibus_bus_set_watch_ibus_signal + (IBusBus *bus, + gboolean watch); + /* declare config apis */ /** * ibus_bus_get_config: - * @bus: An IBusBus. - * @returns: An newly allocated IBusConfig which is configurable with @bus. + * @bus: An #IBusBus. + * @returns: (transfer none): An #IBusConfig object which is configurable with + * @bus. * - * Get the config instance from IBusBus. + * Get the config instance from #IBusBus. */ - IBusConfig *ibus_bus_get_config (IBusBus *bus); +IBusConfig *ibus_bus_get_config (IBusBus *bus); G_END_DECLS #endif diff --git a/src/ibuscomponent.c b/src/ibuscomponent.c index 0c5526868..6d21b66d6 100644 --- a/src/ibuscomponent.c +++ b/src/ibuscomponent.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,7 +19,6 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include #include #include "ibuscomponent.h" @@ -26,15 +26,35 @@ enum { LAST_SIGNAL, }; +enum { + PROP_0 = 0, + PROP_NAME, + PROP_DESCRIPTION, + PROP_VERSION, + PROP_LICENSE, + PROP_AUTHOR, + PROP_HOMEPAGE, + PROP_COMMAND_LINE, + PROP_TEXTDOMAIN, +}; /* IBusComponentPriv */ struct _IBusComponentPrivate { - // TRUE if the component started in the verbose mode. - gboolean verbose; - // TRUE if the component needs to be restarted when it dies. - gboolean restart; + gchar *name; + gchar *description; + gchar *version; + gchar *license; + gchar *author; + gchar *homepage; + gchar *exec; + gchar *textdomain; + + /* engines */ + GList *engines; + + /* observed paths */ + GList *observed_paths; }; -typedef struct _IBusComponentPrivate IBusComponentPrivate; #define IBUS_COMPONENT_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_COMPONENT, IBusComponentPrivate)) @@ -42,11 +62,19 @@ typedef struct _IBusComponentPrivate IBusComponentPrivate; // static guint _signals[LAST_SIGNAL] = { 0 }; /* functions prototype */ +static void ibus_component_set_property (IBusComponent *component, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void ibus_component_get_property (IBusComponent *component, + guint prop_id, + GValue *value, + GParamSpec *pspec); static void ibus_component_destroy (IBusComponent *component); static gboolean ibus_component_serialize (IBusComponent *component, - IBusMessageIter *iter); -static gboolean ibus_component_deserialize (IBusComponent *component, - IBusMessageIter *iter); + GVariantBuilder *builder); +static gint ibus_component_deserialize (IBusComponent *component, + GVariant *variant); static gboolean ibus_component_copy (IBusComponent *dest, const IBusComponent *src); static gboolean ibus_component_parse_xml_node @@ -64,42 +92,148 @@ static void ibus_component_parse_observed_paths G_DEFINE_TYPE (IBusComponent, ibus_component, IBUS_TYPE_SERIALIZABLE) static void -ibus_component_class_init (IBusComponentClass *klass) +ibus_component_class_init (IBusComponentClass *class) { - IBusObjectClass *object_class = IBUS_OBJECT_CLASS (klass); - IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (klass); + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + IBusObjectClass *object_class = IBUS_OBJECT_CLASS (class); + IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (class); - g_type_class_add_private (klass, sizeof (IBusComponentPrivate)); + g_type_class_add_private (class, sizeof (IBusComponentPrivate)); + gobject_class->set_property = (GObjectSetPropertyFunc) ibus_component_set_property; + gobject_class->get_property = (GObjectGetPropertyFunc) ibus_component_get_property; object_class->destroy = (IBusObjectDestroyFunc) ibus_component_destroy; serializable_class->serialize = (IBusSerializableSerializeFunc) ibus_component_serialize; serializable_class->deserialize = (IBusSerializableDeserializeFunc) ibus_component_deserialize; serializable_class->copy = (IBusSerializableCopyFunc) ibus_component_copy; - g_string_append (serializable_class->signature, "ssssssssavav"); + /* install properties */ + /** + * IBusComponent:name: + * + * The name of component + */ + g_object_class_install_property (gobject_class, + PROP_NAME, + g_param_spec_string ("name", + "component name", + "The name of component", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusComponent:description: + * + * The description of component + */ + g_object_class_install_property (gobject_class, + PROP_DESCRIPTION, + g_param_spec_string ("description", + "component description", + "The description of component", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusComponent:version: + * + * The version of component + */ + g_object_class_install_property (gobject_class, + PROP_VERSION, + g_param_spec_string ("version", + "component version", + "The version of component", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusComponent:license: + * + * The license of component + */ + g_object_class_install_property (gobject_class, + PROP_LICENSE, + g_param_spec_string ("license", + "component license", + "The license of component", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusComponent:author: + * + * The author of component + */ + g_object_class_install_property (gobject_class, + PROP_AUTHOR, + g_param_spec_string ("author", + "component author", + "The author of component", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusComponent:homepage: + * + * The homepage of component + */ + g_object_class_install_property (gobject_class, + PROP_HOMEPAGE, + g_param_spec_string ("homepage", + "component homepage", + "The homepage of component", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusComponent:command-line: + * + * The exec path of component + */ + g_object_class_install_property (gobject_class, + PROP_COMMAND_LINE, + g_param_spec_string ("command-line", + "component command-line", + "The command line of component", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusComponent:textdomain: + * + * The textdomain of component + */ + g_object_class_install_property (gobject_class, + PROP_TEXTDOMAIN, + g_param_spec_string ("textdomain", + "component textdomain", + "The textdomain path of component", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); } static void ibus_component_init (IBusComponent *component) { - component->name = NULL; - component->description = NULL; - component->version = NULL; - component->license = NULL; - component->author = NULL; - component->homepage = NULL; - component->exec = NULL; - component->textdomain = NULL; - component->engines = NULL; - component->observed_paths = NULL; - component->pid = 0; - component->child_source_id = 0; - - IBusComponentPrivate * priv = IBUS_COMPONENT_GET_PRIVATE (component); - priv->verbose = FALSE; - priv->restart = FALSE; + component->priv = IBUS_COMPONENT_GET_PRIVATE (component); + + /* FIXME: Is it necessary? */ +#if 0 + component->priv->engines = NULL; + component->priv->observed_paths = NULL; + + component->priv->name = NULL; + component->priv->description = NULL; + component->priv->version = NULL; + component->priv->license = NULL; + component->priv->author = NULL; + component->priv->homepage = NULL; + component->priv->exec = NULL; + component->priv->textdomain = NULL; +#endif } static void @@ -107,190 +241,190 @@ ibus_component_destroy (IBusComponent *component) { GList *p; - g_free (component->name); - g_free (component->description); - g_free (component->version); - g_free (component->license); - g_free (component->author); - g_free (component->homepage); - g_free (component->exec); - g_free (component->textdomain); - - component->name = NULL; - component->description = NULL; - component->version = NULL; - component->license = NULL; - component->author = NULL; - component->homepage = NULL; - component->exec = NULL; - component->textdomain = NULL; - - g_list_foreach (component->observed_paths, (GFunc)g_object_unref, NULL); - g_list_free (component->observed_paths); - component->observed_paths = NULL; - - for (p = component->engines; p != NULL; p = p->next) { + g_free (component->priv->name); + g_free (component->priv->description); + g_free (component->priv->version); + g_free (component->priv->license); + g_free (component->priv->author); + g_free (component->priv->homepage); + g_free (component->priv->exec); + g_free (component->priv->textdomain); + + component->priv->name = NULL; + component->priv->description = NULL; + component->priv->version = NULL; + component->priv->license = NULL; + component->priv->author = NULL; + component->priv->homepage = NULL; + component->priv->exec = NULL; + component->priv->textdomain = NULL; + + g_list_free_full (component->priv->observed_paths, g_object_unref); + component->priv->observed_paths = NULL; + + for (p = component->priv->engines; p != NULL; p = p->next) { g_object_steal_data ((GObject *)p->data, "component"); ibus_object_destroy ((IBusObject *)p->data); g_object_unref (p->data); } - g_list_free (component->engines); - component->engines = NULL; + g_list_free (component->priv->engines); + component->priv->engines = NULL; - if (component->pid != 0) { - ibus_component_stop (component); - g_spawn_close_pid (component->pid); - component->pid = 0; - } + IBUS_OBJECT_CLASS (ibus_component_parent_class)->destroy (IBUS_OBJECT (component)); +} - if (component->child_source_id != 0) { - g_source_remove (component->child_source_id); - component->child_source_id = 0; +static void +ibus_component_set_property (IBusComponent *component, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + switch (prop_id) { + case PROP_NAME: + g_assert (component->priv->name == NULL); + component->priv->name = g_value_dup_string (value); + break; + case PROP_DESCRIPTION: + g_assert (component->priv->description == NULL); + component->priv->description = g_value_dup_string (value); + break; + case PROP_VERSION: + g_assert (component->priv->version == NULL); + component->priv->version = g_value_dup_string (value); + break; + case PROP_LICENSE: + g_assert (component->priv->license == NULL); + component->priv->license = g_value_dup_string (value); + break; + case PROP_AUTHOR: + g_assert (component->priv->author == NULL); + component->priv->author = g_value_dup_string (value); + break; + case PROP_HOMEPAGE: + g_assert (component->priv->homepage == NULL); + component->priv->homepage = g_value_dup_string (value); + break; + case PROP_COMMAND_LINE: + g_assert (component->priv->exec == NULL); + component->priv->exec = g_value_dup_string (value); + break; + case PROP_TEXTDOMAIN: + g_assert (component->priv->textdomain == NULL); + component->priv->textdomain = g_value_dup_string (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (component, prop_id, pspec); } +} - IBUS_OBJECT_CLASS (ibus_component_parent_class)->destroy (IBUS_OBJECT (component)); +static void +ibus_component_get_property (IBusComponent *component, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + switch (prop_id) { + case PROP_NAME: + g_value_set_string (value, ibus_component_get_name (component)); + break; + case PROP_DESCRIPTION: + g_value_set_string (value, ibus_component_get_description (component)); + break; + case PROP_VERSION: + g_value_set_string (value, ibus_component_get_version (component)); + break; + case PROP_LICENSE: + g_value_set_string (value, ibus_component_get_license (component)); + break; + case PROP_AUTHOR: + g_value_set_string (value, ibus_component_get_author (component)); + break; + case PROP_HOMEPAGE: + g_value_set_string (value, ibus_component_get_homepage (component)); + break; + case PROP_COMMAND_LINE: + g_value_set_string (value, ibus_component_get_exec (component)); + break; + case PROP_TEXTDOMAIN: + g_value_set_string (value, ibus_component_get_textdomain (component)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (component, prop_id, pspec); + } } static gboolean ibus_component_serialize (IBusComponent *component, - IBusMessageIter *iter) + GVariantBuilder *builder) { gboolean retval; - IBusMessageIter array_iter; - GList *p; - retval = IBUS_SERIALIZABLE_CLASS (ibus_component_parent_class)->serialize ((IBusSerializable *)component, iter); + retval = IBUS_SERIALIZABLE_CLASS (ibus_component_parent_class)->serialize ((IBusSerializable *)component, builder); g_return_val_if_fail (retval, FALSE); - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &component->name); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &component->description); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &component->version); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &component->license); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &component->author); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &component->homepage); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &component->exec); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &component->textdomain); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (builder, "s", component->priv->name); + g_variant_builder_add (builder, "s", component->priv->description); + g_variant_builder_add (builder, "s", component->priv->version); + g_variant_builder_add (builder, "s", component->priv->license); + g_variant_builder_add (builder, "s", component->priv->author); + g_variant_builder_add (builder, "s", component->priv->homepage); + g_variant_builder_add (builder, "s", component->priv->exec); + g_variant_builder_add (builder, "s", component->priv->textdomain); + GList *p; + GVariantBuilder *array; /* serialize observed paths */ - retval = ibus_message_iter_open_container (iter, IBUS_TYPE_ARRAY, "v", &array_iter); - g_return_val_if_fail (retval, FALSE); - - for (p = component->observed_paths; p != NULL; p = p->next) { - retval = ibus_message_iter_append (&array_iter, IBUS_TYPE_OBSERVED_PATH, &(p->data)); - g_return_val_if_fail (retval, FALSE); + array = g_variant_builder_new (G_VARIANT_TYPE ("av")); + for (p = component->priv->observed_paths; p != NULL; p = p->next) { + g_variant_builder_add (array, "v", ibus_serializable_serialize ((IBusSerializable *)p->data)); } - retval = ibus_message_iter_close_container (iter, &array_iter); - g_return_val_if_fail (retval, FALSE); - - /* serialize engine desc */ - retval = ibus_message_iter_open_container (iter, IBUS_TYPE_ARRAY, "v", &array_iter); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (builder, "av", array); - for (p = component->engines; p != NULL; p = p->next) { - retval = ibus_message_iter_append (&array_iter, IBUS_TYPE_ENGINE_DESC, &(p->data)); - g_return_val_if_fail (retval, FALSE); + /* serialize engine desc list */ + array = g_variant_builder_new (G_VARIANT_TYPE ("av")); + for (p = component->priv->engines; p != NULL; p = p->next) { + g_variant_builder_add (array, "v", ibus_serializable_serialize ((IBusSerializable *)p->data)); } - retval = ibus_message_iter_close_container (iter, &array_iter); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (builder, "av", array); return TRUE; } -static gboolean +static gint ibus_component_deserialize (IBusComponent *component, - IBusMessageIter *iter) + GVariant *variant) { gboolean retval; - gchar *str; - IBusMessageIter array_iter; - - retval = IBUS_SERIALIZABLE_CLASS (ibus_component_parent_class)->deserialize ((IBusSerializable *)component, iter); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - component->name = g_strdup (str); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - component->description = g_strdup (str); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - component->version = g_strdup (str); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - component->license = g_strdup (str); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - component->author = g_strdup (str); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - component->homepage = g_strdup (str); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - component->exec = g_strdup (str); - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - component->textdomain = g_strdup (str); - - retval = ibus_message_iter_recurse (iter, IBUS_TYPE_ARRAY, &array_iter); - g_return_val_if_fail (retval, FALSE); - while (ibus_message_iter_get_arg_type (&array_iter) != G_TYPE_INVALID) { - IBusObservedPath *path; - - retval = ibus_message_iter_get (&array_iter, IBUS_TYPE_OBSERVED_PATH, &path); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (&array_iter); - - g_object_ref_sink (path); - component->observed_paths = g_list_append (component->observed_paths, path); + retval = IBUS_SERIALIZABLE_CLASS (ibus_component_parent_class)->deserialize ((IBusSerializable *)component, variant); + g_return_val_if_fail (retval, 0); + + g_variant_get_child (variant, retval++, "s", &component->priv->name); + g_variant_get_child (variant, retval++, "s", &component->priv->description); + g_variant_get_child (variant, retval++, "s", &component->priv->version); + g_variant_get_child (variant, retval++, "s", &component->priv->license); + g_variant_get_child (variant, retval++, "s", &component->priv->author); + g_variant_get_child (variant, retval++, "s", &component->priv->homepage); + g_variant_get_child (variant, retval++, "s", &component->priv->exec); + g_variant_get_child (variant, retval++, "s", &component->priv->textdomain); + + GVariant *var; + GVariantIter *iter = NULL; + g_variant_get_child (variant, retval++, "av", &iter); + while (g_variant_iter_loop (iter, "v", &var)) { + component->priv->observed_paths = g_list_append (component->priv->observed_paths, + IBUS_OBSERVED_PATH (ibus_serializable_deserialize (var))); } - ibus_message_iter_next (iter); - - retval = ibus_message_iter_recurse (iter, IBUS_TYPE_ARRAY, &array_iter); - g_return_val_if_fail (retval, FALSE); + g_variant_iter_free (iter); - while (ibus_message_iter_get_arg_type (&array_iter) != G_TYPE_INVALID) { - IBusEngineDesc *engine; - - retval = ibus_message_iter_get (&array_iter, IBUS_TYPE_ENGINE_DESC, &engine); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (&array_iter); - - ibus_component_add_engine (component, engine); + g_variant_get_child (variant, retval++, "av", &iter); + while (g_variant_iter_loop (iter, "v", &var)) { + ibus_component_add_engine (component, + IBUS_ENGINE_DESC (ibus_serializable_deserialize (var))); } - ibus_message_iter_next (iter); + g_variant_iter_free (iter); - return TRUE; + return retval; } static gboolean @@ -303,21 +437,20 @@ ibus_component_copy (IBusComponent *dest, (IBusSerializable *)src); g_return_val_if_fail (retval, FALSE); + dest->priv->name = g_strdup (src->priv->name); + dest->priv->description = g_strdup (src->priv->description); + dest->priv->version = g_strdup (src->priv->version); + dest->priv->license = g_strdup (src->priv->license); + dest->priv->author = g_strdup (src->priv->author); + dest->priv->homepage = g_strdup (src->priv->homepage); + dest->priv->exec = g_strdup (src->priv->exec); + dest->priv->textdomain = g_strdup (src->priv->textdomain); - dest->name = g_strdup (src->name); - dest->description = g_strdup (src->description); - dest->version = g_strdup (src->version); - dest->license = g_strdup (src->license); - dest->author = g_strdup (src->author); - dest->homepage = g_strdup (src->homepage); - dest->exec = g_strdup (src->exec); - dest->textdomain = g_strdup (src->textdomain); - - dest->observed_paths = g_list_copy (src->observed_paths); - g_list_foreach (dest->observed_paths, (GFunc) g_object_ref, NULL); + dest->priv->observed_paths = g_list_copy (src->priv->observed_paths); + g_list_foreach (dest->priv->observed_paths, (GFunc) g_object_ref, NULL); - dest->engines = g_list_copy (src->engines); - g_list_foreach (dest->engines, (GFunc) g_object_ref, NULL); + dest->priv->engines = g_list_copy (src->priv->engines); + g_list_foreach (dest->priv->engines, (GFunc) g_object_ref, NULL); return TRUE; } @@ -345,8 +478,8 @@ ibus_component_output (IBusComponent *component, #define OUTPUT_ENTRY(field, element) \ { \ gchar *escape_text = \ - g_markup_escape_text (component->field ? \ - component->field : "", -1); \ + g_markup_escape_text (component->priv->field ? \ + component->priv->field : "", -1); \ g_string_append_indent (output, indent + 1); \ g_string_append_printf (output, "<"element">%s\n", \ escape_text); \ @@ -364,11 +497,11 @@ ibus_component_output (IBusComponent *component, #undef OUTPUT_ENTRY #undef OUTPUT_ENTRY_1 - if (component->observed_paths) { + if (component->priv->observed_paths) { g_string_append_indent (output, indent + 1); g_string_append (output, "\n"); - for (p = component->observed_paths; p != NULL; p = p->next ) { + for (p = component->priv->observed_paths; p != NULL; p = p->next ) { IBusObservedPath *path = (IBusObservedPath *) p->data; g_string_append_indent (output, indent + 2); @@ -400,7 +533,7 @@ ibus_component_output_engines (IBusComponent *component, g_string_append_indent (output, indent); g_string_append (output, "\n"); - for (p = component->engines; p != NULL; p = p->next) { + for (p = component->priv->engines; p != NULL; p = p->next) { ibus_engine_desc_output ((IBusEngineDesc *)p->data, output, indent + 2); } @@ -410,8 +543,8 @@ ibus_component_output_engines (IBusComponent *component, static gboolean ibus_component_parse_xml_node (IBusComponent *component, - XMLNode *node, - gboolean access_fs) + XMLNode *node, + gboolean access_fs) { g_assert (component); g_assert (node); @@ -424,13 +557,13 @@ ibus_component_parse_xml_node (IBusComponent *component, for (p = node->sub_nodes; p != NULL; p = p->next) { XMLNode *sub_node = (XMLNode *)p->data; -#define PARSE_ENTRY(field_name, element_name) \ - if (g_strcmp0 (sub_node->name, element_name) == 0) { \ - if (component->field_name != NULL) { \ - g_free (component->field_name); \ - } \ - component->field_name = g_strdup (sub_node->text); \ - continue; \ +#define PARSE_ENTRY(field_name, element_name) \ + if (g_strcmp0 (sub_node->name, element_name) == 0) { \ + if (component->priv->field_name != NULL) { \ + g_free (component->priv->field_name); \ + } \ + component->priv->field_name = g_strdup (sub_node->text); \ + continue; \ } #define PARSE_ENTRY_1(name) PARSE_ENTRY (name, #name) PARSE_ENTRY_1 (name); @@ -530,15 +663,33 @@ ibus_component_parse_observed_paths (IBusComponent *component, path = ibus_observed_path_new_from_xml_node ((XMLNode *)p->data, access_fs); g_object_ref_sink (path); - component->observed_paths = g_list_append (component->observed_paths, path); + component->priv->observed_paths = g_list_append (component->priv->observed_paths, path); if (access_fs && path->is_dir && path->is_exist) { - component->observed_paths = g_list_concat (component->observed_paths, - ibus_observed_path_traverse (path)); + component->priv->observed_paths = + g_list_concat(component->priv->observed_paths, + ibus_observed_path_traverse(path)); } } } +#define IBUS_COMPONENT_GET_PROPERTY(property, return_type) \ +return_type \ +ibus_component_get_ ## property (IBusComponent *component) \ +{ \ + return component->priv->property; \ +} + +IBUS_COMPONENT_GET_PROPERTY (name, const gchar *) +IBUS_COMPONENT_GET_PROPERTY (description, const gchar *) +IBUS_COMPONENT_GET_PROPERTY (version, const gchar *) +IBUS_COMPONENT_GET_PROPERTY (license, const gchar *) +IBUS_COMPONENT_GET_PROPERTY (author, const gchar *) +IBUS_COMPONENT_GET_PROPERTY (homepage, const gchar *) +IBUS_COMPONENT_GET_PROPERTY (exec, const gchar *) +IBUS_COMPONENT_GET_PROPERTY (textdomain, const gchar *) +#undef IBUS_COMPONENT_GET_PROPERTY + IBusComponent * ibus_component_new (const gchar *name, const gchar *description, @@ -546,21 +697,40 @@ ibus_component_new (const gchar *name, const gchar *license, const gchar *author, const gchar *homepage, - const gchar *exec, + const gchar *command_line, const gchar *textdomain) { + return ibus_component_new_varargs ("name", name, + "description", description, + "version", version, + "license", license, + "author", author, + "homepage", homepage, + "command-line", command_line, + "textdomain", textdomain, + NULL); +} + +IBusComponent * +ibus_component_new_varargs (const gchar *first_property_name, ...) +{ + va_list var_args; IBusComponent *component; - component = (IBusComponent *)g_object_new (IBUS_TYPE_COMPONENT, NULL); + IBusComponentPrivate *priv; + + g_assert (first_property_name); + + va_start (var_args, first_property_name); + component = (IBusComponent *) g_object_new_valist (IBUS_TYPE_COMPONENT, + first_property_name, + var_args); + va_end (var_args); + + priv = IBUS_COMPONENT_GET_PRIVATE (component); - component->name = g_strdup (name); - component->description = g_strdup (description); - component->version = g_strdup (version); - component->license = g_strdup (license); - component->author = g_strdup (author); - component->homepage = g_strdup (homepage); - component->exec = g_strdup (exec); - component->textdomain = g_strdup (textdomain); + /* name is required. Other properties are set in class_init by default. */ + g_assert (priv->name); return component; } @@ -614,7 +784,8 @@ ibus_component_new_from_file (const gchar *filename) else { IBusObservedPath *path; path = ibus_observed_path_new (filename, TRUE); - component->observed_paths = g_list_prepend (component->observed_paths, path); + component->priv->observed_paths = + g_list_prepend(component->priv->observed_paths, path); } return component; @@ -629,11 +800,13 @@ ibus_component_add_observed_path (IBusComponent *component, p = ibus_observed_path_new (path, access_fs); g_object_ref_sink (p); - component->observed_paths = g_list_append (component->observed_paths, p); + component->priv->observed_paths = + g_list_append (component->priv->observed_paths, p); if (access_fs && p->is_dir && p->is_exist) { - component->observed_paths = g_list_concat (component->observed_paths, - ibus_observed_path_traverse (p)); + component->priv->observed_paths = + g_list_concat(component->priv->observed_paths, + ibus_observed_path_traverse(p)); } } @@ -645,102 +818,16 @@ ibus_component_add_engine (IBusComponent *component, g_assert (IBUS_IS_ENGINE_DESC (engine)); g_object_ref_sink (engine); - component->engines = g_list_append (component->engines, engine); - g_object_set_data ((GObject *)engine, "component", component); + component->priv->engines = + g_list_append (component->priv->engines, engine); } GList * ibus_component_get_engines (IBusComponent *component) { - return g_list_copy (component->engines); -} - -static void -ibus_component_child_cb (GPid pid, - gint status, - IBusComponent *component) -{ - g_assert (IBUS_IS_COMPONENT (component)); - g_assert (component->pid == pid); - - g_spawn_close_pid (pid); - component->pid = 0; - component->child_source_id = 0; - - IBusComponentPrivate *priv = IBUS_COMPONENT_GET_PRIVATE (component); - if (priv->restart) { - g_debug ("==== Restarting %s", component->exec); - ibus_component_start (component, priv->verbose); - } -} - -gboolean -ibus_component_start (IBusComponent *component, gboolean verbose) -{ - g_assert (IBUS_IS_COMPONENT (component)); - - if (component->pid != 0) - return TRUE; - - IBusComponentPrivate *priv = IBUS_COMPONENT_GET_PRIVATE (component); - priv->verbose = verbose; - - gint argc; - gchar **argv; - gboolean retval; - GError *error; - GSpawnFlags flags; - - error = NULL; - if (!g_shell_parse_argv (component->exec, &argc, &argv, &error)) { - g_warning ("Can not parse component %s exec: %s", component->name, error->message); - g_error_free (error); - return FALSE; - } - - error = NULL; - flags = G_SPAWN_DO_NOT_REAP_CHILD; - if (!verbose) { - flags |= G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL; - } - retval = g_spawn_async (NULL, argv, NULL, - flags, - NULL, NULL, - &(component->pid), &error); - g_strfreev (argv); - if (!retval) { - g_warning ("Can not execute component %s: %s", component->name, error->message); - g_error_free (error); - return FALSE; - } - - component->child_source_id = - g_child_watch_add (component->pid, (GChildWatchFunc) ibus_component_child_cb, component); - - return TRUE; -} - -gboolean -ibus_component_stop (IBusComponent *component) -{ - g_assert (IBUS_IS_COMPONENT (component)); - - if (component->pid == 0) - return TRUE; - - kill (component->pid, SIGTERM); - return TRUE; -} - -gboolean -ibus_component_is_running (IBusComponent *component) -{ - g_assert (IBUS_IS_COMPONENT (component)); - - return (component->pid != 0); + return g_list_copy (component->priv->engines); } - gboolean ibus_component_check_modification (IBusComponent *component) { @@ -748,30 +835,9 @@ ibus_component_check_modification (IBusComponent *component) GList *p; - for (p = component->observed_paths; p != NULL; p = p->next) { + for (p = component->priv->observed_paths; p != NULL; p = p->next) { if (ibus_observed_path_check_modification ((IBusObservedPath *)p->data)) return TRUE; } return FALSE; } - - -IBusComponent * -ibus_component_get_from_engine (IBusEngineDesc *engine) -{ - g_assert (IBUS_IS_ENGINE_DESC (engine)); - - IBusComponent *component; - - component = (IBusComponent *)g_object_get_data ((GObject *)engine, "component"); - return component; -} - -void -ibus_component_set_restart (IBusComponent *component, gboolean restart) -{ - g_assert (IBUS_IS_COMPONENT (component)); - - IBusComponentPrivate *priv = IBUS_COMPONENT_GET_PRIVATE (component); - priv->restart = restart; -} diff --git a/src/ibuscomponent.h b/src/ibuscomponent.h index 249c8cf14..8f35b940c 100644 --- a/src/ibuscomponent.h +++ b/src/ibuscomponent.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibuscomponent * @short_description: Component (executable) specification. @@ -65,48 +71,32 @@ G_BEGIN_DECLS typedef struct _IBusComponent IBusComponent; typedef struct _IBusComponentClass IBusComponentClass; +typedef struct _IBusComponentPrivate IBusComponentPrivate; /** * IBusComponent: - * @name: Name of the component. - * @description: Detailed description of component. - * @version: Component version. - * @license: Distribution license of this component. - * @author: Author(s) of the component. - * @homepage: Homepage of the component. - * @exec: path to component executable. - * @textdomain: Domain name for dgettext() * * An IBusComponent stores component information. + * You can get extended values with g_object_get_properties. + * name: Name of the component. + * description: Detailed description of component. + * version: Component version. + * license: Distribution license of this component. + * author: Author(s) of the component. + * homepage: Homepage of the component. + * command_line: path to component executable. + * textdomain: Domain name for dgettext() */ struct _IBusComponent { + /*< private >*/ IBusSerializable parent; + IBusComponentPrivate *priv; /* instance members */ /*< public >*/ - gchar *name; - gchar *description; - gchar *version; - gchar *license; - gchar *author; - gchar *homepage; - gchar *exec; - - /* text domain for dgettext */ - gchar *textdomain; - - /*< private >*/ - /* engines */ - GList *engines; - - /* observed paths */ - GList *observed_paths; - - GPid pid; - guint child_source_id; /* padding */ - gpointer pdummy[5]; // We can add 5 pointers without breaking the ABI. + gpointer pdummy[7]; // We can add 7 pointers without breaking the ABI. }; struct _IBusComponentClass { @@ -125,7 +115,7 @@ GType ibus_component_get_type (void); * @license: Distribution license of this component. * @author: Author(s) of the component. * @homepage: Homepage of the component. - * @exec: path to component executable. + * @command_line: path to component executable. * @textdomain: Domain name for dgettext() * @returns: A newly allocated IBusComponent. * @@ -137,9 +127,24 @@ IBusComponent *ibus_component_new (const gchar *name, const gchar *license, const gchar *author, const gchar *homepage, - const gchar *exec, + const gchar *command_line, const gchar *textdomain); +/** + * ibus_component_new_varargs: + * @first_property_name: Name of the first property. + * @Varargs: the NULL-terminated arguments of the properties and values. + * + * New an IBusComponent. + * ibus_component_new_varargs() supports the va_list format. + * name property is required. e.g. + * IBusComponent *component = ibus_component_new_varargs ("name", "ibus-foo", + * "command_line", "/usr/libexec/ibus-engine-foo --ibus", + * NULL) + */ +IBusComponent *ibus_component_new_varargs (const gchar *first_property_name, + ...); + /** * ibus_component_new_from_xml_node: * @node: Root node of component XML tree. @@ -162,6 +167,78 @@ IBusComponent *ibus_component_new_from_xml_node */ IBusComponent *ibus_component_new_from_file (const gchar *filename); +/** + * ibus_component_get_name: + * @component: An IBusComponent + * @returns: name property in IBusComponent + * + * Return the name property in IBusComponent. It should not be freed. + */ +const gchar *ibus_component_get_name (IBusComponent *component); + +/** + * ibus_component_get_description: + * @component: An IBusComponent + * @returns: description property in IBusComponent + * + * Return the description property in IBusComponent. It should not be freed. + */ +const gchar *ibus_component_get_description (IBusComponent *component); + +/** + * ibus_component_get_version: + * @component: An IBusComponent + * @returns: version property in IBusComponent + * + * Return the version property in IBusComponent. It should not be freed. + */ +const gchar *ibus_component_get_version (IBusComponent *component); + +/** + * ibus_component_get_license: + * @component: An IBusComponent + * @returns: license property in IBusComponent + * + * Return the license property in IBusComponent. It should not be freed. + */ +const gchar *ibus_component_get_license (IBusComponent *component); + +/** + * ibus_component_get_author: + * @component: An IBusComponent + * @returns: author property in IBusComponent + * + * Return the author property in IBusComponent. It should not be freed. + */ +const gchar *ibus_component_get_author (IBusComponent *component); + +/** + * ibus_component_get_homepage: + * @component: An IBusComponent + * @returns: homepage property in IBusComponent + * + * Return the homepage property in IBusComponent. It should not be freed. + */ +const gchar *ibus_component_get_homepage (IBusComponent *component); + +/** + * ibus_component_get_exec: + * @component: An IBusComponent + * @returns: exec property in IBusComponent + * + * Return the exec property in IBusComponent. It should not be freed. + */ +const gchar *ibus_component_get_exec (IBusComponent *component); + +/** + * ibus_component_get_textdomain: + * @component: An IBusComponent + * @returns: textdomain property in IBusComponent + * + * Return the textdomain property in IBusComponent. It should not be freed. + */ +const gchar *ibus_component_get_textdomain (IBusComponent *component); + /** * ibus_component_add_observed_path: * @component: An IBusComponent @@ -188,7 +265,7 @@ void ibus_component_add_engine (IBusComponent *component, /** * ibus_component_get_engines: * @component: An IBusComponent. - * @returns: (transfer none) (element-type IBusEngineDesc): A newly allocated GList that contains engines. + * @returns: (transfer container) (element-type IBusEngineDesc): A newly allocated GList that contains engines. * * Get the engines of this component. */ @@ -229,56 +306,6 @@ void ibus_component_output_engines (IBusComponent *component, */ gboolean ibus_component_check_modification (IBusComponent *component); - -/** - * ibus_component_start: - * @component: An IBusComponent. - * @verbose: if FALSE, redirect the child output to /dev/null - * @returns: TRUE if the component is started; FALSE otherwise. - * - * Whether the IBusComponent is started. - */ -gboolean ibus_component_start (IBusComponent *component, - gboolean verbose); - -/** - * ibus_component_stop: - * @component: An IBusComponent. - * @returns: TRUE if the component is stopped; FALSE otherwise. - * - * Whether the IBusComponent is stopped. - */ -gboolean ibus_component_stop (IBusComponent *component); - -/** - * ibus_component_is_running: - * @component: An IBusComponent. - * @returns: TRUE if the component is running; FALSE otherwise. - * - * Whether the IBusComponent is running. - */ -gboolean ibus_component_is_running (IBusComponent *component); - -/** - * ibus_component_get_from_engine: - * @engine: A description of an engine. - * @returns: (transfer none): An IBusComponent of the engine. - * - * Get the IBusComponent from an engine description. - */ -IBusComponent *ibus_component_get_from_engine (IBusEngineDesc *engine); - -/** - * ibus_component_set_restart: - * @component: An IBusComponent. - * @restart: if TRUE, the component will be restartd when it dies. - * - * Set whether the component needs to be restarted when it dies. - */ -void ibus_component_set_restart (IBusComponent *component, - gboolean restart); - - G_END_DECLS #endif diff --git a/src/ibusconfig.c b/src/ibusconfig.c index 2400d9e73..b691277b7 100644 --- a/src/ibusconfig.c +++ b/src/ibusconfig.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,7 +19,6 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include #include "ibusinternal.h" #include "ibusmarshalers.h" #include "ibusshare.h" @@ -39,90 +39,30 @@ struct _IBusConfigPrivate { }; typedef struct _IBusConfigPrivate IBusConfigPrivate; -#if 0 -struct _BusPair { - GValue car; - GValue cdr; -}; -typedef struct _BusPair BusPair; -#endif - static guint config_signals[LAST_SIGNAL] = { 0 }; -#if 0 -/* functions prototype */ -static BusPair *bus_pair_new (GType car_type, - GType cdr_type, - gpointer car, - gpointer cdr); -static BusPair *bus_pair_copy (BusPair *pair); -static void bus_pair_free (BusPair *pair); -#endif -static void ibus_config_class_init (IBusConfigClass *klass); -static void ibus_config_init (IBusConfig *config); -static void ibus_config_real_destroy (IBusConfig *config); - -static gboolean ibus_config_ibus_signal (IBusProxy *proxy, - IBusMessage *message); - -static IBusProxyClass *parent_class = NULL; - -GType -ibus_config_get_type (void) -{ - static GType type = 0; - - static const GTypeInfo type_info = { - sizeof (IBusConfigClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) ibus_config_class_init, - NULL, /* class finalize */ - NULL, /* class data */ - sizeof (IBusConfig), - 0, - (GInstanceInitFunc) ibus_config_init, - }; - - if (type == 0) { - type = g_type_register_static (IBUS_TYPE_PROXY, - "IBusConfig", - &type_info, - (GTypeFlags)0); - } - return type; -} - -IBusConfig * -ibus_config_new (IBusConnection *connection) -{ - g_assert (IBUS_IS_CONNECTION (connection)); +static void ibus_config_class_init (IBusConfigClass *class); +static void ibus_config_init (IBusConfig *config); +static void ibus_config_real_destroy (IBusProxy *proxy); - GObject *obj; - obj = g_object_new (IBUS_TYPE_CONFIG, - "name", IBUS_SERVICE_CONFIG, - "interface", IBUS_INTERFACE_CONFIG, - "path", IBUS_PATH_CONFIG, - "connection", connection, - NULL); +static void ibus_config_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters); - return IBUS_CONFIG (obj); -} +G_DEFINE_TYPE (IBusConfig, ibus_config, IBUS_TYPE_PROXY) static void -ibus_config_class_init (IBusConfigClass *klass) +ibus_config_class_init (IBusConfigClass *class) { - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); - IBusProxyClass *proxy_class = IBUS_PROXY_CLASS (klass); + GDBusProxyClass *dbus_proxy_class = G_DBUS_PROXY_CLASS (class); + IBusProxyClass *proxy_class = IBUS_PROXY_CLASS (class); + g_type_class_add_private (class, sizeof (IBusConfigPrivate)); - parent_class = (IBusProxyClass *) g_type_class_peek_parent (klass); + dbus_proxy_class->g_signal = ibus_config_g_signal; + proxy_class->destroy = ibus_config_real_destroy; - g_type_class_add_private (klass, sizeof (IBusConfigPrivate)); - - ibus_object_class->destroy = (IBusObjectDestroyFunc) ibus_config_real_destroy; - - proxy_class->ibus_signal = ibus_config_ibus_signal; /* install signals */ /** @@ -137,153 +77,383 @@ ibus_config_class_init (IBusConfigClass *klass) */ config_signals[VALUE_CHANGED] = g_signal_new (I_("value-changed"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__STRING_STRING_BOXED, + _ibus_marshal_VOID__STRING_STRING_VARIANT, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, - G_TYPE_VALUE | G_SIGNAL_TYPE_STATIC_SCOPE); + G_TYPE_VARIANT | G_SIGNAL_TYPE_STATIC_SCOPE); } static void ibus_config_init (IBusConfig *config) { - IBusConfigPrivate *priv; - priv = IBUS_CONFIG_GET_PRIVATE (config); } static void -ibus_config_real_destroy (IBusConfig *config) +ibus_config_real_destroy (IBusProxy *proxy) { - if (ibus_proxy_get_connection ((IBusProxy *) config) != NULL) { - ibus_proxy_call ((IBusProxy *) config, - "Destroy", - G_TYPE_INVALID); - } - - IBUS_OBJECT_CLASS(parent_class)->destroy (IBUS_OBJECT (config)); + IBUS_PROXY_CLASS(ibus_config_parent_class)->destroy (proxy); } -static gboolean -ibus_config_ibus_signal (IBusProxy *proxy, - IBusMessage *message) +static void +ibus_config_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters) { - g_assert (IBUS_IS_CONFIG (proxy)); - g_assert (message != NULL); - - IBusConfig *config; - config = IBUS_CONFIG (proxy); - - if (ibus_message_is_signal (message, IBUS_INTERFACE_CONFIG, "ValueChanged")) { - gchar *section; - gchar *name; - GValue value = { 0 }; - IBusError *error = NULL; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, §ion, - G_TYPE_STRING, &name, - G_TYPE_VALUE, &value, - G_TYPE_INVALID); - if (!retval) { - g_warning ("%s: Can not parse arguments of ValueChanges.", DBUS_ERROR_INVALID_ARGS); - return FALSE; - } + if (g_strcmp0 (signal_name, "ValueChanged") == 0) { + const gchar *section = NULL; + const gchar *name = NULL; + GVariant *value = NULL; - g_signal_emit (config, + g_variant_get (parameters, "(&s&sv)", §ion, &name, &value); + + g_signal_emit (proxy, config_signals[VALUE_CHANGED], 0, section, name, - &value); - g_value_unset (&value); + value); + g_variant_unref (value); + return; + } - g_signal_stop_emission_by_name (config, "ibus-signal"); + g_return_if_reached (); +} - return TRUE; +IBusConfig * +ibus_config_new (GDBusConnection *connection, + GCancellable *cancellable, + GError **error) +{ + g_assert (G_IS_DBUS_CONNECTION (connection)); + + GInitable *initable; + + GDBusProxyFlags flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START | + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES; + + initable = g_initable_new (IBUS_TYPE_CONFIG, + cancellable, + error, + "g-connection", connection, + "g-flags", flags, + "g-name", IBUS_SERVICE_CONFIG, + "g-interface-name", IBUS_INTERFACE_CONFIG, + "g-object-path", IBUS_PATH_CONFIG, + "g-default-timeout", ibus_get_timeout (), + NULL); + if (initable == NULL) + return NULL; + + if (g_dbus_proxy_get_name_owner (G_DBUS_PROXY (initable)) == NULL) { + /* The configuration daemon, which is usually ibus-gconf, is not started yet. */ + g_object_unref (initable); + return NULL; } - return FALSE; + /* clients should not destroy the config service. */ + IBUS_PROXY (initable)->own = FALSE; + + return IBUS_CONFIG (initable); } -gboolean +void +ibus_config_new_async (GDBusConnection *connection, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_assert (G_IS_DBUS_CONNECTION (connection)); + g_assert (callback != NULL); + + GDBusProxyFlags flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START | + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES; + + g_async_initable_new_async (IBUS_TYPE_CONFIG, + G_PRIORITY_DEFAULT, + cancellable, + callback, + user_data, + "g-connection", connection, + "g-flags", flags, + "g-name", IBUS_SERVICE_CONFIG, + "g-interface-name", IBUS_INTERFACE_CONFIG, + "g-object-path", IBUS_PATH_CONFIG, + "g-default-timeout", ibus_get_timeout (), + NULL); +} + +IBusConfig * +ibus_config_new_async_finish (GAsyncResult *res, + GError **error) +{ + g_assert (G_IS_ASYNC_RESULT (res)); + g_assert (error == NULL || *error == NULL); + + GObject *object = NULL; + GObject *source_object = NULL; + + source_object = g_async_result_get_source_object (res); + g_assert (source_object != NULL); + + object = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), + res, + error); + g_object_unref (source_object); + + if (object != NULL) { + if (g_dbus_proxy_get_name_owner (G_DBUS_PROXY (object)) == NULL) { + /* The configuration daemon, which is usually ibus-gconf, + * is not started yet. */ + if (error != NULL) { + *error = g_error_new (G_DBUS_ERROR, + G_DBUS_ERROR_FAILED, + IBUS_SERVICE_CONFIG " does not exist."); + } + g_object_unref (object); + return NULL; + } + /* clients should not destroy the config service. */ + IBUS_PROXY (object)->own = FALSE; + return IBUS_CONFIG (object); + } + else { + return NULL; + } +} + +GVariant * ibus_config_get_value (IBusConfig *config, const gchar *section, - const gchar *name, - GValue *value) + const gchar *name) { g_assert (IBUS_IS_CONFIG (config)); g_assert (section != NULL); g_assert (name != NULL); - g_assert (value != NULL); - IBusMessage *reply; - IBusError *error; - gboolean retval; - - reply = ibus_proxy_call_with_reply_and_block ((IBusProxy *) config, - "GetValue", - -1, - &error, - G_TYPE_STRING, §ion, - G_TYPE_STRING, &name, - G_TYPE_INVALID); - if (reply == NULL) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - return FALSE; + GError *error = NULL; + GVariant *result; + result = g_dbus_proxy_call_sync ((GDBusProxy *) config, + "GetValue", /* method_name */ + g_variant_new ("(ss)", + section, name), /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + -1, /* timeout */ + NULL, /* cancellable */ + &error /* error */ + ); + if (result == NULL) { + g_warning ("%s.GetValue: %s", IBUS_INTERFACE_CONFIG, error->message); + g_error_free (error); + return NULL; } - if ((error = ibus_error_new_from_message (reply)) != NULL) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - ibus_message_unref (reply); - return FALSE; + GVariant *value = NULL; + g_variant_get (result, "(v)", &value); + g_variant_unref (result); + + return value; +} + +void +ibus_config_get_value_async (IBusConfig *config, + const gchar *section, + const gchar *name, + gint timeout_ms, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_assert (IBUS_IS_CONFIG (config)); + g_assert (section != NULL); + g_assert (name != NULL); + + g_dbus_proxy_call ((GDBusProxy *)config, + "GetValue", + g_variant_new ("(ss)", section, name), + G_DBUS_CALL_FLAGS_NONE, + timeout_ms, + cancellable, + callback, + user_data); +} + +GVariant * +ibus_config_get_value_async_finish (IBusConfig *config, + GAsyncResult *result, + GError **error) +{ + g_assert (IBUS_IS_CONFIG (config)); + g_assert (G_IS_ASYNC_RESULT (result)); + g_assert (error == NULL || *error == NULL); + + GVariant *value = NULL; + GVariant *retval = g_dbus_proxy_call_finish ((GDBusProxy *)config, + result, + error); + if (retval != NULL) { + g_variant_get (retval, "(v)", &value); + g_variant_unref (retval); } - retval = ibus_message_get_args (reply, - &error, - G_TYPE_VALUE, value, - G_TYPE_INVALID); - ibus_message_unref (reply); - if (!retval) { - g_warning ("%s: %s", error->name, error->message); - return FALSE; + return value; +} + +GVariant * +ibus_config_get_values (IBusConfig *config, + const gchar *section) +{ + g_assert (IBUS_IS_CONFIG (config)); + g_assert (section != NULL); + + GError *error = NULL; + GVariant *result; + result = g_dbus_proxy_call_sync ((GDBusProxy *) config, + "GetValues", + g_variant_new ("(s)", section), + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + &error); + if (result == NULL) { + g_warning ("%s.GetValues: %s", IBUS_INTERFACE_CONFIG, error->message); + g_error_free (error); + return NULL; } - return TRUE; + GVariant *value = NULL; + g_variant_get (result, "(@a{sv})", &value); + g_variant_unref (result); + + return value; } +void +ibus_config_get_values_async (IBusConfig *config, + const gchar *section, + gint timeout_ms, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_assert (IBUS_IS_CONFIG (config)); + g_assert (section != NULL); + + g_dbus_proxy_call ((GDBusProxy *)config, + "GetValues", + g_variant_new ("(s)", section), + G_DBUS_CALL_FLAGS_NONE, + timeout_ms, + cancellable, + callback, + user_data); +} + +GVariant * +ibus_config_get_values_async_finish (IBusConfig *config, + GAsyncResult *result, + GError **error) +{ + g_assert (IBUS_IS_CONFIG (config)); + g_assert (G_IS_ASYNC_RESULT (result)); + g_assert (error == NULL || *error == NULL); + + GVariant *value = NULL; + GVariant *retval = g_dbus_proxy_call_finish ((GDBusProxy *)config, + result, + error); + if (retval != NULL) { + g_variant_get (retval, "(@a{sv})", &value); + g_variant_unref (retval); + } + + return value; +} + gboolean ibus_config_set_value (IBusConfig *config, const gchar *section, const gchar *name, - const GValue *value) + GVariant *value) { g_assert (IBUS_IS_CONFIG (config)); g_assert (section != NULL); g_assert (name != NULL); g_assert (value != NULL); - gboolean retval; - - retval = ibus_proxy_call ((IBusProxy *) config, - "SetValue", - G_TYPE_STRING, §ion, - G_TYPE_STRING, &name, - G_TYPE_VALUE, value, - G_TYPE_INVALID); - g_assert (retval); + GError *error = NULL; + GVariant *result; + result = g_dbus_proxy_call_sync ((GDBusProxy *) config, + "SetValue", /* method_name */ + g_variant_new ("(ssv)", + section, name, value), /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + -1, /* timeout */ + NULL, /* cancellable */ + &error /* error */ + ); + if (result == NULL) { + g_warning ("%s.SetValue: %s", IBUS_INTERFACE_CONFIG, error->message); + g_error_free (error); + return FALSE; + } + g_variant_unref (result); return TRUE; } +void +ibus_config_set_value_async (IBusConfig *config, + const gchar *section, + const gchar *name, + GVariant *value, + gint timeout_ms, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_assert (IBUS_IS_CONFIG (config)); + g_assert (section != NULL); + g_assert (name != NULL); + g_assert (value != NULL); + + g_dbus_proxy_call ((GDBusProxy *) config, + "SetValue", /* method_name */ + g_variant_new ("(ssv)", + section, name, value), /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + timeout_ms, + cancellable, + callback, + user_data); +} + +gboolean +ibus_config_set_value_async_finish (IBusConfig *config, + GAsyncResult *result, + GError **error) +{ + g_assert (IBUS_IS_CONFIG (config)); + g_assert (G_IS_ASYNC_RESULT (result)); + g_assert (error == NULL || *error == NULL); + + GVariant *retval = g_dbus_proxy_call_finish ((GDBusProxy *)config, + result, + error); + if (retval != NULL) { + g_variant_unref (retval); + return TRUE; + } + + return FALSE; +} + gboolean ibus_config_unset (IBusConfig *config, const gchar *section, @@ -293,13 +463,22 @@ ibus_config_unset (IBusConfig *config, g_assert (section != NULL); g_assert (name != NULL); - gboolean retval; - - retval = ibus_proxy_call ((IBusProxy *) config, - "Unset", - G_TYPE_STRING, §ion, - G_TYPE_STRING, &name, - G_TYPE_INVALID); - g_assert (retval); + GError *error = NULL; + GVariant *result; + result = g_dbus_proxy_call_sync ((GDBusProxy *) config, + "UnsetValue", /* method_name */ + g_variant_new ("(ss)", + section, name), /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + -1, /* timeout */ + NULL, /* cancellable */ + &error /* error */ + ); + if (result == NULL) { + g_warning ("%s.UnsetValue: %s", IBUS_INTERFACE_CONFIG, error->message); + g_error_free (error); + return FALSE; + } + g_variant_unref (result); return TRUE; } diff --git a/src/ibusconfig.h b/src/ibusconfig.h index fd256c102..c3e01056b 100644 --- a/src/ibusconfig.h +++ b/src/ibusconfig.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusconfig * @title: IBusConfig @@ -75,22 +81,52 @@ GType ibus_config_get_type (void); /** * ibus_config_new: - * @connection: An IBusConnection. - * @returns: An newly allocated IBusConfig corresponding to @connection. + * @connection: A #GDBusConnection. + * @returns: An newly allocated #IBusConfig corresponding to @connection. + * + * New an #IBusConfig from existing #GDBusConnection. + */ +IBusConfig *ibus_config_new (GDBusConnection *connection, + GCancellable *cancellable, + GError **error); + +/** + * ibus_config_new_async: + * @connection: An #GDBusConnection. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * The callback should not be %NULL. + * @user_data: The data to pass to callback. * - * New a IBusConfig from existing IBusConnection. + * New an #IBusConfig asynchronously. */ -IBusConfig *ibus_config_new (IBusConnection *connection); +void ibus_config_new_async (GDBusConnection *connection, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +/** + * ibus_config_new_async_finish: + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback pass to + * ibus_config_new_async(). + * @error: Return location for error or %NULL. + * + * @returns: A newly allocated #IBusConfig. + * + * Finishes an operation started with ibus_config_new_async(). + */ +IBusConfig *ibus_config_new_async_finish + (GAsyncResult *res, + GError **error); /** * ibus_config_get_value: - * @config: An IBusConfig + * @config: An #IBusConfig * @section: Section name of the configuration option. * @name: Name of the configure option. - * @value: GValue that holds the value. - * @returns: TRUE if succeed; FALSE otherwise. + * @returns: A #GVariant or %NULL. Free with g_variant_unref(). * - * Get the value of a configuration option. + * Get the value of a configuration option synchronously. * * GConf stores configure options in a tree-like structure, * and the IBus related setting is at /desktop/ibus, @@ -99,42 +135,173 @@ IBusConfig *ibus_config_new (IBusConnection *connection); * * ibus-chewing, for example, stores its setting in /desktop/ibus/engine/Chewing, * so the section name for it is "engine/Chewing". - * @see_also: ibus_config_set_value. + * See also: ibus_config_set_value(). */ -gboolean ibus_config_get_value (IBusConfig *config, +GVariant *ibus_config_get_value (IBusConfig *config, const gchar *section, - const gchar *name, - GValue *value); + const gchar *name); + +/** + * ibus_config_get_value_async: + * @config: An #IBusConfig + * @section: Section name of the configuration option. + * @name: Name of the configure option. + * @timeout_ms: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: Callback function to invoke when the return value is ready. + * @user_data: The data to pass to callback. + * + * Get the value of a configuration option asynchronously. + * + * See also: ibus_config_get_value(). + */ +void ibus_config_get_value_async (IBusConfig *config, + const gchar *section, + const gchar *name, + gint timeout_ms, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +/** + * ibus_config_get_value_async_finish: + * @config: A #IBusConfig. + * @result: A #GAsyncResult. + * @error: Return location for error or %NULL. + * @returns: A #GVariant or %NULL if error is set. Free with g_variant_unref(). + * + * Finish get value of a configuration option. + * + * See also: ibus_config_get_value_async(). + */ +GVariant *ibus_config_get_value_async_finish + (IBusConfig *config, + GAsyncResult *result, + GError **error); + +/** + * ibus_config_get_values: + * @config: An #IBusConfig + * @section: Section name of the configuration option. + * @returns: A #GVariant or %NULL. Free with g_variant_unref(). + * + * Get all values in a section synchronously. + * + * See also: ibus_config_set_value(). + */ +GVariant *ibus_config_get_values (IBusConfig *config, + const gchar *section); + +/** + * ibus_config_get_values_async: + * @config: An #IBusConfig + * @section: Section name of the configuration option. + * @timeout_ms: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: Callback function to invoke when the return value is ready. + * @user_data: The data to pass to callback. + * + * Get all values in a section asynchronously. + * + * See also: ibus_config_get_values(). + */ +void ibus_config_get_values_async(IBusConfig *config, + const gchar *section, + gint timeout_ms, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +/** + * ibus_config_get_values_async_finish: + * @config: A #IBusConfig. + * @result: A #GAsyncResult. + * @error: Return location for error or %NULL. + * @returns: A #GVariant or %NULL if error is set. Free with g_variant_unref(). + * + * Finish get values in a section. + * + * See also: ibus_config_get_values_async(). + */ +GVariant *ibus_config_get_values_async_finish + (IBusConfig *config, + GAsyncResult *result, + GError **error); /** * ibus_config_set_value: - * @config: An IBusConfig + * @config: An #IBusConfig * @section: Section name of the configuration option. * @name: Name of the configure option its self. - * @value: GValue that holds the value. - * @returns: TRUE if succeed; FALSE otherwise. + * @value: A #GVariant that holds the value. If the value is floating, the + * function takes ownership of it. + * @returns: %TRUE if succeed; %FALSE otherwise. * - * Set the value of a configuration option. - * @see_also: ibus_config_get_value. + * Set the value of a configuration option synchronously. + * See also: ibus_config_get_value(). */ gboolean ibus_config_set_value (IBusConfig *config, const gchar *section, const gchar *name, - const GValue *value); + GVariant *value); + +/** + * ibus_config_set_value_async: + * @config: An #IBusConfig + * @section: Section name of the configuration option. + * @name: Name of the configure option. + * @value: A #GVariant that holds the value. If the value is floating, the + * function takes ownership of it. + * @timeout_ms: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: Callback function to invoke when the return value is ready. + * @user_data: The data to pass to callback. + * + * Set the value of a configuration option asynchronously. + * + * See also: ibus_config_set_value(). + */ +void ibus_config_set_value_async (IBusConfig *config, + const gchar *section, + const gchar *name, + GVariant *value, + gint timeout_ms, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +/** + * ibus_config_set_value_async_finish: + * @config: A #IBusConfig. + * @result: A #GAsyncResult. + * @error: Return location for error or %NULL. + * @returns: %TRUE or %FALSE if error is set. + * + * Finish set value of a configuration option. + * + * See also: ibus_config_set_value_async(). + */ +gboolean ibus_config_set_value_async_finish + (IBusConfig *config, + GAsyncResult *result, + GError **error); /** * ibus_config_unset: - * @config: An IBusConfig + * @config: An #IBusConfig * @section: Section name of the configuration option. * @name: Name of the configure option its self. - * @returns: TRUE if succeed; FALSE otherwise. + * @returns: %TRUE if succeed; %FALSE otherwise. * * Remove an entry of a configuration option. - * @see_also: ibus_config_get_value. + * See also: ibus_config_get_value(). */ gboolean ibus_config_unset (IBusConfig *config, const gchar *section, const gchar *name); + +/* FIXME add an asynchronous version of unset */ + G_END_DECLS #endif diff --git a/src/ibusconfigprivate.h b/src/ibusconfigprivate.h deleted file mode 100644 index 7e7316d45..000000000 --- a/src/ibusconfigprivate.h +++ /dev/null @@ -1,221 +0,0 @@ -/* vim:set et sts=4: */ -/* ibus - The Input Bus - * Copyright (C) 2008-2010 Peng Huang - * Copyright (C) 2008-2010 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#ifndef __IBUS_CONFIG_PRIVATE_H_ -#define __IBUS_CONFIG_PRIVATE_H_ - -static void -_from_dbus_value (IBusMessageIter *iter, - GValue *value) -{ - g_assert (iter != NULL); - g_assert (value != NULL); - - GType type; - IBusMessageIter sub_iter; - - type = ibus_message_iter_get_arg_type (iter); - if (type == IBUS_TYPE_VARIANT) { - ibus_message_iter_recurse (iter, IBUS_TYPE_VARIANT, &sub_iter); - iter = &sub_iter; - type = ibus_message_iter_get_arg_type (iter); - } - - switch (type) { - case G_TYPE_STRING: - { - gchar *v; - g_value_init (value, G_TYPE_STRING); - ibus_message_iter_get_basic (iter, &v); - g_value_set_string (value, v); - } - break; - case G_TYPE_INT: - { - gint v; - g_value_init (value, G_TYPE_INT); - ibus_message_iter_get_basic (iter, &v); - g_value_set_int (value, v); - } - break; - case G_TYPE_UINT: - { - guint v; - g_value_init (value, G_TYPE_UINT); - ibus_message_iter_get_basic (iter, &v); - g_value_set_uint (value, v); - } - break; - case G_TYPE_BOOLEAN: - { - gboolean v; - g_value_init (value, G_TYPE_BOOLEAN); - ibus_message_iter_get_basic (iter, &v); - g_value_set_boolean (value, v); - } - break; - case G_TYPE_DOUBLE: - { - gdouble v; - g_value_init (value, G_TYPE_DOUBLE); - ibus_message_iter_get_basic (iter, &v); - g_value_set_double (value, v); - } - break; - default: - if (type == IBUS_TYPE_ARRAY) { - GValue v = { 0 }; - IBusMessageIter sub_iter; - GType sub_type; - GValueArray *array; - - - sub_type = ibus_message_iter_get_element_type (iter); - g_assert (sub_type == G_TYPE_STRING || - sub_type == G_TYPE_INT || - sub_type == G_TYPE_UINT || - sub_type == G_TYPE_BOOLEAN || - sub_type == G_TYPE_DOUBLE || - sub_type == IBUS_TYPE_VARIANT); - - g_value_init (value, G_TYPE_VALUE_ARRAY); - array = g_value_array_new (0); - ibus_message_iter_recurse (iter, IBUS_TYPE_ARRAY, &sub_iter); - while (ibus_message_iter_get_arg_type (&sub_iter) != G_TYPE_INVALID) { - _from_dbus_value (&sub_iter, &v); - ibus_message_iter_next (&sub_iter); - g_value_array_append (array, &v); - g_value_unset (&v); - } - g_value_take_boxed (value, array); - break; - } - - g_debug ("type=%s", g_type_name (type)); - - g_assert_not_reached (); - } -} - -static void -_to_dbus_value (IBusMessageIter *iter, - const GValue *value) -{ - IBusMessageIter sub_iter; - gboolean retval; - - - switch (G_VALUE_TYPE (value)) { - case G_TYPE_STRING: - { - retval = ibus_message_iter_open_container (iter, IBUS_TYPE_VARIANT, "s", &sub_iter); - g_assert (retval); - - const gchar *v = g_value_get_string (value); - ibus_message_iter_append (&sub_iter, - G_TYPE_STRING, - &v); - ibus_message_iter_close_container (iter, &sub_iter); - } - break; - case G_TYPE_INT: - { - retval = ibus_message_iter_open_container (iter, IBUS_TYPE_VARIANT, "i", &sub_iter); - g_assert (retval); - - gint v = g_value_get_int (value); - ibus_message_iter_append (&sub_iter, - G_TYPE_INT, - &v); - ibus_message_iter_close_container (iter, &sub_iter); - } - break; - case G_TYPE_UINT: - { - retval = ibus_message_iter_open_container (iter, IBUS_TYPE_VARIANT, "u", &sub_iter); - g_assert (retval); - - guint v = g_value_get_uint (value); - ibus_message_iter_append (&sub_iter, - G_TYPE_UINT, - &v); - ibus_message_iter_close_container (iter, &sub_iter); - } - break; - case G_TYPE_BOOLEAN: - { - retval = ibus_message_iter_open_container (iter, IBUS_TYPE_VARIANT, "b", &sub_iter); - g_assert (retval); - - gboolean v = g_value_get_boolean (value); - ibus_message_iter_append (&sub_iter, - G_TYPE_BOOLEAN, - &v); - ibus_message_iter_close_container (iter, &sub_iter); - } - break; - case G_TYPE_DOUBLE: - { - retval = ibus_message_iter_open_container (iter, IBUS_TYPE_VARIANT, "d", &sub_iter); - g_assert (retval); - - gdouble v = g_value_get_double (value); - ibus_message_iter_append (&sub_iter, - G_TYPE_DOUBLE, - &v); - ibus_message_iter_close_container (iter, &sub_iter); - } - break; - default: - if (G_TYPE_VALUE_ARRAY == G_VALUE_TYPE (value)) { - IBusMessageIter sub_sub_iter; - GType type = G_TYPE_INVALID; - gint i; - - retval = ibus_message_iter_open_container (iter, IBUS_TYPE_VARIANT, "av", &sub_iter); - g_assert (retval); - - GValueArray *array = (GValueArray *)g_value_get_boxed (value); - ibus_message_iter_open_container (&sub_iter, - IBUS_TYPE_ARRAY, - "v", - &sub_sub_iter); - if (array->n_values > 0) { - type = G_VALUE_TYPE (&array->values[0]); - g_assert (type == G_TYPE_STRING || - type == G_TYPE_INT || - type == G_TYPE_UINT || - type == G_TYPE_BOOLEAN || - type == G_TYPE_DOUBLE); - } - for (i = 0; i < array->n_values; i++) { - g_assert (type == G_VALUE_TYPE (&array->values[i])); - _to_dbus_value (&sub_sub_iter, &array->values[i]); - } - ibus_message_iter_close_container (&sub_iter, &sub_sub_iter); - ibus_message_iter_close_container (iter, &sub_iter); - break; - } - g_assert_not_reached(); - } - -} -#endif - diff --git a/src/ibusconfigservice.c b/src/ibusconfigservice.c index fe8e14291..937dfdd41 100644 --- a/src/ibusconfigservice.c +++ b/src/ibusconfigservice.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,7 +19,6 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include #include "ibusshare.h" #include "ibusconfigservice.h" @@ -28,115 +28,116 @@ enum { enum { PROP_0, - PROP_CONNECTION, }; // static guint config_service_signals[LAST_SIGNAL] = { 0 }; /* functions prototype */ -static void ibus_config_service_class_init (IBusConfigServiceClass *klass); -static void ibus_config_service_init (IBusConfigService *config); -static void ibus_config_service_set_property (IBusConfigService *config, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void ibus_config_service_get_property (IBusConfigService *config, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static void ibus_config_service_destroy (IBusConfigService *config); -static gboolean ibus_config_service_ibus_message (IBusConfigService *config, - IBusConnection *connection, - IBusMessage *message); -static gboolean ibus_config_service_set_value (IBusConfigService *config, - const gchar *section, - const gchar *name, - const GValue *value, - IBusError **error); -static gboolean ibus_config_service_get_value (IBusConfigService *config, - const gchar *section, - const gchar *name, - GValue *value, - IBusError **error); -static gboolean ibus_config_service_unset (IBusConfigService *config, - const gchar *section, - const gchar *name, - IBusError **error); - -static IBusServiceClass *parent_class = NULL; - -GType -ibus_config_service_get_type (void) -{ - static GType type = 0; - - static const GTypeInfo type_info = { - sizeof (IBusConfigServiceClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) ibus_config_service_class_init, - NULL, /* class finalize */ - NULL, /* class data */ - sizeof (IBusConfigService), - 0, - (GInstanceInitFunc) ibus_config_service_init, - }; - - if (type == 0) { - type = g_type_register_static (IBUS_TYPE_SERVICE, - "IBusConfigService", - &type_info, - (GTypeFlags) 0); - } - return type; -} - -IBusConfigService * -ibus_config_service_new (IBusConnection *connection) -{ - g_assert (IBUS_IS_CONNECTION (connection)); - - IBusConfigService *config; - - config = (IBusConfigService *) g_object_new (IBUS_TYPE_CONFIG_SERVICE, - "path", IBUS_PATH_CONFIG, - "connection", connection, - NULL); - - return config; -} +static void ibus_config_service_class_init (IBusConfigServiceClass *class); +static void ibus_config_service_init (IBusConfigService *config); +static void ibus_config_service_set_property (IBusConfigService *config, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void ibus_config_service_get_property (IBusConfigService *config, + guint prop_id, + GValue *value, + GParamSpec *pspec); +static void ibus_config_service_destroy (IBusConfigService *config); +static void ibus_config_service_service_method_call + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation); +static GVariant *ibus_config_service_service_get_property + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error); +static gboolean ibus_config_service_service_set_property + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error); +static gboolean ibus_config_service_set_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GVariant *value, + GError **error); +static GVariant *ibus_config_service_get_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error); +static GVariant *ibus_config_service_get_values (IBusConfigService *config, + const gchar *section, + GError **error); +static gboolean ibus_config_service_unset_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error); + +G_DEFINE_TYPE (IBusConfigService, ibus_config_service, IBUS_TYPE_SERVICE) + +static const gchar introspection_xml[] = + "" + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; static void -ibus_config_service_class_init (IBusConfigServiceClass *klass) +ibus_config_service_class_init (IBusConfigServiceClass *class) { - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - - parent_class = (IBusServiceClass *) g_type_class_peek_parent (klass); + GObjectClass *gobject_class = G_OBJECT_CLASS (class); gobject_class->set_property = (GObjectSetPropertyFunc) ibus_config_service_set_property; gobject_class->get_property = (GObjectGetPropertyFunc) ibus_config_service_get_property; IBUS_OBJECT_CLASS (gobject_class)->destroy = (IBusObjectDestroyFunc) ibus_config_service_destroy; - IBUS_SERVICE_CLASS (klass)->ibus_message = (ServiceIBusMessageFunc) ibus_config_service_ibus_message; - - klass->set_value = ibus_config_service_set_value; - klass->get_value = ibus_config_service_get_value; - klass->unset = ibus_config_service_unset; - - /* install properties */ - /** - * IBusConfigService:connection: - * - * Connection of this IBusConfigService. - */ - g_object_class_install_property (gobject_class, - PROP_CONNECTION, - g_param_spec_object ("connection", - "connection", - "The connection of config object", - IBUS_TYPE_CONNECTION, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + IBUS_SERVICE_CLASS (class)->service_method_call = ibus_config_service_service_method_call; + IBUS_SERVICE_CLASS (class)->service_get_property = ibus_config_service_service_get_property; + IBUS_SERVICE_CLASS (class)->service_set_property = ibus_config_service_service_set_property; + + ibus_service_class_add_interfaces (IBUS_SERVICE_CLASS (class), introspection_xml); + + class->set_value = ibus_config_service_set_value; + class->get_value = ibus_config_service_get_value; + class->get_values = ibus_config_service_get_values; + class->unset_value = ibus_config_service_unset_value; } static void @@ -151,11 +152,6 @@ ibus_config_service_set_property (IBusConfigService *config, GParamSpec *pspec) { switch (prop_id) { - case PROP_CONNECTION: - ibus_service_add_to_connection ((IBusService *) config, - g_value_get_object (value)); - break; - default: G_OBJECT_WARN_INVALID_PROPERTY_ID (config, prop_id, pspec); } @@ -168,18 +164,10 @@ ibus_config_service_get_property (IBusConfigService *config, GParamSpec *pspec) { switch (prop_id) { + #if 0 case PROP_CONNECTION: - { - GList *connections = ibus_service_get_connections ((IBusService *) config); - if (connections) { - g_value_set_object (value, connections->data); - } - else { - g_value_set_object (value, NULL); - } - g_list_free (connections); - } break; + #endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (config, prop_id, pspec); } @@ -188,179 +176,238 @@ ibus_config_service_get_property (IBusConfigService *config, static void ibus_config_service_destroy (IBusConfigService *config) { - IBUS_OBJECT_CLASS(parent_class)->destroy ((IBusObject *) config); + IBUS_OBJECT_CLASS(ibus_config_service_parent_class)->destroy ((IBusObject *) config); } -static gboolean -ibus_config_service_ibus_message (IBusConfigService *config, - IBusConnection *connection, - IBusMessage *message) +static void +ibus_config_service_service_method_call (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (IBUS_IS_CONFIG_SERVICE (config)); - g_assert (IBUS_IS_CONNECTION (connection)); - g_assert (message != NULL); - - IBusMessage *reply = NULL; + IBusConfigService *config = IBUS_CONFIG_SERVICE (service); + + if (g_strcmp0 (interface_name, IBUS_INTERFACE_CONFIG) != 0) { + IBUS_SERVICE_CLASS (ibus_config_service_parent_class)-> + service_method_call (service, + connection, + sender, + object_path, + interface_name, + method_name, + parameters, + invocation); + return; + } - if (ibus_message_is_method_call (message, IBUS_INTERFACE_CONFIG, "SetValue")) { + if (g_strcmp0 (method_name, "SetValue") == 0) { gchar *section; gchar *name; - GValue value = { 0 }; - IBusError *error = NULL; + GVariant *value; gboolean retval; + GError *error = NULL; - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, §ion, - G_TYPE_STRING, &name, - G_TYPE_VALUE, &value, - G_TYPE_INVALID); - if (!retval) { - reply = ibus_message_new_error_printf (message, - DBUS_ERROR_INVALID_ARGS, - "Can not parse arguments 1 of SetValue"); - ibus_error_free (error); - } - else if (!IBUS_CONFIG_SERVICE_GET_CLASS (config)->set_value (config, section, name, &value, &error)) { - reply = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); + g_variant_get (parameters, "(&s&sv)", §ion, &name, &value); + + retval = IBUS_CONFIG_SERVICE_GET_CLASS (config)->set_value (config, section, name, value, &error); + if (retval) { + g_dbus_method_invocation_return_value (invocation, NULL); } else { - reply = ibus_message_new_method_return (message); + g_dbus_method_invocation_return_gerror (invocation, error); + g_error_free (error); } + return; } - else if (ibus_message_is_method_call (message, IBUS_INTERFACE_CONFIG, "GetValue")) { + + if (g_strcmp0 (method_name, "GetValue") == 0) { gchar *section; gchar *name; - GValue value = { 0 }; - IBusError *error = NULL; - gboolean retval; + GVariant *value; + GError *error = NULL; - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, §ion, - G_TYPE_STRING, &name, - G_TYPE_INVALID); - - if (!retval) { - reply = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); + g_variant_get (parameters, "(&s&s)", §ion, &name); + + value = IBUS_CONFIG_SERVICE_GET_CLASS (config)->get_value (config, section, name, &error); + if (value != NULL) { + g_dbus_method_invocation_return_value (invocation, g_variant_new ("(v)", value)); } - else if (!IBUS_CONFIG_SERVICE_GET_CLASS (config)->get_value (config, section, name, &value, &error)) { - reply = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); + else { + g_dbus_method_invocation_return_gerror (invocation, error); + g_error_free (error); + } + return; + } + + if (g_strcmp0 (method_name, "GetValues") == 0) { + gchar *section; + GVariant *value; + GError *error = NULL; + + g_variant_get (parameters, "(&s)", §ion); + + value = IBUS_CONFIG_SERVICE_GET_CLASS (config)->get_values (config, + section, + &error); + if (value) { + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(@a{sv})", value)); } else { - reply = ibus_message_new_method_return (message); - ibus_message_append_args (reply, - G_TYPE_VALUE, &value, - G_TYPE_INVALID); - g_value_unset (&value); + g_dbus_method_invocation_return_gerror (invocation, error); + g_error_free (error); } + return; } - else if (ibus_message_is_method_call (message, IBUS_INTERFACE_CONFIG, "Unset")) { + + if (g_strcmp0 (method_name, "UnsetValue") == 0) { gchar *section; gchar *name; - IBusError *error = NULL; gboolean retval; + GError *error = NULL; - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, §ion, - G_TYPE_STRING, &name, - G_TYPE_INVALID); - if (!retval) { - reply = ibus_message_new_error_printf (message, - DBUS_ERROR_INVALID_ARGS, - "Can not parse arguments 1 of Unset"); - ibus_error_free (error); - } - else if (!IBUS_CONFIG_SERVICE_GET_CLASS (config)->unset (config, section, name, &error)) { - reply = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); + g_variant_get (parameters, "(&s&s)", §ion, &name); + + retval = IBUS_CONFIG_SERVICE_GET_CLASS (config)->unset_value (config, section, name, &error); + if (retval) { + g_dbus_method_invocation_return_value (invocation, NULL); } else { - reply = ibus_message_new_method_return (message); + g_dbus_method_invocation_return_gerror (invocation, error); + g_error_free (error); } + return; } - if (reply) { - ibus_connection_send (connection, reply); - ibus_message_unref (reply); - return TRUE; - } + /* should not be reached */ + g_return_if_reached (); +} - return parent_class->ibus_message ((IBusService *) config, connection, message); +static GVariant * +ibus_config_service_service_get_property (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error) +{ + return IBUS_SERVICE_CLASS (ibus_config_service_parent_class)-> + service_get_property (service, + connection, + sender, + object_path, + interface_name, + property_name, + error); +} + +static gboolean +ibus_config_service_service_set_property (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error) +{ + return IBUS_SERVICE_CLASS (ibus_config_service_parent_class)-> + service_set_property (service, + connection, + sender, + object_path, + interface_name, + property_name, + value, + error); } static gboolean ibus_config_service_set_value (IBusConfigService *config, const gchar *section, const gchar *name, - const GValue *value, - IBusError **error) + GVariant *value, + GError **error) { if (error) { - *error = ibus_error_new_from_printf (DBUS_ERROR_FAILED, - "Can not set value [%s, %s]", - section, name); + gchar *str = g_variant_print (value, TRUE); + *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Cannot set value %s::%s to %s", section, name, str); + g_free (str); } return FALSE; } -static gboolean +static GVariant * ibus_config_service_get_value (IBusConfigService *config, const gchar *section, const gchar *name, - GValue *value, - IBusError **error) + GError **error) { if (error) { - *error = ibus_error_new_from_printf (DBUS_ERROR_FAILED, - "Can not get value [%s, %s]", - section, name); + *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Cannot get value %s::%s", section, name); } - return FALSE; + return NULL; +} + +static GVariant * +ibus_config_service_get_values (IBusConfigService *config, + const gchar *section, + GError **error) +{ + if (error) { + *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Cannot get values %s", section); + } + return NULL; } static gboolean -ibus_config_service_unset (IBusConfigService *config, - const gchar *section, - const gchar *name, - IBusError **error) +ibus_config_service_unset_value (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error) { if (error) { - *error = ibus_error_new_from_printf (DBUS_ERROR_FAILED, - "Can not unset [%s, %s]", - section, name); + *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Cannot unset value %s::%s", section, name); } return FALSE; } +IBusConfigService * +ibus_config_service_new (GDBusConnection *connection) +{ + g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL); + + GObject *object = g_object_new (IBUS_TYPE_CONFIG_SERVICE, + "object-path", IBUS_PATH_CONFIG, + "connection", connection, + NULL); + return IBUS_CONFIG_SERVICE (object); +} + void ibus_config_service_value_changed (IBusConfigService *config, const gchar *section, const gchar *name, - const GValue *value) + GVariant *value) { - g_assert (IBUS_IS_CONFIG_SERVICE (config)); - g_assert (section); - g_assert (name); - g_assert (G_IS_VALUE (value)); + g_return_if_fail (IBUS_IS_CONFIG_SERVICE (config)); + g_return_if_fail (section != NULL); + g_return_if_fail (name != NULL); + g_return_if_fail (value != NULL); - ibus_service_send_signal ((IBusService *) config, + ibus_service_emit_signal ((IBusService *) config, + NULL, IBUS_INTERFACE_CONFIG, "ValueChanged", - G_TYPE_STRING, §ion, - G_TYPE_STRING, &name, - G_TYPE_VALUE, value, - G_TYPE_INVALID); + g_variant_new ("(ssv)", section, name, value), + NULL); } diff --git a/src/ibusconfigservice.h b/src/ibusconfigservice.h index cc446ecfa..23dcfc6d9 100644 --- a/src/ibusconfigservice.h +++ b/src/ibusconfigservice.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusconfigservice * @short_description: Configuration service back-end. @@ -128,7 +134,6 @@ #ifndef __IBUS_CONFIG_SERVICE_H_ #define __IBUS_CONFIG_SERVICE_H_ -#include "ibuserror.h" #include "ibusservice.h" /* @@ -160,51 +165,67 @@ typedef struct _IBusConfigServiceClass IBusConfigServiceClass; * An opaque data type representing a configure service. */ struct _IBusConfigService { + /*< private >*/ IBusService parent; + /* IBusConfigServicePriv *priv */ + /* instance members */ }; struct _IBusConfigServiceClass { + /*< private >*/ IBusServiceClass parent; + /*< public >*/ /* class members */ - gboolean (* set_value) (IBusConfigService *config, - const gchar *section, - const gchar *name, - const GValue *value, - IBusError **error); - gboolean (* get_value) (IBusConfigService *config, - const gchar *section, - const gchar *name, - GValue *value, - IBusError **error); - gboolean (* unset) (IBusConfigService *config, - const gchar *section, - const gchar *name, - IBusError **error); + gboolean (* set_value) (IBusConfigService *config, + const gchar *section, + const gchar *name, + GVariant *value, + GError **error); + /** + * get_value: + * @config: An IBusConfig. + * @section: section name + * @name: value name + * + * @returns: (transfer full): The value in config associated with section and name. + * + */ + GVariant * (* get_value) (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error); + gboolean (* unset_value) (IBusConfigService *config, + const gchar *section, + const gchar *name, + GError **error); + GVariant * (* get_values) (IBusConfigService *config, + const gchar *section, + GError **error); /*< private >*/ /* padding */ - gpointer pdummy[13]; + gpointer pdummy[12]; }; GType ibus_config_service_get_type (void); /** * ibus_config_service_new: - * @connection: An IBusConnection. + * @connection: An GDBusConnection. * @returns: A newly allocated IBusConfigServices. * - * New an IBusConfigService from an IBusConnection. + * New an IBusConfigService from an GDBusConnection. */ -IBusConfigService *ibus_config_service_new (IBusConnection *connection); +IBusConfigService *ibus_config_service_new (GDBusConnection *connection); /** * ibus_config_service_value_changed: * @config: An IBusConfigService. * @section: Section name of the configuration option. * @name: Name of the configure option. - * @value: GValue that holds the value. + * @value: GVariant that holds the value. * * Change a value of a configuration option * by sending a "ValueChanged" message to IBus service. @@ -213,7 +234,7 @@ void ibus_config_service_value_changed (IBusConfigService *config, const gchar *section, const gchar *name, - const GValue *value); + GVariant *value); G_END_DECLS #endif diff --git a/src/ibusconnection.c b/src/ibusconnection.c deleted file mode 100644 index 94a25ea46..000000000 --- a/src/ibusconnection.c +++ /dev/null @@ -1,838 +0,0 @@ -/* vim:set et sts=4: */ -/* ibus - The Input Bus - * Copyright (C) 2008-2010 Peng Huang - * Copyright (C) 2008-2010 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#include -#include -#include "ibusmainloop.h" -#include "ibusmessage.h" -#include "ibusconnection.h" -#include "ibusinternal.h" - -#define IBUS_CONNECTION_GET_PRIVATE(o) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_CONNECTION, IBusConnectionPrivate)) - -enum { - AUTHENTICATE_UNIX_USER, - IBUS_SIGNAL, - IBUS_MESSAGE, - IBUS_MESSAGE_SENT, - DISCONNECTED, - LAST_SIGNAL, -}; - - -/* IBusConnectionPriv */ -struct _IBusConnectionPrivate { - DBusConnection *connection; - gboolean shared; -}; -typedef struct _IBusConnectionPrivate IBusConnectionPrivate; - -static guint connection_signals[LAST_SIGNAL] = { 0 }; - -/* functions prototype */ -static void ibus_connection_destroy (IBusConnection *connection); - -static gboolean ibus_connection_authenticate_unix_user - (IBusConnection *connection, - gulong uid); -static gboolean ibus_connection_ibus_message(IBusConnection *connection, - IBusMessage *message); -static gboolean ibus_connection_ibus_signal (IBusConnection *connection, - IBusMessage *message); -static void ibus_connection_disconnected(IBusConnection *connection); -static DBusHandlerResult - _connection_handle_message_cb(DBusConnection *dbus_connection, - IBusMessage *message, - IBusConnection *connection); - -static GHashTable *_connections = NULL; - -G_DEFINE_TYPE (IBusConnection, ibus_connection, IBUS_TYPE_OBJECT) - -IBusConnection * -ibus_connection_new (void) -{ - GObject *object; - object = g_object_new (IBUS_TYPE_CONNECTION, NULL); - return IBUS_CONNECTION (object); -} - -static void -ibus_connection_class_init (IBusConnectionClass *klass) -{ - IBusObjectClass *object_class = IBUS_OBJECT_CLASS (klass); - - g_type_class_add_private (klass, sizeof (IBusConnectionPrivate)); - - object_class->destroy = (IBusObjectDestroyFunc) ibus_connection_destroy; - - klass->authenticate_unix_user = ibus_connection_authenticate_unix_user; - klass->ibus_message = ibus_connection_ibus_message; - klass->ibus_signal = ibus_connection_ibus_signal; - klass->disconnected = ibus_connection_disconnected; - - /* install signals */ - /** - * IBusConnection::authenticate-unix-user: - * @ibusconnection: The object which received the signal. - * @uid: unix user id. - * - * Emitted when sending an ibus-message. - * Implement the member function ibus_message() in extended class to receive this signal. - * - * Argument @user_data is ignored in this function. - * - * Returns: TRUE if succeed; FALSE otherwise. - */ - connection_signals[AUTHENTICATE_UNIX_USER] = - g_signal_new (I_("authenticate-unix-user"), - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (IBusConnectionClass, authenticate_unix_user), - NULL, NULL, - ibus_marshal_BOOLEAN__ULONG, - G_TYPE_BOOLEAN, 1, - G_TYPE_ULONG); - - /** - * IBusConnection::ibus-message: - * @ibusconnection: The object which received the signal. - * @message: An IBusMessage. - * - * Emitted when sending an ibus-message. - * Implement the member function ibus_message() in extended class to receive this signal. - * - * Argument @user_data is ignored in this function. - * - * Returns: TRUE if succeed; FALSE otherwise. - */ - connection_signals[IBUS_MESSAGE] = - g_signal_new (I_("ibus-message"), - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (IBusConnectionClass, ibus_message), - NULL, NULL, - ibus_marshal_BOOLEAN__POINTER, - G_TYPE_BOOLEAN, 1, - G_TYPE_POINTER); - - /** - * IBusConnection::ibus-signal: - * @ibusconnection: The object which received the signal. - * @message: An IBusMessage that contain the signal. - * - * Emitted when sending an ibus-signal. - * Implement the member function ibus_signal() function in extended class to receive this signal. - * - * Argument @user_data is ignored in this function. - * - * Returns: TRUE if succeed; FALSE otherwise. - */ - connection_signals[IBUS_SIGNAL] = - g_signal_new (I_("ibus-signal"), - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (IBusConnectionClass, ibus_signal), - NULL, NULL, - ibus_marshal_BOOL__POINTER, - G_TYPE_BOOLEAN, 1, - G_TYPE_POINTER); - - /** - * IBusConnection::ibus-message-sent: - * @ibusconnection: The object which received the signal. - * @message: An IBusMessage that contain the signal. - * - * Emitted when an ibus-message is sent. - * Implement the member function ibus_message_sent() function in extended class to receive this signal. - * - * Argument @user_data is ignored in this function. - */ - connection_signals[IBUS_MESSAGE_SENT] = - g_signal_new (I_("ibus-message-sent"), - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (IBusConnectionClass, ibus_message_sent), - NULL, NULL, - ibus_marshal_VOID__POINTER, - G_TYPE_NONE, 1, - G_TYPE_POINTER); - - /** - * IBusConnection::disconnected: - * @ibusconnection: The object which received the signal. - * - * Emitted when an ibus-message is disconnected. - * Implement the member function disconnected() function in extended class to receive this signal. - * - * Argument @user_data is ignored in this function. - * - */ - connection_signals[DISCONNECTED] = - g_signal_new (I_("disconnected"), - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (IBusConnectionClass, disconnected), - NULL, NULL, - ibus_marshal_VOID__VOID, - G_TYPE_NONE, 0); - -} - -static void -ibus_connection_init (IBusConnection *connection) -{ - IBusConnectionPrivate *priv; - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - priv->connection = NULL; - priv->shared = FALSE; -} - -static void -ibus_connection_destroy (IBusConnection *connection) -{ - IBusConnectionPrivate *priv; - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - if (priv->connection) { - dbus_connection_remove_filter (priv->connection, - (DBusHandleMessageFunction) _connection_handle_message_cb, - connection); - } - - do { - if (!priv->shared && priv->connection) { - dbus_connection_close (priv->connection); - dbus_connection_unref (priv->connection); - priv->connection = NULL; - break; - } - - if (priv->shared && priv->connection) { - g_warn_if_fail (_connections != NULL); - if (_connections != NULL) { - g_hash_table_remove (_connections, priv->connection); - } - dbus_connection_unref (priv->connection); - priv->connection = NULL; - break; - } - } while (0); - - IBUS_OBJECT_CLASS (ibus_connection_parent_class)->destroy (IBUS_OBJECT (connection)); -} - -static gboolean -ibus_connection_authenticate_unix_user (IBusConnection *connection, - gulong uid) -{ - return FALSE; -} - -static gboolean -ibus_connection_ibus_message (IBusConnection *connection, - IBusMessage *message) -{ - gboolean retval = FALSE; - - if (ibus_message_get_type (message) == DBUS_MESSAGE_TYPE_SIGNAL) - g_signal_emit (connection, connection_signals[IBUS_SIGNAL], 0, message, &retval); - - return retval; -} - -static gboolean -ibus_connection_ibus_signal (IBusConnection *connection, IBusMessage *message) -{ - IBusConnectionPrivate *priv; - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - if (ibus_message_is_signal (message, DBUS_INTERFACE_LOCAL, "Disconnected")) { - g_signal_emit (connection, connection_signals[DISCONNECTED], 0); - return FALSE; - } - return FALSE; -} - -static void -ibus_connection_disconnected (IBusConnection *connection) -{ - ibus_object_destroy (IBUS_OBJECT (connection)); -} - -static dbus_bool_t -_connection_allow_unix_user_cb (DBusConnection *dbus_connection, - gulong uid, - IBusConnection *connection) -{ - gboolean retval = FALSE; - - g_signal_emit (connection, connection_signals[AUTHENTICATE_UNIX_USER], 0, uid, &retval); - - if (retval) - return TRUE; - - return FALSE; -} - -static DBusHandlerResult -_connection_handle_message_cb (DBusConnection *dbus_connection, - IBusMessage *message, - IBusConnection *connection) -{ - gboolean retval = FALSE; - - g_signal_emit (connection, connection_signals[IBUS_MESSAGE], 0, message, &retval); - - if (retval) - return DBUS_HANDLER_RESULT_HANDLED; - - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - -static gint -_get_slot () -{ - static gint slot = -1; - if (slot == -1) { - dbus_connection_allocate_data_slot (&slot); - } - return slot; -} - -void -ibus_connection_set_connection (IBusConnection *connection, DBusConnection *dbus_connection, gboolean shared) -{ - gboolean result; - IBusConnectionPrivate *priv; - - g_assert (IBUS_IS_CONNECTION (connection)); - g_assert (dbus_connection != NULL); - g_assert (dbus_connection_get_is_connected (dbus_connection)); - - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - g_assert (priv->connection == NULL); - - priv->connection = dbus_connection_ref (dbus_connection); - priv->shared = shared; - - dbus_connection_set_data (priv->connection, _get_slot(), connection, NULL); - - dbus_connection_set_unix_user_function (priv->connection, - (DBusAllowUnixUserFunction) _connection_allow_unix_user_cb, - connection, NULL); - - result = dbus_connection_add_filter (priv->connection, - (DBusHandleMessageFunction) _connection_handle_message_cb, - connection, NULL); - - ibus_dbus_connection_setup (priv->connection); - g_warn_if_fail (result); -} - -static void -_connection_destroy_cb (IBusConnection *connection, - gpointer user_data) -{ - g_hash_table_remove (_connections, user_data); - g_object_unref (connection); -} - -IBusConnection * -ibus_connection_open (const gchar *address) -{ - g_assert (address != NULL); - - DBusError error; - DBusConnection *dbus_connection; - IBusConnection *connection; - - if (_connections == NULL) { - _connections = g_hash_table_new (g_direct_hash, g_direct_equal); - } - - - dbus_error_init (&error); - dbus_connection = dbus_connection_open (address, &error); - if (dbus_connection == NULL) { - g_warning ("Connect to %s failed: %s.", address, error.message); - dbus_error_free (&error); - return NULL; - } - - connection = g_hash_table_lookup (_connections, dbus_connection); - - if (connection == NULL) { - connection = ibus_connection_new (); - g_object_ref_sink (connection); - - ibus_connection_set_connection (connection, dbus_connection, TRUE); - g_hash_table_insert (_connections, dbus_connection, connection); - g_signal_connect (connection, "destroy", G_CALLBACK (_connection_destroy_cb), dbus_connection); - } - - dbus_connection_unref (dbus_connection); - g_object_ref_sink (connection); - return connection; -} - -IBusConnection * -ibus_connection_open_private (const gchar *address) -{ - g_assert (address != NULL); - - DBusError error; - DBusConnection *dbus_connection; - IBusConnection *connection; - - dbus_error_init (&error); - dbus_connection = dbus_connection_open_private (address, &error); - if (dbus_connection == NULL) { - g_warning ("Connect to %s failed. %s.", address, error.message); - dbus_error_free (&error); - return NULL; - } - - connection = ibus_connection_new (); - ibus_connection_set_connection (connection, dbus_connection, FALSE); - - return connection; -} - -void ibus_connection_close (IBusConnection *connection) -{ - g_assert (IBUS_IS_CONNECTION (connection)); - - IBusConnectionPrivate *priv; - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - dbus_connection_close (priv->connection); -} - -gboolean -ibus_connection_is_connected (IBusConnection *connection) -{ - IBusConnectionPrivate *priv; - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - if (priv->connection == NULL) { - return FALSE; - } - return dbus_connection_get_is_connected (priv->connection); -} - -gboolean -ibus_connection_is_authenticated (IBusConnection *connection) -{ - IBusConnectionPrivate *priv; - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - if (priv->connection == NULL) { - return FALSE; - } - return dbus_connection_get_is_authenticated (priv->connection); -} - -DBusConnection * -ibus_connection_get_connection (IBusConnection *connection) -{ - IBusConnectionPrivate *priv; - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - return priv->connection; -} - -glong -ibus_connection_get_unix_user (IBusConnection *connection) -{ - IBusConnectionPrivate *priv; - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - gulong uid; - - if (priv->connection && dbus_connection_get_unix_user (priv->connection, &uid)) - return uid; - return -1; -} - -gboolean -ibus_connection_read_write_dispatch (IBusConnection *connection, - gint timeout) -{ - IBusConnectionPrivate *priv; - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - return dbus_connection_read_write_dispatch (priv->connection, timeout); -} - -typedef struct _VTableCallData { - IBusMessageFunc message_func; - gpointer user_data; -}VTableCallData; - -void -_unregister_function (DBusConnection *dbus_connection, VTableCallData *data) -{ - g_slice_free (VTableCallData, data); -} - -DBusHandlerResult -_message_function (DBusConnection *dbus_connection, - DBusMessage *message, - VTableCallData *data) -{ - gboolean retval; - IBusConnection *connection; - - connection = IBUS_CONNECTION (dbus_connection_get_data (dbus_connection, _get_slot())); - retval = data->message_func (connection, message, data->user_data); - - return retval ? DBUS_HANDLER_RESULT_HANDLED : DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - -gboolean -ibus_connection_register_object_path (IBusConnection *connection, - const gchar *path, IBusMessageFunc message_func, gpointer user_data) -{ - g_assert (IBUS_IS_CONNECTION (connection)); - g_assert (path != NULL); - g_assert (message_func != NULL); - - IBusConnectionPrivate *priv; - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - gboolean retval; - DBusObjectPathVTable vtable = {0}; - VTableCallData *data; - - vtable.unregister_function = (DBusObjectPathUnregisterFunction) _unregister_function; - vtable.message_function = (DBusObjectPathMessageFunction) _message_function; - - data = g_slice_new (VTableCallData); - data->message_func = message_func; - data->user_data = user_data; - - retval = dbus_connection_register_object_path (priv->connection, path, &vtable, data); - if (!retval) { - g_warning ("Out of memory!"); - return FALSE; - } - return TRUE; -} - -gboolean -ibus_connection_unregister_object_path (IBusConnection *connection, const gchar *path) -{ - g_assert (IBUS_IS_CONNECTION (connection)); - g_assert (path != NULL); - - IBusConnectionPrivate *priv; - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - gboolean retval; - - retval = dbus_connection_unregister_object_path (priv->connection, path); - if (!retval) { - g_warning ("Out of memory!"); - return FALSE; - } - - return TRUE; -} - - -gboolean -ibus_connection_send (IBusConnection *connection, - IBusMessage *message) -{ - g_assert (IBUS_IS_CONNECTION (connection)); - g_assert (message != NULL); - - gboolean retval; - IBusConnectionPrivate *priv; - - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - retval = dbus_connection_send (priv->connection, message, NULL); - - if (retval) { - g_signal_emit (connection, - connection_signals[IBUS_MESSAGE_SENT], - 0, - message); - } - - return retval; -} - - -gboolean -ibus_connection_send_signal (IBusConnection *connection, - const gchar *path, - const gchar *interface, - const gchar *name, - GType first_arg_type, - ...) -{ - va_list args; - gboolean retval; - - va_start (args, first_arg_type); - retval = ibus_connection_send_signal_valist (connection, - path, - interface, - name, - first_arg_type, - args); - va_end (args); - return retval; -} - -gboolean -ibus_connection_send_signal_valist (IBusConnection *connection, - const gchar *path, - const gchar *interface, - const gchar *name, - GType first_arg_type, - va_list args) -{ - g_assert (IBUS_IS_CONNECTION (connection)); - g_assert (interface != NULL); - g_assert (name != NULL); - - gboolean retval; - IBusMessage *message; - - message = ibus_message_new_signal (path, interface, name); - - ibus_message_append_args_valist (message, first_arg_type, args); - retval = ibus_connection_send (connection, message); - ibus_message_unref (message); - - return retval; -} - -gboolean -ibus_connection_send_valist (IBusConnection *connection, - gint message_type, - const gchar *path, - const gchar *interface, - const gchar *name, - GType first_arg_type, - va_list args) -{ - g_assert (IBUS_IS_CONNECTION (connection)); - g_assert (interface != NULL); - g_assert (name != NULL); - - gboolean retval; - IBusMessage *message; - - message = ibus_message_new (message_type); - ibus_message_set_path (message, path); - ibus_message_set_interface (message, interface); - ibus_message_set_member (message, name); - - ibus_message_append_args_valist (message, first_arg_type, args); - retval = ibus_connection_send (connection, message); - ibus_message_unref (message); - - return retval; -} - -gboolean -ibus_connection_send_with_reply (IBusConnection *connection, - IBusMessage *message, - IBusPendingCall **pending_return, - gint timeout_milliseconds) -{ - g_assert (IBUS_IS_CONNECTION (connection)); - g_assert (message != NULL); - g_assert (pending_return != NULL); - g_assert (timeout_milliseconds > 0 || timeout_milliseconds == -1); - - IBusConnectionPrivate *priv; - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - gboolean retval; - - retval = dbus_connection_send_with_reply (priv->connection, - message, - pending_return, - timeout_milliseconds); - - return retval; -} - -IBusMessage * -ibus_connection_send_with_reply_and_block (IBusConnection *connection, - IBusMessage *message, - gint timeout_milliseconds, - IBusError **error) -{ - g_assert (IBUS_IS_CONNECTION (connection)); - g_assert (message != NULL); - g_assert (timeout_milliseconds > 0 || timeout_milliseconds == -1); - - IBusError *_error; - IBusMessage *reply; - IBusConnectionPrivate *priv; - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - _error = ibus_error_new (); - - reply = dbus_connection_send_with_reply_and_block (priv->connection, - message, - timeout_milliseconds, - _error); - - if (reply != NULL) { - g_signal_emit (connection, - connection_signals[IBUS_MESSAGE_SENT], - 0, - message); - ibus_error_free (_error); - } - else { - if (error != NULL) { - *error = _error; - } - else { - ibus_error_free (_error); - } - } - - return reply; -} - -static IBusMessage * -ibus_connection_call_with_reply_valist (IBusConnection *connection, - const gchar *name, - const gchar *path, - const gchar *interface, - const gchar *member, - IBusError **error, - GType first_arg_type, - va_list va_args) -{ - g_assert (IBUS_IS_CONNECTION (connection)); - g_assert (name != NULL); - g_assert (path != NULL); - g_assert (interface != NULL); - g_assert (member != NULL); - g_assert (ibus_connection_is_connected (connection)); - - IBusConnectionPrivate *priv; - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - IBusMessage *message, *reply; - IBusError *tmp_error; - - message = ibus_message_new_method_call (name, path, interface, member); - - ibus_message_append_args_valist (message, first_arg_type, va_args); - - reply = ibus_connection_send_with_reply_and_block ( - connection, - message, - -1, - error); - ibus_message_unref (message); - - if (reply == NULL) { - return NULL; - } - - if ((tmp_error = ibus_error_new_from_message (reply)) != NULL) { - if (error) { - *error = tmp_error; - } - else { - ibus_error_free (tmp_error); - } - ibus_message_unref (reply); - return NULL; - } - - return reply; -} - -IBusMessage * -ibus_connection_call_with_reply (IBusConnection *connection, - const gchar *name, - const gchar *path, - const gchar *interface, - const gchar *member, - IBusError **error, - GType first_arg_type, - ...) -{ - IBusMessage *reply; - va_list va_args; - - va_start (va_args, first_arg_type); - reply = ibus_connection_call_with_reply_valist ( - connection, name, path, interface, member, error, - first_arg_type, va_args); - va_end (va_args); - - return reply; -} - -gboolean -ibus_connection_call (IBusConnection *connection, - const gchar *name, - const gchar *path, - const gchar *interface, - const gchar *member, - IBusError **error, - GType first_arg_type, - ...) -{ - IBusMessage *reply; - va_list va_args; - - va_start (va_args, first_arg_type); - reply = ibus_connection_call_with_reply_valist ( - connection, name, path, interface, member, error, - first_arg_type, va_args); - va_end (va_args); - - if (reply) { - ibus_message_unref (reply); - return TRUE; - } - - return FALSE; -} - -void -ibus_connection_flush (IBusConnection *connection) -{ - g_assert (IBUS_IS_CONNECTION (connection)); - g_return_if_fail (ibus_connection_is_connected (connection)); - - IBusConnectionPrivate *priv; - - priv = IBUS_CONNECTION_GET_PRIVATE (connection); - - dbus_connection_flush (priv->connection); -} diff --git a/src/ibusconnection.h b/src/ibusconnection.h deleted file mode 100644 index eb1d5aede..000000000 --- a/src/ibusconnection.h +++ /dev/null @@ -1,519 +0,0 @@ -/* vim:set et sts=4: */ -/* ibus - The Input Bus - * Copyright (C) 2008-2010 Peng Huang - * Copyright (C) 2008-2010 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -/** - * SECTION: ibusconnection - * @short_description: DBusConnection wrapper. - * @title: IBusConnection - * @stability: Stable - * DBusConnection - * - * An IBusConnection provides #DBusConnection wrapper, and is used to connect to either D-Bus or IBus daemon. - * Usually, IBusConnection is set to a #DBusConnection and emitting ibus-message when - * receiving incoming messages from the #DBusConnection. - * - * @see_also: #IBusMessage - * - */ - -#ifndef __IBUS_CONNECTION_H_ -#define __IBUS_CONNECTION_H_ - -#include "ibusdbus.h" -#include "ibusmessage.h" -#include "ibuspendingcall.h" -#include "ibusobject.h" -#include "ibuserror.h" - -/* - * Type macros. - */ - -/* define GOBJECT macros */ -#define IBUS_TYPE_CONNECTION \ - (ibus_connection_get_type ()) -#define IBUS_CONNECTION(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_CONNECTION, IBusConnection)) -#define IBUS_CONNECTION_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_CONNECTION, IBusConnectionClass)) -#define IBUS_IS_CONNECTION(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_CONNECTION)) -#define IBUS_IS_CONNECTION_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_CONNECTION)) -#define IBUS_CONNECTION_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_CONNECTION, IBusConnectionClass)) - -G_BEGIN_DECLS - -typedef struct _IBusConnection IBusConnection; -typedef struct _IBusConnectionClass IBusConnectionClass; - -/** - * IBusIBusMessageFunc: - * @connection: An IBusConnection. - * @message: An IBusMessage. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Prototype of an IBusIBusMessage callback function. - */ -typedef gboolean (* IBusIBusMessageFunc)(IBusConnection *connection, - IBusMessage *message); - -/** - * IBusIBusSignalFunc: - * @connection: An IBusConnection. - * @message: An IBusMessage. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Prototype of an IBusIBusSignal callback function. - */ -typedef gboolean (* IBusIBusSignalFunc) (IBusConnection *connection, - IBusMessage *message); - -/** - * IBusMessageFunc: - * @connection: An IBusConnection. - * @message: An IBusMessage. - * @user_data: User data for the callback function. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Prototype of an IBusMessage callback function. - */ -typedef gboolean (* IBusMessageFunc) (IBusConnection *connection, - IBusMessage *message, - gpointer user_data); - -/** - * IBusConnectionReplyFunc: - * @connection: An IBusConnection. - * @reply: An IBusMessage. - * @user_data: User data for the callback function. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Prototype of an IBusConnectionReplyFunc callback function. - */ -typedef void (* IBusConnectionReplyFunc) - (IBusConnection *connection, - IBusMessage *reply, - gpointer user_data); - -/** - * IBusConnection: - * - * An opaque data type representing an IBusConnection. - */ -struct _IBusConnection { - IBusObject parent; - /* instance members */ -}; - -struct _IBusConnectionClass { - IBusObjectClass parent; - - /* signals */ - gboolean (* authenticate_unix_user) - (IBusConnection *connection, - gulong uid); - gboolean (* ibus_message) (IBusConnection *connection, - IBusMessage *message); - gboolean (* ibus_signal) (IBusConnection *connection, - IBusMessage *message); - void (* ibus_message_sent) - (IBusConnection *connection, - IBusMessage *message); - void (* disconnected) (IBusConnection *connection); - - /*< private >*/ - /* padding */ - gpointer pdummy[4]; -}; - -GType ibus_connection_get_type (void); - -/** - * ibus_connection_new: - * @returns: An newly allocated IBusConnection. - * - * New an IBusConnection. - */ -IBusConnection *ibus_connection_new (void); - -/** - * ibus_connection_set_connection: - * @connection: An IBusConnection. - * @dbus_connection: A D-Bus connection. - * @shared: Whether the @dbus_connection is shared. - * - * Set an IBusConnection as data of a D-Bus connection. - * Emit signal ibus-message when receiving incoming message from @dbus_connection. - */ -void ibus_connection_set_connection (IBusConnection *connection, - DBusConnection *dbus_connection, - gboolean shared); - -/** - * ibus_connection_open: - * @address: A remote address. - * @returns: A newly allocated IBusConnection which is set to a D-Bus connection corresponding to @address. - * - * Open an IBusConnection that is set to a D-Bus connection to the specified address. - * Use ibus_connection_open_private() to get a dedicated connection not shared with other callers of - * ibus_connection_open(). - * - * @see_also: ibus_connection_open_private(). - */ -IBusConnection *ibus_connection_open (const gchar *address); - -/** - * ibus_connection_open_private: - * @address: A remote address. - * @returns: A newly allocated IBusConnection which is set to a D-Bus connection corresponding to @address. - * - * Open an IBusConnection that is set to a D-Bus connection to the specified address. - * Unlike ibus_connection_open(), this function always creates a new D-Bus connection. - * The D-Bus connection will not be saved or recycled by libdbus. - * - * In D-Bus documentation, dbus_connection_open() is preferred over dbus_connection_open_private(), - * so should ibus_connection_open() be preferred over ibus_connection_open_private(). - * - * @see_also: ibus_connection_open(). - */ -IBusConnection *ibus_connection_open_private (const gchar *address); - -/** - * ibus_connection_close: - * @connection: An IBusConnection. - * - * Close an IBusCOnnection and corresponding D-Bus connection. - */ -void ibus_connection_close (IBusConnection *connection); - -/** - * ibus_connection_is_connected: - * @connection: An IBusConnection. - * @returns: TRUE for connected; FALSE otherwise. - * - * Whether an IBusConnection is connected. - */ -gboolean ibus_connection_is_connected (IBusConnection *connection); - -/** - * ibus_connection_is_authenticated: - * @connection: An IBusConnection. - * @returns: TRUE for authenticated; FALSE otherwise. - * - * Whether an IBusConnection is authenticated. - */ -gboolean ibus_connection_is_authenticated (IBusConnection *connection); - -/** - * ibus_connection_get_connection: - * @connection: An IBusConnection. - * @returns: The corresponding DBusConnection. - * - * Return corresponding DBusConnection. - */ -DBusConnection *ibus_connection_get_connection (IBusConnection *connection); - -/** - * ibus_connection_get_unix_user: - * @connection: An IBusConnection. - * @returns: The UNIX UID of peer user. - * - * Return The UNIX UID of peer user. - */ -glong ibus_connection_get_unix_user (IBusConnection *connection); - -/** - * ibus_connection_read_write_dispatch: - * @connection: An IBusConnection. - * @timeout: Maximum time to block or -1 for infinite. - * @returns: TRUE if the disconnect message has not been processed; FALSE otherwise. - * - * Return TRUE if the disconnect message has not been processed. - * This function is a wrapper of dbus_connection_read_write_dispatch(), - * which is also intended for use with applications that don't want to - * write a main loop and deal with DBusWatch and DBusTimeout. - * Following text is - * from the documentation of dbus_connection_read_write_dispatch(): - * An example usage would be: - * - * - * while (dbus_connection_read_write_dispatch (connection, -1)) - * ; // empty loop body - * - * - * In this usage you would normally have set up a filter function to look at each message as it is dispatched. - * The loop terminates when the last message from the connection (the disconnected signal) is processed. - * - * If there are messages to dispatch, this function will dbus_connection_dispatch() once, and return. - * If there are no messages to dispatch, this function will block until it can read or write, - * then read or write, then return. - * - * The way to think of this function is that it either makes some sort of progress, - * or it blocks. Note that, while it is blocked on I/O, it cannot be interrupted (even by other threads), - * which makes this function unsuitable for applications that do more than just react to received messages. - * - * @see_also: dbus_connection_read_write_dispatch(). - */ -gboolean ibus_connection_read_write_dispatch(IBusConnection *connection, - gint timeout); - -/** - * ibus_connection_send: - * @connection: An IBusConnection. - * @message: IBusMessage to be sent. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Send an IBusMessage to an IBusConnection. - * If succeed, signal ibus-message-sent is emitted. - * - * @see_also: ibus_connection_send_with_reply(), ibus_connection_send_with_reply_and_block(), - * ibus_connection_send_signal(), ibus_connection_send_signal_valist(), ibus_connection_send_valist(), - * dbus_connection_send(). - */ -gboolean ibus_connection_send (IBusConnection *connection, - IBusMessage *message); - -/** - * ibus_connection_send_signal: - * @connection: An IBusConnection. - * @path: The path to the object emitting the signal. - * @interface: The interface the signal is emitted from. - * @name: Name of the signal. - * @first_arg_type: Type of first argument. - * @...: Rest of arguments, NULL to mark the end. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Send a wrapped D-Bus signal to an IBusConnection. - * This function wraps a signal as an IBusMessage, then sent the IBusMessage - * via ibus_connection_send(). - * - * @see_also: ibus_connection_send(), ibus_connection_send_signal_valist(), ibus_message_new_signal(). - */ -gboolean ibus_connection_send_signal (IBusConnection *connection, - const gchar *path, - const gchar *interface, - const gchar *name, - GType first_arg_type, - ...); - -/** - * ibus_connection_send_signal_valist: - * @connection: An IBusConnection. - * @path: The path to the object emitting the signal. - * @interface: The interface the signal is emitted from. - * @name: Name of the signal. - * @first_arg_type: Type of first arg. - * @args: Ret of arguments. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Send a wrapped D-Bus signal to an IBusConnection. - * This function wraps a signal as an IBusMessage, then sent the IBusMessage - * via ibus_connection_send(). - * - * @see_also: ibus_connection_send(), ibus_connection_send_signal(), ibus_connection_send_valist(), - * ibus_message_new_signal(). - */ -gboolean ibus_connection_send_signal_valist (IBusConnection *connection, - const gchar *path, - const gchar *interface, - const gchar *name, - GType first_arg_type, - va_list args); - -/** - * ibus_connection_send_valist: - * @connection: An IBusConnection. - * @message_type: Message type. - * @path: The path to the object emitting the signal. - * @interface: The interface the signal is emitted from. - * @name: Name of the signal. - * @first_arg_type: Type of first arg. - * @args: Ret of arguments. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Send a wrapped D-Bus message to an IBusConnection. - * - * This function wraps a D-Bus message as an IBusMessage, then sent the IBusMessage - * via ibus_connection_send(). - * - * Message type can be specified with @message_type. - * Types include DBUS_MESSAGE_TYPE_METHOD_CALL, - * DBUS_MESSAGE_TYPE_METHOD_RETURN, - * DBUS_MESSAGE_TYPE_ERROR, - * DBUS_MESSAGE_TYPE_SIGNAL, - * but other types are allowed and all code must silently ignore messages of unknown type. - * DBUS_MESSAGE_TYPE_INVALID will never be returned. - * - * @see_also: ibus_connection_send(), ibus_connection_send_singal_valist(), - * ibus_connection_call(), - * ibus_message_new_signal(), - * dbus_message_get_type(). - */ -gboolean ibus_connection_send_valist (IBusConnection *connection, - gint message_type, - const gchar *path, - const gchar *interface, - const gchar *name, - GType first_arg_type, - va_list args); - -/** - * ibus_connection_send_with_reply: - * @connection: An IBusConnection. - * @message: An IBusMessage. - * @pending_return: Return location of a IBusPendingCall object, or NULL if connection is disconnected. - * @timeout_milliseconds: timeout in milliseconds or -1 for default. - * @returns: FALSE if no memory, TRUE otherwise. - * - * Queues an IBusMessage to send, and returns a IBusPendingCall used to receive a reply to the message. - * This function is a wrapper of dbus_connection_send_with_reply(). - * - * @see_also: ibus_connection_send(), ibus_connection_send_with_reply_and_block(), - * ibus_proxy_call_with_reply(), - * #IBusPendingCall, dbus_connection_send_with_reply() - */ -gboolean ibus_connection_send_with_reply (IBusConnection *connection, - IBusMessage *message, - IBusPendingCall **pending_return, - gint timeout_milliseconds); - -/** - * ibus_connection_send_with_reply_and_block: - * @connection: An IBusConnection. - * @message: An IBusMessage. - * @timeout_milliseconds: timeout in milliseconds or -1 for default. - * @error: Returned error is stored here; NULL to ignore error. - * @returns: An IBusMessage that is the reply or NULL with an error code if the function fails. - * - * Sends an IBus message and blocks a certain time period while waiting for - * an IBusMessage as reply. - * If the IBusMessage is not NULL, signal ibus-message-sent is emitted. - * - * @see_also: ibus_connection_send(), ibus_connection_send_with_reply(), - * dbus_connection_send_with_reply_and_block() - */ -IBusMessage *ibus_connection_send_with_reply_and_block - (IBusConnection *connection, - IBusMessage *message, - gint timeout_milliseconds, - IBusError **error); - -/** - * ibus_connection_call: - * @connection: An IBusConnection. - * @name: Name of the signal. - * @path: The path to the object emitting the signal. - * @interface: The interface the signal is emitted from. - * @member: The name of the member function to be called. - * @error: Returned error is stored here; NULL to ignore error. - * @first_arg_type: Type of first argument. - * @...: Rest of arguments, NULL to mark the end. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Invoke a member function by sending an IBusMessage. This method does not - * support reply message, use ibus_connection_call_with_reply instead. - * - * @see_also: ibus_connection_send_valist(). - */ -gboolean ibus_connection_call (IBusConnection *connection, - const gchar *name, - const gchar *path, - const gchar *interface, - const gchar *member, - IBusError **error, - GType first_arg_type, - ...); - -/** - * ibus_connection_call_with_reply: - * @connection: An IBusConnection. - * @name: Name of the signal. - * @path: The path to the object emitting the signal. - * @interface: The interface the signal is emitted from. - * @member: The name of the member function to be called. - * @error: Returned error is stored here; NULL to ignore error. - * @first_arg_type: Type of first argument. - * @...: Rest of arguments, NULL to mark the end. - * @returns: Reply message, or NULL when fail. The returned message must be - * freed with ibus_message_unref(). - * - * Invoke a member function by sending an IBusMessage. - * - * @see_also: ibus_connection_send_valist(). - */ -IBusMessage *ibus_connection_call_with_reply (IBusConnection *connection, - const gchar *name, - const gchar *path, - const gchar *interface, - const gchar *member, - IBusError **error, - GType first_arg_type, - ...); - -/** - * ibus_connection_flush: - * @connection: An IBusConnection. - * - * Blocks until the outgoing message queue is empty. - * This function is a wrapper of dbus_connection_flush(). - * - * @see_also: dbus_connection_flush() - */ -void ibus_connection_flush (IBusConnection *connection); - -/** - * ibus_connection_register_object_path: - * @connection: An IBusConnection. - * @path: Object path to be register. - * @message_func: Callback function for message handling. - * @user_data: User data for @message_func. - * @returns: FALSE if fail because of out of memory; TRUE otherwise. - * - * Registers a handler for a given path in the object hierarchy. - * The given vtable handles messages sent to exactly the given path. - * This function is a wrapper of dbus_connection_register_object_path(). - * - * @see_also: ibus_connection_register_object_path() - */ -gboolean ibus_connection_register_object_path - (IBusConnection *connection, - const gchar *path, - IBusMessageFunc message_func, - gpointer user_data); - -/** - * ibus_connection_unregister_object_path: - * @connection: An IBusConnection. - * @path: Object path to be unregister. - * @returns: FALSE if fail because of out of memory; TRUE otherwise. - * - * Unregisters the handler registered with exactly the given path. - * It's a bug to call this function for a path that isn't registered. - * Can unregister both fallback paths and object paths. - * This function is a wrapper of dbus_connection_unregister_object_path() - */ -gboolean ibus_connection_unregister_object_path - (IBusConnection *connection, - const gchar *path); - -G_END_DECLS -#endif diff --git a/src/ibusdebug.h b/src/ibusdebug.h index 2751e6e8d..294164e95 100644 --- a/src/ibusdebug.h +++ b/src/ibusdebug.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusdebug * @short_description: Debug message output. diff --git a/src/ibusengine.c b/src/ibusengine.c index 899d7c883..1c22d6a5c 100644 --- a/src/ibusengine.c +++ b/src/ibusengine.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,9 +19,10 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include -#include #include "ibusengine.h" +#include +#include +#include "ibusmarshalers.h" #include "ibusinternal.h" #include "ibusshare.h" @@ -44,129 +46,249 @@ enum { PROPERTY_SHOW, PROPERTY_HIDE, CANDIDATE_CLICKED, + SET_SURROUNDING_TEXT, + PROCESS_HAND_WRITING_EVENT, + CANCEL_HAND_WRITING, LAST_SIGNAL, }; enum { PROP_0, - PROP_NAME, - PROP_CONNECTION, + PROP_ENGINE_NAME, }; /* IBusEnginePriv */ struct _IBusEnginePrivate { - gchar *name; - IBusConnection *connection; + gchar *engine_name; + GDBusConnection *connection; + + /* cached surrounding text (see also IBusInputContextPrivate and + BusEngineProxy) */ + IBusText *surrounding_text; + guint surrounding_cursor_pos; + guint selection_anchor_pos; }; -typedef struct _IBusEnginePrivate IBusEnginePrivate; static guint engine_signals[LAST_SIGNAL] = { 0 }; +static IBusText *text_empty = NULL; + /* functions prototype */ -static void ibus_engine_destroy (IBusEngine *engine); -static void ibus_engine_set_property (IBusEngine *engine, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void ibus_engine_get_property (IBusEngine *engine, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static gboolean ibus_engine_ibus_message (IBusEngine *engine, - IBusConnection *connection, - IBusMessage *message); -static gboolean ibus_engine_process_key_event - (IBusEngine *engine, - guint keyval, - guint keycode, - guint state); -static void ibus_engine_focus_in (IBusEngine *engine); -static void ibus_engine_focus_out (IBusEngine *engine); -static void ibus_engine_reset (IBusEngine *engine); -static void ibus_engine_enable (IBusEngine *engine); -static void ibus_engine_disable (IBusEngine *engine); -static void ibus_engine_set_cursor_location - (IBusEngine *engine, - gint x, - gint y, - gint w, - gint h); -static void ibus_engine_set_capabilities - (IBusEngine *engine, - guint caps); -static void ibus_engine_page_up (IBusEngine *engine); -static void ibus_engine_page_down (IBusEngine *engine); -static void ibus_engine_cursor_up (IBusEngine *engine); -static void ibus_engine_cursor_down (IBusEngine *engine); -static void ibus_engine_candidate_clicked - (IBusEngine *engine, - guint index, - guint button, - guint state); -static void ibus_engine_property_activate +static void ibus_engine_destroy (IBusEngine *engine); +static void ibus_engine_set_property (IBusEngine *engine, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void ibus_engine_get_property (IBusEngine *engine, + guint prop_id, + GValue *value, + GParamSpec *pspec); +static void ibus_engine_service_method_call + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation + *invocation); +static GVariant *ibus_engine_service_get_property + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error); +static gboolean ibus_engine_service_set_property + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error); +static gboolean ibus_engine_process_key_event + (IBusEngine *engine, + guint keyval, + guint keycode, + guint state); +static void ibus_engine_focus_in (IBusEngine *engine); +static void ibus_engine_focus_out (IBusEngine *engine); +static void ibus_engine_reset (IBusEngine *engine); +static void ibus_engine_enable (IBusEngine *engine); +static void ibus_engine_disable (IBusEngine *engine); +static void ibus_engine_set_cursor_location + (IBusEngine *engine, + gint x, + gint y, + gint w, + gint h); +static void ibus_engine_set_capabilities + (IBusEngine *engine, + guint caps); +static void ibus_engine_page_up (IBusEngine *engine); +static void ibus_engine_page_down (IBusEngine *engine); +static void ibus_engine_cursor_up (IBusEngine *engine); +static void ibus_engine_cursor_down (IBusEngine *engine); +static void ibus_engine_candidate_clicked + (IBusEngine *engine, + guint index, + guint button, + guint state); +static void ibus_engine_property_activate + (IBusEngine *engine, + const gchar *prop_name, + guint prop_state); +static void ibus_engine_property_show (IBusEngine *engine, + const gchar *prop_name); +static void ibus_engine_property_hide (IBusEngine *engine, + const gchar *prop_name); +static void ibus_engine_set_surrounding_text (IBusEngine *engine, - const gchar *prop_name, - guint prop_state); -static void ibus_engine_property_show (IBusEngine *engine, - const gchar *prop_name); -static void ibus_engine_property_hide (IBusEngine *engine, - const gchar *prop_name); + IBusText *text, + guint cursor_pos, + guint anchor_pos); +static void ibus_engine_process_hand_writing_event + (IBusEngine *engine, + const gdouble *coordinates, + guint coordinates_len); +static void ibus_engine_cancel_hand_writing + (IBusEngine *engine, + guint n_strokes); +static void ibus_engine_emit_signal (IBusEngine *engine, + const gchar *signal_name, + GVariant *parameters); G_DEFINE_TYPE (IBusEngine, ibus_engine, IBUS_TYPE_SERVICE) -IBusEngine * -ibus_engine_new (const gchar *name, - const gchar *path, - IBusConnection *connection) -{ - g_assert (path); - g_assert (IBUS_IS_CONNECTION (connection)); - - IBusEngine *engine; - - engine = (IBusEngine *) g_object_new (IBUS_TYPE_ENGINE, - "name", name, - "path", path, - "connection", connection, - NULL); - - return engine; -} +static const gchar introspection_xml[] = + "" + " " + /* FIXME methods */ + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + /* FIXME signals */ + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; static void -ibus_engine_class_init (IBusEngineClass *klass) +ibus_engine_class_init (IBusEngineClass *class) { - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); - - g_type_class_add_private (klass, sizeof (IBusEnginePrivate)); + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class); gobject_class->set_property = (GObjectSetPropertyFunc) ibus_engine_set_property; gobject_class->get_property = (GObjectGetPropertyFunc) ibus_engine_get_property; ibus_object_class->destroy = (IBusObjectDestroyFunc) ibus_engine_destroy; - IBUS_SERVICE_CLASS (klass)->ibus_message = (ServiceIBusMessageFunc) ibus_engine_ibus_message; - - klass->process_key_event = ibus_engine_process_key_event; - klass->focus_in = ibus_engine_focus_in; - klass->focus_out = ibus_engine_focus_out; - klass->reset = ibus_engine_reset; - klass->enable = ibus_engine_enable; - klass->disable = ibus_engine_disable; - klass->page_up = ibus_engine_page_up; - klass->page_down = ibus_engine_page_down; - klass->cursor_up = ibus_engine_cursor_up; - klass->cursor_down = ibus_engine_cursor_down; - klass->candidate_clicked = ibus_engine_candidate_clicked; - klass->property_activate = ibus_engine_property_activate; - klass->property_show = ibus_engine_property_show; - klass->property_hide = ibus_engine_property_hide; - klass->set_cursor_location = ibus_engine_set_cursor_location; - klass->set_capabilities = ibus_engine_set_capabilities; - + IBUS_SERVICE_CLASS (class)->service_method_call = ibus_engine_service_method_call; + IBUS_SERVICE_CLASS (class)->service_get_property = ibus_engine_service_get_property; + IBUS_SERVICE_CLASS (class)->service_set_property = ibus_engine_service_set_property; + + ibus_service_class_add_interfaces (IBUS_SERVICE_CLASS (class), introspection_xml); + + class->process_key_event = ibus_engine_process_key_event; + class->focus_in = ibus_engine_focus_in; + class->focus_out = ibus_engine_focus_out; + class->reset = ibus_engine_reset; + class->enable = ibus_engine_enable; + class->disable = ibus_engine_disable; + class->page_up = ibus_engine_page_up; + class->page_down = ibus_engine_page_down; + class->cursor_up = ibus_engine_cursor_up; + class->cursor_down = ibus_engine_cursor_down; + class->candidate_clicked = ibus_engine_candidate_clicked; + class->property_activate = ibus_engine_property_activate; + class->property_show = ibus_engine_property_show; + class->property_hide = ibus_engine_property_hide; + class->set_cursor_location = ibus_engine_set_cursor_location; + class->set_capabilities = ibus_engine_set_capabilities; + class->set_surrounding_text = ibus_engine_set_surrounding_text; + class->process_hand_writing_event + = ibus_engine_process_hand_writing_event; + class->cancel_hand_writing = ibus_engine_cancel_hand_writing; /* install properties */ /** @@ -175,25 +297,14 @@ ibus_engine_class_init (IBusEngineClass *klass) * Name of this IBusEngine. */ g_object_class_install_property (gobject_class, - PROP_NAME, - g_param_spec_string ("name", - "name", + PROP_ENGINE_NAME, + g_param_spec_string ("engine-name", + "engine name", "engine name", "noname", - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - - /** - * IBusEngine:connection: - * - * Connection of this IBusEngine. - */ - g_object_class_install_property (gobject_class, - PROP_CONNECTION, - g_param_spec_object ("connection", - "connection", - "The connection of engine object", - IBUS_TYPE_CONNECTION, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); /* install signals */ /** @@ -219,8 +330,8 @@ ibus_engine_class_init (IBusEngineClass *klass) G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, process_key_event), - NULL, NULL, - ibus_marshal_BOOL__UINT_UINT_UINT, + g_signal_accumulator_true_handled, NULL, + _ibus_marshal_BOOL__UINT_UINT_UINT, G_TYPE_BOOLEAN, 3, G_TYPE_UINT, @@ -243,7 +354,7 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, focus_in), NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -263,7 +374,7 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, focus_out), NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -283,7 +394,7 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, reset), NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -303,7 +414,7 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, enable), NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -323,7 +434,7 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, disable), NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -347,7 +458,7 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, set_cursor_location), NULL, NULL, - ibus_marshal_VOID__INT_INT_INT_INT, + _ibus_marshal_VOID__INT_INT_INT_INT, G_TYPE_NONE, 4, G_TYPE_INT, @@ -372,7 +483,7 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, set_capabilities), NULL, NULL, - ibus_marshal_VOID__UINT, + _ibus_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); @@ -392,7 +503,7 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, page_up), NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -411,7 +522,7 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, page_down), NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -430,7 +541,7 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, cursor_up), NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -449,7 +560,7 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, cursor_down), NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -471,7 +582,7 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, candidate_clicked), NULL, NULL, - ibus_marshal_VOID__UINT_UINT_UINT, + _ibus_marshal_VOID__UINT_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, @@ -495,7 +606,7 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, property_activate), NULL, NULL, - ibus_marshal_VOID__STRING_UINT, + _ibus_marshal_VOID__STRING_UINT, G_TYPE_NONE, 2, G_TYPE_STRING, @@ -517,7 +628,7 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, property_show), NULL, NULL, - ibus_marshal_VOID__STRING, + _ibus_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); @@ -538,34 +649,105 @@ ibus_engine_class_init (IBusEngineClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusEngineClass, property_hide), NULL, NULL, - ibus_marshal_VOID__STRING, + _ibus_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); + /** + * IBusEngine::process-hand-writing-event: + * @engine: An IBusEngine. + * @coordinates: An array of double (0.0 to 1.0) which represents a stroke (i.e. [x1, y1, x2, y2, x3, y3, ...]). + * @coordinates_len: The number of elements in the array. + * + * Emitted when a hand writing operation is cancelled. + * Implement the member function cancel_hand_writing() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + engine_signals[PROCESS_HAND_WRITING_EVENT] = + g_signal_new (I_("process-hand-writing-event"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusEngineClass, process_hand_writing_event), + NULL, NULL, + _ibus_marshal_VOID__POINTER_UINT, + G_TYPE_NONE, + 2, + G_TYPE_POINTER, + G_TYPE_UINT); + + /** + * IBusEngine::cancel-hand-writing: + * @engine: An IBusEngine. + * @n_strokes: The number of strokes to be removed. 0 means "remove all". + * + * Emitted when a hand writing operation is cancelled. + * Implement the member function cancel_hand_writing() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + engine_signals[CANCEL_HAND_WRITING] = + g_signal_new (I_("cancel-hand-writing"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusEngineClass, cancel_hand_writing), + NULL, NULL, + _ibus_marshal_VOID__UINT, + G_TYPE_NONE, + 1, + G_TYPE_UINT); + + g_type_class_add_private (class, sizeof (IBusEnginePrivate)); + + /** + * IBusEngine::set-surrounding-text: + * @engine: An IBusEngine. + * @text: The surrounding text. + * @cursor_pos: The cursor position on surrounding text. + * @anchor_pos: The anchor position on selection area. + * + * Emitted when a surrounding text is set. + * Implement the member function set_surrounding_text() in extended class to receive this signal. + * If anchor_pos equals to cursor_pos, it means "there are no selection" or "does not support + * selection retrival". + * + * Argument @user_data is ignored in this function. + */ + engine_signals[SET_SURROUNDING_TEXT] = + g_signal_new (I_("set-surrounding-text"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusEngineClass, set_surrounding_text), + NULL, NULL, + _ibus_marshal_VOID__OBJECT_UINT_UINT, + G_TYPE_NONE, + 3, + G_TYPE_OBJECT, + G_TYPE_UINT, + G_TYPE_UINT); + + text_empty = ibus_text_new_from_static_string (""); + g_object_ref_sink (text_empty); } static void ibus_engine_init (IBusEngine *engine) { - IBusEnginePrivate *priv; - priv = IBUS_ENGINE_GET_PRIVATE (engine); + engine->priv = IBUS_ENGINE_GET_PRIVATE (engine); - priv->name = NULL; - priv->connection = NULL; + engine->priv->surrounding_text = g_object_ref_sink (text_empty); } static void ibus_engine_destroy (IBusEngine *engine) { - IBusEnginePrivate *priv; - priv = IBUS_ENGINE_GET_PRIVATE (engine); - - g_free (priv->name); + g_free (engine->priv->engine_name); + engine->priv->engine_name = NULL; - if (priv->connection) { - g_object_unref (priv->connection); - priv->connection = NULL; + if (engine->priv->surrounding_text) { + g_object_unref (engine->priv->surrounding_text); + engine->priv->surrounding_text = NULL; } IBUS_OBJECT_CLASS(ibus_engine_parent_class)->destroy (IBUS_OBJECT (engine)); @@ -577,21 +759,10 @@ ibus_engine_set_property (IBusEngine *engine, const GValue *value, GParamSpec *pspec) { - IBusEnginePrivate *priv; - priv = IBUS_ENGINE_GET_PRIVATE (engine); - switch (prop_id) { - case PROP_NAME: - priv->name = g_strdup (g_value_dup_string (value)); + case PROP_ENGINE_NAME: + engine->priv->engine_name = g_value_dup_string (value); break; - - case PROP_CONNECTION: - priv->connection = g_value_get_object (value); - g_object_ref_sink (priv->connection); - ibus_service_add_to_connection ((IBusService *) engine, - priv->connection); - break; - default: G_OBJECT_WARN_INVALID_PROPERTY_ID (engine, prop_id, pspec); } @@ -599,18 +770,13 @@ ibus_engine_set_property (IBusEngine *engine, static void ibus_engine_get_property (IBusEngine *engine, - guint prop_id, GValue *value, GParamSpec *pspec) + guint prop_id, + GValue *value, + GParamSpec *pspec) { - IBusEnginePrivate *priv; - priv = IBUS_ENGINE_GET_PRIVATE (engine); - switch (prop_id) { - case PROP_NAME: - g_value_set_string (value, priv->name); - break; - - case PROP_CONNECTION: - g_value_set_object (value, priv->connection); + case PROP_ENGINE_NAME: + g_value_set_string (value, engine->priv->engine_name); break; default: @@ -618,28 +784,45 @@ ibus_engine_get_property (IBusEngine *engine, } } -static gboolean -ibus_engine_ibus_message (IBusEngine *engine, - IBusConnection *connection, - IBusMessage *message) +static void +ibus_engine_service_method_call (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (IBUS_IS_ENGINE (engine)); - g_assert (IBUS_IS_CONNECTION (connection)); - g_assert (message != NULL); - g_assert (ibus_message_get_type (message) == DBUS_MESSAGE_TYPE_METHOD_CALL); - - IBusEnginePrivate *priv; - priv = IBUS_ENGINE_GET_PRIVATE (engine); - - g_assert (priv->connection == connection); - - IBusMessage *reply = NULL; - IBusError *error = NULL; - gboolean retval; + IBusEngine *engine = IBUS_ENGINE (service); + + if (g_strcmp0 (interface_name, IBUS_INTERFACE_ENGINE) != 0) { + IBUS_SERVICE_CLASS (ibus_engine_parent_class)-> + service_method_call (service, + connection, + sender, + object_path, + interface_name, + method_name, + parameters, + invocation); + return; + } - gint i; - const gchar *interface; - const gchar *name; + if (g_strcmp0 (method_name, "ProcessKeyEvent") == 0) { + guint keyval, keycode, state; + gboolean retval = FALSE; + g_variant_get (parameters, "(uuu)", &keyval, &keycode, &state); + g_signal_emit (engine, + engine_signals[PROCESS_KEY_EVENT], + 0, + keyval, + keycode, + state, + &retval); + g_dbus_method_invocation_return_value (invocation, g_variant_new ("(b)", retval)); + return; + } static const struct { gchar *member; @@ -656,240 +839,180 @@ ibus_engine_ibus_message (IBusEngine *engine, { "CursorDown", CURSOR_DOWN }, }; - interface = ibus_message_get_interface (message); - name = ibus_message_get_member (message); - - if (interface != NULL && g_strcmp0 (interface, IBUS_INTERFACE_ENGINE) != 0) - return IBUS_SERVICE_CLASS (ibus_engine_parent_class)->ibus_message ( - (IBusService *) engine, connection, message); - - do { - if (g_strcmp0 (name, "ProcessKeyEvent") == 0) { - guint keyval, keycode, state; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_UINT, &keyval, - G_TYPE_UINT, &keycode, - G_TYPE_UINT, &state, - G_TYPE_INVALID); - - if (!retval) { - reply = ibus_message_new_error_printf (message, - DBUS_ERROR_INVALID_ARGS, - "%s.%s: Can not match signature (uuu) of method", - IBUS_INTERFACE_ENGINE, "ProcessKeyEvent"); - ibus_error_free (error); - } - else { - retval = FALSE; - g_signal_emit (engine, - engine_signals[PROCESS_KEY_EVENT], - 0, - keyval, - keycode, - state, - &retval); - - reply = ibus_message_new_method_return (message); - ibus_message_append_args (reply, - G_TYPE_BOOLEAN, &retval, - G_TYPE_INVALID); - } - break; + gint i; + for (i = 0; i < G_N_ELEMENTS (no_arg_methods); i++) { + if (g_strcmp0 (method_name, no_arg_methods[i].member) == 0) { + g_signal_emit (engine, engine_signals[no_arg_methods[i].signal_id], 0); + g_dbus_method_invocation_return_value (invocation, NULL); + return; } + } - for (i = 0; - i < G_N_ELEMENTS (no_arg_methods) && g_strcmp0 (name, no_arg_methods[i].member) != 0; - i++); - - if (i < G_N_ELEMENTS (no_arg_methods)) { - IBusMessageIter iter; - ibus_message_iter_init (message, &iter); - if (ibus_message_iter_has_next (&iter)) { - reply = ibus_message_new_error_printf (message, - DBUS_ERROR_INVALID_ARGS, - "%s.%s: Method does not have arguments", - IBUS_INTERFACE_ENGINE, no_arg_methods[i].member); - } - else { - g_signal_emit (engine, engine_signals[no_arg_methods[i].signal_id], 0); - reply = ibus_message_new_method_return (message); - } - break; - } + if (g_strcmp0 (method_name, "CandidateClicked") == 0) { + guint index, button, state; + g_variant_get (parameters, "(uuu)", &index, &button, &state); + g_signal_emit (engine, + engine_signals[CANDIDATE_CLICKED], + 0, + index, + button, + state); + g_dbus_method_invocation_return_value (invocation, NULL); + return; + } - if (g_strcmp0 (name, "CandidateClicked") == 0) { - guint index, button, state; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_UINT, &index, - G_TYPE_UINT, &button, - G_TYPE_UINT, &state, - G_TYPE_INVALID); - - if (!retval) { - reply = ibus_message_new_error_printf (message, - DBUS_ERROR_INVALID_ARGS, - "%s.%s: Can not match signature (uuu) of method", - IBUS_INTERFACE_ENGINE, "CandidateClicked"); - ibus_error_free (error); - } - else { - g_signal_emit (engine, - engine_signals[CANDIDATE_CLICKED], - 0, - index, - button, - state); - reply = ibus_message_new_method_return (message); - } - } - else if (g_strcmp0 (name, "PropertyActivate") == 0) { - gchar *name; - guint state; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, &name, - G_TYPE_UINT, &state, - G_TYPE_INVALID); - - if (!retval) { - reply = ibus_message_new_error_printf (message, - DBUS_ERROR_INVALID_ARGS, - "%s.%s: Can not match signature (si) of method", - IBUS_INTERFACE_ENGINE, - "PropertyActivate"); - ibus_error_free (error); - } - else { - g_signal_emit (engine, - engine_signals[PROPERTY_ACTIVATE], - 0, - name, - state); - - reply = ibus_message_new_method_return (message); - } - } - else if (g_strcmp0 (name, "PropertyShow") == 0) { - gchar *name; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, &name, - G_TYPE_INVALID); - - if (!retval) { - reply = ibus_message_new_error_printf (message, - DBUS_ERROR_INVALID_ARGS, - "%s.%s: Can not match signature (s) of method", - IBUS_INTERFACE_ENGINE, - "PropertyShow"); - ibus_error_free (error); - } - else { - g_signal_emit (engine, - engine_signals[PROPERTY_SHOW], - 0, - name); - - reply = ibus_message_new_method_return (message); - } - } - else if (g_strcmp0 (name, "PropertyHide") == 0) { - gchar *name; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, &name, - G_TYPE_INVALID); - if (!retval) { - reply = ibus_message_new_error_printf (message, - DBUS_ERROR_INVALID_ARGS, - "%s.%s: Can not match signature (s) of method", - IBUS_INTERFACE_ENGINE, "PropertyHide"); - ibus_error_free (error); - } - else { - g_signal_emit (engine, engine_signals[PROPERTY_HIDE], 0, name); - reply = ibus_message_new_method_return (message); - } - } - else if (g_strcmp0 (name, "SetCursorLocation") == 0) { - gint x, y, w, h; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_INT, &x, - G_TYPE_INT, &y, - G_TYPE_INT, &w, - G_TYPE_INT, &h, - G_TYPE_INVALID); - if (!retval) { - reply = ibus_message_new_error_printf (message, - DBUS_ERROR_INVALID_ARGS, - "%s.%s: Can not match signature (iiii) of method", - IBUS_INTERFACE_ENGINE, - "SetCursorLocation"); - ibus_error_free (error); - } - else { - engine->cursor_area.x = x; - engine->cursor_area.y = y; - engine->cursor_area.width = w; - engine->cursor_area.height = h; - - g_signal_emit (engine, - engine_signals[SET_CURSOR_LOCATION], - 0, - x, y, w, h); - - reply = ibus_message_new_method_return (message); - } - } - else if (g_strcmp0 (name, "SetCapabilities") == 0) { - guint caps; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_UINT, &caps, - G_TYPE_INVALID); - - if (!retval) { - reply = ibus_message_new_error_printf (message, - DBUS_ERROR_INVALID_ARGS, - "%s.%s: Can not match signature (u) of method", - IBUS_INTERFACE_ENGINE, "SetCapabilities"); - ibus_error_free (error); - } - else { - engine->client_capabilities = caps; - g_signal_emit (engine, engine_signals[SET_CAPABILITIES], 0, caps); - reply = ibus_message_new_method_return (message); - } - } - else if (g_strcmp0 (name, "Destroy") == 0) { - reply = ibus_message_new_method_return (message); - ibus_connection_send (connection, reply); - ibus_message_unref (reply); - ibus_object_destroy ((IBusObject *) engine); - return TRUE; - } - else { - reply = ibus_message_new_error_printf (message, - DBUS_ERROR_UNKNOWN_METHOD, - "%s.%s", - IBUS_INTERFACE_ENGINE, name); - g_warn_if_reached (); + if (g_strcmp0 (method_name, "PropertyActivate") == 0) { + gchar *name; + guint state; + g_variant_get (parameters, "(&su)", &name, &state); + g_signal_emit (engine, + engine_signals[PROPERTY_ACTIVATE], + 0, + name, + state); + g_dbus_method_invocation_return_value (invocation, NULL); + return; + } + + if (g_strcmp0 (method_name, "PropertyShow") == 0) { + gchar *name; + g_variant_get (parameters, "(&s)", &name); + g_signal_emit (engine, + engine_signals[PROPERTY_SHOW], + 0, + name); + g_dbus_method_invocation_return_value (invocation, NULL); + return; + } + + if (g_strcmp0 (method_name, "PropertyHide") == 0) { + gchar *name; + g_variant_get (parameters, "(&s)", &name); + g_signal_emit (engine, + engine_signals[PROPERTY_HIDE], + 0, + name); + g_dbus_method_invocation_return_value (invocation, NULL); + return; + } + + if (g_strcmp0 (method_name, "SetCursorLocation") == 0) { + gint x, y, w, h; + g_variant_get (parameters, "(iiii)", &x, &y, &w, &h); + engine->cursor_area.x = x; + engine->cursor_area.y = y; + engine->cursor_area.width = w; + engine->cursor_area.height = h; + + g_signal_emit (engine, + engine_signals[SET_CURSOR_LOCATION], + 0, + x, y, w, h); + g_dbus_method_invocation_return_value (invocation, NULL); + return; + } + + if (g_strcmp0 (method_name, "SetCapabilities") == 0) { + guint caps; + g_variant_get (parameters, "(u)", &caps); + engine->client_capabilities = caps; + g_signal_emit (engine, engine_signals[SET_CAPABILITIES], 0, caps); + g_dbus_method_invocation_return_value (invocation, NULL); + return; + } + + if (g_strcmp0 (method_name, "SetSurroundingText") == 0) { + GVariant *variant = NULL; + IBusText *text; + guint cursor_pos; + guint anchor_pos; + + g_variant_get (parameters, + "(vuu)", + &variant, + &cursor_pos, + &anchor_pos); + text = IBUS_TEXT (ibus_serializable_deserialize (variant)); + g_variant_unref (variant); + + g_signal_emit (engine, engine_signals[SET_SURROUNDING_TEXT], + 0, + text, + cursor_pos, + anchor_pos); + if (g_object_is_floating (text)) { + g_object_unref (text); } - } while (0); + g_dbus_method_invocation_return_value (invocation, NULL); + return; + } + + if (g_strcmp0 (method_name, "ProcessHandWritingEvent") == 0) { + const gdouble *coordinates; + gsize coordinates_len = 0; - ibus_connection_send (connection, reply); - ibus_message_unref (reply); - return TRUE; + coordinates = g_variant_get_fixed_array (g_variant_get_child_value (parameters, 0), &coordinates_len, sizeof (gdouble)); + g_return_if_fail (coordinates != NULL); + g_return_if_fail (coordinates_len >= 4); /* The array should contain at least one line. */ + g_return_if_fail (coordinates_len <= G_MAXUINT); /* to prevent overflow in the cast in g_signal_emit */ + g_return_if_fail ((coordinates_len & 1) == 0); + + g_signal_emit (engine, engine_signals[PROCESS_HAND_WRITING_EVENT], 0, + coordinates, (guint) coordinates_len); + g_dbus_method_invocation_return_value (invocation, NULL); + return; + } + + if (g_strcmp0 (method_name, "CancelHandWriting") == 0) { + guint n_strokes = 0; + g_variant_get (parameters, "(u)", &n_strokes); + g_signal_emit (engine, engine_signals[CANCEL_HAND_WRITING], 0, n_strokes); + g_dbus_method_invocation_return_value (invocation, NULL); + return; + } + + /* should not be reached */ + g_return_if_reached (); +} + +static GVariant * +ibus_engine_service_get_property (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error) +{ + return IBUS_SERVICE_CLASS (ibus_engine_parent_class)-> + service_get_property (service, + connection, + sender, + object_path, + interface_name, + property_name, + error); +} + +static gboolean +ibus_engine_service_set_property (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error) +{ + return IBUS_SERVICE_CLASS (ibus_engine_parent_class)-> + service_set_property (service, + connection, + sender, + object_path, + interface_name, + property_name, + value, + error); } static gboolean @@ -1002,40 +1125,96 @@ ibus_engine_property_hide (IBusEngine *engine, const gchar *prop_name) } static void -_send_signal (IBusEngine *engine, - const gchar *name, - GType first_arg_type, - ...) +ibus_engine_set_surrounding_text (IBusEngine *engine, + IBusText *text, + guint cursor_pos, + guint anchor_pos) { g_assert (IBUS_IS_ENGINE (engine)); - g_assert (name != NULL); - va_list args; - const gchar *path; - IBusEnginePrivate *priv; + if (engine->priv->surrounding_text) { + g_object_unref (engine->priv->surrounding_text); + } - priv = IBUS_ENGINE_GET_PRIVATE (engine); + engine->priv->surrounding_text = (IBusText *) g_object_ref_sink (text ? text : text_empty); + engine->priv->surrounding_cursor_pos = cursor_pos; + engine->priv->selection_anchor_pos = anchor_pos; + // g_debug ("set-surrounding-text ('%s', %d, %d)", text->text, cursor_pos, anchor_pos); +} + +static void +ibus_engine_process_hand_writing_event (IBusEngine *engine, + const gdouble *coordinates, + guint coordinates_len) +{ + // guint i; + // g_debug ("process-hand-writing-event (%u)", coordinates_len); + // for (i = 0; i < coordinates_len; i++) + // g_debug (" %lf", coordinates[i]); +} - path = ibus_service_get_path ((IBusService *)engine); +static void +ibus_engine_cancel_hand_writing (IBusEngine *engine, + guint n_strokes) +{ + // g_debug ("cancel-hand-writing (%u)", n_strokes); +} - va_start (args, first_arg_type); - ibus_connection_send_signal_valist (priv->connection, - path, - IBUS_INTERFACE_ENGINE, - name, - first_arg_type, - args); - va_end (args); +static void +ibus_engine_emit_signal (IBusEngine *engine, + const gchar *signal_name, + GVariant *parameters) +{ + ibus_service_emit_signal ((IBusService *)engine, + NULL, + IBUS_INTERFACE_ENGINE, + signal_name, + parameters, + NULL); } +IBusEngine * +ibus_engine_new (const gchar *engine_name, + const gchar *object_path, + GDBusConnection *connection) +{ + return ibus_engine_new_with_type (IBUS_TYPE_ENGINE, + engine_name, + object_path, + connection); +} + +IBusEngine * +ibus_engine_new_with_type (GType engine_type, + const gchar *engine_name, + const gchar *object_path, + GDBusConnection *connection) +{ + g_return_val_if_fail (g_type_is_a (engine_type, IBUS_TYPE_ENGINE), NULL); + g_return_val_if_fail (engine_name != NULL, NULL); + g_return_val_if_fail (object_path != NULL, NULL); + g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL); + + GObject *object = g_object_new (engine_type, + "engine-name", engine_name, + "object-path", object_path, + "connection", connection, + NULL); + return IBUS_ENGINE (object); +} + + void ibus_engine_commit_text (IBusEngine *engine, IBusText *text) { - _send_signal (engine, - "CommitText", - IBUS_TYPE_TEXT, &text, - G_TYPE_INVALID); + g_return_if_fail (IBUS_IS_ENGINE (engine)); + g_return_if_fail (IBUS_IS_TEXT (text)); + + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)text); + ibus_engine_emit_signal (engine, + "CommitText", + g_variant_new ("(v)", variant)); if (g_object_is_floating (text)) { g_object_unref (text); @@ -1059,75 +1238,49 @@ ibus_engine_update_preedit_text_with_mode (IBusEngine *engine, gboolean visible, IBusPreeditFocusMode mode) { - _send_signal (engine, - "UpdatePreeditText", - IBUS_TYPE_TEXT, &text, - G_TYPE_UINT, &cursor_pos, - G_TYPE_BOOLEAN, &visible, - G_TYPE_UINT, &mode, - G_TYPE_INVALID); + g_return_if_fail (IBUS_IS_ENGINE (engine)); + g_return_if_fail (IBUS_IS_TEXT (text)); + + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)text); + ibus_engine_emit_signal (engine, + "UpdatePreeditText", + g_variant_new ("(vubu)", variant, cursor_pos, visible, mode)); if (g_object_is_floating (text)) { g_object_unref (text); } } -void -ibus_engine_show_preedit_text (IBusEngine *engine) -{ - _send_signal (engine, - "ShowPreeditText", - G_TYPE_INVALID); -} - -void ibus_engine_hide_preedit_text (IBusEngine *engine) -{ - _send_signal (engine, - "HidePreeditText", - G_TYPE_INVALID); -} - void ibus_engine_update_auxiliary_text (IBusEngine *engine, IBusText *text, gboolean visible) { - _send_signal (engine, - "UpdateAuxiliaryText", - IBUS_TYPE_TEXT, &text, - G_TYPE_BOOLEAN, &visible, - G_TYPE_INVALID); + g_return_if_fail (IBUS_IS_ENGINE (engine)); + g_return_if_fail (IBUS_IS_TEXT (text)); + + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)text); + ibus_engine_emit_signal (engine, + "UpdateAuxiliaryText", + g_variant_new ("(vb)", variant, visible)); if (g_object_is_floating (text)) { g_object_unref (text); } } -void -ibus_engine_show_auxiliary_text (IBusEngine *engine) -{ - _send_signal (engine, - "ShowAuxiliaryText", - G_TYPE_INVALID); -} - -void -ibus_engine_hide_auxiliary_text (IBusEngine *engine) -{ - _send_signal (engine, - "HideAuxiliaryText", - G_TYPE_INVALID); -} void ibus_engine_update_lookup_table (IBusEngine *engine, IBusLookupTable *table, gboolean visible) { - _send_signal (engine, - "UpdateLookupTable", - IBUS_TYPE_LOOKUP_TABLE, &table, - G_TYPE_BOOLEAN, &visible, - G_TYPE_INVALID); + g_return_if_fail (IBUS_IS_ENGINE (engine)); + g_return_if_fail (IBUS_IS_LOOKUP_TABLE (table)); + + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)table); + ibus_engine_emit_signal (engine, + "UpdateLookupTable", + g_variant_new ("(vb)", variant, visible)); if (g_object_is_floating (table)) { g_object_unref (table); @@ -1139,6 +1292,9 @@ ibus_engine_update_lookup_table_fast (IBusEngine *engine, IBusLookupTable *table, gboolean visible) { + g_return_if_fail (IBUS_IS_ENGINE (engine)); + g_return_if_fail (IBUS_IS_LOOKUP_TABLE (table)); + IBusLookupTable *new_table; IBusText *text; gint page_begin; @@ -1171,52 +1327,113 @@ ibus_engine_update_lookup_table_fast (IBusEngine *engine, } } -void ibus_engine_show_lookup_table (IBusEngine *engine) +void +ibus_engine_forward_key_event (IBusEngine *engine, + guint keyval, + guint keycode, + guint state) { - _send_signal (engine, - "ShowLookupTable", - G_TYPE_INVALID); -} + g_return_if_fail (IBUS_IS_ENGINE (engine)); -void ibus_engine_hide_lookup_table (IBusEngine *engine) -{ - _send_signal (engine, - "HideLookupTable", - G_TYPE_INVALID); -} - -void ibus_engine_forward_key_event (IBusEngine *engine, - guint keyval, - guint keycode, - guint state) -{ - _send_signal (engine, - "ForwardKeyEvent", - G_TYPE_UINT, &keyval, - G_TYPE_UINT, &keycode, - G_TYPE_UINT, &state, - G_TYPE_INVALID); + ibus_engine_emit_signal (engine, + "ForwardKeyEvent", + g_variant_new ("(uuu)", keyval, keycode, state)); } void ibus_engine_delete_surrounding_text (IBusEngine *engine, gint offset_from_cursor, guint nchars) { - _send_signal (engine, - "DeleteSurroundingText", - G_TYPE_INT, &offset_from_cursor, - G_TYPE_UINT, &nchars, - G_TYPE_INVALID); + IBusEnginePrivate *priv; + + g_return_if_fail (IBUS_IS_ENGINE (engine)); + + priv = IBUS_ENGINE_GET_PRIVATE (engine); + + /* Update surrounding-text cache. This is necessary since some + engines call ibus_engine_get_surrounding_text() immediately + after ibus_engine_delete_surrounding_text(). */ + if (priv->surrounding_text) { + IBusText *text; + glong cursor_pos, len; + + cursor_pos = priv->surrounding_cursor_pos + offset_from_cursor; + len = ibus_text_get_length (priv->surrounding_text); + if (cursor_pos >= 0 && len - cursor_pos >= nchars) { + gunichar *ucs; + + ucs = g_utf8_to_ucs4_fast (priv->surrounding_text->text, + -1, + NULL); + memmove (&ucs[cursor_pos], + &ucs[cursor_pos + nchars], + sizeof(gunichar) * (len - cursor_pos - nchars)); + ucs[len - nchars] = 0; + text = ibus_text_new_from_ucs4 (ucs); + g_free (ucs); + priv->surrounding_cursor_pos = cursor_pos; + } else { + text = text_empty; + priv->surrounding_cursor_pos = 0; + } + + g_object_unref (priv->surrounding_text); + priv->surrounding_text = g_object_ref_sink (text); + } + + ibus_engine_emit_signal (engine, + "DeleteSurroundingText", + g_variant_new ("(iu)", offset_from_cursor, nchars)); +} + +void +ibus_engine_get_surrounding_text (IBusEngine *engine, + IBusText **text, + guint *cursor_pos, + guint *anchor_pos) +{ + IBusEnginePrivate *priv; + + g_return_if_fail (IBUS_IS_ENGINE (engine)); + const gboolean signal_only = (text == NULL); + + g_return_if_fail (( signal_only && (cursor_pos == NULL)) || + (!signal_only && (cursor_pos != NULL))); + + g_return_if_fail (( signal_only && (anchor_pos == NULL)) || + (!signal_only && (anchor_pos != NULL))); + + priv = IBUS_ENGINE_GET_PRIVATE (engine); + + if (!signal_only) { + *text = g_object_ref (priv->surrounding_text); + *cursor_pos = priv->surrounding_cursor_pos; + *anchor_pos = priv->selection_anchor_pos; + } + + /* tell the client that this engine will utilize surrounding-text + * feature, which causes periodical update. Note that the client + * should request the initial surrounding-text when the engine is + * enabled (see ibus_im_context_focus_in() and + * _ibus_context_enabled_cb() in client/gtk2/ibusimcontext.c). */ + ibus_engine_emit_signal (engine, + "RequireSurroundingText", + NULL); + + // g_debug ("get-surrounding-text ('%s', %d, %d)", (*text)->text, *cursor_pos, *anchor_pos); } void ibus_engine_register_properties (IBusEngine *engine, IBusPropList *prop_list) { - _send_signal (engine, - "RegisterProperties", - IBUS_TYPE_PROP_LIST, &prop_list, - G_TYPE_INVALID); + g_return_if_fail (IBUS_IS_ENGINE (engine)); + g_return_if_fail (IBUS_IS_PROP_LIST (prop_list)); + + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)prop_list); + ibus_engine_emit_signal (engine, + "RegisterProperties", + g_variant_new ("(v)", variant)); if (g_object_is_floating (prop_list)) { g_object_unref (prop_list); @@ -1227,24 +1444,39 @@ void ibus_engine_update_property (IBusEngine *engine, IBusProperty *prop) { - _send_signal (engine, - "UpdateProperty", - IBUS_TYPE_PROPERTY, &prop, - G_TYPE_INVALID); + g_return_if_fail (IBUS_IS_ENGINE (engine)); + g_return_if_fail (IBUS_IS_PROPERTY (prop)); + + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)prop); + ibus_engine_emit_signal (engine, + "UpdateProperty", + g_variant_new ("(v)", variant)); if (g_object_is_floating (prop)) { g_object_unref (prop); } } +#define DEFINE_FUNC(name, Name) \ + void \ + ibus_engine_##name (IBusEngine *engine) \ + { \ + g_return_if_fail (IBUS_IS_ENGINE (engine)); \ + ibus_engine_emit_signal (engine, \ + #Name, \ + NULL); \ + } +DEFINE_FUNC (show_preedit_text, ShowPreeditText) +DEFINE_FUNC (hide_preedit_text, HidePreeditText) +DEFINE_FUNC (show_auxiliary_text, ShowAuxiliaryText) +DEFINE_FUNC (hide_auxiliary_text, HideAuxiliaryText) +DEFINE_FUNC (show_lookup_table, ShowLookupTable) +DEFINE_FUNC (hide_lookup_table, HideLookupTable) +#undef DEFINE_FUNC + const gchar * ibus_engine_get_name (IBusEngine *engine) { - g_assert (IBUS_IS_ENGINE (engine)); - - IBusEnginePrivate *priv; - priv = IBUS_ENGINE_GET_PRIVATE (engine); - - return priv->name; + g_return_val_if_fail (IBUS_IS_ENGINE (engine), NULL); + return engine->priv->engine_name; } - diff --git a/src/ibusengine.h b/src/ibusengine.h index 80e87c76e..d2d01a025 100644 --- a/src/ibusengine.h +++ b/src/ibusengine.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusengine * @short_description: Input method engine abstract. @@ -59,6 +65,7 @@ G_BEGIN_DECLS typedef struct _IBusEngine IBusEngine; typedef struct _IBusEngineClass IBusEngineClass; +typedef struct _IBusEnginePrivate IBusEnginePrivate; /** * IBusEngine: @@ -70,7 +77,10 @@ typedef struct _IBusEngineClass IBusEngineClass; * IBusEngine properties. */ struct _IBusEngine { + /*< private >*/ IBusService parent; + IBusEnginePrivate *priv; + /* instance members */ /*< public >*/ gboolean enabled; @@ -82,9 +92,12 @@ struct _IBusEngine { }; struct _IBusEngineClass { + /*< private >*/ IBusServiceClass parent; /* class members */ + /*< public >*/ + /* signals */ gboolean (* process_key_event) (IBusEngine *engine, guint keyval, @@ -123,26 +136,53 @@ struct _IBusEngineClass { guint index, guint button, guint state); + void (* set_surrounding_text) + (IBusEngine *engine, + IBusText *text, + guint cursor_index, + guint anchor_pos); + void (* process_hand_writing_event) + (IBusEngine *engine, + const gdouble *coordinates, + guint coordinates_len); + void (* cancel_hand_writing) + (IBusEngine *engine, + guint n_strokes); /*< private >*/ /* padding */ - gpointer pdummy[8]; + gpointer pdummy[5]; }; GType ibus_engine_get_type (void); /** * ibus_engine_new: - * @name: Name of the IBusObject. - * @path: Path for IBusService. - * @connection: An opened IBusConnection. + * @engine_name: Name of the IBusObject. + * @object_path: Path for IBusService. + * @connection: An opened GDBusConnection. * @returns: A newly allocated IBusEngine. * * New an IBusEngine. */ -IBusEngine *ibus_engine_new (const gchar *name, - const gchar *path, - IBusConnection *connection); +IBusEngine *ibus_engine_new (const gchar *engine_name, + const gchar *object_path, + GDBusConnection *connection); +/** + * ibus_engine_new_with_type: + * @engine_type: GType of #IBusEngine. + * @engine_name: Name of the IBusObject. + * @object_path: Path for IBusService. + * @connection: An opened GDBusConnection. + * @returns: A newly allocated IBusEngine. + * + * New an IBusEngine. + */ +IBusEngine *ibus_engine_new_with_type (GType engine_type, + const gchar *engine_name, + const gchar *object_path, + GDBusConnection *connection); + /** * ibus_engine_commit_text: @@ -365,6 +405,28 @@ void ibus_engine_delete_surrounding_text(IBusEngine *engine, gint offset, guint nchars); +/** + * ibus_engine_get_surrounding_text: + * @engine: An IBusEngine. + * @text: (out) (transfer none) (allow-none): Location to store surrounding text. + * @cursor_pos: (out) (allow-none): Cursor position in characters in @text. + * @anchor_pos: (out) (allow-none): Anchor position of selection in @text. + * + * Get surrounding text. + * + * It is also used to tell the input-context that the engine will + * utilize surrounding-text. In that case, it must be called in + * #IBusEngine::enable handler, with both @text and @cursor set to + * %NULL. + * + * @see_also #IBusEngine::set-surrounding-text + */ +void ibus_engine_get_surrounding_text(IBusEngine *engine, + IBusText **text, + guint *cursor_pos, + guint *anchor_pos); + + /** * ibus_engine_get_name: * @engine: An IBusEngine. @@ -376,4 +438,3 @@ const gchar *ibus_engine_get_name (IBusEngine *engine); G_END_DECLS #endif - diff --git a/src/ibusenginedesc.c b/src/ibusenginedesc.c index 5563cc0ce..48ecb07d6 100644 --- a/src/ibusenginedesc.c +++ b/src/ibusenginedesc.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -26,24 +27,58 @@ enum { LAST_SIGNAL, }; +enum { + PROP_0 = 0, + PROP_NAME, + PROP_LONGNAME, + PROP_DESCRIPTION, + PROP_LANGUAGE, + PROP_LICENSE, + PROP_AUTHOR, + PROP_ICON, + PROP_LAYOUT, + PROP_RANK, + PROP_HOTKEYS, + PROP_SYMBOL, + PROP_SETUP, +}; + /* IBusEngineDescPriv */ struct _IBusEngineDescPrivate { - gpointer pad; + gchar *name; + gchar *longname; + gchar *description; + gchar *language; + gchar *license; + gchar *author; + gchar *icon; + gchar *layout; + guint rank; + gchar *hotkeys; + gchar *symbol; + gchar *setup; }; -typedef struct _IBusEngineDescPrivate IBusEngineDescPrivate; #define IBUS_ENGINE_DESC_GET_PRIVATE(o) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((o), BUS_TYPE_ENGINE_INFO, IBusEngineDescPrivate)) + (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_ENGINE_DESC, IBusEngineDescPrivate)) // static guint _signals[LAST_SIGNAL] = { 0 }; /* functions prototype */ +static void ibus_engine_desc_set_property (IBusEngineDesc *desc, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void ibus_engine_desc_get_property (IBusEngineDesc *desc, + guint prop_id, + GValue *value, + GParamSpec *pspec); static void ibus_engine_desc_destroy (IBusEngineDesc *desc); static gboolean ibus_engine_desc_serialize (IBusEngineDesc *desc, - IBusMessageIter *iter); -static gboolean ibus_engine_desc_deserialize (IBusEngineDesc *desc, - IBusMessageIter *iter); + GVariantBuilder *builder); +static gint ibus_engine_desc_deserialize (IBusEngineDesc *desc, + GVariant *variant); static gboolean ibus_engine_desc_copy (IBusEngineDesc *dest, const IBusEngineDesc *src); static gboolean ibus_engine_desc_parse_xml_node (IBusEngineDesc *desc, @@ -53,146 +88,387 @@ G_DEFINE_TYPE (IBusEngineDesc, ibus_engine_desc, IBUS_TYPE_SERIALIZABLE) static void -ibus_engine_desc_class_init (IBusEngineDescClass *klass) +ibus_engine_desc_class_init (IBusEngineDescClass *class) { - IBusObjectClass *object_class = IBUS_OBJECT_CLASS (klass); - IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (klass); + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + IBusObjectClass *object_class = IBUS_OBJECT_CLASS (class); + IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (class); + gobject_class->set_property = (GObjectSetPropertyFunc) ibus_engine_desc_set_property; + gobject_class->get_property = (GObjectGetPropertyFunc) ibus_engine_desc_get_property; object_class->destroy = (IBusObjectDestroyFunc) ibus_engine_desc_destroy; serializable_class->serialize = (IBusSerializableSerializeFunc) ibus_engine_desc_serialize; serializable_class->deserialize = (IBusSerializableDeserializeFunc) ibus_engine_desc_deserialize; serializable_class->copy = (IBusSerializableCopyFunc) ibus_engine_desc_copy; - g_string_append (serializable_class->signature, "ssssssssu"); + g_type_class_add_private (class, sizeof (IBusEngineDescPrivate)); + + /* install properties */ + /** + * IBusEngineDesc:name: + * + * The name of engine description + */ + g_object_class_install_property (gobject_class, + PROP_NAME, + g_param_spec_string ("name", + "description name", + "The name of engine description", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusEngineDesc:longname: + * + * The longname of engine description + */ + g_object_class_install_property (gobject_class, + PROP_LONGNAME, + g_param_spec_string ("longname", + "description longname", + "The longname of engine description", + "", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusEngineDesc:description: + * + * The description of engine description + */ + g_object_class_install_property (gobject_class, + PROP_DESCRIPTION, + g_param_spec_string ("description", + "description description", + "The description of engine description", + "", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusEngineDesc:language: + * + * The language of engine description + */ + g_object_class_install_property (gobject_class, + PROP_LANGUAGE, + g_param_spec_string ("language", + "description language", + "The language of engine description", + "", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusEngineDesc:license: + * + * The license of engine description + */ + g_object_class_install_property (gobject_class, + PROP_LICENSE, + g_param_spec_string ("license", + "description license", + "The license of engine description", + "", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusEngineDesc:author: + * + * The author of engine description + */ + g_object_class_install_property (gobject_class, + PROP_AUTHOR, + g_param_spec_string ("author", + "description author", + "The author of engine description", + "", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusEngineDesc:icon: + * + * The icon of engine description + */ + g_object_class_install_property (gobject_class, + PROP_ICON, + g_param_spec_string ("icon", + "description icon", + "The icon of engine description", + "ibus-engine", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusEngineDesc:layout: + * + * The layout of engine description + */ + g_object_class_install_property (gobject_class, + PROP_LAYOUT, + g_param_spec_string ("layout", + "description layout", + "The layout of engine description", + "us", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusEngineDesc:rank: + * + * The rank of engine description + */ + g_object_class_install_property (gobject_class, + PROP_RANK, + g_param_spec_uint ("rank", + "description rank", + "The rank of engine description", + 0, + G_MAXUINT, + 0, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusEngineDesc:hotkeys: + * + * The hotkeys of engine description + */ + g_object_class_install_property (gobject_class, + PROP_HOTKEYS, + g_param_spec_string ("hotkeys", + "description hotkeys", + "The hotkeys of engine description", + "", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusEngineDesc:symbol: + * + * The symbol chars of engine description instead of icon image + */ + g_object_class_install_property (gobject_class, + PROP_SYMBOL, + g_param_spec_string ("symbol", + "description symbol", + "The icon symbol chars of engine description", + "", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusEngineDesc:setup: + * + * The exec lists of the engine setup command + */ + g_object_class_install_property (gobject_class, + PROP_SETUP, + g_param_spec_string ("setup", + "setup args", + "The exec lists of the engine setup command", + "", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); } static void ibus_engine_desc_init (IBusEngineDesc *desc) { - - desc->name = NULL; - desc->longname = NULL; - desc->description = NULL; - desc->language = NULL; - desc->license = NULL; - desc->author = NULL; - desc->icon = NULL; - desc->layout = NULL; - desc->rank = 0; + desc->priv = IBUS_ENGINE_DESC_GET_PRIVATE (desc); + + desc->priv->name = NULL; + desc->priv->longname = NULL; + desc->priv->description = NULL; + desc->priv->language = NULL; + desc->priv->license = NULL; + desc->priv->author = NULL; + desc->priv->icon = NULL; + desc->priv->layout = NULL; + desc->priv->rank = 0; + desc->priv->hotkeys = NULL; + desc->priv->symbol = NULL; + desc->priv->setup = NULL; } static void ibus_engine_desc_destroy (IBusEngineDesc *desc) { - g_free (desc->name); - g_free (desc->longname); - g_free (desc->description); - g_free (desc->language); - g_free (desc->license); - g_free (desc->author); - g_free (desc->icon); - g_free (desc->layout); + g_free (desc->priv->name); + g_free (desc->priv->longname); + g_free (desc->priv->description); + g_free (desc->priv->language); + g_free (desc->priv->license); + g_free (desc->priv->author); + g_free (desc->priv->icon); + g_free (desc->priv->layout); + g_free (desc->priv->hotkeys); + g_free (desc->priv->symbol); + g_free (desc->priv->setup); IBUS_OBJECT_CLASS (ibus_engine_desc_parent_class)->destroy (IBUS_OBJECT (desc)); } -static gboolean -ibus_engine_desc_serialize (IBusEngineDesc *desc, - IBusMessageIter *iter) +static void +ibus_engine_desc_set_property (IBusEngineDesc *desc, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { - gboolean retval; - - retval = IBUS_SERIALIZABLE_CLASS (ibus_engine_desc_parent_class)->serialize ((IBusSerializable *)desc, iter); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &desc->name); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &desc->longname); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &desc->description); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &desc->language); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &desc->license); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &desc->author); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &desc->icon); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &desc->layout); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_UINT, &desc->rank); - g_return_val_if_fail (retval, FALSE); + switch (prop_id) { + case PROP_NAME: + g_assert (desc->priv->name == NULL); + desc->priv->name = g_value_dup_string (value); + break; + case PROP_LONGNAME: + g_assert (desc->priv->longname == NULL); + desc->priv->longname = g_value_dup_string (value); + break; + case PROP_DESCRIPTION: + g_assert (desc->priv->description == NULL); + desc->priv->description = g_value_dup_string (value); + break; + case PROP_LANGUAGE: + g_assert (desc->priv->language == NULL); + desc->priv->language = g_value_dup_string (value); + break; + case PROP_LICENSE: + g_assert (desc->priv->license == NULL); + desc->priv->license = g_value_dup_string (value); + break; + case PROP_AUTHOR: + g_assert (desc->priv->author == NULL); + desc->priv->author = g_value_dup_string (value); + break; + case PROP_ICON: + g_assert (desc->priv->icon == NULL); + desc->priv->icon = g_value_dup_string (value); + break; + case PROP_LAYOUT: + g_assert (desc->priv->layout == NULL); + desc->priv->layout = g_value_dup_string (value); + break; + case PROP_RANK: + desc->priv->rank = g_value_get_uint (value); + break; + case PROP_HOTKEYS: + g_assert (desc->priv->hotkeys == NULL); + desc->priv->hotkeys = g_value_dup_string (value); + break; + case PROP_SYMBOL: + g_assert (desc->priv->symbol == NULL); + desc->priv->symbol = g_value_dup_string (value); + break; + case PROP_SETUP: + g_assert (desc->priv->setup == NULL); + desc->priv->setup = g_value_dup_string (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (desc, prop_id, pspec); + } +} - return TRUE; +static void +ibus_engine_desc_get_property (IBusEngineDesc *desc, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + switch (prop_id) { + case PROP_NAME: + g_value_set_string (value, ibus_engine_desc_get_name (desc)); + break; + case PROP_LONGNAME: + g_value_set_string (value, ibus_engine_desc_get_longname (desc)); + break; + case PROP_DESCRIPTION: + g_value_set_string (value, ibus_engine_desc_get_description (desc)); + break; + case PROP_LANGUAGE: + g_value_set_string (value, ibus_engine_desc_get_language (desc)); + break; + case PROP_LICENSE: + g_value_set_string (value, ibus_engine_desc_get_license (desc)); + break; + case PROP_AUTHOR: + g_value_set_string (value, ibus_engine_desc_get_author (desc)); + break; + case PROP_ICON: + g_value_set_string (value, ibus_engine_desc_get_icon (desc)); + break; + case PROP_LAYOUT: + g_value_set_string (value, ibus_engine_desc_get_layout (desc)); + break; + case PROP_RANK: + g_value_set_uint (value, ibus_engine_desc_get_rank (desc)); + break; + case PROP_HOTKEYS: + g_value_set_string (value, ibus_engine_desc_get_hotkeys (desc)); + break; + case PROP_SYMBOL: + g_value_set_string (value, ibus_engine_desc_get_symbol (desc)); + break; + case PROP_SETUP: + g_value_set_string (value, ibus_engine_desc_get_setup (desc)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (desc, prop_id, pspec); + } } static gboolean -ibus_engine_desc_deserialize (IBusEngineDesc *desc, - IBusMessageIter *iter) +ibus_engine_desc_serialize (IBusEngineDesc *desc, + GVariantBuilder *builder) { gboolean retval; - gchar *str; - - retval = IBUS_SERIALIZABLE_CLASS (ibus_engine_desc_parent_class)->deserialize ((IBusSerializable *)desc, iter); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - desc->name = g_strdup (str); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - desc->longname = g_strdup (str); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - desc->description = g_strdup (str); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - desc->language = g_strdup (str); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - desc->license = g_strdup (str); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - desc->author = g_strdup (str); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - desc->icon = g_strdup (str); - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); + retval = IBUS_SERIALIZABLE_CLASS (ibus_engine_desc_parent_class)->serialize ((IBusSerializable *)desc, builder); g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - desc->layout = g_strdup (str); - - retval = ibus_message_iter_get (iter, G_TYPE_UINT, &desc->rank); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); + /* End dict iter */ + +#define NOTNULL(s) ((s) != NULL ? (s) : "") + /* If you will add a new property, you can append it at the end and + * you should not change the serialized order of name, longname, + * description, ... because the order is also used in other applications + * likes ibus-qt. */ + g_variant_builder_add (builder, "s", NOTNULL (desc->priv->name)); + g_variant_builder_add (builder, "s", NOTNULL (desc->priv->longname)); + g_variant_builder_add (builder, "s", NOTNULL (desc->priv->description)); + g_variant_builder_add (builder, "s", NOTNULL (desc->priv->language)); + g_variant_builder_add (builder, "s", NOTNULL (desc->priv->license)); + g_variant_builder_add (builder, "s", NOTNULL (desc->priv->author)); + g_variant_builder_add (builder, "s", NOTNULL (desc->priv->icon)); + g_variant_builder_add (builder, "s", NOTNULL (desc->priv->layout)); + g_variant_builder_add (builder, "u", desc->priv->rank); + g_variant_builder_add (builder, "s", NOTNULL (desc->priv->hotkeys)); + g_variant_builder_add (builder, "s", NOTNULL (desc->priv->symbol)); + g_variant_builder_add (builder, "s", NOTNULL (desc->priv->setup)); +#undef NOTNULL return TRUE; } +static gint +ibus_engine_desc_deserialize (IBusEngineDesc *desc, + GVariant *variant) +{ + gint retval; + + retval = IBUS_SERIALIZABLE_CLASS (ibus_engine_desc_parent_class)->deserialize ((IBusSerializable *)desc, variant); + g_return_val_if_fail (retval, 0); + + /* If you will add a new property, you can append it at the end and + * you should not change the serialized order of name, longname, + * description, ... because the order is also used in other applications + * likes ibus-qt. */ + g_variant_get_child (variant, retval++, "s", &desc->priv->name); + g_variant_get_child (variant, retval++, "s", &desc->priv->longname); + g_variant_get_child (variant, retval++, "s", &desc->priv->description); + g_variant_get_child (variant, retval++, "s", &desc->priv->language); + g_variant_get_child (variant, retval++, "s", &desc->priv->license); + g_variant_get_child (variant, retval++, "s", &desc->priv->author); + g_variant_get_child (variant, retval++, "s", &desc->priv->icon); + g_variant_get_child (variant, retval++, "s", &desc->priv->layout); + g_variant_get_child (variant, retval++, "u", &desc->priv->rank); + g_variant_get_child (variant, retval++, "s", &desc->priv->hotkeys); + g_variant_get_child (variant, retval++, "s", &desc->priv->symbol); + g_variant_get_child (variant, retval++, "s", &desc->priv->setup); + + return retval; +} + static gboolean ibus_engine_desc_copy (IBusEngineDesc *dest, const IBusEngineDesc *src) @@ -203,16 +479,18 @@ ibus_engine_desc_copy (IBusEngineDesc *dest, (IBusSerializable *)src); g_return_val_if_fail (retval, FALSE); - - dest->name = g_strdup (src->name); - dest->longname = g_strdup (src->longname); - dest->description = g_strdup (src->description); - dest->language = g_strdup (src->language); - dest->license = g_strdup (src->license); - dest->author = g_strdup (src->author); - dest->icon = g_strdup (src->icon); - dest->layout = g_strdup (src->layout); - + dest->priv->name = g_strdup (src->priv->name); + dest->priv->longname = g_strdup (src->priv->longname); + dest->priv->description = g_strdup (src->priv->description); + dest->priv->language = g_strdup (src->priv->language); + dest->priv->license = g_strdup (src->priv->license); + dest->priv->author = g_strdup (src->priv->author); + dest->priv->icon = g_strdup (src->priv->icon); + dest->priv->layout = g_strdup (src->priv->layout); + dest->priv->rank = src->priv->rank; + dest->priv->hotkeys = g_strdup (src->priv->hotkeys); + dest->priv->symbol = g_strdup (src->priv->symbol); + dest->priv->setup = g_strdup (src->priv->setup); return TRUE; } @@ -231,13 +509,14 @@ ibus_engine_desc_output (IBusEngineDesc *desc, { g_string_append_indent (output, indent); g_string_append (output, "\n"); -#define OUTPUT_ENTRY(field, element) \ - { \ - gchar *escape_text = g_markup_escape_text (desc->field ? desc->field : "", -1); \ - g_string_append_indent (output, indent + 1); \ - g_string_append_printf (output, "<"element">%s\n", \ - escape_text); \ - g_free (escape_text); \ +#define OUTPUT_ENTRY(field, element) \ + { \ + gchar *escape_text = g_markup_escape_text ( \ + desc->priv->field ? desc->priv->field : "", -1); \ + g_string_append_indent (output, indent + 1); \ + g_string_append_printf (output, "<"element">%s\n", \ + escape_text); \ + g_free (escape_text); \ } #define OUTPUT_ENTRY_1(name) OUTPUT_ENTRY(name, #name) OUTPUT_ENTRY_1(name); @@ -248,8 +527,11 @@ ibus_engine_desc_output (IBusEngineDesc *desc, OUTPUT_ENTRY_1(author); OUTPUT_ENTRY_1(icon); OUTPUT_ENTRY_1(layout); + OUTPUT_ENTRY_1(hotkeys); + OUTPUT_ENTRY_1(symbol); + OUTPUT_ENTRY_1(setup); g_string_append_indent (output, indent + 1); - g_string_append_printf (output, "%u\n", desc->rank); + g_string_append_printf (output, "%u\n", desc->priv->rank); #undef OUTPUT_ENTRY #undef OUTPUT_ENTRY_1 g_string_append_indent (output, indent); @@ -261,13 +543,14 @@ ibus_engine_desc_parse_xml_node (IBusEngineDesc *desc, XMLNode *node) { GList *p; + for (p = node->sub_nodes; p != NULL; p = p->next) { XMLNode *sub_node = (XMLNode *) p->data; #define PARSE_ENTRY(field_name, element_name) \ if (g_strcmp0 (sub_node->name, element_name) == 0) { \ - g_free (desc->field_name); \ - desc->field_name = g_strdup (sub_node->text); \ + g_free (desc->priv->field_name); \ + desc->priv->field_name = g_strdup (sub_node->text); \ continue; \ } #define PARSE_ENTRY_1(name) PARSE_ENTRY(name, #name) @@ -279,10 +562,13 @@ ibus_engine_desc_parse_xml_node (IBusEngineDesc *desc, PARSE_ENTRY_1(author); PARSE_ENTRY_1(icon); PARSE_ENTRY_1(layout); + PARSE_ENTRY_1(hotkeys); + PARSE_ENTRY_1(symbol); + PARSE_ENTRY_1(setup); #undef PARSE_ENTRY -#undef PARSE_ENTRY1 +#undef PARSE_ENTRY_1 if (g_strcmp0 (sub_node->name , "rank") == 0) { - desc->rank = atoi (sub_node->text); + desc->priv->rank = atoi (sub_node->text); continue; } g_warning (" element contains invalidate element <%s>", sub_node->name); @@ -290,6 +576,27 @@ ibus_engine_desc_parse_xml_node (IBusEngineDesc *desc, return TRUE; } +#define IBUS_ENGINE_DESC_GET_PROPERTY(property, return_type) \ +return_type \ +ibus_engine_desc_get_ ## property (IBusEngineDesc *desc) \ +{ \ + return desc->priv->property; \ +} + +IBUS_ENGINE_DESC_GET_PROPERTY (name, const gchar *) +IBUS_ENGINE_DESC_GET_PROPERTY (longname, const gchar *) +IBUS_ENGINE_DESC_GET_PROPERTY (description, const gchar *) +IBUS_ENGINE_DESC_GET_PROPERTY (language, const gchar *) +IBUS_ENGINE_DESC_GET_PROPERTY (license, const gchar *) +IBUS_ENGINE_DESC_GET_PROPERTY (author, const gchar *) +IBUS_ENGINE_DESC_GET_PROPERTY (icon, const gchar *) +IBUS_ENGINE_DESC_GET_PROPERTY (layout, const gchar *) +IBUS_ENGINE_DESC_GET_PROPERTY (rank, guint) +IBUS_ENGINE_DESC_GET_PROPERTY (hotkeys, const gchar *) +IBUS_ENGINE_DESC_GET_PROPERTY (symbol, const gchar *) +IBUS_ENGINE_DESC_GET_PROPERTY (setup, const gchar *) +#undef IBUS_ENGINE_DESC_GET_PROPERTY + IBusEngineDesc * ibus_engine_desc_new (const gchar *name, const gchar *longname, @@ -300,26 +607,43 @@ ibus_engine_desc_new (const gchar *name, const gchar *icon, const gchar *layout) { - g_assert (name); - g_assert (longname); - g_assert (description); - g_assert (language); - g_assert (license); - g_assert (author); - g_assert (icon); - g_assert (layout); + return ibus_engine_desc_new_varargs ("name", name, + "longname", longname, + "description", description, + "language", language, + "license", license, + "author", author, + "icon", icon, + "layout", layout, + NULL); +} +IBusEngineDesc * +ibus_engine_desc_new_varargs (const gchar *first_property_name, ...) +{ + va_list var_args; IBusEngineDesc *desc; - desc = (IBusEngineDesc *)g_object_new (IBUS_TYPE_ENGINE_DESC, NULL); - desc->name = g_strdup (name); - desc->longname = g_strdup (longname); - desc->description = g_strdup (description); - desc->language = g_strdup (language); - desc->license = g_strdup (license); - desc->author = g_strdup (author); - desc->icon = g_strdup (icon); - desc->layout = g_strdup (layout); + g_assert (first_property_name); + + va_start (var_args, first_property_name); + desc = (IBusEngineDesc *) g_object_new_valist (IBUS_TYPE_ENGINE_DESC, + first_property_name, + var_args); + va_end (var_args); + + /* name is required. Other properties are set in class_init by default. */ + g_assert (desc->priv->name); + g_assert (desc->priv->longname); + g_assert (desc->priv->description); + g_assert (desc->priv->language); + g_assert (desc->priv->license); + g_assert (desc->priv->author); + g_assert (desc->priv->icon); + g_assert (desc->priv->layout); + g_assert (desc->priv->hotkeys); + g_assert (desc->priv->symbol); + g_assert (desc->priv->setup); return desc; } @@ -344,4 +668,3 @@ ibus_engine_desc_new_from_xml_node (XMLNode *node) return desc; } - diff --git a/src/ibusenginedesc.h b/src/ibusenginedesc.h index df77400b3..928743e86 100644 --- a/src/ibusenginedesc.h +++ b/src/ibusenginedesc.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusenginedesc * @short_description: Input method engine description data. @@ -64,38 +70,34 @@ G_BEGIN_DECLS typedef struct _IBusEngineDesc IBusEngineDesc; +typedef struct _IBusEngineDescPrivate IBusEngineDescPrivate; typedef struct _IBusEngineDescClass IBusEngineDescClass; -typedef struct _BusComponent BusComponent; /** * IBusEngineDesc: - * @name: Name of the engine. - * @longname: Long name of the input method engine. - * @description: Input method engine description. - * @language: Language (e.g. zh, jp) supported by this input method engine. - * @license: License of the input method engine. - * @author: Author of the input method engine. - * @icon: Icon file of this engine. - * @layout: Keyboard layout - * @rank: Preference rank among engines, the highest ranked IME will put in - * the front. * * Input method engine description data. + * You can get extended values with g_object_get_properties. + * name: Name of the engine. + * longname: Long name of the input method engine. + * description: Input method engine description. + * language: Language (e.g. zh, jp) supported by this input method engine. + * license: License of the input method engine. + * author: Author of the input method engine. + * icon: Icon file of this engine. + * layout: Keyboard layout + * rank: Preference rank among engines, the highest ranked IME will put in + * the front. + * hotkeys: One or more hotkeys for switching to this engine, separated by + * semi-colon. */ struct _IBusEngineDesc { IBusSerializable parent; /* instance members */ /*< public >*/ - gchar *name; - gchar *longname; - gchar *description; - gchar *language; - gchar *license; - gchar *author; - gchar *icon; - gchar *layout; - guint rank; + /*< private >*/ + IBusEngineDescPrivate *priv; }; struct _IBusEngineDescClass { @@ -127,6 +129,21 @@ IBusEngineDesc *ibus_engine_desc_new (const gchar *name, const gchar *author, const gchar *icon, const gchar *layout); + +/** + * ibus_engine_desc_new_varargs: + * @first_property_name: Name of the first property. + * @Varargs: the NULL-terminated arguments of the properties and values. + * + * New a IBusEngineDesc. + * ibus_engine_desc_new_varargs() supports the va_list format. + * name property is required. e.g. + * ibus_engine_desc_new_varargs("name", "ibus-foo", "language", "us", NULL) + */ +IBusEngineDesc *ibus_engine_desc_new_varargs (const gchar *first_property_name, + ...); + + /** * ibus_engine_desc_new_from_xml_node: * @node: An XML node @@ -140,6 +157,115 @@ IBusEngineDesc *ibus_engine_desc_new (const gchar *name, */ IBusEngineDesc *ibus_engine_desc_new_from_xml_node (XMLNode *node); +/** + * ibus_engine_desc_get_name: + * @info: An IBusEngineDesc + * @returns: name property in IBusEngineDesc + * + * Return the name property in IBusEngineDesc. It should not be freed. + */ +const gchar *ibus_engine_desc_get_name (IBusEngineDesc *info); + +/** + * ibus_engine_desc_get_longname: + * @info: An IBusEngineDesc + * @returns: longname property in IBusEngineDesc + * + * Return the longname property in IBusEngineDesc. It should not be freed. + */ +const gchar *ibus_engine_desc_get_longname (IBusEngineDesc *info); + +/** + * ibus_engine_desc_get_description: + * @info: An IBusEngineDesc + * @returns: description property in IBusEngineDesc + * + * Return the description property in IBusEngineDesc. It should not be freed. + */ +const gchar *ibus_engine_desc_get_description + (IBusEngineDesc *info); + +/** + * ibus_engine_desc_get_language: + * @info: An IBusEngineDesc + * @returns: language property in IBusEngineDesc + * + * Return the language property in IBusEngineDesc. It should not be freed. + */ +const gchar *ibus_engine_desc_get_language (IBusEngineDesc *info); + +/** + * ibus_engine_desc_get_license: + * @info: An IBusEngineDesc + * @returns: license property in IBusEngineDesc + * + * Return the license property in IBusEngineDesc. It should not be freed. + */ +const gchar *ibus_engine_desc_get_license (IBusEngineDesc *info); + +/** + * ibus_engine_desc_get_author: + * @info: An IBusEngineDesc + * @returns: author property in IBusEngineDesc + * + * Return the author property in IBusEngineDesc. It should not be freed. + */ +const gchar *ibus_engine_desc_get_author (IBusEngineDesc *info); + +/** + * ibus_engine_desc_get_icon: + * @info: An IBusEngineDesc + * @returns: icon property in IBusEngineDesc + * + * Return the icon property in IBusEngineDesc. It should not be freed. + */ +const gchar *ibus_engine_desc_get_icon (IBusEngineDesc *info); + +/** + * ibus_engine_desc_get_layout: + * @info: An IBusEngineDesc + * @returns: layout property in IBusEngineDesc + * + * Return the layout property in IBusEngineDesc. It should not be freed. + */ +const gchar *ibus_engine_desc_get_layout (IBusEngineDesc *info); + +/** + * ibus_engine_desc_get_rank: + * @info: An IBusEngineDesc + * @returns: rank property in IBusEngineDesc + * + * Return the rank property in IBusEngineDesc. + */ +guint ibus_engine_desc_get_rank (IBusEngineDesc *info); + +/** + * ibus_engine_desc_get_hotkeys: + * @info: An IBusEngineDesc + * @returns: hotkeys property in IBusEngineDesc + * + * Return the hotkeys property in IBusEngineDesc. It should not be freed. + */ +const gchar *ibus_engine_desc_get_hotkeys (IBusEngineDesc *info); + +/** + * ibus_engine_desc_get_symbol: + * @info: An IBusEngineDesc + * @returns: symbol property in IBusEngineDesc + * + * Return the symbol property in IBusEngineDesc. It should not be freed. + */ +const gchar *ibus_engine_desc_get_symbol (IBusEngineDesc *info); + +/** + * ibus_engine_desc_get_setup: + * @info: An IBusEngineDesc + * @returns: setup property in IBusEngineDesc + * + * Return the setup property in IBusEngineDesc. It should not be freed. + */ +const gchar *ibus_engine_desc_get_setup (IBusEngineDesc *info); + /** * ibus_engine_desc_output: * @info: An IBusEngineDesc @@ -154,4 +280,3 @@ void ibus_engine_desc_output (IBusEngineDesc *info, gint indent); G_END_DECLS #endif - diff --git a/src/ibusenginesimple.c b/src/ibusenginesimple.c new file mode 100644 index 000000000..d38612418 --- /dev/null +++ b/src/ibusenginesimple.c @@ -0,0 +1,910 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "ibusenginesimple.h" + +#include "ibuskeys.h" +#include "ibuskeysyms.h" + +#include +#include + +#define IBUS_ENGINE_SIMPLE_GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_ENGINE_SIMPLE, IBusEngineSimplePrivate)) + +typedef struct _IBusComposeTable IBusComposeTable; +struct _IBusComposeTable +{ + const guint16 *data; + gint max_seq_len; + gint n_seqs; +}; + +typedef struct _IBusComposeTableCompact IBusComposeTableCompact; +struct _IBusComposeTableCompact +{ + const guint16 *data; + gint max_seq_len; + gint n_index_size; + gint n_index_stride; +}; + + +typedef struct _IBusEngineSimplePrivate IBusEngineSimplePrivate; +struct _IBusEngineSimplePrivate { + GSList *tables; + guint compose_buffer[IBUS_MAX_COMPOSE_LEN + 1]; + gunichar tentative_match; + gint tentative_match_len; + + guint in_hex_sequence : 1; + guint modifiers_dropped : 1; +}; + +/* This file contains the table of the compose sequences, + * static const guint16 ibus_compose_seqs_compact[] = {} + * IT is generated from the compose-parse.py script. + */ +#include "gtkimcontextsimpleseqs.h" + +/* From the values below, the value 24 means the number of different first keysyms + * that exist in the Compose file (from Xorg). When running compose-parse.py without + * parameters, you get the count that you can put here. Needed when updating the + * gtkimcontextsimpleseqs.h header file (contains the compose sequences). + */ +static const IBusComposeTableCompact ibus_compose_table_compact = { + gtk_compose_seqs_compact, + 5, + 24, + 6 +}; + +static const guint16 ibus_compose_ignore[] = { + IBUS_KEY_Shift_L, + IBUS_KEY_Shift_R, + IBUS_KEY_Control_L, + IBUS_KEY_Control_R, + IBUS_KEY_Caps_Lock, + IBUS_KEY_Shift_Lock, + IBUS_KEY_Meta_L, + IBUS_KEY_Meta_R, + IBUS_KEY_Alt_L, + IBUS_KEY_Alt_R, + IBUS_KEY_Super_L, + IBUS_KEY_Super_R, + IBUS_KEY_Hyper_L, + IBUS_KEY_Hyper_R, + IBUS_KEY_Mode_switch, + IBUS_KEY_ISO_Level3_Shift +}; + +/* functions prototype */ +static void ibus_engine_simple_destroy (IBusEngineSimple *simple); +static void ibus_engine_simple_reset (IBusEngine *engine); +static gboolean ibus_engine_simple_process_key_event + (IBusEngine *engine, + guint keyval, + guint keycode, + guint modifiers); +static void ibus_engine_simple_commit_char (IBusEngineSimple *simple, + gunichar ch); +static void ibus_engine_simple_update_preedit_text + (IBusEngineSimple *simple); + +G_DEFINE_TYPE (IBusEngineSimple, ibus_engine_simple, IBUS_TYPE_ENGINE) + +static void +ibus_engine_simple_class_init (IBusEngineSimpleClass *class) +{ + IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class); + IBusEngineClass *engine_class = IBUS_ENGINE_CLASS (class); + + ibus_object_class->destroy = + (IBusObjectDestroyFunc) ibus_engine_simple_destroy; + + engine_class->reset = ibus_engine_simple_reset; + engine_class->process_key_event + = ibus_engine_simple_process_key_event; + + g_type_class_add_private (class, sizeof (IBusEngineSimplePrivate)); +} + +static void +ibus_engine_simple_init (IBusEngineSimple *simple) +{ + simple->priv = IBUS_ENGINE_SIMPLE_GET_PRIVATE (simple); +} + + +static void +ibus_engine_simple_destroy (IBusEngineSimple *simple) +{ + IBusEngineSimplePrivate *priv = simple->priv; + + g_slist_free_full (priv->tables, g_free); + priv->tables = NULL; + + IBUS_OBJECT_CLASS(ibus_engine_simple_parent_class)->destroy ( + IBUS_OBJECT (simple)); +} + +static void +ibus_engine_simple_reset (IBusEngine *engine) +{ + IBusEngineSimple *simple = (IBusEngineSimple *)engine; + IBusEngineSimplePrivate *priv = simple->priv; + + priv->compose_buffer[0] = 0; + + if (priv->tentative_match || priv->in_hex_sequence) { + priv->in_hex_sequence = FALSE; + priv->tentative_match = 0; + priv->tentative_match_len = 0; + ibus_engine_hide_preedit_text ((IBusEngine *)simple); + } +} + +static void +ibus_engine_simple_commit_char (IBusEngineSimple *simple, + gunichar ch) +{ + g_return_if_fail (g_unichar_validate (ch)); + + IBusEngineSimplePrivate *priv = simple->priv; + + if (priv->tentative_match || priv->in_hex_sequence) { + priv->in_hex_sequence = FALSE; + priv->tentative_match = 0; + priv->tentative_match_len = 0; + ibus_engine_simple_update_preedit_text (simple); + } + + ibus_engine_commit_text ((IBusEngine *)simple, + ibus_text_new_from_unichar (ch)); +} + +static void +ibus_engine_simple_update_preedit_text (IBusEngineSimple *simple) +{ + IBusEngineSimplePrivate *priv = simple->priv; + + gunichar outbuf[IBUS_MAX_COMPOSE_LEN + 2]; + int len = 0; + + if (priv->in_hex_sequence) { + int hexchars = 0; + + outbuf[0] = L'u'; + len = 1; + + while (priv->compose_buffer[hexchars] != 0) { + outbuf[len] = ibus_keyval_to_unicode ( + priv->compose_buffer[hexchars]); + ++len; + ++hexchars; + } + g_assert (len <= IBUS_MAX_COMPOSE_LEN + 1); + } + else if (priv->tentative_match) + outbuf[len++] = priv->tentative_match; + + outbuf[len] = L'\0'; + if (len == 0) { + ibus_engine_hide_preedit_text ((IBusEngine *)simple); + } + else { + IBusText *text = ibus_text_new_from_ucs4 (outbuf); + ibus_text_append_attribute (text, + IBUS_ATTR_TYPE_UNDERLINE, IBUS_ATTR_UNDERLINE_SINGLE, 0, len); + ibus_engine_update_preedit_text ((IBusEngine *)simple, text, len, TRUE); + } +} + + +/* In addition to the table-driven sequences, we allow Unicode hex + * codes to be entered. The method chosen here is similar to the + * one recommended in ISO 14755, but not exactly the same, since we + * don't want to steal 16 valuable key combinations. + * + * A hex Unicode sequence must be started with Ctrl-Shift-U, followed + * by a sequence of hex digits entered with Ctrl-Shift still held. + * Releasing one of the modifiers or pressing space while the modifiers + * are still held commits the character. It is possible to erase + * digits using backspace. + * + * As an extension to the above, we also allow to start the sequence + * with Ctrl-Shift-U, then release the modifiers before typing any + * digits, and enter the digits without modifiers. + */ +#define HEX_MOD_MASK (IBUS_CONTROL_MASK | IBUS_SHIFT_MASK) + +static gboolean +check_hex (IBusEngineSimple *simple, + gint n_compose) +{ + IBusEngineSimplePrivate *priv = simple->priv; + + gint i; + GString *str; + gulong n; + gchar *nptr = NULL; + gchar buf[7]; + + priv->tentative_match = 0; + priv->tentative_match_len = 0; + + str = g_string_new (NULL); + + i = 0; + while (i < n_compose) { + gunichar ch; + + ch = ibus_keyval_to_unicode (priv->compose_buffer[i]); + + if (ch == 0) + return FALSE; + + if (!g_unichar_isxdigit (ch)) + return FALSE; + + buf[g_unichar_to_utf8 (ch, buf)] = '\0'; + + g_string_append (str, buf); + + ++i; + } + + n = strtoul (str->str, &nptr, 16); + + /* if strtoul fails it probably means non-latin digits were used; + * we should in principle handle that, but we probably don't. + */ + if (nptr - str->str < str->len) { + g_string_free (str, TRUE); + return FALSE; + } else + g_string_free (str, TRUE); + + if (g_unichar_validate (n)) { + priv->tentative_match = n; + priv->tentative_match_len = n_compose; + } + + return TRUE; +} + +static int +compare_seq_index (const void *key, const void *value) +{ + const guint *keysyms = key; + const guint16 *seq = value; + + if (keysyms[0] < seq[0]) + return -1; + else if (keysyms[0] > seq[0]) + return 1; + return 0; +} + +static int +compare_seq (const void *key, const void *value) +{ + int i = 0; + const guint *keysyms = key; + const guint16 *seq = value; + + while (keysyms[i]) { + if (keysyms[i] < seq[i]) + return -1; + else if (keysyms[i] > seq[i]) + return 1; + + i++; + } + + return 0; +} + + +static gboolean +check_table (IBusEngineSimple *simple, + IBusComposeTable *table, + gint n_compose) +{ + // g_debug("check_table"); + IBusEngineSimplePrivate *priv = simple->priv; + gint row_stride = table->max_seq_len + 2; + guint16 *seq; + + g_assert (IBUS_IS_ENGINE_SIMPLE (simple)); + + if (n_compose > table->max_seq_len) + return FALSE; + + seq = bsearch (priv->compose_buffer, + table->data, table->n_seqs, + sizeof (guint16) * row_stride, + compare_seq); + + if (seq == NULL) + return FALSE; + + guint16 *prev_seq; + + /* Back up to the first sequence that matches to make sure + * we find the exact match if their is one. + */ + while (seq > table->data) { + prev_seq = seq - row_stride; + if (compare_seq (priv->compose_buffer, prev_seq) != 0) { + break; + } + seq = prev_seq; + } + + /* complete sequence */ + if (n_compose == table->max_seq_len || seq[n_compose] == 0) { + guint16 *next_seq; + gunichar value = + 0x10000 * seq[table->max_seq_len] + seq[table->max_seq_len + 1]; + + /* We found a tentative match. See if there are any longer + * sequences containing this subsequence + */ + next_seq = seq + row_stride; + if (next_seq < table->data + row_stride * table->n_seqs) { + if (compare_seq (priv->compose_buffer, next_seq) == 0) { + priv->tentative_match = value; + priv->tentative_match_len = n_compose; + + ibus_engine_simple_update_preedit_text (simple); + + return TRUE; + } + } + + ibus_engine_simple_commit_char (simple, value); + // g_debug ("U+%04X\n", value); + priv->compose_buffer[0] = 0; + } + return TRUE; +} + +static gboolean +check_compact_table (IBusEngineSimple *simple, + const IBusComposeTableCompact *table, + gint n_compose) +{ + IBusEngineSimplePrivate *priv = simple->priv; + + gint row_stride; + guint16 *seq_index; + guint16 *seq; + gint i; + + /* Will never match, if the sequence in the compose buffer is longer + * than the sequences in the table. Further, compare_seq (key, val) + * will overrun val if key is longer than val. */ + if (n_compose > table->max_seq_len) + return FALSE; + + // g_debug ("check_compact_table(n_compose=%d) [%04x, %04x, %04x, %04x]", + // n_compose, + // priv->compose_buffer[0], + // priv->compose_buffer[1], + // priv->compose_buffer[2], + // priv->compose_buffer[3]); + + seq_index = bsearch (priv->compose_buffer, + table->data, + table->n_index_size, + sizeof (guint16) * table->n_index_stride, + compare_seq_index); + + if (seq_index == NULL) { + // g_debug ("compact: no\n"); + return FALSE; + } + + if (n_compose == 1) { + // g_debug ("compact: yes\n"); + return TRUE; + } + + // g_debug ("compact: %04x ", *seq_index); + seq = NULL; + + for (i = n_compose - 1; i < table->max_seq_len; i++) { + row_stride = i + 1; + + if (seq_index[i + 1] - seq_index[i] > 0) { + seq = bsearch (priv->compose_buffer + 1, + table->data + seq_index[i], + (seq_index[i + 1] - seq_index[i]) / row_stride, + sizeof (guint16) * row_stride, + compare_seq); + // g_debug ("seq = %p", seq); + + if (seq) { + if (i == n_compose - 1) + break; + else { + ibus_engine_simple_update_preedit_text (simple); + // g_debug ("yes\n"); + return TRUE; + } + } + } + } + + if (!seq) { + // g_debug ("no\n"); + return FALSE; + } + else { + gunichar value; + + value = seq[row_stride - 1]; + ibus_engine_simple_commit_char (simple, value); + priv->compose_buffer[0] = 0; + + // g_debug ("U+%04X\n", value); + return TRUE; + } +} + +/* Checks if a keysym is a dead key. Dead key keysym values are defined in + * ../gdk/gdkkeysyms.h and the first is GDK_KEY_dead_grave. As X.Org is updated, + * more dead keys are added and we need to update the upper limit. + * Currently, the upper limit is GDK_KEY_dead_dasia+1. The +1 has to do with + * a temporary issue in the X.Org header files. + * In future versions it will be just the keysym (no +1). + */ +#define IS_DEAD_KEY(k) \ + ((k) >= IBUS_KEY_dead_grave && (k) <= (IBUS_KEY_dead_dasia + 1)) + +/* This function receives a sequence of Unicode characters and tries to + * normalize it (NFC). We check for the case the the resulting string + * has length 1 (single character). + * NFC normalisation normally rearranges diacritic marks, unless these + * belong to the same Canonical Combining Class. + * If they belong to the same canonical combining class, we produce all + * permutations of the diacritic marks, then attempt to normalize. + */ +static gboolean +check_normalize_nfc (gunichar* combination_buffer, gint n_compose) +{ + gunichar combination_buffer_temp[IBUS_MAX_COMPOSE_LEN]; + gchar *combination_utf8_temp = NULL; + gchar *nfc_temp = NULL; + gint n_combinations; + gunichar temp_swap; + gint i; + + n_combinations = 1; + + for (i = 1; i < n_compose; i++ ) + n_combinations *= i; + + /* Xorg reuses dead_tilde for the perispomeni diacritic mark. + * We check if base character belongs to Greek Unicode block, + * and if so, we replace tilde with perispomeni. */ + if (combination_buffer[0] >= 0x390 && combination_buffer[0] <= 0x3FF) { + for (i = 1; i < n_compose; i++ ) + if (combination_buffer[i] == 0x303) + combination_buffer[i] = 0x342; + } + + memcpy (combination_buffer_temp, + combination_buffer, + IBUS_MAX_COMPOSE_LEN * sizeof (gunichar) ); + + for (i = 0; i < n_combinations; i++ ) { + g_unicode_canonical_ordering (combination_buffer_temp, n_compose); + combination_utf8_temp = g_ucs4_to_utf8 (combination_buffer_temp, -1, NULL, NULL, NULL); + nfc_temp = g_utf8_normalize (combination_utf8_temp, -1, G_NORMALIZE_NFC); + + if (g_utf8_strlen (nfc_temp, -1) == 1) { + memcpy (combination_buffer, + combination_buffer_temp, + IBUS_MAX_COMPOSE_LEN * sizeof (gunichar) ); + + g_free (combination_utf8_temp); + g_free (nfc_temp); + + return TRUE; + } + + g_free (combination_utf8_temp); + g_free (nfc_temp); + + if (n_compose > 2) { + temp_swap = combination_buffer_temp[i % (n_compose - 1) + 1]; + combination_buffer_temp[i % (n_compose - 1) + 1] = combination_buffer_temp[(i+1) % (n_compose - 1) + 1]; + combination_buffer_temp[(i+1) % (n_compose - 1) + 1] = temp_swap; + } + else + break; + } + + return FALSE; +} + +static gboolean +check_algorithmically (IBusEngineSimple *simple, + gint n_compose) + +{ + IBusEngineSimplePrivate *priv = simple->priv; + + gint i; + gunichar combination_buffer[IBUS_MAX_COMPOSE_LEN]; + gchar *combination_utf8, *nfc; + + if (n_compose >= IBUS_MAX_COMPOSE_LEN) + return FALSE; + + for (i = 0; i < n_compose && IS_DEAD_KEY (priv->compose_buffer[i]); i++) + ; + if (i == n_compose) + return TRUE; + + if (i > 0 && i == n_compose - 1) { + combination_buffer[0] = ibus_keyval_to_unicode (priv->compose_buffer[i]); + combination_buffer[n_compose] = 0; + i--; + while (i >= 0) { + switch (priv->compose_buffer[i]) { +#define CASE(keysym, unicode) \ + case IBUS_KEY_dead_##keysym: \ + combination_buffer[i+1] = unicode; \ + break + CASE (grave, 0x0300); + CASE (acute, 0x0301); + CASE (circumflex, 0x0302); + CASE (tilde, 0x0303); /* Also used with perispomeni, 0x342. */ + CASE (macron, 0x0304); + CASE (breve, 0x0306); + CASE (abovedot, 0x0307); + CASE (diaeresis, 0x0308); + CASE (hook, 0x0309); + CASE (abovering, 0x030A); + CASE (doubleacute, 0x030B); + CASE (caron, 0x030C); + CASE (abovecomma, 0x0313); /* Equivalent to psili */ + CASE (abovereversedcomma, 0x0314); /* Equivalent to dasia */ + CASE (horn, 0x031B); /* Legacy use for psili, 0x313 (or 0x343). */ + CASE (belowdot, 0x0323); + CASE (cedilla, 0x0327); + CASE (ogonek, 0x0328); /* Legacy use for dasia, 0x314.*/ + CASE (iota, 0x0345); + CASE (voiced_sound, 0x3099); /* Per Markus Kuhn keysyms.txt file. */ + CASE (semivoiced_sound, 0x309A); /* Per Markus Kuhn keysyms.txt file. */ + + /* The following cases are to be removed once xkeyboard-config, + * xorg are fully updated. + */ + /* Workaround for typo in 1.4.x xserver-xorg */ + case 0xfe66: combination_buffer[i+1] = 0x314; break; + /* CASE (dasia, 0x314); */ + /* CASE (perispomeni, 0x342); */ + /* CASE (psili, 0x343); */ +#undef CASE + default: + combination_buffer[i+1] = ibus_keyval_to_unicode (priv->compose_buffer[i]); + } + i--; + } + + /* If the buffer normalizes to a single character, + * then modify the order of combination_buffer accordingly, if necessary, + * and return TRUE. + */ + if (check_normalize_nfc (combination_buffer, n_compose)) { + gunichar value; + combination_utf8 = g_ucs4_to_utf8 (combination_buffer, -1, NULL, NULL, NULL); + nfc = g_utf8_normalize (combination_utf8, -1, G_NORMALIZE_NFC); + + value = g_utf8_get_char (nfc); + ibus_engine_simple_commit_char (simple, value); + priv->compose_buffer[0] = 0; + + g_free (combination_utf8); + g_free (nfc); + + return TRUE; + } + } + + return FALSE; +} + +static gboolean +no_sequence_matches (IBusEngineSimple *simple, + gint n_compose, + guint keyval, + guint keycode, + guint modifiers) +{ + IBusEngineSimplePrivate *priv = simple->priv; + + gunichar ch; + + /* No compose sequences found, check first if we have a partial + * match pending. + */ + if (priv->tentative_match) { + gint len = priv->tentative_match_len; + int i; + + ibus_engine_simple_commit_char (simple, + priv->tentative_match); + priv->compose_buffer[0] = 0; + + for (i=0; i < n_compose - len - 1; i++) { + ibus_engine_simple_process_key_event ( + (IBusEngine *)simple, + priv->compose_buffer[len + i], + 0, 0); + } + + return ibus_engine_simple_process_key_event ( + (IBusEngine *)simple, keyval, keycode, modifiers); + } + else { + priv->compose_buffer[0] = 0; + if (n_compose > 1) { + /* Invalid sequence */ + // FIXME beep_window (event->window); + return TRUE; + } + + ch = ibus_keyval_to_unicode (keyval); + if (ch != 0 && !g_unichar_iscntrl (ch)) { + ibus_engine_simple_commit_char (simple, ch); + return TRUE; + } + else + return FALSE; + } +} + +static gboolean +ibus_engine_simple_process_key_event (IBusEngine *engine, + guint keyval, + guint keycode, + guint modifiers) +{ + IBusEngineSimple *simple = (IBusEngineSimple *)engine; + IBusEngineSimplePrivate *priv = simple->priv; + gint n_compose = 0; + gboolean have_hex_mods; + gboolean is_hex_start; + gboolean is_hex_end; + gboolean is_backspace; + gboolean is_escape; + guint hex_keyval; + gint i; + + while (priv->compose_buffer[n_compose] != 0) + n_compose++; + + if (n_compose >= IBUS_MAX_COMPOSE_LEN) + return TRUE; + + if (modifiers & IBUS_RELEASE_MASK) { + if (priv->in_hex_sequence && + (keyval == IBUS_KEY_Control_L || keyval == IBUS_KEY_Control_R || + keyval == IBUS_KEY_Shift_L || keyval == IBUS_KEY_Shift_R)) { + if (priv->tentative_match && + g_unichar_validate (priv->tentative_match)) { + ibus_engine_simple_commit_char (simple, + priv->tentative_match); + } + else if (n_compose == 0) { + priv->modifiers_dropped = TRUE; + } + else { + /* invalid hex sequence */ + /* FIXME beep_window (event->window); */ + priv->tentative_match = 0; + priv->in_hex_sequence = FALSE; + priv->compose_buffer[0] = 0; + + ibus_engine_simple_update_preedit_text (simple); + } + + return TRUE; + } + else + return FALSE; + } + + /* Ignore modifier key presses */ + for (i = 0; i < G_N_ELEMENTS (ibus_compose_ignore); i++) + if (keyval == ibus_compose_ignore[i]) + return FALSE; + + if (priv->in_hex_sequence && priv->modifiers_dropped) + have_hex_mods = TRUE; + else + have_hex_mods = (modifiers & (HEX_MOD_MASK)) == HEX_MOD_MASK; + + is_hex_start = keyval == IBUS_KEY_U; + is_hex_end = (keyval == IBUS_KEY_space || + keyval == IBUS_KEY_KP_Space || + keyval == IBUS_KEY_Return || + keyval == IBUS_KEY_ISO_Enter || + keyval == IBUS_KEY_KP_Enter); + is_backspace = keyval == IBUS_KEY_BackSpace; + is_escape = keyval == IBUS_KEY_Escape; + hex_keyval = keyval; + + /* If we are already in a non-hex sequence, or + * this keystroke is not hex modifiers + hex digit, don't filter + * key events with accelerator modifiers held down. We only treat + * Control and Alt as accel modifiers here, since Super, Hyper and + * Meta are often co-located with Mode_Switch, Multi_Key or + * ISO_Level3_Switch. + */ + if (!have_hex_mods || + (n_compose > 0 && !priv->in_hex_sequence) || + (n_compose == 0 && !priv->in_hex_sequence && !is_hex_start) || + (priv->in_hex_sequence && !hex_keyval && + !is_hex_start && !is_hex_end && !is_escape && !is_backspace)) { + if (modifiers & (IBUS_MOD1_MASK | IBUS_CONTROL_MASK) || + (priv->in_hex_sequence && priv->modifiers_dropped && + (keyval == IBUS_KEY_Return || + keyval == IBUS_KEY_ISO_Enter || + keyval == IBUS_KEY_KP_Enter))) { + return FALSE; + } + } + + /* Handle backspace */ + if (priv->in_hex_sequence && have_hex_mods && is_backspace) { + if (n_compose > 0) { + n_compose--; + priv->compose_buffer[n_compose] = 0; + check_hex (simple, n_compose); + } + else { + priv->in_hex_sequence = FALSE; + } + + ibus_engine_simple_update_preedit_text (simple); + + return TRUE; + } + + /* Check for hex sequence restart */ + if (priv->in_hex_sequence && have_hex_mods && is_hex_start) { + if (priv->tentative_match && + g_unichar_validate (priv->tentative_match)) { + ibus_engine_simple_commit_char (simple, priv->tentative_match); + } + else { + /* invalid hex sequence */ + if (n_compose > 0) { + // FIXME beep_window (event->window); + priv->tentative_match = 0; + priv->in_hex_sequence = FALSE; + priv->compose_buffer[0] = 0; + } + } + } + + /* Check for hex sequence start */ + if (!priv->in_hex_sequence && have_hex_mods && is_hex_start) { + priv->compose_buffer[0] = 0; + priv->in_hex_sequence = TRUE; + priv->modifiers_dropped = FALSE; + priv->tentative_match = 0; + + // g_debug ("Start HEX MODE"); + + ibus_engine_simple_update_preedit_text (simple); + + return TRUE; + } + + /* Then, check for compose sequences */ + if (priv->in_hex_sequence) { + if (hex_keyval) + priv->compose_buffer[n_compose++] = hex_keyval; + else if (is_escape) { + // FIXME + ibus_engine_simple_reset (engine); + + return TRUE; + } + else if (!is_hex_end) { + // FIXME + /* non-hex character in hex sequence */ + // beep_window (event->window); + return TRUE; + } + } + else + priv->compose_buffer[n_compose++] = keyval; + + priv->compose_buffer[n_compose] = 0; + + if (priv->in_hex_sequence) { + /* If the modifiers are still held down, consider the sequence again */ + if (have_hex_mods) { + /* space or return ends the sequence, and we eat the key */ + if (n_compose > 0 && is_hex_end) { + if (priv->tentative_match && + g_unichar_validate (priv->tentative_match)) { + ibus_engine_simple_commit_char (simple, + priv->tentative_match); + priv->compose_buffer[0] = 0; + } + else { + // FIXME + /* invalid hex sequence */ + // beep_window (event->window); + priv->tentative_match = 0; + priv->in_hex_sequence = FALSE; + priv->compose_buffer[0] = 0; + } + } + else if (!check_hex (simple, n_compose)) + // FIXME + // beep_window (event->window); + ; + ibus_engine_simple_update_preedit_text (simple); + + return TRUE; + } + } + else { + GSList *list = priv->tables; + while (list) { + if (check_table (simple, + (IBusComposeTable *)list->data, + n_compose)) { + // g_debug("check_table returns true"); + return TRUE; + } + list = list->next; + } + + if (check_compact_table (simple, + &ibus_compose_table_compact, + n_compose)) { + return TRUE; + } + + if (check_algorithmically (simple, n_compose)) + return TRUE; + } + + /* The current compose_buffer doesn't match anything */ + return no_sequence_matches (simple, n_compose, keyval, keycode, modifiers); +} + +void +ibus_engine_simple_add_table (IBusEngineSimple *simple, + guint16 *data, + gint max_seq_len, + gint n_seqs) +{ + IBusEngineSimplePrivate *priv = simple->priv; + + g_return_if_fail (IBUS_IS_ENGINE_SIMPLE (simple)); + g_return_if_fail (data != NULL); + g_return_if_fail (max_seq_len <= IBUS_MAX_COMPOSE_LEN); + + IBusComposeTable *table = g_new (IBusComposeTable, 1); + table->data = data; + table->max_seq_len = max_seq_len; + table->n_seqs = n_seqs; + + priv->tables = g_slist_prepend (priv->tables, table); + +} diff --git a/src/ibusenginesimple.h b/src/ibusenginesimple.h new file mode 100644 index 000000000..d5e579594 --- /dev/null +++ b/src/ibusenginesimple.h @@ -0,0 +1,119 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* ibus - The Input Bus + * Copyright (C) 2008-2010 Peng Huang + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + +/** + * SECTION: ibussimpleengine + * @short_description: Input method engine supporting table-based input method + * @title: IBusEngineSimple + * @stability: Stable + * + * An IBusEngineSimple provides table-based input method logic. + * + * @see_also: #IBusEngine + */ +#ifndef __IBUS_ENGINE_SIMPLE_H__ +#define __IBUS_ENGINE_SIMPLE_H__ + +#include "ibusengine.h" + +G_BEGIN_DECLS + +#define IBUS_MAX_COMPOSE_LEN 7 + +/* + * Type macros. + */ + +/* define GOBJECT macros */ +#define IBUS_TYPE_ENGINE_SIMPLE \ + (ibus_engine_simple_get_type ()) +#define IBUS_ENGINE_SIMPLE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_ENGINE_SIMPLE, IBusEngineSimple)) +#define IBUS_ENGINE_SIMPLE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_ENGINE_SIMPLE, IBusEngineSimpleClass)) +#define IBUS_IS_ENGINE_SIMPLE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_ENGINE_SIMPLE)) +#define IBUS_IS_ENGINE_SIMPLE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_ENGINE_SIMPLE)) +#define IBUS_ENGINE_SIMPLE_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_ENGINE_SIMPLE, IBusEngineSimpleClass)) + +typedef struct _IBusEngineSimple IBusEngineSimple; +typedef struct _IBusEngineSimpleClass IBusEngineSimpleClass; +typedef struct _IBusEngineSimplePrivate IBusEngineSimplePrivate; + +/** + * IBusEngineSimple: + * + * IBusEngineSimple properties. + */ +struct _IBusEngineSimple { + /*< private >*/ + IBusEngine parent; + IBusEngineSimplePrivate *priv; + + /* instance members */ + /*< public >*/ +}; + +struct _IBusEngineSimpleClass { + /*< private >*/ + IBusEngineClass parent; + + /* class members */ + /*< public >*/ + /* signals */ + + /*< private >*/ + /* padding */ + gpointer pdummy[8]; +}; + +GType ibus_engine_simple_get_type (void); + +/** + * ibus_engine_simple_add_table: + * @simple: An IBusEngineSimple. + * @data: The table. + * @ max_seq_len: Maximum length of a swquence in the table (cannot be greater + * than %IBUS_MAX_COMPOSE_LEN) + * + * Adds an additional table to search to the engine. Each row of the table + * consists of max_seq_len key symbols followed by two guint16 interpreted as + * the high and low words of a gunicode value. Tables are searched starting from + * the last added. + * + * The table must be sorted in dictionary order on the numeric value of the key + * symbol fields. (Values beyond the length of the sequence should be zero.) + */ +void ibus_engine_simple_add_table (IBusEngineSimple *simple, + guint16 *data, + gint max_seq_len, + gint n_seqs); + +G_END_DECLS + +#endif // __IBUS_ENGINE_SIMPLE_H__ diff --git a/src/ibuserror.c b/src/ibuserror.c index 1d46493f1..c50c164ae 100644 --- a/src/ibuserror.c +++ b/src/ibuserror.c @@ -1,7 +1,7 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus - * Copyright (C) 2008-2010 Peng Huang - * Copyright (C) 2008-2010 Red Hat, Inc. + * Copyright (C) 2011 Peng Huang * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,72 +18,24 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include -#include "ibuserror.h" - -IBusError * -ibus_error_new (void) -{ - IBusError *error; - - error = g_slice_new0 (IBusError); - dbus_error_init (error); - - return error; -} -IBusError * -ibus_error_new_from_text (const gchar *name, - const gchar *message) -{ - IBusError *error = ibus_error_new (); - - dbus_set_error (error, name, "%s", message); - - return error; -} - -IBusError * -ibus_error_new_from_printf (const gchar *name, - const gchar *format_message, - ...) -{ - IBusError *error; - gchar *message; - va_list va_args; - - va_start (va_args, format_message); - message = g_strdup_vprintf (format_message, va_args); - - error = ibus_error_new_from_text (name, message); - g_free (message); +#include "ibuserror.h" - return error; -} +#include +#include "ibustypes.h" -IBusError * -ibus_error_new_from_message (DBusMessage *message) +static const GDBusErrorEntry ibus_error_entries[] = { - g_assert (message != NULL); - - IBusError *error; - - if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_ERROR) - return NULL; + { IBUS_ERROR_NO_ENGINE, "org.freedesktop.IBus.Error.NoEngine" }, +}; - error = ibus_error_new (); - - if (dbus_set_error_from_message (error, message)) - return error; - - dbus_error_free (error); - return NULL; -} - -void -ibus_error_free (IBusError *error) +GQuark +ibus_error_quark (void) { - dbus_error_free (error); - g_slice_free (IBusError, error); + static volatile gsize quark_volatile = 0; + g_dbus_error_register_error_domain ("ibus-error-quark", + &quark_volatile, + ibus_error_entries, + G_N_ELEMENTS (ibus_error_entries)); + return (GQuark) quark_volatile; } - diff --git a/src/ibuserror.h b/src/ibuserror.h index e35b4b41e..75c64b908 100644 --- a/src/ibuserror.h +++ b/src/ibuserror.h @@ -1,7 +1,7 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus - * Copyright (C) 2008-2010 Peng Huang - * Copyright (C) 2008-2010 Red Hat, Inc. + * Copyright (C) 2011 Peng Huang * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,81 +18,29 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** - * SECTION: ibuserror - * @short_description: Error message output. + * SECTION: ibusshare + * @short_description: Shared utility functions and definition. * @stability: Stable * - * An IBusError is actually a #DBusError. - * Functions listed here are convenient wrapper for IBusError new and free. + * This file defines some utility functions and definition + * which are shared among ibus component and services. */ + #ifndef __IBUS_ERROR_H_ #define __IBUS_ERROR_H_ #include -#include "ibusdbus.h" G_BEGIN_DECLS -/** - * IBusError: - * - * A data type representing an IBusError. - * An IBusError is actually a #DBusError. - * - * @see_also: #DBusError for detail structure definition. - */ -typedef DBusError IBusError; - -/** - * ibus_error_new: - * @returns: A newly allocated IBusError. - * - * New an empty IBusError. - */ -IBusError *ibus_error_new (void); - -/** - * ibus_error_new_from_text: - * @name: The error name. - * @message: Detailed error message. - * @returns: A newly allocated IBusError. - * - * New an IBusError from error name and message. - */ -IBusError *ibus_error_new_from_text (const gchar *name, - const gchar *message); - -/** - * ibus_error_new_from_printf: - * @name: The error name. - * @format_message: printf() formatted error message. - * @...: Formatting parameters. - * @returns: A newly allocated IBusError. - * - * New an IBusError from error name and a printf-formatted message. - */ -IBusError *ibus_error_new_from_printf (const gchar *name, - const gchar *format_message, - ...); - -/** - * ibus_error_new_from_message: - * @message: A DBusMessage - * @returns: A newly allocated IBusError. - * - * New an IBusError from a #IBusMessage. - */ -IBusError *ibus_error_new_from_message - (DBusMessage *message); - -/** - * ibus_error_free: - * @error: An IBusError - * - * Free an IBusError. - */ -void ibus_error_free (IBusError *error); +#define IBUS_ERROR ibus_error_quark() +GQuark ibus_error_quark (void); G_END_DECLS #endif diff --git a/src/ibusfactory.c b/src/ibusfactory.c index e0ec2a5e8..d6d12311e 100644 --- a/src/ibusfactory.c +++ b/src/ibusfactory.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,9 +19,9 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include #include "ibusfactory.h" #include "ibusengine.h" +#include "ibusmarshalers.h" #include "ibusshare.h" #include "ibusinternal.h" @@ -28,127 +29,184 @@ (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_FACTORY, IBusFactoryPrivate)) enum { + CREATE_ENGINE, LAST_SIGNAL, }; enum { PROP_0, - PROP_CONNECTION, }; /* IBusFactoryPriv */ struct _IBusFactoryPrivate { guint id; - IBusConnection *connection; GList *engine_list; GHashTable *engine_table; }; -typedef struct _IBusFactoryPrivate IBusFactoryPrivate; + +static guint factory_signals[LAST_SIGNAL] = { 0 }; /* functions prototype */ -static void ibus_factory_destroy (IBusFactory *factory); -static void ibus_factory_set_property (IBusFactory *engine, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void ibus_factory_get_property (IBusFactory *factory, - guint prop_id, - GValue *value, - GParamSpec *pspec); - -static gboolean ibus_factory_ibus_message (IBusFactory *factory, - IBusConnection *connection, - IBusMessage *message); - -static void _engine_destroy_cb (IBusEngine *engine, - IBusFactory *factory); +static void ibus_factory_destroy (IBusFactory *factory); +static void ibus_factory_set_property (IBusFactory *engine, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void ibus_factory_get_property (IBusFactory *factory, + guint prop_id, + GValue *value, + GParamSpec *pspec); +static void ibus_factory_service_method_call + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation + *invocation); +static GVariant *ibus_factory_service_get_property + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error); +static gboolean ibus_factory_service_set_property + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error); +static void ibus_factory_engine_destroy_cb + (IBusEngine *engine, + IBusFactory *factory); G_DEFINE_TYPE (IBusFactory, ibus_factory, IBUS_TYPE_SERVICE) -IBusFactory * -ibus_factory_new (IBusConnection *connection) +static const gchar introspection_xml[] = + "" + " " + " " + " " + " " + " " + " " + ""; + +static IBusEngine * +ibus_factory_real_create_engine (IBusFactory *factory, + const gchar *engine_name) { - g_assert (IBUS_IS_CONNECTION (connection)); + GType engine_type; + gchar *object_path = NULL; + IBusEngine *engine = NULL; + + engine_type = (GType) g_hash_table_lookup (factory->priv->engine_table, + engine_name); - IBusFactory *factory; - IBusFactoryPrivate *priv; + g_return_val_if_fail (engine_type != G_TYPE_INVALID, NULL); - factory = (IBusFactory *) g_object_new (IBUS_TYPE_FACTORY, - "path", IBUS_PATH_FACTORY, - "connection", connection, - NULL); - priv = IBUS_FACTORY_GET_PRIVATE (factory); + object_path = g_strdup_printf ("/org/freedesktop/IBus/Engine/%d", + ++factory->priv->id); + engine = ibus_engine_new_with_type (engine_type, + engine_name, + object_path, + ibus_service_get_connection ((IBusService *)factory)); + g_free (object_path); - return factory; + return engine; } -static void -ibus_factory_class_init (IBusFactoryClass *klass) +static gboolean +_ibus_factory_create_engine_accumulator (GSignalInvocationHint *ihint, + GValue *return_accu, + const GValue *handler_return, + gpointer dummy) { - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); + gboolean retval = TRUE; + GObject *object = g_value_get_object (handler_return); + + if (object != NULL) { + g_value_copy (handler_return, return_accu); + retval = FALSE; + } + + return retval; +} - g_type_class_add_private (klass, sizeof (IBusFactoryPrivate)); +static void +ibus_factory_class_init (IBusFactoryClass *class) +{ + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class); gobject_class->set_property = (GObjectSetPropertyFunc) ibus_factory_set_property; gobject_class->get_property = (GObjectGetPropertyFunc) ibus_factory_get_property; - ibus_object_class->destroy = (IBusObjectDestroyFunc) ibus_factory_destroy; - IBUS_SERVICE_CLASS (klass)->ibus_message = (ServiceIBusMessageFunc) ibus_factory_ibus_message; + IBUS_SERVICE_CLASS (class)->service_method_call = ibus_factory_service_method_call; + IBUS_SERVICE_CLASS (class)->service_get_property = ibus_factory_service_get_property; + IBUS_SERVICE_CLASS (class)->service_set_property = ibus_factory_service_set_property; + class->create_engine = ibus_factory_real_create_engine; - /** - * IBusFactory:connection: - * - * Connection of this IBusFactory. - **/ - g_object_class_install_property (gobject_class, - PROP_CONNECTION, - g_param_spec_object ("connection", - "connection", - "The connection of factory object", - IBUS_TYPE_CONNECTION, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + ibus_service_class_add_interfaces (IBUS_SERVICE_CLASS (class), introspection_xml); + g_type_class_add_private (class, sizeof (IBusFactoryPrivate)); + /** + * IBusFactory::create-engine: + * @factory: the factory which received the signal + * @engine_name: the engine_name which received the signal + * @returns: (transfer full): An IBusEngine + * + * The ::create-engine signal is a signal to create IBusEngine + * with @engine_name, which gets emitted when IBusFactory + * received CreateEngine dbus method. The callback functions + * will be called until a callback returns a non-null object + * of IBusEngine. */ + factory_signals[CREATE_ENGINE] = + g_signal_new (I_("create-engine"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusFactoryClass, create_engine), + _ibus_factory_create_engine_accumulator, + NULL, + _ibus_marshal_OBJECT__STRING, + IBUS_TYPE_ENGINE, + 1, + G_TYPE_STRING); } static void ibus_factory_init (IBusFactory *factory) { - IBusFactoryPrivate *priv; - priv = IBUS_FACTORY_GET_PRIVATE (factory); - - priv->id = 0; - priv->connection = NULL; - priv->engine_table = g_hash_table_new_full (g_str_hash, - g_str_equal, - g_free, - NULL); - priv->engine_list = NULL; + factory->priv = IBUS_FACTORY_GET_PRIVATE (factory); + factory->priv->engine_table = + g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + NULL); } static void ibus_factory_destroy (IBusFactory *factory) { GList *list; - IBusFactoryPrivate *priv; - priv = IBUS_FACTORY_GET_PRIVATE (factory); - list = g_list_copy (priv->engine_list); - g_list_foreach (list, (GFunc) ibus_object_destroy, NULL); - g_list_free (priv->engine_list); - g_list_free (list); - priv->engine_list = NULL; + list = g_list_copy (factory->priv->engine_list); + g_list_free_full (list, (GDestroyNotify)ibus_object_destroy); + g_list_free(factory->priv->engine_list); + factory->priv->engine_list = NULL; - if (priv->engine_table) { - g_hash_table_destroy (priv->engine_table); - } - - if (priv->connection) { - g_object_unref (priv->connection); - priv->connection = NULL; + if (factory->priv->engine_table) { + g_hash_table_destroy (factory->priv->engine_table); } IBUS_OBJECT_CLASS(ibus_factory_parent_class)->destroy (IBUS_OBJECT (factory)); @@ -160,17 +218,7 @@ ibus_factory_set_property (IBusFactory *factory, const GValue *value, GParamSpec *pspec) { - IBusFactoryPrivate *priv; - priv = IBUS_FACTORY_GET_PRIVATE (factory); - switch (prop_id) { - case PROP_CONNECTION: - priv->connection = g_value_get_object (value); - g_object_ref_sink (priv->connection); - ibus_service_add_to_connection ((IBusService *) factory, - priv->connection); - break; - default: G_OBJECT_WARN_INVALID_PROPERTY_ID (factory, prop_id, pspec); } @@ -182,109 +230,134 @@ ibus_factory_get_property (IBusFactory *factory, GValue *value, GParamSpec *pspec) { - IBusFactoryPrivate *priv; - priv = IBUS_FACTORY_GET_PRIVATE (factory); - switch (prop_id) { - case PROP_CONNECTION: - g_value_set_object (value, priv->connection); - break; - default: G_OBJECT_WARN_INVALID_PROPERTY_ID (factory, prop_id, pspec); } } static void -_engine_destroy_cb (IBusEngine *engine, - IBusFactory *factory) +ibus_factory_engine_destroy_cb (IBusEngine *engine, + IBusFactory *factory) { - IBusFactoryPrivate *priv; - priv = IBUS_FACTORY_GET_PRIVATE (factory); - - priv->engine_list = g_list_remove (priv->engine_list, engine); + factory->priv->engine_list = g_list_remove (factory->priv->engine_list, engine); g_object_unref (engine); } -static gboolean -ibus_factory_ibus_message (IBusFactory *factory, - IBusConnection *connection, - IBusMessage *message) +static void +ibus_factory_service_method_call (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - g_assert (IBUS_IS_FACTORY (factory)); - g_assert (IBUS_IS_CONNECTION (connection)); - g_assert (message != NULL); - - IBusMessage *reply_message; - IBusFactoryPrivate *priv; - priv = IBUS_FACTORY_GET_PRIVATE (factory); - - g_assert (priv->connection == connection); - - if (ibus_message_is_method_call (message, - IBUS_INTERFACE_FACTORY, - "CreateEngine")) { - gchar *engine_name; - gchar *path; - IBusError *error; - IBusEngine *engine; - gboolean retval; - GType engine_type; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_STRING, &engine_name, - G_TYPE_INVALID); - - if (!retval) { - reply_message = ibus_message_new_error_printf (message, - DBUS_ERROR_INVALID_ARGS, - "The 1st arg should be engine name"); - ibus_connection_send (connection, reply_message); - ibus_message_unref (reply_message); - return TRUE; + IBusFactory *factory = IBUS_FACTORY (service); + + if (g_strcmp0 (method_name, "CreateEngine") == 0) { + gchar *engine_name = NULL; + IBusEngine *engine = NULL; + + g_variant_get (parameters, "(&s)", &engine_name); + g_signal_emit (factory, factory_signals[CREATE_ENGINE], + 0, engine_name, &engine); + + if (engine != NULL) { + gchar *object_path = NULL; + GValue value = { 0, }; + + g_value_init (&value, G_TYPE_STRING); + g_object_get_property (G_OBJECT (engine), "object-path", &value); + object_path = g_value_dup_string (&value); + g_value_unset (&value); + + g_assert (engine != NULL); + g_assert (object_path != NULL); + g_object_ref_sink (engine); + factory->priv->engine_list = g_list_append (factory->priv->engine_list, engine); + g_signal_connect (engine, + "destroy", + G_CALLBACK (ibus_factory_engine_destroy_cb), + factory); + g_dbus_method_invocation_return_value (invocation, + g_variant_new ("(o)", object_path)); + g_free (object_path); } + else { + gchar *error_message = g_strdup_printf ("Can not fond engine %s", engine_name); + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, + G_DBUS_ERROR_FAILED, + error_message); + g_free (error_message); + } + return; + } - engine_type = (GType )g_hash_table_lookup (priv->engine_table, engine_name); - - if (engine_type == G_TYPE_INVALID) { - reply_message = ibus_message_new_error_printf (message, - DBUS_ERROR_FAILED, - "Can not create engine %s", engine_name); - ibus_connection_send (connection, reply_message); - ibus_message_unref (reply_message); - return TRUE; + IBUS_SERVICE_CLASS (ibus_factory_parent_class)-> + service_method_call (service, + connection, + sender, + object_path, + interface_name, + method_name, + parameters, + invocation); +} - } +static GVariant * +ibus_factory_service_get_property (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error) +{ + return IBUS_SERVICE_CLASS (ibus_factory_parent_class)-> + service_get_property (service, + connection, + sender, + object_path, + interface_name, + property_name, + error); +} - path = g_strdup_printf ("/org/freedesktop/IBus/Engine/%d", ++priv->id); +static gboolean +ibus_factory_service_set_property (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error) +{ + return IBUS_SERVICE_CLASS (ibus_factory_parent_class)-> + service_set_property (service, + connection, + sender, + object_path, + interface_name, + property_name, + value, + error); +} - engine = g_object_new (engine_type, - "name", engine_name, - "path", path, - "connection", priv->connection, - NULL); +IBusFactory * +ibus_factory_new (GDBusConnection *connection) +{ + g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL); - priv->engine_list = g_list_append (priv->engine_list, engine); - g_signal_connect (engine, - "destroy", - G_CALLBACK (_engine_destroy_cb), - factory); - - reply_message = ibus_message_new_method_return (message); - ibus_message_append_args (reply_message, - IBUS_TYPE_OBJECT_PATH, &path, - G_TYPE_INVALID); - g_free (path); - ibus_connection_send (connection, reply_message); - ibus_message_unref (reply_message); - return TRUE; - } + IBusEngine *object = g_object_new (IBUS_TYPE_FACTORY, + "object-path", IBUS_PATH_FACTORY, + "connection", connection, + NULL); - return IBUS_SERVICE_CLASS (ibus_factory_parent_class)->ibus_message ( - (IBusService *)factory, - connection, - message); + return IBUS_FACTORY (object); } void @@ -292,12 +365,23 @@ ibus_factory_add_engine (IBusFactory *factory, const gchar *engine_name, GType engine_type) { - g_assert (IBUS_IS_FACTORY (factory)); - g_assert (engine_name); - g_assert (g_type_is_a (engine_type, IBUS_TYPE_ENGINE)); + g_return_if_fail (IBUS_IS_FACTORY (factory)); + g_return_if_fail (engine_name != NULL); + g_return_if_fail (g_type_is_a (engine_type, IBUS_TYPE_ENGINE)); + + g_hash_table_insert (factory->priv->engine_table, g_strdup (engine_name), (gpointer) engine_type); +} + +IBusEngine * +ibus_factory_create_engine (IBusFactory *factory, + const gchar *engine_name) +{ + IBusEngine *engine = NULL; + + g_assert (engine_name != NULL); - IBusFactoryPrivate *priv; - priv = IBUS_FACTORY_GET_PRIVATE (factory); + g_signal_emit (factory, factory_signals[CREATE_ENGINE], + 0, engine_name, &engine); - g_hash_table_insert (priv->engine_table, g_strdup (engine_name), (gpointer) engine_type); + return engine; } diff --git a/src/ibusfactory.h b/src/ibusfactory.h index e92c810e6..dd683d078 100644 --- a/src/ibusfactory.h +++ b/src/ibusfactory.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusfactory * @short_description: Factory for creating engine instances. @@ -36,6 +42,7 @@ #include "ibusservice.h" #include "ibusserializable.h" +#include "ibusengine.h" G_BEGIN_DECLS @@ -101,6 +108,7 @@ G_BEGIN_DECLS typedef struct _IBusFactory IBusFactory; typedef struct _IBusFactoryClass IBusFactoryClass; +typedef struct _IBusFactoryPrivate IBusFactoryPrivate; /** * IBusFactory: @@ -108,19 +116,27 @@ typedef struct _IBusFactoryClass IBusFactoryClass; * An opaque data type representing an IBusFactory. */ struct _IBusFactory { + /*< private >*/ IBusService parent; + IBusFactoryPrivate *priv; /* instance members */ }; struct _IBusFactoryClass { + /*< private >*/ IBusServiceClass parent; + /*< public >*/ /* signals */ + IBusEngine * + (* create_engine) + (IBusFactory *factory, + const gchar *engine_name); /*< private >*/ /* padding */ - gpointer pdummy[8]; + gpointer pdummy[7]; }; /** @@ -133,12 +149,12 @@ GType ibus_factory_get_type (void); /** * ibus_factory_new: - * @connection: An IBusConnection. + * @connection: An GDBusConnection. * @returns: A newly allocated IBusFactory. * * New an IBusFactory. */ -IBusFactory *ibus_factory_new (IBusConnection *connection); +IBusFactory *ibus_factory_new (GDBusConnection *connection); /** * ibus_factory_add_engine: @@ -152,6 +168,17 @@ void ibus_factory_add_engine (IBusFactory *factory, const gchar *engine_name, GType engine_type); +/** + * ibus_factory_create_engine: + * @factory: An #IBusFactory. + * @engine_name: Name of an engine. + * @returns: (transfer full): #IBusEngine with @engine_name. + * + * Create an #IBusEngine with @engine_name. + */ +IBusEngine *ibus_factory_create_engine (IBusFactory *factory, + const gchar *engine_name); + G_END_DECLS #endif diff --git a/src/ibushotkey.c b/src/ibushotkey.c index 5076c34a4..e39456a29 100644 --- a/src/ibushotkey.c +++ b/src/ibushotkey.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,8 +19,8 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include #include "ibushotkey.h" +#include "ibusmarshalers.h" #include "ibuskeysyms.h" #include "ibusinternal.h" #include "ibusshare.h" @@ -59,25 +60,24 @@ static IBusHotkey *ibus_hotkey_new (guint key guint modifiers); static IBusHotkey *ibus_hotkey_copy (const IBusHotkey *src); static void ibus_hotkey_free (IBusHotkey *hotkey); -/* -static gboolean ibus_hotkey_serialize (IBusHotkey *hotkey, - IBusMessageIter *iter); -static gboolean ibus_hotkey_deserialize (IBusHotkey *hotkey, - IBusMessageIter *iter); -*/ -static void ibus_hotkey_profile_class_init (IBusHotkeyProfileClass *klass); +static void ibus_hotkey_profile_class_init (IBusHotkeyProfileClass *class); static void ibus_hotkey_profile_init (IBusHotkeyProfile *profile); static void ibus_hotkey_profile_destroy (IBusHotkeyProfile *profile); static gboolean ibus_hotkey_profile_serialize (IBusHotkeyProfile *profile, - IBusMessageIter *iter); -static gboolean ibus_hotkey_profile_deserialize(IBusHotkeyProfile *profile, - IBusMessageIter *iter); + GVariantBuilder *builder); +static gint ibus_hotkey_profile_deserialize(IBusHotkeyProfile *profile, + GVariant *variant); static gboolean ibus_hotkey_profile_copy (IBusHotkeyProfile *dest, const IBusHotkeyProfile*src); static void ibus_hotkey_profile_trigger (IBusHotkeyProfile *profile, GQuark event, gpointer user_data); +// Normalize modifiers by setting necessary modifier bits according to keyval. +static guint normalize_modifiers (guint keyval, + guint modifiers); +static gboolean is_modifier (guint keyval); + static IBusSerializableClass *parent_class = NULL; static guint profile_signals[LAST_SIGNAL] = { 0 }; @@ -96,40 +96,6 @@ ibus_hotkey_get_type (void) return type; } -/* -static gboolean -ibus_hotkey_serialize (IBusHotkey *hotkey, - IBusMessageIter *iter) -{ - gboolean retval; - - retval = ibus_message_iter_append (iter, G_TYPE_UINT, &hotkey->keyval); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_UINT, &hotkey->modifiers); - g_return_val_if_fail (retval, FALSE); - - return TRUE; -} - -static gboolean -ibus_hotkey_deserialize (IBusHotkey *hotkey, - IBusMessageIter *iter) -{ - gboolean retval; - - retval = ibus_message_iter_get (iter, G_TYPE_UINT, &hotkey->keyval); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - - retval = ibus_message_iter_get (iter, G_TYPE_UINT, &hotkey->modifiers); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - - return TRUE; -} -*/ - static IBusHotkey * ibus_hotkey_new (guint keyval, guint modifiers) @@ -202,14 +168,14 @@ ibus_hotkey_profile_get_type (void) } static void -ibus_hotkey_profile_class_init (IBusHotkeyProfileClass *klass) +ibus_hotkey_profile_class_init (IBusHotkeyProfileClass *class) { - IBusObjectClass *object_class = IBUS_OBJECT_CLASS (klass); - IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (klass); + IBusObjectClass *object_class = IBUS_OBJECT_CLASS (class); + IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (class); - parent_class = (IBusSerializableClass *) g_type_class_peek_parent (klass); + parent_class = (IBusSerializableClass *) g_type_class_peek_parent (class); - g_type_class_add_private (klass, sizeof (IBusHotkeyProfilePrivate)); + g_type_class_add_private (class, sizeof (IBusHotkeyProfilePrivate)); object_class->destroy = (IBusObjectDestroyFunc) ibus_hotkey_profile_destroy; @@ -217,9 +183,7 @@ ibus_hotkey_profile_class_init (IBusHotkeyProfileClass *klass) serializable_class->deserialize = (IBusSerializableDeserializeFunc) ibus_hotkey_profile_deserialize; serializable_class->copy = (IBusSerializableCopyFunc) ibus_hotkey_profile_copy; - klass->trigger = ibus_hotkey_profile_trigger; - - g_string_append (serializable_class->signature, "av"); + class->trigger = ibus_hotkey_profile_trigger; /* install signals */ /** @@ -235,11 +199,11 @@ ibus_hotkey_profile_class_init (IBusHotkeyProfileClass *klass) */ profile_signals[TRIGGER] = g_signal_new (I_("trigger"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, G_STRUCT_OFFSET (IBusHotkeyProfileClass, trigger), NULL, NULL, - ibus_marshal_VOID__UINT_POINTER, + _ibus_marshal_VOID__UINT_POINTER, G_TYPE_NONE, 2, G_TYPE_UINT, @@ -261,6 +225,8 @@ ibus_hotkey_profile_init (IBusHotkeyProfile *profile) priv->mask = IBUS_SHIFT_MASK | IBUS_CONTROL_MASK | IBUS_MOD1_MASK | + IBUS_SUPER_MASK | + IBUS_HYPER_MASK | IBUS_RELEASE_MASK; } @@ -293,26 +259,26 @@ ibus_hotkey_profile_destroy (IBusHotkeyProfile *profile) static gboolean ibus_hotkey_profile_serialize (IBusHotkeyProfile *profile, - IBusMessageIter *iter) + GVariantBuilder *builder) { gboolean retval; - retval = parent_class->serialize ((IBusSerializable *) profile, iter); + retval = parent_class->serialize ((IBusSerializable *) profile, builder); g_return_val_if_fail (retval, FALSE); return TRUE; } -static gboolean +static gint ibus_hotkey_profile_deserialize (IBusHotkeyProfile *profile, - IBusMessageIter *iter) + GVariant *variant) { - gboolean retval; + gint retval; - retval = parent_class->deserialize ((IBusSerializable *) profile, iter); - g_return_val_if_fail (retval, FALSE); + retval = parent_class->deserialize ((IBusSerializable *) profile, variant); + g_return_val_if_fail (retval, 0); - return TRUE; + return retval; } static gboolean @@ -347,6 +313,56 @@ ibus_hotkey_profile_trigger (IBusHotkeyProfile *profile, // g_debug ("%s is triggerred", g_quark_to_string (event)); } +static guint +normalize_modifiers (guint keyval, + guint modifiers) +{ + switch(keyval) { + case IBUS_KEY_Control_L: + case IBUS_KEY_Control_R: + return modifiers | IBUS_CONTROL_MASK; + case IBUS_KEY_Shift_L: + case IBUS_KEY_Shift_R: + return modifiers | IBUS_SHIFT_MASK; + case IBUS_KEY_Alt_L: + case IBUS_KEY_Alt_R: + // Chrome OS does not have Meta key. Instead, shift+alt generates Meta keyval. + case IBUS_KEY_Meta_L: + case IBUS_KEY_Meta_R: + return modifiers | IBUS_MOD1_MASK; + case IBUS_KEY_Super_L: + case IBUS_KEY_Super_R: + return modifiers | IBUS_SUPER_MASK; + case IBUS_KEY_Hyper_L: + case IBUS_KEY_Hyper_R: + return modifiers | IBUS_HYPER_MASK; + default: + return modifiers; + } +} + +static gboolean +is_modifier (guint keyval) +{ + switch(keyval) { + case IBUS_KEY_Control_L: + case IBUS_KEY_Control_R: + case IBUS_KEY_Shift_L: + case IBUS_KEY_Shift_R: + case IBUS_KEY_Alt_L: + case IBUS_KEY_Alt_R: + case IBUS_KEY_Meta_L: + case IBUS_KEY_Meta_R: + case IBUS_KEY_Super_L: + case IBUS_KEY_Super_R: + case IBUS_KEY_Hyper_L: + case IBUS_KEY_Hyper_R: + return TRUE; + default: + return FALSE; + } +} + gboolean ibus_hotkey_profile_add_hotkey (IBusHotkeyProfile *profile, guint keyval, @@ -356,7 +372,8 @@ ibus_hotkey_profile_add_hotkey (IBusHotkeyProfile *profile, IBusHotkeyProfilePrivate *priv; priv = IBUS_HOTKEY_PROFILE_GET_PRIVATE (profile); - IBusHotkey *hotkey = ibus_hotkey_new (keyval, modifiers); + IBusHotkey *hotkey = ibus_hotkey_new (keyval, + normalize_modifiers (keyval, modifiers & priv->mask)); /* has the same hotkey in profile */ if (g_tree_lookup (priv->hotkeys, hotkey) != NULL) { @@ -409,6 +426,8 @@ ibus_hotkey_profile_remove_hotkey (IBusHotkeyProfile *profile, IBusHotkeyProfilePrivate *priv; priv = IBUS_HOTKEY_PROFILE_GET_PRIVATE (profile); + modifiers = normalize_modifiers (keyval, modifiers & priv->mask); + IBusHotkey hotkey = { .keyval = keyval, .modifiers = modifiers @@ -486,13 +505,35 @@ ibus_hotkey_profile_filter_key_event (IBusHotkeyProfile *profile, IBusHotkeyProfilePrivate *priv; priv = IBUS_HOTKEY_PROFILE_GET_PRIVATE (profile); + modifiers = normalize_modifiers (keyval, modifiers & priv->mask); + prev_modifiers = normalize_modifiers (prev_keyval, prev_modifiers & priv->mask); + IBusHotkey hotkey = { .keyval = keyval, - .modifiers = modifiers & priv->mask, + .modifiers = modifiers, }; - if ((modifiers & IBUS_RELEASE_MASK) && keyval != prev_keyval) { - return 0; + if (modifiers & IBUS_RELEASE_MASK) { + /* previous key event must be a press key event */ + if (prev_modifiers & IBUS_RELEASE_MASK) + return 0; + + /* modifiers should be same except the release bit */ + if (modifiers != (prev_modifiers | IBUS_RELEASE_MASK)) + return 0; + + /* If it is release key event, + * we need check if keyval is equal to the prev keyval. + * If keyval is not equal to the prev keyval, + * but both keyvals are modifier keys, + * we will still search it in hotkeys. + * It is for matching some key sequences like: + * Shift Down, Alt Down, Shift Up => Shift+Alt+Release - Shift hotkey + **/ + if ((keyval != prev_keyval) && + (is_modifier (keyval) == FALSE || + is_modifier (prev_keyval) == FALSE)) + return 0; } GQuark event = (GQuark) GPOINTER_TO_UINT (g_tree_lookup (priv->hotkeys, &hotkey)); @@ -503,3 +544,21 @@ ibus_hotkey_profile_filter_key_event (IBusHotkeyProfile *profile, return event; } + +GQuark +ibus_hotkey_profile_lookup_hotkey (IBusHotkeyProfile *profile, + guint keyval, + guint modifiers) +{ + IBusHotkeyProfilePrivate *priv; + priv = IBUS_HOTKEY_PROFILE_GET_PRIVATE (profile); + + modifiers = normalize_modifiers (keyval, modifiers & priv->mask); + + IBusHotkey hotkey = { + .keyval = keyval, + .modifiers = modifiers, + }; + + return (GQuark) GPOINTER_TO_UINT (g_tree_lookup (priv->hotkeys, &hotkey)); +} diff --git a/src/ibushotkey.h b/src/ibushotkey.h index 4b63121b8..65cdc5b57 100644 --- a/src/ibushotkey.h +++ b/src/ibushotkey.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibushotkey * @short_description: Hotkeys and associated events. @@ -150,7 +156,7 @@ gboolean ibus_hotkey_profile_remove_hotkey_by_event * * Emit a ::trigger signal when a hotkey is in a profile. * - * @see_also: ::trigger + * See also: ::trigger */ GQuark ibus_hotkey_profile_filter_key_event (IBusHotkeyProfile *profile, @@ -160,6 +166,18 @@ GQuark ibus_hotkey_profile_filter_key_event guint prev_modifiers, gpointer user_data); +/** + * ibus_hotkey_profile_lookup_hotkey: + * @profile: An IBusHotkeyProfile. + * @keyval: Keycode of the hotkey. + * @modifiers: Modifiers of the hotkey. + * @returns: The event associated to the hotkey or 0 if the hotkey is not in the + * profile. + */ +GQuark ibus_hotkey_profile_lookup_hotkey + (IBusHotkeyProfile *profile, + guint keyval, + guint modifiers); + G_END_DECLS #endif - diff --git a/src/ibusinputcontext.c b/src/ibusinputcontext.c index 6755727d7..fa8301b0a 100644 --- a/src/ibusinputcontext.c +++ b/src/ibusinputcontext.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,13 +19,15 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include +#include "ibusinputcontext.h" +#include #include "ibusshare.h" #include "ibusinternal.h" -#include "ibusinputcontext.h" +#include "ibusmarshalers.h" #include "ibusattribute.h" #include "ibuslookuptable.h" #include "ibusproplist.h" +#include "ibuserror.h" #define IBUS_INPUT_CONTEXT_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_INPUT_CONTEXT, IBusInputContextPrivate)) @@ -53,65 +56,44 @@ enum { LAST_SIGNAL, }; - -/* BusInputContextPriv */ +/* IBusInputContextPrivate */ struct _IBusInputContextPrivate { - gboolean own; + /* TRUE if the current engine needs surrounding text; FALSE otherwise */ + gboolean needs_surrounding_text; + + /* cached surrounding text (see also IBusEnginePrivate and + BusEngineProxy) */ + IBusText *surrounding_text; + guint surrounding_cursor_pos; + guint selection_anchor_pos; }; + typedef struct _IBusInputContextPrivate IBusInputContextPrivate; static guint context_signals[LAST_SIGNAL] = { 0 }; -// static guint context_signals[LAST_SIGNAL] = { 0 }; + +static IBusText *text_empty = NULL; /* functions prototype */ -static void ibus_input_context_real_destroy (IBusInputContext *context); -static gboolean ibus_input_context_ibus_signal (IBusProxy *proxy, - DBusMessage *message); +static void ibus_input_context_real_destroy (IBusProxy *context); +static void ibus_input_context_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters); G_DEFINE_TYPE (IBusInputContext, ibus_input_context, IBUS_TYPE_PROXY) -IBusInputContext * -ibus_input_context_new (const gchar *path, - IBusConnection *connection) -{ - g_assert (path != NULL); - g_assert (IBUS_IS_CONNECTION (connection)); - GObject *obj; - - obj = g_object_new (IBUS_TYPE_INPUT_CONTEXT, - "name", IBUS_SERVICE_IBUS, - "interface", IBUS_INTERFACE_INPUT_CONTEXT, - "path", path, - "connection", connection, - NULL); - - return IBUS_INPUT_CONTEXT (obj); -} - -IBusInputContext * -ibus_input_context_get_input_context (const gchar *path, - IBusConnection *connection) -{ - IBusInputContext *context = ibus_input_context_new (path, connection); - IBusInputContextPrivate *priv; - if (!context) - return NULL; - priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (context); - priv->own = FALSE; - return context; -} - static void -ibus_input_context_class_init (IBusInputContextClass *klass) +ibus_input_context_class_init (IBusInputContextClass *class) { - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); - IBusProxyClass *proxy_class = IBUS_PROXY_CLASS (klass); + IBusProxyClass *ibus_proxy_class = IBUS_PROXY_CLASS (class); + GDBusProxyClass *g_dbus_proxy_class = G_DBUS_PROXY_CLASS (class); - g_type_class_add_private (klass, sizeof (IBusInputContextPrivate)); + g_type_class_add_private (class, sizeof (IBusInputContextPrivate)); - ibus_object_class->destroy = (IBusObjectDestroyFunc) ibus_input_context_real_destroy; + ibus_proxy_class->destroy = ibus_input_context_real_destroy; - proxy_class->ibus_signal = ibus_input_context_ibus_signal; + g_dbus_proxy_class->g_signal = ibus_input_context_g_signal; /* install signals */ /** @@ -122,11 +104,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[ENABLED] = g_signal_new (I_("enabled"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); /** @@ -137,11 +119,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[DISABLED] = g_signal_new (I_("disabled"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); /** @@ -157,11 +139,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[COMMIT_TEXT] = g_signal_new (I_("commit-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT, + _ibus_marshal_VOID__OBJECT, G_TYPE_NONE, 1, IBUS_TYPE_TEXT); @@ -177,11 +159,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[FORWARD_KEY_EVENT] = g_signal_new (I_("forward-key-event"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__UINT_UINT_UINT, + _ibus_marshal_VOID__UINT_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, @@ -199,11 +181,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[DELETE_SURROUNDING_TEXT] = g_signal_new (I_("delete-surrounding-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__INT_UINT, + _ibus_marshal_VOID__INT_UINT, G_TYPE_NONE, 2, G_TYPE_INT, @@ -224,11 +206,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[UPDATE_PREEDIT_TEXT] = g_signal_new (I_("update-preedit-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT_UINT_BOOLEAN, + _ibus_marshal_VOID__OBJECT_UINT_BOOLEAN, G_TYPE_NONE, 3, IBUS_TYPE_TEXT, @@ -243,11 +225,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[SHOW_PREEDIT_TEXT] = g_signal_new (I_("show-preedit-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); /** @@ -258,11 +240,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[HIDE_PREEDIT_TEXT] = g_signal_new (I_("hide-preedit-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); /** @@ -277,11 +259,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[UPDATE_AUXILIARY_TEXT] = g_signal_new (I_("update-auxiliary-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT_BOOLEAN, + _ibus_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2, IBUS_TYPE_TEXT, G_TYPE_BOOLEAN); @@ -294,11 +276,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[SHOW_AUXILIARY_TEXT] = g_signal_new (I_("show-auxiliary-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); /** @@ -309,11 +291,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[HIDE_AUXILIARY_TEXT] = g_signal_new (I_("hide-auxiliary-text"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); /** @@ -330,11 +312,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[UPDATE_LOOKUP_TABLE] = g_signal_new (I_("update-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT_BOOLEAN, + _ibus_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2, IBUS_TYPE_LOOKUP_TABLE, G_TYPE_BOOLEAN); @@ -347,11 +329,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[SHOW_LOOKUP_TABLE] = g_signal_new (I_("show-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); /** @@ -362,11 +344,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[HIDE_LOOKUP_TABLE] = g_signal_new (I_("hide-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); /** @@ -377,11 +359,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[PAGE_UP_LOOKUP_TABLE] = g_signal_new (I_("page-up-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); /** @@ -392,11 +374,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[PAGE_DOWN_LOOKUP_TABLE] = g_signal_new (I_("page-down-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); /** @@ -407,11 +389,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[CURSOR_UP_LOOKUP_TABLE] = g_signal_new (I_("cursor-up-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); /** @@ -422,11 +404,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[CURSOR_DOWN_LOOKUP_TABLE] = g_signal_new (I_("cursor-down-lookup-table"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -443,11 +425,11 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[REGISTER_PROPERTIES] = g_signal_new (I_("register-properties"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT, + _ibus_marshal_VOID__OBJECT, G_TYPE_NONE, 1, IBUS_TYPE_PROP_LIST); @@ -465,61 +447,57 @@ ibus_input_context_class_init (IBusInputContextClass *klass) */ context_signals[UPDATE_PROPERTY] = g_signal_new (I_("update-property"), - G_TYPE_FROM_CLASS (klass), + G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, - ibus_marshal_VOID__OBJECT, + _ibus_marshal_VOID__OBJECT, G_TYPE_NONE, 1, IBUS_TYPE_PROPERTY); + + text_empty = ibus_text_new_from_static_string (""); + g_object_ref_sink (text_empty); } static void ibus_input_context_init (IBusInputContext *context) { IBusInputContextPrivate *priv; + priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (context); - priv->own = TRUE; + priv->surrounding_text = g_object_ref_sink (text_empty); } static void -ibus_input_context_real_destroy (IBusInputContext *context) +ibus_input_context_real_destroy (IBusProxy *context) { IBusInputContextPrivate *priv; - priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (context); + priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (IBUS_INPUT_CONTEXT (context)); - if (priv->own && ibus_proxy_get_connection ((IBusProxy *) context) != NULL) { - ibus_proxy_call (IBUS_PROXY (context), - "Destroy", - G_TYPE_INVALID); + if (priv->surrounding_text) { + g_object_unref (priv->surrounding_text); + priv->surrounding_text = NULL; } - IBUS_OBJECT_CLASS(ibus_input_context_parent_class)->destroy (IBUS_OBJECT (context)); + IBUS_PROXY_CLASS(ibus_input_context_parent_class)->destroy (context); } -static gboolean -ibus_input_context_ibus_signal (IBusProxy *proxy, - IBusMessage *message) +static void +ibus_input_context_g_signal (GDBusProxy *proxy, + const gchar *sender_name, + const gchar *signal_name, + GVariant *parameters) { g_assert (IBUS_IS_INPUT_CONTEXT (proxy)); - g_assert (message != NULL); - g_assert (ibus_message_get_type (message) == DBUS_MESSAGE_TYPE_SIGNAL); IBusInputContext *context; - IBusError *error = NULL; - gint i; - const gchar *interface; - const gchar *name; - context = IBUS_INPUT_CONTEXT (proxy); static const struct { - const gchar *member; + const gchar *signal_name; guint signal_id; } signals [] = { - { "Enabled", ENABLED }, - { "Disabled", DISABLED }, { "ShowPreeditText", SHOW_PREEDIT_TEXT }, { "HidePreeditText", HIDE_PREEDIT_TEXT }, { "ShowAuxiliaryText", SHOW_AUXILIARY_TEXT }, @@ -532,256 +510,389 @@ ibus_input_context_ibus_signal (IBusProxy *proxy, { "CursorDownLookupTable", CURSOR_DOWN_LOOKUP_TABLE }, }; - do { - interface = ibus_message_get_interface (message); - name = ibus_message_get_member (message); + if (g_strcmp0 (signal_name, "CommitText") == 0) { + GVariant *variant = NULL; + g_variant_get (parameters, "(v)", &variant); + IBusText *text = IBUS_TEXT (ibus_serializable_deserialize (variant)); + g_variant_unref (variant); + g_signal_emit (context, context_signals[COMMIT_TEXT], 0, text); - if (interface != NULL && g_strcmp0 (interface, IBUS_INTERFACE_INPUT_CONTEXT) != 0) { - error = ibus_error_new_from_printf (DBUS_ERROR_FAILED, - "Signal %s.%s is not handled", interface, name); - break; - } + if (g_object_is_floating (text)) + g_object_unref (text); + return; + } + if (g_strcmp0 (signal_name, "UpdatePreeditText") == 0) { + GVariant *variant = NULL; + gint32 cursor_pos; + gboolean visible; + g_variant_get (parameters, "(vub)", &variant, &cursor_pos, &visible); + IBusText *text = IBUS_TEXT (ibus_serializable_deserialize (variant)); + g_variant_unref (variant); + + g_signal_emit (context, + context_signals[UPDATE_PREEDIT_TEXT], + 0, + text, + cursor_pos, + visible); - if (g_strcmp0 (name, "CommitText") == 0) { - IBusText *text; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_TEXT, &text, - G_TYPE_INVALID); - if (retval) { - g_signal_emit (context, context_signals[COMMIT_TEXT], 0, text); - if (g_object_is_floating (text)) - g_object_unref (text); - } - break; - } - if (g_strcmp0 (name, "UpdatePreeditText") == 0) { - IBusText *text; - gint32 cursor_pos; - gboolean visible; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_TEXT, &text, - G_TYPE_UINT, &cursor_pos, - G_TYPE_BOOLEAN, &visible, - G_TYPE_INVALID); - - if (retval) { - g_signal_emit (context, - context_signals[UPDATE_PREEDIT_TEXT], - 0, - text, - cursor_pos, - visible); - if (g_object_is_floating (text)) - g_object_unref (text); - } - break; - } + if (g_object_is_floating (text)) + g_object_unref (text); + return; + } - for (i = 0; - i < G_N_ELEMENTS (signals) && g_strcmp0 (name, signals[i].member) != 0; - i++); + /* lookup signal in table */ + gint i; + for (i = 0; + i < G_N_ELEMENTS (signals) && g_strcmp0 (signal_name, signals[i].signal_name) != 0; + i++); - if (i < G_N_ELEMENTS (signals)) { - g_signal_emit (context, context_signals[signals[i].signal_id], 0); - break; - } + if (i < G_N_ELEMENTS (signals)) { + g_signal_emit (context, context_signals[signals[i].signal_id], 0); + return; + } - if (g_strcmp0 (name, "UpdateAuxiliaryText") == 0) { - IBusText *text; - gboolean visible; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_TEXT, &text, - G_TYPE_BOOLEAN, &visible, - G_TYPE_INVALID); - - if (retval) { - g_signal_emit (context, - context_signals[UPDATE_AUXILIARY_TEXT], - 0, - text, - visible); - if (g_object_is_floating (text)) - g_object_unref (text); - } - } - else if (g_strcmp0 (name, "UpdateLookupTable") == 0) { - IBusLookupTable *table; - gboolean visible; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_LOOKUP_TABLE, &table, - G_TYPE_BOOLEAN, &visible, - G_TYPE_INVALID); - - if (retval) { - g_signal_emit (context, - context_signals[UPDATE_LOOKUP_TABLE], - 0, - table, - visible); - if (g_object_is_floating (table)) - g_object_unref (table); - } - } - else if (g_strcmp0 (name, "RegisterProperties") == 0) { - IBusPropList *prop_list; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_PROP_LIST, &prop_list, - G_TYPE_INVALID); - - if (retval) { - g_signal_emit (context, - context_signals[REGISTER_PROPERTIES], - 0, - prop_list); - if (g_object_is_floating (prop_list)) - g_object_unref (prop_list); - } - } - else if (g_strcmp0 (name, "UpdateProperty") == 0) { - IBusProperty *prop; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_PROPERTY, &prop, - G_TYPE_INVALID); - if (retval) { - g_signal_emit (context, context_signals[UPDATE_PROPERTY], 0, prop); - if (g_object_is_floating (prop)) - g_object_unref (prop); - } - } - else if (g_strcmp0 (name, "ForwardKeyEvent") == 0) { - guint32 keyval; - guint32 keycode; - guint32 state; - gboolean retval; - - - retval = ibus_message_get_args (message, - &error, - G_TYPE_UINT, &keyval, - G_TYPE_UINT, &keycode, - G_TYPE_UINT, &state, - G_TYPE_INVALID); - - if (retval) { - /* Forward key event back with IBUS_FORWARD_MASK. And process_key_event will - * not process key event with IBUS_FORWARD_MASK again. */ - g_signal_emit (context, - context_signals[FORWARD_KEY_EVENT], - 0, - keyval, - keycode, - state | IBUS_FORWARD_MASK); - } - } - else if (g_strcmp0 (name, "DeleteSurroundingText") == 0) { - gint offset_from_cursor; - guint nchars; - gboolean retval; - retval = ibus_message_get_args (message, - &error, - G_TYPE_INT, &offset_from_cursor, - G_TYPE_UINT, &nchars, - G_TYPE_INVALID); - - - if (retval) { - g_signal_emit (context, - context_signals[DELETE_SURROUNDING_TEXT], - 0, - offset_from_cursor, - nchars); - } - } - else { - error = ibus_error_new_from_printf (DBUS_ERROR_FAILED, - "Signal %s.%s is not handled", interface, name); - break; - } - } while (0); + if (g_strcmp0 (signal_name, "UpdateAuxiliaryText") == 0) { + GVariant *variant = NULL; + gboolean visible; + g_variant_get (parameters, "(vb)", &variant, &visible); + IBusText *text = IBUS_TEXT (ibus_serializable_deserialize (variant)); + g_variant_unref (variant); - if (error == NULL) { - g_signal_stop_emission_by_name (context, "ibus-signal"); - return TRUE; + g_signal_emit (context, + context_signals[UPDATE_AUXILIARY_TEXT], + 0, + text, + visible); + if (g_object_is_floating (text)) + g_object_unref (text); + return; } - /* some error happens */ - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - return FALSE; -} - -typedef struct { - IBusInputContext *context; - guint32 keyval; - guint32 keycode; - guint32 state; -} CallData; + if (g_strcmp0 (signal_name, "UpdateLookupTable") == 0) { + GVariant *variant = NULL; + gboolean visible; + g_variant_get (parameters, "(vb)", &variant, &visible); -static void -_process_key_event_reply_cb (IBusPendingCall *pending, - CallData *call_data) -{ - IBusMessage *reply_message; - IBusError *error; - gboolean retval = FALSE; + IBusLookupTable *table = IBUS_LOOKUP_TABLE (ibus_serializable_deserialize (variant)); + g_variant_unref (variant); - reply_message = dbus_pending_call_steal_reply (pending); + g_signal_emit (context, + context_signals[UPDATE_LOOKUP_TABLE], + 0, + table, + visible); + if (g_object_is_floating (table)) + g_object_unref (table); + return; - if (reply_message == NULL) { - /* reply timeout */ - retval = FALSE; } - else if ((error = ibus_error_new_from_message (reply_message)) != NULL) { - /* some error happens */ - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - retval = FALSE; + + if (g_strcmp0 (signal_name, "RegisterProperties") == 0) { + GVariant *variant = NULL; + g_variant_get (parameters, "(v)", &variant); + + IBusPropList *prop_list = IBUS_PROP_LIST (ibus_serializable_deserialize (variant)); + g_variant_unref (variant); + + g_signal_emit (context, + context_signals[REGISTER_PROPERTIES], + 0, + prop_list); + + if (g_object_is_floating (prop_list)) + g_object_unref (prop_list); + return; } - else if (!ibus_message_get_args (reply_message, - &error, - G_TYPE_BOOLEAN, &retval, - G_TYPE_INVALID)) { - /* can not get return value */ - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - retval = FALSE; + + if (g_strcmp0 (signal_name, "UpdateProperty") == 0) { + GVariant *variant = NULL; + g_variant_get (parameters, "(v)", &variant); + IBusProperty *prop = IBUS_PROPERTY (ibus_serializable_deserialize (variant)); + g_variant_unref (variant); + + g_signal_emit (context, context_signals[UPDATE_PROPERTY], 0, prop); + + if (g_object_is_floating (prop)) + g_object_unref (prop); + return; } - if (!retval) { + if (g_strcmp0 (signal_name, "ForwardKeyEvent") == 0) { + guint32 keyval; + guint32 keycode; + guint32 state; + + g_variant_get (parameters, "(uuu)", &keyval, &keycode, &state); + /* Forward key event back with IBUS_FORWARD_MASK. And process_key_event will * not process key event with IBUS_FORWARD_MASK again. */ - g_signal_emit (call_data->context, + g_signal_emit (context, context_signals[FORWARD_KEY_EVENT], 0, - call_data->keyval, - call_data->keycode, - call_data->state | IBUS_FORWARD_MASK); + keyval, + keycode, + state | IBUS_FORWARD_MASK); + return; + } + + if (g_strcmp0 (signal_name, "DeleteSurroundingText") == 0) { + gint offset_from_cursor; + guint nchars; + + g_variant_get (parameters, "(iu)", &offset_from_cursor, &nchars); + + g_signal_emit (context, + context_signals[DELETE_SURROUNDING_TEXT], + 0, + offset_from_cursor, + nchars); + return; + } + + IBusInputContextPrivate *priv; + priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (IBUS_INPUT_CONTEXT (context)); + + if (g_strcmp0 (signal_name, "Enabled") == 0) { + priv->needs_surrounding_text = FALSE; + g_signal_emit (context, context_signals[ENABLED], 0); + return; + } + + if (g_strcmp0 (signal_name, "Disabled") == 0) { + priv->needs_surrounding_text = FALSE; + g_signal_emit (context, context_signals[DISABLED], 0); + return; + } + + if (g_strcmp0 (signal_name, "RequireSurroundingText") == 0) { + priv->needs_surrounding_text = TRUE; + return; } + + G_DBUS_PROXY_CLASS (ibus_input_context_parent_class)->g_signal ( + proxy, sender_name, signal_name, parameters); } -static void -_call_data_free (CallData *call_data) +IBusInputContext * +ibus_input_context_new (const gchar *path, + GDBusConnection *connection, + GCancellable *cancellable, + GError **error) { - g_object_unref (call_data->context); - g_slice_free (CallData, call_data); + g_assert (path != NULL); + g_assert (G_IS_DBUS_CONNECTION (connection)); + + GInitable *initable; + + GDBusProxyFlags flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START | + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES; + + initable = g_initable_new (IBUS_TYPE_INPUT_CONTEXT, + cancellable, + error, + "g-connection", connection, + "g-name", IBUS_SERVICE_IBUS, + "g-flags", flags, + "g-interface-name", IBUS_INTERFACE_INPUT_CONTEXT, + "g-object-path", path, + "g-default-timeout", ibus_get_timeout (), + NULL); + if (initable != NULL) + return IBUS_INPUT_CONTEXT (initable); + return NULL; +} + +void +ibus_input_context_new_async (const gchar *path, + GDBusConnection *connection, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_assert (path != NULL); + g_assert (G_IS_DBUS_CONNECTION (connection)); + g_assert (callback != NULL); + + GDBusProxyFlags flags = G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START | + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES; + + g_async_initable_new_async (IBUS_TYPE_INPUT_CONTEXT, + G_PRIORITY_DEFAULT, + cancellable, + callback, + user_data, + "g-connection", connection, + "g-name", IBUS_SERVICE_IBUS, + "g-flags", flags, + "g-interface-name", IBUS_INTERFACE_INPUT_CONTEXT, + "g-object-path", path, + "g-default-timeout", ibus_get_timeout (), + NULL); +} + +IBusInputContext * +ibus_input_context_new_async_finish (GAsyncResult *res, + GError **error) +{ + GObject *object = NULL; + GObject *source_object = NULL; + + source_object = g_async_result_get_source_object (res); + g_assert (source_object != NULL); + + object = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), + res, + error); + g_object_unref (source_object); + + if (object != NULL) { + return IBUS_INPUT_CONTEXT (object); + } + else { + return NULL; + } +} + +IBusInputContext * +ibus_input_context_get_input_context (const gchar *path, + GDBusConnection *connection) +{ + IBusInputContext *context = NULL; + GError *error = NULL; + + context = ibus_input_context_new (path, connection, NULL, &error); + if (context == NULL) { + g_warning ("ibus_input_context_get_input_context: %s", error->message); + g_error_free (error); + return NULL; + } + + /* Do not call "org.freedesktop.IBus.Service.Destroy" when the input + * context object is disposed. */ + IBUS_PROXY (context)->own = FALSE; + return context; +} + +void +ibus_input_context_get_input_context_async (const gchar *path, + GDBusConnection *connection, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + ibus_input_context_new_async (path, + connection, + cancellable, + callback, + user_data); +} + +IBusInputContext * +ibus_input_context_get_input_context_async_finish (GAsyncResult *res, + GError **error) +{ + IBusInputContext *context = NULL; + + context = ibus_input_context_new_async_finish (res, error); + if (context == NULL) { + return NULL; + } + + /* Do not call "org.freedesktop.IBus.Service.Destroy" when the input + * context object is disposed. */ + IBUS_PROXY (context)->own = FALSE; + return context; +} + +void +ibus_input_context_process_hand_writing_event (IBusInputContext *context, + const gdouble *coordinates, + guint coordinates_len) +{ + g_assert (IBUS_IS_INPUT_CONTEXT (context)); + g_return_if_fail (coordinates != NULL); + g_return_if_fail (coordinates_len >= 4); /* The array should contain at least one line. */ + g_return_if_fail ((coordinates_len & 1) == 0); + + guint i; + GVariantBuilder builder; + g_variant_builder_init (&builder, G_VARIANT_TYPE ("ad")); + for (i = 0; i < coordinates_len; i++) { + g_variant_builder_add (&builder, "d", coordinates[i]); + } + + g_dbus_proxy_call ((GDBusProxy *) context, + "ProcessHandWritingEvent", /* method_name */ + g_variant_new ("(ad)", &builder), /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + -1, /* timeout */ + NULL, /* cancellable */ + NULL, /* callback */ + NULL /* user_data */ + ); +} + +void +ibus_input_context_cancel_hand_writing (IBusInputContext *context, + guint n_strokes) +{ + g_assert (IBUS_IS_INPUT_CONTEXT (context)); + + g_dbus_proxy_call ((GDBusProxy *) context, + "CancelHandWriting", /* method_name */ + g_variant_new ("(u)", n_strokes), /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + -1, /* timeout */ + NULL, /* cancellable */ + NULL, /* callback */ + NULL /* user_data */ + ); +} + +void +ibus_input_context_process_key_event_async (IBusInputContext *context, + guint32 keyval, + guint32 keycode, + guint32 state, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_assert (IBUS_IS_INPUT_CONTEXT (context)); + + g_dbus_proxy_call ((GDBusProxy *) context, + "ProcessKeyEvent", /* method_name */ + g_variant_new ("(uuu)", + keyval, keycode, state), /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + timeout_msec, /* timeout */ + cancellable, /* cancellable */ + callback, /* callback */ + user_data /* user_data */ + ); +} + +gboolean +ibus_input_context_process_key_event_async_finish (IBusInputContext *context, + GAsyncResult *res, + GError **error) +{ + g_assert (IBUS_IS_INPUT_CONTEXT (context)); + g_assert (G_IS_ASYNC_RESULT (res)); + g_assert (error == NULL || *error == NULL); + + gboolean processed = FALSE; + + GVariant *variant = g_dbus_proxy_call_finish ((GDBusProxy *) context, + res, error); + if (variant != NULL) { + g_variant_get (variant, "(b)", &processed); + g_variant_unref (variant); + } + + return processed; } gboolean @@ -792,53 +903,24 @@ ibus_input_context_process_key_event (IBusInputContext *context, { g_assert (IBUS_IS_INPUT_CONTEXT (context)); - IBusPendingCall *pending = NULL; - IBusError *error = NULL; - CallData *call_data; - gboolean retval; - - if (state & IBUS_HANDLED_MASK) - return TRUE; - - if (state & IBUS_IGNORED_MASK) - return FALSE; - - retval = ibus_proxy_call_with_reply ((IBusProxy *) context, - "ProcessKeyEvent", - &pending, - -1, - &error, - G_TYPE_UINT, &keyval, - G_TYPE_UINT, &keycode, - G_TYPE_UINT, &state, - G_TYPE_INVALID); - if (!retval) { - g_debug ("%s: %s", error->name, error->message); - ibus_error_free (error); - return FALSE; - } - - call_data = g_slice_new0 (CallData); - g_object_ref (context); - call_data->context = context; - call_data->keyval = keyval; - call_data->keycode = keycode; - call_data->state = state; - - /* set notify callback to handle the reply from daemon */ - retval = ibus_pending_call_set_notify (pending, - (IBusPendingCallNotifyFunction)_process_key_event_reply_cb, - call_data, - (GDestroyNotify)_call_data_free); - ibus_pending_call_unref (pending); - - if (!retval) { - _call_data_free (call_data); - g_warning ("%s : ProcessKeyEvent", DBUS_ERROR_NO_MEMORY); - return FALSE; + GVariant *result = g_dbus_proxy_call_sync ((GDBusProxy *) context, + "ProcessKeyEvent", /* method_name */ + g_variant_new ("(uuu)", + keyval, keycode, state), /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + -1, /* timeout */ + NULL, /* cancellable */ + NULL); + + if (result != NULL) { + gboolean processed = FALSE; + + g_variant_get (result, "(b)", &processed); + g_variant_unref (result); + return processed; } - return TRUE; + return FALSE; } void @@ -850,13 +932,15 @@ ibus_input_context_set_cursor_location (IBusInputContext *context, { g_assert (IBUS_IS_INPUT_CONTEXT (context)); - ibus_proxy_call ((IBusProxy *) context, - "SetCursorLocation", - G_TYPE_INT, &x, - G_TYPE_INT, &y, - G_TYPE_INT, &w, - G_TYPE_INT, &h, - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *) context, + "SetCursorLocation", /* method_name */ + g_variant_new ("(iiii)", x, y, w, h),/* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + -1, /* timeout */ + NULL, /* cancellable */ + NULL, /* callback */ + NULL /* user_data */ + ); } void @@ -864,25 +948,33 @@ ibus_input_context_set_capabilities (IBusInputContext *context, guint32 capabilites) { g_assert (IBUS_IS_INPUT_CONTEXT (context)); - - ibus_proxy_call ((IBusProxy *) context, - "SetCapabilities", - G_TYPE_UINT, &capabilites, - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *) context, + "SetCapabilities", /* method_name */ + g_variant_new ("(u)", capabilites), /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + -1, /* timeout */ + NULL, /* cancellable */ + NULL, /* callback */ + NULL /* user_data */ + ); } void ibus_input_context_property_activate (IBusInputContext *context, const gchar *prop_name, - gint32 state) + guint32 state) { g_assert (IBUS_IS_INPUT_CONTEXT (context)); - - ibus_proxy_call ((IBusProxy *) context, - "PropertyActivate", - G_TYPE_STRING, &prop_name, - G_TYPE_INT, &state, - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *) context, + "PropertyActivate", /* method_name */ + g_variant_new ("(su)", + prop_name, state), /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + -1, /* timeout */ + NULL, /* cancellable */ + NULL, /* callback */ + NULL /* user_data */ + ); } void @@ -890,11 +982,15 @@ ibus_input_context_property_show (IBusInputContext *context, const gchar *prop_name) { g_assert (IBUS_IS_INPUT_CONTEXT (context)); - - ibus_proxy_call ((IBusProxy *) context, - "PropertyShow", - G_TYPE_STRING, &prop_name, - G_TYPE_INVALID); + g_dbus_proxy_call ((GDBusProxy *) context, + "PropertyShow", /* method_name */ + g_variant_new ("(s)", prop_name), /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + -1, /* timeout */ + NULL, /* cancellable */ + NULL, /* callback */ + NULL /* user_data */ + ); } void @@ -902,77 +998,141 @@ ibus_input_context_property_hide (IBusInputContext *context, const gchar *prop_name) { g_assert (IBUS_IS_INPUT_CONTEXT (context)); + g_dbus_proxy_call ((GDBusProxy *) context, + "PropertyHide", /* method_name */ + g_variant_new ("(s)", prop_name), /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + -1, /* timeout */ + NULL, /* cancellable */ + NULL, /* callback */ + NULL /* user_data */ + ); +} - ibus_proxy_call ((IBusProxy *) context, - "PropertyHide", - G_TYPE_STRING, &prop_name, - G_TYPE_INVALID); +void +ibus_input_context_set_surrounding_text (IBusInputContext *context, + IBusText *text, + guint32 cursor_pos, + guint32 anchor_pos) +{ + g_assert (IBUS_IS_INPUT_CONTEXT (context)); + g_assert (IBUS_IS_TEXT (text)); + + IBusInputContextPrivate *priv; + priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (context); + + if (cursor_pos != priv->surrounding_cursor_pos || + anchor_pos != priv->selection_anchor_pos || + priv->surrounding_text == NULL || + g_strcmp0 (text->text, priv->surrounding_text->text) != 0) { + if (priv->surrounding_text) + g_object_unref (priv->surrounding_text); + priv->surrounding_text = (IBusText *) g_object_ref_sink (text); + priv->surrounding_cursor_pos = cursor_pos; + priv->selection_anchor_pos = anchor_pos; + + if (priv->needs_surrounding_text) { + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)text); + g_dbus_proxy_call ((GDBusProxy *) context, + "SetSurroundingText", /* method_name */ + g_variant_new ("(vuu)", + variant, + cursor_pos, + anchor_pos), /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + -1, /* timeout */ + NULL, /* cancellable */ + NULL, /* callback */ + NULL /* user_data */ + ); + } + } } gboolean -ibus_input_context_is_enabled (IBusInputContext *context) +ibus_input_context_needs_surrounding_text (IBusInputContext *context) +{ + IBusInputContextPrivate *priv; + priv = IBUS_INPUT_CONTEXT_GET_PRIVATE (IBUS_INPUT_CONTEXT (context)); + return priv->needs_surrounding_text; +} + +void +ibus_input_context_get_engine_async (IBusInputContext *context, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { g_assert (IBUS_IS_INPUT_CONTEXT (context)); - gboolean retval = FALSE; - - IBusMessage *reply_message; - IBusError *error = NULL; - - reply_message = ibus_proxy_call_with_reply_and_block ((IBusProxy *) context, - "IsEnabled", - -1, - &error, - G_TYPE_INVALID); - if (!reply_message) { - g_debug ("%s: %s", error->name, error->message); - ibus_error_free (error); - return FALSE; - } + g_dbus_proxy_call ((GDBusProxy *) context, + "GetEngine", /* method_name */ + NULL, /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + timeout_msec, + cancellable, + callback, + user_data); +} + +IBusEngineDesc * +ibus_input_context_get_engine_async_finish (IBusInputContext *context, + GAsyncResult *res, + GError **error) +{ + g_assert (IBUS_IS_INPUT_CONTEXT (context)); + g_assert (G_IS_ASYNC_RESULT (res)); + g_assert (error == NULL || *error == NULL); - if (!ibus_message_get_args (reply_message, - &error, - G_TYPE_BOOLEAN, &retval, - G_TYPE_INVALID)) { - g_debug ("%s: %s", error->name, error->message); - ibus_error_free (error); - retval = FALSE; + GVariant *variant = g_dbus_proxy_call_finish ((GDBusProxy *) context, + res, error); + if (variant == NULL) { + return NULL; } - ibus_message_unref (reply_message); - return retval; + GVariant *engine_desc_variant = g_variant_get_child_value (variant, 0); + IBusEngineDesc *desc = IBUS_ENGINE_DESC (ibus_serializable_deserialize (engine_desc_variant)); + g_variant_unref (engine_desc_variant); + g_variant_unref (variant); + + return desc; } IBusEngineDesc * ibus_input_context_get_engine (IBusInputContext *context) { g_assert (IBUS_IS_INPUT_CONTEXT (context)); - IBusMessage *reply_message; - IBusError *error = NULL; - IBusSerializable *object = NULL; - - reply_message = ibus_proxy_call_with_reply_and_block ((IBusProxy *) context, - "GetEngine", - -1, - &error, - G_TYPE_INVALID); - if (!reply_message) { - g_debug ("%s: %s", error->name, error->message); - ibus_error_free (error); + GVariant *result = NULL; + GError *error = NULL; + result = g_dbus_proxy_call_sync ((GDBusProxy *) context, + "GetEngine", /* method_name */ + NULL, /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + -1, /* timeout */ + NULL, /* cancellable */ + &error /* error */ + ); + if (result == NULL) { + if (g_error_matches (error, IBUS_ERROR, IBUS_ERROR_NO_ENGINE)) { + g_debug ("%s.GetEngine: %s", + IBUS_INTERFACE_INPUT_CONTEXT, + error->message); + } + else { + g_warning ("%s.GetEngine: %s", + IBUS_INTERFACE_INPUT_CONTEXT, + error->message); + } + g_error_free (error); return NULL; } - if (!ibus_message_get_args (reply_message, - &error, - IBUS_TYPE_ENGINE_DESC, &object, - G_TYPE_INVALID)) { - g_debug ("%s: %s", error->name, error->message); - ibus_error_free (error); - ibus_message_unref (reply_message); - return NULL; - } - ibus_message_unref (reply_message); + GVariant *engine_desc_variant = g_variant_get_child_value (result, 0); + IBusEngineDesc *desc = IBUS_ENGINE_DESC (ibus_serializable_deserialize (engine_desc_variant)); + g_variant_unref (engine_desc_variant); + g_variant_unref (result); - return IBUS_ENGINE_DESC (object); + return desc; } void @@ -980,21 +1140,32 @@ ibus_input_context_set_engine (IBusInputContext *context, const gchar *name) { g_assert (IBUS_IS_INPUT_CONTEXT (context)); - - ibus_proxy_call ((IBusProxy *) context, - "SetEngine", - G_TYPE_STRING, &name, - G_TYPE_INVALID); + g_assert (name); + g_dbus_proxy_call ((GDBusProxy *) context, + "SetEngine", /* method_name */ + g_variant_new ("(s)", name), /* parameters */ + G_DBUS_CALL_FLAGS_NONE, /* flags */ + -1, /* timeout */ + NULL, /* cancellable */ + NULL, /* callback */ + NULL /* user_data */ + ); } -#define DEFINE_FUNC(name,Name) \ - void \ - ibus_input_context_##name (IBusInputContext *context) \ - { \ - g_assert (IBUS_IS_INPUT_CONTEXT (context)); \ - ibus_proxy_call ((IBusProxy *) context, \ - #Name, \ - G_TYPE_INVALID); \ +#define DEFINE_FUNC(name, Name) \ + void \ + ibus_input_context_##name (IBusInputContext *context) \ + { \ + g_assert (IBUS_IS_INPUT_CONTEXT (context)); \ + g_dbus_proxy_call ((GDBusProxy *) context, \ + #Name, /* method_name */ \ + NULL, /* parameters */ \ + G_DBUS_CALL_FLAGS_NONE, /* flags */ \ + -1, /* timeout */ \ + NULL, /* cancellable */ \ + NULL, /* callback */ \ + NULL /* user_data */ \ + ); \ } DEFINE_FUNC(focus_in, FocusIn); @@ -1004,8 +1175,4 @@ DEFINE_FUNC(page_up, PageUp); DEFINE_FUNC(page_down, PageDown); DEFINE_FUNC(cursor_up, CursorUp); DEFINE_FUNC(cursor_down, CursorDown); -DEFINE_FUNC(enable, Enable); -DEFINE_FUNC(disable, Disable); - #undef DEFINE_FUNC - diff --git a/src/ibusinputcontext.h b/src/ibusinputcontext.h index 026460ba5..659732b1b 100644 --- a/src/ibusinputcontext.h +++ b/src/ibusinputcontext.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusinputcontext * @short_description: IBus input context proxy object. @@ -35,6 +41,7 @@ #include "ibusproxy.h" #include "ibusenginedesc.h" +#include "ibustext.h" /* * Type macros. @@ -65,8 +72,8 @@ typedef struct _IBusInputContextClass IBusInputContextClass; * An opaque data type representing an IBusInputContext. */ struct _IBusInputContext { - IBusProxy parent; - /* instance members */ + IBusProxy parent; + /* instance members */ }; struct _IBusInputContextClass { @@ -83,35 +90,142 @@ GType ibus_input_context_get_type (void); /** * ibus_input_context_new: * @path: The path to the object that emitting the signal. - * @connection: An IBusConnection. + * @connection: An #GDBusConnection. + * @cancellable: A #GCancellable or %NULL. + * @error: Return location for error or %NULL. + * * @returns: A newly allocated IBusInputContext. * * New an IBusInputContext. */ -IBusInputContext - *ibus_input_context_new (const gchar *path, - IBusConnection *connection); +IBusInputContext * + ibus_input_context_new (const gchar *path, + GDBusConnection *connection, + GCancellable *cancellable, + GError **error); +/** + * ibus_input_context_new_async: + * @path: The path to the object that emitting the signal. + * @connection: An #GDBusConnection. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * The callback should not be %NULL. + * @user_data: The data to pass to callback. + * + * New an #IBusInputContext asynchronously. + */ +void ibus_input_context_new_async (const gchar *path, + GDBusConnection *connection, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +/** + * ibus_input_context_new_async_finish: + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback pass to + * ibus_input_context_new_async(). + * @error: Return location for error or %NULL. + * + * @returns: A newly allocated #IBusInputContext. + * + * Finishes an operation started with ibus_input_context_new_async(). + */ +IBusInputContext * + ibus_input_context_new_async_finish + (GAsyncResult *res, + GError **error); /** * ibus_input_context_get_input_context: * @path: The path to the object that emitting the signal. - * @connection: An IBusConnection. - * @returns: An existing IBusInputContext. + * @connection: An #GDBusConnection. + * @returns: (transfer none): An existing #IBusInputContext. * * Gets an existing IBusInputContext. */ -IBusInputContext - *ibus_input_context_get_input_context +IBusInputContext * + ibus_input_context_get_input_context + (const gchar *path, + GDBusConnection *connection); +/** + * ibus_input_context_get_input_context_async: + * @path: The path to the object that emitting the signal. + * @connection: An #GDBusConnection. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied. + * The callback should not be %NULL. + * @user_data: The data to pass to callback. + * + * Get an existing #IBusInputContext asynchronously. + */ +void ibus_input_context_get_input_context_async (const gchar *path, - IBusConnection *connection); + GDBusConnection *connection, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); /** - * ibus_input_context_process_key_event: + * ibus_input_context_get_input_context_async_finish: + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback pass to + * ibus_input_context_get_input_context_async(). + * @error: Return location for error or %NULL. + * + * @returns: (transfer none): An existing #IBusInputContext. + * + * Finishes an operation started with ibus_input_contex_get_input_context_async(). + */ +IBusInputContext * + ibus_input_context_get_input_context_async_finish + (GAsyncResult *res, + GError **error); + +/** + * ibus_input_context_process_hand_writing_event + * @context: An IBusInputContext. + * @coordinates: An array of gdouble (0.0 to 1.0) which represents a stroke (i.e. [x1, y1, x2, y2, x3, y3, ...]). + * @coordinates_len: The number of elements in the array. The number should be even and >= 4. + * + * Pass a handwriting stroke to an input method engine. + * + * In this API, a coordinate (0.0, 0.0) represents the top-left corner of an area for + * handwriting, and (1.0, 1.0) does the bottom-right. Therefore, for example, if + * a user writes a character 'L', the array would be something like [0.0, 0.0, 0.0, 1.0, 1.0, 1.0] + * and coordinates_len would be 6. + * + * The function is usually called when a user releases the mouse button in a hand + * writing area. + * + * see_also: #IBusEngine::process-hand-writing-event + */ +void ibus_input_context_process_hand_writing_event + (IBusInputContext *context, + const gdouble *coordinates, + guint coordinates_len); + +/** + * ibus_input_context_cancel_hand_writing + * @context: An IBusInputContext. + * @n_strokes: The number of strokes to be removed. Pass 0 to remove all. + * + * Clear handwriting stroke(s) in the current input method engine. + * + * see_also: #IBusEngine::cancel-hand-writing + */ +void ibus_input_context_cancel_hand_writing + (IBusInputContext *context, + guint n_strokes); + +/** + * ibus_input_context_process_key_event_async: * @context: An IBusInputContext. * @keyval: Key symbol of a key event. * @keycode: Keycode of a key event. * @state: Key modifier flags. - * @returns: TRUE for successfully process the key; FALSE otherwise. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A GCancellable or NULL. + * @callback: A GAsyncReadyCallback to call when the request is satisfied or NULL + * if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. * * Pass the key event to input method engine. * @@ -131,7 +245,45 @@ IBusInputContext * * Use ibus_keymap_lookup_keysym() to convert keycode to keysym in given keyboard layout. * - * @see_also: #IBusEngine::process-key-event + * see_also: #IBusEngine::process-key-event + */ +void ibus_input_context_process_key_event_async + (IBusInputContext *context, + guint32 keyval, + guint32 keycode, + guint32 state, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +/** + * ibus_input_context_process_key_event_async_finish: + * @context: An IBusInputContext. + * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to + * ibus_input_context_process_key_event_async(). + * @error: Return location for error or NULL. + * @returns: %TRUE if the key event is processed; + * %FALSE otherwise or some errors happen and the @error will be set. + * + * Finishes an operation started with ibus_input_context_process_key_event_async(). + */ +gboolean ibus_input_context_process_key_event_async_finish + (IBusInputContext *context, + GAsyncResult *res, + GError **error); + +/** + * ibus_input_context_process_key_event: + * @context: An IBusInputContext. + * @keyval: Key symbol of a key event. + * @keycode: Keycode of a key event. + * @state: Key modifier flags. + * @returns: TRUE for successfully process the key; FALSE otherwise. + * + * Pass the key event to input method engine and wait for the reply from ibus (i.e. synchronous IPC). + * + * See also: ibus_input_context_process_key_event_async() */ gboolean ibus_input_context_process_key_event (IBusInputContext *context, @@ -139,6 +291,7 @@ gboolean ibus_input_context_process_key_event guint32 keycode, guint32 state); + /** * ibus_input_context_set_cursor_location: * @context: An IBusInputContext. @@ -147,9 +300,9 @@ gboolean ibus_input_context_process_key_event * @w: Width of the cursor. * @h: Height of the cursor. * - * Set the cursor location of IBus input context. + * Set the cursor location of IBus input context asynchronously. * - * @see_also: #IBusEngine::set-cursor-location + * see_also: #IBusEngine::set-cursor-location */ void ibus_input_context_set_cursor_location (IBusInputContext *context, @@ -162,9 +315,11 @@ void ibus_input_context_set_cursor_location * @context: An IBusInputContext. * @capabilities: Capabilities flags of IBusEngine, see #IBusCapabilite * - * Set the capabilities flags of client application. + * Set the capabilities flags of client application asynchronously. + * When IBUS_CAP_FOCUS is not set, IBUS_CAP_PREEDIT_TEXT, IBUS_CAP_AUXILIARY_TEXT, IBUS_CAP_LOOKUP_TABLE, and IBUS_CAP_PROPERTY have to be all set. + * The panel component does nothing for an application that doesn't support focus. * - * @see_also: #IBusEngine::set-capabilities + * see_also: #IBusEngine::set-capabilities */ void ibus_input_context_set_capabilities (IBusInputContext *context, @@ -176,22 +331,22 @@ void ibus_input_context_set_capabilities * @prop_name: A property name (e.g. "InputMode.WideLatin") * @state: A status of the property (e.g. PROP_STATE_CHECKED) * - * Activate the property. + * Activate the property asynchronously. * - * @see_also: #IBusEngine::property_activate + * See also: #IBusEngine::property_activate */ void ibus_input_context_property_activate (IBusInputContext *context, const gchar *prop_name, - gint32 state); + guint32 state); /** * ibus_input_context_focus_in: * @context: An IBusInputContext. * - * Invoked when the client application get focus. + * Invoked when the client application get focus. An asynchronous IPC will be performed. * - * @see_also: #IBusEngine::focus_in. + * see_also: #IBusEngine::focus_in. */ void ibus_input_context_focus_in (IBusInputContext *context); @@ -199,9 +354,9 @@ void ibus_input_context_focus_in (IBusInputContext *context); * ibus_input_context_focus_out: * @context: An IBusInputContext. * - * Invoked when the client application get focus. + * Invoked when the client application get focus. An asynchronous IPC will be performed. * - * @see_also: #IBusEngine::focus_out. + * see_also: #IBusEngine::focus_out. */ void ibus_input_context_focus_out (IBusInputContext *context); @@ -210,51 +365,56 @@ void ibus_input_context_focus_out (IBusInputContext *context); * ibus_input_context_reset: * @context: An IBusInputContext. * - * Invoked when the IME is reset. + * Invoked when the IME is reset. An asynchronous IPC will be performed. * - * @see_also: #IBusEngine::reset + * see_also: #IBusEngine::reset */ void ibus_input_context_reset (IBusInputContext *context); /** - * ibus_input_context_enable: - * @context: An IBusInputContext. - * - * Invoked when the IME is enabled, either by IME switch hotkey or select from the menu. - * - * @see_also: #IBusEngine::enable - */ -void ibus_input_context_enable (IBusInputContext *context); - -/** - * ibus_input_context_disable: - * @context: An IBusInputContext. - * - * Invoked when the IME is disabled, either by IME switch hotkey or select from the menu. - * - * @see_also: #IBusEngine::disable + * ibus_input_context_get_engine_async: + * @context: An #IBusInputContext. + * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. + * @cancellable: A #GCancellable or %NULL. + * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL + * if you don't care about the result of the method invocation. + * @user_data: The data to pass to callback. + * + * An asynchronous IPC will be performed. */ -void ibus_input_context_disable (IBusInputContext *context); - +void ibus_input_context_get_engine_async + (IBusInputContext *context, + gint timeout_msec, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); /** - * ibus_input_context_is_enabled: - * @context: An IBusInputContext. - * @returns: TRUE if the IME is enabled on the context. - * - * Returns TRUE if the IME is enabled on the context. + * ibus_input_context_get_engine_async_finish: + * @context: An #IBusInputContext. + * @res: A #GAsyncResult obtained from the #GAsyncReadyCallback passed to + * ibus_input_context_get_engine_async(). + * @error: Return location for error or %NULL. + * @returns: (transfer none): An IME engine description for the context, or %NULL. + * + * Finishes an operation started with ibus_input_context_get_engine_async(). */ -gboolean ibus_input_context_is_enabled (IBusInputContext *context); +IBusEngineDesc * + ibus_input_context_get_engine_async_finish + (IBusInputContext *context, + GAsyncResult *res, + GError **error); /** * ibus_input_context_get_engine: * @context: An IBusInputContext. - * @returns: An IME engine description for the context + * @returns: (transfer none): An IME engine description for the context, or NULL. * * Returns an IME engine description for the context. + * A synchronous IPC will be performed. */ -IBusEngineDesc - *ibus_input_context_get_engine (IBusInputContext *context); +IBusEngineDesc * + ibus_input_context_get_engine (IBusInputContext *context); /** * ibus_input_context_set_engine: @@ -262,11 +422,34 @@ IBusEngineDesc * @name: A name of the engine. * * Invoked when the IME engine is changed. + * An asynchronous IPC will be performed. */ void ibus_input_context_set_engine (IBusInputContext *context, const gchar *name); +/** + * ibus_input_context_set_surrounding_text: + * @context: An #IBusInputContext. + * @text: An #IBusText surrounding the current cursor on the application. + * @cursor_pos: Current cursor position in characters in @text. + * @anchor_pos: Anchor position of selection in @text. +*/ +void ibus_input_context_set_surrounding_text + (IBusInputContext *context, + IBusText *text, + guint32 cursor_pos, + guint32 anchor_pos); + +/** + * ibus_input_context_needs_surrounding_text: + * @context: An #IBusInputContext. + * @returns: %TRUE if surrounding-text is needed by the current engine; + * %FALSE otherwise. + * + * Check whether the current engine requires surrounding-text. + */ +gboolean ibus_input_context_needs_surrounding_text + (IBusInputContext *context); G_END_DECLS #endif - diff --git a/src/ibusinternal.c b/src/ibusinternal.c deleted file mode 100644 index 4a03a5a10..000000000 --- a/src/ibusinternal.c +++ /dev/null @@ -1,670 +0,0 @@ -/* vim:set et sts=4: */ -/* ibus - The Input Bus - * Copyright (C) 2008-2010 Peng Huang - * Copyright (C) 2008-2010 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#include -#include "ibusinternal.h" - -/** - * IBusMessageQueue: - * @source: The parent GSource. - * @connection: The connection to dispatch. - * - * A GSource subclass for dispatching DBusConnection messages. - * We need this on top of the IO handlers, because sometimes - * there are messages to dispatch queued up but no IO pending. - */ -typedef struct -{ - GSource source; - DBusConnection *connection; -} IBusMessageQueue; - -static gboolean message_queue_prepare (GSource *source, - gint *timeout); -static gboolean message_queue_check (GSource *source); -static gboolean message_queue_dispatch (GSource *source, - GSourceFunc callback, - gpointer user_data); - -static const GSourceFuncs message_queue_funcs = { - message_queue_prepare, - message_queue_check, - message_queue_dispatch, - NULL -}; - -static gboolean -message_queue_prepare (GSource *source, - gint *timeout) -{ - DBusConnection *connection = ((IBusMessageQueue *)source)->connection; - - *timeout = -1; - - return (dbus_connection_get_dispatch_status (connection) == DBUS_DISPATCH_DATA_REMAINS); -} - -static gboolean -message_queue_check (GSource *source) -{ - return FALSE; -} - -static gboolean -message_queue_dispatch (GSource *source, - GSourceFunc callback, - gpointer user_data) -{ - DBusConnection *connection = ((IBusMessageQueue *)source)->connection; - - dbus_connection_ref (connection); - - /* Only dispatch once - we don't want to starve other GSource */ - dbus_connection_dispatch (connection); - - dbus_connection_unref (connection); - - return TRUE; -} - -/** - * ConnectionSetup: - * @context: The main context. - * @ios: All IOHandler. - * @timeouts: All TimeoutHandler. - * @connection: NULL if this is really for a server not a connection. - * @message_queue_source: IBusMessageQueue. - * - */ -GSource *message_queue_source; /**< IBusMessageQueue */ -typedef struct -{ - GMainContext *context; /**< the main context */ - GSList *ios; /**< all IOHandler */ - GSList *timeouts; /**< all TimeoutHandler */ - DBusConnection *connection; /**< NULL if this is really for a server not a connection */ - GSource *message_queue_source; /**< IBusMessageQueue */ -} ConnectionSetup; - - -typedef struct -{ - ConnectionSetup *cs; - GSource *source; - DBusWatch *watch; -} IOHandler; - -typedef struct -{ - ConnectionSetup *cs; - GSource *source; - DBusTimeout *timeout; -} TimeoutHandler; - -dbus_int32_t _dbus_gmain_connection_slot = -1; -static dbus_int32_t server_slot = -1; - -static ConnectionSetup* -connection_setup_new (GMainContext *context, - DBusConnection *connection) -{ - ConnectionSetup *cs; - - cs = g_slice_new0 (ConnectionSetup); - - g_assert (context != NULL); - - cs->context = context; - g_main_context_ref (cs->context); - - if (connection) { - cs->connection = connection; - - cs->message_queue_source = g_source_new ((GSourceFuncs *) &message_queue_funcs, - sizeof (IBusMessageQueue)); - ((IBusMessageQueue*)cs->message_queue_source)->connection = connection; - g_source_attach (cs->message_queue_source, cs->context); - } - return cs; -} - -static void -io_handler_source_finalized (gpointer data) -{ - IOHandler *handler; - - handler = data; - - if (handler->watch) - dbus_watch_set_data (handler->watch, NULL, NULL); - - g_slice_free (IOHandler, handler); -} - -static void -io_handler_destroy_source (void *data) -{ - IOHandler *handler; - - handler = data; - - if (handler->source) { - GSource *source = handler->source; - handler->source = NULL; - handler->cs->ios = g_slist_remove (handler->cs->ios, handler); - g_source_destroy (source); - g_source_unref (source); - } -} - -static void -io_handler_watch_freed (void *data) -{ - IOHandler *handler; - - handler = data; - - handler->watch = NULL; - - io_handler_destroy_source (handler); -} - -static gboolean -io_handler_dispatch (GIOChannel *source, - GIOCondition condition, - gpointer data) -{ - IOHandler *handler; - guint dbus_condition = 0; - DBusConnection *connection; - - handler = data; - - connection = handler->cs->connection; - - if (connection) - dbus_connection_ref (connection); - - if (condition & G_IO_IN) - dbus_condition |= DBUS_WATCH_READABLE; - if (condition & G_IO_OUT) - dbus_condition |= DBUS_WATCH_WRITABLE; - if (condition & G_IO_ERR) - dbus_condition |= DBUS_WATCH_ERROR; - if (condition & G_IO_HUP) - dbus_condition |= DBUS_WATCH_HANGUP; - - /* Note that we don't touch the handler after this, because - * dbus may have disabled the watch and thus killed the - * handler. - */ - dbus_watch_handle (handler->watch, dbus_condition); - handler = NULL; - - if (connection) - dbus_connection_unref (connection); - - return TRUE; -} - -static void -connection_setup_add_watch (ConnectionSetup *cs, - DBusWatch *watch) -{ - guint flags; - GIOCondition condition; - GIOChannel *channel; - IOHandler *handler; - - if (!dbus_watch_get_enabled (watch)) - return; - - g_assert (dbus_watch_get_data (watch) == NULL); - - flags = dbus_watch_get_flags (watch); - - condition = G_IO_ERR | G_IO_HUP; - if (flags & DBUS_WATCH_READABLE) - condition |= G_IO_IN; - if (flags & DBUS_WATCH_WRITABLE) - condition |= G_IO_OUT; - - handler = g_slice_new (IOHandler); - handler->cs = cs; - handler->watch = watch; - - channel = g_io_channel_unix_new (dbus_watch_get_unix_fd (watch)); - - handler->source = g_io_create_watch (channel, condition); - g_source_set_callback (handler->source, (GSourceFunc) io_handler_dispatch, handler, - io_handler_source_finalized); - g_source_attach (handler->source, cs->context); - - cs->ios = g_slist_prepend (cs->ios, handler); - - dbus_watch_set_data (watch, handler, io_handler_watch_freed); - g_io_channel_unref (channel); -} - -static void -connection_setup_remove_watch (ConnectionSetup *cs, - DBusWatch *watch) -{ - IOHandler *handler; - - handler = dbus_watch_get_data (watch); - - if (handler == NULL) - return; - - io_handler_destroy_source (handler); -} - -static void -timeout_handler_source_finalized (gpointer data) -{ - TimeoutHandler *handler; - - handler = data; - - if (handler->timeout) - dbus_timeout_set_data (handler->timeout, NULL, NULL); - - g_slice_free (TimeoutHandler, handler); -} - -static void -timeout_handler_destroy_source (void *data) -{ - TimeoutHandler *handler; - - handler = data; - - if (handler->source) { - GSource *source = handler->source; - handler->source = NULL; - handler->cs->timeouts = g_slist_remove (handler->cs->timeouts, handler); - g_source_destroy (source); - g_source_unref (source); - } -} - -static void -timeout_handler_timeout_freed (void *data) -{ - TimeoutHandler *handler; - - handler = data; - - handler->timeout = NULL; - - timeout_handler_destroy_source (handler); -} - -static gboolean -timeout_handler_dispatch (gpointer data) -{ - TimeoutHandler *handler; - - handler = data; - - dbus_timeout_handle (handler->timeout); - - return TRUE; -} - -static void -connection_setup_add_timeout (ConnectionSetup *cs, - DBusTimeout *timeout) -{ - TimeoutHandler *handler; - - if (!dbus_timeout_get_enabled (timeout)) - return; - - g_assert (dbus_timeout_get_data (timeout) == NULL); - - handler = g_slice_new0 (TimeoutHandler); - handler->cs = cs; - handler->timeout = timeout; - - handler->source = g_timeout_source_new (dbus_timeout_get_interval (timeout)); - g_source_set_callback (handler->source, timeout_handler_dispatch, handler, - timeout_handler_source_finalized); - g_source_attach (handler->source, handler->cs->context); - - cs->timeouts = g_slist_prepend (cs->timeouts, handler); - - dbus_timeout_set_data (timeout, handler, timeout_handler_timeout_freed); -} - -static void -connection_setup_remove_timeout (ConnectionSetup *cs, - DBusTimeout *timeout) -{ - TimeoutHandler *handler; - - handler = dbus_timeout_get_data (timeout); - - if (handler == NULL) - return; - - timeout_handler_destroy_source (handler); -} - -static void -connection_setup_free (ConnectionSetup *cs) -{ - while (cs->ios) - io_handler_destroy_source (cs->ios->data); - - while (cs->timeouts) - timeout_handler_destroy_source (cs->timeouts->data); - - if (cs->message_queue_source) { - GSource *source; - - source = cs->message_queue_source; - cs->message_queue_source = NULL; - - g_source_destroy (source); - g_source_unref (source); - } - - g_main_context_unref (cs->context); - g_slice_free (ConnectionSetup, cs); -} - -static dbus_bool_t -add_watch (DBusWatch *watch, - gpointer data) -{ - ConnectionSetup *cs; - - cs = data; - - connection_setup_add_watch (cs, watch); - - return TRUE; -} - -static void -remove_watch (DBusWatch *watch, - gpointer data) -{ - ConnectionSetup *cs; - - cs = data; - - connection_setup_remove_watch (cs, watch); -} - -static void -watch_toggled (DBusWatch *watch, - void *data) -{ - /* Because we just exit on OOM, enable/disable is - * no different from add/remove - */ - if (dbus_watch_get_enabled (watch)) - add_watch (watch, data); - else - remove_watch (watch, data); -} - -static dbus_bool_t -add_timeout (DBusTimeout *timeout, - void *data) -{ - ConnectionSetup *cs; - - cs = data; - - if (!dbus_timeout_get_enabled (timeout)) - return TRUE; - - connection_setup_add_timeout (cs, timeout); - - return TRUE; -} - -static void -remove_timeout (DBusTimeout *timeout, - void *data) -{ - ConnectionSetup *cs; - - cs = data; - - connection_setup_remove_timeout (cs, timeout); -} - -static void -timeout_toggled (DBusTimeout *timeout, - void *data) -{ - /* Because we just exit on OOM, enable/disable is - * no different from add/remove - */ - if (dbus_timeout_get_enabled (timeout)) - add_timeout (timeout, data); - else - remove_timeout (timeout, data); -} - -static void -wakeup_main (void *data) -{ - ConnectionSetup *cs = data; - - g_main_context_wakeup (cs->context); -} - - -/* Move to a new context */ -static ConnectionSetup* -connection_setup_new_from_old (GMainContext *context, - ConnectionSetup *old) -{ - GSList *tmp; - ConnectionSetup *cs; - - g_assert (old->context != context); - - cs = connection_setup_new (context, old->connection); - - tmp = old->ios; - while (tmp != NULL) { - IOHandler *handler = tmp->data; - - connection_setup_add_watch (cs, handler->watch); - - tmp = tmp->next; - } - - tmp = old->timeouts; - while (tmp != NULL) { - TimeoutHandler *handler = tmp->data; - - connection_setup_add_timeout (cs, handler->timeout); - - tmp = tmp->next; - } - - return cs; -} - -/** @} */ /* End of GLib bindings internals */ - -/* @addtogroup IBusLib - * @{ - */ - -/** - * dbus_connection_setup_with_g_main: - * @connection: the connection - * @context: the #GMainContext or #NULL for default context - * - * Sets the watch and timeout functions of a #DBusConnection - * to integrate the connection with the GLib main loop. - * Pass in #NULL for the #GMainContext unless you're - * doing something specialized. - * - * If called twice for the same context, does nothing the second - * time. If called once with context A and once with context B, - * context B replaces context A as the context monitoring the - * connection. - */ -void -dbus_connection_setup (DBusConnection *connection, - GMainContext *context) -{ - ConnectionSetup *old_setup; - ConnectionSetup *cs; - - do { - /* FIXME we never free the slot, so its refcount just keeps growing, - * which is kind of broken. - */ - dbus_connection_allocate_data_slot (&_dbus_gmain_connection_slot); - if (_dbus_gmain_connection_slot < 0) - break; - - if (context == NULL) - context = g_main_context_default (); - - cs = NULL; - - old_setup = dbus_connection_get_data (connection, _dbus_gmain_connection_slot); - if (old_setup != NULL) { - if (old_setup->context == context) - return; /* nothing to do */ - - cs = connection_setup_new_from_old (context, old_setup); - - /* Nuke the old setup */ - dbus_connection_set_data (connection, _dbus_gmain_connection_slot, NULL, NULL); - old_setup = NULL; - } - - if (cs == NULL) - cs = connection_setup_new (context, connection); - - if (!dbus_connection_set_data (connection, _dbus_gmain_connection_slot, cs, - (DBusFreeFunction)connection_setup_free)) - break; - - if (!dbus_connection_set_watch_functions (connection, - add_watch, - remove_watch, - watch_toggled, - cs, NULL)) - break; - - if (!dbus_connection_set_timeout_functions (connection, - add_timeout, - remove_timeout, - timeout_toggled, - cs, NULL)) - break; - - dbus_connection_set_wakeup_main_function (connection, - wakeup_main, - cs, NULL); - - return; - } while (0); - - g_error ("Not enough memory to set up DBusConnection for use with GLib"); -} - -/** - * dbus_server_setup_with_g_main: - * @server: the server - * @context: the #GMainContext or #NULL for default - * - * Sets the watch and timeout functions of a #DBusServer - * to integrate the server with the GLib main loop. - * In most cases the context argument should be #NULL. - * - * If called twice for the same context, does nothing the second - * time. If called once with context A and once with context B, - * context B replaces context A as the context monitoring the - * connection. - */ -void -dbus_server_setup (DBusServer *server, - GMainContext *context) -{ - ConnectionSetup *old_setup; - ConnectionSetup *cs; - - do { - /* FIXME we never free the slot, so its refcount just keeps growing, - * which is kind of broken. - */ - dbus_server_allocate_data_slot (&server_slot); - if (server_slot < 0) - break; - - if (context == NULL) - context = g_main_context_default (); - - cs = NULL; - - old_setup = dbus_server_get_data (server, server_slot); - if (old_setup != NULL) { - if (old_setup->context == context) - return; /* nothing to do */ - - cs = connection_setup_new_from_old (context, old_setup); - - /* Nuke the old setup */ - dbus_server_set_data (server, server_slot, NULL, NULL); - old_setup = NULL; - } - - if (cs == NULL) - cs = connection_setup_new (context, NULL); - - if (!dbus_server_set_data (server, server_slot, cs, - (DBusFreeFunction)connection_setup_free)) - break; - - if (!dbus_server_set_watch_functions (server, - add_watch, - remove_watch, - watch_toggled, - cs, NULL)) - break; - - if (!dbus_server_set_timeout_functions (server, - add_timeout, - remove_timeout, - timeout_toggled, - cs, NULL)) - break; - - return; - } while (0); - - g_error ("Not enough memory to set up DBusServer for use with GLib"); -} - diff --git a/src/ibusinternal.h b/src/ibusinternal.h index 28d673339..6feb5f391 100644 --- a/src/ibusinternal.h +++ b/src/ibusinternal.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,23 +19,24 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusinternal - * @short_description: IBus DBus setting functions for internal use. + * @short_description: IBus internal. * @title: IBusInternal * @stability: Stable * * This section contain several IBus house keeping functions. * - * @see_also: #IBusMainLoop - * */ #ifndef __IBUS_INTERNEL_H_ #define __IBUS_INTERNEL_H_ #include -#include "ibusdbus.h" - /** * I_: * @string: A string @@ -45,42 +47,5 @@ */ #define I_(string) g_intern_static_string (string) -/** - * dbus_server_setup: - * @server: the server - * @context: the #GMainContext or #NULL for default - * - * Sets the watch and timeout functions of a #DBusServer - * to integrate the server with the GLib main loop. - * In most cases the context argument should be #NULL. - * - * If called twice for the same context, does nothing the second - * time. If called once with context A and once with context B, - * context B replaces context A as the context monitoring the - * connection. - */ -void dbus_server_setup (DBusServer *server, - GMainContext *context); - -/** - * dbus_connection_setup: - * @connection: the connection - * @context: the #GMainContext or #NULL for default context - * - * Sets the watch and timeout functions of a #DBusConnection - * to integrate the connection with the GLib main loop. - * Pass in #NULL for the #GMainContext unless you're - * doing something specialized. - * - * If called twice for the same context, does nothing the second - * time. If called once with context A and once with context B, - * context B replaces context A as the context monitoring the - * connection. - */ -void dbus_connection_setup (DBusConnection *connection, - GMainContext *context); - - - #endif diff --git a/src/ibuskeymap.c b/src/ibuskeymap.c index 19b1c39c6..e6d454770 100644 --- a/src/ibuskeymap.c +++ b/src/ibuskeymap.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -23,7 +24,7 @@ #include #include #include -#include "ibusshare.h" +#include "ibuskeys.h" #include "ibuskeysyms.h" #include "ibuskeymap.h" @@ -32,14 +33,14 @@ typedef guint KEYMAP[256][7]; static void ibus_keymap_destroy (IBusKeymap *keymap); static gboolean ibus_keymap_load (const gchar *name, KEYMAP keymap); -static GHashTable *keymaps = NULL; +static GHashTable *keymaps = NULL; G_DEFINE_TYPE (IBusKeymap, ibus_keymap, IBUS_TYPE_OBJECT) static void -ibus_keymap_class_init (IBusKeymapClass *klass) +ibus_keymap_class_init (IBusKeymapClass *class) { - IBusObjectClass *object_class = IBUS_OBJECT_CLASS (klass); + IBusObjectClass *object_class = IBUS_OBJECT_CLASS (class); object_class->destroy = (IBusObjectDestroyFunc) ibus_keymap_destroy; } @@ -50,7 +51,7 @@ ibus_keymap_init (IBusKeymap *keymap) gint i; keymap->name = NULL; for (i = 0; i < sizeof (keymap->keymap) / sizeof (guint); i++) { - ((guint *)keymap->keymap)[i] = IBUS_VoidSymbol; + ((guint *)keymap->keymap)[i] = IBUS_KEY_VoidSymbol; } } @@ -118,7 +119,7 @@ ibus_keymap_parse_line (gchar *str, if (keycode == 0 && p1 == p2) return FALSE; - if (keycode < 0 || keycode > 255) + if ((int) keycode < 0 || keycode > 255) return FALSE; p1 = p2; @@ -135,7 +136,7 @@ ibus_keymap_parse_line (gchar *str, keysym = ibus_keyval_from_name (p1); - if (keysym == IBUS_VoidSymbol) + if (keysym == IBUS_KEY_VoidSymbol) return FALSE; if (i == 0 && @@ -201,23 +202,23 @@ ibus_keymap_fill (KEYMAP keymap) gint i; for (i = 0; i < 256; i++) { /* fill shift */ - if (keymap[i][1] == IBUS_VoidSymbol) + if (keymap[i][1] == IBUS_KEY_VoidSymbol) keymap[i][1] = keymap[i][0]; /* fill capslock */ - if (keymap[i][2] == IBUS_VoidSymbol) + if (keymap[i][2] == IBUS_KEY_VoidSymbol) keymap[i][2] = keymap[i][0]; /* fill shift capslock */ - if (keymap[i][3] == IBUS_VoidSymbol) + if (keymap[i][3] == IBUS_KEY_VoidSymbol) keymap[i][3] = keymap[i][1]; /* fill altgr */ - if (keymap[i][4] == IBUS_VoidSymbol) + if (keymap[i][4] == IBUS_KEY_VoidSymbol) keymap[i][4] = keymap[i][0]; /* fill shift altgr */ - if (keymap[i][5] == IBUS_VoidSymbol) + if (keymap[i][5] == IBUS_KEY_VoidSymbol) keymap[i][5] = keymap[i][1]; } } @@ -282,7 +283,8 @@ ibus_keymap_lookup_keysym (IBusKeymap *keymap, if (keycode < 256) { /* numlock */ - if ((state & IBUS_MOD2_MASK) && (keymap->keymap[keycode][6] != IBUS_VoidSymbol)) { + if ((state & IBUS_MOD2_MASK) && + (keymap->keymap[keycode][6] != IBUS_KEY_VoidSymbol)) { return keymap->keymap[keycode][6]; } @@ -308,5 +310,5 @@ ibus_keymap_lookup_keysym (IBusKeymap *keymap, } } - return IBUS_VoidSymbol; + return IBUS_KEY_VoidSymbol; } diff --git a/src/ibuskeymap.h b/src/ibuskeymap.h index 0d0d96980..9221babbb 100644 --- a/src/ibuskeymap.h +++ b/src/ibuskeymap.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibuskeymap * @short_description: Keyboard mapping handling. diff --git a/src/ibuskeynames.c b/src/ibuskeynames.c index 6c5d7fc02..39ec4275b 100644 --- a/src/ibuskeynames.c +++ b/src/ibuskeynames.c @@ -1,3 +1,5 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ /* GDK - The GIMP Drawing Kit * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * @@ -54,8 +56,8 @@ ibus_keyval_name (guint keyval) } found = bsearch (&keyval, gdk_keys_by_keyval, - IBUS_NUM_KEYS, sizeof (gdk_key), - gdk_keys_keyval_compare); + IBUS_NUM_KEYS, sizeof (gdk_key), + gdk_keys_keyval_compare); if (found != NULL) { @@ -78,7 +80,7 @@ static int gdk_keys_name_compare (const void *pkey, const void *pbase) { return strcmp ((const char *) pkey, - (const char *) (keynames + ((const gdk_key *) pbase)->offset)); + (const char *) (keynames + ((const gdk_key *) pbase)->offset)); } guint @@ -89,110 +91,110 @@ ibus_keyval_from_name (const gchar *keyval_name) g_return_val_if_fail (keyval_name != NULL, 0); found = bsearch (keyval_name, gdk_keys_by_name, - IBUS_NUM_KEYS, sizeof (gdk_key), - gdk_keys_name_compare); + IBUS_NUM_KEYS, sizeof (gdk_key), + gdk_keys_name_compare); if (found != NULL) return found->keyval; else - return IBUS_VoidSymbol; + return IBUS_KEY_VoidSymbol; } static const gchar * modifier_name[] = { - "Shift", // 0 - "Lock", // 1 - "Control", // 2 - "Alt", // 3 - "Mod2", // 4 - "Mod3", // 5 - "Mod4", // 6 - "Mod5", // 7 - "Button1", // 8 - "Button2", // 9 - "Button3", // 10 - "Button4", // 11 - "Button5", // 12 + "Shift", // 0 + "Lock", // 1 + "Control", // 2 + "Alt", // 3 + "Mod2", // 4 + "Mod3", // 5 + "Mod4", // 6 + "Mod5", // 7 + "Button1", // 8 + "Button2", // 9 + "Button3", // 10 + "Button4", // 11 + "Button5", // 12 NULL, NULL, NULL, NULL, NULL, // 13 - 17 NULL, NULL, NULL, NULL, NULL, // 18 - 22 NULL, NULL, NULL, // 23 - 25 - "Supper", // 26 - "Hyper", // 27 - "Meta", // 28 - NULL, // 29 - "Release", // 30 - NULL, // 31 + "Super", // 26 + "Hyper", // 27 + "Meta", // 28 + NULL, // 29 + "Release", // 30 + NULL, // 31 }; const gchar * ibus_key_event_to_string (guint keyval, - guint modifiers) + guint modifiers) { - guint i; - GString *str; - const gchar *keyval_name; + guint i; + GString *str; + const gchar *keyval_name; - g_return_val_if_fail (keyval != IBUS_VoidSymbol, NULL); + g_return_val_if_fail (keyval != IBUS_KEY_VoidSymbol, NULL); - keyval_name = ibus_keyval_name (keyval); - g_return_val_if_fail (keyval_name != NULL, NULL); + keyval_name = ibus_keyval_name (keyval); + g_return_val_if_fail (keyval_name != NULL, NULL); - str = g_string_new (""); + str = g_string_new (""); - for (i = 0; i < 32; i++) { - guint mask = 1 << i; + for (i = 0; i < 32; i++) { + guint mask = 1 << i; - if ((modifiers & mask) == 0) - continue; - if (modifier_name[i] == NULL) - continue; + if ((modifiers & mask) == 0) + continue; + if (modifier_name[i] == NULL) + continue; - g_string_append (str, modifier_name[i]); - g_string_append_c (str, '+'); - } + g_string_append (str, modifier_name[i]); + g_string_append_c (str, '+'); + } - g_string_append (str, keyval_name); + g_string_append (str, keyval_name); - return g_string_free (str, FALSE); + return g_string_free (str, FALSE); } gboolean ibus_key_event_from_string (const gchar *string, - guint *keyval, - guint *modifiers) + guint *keyval, + guint *modifiers) { - g_return_val_if_fail (string != NULL, FALSE); - g_return_val_if_fail (keyval != NULL, FALSE); - g_return_val_if_fail (modifiers != NULL, FALSE); - - gchar **tokens = NULL; - gchar **p; - gboolean retval = FALSE; - - tokens = g_strsplit (string, "+", 0); - g_return_val_if_fail (tokens != NULL, FALSE); - - *keyval = 0; - *modifiers = 0; - - for (p = tokens; *(p + 1) != NULL; p++) { - gint i; - for (i = 0; i < 32; i++) { - if (g_strcmp0 (modifier_name[i], *p) != 0) - continue; - *modifiers |= (1 << i); - break; - } - if (i == 32) { - goto _out; - } - } - - *keyval = ibus_keyval_from_name (*p); - if (*keyval != IBUS_VoidSymbol) - retval = TRUE; + g_return_val_if_fail (string != NULL, FALSE); + g_return_val_if_fail (keyval != NULL, FALSE); + g_return_val_if_fail (modifiers != NULL, FALSE); + + gchar **tokens = NULL; + gchar **p; + gboolean retval = FALSE; + + tokens = g_strsplit (string, "+", 0); + g_return_val_if_fail (tokens != NULL, FALSE); + + *keyval = 0; + *modifiers = 0; + + for (p = tokens; *(p + 1) != NULL; p++) { + gint i; + for (i = 0; i < 32; i++) { + if (g_strcmp0 (modifier_name[i], *p) != 0) + continue; + *modifiers |= (1 << i); + break; + } + if (i == 32) { + goto _out; + } + } + + *keyval = ibus_keyval_from_name (*p); + if (*keyval != IBUS_KEY_VoidSymbol) + retval = TRUE; _out: - if (tokens) - g_strfreev (tokens); - return retval; + if (tokens) + g_strfreev (tokens); + return retval; } diff --git a/src/ibuskeys.h b/src/ibuskeys.h new file mode 100644 index 000000000..e728c227d --- /dev/null +++ b/src/ibuskeys.h @@ -0,0 +1,76 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* ibus - The Input Bus + * Copyright (C) 2011 Peng Huang + * Copyright (C) 2011 Google, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + +#ifndef __IBUS_KEYS_H_ +#define __IBUS_KEYS_H_ + +#include + +/** + * ibus_keyval_name: + * @keyval: Key symbol. + * @returns: Corresponding key name. %NULL if no such key symbol. + * + * Return the name of a key symbol. + * + * Note that the returned string is used internally, so don't free it. + */ +const gchar *ibus_keyval_name (guint keyval); + +/** + * ibus_keyval_from_name: + * @keyval_name: Key name in #gdk_keys_by_name. + * @returns: Corresponding key symbol. + * + * Return the key symbol that associate with the key name. + */ +guint ibus_keyval_from_name (const gchar *keyval_name); + +/** + * ibus_unicode_to_keyval: + * @wc: a ISO10646 encoded character + * + * Convert from a ISO10646 character to a key symbol. + * + * Return value: the corresponding IBus key symbol, if one exists. + * or, if there is no corresponding symbol, + * wc | 0x01000000 + **/ +guint ibus_unicode_to_keyval (gunichar wc); + +/** + * ibus_keyval_to_unicode: + * @keyval: an IBus key symbol + * + * Convert from an IBus key symbol to the corresponding ISO10646 (Unicode) + * character. + * + * Return value: the corresponding unicode character, or 0 if there + * is no corresponding character. + **/ +gunichar ibus_keyval_to_unicode (guint keyval); + +#endif // __IBUS_KEYS_H_ diff --git a/src/ibuskeysyms-compat.h b/src/ibuskeysyms-compat.h new file mode 100644 index 000000000..c131ed13d --- /dev/null +++ b/src/ibuskeysyms-compat.h @@ -0,0 +1,2099 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* ibus - The Input Bus + * Copyright (C) 2008-2010 Peng Huang + * Copyright (C) 2008-2010 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + +/** + * SECTION: ibuskeysyms + * @short_description: Key symbol definition. + * @title: IBusKeysyms + * @stability: Stable + * + * This section defines the key symbols (keysym) used in IBus. + * Those keysym data is converted from keysymdef.h in + * FreeDesktop. + * + * Most of the key symbols are not explicit documented, + * because they are self-explaining. + * + * @see_also: #IBusKeymap, #IBusHotkeyProfile + * + */ + +#ifndef __IBUS_KEYSYMS_COMPAT_H__ +#define __IBUS_KEYSYMS_COMPAT_H__ + + +#define IBUS_VoidSymbol 0xffffff +#define IBUS_BackSpace 0xff08 +#define IBUS_Tab 0xff09 +#define IBUS_Linefeed 0xff0a +#define IBUS_Clear 0xff0b +#define IBUS_Return 0xff0d +#define IBUS_Pause 0xff13 +#define IBUS_Scroll_Lock 0xff14 +#define IBUS_Sys_Req 0xff15 +#define IBUS_Escape 0xff1b +#define IBUS_Delete 0xffff + + +/** + * IBUS_Multi_key: + * + * Key for composing characters. + * A.k.a. Compose Key. + */ +#define IBUS_Multi_key 0xff20 + +/** + * IBUS_Codeinput: + * + * International and multi-key character composition. + */ +#define IBUS_Codeinput 0xff37 +#define IBUS_SingleCandidate 0xff3c +#define IBUS_MultipleCandidate 0xff3d +#define IBUS_PreviousCandidate 0xff3e + +/** + * IBUS_Kanji: + * + * Japanese keyboard support. + */ +#define IBUS_Kanji 0xff21 + +/** + * IBUS_Muhenkan: + * + * Japanese keyboard support. + */ +#define IBUS_Muhenkan 0xff22 + +/** + * IBUS_Henkan_Mode: + * + * Japanese keyboard support. + */ +#define IBUS_Henkan_Mode 0xff23 + +/** + * IBUS_Henkan: + * + * Japanese keyboard support. + */ +#define IBUS_Henkan 0xff23 + +/** + * IBUS_Romaji: + * + * Japanese keyboard support. + */ +#define IBUS_Romaji 0xff24 + +/** + * IBUS_Hiragana: + * + * Japanese keyboard support. + */ +#define IBUS_Hiragana 0xff25 + +/** + * IBUS_Katakana: + * + * Japanese keyboard support. + */ +#define IBUS_Katakana 0xff26 + +/** + * IBUS_Hiragana_Katakana: + * + * Japanese keyboard support. + */ +#define IBUS_Hiragana_Katakana 0xff27 +#define IBUS_Zenkaku 0xff28 +#define IBUS_Hankaku 0xff29 +#define IBUS_Zenkaku_Hankaku 0xff2a +#define IBUS_Touroku 0xff2b +#define IBUS_Massyo 0xff2c +#define IBUS_Kana_Lock 0xff2d +#define IBUS_Kana_Shift 0xff2e +#define IBUS_Eisu_Shift 0xff2f +#define IBUS_Eisu_toggle 0xff30 +#define IBUS_Kanji_Bangou 0xff37 +#define IBUS_Zen_Koho 0xff3d +#define IBUS_Mae_Koho 0xff3e +#define IBUS_Home 0xff50 +#define IBUS_Left 0xff51 +#define IBUS_Up 0xff52 +#define IBUS_Right 0xff53 +#define IBUS_Down 0xff54 +#define IBUS_Prior 0xff55 +#define IBUS_Page_Up 0xff55 +#define IBUS_Next 0xff56 +#define IBUS_Page_Down 0xff56 +#define IBUS_End 0xff57 +#define IBUS_Begin 0xff58 +#define IBUS_Select 0xff60 +#define IBUS_Print 0xff61 +#define IBUS_Execute 0xff62 +#define IBUS_Insert 0xff63 +#define IBUS_Undo 0xff65 +#define IBUS_Redo 0xff66 +#define IBUS_Menu 0xff67 +#define IBUS_Find 0xff68 +#define IBUS_Cancel 0xff69 +#define IBUS_Help 0xff6a +#define IBUS_Break 0xff6b +#define IBUS_Mode_switch 0xff7e +#define IBUS_script_switch 0xff7e +#define IBUS_Num_Lock 0xff7f +#define IBUS_KP_Space 0xff80 +#define IBUS_KP_Tab 0xff89 +#define IBUS_KP_Enter 0xff8d +#define IBUS_KP_F1 0xff91 +#define IBUS_KP_F2 0xff92 +#define IBUS_KP_F3 0xff93 +#define IBUS_KP_F4 0xff94 +#define IBUS_KP_Home 0xff95 +#define IBUS_KP_Left 0xff96 +#define IBUS_KP_Up 0xff97 +#define IBUS_KP_Right 0xff98 +#define IBUS_KP_Down 0xff99 +#define IBUS_KP_Prior 0xff9a +#define IBUS_KP_Page_Up 0xff9a +#define IBUS_KP_Next 0xff9b +#define IBUS_KP_Page_Down 0xff9b +#define IBUS_KP_End 0xff9c +#define IBUS_KP_Begin 0xff9d +#define IBUS_KP_Insert 0xff9e +#define IBUS_KP_Delete 0xff9f +#define IBUS_KP_Equal 0xffbd +#define IBUS_KP_Multiply 0xffaa +#define IBUS_KP_Add 0xffab +#define IBUS_KP_Separator 0xffac +#define IBUS_KP_Subtract 0xffad +#define IBUS_KP_Decimal 0xffae +#define IBUS_KP_Divide 0xffaf +#define IBUS_KP_0 0xffb0 +#define IBUS_KP_1 0xffb1 +#define IBUS_KP_2 0xffb2 +#define IBUS_KP_3 0xffb3 +#define IBUS_KP_4 0xffb4 +#define IBUS_KP_5 0xffb5 +#define IBUS_KP_6 0xffb6 +#define IBUS_KP_7 0xffb7 +#define IBUS_KP_8 0xffb8 +#define IBUS_KP_9 0xffb9 +#define IBUS_F1 0xffbe +#define IBUS_F2 0xffbf +#define IBUS_F3 0xffc0 +#define IBUS_F4 0xffc1 +#define IBUS_F5 0xffc2 +#define IBUS_F6 0xffc3 +#define IBUS_F7 0xffc4 +#define IBUS_F8 0xffc5 +#define IBUS_F9 0xffc6 +#define IBUS_F10 0xffc7 +#define IBUS_F11 0xffc8 +#define IBUS_L1 0xffc8 +#define IBUS_F12 0xffc9 +#define IBUS_L2 0xffc9 +#define IBUS_F13 0xffca +#define IBUS_L3 0xffca +#define IBUS_F14 0xffcb +#define IBUS_L4 0xffcb +#define IBUS_F15 0xffcc +#define IBUS_L5 0xffcc +#define IBUS_F16 0xffcd +#define IBUS_L6 0xffcd +#define IBUS_F17 0xffce +#define IBUS_L7 0xffce +#define IBUS_F18 0xffcf +#define IBUS_L8 0xffcf +#define IBUS_F19 0xffd0 +#define IBUS_L9 0xffd0 +#define IBUS_F20 0xffd1 +#define IBUS_L10 0xffd1 +#define IBUS_F21 0xffd2 +#define IBUS_R1 0xffd2 +#define IBUS_F22 0xffd3 +#define IBUS_R2 0xffd3 +#define IBUS_F23 0xffd4 +#define IBUS_R3 0xffd4 +#define IBUS_F24 0xffd5 +#define IBUS_R4 0xffd5 +#define IBUS_F25 0xffd6 +#define IBUS_R5 0xffd6 +#define IBUS_F26 0xffd7 +#define IBUS_R6 0xffd7 +#define IBUS_F27 0xffd8 +#define IBUS_R7 0xffd8 +#define IBUS_F28 0xffd9 +#define IBUS_R8 0xffd9 +#define IBUS_F29 0xffda +#define IBUS_R9 0xffda +#define IBUS_F30 0xffdb +#define IBUS_R10 0xffdb +#define IBUS_F31 0xffdc +#define IBUS_R11 0xffdc +#define IBUS_F32 0xffdd +#define IBUS_R12 0xffdd +#define IBUS_F33 0xffde +#define IBUS_R13 0xffde +#define IBUS_F34 0xffdf +#define IBUS_R14 0xffdf +#define IBUS_F35 0xffe0 +#define IBUS_R15 0xffe0 +#define IBUS_Shift_L 0xffe1 +#define IBUS_Shift_R 0xffe2 +#define IBUS_Control_L 0xffe3 +#define IBUS_Control_R 0xffe4 +#define IBUS_Caps_Lock 0xffe5 +#define IBUS_Shift_Lock 0xffe6 +#define IBUS_Meta_L 0xffe7 +#define IBUS_Meta_R 0xffe8 +#define IBUS_Alt_L 0xffe9 +#define IBUS_Alt_R 0xffea +#define IBUS_Super_L 0xffeb +#define IBUS_Super_R 0xffec +#define IBUS_Hyper_L 0xffed +#define IBUS_Hyper_R 0xffee +#define IBUS_ISO_Lock 0xfe01 +#define IBUS_ISO_Level2_Latch 0xfe02 +#define IBUS_ISO_Level3_Shift 0xfe03 +#define IBUS_ISO_Level3_Latch 0xfe04 +#define IBUS_ISO_Level3_Lock 0xfe05 +#define IBUS_ISO_Level5_Shift 0xfe11 +#define IBUS_ISO_Level5_Latch 0xfe12 +#define IBUS_ISO_Level5_Lock 0xfe13 +#define IBUS_ISO_Group_Shift 0xff7e +#define IBUS_ISO_Group_Latch 0xfe06 +#define IBUS_ISO_Group_Lock 0xfe07 +#define IBUS_ISO_Next_Group 0xfe08 +#define IBUS_ISO_Next_Group_Lock 0xfe09 +#define IBUS_ISO_Prev_Group 0xfe0a +#define IBUS_ISO_Prev_Group_Lock 0xfe0b +#define IBUS_ISO_First_Group 0xfe0c +#define IBUS_ISO_First_Group_Lock 0xfe0d +#define IBUS_ISO_Last_Group 0xfe0e +#define IBUS_ISO_Last_Group_Lock 0xfe0f +#define IBUS_ISO_Left_Tab 0xfe20 +#define IBUS_ISO_Move_Line_Up 0xfe21 +#define IBUS_ISO_Move_Line_Down 0xfe22 +#define IBUS_ISO_Partial_Line_Up 0xfe23 +#define IBUS_ISO_Partial_Line_Down 0xfe24 +#define IBUS_ISO_Partial_Space_Left 0xfe25 +#define IBUS_ISO_Partial_Space_Right 0xfe26 +#define IBUS_ISO_Set_Margin_Left 0xfe27 +#define IBUS_ISO_Set_Margin_Right 0xfe28 +#define IBUS_ISO_Release_Margin_Left 0xfe29 +#define IBUS_ISO_Release_Margin_Right 0xfe2a +#define IBUS_ISO_Release_Both_Margins 0xfe2b +#define IBUS_ISO_Fast_Cursor_Left 0xfe2c +#define IBUS_ISO_Fast_Cursor_Right 0xfe2d +#define IBUS_ISO_Fast_Cursor_Up 0xfe2e +#define IBUS_ISO_Fast_Cursor_Down 0xfe2f +#define IBUS_ISO_Continuous_Underline 0xfe30 +#define IBUS_ISO_Discontinuous_Underline 0xfe31 +#define IBUS_ISO_Emphasize 0xfe32 +#define IBUS_ISO_Center_Object 0xfe33 +#define IBUS_ISO_Enter 0xfe34 +#define IBUS_dead_grave 0xfe50 +#define IBUS_dead_acute 0xfe51 +#define IBUS_dead_circumflex 0xfe52 +#define IBUS_dead_tilde 0xfe53 +#define IBUS_dead_perispomeni 0xfe53 +#define IBUS_dead_macron 0xfe54 +#define IBUS_dead_breve 0xfe55 +#define IBUS_dead_abovedot 0xfe56 +#define IBUS_dead_diaeresis 0xfe57 +#define IBUS_dead_abovering 0xfe58 +#define IBUS_dead_doubleacute 0xfe59 +#define IBUS_dead_caron 0xfe5a +#define IBUS_dead_cedilla 0xfe5b +#define IBUS_dead_ogonek 0xfe5c +#define IBUS_dead_iota 0xfe5d +#define IBUS_dead_voiced_sound 0xfe5e +#define IBUS_dead_semivoiced_sound 0xfe5f +#define IBUS_dead_belowdot 0xfe60 +#define IBUS_dead_hook 0xfe61 +#define IBUS_dead_horn 0xfe62 +#define IBUS_dead_stroke 0xfe63 +#define IBUS_dead_abovecomma 0xfe64 +#define IBUS_dead_psili 0xfe64 +#define IBUS_dead_abovereversedcomma 0xfe65 +#define IBUS_dead_dasia 0xfe65 +#define IBUS_dead_belowring 0xfe67 +#define IBUS_dead_belowmacron 0xfe68 +#define IBUS_dead_belowcircumflex 0xfe69 +#define IBUS_dead_belowtilde 0xfe6a +#define IBUS_dead_belowbreve 0xfe6b +#define IBUS_dead_belowdiaeresis 0xfe6c +#define IBUS_First_Virtual_Screen 0xfed0 +#define IBUS_Prev_Virtual_Screen 0xfed1 +#define IBUS_Next_Virtual_Screen 0xfed2 +#define IBUS_Last_Virtual_Screen 0xfed4 +#define IBUS_Terminate_Server 0xfed5 +#define IBUS_AccessX_Enable 0xfe70 +#define IBUS_AccessX_Feedback_Enable 0xfe71 +#define IBUS_RepeatKeys_Enable 0xfe72 +#define IBUS_SlowKeys_Enable 0xfe73 +#define IBUS_BounceKeys_Enable 0xfe74 +#define IBUS_StickyKeys_Enable 0xfe75 +#define IBUS_MouseKeys_Enable 0xfe76 +#define IBUS_MouseKeys_Accel_Enable 0xfe77 +#define IBUS_Overlay1_Enable 0xfe78 +#define IBUS_Overlay2_Enable 0xfe79 +#define IBUS_AudibleBell_Enable 0xfe7a +#define IBUS_Pointer_Left 0xfee0 +#define IBUS_Pointer_Right 0xfee1 +#define IBUS_Pointer_Up 0xfee2 +#define IBUS_Pointer_Down 0xfee3 +#define IBUS_Pointer_UpLeft 0xfee4 +#define IBUS_Pointer_UpRight 0xfee5 +#define IBUS_Pointer_DownLeft 0xfee6 +#define IBUS_Pointer_DownRight 0xfee7 +#define IBUS_Pointer_Button_Dflt 0xfee8 +#define IBUS_Pointer_Button1 0xfee9 +#define IBUS_Pointer_Button2 0xfeea +#define IBUS_Pointer_Button3 0xfeeb +#define IBUS_Pointer_Button4 0xfeec +#define IBUS_Pointer_Button5 0xfeed +#define IBUS_Pointer_DblClick_Dflt 0xfeee +#define IBUS_Pointer_DblClick1 0xfeef +#define IBUS_Pointer_DblClick2 0xfef0 +#define IBUS_Pointer_DblClick3 0xfef1 +#define IBUS_Pointer_DblClick4 0xfef2 +#define IBUS_Pointer_DblClick5 0xfef3 +#define IBUS_Pointer_Drag_Dflt 0xfef4 +#define IBUS_Pointer_Drag1 0xfef5 +#define IBUS_Pointer_Drag2 0xfef6 +#define IBUS_Pointer_Drag3 0xfef7 +#define IBUS_Pointer_Drag4 0xfef8 +#define IBUS_Pointer_Drag5 0xfefd +#define IBUS_Pointer_EnableKeys 0xfef9 +#define IBUS_Pointer_Accelerate 0xfefa +#define IBUS_Pointer_DfltBtnNext 0xfefb +#define IBUS_Pointer_DfltBtnPrev 0xfefc +#define IBUS_3270_Duplicate 0xfd01 +#define IBUS_3270_FieldMark 0xfd02 +#define IBUS_3270_Right2 0xfd03 +#define IBUS_3270_Left2 0xfd04 +#define IBUS_3270_BackTab 0xfd05 +#define IBUS_3270_EraseEOF 0xfd06 +#define IBUS_3270_EraseInput 0xfd07 +#define IBUS_3270_Reset 0xfd08 +#define IBUS_3270_Quit 0xfd09 +#define IBUS_3270_PA1 0xfd0a +#define IBUS_3270_PA2 0xfd0b +#define IBUS_3270_PA3 0xfd0c +#define IBUS_3270_Test 0xfd0d +#define IBUS_3270_Attn 0xfd0e +#define IBUS_3270_CursorBlink 0xfd0f +#define IBUS_3270_AltCursor 0xfd10 +#define IBUS_3270_KeyClick 0xfd11 +#define IBUS_3270_Jump 0xfd12 +#define IBUS_3270_Ident 0xfd13 +#define IBUS_3270_Rule 0xfd14 +#define IBUS_3270_Copy 0xfd15 +#define IBUS_3270_Play 0xfd16 +#define IBUS_3270_Setup 0xfd17 +#define IBUS_3270_Record 0xfd18 +#define IBUS_3270_ChangeScreen 0xfd19 +#define IBUS_3270_DeleteWord 0xfd1a +#define IBUS_3270_ExSelect 0xfd1b +#define IBUS_3270_CursorSelect 0xfd1c +#define IBUS_3270_PrintScreen 0xfd1d +#define IBUS_3270_Enter 0xfd1e +#define IBUS_space 0x020 +#define IBUS_exclam 0x021 +#define IBUS_quotedbl 0x022 +#define IBUS_numbersign 0x023 +#define IBUS_dollar 0x024 +#define IBUS_percent 0x025 +#define IBUS_ampersand 0x026 +#define IBUS_apostrophe 0x027 +#define IBUS_quoteright 0x027 +#define IBUS_parenleft 0x028 +#define IBUS_parenright 0x029 +#define IBUS_asterisk 0x02a +#define IBUS_plus 0x02b +#define IBUS_comma 0x02c +#define IBUS_minus 0x02d +#define IBUS_period 0x02e +#define IBUS_slash 0x02f +#define IBUS_0 0x030 +#define IBUS_1 0x031 +#define IBUS_2 0x032 +#define IBUS_3 0x033 +#define IBUS_4 0x034 +#define IBUS_5 0x035 +#define IBUS_6 0x036 +#define IBUS_7 0x037 +#define IBUS_8 0x038 +#define IBUS_9 0x039 +#define IBUS_colon 0x03a +#define IBUS_semicolon 0x03b +#define IBUS_less 0x03c +#define IBUS_equal 0x03d +#define IBUS_greater 0x03e +#define IBUS_question 0x03f +#define IBUS_at 0x040 +#define IBUS_A 0x041 +#define IBUS_B 0x042 +#define IBUS_C 0x043 +#define IBUS_D 0x044 +#define IBUS_E 0x045 +#define IBUS_F 0x046 +#define IBUS_G 0x047 +#define IBUS_H 0x048 +#define IBUS_I 0x049 +#define IBUS_J 0x04a +#define IBUS_K 0x04b +#define IBUS_L 0x04c +#define IBUS_M 0x04d +#define IBUS_N 0x04e +#define IBUS_O 0x04f +#define IBUS_P 0x050 +#define IBUS_Q 0x051 +#define IBUS_R 0x052 +#define IBUS_S 0x053 +#define IBUS_T 0x054 +#define IBUS_U 0x055 +#define IBUS_V 0x056 +#define IBUS_W 0x057 +#define IBUS_X 0x058 +#define IBUS_Y 0x059 +#define IBUS_Z 0x05a +#define IBUS_bracketleft 0x05b +#define IBUS_backslash 0x05c +#define IBUS_bracketright 0x05d +#define IBUS_asciicircum 0x05e +#define IBUS_underscore 0x05f +#define IBUS_grave 0x060 +#define IBUS_quoteleft 0x060 +#define IBUS_a 0x061 +#define IBUS_b 0x062 +#define IBUS_c 0x063 +#define IBUS_d 0x064 +#define IBUS_e 0x065 +#define IBUS_f 0x066 +#define IBUS_g 0x067 +#define IBUS_h 0x068 +#define IBUS_i 0x069 +#define IBUS_j 0x06a +#define IBUS_k 0x06b +#define IBUS_l 0x06c +#define IBUS_m 0x06d +#define IBUS_n 0x06e +#define IBUS_o 0x06f +#define IBUS_p 0x070 +#define IBUS_q 0x071 +#define IBUS_r 0x072 +#define IBUS_s 0x073 +#define IBUS_t 0x074 +#define IBUS_u 0x075 +#define IBUS_v 0x076 +#define IBUS_w 0x077 +#define IBUS_x 0x078 +#define IBUS_y 0x079 +#define IBUS_z 0x07a +#define IBUS_braceleft 0x07b +#define IBUS_bar 0x07c +#define IBUS_braceright 0x07d +#define IBUS_asciitilde 0x07e +#define IBUS_nobreakspace 0x0a0 +#define IBUS_exclamdown 0x0a1 +#define IBUS_cent 0x0a2 +#define IBUS_sterling 0x0a3 +#define IBUS_currency 0x0a4 +#define IBUS_yen 0x0a5 +#define IBUS_brokenbar 0x0a6 +#define IBUS_section 0x0a7 +#define IBUS_diaeresis 0x0a8 +#define IBUS_copyright 0x0a9 +#define IBUS_ordfeminine 0x0aa +#define IBUS_guillemotleft 0x0ab +#define IBUS_notsign 0x0ac +#define IBUS_hyphen 0x0ad +#define IBUS_registered 0x0ae +#define IBUS_macron 0x0af +#define IBUS_degree 0x0b0 +#define IBUS_plusminus 0x0b1 +#define IBUS_twosuperior 0x0b2 +#define IBUS_threesuperior 0x0b3 +#define IBUS_acute 0x0b4 +#define IBUS_mu 0x0b5 +#define IBUS_paragraph 0x0b6 +#define IBUS_periodcentered 0x0b7 +#define IBUS_cedilla 0x0b8 +#define IBUS_onesuperior 0x0b9 +#define IBUS_masculine 0x0ba +#define IBUS_guillemotright 0x0bb +#define IBUS_onequarter 0x0bc +#define IBUS_onehalf 0x0bd +#define IBUS_threequarters 0x0be +#define IBUS_questiondown 0x0bf +#define IBUS_Agrave 0x0c0 +#define IBUS_Aacute 0x0c1 +#define IBUS_Acircumflex 0x0c2 +#define IBUS_Atilde 0x0c3 +#define IBUS_Adiaeresis 0x0c4 +#define IBUS_Aring 0x0c5 +#define IBUS_AE 0x0c6 +#define IBUS_Ccedilla 0x0c7 +#define IBUS_Egrave 0x0c8 +#define IBUS_Eacute 0x0c9 +#define IBUS_Ecircumflex 0x0ca +#define IBUS_Ediaeresis 0x0cb +#define IBUS_Igrave 0x0cc +#define IBUS_Iacute 0x0cd +#define IBUS_Icircumflex 0x0ce +#define IBUS_Idiaeresis 0x0cf +#define IBUS_ETH 0x0d0 +#define IBUS_Eth 0x0d0 +#define IBUS_Ntilde 0x0d1 +#define IBUS_Ograve 0x0d2 +#define IBUS_Oacute 0x0d3 +#define IBUS_Ocircumflex 0x0d4 +#define IBUS_Otilde 0x0d5 +#define IBUS_Odiaeresis 0x0d6 +#define IBUS_multiply 0x0d7 +#define IBUS_Oslash 0x0d8 +#define IBUS_Ooblique 0x0d8 +#define IBUS_Ugrave 0x0d9 +#define IBUS_Uacute 0x0da +#define IBUS_Ucircumflex 0x0db +#define IBUS_Udiaeresis 0x0dc +#define IBUS_Yacute 0x0dd +#define IBUS_THORN 0x0de +#define IBUS_Thorn 0x0de +#define IBUS_ssharp 0x0df +#define IBUS_agrave 0x0e0 +#define IBUS_aacute 0x0e1 +#define IBUS_acircumflex 0x0e2 +#define IBUS_atilde 0x0e3 +#define IBUS_adiaeresis 0x0e4 +#define IBUS_aring 0x0e5 +#define IBUS_ae 0x0e6 +#define IBUS_ccedilla 0x0e7 +#define IBUS_egrave 0x0e8 +#define IBUS_eacute 0x0e9 +#define IBUS_ecircumflex 0x0ea +#define IBUS_ediaeresis 0x0eb +#define IBUS_igrave 0x0ec +#define IBUS_iacute 0x0ed +#define IBUS_icircumflex 0x0ee +#define IBUS_idiaeresis 0x0ef +#define IBUS_eth 0x0f0 +#define IBUS_ntilde 0x0f1 +#define IBUS_ograve 0x0f2 +#define IBUS_oacute 0x0f3 +#define IBUS_ocircumflex 0x0f4 +#define IBUS_otilde 0x0f5 +#define IBUS_odiaeresis 0x0f6 +#define IBUS_division 0x0f7 +#define IBUS_oslash 0x0f8 +#define IBUS_ooblique 0x0f8 +#define IBUS_ugrave 0x0f9 +#define IBUS_uacute 0x0fa +#define IBUS_ucircumflex 0x0fb +#define IBUS_udiaeresis 0x0fc +#define IBUS_yacute 0x0fd +#define IBUS_thorn 0x0fe +#define IBUS_ydiaeresis 0x0ff +#define IBUS_Aogonek 0x1a1 +#define IBUS_breve 0x1a2 +#define IBUS_Lstroke 0x1a3 +#define IBUS_Lcaron 0x1a5 +#define IBUS_Sacute 0x1a6 +#define IBUS_Scaron 0x1a9 +#define IBUS_Scedilla 0x1aa +#define IBUS_Tcaron 0x1ab +#define IBUS_Zacute 0x1ac +#define IBUS_Zcaron 0x1ae +#define IBUS_Zabovedot 0x1af +#define IBUS_aogonek 0x1b1 +#define IBUS_ogonek 0x1b2 +#define IBUS_lstroke 0x1b3 +#define IBUS_lcaron 0x1b5 +#define IBUS_sacute 0x1b6 +#define IBUS_caron 0x1b7 +#define IBUS_scaron 0x1b9 +#define IBUS_scedilla 0x1ba +#define IBUS_tcaron 0x1bb +#define IBUS_zacute 0x1bc +#define IBUS_doubleacute 0x1bd +#define IBUS_zcaron 0x1be +#define IBUS_zabovedot 0x1bf +#define IBUS_Racute 0x1c0 +#define IBUS_Abreve 0x1c3 +#define IBUS_Lacute 0x1c5 +#define IBUS_Cacute 0x1c6 +#define IBUS_Ccaron 0x1c8 +#define IBUS_Eogonek 0x1ca +#define IBUS_Ecaron 0x1cc +#define IBUS_Dcaron 0x1cf +#define IBUS_Dstroke 0x1d0 +#define IBUS_Nacute 0x1d1 +#define IBUS_Ncaron 0x1d2 +#define IBUS_Odoubleacute 0x1d5 +#define IBUS_Rcaron 0x1d8 +#define IBUS_Uring 0x1d9 +#define IBUS_Udoubleacute 0x1db +#define IBUS_Tcedilla 0x1de +#define IBUS_racute 0x1e0 +#define IBUS_abreve 0x1e3 +#define IBUS_lacute 0x1e5 +#define IBUS_cacute 0x1e6 +#define IBUS_ccaron 0x1e8 +#define IBUS_eogonek 0x1ea +#define IBUS_ecaron 0x1ec +#define IBUS_dcaron 0x1ef +#define IBUS_dstroke 0x1f0 +#define IBUS_nacute 0x1f1 +#define IBUS_ncaron 0x1f2 +#define IBUS_odoubleacute 0x1f5 +#define IBUS_udoubleacute 0x1fb +#define IBUS_rcaron 0x1f8 +#define IBUS_uring 0x1f9 +#define IBUS_tcedilla 0x1fe +#define IBUS_abovedot 0x1ff +#define IBUS_Hstroke 0x2a1 +#define IBUS_Hcircumflex 0x2a6 +#define IBUS_Iabovedot 0x2a9 +#define IBUS_Gbreve 0x2ab +#define IBUS_Jcircumflex 0x2ac +#define IBUS_hstroke 0x2b1 +#define IBUS_hcircumflex 0x2b6 +#define IBUS_idotless 0x2b9 +#define IBUS_gbreve 0x2bb +#define IBUS_jcircumflex 0x2bc +#define IBUS_Cabovedot 0x2c5 +#define IBUS_Ccircumflex 0x2c6 +#define IBUS_Gabovedot 0x2d5 +#define IBUS_Gcircumflex 0x2d8 +#define IBUS_Ubreve 0x2dd +#define IBUS_Scircumflex 0x2de +#define IBUS_cabovedot 0x2e5 +#define IBUS_ccircumflex 0x2e6 +#define IBUS_gabovedot 0x2f5 +#define IBUS_gcircumflex 0x2f8 +#define IBUS_ubreve 0x2fd +#define IBUS_scircumflex 0x2fe +#define IBUS_kra 0x3a2 +#define IBUS_kappa 0x3a2 +#define IBUS_Rcedilla 0x3a3 +#define IBUS_Itilde 0x3a5 +#define IBUS_Lcedilla 0x3a6 +#define IBUS_Emacron 0x3aa +#define IBUS_Gcedilla 0x3ab +#define IBUS_Tslash 0x3ac +#define IBUS_rcedilla 0x3b3 +#define IBUS_itilde 0x3b5 +#define IBUS_lcedilla 0x3b6 +#define IBUS_emacron 0x3ba +#define IBUS_gcedilla 0x3bb +#define IBUS_tslash 0x3bc +#define IBUS_ENG 0x3bd +#define IBUS_eng 0x3bf +#define IBUS_Amacron 0x3c0 +#define IBUS_Iogonek 0x3c7 +#define IBUS_Eabovedot 0x3cc +#define IBUS_Imacron 0x3cf +#define IBUS_Ncedilla 0x3d1 +#define IBUS_Omacron 0x3d2 +#define IBUS_Kcedilla 0x3d3 +#define IBUS_Uogonek 0x3d9 +#define IBUS_Utilde 0x3dd +#define IBUS_Umacron 0x3de +#define IBUS_amacron 0x3e0 +#define IBUS_iogonek 0x3e7 +#define IBUS_eabovedot 0x3ec +#define IBUS_imacron 0x3ef +#define IBUS_ncedilla 0x3f1 +#define IBUS_omacron 0x3f2 +#define IBUS_kcedilla 0x3f3 +#define IBUS_uogonek 0x3f9 +#define IBUS_utilde 0x3fd +#define IBUS_umacron 0x3fe +#define IBUS_Babovedot 0x1001e02 +#define IBUS_babovedot 0x1001e03 +#define IBUS_Dabovedot 0x1001e0a +#define IBUS_Wgrave 0x1001e80 +#define IBUS_Wacute 0x1001e82 +#define IBUS_dabovedot 0x1001e0b +#define IBUS_Ygrave 0x1001ef2 +#define IBUS_Fabovedot 0x1001e1e +#define IBUS_fabovedot 0x1001e1f +#define IBUS_Mabovedot 0x1001e40 +#define IBUS_mabovedot 0x1001e41 +#define IBUS_Pabovedot 0x1001e56 +#define IBUS_wgrave 0x1001e81 +#define IBUS_pabovedot 0x1001e57 +#define IBUS_wacute 0x1001e83 +#define IBUS_Sabovedot 0x1001e60 +#define IBUS_ygrave 0x1001ef3 +#define IBUS_Wdiaeresis 0x1001e84 +#define IBUS_wdiaeresis 0x1001e85 +#define IBUS_sabovedot 0x1001e61 +#define IBUS_Wcircumflex 0x1000174 +#define IBUS_Tabovedot 0x1001e6a +#define IBUS_Ycircumflex 0x1000176 +#define IBUS_wcircumflex 0x1000175 +#define IBUS_tabovedot 0x1001e6b +#define IBUS_ycircumflex 0x1000177 +#define IBUS_OE 0x13bc +#define IBUS_oe 0x13bd +#define IBUS_Ydiaeresis 0x13be +#define IBUS_overline 0x47e +#define IBUS_kana_fullstop 0x4a1 +#define IBUS_kana_openingbracket 0x4a2 +#define IBUS_kana_closingbracket 0x4a3 +#define IBUS_kana_comma 0x4a4 +#define IBUS_kana_conjunctive 0x4a5 +#define IBUS_kana_middledot 0x4a5 +#define IBUS_kana_WO 0x4a6 +#define IBUS_kana_a 0x4a7 +#define IBUS_kana_i 0x4a8 +#define IBUS_kana_u 0x4a9 +#define IBUS_kana_e 0x4aa +#define IBUS_kana_o 0x4ab +#define IBUS_kana_ya 0x4ac +#define IBUS_kana_yu 0x4ad +#define IBUS_kana_yo 0x4ae +#define IBUS_kana_tsu 0x4af +#define IBUS_kana_tu 0x4af +#define IBUS_prolongedsound 0x4b0 +#define IBUS_kana_A 0x4b1 +#define IBUS_kana_I 0x4b2 +#define IBUS_kana_U 0x4b3 +#define IBUS_kana_E 0x4b4 +#define IBUS_kana_O 0x4b5 +#define IBUS_kana_KA 0x4b6 +#define IBUS_kana_KI 0x4b7 +#define IBUS_kana_KU 0x4b8 +#define IBUS_kana_KE 0x4b9 +#define IBUS_kana_KO 0x4ba +#define IBUS_kana_SA 0x4bb +#define IBUS_kana_SHI 0x4bc +#define IBUS_kana_SU 0x4bd +#define IBUS_kana_SE 0x4be +#define IBUS_kana_SO 0x4bf +#define IBUS_kana_TA 0x4c0 +#define IBUS_kana_CHI 0x4c1 +#define IBUS_kana_TI 0x4c1 +#define IBUS_kana_TSU 0x4c2 +#define IBUS_kana_TU 0x4c2 +#define IBUS_kana_TE 0x4c3 +#define IBUS_kana_TO 0x4c4 +#define IBUS_kana_NA 0x4c5 +#define IBUS_kana_NI 0x4c6 +#define IBUS_kana_NU 0x4c7 +#define IBUS_kana_NE 0x4c8 +#define IBUS_kana_NO 0x4c9 +#define IBUS_kana_HA 0x4ca +#define IBUS_kana_HI 0x4cb +#define IBUS_kana_FU 0x4cc +#define IBUS_kana_HU 0x4cc +#define IBUS_kana_HE 0x4cd +#define IBUS_kana_HO 0x4ce +#define IBUS_kana_MA 0x4cf +#define IBUS_kana_MI 0x4d0 +#define IBUS_kana_MU 0x4d1 +#define IBUS_kana_ME 0x4d2 +#define IBUS_kana_MO 0x4d3 +#define IBUS_kana_YA 0x4d4 +#define IBUS_kana_YU 0x4d5 +#define IBUS_kana_YO 0x4d6 +#define IBUS_kana_RA 0x4d7 +#define IBUS_kana_RI 0x4d8 +#define IBUS_kana_RU 0x4d9 +#define IBUS_kana_RE 0x4da +#define IBUS_kana_RO 0x4db +#define IBUS_kana_WA 0x4dc +#define IBUS_kana_N 0x4dd +#define IBUS_voicedsound 0x4de +#define IBUS_semivoicedsound 0x4df +#define IBUS_kana_switch 0xff7e +#define IBUS_Farsi_0 0x10006f0 +#define IBUS_Farsi_1 0x10006f1 +#define IBUS_Farsi_2 0x10006f2 +#define IBUS_Farsi_3 0x10006f3 +#define IBUS_Farsi_4 0x10006f4 +#define IBUS_Farsi_5 0x10006f5 +#define IBUS_Farsi_6 0x10006f6 +#define IBUS_Farsi_7 0x10006f7 +#define IBUS_Farsi_8 0x10006f8 +#define IBUS_Farsi_9 0x10006f9 +#define IBUS_Arabic_percent 0x100066a +#define IBUS_Arabic_superscript_alef 0x1000670 +#define IBUS_Arabic_tteh 0x1000679 +#define IBUS_Arabic_peh 0x100067e +#define IBUS_Arabic_tcheh 0x1000686 +#define IBUS_Arabic_ddal 0x1000688 +#define IBUS_Arabic_rreh 0x1000691 +#define IBUS_Arabic_comma 0x5ac +#define IBUS_Arabic_fullstop 0x10006d4 +#define IBUS_Arabic_0 0x1000660 +#define IBUS_Arabic_1 0x1000661 +#define IBUS_Arabic_2 0x1000662 +#define IBUS_Arabic_3 0x1000663 +#define IBUS_Arabic_4 0x1000664 +#define IBUS_Arabic_5 0x1000665 +#define IBUS_Arabic_6 0x1000666 +#define IBUS_Arabic_7 0x1000667 +#define IBUS_Arabic_8 0x1000668 +#define IBUS_Arabic_9 0x1000669 +#define IBUS_Arabic_semicolon 0x5bb +#define IBUS_Arabic_question_mark 0x5bf +#define IBUS_Arabic_hamza 0x5c1 +#define IBUS_Arabic_maddaonalef 0x5c2 +#define IBUS_Arabic_hamzaonalef 0x5c3 +#define IBUS_Arabic_hamzaonwaw 0x5c4 +#define IBUS_Arabic_hamzaunderalef 0x5c5 +#define IBUS_Arabic_hamzaonyeh 0x5c6 +#define IBUS_Arabic_alef 0x5c7 +#define IBUS_Arabic_beh 0x5c8 +#define IBUS_Arabic_tehmarbuta 0x5c9 +#define IBUS_Arabic_teh 0x5ca +#define IBUS_Arabic_theh 0x5cb +#define IBUS_Arabic_jeem 0x5cc +#define IBUS_Arabic_hah 0x5cd +#define IBUS_Arabic_khah 0x5ce +#define IBUS_Arabic_dal 0x5cf +#define IBUS_Arabic_thal 0x5d0 +#define IBUS_Arabic_ra 0x5d1 +#define IBUS_Arabic_zain 0x5d2 +#define IBUS_Arabic_seen 0x5d3 +#define IBUS_Arabic_sheen 0x5d4 +#define IBUS_Arabic_sad 0x5d5 +#define IBUS_Arabic_dad 0x5d6 +#define IBUS_Arabic_tah 0x5d7 +#define IBUS_Arabic_zah 0x5d8 +#define IBUS_Arabic_ain 0x5d9 +#define IBUS_Arabic_ghain 0x5da +#define IBUS_Arabic_tatweel 0x5e0 +#define IBUS_Arabic_feh 0x5e1 +#define IBUS_Arabic_qaf 0x5e2 +#define IBUS_Arabic_kaf 0x5e3 +#define IBUS_Arabic_lam 0x5e4 +#define IBUS_Arabic_meem 0x5e5 +#define IBUS_Arabic_noon 0x5e6 +#define IBUS_Arabic_ha 0x5e7 +#define IBUS_Arabic_heh 0x5e7 +#define IBUS_Arabic_waw 0x5e8 +#define IBUS_Arabic_alefmaksura 0x5e9 +#define IBUS_Arabic_yeh 0x5ea +#define IBUS_Arabic_fathatan 0x5eb +#define IBUS_Arabic_dammatan 0x5ec +#define IBUS_Arabic_kasratan 0x5ed +#define IBUS_Arabic_fatha 0x5ee +#define IBUS_Arabic_damma 0x5ef +#define IBUS_Arabic_kasra 0x5f0 +#define IBUS_Arabic_shadda 0x5f1 +#define IBUS_Arabic_sukun 0x5f2 +#define IBUS_Arabic_madda_above 0x1000653 +#define IBUS_Arabic_hamza_above 0x1000654 +#define IBUS_Arabic_hamza_below 0x1000655 +#define IBUS_Arabic_jeh 0x1000698 +#define IBUS_Arabic_veh 0x10006a4 +#define IBUS_Arabic_keheh 0x10006a9 +#define IBUS_Arabic_gaf 0x10006af +#define IBUS_Arabic_noon_ghunna 0x10006ba +#define IBUS_Arabic_heh_doachashmee 0x10006be +#define IBUS_Farsi_yeh 0x10006cc +#define IBUS_Arabic_farsi_yeh 0x10006cc +#define IBUS_Arabic_yeh_baree 0x10006d2 +#define IBUS_Arabic_heh_goal 0x10006c1 +#define IBUS_Arabic_switch 0xff7e +#define IBUS_Cyrillic_GHE_bar 0x1000492 +#define IBUS_Cyrillic_ghe_bar 0x1000493 +#define IBUS_Cyrillic_ZHE_descender 0x1000496 +#define IBUS_Cyrillic_zhe_descender 0x1000497 +#define IBUS_Cyrillic_KA_descender 0x100049a +#define IBUS_Cyrillic_ka_descender 0x100049b +#define IBUS_Cyrillic_KA_vertstroke 0x100049c +#define IBUS_Cyrillic_ka_vertstroke 0x100049d +#define IBUS_Cyrillic_EN_descender 0x10004a2 +#define IBUS_Cyrillic_en_descender 0x10004a3 +#define IBUS_Cyrillic_U_straight 0x10004ae +#define IBUS_Cyrillic_u_straight 0x10004af +#define IBUS_Cyrillic_U_straight_bar 0x10004b0 +#define IBUS_Cyrillic_u_straight_bar 0x10004b1 +#define IBUS_Cyrillic_HA_descender 0x10004b2 +#define IBUS_Cyrillic_ha_descender 0x10004b3 +#define IBUS_Cyrillic_CHE_descender 0x10004b6 +#define IBUS_Cyrillic_che_descender 0x10004b7 +#define IBUS_Cyrillic_CHE_vertstroke 0x10004b8 +#define IBUS_Cyrillic_che_vertstroke 0x10004b9 +#define IBUS_Cyrillic_SHHA 0x10004ba +#define IBUS_Cyrillic_shha 0x10004bb +#define IBUS_Cyrillic_SCHWA 0x10004d8 +#define IBUS_Cyrillic_schwa 0x10004d9 +#define IBUS_Cyrillic_I_macron 0x10004e2 +#define IBUS_Cyrillic_i_macron 0x10004e3 +#define IBUS_Cyrillic_O_bar 0x10004e8 +#define IBUS_Cyrillic_o_bar 0x10004e9 +#define IBUS_Cyrillic_U_macron 0x10004ee +#define IBUS_Cyrillic_u_macron 0x10004ef +#define IBUS_Serbian_dje 0x6a1 +#define IBUS_Macedonia_gje 0x6a2 +#define IBUS_Cyrillic_io 0x6a3 +#define IBUS_Ukrainian_ie 0x6a4 +#define IBUS_Ukranian_je 0x6a4 +#define IBUS_Macedonia_dse 0x6a5 +#define IBUS_Ukrainian_i 0x6a6 +#define IBUS_Ukranian_i 0x6a6 +#define IBUS_Ukrainian_yi 0x6a7 +#define IBUS_Ukranian_yi 0x6a7 +#define IBUS_Cyrillic_je 0x6a8 +#define IBUS_Serbian_je 0x6a8 +#define IBUS_Cyrillic_lje 0x6a9 +#define IBUS_Serbian_lje 0x6a9 +#define IBUS_Cyrillic_nje 0x6aa +#define IBUS_Serbian_nje 0x6aa +#define IBUS_Serbian_tshe 0x6ab +#define IBUS_Macedonia_kje 0x6ac +#define IBUS_Ukrainian_ghe_with_upturn 0x6ad +#define IBUS_Byelorussian_shortu 0x6ae +#define IBUS_Cyrillic_dzhe 0x6af +#define IBUS_Serbian_dze 0x6af +#define IBUS_numerosign 0x6b0 +#define IBUS_Serbian_DJE 0x6b1 +#define IBUS_Macedonia_GJE 0x6b2 +#define IBUS_Cyrillic_IO 0x6b3 +#define IBUS_Ukrainian_IE 0x6b4 +#define IBUS_Ukranian_JE 0x6b4 +#define IBUS_Macedonia_DSE 0x6b5 +#define IBUS_Ukrainian_I 0x6b6 +#define IBUS_Ukranian_I 0x6b6 +#define IBUS_Ukrainian_YI 0x6b7 +#define IBUS_Ukranian_YI 0x6b7 +#define IBUS_Cyrillic_JE 0x6b8 +#define IBUS_Serbian_JE 0x6b8 +#define IBUS_Cyrillic_LJE 0x6b9 +#define IBUS_Serbian_LJE 0x6b9 +#define IBUS_Cyrillic_NJE 0x6ba +#define IBUS_Serbian_NJE 0x6ba +#define IBUS_Serbian_TSHE 0x6bb +#define IBUS_Macedonia_KJE 0x6bc +#define IBUS_Ukrainian_GHE_WITH_UPTURN 0x6bd +#define IBUS_Byelorussian_SHORTU 0x6be +#define IBUS_Cyrillic_DZHE 0x6bf +#define IBUS_Serbian_DZE 0x6bf +#define IBUS_Cyrillic_yu 0x6c0 +#define IBUS_Cyrillic_a 0x6c1 +#define IBUS_Cyrillic_be 0x6c2 +#define IBUS_Cyrillic_tse 0x6c3 +#define IBUS_Cyrillic_de 0x6c4 +#define IBUS_Cyrillic_ie 0x6c5 +#define IBUS_Cyrillic_ef 0x6c6 +#define IBUS_Cyrillic_ghe 0x6c7 +#define IBUS_Cyrillic_ha 0x6c8 +#define IBUS_Cyrillic_i 0x6c9 +#define IBUS_Cyrillic_shorti 0x6ca +#define IBUS_Cyrillic_ka 0x6cb +#define IBUS_Cyrillic_el 0x6cc +#define IBUS_Cyrillic_em 0x6cd +#define IBUS_Cyrillic_en 0x6ce +#define IBUS_Cyrillic_o 0x6cf +#define IBUS_Cyrillic_pe 0x6d0 +#define IBUS_Cyrillic_ya 0x6d1 +#define IBUS_Cyrillic_er 0x6d2 +#define IBUS_Cyrillic_es 0x6d3 +#define IBUS_Cyrillic_te 0x6d4 +#define IBUS_Cyrillic_u 0x6d5 +#define IBUS_Cyrillic_zhe 0x6d6 +#define IBUS_Cyrillic_ve 0x6d7 +#define IBUS_Cyrillic_softsign 0x6d8 +#define IBUS_Cyrillic_yeru 0x6d9 +#define IBUS_Cyrillic_ze 0x6da +#define IBUS_Cyrillic_sha 0x6db +#define IBUS_Cyrillic_e 0x6dc +#define IBUS_Cyrillic_shcha 0x6dd +#define IBUS_Cyrillic_che 0x6de +#define IBUS_Cyrillic_hardsign 0x6df +#define IBUS_Cyrillic_YU 0x6e0 +#define IBUS_Cyrillic_A 0x6e1 +#define IBUS_Cyrillic_BE 0x6e2 +#define IBUS_Cyrillic_TSE 0x6e3 +#define IBUS_Cyrillic_DE 0x6e4 +#define IBUS_Cyrillic_IE 0x6e5 +#define IBUS_Cyrillic_EF 0x6e6 +#define IBUS_Cyrillic_GHE 0x6e7 +#define IBUS_Cyrillic_HA 0x6e8 +#define IBUS_Cyrillic_I 0x6e9 +#define IBUS_Cyrillic_SHORTI 0x6ea +#define IBUS_Cyrillic_KA 0x6eb +#define IBUS_Cyrillic_EL 0x6ec +#define IBUS_Cyrillic_EM 0x6ed +#define IBUS_Cyrillic_EN 0x6ee +#define IBUS_Cyrillic_O 0x6ef +#define IBUS_Cyrillic_PE 0x6f0 +#define IBUS_Cyrillic_YA 0x6f1 +#define IBUS_Cyrillic_ER 0x6f2 +#define IBUS_Cyrillic_ES 0x6f3 +#define IBUS_Cyrillic_TE 0x6f4 +#define IBUS_Cyrillic_U 0x6f5 +#define IBUS_Cyrillic_ZHE 0x6f6 +#define IBUS_Cyrillic_VE 0x6f7 +#define IBUS_Cyrillic_SOFTSIGN 0x6f8 +#define IBUS_Cyrillic_YERU 0x6f9 +#define IBUS_Cyrillic_ZE 0x6fa +#define IBUS_Cyrillic_SHA 0x6fb +#define IBUS_Cyrillic_E 0x6fc +#define IBUS_Cyrillic_SHCHA 0x6fd +#define IBUS_Cyrillic_CHE 0x6fe +#define IBUS_Cyrillic_HARDSIGN 0x6ff +#define IBUS_Greek_ALPHAaccent 0x7a1 +#define IBUS_Greek_EPSILONaccent 0x7a2 +#define IBUS_Greek_ETAaccent 0x7a3 +#define IBUS_Greek_IOTAaccent 0x7a4 +#define IBUS_Greek_IOTAdieresis 0x7a5 +#define IBUS_Greek_IOTAdiaeresis 0x7a5 +#define IBUS_Greek_OMICRONaccent 0x7a7 +#define IBUS_Greek_UPSILONaccent 0x7a8 +#define IBUS_Greek_UPSILONdieresis 0x7a9 +#define IBUS_Greek_OMEGAaccent 0x7ab +#define IBUS_Greek_accentdieresis 0x7ae +#define IBUS_Greek_horizbar 0x7af +#define IBUS_Greek_alphaaccent 0x7b1 +#define IBUS_Greek_epsilonaccent 0x7b2 +#define IBUS_Greek_etaaccent 0x7b3 +#define IBUS_Greek_iotaaccent 0x7b4 +#define IBUS_Greek_iotadieresis 0x7b5 +#define IBUS_Greek_iotaaccentdieresis 0x7b6 +#define IBUS_Greek_omicronaccent 0x7b7 +#define IBUS_Greek_upsilonaccent 0x7b8 +#define IBUS_Greek_upsilondieresis 0x7b9 +#define IBUS_Greek_upsilonaccentdieresis 0x7ba +#define IBUS_Greek_omegaaccent 0x7bb +#define IBUS_Greek_ALPHA 0x7c1 +#define IBUS_Greek_BETA 0x7c2 +#define IBUS_Greek_GAMMA 0x7c3 +#define IBUS_Greek_DELTA 0x7c4 +#define IBUS_Greek_EPSILON 0x7c5 +#define IBUS_Greek_ZETA 0x7c6 +#define IBUS_Greek_ETA 0x7c7 +#define IBUS_Greek_THETA 0x7c8 +#define IBUS_Greek_IOTA 0x7c9 +#define IBUS_Greek_KAPPA 0x7ca +#define IBUS_Greek_LAMDA 0x7cb +#define IBUS_Greek_LAMBDA 0x7cb +#define IBUS_Greek_MU 0x7cc +#define IBUS_Greek_NU 0x7cd +#define IBUS_Greek_XI 0x7ce +#define IBUS_Greek_OMICRON 0x7cf +#define IBUS_Greek_PI 0x7d0 +#define IBUS_Greek_RHO 0x7d1 +#define IBUS_Greek_SIGMA 0x7d2 +#define IBUS_Greek_TAU 0x7d4 +#define IBUS_Greek_UPSILON 0x7d5 +#define IBUS_Greek_PHI 0x7d6 +#define IBUS_Greek_CHI 0x7d7 +#define IBUS_Greek_PSI 0x7d8 +#define IBUS_Greek_OMEGA 0x7d9 +#define IBUS_Greek_alpha 0x7e1 +#define IBUS_Greek_beta 0x7e2 +#define IBUS_Greek_gamma 0x7e3 +#define IBUS_Greek_delta 0x7e4 +#define IBUS_Greek_epsilon 0x7e5 +#define IBUS_Greek_zeta 0x7e6 +#define IBUS_Greek_eta 0x7e7 +#define IBUS_Greek_theta 0x7e8 +#define IBUS_Greek_iota 0x7e9 +#define IBUS_Greek_kappa 0x7ea +#define IBUS_Greek_lamda 0x7eb +#define IBUS_Greek_lambda 0x7eb +#define IBUS_Greek_mu 0x7ec +#define IBUS_Greek_nu 0x7ed +#define IBUS_Greek_xi 0x7ee +#define IBUS_Greek_omicron 0x7ef +#define IBUS_Greek_pi 0x7f0 +#define IBUS_Greek_rho 0x7f1 +#define IBUS_Greek_sigma 0x7f2 +#define IBUS_Greek_finalsmallsigma 0x7f3 +#define IBUS_Greek_tau 0x7f4 +#define IBUS_Greek_upsilon 0x7f5 +#define IBUS_Greek_phi 0x7f6 +#define IBUS_Greek_chi 0x7f7 +#define IBUS_Greek_psi 0x7f8 +#define IBUS_Greek_omega 0x7f9 +#define IBUS_Greek_switch 0xff7e +#define IBUS_leftradical 0x8a1 +#define IBUS_topleftradical 0x8a2 +#define IBUS_horizconnector 0x8a3 +#define IBUS_topintegral 0x8a4 +#define IBUS_botintegral 0x8a5 +#define IBUS_vertconnector 0x8a6 +#define IBUS_topleftsqbracket 0x8a7 +#define IBUS_botleftsqbracket 0x8a8 +#define IBUS_toprightsqbracket 0x8a9 +#define IBUS_botrightsqbracket 0x8aa +#define IBUS_topleftparens 0x8ab +#define IBUS_botleftparens 0x8ac +#define IBUS_toprightparens 0x8ad +#define IBUS_botrightparens 0x8ae +#define IBUS_leftmiddlecurlybrace 0x8af +#define IBUS_rightmiddlecurlybrace 0x8b0 +#define IBUS_topleftsummation 0x8b1 +#define IBUS_botleftsummation 0x8b2 +#define IBUS_topvertsummationconnector 0x8b3 +#define IBUS_botvertsummationconnector 0x8b4 +#define IBUS_toprightsummation 0x8b5 +#define IBUS_botrightsummation 0x8b6 +#define IBUS_rightmiddlesummation 0x8b7 +#define IBUS_lessthanequal 0x8bc +#define IBUS_notequal 0x8bd +#define IBUS_greaterthanequal 0x8be +#define IBUS_integral 0x8bf +#define IBUS_therefore 0x8c0 +#define IBUS_variation 0x8c1 +#define IBUS_infinity 0x8c2 +#define IBUS_nabla 0x8c5 +#define IBUS_approximate 0x8c8 +#define IBUS_similarequal 0x8c9 +#define IBUS_ifonlyif 0x8cd +#define IBUS_implies 0x8ce +#define IBUS_identical 0x8cf +#define IBUS_radical 0x8d6 +#define IBUS_includedin 0x8da +#define IBUS_includes 0x8db +#define IBUS_intersection 0x8dc +#define IBUS_union 0x8dd +#define IBUS_logicaland 0x8de +#define IBUS_logicalor 0x8df +#define IBUS_partialderivative 0x8ef +#define IBUS_function 0x8f6 +#define IBUS_leftarrow 0x8fb +#define IBUS_uparrow 0x8fc +#define IBUS_rightarrow 0x8fd +#define IBUS_downarrow 0x8fe +#define IBUS_blank 0x9df +#define IBUS_soliddiamond 0x9e0 +#define IBUS_checkerboard 0x9e1 +#define IBUS_ht 0x9e2 +#define IBUS_ff 0x9e3 +#define IBUS_cr 0x9e4 +#define IBUS_lf 0x9e5 +#define IBUS_nl 0x9e8 +#define IBUS_vt 0x9e9 +#define IBUS_lowrightcorner 0x9ea +#define IBUS_uprightcorner 0x9eb +#define IBUS_upleftcorner 0x9ec +#define IBUS_lowleftcorner 0x9ed +#define IBUS_crossinglines 0x9ee +#define IBUS_horizlinescan1 0x9ef +#define IBUS_horizlinescan3 0x9f0 +#define IBUS_horizlinescan5 0x9f1 +#define IBUS_horizlinescan7 0x9f2 +#define IBUS_horizlinescan9 0x9f3 +#define IBUS_leftt 0x9f4 +#define IBUS_rightt 0x9f5 +#define IBUS_bott 0x9f6 +#define IBUS_topt 0x9f7 +#define IBUS_vertbar 0x9f8 +#define IBUS_emspace 0xaa1 +#define IBUS_enspace 0xaa2 +#define IBUS_em3space 0xaa3 +#define IBUS_em4space 0xaa4 +#define IBUS_digitspace 0xaa5 +#define IBUS_punctspace 0xaa6 +#define IBUS_thinspace 0xaa7 +#define IBUS_hairspace 0xaa8 +#define IBUS_emdash 0xaa9 +#define IBUS_endash 0xaaa +#define IBUS_signifblank 0xaac +#define IBUS_ellipsis 0xaae +#define IBUS_doubbaselinedot 0xaaf +#define IBUS_onethird 0xab0 +#define IBUS_twothirds 0xab1 +#define IBUS_onefifth 0xab2 +#define IBUS_twofifths 0xab3 +#define IBUS_threefifths 0xab4 +#define IBUS_fourfifths 0xab5 +#define IBUS_onesixth 0xab6 +#define IBUS_fivesixths 0xab7 +#define IBUS_careof 0xab8 +#define IBUS_figdash 0xabb +#define IBUS_leftanglebracket 0xabc +#define IBUS_decimalpoint 0xabd +#define IBUS_rightanglebracket 0xabe +#define IBUS_marker 0xabf +#define IBUS_oneeighth 0xac3 +#define IBUS_threeeighths 0xac4 +#define IBUS_fiveeighths 0xac5 +#define IBUS_seveneighths 0xac6 +#define IBUS_trademark 0xac9 +#define IBUS_signaturemark 0xaca +#define IBUS_trademarkincircle 0xacb +#define IBUS_leftopentriangle 0xacc +#define IBUS_rightopentriangle 0xacd +#define IBUS_emopencircle 0xace +#define IBUS_emopenrectangle 0xacf +#define IBUS_leftsinglequotemark 0xad0 +#define IBUS_rightsinglequotemark 0xad1 +#define IBUS_leftdoublequotemark 0xad2 +#define IBUS_rightdoublequotemark 0xad3 +#define IBUS_prescription 0xad4 +#define IBUS_minutes 0xad6 +#define IBUS_seconds 0xad7 +#define IBUS_latincross 0xad9 +#define IBUS_hexagram 0xada +#define IBUS_filledrectbullet 0xadb +#define IBUS_filledlefttribullet 0xadc +#define IBUS_filledrighttribullet 0xadd +#define IBUS_emfilledcircle 0xade +#define IBUS_emfilledrect 0xadf +#define IBUS_enopencircbullet 0xae0 +#define IBUS_enopensquarebullet 0xae1 +#define IBUS_openrectbullet 0xae2 +#define IBUS_opentribulletup 0xae3 +#define IBUS_opentribulletdown 0xae4 +#define IBUS_openstar 0xae5 +#define IBUS_enfilledcircbullet 0xae6 +#define IBUS_enfilledsqbullet 0xae7 +#define IBUS_filledtribulletup 0xae8 +#define IBUS_filledtribulletdown 0xae9 +#define IBUS_leftpointer 0xaea +#define IBUS_rightpointer 0xaeb +#define IBUS_club 0xaec +#define IBUS_diamond 0xaed +#define IBUS_heart 0xaee +#define IBUS_maltesecross 0xaf0 +#define IBUS_dagger 0xaf1 +#define IBUS_doubledagger 0xaf2 +#define IBUS_checkmark 0xaf3 +#define IBUS_ballotcross 0xaf4 +#define IBUS_musicalsharp 0xaf5 +#define IBUS_musicalflat 0xaf6 +#define IBUS_malesymbol 0xaf7 +#define IBUS_femalesymbol 0xaf8 +#define IBUS_telephone 0xaf9 +#define IBUS_telephonerecorder 0xafa +#define IBUS_phonographcopyright 0xafb +#define IBUS_caret 0xafc +#define IBUS_singlelowquotemark 0xafd +#define IBUS_doublelowquotemark 0xafe +#define IBUS_cursor 0xaff +#define IBUS_leftcaret 0xba3 +#define IBUS_rightcaret 0xba6 +#define IBUS_downcaret 0xba8 +#define IBUS_upcaret 0xba9 +#define IBUS_overbar 0xbc0 +#define IBUS_downtack 0xbc2 +#define IBUS_upshoe 0xbc3 +#define IBUS_downstile 0xbc4 +#define IBUS_underbar 0xbc6 +#define IBUS_jot 0xbca +#define IBUS_quad 0xbcc +#define IBUS_uptack 0xbce +#define IBUS_circle 0xbcf +#define IBUS_upstile 0xbd3 +#define IBUS_downshoe 0xbd6 +#define IBUS_rightshoe 0xbd8 +#define IBUS_leftshoe 0xbda +#define IBUS_lefttack 0xbdc +#define IBUS_righttack 0xbfc +#define IBUS_hebrew_doublelowline 0xcdf +#define IBUS_hebrew_aleph 0xce0 +#define IBUS_hebrew_bet 0xce1 +#define IBUS_hebrew_beth 0xce1 +#define IBUS_hebrew_gimel 0xce2 +#define IBUS_hebrew_gimmel 0xce2 +#define IBUS_hebrew_dalet 0xce3 +#define IBUS_hebrew_daleth 0xce3 +#define IBUS_hebrew_he 0xce4 +#define IBUS_hebrew_waw 0xce5 +#define IBUS_hebrew_zain 0xce6 +#define IBUS_hebrew_zayin 0xce6 +#define IBUS_hebrew_chet 0xce7 +#define IBUS_hebrew_het 0xce7 +#define IBUS_hebrew_tet 0xce8 +#define IBUS_hebrew_teth 0xce8 +#define IBUS_hebrew_yod 0xce9 +#define IBUS_hebrew_finalkaph 0xcea +#define IBUS_hebrew_kaph 0xceb +#define IBUS_hebrew_lamed 0xcec +#define IBUS_hebrew_finalmem 0xced +#define IBUS_hebrew_mem 0xcee +#define IBUS_hebrew_finalnun 0xcef +#define IBUS_hebrew_nun 0xcf0 +#define IBUS_hebrew_samech 0xcf1 +#define IBUS_hebrew_samekh 0xcf1 +#define IBUS_hebrew_ayin 0xcf2 +#define IBUS_hebrew_finalpe 0xcf3 +#define IBUS_hebrew_pe 0xcf4 +#define IBUS_hebrew_finalzade 0xcf5 +#define IBUS_hebrew_finalzadi 0xcf5 +#define IBUS_hebrew_zade 0xcf6 +#define IBUS_hebrew_zadi 0xcf6 +#define IBUS_hebrew_qoph 0xcf7 +#define IBUS_hebrew_kuf 0xcf7 +#define IBUS_hebrew_resh 0xcf8 +#define IBUS_hebrew_shin 0xcf9 +#define IBUS_hebrew_taw 0xcfa +#define IBUS_hebrew_taf 0xcfa +#define IBUS_Hebrew_switch 0xff7e +#define IBUS_Thai_kokai 0xda1 +#define IBUS_Thai_khokhai 0xda2 +#define IBUS_Thai_khokhuat 0xda3 +#define IBUS_Thai_khokhwai 0xda4 +#define IBUS_Thai_khokhon 0xda5 +#define IBUS_Thai_khorakhang 0xda6 +#define IBUS_Thai_ngongu 0xda7 +#define IBUS_Thai_chochan 0xda8 +#define IBUS_Thai_choching 0xda9 +#define IBUS_Thai_chochang 0xdaa +#define IBUS_Thai_soso 0xdab +#define IBUS_Thai_chochoe 0xdac +#define IBUS_Thai_yoying 0xdad +#define IBUS_Thai_dochada 0xdae +#define IBUS_Thai_topatak 0xdaf +#define IBUS_Thai_thothan 0xdb0 +#define IBUS_Thai_thonangmontho 0xdb1 +#define IBUS_Thai_thophuthao 0xdb2 +#define IBUS_Thai_nonen 0xdb3 +#define IBUS_Thai_dodek 0xdb4 +#define IBUS_Thai_totao 0xdb5 +#define IBUS_Thai_thothung 0xdb6 +#define IBUS_Thai_thothahan 0xdb7 +#define IBUS_Thai_thothong 0xdb8 +#define IBUS_Thai_nonu 0xdb9 +#define IBUS_Thai_bobaimai 0xdba +#define IBUS_Thai_popla 0xdbb +#define IBUS_Thai_phophung 0xdbc +#define IBUS_Thai_fofa 0xdbd +#define IBUS_Thai_phophan 0xdbe +#define IBUS_Thai_fofan 0xdbf +#define IBUS_Thai_phosamphao 0xdc0 +#define IBUS_Thai_moma 0xdc1 +#define IBUS_Thai_yoyak 0xdc2 +#define IBUS_Thai_rorua 0xdc3 +#define IBUS_Thai_ru 0xdc4 +#define IBUS_Thai_loling 0xdc5 +#define IBUS_Thai_lu 0xdc6 +#define IBUS_Thai_wowaen 0xdc7 +#define IBUS_Thai_sosala 0xdc8 +#define IBUS_Thai_sorusi 0xdc9 +#define IBUS_Thai_sosua 0xdca +#define IBUS_Thai_hohip 0xdcb +#define IBUS_Thai_lochula 0xdcc +#define IBUS_Thai_oang 0xdcd +#define IBUS_Thai_honokhuk 0xdce +#define IBUS_Thai_paiyannoi 0xdcf +#define IBUS_Thai_saraa 0xdd0 +#define IBUS_Thai_maihanakat 0xdd1 +#define IBUS_Thai_saraaa 0xdd2 +#define IBUS_Thai_saraam 0xdd3 +#define IBUS_Thai_sarai 0xdd4 +#define IBUS_Thai_saraii 0xdd5 +#define IBUS_Thai_saraue 0xdd6 +#define IBUS_Thai_sarauee 0xdd7 +#define IBUS_Thai_sarau 0xdd8 +#define IBUS_Thai_sarauu 0xdd9 +#define IBUS_Thai_phinthu 0xdda +#define IBUS_Thai_maihanakat_maitho 0xdde +#define IBUS_Thai_baht 0xddf +#define IBUS_Thai_sarae 0xde0 +#define IBUS_Thai_saraae 0xde1 +#define IBUS_Thai_sarao 0xde2 +#define IBUS_Thai_saraaimaimuan 0xde3 +#define IBUS_Thai_saraaimaimalai 0xde4 +#define IBUS_Thai_lakkhangyao 0xde5 +#define IBUS_Thai_maiyamok 0xde6 +#define IBUS_Thai_maitaikhu 0xde7 +#define IBUS_Thai_maiek 0xde8 +#define IBUS_Thai_maitho 0xde9 +#define IBUS_Thai_maitri 0xdea +#define IBUS_Thai_maichattawa 0xdeb +#define IBUS_Thai_thanthakhat 0xdec +#define IBUS_Thai_nikhahit 0xded +#define IBUS_Thai_leksun 0xdf0 +#define IBUS_Thai_leknung 0xdf1 +#define IBUS_Thai_leksong 0xdf2 +#define IBUS_Thai_leksam 0xdf3 +#define IBUS_Thai_leksi 0xdf4 +#define IBUS_Thai_lekha 0xdf5 +#define IBUS_Thai_lekhok 0xdf6 +#define IBUS_Thai_lekchet 0xdf7 +#define IBUS_Thai_lekpaet 0xdf8 +#define IBUS_Thai_lekkao 0xdf9 +#define IBUS_Hangul 0xff31 +#define IBUS_Hangul_Start 0xff32 +#define IBUS_Hangul_End 0xff33 +#define IBUS_Hangul_Hanja 0xff34 +#define IBUS_Hangul_Jamo 0xff35 +#define IBUS_Hangul_Romaja 0xff36 +#define IBUS_Hangul_Codeinput 0xff37 +#define IBUS_Hangul_Jeonja 0xff38 +#define IBUS_Hangul_Banja 0xff39 +#define IBUS_Hangul_PreHanja 0xff3a +#define IBUS_Hangul_PostHanja 0xff3b +#define IBUS_Hangul_SingleCandidate 0xff3c +#define IBUS_Hangul_MultipleCandidate 0xff3d +#define IBUS_Hangul_PreviousCandidate 0xff3e +#define IBUS_Hangul_Special 0xff3f +#define IBUS_Hangul_switch 0xff7e +#define IBUS_Hangul_Kiyeog 0xea1 +#define IBUS_Hangul_SsangKiyeog 0xea2 +#define IBUS_Hangul_KiyeogSios 0xea3 +#define IBUS_Hangul_Nieun 0xea4 +#define IBUS_Hangul_NieunJieuj 0xea5 +#define IBUS_Hangul_NieunHieuh 0xea6 +#define IBUS_Hangul_Dikeud 0xea7 +#define IBUS_Hangul_SsangDikeud 0xea8 +#define IBUS_Hangul_Rieul 0xea9 +#define IBUS_Hangul_RieulKiyeog 0xeaa +#define IBUS_Hangul_RieulMieum 0xeab +#define IBUS_Hangul_RieulPieub 0xeac +#define IBUS_Hangul_RieulSios 0xead +#define IBUS_Hangul_RieulTieut 0xeae +#define IBUS_Hangul_RieulPhieuf 0xeaf +#define IBUS_Hangul_RieulHieuh 0xeb0 +#define IBUS_Hangul_Mieum 0xeb1 +#define IBUS_Hangul_Pieub 0xeb2 +#define IBUS_Hangul_SsangPieub 0xeb3 +#define IBUS_Hangul_PieubSios 0xeb4 +#define IBUS_Hangul_Sios 0xeb5 +#define IBUS_Hangul_SsangSios 0xeb6 +#define IBUS_Hangul_Ieung 0xeb7 +#define IBUS_Hangul_Jieuj 0xeb8 +#define IBUS_Hangul_SsangJieuj 0xeb9 +#define IBUS_Hangul_Cieuc 0xeba +#define IBUS_Hangul_Khieuq 0xebb +#define IBUS_Hangul_Tieut 0xebc +#define IBUS_Hangul_Phieuf 0xebd +#define IBUS_Hangul_Hieuh 0xebe +#define IBUS_Hangul_A 0xebf +#define IBUS_Hangul_AE 0xec0 +#define IBUS_Hangul_YA 0xec1 +#define IBUS_Hangul_YAE 0xec2 +#define IBUS_Hangul_EO 0xec3 +#define IBUS_Hangul_E 0xec4 +#define IBUS_Hangul_YEO 0xec5 +#define IBUS_Hangul_YE 0xec6 +#define IBUS_Hangul_O 0xec7 +#define IBUS_Hangul_WA 0xec8 +#define IBUS_Hangul_WAE 0xec9 +#define IBUS_Hangul_OE 0xeca +#define IBUS_Hangul_YO 0xecb +#define IBUS_Hangul_U 0xecc +#define IBUS_Hangul_WEO 0xecd +#define IBUS_Hangul_WE 0xece +#define IBUS_Hangul_WI 0xecf +#define IBUS_Hangul_YU 0xed0 +#define IBUS_Hangul_EU 0xed1 +#define IBUS_Hangul_YI 0xed2 +#define IBUS_Hangul_I 0xed3 +#define IBUS_Hangul_J_Kiyeog 0xed4 +#define IBUS_Hangul_J_SsangKiyeog 0xed5 +#define IBUS_Hangul_J_KiyeogSios 0xed6 +#define IBUS_Hangul_J_Nieun 0xed7 +#define IBUS_Hangul_J_NieunJieuj 0xed8 +#define IBUS_Hangul_J_NieunHieuh 0xed9 +#define IBUS_Hangul_J_Dikeud 0xeda +#define IBUS_Hangul_J_Rieul 0xedb +#define IBUS_Hangul_J_RieulKiyeog 0xedc +#define IBUS_Hangul_J_RieulMieum 0xedd +#define IBUS_Hangul_J_RieulPieub 0xede +#define IBUS_Hangul_J_RieulSios 0xedf +#define IBUS_Hangul_J_RieulTieut 0xee0 +#define IBUS_Hangul_J_RieulPhieuf 0xee1 +#define IBUS_Hangul_J_RieulHieuh 0xee2 +#define IBUS_Hangul_J_Mieum 0xee3 +#define IBUS_Hangul_J_Pieub 0xee4 +#define IBUS_Hangul_J_PieubSios 0xee5 +#define IBUS_Hangul_J_Sios 0xee6 +#define IBUS_Hangul_J_SsangSios 0xee7 +#define IBUS_Hangul_J_Ieung 0xee8 +#define IBUS_Hangul_J_Jieuj 0xee9 +#define IBUS_Hangul_J_Cieuc 0xeea +#define IBUS_Hangul_J_Khieuq 0xeeb +#define IBUS_Hangul_J_Tieut 0xeec +#define IBUS_Hangul_J_Phieuf 0xeed +#define IBUS_Hangul_J_Hieuh 0xeee +#define IBUS_Hangul_RieulYeorinHieuh 0xeef +#define IBUS_Hangul_SunkyeongeumMieum 0xef0 +#define IBUS_Hangul_SunkyeongeumPieub 0xef1 +#define IBUS_Hangul_PanSios 0xef2 +#define IBUS_Hangul_KkogjiDalrinIeung 0xef3 +#define IBUS_Hangul_SunkyeongeumPhieuf 0xef4 +#define IBUS_Hangul_YeorinHieuh 0xef5 +#define IBUS_Hangul_AraeA 0xef6 +#define IBUS_Hangul_AraeAE 0xef7 +#define IBUS_Hangul_J_PanSios 0xef8 +#define IBUS_Hangul_J_KkogjiDalrinIeung 0xef9 +#define IBUS_Hangul_J_YeorinHieuh 0xefa +#define IBUS_Korean_Won 0xeff +#define IBUS_Armenian_ligature_ew 0x1000587 +#define IBUS_Armenian_full_stop 0x1000589 +#define IBUS_Armenian_verjaket 0x1000589 +#define IBUS_Armenian_separation_mark 0x100055d +#define IBUS_Armenian_but 0x100055d +#define IBUS_Armenian_hyphen 0x100058a +#define IBUS_Armenian_yentamna 0x100058a +#define IBUS_Armenian_exclam 0x100055c +#define IBUS_Armenian_amanak 0x100055c +#define IBUS_Armenian_accent 0x100055b +#define IBUS_Armenian_shesht 0x100055b +#define IBUS_Armenian_question 0x100055e +#define IBUS_Armenian_paruyk 0x100055e +#define IBUS_Armenian_AYB 0x1000531 +#define IBUS_Armenian_ayb 0x1000561 +#define IBUS_Armenian_BEN 0x1000532 +#define IBUS_Armenian_ben 0x1000562 +#define IBUS_Armenian_GIM 0x1000533 +#define IBUS_Armenian_gim 0x1000563 +#define IBUS_Armenian_DA 0x1000534 +#define IBUS_Armenian_da 0x1000564 +#define IBUS_Armenian_YECH 0x1000535 +#define IBUS_Armenian_yech 0x1000565 +#define IBUS_Armenian_ZA 0x1000536 +#define IBUS_Armenian_za 0x1000566 +#define IBUS_Armenian_E 0x1000537 +#define IBUS_Armenian_e 0x1000567 +#define IBUS_Armenian_AT 0x1000538 +#define IBUS_Armenian_at 0x1000568 +#define IBUS_Armenian_TO 0x1000539 +#define IBUS_Armenian_to 0x1000569 +#define IBUS_Armenian_ZHE 0x100053a +#define IBUS_Armenian_zhe 0x100056a +#define IBUS_Armenian_INI 0x100053b +#define IBUS_Armenian_ini 0x100056b +#define IBUS_Armenian_LYUN 0x100053c +#define IBUS_Armenian_lyun 0x100056c +#define IBUS_Armenian_KHE 0x100053d +#define IBUS_Armenian_khe 0x100056d +#define IBUS_Armenian_TSA 0x100053e +#define IBUS_Armenian_tsa 0x100056e +#define IBUS_Armenian_KEN 0x100053f +#define IBUS_Armenian_ken 0x100056f +#define IBUS_Armenian_HO 0x1000540 +#define IBUS_Armenian_ho 0x1000570 +#define IBUS_Armenian_DZA 0x1000541 +#define IBUS_Armenian_dza 0x1000571 +#define IBUS_Armenian_GHAT 0x1000542 +#define IBUS_Armenian_ghat 0x1000572 +#define IBUS_Armenian_TCHE 0x1000543 +#define IBUS_Armenian_tche 0x1000573 +#define IBUS_Armenian_MEN 0x1000544 +#define IBUS_Armenian_men 0x1000574 +#define IBUS_Armenian_HI 0x1000545 +#define IBUS_Armenian_hi 0x1000575 +#define IBUS_Armenian_NU 0x1000546 +#define IBUS_Armenian_nu 0x1000576 +#define IBUS_Armenian_SHA 0x1000547 +#define IBUS_Armenian_sha 0x1000577 +#define IBUS_Armenian_VO 0x1000548 +#define IBUS_Armenian_vo 0x1000578 +#define IBUS_Armenian_CHA 0x1000549 +#define IBUS_Armenian_cha 0x1000579 +#define IBUS_Armenian_PE 0x100054a +#define IBUS_Armenian_pe 0x100057a +#define IBUS_Armenian_JE 0x100054b +#define IBUS_Armenian_je 0x100057b +#define IBUS_Armenian_RA 0x100054c +#define IBUS_Armenian_ra 0x100057c +#define IBUS_Armenian_SE 0x100054d +#define IBUS_Armenian_se 0x100057d +#define IBUS_Armenian_VEV 0x100054e +#define IBUS_Armenian_vev 0x100057e +#define IBUS_Armenian_TYUN 0x100054f +#define IBUS_Armenian_tyun 0x100057f +#define IBUS_Armenian_RE 0x1000550 +#define IBUS_Armenian_re 0x1000580 +#define IBUS_Armenian_TSO 0x1000551 +#define IBUS_Armenian_tso 0x1000581 +#define IBUS_Armenian_VYUN 0x1000552 +#define IBUS_Armenian_vyun 0x1000582 +#define IBUS_Armenian_PYUR 0x1000553 +#define IBUS_Armenian_pyur 0x1000583 +#define IBUS_Armenian_KE 0x1000554 +#define IBUS_Armenian_ke 0x1000584 +#define IBUS_Armenian_O 0x1000555 +#define IBUS_Armenian_o 0x1000585 +#define IBUS_Armenian_FE 0x1000556 +#define IBUS_Armenian_fe 0x1000586 +#define IBUS_Armenian_apostrophe 0x100055a +#define IBUS_Georgian_an 0x10010d0 +#define IBUS_Georgian_ban 0x10010d1 +#define IBUS_Georgian_gan 0x10010d2 +#define IBUS_Georgian_don 0x10010d3 +#define IBUS_Georgian_en 0x10010d4 +#define IBUS_Georgian_vin 0x10010d5 +#define IBUS_Georgian_zen 0x10010d6 +#define IBUS_Georgian_tan 0x10010d7 +#define IBUS_Georgian_in 0x10010d8 +#define IBUS_Georgian_kan 0x10010d9 +#define IBUS_Georgian_las 0x10010da +#define IBUS_Georgian_man 0x10010db +#define IBUS_Georgian_nar 0x10010dc +#define IBUS_Georgian_on 0x10010dd +#define IBUS_Georgian_par 0x10010de +#define IBUS_Georgian_zhar 0x10010df +#define IBUS_Georgian_rae 0x10010e0 +#define IBUS_Georgian_san 0x10010e1 +#define IBUS_Georgian_tar 0x10010e2 +#define IBUS_Georgian_un 0x10010e3 +#define IBUS_Georgian_phar 0x10010e4 +#define IBUS_Georgian_khar 0x10010e5 +#define IBUS_Georgian_ghan 0x10010e6 +#define IBUS_Georgian_qar 0x10010e7 +#define IBUS_Georgian_shin 0x10010e8 +#define IBUS_Georgian_chin 0x10010e9 +#define IBUS_Georgian_can 0x10010ea +#define IBUS_Georgian_jil 0x10010eb +#define IBUS_Georgian_cil 0x10010ec +#define IBUS_Georgian_char 0x10010ed +#define IBUS_Georgian_xan 0x10010ee +#define IBUS_Georgian_jhan 0x10010ef +#define IBUS_Georgian_hae 0x10010f0 +#define IBUS_Georgian_he 0x10010f1 +#define IBUS_Georgian_hie 0x10010f2 +#define IBUS_Georgian_we 0x10010f3 +#define IBUS_Georgian_har 0x10010f4 +#define IBUS_Georgian_hoe 0x10010f5 +#define IBUS_Georgian_fi 0x10010f6 +#define IBUS_Xabovedot 0x1001e8a +#define IBUS_Ibreve 0x100012c +#define IBUS_Zstroke 0x10001b5 +#define IBUS_Gcaron 0x10001e6 +#define IBUS_Ocaron 0x10001d1 +#define IBUS_Obarred 0x100019f +#define IBUS_xabovedot 0x1001e8b +#define IBUS_ibreve 0x100012d +#define IBUS_zstroke 0x10001b6 +#define IBUS_gcaron 0x10001e7 +#define IBUS_ocaron 0x10001d2 +#define IBUS_obarred 0x1000275 +#define IBUS_SCHWA 0x100018f +#define IBUS_schwa 0x1000259 +#define IBUS_Lbelowdot 0x1001e36 +#define IBUS_lbelowdot 0x1001e37 +#define IBUS_Abelowdot 0x1001ea0 +#define IBUS_abelowdot 0x1001ea1 +#define IBUS_Ahook 0x1001ea2 +#define IBUS_ahook 0x1001ea3 +#define IBUS_Acircumflexacute 0x1001ea4 +#define IBUS_acircumflexacute 0x1001ea5 +#define IBUS_Acircumflexgrave 0x1001ea6 +#define IBUS_acircumflexgrave 0x1001ea7 +#define IBUS_Acircumflexhook 0x1001ea8 +#define IBUS_acircumflexhook 0x1001ea9 +#define IBUS_Acircumflextilde 0x1001eaa +#define IBUS_acircumflextilde 0x1001eab +#define IBUS_Acircumflexbelowdot 0x1001eac +#define IBUS_acircumflexbelowdot 0x1001ead +#define IBUS_Abreveacute 0x1001eae +#define IBUS_abreveacute 0x1001eaf +#define IBUS_Abrevegrave 0x1001eb0 +#define IBUS_abrevegrave 0x1001eb1 +#define IBUS_Abrevehook 0x1001eb2 +#define IBUS_abrevehook 0x1001eb3 +#define IBUS_Abrevetilde 0x1001eb4 +#define IBUS_abrevetilde 0x1001eb5 +#define IBUS_Abrevebelowdot 0x1001eb6 +#define IBUS_abrevebelowdot 0x1001eb7 +#define IBUS_Ebelowdot 0x1001eb8 +#define IBUS_ebelowdot 0x1001eb9 +#define IBUS_Ehook 0x1001eba +#define IBUS_ehook 0x1001ebb +#define IBUS_Etilde 0x1001ebc +#define IBUS_etilde 0x1001ebd +#define IBUS_Ecircumflexacute 0x1001ebe +#define IBUS_ecircumflexacute 0x1001ebf +#define IBUS_Ecircumflexgrave 0x1001ec0 +#define IBUS_ecircumflexgrave 0x1001ec1 +#define IBUS_Ecircumflexhook 0x1001ec2 +#define IBUS_ecircumflexhook 0x1001ec3 +#define IBUS_Ecircumflextilde 0x1001ec4 +#define IBUS_ecircumflextilde 0x1001ec5 +#define IBUS_Ecircumflexbelowdot 0x1001ec6 +#define IBUS_ecircumflexbelowdot 0x1001ec7 +#define IBUS_Ihook 0x1001ec8 +#define IBUS_ihook 0x1001ec9 +#define IBUS_Ibelowdot 0x1001eca +#define IBUS_ibelowdot 0x1001ecb +#define IBUS_Obelowdot 0x1001ecc +#define IBUS_obelowdot 0x1001ecd +#define IBUS_Ohook 0x1001ece +#define IBUS_ohook 0x1001ecf +#define IBUS_Ocircumflexacute 0x1001ed0 +#define IBUS_ocircumflexacute 0x1001ed1 +#define IBUS_Ocircumflexgrave 0x1001ed2 +#define IBUS_ocircumflexgrave 0x1001ed3 +#define IBUS_Ocircumflexhook 0x1001ed4 +#define IBUS_ocircumflexhook 0x1001ed5 +#define IBUS_Ocircumflextilde 0x1001ed6 +#define IBUS_ocircumflextilde 0x1001ed7 +#define IBUS_Ocircumflexbelowdot 0x1001ed8 +#define IBUS_ocircumflexbelowdot 0x1001ed9 +#define IBUS_Ohornacute 0x1001eda +#define IBUS_ohornacute 0x1001edb +#define IBUS_Ohorngrave 0x1001edc +#define IBUS_ohorngrave 0x1001edd +#define IBUS_Ohornhook 0x1001ede +#define IBUS_ohornhook 0x1001edf +#define IBUS_Ohorntilde 0x1001ee0 +#define IBUS_ohorntilde 0x1001ee1 +#define IBUS_Ohornbelowdot 0x1001ee2 +#define IBUS_ohornbelowdot 0x1001ee3 +#define IBUS_Ubelowdot 0x1001ee4 +#define IBUS_ubelowdot 0x1001ee5 +#define IBUS_Uhook 0x1001ee6 +#define IBUS_uhook 0x1001ee7 +#define IBUS_Uhornacute 0x1001ee8 +#define IBUS_uhornacute 0x1001ee9 +#define IBUS_Uhorngrave 0x1001eea +#define IBUS_uhorngrave 0x1001eeb +#define IBUS_Uhornhook 0x1001eec +#define IBUS_uhornhook 0x1001eed +#define IBUS_Uhorntilde 0x1001eee +#define IBUS_uhorntilde 0x1001eef +#define IBUS_Uhornbelowdot 0x1001ef0 +#define IBUS_uhornbelowdot 0x1001ef1 +#define IBUS_Ybelowdot 0x1001ef4 +#define IBUS_ybelowdot 0x1001ef5 +#define IBUS_Yhook 0x1001ef6 +#define IBUS_yhook 0x1001ef7 +#define IBUS_Ytilde 0x1001ef8 +#define IBUS_ytilde 0x1001ef9 +#define IBUS_Ohorn 0x10001a0 +#define IBUS_ohorn 0x10001a1 +#define IBUS_Uhorn 0x10001af +#define IBUS_uhorn 0x10001b0 +#define IBUS_EcuSign 0x10020a0 +#define IBUS_ColonSign 0x10020a1 +#define IBUS_CruzeiroSign 0x10020a2 +#define IBUS_FFrancSign 0x10020a3 +#define IBUS_LiraSign 0x10020a4 +#define IBUS_MillSign 0x10020a5 +#define IBUS_NairaSign 0x10020a6 +#define IBUS_PesetaSign 0x10020a7 +#define IBUS_RupeeSign 0x10020a8 +#define IBUS_WonSign 0x10020a9 +#define IBUS_NewSheqelSign 0x10020aa +#define IBUS_DongSign 0x10020ab +#define IBUS_EuroSign 0x20ac +#define IBUS_zerosuperior 0x1002070 +#define IBUS_foursuperior 0x1002074 +#define IBUS_fivesuperior 0x1002075 +#define IBUS_sixsuperior 0x1002076 +#define IBUS_sevensuperior 0x1002077 +#define IBUS_eightsuperior 0x1002078 +#define IBUS_ninesuperior 0x1002079 +#define IBUS_zerosubscript 0x1002080 +#define IBUS_onesubscript 0x1002081 +#define IBUS_twosubscript 0x1002082 +#define IBUS_threesubscript 0x1002083 +#define IBUS_foursubscript 0x1002084 +#define IBUS_fivesubscript 0x1002085 +#define IBUS_sixsubscript 0x1002086 +#define IBUS_sevensubscript 0x1002087 +#define IBUS_eightsubscript 0x1002088 +#define IBUS_ninesubscript 0x1002089 +#define IBUS_partdifferential 0x1002202 +#define IBUS_emptyset 0x1002205 +#define IBUS_elementof 0x1002208 +#define IBUS_notelementof 0x1002209 +#define IBUS_containsas 0x100220b +#define IBUS_squareroot 0x100221a +#define IBUS_cuberoot 0x100221b +#define IBUS_fourthroot 0x100221c +#define IBUS_dintegral 0x100222c +#define IBUS_tintegral 0x100222d +#define IBUS_because 0x1002235 +#define IBUS_approxeq 0x1002248 +#define IBUS_notapproxeq 0x1002247 +#define IBUS_notidentical 0x1002262 +#define IBUS_stricteq 0x1002263 +#define IBUS_braille_dot_1 0xfff1 +#define IBUS_braille_dot_2 0xfff2 +#define IBUS_braille_dot_3 0xfff3 +#define IBUS_braille_dot_4 0xfff4 +#define IBUS_braille_dot_5 0xfff5 +#define IBUS_braille_dot_6 0xfff6 +#define IBUS_braille_dot_7 0xfff7 +#define IBUS_braille_dot_8 0xfff8 +#define IBUS_braille_dot_9 0xfff9 +#define IBUS_braille_dot_10 0xfffa +#define IBUS_braille_blank 0x1002800 +#define IBUS_braille_dots_1 0x1002801 +#define IBUS_braille_dots_2 0x1002802 +#define IBUS_braille_dots_12 0x1002803 +#define IBUS_braille_dots_3 0x1002804 +#define IBUS_braille_dots_13 0x1002805 +#define IBUS_braille_dots_23 0x1002806 +#define IBUS_braille_dots_123 0x1002807 +#define IBUS_braille_dots_4 0x1002808 +#define IBUS_braille_dots_14 0x1002809 +#define IBUS_braille_dots_24 0x100280a +#define IBUS_braille_dots_124 0x100280b +#define IBUS_braille_dots_34 0x100280c +#define IBUS_braille_dots_134 0x100280d +#define IBUS_braille_dots_234 0x100280e +#define IBUS_braille_dots_1234 0x100280f +#define IBUS_braille_dots_5 0x1002810 +#define IBUS_braille_dots_15 0x1002811 +#define IBUS_braille_dots_25 0x1002812 +#define IBUS_braille_dots_125 0x1002813 +#define IBUS_braille_dots_35 0x1002814 +#define IBUS_braille_dots_135 0x1002815 +#define IBUS_braille_dots_235 0x1002816 +#define IBUS_braille_dots_1235 0x1002817 +#define IBUS_braille_dots_45 0x1002818 +#define IBUS_braille_dots_145 0x1002819 +#define IBUS_braille_dots_245 0x100281a +#define IBUS_braille_dots_1245 0x100281b +#define IBUS_braille_dots_345 0x100281c +#define IBUS_braille_dots_1345 0x100281d +#define IBUS_braille_dots_2345 0x100281e +#define IBUS_braille_dots_12345 0x100281f +#define IBUS_braille_dots_6 0x1002820 +#define IBUS_braille_dots_16 0x1002821 +#define IBUS_braille_dots_26 0x1002822 +#define IBUS_braille_dots_126 0x1002823 +#define IBUS_braille_dots_36 0x1002824 +#define IBUS_braille_dots_136 0x1002825 +#define IBUS_braille_dots_236 0x1002826 +#define IBUS_braille_dots_1236 0x1002827 +#define IBUS_braille_dots_46 0x1002828 +#define IBUS_braille_dots_146 0x1002829 +#define IBUS_braille_dots_246 0x100282a +#define IBUS_braille_dots_1246 0x100282b +#define IBUS_braille_dots_346 0x100282c +#define IBUS_braille_dots_1346 0x100282d +#define IBUS_braille_dots_2346 0x100282e +#define IBUS_braille_dots_12346 0x100282f +#define IBUS_braille_dots_56 0x1002830 +#define IBUS_braille_dots_156 0x1002831 +#define IBUS_braille_dots_256 0x1002832 +#define IBUS_braille_dots_1256 0x1002833 +#define IBUS_braille_dots_356 0x1002834 +#define IBUS_braille_dots_1356 0x1002835 +#define IBUS_braille_dots_2356 0x1002836 +#define IBUS_braille_dots_12356 0x1002837 +#define IBUS_braille_dots_456 0x1002838 +#define IBUS_braille_dots_1456 0x1002839 +#define IBUS_braille_dots_2456 0x100283a +#define IBUS_braille_dots_12456 0x100283b +#define IBUS_braille_dots_3456 0x100283c +#define IBUS_braille_dots_13456 0x100283d +#define IBUS_braille_dots_23456 0x100283e +#define IBUS_braille_dots_123456 0x100283f +#define IBUS_braille_dots_7 0x1002840 +#define IBUS_braille_dots_17 0x1002841 +#define IBUS_braille_dots_27 0x1002842 +#define IBUS_braille_dots_127 0x1002843 +#define IBUS_braille_dots_37 0x1002844 +#define IBUS_braille_dots_137 0x1002845 +#define IBUS_braille_dots_237 0x1002846 +#define IBUS_braille_dots_1237 0x1002847 +#define IBUS_braille_dots_47 0x1002848 +#define IBUS_braille_dots_147 0x1002849 +#define IBUS_braille_dots_247 0x100284a +#define IBUS_braille_dots_1247 0x100284b +#define IBUS_braille_dots_347 0x100284c +#define IBUS_braille_dots_1347 0x100284d +#define IBUS_braille_dots_2347 0x100284e +#define IBUS_braille_dots_12347 0x100284f +#define IBUS_braille_dots_57 0x1002850 +#define IBUS_braille_dots_157 0x1002851 +#define IBUS_braille_dots_257 0x1002852 +#define IBUS_braille_dots_1257 0x1002853 +#define IBUS_braille_dots_357 0x1002854 +#define IBUS_braille_dots_1357 0x1002855 +#define IBUS_braille_dots_2357 0x1002856 +#define IBUS_braille_dots_12357 0x1002857 +#define IBUS_braille_dots_457 0x1002858 +#define IBUS_braille_dots_1457 0x1002859 +#define IBUS_braille_dots_2457 0x100285a +#define IBUS_braille_dots_12457 0x100285b +#define IBUS_braille_dots_3457 0x100285c +#define IBUS_braille_dots_13457 0x100285d +#define IBUS_braille_dots_23457 0x100285e +#define IBUS_braille_dots_123457 0x100285f +#define IBUS_braille_dots_67 0x1002860 +#define IBUS_braille_dots_167 0x1002861 +#define IBUS_braille_dots_267 0x1002862 +#define IBUS_braille_dots_1267 0x1002863 +#define IBUS_braille_dots_367 0x1002864 +#define IBUS_braille_dots_1367 0x1002865 +#define IBUS_braille_dots_2367 0x1002866 +#define IBUS_braille_dots_12367 0x1002867 +#define IBUS_braille_dots_467 0x1002868 +#define IBUS_braille_dots_1467 0x1002869 +#define IBUS_braille_dots_2467 0x100286a +#define IBUS_braille_dots_12467 0x100286b +#define IBUS_braille_dots_3467 0x100286c +#define IBUS_braille_dots_13467 0x100286d +#define IBUS_braille_dots_23467 0x100286e +#define IBUS_braille_dots_123467 0x100286f +#define IBUS_braille_dots_567 0x1002870 +#define IBUS_braille_dots_1567 0x1002871 +#define IBUS_braille_dots_2567 0x1002872 +#define IBUS_braille_dots_12567 0x1002873 +#define IBUS_braille_dots_3567 0x1002874 +#define IBUS_braille_dots_13567 0x1002875 +#define IBUS_braille_dots_23567 0x1002876 +#define IBUS_braille_dots_123567 0x1002877 +#define IBUS_braille_dots_4567 0x1002878 +#define IBUS_braille_dots_14567 0x1002879 +#define IBUS_braille_dots_24567 0x100287a +#define IBUS_braille_dots_124567 0x100287b +#define IBUS_braille_dots_34567 0x100287c +#define IBUS_braille_dots_134567 0x100287d +#define IBUS_braille_dots_234567 0x100287e +#define IBUS_braille_dots_1234567 0x100287f +#define IBUS_braille_dots_8 0x1002880 +#define IBUS_braille_dots_18 0x1002881 +#define IBUS_braille_dots_28 0x1002882 +#define IBUS_braille_dots_128 0x1002883 +#define IBUS_braille_dots_38 0x1002884 +#define IBUS_braille_dots_138 0x1002885 +#define IBUS_braille_dots_238 0x1002886 +#define IBUS_braille_dots_1238 0x1002887 +#define IBUS_braille_dots_48 0x1002888 +#define IBUS_braille_dots_148 0x1002889 +#define IBUS_braille_dots_248 0x100288a +#define IBUS_braille_dots_1248 0x100288b +#define IBUS_braille_dots_348 0x100288c +#define IBUS_braille_dots_1348 0x100288d +#define IBUS_braille_dots_2348 0x100288e +#define IBUS_braille_dots_12348 0x100288f +#define IBUS_braille_dots_58 0x1002890 +#define IBUS_braille_dots_158 0x1002891 +#define IBUS_braille_dots_258 0x1002892 +#define IBUS_braille_dots_1258 0x1002893 +#define IBUS_braille_dots_358 0x1002894 +#define IBUS_braille_dots_1358 0x1002895 +#define IBUS_braille_dots_2358 0x1002896 +#define IBUS_braille_dots_12358 0x1002897 +#define IBUS_braille_dots_458 0x1002898 +#define IBUS_braille_dots_1458 0x1002899 +#define IBUS_braille_dots_2458 0x100289a +#define IBUS_braille_dots_12458 0x100289b +#define IBUS_braille_dots_3458 0x100289c +#define IBUS_braille_dots_13458 0x100289d +#define IBUS_braille_dots_23458 0x100289e +#define IBUS_braille_dots_123458 0x100289f +#define IBUS_braille_dots_68 0x10028a0 +#define IBUS_braille_dots_168 0x10028a1 +#define IBUS_braille_dots_268 0x10028a2 +#define IBUS_braille_dots_1268 0x10028a3 +#define IBUS_braille_dots_368 0x10028a4 +#define IBUS_braille_dots_1368 0x10028a5 +#define IBUS_braille_dots_2368 0x10028a6 +#define IBUS_braille_dots_12368 0x10028a7 +#define IBUS_braille_dots_468 0x10028a8 +#define IBUS_braille_dots_1468 0x10028a9 +#define IBUS_braille_dots_2468 0x10028aa +#define IBUS_braille_dots_12468 0x10028ab +#define IBUS_braille_dots_3468 0x10028ac +#define IBUS_braille_dots_13468 0x10028ad +#define IBUS_braille_dots_23468 0x10028ae +#define IBUS_braille_dots_123468 0x10028af +#define IBUS_braille_dots_568 0x10028b0 +#define IBUS_braille_dots_1568 0x10028b1 +#define IBUS_braille_dots_2568 0x10028b2 +#define IBUS_braille_dots_12568 0x10028b3 +#define IBUS_braille_dots_3568 0x10028b4 +#define IBUS_braille_dots_13568 0x10028b5 +#define IBUS_braille_dots_23568 0x10028b6 +#define IBUS_braille_dots_123568 0x10028b7 +#define IBUS_braille_dots_4568 0x10028b8 +#define IBUS_braille_dots_14568 0x10028b9 +#define IBUS_braille_dots_24568 0x10028ba +#define IBUS_braille_dots_124568 0x10028bb +#define IBUS_braille_dots_34568 0x10028bc +#define IBUS_braille_dots_134568 0x10028bd +#define IBUS_braille_dots_234568 0x10028be +#define IBUS_braille_dots_1234568 0x10028bf +#define IBUS_braille_dots_78 0x10028c0 +#define IBUS_braille_dots_178 0x10028c1 +#define IBUS_braille_dots_278 0x10028c2 +#define IBUS_braille_dots_1278 0x10028c3 +#define IBUS_braille_dots_378 0x10028c4 +#define IBUS_braille_dots_1378 0x10028c5 +#define IBUS_braille_dots_2378 0x10028c6 +#define IBUS_braille_dots_12378 0x10028c7 +#define IBUS_braille_dots_478 0x10028c8 +#define IBUS_braille_dots_1478 0x10028c9 +#define IBUS_braille_dots_2478 0x10028ca +#define IBUS_braille_dots_12478 0x10028cb +#define IBUS_braille_dots_3478 0x10028cc +#define IBUS_braille_dots_13478 0x10028cd +#define IBUS_braille_dots_23478 0x10028ce +#define IBUS_braille_dots_123478 0x10028cf +#define IBUS_braille_dots_578 0x10028d0 +#define IBUS_braille_dots_1578 0x10028d1 +#define IBUS_braille_dots_2578 0x10028d2 +#define IBUS_braille_dots_12578 0x10028d3 +#define IBUS_braille_dots_3578 0x10028d4 +#define IBUS_braille_dots_13578 0x10028d5 +#define IBUS_braille_dots_23578 0x10028d6 +#define IBUS_braille_dots_123578 0x10028d7 +#define IBUS_braille_dots_4578 0x10028d8 +#define IBUS_braille_dots_14578 0x10028d9 +#define IBUS_braille_dots_24578 0x10028da +#define IBUS_braille_dots_124578 0x10028db +#define IBUS_braille_dots_34578 0x10028dc +#define IBUS_braille_dots_134578 0x10028dd +#define IBUS_braille_dots_234578 0x10028de +#define IBUS_braille_dots_1234578 0x10028df +#define IBUS_braille_dots_678 0x10028e0 +#define IBUS_braille_dots_1678 0x10028e1 +#define IBUS_braille_dots_2678 0x10028e2 +#define IBUS_braille_dots_12678 0x10028e3 +#define IBUS_braille_dots_3678 0x10028e4 +#define IBUS_braille_dots_13678 0x10028e5 +#define IBUS_braille_dots_23678 0x10028e6 +#define IBUS_braille_dots_123678 0x10028e7 +#define IBUS_braille_dots_4678 0x10028e8 +#define IBUS_braille_dots_14678 0x10028e9 +#define IBUS_braille_dots_24678 0x10028ea +#define IBUS_braille_dots_124678 0x10028eb +#define IBUS_braille_dots_34678 0x10028ec +#define IBUS_braille_dots_134678 0x10028ed +#define IBUS_braille_dots_234678 0x10028ee +#define IBUS_braille_dots_1234678 0x10028ef +#define IBUS_braille_dots_5678 0x10028f0 +#define IBUS_braille_dots_15678 0x10028f1 +#define IBUS_braille_dots_25678 0x10028f2 +#define IBUS_braille_dots_125678 0x10028f3 +#define IBUS_braille_dots_35678 0x10028f4 +#define IBUS_braille_dots_135678 0x10028f5 +#define IBUS_braille_dots_235678 0x10028f6 +#define IBUS_braille_dots_1235678 0x10028f7 +#define IBUS_braille_dots_45678 0x10028f8 +#define IBUS_braille_dots_145678 0x10028f9 +#define IBUS_braille_dots_245678 0x10028fa +#define IBUS_braille_dots_1245678 0x10028fb +#define IBUS_braille_dots_345678 0x10028fc +#define IBUS_braille_dots_1345678 0x10028fd +#define IBUS_braille_dots_2345678 0x10028fe +#define IBUS_braille_dots_12345678 0x10028ff + +#endif /* __IBUS_KEYSYMS_COMPAT_H__ */ diff --git a/src/ibuskeysyms-update.pl b/src/ibuskeysyms-update.pl index 1afcfa392..265818fe8 100755 --- a/src/ibuskeysyms-update.pl +++ b/src/ibuskeysyms-update.pl @@ -68,10 +68,13 @@ * Boston, MA 02111-1307, USA. */ +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + #ifndef __IBUS_KEYSYMS_H__ #define __IBUS_KEYSYMS_H__ - EOF @@ -88,7 +91,7 @@ $_ = $keysymelements[2]; die "Internal error, was expecting \"0x*\", found: $_\n" if ( ! /^0x/ ); - $keysymelements[1] =~ s/^XK_/IBUS_/g; + $keysymelements[1] =~ s/^XK_/IBUS_KEY_/g; printf OUT_IBUSKEYSYMS "#define %s 0x%03x\n", $keysymelements[1], hex($keysymelements[2]); } diff --git a/src/ibuskeysyms.h b/src/ibuskeysyms.h index 51d31512c..ff46414a1 100644 --- a/src/ibuskeysyms.h +++ b/src/ibuskeysyms.h @@ -1,3 +1,5 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang * Copyright (C) 2008-2010 Red Hat, Inc. @@ -17,2077 +19,2104 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -/** - * SECTION: ibuskeysyms - * @short_description: Key symbol definition. - * @title: IBusKeysyms - * @stability: Stable - * - * This section defines the key symbols (keysym) used in IBus. - * Those keysym data is converted from keysymdef.h in - * FreeDesktop. - * - * Most of the key symbols are not explicit documented, - * because they are self-explaining. - * - * @see_also: #IBusKeymap, #IBusHotkeyProfile - * - */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif #ifndef __IBUS_KEYSYMS_H__ #define __IBUS_KEYSYMS_H__ - -#define IBUS_VoidSymbol 0xffffff -#define IBUS_BackSpace 0xff08 -#define IBUS_Tab 0xff09 -#define IBUS_Linefeed 0xff0a -#define IBUS_Clear 0xff0b -#define IBUS_Return 0xff0d -#define IBUS_Pause 0xff13 -#define IBUS_Scroll_Lock 0xff14 -#define IBUS_Sys_Req 0xff15 -#define IBUS_Escape 0xff1b -#define IBUS_Delete 0xffff - - -/** - * IBUS_Multi_key: - * - * Key for composing characters. - * A.k.a. Compose Key. - */ -#define IBUS_Multi_key 0xff20 - -/** - * IBUS_Codeinput: - * - * International and multi-key character composition. - */ -#define IBUS_Codeinput 0xff37 -#define IBUS_SingleCandidate 0xff3c -#define IBUS_MultipleCandidate 0xff3d -#define IBUS_PreviousCandidate 0xff3e - -/** - * IBUS_Kanji: - * - * Japanese keyboard support. - */ -#define IBUS_Kanji 0xff21 - -/** - * IBUS_Muhenkan: - * - * Japanese keyboard support. - */ -#define IBUS_Muhenkan 0xff22 - -/** - * IBUS_Henkan_Mode: - * - * Japanese keyboard support. - */ -#define IBUS_Henkan_Mode 0xff23 - -/** - * IBUS_Henkan: - * - * Japanese keyboard support. - */ -#define IBUS_Henkan 0xff23 - -/** - * IBUS_Romaji: - * - * Japanese keyboard support. - */ -#define IBUS_Romaji 0xff24 - -/** - * IBUS_Hiragana: - * - * Japanese keyboard support. - */ -#define IBUS_Hiragana 0xff25 - -/** - * IBUS_Katakana: - * - * Japanese keyboard support. - */ -#define IBUS_Katakana 0xff26 - -/** - * IBUS_Hiragana_Katakana: - * - * Japanese keyboard support. - */ -#define IBUS_Hiragana_Katakana 0xff27 -#define IBUS_Zenkaku 0xff28 -#define IBUS_Hankaku 0xff29 -#define IBUS_Zenkaku_Hankaku 0xff2a -#define IBUS_Touroku 0xff2b -#define IBUS_Massyo 0xff2c -#define IBUS_Kana_Lock 0xff2d -#define IBUS_Kana_Shift 0xff2e -#define IBUS_Eisu_Shift 0xff2f -#define IBUS_Eisu_toggle 0xff30 -#define IBUS_Kanji_Bangou 0xff37 -#define IBUS_Zen_Koho 0xff3d -#define IBUS_Mae_Koho 0xff3e -#define IBUS_Home 0xff50 -#define IBUS_Left 0xff51 -#define IBUS_Up 0xff52 -#define IBUS_Right 0xff53 -#define IBUS_Down 0xff54 -#define IBUS_Prior 0xff55 -#define IBUS_Page_Up 0xff55 -#define IBUS_Next 0xff56 -#define IBUS_Page_Down 0xff56 -#define IBUS_End 0xff57 -#define IBUS_Begin 0xff58 -#define IBUS_Select 0xff60 -#define IBUS_Print 0xff61 -#define IBUS_Execute 0xff62 -#define IBUS_Insert 0xff63 -#define IBUS_Undo 0xff65 -#define IBUS_Redo 0xff66 -#define IBUS_Menu 0xff67 -#define IBUS_Find 0xff68 -#define IBUS_Cancel 0xff69 -#define IBUS_Help 0xff6a -#define IBUS_Break 0xff6b -#define IBUS_Mode_switch 0xff7e -#define IBUS_script_switch 0xff7e -#define IBUS_Num_Lock 0xff7f -#define IBUS_KP_Space 0xff80 -#define IBUS_KP_Tab 0xff89 -#define IBUS_KP_Enter 0xff8d -#define IBUS_KP_F1 0xff91 -#define IBUS_KP_F2 0xff92 -#define IBUS_KP_F3 0xff93 -#define IBUS_KP_F4 0xff94 -#define IBUS_KP_Home 0xff95 -#define IBUS_KP_Left 0xff96 -#define IBUS_KP_Up 0xff97 -#define IBUS_KP_Right 0xff98 -#define IBUS_KP_Down 0xff99 -#define IBUS_KP_Prior 0xff9a -#define IBUS_KP_Page_Up 0xff9a -#define IBUS_KP_Next 0xff9b -#define IBUS_KP_Page_Down 0xff9b -#define IBUS_KP_End 0xff9c -#define IBUS_KP_Begin 0xff9d -#define IBUS_KP_Insert 0xff9e -#define IBUS_KP_Delete 0xff9f -#define IBUS_KP_Equal 0xffbd -#define IBUS_KP_Multiply 0xffaa -#define IBUS_KP_Add 0xffab -#define IBUS_KP_Separator 0xffac -#define IBUS_KP_Subtract 0xffad -#define IBUS_KP_Decimal 0xffae -#define IBUS_KP_Divide 0xffaf -#define IBUS_KP_0 0xffb0 -#define IBUS_KP_1 0xffb1 -#define IBUS_KP_2 0xffb2 -#define IBUS_KP_3 0xffb3 -#define IBUS_KP_4 0xffb4 -#define IBUS_KP_5 0xffb5 -#define IBUS_KP_6 0xffb6 -#define IBUS_KP_7 0xffb7 -#define IBUS_KP_8 0xffb8 -#define IBUS_KP_9 0xffb9 -#define IBUS_F1 0xffbe -#define IBUS_F2 0xffbf -#define IBUS_F3 0xffc0 -#define IBUS_F4 0xffc1 -#define IBUS_F5 0xffc2 -#define IBUS_F6 0xffc3 -#define IBUS_F7 0xffc4 -#define IBUS_F8 0xffc5 -#define IBUS_F9 0xffc6 -#define IBUS_F10 0xffc7 -#define IBUS_F11 0xffc8 -#define IBUS_L1 0xffc8 -#define IBUS_F12 0xffc9 -#define IBUS_L2 0xffc9 -#define IBUS_F13 0xffca -#define IBUS_L3 0xffca -#define IBUS_F14 0xffcb -#define IBUS_L4 0xffcb -#define IBUS_F15 0xffcc -#define IBUS_L5 0xffcc -#define IBUS_F16 0xffcd -#define IBUS_L6 0xffcd -#define IBUS_F17 0xffce -#define IBUS_L7 0xffce -#define IBUS_F18 0xffcf -#define IBUS_L8 0xffcf -#define IBUS_F19 0xffd0 -#define IBUS_L9 0xffd0 -#define IBUS_F20 0xffd1 -#define IBUS_L10 0xffd1 -#define IBUS_F21 0xffd2 -#define IBUS_R1 0xffd2 -#define IBUS_F22 0xffd3 -#define IBUS_R2 0xffd3 -#define IBUS_F23 0xffd4 -#define IBUS_R3 0xffd4 -#define IBUS_F24 0xffd5 -#define IBUS_R4 0xffd5 -#define IBUS_F25 0xffd6 -#define IBUS_R5 0xffd6 -#define IBUS_F26 0xffd7 -#define IBUS_R6 0xffd7 -#define IBUS_F27 0xffd8 -#define IBUS_R7 0xffd8 -#define IBUS_F28 0xffd9 -#define IBUS_R8 0xffd9 -#define IBUS_F29 0xffda -#define IBUS_R9 0xffda -#define IBUS_F30 0xffdb -#define IBUS_R10 0xffdb -#define IBUS_F31 0xffdc -#define IBUS_R11 0xffdc -#define IBUS_F32 0xffdd -#define IBUS_R12 0xffdd -#define IBUS_F33 0xffde -#define IBUS_R13 0xffde -#define IBUS_F34 0xffdf -#define IBUS_R14 0xffdf -#define IBUS_F35 0xffe0 -#define IBUS_R15 0xffe0 -#define IBUS_Shift_L 0xffe1 -#define IBUS_Shift_R 0xffe2 -#define IBUS_Control_L 0xffe3 -#define IBUS_Control_R 0xffe4 -#define IBUS_Caps_Lock 0xffe5 -#define IBUS_Shift_Lock 0xffe6 -#define IBUS_Meta_L 0xffe7 -#define IBUS_Meta_R 0xffe8 -#define IBUS_Alt_L 0xffe9 -#define IBUS_Alt_R 0xffea -#define IBUS_Super_L 0xffeb -#define IBUS_Super_R 0xffec -#define IBUS_Hyper_L 0xffed -#define IBUS_Hyper_R 0xffee -#define IBUS_ISO_Lock 0xfe01 -#define IBUS_ISO_Level2_Latch 0xfe02 -#define IBUS_ISO_Level3_Shift 0xfe03 -#define IBUS_ISO_Level3_Latch 0xfe04 -#define IBUS_ISO_Level3_Lock 0xfe05 -#define IBUS_ISO_Level5_Shift 0xfe11 -#define IBUS_ISO_Level5_Latch 0xfe12 -#define IBUS_ISO_Level5_Lock 0xfe13 -#define IBUS_ISO_Group_Shift 0xff7e -#define IBUS_ISO_Group_Latch 0xfe06 -#define IBUS_ISO_Group_Lock 0xfe07 -#define IBUS_ISO_Next_Group 0xfe08 -#define IBUS_ISO_Next_Group_Lock 0xfe09 -#define IBUS_ISO_Prev_Group 0xfe0a -#define IBUS_ISO_Prev_Group_Lock 0xfe0b -#define IBUS_ISO_First_Group 0xfe0c -#define IBUS_ISO_First_Group_Lock 0xfe0d -#define IBUS_ISO_Last_Group 0xfe0e -#define IBUS_ISO_Last_Group_Lock 0xfe0f -#define IBUS_ISO_Left_Tab 0xfe20 -#define IBUS_ISO_Move_Line_Up 0xfe21 -#define IBUS_ISO_Move_Line_Down 0xfe22 -#define IBUS_ISO_Partial_Line_Up 0xfe23 -#define IBUS_ISO_Partial_Line_Down 0xfe24 -#define IBUS_ISO_Partial_Space_Left 0xfe25 -#define IBUS_ISO_Partial_Space_Right 0xfe26 -#define IBUS_ISO_Set_Margin_Left 0xfe27 -#define IBUS_ISO_Set_Margin_Right 0xfe28 -#define IBUS_ISO_Release_Margin_Left 0xfe29 -#define IBUS_ISO_Release_Margin_Right 0xfe2a -#define IBUS_ISO_Release_Both_Margins 0xfe2b -#define IBUS_ISO_Fast_Cursor_Left 0xfe2c -#define IBUS_ISO_Fast_Cursor_Right 0xfe2d -#define IBUS_ISO_Fast_Cursor_Up 0xfe2e -#define IBUS_ISO_Fast_Cursor_Down 0xfe2f -#define IBUS_ISO_Continuous_Underline 0xfe30 -#define IBUS_ISO_Discontinuous_Underline 0xfe31 -#define IBUS_ISO_Emphasize 0xfe32 -#define IBUS_ISO_Center_Object 0xfe33 -#define IBUS_ISO_Enter 0xfe34 -#define IBUS_dead_grave 0xfe50 -#define IBUS_dead_acute 0xfe51 -#define IBUS_dead_circumflex 0xfe52 -#define IBUS_dead_tilde 0xfe53 -#define IBUS_dead_perispomeni 0xfe53 -#define IBUS_dead_macron 0xfe54 -#define IBUS_dead_breve 0xfe55 -#define IBUS_dead_abovedot 0xfe56 -#define IBUS_dead_diaeresis 0xfe57 -#define IBUS_dead_abovering 0xfe58 -#define IBUS_dead_doubleacute 0xfe59 -#define IBUS_dead_caron 0xfe5a -#define IBUS_dead_cedilla 0xfe5b -#define IBUS_dead_ogonek 0xfe5c -#define IBUS_dead_iota 0xfe5d -#define IBUS_dead_voiced_sound 0xfe5e -#define IBUS_dead_semivoiced_sound 0xfe5f -#define IBUS_dead_belowdot 0xfe60 -#define IBUS_dead_hook 0xfe61 -#define IBUS_dead_horn 0xfe62 -#define IBUS_dead_stroke 0xfe63 -#define IBUS_dead_abovecomma 0xfe64 -#define IBUS_dead_psili 0xfe64 -#define IBUS_dead_abovereversedcomma 0xfe65 -#define IBUS_dead_dasia 0xfe65 -#define IBUS_dead_belowring 0xfe67 -#define IBUS_dead_belowmacron 0xfe68 -#define IBUS_dead_belowcircumflex 0xfe69 -#define IBUS_dead_belowtilde 0xfe6a -#define IBUS_dead_belowbreve 0xfe6b -#define IBUS_dead_belowdiaeresis 0xfe6c -#define IBUS_First_Virtual_Screen 0xfed0 -#define IBUS_Prev_Virtual_Screen 0xfed1 -#define IBUS_Next_Virtual_Screen 0xfed2 -#define IBUS_Last_Virtual_Screen 0xfed4 -#define IBUS_Terminate_Server 0xfed5 -#define IBUS_AccessX_Enable 0xfe70 -#define IBUS_AccessX_Feedback_Enable 0xfe71 -#define IBUS_RepeatKeys_Enable 0xfe72 -#define IBUS_SlowKeys_Enable 0xfe73 -#define IBUS_BounceKeys_Enable 0xfe74 -#define IBUS_StickyKeys_Enable 0xfe75 -#define IBUS_MouseKeys_Enable 0xfe76 -#define IBUS_MouseKeys_Accel_Enable 0xfe77 -#define IBUS_Overlay1_Enable 0xfe78 -#define IBUS_Overlay2_Enable 0xfe79 -#define IBUS_AudibleBell_Enable 0xfe7a -#define IBUS_Pointer_Left 0xfee0 -#define IBUS_Pointer_Right 0xfee1 -#define IBUS_Pointer_Up 0xfee2 -#define IBUS_Pointer_Down 0xfee3 -#define IBUS_Pointer_UpLeft 0xfee4 -#define IBUS_Pointer_UpRight 0xfee5 -#define IBUS_Pointer_DownLeft 0xfee6 -#define IBUS_Pointer_DownRight 0xfee7 -#define IBUS_Pointer_Button_Dflt 0xfee8 -#define IBUS_Pointer_Button1 0xfee9 -#define IBUS_Pointer_Button2 0xfeea -#define IBUS_Pointer_Button3 0xfeeb -#define IBUS_Pointer_Button4 0xfeec -#define IBUS_Pointer_Button5 0xfeed -#define IBUS_Pointer_DblClick_Dflt 0xfeee -#define IBUS_Pointer_DblClick1 0xfeef -#define IBUS_Pointer_DblClick2 0xfef0 -#define IBUS_Pointer_DblClick3 0xfef1 -#define IBUS_Pointer_DblClick4 0xfef2 -#define IBUS_Pointer_DblClick5 0xfef3 -#define IBUS_Pointer_Drag_Dflt 0xfef4 -#define IBUS_Pointer_Drag1 0xfef5 -#define IBUS_Pointer_Drag2 0xfef6 -#define IBUS_Pointer_Drag3 0xfef7 -#define IBUS_Pointer_Drag4 0xfef8 -#define IBUS_Pointer_Drag5 0xfefd -#define IBUS_Pointer_EnableKeys 0xfef9 -#define IBUS_Pointer_Accelerate 0xfefa -#define IBUS_Pointer_DfltBtnNext 0xfefb -#define IBUS_Pointer_DfltBtnPrev 0xfefc -#define IBUS_3270_Duplicate 0xfd01 -#define IBUS_3270_FieldMark 0xfd02 -#define IBUS_3270_Right2 0xfd03 -#define IBUS_3270_Left2 0xfd04 -#define IBUS_3270_BackTab 0xfd05 -#define IBUS_3270_EraseEOF 0xfd06 -#define IBUS_3270_EraseInput 0xfd07 -#define IBUS_3270_Reset 0xfd08 -#define IBUS_3270_Quit 0xfd09 -#define IBUS_3270_PA1 0xfd0a -#define IBUS_3270_PA2 0xfd0b -#define IBUS_3270_PA3 0xfd0c -#define IBUS_3270_Test 0xfd0d -#define IBUS_3270_Attn 0xfd0e -#define IBUS_3270_CursorBlink 0xfd0f -#define IBUS_3270_AltCursor 0xfd10 -#define IBUS_3270_KeyClick 0xfd11 -#define IBUS_3270_Jump 0xfd12 -#define IBUS_3270_Ident 0xfd13 -#define IBUS_3270_Rule 0xfd14 -#define IBUS_3270_Copy 0xfd15 -#define IBUS_3270_Play 0xfd16 -#define IBUS_3270_Setup 0xfd17 -#define IBUS_3270_Record 0xfd18 -#define IBUS_3270_ChangeScreen 0xfd19 -#define IBUS_3270_DeleteWord 0xfd1a -#define IBUS_3270_ExSelect 0xfd1b -#define IBUS_3270_CursorSelect 0xfd1c -#define IBUS_3270_PrintScreen 0xfd1d -#define IBUS_3270_Enter 0xfd1e -#define IBUS_space 0x020 -#define IBUS_exclam 0x021 -#define IBUS_quotedbl 0x022 -#define IBUS_numbersign 0x023 -#define IBUS_dollar 0x024 -#define IBUS_percent 0x025 -#define IBUS_ampersand 0x026 -#define IBUS_apostrophe 0x027 -#define IBUS_quoteright 0x027 -#define IBUS_parenleft 0x028 -#define IBUS_parenright 0x029 -#define IBUS_asterisk 0x02a -#define IBUS_plus 0x02b -#define IBUS_comma 0x02c -#define IBUS_minus 0x02d -#define IBUS_period 0x02e -#define IBUS_slash 0x02f -#define IBUS_0 0x030 -#define IBUS_1 0x031 -#define IBUS_2 0x032 -#define IBUS_3 0x033 -#define IBUS_4 0x034 -#define IBUS_5 0x035 -#define IBUS_6 0x036 -#define IBUS_7 0x037 -#define IBUS_8 0x038 -#define IBUS_9 0x039 -#define IBUS_colon 0x03a -#define IBUS_semicolon 0x03b -#define IBUS_less 0x03c -#define IBUS_equal 0x03d -#define IBUS_greater 0x03e -#define IBUS_question 0x03f -#define IBUS_at 0x040 -#define IBUS_A 0x041 -#define IBUS_B 0x042 -#define IBUS_C 0x043 -#define IBUS_D 0x044 -#define IBUS_E 0x045 -#define IBUS_F 0x046 -#define IBUS_G 0x047 -#define IBUS_H 0x048 -#define IBUS_I 0x049 -#define IBUS_J 0x04a -#define IBUS_K 0x04b -#define IBUS_L 0x04c -#define IBUS_M 0x04d -#define IBUS_N 0x04e -#define IBUS_O 0x04f -#define IBUS_P 0x050 -#define IBUS_Q 0x051 -#define IBUS_R 0x052 -#define IBUS_S 0x053 -#define IBUS_T 0x054 -#define IBUS_U 0x055 -#define IBUS_V 0x056 -#define IBUS_W 0x057 -#define IBUS_X 0x058 -#define IBUS_Y 0x059 -#define IBUS_Z 0x05a -#define IBUS_bracketleft 0x05b -#define IBUS_backslash 0x05c -#define IBUS_bracketright 0x05d -#define IBUS_asciicircum 0x05e -#define IBUS_underscore 0x05f -#define IBUS_grave 0x060 -#define IBUS_quoteleft 0x060 -#define IBUS_a 0x061 -#define IBUS_b 0x062 -#define IBUS_c 0x063 -#define IBUS_d 0x064 -#define IBUS_e 0x065 -#define IBUS_f 0x066 -#define IBUS_g 0x067 -#define IBUS_h 0x068 -#define IBUS_i 0x069 -#define IBUS_j 0x06a -#define IBUS_k 0x06b -#define IBUS_l 0x06c -#define IBUS_m 0x06d -#define IBUS_n 0x06e -#define IBUS_o 0x06f -#define IBUS_p 0x070 -#define IBUS_q 0x071 -#define IBUS_r 0x072 -#define IBUS_s 0x073 -#define IBUS_t 0x074 -#define IBUS_u 0x075 -#define IBUS_v 0x076 -#define IBUS_w 0x077 -#define IBUS_x 0x078 -#define IBUS_y 0x079 -#define IBUS_z 0x07a -#define IBUS_braceleft 0x07b -#define IBUS_bar 0x07c -#define IBUS_braceright 0x07d -#define IBUS_asciitilde 0x07e -#define IBUS_nobreakspace 0x0a0 -#define IBUS_exclamdown 0x0a1 -#define IBUS_cent 0x0a2 -#define IBUS_sterling 0x0a3 -#define IBUS_currency 0x0a4 -#define IBUS_yen 0x0a5 -#define IBUS_brokenbar 0x0a6 -#define IBUS_section 0x0a7 -#define IBUS_diaeresis 0x0a8 -#define IBUS_copyright 0x0a9 -#define IBUS_ordfeminine 0x0aa -#define IBUS_guillemotleft 0x0ab -#define IBUS_notsign 0x0ac -#define IBUS_hyphen 0x0ad -#define IBUS_registered 0x0ae -#define IBUS_macron 0x0af -#define IBUS_degree 0x0b0 -#define IBUS_plusminus 0x0b1 -#define IBUS_twosuperior 0x0b2 -#define IBUS_threesuperior 0x0b3 -#define IBUS_acute 0x0b4 -#define IBUS_mu 0x0b5 -#define IBUS_paragraph 0x0b6 -#define IBUS_periodcentered 0x0b7 -#define IBUS_cedilla 0x0b8 -#define IBUS_onesuperior 0x0b9 -#define IBUS_masculine 0x0ba -#define IBUS_guillemotright 0x0bb -#define IBUS_onequarter 0x0bc -#define IBUS_onehalf 0x0bd -#define IBUS_threequarters 0x0be -#define IBUS_questiondown 0x0bf -#define IBUS_Agrave 0x0c0 -#define IBUS_Aacute 0x0c1 -#define IBUS_Acircumflex 0x0c2 -#define IBUS_Atilde 0x0c3 -#define IBUS_Adiaeresis 0x0c4 -#define IBUS_Aring 0x0c5 -#define IBUS_AE 0x0c6 -#define IBUS_Ccedilla 0x0c7 -#define IBUS_Egrave 0x0c8 -#define IBUS_Eacute 0x0c9 -#define IBUS_Ecircumflex 0x0ca -#define IBUS_Ediaeresis 0x0cb -#define IBUS_Igrave 0x0cc -#define IBUS_Iacute 0x0cd -#define IBUS_Icircumflex 0x0ce -#define IBUS_Idiaeresis 0x0cf -#define IBUS_ETH 0x0d0 -#define IBUS_Eth 0x0d0 -#define IBUS_Ntilde 0x0d1 -#define IBUS_Ograve 0x0d2 -#define IBUS_Oacute 0x0d3 -#define IBUS_Ocircumflex 0x0d4 -#define IBUS_Otilde 0x0d5 -#define IBUS_Odiaeresis 0x0d6 -#define IBUS_multiply 0x0d7 -#define IBUS_Oslash 0x0d8 -#define IBUS_Ooblique 0x0d8 -#define IBUS_Ugrave 0x0d9 -#define IBUS_Uacute 0x0da -#define IBUS_Ucircumflex 0x0db -#define IBUS_Udiaeresis 0x0dc -#define IBUS_Yacute 0x0dd -#define IBUS_THORN 0x0de -#define IBUS_Thorn 0x0de -#define IBUS_ssharp 0x0df -#define IBUS_agrave 0x0e0 -#define IBUS_aacute 0x0e1 -#define IBUS_acircumflex 0x0e2 -#define IBUS_atilde 0x0e3 -#define IBUS_adiaeresis 0x0e4 -#define IBUS_aring 0x0e5 -#define IBUS_ae 0x0e6 -#define IBUS_ccedilla 0x0e7 -#define IBUS_egrave 0x0e8 -#define IBUS_eacute 0x0e9 -#define IBUS_ecircumflex 0x0ea -#define IBUS_ediaeresis 0x0eb -#define IBUS_igrave 0x0ec -#define IBUS_iacute 0x0ed -#define IBUS_icircumflex 0x0ee -#define IBUS_idiaeresis 0x0ef -#define IBUS_eth 0x0f0 -#define IBUS_ntilde 0x0f1 -#define IBUS_ograve 0x0f2 -#define IBUS_oacute 0x0f3 -#define IBUS_ocircumflex 0x0f4 -#define IBUS_otilde 0x0f5 -#define IBUS_odiaeresis 0x0f6 -#define IBUS_division 0x0f7 -#define IBUS_oslash 0x0f8 -#define IBUS_ooblique 0x0f8 -#define IBUS_ugrave 0x0f9 -#define IBUS_uacute 0x0fa -#define IBUS_ucircumflex 0x0fb -#define IBUS_udiaeresis 0x0fc -#define IBUS_yacute 0x0fd -#define IBUS_thorn 0x0fe -#define IBUS_ydiaeresis 0x0ff -#define IBUS_Aogonek 0x1a1 -#define IBUS_breve 0x1a2 -#define IBUS_Lstroke 0x1a3 -#define IBUS_Lcaron 0x1a5 -#define IBUS_Sacute 0x1a6 -#define IBUS_Scaron 0x1a9 -#define IBUS_Scedilla 0x1aa -#define IBUS_Tcaron 0x1ab -#define IBUS_Zacute 0x1ac -#define IBUS_Zcaron 0x1ae -#define IBUS_Zabovedot 0x1af -#define IBUS_aogonek 0x1b1 -#define IBUS_ogonek 0x1b2 -#define IBUS_lstroke 0x1b3 -#define IBUS_lcaron 0x1b5 -#define IBUS_sacute 0x1b6 -#define IBUS_caron 0x1b7 -#define IBUS_scaron 0x1b9 -#define IBUS_scedilla 0x1ba -#define IBUS_tcaron 0x1bb -#define IBUS_zacute 0x1bc -#define IBUS_doubleacute 0x1bd -#define IBUS_zcaron 0x1be -#define IBUS_zabovedot 0x1bf -#define IBUS_Racute 0x1c0 -#define IBUS_Abreve 0x1c3 -#define IBUS_Lacute 0x1c5 -#define IBUS_Cacute 0x1c6 -#define IBUS_Ccaron 0x1c8 -#define IBUS_Eogonek 0x1ca -#define IBUS_Ecaron 0x1cc -#define IBUS_Dcaron 0x1cf -#define IBUS_Dstroke 0x1d0 -#define IBUS_Nacute 0x1d1 -#define IBUS_Ncaron 0x1d2 -#define IBUS_Odoubleacute 0x1d5 -#define IBUS_Rcaron 0x1d8 -#define IBUS_Uring 0x1d9 -#define IBUS_Udoubleacute 0x1db -#define IBUS_Tcedilla 0x1de -#define IBUS_racute 0x1e0 -#define IBUS_abreve 0x1e3 -#define IBUS_lacute 0x1e5 -#define IBUS_cacute 0x1e6 -#define IBUS_ccaron 0x1e8 -#define IBUS_eogonek 0x1ea -#define IBUS_ecaron 0x1ec -#define IBUS_dcaron 0x1ef -#define IBUS_dstroke 0x1f0 -#define IBUS_nacute 0x1f1 -#define IBUS_ncaron 0x1f2 -#define IBUS_odoubleacute 0x1f5 -#define IBUS_udoubleacute 0x1fb -#define IBUS_rcaron 0x1f8 -#define IBUS_uring 0x1f9 -#define IBUS_tcedilla 0x1fe -#define IBUS_abovedot 0x1ff -#define IBUS_Hstroke 0x2a1 -#define IBUS_Hcircumflex 0x2a6 -#define IBUS_Iabovedot 0x2a9 -#define IBUS_Gbreve 0x2ab -#define IBUS_Jcircumflex 0x2ac -#define IBUS_hstroke 0x2b1 -#define IBUS_hcircumflex 0x2b6 -#define IBUS_idotless 0x2b9 -#define IBUS_gbreve 0x2bb -#define IBUS_jcircumflex 0x2bc -#define IBUS_Cabovedot 0x2c5 -#define IBUS_Ccircumflex 0x2c6 -#define IBUS_Gabovedot 0x2d5 -#define IBUS_Gcircumflex 0x2d8 -#define IBUS_Ubreve 0x2dd -#define IBUS_Scircumflex 0x2de -#define IBUS_cabovedot 0x2e5 -#define IBUS_ccircumflex 0x2e6 -#define IBUS_gabovedot 0x2f5 -#define IBUS_gcircumflex 0x2f8 -#define IBUS_ubreve 0x2fd -#define IBUS_scircumflex 0x2fe -#define IBUS_kra 0x3a2 -#define IBUS_kappa 0x3a2 -#define IBUS_Rcedilla 0x3a3 -#define IBUS_Itilde 0x3a5 -#define IBUS_Lcedilla 0x3a6 -#define IBUS_Emacron 0x3aa -#define IBUS_Gcedilla 0x3ab -#define IBUS_Tslash 0x3ac -#define IBUS_rcedilla 0x3b3 -#define IBUS_itilde 0x3b5 -#define IBUS_lcedilla 0x3b6 -#define IBUS_emacron 0x3ba -#define IBUS_gcedilla 0x3bb -#define IBUS_tslash 0x3bc -#define IBUS_ENG 0x3bd -#define IBUS_eng 0x3bf -#define IBUS_Amacron 0x3c0 -#define IBUS_Iogonek 0x3c7 -#define IBUS_Eabovedot 0x3cc -#define IBUS_Imacron 0x3cf -#define IBUS_Ncedilla 0x3d1 -#define IBUS_Omacron 0x3d2 -#define IBUS_Kcedilla 0x3d3 -#define IBUS_Uogonek 0x3d9 -#define IBUS_Utilde 0x3dd -#define IBUS_Umacron 0x3de -#define IBUS_amacron 0x3e0 -#define IBUS_iogonek 0x3e7 -#define IBUS_eabovedot 0x3ec -#define IBUS_imacron 0x3ef -#define IBUS_ncedilla 0x3f1 -#define IBUS_omacron 0x3f2 -#define IBUS_kcedilla 0x3f3 -#define IBUS_uogonek 0x3f9 -#define IBUS_utilde 0x3fd -#define IBUS_umacron 0x3fe -#define IBUS_Babovedot 0x1001e02 -#define IBUS_babovedot 0x1001e03 -#define IBUS_Dabovedot 0x1001e0a -#define IBUS_Wgrave 0x1001e80 -#define IBUS_Wacute 0x1001e82 -#define IBUS_dabovedot 0x1001e0b -#define IBUS_Ygrave 0x1001ef2 -#define IBUS_Fabovedot 0x1001e1e -#define IBUS_fabovedot 0x1001e1f -#define IBUS_Mabovedot 0x1001e40 -#define IBUS_mabovedot 0x1001e41 -#define IBUS_Pabovedot 0x1001e56 -#define IBUS_wgrave 0x1001e81 -#define IBUS_pabovedot 0x1001e57 -#define IBUS_wacute 0x1001e83 -#define IBUS_Sabovedot 0x1001e60 -#define IBUS_ygrave 0x1001ef3 -#define IBUS_Wdiaeresis 0x1001e84 -#define IBUS_wdiaeresis 0x1001e85 -#define IBUS_sabovedot 0x1001e61 -#define IBUS_Wcircumflex 0x1000174 -#define IBUS_Tabovedot 0x1001e6a -#define IBUS_Ycircumflex 0x1000176 -#define IBUS_wcircumflex 0x1000175 -#define IBUS_tabovedot 0x1001e6b -#define IBUS_ycircumflex 0x1000177 -#define IBUS_OE 0x13bc -#define IBUS_oe 0x13bd -#define IBUS_Ydiaeresis 0x13be -#define IBUS_overline 0x47e -#define IBUS_kana_fullstop 0x4a1 -#define IBUS_kana_openingbracket 0x4a2 -#define IBUS_kana_closingbracket 0x4a3 -#define IBUS_kana_comma 0x4a4 -#define IBUS_kana_conjunctive 0x4a5 -#define IBUS_kana_middledot 0x4a5 -#define IBUS_kana_WO 0x4a6 -#define IBUS_kana_a 0x4a7 -#define IBUS_kana_i 0x4a8 -#define IBUS_kana_u 0x4a9 -#define IBUS_kana_e 0x4aa -#define IBUS_kana_o 0x4ab -#define IBUS_kana_ya 0x4ac -#define IBUS_kana_yu 0x4ad -#define IBUS_kana_yo 0x4ae -#define IBUS_kana_tsu 0x4af -#define IBUS_kana_tu 0x4af -#define IBUS_prolongedsound 0x4b0 -#define IBUS_kana_A 0x4b1 -#define IBUS_kana_I 0x4b2 -#define IBUS_kana_U 0x4b3 -#define IBUS_kana_E 0x4b4 -#define IBUS_kana_O 0x4b5 -#define IBUS_kana_KA 0x4b6 -#define IBUS_kana_KI 0x4b7 -#define IBUS_kana_KU 0x4b8 -#define IBUS_kana_KE 0x4b9 -#define IBUS_kana_KO 0x4ba -#define IBUS_kana_SA 0x4bb -#define IBUS_kana_SHI 0x4bc -#define IBUS_kana_SU 0x4bd -#define IBUS_kana_SE 0x4be -#define IBUS_kana_SO 0x4bf -#define IBUS_kana_TA 0x4c0 -#define IBUS_kana_CHI 0x4c1 -#define IBUS_kana_TI 0x4c1 -#define IBUS_kana_TSU 0x4c2 -#define IBUS_kana_TU 0x4c2 -#define IBUS_kana_TE 0x4c3 -#define IBUS_kana_TO 0x4c4 -#define IBUS_kana_NA 0x4c5 -#define IBUS_kana_NI 0x4c6 -#define IBUS_kana_NU 0x4c7 -#define IBUS_kana_NE 0x4c8 -#define IBUS_kana_NO 0x4c9 -#define IBUS_kana_HA 0x4ca -#define IBUS_kana_HI 0x4cb -#define IBUS_kana_FU 0x4cc -#define IBUS_kana_HU 0x4cc -#define IBUS_kana_HE 0x4cd -#define IBUS_kana_HO 0x4ce -#define IBUS_kana_MA 0x4cf -#define IBUS_kana_MI 0x4d0 -#define IBUS_kana_MU 0x4d1 -#define IBUS_kana_ME 0x4d2 -#define IBUS_kana_MO 0x4d3 -#define IBUS_kana_YA 0x4d4 -#define IBUS_kana_YU 0x4d5 -#define IBUS_kana_YO 0x4d6 -#define IBUS_kana_RA 0x4d7 -#define IBUS_kana_RI 0x4d8 -#define IBUS_kana_RU 0x4d9 -#define IBUS_kana_RE 0x4da -#define IBUS_kana_RO 0x4db -#define IBUS_kana_WA 0x4dc -#define IBUS_kana_N 0x4dd -#define IBUS_voicedsound 0x4de -#define IBUS_semivoicedsound 0x4df -#define IBUS_kana_switch 0xff7e -#define IBUS_Farsi_0 0x10006f0 -#define IBUS_Farsi_1 0x10006f1 -#define IBUS_Farsi_2 0x10006f2 -#define IBUS_Farsi_3 0x10006f3 -#define IBUS_Farsi_4 0x10006f4 -#define IBUS_Farsi_5 0x10006f5 -#define IBUS_Farsi_6 0x10006f6 -#define IBUS_Farsi_7 0x10006f7 -#define IBUS_Farsi_8 0x10006f8 -#define IBUS_Farsi_9 0x10006f9 -#define IBUS_Arabic_percent 0x100066a -#define IBUS_Arabic_superscript_alef 0x1000670 -#define IBUS_Arabic_tteh 0x1000679 -#define IBUS_Arabic_peh 0x100067e -#define IBUS_Arabic_tcheh 0x1000686 -#define IBUS_Arabic_ddal 0x1000688 -#define IBUS_Arabic_rreh 0x1000691 -#define IBUS_Arabic_comma 0x5ac -#define IBUS_Arabic_fullstop 0x10006d4 -#define IBUS_Arabic_0 0x1000660 -#define IBUS_Arabic_1 0x1000661 -#define IBUS_Arabic_2 0x1000662 -#define IBUS_Arabic_3 0x1000663 -#define IBUS_Arabic_4 0x1000664 -#define IBUS_Arabic_5 0x1000665 -#define IBUS_Arabic_6 0x1000666 -#define IBUS_Arabic_7 0x1000667 -#define IBUS_Arabic_8 0x1000668 -#define IBUS_Arabic_9 0x1000669 -#define IBUS_Arabic_semicolon 0x5bb -#define IBUS_Arabic_question_mark 0x5bf -#define IBUS_Arabic_hamza 0x5c1 -#define IBUS_Arabic_maddaonalef 0x5c2 -#define IBUS_Arabic_hamzaonalef 0x5c3 -#define IBUS_Arabic_hamzaonwaw 0x5c4 -#define IBUS_Arabic_hamzaunderalef 0x5c5 -#define IBUS_Arabic_hamzaonyeh 0x5c6 -#define IBUS_Arabic_alef 0x5c7 -#define IBUS_Arabic_beh 0x5c8 -#define IBUS_Arabic_tehmarbuta 0x5c9 -#define IBUS_Arabic_teh 0x5ca -#define IBUS_Arabic_theh 0x5cb -#define IBUS_Arabic_jeem 0x5cc -#define IBUS_Arabic_hah 0x5cd -#define IBUS_Arabic_khah 0x5ce -#define IBUS_Arabic_dal 0x5cf -#define IBUS_Arabic_thal 0x5d0 -#define IBUS_Arabic_ra 0x5d1 -#define IBUS_Arabic_zain 0x5d2 -#define IBUS_Arabic_seen 0x5d3 -#define IBUS_Arabic_sheen 0x5d4 -#define IBUS_Arabic_sad 0x5d5 -#define IBUS_Arabic_dad 0x5d6 -#define IBUS_Arabic_tah 0x5d7 -#define IBUS_Arabic_zah 0x5d8 -#define IBUS_Arabic_ain 0x5d9 -#define IBUS_Arabic_ghain 0x5da -#define IBUS_Arabic_tatweel 0x5e0 -#define IBUS_Arabic_feh 0x5e1 -#define IBUS_Arabic_qaf 0x5e2 -#define IBUS_Arabic_kaf 0x5e3 -#define IBUS_Arabic_lam 0x5e4 -#define IBUS_Arabic_meem 0x5e5 -#define IBUS_Arabic_noon 0x5e6 -#define IBUS_Arabic_ha 0x5e7 -#define IBUS_Arabic_heh 0x5e7 -#define IBUS_Arabic_waw 0x5e8 -#define IBUS_Arabic_alefmaksura 0x5e9 -#define IBUS_Arabic_yeh 0x5ea -#define IBUS_Arabic_fathatan 0x5eb -#define IBUS_Arabic_dammatan 0x5ec -#define IBUS_Arabic_kasratan 0x5ed -#define IBUS_Arabic_fatha 0x5ee -#define IBUS_Arabic_damma 0x5ef -#define IBUS_Arabic_kasra 0x5f0 -#define IBUS_Arabic_shadda 0x5f1 -#define IBUS_Arabic_sukun 0x5f2 -#define IBUS_Arabic_madda_above 0x1000653 -#define IBUS_Arabic_hamza_above 0x1000654 -#define IBUS_Arabic_hamza_below 0x1000655 -#define IBUS_Arabic_jeh 0x1000698 -#define IBUS_Arabic_veh 0x10006a4 -#define IBUS_Arabic_keheh 0x10006a9 -#define IBUS_Arabic_gaf 0x10006af -#define IBUS_Arabic_noon_ghunna 0x10006ba -#define IBUS_Arabic_heh_doachashmee 0x10006be -#define IBUS_Farsi_yeh 0x10006cc -#define IBUS_Arabic_farsi_yeh 0x10006cc -#define IBUS_Arabic_yeh_baree 0x10006d2 -#define IBUS_Arabic_heh_goal 0x10006c1 -#define IBUS_Arabic_switch 0xff7e -#define IBUS_Cyrillic_GHE_bar 0x1000492 -#define IBUS_Cyrillic_ghe_bar 0x1000493 -#define IBUS_Cyrillic_ZHE_descender 0x1000496 -#define IBUS_Cyrillic_zhe_descender 0x1000497 -#define IBUS_Cyrillic_KA_descender 0x100049a -#define IBUS_Cyrillic_ka_descender 0x100049b -#define IBUS_Cyrillic_KA_vertstroke 0x100049c -#define IBUS_Cyrillic_ka_vertstroke 0x100049d -#define IBUS_Cyrillic_EN_descender 0x10004a2 -#define IBUS_Cyrillic_en_descender 0x10004a3 -#define IBUS_Cyrillic_U_straight 0x10004ae -#define IBUS_Cyrillic_u_straight 0x10004af -#define IBUS_Cyrillic_U_straight_bar 0x10004b0 -#define IBUS_Cyrillic_u_straight_bar 0x10004b1 -#define IBUS_Cyrillic_HA_descender 0x10004b2 -#define IBUS_Cyrillic_ha_descender 0x10004b3 -#define IBUS_Cyrillic_CHE_descender 0x10004b6 -#define IBUS_Cyrillic_che_descender 0x10004b7 -#define IBUS_Cyrillic_CHE_vertstroke 0x10004b8 -#define IBUS_Cyrillic_che_vertstroke 0x10004b9 -#define IBUS_Cyrillic_SHHA 0x10004ba -#define IBUS_Cyrillic_shha 0x10004bb -#define IBUS_Cyrillic_SCHWA 0x10004d8 -#define IBUS_Cyrillic_schwa 0x10004d9 -#define IBUS_Cyrillic_I_macron 0x10004e2 -#define IBUS_Cyrillic_i_macron 0x10004e3 -#define IBUS_Cyrillic_O_bar 0x10004e8 -#define IBUS_Cyrillic_o_bar 0x10004e9 -#define IBUS_Cyrillic_U_macron 0x10004ee -#define IBUS_Cyrillic_u_macron 0x10004ef -#define IBUS_Serbian_dje 0x6a1 -#define IBUS_Macedonia_gje 0x6a2 -#define IBUS_Cyrillic_io 0x6a3 -#define IBUS_Ukrainian_ie 0x6a4 -#define IBUS_Ukranian_je 0x6a4 -#define IBUS_Macedonia_dse 0x6a5 -#define IBUS_Ukrainian_i 0x6a6 -#define IBUS_Ukranian_i 0x6a6 -#define IBUS_Ukrainian_yi 0x6a7 -#define IBUS_Ukranian_yi 0x6a7 -#define IBUS_Cyrillic_je 0x6a8 -#define IBUS_Serbian_je 0x6a8 -#define IBUS_Cyrillic_lje 0x6a9 -#define IBUS_Serbian_lje 0x6a9 -#define IBUS_Cyrillic_nje 0x6aa -#define IBUS_Serbian_nje 0x6aa -#define IBUS_Serbian_tshe 0x6ab -#define IBUS_Macedonia_kje 0x6ac -#define IBUS_Ukrainian_ghe_with_upturn 0x6ad -#define IBUS_Byelorussian_shortu 0x6ae -#define IBUS_Cyrillic_dzhe 0x6af -#define IBUS_Serbian_dze 0x6af -#define IBUS_numerosign 0x6b0 -#define IBUS_Serbian_DJE 0x6b1 -#define IBUS_Macedonia_GJE 0x6b2 -#define IBUS_Cyrillic_IO 0x6b3 -#define IBUS_Ukrainian_IE 0x6b4 -#define IBUS_Ukranian_JE 0x6b4 -#define IBUS_Macedonia_DSE 0x6b5 -#define IBUS_Ukrainian_I 0x6b6 -#define IBUS_Ukranian_I 0x6b6 -#define IBUS_Ukrainian_YI 0x6b7 -#define IBUS_Ukranian_YI 0x6b7 -#define IBUS_Cyrillic_JE 0x6b8 -#define IBUS_Serbian_JE 0x6b8 -#define IBUS_Cyrillic_LJE 0x6b9 -#define IBUS_Serbian_LJE 0x6b9 -#define IBUS_Cyrillic_NJE 0x6ba -#define IBUS_Serbian_NJE 0x6ba -#define IBUS_Serbian_TSHE 0x6bb -#define IBUS_Macedonia_KJE 0x6bc -#define IBUS_Ukrainian_GHE_WITH_UPTURN 0x6bd -#define IBUS_Byelorussian_SHORTU 0x6be -#define IBUS_Cyrillic_DZHE 0x6bf -#define IBUS_Serbian_DZE 0x6bf -#define IBUS_Cyrillic_yu 0x6c0 -#define IBUS_Cyrillic_a 0x6c1 -#define IBUS_Cyrillic_be 0x6c2 -#define IBUS_Cyrillic_tse 0x6c3 -#define IBUS_Cyrillic_de 0x6c4 -#define IBUS_Cyrillic_ie 0x6c5 -#define IBUS_Cyrillic_ef 0x6c6 -#define IBUS_Cyrillic_ghe 0x6c7 -#define IBUS_Cyrillic_ha 0x6c8 -#define IBUS_Cyrillic_i 0x6c9 -#define IBUS_Cyrillic_shorti 0x6ca -#define IBUS_Cyrillic_ka 0x6cb -#define IBUS_Cyrillic_el 0x6cc -#define IBUS_Cyrillic_em 0x6cd -#define IBUS_Cyrillic_en 0x6ce -#define IBUS_Cyrillic_o 0x6cf -#define IBUS_Cyrillic_pe 0x6d0 -#define IBUS_Cyrillic_ya 0x6d1 -#define IBUS_Cyrillic_er 0x6d2 -#define IBUS_Cyrillic_es 0x6d3 -#define IBUS_Cyrillic_te 0x6d4 -#define IBUS_Cyrillic_u 0x6d5 -#define IBUS_Cyrillic_zhe 0x6d6 -#define IBUS_Cyrillic_ve 0x6d7 -#define IBUS_Cyrillic_softsign 0x6d8 -#define IBUS_Cyrillic_yeru 0x6d9 -#define IBUS_Cyrillic_ze 0x6da -#define IBUS_Cyrillic_sha 0x6db -#define IBUS_Cyrillic_e 0x6dc -#define IBUS_Cyrillic_shcha 0x6dd -#define IBUS_Cyrillic_che 0x6de -#define IBUS_Cyrillic_hardsign 0x6df -#define IBUS_Cyrillic_YU 0x6e0 -#define IBUS_Cyrillic_A 0x6e1 -#define IBUS_Cyrillic_BE 0x6e2 -#define IBUS_Cyrillic_TSE 0x6e3 -#define IBUS_Cyrillic_DE 0x6e4 -#define IBUS_Cyrillic_IE 0x6e5 -#define IBUS_Cyrillic_EF 0x6e6 -#define IBUS_Cyrillic_GHE 0x6e7 -#define IBUS_Cyrillic_HA 0x6e8 -#define IBUS_Cyrillic_I 0x6e9 -#define IBUS_Cyrillic_SHORTI 0x6ea -#define IBUS_Cyrillic_KA 0x6eb -#define IBUS_Cyrillic_EL 0x6ec -#define IBUS_Cyrillic_EM 0x6ed -#define IBUS_Cyrillic_EN 0x6ee -#define IBUS_Cyrillic_O 0x6ef -#define IBUS_Cyrillic_PE 0x6f0 -#define IBUS_Cyrillic_YA 0x6f1 -#define IBUS_Cyrillic_ER 0x6f2 -#define IBUS_Cyrillic_ES 0x6f3 -#define IBUS_Cyrillic_TE 0x6f4 -#define IBUS_Cyrillic_U 0x6f5 -#define IBUS_Cyrillic_ZHE 0x6f6 -#define IBUS_Cyrillic_VE 0x6f7 -#define IBUS_Cyrillic_SOFTSIGN 0x6f8 -#define IBUS_Cyrillic_YERU 0x6f9 -#define IBUS_Cyrillic_ZE 0x6fa -#define IBUS_Cyrillic_SHA 0x6fb -#define IBUS_Cyrillic_E 0x6fc -#define IBUS_Cyrillic_SHCHA 0x6fd -#define IBUS_Cyrillic_CHE 0x6fe -#define IBUS_Cyrillic_HARDSIGN 0x6ff -#define IBUS_Greek_ALPHAaccent 0x7a1 -#define IBUS_Greek_EPSILONaccent 0x7a2 -#define IBUS_Greek_ETAaccent 0x7a3 -#define IBUS_Greek_IOTAaccent 0x7a4 -#define IBUS_Greek_IOTAdieresis 0x7a5 -#define IBUS_Greek_IOTAdiaeresis 0x7a5 -#define IBUS_Greek_OMICRONaccent 0x7a7 -#define IBUS_Greek_UPSILONaccent 0x7a8 -#define IBUS_Greek_UPSILONdieresis 0x7a9 -#define IBUS_Greek_OMEGAaccent 0x7ab -#define IBUS_Greek_accentdieresis 0x7ae -#define IBUS_Greek_horizbar 0x7af -#define IBUS_Greek_alphaaccent 0x7b1 -#define IBUS_Greek_epsilonaccent 0x7b2 -#define IBUS_Greek_etaaccent 0x7b3 -#define IBUS_Greek_iotaaccent 0x7b4 -#define IBUS_Greek_iotadieresis 0x7b5 -#define IBUS_Greek_iotaaccentdieresis 0x7b6 -#define IBUS_Greek_omicronaccent 0x7b7 -#define IBUS_Greek_upsilonaccent 0x7b8 -#define IBUS_Greek_upsilondieresis 0x7b9 -#define IBUS_Greek_upsilonaccentdieresis 0x7ba -#define IBUS_Greek_omegaaccent 0x7bb -#define IBUS_Greek_ALPHA 0x7c1 -#define IBUS_Greek_BETA 0x7c2 -#define IBUS_Greek_GAMMA 0x7c3 -#define IBUS_Greek_DELTA 0x7c4 -#define IBUS_Greek_EPSILON 0x7c5 -#define IBUS_Greek_ZETA 0x7c6 -#define IBUS_Greek_ETA 0x7c7 -#define IBUS_Greek_THETA 0x7c8 -#define IBUS_Greek_IOTA 0x7c9 -#define IBUS_Greek_KAPPA 0x7ca -#define IBUS_Greek_LAMDA 0x7cb -#define IBUS_Greek_LAMBDA 0x7cb -#define IBUS_Greek_MU 0x7cc -#define IBUS_Greek_NU 0x7cd -#define IBUS_Greek_XI 0x7ce -#define IBUS_Greek_OMICRON 0x7cf -#define IBUS_Greek_PI 0x7d0 -#define IBUS_Greek_RHO 0x7d1 -#define IBUS_Greek_SIGMA 0x7d2 -#define IBUS_Greek_TAU 0x7d4 -#define IBUS_Greek_UPSILON 0x7d5 -#define IBUS_Greek_PHI 0x7d6 -#define IBUS_Greek_CHI 0x7d7 -#define IBUS_Greek_PSI 0x7d8 -#define IBUS_Greek_OMEGA 0x7d9 -#define IBUS_Greek_alpha 0x7e1 -#define IBUS_Greek_beta 0x7e2 -#define IBUS_Greek_gamma 0x7e3 -#define IBUS_Greek_delta 0x7e4 -#define IBUS_Greek_epsilon 0x7e5 -#define IBUS_Greek_zeta 0x7e6 -#define IBUS_Greek_eta 0x7e7 -#define IBUS_Greek_theta 0x7e8 -#define IBUS_Greek_iota 0x7e9 -#define IBUS_Greek_kappa 0x7ea -#define IBUS_Greek_lamda 0x7eb -#define IBUS_Greek_lambda 0x7eb -#define IBUS_Greek_mu 0x7ec -#define IBUS_Greek_nu 0x7ed -#define IBUS_Greek_xi 0x7ee -#define IBUS_Greek_omicron 0x7ef -#define IBUS_Greek_pi 0x7f0 -#define IBUS_Greek_rho 0x7f1 -#define IBUS_Greek_sigma 0x7f2 -#define IBUS_Greek_finalsmallsigma 0x7f3 -#define IBUS_Greek_tau 0x7f4 -#define IBUS_Greek_upsilon 0x7f5 -#define IBUS_Greek_phi 0x7f6 -#define IBUS_Greek_chi 0x7f7 -#define IBUS_Greek_psi 0x7f8 -#define IBUS_Greek_omega 0x7f9 -#define IBUS_Greek_switch 0xff7e -#define IBUS_leftradical 0x8a1 -#define IBUS_topleftradical 0x8a2 -#define IBUS_horizconnector 0x8a3 -#define IBUS_topintegral 0x8a4 -#define IBUS_botintegral 0x8a5 -#define IBUS_vertconnector 0x8a6 -#define IBUS_topleftsqbracket 0x8a7 -#define IBUS_botleftsqbracket 0x8a8 -#define IBUS_toprightsqbracket 0x8a9 -#define IBUS_botrightsqbracket 0x8aa -#define IBUS_topleftparens 0x8ab -#define IBUS_botleftparens 0x8ac -#define IBUS_toprightparens 0x8ad -#define IBUS_botrightparens 0x8ae -#define IBUS_leftmiddlecurlybrace 0x8af -#define IBUS_rightmiddlecurlybrace 0x8b0 -#define IBUS_topleftsummation 0x8b1 -#define IBUS_botleftsummation 0x8b2 -#define IBUS_topvertsummationconnector 0x8b3 -#define IBUS_botvertsummationconnector 0x8b4 -#define IBUS_toprightsummation 0x8b5 -#define IBUS_botrightsummation 0x8b6 -#define IBUS_rightmiddlesummation 0x8b7 -#define IBUS_lessthanequal 0x8bc -#define IBUS_notequal 0x8bd -#define IBUS_greaterthanequal 0x8be -#define IBUS_integral 0x8bf -#define IBUS_therefore 0x8c0 -#define IBUS_variation 0x8c1 -#define IBUS_infinity 0x8c2 -#define IBUS_nabla 0x8c5 -#define IBUS_approximate 0x8c8 -#define IBUS_similarequal 0x8c9 -#define IBUS_ifonlyif 0x8cd -#define IBUS_implies 0x8ce -#define IBUS_identical 0x8cf -#define IBUS_radical 0x8d6 -#define IBUS_includedin 0x8da -#define IBUS_includes 0x8db -#define IBUS_intersection 0x8dc -#define IBUS_union 0x8dd -#define IBUS_logicaland 0x8de -#define IBUS_logicalor 0x8df -#define IBUS_partialderivative 0x8ef -#define IBUS_function 0x8f6 -#define IBUS_leftarrow 0x8fb -#define IBUS_uparrow 0x8fc -#define IBUS_rightarrow 0x8fd -#define IBUS_downarrow 0x8fe -#define IBUS_blank 0x9df -#define IBUS_soliddiamond 0x9e0 -#define IBUS_checkerboard 0x9e1 -#define IBUS_ht 0x9e2 -#define IBUS_ff 0x9e3 -#define IBUS_cr 0x9e4 -#define IBUS_lf 0x9e5 -#define IBUS_nl 0x9e8 -#define IBUS_vt 0x9e9 -#define IBUS_lowrightcorner 0x9ea -#define IBUS_uprightcorner 0x9eb -#define IBUS_upleftcorner 0x9ec -#define IBUS_lowleftcorner 0x9ed -#define IBUS_crossinglines 0x9ee -#define IBUS_horizlinescan1 0x9ef -#define IBUS_horizlinescan3 0x9f0 -#define IBUS_horizlinescan5 0x9f1 -#define IBUS_horizlinescan7 0x9f2 -#define IBUS_horizlinescan9 0x9f3 -#define IBUS_leftt 0x9f4 -#define IBUS_rightt 0x9f5 -#define IBUS_bott 0x9f6 -#define IBUS_topt 0x9f7 -#define IBUS_vertbar 0x9f8 -#define IBUS_emspace 0xaa1 -#define IBUS_enspace 0xaa2 -#define IBUS_em3space 0xaa3 -#define IBUS_em4space 0xaa4 -#define IBUS_digitspace 0xaa5 -#define IBUS_punctspace 0xaa6 -#define IBUS_thinspace 0xaa7 -#define IBUS_hairspace 0xaa8 -#define IBUS_emdash 0xaa9 -#define IBUS_endash 0xaaa -#define IBUS_signifblank 0xaac -#define IBUS_ellipsis 0xaae -#define IBUS_doubbaselinedot 0xaaf -#define IBUS_onethird 0xab0 -#define IBUS_twothirds 0xab1 -#define IBUS_onefifth 0xab2 -#define IBUS_twofifths 0xab3 -#define IBUS_threefifths 0xab4 -#define IBUS_fourfifths 0xab5 -#define IBUS_onesixth 0xab6 -#define IBUS_fivesixths 0xab7 -#define IBUS_careof 0xab8 -#define IBUS_figdash 0xabb -#define IBUS_leftanglebracket 0xabc -#define IBUS_decimalpoint 0xabd -#define IBUS_rightanglebracket 0xabe -#define IBUS_marker 0xabf -#define IBUS_oneeighth 0xac3 -#define IBUS_threeeighths 0xac4 -#define IBUS_fiveeighths 0xac5 -#define IBUS_seveneighths 0xac6 -#define IBUS_trademark 0xac9 -#define IBUS_signaturemark 0xaca -#define IBUS_trademarkincircle 0xacb -#define IBUS_leftopentriangle 0xacc -#define IBUS_rightopentriangle 0xacd -#define IBUS_emopencircle 0xace -#define IBUS_emopenrectangle 0xacf -#define IBUS_leftsinglequotemark 0xad0 -#define IBUS_rightsinglequotemark 0xad1 -#define IBUS_leftdoublequotemark 0xad2 -#define IBUS_rightdoublequotemark 0xad3 -#define IBUS_prescription 0xad4 -#define IBUS_minutes 0xad6 -#define IBUS_seconds 0xad7 -#define IBUS_latincross 0xad9 -#define IBUS_hexagram 0xada -#define IBUS_filledrectbullet 0xadb -#define IBUS_filledlefttribullet 0xadc -#define IBUS_filledrighttribullet 0xadd -#define IBUS_emfilledcircle 0xade -#define IBUS_emfilledrect 0xadf -#define IBUS_enopencircbullet 0xae0 -#define IBUS_enopensquarebullet 0xae1 -#define IBUS_openrectbullet 0xae2 -#define IBUS_opentribulletup 0xae3 -#define IBUS_opentribulletdown 0xae4 -#define IBUS_openstar 0xae5 -#define IBUS_enfilledcircbullet 0xae6 -#define IBUS_enfilledsqbullet 0xae7 -#define IBUS_filledtribulletup 0xae8 -#define IBUS_filledtribulletdown 0xae9 -#define IBUS_leftpointer 0xaea -#define IBUS_rightpointer 0xaeb -#define IBUS_club 0xaec -#define IBUS_diamond 0xaed -#define IBUS_heart 0xaee -#define IBUS_maltesecross 0xaf0 -#define IBUS_dagger 0xaf1 -#define IBUS_doubledagger 0xaf2 -#define IBUS_checkmark 0xaf3 -#define IBUS_ballotcross 0xaf4 -#define IBUS_musicalsharp 0xaf5 -#define IBUS_musicalflat 0xaf6 -#define IBUS_malesymbol 0xaf7 -#define IBUS_femalesymbol 0xaf8 -#define IBUS_telephone 0xaf9 -#define IBUS_telephonerecorder 0xafa -#define IBUS_phonographcopyright 0xafb -#define IBUS_caret 0xafc -#define IBUS_singlelowquotemark 0xafd -#define IBUS_doublelowquotemark 0xafe -#define IBUS_cursor 0xaff -#define IBUS_leftcaret 0xba3 -#define IBUS_rightcaret 0xba6 -#define IBUS_downcaret 0xba8 -#define IBUS_upcaret 0xba9 -#define IBUS_overbar 0xbc0 -#define IBUS_downtack 0xbc2 -#define IBUS_upshoe 0xbc3 -#define IBUS_downstile 0xbc4 -#define IBUS_underbar 0xbc6 -#define IBUS_jot 0xbca -#define IBUS_quad 0xbcc -#define IBUS_uptack 0xbce -#define IBUS_circle 0xbcf -#define IBUS_upstile 0xbd3 -#define IBUS_downshoe 0xbd6 -#define IBUS_rightshoe 0xbd8 -#define IBUS_leftshoe 0xbda -#define IBUS_lefttack 0xbdc -#define IBUS_righttack 0xbfc -#define IBUS_hebrew_doublelowline 0xcdf -#define IBUS_hebrew_aleph 0xce0 -#define IBUS_hebrew_bet 0xce1 -#define IBUS_hebrew_beth 0xce1 -#define IBUS_hebrew_gimel 0xce2 -#define IBUS_hebrew_gimmel 0xce2 -#define IBUS_hebrew_dalet 0xce3 -#define IBUS_hebrew_daleth 0xce3 -#define IBUS_hebrew_he 0xce4 -#define IBUS_hebrew_waw 0xce5 -#define IBUS_hebrew_zain 0xce6 -#define IBUS_hebrew_zayin 0xce6 -#define IBUS_hebrew_chet 0xce7 -#define IBUS_hebrew_het 0xce7 -#define IBUS_hebrew_tet 0xce8 -#define IBUS_hebrew_teth 0xce8 -#define IBUS_hebrew_yod 0xce9 -#define IBUS_hebrew_finalkaph 0xcea -#define IBUS_hebrew_kaph 0xceb -#define IBUS_hebrew_lamed 0xcec -#define IBUS_hebrew_finalmem 0xced -#define IBUS_hebrew_mem 0xcee -#define IBUS_hebrew_finalnun 0xcef -#define IBUS_hebrew_nun 0xcf0 -#define IBUS_hebrew_samech 0xcf1 -#define IBUS_hebrew_samekh 0xcf1 -#define IBUS_hebrew_ayin 0xcf2 -#define IBUS_hebrew_finalpe 0xcf3 -#define IBUS_hebrew_pe 0xcf4 -#define IBUS_hebrew_finalzade 0xcf5 -#define IBUS_hebrew_finalzadi 0xcf5 -#define IBUS_hebrew_zade 0xcf6 -#define IBUS_hebrew_zadi 0xcf6 -#define IBUS_hebrew_qoph 0xcf7 -#define IBUS_hebrew_kuf 0xcf7 -#define IBUS_hebrew_resh 0xcf8 -#define IBUS_hebrew_shin 0xcf9 -#define IBUS_hebrew_taw 0xcfa -#define IBUS_hebrew_taf 0xcfa -#define IBUS_Hebrew_switch 0xff7e -#define IBUS_Thai_kokai 0xda1 -#define IBUS_Thai_khokhai 0xda2 -#define IBUS_Thai_khokhuat 0xda3 -#define IBUS_Thai_khokhwai 0xda4 -#define IBUS_Thai_khokhon 0xda5 -#define IBUS_Thai_khorakhang 0xda6 -#define IBUS_Thai_ngongu 0xda7 -#define IBUS_Thai_chochan 0xda8 -#define IBUS_Thai_choching 0xda9 -#define IBUS_Thai_chochang 0xdaa -#define IBUS_Thai_soso 0xdab -#define IBUS_Thai_chochoe 0xdac -#define IBUS_Thai_yoying 0xdad -#define IBUS_Thai_dochada 0xdae -#define IBUS_Thai_topatak 0xdaf -#define IBUS_Thai_thothan 0xdb0 -#define IBUS_Thai_thonangmontho 0xdb1 -#define IBUS_Thai_thophuthao 0xdb2 -#define IBUS_Thai_nonen 0xdb3 -#define IBUS_Thai_dodek 0xdb4 -#define IBUS_Thai_totao 0xdb5 -#define IBUS_Thai_thothung 0xdb6 -#define IBUS_Thai_thothahan 0xdb7 -#define IBUS_Thai_thothong 0xdb8 -#define IBUS_Thai_nonu 0xdb9 -#define IBUS_Thai_bobaimai 0xdba -#define IBUS_Thai_popla 0xdbb -#define IBUS_Thai_phophung 0xdbc -#define IBUS_Thai_fofa 0xdbd -#define IBUS_Thai_phophan 0xdbe -#define IBUS_Thai_fofan 0xdbf -#define IBUS_Thai_phosamphao 0xdc0 -#define IBUS_Thai_moma 0xdc1 -#define IBUS_Thai_yoyak 0xdc2 -#define IBUS_Thai_rorua 0xdc3 -#define IBUS_Thai_ru 0xdc4 -#define IBUS_Thai_loling 0xdc5 -#define IBUS_Thai_lu 0xdc6 -#define IBUS_Thai_wowaen 0xdc7 -#define IBUS_Thai_sosala 0xdc8 -#define IBUS_Thai_sorusi 0xdc9 -#define IBUS_Thai_sosua 0xdca -#define IBUS_Thai_hohip 0xdcb -#define IBUS_Thai_lochula 0xdcc -#define IBUS_Thai_oang 0xdcd -#define IBUS_Thai_honokhuk 0xdce -#define IBUS_Thai_paiyannoi 0xdcf -#define IBUS_Thai_saraa 0xdd0 -#define IBUS_Thai_maihanakat 0xdd1 -#define IBUS_Thai_saraaa 0xdd2 -#define IBUS_Thai_saraam 0xdd3 -#define IBUS_Thai_sarai 0xdd4 -#define IBUS_Thai_saraii 0xdd5 -#define IBUS_Thai_saraue 0xdd6 -#define IBUS_Thai_sarauee 0xdd7 -#define IBUS_Thai_sarau 0xdd8 -#define IBUS_Thai_sarauu 0xdd9 -#define IBUS_Thai_phinthu 0xdda -#define IBUS_Thai_maihanakat_maitho 0xdde -#define IBUS_Thai_baht 0xddf -#define IBUS_Thai_sarae 0xde0 -#define IBUS_Thai_saraae 0xde1 -#define IBUS_Thai_sarao 0xde2 -#define IBUS_Thai_saraaimaimuan 0xde3 -#define IBUS_Thai_saraaimaimalai 0xde4 -#define IBUS_Thai_lakkhangyao 0xde5 -#define IBUS_Thai_maiyamok 0xde6 -#define IBUS_Thai_maitaikhu 0xde7 -#define IBUS_Thai_maiek 0xde8 -#define IBUS_Thai_maitho 0xde9 -#define IBUS_Thai_maitri 0xdea -#define IBUS_Thai_maichattawa 0xdeb -#define IBUS_Thai_thanthakhat 0xdec -#define IBUS_Thai_nikhahit 0xded -#define IBUS_Thai_leksun 0xdf0 -#define IBUS_Thai_leknung 0xdf1 -#define IBUS_Thai_leksong 0xdf2 -#define IBUS_Thai_leksam 0xdf3 -#define IBUS_Thai_leksi 0xdf4 -#define IBUS_Thai_lekha 0xdf5 -#define IBUS_Thai_lekhok 0xdf6 -#define IBUS_Thai_lekchet 0xdf7 -#define IBUS_Thai_lekpaet 0xdf8 -#define IBUS_Thai_lekkao 0xdf9 -#define IBUS_Hangul 0xff31 -#define IBUS_Hangul_Start 0xff32 -#define IBUS_Hangul_End 0xff33 -#define IBUS_Hangul_Hanja 0xff34 -#define IBUS_Hangul_Jamo 0xff35 -#define IBUS_Hangul_Romaja 0xff36 -#define IBUS_Hangul_Codeinput 0xff37 -#define IBUS_Hangul_Jeonja 0xff38 -#define IBUS_Hangul_Banja 0xff39 -#define IBUS_Hangul_PreHanja 0xff3a -#define IBUS_Hangul_PostHanja 0xff3b -#define IBUS_Hangul_SingleCandidate 0xff3c -#define IBUS_Hangul_MultipleCandidate 0xff3d -#define IBUS_Hangul_PreviousCandidate 0xff3e -#define IBUS_Hangul_Special 0xff3f -#define IBUS_Hangul_switch 0xff7e -#define IBUS_Hangul_Kiyeog 0xea1 -#define IBUS_Hangul_SsangKiyeog 0xea2 -#define IBUS_Hangul_KiyeogSios 0xea3 -#define IBUS_Hangul_Nieun 0xea4 -#define IBUS_Hangul_NieunJieuj 0xea5 -#define IBUS_Hangul_NieunHieuh 0xea6 -#define IBUS_Hangul_Dikeud 0xea7 -#define IBUS_Hangul_SsangDikeud 0xea8 -#define IBUS_Hangul_Rieul 0xea9 -#define IBUS_Hangul_RieulKiyeog 0xeaa -#define IBUS_Hangul_RieulMieum 0xeab -#define IBUS_Hangul_RieulPieub 0xeac -#define IBUS_Hangul_RieulSios 0xead -#define IBUS_Hangul_RieulTieut 0xeae -#define IBUS_Hangul_RieulPhieuf 0xeaf -#define IBUS_Hangul_RieulHieuh 0xeb0 -#define IBUS_Hangul_Mieum 0xeb1 -#define IBUS_Hangul_Pieub 0xeb2 -#define IBUS_Hangul_SsangPieub 0xeb3 -#define IBUS_Hangul_PieubSios 0xeb4 -#define IBUS_Hangul_Sios 0xeb5 -#define IBUS_Hangul_SsangSios 0xeb6 -#define IBUS_Hangul_Ieung 0xeb7 -#define IBUS_Hangul_Jieuj 0xeb8 -#define IBUS_Hangul_SsangJieuj 0xeb9 -#define IBUS_Hangul_Cieuc 0xeba -#define IBUS_Hangul_Khieuq 0xebb -#define IBUS_Hangul_Tieut 0xebc -#define IBUS_Hangul_Phieuf 0xebd -#define IBUS_Hangul_Hieuh 0xebe -#define IBUS_Hangul_A 0xebf -#define IBUS_Hangul_AE 0xec0 -#define IBUS_Hangul_YA 0xec1 -#define IBUS_Hangul_YAE 0xec2 -#define IBUS_Hangul_EO 0xec3 -#define IBUS_Hangul_E 0xec4 -#define IBUS_Hangul_YEO 0xec5 -#define IBUS_Hangul_YE 0xec6 -#define IBUS_Hangul_O 0xec7 -#define IBUS_Hangul_WA 0xec8 -#define IBUS_Hangul_WAE 0xec9 -#define IBUS_Hangul_OE 0xeca -#define IBUS_Hangul_YO 0xecb -#define IBUS_Hangul_U 0xecc -#define IBUS_Hangul_WEO 0xecd -#define IBUS_Hangul_WE 0xece -#define IBUS_Hangul_WI 0xecf -#define IBUS_Hangul_YU 0xed0 -#define IBUS_Hangul_EU 0xed1 -#define IBUS_Hangul_YI 0xed2 -#define IBUS_Hangul_I 0xed3 -#define IBUS_Hangul_J_Kiyeog 0xed4 -#define IBUS_Hangul_J_SsangKiyeog 0xed5 -#define IBUS_Hangul_J_KiyeogSios 0xed6 -#define IBUS_Hangul_J_Nieun 0xed7 -#define IBUS_Hangul_J_NieunJieuj 0xed8 -#define IBUS_Hangul_J_NieunHieuh 0xed9 -#define IBUS_Hangul_J_Dikeud 0xeda -#define IBUS_Hangul_J_Rieul 0xedb -#define IBUS_Hangul_J_RieulKiyeog 0xedc -#define IBUS_Hangul_J_RieulMieum 0xedd -#define IBUS_Hangul_J_RieulPieub 0xede -#define IBUS_Hangul_J_RieulSios 0xedf -#define IBUS_Hangul_J_RieulTieut 0xee0 -#define IBUS_Hangul_J_RieulPhieuf 0xee1 -#define IBUS_Hangul_J_RieulHieuh 0xee2 -#define IBUS_Hangul_J_Mieum 0xee3 -#define IBUS_Hangul_J_Pieub 0xee4 -#define IBUS_Hangul_J_PieubSios 0xee5 -#define IBUS_Hangul_J_Sios 0xee6 -#define IBUS_Hangul_J_SsangSios 0xee7 -#define IBUS_Hangul_J_Ieung 0xee8 -#define IBUS_Hangul_J_Jieuj 0xee9 -#define IBUS_Hangul_J_Cieuc 0xeea -#define IBUS_Hangul_J_Khieuq 0xeeb -#define IBUS_Hangul_J_Tieut 0xeec -#define IBUS_Hangul_J_Phieuf 0xeed -#define IBUS_Hangul_J_Hieuh 0xeee -#define IBUS_Hangul_RieulYeorinHieuh 0xeef -#define IBUS_Hangul_SunkyeongeumMieum 0xef0 -#define IBUS_Hangul_SunkyeongeumPieub 0xef1 -#define IBUS_Hangul_PanSios 0xef2 -#define IBUS_Hangul_KkogjiDalrinIeung 0xef3 -#define IBUS_Hangul_SunkyeongeumPhieuf 0xef4 -#define IBUS_Hangul_YeorinHieuh 0xef5 -#define IBUS_Hangul_AraeA 0xef6 -#define IBUS_Hangul_AraeAE 0xef7 -#define IBUS_Hangul_J_PanSios 0xef8 -#define IBUS_Hangul_J_KkogjiDalrinIeung 0xef9 -#define IBUS_Hangul_J_YeorinHieuh 0xefa -#define IBUS_Korean_Won 0xeff -#define IBUS_Armenian_ligature_ew 0x1000587 -#define IBUS_Armenian_full_stop 0x1000589 -#define IBUS_Armenian_verjaket 0x1000589 -#define IBUS_Armenian_separation_mark 0x100055d -#define IBUS_Armenian_but 0x100055d -#define IBUS_Armenian_hyphen 0x100058a -#define IBUS_Armenian_yentamna 0x100058a -#define IBUS_Armenian_exclam 0x100055c -#define IBUS_Armenian_amanak 0x100055c -#define IBUS_Armenian_accent 0x100055b -#define IBUS_Armenian_shesht 0x100055b -#define IBUS_Armenian_question 0x100055e -#define IBUS_Armenian_paruyk 0x100055e -#define IBUS_Armenian_AYB 0x1000531 -#define IBUS_Armenian_ayb 0x1000561 -#define IBUS_Armenian_BEN 0x1000532 -#define IBUS_Armenian_ben 0x1000562 -#define IBUS_Armenian_GIM 0x1000533 -#define IBUS_Armenian_gim 0x1000563 -#define IBUS_Armenian_DA 0x1000534 -#define IBUS_Armenian_da 0x1000564 -#define IBUS_Armenian_YECH 0x1000535 -#define IBUS_Armenian_yech 0x1000565 -#define IBUS_Armenian_ZA 0x1000536 -#define IBUS_Armenian_za 0x1000566 -#define IBUS_Armenian_E 0x1000537 -#define IBUS_Armenian_e 0x1000567 -#define IBUS_Armenian_AT 0x1000538 -#define IBUS_Armenian_at 0x1000568 -#define IBUS_Armenian_TO 0x1000539 -#define IBUS_Armenian_to 0x1000569 -#define IBUS_Armenian_ZHE 0x100053a -#define IBUS_Armenian_zhe 0x100056a -#define IBUS_Armenian_INI 0x100053b -#define IBUS_Armenian_ini 0x100056b -#define IBUS_Armenian_LYUN 0x100053c -#define IBUS_Armenian_lyun 0x100056c -#define IBUS_Armenian_KHE 0x100053d -#define IBUS_Armenian_khe 0x100056d -#define IBUS_Armenian_TSA 0x100053e -#define IBUS_Armenian_tsa 0x100056e -#define IBUS_Armenian_KEN 0x100053f -#define IBUS_Armenian_ken 0x100056f -#define IBUS_Armenian_HO 0x1000540 -#define IBUS_Armenian_ho 0x1000570 -#define IBUS_Armenian_DZA 0x1000541 -#define IBUS_Armenian_dza 0x1000571 -#define IBUS_Armenian_GHAT 0x1000542 -#define IBUS_Armenian_ghat 0x1000572 -#define IBUS_Armenian_TCHE 0x1000543 -#define IBUS_Armenian_tche 0x1000573 -#define IBUS_Armenian_MEN 0x1000544 -#define IBUS_Armenian_men 0x1000574 -#define IBUS_Armenian_HI 0x1000545 -#define IBUS_Armenian_hi 0x1000575 -#define IBUS_Armenian_NU 0x1000546 -#define IBUS_Armenian_nu 0x1000576 -#define IBUS_Armenian_SHA 0x1000547 -#define IBUS_Armenian_sha 0x1000577 -#define IBUS_Armenian_VO 0x1000548 -#define IBUS_Armenian_vo 0x1000578 -#define IBUS_Armenian_CHA 0x1000549 -#define IBUS_Armenian_cha 0x1000579 -#define IBUS_Armenian_PE 0x100054a -#define IBUS_Armenian_pe 0x100057a -#define IBUS_Armenian_JE 0x100054b -#define IBUS_Armenian_je 0x100057b -#define IBUS_Armenian_RA 0x100054c -#define IBUS_Armenian_ra 0x100057c -#define IBUS_Armenian_SE 0x100054d -#define IBUS_Armenian_se 0x100057d -#define IBUS_Armenian_VEV 0x100054e -#define IBUS_Armenian_vev 0x100057e -#define IBUS_Armenian_TYUN 0x100054f -#define IBUS_Armenian_tyun 0x100057f -#define IBUS_Armenian_RE 0x1000550 -#define IBUS_Armenian_re 0x1000580 -#define IBUS_Armenian_TSO 0x1000551 -#define IBUS_Armenian_tso 0x1000581 -#define IBUS_Armenian_VYUN 0x1000552 -#define IBUS_Armenian_vyun 0x1000582 -#define IBUS_Armenian_PYUR 0x1000553 -#define IBUS_Armenian_pyur 0x1000583 -#define IBUS_Armenian_KE 0x1000554 -#define IBUS_Armenian_ke 0x1000584 -#define IBUS_Armenian_O 0x1000555 -#define IBUS_Armenian_o 0x1000585 -#define IBUS_Armenian_FE 0x1000556 -#define IBUS_Armenian_fe 0x1000586 -#define IBUS_Armenian_apostrophe 0x100055a -#define IBUS_Georgian_an 0x10010d0 -#define IBUS_Georgian_ban 0x10010d1 -#define IBUS_Georgian_gan 0x10010d2 -#define IBUS_Georgian_don 0x10010d3 -#define IBUS_Georgian_en 0x10010d4 -#define IBUS_Georgian_vin 0x10010d5 -#define IBUS_Georgian_zen 0x10010d6 -#define IBUS_Georgian_tan 0x10010d7 -#define IBUS_Georgian_in 0x10010d8 -#define IBUS_Georgian_kan 0x10010d9 -#define IBUS_Georgian_las 0x10010da -#define IBUS_Georgian_man 0x10010db -#define IBUS_Georgian_nar 0x10010dc -#define IBUS_Georgian_on 0x10010dd -#define IBUS_Georgian_par 0x10010de -#define IBUS_Georgian_zhar 0x10010df -#define IBUS_Georgian_rae 0x10010e0 -#define IBUS_Georgian_san 0x10010e1 -#define IBUS_Georgian_tar 0x10010e2 -#define IBUS_Georgian_un 0x10010e3 -#define IBUS_Georgian_phar 0x10010e4 -#define IBUS_Georgian_khar 0x10010e5 -#define IBUS_Georgian_ghan 0x10010e6 -#define IBUS_Georgian_qar 0x10010e7 -#define IBUS_Georgian_shin 0x10010e8 -#define IBUS_Georgian_chin 0x10010e9 -#define IBUS_Georgian_can 0x10010ea -#define IBUS_Georgian_jil 0x10010eb -#define IBUS_Georgian_cil 0x10010ec -#define IBUS_Georgian_char 0x10010ed -#define IBUS_Georgian_xan 0x10010ee -#define IBUS_Georgian_jhan 0x10010ef -#define IBUS_Georgian_hae 0x10010f0 -#define IBUS_Georgian_he 0x10010f1 -#define IBUS_Georgian_hie 0x10010f2 -#define IBUS_Georgian_we 0x10010f3 -#define IBUS_Georgian_har 0x10010f4 -#define IBUS_Georgian_hoe 0x10010f5 -#define IBUS_Georgian_fi 0x10010f6 -#define IBUS_Xabovedot 0x1001e8a -#define IBUS_Ibreve 0x100012c -#define IBUS_Zstroke 0x10001b5 -#define IBUS_Gcaron 0x10001e6 -#define IBUS_Ocaron 0x10001d1 -#define IBUS_Obarred 0x100019f -#define IBUS_xabovedot 0x1001e8b -#define IBUS_ibreve 0x100012d -#define IBUS_zstroke 0x10001b6 -#define IBUS_gcaron 0x10001e7 -#define IBUS_ocaron 0x10001d2 -#define IBUS_obarred 0x1000275 -#define IBUS_SCHWA 0x100018f -#define IBUS_schwa 0x1000259 -#define IBUS_Lbelowdot 0x1001e36 -#define IBUS_lbelowdot 0x1001e37 -#define IBUS_Abelowdot 0x1001ea0 -#define IBUS_abelowdot 0x1001ea1 -#define IBUS_Ahook 0x1001ea2 -#define IBUS_ahook 0x1001ea3 -#define IBUS_Acircumflexacute 0x1001ea4 -#define IBUS_acircumflexacute 0x1001ea5 -#define IBUS_Acircumflexgrave 0x1001ea6 -#define IBUS_acircumflexgrave 0x1001ea7 -#define IBUS_Acircumflexhook 0x1001ea8 -#define IBUS_acircumflexhook 0x1001ea9 -#define IBUS_Acircumflextilde 0x1001eaa -#define IBUS_acircumflextilde 0x1001eab -#define IBUS_Acircumflexbelowdot 0x1001eac -#define IBUS_acircumflexbelowdot 0x1001ead -#define IBUS_Abreveacute 0x1001eae -#define IBUS_abreveacute 0x1001eaf -#define IBUS_Abrevegrave 0x1001eb0 -#define IBUS_abrevegrave 0x1001eb1 -#define IBUS_Abrevehook 0x1001eb2 -#define IBUS_abrevehook 0x1001eb3 -#define IBUS_Abrevetilde 0x1001eb4 -#define IBUS_abrevetilde 0x1001eb5 -#define IBUS_Abrevebelowdot 0x1001eb6 -#define IBUS_abrevebelowdot 0x1001eb7 -#define IBUS_Ebelowdot 0x1001eb8 -#define IBUS_ebelowdot 0x1001eb9 -#define IBUS_Ehook 0x1001eba -#define IBUS_ehook 0x1001ebb -#define IBUS_Etilde 0x1001ebc -#define IBUS_etilde 0x1001ebd -#define IBUS_Ecircumflexacute 0x1001ebe -#define IBUS_ecircumflexacute 0x1001ebf -#define IBUS_Ecircumflexgrave 0x1001ec0 -#define IBUS_ecircumflexgrave 0x1001ec1 -#define IBUS_Ecircumflexhook 0x1001ec2 -#define IBUS_ecircumflexhook 0x1001ec3 -#define IBUS_Ecircumflextilde 0x1001ec4 -#define IBUS_ecircumflextilde 0x1001ec5 -#define IBUS_Ecircumflexbelowdot 0x1001ec6 -#define IBUS_ecircumflexbelowdot 0x1001ec7 -#define IBUS_Ihook 0x1001ec8 -#define IBUS_ihook 0x1001ec9 -#define IBUS_Ibelowdot 0x1001eca -#define IBUS_ibelowdot 0x1001ecb -#define IBUS_Obelowdot 0x1001ecc -#define IBUS_obelowdot 0x1001ecd -#define IBUS_Ohook 0x1001ece -#define IBUS_ohook 0x1001ecf -#define IBUS_Ocircumflexacute 0x1001ed0 -#define IBUS_ocircumflexacute 0x1001ed1 -#define IBUS_Ocircumflexgrave 0x1001ed2 -#define IBUS_ocircumflexgrave 0x1001ed3 -#define IBUS_Ocircumflexhook 0x1001ed4 -#define IBUS_ocircumflexhook 0x1001ed5 -#define IBUS_Ocircumflextilde 0x1001ed6 -#define IBUS_ocircumflextilde 0x1001ed7 -#define IBUS_Ocircumflexbelowdot 0x1001ed8 -#define IBUS_ocircumflexbelowdot 0x1001ed9 -#define IBUS_Ohornacute 0x1001eda -#define IBUS_ohornacute 0x1001edb -#define IBUS_Ohorngrave 0x1001edc -#define IBUS_ohorngrave 0x1001edd -#define IBUS_Ohornhook 0x1001ede -#define IBUS_ohornhook 0x1001edf -#define IBUS_Ohorntilde 0x1001ee0 -#define IBUS_ohorntilde 0x1001ee1 -#define IBUS_Ohornbelowdot 0x1001ee2 -#define IBUS_ohornbelowdot 0x1001ee3 -#define IBUS_Ubelowdot 0x1001ee4 -#define IBUS_ubelowdot 0x1001ee5 -#define IBUS_Uhook 0x1001ee6 -#define IBUS_uhook 0x1001ee7 -#define IBUS_Uhornacute 0x1001ee8 -#define IBUS_uhornacute 0x1001ee9 -#define IBUS_Uhorngrave 0x1001eea -#define IBUS_uhorngrave 0x1001eeb -#define IBUS_Uhornhook 0x1001eec -#define IBUS_uhornhook 0x1001eed -#define IBUS_Uhorntilde 0x1001eee -#define IBUS_uhorntilde 0x1001eef -#define IBUS_Uhornbelowdot 0x1001ef0 -#define IBUS_uhornbelowdot 0x1001ef1 -#define IBUS_Ybelowdot 0x1001ef4 -#define IBUS_ybelowdot 0x1001ef5 -#define IBUS_Yhook 0x1001ef6 -#define IBUS_yhook 0x1001ef7 -#define IBUS_Ytilde 0x1001ef8 -#define IBUS_ytilde 0x1001ef9 -#define IBUS_Ohorn 0x10001a0 -#define IBUS_ohorn 0x10001a1 -#define IBUS_Uhorn 0x10001af -#define IBUS_uhorn 0x10001b0 -#define IBUS_EcuSign 0x10020a0 -#define IBUS_ColonSign 0x10020a1 -#define IBUS_CruzeiroSign 0x10020a2 -#define IBUS_FFrancSign 0x10020a3 -#define IBUS_LiraSign 0x10020a4 -#define IBUS_MillSign 0x10020a5 -#define IBUS_NairaSign 0x10020a6 -#define IBUS_PesetaSign 0x10020a7 -#define IBUS_RupeeSign 0x10020a8 -#define IBUS_WonSign 0x10020a9 -#define IBUS_NewSheqelSign 0x10020aa -#define IBUS_DongSign 0x10020ab -#define IBUS_EuroSign 0x20ac -#define IBUS_zerosuperior 0x1002070 -#define IBUS_foursuperior 0x1002074 -#define IBUS_fivesuperior 0x1002075 -#define IBUS_sixsuperior 0x1002076 -#define IBUS_sevensuperior 0x1002077 -#define IBUS_eightsuperior 0x1002078 -#define IBUS_ninesuperior 0x1002079 -#define IBUS_zerosubscript 0x1002080 -#define IBUS_onesubscript 0x1002081 -#define IBUS_twosubscript 0x1002082 -#define IBUS_threesubscript 0x1002083 -#define IBUS_foursubscript 0x1002084 -#define IBUS_fivesubscript 0x1002085 -#define IBUS_sixsubscript 0x1002086 -#define IBUS_sevensubscript 0x1002087 -#define IBUS_eightsubscript 0x1002088 -#define IBUS_ninesubscript 0x1002089 -#define IBUS_partdifferential 0x1002202 -#define IBUS_emptyset 0x1002205 -#define IBUS_elementof 0x1002208 -#define IBUS_notelementof 0x1002209 -#define IBUS_containsas 0x100220b -#define IBUS_squareroot 0x100221a -#define IBUS_cuberoot 0x100221b -#define IBUS_fourthroot 0x100221c -#define IBUS_dintegral 0x100222c -#define IBUS_tintegral 0x100222d -#define IBUS_because 0x1002235 -#define IBUS_approxeq 0x1002248 -#define IBUS_notapproxeq 0x1002247 -#define IBUS_notidentical 0x1002262 -#define IBUS_stricteq 0x1002263 -#define IBUS_braille_dot_1 0xfff1 -#define IBUS_braille_dot_2 0xfff2 -#define IBUS_braille_dot_3 0xfff3 -#define IBUS_braille_dot_4 0xfff4 -#define IBUS_braille_dot_5 0xfff5 -#define IBUS_braille_dot_6 0xfff6 -#define IBUS_braille_dot_7 0xfff7 -#define IBUS_braille_dot_8 0xfff8 -#define IBUS_braille_dot_9 0xfff9 -#define IBUS_braille_dot_10 0xfffa -#define IBUS_braille_blank 0x1002800 -#define IBUS_braille_dots_1 0x1002801 -#define IBUS_braille_dots_2 0x1002802 -#define IBUS_braille_dots_12 0x1002803 -#define IBUS_braille_dots_3 0x1002804 -#define IBUS_braille_dots_13 0x1002805 -#define IBUS_braille_dots_23 0x1002806 -#define IBUS_braille_dots_123 0x1002807 -#define IBUS_braille_dots_4 0x1002808 -#define IBUS_braille_dots_14 0x1002809 -#define IBUS_braille_dots_24 0x100280a -#define IBUS_braille_dots_124 0x100280b -#define IBUS_braille_dots_34 0x100280c -#define IBUS_braille_dots_134 0x100280d -#define IBUS_braille_dots_234 0x100280e -#define IBUS_braille_dots_1234 0x100280f -#define IBUS_braille_dots_5 0x1002810 -#define IBUS_braille_dots_15 0x1002811 -#define IBUS_braille_dots_25 0x1002812 -#define IBUS_braille_dots_125 0x1002813 -#define IBUS_braille_dots_35 0x1002814 -#define IBUS_braille_dots_135 0x1002815 -#define IBUS_braille_dots_235 0x1002816 -#define IBUS_braille_dots_1235 0x1002817 -#define IBUS_braille_dots_45 0x1002818 -#define IBUS_braille_dots_145 0x1002819 -#define IBUS_braille_dots_245 0x100281a -#define IBUS_braille_dots_1245 0x100281b -#define IBUS_braille_dots_345 0x100281c -#define IBUS_braille_dots_1345 0x100281d -#define IBUS_braille_dots_2345 0x100281e -#define IBUS_braille_dots_12345 0x100281f -#define IBUS_braille_dots_6 0x1002820 -#define IBUS_braille_dots_16 0x1002821 -#define IBUS_braille_dots_26 0x1002822 -#define IBUS_braille_dots_126 0x1002823 -#define IBUS_braille_dots_36 0x1002824 -#define IBUS_braille_dots_136 0x1002825 -#define IBUS_braille_dots_236 0x1002826 -#define IBUS_braille_dots_1236 0x1002827 -#define IBUS_braille_dots_46 0x1002828 -#define IBUS_braille_dots_146 0x1002829 -#define IBUS_braille_dots_246 0x100282a -#define IBUS_braille_dots_1246 0x100282b -#define IBUS_braille_dots_346 0x100282c -#define IBUS_braille_dots_1346 0x100282d -#define IBUS_braille_dots_2346 0x100282e -#define IBUS_braille_dots_12346 0x100282f -#define IBUS_braille_dots_56 0x1002830 -#define IBUS_braille_dots_156 0x1002831 -#define IBUS_braille_dots_256 0x1002832 -#define IBUS_braille_dots_1256 0x1002833 -#define IBUS_braille_dots_356 0x1002834 -#define IBUS_braille_dots_1356 0x1002835 -#define IBUS_braille_dots_2356 0x1002836 -#define IBUS_braille_dots_12356 0x1002837 -#define IBUS_braille_dots_456 0x1002838 -#define IBUS_braille_dots_1456 0x1002839 -#define IBUS_braille_dots_2456 0x100283a -#define IBUS_braille_dots_12456 0x100283b -#define IBUS_braille_dots_3456 0x100283c -#define IBUS_braille_dots_13456 0x100283d -#define IBUS_braille_dots_23456 0x100283e -#define IBUS_braille_dots_123456 0x100283f -#define IBUS_braille_dots_7 0x1002840 -#define IBUS_braille_dots_17 0x1002841 -#define IBUS_braille_dots_27 0x1002842 -#define IBUS_braille_dots_127 0x1002843 -#define IBUS_braille_dots_37 0x1002844 -#define IBUS_braille_dots_137 0x1002845 -#define IBUS_braille_dots_237 0x1002846 -#define IBUS_braille_dots_1237 0x1002847 -#define IBUS_braille_dots_47 0x1002848 -#define IBUS_braille_dots_147 0x1002849 -#define IBUS_braille_dots_247 0x100284a -#define IBUS_braille_dots_1247 0x100284b -#define IBUS_braille_dots_347 0x100284c -#define IBUS_braille_dots_1347 0x100284d -#define IBUS_braille_dots_2347 0x100284e -#define IBUS_braille_dots_12347 0x100284f -#define IBUS_braille_dots_57 0x1002850 -#define IBUS_braille_dots_157 0x1002851 -#define IBUS_braille_dots_257 0x1002852 -#define IBUS_braille_dots_1257 0x1002853 -#define IBUS_braille_dots_357 0x1002854 -#define IBUS_braille_dots_1357 0x1002855 -#define IBUS_braille_dots_2357 0x1002856 -#define IBUS_braille_dots_12357 0x1002857 -#define IBUS_braille_dots_457 0x1002858 -#define IBUS_braille_dots_1457 0x1002859 -#define IBUS_braille_dots_2457 0x100285a -#define IBUS_braille_dots_12457 0x100285b -#define IBUS_braille_dots_3457 0x100285c -#define IBUS_braille_dots_13457 0x100285d -#define IBUS_braille_dots_23457 0x100285e -#define IBUS_braille_dots_123457 0x100285f -#define IBUS_braille_dots_67 0x1002860 -#define IBUS_braille_dots_167 0x1002861 -#define IBUS_braille_dots_267 0x1002862 -#define IBUS_braille_dots_1267 0x1002863 -#define IBUS_braille_dots_367 0x1002864 -#define IBUS_braille_dots_1367 0x1002865 -#define IBUS_braille_dots_2367 0x1002866 -#define IBUS_braille_dots_12367 0x1002867 -#define IBUS_braille_dots_467 0x1002868 -#define IBUS_braille_dots_1467 0x1002869 -#define IBUS_braille_dots_2467 0x100286a -#define IBUS_braille_dots_12467 0x100286b -#define IBUS_braille_dots_3467 0x100286c -#define IBUS_braille_dots_13467 0x100286d -#define IBUS_braille_dots_23467 0x100286e -#define IBUS_braille_dots_123467 0x100286f -#define IBUS_braille_dots_567 0x1002870 -#define IBUS_braille_dots_1567 0x1002871 -#define IBUS_braille_dots_2567 0x1002872 -#define IBUS_braille_dots_12567 0x1002873 -#define IBUS_braille_dots_3567 0x1002874 -#define IBUS_braille_dots_13567 0x1002875 -#define IBUS_braille_dots_23567 0x1002876 -#define IBUS_braille_dots_123567 0x1002877 -#define IBUS_braille_dots_4567 0x1002878 -#define IBUS_braille_dots_14567 0x1002879 -#define IBUS_braille_dots_24567 0x100287a -#define IBUS_braille_dots_124567 0x100287b -#define IBUS_braille_dots_34567 0x100287c -#define IBUS_braille_dots_134567 0x100287d -#define IBUS_braille_dots_234567 0x100287e -#define IBUS_braille_dots_1234567 0x100287f -#define IBUS_braille_dots_8 0x1002880 -#define IBUS_braille_dots_18 0x1002881 -#define IBUS_braille_dots_28 0x1002882 -#define IBUS_braille_dots_128 0x1002883 -#define IBUS_braille_dots_38 0x1002884 -#define IBUS_braille_dots_138 0x1002885 -#define IBUS_braille_dots_238 0x1002886 -#define IBUS_braille_dots_1238 0x1002887 -#define IBUS_braille_dots_48 0x1002888 -#define IBUS_braille_dots_148 0x1002889 -#define IBUS_braille_dots_248 0x100288a -#define IBUS_braille_dots_1248 0x100288b -#define IBUS_braille_dots_348 0x100288c -#define IBUS_braille_dots_1348 0x100288d -#define IBUS_braille_dots_2348 0x100288e -#define IBUS_braille_dots_12348 0x100288f -#define IBUS_braille_dots_58 0x1002890 -#define IBUS_braille_dots_158 0x1002891 -#define IBUS_braille_dots_258 0x1002892 -#define IBUS_braille_dots_1258 0x1002893 -#define IBUS_braille_dots_358 0x1002894 -#define IBUS_braille_dots_1358 0x1002895 -#define IBUS_braille_dots_2358 0x1002896 -#define IBUS_braille_dots_12358 0x1002897 -#define IBUS_braille_dots_458 0x1002898 -#define IBUS_braille_dots_1458 0x1002899 -#define IBUS_braille_dots_2458 0x100289a -#define IBUS_braille_dots_12458 0x100289b -#define IBUS_braille_dots_3458 0x100289c -#define IBUS_braille_dots_13458 0x100289d -#define IBUS_braille_dots_23458 0x100289e -#define IBUS_braille_dots_123458 0x100289f -#define IBUS_braille_dots_68 0x10028a0 -#define IBUS_braille_dots_168 0x10028a1 -#define IBUS_braille_dots_268 0x10028a2 -#define IBUS_braille_dots_1268 0x10028a3 -#define IBUS_braille_dots_368 0x10028a4 -#define IBUS_braille_dots_1368 0x10028a5 -#define IBUS_braille_dots_2368 0x10028a6 -#define IBUS_braille_dots_12368 0x10028a7 -#define IBUS_braille_dots_468 0x10028a8 -#define IBUS_braille_dots_1468 0x10028a9 -#define IBUS_braille_dots_2468 0x10028aa -#define IBUS_braille_dots_12468 0x10028ab -#define IBUS_braille_dots_3468 0x10028ac -#define IBUS_braille_dots_13468 0x10028ad -#define IBUS_braille_dots_23468 0x10028ae -#define IBUS_braille_dots_123468 0x10028af -#define IBUS_braille_dots_568 0x10028b0 -#define IBUS_braille_dots_1568 0x10028b1 -#define IBUS_braille_dots_2568 0x10028b2 -#define IBUS_braille_dots_12568 0x10028b3 -#define IBUS_braille_dots_3568 0x10028b4 -#define IBUS_braille_dots_13568 0x10028b5 -#define IBUS_braille_dots_23568 0x10028b6 -#define IBUS_braille_dots_123568 0x10028b7 -#define IBUS_braille_dots_4568 0x10028b8 -#define IBUS_braille_dots_14568 0x10028b9 -#define IBUS_braille_dots_24568 0x10028ba -#define IBUS_braille_dots_124568 0x10028bb -#define IBUS_braille_dots_34568 0x10028bc -#define IBUS_braille_dots_134568 0x10028bd -#define IBUS_braille_dots_234568 0x10028be -#define IBUS_braille_dots_1234568 0x10028bf -#define IBUS_braille_dots_78 0x10028c0 -#define IBUS_braille_dots_178 0x10028c1 -#define IBUS_braille_dots_278 0x10028c2 -#define IBUS_braille_dots_1278 0x10028c3 -#define IBUS_braille_dots_378 0x10028c4 -#define IBUS_braille_dots_1378 0x10028c5 -#define IBUS_braille_dots_2378 0x10028c6 -#define IBUS_braille_dots_12378 0x10028c7 -#define IBUS_braille_dots_478 0x10028c8 -#define IBUS_braille_dots_1478 0x10028c9 -#define IBUS_braille_dots_2478 0x10028ca -#define IBUS_braille_dots_12478 0x10028cb -#define IBUS_braille_dots_3478 0x10028cc -#define IBUS_braille_dots_13478 0x10028cd -#define IBUS_braille_dots_23478 0x10028ce -#define IBUS_braille_dots_123478 0x10028cf -#define IBUS_braille_dots_578 0x10028d0 -#define IBUS_braille_dots_1578 0x10028d1 -#define IBUS_braille_dots_2578 0x10028d2 -#define IBUS_braille_dots_12578 0x10028d3 -#define IBUS_braille_dots_3578 0x10028d4 -#define IBUS_braille_dots_13578 0x10028d5 -#define IBUS_braille_dots_23578 0x10028d6 -#define IBUS_braille_dots_123578 0x10028d7 -#define IBUS_braille_dots_4578 0x10028d8 -#define IBUS_braille_dots_14578 0x10028d9 -#define IBUS_braille_dots_24578 0x10028da -#define IBUS_braille_dots_124578 0x10028db -#define IBUS_braille_dots_34578 0x10028dc -#define IBUS_braille_dots_134578 0x10028dd -#define IBUS_braille_dots_234578 0x10028de -#define IBUS_braille_dots_1234578 0x10028df -#define IBUS_braille_dots_678 0x10028e0 -#define IBUS_braille_dots_1678 0x10028e1 -#define IBUS_braille_dots_2678 0x10028e2 -#define IBUS_braille_dots_12678 0x10028e3 -#define IBUS_braille_dots_3678 0x10028e4 -#define IBUS_braille_dots_13678 0x10028e5 -#define IBUS_braille_dots_23678 0x10028e6 -#define IBUS_braille_dots_123678 0x10028e7 -#define IBUS_braille_dots_4678 0x10028e8 -#define IBUS_braille_dots_14678 0x10028e9 -#define IBUS_braille_dots_24678 0x10028ea -#define IBUS_braille_dots_124678 0x10028eb -#define IBUS_braille_dots_34678 0x10028ec -#define IBUS_braille_dots_134678 0x10028ed -#define IBUS_braille_dots_234678 0x10028ee -#define IBUS_braille_dots_1234678 0x10028ef -#define IBUS_braille_dots_5678 0x10028f0 -#define IBUS_braille_dots_15678 0x10028f1 -#define IBUS_braille_dots_25678 0x10028f2 -#define IBUS_braille_dots_125678 0x10028f3 -#define IBUS_braille_dots_35678 0x10028f4 -#define IBUS_braille_dots_135678 0x10028f5 -#define IBUS_braille_dots_235678 0x10028f6 -#define IBUS_braille_dots_1235678 0x10028f7 -#define IBUS_braille_dots_45678 0x10028f8 -#define IBUS_braille_dots_145678 0x10028f9 -#define IBUS_braille_dots_245678 0x10028fa -#define IBUS_braille_dots_1245678 0x10028fb -#define IBUS_braille_dots_345678 0x10028fc -#define IBUS_braille_dots_1345678 0x10028fd -#define IBUS_braille_dots_2345678 0x10028fe -#define IBUS_braille_dots_12345678 0x10028ff +#define IBUS_KEY_VoidSymbol 0xffffff +#define IBUS_KEY_BackSpace 0xff08 +#define IBUS_KEY_Tab 0xff09 +#define IBUS_KEY_Linefeed 0xff0a +#define IBUS_KEY_Clear 0xff0b +#define IBUS_KEY_Return 0xff0d +#define IBUS_KEY_Pause 0xff13 +#define IBUS_KEY_Scroll_Lock 0xff14 +#define IBUS_KEY_Sys_Req 0xff15 +#define IBUS_KEY_Escape 0xff1b +#define IBUS_KEY_Delete 0xffff +#define IBUS_KEY_Multi_key 0xff20 +#define IBUS_KEY_Codeinput 0xff37 +#define IBUS_KEY_SingleCandidate 0xff3c +#define IBUS_KEY_MultipleCandidate 0xff3d +#define IBUS_KEY_PreviousCandidate 0xff3e +#define IBUS_KEY_Kanji 0xff21 +#define IBUS_KEY_Muhenkan 0xff22 +#define IBUS_KEY_Henkan_Mode 0xff23 +#define IBUS_KEY_Henkan 0xff23 +#define IBUS_KEY_Romaji 0xff24 +#define IBUS_KEY_Hiragana 0xff25 +#define IBUS_KEY_Katakana 0xff26 +#define IBUS_KEY_Hiragana_Katakana 0xff27 +#define IBUS_KEY_Zenkaku 0xff28 +#define IBUS_KEY_Hankaku 0xff29 +#define IBUS_KEY_Zenkaku_Hankaku 0xff2a +#define IBUS_KEY_Touroku 0xff2b +#define IBUS_KEY_Massyo 0xff2c +#define IBUS_KEY_Kana_Lock 0xff2d +#define IBUS_KEY_Kana_Shift 0xff2e +#define IBUS_KEY_Eisu_Shift 0xff2f +#define IBUS_KEY_Eisu_toggle 0xff30 +#define IBUS_KEY_Kanji_Bangou 0xff37 +#define IBUS_KEY_Zen_Koho 0xff3d +#define IBUS_KEY_Mae_Koho 0xff3e +#define IBUS_KEY_Home 0xff50 +#define IBUS_KEY_Left 0xff51 +#define IBUS_KEY_Up 0xff52 +#define IBUS_KEY_Right 0xff53 +#define IBUS_KEY_Down 0xff54 +#define IBUS_KEY_Prior 0xff55 +#define IBUS_KEY_Page_Up 0xff55 +#define IBUS_KEY_Next 0xff56 +#define IBUS_KEY_Page_Down 0xff56 +#define IBUS_KEY_End 0xff57 +#define IBUS_KEY_Begin 0xff58 +#define IBUS_KEY_Select 0xff60 +#define IBUS_KEY_Print 0xff61 +#define IBUS_KEY_Execute 0xff62 +#define IBUS_KEY_Insert 0xff63 +#define IBUS_KEY_Undo 0xff65 +#define IBUS_KEY_Redo 0xff66 +#define IBUS_KEY_Menu 0xff67 +#define IBUS_KEY_Find 0xff68 +#define IBUS_KEY_Cancel 0xff69 +#define IBUS_KEY_Help 0xff6a +#define IBUS_KEY_Break 0xff6b +#define IBUS_KEY_Mode_switch 0xff7e +#define IBUS_KEY_script_switch 0xff7e +#define IBUS_KEY_Num_Lock 0xff7f +#define IBUS_KEY_KP_Space 0xff80 +#define IBUS_KEY_KP_Tab 0xff89 +#define IBUS_KEY_KP_Enter 0xff8d +#define IBUS_KEY_KP_F1 0xff91 +#define IBUS_KEY_KP_F2 0xff92 +#define IBUS_KEY_KP_F3 0xff93 +#define IBUS_KEY_KP_F4 0xff94 +#define IBUS_KEY_KP_Home 0xff95 +#define IBUS_KEY_KP_Left 0xff96 +#define IBUS_KEY_KP_Up 0xff97 +#define IBUS_KEY_KP_Right 0xff98 +#define IBUS_KEY_KP_Down 0xff99 +#define IBUS_KEY_KP_Prior 0xff9a +#define IBUS_KEY_KP_Page_Up 0xff9a +#define IBUS_KEY_KP_Next 0xff9b +#define IBUS_KEY_KP_Page_Down 0xff9b +#define IBUS_KEY_KP_End 0xff9c +#define IBUS_KEY_KP_Begin 0xff9d +#define IBUS_KEY_KP_Insert 0xff9e +#define IBUS_KEY_KP_Delete 0xff9f +#define IBUS_KEY_KP_Equal 0xffbd +#define IBUS_KEY_KP_Multiply 0xffaa +#define IBUS_KEY_KP_Add 0xffab +#define IBUS_KEY_KP_Separator 0xffac +#define IBUS_KEY_KP_Subtract 0xffad +#define IBUS_KEY_KP_Decimal 0xffae +#define IBUS_KEY_KP_Divide 0xffaf +#define IBUS_KEY_KP_0 0xffb0 +#define IBUS_KEY_KP_1 0xffb1 +#define IBUS_KEY_KP_2 0xffb2 +#define IBUS_KEY_KP_3 0xffb3 +#define IBUS_KEY_KP_4 0xffb4 +#define IBUS_KEY_KP_5 0xffb5 +#define IBUS_KEY_KP_6 0xffb6 +#define IBUS_KEY_KP_7 0xffb7 +#define IBUS_KEY_KP_8 0xffb8 +#define IBUS_KEY_KP_9 0xffb9 +#define IBUS_KEY_F1 0xffbe +#define IBUS_KEY_F2 0xffbf +#define IBUS_KEY_F3 0xffc0 +#define IBUS_KEY_F4 0xffc1 +#define IBUS_KEY_F5 0xffc2 +#define IBUS_KEY_F6 0xffc3 +#define IBUS_KEY_F7 0xffc4 +#define IBUS_KEY_F8 0xffc5 +#define IBUS_KEY_F9 0xffc6 +#define IBUS_KEY_F10 0xffc7 +#define IBUS_KEY_F11 0xffc8 +#define IBUS_KEY_L1 0xffc8 +#define IBUS_KEY_F12 0xffc9 +#define IBUS_KEY_L2 0xffc9 +#define IBUS_KEY_F13 0xffca +#define IBUS_KEY_L3 0xffca +#define IBUS_KEY_F14 0xffcb +#define IBUS_KEY_L4 0xffcb +#define IBUS_KEY_F15 0xffcc +#define IBUS_KEY_L5 0xffcc +#define IBUS_KEY_F16 0xffcd +#define IBUS_KEY_L6 0xffcd +#define IBUS_KEY_F17 0xffce +#define IBUS_KEY_L7 0xffce +#define IBUS_KEY_F18 0xffcf +#define IBUS_KEY_L8 0xffcf +#define IBUS_KEY_F19 0xffd0 +#define IBUS_KEY_L9 0xffd0 +#define IBUS_KEY_F20 0xffd1 +#define IBUS_KEY_L10 0xffd1 +#define IBUS_KEY_F21 0xffd2 +#define IBUS_KEY_R1 0xffd2 +#define IBUS_KEY_F22 0xffd3 +#define IBUS_KEY_R2 0xffd3 +#define IBUS_KEY_F23 0xffd4 +#define IBUS_KEY_R3 0xffd4 +#define IBUS_KEY_F24 0xffd5 +#define IBUS_KEY_R4 0xffd5 +#define IBUS_KEY_F25 0xffd6 +#define IBUS_KEY_R5 0xffd6 +#define IBUS_KEY_F26 0xffd7 +#define IBUS_KEY_R6 0xffd7 +#define IBUS_KEY_F27 0xffd8 +#define IBUS_KEY_R7 0xffd8 +#define IBUS_KEY_F28 0xffd9 +#define IBUS_KEY_R8 0xffd9 +#define IBUS_KEY_F29 0xffda +#define IBUS_KEY_R9 0xffda +#define IBUS_KEY_F30 0xffdb +#define IBUS_KEY_R10 0xffdb +#define IBUS_KEY_F31 0xffdc +#define IBUS_KEY_R11 0xffdc +#define IBUS_KEY_F32 0xffdd +#define IBUS_KEY_R12 0xffdd +#define IBUS_KEY_F33 0xffde +#define IBUS_KEY_R13 0xffde +#define IBUS_KEY_F34 0xffdf +#define IBUS_KEY_R14 0xffdf +#define IBUS_KEY_F35 0xffe0 +#define IBUS_KEY_R15 0xffe0 +#define IBUS_KEY_Shift_L 0xffe1 +#define IBUS_KEY_Shift_R 0xffe2 +#define IBUS_KEY_Control_L 0xffe3 +#define IBUS_KEY_Control_R 0xffe4 +#define IBUS_KEY_Caps_Lock 0xffe5 +#define IBUS_KEY_Shift_Lock 0xffe6 +#define IBUS_KEY_Meta_L 0xffe7 +#define IBUS_KEY_Meta_R 0xffe8 +#define IBUS_KEY_Alt_L 0xffe9 +#define IBUS_KEY_Alt_R 0xffea +#define IBUS_KEY_Super_L 0xffeb +#define IBUS_KEY_Super_R 0xffec +#define IBUS_KEY_Hyper_L 0xffed +#define IBUS_KEY_Hyper_R 0xffee +#define IBUS_KEY_ISO_Lock 0xfe01 +#define IBUS_KEY_ISO_Level2_Latch 0xfe02 +#define IBUS_KEY_ISO_Level3_Shift 0xfe03 +#define IBUS_KEY_ISO_Level3_Latch 0xfe04 +#define IBUS_KEY_ISO_Level3_Lock 0xfe05 +#define IBUS_KEY_ISO_Level5_Shift 0xfe11 +#define IBUS_KEY_ISO_Level5_Latch 0xfe12 +#define IBUS_KEY_ISO_Level5_Lock 0xfe13 +#define IBUS_KEY_ISO_Group_Shift 0xff7e +#define IBUS_KEY_ISO_Group_Latch 0xfe06 +#define IBUS_KEY_ISO_Group_Lock 0xfe07 +#define IBUS_KEY_ISO_Next_Group 0xfe08 +#define IBUS_KEY_ISO_Next_Group_Lock 0xfe09 +#define IBUS_KEY_ISO_Prev_Group 0xfe0a +#define IBUS_KEY_ISO_Prev_Group_Lock 0xfe0b +#define IBUS_KEY_ISO_First_Group 0xfe0c +#define IBUS_KEY_ISO_First_Group_Lock 0xfe0d +#define IBUS_KEY_ISO_Last_Group 0xfe0e +#define IBUS_KEY_ISO_Last_Group_Lock 0xfe0f +#define IBUS_KEY_ISO_Left_Tab 0xfe20 +#define IBUS_KEY_ISO_Move_Line_Up 0xfe21 +#define IBUS_KEY_ISO_Move_Line_Down 0xfe22 +#define IBUS_KEY_ISO_Partial_Line_Up 0xfe23 +#define IBUS_KEY_ISO_Partial_Line_Down 0xfe24 +#define IBUS_KEY_ISO_Partial_Space_Left 0xfe25 +#define IBUS_KEY_ISO_Partial_Space_Right 0xfe26 +#define IBUS_KEY_ISO_Set_Margin_Left 0xfe27 +#define IBUS_KEY_ISO_Set_Margin_Right 0xfe28 +#define IBUS_KEY_ISO_Release_Margin_Left 0xfe29 +#define IBUS_KEY_ISO_Release_Margin_Right 0xfe2a +#define IBUS_KEY_ISO_Release_Both_Margins 0xfe2b +#define IBUS_KEY_ISO_Fast_Cursor_Left 0xfe2c +#define IBUS_KEY_ISO_Fast_Cursor_Right 0xfe2d +#define IBUS_KEY_ISO_Fast_Cursor_Up 0xfe2e +#define IBUS_KEY_ISO_Fast_Cursor_Down 0xfe2f +#define IBUS_KEY_ISO_Continuous_Underline 0xfe30 +#define IBUS_KEY_ISO_Discontinuous_Underline 0xfe31 +#define IBUS_KEY_ISO_Emphasize 0xfe32 +#define IBUS_KEY_ISO_Center_Object 0xfe33 +#define IBUS_KEY_ISO_Enter 0xfe34 +#define IBUS_KEY_dead_grave 0xfe50 +#define IBUS_KEY_dead_acute 0xfe51 +#define IBUS_KEY_dead_circumflex 0xfe52 +#define IBUS_KEY_dead_tilde 0xfe53 +#define IBUS_KEY_dead_perispomeni 0xfe53 +#define IBUS_KEY_dead_macron 0xfe54 +#define IBUS_KEY_dead_breve 0xfe55 +#define IBUS_KEY_dead_abovedot 0xfe56 +#define IBUS_KEY_dead_diaeresis 0xfe57 +#define IBUS_KEY_dead_abovering 0xfe58 +#define IBUS_KEY_dead_doubleacute 0xfe59 +#define IBUS_KEY_dead_caron 0xfe5a +#define IBUS_KEY_dead_cedilla 0xfe5b +#define IBUS_KEY_dead_ogonek 0xfe5c +#define IBUS_KEY_dead_iota 0xfe5d +#define IBUS_KEY_dead_voiced_sound 0xfe5e +#define IBUS_KEY_dead_semivoiced_sound 0xfe5f +#define IBUS_KEY_dead_belowdot 0xfe60 +#define IBUS_KEY_dead_hook 0xfe61 +#define IBUS_KEY_dead_horn 0xfe62 +#define IBUS_KEY_dead_stroke 0xfe63 +#define IBUS_KEY_dead_abovecomma 0xfe64 +#define IBUS_KEY_dead_psili 0xfe64 +#define IBUS_KEY_dead_abovereversedcomma 0xfe65 +#define IBUS_KEY_dead_dasia 0xfe65 +#define IBUS_KEY_dead_doublegrave 0xfe66 +#define IBUS_KEY_dead_belowring 0xfe67 +#define IBUS_KEY_dead_belowmacron 0xfe68 +#define IBUS_KEY_dead_belowcircumflex 0xfe69 +#define IBUS_KEY_dead_belowtilde 0xfe6a +#define IBUS_KEY_dead_belowbreve 0xfe6b +#define IBUS_KEY_dead_belowdiaeresis 0xfe6c +#define IBUS_KEY_dead_invertedbreve 0xfe6d +#define IBUS_KEY_dead_belowcomma 0xfe6e +#define IBUS_KEY_dead_currency 0xfe6f +#define IBUS_KEY_dead_a 0xfe80 +#define IBUS_KEY_dead_A 0xfe81 +#define IBUS_KEY_dead_e 0xfe82 +#define IBUS_KEY_dead_E 0xfe83 +#define IBUS_KEY_dead_i 0xfe84 +#define IBUS_KEY_dead_I 0xfe85 +#define IBUS_KEY_dead_o 0xfe86 +#define IBUS_KEY_dead_O 0xfe87 +#define IBUS_KEY_dead_u 0xfe88 +#define IBUS_KEY_dead_U 0xfe89 +#define IBUS_KEY_dead_small_schwa 0xfe8a +#define IBUS_KEY_dead_capital_schwa 0xfe8b +#define IBUS_KEY_First_Virtual_Screen 0xfed0 +#define IBUS_KEY_Prev_Virtual_Screen 0xfed1 +#define IBUS_KEY_Next_Virtual_Screen 0xfed2 +#define IBUS_KEY_Last_Virtual_Screen 0xfed4 +#define IBUS_KEY_Terminate_Server 0xfed5 +#define IBUS_KEY_AccessX_Enable 0xfe70 +#define IBUS_KEY_AccessX_Feedback_Enable 0xfe71 +#define IBUS_KEY_RepeatKeys_Enable 0xfe72 +#define IBUS_KEY_SlowKeys_Enable 0xfe73 +#define IBUS_KEY_BounceKeys_Enable 0xfe74 +#define IBUS_KEY_StickyKeys_Enable 0xfe75 +#define IBUS_KEY_MouseKeys_Enable 0xfe76 +#define IBUS_KEY_MouseKeys_Accel_Enable 0xfe77 +#define IBUS_KEY_Overlay1_Enable 0xfe78 +#define IBUS_KEY_Overlay2_Enable 0xfe79 +#define IBUS_KEY_AudibleBell_Enable 0xfe7a +#define IBUS_KEY_Pointer_Left 0xfee0 +#define IBUS_KEY_Pointer_Right 0xfee1 +#define IBUS_KEY_Pointer_Up 0xfee2 +#define IBUS_KEY_Pointer_Down 0xfee3 +#define IBUS_KEY_Pointer_UpLeft 0xfee4 +#define IBUS_KEY_Pointer_UpRight 0xfee5 +#define IBUS_KEY_Pointer_DownLeft 0xfee6 +#define IBUS_KEY_Pointer_DownRight 0xfee7 +#define IBUS_KEY_Pointer_Button_Dflt 0xfee8 +#define IBUS_KEY_Pointer_Button1 0xfee9 +#define IBUS_KEY_Pointer_Button2 0xfeea +#define IBUS_KEY_Pointer_Button3 0xfeeb +#define IBUS_KEY_Pointer_Button4 0xfeec +#define IBUS_KEY_Pointer_Button5 0xfeed +#define IBUS_KEY_Pointer_DblClick_Dflt 0xfeee +#define IBUS_KEY_Pointer_DblClick1 0xfeef +#define IBUS_KEY_Pointer_DblClick2 0xfef0 +#define IBUS_KEY_Pointer_DblClick3 0xfef1 +#define IBUS_KEY_Pointer_DblClick4 0xfef2 +#define IBUS_KEY_Pointer_DblClick5 0xfef3 +#define IBUS_KEY_Pointer_Drag_Dflt 0xfef4 +#define IBUS_KEY_Pointer_Drag1 0xfef5 +#define IBUS_KEY_Pointer_Drag2 0xfef6 +#define IBUS_KEY_Pointer_Drag3 0xfef7 +#define IBUS_KEY_Pointer_Drag4 0xfef8 +#define IBUS_KEY_Pointer_Drag5 0xfefd +#define IBUS_KEY_Pointer_EnableKeys 0xfef9 +#define IBUS_KEY_Pointer_Accelerate 0xfefa +#define IBUS_KEY_Pointer_DfltBtnNext 0xfefb +#define IBUS_KEY_Pointer_DfltBtnPrev 0xfefc +#define IBUS_KEY_ch 0xfea0 +#define IBUS_KEY_Ch 0xfea1 +#define IBUS_KEY_CH 0xfea2 +#define IBUS_KEY_c_h 0xfea3 +#define IBUS_KEY_C_h 0xfea4 +#define IBUS_KEY_C_H 0xfea5 +#define IBUS_KEY_3270_Duplicate 0xfd01 +#define IBUS_KEY_3270_FieldMark 0xfd02 +#define IBUS_KEY_3270_Right2 0xfd03 +#define IBUS_KEY_3270_Left2 0xfd04 +#define IBUS_KEY_3270_BackTab 0xfd05 +#define IBUS_KEY_3270_EraseEOF 0xfd06 +#define IBUS_KEY_3270_EraseInput 0xfd07 +#define IBUS_KEY_3270_Reset 0xfd08 +#define IBUS_KEY_3270_Quit 0xfd09 +#define IBUS_KEY_3270_PA1 0xfd0a +#define IBUS_KEY_3270_PA2 0xfd0b +#define IBUS_KEY_3270_PA3 0xfd0c +#define IBUS_KEY_3270_Test 0xfd0d +#define IBUS_KEY_3270_Attn 0xfd0e +#define IBUS_KEY_3270_CursorBlink 0xfd0f +#define IBUS_KEY_3270_AltCursor 0xfd10 +#define IBUS_KEY_3270_KeyClick 0xfd11 +#define IBUS_KEY_3270_Jump 0xfd12 +#define IBUS_KEY_3270_Ident 0xfd13 +#define IBUS_KEY_3270_Rule 0xfd14 +#define IBUS_KEY_3270_Copy 0xfd15 +#define IBUS_KEY_3270_Play 0xfd16 +#define IBUS_KEY_3270_Setup 0xfd17 +#define IBUS_KEY_3270_Record 0xfd18 +#define IBUS_KEY_3270_ChangeScreen 0xfd19 +#define IBUS_KEY_3270_DeleteWord 0xfd1a +#define IBUS_KEY_3270_ExSelect 0xfd1b +#define IBUS_KEY_3270_CursorSelect 0xfd1c +#define IBUS_KEY_3270_PrintScreen 0xfd1d +#define IBUS_KEY_3270_Enter 0xfd1e +#define IBUS_KEY_space 0x020 +#define IBUS_KEY_exclam 0x021 +#define IBUS_KEY_quotedbl 0x022 +#define IBUS_KEY_numbersign 0x023 +#define IBUS_KEY_dollar 0x024 +#define IBUS_KEY_percent 0x025 +#define IBUS_KEY_ampersand 0x026 +#define IBUS_KEY_apostrophe 0x027 +#define IBUS_KEY_quoteright 0x027 +#define IBUS_KEY_parenleft 0x028 +#define IBUS_KEY_parenright 0x029 +#define IBUS_KEY_asterisk 0x02a +#define IBUS_KEY_plus 0x02b +#define IBUS_KEY_comma 0x02c +#define IBUS_KEY_minus 0x02d +#define IBUS_KEY_period 0x02e +#define IBUS_KEY_slash 0x02f +#define IBUS_KEY_0 0x030 +#define IBUS_KEY_1 0x031 +#define IBUS_KEY_2 0x032 +#define IBUS_KEY_3 0x033 +#define IBUS_KEY_4 0x034 +#define IBUS_KEY_5 0x035 +#define IBUS_KEY_6 0x036 +#define IBUS_KEY_7 0x037 +#define IBUS_KEY_8 0x038 +#define IBUS_KEY_9 0x039 +#define IBUS_KEY_colon 0x03a +#define IBUS_KEY_semicolon 0x03b +#define IBUS_KEY_less 0x03c +#define IBUS_KEY_equal 0x03d +#define IBUS_KEY_greater 0x03e +#define IBUS_KEY_question 0x03f +#define IBUS_KEY_at 0x040 +#define IBUS_KEY_A 0x041 +#define IBUS_KEY_B 0x042 +#define IBUS_KEY_C 0x043 +#define IBUS_KEY_D 0x044 +#define IBUS_KEY_E 0x045 +#define IBUS_KEY_F 0x046 +#define IBUS_KEY_G 0x047 +#define IBUS_KEY_H 0x048 +#define IBUS_KEY_I 0x049 +#define IBUS_KEY_J 0x04a +#define IBUS_KEY_K 0x04b +#define IBUS_KEY_L 0x04c +#define IBUS_KEY_M 0x04d +#define IBUS_KEY_N 0x04e +#define IBUS_KEY_O 0x04f +#define IBUS_KEY_P 0x050 +#define IBUS_KEY_Q 0x051 +#define IBUS_KEY_R 0x052 +#define IBUS_KEY_S 0x053 +#define IBUS_KEY_T 0x054 +#define IBUS_KEY_U 0x055 +#define IBUS_KEY_V 0x056 +#define IBUS_KEY_W 0x057 +#define IBUS_KEY_X 0x058 +#define IBUS_KEY_Y 0x059 +#define IBUS_KEY_Z 0x05a +#define IBUS_KEY_bracketleft 0x05b +#define IBUS_KEY_backslash 0x05c +#define IBUS_KEY_bracketright 0x05d +#define IBUS_KEY_asciicircum 0x05e +#define IBUS_KEY_underscore 0x05f +#define IBUS_KEY_grave 0x060 +#define IBUS_KEY_quoteleft 0x060 +#define IBUS_KEY_a 0x061 +#define IBUS_KEY_b 0x062 +#define IBUS_KEY_c 0x063 +#define IBUS_KEY_d 0x064 +#define IBUS_KEY_e 0x065 +#define IBUS_KEY_f 0x066 +#define IBUS_KEY_g 0x067 +#define IBUS_KEY_h 0x068 +#define IBUS_KEY_i 0x069 +#define IBUS_KEY_j 0x06a +#define IBUS_KEY_k 0x06b +#define IBUS_KEY_l 0x06c +#define IBUS_KEY_m 0x06d +#define IBUS_KEY_n 0x06e +#define IBUS_KEY_o 0x06f +#define IBUS_KEY_p 0x070 +#define IBUS_KEY_q 0x071 +#define IBUS_KEY_r 0x072 +#define IBUS_KEY_s 0x073 +#define IBUS_KEY_t 0x074 +#define IBUS_KEY_u 0x075 +#define IBUS_KEY_v 0x076 +#define IBUS_KEY_w 0x077 +#define IBUS_KEY_x 0x078 +#define IBUS_KEY_y 0x079 +#define IBUS_KEY_z 0x07a +#define IBUS_KEY_braceleft 0x07b +#define IBUS_KEY_bar 0x07c +#define IBUS_KEY_braceright 0x07d +#define IBUS_KEY_asciitilde 0x07e +#define IBUS_KEY_nobreakspace 0x0a0 +#define IBUS_KEY_exclamdown 0x0a1 +#define IBUS_KEY_cent 0x0a2 +#define IBUS_KEY_sterling 0x0a3 +#define IBUS_KEY_currency 0x0a4 +#define IBUS_KEY_yen 0x0a5 +#define IBUS_KEY_brokenbar 0x0a6 +#define IBUS_KEY_section 0x0a7 +#define IBUS_KEY_diaeresis 0x0a8 +#define IBUS_KEY_copyright 0x0a9 +#define IBUS_KEY_ordfeminine 0x0aa +#define IBUS_KEY_guillemotleft 0x0ab +#define IBUS_KEY_notsign 0x0ac +#define IBUS_KEY_hyphen 0x0ad +#define IBUS_KEY_registered 0x0ae +#define IBUS_KEY_macron 0x0af +#define IBUS_KEY_degree 0x0b0 +#define IBUS_KEY_plusminus 0x0b1 +#define IBUS_KEY_twosuperior 0x0b2 +#define IBUS_KEY_threesuperior 0x0b3 +#define IBUS_KEY_acute 0x0b4 +#define IBUS_KEY_mu 0x0b5 +#define IBUS_KEY_paragraph 0x0b6 +#define IBUS_KEY_periodcentered 0x0b7 +#define IBUS_KEY_cedilla 0x0b8 +#define IBUS_KEY_onesuperior 0x0b9 +#define IBUS_KEY_masculine 0x0ba +#define IBUS_KEY_guillemotright 0x0bb +#define IBUS_KEY_onequarter 0x0bc +#define IBUS_KEY_onehalf 0x0bd +#define IBUS_KEY_threequarters 0x0be +#define IBUS_KEY_questiondown 0x0bf +#define IBUS_KEY_Agrave 0x0c0 +#define IBUS_KEY_Aacute 0x0c1 +#define IBUS_KEY_Acircumflex 0x0c2 +#define IBUS_KEY_Atilde 0x0c3 +#define IBUS_KEY_Adiaeresis 0x0c4 +#define IBUS_KEY_Aring 0x0c5 +#define IBUS_KEY_AE 0x0c6 +#define IBUS_KEY_Ccedilla 0x0c7 +#define IBUS_KEY_Egrave 0x0c8 +#define IBUS_KEY_Eacute 0x0c9 +#define IBUS_KEY_Ecircumflex 0x0ca +#define IBUS_KEY_Ediaeresis 0x0cb +#define IBUS_KEY_Igrave 0x0cc +#define IBUS_KEY_Iacute 0x0cd +#define IBUS_KEY_Icircumflex 0x0ce +#define IBUS_KEY_Idiaeresis 0x0cf +#define IBUS_KEY_ETH 0x0d0 +#define IBUS_KEY_Eth 0x0d0 +#define IBUS_KEY_Ntilde 0x0d1 +#define IBUS_KEY_Ograve 0x0d2 +#define IBUS_KEY_Oacute 0x0d3 +#define IBUS_KEY_Ocircumflex 0x0d4 +#define IBUS_KEY_Otilde 0x0d5 +#define IBUS_KEY_Odiaeresis 0x0d6 +#define IBUS_KEY_multiply 0x0d7 +#define IBUS_KEY_Oslash 0x0d8 +#define IBUS_KEY_Ooblique 0x0d8 +#define IBUS_KEY_Ugrave 0x0d9 +#define IBUS_KEY_Uacute 0x0da +#define IBUS_KEY_Ucircumflex 0x0db +#define IBUS_KEY_Udiaeresis 0x0dc +#define IBUS_KEY_Yacute 0x0dd +#define IBUS_KEY_THORN 0x0de +#define IBUS_KEY_Thorn 0x0de +#define IBUS_KEY_ssharp 0x0df +#define IBUS_KEY_agrave 0x0e0 +#define IBUS_KEY_aacute 0x0e1 +#define IBUS_KEY_acircumflex 0x0e2 +#define IBUS_KEY_atilde 0x0e3 +#define IBUS_KEY_adiaeresis 0x0e4 +#define IBUS_KEY_aring 0x0e5 +#define IBUS_KEY_ae 0x0e6 +#define IBUS_KEY_ccedilla 0x0e7 +#define IBUS_KEY_egrave 0x0e8 +#define IBUS_KEY_eacute 0x0e9 +#define IBUS_KEY_ecircumflex 0x0ea +#define IBUS_KEY_ediaeresis 0x0eb +#define IBUS_KEY_igrave 0x0ec +#define IBUS_KEY_iacute 0x0ed +#define IBUS_KEY_icircumflex 0x0ee +#define IBUS_KEY_idiaeresis 0x0ef +#define IBUS_KEY_eth 0x0f0 +#define IBUS_KEY_ntilde 0x0f1 +#define IBUS_KEY_ograve 0x0f2 +#define IBUS_KEY_oacute 0x0f3 +#define IBUS_KEY_ocircumflex 0x0f4 +#define IBUS_KEY_otilde 0x0f5 +#define IBUS_KEY_odiaeresis 0x0f6 +#define IBUS_KEY_division 0x0f7 +#define IBUS_KEY_oslash 0x0f8 +#define IBUS_KEY_ooblique 0x0f8 +#define IBUS_KEY_ugrave 0x0f9 +#define IBUS_KEY_uacute 0x0fa +#define IBUS_KEY_ucircumflex 0x0fb +#define IBUS_KEY_udiaeresis 0x0fc +#define IBUS_KEY_yacute 0x0fd +#define IBUS_KEY_thorn 0x0fe +#define IBUS_KEY_ydiaeresis 0x0ff +#define IBUS_KEY_Aogonek 0x1a1 +#define IBUS_KEY_breve 0x1a2 +#define IBUS_KEY_Lstroke 0x1a3 +#define IBUS_KEY_Lcaron 0x1a5 +#define IBUS_KEY_Sacute 0x1a6 +#define IBUS_KEY_Scaron 0x1a9 +#define IBUS_KEY_Scedilla 0x1aa +#define IBUS_KEY_Tcaron 0x1ab +#define IBUS_KEY_Zacute 0x1ac +#define IBUS_KEY_Zcaron 0x1ae +#define IBUS_KEY_Zabovedot 0x1af +#define IBUS_KEY_aogonek 0x1b1 +#define IBUS_KEY_ogonek 0x1b2 +#define IBUS_KEY_lstroke 0x1b3 +#define IBUS_KEY_lcaron 0x1b5 +#define IBUS_KEY_sacute 0x1b6 +#define IBUS_KEY_caron 0x1b7 +#define IBUS_KEY_scaron 0x1b9 +#define IBUS_KEY_scedilla 0x1ba +#define IBUS_KEY_tcaron 0x1bb +#define IBUS_KEY_zacute 0x1bc +#define IBUS_KEY_doubleacute 0x1bd +#define IBUS_KEY_zcaron 0x1be +#define IBUS_KEY_zabovedot 0x1bf +#define IBUS_KEY_Racute 0x1c0 +#define IBUS_KEY_Abreve 0x1c3 +#define IBUS_KEY_Lacute 0x1c5 +#define IBUS_KEY_Cacute 0x1c6 +#define IBUS_KEY_Ccaron 0x1c8 +#define IBUS_KEY_Eogonek 0x1ca +#define IBUS_KEY_Ecaron 0x1cc +#define IBUS_KEY_Dcaron 0x1cf +#define IBUS_KEY_Dstroke 0x1d0 +#define IBUS_KEY_Nacute 0x1d1 +#define IBUS_KEY_Ncaron 0x1d2 +#define IBUS_KEY_Odoubleacute 0x1d5 +#define IBUS_KEY_Rcaron 0x1d8 +#define IBUS_KEY_Uring 0x1d9 +#define IBUS_KEY_Udoubleacute 0x1db +#define IBUS_KEY_Tcedilla 0x1de +#define IBUS_KEY_racute 0x1e0 +#define IBUS_KEY_abreve 0x1e3 +#define IBUS_KEY_lacute 0x1e5 +#define IBUS_KEY_cacute 0x1e6 +#define IBUS_KEY_ccaron 0x1e8 +#define IBUS_KEY_eogonek 0x1ea +#define IBUS_KEY_ecaron 0x1ec +#define IBUS_KEY_dcaron 0x1ef +#define IBUS_KEY_dstroke 0x1f0 +#define IBUS_KEY_nacute 0x1f1 +#define IBUS_KEY_ncaron 0x1f2 +#define IBUS_KEY_odoubleacute 0x1f5 +#define IBUS_KEY_rcaron 0x1f8 +#define IBUS_KEY_uring 0x1f9 +#define IBUS_KEY_udoubleacute 0x1fb +#define IBUS_KEY_tcedilla 0x1fe +#define IBUS_KEY_abovedot 0x1ff +#define IBUS_KEY_Hstroke 0x2a1 +#define IBUS_KEY_Hcircumflex 0x2a6 +#define IBUS_KEY_Iabovedot 0x2a9 +#define IBUS_KEY_Gbreve 0x2ab +#define IBUS_KEY_Jcircumflex 0x2ac +#define IBUS_KEY_hstroke 0x2b1 +#define IBUS_KEY_hcircumflex 0x2b6 +#define IBUS_KEY_idotless 0x2b9 +#define IBUS_KEY_gbreve 0x2bb +#define IBUS_KEY_jcircumflex 0x2bc +#define IBUS_KEY_Cabovedot 0x2c5 +#define IBUS_KEY_Ccircumflex 0x2c6 +#define IBUS_KEY_Gabovedot 0x2d5 +#define IBUS_KEY_Gcircumflex 0x2d8 +#define IBUS_KEY_Ubreve 0x2dd +#define IBUS_KEY_Scircumflex 0x2de +#define IBUS_KEY_cabovedot 0x2e5 +#define IBUS_KEY_ccircumflex 0x2e6 +#define IBUS_KEY_gabovedot 0x2f5 +#define IBUS_KEY_gcircumflex 0x2f8 +#define IBUS_KEY_ubreve 0x2fd +#define IBUS_KEY_scircumflex 0x2fe +#define IBUS_KEY_kra 0x3a2 +#define IBUS_KEY_kappa 0x3a2 +#define IBUS_KEY_Rcedilla 0x3a3 +#define IBUS_KEY_Itilde 0x3a5 +#define IBUS_KEY_Lcedilla 0x3a6 +#define IBUS_KEY_Emacron 0x3aa +#define IBUS_KEY_Gcedilla 0x3ab +#define IBUS_KEY_Tslash 0x3ac +#define IBUS_KEY_rcedilla 0x3b3 +#define IBUS_KEY_itilde 0x3b5 +#define IBUS_KEY_lcedilla 0x3b6 +#define IBUS_KEY_emacron 0x3ba +#define IBUS_KEY_gcedilla 0x3bb +#define IBUS_KEY_tslash 0x3bc +#define IBUS_KEY_ENG 0x3bd +#define IBUS_KEY_eng 0x3bf +#define IBUS_KEY_Amacron 0x3c0 +#define IBUS_KEY_Iogonek 0x3c7 +#define IBUS_KEY_Eabovedot 0x3cc +#define IBUS_KEY_Imacron 0x3cf +#define IBUS_KEY_Ncedilla 0x3d1 +#define IBUS_KEY_Omacron 0x3d2 +#define IBUS_KEY_Kcedilla 0x3d3 +#define IBUS_KEY_Uogonek 0x3d9 +#define IBUS_KEY_Utilde 0x3dd +#define IBUS_KEY_Umacron 0x3de +#define IBUS_KEY_amacron 0x3e0 +#define IBUS_KEY_iogonek 0x3e7 +#define IBUS_KEY_eabovedot 0x3ec +#define IBUS_KEY_imacron 0x3ef +#define IBUS_KEY_ncedilla 0x3f1 +#define IBUS_KEY_omacron 0x3f2 +#define IBUS_KEY_kcedilla 0x3f3 +#define IBUS_KEY_uogonek 0x3f9 +#define IBUS_KEY_utilde 0x3fd +#define IBUS_KEY_umacron 0x3fe +#define IBUS_KEY_Wcircumflex 0x1000174 +#define IBUS_KEY_wcircumflex 0x1000175 +#define IBUS_KEY_Ycircumflex 0x1000176 +#define IBUS_KEY_ycircumflex 0x1000177 +#define IBUS_KEY_Babovedot 0x1001e02 +#define IBUS_KEY_babovedot 0x1001e03 +#define IBUS_KEY_Dabovedot 0x1001e0a +#define IBUS_KEY_dabovedot 0x1001e0b +#define IBUS_KEY_Fabovedot 0x1001e1e +#define IBUS_KEY_fabovedot 0x1001e1f +#define IBUS_KEY_Mabovedot 0x1001e40 +#define IBUS_KEY_mabovedot 0x1001e41 +#define IBUS_KEY_Pabovedot 0x1001e56 +#define IBUS_KEY_pabovedot 0x1001e57 +#define IBUS_KEY_Sabovedot 0x1001e60 +#define IBUS_KEY_sabovedot 0x1001e61 +#define IBUS_KEY_Tabovedot 0x1001e6a +#define IBUS_KEY_tabovedot 0x1001e6b +#define IBUS_KEY_Wgrave 0x1001e80 +#define IBUS_KEY_wgrave 0x1001e81 +#define IBUS_KEY_Wacute 0x1001e82 +#define IBUS_KEY_wacute 0x1001e83 +#define IBUS_KEY_Wdiaeresis 0x1001e84 +#define IBUS_KEY_wdiaeresis 0x1001e85 +#define IBUS_KEY_Ygrave 0x1001ef2 +#define IBUS_KEY_ygrave 0x1001ef3 +#define IBUS_KEY_OE 0x13bc +#define IBUS_KEY_oe 0x13bd +#define IBUS_KEY_Ydiaeresis 0x13be +#define IBUS_KEY_overline 0x47e +#define IBUS_KEY_kana_fullstop 0x4a1 +#define IBUS_KEY_kana_openingbracket 0x4a2 +#define IBUS_KEY_kana_closingbracket 0x4a3 +#define IBUS_KEY_kana_comma 0x4a4 +#define IBUS_KEY_kana_conjunctive 0x4a5 +#define IBUS_KEY_kana_middledot 0x4a5 +#define IBUS_KEY_kana_WO 0x4a6 +#define IBUS_KEY_kana_a 0x4a7 +#define IBUS_KEY_kana_i 0x4a8 +#define IBUS_KEY_kana_u 0x4a9 +#define IBUS_KEY_kana_e 0x4aa +#define IBUS_KEY_kana_o 0x4ab +#define IBUS_KEY_kana_ya 0x4ac +#define IBUS_KEY_kana_yu 0x4ad +#define IBUS_KEY_kana_yo 0x4ae +#define IBUS_KEY_kana_tsu 0x4af +#define IBUS_KEY_kana_tu 0x4af +#define IBUS_KEY_prolongedsound 0x4b0 +#define IBUS_KEY_kana_A 0x4b1 +#define IBUS_KEY_kana_I 0x4b2 +#define IBUS_KEY_kana_U 0x4b3 +#define IBUS_KEY_kana_E 0x4b4 +#define IBUS_KEY_kana_O 0x4b5 +#define IBUS_KEY_kana_KA 0x4b6 +#define IBUS_KEY_kana_KI 0x4b7 +#define IBUS_KEY_kana_KU 0x4b8 +#define IBUS_KEY_kana_KE 0x4b9 +#define IBUS_KEY_kana_KO 0x4ba +#define IBUS_KEY_kana_SA 0x4bb +#define IBUS_KEY_kana_SHI 0x4bc +#define IBUS_KEY_kana_SU 0x4bd +#define IBUS_KEY_kana_SE 0x4be +#define IBUS_KEY_kana_SO 0x4bf +#define IBUS_KEY_kana_TA 0x4c0 +#define IBUS_KEY_kana_CHI 0x4c1 +#define IBUS_KEY_kana_TI 0x4c1 +#define IBUS_KEY_kana_TSU 0x4c2 +#define IBUS_KEY_kana_TU 0x4c2 +#define IBUS_KEY_kana_TE 0x4c3 +#define IBUS_KEY_kana_TO 0x4c4 +#define IBUS_KEY_kana_NA 0x4c5 +#define IBUS_KEY_kana_NI 0x4c6 +#define IBUS_KEY_kana_NU 0x4c7 +#define IBUS_KEY_kana_NE 0x4c8 +#define IBUS_KEY_kana_NO 0x4c9 +#define IBUS_KEY_kana_HA 0x4ca +#define IBUS_KEY_kana_HI 0x4cb +#define IBUS_KEY_kana_FU 0x4cc +#define IBUS_KEY_kana_HU 0x4cc +#define IBUS_KEY_kana_HE 0x4cd +#define IBUS_KEY_kana_HO 0x4ce +#define IBUS_KEY_kana_MA 0x4cf +#define IBUS_KEY_kana_MI 0x4d0 +#define IBUS_KEY_kana_MU 0x4d1 +#define IBUS_KEY_kana_ME 0x4d2 +#define IBUS_KEY_kana_MO 0x4d3 +#define IBUS_KEY_kana_YA 0x4d4 +#define IBUS_KEY_kana_YU 0x4d5 +#define IBUS_KEY_kana_YO 0x4d6 +#define IBUS_KEY_kana_RA 0x4d7 +#define IBUS_KEY_kana_RI 0x4d8 +#define IBUS_KEY_kana_RU 0x4d9 +#define IBUS_KEY_kana_RE 0x4da +#define IBUS_KEY_kana_RO 0x4db +#define IBUS_KEY_kana_WA 0x4dc +#define IBUS_KEY_kana_N 0x4dd +#define IBUS_KEY_voicedsound 0x4de +#define IBUS_KEY_semivoicedsound 0x4df +#define IBUS_KEY_kana_switch 0xff7e +#define IBUS_KEY_Farsi_0 0x10006f0 +#define IBUS_KEY_Farsi_1 0x10006f1 +#define IBUS_KEY_Farsi_2 0x10006f2 +#define IBUS_KEY_Farsi_3 0x10006f3 +#define IBUS_KEY_Farsi_4 0x10006f4 +#define IBUS_KEY_Farsi_5 0x10006f5 +#define IBUS_KEY_Farsi_6 0x10006f6 +#define IBUS_KEY_Farsi_7 0x10006f7 +#define IBUS_KEY_Farsi_8 0x10006f8 +#define IBUS_KEY_Farsi_9 0x10006f9 +#define IBUS_KEY_Arabic_percent 0x100066a +#define IBUS_KEY_Arabic_superscript_alef 0x1000670 +#define IBUS_KEY_Arabic_tteh 0x1000679 +#define IBUS_KEY_Arabic_peh 0x100067e +#define IBUS_KEY_Arabic_tcheh 0x1000686 +#define IBUS_KEY_Arabic_ddal 0x1000688 +#define IBUS_KEY_Arabic_rreh 0x1000691 +#define IBUS_KEY_Arabic_comma 0x5ac +#define IBUS_KEY_Arabic_fullstop 0x10006d4 +#define IBUS_KEY_Arabic_0 0x1000660 +#define IBUS_KEY_Arabic_1 0x1000661 +#define IBUS_KEY_Arabic_2 0x1000662 +#define IBUS_KEY_Arabic_3 0x1000663 +#define IBUS_KEY_Arabic_4 0x1000664 +#define IBUS_KEY_Arabic_5 0x1000665 +#define IBUS_KEY_Arabic_6 0x1000666 +#define IBUS_KEY_Arabic_7 0x1000667 +#define IBUS_KEY_Arabic_8 0x1000668 +#define IBUS_KEY_Arabic_9 0x1000669 +#define IBUS_KEY_Arabic_semicolon 0x5bb +#define IBUS_KEY_Arabic_question_mark 0x5bf +#define IBUS_KEY_Arabic_hamza 0x5c1 +#define IBUS_KEY_Arabic_maddaonalef 0x5c2 +#define IBUS_KEY_Arabic_hamzaonalef 0x5c3 +#define IBUS_KEY_Arabic_hamzaonwaw 0x5c4 +#define IBUS_KEY_Arabic_hamzaunderalef 0x5c5 +#define IBUS_KEY_Arabic_hamzaonyeh 0x5c6 +#define IBUS_KEY_Arabic_alef 0x5c7 +#define IBUS_KEY_Arabic_beh 0x5c8 +#define IBUS_KEY_Arabic_tehmarbuta 0x5c9 +#define IBUS_KEY_Arabic_teh 0x5ca +#define IBUS_KEY_Arabic_theh 0x5cb +#define IBUS_KEY_Arabic_jeem 0x5cc +#define IBUS_KEY_Arabic_hah 0x5cd +#define IBUS_KEY_Arabic_khah 0x5ce +#define IBUS_KEY_Arabic_dal 0x5cf +#define IBUS_KEY_Arabic_thal 0x5d0 +#define IBUS_KEY_Arabic_ra 0x5d1 +#define IBUS_KEY_Arabic_zain 0x5d2 +#define IBUS_KEY_Arabic_seen 0x5d3 +#define IBUS_KEY_Arabic_sheen 0x5d4 +#define IBUS_KEY_Arabic_sad 0x5d5 +#define IBUS_KEY_Arabic_dad 0x5d6 +#define IBUS_KEY_Arabic_tah 0x5d7 +#define IBUS_KEY_Arabic_zah 0x5d8 +#define IBUS_KEY_Arabic_ain 0x5d9 +#define IBUS_KEY_Arabic_ghain 0x5da +#define IBUS_KEY_Arabic_tatweel 0x5e0 +#define IBUS_KEY_Arabic_feh 0x5e1 +#define IBUS_KEY_Arabic_qaf 0x5e2 +#define IBUS_KEY_Arabic_kaf 0x5e3 +#define IBUS_KEY_Arabic_lam 0x5e4 +#define IBUS_KEY_Arabic_meem 0x5e5 +#define IBUS_KEY_Arabic_noon 0x5e6 +#define IBUS_KEY_Arabic_ha 0x5e7 +#define IBUS_KEY_Arabic_heh 0x5e7 +#define IBUS_KEY_Arabic_waw 0x5e8 +#define IBUS_KEY_Arabic_alefmaksura 0x5e9 +#define IBUS_KEY_Arabic_yeh 0x5ea +#define IBUS_KEY_Arabic_fathatan 0x5eb +#define IBUS_KEY_Arabic_dammatan 0x5ec +#define IBUS_KEY_Arabic_kasratan 0x5ed +#define IBUS_KEY_Arabic_fatha 0x5ee +#define IBUS_KEY_Arabic_damma 0x5ef +#define IBUS_KEY_Arabic_kasra 0x5f0 +#define IBUS_KEY_Arabic_shadda 0x5f1 +#define IBUS_KEY_Arabic_sukun 0x5f2 +#define IBUS_KEY_Arabic_madda_above 0x1000653 +#define IBUS_KEY_Arabic_hamza_above 0x1000654 +#define IBUS_KEY_Arabic_hamza_below 0x1000655 +#define IBUS_KEY_Arabic_jeh 0x1000698 +#define IBUS_KEY_Arabic_veh 0x10006a4 +#define IBUS_KEY_Arabic_keheh 0x10006a9 +#define IBUS_KEY_Arabic_gaf 0x10006af +#define IBUS_KEY_Arabic_noon_ghunna 0x10006ba +#define IBUS_KEY_Arabic_heh_doachashmee 0x10006be +#define IBUS_KEY_Farsi_yeh 0x10006cc +#define IBUS_KEY_Arabic_farsi_yeh 0x10006cc +#define IBUS_KEY_Arabic_yeh_baree 0x10006d2 +#define IBUS_KEY_Arabic_heh_goal 0x10006c1 +#define IBUS_KEY_Arabic_switch 0xff7e +#define IBUS_KEY_Cyrillic_GHE_bar 0x1000492 +#define IBUS_KEY_Cyrillic_ghe_bar 0x1000493 +#define IBUS_KEY_Cyrillic_ZHE_descender 0x1000496 +#define IBUS_KEY_Cyrillic_zhe_descender 0x1000497 +#define IBUS_KEY_Cyrillic_KA_descender 0x100049a +#define IBUS_KEY_Cyrillic_ka_descender 0x100049b +#define IBUS_KEY_Cyrillic_KA_vertstroke 0x100049c +#define IBUS_KEY_Cyrillic_ka_vertstroke 0x100049d +#define IBUS_KEY_Cyrillic_EN_descender 0x10004a2 +#define IBUS_KEY_Cyrillic_en_descender 0x10004a3 +#define IBUS_KEY_Cyrillic_U_straight 0x10004ae +#define IBUS_KEY_Cyrillic_u_straight 0x10004af +#define IBUS_KEY_Cyrillic_U_straight_bar 0x10004b0 +#define IBUS_KEY_Cyrillic_u_straight_bar 0x10004b1 +#define IBUS_KEY_Cyrillic_HA_descender 0x10004b2 +#define IBUS_KEY_Cyrillic_ha_descender 0x10004b3 +#define IBUS_KEY_Cyrillic_CHE_descender 0x10004b6 +#define IBUS_KEY_Cyrillic_che_descender 0x10004b7 +#define IBUS_KEY_Cyrillic_CHE_vertstroke 0x10004b8 +#define IBUS_KEY_Cyrillic_che_vertstroke 0x10004b9 +#define IBUS_KEY_Cyrillic_SHHA 0x10004ba +#define IBUS_KEY_Cyrillic_shha 0x10004bb +#define IBUS_KEY_Cyrillic_SCHWA 0x10004d8 +#define IBUS_KEY_Cyrillic_schwa 0x10004d9 +#define IBUS_KEY_Cyrillic_I_macron 0x10004e2 +#define IBUS_KEY_Cyrillic_i_macron 0x10004e3 +#define IBUS_KEY_Cyrillic_O_bar 0x10004e8 +#define IBUS_KEY_Cyrillic_o_bar 0x10004e9 +#define IBUS_KEY_Cyrillic_U_macron 0x10004ee +#define IBUS_KEY_Cyrillic_u_macron 0x10004ef +#define IBUS_KEY_Serbian_dje 0x6a1 +#define IBUS_KEY_Macedonia_gje 0x6a2 +#define IBUS_KEY_Cyrillic_io 0x6a3 +#define IBUS_KEY_Ukrainian_ie 0x6a4 +#define IBUS_KEY_Ukranian_je 0x6a4 +#define IBUS_KEY_Macedonia_dse 0x6a5 +#define IBUS_KEY_Ukrainian_i 0x6a6 +#define IBUS_KEY_Ukranian_i 0x6a6 +#define IBUS_KEY_Ukrainian_yi 0x6a7 +#define IBUS_KEY_Ukranian_yi 0x6a7 +#define IBUS_KEY_Cyrillic_je 0x6a8 +#define IBUS_KEY_Serbian_je 0x6a8 +#define IBUS_KEY_Cyrillic_lje 0x6a9 +#define IBUS_KEY_Serbian_lje 0x6a9 +#define IBUS_KEY_Cyrillic_nje 0x6aa +#define IBUS_KEY_Serbian_nje 0x6aa +#define IBUS_KEY_Serbian_tshe 0x6ab +#define IBUS_KEY_Macedonia_kje 0x6ac +#define IBUS_KEY_Ukrainian_ghe_with_upturn 0x6ad +#define IBUS_KEY_Byelorussian_shortu 0x6ae +#define IBUS_KEY_Cyrillic_dzhe 0x6af +#define IBUS_KEY_Serbian_dze 0x6af +#define IBUS_KEY_numerosign 0x6b0 +#define IBUS_KEY_Serbian_DJE 0x6b1 +#define IBUS_KEY_Macedonia_GJE 0x6b2 +#define IBUS_KEY_Cyrillic_IO 0x6b3 +#define IBUS_KEY_Ukrainian_IE 0x6b4 +#define IBUS_KEY_Ukranian_JE 0x6b4 +#define IBUS_KEY_Macedonia_DSE 0x6b5 +#define IBUS_KEY_Ukrainian_I 0x6b6 +#define IBUS_KEY_Ukranian_I 0x6b6 +#define IBUS_KEY_Ukrainian_YI 0x6b7 +#define IBUS_KEY_Ukranian_YI 0x6b7 +#define IBUS_KEY_Cyrillic_JE 0x6b8 +#define IBUS_KEY_Serbian_JE 0x6b8 +#define IBUS_KEY_Cyrillic_LJE 0x6b9 +#define IBUS_KEY_Serbian_LJE 0x6b9 +#define IBUS_KEY_Cyrillic_NJE 0x6ba +#define IBUS_KEY_Serbian_NJE 0x6ba +#define IBUS_KEY_Serbian_TSHE 0x6bb +#define IBUS_KEY_Macedonia_KJE 0x6bc +#define IBUS_KEY_Ukrainian_GHE_WITH_UPTURN 0x6bd +#define IBUS_KEY_Byelorussian_SHORTU 0x6be +#define IBUS_KEY_Cyrillic_DZHE 0x6bf +#define IBUS_KEY_Serbian_DZE 0x6bf +#define IBUS_KEY_Cyrillic_yu 0x6c0 +#define IBUS_KEY_Cyrillic_a 0x6c1 +#define IBUS_KEY_Cyrillic_be 0x6c2 +#define IBUS_KEY_Cyrillic_tse 0x6c3 +#define IBUS_KEY_Cyrillic_de 0x6c4 +#define IBUS_KEY_Cyrillic_ie 0x6c5 +#define IBUS_KEY_Cyrillic_ef 0x6c6 +#define IBUS_KEY_Cyrillic_ghe 0x6c7 +#define IBUS_KEY_Cyrillic_ha 0x6c8 +#define IBUS_KEY_Cyrillic_i 0x6c9 +#define IBUS_KEY_Cyrillic_shorti 0x6ca +#define IBUS_KEY_Cyrillic_ka 0x6cb +#define IBUS_KEY_Cyrillic_el 0x6cc +#define IBUS_KEY_Cyrillic_em 0x6cd +#define IBUS_KEY_Cyrillic_en 0x6ce +#define IBUS_KEY_Cyrillic_o 0x6cf +#define IBUS_KEY_Cyrillic_pe 0x6d0 +#define IBUS_KEY_Cyrillic_ya 0x6d1 +#define IBUS_KEY_Cyrillic_er 0x6d2 +#define IBUS_KEY_Cyrillic_es 0x6d3 +#define IBUS_KEY_Cyrillic_te 0x6d4 +#define IBUS_KEY_Cyrillic_u 0x6d5 +#define IBUS_KEY_Cyrillic_zhe 0x6d6 +#define IBUS_KEY_Cyrillic_ve 0x6d7 +#define IBUS_KEY_Cyrillic_softsign 0x6d8 +#define IBUS_KEY_Cyrillic_yeru 0x6d9 +#define IBUS_KEY_Cyrillic_ze 0x6da +#define IBUS_KEY_Cyrillic_sha 0x6db +#define IBUS_KEY_Cyrillic_e 0x6dc +#define IBUS_KEY_Cyrillic_shcha 0x6dd +#define IBUS_KEY_Cyrillic_che 0x6de +#define IBUS_KEY_Cyrillic_hardsign 0x6df +#define IBUS_KEY_Cyrillic_YU 0x6e0 +#define IBUS_KEY_Cyrillic_A 0x6e1 +#define IBUS_KEY_Cyrillic_BE 0x6e2 +#define IBUS_KEY_Cyrillic_TSE 0x6e3 +#define IBUS_KEY_Cyrillic_DE 0x6e4 +#define IBUS_KEY_Cyrillic_IE 0x6e5 +#define IBUS_KEY_Cyrillic_EF 0x6e6 +#define IBUS_KEY_Cyrillic_GHE 0x6e7 +#define IBUS_KEY_Cyrillic_HA 0x6e8 +#define IBUS_KEY_Cyrillic_I 0x6e9 +#define IBUS_KEY_Cyrillic_SHORTI 0x6ea +#define IBUS_KEY_Cyrillic_KA 0x6eb +#define IBUS_KEY_Cyrillic_EL 0x6ec +#define IBUS_KEY_Cyrillic_EM 0x6ed +#define IBUS_KEY_Cyrillic_EN 0x6ee +#define IBUS_KEY_Cyrillic_O 0x6ef +#define IBUS_KEY_Cyrillic_PE 0x6f0 +#define IBUS_KEY_Cyrillic_YA 0x6f1 +#define IBUS_KEY_Cyrillic_ER 0x6f2 +#define IBUS_KEY_Cyrillic_ES 0x6f3 +#define IBUS_KEY_Cyrillic_TE 0x6f4 +#define IBUS_KEY_Cyrillic_U 0x6f5 +#define IBUS_KEY_Cyrillic_ZHE 0x6f6 +#define IBUS_KEY_Cyrillic_VE 0x6f7 +#define IBUS_KEY_Cyrillic_SOFTSIGN 0x6f8 +#define IBUS_KEY_Cyrillic_YERU 0x6f9 +#define IBUS_KEY_Cyrillic_ZE 0x6fa +#define IBUS_KEY_Cyrillic_SHA 0x6fb +#define IBUS_KEY_Cyrillic_E 0x6fc +#define IBUS_KEY_Cyrillic_SHCHA 0x6fd +#define IBUS_KEY_Cyrillic_CHE 0x6fe +#define IBUS_KEY_Cyrillic_HARDSIGN 0x6ff +#define IBUS_KEY_Greek_ALPHAaccent 0x7a1 +#define IBUS_KEY_Greek_EPSILONaccent 0x7a2 +#define IBUS_KEY_Greek_ETAaccent 0x7a3 +#define IBUS_KEY_Greek_IOTAaccent 0x7a4 +#define IBUS_KEY_Greek_IOTAdieresis 0x7a5 +#define IBUS_KEY_Greek_IOTAdiaeresis 0x7a5 +#define IBUS_KEY_Greek_OMICRONaccent 0x7a7 +#define IBUS_KEY_Greek_UPSILONaccent 0x7a8 +#define IBUS_KEY_Greek_UPSILONdieresis 0x7a9 +#define IBUS_KEY_Greek_OMEGAaccent 0x7ab +#define IBUS_KEY_Greek_accentdieresis 0x7ae +#define IBUS_KEY_Greek_horizbar 0x7af +#define IBUS_KEY_Greek_alphaaccent 0x7b1 +#define IBUS_KEY_Greek_epsilonaccent 0x7b2 +#define IBUS_KEY_Greek_etaaccent 0x7b3 +#define IBUS_KEY_Greek_iotaaccent 0x7b4 +#define IBUS_KEY_Greek_iotadieresis 0x7b5 +#define IBUS_KEY_Greek_iotaaccentdieresis 0x7b6 +#define IBUS_KEY_Greek_omicronaccent 0x7b7 +#define IBUS_KEY_Greek_upsilonaccent 0x7b8 +#define IBUS_KEY_Greek_upsilondieresis 0x7b9 +#define IBUS_KEY_Greek_upsilonaccentdieresis 0x7ba +#define IBUS_KEY_Greek_omegaaccent 0x7bb +#define IBUS_KEY_Greek_ALPHA 0x7c1 +#define IBUS_KEY_Greek_BETA 0x7c2 +#define IBUS_KEY_Greek_GAMMA 0x7c3 +#define IBUS_KEY_Greek_DELTA 0x7c4 +#define IBUS_KEY_Greek_EPSILON 0x7c5 +#define IBUS_KEY_Greek_ZETA 0x7c6 +#define IBUS_KEY_Greek_ETA 0x7c7 +#define IBUS_KEY_Greek_THETA 0x7c8 +#define IBUS_KEY_Greek_IOTA 0x7c9 +#define IBUS_KEY_Greek_KAPPA 0x7ca +#define IBUS_KEY_Greek_LAMDA 0x7cb +#define IBUS_KEY_Greek_LAMBDA 0x7cb +#define IBUS_KEY_Greek_MU 0x7cc +#define IBUS_KEY_Greek_NU 0x7cd +#define IBUS_KEY_Greek_XI 0x7ce +#define IBUS_KEY_Greek_OMICRON 0x7cf +#define IBUS_KEY_Greek_PI 0x7d0 +#define IBUS_KEY_Greek_RHO 0x7d1 +#define IBUS_KEY_Greek_SIGMA 0x7d2 +#define IBUS_KEY_Greek_TAU 0x7d4 +#define IBUS_KEY_Greek_UPSILON 0x7d5 +#define IBUS_KEY_Greek_PHI 0x7d6 +#define IBUS_KEY_Greek_CHI 0x7d7 +#define IBUS_KEY_Greek_PSI 0x7d8 +#define IBUS_KEY_Greek_OMEGA 0x7d9 +#define IBUS_KEY_Greek_alpha 0x7e1 +#define IBUS_KEY_Greek_beta 0x7e2 +#define IBUS_KEY_Greek_gamma 0x7e3 +#define IBUS_KEY_Greek_delta 0x7e4 +#define IBUS_KEY_Greek_epsilon 0x7e5 +#define IBUS_KEY_Greek_zeta 0x7e6 +#define IBUS_KEY_Greek_eta 0x7e7 +#define IBUS_KEY_Greek_theta 0x7e8 +#define IBUS_KEY_Greek_iota 0x7e9 +#define IBUS_KEY_Greek_kappa 0x7ea +#define IBUS_KEY_Greek_lamda 0x7eb +#define IBUS_KEY_Greek_lambda 0x7eb +#define IBUS_KEY_Greek_mu 0x7ec +#define IBUS_KEY_Greek_nu 0x7ed +#define IBUS_KEY_Greek_xi 0x7ee +#define IBUS_KEY_Greek_omicron 0x7ef +#define IBUS_KEY_Greek_pi 0x7f0 +#define IBUS_KEY_Greek_rho 0x7f1 +#define IBUS_KEY_Greek_sigma 0x7f2 +#define IBUS_KEY_Greek_finalsmallsigma 0x7f3 +#define IBUS_KEY_Greek_tau 0x7f4 +#define IBUS_KEY_Greek_upsilon 0x7f5 +#define IBUS_KEY_Greek_phi 0x7f6 +#define IBUS_KEY_Greek_chi 0x7f7 +#define IBUS_KEY_Greek_psi 0x7f8 +#define IBUS_KEY_Greek_omega 0x7f9 +#define IBUS_KEY_Greek_switch 0xff7e +#define IBUS_KEY_leftradical 0x8a1 +#define IBUS_KEY_topleftradical 0x8a2 +#define IBUS_KEY_horizconnector 0x8a3 +#define IBUS_KEY_topintegral 0x8a4 +#define IBUS_KEY_botintegral 0x8a5 +#define IBUS_KEY_vertconnector 0x8a6 +#define IBUS_KEY_topleftsqbracket 0x8a7 +#define IBUS_KEY_botleftsqbracket 0x8a8 +#define IBUS_KEY_toprightsqbracket 0x8a9 +#define IBUS_KEY_botrightsqbracket 0x8aa +#define IBUS_KEY_topleftparens 0x8ab +#define IBUS_KEY_botleftparens 0x8ac +#define IBUS_KEY_toprightparens 0x8ad +#define IBUS_KEY_botrightparens 0x8ae +#define IBUS_KEY_leftmiddlecurlybrace 0x8af +#define IBUS_KEY_rightmiddlecurlybrace 0x8b0 +#define IBUS_KEY_topleftsummation 0x8b1 +#define IBUS_KEY_botleftsummation 0x8b2 +#define IBUS_KEY_topvertsummationconnector 0x8b3 +#define IBUS_KEY_botvertsummationconnector 0x8b4 +#define IBUS_KEY_toprightsummation 0x8b5 +#define IBUS_KEY_botrightsummation 0x8b6 +#define IBUS_KEY_rightmiddlesummation 0x8b7 +#define IBUS_KEY_lessthanequal 0x8bc +#define IBUS_KEY_notequal 0x8bd +#define IBUS_KEY_greaterthanequal 0x8be +#define IBUS_KEY_integral 0x8bf +#define IBUS_KEY_therefore 0x8c0 +#define IBUS_KEY_variation 0x8c1 +#define IBUS_KEY_infinity 0x8c2 +#define IBUS_KEY_nabla 0x8c5 +#define IBUS_KEY_approximate 0x8c8 +#define IBUS_KEY_similarequal 0x8c9 +#define IBUS_KEY_ifonlyif 0x8cd +#define IBUS_KEY_implies 0x8ce +#define IBUS_KEY_identical 0x8cf +#define IBUS_KEY_radical 0x8d6 +#define IBUS_KEY_includedin 0x8da +#define IBUS_KEY_includes 0x8db +#define IBUS_KEY_intersection 0x8dc +#define IBUS_KEY_union 0x8dd +#define IBUS_KEY_logicaland 0x8de +#define IBUS_KEY_logicalor 0x8df +#define IBUS_KEY_partialderivative 0x8ef +#define IBUS_KEY_function 0x8f6 +#define IBUS_KEY_leftarrow 0x8fb +#define IBUS_KEY_uparrow 0x8fc +#define IBUS_KEY_rightarrow 0x8fd +#define IBUS_KEY_downarrow 0x8fe +#define IBUS_KEY_blank 0x9df +#define IBUS_KEY_soliddiamond 0x9e0 +#define IBUS_KEY_checkerboard 0x9e1 +#define IBUS_KEY_ht 0x9e2 +#define IBUS_KEY_ff 0x9e3 +#define IBUS_KEY_cr 0x9e4 +#define IBUS_KEY_lf 0x9e5 +#define IBUS_KEY_nl 0x9e8 +#define IBUS_KEY_vt 0x9e9 +#define IBUS_KEY_lowrightcorner 0x9ea +#define IBUS_KEY_uprightcorner 0x9eb +#define IBUS_KEY_upleftcorner 0x9ec +#define IBUS_KEY_lowleftcorner 0x9ed +#define IBUS_KEY_crossinglines 0x9ee +#define IBUS_KEY_horizlinescan1 0x9ef +#define IBUS_KEY_horizlinescan3 0x9f0 +#define IBUS_KEY_horizlinescan5 0x9f1 +#define IBUS_KEY_horizlinescan7 0x9f2 +#define IBUS_KEY_horizlinescan9 0x9f3 +#define IBUS_KEY_leftt 0x9f4 +#define IBUS_KEY_rightt 0x9f5 +#define IBUS_KEY_bott 0x9f6 +#define IBUS_KEY_topt 0x9f7 +#define IBUS_KEY_vertbar 0x9f8 +#define IBUS_KEY_emspace 0xaa1 +#define IBUS_KEY_enspace 0xaa2 +#define IBUS_KEY_em3space 0xaa3 +#define IBUS_KEY_em4space 0xaa4 +#define IBUS_KEY_digitspace 0xaa5 +#define IBUS_KEY_punctspace 0xaa6 +#define IBUS_KEY_thinspace 0xaa7 +#define IBUS_KEY_hairspace 0xaa8 +#define IBUS_KEY_emdash 0xaa9 +#define IBUS_KEY_endash 0xaaa +#define IBUS_KEY_signifblank 0xaac +#define IBUS_KEY_ellipsis 0xaae +#define IBUS_KEY_doubbaselinedot 0xaaf +#define IBUS_KEY_onethird 0xab0 +#define IBUS_KEY_twothirds 0xab1 +#define IBUS_KEY_onefifth 0xab2 +#define IBUS_KEY_twofifths 0xab3 +#define IBUS_KEY_threefifths 0xab4 +#define IBUS_KEY_fourfifths 0xab5 +#define IBUS_KEY_onesixth 0xab6 +#define IBUS_KEY_fivesixths 0xab7 +#define IBUS_KEY_careof 0xab8 +#define IBUS_KEY_figdash 0xabb +#define IBUS_KEY_leftanglebracket 0xabc +#define IBUS_KEY_decimalpoint 0xabd +#define IBUS_KEY_rightanglebracket 0xabe +#define IBUS_KEY_marker 0xabf +#define IBUS_KEY_oneeighth 0xac3 +#define IBUS_KEY_threeeighths 0xac4 +#define IBUS_KEY_fiveeighths 0xac5 +#define IBUS_KEY_seveneighths 0xac6 +#define IBUS_KEY_trademark 0xac9 +#define IBUS_KEY_signaturemark 0xaca +#define IBUS_KEY_trademarkincircle 0xacb +#define IBUS_KEY_leftopentriangle 0xacc +#define IBUS_KEY_rightopentriangle 0xacd +#define IBUS_KEY_emopencircle 0xace +#define IBUS_KEY_emopenrectangle 0xacf +#define IBUS_KEY_leftsinglequotemark 0xad0 +#define IBUS_KEY_rightsinglequotemark 0xad1 +#define IBUS_KEY_leftdoublequotemark 0xad2 +#define IBUS_KEY_rightdoublequotemark 0xad3 +#define IBUS_KEY_prescription 0xad4 +#define IBUS_KEY_minutes 0xad6 +#define IBUS_KEY_seconds 0xad7 +#define IBUS_KEY_latincross 0xad9 +#define IBUS_KEY_hexagram 0xada +#define IBUS_KEY_filledrectbullet 0xadb +#define IBUS_KEY_filledlefttribullet 0xadc +#define IBUS_KEY_filledrighttribullet 0xadd +#define IBUS_KEY_emfilledcircle 0xade +#define IBUS_KEY_emfilledrect 0xadf +#define IBUS_KEY_enopencircbullet 0xae0 +#define IBUS_KEY_enopensquarebullet 0xae1 +#define IBUS_KEY_openrectbullet 0xae2 +#define IBUS_KEY_opentribulletup 0xae3 +#define IBUS_KEY_opentribulletdown 0xae4 +#define IBUS_KEY_openstar 0xae5 +#define IBUS_KEY_enfilledcircbullet 0xae6 +#define IBUS_KEY_enfilledsqbullet 0xae7 +#define IBUS_KEY_filledtribulletup 0xae8 +#define IBUS_KEY_filledtribulletdown 0xae9 +#define IBUS_KEY_leftpointer 0xaea +#define IBUS_KEY_rightpointer 0xaeb +#define IBUS_KEY_club 0xaec +#define IBUS_KEY_diamond 0xaed +#define IBUS_KEY_heart 0xaee +#define IBUS_KEY_maltesecross 0xaf0 +#define IBUS_KEY_dagger 0xaf1 +#define IBUS_KEY_doubledagger 0xaf2 +#define IBUS_KEY_checkmark 0xaf3 +#define IBUS_KEY_ballotcross 0xaf4 +#define IBUS_KEY_musicalsharp 0xaf5 +#define IBUS_KEY_musicalflat 0xaf6 +#define IBUS_KEY_malesymbol 0xaf7 +#define IBUS_KEY_femalesymbol 0xaf8 +#define IBUS_KEY_telephone 0xaf9 +#define IBUS_KEY_telephonerecorder 0xafa +#define IBUS_KEY_phonographcopyright 0xafb +#define IBUS_KEY_caret 0xafc +#define IBUS_KEY_singlelowquotemark 0xafd +#define IBUS_KEY_doublelowquotemark 0xafe +#define IBUS_KEY_cursor 0xaff +#define IBUS_KEY_leftcaret 0xba3 +#define IBUS_KEY_rightcaret 0xba6 +#define IBUS_KEY_downcaret 0xba8 +#define IBUS_KEY_upcaret 0xba9 +#define IBUS_KEY_overbar 0xbc0 +#define IBUS_KEY_downtack 0xbc2 +#define IBUS_KEY_upshoe 0xbc3 +#define IBUS_KEY_downstile 0xbc4 +#define IBUS_KEY_underbar 0xbc6 +#define IBUS_KEY_jot 0xbca +#define IBUS_KEY_quad 0xbcc +#define IBUS_KEY_uptack 0xbce +#define IBUS_KEY_circle 0xbcf +#define IBUS_KEY_upstile 0xbd3 +#define IBUS_KEY_downshoe 0xbd6 +#define IBUS_KEY_rightshoe 0xbd8 +#define IBUS_KEY_leftshoe 0xbda +#define IBUS_KEY_lefttack 0xbdc +#define IBUS_KEY_righttack 0xbfc +#define IBUS_KEY_hebrew_doublelowline 0xcdf +#define IBUS_KEY_hebrew_aleph 0xce0 +#define IBUS_KEY_hebrew_bet 0xce1 +#define IBUS_KEY_hebrew_beth 0xce1 +#define IBUS_KEY_hebrew_gimel 0xce2 +#define IBUS_KEY_hebrew_gimmel 0xce2 +#define IBUS_KEY_hebrew_dalet 0xce3 +#define IBUS_KEY_hebrew_daleth 0xce3 +#define IBUS_KEY_hebrew_he 0xce4 +#define IBUS_KEY_hebrew_waw 0xce5 +#define IBUS_KEY_hebrew_zain 0xce6 +#define IBUS_KEY_hebrew_zayin 0xce6 +#define IBUS_KEY_hebrew_chet 0xce7 +#define IBUS_KEY_hebrew_het 0xce7 +#define IBUS_KEY_hebrew_tet 0xce8 +#define IBUS_KEY_hebrew_teth 0xce8 +#define IBUS_KEY_hebrew_yod 0xce9 +#define IBUS_KEY_hebrew_finalkaph 0xcea +#define IBUS_KEY_hebrew_kaph 0xceb +#define IBUS_KEY_hebrew_lamed 0xcec +#define IBUS_KEY_hebrew_finalmem 0xced +#define IBUS_KEY_hebrew_mem 0xcee +#define IBUS_KEY_hebrew_finalnun 0xcef +#define IBUS_KEY_hebrew_nun 0xcf0 +#define IBUS_KEY_hebrew_samech 0xcf1 +#define IBUS_KEY_hebrew_samekh 0xcf1 +#define IBUS_KEY_hebrew_ayin 0xcf2 +#define IBUS_KEY_hebrew_finalpe 0xcf3 +#define IBUS_KEY_hebrew_pe 0xcf4 +#define IBUS_KEY_hebrew_finalzade 0xcf5 +#define IBUS_KEY_hebrew_finalzadi 0xcf5 +#define IBUS_KEY_hebrew_zade 0xcf6 +#define IBUS_KEY_hebrew_zadi 0xcf6 +#define IBUS_KEY_hebrew_qoph 0xcf7 +#define IBUS_KEY_hebrew_kuf 0xcf7 +#define IBUS_KEY_hebrew_resh 0xcf8 +#define IBUS_KEY_hebrew_shin 0xcf9 +#define IBUS_KEY_hebrew_taw 0xcfa +#define IBUS_KEY_hebrew_taf 0xcfa +#define IBUS_KEY_Hebrew_switch 0xff7e +#define IBUS_KEY_Thai_kokai 0xda1 +#define IBUS_KEY_Thai_khokhai 0xda2 +#define IBUS_KEY_Thai_khokhuat 0xda3 +#define IBUS_KEY_Thai_khokhwai 0xda4 +#define IBUS_KEY_Thai_khokhon 0xda5 +#define IBUS_KEY_Thai_khorakhang 0xda6 +#define IBUS_KEY_Thai_ngongu 0xda7 +#define IBUS_KEY_Thai_chochan 0xda8 +#define IBUS_KEY_Thai_choching 0xda9 +#define IBUS_KEY_Thai_chochang 0xdaa +#define IBUS_KEY_Thai_soso 0xdab +#define IBUS_KEY_Thai_chochoe 0xdac +#define IBUS_KEY_Thai_yoying 0xdad +#define IBUS_KEY_Thai_dochada 0xdae +#define IBUS_KEY_Thai_topatak 0xdaf +#define IBUS_KEY_Thai_thothan 0xdb0 +#define IBUS_KEY_Thai_thonangmontho 0xdb1 +#define IBUS_KEY_Thai_thophuthao 0xdb2 +#define IBUS_KEY_Thai_nonen 0xdb3 +#define IBUS_KEY_Thai_dodek 0xdb4 +#define IBUS_KEY_Thai_totao 0xdb5 +#define IBUS_KEY_Thai_thothung 0xdb6 +#define IBUS_KEY_Thai_thothahan 0xdb7 +#define IBUS_KEY_Thai_thothong 0xdb8 +#define IBUS_KEY_Thai_nonu 0xdb9 +#define IBUS_KEY_Thai_bobaimai 0xdba +#define IBUS_KEY_Thai_popla 0xdbb +#define IBUS_KEY_Thai_phophung 0xdbc +#define IBUS_KEY_Thai_fofa 0xdbd +#define IBUS_KEY_Thai_phophan 0xdbe +#define IBUS_KEY_Thai_fofan 0xdbf +#define IBUS_KEY_Thai_phosamphao 0xdc0 +#define IBUS_KEY_Thai_moma 0xdc1 +#define IBUS_KEY_Thai_yoyak 0xdc2 +#define IBUS_KEY_Thai_rorua 0xdc3 +#define IBUS_KEY_Thai_ru 0xdc4 +#define IBUS_KEY_Thai_loling 0xdc5 +#define IBUS_KEY_Thai_lu 0xdc6 +#define IBUS_KEY_Thai_wowaen 0xdc7 +#define IBUS_KEY_Thai_sosala 0xdc8 +#define IBUS_KEY_Thai_sorusi 0xdc9 +#define IBUS_KEY_Thai_sosua 0xdca +#define IBUS_KEY_Thai_hohip 0xdcb +#define IBUS_KEY_Thai_lochula 0xdcc +#define IBUS_KEY_Thai_oang 0xdcd +#define IBUS_KEY_Thai_honokhuk 0xdce +#define IBUS_KEY_Thai_paiyannoi 0xdcf +#define IBUS_KEY_Thai_saraa 0xdd0 +#define IBUS_KEY_Thai_maihanakat 0xdd1 +#define IBUS_KEY_Thai_saraaa 0xdd2 +#define IBUS_KEY_Thai_saraam 0xdd3 +#define IBUS_KEY_Thai_sarai 0xdd4 +#define IBUS_KEY_Thai_saraii 0xdd5 +#define IBUS_KEY_Thai_saraue 0xdd6 +#define IBUS_KEY_Thai_sarauee 0xdd7 +#define IBUS_KEY_Thai_sarau 0xdd8 +#define IBUS_KEY_Thai_sarauu 0xdd9 +#define IBUS_KEY_Thai_phinthu 0xdda +#define IBUS_KEY_Thai_maihanakat_maitho 0xdde +#define IBUS_KEY_Thai_baht 0xddf +#define IBUS_KEY_Thai_sarae 0xde0 +#define IBUS_KEY_Thai_saraae 0xde1 +#define IBUS_KEY_Thai_sarao 0xde2 +#define IBUS_KEY_Thai_saraaimaimuan 0xde3 +#define IBUS_KEY_Thai_saraaimaimalai 0xde4 +#define IBUS_KEY_Thai_lakkhangyao 0xde5 +#define IBUS_KEY_Thai_maiyamok 0xde6 +#define IBUS_KEY_Thai_maitaikhu 0xde7 +#define IBUS_KEY_Thai_maiek 0xde8 +#define IBUS_KEY_Thai_maitho 0xde9 +#define IBUS_KEY_Thai_maitri 0xdea +#define IBUS_KEY_Thai_maichattawa 0xdeb +#define IBUS_KEY_Thai_thanthakhat 0xdec +#define IBUS_KEY_Thai_nikhahit 0xded +#define IBUS_KEY_Thai_leksun 0xdf0 +#define IBUS_KEY_Thai_leknung 0xdf1 +#define IBUS_KEY_Thai_leksong 0xdf2 +#define IBUS_KEY_Thai_leksam 0xdf3 +#define IBUS_KEY_Thai_leksi 0xdf4 +#define IBUS_KEY_Thai_lekha 0xdf5 +#define IBUS_KEY_Thai_lekhok 0xdf6 +#define IBUS_KEY_Thai_lekchet 0xdf7 +#define IBUS_KEY_Thai_lekpaet 0xdf8 +#define IBUS_KEY_Thai_lekkao 0xdf9 +#define IBUS_KEY_Hangul 0xff31 +#define IBUS_KEY_Hangul_Start 0xff32 +#define IBUS_KEY_Hangul_End 0xff33 +#define IBUS_KEY_Hangul_Hanja 0xff34 +#define IBUS_KEY_Hangul_Jamo 0xff35 +#define IBUS_KEY_Hangul_Romaja 0xff36 +#define IBUS_KEY_Hangul_Codeinput 0xff37 +#define IBUS_KEY_Hangul_Jeonja 0xff38 +#define IBUS_KEY_Hangul_Banja 0xff39 +#define IBUS_KEY_Hangul_PreHanja 0xff3a +#define IBUS_KEY_Hangul_PostHanja 0xff3b +#define IBUS_KEY_Hangul_SingleCandidate 0xff3c +#define IBUS_KEY_Hangul_MultipleCandidate 0xff3d +#define IBUS_KEY_Hangul_PreviousCandidate 0xff3e +#define IBUS_KEY_Hangul_Special 0xff3f +#define IBUS_KEY_Hangul_switch 0xff7e +#define IBUS_KEY_Hangul_Kiyeog 0xea1 +#define IBUS_KEY_Hangul_SsangKiyeog 0xea2 +#define IBUS_KEY_Hangul_KiyeogSios 0xea3 +#define IBUS_KEY_Hangul_Nieun 0xea4 +#define IBUS_KEY_Hangul_NieunJieuj 0xea5 +#define IBUS_KEY_Hangul_NieunHieuh 0xea6 +#define IBUS_KEY_Hangul_Dikeud 0xea7 +#define IBUS_KEY_Hangul_SsangDikeud 0xea8 +#define IBUS_KEY_Hangul_Rieul 0xea9 +#define IBUS_KEY_Hangul_RieulKiyeog 0xeaa +#define IBUS_KEY_Hangul_RieulMieum 0xeab +#define IBUS_KEY_Hangul_RieulPieub 0xeac +#define IBUS_KEY_Hangul_RieulSios 0xead +#define IBUS_KEY_Hangul_RieulTieut 0xeae +#define IBUS_KEY_Hangul_RieulPhieuf 0xeaf +#define IBUS_KEY_Hangul_RieulHieuh 0xeb0 +#define IBUS_KEY_Hangul_Mieum 0xeb1 +#define IBUS_KEY_Hangul_Pieub 0xeb2 +#define IBUS_KEY_Hangul_SsangPieub 0xeb3 +#define IBUS_KEY_Hangul_PieubSios 0xeb4 +#define IBUS_KEY_Hangul_Sios 0xeb5 +#define IBUS_KEY_Hangul_SsangSios 0xeb6 +#define IBUS_KEY_Hangul_Ieung 0xeb7 +#define IBUS_KEY_Hangul_Jieuj 0xeb8 +#define IBUS_KEY_Hangul_SsangJieuj 0xeb9 +#define IBUS_KEY_Hangul_Cieuc 0xeba +#define IBUS_KEY_Hangul_Khieuq 0xebb +#define IBUS_KEY_Hangul_Tieut 0xebc +#define IBUS_KEY_Hangul_Phieuf 0xebd +#define IBUS_KEY_Hangul_Hieuh 0xebe +#define IBUS_KEY_Hangul_A 0xebf +#define IBUS_KEY_Hangul_AE 0xec0 +#define IBUS_KEY_Hangul_YA 0xec1 +#define IBUS_KEY_Hangul_YAE 0xec2 +#define IBUS_KEY_Hangul_EO 0xec3 +#define IBUS_KEY_Hangul_E 0xec4 +#define IBUS_KEY_Hangul_YEO 0xec5 +#define IBUS_KEY_Hangul_YE 0xec6 +#define IBUS_KEY_Hangul_O 0xec7 +#define IBUS_KEY_Hangul_WA 0xec8 +#define IBUS_KEY_Hangul_WAE 0xec9 +#define IBUS_KEY_Hangul_OE 0xeca +#define IBUS_KEY_Hangul_YO 0xecb +#define IBUS_KEY_Hangul_U 0xecc +#define IBUS_KEY_Hangul_WEO 0xecd +#define IBUS_KEY_Hangul_WE 0xece +#define IBUS_KEY_Hangul_WI 0xecf +#define IBUS_KEY_Hangul_YU 0xed0 +#define IBUS_KEY_Hangul_EU 0xed1 +#define IBUS_KEY_Hangul_YI 0xed2 +#define IBUS_KEY_Hangul_I 0xed3 +#define IBUS_KEY_Hangul_J_Kiyeog 0xed4 +#define IBUS_KEY_Hangul_J_SsangKiyeog 0xed5 +#define IBUS_KEY_Hangul_J_KiyeogSios 0xed6 +#define IBUS_KEY_Hangul_J_Nieun 0xed7 +#define IBUS_KEY_Hangul_J_NieunJieuj 0xed8 +#define IBUS_KEY_Hangul_J_NieunHieuh 0xed9 +#define IBUS_KEY_Hangul_J_Dikeud 0xeda +#define IBUS_KEY_Hangul_J_Rieul 0xedb +#define IBUS_KEY_Hangul_J_RieulKiyeog 0xedc +#define IBUS_KEY_Hangul_J_RieulMieum 0xedd +#define IBUS_KEY_Hangul_J_RieulPieub 0xede +#define IBUS_KEY_Hangul_J_RieulSios 0xedf +#define IBUS_KEY_Hangul_J_RieulTieut 0xee0 +#define IBUS_KEY_Hangul_J_RieulPhieuf 0xee1 +#define IBUS_KEY_Hangul_J_RieulHieuh 0xee2 +#define IBUS_KEY_Hangul_J_Mieum 0xee3 +#define IBUS_KEY_Hangul_J_Pieub 0xee4 +#define IBUS_KEY_Hangul_J_PieubSios 0xee5 +#define IBUS_KEY_Hangul_J_Sios 0xee6 +#define IBUS_KEY_Hangul_J_SsangSios 0xee7 +#define IBUS_KEY_Hangul_J_Ieung 0xee8 +#define IBUS_KEY_Hangul_J_Jieuj 0xee9 +#define IBUS_KEY_Hangul_J_Cieuc 0xeea +#define IBUS_KEY_Hangul_J_Khieuq 0xeeb +#define IBUS_KEY_Hangul_J_Tieut 0xeec +#define IBUS_KEY_Hangul_J_Phieuf 0xeed +#define IBUS_KEY_Hangul_J_Hieuh 0xeee +#define IBUS_KEY_Hangul_RieulYeorinHieuh 0xeef +#define IBUS_KEY_Hangul_SunkyeongeumMieum 0xef0 +#define IBUS_KEY_Hangul_SunkyeongeumPieub 0xef1 +#define IBUS_KEY_Hangul_PanSios 0xef2 +#define IBUS_KEY_Hangul_KkogjiDalrinIeung 0xef3 +#define IBUS_KEY_Hangul_SunkyeongeumPhieuf 0xef4 +#define IBUS_KEY_Hangul_YeorinHieuh 0xef5 +#define IBUS_KEY_Hangul_AraeA 0xef6 +#define IBUS_KEY_Hangul_AraeAE 0xef7 +#define IBUS_KEY_Hangul_J_PanSios 0xef8 +#define IBUS_KEY_Hangul_J_KkogjiDalrinIeung 0xef9 +#define IBUS_KEY_Hangul_J_YeorinHieuh 0xefa +#define IBUS_KEY_Korean_Won 0xeff +#define IBUS_KEY_Armenian_ligature_ew 0x1000587 +#define IBUS_KEY_Armenian_full_stop 0x1000589 +#define IBUS_KEY_Armenian_verjaket 0x1000589 +#define IBUS_KEY_Armenian_separation_mark 0x100055d +#define IBUS_KEY_Armenian_but 0x100055d +#define IBUS_KEY_Armenian_hyphen 0x100058a +#define IBUS_KEY_Armenian_yentamna 0x100058a +#define IBUS_KEY_Armenian_exclam 0x100055c +#define IBUS_KEY_Armenian_amanak 0x100055c +#define IBUS_KEY_Armenian_accent 0x100055b +#define IBUS_KEY_Armenian_shesht 0x100055b +#define IBUS_KEY_Armenian_question 0x100055e +#define IBUS_KEY_Armenian_paruyk 0x100055e +#define IBUS_KEY_Armenian_AYB 0x1000531 +#define IBUS_KEY_Armenian_ayb 0x1000561 +#define IBUS_KEY_Armenian_BEN 0x1000532 +#define IBUS_KEY_Armenian_ben 0x1000562 +#define IBUS_KEY_Armenian_GIM 0x1000533 +#define IBUS_KEY_Armenian_gim 0x1000563 +#define IBUS_KEY_Armenian_DA 0x1000534 +#define IBUS_KEY_Armenian_da 0x1000564 +#define IBUS_KEY_Armenian_YECH 0x1000535 +#define IBUS_KEY_Armenian_yech 0x1000565 +#define IBUS_KEY_Armenian_ZA 0x1000536 +#define IBUS_KEY_Armenian_za 0x1000566 +#define IBUS_KEY_Armenian_E 0x1000537 +#define IBUS_KEY_Armenian_e 0x1000567 +#define IBUS_KEY_Armenian_AT 0x1000538 +#define IBUS_KEY_Armenian_at 0x1000568 +#define IBUS_KEY_Armenian_TO 0x1000539 +#define IBUS_KEY_Armenian_to 0x1000569 +#define IBUS_KEY_Armenian_ZHE 0x100053a +#define IBUS_KEY_Armenian_zhe 0x100056a +#define IBUS_KEY_Armenian_INI 0x100053b +#define IBUS_KEY_Armenian_ini 0x100056b +#define IBUS_KEY_Armenian_LYUN 0x100053c +#define IBUS_KEY_Armenian_lyun 0x100056c +#define IBUS_KEY_Armenian_KHE 0x100053d +#define IBUS_KEY_Armenian_khe 0x100056d +#define IBUS_KEY_Armenian_TSA 0x100053e +#define IBUS_KEY_Armenian_tsa 0x100056e +#define IBUS_KEY_Armenian_KEN 0x100053f +#define IBUS_KEY_Armenian_ken 0x100056f +#define IBUS_KEY_Armenian_HO 0x1000540 +#define IBUS_KEY_Armenian_ho 0x1000570 +#define IBUS_KEY_Armenian_DZA 0x1000541 +#define IBUS_KEY_Armenian_dza 0x1000571 +#define IBUS_KEY_Armenian_GHAT 0x1000542 +#define IBUS_KEY_Armenian_ghat 0x1000572 +#define IBUS_KEY_Armenian_TCHE 0x1000543 +#define IBUS_KEY_Armenian_tche 0x1000573 +#define IBUS_KEY_Armenian_MEN 0x1000544 +#define IBUS_KEY_Armenian_men 0x1000574 +#define IBUS_KEY_Armenian_HI 0x1000545 +#define IBUS_KEY_Armenian_hi 0x1000575 +#define IBUS_KEY_Armenian_NU 0x1000546 +#define IBUS_KEY_Armenian_nu 0x1000576 +#define IBUS_KEY_Armenian_SHA 0x1000547 +#define IBUS_KEY_Armenian_sha 0x1000577 +#define IBUS_KEY_Armenian_VO 0x1000548 +#define IBUS_KEY_Armenian_vo 0x1000578 +#define IBUS_KEY_Armenian_CHA 0x1000549 +#define IBUS_KEY_Armenian_cha 0x1000579 +#define IBUS_KEY_Armenian_PE 0x100054a +#define IBUS_KEY_Armenian_pe 0x100057a +#define IBUS_KEY_Armenian_JE 0x100054b +#define IBUS_KEY_Armenian_je 0x100057b +#define IBUS_KEY_Armenian_RA 0x100054c +#define IBUS_KEY_Armenian_ra 0x100057c +#define IBUS_KEY_Armenian_SE 0x100054d +#define IBUS_KEY_Armenian_se 0x100057d +#define IBUS_KEY_Armenian_VEV 0x100054e +#define IBUS_KEY_Armenian_vev 0x100057e +#define IBUS_KEY_Armenian_TYUN 0x100054f +#define IBUS_KEY_Armenian_tyun 0x100057f +#define IBUS_KEY_Armenian_RE 0x1000550 +#define IBUS_KEY_Armenian_re 0x1000580 +#define IBUS_KEY_Armenian_TSO 0x1000551 +#define IBUS_KEY_Armenian_tso 0x1000581 +#define IBUS_KEY_Armenian_VYUN 0x1000552 +#define IBUS_KEY_Armenian_vyun 0x1000582 +#define IBUS_KEY_Armenian_PYUR 0x1000553 +#define IBUS_KEY_Armenian_pyur 0x1000583 +#define IBUS_KEY_Armenian_KE 0x1000554 +#define IBUS_KEY_Armenian_ke 0x1000584 +#define IBUS_KEY_Armenian_O 0x1000555 +#define IBUS_KEY_Armenian_o 0x1000585 +#define IBUS_KEY_Armenian_FE 0x1000556 +#define IBUS_KEY_Armenian_fe 0x1000586 +#define IBUS_KEY_Armenian_apostrophe 0x100055a +#define IBUS_KEY_Georgian_an 0x10010d0 +#define IBUS_KEY_Georgian_ban 0x10010d1 +#define IBUS_KEY_Georgian_gan 0x10010d2 +#define IBUS_KEY_Georgian_don 0x10010d3 +#define IBUS_KEY_Georgian_en 0x10010d4 +#define IBUS_KEY_Georgian_vin 0x10010d5 +#define IBUS_KEY_Georgian_zen 0x10010d6 +#define IBUS_KEY_Georgian_tan 0x10010d7 +#define IBUS_KEY_Georgian_in 0x10010d8 +#define IBUS_KEY_Georgian_kan 0x10010d9 +#define IBUS_KEY_Georgian_las 0x10010da +#define IBUS_KEY_Georgian_man 0x10010db +#define IBUS_KEY_Georgian_nar 0x10010dc +#define IBUS_KEY_Georgian_on 0x10010dd +#define IBUS_KEY_Georgian_par 0x10010de +#define IBUS_KEY_Georgian_zhar 0x10010df +#define IBUS_KEY_Georgian_rae 0x10010e0 +#define IBUS_KEY_Georgian_san 0x10010e1 +#define IBUS_KEY_Georgian_tar 0x10010e2 +#define IBUS_KEY_Georgian_un 0x10010e3 +#define IBUS_KEY_Georgian_phar 0x10010e4 +#define IBUS_KEY_Georgian_khar 0x10010e5 +#define IBUS_KEY_Georgian_ghan 0x10010e6 +#define IBUS_KEY_Georgian_qar 0x10010e7 +#define IBUS_KEY_Georgian_shin 0x10010e8 +#define IBUS_KEY_Georgian_chin 0x10010e9 +#define IBUS_KEY_Georgian_can 0x10010ea +#define IBUS_KEY_Georgian_jil 0x10010eb +#define IBUS_KEY_Georgian_cil 0x10010ec +#define IBUS_KEY_Georgian_char 0x10010ed +#define IBUS_KEY_Georgian_xan 0x10010ee +#define IBUS_KEY_Georgian_jhan 0x10010ef +#define IBUS_KEY_Georgian_hae 0x10010f0 +#define IBUS_KEY_Georgian_he 0x10010f1 +#define IBUS_KEY_Georgian_hie 0x10010f2 +#define IBUS_KEY_Georgian_we 0x10010f3 +#define IBUS_KEY_Georgian_har 0x10010f4 +#define IBUS_KEY_Georgian_hoe 0x10010f5 +#define IBUS_KEY_Georgian_fi 0x10010f6 +#define IBUS_KEY_Xabovedot 0x1001e8a +#define IBUS_KEY_Ibreve 0x100012c +#define IBUS_KEY_Zstroke 0x10001b5 +#define IBUS_KEY_Gcaron 0x10001e6 +#define IBUS_KEY_Ocaron 0x10001d1 +#define IBUS_KEY_Obarred 0x100019f +#define IBUS_KEY_xabovedot 0x1001e8b +#define IBUS_KEY_ibreve 0x100012d +#define IBUS_KEY_zstroke 0x10001b6 +#define IBUS_KEY_gcaron 0x10001e7 +#define IBUS_KEY_ocaron 0x10001d2 +#define IBUS_KEY_obarred 0x1000275 +#define IBUS_KEY_SCHWA 0x100018f +#define IBUS_KEY_schwa 0x1000259 +#define IBUS_KEY_Lbelowdot 0x1001e36 +#define IBUS_KEY_lbelowdot 0x1001e37 +#define IBUS_KEY_Abelowdot 0x1001ea0 +#define IBUS_KEY_abelowdot 0x1001ea1 +#define IBUS_KEY_Ahook 0x1001ea2 +#define IBUS_KEY_ahook 0x1001ea3 +#define IBUS_KEY_Acircumflexacute 0x1001ea4 +#define IBUS_KEY_acircumflexacute 0x1001ea5 +#define IBUS_KEY_Acircumflexgrave 0x1001ea6 +#define IBUS_KEY_acircumflexgrave 0x1001ea7 +#define IBUS_KEY_Acircumflexhook 0x1001ea8 +#define IBUS_KEY_acircumflexhook 0x1001ea9 +#define IBUS_KEY_Acircumflextilde 0x1001eaa +#define IBUS_KEY_acircumflextilde 0x1001eab +#define IBUS_KEY_Acircumflexbelowdot 0x1001eac +#define IBUS_KEY_acircumflexbelowdot 0x1001ead +#define IBUS_KEY_Abreveacute 0x1001eae +#define IBUS_KEY_abreveacute 0x1001eaf +#define IBUS_KEY_Abrevegrave 0x1001eb0 +#define IBUS_KEY_abrevegrave 0x1001eb1 +#define IBUS_KEY_Abrevehook 0x1001eb2 +#define IBUS_KEY_abrevehook 0x1001eb3 +#define IBUS_KEY_Abrevetilde 0x1001eb4 +#define IBUS_KEY_abrevetilde 0x1001eb5 +#define IBUS_KEY_Abrevebelowdot 0x1001eb6 +#define IBUS_KEY_abrevebelowdot 0x1001eb7 +#define IBUS_KEY_Ebelowdot 0x1001eb8 +#define IBUS_KEY_ebelowdot 0x1001eb9 +#define IBUS_KEY_Ehook 0x1001eba +#define IBUS_KEY_ehook 0x1001ebb +#define IBUS_KEY_Etilde 0x1001ebc +#define IBUS_KEY_etilde 0x1001ebd +#define IBUS_KEY_Ecircumflexacute 0x1001ebe +#define IBUS_KEY_ecircumflexacute 0x1001ebf +#define IBUS_KEY_Ecircumflexgrave 0x1001ec0 +#define IBUS_KEY_ecircumflexgrave 0x1001ec1 +#define IBUS_KEY_Ecircumflexhook 0x1001ec2 +#define IBUS_KEY_ecircumflexhook 0x1001ec3 +#define IBUS_KEY_Ecircumflextilde 0x1001ec4 +#define IBUS_KEY_ecircumflextilde 0x1001ec5 +#define IBUS_KEY_Ecircumflexbelowdot 0x1001ec6 +#define IBUS_KEY_ecircumflexbelowdot 0x1001ec7 +#define IBUS_KEY_Ihook 0x1001ec8 +#define IBUS_KEY_ihook 0x1001ec9 +#define IBUS_KEY_Ibelowdot 0x1001eca +#define IBUS_KEY_ibelowdot 0x1001ecb +#define IBUS_KEY_Obelowdot 0x1001ecc +#define IBUS_KEY_obelowdot 0x1001ecd +#define IBUS_KEY_Ohook 0x1001ece +#define IBUS_KEY_ohook 0x1001ecf +#define IBUS_KEY_Ocircumflexacute 0x1001ed0 +#define IBUS_KEY_ocircumflexacute 0x1001ed1 +#define IBUS_KEY_Ocircumflexgrave 0x1001ed2 +#define IBUS_KEY_ocircumflexgrave 0x1001ed3 +#define IBUS_KEY_Ocircumflexhook 0x1001ed4 +#define IBUS_KEY_ocircumflexhook 0x1001ed5 +#define IBUS_KEY_Ocircumflextilde 0x1001ed6 +#define IBUS_KEY_ocircumflextilde 0x1001ed7 +#define IBUS_KEY_Ocircumflexbelowdot 0x1001ed8 +#define IBUS_KEY_ocircumflexbelowdot 0x1001ed9 +#define IBUS_KEY_Ohornacute 0x1001eda +#define IBUS_KEY_ohornacute 0x1001edb +#define IBUS_KEY_Ohorngrave 0x1001edc +#define IBUS_KEY_ohorngrave 0x1001edd +#define IBUS_KEY_Ohornhook 0x1001ede +#define IBUS_KEY_ohornhook 0x1001edf +#define IBUS_KEY_Ohorntilde 0x1001ee0 +#define IBUS_KEY_ohorntilde 0x1001ee1 +#define IBUS_KEY_Ohornbelowdot 0x1001ee2 +#define IBUS_KEY_ohornbelowdot 0x1001ee3 +#define IBUS_KEY_Ubelowdot 0x1001ee4 +#define IBUS_KEY_ubelowdot 0x1001ee5 +#define IBUS_KEY_Uhook 0x1001ee6 +#define IBUS_KEY_uhook 0x1001ee7 +#define IBUS_KEY_Uhornacute 0x1001ee8 +#define IBUS_KEY_uhornacute 0x1001ee9 +#define IBUS_KEY_Uhorngrave 0x1001eea +#define IBUS_KEY_uhorngrave 0x1001eeb +#define IBUS_KEY_Uhornhook 0x1001eec +#define IBUS_KEY_uhornhook 0x1001eed +#define IBUS_KEY_Uhorntilde 0x1001eee +#define IBUS_KEY_uhorntilde 0x1001eef +#define IBUS_KEY_Uhornbelowdot 0x1001ef0 +#define IBUS_KEY_uhornbelowdot 0x1001ef1 +#define IBUS_KEY_Ybelowdot 0x1001ef4 +#define IBUS_KEY_ybelowdot 0x1001ef5 +#define IBUS_KEY_Yhook 0x1001ef6 +#define IBUS_KEY_yhook 0x1001ef7 +#define IBUS_KEY_Ytilde 0x1001ef8 +#define IBUS_KEY_ytilde 0x1001ef9 +#define IBUS_KEY_Ohorn 0x10001a0 +#define IBUS_KEY_ohorn 0x10001a1 +#define IBUS_KEY_Uhorn 0x10001af +#define IBUS_KEY_uhorn 0x10001b0 +#define IBUS_KEY_EcuSign 0x10020a0 +#define IBUS_KEY_ColonSign 0x10020a1 +#define IBUS_KEY_CruzeiroSign 0x10020a2 +#define IBUS_KEY_FFrancSign 0x10020a3 +#define IBUS_KEY_LiraSign 0x10020a4 +#define IBUS_KEY_MillSign 0x10020a5 +#define IBUS_KEY_NairaSign 0x10020a6 +#define IBUS_KEY_PesetaSign 0x10020a7 +#define IBUS_KEY_RupeeSign 0x10020a8 +#define IBUS_KEY_WonSign 0x10020a9 +#define IBUS_KEY_NewSheqelSign 0x10020aa +#define IBUS_KEY_DongSign 0x10020ab +#define IBUS_KEY_EuroSign 0x20ac +#define IBUS_KEY_zerosuperior 0x1002070 +#define IBUS_KEY_foursuperior 0x1002074 +#define IBUS_KEY_fivesuperior 0x1002075 +#define IBUS_KEY_sixsuperior 0x1002076 +#define IBUS_KEY_sevensuperior 0x1002077 +#define IBUS_KEY_eightsuperior 0x1002078 +#define IBUS_KEY_ninesuperior 0x1002079 +#define IBUS_KEY_zerosubscript 0x1002080 +#define IBUS_KEY_onesubscript 0x1002081 +#define IBUS_KEY_twosubscript 0x1002082 +#define IBUS_KEY_threesubscript 0x1002083 +#define IBUS_KEY_foursubscript 0x1002084 +#define IBUS_KEY_fivesubscript 0x1002085 +#define IBUS_KEY_sixsubscript 0x1002086 +#define IBUS_KEY_sevensubscript 0x1002087 +#define IBUS_KEY_eightsubscript 0x1002088 +#define IBUS_KEY_ninesubscript 0x1002089 +#define IBUS_KEY_partdifferential 0x1002202 +#define IBUS_KEY_emptyset 0x1002205 +#define IBUS_KEY_elementof 0x1002208 +#define IBUS_KEY_notelementof 0x1002209 +#define IBUS_KEY_containsas 0x100220b +#define IBUS_KEY_squareroot 0x100221a +#define IBUS_KEY_cuberoot 0x100221b +#define IBUS_KEY_fourthroot 0x100221c +#define IBUS_KEY_dintegral 0x100222c +#define IBUS_KEY_tintegral 0x100222d +#define IBUS_KEY_because 0x1002235 +#define IBUS_KEY_approxeq 0x1002248 +#define IBUS_KEY_notapproxeq 0x1002247 +#define IBUS_KEY_notidentical 0x1002262 +#define IBUS_KEY_stricteq 0x1002263 +#define IBUS_KEY_braille_dot_1 0xfff1 +#define IBUS_KEY_braille_dot_2 0xfff2 +#define IBUS_KEY_braille_dot_3 0xfff3 +#define IBUS_KEY_braille_dot_4 0xfff4 +#define IBUS_KEY_braille_dot_5 0xfff5 +#define IBUS_KEY_braille_dot_6 0xfff6 +#define IBUS_KEY_braille_dot_7 0xfff7 +#define IBUS_KEY_braille_dot_8 0xfff8 +#define IBUS_KEY_braille_dot_9 0xfff9 +#define IBUS_KEY_braille_dot_10 0xfffa +#define IBUS_KEY_braille_blank 0x1002800 +#define IBUS_KEY_braille_dots_1 0x1002801 +#define IBUS_KEY_braille_dots_2 0x1002802 +#define IBUS_KEY_braille_dots_12 0x1002803 +#define IBUS_KEY_braille_dots_3 0x1002804 +#define IBUS_KEY_braille_dots_13 0x1002805 +#define IBUS_KEY_braille_dots_23 0x1002806 +#define IBUS_KEY_braille_dots_123 0x1002807 +#define IBUS_KEY_braille_dots_4 0x1002808 +#define IBUS_KEY_braille_dots_14 0x1002809 +#define IBUS_KEY_braille_dots_24 0x100280a +#define IBUS_KEY_braille_dots_124 0x100280b +#define IBUS_KEY_braille_dots_34 0x100280c +#define IBUS_KEY_braille_dots_134 0x100280d +#define IBUS_KEY_braille_dots_234 0x100280e +#define IBUS_KEY_braille_dots_1234 0x100280f +#define IBUS_KEY_braille_dots_5 0x1002810 +#define IBUS_KEY_braille_dots_15 0x1002811 +#define IBUS_KEY_braille_dots_25 0x1002812 +#define IBUS_KEY_braille_dots_125 0x1002813 +#define IBUS_KEY_braille_dots_35 0x1002814 +#define IBUS_KEY_braille_dots_135 0x1002815 +#define IBUS_KEY_braille_dots_235 0x1002816 +#define IBUS_KEY_braille_dots_1235 0x1002817 +#define IBUS_KEY_braille_dots_45 0x1002818 +#define IBUS_KEY_braille_dots_145 0x1002819 +#define IBUS_KEY_braille_dots_245 0x100281a +#define IBUS_KEY_braille_dots_1245 0x100281b +#define IBUS_KEY_braille_dots_345 0x100281c +#define IBUS_KEY_braille_dots_1345 0x100281d +#define IBUS_KEY_braille_dots_2345 0x100281e +#define IBUS_KEY_braille_dots_12345 0x100281f +#define IBUS_KEY_braille_dots_6 0x1002820 +#define IBUS_KEY_braille_dots_16 0x1002821 +#define IBUS_KEY_braille_dots_26 0x1002822 +#define IBUS_KEY_braille_dots_126 0x1002823 +#define IBUS_KEY_braille_dots_36 0x1002824 +#define IBUS_KEY_braille_dots_136 0x1002825 +#define IBUS_KEY_braille_dots_236 0x1002826 +#define IBUS_KEY_braille_dots_1236 0x1002827 +#define IBUS_KEY_braille_dots_46 0x1002828 +#define IBUS_KEY_braille_dots_146 0x1002829 +#define IBUS_KEY_braille_dots_246 0x100282a +#define IBUS_KEY_braille_dots_1246 0x100282b +#define IBUS_KEY_braille_dots_346 0x100282c +#define IBUS_KEY_braille_dots_1346 0x100282d +#define IBUS_KEY_braille_dots_2346 0x100282e +#define IBUS_KEY_braille_dots_12346 0x100282f +#define IBUS_KEY_braille_dots_56 0x1002830 +#define IBUS_KEY_braille_dots_156 0x1002831 +#define IBUS_KEY_braille_dots_256 0x1002832 +#define IBUS_KEY_braille_dots_1256 0x1002833 +#define IBUS_KEY_braille_dots_356 0x1002834 +#define IBUS_KEY_braille_dots_1356 0x1002835 +#define IBUS_KEY_braille_dots_2356 0x1002836 +#define IBUS_KEY_braille_dots_12356 0x1002837 +#define IBUS_KEY_braille_dots_456 0x1002838 +#define IBUS_KEY_braille_dots_1456 0x1002839 +#define IBUS_KEY_braille_dots_2456 0x100283a +#define IBUS_KEY_braille_dots_12456 0x100283b +#define IBUS_KEY_braille_dots_3456 0x100283c +#define IBUS_KEY_braille_dots_13456 0x100283d +#define IBUS_KEY_braille_dots_23456 0x100283e +#define IBUS_KEY_braille_dots_123456 0x100283f +#define IBUS_KEY_braille_dots_7 0x1002840 +#define IBUS_KEY_braille_dots_17 0x1002841 +#define IBUS_KEY_braille_dots_27 0x1002842 +#define IBUS_KEY_braille_dots_127 0x1002843 +#define IBUS_KEY_braille_dots_37 0x1002844 +#define IBUS_KEY_braille_dots_137 0x1002845 +#define IBUS_KEY_braille_dots_237 0x1002846 +#define IBUS_KEY_braille_dots_1237 0x1002847 +#define IBUS_KEY_braille_dots_47 0x1002848 +#define IBUS_KEY_braille_dots_147 0x1002849 +#define IBUS_KEY_braille_dots_247 0x100284a +#define IBUS_KEY_braille_dots_1247 0x100284b +#define IBUS_KEY_braille_dots_347 0x100284c +#define IBUS_KEY_braille_dots_1347 0x100284d +#define IBUS_KEY_braille_dots_2347 0x100284e +#define IBUS_KEY_braille_dots_12347 0x100284f +#define IBUS_KEY_braille_dots_57 0x1002850 +#define IBUS_KEY_braille_dots_157 0x1002851 +#define IBUS_KEY_braille_dots_257 0x1002852 +#define IBUS_KEY_braille_dots_1257 0x1002853 +#define IBUS_KEY_braille_dots_357 0x1002854 +#define IBUS_KEY_braille_dots_1357 0x1002855 +#define IBUS_KEY_braille_dots_2357 0x1002856 +#define IBUS_KEY_braille_dots_12357 0x1002857 +#define IBUS_KEY_braille_dots_457 0x1002858 +#define IBUS_KEY_braille_dots_1457 0x1002859 +#define IBUS_KEY_braille_dots_2457 0x100285a +#define IBUS_KEY_braille_dots_12457 0x100285b +#define IBUS_KEY_braille_dots_3457 0x100285c +#define IBUS_KEY_braille_dots_13457 0x100285d +#define IBUS_KEY_braille_dots_23457 0x100285e +#define IBUS_KEY_braille_dots_123457 0x100285f +#define IBUS_KEY_braille_dots_67 0x1002860 +#define IBUS_KEY_braille_dots_167 0x1002861 +#define IBUS_KEY_braille_dots_267 0x1002862 +#define IBUS_KEY_braille_dots_1267 0x1002863 +#define IBUS_KEY_braille_dots_367 0x1002864 +#define IBUS_KEY_braille_dots_1367 0x1002865 +#define IBUS_KEY_braille_dots_2367 0x1002866 +#define IBUS_KEY_braille_dots_12367 0x1002867 +#define IBUS_KEY_braille_dots_467 0x1002868 +#define IBUS_KEY_braille_dots_1467 0x1002869 +#define IBUS_KEY_braille_dots_2467 0x100286a +#define IBUS_KEY_braille_dots_12467 0x100286b +#define IBUS_KEY_braille_dots_3467 0x100286c +#define IBUS_KEY_braille_dots_13467 0x100286d +#define IBUS_KEY_braille_dots_23467 0x100286e +#define IBUS_KEY_braille_dots_123467 0x100286f +#define IBUS_KEY_braille_dots_567 0x1002870 +#define IBUS_KEY_braille_dots_1567 0x1002871 +#define IBUS_KEY_braille_dots_2567 0x1002872 +#define IBUS_KEY_braille_dots_12567 0x1002873 +#define IBUS_KEY_braille_dots_3567 0x1002874 +#define IBUS_KEY_braille_dots_13567 0x1002875 +#define IBUS_KEY_braille_dots_23567 0x1002876 +#define IBUS_KEY_braille_dots_123567 0x1002877 +#define IBUS_KEY_braille_dots_4567 0x1002878 +#define IBUS_KEY_braille_dots_14567 0x1002879 +#define IBUS_KEY_braille_dots_24567 0x100287a +#define IBUS_KEY_braille_dots_124567 0x100287b +#define IBUS_KEY_braille_dots_34567 0x100287c +#define IBUS_KEY_braille_dots_134567 0x100287d +#define IBUS_KEY_braille_dots_234567 0x100287e +#define IBUS_KEY_braille_dots_1234567 0x100287f +#define IBUS_KEY_braille_dots_8 0x1002880 +#define IBUS_KEY_braille_dots_18 0x1002881 +#define IBUS_KEY_braille_dots_28 0x1002882 +#define IBUS_KEY_braille_dots_128 0x1002883 +#define IBUS_KEY_braille_dots_38 0x1002884 +#define IBUS_KEY_braille_dots_138 0x1002885 +#define IBUS_KEY_braille_dots_238 0x1002886 +#define IBUS_KEY_braille_dots_1238 0x1002887 +#define IBUS_KEY_braille_dots_48 0x1002888 +#define IBUS_KEY_braille_dots_148 0x1002889 +#define IBUS_KEY_braille_dots_248 0x100288a +#define IBUS_KEY_braille_dots_1248 0x100288b +#define IBUS_KEY_braille_dots_348 0x100288c +#define IBUS_KEY_braille_dots_1348 0x100288d +#define IBUS_KEY_braille_dots_2348 0x100288e +#define IBUS_KEY_braille_dots_12348 0x100288f +#define IBUS_KEY_braille_dots_58 0x1002890 +#define IBUS_KEY_braille_dots_158 0x1002891 +#define IBUS_KEY_braille_dots_258 0x1002892 +#define IBUS_KEY_braille_dots_1258 0x1002893 +#define IBUS_KEY_braille_dots_358 0x1002894 +#define IBUS_KEY_braille_dots_1358 0x1002895 +#define IBUS_KEY_braille_dots_2358 0x1002896 +#define IBUS_KEY_braille_dots_12358 0x1002897 +#define IBUS_KEY_braille_dots_458 0x1002898 +#define IBUS_KEY_braille_dots_1458 0x1002899 +#define IBUS_KEY_braille_dots_2458 0x100289a +#define IBUS_KEY_braille_dots_12458 0x100289b +#define IBUS_KEY_braille_dots_3458 0x100289c +#define IBUS_KEY_braille_dots_13458 0x100289d +#define IBUS_KEY_braille_dots_23458 0x100289e +#define IBUS_KEY_braille_dots_123458 0x100289f +#define IBUS_KEY_braille_dots_68 0x10028a0 +#define IBUS_KEY_braille_dots_168 0x10028a1 +#define IBUS_KEY_braille_dots_268 0x10028a2 +#define IBUS_KEY_braille_dots_1268 0x10028a3 +#define IBUS_KEY_braille_dots_368 0x10028a4 +#define IBUS_KEY_braille_dots_1368 0x10028a5 +#define IBUS_KEY_braille_dots_2368 0x10028a6 +#define IBUS_KEY_braille_dots_12368 0x10028a7 +#define IBUS_KEY_braille_dots_468 0x10028a8 +#define IBUS_KEY_braille_dots_1468 0x10028a9 +#define IBUS_KEY_braille_dots_2468 0x10028aa +#define IBUS_KEY_braille_dots_12468 0x10028ab +#define IBUS_KEY_braille_dots_3468 0x10028ac +#define IBUS_KEY_braille_dots_13468 0x10028ad +#define IBUS_KEY_braille_dots_23468 0x10028ae +#define IBUS_KEY_braille_dots_123468 0x10028af +#define IBUS_KEY_braille_dots_568 0x10028b0 +#define IBUS_KEY_braille_dots_1568 0x10028b1 +#define IBUS_KEY_braille_dots_2568 0x10028b2 +#define IBUS_KEY_braille_dots_12568 0x10028b3 +#define IBUS_KEY_braille_dots_3568 0x10028b4 +#define IBUS_KEY_braille_dots_13568 0x10028b5 +#define IBUS_KEY_braille_dots_23568 0x10028b6 +#define IBUS_KEY_braille_dots_123568 0x10028b7 +#define IBUS_KEY_braille_dots_4568 0x10028b8 +#define IBUS_KEY_braille_dots_14568 0x10028b9 +#define IBUS_KEY_braille_dots_24568 0x10028ba +#define IBUS_KEY_braille_dots_124568 0x10028bb +#define IBUS_KEY_braille_dots_34568 0x10028bc +#define IBUS_KEY_braille_dots_134568 0x10028bd +#define IBUS_KEY_braille_dots_234568 0x10028be +#define IBUS_KEY_braille_dots_1234568 0x10028bf +#define IBUS_KEY_braille_dots_78 0x10028c0 +#define IBUS_KEY_braille_dots_178 0x10028c1 +#define IBUS_KEY_braille_dots_278 0x10028c2 +#define IBUS_KEY_braille_dots_1278 0x10028c3 +#define IBUS_KEY_braille_dots_378 0x10028c4 +#define IBUS_KEY_braille_dots_1378 0x10028c5 +#define IBUS_KEY_braille_dots_2378 0x10028c6 +#define IBUS_KEY_braille_dots_12378 0x10028c7 +#define IBUS_KEY_braille_dots_478 0x10028c8 +#define IBUS_KEY_braille_dots_1478 0x10028c9 +#define IBUS_KEY_braille_dots_2478 0x10028ca +#define IBUS_KEY_braille_dots_12478 0x10028cb +#define IBUS_KEY_braille_dots_3478 0x10028cc +#define IBUS_KEY_braille_dots_13478 0x10028cd +#define IBUS_KEY_braille_dots_23478 0x10028ce +#define IBUS_KEY_braille_dots_123478 0x10028cf +#define IBUS_KEY_braille_dots_578 0x10028d0 +#define IBUS_KEY_braille_dots_1578 0x10028d1 +#define IBUS_KEY_braille_dots_2578 0x10028d2 +#define IBUS_KEY_braille_dots_12578 0x10028d3 +#define IBUS_KEY_braille_dots_3578 0x10028d4 +#define IBUS_KEY_braille_dots_13578 0x10028d5 +#define IBUS_KEY_braille_dots_23578 0x10028d6 +#define IBUS_KEY_braille_dots_123578 0x10028d7 +#define IBUS_KEY_braille_dots_4578 0x10028d8 +#define IBUS_KEY_braille_dots_14578 0x10028d9 +#define IBUS_KEY_braille_dots_24578 0x10028da +#define IBUS_KEY_braille_dots_124578 0x10028db +#define IBUS_KEY_braille_dots_34578 0x10028dc +#define IBUS_KEY_braille_dots_134578 0x10028dd +#define IBUS_KEY_braille_dots_234578 0x10028de +#define IBUS_KEY_braille_dots_1234578 0x10028df +#define IBUS_KEY_braille_dots_678 0x10028e0 +#define IBUS_KEY_braille_dots_1678 0x10028e1 +#define IBUS_KEY_braille_dots_2678 0x10028e2 +#define IBUS_KEY_braille_dots_12678 0x10028e3 +#define IBUS_KEY_braille_dots_3678 0x10028e4 +#define IBUS_KEY_braille_dots_13678 0x10028e5 +#define IBUS_KEY_braille_dots_23678 0x10028e6 +#define IBUS_KEY_braille_dots_123678 0x10028e7 +#define IBUS_KEY_braille_dots_4678 0x10028e8 +#define IBUS_KEY_braille_dots_14678 0x10028e9 +#define IBUS_KEY_braille_dots_24678 0x10028ea +#define IBUS_KEY_braille_dots_124678 0x10028eb +#define IBUS_KEY_braille_dots_34678 0x10028ec +#define IBUS_KEY_braille_dots_134678 0x10028ed +#define IBUS_KEY_braille_dots_234678 0x10028ee +#define IBUS_KEY_braille_dots_1234678 0x10028ef +#define IBUS_KEY_braille_dots_5678 0x10028f0 +#define IBUS_KEY_braille_dots_15678 0x10028f1 +#define IBUS_KEY_braille_dots_25678 0x10028f2 +#define IBUS_KEY_braille_dots_125678 0x10028f3 +#define IBUS_KEY_braille_dots_35678 0x10028f4 +#define IBUS_KEY_braille_dots_135678 0x10028f5 +#define IBUS_KEY_braille_dots_235678 0x10028f6 +#define IBUS_KEY_braille_dots_1235678 0x10028f7 +#define IBUS_KEY_braille_dots_45678 0x10028f8 +#define IBUS_KEY_braille_dots_145678 0x10028f9 +#define IBUS_KEY_braille_dots_245678 0x10028fa +#define IBUS_KEY_braille_dots_1245678 0x10028fb +#define IBUS_KEY_braille_dots_345678 0x10028fc +#define IBUS_KEY_braille_dots_1345678 0x10028fd +#define IBUS_KEY_braille_dots_2345678 0x10028fe +#define IBUS_KEY_braille_dots_12345678 0x10028ff +#define IBUS_KEY_Sinh_ng 0x1000d82 +#define IBUS_KEY_Sinh_h2 0x1000d83 +#define IBUS_KEY_Sinh_a 0x1000d85 +#define IBUS_KEY_Sinh_aa 0x1000d86 +#define IBUS_KEY_Sinh_ae 0x1000d87 +#define IBUS_KEY_Sinh_aee 0x1000d88 +#define IBUS_KEY_Sinh_i 0x1000d89 +#define IBUS_KEY_Sinh_ii 0x1000d8a +#define IBUS_KEY_Sinh_u 0x1000d8b +#define IBUS_KEY_Sinh_uu 0x1000d8c +#define IBUS_KEY_Sinh_ri 0x1000d8d +#define IBUS_KEY_Sinh_rii 0x1000d8e +#define IBUS_KEY_Sinh_lu 0x1000d8f +#define IBUS_KEY_Sinh_luu 0x1000d90 +#define IBUS_KEY_Sinh_e 0x1000d91 +#define IBUS_KEY_Sinh_ee 0x1000d92 +#define IBUS_KEY_Sinh_ai 0x1000d93 +#define IBUS_KEY_Sinh_o 0x1000d94 +#define IBUS_KEY_Sinh_oo 0x1000d95 +#define IBUS_KEY_Sinh_au 0x1000d96 +#define IBUS_KEY_Sinh_ka 0x1000d9a +#define IBUS_KEY_Sinh_kha 0x1000d9b +#define IBUS_KEY_Sinh_ga 0x1000d9c +#define IBUS_KEY_Sinh_gha 0x1000d9d +#define IBUS_KEY_Sinh_ng2 0x1000d9e +#define IBUS_KEY_Sinh_nga 0x1000d9f +#define IBUS_KEY_Sinh_ca 0x1000da0 +#define IBUS_KEY_Sinh_cha 0x1000da1 +#define IBUS_KEY_Sinh_ja 0x1000da2 +#define IBUS_KEY_Sinh_jha 0x1000da3 +#define IBUS_KEY_Sinh_nya 0x1000da4 +#define IBUS_KEY_Sinh_jnya 0x1000da5 +#define IBUS_KEY_Sinh_nja 0x1000da6 +#define IBUS_KEY_Sinh_tta 0x1000da7 +#define IBUS_KEY_Sinh_ttha 0x1000da8 +#define IBUS_KEY_Sinh_dda 0x1000da9 +#define IBUS_KEY_Sinh_ddha 0x1000daa +#define IBUS_KEY_Sinh_nna 0x1000dab +#define IBUS_KEY_Sinh_ndda 0x1000dac +#define IBUS_KEY_Sinh_tha 0x1000dad +#define IBUS_KEY_Sinh_thha 0x1000dae +#define IBUS_KEY_Sinh_dha 0x1000daf +#define IBUS_KEY_Sinh_dhha 0x1000db0 +#define IBUS_KEY_Sinh_na 0x1000db1 +#define IBUS_KEY_Sinh_ndha 0x1000db3 +#define IBUS_KEY_Sinh_pa 0x1000db4 +#define IBUS_KEY_Sinh_pha 0x1000db5 +#define IBUS_KEY_Sinh_ba 0x1000db6 +#define IBUS_KEY_Sinh_bha 0x1000db7 +#define IBUS_KEY_Sinh_ma 0x1000db8 +#define IBUS_KEY_Sinh_mba 0x1000db9 +#define IBUS_KEY_Sinh_ya 0x1000dba +#define IBUS_KEY_Sinh_ra 0x1000dbb +#define IBUS_KEY_Sinh_la 0x1000dbd +#define IBUS_KEY_Sinh_va 0x1000dc0 +#define IBUS_KEY_Sinh_sha 0x1000dc1 +#define IBUS_KEY_Sinh_ssha 0x1000dc2 +#define IBUS_KEY_Sinh_sa 0x1000dc3 +#define IBUS_KEY_Sinh_ha 0x1000dc4 +#define IBUS_KEY_Sinh_lla 0x1000dc5 +#define IBUS_KEY_Sinh_fa 0x1000dc6 +#define IBUS_KEY_Sinh_al 0x1000dca +#define IBUS_KEY_Sinh_aa2 0x1000dcf +#define IBUS_KEY_Sinh_ae2 0x1000dd0 +#define IBUS_KEY_Sinh_aee2 0x1000dd1 +#define IBUS_KEY_Sinh_i2 0x1000dd2 +#define IBUS_KEY_Sinh_ii2 0x1000dd3 +#define IBUS_KEY_Sinh_u2 0x1000dd4 +#define IBUS_KEY_Sinh_uu2 0x1000dd6 +#define IBUS_KEY_Sinh_ru2 0x1000dd8 +#define IBUS_KEY_Sinh_e2 0x1000dd9 +#define IBUS_KEY_Sinh_ee2 0x1000dda +#define IBUS_KEY_Sinh_ai2 0x1000ddb +#define IBUS_KEY_Sinh_o2 0x1000ddc +#define IBUS_KEY_Sinh_oo2 0x1000ddd +#define IBUS_KEY_Sinh_au2 0x1000dde +#define IBUS_KEY_Sinh_lu2 0x1000ddf +#define IBUS_KEY_Sinh_ruu2 0x1000df2 +#define IBUS_KEY_Sinh_luu2 0x1000df3 +#define IBUS_KEY_Sinh_kunddaliya 0x1000df4 #endif /* __IBUS_KEYSYMS_H__ */ diff --git a/src/ibuskeyuni.c b/src/ibuskeyuni.c new file mode 100644 index 000000000..ec0bcebf9 --- /dev/null +++ b/src/ibuskeyuni.c @@ -0,0 +1,1706 @@ +/* GDK - The GIMP Drawing Kit + * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* + * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS + * file for a list of people on the GTK+ Team. See the ChangeLog + * files for a list of changes. These files are distributed with + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + */ + +#include "ibuskeys.h" + +/* Thanks to Markus G. Kuhn for the ksysym<->Unicode + * mapping functions, from the xterm sources. + */ + +/* These tables could be compressed by contiguous ranges, but the benefit of doing so + * is smallish. It would save about ~1000 bytes total. + */ + +static const struct { + unsigned short keysym; + unsigned short ucs; +} gdk_keysym_to_unicode_tab[] = { + { 0x01a1, 0x0104 }, /* Aogonek Ą LATIN CAPITAL LETTER A WITH OGONEK */ + { 0x01a2, 0x02d8 }, /* breve ˘ BREVE */ + { 0x01a3, 0x0141 }, /* Lstroke Ł LATIN CAPITAL LETTER L WITH STROKE */ + { 0x01a5, 0x013d }, /* Lcaron Ľ LATIN CAPITAL LETTER L WITH CARON */ + { 0x01a6, 0x015a }, /* Sacute Ś LATIN CAPITAL LETTER S WITH ACUTE */ + { 0x01a9, 0x0160 }, /* Scaron Š LATIN CAPITAL LETTER S WITH CARON */ + { 0x01aa, 0x015e }, /* Scedilla Ş LATIN CAPITAL LETTER S WITH CEDILLA */ + { 0x01ab, 0x0164 }, /* Tcaron Ť LATIN CAPITAL LETTER T WITH CARON */ + { 0x01ac, 0x0179 }, /* Zacute Ź LATIN CAPITAL LETTER Z WITH ACUTE */ + { 0x01ae, 0x017d }, /* Zcaron Ž LATIN CAPITAL LETTER Z WITH CARON */ + { 0x01af, 0x017b }, /* Zabovedot Ż LATIN CAPITAL LETTER Z WITH DOT ABOVE */ + { 0x01b1, 0x0105 }, /* aogonek ą LATIN SMALL LETTER A WITH OGONEK */ + { 0x01b2, 0x02db }, /* ogonek ˛ OGONEK */ + { 0x01b3, 0x0142 }, /* lstroke ł LATIN SMALL LETTER L WITH STROKE */ + { 0x01b5, 0x013e }, /* lcaron ľ LATIN SMALL LETTER L WITH CARON */ + { 0x01b6, 0x015b }, /* sacute ś LATIN SMALL LETTER S WITH ACUTE */ + { 0x01b7, 0x02c7 }, /* caron ˇ CARON */ + { 0x01b9, 0x0161 }, /* scaron š LATIN SMALL LETTER S WITH CARON */ + { 0x01ba, 0x015f }, /* scedilla ş LATIN SMALL LETTER S WITH CEDILLA */ + { 0x01bb, 0x0165 }, /* tcaron ť LATIN SMALL LETTER T WITH CARON */ + { 0x01bc, 0x017a }, /* zacute ź LATIN SMALL LETTER Z WITH ACUTE */ + { 0x01bd, 0x02dd }, /* doubleacute ˝ DOUBLE ACUTE ACCENT */ + { 0x01be, 0x017e }, /* zcaron ž LATIN SMALL LETTER Z WITH CARON */ + { 0x01bf, 0x017c }, /* zabovedot ż LATIN SMALL LETTER Z WITH DOT ABOVE */ + { 0x01c0, 0x0154 }, /* Racute Ŕ LATIN CAPITAL LETTER R WITH ACUTE */ + { 0x01c3, 0x0102 }, /* Abreve Ă LATIN CAPITAL LETTER A WITH BREVE */ + { 0x01c5, 0x0139 }, /* Lacute Ĺ LATIN CAPITAL LETTER L WITH ACUTE */ + { 0x01c6, 0x0106 }, /* Cacute Ć LATIN CAPITAL LETTER C WITH ACUTE */ + { 0x01c8, 0x010c }, /* Ccaron Č LATIN CAPITAL LETTER C WITH CARON */ + { 0x01ca, 0x0118 }, /* Eogonek Ę LATIN CAPITAL LETTER E WITH OGONEK */ + { 0x01cc, 0x011a }, /* Ecaron Ě LATIN CAPITAL LETTER E WITH CARON */ + { 0x01cf, 0x010e }, /* Dcaron Ď LATIN CAPITAL LETTER D WITH CARON */ + { 0x01d0, 0x0110 }, /* Dstroke Đ LATIN CAPITAL LETTER D WITH STROKE */ + { 0x01d1, 0x0143 }, /* Nacute Ń LATIN CAPITAL LETTER N WITH ACUTE */ + { 0x01d2, 0x0147 }, /* Ncaron Ň LATIN CAPITAL LETTER N WITH CARON */ + { 0x01d5, 0x0150 }, /* Odoubleacute Ő LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */ + { 0x01d8, 0x0158 }, /* Rcaron Ř LATIN CAPITAL LETTER R WITH CARON */ + { 0x01d9, 0x016e }, /* Uring Ů LATIN CAPITAL LETTER U WITH RING ABOVE */ + { 0x01db, 0x0170 }, /* Udoubleacute Ű LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */ + { 0x01de, 0x0162 }, /* Tcedilla Ţ LATIN CAPITAL LETTER T WITH CEDILLA */ + { 0x01e0, 0x0155 }, /* racute ŕ LATIN SMALL LETTER R WITH ACUTE */ + { 0x01e3, 0x0103 }, /* abreve ă LATIN SMALL LETTER A WITH BREVE */ + { 0x01e5, 0x013a }, /* lacute ĺ LATIN SMALL LETTER L WITH ACUTE */ + { 0x01e6, 0x0107 }, /* cacute ć LATIN SMALL LETTER C WITH ACUTE */ + { 0x01e8, 0x010d }, /* ccaron č LATIN SMALL LETTER C WITH CARON */ + { 0x01ea, 0x0119 }, /* eogonek ę LATIN SMALL LETTER E WITH OGONEK */ + { 0x01ec, 0x011b }, /* ecaron ě LATIN SMALL LETTER E WITH CARON */ + { 0x01ef, 0x010f }, /* dcaron ď LATIN SMALL LETTER D WITH CARON */ + { 0x01f0, 0x0111 }, /* dstroke đ LATIN SMALL LETTER D WITH STROKE */ + { 0x01f1, 0x0144 }, /* nacute ń LATIN SMALL LETTER N WITH ACUTE */ + { 0x01f2, 0x0148 }, /* ncaron ň LATIN SMALL LETTER N WITH CARON */ + { 0x01f5, 0x0151 }, /* odoubleacute ő LATIN SMALL LETTER O WITH DOUBLE ACUTE */ + { 0x01f8, 0x0159 }, /* rcaron ř LATIN SMALL LETTER R WITH CARON */ + { 0x01f9, 0x016f }, /* uring ů LATIN SMALL LETTER U WITH RING ABOVE */ + { 0x01fb, 0x0171 }, /* udoubleacute ű LATIN SMALL LETTER U WITH DOUBLE ACUTE */ + { 0x01fe, 0x0163 }, /* tcedilla ţ LATIN SMALL LETTER T WITH CEDILLA */ + { 0x01ff, 0x02d9 }, /* abovedot ˙ DOT ABOVE */ + { 0x02a1, 0x0126 }, /* Hstroke Ħ LATIN CAPITAL LETTER H WITH STROKE */ + { 0x02a6, 0x0124 }, /* Hcircumflex Ĥ LATIN CAPITAL LETTER H WITH CIRCUMFLEX */ + { 0x02a9, 0x0130 }, /* Iabovedot İ LATIN CAPITAL LETTER I WITH DOT ABOVE */ + { 0x02ab, 0x011e }, /* Gbreve Ğ LATIN CAPITAL LETTER G WITH BREVE */ + { 0x02ac, 0x0134 }, /* Jcircumflex Ĵ LATIN CAPITAL LETTER J WITH CIRCUMFLEX */ + { 0x02b1, 0x0127 }, /* hstroke ħ LATIN SMALL LETTER H WITH STROKE */ + { 0x02b6, 0x0125 }, /* hcircumflex ĥ LATIN SMALL LETTER H WITH CIRCUMFLEX */ + { 0x02b9, 0x0131 }, /* idotless ı LATIN SMALL LETTER DOTLESS I */ + { 0x02bb, 0x011f }, /* gbreve ğ LATIN SMALL LETTER G WITH BREVE */ + { 0x02bc, 0x0135 }, /* jcircumflex ĵ LATIN SMALL LETTER J WITH CIRCUMFLEX */ + { 0x02c5, 0x010a }, /* Cabovedot Ċ LATIN CAPITAL LETTER C WITH DOT ABOVE */ + { 0x02c6, 0x0108 }, /* Ccircumflex Ĉ LATIN CAPITAL LETTER C WITH CIRCUMFLEX */ + { 0x02d5, 0x0120 }, /* Gabovedot Ġ LATIN CAPITAL LETTER G WITH DOT ABOVE */ + { 0x02d8, 0x011c }, /* Gcircumflex Ĝ LATIN CAPITAL LETTER G WITH CIRCUMFLEX */ + { 0x02dd, 0x016c }, /* Ubreve Ŭ LATIN CAPITAL LETTER U WITH BREVE */ + { 0x02de, 0x015c }, /* Scircumflex Ŝ LATIN CAPITAL LETTER S WITH CIRCUMFLEX */ + { 0x02e5, 0x010b }, /* cabovedot ċ LATIN SMALL LETTER C WITH DOT ABOVE */ + { 0x02e6, 0x0109 }, /* ccircumflex ĉ LATIN SMALL LETTER C WITH CIRCUMFLEX */ + { 0x02f5, 0x0121 }, /* gabovedot ġ LATIN SMALL LETTER G WITH DOT ABOVE */ + { 0x02f8, 0x011d }, /* gcircumflex ĝ LATIN SMALL LETTER G WITH CIRCUMFLEX */ + { 0x02fd, 0x016d }, /* ubreve ŭ LATIN SMALL LETTER U WITH BREVE */ + { 0x02fe, 0x015d }, /* scircumflex ŝ LATIN SMALL LETTER S WITH CIRCUMFLEX */ + { 0x03a2, 0x0138 }, /* kra ĸ LATIN SMALL LETTER KRA */ + { 0x03a3, 0x0156 }, /* Rcedilla Ŗ LATIN CAPITAL LETTER R WITH CEDILLA */ + { 0x03a5, 0x0128 }, /* Itilde Ĩ LATIN CAPITAL LETTER I WITH TILDE */ + { 0x03a6, 0x013b }, /* Lcedilla Ļ LATIN CAPITAL LETTER L WITH CEDILLA */ + { 0x03aa, 0x0112 }, /* Emacron Ē LATIN CAPITAL LETTER E WITH MACRON */ + { 0x03ab, 0x0122 }, /* Gcedilla Ģ LATIN CAPITAL LETTER G WITH CEDILLA */ + { 0x03ac, 0x0166 }, /* Tslash Ŧ LATIN CAPITAL LETTER T WITH STROKE */ + { 0x03b3, 0x0157 }, /* rcedilla ŗ LATIN SMALL LETTER R WITH CEDILLA */ + { 0x03b5, 0x0129 }, /* itilde ĩ LATIN SMALL LETTER I WITH TILDE */ + { 0x03b6, 0x013c }, /* lcedilla ļ LATIN SMALL LETTER L WITH CEDILLA */ + { 0x03ba, 0x0113 }, /* emacron ē LATIN SMALL LETTER E WITH MACRON */ + { 0x03bb, 0x0123 }, /* gcedilla ģ LATIN SMALL LETTER G WITH CEDILLA */ + { 0x03bc, 0x0167 }, /* tslash ŧ LATIN SMALL LETTER T WITH STROKE */ + { 0x03bd, 0x014a }, /* ENG Ŋ LATIN CAPITAL LETTER ENG */ + { 0x03bf, 0x014b }, /* eng ŋ LATIN SMALL LETTER ENG */ + { 0x03c0, 0x0100 }, /* Amacron Ā LATIN CAPITAL LETTER A WITH MACRON */ + { 0x03c7, 0x012e }, /* Iogonek Į LATIN CAPITAL LETTER I WITH OGONEK */ + { 0x03cc, 0x0116 }, /* Eabovedot Ė LATIN CAPITAL LETTER E WITH DOT ABOVE */ + { 0x03cf, 0x012a }, /* Imacron Ī LATIN CAPITAL LETTER I WITH MACRON */ + { 0x03d1, 0x0145 }, /* Ncedilla Ņ LATIN CAPITAL LETTER N WITH CEDILLA */ + { 0x03d2, 0x014c }, /* Omacron Ō LATIN CAPITAL LETTER O WITH MACRON */ + { 0x03d3, 0x0136 }, /* Kcedilla Ķ LATIN CAPITAL LETTER K WITH CEDILLA */ + { 0x03d9, 0x0172 }, /* Uogonek Ų LATIN CAPITAL LETTER U WITH OGONEK */ + { 0x03dd, 0x0168 }, /* Utilde Ũ LATIN CAPITAL LETTER U WITH TILDE */ + { 0x03de, 0x016a }, /* Umacron Ū LATIN CAPITAL LETTER U WITH MACRON */ + { 0x03e0, 0x0101 }, /* amacron ā LATIN SMALL LETTER A WITH MACRON */ + { 0x03e7, 0x012f }, /* iogonek į LATIN SMALL LETTER I WITH OGONEK */ + { 0x03ec, 0x0117 }, /* eabovedot ė LATIN SMALL LETTER E WITH DOT ABOVE */ + { 0x03ef, 0x012b }, /* imacron ī LATIN SMALL LETTER I WITH MACRON */ + { 0x03f1, 0x0146 }, /* ncedilla ņ LATIN SMALL LETTER N WITH CEDILLA */ + { 0x03f2, 0x014d }, /* omacron ō LATIN SMALL LETTER O WITH MACRON */ + { 0x03f3, 0x0137 }, /* kcedilla ķ LATIN SMALL LETTER K WITH CEDILLA */ + { 0x03f9, 0x0173 }, /* uogonek ų LATIN SMALL LETTER U WITH OGONEK */ + { 0x03fd, 0x0169 }, /* utilde ũ LATIN SMALL LETTER U WITH TILDE */ + { 0x03fe, 0x016b }, /* umacron ū LATIN SMALL LETTER U WITH MACRON */ + { 0x047e, 0x203e }, /* overline ‾ OVERLINE */ + { 0x04a1, 0x3002 }, /* kana_fullstop 。 IDEOGRAPHIC FULL STOP */ + { 0x04a2, 0x300c }, /* kana_openingbracket 「 LEFT CORNER BRACKET */ + { 0x04a3, 0x300d }, /* kana_closingbracket 」 RIGHT CORNER BRACKET */ + { 0x04a4, 0x3001 }, /* kana_comma 、 IDEOGRAPHIC COMMA */ + { 0x04a5, 0x30fb }, /* kana_conjunctive ・ KATAKANA MIDDLE DOT */ + { 0x04a6, 0x30f2 }, /* kana_WO ヲ KATAKANA LETTER WO */ + { 0x04a7, 0x30a1 }, /* kana_a ァ KATAKANA LETTER SMALL A */ + { 0x04a8, 0x30a3 }, /* kana_i ィ KATAKANA LETTER SMALL I */ + { 0x04a9, 0x30a5 }, /* kana_u ゥ KATAKANA LETTER SMALL U */ + { 0x04aa, 0x30a7 }, /* kana_e ェ KATAKANA LETTER SMALL E */ + { 0x04ab, 0x30a9 }, /* kana_o ォ KATAKANA LETTER SMALL O */ + { 0x04ac, 0x30e3 }, /* kana_ya ャ KATAKANA LETTER SMALL YA */ + { 0x04ad, 0x30e5 }, /* kana_yu ュ KATAKANA LETTER SMALL YU */ + { 0x04ae, 0x30e7 }, /* kana_yo ョ KATAKANA LETTER SMALL YO */ + { 0x04af, 0x30c3 }, /* kana_tsu ッ KATAKANA LETTER SMALL TU */ + { 0x04b0, 0x30fc }, /* prolongedsound ー KATAKANA-HIRAGANA PROLONGED SOUND MARK */ + { 0x04b1, 0x30a2 }, /* kana_A ア KATAKANA LETTER A */ + { 0x04b2, 0x30a4 }, /* kana_I イ KATAKANA LETTER I */ + { 0x04b3, 0x30a6 }, /* kana_U ウ KATAKANA LETTER U */ + { 0x04b4, 0x30a8 }, /* kana_E エ KATAKANA LETTER E */ + { 0x04b5, 0x30aa }, /* kana_O オ KATAKANA LETTER O */ + { 0x04b6, 0x30ab }, /* kana_KA カ KATAKANA LETTER KA */ + { 0x04b7, 0x30ad }, /* kana_KI キ KATAKANA LETTER KI */ + { 0x04b8, 0x30af }, /* kana_KU ク KATAKANA LETTER KU */ + { 0x04b9, 0x30b1 }, /* kana_KE ケ KATAKANA LETTER KE */ + { 0x04ba, 0x30b3 }, /* kana_KO コ KATAKANA LETTER KO */ + { 0x04bb, 0x30b5 }, /* kana_SA サ KATAKANA LETTER SA */ + { 0x04bc, 0x30b7 }, /* kana_SHI シ KATAKANA LETTER SI */ + { 0x04bd, 0x30b9 }, /* kana_SU ス KATAKANA LETTER SU */ + { 0x04be, 0x30bb }, /* kana_SE セ KATAKANA LETTER SE */ + { 0x04bf, 0x30bd }, /* kana_SO ソ KATAKANA LETTER SO */ + { 0x04c0, 0x30bf }, /* kana_TA タ KATAKANA LETTER TA */ + { 0x04c1, 0x30c1 }, /* kana_CHI チ KATAKANA LETTER TI */ + { 0x04c2, 0x30c4 }, /* kana_TSU ツ KATAKANA LETTER TU */ + { 0x04c3, 0x30c6 }, /* kana_TE テ KATAKANA LETTER TE */ + { 0x04c4, 0x30c8 }, /* kana_TO ト KATAKANA LETTER TO */ + { 0x04c5, 0x30ca }, /* kana_NA ナ KATAKANA LETTER NA */ + { 0x04c6, 0x30cb }, /* kana_NI ニ KATAKANA LETTER NI */ + { 0x04c7, 0x30cc }, /* kana_NU ヌ KATAKANA LETTER NU */ + { 0x04c8, 0x30cd }, /* kana_NE ネ KATAKANA LETTER NE */ + { 0x04c9, 0x30ce }, /* kana_NO ノ KATAKANA LETTER NO */ + { 0x04ca, 0x30cf }, /* kana_HA ハ KATAKANA LETTER HA */ + { 0x04cb, 0x30d2 }, /* kana_HI ヒ KATAKANA LETTER HI */ + { 0x04cc, 0x30d5 }, /* kana_FU フ KATAKANA LETTER HU */ + { 0x04cd, 0x30d8 }, /* kana_HE ヘ KATAKANA LETTER HE */ + { 0x04ce, 0x30db }, /* kana_HO ホ KATAKANA LETTER HO */ + { 0x04cf, 0x30de }, /* kana_MA マ KATAKANA LETTER MA */ + { 0x04d0, 0x30df }, /* kana_MI ミ KATAKANA LETTER MI */ + { 0x04d1, 0x30e0 }, /* kana_MU ム KATAKANA LETTER MU */ + { 0x04d2, 0x30e1 }, /* kana_ME メ KATAKANA LETTER ME */ + { 0x04d3, 0x30e2 }, /* kana_MO モ KATAKANA LETTER MO */ + { 0x04d4, 0x30e4 }, /* kana_YA ヤ KATAKANA LETTER YA */ + { 0x04d5, 0x30e6 }, /* kana_YU ユ KATAKANA LETTER YU */ + { 0x04d6, 0x30e8 }, /* kana_YO ヨ KATAKANA LETTER YO */ + { 0x04d7, 0x30e9 }, /* kana_RA ラ KATAKANA LETTER RA */ + { 0x04d8, 0x30ea }, /* kana_RI リ KATAKANA LETTER RI */ + { 0x04d9, 0x30eb }, /* kana_RU ル KATAKANA LETTER RU */ + { 0x04da, 0x30ec }, /* kana_RE レ KATAKANA LETTER RE */ + { 0x04db, 0x30ed }, /* kana_RO ロ KATAKANA LETTER RO */ + { 0x04dc, 0x30ef }, /* kana_WA ワ KATAKANA LETTER WA */ + { 0x04dd, 0x30f3 }, /* kana_N ン KATAKANA LETTER N */ + { 0x04de, 0x309b }, /* voicedsound ゛ KATAKANA-HIRAGANA VOICED SOUND MARK */ + { 0x04df, 0x309c }, /* semivoicedsound ゜ KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */ + { 0x05ac, 0x060c }, /* Arabic_comma ، ARABIC COMMA */ + { 0x05bb, 0x061b }, /* Arabic_semicolon ؛ ARABIC SEMICOLON */ + { 0x05bf, 0x061f }, /* Arabic_question_mark ؟ ARABIC QUESTION MARK */ + { 0x05c1, 0x0621 }, /* Arabic_hamza ء ARABIC LETTER HAMZA */ + { 0x05c2, 0x0622 }, /* Arabic_maddaonalef آ ARABIC LETTER ALEF WITH MADDA ABOVE */ + { 0x05c3, 0x0623 }, /* Arabic_hamzaonalef أ ARABIC LETTER ALEF WITH HAMZA ABOVE */ + { 0x05c4, 0x0624 }, /* Arabic_hamzaonwaw ؤ ARABIC LETTER WAW WITH HAMZA ABOVE */ + { 0x05c5, 0x0625 }, /* Arabic_hamzaunderalef إ ARABIC LETTER ALEF WITH HAMZA BELOW */ + { 0x05c6, 0x0626 }, /* Arabic_hamzaonyeh ئ ARABIC LETTER YEH WITH HAMZA ABOVE */ + { 0x05c7, 0x0627 }, /* Arabic_alef ا ARABIC LETTER ALEF */ + { 0x05c8, 0x0628 }, /* Arabic_beh ب ARABIC LETTER BEH */ + { 0x05c9, 0x0629 }, /* Arabic_tehmarbuta ة ARABIC LETTER TEH MARBUTA */ + { 0x05ca, 0x062a }, /* Arabic_teh ت ARABIC LETTER TEH */ + { 0x05cb, 0x062b }, /* Arabic_theh ث ARABIC LETTER THEH */ + { 0x05cc, 0x062c }, /* Arabic_jeem ج ARABIC LETTER JEEM */ + { 0x05cd, 0x062d }, /* Arabic_hah ح ARABIC LETTER HAH */ + { 0x05ce, 0x062e }, /* Arabic_khah خ ARABIC LETTER KHAH */ + { 0x05cf, 0x062f }, /* Arabic_dal د ARABIC LETTER DAL */ + { 0x05d0, 0x0630 }, /* Arabic_thal ذ ARABIC LETTER THAL */ + { 0x05d1, 0x0631 }, /* Arabic_ra ر ARABIC LETTER REH */ + { 0x05d2, 0x0632 }, /* Arabic_zain ز ARABIC LETTER ZAIN */ + { 0x05d3, 0x0633 }, /* Arabic_seen س ARABIC LETTER SEEN */ + { 0x05d4, 0x0634 }, /* Arabic_sheen ش ARABIC LETTER SHEEN */ + { 0x05d5, 0x0635 }, /* Arabic_sad ص ARABIC LETTER SAD */ + { 0x05d6, 0x0636 }, /* Arabic_dad ض ARABIC LETTER DAD */ + { 0x05d7, 0x0637 }, /* Arabic_tah ط ARABIC LETTER TAH */ + { 0x05d8, 0x0638 }, /* Arabic_zah ظ ARABIC LETTER ZAH */ + { 0x05d9, 0x0639 }, /* Arabic_ain ع ARABIC LETTER AIN */ + { 0x05da, 0x063a }, /* Arabic_ghain غ ARABIC LETTER GHAIN */ + { 0x05e0, 0x0640 }, /* Arabic_tatweel ـ ARABIC TATWEEL */ + { 0x05e1, 0x0641 }, /* Arabic_feh ف ARABIC LETTER FEH */ + { 0x05e2, 0x0642 }, /* Arabic_qaf ق ARABIC LETTER QAF */ + { 0x05e3, 0x0643 }, /* Arabic_kaf ك ARABIC LETTER KAF */ + { 0x05e4, 0x0644 }, /* Arabic_lam ل ARABIC LETTER LAM */ + { 0x05e5, 0x0645 }, /* Arabic_meem م ARABIC LETTER MEEM */ + { 0x05e6, 0x0646 }, /* Arabic_noon ن ARABIC LETTER NOON */ + { 0x05e7, 0x0647 }, /* Arabic_ha ه ARABIC LETTER HEH */ + { 0x05e8, 0x0648 }, /* Arabic_waw و ARABIC LETTER WAW */ + { 0x05e9, 0x0649 }, /* Arabic_alefmaksura ى ARABIC LETTER ALEF MAKSURA */ + { 0x05ea, 0x064a }, /* Arabic_yeh ي ARABIC LETTER YEH */ + { 0x05eb, 0x064b }, /* Arabic_fathatan ً ARABIC FATHATAN */ + { 0x05ec, 0x064c }, /* Arabic_dammatan ٌ ARABIC DAMMATAN */ + { 0x05ed, 0x064d }, /* Arabic_kasratan ٍ ARABIC KASRATAN */ + { 0x05ee, 0x064e }, /* Arabic_fatha َ ARABIC FATHA */ + { 0x05ef, 0x064f }, /* Arabic_damma ُ ARABIC DAMMA */ + { 0x05f0, 0x0650 }, /* Arabic_kasra ِ ARABIC KASRA */ + { 0x05f1, 0x0651 }, /* Arabic_shadda ّ ARABIC SHADDA */ + { 0x05f2, 0x0652 }, /* Arabic_sukun ْ ARABIC SUKUN */ + { 0x06a1, 0x0452 }, /* Serbian_dje ђ CYRILLIC SMALL LETTER DJE */ + { 0x06a2, 0x0453 }, /* Macedonia_gje ѓ CYRILLIC SMALL LETTER GJE */ + { 0x06a3, 0x0451 }, /* Cyrillic_io ё CYRILLIC SMALL LETTER IO */ + { 0x06a4, 0x0454 }, /* Ukrainian_ie є CYRILLIC SMALL LETTER UKRAINIAN IE */ + { 0x06a5, 0x0455 }, /* Macedonia_dse ѕ CYRILLIC SMALL LETTER DZE */ + { 0x06a6, 0x0456 }, /* Ukrainian_i і CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */ + { 0x06a7, 0x0457 }, /* Ukrainian_yi ї CYRILLIC SMALL LETTER YI */ + { 0x06a8, 0x0458 }, /* Cyrillic_je ј CYRILLIC SMALL LETTER JE */ + { 0x06a9, 0x0459 }, /* Cyrillic_lje љ CYRILLIC SMALL LETTER LJE */ + { 0x06aa, 0x045a }, /* Cyrillic_nje њ CYRILLIC SMALL LETTER NJE */ + { 0x06ab, 0x045b }, /* Serbian_tshe ћ CYRILLIC SMALL LETTER TSHE */ + { 0x06ac, 0x045c }, /* Macedonia_kje ќ CYRILLIC SMALL LETTER KJE */ + { 0x06ad, 0x0491 }, /* Ukrainian_ghe_with_upturn ґ CYRILLIC SMALL LETTER GHE WITH UPTURN */ + { 0x06ae, 0x045e }, /* Byelorussian_shortu ў CYRILLIC SMALL LETTER SHORT U */ + { 0x06af, 0x045f }, /* Cyrillic_dzhe џ CYRILLIC SMALL LETTER DZHE */ + { 0x06b0, 0x2116 }, /* numerosign № NUMERO SIGN */ + { 0x06b1, 0x0402 }, /* Serbian_DJE Ђ CYRILLIC CAPITAL LETTER DJE */ + { 0x06b2, 0x0403 }, /* Macedonia_GJE Ѓ CYRILLIC CAPITAL LETTER GJE */ + { 0x06b3, 0x0401 }, /* Cyrillic_IO Ё CYRILLIC CAPITAL LETTER IO */ + { 0x06b4, 0x0404 }, /* Ukrainian_IE Є CYRILLIC CAPITAL LETTER UKRAINIAN IE */ + { 0x06b5, 0x0405 }, /* Macedonia_DSE Ѕ CYRILLIC CAPITAL LETTER DZE */ + { 0x06b6, 0x0406 }, /* Ukrainian_I І CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */ + { 0x06b7, 0x0407 }, /* Ukrainian_YI Ї CYRILLIC CAPITAL LETTER YI */ + { 0x06b8, 0x0408 }, /* Cyrillic_JE Ј CYRILLIC CAPITAL LETTER JE */ + { 0x06b9, 0x0409 }, /* Cyrillic_LJE Љ CYRILLIC CAPITAL LETTER LJE */ + { 0x06ba, 0x040a }, /* Cyrillic_NJE Њ CYRILLIC CAPITAL LETTER NJE */ + { 0x06bb, 0x040b }, /* Serbian_TSHE Ћ CYRILLIC CAPITAL LETTER TSHE */ + { 0x06bc, 0x040c }, /* Macedonia_KJE Ќ CYRILLIC CAPITAL LETTER KJE */ + { 0x06bd, 0x0490 }, /* Ukrainian_GHE_WITH_UPTURN Ґ CYRILLIC CAPITAL LETTER GHE WITH UPTURN */ + { 0x06be, 0x040e }, /* Byelorussian_SHORTU Ў CYRILLIC CAPITAL LETTER SHORT U */ + { 0x06bf, 0x040f }, /* Cyrillic_DZHE Џ CYRILLIC CAPITAL LETTER DZHE */ + { 0x06c0, 0x044e }, /* Cyrillic_yu ю CYRILLIC SMALL LETTER YU */ + { 0x06c1, 0x0430 }, /* Cyrillic_a а CYRILLIC SMALL LETTER A */ + { 0x06c2, 0x0431 }, /* Cyrillic_be б CYRILLIC SMALL LETTER BE */ + { 0x06c3, 0x0446 }, /* Cyrillic_tse ц CYRILLIC SMALL LETTER TSE */ + { 0x06c4, 0x0434 }, /* Cyrillic_de д CYRILLIC SMALL LETTER DE */ + { 0x06c5, 0x0435 }, /* Cyrillic_ie е CYRILLIC SMALL LETTER IE */ + { 0x06c6, 0x0444 }, /* Cyrillic_ef ф CYRILLIC SMALL LETTER EF */ + { 0x06c7, 0x0433 }, /* Cyrillic_ghe г CYRILLIC SMALL LETTER GHE */ + { 0x06c8, 0x0445 }, /* Cyrillic_ha х CYRILLIC SMALL LETTER HA */ + { 0x06c9, 0x0438 }, /* Cyrillic_i и CYRILLIC SMALL LETTER I */ + { 0x06ca, 0x0439 }, /* Cyrillic_shorti й CYRILLIC SMALL LETTER SHORT I */ + { 0x06cb, 0x043a }, /* Cyrillic_ka к CYRILLIC SMALL LETTER KA */ + { 0x06cc, 0x043b }, /* Cyrillic_el л CYRILLIC SMALL LETTER EL */ + { 0x06cd, 0x043c }, /* Cyrillic_em м CYRILLIC SMALL LETTER EM */ + { 0x06ce, 0x043d }, /* Cyrillic_en н CYRILLIC SMALL LETTER EN */ + { 0x06cf, 0x043e }, /* Cyrillic_o о CYRILLIC SMALL LETTER O */ + { 0x06d0, 0x043f }, /* Cyrillic_pe п CYRILLIC SMALL LETTER PE */ + { 0x06d1, 0x044f }, /* Cyrillic_ya я CYRILLIC SMALL LETTER YA */ + { 0x06d2, 0x0440 }, /* Cyrillic_er р CYRILLIC SMALL LETTER ER */ + { 0x06d3, 0x0441 }, /* Cyrillic_es с CYRILLIC SMALL LETTER ES */ + { 0x06d4, 0x0442 }, /* Cyrillic_te т CYRILLIC SMALL LETTER TE */ + { 0x06d5, 0x0443 }, /* Cyrillic_u у CYRILLIC SMALL LETTER U */ + { 0x06d6, 0x0436 }, /* Cyrillic_zhe ж CYRILLIC SMALL LETTER ZHE */ + { 0x06d7, 0x0432 }, /* Cyrillic_ve в CYRILLIC SMALL LETTER VE */ + { 0x06d8, 0x044c }, /* Cyrillic_softsign ь CYRILLIC SMALL LETTER SOFT SIGN */ + { 0x06d9, 0x044b }, /* Cyrillic_yeru ы CYRILLIC SMALL LETTER YERU */ + { 0x06da, 0x0437 }, /* Cyrillic_ze з CYRILLIC SMALL LETTER ZE */ + { 0x06db, 0x0448 }, /* Cyrillic_sha ш CYRILLIC SMALL LETTER SHA */ + { 0x06dc, 0x044d }, /* Cyrillic_e э CYRILLIC SMALL LETTER E */ + { 0x06dd, 0x0449 }, /* Cyrillic_shcha щ CYRILLIC SMALL LETTER SHCHA */ + { 0x06de, 0x0447 }, /* Cyrillic_che ч CYRILLIC SMALL LETTER CHE */ + { 0x06df, 0x044a }, /* Cyrillic_hardsign ъ CYRILLIC SMALL LETTER HARD SIGN */ + { 0x06e0, 0x042e }, /* Cyrillic_YU Ю CYRILLIC CAPITAL LETTER YU */ + { 0x06e1, 0x0410 }, /* Cyrillic_A А CYRILLIC CAPITAL LETTER A */ + { 0x06e2, 0x0411 }, /* Cyrillic_BE Б CYRILLIC CAPITAL LETTER BE */ + { 0x06e3, 0x0426 }, /* Cyrillic_TSE Ц CYRILLIC CAPITAL LETTER TSE */ + { 0x06e4, 0x0414 }, /* Cyrillic_DE Д CYRILLIC CAPITAL LETTER DE */ + { 0x06e5, 0x0415 }, /* Cyrillic_IE Е CYRILLIC CAPITAL LETTER IE */ + { 0x06e6, 0x0424 }, /* Cyrillic_EF Ф CYRILLIC CAPITAL LETTER EF */ + { 0x06e7, 0x0413 }, /* Cyrillic_GHE Г CYRILLIC CAPITAL LETTER GHE */ + { 0x06e8, 0x0425 }, /* Cyrillic_HA Х CYRILLIC CAPITAL LETTER HA */ + { 0x06e9, 0x0418 }, /* Cyrillic_I И CYRILLIC CAPITAL LETTER I */ + { 0x06ea, 0x0419 }, /* Cyrillic_SHORTI Й CYRILLIC CAPITAL LETTER SHORT I */ + { 0x06eb, 0x041a }, /* Cyrillic_KA К CYRILLIC CAPITAL LETTER KA */ + { 0x06ec, 0x041b }, /* Cyrillic_EL Л CYRILLIC CAPITAL LETTER EL */ + { 0x06ed, 0x041c }, /* Cyrillic_EM М CYRILLIC CAPITAL LETTER EM */ + { 0x06ee, 0x041d }, /* Cyrillic_EN Н CYRILLIC CAPITAL LETTER EN */ + { 0x06ef, 0x041e }, /* Cyrillic_O О CYRILLIC CAPITAL LETTER O */ + { 0x06f0, 0x041f }, /* Cyrillic_PE П CYRILLIC CAPITAL LETTER PE */ + { 0x06f1, 0x042f }, /* Cyrillic_YA Я CYRILLIC CAPITAL LETTER YA */ + { 0x06f2, 0x0420 }, /* Cyrillic_ER Р CYRILLIC CAPITAL LETTER ER */ + { 0x06f3, 0x0421 }, /* Cyrillic_ES С CYRILLIC CAPITAL LETTER ES */ + { 0x06f4, 0x0422 }, /* Cyrillic_TE Т CYRILLIC CAPITAL LETTER TE */ + { 0x06f5, 0x0423 }, /* Cyrillic_U У CYRILLIC CAPITAL LETTER U */ + { 0x06f6, 0x0416 }, /* Cyrillic_ZHE Ж CYRILLIC CAPITAL LETTER ZHE */ + { 0x06f7, 0x0412 }, /* Cyrillic_VE В CYRILLIC CAPITAL LETTER VE */ + { 0x06f8, 0x042c }, /* Cyrillic_SOFTSIGN Ь CYRILLIC CAPITAL LETTER SOFT SIGN */ + { 0x06f9, 0x042b }, /* Cyrillic_YERU Ы CYRILLIC CAPITAL LETTER YERU */ + { 0x06fa, 0x0417 }, /* Cyrillic_ZE З CYRILLIC CAPITAL LETTER ZE */ + { 0x06fb, 0x0428 }, /* Cyrillic_SHA Ш CYRILLIC CAPITAL LETTER SHA */ + { 0x06fc, 0x042d }, /* Cyrillic_E Э CYRILLIC CAPITAL LETTER E */ + { 0x06fd, 0x0429 }, /* Cyrillic_SHCHA Щ CYRILLIC CAPITAL LETTER SHCHA */ + { 0x06fe, 0x0427 }, /* Cyrillic_CHE Ч CYRILLIC CAPITAL LETTER CHE */ + { 0x06ff, 0x042a }, /* Cyrillic_HARDSIGN Ъ CYRILLIC CAPITAL LETTER HARD SIGN */ + { 0x07a1, 0x0386 }, /* Greek_ALPHAaccent Ά GREEK CAPITAL LETTER ALPHA WITH TONOS */ + { 0x07a2, 0x0388 }, /* Greek_EPSILONaccent Έ GREEK CAPITAL LETTER EPSILON WITH TONOS */ + { 0x07a3, 0x0389 }, /* Greek_ETAaccent Ή GREEK CAPITAL LETTER ETA WITH TONOS */ + { 0x07a4, 0x038a }, /* Greek_IOTAaccent Ί GREEK CAPITAL LETTER IOTA WITH TONOS */ + { 0x07a5, 0x03aa }, /* Greek_IOTAdieresis Ϊ GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */ + { 0x07a7, 0x038c }, /* Greek_OMICRONaccent Ό GREEK CAPITAL LETTER OMICRON WITH TONOS */ + { 0x07a8, 0x038e }, /* Greek_UPSILONaccent Ύ GREEK CAPITAL LETTER UPSILON WITH TONOS */ + { 0x07a9, 0x03ab }, /* Greek_UPSILONdieresis Ϋ GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */ + { 0x07ab, 0x038f }, /* Greek_OMEGAaccent Ώ GREEK CAPITAL LETTER OMEGA WITH TONOS */ + { 0x07ae, 0x0385 }, /* Greek_accentdieresis ΅ GREEK DIALYTIKA TONOS */ + { 0x07af, 0x2015 }, /* Greek_horizbar ― HORIZONTAL BAR */ + { 0x07b1, 0x03ac }, /* Greek_alphaaccent ά GREEK SMALL LETTER ALPHA WITH TONOS */ + { 0x07b2, 0x03ad }, /* Greek_epsilonaccent έ GREEK SMALL LETTER EPSILON WITH TONOS */ + { 0x07b3, 0x03ae }, /* Greek_etaaccent ή GREEK SMALL LETTER ETA WITH TONOS */ + { 0x07b4, 0x03af }, /* Greek_iotaaccent ί GREEK SMALL LETTER IOTA WITH TONOS */ + { 0x07b5, 0x03ca }, /* Greek_iotadieresis ϊ GREEK SMALL LETTER IOTA WITH DIALYTIKA */ + { 0x07b6, 0x0390 }, /* Greek_iotaaccentdieresis ΐ GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */ + { 0x07b7, 0x03cc }, /* Greek_omicronaccent ό GREEK SMALL LETTER OMICRON WITH TONOS */ + { 0x07b8, 0x03cd }, /* Greek_upsilonaccent ύ GREEK SMALL LETTER UPSILON WITH TONOS */ + { 0x07b9, 0x03cb }, /* Greek_upsilondieresis ϋ GREEK SMALL LETTER UPSILON WITH DIALYTIKA */ + { 0x07ba, 0x03b0 }, /* Greek_upsilonaccentdieresis ΰ GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */ + { 0x07bb, 0x03ce }, /* Greek_omegaaccent ώ GREEK SMALL LETTER OMEGA WITH TONOS */ + { 0x07c1, 0x0391 }, /* Greek_ALPHA Α GREEK CAPITAL LETTER ALPHA */ + { 0x07c2, 0x0392 }, /* Greek_BETA Β GREEK CAPITAL LETTER BETA */ + { 0x07c3, 0x0393 }, /* Greek_GAMMA Γ GREEK CAPITAL LETTER GAMMA */ + { 0x07c4, 0x0394 }, /* Greek_DELTA Δ GREEK CAPITAL LETTER DELTA */ + { 0x07c5, 0x0395 }, /* Greek_EPSILON Ε GREEK CAPITAL LETTER EPSILON */ + { 0x07c6, 0x0396 }, /* Greek_ZETA Ζ GREEK CAPITAL LETTER ZETA */ + { 0x07c7, 0x0397 }, /* Greek_ETA Η GREEK CAPITAL LETTER ETA */ + { 0x07c8, 0x0398 }, /* Greek_THETA Θ GREEK CAPITAL LETTER THETA */ + { 0x07c9, 0x0399 }, /* Greek_IOTA Ι GREEK CAPITAL LETTER IOTA */ + { 0x07ca, 0x039a }, /* Greek_KAPPA Κ GREEK CAPITAL LETTER KAPPA */ + { 0x07cb, 0x039b }, /* Greek_LAMBDA Λ GREEK CAPITAL LETTER LAMDA */ + { 0x07cc, 0x039c }, /* Greek_MU Μ GREEK CAPITAL LETTER MU */ + { 0x07cd, 0x039d }, /* Greek_NU Ν GREEK CAPITAL LETTER NU */ + { 0x07ce, 0x039e }, /* Greek_XI Ξ GREEK CAPITAL LETTER XI */ + { 0x07cf, 0x039f }, /* Greek_OMICRON Ο GREEK CAPITAL LETTER OMICRON */ + { 0x07d0, 0x03a0 }, /* Greek_PI Π GREEK CAPITAL LETTER PI */ + { 0x07d1, 0x03a1 }, /* Greek_RHO Ρ GREEK CAPITAL LETTER RHO */ + { 0x07d2, 0x03a3 }, /* Greek_SIGMA Σ GREEK CAPITAL LETTER SIGMA */ + { 0x07d4, 0x03a4 }, /* Greek_TAU Τ GREEK CAPITAL LETTER TAU */ + { 0x07d5, 0x03a5 }, /* Greek_UPSILON Υ GREEK CAPITAL LETTER UPSILON */ + { 0x07d6, 0x03a6 }, /* Greek_PHI Φ GREEK CAPITAL LETTER PHI */ + { 0x07d7, 0x03a7 }, /* Greek_CHI Χ GREEK CAPITAL LETTER CHI */ + { 0x07d8, 0x03a8 }, /* Greek_PSI Ψ GREEK CAPITAL LETTER PSI */ + { 0x07d9, 0x03a9 }, /* Greek_OMEGA Ω GREEK CAPITAL LETTER OMEGA */ + { 0x07e1, 0x03b1 }, /* Greek_alpha α GREEK SMALL LETTER ALPHA */ + { 0x07e2, 0x03b2 }, /* Greek_beta β GREEK SMALL LETTER BETA */ + { 0x07e3, 0x03b3 }, /* Greek_gamma γ GREEK SMALL LETTER GAMMA */ + { 0x07e4, 0x03b4 }, /* Greek_delta δ GREEK SMALL LETTER DELTA */ + { 0x07e5, 0x03b5 }, /* Greek_epsilon ε GREEK SMALL LETTER EPSILON */ + { 0x07e6, 0x03b6 }, /* Greek_zeta ζ GREEK SMALL LETTER ZETA */ + { 0x07e7, 0x03b7 }, /* Greek_eta η GREEK SMALL LETTER ETA */ + { 0x07e8, 0x03b8 }, /* Greek_theta θ GREEK SMALL LETTER THETA */ + { 0x07e9, 0x03b9 }, /* Greek_iota ι GREEK SMALL LETTER IOTA */ + { 0x07ea, 0x03ba }, /* Greek_kappa κ GREEK SMALL LETTER KAPPA */ + { 0x07eb, 0x03bb }, /* Greek_lambda λ GREEK SMALL LETTER LAMDA */ + { 0x07ec, 0x03bc }, /* Greek_mu μ GREEK SMALL LETTER MU */ + { 0x07ed, 0x03bd }, /* Greek_nu ν GREEK SMALL LETTER NU */ + { 0x07ee, 0x03be }, /* Greek_xi ξ GREEK SMALL LETTER XI */ + { 0x07ef, 0x03bf }, /* Greek_omicron ο GREEK SMALL LETTER OMICRON */ + { 0x07f0, 0x03c0 }, /* Greek_pi π GREEK SMALL LETTER PI */ + { 0x07f1, 0x03c1 }, /* Greek_rho ρ GREEK SMALL LETTER RHO */ + { 0x07f2, 0x03c3 }, /* Greek_sigma σ GREEK SMALL LETTER SIGMA */ + { 0x07f3, 0x03c2 }, /* Greek_finalsmallsigma ς GREEK SMALL LETTER FINAL SIGMA */ + { 0x07f4, 0x03c4 }, /* Greek_tau τ GREEK SMALL LETTER TAU */ + { 0x07f5, 0x03c5 }, /* Greek_upsilon υ GREEK SMALL LETTER UPSILON */ + { 0x07f6, 0x03c6 }, /* Greek_phi φ GREEK SMALL LETTER PHI */ + { 0x07f7, 0x03c7 }, /* Greek_chi χ GREEK SMALL LETTER CHI */ + { 0x07f8, 0x03c8 }, /* Greek_psi ψ GREEK SMALL LETTER PSI */ + { 0x07f9, 0x03c9 }, /* Greek_omega ω GREEK SMALL LETTER OMEGA */ +/* 0x08a1 leftradical ? ??? */ +/* 0x08a2 topleftradical ? ??? */ +/* 0x08a3 horizconnector ? ??? */ + { 0x08a4, 0x2320 }, /* topintegral ⌠ TOP HALF INTEGRAL */ + { 0x08a5, 0x2321 }, /* botintegral ⌡ BOTTOM HALF INTEGRAL */ + { 0x08a6, 0x2502 }, /* vertconnector │ BOX DRAWINGS LIGHT VERTICAL */ +/* 0x08a7 topleftsqbracket ? ??? */ +/* 0x08a8 botleftsqbracket ? ??? */ +/* 0x08a9 toprightsqbracket ? ??? */ +/* 0x08aa botrightsqbracket ? ??? */ +/* 0x08ab topleftparens ? ??? */ +/* 0x08ac botleftparens ? ??? */ +/* 0x08ad toprightparens ? ??? */ +/* 0x08ae botrightparens ? ??? */ +/* 0x08af leftmiddlecurlybrace ? ??? */ +/* 0x08b0 rightmiddlecurlybrace ? ??? */ +/* 0x08b1 topleftsummation ? ??? */ +/* 0x08b2 botleftsummation ? ??? */ +/* 0x08b3 topvertsummationconnector ? ??? */ +/* 0x08b4 botvertsummationconnector ? ??? */ +/* 0x08b5 toprightsummation ? ??? */ +/* 0x08b6 botrightsummation ? ??? */ +/* 0x08b7 rightmiddlesummation ? ??? */ + { 0x08bc, 0x2264 }, /* lessthanequal ≤ LESS-THAN OR EQUAL TO */ + { 0x08bd, 0x2260 }, /* notequal ≠ NOT EQUAL TO */ + { 0x08be, 0x2265 }, /* greaterthanequal ≥ GREATER-THAN OR EQUAL TO */ + { 0x08bf, 0x222b }, /* integral ∫ INTEGRAL */ + { 0x08c0, 0x2234 }, /* therefore ∴ THEREFORE */ + { 0x08c1, 0x221d }, /* variation ∝ PROPORTIONAL TO */ + { 0x08c2, 0x221e }, /* infinity ∞ INFINITY */ + { 0x08c5, 0x2207 }, /* nabla ∇ NABLA */ + { 0x08c8, 0x2245 }, /* approximate ≅ APPROXIMATELY EQUAL TO */ +/* 0x08c9 similarequal ? ??? */ + { 0x08cd, 0x21d4 }, /* ifonlyif ⇔ LEFT RIGHT DOUBLE ARROW */ + { 0x08ce, 0x21d2 }, /* implies ⇒ RIGHTWARDS DOUBLE ARROW */ + { 0x08cf, 0x2261 }, /* identical ≡ IDENTICAL TO */ + { 0x08d6, 0x221a }, /* radical √ SQUARE ROOT */ + { 0x08da, 0x2282 }, /* includedin ⊂ SUBSET OF */ + { 0x08db, 0x2283 }, /* includes ⊃ SUPERSET OF */ + { 0x08dc, 0x2229 }, /* intersection ∩ INTERSECTION */ + { 0x08dd, 0x222a }, /* union ∪ UNION */ + { 0x08de, 0x2227 }, /* logicaland ∧ LOGICAL AND */ + { 0x08df, 0x2228 }, /* logicalor ∨ LOGICAL OR */ + { 0x08ef, 0x2202 }, /* partialderivative ∂ PARTIAL DIFFERENTIAL */ + { 0x08f6, 0x0192 }, /* function ƒ LATIN SMALL LETTER F WITH HOOK */ + { 0x08fb, 0x2190 }, /* leftarrow ← LEFTWARDS ARROW */ + { 0x08fc, 0x2191 }, /* uparrow ↑ UPWARDS ARROW */ + { 0x08fd, 0x2192 }, /* rightarrow → RIGHTWARDS ARROW */ + { 0x08fe, 0x2193 }, /* downarrow ↓ DOWNWARDS ARROW */ + { 0x09df, 0x2422 }, /* blank ␢ BLANK SYMBOL */ + { 0x09e0, 0x25c6 }, /* soliddiamond ◆ BLACK DIAMOND */ + { 0x09e1, 0x2592 }, /* checkerboard ▒ MEDIUM SHADE */ + { 0x09e2, 0x2409 }, /* ht ␉ SYMBOL FOR HORIZONTAL TABULATION */ + { 0x09e3, 0x240c }, /* ff ␌ SYMBOL FOR FORM FEED */ + { 0x09e4, 0x240d }, /* cr ␍ SYMBOL FOR CARRIAGE RETURN */ + { 0x09e5, 0x240a }, /* lf ␊ SYMBOL FOR LINE FEED */ + { 0x09e8, 0x2424 }, /* nl ␤ SYMBOL FOR NEWLINE */ + { 0x09e9, 0x240b }, /* vt ␋ SYMBOL FOR VERTICAL TABULATION */ + { 0x09ea, 0x2518 }, /* lowrightcorner ┘ BOX DRAWINGS LIGHT UP AND LEFT */ + { 0x09eb, 0x2510 }, /* uprightcorner ┐ BOX DRAWINGS LIGHT DOWN AND LEFT */ + { 0x09ec, 0x250c }, /* upleftcorner ┌ BOX DRAWINGS LIGHT DOWN AND RIGHT */ + { 0x09ed, 0x2514 }, /* lowleftcorner └ BOX DRAWINGS LIGHT UP AND RIGHT */ + { 0x09ee, 0x253c }, /* crossinglines ┼ BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */ +/* 0x09ef horizlinescan1 ? ??? */ +/* 0x09f0 horizlinescan3 ? ??? */ + { 0x09f1, 0x2500 }, /* horizlinescan5 ─ BOX DRAWINGS LIGHT HORIZONTAL */ +/* 0x09f2 horizlinescan7 ? ??? */ +/* 0x09f3 horizlinescan9 ? ??? */ + { 0x09f4, 0x251c }, /* leftt ├ BOX DRAWINGS LIGHT VERTICAL AND RIGHT */ + { 0x09f5, 0x2524 }, /* rightt ┤ BOX DRAWINGS LIGHT VERTICAL AND LEFT */ + { 0x09f6, 0x2534 }, /* bott ┴ BOX DRAWINGS LIGHT UP AND HORIZONTAL */ + { 0x09f7, 0x252c }, /* topt ┬ BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */ + { 0x09f8, 0x2502 }, /* vertbar │ BOX DRAWINGS LIGHT VERTICAL */ + { 0x0aa1, 0x2003 }, /* emspace   EM SPACE */ + { 0x0aa2, 0x2002 }, /* enspace   EN SPACE */ + { 0x0aa3, 0x2004 }, /* em3space   THREE-PER-EM SPACE */ + { 0x0aa4, 0x2005 }, /* em4space   FOUR-PER-EM SPACE */ + { 0x0aa5, 0x2007 }, /* digitspace   FIGURE SPACE */ + { 0x0aa6, 0x2008 }, /* punctspace   PUNCTUATION SPACE */ + { 0x0aa7, 0x2009 }, /* thinspace   THIN SPACE */ + { 0x0aa8, 0x200a }, /* hairspace   HAIR SPACE */ + { 0x0aa9, 0x2014 }, /* emdash — EM DASH */ + { 0x0aaa, 0x2013 }, /* endash – EN DASH */ +/* 0x0aac signifblank ? ??? */ + { 0x0aae, 0x2026 }, /* ellipsis … HORIZONTAL ELLIPSIS */ +/* 0x0aaf doubbaselinedot ? ??? */ + { 0x0ab0, 0x2153 }, /* onethird ⅓ VULGAR FRACTION ONE THIRD */ + { 0x0ab1, 0x2154 }, /* twothirds ⅔ VULGAR FRACTION TWO THIRDS */ + { 0x0ab2, 0x2155 }, /* onefifth ⅕ VULGAR FRACTION ONE FIFTH */ + { 0x0ab3, 0x2156 }, /* twofifths ⅖ VULGAR FRACTION TWO FIFTHS */ + { 0x0ab4, 0x2157 }, /* threefifths ⅗ VULGAR FRACTION THREE FIFTHS */ + { 0x0ab5, 0x2158 }, /* fourfifths ⅘ VULGAR FRACTION FOUR FIFTHS */ + { 0x0ab6, 0x2159 }, /* onesixth ⅙ VULGAR FRACTION ONE SIXTH */ + { 0x0ab7, 0x215a }, /* fivesixths ⅚ VULGAR FRACTION FIVE SIXTHS */ + { 0x0ab8, 0x2105 }, /* careof ℅ CARE OF */ + { 0x0abb, 0x2012 }, /* figdash ‒ FIGURE DASH */ + { 0x0abc, 0x2329 }, /* leftanglebracket 〈 LEFT-POINTING ANGLE BRACKET */ + { 0x0abd, 0x002e }, /* decimalpoint . FULL STOP */ + { 0x0abe, 0x232a }, /* rightanglebracket 〉 RIGHT-POINTING ANGLE BRACKET */ +/* 0x0abf marker ? ??? */ + { 0x0ac3, 0x215b }, /* oneeighth ⅛ VULGAR FRACTION ONE EIGHTH */ + { 0x0ac4, 0x215c }, /* threeeighths ⅜ VULGAR FRACTION THREE EIGHTHS */ + { 0x0ac5, 0x215d }, /* fiveeighths ⅝ VULGAR FRACTION FIVE EIGHTHS */ + { 0x0ac6, 0x215e }, /* seveneighths ⅞ VULGAR FRACTION SEVEN EIGHTHS */ + { 0x0ac9, 0x2122 }, /* trademark ™ TRADE MARK SIGN */ + { 0x0aca, 0x2613 }, /* signaturemark ☓ SALTIRE */ +/* 0x0acb trademarkincircle ? ??? */ + { 0x0acc, 0x25c1 }, /* leftopentriangle ◁ WHITE LEFT-POINTING TRIANGLE */ + { 0x0acd, 0x25b7 }, /* rightopentriangle ▷ WHITE RIGHT-POINTING TRIANGLE */ + { 0x0ace, 0x25cb }, /* emopencircle ○ WHITE CIRCLE */ + { 0x0acf, 0x25a1 }, /* emopenrectangle □ WHITE SQUARE */ + { 0x0ad0, 0x2018 }, /* leftsinglequotemark ‘ LEFT SINGLE QUOTATION MARK */ + { 0x0ad1, 0x2019 }, /* rightsinglequotemark ’ RIGHT SINGLE QUOTATION MARK */ + { 0x0ad2, 0x201c }, /* leftdoublequotemark “ LEFT DOUBLE QUOTATION MARK */ + { 0x0ad3, 0x201d }, /* rightdoublequotemark ” RIGHT DOUBLE QUOTATION MARK */ + { 0x0ad4, 0x211e }, /* prescription ℞ PRESCRIPTION TAKE */ + { 0x0ad6, 0x2032 }, /* minutes ′ PRIME */ + { 0x0ad7, 0x2033 }, /* seconds ″ DOUBLE PRIME */ + { 0x0ad9, 0x271d }, /* latincross ✝ LATIN CROSS */ +/* 0x0ada hexagram ? ??? */ + { 0x0adb, 0x25ac }, /* filledrectbullet ▬ BLACK RECTANGLE */ + { 0x0adc, 0x25c0 }, /* filledlefttribullet ◀ BLACK LEFT-POINTING TRIANGLE */ + { 0x0add, 0x25b6 }, /* filledrighttribullet ▶ BLACK RIGHT-POINTING TRIANGLE */ + { 0x0ade, 0x25cf }, /* emfilledcircle ● BLACK CIRCLE */ + { 0x0adf, 0x25a0 }, /* emfilledrect ■ BLACK SQUARE */ + { 0x0ae0, 0x25e6 }, /* enopencircbullet ◦ WHITE BULLET */ + { 0x0ae1, 0x25ab }, /* enopensquarebullet ▫ WHITE SMALL SQUARE */ + { 0x0ae2, 0x25ad }, /* openrectbullet ▭ WHITE RECTANGLE */ + { 0x0ae3, 0x25b3 }, /* opentribulletup △ WHITE UP-POINTING TRIANGLE */ + { 0x0ae4, 0x25bd }, /* opentribulletdown ▽ WHITE DOWN-POINTING TRIANGLE */ + { 0x0ae5, 0x2606 }, /* openstar ☆ WHITE STAR */ + { 0x0ae6, 0x2022 }, /* enfilledcircbullet • BULLET */ + { 0x0ae7, 0x25aa }, /* enfilledsqbullet ▪ BLACK SMALL SQUARE */ + { 0x0ae8, 0x25b2 }, /* filledtribulletup ▲ BLACK UP-POINTING TRIANGLE */ + { 0x0ae9, 0x25bc }, /* filledtribulletdown ▼ BLACK DOWN-POINTING TRIANGLE */ + { 0x0aea, 0x261c }, /* leftpointer ☜ WHITE LEFT POINTING INDEX */ + { 0x0aeb, 0x261e }, /* rightpointer ☞ WHITE RIGHT POINTING INDEX */ + { 0x0aec, 0x2663 }, /* club ♣ BLACK CLUB SUIT */ + { 0x0aed, 0x2666 }, /* diamond ♦ BLACK DIAMOND SUIT */ + { 0x0aee, 0x2665 }, /* heart ♥ BLACK HEART SUIT */ + { 0x0af0, 0x2720 }, /* maltesecross ✠ MALTESE CROSS */ + { 0x0af1, 0x2020 }, /* dagger † DAGGER */ + { 0x0af2, 0x2021 }, /* doubledagger ‡ DOUBLE DAGGER */ + { 0x0af3, 0x2713 }, /* checkmark ✓ CHECK MARK */ + { 0x0af4, 0x2717 }, /* ballotcross ✗ BALLOT X */ + { 0x0af5, 0x266f }, /* musicalsharp ♯ MUSIC SHARP SIGN */ + { 0x0af6, 0x266d }, /* musicalflat ♭ MUSIC FLAT SIGN */ + { 0x0af7, 0x2642 }, /* malesymbol ♂ MALE SIGN */ + { 0x0af8, 0x2640 }, /* femalesymbol ♀ FEMALE SIGN */ + { 0x0af9, 0x260e }, /* telephone ☎ BLACK TELEPHONE */ + { 0x0afa, 0x2315 }, /* telephonerecorder ⌕ TELEPHONE RECORDER */ + { 0x0afb, 0x2117 }, /* phonographcopyright ℗ SOUND RECORDING COPYRIGHT */ + { 0x0afc, 0x2038 }, /* caret ‸ CARET */ + { 0x0afd, 0x201a }, /* singlelowquotemark ‚ SINGLE LOW-9 QUOTATION MARK */ + { 0x0afe, 0x201e }, /* doublelowquotemark „ DOUBLE LOW-9 QUOTATION MARK */ +/* 0x0aff cursor ? ??? */ + { 0x0ba3, 0x003c }, /* leftcaret < LESS-THAN SIGN */ + { 0x0ba6, 0x003e }, /* rightcaret > GREATER-THAN SIGN */ + { 0x0ba8, 0x2228 }, /* downcaret ∨ LOGICAL OR */ + { 0x0ba9, 0x2227 }, /* upcaret ∧ LOGICAL AND */ + { 0x0bc0, 0x00af }, /* overbar ¯ MACRON */ + { 0x0bc2, 0x22a4 }, /* downtack ⊤ DOWN TACK */ + { 0x0bc3, 0x2229 }, /* upshoe ∩ INTERSECTION */ + { 0x0bc4, 0x230a }, /* downstile ⌊ LEFT FLOOR */ + { 0x0bc6, 0x005f }, /* underbar _ LOW LINE */ + { 0x0bca, 0x2218 }, /* jot ∘ RING OPERATOR */ + { 0x0bcc, 0x2395 }, /* quad ⎕ APL FUNCTIONAL SYMBOL QUAD (Unicode 3.0) */ + { 0x0bce, 0x22a5 }, /* uptack ⊥ UP TACK */ + { 0x0bcf, 0x25cb }, /* circle ○ WHITE CIRCLE */ + { 0x0bd3, 0x2308 }, /* upstile ⌈ LEFT CEILING */ + { 0x0bd6, 0x222a }, /* downshoe ∪ UNION */ + { 0x0bd8, 0x2283 }, /* rightshoe ⊃ SUPERSET OF */ + { 0x0bda, 0x2282 }, /* leftshoe ⊂ SUBSET OF */ + { 0x0bdc, 0x22a3 }, /* lefttack ⊣ LEFT TACK */ + { 0x0bfc, 0x22a2 }, /* righttack ⊢ RIGHT TACK */ + { 0x0cdf, 0x2017 }, /* hebrew_doublelowline ‗ DOUBLE LOW LINE */ + { 0x0ce0, 0x05d0 }, /* hebrew_aleph א HEBREW LETTER ALEF */ + { 0x0ce1, 0x05d1 }, /* hebrew_bet ב HEBREW LETTER BET */ + { 0x0ce2, 0x05d2 }, /* hebrew_gimel ג HEBREW LETTER GIMEL */ + { 0x0ce3, 0x05d3 }, /* hebrew_dalet ד HEBREW LETTER DALET */ + { 0x0ce4, 0x05d4 }, /* hebrew_he ה HEBREW LETTER HE */ + { 0x0ce5, 0x05d5 }, /* hebrew_waw ו HEBREW LETTER VAV */ + { 0x0ce6, 0x05d6 }, /* hebrew_zain ז HEBREW LETTER ZAYIN */ + { 0x0ce7, 0x05d7 }, /* hebrew_chet ח HEBREW LETTER HET */ + { 0x0ce8, 0x05d8 }, /* hebrew_tet ט HEBREW LETTER TET */ + { 0x0ce9, 0x05d9 }, /* hebrew_yod י HEBREW LETTER YOD */ + { 0x0cea, 0x05da }, /* hebrew_finalkaph ך HEBREW LETTER FINAL KAF */ + { 0x0ceb, 0x05db }, /* hebrew_kaph כ HEBREW LETTER KAF */ + { 0x0cec, 0x05dc }, /* hebrew_lamed ל HEBREW LETTER LAMED */ + { 0x0ced, 0x05dd }, /* hebrew_finalmem ם HEBREW LETTER FINAL MEM */ + { 0x0cee, 0x05de }, /* hebrew_mem מ HEBREW LETTER MEM */ + { 0x0cef, 0x05df }, /* hebrew_finalnun ן HEBREW LETTER FINAL NUN */ + { 0x0cf0, 0x05e0 }, /* hebrew_nun נ HEBREW LETTER NUN */ + { 0x0cf1, 0x05e1 }, /* hebrew_samech ס HEBREW LETTER SAMEKH */ + { 0x0cf2, 0x05e2 }, /* hebrew_ayin ע HEBREW LETTER AYIN */ + { 0x0cf3, 0x05e3 }, /* hebrew_finalpe ף HEBREW LETTER FINAL PE */ + { 0x0cf4, 0x05e4 }, /* hebrew_pe פ HEBREW LETTER PE */ + { 0x0cf5, 0x05e5 }, /* hebrew_finalzade ץ HEBREW LETTER FINAL TSADI */ + { 0x0cf6, 0x05e6 }, /* hebrew_zade צ HEBREW LETTER TSADI */ + { 0x0cf7, 0x05e7 }, /* hebrew_qoph ק HEBREW LETTER QOF */ + { 0x0cf8, 0x05e8 }, /* hebrew_resh ר HEBREW LETTER RESH */ + { 0x0cf9, 0x05e9 }, /* hebrew_shin ש HEBREW LETTER SHIN */ + { 0x0cfa, 0x05ea }, /* hebrew_taw ת HEBREW LETTER TAV */ + { 0x0da1, 0x0e01 }, /* Thai_kokai ก THAI CHARACTER KO KAI */ + { 0x0da2, 0x0e02 }, /* Thai_khokhai ข THAI CHARACTER KHO KHAI */ + { 0x0da3, 0x0e03 }, /* Thai_khokhuat ฃ THAI CHARACTER KHO KHUAT */ + { 0x0da4, 0x0e04 }, /* Thai_khokhwai ค THAI CHARACTER KHO KHWAI */ + { 0x0da5, 0x0e05 }, /* Thai_khokhon ฅ THAI CHARACTER KHO KHON */ + { 0x0da6, 0x0e06 }, /* Thai_khorakhang ฆ THAI CHARACTER KHO RAKHANG */ + { 0x0da7, 0x0e07 }, /* Thai_ngongu ง THAI CHARACTER NGO NGU */ + { 0x0da8, 0x0e08 }, /* Thai_chochan จ THAI CHARACTER CHO CHAN */ + { 0x0da9, 0x0e09 }, /* Thai_choching ฉ THAI CHARACTER CHO CHING */ + { 0x0daa, 0x0e0a }, /* Thai_chochang ช THAI CHARACTER CHO CHANG */ + { 0x0dab, 0x0e0b }, /* Thai_soso ซ THAI CHARACTER SO SO */ + { 0x0dac, 0x0e0c }, /* Thai_chochoe ฌ THAI CHARACTER CHO CHOE */ + { 0x0dad, 0x0e0d }, /* Thai_yoying ญ THAI CHARACTER YO YING */ + { 0x0dae, 0x0e0e }, /* Thai_dochada ฎ THAI CHARACTER DO CHADA */ + { 0x0daf, 0x0e0f }, /* Thai_topatak ฏ THAI CHARACTER TO PATAK */ + { 0x0db0, 0x0e10 }, /* Thai_thothan ฐ THAI CHARACTER THO THAN */ + { 0x0db1, 0x0e11 }, /* Thai_thonangmontho ฑ THAI CHARACTER THO NANGMONTHO */ + { 0x0db2, 0x0e12 }, /* Thai_thophuthao ฒ THAI CHARACTER THO PHUTHAO */ + { 0x0db3, 0x0e13 }, /* Thai_nonen ณ THAI CHARACTER NO NEN */ + { 0x0db4, 0x0e14 }, /* Thai_dodek ด THAI CHARACTER DO DEK */ + { 0x0db5, 0x0e15 }, /* Thai_totao ต THAI CHARACTER TO TAO */ + { 0x0db6, 0x0e16 }, /* Thai_thothung ถ THAI CHARACTER THO THUNG */ + { 0x0db7, 0x0e17 }, /* Thai_thothahan ท THAI CHARACTER THO THAHAN */ + { 0x0db8, 0x0e18 }, /* Thai_thothong ธ THAI CHARACTER THO THONG */ + { 0x0db9, 0x0e19 }, /* Thai_nonu น THAI CHARACTER NO NU */ + { 0x0dba, 0x0e1a }, /* Thai_bobaimai บ THAI CHARACTER BO BAIMAI */ + { 0x0dbb, 0x0e1b }, /* Thai_popla ป THAI CHARACTER PO PLA */ + { 0x0dbc, 0x0e1c }, /* Thai_phophung ผ THAI CHARACTER PHO PHUNG */ + { 0x0dbd, 0x0e1d }, /* Thai_fofa ฝ THAI CHARACTER FO FA */ + { 0x0dbe, 0x0e1e }, /* Thai_phophan พ THAI CHARACTER PHO PHAN */ + { 0x0dbf, 0x0e1f }, /* Thai_fofan ฟ THAI CHARACTER FO FAN */ + { 0x0dc0, 0x0e20 }, /* Thai_phosamphao ภ THAI CHARACTER PHO SAMPHAO */ + { 0x0dc1, 0x0e21 }, /* Thai_moma ม THAI CHARACTER MO MA */ + { 0x0dc2, 0x0e22 }, /* Thai_yoyak ย THAI CHARACTER YO YAK */ + { 0x0dc3, 0x0e23 }, /* Thai_rorua ร THAI CHARACTER RO RUA */ + { 0x0dc4, 0x0e24 }, /* Thai_ru ฤ THAI CHARACTER RU */ + { 0x0dc5, 0x0e25 }, /* Thai_loling ล THAI CHARACTER LO LING */ + { 0x0dc6, 0x0e26 }, /* Thai_lu ฦ THAI CHARACTER LU */ + { 0x0dc7, 0x0e27 }, /* Thai_wowaen ว THAI CHARACTER WO WAEN */ + { 0x0dc8, 0x0e28 }, /* Thai_sosala ศ THAI CHARACTER SO SALA */ + { 0x0dc9, 0x0e29 }, /* Thai_sorusi ษ THAI CHARACTER SO RUSI */ + { 0x0dca, 0x0e2a }, /* Thai_sosua ส THAI CHARACTER SO SUA */ + { 0x0dcb, 0x0e2b }, /* Thai_hohip ห THAI CHARACTER HO HIP */ + { 0x0dcc, 0x0e2c }, /* Thai_lochula ฬ THAI CHARACTER LO CHULA */ + { 0x0dcd, 0x0e2d }, /* Thai_oang อ THAI CHARACTER O ANG */ + { 0x0dce, 0x0e2e }, /* Thai_honokhuk ฮ THAI CHARACTER HO NOKHUK */ + { 0x0dcf, 0x0e2f }, /* Thai_paiyannoi ฯ THAI CHARACTER PAIYANNOI */ + { 0x0dd0, 0x0e30 }, /* Thai_saraa ะ THAI CHARACTER SARA A */ + { 0x0dd1, 0x0e31 }, /* Thai_maihanakat ั THAI CHARACTER MAI HAN-AKAT */ + { 0x0dd2, 0x0e32 }, /* Thai_saraaa า THAI CHARACTER SARA AA */ + { 0x0dd3, 0x0e33 }, /* Thai_saraam ำ THAI CHARACTER SARA AM */ + { 0x0dd4, 0x0e34 }, /* Thai_sarai ิ THAI CHARACTER SARA I */ + { 0x0dd5, 0x0e35 }, /* Thai_saraii ี THAI CHARACTER SARA II */ + { 0x0dd6, 0x0e36 }, /* Thai_saraue ึ THAI CHARACTER SARA UE */ + { 0x0dd7, 0x0e37 }, /* Thai_sarauee ื THAI CHARACTER SARA UEE */ + { 0x0dd8, 0x0e38 }, /* Thai_sarau ุ THAI CHARACTER SARA U */ + { 0x0dd9, 0x0e39 }, /* Thai_sarauu ู THAI CHARACTER SARA UU */ + { 0x0dda, 0x0e3a }, /* Thai_phinthu ฺ THAI CHARACTER PHINTHU */ + { 0x0dde, 0x0e3e }, /* Thai_maihanakat_maitho ฾ ??? */ + { 0x0ddf, 0x0e3f }, /* Thai_baht ฿ THAI CURRENCY SYMBOL BAHT */ + { 0x0de0, 0x0e40 }, /* Thai_sarae เ THAI CHARACTER SARA E */ + { 0x0de1, 0x0e41 }, /* Thai_saraae แ THAI CHARACTER SARA AE */ + { 0x0de2, 0x0e42 }, /* Thai_sarao โ THAI CHARACTER SARA O */ + { 0x0de3, 0x0e43 }, /* Thai_saraaimaimuan ใ THAI CHARACTER SARA AI MAIMUAN */ + { 0x0de4, 0x0e44 }, /* Thai_saraaimaimalai ไ THAI CHARACTER SARA AI MAIMALAI */ + { 0x0de5, 0x0e45 }, /* Thai_lakkhangyao ๅ THAI CHARACTER LAKKHANGYAO */ + { 0x0de6, 0x0e46 }, /* Thai_maiyamok ๆ THAI CHARACTER MAIYAMOK */ + { 0x0de7, 0x0e47 }, /* Thai_maitaikhu ็ THAI CHARACTER MAITAIKHU */ + { 0x0de8, 0x0e48 }, /* Thai_maiek ่ THAI CHARACTER MAI EK */ + { 0x0de9, 0x0e49 }, /* Thai_maitho ้ THAI CHARACTER MAI THO */ + { 0x0dea, 0x0e4a }, /* Thai_maitri ๊ THAI CHARACTER MAI TRI */ + { 0x0deb, 0x0e4b }, /* Thai_maichattawa ๋ THAI CHARACTER MAI CHATTAWA */ + { 0x0dec, 0x0e4c }, /* Thai_thanthakhat ์ THAI CHARACTER THANTHAKHAT */ + { 0x0ded, 0x0e4d }, /* Thai_nikhahit ํ THAI CHARACTER NIKHAHIT */ + { 0x0df0, 0x0e50 }, /* Thai_leksun ๐ THAI DIGIT ZERO */ + { 0x0df1, 0x0e51 }, /* Thai_leknung ๑ THAI DIGIT ONE */ + { 0x0df2, 0x0e52 }, /* Thai_leksong ๒ THAI DIGIT TWO */ + { 0x0df3, 0x0e53 }, /* Thai_leksam ๓ THAI DIGIT THREE */ + { 0x0df4, 0x0e54 }, /* Thai_leksi ๔ THAI DIGIT FOUR */ + { 0x0df5, 0x0e55 }, /* Thai_lekha ๕ THAI DIGIT FIVE */ + { 0x0df6, 0x0e56 }, /* Thai_lekhok ๖ THAI DIGIT SIX */ + { 0x0df7, 0x0e57 }, /* Thai_lekchet ๗ THAI DIGIT SEVEN */ + { 0x0df8, 0x0e58 }, /* Thai_lekpaet ๘ THAI DIGIT EIGHT */ + { 0x0df9, 0x0e59 }, /* Thai_lekkao ๙ THAI DIGIT NINE */ + { 0x0ea1, 0x3131 }, /* Hangul_Kiyeog ㄱ HANGUL LETTER KIYEOK */ + { 0x0ea2, 0x3132 }, /* Hangul_SsangKiyeog ㄲ HANGUL LETTER SSANGKIYEOK */ + { 0x0ea3, 0x3133 }, /* Hangul_KiyeogSios ㄳ HANGUL LETTER KIYEOK-SIOS */ + { 0x0ea4, 0x3134 }, /* Hangul_Nieun ㄴ HANGUL LETTER NIEUN */ + { 0x0ea5, 0x3135 }, /* Hangul_NieunJieuj ㄵ HANGUL LETTER NIEUN-CIEUC */ + { 0x0ea6, 0x3136 }, /* Hangul_NieunHieuh ㄶ HANGUL LETTER NIEUN-HIEUH */ + { 0x0ea7, 0x3137 }, /* Hangul_Dikeud ㄷ HANGUL LETTER TIKEUT */ + { 0x0ea8, 0x3138 }, /* Hangul_SsangDikeud ㄸ HANGUL LETTER SSANGTIKEUT */ + { 0x0ea9, 0x3139 }, /* Hangul_Rieul ㄹ HANGUL LETTER RIEUL */ + { 0x0eaa, 0x313a }, /* Hangul_RieulKiyeog ㄺ HANGUL LETTER RIEUL-KIYEOK */ + { 0x0eab, 0x313b }, /* Hangul_RieulMieum ㄻ HANGUL LETTER RIEUL-MIEUM */ + { 0x0eac, 0x313c }, /* Hangul_RieulPieub ㄼ HANGUL LETTER RIEUL-PIEUP */ + { 0x0ead, 0x313d }, /* Hangul_RieulSios ㄽ HANGUL LETTER RIEUL-SIOS */ + { 0x0eae, 0x313e }, /* Hangul_RieulTieut ㄾ HANGUL LETTER RIEUL-THIEUTH */ + { 0x0eaf, 0x313f }, /* Hangul_RieulPhieuf ㄿ HANGUL LETTER RIEUL-PHIEUPH */ + { 0x0eb0, 0x3140 }, /* Hangul_RieulHieuh ㅀ HANGUL LETTER RIEUL-HIEUH */ + { 0x0eb1, 0x3141 }, /* Hangul_Mieum ㅁ HANGUL LETTER MIEUM */ + { 0x0eb2, 0x3142 }, /* Hangul_Pieub ㅂ HANGUL LETTER PIEUP */ + { 0x0eb3, 0x3143 }, /* Hangul_SsangPieub ㅃ HANGUL LETTER SSANGPIEUP */ + { 0x0eb4, 0x3144 }, /* Hangul_PieubSios ㅄ HANGUL LETTER PIEUP-SIOS */ + { 0x0eb5, 0x3145 }, /* Hangul_Sios ㅅ HANGUL LETTER SIOS */ + { 0x0eb6, 0x3146 }, /* Hangul_SsangSios ㅆ HANGUL LETTER SSANGSIOS */ + { 0x0eb7, 0x3147 }, /* Hangul_Ieung ㅇ HANGUL LETTER IEUNG */ + { 0x0eb8, 0x3148 }, /* Hangul_Jieuj ㅈ HANGUL LETTER CIEUC */ + { 0x0eb9, 0x3149 }, /* Hangul_SsangJieuj ㅉ HANGUL LETTER SSANGCIEUC */ + { 0x0eba, 0x314a }, /* Hangul_Cieuc ㅊ HANGUL LETTER CHIEUCH */ + { 0x0ebb, 0x314b }, /* Hangul_Khieuq ㅋ HANGUL LETTER KHIEUKH */ + { 0x0ebc, 0x314c }, /* Hangul_Tieut ㅌ HANGUL LETTER THIEUTH */ + { 0x0ebd, 0x314d }, /* Hangul_Phieuf ㅍ HANGUL LETTER PHIEUPH */ + { 0x0ebe, 0x314e }, /* Hangul_Hieuh ㅎ HANGUL LETTER HIEUH */ + { 0x0ebf, 0x314f }, /* Hangul_A ㅏ HANGUL LETTER A */ + { 0x0ec0, 0x3150 }, /* Hangul_AE ㅐ HANGUL LETTER AE */ + { 0x0ec1, 0x3151 }, /* Hangul_YA ㅑ HANGUL LETTER YA */ + { 0x0ec2, 0x3152 }, /* Hangul_YAE ㅒ HANGUL LETTER YAE */ + { 0x0ec3, 0x3153 }, /* Hangul_EO ㅓ HANGUL LETTER EO */ + { 0x0ec4, 0x3154 }, /* Hangul_E ㅔ HANGUL LETTER E */ + { 0x0ec5, 0x3155 }, /* Hangul_YEO ㅕ HANGUL LETTER YEO */ + { 0x0ec6, 0x3156 }, /* Hangul_YE ㅖ HANGUL LETTER YE */ + { 0x0ec7, 0x3157 }, /* Hangul_O ㅗ HANGUL LETTER O */ + { 0x0ec8, 0x3158 }, /* Hangul_WA ㅘ HANGUL LETTER WA */ + { 0x0ec9, 0x3159 }, /* Hangul_WAE ㅙ HANGUL LETTER WAE */ + { 0x0eca, 0x315a }, /* Hangul_OE ㅚ HANGUL LETTER OE */ + { 0x0ecb, 0x315b }, /* Hangul_YO ㅛ HANGUL LETTER YO */ + { 0x0ecc, 0x315c }, /* Hangul_U ㅜ HANGUL LETTER U */ + { 0x0ecd, 0x315d }, /* Hangul_WEO ㅝ HANGUL LETTER WEO */ + { 0x0ece, 0x315e }, /* Hangul_WE ㅞ HANGUL LETTER WE */ + { 0x0ecf, 0x315f }, /* Hangul_WI ㅟ HANGUL LETTER WI */ + { 0x0ed0, 0x3160 }, /* Hangul_YU ㅠ HANGUL LETTER YU */ + { 0x0ed1, 0x3161 }, /* Hangul_EU ㅡ HANGUL LETTER EU */ + { 0x0ed2, 0x3162 }, /* Hangul_YI ㅢ HANGUL LETTER YI */ + { 0x0ed3, 0x3163 }, /* Hangul_I ㅣ HANGUL LETTER I */ + { 0x0ed4, 0x11a8 }, /* Hangul_J_Kiyeog ᆨ HANGUL JONGSEONG KIYEOK */ + { 0x0ed5, 0x11a9 }, /* Hangul_J_SsangKiyeog ᆩ HANGUL JONGSEONG SSANGKIYEOK */ + { 0x0ed6, 0x11aa }, /* Hangul_J_KiyeogSios ᆪ HANGUL JONGSEONG KIYEOK-SIOS */ + { 0x0ed7, 0x11ab }, /* Hangul_J_Nieun ᆫ HANGUL JONGSEONG NIEUN */ + { 0x0ed8, 0x11ac }, /* Hangul_J_NieunJieuj ᆬ HANGUL JONGSEONG NIEUN-CIEUC */ + { 0x0ed9, 0x11ad }, /* Hangul_J_NieunHieuh ᆭ HANGUL JONGSEONG NIEUN-HIEUH */ + { 0x0eda, 0x11ae }, /* Hangul_J_Dikeud ᆮ HANGUL JONGSEONG TIKEUT */ + { 0x0edb, 0x11af }, /* Hangul_J_Rieul ᆯ HANGUL JONGSEONG RIEUL */ + { 0x0edc, 0x11b0 }, /* Hangul_J_RieulKiyeog ᆰ HANGUL JONGSEONG RIEUL-KIYEOK */ + { 0x0edd, 0x11b1 }, /* Hangul_J_RieulMieum ᆱ HANGUL JONGSEONG RIEUL-MIEUM */ + { 0x0ede, 0x11b2 }, /* Hangul_J_RieulPieub ᆲ HANGUL JONGSEONG RIEUL-PIEUP */ + { 0x0edf, 0x11b3 }, /* Hangul_J_RieulSios ᆳ HANGUL JONGSEONG RIEUL-SIOS */ + { 0x0ee0, 0x11b4 }, /* Hangul_J_RieulTieut ᆴ HANGUL JONGSEONG RIEUL-THIEUTH */ + { 0x0ee1, 0x11b5 }, /* Hangul_J_RieulPhieuf ᆵ HANGUL JONGSEONG RIEUL-PHIEUPH */ + { 0x0ee2, 0x11b6 }, /* Hangul_J_RieulHieuh ᆶ HANGUL JONGSEONG RIEUL-HIEUH */ + { 0x0ee3, 0x11b7 }, /* Hangul_J_Mieum ᆷ HANGUL JONGSEONG MIEUM */ + { 0x0ee4, 0x11b8 }, /* Hangul_J_Pieub ᆸ HANGUL JONGSEONG PIEUP */ + { 0x0ee5, 0x11b9 }, /* Hangul_J_PieubSios ᆹ HANGUL JONGSEONG PIEUP-SIOS */ + { 0x0ee6, 0x11ba }, /* Hangul_J_Sios ᆺ HANGUL JONGSEONG SIOS */ + { 0x0ee7, 0x11bb }, /* Hangul_J_SsangSios ᆻ HANGUL JONGSEONG SSANGSIOS */ + { 0x0ee8, 0x11bc }, /* Hangul_J_Ieung ᆼ HANGUL JONGSEONG IEUNG */ + { 0x0ee9, 0x11bd }, /* Hangul_J_Jieuj ᆽ HANGUL JONGSEONG CIEUC */ + { 0x0eea, 0x11be }, /* Hangul_J_Cieuc ᆾ HANGUL JONGSEONG CHIEUCH */ + { 0x0eeb, 0x11bf }, /* Hangul_J_Khieuq ᆿ HANGUL JONGSEONG KHIEUKH */ + { 0x0eec, 0x11c0 }, /* Hangul_J_Tieut ᇀ HANGUL JONGSEONG THIEUTH */ + { 0x0eed, 0x11c1 }, /* Hangul_J_Phieuf ᇁ HANGUL JONGSEONG PHIEUPH */ + { 0x0eee, 0x11c2 }, /* Hangul_J_Hieuh ᇂ HANGUL JONGSEONG HIEUH */ + { 0x0eef, 0x316d }, /* Hangul_RieulYeorinHieuh ㅭ HANGUL LETTER RIEUL-YEORINHIEUH */ + { 0x0ef0, 0x3171 }, /* Hangul_SunkyeongeumMieum ㅱ HANGUL LETTER KAPYEOUNMIEUM */ + { 0x0ef1, 0x3178 }, /* Hangul_SunkyeongeumPieub ㅸ HANGUL LETTER KAPYEOUNPIEUP */ + { 0x0ef2, 0x317f }, /* Hangul_PanSios ㅿ HANGUL LETTER PANSIOS */ +/* 0x0ef3 Hangul_KkogjiDalrinIeung ? ??? */ + { 0x0ef4, 0x3184 }, /* Hangul_SunkyeongeumPhieuf ㆄ HANGUL LETTER KAPYEOUNPHIEUPH */ + { 0x0ef5, 0x3186 }, /* Hangul_YeorinHieuh ㆆ HANGUL LETTER YEORINHIEUH */ + { 0x0ef6, 0x318d }, /* Hangul_AraeA ㆍ HANGUL LETTER ARAEA */ + { 0x0ef7, 0x318e }, /* Hangul_AraeAE ㆎ HANGUL LETTER ARAEAE */ + { 0x0ef8, 0x11eb }, /* Hangul_J_PanSios ᇫ HANGUL JONGSEONG PANSIOS */ +/* 0x0ef9 Hangul_J_KkogjiDalrinIeung ? ??? */ + { 0x0efa, 0x11f9 }, /* Hangul_J_YeorinHieuh ᇹ HANGUL JONGSEONG YEORINHIEUH */ + { 0x0eff, 0x20a9 }, /* Korean_Won ₩ WON SIGN */ + { 0x13bc, 0x0152 }, /* OE Œ LATIN CAPITAL LIGATURE OE */ + { 0x13bd, 0x0153 }, /* oe œ LATIN SMALL LIGATURE OE */ + { 0x13be, 0x0178 }, /* Ydiaeresis Ÿ LATIN CAPITAL LETTER Y WITH DIAERESIS */ + { 0x20a0, 0x20a0 }, /* EcuSign ₠ EURO-CURRENCY SIGN */ + { 0x20a1, 0x20a1 }, /* ColonSign ₡ COLON SIGN */ + { 0x20a2, 0x20a2 }, /* CruzeiroSign ₢ CRUZEIRO SIGN */ + { 0x20a3, 0x20a3 }, /* FFrancSign ₣ FRENCH FRANC SIGN */ + { 0x20a4, 0x20a4 }, /* LiraSign ₤ LIRA SIGN */ + { 0x20a5, 0x20a5 }, /* MillSign ₥ MILL SIGN */ + { 0x20a6, 0x20a6 }, /* NairaSign ₦ NAIRA SIGN */ + { 0x20a7, 0x20a7 }, /* PesetaSign ₧ PESETA SIGN */ + { 0x20a8, 0x20a8 }, /* RupeeSign ₨ RUPEE SIGN */ + { 0x20a9, 0x20a9 }, /* WonSign ₩ WON SIGN */ + { 0x20aa, 0x20aa }, /* NewSheqelSign ₪ NEW SHEQEL SIGN */ + { 0x20ab, 0x20ab }, /* DongSign ₫ DONG SIGN */ + { 0x20ac, 0x20ac }, /* EuroSign € EURO SIGN */ + + + /* Following items added to GTK, not in the xterm table */ + + /* A few ASCII control characters */ + + { 0xFF08 /* Backspace */, '\b' }, + { 0xFF09 /* Tab */, '\t' }, + { 0xFF0A /* Linefeed */, '\n' }, + { 0xFF0B /* Vert. Tab */, '\v' }, + { 0xFF0D /* Return */, '\r' }, + { 0xFF1B /* Escape */, '\033' }, + + /* Numeric keypad */ + + { 0xFF80 /* Space */, ' ' }, + { 0xFFAA /* Multiply */, '*' }, + { 0xFFAB /* Add */, '+' }, + { 0xFFAC /* Separator */, ',' }, + { 0xFFAD /* Subtract */, '-' }, + { 0xFFAE /* Decimal */, '.' }, + { 0xFFAF /* Divide */, '/' }, + { 0xFFB0 /* 0 */, '0' }, + { 0xFFB1 /* 1 */, '1' }, + { 0xFFB2 /* 2 */, '2' }, + { 0xFFB3 /* 3 */, '3' }, + { 0xFFB4 /* 4 */, '4' }, + { 0xFFB5 /* 5 */, '5' }, + { 0xFFB6 /* 6 */, '6' }, + { 0xFFB7 /* 7 */, '7' }, + { 0xFFB8 /* 8 */, '8' }, + { 0xFFB9 /* 9 */, '9' }, + { 0xFFBD /* Equal */, '=' }, + + /* End numeric keypad */ + + { 0xFFFF /* Delete */, '\177' } +}; + +/** + * ibus_keyval_to_unicode: + * @keyval: an IBus key symbol + * + * Convert from an IBus key symbol to the corresponding ISO10646 (Unicode) + * character. + * + * Return value: the corresponding unicode character, or 0 if there + * is no corresponding character. + **/ +gunichar +ibus_keyval_to_unicode (guint keyval) +{ + int min = 0; + int max = G_N_ELEMENTS (gdk_keysym_to_unicode_tab) - 1; + int mid; + + /* First check for Latin-1 characters (1:1 mapping) */ + if ((keyval >= 0x0020 && keyval <= 0x007e) || + (keyval >= 0x00a0 && keyval <= 0x00ff)) + return keyval; + + /* Also check for directly encoded 24-bit UCS characters: + */ + if ((keyval & 0xff000000) == 0x01000000) + return keyval & 0x00ffffff; + + /* binary search in table */ + while (max >= min) { + mid = (min + max) / 2; + if (gdk_keysym_to_unicode_tab[mid].keysym < keyval) + min = mid + 1; + else if (gdk_keysym_to_unicode_tab[mid].keysym > keyval) + max = mid - 1; + else { + /* found it */ + return gdk_keysym_to_unicode_tab[mid].ucs; + } + } + + /* No matching Unicode value found */ + return 0; +} + +static const struct { + unsigned short keysym; + unsigned short ucs; +} gdk_unicode_to_keysym_tab[] = { + { 0x0abd, 0x002e }, /* decimalpoint . FULL STOP */ + { 0x0ba3, 0x003c }, /* leftcaret < LESS-THAN SIGN */ + { 0x0ba6, 0x003e }, /* rightcaret > GREATER-THAN SIGN */ + { 0x0bc6, 0x005f }, /* underbar _ LOW LINE */ + { 0x0bc0, 0x00af }, /* overbar ¯ MACRON */ + { 0x03c0, 0x0100 }, /* Amacron Ā LATIN CAPITAL LETTER A WITH MACRON */ + { 0x03e0, 0x0101 }, /* amacron ā LATIN SMALL LETTER A WITH MACRON */ + { 0x01c3, 0x0102 }, /* Abreve Ă LATIN CAPITAL LETTER A WITH BREVE */ + { 0x01e3, 0x0103 }, /* abreve ă LATIN SMALL LETTER A WITH BREVE */ + { 0x01a1, 0x0104 }, /* Aogonek Ą LATIN CAPITAL LETTER A WITH OGONEK */ + { 0x01b1, 0x0105 }, /* aogonek ą LATIN SMALL LETTER A WITH OGONEK */ + { 0x01c6, 0x0106 }, /* Cacute Ć LATIN CAPITAL LETTER C WITH ACUTE */ + { 0x01e6, 0x0107 }, /* cacute ć LATIN SMALL LETTER C WITH ACUTE */ + { 0x02c6, 0x0108 }, /* Ccircumflex Ĉ LATIN CAPITAL LETTER C WITH CIRCUMFLEX */ + { 0x02e6, 0x0109 }, /* ccircumflex ĉ LATIN SMALL LETTER C WITH CIRCUMFLEX */ + { 0x02c5, 0x010a }, /* Cabovedot Ċ LATIN CAPITAL LETTER C WITH DOT ABOVE */ + { 0x02e5, 0x010b }, /* cabovedot ċ LATIN SMALL LETTER C WITH DOT ABOVE */ + { 0x01c8, 0x010c }, /* Ccaron Č LATIN CAPITAL LETTER C WITH CARON */ + { 0x01e8, 0x010d }, /* ccaron č LATIN SMALL LETTER C WITH CARON */ + { 0x01cf, 0x010e }, /* Dcaron Ď LATIN CAPITAL LETTER D WITH CARON */ + { 0x01ef, 0x010f }, /* dcaron ď LATIN SMALL LETTER D WITH CARON */ + { 0x01d0, 0x0110 }, /* Dstroke Đ LATIN CAPITAL LETTER D WITH STROKE */ + { 0x01f0, 0x0111 }, /* dstroke đ LATIN SMALL LETTER D WITH STROKE */ + { 0x03aa, 0x0112 }, /* Emacron Ē LATIN CAPITAL LETTER E WITH MACRON */ + { 0x03ba, 0x0113 }, /* emacron ē LATIN SMALL LETTER E WITH MACRON */ + { 0x03cc, 0x0116 }, /* Eabovedot Ė LATIN CAPITAL LETTER E WITH DOT ABOVE */ + { 0x03ec, 0x0117 }, /* eabovedot ė LATIN SMALL LETTER E WITH DOT ABOVE */ + { 0x01ca, 0x0118 }, /* Eogonek Ę LATIN CAPITAL LETTER E WITH OGONEK */ + { 0x01ea, 0x0119 }, /* eogonek ę LATIN SMALL LETTER E WITH OGONEK */ + { 0x01cc, 0x011a }, /* Ecaron Ě LATIN CAPITAL LETTER E WITH CARON */ + { 0x01ec, 0x011b }, /* ecaron ě LATIN SMALL LETTER E WITH CARON */ + { 0x02d8, 0x011c }, /* Gcircumflex Ĝ LATIN CAPITAL LETTER G WITH CIRCUMFLEX */ + { 0x02f8, 0x011d }, /* gcircumflex ĝ LATIN SMALL LETTER G WITH CIRCUMFLEX */ + { 0x02ab, 0x011e }, /* Gbreve Ğ LATIN CAPITAL LETTER G WITH BREVE */ + { 0x02bb, 0x011f }, /* gbreve ğ LATIN SMALL LETTER G WITH BREVE */ + { 0x02d5, 0x0120 }, /* Gabovedot Ġ LATIN CAPITAL LETTER G WITH DOT ABOVE */ + { 0x02f5, 0x0121 }, /* gabovedot ġ LATIN SMALL LETTER G WITH DOT ABOVE */ + { 0x03ab, 0x0122 }, /* Gcedilla Ģ LATIN CAPITAL LETTER G WITH CEDILLA */ + { 0x03bb, 0x0123 }, /* gcedilla ģ LATIN SMALL LETTER G WITH CEDILLA */ + { 0x02a6, 0x0124 }, /* Hcircumflex Ĥ LATIN CAPITAL LETTER H WITH CIRCUMFLEX */ + { 0x02b6, 0x0125 }, /* hcircumflex ĥ LATIN SMALL LETTER H WITH CIRCUMFLEX */ + { 0x02a1, 0x0126 }, /* Hstroke Ħ LATIN CAPITAL LETTER H WITH STROKE */ + { 0x02b1, 0x0127 }, /* hstroke ħ LATIN SMALL LETTER H WITH STROKE */ + { 0x03a5, 0x0128 }, /* Itilde Ĩ LATIN CAPITAL LETTER I WITH TILDE */ + { 0x03b5, 0x0129 }, /* itilde ĩ LATIN SMALL LETTER I WITH TILDE */ + { 0x03cf, 0x012a }, /* Imacron Ī LATIN CAPITAL LETTER I WITH MACRON */ + { 0x03ef, 0x012b }, /* imacron ī LATIN SMALL LETTER I WITH MACRON */ + { 0x03c7, 0x012e }, /* Iogonek Į LATIN CAPITAL LETTER I WITH OGONEK */ + { 0x03e7, 0x012f }, /* iogonek į LATIN SMALL LETTER I WITH OGONEK */ + { 0x02a9, 0x0130 }, /* Iabovedot İ LATIN CAPITAL LETTER I WITH DOT ABOVE */ + { 0x02b9, 0x0131 }, /* idotless ı LATIN SMALL LETTER DOTLESS I */ + { 0x02ac, 0x0134 }, /* Jcircumflex Ĵ LATIN CAPITAL LETTER J WITH CIRCUMFLEX */ + { 0x02bc, 0x0135 }, /* jcircumflex ĵ LATIN SMALL LETTER J WITH CIRCUMFLEX */ + { 0x03d3, 0x0136 }, /* Kcedilla Ķ LATIN CAPITAL LETTER K WITH CEDILLA */ + { 0x03f3, 0x0137 }, /* kcedilla ķ LATIN SMALL LETTER K WITH CEDILLA */ + { 0x03a2, 0x0138 }, /* kra ĸ LATIN SMALL LETTER KRA */ + { 0x01c5, 0x0139 }, /* Lacute Ĺ LATIN CAPITAL LETTER L WITH ACUTE */ + { 0x01e5, 0x013a }, /* lacute ĺ LATIN SMALL LETTER L WITH ACUTE */ + { 0x03a6, 0x013b }, /* Lcedilla Ļ LATIN CAPITAL LETTER L WITH CEDILLA */ + { 0x03b6, 0x013c }, /* lcedilla ļ LATIN SMALL LETTER L WITH CEDILLA */ + { 0x01a5, 0x013d }, /* Lcaron Ľ LATIN CAPITAL LETTER L WITH CARON */ + { 0x01b5, 0x013e }, /* lcaron ľ LATIN SMALL LETTER L WITH CARON */ + { 0x01a3, 0x0141 }, /* Lstroke Ł LATIN CAPITAL LETTER L WITH STROKE */ + { 0x01b3, 0x0142 }, /* lstroke ł LATIN SMALL LETTER L WITH STROKE */ + { 0x01d1, 0x0143 }, /* Nacute Ń LATIN CAPITAL LETTER N WITH ACUTE */ + { 0x01f1, 0x0144 }, /* nacute ń LATIN SMALL LETTER N WITH ACUTE */ + { 0x03d1, 0x0145 }, /* Ncedilla Ņ LATIN CAPITAL LETTER N WITH CEDILLA */ + { 0x03f1, 0x0146 }, /* ncedilla ņ LATIN SMALL LETTER N WITH CEDILLA */ + { 0x01d2, 0x0147 }, /* Ncaron Ň LATIN CAPITAL LETTER N WITH CARON */ + { 0x01f2, 0x0148 }, /* ncaron ň LATIN SMALL LETTER N WITH CARON */ + { 0x03bd, 0x014a }, /* ENG Ŋ LATIN CAPITAL LETTER ENG */ + { 0x03bf, 0x014b }, /* eng ŋ LATIN SMALL LETTER ENG */ + { 0x03d2, 0x014c }, /* Omacron Ō LATIN CAPITAL LETTER O WITH MACRON */ + { 0x03f2, 0x014d }, /* omacron ō LATIN SMALL LETTER O WITH MACRON */ + { 0x01d5, 0x0150 }, /* Odoubleacute Ő LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */ + { 0x01f5, 0x0151 }, /* odoubleacute ő LATIN SMALL LETTER O WITH DOUBLE ACUTE */ + { 0x13bc, 0x0152 }, /* OE Œ LATIN CAPITAL LIGATURE OE */ + { 0x13bd, 0x0153 }, /* oe œ LATIN SMALL LIGATURE OE */ + { 0x01c0, 0x0154 }, /* Racute Ŕ LATIN CAPITAL LETTER R WITH ACUTE */ + { 0x01e0, 0x0155 }, /* racute ŕ LATIN SMALL LETTER R WITH ACUTE */ + { 0x03a3, 0x0156 }, /* Rcedilla Ŗ LATIN CAPITAL LETTER R WITH CEDILLA */ + { 0x03b3, 0x0157 }, /* rcedilla ŗ LATIN SMALL LETTER R WITH CEDILLA */ + { 0x01d8, 0x0158 }, /* Rcaron Ř LATIN CAPITAL LETTER R WITH CARON */ + { 0x01f8, 0x0159 }, /* rcaron ř LATIN SMALL LETTER R WITH CARON */ + { 0x01a6, 0x015a }, /* Sacute Ś LATIN CAPITAL LETTER S WITH ACUTE */ + { 0x01b6, 0x015b }, /* sacute ś LATIN SMALL LETTER S WITH ACUTE */ + { 0x02de, 0x015c }, /* Scircumflex Ŝ LATIN CAPITAL LETTER S WITH CIRCUMFLEX */ + { 0x02fe, 0x015d }, /* scircumflex ŝ LATIN SMALL LETTER S WITH CIRCUMFLEX */ + { 0x01aa, 0x015e }, /* Scedilla Ş LATIN CAPITAL LETTER S WITH CEDILLA */ + { 0x01ba, 0x015f }, /* scedilla ş LATIN SMALL LETTER S WITH CEDILLA */ + { 0x01a9, 0x0160 }, /* Scaron Š LATIN CAPITAL LETTER S WITH CARON */ + { 0x01b9, 0x0161 }, /* scaron š LATIN SMALL LETTER S WITH CARON */ + { 0x01de, 0x0162 }, /* Tcedilla Ţ LATIN CAPITAL LETTER T WITH CEDILLA */ + { 0x01fe, 0x0163 }, /* tcedilla ţ LATIN SMALL LETTER T WITH CEDILLA */ + { 0x01ab, 0x0164 }, /* Tcaron Ť LATIN CAPITAL LETTER T WITH CARON */ + { 0x01bb, 0x0165 }, /* tcaron ť LATIN SMALL LETTER T WITH CARON */ + { 0x03ac, 0x0166 }, /* Tslash Ŧ LATIN CAPITAL LETTER T WITH STROKE */ + { 0x03bc, 0x0167 }, /* tslash ŧ LATIN SMALL LETTER T WITH STROKE */ + { 0x03dd, 0x0168 }, /* Utilde Ũ LATIN CAPITAL LETTER U WITH TILDE */ + { 0x03fd, 0x0169 }, /* utilde ũ LATIN SMALL LETTER U WITH TILDE */ + { 0x03de, 0x016a }, /* Umacron Ū LATIN CAPITAL LETTER U WITH MACRON */ + { 0x03fe, 0x016b }, /* umacron ū LATIN SMALL LETTER U WITH MACRON */ + { 0x02dd, 0x016c }, /* Ubreve Ŭ LATIN CAPITAL LETTER U WITH BREVE */ + { 0x02fd, 0x016d }, /* ubreve ŭ LATIN SMALL LETTER U WITH BREVE */ + { 0x01d9, 0x016e }, /* Uring Ů LATIN CAPITAL LETTER U WITH RING ABOVE */ + { 0x01f9, 0x016f }, /* uring ů LATIN SMALL LETTER U WITH RING ABOVE */ + { 0x01db, 0x0170 }, /* Udoubleacute Ű LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */ + { 0x01fb, 0x0171 }, /* udoubleacute ű LATIN SMALL LETTER U WITH DOUBLE ACUTE */ + { 0x03d9, 0x0172 }, /* Uogonek Ų LATIN CAPITAL LETTER U WITH OGONEK */ + { 0x03f9, 0x0173 }, /* uogonek ų LATIN SMALL LETTER U WITH OGONEK */ + { 0x13be, 0x0178 }, /* Ydiaeresis Ÿ LATIN CAPITAL LETTER Y WITH DIAERESIS */ + { 0x01ac, 0x0179 }, /* Zacute Ź LATIN CAPITAL LETTER Z WITH ACUTE */ + { 0x01bc, 0x017a }, /* zacute ź LATIN SMALL LETTER Z WITH ACUTE */ + { 0x01af, 0x017b }, /* Zabovedot Ż LATIN CAPITAL LETTER Z WITH DOT ABOVE */ + { 0x01bf, 0x017c }, /* zabovedot ż LATIN SMALL LETTER Z WITH DOT ABOVE */ + { 0x01ae, 0x017d }, /* Zcaron Ž LATIN CAPITAL LETTER Z WITH CARON */ + { 0x01be, 0x017e }, /* zcaron ž LATIN SMALL LETTER Z WITH CARON */ + { 0x08f6, 0x0192 }, /* function ƒ LATIN SMALL LETTER F WITH HOOK */ + { 0x01b7, 0x02c7 }, /* caron ˇ CARON */ + { 0x01a2, 0x02d8 }, /* breve ˘ BREVE */ + { 0x01ff, 0x02d9 }, /* abovedot ˙ DOT ABOVE */ + { 0x01b2, 0x02db }, /* ogonek ˛ OGONEK */ + { 0x01bd, 0x02dd }, /* doubleacute ˝ DOUBLE ACUTE ACCENT */ + { 0x07ae, 0x0385 }, /* Greek_accentdieresis ΅ GREEK DIALYTIKA TONOS */ + { 0x07a1, 0x0386 }, /* Greek_ALPHAaccent Ά GREEK CAPITAL LETTER ALPHA WITH TONOS */ + { 0x07a2, 0x0388 }, /* Greek_EPSILONaccent Έ GREEK CAPITAL LETTER EPSILON WITH TONOS */ + { 0x07a3, 0x0389 }, /* Greek_ETAaccent Ή GREEK CAPITAL LETTER ETA WITH TONOS */ + { 0x07a4, 0x038a }, /* Greek_IOTAaccent Ί GREEK CAPITAL LETTER IOTA WITH TONOS */ + { 0x07a7, 0x038c }, /* Greek_OMICRONaccent Ό GREEK CAPITAL LETTER OMICRON WITH TONOS */ + { 0x07a8, 0x038e }, /* Greek_UPSILONaccent Ύ GREEK CAPITAL LETTER UPSILON WITH TONOS */ + { 0x07ab, 0x038f }, /* Greek_OMEGAaccent Ώ GREEK CAPITAL LETTER OMEGA WITH TONOS */ + { 0x07b6, 0x0390 }, /* Greek_iotaaccentdieresis ΐ GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */ + { 0x07c1, 0x0391 }, /* Greek_ALPHA Α GREEK CAPITAL LETTER ALPHA */ + { 0x07c2, 0x0392 }, /* Greek_BETA Β GREEK CAPITAL LETTER BETA */ + { 0x07c3, 0x0393 }, /* Greek_GAMMA Γ GREEK CAPITAL LETTER GAMMA */ + { 0x07c4, 0x0394 }, /* Greek_DELTA Δ GREEK CAPITAL LETTER DELTA */ + { 0x07c5, 0x0395 }, /* Greek_EPSILON Ε GREEK CAPITAL LETTER EPSILON */ + { 0x07c6, 0x0396 }, /* Greek_ZETA Ζ GREEK CAPITAL LETTER ZETA */ + { 0x07c7, 0x0397 }, /* Greek_ETA Η GREEK CAPITAL LETTER ETA */ + { 0x07c8, 0x0398 }, /* Greek_THETA Θ GREEK CAPITAL LETTER THETA */ + { 0x07c9, 0x0399 }, /* Greek_IOTA Ι GREEK CAPITAL LETTER IOTA */ + { 0x07ca, 0x039a }, /* Greek_KAPPA Κ GREEK CAPITAL LETTER KAPPA */ + { 0x07cb, 0x039b }, /* Greek_LAMBDA Λ GREEK CAPITAL LETTER LAMDA */ + { 0x07cc, 0x039c }, /* Greek_MU Μ GREEK CAPITAL LETTER MU */ + { 0x07cd, 0x039d }, /* Greek_NU Ν GREEK CAPITAL LETTER NU */ + { 0x07ce, 0x039e }, /* Greek_XI Ξ GREEK CAPITAL LETTER XI */ + { 0x07cf, 0x039f }, /* Greek_OMICRON Ο GREEK CAPITAL LETTER OMICRON */ + { 0x07d0, 0x03a0 }, /* Greek_PI Π GREEK CAPITAL LETTER PI */ + { 0x07d1, 0x03a1 }, /* Greek_RHO Ρ GREEK CAPITAL LETTER RHO */ + { 0x07d2, 0x03a3 }, /* Greek_SIGMA Σ GREEK CAPITAL LETTER SIGMA */ + { 0x07d4, 0x03a4 }, /* Greek_TAU Τ GREEK CAPITAL LETTER TAU */ + { 0x07d5, 0x03a5 }, /* Greek_UPSILON Υ GREEK CAPITAL LETTER UPSILON */ + { 0x07d6, 0x03a6 }, /* Greek_PHI Φ GREEK CAPITAL LETTER PHI */ + { 0x07d7, 0x03a7 }, /* Greek_CHI Χ GREEK CAPITAL LETTER CHI */ + { 0x07d8, 0x03a8 }, /* Greek_PSI Ψ GREEK CAPITAL LETTER PSI */ + { 0x07d9, 0x03a9 }, /* Greek_OMEGA Ω GREEK CAPITAL LETTER OMEGA */ + { 0x07a5, 0x03aa }, /* Greek_IOTAdieresis Ϊ GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */ + { 0x07a9, 0x03ab }, /* Greek_UPSILONdieresis Ϋ GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */ + { 0x07b1, 0x03ac }, /* Greek_alphaaccent ά GREEK SMALL LETTER ALPHA WITH TONOS */ + { 0x07b2, 0x03ad }, /* Greek_epsilonaccent έ GREEK SMALL LETTER EPSILON WITH TONOS */ + { 0x07b3, 0x03ae }, /* Greek_etaaccent ή GREEK SMALL LETTER ETA WITH TONOS */ + { 0x07b4, 0x03af }, /* Greek_iotaaccent ί GREEK SMALL LETTER IOTA WITH TONOS */ + { 0x07ba, 0x03b0 }, /* Greek_upsilonaccentdieresis ΰ GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */ + { 0x07e1, 0x03b1 }, /* Greek_alpha α GREEK SMALL LETTER ALPHA */ + { 0x07e2, 0x03b2 }, /* Greek_beta β GREEK SMALL LETTER BETA */ + { 0x07e3, 0x03b3 }, /* Greek_gamma γ GREEK SMALL LETTER GAMMA */ + { 0x07e4, 0x03b4 }, /* Greek_delta δ GREEK SMALL LETTER DELTA */ + { 0x07e5, 0x03b5 }, /* Greek_epsilon ε GREEK SMALL LETTER EPSILON */ + { 0x07e6, 0x03b6 }, /* Greek_zeta ζ GREEK SMALL LETTER ZETA */ + { 0x07e7, 0x03b7 }, /* Greek_eta η GREEK SMALL LETTER ETA */ + { 0x07e8, 0x03b8 }, /* Greek_theta θ GREEK SMALL LETTER THETA */ + { 0x07e9, 0x03b9 }, /* Greek_iota ι GREEK SMALL LETTER IOTA */ + { 0x07ea, 0x03ba }, /* Greek_kappa κ GREEK SMALL LETTER KAPPA */ + { 0x07eb, 0x03bb }, /* Greek_lambda λ GREEK SMALL LETTER LAMDA */ + { 0x07ec, 0x03bc }, /* Greek_mu μ GREEK SMALL LETTER MU */ + { 0x07ed, 0x03bd }, /* Greek_nu ν GREEK SMALL LETTER NU */ + { 0x07ee, 0x03be }, /* Greek_xi ξ GREEK SMALL LETTER XI */ + { 0x07ef, 0x03bf }, /* Greek_omicron ο GREEK SMALL LETTER OMICRON */ + { 0x07f0, 0x03c0 }, /* Greek_pi π GREEK SMALL LETTER PI */ + { 0x07f1, 0x03c1 }, /* Greek_rho ρ GREEK SMALL LETTER RHO */ + { 0x07f3, 0x03c2 }, /* Greek_finalsmallsigma ς GREEK SMALL LETTER FINAL SIGMA */ + { 0x07f2, 0x03c3 }, /* Greek_sigma σ GREEK SMALL LETTER SIGMA */ + { 0x07f4, 0x03c4 }, /* Greek_tau τ GREEK SMALL LETTER TAU */ + { 0x07f5, 0x03c5 }, /* Greek_upsilon υ GREEK SMALL LETTER UPSILON */ + { 0x07f6, 0x03c6 }, /* Greek_phi φ GREEK SMALL LETTER PHI */ + { 0x07f7, 0x03c7 }, /* Greek_chi χ GREEK SMALL LETTER CHI */ + { 0x07f8, 0x03c8 }, /* Greek_psi ψ GREEK SMALL LETTER PSI */ + { 0x07f9, 0x03c9 }, /* Greek_omega ω GREEK SMALL LETTER OMEGA */ + { 0x07b5, 0x03ca }, /* Greek_iotadieresis ϊ GREEK SMALL LETTER IOTA WITH DIALYTIKA */ + { 0x07b9, 0x03cb }, /* Greek_upsilondieresis ϋ GREEK SMALL LETTER UPSILON WITH DIALYTIKA */ + { 0x07b7, 0x03cc }, /* Greek_omicronaccent ό GREEK SMALL LETTER OMICRON WITH TONOS */ + { 0x07b8, 0x03cd }, /* Greek_upsilonaccent ύ GREEK SMALL LETTER UPSILON WITH TONOS */ + { 0x07bb, 0x03ce }, /* Greek_omegaaccent ώ GREEK SMALL LETTER OMEGA WITH TONOS */ + { 0x06b3, 0x0401 }, /* Cyrillic_IO Ё CYRILLIC CAPITAL LETTER IO */ + { 0x06b1, 0x0402 }, /* Serbian_DJE Ђ CYRILLIC CAPITAL LETTER DJE */ + { 0x06b2, 0x0403 }, /* Macedonia_GJE Ѓ CYRILLIC CAPITAL LETTER GJE */ + { 0x06b4, 0x0404 }, /* Ukrainian_IE Є CYRILLIC CAPITAL LETTER UKRAINIAN IE */ + { 0x06b5, 0x0405 }, /* Macedonia_DSE Ѕ CYRILLIC CAPITAL LETTER DZE */ + { 0x06b6, 0x0406 }, /* Ukrainian_I І CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */ + { 0x06b7, 0x0407 }, /* Ukrainian_YI Ї CYRILLIC CAPITAL LETTER YI */ + { 0x06b8, 0x0408 }, /* Cyrillic_JE Ј CYRILLIC CAPITAL LETTER JE */ + { 0x06b9, 0x0409 }, /* Cyrillic_LJE Љ CYRILLIC CAPITAL LETTER LJE */ + { 0x06ba, 0x040a }, /* Cyrillic_NJE Њ CYRILLIC CAPITAL LETTER NJE */ + { 0x06bb, 0x040b }, /* Serbian_TSHE Ћ CYRILLIC CAPITAL LETTER TSHE */ + { 0x06bc, 0x040c }, /* Macedonia_KJE Ќ CYRILLIC CAPITAL LETTER KJE */ + { 0x06be, 0x040e }, /* Byelorussian_SHORTU Ў CYRILLIC CAPITAL LETTER SHORT U */ + { 0x06bf, 0x040f }, /* Cyrillic_DZHE Џ CYRILLIC CAPITAL LETTER DZHE */ + { 0x06e1, 0x0410 }, /* Cyrillic_A А CYRILLIC CAPITAL LETTER A */ + { 0x06e2, 0x0411 }, /* Cyrillic_BE Б CYRILLIC CAPITAL LETTER BE */ + { 0x06f7, 0x0412 }, /* Cyrillic_VE В CYRILLIC CAPITAL LETTER VE */ + { 0x06e7, 0x0413 }, /* Cyrillic_GHE Г CYRILLIC CAPITAL LETTER GHE */ + { 0x06e4, 0x0414 }, /* Cyrillic_DE Д CYRILLIC CAPITAL LETTER DE */ + { 0x06e5, 0x0415 }, /* Cyrillic_IE Е CYRILLIC CAPITAL LETTER IE */ + { 0x06f6, 0x0416 }, /* Cyrillic_ZHE Ж CYRILLIC CAPITAL LETTER ZHE */ + { 0x06fa, 0x0417 }, /* Cyrillic_ZE З CYRILLIC CAPITAL LETTER ZE */ + { 0x06e9, 0x0418 }, /* Cyrillic_I И CYRILLIC CAPITAL LETTER I */ + { 0x06ea, 0x0419 }, /* Cyrillic_SHORTI Й CYRILLIC CAPITAL LETTER SHORT I */ + { 0x06eb, 0x041a }, /* Cyrillic_KA К CYRILLIC CAPITAL LETTER KA */ + { 0x06ec, 0x041b }, /* Cyrillic_EL Л CYRILLIC CAPITAL LETTER EL */ + { 0x06ed, 0x041c }, /* Cyrillic_EM М CYRILLIC CAPITAL LETTER EM */ + { 0x06ee, 0x041d }, /* Cyrillic_EN Н CYRILLIC CAPITAL LETTER EN */ + { 0x06ef, 0x041e }, /* Cyrillic_O О CYRILLIC CAPITAL LETTER O */ + { 0x06f0, 0x041f }, /* Cyrillic_PE П CYRILLIC CAPITAL LETTER PE */ + { 0x06f2, 0x0420 }, /* Cyrillic_ER Р CYRILLIC CAPITAL LETTER ER */ + { 0x06f3, 0x0421 }, /* Cyrillic_ES С CYRILLIC CAPITAL LETTER ES */ + { 0x06f4, 0x0422 }, /* Cyrillic_TE Т CYRILLIC CAPITAL LETTER TE */ + { 0x06f5, 0x0423 }, /* Cyrillic_U У CYRILLIC CAPITAL LETTER U */ + { 0x06e6, 0x0424 }, /* Cyrillic_EF Ф CYRILLIC CAPITAL LETTER EF */ + { 0x06e8, 0x0425 }, /* Cyrillic_HA Х CYRILLIC CAPITAL LETTER HA */ + { 0x06e3, 0x0426 }, /* Cyrillic_TSE Ц CYRILLIC CAPITAL LETTER TSE */ + { 0x06fe, 0x0427 }, /* Cyrillic_CHE Ч CYRILLIC CAPITAL LETTER CHE */ + { 0x06fb, 0x0428 }, /* Cyrillic_SHA Ш CYRILLIC CAPITAL LETTER SHA */ + { 0x06fd, 0x0429 }, /* Cyrillic_SHCHA Щ CYRILLIC CAPITAL LETTER SHCHA */ + { 0x06ff, 0x042a }, /* Cyrillic_HARDSIGN Ъ CYRILLIC CAPITAL LETTER HARD SIGN */ + { 0x06f9, 0x042b }, /* Cyrillic_YERU Ы CYRILLIC CAPITAL LETTER YERU */ + { 0x06f8, 0x042c }, /* Cyrillic_SOFTSIGN Ь CYRILLIC CAPITAL LETTER SOFT SIGN */ + { 0x06fc, 0x042d }, /* Cyrillic_E Э CYRILLIC CAPITAL LETTER E */ + { 0x06e0, 0x042e }, /* Cyrillic_YU Ю CYRILLIC CAPITAL LETTER YU */ + { 0x06f1, 0x042f }, /* Cyrillic_YA Я CYRILLIC CAPITAL LETTER YA */ + { 0x06c1, 0x0430 }, /* Cyrillic_a а CYRILLIC SMALL LETTER A */ + { 0x06c2, 0x0431 }, /* Cyrillic_be б CYRILLIC SMALL LETTER BE */ + { 0x06d7, 0x0432 }, /* Cyrillic_ve в CYRILLIC SMALL LETTER VE */ + { 0x06c7, 0x0433 }, /* Cyrillic_ghe г CYRILLIC SMALL LETTER GHE */ + { 0x06c4, 0x0434 }, /* Cyrillic_de д CYRILLIC SMALL LETTER DE */ + { 0x06c5, 0x0435 }, /* Cyrillic_ie е CYRILLIC SMALL LETTER IE */ + { 0x06d6, 0x0436 }, /* Cyrillic_zhe ж CYRILLIC SMALL LETTER ZHE */ + { 0x06da, 0x0437 }, /* Cyrillic_ze з CYRILLIC SMALL LETTER ZE */ + { 0x06c9, 0x0438 }, /* Cyrillic_i и CYRILLIC SMALL LETTER I */ + { 0x06ca, 0x0439 }, /* Cyrillic_shorti й CYRILLIC SMALL LETTER SHORT I */ + { 0x06cb, 0x043a }, /* Cyrillic_ka к CYRILLIC SMALL LETTER KA */ + { 0x06cc, 0x043b }, /* Cyrillic_el л CYRILLIC SMALL LETTER EL */ + { 0x06cd, 0x043c }, /* Cyrillic_em м CYRILLIC SMALL LETTER EM */ + { 0x06ce, 0x043d }, /* Cyrillic_en н CYRILLIC SMALL LETTER EN */ + { 0x06cf, 0x043e }, /* Cyrillic_o о CYRILLIC SMALL LETTER O */ + { 0x06d0, 0x043f }, /* Cyrillic_pe п CYRILLIC SMALL LETTER PE */ + { 0x06d2, 0x0440 }, /* Cyrillic_er р CYRILLIC SMALL LETTER ER */ + { 0x06d3, 0x0441 }, /* Cyrillic_es с CYRILLIC SMALL LETTER ES */ + { 0x06d4, 0x0442 }, /* Cyrillic_te т CYRILLIC SMALL LETTER TE */ + { 0x06d5, 0x0443 }, /* Cyrillic_u у CYRILLIC SMALL LETTER U */ + { 0x06c6, 0x0444 }, /* Cyrillic_ef ф CYRILLIC SMALL LETTER EF */ + { 0x06c8, 0x0445 }, /* Cyrillic_ha х CYRILLIC SMALL LETTER HA */ + { 0x06c3, 0x0446 }, /* Cyrillic_tse ц CYRILLIC SMALL LETTER TSE */ + { 0x06de, 0x0447 }, /* Cyrillic_che ч CYRILLIC SMALL LETTER CHE */ + { 0x06db, 0x0448 }, /* Cyrillic_sha ш CYRILLIC SMALL LETTER SHA */ + { 0x06dd, 0x0449 }, /* Cyrillic_shcha щ CYRILLIC SMALL LETTER SHCHA */ + { 0x06df, 0x044a }, /* Cyrillic_hardsign ъ CYRILLIC SMALL LETTER HARD SIGN */ + { 0x06d9, 0x044b }, /* Cyrillic_yeru ы CYRILLIC SMALL LETTER YERU */ + { 0x06d8, 0x044c }, /* Cyrillic_softsign ь CYRILLIC SMALL LETTER SOFT SIGN */ + { 0x06dc, 0x044d }, /* Cyrillic_e э CYRILLIC SMALL LETTER E */ + { 0x06c0, 0x044e }, /* Cyrillic_yu ю CYRILLIC SMALL LETTER YU */ + { 0x06d1, 0x044f }, /* Cyrillic_ya я CYRILLIC SMALL LETTER YA */ + { 0x06a3, 0x0451 }, /* Cyrillic_io ё CYRILLIC SMALL LETTER IO */ + { 0x06a1, 0x0452 }, /* Serbian_dje ђ CYRILLIC SMALL LETTER DJE */ + { 0x06a2, 0x0453 }, /* Macedonia_gje ѓ CYRILLIC SMALL LETTER GJE */ + { 0x06a4, 0x0454 }, /* Ukrainian_ie є CYRILLIC SMALL LETTER UKRAINIAN IE */ + { 0x06a5, 0x0455 }, /* Macedonia_dse ѕ CYRILLIC SMALL LETTER DZE */ + { 0x06a6, 0x0456 }, /* Ukrainian_i і CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */ + { 0x06a7, 0x0457 }, /* Ukrainian_yi ї CYRILLIC SMALL LETTER YI */ + { 0x06a8, 0x0458 }, /* Cyrillic_je ј CYRILLIC SMALL LETTER JE */ + { 0x06a9, 0x0459 }, /* Cyrillic_lje љ CYRILLIC SMALL LETTER LJE */ + { 0x06aa, 0x045a }, /* Cyrillic_nje њ CYRILLIC SMALL LETTER NJE */ + { 0x06ab, 0x045b }, /* Serbian_tshe ћ CYRILLIC SMALL LETTER TSHE */ + { 0x06ac, 0x045c }, /* Macedonia_kje ќ CYRILLIC SMALL LETTER KJE */ + { 0x06ae, 0x045e }, /* Byelorussian_shortu ў CYRILLIC SMALL LETTER SHORT U */ + { 0x06af, 0x045f }, /* Cyrillic_dzhe џ CYRILLIC SMALL LETTER DZHE */ + { 0x0ce0, 0x05d0 }, /* hebrew_aleph א HEBREW LETTER ALEF */ + { 0x0ce1, 0x05d1 }, /* hebrew_bet ב HEBREW LETTER BET */ + { 0x0ce2, 0x05d2 }, /* hebrew_gimel ג HEBREW LETTER GIMEL */ + { 0x0ce3, 0x05d3 }, /* hebrew_dalet ד HEBREW LETTER DALET */ + { 0x0ce4, 0x05d4 }, /* hebrew_he ה HEBREW LETTER HE */ + { 0x0ce5, 0x05d5 }, /* hebrew_waw ו HEBREW LETTER VAV */ + { 0x0ce6, 0x05d6 }, /* hebrew_zain ז HEBREW LETTER ZAYIN */ + { 0x0ce7, 0x05d7 }, /* hebrew_chet ח HEBREW LETTER HET */ + { 0x0ce8, 0x05d8 }, /* hebrew_tet ט HEBREW LETTER TET */ + { 0x0ce9, 0x05d9 }, /* hebrew_yod י HEBREW LETTER YOD */ + { 0x0cea, 0x05da }, /* hebrew_finalkaph ך HEBREW LETTER FINAL KAF */ + { 0x0ceb, 0x05db }, /* hebrew_kaph כ HEBREW LETTER KAF */ + { 0x0cec, 0x05dc }, /* hebrew_lamed ל HEBREW LETTER LAMED */ + { 0x0ced, 0x05dd }, /* hebrew_finalmem ם HEBREW LETTER FINAL MEM */ + { 0x0cee, 0x05de }, /* hebrew_mem מ HEBREW LETTER MEM */ + { 0x0cef, 0x05df }, /* hebrew_finalnun ן HEBREW LETTER FINAL NUN */ + { 0x0cf0, 0x05e0 }, /* hebrew_nun נ HEBREW LETTER NUN */ + { 0x0cf1, 0x05e1 }, /* hebrew_samech ס HEBREW LETTER SAMEKH */ + { 0x0cf2, 0x05e2 }, /* hebrew_ayin ע HEBREW LETTER AYIN */ + { 0x0cf3, 0x05e3 }, /* hebrew_finalpe ף HEBREW LETTER FINAL PE */ + { 0x0cf4, 0x05e4 }, /* hebrew_pe פ HEBREW LETTER PE */ + { 0x0cf5, 0x05e5 }, /* hebrew_finalzade ץ HEBREW LETTER FINAL TSADI */ + { 0x0cf6, 0x05e6 }, /* hebrew_zade צ HEBREW LETTER TSADI */ + { 0x0cf7, 0x05e7 }, /* hebrew_qoph ק HEBREW LETTER QOF */ + { 0x0cf8, 0x05e8 }, /* hebrew_resh ר HEBREW LETTER RESH */ + { 0x0cf9, 0x05e9 }, /* hebrew_shin ש HEBREW LETTER SHIN */ + { 0x0cfa, 0x05ea }, /* hebrew_taw ת HEBREW LETTER TAV */ + { 0x05ac, 0x060c }, /* Arabic_comma ، ARABIC COMMA */ + { 0x05bb, 0x061b }, /* Arabic_semicolon ؛ ARABIC SEMICOLON */ + { 0x05bf, 0x061f }, /* Arabic_question_mark ؟ ARABIC QUESTION MARK */ + { 0x05c1, 0x0621 }, /* Arabic_hamza ء ARABIC LETTER HAMZA */ + { 0x05c2, 0x0622 }, /* Arabic_maddaonalef آ ARABIC LETTER ALEF WITH MADDA ABOVE */ + { 0x05c3, 0x0623 }, /* Arabic_hamzaonalef أ ARABIC LETTER ALEF WITH HAMZA ABOVE */ + { 0x05c4, 0x0624 }, /* Arabic_hamzaonwaw ؤ ARABIC LETTER WAW WITH HAMZA ABOVE */ + { 0x05c5, 0x0625 }, /* Arabic_hamzaunderalef إ ARABIC LETTER ALEF WITH HAMZA BELOW */ + { 0x05c6, 0x0626 }, /* Arabic_hamzaonyeh ئ ARABIC LETTER YEH WITH HAMZA ABOVE */ + { 0x05c7, 0x0627 }, /* Arabic_alef ا ARABIC LETTER ALEF */ + { 0x05c8, 0x0628 }, /* Arabic_beh ب ARABIC LETTER BEH */ + { 0x05c9, 0x0629 }, /* Arabic_tehmarbuta ة ARABIC LETTER TEH MARBUTA */ + { 0x05ca, 0x062a }, /* Arabic_teh ت ARABIC LETTER TEH */ + { 0x05cb, 0x062b }, /* Arabic_theh ث ARABIC LETTER THEH */ + { 0x05cc, 0x062c }, /* Arabic_jeem ج ARABIC LETTER JEEM */ + { 0x05cd, 0x062d }, /* Arabic_hah ح ARABIC LETTER HAH */ + { 0x05ce, 0x062e }, /* Arabic_khah خ ARABIC LETTER KHAH */ + { 0x05cf, 0x062f }, /* Arabic_dal د ARABIC LETTER DAL */ + { 0x05d0, 0x0630 }, /* Arabic_thal ذ ARABIC LETTER THAL */ + { 0x05d1, 0x0631 }, /* Arabic_ra ر ARABIC LETTER REH */ + { 0x05d2, 0x0632 }, /* Arabic_zain ز ARABIC LETTER ZAIN */ + { 0x05d3, 0x0633 }, /* Arabic_seen س ARABIC LETTER SEEN */ + { 0x05d4, 0x0634 }, /* Arabic_sheen ش ARABIC LETTER SHEEN */ + { 0x05d5, 0x0635 }, /* Arabic_sad ص ARABIC LETTER SAD */ + { 0x05d6, 0x0636 }, /* Arabic_dad ض ARABIC LETTER DAD */ + { 0x05d7, 0x0637 }, /* Arabic_tah ط ARABIC LETTER TAH */ + { 0x05d8, 0x0638 }, /* Arabic_zah ظ ARABIC LETTER ZAH */ + { 0x05d9, 0x0639 }, /* Arabic_ain ع ARABIC LETTER AIN */ + { 0x05da, 0x063a }, /* Arabic_ghain غ ARABIC LETTER GHAIN */ + { 0x05e0, 0x0640 }, /* Arabic_tatweel ـ ARABIC TATWEEL */ + { 0x05e1, 0x0641 }, /* Arabic_feh ف ARABIC LETTER FEH */ + { 0x05e2, 0x0642 }, /* Arabic_qaf ق ARABIC LETTER QAF */ + { 0x05e3, 0x0643 }, /* Arabic_kaf ك ARABIC LETTER KAF */ + { 0x05e4, 0x0644 }, /* Arabic_lam ل ARABIC LETTER LAM */ + { 0x05e5, 0x0645 }, /* Arabic_meem م ARABIC LETTER MEEM */ + { 0x05e6, 0x0646 }, /* Arabic_noon ن ARABIC LETTER NOON */ + { 0x05e7, 0x0647 }, /* Arabic_ha ه ARABIC LETTER HEH */ + { 0x05e8, 0x0648 }, /* Arabic_waw و ARABIC LETTER WAW */ + { 0x05e9, 0x0649 }, /* Arabic_alefmaksura ى ARABIC LETTER ALEF MAKSURA */ + { 0x05ea, 0x064a }, /* Arabic_yeh ي ARABIC LETTER YEH */ + { 0x05eb, 0x064b }, /* Arabic_fathatan ً ARABIC FATHATAN */ + { 0x05ec, 0x064c }, /* Arabic_dammatan ٌ ARABIC DAMMATAN */ + { 0x05ed, 0x064d }, /* Arabic_kasratan ٍ ARABIC KASRATAN */ + { 0x05ee, 0x064e }, /* Arabic_fatha َ ARABIC FATHA */ + { 0x05ef, 0x064f }, /* Arabic_damma ُ ARABIC DAMMA */ + { 0x05f0, 0x0650 }, /* Arabic_kasra ِ ARABIC KASRA */ + { 0x05f1, 0x0651 }, /* Arabic_shadda ّ ARABIC SHADDA */ + { 0x05f2, 0x0652 }, /* Arabic_sukun ْ ARABIC SUKUN */ + { 0x0da1, 0x0e01 }, /* Thai_kokai ก THAI CHARACTER KO KAI */ + { 0x0da2, 0x0e02 }, /* Thai_khokhai ข THAI CHARACTER KHO KHAI */ + { 0x0da3, 0x0e03 }, /* Thai_khokhuat ฃ THAI CHARACTER KHO KHUAT */ + { 0x0da4, 0x0e04 }, /* Thai_khokhwai ค THAI CHARACTER KHO KHWAI */ + { 0x0da5, 0x0e05 }, /* Thai_khokhon ฅ THAI CHARACTER KHO KHON */ + { 0x0da6, 0x0e06 }, /* Thai_khorakhang ฆ THAI CHARACTER KHO RAKHANG */ + { 0x0da7, 0x0e07 }, /* Thai_ngongu ง THAI CHARACTER NGO NGU */ + { 0x0da8, 0x0e08 }, /* Thai_chochan จ THAI CHARACTER CHO CHAN */ + { 0x0da9, 0x0e09 }, /* Thai_choching ฉ THAI CHARACTER CHO CHING */ + { 0x0daa, 0x0e0a }, /* Thai_chochang ช THAI CHARACTER CHO CHANG */ + { 0x0dab, 0x0e0b }, /* Thai_soso ซ THAI CHARACTER SO SO */ + { 0x0dac, 0x0e0c }, /* Thai_chochoe ฌ THAI CHARACTER CHO CHOE */ + { 0x0dad, 0x0e0d }, /* Thai_yoying ญ THAI CHARACTER YO YING */ + { 0x0dae, 0x0e0e }, /* Thai_dochada ฎ THAI CHARACTER DO CHADA */ + { 0x0daf, 0x0e0f }, /* Thai_topatak ฏ THAI CHARACTER TO PATAK */ + { 0x0db0, 0x0e10 }, /* Thai_thothan ฐ THAI CHARACTER THO THAN */ + { 0x0db1, 0x0e11 }, /* Thai_thonangmontho ฑ THAI CHARACTER THO NANGMONTHO */ + { 0x0db2, 0x0e12 }, /* Thai_thophuthao ฒ THAI CHARACTER THO PHUTHAO */ + { 0x0db3, 0x0e13 }, /* Thai_nonen ณ THAI CHARACTER NO NEN */ + { 0x0db4, 0x0e14 }, /* Thai_dodek ด THAI CHARACTER DO DEK */ + { 0x0db5, 0x0e15 }, /* Thai_totao ต THAI CHARACTER TO TAO */ + { 0x0db6, 0x0e16 }, /* Thai_thothung ถ THAI CHARACTER THO THUNG */ + { 0x0db7, 0x0e17 }, /* Thai_thothahan ท THAI CHARACTER THO THAHAN */ + { 0x0db8, 0x0e18 }, /* Thai_thothong ธ THAI CHARACTER THO THONG */ + { 0x0db9, 0x0e19 }, /* Thai_nonu น THAI CHARACTER NO NU */ + { 0x0dba, 0x0e1a }, /* Thai_bobaimai บ THAI CHARACTER BO BAIMAI */ + { 0x0dbb, 0x0e1b }, /* Thai_popla ป THAI CHARACTER PO PLA */ + { 0x0dbc, 0x0e1c }, /* Thai_phophung ผ THAI CHARACTER PHO PHUNG */ + { 0x0dbd, 0x0e1d }, /* Thai_fofa ฝ THAI CHARACTER FO FA */ + { 0x0dbe, 0x0e1e }, /* Thai_phophan พ THAI CHARACTER PHO PHAN */ + { 0x0dbf, 0x0e1f }, /* Thai_fofan ฟ THAI CHARACTER FO FAN */ + { 0x0dc0, 0x0e20 }, /* Thai_phosamphao ภ THAI CHARACTER PHO SAMPHAO */ + { 0x0dc1, 0x0e21 }, /* Thai_moma ม THAI CHARACTER MO MA */ + { 0x0dc2, 0x0e22 }, /* Thai_yoyak ย THAI CHARACTER YO YAK */ + { 0x0dc3, 0x0e23 }, /* Thai_rorua ร THAI CHARACTER RO RUA */ + { 0x0dc4, 0x0e24 }, /* Thai_ru ฤ THAI CHARACTER RU */ + { 0x0dc5, 0x0e25 }, /* Thai_loling ล THAI CHARACTER LO LING */ + { 0x0dc6, 0x0e26 }, /* Thai_lu ฦ THAI CHARACTER LU */ + { 0x0dc7, 0x0e27 }, /* Thai_wowaen ว THAI CHARACTER WO WAEN */ + { 0x0dc8, 0x0e28 }, /* Thai_sosala ศ THAI CHARACTER SO SALA */ + { 0x0dc9, 0x0e29 }, /* Thai_sorusi ษ THAI CHARACTER SO RUSI */ + { 0x0dca, 0x0e2a }, /* Thai_sosua ส THAI CHARACTER SO SUA */ + { 0x0dcb, 0x0e2b }, /* Thai_hohip ห THAI CHARACTER HO HIP */ + { 0x0dcc, 0x0e2c }, /* Thai_lochula ฬ THAI CHARACTER LO CHULA */ + { 0x0dcd, 0x0e2d }, /* Thai_oang อ THAI CHARACTER O ANG */ + { 0x0dce, 0x0e2e }, /* Thai_honokhuk ฮ THAI CHARACTER HO NOKHUK */ + { 0x0dcf, 0x0e2f }, /* Thai_paiyannoi ฯ THAI CHARACTER PAIYANNOI */ + { 0x0dd0, 0x0e30 }, /* Thai_saraa ะ THAI CHARACTER SARA A */ + { 0x0dd1, 0x0e31 }, /* Thai_maihanakat ั THAI CHARACTER MAI HAN-AKAT */ + { 0x0dd2, 0x0e32 }, /* Thai_saraaa า THAI CHARACTER SARA AA */ + { 0x0dd3, 0x0e33 }, /* Thai_saraam ำ THAI CHARACTER SARA AM */ + { 0x0dd4, 0x0e34 }, /* Thai_sarai ิ THAI CHARACTER SARA I */ + { 0x0dd5, 0x0e35 }, /* Thai_saraii ี THAI CHARACTER SARA II */ + { 0x0dd6, 0x0e36 }, /* Thai_saraue ึ THAI CHARACTER SARA UE */ + { 0x0dd7, 0x0e37 }, /* Thai_sarauee ื THAI CHARACTER SARA UEE */ + { 0x0dd8, 0x0e38 }, /* Thai_sarau ุ THAI CHARACTER SARA U */ + { 0x0dd9, 0x0e39 }, /* Thai_sarauu ู THAI CHARACTER SARA UU */ + { 0x0dda, 0x0e3a }, /* Thai_phinthu ฺ THAI CHARACTER PHINTHU */ + { 0x0ddf, 0x0e3f }, /* Thai_baht ฿ THAI CURRENCY SYMBOL BAHT */ + { 0x0de0, 0x0e40 }, /* Thai_sarae เ THAI CHARACTER SARA E */ + { 0x0de1, 0x0e41 }, /* Thai_saraae แ THAI CHARACTER SARA AE */ + { 0x0de2, 0x0e42 }, /* Thai_sarao โ THAI CHARACTER SARA O */ + { 0x0de3, 0x0e43 }, /* Thai_saraaimaimuan ใ THAI CHARACTER SARA AI MAIMUAN */ + { 0x0de4, 0x0e44 }, /* Thai_saraaimaimalai ไ THAI CHARACTER SARA AI MAIMALAI */ + { 0x0de5, 0x0e45 }, /* Thai_lakkhangyao ๅ THAI CHARACTER LAKKHANGYAO */ + { 0x0de6, 0x0e46 }, /* Thai_maiyamok ๆ THAI CHARACTER MAIYAMOK */ + { 0x0de7, 0x0e47 }, /* Thai_maitaikhu ็ THAI CHARACTER MAITAIKHU */ + { 0x0de8, 0x0e48 }, /* Thai_maiek ่ THAI CHARACTER MAI EK */ + { 0x0de9, 0x0e49 }, /* Thai_maitho ้ THAI CHARACTER MAI THO */ + { 0x0dea, 0x0e4a }, /* Thai_maitri ๊ THAI CHARACTER MAI TRI */ + { 0x0deb, 0x0e4b }, /* Thai_maichattawa ๋ THAI CHARACTER MAI CHATTAWA */ + { 0x0dec, 0x0e4c }, /* Thai_thanthakhat ์ THAI CHARACTER THANTHAKHAT */ + { 0x0ded, 0x0e4d }, /* Thai_nikhahit ํ THAI CHARACTER NIKHAHIT */ + { 0x0df0, 0x0e50 }, /* Thai_leksun ๐ THAI DIGIT ZERO */ + { 0x0df1, 0x0e51 }, /* Thai_leknung ๑ THAI DIGIT ONE */ + { 0x0df2, 0x0e52 }, /* Thai_leksong ๒ THAI DIGIT TWO */ + { 0x0df3, 0x0e53 }, /* Thai_leksam ๓ THAI DIGIT THREE */ + { 0x0df4, 0x0e54 }, /* Thai_leksi ๔ THAI DIGIT FOUR */ + { 0x0df5, 0x0e55 }, /* Thai_lekha ๕ THAI DIGIT FIVE */ + { 0x0df6, 0x0e56 }, /* Thai_lekhok ๖ THAI DIGIT SIX */ + { 0x0df7, 0x0e57 }, /* Thai_lekchet ๗ THAI DIGIT SEVEN */ + { 0x0df8, 0x0e58 }, /* Thai_lekpaet ๘ THAI DIGIT EIGHT */ + { 0x0df9, 0x0e59 }, /* Thai_lekkao ๙ THAI DIGIT NINE */ + { 0x0ed4, 0x11a8 }, /* Hangul_J_Kiyeog ᆨ HANGUL JONGSEONG KIYEOK */ + { 0x0ed5, 0x11a9 }, /* Hangul_J_SsangKiyeog ᆩ HANGUL JONGSEONG SSANGKIYEOK */ + { 0x0ed6, 0x11aa }, /* Hangul_J_KiyeogSios ᆪ HANGUL JONGSEONG KIYEOK-SIOS */ + { 0x0ed7, 0x11ab }, /* Hangul_J_Nieun ᆫ HANGUL JONGSEONG NIEUN */ + { 0x0ed8, 0x11ac }, /* Hangul_J_NieunJieuj ᆬ HANGUL JONGSEONG NIEUN-CIEUC */ + { 0x0ed9, 0x11ad }, /* Hangul_J_NieunHieuh ᆭ HANGUL JONGSEONG NIEUN-HIEUH */ + { 0x0eda, 0x11ae }, /* Hangul_J_Dikeud ᆮ HANGUL JONGSEONG TIKEUT */ + { 0x0edb, 0x11af }, /* Hangul_J_Rieul ᆯ HANGUL JONGSEONG RIEUL */ + { 0x0edc, 0x11b0 }, /* Hangul_J_RieulKiyeog ᆰ HANGUL JONGSEONG RIEUL-KIYEOK */ + { 0x0edd, 0x11b1 }, /* Hangul_J_RieulMieum ᆱ HANGUL JONGSEONG RIEUL-MIEUM */ + { 0x0ede, 0x11b2 }, /* Hangul_J_RieulPieub ᆲ HANGUL JONGSEONG RIEUL-PIEUP */ + { 0x0edf, 0x11b3 }, /* Hangul_J_RieulSios ᆳ HANGUL JONGSEONG RIEUL-SIOS */ + { 0x0ee0, 0x11b4 }, /* Hangul_J_RieulTieut ᆴ HANGUL JONGSEONG RIEUL-THIEUTH */ + { 0x0ee1, 0x11b5 }, /* Hangul_J_RieulPhieuf ᆵ HANGUL JONGSEONG RIEUL-PHIEUPH */ + { 0x0ee2, 0x11b6 }, /* Hangul_J_RieulHieuh ᆶ HANGUL JONGSEONG RIEUL-HIEUH */ + { 0x0ee3, 0x11b7 }, /* Hangul_J_Mieum ᆷ HANGUL JONGSEONG MIEUM */ + { 0x0ee4, 0x11b8 }, /* Hangul_J_Pieub ᆸ HANGUL JONGSEONG PIEUP */ + { 0x0ee5, 0x11b9 }, /* Hangul_J_PieubSios ᆹ HANGUL JONGSEONG PIEUP-SIOS */ + { 0x0ee6, 0x11ba }, /* Hangul_J_Sios ᆺ HANGUL JONGSEONG SIOS */ + { 0x0ee7, 0x11bb }, /* Hangul_J_SsangSios ᆻ HANGUL JONGSEONG SSANGSIOS */ + { 0x0ee8, 0x11bc }, /* Hangul_J_Ieung ᆼ HANGUL JONGSEONG IEUNG */ + { 0x0ee9, 0x11bd }, /* Hangul_J_Jieuj ᆽ HANGUL JONGSEONG CIEUC */ + { 0x0eea, 0x11be }, /* Hangul_J_Cieuc ᆾ HANGUL JONGSEONG CHIEUCH */ + { 0x0eeb, 0x11bf }, /* Hangul_J_Khieuq ᆿ HANGUL JONGSEONG KHIEUKH */ + { 0x0eec, 0x11c0 }, /* Hangul_J_Tieut ᇀ HANGUL JONGSEONG THIEUTH */ + { 0x0eed, 0x11c1 }, /* Hangul_J_Phieuf ᇁ HANGUL JONGSEONG PHIEUPH */ + { 0x0eee, 0x11c2 }, /* Hangul_J_Hieuh ᇂ HANGUL JONGSEONG HIEUH */ + { 0x0ef8, 0x11eb }, /* Hangul_J_PanSios ᇫ HANGUL JONGSEONG PANSIOS */ + { 0x0efa, 0x11f9 }, /* Hangul_J_YeorinHieuh ᇹ HANGUL JONGSEONG YEORINHIEUH */ + { 0x0aa2, 0x2002 }, /* enspace   EN SPACE */ + { 0x0aa1, 0x2003 }, /* emspace   EM SPACE */ + { 0x0aa3, 0x2004 }, /* em3space   THREE-PER-EM SPACE */ + { 0x0aa4, 0x2005 }, /* em4space   FOUR-PER-EM SPACE */ + { 0x0aa5, 0x2007 }, /* digitspace   FIGURE SPACE */ + { 0x0aa6, 0x2008 }, /* punctspace   PUNCTUATION SPACE */ + { 0x0aa7, 0x2009 }, /* thinspace   THIN SPACE */ + { 0x0aa8, 0x200a }, /* hairspace   HAIR SPACE */ + { 0x0abb, 0x2012 }, /* figdash ‒ FIGURE DASH */ + { 0x0aaa, 0x2013 }, /* endash – EN DASH */ + { 0x0aa9, 0x2014 }, /* emdash — EM DASH */ + { 0x07af, 0x2015 }, /* Greek_horizbar ― HORIZONTAL BAR */ + { 0x0cdf, 0x2017 }, /* hebrew_doublelowline ‗ DOUBLE LOW LINE */ + { 0x0ad0, 0x2018 }, /* leftsinglequotemark ‘ LEFT SINGLE QUOTATION MARK */ + { 0x0ad1, 0x2019 }, /* rightsinglequotemark ’ RIGHT SINGLE QUOTATION MARK */ + { 0x0afd, 0x201a }, /* singlelowquotemark ‚ SINGLE LOW-9 QUOTATION MARK */ + { 0x0ad2, 0x201c }, /* leftdoublequotemark “ LEFT DOUBLE QUOTATION MARK */ + { 0x0ad3, 0x201d }, /* rightdoublequotemark ” RIGHT DOUBLE QUOTATION MARK */ + { 0x0afe, 0x201e }, /* doublelowquotemark „ DOUBLE LOW-9 QUOTATION MARK */ + { 0x0af1, 0x2020 }, /* dagger † DAGGER */ + { 0x0af2, 0x2021 }, /* doubledagger ‡ DOUBLE DAGGER */ + { 0x0ae6, 0x2022 }, /* enfilledcircbullet • BULLET */ + { 0x0aae, 0x2026 }, /* ellipsis … HORIZONTAL ELLIPSIS */ + { 0x0ad6, 0x2032 }, /* minutes ′ PRIME */ + { 0x0ad7, 0x2033 }, /* seconds ″ DOUBLE PRIME */ + { 0x0afc, 0x2038 }, /* caret ‸ CARET */ + { 0x047e, 0x203e }, /* overline ‾ OVERLINE */ + { 0x20a0, 0x20a0 }, /* EcuSign ₠ EURO-CURRENCY SIGN */ + { 0x20a1, 0x20a1 }, /* ColonSign ₡ COLON SIGN */ + { 0x20a2, 0x20a2 }, /* CruzeiroSign ₢ CRUZEIRO SIGN */ + { 0x20a3, 0x20a3 }, /* FFrancSign ₣ FRENCH FRANC SIGN */ + { 0x20a4, 0x20a4 }, /* LiraSign ₤ LIRA SIGN */ + { 0x20a5, 0x20a5 }, /* MillSign ₥ MILL SIGN */ + { 0x20a6, 0x20a6 }, /* NairaSign ₦ NAIRA SIGN */ + { 0x20a7, 0x20a7 }, /* PesetaSign ₧ PESETA SIGN */ + { 0x20a8, 0x20a8 }, /* RupeeSign ₨ RUPEE SIGN */ + { 0x0eff, 0x20a9 }, /* Korean_Won ₩ WON SIGN */ + { 0x20a9, 0x20a9 }, /* WonSign ₩ WON SIGN */ + { 0x20aa, 0x20aa }, /* NewSheqelSign ₪ NEW SHEQEL SIGN */ + { 0x20ab, 0x20ab }, /* DongSign ₫ DONG SIGN */ + { 0x20ac, 0x20ac }, /* EuroSign € EURO SIGN */ + { 0x0ab8, 0x2105 }, /* careof ℅ CARE OF */ + { 0x06b0, 0x2116 }, /* numerosign № NUMERO SIGN */ + { 0x0afb, 0x2117 }, /* phonographcopyright ℗ SOUND RECORDING COPYRIGHT */ + { 0x0ad4, 0x211e }, /* prescription ℞ PRESCRIPTION TAKE */ + { 0x0ac9, 0x2122 }, /* trademark ™ TRADE MARK SIGN */ + { 0x0ab0, 0x2153 }, /* onethird ⅓ VULGAR FRACTION ONE THIRD */ + { 0x0ab1, 0x2154 }, /* twothirds ⅔ VULGAR FRACTION TWO THIRDS */ + { 0x0ab2, 0x2155 }, /* onefifth ⅕ VULGAR FRACTION ONE FIFTH */ + { 0x0ab3, 0x2156 }, /* twofifths ⅖ VULGAR FRACTION TWO FIFTHS */ + { 0x0ab4, 0x2157 }, /* threefifths ⅗ VULGAR FRACTION THREE FIFTHS */ + { 0x0ab5, 0x2158 }, /* fourfifths ⅘ VULGAR FRACTION FOUR FIFTHS */ + { 0x0ab6, 0x2159 }, /* onesixth ⅙ VULGAR FRACTION ONE SIXTH */ + { 0x0ab7, 0x215a }, /* fivesixths ⅚ VULGAR FRACTION FIVE SIXTHS */ + { 0x0ac3, 0x215b }, /* oneeighth ⅛ VULGAR FRACTION ONE EIGHTH */ + { 0x0ac4, 0x215c }, /* threeeighths ⅜ VULGAR FRACTION THREE EIGHTHS */ + { 0x0ac5, 0x215d }, /* fiveeighths ⅝ VULGAR FRACTION FIVE EIGHTHS */ + { 0x0ac6, 0x215e }, /* seveneighths ⅞ VULGAR FRACTION SEVEN EIGHTHS */ + { 0x08fb, 0x2190 }, /* leftarrow ← LEFTWARDS ARROW */ + { 0x08fc, 0x2191 }, /* uparrow ↑ UPWARDS ARROW */ + { 0x08fd, 0x2192 }, /* rightarrow → RIGHTWARDS ARROW */ + { 0x08fe, 0x2193 }, /* downarrow ↓ DOWNWARDS ARROW */ + { 0x08ce, 0x21d2 }, /* implies ⇒ RIGHTWARDS DOUBLE ARROW */ + { 0x08cd, 0x21d4 }, /* ifonlyif ⇔ LEFT RIGHT DOUBLE ARROW */ + { 0x08ef, 0x2202 }, /* partialderivative ∂ PARTIAL DIFFERENTIAL */ + { 0x08c5, 0x2207 }, /* nabla ∇ NABLA */ + { 0x0bca, 0x2218 }, /* jot ∘ RING OPERATOR */ + { 0x08d6, 0x221a }, /* radical √ SQUARE ROOT */ + { 0x08c1, 0x221d }, /* variation ∝ PROPORTIONAL TO */ + { 0x08c2, 0x221e }, /* infinity ∞ INFINITY */ + { 0x08de, 0x2227 }, /* logicaland ∧ LOGICAL AND */ + { 0x0ba9, 0x2227 }, /* upcaret ∧ LOGICAL AND */ + { 0x08df, 0x2228 }, /* logicalor ∨ LOGICAL OR */ + { 0x0ba8, 0x2228 }, /* downcaret ∨ LOGICAL OR */ + { 0x08dc, 0x2229 }, /* intersection ∩ INTERSECTION */ + { 0x0bc3, 0x2229 }, /* upshoe ∩ INTERSECTION */ + { 0x08dd, 0x222a }, /* union ∪ UNION */ + { 0x0bd6, 0x222a }, /* downshoe ∪ UNION */ + { 0x08bf, 0x222b }, /* integral ∫ INTEGRAL */ + { 0x08c0, 0x2234 }, /* therefore ∴ THEREFORE */ + { 0x08c8, 0x2245 }, /* approximate ≅ APPROXIMATELY EQUAL TO */ + { 0x08bd, 0x2260 }, /* notequal ≠ NOT EQUAL TO */ + { 0x08cf, 0x2261 }, /* identical ≡ IDENTICAL TO */ + { 0x08bc, 0x2264 }, /* lessthanequal ≤ LESS-THAN OR EQUAL TO */ + { 0x08be, 0x2265 }, /* greaterthanequal ≥ GREATER-THAN OR EQUAL TO */ + { 0x08da, 0x2282 }, /* includedin ⊂ SUBSET OF */ + { 0x0bda, 0x2282 }, /* leftshoe ⊂ SUBSET OF */ + { 0x08db, 0x2283 }, /* includes ⊃ SUPERSET OF */ + { 0x0bd8, 0x2283 }, /* rightshoe ⊃ SUPERSET OF */ + { 0x0bfc, 0x22a2 }, /* righttack ⊢ RIGHT TACK */ + { 0x0bdc, 0x22a3 }, /* lefttack ⊣ LEFT TACK */ + { 0x0bc2, 0x22a4 }, /* downtack ⊤ DOWN TACK */ + { 0x0bce, 0x22a5 }, /* uptack ⊥ UP TACK */ + { 0x0bd3, 0x2308 }, /* upstile ⌈ LEFT CEILING */ + { 0x0bc4, 0x230a }, /* downstile ⌊ LEFT FLOOR */ + { 0x0afa, 0x2315 }, /* telephonerecorder ⌕ TELEPHONE RECORDER */ + { 0x08a4, 0x2320 }, /* topintegral ⌠ TOP HALF INTEGRAL */ + { 0x08a5, 0x2321 }, /* botintegral ⌡ BOTTOM HALF INTEGRAL */ + { 0x0abc, 0x2329 }, /* leftanglebracket 〈 LEFT-POINTING ANGLE BRACKET */ + { 0x0abe, 0x232a }, /* rightanglebracket 〉 RIGHT-POINTING ANGLE BRACKET */ + { 0x0bcc, 0x2395 }, /* quad ⎕ APL FUNCTIONAL SYMBOL QUAD (Unicode 3.0) */ + { 0x09e2, 0x2409 }, /* ht ␉ SYMBOL FOR HORIZONTAL TABULATION */ + { 0x09e5, 0x240a }, /* lf ␊ SYMBOL FOR LINE FEED */ + { 0x09e9, 0x240b }, /* vt ␋ SYMBOL FOR VERTICAL TABULATION */ + { 0x09e3, 0x240c }, /* ff ␌ SYMBOL FOR FORM FEED */ + { 0x09e4, 0x240d }, /* cr ␍ SYMBOL FOR CARRIAGE RETURN */ + { 0x09df, 0x2422 }, /* blank ␢ BLANK SYMBOL */ + { 0x09e8, 0x2424 }, /* nl ␤ SYMBOL FOR NEWLINE */ + { 0x09f1, 0x2500 }, /* horizlinescan5 ─ BOX DRAWINGS LIGHT HORIZONTAL */ + { 0x08a6, 0x2502 }, /* vertconnector │ BOX DRAWINGS LIGHT VERTICAL */ + { 0x09f8, 0x2502 }, /* vertbar │ BOX DRAWINGS LIGHT VERTICAL */ + { 0x09ec, 0x250c }, /* upleftcorner ┌ BOX DRAWINGS LIGHT DOWN AND RIGHT */ + { 0x09eb, 0x2510 }, /* uprightcorner ┐ BOX DRAWINGS LIGHT DOWN AND LEFT */ + { 0x09ed, 0x2514 }, /* lowleftcorner └ BOX DRAWINGS LIGHT UP AND RIGHT */ + { 0x09ea, 0x2518 }, /* lowrightcorner ┘ BOX DRAWINGS LIGHT UP AND LEFT */ + { 0x09f4, 0x251c }, /* leftt ├ BOX DRAWINGS LIGHT VERTICAL AND RIGHT */ + { 0x09f5, 0x2524 }, /* rightt ┤ BOX DRAWINGS LIGHT VERTICAL AND LEFT */ + { 0x09f7, 0x252c }, /* topt ┬ BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */ + { 0x09f6, 0x2534 }, /* bott ┴ BOX DRAWINGS LIGHT UP AND HORIZONTAL */ + { 0x09ee, 0x253c }, /* crossinglines ┼ BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */ + { 0x09e1, 0x2592 }, /* checkerboard ▒ MEDIUM SHADE */ + { 0x0adf, 0x25a0 }, /* emfilledrect ■ BLACK SQUARE */ + { 0x0acf, 0x25a1 }, /* emopenrectangle □ WHITE SQUARE */ + { 0x0ae7, 0x25aa }, /* enfilledsqbullet ▪ BLACK SMALL SQUARE */ + { 0x0ae1, 0x25ab }, /* enopensquarebullet ▫ WHITE SMALL SQUARE */ + { 0x0adb, 0x25ac }, /* filledrectbullet ▬ BLACK RECTANGLE */ + { 0x0ae2, 0x25ad }, /* openrectbullet ▭ WHITE RECTANGLE */ + { 0x0ae8, 0x25b2 }, /* filledtribulletup ▲ BLACK UP-POINTING TRIANGLE */ + { 0x0ae3, 0x25b3 }, /* opentribulletup △ WHITE UP-POINTING TRIANGLE */ + { 0x0add, 0x25b6 }, /* filledrighttribullet ▶ BLACK RIGHT-POINTING TRIANGLE */ + { 0x0acd, 0x25b7 }, /* rightopentriangle ▷ WHITE RIGHT-POINTING TRIANGLE */ + { 0x0ae9, 0x25bc }, /* filledtribulletdown ▼ BLACK DOWN-POINTING TRIANGLE */ + { 0x0ae4, 0x25bd }, /* opentribulletdown ▽ WHITE DOWN-POINTING TRIANGLE */ + { 0x0adc, 0x25c0 }, /* filledlefttribullet ◀ BLACK LEFT-POINTING TRIANGLE */ + { 0x0acc, 0x25c1 }, /* leftopentriangle ◁ WHITE LEFT-POINTING TRIANGLE */ + { 0x09e0, 0x25c6 }, /* soliddiamond ◆ BLACK DIAMOND */ + { 0x0ace, 0x25cb }, /* emopencircle ○ WHITE CIRCLE */ + { 0x0bcf, 0x25cb }, /* circle ○ WHITE CIRCLE */ + { 0x0ade, 0x25cf }, /* emfilledcircle ● BLACK CIRCLE */ + { 0x0ae0, 0x25e6 }, /* enopencircbullet ◦ WHITE BULLET */ + { 0x0ae5, 0x2606 }, /* openstar ☆ WHITE STAR */ + { 0x0af9, 0x260e }, /* telephone ☎ BLACK TELEPHONE */ + { 0x0aca, 0x2613 }, /* signaturemark ☓ SALTIRE */ + { 0x0aea, 0x261c }, /* leftpointer ☜ WHITE LEFT POINTING INDEX */ + { 0x0aeb, 0x261e }, /* rightpointer ☞ WHITE RIGHT POINTING INDEX */ + { 0x0af8, 0x2640 }, /* femalesymbol ♀ FEMALE SIGN */ + { 0x0af7, 0x2642 }, /* malesymbol ♂ MALE SIGN */ + { 0x0aec, 0x2663 }, /* club ♣ BLACK CLUB SUIT */ + { 0x0aee, 0x2665 }, /* heart ♥ BLACK HEART SUIT */ + { 0x0aed, 0x2666 }, /* diamond ♦ BLACK DIAMOND SUIT */ + { 0x0af6, 0x266d }, /* musicalflat ♭ MUSIC FLAT SIGN */ + { 0x0af5, 0x266f }, /* musicalsharp ♯ MUSIC SHARP SIGN */ + { 0x0af3, 0x2713 }, /* checkmark ✓ CHECK MARK */ + { 0x0af4, 0x2717 }, /* ballotcross ✗ BALLOT X */ + { 0x0ad9, 0x271d }, /* latincross ✝ LATIN CROSS */ + { 0x0af0, 0x2720 }, /* maltesecross ✠ MALTESE CROSS */ + { 0x04a4, 0x3001 }, /* kana_comma 、 IDEOGRAPHIC COMMA */ + { 0x04a1, 0x3002 }, /* kana_fullstop 。 IDEOGRAPHIC FULL STOP */ + { 0x04a2, 0x300c }, /* kana_openingbracket 「 LEFT CORNER BRACKET */ + { 0x04a3, 0x300d }, /* kana_closingbracket 」 RIGHT CORNER BRACKET */ + { 0x04de, 0x309b }, /* voicedsound ゛ KATAKANA-HIRAGANA VOICED SOUND MARK */ + { 0x04df, 0x309c }, /* semivoicedsound ゜ KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */ + { 0x04a7, 0x30a1 }, /* kana_a ァ KATAKANA LETTER SMALL A */ + { 0x04b1, 0x30a2 }, /* kana_A ア KATAKANA LETTER A */ + { 0x04a8, 0x30a3 }, /* kana_i ィ KATAKANA LETTER SMALL I */ + { 0x04b2, 0x30a4 }, /* kana_I イ KATAKANA LETTER I */ + { 0x04a9, 0x30a5 }, /* kana_u ゥ KATAKANA LETTER SMALL U */ + { 0x04b3, 0x30a6 }, /* kana_U ウ KATAKANA LETTER U */ + { 0x04aa, 0x30a7 }, /* kana_e ェ KATAKANA LETTER SMALL E */ + { 0x04b4, 0x30a8 }, /* kana_E エ KATAKANA LETTER E */ + { 0x04ab, 0x30a9 }, /* kana_o ォ KATAKANA LETTER SMALL O */ + { 0x04b5, 0x30aa }, /* kana_O オ KATAKANA LETTER O */ + { 0x04b6, 0x30ab }, /* kana_KA カ KATAKANA LETTER KA */ + { 0x04b7, 0x30ad }, /* kana_KI キ KATAKANA LETTER KI */ + { 0x04b8, 0x30af }, /* kana_KU ク KATAKANA LETTER KU */ + { 0x04b9, 0x30b1 }, /* kana_KE ケ KATAKANA LETTER KE */ + { 0x04ba, 0x30b3 }, /* kana_KO コ KATAKANA LETTER KO */ + { 0x04bb, 0x30b5 }, /* kana_SA サ KATAKANA LETTER SA */ + { 0x04bc, 0x30b7 }, /* kana_SHI シ KATAKANA LETTER SI */ + { 0x04bd, 0x30b9 }, /* kana_SU ス KATAKANA LETTER SU */ + { 0x04be, 0x30bb }, /* kana_SE セ KATAKANA LETTER SE */ + { 0x04bf, 0x30bd }, /* kana_SO ソ KATAKANA LETTER SO */ + { 0x04c0, 0x30bf }, /* kana_TA タ KATAKANA LETTER TA */ + { 0x04c1, 0x30c1 }, /* kana_CHI チ KATAKANA LETTER TI */ + { 0x04af, 0x30c3 }, /* kana_tsu ッ KATAKANA LETTER SMALL TU */ + { 0x04c2, 0x30c4 }, /* kana_TSU ツ KATAKANA LETTER TU */ + { 0x04c3, 0x30c6 }, /* kana_TE テ KATAKANA LETTER TE */ + { 0x04c4, 0x30c8 }, /* kana_TO ト KATAKANA LETTER TO */ + { 0x04c5, 0x30ca }, /* kana_NA ナ KATAKANA LETTER NA */ + { 0x04c6, 0x30cb }, /* kana_NI ニ KATAKANA LETTER NI */ + { 0x04c7, 0x30cc }, /* kana_NU ヌ KATAKANA LETTER NU */ + { 0x04c8, 0x30cd }, /* kana_NE ネ KATAKANA LETTER NE */ + { 0x04c9, 0x30ce }, /* kana_NO ノ KATAKANA LETTER NO */ + { 0x04ca, 0x30cf }, /* kana_HA ハ KATAKANA LETTER HA */ + { 0x04cb, 0x30d2 }, /* kana_HI ヒ KATAKANA LETTER HI */ + { 0x04cc, 0x30d5 }, /* kana_FU フ KATAKANA LETTER HU */ + { 0x04cd, 0x30d8 }, /* kana_HE ヘ KATAKANA LETTER HE */ + { 0x04ce, 0x30db }, /* kana_HO ホ KATAKANA LETTER HO */ + { 0x04cf, 0x30de }, /* kana_MA マ KATAKANA LETTER MA */ + { 0x04d0, 0x30df }, /* kana_MI ミ KATAKANA LETTER MI */ + { 0x04d1, 0x30e0 }, /* kana_MU ム KATAKANA LETTER MU */ + { 0x04d2, 0x30e1 }, /* kana_ME メ KATAKANA LETTER ME */ + { 0x04d3, 0x30e2 }, /* kana_MO モ KATAKANA LETTER MO */ + { 0x04ac, 0x30e3 }, /* kana_ya ャ KATAKANA LETTER SMALL YA */ + { 0x04d4, 0x30e4 }, /* kana_YA ヤ KATAKANA LETTER YA */ + { 0x04ad, 0x30e5 }, /* kana_yu ュ KATAKANA LETTER SMALL YU */ + { 0x04d5, 0x30e6 }, /* kana_YU ユ KATAKANA LETTER YU */ + { 0x04ae, 0x30e7 }, /* kana_yo ョ KATAKANA LETTER SMALL YO */ + { 0x04d6, 0x30e8 }, /* kana_YO ヨ KATAKANA LETTER YO */ + { 0x04d7, 0x30e9 }, /* kana_RA ラ KATAKANA LETTER RA */ + { 0x04d8, 0x30ea }, /* kana_RI リ KATAKANA LETTER RI */ + { 0x04d9, 0x30eb }, /* kana_RU ル KATAKANA LETTER RU */ + { 0x04da, 0x30ec }, /* kana_RE レ KATAKANA LETTER RE */ + { 0x04db, 0x30ed }, /* kana_RO ロ KATAKANA LETTER RO */ + { 0x04dc, 0x30ef }, /* kana_WA ワ KATAKANA LETTER WA */ + { 0x04a6, 0x30f2 }, /* kana_WO ヲ KATAKANA LETTER WO */ + { 0x04dd, 0x30f3 }, /* kana_N ン KATAKANA LETTER N */ + { 0x04a5, 0x30fb }, /* kana_conjunctive ・ KATAKANA MIDDLE DOT */ + { 0x04b0, 0x30fc }, /* prolongedsound ー KATAKANA-HIRAGANA PROLONGED SOUND MARK */ + { 0x0ea1, 0x3131 }, /* Hangul_Kiyeog ㄱ HANGUL LETTER KIYEOK */ + { 0x0ea2, 0x3132 }, /* Hangul_SsangKiyeog ㄲ HANGUL LETTER SSANGKIYEOK */ + { 0x0ea3, 0x3133 }, /* Hangul_KiyeogSios ㄳ HANGUL LETTER KIYEOK-SIOS */ + { 0x0ea4, 0x3134 }, /* Hangul_Nieun ㄴ HANGUL LETTER NIEUN */ + { 0x0ea5, 0x3135 }, /* Hangul_NieunJieuj ㄵ HANGUL LETTER NIEUN-CIEUC */ + { 0x0ea6, 0x3136 }, /* Hangul_NieunHieuh ㄶ HANGUL LETTER NIEUN-HIEUH */ + { 0x0ea7, 0x3137 }, /* Hangul_Dikeud ㄷ HANGUL LETTER TIKEUT */ + { 0x0ea8, 0x3138 }, /* Hangul_SsangDikeud ㄸ HANGUL LETTER SSANGTIKEUT */ + { 0x0ea9, 0x3139 }, /* Hangul_Rieul ㄹ HANGUL LETTER RIEUL */ + { 0x0eaa, 0x313a }, /* Hangul_RieulKiyeog ㄺ HANGUL LETTER RIEUL-KIYEOK */ + { 0x0eab, 0x313b }, /* Hangul_RieulMieum ㄻ HANGUL LETTER RIEUL-MIEUM */ + { 0x0eac, 0x313c }, /* Hangul_RieulPieub ㄼ HANGUL LETTER RIEUL-PIEUP */ + { 0x0ead, 0x313d }, /* Hangul_RieulSios ㄽ HANGUL LETTER RIEUL-SIOS */ + { 0x0eae, 0x313e }, /* Hangul_RieulTieut ㄾ HANGUL LETTER RIEUL-THIEUTH */ + { 0x0eaf, 0x313f }, /* Hangul_RieulPhieuf ㄿ HANGUL LETTER RIEUL-PHIEUPH */ + { 0x0eb0, 0x3140 }, /* Hangul_RieulHieuh ㅀ HANGUL LETTER RIEUL-HIEUH */ + { 0x0eb1, 0x3141 }, /* Hangul_Mieum ㅁ HANGUL LETTER MIEUM */ + { 0x0eb2, 0x3142 }, /* Hangul_Pieub ㅂ HANGUL LETTER PIEUP */ + { 0x0eb3, 0x3143 }, /* Hangul_SsangPieub ㅃ HANGUL LETTER SSANGPIEUP */ + { 0x0eb4, 0x3144 }, /* Hangul_PieubSios ㅄ HANGUL LETTER PIEUP-SIOS */ + { 0x0eb5, 0x3145 }, /* Hangul_Sios ㅅ HANGUL LETTER SIOS */ + { 0x0eb6, 0x3146 }, /* Hangul_SsangSios ㅆ HANGUL LETTER SSANGSIOS */ + { 0x0eb7, 0x3147 }, /* Hangul_Ieung ㅇ HANGUL LETTER IEUNG */ + { 0x0eb8, 0x3148 }, /* Hangul_Jieuj ㅈ HANGUL LETTER CIEUC */ + { 0x0eb9, 0x3149 }, /* Hangul_SsangJieuj ㅉ HANGUL LETTER SSANGCIEUC */ + { 0x0eba, 0x314a }, /* Hangul_Cieuc ㅊ HANGUL LETTER CHIEUCH */ + { 0x0ebb, 0x314b }, /* Hangul_Khieuq ㅋ HANGUL LETTER KHIEUKH */ + { 0x0ebc, 0x314c }, /* Hangul_Tieut ㅌ HANGUL LETTER THIEUTH */ + { 0x0ebd, 0x314d }, /* Hangul_Phieuf ㅍ HANGUL LETTER PHIEUPH */ + { 0x0ebe, 0x314e }, /* Hangul_Hieuh ㅎ HANGUL LETTER HIEUH */ + { 0x0ebf, 0x314f }, /* Hangul_A ㅏ HANGUL LETTER A */ + { 0x0ec0, 0x3150 }, /* Hangul_AE ㅐ HANGUL LETTER AE */ + { 0x0ec1, 0x3151 }, /* Hangul_YA ㅑ HANGUL LETTER YA */ + { 0x0ec2, 0x3152 }, /* Hangul_YAE ㅒ HANGUL LETTER YAE */ + { 0x0ec3, 0x3153 }, /* Hangul_EO ㅓ HANGUL LETTER EO */ + { 0x0ec4, 0x3154 }, /* Hangul_E ㅔ HANGUL LETTER E */ + { 0x0ec5, 0x3155 }, /* Hangul_YEO ㅕ HANGUL LETTER YEO */ + { 0x0ec6, 0x3156 }, /* Hangul_YE ㅖ HANGUL LETTER YE */ + { 0x0ec7, 0x3157 }, /* Hangul_O ㅗ HANGUL LETTER O */ + { 0x0ec8, 0x3158 }, /* Hangul_WA ㅘ HANGUL LETTER WA */ + { 0x0ec9, 0x3159 }, /* Hangul_WAE ㅙ HANGUL LETTER WAE */ + { 0x0eca, 0x315a }, /* Hangul_OE ㅚ HANGUL LETTER OE */ + { 0x0ecb, 0x315b }, /* Hangul_YO ㅛ HANGUL LETTER YO */ + { 0x0ecc, 0x315c }, /* Hangul_U ㅜ HANGUL LETTER U */ + { 0x0ecd, 0x315d }, /* Hangul_WEO ㅝ HANGUL LETTER WEO */ + { 0x0ece, 0x315e }, /* Hangul_WE ㅞ HANGUL LETTER WE */ + { 0x0ecf, 0x315f }, /* Hangul_WI ㅟ HANGUL LETTER WI */ + { 0x0ed0, 0x3160 }, /* Hangul_YU ㅠ HANGUL LETTER YU */ + { 0x0ed1, 0x3161 }, /* Hangul_EU ㅡ HANGUL LETTER EU */ + { 0x0ed2, 0x3162 }, /* Hangul_YI ㅢ HANGUL LETTER YI */ + { 0x0ed3, 0x3163 }, /* Hangul_I ㅣ HANGUL LETTER I */ + { 0x0eef, 0x316d }, /* Hangul_RieulYeorinHieuh ㅭ HANGUL LETTER RIEUL-YEORINHIEUH */ + { 0x0ef0, 0x3171 }, /* Hangul_SunkyeongeumMieum ㅱ HANGUL LETTER KAPYEOUNMIEUM */ + { 0x0ef1, 0x3178 }, /* Hangul_SunkyeongeumPieub ㅸ HANGUL LETTER KAPYEOUNPIEUP */ + { 0x0ef2, 0x317f }, /* Hangul_PanSios ㅿ HANGUL LETTER PANSIOS */ + { 0x0ef4, 0x3184 }, /* Hangul_SunkyeongeumPhieuf ㆄ HANGUL LETTER KAPYEOUNPHIEUPH */ + { 0x0ef5, 0x3186 }, /* Hangul_YeorinHieuh ㆆ HANGUL LETTER YEORINHIEUH */ + { 0x0ef6, 0x318d }, /* Hangul_AraeA ㆍ HANGUL LETTER ARAEA */ + { 0x0ef7, 0x318e }, /* Hangul_AraeAE ㆎ HANGUL LETTER ARAEAE */ +}; + +/** + * ibus_unicode_to_keyval: + * @wc: a ISO10646 encoded character + * + * Convert from a ISO10646 character to a key symbol. + * + * Return value: the corresponding IBus key symbol, if one exists. + * or, if there is no corresponding symbol, + * wc | 0x01000000 + **/ +guint +ibus_unicode_to_keyval (gunichar wc) +{ + int min = 0; + int max = G_N_ELEMENTS (gdk_unicode_to_keysym_tab) - 1; + int mid; + + /* First check for Latin-1 characters (1:1 mapping) */ + if ((wc >= 0x0020 && wc <= 0x007e) || + (wc >= 0x00a0 && wc <= 0x00ff)) + return wc; + + /* Binary search in table */ + while (max >= min) { + mid = (min + max) / 2; + if (gdk_unicode_to_keysym_tab[mid].ucs < wc) + min = mid + 1; + else if (gdk_unicode_to_keysym_tab[mid].ucs > wc) + max = mid - 1; + else { + /* found it */ + return gdk_unicode_to_keysym_tab[mid].keysym; + } + } + + /* + * No matching keysym value found, return Unicode value plus 0x01000000 + * (a convention introduced in the UTF-8 work on xterm). + */ + return wc | 0x01000000; +} diff --git a/src/ibuslookuptable.c b/src/ibuslookuptable.c index 504c233e1..9782f39c4 100644 --- a/src/ibuslookuptable.c +++ b/src/ibuslookuptable.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,33 +19,30 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include #include "ibuslookuptable.h" /* functions prototype */ static void ibus_lookup_table_destroy (IBusLookupTable *table); static gboolean ibus_lookup_table_serialize (IBusLookupTable *table, - IBusMessageIter *iter); -static gboolean ibus_lookup_table_deserialize (IBusLookupTable *table, - IBusMessageIter *iter); + GVariantBuilder *builder); +static gint ibus_lookup_table_deserialize (IBusLookupTable *table, + GVariant *variant); static gboolean ibus_lookup_table_copy (IBusLookupTable *dest, IBusLookupTable *src); G_DEFINE_TYPE (IBusLookupTable, ibus_lookup_table, IBUS_TYPE_SERIALIZABLE) static void -ibus_lookup_table_class_init (IBusLookupTableClass *klass) +ibus_lookup_table_class_init (IBusLookupTableClass *class) { - IBusObjectClass *object_class = IBUS_OBJECT_CLASS (klass); - IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (klass); + IBusObjectClass *object_class = IBUS_OBJECT_CLASS (class); + IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (class); object_class->destroy = (IBusObjectDestroyFunc) ibus_lookup_table_destroy; serializable_class->serialize = (IBusSerializableSerializeFunc) ibus_lookup_table_serialize; serializable_class->deserialize = (IBusSerializableDeserializeFunc) ibus_lookup_table_deserialize; serializable_class->copy = (IBusSerializableCopyFunc) ibus_lookup_table_copy; - - g_string_append (serializable_class->signature, "uubbiavav"); } static void @@ -84,140 +82,82 @@ ibus_lookup_table_destroy (IBusLookupTable *table) static gboolean ibus_lookup_table_serialize (IBusLookupTable *table, - IBusMessageIter *iter) + GVariantBuilder *builder) { - IBusMessageIter array_iter; gboolean retval; guint i; - retval = IBUS_SERIALIZABLE_CLASS (ibus_lookup_table_parent_class)->serialize ((IBusSerializable *)table, iter); - g_return_val_if_fail (retval, FALSE); - - g_return_val_if_fail (IBUS_IS_LOOKUP_TABLE (table), FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_UINT, &table->page_size); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_UINT, &table->cursor_pos); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_BOOLEAN, &table->cursor_visible); - g_return_val_if_fail (retval, FALSE); + retval = IBUS_SERIALIZABLE_CLASS (ibus_lookup_table_parent_class)->serialize ((IBusSerializable *)table, builder); + g_return_val_if_fail (retval, 0); - retval = ibus_message_iter_append (iter, G_TYPE_BOOLEAN, &table->round); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_INT, &table->orientation); - g_return_val_if_fail (retval, FALSE); + g_return_val_if_fail (IBUS_IS_LOOKUP_TABLE (table), 0); - // append candidates - retval = ibus_message_iter_open_container (iter, - IBUS_TYPE_ARRAY, - "v", - &array_iter); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (builder, "u", table->page_size); + g_variant_builder_add (builder, "u", table->cursor_pos); + g_variant_builder_add (builder, "b", table->cursor_visible); + g_variant_builder_add (builder, "b", table->round); + g_variant_builder_add (builder, "i", table->orientation); + GVariantBuilder array; + /* append candidates */ + g_variant_builder_init (&array, G_VARIANT_TYPE ("av")); for (i = 0;; i++) { - IBusText *text; - - text = ibus_lookup_table_get_candidate (table, i); + IBusText *text = ibus_lookup_table_get_candidate (table, i); if (text == NULL) break; - - retval = ibus_message_iter_append (&array_iter, IBUS_TYPE_TEXT, &text); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (&array, "v", ibus_serializable_serialize ((IBusSerializable *)text)); } + g_variant_builder_add (builder, "av", &array); - retval = ibus_message_iter_close_container (iter, &array_iter); - g_return_val_if_fail (retval, FALSE); - - // append labels - retval = ibus_message_iter_open_container (iter, - IBUS_TYPE_ARRAY, - "v", - &array_iter); - g_return_val_if_fail (retval, FALSE); - + /* append labels */ + g_variant_builder_init (&array, G_VARIANT_TYPE ("av")); for (i = 0;; i++) { - IBusText *text; - - text = ibus_lookup_table_get_label (table, i); + IBusText *text = ibus_lookup_table_get_label (table, i); if (text == NULL) break; - retval = ibus_message_iter_append (&array_iter, IBUS_TYPE_TEXT, &text); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (&array, "v", ibus_serializable_serialize ((IBusSerializable *)text)); } - - retval = ibus_message_iter_close_container (iter, &array_iter); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (builder, "av", &array); return TRUE; } -static gboolean +static gint ibus_lookup_table_deserialize (IBusLookupTable *table, - IBusMessageIter *iter) + GVariant *variant) { - DBusMessageIter array_iter; - gboolean retval; - - retval = IBUS_SERIALIZABLE_CLASS (ibus_lookup_table_parent_class)->deserialize ((IBusSerializable *)table, iter); - g_return_val_if_fail (retval, FALSE); - - g_return_val_if_fail (IBUS_IS_LOOKUP_TABLE (table), FALSE); - - retval = ibus_message_iter_get (iter, G_TYPE_UINT, &table->page_size); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - - retval = ibus_message_iter_get (iter, G_TYPE_UINT, &table->cursor_pos); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); + gint retval; - retval = ibus_message_iter_get (iter, G_TYPE_BOOLEAN, &table->cursor_visible); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); + retval = IBUS_SERIALIZABLE_CLASS (ibus_lookup_table_parent_class)->deserialize ((IBusSerializable *)table, variant); + g_return_val_if_fail (retval, 0); - retval = ibus_message_iter_get (iter, G_TYPE_BOOLEAN, &table->round); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); + g_return_val_if_fail (IBUS_IS_LOOKUP_TABLE (table), 0); - retval = ibus_message_iter_get (iter, G_TYPE_INT, &table->orientation); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); + g_variant_get_child (variant, retval++, "u", &table->page_size); + g_variant_get_child (variant, retval++, "u", &table->cursor_pos); + g_variant_get_child (variant, retval++, "b", &table->cursor_visible); + g_variant_get_child (variant, retval++, "b", &table->round); + g_variant_get_child (variant, retval++, "i", &table->orientation); + GVariant *var; // deserialize candidates - retval = ibus_message_iter_recurse (iter, IBUS_TYPE_ARRAY, &array_iter); - g_return_val_if_fail (retval, FALSE); - - while (ibus_message_iter_get_arg_type (&array_iter) != G_TYPE_INVALID) { - IBusText *text; - retval = ibus_message_iter_get (&array_iter, IBUS_TYPE_TEXT, &text); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (&array_iter); - - ibus_lookup_table_append_candidate (table, text); + GVariantIter *iter = NULL; + g_variant_get_child (variant, retval++, "av", &iter); + while (g_variant_iter_loop (iter, "v", &var)) { + ibus_lookup_table_append_candidate (table, IBUS_TEXT (ibus_serializable_deserialize (var))); } - - ibus_message_iter_next (iter); + g_variant_iter_free (iter); // deserialize labels - retval = ibus_message_iter_recurse (iter, IBUS_TYPE_ARRAY, &array_iter); - g_return_val_if_fail (retval, FALSE); - - while (ibus_message_iter_get_arg_type (&array_iter) != G_TYPE_INVALID) { - IBusText *text; - retval = ibus_message_iter_get (&array_iter, IBUS_TYPE_TEXT, &text); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (&array_iter); - - ibus_lookup_table_append_label (table, text); + iter = NULL; + g_variant_get_child (variant, retval++, "av", &iter); + while (g_variant_iter_loop (iter, "v", &var)) { + ibus_lookup_table_append_label (table, IBUS_TEXT (ibus_serializable_deserialize (var))); } + g_variant_iter_free (iter); - ibus_message_iter_next (iter); - - return TRUE; + return retval; } static gboolean diff --git a/src/ibuslookuptable.h b/src/ibuslookuptable.h index 1e5664456..53d08d3e3 100644 --- a/src/ibuslookuptable.h +++ b/src/ibuslookuptable.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibuslookuptable * @short_description: Candidate word/phrase lookup table. diff --git a/src/ibusmainloop.c b/src/ibusmainloop.c deleted file mode 100644 index 35e3b7d7b..000000000 --- a/src/ibusmainloop.c +++ /dev/null @@ -1,51 +0,0 @@ -/* vim:set et sts=4: */ -/* ibus - The Input Bus - * Copyright (C) 2008-2010 Peng Huang - * Copyright (C) 2008-2010 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#include "ibusmainloop.h" -#include "ibusinternal.h" - -static DBusConnectionSetupFunc _connection_setup_func = (DBusConnectionSetupFunc) dbus_connection_setup; -static DBusServerSetupFunc _server_setup_func = (DBusServerSetupFunc) dbus_server_setup; -static gpointer _user_data = NULL; - -void -ibus_mainloop_setup (DBusConnectionSetupFunc connection_func, - DBusServerSetupFunc server_func, - gpointer user_data) -{ - _connection_setup_func = connection_func; - _server_setup_func = server_func; - _user_data = user_data; -} - -void -ibus_dbus_connection_setup (DBusConnection *connection) -{ - if (_connection_setup_func != NULL) - (_connection_setup_func) (connection, _user_data); -} - -void -ibus_dbus_server_setup (DBusServer *server) -{ - if (_server_setup_func != NULL) - (_server_setup_func) (server, _user_data); -} - diff --git a/src/ibusmainloop.h b/src/ibusmainloop.h deleted file mode 100644 index 0c68d1f5e..000000000 --- a/src/ibusmainloop.h +++ /dev/null @@ -1,111 +0,0 @@ -/* vim:set et sts=4: */ -/* ibus - The Input Bus - * Copyright (C) 2008-2010 Peng Huang - * Copyright (C) 2008-2010 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -/** - * SECTION: ibusmainloop - * @short_description: DBus server and connection setup functions. - * @stability: Stable - * - * This section defines the DBus server and connection setup functions, - * and prototypes of their callback functions. - */ - -#ifndef __IBUS_MAINLOOP_H_ -#define __IBUS_MAINLOOP_H_ - -#include -#include "ibusdbus.h" - -/** - * DBusConnectionSetupFunc: - * @connection: A DBusConnection - * @user_data: User data to be passed to callback function. - * - * A prototype of callback to DBus connection setup function. - */ -typedef void (* DBusConnectionSetupFunc) (DBusConnection *connection, - gpointer user_data); - -/** - * DBusServerSetupFunc: - * @server: A DBusConnection - * @user_data: User data to be passed to callback function. - * - * A prototype of DBus server setup function. - */ -typedef void (* DBusServerSetupFunc) (DBusServer *server, - gpointer user_data); - -/** - * ibus_mainloop_setup: - * @connection_func: A DBus connection setup function. - * @server_func: A prototype of DBus server setup function. - * @user_data: User data to be passed to callback function. - * - * Sets the watch and timeout functions of a #DBusConnection - * and #DBusServer to integrate the connection with the GLib main loop. - * - * Parameter @user_data should be in type #GMainContext. - * It will be passed to both callback functions, - * however, normally %NULL is sufficient. - * - * If called twice for the same user_data, does nothing the second - * time. If called once with user_data A and once with user_data B, - * user_data B replaces user_data A as the context monitoring the - * connection. - * - * @see_also: ibus_dbus_connection_setup(), ibus_dbus_server_setup(). - */ -void ibus_mainloop_setup (DBusConnectionSetupFunc connection_func, - DBusServerSetupFunc server_func, - gpointer user_data); - -/** - * ibus_dbus_server_setup: - * @server: A DBusServer. - * - * Sets the watch and timeout functions of a #DBusServer - * to integrate the server with the GLib main loop. - * - * This function uses the parameter @user_data and - * server_func set with ibus_mainloop_setup(), - * or fall back to NULL and dbus_server_setup() if those are not defined. - * - * @see_also: ibus_mainloop_setup(), dbus_server_setup(). - */ -void ibus_dbus_server_setup (DBusServer *server); - -/** - * ibus_dbus_connection_setup: - * @connection: A DBusConnection. - * - * Sets the watch and timeout functions of a #DBusConnection - * to integrate the connection with the GLib main loop. - * - * This function uses the parameter @user_data and - * connection_func set with ibus_mainloop_setup(), - * or fall back to NULL and dbus_connection_setup() if those are not defined. - * - * @see_also: ibus_mainloop_setup(), dbus_connection_setup(). - */ -void ibus_dbus_connection_setup (DBusConnection *connection); - -#endif - diff --git a/src/ibusmarshalers.list b/src/ibusmarshalers.list index 4473dab1a..918bc7f7a 100644 --- a/src/ibusmarshalers.list +++ b/src/ibusmarshalers.list @@ -15,10 +15,13 @@ VOID:INT,UINT VOID:UINT,UINT,UINT VOID:OBJECT,UINT,BOOL VOID:OBJECT,UINT,BOOL,UINT +VOID:OBJECT,UINT,UINT VOID:OBJECT,BOOL VOID:BOXED,BOOL VOID:BOXED -VOID:STRING,STRING,BOXED +VOID:STRING,STRING,VARIANT VOID:STRING,STRING,STRING VOID:UINT VOID:UINT,POINTER +VOID:POINTER,UINT +OBJECT:STRING diff --git a/src/ibusmessage.c b/src/ibusmessage.c deleted file mode 100644 index 80a2a7547..000000000 --- a/src/ibusmessage.c +++ /dev/null @@ -1,1026 +0,0 @@ -/* vim:set et sts=4: */ -/* ibus - The Input Bus - * Copyright (C) 2008-2010 Peng Huang - * Copyright (C) 2008-2010 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#include -#include "ibusmessage.h" -#include "ibusserializable.h" -#include "ibusconfigprivate.h" - -GType -ibus_type_get_object_path (void) -{ - static GType type = 0; - - if (type == 0) { - type = g_type_register_static_simple ( - G_TYPE_STRING, - "IBusObjectPath", - 0, - NULL, - 0, - NULL, - G_TYPE_FLAG_ABSTRACT); - } - return type; -} - -GType -ibus_type_get_array (void) -{ - static GType type = 0; - - if (type == 0) { - type = g_type_register_static_simple ( - G_TYPE_BOXED, - "IBusArray", - 0, - NULL, - 0, - NULL, - G_TYPE_FLAG_ABSTRACT); - } - return type; -} - -GType -ibus_type_get_struct (void) -{ - static GType type = 0; - - if (type == 0) { - type = g_type_register_static_simple ( - G_TYPE_BOXED, - "IBusStruct", - 0, - NULL, - 0, - NULL, - G_TYPE_FLAG_ABSTRACT); - } - return type; -} - -GType -ibus_type_get_dict_entry (void) -{ - static GType type = 0; - - if (type == 0) { - type = g_type_register_static_simple ( - G_TYPE_BOXED, - "IBusDictEntry", - 0, - NULL, - 0, - NULL, - G_TYPE_FLAG_ABSTRACT); - } - return type; -} - -GType -ibus_type_get_variant (void) -{ - static GType type = 0; - - if (type == 0) { - type = g_type_register_static_simple (G_TYPE_BOXED, - "IBusVariant", - 0, - NULL, - 0, - NULL, - 0); - } - return type; -} - -IBusMessage * -ibus_message_new (gint message_type) -{ - return dbus_message_new (message_type); -} - -IBusMessage * -ibus_message_ref (IBusMessage *message) -{ - return dbus_message_ref (message); -} - -void -ibus_message_unref (IBusMessage *message) -{ - dbus_message_unref (message); -} - -IBusMessage * -ibus_message_new_method_call (const gchar *destination, - const gchar *path, - const gchar *interface, - const gchar *method) -{ - return dbus_message_new_method_call (destination, - path, - interface, - method); -} - -IBusMessage * -ibus_message_new_method_return (IBusMessage *reply_to) -{ - return dbus_message_new_method_return (reply_to); -} - -IBusMessage * -ibus_message_new_error (IBusMessage *reply_to, - const gchar *error_name, - const gchar *error_message) -{ - return dbus_message_new_error (reply_to, - error_name, - error_message); -} - -IBusMessage * -ibus_message_new_error_printf (IBusMessage *reply_to, - const gchar *error_name, - const gchar *error_format, - ...) -{ - va_list va_args; - gchar *error_message; - IBusMessage *message; - - va_start (va_args, error_format); - error_message = g_strdup_vprintf (error_format, va_args); - va_end (va_args); - - message = ibus_message_new_error (reply_to, - error_name, - error_message); - g_free (error_message); - - return message; -} - -IBusMessage * -ibus_message_new_signal (const gchar *path, - const gchar *interface, - const gchar *name) -{ - return dbus_message_new_signal (path, - interface, - name); -} - -gboolean -ibus_message_is_method_call (IBusMessage *message, - const gchar *interface, - const gchar *method) -{ - return dbus_message_is_method_call (message, - interface, - method); -} - -gboolean -ibus_message_is_error (IBusMessage *message, - const gchar *error_name) -{ - return dbus_message_is_error (message, error_name); -} - -gboolean -ibus_message_is_signal (IBusMessage *message, - const gchar *interface, - const gchar *signal_name) -{ - return dbus_message_is_signal (message, - interface, - signal_name); -} - -gboolean -ibus_message_set_destination (IBusMessage *message, - const gchar *destination) -{ - return dbus_message_set_destination (message, destination); -} - -gboolean -ibus_message_set_sender (IBusMessage *message, - const gchar *sender) -{ - return dbus_message_set_sender (message, sender); -} - -gboolean -ibus_message_set_error_name (IBusMessage *message, - const gchar *error_name) -{ - return dbus_message_set_error_name (message, error_name); -} - -gboolean -ibus_message_set_interface (IBusMessage *message, - const gchar *interface) -{ - return dbus_message_set_interface (message, interface); -} - -gboolean -ibus_message_set_member (IBusMessage *message, - const gchar *member) -{ - return dbus_message_set_member (message, member); -} - -gboolean -ibus_message_set_path (IBusMessage *message, - const gchar *path) -{ - return dbus_message_set_path (message, path); -} - -void -ibus_message_set_no_reply (IBusMessage *message, - gboolean no_reply) -{ - dbus_message_set_no_reply (message, no_reply); -} - -gboolean -ibus_message_set_reply_serial (IBusMessage *message, - guint32 reply_serial) -{ - return dbus_message_set_reply_serial (message, reply_serial); -} - -gint -ibus_message_get_type (IBusMessage *message) -{ - return dbus_message_get_type (message); -} - -const gchar * -ibus_message_get_destination (IBusMessage *message) -{ - return dbus_message_get_destination (message); -} - -const gchar * -ibus_message_get_sender (IBusMessage *message) -{ - return dbus_message_get_sender (message); -} - -const gchar * -ibus_message_get_error_name (IBusMessage *message) -{ - return dbus_message_get_error_name (message); -} - -const gchar * -ibus_message_get_error_message (IBusMessage *message) -{ - gchar *error_message; - gboolean retval; - - retval = ibus_message_get_args (message, NULL, G_TYPE_STRING, &error_message, G_TYPE_INVALID); - - if (retval) - return error_message; - return NULL; -} - -const gchar * -ibus_message_get_interface (IBusMessage *message) -{ - return dbus_message_get_interface (message); -} - -const gchar * -ibus_message_get_member (IBusMessage *message) -{ - return dbus_message_get_member (message); -} - -const gchar * -ibus_message_get_path (IBusMessage *message) -{ - return dbus_message_get_path (message); -} - -gboolean -ibus_message_get_no_reply (IBusMessage *message) -{ - return dbus_message_get_no_reply (message); -} - -guint32 -ibus_message_get_reply_serial (IBusMessage *message) -{ - return dbus_message_get_reply_serial (message); -} - -guint32 -ibus_message_get_serial (IBusMessage *message) -{ - return dbus_message_get_serial (message); -} - -gboolean -ibus_message_append_args (IBusMessage *message, - GType first_arg_type, - ...) -{ - gboolean retval; - va_list va_args; - - va_start (va_args, first_arg_type); - retval = ibus_message_append_args_valist (message, - first_arg_type, - va_args); - va_end (va_args); - - return retval; -} - -gboolean -ibus_message_append_args_valist (IBusMessage *message, - GType first_arg_type, - va_list va_args) -{ - GType type; - gboolean retval; - IBusMessageIter iter; - - ibus_message_iter_init_append (message, &iter); - - type = first_arg_type; - while (type != G_TYPE_INVALID) { - gpointer value = va_arg (va_args, gpointer); - retval = ibus_message_iter_append (&iter, type, value); - type = va_arg (va_args, GType); - - g_return_val_if_fail (retval, FALSE); - } - - return TRUE; -} - -gboolean -ibus_message_get_args (IBusMessage *message, - IBusError **error, - GType first_arg_type, - ...) -{ - gboolean retval; - va_list va_args; - - va_start (va_args, first_arg_type); - retval = ibus_message_get_args_valist (message, - error, - first_arg_type, - va_args); - va_end (va_args); - - return retval; - -} - -gboolean -ibus_message_get_args_valist (IBusMessage *message, - IBusError **error, - GType first_arg_type, - va_list va_args) -{ - g_assert (message != NULL); - - gboolean retval; - IBusMessageIter iter; - GType type; - gpointer value; - va_list backup_args; - gint i; - - retval = ibus_message_iter_init (message, &iter); - - if (!retval) { - if (error) { - *error = ibus_error_new_from_printf (DBUS_ERROR_INVALID_ARGS, - "Message does not have arguments!"); - } - return FALSE; - } - - va_copy (backup_args, va_args); - - i = 0; - type = first_arg_type; - while (type != G_TYPE_INVALID) { - value = va_arg (va_args, gpointer); - retval = ibus_message_iter_get (&iter, type, value); - if (!retval) - goto _failed; - ibus_message_iter_next (&iter); - i ++; - type = va_arg (va_args, GType); - } - va_end (backup_args); - - return TRUE; - -_failed: - *error = ibus_error_new_from_printf (DBUS_ERROR_INVALID_ARGS, - "The argument %d is not %s", - i, - g_type_name (type)); - /* release resources */ - type = first_arg_type; - while (i > 0) { - gpointer *value = va_arg (backup_args, gpointer *); - if (g_type_is_a (type, G_TYPE_BOXED)) { - g_boxed_free (type, *value); - } - else if (g_type_is_a (type, G_TYPE_OBJECT)) { - g_object_unref (*value); - } - i --; - type = va_arg (backup_args, GType); - } - va_end (backup_args); - - return FALSE; -} - -void -ibus_message_iter_init_append (IBusMessage *message, - IBusMessageIter *iter) -{ - dbus_message_iter_init_append (message, iter); -} - -gboolean -ibus_message_iter_append (IBusMessageIter *iter, - GType type, - gconstpointer value) -{ - g_assert (iter != NULL); - g_assert (type != G_TYPE_INVALID); - g_assert (value != NULL); - - switch (type) { - case G_TYPE_CHAR: - { - char v; - v = * (gchar *)value; - return dbus_message_iter_append_basic (iter, DBUS_TYPE_BYTE, &v); - } - case G_TYPE_INT: - { - dbus_int32_t v; - v = * (gint *)value; - return dbus_message_iter_append_basic (iter, DBUS_TYPE_INT32, &v); - } - case G_TYPE_UINT: - { - dbus_uint32_t v; - v = * (guint *)value; - return dbus_message_iter_append_basic (iter, DBUS_TYPE_UINT32, &v); - } - case G_TYPE_LONG: - { - dbus_int64_t v; - v = * (glong *)value; - return dbus_message_iter_append_basic (iter, DBUS_TYPE_INT64, &v); - } - case G_TYPE_ULONG: - { - dbus_uint64_t v; - v = * (gulong *)value; - return dbus_message_iter_append_basic (iter, DBUS_TYPE_UINT64, &v); - } - case G_TYPE_BOOLEAN: - { - dbus_bool_t v; - v = * (gboolean *)value; - return dbus_message_iter_append_basic (iter, DBUS_TYPE_BOOLEAN, &v); - } - case G_TYPE_STRING: - { - const gchar *v; - v = *(gchar **)value != NULL ? * (gchar **)value : ""; - return dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &v); - } - case G_TYPE_INT64: - { - dbus_int64_t v; - v = * (gint64 *)value; - return dbus_message_iter_append_basic (iter, DBUS_TYPE_INT64, &v); - } - case G_TYPE_UINT64: - { - dbus_uint64_t v; - v = * (guint64 *)value; - return dbus_message_iter_append_basic (iter, DBUS_TYPE_UINT64, &v); - } - case G_TYPE_FLOAT: - { - double v; - v = * (gfloat *)value; - return dbus_message_iter_append_basic (iter, DBUS_TYPE_DOUBLE, &v); - } - - case G_TYPE_DOUBLE: - { - double v; - v = * (gdouble *)value; - return dbus_message_iter_append_basic (iter, DBUS_TYPE_DOUBLE, &v); - } - default: - if (type == G_TYPE_VALUE) { - _to_dbus_value (iter, (GValue *)value); - return TRUE; - } - if (type == IBUS_TYPE_OBJECT_PATH) { - const gchar *v; - v = * (gchar **)value; - return dbus_message_iter_append_basic (iter, DBUS_TYPE_OBJECT_PATH, &v); - } - - if (g_type_is_a (type, IBUS_TYPE_SERIALIZABLE)) { - return ibus_serializable_serialize (*(IBusSerializable **)value, iter); - } - } - - return FALSE; -} - -static gboolean -gtype_is_basic (GType type) -{ - switch (type) { - case G_TYPE_CHAR: - case G_TYPE_INT: - case G_TYPE_UINT: - case G_TYPE_INT64: - case G_TYPE_UINT64: - case G_TYPE_BOOLEAN: - case G_TYPE_DOUBLE: - case G_TYPE_STRING: - return TRUE; - default: - if (type == IBUS_TYPE_OBJECT_PATH) - return TRUE; - return FALSE; - } -} - -gboolean -ibus_message_iter_copy_data (IBusMessageIter *dst, - IBusMessageIter *src) -{ - GType type; - gboolean retval; - - type = ibus_message_iter_get_arg_type (src); - - g_return_val_if_fail (type != G_TYPE_INVALID, FALSE); - - if (gtype_is_basic (type)) { - gchar data[16]; - ibus_message_iter_get_basic (src, data); - retval = ibus_message_iter_append (dst, type, data); - g_return_val_if_fail (retval, FALSE); - return TRUE; - } - - if (type == IBUS_TYPE_VARIANT) { - IBusMessageIter subdst, subsrc; - gchar *signature; - - retval = ibus_message_iter_recurse (src, IBUS_TYPE_VARIANT, &subsrc); - g_return_val_if_fail (retval, FALSE); - - signature = dbus_message_iter_get_signature (&subsrc); - g_return_val_if_fail (signature != NULL, FALSE); - retval = ibus_message_iter_open_container (dst, - IBUS_TYPE_VARIANT, - signature, - &subdst); - dbus_free (signature); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_copy_data (&subdst, &subsrc); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_close_container (dst, &subdst); - g_return_val_if_fail (retval, FALSE); - - return TRUE; - } - else if (type == IBUS_TYPE_ARRAY) { - IBusMessageIter subdst, subsrc; - gchar *signature; - - retval = ibus_message_iter_recurse (src, IBUS_TYPE_ARRAY, &subsrc); - g_return_val_if_fail (retval, FALSE); - - signature = dbus_message_iter_get_signature (src); - g_return_val_if_fail (signature != NULL, FALSE); - - retval = ibus_message_iter_open_container (dst, - IBUS_TYPE_ARRAY, - signature + 1, - &subdst); - dbus_free (signature); - g_return_val_if_fail (retval, FALSE); - - while (ibus_message_iter_get_arg_type (&subsrc) != G_TYPE_INVALID) { - retval = ibus_message_iter_copy_data (&subdst, &subsrc); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (&subsrc); - } - - retval = ibus_message_iter_close_container (dst, &subdst); - g_return_val_if_fail (retval, FALSE); - - return TRUE; - } - else if (type == IBUS_TYPE_STRUCT) { - IBusMessageIter subdst, subsrc; - - retval = ibus_message_iter_recurse (src, IBUS_TYPE_STRUCT, &subsrc); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_open_container (dst, - IBUS_TYPE_STRUCT, - NULL, - &subdst); - g_return_val_if_fail (retval, FALSE); - - while (ibus_message_iter_get_arg_type (&subsrc) != G_TYPE_INVALID) { - retval = ibus_message_iter_copy_data (&subdst, &subsrc); - ibus_message_iter_next (&subsrc); - g_return_val_if_fail (retval, FALSE); - } - - retval = ibus_message_iter_close_container (dst, &subdst); - g_return_val_if_fail (retval, FALSE); - - return TRUE; - } - else if (type == IBUS_TYPE_DICT_ENTRY) { - IBusMessageIter subdst, subsrc; - - retval = ibus_message_iter_recurse (src, IBUS_TYPE_DICT_ENTRY, &subsrc); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_open_container (dst, - IBUS_TYPE_DICT_ENTRY, - NULL, - &subdst); - g_return_val_if_fail (retval, FALSE); - - /* copy key */ - retval = ibus_message_iter_copy_data (&subdst, &subsrc); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (&subsrc); - - /* copy value */ - retval = ibus_message_iter_copy_data (&subdst, &subsrc); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (&subsrc); - - retval = ibus_message_iter_close_container (dst, &subdst); - g_return_val_if_fail (retval, FALSE); - - return TRUE; - } - - return FALSE; - -} - -gboolean -ibus_message_iter_init (IBusMessage *message, - IBusMessageIter *iter) -{ - return dbus_message_iter_init (message, iter); -} - -void -ibus_message_iter_get_basic (IBusMessageIter *iter, - gpointer value) -{ - dbus_message_iter_get_basic (iter, value); -} - -gboolean -ibus_message_iter_get (IBusMessageIter *iter, - GType type, - gpointer value) -{ - g_assert (iter != NULL); - g_assert (type != G_TYPE_INVALID); - g_assert (value != NULL); - - switch (type) { - case G_TYPE_CHAR: - { - char v; - if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_BYTE) - return FALSE; - dbus_message_iter_get_basic (iter, &v); - *(gchar *) value = (gchar) v; - return TRUE; - } - case G_TYPE_INT: - { - dbus_int32_t v; - if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_INT32) - return FALSE; - dbus_message_iter_get_basic (iter, &v); - *(gint *) value = (gint) v; - return TRUE; - } - case G_TYPE_UINT: - { - dbus_uint32_t v; - if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_UINT32) - return FALSE; - dbus_message_iter_get_basic (iter, &v); - *(guint *) value = (guint) v; - return TRUE; - } - case G_TYPE_LONG: - { - dbus_int64_t v; - if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_INT32) - return FALSE; - dbus_message_iter_get_basic (iter, &v); - *(glong *) value = (glong) v; - return TRUE; - } - case G_TYPE_ULONG: - { - dbus_uint64_t v; - if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_UINT32) - return FALSE; - dbus_message_iter_get_basic (iter, &v); - *(gulong *) value = (gulong) v; - return TRUE; - } - - case G_TYPE_BOOLEAN: - { - dbus_bool_t v; - if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_BOOLEAN) - return FALSE; - dbus_message_iter_get_basic (iter, &v); - *(gboolean *) value = (gboolean) v; - return TRUE; - } - case G_TYPE_STRING: - { - gchar *v; - if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_STRING) - return FALSE; - dbus_message_iter_get_basic (iter, &v); - *(gchar **) value = (gchar *) v; - return TRUE; - } - case G_TYPE_INT64: - { - dbus_int64_t v; - if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_INT64) - return FALSE; - dbus_message_iter_get_basic (iter, &v); - *(gint64 *) value = (gint64) v; - return TRUE; - } - case G_TYPE_UINT64: - { - dbus_uint64_t v; - if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_UINT64) - return FALSE; - dbus_message_iter_get_basic (iter, &v); - *(guint64 *) value = (guint64) v; - return TRUE; - } - case G_TYPE_FLOAT: - { - double v; - if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_DOUBLE) - return FALSE; - dbus_message_iter_get_basic (iter, &v); - *(gfloat *) value = (gfloat) v; - return TRUE; - } - - case G_TYPE_DOUBLE: - { - double v; - if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_DOUBLE) - return FALSE; - dbus_message_iter_get_basic (iter, &v); - *(gdouble *) value = (gdouble) v; - return TRUE; - } - default: - if (type == G_TYPE_VALUE) { - _from_dbus_value (iter, (GValue *) value); - return TRUE; - } - if (type == IBUS_TYPE_OBJECT_PATH) { - gchar *v; - if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_OBJECT_PATH) - return FALSE; - dbus_message_iter_get_basic (iter, &v); - *(gchar **) value = (gchar *) v; - return TRUE; - } - - if (g_type_is_a (type, IBUS_TYPE_SERIALIZABLE)) { - IBusSerializable *v; - v = ibus_serializable_deserialize (iter); - - if (v == NULL) - return FALSE; - if (!g_type_is_a (G_OBJECT_TYPE (v), type)) { - g_object_unref (v); - return FALSE; - } - *(gpointer *) value = v; - return TRUE; - } - } - return FALSE; -} - -gboolean -ibus_message_iter_next (IBusMessageIter *iter) -{ - return dbus_message_iter_next (iter); -} - -gboolean -ibus_message_iter_has_next (IBusMessageIter *iter) -{ - return dbus_message_iter_has_next (iter); -} - -gboolean -ibus_message_iter_open_container (IBusMessageIter *iter, - GType type, - const gchar *contained_signature, - IBusMessageIter *sub) -{ - gint dbus_type; - - if (type == IBUS_TYPE_ARRAY) { - dbus_type = DBUS_TYPE_ARRAY; - } - else if (type == IBUS_TYPE_STRUCT) { - dbus_type = DBUS_TYPE_STRUCT; - } - else if (type == IBUS_TYPE_DICT_ENTRY) { - dbus_type = DBUS_TYPE_DICT_ENTRY; - } - else if (type == IBUS_TYPE_VARIANT) { - dbus_type = DBUS_TYPE_VARIANT; - } - else - g_return_val_if_reached (FALSE); - - return dbus_message_iter_open_container (iter, - dbus_type, - contained_signature, - sub); -} - -gboolean -ibus_message_iter_close_container (IBusMessageIter *iter, - IBusMessageIter *sub) -{ - return dbus_message_iter_close_container (iter, sub); -} - - -static GType -dbus_type_to_gtype (gint type) -{ - switch (type) { -#define TYPE_TABLE(a, b) case a: return (b); - TYPE_TABLE (DBUS_TYPE_BYTE, G_TYPE_CHAR); - TYPE_TABLE (DBUS_TYPE_INT32, G_TYPE_INT); - TYPE_TABLE (DBUS_TYPE_INT64, G_TYPE_INT64); - TYPE_TABLE (DBUS_TYPE_UINT32, G_TYPE_UINT); - TYPE_TABLE (DBUS_TYPE_UINT64, G_TYPE_UINT64); - TYPE_TABLE (DBUS_TYPE_BOOLEAN, G_TYPE_BOOLEAN); - TYPE_TABLE (DBUS_TYPE_DOUBLE, G_TYPE_DOUBLE); - TYPE_TABLE (DBUS_TYPE_STRING, G_TYPE_STRING); - TYPE_TABLE (DBUS_TYPE_OBJECT_PATH, IBUS_TYPE_OBJECT_PATH); - TYPE_TABLE (DBUS_TYPE_ARRAY, IBUS_TYPE_ARRAY); - TYPE_TABLE (DBUS_TYPE_STRUCT, IBUS_TYPE_STRUCT); - TYPE_TABLE (DBUS_TYPE_DICT_ENTRY, IBUS_TYPE_DICT_ENTRY); - TYPE_TABLE (DBUS_TYPE_VARIANT, IBUS_TYPE_VARIANT); -#undef TYPE_TABLE - } - return G_TYPE_INVALID; -} - - -gboolean -ibus_message_iter_recurse (IBusMessageIter *iter, - GType type, - IBusMessageIter *sub) -{ - g_assert (iter != NULL); - g_assert (sub != NULL); - g_assert (type == IBUS_TYPE_ARRAY || - type == IBUS_TYPE_STRUCT || - type == IBUS_TYPE_DICT_ENTRY || - type == IBUS_TYPE_VARIANT); - GType gtype; - - gtype = ibus_message_iter_get_arg_type (iter); - - g_return_val_if_fail (gtype == type, FALSE); - - dbus_message_iter_recurse (iter, sub); - - return TRUE; -} - -GType -ibus_message_iter_get_arg_type (IBusMessageIter *iter) -{ - gint type; - - type = dbus_message_iter_get_arg_type (iter); - - return dbus_type_to_gtype (type); -} - - -GType -ibus_message_iter_get_element_type (IBusMessageIter *iter) -{ - gint type; - - type = dbus_message_iter_get_element_type (iter); - - return dbus_type_to_gtype (type); -} - -gchar * -ibus_message_to_string (IBusMessage *message) -{ - g_assert (message != NULL); - - GString *string = g_string_new (""); - - IBusMessageIter iter; - GType type; - gint i = 0; - - g_string_append_printf (string, - "message: %d\n" - "\tdestination = %s\n" - "\tpath = %s\n" - "\tinterface = %s\n" - "\tmember = %s\n", - ibus_message_get_type (message), - ibus_message_get_destination (message), - ibus_message_get_path (message), - ibus_message_get_interface (message), - ibus_message_get_member (message)); - - ibus_message_iter_init (message, &iter); - while ((type = ibus_message_iter_get_arg_type (&iter)) != G_TYPE_INVALID) { - g_string_append_printf (string, "\t\targ%d is %s\n", i++, g_type_name (type)); - ibus_message_iter_next (&iter); - } - - return g_string_free (string, FALSE); -} - diff --git a/src/ibusmessage.h b/src/ibusmessage.h deleted file mode 100644 index fba2673d4..000000000 --- a/src/ibusmessage.h +++ /dev/null @@ -1,948 +0,0 @@ -/* vim:set et sts=4: */ -/* ibus - The Input Bus - * Copyright (C) 2008-2010 Peng Huang - * Copyright (C) 2008-2010 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -/** - * SECTION: ibusmessage - * @Title: IBusMessage - * @Short_description: A DBusMessage in IBus. - * @Stability: Stable - * - * An IBusMessage is essentially a DBusMessage, which representing a message received from or to - * be sent to another application. - * - * Besides DBusMessage functions, An IBusMessage can be manipulated - * with its own specific functions, which are defined in this section. - */ -#ifndef __IBUS_MESSAGE_H_ -#define __IBUS_MESSAGE_H_ - -#include -#include -#include "ibusdbus.h" -#include "ibuserror.h" - -/** - * IBUS_TYPE_OBJECT_PATH: - * - * Type of object path. - */ -#define IBUS_TYPE_OBJECT_PATH (ibus_type_get_object_path ()) - -/** - * IBUS_TYPE_ARRAY: - * - * Type of IBusArray. - */ -#define IBUS_TYPE_ARRAY (ibus_type_get_array ()) - -/** - * IBUS_TYPE_STRUCT: - * - * Type of IBusStruct. - */ -#define IBUS_TYPE_STRUCT (ibus_type_get_struct ()) - -/** - * IBUS_TYPE_DICT_ENTRY: - * - * Type of IBusDictEntry. - */ -#define IBUS_TYPE_DICT_ENTRY (ibus_type_get_dict_entry ()) - -/** - * IBUS_TYPE_VARIANT: - * - * Type of IBusVariant. - */ -#define IBUS_TYPE_VARIANT (ibus_type_get_variant ()) - -G_BEGIN_DECLS - -/** - * IBusMessage: - * - * An opaque data structure that represents IBusMessage. - */ -typedef DBusMessage IBusMessage; - -/** - * IBusMessageIter: - * - * An opaque data structure that represents IBusMessageIter. - */ -typedef DBusMessageIter IBusMessageIter; - -/** - * ibus_type_get_object_path: - * @returns: Type of object path. - * - * Gets the type of object path. - */ -GType ibus_type_get_object_path (void); - -/** - * ibus_type_get_array: - * @returns: Type of IBusArray. - * - * Gets the type of IBusArray. - */ -GType ibus_type_get_array (void); - -/** - * ibus_type_get_struct: - * @returns: Type of IBusStruct. - * - * Gets the type of IBusStruct. - */ -GType ibus_type_get_struct (void); - -/** - * ibus_type_get_dict_entry: - * @returns: Type of IBusDictEntry. - * - * Gets the type of IBusDictEntry. - */ -GType ibus_type_get_dict_entry (void); - -/** - * ibus_type_get_variant: - * @returns: Type of IBusVariant. - * - * Gets the type of IBusVariant. - */ -GType ibus_type_get_variant (void); - -/** - * ibus_message_new: - * @message_type: Type of the message. - * @returns: A newly allocated IBusMessage according to @message_type. - * - * New an IBusMessage. - * Valid D-Bus message types include: - * - * - * #DBUS_MESSAGE_TYPE_METHOD_CALL - * - * - * #DBUS_MESSAGE_TYPE_METHOD_RETURN - * - * - * #DBUS_MESSAGE_TYPE_ERROR - * - * - * #DBUS_MESSAGE_TYPE_SIGNAL - * - * - * These are defined in dbus-protocol.h in D-Bus. - */ -IBusMessage *ibus_message_new (gint message_type); - -/** - * ibus_message_ref: - * @message: An IBusMessage. - * @returns: The IBusMessage. - * - * Increments the reference count of an IBusMessage. - */ -IBusMessage *ibus_message_ref (IBusMessage *message); - -/** - * ibus_message_unref: - * @message: An IBusMessage. - * - * Decrements the reference count of a DBusMessage, freeing the message if the count reaches 0. - */ -void ibus_message_unref (IBusMessage *message); - -/** - * ibus_message_new_method_call: - * @destination: Where this message to be sent to or %NULL for no destination. - * @path: Object path the message should be sent to. - * @interface: Interface to invoke method on, or %NULL. - * @method: The method to be invoked. - * @returns: A newly allocate IBusMessage; or %NULL if memory cannot be allocated. - * - * Constructs a new message to invoke a method on a remote object. - * - * The destination may be %NULL in which case no destination is set; - * this is appropriate when using IBus/D-Bus in a peer-to-peer context (no message bus). - * The interface may be %NULL, which means that if multiple methods with the given name - * exist it is undefined which one will be invoked. - * - * The path and method names may not be %NULL. - * - * Destination, path, interface, and method name can't contain any invalid characters - * (see the D-Bus specification). - */ -IBusMessage *ibus_message_new_method_call (const gchar *destination, - const gchar *path, - const gchar *interface, - const gchar *method); - -/** - * ibus_message_new_method_return: - * @reply_to: The IBusMessage being replied to. - * @returns: A newly allocate IBusMessage; or %NULL if memory cannot be allocated. - * - * Constructs a message that is a reply to a method call. - */ -IBusMessage *ibus_message_new_method_return (IBusMessage *reply_to); - -/** - * ibus_message_new_error: - * @reply_to: The IBusMessage being replied to. - * @error_name: Name of the error. - * @error_message: Detailed error message string (or %NULL for none, but please give a message). - * @returns: A newly allocate IBusMessage with the error information; or %NULL if memory cannot be allocated. - * - * Creates a new message that is an error reply to another message. - * Error replies are most common in response to method calls, but can be returned in reply to any message. - * The error name must be a valid error name according to the syntax given in the D-Bus specification. - * If you don't want to make up an error name just use %DBUS_ERROR_FAILED. - * - * Use ibus_message_unref() to free the produced IBusMessage. - */ -IBusMessage *ibus_message_new_error (IBusMessage *reply_to, - const gchar *error_name, - const gchar *error_message); - -/** - * ibus_message_new_error_printf: - * @reply_to: The IBusMessage being replied to. - * @error_name: Name of the error. - * @error_format: Error format string as in printf() format. - * @...: Format arguments, as in printf(). - * @returns: A newly allocate IBusMessage with the error information; or %NULL if memory cannot be allocated. - * - * Creates a new message that is an error reply to another message. - * Error replies are most common in response to method calls, but can be returned in reply to any message. - * The error name must be a valid error name according to the syntax given in the D-Bus specification. - * If you don't want to make up an error name just use %DBUS_ERROR_FAILED. - */ -IBusMessage *ibus_message_new_error_printf (IBusMessage *reply_to, - const gchar *error_name, - const gchar *error_format, - ...); - -/** - * ibus_message_new_signal: - * @path: Object path the message should be sent to. - * @interface: Interface to invoke method on, or %NULL. - * @method: The method to invoke. - * @returns: A newly allocate IBusMessage with the error information; or %NULL if memory cannot be allocated. - * - * Constructs a new message representing a signal emission. - * Returns NULL if memory can't be allocated for the message. - * A signal is identified by its originating object path, interface, and the name of the signal. - * Path, interface, and signal name must all be valid (the D-Bus specification defines the syntax of these fields). - */ -IBusMessage *ibus_message_new_signal (const gchar *path, - const gchar *interface, - const gchar *method); - -/** - * ibus_message_is_method_call: - * @message: An IBusMessage. - * @interface: The interface to check. Cannot be %NULL. - * @method: The method to check. Cannot be %NULL. - * @returns: %TRUE if @message is DBUS_MESSAGE_TYPE_METHOD_CALL and the invoked method is matched with @method; - * %FALSE otherwise. - * - * Checks whether the message is a method call with the given interface and member fields. - * - * If the message is not DBUS_MESSAGE_TYPE_METHOD_CALL, - * or has a different interface or member field, returns FALSE. - * If the interface field is missing, then it will be assumed equal to the provided interface. - * The D-Bus protocol allows method callers to leave out the interface name. - */ -gboolean ibus_message_is_method_call (IBusMessage *message, - const gchar *interface, - const gchar *method); -/** - * ibus_message_is_error: - * @message: An IBusMessage. - * @error_name: Name of the error to check. - * @returns: %TRUE if @message is DBUS_MESSAGE_TYPE_ERROR and the error name is matched with @error_name; - * %FALSE otherwise. - * - * Checks whether the message is an error reply with the given error name. - * If the message is not DBUS_MESSAGE_TYPE_ERROR, or has a different name, returns FALSE. - */ -gboolean ibus_message_is_error (IBusMessage *message, - const gchar *error_name); - -/** - * ibus_message_is_signal: - * @message: An IBusMessage. - * @interface: The interface to checked. Cannot be %NULL. - * @signal_name: The signal name to check. - * @returns: %TRUE if @message is %DBUS_MESSAGE_SIGNAL and the signal name is matched with @signal_name; - * %FALSE otherwise. - * - * Checks whether the message is a signal with the given interface and member fields. - * If the message is not %DBUS_MESSAGE_TYPE_SIGNAL, or has a different interface or member field, returns %FALSE. - */ -gboolean ibus_message_is_signal (IBusMessage *message, - const gchar *interface, - const gchar *signal_name); - -/** - * ibus_message_set_destination: - * @message: An IBusMessage. - * @destination: Destination to set; or %NULL to unset. - * @returns: %TRUE if succeed; %FALSE if insufficient memory. - * - * Sets the message's destination. - * - * The destination is the name of another connection on the bus - * and may be either the unique name assigned by the bus to each connection, - * or a well-known name specified in advance. - * - * The destination name must contain only valid characters as defined in the D-Bus specification. - */ -gboolean ibus_message_set_destination (IBusMessage *message, - const gchar *destination); -/** - * ibus_message_set_sender: - * @message: An IBusMessage. - * @sender: Sender to set; or %NULL to unset. - * @returns: %TRUE if succeed; %FALSE if insufficient memory. - * - * Sets the message sender. - * - * The sender must be a valid bus name as defined in the D-Bus specification. - * - * Usually you don't want to call this. The message bus daemon will call it to set the origin of each message. - * If you aren't implementing a message bus daemon you shouldn't need to set the sender. - */ -gboolean ibus_message_set_sender (IBusMessage *message, - const gchar *sender); - -/** - * ibus_message_set_error_name: - * @message: An IBusMessage. - * @error_name: Error name to set; or %NULL to unset. - * @returns: %TRUE if succeed; %FALSE if insufficient memory. - * - * Sets the name of the error (%DBUS_MESSAGE_TYPE_ERROR). - * - * The name is fully-qualified (namespaced). - * - * The error name must contain only valid characters as defined in the D-Bus specification. - */ -gboolean ibus_message_set_error_name (IBusMessage *message, - const gchar *error_name); - -/** - * ibus_message_set_interface: - * @message: An IBusMessage. - * @interface: Interface to set; or %NULL to unset. - * @returns: %TRUE if succeed; %FALSE if insufficient memory. - * - * Sets the interface this message is being sent to - * (for %DBUS_MESSAGE_TYPE_METHOD_CALL) or the interface - * a signal is being emitted from (for %DBUS_MESSAGE_TYPE_SIGNAL). - * - * The interface name must contain only valid characters as defined in the D-Bus specification. - */ -gboolean ibus_message_set_interface (IBusMessage *message, - const gchar *interface); - -/** - * ibus_message_set_member: - * @message: An IBusMessage. - * @member: Member to set; or %NULL to unset. - * @returns: %TRUE if succeed; %FALSE if insufficient memory. - * - * Sets the interface member being invoked (%DBUS_MESSAGE_TYPE_METHOD_CALL) - * or emitted (%DBUS_MESSAGE_TYPE_SIGNAL). - * - * The member name must contain only valid characters as defined in the D-Bus specification. - */ -gboolean ibus_message_set_member (IBusMessage *message, - const gchar *member); - -/** - * ibus_message_set_path: - * @message: An IBusMessage. - * @path: Path to set; or %NULL to unset. - * @returns: %TRUE if succeed; %FALSE if insufficient memory. - * - * Sets the object path this message is being sent to (for $DBUS_MESSAGE_TYPE_METHOD_CALL) - * or the one a signal is being emitted from (for %DBUS_MESSAGE_TYPE_SIGNAL). - * - * The path must contain only valid characters as defined in the D-Bus specification. - */ -gboolean ibus_message_set_path (IBusMessage *message, - const gchar *path); - -/** - * ibus_message_set_no_reply: - * @message: An IBusMessage. - * @no_reply: %TRUE if no reply is desired. - * - * Sets a flag indicating that the message does not want a reply; - * if this flag is set, the other end of the connection may (but is not required to) - * optimize by not sending method return or error replies. - * - * If this flag is set, there is no way to know whether the message successfully arrived - * at the remote end. - * Normally you know a message was received when you receive the reply to it. - * - * The flag is FALSE by default, that is by default the other end is required to reply. - * - * On the protocol level this toggles %DBUS_HEADER_FLAG_NO_REPLY_EXPECTED. - */ -void ibus_message_set_no_reply (IBusMessage *message, - gboolean no_reply); - -/** - * ibus_message_set_reply_serial: - * @message: An IBusMessage. - * @reply_serial: The serial to be replied. - * @returns: %TRUE if succeed; %FALSE if insufficient memory. - * - * Sets the reply serial of a message (the serial of the message this is a reply to). - */ -gboolean ibus_message_set_reply_serial (IBusMessage *message, - guint32 reply_serial); - -/** - * ibus_message_get_type: - * @message: An IBusMessage. - * @returns: Type of the IBusMessage. - * - * Gets the type of an IBusMessage. - */ -gint ibus_message_get_type (IBusMessage *message); - -/** - * ibus_message_get_destination: - * @message: An IBusMessage. - * @returns: Destination of the IBusMessage; NULL if there is none set. - * - * Gets the destination of a message or %NULL if there is none set. - * - * The returned string becomes invalid if the message is modified, - * since it points into the wire-marshaled message data. - */ -const gchar *ibus_message_get_destination (IBusMessage *message); - -/** - * ibus_message_get_sender: - * @message: An IBusMessage. - * @returns: Sender of the IBusMessage; %NULL if unknown or inapplicable. - * - * Gets the unique name of the connection which originated this message, - * or %NULL if unknown or inapplicable. - * - * The sender is filled in by the message bus. - * - * Note, the returned sender is always the unique bus name. - * Connections may own multiple other bus names, but those are not found in the sender field. - * - * The returned string becomes invalid if the message is modified, - * since it points into the wire-marshaled message data. - */ -const gchar *ibus_message_get_sender (IBusMessage *message); - -/** - * ibus_message_get_error_name: - * @message: An IBusMessage. - * @returns: Error name of the IBusMessage; %NULL if none. - * - * Gets the error name (%DBUS_MESSAGE_TYPE_ERROR only) or %NULL if none. - * - * The returned string becomes invalid if the message is modified, - * since it points into the wire-marshaled message data. - */ -const gchar *ibus_message_get_error_name (IBusMessage *message); - -/** - * ibus_message_get_error_message: - * @message: An IBusMessage. - * @returns: Error message of the IBusMessage; %NULL if none. - * - * Gets the error message (%DBUS_MESSAGE_TYPE_ERROR only) or %NULL if none. - * - * The returned string becomes invalid if the message is modified, - * since it points into the wire-marshaled message data. - */ -const gchar *ibus_message_get_error_message (IBusMessage *message); - -/** - * ibus_message_get_interface: - * @message: An IBusMessage. - * @returns: Interface name of the IBusMessage; %NULL if none. - * - * Gets the interface this message is being sent to (for %DBUS_MESSAGE_TYPE_METHOD_CALL) - * or being emitted from (for %DBUS_MESSAGE_TYPE_SIGNAL). - * - * The interface name is fully-qualified (namespaced). Returns %NULL if none. - * - * The returned string becomes invalid if the message is modified, - * since it points into the wire-marshaled message data. - */ -const gchar *ibus_message_get_interface (IBusMessage *message); - -/** - * ibus_message_get_member: - * @message: An IBusMessage. - * @returns: Member name of the IBusMessage; %NULL if none. - * - * Gets the interface member being invoked (%DBUS_MESSAGE_TYPE_METHOD_CALL) - * or emitted (%DBUS_MESSAGE_TYPE_SIGNAL). - * - * Returns %NULL if none. - * - * The returned string becomes invalid if the message is modified, - * since it points into the wire-marshaled message data. - */ -const gchar *ibus_message_get_member (IBusMessage *message); - -/** - * ibus_message_get_path: - * @message: An IBusMessage. - * @returns: Object path of the IBusMessage; %NULL if none. - * - * Gets the object path this message is being sent to (for %DBUS_MESSAGE_TYPE_METHOD_CALL) - * or being emitted from (for %DBUS_MESSAGE_TYPE_SIGNAL). - * - * Returns %NULL if none. - * - * See also dbus_message_get_path_decomposed(). - * - * The returned string becomes invalid if the message is modified, - * since it points into the wire-marshaled message data. - */ -const gchar *ibus_message_get_path (IBusMessage *message); - -/** - * ibus_message_get_no_reply: - * @message: An IBusMessage. - * @returns: %TRUE if the message does not expect a reply; %FALSE otherwise. - * - * Returns TRUE if the message does not expect a reply. - */ -gboolean ibus_message_get_no_reply (IBusMessage *message); - -/** - * ibus_message_get_reply_serial: - * @message: An IBusMessage. - * @returns: The serial that the message is a reply to or 0 if none. - * - * Returns the serial that the message is a reply to or 0 if none. - */ -guint32 ibus_message_get_reply_serial (IBusMessage *message); - -/** - * ibus_message_get_serial: - * @message: An IBusMessage. - * @returns: The serial of a message or 0 if none has been specified. - * - * Returns the serial of a message or 0 if none has been specified. - * - * The message's serial number is provided by the application sending the message - * and is used to identify replies to this message. - * - * All messages received on a connection will have a serial provided by the remote application. - * - * For messages you're sending, dbus_connection_send() will assign a serial and return it to you. - */ -guint32 ibus_message_get_serial (IBusMessage *message); - -/** - * ibus_message_append_args: - * @message: An IBusMessage. - * @first_arg_type: Type of the first argument. - * @...: Rest of arguments. - * @returns: %TRUE if succeed; %FALSE otherwise. - * - * Appends fields to a message given a variable argument list. - * - * The variable argument list should contain the type of each argument followed by the value to append. - * Appendable types are basic types, and arrays of fixed-length basic types. - * To append variable-length basic types, or any more complex value, - * you have to use an iterator rather than this function. - * - * To append a basic type, specify its type code followed by the address of the value. For example: - * - * - * dbus_int32_t v_INT32 = 42; - * const char *v_STRING = "Hello World"; - * dbus_message_append_args (message, - * DBUS_TYPE_INT32, &v_INT32, - * DBUS_TYPE_STRING, &v_STRING, - * DBUS_TYPE_INVALID); - * - * - * - * To append an array of fixed-length basic types, pass in the %DBUS_TYPE_ARRAY typecode, - * the element typecode, the address of the array pointer, - * and a 32-bit integer giving the number of elements in the array. So for example: - * - * - * const dbus_int32_t array[] = { 1, 2, 3 }; - * const dbus_int32_t *v_ARRAY = array; - * dbus_message_append_args (message, - * DBUS_TYPE_ARRAY, DBUS_TYPE_INT32, &v_ARRAY, 3, - * DBUS_TYPE_INVALID); - * - * - * - * - * - * in C, given "int array[]", "&array == array" (the comp.lang.c FAQ says otherwise, but gcc and the FAQ don't agree). - * So if you're using an array instead of a pointer you have to create a pointer variable, - * assign the array to it, then take the address of the pointer variable. - * For strings it works to write const char *array = "Hello" and then use &array though. - * - * - * The last argument to this function must be %DBUS_TYPE_INVALID, marking the end of the argument list. - * If you don't do this then libdbus won't know to stop and will read invalid memory. - * - * String/signature/path arrays should be passed in as "const char*** address_of_array" and "int n_elements" - * - * @see_also: ibus_message_append_args_valist(). - */ -gboolean ibus_message_append_args (IBusMessage *message, - GType first_arg_type, - ...); - -/** - * ibus_message_append_args_valist: - * @message: An IBusMessage. - * @first_arg_type: Type of the first argument. - * @va_args: Rest of arguments. - * @returns: %TRUE if succeed; %FALSE otherwise. - * - * Like ibus_message_append_args() but takes a va_list for use by language bindings. - * - * @see_also: ibus_message_append_args(). - */ -gboolean ibus_message_append_args_valist(IBusMessage *message, - GType first_arg_type, - va_list va_args); - -/** - * ibus_message_get_args: - * @message: An IBusMessage. - * @error: Error to be filled in on failure. - * @first_arg_type: Type of the first argument. - * @...: Rest of arguments. - * @returns: %TRUE if succeed; F%ALSE otherwise. - * - * Gets arguments from a message given a variable argument list. - * - * The supported types include those supported by ibus_message_append_args(); - * that is, basic types and arrays of fixed-length basic types. - * The arguments are the same as they would be for ibus_message_iter_get_basic() - * or ibus_message_iter_get_fixed_array(). - * - * In addition to those types, arrays of string, object path, and signature are supported; - * but these are returned as allocated memory and must be freed with dbus_free_string_array(), - * while the other types are returned as const references. - * To get a string array pass in "char ***array_location" and "int *n_elements". - * - * The variable argument list should contain the type of the argument followed by a pointer to - * where the value should be stored. The list is terminated with %DBUS_TYPE_INVALID. - * - * Except for string arrays, the returned values are constant; do not free them. - * They point into the IBusMessage. - * - * If the requested arguments are not present, or do not have the requested types, then an error will be set. - * - * If more arguments than requested are present, - * the requested arguments are returned and the extra arguments are ignored. - * - * @see_also: ibus_message_append_args(), ibus_message_get_args_valist(). - */ -gboolean ibus_message_get_args (IBusMessage *message, - IBusError **error, - GType first_arg_type, - ...); - -/** - * ibus_message_get_args_valist: - * @message: An IBusMessage. - * @error: Error message is outputted here; or %NULL to suppress error. - * @first_arg_type: Type of the first argument. - * @va_args: Rest of arguments. - * @returns: %TRUE if succeed; %FALSE otherwise. - * - * Like ibus_message_get_args but takes a va_list for use by language bindings. - * - * @see_also: ibus_message_append_args_valist(), ibus_message_get_args(). - */ -gboolean ibus_message_get_args_valist (IBusMessage *message, - IBusError **error, - GType first_arg_type, - va_list va_args); - -/** - * ibus_message_iter_init_append: - * @message: An IBusMessage. - * @iter: An IBusMessageIter to to initialize. - * - * Initializes a #IBusMessageIter for appending arguments to the end of a message. - */ -void ibus_message_iter_init_append (IBusMessage *message, - IBusMessageIter *iter); -/** - * ibus_message_iter_append: - * @iter: An IBusMessageIter. - * @type: The type of the value. - * @value: The pointer to the value. - * @returns: %TRUE if succeed; %FALSE if insufficient memory. - * - * Appends a basic-typed value to the message. - * - * The basic types are the non-container types such as integer and string. - * - * The "value" argument should be the address of a basic-typed value. - * So for string, const char**. For integer, dbus_int32_t*. - */ -gboolean ibus_message_iter_append (IBusMessageIter *iter, - GType type, - gconstpointer value); - -/** - * ibus_message_iter_copy_data: - * @dst: Destination to be copy to. - * @src: Source to be copy from. - * @returns: %TRUE if succeed; %FALSE if failed. - * - * Deep copy an IBusMessageIter to another IBusMessageIter. - * - * Since: 1.2.0.20090719 - */ -gboolean ibus_message_iter_copy_data (IBusMessageIter *dst, - IBusMessageIter *src); - -/** - * ibus_message_iter_init: - * @message: An IBusMessage. - * @iter: An IBusMessageIter. - * @returns: %TRUE if succeed; %FALSE if the message has no arguments. - * - * Initializes an #IBusMessageIter for reading the arguments of the message passed in. - * - * When possible, ibus_message_get_args() is much more convenient. - * Some types of argument can only be read with IBusMessageIter however. - * - * The easiest way to iterate is like this: - * - * - * dbus_message_iter_init (&iter); - * while ((current_type = dbus_message_iter_get_arg_type (&iter)) != DBUS_TYPE_INVALID) - * dbus_message_iter_next (&iter); - * - * - * - * IBusMessageIter contains no allocated memory; - * it need not be freed, and can be copied by assignment or memcpy(). - */ -gboolean ibus_message_iter_init (IBusMessage *message, - IBusMessageIter *iter); - -/** - * ibus_message_iter_get_basic: - * @iter: An IBusMessageIter. - * @value: Result value stores here. Cannot be %NULL. - * - * Reads a basic-typed value from the message iterator. - * - * Basic types are the non-containers such as integer and string. - * - * The value argument should be the address of a location to store the returned value. - * So for int32 it should be a "dbus_int32_t*" and for string a "const char**". - * The returned value is by reference and should not be freed. - * - * Be sure you have somehow checked that dbus_message_iter_get_arg_type() matches the type you are expecting, - * or you'll crash when you try to use an integer as a string or something. - * - * To read any container type (array, struct, dict) you will need to recurse into the container with - * dbus_message_iter_recurse(). - * If the container is an array of fixed-length values, - * you can get all the array elements at once with dbus_message_iter_get_fixed_array(). - * Otherwise, you have to iterate over the container's contents one value at a time. - * - * All basic-typed values are guaranteed to fit in 8 bytes. So you can write code like this: - * - * - * dbus_uint64_t value; - * int type; - * dbus_message_iter_get_basic (&read_iter, &value); - * type = dbus_message_iter_get_arg_type (&read_iter); - * dbus_message_iter_append_basic (&write_iter, type, &value); - * - * - * - * On some really obscure platforms dbus_uint64_t might not exist, - * if you need to worry about this you will know. - * dbus_uint64_t is just one example of a type that's large enough to hold any possible value, - * you could use a struct or char[8] instead if you like. - */ -void ibus_message_iter_get_basic (IBusMessageIter *iter, - gpointer value); - -/** - * ibus_message_iter_get: - * @iter: An IBusMessageIter. - * @type: The type of the value. Cannot be %NULL. - * @value: Result value stores here. Cannot be %NULL. - * @returns: %TRUE if succeed; %FALSE if insufficient memory. - * - * Gets an value from an IBusMessageIter, then move on to the next element. - * - */ -gboolean ibus_message_iter_get (IBusMessageIter *iter, - GType type, - gpointer value); - -/** - * ibus_message_iter_next: - * @iter: An IBusMessageIter. - * @returns: %TRUE if the iterator moves forward successfully; %FALSE if next element does not exist. - * - * Moves the iterator to the next field, if any. - * - * If there's no next field, returns %FALSE. If the iterator moves forward, returns %TRUE. - */ -gboolean ibus_message_iter_next (IBusMessageIter *iter); - -/** - * ibus_message_iter_has_next: - * @iter: An IBusMessageIter. - * @returns: %TRUE if next element exists; %FALSE otherwise. - * - * Checks if an iterator has any more fields. - */ -gboolean ibus_message_iter_has_next (IBusMessageIter *iter); - -/** - * ibus_message_iter_open_container: - * @iter: An IBusMessageIter. - * @type: The type of the value. - * @contained_signature: The type of container contents. - * @sub: Sub-iterator to initialize. - * @returns: %TRUE if succeed; %FALSE if insufficient memory. - * - * Appends a container-typed value to the message; - * you are required to append the contents of the container using the returned sub-iterator, - * and then call dbus_message_iter_close_container(). - * - * Container types are for example struct, variant, and array. - * For variants, the contained_signature should be the type of the single value inside the variant. - * For structs and dict entries, contained_signature should be %NULL; - * it will be set to whatever types you write into the struct. - * For arrays, contained_signature should be the type of the array elements. - */ -gboolean ibus_message_iter_open_container - (IBusMessageIter *iter, - GType type, - const gchar *contained_signature, - IBusMessageIter *sub); - -/** - * ibus_message_iter_close_container: - * @iter: An IBusMessageIter. - * @sub: Sub-iterator to close. - * @returns: %TRUE if succeed; %FALSE if insufficient memory. - * - * Closes a container-typed value appended to the message; - * may write out more information to the message known only after the entire container is written, - * and may free resources created by dbus_message_iter_open_container(). - */ -gboolean ibus_message_iter_close_container - (IBusMessageIter *iter, - IBusMessageIter *sub); - -/** - * ibus_message_iter_recurse: - * @iter: An IBusMessageIter. - * @type: The type of the value. - * @sub: Sub-iterator to initialize. - * @returns: %TRUE if succeed; %FALSE if insufficient memory. - * - * Recurses into a container value when reading values from a message, - * initializing a sub-iterator to use for traversing the child values of the container. - * - * Note that this recurses into a value, not a type, so you can only recurse if the value exists. - * The main implication of this is that if you have for example an empty array of array of int32, - * you can recurse into the outermost array, but it will have no values, so you won't be able to recurse further. - * There's no array of int32 to recurse into. - * - * If a container is an array of fixed-length types, it is much more efficient to use - * dbus_message_iter_get_fixed_array() to get the whole array in one shot, - * rather than individually walking over the array elements. - * - * Be sure you have somehow checked that dbus_message_iter_get_arg_type() - * matches the type you are expecting to recurse into. - * Results of this function are undefined if there is no container to recurse into at the current iterator position. - */ -gboolean ibus_message_iter_recurse (IBusMessageIter *iter, - GType type, - IBusMessageIter *sub); - -/** - * ibus_message_iter_get_arg_type: - * @iter: An IBusMessageIter. - * @returns: The argument type. - * - * Returns the argument type of the argument that the message iterator points to. - * - * If the iterator is at the end of the message, returns %DBUS_TYPE_INVALID. - * You can thus write a loop as follows: - * - * - * dbus_message_iter_init (&iter); - * while ((current_type = dbus_message_iter_get_arg_type (&iter)) != DBUS_TYPE_INVALID) - * dbus_message_iter_next (&iter); - * - * - */ -GType ibus_message_iter_get_arg_type (IBusMessageIter *iter); - -/** - * ibus_message_iter_get_element_type: - * @iter: An IBusMessageIter. - * @returns: The argument type. - * - * Returns the element type of the array that the message iterator points to. - * Note that you need to check that the iterator points to an array prior to using this function. - */ -GType ibus_message_iter_get_element_type - (IBusMessageIter *iter); - -/** - * ibus_message_to_string: - * @message: An IBusMessage. - * @returns: A string which shows the information of the message. - * - * Produces a pretty formatted string which show the information of the IBusMessage. - * This string is suitable for debugging information print out. - * - * Free the string by g_free() after use. - */ -gchar *ibus_message_to_string (IBusMessage *message); - -G_END_DECLS -#endif diff --git a/src/ibusobject.c b/src/ibusobject.c index f6723ae6a..12a4fb009 100644 --- a/src/ibusobject.c +++ b/src/ibusobject.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -20,6 +21,7 @@ */ #include "ibusobject.h" +#include "ibusmarshalers.h" #include "ibusinternal.h" #define IBUS_OBJECT_GET_PRIVATE(o) \ @@ -30,7 +32,6 @@ enum { LAST_SIGNAL, }; -typedef struct _IBusObjectPrivate IBusObjectPrivate; struct _IBusObjectPrivate { gpointer pad; }; @@ -54,31 +55,16 @@ static void ibus_object_real_destroy (IBusObject *obj); G_DEFINE_TYPE (IBusObject, ibus_object, G_TYPE_INITIALLY_UNOWNED) -/** - * ibus_object_new: - * - * Creates a new instance of an #IBusObject. - * - * Returns: a new instance of #IBusObject. - */ -IBusObject * -ibus_object_new (void) -{ - return IBUS_OBJECT (g_object_new (IBUS_TYPE_OBJECT, NULL)); -} - static void -ibus_object_class_init (IBusObjectClass *klass) +ibus_object_class_init (IBusObjectClass *class) { - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - - g_type_class_add_private (klass, sizeof (IBusObjectPrivate)); + GObjectClass *gobject_class = G_OBJECT_CLASS (class); gobject_class->constructor = ibus_object_constructor; gobject_class->dispose = (GObjectFinalizeFunc) ibus_object_dispose; gobject_class->finalize = (GObjectFinalizeFunc) ibus_object_finalize; - klass->destroy = ibus_object_real_destroy; + class->destroy = ibus_object_real_destroy; /* install signals */ /** @@ -97,22 +83,21 @@ ibus_object_class_init (IBusObjectClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusObjectClass, destroy), NULL, NULL, - ibus_marshal_VOID__VOID, + _ibus_marshal_VOID__VOID, G_TYPE_NONE, 0); + + g_type_class_add_private (class, sizeof (IBusObjectPrivate)); + #ifdef DEBUG_MEMORY _count_table = g_hash_table_new (g_direct_hash, g_direct_equal); #endif - } static void ibus_object_init (IBusObject *obj) { - IBusObjectPrivate *priv; - priv = IBUS_OBJECT_GET_PRIVATE (obj); - obj->flags = 0; - + obj->priv = IBUS_OBJECT_GET_PRIVATE (obj); } @@ -159,7 +144,7 @@ ibus_object_dispose (IBusObject *obj) static void ibus_object_finalize (IBusObject *obj) { -#ifdef DEBUG_MEMORY +#ifdef DEBUG_MEMORY guint count; _count --; @@ -177,11 +162,24 @@ ibus_object_real_destroy (IBusObject *obj) g_signal_handlers_destroy (obj); } +/** + * ibus_object_new: + * + * Creates a new instance of an #IBusObject. + * + * Returns: a new instance of #IBusObject. + */ +IBusObject * +ibus_object_new (void) +{ + GObject *object = g_object_new (IBUS_TYPE_OBJECT, NULL); + return IBUS_OBJECT (object); +} + void ibus_object_destroy (IBusObject *obj) { - IBusObjectPrivate *priv; - priv = IBUS_OBJECT_GET_PRIVATE (obj); + g_return_if_fail (IBUS_IS_OBJECT (obj)); if (! (IBUS_OBJECT_FLAGS (obj) & IBUS_IN_DESTRUCTION)) { g_object_run_dispose (G_OBJECT (obj)); diff --git a/src/ibusobject.h b/src/ibusobject.h index f7aa26af1..790adf657 100644 --- a/src/ibusobject.h +++ b/src/ibusobject.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusobject * @short_description: Base object of IBus. @@ -30,7 +36,6 @@ #define __IBUS_OBJECT_H_ #include -#include "ibusmarshalers.h" #include "ibustypes.h" #include "ibusdebug.h" @@ -62,12 +67,15 @@ typedef enum { #define IBUS_OBJECT_FLAGS(obj) (IBUS_OBJECT (obj)->flags) #define IBUS_OBJECT_SET_FLAGS(obj,flag) G_STMT_START{ (IBUS_OBJECT_FLAGS (obj) |= (flag)); }G_STMT_END #define IBUS_OBJECT_UNSET_FLAGS(obj,flag) G_STMT_START{ (IBUS_OBJECT_FLAGS (obj) &= ~(flag)); }G_STMT_END +#define IBUS_OBJECT_IN_DESTRUCTION(obj) (IBUS_OBJECT_FLAGS (obj) & IBUS_IN_DESTRUCTION) #define IBUS_OBJECT_DESTROYED(obj) (IBUS_OBJECT_FLAGS (obj) & IBUS_DESTROYED) G_BEGIN_DECLS typedef struct _IBusObject IBusObject; typedef struct _IBusObjectClass IBusObjectClass; +typedef struct _IBusObjectPrivate IBusObjectPrivate; + /** * IBusObject: * @@ -75,9 +83,11 @@ typedef struct _IBusObjectClass IBusObjectClass; * private to the #IBusObject and should never be accessed directly. */ struct _IBusObject { - GInitiallyUnowned parent; - /* instance members */ - guint32 flags; + GInitiallyUnowned parent; + /* instance members */ + guint32 flags; + + IBusObjectPrivate *priv; }; typedef void ( *IBusObjectDestroyFunc) (IBusObject *); diff --git a/src/ibusobservedpath.c b/src/ibusobservedpath.c index a71b48b26..b3b82a029 100644 --- a/src/ibusobservedpath.c +++ b/src/ibusobservedpath.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input IBus * Copyright (C) 2008-2010 Peng Huang @@ -42,9 +43,9 @@ typedef struct _IBusObservedPathPrivate IBusObservedPathPrivate; /* functions prototype */ static void ibus_observed_path_destroy (IBusObservedPath *path); static gboolean ibus_observed_path_serialize (IBusObservedPath *path, - IBusMessageIter *iter); -static gboolean ibus_observed_path_deserialize (IBusObservedPath *path, - IBusMessageIter *iter); + GVariantBuilder *builder); +static gint ibus_observed_path_deserialize (IBusObservedPath *path, + GVariant *variant); static gboolean ibus_observed_path_copy (IBusObservedPath *dest, const IBusObservedPath *src); static gboolean ibus_observed_path_parse_xml_node (IBusObservedPath *path, @@ -53,27 +54,24 @@ static gboolean ibus_observed_path_parse_xml_node (IBusObservedPath *pat G_DEFINE_TYPE (IBusObservedPath, ibus_observed_path, IBUS_TYPE_SERIALIZABLE) static void -ibus_observed_path_class_init (IBusObservedPathClass *klass) +ibus_observed_path_class_init (IBusObservedPathClass *class) { - IBusObjectClass *object_class = IBUS_OBJECT_CLASS (klass); - IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (klass); + IBusObjectClass *object_class = IBUS_OBJECT_CLASS (class); + IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (class); - // g_type_class_add_private (klass, sizeof (IBusObservedPathPrivate)); + // g_type_class_add_private (class, sizeof (IBusObservedPathPrivate)); object_class->destroy = (IBusObjectDestroyFunc) ibus_observed_path_destroy; serializable_class->serialize = (IBusSerializableSerializeFunc) ibus_observed_path_serialize; serializable_class->deserialize = (IBusSerializableDeserializeFunc) ibus_observed_path_deserialize; serializable_class->copy = (IBusSerializableCopyFunc) ibus_observed_path_copy; - - g_string_append (serializable_class->signature, "sx"); } static void ibus_observed_path_init (IBusObservedPath *path) { - path->path = NULL; } static void @@ -85,42 +83,32 @@ ibus_observed_path_destroy (IBusObservedPath *path) static gboolean ibus_observed_path_serialize (IBusObservedPath *path, - IBusMessageIter *iter) + GVariantBuilder *builder) { gboolean retval; - retval = IBUS_SERIALIZABLE_CLASS (ibus_observed_path_parent_class)->serialize ((IBusSerializable *)path, iter); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &(path->path)); + retval = IBUS_SERIALIZABLE_CLASS (ibus_observed_path_parent_class)->serialize ((IBusSerializable *)path, builder); g_return_val_if_fail (retval, FALSE); - retval = ibus_message_iter_append (iter, G_TYPE_LONG, &(path->mtime)); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (builder, "s", path->path); + g_variant_builder_add (builder, "x", path->mtime); return TRUE; } -static gboolean +static gint ibus_observed_path_deserialize (IBusObservedPath *path, - IBusMessageIter *iter) + GVariant *variant) { - gboolean retval; - gchar *str; + gint retval; - retval = IBUS_SERIALIZABLE_CLASS (ibus_observed_path_parent_class)->deserialize ((IBusSerializable *)path, iter); - g_return_val_if_fail (retval, FALSE); + retval = IBUS_SERIALIZABLE_CLASS (ibus_observed_path_parent_class)->deserialize ((IBusSerializable *)path, variant); + g_return_val_if_fail (retval, 0); - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - path->path = g_strdup (str); + g_variant_get_child (variant, retval++, "s", &path->path); + g_variant_get_child (variant, retval++, "x", &path->mtime); - retval = ibus_message_iter_get (iter, G_TYPE_LONG, &(path->mtime)); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - - return TRUE; + return retval; } static gboolean diff --git a/src/ibusobservedpath.h b/src/ibusobservedpath.h index 66791a2f1..e0d7033fc 100644 --- a/src/ibusobservedpath.h +++ b/src/ibusobservedpath.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input IBus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusobservedpath * @short_description: Path object of IBus. diff --git a/src/ibuspanelservice.c b/src/ibuspanelservice.c index 681dc17bc..f02739077 100644 --- a/src/ibuspanelservice.c +++ b/src/ibuspanelservice.c @@ -1,6 +1,8 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (c) 2009, Google Inc. All rights reserved. + * Copyright (C) 2010 Peng Huang * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -17,130 +19,648 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include #include "ibusshare.h" #include "ibuspanelservice.h" +#include "ibusmarshalers.h" +#include "ibusinternal.h" + +enum { + UPDATE_PREEDIT_TEXT, + UPDATE_AUXILIARY_TEXT, + UPDATE_LOOKUP_TABLE, + FOCUS_IN, + FOCUS_OUT, + REGISTER_PROPERTIES, + UPDATE_PROPERTY, + SET_CURSOR_LOCATION, + CURSOR_UP_LOOKUP_TABLE, + CURSOR_DOWN_LOOKUP_TABLE, + HIDE_AUXILIARY_TEXT, + HIDE_LANGUAGE_BAR, + HIDE_LOOKUP_TABLE, + HIDE_PREEDIT_TEXT, + PAGE_UP_LOOKUP_TABLE, + PAGE_DOWN_LOOKUP_TABLE, + RESET, + SHOW_AUXILIARY_TEXT, + SHOW_LANGUAGE_BAR, + SHOW_LOOKUP_TABLE, + SHOW_PREEDIT_TEXT, + START_SETUP, + STATE_CHANGED, + LAST_SIGNAL, +}; enum { PROP_0, - PROP_CONNECTION, }; +static guint panel_signals[LAST_SIGNAL] = { 0 }; + /* functions prototype */ -static void ibus_panel_service_service_set_property (IBusPanelService *panel, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void ibus_panel_service_service_get_property (IBusPanelService *panel, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static void ibus_panel_service_real_destroy (IBusPanelService *panel); -static gboolean ibus_panel_service_ibus_message (IBusPanelService *panel, - IBusConnection *connection, - IBusMessage *message); -static gboolean ibus_panel_service_not_implemented (IBusPanelService *panel, - IBusError **error); -static gboolean ibus_panel_service_focus_in (IBusPanelService *panel, - const gchar *input_context_path, - IBusError **error); -static gboolean ibus_panel_service_focus_out (IBusPanelService *panel, - const gchar *input_context_path, - IBusError **error); -static gboolean ibus_panel_service_register_properties (IBusPanelService *panel, - IBusPropList *prop_list, - IBusError **error); -static gboolean ibus_panel_service_set_cursor_location (IBusPanelService *panel, - gint x, - gint y, - gint w, - gint h, - IBusError **error); -static gboolean ibus_panel_service_update_auxiliary_text (IBusPanelService *panel, - IBusText *text, - gboolean visible, - IBusError **error); -static gboolean ibus_panel_service_update_lookup_table (IBusPanelService *panel, - IBusLookupTable *lookup_table, - gboolean visible, - IBusError **error); -static gboolean ibus_panel_service_update_preedit_text (IBusPanelService *panel, - IBusText *text, - guint cursor_pos, - gboolean visible, - IBusError **error); -static gboolean ibus_panel_service_update_property (IBusPanelService *panel, - IBusProperty *prop, - IBusError **error); +static void ibus_panel_service_set_property (IBusPanelService *panel, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void ibus_panel_service_get_property (IBusPanelService *panel, + guint prop_id, + GValue *value, + GParamSpec *pspec); +static void ibus_panel_service_real_destroy (IBusPanelService *panel); +static void ibus_panel_service_service_method_call (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation); +static GVariant *ibus_panel_service_service_get_property (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error); +static gboolean ibus_panel_service_service_set_property (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error); +static void ibus_panel_service_not_implemented (IBusPanelService *panel); +static void ibus_panel_service_focus_in (IBusPanelService *panel, + const gchar *input_context_path); +static void ibus_panel_service_focus_out (IBusPanelService *panel, + const gchar *input_context_path); +static void ibus_panel_service_register_properties (IBusPanelService *panel, + IBusPropList *prop_list); +static void ibus_panel_service_set_cursor_location (IBusPanelService *panel, + gint x, + gint y, + gint w, + gint h); +static void ibus_panel_service_update_auxiliary_text (IBusPanelService *panel, + IBusText *text, + gboolean visible); +static void ibus_panel_service_update_lookup_table (IBusPanelService *panel, + IBusLookupTable *lookup_table, + gboolean visible); +static void ibus_panel_service_update_preedit_text (IBusPanelService *panel, + IBusText *text, + guint cursor_pos, + gboolean visible); +static void ibus_panel_service_update_property (IBusPanelService *panel, + IBusProperty *prop); G_DEFINE_TYPE (IBusPanelService, ibus_panel_service, IBUS_TYPE_SERVICE) -IBusPanelService * -ibus_panel_service_new (IBusConnection *connection) +static const gchar introspection_xml[] = + "" + " " + /* Methods */ + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + /* Signals */ + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + " " + ""; + +static void +ibus_panel_service_class_init (IBusPanelServiceClass *class) { - g_assert (IBUS_IS_CONNECTION (connection)); + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + ibus_panel_service_parent_class = IBUS_SERVICE_CLASS (g_type_class_peek_parent (class)); - IBusPanelService *panel; + gobject_class->set_property = (GObjectSetPropertyFunc) ibus_panel_service_set_property; + gobject_class->get_property = (GObjectGetPropertyFunc) ibus_panel_service_get_property; - panel = (IBusPanelService*) g_object_new (IBUS_TYPE_PANEL_SERVICE, - "path", IBUS_PATH_PANEL, - "connection", connection, - NULL); + IBUS_OBJECT_CLASS (gobject_class)->destroy = (IBusObjectDestroyFunc) ibus_panel_service_real_destroy; - return panel; -} + IBUS_SERVICE_CLASS (class)->service_method_call = ibus_panel_service_service_method_call; + IBUS_SERVICE_CLASS (class)->service_get_property = ibus_panel_service_service_get_property; + IBUS_SERVICE_CLASS (class)->service_set_property = ibus_panel_service_service_set_property; + + ibus_service_class_add_interfaces (IBUS_SERVICE_CLASS (class), introspection_xml); + + class->focus_in = ibus_panel_service_focus_in; + class->focus_out = ibus_panel_service_focus_out; + class->register_properties = ibus_panel_service_register_properties; + class->set_cursor_location = ibus_panel_service_set_cursor_location; + class->update_lookup_table = ibus_panel_service_update_lookup_table; + class->update_auxiliary_text = ibus_panel_service_update_auxiliary_text; + class->update_preedit_text = ibus_panel_service_update_preedit_text; + class->update_property = ibus_panel_service_update_property; + + class->cursor_down_lookup_table = ibus_panel_service_not_implemented; + class->cursor_up_lookup_table = ibus_panel_service_not_implemented; + class->hide_auxiliary_text = ibus_panel_service_not_implemented; + class->hide_language_bar = ibus_panel_service_not_implemented; + class->hide_lookup_table = ibus_panel_service_not_implemented; + class->hide_preedit_text = ibus_panel_service_not_implemented; + class->page_down_lookup_table = ibus_panel_service_not_implemented; + class->page_up_lookup_table = ibus_panel_service_not_implemented; + class->reset = ibus_panel_service_not_implemented; + class->show_auxiliary_text = ibus_panel_service_not_implemented; + class->show_language_bar = ibus_panel_service_not_implemented; + class->show_lookup_table = ibus_panel_service_not_implemented; + class->show_preedit_text = ibus_panel_service_not_implemented; + class->start_setup = ibus_panel_service_not_implemented; + class->state_changed = ibus_panel_service_not_implemented; + + /* install signals */ + /** + * IBusPanelService::update-preedit-text: + * @text: A preedit text to be updated. + * @cursor_pos: The cursor position of the text. + * @visible: Whether the update is visible. + * + * Emitted when the client application get the update-preedit-text. + * Implement the member function update_preedit_text() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[UPDATE_PREEDIT_TEXT] = + g_signal_new (I_("update-preedit-text"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, update_preedit_text), + NULL, NULL, + _ibus_marshal_VOID__OBJECT_UINT_BOOLEAN, + G_TYPE_NONE, + 3, + IBUS_TYPE_TEXT, + G_TYPE_UINT, + G_TYPE_BOOLEAN); -static void -ibus_panel_service_class_init (IBusPanelServiceClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + /** + * IBusPanelService::update-auxiliary-text: + * @text: A preedit text to be updated. + * @visible: Whether the update is visible. + * + * Emitted when the client application get the update-auxiliary-text. + * Implement the member function update_auxiliary_text() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[UPDATE_AUXILIARY_TEXT] = + g_signal_new (I_("update-auxiliary-text"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, update_auxiliary_text), + NULL, NULL, + _ibus_marshal_VOID__OBJECT_BOOLEAN, + G_TYPE_NONE, + 2, + IBUS_TYPE_TEXT, + G_TYPE_BOOLEAN); + + /** + * IBusPanelService::update-lookup-table: + * @lookup_table: A lookup table to be updated. + * @visible: Whether the update is visible. + * + * Emitted when the client application get the update-lookup-table. + * Implement the member function update_lookup_table() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[UPDATE_LOOKUP_TABLE] = + g_signal_new (I_("update-lookup-table"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, update_lookup_table), + NULL, NULL, + _ibus_marshal_VOID__OBJECT_BOOLEAN, + G_TYPE_NONE, + 2, + IBUS_TYPE_LOOKUP_TABLE, + G_TYPE_BOOLEAN); - gobject_class->set_property = (GObjectSetPropertyFunc) ibus_panel_service_service_set_property; - gobject_class->get_property = (GObjectGetPropertyFunc) ibus_panel_service_service_get_property; + /** + * IBusPanelService::focus-in: + * @input_context_path: Object path of InputContext. + * + * Emitted when the client application get the focus-in. + * Implement the member function focus_in() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[FOCUS_IN] = + g_signal_new (I_("focus-in"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, focus_in), + NULL, NULL, + _ibus_marshal_VOID__STRING, + G_TYPE_NONE, + 1, + G_TYPE_STRING); - IBUS_OBJECT_CLASS (gobject_class)->destroy = (IBusObjectDestroyFunc) ibus_panel_service_real_destroy; + /** + * IBusPanelService::focus-out: + * @input_context_path: Object path of InputContext. + * + * Emitted when the client application get the focus-out. + * Implement the member function focus_out() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[FOCUS_OUT] = + g_signal_new (I_("focus-out"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, focus_out), + NULL, NULL, + _ibus_marshal_VOID__STRING, + G_TYPE_NONE, + 1, + G_TYPE_STRING); + + /** + * IBusPanelService::register-properties: + * @prop_list: An IBusPropList that contains properties. + * + * Emitted when the client application get the register-properties. + * Implement the member function register_properties() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[REGISTER_PROPERTIES] = + g_signal_new (I_("register-properties"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, register_properties), + NULL, NULL, + _ibus_marshal_VOID__OBJECT, + G_TYPE_NONE, + 1, + IBUS_TYPE_PROP_LIST); + + /** + * IBusPanelService::update-property: + * @prop: The IBusProperty to be updated. + * + * Emitted when the client application get the update-property. + * Implement the member function update_property() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[UPDATE_PROPERTY] = + g_signal_new (I_("update-property"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, update_property), + NULL, NULL, + _ibus_marshal_VOID__OBJECT, + G_TYPE_NONE, + 1, + IBUS_TYPE_PROPERTY); + + /** + * IBusPanelService::set-cursor-location: + * @x: X coordinate of the cursor. + * @y: Y coordinate of the cursor. + * @w: Width of the cursor. + * @h: Height of the cursor. + * + * Emitted when the client application get the set-cursor-location. + * Implement the member function set_cursor_location() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[SET_CURSOR_LOCATION] = + g_signal_new (I_("set-cursor-location"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, set_cursor_location), + NULL, NULL, + _ibus_marshal_VOID__INT_INT_INT_INT, + G_TYPE_NONE, + 4, + G_TYPE_INT, + G_TYPE_INT, + G_TYPE_INT, + G_TYPE_INT); + + /** + * IBusPanelService::cursor-up-lookup-table: + * + * Emitted when the client application get the cursor-up-lookup-table. + * Implement the member function cursor_up_lookup_table() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[CURSOR_UP_LOOKUP_TABLE] = + g_signal_new (I_("cursor-up-lookup-table"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, cursor_up_lookup_table), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + /** + * IBusPanelService::cursor-down-lookup-table: + * + * Emitted when the client application get the cursor-down-lookup-table. + * Implement the member function cursor_down_lookup_table() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[CURSOR_DOWN_LOOKUP_TABLE] = + g_signal_new (I_("cursor-down-lookup-table"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, cursor_down_lookup_table), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + /** + * IBusPanelService::hide-auxiliary-text: + * + * Emitted when the client application get the hide-auxiliary-text. + * Implement the member function hide_auxiliary_text() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[HIDE_AUXILIARY_TEXT] = + g_signal_new (I_("hide-auxiliary-text"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, hide_auxiliary_text), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + /** + * IBusPanelService::hide-language-bar: + * + * Emitted when the client application get the hide-language-bar. + * Implement the member function hide_language_bar() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[HIDE_LANGUAGE_BAR] = + g_signal_new (I_("hide-language-bar"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, hide_language_bar), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + /** + * IBusPanelService::hide-lookup-table: + * + * Emitted when the client application get the hide-lookup-table. + * Implement the member function hide_lookup_table() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[HIDE_LOOKUP_TABLE] = + g_signal_new (I_("hide-lookup-table"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, hide_lookup_table), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + /** + * IBusPanelService::hide-preedit-text: + * + * Emitted when the client application get the hide-preedit-text. + * Implement the member function hide_preedit_text() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[HIDE_PREEDIT_TEXT] = + g_signal_new (I_("hide-preedit-text"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, hide_preedit_text), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + /** + * IBusPanelService::page-up-lookup-table: + * + * Emitted when the client application get the page-up-lookup-table. + * Implement the member function page_up_lookup_table() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[PAGE_UP_LOOKUP_TABLE] = + g_signal_new (I_("page-up-lookup-table"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, page_up_lookup_table), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + /** + * IBusPanelService::page-down-lookup-table: + * + * Emitted when the client application get the page-down-lookup-table. + * Implement the member function page_down_lookup_table() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[PAGE_DOWN_LOOKUP_TABLE] = + g_signal_new (I_("page-down-lookup-table"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, page_down_lookup_table), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + /** + * IBusPanelService::reset: + * + * Emitted when the client application get the reset. + * Implement the member function reset() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[RESET] = + g_signal_new (I_("reset"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, reset), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + /** + * IBusPanelService::show-auxiliary-text: + * + * Emitted when the client application get the show-auxiliary-text. + * Implement the member function show_auxiliary_text() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[SHOW_AUXILIARY_TEXT] = + g_signal_new (I_("show-auxiliary-text"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, show_auxiliary_text), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + /** + * IBusPanelService::show-language-bar: + * + * Emitted when the client application get the show-language-bar. + * Implement the member function show_language_bar() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[SHOW_LANGUAGE_BAR] = + g_signal_new (I_("show-language-bar"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, show_language_bar), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + /** + * IBusPanelService::show-lookup-table: + * + * Emitted when the client application get the show-lookup-table. + * Implement the member function show_lookup_table() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[SHOW_LOOKUP_TABLE] = + g_signal_new (I_("show-lookup-table"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, show_lookup_table), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + /** + * IBusPanelService::show-preedit-text: + * + * Emitted when the client application get the show-preedit-text. + * Implement the member function show_preedit_text() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[SHOW_PREEDIT_TEXT] = + g_signal_new (I_("show-preedit-text"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, show_preedit_text), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + /** + * IBusPanelService::start-setup: + * + * Emitted when the client application get the start-setup. + * Implement the member function start_setup() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. + */ + panel_signals[START_SETUP] = + g_signal_new (I_("start-setup"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, start_setup), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); - IBUS_SERVICE_CLASS (klass)->ibus_message = (ServiceIBusMessageFunc) ibus_panel_service_ibus_message; - - klass->focus_in = ibus_panel_service_focus_in; - klass->focus_out = ibus_panel_service_focus_out; - klass->register_properties = ibus_panel_service_register_properties; - klass->set_cursor_location = ibus_panel_service_set_cursor_location; - klass->update_lookup_table = ibus_panel_service_update_lookup_table; - klass->update_auxiliary_text = ibus_panel_service_update_auxiliary_text; - klass->update_preedit_text = ibus_panel_service_update_preedit_text; - klass->update_property = ibus_panel_service_update_property; - - klass->cursor_down_lookup_table = ibus_panel_service_not_implemented; - klass->cursor_up_lookup_table = ibus_panel_service_not_implemented; - klass->destroy = ibus_panel_service_not_implemented; - klass->hide_auxiliary_text = ibus_panel_service_not_implemented; - klass->hide_language_bar = ibus_panel_service_not_implemented; - klass->hide_lookup_table = ibus_panel_service_not_implemented; - klass->hide_preedit_text = ibus_panel_service_not_implemented; - klass->page_down_lookup_table = ibus_panel_service_not_implemented; - klass->page_up_lookup_table = ibus_panel_service_not_implemented; - klass->reset = ibus_panel_service_not_implemented; - klass->show_auxiliary_text = ibus_panel_service_not_implemented; - klass->show_language_bar = ibus_panel_service_not_implemented; - klass->show_lookup_table = ibus_panel_service_not_implemented; - klass->show_preedit_text = ibus_panel_service_not_implemented; - klass->start_setup = ibus_panel_service_not_implemented; - klass->state_changed = ibus_panel_service_not_implemented; - - /* install properties */ /** - * IBusPanelService:connection: + * IBusPanelService::state-changed: * - * Connection of this IBusPanelService. + * Emitted when the client application get the state-changed. + * Implement the member function state_changed() in extended class to receive this signal. + * + * Argument @user_data is ignored in this function. */ - g_object_class_install_property (gobject_class, - PROP_CONNECTION, - g_param_spec_object ("connection", - "connection", - "The connection of service object", - IBUS_TYPE_CONNECTION, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + panel_signals[STATE_CHANGED] = + g_signal_new (I_("state-changed"), + G_TYPE_FROM_CLASS (gobject_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IBusPanelServiceClass, state_changed), + NULL, NULL, + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); } static void @@ -149,41 +669,24 @@ ibus_panel_service_init (IBusPanelService *panel) } static void -ibus_panel_service_service_set_property (IBusPanelService *panel, - guint prop_id, - const GValue *value, - GParamSpec *pspec) +ibus_panel_service_set_property (IBusPanelService *panel, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { switch (prop_id) { - case PROP_CONNECTION: - ibus_service_add_to_connection ((IBusService *) panel, - g_value_get_object (value)); - break; - default: G_OBJECT_WARN_INVALID_PROPERTY_ID (panel, prop_id, pspec); } } static void -ibus_panel_service_service_get_property (IBusPanelService *panel, - guint prop_id, - GValue *value, - GParamSpec *pspec) +ibus_panel_service_get_property (IBusPanelService *panel, + guint prop_id, + GValue *value, + GParamSpec *pspec) { switch (prop_id) { - case PROP_CONNECTION: - { - GList *connections = ibus_service_get_connections ((IBusService *) panel); - if (connections) { - g_value_set_object (value, connections->data); - } - else { - g_value_set_object (value, NULL); - } - g_list_free (connections); - } - break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (panel, prop_id, pspec); } @@ -195,458 +698,357 @@ ibus_panel_service_real_destroy (IBusPanelService *panel) IBUS_OBJECT_CLASS(ibus_panel_service_parent_class)->destroy (IBUS_OBJECT (panel)); } -static gboolean -ibus_panel_service_ibus_message (IBusPanelService *panel, - IBusConnection *connection, - IBusMessage *message) + +static void +_g_object_unref_if_floating (gpointer instance) { - g_assert (IBUS_IS_PANEL_SERVICE (panel)); - g_assert (IBUS_IS_CONNECTION (connection)); - g_assert (message != NULL); + if (g_object_is_floating (instance)) + g_object_unref (instance); +} - const static struct { - const gchar *name; - const gint offset; - } no_arg_methods [] = { - { "CursorUpLookupTable" , G_STRUCT_OFFSET (IBusPanelServiceClass, cursor_down_lookup_table) }, - { "CursorDownLookupTable", G_STRUCT_OFFSET (IBusPanelServiceClass, cursor_up_lookup_table) }, - { "Destroy", G_STRUCT_OFFSET (IBusPanelServiceClass, destroy) }, - { "HideAuxiliaryText", G_STRUCT_OFFSET (IBusPanelServiceClass, hide_auxiliary_text) }, - { "HideLanguageBar", G_STRUCT_OFFSET (IBusPanelServiceClass, hide_language_bar) }, - { "HideLookupTable", G_STRUCT_OFFSET (IBusPanelServiceClass, hide_lookup_table) }, - { "HidePreeditText", G_STRUCT_OFFSET (IBusPanelServiceClass, hide_preedit_text) }, - { "PageDownLookupTable", G_STRUCT_OFFSET (IBusPanelServiceClass, page_down_lookup_table) }, - { "PageUpLookupTable", G_STRUCT_OFFSET (IBusPanelServiceClass, page_up_lookup_table) }, - { "Reset", G_STRUCT_OFFSET (IBusPanelServiceClass, reset) }, - { "ShowAuxiliaryText", G_STRUCT_OFFSET (IBusPanelServiceClass, show_auxiliary_text) }, - { "ShowLanguageBar", G_STRUCT_OFFSET (IBusPanelServiceClass, show_language_bar) }, - { "ShowLookupTable", G_STRUCT_OFFSET (IBusPanelServiceClass, show_lookup_table) }, - { "ShowPreeditText", G_STRUCT_OFFSET (IBusPanelServiceClass, show_preedit_text) }, - { "StartSetup", G_STRUCT_OFFSET (IBusPanelServiceClass, start_setup) }, - { "StateChanged", G_STRUCT_OFFSET (IBusPanelServiceClass, state_changed) }, - }; +static void +ibus_panel_service_service_method_call (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation) +{ + IBusPanelService *panel = IBUS_PANEL_SERVICE (service); + + if (g_strcmp0 (interface_name, IBUS_INTERFACE_PANEL) != 0) { + IBUS_SERVICE_CLASS (ibus_panel_service_parent_class)-> + service_method_call (service, + connection, + sender, + object_path, + interface_name, + method_name, + parameters, + invocation); + return; + } - IBusMessage *reply = NULL; + if (g_strcmp0 (method_name, "UpdatePreeditText") == 0) { + GVariant *variant = NULL; + guint cursor = 0; + gboolean visible = FALSE; - gint i; - for (i = 0; i < G_N_ELEMENTS (no_arg_methods); i++) { - if (!ibus_message_is_method_call (message, IBUS_INTERFACE_PANEL, - no_arg_methods[i].name)) - continue; - - IBusMessageIter iter; - ibus_message_iter_init (message, &iter); - if (ibus_message_iter_has_next (&iter)) { - reply = ibus_message_new_error_printf (message, - DBUS_ERROR_INVALID_ARGS, - "%s.%s: Method does not have arguments", - IBUS_INTERFACE_PANEL, - no_arg_methods[i].name); - } - else { - IBusError *error = NULL; - typedef gboolean (* NoArgFunc) (IBusPanelService *, IBusError **); - NoArgFunc func; - func = G_STRUCT_MEMBER (NoArgFunc, - IBUS_PANEL_SERVICE_GET_CLASS (panel), - no_arg_methods[i].offset); - if (!func (panel, &error)) { - reply = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); - } - else { - reply = ibus_message_new_method_return (message); - } - } - ibus_connection_send (connection, reply); - ibus_message_unref (reply); - return TRUE; + g_variant_get (parameters, "(vub)", &variant, &cursor, &visible); + IBusText *text = IBUS_TEXT (ibus_serializable_deserialize (variant)); + g_variant_unref (variant); + + g_signal_emit (panel, panel_signals[UPDATE_PREEDIT_TEXT], 0, text, cursor, visible); + _g_object_unref_if_floating (text); + g_dbus_method_invocation_return_value (invocation, NULL); + return; } - if (ibus_message_is_method_call (message, IBUS_INTERFACE_PANEL, "FocusIn")) { - const gchar* input_context_path = NULL; - IBusError *error = NULL; - gboolean retval; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_OBJECT_PATH, - &input_context_path, - G_TYPE_INVALID); - - if (!retval || !IBUS_PANEL_SERVICE_GET_CLASS (panel)->focus_in (panel, - input_context_path, - &error)) { - reply = ibus_message_new_error (message, - error->name, - error->message); - ibus_error_free (error); - } - else { - reply = ibus_message_new_method_return (message); - } + if (g_strcmp0 (method_name, "UpdateAuxiliaryText") == 0) { + GVariant *variant = NULL; + gboolean visible = FALSE; + + g_variant_get (parameters, "(vb)", &variant, &visible); + IBusText *text = IBUS_TEXT (ibus_serializable_deserialize (variant)); + g_variant_unref (variant); + + g_signal_emit (panel, panel_signals[UPDATE_AUXILIARY_TEXT], 0, text, visible); + _g_object_unref_if_floating (text); + g_dbus_method_invocation_return_value (invocation, NULL); + return; } - else if (ibus_message_is_method_call (message, IBUS_INTERFACE_PANEL, "FocusOut")) { - const gchar* input_context_path = NULL; - gboolean retval; - IBusError *error = NULL; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_OBJECT_PATH, - &input_context_path, - G_TYPE_INVALID); - - if (!retval || !IBUS_PANEL_SERVICE_GET_CLASS (panel)->focus_out (panel, - input_context_path, - &error)) { - reply = ibus_message_new_error(message, - error->name, - error->message); - ibus_error_free (error); - } - else { - reply = ibus_message_new_method_return (message); - } + + if (g_strcmp0 (method_name, "UpdateLookupTable") == 0) { + GVariant *variant = NULL; + gboolean visible = FALSE; + + g_variant_get (parameters, "(vb)", &variant, &visible); + IBusLookupTable *table = IBUS_LOOKUP_TABLE (ibus_serializable_deserialize (variant)); + g_variant_unref (variant); + + g_signal_emit (panel, panel_signals[UPDATE_LOOKUP_TABLE], 0, table, visible); + _g_object_unref_if_floating (table); + g_dbus_method_invocation_return_value (invocation, NULL); + return; } - else if (ibus_message_is_method_call (message, IBUS_INTERFACE_PANEL, "RegisterProperties")) { - IBusPropList *prop_list = NULL; - gboolean retval; - IBusError *error = NULL; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_PROP_LIST, &prop_list, - G_TYPE_INVALID); - - if (!retval || !IBUS_PANEL_SERVICE_GET_CLASS (panel)->register_properties (panel, - prop_list, - &error)) { - reply = ibus_message_new_error(message, - error->name, - error->message); - ibus_error_free (error); - } - else { - reply = ibus_message_new_method_return (message); - } - if (prop_list != NULL && g_object_is_floating (prop_list)) - g_object_unref (prop_list); + if (g_strcmp0 (method_name, "FocusIn") == 0) { + const gchar *path; + g_variant_get (parameters, "(&o)", &path); + g_signal_emit (panel, panel_signals[FOCUS_IN], 0, path); + g_dbus_method_invocation_return_value (invocation, NULL); + return; } - else if (ibus_message_is_method_call (message, IBUS_INTERFACE_PANEL, "UpdateAuxiliaryText")) { - IBusText *text = NULL; - gboolean visible; - gboolean retval; - IBusError *error = NULL; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_TEXT, &text, - G_TYPE_BOOLEAN, &visible, - G_TYPE_INVALID); - - if (!retval || !IBUS_PANEL_SERVICE_GET_CLASS (panel)->update_auxiliary_text (panel, - text, - visible, - &error)) { - reply = ibus_message_new_error(message, - error->name, - error->message); - ibus_error_free (error); - } - else { - reply = ibus_message_new_method_return (message); - } - if (text != NULL && g_object_is_floating (text)) - g_object_unref (text); + if (g_strcmp0 (method_name, "FocusOut") == 0) { + const gchar *path; + g_variant_get (parameters, "(&o)", &path); + g_signal_emit (panel, panel_signals[FOCUS_OUT], 0, path); + g_dbus_method_invocation_return_value (invocation, NULL); + return; } - else if (ibus_message_is_method_call (message, IBUS_INTERFACE_PANEL, "UpdateLookupTable")) { - IBusLookupTable *table = NULL; - gboolean visible = FALSE; - gboolean retval; - IBusError *error = NULL; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_LOOKUP_TABLE, &table, - G_TYPE_BOOLEAN, &visible, - G_TYPE_INVALID); - - if (!retval || !IBUS_PANEL_SERVICE_GET_CLASS (panel)->update_lookup_table (panel, - table, - visible, - &error)) { - reply = ibus_message_new_error(message, - error->name, - error->message); - ibus_error_free (error); - } - else { - reply = ibus_message_new_method_return (message); - } - if (table != NULL && g_object_is_floating (table)) - g_object_unref (table); + if (g_strcmp0 (method_name, "RegisterProperties") == 0) { + GVariant *variant = g_variant_get_child_value (parameters, 0); + IBusPropList *prop_list = IBUS_PROP_LIST (ibus_serializable_deserialize (variant)); + g_variant_unref (variant); + + g_signal_emit (panel, panel_signals[REGISTER_PROPERTIES], 0, prop_list); + _g_object_unref_if_floating (prop_list); + g_dbus_method_invocation_return_value (invocation, NULL); + return; } - else if (ibus_message_is_method_call (message, IBUS_INTERFACE_PANEL, "UpdatePreeditText")) { - IBusText *text = NULL; - guint cursor_pos; - gboolean visible; - gboolean retval; - IBusError *error = NULL; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_TEXT, &text, - G_TYPE_UINT, &cursor_pos, - G_TYPE_BOOLEAN, &visible, - G_TYPE_INVALID); - - if (!retval || !IBUS_PANEL_SERVICE_GET_CLASS (panel)->update_preedit_text (panel, - text, - cursor_pos, - visible, - &error)) { - reply = ibus_message_new_error(message, - error->name, - error->message); - ibus_error_free (error); - } - else { - reply = ibus_message_new_method_return (message); - } - if (text != NULL && g_object_is_floating (text)) - g_object_unref (text); + if (g_strcmp0 (method_name, "UpdateProperty") == 0) { + GVariant *variant = g_variant_get_child_value (parameters, 0); + IBusProperty *property = IBUS_PROPERTY (ibus_serializable_deserialize (variant)); + g_variant_unref (variant); + + g_signal_emit (panel, panel_signals[UPDATE_PROPERTY], 0, property); + _g_object_unref_if_floating (property); + g_dbus_method_invocation_return_value (invocation, NULL); + return; } - else if (ibus_message_is_method_call (message, IBUS_INTERFACE_PANEL, "UpdateProperty")) { - IBusProperty *property = NULL; - gboolean retval; - IBusError *error = NULL; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_PROPERTY, &property, - G_TYPE_INVALID); - - if (!retval || !IBUS_PANEL_SERVICE_GET_CLASS (panel)->update_property (panel, - property, - &error)) { - reply = ibus_message_new_error(message, - error->name, - error->message); - ibus_error_free (error); - } - else { - reply = ibus_message_new_method_return (message); - } - if (property != NULL && g_object_is_floating (property)) - g_object_unref (property); + if (g_strcmp0 (method_name, "SetCursorLocation") == 0) { + gint x, y, w, h; + g_variant_get (parameters, "(iiii)", &x, &y, &w, &h); + g_signal_emit (panel, panel_signals[SET_CURSOR_LOCATION], 0, x, y, w, h); + g_dbus_method_invocation_return_value (invocation, NULL); + return; } - else if (ibus_message_is_method_call (message, IBUS_INTERFACE_PANEL, "SetCursorLocation")) { - guint x, y, w, h; - gboolean retval; - IBusError *error = NULL; - - retval = ibus_message_get_args (message, - &error, - G_TYPE_INT, &x, - G_TYPE_INT, &y, - G_TYPE_INT, &w, - G_TYPE_INT, &h, - G_TYPE_INVALID); - - if (!retval || !IBUS_PANEL_SERVICE_GET_CLASS (panel)->set_cursor_location (panel, - x, - y, - w, - h, - &error)) { - reply = ibus_message_new_error(message, - error->name, - error->message); - ibus_error_free (error); - } - else { - reply = ibus_message_new_method_return (message); + + const static struct { + const gchar *name; + const gint signal_id; + } no_arg_methods [] = { + { "CursorUpLookupTable", CURSOR_UP_LOOKUP_TABLE }, + { "CursorDownLookupTable", CURSOR_DOWN_LOOKUP_TABLE }, + { "HideAuxiliaryText", HIDE_AUXILIARY_TEXT }, + { "HideLanguageBar", HIDE_LANGUAGE_BAR }, + { "HideLookupTable", HIDE_LOOKUP_TABLE }, + { "HidePreeditText", HIDE_PREEDIT_TEXT }, + { "PageUpLookupTable", PAGE_UP_LOOKUP_TABLE }, + { "PageDownLookupTable", PAGE_DOWN_LOOKUP_TABLE }, + { "Reset", RESET }, + { "ShowAuxiliaryText", SHOW_AUXILIARY_TEXT }, + { "ShowLanguageBar", SHOW_LANGUAGE_BAR }, + { "ShowLookupTable", SHOW_LOOKUP_TABLE }, + { "ShowPreeditText", SHOW_PREEDIT_TEXT }, + { "StartSetup", START_SETUP }, + { "StateChanged", STATE_CHANGED }, + }; + + gint i; + for (i = 0; i < G_N_ELEMENTS (no_arg_methods); i++) { + if (g_strcmp0 (method_name, no_arg_methods[i].name) == 0) { + if (no_arg_methods[i].signal_id >= 0) { + g_signal_emit (panel, panel_signals[no_arg_methods[i].signal_id], 0); + } + g_dbus_method_invocation_return_value (invocation, NULL); + return; } } - if (reply) { - ibus_connection_send (connection, reply); - ibus_message_unref (reply); - return TRUE; - } + /* should not be reached */ + g_return_if_reached (); +} - return TRUE; +static GVariant * +ibus_panel_service_service_get_property (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error) +{ + return IBUS_SERVICE_CLASS (ibus_panel_service_parent_class)-> + service_get_property (service, + connection, + sender, + object_path, + interface_name, + property_name, + error); } static gboolean -ibus_panel_service_not_implemented (IBusPanelService *panel, - IBusError **error) { - if (error) { - *error = ibus_error_new_from_printf (DBUS_ERROR_FAILED, - "Not implemented"); - } - return FALSE; +ibus_panel_service_service_set_property (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error) +{ + return IBUS_SERVICE_CLASS (ibus_panel_service_parent_class)-> + service_set_property (service, + connection, + sender, + object_path, + interface_name, + property_name, + value, + error); } -static gboolean + +static void +ibus_panel_service_not_implemented (IBusPanelService *panel) +{ + /* g_debug ("not implemented"); */ +} + +static void ibus_panel_service_focus_in (IBusPanelService *panel, - const gchar *input_context_path, - IBusError **error) + const gchar *input_context_path) { - return ibus_panel_service_not_implemented(panel, error); + ibus_panel_service_not_implemented(panel); } -static gboolean +static void ibus_panel_service_focus_out (IBusPanelService *panel, - const gchar *input_context_path, - IBusError **error) + const gchar *input_context_path) { - return ibus_panel_service_not_implemented(panel, error); + ibus_panel_service_not_implemented(panel); } -static gboolean +static void ibus_panel_service_register_properties (IBusPanelService *panel, - IBusPropList *prop_list, - IBusError **error) + IBusPropList *prop_list) { - return ibus_panel_service_not_implemented(panel, error); + ibus_panel_service_not_implemented(panel); } -static gboolean +static void ibus_panel_service_set_cursor_location (IBusPanelService *panel, gint x, gint y, gint w, - gint h, - IBusError **error) + gint h) { - return ibus_panel_service_not_implemented(panel, error); + ibus_panel_service_not_implemented(panel); } -static gboolean +static void ibus_panel_service_update_auxiliary_text (IBusPanelService *panel, IBusText *text, - gboolean visible, - IBusError **error) + gboolean visible) { - return ibus_panel_service_not_implemented(panel, error); + ibus_panel_service_not_implemented(panel); } -static gboolean +static void ibus_panel_service_update_lookup_table (IBusPanelService *panel, IBusLookupTable *lookup_table, - gboolean visible, - IBusError **error) + gboolean visible) { - return ibus_panel_service_not_implemented(panel, error); + ibus_panel_service_not_implemented(panel); } -static gboolean +static void ibus_panel_service_update_preedit_text (IBusPanelService *panel, IBusText *text, guint cursor_pos, - gboolean visible, - IBusError **error) + gboolean visible) { - return ibus_panel_service_not_implemented(panel, error); + ibus_panel_service_not_implemented(panel); } -static gboolean +static void ibus_panel_service_update_property (IBusPanelService *panel, - IBusProperty *prop, - IBusError **error) + IBusProperty *prop) { - return ibus_panel_service_not_implemented(panel, error); -} - -void -ibus_panel_service_candidate_clicked (IBusPanelService *panel, - guint index, - guint button, - guint state) { - ibus_service_send_signal ((IBusService *) panel, - IBUS_INTERFACE_PANEL, - "CandidateClicked", - G_TYPE_UINT, &index, - G_TYPE_UINT, &button, - G_TYPE_UINT, &state, - G_TYPE_INVALID); + ibus_panel_service_not_implemented(panel); } -void -ibus_panel_service_cursor_down (IBusPanelService *panel) { - ibus_service_send_signal ((IBusService *) panel, - IBUS_INTERFACE_PANEL, - "CursorDown", - G_TYPE_INVALID); -} +IBusPanelService * +ibus_panel_service_new (GDBusConnection *connection) +{ + g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL); -void -ibus_panel_service_cursor_up (IBusPanelService *panel) { - ibus_service_send_signal ((IBusService *) panel, - IBUS_INTERFACE_PANEL, - "CursorUp", - G_TYPE_INVALID); -} + GObject *object = g_object_new (IBUS_TYPE_PANEL_SERVICE, + "object-path", IBUS_PATH_PANEL, + "connection", connection, + NULL); -void -ibus_panel_service_page_down (IBusPanelService *panel) { - ibus_service_send_signal ((IBusService *) panel, - IBUS_INTERFACE_PANEL, - "PageDown", - G_TYPE_INVALID); + return IBUS_PANEL_SERVICE (object); } void -ibus_panel_service_page_up (IBusPanelService *panel) { - ibus_service_send_signal ((IBusService *) panel, +ibus_panel_service_candidate_clicked (IBusPanelService *panel, + guint index, + guint button, + guint state) +{ + g_return_if_fail (IBUS_IS_PANEL_SERVICE (panel)); + ibus_service_emit_signal ((IBusService *) panel, + NULL, IBUS_INTERFACE_PANEL, - "PageUp", - G_TYPE_INVALID); + "CandidateClicked", + g_variant_new ("(uuu)", index, button, state), + NULL); } void -ibus_panel_service_property_active (IBusPanelService *panel, - const gchar *prop_name, - gint prop_state) { - ibus_service_send_signal ((IBusService *) panel, +ibus_panel_service_property_activate (IBusPanelService *panel, + const gchar *prop_name, + guint prop_state) +{ + g_return_if_fail (IBUS_IS_PANEL_SERVICE (panel)); + ibus_service_emit_signal ((IBusService *) panel, + NULL, IBUS_INTERFACE_PANEL, "PropertyActivate", - G_TYPE_STRING, &prop_name, - G_TYPE_INT, &prop_state, - G_TYPE_INVALID); + g_variant_new ("(su)", prop_name, prop_state), + NULL); } void ibus_panel_service_property_show (IBusPanelService *panel, - const gchar *prop_name) { - ibus_service_send_signal ((IBusService *) panel, + const gchar *prop_name) +{ + g_return_if_fail (IBUS_IS_PANEL_SERVICE (panel)); + ibus_service_emit_signal ((IBusService *) panel, + NULL, IBUS_INTERFACE_PANEL, "PropertyShow", - G_TYPE_STRING, &prop_name, - G_TYPE_INVALID); + g_variant_new ("(s)", prop_name), + NULL); } void ibus_panel_service_property_hide (IBusPanelService *panel, - const gchar *prop_name) { - ibus_service_send_signal ((IBusService *) panel, + const gchar *prop_name) +{ + g_return_if_fail (IBUS_IS_PANEL_SERVICE (panel)); + ibus_service_emit_signal ((IBusService *) panel, + NULL, IBUS_INTERFACE_PANEL, "PropertyHide", - G_TYPE_STRING, &prop_name, - G_TYPE_INVALID); + g_variant_new ("(s)", prop_name), + NULL); } -/* For Emacs: - * Local Variables: - * c-file-style: "gnu" - * c-basic-offset: 4 - * End: - */ + +#define DEFINE_FUNC(name, Name) \ + void \ + ibus_panel_service_##name (IBusPanelService *panel) \ + { \ + g_return_if_fail (IBUS_IS_PANEL_SERVICE (panel)); \ + ibus_service_emit_signal ((IBusService *) panel, \ + NULL, \ + IBUS_INTERFACE_PANEL, \ + #Name, \ + NULL, \ + NULL); \ + } +DEFINE_FUNC (cursor_down, CursorDown) +DEFINE_FUNC (cursor_up, CursorUp) +DEFINE_FUNC (page_down, PageDown) +DEFINE_FUNC (page_up, PageUp) +#undef DEFINE_FUNC + diff --git a/src/ibuspanelservice.h b/src/ibuspanelservice.h index 5c05bac72..7678922af 100644 --- a/src/ibuspanelservice.h +++ b/src/ibuspanelservice.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (c) 2009, Google Inc. All rights reserved. @@ -17,6 +18,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibuspanelservice * @short_description: Panel service back-end. @@ -28,7 +34,6 @@ #ifndef __IBUS_PANEL_SERVICE_H_ #define __IBUS_PANEL_SERVICE_H_ -#include "ibusconnection.h" #include "ibuslookuptable.h" #include "ibusservice.h" #include "ibusproplist.h" @@ -70,69 +75,44 @@ struct _IBusPanelServiceClass { IBusServiceClass parent; /* class members */ - gboolean (* focus_in) (IBusPanelService *panel, - const gchar *input_context_path, - IBusError **error); - gboolean (* focus_out) (IBusPanelService *panel, - const gchar *input_context_path, - IBusError **error); - gboolean (* register_properties) (IBusPanelService *panel, - IBusPropList *prop_list, - IBusError **error); - gboolean (* set_cursor_location) (IBusPanelService *panel, + void (* focus_in) (IBusPanelService *panel, + const gchar *input_context_path); + void (* focus_out) (IBusPanelService *panel, + const gchar *input_context_path); + void (* register_properties) (IBusPanelService *panel, + IBusPropList *prop_list); + void (* set_cursor_location) (IBusPanelService *panel, gint x, gint y, gint w, - gint h, - IBusError **error); - gboolean (* update_auxiliary_text) (IBusPanelService *panel, + gint h); + void (* update_auxiliary_text) (IBusPanelService *panel, IBusText *text, - gboolean visible, - IBusError **error); - gboolean (* update_lookup_table) (IBusPanelService *panel, + gboolean visible); + void (* update_lookup_table) (IBusPanelService *panel, IBusLookupTable *lookup_table, - gboolean visible, - IBusError **error); - gboolean (* update_preedit_text) (IBusPanelService *panel, + gboolean visible); + void (* update_preedit_text) (IBusPanelService *panel, IBusText *text, guint cursor_pos, - gboolean visible, - IBusError **error); - gboolean (* update_property) (IBusPanelService *panel, - IBusProperty *prop, - IBusError **error); - gboolean (* cursor_down_lookup_table) (IBusPanelService *panel, - IBusError **error); - gboolean (* cursor_up_lookup_table) (IBusPanelService *panel, - IBusError **error); - gboolean (* destroy) (IBusPanelService *panel, - IBusError **error); - gboolean (* hide_auxiliary_text) (IBusPanelService *panel, - IBusError **error); - gboolean (* hide_language_bar) (IBusPanelService *panel, - IBusError **error); - gboolean (* hide_lookup_table) (IBusPanelService *panel, - IBusError **error); - gboolean (* hide_preedit_text) (IBusPanelService *panel, - IBusError **error); - gboolean (* page_down_lookup_table) (IBusPanelService *panel, - IBusError **error); - gboolean (* page_up_lookup_table) (IBusPanelService *panel, - IBusError **error); - gboolean (* reset) (IBusPanelService *panel, - IBusError **error); - gboolean (* show_auxiliary_text) (IBusPanelService *panel, - IBusError **error); - gboolean (* show_language_bar) (IBusPanelService *panel, - IBusError **error); - gboolean (* show_lookup_table) (IBusPanelService *panel, - IBusError **error); - gboolean (* show_preedit_text) (IBusPanelService *panel, - IBusError **error); - gboolean (* start_setup) (IBusPanelService *panel, - IBusError **error); - gboolean (* state_changed) (IBusPanelService *panel, - IBusError **error); + gboolean visible); + void (* update_property) (IBusPanelService *panel, + IBusProperty *prop); + void (* cursor_down_lookup_table) (IBusPanelService *panel); + void (* cursor_up_lookup_table) (IBusPanelService *panel); + void (* hide_auxiliary_text) (IBusPanelService *panel); + void (* hide_language_bar) (IBusPanelService *panel); + void (* hide_lookup_table) (IBusPanelService *panel); + void (* hide_preedit_text) (IBusPanelService *panel); + void (* page_down_lookup_table) (IBusPanelService *panel); + void (* page_up_lookup_table) (IBusPanelService *panel); + void (* reset) (IBusPanelService *panel); + void (* show_auxiliary_text) (IBusPanelService *panel); + void (* show_language_bar) (IBusPanelService *panel); + void (* show_lookup_table) (IBusPanelService *panel); + void (* show_preedit_text) (IBusPanelService *panel); + void (* start_setup) (IBusPanelService *panel); + void (* state_changed) (IBusPanelService *panel); /*< private >*/ /* padding */ @@ -143,12 +123,12 @@ GType ibus_panel_service_get_type (void); /** * ibus_panel_service_new: - * @connection: An IBusConnection. + * @connection: An GDBusConnection. * @returns: A newly allocated IBusPanelService. * - * New an IBusPanelService from an IBusConnection. + * New an IBusPanelService from an GDBusConnection. */ -IBusPanelService *ibus_panel_service_new (IBusConnection *connection); +IBusPanelService *ibus_panel_service_new (GDBusConnection *connection); /** * ibus_panel_service_candidate_clicked @@ -202,7 +182,7 @@ void ibus_panel_service_page_down (IBusPanelService *panel); void ibus_panel_service_page_up (IBusPanelService *panel); /** - * ibus_panel_service_property_active + * ibus_panel_service_property_activate * @panel: An IBusPanelService * @prop_name: A property name * @prop_state: State of the property @@ -210,9 +190,9 @@ void ibus_panel_service_page_up (IBusPanelService *panel); * Notify that a property is active * by sending a "PropertyActivate" message to IBus service. */ -void ibus_panel_service_property_active (IBusPanelService *panel, +void ibus_panel_service_property_activate (IBusPanelService *panel, const gchar *prop_name, - int prop_state); + guint prop_state); /** * ibus_panel_service_property_show * @panel: An IBusPanelService @@ -238,9 +218,3 @@ void ibus_panel_service_property_hide (IBusPanelService *panel, G_END_DECLS #endif -/* For Emacs: - * Local Variables: - * c-file-style: "gnu" - * c-basic-offset: 4 - * End: - */ diff --git a/src/ibuspendingcall.c b/src/ibuspendingcall.c deleted file mode 100644 index 33b803c05..000000000 --- a/src/ibuspendingcall.c +++ /dev/null @@ -1,105 +0,0 @@ -/* vim:set et sts=4: */ -/* ibus - The Input Bus - * Copyright (C) 2008-2010 Peng Huang - * Copyright (C) 2008-2010 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -#include -#include "ibuspendingcall.h" - -IBusPendingCall* -ibus_pending_call_ref (IBusPendingCall *pending) -{ - return dbus_pending_call_ref (pending); -} - -void -ibus_pending_call_unref (IBusPendingCall *pending) -{ - dbus_pending_call_unref (pending); -} - -gboolean -ibus_pending_call_set_notify (IBusPendingCall *pending, - IBusPendingCallNotifyFunction function, - gpointer user_data, - GDestroyNotify free_user_data) -{ - return dbus_pending_call_set_notify (pending, function, user_data, free_user_data); -} - -void -ibus_pending_call_cancel (IBusPendingCall *pending) -{ - dbus_pending_call_cancel (pending); -} - -gboolean -ibus_pending_call_get_completed (IBusPendingCall *pending) -{ - return dbus_pending_call_get_completed (pending); -} - -IBusMessage* -ibus_pending_call_steal_reply (IBusPendingCall *pending) -{ - return dbus_pending_call_steal_reply (pending); -} - -void -ibus_pending_call_block (IBusPendingCall *pending) -{ - dbus_pending_call_block (pending); -} - -void -ibus_pending_call_wait (IBusPendingCall *pending) -{ - g_assert (pending); - - while (!ibus_pending_call_get_completed (pending)) { - g_main_context_iteration (NULL, TRUE); - } -} - -gboolean -ibus_pending_call_allocate_data_slot (gint *slot_p) -{ - return dbus_pending_call_allocate_data_slot (slot_p); -} - -void -ibus_pending_call_free_data_slot (gint *slot_p) -{ - dbus_pending_call_free_data_slot (slot_p); -} - -gboolean -ibus_pending_call_set_data (IBusPendingCall *pending, - gint slot, - gpointer data, - GDestroyNotify free_data_func) -{ - return dbus_pending_call_set_data (pending, slot, data, free_data_func); -} - -gpointer -ibus_pending_call_get_data (IBusPendingCall *pending, - gint slot) -{ - return dbus_pending_call_get_data (pending, slot); -} diff --git a/src/ibuspendingcall.h b/src/ibuspendingcall.h deleted file mode 100644 index afcc35a9f..000000000 --- a/src/ibuspendingcall.h +++ /dev/null @@ -1,216 +0,0 @@ -/* vim:set et sts=4: */ -/* ibus - The Input Bus - * Copyright (C) 2008-2010 Peng Huang - * Copyright (C) 2008-2010 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -/** - * SECTION: ibuspendingcall - * @title: IBusPendingCall - * @short_description: A DBusPendingCall in IBus. - * @stability: Stable - * - * An IBusPendingCall is essentially a DBusPendingCall, which representing an expected reply. - * A IBusPendingCall can be created when you send a message that should have a reply. - * - * Besides DBusPendingCall functions, An IBusPendingCall can be manipulated - * with its own specific functions, which are defined in this section. - */ -#ifndef __IBUS_PENDING_CALL_H_ -#define __IBUS_PENDING_CALL_H_ - -#include -#include "ibusdbus.h" -#include "ibusmessage.h" - -G_BEGIN_DECLS - -/** - * IBusPendingCall: - * - * An opaque data structure that represents IBusPendingCall. - */ -typedef DBusPendingCall IBusPendingCall; - -/** - * IBusPendingCallNotifyFunction: - * @pending: An IBusPendingCall. - * @user_data: User data for the callback function. - * - * Callback prototype of pending call notify function. - */ -typedef void (* IBusPendingCallNotifyFunction)(IBusPendingCall *pending, gpointer user_data); - -/** - * ibus_pending_call_ref: - * @pending: An IBusPendingCall. - * @returns: A reference of IBusPendingCall. - * - * Increases the reference count on a pending call. - */ -IBusPendingCall* ibus_pending_call_ref (IBusPendingCall *pending); - -/** - * ibus_pending_call_unref: - * @pending: An IBusPendingCall. - * - * Decreases the reference count on a pending call. - */ -void ibus_pending_call_unref (IBusPendingCall *pending); - -/** - * ibus_pending_call_set_notify: - * @pending: An IBusPendingCall. - * @function: An pending call notify callback function. - * @user_data: User data for the callback function. - * @free_user_data: Callback to free the user_data. - * @returns: TRUE if succeed; FALSE if not enough memory. - * - * Sets a notification function to be called when the reply is received or the pending call times out. - */ -gboolean ibus_pending_call_set_notify (IBusPendingCall *pending, - IBusPendingCallNotifyFunction function, - gpointer user_data, - GDestroyNotify free_user_data); - -/** - * ibus_pending_call_cancel: - * @pending: An IBusPendingCall. - * - * Cancels the pending call, such that any reply or error received will just be ignored. - * - * Drops the dbus library's internal reference to the DBusPendingCall so will free the call - * if nobody else is holding a reference. - * But usually application owns a reference from dbus_connection_send_with_reply(). - * - * Note that canceling a pending call will not simulate a timed-out call; - * if a call times out, then a timeout error reply is received. - * If you cancel the call, no reply is received unless the reply was already received before you canceled. - */ -void ibus_pending_call_cancel (IBusPendingCall *pending); - -/** - * ibus_pending_call_get_completed: - * @pending: An IBusPendingCall. - * @returns: TRUE if pending call has received a reply; FALSE otherwise. - * - * Whether the pending call has received a reply or not. - */ -gboolean ibus_pending_call_get_completed (IBusPendingCall *pending); - -/** - * ibus_pending_call_steal_reply: - * @pending: An IBusPendingCall. - * @returns: Replied message; NULL if none has been received yet. - * - * Gets the reply, or returns NULL if none has been received yet. - * - * Ownership of the reply message passes to the caller. - * This function can only be called once per pending call, - * since the reply message is transferred to the caller. - */ -IBusMessage* ibus_pending_call_steal_reply (IBusPendingCall *pending); - -/** - * ibus_pending_call_block: - * @pending: An IBusPendingCall. - * - * Block until the pending call is completed. - * The blocking is as with ibus_connection_send_with_reply_and_block(); - * it does not enter the main loop or process other messages, - * it simply waits for the reply in question. - * - * If the pending call is already completed, this function returns immediately. - */ -void ibus_pending_call_block (IBusPendingCall *pending); - -/** - * ibus_pending_call_wait: - * @pending: An IBusPendingCall. - * - * Wait until the pending call is completed. - * - * See also: ibus_pending_call_get_completed(). - */ -void ibus_pending_call_wait (IBusPendingCall *pending); - -/** - * ibus_pending_call_allocate_data_slot: - * @slot_p: Address of a global variable storing the slot. - * @returns: TRUE if succeed; FALSE if insufficient memory. - * - * Allocates an integer ID to be used for storing application-specific data on any IBusPendingCall. - * - * The allocated ID may then be used with ibus_pending_call_set_data() and ibus_pending_call_get_data(). - * The passed-in slot must be initialized to -1, and is filled in with the slot ID. - * If the passed-in slot is not -1, it's assumed to be already allocated, and - * its reference count is increased. - * - * The allocated slot is global, i.e. all DBusPendingCall objects - * will have a slot with the given integer ID reserved. - */ -gboolean ibus_pending_call_allocate_data_slot - (gint *slot_p); - -/** - * ibus_pending_call_free_data_slot: - * @slot_p: Address of a global variable storing the slot. - * - * Deallocates a global ID for IBusPendingCall data slots. - * - * ibus_pending_call_get_data() and ibus_pending_call_set_data() may no longer be used with this slot. - * Existing data stored on existing IBusPendingCall objects will be freed when - * the IBusPendingCall is finalized, but may not be retrieved - * (and may only be replaced if someone else reallocates the slot). - * When the reference count on the passed-in slot reaches 0, it is set to -1. - */ -void ibus_pending_call_free_data_slot - (gint *slot_p); - -/** - * ibus_pending_call_set_data: - * @pending: An IBusPendingCall. - * @slot: The slot number. - * @data: The data to store - * @free_data_func: Callback to free the data. - * @returns: TRUE if there was enough memory to store the data; FALSE otherwise. - * - * Stores a pointer on a IBusPendingCall, along with an optional function - * to be used for freeing the data when the data is set again, or when the pending call is finalized. - * - * The slot number must have been allocated with ibus_pending_call_allocate_data_slot(). - */ -gboolean ibus_pending_call_set_data (IBusPendingCall *pending, - gint slot, - gpointer data, - GDestroyNotify free_data_func); - -/** - * ibus_pending_call_get_data: - * @pending: An IBusPendingCall. - * @slot: The slot number. - * @returns: The stored data; NULL if no such data. - * - * Retrieves data previously set with ibus_pending_call_set_data(). - * - * The slot must still be allocated (must not have been freed). - */ -gpointer ibus_pending_call_get_data (IBusPendingCall *pending, - gint slot); - -G_END_DECLS -#endif diff --git a/src/ibusproperty.c b/src/ibusproperty.c index c0e44304b..e5480fa6a 100644 --- a/src/ibusproperty.c +++ b/src/ibusproperty.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -20,23 +21,73 @@ */ #include "ibusproperty.h" #include "ibusproplist.h" +#include "ibusenumtypes.h" + +enum { + LAST_SIGNAL, +}; + +enum { + PROP_0 = 0, + PROP_KEY, + PROP_ICON, + PROP_LABEL, + PROP_TOOLTIP, + PROP_SENSITIVE, + PROP_VISIBLE, + PROP_PROP_TYPE, + PROP_STATE, + PROP_SUB_PROPS, +}; + +/* _IBusPropertyPrivate */ +struct _IBusPropertyPrivate { + gchar *key; + gchar *icon; + IBusText *label; + IBusText *tooltip; + + gboolean sensitive; + gboolean visible; + IBusPropType type; + IBusPropState state; + + IBusPropList *sub_props; +}; + +#define IBUS_PROPERTY_GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_PROPERTY, IBusPropertyPrivate)) /* functions prototype */ +static void ibus_property_set_property (IBusProperty *prop, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void ibus_property_get_property (IBusProperty *prop, + guint prop_id, + GValue *value, + GParamSpec *pspec); static void ibus_property_destroy (IBusProperty *prop); static gboolean ibus_property_serialize (IBusProperty *prop, - IBusMessageIter *iter); -static gboolean ibus_property_deserialize (IBusProperty *prop, - IBusMessageIter *iter); + GVariantBuilder *builder); +static gint ibus_property_deserialize (IBusProperty *prop, + GVariant *variant); static gboolean ibus_property_copy (IBusProperty *dest, const IBusProperty *src); G_DEFINE_TYPE (IBusProperty, ibus_property, IBUS_TYPE_SERIALIZABLE) static void -ibus_property_class_init (IBusPropertyClass *klass) +ibus_property_class_init (IBusPropertyClass *class) { - IBusObjectClass *object_class = IBUS_OBJECT_CLASS (klass); - IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (klass); + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + IBusObjectClass *object_class = IBUS_OBJECT_CLASS (class); + IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (class); + + g_type_class_add_private (class, sizeof (IBusPropertyPrivate)); + + gobject_class->set_property = (GObjectSetPropertyFunc) ibus_property_set_property; + gobject_class->get_property = (GObjectGetPropertyFunc) ibus_property_get_property; object_class->destroy = (IBusObjectDestroyFunc) ibus_property_destroy; @@ -44,46 +95,238 @@ ibus_property_class_init (IBusPropertyClass *klass) serializable_class->deserialize = (IBusSerializableDeserializeFunc) ibus_property_deserialize; serializable_class->copy = (IBusSerializableCopyFunc) ibus_property_copy; - g_string_append (serializable_class->signature, "suvsvbbuv"); + /* install properties */ + /** + * IBusPropert:key: + * + * The key of property + */ + g_object_class_install_property (gobject_class, + PROP_KEY, + g_param_spec_string ("key", + "key", + "The key of property", + "", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + /** + * IBusPropert:icon: + * + * The icon of property + */ + g_object_class_install_property (gobject_class, + PROP_ICON, + g_param_spec_string ("icon", + "icon", + "The icon of property", + "", + G_PARAM_READWRITE)); + + /** + * IBusPropert:label: + * + * The label of property + */ + g_object_class_install_property (gobject_class, + PROP_LABEL, + g_param_spec_object("label", + "label", + "The label of property", + IBUS_TYPE_TEXT, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + + /** + * IBusPropert:tooltip: + * + * The tooltip of property + */ + g_object_class_install_property (gobject_class, + PROP_TOOLTIP, + g_param_spec_object("tooltip", + "tooltip", + "The tooltip of property", + IBUS_TYPE_TEXT, + G_PARAM_READWRITE)); + + /** + * IBusPropert:sensitive: + * + * The sensitive of property + */ + g_object_class_install_property (gobject_class, + PROP_SENSITIVE, + g_param_spec_boolean("sensitive", + "sensitive", + "The sensitive of property", + TRUE, + G_PARAM_READWRITE)); + + /** + * IBusPropert:visible: + * + * The visible of property + */ + g_object_class_install_property (gobject_class, + PROP_VISIBLE, + g_param_spec_boolean("visible", + "visible", + "The visible of property", + TRUE, + G_PARAM_READWRITE)); + + /** + * IBusPropert:type: + * + * The type of property + */ + g_object_class_install_property (gobject_class, + PROP_PROP_TYPE, + g_param_spec_enum("prop-type", + "prop-type", + "The type of property", + IBUS_TYPE_PROP_TYPE, + PROP_TYPE_NORMAL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + /** + * IBusPropert:state: + * + * The state of property + */ + g_object_class_install_property (gobject_class, + PROP_STATE, + g_param_spec_enum("state", + "state", + "The state of property", + IBUS_TYPE_PROP_STATE, + PROP_STATE_UNCHECKED, + G_PARAM_READWRITE)); + + /** + * IBusPropert:sub-props: + * + * The sub properties of property + */ + g_object_class_install_property (gobject_class, + PROP_SUB_PROPS, + g_param_spec_object("sub-props", + "sub properties", + "The sub properties of property", + IBUS_TYPE_PROP_LIST, + G_PARAM_READWRITE)); } static void ibus_property_init (IBusProperty *prop) { - prop->key = NULL; - prop->type = 0; - prop->label = NULL; - prop->icon = NULL; - prop->tooltip = NULL; - prop->sensitive = FALSE; - prop->visible = FALSE; - prop->state = 0; - - prop->sub_props = NULL; + prop->priv = IBUS_PROPERTY_GET_PRIVATE (prop); + + ibus_property_set_label (prop, NULL); + ibus_property_set_tooltip (prop, NULL); + ibus_property_set_sub_props (prop, NULL); + +} +static void +ibus_property_set_property (IBusProperty *prop, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + switch (prop_id) { + case PROP_KEY: + g_assert (prop->priv->key == NULL); + prop->priv->key = g_value_dup_string (value); + break; + case PROP_ICON: + ibus_property_set_icon (prop, g_value_get_string (value)); + break; + case PROP_LABEL: + ibus_property_set_label (prop, g_value_get_object (value)); + break; + case PROP_TOOLTIP: + ibus_property_set_tooltip (prop, g_value_get_object (value)); + break; + case PROP_SENSITIVE: + ibus_property_set_sensitive (prop, g_value_get_boolean (value)); + break; + case PROP_VISIBLE: + ibus_property_set_visible (prop, g_value_get_boolean (value)); + break; + case PROP_PROP_TYPE: + prop->priv->type = g_value_get_enum (value); + break; + case PROP_STATE: + ibus_property_set_state (prop, g_value_get_enum (value)); + break; + case PROP_SUB_PROPS: + ibus_property_set_sub_props (prop, + (IBusPropList *)g_value_get_object (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (prop, prop_id, pspec); + } +} + +static void +ibus_property_get_property (IBusProperty *prop, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + switch (prop_id) { + case PROP_KEY: + g_value_set_string (value, ibus_property_get_key (prop)); + break; + case PROP_ICON: + g_value_set_string (value, ibus_property_get_icon (prop)); + break; + case PROP_LABEL: + g_value_set_object (value, ibus_property_get_label (prop)); + break; + case PROP_TOOLTIP: + g_value_set_object (value, ibus_property_get_tooltip (prop)); + break; + case PROP_SENSITIVE: + g_value_set_boolean (value, ibus_property_get_sensitive (prop)); + break; + case PROP_VISIBLE: + g_value_set_boolean (value, ibus_property_get_visible (prop)); + break; + case PROP_PROP_TYPE: + g_value_set_enum (value, ibus_property_get_prop_type (prop)); + break; + case PROP_STATE: + g_value_set_enum (value, ibus_property_get_state (prop)); + break; + case PROP_SUB_PROPS: + g_value_set_object (value, ibus_property_get_sub_props (prop)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (prop, prop_id, pspec); + } } static void ibus_property_destroy (IBusProperty *prop) { - g_free (prop->key); - prop->key = NULL; + g_free (prop->priv->key); + prop->priv->key = NULL; - g_free (prop->icon); - prop->icon = NULL; + g_free (prop->priv->icon); + prop->priv->icon = NULL; - if (prop->label) { - g_object_unref (prop->label); - prop->label = NULL; + if (prop->priv->label) { + g_object_unref (prop->priv->label); + prop->priv->label = NULL; } - if (prop->tooltip) { - g_object_unref (prop->tooltip); - prop->tooltip = NULL; + if (prop->priv->tooltip) { + g_object_unref (prop->priv->tooltip); + prop->priv->tooltip = NULL; } - if (prop->sub_props) { - g_object_unref (prop->sub_props); - prop->sub_props = NULL; + if (prop->priv->sub_props) { + g_object_unref (prop->priv->sub_props); + prop->priv->sub_props = NULL; } IBUS_OBJECT_CLASS (ibus_property_parent_class)->destroy ((IBusObject *)prop); @@ -91,97 +334,65 @@ ibus_property_destroy (IBusProperty *prop) gboolean ibus_property_serialize (IBusProperty *prop, - IBusMessageIter *iter) + GVariantBuilder *builder) { gboolean retval; - retval = IBUS_SERIALIZABLE_CLASS (ibus_property_parent_class)->serialize ((IBusSerializable *) prop, iter); + retval = IBUS_SERIALIZABLE_CLASS (ibus_property_parent_class)->serialize ((IBusSerializable *) prop, builder); g_return_val_if_fail (retval, FALSE); g_return_val_if_fail (IBUS_IS_PROPERTY (prop), FALSE); - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &prop->key); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_UINT, &prop->type); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, IBUS_TYPE_TEXT, &prop->label); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &prop->icon); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, IBUS_TYPE_TEXT, &prop->tooltip); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_BOOLEAN, &prop->sensitive); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_BOOLEAN, &prop->visible); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, G_TYPE_UINT, &prop->state); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_append (iter, IBUS_TYPE_PROP_LIST, &prop->sub_props); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (builder, "s", prop->priv->key); + g_variant_builder_add (builder, "u", prop->priv->type); + g_variant_builder_add (builder, "v", + ibus_serializable_serialize ((IBusSerializable *)prop->priv->label)); + g_variant_builder_add (builder, "s", prop->priv->icon); + g_variant_builder_add (builder, "v", + ibus_serializable_serialize ((IBusSerializable *)prop->priv->tooltip)); + g_variant_builder_add (builder, "b", prop->priv->sensitive); + g_variant_builder_add (builder, "b", prop->priv->visible); + g_variant_builder_add (builder, "u", prop->priv->state); + g_variant_builder_add (builder, "v", + ibus_serializable_serialize ((IBusSerializable *)prop->priv->sub_props)); return TRUE; } -static gboolean -ibus_property_deserialize (IBusProperty *prop, - IBusMessageIter *iter) +static gint +ibus_property_deserialize (IBusProperty *prop, + GVariant *variant) { - gboolean retval; - gchar *p; - - retval = IBUS_SERIALIZABLE_CLASS (ibus_property_parent_class)->deserialize ((IBusSerializable *) prop, iter); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &p); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - prop->key = g_strdup (p); + gint retval; - retval = ibus_message_iter_get (iter, G_TYPE_UINT, &prop->type); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); + retval = IBUS_SERIALIZABLE_CLASS (ibus_property_parent_class)->deserialize ((IBusSerializable *) prop, variant); + g_return_val_if_fail (retval, 0); - retval = ibus_message_iter_get (iter, IBUS_TYPE_TEXT, &prop->label); - g_object_ref_sink (prop->label); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); + g_variant_get_child (variant, retval++, "s", &prop->priv->key); + g_variant_get_child (variant, retval++, "u", &prop->priv->type); - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &p); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - prop->icon = g_strdup (p); + GVariant *subvar = g_variant_get_child_value (variant, retval++); + prop->priv->label = IBUS_TEXT (ibus_serializable_deserialize (subvar)); + g_object_ref_sink (prop->priv->label); + g_variant_unref (subvar); - retval = ibus_message_iter_get (iter, IBUS_TYPE_TEXT, &prop->tooltip); - g_object_ref_sink (prop->tooltip); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); + g_variant_get_child (variant, retval++, "s", &prop->priv->icon); - retval = ibus_message_iter_get (iter, G_TYPE_BOOLEAN, &prop->sensitive); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - - retval = ibus_message_iter_get (iter, G_TYPE_BOOLEAN, &prop->visible); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); + subvar = g_variant_get_child_value (variant, retval++); + prop->priv->tooltip = IBUS_TEXT (ibus_serializable_deserialize (subvar)); + g_object_ref_sink (prop->priv->tooltip); + g_variant_unref (subvar); - retval = ibus_message_iter_get (iter, G_TYPE_UINT, &prop->state); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); + g_variant_get_child (variant, retval++, "b", &prop->priv->sensitive); + g_variant_get_child (variant, retval++, "b", &prop->priv->visible); + g_variant_get_child (variant, retval++, "u", &prop->priv->state); - retval = ibus_message_iter_get (iter, IBUS_TYPE_PROP_LIST, &prop->sub_props); - g_object_ref_sink (prop->sub_props); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); + subvar = g_variant_get_child_value (variant, retval++); + prop->priv->sub_props = IBUS_PROP_LIST (ibus_serializable_deserialize (subvar)); + g_object_ref_sink (prop->priv->sub_props); + g_variant_unref (subvar); - return TRUE; + return retval; } static gboolean @@ -196,25 +407,25 @@ ibus_property_copy (IBusProperty *dest, g_return_val_if_fail (IBUS_IS_PROPERTY (dest), FALSE); g_return_val_if_fail (IBUS_IS_PROPERTY (src), FALSE); - dest->key = g_strdup (src->key); - dest->icon = g_strdup (src->icon); - if (src->label) { - dest->label = (IBusText *) ibus_serializable_copy ((IBusSerializable *) src->label); + dest->priv->key = g_strdup (src->priv->key); + dest->priv->icon = g_strdup (src->priv->icon); + if (src->priv->label) { + dest->priv->label = (IBusText *) ibus_serializable_copy ((IBusSerializable *) src->priv->label); } else - dest->label = ibus_text_new_from_static_string (""); - if (src->tooltip) { - dest->tooltip = (IBusText *) ibus_serializable_copy ((IBusSerializable *) src->tooltip); + dest->priv->label = ibus_text_new_from_static_string (""); + if (src->priv->tooltip) { + dest->priv->tooltip = (IBusText *) ibus_serializable_copy ((IBusSerializable *) src->priv->tooltip); } else - dest->tooltip = ibus_text_new_from_static_string (""); + dest->priv->tooltip = ibus_text_new_from_static_string (""); - dest->sensitive = src->sensitive; - dest->visible = src->visible; - dest->type = src->type; - dest->state = src->state; + dest->priv->sensitive = src->priv->sensitive; + dest->priv->visible = src->priv->visible; + dest->priv->type = src->priv->type; + dest->priv->state = src->priv->state; - dest->sub_props = (IBusPropList *) ibus_serializable_copy ((IBusSerializable *) src->sub_props); + dest->priv->sub_props = (IBusPropList *) ibus_serializable_copy ((IBusSerializable *) src->priv->sub_props); return TRUE; } @@ -228,7 +439,7 @@ ibus_property_new (const gchar *key, gboolean sensitive, gboolean visible, IBusPropState state, - IBusPropList *prop_list) + IBusPropList *props) { g_return_val_if_fail (key != NULL, NULL); g_return_val_if_fail (type >= PROP_TYPE_NORMAL && @@ -237,20 +448,43 @@ ibus_property_new (const gchar *key, IBusProperty *prop; - prop = (IBusProperty *)g_object_new (IBUS_TYPE_PROPERTY, NULL); + prop = (IBusProperty *)g_object_new (IBUS_TYPE_PROPERTY, + "key", key, + "prop-type", type, + "label", label, + "icon", icon, + "tooltip", tooltip, + "sensitive", sensitive, + "visible", visible, + "state", state, + "sub-props", props, + NULL); + return prop; +} - prop->key = g_strdup (key); - prop->type = type; - - ibus_property_set_label (prop, label); - ibus_property_set_icon (prop, icon); - ibus_property_set_tooltip (prop, tooltip); - ibus_property_set_sensitive (prop, sensitive); - ibus_property_set_visible (prop, visible); - ibus_property_set_state (prop, state); - ibus_property_set_sub_props (prop, prop_list); +#define IBUS_PROPERTY_GET_FIELD(field, return_type) \ +return_type \ +ibus_property_get_ ## field (IBusProperty *prop) \ +{ \ + return prop->priv->field; \ +} - return prop; +IBUS_PROPERTY_GET_FIELD (key, const gchar *) +IBUS_PROPERTY_GET_FIELD (icon, const gchar *) +IBUS_PROPERTY_GET_FIELD (label, IBusText *) +IBUS_PROPERTY_GET_FIELD (tooltip, IBusText *) +IBUS_PROPERTY_GET_FIELD (sensitive, gboolean) +IBUS_PROPERTY_GET_FIELD (visible, gboolean) +IBUS_PROPERTY_GET_FIELD (state, IBusPropState) +IBUS_PROPERTY_GET_FIELD (sub_props, IBusPropList *) +#undef IBUS_PROPERTY_GET_FIELD + +/* ibus_property_get_type() exists */ +IBusPropType +ibus_property_get_prop_type (IBusProperty *prop) +{ + g_assert (IBUS_IS_PROPERTY (prop)); + return prop->priv->type; } void @@ -260,15 +494,15 @@ ibus_property_set_label (IBusProperty *prop, g_assert (IBUS_IS_PROPERTY (prop)); g_return_if_fail (label == NULL || IBUS_IS_TEXT (label)); - if (prop->label) { - g_object_unref (prop->label); + if (prop->priv->label) { + g_object_unref (prop->priv->label); } if (label == NULL) { - prop->label = ibus_text_new_from_static_string (""); + prop->priv->label = ibus_text_new_from_static_string (""); } else { - prop->label = g_object_ref_sink (label); + prop->priv->label = g_object_ref_sink (label); } } @@ -278,8 +512,8 @@ ibus_property_set_icon (IBusProperty *prop, { g_assert (IBUS_IS_PROPERTY (prop)); - g_free (prop->icon); - prop->icon = g_strdup (icon); + g_free (prop->priv->icon); + prop->priv->icon = g_strdup (icon != NULL ? icon : ""); } void @@ -289,17 +523,19 @@ ibus_property_set_tooltip (IBusProperty *prop, g_assert (IBUS_IS_PROPERTY (prop)); g_assert (tooltip == NULL || IBUS_IS_TEXT (tooltip)); - if (prop->tooltip) { - g_object_unref (prop->tooltip); + IBusPropertyPrivate *priv = prop->priv; + + if (priv->tooltip) { + g_object_unref (priv->tooltip); } if (tooltip == NULL) { - prop->tooltip = ibus_text_new_from_static_string (""); - g_object_ref_sink (prop->tooltip); + priv->tooltip = ibus_text_new_from_static_string (""); + g_object_ref_sink (priv->tooltip); } else { - prop->tooltip = tooltip; - g_object_ref_sink (prop->tooltip); + priv->tooltip = tooltip; + g_object_ref_sink (priv->tooltip); } } @@ -308,7 +544,7 @@ ibus_property_set_sensitive (IBusProperty *prop, gboolean sensitive) { g_assert (IBUS_IS_PROPERTY (prop)); - prop->sensitive = sensitive; + prop->priv->sensitive = sensitive; } void @@ -316,7 +552,7 @@ ibus_property_set_visible (IBusProperty *prop, gboolean visible) { g_assert (IBUS_IS_PROPERTY (prop)); - prop->visible = visible; + prop->priv->visible = visible; } void @@ -328,7 +564,7 @@ ibus_property_set_state (IBusProperty *prop, state == PROP_STATE_CHECKED || state == PROP_STATE_INCONSISTENT); - prop->state = state; + prop->priv->state = state; } void @@ -338,17 +574,19 @@ ibus_property_set_sub_props (IBusProperty *prop, g_assert (IBUS_IS_PROPERTY (prop)); g_assert (IBUS_IS_PROP_LIST (prop_list) || prop_list == NULL); - if (prop->sub_props) { - g_object_unref (prop->sub_props); + IBusPropertyPrivate *priv = prop->priv; + + if (priv->sub_props) { + g_object_unref (priv->sub_props); } if (prop_list) { - prop->sub_props = prop_list; + priv->sub_props = prop_list; g_object_ref_sink (prop_list); } else { - prop->sub_props = ibus_prop_list_new (); - g_object_ref_sink (prop->sub_props); + priv->sub_props = ibus_prop_list_new (); + g_object_ref_sink (priv->sub_props); } } @@ -359,25 +597,24 @@ ibus_property_update (IBusProperty *prop, g_assert (IBUS_IS_PROPERTY (prop)); g_assert (IBUS_IS_PROPERTY (prop_update)); - if (g_strcmp0 (prop->key, prop_update->key) != 0) { - return ibus_prop_list_update_property (prop->sub_props, prop_update); + IBusPropertyPrivate *priv = prop->priv; + IBusPropertyPrivate *priv_update = prop_update->priv; + + if (g_strcmp0 (priv->key, priv_update->key) != 0) { + return ibus_prop_list_update_property (priv->sub_props, prop_update); } - g_free (prop->icon); - prop->icon = g_strdup (prop_update->icon); + /* Do not support update prop type */ + g_assert (priv->type == priv_update->type); - if (prop->label) { - g_object_unref (prop->label); - } - prop->label = (IBusText *) g_object_ref_sink (prop_update->label); + ibus_property_set_icon (prop, ibus_property_get_icon (prop_update)); + ibus_property_set_label (prop, ibus_property_get_label (prop_update)); + ibus_property_set_tooltip (prop, ibus_property_get_tooltip (prop_update)); + ibus_property_set_visible (prop, ibus_property_get_visible (prop_update)); + ibus_property_set_state (prop, ibus_property_get_state (prop_update)); + ibus_property_set_sensitive (prop, ibus_property_get_sensitive (prop_update)); - if (prop->tooltip) { - g_object_unref (prop->tooltip); - } - prop->tooltip = (IBusText *) g_object_ref_sink (prop_update->tooltip); - prop->visible = prop_update->visible; - prop->state = prop_update->state; - prop->sensitive = prop_update->sensitive; + /* Do not support update sub props */ return TRUE; } diff --git a/src/ibusproperty.h b/src/ibusproperty.h index 71d883d9e..96b1a1384 100644 --- a/src/ibusproperty.h +++ b/src/ibusproperty.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusproperty * @short_description: UI component for input method engine property. @@ -108,6 +114,7 @@ typedef enum { typedef struct _IBusProperty IBusProperty; typedef struct _IBusPropertyClass IBusPropertyClass; +typedef struct _IBusPropertyPrivate IBusPropertyPrivate; #ifndef __PROPLIST_DEFINED #define __PROPLIST_DEFINED @@ -131,20 +138,11 @@ typedef struct _IBusPropListClass IBusPropListClass; * UI component for input method engine property. */ struct _IBusProperty { + /*< private >*/ IBusSerializable parent; + IBusPropertyPrivate *priv; - /*< public >*/ - gchar *key; - gchar *icon; - IBusText *label; - IBusText *tooltip; - - gboolean sensitive; - gboolean visible; - guint type; - guint state; - - IBusPropList *sub_props; + gpointer pdummy[7]; }; struct _IBusPropertyClass { @@ -158,12 +156,12 @@ GType ibus_property_get_type (); * @key: Unique Identity for the IBusProperty. * @type: IBusPropType of IBusProperty. * @label: Text shown in UI. - * @icon: Icon file for the IBusProperty. + * @icon: (allow-none): Icon file for the IBusProperty. * @tooltip: Message shown if mouse hovered the IBusProperty. * @sensitive: Whether the IBusProperty is sensitive to keyboard and mouse event. * @visible: Whether the IBusProperty is visible. * @state: IBusPropState of IBusProperty. - * @prop_list: IBusPropList that contains sub IBusProperties. + * @prop_list: (allow-none): IBusPropList that contains sub IBusProperties. * @returns: A newly allocated IBusProperty. * * New a IBusProperty. @@ -178,6 +176,24 @@ IBusProperty *ibus_property_new (const gchar *key, IBusPropState state, IBusPropList *prop_list); +/** + * ibus_property_get_key: + * @prop: An IBusProperty. + * @returns: the key of IBusProperty. Should not be freed. + * + * Get the key of IBusProperty. + */ +const gchar * ibus_property_get_key (IBusProperty *prop); + +/** + * ibus_property_get_label: + * @prop: An IBusProperty. + * @returns: (transfer none): the label of IBusProperty. Should not be freed. + * + * Get the label of IBusProperty. + */ +IBusText * ibus_property_get_label (IBusProperty *prop); + /** * ibus_property_set_label: * @prop: An IBusProperty. @@ -188,6 +204,15 @@ IBusProperty *ibus_property_new (const gchar *key, void ibus_property_set_label (IBusProperty *prop, IBusText *label); +/** + * ibus_property_get_icon: + * @prop: An IBusProperty. + * @returns: the icon of IBusProperty. Should not be freed. + * + * Get the icon of IBusProperty. + */ +const gchar * ibus_property_get_icon (IBusProperty *prop); + /** * ibus_property_set_icon: * @prop: An IBusProperty. @@ -198,6 +223,15 @@ void ibus_property_set_label (IBusProperty *prop, void ibus_property_set_icon (IBusProperty *prop, const gchar *icon); +/** + * ibus_property_get_tooltip: + * @prop: An IBusProperty. + * @returns: (transfer none): the tooltip of IBusProperty. Should not be freed. + * + * Get the tooltip of IBusProperty. + */ +IBusText * ibus_property_get_tooltip (IBusProperty *prop); + /** * ibus_property_set_tooltip: * @prop: An IBusProperty. @@ -208,6 +242,15 @@ void ibus_property_set_icon (IBusProperty *prop, void ibus_property_set_tooltip (IBusProperty *prop, IBusText *tooltip); +/** + * ibus_property_get_sensitive: + * @prop: An IBusProperty. + * @returns: the sensitive of IBusProperty. + * + * Get the sensitive of IBusProperty. + */ +gboolean ibus_property_get_sensitive(IBusProperty *prop); + /** * ibus_property_set_sensitive: * @prop: An IBusProperty. @@ -218,6 +261,15 @@ void ibus_property_set_tooltip (IBusProperty *prop, void ibus_property_set_sensitive(IBusProperty *prop, gboolean sensitive); +/** + * ibus_property_get_visible: + * @prop: An IBusProperty. + * @returns: the visible of IBusProperty. + * + * Get the visible of IBusProperty. + */ +gboolean ibus_property_get_visible (IBusProperty *prop); + /** * ibus_property_set_visible: * @prop: An IBusProperty. @@ -228,6 +280,24 @@ void ibus_property_set_sensitive(IBusProperty *prop, void ibus_property_set_visible (IBusProperty *prop, gboolean visible); +/** + * ibus_property_get_property_type: + * @prop: An IBusProperty. + * @returns: the type of IBusProperty. + * + * Get the type of IBusProperty. + */ +IBusPropType ibus_property_get_prop_type(IBusProperty *prop); + +/** + * ibus_property_get_state: + * @prop: An IBusProperty. + * @returns: the state of IBusProperty. + * + * Get the state of IBusProperty. + */ +IBusPropState ibus_property_get_state (IBusProperty *prop); + /** * ibus_property_set_state: * @prop: An IBusProperty. @@ -238,6 +308,15 @@ void ibus_property_set_visible (IBusProperty *prop, void ibus_property_set_state (IBusProperty *prop, IBusPropState state); +/** + * ibus_property_get_sub_props: + * @prop: An IBusProperty. + * @returns: (transfer none): the IBusPropList of IBusProperty. + * Should not be freed. + * + * Get the IBusPropList of IBusProperty. + */ +IBusPropList * ibus_property_get_sub_props(IBusProperty *prop); /** * ibus_property_set_sub_props: diff --git a/src/ibusproplist.c b/src/ibusproplist.c index 1e960f7e0..88245fbae 100644 --- a/src/ibusproplist.c +++ b/src/ibusproplist.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,33 +19,30 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include #include "ibusproplist.h" /* functions prototype */ static void ibus_prop_list_destroy (IBusPropList *prop_list); static gboolean ibus_prop_list_serialize (IBusPropList *prop_list, - IBusMessageIter *iter); -static gboolean ibus_prop_list_deserialize (IBusPropList *prop_list, - IBusMessageIter *iter); + GVariantBuilder *builder); +static gint ibus_prop_list_deserialize (IBusPropList *prop_list, + GVariant *variant); static gboolean ibus_prop_list_copy (IBusPropList *dest, const IBusPropList *src); G_DEFINE_TYPE (IBusPropList, ibus_prop_list, IBUS_TYPE_SERIALIZABLE) static void -ibus_prop_list_class_init (IBusPropListClass *klass) +ibus_prop_list_class_init (IBusPropListClass *class) { - IBusObjectClass *object_class = IBUS_OBJECT_CLASS (klass); - IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (klass); + IBusObjectClass *object_class = IBUS_OBJECT_CLASS (class); + IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (class); object_class->destroy = (IBusObjectDestroyFunc) ibus_prop_list_destroy; serializable_class->serialize = (IBusSerializableSerializeFunc) ibus_prop_list_serialize; serializable_class->deserialize = (IBusSerializableDeserializeFunc) ibus_prop_list_deserialize; serializable_class->copy = (IBusSerializableCopyFunc) ibus_prop_list_copy; - - g_string_append (serializable_class->signature, "av"); } static void @@ -71,60 +69,51 @@ ibus_prop_list_destroy (IBusPropList *prop_list) static gboolean ibus_prop_list_serialize (IBusPropList *prop_list, - IBusMessageIter *iter) + GVariantBuilder *builder) { gboolean retval; - IBusMessageIter array_iter; - IBusProperty *prop; guint i; - retval = IBUS_SERIALIZABLE_CLASS (ibus_prop_list_parent_class)->serialize ((IBusSerializable *) prop_list, iter); + retval = IBUS_SERIALIZABLE_CLASS (ibus_prop_list_parent_class)->serialize ((IBusSerializable *) prop_list, builder); g_return_val_if_fail (retval, FALSE); - retval = ibus_message_iter_open_container (iter, IBUS_TYPE_ARRAY, "v", &array_iter); - g_return_val_if_fail (retval, FALSE); - - i = 0; - - while ((prop = ibus_prop_list_get (prop_list, i)) != NULL) { - retval = ibus_message_iter_append (&array_iter, IBUS_TYPE_PROPERTY, &prop); - g_return_val_if_fail (retval, FALSE); - i ++; + GVariantBuilder array; + g_variant_builder_init (&array, G_VARIANT_TYPE ("av")); + for (i = 0;; i++) { + IBusProperty *prop = ibus_prop_list_get (prop_list, i); + if (prop == NULL) + break; + g_variant_builder_add (&array, "v", ibus_serializable_serialize ((IBusSerializable *)prop)); } - retval = ibus_message_iter_close_container (iter, &array_iter); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (builder, "av", &array); return TRUE; } -gboolean +gint ibus_prop_list_deserialize (IBusPropList *prop_list, - IBusMessageIter *iter) + GVariant *variant) { - gboolean retval; - IBusMessageIter array_iter; - IBusProperty *prop; - - retval = IBUS_SERIALIZABLE_CLASS (ibus_prop_list_parent_class)->deserialize ((IBusSerializable *) prop_list, iter); - g_return_val_if_fail (retval, FALSE); + gint retval; - g_return_val_if_fail (IBUS_IS_PROP_LIST (prop_list), FALSE); + retval = IBUS_SERIALIZABLE_CLASS (ibus_prop_list_parent_class)->deserialize ((IBusSerializable *) prop_list, variant); + g_return_val_if_fail (retval, 0); - retval = ibus_message_iter_recurse (iter, IBUS_TYPE_ARRAY, &array_iter); - g_return_val_if_fail (retval, FALSE); - - while (ibus_message_iter_get_arg_type (&array_iter) != G_TYPE_INVALID) { - retval = ibus_message_iter_get (&array_iter, IBUS_TYPE_PROPERTY, &prop); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (&array_iter); + g_return_val_if_fail (IBUS_IS_PROP_LIST (prop_list), 0); + GVariantIter *iter = NULL; + g_variant_get_child (variant, retval++, "av", &iter); + g_return_val_if_fail (iter != NULL, retval); + GVariant *var; + while (g_variant_iter_loop (iter, "v", &var)) { + IBusProperty *prop = IBUS_PROPERTY (ibus_serializable_deserialize (var)); + g_object_ref_sink (prop); ibus_prop_list_append (prop_list, prop); } + g_variant_iter_free (iter); - ibus_message_iter_next (iter); - - return TRUE; + return retval; } diff --git a/src/ibusproplist.h b/src/ibusproplist.h index 180529715..91c1284c2 100644 --- a/src/ibusproplist.h +++ b/src/ibusproplist.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusproplist * @Title: IBusPropList diff --git a/src/ibusproxy.c b/src/ibusproxy.c index a92a6af01..40e8d4b2e 100644 --- a/src/ibusproxy.c +++ b/src/ibusproxy.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -19,714 +20,210 @@ * Boston, MA 02111-1307, USA. */ -#include -#include -#include "ibusmessage.h" #include "ibusproxy.h" +#include "ibusmarshalers.h" #include "ibusinternal.h" +#include "ibusobject.h" #define IBUS_PROXY_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_PROXY, IBusProxyPrivate)) enum { - IBUS_SIGNAL, + DESTROY, LAST_SIGNAL, }; -enum { - PROP_0, - PROP_NAME, - PROP_PATH, - PROP_INTERFACE, - PROP_CONNECTION, -}; - - -/* IBusProxyPriv */ -struct _IBusProxyPrivate { - gchar *name; - gchar *unique_name; - gchar *path; - gchar *interface; - IBusConnection *connection; -}; -typedef struct _IBusProxyPrivate IBusProxyPrivate; - static guint proxy_signals[LAST_SIGNAL] = { 0 }; /* functions prototype */ -static GObject *ibus_proxy_constructor (GType type, - guint n_construct_params, - GObjectConstructParam *construct_params); -static void ibus_proxy_destroy (IBusProxy *proxy); -static void ibus_proxy_set_property(IBusProxy *proxy, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void ibus_proxy_get_property(IBusProxy *proxy, - guint prop_id, - GValue *value, - GParamSpec *pspec); - -static gboolean ibus_proxy_ibus_signal (IBusProxy *proxy, - IBusMessage *message); - -G_DEFINE_TYPE (IBusProxy, ibus_proxy, IBUS_TYPE_OBJECT) - -IBusProxy * -ibus_proxy_new (const gchar *name, - const gchar *path, - IBusConnection *connection) -{ - g_assert (name != NULL); - g_assert (path != NULL); - g_assert (IBUS_IS_CONNECTION (connection)); - - IBusProxy *proxy; - - proxy = IBUS_PROXY (g_object_new (IBUS_TYPE_PROXY, - "name", name, - "path", path, - "connection", connection, - NULL)); - - return proxy; -} +static void ibus_proxy_dispose (GObject *object); +static void ibus_proxy_real_destroy (IBusProxy *proxy); + +static void ibus_proxy_connection_closed_cb + (GDBusConnection *connection, + gboolean remote_peer_vanished, + GError *error, + IBusProxy *proxy); +static void initable_iface_init (GInitableIface *initable_iface); +static void async_initable_iface_init (GAsyncInitableIface + *async_initable_iface); +G_DEFINE_TYPE_WITH_CODE (IBusProxy, ibus_proxy, G_TYPE_DBUS_PROXY, + G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init) + G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, async_initable_iface_init) + ); static void -ibus_proxy_class_init (IBusProxyClass *klass) +ibus_proxy_class_init (IBusProxyClass *class) { - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); - - g_type_class_add_private (klass, sizeof (IBusProxyPrivate)); - - gobject_class->constructor = ibus_proxy_constructor; - gobject_class->set_property = (GObjectSetPropertyFunc) ibus_proxy_set_property; - gobject_class->get_property = (GObjectGetPropertyFunc) ibus_proxy_get_property; + GObjectClass *gobject_class = G_OBJECT_CLASS (class); - ibus_object_class->destroy = (IBusObjectDestroyFunc) ibus_proxy_destroy; + gobject_class->dispose = ibus_proxy_dispose; - klass->ibus_signal = ibus_proxy_ibus_signal; - - /* install properties */ - /** - * IBusProxy:name: - * - * The service name of the proxy object. - */ - g_object_class_install_property (gobject_class, - PROP_NAME, - g_param_spec_string ("name", - "service name", - "The service name of proxy object", - NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - - /** - * IBusProxy:path: - * - * The path of the proxy object. - */ - g_object_class_install_property (gobject_class, - PROP_PATH, - g_param_spec_string ("path", - "object path", - "The path of proxy object", - NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - - /** - * IBusProxy:interface: - * - * The interface of the proxy object. - */ - g_object_class_install_property (gobject_class, - PROP_INTERFACE, - g_param_spec_string ("interface", - "interface", - "The interface of proxy object", - NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - - /** - * IBusProxy:connection: - * - * The connection of the proxy object. - */ - g_object_class_install_property (gobject_class, - PROP_CONNECTION, - g_param_spec_object ("connection", - "object path", - "The path of proxy object", - IBUS_TYPE_CONNECTION, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + class->destroy = ibus_proxy_real_destroy; /* install signals */ /** - * IBusProxy::ibus-signal: - * @proxy: An IBusProxy. - * @message: An message that contains the signal. + * IBusProxy::destroy: + * @object: An IBusProxy. * - * Emitted when sending a signal. - * Implement the member function ibus_signal() in extended class to receive this signal. + * Destroy and free an IBusProxy * - * Argument @user_data is ignored in this function. - * Returns: TRUE if the path of @message is identical to IBusProxy:path and successfully handled. + * See also: ibus_proxy_destroy(). * - * @see_also: ibus_proxy_handle_signal(). + * Argument @user_data is ignored in this function. */ - proxy_signals[IBUS_SIGNAL] = - g_signal_new (I_("ibus-signal"), - G_TYPE_FROM_CLASS (klass), + proxy_signals[DESTROY] = + g_signal_new (I_("destroy"), + G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (IBusProxyClass, ibus_signal), + G_STRUCT_OFFSET (IBusProxyClass, destroy), NULL, NULL, - ibus_marshal_BOOLEAN__POINTER, - G_TYPE_BOOLEAN, - 1, G_TYPE_POINTER); - -} - -static gboolean -_connection_ibus_signal_cb (IBusConnection *connection, - IBusMessage *message, - IBusProxy *proxy) -{ - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); - - if (g_strcmp0 (ibus_message_get_path (message), priv->path) != 0) - return FALSE; - - if (ibus_proxy_handle_signal (proxy, message)) { - g_signal_stop_emission_by_name (connection, "ibus-signal"); - return TRUE; - } - - return FALSE; -} - -static void -_connection_destroy_cb (IBusConnection *connection, - IBusProxy *proxy) -{ - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); - - g_assert (priv->connection == connection); - - g_object_unref (connection); - priv->connection = NULL; - - ibus_object_destroy ((IBusObject *) proxy); -} - -static GObject * -ibus_proxy_constructor (GType type, - guint n_construct_params, - GObjectConstructParam *construct_params) -{ - GObject *obj; - IBusProxy *proxy; - IBusProxyPrivate *priv; - - obj = G_OBJECT_CLASS (ibus_proxy_parent_class)->constructor (type, n_construct_params, construct_params); - - proxy = IBUS_PROXY (obj); - priv = IBUS_PROXY_GET_PRIVATE (proxy); - - if (priv->connection == NULL) { - g_object_unref (proxy); - return NULL; - } - - if (priv->name != NULL) { - IBusError *error; - gchar *rule; - - if (ibus_proxy_get_unique_name (proxy) == NULL) { - g_object_unref (proxy); - return NULL; - } - - rule = g_strdup_printf ("type='signal'," - "sender='" DBUS_SERVICE_DBUS "'," - "path='" DBUS_PATH_DBUS "'," - "interface='" DBUS_INTERFACE_DBUS "'," - "member='NameOwnerChanged'," - "arg0='%s'", - priv->unique_name); - - if (!ibus_connection_call (priv->connection, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "AddMatch", - &error, - G_TYPE_STRING, &rule, - G_TYPE_INVALID)) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - } - g_free (rule); - - rule = g_strdup_printf ("type='signal'," - "sender='%s'," - "path='%s'", - priv->unique_name, - priv->path); - - if (!ibus_connection_call (priv->connection, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "AddMatch", - &error, - G_TYPE_STRING, &rule, - G_TYPE_INVALID)) { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - } - g_free (rule); - } - g_signal_connect (priv->connection, - "ibus-signal", - (GCallback) _connection_ibus_signal_cb, - proxy); - - g_signal_connect (priv->connection, - "destroy", - (GCallback) _connection_destroy_cb, - proxy); - return obj; + _ibus_marshal_VOID__VOID, + G_TYPE_NONE, 0); } static void ibus_proxy_init (IBusProxy *proxy) { - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); - - priv->name = NULL; - priv->unique_name = NULL; - priv->path = NULL; - priv->interface = NULL; - priv->connection = NULL; + proxy->own = TRUE; } +/** + * ibus_proxy_dispose: + * + * Override GObject's dispose function. + */ static void -ibus_proxy_destroy (IBusProxy *proxy) +ibus_proxy_dispose (GObject *object) { - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); - - if (priv->connection) { - /* disconnect signal handlers */ - g_signal_handlers_disconnect_by_func (priv->connection, - (GCallback) _connection_ibus_signal_cb, - proxy); - g_signal_handlers_disconnect_by_func (priv->connection, - (GCallback) _connection_destroy_cb, - proxy); - - /* remove match rules */ - if (priv->name != NULL && ibus_connection_is_connected (priv->connection)) { - - IBusError *error; - gchar *rule; - - rule = g_strdup_printf ("type='signal'," - "sender='" DBUS_SERVICE_DBUS "'," - "path='" DBUS_PATH_DBUS "'," - "interface='" DBUS_INTERFACE_DBUS "'," - "member='NameOwnerChanged'," - "arg0='%s'", - priv->unique_name); - - if (!ibus_connection_call (priv->connection, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "RemoveMatch", - &error, - G_TYPE_STRING, &rule, - G_TYPE_INVALID)) { - - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - } - g_free (rule); - - rule = g_strdup_printf ("type='signal'," - "sender='%s'," - "path='%s'", - priv->unique_name, - priv->path); - - if (!ibus_connection_call (priv->connection, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "RemoveMatch", - &error, - G_TYPE_STRING, &rule, - G_TYPE_INVALID)) { - - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - } - g_free (rule); - + if (! (IBUS_PROXY_FLAGS (object) & IBUS_IN_DESTRUCTION)) { + IBUS_PROXY_SET_FLAGS (object, IBUS_IN_DESTRUCTION); + if (! (IBUS_PROXY_FLAGS (object) & IBUS_DESTROYED)) { + g_signal_emit (object, proxy_signals[DESTROY], 0); + IBUS_PROXY_SET_FLAGS (object, IBUS_DESTROYED); } + IBUS_PROXY_UNSET_FLAGS (object, IBUS_IN_DESTRUCTION); } - g_free (priv->name); - g_free (priv->unique_name); - g_free (priv->path); - g_free (priv->interface); - - priv->name = NULL; - priv->path = NULL; - priv->interface = NULL; - - if (priv->connection) { - g_object_unref (priv->connection); - priv->connection = NULL; - } - - IBUS_OBJECT_CLASS(ibus_proxy_parent_class)->destroy (IBUS_OBJECT (proxy)); + G_OBJECT_CLASS(ibus_proxy_parent_class)->dispose (object); } +/** + * ibus_proxy_real_destroy: + * + * Handle "destroy" signal which is emitted by ibus_proxy_dispose. + */ static void -ibus_proxy_set_property (IBusProxy *proxy, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); - - switch (prop_id) { - case PROP_NAME: - g_assert (priv->name == NULL); - priv->name = g_strdup (g_value_get_string (value)); - break; - case PROP_PATH: - g_assert (priv->path == NULL); - priv->path = g_strdup (g_value_get_string (value)); - break; - case PROP_INTERFACE: - g_assert (priv->interface == NULL); - priv->interface = g_strdup (g_value_get_string (value)); - break; - case PROP_CONNECTION: - g_assert (priv->connection == NULL); - priv->connection = IBUS_CONNECTION (g_value_get_object (value)); - g_object_ref_sink (priv->connection); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (proxy, prop_id, pspec); +ibus_proxy_real_destroy (IBusProxy *proxy) +{ + GDBusConnection *connection = g_dbus_proxy_get_connection ((GDBusProxy *) proxy); + g_assert (connection != NULL); + if (!g_dbus_connection_is_closed (connection) && proxy->own) { + g_dbus_proxy_call ((GDBusProxy *)proxy, + "org.freedesktop.IBus.Service.Destroy", + NULL, + G_DBUS_CALL_FLAGS_NONE, + -1, NULL, NULL, NULL); } + g_signal_handlers_disconnect_by_func (connection, + (GCallback) ibus_proxy_connection_closed_cb, + proxy); } static void -ibus_proxy_get_property (IBusProxy *proxy, - guint prop_id, - GValue *value, - GParamSpec *pspec) +ibus_proxy_connection_closed_cb (GDBusConnection *connection, + gboolean remote_peer_vanished, + GError *error, + IBusProxy *proxy) { - switch (prop_id) { - case PROP_NAME: - g_value_set_string (value, ibus_proxy_get_name (proxy)); - break; - case PROP_PATH: - g_value_set_string (value, ibus_proxy_get_path (proxy)); - break; - case PROP_INTERFACE: - g_value_set_string (value, ibus_proxy_get_interface (proxy)); - break; - case PROP_CONNECTION: - g_value_set_object (value, ibus_proxy_get_connection (proxy)); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (proxy, prop_id, pspec); - } + ibus_proxy_destroy (proxy); } - -gboolean -ibus_proxy_handle_signal (IBusProxy *proxy, - DBusMessage *message) +void +ibus_proxy_destroy (IBusProxy *proxy) { g_assert (IBUS_IS_PROXY (proxy)); - g_assert (message != NULL); - - gboolean retval = FALSE; - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); - - if (ibus_message_is_signal (message, DBUS_SERVICE_DBUS, "NameOwnerChanged")) { - gchar *name, *old_name, *new_name; - IBusError *error; - - if (!ibus_message_get_args (message, - &error, - G_TYPE_STRING, &name, - G_TYPE_STRING, &old_name, - G_TYPE_STRING, &new_name, - G_TYPE_INVALID)) { - g_warning ("%s :%s", error->name, error->message); - ibus_error_free (error); - } - if (g_strcmp0 (priv->unique_name, old_name) == 0) { - ibus_object_destroy (IBUS_OBJECT (proxy)); - return FALSE; - } - } - - if (g_strcmp0 (ibus_message_get_path (message), priv->path) == 0) { - g_signal_emit (proxy, proxy_signals[IBUS_SIGNAL], 0, message, &retval); + if (! (IBUS_PROXY_FLAGS (proxy) & IBUS_IN_DESTRUCTION)) { + g_object_run_dispose (G_OBJECT (proxy)); } - - return retval; } static gboolean -ibus_proxy_ibus_signal (IBusProxy *proxy, - DBusMessage *message) +ibus_proxy_init_finish (IBusProxy *proxy, + GError **error) { - return FALSE; -} - - -const gchar * -ibus_proxy_get_name (IBusProxy *proxy) -{ - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); - - return priv->name; -} - -const gchar * -ibus_proxy_get_unique_name (IBusProxy *proxy) -{ - - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); - - if (priv->unique_name == NULL && priv->connection != NULL) { - IBusMessage *reply = NULL; - IBusError *error = NULL; - gchar *owner = NULL; - reply = ibus_connection_call_with_reply (priv->connection, - DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "GetNameOwner", - NULL, - G_TYPE_STRING, &(priv->name), - G_TYPE_INVALID); - if (reply) { - if (ibus_message_get_args (reply, &error, G_TYPE_STRING, &owner, - G_TYPE_INVALID)) { - priv->unique_name = g_strdup (owner); - } else { - g_warning ("%s: %s", error->name, error->message); - ibus_error_free (error); - } - - ibus_message_unref (reply); - } + g_assert (IBUS_IS_PROXY (proxy)); + g_assert (error == NULL || *error == NULL); + + GDBusConnection *connection = + g_dbus_proxy_get_connection ((GDBusProxy *)proxy); + + if (connection == NULL || g_dbus_connection_is_closed (connection)) { + /* + * When proxy is created asynchronously, the connection may be closed + * before proxy is ready. In this case, we need override interfaces + * GInitable and GAsyncInitable to report the error. + */ + if (error != NULL) + *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Connection is closed."); + return FALSE; } - return priv->unique_name; -} - -const gchar * -ibus_proxy_get_path (IBusProxy *proxy) -{ - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); + g_signal_connect (connection, "closed", + G_CALLBACK (ibus_proxy_connection_closed_cb), proxy); - return priv->path; + return TRUE; } -const gchar * -ibus_proxy_get_interface (IBusProxy *proxy) -{ - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); - return priv->interface; -} +static GInitableIface *initable_iface_parent = NULL; -IBusConnection * -ibus_proxy_get_connection (IBusProxy *proxy) +static gboolean +initable_init (GInitable *initable, + GCancellable *cancellable, + GError **error) { - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); - - return priv->connection; + if (!initable_iface_parent->init (initable, cancellable, error)) + return FALSE; + return ibus_proxy_init_finish ((IBusProxy *)initable, error); } -gboolean -ibus_proxy_send (IBusProxy *proxy, - DBusMessage *message) +static void +initable_iface_init (GInitableIface *initable_iface) { - g_assert (IBUS_IS_PROXY (proxy)); - g_assert (message != NULL); - - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); - - g_return_val_if_fail (priv->connection, FALSE); - g_return_val_if_fail (ibus_connection_is_connected (priv->connection), FALSE); - - return ibus_connection_send (priv->connection, message); + initable_iface_parent = g_type_interface_peek_parent (initable_iface); + initable_iface->init = initable_init; } -gboolean -ibus_proxy_call (IBusProxy *proxy, - const gchar *method, - GType first_arg_type, - ...) -{ - g_assert (IBUS_IS_PROXY (proxy)); - g_assert (method != NULL); - - va_list args; - gboolean retval; - DBusMessage *message; - - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); - - g_return_val_if_fail (priv->connection, FALSE); - g_return_val_if_fail (ibus_connection_is_connected (priv->connection), FALSE); +static GAsyncInitableIface *async_initable_iface_parent = NULL; - message = ibus_message_new_method_call (priv->name, - priv->path, - priv->interface, - method); - va_start (args, first_arg_type); - retval = ibus_message_append_args_valist (message, - first_arg_type, - args); - if (!retval) { - ibus_message_unref (message); - g_return_val_if_reached (FALSE); - } - - va_end (args); - - retval = ibus_connection_send (priv->connection, message); - - ibus_message_unref (message); - - return retval; +static void +async_initable_init_async (GAsyncInitable *initable, + gint io_priority, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + async_initable_iface_parent->init_async (initable, + io_priority, cancellable, callback, user_data); } -gboolean -ibus_proxy_call_with_reply (IBusProxy *proxy, - const gchar *method, - IBusPendingCall **pending, - gint timeout_milliseconds, - IBusError **error, - GType first_arg_type, - ...) +static gboolean +async_initable_init_finish (GAsyncInitable *initable, + GAsyncResult *res, + GError **error) { - g_assert (IBUS_IS_PROXY (proxy)); - g_assert (pending != NULL); - g_assert (method != NULL); - - va_list args; - gboolean retval; - DBusMessage *message; - - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); - - if (priv->connection == NULL || !ibus_connection_is_connected (priv->connection)) { - if (error) { - *error = ibus_error_new_from_printf (DBUS_ERROR_DISCONNECTED, - "Connection of %s was disconnected.", - G_OBJECT_TYPE_NAME (proxy)); - } + if (!async_initable_iface_parent->init_finish (initable, res, error)) return FALSE; - } - - message = ibus_message_new_method_call (priv->name, - priv->path, - priv->interface, - method); - va_start (args, first_arg_type); - retval = ibus_message_append_args_valist (message, - first_arg_type, - args); - va_end (args); - - *pending = NULL; - retval = ibus_connection_send_with_reply (priv->connection, - message, - pending, - timeout_milliseconds); - ibus_message_unref (message); - - if (!retval && error != NULL) { - *error = ibus_error_new_from_printf (DBUS_ERROR_NO_MEMORY, ""); - } - - return retval; + return ibus_proxy_init_finish ((IBusProxy *)initable, error); } - -IBusMessage * -ibus_proxy_call_with_reply_and_block (IBusProxy *proxy, - const gchar *method, - gint timeout_milliseconds, - IBusError **error, - GType first_arg_type, - ...) +static void +async_initable_iface_init (GAsyncInitableIface *async_initable_iface) { - g_assert (IBUS_IS_PROXY (proxy)); - g_assert (method != NULL); - - va_list args; - gboolean retval; - DBusMessage *message; - DBusMessage *reply_message; - - IBusProxyPrivate *priv; - priv = IBUS_PROXY_GET_PRIVATE (proxy); - - if (priv->connection == NULL || !ibus_connection_is_connected (priv->connection)) { - if (error) { - *error = ibus_error_new_from_printf (DBUS_ERROR_DISCONNECTED, - "Connection of %s was disconnected.", - G_OBJECT_TYPE_NAME (proxy)); - } - return NULL; - } - - message = ibus_message_new_method_call (priv->name, - priv->path, - priv->interface, - method); - va_start (args, first_arg_type); - retval = ibus_message_append_args_valist (message, - first_arg_type, - args); - va_end (args); - - reply_message = ibus_connection_send_with_reply_and_block ( - priv->connection, - message, - timeout_milliseconds, - error); - ibus_message_unref (message); - - return reply_message; + async_initable_iface_parent = g_type_interface_peek_parent (async_initable_iface); + async_initable_iface->init_async = async_initable_init_async; + async_initable_iface->init_finish = async_initable_init_finish; } diff --git a/src/ibusproxy.h b/src/ibusproxy.h index cf1aea24d..758479234 100644 --- a/src/ibusproxy.h +++ b/src/ibusproxy.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusproxy * @short_description: Base proxy object. @@ -33,9 +39,7 @@ #ifndef __IBUS_PROXY_H_ #define __IBUS_PROXY_H_ -#include "ibusobject.h" -#include "ibusconnection.h" -#include "ibusmessage.h" +#include /* * Type macros. @@ -60,227 +64,45 @@ G_BEGIN_DECLS typedef struct _IBusProxy IBusProxy; typedef struct _IBusProxyClass IBusProxyClass; +#define IBUS_PROXY_FLAGS(obj) (IBUS_PROXY (obj)->flags) +#define IBUS_PROXY_SET_FLAGS(obj,flag) G_STMT_START{ (IBUS_PROXY_FLAGS (obj) |= (flag)); }G_STMT_END +#define IBUS_PROXY_UNSET_FLAGS(obj,flag) G_STMT_START{ (IBUS_PROXY_FLAGS (obj) &= ~(flag)); }G_STMT_END +#define IBUS_PROXY_DESTROYED(obj) (IBUS_PROXY_FLAGS (obj) & IBUS_DESTROYED) + /** * IBusProxy: * * An opaque data type representing an IBusProxy. */ struct _IBusProxy { - IBusObject parent; + GDBusProxy parent; /* instance members */ + guint32 flags; + gboolean own; }; struct _IBusProxyClass { - IBusObjectClass parent; + GDBusProxyClass parent; /* class members */ - gboolean (* ibus_signal) (IBusProxy *proxy, - IBusMessage *message); + void (* destroy) (IBusProxy *proxy); /*< private >*/ /* padding */ gpointer pdummy[7]; }; -GType ibus_proxy_get_type (void); - -/** - * ibus_proxy_new: - * @name: The service name of proxy object. - * @path: The path of proxy object. - * @connection: An IBusConnection. - * @returns: A newly allocated IBusProxy instance. - * - * New an IBusProxy instance. - * Property IBusProxy:name is set as @name, and - * IBusProxy:path is set as @path. - */ -IBusProxy *ibus_proxy_new (const gchar *name, - const gchar *path, - IBusConnection *connection); - -/** - * ibus_proxy_send: - * @proxy: An IBusProxy. - * @message: The IBusMessage to be sent. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Send an #IBusMessage to the corresponding service. - * - * @see_also ibus_proxy_call(), ibus_proxy_send_with_reply(), ibus_proxy_send_with_reply_and_block(). - */ -gboolean ibus_proxy_send (IBusProxy *proxy, - IBusMessage *message); - -/** - * ibus_proxy_call: - * @proxy: An IBusProxy. - * @method: The method to be called. - * @first_arg_type: Type of first argument. - * @...: Rest of arguments, NULL to mark the end. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Call a method of the corresponding service. - * - * @see_also ibus_proxy_send(), ibus_proxy_call_with_reply(), ibus_proxy_call_with_reply_and_block(). - */ -gboolean ibus_proxy_call (IBusProxy *proxy, - const gchar *method, - GType first_arg_type, - ...); - -/** - * ibus_proxy_call_with_reply: - * @proxy: An IBusProxy. - * @method: The method to be called. - * @pending: Return location of a IBusPendingCall object, or NULL if connection is disconnected. - * @timeout_milliseconds: Time out in milliseconds. - * @error: Returned error is stored here; NULL to ignore error. - * @first_arg_type: Type of first argument. - * @...: Rest of arguments, NULL to mark the end. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Call a method of the corresponding service, and returns an IBusPendingCall used to receive a reply to the message. - * This function calls ibus_connection_send_with_reply() to do the actual sending. - * - * @see_also: ibus_connection_send_with_reply(), ibus_proxy_call(), - * ibus_proxy_send_with_reply(), ibus_proxy_call_with_reply_and_block(). - */ -gboolean ibus_proxy_call_with_reply (IBusProxy *proxy, - const gchar *method, - IBusPendingCall **pending, - gint timeout_milliseconds, - IBusError **error, - GType first_arg_type, - ...); - -/** - * ibus_proxy_call_with_reply_and_block: - * @proxy: An IBusProxy. - * @method: The method to be called. - * @timeout_milliseconds: Time out in milliseconds. - * @error: Returned error is stored here; NULL to ignore error. - * @first_arg_type: Type of first argument. - * @...: Rest of arguments, NULL to mark the end. - * @returns: An IBusMessage that is the reply or NULL with an error code if the function fails. - * - * Call a method of the corresponding service and blocks a certain time period while waiting for - * an IBusMessage as reply. - * If the IBusMessage is not NULL, it calls ibus_connection_send_with_reply_and_block() to do the - * actual sending. - * - * @see_also: ibus_connection_send_with_reply_and_block(), ibus_proxy_call(), - * ibus_proxy_send_with_reply(), ibus_proxy_call_with_reply_and_block(). - */ -IBusMessage *ibus_proxy_call_with_reply_and_block - (IBusProxy *proxy, - const gchar *method, - gint timeout_milliseconds, - IBusError **error, - GType first_arg_type, - ...); - -/** - * ibus_proxy_send_with_reply: - * @proxy: An IBusProxy. - * @message: The IBusMessage to be sent. - * @pending: Return location of a IBusPendingCall object, or NULL if connection is disconnected. - * @timeout_milliseconds: Time out in milliseconds. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Send an IBusMessage to the corresponding service and returns - * an IBusPendingCall used to receive a reply to the message. - * This function calls ibus_connection_send_with_reply() to do the actual sending. - * - * @see_also: ibus_connection_send_with_reply(), ibus_proxy_send(), - * ibus_proxy_call_with_reply(), ibus_proxy_send_with_reply_and_block(). - */ -gboolean ibus_proxy_send_with_reply (IBusProxy *proxy, - IBusMessage *message, - IBusPendingCall **pending, - gint timeout_milliseconds); - -/** - * ibus_proxy_send_with_reply_and_block: - * @proxy: An IBusProxy. - * @message: The IBusMessage to be sent. - * @returns: An IBusMessage that is the reply or NULL with an error code if the function fails. - * - * Send an IBusMessage to the corresponding service and blocks a certain time period while waiting for - * an IBusMessage as reply. - * If the IBusMessage is not NULL, it calls ibus_connection_send_with_reply_and_block() to do the - * actual sending. - * - * @see_also: ibus_connection_send_with_reply_and_block(), ibus_proxy_send(), ibus_proxy_send_with_reply(), - * ibus_proxy_call_with_reply_and_block(). - */ -IBusMessage *ibus_proxy_send_with_reply_and_block - (IBusProxy *proxy, - IBusMessage *message); - -/** - * ibus_proxy_handle_signal: - * @proxy: An IBusProxy. - * @message: The IBusMessage to be sent. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Handle a signal by emitting IBusProxy::ibus-signal. - * - * If signal name is NameOwnerChanged - * and the service name is identical to the old name, then - * @proxy will be destroyed by ibus_object_destroy () and FALSE is returned. - * Otherwise TRUE is returned. - * - * Note that if the path of of message is not identical to the IBusProxy:path - * this function will not emit IBusProxy::ibus-signal. - * - */ -gboolean ibus_proxy_handle_signal (IBusProxy *proxy, - IBusMessage *message); - -/** - * ibus_proxy_get_name: - * @proxy: An IBusProxy. - * @returns: The service name of the proxy object. - * - * Get the service name of a proxy object. - */ -const gchar *ibus_proxy_get_name (IBusProxy *proxy); - -/** - * ibus_proxy_get_unique_name: - * @proxy: An IBusProxy. - * @returns: The service name of the proxy object. - * - * Get the unique name of the proxy object. - */ -const gchar *ibus_proxy_get_unique_name (IBusProxy *proxy); - -/** - * ibus_proxy_get_path: - * @proxy: An IBusProxy. - * @returns: The path of proxy object. - * - * Get the path of a proxy object. - */ -const gchar *ibus_proxy_get_path (IBusProxy *proxy); - -/** - * ibus_proxy_get_interface: - * @proxy: An IBusProxy. - * @returns: The service name of the proxy object. - * - * Get interface of a proxy object. - */ -const gchar *ibus_proxy_get_interface (IBusProxy *proxy); +GType ibus_proxy_get_type (void); /** - * ibus_proxy_get_connection: - * @proxy: An IBusProxy. - * @returns: (transfer none): The connection of the proxy object. + * ibus_proxy_destroy: * - * Get the connection of a proxy object. + * Dispose the proxy object. If the dbus connection is alive and the own variable above + * is TRUE (which is the default), org.freedesktop.IBus.Service.Destroy method will be + * called. Note that "destroy" signal might be emitted when ibus_proxy_destroy is called + * or the underlying dbus connection for the proxy is terminated. In the callback of the + * destroy signal, you might have to call something like 'g_object_unref(the_proxy);'. */ -IBusConnection *ibus_proxy_get_connection (IBusProxy *proxy); +void ibus_proxy_destroy (IBusProxy *proxy); G_END_DECLS #endif diff --git a/src/ibusserializable.c b/src/ibusserializable.c index 717418147..6251c89ce 100644 --- a/src/ibusserializable.c +++ b/src/ibusserializable.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,7 +19,6 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include #include "ibusinternal.h" #include "ibusserializable.h" @@ -29,7 +29,6 @@ enum { LAST_SIGNAL, }; -typedef struct _IBusSerializablePrivate IBusSerializablePrivate; struct _IBusSerializablePrivate { GData *attachments; }; @@ -37,15 +36,15 @@ struct _IBusSerializablePrivate { // static guint object_signals[LAST_SIGNAL] = { 0 }; /* functions prototype */ -static void ibus_serializable_base_init (IBusSerializableClass *klass); -static void ibus_serializable_base_fini (IBusSerializableClass *klass); -static void ibus_serializable_class_init (IBusSerializableClass *klass); +static void ibus_serializable_base_init (IBusSerializableClass *class); +static void ibus_serializable_base_fini (IBusSerializableClass *class); +static void ibus_serializable_class_init (IBusSerializableClass *class); static void ibus_serializable_init (IBusSerializable *object); static void ibus_serializable_destroy (IBusSerializable *object); static gboolean ibus_serializable_real_serialize (IBusSerializable *object, - IBusMessageIter *iter); -static gboolean ibus_serializable_real_deserialize (IBusSerializable *object, - IBusMessageIter *iter); + GVariantBuilder *builder); +static gint ibus_serializable_real_deserialize (IBusSerializable *object, + GVariant *variant); static gboolean ibus_serializable_real_copy (IBusSerializable *dest, const IBusSerializable *src); @@ -85,292 +84,98 @@ ibus_serializable_new (void) } static void -ibus_serializable_base_init (IBusSerializableClass *klass) +ibus_serializable_base_init (IBusSerializableClass *class) { - /* init signature */ - klass->signature = g_string_new ("a{sv}"); } static void -ibus_serializable_base_fini (IBusSerializableClass *klass) +ibus_serializable_base_fini (IBusSerializableClass *class) { - /* init signature */ - g_string_free (klass->signature, TRUE); - klass->signature = NULL; } static void -ibus_serializable_class_init (IBusSerializableClass *klass) +ibus_serializable_class_init (IBusSerializableClass *class) { - IBusObjectClass *object_class = IBUS_OBJECT_CLASS (klass); + IBusObjectClass *object_class = IBUS_OBJECT_CLASS (class); - parent_class = (IBusObjectClass *) g_type_class_peek_parent (klass); + parent_class = (IBusObjectClass *) g_type_class_peek_parent (class); - g_type_class_add_private (klass, sizeof (IBusSerializablePrivate)); + g_type_class_add_private (class, sizeof (IBusSerializablePrivate)); object_class->destroy = (IBusObjectDestroyFunc) ibus_serializable_destroy; - klass->serialize = ibus_serializable_real_serialize; - klass->deserialize = ibus_serializable_real_deserialize; - klass->copy = ibus_serializable_real_copy; + class->serialize = ibus_serializable_real_serialize; + class->deserialize = ibus_serializable_real_deserialize; + class->copy = ibus_serializable_real_copy; } static void -ibus_serializable_init (IBusSerializable *object) +ibus_serializable_init (IBusSerializable *serializable) { - IBusSerializablePrivate *priv; - priv = IBUS_SERIALIZABLE_GET_PRIVATE (object); - - priv->attachments = NULL; - g_datalist_init (&priv->attachments); + serializable->priv = IBUS_SERIALIZABLE_GET_PRIVATE (serializable); + serializable->priv->attachments = NULL; + g_datalist_init (&serializable->priv->attachments); } static void -ibus_serializable_destroy (IBusSerializable *object) -{ - IBusSerializablePrivate *priv; - priv = IBUS_SERIALIZABLE_GET_PRIVATE (object); - - g_datalist_clear (&priv->attachments); - - parent_class->destroy (IBUS_OBJECT (object)); -} - -static GValue * -ibus_g_value_dup (const GValue *value) -{ - GValue *new_value; - - new_value = g_slice_new0 (GValue); - g_value_init (new_value, G_VALUE_TYPE (value)); - g_value_copy (value, new_value); - - return new_value; -} - -static void -ibus_g_value_free (GValue *value) -{ - g_value_unset (value); - g_slice_free (GValue, value); -} - -static gboolean -_g_value_serialize (GValue *value, - IBusMessageIter *iter) -{ - gboolean retval; - GType type; - - type = G_VALUE_TYPE (value); - g_return_val_if_fail (type != G_TYPE_INVALID, FALSE); - - - if (g_type_is_a (type, IBUS_TYPE_SERIALIZABLE)) { - IBusSerializable *object; - object = IBUS_SERIALIZABLE (g_value_get_object (value)); - retval = ibus_message_iter_append (iter, - type, - &object); - g_return_val_if_fail (retval, FALSE); - return TRUE; - } - - typedef const gchar *gstring; - switch (type) { -#define CASE_ENTRY(TYPE, _type, signature) \ - case G_TYPE_##TYPE: \ - { \ - g##_type v; \ - IBusMessageIter variant_iter; \ - \ - retval = ibus_message_iter_open_container (iter, \ - IBUS_TYPE_VARIANT, \ - signature, \ - &variant_iter); \ - g_return_val_if_fail (retval, FALSE); \ - \ - v = g_value_get_##_type (value); \ - retval = ibus_message_iter_append (&variant_iter, \ - G_TYPE_##TYPE, \ - &v); \ - g_return_val_if_fail (retval, FALSE); \ - \ - retval = ibus_message_iter_close_container (iter, &variant_iter); \ - g_return_val_if_fail (retval, FALSE); \ - \ - return TRUE; \ - } - CASE_ENTRY(CHAR, char, "y"); - CASE_ENTRY(BOOLEAN, boolean, "b"); - CASE_ENTRY(INT, int, "i"); - CASE_ENTRY(UINT, uint, "u"); - CASE_ENTRY(INT64, int64, "x"); - CASE_ENTRY(UINT64, uint64, "t"); - CASE_ENTRY(FLOAT, float, "d"); - CASE_ENTRY(DOUBLE, double, "d"); - CASE_ENTRY(STRING, string, "s"); -#undef CASE_ENTRY - } - - g_return_val_if_reached (FALSE); -} - -static GValue * -_g_value_deserialize (IBusMessageIter *iter) +ibus_serializable_destroy (IBusSerializable *serializable) { - IBusMessageIter variant_iter; - gboolean retval; - GValue *value = NULL; - GType type; - - retval = ibus_message_iter_recurse (iter, IBUS_TYPE_VARIANT, &variant_iter); - g_return_val_if_fail (retval, NULL); - - type = ibus_message_iter_get_arg_type (&variant_iter); - - if (type == IBUS_TYPE_STRUCT) { - IBusSerializable *object; - retval = ibus_message_iter_get (iter, IBUS_TYPE_SERIALIZABLE, &object); - g_return_val_if_fail (retval, NULL); - ibus_message_iter_next (iter); - - value = g_slice_new0 (GValue); - g_value_init (value, G_OBJECT_TYPE (object)); - g_value_take_object (value, object); - return value; - } - - typedef gchar *gstring; - switch (type) { -#define CASE_ENTRY(TYPE, _type) \ - case G_TYPE_##TYPE: \ - { \ - g##_type v; \ - ibus_message_iter_get_basic (&variant_iter, &v); \ - ibus_message_iter_next (&variant_iter); \ - value = g_slice_new0 (GValue); \ - g_value_init (value, G_TYPE_##TYPE); \ - g_value_set_##_type (value, v); \ - ibus_message_iter_next (iter); \ - return value; \ - } - CASE_ENTRY(CHAR, char); - CASE_ENTRY(BOOLEAN, boolean); - CASE_ENTRY(INT, int); - CASE_ENTRY(UINT, uint); - CASE_ENTRY(INT64, int64); - CASE_ENTRY(UINT64, uint64); - CASE_ENTRY(FLOAT, float); - CASE_ENTRY(DOUBLE, double); - CASE_ENTRY(STRING, string); - } - g_return_val_if_reached (NULL); + g_datalist_clear (&serializable->priv->attachments); + parent_class->destroy (IBUS_OBJECT (serializable)); } static void _serialize_cb (GQuark key, - GValue *value, - IBusMessageIter *iter) + GVariant *value, + GVariantBuilder *array) { - IBusMessageIter dict_entry; - gboolean retval; - const gchar *name; - - retval = ibus_message_iter_open_container (iter, - IBUS_TYPE_DICT_ENTRY, - NULL, - &dict_entry); - g_return_if_fail (retval); - name = g_quark_to_string (key); - retval = ibus_message_iter_append (&dict_entry, - G_TYPE_STRING, - &name); - g_return_if_fail (retval); - - retval = _g_value_serialize (value, &dict_entry); - g_return_if_fail (retval); - - retval = ibus_message_iter_close_container (iter, &dict_entry); - g_return_if_fail (retval); + g_variant_builder_add (array, "{sv}", + g_quark_to_string (key), g_variant_new_variant (value)); } static gboolean -ibus_serializable_real_serialize (IBusSerializable *object, - IBusMessageIter *iter) +ibus_serializable_real_serialize (IBusSerializable *serializable, + GVariantBuilder *builder) { - IBusSerializablePrivate *priv; - IBusMessageIter array_iter; - gboolean retval; - - priv = IBUS_SERIALIZABLE_GET_PRIVATE (object); - - retval = ibus_message_iter_open_container (iter, - IBUS_TYPE_ARRAY, - "{sv}", - &array_iter); - g_return_val_if_fail (retval, FALSE); + GVariantBuilder array; + g_variant_builder_init (&array, G_VARIANT_TYPE ("a{sv}")); - g_datalist_foreach (&priv->attachments, + g_datalist_foreach (&serializable->priv->attachments, (GDataForeachFunc) _serialize_cb, - &array_iter); - - retval = ibus_message_iter_close_container (iter, &array_iter); - g_return_val_if_fail (retval, FALSE); - + &array); + g_variant_builder_add (builder, "a{sv}", &array); return TRUE; } -static gboolean +static gint ibus_serializable_real_deserialize (IBusSerializable *object, - IBusMessageIter *iter) + GVariant *variant) { - IBusMessageIter array_iter; - gboolean retval; - - retval = ibus_message_iter_recurse (iter, - IBUS_TYPE_ARRAY, - &array_iter); - g_return_val_if_fail (retval, FALSE); - - while (ibus_message_iter_get_arg_type (&array_iter) != G_TYPE_INVALID) { - gchar *name; - GValue *value; - IBusMessageIter dict_entry; - - retval = ibus_message_iter_recurse (&array_iter, - IBUS_TYPE_DICT_ENTRY, - &dict_entry); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_get (&dict_entry, - G_TYPE_STRING, - &name); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (&dict_entry); - - value = _g_value_deserialize (&dict_entry); - g_return_val_if_fail (value != NULL, FALSE); - - ibus_serializable_set_attachment (object, name, value); - - ibus_message_iter_next (&array_iter); + const gchar *key; + GVariant *value; + GVariantIter *iter = NULL; + g_variant_get_child (variant, 1, "a{sv}", &iter); + while (g_variant_iter_loop (iter, "{&sv}", &key, &value)) { + GVariant *attachment = g_variant_get_variant (value); + ibus_serializable_set_attachment (object, + key, + attachment); + g_variant_unref (attachment); + g_variant_unref (value); } - - ibus_message_iter_next (iter); - - return TRUE; + g_variant_iter_free (iter); + return 2; } static void -_copy_cb (GQuark key, - GValue *value, - GData **datalist) +_copy_cb (GQuark key, + GVariant *value, + GData **datalist) { g_datalist_id_set_data_full (datalist, key, - ibus_g_value_dup (value), - (GDestroyNotify) ibus_g_value_free); + g_variant_ref (value), + (GDestroyNotify) g_variant_unref); } static gboolean @@ -388,75 +193,41 @@ ibus_serializable_real_copy (IBusSerializable *dest, return TRUE; } -gboolean -ibus_serializable_set_qattachment (IBusSerializable *object, +void +ibus_serializable_set_qattachment (IBusSerializable *serializable, GQuark key, - const GValue *value) + GVariant *value) { - g_return_val_if_fail (IBUS_IS_SERIALIZABLE (object), FALSE); - g_return_val_if_fail (key != 0, FALSE); - g_return_val_if_fail (G_IS_VALUE (value), FALSE); - - IBusSerializablePrivate *priv; - priv = IBUS_SERIALIZABLE_GET_PRIVATE (object); - - GType type = G_VALUE_TYPE (value); - - switch (type) { - case G_TYPE_CHAR: - case G_TYPE_INT: - case G_TYPE_INT64: - case G_TYPE_UINT: - case G_TYPE_UINT64: - case G_TYPE_BOOLEAN: - case G_TYPE_DOUBLE: - case G_TYPE_FLOAT: - case G_TYPE_STRING: - g_datalist_id_set_data_full (&priv->attachments, - key, - ibus_g_value_dup (value), - (GDestroyNotify) ibus_g_value_free); - return TRUE; - } - - if (g_type_is_a (type, IBUS_TYPE_SERIALIZABLE)) { - g_datalist_id_set_data_full (&priv->attachments, - key, - ibus_g_value_dup (value), - (GDestroyNotify) ibus_g_value_free); - return TRUE; - } + g_return_if_fail (IBUS_IS_SERIALIZABLE (serializable)); + g_return_if_fail (key != 0); - g_warning ("The value of %s is not support serializing", g_type_name (type)); - return FALSE; + g_datalist_id_set_data_full (&serializable->priv->attachments, + key, + value ? g_variant_ref_sink (value) : NULL, + (GDestroyNotify) g_variant_unref); } -const GValue * -ibus_serializable_get_qattachment (IBusSerializable *object, +GVariant * +ibus_serializable_get_qattachment (IBusSerializable *serializable, GQuark key) { - g_return_val_if_fail (IBUS_IS_SERIALIZABLE (object), NULL); + g_return_val_if_fail (IBUS_IS_SERIALIZABLE (serializable), NULL); g_return_val_if_fail (key != 0, NULL); - IBusSerializablePrivate *priv; - priv = IBUS_SERIALIZABLE_GET_PRIVATE (object); - - return (const GValue *) g_datalist_id_get_data (&priv->attachments, key); + return (GVariant *) g_datalist_id_get_data ( + &serializable->priv->attachments, key); } void -ibus_serializable_remove_qattachment (IBusSerializable *object, +ibus_serializable_remove_qattachment (IBusSerializable *serializable, GQuark key) { - g_return_if_fail (IBUS_IS_SERIALIZABLE (object)); + g_return_if_fail (IBUS_IS_SERIALIZABLE (serializable)); g_return_if_fail (key != 0); - IBusSerializablePrivate *priv; - priv = IBUS_SERIALIZABLE_GET_PRIVATE (object); - - g_datalist_id_remove_no_notify (&priv->attachments, key); + g_datalist_id_set_data (&serializable->priv->attachments, key, NULL); } IBusSerializable * @@ -480,92 +251,49 @@ ibus_serializable_copy (IBusSerializable *object) g_return_val_if_reached (NULL); } -gboolean -ibus_serializable_serialize (IBusSerializable *object, - IBusMessageIter *iter) +GVariant * +ibus_serializable_serialize (IBusSerializable *object) { g_return_val_if_fail (IBUS_IS_SERIALIZABLE (object), FALSE); - g_return_val_if_fail (iter != NULL, FALSE); - - IBusMessageIter variant_iter; - IBusMessageIter sub_iter; gboolean retval; - gchar *signature; - - signature = g_strdup_printf ("(s%s)", IBUS_SERIALIZABLE_GET_CLASS (object)->signature->str); - retval = ibus_message_iter_open_container (iter, - IBUS_TYPE_VARIANT, - signature, - &variant_iter); - g_free (signature); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_open_container (&variant_iter, - IBUS_TYPE_STRUCT, - NULL, - &sub_iter); - g_return_val_if_fail (retval, FALSE); + GVariantBuilder builder; + g_variant_builder_init (&builder, G_VARIANT_TYPE_TUPLE); - const gchar *type_name = g_type_name (G_OBJECT_TYPE (object)); - g_return_val_if_fail (type_name != NULL, FALSE); + g_variant_builder_add (&builder, "s", g_type_name (G_OBJECT_TYPE (object))); + retval = IBUS_SERIALIZABLE_GET_CLASS (object)->serialize (object, &builder); + g_assert (retval); - retval = ibus_message_iter_append (&sub_iter, - G_TYPE_STRING, - &type_name); - g_return_val_if_fail (retval, FALSE); - - retval = IBUS_SERIALIZABLE_GET_CLASS (object)->serialize (object, &sub_iter); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_close_container (&variant_iter, &sub_iter); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_close_container (iter, &variant_iter); - g_return_val_if_fail (retval, FALSE); - - return TRUE; + return g_variant_builder_end (&builder); } IBusSerializable * -ibus_serializable_deserialize (IBusMessageIter *iter) +ibus_serializable_deserialize (GVariant *variant) { - g_return_val_if_fail (iter != NULL, NULL); - - gboolean retval; - IBusMessageIter variant_iter; - IBusMessageIter sub_iter; - gchar *type_name; - GType type; - IBusSerializable *object; - - type = ibus_message_iter_get_arg_type (iter); - - if (type == IBUS_TYPE_VARIANT) { - retval = ibus_message_iter_recurse (iter, IBUS_TYPE_VARIANT, &variant_iter); - g_return_val_if_fail (retval, NULL); - - retval = ibus_message_iter_recurse (&variant_iter, IBUS_TYPE_STRUCT, &sub_iter); - g_return_val_if_fail (retval, NULL); - } - else if (type == IBUS_TYPE_STRUCT) { - retval = ibus_message_iter_recurse (iter, IBUS_TYPE_STRUCT, &sub_iter); - g_return_val_if_fail (retval, NULL); - } - else + g_return_val_if_fail (variant != NULL, NULL); + + GVariant *var = NULL; + switch (g_variant_classify (variant)) { + case G_VARIANT_CLASS_VARIANT: + var = g_variant_get_variant (variant); + break; + case G_VARIANT_CLASS_TUPLE: + var = g_variant_ref (variant); + break; + default: g_return_val_if_reached (NULL); + } - retval = ibus_message_iter_get (&sub_iter, G_TYPE_STRING, &type_name); - g_return_val_if_fail (retval, NULL); - ibus_message_iter_next (&sub_iter); - - type = g_type_from_name (type_name); + gchar *type_name = NULL; + g_variant_get_child (var, 0, "&s", &type_name); + GType type = g_type_from_name (type_name); g_return_val_if_fail (g_type_is_a (type, IBUS_TYPE_SERIALIZABLE), NULL); - object = g_object_new (type, NULL); + IBusSerializable *object = g_object_new (type, NULL); - retval = IBUS_SERIALIZABLE_GET_CLASS (object)->deserialize (object, &sub_iter); + gint retval = IBUS_SERIALIZABLE_GET_CLASS (object)->deserialize (object, var); + g_variant_unref (var); if (retval) return object; diff --git a/src/ibusserializable.h b/src/ibusserializable.h index 2e051f316..742aeb6a8 100644 --- a/src/ibusserializable.h +++ b/src/ibusserializable.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,13 +19,18 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusserializable * @short_description: A serializable object. * @stability: Stable * - * An IBusSerializable is an IBus object which can be serialized, that is, - * to be to and from an IBusMessage. + * An #IBusSerializable is an IBus object which can be serialized, that is, + * to be to and from a #GVariant. * * This class is to be extended by other class that requires serialization. * An extended class should overrides following methods: @@ -46,7 +52,6 @@ #define __IBUS_SERIALIZABLE_H_ #include "ibusobject.h" -#include "ibusmessage.h" /* * Type macros. @@ -80,22 +85,21 @@ /** * ibus_serializable_get_attachment: - * @o: An IBusSerializable. + * @o: An #IBusSerializable. * @k: String formatted key for indexing value. - * @v: Value to be attached. Should be also serializable. * - * Get a value from attachment of an IBusSerializable. + * Get a value from attachment of an #IBusSerializable. * This macro is an convenient wrapper of ibus_serializable_get_qattachment(). */ -#define ibus_serializable_get_attachment(o, k, v) \ +#define ibus_serializable_get_attachment(o, k) \ ibus_serializable_get_qattachment (o, g_quark_from_string (k)) /** * ibus_serializable_remove_attachment: - * @o: An IBusSerializable. + * @o: An #IBusSerializable. * @k: String formatted key for indexing value. * - * Remove a value from attachment of an IBusSerializable. + * Remove a value from attachment of an #IBusSerializable. * This macro is an convenient wrapper of ibus_serializable_remove_qattachment(). */ #define ibus_serializable_remove_attachment(o, k) \ @@ -105,6 +109,7 @@ G_BEGIN_DECLS typedef struct _IBusSerializable IBusSerializable; typedef struct _IBusSerializableClass IBusSerializableClass; +typedef struct _IBusSerializablePrivate IBusSerializablePrivate; /** * IBusSerializable: @@ -113,61 +118,61 @@ typedef struct _IBusSerializableClass IBusSerializableClass; * private to the #IBusSerializable and should never be accessed directly. */ struct _IBusSerializable { - GObject parent; - /* instance members */ - guint32 flags; + /*< private >*/ + IBusObject parent; + IBusSerializablePrivate *priv; + /* instance members */ }; /** * IBusSerializableSerializeFunc: - * @object: An IBusSerializable. - * @iter: An IBusMessageIter. - * @returns: TRUE if succeed; FALSE otherwise. + * @serializable: An #IBusSerializable. + * @builder: A #GVariantBuilder. + * @returns: %TRUE if succeed; %FALSE otherwise. * * Prototype of serialize function. - * Serialize function convert an IBusSerializable to IBusMessageIter. + * Serialize function convert an #IBusSerializable to #GVariantBuilder. * Returns a gboolean value which indicates whether the conversion is success. - * Return TRUE if succeed. + * Return %TRUE if succeed. */ -typedef gboolean (* IBusSerializableSerializeFunc) (IBusSerializable *object, - IBusMessageIter *iter); +typedef gboolean (* IBusSerializableSerializeFunc) (IBusSerializable *serializable, + GVariantBuilder *builder); /** * IBusSerializableDeserializeFunc: - * @object: An IBusSerializable. - * @iter: An IBusMessageIter. - * @returns: TRUE if succeed; FALSE otherwise. + * @serializable: An #IBusSerializable. + * @variant: A #GVariant contains a tuple. + * @returns: The number of values in the variant(tuple) are consumed. * * Prototype of deserialize function. - * Deserialize function convert an IBusMessageIter to IBusSerializable. - * Returns a gboolean value which indicates whether the conversion is success. + * Deserialize function convert a #GVariant to #IBusSerializable. + * Returns an integer value which indicates how many values in + * the variant(tuple) are consumed. */ -typedef gboolean (* IBusSerializableDeserializeFunc) (IBusSerializable *object, - IBusMessageIter *iter); +typedef gint (* IBusSerializableDeserializeFunc) (IBusSerializable *serializable, + GVariant *variant); /** * IBusSerializableCopyFunc: - * @dest: The destination IBusSerializable. - * @src: A source IBusMessageIter. - * @returns: TRUE if succeed; FALSE otherwise. + * @dest: The destination #IBusSerializable. + * @src: A source #IBusSerializable. + * @returns: %TRUE if succeed; %FALSE otherwise. * * Prototype of copy function. - * Copy function copy from source IBusSerializable to the destination one. + * Copy function copy from source #IBusSerializable to the destination one. * Returns a gboolean value which indicates whether the copying is success. */ typedef gboolean (* IBusSerializableCopyFunc) (IBusSerializable *dest, const IBusSerializable *src); struct _IBusSerializableClass { + /*< private >*/ IBusObjectClass parent; - /* signature */ - GString *signature; - /* virtual table */ gboolean (* serialize) (IBusSerializable *object, - IBusMessageIter *iter); - gboolean (* deserialize) (IBusSerializable *object, - IBusMessageIter *iter); + GVariantBuilder *builder); + gint (* deserialize) (IBusSerializable *object, + GVariant *variant); gboolean (* copy) (IBusSerializable *dest, const IBusSerializable *src); /*< private >*/ @@ -184,85 +189,82 @@ GType ibus_serializable_get_type (void); * * Returns: a new instance of #IBusSerializable. */ -IBusSerializable * ibus_serializable_new (void); +IBusSerializable *ibus_serializable_new (void); /** * ibus_serializable_set_qattachment: - * @object: An IBusSerializable. + * @serializable: An #IBusSerializable. * @key: String formatted key for indexing value. - * @value: Value to be attached. Should be also serializable. - * @returns: TRUE if succeed; FALSE otherwise. + * @value: Value to be attached or %NULL to remove any prevoius value. * - * Attach a value to an IBusSerializable. The value should be serializable as well. - * Basic type such as integer, string are deemed to be serializable. + * Attach a value to an #IBusSerializable. If the value is floating, + * the serializable will take the ownership. * - * @see_also: ibus_serializable_set_attachment(). + * See also: ibus_serializable_set_attachment(). */ -gboolean ibus_serializable_set_qattachment (IBusSerializable *object, +void ibus_serializable_set_qattachment (IBusSerializable *serializable, GQuark key, - const GValue *value); + GVariant *value); /** * ibus_serializable_get_qattachment: - * @object: An IBusSerializable. + * @serializable: An #IBusSerializable. * @key: String formatted key for indexing value. - * @returns: The attached value; or NULL if fail to retrieve the value. + * @returns: The attached value; or %NULL if fail to retrieve the value. * - * Get a value from attachment of an IBusSerializable. - * @see_also: ibus_serializable_set_attachment(). + * Get a value from attachment of an #IBusSerializable. + * See also: ibus_serializable_set_attachment(). */ -const GValue *ibus_serializable_get_qattachment (IBusSerializable *object, +GVariant *ibus_serializable_get_qattachment (IBusSerializable *serializable, GQuark key); /** * ibus_serializable_remove_qattachment: - * @object: An IBusSerializable. + * @serializable: An #IBusSerializable. * @key: String formatted key for indexing value. * - * Remove a value from attachment of an IBusSerializable. - * @see_also: ibus_serializable_remove_attachment(). + * Remove a value from attachment of an #IBusSerializable. + * See also: ibus_serializable_remove_attachment(). */ void ibus_serializable_remove_qattachment - (IBusSerializable *object, + (IBusSerializable *serializable, GQuark key); /** * ibus_serializable_copy: - * @object: An IBusSerializable. - * @returns: A newly allocated clone object; or NULL if @object is not serializable. + * @serializable: An #IBusSerializable. + * @returns: A newly allocated clone object; or %NULL if @object is not serializable. * - * Clone an IBusSerializable. + * Clone an #IBusSerializable. * The copy method should be implemented in extended class. * - * @see_also: IBusSerializableCopyFunc(). + * See also: IBusSerializableCopyFunc(). */ -IBusSerializable *ibus_serializable_copy (IBusSerializable *object); +IBusSerializable *ibus_serializable_copy (IBusSerializable *serializable); /** * ibus_serializable_serialize: - * @object: An IBusSerializable. - * @iter: An IBusMessageIter. - * @returns: TRUE if succeed; FALSE otherwise. + * @serializable: An #IBusSerializable. + * @returns: A #GVariant. * - * Serialize an IBusSerializable to an IBusMessageIter. + * Serialize an #IBusSerializable to a #GVariant. * The serialize method should be implemented in extended class. * - * @see_also: IBusSerializableCopyFunc(). + * See also: IBusSerializableCopyFunc(). */ -gboolean ibus_serializable_serialize (IBusSerializable *object, - IBusMessageIter *iter); +GVariant *ibus_serializable_serialize (IBusSerializable *serializable); /** * ibus_serializable_deserialize: - * @iter: An IBusMessageIter. - * @returns: The deserialized IBusSerializable. + * @variant: A #GVariant. + * @returns: The deserialized #IBusSerializable. * - * Deserialize an IBusMessageIter to an IBusSerializable/ + * Deserialize a #GVariant to an #IBusSerializable/ * The deserialize method should be implemented in extended class. * - * @see_also: IBusSerializableCopyFunc(). + * See also: IBusSerializableCopyFunc(). */ -IBusSerializable *ibus_serializable_deserialize (IBusMessageIter *iter); +IBusSerializable *ibus_serializable_deserialize (GVariant *variant); G_END_DECLS #endif diff --git a/src/ibusserver.c b/src/ibusserver.c deleted file mode 100644 index c2764571a..000000000 --- a/src/ibusserver.c +++ /dev/null @@ -1,339 +0,0 @@ -/* vim:set et sts=4: */ -/* ibus - The Input Bus - * Copyright (C) 2008-2010 Peng Huang - * Copyright (C) 2008-2010 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include "ibusmainloop.h" -#include "ibusserver.h" -#include "ibusinternal.h" - -#define IBUS_SERVER_GET_PRIVATE(o) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_SERVER, IBusServerPrivate)) -#define DECLARE_PRIV IBusServerPrivate *priv = IBUS_SERVER_GET_PRIVATE(server) - -enum { - NEW_CONNECTION, - LAST_SIGNAL, -}; - -enum { - PROP_0, - PROP_CONNECTION_TYPE, -}; - -/* IBusServerPriv */ -struct _IBusServerPrivate { - DBusServer *server; - GType connection_type; -}; -typedef struct _IBusServerPrivate IBusServerPrivate; - -static guint server_signals[LAST_SIGNAL] = { 0 }; - -/* functions prototype */ -static void ibus_server_destroy (IBusServer *server); -static void ibus_server_set_property(IBusServer *server, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void ibus_server_get_property(IBusServer *server, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static gboolean ibus_server_listen_internal - (IBusServer *server, - const gchar *address); -static void ibus_server_new_connection - (IBusServer *server, - IBusConnection *connection); - -G_DEFINE_TYPE (IBusServer, ibus_server, IBUS_TYPE_OBJECT) - -IBusServer * -ibus_server_new (void) -{ - IBusServer *server; - - server = IBUS_SERVER (g_object_new (IBUS_TYPE_SERVER, NULL)); - return server; -} - -gboolean -ibus_server_listen (IBusServer *server, - const gchar *address) -{ - g_assert (IBUS_IS_SERVER (server)); - g_assert (address != NULL); - - return ibus_server_listen_internal (server, address); -} - -static void -ibus_server_class_init (IBusServerClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); - - g_type_class_add_private (klass, sizeof (IBusServerPrivate)); - - gobject_class->set_property = (GObjectSetPropertyFunc) ibus_server_set_property; - gobject_class->get_property = (GObjectGetPropertyFunc) ibus_server_get_property; - - ibus_object_class->destroy = (IBusObjectDestroyFunc) ibus_server_destroy; - - klass->new_connection = ibus_server_new_connection; - - /* install properties */ - /** - * IBusServer:connection-type: - * - * The connection type of server object. - */ - g_object_class_install_property (gobject_class, - PROP_CONNECTION_TYPE, - g_param_spec_gtype ("connection-type", - "connection type", - "The connection type of server object", - IBUS_TYPE_CONNECTION, - G_PARAM_READWRITE)); - - /* install signals */ - /** - * IBusServer::new-connection: - * @server: An IBusServer. - * @connection: The corresponding IBusConnection. - * - * Emitted when a new connection is coming in. - * In this handler, IBus could add a reference and continue processing the connection. - * If no reference is added, the new connection will be released and closed after this signal. - * - * Argument @user_data is ignored in this function. - * - * See also: IBusNewConnectionFunc(). - */ - server_signals[NEW_CONNECTION] = - g_signal_new (I_("new-connection"), - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (IBusServerClass, new_connection), - NULL, NULL, - ibus_marshal_VOID__OBJECT, - G_TYPE_NONE, 1, - G_TYPE_OBJECT); -} - -static void -ibus_server_init (IBusServer *server) -{ - IBusServerPrivate *priv; - priv = IBUS_SERVER_GET_PRIVATE (server); - priv->server = NULL; - priv->connection_type = IBUS_TYPE_CONNECTION; -} - -static void -ibus_server_destroy (IBusServer *server) -{ - IBusServerPrivate *priv; - priv = IBUS_SERVER_GET_PRIVATE (server); - - if (priv->server) { - dbus_server_unref (priv->server); - priv->server = NULL; - } - - IBUS_OBJECT_CLASS(ibus_server_parent_class)->destroy (IBUS_OBJECT (server)); -} - -static void -ibus_server_set_property (IBusServer *server, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - IBusServerPrivate *priv; - priv = IBUS_SERVER_GET_PRIVATE (server); - - switch (prop_id) { - case PROP_CONNECTION_TYPE: - { - GType type; - type = g_value_get_gtype (value); - g_assert (g_type_is_a (type, IBUS_TYPE_CONNECTION)); - priv->connection_type = type; - break; - } - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (server, prop_id, pspec); - } -} - -static void -ibus_server_get_property (IBusServer *server, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - IBusServerPrivate *priv; - priv = IBUS_SERVER_GET_PRIVATE (server); - - switch (prop_id) { - case PROP_CONNECTION_TYPE: - g_value_set_gtype (value, priv->connection_type); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (server, prop_id, pspec); - } -} - -static void -ibus_server_new_connection (IBusServer *server, - IBusConnection *connection) -{ -} - -static void -_new_connection_cb (DBusServer *dbus_server, - DBusConnection *new_connection, - IBusServer *server) -{ - IBusServerPrivate *priv; - IBusConnection *connection; - - priv = IBUS_SERVER_GET_PRIVATE (server); - connection = IBUS_CONNECTION (g_object_new (priv->connection_type, NULL)); - ibus_connection_set_connection (connection, new_connection, FALSE); - - g_signal_emit (server, server_signals[NEW_CONNECTION], 0, connection); - - if (g_object_is_floating (connection)) { - /* release connection if it is still floating */ - g_object_unref (connection); - } -} - -static gboolean -ibus_server_listen_internal (IBusServer *server, - const gchar *address) -{ - g_assert (IBUS_IS_SERVER (server)); - g_assert (address != NULL); - - IBusServerPrivate *priv; - DBusError error; - - priv = IBUS_SERVER_GET_PRIVATE (server); - - g_assert (priv->server == NULL); - - dbus_error_init (&error); - priv->server = dbus_server_listen (address, &error); - - if (priv->server == NULL) { - g_warning ("Can not listen on '%s':\n" - " %s:%s", - address, error.name, error.message); - return FALSE; - } - - dbus_server_set_new_connection_function (priv->server, - (DBusNewConnectionFunction) _new_connection_cb, - server, NULL); - - dbus_server_set_auth_mechanisms (priv->server, NULL); - - ibus_dbus_server_setup (priv->server); - return TRUE; -} - -void -ibus_server_disconnect (IBusServer *server) -{ - g_assert (IBUS_IS_SERVER (server)); - - IBusServerPrivate *priv; - priv = IBUS_SERVER_GET_PRIVATE (server); - - g_assert (priv->server != NULL); - dbus_server_disconnect (priv->server); -} - -const gchar * -ibus_server_get_address (IBusServer *server) -{ - g_assert (IBUS_IS_SERVER (server)); - - gchar *address, *tmp; - IBusServerPrivate *priv; - priv = IBUS_SERVER_GET_PRIVATE (server); - - g_assert (priv->server != NULL); - - tmp = dbus_server_get_address (priv->server); - address = g_strdup (tmp); - dbus_free (tmp); - return address; -} - -const gchar * -ibus_server_get_id (IBusServer *server) -{ - g_assert (IBUS_IS_SERVER (server)); - - gchar *id, *tmp; - IBusServerPrivate *priv; - priv = IBUS_SERVER_GET_PRIVATE (server); - - g_assert (priv->server != NULL); - - tmp = dbus_server_get_id (priv->server); - id = g_strdup (tmp); - dbus_free (tmp); - return id; -} - -gboolean -ibus_server_is_connected (IBusServer *server) -{ - g_assert (IBUS_IS_SERVER (server)); - - IBusServerPrivate *priv; - priv = IBUS_SERVER_GET_PRIVATE (server); - - g_assert (priv->server != NULL); - - return dbus_server_get_is_connected (priv->server); -} - - -gboolean -ibus_server_set_auth_mechanisms (IBusServer *server, - const gchar **mechanisms) -{ - g_assert (IBUS_IS_SERVER (server)); - - IBusServerPrivate *priv; - priv = IBUS_SERVER_GET_PRIVATE (server); - - g_assert (priv->server != NULL); - - return dbus_server_set_auth_mechanisms (priv->server, mechanisms); -} - diff --git a/src/ibusserver.h b/src/ibusserver.h deleted file mode 100644 index 08d21d0e2..000000000 --- a/src/ibusserver.h +++ /dev/null @@ -1,190 +0,0 @@ -/* vim:set et sts=4: */ -/* ibus - The Input Bus - * Copyright (C) 2008-2010 Peng Huang - * Copyright (C) 2008-2010 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ -/** - * SECTION: ibusserver - * @short_description: Server that listen on a socket and wait for connection requests. - * @stability: Stable - * - * An IBusServer listen on a socket and wait for connections requests, - * just like DBusServer. - */ -#ifndef __IBUS_SERVER_H_ -#define __IBUS_SERVER_H_ - -#include "ibusobject.h" -#include "ibusconnection.h" - -/* - * Type macros. - */ - -/* define GOBJECT macros */ -#define IBUS_TYPE_SERVER \ - (ibus_server_get_type ()) -#define IBUS_SERVER(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_SERVER, IBusServer)) -#define IBUS_SERVER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_SERVER, IBusServerClass)) -#define IBUS_IS_SERVER(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_SERVER)) -#define IBUS_IS_SERVER_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_SERVER)) -#define IBUS_SERVER_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_SERVER, IBusServerClass)) - -G_BEGIN_DECLS - -typedef struct _IBusServer IBusServer; -typedef struct _IBusServerClass IBusServerClass; -/** - * IBusNewConnectionFunc: - * @server: An IBusServer. - * @connection: The corresponding IBusConnection. - * - * Prototype of new connection callback function. - * - * This callback should be connected to signal ::new-connection - * to handle the event that a new connection is coming in. - * In this handler, IBus could add a reference and continue processing the connection. - * If no reference is added, the new connection will be released and closed after this signal. - * - * @see_also: ::new-connection - */ - -typedef void (* IBusNewConnectionFunc) (IBusServer *server, IBusConnection *connection); - -/** - * IBusServer: - * - * An opaque object representing an IBusServer. - */ -struct _IBusServer { - IBusObject parent; - /* instance members */ -}; - -struct _IBusServerClass { - IBusObjectClass parent; - - /* signals */ - void (* new_connection) (IBusServer *server, - IBusConnection *connectin); - /*< private >*/ - /* padding */ - gpointer pdummy[7]; -}; - -GType ibus_server_get_type (void); - -/** - * ibus_server_new: - * @returns: A newly allocated IBusServer instance. - * - * New an IBusServer. - */ -IBusServer *ibus_server_new (void); - -/** - * ibus_server_listen: - * @server: An IBusServer. - * @address: Address of this server. - * @returns: TRUE if succeed ; FALSE otherwise. - * - * Listens for new connections on the given address. - * - * If there are multiple semicolon-separated address entries in the address, - * tries each one and listens on the first one that works. - * - * Returns FALSE if listening fails for any reason. - * - * To free the server, applications must call first ibus_server_disconnect() and then dbus_server_unref(). - */ -gboolean ibus_server_listen (IBusServer *server, - const gchar *address); - -/** - * ibus_server_disconnect: - * @server: An IBusServer. - * - * Releases the server's address and stops listening for new clients. - * - * If called more than once, only the first call has an effect. Does not modify the server's reference count. - */ -void ibus_server_disconnect (IBusServer *server); - -/** - * ibus_server_get_address: - * @server: An IBusServer. - * @returns: A newly allocated string which contain address. - * - * Returns the address of the server, as a newly-allocated string which must be freed by the caller. - */ -const gchar *ibus_server_get_address (IBusServer *server); - -/** - * ibus_server_get_id: - * @server: An IBusServer. - * @returns: A newly allocated string which contain address. - * - * Returns the unique ID of the server, as a newly-allocated string which must be freed by the caller. - * - * This ID is normally used by clients to tell when two IBusConnection would be equivalent - * (because the server address passed to ibus_connection_open() will have the same guid in the two cases). - * ibus_connection_open() can re-use an existing connection with the same ID instead of opening a new connection. - * - * This is an ID unique to each IBusServer. Remember that an IBusServer represents only one mode of connecting, - * so e.g. a bus daemon can listen on multiple addresses which will mean it has multiple IBusServer each with - * their own ID. - * - * The ID is not a UUID in the sense of RFC4122; the details are explained in the D-Bus specification. - * Returns the address of the server, as a newly-allocated string which must be freed by the caller. - */ -const gchar *ibus_server_get_id (IBusServer *server); - -/** - * ibus_server_is_connected: - * @server: An IBusServer. - * @returns: TRUE if the server is still listening for new connections; FALSE otherwise. - * - * Returns TRUE if the server is still listening for new connections. - */ -gboolean ibus_server_is_connected (IBusServer *server); - -/** - * ibus_server_set_auth_mechanisms: - * @server: An IBusServer. - * @mechanisms: NULL-terminated array of mechanisms. - * @returns: TRUE if succeed; FALSE if insufficient memory. - * - * Sets the authentication mechanisms that this server offers to clients, - * as a NULL-terminated array of mechanism names. - * - * This function only affects connections created after it is called. - * Pass NULL instead of an array to use all available mechanisms (this is the default behavior). - * - * The D-Bus specification describes some of the supported mechanisms. - */ -gboolean ibus_server_set_auth_mechanisms(IBusServer *server, - const gchar **mechanisms); - -G_END_DECLS -#endif - diff --git a/src/ibusservice.c b/src/ibusservice.c index 431b965fd..e94feda57 100644 --- a/src/ibusservice.c +++ b/src/ibusservice.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,7 +19,6 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ -#include #include "ibusservice.h" #include "ibusinternal.h" @@ -26,169 +26,268 @@ (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_SERVICE, IBusServicePrivate)) enum { - IBUS_MESSAGE, - IBUS_SIGNAL, - LAST_SIGNAL, + LAST_SIGNAL }; enum { PROP_0, - PROP_PATH + PROP_OBJECT_PATH, + PROP_CONNECTION, }; -/* IBusServicePriv */ +/* IBusServicePrivate */ struct _IBusServicePrivate { - gchar *path; - GList *connections; + gchar *object_path; + GDBusConnection *connection; + GHashTable *table; + gboolean constructed; }; -typedef struct _IBusServicePrivate IBusServicePrivate; -static guint service_signals[LAST_SIGNAL] = { 0 }; +/* +static guint service_signals[LAST_SIGNAL] = { 0 }; +*/ /* functions prototype */ -static void ibus_service_destroy (IBusService *service); -static void ibus_service_set_property (IBusService *service, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void ibus_service_get_property (IBusService *service, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static gboolean ibus_service_ibus_message (IBusService *service, - IBusConnection *connection, - IBusMessage *message); -static gboolean ibus_service_ibus_signal (IBusService *service, - IBusConnection *connection, - IBusMessage *message); - -G_DEFINE_TYPE (IBusService, ibus_service, IBUS_TYPE_OBJECT) +static void ibus_service_base_init (IBusServiceClass *class); +static void ibus_service_base_fini (IBusServiceClass *class); +static void ibus_service_class_init (IBusServiceClass *class); +static void ibus_service_init (IBusService *service); +static void ibus_service_constructed (GObject *object); +static void ibus_service_set_property (IBusService *service, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void ibus_service_get_property (IBusService *service, + guint prop_id, + GValue *value, + GParamSpec *pspec); +static void ibus_service_destroy (IBusService *service); +static void ibus_service_service_method_call + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation + *invocation); +static GVariant *ibus_service_service_get_property + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error); +static gboolean ibus_service_service_set_property + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error); +static void ibus_service_service_method_call_cb + (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation + *invocation, + IBusService *service); +static GVariant *ibus_service_service_get_property_cb + (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error, + IBusService *service); +static gboolean ibus_service_service_set_property_cb + (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error, + IBusService *service); +static void ibus_service_connection_closed_cb + (GDBusConnection *connection, + gboolean remote_peer_vanished, + GError *error, + IBusService *service); +static void ibus_service_unregister_cb (GDBusConnection *connection, + guint *ids, + IBusService *service); + +static const GDBusInterfaceVTable ibus_service_interface_vtable = { + (GDBusInterfaceMethodCallFunc) ibus_service_service_method_call_cb, + (GDBusInterfaceGetPropertyFunc) ibus_service_service_get_property_cb, + (GDBusInterfaceSetPropertyFunc) ibus_service_service_set_property_cb +}; -IBusService * -ibus_service_new (const gchar *path) +static IBusObjectClass *ibus_service_parent_class = NULL; + +GType +ibus_service_get_type (void) { - GObject *obj; - obj = g_object_new (IBUS_TYPE_SERVICE, - "path", path, - NULL); - return IBUS_SERVICE (obj); + static GType type = 0; + + static const GTypeInfo type_info = { + sizeof (IBusServiceClass), + (GBaseInitFunc) ibus_service_base_init, + (GBaseFinalizeFunc) ibus_service_base_fini, + (GClassInitFunc) ibus_service_class_init, + NULL, /* class finialize */ + NULL, /* class data */ + sizeof (IBusService), + 0, + (GInstanceInitFunc) ibus_service_init, + }; + + if (type == 0) { + type = g_type_register_static (IBUS_TYPE_OBJECT, + "IBusService", + &type_info, + 0); + } + + return type; +} + +static void +ibus_service_base_init (IBusServiceClass *class) +{ + GArray *old = class->interfaces; + class->interfaces = g_array_new (TRUE, TRUE, sizeof (GDBusInterfaceInfo *)); + if (old != NULL) { + GDBusInterfaceInfo **p = (GDBusInterfaceInfo **)old->data; + while (*p != NULL) { + g_array_append_val (class->interfaces, *p++); + } + } +} + +static void +ibus_service_base_fini (IBusServiceClass *class) +{ + GDBusInterfaceInfo **interfaces = (GDBusInterfaceInfo **) g_array_free (class->interfaces, FALSE); + GDBusInterfaceInfo **p = interfaces; + while (*p != NULL) { + g_dbus_interface_info_unref (*p++); + } + g_free (interfaces); } +static const gchar introspection_xml[] = + "" + " " + " " + " " + ""; + static void -ibus_service_class_init (IBusServiceClass *klass) +ibus_service_class_init (IBusServiceClass *class) { - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); + GObjectClass *gobject_class = G_OBJECT_CLASS (class); + IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (class); - g_type_class_add_private (klass, sizeof (IBusServicePrivate)); + ibus_service_parent_class = IBUS_OBJECT_CLASS (g_type_class_peek_parent (class)); + gobject_class->constructed = ibus_service_constructed; gobject_class->set_property = (GObjectSetPropertyFunc) ibus_service_set_property; gobject_class->get_property = (GObjectGetPropertyFunc) ibus_service_get_property; - ibus_object_class->destroy = (IBusObjectDestroyFunc) ibus_service_destroy; + ibus_object_class->destroy = (IBusObjectDestroyFunc) ibus_service_destroy; - klass->ibus_message = ibus_service_ibus_message; - klass->ibus_signal = ibus_service_ibus_signal; + /* virtual functions */ + class->service_method_call = ibus_service_service_method_call; + class->service_get_property = ibus_service_service_get_property; + class->service_set_property = ibus_service_service_set_property; + + /* class members */ + ibus_service_class_add_interfaces (class, introspection_xml); /* install properties */ /** - * IBusService:path: + * IBusService:object-path: * * The path of service object. */ g_object_class_install_property ( gobject_class, - PROP_PATH, + PROP_OBJECT_PATH, g_param_spec_string ( - "path", + "object-path", "object path", "The path of service object", NULL, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY) + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB) ); - - /* Install signals */ /** - * IBusService::ibus-message: - * @service: An IBusService. - * @connection: Corresponding IBusConnection. - * @message: An IBusMessage to be sent. - * - * Send a message as IBusMessage though the @connection. + * IBusService:connection: * - * Returns: TRUE if succeed; FALSE otherwise. - * Argument @user_data is ignored in this function. + * The connection of service object. */ - service_signals[IBUS_MESSAGE] = - g_signal_new (I_("ibus-message"), - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (IBusServiceClass, ibus_message), - NULL, NULL, - ibus_marshal_BOOLEAN__POINTER_POINTER, - G_TYPE_BOOLEAN, - 2, - G_TYPE_POINTER, - G_TYPE_POINTER); - - /** - * IBusService::ibus-signal: - * @service: An IBusService. - * @connection: Corresponding IBusConnection. - * @message: An IBusMessage to be sent. - * - * Send a signal as IBusMessage though the @connection. - * - * Returns: TRUE if succeed; FALSE otherwise. - * Argument @user_data is ignored in this function. - */ - service_signals[IBUS_SIGNAL] = - g_signal_new (I_("ibus-signal"), - G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (IBusServiceClass, ibus_signal), - NULL, NULL, - ibus_marshal_BOOLEAN__POINTER_POINTER, - G_TYPE_BOOLEAN, - 2, - G_TYPE_POINTER, - G_TYPE_POINTER); + g_object_class_install_property ( + gobject_class, + PROP_CONNECTION, + g_param_spec_object ( + "connection", + "connection", + "The connection of service object", + G_TYPE_DBUS_CONNECTION, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB) + ); + g_type_class_add_private (class, sizeof (IBusServicePrivate)); } static void ibus_service_init (IBusService *service) { - IBusServicePrivate *priv; - priv = IBUS_SERVICE_GET_PRIVATE (service); - - priv->path = NULL; - priv->connections = NULL; + service->priv = IBUS_SERVICE_GET_PRIVATE (service); + service->priv->table = g_hash_table_new (NULL, NULL); } static void -ibus_service_destroy (IBusService *service) +ibus_service_constructed (GObject *object) { - IBusServicePrivate *priv; - priv = IBUS_SERVICE_GET_PRIVATE (service); - - ibus_service_remove_from_all_connections (service); - - g_free (priv->path); - priv->path = NULL; - - IBUS_OBJECT_CLASS(ibus_service_parent_class)->destroy (IBUS_OBJECT (service)); + IBusService *service = (IBusService *)object; + if (service->priv->connection) { + GError *error = NULL; + if (!ibus_service_register (service, service->priv->connection, &error)) { + g_warning ("%s", error->message); + g_error_free (error); + } + } + service->priv->constructed = TRUE; } static void -ibus_service_set_property (IBusService *service, - guint prop_id, const GValue *value, GParamSpec *pspec) +ibus_service_set_property (IBusService *service, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { - IBusServicePrivate *priv; - priv = IBUS_SERVICE_GET_PRIVATE (service); - switch (prop_id) { - case PROP_PATH: - priv->path = g_strdup (g_value_get_string (value)); + case PROP_OBJECT_PATH: + service->priv->object_path = g_value_dup_string (value); + break; + case PROP_CONNECTION: + service->priv->connection = g_value_dup_object (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (service, prop_id, pspec); @@ -197,204 +296,331 @@ ibus_service_set_property (IBusService *service, static void ibus_service_get_property (IBusService *service, - guint prop_id, GValue *value, GParamSpec *pspec) + guint prop_id, + GValue *value, + GParamSpec *pspec) { switch (prop_id) { - case PROP_PATH: - g_value_set_string (value, ibus_service_get_path (service)); + case PROP_OBJECT_PATH: + g_value_set_string (value, service->priv->object_path); + break; + case PROP_CONNECTION: + g_value_set_object (value, service->priv->connection); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (service, prop_id, pspec); } } -const gchar * -ibus_service_get_path (IBusService *service) +static void +ibus_service_destroy (IBusService *service) { - g_assert (IBUS_IS_SERVICE (service)); + g_free (service->priv->object_path); + service->priv->object_path = NULL; + + if (service->priv->connection) { + g_object_unref (service->priv->connection); + service->priv->connection = NULL; + } - IBusServicePrivate *priv; - priv = IBUS_SERVICE_GET_PRIVATE (service); + if (service->priv->table) { + g_hash_table_foreach_remove (service->priv->table, + (GHRFunc)ibus_service_unregister_cb, service); + g_hash_table_destroy (service->priv->table); + service->priv->table = NULL; + } - return priv->path; + IBUS_OBJECT_CLASS(ibus_service_parent_class)->destroy (IBUS_OBJECT (service)); } -gboolean -ibus_service_handle_message (IBusService *service, - IBusConnection *connection, - IBusMessage *message) + +static void +ibus_service_service_method_call (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation) { - gboolean retval = FALSE; - g_return_val_if_fail (message != NULL, FALSE); + if (g_strcmp0 (method_name, "Destroy") == 0) { + g_dbus_method_invocation_return_value (invocation, NULL); + ibus_object_destroy ((IBusObject *)service); + return; + } - g_signal_emit (service, service_signals[IBUS_MESSAGE], 0, connection, message, &retval); - return retval; + g_dbus_method_invocation_return_error (invocation, + G_DBUS_ERROR, + G_DBUS_ERROR_UNKNOWN_METHOD, + "%s::%s", interface_name, method_name); + return; } -static gboolean -ibus_service_ibus_message (IBusService *service, - IBusConnection *connection, - IBusMessage *message) +static GVariant * +ibus_service_service_get_property (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error) { - if (ibus_message_is_method_call (message, "", "Destroy")) { - IBusMessage *reply; - reply = ibus_message_new_method_return (message); - ibus_connection_send (connection, reply); - ibus_message_unref (reply); - return TRUE; - } - return FALSE; + return NULL; } static gboolean -ibus_service_ibus_signal (IBusService *service, - IBusConnection *connection, - IBusMessage *message) +ibus_service_service_set_property (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error) { return FALSE; } - -gboolean -_service_message_function (IBusConnection *connection, - IBusMessage *message, - IBusService *service) +static void +ibus_service_service_method_call_cb (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation *invocation, + IBusService *service) { - return ibus_service_handle_message (service, connection, message); + IBUS_SERVICE_GET_CLASS (service)->service_method_call (service, + connection, + sender, + object_path, + interface_name, + method_name, + parameters, + invocation); } -static void -_connection_destroy_cb (IBusConnection *connection, IBusService *service) +static GVariant * +ibus_service_service_get_property_cb (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error, + IBusService *service) { - g_assert (IBUS_IS_CONNECTION (connection)); - g_assert (IBUS_IS_SERVICE (service)); - - ibus_service_remove_from_connection (service, connection); + return IBUS_SERVICE_GET_CLASS (service)->service_get_property (service, + connection, + sender, + object_path, + interface_name, + property_name, + error); } -gboolean -ibus_service_add_to_connection (IBusService *service, IBusConnection *connection) +static gboolean +ibus_service_service_set_property_cb (GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error, + IBusService *service) { - g_assert (IBUS_IS_SERVICE (service)); - g_assert (IBUS_IS_CONNECTION (connection)); - - gboolean retval; - IBusServicePrivate *priv; - priv = IBUS_SERVICE_GET_PRIVATE (service); - - g_return_val_if_fail (priv->path != NULL, FALSE); - g_return_val_if_fail (g_list_find (priv->connections, connection) == NULL, FALSE); + return IBUS_SERVICE_GET_CLASS (service)->service_set_property (service, + connection, + sender, + object_path, + interface_name, + property_name, + value, + error); +} - g_object_ref_sink (connection); +static void +ibus_service_connection_closed_cb (GDBusConnection *connection, + gboolean remote_peer_vanished, + GError *error, + IBusService *service) +{ + ibus_service_unregister (service, connection); + if (connection == service->priv->connection) { + ibus_object_destroy ((IBusObject *) service); + } +} - retval = ibus_connection_register_object_path (connection, priv->path, - (IBusMessageFunc) _service_message_function, service); - if (!retval) { - g_object_unref (connection); - return FALSE; +static void +ibus_service_unregister_cb (GDBusConnection *connection, + guint *ids, + IBusService *service) +{ + guint *p = ids; + while (*p != 0) { + g_dbus_connection_unregister_object (connection, *p++); } + g_signal_handlers_disconnect_by_func (connection, + G_CALLBACK (ibus_service_connection_closed_cb), service); + g_object_unref (connection); + g_free (ids); +} - priv->connections = g_list_append (priv->connections, connection); - g_signal_connect (connection, - "destroy", - (GCallback) _connection_destroy_cb, - service); +IBusService * +ibus_service_new (GDBusConnection *connection, + const gchar *object_path) +{ + g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL); + g_return_val_if_fail (object_path != NULL, NULL); - return retval; + GObject *obj = g_object_new (IBUS_TYPE_SERVICE, + "object-path", object_path, + "connection", connection, + NULL); + return IBUS_SERVICE (obj); } -GList * -ibus_service_get_connections (IBusService *service) +const gchar * +ibus_service_get_object_path (IBusService *service) { - g_assert (IBUS_IS_SERVICE (service)); - - IBusServicePrivate *priv; - priv = IBUS_SERVICE_GET_PRIVATE (service); + g_return_val_if_fail (IBUS_IS_SERVICE (service), NULL); + return service->priv->object_path; +} - return g_list_copy (priv->connections); +GDBusConnection * +ibus_service_get_connection (IBusService *service) +{ + g_return_val_if_fail (IBUS_IS_SERVICE (service), NULL); + return service->priv->connection; } gboolean -ibus_service_remove_from_connection (IBusService *service, IBusConnection *connection) +ibus_service_register (IBusService *service, + GDBusConnection *connection, + GError **error) { g_return_val_if_fail (IBUS_IS_SERVICE (service), FALSE); - g_return_val_if_fail (IBUS_IS_CONNECTION (connection), FALSE); + g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), FALSE); + g_return_val_if_fail (connection != service->priv->connection || service->priv->constructed == FALSE, FALSE); + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + GArray *array = NULL; + + if (g_hash_table_lookup (service->priv->table, connection)) { + if (error) { + *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_OBJECT_PATH_IN_USE, + "Service %p has been registered with connection %p.", + service, connection); + } + goto error_out; + } - IBusServicePrivate *priv; - priv = IBUS_SERVICE_GET_PRIVATE (service); + GDBusInterfaceInfo **p = (GDBusInterfaceInfo **)IBUS_SERVICE_GET_CLASS (service)->interfaces->data; + if (*p == NULL) { + if (error) { + *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_FAILED, + "Service %p does not have any interface.", + service); + } + goto error_out; + } - g_assert (priv->path != NULL); - g_assert (g_list_find (priv->connections, connection) != NULL); + array = g_array_new (TRUE, TRUE, sizeof (guint)); + while (*p != NULL) { + guint id = g_dbus_connection_register_object (connection, + service->priv->object_path, + *p, + &ibus_service_interface_vtable, + g_object_ref (service), + (GDestroyNotify)g_object_unref, + error); + if (id != 0) { + g_array_append_val (array, id); + } + else { + g_object_unref (service); + goto error_out; + } + p++; + } - gboolean retval; - retval = ibus_connection_unregister_object_path (connection, priv->path); + g_signal_connect (connection, "closed", + G_CALLBACK (ibus_service_connection_closed_cb), service); + g_hash_table_insert (service->priv->table, + g_object_ref (connection), g_array_free (array, FALSE)); + return TRUE; - if (!retval) { - return FALSE; +error_out: + if (array != NULL) { + guint *ids = (guint*) array->data; + while (*ids != 0) { + g_dbus_connection_unregister_object (connection, *ids++); + } + g_array_free (array, TRUE); } + return FALSE; +} - g_signal_handlers_disconnect_by_func (connection, - (GCallback) _connection_destroy_cb, - service); - priv->connections = g_list_remove (priv->connections, connection); - g_object_unref (connection); +void +ibus_service_unregister (IBusService *service, + GDBusConnection *connection) +{ + g_return_if_fail (IBUS_IS_SERVICE (service)); + g_return_if_fail (G_IS_DBUS_CONNECTION (connection)); - return TRUE; + guint *ids = (guint *) g_hash_table_lookup (service->priv->table, connection); + g_return_if_fail (ids != NULL); + + g_hash_table_remove (service->priv->table, connection); + ibus_service_unregister_cb (connection, ids, service); } gboolean -ibus_service_remove_from_all_connections (IBusService *service) +ibus_service_emit_signal (IBusService *service, + const gchar *dest_bus_name, + const gchar *interface_name, + const gchar *signal_name, + GVariant *parameters, + GError **error) { g_return_val_if_fail (IBUS_IS_SERVICE (service), FALSE); - - IBusServicePrivate *priv; - priv = IBUS_SERVICE_GET_PRIVATE (service); - - GList *element = priv->connections; - while (element != NULL) { - IBusConnection *connection = IBUS_CONNECTION (element->data); - - gboolean retval; - retval = ibus_connection_unregister_object_path (connection, priv->path); - - g_signal_handlers_disconnect_by_func (connection, - (GCallback) _connection_destroy_cb, - service); - g_object_unref (connection); - element = element->next; - } - - g_list_free (priv->connections); - priv->connections = NULL; - return TRUE; + g_return_val_if_fail (interface_name != NULL, FALSE); + g_return_val_if_fail (signal_name != NULL, FALSE); + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + g_return_val_if_fail (service->priv->connection != NULL, FALSE); + + return g_dbus_connection_emit_signal (service->priv->connection, + dest_bus_name, + service->priv->object_path, + interface_name, + signal_name, + parameters, + error); } gboolean -ibus_service_send_signal (IBusService *service, - const gchar *interface, - const gchar *name, - GType first_arg_type, - ...) +ibus_service_class_add_interfaces (IBusServiceClass *class, + const gchar *xml_data) { - g_assert (IBUS_IS_SERVICE (service)); - g_assert (name != NULL); - - gboolean retval; - va_list args; - GList *p; - - IBusServicePrivate *priv; - priv = IBUS_SERVICE_GET_PRIVATE (service); - - for (p = priv->connections; p != NULL; p = p->next) { - va_start (args, first_arg_type); - retval = ibus_connection_send_signal_valist ((IBusConnection *) p->data, - priv->path, - interface, - name, - first_arg_type, - args); - va_end (args); + g_return_val_if_fail (IBUS_IS_SERVICE_CLASS (class), FALSE); + g_return_val_if_fail (xml_data != NULL, FALSE); + + GError *error = NULL; + GDBusNodeInfo *introspection_data = g_dbus_node_info_new_for_xml (xml_data, &error); + if (introspection_data == NULL) { + g_warning ("%s", error->message); + g_error_free (error); + return FALSE; + } + else { + GDBusInterfaceInfo **p = introspection_data->interfaces; + while (*p != NULL) { + g_dbus_interface_info_ref (*p); + g_array_append_val (class->interfaces, *p); + p++; + } + // g_dbus_node_info_unref (introspection_data); + return TRUE; } - return retval; } diff --git a/src/ibusservice.h b/src/ibusservice.h index d0ef86805..94f9bb7a6 100644 --- a/src/ibusservice.h +++ b/src/ibusservice.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusservice * @short_description: IBus service back-end. @@ -29,8 +35,8 @@ #ifndef __IBUS_SERVICE_H_ #define __IBUS_SERVICE_H_ +#include #include "ibusobject.h" -#include "ibusconnection.h" /* * Type macros. @@ -54,6 +60,7 @@ G_BEGIN_DECLS typedef struct _IBusService IBusService; typedef struct _IBusServiceClass IBusServiceClass; +typedef struct _IBusServicePrivate IBusServicePrivate; /** * IBusService: @@ -61,49 +68,49 @@ typedef struct _IBusServiceClass IBusServiceClass; * An opaque data type representing an IBusService. */ struct _IBusService { + /*< private >*/ IBusObject parent; - /* instance members */ + IBusServicePrivate *priv; }; -/** - * ServiceIBusMessageFunc: - * @service: An IBsService. - * @connection: Connection to IBus daemon. - * @message: IBusMessage to be sent. - * @returns: %TRUE if succeed; %FALSE if failed. - * - * Prototype of IBus service message sending callback function. - */ -typedef gboolean (* ServiceIBusMessageFunc) (IBusService *service, - IBusConnection *connection, - IBusMessage *message); - -/** - * ServiceIBusSignalFunc: - * @service: An IBsService. - * @connection: Connection to IBus daemon. - * @message: IBusMessage to be sent. - * @returns: %TRUE if succeed; %FALSE if failed. - * - * Prototype of IBus service signal sending callback function. - */ -typedef gboolean (* ServiceIBusSignalFunc) (IBusService *service, - IBusConnection *connection, - IBusMessage *message); - struct _IBusServiceClass { + /*< private >*/ IBusObjectClass parent; - /* signals */ - gboolean (* ibus_message) (IBusService *service, - IBusConnection *connection, - IBusMessage *message); - gboolean (* ibus_signal) (IBusService *service, - IBusConnection *connection, - IBusMessage *message); + /*< public >*/ + /* virtual functions */ + void (* service_method_call) + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *method_name, + GVariant *parameters, + GDBusMethodInvocation + *invocation); + GVariant * (* service_get_property) + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GError **error); + gboolean (* service_set_property) + (IBusService *service, + GDBusConnection *connection, + const gchar *sender, + const gchar *object_path, + const gchar *interface_name, + const gchar *property_name, + GVariant *value, + GError **error); /*< private >*/ + GArray *interfaces; + /* padding */ - gpointer pdummy[6]; + gpointer pdummy[4]; }; @@ -116,74 +123,49 @@ GType ibus_service_get_type (void); * * New an IBusService. */ -IBusService *ibus_service_new (const gchar *path); - +IBusService *ibus_service_new (GDBusConnection *connection, + const gchar *path); /** - * ibus_service_get_path: + * ibus_service_get_object_path: * @service: An IBusService. * @returns: The object path of @service * * Returns the object path of an IBusService. */ -const gchar *ibus_service_get_path (IBusService *service); +const gchar *ibus_service_get_object_path (IBusService *service); /** - * ibus_service_handle_message: + * ibus_service_get_connection: * @service: An IBusService. - * @connection: Corresponding IBusCOnnection - * @message: IBusMessage to be handled. - * @returns: TRUE if succeed; FALSE otherwise. + * @returns: (transfer none): A #GDBusConnection of an #IBusService instance. * - * Emit an IBusMessage on an IBusConnection. + * Returns a connections. */ -gboolean ibus_service_handle_message (IBusService *service, - IBusConnection *connection, - IBusMessage *message); +GDBusConnection *ibus_service_get_connection (IBusService *service); /** - * ibus_service_add_to_connection: + * ibus_service_register: * @service: An IBusService. - * @connection: Corresponding IBusCOnnection - * @returns: TRUE if succeed; FALSE otherwise. + * @connection: A GDBusConnection the service will be registered to. + * @error: Return location for error or NULL. + * @returns: TRUE if the service was registered, FALSE otherwise. * - * Add an IBus Service to an IBusConnection. - * This function also connects the service to the signal IBusConnection::destroy of the connection. + * Registers service to a connection. */ -gboolean ibus_service_add_to_connection (IBusService *service, - IBusConnection *connection); - +gboolean ibus_service_register (IBusService *service, + GDBusConnection *connection, + GError **error); /** - * ibus_service_get_connections: + * ibus_service_unregister: * @service: An IBusService. - * @returns: (transfer container) (element-type IBusConnection): A newly allocated list of connections. + * @connection: A GDBusConnection the service was registered with. * - * Returns a copy of list of connections, but the caller does not own the element. + * Unregisters service from a connection. */ -GList *ibus_service_get_connections (IBusService *service); +void ibus_service_unregister (IBusService *service, + GDBusConnection *connection); -/** - * ibus_service_remove_from_connection: - * @service: An IBusService. - * @connection: Corresponding IBusCOnnection - * @returns: TRUE if succeed; FALSE otherwise. - * - * Remove an IBusService from an IBusConnection. - * This function also disconnects the signal IBusConnection::destroy. - */ -gboolean ibus_service_remove_from_connection - (IBusService *service, - IBusConnection *connection); -/** - * ibus_service_remove_from_all_connections: - * @service: An IBusService. - * @returns: TRUE if succeed; FALSE otherwise. - * - * Remove an IBusService from all connections. - * This function also disconnects the signal IBusConnection::destroy. - */ -gboolean ibus_service_remove_from_all_connections - (IBusService *service); /** * ibus_service_send_signal: @@ -196,13 +178,26 @@ gboolean ibus_service_remove_from_all_connections * * Send signal to all the IBusConnections of an IBusService. * - * @see_also: ibus_connection_send_signal() + * @see_also: g_dbus_connection_emit_signal() + */ +gboolean ibus_service_emit_signal (IBusService *service, + const gchar *dest_bus_name, + const gchar *interface_name, + const gchar *signal_name, + GVariant *parameters, + GError **error); +/** + * ibus_service_class_add_interfaces: + * @klass: An IBusServiceClass. + * @xml_data: The introspection xml data. + * + * Set the interface introspection information with the service class. */ -gboolean ibus_service_send_signal (IBusService *service, - const gchar *interface, - const gchar *name, - GType first_arg_type, - ...); +gboolean ibus_service_class_add_interfaces + (IBusServiceClass *klass, + const gchar *xml_data); + + G_END_DECLS #endif diff --git a/src/ibusshare.c b/src/ibusshare.c index 194b51092..9215369b9 100644 --- a/src/ibusshare.c +++ b/src/ibusshare.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -19,16 +20,17 @@ * Boston, MA 02111-1307, USA. */ +#include "ibusshare.h" #include #include #include +#include #include #include #include #include #include -#include -#include "ibusshare.h" +#include static gchar *_display = NULL; @@ -38,9 +40,18 @@ ibus_get_local_machine_id (void) static gchar *machine_id = NULL; if (machine_id == NULL) { - gchar *id = dbus_get_local_machine_id (); - machine_id = g_strdup (id); - dbus_free (id); + GError *error = NULL; + if (!g_file_get_contents ("/var/lib/dbus/machine-id", + &machine_id, + NULL, + &error)) { + g_warning ("Unable to load /var/lib/dbus/machine-id: %s", error->message); + g_error_free (error); + machine_id = "machine-id"; + } + else { + g_strstrip (machine_id); + } } return machine_id; @@ -132,9 +143,14 @@ ibus_get_socket_path (void) gchar *hostname = "unix"; gchar *display; gchar *displaynumber = "0"; - gchar *screennumber = "0"; + /* gchar *screennumber = "0"; */ gchar *p; + path = g_strdup (g_getenv ("IBUS_ADDRESS_FILE")); + if (path != NULL) { + return path; + } + if (_display == NULL) { display = g_strdup (g_getenv ("DISPLAY")); } @@ -161,7 +177,8 @@ ibus_get_socket_path (void) if (*p == '.') { *p = '\0'; p++; - screennumber = p; + /* Do not use screennumber + screennumber = p; */ } } @@ -183,6 +200,27 @@ ibus_get_socket_path (void) return path; } +gint +ibus_get_timeout (void) +{ + /* 6000 ms is the default timeout on the ibus-daemon side (5 sec) plus 1. */ + static const gint default_timeout = 6000; + + static gint64 timeout = -2; + if (timeout == -2) { + const gchar *timeout_str = g_getenv ("IBUS_TIMEOUT"); + if (timeout_str == NULL) { + timeout = default_timeout; + } else { + timeout = g_ascii_strtoll(timeout_str, NULL, 10); + if (timeout < -1 || timeout == 0 || timeout > G_MAXINT) { + timeout = default_timeout; + } + } + } + return timeout; +} + const gchar * ibus_get_address (void) { @@ -197,7 +235,7 @@ ibus_get_address (void) address = NULL; } - /* get address from evn variable */ + /* get address from env variable */ address = g_strdup (g_getenv ("IBUS_ADDRESS")); if (address) { return address; @@ -285,6 +323,13 @@ void ibus_init (void) { g_type_init (); + IBUS_ERROR; + IBUS_TYPE_TEXT; + IBUS_TYPE_ATTRIBUTE; + IBUS_TYPE_ATTR_LIST; + IBUS_TYPE_LOOKUP_TABLE; + IBUS_TYPE_COMPONENT; + IBUS_TYPE_ENGINE_DESC; } static GMainLoop *main_loop = NULL; @@ -307,3 +352,58 @@ ibus_quit (void) g_main_loop_quit (main_loop); } } + +static gboolean ibus_log_handler_is_verbose = FALSE; +static guint ibus_log_handler_id = 0; + +static void +ibus_log_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data) +{ + // In the quiet mode (i.e. not verbose), we'll ignore DEBUG and + // WARNING messages. + if (!ibus_log_handler_is_verbose && + ((log_level & G_LOG_LEVEL_DEBUG) || + (log_level & G_LOG_LEVEL_WARNING))) { + return; + } + // Add timing info like "17:34:57.680038" (hour, min, sec, microsecond). + struct timeval time_val; + gettimeofday (&time_val, NULL); + struct tm local_time; + localtime_r (&time_val.tv_sec, &local_time); + char* new_message = + g_strdup_printf ("%02d:%02d:%02d.%6d: %s", + local_time.tm_hour, + local_time.tm_min, + local_time.tm_sec, + (int)time_val.tv_usec, + message); + g_log_default_handler (log_domain, log_level, new_message, user_data); + g_free (new_message); +} + +void +ibus_set_log_handler (gboolean verbose) +{ + if (ibus_log_handler_id != 0) { + g_log_remove_handler (G_LOG_DOMAIN, ibus_log_handler_id); + } + + ibus_log_handler_is_verbose = verbose; + ibus_log_handler_id = g_log_set_handler (G_LOG_DOMAIN, + G_LOG_LEVEL_MASK, + ibus_log_handler, + NULL); +} + +void +ibus_unset_log_handler (void) +{ + if (ibus_log_handler_id != 0) { + g_log_remove_handler (G_LOG_DOMAIN, ibus_log_handler_id); + ibus_log_handler_id = 0; + } +} diff --git a/src/ibusshare.h b/src/ibusshare.h index c33a372b3..4ff41289b 100644 --- a/src/ibusshare.h +++ b/src/ibusshare.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusshare * @short_description: Shared utility functions and definition. @@ -182,7 +188,7 @@ void ibus_set_display (const gchar *display); * Socket file under ~/.config/ibus/bus/ * * - * @see_also: ibus_write_address(). + * See also: ibus_write_address(). */ const gchar *ibus_get_address (void); @@ -192,7 +198,7 @@ const gchar *ibus_get_address (void); * * Write D-Bus address to socket file. * - * @see_also: ibus_get_address(). + * See also: ibus_get_address(). */ void ibus_write_address (const gchar *address); @@ -234,24 +240,13 @@ glong ibus_get_daemon_uid (void) G_GNUC_DEPRECATED; const gchar *ibus_get_socket_path (void); /** - * ibus_keyval_name: - * @keyval: Key symbol. - * @returns: Corresponding key name. %NULL if no such key symbol. - * - * Return the name of a key symbol. - * - * Note that the returned string is used internally, so don't free it. - */ -const gchar *ibus_keyval_name (guint keyval); - -/** - * ibus_keyval_from_name: - * @keyval_name: Key name in #gdk_keys_by_name. - * @returns: Corresponding key symbol. + * ibus_get_timeout: + * @returns: A GDBus timeout in milliseconds. -1 when default timeout for GDBus should be used. * - * Return the key symbol that associate with the key name. + * Get the GDBus timeout in milliseconds. The timeout is for clients (e.g. im-ibus.so), not for ibus-daemon. + * Note that the timeout for ibus-daemon could be set by --timeout command line option of the daemon. */ -guint ibus_keyval_from_name (const gchar *keyval_name); +gint ibus_get_timeout (void); /** * ibus_free_strv: @@ -307,7 +302,7 @@ void ibus_init (void); * * Runs an IBus main loop until ibus_quit() is called in the loop. * - * @see_also: ibus_quit(). + * See also: ibus_quit(). */ void ibus_main (void); @@ -317,9 +312,34 @@ void ibus_main (void); * Stops an IBus from running. * * Any calls to ibus_quit() for the loop will return. - * @see_also: ibus_main(). + * See also: ibus_main(). */ void ibus_quit (void); +/** + * ibus_set_log_handler: + * @verbose: TRUE for verbose logging. + * + * Sets GLIB's log handler to ours. Our log handler adds time info + * including hour, minute, second, and microsecond, like: + * + * (ibus-daemon:7088): IBUS-DEBUG: 18:06:45.822819: ibus-daemon started + * + * If @verbose is %TRUE, all levels of messages will be logged. Otherwise, + * DEBUG and WARNING messages will be ignored. The function is used in + * ibus-daemon, but can be useful for IBus client programs as well for + * debugging. It's totally fine for not calling this function. If you + * don't set a custom GLIB log handler, the default GLIB log handler will + * be used. + */ +void ibus_set_log_handler (gboolean verbose); + +/** + * ibus_unset_log_handler: + * + * Remove the log handler which is set by ibus_set_log_handler. + */ +void ibus_unset_log_handler (void); + G_END_DECLS #endif diff --git a/src/ibustext.c b/src/ibustext.c index 78d5d054b..e5218d048 100644 --- a/src/ibustext.c +++ b/src/ibustext.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -23,29 +24,27 @@ /* functions prototype */ static void ibus_text_destroy (IBusText *text); static gboolean ibus_text_serialize (IBusText *text, - IBusMessageIter *iter); -static gboolean ibus_text_deserialize (IBusText *text, - IBusMessageIter *iter); + GVariantBuilder *builder); +static int ibus_text_deserialize (IBusText *text, + GVariant *variant); static gboolean ibus_text_copy (IBusText *dest, const IBusText *src); G_DEFINE_TYPE (IBusText, ibus_text, IBUS_TYPE_SERIALIZABLE) static void -ibus_text_class_init (IBusTextClass *klass) +ibus_text_class_init (IBusTextClass *class) { - IBusObjectClass *object_class = IBUS_OBJECT_CLASS (klass); - IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (klass); + IBusObjectClass *object_class = IBUS_OBJECT_CLASS (class); + IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (class); - ibus_text_parent_class = (IBusSerializableClass *) g_type_class_peek_parent (klass); + ibus_text_parent_class = (IBusSerializableClass *) g_type_class_peek_parent (class); object_class->destroy = (IBusObjectDestroyFunc) ibus_text_destroy; serializable_class->serialize = (IBusSerializableSerializeFunc) ibus_text_serialize; serializable_class->deserialize = (IBusSerializableDeserializeFunc) ibus_text_deserialize; serializable_class->copy = (IBusSerializableCopyFunc) ibus_text_copy; - - g_string_append (serializable_class->signature, "sv"); } static void @@ -74,57 +73,47 @@ ibus_text_destroy (IBusText *text) static gboolean ibus_text_serialize (IBusText *text, - IBusMessageIter *iter) + GVariantBuilder *builder) { gboolean retval; retval = IBUS_SERIALIZABLE_CLASS (ibus_text_parent_class)->serialize ( - (IBusSerializable *)text, iter); + (IBusSerializable *)text, builder); g_return_val_if_fail (retval, FALSE); - retval = ibus_message_iter_append (iter, G_TYPE_STRING, &text->text); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (builder, "s", text->text); if (text->attrs == NULL) { text->attrs = ibus_attr_list_new (); g_object_ref_sink (text->attrs); } - - retval = ibus_message_iter_append (iter, IBUS_TYPE_ATTR_LIST, &text->attrs); - g_return_val_if_fail (retval, FALSE); + g_variant_builder_add (builder, "v", ibus_serializable_serialize ((IBusSerializable *)text->attrs)); return TRUE; } -static gboolean -ibus_text_deserialize (IBusText *text, - IBusMessageIter *iter) +static gint +ibus_text_deserialize (IBusText *text, + GVariant *variant) { - gboolean retval; - gchar *str; - + gint retval; retval = IBUS_SERIALIZABLE_CLASS (ibus_text_parent_class)->deserialize ( - (IBusSerializable *)text, iter); - g_return_val_if_fail (retval, FALSE); - - retval = ibus_message_iter_get (iter, G_TYPE_STRING, &str); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); + (IBusSerializable *)text, variant); + if (text->is_static == FALSE) + g_free (text->text); + g_variant_get_child (variant, retval++, "s", &text->text); text->is_static = FALSE; - text->text = g_strdup (str); - if (text->attrs) { + if (text->attrs) g_object_unref (text->attrs); - text->attrs = NULL; - } - retval = ibus_message_iter_get (iter, IBUS_TYPE_ATTR_LIST, &text->attrs); + GVariant *var = g_variant_get_child_value (variant, retval++); + text->attrs = IBUS_ATTR_LIST (ibus_serializable_deserialize (var)); + g_variant_unref (var); g_object_ref_sink (text->attrs); - g_return_val_if_fail (retval, FALSE); - ibus_message_iter_next (iter); - return TRUE; + return retval; } static gboolean @@ -171,16 +160,10 @@ ibus_text_new_from_ucs4 (const gunichar *str) { g_assert (str); - IBusText *text; - gchar *buf; + gchar *buf = g_ucs4_to_utf8 (str, -1, NULL, NULL, NULL); + g_return_val_if_fail (buf != NULL, NULL); - buf = g_ucs4_to_utf8 (str, -1, NULL, NULL, NULL); - - if (buf == NULL) { - return NULL; - } - - text= g_object_new (IBUS_TYPE_TEXT, NULL); + IBusText *text= g_object_new (IBUS_TYPE_TEXT, NULL); text->is_static = FALSE; text->text = buf; @@ -217,8 +200,7 @@ ibus_text_new_from_printf (const gchar *format, str = g_strdup_vprintf (format, args); va_end (args); - if (str == NULL) - return NULL; + g_return_val_if_fail (str != NULL, NULL); text= g_object_new (IBUS_TYPE_TEXT, NULL); text->is_static = FALSE; @@ -233,9 +215,7 @@ ibus_text_new_from_unichar (gunichar c) IBusText *text; gint len; - if (!g_unichar_validate (c)) { - return NULL; - } + g_return_val_if_fail (g_unichar_validate (c), NULL); text= g_object_new (IBUS_TYPE_TEXT, NULL); @@ -279,3 +259,31 @@ ibus_text_get_length (IBusText *text) { return g_utf8_strlen (text->text, -1); } + +gboolean +ibus_text_get_is_static (IBusText *text) +{ + return text->is_static; +} + +const gchar * +ibus_text_get_text (IBusText *text) +{ + return text->text; +} + +IBusAttrList * +ibus_text_get_attributes (IBusText *text) +{ + return text->attrs; +} + +void +ibus_text_set_attributes (IBusText *text, + IBusAttrList *attrs) +{ + if (text->attrs) + g_object_unref (text->attrs); + text->attrs = attrs; + g_object_ref_sink (text->attrs); +} diff --git a/src/ibustext.h b/src/ibustext.h index 476e9575f..cff913146 100644 --- a/src/ibustext.h +++ b/src/ibustext.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* IBus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibustext * @short_description: Text with decorating information. @@ -104,7 +110,7 @@ IBusText *ibus_text_new_from_string (const gchar *str); IBusText *ibus_text_new_from_ucs4 (const gunichar *str); /** - * ibus_text_new_from_static_string: + * ibus_text_new_from_static_string: (skip) * @str: An text string to be set. * @returns: A newly allocated IBusText. * @@ -126,7 +132,7 @@ IBusText *ibus_text_new_from_static_string (const gchar *str); * The result of printf expression is stored in the new IBusText instance. */ IBusText *ibus_text_new_from_printf (const gchar *fmt, - ...); + ...) G_GNUC_PRINTF (1, 2); /** * ibus_text_new_from_unichar: @@ -163,6 +169,42 @@ void ibus_text_append_attribute (IBusText *text, */ guint ibus_text_get_length (IBusText *text); +/** + * ibus_text_get_is_static: (skip) + * @text: An IBusText. + * @returns: the is_static in @text. + * + * Return the is_static in an IBusText. + */ +gboolean ibus_text_get_is_static (IBusText *text); + +/** + * ibus_text_get_text: + * @text: An IBusText. + * @returns: the text in @text. + * + * Return the text in an IBusText. Should not be freed. + */ +const gchar * ibus_text_get_text (IBusText *text); + +/** + * ibus_text_get_attributes: + * @text: An IBusText. + * @returns: (transfer none): the attrs in @text. + * + * Return the attributes in an IBusText. Should not be freed. + */ +IBusAttrList * ibus_text_get_attributes (IBusText *text); + +/** + * ibus_text_set_attributes: + * @text: An IBusText. + * @attrs: An IBusAttrList + */ +void ibus_text_set_attributes (IBusText *text, + IBusAttrList *attrs); + + G_END_DECLS #endif diff --git a/src/ibustypes.h b/src/ibustypes.h index 583b5344e..d916265a9 100644 --- a/src/ibustypes.h +++ b/src/ibustypes.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* ibus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibustypes * @short_description: Generic types for IBus. @@ -137,6 +143,60 @@ typedef enum { IBUS_ORIENTATION_SYSTEM = 2, } IBusOrientation; +/** + * IBusBusNameFlag: + * @IBUS_BUS_NAME_FLAG_ALLOW_REPLACEMENT: + * same as DBUS_NAME_FLAG_ALLOW_REPLACEMENT + * @IBUS_BUS_NAME_FLAG_REPLACE_EXISTING: + * same as DBUS_NAME_FLAG_REPLACE_EXISTING + * @IBUS_BUS_NAME_FLAG_DO_NOT_QUEUE: + * same as DBUS_NAME_FLAG_DO_NOT_QUEUE + */ +typedef enum { + IBUS_BUS_NAME_FLAG_ALLOW_REPLACEMENT = (1 << 0), + IBUS_BUS_NAME_FLAG_REPLACE_EXISTING = (1 << 1), + IBUS_BUS_NAME_FLAG_DO_NOT_QUEUE = (1 << 2), +} IBusBusNameFlag; + +/** + * IBusBusRequestNameReply: + * @IBUS_BUS_REQUEST_NAME_REPLY_PRIMARY_OWNER: + * same as DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER + * @IBUS_BUS_REQUEST_NAME_REPLY_IN_QUEUE: + * same as DBUS_REQUEST_NAME_REPLY_IN_QUEUE + * @IBUS_BUS_REQUEST_NAME_REPLY_EXISTS: + * same as DBUS_REQUEST_NAME_REPLY_EXISTS + * @IBUS_BUS_REQUEST_NAME_REPLY_ALREADY_OWNER: + * same as DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER + */ +typedef enum { + IBUS_BUS_REQUEST_NAME_REPLY_PRIMARY_OWNER = 1, + IBUS_BUS_REQUEST_NAME_REPLY_IN_QUEUE = 2, + IBUS_BUS_REQUEST_NAME_REPLY_EXISTS = 3, + IBUS_BUS_REQUEST_NAME_REPLY_ALREADY_OWNER = 4, +} IBusBusRequestNameReply; + +/** + * IBusBusStartServiceByNameReply: + * @IBUS_BUS_START_REPLY_SUCCESS: + * same as DBUS_START_REPLY_SUCCESS + * @IBUS_BUS_START_REPLY_ALREADY_RUNNING: + * same as DBUS_START_REPLY_ALREADY_RUNNING + */ +typedef enum { + IBUS_BUS_START_REPLY_SUCCESS = 1, + IBUS_BUS_START_REPLY_ALREADY_RUNNING = 2, +} IBusBusStartServiceByNameReply; + +/** + * IBusError: + * @IBUS_ERROR_NO_ENGINE: + * There is no engine associated with input context. + */ +typedef enum { + IBUS_ERROR_NO_ENGINE, +} IBusError; + /** * IBusRectangle: * @x: x coordinate. diff --git a/src/ibusutil.c b/src/ibusutil.c new file mode 100644 index 000000000..d0bbd52aa --- /dev/null +++ b/src/ibusutil.c @@ -0,0 +1,155 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* bus - The Input Bus + * Copyright (C) 2008-2011 Peng Huang + * Copyright (C) 2010-2011 Takao Fujiwara + * Copyright (C) 2008-2011 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include "ibusxml.h" + +#ifdef ENABLE_NLS +#include +#endif + +/* gettext macro */ +#define N_(t) t + +static GHashTable *__languages_dict; + +static gboolean +_iso_codes_parse_xml_node (XMLNode *node) +{ + GList *p; + g_assert (node); + + if (G_UNLIKELY (g_strcmp0 (node->name, "iso_639_entries") != 0)) { + return FALSE; + } + + for (p = node->sub_nodes; p != NULL; p = p->next) { + XMLNode *sub_node = (XMLNode *)p->data; + gchar **attributes = NULL; + int i, j; + struct { + const gchar *key; + gchar *value; + } entries[] = { + { "iso_639_2B_code", NULL }, + { "iso_639_2T_code", NULL }, + { "iso_639_1_code", NULL }, + }; + + if (sub_node->attributes == NULL) { + continue; + } + + attributes = sub_node->attributes; + for (i = 0; attributes[i]; i += 2) { + if (g_strcmp0 (attributes[i], "name") == 0) { + for (j = 0; j < G_N_ELEMENTS (entries); j++) { + if (entries[j].value == NULL) + continue; + g_hash_table_insert (__languages_dict, + (gpointer) g_strdup (entries[j].value), + (gpointer) g_strdup (attributes[i + 1])); + entries[j].value = NULL; + } + } else { + for (j = 0; j < G_N_ELEMENTS (entries); j++) { + if (g_strcmp0 (attributes[i], entries[j].key) == 0 && + attributes[i + 1] != NULL) { + entries[j].value = attributes[i + 1]; + } + } + } + } + } + + return TRUE; +} + +void +_load_lang() +{ + gchar *filename; + XMLNode *node; + struct stat buf; + + __languages_dict = g_hash_table_new_full (g_str_hash, + g_str_equal, g_free, g_free); + filename = g_build_filename (ISOCODES_PREFIX, + "share/xml/iso-codes/iso_639.xml", + NULL); + if (g_stat (filename, &buf) != 0) { + g_warning ("Can not get stat of file %s", filename); + g_free (filename); + return; + } + + node = ibus_xml_parse_file (filename); + g_free (filename); + + if (!node) { + return; + } + + _iso_codes_parse_xml_node (node); + ibus_xml_free (node); +} + +const gchar * +ibus_get_language_name(const gchar *_locale) { + const gchar *retval; + gchar *p = NULL; + gchar *lang = NULL; + + if (__languages_dict == NULL ) { + _load_lang(); + } + if ((p = strchr (_locale, '_')) != NULL) { + p = g_strndup (_locale, p - _locale); + } else { + p = g_strdup (_locale); + } + lang = g_ascii_strdown (p, -1); + g_free (p); + retval = (const gchar *) g_hash_table_lookup (__languages_dict, lang); + g_free (lang); + if (retval != NULL) { +#ifdef ENABLE_NLS + return dgettext("iso_639", retval); +#else + return retval; +#endif + } + else { +#ifdef ENABLE_NLS + return dgettext("iso_639", N_("Other")); +#else + return N_("Other"); +#endif + } +} diff --git a/src/ibusutil.h b/src/ibusutil.h new file mode 100644 index 000000000..7cf199582 --- /dev/null +++ b/src/ibusutil.h @@ -0,0 +1,46 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* bus - The Input Bus + * Copyright (C) 2008-2011 Peng Huang + * Copyright (C) 2010-2011 Takao Fujiwara + * Copyright (C) 2008-2011 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + +/** + * SECTION: ibusutil + * @short_description: Utilities with C-Language. + * @stability: Unstable + * + * Utilized functions are available for miscellaneous purposes. + */ + +#ifndef __IBUS_UTIL_H_ +#define __IBUS_UTIL_H_ + +/** + * ibus_get_language_name: + * @_locale: A const locale name. + * @returns: language name + */ +const gchar * ibus_get_language_name (const gchar *_locale); + +#endif diff --git a/src/ibusversion.h.in b/src/ibusversion.h.in index 98b87207c..ac94143a2 100644 --- a/src/ibusversion.h.in +++ b/src/ibusversion.h.in @@ -35,21 +35,21 @@ * * IBus major version. */ -#define IBUS_MAJOR_VERSION (@PACKAGE_VERSION_MAJOR@) +#define IBUS_MAJOR_VERSION (@IBUS_MAJOR_VERSION@) /** * IBUS_MINOR_VERSION: * * IBus minor version. */ -#define IBUS_MINOR_VERSION (@PACKAGE_VERSION_MINOR@) +#define IBUS_MINOR_VERSION (@IBUS_MINOR_VERSION@) /** * IBUS_MICRO_VERSION: * * IBus micro version. */ -#define IBUS_MICRO_VERSION (@PACKAGE_VERSION_MICRO@) +#define IBUS_MICRO_VERSION (@IBUS_MICRO_VERSION@) /** * IBUS_CHECK_VERSION: diff --git a/src/ibusxml.c b/src/ibusxml.c index 8baea4463..89d009ebe 100644 --- a/src/ibusxml.c +++ b/src/ibusxml.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -33,8 +34,7 @@ ibus_xml_free (XMLNode *node) g_strfreev (node->attributes); - g_list_foreach (node->sub_nodes, (GFunc) ibus_xml_free, NULL); - g_list_free (node->sub_nodes); + g_list_free_full (node->sub_nodes, (GDestroyNotify) ibus_xml_free); g_slice_free (XMLNode, node); } @@ -114,7 +114,7 @@ _end_element_cb (GMarkupParseContext *context, XMLNode *p = (XMLNode *) g_markup_parse_context_pop (context); if (p->text && p->sub_nodes) { - g_debug ("Error"); + g_warning ("Error"); } if (p->text == NULL && p->sub_nodes == NULL) { @@ -175,7 +175,7 @@ static GMarkupParser parser = { XMLNode * ibus_xml_parse_file (const gchar *filename) { - gboolean retval; + gboolean retval = FALSE; GError *error = NULL; FILE *pf = fopen (filename, "r"); diff --git a/src/ibusxml.h b/src/ibusxml.h index ec0b2266e..ff5e65e03 100644 --- a/src/ibusxml.h +++ b/src/ibusxml.h @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* vim:set et sts=4: */ /* bus - The Input Bus * Copyright (C) 2008-2010 Peng Huang @@ -18,6 +19,11 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ + +#if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) +#error "Only can be included directly" +#endif + /** * SECTION: ibusxml * @short_description: XML handling functions for IBus. diff --git a/src/python/ibus.py b/src/python/ibus.py index 539b9e903..7736058d8 100644 --- a/src/python/ibus.py +++ b/src/python/ibus.py @@ -4,7 +4,6 @@ Bus, \ Component, \ Config, \ - Connection, \ Engine, \ EngineDesc, \ Factory, \ @@ -18,6 +17,5 @@ Property, \ Proxy, \ Serializable, \ - Server, \ Service, \ Text diff --git a/src/python/test.py b/src/python/test.py index dd0ec2fde..626271d95 100644 --- a/src/python/test.py +++ b/src/python/test.py @@ -1,5 +1,7 @@ import ibus bus = ibus.Bus() -ibus.Engine.new("pinyin", "/aa", bus.get_connection()) -for e in bus.list_engines(): - print e.name +if not bus.is_connected(): + print "Can not connect to ibus-daemon" +else: + for e in bus.list_engines(): + print e.get_name() diff --git a/src/test-attribute.c b/src/test-attribute.c deleted file mode 100644 index b2ab4e5f6..000000000 --- a/src/test-attribute.c +++ /dev/null @@ -1,44 +0,0 @@ -#include "ibus.h" -#include "stdio.h" - -int main() -{ - g_type_init (); - IBusAttrList *list; - IBusMessage *message; - gboolean retval; - IBusError *error; - - list = ibus_attr_list_new (); - ibus_attr_list_append (list, ibus_attribute_new (1, 1, 1, 2)); - ibus_attr_list_append (list, ibus_attribute_new (2, 1, 1, 2)); - ibus_attr_list_append (list, ibus_attribute_new (3, 1, 1, 2)); - ibus_attr_list_append (list, ibus_attribute_new (3, 1, 1, 2)); - - message = ibus_message_new_signal ("/org/freedesktop/IBus", - "org.freedesktop.IBus", - "Test"); - - IBusSerializable *p = ibus_serializable_new (); - retval = ibus_message_append_args (message, - IBUS_TYPE_SERIALIZABLE, &p, - IBUS_TYPE_SERIALIZABLE, &p, - IBUS_TYPE_SERIALIZABLE, &p, - IBUS_TYPE_SERIALIZABLE, &p, - IBUS_TYPE_SERIALIZABLE, &p, - G_TYPE_INVALID); - g_assert (retval); - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_SERIALIZABLE, &p, - IBUS_TYPE_SERIALIZABLE, &p, - IBUS_TYPE_SERIALIZABLE, &p, - IBUS_TYPE_SERIALIZABLE, &p, - IBUS_TYPE_SERIALIZABLE, &p, - G_TYPE_INVALID); - g_assert (retval); - - return 0; - -} diff --git a/src/test-bus.c b/src/test-bus.c deleted file mode 100644 index b5f4a6b2f..000000000 --- a/src/test-bus.c +++ /dev/null @@ -1,101 +0,0 @@ -#include -#include "ibus.h" - -static gchar * -get_last_engine_id (const GList *engines) -{ - g_assert (engines); - const char *result = NULL; - for (; engines; engines = g_list_next (engines)) { - IBusEngineDesc *engine_desc = IBUS_ENGINE_DESC (engines->data); - g_assert (engine_desc); - result = engine_desc->name; - } - g_assert (result); - return g_strdup (result); -} - -static void -print_engines (const GList *engines) -{ - g_assert (engines); - for (; engines; engines = g_list_next (engines)) { - IBusEngineDesc *engine_desc = IBUS_ENGINE_DESC (engines->data); - g_assert (engine_desc); - g_debug ("%s (id:%s, icon:%s)", engine_desc->longname, engine_desc->name, engine_desc->icon); - g_object_unref (engine_desc); - } -} - -int main() -{ - g_type_init (); - - IBusBus *bus; - GList *engines; - gchar *active_engine_name; - - bus = ibus_bus_new (); - - /* Test ibusbus.c */ - g_debug ("===== Active engines:"); - engines = ibus_bus_list_active_engines (bus); - g_assert (engines); - active_engine_name = get_last_engine_id (engines); - print_engines (engines); - g_list_free (engines); - - g_debug ("===== All engines:"); - engines = ibus_bus_list_engines (bus); - g_assert (engines); - print_engines (engines); - g_list_free (engines); - - g_debug ("===== Global engine:"); - if (ibus_bus_get_use_global_engine (bus)) { - g_debug ("use_global_engine is true."); - if (ibus_bus_is_global_engine_enabled (bus)) { - g_debug ("Global engine is enabled."); - IBusEngineDesc *global_engine = ibus_bus_get_global_engine (bus); - g_assert (global_engine); - g_debug ("%s (id:%s, icon:%s)", global_engine->longname, - global_engine->name, global_engine->icon); - g_object_unref (global_engine); - } - } - - g_debug ("===== Use system layout:%s", ibus_bus_get_use_sys_layout (bus) ? "true" : "false"); - - g_debug ("Test ibusbus.c: passed."); - - /* Test ibusinputcontext.c */ -#if 1 - { - IBusInputContext *context; - IBusEngineDesc *engine_desc; - gchar *current_ic; - context = ibus_bus_create_input_context (bus, "test"); - ibus_input_context_set_capabilities (context, IBUS_CAP_FOCUS); - ibus_input_context_disable (context); - g_assert (ibus_input_context_is_enabled (context) == FALSE); - ibus_input_context_enable (context); - g_assert (ibus_input_context_is_enabled (context) == TRUE); - ibus_input_context_focus_in (context); - ibus_input_context_set_engine (context, active_engine_name); - current_ic = ibus_bus_current_input_context (bus); - g_assert (!strcmp (current_ic, ibus_proxy_get_path (IBUS_PROXY (context)))); - engine_desc = ibus_input_context_get_engine (context); - g_assert (engine_desc); - g_assert (!strcmp (active_engine_name, engine_desc->name)); - g_debug ("Test ibusinputcontext.c: passed."); - - g_free (active_engine_name); - g_free (current_ic); - g_object_unref (engine_desc); - g_object_unref (context); - } -#endif - g_object_unref (bus); - - return 0; -} diff --git a/src/test-keynames.c b/src/test-keynames.c deleted file mode 100644 index 629f4d323..000000000 --- a/src/test-keynames.c +++ /dev/null @@ -1,8 +0,0 @@ -#include "ibus.h" - -int main() -{ - g_assert_cmpstr (ibus_keyval_name (IBUS_Home), ==, "Home"); - g_assert (ibus_keyval_from_name ("Home") == IBUS_Home); - return 0; -} diff --git a/src/test-lookuptable.c b/src/test-lookuptable.c deleted file mode 100644 index 521d0cc90..000000000 --- a/src/test-lookuptable.c +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include "ibus.h" - -int main() -{ - g_type_init (); - IBusLookupTable *table, *table1; - IBusMessage *message; - IBusError *error; - gboolean retval; - - table = ibus_lookup_table_new (9, 0, TRUE, FALSE); - ibus_lookup_table_append_candidate (table, ibus_text_new_from_static_string ("Hello")); - ibus_lookup_table_append_candidate (table, ibus_text_new_from_static_string ("Cool")); - - message = ibus_message_new (DBUS_MESSAGE_TYPE_METHOD_CALL); - - retval = ibus_message_append_args (message, - IBUS_TYPE_LOOKUP_TABLE, &table, - IBUS_TYPE_LOOKUP_TABLE, &table, - G_TYPE_INVALID); - g_assert (retval); - - g_object_unref (table); - table = table1 = NULL; - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_LOOKUP_TABLE, &table, - IBUS_TYPE_LOOKUP_TABLE, &table1, - G_TYPE_INVALID); - g_assert (retval); - g_assert (table); - g_assert (table1); - - g_object_unref (table); - g_object_unref (table1); - - return 0; -} diff --git a/src/test-server.c b/src/test-server.c deleted file mode 100644 index 4e3708597..000000000 --- a/src/test-server.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "ibus.h" - - -void connection_destroy_cb (IBusConnection *connection, gpointer user_data) -{ - g_debug ("connnection %p destroyed", connection ); -} - -void new_connection_cb (IBusServer *server, IBusConnection *connection, gpointer user_data) -{ - g_debug ("new-connection %p", connection); - g_signal_connect (connection, "destroy", (GCallback) connection_destroy_cb, 0); -} - -int main() -{ - g_type_init (); - - GMainLoop *mainloop; - IBusServer *server; - - mainloop = g_main_loop_new (NULL, FALSE); - server = ibus_server_new (); - ibus_server_listen (server, "unix:abstract=/tmp/1234567"); - g_signal_connect (server, "new-connection", (GCallback) new_connection_cb, 0); - - g_main_loop_run (mainloop); - - return 0; -} diff --git a/src/test-text.c b/src/test-text.c deleted file mode 100644 index 37bc3a625..000000000 --- a/src/test-text.c +++ /dev/null @@ -1,42 +0,0 @@ -#include "ibus.h" - -int main() -{ - g_type_init (); - - IBusText *text1; - IBusText *text2; - IBusMessage *message; - IBusError *error; - gboolean retval; - - text1 = ibus_text_new_from_string ("Hello"); - text2 = ibus_text_new_from_static_string ("Hello"); - - message = ibus_message_new_signal ("/org/freedesktop/IBus", - "org.freedesktop.IBus", - "Test"); - - retval = ibus_message_append_args (message, - IBUS_TYPE_SERIALIZABLE, &text1, - IBUS_TYPE_SERIALIZABLE, &text2, - G_TYPE_INVALID); - g_assert (retval); - g_object_unref (text1); - g_object_unref (text2); - - retval = ibus_message_get_args (message, - &error, - IBUS_TYPE_SERIALIZABLE, &text1, - IBUS_TYPE_SERIALIZABLE, &text2, - G_TYPE_INVALID); - g_assert (retval); - g_assert_cmpstr (text1->text, ==, "Hello"); - g_assert_cmpstr (text2->text, ==, "Hello"); - - g_object_unref (text1); - g_object_unref (text2); - - return 0; - -} diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am new file mode 100644 index 000000000..1c34da706 --- /dev/null +++ b/src/tests/Makefile.am @@ -0,0 +1,85 @@ +# vim:set noet ts=4: +# +# ibus - The Input Bus +# +# Copyright (c) 2007-2010 Peng Huang +# Copyright (c) 2007-2010 Red Hat, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307 USA + +NULL = + +DEPS = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la + +INCLUDES = \ + -g \ + @GLIB2_CFLAGS@ \ + @GIO2_CFLAGS@ \ + -I$(top_srcdir)/src \ + $(NULL) + +prog_ldadd = \ + @GLIB2_LIBS@ \ + @GIO2_LIBS@ \ + $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la \ + $(NULL) + +noinst_PROGRAMS = $(TESTS) +TESTS = \ + ibus-bus \ + ibus-config \ + ibus-configservice\ + ibus-factory \ + ibus-inputcontext \ + ibus-inputcontext-create \ + ibus-keynames \ + ibus-serializable \ + ibus-share \ + ibus-util \ + $(NULL) + +ibus_bus_SOURCES = ibus-bus.c +ibus_bus_LDADD = $(prog_ldadd) + +ibus_config_SOURCES = ibus-config.c +ibus_config_LDADD = $(prog_ldadd) + +ibus_configservice_SOURCES = ibus-configservice.c +ibus_configservice_LDADD = $(prog_ldadd) + +ibus_factory_SOURCES = ibus-factory.c +ibus_factory_LDADD = $(prog_ldadd) + +ibus_inputcontext_SOURCES = ibus-inputcontext.c +ibus_inputcontext_LDADD = $(prog_ldadd) + +ibus_inputcontext_create_SOURCES = ibus-inputcontext-create.c +ibus_inputcontext_create_LDADD = $(prog_ldadd) + +ibus_keynames_SOURCES = ibus-keynames.c +ibus_keynames_LDADD = $(prog_ldadd) + +ibus_serializable_SOURCES = ibus-serializable.c +ibus_serializable_LDADD = $(prog_ldadd) + +ibus_share_SOURCES = ibus-share.c +ibus_share_CFLAGS = @DBUS_CFLAGS@ +ibus_share_LDADD = $(prog_ldadd) @DBUS_LIBS@ + +ibus_util_SOURCES = ibus-util.c +ibus_util_LDADD = $(prog_ldadd) + +-include $(top_srcdir)/git.mk diff --git a/src/tests/ibus-bus.c b/src/tests/ibus-bus.c new file mode 100644 index 000000000..644f35dd7 --- /dev/null +++ b/src/tests/ibus-bus.c @@ -0,0 +1,624 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ + +#include +#include "ibus.h" + +static IBusBus *bus; + +static void +print_engines (const GList *engines) +{ + for (; engines; engines = g_list_next (engines)) { + IBusEngineDesc *engine_desc = IBUS_ENGINE_DESC (engines->data); + g_assert (engine_desc); +#if 0 + g_debug ("%s (id:%s, icon:%s)", + ibus_engine_desc_get_longname (engine_desc), + ibus_engine_desc_get_name (engine_desc), + ibus_engine_desc_get_icon (engine_desc)); +#endif + } +} + +static void +test_list_active_engines (void) +{ + GList *engines; + IBUS_TYPE_ENGINE_DESC; + + engines = ibus_bus_list_active_engines (bus); + print_engines (engines); + + g_list_foreach (engines, (GFunc) g_object_unref, NULL); + g_list_free (engines); +} + +static void +test_list_engines (void) +{ + GList *engines; + IBUS_TYPE_ENGINE_DESC; + + engines = ibus_bus_list_engines (bus); + print_engines (engines); + + g_list_foreach (engines, (GFunc) g_object_unref, NULL); + g_list_free (engines); +} + +static void call_next_async_function (void); + +static void +finish_request_name_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + guint id = ibus_bus_request_name_async_finish (bus, + res, + &error); + g_assert (id != 0); + g_debug ("ibus_bus_request_name_async_finish: OK"); + call_next_async_function (); +} + +static void +start_request_name_async (void) +{ + ibus_bus_request_name_async (bus, + "org.freedesktop.IBus.IBusBusTest", + 0, + -1, /* timeout */ + NULL, /* cancellable */ + finish_request_name_async, + NULL); /* user_data */ +} + + +static void +finish_name_has_owner_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + gboolean has_owner = ibus_bus_name_has_owner_async_finish (bus, + res, + &error); + g_assert (has_owner); + g_debug ("ibus_bus_name_has_owner_async_finish: OK"); + call_next_async_function (); +} + +static void +start_name_has_owner_async (void) +{ + ibus_bus_name_has_owner_async (bus, + "org.freedesktop.IBus.IBusBusTest", + -1, /* timeout */ + NULL, /* cancellable */ + finish_name_has_owner_async, + NULL); /* user_data */ +} + +static void +finish_get_name_owner_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + gchar *owner = ibus_bus_get_name_owner_async_finish (bus, + res, + &error); + g_assert (owner); + g_free (owner); + g_debug ("ibus_bus_name_get_name_owner_async_finish: OK"); + call_next_async_function (); +} + +static void +start_get_name_owner_async (void) +{ + ibus_bus_get_name_owner_async (bus, + "org.freedesktop.IBus.IBusBusTest", + -1, /* timeout */ + NULL, /* cancellable */ + finish_get_name_owner_async, + NULL); /* user_data */ +} + +static void +finish_release_name_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + guint id = ibus_bus_release_name_async_finish (bus, + res, + &error); + g_assert (id != 0); + g_debug ("ibus_bus_release_name_async_finish: OK"); + call_next_async_function (); +} + +static void +start_release_name_async (void) +{ + ibus_bus_release_name_async (bus, + "org.freedesktop.IBus.IBusBusTest", + -1, /* timeout */ + NULL, /* cancellable */ + finish_release_name_async, + NULL); /* user_data */ +} + +static void +finish_add_match_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + gboolean result = ibus_bus_add_match_async_finish (bus, + res, + &error); + g_assert (result); + g_debug ("ibus_bus_add_match_finish: OK"); + call_next_async_function (); +} + +static void +start_add_match_async (void) +{ + ibus_bus_add_match_async (bus, + "type='signal'", + -1, /* timeout */ + NULL, /* cancellable */ + finish_add_match_async, + NULL); /* user_data */ +} + +static void +finish_remove_match_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + gboolean result = ibus_bus_remove_match_async_finish (bus, + res, + &error); + g_assert (result); + g_debug ("ibus_bus_remove_match_finish: OK"); + call_next_async_function (); +} + +static void +start_remove_match_async (void) +{ + ibus_bus_remove_match_async (bus, + "type='signal'", + -1, /* timeout */ + NULL, /* cancellable */ + finish_remove_match_async, + NULL); /* user_data */ +} + +static int create_input_context_count = 0; +static void +finish_create_input_context_async_sucess (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GMainLoop *loop = (GMainLoop *)user_data; + GError *error = NULL; + IBusInputContext *context = + ibus_bus_create_input_context_async_finish (bus, res, &error); + + g_assert (IBUS_IS_INPUT_CONTEXT (context)); + g_object_unref (context); + if (--create_input_context_count == 0) + g_main_loop_quit (loop); +} + +static void +finish_create_input_context_async_failed (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GMainLoop *loop = (GMainLoop *)user_data; + GError *error = NULL; + IBusInputContext *context = + ibus_bus_create_input_context_async_finish (bus, res, &error); + + g_assert (context == NULL); + g_assert (error != NULL); + g_error_free (error); + if (--create_input_context_count <= 0) + g_main_loop_quit (loop); +} + +static void +test_create_input_context_async (void) +{ + GMainLoop *loop = NULL; + GCancellable *cancellable = NULL; + + /* create an IC */ + create_input_context_count = 1; + loop = g_main_loop_new (NULL, TRUE); + ibus_bus_create_input_context_async (bus, + "test-async", + -1, /* timeout */ + NULL, /* cancellable */ + finish_create_input_context_async_sucess, + loop); /* user_data */ + g_main_loop_run (loop); + g_main_loop_unref (loop); + + /* call create, and then cancel */ + create_input_context_count = 1; + loop = g_main_loop_new (NULL, TRUE); + cancellable = g_cancellable_new (); + ibus_bus_create_input_context_async (bus, + "test-async", + -1, /* timeout */ + cancellable, /* cancellable */ + finish_create_input_context_async_failed, + loop); /* user_data */ + g_cancellable_cancel (cancellable); + g_object_unref (cancellable); + g_main_loop_run (loop); + g_main_loop_unref (loop); + + /* ceate four IC, and cancel two */ + create_input_context_count = 4; + loop = g_main_loop_new (NULL, TRUE); + cancellable = g_cancellable_new (); + ibus_bus_create_input_context_async (bus, + "test-async", + -1, /* timeout */ + cancellable, /* cancellable */ + finish_create_input_context_async_failed, + loop); /* user_data */ + ibus_bus_create_input_context_async (bus, + "test-async", + -1, /* timeout */ + NULL, /* cancellable */ + finish_create_input_context_async_sucess, + loop); /* user_data */ + ibus_bus_create_input_context_async (bus, + "test-async", + -1, /* timeout */ + NULL, /* cancellable */ + finish_create_input_context_async_sucess, + loop); /* user_data */ + ibus_bus_create_input_context_async (bus, + "test-async", + -1, /* timeout */ + cancellable, /* cancellable */ + finish_create_input_context_async_failed, + loop); /* user_data */ + g_cancellable_cancel (cancellable); + g_object_unref (cancellable); + + g_main_loop_run (loop); + g_main_loop_unref (loop); +} + +static void +finish_current_input_context_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + g_free (ibus_bus_current_input_context_async_finish (bus, + res, + &error)); + // no null check. + g_debug ("ibus_bus_current_input_context_finish: OK"); + call_next_async_function (); +} + +static void +start_current_input_context_async (void) +{ + ibus_bus_current_input_context_async (bus, + -1, /* timeout */ + NULL, /* cancellable */ + finish_current_input_context_async, + NULL); /* user_data */ +} + +static void +finish_list_engines_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + GList *engines = ibus_bus_list_engines_async_finish (bus, + res, + &error); + // no null check. + g_list_foreach (engines, (GFunc) g_object_unref, NULL); + g_list_free (engines); + g_debug ("ibus_bus_list_engines_finish: OK"); + call_next_async_function (); +} + +static void +start_list_engines_async (void) +{ + ibus_bus_list_engines_async (bus, + -1, /* timeout */ + NULL, /* cancellable */ + finish_list_engines_async, + NULL); /* user_data */ +} + +static void +finish_list_active_engines_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + GList *engines = ibus_bus_list_active_engines_async_finish (bus, + res, + &error); + // no null check. + g_list_foreach (engines, (GFunc) g_object_unref, NULL); + g_list_free (engines); + g_debug ("ibus_bus_list_active_engines_finish: OK"); + call_next_async_function (); +} + +static void +start_list_active_engines_async (void) +{ + ibus_bus_list_active_engines_async (bus, + -1, /* timeout */ + NULL, /* cancellable */ + finish_list_active_engines_async, + NULL); /* user_data */ +} + +static void +finish_get_use_sys_layout_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + ibus_bus_get_use_sys_layout_async_finish (bus, + res, + &error); + g_debug ("ibus_bus_get_use_sys_layout_finish: OK"); + call_next_async_function (); +} + +static void +start_get_use_sys_layout_async (void) +{ + ibus_bus_get_use_sys_layout_async (bus, + -1, /* timeout */ + NULL, /* cancellable */ + finish_get_use_sys_layout_async, + NULL); /* user_data */ +} + +static void +finish_get_use_global_engine_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + ibus_bus_get_use_global_engine_async_finish (bus, + res, + &error); + g_debug ("ibus_bus_get_use_global_engine_finish: OK"); + call_next_async_function (); +} + +static void +start_get_use_global_engine_async (void) +{ + ibus_bus_get_use_global_engine_async (bus, + -1, /* timeout */ + NULL, /* cancellable */ + finish_get_use_global_engine_async, + NULL); /* user_data */ +} + +static void +finish_is_global_engine_enabled_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + ibus_bus_is_global_engine_enabled_async_finish (bus, + res, + &error); + g_debug ("ibus_bus_is_global_engine_enabled_finish: OK"); + call_next_async_function (); +} + +static void +start_is_global_engine_enabled_async (void) +{ + ibus_bus_is_global_engine_enabled_async (bus, + -1, /* timeout */ + NULL, /* cancellable */ + finish_is_global_engine_enabled_async, + NULL); /* user_data */ +} + +static void +finish_get_global_engine_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + IBusEngineDesc *desc = ibus_bus_get_global_engine_async_finish (bus, + res, + &error); + if (desc) + g_object_unref (desc); + g_debug ("ibus_bus_get_global_engine_finish: OK"); + call_next_async_function (); +} + +static void +start_get_global_engine_async (void) +{ + ibus_bus_get_global_engine_async (bus, + -1, /* timeout */ + NULL, /* cancellable */ + finish_get_global_engine_async, + NULL); /* user_data */ +} + +static void +finish_set_global_engine_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + ibus_bus_set_global_engine_async_finish (bus, + res, + &error); + g_debug ("ibus_bus_set_global_engine_finish: OK"); + call_next_async_function (); +} + +static void +start_set_global_engine_async (void) +{ + ibus_bus_set_global_engine_async (bus, + "anthy", + -1, /* timeout */ + NULL, /* cancellable */ + finish_set_global_engine_async, + NULL); /* user_data */ +} + +static void +finish_exit_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + gboolean result = ibus_bus_exit_async_finish (bus, + res, + &error); + g_assert (result); + g_debug ("ibus_bus_exit_finish: OK"); + g_usleep (G_USEC_PER_SEC); + call_next_async_function (); +} + +static void +start_exit_async (void) +{ + ibus_bus_exit_async (bus, + TRUE, /* restart */ + -1, /* timeout */ + NULL, /* cancellable */ + finish_exit_async, + NULL); /* user_data */ +} + +static gboolean +test_async_apis_finish (gpointer user_data) +{ + ibus_quit (); + return FALSE; +} + +static void +test_get_engines_by_names (void) +{ + IBusEngineDesc **engines = NULL; + const gchar *names[] = { + "xkb:us::eng", + "xkb:ca:eng:eng", + "xkb:fr::fra", + "xkb:jp::jpn", + NULL, + }; + + engines = ibus_bus_get_engines_by_names (bus, names); + + g_assert(engines != NULL); + IBusEngineDesc **p; + + gint i = 0; + for (p = engines; *p != NULL; p++) { + g_assert (IBUS_IS_ENGINE_DESC (*p)); + g_assert_cmpstr (names[i], ==, ibus_engine_desc_get_name (*p)); + i++; + g_object_unref (*p); + // The ref should be zero, *p is released. + g_assert (!IBUS_IS_ENGINE_DESC (*p)); + } + g_free (engines); + engines = NULL; +} + +static void +test_async_apis (void) +{ + g_debug ("start"); + call_next_async_function (); + ibus_main (); +} + +static void +call_next_async_function (void) +{ + static void (*async_functions[])(void) = { + start_request_name_async, + start_name_has_owner_async, + start_get_name_owner_async, + start_release_name_async, + start_add_match_async, + start_remove_match_async, + start_current_input_context_async, + // FIXME test ibus_bus_register_component_async. + start_list_engines_async, + start_list_active_engines_async, + start_get_use_sys_layout_async, + start_get_use_global_engine_async, + start_is_global_engine_enabled_async, + start_set_global_engine_async, + start_get_global_engine_async, + start_exit_async, + }; + static guint index = 0; + + // Use g_timeout_add to make sure test_async_apis finishes even if async_functions is empty. + if (index >= G_N_ELEMENTS (async_functions)) + g_timeout_add (1, test_async_apis_finish, NULL); + else + (*async_functions[index++])(); +} + +gint +main (gint argc, + gchar **argv) +{ + gint result; + g_type_init (); + g_test_init (&argc, &argv, NULL); + ibus_init (); + bus = ibus_bus_new (); + g_object_unref (bus); + bus = ibus_bus_new (); // crosbug.com/17293 + + g_test_add_func ("/ibus/list-engines", test_list_engines); + g_test_add_func ("/ibus/list-active-engines", test_list_active_engines); + g_test_add_func ("/ibus/create-input-context-async", + test_create_input_context_async); + g_test_add_func ("/ibus/get-engines-by-names", test_get_engines_by_names); + g_test_add_func ("/ibus/async-apis", test_async_apis); + + result = g_test_run (); + g_object_unref (bus); + + return result; +} diff --git a/src/tests/ibus-config.c b/src/tests/ibus-config.c new file mode 100644 index 000000000..8967adba2 --- /dev/null +++ b/src/tests/ibus-config.c @@ -0,0 +1,146 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ + +#include +#include "ibus.h" + +static IBusBus *bus = NULL; +static int create_config_count = 0; + +static void +finish_create_config_async_sucess (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GMainLoop *loop = (GMainLoop *)user_data; + GError *error = NULL; + IBusConfig *config = + ibus_config_new_async_finish (res, &error); + + g_assert (IBUS_IS_CONFIG (config)); + g_object_unref (config); + if (--create_config_count == 0) + g_main_loop_quit (loop); +} + +static void +finish_create_config_async_failed (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GMainLoop *loop = (GMainLoop *)user_data; + GError *error = NULL; + IBusConfig *config = + ibus_config_new_async_finish (res, &error); + + g_assert (config == NULL); + g_assert (error != NULL); + g_error_free (error); + if (--create_config_count <= 0) + g_main_loop_quit (loop); +} + +static void +test_create_config_async (void) +{ + GMainLoop *loop = NULL; + GCancellable *cancellable = NULL; + + /* create an IC */ + create_config_count = 1; + loop = g_main_loop_new (NULL, TRUE); + ibus_config_new_async (ibus_bus_get_connection (bus), + NULL, + finish_create_config_async_sucess, + loop); + g_main_loop_run (loop); + g_main_loop_unref (loop); + + /* call create, and then cancel */ + create_config_count = 1; + loop = g_main_loop_new (NULL, TRUE); + cancellable = g_cancellable_new (); + + ibus_config_new_async (ibus_bus_get_connection (bus), + cancellable, + finish_create_config_async_failed, + loop); + g_cancellable_cancel (cancellable); + g_object_unref (cancellable); + g_main_loop_run (loop); + g_main_loop_unref (loop); +} + +static void +test_config_set_get (void) +{ + IBusConfig *config = ibus_config_new (ibus_bus_get_connection (bus), + NULL, + NULL); + g_assert (config); + + ibus_config_set_value (config, "test", "v1", g_variant_new_int32(1)); + ibus_config_set_value (config, "test", "v2", g_variant_new_string("2")); + + GVariant *var; + var = ibus_config_get_value (config, "test", "v1"); + g_assert (var); + g_assert_cmpint (g_variant_get_int32(var), ==, 1); + g_variant_unref (var); + + var = ibus_config_get_value (config, "test", "v2"); + g_assert (var); + g_assert_cmpstr (g_variant_get_string(var, NULL), ==, "2"); + g_variant_unref (var); + + var = ibus_config_get_values (config, "test"); + g_assert (var); + + GVariantIter iter; + gchar *name; + GVariant *value; + g_variant_iter_init (&iter, var); + gint value_bits = 0; + while (g_variant_iter_next (&iter, "{&sv}", &name, &value)) { + if (g_strcmp0 (name, "v1") == 0) { + g_assert_cmpint (g_variant_get_int32(value), ==, 1); + value_bits |= 1; + } + else if (g_strcmp0 (name, "v2") == 0) { + g_assert_cmpstr (g_variant_get_string(value, NULL), ==, "2"); + value_bits |= (1 << 1); + } + else { + g_warning ("unknow value name=%s", name); + } + ibus_config_unset (config, "test", name); + g_variant_unref (value); + } + g_assert_cmpint (value_bits, ==, 1 | (1 << 1)); + g_variant_unref (var); + + var = ibus_config_get_values (config, "test"); + g_assert (var); + g_assert_cmpint (g_variant_n_children (var), ==, 0); + g_variant_unref (var); + + g_object_unref (config); +} + +gint +main (gint argc, + gchar **argv) +{ + gint result; + g_type_init (); + g_test_init (&argc, &argv, NULL); + ibus_init (); + bus = ibus_bus_new (); + + g_test_add_func ("/ibus/create-config-async", test_create_config_async); + g_test_add_func ("/ibus/config-set-get", test_config_set_get); + + result = g_test_run (); + g_object_unref (bus); + + return result; +} diff --git a/src/tests/ibus-configservice.c b/src/tests/ibus-configservice.c new file mode 100644 index 000000000..38d500fde --- /dev/null +++ b/src/tests/ibus-configservice.c @@ -0,0 +1,43 @@ +#include + +static gboolean +timeout_cb (gpointer data) +{ + g_main_loop_quit ((GMainLoop *)data); + return FALSE; +} + +static void +run_loop_with_timeout (gint interval) +{ + GMainLoop *loop = g_main_loop_new (NULL, FALSE); + g_timeout_add (interval, timeout_cb, loop); + g_main_loop_run (loop); + g_main_loop_unref (loop); +} + +static void +test_configservice (void) +{ + IBusBus *bus = ibus_bus_new (); + IBusConfigService *config = ibus_config_service_new (ibus_bus_get_connection (bus)); + ibus_bus_request_name (bus, "test.config", 0); + + run_loop_with_timeout (1000); + + g_object_unref (config); + g_object_unref (bus); +} + +gint +main (gint argc, + gchar **argv) +{ + g_mem_set_vtable (glib_mem_profiler_table); + g_type_init (); + g_test_init (&argc, &argv, NULL); + + g_test_add_func ("/ibus/configservice", test_configservice); + + return g_test_run (); +} diff --git a/src/test-engine.c b/src/tests/ibus-engine.c similarity index 84% rename from src/test-engine.c rename to src/tests/ibus-engine.c index bea99cf86..75bdb1f49 100644 --- a/src/test-engine.c +++ b/src/tests/ibus-engine.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ #include "ibus.h" int main() diff --git a/src/tests/ibus-factory.c b/src/tests/ibus-factory.c new file mode 100644 index 000000000..e3fa40552 --- /dev/null +++ b/src/tests/ibus-factory.c @@ -0,0 +1,43 @@ +#include + +static gboolean +timeout_cb (gpointer data) +{ + g_main_loop_quit ((GMainLoop *)data); + return FALSE; +} + +static void +run_loop_with_timeout (gint interval) +{ + GMainLoop *loop = g_main_loop_new (NULL, FALSE); + g_timeout_add (interval, timeout_cb, loop); + g_main_loop_run (loop); + g_main_loop_unref (loop); +} + +static void +test_factory (void) +{ + IBusBus *bus = ibus_bus_new (); + IBusFactory *factory = ibus_factory_new (ibus_bus_get_connection (bus)); + ibus_bus_request_name (bus, "test.factory", 0); + + run_loop_with_timeout (1000); + + g_object_unref (factory); + g_object_unref (bus); +} + +gint +main (gint argc, + gchar **argv) +{ + g_mem_set_vtable (glib_mem_profiler_table); + g_type_init (); + g_test_init (&argc, &argv, NULL); + + g_test_add_func ("/ibus/factory", test_factory); + + return g_test_run (); +} diff --git a/src/tests/ibus-gi-inputcontext.py b/src/tests/ibus-gi-inputcontext.py new file mode 100755 index 000000000..80fb97bbb --- /dev/null +++ b/src/tests/ibus-gi-inputcontext.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python +# vim:set et sts=4 sw=4: +# +# ibus - The Input Bus +# +# Copyright (c) 2011 Peng Huang +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307 USA + + +import glib +import gio +from gi.repository import IBus +IBus.init() +main = glib.MainLoop() +bus = IBus.Bus() +ic = bus.create_input_context("ibus-test") +ic.get_engine() +ic.get_engine() +ic.get_engine() +ic.get_engine() diff --git a/src/test-global-engine.c b/src/tests/ibus-global-engine.c similarity index 69% rename from src/test-global-engine.c rename to src/tests/ibus-global-engine.c index 45e5e63f5..c6fff63e8 100644 --- a/src/test-global-engine.c +++ b/src/tests/ibus-global-engine.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ #include #include "ibus.h" @@ -8,11 +9,19 @@ void global_engine_changed_cb (IBusBus *bus) { IBusEngineDesc *global_engine = ibus_bus_get_global_engine (bus); + const gchar *name = NULL; + g_assert (global_engine); - g_debug ("%s (id:%s, icon:%s)", global_engine->longname, - global_engine->name, global_engine->icon); + + name = ibus_engine_desc_get_name (global_engine); + g_debug ("%s (id:%s, icon:%s)", + ibus_engine_desc_get_longname (global_engine), + name, + ibus_engine_desc_get_icon (global_engine)); IBusEngineDesc *engine_desc = IBUS_ENGINE_DESC (current_engine->data); - g_assert (strcmp (engine_desc->name, global_engine->name) == 0); + + g_assert (strcmp (name, + ibus_engine_desc_get_name (engine_desc)) == 0); g_object_unref (global_engine); } @@ -30,7 +39,9 @@ change_global_engine_cb (IBusBus *bus) } IBusEngineDesc *engine_desc = IBUS_ENGINE_DESC (current_engine->data); - ibus_bus_set_global_engine (bus, engine_desc->name); + + ibus_bus_set_global_engine (bus, + ibus_engine_desc_get_name (engine_desc)); return TRUE; } @@ -41,6 +52,9 @@ int main() IBusBus *bus; + g_type_init (); + IBUS_TYPE_ENGINE_DESC; + bus = ibus_bus_new (); engines = ibus_bus_list_active_engines (bus); g_assert (engines); diff --git a/src/tests/ibus-inputcontext-create.c b/src/tests/ibus-inputcontext-create.c new file mode 100644 index 000000000..2a5a64acd --- /dev/null +++ b/src/tests/ibus-inputcontext-create.c @@ -0,0 +1,108 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* ibus - The Input Bus + * Copyright (C) 2011 Google, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include "ibus.h" + +static IBusBus *bus = NULL; + +static void +create_finish_success (GObject *object, + GAsyncResult *res, + gpointer user_data) +{ + g_assert (object == (GObject *)bus); + g_assert (user_data == NULL); + + GError *error = NULL; + IBusInputContext *context = NULL; + context = ibus_bus_create_input_context_async_finish (bus, res, &error); + + g_assert (IBUS_IS_INPUT_CONTEXT (context)); + g_object_unref (context); + ibus_quit (); +} + +static void +create_finish_failed (GObject *object, + GAsyncResult *res, + gpointer user_data) +{ + g_assert (object == (GObject *)bus); + g_assert (user_data == NULL); + + GError *error = NULL; + IBusInputContext *context = NULL; + context = ibus_bus_create_input_context_async_finish (bus, res, &error); + + g_assert (context == NULL); + g_assert (error != NULL); + g_debug ("error = %s", error->message); + g_error_free (error); + ibus_quit (); +} + +static void +test_success (void) +{ + ibus_bus_create_input_context_async (bus, + "test", + -1, + NULL, + create_finish_success, + NULL); + ibus_main (); + +} + +static void +test_failed (void) +{ + ibus_bus_create_input_context_async (bus, + "test", + 1000, + NULL, + create_finish_failed, + NULL); + GDBusConnection *connection = ibus_bus_get_connection (bus); + g_dbus_connection_flush_sync (connection, NULL, NULL); + g_dbus_connection_close_sync (connection, NULL, NULL); + ibus_main (); +} + +gint +main (gint argc, + gchar **argv) +{ + gint result; + g_type_init (); + g_test_init (&argc, &argv, NULL); + ibus_init (); + bus = ibus_bus_new (); + + g_test_add_func ("/ibus/input_context_async_create_success", test_success); + g_test_add_func ("/ibus/input_context_async_create_failed", test_failed); + + result = g_test_run (); + g_object_unref (bus); + + return result; +} diff --git a/src/tests/ibus-inputcontext.c b/src/tests/ibus-inputcontext.c new file mode 100644 index 000000000..9053ca029 --- /dev/null +++ b/src/tests/ibus-inputcontext.c @@ -0,0 +1,223 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ +/* vim:set et sts=4: */ +/* ibus - The Input Bus + * Copyright (C) 2011 Google, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include "ibus.h" + +static IBusBus *bus; +static void +call_next_async_function (IBusInputContext *context); + +static gboolean +fatal_handler(const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data) +{ + if (!g_strcmp0 (message, "org.freedesktop.IBus.InputContext.GetEngine: GDBus.Error:org.freedesktop.DBus.Error.Failed: Input context does not have engine.")) + return FALSE; /* do not call abort. */ + return TRUE; +} + +static gchar * +get_last_engine_id (const GList *engines) +{ + const char *result = NULL; + for (; engines; engines = g_list_next (engines)) { + IBusEngineDesc *engine_desc = IBUS_ENGINE_DESC (engines->data); + g_assert (engine_desc); + result = ibus_engine_desc_get_name (engine_desc); + } + return g_strdup (result); +} + +static void +call_basic_ipcs (IBusInputContext *context) +{ + ibus_input_context_set_cursor_location (context, 0, 0, 1, 1); + ibus_input_context_set_capabilities (context, IBUS_CAP_FOCUS); + ibus_input_context_property_activate (context, "dummy.prop.name", PROP_STATE_CHECKED); + ibus_input_context_reset (context); + + /* When enable() is called, ibus-daemon may start a global (or preloaded, + * or default) engine in an asynchrnous manner and return immediately. + * Therefore, it is not guaranteed that ibus_input_context_is_enabled() + * returns TRUE. */ + + ibus_input_context_focus_in (context); +} + +static void +test_input_context (void) +{ + GList *engines; + gchar *active_engine_name = NULL; + IBusInputContext *context; + IBusEngineDesc *engine_desc; + gchar *current_ic; + + context = ibus_bus_create_input_context (bus, "test"); + call_basic_ipcs (context); + + engines = ibus_bus_list_active_engines (bus); + if (engines != NULL) { + active_engine_name = get_last_engine_id (engines); + } else { + active_engine_name = g_strdup ("dummy-engine-name"); + } + g_assert (active_engine_name); + g_debug ("Use '%s' for testing.", active_engine_name); + + ibus_input_context_set_engine (context, active_engine_name); + current_ic = ibus_bus_current_input_context (bus); + g_assert (!strcmp (current_ic, g_dbus_proxy_get_object_path ((GDBusProxy *)context))); + + g_test_log_set_fatal_handler (fatal_handler, NULL); + engine_desc = ibus_input_context_get_engine (context); + if (engine_desc) { + /* FIXME race condition between ibus_input_context_set_engine and _get_engine. + * ibus_input_context_get_engine is not guaranteed to return non-NULL + * (even if we use synchronous set_engine()) because ibus-daemon sets a context + * engine in an asynchronous manner. See _context_request_engine_cb in + * ibusimpl.c which handles context_signals[REQUEST_ENGINE] signal. */ + g_assert (!strcmp (active_engine_name, ibus_engine_desc_get_name(engine_desc))); + g_object_unref (engine_desc); + engine_desc = NULL; + } + ibus_input_context_process_key_event (context, 0, 0, 0); + + /* An engine is set. Try to call basic IPCs again. */ + call_basic_ipcs (context); + + g_free (current_ic); + g_object_unref (context); + + g_free (active_engine_name); + g_list_foreach (engines, (GFunc) g_object_unref, NULL); + g_list_free (engines); +} + +static void +finish_get_engine_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + IBusInputContext *context = IBUS_INPUT_CONTEXT (source_object); + GError *error = NULL; + IBusEngineDesc *desc = ibus_input_context_get_engine_async_finish (context, + res, + &error); + if (desc) { + g_object_unref (desc); + } + g_debug ("ibus_context_get_engine_async_finish: OK"); + call_next_async_function (context); +} + +static void +start_get_engine_async (IBusInputContext *context) +{ + ibus_input_context_get_engine_async (context, + -1, /* timeout */ + NULL, /* cancellable */ + finish_get_engine_async, + NULL); /* user_data */ +} + +static void +finish_process_key_event_async (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + IBusInputContext *context = IBUS_INPUT_CONTEXT (source_object); + GError *error = NULL; + gboolean result = ibus_input_context_process_key_event_async_finish (context, + res, + &error); + g_assert (result || error == NULL); + g_debug ("ibus_context_process_key_event_async_finish: OK"); + call_next_async_function (context); +} + +static void +start_process_key_event_async (IBusInputContext *context) +{ + ibus_input_context_process_key_event_async (context, + 0, 0, 0, + -1, /* timeout */ + NULL, /* cancellable */ + finish_process_key_event_async, + NULL); /* user_data */ +} + +static gboolean +test_async_apis_finish (gpointer user_data) +{ + ibus_quit (); + return FALSE; +} + +static void +test_async_apis (void) +{ + g_debug ("start"); + IBusInputContext *context; + context = ibus_bus_create_input_context (bus, "test"); + call_basic_ipcs (context); + + call_next_async_function (context); + ibus_main (); +} + +static void +call_next_async_function (IBusInputContext *context) +{ + static void (*async_functions[])(IBusInputContext *) = { + start_get_engine_async, + start_process_key_event_async, + }; + static guint index = 0; + + // Use g_timeout_add to make sure test_async_apis finishes even if async_functions is empty. + if (index >= G_N_ELEMENTS (async_functions)) + g_timeout_add (1, test_async_apis_finish, NULL); + else + (*async_functions[index++])(context); +} + +gint +main (gint argc, + gchar **argv) +{ + gint result; + g_type_init (); + g_test_init (&argc, &argv, NULL); + ibus_init (); + bus = ibus_bus_new (); + + g_test_add_func ("/ibus/input_context", test_input_context); + g_test_add_func ("/ibus/input_context_async_with_callback", test_async_apis); + + result = g_test_run (); + g_object_unref (bus); + + return result; +} diff --git a/src/test-keymap.c b/src/tests/ibus-keymap.c similarity index 93% rename from src/test-keymap.c rename to src/tests/ibus-keymap.c index 63b214731..9e5c46d48 100644 --- a/src/test-keymap.c +++ b/src/tests/ibus-keymap.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ #include #include #include @@ -18,6 +19,7 @@ int main (int argc, char **argv) int main (int argc, char **argv) { +#if 0 gint fd; struct input_event e; @@ -48,7 +50,7 @@ int main (int argc, char **argv) } g_object_unref (keymap); - return 0; - +#endif + return 0; } #endif diff --git a/src/tests/ibus-keynames.c b/src/tests/ibus-keynames.c new file mode 100644 index 000000000..aa0bdc0b2 --- /dev/null +++ b/src/tests/ibus-keynames.c @@ -0,0 +1,20 @@ +#include "ibus.h" + +static void +test_keyname (void) +{ + g_assert_cmpstr (ibus_keyval_name (IBUS_KEY_Home), ==, "Home"); + g_assert (ibus_keyval_from_name ("Home") == IBUS_KEY_Home); +} + +gint +main (gint argc, + gchar **argv) +{ + g_type_init (); + g_test_init (&argc, &argv, NULL); + + g_test_add_func ("/ibus/keyname", test_keyname); + + return g_test_run (); +} diff --git a/src/test-proxy.c b/src/tests/ibus-proxy.c similarity index 87% rename from src/test-proxy.c rename to src/tests/ibus-proxy.c index aedd73257..911579b51 100644 --- a/src/test-proxy.c +++ b/src/tests/ibus-proxy.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ #include "ibus.h" static diff --git a/src/tests/ibus-serializable.c b/src/tests/ibus-serializable.c new file mode 100644 index 000000000..d2bd61a4e --- /dev/null +++ b/src/tests/ibus-serializable.c @@ -0,0 +1,198 @@ +#include "ibus.h" + +void g_variant_type_info_assert_no_infos (void); + +void test_serializable (IBusSerializable *object) +{ + GVariant *variant; + gchar *s1, *s2; + + variant = ibus_serializable_serialize (object); + g_object_unref (object); + g_variant_get_data (variant); + s1 = g_variant_print (variant, TRUE); + + object = ibus_serializable_deserialize (variant); + g_variant_unref (variant); + + variant = ibus_serializable_serialize (object); + g_object_unref (object); + g_variant_get_data (variant); + s2 = g_variant_print (variant, TRUE); + g_variant_unref (variant); + + g_assert_cmpstr (s1, ==, s2); + g_free (s1); + g_free (s2); +} + +static void +test_varianttypeinfo (void) +{ + g_variant_type_info_assert_no_infos (); +} + +static void +test_attr_list (void) +{ + IBusAttrList *list = ibus_attr_list_new (); + ibus_attr_list_append (list, ibus_attribute_new (1, 1, 1, 2)); + ibus_attr_list_append (list, ibus_attribute_new (2, 1, 1, 2)); + ibus_attr_list_append (list, ibus_attribute_new (3, 1, 1, 2)); + ibus_attr_list_append (list, ibus_attribute_new (3, 1, 1, 2)); + test_serializable ((IBusSerializable *)list); + g_variant_type_info_assert_no_infos (); +} + +static void +test_text (void) +{ + test_serializable ((IBusSerializable *)ibus_text_new_from_string ("Hello")); + test_serializable ((IBusSerializable *)ibus_text_new_from_string ("Hello")); + test_serializable ((IBusSerializable *)ibus_text_new_from_string ("Hello")); + test_serializable ((IBusSerializable *)ibus_text_new_from_string ("Hello")); + g_variant_type_info_assert_no_infos (); +} + +static void +test_engine_desc (void) +{ + test_serializable ((IBusSerializable *)ibus_engine_desc_new ("Hello", + "Hello Engine", + "Hello Engine Desc", + "zh", + "GPLv2", + "Peng Huang ", + "icon", + "en")); + g_variant_type_info_assert_no_infos (); +} + +static void +test_lookup_table (void) +{ + IBusLookupTable *table; + + table = ibus_lookup_table_new (9, 0, TRUE, FALSE); + test_serializable ((IBusSerializable *)table); + +#if 1 + table = ibus_lookup_table_new (9, 0, TRUE, FALSE); + ibus_lookup_table_append_candidate (table, ibus_text_new_from_static_string ("Hello")); + ibus_lookup_table_append_candidate (table, ibus_text_new_from_static_string ("Cool")); + test_serializable ((IBusSerializable *)table); +#endif + + table = ibus_lookup_table_new (9, 0, TRUE, FALSE); + ibus_lookup_table_append_candidate (table, ibus_text_new_from_static_string ("Hello")); + ibus_lookup_table_append_candidate (table, ibus_text_new_from_static_string ("Cool")); + ibus_lookup_table_append_label (table, ibus_text_new_from_static_string ("Hello")); + ibus_lookup_table_append_label (table, ibus_text_new_from_static_string ("Cool")); + test_serializable ((IBusSerializable *)table); + g_variant_type_info_assert_no_infos (); +} + +static void +test_property (void) +{ + IBusPropList *list = ibus_prop_list_new (); + ibus_prop_list_append (list, ibus_property_new ("sub1", + PROP_TYPE_NORMAL, + ibus_text_new_from_static_string ("label_sub1"), + "icon_sub1", + ibus_text_new_from_static_string ("tooltip_sub1"), + TRUE, + TRUE, + PROP_STATE_UNCHECKED, + NULL)); + ibus_prop_list_append (list, ibus_property_new ("sub2", + PROP_TYPE_NORMAL, + ibus_text_new_from_static_string ("label_sub1"), + "icon_sub1", + ibus_text_new_from_static_string ("tooltip_sub1"), + TRUE, + TRUE, + PROP_STATE_UNCHECKED, + NULL)); + g_object_ref (list); + test_serializable ((IBusSerializable *)list); + test_serializable ((IBusSerializable *)ibus_property_new ("key", + PROP_TYPE_NORMAL, + ibus_text_new_from_static_string ("label"), + "icon", + ibus_text_new_from_static_string ("tooltip"), + TRUE, + TRUE, + PROP_STATE_UNCHECKED, + list)); + g_variant_type_info_assert_no_infos (); +} + +static void +test_attachment (void) +{ + IBusText *text = ibus_text_new_from_static_string ("main text"); + + ibus_serializable_set_attachment ((IBusSerializable *)text, + "key1", + g_variant_new_int32 (100)); + + ibus_serializable_set_attachment ((IBusSerializable *)text, + "key2", + g_variant_new_string ("value string")); + + ibus_serializable_set_attachment ((IBusSerializable *)text, + "key3", + g_variant_new ("(iuds)",1, 2, 3.333, "test value")); + + GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)text); + g_object_unref ((IBusSerializable *)text); + + IBusSerializable *object = ibus_serializable_deserialize (variant); + g_variant_unref (variant); + + g_assert_cmpstr (((IBusText *)object)->text, ==, "main text"); + + GVariant *newvalue1 = ibus_serializable_get_attachment (object, "key1"); + g_assert (newvalue1 != NULL); + g_assert_cmpint (g_variant_get_int32 (newvalue1), ==, 100); + + GVariant *newvalue2 = ibus_serializable_get_attachment (object, "key2"); + g_assert (newvalue2 != NULL); + g_assert_cmpstr (g_variant_get_string (newvalue2, NULL), ==, "value string"); + + { + GVariant *newvalue3 = ibus_serializable_get_attachment (object, "key3"); + g_assert (newvalue3 != NULL); + gint32 i; + guint32 u; + gdouble d; + const gchar *s; + g_variant_get (newvalue3, "(iud&s)", &i, &u, &d, &s); + g_assert_cmpint (i, ==, 1); + g_assert_cmpuint (u, ==, 2); + g_assert_cmpfloat (d, ==, 3.333); + g_assert_cmpstr (s, ==, "test value"); + } + + g_object_unref (object); + g_variant_type_info_assert_no_infos (); +} + +gint +main (gint argc, + gchar **argv) +{ + g_mem_set_vtable (glib_mem_profiler_table); + g_type_init (); + g_test_init (&argc, &argv, NULL); + g_test_add_func ("/ibus/varianttypeinfo", test_varianttypeinfo); + g_test_add_func ("/ibus/attrlist", test_attr_list); + g_test_add_func ("/ibus/text", test_text); + g_test_add_func ("/ibus/enginedesc", test_engine_desc); + g_test_add_func ("/ibus/lookuptable", test_lookup_table); + g_test_add_func ("/ibus/property", test_property); + g_test_add_func ("/ibus/attachment", test_attachment); + + return g_test_run (); +} diff --git a/src/tests/ibus-share.c b/src/tests/ibus-share.c new file mode 100644 index 000000000..332e9c54f --- /dev/null +++ b/src/tests/ibus-share.c @@ -0,0 +1,24 @@ +#include +#include + +static void +test_machine_id (void) +{ + const gchar *s1 = ibus_get_local_machine_id (); + gchar *s2 = dbus_get_local_machine_id (); + + g_assert_cmpstr (s1, ==, s2); + dbus_free (s2); +} + +gint +main (gint argc, + gchar **argv) +{ + g_mem_set_vtable (glib_mem_profiler_table); + g_type_init (); + g_test_init (&argc, &argv, NULL); + g_test_add_func ("/ibus/marchine-id", test_machine_id); + + return g_test_run (); +} diff --git a/src/tests/ibus-util.c b/src/tests/ibus-util.c new file mode 100644 index 000000000..7a6dd4051 --- /dev/null +++ b/src/tests/ibus-util.c @@ -0,0 +1,18 @@ +/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ + +#include +#include +#include +#include +#include + +#include "ibus.h" + +int main (int argc, char **argv) +{ + setlocale(LC_ALL, "en_US.Utf-8"); + + g_assert_cmpstr (ibus_get_language_name ("eng"), ==, "English"); + + return 0; +} diff --git a/tools/Makefile.am b/tools/Makefile.am new file mode 100644 index 000000000..cd5325597 --- /dev/null +++ b/tools/Makefile.am @@ -0,0 +1,79 @@ +# vim:set noet ts=4: +# +# ibus - The Input Bus +# +# Copyright (c) 2007-2010 Peng Huang +# Copyright (c) 2007-2010 Red Hat, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307 USA + +NULL = + +libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la + +INCLUDES = \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ + $(NULL) + +AM_CFLAGS = \ + @GLIB2_CFLAGS@ \ + @GIO2_CFLAGS@ \ + @GTHREAD2_CFLAGS@ \ + $(INCLUDES) \ + -DG_LOG_DOMAIN=\"IBUS\" \ + -DPKGDATADIR=\"$(pkgdatadir)\" \ + -DLIBEXECDIR=\"$(libexecdir)\" \ + -DBINDIR=\"@bindir@\" \ + -DIBUS_DISABLE_DEPRECATED \ + -Wno-unused-variable \ + -Wno-unused-but-set-variable \ + -Wno-unused-function \ + $(NULL) + +AM_LDADD = \ + @GOBJECT2_LIBS@ \ + @GLIB2_LIBS@ \ + @GIO2_LIBS@ \ + @GTHREAD2_LIBS@ \ + $(libibus) \ + $(NULL) + +AM_VALAFLAGS = \ + --vapidir=$(top_builddir)/bindings/vala \ + --pkg=ibus-1.0 \ + $(NULL) + +bin_PROGRAMS = ibus + +ibus_SOURCES = \ + main.vala \ + $(NULL) + +ibus_LDADD = \ + $(AM_LDADD) \ + $(NULL) + +bash_completion_SCRIPTS= \ + ibus.bash \ + $(NULL) +bash_completiondir=@sysconfdir@/bash_completion.d + +EXTRA_DIST = \ + ibus.bash \ + $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/tools/ibus.bash b/tools/ibus.bash new file mode 100644 index 000000000..18e9d6c6f --- /dev/null +++ b/tools/ibus.bash @@ -0,0 +1,139 @@ +# vim:set et ts=4 sts=4: +# bash completion for ibus +# +# ibus - The Input Bus +# +# Copyright (c) 2007-2010 Peng Huang +# Copyright (c) 2007-2010 Red Hat, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307 USA + +if ! type _get_comp_words_by_ref >/dev/null 2>&1; then +if [[ -z ${ZSH_VERSION:+set} ]]; then +_get_comp_words_by_ref () +{ + local exclude cur_ words_ cword_ + if [ "$1" = "-n" ]; then + exclude=$2 + shift 2 + fi + __git_reassemble_comp_words_by_ref "$exclude" + cur_=${words_[cword_]} + while [ $# -gt 0 ]; do + case "$1" in + cur) + cur=$cur_ + ;; + prev) + prev=${words_[$cword_-1]} + ;; + words) + words=("${words_[@]}") + ;; + cword) + cword=$cword_ + ;; + esac + shift + done +} +else +_get_comp_words_by_ref () +{ + while [ $# -gt 0 ]; do + case "$1" in + cur) + cur=${COMP_WORDS[COMP_CWORD]} + ;; + prev) + prev=${COMP_WORDS[COMP_CWORD-1]} + ;; + words) + words=("${COMP_WORDS[@]}") + ;; + cword) + cword=$COMP_CWORD + ;; + -n) + # assume COMP_WORDBREAKS is already set sanely + shift + ;; + esac + shift + done +} +fi +fi + +__ibus_engine() +{ + if [[ "$cmd" == "$prev" ]]; then + local imes=$( ibus list-engine --name-only 2>/dev/null ) + COMPREPLY=( $( compgen -W "$imes" -- "$cur" | sed "s/^$cur/$cur_/" )) + fi +} + +__ibus_list_engine() +{ + if [[ "$cur" == -* ]]; then + local options=( --name-only ) + COMPREPLY=( $( compgen -W '${options[@]}' -- "$cur" )) + fi +} + +__ibus() +{ + COMPREPLY=() + + local cur_=$2 prev_=$3 cur words cword prev + _get_comp_words_by_ref -n =: cur words cword prev + + # echo + # echo "cur='$cur'" + # echo "prev='$prev'" + # echo "words='${words[@]}'" + # echo "cwords='${cwords[@]}'" + + # Commands + local cmds=( engine list-engine watch restart exit ) + + local i c cmd subcmd + for (( i=1; i < ${#words[@]}-1; i++)) ; do + [[ -n $cmd ]] && subcmd=${words[i]} && break + for c in ${cmds[@]}; do + [[ ${words[i]} == $c ]] && cmd=$c && break + done + done + + case $cmd in + engine) + __ibus_engine; + return 0 + ;; + list-engine) + __ibus_list_engine; + return 0 + ;; + watch) + return 0 + ;; + *) + COMPREPLY=( $( compgen -W '${cmds[@]}' -- "$cur" )) + return 0 + ;; + esac +} && +complete -o bashdefault -o default -o nospace -F __ibus ibus diff --git a/tools/main.vala b/tools/main.vala new file mode 100644 index 000000000..9d4524243 --- /dev/null +++ b/tools/main.vala @@ -0,0 +1,159 @@ +/* vim:set et sts=4 sw=4: + * + * ibus - The Input Bus + * + * Copyright(c) 2011 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or(at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ +using GLib; +using IBus; + + +bool name_only = false; + +class EngineList { + public EngineDesc[] data = {}; +} + +IBus.Bus get_bus() { + IBus.init(); + var bus = new IBus.Bus(); + return bus; +} + +int list_engine(string[] argv) { + const OptionEntry[] options = { + { "name-only", 0, 0, OptionArg.NONE, out name_only, "engine name only", "engine name only" }, + { null } + }; + + var option = new OptionContext("command [OPTIONS]"); + option.add_main_entries(options, "ibus"); + + try { + option.parse(ref argv); + } catch (OptionError e) { + } + + var bus = get_bus(); + + var engines = bus.list_engines(); + + if (name_only) { + foreach (var engine in engines) { + print("%s\n", engine.get_name()); + } + return 0; + } + + var map = new HashTable(GLib.str_hash, GLib.str_equal); + + foreach (var engine in engines) { + var list = map.get(engine.get_language()); + if (list == null) { + list = new EngineList(); + map.insert(engine.get_language(), list); + } + list.data += engine; + } + + foreach (var language in map.get_keys()) { + var list = map.get(language); + print("language: %s\n", IBus.get_language_name(language)); + foreach (var engine in list.data) { + print(" %s - %s\n", engine.get_name(), engine.get_longname()); + } + } + + return 0; +} + +int get_set_engine(string[] argv) { + var bus = get_bus(); + string engine = null; + if (argv.length > 1) + engine = argv[1]; + + if (engine == null) { + var desc = bus.get_global_engine(); + if (desc == null) + return -1; + print("%s\n", desc.get_name()); + return 0; + } + + if(!bus.set_global_engine(engine)) + return -1; + var desc = bus.get_global_engine(); + if (desc == null) + return -1; + string cmdline = "setxkbmap %s".printf(desc.get_layout()); + try { + if (!GLib.Process.spawn_command_line_sync(cmdline)) { + warning("Switch xkb layout to %s failed.", + desc.get_layout()); + } + } catch (GLib.SpawnError e) { + warning("execute setxkblayout failed"); + } + return 0; +} + +int message_watch(string[] argv) { + return 0; +} + +int restart_daemon(string[] argv) { + var bus = get_bus(); + bus.exit(true); + return 0; +} + +int exit_daemon(string[] argv) { + var bus = get_bus(); + bus.exit(false); + return 0; +} + +delegate int EntryFunc(string[] argv); + +struct CommandEntry { + string name; + EntryFunc entry; +} + +public int main(string[] argv) { + const CommandEntry commands[] = { + { "engine", get_set_engine }, + { "exit", exit_daemon }, + { "list-engine", list_engine }, + { "watch", message_watch }, + { "restart", restart_daemon } + }; + + if (argv.length >= 2) { + string[] new_argv = argv[1:argv.length]; + foreach (var command in commands) { + if (command.name == argv[1]) + return command.entry(new_argv); + } + warning("%s is unknown command!", argv[1]); + } + + return -1; +} + diff --git a/ui/Makefile.am b/ui/Makefile.am index a0e287e79..b3a81e133 100644 --- a/ui/Makefile.am +++ b/ui/Makefile.am @@ -20,8 +20,12 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307 USA -if ENABLE_PYTHON +if ENABLE_GTK3 +GTK3_UI = gtk3 +endif + SUBDIRS = \ - gtk \ + $(GTK3_UI) \ $(NULL) -endif + +-include $(top_srcdir)/git.mk diff --git a/ui/gtk/.gitignore b/ui/gtk/.gitignore deleted file mode 100644 index 2dc266a96..000000000 --- a/ui/gtk/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -ibus-ui-gtk -gtkpanel.xml -gtkpanel.xml.in diff --git a/ui/gtk/Makefile.am b/ui/gtk2/Makefile.am similarity index 95% rename from ui/gtk/Makefile.am rename to ui/gtk2/Makefile.am index c78fcae00..1f1974842 100644 --- a/ui/gtk/Makefile.am +++ b/ui/gtk2/Makefile.am @@ -23,6 +23,7 @@ ui_gtk_PYTHON = \ candidatepanel.py \ handle.py \ + i18n.py \ icon.py \ languagebar.py \ main.py \ @@ -68,4 +69,6 @@ test: IBUS_DATAROOTDIR=@datarootdir@ \ IBUS_LOCALEDIR=@localedir@ \ PYTHONPATH=$(top_srcdir) \ - $(PYTHON) $(srcdir)/main.py + $(PYTHON) $(srcdir)/main.py --replace + +-include $(top_srcdir)/git.mk diff --git a/ui/gtk/candidatepanel.py b/ui/gtk2/candidatepanel.py similarity index 95% rename from ui/gtk/candidatepanel.py rename to ui/gtk2/candidatepanel.py index e5b26e3a1..159b2bcf4 100644 --- a/ui/gtk/candidatepanel.py +++ b/ui/gtk2/candidatepanel.py @@ -28,10 +28,7 @@ import ibus from ibus._gtk import PangoAttrList from handle import Handle - -from gettext import dgettext -_ = lambda a : dgettext("ibus", a) -N_ = lambda a : a +from i18n import _, N_ class EventBox(gtk.EventBox): __gtype_name__ = "IBusEventBox" @@ -205,7 +202,6 @@ def __init__(self): gdk.BUTTON_PRESS_MASK | \ gdk.BUTTON_RELEASE_MASK | \ gdk.BUTTON1_MOTION_MASK) - self.__begin_move = False self.__toplevel.connect("size-allocate", lambda w, a: self.__check_position()) self.__orientation = ibus.ORIENTATION_VERTICAL @@ -219,14 +215,14 @@ def __init__(self): self.__aux_attrs = pango.AttrList() self.__lookup_table = None - self.__cursor_location = (0, 0) + self.__cursor_location = (0, 0, 0, 0) self.__moved_cursor_location = None self.__recreate_ui() def __handle_move_end_cb(self, handle): # store moved location - self.__moved_cursor_location = self.__toplevel.get_position() + self.__moved_cursor_location = self.__toplevel.get_position() + (self.__cursor_location[2], self.__cursor_location[3]) def __recreate_ui(self): for w in self: @@ -428,10 +424,10 @@ def cursor_down_lookup_table(self): self.__lookup_table.cursor_down() self.__refresh_candidates() - def set_cursor_location(self, x, y): + def set_cursor_location(self, x, y, w, h): # if cursor location is changed, we reset the moved cursor location - if self.__cursor_location != (x, y): - self.__cursor_location = (x, y) + if self.__cursor_location != (x, y, w, h): + self.__cursor_location = (x, y, w, h) self.__moved_cursor_location = None self.__check_position() @@ -484,21 +480,26 @@ def do_size_request(self, requisition): def __check_position(self): cursor_location = self.__moved_cursor_location or self.__cursor_location - bx = cursor_location[0] + self.__toplevel.allocation.width - by = cursor_location[1] + self.__toplevel.allocation.height + + cursor_right = cursor_location[0] + cursor_location[2] + cursor_bottom = cursor_location[1] + cursor_location[3] + + window_right = cursor_right + self.__toplevel.allocation.width + window_bottom = cursor_bottom + self.__toplevel.allocation.height root_window = gdk.get_default_root_window() sx, sy = root_window.get_size() - if bx > sx: + if window_right > sx: x = sx - self.__toplevel.allocation.width else: - x = cursor_location[0] + x = cursor_right - if by > sy: - y = sy - self.__toplevel.allocation.height + if window_bottom > sy: + # move the window just above the cursor so the window and a preedit string do not overlap. + y = cursor_location[1] - self.__toplevel.allocation.height else: - y = cursor_location[1] + y = cursor_bottom self.move(x, y) diff --git a/ui/gtk/engineabout.py b/ui/gtk2/engineabout.py similarity index 98% rename from ui/gtk/engineabout.py rename to ui/gtk2/engineabout.py index 188a13ae1..a34e93049 100644 --- a/ui/gtk/engineabout.py +++ b/ui/gtk2/engineabout.py @@ -25,9 +25,7 @@ import pango import ibus -from gettext import dgettext -_ = lambda a : dgettext("ibus", a) -N_ = lambda a : a +from i18n import _, N_ class EngineAbout(gtk.Dialog): def __init__(self, enginedesc): diff --git a/ui/gtk/gtkpanel.xml.in.in b/ui/gtk2/gtkpanel.xml.in.in similarity index 100% rename from ui/gtk/gtkpanel.xml.in.in rename to ui/gtk2/gtkpanel.xml.in.in diff --git a/ui/gtk/handle.py b/ui/gtk2/handle.py similarity index 100% rename from ui/gtk/handle.py rename to ui/gtk2/handle.py diff --git a/ui/gtk2/i18n.py b/ui/gtk2/i18n.py new file mode 100644 index 000000000..98f60c4c2 --- /dev/null +++ b/ui/gtk2/i18n.py @@ -0,0 +1,34 @@ +# vim:set et sts=4 sw=4: +# +# ibus - The Input Bus +# +# Copyright(c) 2007-2010 Peng Huang +# Copyright(c) 2007-2010 Google, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or(at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307 USA + +import gettext +import os + +DOMAINNAME = "ibus10" + +_ = lambda a: gettext.dgettext(DOMAINNAME, a) +N_ = lambda a: a + +def init(): + localedir = os.getenv("IBUS_LOCALEDIR") + gettext.bindtextdomain(DOMAINNAME, localedir) + gettext.bind_textdomain_codeset(DOMAINNAME, "UTF-8") diff --git a/ui/gtk/ibus-ui-gtk.in b/ui/gtk2/ibus-ui-gtk.in similarity index 95% rename from ui/gtk/ibus-ui-gtk.in rename to ui/gtk2/ibus-ui-gtk.in index 54db8d039..d73e76d45 100644 --- a/ui/gtk/ibus-ui-gtk.in +++ b/ui/gtk2/ibus-ui-gtk.in @@ -27,5 +27,5 @@ export IBUS_PREFIX=@prefix@ export IBUS_DATAROOTDIR=@datarootdir@ export IBUS_LOCALEDIR=@localedir@ -exec python @prefix@/share/ibus/ui/gtk/main.py $@ +exec @PYTHON@ @prefix@/share/ibus/ui/gtk/main.py $@ diff --git a/ui/gtk/icon.py b/ui/gtk2/icon.py similarity index 100% rename from ui/gtk/icon.py rename to ui/gtk2/icon.py diff --git a/ui/gtk/languagebar.py b/ui/gtk2/languagebar.py similarity index 98% rename from ui/gtk/languagebar.py rename to ui/gtk2/languagebar.py index f22080fc2..c3701a6e3 100644 --- a/ui/gtk/languagebar.py +++ b/ui/gtk2/languagebar.py @@ -29,6 +29,7 @@ from menu import menu_position,\ ImageMenuItem,\ Menu,\ + CheckMenuItem,\ RadioMenuItem,\ SeparatorMenuItem from engineabout import EngineAbout @@ -37,9 +38,7 @@ SeparatorToolItem, \ MenuToolButton -from gettext import dgettext -_ = lambda a : dgettext("ibus", a) -N_ = lambda a : a +from i18n import _, N_ ICON_SIZE = gtk.ICON_SIZE_MENU @@ -355,7 +354,7 @@ def create_im_menu(self, menu): self.__properties.append(item) menu.insert(item, 0) - about_label = _("About") + " - " + self.__im_name + about_label = _("About") + " - " + (self.__im_name or "") prop = ibus.Property(key=u"about", label=unicode(about_label), icon=unicode(gtk.STOCK_ABOUT), @@ -378,6 +377,8 @@ def create_im_menu(self, menu): item = ImageMenuItem(prop = prop) self.__set_item_icon(item, prop) elif prop.type == ibus.PROP_TYPE_TOGGLE: + item = CheckMenuItem(prop = prop) + elif prop.type == ibus.PROP_TYPE_RADIO: item = RadioMenuItem(radio_group, prop = prop) radio_group = item elif prop.type == ibus.PROP_TYPE_SEPARATOR: diff --git a/ui/gtk/main.py b/ui/gtk2/main.py similarity index 72% rename from ui/gtk/main.py rename to ui/gtk2/main.py index 9cfa83f7b..cadcc96ce 100644 --- a/ui/gtk/main.py +++ b/ui/gtk2/main.py @@ -35,12 +35,10 @@ import gettext import panel import pynotify - -from gettext import dgettext -_ = lambda a : dgettext("ibus", a) +from i18n import _, N_ class UIApplication: - def __init__ (self): + def __init__ (self, replace): pynotify.init("ibus") self.__bus = ibus.Bus() self.__bus.connect("disconnected", gtk.main_quit) @@ -52,13 +50,19 @@ def __init__ (self): self.__bus.add_match(match_rule) self.__panel = panel.Panel(self.__bus) - self.__bus.request_name(ibus.IBUS_SERVICE_PANEL, 0) + flag = ibus.BUS_NAME_FLAG_ALLOW_REPLACEMENT + if replace: + flag = flag | ibus.BUS_NAME_FLAG_REPLACE_EXISTING + self.__bus.request_name(ibus.IBUS_SERVICE_PANEL, flag) + self.__bus.get_dbusconn().add_signal_receiver(self.__name_acquired_cb, + signal_name="NameAcquired") + self.__bus.get_dbusconn().add_signal_receiver(self.__name_lost_cb, + signal_name="NameLost") self.__notify = pynotify.Notification("IBus", \ _("Some input methods have been installed, removed or updated. " \ "Please restart ibus input platform."), \ "ibus") self.__notify.set_timeout(10 * 1000) - self.__notify.attach_to_status_icon (self.__panel.get_status_icon()) self.__notify.add_action("restart", _("Restart Now"), self.__restart_cb, None) self.__notify.add_action("ignore", _("Later"), lambda *args: None, None) @@ -69,26 +73,37 @@ def __restart_cb(self, notify, action, data): def __registry_changed_cb(self, bus): self.__notify.show() + def __name_acquired_cb(self, name): + self.__panel.show() + + def __name_lost_cb(self, name): + self.__panel.hide() + def run(self): try: gtk.main() except KeyboardInterrupt: pass -def launch_panel(): +def launch_panel(replace): + settings = gtk.settings_get_default() + if settings.get_property('gtk-fallback-icon-theme') == None: + settings.set_property('gtk-fallback-icon-theme', 'gnome') # gtk.settings_get_default().props.gtk_theme_name = "/home/phuang/.themes/aud-Default/gtk-2.0/gtkrc" # gtk.rc_parse("./themes/default/gtkrc") - UIApplication().run() + UIApplication(replace).run() def print_help(out, v = 0): print >> out, "-h, --help show this message." print >> out, "-d, --daemonize daemonize ibus" + print >> out, "-r, --replace replace existing ibus UI" sys.exit(v) def main(): daemonize = False - shortopt = "hd" - longopt = ["help", "daemonize"] + replace = False + shortopt = "hdr" + longopt = ["help", "daemonize", "replace"] try: opts, args = getopt.getopt(sys.argv[1:], shortopt, longopt) except getopt.GetoptError, err: @@ -99,6 +114,8 @@ def main(): print_help(sys.stdout) elif o in("-d", "--daemonize"): daemonize = True + elif o in("-r", "--replace"): + replace = True else: print >> sys.stderr, "Unknown argument: %s" % o print_help(sys.stderr, 1) @@ -107,10 +124,9 @@ def main(): if os.fork(): sys.exit() - launch_panel() + launch_panel(replace) if __name__ == "__main__": - localedir = os.getenv("IBUS_LOCALEDIR") - gettext.bindtextdomain("ibus", localedir) - gettext.bind_textdomain_codeset("ibus", "UTF-8") + import i18n + i18n.init() main() diff --git a/ui/gtk/menu.py b/ui/gtk2/menu.py similarity index 98% rename from ui/gtk/menu.py rename to ui/gtk2/menu.py index b9a6b441c..53fa39fd3 100644 --- a/ui/gtk/menu.py +++ b/ui/gtk2/menu.py @@ -59,7 +59,7 @@ def __create_items(self, props): item = SeparatorMenuItem() radio_group = None elif prop.type == ibus.PROP_TYPE_MENU: - item = gtk.ImageMenuItem() + item = ImageMenuItem(prop) if prop.icon: size = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU) item.set_image(icon.IconWidget(prop.icon, size[0])) @@ -238,6 +238,9 @@ class SeparatorMenuItem(gtk.SeparatorMenuItem, PropItem): (gobject.TYPE_STRING, gobject.TYPE_INT)), } + def __init__(self): + gtk.SeparatorMenuItem.__init__(self) + PropItem.__init__(self, None) def menu_position(menu, button): diff --git a/ui/gtk/notifications.py b/ui/gtk2/notifications.py similarity index 98% rename from ui/gtk/notifications.py rename to ui/gtk2/notifications.py index 002d6a948..979149e46 100644 --- a/ui/gtk/notifications.py +++ b/ui/gtk2/notifications.py @@ -31,8 +31,7 @@ from os import path from ibus import interface -from gettext import dgettext -_ = lambda a : dgettext("ibus", a) +_ = ibus._ N_ = lambda a : a class Notifications(ibus.NotificationsBase): diff --git a/ui/gtk/panel.py b/ui/gtk2/panel.py similarity index 87% rename from ui/gtk/panel.py rename to ui/gtk2/panel.py index 0efc85b1e..42dde5d0f 100644 --- a/ui/gtk/panel.py +++ b/ui/gtk2/panel.py @@ -22,6 +22,7 @@ import gtk import gtk.gdk as gdk +import glib import gobject import ibus import icon as _icon @@ -34,11 +35,9 @@ from candidatepanel import CandidatePanel from engineabout import EngineAbout -from gettext import dgettext -_ = lambda a : dgettext("ibus", a) -N_ = lambda a : a +from i18n import _, N_ -ICON_KEYBOARD = "ibus-keyboard" +ICON_KEYBOARD = ibus.get_ICON_KEYBOARD() ICON_ENGINE = "ibus-engine" def show_uri(screen, link): @@ -63,15 +62,12 @@ def __init__(self, bus): self.__bus = bus self.__config = self.__bus.get_config() self.__focus_ic = None - self.__setup_pid = 0 + self.__setup_pid = None self.__prefix = os.getenv("IBUS_PREFIX") self.__data_dir = path.join(self.__prefix, "share", "ibus") # self.__icons_dir = path.join(self.__data_dir, "icons") self.__setup_cmd = path.join(self.__prefix, "bin", "ibus-setup") - # hanlder signal - signal.signal(signal.SIGCHLD, self.__sigchld_cb) - # connect bus signal self.__config.connect("value-changed", self.__config_value_changed_cb) self.__config.connect("reloaded", self.__config_reloaded_cb) @@ -107,22 +103,37 @@ def __init__(self, bus): self.__status_icon = gtk.StatusIcon() + # gnome-shell checks XClassHint.res_class with ShellTrayIcon. + # gtk_status_icon_set_name() can set XClassHint.res_class . + # However gtk_status_icon_new() also calls gtk_window_realize() so + # gtk_status_icon_set_visible() needs to be called to set WM_CLASS + # so that gtk_window_realize() is called later again. + # set_title is for gnome-shell notificationDaemon in bottom right. + self.__status_icon.set_visible(False) + # gtk_status_icon_set_name() is not available in pygtk2 2.17 + if hasattr(self.__status_icon, 'set_name'): + self.__status_icon.set_name('ibus-ui-gtk') + self.__status_icon.set_title(_("IBus Panel")) + # Hide icon until bus get the name owner. + #self.__status_icon.set_visible(True) self.__status_icon.connect("popup-menu", self.__status_icon_popup_menu_cb) self.__status_icon.connect("activate", self.__status_icon_activate_cb) self.__status_icon.set_from_icon_name(ICON_KEYBOARD) self.__status_icon.set_tooltip(_("IBus input method framework")) - self.__status_icon.set_visible(True) + # Hide icon until bus get the name owner. + #self.__status_icon.set_visible(True) self.__config_load_lookup_table_orientation() self.__config_load_show() self.__config_load_position() self.__config_load_custom_font() - self.__config_load_show_icon_on_systray() + # Hide icon until bus get the name owner. + #self.__config_load_show_icon_on_systray() self.__config_load_show_im_name() # self.__bus.request_name(ibus.panel.IBUS_SERVICE_PANEL, 0) def set_cursor_location(self, x, y, w, h): - self.__candidate_panel.set_cursor_location(x + w, y + h) + self.__candidate_panel.set_cursor_location(x, y, w, h) def update_preedit_text(self, text, cursor_pos, visible): self.__candidate_panel.update_preedit_text(text, cursor_pos, visible) @@ -184,6 +195,16 @@ def update_property(self, prop): def get_status_icon(self): return self.__status_icon + def hide(self): + if self.__status_icon == None: + return + self.__status_icon.set_visible(False) + + def show(self): + if self.__status_icon == None: + return + self.__config_load_show_icon_on_systray() + def __set_im_icon(self, icon_name): if not icon_name: icon_name = ICON_ENGINE @@ -199,7 +220,7 @@ def __set_im_name(self, name): def focus_in(self, ic): self.reset() self.__focus_ic = ibus.InputContext(self.__bus, ic) - enabled = self.__focus_ic.is_enabled() + enabled = True or self.__focus_ic.is_enabled() self.__language_bar.set_enabled(enabled) if not enabled: @@ -393,7 +414,11 @@ def __create_sys_menu(self): # return menu def __create_im_menu(self): - engines = self.__bus.list_active_engines() + # FIXME + # engines = self.__bus.list_engines() + names = self.__config.get_value("general", "preload_engines", + ["xkb:us::eng", "xkb:us:intl:eng", "pinyin"]) + engines = self.__bus.get_engines_by_names(names) current_engine = \ (self.__focus_ic != None and self.__focus_ic.get_engine()) or \ (engines and engines[0]) or \ @@ -418,7 +443,7 @@ def __create_im_menu(self): item = gtk.ImageMenuItem(_("Turn off input method")) item.set_image(_icon.IconWidget("gtk-close", size[0])) item.connect("activate", self.__im_menu_item_activate_cb, None) - if self.__focus_ic == None or not self.__focus_ic.is_enabled(): + if self.__focus_ic == None: item.set_sensitive(False) menu.add(item) @@ -456,7 +481,7 @@ def __status_icon_activate_cb(self, status_icon): menu = gtk.Menu() item = gtk.ImageMenuItem(_("No input window")) size = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU) - item.set_image(_icon.IconWidget("gtk-info", size[0])) + item.set_image(_icon.IconWidget("gtk-dialog-info", size[0])) menu.add(item) menu.show_all() else: @@ -501,20 +526,23 @@ def __sys_menu_item_activate_cb(self, item, command): else: print >> sys.stderr, "Unknown command %s" % command - def __sigchld_cb(self, sig, sf): - try: - pid, status = os.wait() - if self.__setup_pid == pid: - self.__setup_pid = 0 - except: - pass + def __child_watch_cb(self, pid, status): + if self.__setup_pid == pid: + self.__setup_pid.close() + self.__setup_pid = None def __start_setup(self): - if self.__setup_pid != 0: - pid, state = os.waitpid(self.__setup_pid, os.P_NOWAIT) - if pid != self.__setup_pid: + if self.__setup_pid != None: + try: + # if setup dialog is running, bring the dialog to front by SIGUSR1 os.kill(self.__setup_pid, signal.SIGUSR1) return - self.__setup_pid = 0 - self.__setup_pid = os.spawnl(os.P_NOWAIT, self.__setup_cmd, "ibus-setup") - + except OSError: + # seems the setup dialog is not running anymore + self.__setup_pid.close() + self.__setup_pid = None + + pid = glib.spawn_async(argv=[self.__setup_cmd, "ibus-setup"], + flags=glib.SPAWN_DO_NOT_REAP_CHILD)[0] + self.__setup_pid = pid + glib.child_watch_add(self.__setup_pid, self.__child_watch_cb) diff --git a/ui/gtk/propitem.py b/ui/gtk2/propitem.py similarity index 100% rename from ui/gtk/propitem.py rename to ui/gtk2/propitem.py diff --git a/ui/gtk/toolitem.py b/ui/gtk2/toolitem.py similarity index 95% rename from ui/gtk/toolitem.py rename to ui/gtk2/toolitem.py index 4bdffbaa7..4f4f97d42 100644 --- a/ui/gtk/toolitem.py +++ b/ui/gtk2/toolitem.py @@ -73,11 +73,9 @@ def property_changed(self): self.set_icon_name(self._prop.icon) if self._prop.visible: - self.set_no_show_all(False) - self.show_all() + self.show() else: - self.set_no_show_all(True) - self.hide_all() + self.hide() def do_clicked(self): self.emit("property-activate", self._prop.key, self._prop.state) @@ -128,11 +126,9 @@ def property_changed(self): self.set_active(self._prop.state == ibus.PROP_STATE_CHECKED) self.set_sensitive(self._prop.sensitive) if self._prop.visible: - self.set_no_show_all(False) - self.show_all() + self.show() else: - self.set_no_show_all(True) - self.hide_all() + self.hide() def do_toggled(self): # Do not send property-activate to engine in case the event is diff --git a/ui/gtk3/Makefile.am b/ui/gtk3/Makefile.am new file mode 100644 index 000000000..0fb9d3c6d --- /dev/null +++ b/ui/gtk3/Makefile.am @@ -0,0 +1,113 @@ +# vim:set noet ts=4: +# +# ibus - The Input Bus +# +# Copyright (c) 2007-2010 Peng Huang +# Copyright (c) 2007-2010 Red Hat, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307 USA + +NULL = + +libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la + +component_DATA = \ + gtkpanel.xml \ + $(NULL) +componentdir = $(pkgdatadir)/component + +gtkpanel.xml: gtkpanel.xml.in + $(AM_V_GEN) \ + ( \ + libexecdir=${libexecdir}; \ + s=`cat $<`; \ + eval "echo \"$${s}\""; \ + ) > $@ + +INCLUDES = \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ + $(NULL) + +AM_CFLAGS = \ + @GLIB2_CFLAGS@ \ + @GIO2_CFLAGS@ \ + @GTHREAD2_CFLAGS@ \ + @GTK3_CFLAGS@ \ + @X11_CFLAGS@ \ + $(INCLUDES) \ + -DGETTEXT_PACKAGE=\"@GETTEXT_PACKAGE@\" \ + -DG_LOG_DOMAIN=\"IBUS\" \ + -DPKGDATADIR=\"$(pkgdatadir)\" \ + -DLIBEXECDIR=\"$(libexecdir)\" \ + -DBINDIR=\"@bindir@\" \ + -DIBUS_DISABLE_DEPRECATED \ + -DIBUS_VERSION=\"@IBUS_VERSION@\" \ + -Wno-unused-variable \ + -Wno-unused-but-set-variable \ + -Wno-unused-function \ + $(NULL) + +AM_LDADD = \ + @GOBJECT2_LIBS@ \ + @GLIB2_LIBS@ \ + @GIO2_LIBS@ \ + @GTHREAD2_LIBS@ \ + @GTK3_LIBS@ \ + @X11_LIBS@ \ + -lXi \ + $(libibus) \ + $(NULL) + +AM_VALAFLAGS = \ + --vapidir=$(top_builddir)/bindings/vala \ + --pkg=posix \ + --pkg=gtk+-3.0 \ + --pkg=gdk-x11-3.0 \ + --pkg=ibus-1.0 \ + $(NULL) + +libexec_PROGRAMS = ibus-ui-gtk3 + +ibus_ui_gtk3_SOURCES = \ + application.vala \ + candidatearea.vala \ + candidatepanel.vala \ + handle.vala \ + iconwidget.vala \ + keybindingmanager.vala \ + panel.vala \ + pango.vala \ + property.vala \ + separator.vala \ + switcher.vala \ + grabkeycode.c \ + $(NULL) + +ibus_ui_gtk3_LDADD = \ + $(AM_LDADD) \ + $(NULL) + +CLEANFILES = \ + gtkpanel.xml \ + $(NULL) + +EXTRA_DIST = \ + gtkpanel.xml.in.in \ + $(NULL) + + +-include $(top_srcdir)/git.mk diff --git a/ui/gtk3/application.vala b/ui/gtk3/application.vala new file mode 100644 index 000000000..280da57a3 --- /dev/null +++ b/ui/gtk3/application.vala @@ -0,0 +1,134 @@ +/* vim:set et sts=4 sw=4: + * + * ibus - The Input Bus + * + * Copyright(c) 2011 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or(at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +using IBus; +using GLib; +using Gtk; + +class Application { + private IBus.Bus m_bus; + private Panel m_panel; + private IBus.Config m_config; + + public Application(string[] argv) { + IBus.init(); + Gtk.init(ref argv); + + m_bus = new IBus.Bus(); + + m_bus.connected.connect(bus_connected); + m_bus.disconnected.connect(bus_disconnected); + + if (m_bus.is_connected()) { + init(); + } + } + + private void init() { + DBusConnection connection = m_bus.get_connection(); + connection.signal_subscribe("org.freedesktop.DBus", + "org.freedesktop.DBus", + "NameAcquired", + "/org/freedesktop/DBus", + IBus.SERVICE_PANEL, + DBusSignalFlags.NONE, + bus_name_acquired_cb); + connection.signal_subscribe("org.freedesktop.DBus", + "org.freedesktop.DBus", + "NameLost", + "/org/freedesktop/DBus", + IBus.SERVICE_PANEL, + DBusSignalFlags.NONE, + bus_name_lost_cb); + var flags = + IBus.BusNameFlag.ALLOW_REPLACEMENT | + IBus.BusNameFlag.REPLACE_EXISTING; + m_bus.request_name(IBus.SERVICE_PANEL, flags); + + m_config = m_bus.get_config(); + connection.signal_subscribe("org.freedesktop.DBus", + "org.freedesktop.DBus", + "NameOwnerChanged", + "/org/freedesktop/DBus", + IBus.SERVICE_CONFIG, + DBusSignalFlags.NONE, + config_name_owner_changed_cb); + } + + public int run() { + Gtk.main(); + return 0; + } + + private void bus_name_acquired_cb(DBusConnection connection, + string sender_name, + string object_path, + string interface_name, + string signal_name, + Variant parameters) { + debug("signal_name = %s", signal_name); + m_panel = new Panel(m_bus); + m_panel.set_config(m_config); + } + + private void bus_name_lost_cb(DBusConnection connection, + string sender_name, + string object_path, + string interface_name, + string signal_name, + Variant parameters) { + debug("signal_name = %s", signal_name); + m_panel = null; + } + + private void config_name_owner_changed_cb(DBusConnection connection, + string sender_name, + string object_path, + string interface_name, + string signal_name, + Variant parameters) { + debug("signal_name = %s", signal_name); + string name, new_owner, old_owner; + parameters.get("(sss)", out name, out new_owner, out old_owner); + if (new_owner == "") { + m_config = null; + } else { + m_config = m_bus.get_config(); + } + if (m_panel != null) + m_panel.set_config(m_config); + } + + private void bus_disconnected(IBus.Bus bus) { + debug("connection is lost."); + Gtk.main_quit(); + } + + private void bus_connected(IBus.Bus bus) { + init(); + } + + public static void main(string[] argv) { + Application app = new Application(argv); + app.run(); + } +} diff --git a/ui/gtk3/candidatearea.vala b/ui/gtk3/candidatearea.vala new file mode 100644 index 000000000..13ebf769e --- /dev/null +++ b/ui/gtk3/candidatearea.vala @@ -0,0 +1,252 @@ +/* vim:set et sts=4 sw=4: + * + * ibus - The Input Bus + * + * Copyright(c) 2011 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or(at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +using Gtk; +using IBus; +using Pango; + +class CandidateArea : Gtk.Box { + private bool m_vertical; + private Gtk.Label[] m_labels; + private Gtk.Label[] m_candidates; + private Gtk.Widget[] m_widgets; + + private IBus.Text[] m_ibus_candidates; + private uint m_focus_candidate; + private bool m_show_cursor; + + public signal void candidate_clicked(uint index, uint button, uint state); + public signal void page_up(); + public signal void page_down(); + public signal void cursor_up(); + public signal void cursor_down(); + + public CandidateArea(bool vertical) { + GLib.Object( + orientation: vertical ? Gtk.Orientation.VERTICAL : Gtk.Orientation.HORIZONTAL + ); + m_vertical = vertical; + recreate_ui(); + show_all(); + } + + public void set_vertical(bool vertical) { + if (m_vertical == vertical) + return; + m_vertical = vertical; + recreate_ui(); + + // Workaround a vala issue https://bugzilla.gnome.org/show_bug.cgi?id=661130 + set_candidates((owned)m_ibus_candidates, m_focus_candidate, m_show_cursor); + if (m_candidates.length > 0) + show_all(); + } + + public void set_labels(string[] labels) { + if (labels == null) { + const string labels[] = { + "1.", "2.", "3.", "4.", "5.", "6.", "7.", "8.", + "9.", "0.", "a.", "b.", "c.", "d.", "e.", "f." + }; + for (int i = 0 ; i < 16; i++) + m_labels[i].set_text(labels[i]); + } else { + int i = 0; + foreach (string label in labels) + m_labels[i].set_text(label); + } + } + + public void set_candidates(IBus.Text[] candidates, + uint focus_candidate = 0, + bool show_cursor = true) { + m_ibus_candidates = candidates; + m_focus_candidate = focus_candidate; + m_show_cursor = show_cursor; + + assert(candidates.length < 16); + for (int i = 0 ; i < 16 ; i++) { + Gtk.Label label = m_candidates[i]; + bool visible = false; + if (i < candidates.length) { + Pango.AttrList attrs = get_pango_attr_list_from_ibus_text(candidates[i]); + if (i == focus_candidate && show_cursor) { + Gtk.StyleContext context = m_candidates[i].get_style_context(); + Gdk.RGBA color = context.get_color(Gtk.StateFlags.SELECTED); + Pango.Attribute pango_attr = Pango.attr_foreground_new( + (uint16)(color.red * uint16.MAX), + (uint16)(color.green * uint16.MAX), + (uint16)(color.blue * uint16.MAX)); + pango_attr.start_index = 0; + pango_attr.end_index = candidates[i].get_text().length; + attrs.insert((owned)pango_attr); + + color = context.get_background_color(Gtk.StateFlags.SELECTED); + pango_attr = Pango.attr_background_new( + (uint16)(color.red * uint16.MAX), + (uint16)(color.green * uint16.MAX), + (uint16)(color.blue * uint16.MAX)); + pango_attr.start_index = 0; + pango_attr.end_index = candidates[i].get_text().length; + attrs.insert((owned)pango_attr); + } + label.set_text(candidates[i].get_text()); + label.set_attributes(attrs); + visible = true; + } else { + label.set_text(""); + label.set_attributes(new Pango.AttrList()); + } + if (m_vertical) { + m_widgets[i * 2].set_visible(visible); + m_widgets[i * 2 +1].set_visible(visible); + } else { + m_widgets[i].set_visible(visible); + } + } + } + + private void recreate_ui() { + foreach (Gtk.Widget w in get_children()) { + w.destroy(); + } + + const string labels[] = { + "1.", "2.", "3.", "4.", "5.", "6.", "7.", "8.", + "9.", "0.", "a.", "b.", "c.", "d.", "e.", "f." + }; + + Gtk.Button prev_button = new Gtk.Button(); + prev_button.clicked.connect((b) => page_up()); + prev_button.set_image(new Gtk.Image.from_icon_name(Gtk.Stock.GO_UP, Gtk.IconSize.MENU)); + prev_button.set_relief(Gtk.ReliefStyle.NONE); + + Gtk.Button next_button = new Gtk.Button(); + next_button.clicked.connect((b) => page_down()); + next_button.set_image(new Gtk.Image.from_icon_name(Gtk.Stock.GO_DOWN, Gtk.IconSize.MENU)); + next_button.set_relief(Gtk.ReliefStyle.NONE); + + if (m_vertical) { + // Add Candidates + Gtk.HBox candidates_hbox = new Gtk.HBox(false, 0); + pack_start(candidates_hbox, false, false, 0); + Gtk.VBox labels_vbox = new Gtk.VBox(true, 0); + Gtk.VBox candidates_vbox = new Gtk.VBox(true, 0); + candidates_hbox.pack_start(labels_vbox, false, false, 4); + candidates_hbox.pack_start(new VSeparator(), false, false, 0); + candidates_hbox.pack_start(candidates_vbox, true, true, 4); + + // Add HSeparator + pack_start(new HSeparator(), false, false, 0); + + // Add buttons + Gtk.HBox buttons_hbox = new Gtk.HBox(false, 0); + Gtk.Label state_label = new Gtk.Label(null); + state_label.set_size_request(20, -1); + buttons_hbox.pack_start(state_label, true, true, 0); + buttons_hbox.pack_start(prev_button, false, false, 0); + buttons_hbox.pack_start(next_button, false, false, 0); + pack_start(buttons_hbox, false, false, 0); + + m_labels = {}; + m_candidates = {}; + m_widgets = {}; + for (int i = 0; i < 16; i++) { + Gtk.Label label = new Gtk.Label(labels[i]); + label.set_alignment(0.0f, 0.5f); + label.show(); + m_labels += label; + + Gtk.Label candidate = new Gtk.Label("test"); + candidate.set_alignment(0.0f, 0.5f); + candidate.show(); + m_candidates += candidate; + + label.set_property("xpad", 8); + candidate.set_property("xpad", 8); + + // Make a copy of i to workaround a bug in vala. + // https://bugzilla.gnome.org/show_bug.cgi?id=628336 + int index = i; + Gtk.EventBox label_ebox = new Gtk.EventBox(); + label_ebox.set_no_show_all(true); + label_ebox.button_press_event.connect((w, e) => { + candidate_clicked(i, e.button, e.state); + return true; + }); + label_ebox.add(label); + labels_vbox.pack_start(label_ebox, false, false, 2); + m_widgets += label_ebox; + + Gtk.EventBox candidate_ebox = new Gtk.EventBox(); + candidate_ebox.set_no_show_all(true); + candidate_ebox.button_press_event.connect((w, e) => { + candidate_clicked(index, e.button, e.state); + return true; + }); + candidate_ebox.add(candidate); + candidates_vbox.pack_start(candidate_ebox, false, false, 2); + m_widgets += candidate_ebox; + } + } else { + Gtk.HBox hbox = new Gtk.HBox(false, 0); + add(hbox); + + m_labels = {}; + m_candidates = {}; + m_widgets = {}; + for (int i = 0; i < 16; i++) { + Gtk.Label label = new Gtk.Label(labels[i]); + label.set_alignment(0.0f, 0.5f); + label.show(); + m_labels += label; + + Gtk.Label candidate = new Gtk.Label("test"); + candidate.set_alignment(0.0f, 0.5f); + candidate.show(); + m_candidates += candidate; + + Gtk.HBox candidate_hbox = new Gtk.HBox(false, 0); + candidate_hbox.show(); + candidate_hbox.pack_start(label, false, false, 2); + candidate_hbox.pack_start(candidate, false, false, 2); + + // Make a copy of i to workaround a bug in vala. + // https://bugzilla.gnome.org/show_bug.cgi?id=628336 + int index = i; + Gtk.EventBox ebox = new Gtk.EventBox(); + ebox.set_no_show_all(true); + ebox.button_press_event.connect((w, e) => { + candidate_clicked(index, e.button, e.state); + return true; + }); + ebox.add(candidate_hbox); + hbox.pack_start(ebox, false, false, 4); + m_widgets += ebox; + } + hbox.pack_start(new VSeparator(), false, false, 0); + hbox.pack_start(prev_button, false, false, 0); + hbox.pack_start(next_button, false, false, 0); + } + } +} + diff --git a/ui/gtk3/candidatepanel.vala b/ui/gtk3/candidatepanel.vala new file mode 100644 index 000000000..d02c06d66 --- /dev/null +++ b/ui/gtk3/candidatepanel.vala @@ -0,0 +1,243 @@ +/* vim:set et sts=4 sw=4: + * + * ibus - The Input Bus + * + * Copyright(c) 2011 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or(at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +using Gtk; +using Pango; + +public class CandidatePanel : Gtk.HBox{ + private bool m_vertical = true; + private Gtk.Window m_toplevel; + private Gtk.VBox m_vbox; + + private Gtk.Label m_preedit_label; + private Gtk.Label m_aux_label; + private CandidateArea m_candidate_area; + private HSeparator m_hseparator; + + private Gdk.Rectangle m_cursor_location; + + public signal void cursor_up(); + public signal void cursor_down(); + public signal void page_up(); + public signal void page_down(); + public signal void candidate_clicked(uint index, + uint button, + uint state); + + public CandidatePanel() { + // Call base class constructor + GLib.Object( + name : "IBusCandidate", + visible: true + ); + + m_toplevel = new Gtk.Window(Gtk.WindowType.POPUP); + m_toplevel.add_events(Gdk.EventMask.BUTTON_PRESS_MASK); + m_toplevel.button_press_event.connect((w, e) => { + if (e.button != 1 || (e.state & Gdk.ModifierType.CONTROL_MASK) == 0) + return false; + set_vertical(!m_vertical); + return true; + }); + + Handle handle = new Handle(); + handle.set_visible(true); + pack_start(handle, false, false, 0); + + m_vbox = new Gtk.VBox(false, 0); + m_vbox.set_visible(true); + pack_start(m_vbox, false, false, 0); + + m_toplevel.add(this); + + create_ui(); + } + + public void set_vertical(bool vertical) { + if (m_vertical == vertical) + return; + m_vertical = vertical; + m_candidate_area.set_vertical(vertical); + } + + public void set_cursor_location(int x, int y, int width, int height) { + Gdk.Rectangle location = { x, y, width, height }; + if (m_cursor_location == location) + return; + m_cursor_location = location; + adjust_window_position(); + } + + public void set_labels(string[] labels) { + m_candidate_area.set_labels(labels); + } + + public void set_preedit_text(IBus.Text? text, uint cursor) { + if (text != null) { + m_preedit_label.set_text(text.get_text()); + m_preedit_label.show(); + } else { + m_preedit_label.set_text(""); + m_preedit_label.hide(); + } + update(); + } + + public void set_auxiliary_text(IBus.Text? text) { + if (text != null) { + m_aux_label.set_text(text.get_text()); + m_aux_label.show(); + } else { + m_aux_label.set_text(""); + m_aux_label.hide(); + } + update(); + } + + public void set_lookup_table(IBus.LookupTable? table) { + IBus.Text[] candidates = {}; + uint cursor_in_page = 0; + bool show_cursor = true; + + if (table != null) { + uint page_size = table.get_page_size(); + uint ncandidates = table.get_number_of_candidates(); + uint cursor = table.get_cursor_pos(); + cursor_in_page = table.get_cursor_in_page(); + show_cursor = table.is_cursor_visible(); + + uint page_start_pos = cursor / page_size * page_size; + uint page_end_pos = uint.min(page_start_pos + page_size, ncandidates); + for (uint i = page_start_pos; i < page_end_pos; i++) + candidates += table.get_candidate(i); + } + m_candidate_area.set_candidates(candidates, cursor_in_page, show_cursor); + if (candidates.length != 0) + m_candidate_area.show_all(); + else + m_candidate_area.hide(); + + update(); + } + + private void update() { + if (m_candidate_area.get_visible() || + m_preedit_label.get_visible() || + m_aux_label.get_visible()) + m_toplevel.show(); + else + m_toplevel.hide(); + + if (m_aux_label.get_visible() && + (m_candidate_area.get_visible() || m_preedit_label.get_visible())) + m_hseparator.show(); + else + m_hseparator.hide(); + } + + public override void get_preferred_width(out int minimum_width, out int natural_width) { + base.get_preferred_width(out minimum_width, out natural_width); + m_toplevel.resize(1, 1); + } + + public override void get_preferred_height(out int minimum_width, out int natural_width) { + base.get_preferred_height(out minimum_width, out natural_width); + m_toplevel.resize(1, 1); + } + + private void create_ui() { + m_preedit_label = new Gtk.Label(null); + m_preedit_label.set_size_request(20, -1); + m_preedit_label.set_alignment(0.0f, 0.5f); + m_preedit_label.set_padding(8, 0); + m_preedit_label.set_no_show_all(true); + + m_aux_label = new Gtk.Label(null); + m_aux_label.set_size_request(20, -1); + m_aux_label.set_alignment(0.0f, 0.5f); + m_aux_label.set_padding(8, 0); + m_aux_label.set_no_show_all(true); + + m_candidate_area = new CandidateArea(m_vertical); + m_candidate_area.candidate_clicked.connect( + (w, i, b, s) => candidate_clicked(i, b, s)); + m_candidate_area.page_up.connect((c) => page_up()); + m_candidate_area.page_down.connect((c) => page_down()); + m_candidate_area.cursor_up.connect((c) => cursor_up()); + m_candidate_area.cursor_down.connect((c) => cursor_down()); + + m_hseparator = new HSeparator(); + m_hseparator.set_visible(true); + + pack_all_widgets(); + } + + private void pack_all_widgets() { + m_vbox.pack_start(m_preedit_label, false, false, 4); + m_vbox.pack_start(m_aux_label, false, false, 4); + m_vbox.pack_start(m_hseparator, false, false, 0); + m_vbox.pack_start(m_candidate_area, false, false, 0); + } + + public new void show() { + m_toplevel.show_all(); + } + + public new void hide() { + m_toplevel.hide(); + } + + private void move(int x, int y) { + m_toplevel.move(x, y); + } + + private void adjust_window_position() { + Gdk.Point cursor_right_bottom = { + m_cursor_location.x + m_cursor_location.width, + m_cursor_location.y + m_cursor_location.height + }; + + Gtk.Allocation allocation; + m_toplevel.get_allocation(out allocation); + Gdk.Point window_right_bottom = { + cursor_right_bottom.x + allocation.width, + cursor_right_bottom.y + allocation.height + }; + + Gdk.Window root = Gdk.get_default_root_window(); + int root_width = root.get_width(); + int root_height = root.get_height(); + + int x, y; + if (window_right_bottom.x > root_width) + x = root_width - allocation.width; + else + x = cursor_right_bottom.x; + + if (window_right_bottom.y > root_height) + y = m_cursor_location.y - allocation.height; + else + y = cursor_right_bottom.y; + + move(x, y); + } +} diff --git a/ui/gtk3/grabkeycode.c b/ui/gtk3/grabkeycode.c new file mode 100644 index 000000000..200f95641 --- /dev/null +++ b/ui/gtk3/grabkeycode.c @@ -0,0 +1,105 @@ +/* vim:set et sts=4 sw=4: + * + * ibus - The Input Bus + * + * Copyright(c) 2011 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or(at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +#include +#include +#include + +gboolean grab_keycode (GdkDisplay *display, + guint keyval, + guint modifiers) { + Display *xdisplay = GDK_DISPLAY_XDISPLAY (display); + int keycode = XKeysymToKeycode (xdisplay, keyval); + if (keycode == 0) { + g_warning ("Can not convert keyval=%u to keycode!", keyval); + return FALSE; + } + + XIEventMask mask; + mask.deviceid = XIAllMasterDevices; + mask.mask_len = XIMaskLen(XI_RawMotion); + mask.mask = g_new0 (unsigned char, mask.mask_len); + XISetMask (mask.mask, XI_KeyPress); + XISetMask (mask.mask, XI_KeyRelease); + + XIGrabModifiers ximodifiers[] = { + {modifiers, 0}, + {Mod2Mask | modifiers, 0}, + {LockMask | modifiers, 0}, + {Mod5Mask | modifiers, 0}, + {Mod2Mask | LockMask | modifiers, 0}, + {Mod2Mask | Mod5Mask | modifiers, 0}, + {LockMask | Mod5Mask | modifiers, 0}, + {Mod2Mask | LockMask | Mod5Mask | modifiers, 0}, + }; + + int retval = XIGrabKeycode (xdisplay, + XIAllMasterDevices, + keycode, + DefaultRootWindow (xdisplay), + GrabModeAsync, + GrabModeAsync, + True, + &mask, + G_N_ELEMENTS (ximodifiers), + ximodifiers); + + g_free (mask.mask); + + if (retval == -1) + return FALSE; + return TRUE; +} + +gboolean ungrab_keycode (GdkDisplay *display, + guint keyval, + guint modifiers) { + Display *xdisplay = GDK_DISPLAY_XDISPLAY (display); + int keycode = XKeysymToKeycode (xdisplay, keyval); + if (keycode == 0) { + g_warning ("Can not convert keyval=%u to keycode!", keyval); + return FALSE; + } + + XIGrabModifiers ximodifiers[] = { + {modifiers, 0}, + {Mod2Mask | modifiers, 0}, + {LockMask | modifiers, 0}, + {Mod5Mask | modifiers, 0}, + {Mod2Mask | LockMask | modifiers, 0}, + {Mod2Mask | Mod5Mask | modifiers, 0}, + {LockMask | Mod5Mask | modifiers, 0}, + {Mod2Mask | LockMask | Mod5Mask | modifiers, 0}, + }; + + int retval = XIUngrabKeycode (xdisplay, + XIAllMasterDevices, + keycode, + DefaultRootWindow (xdisplay), + G_N_ELEMENTS (ximodifiers), + ximodifiers); + + if (retval == -1) + return FALSE; + + return TRUE; +} diff --git a/ui/gtk3/gtkpanel.xml.in.in b/ui/gtk3/gtkpanel.xml.in.in new file mode 100644 index 000000000..c480bcdc5 --- /dev/null +++ b/ui/gtk3/gtkpanel.xml.in.in @@ -0,0 +1,12 @@ + + + + org.freedesktop.IBus.Panel + Gtk Panel Component + ${libexecdir}/ibus-ui-gtk3 + @VERSION@ + Peng Huang <shawn.p.huang@gmail.com> + GPL + http://code.google.com/p/ibus + ibus + diff --git a/ui/gtk3/handle.vala b/ui/gtk3/handle.vala new file mode 100644 index 000000000..6738415f5 --- /dev/null +++ b/ui/gtk3/handle.vala @@ -0,0 +1,161 @@ +/* vim:set et sts=4 sw=4: + * + * ibus - The Input Bus + * + * Copyright(c) 2011 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or(at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +using Cairo; +using Gdk; +using Gtk; + +class Handle : Gtk.EventBox { + private bool m_move_begined; + private Gdk.Rectangle m_workarea; + private Gdk.Point m_press_pos; + + public signal void move_begin(); + public signal void move_end(); + + public Handle() { + set_size_request(6, -1); + Gdk.EventMask mask = Gdk.EventMask.EXPOSURE_MASK | + Gdk.EventMask.BUTTON_PRESS_MASK | + Gdk.EventMask.BUTTON_RELEASE_MASK | + Gdk.EventMask.BUTTON1_MOTION_MASK; + set_events(mask); + m_move_begined = false; + } + + public override void realize() { + base.realize(); + // get_window().set_cursor(new Gdk.Cursor(Gdk.CursorType.FLEUR)); + } + + public override bool button_press_event(Gdk.EventButton event) { + if (event.button != 1) + return false; + m_workarea = {0, 0, int.MAX, int.MAX}; + do { + Gdk.Window root = Gdk.get_default_root_window(); + Gdk.Atom property = Gdk.Atom.intern("_NET_CURRENT_DESKTOP", false); + Gdk.Atom type = Gdk.Atom.intern("CARDINAL", false); + Gdk.Atom actual_type; + int format; + uchar[] data; + bool result; + result = Gdk.property_get(root, + property, + type, + 0, long.MAX, + 0, + out actual_type, + out format, + out data); + if (!result || actual_type != type || format != 32 || data.length != 4) + break; + int index = data[0] | + data[1] << 8 | + data[2] << 16 | + data[3] << 24; + property = Gdk.Atom.intern("_NET_WORKAREA", false); + type = Gdk.Atom.intern("CARDINAL", false); + result = Gdk.property_get(root, + property, + type, + 0, long.MAX, + 0, + out actual_type, + out format, + out data); + if (!result || actual_type != type || format != 32 || data.length < (index + 1) * 16) + break; + int i = index * 4 * 4; + m_workarea.x = data[i] | + data[i + 1] << 8 | + data[i + 2] << 16 | + data[i + 3] << 24; + i += 4; + m_workarea.y = data[i] | + data[i + 1] << 8 | + data[i + 2] << 16 | + data[i + 3] << 24; + i += 4; + m_workarea.width = data[i] | + data[i + 1] << 8 | + data[i + 2] << 16 | + data[i + 3] << 24; + i += 4; + m_workarea.height = data[i] | + data[i + 1] << 8 | + data[i + 2] << 16 | + data[i + 3] << 24; + } while (false); + m_move_begined = true; + int x, y; + Gtk.Window toplevel = (Gtk.Window)get_toplevel(); + toplevel.get_position(out x, out y); + m_press_pos = { (int)event.x_root - x, (int)event.y_root - y }; + move_begin(); + return true; + } + + public override bool button_release_event(Gdk.EventButton event) { + if (event.button != 1) + return false; + m_move_begined = false; + m_press_pos = { 0, 0 }; + get_window().set_cursor(new Gdk.Cursor(Gdk.CursorType.LEFT_PTR)); + move_end(); + return true; + } + + public override bool motion_notify_event(Gdk.EventMotion event) { + if (!m_move_begined) + return false; + Gtk.Window toplevel = (Gtk.Window)get_toplevel(); + int x = (int)(event.x_root - m_press_pos.x); + int y = (int)(event.y_root - m_press_pos.y); + + if (x < m_workarea.x && x > m_workarea.x - 16) + x = m_workarea.x; + if (y < m_workarea.y && y > m_workarea.y - 16) + y = m_workarea.y; + int w, h; + toplevel.get_size(out w, out h); + if (x + w > m_workarea.x + m_workarea.width && + x + w < m_workarea.x + m_workarea.width + 16) + x = m_workarea.x + m_workarea.width - w; + if (y + h > m_workarea.y + m_workarea.height && + y + h < m_workarea.y + m_workarea.height + 16) + y = m_workarea.y + m_workarea.height - w; + toplevel.move(x, y); + return true; + } + + public override bool draw(Cairo.Context cr) { + if (Gtk.cairo_should_draw_window(cr, get_window())) { + Gtk.StyleContext context = get_style_context(); + Gtk.Allocation allocation; + get_allocation(out allocation); + Gtk.render_handle(context, cr, + allocation.x, allocation.y + (allocation.height - 40) / 2, allocation.width, 40.0); + } + return false; + } +} diff --git a/ui/gtk3/iconwidget.vala b/ui/gtk3/iconwidget.vala new file mode 100644 index 000000000..d73cb6bef --- /dev/null +++ b/ui/gtk3/iconwidget.vala @@ -0,0 +1,56 @@ +/* vim:set et sts=4 sw=4: + * + * ibus - The Input Bus + * + * Copyright(c) 2011 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or(at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +using Gdk; +using GLib; +using Gtk; + +class IconWidget: Gtk.Image { + public IconWidget(string icon, int size) { + Gdk.Pixbuf pixbuf = null; + try { + if (icon[0] == '/') { + pixbuf = new Gdk.Pixbuf.from_file(icon); + } else { + var theme = Gtk.IconTheme.get_default(); + pixbuf = theme.load_icon(icon, size, 0); + } + } catch (GLib.Error e) { + try { + var theme = Gtk.IconTheme.get_default(); + pixbuf = theme.load_icon(Gtk.Stock.MISSING_IMAGE, size, 0); + } catch (GLib.Error e) {} + } + + if (pixbuf == null) + return; + float width = (float)pixbuf.get_width(); + float height = (float)pixbuf.get_height(); + float scale = size / (width > height ? width : height); + width *= scale; + height *= scale; + + pixbuf = pixbuf.scale_simple((int)width, (int)height, Gdk.InterpType.BILINEAR); + set_from_pixbuf(pixbuf); + show(); + } +} diff --git a/ui/gtk3/keybindingmanager.vala b/ui/gtk3/keybindingmanager.vala new file mode 100644 index 000000000..0b588da8e --- /dev/null +++ b/ui/gtk3/keybindingmanager.vala @@ -0,0 +1,241 @@ +/* vim:set et sts=4 sw=4: +valac --pkg gtk+-2.0 --pkg x11 --pkg gdk-x11-2.0 --pkg gee-1.0 keybinding-manager.vala +*/ + +/** + * This class is in charge to grab keybindings on the X11 display + * and filter X11-events and passing on such events to the registed + * handler methods. + * + * @author Oliver Sauder + */ + +using Gdk; +using GLib; +using Gtk; +using X; + +extern bool grab_keycode (Gdk.Display display, + uint keyval, + uint modifiers); + +extern bool ungrab_keycode (Gdk.Display display, + uint keyval, + uint modifiers); + +public class KeybindingManager : GLib.Object { + /** + * list of binded keybindings + */ + private GLib.List m_bindings = new GLib.List(); + + private static KeybindingManager m_instance = null; + + public static const uint MODIFIER_FILTER = + Gdk.ModifierType.MODIFIER_MASK & ~( + Gdk.ModifierType.MOD2_MASK | + Gdk.ModifierType.LOCK_MASK | + Gdk.ModifierType.MOD4_MASK | + Gdk.ModifierType.MOD5_MASK); + + /** + * Helper class to store keybinding + */ + private class Keybinding { + public Keybinding(string accelerator, + uint keysym, + Gdk.ModifierType modifiers, + KeybindingHandlerFunc handler) { + this.accelerator = accelerator; + this.keysym = keysym; + this.modifiers = modifiers; + this.handler = handler; + } + + public string accelerator { get; set; } + public uint keysym { get; set; } + public Gdk.ModifierType modifiers { get; set; } + public unowned KeybindingHandlerFunc handler { get; set; } + } + + /** + * Keybinding func needed to bind key to handler + * + * @param event passing on gdk event + */ + public delegate void KeybindingHandlerFunc(Gdk.Event event); + + + private KeybindingManager() { + Gdk.Event.handler_set(event_handler); + } + + /** + * Bind accelerator to given handler + * + * @param accelerator accelerator parsable by Gtk.accelerator_parse + * @param handler handler called when given accelerator is pressed + */ + public bool bind(string accelerator, + KeybindingHandlerFunc handler) { + debug("Binding key " + accelerator); + + // convert accelerator + uint keysym; + Gdk.ModifierType modifiers; + Gtk.accelerator_parse(accelerator, out keysym, out modifiers); + + get_primary_modifier(modifiers); + + unowned X.Display display = Gdk.x11_get_default_xdisplay(); + + int keycode = display.keysym_to_keycode(keysym); + + if (keycode == 0) + return false; + + grab_keycode (Gdk.Display.get_default(), keysym, modifiers); + + // store binding + Keybinding binding = new Keybinding(accelerator, + keysym, modifiers, + handler); + m_bindings.append(binding); + + debug("Successfully binded key " + accelerator); + return true; + } + + /** + * Unbind given accelerator. + * + * @param accelerator accelerator parsable by Gtk.accelerator_parse + */ + public void unbind (string accelerator) { + debug("Unbinding key " + accelerator); + + // unbind all keys with given accelerator + GLib.List remove_bindings = new GLib.List(); + foreach(Keybinding binding in m_bindings) { + if(str_equal(accelerator, binding.accelerator)) { + ungrab_keycode (Gdk.Display.get_default(), + binding.keysym, + binding.modifiers); + remove_bindings.append(binding); + } + } + + // remove unbinded keys + foreach (Keybinding binding in remove_bindings) + m_bindings.remove (binding); + } + + public static KeybindingManager get_instance () { + if (m_instance == null) + m_instance = new KeybindingManager (); + return m_instance; + } + + public static uint get_primary_modifier (uint binding_mask) { + const uint[] masks = { + Gdk.ModifierType.MOD5_MASK, + Gdk.ModifierType.MOD4_MASK, + Gdk.ModifierType.MOD3_MASK, + Gdk.ModifierType.MOD2_MASK, + Gdk.ModifierType.MOD1_MASK, + Gdk.ModifierType.CONTROL_MASK, + Gdk.ModifierType.SHIFT_MASK, + Gdk.ModifierType.LOCK_MASK + }; + foreach (var mask in masks) { + if ((binding_mask & mask) == mask) + return mask; + } + return 0; + } + + public static bool primary_modifier_still_pressed(Gdk.Event event, + uint primary_modifier) { + Gdk.EventKey keyevent = event.key; + if (primary_modifier == 0) + return false; + + Gdk.Device device = event.get_device(); + Gdk.Device pointer; + if (device.get_source() == Gdk.InputSource.KEYBOARD) + pointer = device.get_associated_device(); + else + pointer = device; + + uint modifier = 0; + pointer.get_state(keyevent.window, null, out modifier); + if ((primary_modifier & modifier) == primary_modifier) + return true; + + return false; + } + + public static uint keyval_to_modifier (uint keyval) { + switch(keyval) { + case 0xffe3: /* Control_L */ + case 0xffe4: /* Control_R */ + return Gdk.ModifierType.CONTROL_MASK; + case 0xffe1: /* Shift_L */ + case 0xffe2: /* Shift_R */ + return Gdk.ModifierType.SHIFT_MASK; + case 0xffe5: /* Caps_Lock */ + return Gdk.ModifierType.LOCK_MASK; + case 0xffe9: /* Alt_L */ + case 0xffea: /* Alt_R */ + return Gdk.ModifierType.MOD1_MASK; + case 0xffe7: /* Meta_L */ + case 0xffe8: /* Meta_R */ + return Gdk.ModifierType.META_MASK; + case 0xffeb: /* Super_L */ + case 0xffec: /* Super_R */ + return Gdk.ModifierType.SUPER_MASK; + case 0xffed: /* Hyper_L */ + case 0xffee: /* Hyper_R */ + return Gdk.ModifierType.HYPER_MASK; + default: + return 0; + } + } + + private void event_handler(Gdk.Event event) { + do { + if (event.any.window != Gdk.get_default_root_window()) + break; + + if (event.type == Gdk.EventType.KEY_PRESS) { + uint modifiers = event.key.state & MODIFIER_FILTER; + foreach (var binding in m_bindings) { + if (event.key.keyval != binding.keysym || + modifiers != binding.modifiers) + continue; + binding.handler(event); + return; + } + } + } while (false); + Gtk.main_do_event(event); + } +} + +/* +public static int main (string[] args) +{ + Gtk.init (ref args); + + KeybindingManager manager = new KeybindingManager(); + manager.bind("V", test); + + Gtk.main (); + return 0; +} + +private static void test() +{ + debug("hotkey pressed"); +} +*/ diff --git a/ui/gtk3/panel.vala b/ui/gtk3/panel.vala new file mode 100644 index 000000000..e851b2474 --- /dev/null +++ b/ui/gtk3/panel.vala @@ -0,0 +1,422 @@ +/* vim:set et sts=4 sw=4: + * + * ibus - The Input Bus + * + * Copyright(c) 2011 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or(at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +using IBus; +using GLib; +using Gtk; +using Posix; + +public extern const string IBUS_VERSION; +public extern const string BINDIR; + +class Panel : IBus.PanelService { + private IBus.Bus m_bus; + private IBus.Config m_config; + private Gtk.StatusIcon m_status_icon; + private Gtk.Menu m_ime_menu; + private Gtk.Menu m_sys_menu; + private IBus.EngineDesc[] m_engines = {}; + private CandidatePanel m_candidate_panel; + private Switcher m_switcher; + private PropertyManager m_property_manager; + private GLib.Pid m_setup_pid = 0; + private Gtk.AboutDialog m_about_dialog; + private const string ACCELERATOR_SWITCH_IME_FOREWARD = "space"; + private const string ACCELERATOR_SWITCH_IME_BACKWARD = "space"; + + public Panel(IBus.Bus bus) { + GLib.assert(bus.is_connected()); + // Chain up base class constructor + GLib.Object(connection : bus.get_connection(), + object_path : "/org/freedesktop/IBus/Panel"); + + m_bus = bus; + + // init ui + m_status_icon = new Gtk.StatusIcon(); + m_status_icon.set_name("ibus-ui-gtk"); + m_status_icon.set_title("IBus Panel"); + m_status_icon.popup_menu.connect(status_icon_popup_menu_cb); + m_status_icon.activate.connect(status_icon_activate_cb); + m_status_icon.set_from_icon_name("ibus-keyboard"); + + m_candidate_panel = new CandidatePanel(); + + m_switcher = new Switcher(); + + var keybinding_manager = KeybindingManager.get_instance(); + keybinding_manager.bind(ACCELERATOR_SWITCH_IME_FOREWARD, + (e) => handle_engine_switch(e, false)); + + keybinding_manager.bind(ACCELERATOR_SWITCH_IME_BACKWARD, + (e) => handle_engine_switch(e, true)); + + m_property_manager = new PropertyManager(); + m_property_manager.property_activate.connect((k, s) => { + property_activate(k, s); + }); + + state_changed(); + } + + ~Panel() { + var keybinding_manager = KeybindingManager.get_instance(); + keybinding_manager.unbind(ACCELERATOR_SWITCH_IME_FOREWARD); + keybinding_manager.unbind(ACCELERATOR_SWITCH_IME_BACKWARD); + } + + public void set_config(IBus.Config config) { + if (m_config != null) { + m_config.value_changed.disconnect(config_value_changed_cb); + m_config = null; + } + + m_config = config; + if (m_config != null) { + m_config.value_changed.connect(config_value_changed_cb); + update_engines(m_config.get_value("general", "preload_engines"), + m_config.get_value("general", "engines_order")); + } else { + update_engines(null, null); + } + } + + private void switch_engine(int i, bool force = false) { + GLib.assert(i >= 0 && i < m_engines.length); + + // Do not need switch + if (i == 0 && !force) + return; + + // Move the target engine to the first place. + IBus.EngineDesc engine = m_engines[i]; + for (int j = i; j > 0; j--) { + m_engines[j] = m_engines[j - 1]; + } + m_engines[0] = engine; + + if (!m_bus.set_global_engine(engine.get_name())) { + warning("Switch engine to %s failed.", engine.get_name()); + return; + } + // set xkb layout + string cmdline = "setxkbmap %s".printf(engine.get_layout()); + try { + if (!GLib.Process.spawn_command_line_sync(cmdline)) { + warning("Switch xkb layout to %s failed.", + engine.get_layout()); + } + } catch (GLib.SpawnError e) { + warning("execute setxkblayout failed"); + } + + string[] names = {}; + foreach(var desc in m_engines) { + names += desc.get_name(); + } + if (m_config != null) + m_config.set_value("general", + "engines_order", + new GLib.Variant.strv(names)); + } + + private void config_value_changed_cb(IBus.Config config, + string section, + string name, + Variant variant) { + if (section == "general" && name == "preload_engines") { + update_engines(variant, null); + } + } + + private void handle_engine_switch(Gdk.Event event, bool revert) { + // Do not need switch IME + if (m_engines.length <= 1) + return; + + uint primary_modifiers = + KeybindingManager.get_primary_modifier(event.key.state); + + bool pressed = KeybindingManager.primary_modifier_still_pressed( + event, primary_modifiers); + if (pressed) { + int i = revert ? m_engines.length - 1 : 1; + i = m_switcher.run(event, m_engines, i); + if (i < 0) { + debug("switch cancelled"); + } else { + GLib.assert(i < m_engines.length); + switch_engine(i); + } + } else { + int i = revert ? m_engines.length - 1 : 1; + switch_engine(i); + } + } + + private void update_engines(GLib.Variant? var_engines, + GLib.Variant? var_order) { + string[] engine_names = null; + + if (var_engines != null) + engine_names = var_engines.dup_strv(); + if (engine_names == null || engine_names.length == 0) + engine_names = {"xkb:us::eng"}; + + string[] order_names = + (var_order != null) ? var_order.dup_strv() : null; + + string[] names = {}; + + foreach (var name in order_names) { + if (name in engine_names) + names += name; + } + + foreach (var name in engine_names) { + if (name in names) + continue; + names += name; + } + + var engines = m_bus.get_engines_by_names(names); + + if (m_engines.length == 0) { + m_engines = engines; + switch_engine(0, true); + } else { + var current_engine = m_engines[0]; + m_engines = engines; + int i; + for (i = 0; i < m_engines.length; i++) { + if (current_engine.get_name() == engines[i].get_name()) { + switch_engine(i); + return; + } + } + switch_engine(0, true); + } + + } + + private void show_setup_dialog() { + if (m_setup_pid != 0) { + if (Posix.kill(m_setup_pid, Posix.SIGUSR1) == 0) + return; + m_setup_pid = 0; + } + + string binary = GLib.Path.build_filename(BINDIR, "ibus-setup"); + try { + GLib.Process.spawn_async(null, + {binary, "ibus-setup"}, + null, + GLib.SpawnFlags.DO_NOT_REAP_CHILD, + null, + out m_setup_pid); + } catch (GLib.SpawnError e) { + warning("Execute %s failed! %s", binary, e.message); + m_setup_pid = 0; + } + + GLib.ChildWatch.add(m_setup_pid, (pid, state) => { + if (pid != m_setup_pid) + return; + m_setup_pid = 0; + GLib.Process.close_pid(pid); + }); + } + + private void show_about_dialog() { + if (m_about_dialog == null) { + m_about_dialog = new Gtk.AboutDialog(); + m_about_dialog.set_program_name("IBus"); + m_about_dialog.set_version(IBUS_VERSION); + + string copyright = _( + "Copyright (c) 2007-2012 Peng Huang\n" + + "Copyright (c) 2007-2010 Red Hat, Inc.\n"); + + m_about_dialog.set_copyright(copyright); + m_about_dialog.set_license("LGPL"); + m_about_dialog.set_comments(_("IBus is an intelligent input bus for Linux/Unix.")); + m_about_dialog.set_website("http://code.google.com/p/ibus"); + m_about_dialog.set_authors({"Peng Huang "}); + m_about_dialog.set_documenters({"Peng Huang "}); + m_about_dialog.set_translator_credits(_("translator-credits")); + m_about_dialog.set_logo_icon_name("ibus"); + m_about_dialog.set_icon_name("ibus"); + } + + if (!m_about_dialog.get_visible()) { + m_about_dialog.run(); + m_about_dialog.hide(); + } else { + m_about_dialog.present(); + } + } + + private void status_icon_popup_menu_cb(Gtk.StatusIcon status_icon, + uint button, + uint activate_time) { + // Show system menu + if (m_sys_menu == null) { + Gtk.ImageMenuItem item; + m_sys_menu = new Gtk.Menu(); + + item = new Gtk.ImageMenuItem.from_stock(Gtk.Stock.PREFERENCES, null); + item.activate.connect((i) => show_setup_dialog()); + m_sys_menu.append(item); + + item = new Gtk.ImageMenuItem.from_stock(Gtk.Stock.ABOUT, null); + item.activate.connect((i) => show_about_dialog()); + m_sys_menu.append(item); + + m_sys_menu.append(new SeparatorMenuItem()); + + item = new Gtk.ImageMenuItem.from_stock(Gtk.Stock.REFRESH, null); + item.set_label(_("Restart")); + item.activate.connect((i) => m_bus.exit(true)); + m_sys_menu.append(item); + + item = new Gtk.ImageMenuItem.from_stock(Gtk.Stock.QUIT, null); + item.activate.connect((i) => m_bus.exit(false)); + m_sys_menu.append(item); + + m_sys_menu.show_all(); + } + + m_sys_menu.popup(null, + null, + m_status_icon.position_menu, + 0, + Gtk.get_current_event_time()); + } + + private void status_icon_activate_cb(Gtk.StatusIcon status_icon) { + m_ime_menu = new Gtk.Menu(); + + // Show properties and IME switching menu + m_property_manager.create_menu_items(m_ime_menu); + + m_ime_menu.append(new SeparatorMenuItem()); + + int width, height; + Gtk.icon_size_lookup(Gtk.IconSize.MENU, out width, out height); + + // Append IMEs + foreach (var engine in m_engines) { + var longname = engine.get_longname(); + var item = new Gtk.ImageMenuItem.with_label(longname); + if (engine.get_icon() != "") { + var icon = new IconWidget(engine.get_icon(), width); + item.set_image(icon); + } + // Make a copy of engine to workaround a bug in vala. + // https://bugzilla.gnome.org/show_bug.cgi?id=628336 + var e = engine; + item.activate.connect((item) => { + for (int i = 0; i < m_engines.length; i++) { + if (e == m_engines[i]) { + switch_engine(i); + break; + } + } + }); + m_ime_menu.add(item); + } + + m_ime_menu.show_all(); + + // Do not take focuse to avoid some focus related issues. + m_ime_menu.set_take_focus(false); + m_ime_menu.popup(null, + null, + m_status_icon.position_menu, + 0, + Gtk.get_current_event_time()); + } + + /* override virtual functions */ + public override void set_cursor_location(int x, int y, + int width, int height) { + m_candidate_panel.set_cursor_location(x, y, width, height); + } + + public override void focus_in(string input_context_path) { + } + + public override void focus_out(string input_context_path) { + } + + public override void register_properties(IBus.PropList props) { + m_property_manager.set_properties(props); + } + + public override void update_property(IBus.Property prop) { + m_property_manager.update_property(prop); + } + + public override void update_preedit_text(IBus.Text text, + uint cursor_pos, + bool visible) { + if (visible) + m_candidate_panel.set_preedit_text(text, cursor_pos); + else + m_candidate_panel.set_preedit_text(null, 0); + } + + public override void hide_preedit_text() { + m_candidate_panel.set_preedit_text(null, 0); + } + + public override void update_auxiliary_text(IBus.Text text, + bool visible) { + m_candidate_panel.set_auxiliary_text(visible ? text : null); + } + + public override void hide_auxiliary_text() { + m_candidate_panel.set_auxiliary_text(null); + } + + public override void update_lookup_table(IBus.LookupTable table, + bool visible) { + m_candidate_panel.set_lookup_table(visible ? table : null); + } + + public override void hide_lookup_table() { + m_candidate_panel.set_lookup_table(null); + } + + public override void state_changed() { + var icon_name = "ibus-keyboard"; + + var engine = m_bus.get_global_engine(); + if (engine != null) + icon_name = engine.get_icon(); + + if (icon_name[0] == '/') + m_status_icon.set_from_file(icon_name); + else + m_status_icon.set_from_icon_name(icon_name); + } +} diff --git a/ui/gtk3/pango.vala b/ui/gtk3/pango.vala new file mode 100644 index 000000000..adcce4390 --- /dev/null +++ b/ui/gtk3/pango.vala @@ -0,0 +1,84 @@ +/* vim:set et sts=4 sw=4: + * + * ibus - The Input Bus + * + * Copyright(c) 2011 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or(at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +using IBus; +using Pango; + +Pango.AttrList get_pango_attr_list_from_ibus_text(IBus.Text text) { + Pango.AttrList pango_attrs = new Pango.AttrList(); + unowned IBus.AttrList attrs = text.get_attributes(); + if (attrs == null) + return pango_attrs; + + unowned string str = text.get_text(); + long nchars = str.char_count(); + long[] offsets = new long[nchars + 1]; + for (int i = 0; i <= nchars; i++) + offsets[i] = str.index_of_nth_char(i); + + IBus.Attribute attr; + int i = 0; + while(true) { + attr = attrs.get(i++); + if (attr == null) + break; + long start_index = attr.start_index; + if (start_index <= 0) start_index = 0; + start_index = start_index <= nchars ? offsets[start_index] : offsets[-1]; + + long end_index = attr.end_index; + if (end_index <= 0) end_index = 0; + end_index = end_index <= nchars ? offsets[end_index] : offsets[-1]; + + Pango.Attribute pango_attr = null; + switch(attr.type) { + case IBus.AttrType.FOREGROUND: + { + uint16 r = (uint16)(attr.value & 0x00ff0000) >> 8; + uint16 g = (uint16)(attr.value & 0x0000ff00); + uint16 b = (uint16)(attr.value & 0x000000ff) << 8; + pango_attr = Pango.attr_foreground_new(r, g, b); + break; + } + case IBus.AttrType.BACKGROUND: + { + uint16 r = (uint16)(attr.value & 0x00ff0000) >> 8; + uint16 g = (uint16)(attr.value & 0x0000ff00); + uint16 b = (uint16)(attr.value & 0x000000ff) << 8; + pango_attr = Pango.attr_background_new(r, g, b); + break; + } + case IBus.AttrType.UNDERLINE: + { + pango_attr = Pango.attr_underline_new((Pango.Underline)attr.value); + break; + } + default: + continue; + } + pango_attr.start_index = (uint)start_index; + pango_attr.end_index = (uint)end_index; + // Transfer the ownership to pango_attrs + pango_attrs.insert((owned)pango_attr); + } + return pango_attrs; +} diff --git a/ui/gtk3/property.vala b/ui/gtk3/property.vala new file mode 100644 index 000000000..e24bc4043 --- /dev/null +++ b/ui/gtk3/property.vala @@ -0,0 +1,201 @@ +/* vim:set et sts=4 sw=4: + * + * ibus - The Input Bus + * + * Copyright(c) 2011 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or(at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +using IBus; +using GLib; +using Gtk; + +public class PropertyManager { + private IBus.PropList m_props; + + public void ProperyManager() { + } + + public void set_properties(IBus.PropList props) { + m_props = props; + } + + public int create_menu_items(Gtk.Menu menu) { + return create_menu_items_internal(m_props, menu); + } + + private int create_menu_items_internal(IBus.PropList props, Gtk.Menu menu) { + int i = 0; + PropRadioMenuItem last_radio = null; + while (true) { + IBus.Property prop = props.get(i); + if (prop == null) + break; + debug("ins prop = %s", prop.get_key()); + + i++; + IPropItem item = null; + switch(prop.get_prop_type()) { + case IBus.PropType.NORMAL: + item = new PropImageMenuItem(prop); + break; + case IBus.PropType.TOGGLE: + item = new PropCheckMenuItem(prop); + break; + case IBus.PropType.RADIO: + { + PropRadioMenuItem radio = + new PropRadioMenuItem(prop, last_radio); + item = radio; + last_radio = radio; + } + break; + case IBus.PropType.MENU: + { + var menuitem = new PropImageMenuItem(prop); + item = menuitem; + var submenu = new Gtk.Menu(); + if(create_menu_items_internal(prop.get_sub_props(), submenu) > 0) + menuitem.set_submenu(submenu); + } + break; + case IBus.PropType.SEPARATOR: + item = new PropSeparatorMenuItem(prop); + break; + default: + warning("unknown property type %d", (int)prop.get_prop_type()); + break; + } + if (prop.get_prop_type() != IBus.PropType.RADIO) + last_radio = null; + if (item != null) { + menu.append(item as Gtk.MenuItem); + item.property_activate.connect((k, s) => property_activate(k, s)); + } + } + return i; + } + + public void update_property(IBus.Property prop) { + assert(prop != null); + if (m_props != null) + m_props.update_property(prop); + } + + public signal void property_activate(string key, int state); +} + +public interface IPropItem : GLib.Object { + public abstract void update_property(IBus.Property prop); + public signal void property_activate(string key, int state); +} + +public class PropImageMenuItem : Gtk.ImageMenuItem, IPropItem { + private IBus.Property m_property; + public PropImageMenuItem(IBus.Property property) { + assert(property != null); + + m_property = property; + set_no_show_all(true); + sync(); + } + + public void update_property(IBus.Property property) { + m_property.set_label(property.get_label()); + m_property.set_icon(property.get_icon()); + m_property.set_visible(property.get_visible()); + m_property.set_sensitive(property.get_sensitive()); + m_property.set_tooltip(property.get_tooltip()); + m_property.set_state(property.get_state()); + sync(); + } + + private void sync() { + set_label(m_property.get_label().get_text()); + set_icon(m_property.get_icon()); + set_visible(m_property.get_visible()); + set_sensitive(m_property.get_sensitive()); + } + + private void set_icon(string icon) { + int width, height; + Gtk.icon_size_lookup(Gtk.IconSize.MENU, out width, out height); + set_image(new IconWidget(icon, width)); + } + + public override void activate() { + property_activate(m_property.get_key(), m_property.get_state()); + } +} + +public class PropCheckMenuItem : Gtk.RadioMenuItem, IPropItem { + private IBus.Property m_property; + public PropCheckMenuItem(IBus.Property property) { + assert(property != null); + + m_property = property; + set_no_show_all(true); + sync(); + } + + public void update_property(IBus.Property property) { + m_property.set_label(property.get_label()); + m_property.set_icon(property.get_icon()); + m_property.set_visible(property.get_visible()); + m_property.set_sensitive(property.get_sensitive()); + m_property.set_tooltip(property.get_tooltip()); + m_property.set_state(property.get_state()); + sync(); + } + + private void sync() { + set_label(m_property.get_label().get_text()); + set_visible(m_property.get_visible()); + set_sensitive(m_property.get_sensitive()); + set_active(m_property.get_state() == IBus.PropState.CHECKED); + } + + public override void toggled() { + IBus.PropState new_state = + get_active() ? IBus.PropState.CHECKED : IBus.PropState.UNCHECKED; + if (m_property.get_state() != new_state) { + m_property.set_state(new_state); + property_activate(m_property.get_key(), m_property.get_state()); + } + } +} + +public class PropRadioMenuItem : PropCheckMenuItem { + public PropRadioMenuItem(IBus.Property property, + PropRadioMenuItem ?group_source) { + base(property); + + if (group_source != null) + set_group(group_source.get_group()); + } +} + +public class PropSeparatorMenuItem : Gtk.SeparatorMenuItem, IPropItem { + private IBus.Property m_property; + public PropSeparatorMenuItem(IBus.Property property) { + assert(property != null); + m_property = property; + } + + public void update_property(IBus.Property property) { + } +} diff --git a/ui/gtk3/separator.vala b/ui/gtk3/separator.vala new file mode 100644 index 000000000..0917f4c2b --- /dev/null +++ b/ui/gtk3/separator.vala @@ -0,0 +1,39 @@ +/* vim:set et sts=4 sw=4: + * + * ibus - The Input Bus + * + * Copyright(c) 2011 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or(at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +using Gtk; + +class HSeparator : Gtk.HSeparator { + public HSeparator() { + GLib.Object( + margin : 2 + ); + } +} + +class VSeparator : Gtk.VSeparator { + public VSeparator() { + GLib.Object( + margin : 2 + ); + } +} diff --git a/ui/gtk3/switcher.vala b/ui/gtk3/switcher.vala new file mode 100644 index 000000000..5db459c3c --- /dev/null +++ b/ui/gtk3/switcher.vala @@ -0,0 +1,235 @@ +/* vim:set et sts=4 sw=4: + * + * ibus - The Input Bus + * + * Copyright(c) 2011 Peng Huang + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or(at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA + */ + +using IBus; +using GLib; +using Gtk; + +class Switcher : Gtk.Window { + private Gtk.Box m_box; + private Gtk.Button[] m_buttons = {}; + private IBus.EngineDesc[] m_engines; + private uint m_selected_engine; + private uint m_primary_modifier; + private GLib.MainLoop m_loop; + private int m_result; + + public Switcher() { + GLib.Object( + type : Gtk.WindowType.POPUP, + events : Gdk.EventMask.KEY_PRESS_MASK | Gdk.EventMask.KEY_RELEASE_MASK, + window_position : Gtk.WindowPosition.CENTER, + accept_focus : true, + decorated : false, + modal : true, + focus_visible : true + ); + m_box = new Gtk.Box(Gtk.Orientation.VERTICAL, 0); + add(m_box); + + grab_focus(); + } + + public int run(Gdk.Event event, IBus.EngineDesc[] engines, int index) { + assert (m_loop == null); + assert (index < engines.length); + + m_primary_modifier = + KeybindingManager.get_primary_modifier( + event.key.state & KeybindingManager.MODIFIER_FILTER); + + update_engines(engines); + m_selected_engine = index; + m_buttons[index].grab_focus(); + + Gdk.Device device = event.get_device(); + if (device == null) { + var display = get_display(); + var device_manager = display.get_device_manager(); + device = device_manager.list_devices(Gdk.DeviceType.MASTER).data; + } + + Gdk.Device keyboard; + Gdk.Device pointer; + if (device.get_source() == Gdk.InputSource.KEYBOARD) { + keyboard = device; + pointer = device.get_associated_device(); + } else { + pointer = device; + keyboard = device.get_associated_device(); + } + + show_all(); + + if (is_composited()) { + // Hide the window by set the opactiy to 0.0, because real hiden + // window can not grab keyboard and pointer. + get_window().set_opacity(0.0); + + // Show window after 1/10 secound + GLib.Timeout.add(100, ()=> { + get_window().set_opacity(1.0); + return false; + }); + } + + Gdk.GrabStatus status; + // Grab all keyboard events + status = keyboard.grab(get_window(), + Gdk.GrabOwnership.NONE, + true, + Gdk.EventMask.KEY_PRESS_MASK | + Gdk.EventMask.KEY_RELEASE_MASK, + null, + Gdk.CURRENT_TIME); + if (status != Gdk.GrabStatus.SUCCESS) + warning("Grab keyboard failed! status = %d", status); + // Grab all pointer events + status = pointer.grab(get_window(), + Gdk.GrabOwnership.NONE, + true, + Gdk.EventMask.BUTTON_PRESS_MASK | + Gdk.EventMask.BUTTON_RELEASE_MASK, + null, + Gdk.CURRENT_TIME); + if (status != Gdk.GrabStatus.SUCCESS) + warning("Grab pointer failed! status = %d", status); + + + m_loop = new GLib.MainLoop(); + m_loop.run(); + m_loop = null; + + hide(); + // Make sure the switcher is hidden before returning from this function. + while (Gtk.events_pending()) + Gtk.main_iteration (); + + return m_result; + } + + private void update_engines(IBus.EngineDesc[] engines) { + foreach (var button in m_buttons) { + button.destroy(); + } + m_buttons = {}; + + if (engines == null) { + m_engines = {}; + return; + } + + int width, height; + Gtk.icon_size_lookup(Gtk.IconSize.MENU, out width, out height); + m_engines = engines; + for (int i = 0; i < m_engines.length; i++) { + var index = i; + var engine = m_engines[i]; + var button = new Gtk.Button.with_label(engine.get_longname()); + button.set_image(new IconWidget(engine.get_icon(), width)); + button.set_relief(Gtk.ReliefStyle.NONE); + button.show(); + + button.enter_notify_event.connect((e) => { + button.grab_focus(); + m_selected_engine = index; + return true; + }); + + button.button_press_event.connect((e) => { + m_selected_engine = index; + m_result = (int)m_selected_engine; + m_loop.quit(); + return true; + }); + + m_box.pack_start(button, true, true); + m_buttons += button; + } + } + + private void next_engine() { + if (m_selected_engine == m_engines.length - 1) + m_selected_engine = 0; + else + m_selected_engine ++; + set_focus(m_buttons[m_selected_engine]); + } + + private void previous_engine() { + if (m_selected_engine == 0) + m_selected_engine = m_engines.length - 1; + else + m_selected_engine --; + set_focus(m_buttons[m_selected_engine]); + } + + /* override virtual functions */ + public override void show() { + base.show(); + set_focus_visible(true); + } + + public override bool key_press_event(Gdk.EventKey e) { + Gdk.EventKey *pe = &e; + switch (pe->keyval) { + case 0x0020: /* space */ + case 0xff80: /* KP_Space */ + if ((pe->state & Gdk.ModifierType.SHIFT_MASK) == 0) + next_engine(); + else + previous_engine(); + break; + case 0x08fb: /* leftarrow */ + case 0xff51: /* Down */ + break; + case 0x08fc: /* uparrow */ + case 0xff52: /* Up */ + previous_engine(); + break; + case 0x08fd: /* rightarrow */ + case 0xff53: /* Right */ + break; + case 0x08fe: /* downarrow */ + case 0xff54: /* Down */ + next_engine(); + break; + default: + debug("0x%04x", pe->keyval); + break; + } + return true; + } + + public override bool key_release_event(Gdk.EventKey e) { + Gdk.EventKey *pe = &e; + + if (KeybindingManager.primary_modifier_still_pressed((Gdk.Event *)pe, + m_primary_modifier)) { + return true; + } + + m_loop.quit(); + m_result = (int)m_selected_engine; + return true; + } +} diff --git a/util/IMdkit/Makefile.am b/util/IMdkit/Makefile.am index ddee4d02a..f07f5aaef 100644 --- a/util/IMdkit/Makefile.am +++ b/util/IMdkit/Makefile.am @@ -50,3 +50,5 @@ noinst_HEADERS = \ libIMdkit_la_CFLAGS = \ @X11_CFLAGS@ \ $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/util/IMdkit/i18nPtHdr.c b/util/IMdkit/i18nPtHdr.c index d35035452..2e6735419 100644 --- a/util/IMdkit/i18nPtHdr.c +++ b/util/IMdkit/i18nPtHdr.c @@ -647,7 +647,7 @@ static XIMAttribute *MakeIMAttributeList (Xi18n i18n_core, int list_len = i18n_core->address.im_attr_num; register int i; register int j; - int value_length; + int value_length = 0; int number_ret = 0; *length = 0; diff --git a/util/IMdkit/i18nX.c b/util/IMdkit/i18nX.c index 0ae92d2fe..0a5405872 100644 --- a/util/IMdkit/i18nX.c +++ b/util/IMdkit/i18nX.c @@ -395,7 +395,7 @@ static Bool Xi18nXWait (XIMS ims, { unsigned char *packet; XimProtoHdr *hdr; - int connect_id_ret; + int connect_id_ret = 0; XIfEvent (i18n_core->address.dpy, &event, @@ -496,7 +496,7 @@ static Bool WaitXIMProtocol (Display *dpy, XSpecRec *spec = (XSpecRec *) i18n_core->address.connect_addr; Bool delete = True; unsigned char *packet; - int connect_id; + int connect_id = 0; if (((XClientMessageEvent *) ev)->message_type == spec->xim_request) diff --git a/util/Makefile.am b/util/Makefile.am index 604d328f8..b41bc9105 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -25,3 +25,5 @@ SUBDIRS = \ IMdkit \ $(NULL) endif + +-include $(top_srcdir)/git.mk diff --git a/xinput-ibus.in b/xinput-ibus similarity index 67% rename from xinput-ibus.in rename to xinput-ibus index f10d0031f..052ad30fc 100644 --- a/xinput-ibus.in +++ b/xinput-ibus @@ -1,11 +1,11 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ +prefix=/usr +exec_prefix=${prefix} XIM=ibus -XIM_PROGRAM="@bindir@/ibus-daemon" +XIM_PROGRAM="${exec_prefix}/bin/ibus-daemon" ICON=ibus XIM_ARGS="--xim" -PREFERENCE_PROGRAM="@bindir@/ibus-setup" +PREFERENCE_PROGRAM="${exec_prefix}/bin/ibus-setup" SHORT_DESC="IBus" GTK_IM_MODULE=ibus @@ -13,6 +13,8 @@ if test -f /usr/lib64/qt4/plugins/inputmethods/libqtim-ibus.so || \ test -f /usr/lib/qt4/plugins/inputmethods/libqtim-ibus.so; then QT_IM_MODULE=ibus +else + QT_IM_MODULE=xim fi # if [ -z "$IBUS_SESSION_ID" ]; then