* @since 1.7.0
*/
EAPI const char *ecore_evas_profile_get(const Ecore_Evas *ee);
+
+EAPI Eina_Bool ecore_evas_wm_rotation_supported_get(const Ecore_Evas *ee);
+EAPI void ecore_evas_wm_rotation_preferred_rotation_set(Ecore_Evas *ee, int rotation);
+EAPI int ecore_evas_wm_rotation_preferred_rotation_get(const Ecore_Evas *ee);
+EAPI void ecore_evas_wm_rotation_available_rotations_set(Ecore_Evas *ee, const int *rotations, unsigned int count);
+EAPI Eina_Bool ecore_evas_wm_rotation_available_rotations_get(const Ecore_Evas *ee, int **rotations, unsigned int *count);
+
/**
* @brief Move an Ecore_Evas.
*
return ee->prop.profile;
}
+EAPI Eina_Bool
+ecore_evas_wm_rotation_supported_get(const Ecore_Evas *ee)
+{
+ if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
+ {
+ ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
+ "ecore_evas_wm_rotation_supported_get");
+ return EINA_FALSE;
+ }
+ return ee->prop.wm_rot.supported;
+}
+
+EAPI void
+ecore_evas_wm_rotation_preferred_rotation_set(Ecore_Evas *ee, int rotation)
+{
+ if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
+ {
+ ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
+ "ecore_evas_wm_rotation_preferred_rotation_set");
+ return;
+ }
+ if (rotation != -1)
+ {
+ if (ee->prop.wm_rot.available_rots)
+ {
+ Eina_Bool found = EINA_FALSE;
+ unsigned int i;
+ for (i = 0; i < ee->prop.wm_rot.count; i++)
+ {
+ if (ee->prop.wm_rot.available_rots[i] == rotation)
+ {
+ found = EINA_TRUE;
+ break;
+ }
+ }
+ if (!found) return;
+ }
+ }
+ IFC(ee, fn_wm_rot_preferred_rotation_set) (ee, rotation);
+ IFE;
+}
+
+EAPI int
+ecore_evas_wm_rotation_preferred_rotation_get(const Ecore_Evas *ee)
+{
+ if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
+ {
+ ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
+ "ecore_evas_wm_rotation_preferred_rotation_get");
+ return 0;
+ }
+ return ee->prop.wm_rot.rot;
+}
+
+EAPI void
+ecore_evas_wm_rotation_available_rotations_set(Ecore_Evas *ee, const int *rotations, unsigned int count)
+{
+ if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
+ {
+ ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
+ "ecore_evas_wm_rotation_available_rotations_set");
+ return;
+ }
+ IFC(ee, fn_wm_rot_available_rotations_set) (ee, rotations, count);
+ IFE;
+}
+
+EAPI Eina_Bool
+ecore_evas_wm_rotation_available_rotations_get(const Ecore_Evas *ee, int **rotations, unsigned int *count)
+{
+ if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
+ {
+ ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
+ "ecore_evas_wm_rotation_available_rotations_get");
+ return EINA_FALSE;
+ }
+ if ((!rotations) || (!count))
+ return EINA_FALSE;
+
+ if ((!ee->prop.wm_rot.available_rots) || (ee->prop.wm_rot.count == 0))
+ return EINA_FALSE;
+
+ *rotations = calloc(ee->prop.wm_rot.count, sizeof(int));
+ if (!*rotations) return EINA_FALSE;
+
+ memcpy(*rotations, ee->prop.wm_rot.available_rots, sizeof(int) * ee->prop.wm_rot.count);
+ *count = ee->prop.wm_rot.count;
+
+ return EINA_TRUE;
+}
+
EAPI void
ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on)
{
_ecore_evas_buffer_render,
NULL, // screen_geometry_get
- NULL // screen_dpi_get
+ NULL, // screen_dpi_get
+
+ NULL, // wm_rot_preferred_rotation_set
+ NULL // wm_rot_available_rotations_set
+
};
#endif
NULL, // render
NULL,
- NULL // screen_dpi_get
+ NULL, // screen_dpi_get
+
+ NULL, // wm_rot_preferred_rotation_set
+ NULL // wm_rot_available_rotations_set
};
#endif
NULL, // render
NULL, // screen_geometry_get
- NULL // screen_dpi_get
+ NULL, // screen_dpi_get
+
+ NULL, // wm_rot_preferred_rotation_set
+ NULL // wm_rot_available_rotations_set
};
#endif
_ecore_evas_ews_render,
_ecore_evas_ews_screen_geometry_get,
- NULL // screen_dpi_get
+ NULL, // screen_dpi_get
+
+ NULL, // wm_rot_preferred_rotation_set
+ NULL // wm_rot_available_rotations_set
};
void
NULL, // render
NULL, // screen_geometry_get
- NULL // screen_dpi_get
+ NULL, // screen_dpi_get
+
+ NULL, // wm_rot_preferred_rotation_set
+ NULL // wm_rot_available_rotations_set
};
static Eina_Bool
NULL, // render
NULL, // screen_geometry_get
- NULL // screen_dpi_get
+ NULL, // screen_dpi_get
+
+ NULL, // wm_rot_preferred_rotation_set
+ NULL // wm_rot_available_rotations_set
};
#endif
int (*fn_render) (Ecore_Evas *ee);
void (*fn_screen_geometry_get) (const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
void (*fn_screen_dpi_get) (const Ecore_Evas *ee, int *xdpi, int *ydpi);
+ void (*fn_wm_rot_preferred_rotation_set) (Ecore_Evas *ee, int rot);
+ void (*fn_wm_rot_available_rotations_set) (Ecore_Evas *ee, const int *rots, unsigned int count);
};
struct _Ecore_Evas_Engine
unsigned char netwm_sync_set : 1;
unsigned char configure_coming : 1;
struct {
+ unsigned char supported: 1;
+ unsigned char prepare : 1;
+ unsigned char request : 1;
+ unsigned char done : 1;
+ unsigned char configure_coming : 1;
+ } wm_rot;
+ struct {
unsigned char modal : 1;
unsigned char sticky : 1;
unsigned char maximized_v : 1;
char *clas;
char *profile;
struct {
+ Eina_Bool supported;
+ int angle; // v0
+ Eina_Bool win_resize; // v0
+ int w, h; // v0
+ // added for the window manager rotation protocol
+ Eina_Bool app_set; // v1: app wants to communicate with the window manager to rotate
+ int rot; // v1: decided rotation by the window manager
+ int preferred_rot; // v1: app specified rotation
+ int *available_rots;// v1: app specified available rotations
+ unsigned int count; // v1: number of elements of available rotations
+ } wm_rot;
+ struct {
int w, h;
} min,
max,
NULL, // render
_ecore_evas_screen_geometry_get, // screen_geometry_get
- NULL // screen_dpi_get
+ NULL, // screen_dpi_get
+
+ NULL, // wm_rot_preferred_rotation_set
+ NULL // wm_rot_available_rotations_set
};
EAPI Ecore_Evas *
NULL, // render
NULL, // screen_geometry_get
- NULL // screen_dpi_get
+ NULL, // screen_dpi_get
+
+ NULL, // wm_rot_preferred_rotation_set
+ NULL // wm_rot_available_rotations_set
};
static Ecore_Evas*
NULL,
_ecore_evas_wl_render,
_ecore_evas_wl_screen_geometry_get,
- _ecore_evas_wl_screen_dpi_get
+ _ecore_evas_wl_screen_dpi_get,
+ NULL, // wm_rot_preferred_rotation_set
+ NULL // wm_rot_available_rotations_set
};
/* external variables */
NULL, // focus skip set
_ecore_evas_wl_render,
_ecore_evas_wl_screen_geometry_get,
- _ecore_evas_wl_screen_dpi_get
+ _ecore_evas_wl_screen_dpi_get,
+ NULL, // wm_rot_preferred_rotation_set
+ NULL // wm_rot_available_rotations_set
};
/* external variables */
NULL, // render
NULL, // screen_geometry_get
- _ecore_evas_win32_screen_dpi_get
+ _ecore_evas_win32_screen_dpi_get,
+
+ NULL, // wm_rot_preferred_rotation_set
+ NULL // wm_rot_available_rotations_set
};
#endif /* BUILD_ECORE_EVAS_WIN32 */
NULL, // render
NULL, // screen_geometry_get
- _ecore_evas_wince_screen_dpi_get
+ _ecore_evas_wince_screen_dpi_get,
+
+ NULL, // wm_rot_preferred_rotation_set
+ NULL // wm_rot_available_rotations_set
};
/* API */
NULL, // render
_ecore_evas_x_screen_geometry_get,
- _ecore_evas_x_screen_dpi_get
+ _ecore_evas_x_screen_dpi_get,
+ NULL, //_wm_rot_preferred_rotation_set
+ NULL //_wm_rot_available_rotations_set
};
#endif /* BUILD_ECORE_EVAS_X11 */