1
#ifndef SCIMBRIDGEAGENTMESSENGER_H_
2
#define SCIMBRIDGEAGENTMESSENGER_H_
4
#include "scim-bridge-agent-imcontext.h"
6
class ScimBridgeAgentClientPeerProtected;
8
class ScimBridgeAgentMessenger
13
ScimBridgeAgentMessenger (ScimBridgeAgentClientPeerProtected &client_peer);
14
~ScimBridgeAgentMessenger ();
16
bool is_thread_running ();
18
void open_connection (int input_fd, int output_fd) throw (ScimBridgeAgentException);
19
void close_connection ();
21
void connection_closed ();
23
ScimBridgeMessengerID get_id ();
25
/* Calls from the client */
26
void received_message_unknown (ScimBridgeMessageCode code) throw (ScimBridgeAgentException);
27
void received_message_alloc_imcontext () throw (ScimBridgeAgentException);
28
void received_message_free_imcontext () throw (ScimBridgeAgentException);
29
void received_message_reset_imcontext () throw (ScimBridgeAgentException);
30
void received_message_focus_changed () throw (ScimBridgeAgentException);
31
void received_message_keyevent_occured () throw (ScimBridgeAgentException);
32
void received_message_cursor_location_changed () throw (ScimBridgeAgentException);
35
void call_commit (const ScimBridgeAgentIMContext &ic) throw (ScimBridgeAgentException);
37
void call_set_preedit_string (const ScimBridgeAgentIMContext &ic, const scim::WideString &string) throw (ScimBridgeAgentException);
38
void call_set_preedit_attributes (const ScimBridgeAgentIMContext &ic, const scim::AttributeList &attributes) throw (ScimBridgeAgentException);
39
void call_set_preedit_cursor_position (const ScimBridgeAgentIMContext &ic, int cursor_position) throw (ScimBridgeAgentException);
40
void call_set_preedit_shown (const ScimBridgeAgentIMContext &ic, bool shown) throw (ScimBridgeAgentException);
41
void call_update_preedit (const ScimBridgeAgentIMContext &ic) throw (ScimBridgeAgentException);
43
void call_forward_keyevent (const ScimBridgeAgentIMContext &ic, const scim::KeyEvent &keyevent) throw (ScimBridgeAgentException);
44
void call_beep (const ScimBridgeAgentIMContext &ic) throw (ScimBridgeAgentException);
46
bool call_get_surrounding_string (const ScimBridgeAgentIMContext &ic, scim::WideString &surrounding, size_t max_length, int &cursor_pos) throw (ScimBridgeAgentException);
47
bool call_delete_surrounding_string (const ScimBridgeAgentIMContext &ic, size_t offset, size_t len) throw (ScimBridgeAgentException);
55
ScimBridgeMessengerID id;
57
ScimBridgeAgentClientPeerProtected &client_peer;
63
#endif /*SCIMBRIDGEAGENTMESSENGER_H_*/