ELM_WIN_BASIC,
ELM_WIN_DIALOG_BASIC
} Elm_Win_Type;
+
+ typedef enum _Elm_Win_Keyboard_Mode
+ {
+ ELM_WIN_KEYBOARD_UNKNOWN,
+ ELM_WIN_KEYBOARD_OFF,
+ ELM_WIN_KEYBOARD_ON,
+ ELM_WIN_KEYBOARD_ALPHA,
+ ELM_WIN_KEYBOARD_NUMERIC,
+ ELM_WIN_KEYBOARD_PIN,
+ ELM_WIN_KEYBOARD_PHONE_NUMBER,
+ ELM_WIN_KEYBOARD_HEX,
+ ELM_WIN_KEYBOARD_TERMINAL,
+ ELM_WIN_KEYBOARD_PASSWORD
+ } Elm_Win_Keyboard_Mode;
/**************************************************************************/
/* General calls */
EAPI void elm_win_shaped_set(Evas_Object *obj, Evas_Bool shaped);
EAPI void elm_win_alpha_set(Evas_Object *obj, Evas_Bool alpha);
EAPI void elm_win_override_set(Evas_Object *obj, Evas_Bool override);
-// FIXME: implement more of the above calls
+ EAPI void elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode);
+ EAPI void elm_win_keyboard_win_set(Evas_Object *obj, Evas_Bool is_keyboard);
/* smart callbacks called:
* "delete-request" - the user requested to delete the window
*/
// * disabled not supported
// * tab widget focusing (not useful for touchscreen tho...)
// * bubble should allow style (left/right + top/bottom)
-// * need to get toplevel object (win)
-// * entry needs to set vkbd properties/hint (as does win)
-// * entry selection conflicts with finger scroll (make selection start/stop work on signals?)
// * on the fly theme changes - test (should work)
// * entry doesnt talk with x copy & paste at all
+// * entry selection conflicts with finger scroll (make selection start/stop work on signals?)
+// * need a hold-scroll counter in elm_widget
//
//// (more widgets/features - medium priority)
// * toolbar widget (edje + box + button + separators)
// a page size
// * current sizing tree inefficient
// * need a way to filter entry data for entry (eg for phone numbers)
+// * win should emit signals based on vkbd type - if it gets a message and is a vkbd win
+// * win needs a way of setting aspect too
+// * use the wrong call on the wrong widget and *BOOM*
//
#endif
_on_focus_hook(void *data, Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
+ Evas_Object *top = elm_widget_top_get(obj);
if (elm_widget_focus_get(obj))
{
evas_object_focus_set(wd->ent, 1);
edje_object_signal_emit(wd->ent, "elm,action,focus", "elm");
+ elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
}
else
{
edje_object_signal_emit(wd->ent, "elm,action,unfocus", "elm");
evas_object_focus_set(wd->ent, 0);
+ elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF);
}
}
EAPI int elm_widget_can_focus_get(Evas_Object *obj);
EAPI int elm_widget_focus_get(Evas_Object *obj);
EAPI Evas_Object *elm_widget_focused_object_get(Evas_Object *obj);
+EAPI Evas_Object *elm_widget_top_get(Evas_Object *obj);
EAPI int elm_widget_focus_jump(Evas_Object *obj, int forward);
EAPI void elm_widget_focus_set(Evas_Object *obj, int first);
EAPI void elm_widget_focused_object_clear(Evas_Object *obj);
EAPI int elm_widget_disabled_get(Evas_Object *obj);
EAPI void elm_widget_show_region_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
EAPI void elm_widget_show_region_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
-
-
+EAPI void elm_widget_scroll_hold_push(Evas_Object *obj);
+EAPI void elm_widget_scroll_hold_pop(Evas_Object *obj);
+EAPI int elm_widget_scroll_hold_get(Evas_Object *obj);
+
extern char *_elm_appname;
extern Elm_Config *_elm_config;
void *on_show_region_data;
void *data;
Evas_Coord rx, ry, rw, rh;
+ int scroll_hold;
unsigned char can_focus : 1;
unsigned char child_can_focus : 1;
unsigned char focused : 1;
API_ENTRY return;
if (sd->resize_obj)
{
+ if (!strcmp(evas_object_type_get(sd->resize_obj), SMART_NAME))
+ {
+ Smart_Data *sd2 = evas_object_smart_data_get(sd->resize_obj);
+ if (sd2) sd2->parent_obj = NULL;
+ }
evas_object_event_callback_del(sd->resize_obj, EVAS_CALLBACK_DEL, _sub_obj_del);
evas_object_event_callback_del(sd->resize_obj, EVAS_CALLBACK_MOUSE_DOWN, _sub_obj_mouse_down);
evas_object_smart_member_del(sd->resize_obj);
sd->resize_obj = sobj;
if (sd->resize_obj)
{
+ if (!strcmp(evas_object_type_get(sd->resize_obj), SMART_NAME))
+ {
+ Smart_Data *sd2 = evas_object_smart_data_get(sd->resize_obj);
+ if (sd2) sd2->parent_obj = obj;
+ }
evas_object_clip_set(sobj, evas_object_clip_get(obj));
evas_object_smart_member_add(sobj, obj);
evas_object_event_callback_add(sobj, EVAS_CALLBACK_DEL, _sub_obj_del, sd);
return obj;
}
+EAPI Evas_Object *
+elm_widget_top_get(Evas_Object *obj)
+{
+ Eina_List *l;
+ API_ENTRY return NULL;
+ if (sd->parent_obj) return elm_widget_top_get(sd->parent_obj);
+ return obj;
+}
+
EAPI int
elm_widget_focus_jump(Evas_Object *obj, int forward)
{
if (h) *h = sd->rh;
}
+EAPI void
+elm_widget_scroll_hold_push(Evas_Object *obj)
+{
+ API_ENTRY return;
+ sd->scroll_hold++;
+ if (sd->parent_obj) elm_widget_scroll_hold_push(sd->parent_obj);
+}
+
+EAPI void
+elm_widget_scroll_hold_pop(Evas_Object *obj)
+{
+ API_ENTRY return;
+ sd->scroll_hold--;
+ if (sd->parent_obj) elm_widget_scroll_hold_pop(sd->parent_obj);
+}
+
+EAPI int
+elm_widget_scroll_hold_get(Evas_Object *obj)
+{
+ API_ENTRY return 0;
+ return sd->scroll_hold;
+}
+
/* local subsystem functions */
static void
_smart_reconfigure(Smart_Data *sd)
Ecore_X_Window xwin;
Ecore_Job *deferred_resize_job;
Ecore_Job *deferred_child_eval_job;
- Elm_Win_Type type;
- Evas_Bool autodel : 1;
+
+ Elm_Win_Type type;
+ Elm_Win_Keyboard_Mode kbdmode;
+ Evas_Bool autodel : 1;
};
static void _elm_win_resize(Ecore_Evas *ee);
break;
}
}
-
+ if (win->xwin)
+ ecore_x_e_virtual_keyboard_state_set
+ (win->xwin, (Ecore_X_Virtual_Keyboard_State)win->kbdmode);
}
static void
ecore_evas_override_set(win->ee, override);
_elm_win_xwin_update(win);
}
+
+EAPI void
+elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode)
+{
+ Elm_Win *win = evas_object_data_get(obj, "__Elm");
+ if (!win) return;
+ if (mode == win->kbdmode) return;
+ win->xwin = 0;
+ switch (_elm_config->engine)
+ {
+ case ELM_SOFTWARE_X11:
+ if (win->ee) win->xwin = ecore_evas_software_x11_window_get(win->ee);
+ break;
+ case ELM_SOFTWARE_FB:
+ break;
+ case ELM_SOFTWARE_16_X11:
+ if (win->ee) win->xwin = ecore_evas_software_x11_16_window_get(win->ee);
+ break;
+ case ELM_XRENDER_X11:
+ if (win->ee) win->xwin = ecore_evas_xrender_x11_window_get(win->ee);
+ break;
+ case ELM_OPENGL_X11:
+ if (win->ee) win->xwin = ecore_evas_gl_x11_window_get(win->ee);
+ break;
+ default:
+ break;
+ }
+ win->kbdmode = mode;
+ if (win->xwin)
+ ecore_x_e_virtual_keyboard_state_set
+ (win->xwin, (Ecore_X_Virtual_Keyboard_State)win->kbdmode);
+}
+
+EAPI void
+elm_win_keyboard_win_set(Evas_Object *obj, Evas_Bool is_keyboard)
+{
+ Elm_Win *win = evas_object_data_get(obj, "__Elm");
+ if (!win) return;
+ win->xwin = 0;
+ switch (_elm_config->engine)
+ {
+ case ELM_SOFTWARE_X11:
+ if (win->ee) win->xwin = ecore_evas_software_x11_window_get(win->ee);
+ break;
+ case ELM_SOFTWARE_FB:
+ break;
+ case ELM_SOFTWARE_16_X11:
+ if (win->ee) win->xwin = ecore_evas_software_x11_16_window_get(win->ee);
+ break;
+ case ELM_XRENDER_X11:
+ if (win->ee) win->xwin = ecore_evas_xrender_x11_window_get(win->ee);
+ break;
+ case ELM_OPENGL_X11:
+ if (win->ee) win->xwin = ecore_evas_gl_x11_window_get(win->ee);
+ break;
+ default:
+ break;
+ }
+ if (win->xwin)
+ ecore_x_e_virtual_keyboard_set
+ (win->xwin, is_keyboard);
+}