unsigned char quickpanel_info;
Ecore_Timer *move_outed_timer;
AtspiMoveOutedType move_outed_type;
+ NavigatorContextSwitchCb context_switch_cb;
+ void *context_switch_data;
};
char *state_to_char(AtspiStateType state)
g_object_unref(parent);
}
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-function"
-/* change context root if bus name of window at point is different from bus name of context root */
-TIZEN_PROD_STATIC void _window_at_point_check(NavigatorData *nd, int x, int y)
-{
- AtspiAccessible *touched_window = NULL;
- AtspiAccessible *context_root = NULL;
- gchar *touched_window_bus_name;
- gchar *context_root_bus_name;
-
- touched_window = app_tracker_at_point_window_get(nd->app_tracker_data, x, y);
- context_root = flat_navi_context_root_get(nd->flat_navi_context);
-
- if (!touched_window || !context_root) return;
-
- touched_window_bus_name = atspi_accessible_get_bus_name(touched_window, NULL);
- context_root_bus_name = atspi_accessible_get_bus_name(context_root, NULL);
-
- if (touched_window && !atspi_accessible_is_equal(touched_window, context_root) &&
- g_strcmp0(touched_window_bus_name, context_root_bus_name)) {
- gchar *id = atspi_accessible_get_unique_id(touched_window, NULL);
- gchar *id2 = atspi_accessible_get_unique_id(context_root, NULL);
- DEBUG("Window at point: %p (%s) context root: %p (%s)", touched_window, touched_window_bus_name, context_root, context_root_bus_name);
- g_free(id);
- g_free(id2);
- flat_navi_context_root_change(nd->flat_navi_context, touched_window);
- }
-
- g_free(touched_window_bus_name);
- g_free(context_root_bus_name);
-}
-#pragma GCC diagnostic pop
-
TIZEN_PROD_STATIC void _window_of_resource_id_check(NavigatorData *nd, uint32_t resource_id)
{
AtspiAccessible *touched_window = NULL;
- AtspiAccessible *context_root = NULL;
touched_window = app_tracker_resource_id_window_get(nd->app_tracker_data, resource_id);
- context_root = flat_navi_context_root_get(nd->flat_navi_context);
- if (!touched_window || !context_root) return;
+ if (!touched_window) return;
- if (touched_window && !atspi_accessible_is_equal(touched_window, context_root)) {
- gchar *id = atspi_accessible_get_unique_id(touched_window, NULL);
- gchar *id2 = atspi_accessible_get_unique_id(context_root, NULL);
- DEBUG("Changing navigation context root FROM: %s TO: %s (touched window with resID: %u)", id2, id, resource_id);
- g_free(id);
- g_free(id2);
- flat_navi_context_root_change(nd->flat_navi_context, touched_window);
- }
+ if (nd->context_switch_cb)
+ nd->context_switch_cb(nd->context_switch_data, touched_window);
}
TIZEN_PROD_STATIC void _focus_widget(NavigatorData *nd, Gesture_Info *info)
nd->last_pos = (point_t) { .x = -1, .y = -1};
nd->last_hover_event_time = -1;
nd->last_slider_hover_event_time = -1;
- nd->auto_review_on = false;
- nd->slider_offset = 0;
- nd->is_text_selection_mode = EINA_FALSE;
- nd->ignore_keyboard_feedback = EINA_FALSE;
- nd->flat_navi_context = NULL;
- nd->supported_gestures = NULL;
- nd->read_quickpanel_cb = NULL;
- nd->read_quickpanel_data = NULL;
- nd->read_quickpanel_deleter = NULL;
- nd->connection = NULL;
tw_set_utterance_cb(_on_utterance, nd, NULL);
nd->read_quickpanel_deleter = deleter;
}
+void navigator_set_context_switch_cb(NavigatorData *nd, NavigatorContextSwitchCb callback, void *user_data)
+{
+ nd->context_switch_cb = callback;
+ nd->context_switch_data = user_data;
+}
+
FlatNaviContext* navigator_get_flat_navi_context(NavigatorData *nd) {
if (!nd) { ERROR("NavigatorData is NULL!"); }
return nd ? nd->flat_navi_context : NULL;