agent/scim-bridge-agent-imcontext.h

Go to the documentation of this file.
00001 /*
00002  * SCIM Bridge
00003  *
00004  * Copyright (c) 2006 Ryo Dairiki <ryo-dairiki@users.sourceforge.net>
00005  *
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.*
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
00014  * GNU Lesser General Public License for more details.*
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this program; if not, write to the
00017  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
00018  * Boston, MA  02111-1307  USA
00019  */
00020 
00027 #ifndef SCIMBRIDGEAGENTIMCONTEXT_H_
00028 #define SCIMBRIDGEAGENTIMCONTEXT_H_
00029 
00030 #define Uses_SCIM_ATTRIBUTE
00031 #define Uses_SCIM_BACKEND
00032 #define Uses_SCIM_IMENGINE
00033 #define Uses_SCIM_IMENGINE_MODULE
00034 #define Uses_SCIM_LOOKUP_TABLE
00035 
00036 #include <scim.h>
00037 
00038 #include "scim-bridge.h"
00039 #include "scim-bridge-imcontext.h"
00040 
00041 #include "scim-bridge-agent-panel-listener-protected.h"
00042 
00043 class ScimBridgeAgentClientListener;
00044 class ScimBridgeAgentPanelListenerProtected;
00045 
00049 class ScimBridgeAgentIMContext
00050 {
00051 
00052     public:
00053 
00060         static ScimBridgeAgentIMContext *alloc (ScimBridgeAgentClientListener *client_listener);
00061 
00067         static void free_by_client (const ScimBridgeAgentClientListener *client_listener);
00068 
00075         static ScimBridgeAgentIMContext *find (scim_bridge_imcontext_id_t imcontext_id);
00076 
00084         static void static_initialize (ScimBridgeAgentPanelListenerProtected *panel_listener, const scim::String &scim_language, scim::BackEndPointer scim_backend);
00085 
00089         static void static_finalize ();
00090 
00096         static bool is_imengine_shared ();
00097 
00103         static void set_imengine_shared (bool shared);
00104 
00110         static bool is_on_the_spot_enabled ();
00111 
00117         static void set_on_the_spot_enabled (bool enabled);
00118 
00124         static bool is_enabled_by_default ();
00125 
00131         static void set_enabled_by_default (bool enabled);
00132 
00136         virtual ~ScimBridgeAgentIMContext () {}
00137 
00143         virtual bool is_enabled () = 0;
00144 
00150         virtual void set_enabled (bool new_state) = 0;
00151 
00157         virtual scim_bridge_preedit_mode_t get_preedit_mode () const = 0;
00158 
00164         virtual void set_preedit_mode (scim_bridge_preedit_mode_t new_preedit_mode) = 0;
00165 
00171         virtual scim_bridge_imcontext_id_t get_id () = 0;
00172 
00178         virtual ScimBridgeAgentClientListener *get_client_listener () = 0;
00179 
00186         virtual bool filter_key_event (const scim::KeyEvent &key_event) = 0;
00187 
00193         virtual void forward_key_event (const scim::KeyEvent &key_event) = 0;
00194 
00198         virtual void focus_in () = 0;
00199 
00203         virtual void focus_out () = 0;
00204 
00208         virtual void reset () = 0;
00209 
00216         virtual void set_cursor_location (int x, int y) = 0;
00217 
00221         virtual void open_next_imengine () = 0;
00222 
00226         virtual void open_previous_imengine () = 0;
00227 
00231         virtual void open_imengine_by_uuid (const scim::String &uuid) = 0;
00232 
00236         virtual void open_imengine (scim::IMEngineFactoryPointer factory) = 0;
00237 
00243         virtual void update_lookup_table_page_size (int page_size) = 0;
00244 
00248         virtual void lookup_table_page_up () = 0;
00249 
00253         virtual void lookup_table_page_down () = 0;
00254 
00260         virtual void lookup_table_select_candidate (int candidate_index) = 0;
00261 
00267         virtual void trigger_property (const scim::String &property) = 0;
00268 
00276         virtual void process_helper_event (const scim::String &target_uuid, const scim::String &helper_uuid, const scim::Transaction &trans) = 0;
00277 
00283         virtual void panel_move_preedit_caret (int caret_pos) = 0;
00284 
00290         virtual void panel_commit_string (const scim::WideString &wstr) = 0;
00291 
00295         virtual void panel_request_help () = 0;
00296 
00302         virtual void panel_change_factory (const scim::String &uuid) = 0;
00303 
00304     protected:
00305 
00309         ScimBridgeAgentIMContext () {}
00310 
00311 };
00312 #endif                                            /*SCIMBRIDGEAGENTIMCONTEXT_H_*/

Generated on Tue Sep 26 21:53:28 2006 for ScimBridge by  doxygen 1.4.6