if (impl) {
ISCLCoreEventCallback *callback = impl->get_core_event_callback();
if (callback) {
- //callback->on_trigger_property(ic, ic_uuid.c_str(), property.c_str());
+ callback->on_trigger_property(property.c_str());
}
}
}
}
}
+static void slot_update_candidate_item_layout(const scim::HelperAgent *agent, const std::vector<scim::uint32> &item) {
+ CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
+ if (impl) {
+ ISCLCoreEventCallback *callback = impl->get_core_event_callback();
+ if (callback) {
+ callback->on_update_candidate_item_layout(item);
+ }
+ }
+}
+
+static void slot_update_displayed_candidate_number(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid, int size) {
+ CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
+ if (impl) {
+ ISCLCoreEventCallback *callback = impl->get_core_event_callback();
+ if (callback) {
+ callback->on_update_displayed_candidate_number((sclu32)size);
+ }
+ }
+}
+
+static void slot_longpress_candidate(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid, int index) {
+ CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
+ if (impl) {
+ ISCLCoreEventCallback *callback = impl->get_core_event_callback();
+ if (callback) {
+ callback->on_longpress_candidate((sclu32)index);
+ }
+ }
+}
+
static void slot_update_lookup_table(const scim::HelperAgent *, scim::LookupTable &table) {
CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
if (impl) {
}
}
+static void slot_process_key_event_with_imengine(const scim::HelperAgent *agent, scim::KeyEvent &key, scim::uint32 &ret) {
+ CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
+ if (impl) {
+ ISCLCoreEventCallback *callback = impl->get_core_event_callback();
+ if (callback) {
+ callback->on_process_key_event_with_imengine(key, &ret);
+ }
+ }
+}
+
+static void slot_set_autocapital_type(const scim::HelperAgent *agent, scim::uint32 &type) {
+ CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
+ if (impl) {
+ ISCLCoreEventCallback *callback = impl->get_core_event_callback();
+ if (callback) {
+ callback->on_set_autocapital_type(type);
+ }
+ }
+}
+
+static void slot_set_prediction_allow(const scim::HelperAgent *agent, scim::uint32 &prediction_allow) {
+ CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
+ if (impl) {
+ ISCLCoreEventCallback *callback = impl->get_core_event_callback();
+ if (callback) {
+ callback->on_set_prediction_allow(prediction_allow);
+ }
+ }
+}
+
/* Internal input handler function */
Eina_Bool input_handler(void *data, Ecore_Fd_Handler *fd_handler)
{
m_helper_agent.signal_connect_candidate_table_page_up(scim::slot(slot_candidate_table_page_up));
m_helper_agent.signal_connect_candidate_table_page_down(scim::slot(slot_candidate_table_page_down));
m_helper_agent.signal_connect_update_candidate_table_page_size(scim::slot(slot_update_candidate_table_page_size));
+ m_helper_agent.signal_connect_update_candidate_item_layout(scim::slot(slot_update_candidate_item_layout));
+ m_helper_agent.signal_connect_update_displayed_candidate_number(scim::slot(slot_update_displayed_candidate_number));
+ m_helper_agent.signal_connect_longpress_candidate(scim::slot(slot_longpress_candidate));
m_helper_agent.signal_connect_update_lookup_table(scim::slot(slot_update_lookup_table));
m_helper_agent.signal_connect_select_associate(scim::slot(slot_select_associate));
m_helper_agent.signal_connect_associate_table_page_up(scim::slot(slot_associate_table_page_up));
m_helper_agent.signal_connect_candidate_show(scim::slot(slot_candidate_show));
m_helper_agent.signal_connect_candidate_hide(scim::slot(slot_candidate_hide));
m_helper_agent.signal_connect_process_input_device_event(scim::slot(slot_process_input_device_event));
+ m_helper_agent.signal_connect_process_key_event_with_imengine(scim::slot(slot_process_key_event_with_imengine));
+ m_helper_agent.signal_connect_set_autocapital_type(scim::slot(slot_set_autocapital_type));
+ m_helper_agent.signal_connect_set_prediction_allow(scim::slot(slot_set_prediction_allow));
m_initialized = TRUE;
}
void CSCLConnectionISF::send_private_command(const sclchar *command)
{
- if (m_initialized) {
+ if (m_initialized && command) {
m_helper_agent.send_private_command(command);
}
}
}
}
+void CSCLConnectionISF::update_lookup_table(const scim::LookupTable &table)
+{
+ if (m_initialized) {
+ m_helper_agent.update_candidate_string(table);
+ }
+}
+
+void CSCLConnectionISF::register_properties(const scim::PropertyList &properties)
+{
+ if (m_initialized) {
+ m_helper_agent.register_properties(properties);
+ }
+}
+
+void CSCLConnectionISF::update_property(const scim::Property &property)
+{
+ if (m_initialized) {
+ m_helper_agent.update_property(property);
+ }
+}
+
+void CSCLConnectionISF::expand_candidate(void)
+{
+ if (m_initialized) {
+ m_helper_agent.expand_candidate();
+ }
+}
+
+void CSCLConnectionISF::contract_candidate(void)
+{
+ if (m_initialized) {
+ m_helper_agent.contract_candidate();
+ }
+}
+
+void CSCLConnectionISF::set_candidate_style(scim::ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, scim::ISF_CANDIDATE_MODE_T mode)
+{
+ if (m_initialized) {
+ m_helper_agent.set_candidate_style(portrait_line, mode);
+ }
+}
+
extern "C"
{
EXAPI void scim_module_init(void) {
sclint get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor);
void get_selection_text(sclchar **text);
void request_ise_hide();
+ void update_lookup_table(const scim::LookupTable &table);
+ void register_properties(const scim::PropertyList &properties);
+ void update_property(const scim::Property &property);
+ void expand_candidate(void);
+ void contract_candidate(void);
+ void set_candidate_style(scim::ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, scim::ISF_CANDIDATE_MODE_T mode);
private:
sclboolean m_initialized;
m_impl->request_ise_hide();
}
}
+
+void CSCLConnection::update_lookup_table(const scim::LookupTable &table)
+{
+ if (m_impl) {
+ m_impl->update_lookup_table(table);
+ }
+}
+
+void CSCLConnection::register_properties(const scim::PropertyList &properties)
+{
+ if (m_impl) {
+ m_impl->register_properties(properties);
+ }
+}
+
+void CSCLConnection::update_property(const scim::Property &property)
+{
+ if (m_impl) {
+ m_impl->update_property(property);
+ }
+}
+
+void CSCLConnection::expand_candidate(void)
+{
+ if (m_impl) {
+ m_impl->expand_candidate();
+ }
+}
+
+void CSCLConnection::contract_candidate(void)
+{
+ if (m_impl) {
+ m_impl->contract_candidate();
+ }
+}
+
+void CSCLConnection::set_candidate_style(scim::ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, scim::ISF_CANDIDATE_MODE_T mode)
+{
+ if (m_impl) {
+ m_impl->set_candidate_style(portrait_line, mode);
+ }
+}
#define __SCL_CONNECTION_H__
#define Uses_SCIM_ATTRIBUTE
+#define Uses_SCIM_UTILITY
+#define Uses_SCIM_CONFIG_BASE
+#define Uses_SCIM_OBJECT
+#define Uses_SCIM_POINTER
+#define Uses_SCIM_EVENT
+#define Uses_SCIM_HELPER
#include <string>
#include <scim.h>
virtual sclint get_surrounding_text(sclint maxlen_before, sclint maxlen_after, sclchar **text, int &cursor);
virtual void get_selection_text(sclchar **text);
virtual void request_ise_hide();
+ virtual void update_lookup_table(const scim::LookupTable &table);
+ virtual void register_properties(const scim::PropertyList &properties);
+ virtual void update_property(const scim::Property &property);
+ virtual void expand_candidate(void);
+ virtual void contract_candidate(void);
+ virtual void set_candidate_style(scim::ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, scim::ISF_CANDIDATE_MODE_T mode);
protected:
std::string m_backend_identifier;
m_impl->request_ise_hide();
}
}
+
+void CSCLCore::update_lookup_table(const scim::LookupTable &table)
+{
+ if (m_impl) {
+ m_impl->update_lookup_table(table);
+ }
+}
+
+void CSCLCore::register_properties(const scim::PropertyList &properties)
+{
+ if (m_impl) {
+ m_impl->register_properties(properties);
+ }
+}
+
+void CSCLCore::update_property(const scim::Property &property)
+{
+ if (m_impl) {
+ m_impl->update_property(property);
+ }
+}
+
+void CSCLCore::expand_candidate(void)
+{
+ if (m_impl) {
+ m_impl->expand_candidate();
+ }
+}
+
+void CSCLCore::contract_candidate(void)
+{
+ if (m_impl) {
+ m_impl->contract_candidate();
+ }
+}
+
+void CSCLCore::set_candidate_style(scim::ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, scim::ISF_CANDIDATE_MODE_T mode)
+{
+ if (m_impl) {
+ m_impl->set_candidate_style(portrait_line, mode);
+ }
+}
//SCL_BEGIN_DECLS
#define Uses_SCIM_ATTRIBUTE
+#define Uses_SCIM_UTILITY
+#define Uses_SCIM_CONFIG_BASE
+#define Uses_SCIM_OBJECT
+#define Uses_SCIM_POINTER
+#define Uses_SCIM_EVENT
+#define Uses_SCIM_HELPER
#include <string>
#include <scim.h>
*/
void request_ise_hide() const;
+ /**
+ * @brief Request to update lookup table.
+ */
+ void update_lookup_table(const scim::LookupTable &table);
+
+ /**
+ * @brief Request to register properties.
+ */
+ void register_properties(const scim::PropertyList &properties);
+
+ /**
+ * @brief Request to update property.
+ */
+ void update_property(const scim::Property &property);
+
+ /**
+ * @brief Request to expand candidate.
+ */
+ void expand_candidate(void);
+
+ /**
+ * @brief Request to contract candidate.
+ */
+ void contract_candidate(void);
+
+ /**
+ * @brief Request to set candidate style.
+ */
+ void set_candidate_style(scim::ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, scim::ISF_CANDIDATE_MODE_T mode);
private:
CSCLCoreImpl *m_impl;
};
virtual void on_candidate_table_page_down(sclint ic, const sclchar *uuid) {}
virtual void on_update_lookup_table(SclCandidateTable& table) {}
virtual void on_update_candidate_table_page_size(sclint ic, const sclchar *uuid, sclint page_size) {}
+ virtual void on_update_candidate_item_layout(const std::vector<sclu32> item) {}
+ virtual void on_update_displayed_candidate_number(sclu32 size) {}
+ virtual void on_longpress_candidate(sclu32 index) {}
virtual void on_select_associate(sclint ic, const sclchar *uuid, sclint index) {}
virtual void on_associate_table_page_up(sclint ic, const sclchar *uuid) {}
virtual void on_associate_table_page_down(sclint ic, const sclchar *uuid) {}
virtual void on_update_associate_table_page_size(sclint ic, const sclchar *uuid, sclint page_size) {}
virtual void on_process_key_event(scim::KeyEvent &key, sclu32 *ret) {}
+ virtual void on_process_key_event_with_imengine(scim::KeyEvent &key, sclu32 *ret) {}
virtual void on_set_display_language(const sclchar *language) {}
virtual void on_set_rotation_degree(sclint degree) {}
/* Added in callback interface version 1.1 */
virtual void on_process_input_device_event(sclu32 &type, sclchar *data, size_t &len, sclu32 *ret) {}
+ virtual void on_set_autocapital_type(sclu32 type) {}
+ virtual void on_set_prediction_allow(sclu32 prediction_allow) {}
+ virtual void on_trigger_property(const sclchar *property) {}
+
ISCLCoreEventCallback() {
/* Current callback interface version is 1.1 */
m_version_major = 1;
{
m_connection.request_ise_hide();
}
+
+void CSCLCoreImpl::update_lookup_table(const scim::LookupTable &table)
+{
+ m_connection.update_lookup_table(table);
+}
+
+void CSCLCoreImpl::register_properties(const scim::PropertyList &properties)
+{
+ m_connection.register_properties(properties);
+}
+
+void CSCLCoreImpl::update_property(const scim::Property &property)
+{
+ m_connection.update_property(property);
+}
+
+void CSCLCoreImpl::expand_candidate(void)
+{
+ m_connection.expand_candidate();
+}
+
+void CSCLCoreImpl::contract_candidate(void)
+{
+ m_connection.contract_candidate();
+}
+
+void CSCLCoreImpl::set_candidate_style(scim::ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, scim::ISF_CANDIDATE_MODE_T mode)
+{
+ m_connection.set_candidate_style(portrait_line, mode);
+}
void get_selection_text(sclchar **text);
void request_ise_hide();
+ void update_lookup_table(const scim::LookupTable &table);
+ void register_properties(const scim::PropertyList &properties);
+ void update_property(const scim::Property &property);
+ void expand_candidate(void);
+ void contract_candidate(void);
+ void set_candidate_style(scim::ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, scim::ISF_CANDIDATE_MODE_T mode);
private:
ISCLCoreEventCallback *m_event_callback;