forked from enlightenment/efl
ecore-wl2: Add API and Event for window rotation change prepare done
@feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
92d214d8f9
commit
3087f02ef2
|
@ -283,6 +283,7 @@ typedef struct _Ecore_Wl2_Event_Window_Rotation
|
||||||
Eina_Bool resize : 1;
|
Eina_Bool resize : 1;
|
||||||
} Ecore_Wl2_Event_Window_Rotation;
|
} Ecore_Wl2_Event_Window_Rotation;
|
||||||
typedef struct _Ecore_Wl2_Event_Window_Rotation Ecore_Wl2_Event_Window_Rotation_Change_Prepare;
|
typedef struct _Ecore_Wl2_Event_Window_Rotation Ecore_Wl2_Event_Window_Rotation_Change_Prepare;
|
||||||
|
typedef struct _Ecore_Wl2_Event_Window_Rotation Ecore_Wl2_Event_Window_Rotation_Change_Prepare_Done;
|
||||||
|
|
||||||
typedef enum _Ecore_Wl2_Window_Type
|
typedef enum _Ecore_Wl2_Window_Type
|
||||||
{
|
{
|
||||||
|
@ -326,6 +327,7 @@ EAPI extern int ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED; /** @since 1.20 */
|
||||||
EAPI extern int ECORE_WL2_EVENT_SEAT_SELECTION; /** @since 1.20 */
|
EAPI extern int ECORE_WL2_EVENT_SEAT_SELECTION; /** @since 1.20 */
|
||||||
EAPI extern int ECORE_WL2_EVENT_OUTPUT_TRANSFORM; /** @since 1.20 */
|
EAPI extern int ECORE_WL2_EVENT_OUTPUT_TRANSFORM; /** @since 1.20 */
|
||||||
EAPI extern int ECORE_Wl2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE; /** @since 1.20 */
|
EAPI extern int ECORE_Wl2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE; /** @since 1.20 */
|
||||||
|
EAPI extern int ECORE_Wl2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE_DONE; /** @since 1.20 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
@ -1077,6 +1079,7 @@ EAPI void ecore_wl2_window_available_rotations_set(Ecore_Wl2_Window *window, con
|
||||||
EAPI Eina_Bool ecore_wl2_window_available_rotations_get(Ecore_Wl2_Window *window, int **rots, unsigned int count);
|
EAPI Eina_Bool ecore_wl2_window_available_rotations_get(Ecore_Wl2_Window *window, int **rots, unsigned int count);
|
||||||
|
|
||||||
EAPI void ecore_wl2_window_rotation_change_prepare_send(Ecore_Wl2_Window *window, int rot, int w, int h, Eina_Bool resize);
|
EAPI void ecore_wl2_window_rotation_change_prepare_send(Ecore_Wl2_Window *window, int rot, int w, int h, Eina_Bool resize);
|
||||||
|
EAPI void ecore_wl2_window_rotation_change_prepare_done_send(Ecore_Wl2_Window *window, int rot);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup Ecore_Wl2_Input_Group Wayland Library Input Functions
|
* @defgroup Ecore_Wl2_Input_Group Wayland Library Input Functions
|
||||||
|
|
|
@ -41,6 +41,7 @@ EAPI int ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED = 0;
|
||||||
EAPI int ECORE_WL2_EVENT_SEAT_SELECTION = 0;
|
EAPI int ECORE_WL2_EVENT_SEAT_SELECTION = 0;
|
||||||
EAPI int ECORE_WL2_EVENT_OUTPUT_TRANSFORM = 0;
|
EAPI int ECORE_WL2_EVENT_OUTPUT_TRANSFORM = 0;
|
||||||
EAPI int ECORE_Wl2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE = 0;
|
EAPI int ECORE_Wl2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE = 0;
|
||||||
|
EAPI int ECORE_Wl2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE_DONE = 0;
|
||||||
|
|
||||||
EAPI int _ecore_wl2_event_window_www = -1;
|
EAPI int _ecore_wl2_event_window_www = -1;
|
||||||
EAPI int _ecore_wl2_event_window_www_drag = -1;
|
EAPI int _ecore_wl2_event_window_www_drag = -1;
|
||||||
|
@ -111,6 +112,8 @@ ecore_wl2_init(void)
|
||||||
ECORE_WL2_EVENT_SEAT_SELECTION = ecore_event_type_new();
|
ECORE_WL2_EVENT_SEAT_SELECTION = ecore_event_type_new();
|
||||||
ECORE_WL2_EVENT_OUTPUT_TRANSFORM = ecore_event_type_new();
|
ECORE_WL2_EVENT_OUTPUT_TRANSFORM = ecore_event_type_new();
|
||||||
ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE = ecore_event_type_new();
|
ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE = ecore_event_type_new();
|
||||||
|
ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE_DONE =
|
||||||
|
ecore_event_type_new();
|
||||||
}
|
}
|
||||||
if (!no_session_recovery)
|
if (!no_session_recovery)
|
||||||
no_session_recovery = !!getenv("EFL_NO_WAYLAND_SESSION_RECOVERY");
|
no_session_recovery = !!getenv("EFL_NO_WAYLAND_SESSION_RECOVERY");
|
||||||
|
@ -169,7 +172,8 @@ ecore_wl2_shutdown(void)
|
||||||
ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED,
|
ECORE_WL2_EVENT_SEAT_KEYBOARD_REPEAT_CHANGED,
|
||||||
ECORE_WL2_EVENT_SEAT_SELECTION,
|
ECORE_WL2_EVENT_SEAT_SELECTION,
|
||||||
ECORE_WL2_EVENT_OUTPUT_TRANSFORM,
|
ECORE_WL2_EVENT_OUTPUT_TRANSFORM,
|
||||||
ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE);
|
ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE,
|
||||||
|
ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE_DONE);
|
||||||
|
|
||||||
/* shutdown Ecore_Event */
|
/* shutdown Ecore_Event */
|
||||||
ecore_event_shutdown();
|
ecore_event_shutdown();
|
||||||
|
|
|
@ -1307,3 +1307,23 @@ ecore_wl2_window_rotation_change_prepare_send(Ecore_Wl2_Window *window, int rot,
|
||||||
|
|
||||||
ecore_event_add(ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE, ev, NULL, NULL);
|
ecore_event_add(ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE, ev, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
ecore_wl2_window_rotation_change_prepare_done_send(Ecore_Wl2_Window *window, int rot)
|
||||||
|
{
|
||||||
|
Ecore_Wl2_Event_Window_Rotation_Change_Prepare_Done *ev;
|
||||||
|
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN(window);
|
||||||
|
|
||||||
|
ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Prepare_Done));
|
||||||
|
if (!ev) return;
|
||||||
|
|
||||||
|
ev->window = window;
|
||||||
|
ev->rotation = rot;
|
||||||
|
ev->w = 0;
|
||||||
|
ev->h = 0;
|
||||||
|
ev->resize = 0;
|
||||||
|
|
||||||
|
ecore_event_add(ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE_DONE,
|
||||||
|
ev, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue