ecore-wl2: Add API and Event for window rotation change request
@feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
3087f02ef2
commit
1eaaab93b1
|
@ -284,6 +284,7 @@ typedef struct _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_Done;
|
||||
typedef struct _Ecore_Wl2_Event_Window_Rotation Ecore_Wl2_Event_Window_Rotation_Change_Request;
|
||||
|
||||
typedef enum _Ecore_Wl2_Window_Type
|
||||
{
|
||||
|
@ -328,6 +329,7 @@ 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_WINDOW_ROTATION_CHANGE_PREPARE; /** @since 1.20 */
|
||||
EAPI extern int ECORE_Wl2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE_DONE; /** @since 1.20 */
|
||||
EAPI extern int ECORE_Wl2_EVENT_WINDOW_ROTATION_CHANGE_REQUEST; /** @since 1.20 */
|
||||
|
||||
/**
|
||||
* @file
|
||||
|
@ -1080,6 +1082,7 @@ EAPI Eina_Bool ecore_wl2_window_available_rotations_get(Ecore_Wl2_Window *window
|
|||
|
||||
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);
|
||||
EAPI void ecore_wl2_window_rotation_change_request_send(Ecore_Wl2_Window *window, int rot);
|
||||
|
||||
/**
|
||||
* @defgroup Ecore_Wl2_Input_Group Wayland Library Input Functions
|
||||
|
|
|
@ -42,6 +42,7 @@ EAPI int ECORE_WL2_EVENT_SEAT_SELECTION = 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_DONE = 0;
|
||||
EAPI int ECORE_Wl2_EVENT_WINDOW_ROTATION_CHANGE_REQUEST = 0;
|
||||
|
||||
EAPI int _ecore_wl2_event_window_www = -1;
|
||||
EAPI int _ecore_wl2_event_window_www_drag = -1;
|
||||
|
@ -114,6 +115,7 @@ ecore_wl2_init(void)
|
|||
ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE = ecore_event_type_new();
|
||||
ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE_DONE =
|
||||
ecore_event_type_new();
|
||||
ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_REQUEST = ecore_event_type_new();
|
||||
}
|
||||
if (!no_session_recovery)
|
||||
no_session_recovery = !!getenv("EFL_NO_WAYLAND_SESSION_RECOVERY");
|
||||
|
@ -173,7 +175,8 @@ ecore_wl2_shutdown(void)
|
|||
ECORE_WL2_EVENT_SEAT_SELECTION,
|
||||
ECORE_WL2_EVENT_OUTPUT_TRANSFORM,
|
||||
ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE,
|
||||
ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE_DONE);
|
||||
ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE_DONE,
|
||||
ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_REQUEST);
|
||||
|
||||
/* shutdown Ecore_Event */
|
||||
ecore_event_shutdown();
|
||||
|
|
|
@ -1327,3 +1327,23 @@ ecore_wl2_window_rotation_change_prepare_done_send(Ecore_Wl2_Window *window, int
|
|||
ecore_event_add(ECORE_WL2_EVENT_WINDOW_ROTATION_CHANGE_PREPARE_DONE,
|
||||
ev, NULL, NULL);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_wl2_window_rotation_change_request_send(Ecore_Wl2_Window *window, int rot)
|
||||
{
|
||||
Ecore_Wl2_Event_Window_Rotation_Change_Reqest *ev;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(window);
|
||||
|
||||
ev = calloc(1, sizeof(Ecore_Wl2_Event_Window_Rotation_Change_Request));
|
||||
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_REQUEST,
|
||||
ev, NULL, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue