agent/scim-bridge-agent-client-listener.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 SCIMBRIDGEAGENTCLIENTLISTENER_H_
00028 #define SCIMBRIDGEAGENTCLIENTLISTENER_H_
00029 
00030 #define Uses_SCIM_ATTRIBUTE
00031 #define Uses_SCIM_EVENT
00032 #include <scim.h>
00033 
00034 #include "scim-bridge.h"
00035 #include "scim-bridge-imcontext.h"
00036 
00037 #include "scim-bridge-agent-socket-client.h"
00038 
00039 class ScimBridgeAgentProtected;
00040 
00044 class ScimBridgeAgentClientListener: public ScimBridgeAgentSocketClient
00045 {
00046 
00047     public:
00048 
00056         static ScimBridgeAgentClientListener *alloc (int socket_fd, ScimBridgeAgentProtected *agent);
00057 
00061         virtual ~ScimBridgeAgentClientListener () {}
00062 
00070         virtual retval_t set_preedit_shown (scim_bridge_imcontext_id_t imcontext_id, bool shown) = 0;
00071 
00079         virtual retval_t set_preedit_cursor_position (scim_bridge_imcontext_id_t imcontext_id, int cursor_position) = 0;
00080 
00088         virtual retval_t set_preedit_string (scim_bridge_imcontext_id_t imcontext_id, const scim::WideString &wstring) = 0;
00089 
00097         virtual retval_t set_preedit_attributes (scim_bridge_imcontext_id_t imcontext_id, const scim::AttributeList &attributes) = 0;
00098 
00105         virtual retval_t update_preedit (scim_bridge_imcontext_id_t imcontext_id) = 0;
00106 
00114         virtual retval_t commit_string (scim_bridge_imcontext_id_t imcontext_id, const scim::WideString &wstring) = 0;
00115 
00122         virtual retval_t beep (scim_bridge_imcontext_id_t imcontext_id) = 0;
00123 
00131         virtual retval_t forward_key_event (scim_bridge_imcontext_id_t imcontext_id, const scim::KeyEvent &key_event) = 0;
00132 
00143         virtual retval_t get_surrounding_string (scim_bridge_imcontext_id_t imcontext_id, int before_max, int after_max, scim::WideString &wstring, int &cursor_position) = 0;
00144 
00153         virtual retval_t delete_surrounding_string (scim_bridge_imcontext_id_t imcontext_id, int offset, int length) = 0;
00154 
00163         virtual retval_t replace_surrounding_string (scim_bridge_imcontext_id_t imcontext_id, const scim::WideString &wstring, int cursor_position) = 0;
00164 
00165     protected:
00166 
00170         ScimBridgeAgentClientListener () {}
00171 
00172 };
00173 #endif                                            /*SCIMBRIDGEAGENTCLIENTLISTENER_H_*/

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