# Process this file with autoconf to produce a configure script
#AC_INIT(scim, 1.4.7, suzhe@tsinghua.org.cn)
-AC_INIT(isf, 2.3.5009, isf@samsung.com)
+AC_INIT(isf, 2.3.5016, isf@samsung.com)
AC_CONFIG_SRCDIR([ism/src/scim.h])
m4_pattern_allow([^AS_])
# ISF version
ISF_MAJOR_VERSION=2
ISF_MINOR_VERSION=3
-ISF_MICRO_VERSION=5009
+ISF_MICRO_VERSION=5016
ISF_VERSION=$ISF_MAJOR_VERSION.$ISF_MINOR_VERSION.$ISF_MICRO_VERSION
-isf (2.3.5009-1slp2+1) unstable; urgency=low
+isf (2.3.5016-1slp2+1) unstable; urgency=low
* upload tizen beta code
* Git: slp/pkgs/i/isf
- * Tag: isf_2.3.5009-1slp2+1
+ * Tag: isf_2.3.5016-1slp2+1
-- Jihoon Kim <jihoon48.kim@samsung.com> Thu, 09 Feb 2012 17:48:05 +0900
elm_scroller_bounce_set (scroller, EINA_FALSE, EINA_TRUE);
evas_object_show (scroller);
- elm_scroller_content_set (scroller, lay_in);
- elm_conformant_content_set (conform, scroller);
+ elm_object_content_set (scroller, lay_in);
+ elm_object_content_set (conform, scroller);
elm_naviframe_item_push (ad->naviframe, title, NULL, NULL, conform, NULL);
}
Evas_Object *li = ad->li;
if (li == NULL) return;
- Elm_List_Item *it = (Elm_List_Item *)elm_list_selected_item_get (li);
+ Elm_Object_Item *it = (Elm_Object_Item *)elm_list_selected_item_get (li);
if (it != NULL)
elm_list_item_selected_set (it, EINA_FALSE);
static Evas_Object* _create_naviframe_layout (Evas_Object* parent)
{
Evas_Object *naviframe = elm_naviframe_add (parent);
- elm_layout_content_set (parent, "elm.swallow.content", naviframe);
+ elm_object_part_content_set (parent, "elm.swallow.content", naviframe);
evas_object_show (naviframe);
evas_object_smart_callback_add (_ise_show_button, "clicked", _button_bt, NULL);
Elm_Object_Item *it = elm_naviframe_item_push (ad->naviframe, _("label event demo"), NULL, NULL, layout, NULL);
- Evas_Object *back_btn = elm_object_item_content_part_get (it, ELM_NAVIFRAME_ITEM_PREV_BTN);
+ Evas_Object *back_btn = elm_object_item_part_content_get (it, ELM_NAVIFRAME_ITEM_PREV_BTN);
evas_object_smart_callback_add (back_btn, "clicked", nf_back_event_cb, ad );
}
Evas_Object *li = ad->ev_li;
if (li == NULL) return;
- Elm_List_Item *it = (Elm_List_Item *)elm_list_selected_item_get (li);
+ Elm_Object_Item *it = (Elm_Object_Item *)elm_list_selected_item_get (li);
if (it != NULL)
elm_list_item_selected_set (it, EINA_FALSE);
INPUT_PANEL_IMDATA_GET,
INPUT_PANEL_LAYOUT_SET,
INPUT_PANEL_LAYOUT_GET,
- INPUT_PANEL_PRIVATE_KEY_SET,
- INPUT_PANEL_KEY_DISABLED_SET,
INPUT_PANEL_STATE_GET,
CONTROL_PANEL_SHOW,
CONTROL_PANEL_HIDE,
"INPUT PANEL IMDATA GET",
"INPUT PANEL LAYOUT SET",
"INPUT PANEL LAYOUT GET",
- "PANEL PRIVATE KEY SET",
- "PANEL KEY DISABLED SET",
"INPUT PANEL STATE GET",
"CTRL PANEL SHOW",
"CTRL PANEL HIDE",
}
}
-void test_input_panel_private_key_set (void *data, Evas_Object *obj, void *event_info)
-{
- int layout_index = 1;
-
- if (imf_context != NULL)
- ecore_imf_context_input_panel_private_key_set (imf_context, layout_index, ECORE_IMF_INPUT_PANEL_KEY_ENTER, NULL, "Go", ECORE_IMF_INPUT_PANEL_KEY_ENTER, NULL);
-}
-
-void test_input_panel_key_disabled_set (void *data, Evas_Object *obj, void *event_info)
-{
- int layout_index = 1;
- int key_index = 1;
-
- if (imf_context != NULL)
- ecore_imf_context_input_panel_key_disabled_set (imf_context, layout_index, key_index, EINA_TRUE);
-}
-
void test_input_panel_state_get (void *data, Evas_Object *obj, void *event_info)
{
Ecore_IMF_Input_Panel_State state;
case INPUT_PANEL_LAYOUT_GET:
test_input_panel_layout_get (NULL,obj, event_info);
break;
- case INPUT_PANEL_PRIVATE_KEY_SET:
- test_input_panel_private_key_set (NULL, obj, event_info);
- break;
- case INPUT_PANEL_KEY_DISABLED_SET:
- test_input_panel_key_disabled_set (NULL, obj, event_info);
- break;
case INPUT_PANEL_STATE_GET:
test_input_panel_state_get (NULL, obj, event_info);
break;
Evas_Object *gl = elm_genlist_add (parent);
itci.item_style = "default";
- itci.func.label_get = gli_label_get;
- itci.func.icon_get = NULL;
+ itci.func.text_get = gli_label_get;
+ itci.func.content_get = NULL;
itci.func.state_get = NULL;
itci.func.del = NULL;
Elm_Object_Item *navi_it = elm_naviframe_item_push (ad->naviframe, _("isfimcontrol api"), NULL, NULL, gl, NULL);
- Evas_Object *back_btn = elm_object_item_content_part_get (navi_it, ELM_NAVIFRAME_ITEM_PREV_BTN);
+ Evas_Object *back_btn = elm_object_item_part_content_get (navi_it, ELM_NAVIFRAME_ITEM_PREV_BTN);
evas_object_smart_callback_add (back_btn, "clicked", _nf_back_event, ad);
}
elm_scroller_bounce_set (scroller, EINA_FALSE, EINA_TRUE);
evas_object_show (scroller);
- elm_scroller_content_set (scroller, lay_in);
- elm_conformant_content_set (conform, scroller);
+ elm_object_content_set (scroller, lay_in);
+ elm_object_content_set (conform, scroller);
elm_naviframe_item_push (ad->naviframe, title, NULL, NULL, conform, NULL);
}
elm_scroller_bounce_set (scroller, EINA_FALSE, EINA_TRUE);
evas_object_show (scroller);
- elm_scroller_content_set (scroller, lay_in);
- elm_conformant_content_set (conform, scroller);
+ elm_object_content_set (scroller, lay_in);
+ elm_object_content_set (conform, scroller);
elm_naviframe_item_push (ad->naviframe, title, NULL, NULL, conform, NULL);
}
}
static void
+window_to_screen_geometry_get(Ecore_X_Window client_win, int *x, int *y)
+{
+ Ecore_X_Window root_window, win;
+ int win_x, win_y;
+ int sum_x = 0, sum_y = 0;
+
+ root_window = ecore_x_window_root_get(client_win);
+ win = client_win;
+
+ while (root_window != win)
+ {
+ ecore_x_window_geometry_get(win, &win_x, &win_y, NULL, NULL);
+ sum_x += win_x;
+ sum_y += win_y;
+ win = ecore_x_window_parent_get(win);
+ }
+
+ if (x)
+ *x = sum_x;
+ if (y)
+ *y = sum_y;
+}
+
+static void
evas_focus_out_cb(void *data, Evas *e, void *event_info)
{
Ecore_IMF_Context *ctx = (Ecore_IMF_Context *)data;
/**
* isf_imf_context_shutdown
*
- * It will be called when the scim im module is unloaded by EFL. It will do some
+ * It will be called when the scim im module is unloaded by ecore. It will do some
* cleanup job.
*/
EAPI void
if (context_scim->impl->need_commit_preedit) {
panel_slot_hide_preedit_string (context_scim->id);
- if (wstr.length ())
+ if (wstr.length ()) {
ecore_imf_context_commit_event_add (context_scim->ctx, utf8_wcstombs (wstr).c_str ());
-
+ ecore_imf_context_event_callback_call (context_scim->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(wstr).c_str());
+ }
_panel_client.prepare (context_scim->id);
_panel_client.reset_input_context (context_scim->id);
_panel_client.send ();
if (wstr.length ()) {
ecore_imf_context_commit_event_add (context_scim->ctx, utf8_wcstombs (wstr).c_str ());
+ ecore_imf_context_event_callback_call (context_scim->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(wstr).c_str());
}
_panel_client.prepare (context_scim->id);
if (context_scim->impl->client_canvas) {
ee = ecore_evas_ecore_evas_get(context_scim->impl->client_canvas);
+ if (!ee) return;
- if (ee)
- ecore_evas_geometry_get (ee, &canvas_x, &canvas_y, NULL, NULL);
+ ecore_evas_geometry_get (ee, &canvas_x, &canvas_y, NULL, NULL);
}
- else if (context_scim->impl->client_window) {
- ecore_x_window_geometry_get(context_scim->impl->client_window, &canvas_x, &canvas_y, NULL, NULL);
+ else {
+ if (context_scim->impl->client_window)
+ window_to_screen_geometry_get(context_scim->impl->client_window, &canvas_x, &canvas_y);
+ else
+ return;
}
if (context_scim->impl->cursor_x != canvas_x + cx || context_scim->impl->cursor_y != canvas_y + cy + ch) {
if (strlen(string) != 0) {
ecore_imf_context_commit_event_add (ic->ctx, string);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)string);
_panel_client.send ();
caps_mode_check(ctx, EINA_FALSE);
return EINA_TRUE;
return;
ecore_imf_context_commit_event_add (ic->ctx, utf8_wcstombs (wstr).c_str ());
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(wstr).c_str());
}
}
if (ic->impl->need_commit_preedit) {
panel_slot_hide_preedit_string (ic->id);
- if (wstr.length ())
+ if (wstr.length ()) {
ecore_imf_context_commit_event_add (ic->ctx, utf8_wcstombs (wstr).c_str ());
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(wstr).c_str());
+ }
}
ic->impl->si->reset ();
}
emit = true;
}
if (ic->impl->use_preedit) {
- if (emit) ecore_imf_context_preedit_changed_event_add (ic->ctx);
+ if (emit) {
+ ecore_imf_context_preedit_changed_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
+ }
if (ic->impl->preedit_started) {
ecore_imf_context_preedit_end_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
ic->impl->preedit_started = false;
ic->impl->need_commit_preedit = false;
}
if (ic->impl->use_preedit) {
if (!ic->impl->preedit_started) {
ecore_imf_context_preedit_start_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
ic->impl->preedit_started = true;
ic->impl->need_commit_preedit = true;
}
ic->impl->preedit_caret = str.length ();
ic->impl->preedit_updating = true;
ecore_imf_context_preedit_changed_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
ic->impl->preedit_updating = false;
} else {
_panel_client.update_preedit_string (ic->id, str, attrs);
if (ic->impl->use_preedit && ic->impl->preedit_string.length ()) {
ecore_imf_context_preedit_start_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
ecore_imf_context_preedit_changed_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
ic->impl->preedit_started = true;
}
}
if (ic->impl->use_preedit && ic->impl->preedit_string.length ()) {
ecore_imf_context_preedit_changed_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
ecore_imf_context_preedit_end_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
ic->impl->preedit_started = false;
}
}
if (ic->impl->use_preedit && ic->impl->preedit_string.length ()) {
ecore_imf_context_preedit_changed_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
ecore_imf_context_preedit_end_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
ic->impl->preedit_started = false;
}
}
if (ic->impl->use_preedit) {
if (!ic->impl->preedit_started) {
ecore_imf_context_preedit_start_event_add (_focused_ic->ctx);
+ ecore_imf_context_event_callback_call (_focused_ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
ic->impl->preedit_started = true;
}
//if (ic->impl->preedit_string.length ())
emit = true;
}
if (ic->impl->use_preedit) {
- if (emit)
+ if (emit) {
ecore_imf_context_preedit_changed_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
+ }
if (ic->impl->preedit_started) {
ecore_imf_context_preedit_end_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
ic->impl->preedit_started = false;
}
} else {
if (ic->impl->use_preedit) {
if (!ic->impl->preedit_started) {
ecore_imf_context_preedit_start_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
ic->impl->preedit_started = true;
}
ecore_imf_context_preedit_changed_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
} else {
_panel_client.update_preedit_caret (ic->id, caret);
}
if (ic->impl->use_preedit) {
if (!ic->impl->preedit_started) {
ecore_imf_context_preedit_start_event_add (_focused_ic->ctx);
+ ecore_imf_context_event_callback_call (_focused_ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_START, NULL);
ic->impl->preedit_started = true;
}
ic->impl->preedit_caret = str.length ();
ic->impl->preedit_updating = true;
ecore_imf_context_preedit_changed_event_add (ic->ctx);
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_PREEDIT_CHANGED, NULL);
ic->impl->preedit_updating = false;
} else {
_panel_client.update_preedit_string (ic->id, str, attrs);
if (ic && ic->ctx) {
ecore_imf_context_commit_event_add (ic->ctx, utf8_wcstombs (str).c_str ());
+ ecore_imf_context_event_callback_call (ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(str).c_str());
}
}
EcoreIMFContextISF *ic = static_cast<EcoreIMFContextISF *> (si->get_frontend_data ());
if (ic && ic->impl && _focused_ic == ic) {
+ Ecore_IMF_Event_Delete_Surrounding ev;
+ ev.ctx = _focused_ic->ctx;
+ ev.n_chars = len;
+ ev.offset = offset;
ecore_imf_context_delete_surrounding_event_add (_focused_ic->ctx, offset, len);
+ ecore_imf_context_event_callback_call (_focused_ic->ctx, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, &ev);
return true;
}
return false;
if (_focused_ic && _focused_ic->impl) {
ecore_imf_context_commit_event_add (_focused_ic->ctx, utf8_wcstombs (str).c_str ());
+ ecore_imf_context_event_callback_call (_focused_ic->ctx, ECORE_IMF_CALLBACK_COMMIT, (void *)utf8_wcstombs(str).c_str());
}
}
return 0;
}
-EAPI int _isf_imf_context_input_panel_imdata_set (const char *data, int len)
+EAPI int _isf_imf_context_input_panel_imdata_set (const void *data, int len)
{
connect_panel ();
_imcontrol_client.prepare ();
- _imcontrol_client.set_imdata (data, len);
+ _imcontrol_client.set_imdata ((const char *)data, len);
_imcontrol_client.send ();
return 0;
}
-EAPI int _isf_imf_context_input_panel_imdata_get (char *data, int *len)
+EAPI int _isf_imf_context_input_panel_imdata_get (void *data, int *len)
{
connect_panel ();
_imcontrol_client.prepare ();
- _imcontrol_client.get_imdata (data, len);
+ _imcontrol_client.get_imdata ((char *)data, len);
return 0;
}
int _isf_imf_context_input_panel_language_set (Ecore_IMF_Input_Panel_Lang lang);
- int _isf_imf_context_input_panel_imdata_set (const char *data, int len);
- int _isf_imf_context_input_panel_imdata_get (char *data, int *len);
+ int _isf_imf_context_input_panel_imdata_set (const void *data, int len);
+ int _isf_imf_context_input_panel_imdata_get (void *data, int *len);
int _isf_imf_context_input_panel_geometry_get (int *x, int *y, int *w, int *h);
int _isf_imf_context_input_panel_private_key_set (int layout_index, int key_index, const char *label, const char *value);
int _isf_imf_context_input_panel_private_key_set_by_image (int layout_index, int key_index, const char *img_path, const char *value);
#define IMFCONTROLUIDBG(str...)
#define IMFCONTROLUIERR(str...) printf(str)
-
typedef struct {
void (*func)(void *data, Ecore_IMF_Context *ctx, int value);
void *data;
* @param[in] data pointer of data to sets up to ISE
* @param[in] length length of data
*/
-EAPI void isf_imf_context_input_panel_imdata_set (Ecore_IMF_Context *ctx, const char* data, int length)
+EAPI void isf_imf_context_input_panel_imdata_set (Ecore_IMF_Context *ctx, const void* data, int length)
{
IMFCONTROLUIDBG("[%s] data : %s, len : %d\n", __func__, data, length);
* @param[out] data pointer of data to return
* @param[out] length length of data
*/
-EAPI void isf_imf_context_input_panel_imdata_get (Ecore_IMF_Context *ctx, char* data, int* length)
+EAPI void isf_imf_context_input_panel_imdata_get (Ecore_IMF_Context *ctx, void* data, int* length)
{
if (!IfInitContext)
_isf_imf_context_init ();
IMFCONTROLUIDBG("[%s] imdata : %s, len : %d\n", __func__, data, *length);
}
-EAPI void isf_imf_context_input_panel_move (Ecore_IMF_Context *ctx, int x, int y)
-{
- IMFCONTROLUIDBG("[%s] x : %d, y : %d\n", __func__, x, y);
-
- if (!IfInitContext)
- _isf_imf_context_init ();
- iseContext.input_panel_x = x;
- iseContext.input_panel_x = y;
-}
-
/**
* Get ISE's position and size, in screen coodinates of the ISE rectangle not the client area,
* the represents the size and location of the ISE
void isf_imf_context_control_panel_hide (Ecore_IMF_Context *ctx);
void isf_imf_context_input_panel_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
Ecore_IMF_Input_Panel_Lang isf_imf_context_input_panel_language_get (Ecore_IMF_Context *ctx);
- void isf_imf_context_input_panel_imdata_set (Ecore_IMF_Context *ctx, const char* data, int len);
- void isf_imf_context_input_panel_imdata_get (Ecore_IMF_Context *ctx, char* data, int* len);
+ void isf_imf_context_input_panel_imdata_set (Ecore_IMF_Context *ctx, const void* data, int len);
+ void isf_imf_context_input_panel_imdata_get (Ecore_IMF_Context *ctx, void* data, int* len);
void isf_imf_context_input_panel_geometry_get (Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h);
void isf_imf_context_input_panel_private_key_set (Ecore_IMF_Context *ctx, int layout_index, int key_index, const char *img_path, const char *label, const char *value);
void isf_imf_context_input_panel_layout_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout);
void isf_imf_context_input_panel_event_callback_clear (Ecore_IMF_Context *ctx);
void isf_imf_context_input_panel_key_disabled_set (Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled);
- void isf_imf_context_input_panel_move (Ecore_IMF_Context *ctx, int x, int y);
#ifdef __cplusplus
}
isf_imf_context_cursor_location_set,
isf_imf_context_input_panel_imdata_set,
isf_imf_context_input_panel_imdata_get,
- NULL, /* use effect set */
- NULL, /* orient_set */
- isf_imf_context_input_panel_move,
isf_imf_context_input_panel_geometry_get,
isf_imf_context_input_panel_private_key_set,
isf_imf_context_input_panel_key_disabled_set,
- NULL, /* input_panel_reset */
isf_imf_context_input_panel_state_get,
-
isf_imf_context_input_panel_event_callback_add,
isf_imf_context_input_panel_event_callback_del
};
static Evas_Object *_candidate_window = 0;
static Evas_Object *_candidate_area_1 = 0;
static Evas_Object *_candidate_area_2 = 0;
-static Evas_Object *_candidate_toolbar = 0;
static Evas_Object *_candidate_bg = 0;
static Evas_Object *_candidate_0_scroll = 0;
static Evas_Object *_candidate_scroll = 0;
static int _candidate_scroll_height_min = 124;
static int _candidate_scroll_height_max = 190;
-static Elm_Toolbar_Item *_candidate_table_items [SCIM_LOOKUP_TABLE_MAX_PAGESIZE];
-static Elm_Toolbar_Item *_candidate_seperator_items [SCIM_LOOKUP_TABLE_MAX_PAGESIZE];
-
static Evas_Object *_aux_area = 0;
static Evas_Object *_aux_line = 0;
static Evas_Object *_aux_table = 0;
static ISF_CANDIDATE_STYLE_T _candidate_style = PREDICTION_ENGINE_CANDIDATE_STYLE;
static ISF_CANDIDATE_MODE_T _candidate_mode = PORTRAIT_VERTICAL_CANDIDATE_MODE;
-static bool _candidate_vertical = true;
static clock_t _clock_start;
if (!_config.null ()) {
_candidate_style = (ISF_CANDIDATE_STYLE_T)_config->read (String (ISF_CONFIG_PANEL_LOOKUP_TABLE_STYLE), _candidate_style);
_candidate_mode = (ISF_CANDIDATE_MODE_T)_config->read (String (ISF_CONFIG_PANEL_LOOKUP_TABLE_MODE), _candidate_mode);
- _candidate_vertical = _config->read (String (ISF_CONFIG_PANEL_LOOKUP_TABLE_VERTICAL), _candidate_vertical);
shared_ise = _config->read (String (SCIM_CONFIG_FRONTEND_SHARED_INPUT_METHOD), shared_ise);
_panel_agent->set_should_shared_ise (shared_ise);
}
/* Get candidate window size */
evas_object_geometry_get (_candidate_window, &x, &y, &width, &height);
- if (_candidate_vertical) {
+ {
if (evas_object_visible_get (_aux_area) && evas_object_visible_get (_candidate_area_1)) {
evas_object_show (_aux_line);
ui_candidate_window_resize (width, _candidate_port_height_min_2);
evas_object_move (_close_btn, _close_btn_pos[0], _close_btn_pos[1]);
}
}
- } else {
- if (evas_object_visible_get (_aux_area) && evas_object_visible_get (_candidate_area_1)) {
- evas_object_show (_aux_line);
- ui_candidate_window_resize (width, _candidate_port_height_min_2);
- evas_object_move (_candidate_area_1, 0, _candidate_port_height_min_2 - _candidate_port_height_min);
- } else if (evas_object_visible_get (_aux_area)) {
- evas_object_hide (_aux_line);
- ui_candidate_window_resize (width, _aux_height);
- } else if (evas_object_visible_get (_candidate_area_1)) {
- evas_object_hide (_aux_line);
- ui_candidate_window_resize (width, _candidate_port_height_min);
- evas_object_move (_candidate_area_1, 0, 0);
- }
}
}
elm_win_rotation_set (_candidate_window, angle);
ui_candidate_hide (true);
if (angle == 90 || angle == 270) {
- if (_candidate_vertical) {
- _candidate_scroll_width = _candidate_scroll_width_max;
- ui_candidate_window_resize (_candidate_land_width, _candidate_land_height_min);
- evas_object_resize (_aux_area, _aux_land_width, _aux_height);
- evas_object_resize (_candidate_area_1, _candidate_scroll_0_width_max, _item_min_height);
- evas_object_resize (_candidate_area_2, _candidate_scroll_width, _candidate_scroll_height_min);
- } else {
- evas_object_resize (_candidate_window, _screen_height, _candidate_land_height_min);
- evas_object_resize (_candidate_area_1, _screen_height, _candidate_land_height_min);
- evas_object_resize (_aux_area, _screen_height - 2*_blank_width, _aux_height);
- }
+ _candidate_scroll_width = _candidate_scroll_width_max;
+ ui_candidate_window_resize (_candidate_land_width, _candidate_land_height_min);
+ evas_object_resize (_aux_area, _aux_land_width, _aux_height);
+ evas_object_resize (_candidate_area_1, _candidate_scroll_0_width_max, _item_min_height);
+ evas_object_resize (_candidate_area_2, _candidate_scroll_width, _candidate_scroll_height_min);
} else {
- if (_candidate_vertical) {
- _candidate_scroll_width = _candidate_scroll_width_min;
- ui_candidate_window_resize (_candidate_port_width, _candidate_port_height_min);
- evas_object_resize (_aux_area, _aux_port_width, _aux_height);
- evas_object_resize (_candidate_area_1, _candidate_scroll_0_width_min, _item_min_height);
- evas_object_resize (_candidate_area_2, _candidate_scroll_width, _candidate_scroll_height_max);
- } else {
- evas_object_resize (_candidate_window, _screen_width, _candidate_port_height_min);
- evas_object_resize (_candidate_area_1, _screen_width, _candidate_port_height_min);
- evas_object_resize (_aux_area, _screen_width - 2*_blank_width, _aux_height);
- }
+ _candidate_scroll_width = _candidate_scroll_width_min;
+ ui_candidate_window_resize (_candidate_port_width, _candidate_port_height_min);
+ evas_object_resize (_aux_area, _aux_port_width, _aux_height);
+ evas_object_resize (_candidate_area_1, _candidate_scroll_0_width_min, _item_min_height);
+ evas_object_resize (_candidate_area_2, _candidate_scroll_width, _candidate_scroll_height_max);
}
/* Delete old candidate items and popup lines */
}
/**
- * @brief Callback function for horizontal candidate item is clicked.
- *
- * @param data Data to pass when it is called.
- * @param object The Evas_Object handler for current event.
- * @param event_info The information for current event.
- */
-static void ui_horizontal_candidate_item_click_cb (void *data, Evas_Object *object, void *event_info)
-{
- SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
-
- _panel_agent->select_candidate ((uint32)GPOINTER_TO_INT (data));
- Elm_Toolbar_Item *it = elm_toolbar_selected_item_get (_candidate_toolbar);
-
- if (it)
- elm_toolbar_item_selected_set (it, EINA_FALSE);
-}
-
-/**
* @brief Create more window for candidate.
*/
static void ui_create_more_window (void)
/**
* @brief Create prediction engine style candidate window.
- *
- * @param vertical An indicator for vertical window or horizontal window.
*/
-static void ui_create_prediction_engine_candidate_window (bool vertical)
+static void ui_create_prediction_engine_candidate_window (void)
{
SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
_candidate_window = efl_create_window ("candidate", "Prediction Window");
evas_object_resize (_candidate_window, _screen_width, _candidate_port_height_min);
- if (vertical) {
+ {
evas_object_resize (_candidate_window, _candidate_port_width, _candidate_port_height_min);
/* Add background */
_candidate_bg = edje_object_add (evas_object_evas_get (_candidate_window));
edje_object_file_set (_candidate_bg, _candidate_edje_file.c_str (), "candidate_bg");
+ evas_object_size_hint_weight_set(_candidate_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add (_candidate_window, _candidate_bg);
evas_object_show (_candidate_bg);
/* Create _candidate_0 scroller */
_candidate_0_scroll = elm_scroller_add (_candidate_window);
- elm_scroller_bounce_set (_candidate_0_scroll, 1, 0);
+ elm_scroller_bounce_set (_candidate_0_scroll, EINA_TRUE, EINA_FALSE);
elm_scroller_policy_set (_candidate_0_scroll, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_OFF);
evas_object_resize (_candidate_0_scroll, _candidate_scroll_0_width_min, _item_min_height);
evas_object_move (_candidate_0_scroll, _candidate_area_1_pos[0], _candidate_area_1_pos[1]);
evas_object_move (_close_btn, _close_btn_pos[0], _close_btn_pos[1]);
evas_object_resize (_close_btn, 84 * _width_rate, _item_min_height);
evas_object_event_callback_add (_close_btn, EVAS_CALLBACK_MOUSE_UP, ui_candidate_window_close_button_cb, NULL);
- } else {
- /* Add background */
- Evas_Object *bg = elm_bg_add (_candidate_window);
- evas_object_size_hint_weight_set (bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_bg_file_set (bg, EFL_CANDIDATE_BG, NULL);
- elm_win_resize_object_add (_candidate_window, bg);
- evas_object_show (bg);
-
- /* Create candidate toolbar */
- _candidate_toolbar = elm_toolbar_add (_candidate_window);
- elm_toolbar_mode_shrink_set(_candidate_toolbar, ELM_TOOLBAR_SHRINK_SCROLL);
- elm_toolbar_homogeneous_set (_candidate_toolbar, 0);
- elm_toolbar_align_set (_candidate_toolbar, 0);
- evas_object_size_hint_weight_set (_candidate_toolbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set (_candidate_toolbar, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_resize (_candidate_toolbar, _screen_width, _candidate_port_height_min);
- evas_object_move (_candidate_toolbar, 0, 0);
- _candidate_area_1 = _candidate_toolbar;
}
_tmp_candidate_text = evas_object_text_add (evas_object_evas_get (_candidate_window));
_aux_area = elm_scroller_add (_candidate_window);
elm_scroller_bounce_set (_aux_area, 1, 0);
elm_scroller_policy_set (_aux_area, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_OFF);
- if (vertical)
- evas_object_resize (_aux_area, _aux_port_width, _aux_height);
- else
- evas_object_resize (_aux_area, _screen_width - 2*_blank_width, _aux_height);
+ evas_object_resize (_aux_area, _aux_port_width, _aux_height);
evas_object_move (_aux_area, _blank_width, 0);
_aux_table = elm_table_add (_candidate_window);
* @brief Create candidate window.
*
* @param style The candidate window style.
- * @param vertical An indicator for vertical window or horizontal window.
*/
-static void ui_create_candidate_window (ISF_CANDIDATE_STYLE_T style, bool vertical)
+static void ui_create_candidate_window (ISF_CANDIDATE_STYLE_T style)
{
check_time ("\nEnter ui_create_candidate_window");
SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
_candidate_angle = 0;
- ui_create_prediction_engine_candidate_window (vertical);
+ ui_create_prediction_engine_candidate_window ();
check_time ("Exit ui_create_candidate_window");
}
evas_object_del (_candidate_items [i]);
_candidate_items [i] = NULL;
}
-
- if (_candidate_table_items [i]) {
- elm_toolbar_item_del (_candidate_table_items [i]);
- _candidate_table_items [i] = NULL;
- }
-
- if (_candidate_seperator_items [i]) {
- elm_toolbar_item_del (_candidate_seperator_items [i]);
- _candidate_seperator_items [i] = NULL;
- }
}
_aux_items.clear ();
}
if (_candidate_angle == 90 || _candidate_angle == 270) {
- if (_candidate_vertical) {
- spot_y = (_screen_height - width) / 2;
- } else {
- spot_y = 0;
- }
+ spot_y = (_screen_height - width) / 2;
} else {
- if (_candidate_vertical) {
- spot_x = (_screen_width - width) / 2;
- } else {
- spot_x = 0;
- }
+ spot_x = (_screen_width - width) / 2;
}
if (spot_x != x || spot_y != y) {
SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
if (!_candidate_window) {
- ui_create_candidate_window (_candidate_style, _candidate_vertical);
+ ui_create_candidate_window (_candidate_style);
}
}
* @param table_items The table items for candidate or associate.
* @param seperator_items The seperator items for candidate or associate.
*/
-static void update_table (const int table_type, const LookupTable &table,
- Elm_Toolbar_Item *table_items[], Elm_Toolbar_Item *seperator_items[])
+static void update_table (const int table_type, const LookupTable &table)
{
SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
int i, x, y, width, height, item_width, item_number, item_0_width;
int item_num = table.get_current_page_size ();
- if (_candidate_vertical) {
+ {
_more_list.clear ();
if (_candidate_angle == 90 || _candidate_angle == 270)
ui_more_window_update ();
}
- } else {
- for (i = 0; i < SCIM_LOOKUP_TABLE_MAX_PAGESIZE; ++i) {
- if (i < item_num) {
- wcs = table.get_candidate_in_current_page (i);
- mbs = utf8_wcstombs (wcs);
-
- if (table_items [i]) {
- elm_toolbar_item_label_set (table_items [i], mbs.c_str ());
- } else {
- if (i > 0) {
- seperator_items [i] = elm_toolbar_item_append (_candidate_toolbar, NULL, mbs.c_str (), NULL, NULL);
- elm_toolbar_item_separator_set (seperator_items [i], 1);
- }
-
- table_items [i] = elm_toolbar_item_append (_candidate_toolbar, NULL, mbs.c_str (), ui_horizontal_candidate_item_click_cb, GINT_TO_POINTER (i));
- }
- } else {
- if (table_items [i]) {
- elm_toolbar_item_del (table_items [i]);
- table_items [i] = NULL;
- }
- if (seperator_items [i]) {
- elm_toolbar_item_del (seperator_items [i]);
- seperator_items [i] = NULL;
- }
- }
- }
}
}
slot_show_candidate_table ();
}
- update_table (ISF_CANDIDATE_TABLE, table, _candidate_table_items, _candidate_seperator_items);
+ update_table (ISF_CANDIDATE_TABLE, table);
}
/**
for (i = 0; i < SCIM_LOOKUP_TABLE_MAX_PAGESIZE; i++) {
_candidate_0 [i] = NULL;
_candidate_items [i] = NULL;
- _candidate_table_items [i] = NULL;
- _candidate_seperator_items [i] = NULL;
}
efl_get_screen_size (_screen_width, _screen_height);
Evas_Object *layout_main;
Evas_Object *naviframe;
Evas_Object *opt_eo;
- Elm_Genlist_Item *sw_ise_item_tizen; //sw
- Elm_Genlist_Item *hw_ise_item_tizen; //hw
- Elm_Genlist_Item *sw_ise_opt_item_tizen; //sw opt
- Elm_Genlist_Item *hw_ise_opt_item_tizen; //hw opt
+ Elm_Object_Item *sw_ise_item_tizen; //sw
+ Elm_Object_Item *hw_ise_item_tizen; //hw
+ Elm_Object_Item *sw_ise_opt_item_tizen; //sw opt
+ Elm_Object_Item *hw_ise_opt_item_tizen; //hw opt
void (*key_end_cb)(void *, Evas_Object *, void *);
struct ui_gadget *ug;
};
#define SETTING_LOCALEDIR "/opt/ug/res/locale"
#define _T(s) dgettext(SETTING_PACKAGE, s)
-
enum {
F_CONNECTION_AUTO = 0,
F_CONNECTION_ALWAYS_USED,
extern std::vector <String> _module_names;
extern std::vector <String> _langs;
-
static Evas_Object *_gl_icon_get(void *data, Evas_Object *obj, const char *part);
static char *_gl_label_get(void *data, Evas_Object *obj, const char *part);
static Eina_Bool _gl_state_get(void *data, Evas_Object *obj, const char *part);
static Evas_Object *_create_bg(Evas_Object *win)
{
Evas_Object *bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_weight_set (bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(bg);
return bg;
}
static Evas_Object *create_fullview (Evas_Object *parent, struct ug_data *ugd)
{
- Evas_Object *bg = _create_bg(parent);
+ Evas_Object *bg = _create_bg (parent);
Evas_Object *layout_main = NULL;
layout_main = elm_layout_add (parent);
return NULL;
elm_layout_theme_set (layout_main, "layout", "application", "default");
- elm_object_style_set(bg, "group_list");
+ elm_object_style_set (bg, "group_list");
elm_object_part_content_set (layout_main, "elm.swallow.bg", bg);
return layout_main;
static Evas_Object *create_frameview (Evas_Object *parent, struct ug_data *ugd)
{
- Evas_Object *bg = _create_bg(parent);
+ Evas_Object *bg = _create_bg (parent);
Evas_Object *layout_main = elm_layout_add (parent);
if (layout_main == NULL)
return NULL;
elm_layout_theme_set (layout_main, "layout", "application", "default");
- elm_object_style_set(bg, "group_list");
+ elm_object_style_set (bg, "group_list");
elm_object_part_content_set (layout_main, "elm.swallow.bg", bg);
return layout_main;
}
static void update_isf_setting_main_view(ug_data *ugd)
{
p_items[SW_KEYBOARD_SEL_ITEM]->sub_text = strdup(_active_ise_name);
- elm_genlist_item_data_set(ugd->sw_ise_item_tizen,p_items[SW_KEYBOARD_SEL_ITEM]);
+ elm_object_item_data_set (ugd->sw_ise_item_tizen, p_items[SW_KEYBOARD_SEL_ITEM]);
p_items[HW_KEYBOARD_SEL_ITEM]->sub_text = strdup(_active_hw_ise_name);
- elm_genlist_item_data_set(ugd->hw_ise_item_tizen,p_items[HW_KEYBOARD_SEL_ITEM]);
+ elm_object_item_data_set (ugd->hw_ise_item_tizen, p_items[HW_KEYBOARD_SEL_ITEM]);
}
static void sw_keyboard_selection_view_set_cb (void *data, Evas_Object *obj, void *event_info)
std::vector<String> langlist_vec,normal_langlist_vec;
scim_split_string_list(langlist_vec,langlist_str);
normal_langlist_str = ((scim_get_language_name(langlist_vec[0].c_str())).c_str()) ;
- for (unsigned int i = 1;i<langlist_vec.size();i++) {
+ for (unsigned int i = 1; i < langlist_vec.size(); i++) {
normal_langlist_str += String(", ");
normal_langlist_str += ((scim_get_language_name(langlist_vec[i].c_str())).c_str());
}
Evas_Object *scroller = elm_scroller_add(common_ugd->naviframe);
- elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_FALSE);
+ elm_scroller_bounce_set (scroller, EINA_FALSE, EINA_FALSE);
Evas_Object* layout = elm_layout_add(common_ugd->naviframe);
- elm_layout_file_set(layout, ISF_SETTING_EDJ, "isfsetting/languageview");
+ elm_layout_file_set (layout, ISF_SETTING_EDJ, "isfsetting/languageview");
Evas_Object *label = elm_label_add(layout);
- elm_label_line_wrap_set(label, ELM_WRAP_WORD);
+ elm_label_line_wrap_set (label, ELM_WRAP_WORD);
Evas_Coord win_w = 0, win_h = 0;
ecore_x_window_size_get(ecore_x_window_root_first_get(), &win_w, &win_h);
- elm_label_wrap_width_set(label, win_w - PADDING_X * 2);
- elm_object_text_set(label, normal_langlist_str.c_str());
- elm_object_part_content_set(layout, "content", label);
+ elm_label_wrap_width_set (label, win_w - PADDING_X * 2);
+ elm_object_text_set (label, normal_langlist_str.c_str());
+ elm_object_part_content_set (layout, "content", label);
elm_object_content_set (scroller, layout);
//Push the layout along with function buttons and title
Elm_Object_Item *it = elm_naviframe_item_push(common_ugd->naviframe, _T(sw_iselist[index].c_str()), NULL, NULL, scroller, NULL);
- Evas_Object *back_btn = elm_object_item_content_part_get (it, ELM_NAVIFRAME_ITEM_PREV_BTN);
+ Evas_Object *back_btn = elm_object_item_part_content_get (it, ELM_NAVIFRAME_ITEM_PREV_BTN);
evas_object_smart_callback_add (back_btn, "clicked", lang_view_back_cb, NULL);
common_ugd->key_end_cb = lang_view_back_cb;
Evas_Object *onoff_ck = elm_check_add(obj);
elm_object_style_set (onoff_ck, "on&off");
if (item_data->mode == AUTO_CAPITALIZATION_ITEM) {
- elm_check_state_set(onoff_ck,f_auto_capitalization);
+ elm_check_state_set (onoff_ck,f_auto_capitalization);
}
evas_object_smart_callback_add (onoff_ck, "changed", _onoff_cb, (void *)(item_data->mode));
return onoff_ck;
static void _gl_sw_ise_sel(void *data, Evas_Object *obj, void *event_info)
{
- Elm_Genlist_Item *item = (Elm_Genlist_Item *)event_info;
- elm_genlist_item_selected_set(item, EINA_FALSE);
+ Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+ elm_genlist_item_selected_set (item, EINA_FALSE);
mark = (int) (data);
set_active_ise(mark);
static void _gl_hw_ise_sel(void *data, Evas_Object *obj, void *event_info)
{
- Elm_Genlist_Item *item = (Elm_Genlist_Item *)event_info;
- elm_genlist_item_selected_set(item, EINA_FALSE);
+ Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+ elm_genlist_item_selected_set (item, EINA_FALSE);
hw_mark = (int) (data);
snprintf (_active_hw_ise_name, sizeof (_active_hw_ise_name), "%s", hw_iselist[hw_mark].c_str ());
static void _gl_sel(void *data, Evas_Object *obj, void *event_info)
{
- Elm_Genlist_Item *item = (Elm_Genlist_Item *)event_info;
- elm_genlist_item_selected_set(item, EINA_FALSE);
+ Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+ elm_genlist_item_selected_set (item, EINA_FALSE);
int id = (int) (data);
static void _gl_keyboard_sel(void *data, Evas_Object *obj, void *event_info)
{
- Elm_Genlist_Item *item = (Elm_Genlist_Item *)event_info;
+ Elm_Object_Item *item = (Elm_Object_Item *)event_info;
ug_data *ugd = (ug_data *)data;
if (item == ugd->sw_ise_item_tizen)
sw_keyboard_selection_view_tizen (ugd);
if (item == ugd->hw_ise_item_tizen)
hw_keyboard_selection_view_tizen(ugd);
- elm_genlist_item_selected_set(item, EINA_FALSE);
+ elm_genlist_item_selected_set (item, EINA_FALSE);
return;
}
static void _gl_ise_option_sel(void *data, Evas_Object *obj, void *event_info)
{
- Elm_Genlist_Item *item = (Elm_Genlist_Item *)event_info;
+ Elm_Object_Item *item = (Elm_Object_Item *)event_info;
ug_data *ugd = (ug_data *)data;
const char *isename = NULL;
if (item == ugd->sw_ise_opt_item_tizen)
else
isename = _active_hw_ise_name;
show_ise_option_module(ugd, isename);
- elm_genlist_item_selected_set(item, EINA_FALSE);
+ elm_genlist_item_selected_set (item, EINA_FALSE);
}
static char *_gl_exp_sw_label_get(void *data, Evas_Object *obj, const char *part)
}
if (!strcmp(part,"elm.icon.2")) {
Evas_Object *icon = elm_button_add(obj);
- elm_object_style_set(icon, "reveal");
+ elm_object_style_set (icon, "reveal");
evas_object_smart_callback_add (icon, "clicked", show_lang_cb, (void *)(index));
evas_object_propagate_events_set (icon, EINA_FALSE);//not propagate to genlist item.
return icon;
//Push the layout along with function buttons and title
Elm_Object_Item *it = elm_naviframe_item_push(ugd->naviframe, _T("Selection"), NULL, NULL, genlist, NULL);
- Evas_Object *back_btn = elm_object_item_content_part_get (it, ELM_NAVIFRAME_ITEM_PREV_BTN);
+ Evas_Object *back_btn = elm_object_item_part_content_get (it, ELM_NAVIFRAME_ITEM_PREV_BTN);
evas_object_smart_callback_add (back_btn, "clicked", sw_keyboard_selection_view_set_cb, ugd);
unsigned int i = 0;
if (sw_iselist.size () > 0) {
// Set item class for dialogue group seperator
itcSeparator.item_style = "dialogue/separator/21/with_line";
- itcSeparator.func.label_get = NULL;
- itcSeparator.func.icon_get = NULL;
+ itcSeparator.func.text_get = NULL;
+ itcSeparator.func.content_get = NULL;
itcSeparator.func.state_get = NULL;
itcSeparator.func.del = NULL;
//separator
- Elm_Genlist_Item *item;
+ Elm_Object_Item *item;
item = elm_genlist_item_append(
genlist, // genlist object
&itcSeparator, // item class
ELM_GENLIST_ITEM_NONE,
NULL,
NULL);
- elm_genlist_item_display_only_set(item, EINA_TRUE);
+ elm_genlist_item_display_only_set (item, EINA_TRUE);
}
for (i = 0; i < sw_iselist.size (); i++) {
//set item class for 1text.1icon(text+radiobutton)
itc4.item_style = "dialogue/1text.2icon.2";
- itc4.func.label_get = _gl_exp_sw_label_get;
- itc4.func.icon_get = _gl_exp_sw_icon_get;
+ itc4.func.text_get = _gl_exp_sw_label_get;
+ itc4.func.content_get = _gl_exp_sw_icon_get;
itc4.func.state_get = _gl_state_get;
itc4.func.del = _gl_del;
for (i = 0;i < sw_iselist.size();i++) {
Elm_Object_Item *it = elm_naviframe_item_push (ugd->naviframe, title, NULL, NULL, ugd->opt_eo, NULL);
- Evas_Object *back_btn = elm_object_item_content_part_get (it, ELM_NAVIFRAME_ITEM_PREV_BTN);
+ Evas_Object *back_btn = elm_object_item_part_content_get (it, ELM_NAVIFRAME_ITEM_PREV_BTN);
evas_object_smart_callback_add (back_btn, "clicked", ise_option_view_set_cb, ugd);
ugd->key_end_cb = ise_option_view_set_cb;
}
//Push the layout along with function buttons and title
Elm_Object_Item *nf_it = elm_naviframe_item_push(ugd->naviframe, _T("Selection"), NULL, NULL, genlist, NULL);
- Evas_Object *back_btn = elm_object_item_content_part_get (nf_it, ELM_NAVIFRAME_ITEM_PREV_BTN);
+ Evas_Object *back_btn = elm_object_item_part_content_get (nf_it, ELM_NAVIFRAME_ITEM_PREV_BTN);
evas_object_smart_callback_add (back_btn, "clicked", hw_keyboard_selection_view_set_cb, ugd);
unsigned int i = 0;
if (hw_iselist.size () > 0) {
// Set item class for dialogue group seperator
itcSeparator.item_style = "dialogue/separator/21/with_line";
- itcSeparator.func.label_get = NULL;
- itcSeparator.func.icon_get = NULL;
+ itcSeparator.func.text_get = NULL;
+ itcSeparator.func.content_get = NULL;
itcSeparator.func.state_get = NULL;
itcSeparator.func.del = NULL;
//separator
- Elm_Genlist_Item *item;
+ Elm_Object_Item *item;
item = elm_genlist_item_append(
genlist, // genlist object
&itcSeparator, // item class
ELM_GENLIST_ITEM_NONE,
NULL,
NULL);
- elm_genlist_item_display_only_set(item, EINA_TRUE);
+ elm_genlist_item_display_only_set (item, EINA_TRUE);
}
std::vector<String>::iterator it;
//set item class for 1text.1icon(text+radiobutton)
itc5.item_style = "dialogue/1text.1icon.2";
- itc5.func.label_get = _gl_exp_hw_label_get;
- itc5.func.icon_get = _gl_exp_hw_icon_get;
+ itc5.func.text_get = _gl_exp_hw_label_get;
+ itc5.func.content_get = _gl_exp_hw_icon_get;
itc5.func.state_get = _gl_state_get;
itc5.func.del = _gl_del;
for (i = 0;i < hw_iselist.size();i++) {
static Evas_Object *isf_setting_main_view_tizen (ug_data *ugd)
{
- Elm_Genlist_Item *item = NULL;
+ Elm_Object_Item *item = NULL;
if (ugd->naviframe == NULL)
{
Evas_Object *genlist = elm_genlist_add(ugd->naviframe);
//set item class for 1text.1icon(text+radiobutton)
itc1.item_style = "dialogue/1text.1icon";
- itc1.func.label_get = _gl_label_get;
- itc1.func.icon_get = _gl_icon_get;
+ itc1.func.text_get = _gl_label_get;
+ itc1.func.content_get = _gl_icon_get;
itc1.func.state_get = _gl_state_get;
itc1.func.del = _gl_del;
//set item class for 2text(text+subtext)
itc2.item_style = "dialogue/2text.3";
- itc2.func.label_get = _gl_label_get;
- itc2.func.icon_get = NULL;
+ itc2.func.text_get = _gl_label_get;
+ itc2.func.content_get = NULL;
itc2.func.state_get = _gl_state_get;
itc2.func.del = _gl_del;
//set item class for normal text(text)
itc3.item_style = "dialogue/1text";
- itc3.func.label_get = _gl_label_get;
- itc3.func.icon_get = NULL;
+ itc3.func.text_get = _gl_label_get;
+ itc3.func.content_get = NULL;
itc3.func.state_get = _gl_state_get;
itc3.func.del = _gl_del;
// Set item class for dialogue group seperator
itcSeparator.item_style = "dialogue/separator/21/with_line";
- itcSeparator.func.label_get = NULL;
- itcSeparator.func.icon_get = NULL;
+ itcSeparator.func.text_get = NULL;
+ itcSeparator.func.content_get = NULL;
itcSeparator.func.state_get = NULL;
itcSeparator.func.del = NULL;
// Set item class for dialogue group title
itcTitle.item_style = "dialogue/title";
- itcTitle.func.label_get = _gl_label_get;
- itcTitle.func.icon_get = NULL;
+ itcTitle.func.text_get = _gl_label_get;
+ itcTitle.func.content_get = NULL;
itcTitle.func.state_get = _gl_state_get;
itcTitle.func.del = _gl_del;
//==================================group begin =======================
ELM_GENLIST_ITEM_NONE,
NULL,
NULL);
- elm_genlist_item_display_only_set(item, EINA_TRUE);
+ elm_genlist_item_display_only_set (item, EINA_TRUE);
//group1 item1
item_data = (ItemData *)malloc(sizeof(ItemData));
if (item_data != NULL) {
- memset(item_data,0,sizeof(ItemData));
+ memset (item_data, 0, sizeof(ItemData));
p_items[AUTO_CAPITALIZATION_ITEM] = item_data;
item_data->text = strdup(_T("Auto capitalization"));
item_data->mode = AUTO_CAPITALIZATION_ITEM;
//group2 title
item_data = (ItemData *)malloc(sizeof(ItemData));
if (item_data != NULL) {
- memset(item_data,0,sizeof(ItemData));
+ memset (item_data, 0, sizeof(ItemData));
p_items[SW_KEYBOARD_GROUP_TITLE_ITEM] = item_data;
item_data->text = strdup(_T("Software keyboard"));
item = elm_genlist_item_append(
ELM_GENLIST_ITEM_NONE,
NULL,
NULL);
- elm_genlist_item_display_only_set(item, EINA_TRUE);
+ elm_genlist_item_display_only_set (item, EINA_TRUE);
}
//group2 item1
item_data = (ItemData *)malloc(sizeof(ItemData));
if (item_data!=NULL) {
- memset(item_data,0,sizeof(ItemData));
+ memset (item_data, 0, sizeof(ItemData));
p_items[SW_KEYBOARD_SEL_ITEM] = item_data;
item_data->text = strdup(_T("Keyboard selection"));
item_data->sub_text = strdup(_active_ise_name);
(void *)ugd);
if (is_hw_connected)
- elm_genlist_item_disabled_set(ugd->sw_ise_item_tizen, EINA_TRUE);
+ elm_object_item_disabled_set (ugd->sw_ise_item_tizen, EINA_TRUE);
}
//group2 item2
item_data = (ItemData *)malloc(sizeof(ItemData));
if (item_data != NULL) {
- memset(item_data,0,sizeof(ItemData));
+ memset (item_data, 0, sizeof(ItemData));
p_items[SW_ISE_OPTION_ITEM] = item_data;
item_data->text = strdup (_T("Keyboard option"));
item_data->mode = SW_ISE_OPTION_ITEM;
(void *)ugd);
if (is_hw_connected)
- elm_genlist_item_disabled_set(ugd->sw_ise_opt_item_tizen,EINA_TRUE);
+ elm_object_item_disabled_set (ugd->sw_ise_opt_item_tizen, EINA_TRUE);
}
//group3 title
item_data = (ItemData *)malloc(sizeof(ItemData));
if (item_data != NULL) {
- memset(item_data,0,sizeof(ItemData));
+ memset (item_data, 0, sizeof(ItemData));
p_items[HW_KEYBOARD_GROUP_TITLE_ITEM] = item_data;
item_data->text=strdup(_T("Hardware keyboard"));
item = elm_genlist_item_append(
ELM_GENLIST_ITEM_NONE,
NULL,
NULL);
- elm_genlist_item_display_only_set(item, EINA_TRUE);
+ elm_genlist_item_display_only_set (item, EINA_TRUE);
}
//group3 item1
item_data = (ItemData *)malloc(sizeof(ItemData));
if (item_data != NULL) {
- memset(item_data,0,sizeof(ItemData));
+ memset (item_data, 0, sizeof(ItemData));
p_items[HW_KEYBOARD_SEL_ITEM] = item_data;
item_data->text = strdup(_T("Keyboard selection"));
item_data->sub_text = strdup(_active_hw_ise_name);
(void *)ugd);
if (!is_hw_connected)
- elm_genlist_item_disabled_set(ugd->hw_ise_item_tizen,EINA_TRUE);
+ elm_object_item_disabled_set (ugd->hw_ise_item_tizen,EINA_TRUE);
}
//group3 item2
p_items[HW_ISE_OPTION_ITEM] = NULL;
//==================================group end =========================
Evas_Object *back_btn = elm_button_add(ugd->naviframe);
- elm_object_style_set(back_btn, "naviframe/back_btn/default");
+ elm_object_style_set (back_btn, "naviframe/back_btn/default");
evas_object_smart_callback_add (back_btn, "clicked", back_cb, ugd);
elm_naviframe_item_push (ugd->naviframe, _T("Keyboard"), back_btn, NULL, genlist, NULL);
static void hw_connection_change_cb(ug_data *ugd)
{
//enable / disable switch
- elm_genlist_item_disabled_set(ugd->sw_ise_item_tizen,!elm_genlist_item_disabled_get(ugd->sw_ise_item_tizen));
- elm_genlist_item_disabled_set(ugd->sw_ise_opt_item_tizen,!elm_genlist_item_disabled_get(ugd->sw_ise_opt_item_tizen));
- elm_genlist_item_disabled_set(ugd->hw_ise_item_tizen,!elm_genlist_item_disabled_get(ugd->hw_ise_item_tizen));
- elm_genlist_item_disabled_set(ugd->hw_ise_opt_item_tizen,!elm_genlist_item_disabled_get(ugd->hw_ise_opt_item_tizen));
+ elm_object_item_disabled_set (ugd->sw_ise_item_tizen, !elm_object_item_disabled_get(ugd->sw_ise_item_tizen));
+ elm_object_item_disabled_set (ugd->sw_ise_opt_item_tizen, !elm_object_item_disabled_get(ugd->sw_ise_opt_item_tizen));
+ elm_object_item_disabled_set (ugd->hw_ise_item_tizen, !elm_object_item_disabled_get(ugd->hw_ise_item_tizen));
+ elm_object_item_disabled_set (ugd->hw_ise_opt_item_tizen, !elm_object_item_disabled_get(ugd->hw_ise_opt_item_tizen));
if (!is_hw_connected)
{
if (_prop_change_handler) return;
_rootwin = ecore_x_window_root_first_get();
- ecore_x_event_mask_set(_rootwin, ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
+ ecore_x_event_mask_set (_rootwin, ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
_prop_change_handler = ecore_event_handler_add
(ECORE_X_EVENT_WINDOW_PROPERTY, _prop_change, (void *)ugd);
continue;
}
else{
- if (mdl->option_reset(_config) == false)
+ if (mdl->option_reset (_config) == false)
{
printf("mdl %s failed to reset option!\n",module_name);
if (mdl)
elm_layout_theme_set (layout_main, "layout","application","default");
elm_object_style_set(bg, "group_list");
- elm_layout_content_set (layout_main, "elm.swallow.bg", bg);
+ elm_object_part_content_set (layout_main, "elm.swallow.bg", bg);
return layout_main;
}
return NULL;
elm_layout_theme_set (layout_main, "layout", "application", "default");
elm_object_style_set(bg, "group_list");
- elm_layout_content_set (layout_main, "elm.swallow.bg", bg);
+ elm_object_part_content_set (layout_main, "elm.swallow.bg", bg);
return layout_main;
}
static Evas_Object* _create_naviframe_layout (Evas_Object* parent)
{
Evas_Object *naviframe = elm_naviframe_add (parent);
- elm_layout_content_set (parent, "elm.swallow.content", naviframe);
+ elm_object_part_content_set (parent, "elm.swallow.content", naviframe);
evas_object_show (naviframe);
return naviframe;
static void _gl_sel(void *data, Evas_Object *obj, void *event_info)
{
- Elm_Genlist_Item *item = (Elm_Genlist_Item *)event_info;
+ Elm_Object_Item *item = (Elm_Object_Item *)event_info;
elm_genlist_item_selected_set(item, 0);
mark = (int) (data);
snprintf (_active_ise_name, sizeof (_active_ise_name), "%s", sw_iselist[mark].c_str ());
if (sw_iselist.size () > 0) {
// Set item class for dialogue group seperator
itcSeparator.item_style = "dialogue/separator/21/with_line";
- itcSeparator.func.label_get = NULL;
- itcSeparator.func.icon_get = NULL;
+ itcSeparator.func.text_get = NULL;
+ itcSeparator.func.content_get = NULL;
itcSeparator.func.state_get = NULL;
itcSeparator.func.del = NULL;
//separator
- Elm_Genlist_Item *item;
+ Elm_Object_Item *item;
item = elm_genlist_item_append(
genlist, // genlist object
&itcSeparator, // item class
//set item class for 1text.1icon(text+radiobutton)
itc1.item_style = "dialogue/1text.1icon.2";
- itc1.func.label_get = _gl_label_get;
- itc1.func.icon_get = _gl_icon_get;
+ itc1.func.text_get = _gl_label_get;
+ itc1.func.content_get = _gl_icon_get;
itc1.func.state_get = _gl_state_get;
itc1.func.del = _gl_del;
for (i = 0;i < sw_iselist.size();i++) {
if (ugd->layout_main != NULL) {
content = isf_setting_main_view_tizen(ugd);
- elm_layout_content_set (ugd->layout_main, "elm.swallow.content", content);
+ elm_object_part_content_set (ugd->layout_main, "elm.swallow.content", content);
}
return (void *)ugd->layout_main;
}
HelperAgentSignalInt signal_update_associate_table_page_size;
HelperAgentSignalVoid signal_reset_ise_context;
HelperAgentSignalUintVoid signal_set_screen_direction;
- HelperAgentSignalRawVoid signal_set_indicator_char_count;
- HelperAgentSignalRawVoid signal_set_im_embedded_editor_im_button_label;
- HelperAgentSignalRawVoid signal_set_im_embedded_editor_preset_text;
- HelperAgentSignalRawVoid signal_set_im_embedded_editor_text;
- HelperAgentSignalUintVoid signal_set_im_embedded_editor_max_length;
- HelperAgentSignalUintVoid signal_set_im_embedded_editor_button_senstivity;
- HelperAgentSignalIntUint signal_set_im_embedded_editor_progress_bar;
- HelperAgentSignalGetIMDataVoid signal_get_im_embedded_editor_text;
- HelperAgentSignalRawVoid signal_set_im_indicator_count_label;
HelperAgentSignalUintVoid signal_turn_on_log;
public:
m_impl->signal_set_screen_direction (this, direction);
break;
}
- case ISM_TRANS_CMD_SET_INDICATOR_CHAR_COUNT:
- {
- char *buf = NULL;
- size_t len;
- if (m_impl->recv.get_data (&buf, len))
- m_impl->signal_set_indicator_char_count (this, buf, len);
- if (buf)
- delete [] buf;
- break;
- }
- case ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_IM_BUTTON_SET_LABEL:
- {
- char *buf = NULL;
- size_t len;
- if (m_impl->recv.get_data (&buf, len))
- m_impl->signal_set_im_embedded_editor_im_button_label (this, buf, len);
- if (buf)
- delete [] buf;
- break;
- }
- case ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_SET_PRESET_TEXT:
- {
- char *buf = NULL;
- size_t len;
- if (m_impl->recv.get_data (&buf, len))
- m_impl->signal_set_im_embedded_editor_preset_text (this, buf, len);
- if (buf)
- delete [] buf;
- break;
- }
- case ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_SET_TEXT:
- {
- char *buf = NULL;
- size_t len;
- if (m_impl->recv.get_data (&buf, len))
- m_impl->signal_set_im_embedded_editor_text (this, buf, len);
- if (buf)
- delete [] buf;
- break;
- }
- case ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_SET_MAX_LENGTH:
- {
- uint32 length;
-
- if (m_impl->recv.get_data (length))
- m_impl->signal_set_im_embedded_editor_max_length (this, length);
- break;
- }
- case ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_BUTTON_SENSTIVITY:
- {
- uint32 senstivity;
-
- if (m_impl->recv.get_data (senstivity))
- m_impl->signal_set_im_embedded_editor_button_senstivity (this, senstivity);
- break;
- }
- case ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_PROGRESS_BAR:
- {
- uint32 timeout,is_showing;
-
- if (m_impl->recv.get_data (timeout) && m_impl->recv.get_data (is_showing) )
- m_impl->signal_set_im_embedded_editor_progress_bar (this, timeout,is_showing);
- break;
- }
- case ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_GET_TEXT:
- {
- char *buf = NULL;
- size_t len = 0;
-
- m_impl->signal_get_im_embedded_editor_text (this, &buf, len);
- m_impl->send.clear ();
- m_impl->send.put_command (SCIM_TRANS_CMD_REPLY);
- m_impl->send.put_data (buf, len);
- m_impl->send.write_to_socket (m_impl->socket);
- break;
- }
- case ISM_TRANS_CMD_IM_INDICATOR_SET_COUNT_LABEL:
- {
- char *buf = NULL;
- size_t len;
- if (m_impl->recv.get_data (&buf, len))
- m_impl->signal_set_im_indicator_count_label (this, buf, len);
- if (buf)
- delete [] buf;
- break;
- }
case ISM_TRANS_CMD_TURN_ON_LOG:
{
uint32 isOn;
return false;
}
- bool set_helper_im_embedded_editor_im_button_set_label (const String &uuid, char *data, size_t &len)
- {
- HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
-
- if (it != m_helper_client_index.end ())
- {
- int client = -1;
- uint32 context = 0;
- Socket client_socket (it->second.id);
- uint32 ctx;
-
- get_focused_context (client, context);
- ctx = get_helper_ic (client, context);
-
- m_send_trans.clear ();
- m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
- m_send_trans.put_data (ctx);
- m_send_trans.put_data (uuid);
- m_send_trans.put_command (ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_IM_BUTTON_SET_LABEL);
- m_send_trans.put_data (data, len);
- m_send_trans.write_to_socket (client_socket);
- return true;
- }
- return false;
- }
-
- bool set_helper_im_embedded_editor_set_preset_text (const String &uuid, char *data, size_t &len)
- {
- HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
-
- if (it != m_helper_client_index.end ())
- {
- int client = -1;
- uint32 context = 0;
- Socket client_socket (it->second.id);
- uint32 ctx;
-
- get_focused_context (client, context);
- ctx = get_helper_ic (client, context);
-
- m_send_trans.clear ();
- m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
- m_send_trans.put_data (ctx);
- m_send_trans.put_data (uuid);
- m_send_trans.put_command (ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_SET_PRESET_TEXT);
- m_send_trans.put_data (data, len);
- m_send_trans.write_to_socket (client_socket);
- return true;
- }
- return false;
- }
-
- bool set_helper_im_embedded_editor_set_text (const String &uuid, char *data, size_t &len)
- {
- HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
-
- if (it != m_helper_client_index.end ())
- {
- int client = -1;
- uint32 context = 0;
- Socket client_socket (it->second.id);
- uint32 ctx;
-
- get_focused_context (client, context);
- ctx = get_helper_ic (client, context);
-
- m_send_trans.clear ();
- m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
- m_send_trans.put_data (ctx);
- m_send_trans.put_data (uuid);
- m_send_trans.put_command (ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_SET_TEXT);
- m_send_trans.put_data (data, len);
- m_send_trans.write_to_socket (client_socket);
- return true;
- }
- return false;
- }
-
- bool set_helper_im_embedded_editor_set_max_length (const String &uuid, uint32 &length)
- {
- HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
-
- if (it != m_helper_client_index.end ())
- {
- int client;
- uint32 context;
- Socket client_socket (it->second.id);
- uint32 ctx;
-
- get_focused_context (client, context);
- ctx = get_helper_ic (client, context);
-
- m_send_trans.clear ();
- m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
- m_send_trans.put_data (ctx);
- m_send_trans.put_data (uuid);
- m_send_trans.put_command (ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_SET_MAX_LENGTH);
- m_send_trans.put_data (length);
- m_send_trans.write_to_socket (client_socket);
- return true;
- }
-
- return false;
- }
-
- bool set_helper_im_embedded_editor_set_button_senstivity(const String &uuid, uint32 &senstivity)
- {
- HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
-
- if (it != m_helper_client_index.end ())
- {
- int client;
- uint32 context;
- Socket client_socket (it->second.id);
- uint32 ctx;
-
- get_focused_context (client, context);
- ctx = get_helper_ic (client, context);
-
- m_send_trans.clear ();
- m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
- m_send_trans.put_data (ctx);
- m_send_trans.put_data (uuid);
- m_send_trans.put_command (ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_BUTTON_SENSTIVITY);
- m_send_trans.put_data (senstivity);
- m_send_trans.write_to_socket (client_socket);
- return true;
- }
-
- return false;
- }
-
- bool set_helper_im_embedded_editor_set_progress_bar(const String &uuid, uint32 &timeout,uint32 &is_showing)
- {
- HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
-
- if (it != m_helper_client_index.end ())
- {
- int client;
- uint32 context;
- Socket client_socket (it->second.id);
- uint32 ctx;
-
- get_focused_context (client, context);
- ctx = get_helper_ic (client, context);
-
- m_send_trans.clear ();
- m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
- m_send_trans.put_data (ctx);
- m_send_trans.put_data (uuid);
- m_send_trans.put_command (ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_PROGRESS_BAR);
- m_send_trans.put_data (timeout);
- m_send_trans.put_data (is_showing);
- m_send_trans.write_to_socket (client_socket);
- return true;
- }
-
- return false;
- }
-
- bool set_helper_im_indicator_count_label (const String &uuid, char *data, size_t &len)
- {
- HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
-
- if (it != m_helper_client_index.end ())
- {
- int client = -1;
- uint32 context = 0;
- Socket client_socket (it->second.id);
- uint32 ctx;
-
- get_focused_context (client, context);
- ctx = get_helper_ic (client, context);
-
- m_send_trans.clear ();
- m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
- m_send_trans.put_data (ctx);
- m_send_trans.put_data (uuid);
- m_send_trans.put_command (ISM_TRANS_CMD_IM_INDICATOR_SET_COUNT_LABEL);
- m_send_trans.put_data (data, len);
- m_send_trans.write_to_socket (client_socket);
- return true;
- }
- return false;
- }
-
void show_isf_panel (int client_id)
{
SCIM_DEBUG_MAIN(4) << "PanelAgent::show_isf_panel ()\n";
return false;
}
- bool get_helper_im_embedded_editor_text (String &uuid, char **buf, size_t &len)
- {
- HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
-
- if (it != m_helper_client_index.end ()) {
-
- int client;
- uint32 context;
- Socket client_socket (it->second.id);
- uint32 ctx;
- Transaction trans;
-
- get_focused_context (client, context);
- ctx = get_helper_ic (client, context);
-
- trans.clear ();
- trans.put_command (SCIM_TRANS_CMD_REPLY);
- trans.put_data (ctx);
- trans.put_data (uuid);
- trans.put_command (ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_GET_TEXT);
-
- int cmd;
- if (trans.write_to_socket (client_socket)
- && trans.read_from_socket (client_socket)
- && trans.get_command(cmd) && cmd == SCIM_TRANS_CMD_REPLY
- && trans.get_data (buf, len))
- {
- SCIM_DEBUG_MAIN (1) << "get_helper_im_embedded_editor_text success\n";
- return true;
- }
- else
- {
- std::cerr << "get_helper_im_embedded_editor_text failed\n";
- }
- }
- return false;
- }
-
bool get_helper_layout (String &uuid, uint32 &layout)
{
HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
delete [] imdata;
}
- void set_ise_im_embedded_editor_im_button_set_label (int client_id)
- {
- SCIM_DEBUG_MAIN(4) << "PanelAgent::set_ise_im_embedded_editor_im_button_set_label ()\n";
- char *data = NULL;
- size_t len;
-
- if (m_recv_trans.get_data (&data, len))
- {
- if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode)
- set_helper_im_embedded_editor_im_button_set_label (m_current_helper_uuid, data, len);
- }
-
- if (NULL != data)
- delete [] data;
- }
-
- void set_ise_im_embedded_editor_set_preset_text (int client_id)
- {
- SCIM_DEBUG_MAIN(4) << "PanelAgent::set_ise_im_embedded_editor_set_preset_text ()\n";
- char *data = NULL;
- size_t len;
-
- if (m_recv_trans.get_data (&data, len))
- {
- if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode)
- set_helper_im_embedded_editor_set_preset_text (m_current_helper_uuid, data, len);
- }
-
- if (NULL != data)
- delete [] data;
- }
-
- void set_ise_im_embedded_editor_set_text (int client_id)
- {
- SCIM_DEBUG_MAIN(4) << "PanelAgent::set_ise_im_embedded_editor_set_text ()\n";
- char *data = NULL;
- size_t len;
-
- if (m_recv_trans.get_data (&data, len))
- {
- if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode)
- set_helper_im_embedded_editor_set_text (m_current_helper_uuid, data, len);
- }
-
- if (NULL != data)
- delete [] data;
- }
-
- void set_ise_im_embedded_editor_set_max_length (int client_id)
- {
- SCIM_DEBUG_MAIN(4) << "PanelAgent::set_ise_im_embedded_editor_set_max_length ()\n";
- uint32 length;
-
- if (m_recv_trans.get_data (length))
- {
- if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode)
- set_helper_im_embedded_editor_set_max_length (m_current_helper_uuid, length);
- }
- }
-
- void set_ise_im_embedded_editor_set_button_senstivity (int client_id)
- {
- SCIM_DEBUG_MAIN(4) << "PanelAgent::set_ise_im_embedded_editor_set_button_senstivity ()\n";
- uint32 senstivity;
- if (m_recv_trans.get_data (senstivity))
- {
- if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode)
- set_helper_im_embedded_editor_set_button_senstivity (m_current_helper_uuid, senstivity);
- }
- }
-
- void set_ise_im_embedded_editor_set_progress_bar (int client_id)
- {
- SCIM_DEBUG_MAIN(4) << "PanelAgent::set_ise_im_embedded_editor_set_progress_bar ()\n";
- uint32 timeout,is_showing;
- if (m_recv_trans.get_data (timeout) && m_recv_trans.get_data (is_showing))
- {
- if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode)
- set_helper_im_embedded_editor_set_progress_bar (m_current_helper_uuid, timeout,is_showing);
- }
- }
-
- void get_ise_im_embedded_editor_text (int client_id)
- {
- SCIM_DEBUG_MAIN(4) << "PanelAgent::get_ise_im_embedded_editor_text ()\n";
- char *buf = NULL;
- size_t len;
- bool ret = false;
-
- TOOLBAR_MODE_T mode;
-
- mode = m_current_toolbar_mode;
-
- if (TOOLBAR_HELPER_MODE == mode)
- {
- ret = get_helper_im_embedded_editor_text (m_current_helper_uuid, &buf, len);
- }
-
- Transaction trans;
- Socket client_socket (client_id);
-
- trans.clear ();
- trans.put_command (SCIM_TRANS_CMD_REPLY);
- if (ret)
- {
- trans.put_command (SCIM_TRANS_CMD_OK);
- trans.put_data (buf, len);
- }
- else
- trans.put_command (SCIM_TRANS_CMD_FAIL);
-
- trans.write_to_socket (client_socket);
-
- if (NULL != buf)
- delete [] buf;
- }
-
- void set_ise_im_indicator_count_label (int client_id)
- {
- SCIM_DEBUG_MAIN(4) << "PanelAgent::set_ise_im_indicator_count_label ()\n";
- char *data = NULL;
- size_t len;
-
- if (m_recv_trans.get_data (&data, len))
- {
- if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode)
- set_helper_im_indicator_count_label (m_current_helper_uuid, data, len);
- }
-
- if (NULL != data)
- delete [] data;
- }
-
void get_ise_imdata (int client_id)
{
SCIM_DEBUG_MAIN(4) << "PanelAgent::get_ise_imdata ()\n";
return client >= 0;
}
- bool set_helper_char_count (const String &uuid, char *buf, size_t &len)
- {
- HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
-
- if (it != m_helper_client_index.end ())
- {
- int client = -1;
- uint32 context = 0;
- Socket client_socket (it->second.id);
- uint32 ctx;
-
- get_focused_context (client, context);
- ctx = get_helper_ic (client, context);
-
- m_send_trans.clear ();
- m_send_trans.put_command (SCIM_TRANS_CMD_REPLY);
- m_send_trans.put_data (ctx);
- m_send_trans.put_data (uuid);
- m_send_trans.put_command (ISM_TRANS_CMD_SET_INDICATOR_CHAR_COUNT);
- m_send_trans.put_data (buf, len);
- m_send_trans.write_to_socket (client_socket);
- return true;
- }
- return false;
- }
-
- void set_ise_char_count (int client_id)
- {
- SCIM_DEBUG_MAIN(4) << "PanelAgent::set_ise_char_count ()\n";
- char *buf = NULL;
- size_t len;
-
- if (m_recv_trans.get_data (&buf, len))
- {
- if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode)
- set_helper_char_count (m_current_helper_uuid, buf, len);
- }
-
- if (NULL != buf)
- delete [] buf;
- }
-
bool find_active_ise_by_uuid (String uuid)
{
HelperInfoRepository::iterator iter = m_helper_info_repository.begin ();
socket_set_keyboard_ise (ISM_TRANS_CMD_SET_KEYBOARD_ISE_BY_UUID);
} else if (cmd == ISM_TRANS_CMD_GET_KEYBOARD_ISE) {
socket_get_keyboard_ise ();
- } else if (cmd == ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_STRING) {
- socket_helper_commit_im_embedded_editor_string (client_id);
- } else if (cmd == ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_CHANGED) {
- socket_helper_im_embedded_editor_changed (client_id);
- } else if (cmd == ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_PREEDIT_CHANGED) {
- socket_helper_im_embedded_editor_preedit_changed (client_id);
- } else if(cmd == ISM_TRANS_CMD_LAUNCH_HELPER_ISE_LIST_SELECTION){
- socket_helper_launch_helper_ise_list_selection();
+ } else if (cmd == ISM_TRANS_CMD_LAUNCH_HELPER_ISE_LIST_SELECTION) {
+ socket_helper_launch_helper_ise_list_selection ();
} else if (cmd == SCIM_TRANS_CMD_GET_SURROUNDING_TEXT) {
socket_helper_get_surrounding_text (client_id);
} else if (cmd == SCIM_TRANS_CMD_DELETE_SURROUNDING_TEXT) {
reset_ise_context (client_id);
else if (cmd == ISM_TRANS_CMD_SET_ISE_SCREEN_DIRECTION)
set_ise_screen_direction (client_id);
- else if (cmd == ISM_TRANS_CMD_SET_INDICATOR_CHAR_COUNT)
- set_ise_char_count (client_id);
- else if (cmd == ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_IM_BUTTON_SET_LABEL)
- set_ise_im_embedded_editor_im_button_set_label (client_id);
- else if (cmd == ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_SET_PRESET_TEXT)
- set_ise_im_embedded_editor_set_preset_text (client_id);
- else if (cmd == ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_SET_TEXT)
- set_ise_im_embedded_editor_set_text (client_id);
- else if (cmd == ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_SET_MAX_LENGTH)
- set_ise_im_embedded_editor_set_max_length (client_id);
- else if (cmd == ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_BUTTON_SENSTIVITY)
- set_ise_im_embedded_editor_set_button_senstivity (client_id);
- else if (cmd == ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_PROGRESS_BAR)
- set_ise_im_embedded_editor_set_progress_bar (client_id);
- else if (cmd == ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_GET_TEXT)
- get_ise_im_embedded_editor_text (client_id);
- else if (cmd == ISM_TRANS_CMD_IM_INDICATOR_SET_COUNT_LABEL)
- set_ise_im_indicator_count_label (client_id);
}
socket_transaction_end ();
socket_reset_helper_input_context (m_current_helper_uuid, client, context);
}
- void socket_helper_commit_im_embedded_editor_string (int client)
- {
- SCIM_DEBUG_MAIN(4) << "PanelAgent::socket_helper_commit_ise_result_to_imcontrol (" << client << ")\n";
-
- char * buf = NULL;
- size_t len;
-
- if (m_recv_trans.get_data (&buf, len))
- {
- ClientRepository::iterator iter = m_client_repository.begin ();
-
- for (; iter != m_client_repository.end (); iter++)
- {
- if (IMCONTROL_CLIENT == iter->second.type
- && iter->first == m_imcontrol_map[m_current_active_imcontrol_id])
- {
- Socket client_socket (iter->first);
- Transaction trans;
-
- trans.clear ();
- trans.put_command (SCIM_TRANS_CMD_REQUEST);
- trans.put_command (ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_STRING);
- trans.put_data (buf, len);
- trans.write_to_socket (client_socket);
- break;
- }
- }
-
- if (buf)
- delete [] buf;
- }
- }
-
- void socket_helper_im_embedded_editor_changed (int client)
- {
- SCIM_DEBUG_MAIN(4) << "PanelAgent::socket_helper_im_embedded_editor_changed (" << client << ")\n";
-
- ClientRepository::iterator iter = m_client_repository.begin ();
-
- for (; iter != m_client_repository.end (); iter++)
- {
- if (IMCONTROL_CLIENT == iter->second.type
- && iter->first == m_imcontrol_map[m_current_active_imcontrol_id])
- {
- Socket client_socket (iter->first);
- Transaction trans;
-
- trans.clear ();
- trans.put_command (SCIM_TRANS_CMD_REQUEST);
- trans.put_command (ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_CHANGED);
-
- trans.write_to_socket (client_socket);
- break;
- }
- }
- }
-
- void socket_helper_im_embedded_editor_preedit_changed (int client)
- {
- SCIM_DEBUG_MAIN(4) << "PanelAgent::socket_helper_im_embedded_editor_preedit_changed (" << client << ")\n";
-
- char * buf = NULL;
- size_t len;
-
- if (m_recv_trans.get_data (&buf, len))
- {
- ClientRepository::iterator iter = m_client_repository.begin ();
-
- for (; iter != m_client_repository.end (); iter++)
- {
- if (IMCONTROL_CLIENT == iter->second.type &&
- iter->first == m_imcontrol_map[m_current_active_imcontrol_id])
- {
- Socket client_socket (iter->first);
- Transaction trans;
-
- trans.clear ();
- trans.put_command (SCIM_TRANS_CMD_REQUEST);
- trans.put_command (ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_PREEDIT_CHANGED);
- trans.put_data (buf, len);
- trans.write_to_socket (client_socket);
- break;
- }
- }
-
- if (buf)
- delete [] buf;
- }
- }
-
bool helper_select_aux (uint32 item)
{
SCIM_DEBUG_MAIN(4) << "PanelAgent::helper_select_aux \n";
#define ISM_TRANS_CMD_RESET_ISE_CONTEXT 1134
#define ISM_TRANS_CMD_SET_ISE_SCREEN_DIRECTION 1135
#define ISM_TRANS_CMD_ISE_RESULT_TO_IMCONTROL 1136
-#define ISM_TRANS_CMD_SET_INDICATOR_CHAR_COUNT 1137
-#define ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_STRING 1138
-#define ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_IM_BUTTON_SET_LABEL 1139
-#define ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_SET_PRESET_TEXT 1140
-#define ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_SET_TEXT 1141
-#define ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_SET_MAX_LENGTH 1142
-#define ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_CHANGED 1143
-#define ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_GET_TEXT 1144
-#define ISM_TRANS_CMD_IM_INDICATOR_SET_COUNT_LABEL 1145
-#define ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_BUTTON_SENSTIVITY 1146
-#define ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_PROGRESS_BAR 1147
-#define ISM_TRANS_CMD_IM_EMBEDDED_EDITOR_PREEDIT_CHANGED 1148
-#define ISM_TRANS_CMD_SET_DISABLE_KEY 1149
-#define ISM_TRANS_CMD_GET_LAYOUT_LIST 1150
+#define ISM_TRANS_CMD_SET_DISABLE_KEY 1137
+#define ISM_TRANS_CMD_GET_LAYOUT_LIST 1138
// ISE to Control Panel
-ISF 2.3.5009 :
+ISF 2.3.5016 :
1. Tizen beta Release