if (impl) {
ISCLCoreEventCallback *callback = impl->get_core_event_callback();
if (callback) {
- callback->on_trigger_property(property.c_str());
+ //callback->on_trigger_property(ic, ic_uuid.c_str(), 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_set_mime_type(scim::slot(slot_set_mime_type));
m_helper_agent.signal_connect_set_prediction_hint_data(scim::slot(slot_set_prediction_hint_data));
m_helper_agent.signal_connect_set_optimization_hint(scim::slot(slot_set_optimization_hint));
- 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;
}
callback->on_update_associate_table_page_size(0, NULL, 0);
callback->on_process_key_event(key, NULL);
callback->on_process_key_event_with_keycode(key, NULL, 0);
- callback->on_process_key_event_with_imengine(key, NULL);
callback->on_set_display_language(NULL);
callback->on_set_rotation_degree(0);
}
}
-void CSCLConnectionISF::update_preedit_string_with_commit(const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs, sclint caret)
-{
- if (m_initialized) {
- m_helper_agent.update_preedit_string(-1, "", scim::utf8_mbstowcs(scim::String(preedit)), scim::utf8_mbstowcs(scim::String(commit)), attrs, caret);
- }
-}
-
-void CSCLConnectionISF::recapture_string(sclint offset, sclint len, const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs)
-{
- if (m_initialized) {
- m_helper_agent.recapture_string(-1, "", offset, len, scim::utf8_mbstowcs(scim::String(preedit)), scim::utf8_mbstowcs(scim::String(commit)), attrs);
- }
-}
-
-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) {
void get_selection_text(sclchar **text);
void request_ise_hide();
void commit_content(const char *content, const char *description, const char *mime_types);
- void update_preedit_string_with_commit(const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs, sclint caret);
- void recapture_string(sclint offset, sclint len, const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs);
- 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->commit_content(content, description, mime_types);
}
}
-
-void CSCLConnection::update_preedit_string_with_commit(const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs, sclint caret)
-{
- if (m_impl) {
- m_impl->update_preedit_string_with_commit(preedit, commit, attrs, caret);
- }
-}
-
-void CSCLConnection::recapture_string(sclint offset, sclint len, const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs)
-{
- if (m_impl) {
- m_impl->recapture_string(offset, len, preedit, commit, attrs);
- }
-}
-
-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);
- }
-}
\ No newline at end of file
#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 void get_selection_text(sclchar **text);
virtual void request_ise_hide();
virtual void commit_content(const sclchar *content, const sclchar *description, const sclchar *mime_types);
- virtual void update_preedit_string_with_commit(const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs, sclint caret);
- virtual void recapture_string(sclint offset, sclint len, const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs);
- 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;
}
}
-void CSCLCore::update_preedit_string_with_commit(const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs, sclint caret)
-{
- if (m_impl) {
- m_impl->update_preedit_string_with_commit(preedit, commit, attrs, caret);
- }
-}
-
-void CSCLCore::recapture_string(sclint offset, sclint len, const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs)
-{
- if (m_impl) {
- m_impl->recapture_string(offset, len, preedit, commit, attrs);
- }
-}
-
-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);
- }
-}
-
void CSCLCore::set_floating_mode(sclboolean floating_mode)
{
if (m_impl) {
//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 commit_content(const sclchar *content, const sclchar *description, const sclchar *mime_types);
/**
- * @brief Request to update preedit string with commit.
- */
- void update_preedit_string_with_commit(const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs, sclint caret);
-
- /**
- * @brief Request to update recapture string.
- */
- void recapture_string(sclint offset, sclint len, const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs);
-
- /**
- * @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);
-
- /**
* @brief Request to set floating mode.
*
* @param[in] floating_mode Floating mode or not
* @brief Request to defer creating window until the window object gets accessed.
*/
void set_window_creation_defer_flag(sclboolean flag);
-
-
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_keycode(scim::KeyEvent &key, sclu32 *ret, sclu32 keycode) {}
- 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) {}
virtual void on_set_mime_type(const sclchar *mime_type) {}
virtual void on_set_prediction_hint_data(const sclchar *key, const sclchar *value) {}
virtual void on_set_optimization_hint(sclu32 hint) {}
- 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 */
LOGD("defer_flag %d", flag);
m_window_creation_defer_flag = flag;
}
-
-void CSCLCoreImpl::update_preedit_string_with_commit(const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs, sclint caret)
-{
- m_connection.update_preedit_string_with_commit(preedit, commit, attrs, caret);
-}
-
-void CSCLCoreImpl::recapture_string(sclint offset, sclint len, const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs)
-{
- m_connection.recapture_string(offset, len, preedit, commit, attrs);
-}
-
-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 set_floating_drag_enabled(sclboolean enabled);
void set_window_creation_defer_flag(sclboolean flag);
- void update_preedit_string_with_commit(const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs, sclint caret);
- void recapture_string(sclint offset, sclint len, const sclchar *preedit, const sclchar *commit, const scim::AttributeList &attrs);
- 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;