/* smart callback called:
* "selectioninfo,timeout" - when time out
*/
+
+ /* do not use except clipboard history module */
+ EAPI Eina_Bool elm_cbhm_helper_init(Evas_Object *self);
+ EAPI void elm_cbhm_send_raw_data(char *cmd);
+
+
#ifdef __cplusplus
}
cbhm_disp = ecore_x_display_get();
if (cbhm_disp == NULL)
return init_flag;
-
- _get_clipboard_window();
+ if (cbhm_win == None)
+ _get_clipboard_window();
if (cbhm_win == None)
_search_clipboard_window(DefaultRootWindow(cbhm_disp));
- self_win = ecore_evas_software_x11_window_get(ecore_evas_ecore_evas_get(evas_object_evas_get(self)));
+ if (self_win == None)
+ self_win = ecore_evas_software_x11_window_get(ecore_evas_ecore_evas_get(evas_object_evas_get(self)));
if (cbhm_disp && cbhm_win && self_win)
init_flag = EINA_TRUE;
}
/**
+ * sending raw command to CBHM
+ *
+ * @return void
+ *
+ * @ingroup CBHM_helper
+ */
+EAPI void
+elm_cbhm_send_raw_data(char *cmd)
+{
+ if (init_flag == EINA_FALSE)
+ return;
+
+ if (cmd == NULL)
+ return;
+
+ _send_clipboard_events(cmd);
+
+ return;
+}
+
+/**
* getting data by history position of CBHM's contents
* 0 is current content.
*
{
evas_object_focus_set(wd->ent, 1);
edje_object_signal_emit(wd->ent, "elm,action,focus", "elm");
+
if (top) elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
+ // start for cbhm
+ if (top)
+ {
+ ecore_x_selection_secondary_set(elm_win_xwindow_get(obj), "",1);
+ }
+ // end for cbhm
evas_object_smart_callback_call(obj, SIG_FOCUSED, NULL);
_check_enable_returnkey(obj);
}
}
static Eina_Bool
-_event_selection_clear(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
+_event_selection_clear(void *data, int type __UNUSED__, void *event)
{
/*
Widget_Data *wd = elm_widget_data_get(data);
elm_entry_select_none(data);
}
return 1;*/
+ // start for cbhm
+ Evas_Object *top = elm_widget_top_get(data);
+ Ecore_X_Event_Selection_Clear *ev = event;
+
+ if (!top)
+ return ECORE_CALLBACK_PASS_ON;
+
+ if (ev->selection != ECORE_X_SELECTION_SECONDARY){
+ ECORE_X_SELECTION_SECONDARY);
+ return ECORE_CALLBACK_PASS_ON;
+ }
+
+ elm_selection_get(1/*ELM_SEL_SECONDARY*/,0x1/*Markup*/,data);
+ // end for cbhm
return ECORE_CALLBACK_PASS_ON;
}
#endif
Evas_Object *obj2 = it->obj;
if (it->func) it->func(it->data, obj2, NULL);
+ // start for cbhm
+ if (!strcmp(it->label, "Menu"))
+ {
+ elm_cbhm_helper_init(obj);
+ elm_cbhm_send_raw_data("show");
+ }
+ // end for cbhm
evas_object_hide(obj);
}