typedef struct _Ecore_Wl_Event_Effect Ecore_Wl_Event_Effect_Start;
typedef struct _Ecore_Wl_Event_Effect Ecore_Wl_Event_Effect_End;
typedef struct _Ecore_Wl_Display Ecore_Wl_Display;
+typedef struct _Ecore_Wl_Event_Output_Transform Ecore_Wl_Event_Output_Transform;
typedef struct _Ecore_Wl_Event_Global Ecore_Wl_Event_Global;
typedef struct _Ecore_Wl_Event_Keymap_Update Ecore_Wl_Event_Keymap_Update;
typedef struct _Ecore_Wl_Event_Indicator_Flick Ecore_Wl_Event_Indicator_Flick;
unsigned int id, version;
};
+struct _Ecore_Wl_Event_Output_Transform
+{
+ Ecore_Wl_Output *output;
+ int old_transform;
+ int transform;
+};
+
struct _Ecore_Wl_Event_Keymap_Update
{
Ecore_Wl_Input *input;
EAPI extern int ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE;
EAPI extern int ECORE_WL_EVENT_EFFECT_START;
EAPI extern int ECORE_WL_EVENT_EFFECT_END;
+EAPI extern int ECORE_WL_EVENT_OUTPUT_TRANSFORM;
EAPI extern int ECORE_WL_EVENT_GLOBAL_ADDED;
EAPI extern int ECORE_WL_EVENT_GLOBAL_REMOVED;
EAPI extern int ECORE_WL_EVENT_KEYMAP_UPDATE;
EAPI int ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE = 0;
EAPI int ECORE_WL_EVENT_EFFECT_START = 0;
EAPI int ECORE_WL_EVENT_EFFECT_END = 0;
+EAPI int ECORE_WL_EVENT_OUTPUT_TRANSFORM = 0;
EAPI int ECORE_WL_EVENT_GLOBAL_ADDED = 0;
EAPI int ECORE_WL_EVENT_GLOBAL_REMOVED = 0;
EAPI int ECORE_WL_EVENT_KEYMAP_UPDATE = 0;
ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE = ecore_event_type_new();
ECORE_WL_EVENT_EFFECT_START = ecore_event_type_new();
ECORE_WL_EVENT_EFFECT_END = ecore_event_type_new();
+ ECORE_WL_EVENT_OUTPUT_TRANSFORM = ecore_event_type_new();
ECORE_WL_EVENT_GLOBAL_ADDED = ecore_event_type_new();
ECORE_WL_EVENT_GLOBAL_REMOVED = ecore_event_type_new();
ECORE_WL_EVENT_KEYMAP_UPDATE = ecore_event_type_new();
LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (transform & 0x4)
+ ERR("can't support the output flip transform");
+
+ transform &= 0x3;
+
output = data;
output->allocation.x = x;
output->allocation.y = y;
output->mw = w;
output->mh = h;
- output->transform = transform;
+
+ if (output->transform != transform)
+ {
+ Ecore_Wl_Event_Output_Transform *ev;
+
+ output->transform = transform;
+
+ if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Output_Transform)))) return;
+
+ ev->output = output;
+ ev->old_transform = output->transform;
+ ev->transform = transform;
+ ecore_event_add(ECORE_WL_EVENT_OUTPUT_TRANSFORM, ev, NULL, NULL);
+ }
}
/* Sets the output's mode */
ewd->outputs = eina_inlist_append(ewd->outputs, EINA_INLIST_GET(output));
wl_output_add_listener(output->output, &_ecore_wl_output_listener, output);
+
+ /* to dispatch the output geometry event now */
+ ecore_wl_sync();
}
/* Destruct the output and remove it from the display's list of available