ecore_drm2: Add APIs to support setting display relative properties
This commit is contained in:
parent
862115284a
commit
430dee86e4
|
@ -28,6 +28,18 @@ typedef enum _Ecore_Drm2_Rotation
|
||||||
ECORE_DRM2_ROTATION_REFLECT_Y = 32
|
ECORE_DRM2_ROTATION_REFLECT_Y = 32
|
||||||
} Ecore_Drm2_Rotation;
|
} Ecore_Drm2_Rotation;
|
||||||
|
|
||||||
|
/* public enum for relative mode */
|
||||||
|
typedef enum _Ecore_Drm2_Relative_Mode
|
||||||
|
{
|
||||||
|
ECORE_DRM2_RELATIVE_MODE_UNKNOWN,
|
||||||
|
ECORE_DRM2_RELATIVE_MODE_NONE,
|
||||||
|
ECORE_DRM2_RELATIVE_MODE_CLONE,
|
||||||
|
ECORE_DRM2_RELATIVE_MODE_TO_LEFT,
|
||||||
|
ECORE_DRM2_RELATIVE_MODE_TO_RIGHT,
|
||||||
|
ECORE_DRM2_RELATIVE_MODE_TO_ABOVE,
|
||||||
|
ECORE_DRM2_RELATIVE_MODE_TO_BELOW
|
||||||
|
} Ecore_Drm2_Relative_Mode;
|
||||||
|
|
||||||
/* opaque structure to represent a drm crtc */
|
/* opaque structure to represent a drm crtc */
|
||||||
typedef struct _Ecore_Drm2_Crtc Ecore_Drm2_Crtc;
|
typedef struct _Ecore_Drm2_Crtc Ecore_Drm2_Crtc;
|
||||||
|
|
||||||
|
@ -83,6 +95,7 @@ EAPI void ecore_drm2_display_mode_set(Ecore_Drm2_Display *disp, Ecore_Drm2_Displ
|
||||||
EAPI Ecore_Drm2_Crtc *ecore_drm2_display_crtc_get(Ecore_Drm2_Display *disp);
|
EAPI Ecore_Drm2_Crtc *ecore_drm2_display_crtc_get(Ecore_Drm2_Display *disp);
|
||||||
EAPI Eina_Bool ecore_drm2_display_possible_crtc_get(Ecore_Drm2_Display *disp, Ecore_Drm2_Crtc *crtc);
|
EAPI Eina_Bool ecore_drm2_display_possible_crtc_get(Ecore_Drm2_Display *disp, Ecore_Drm2_Crtc *crtc);
|
||||||
EAPI int ecore_drm2_display_supported_rotations_get(Ecore_Drm2_Display *disp);
|
EAPI int ecore_drm2_display_supported_rotations_get(Ecore_Drm2_Display *disp);
|
||||||
|
EAPI void ecore_drm2_display_relative_to_set(Ecore_Drm2_Display *disp, const char *relative);
|
||||||
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
|
@ -576,6 +576,7 @@ _ecore_drm2_displays_destroy(Ecore_Drm2_Device *dev)
|
||||||
EINA_LIST_FREE(dev->displays, disp)
|
EINA_LIST_FREE(dev->displays, disp)
|
||||||
{
|
{
|
||||||
if (disp->thread) ecore_thread_cancel(disp->thread);
|
if (disp->thread) ecore_thread_cancel(disp->thread);
|
||||||
|
eina_stringshare_del(disp->relative.to);
|
||||||
eina_stringshare_del(disp->serial);
|
eina_stringshare_del(disp->serial);
|
||||||
eina_stringshare_del(disp->model);
|
eina_stringshare_del(disp->model);
|
||||||
eina_stringshare_del(disp->make);
|
eina_stringshare_del(disp->make);
|
||||||
|
@ -934,3 +935,17 @@ ecore_drm2_display_supported_rotations_get(Ecore_Drm2_Display *disp)
|
||||||
/* return primary plane state supported_rotations */
|
/* return primary plane state supported_rotations */
|
||||||
return plane->state.current->supported_rotations;
|
return plane->state.current->supported_rotations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
ecore_drm2_display_relative_mode_set(Ecore_Drm2_Display *disp, Ecore_Drm2_Relative_Mode mode)
|
||||||
|
{
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN(disp);
|
||||||
|
disp->relative.mode = mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
ecore_drm2_display_relative_to_set(Ecore_Drm2_Display *disp, const char *relative)
|
||||||
|
{
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN(disp);
|
||||||
|
eina_stringshare_replace(&disp->relative.to, relative);
|
||||||
|
}
|
||||||
|
|
|
@ -263,6 +263,12 @@ struct _Ecore_Drm2_Display
|
||||||
Ecore_Drm2_Backlight_Type type;
|
Ecore_Drm2_Backlight_Type type;
|
||||||
} backlight;
|
} backlight;
|
||||||
|
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
const char *to;
|
||||||
|
Ecore_Drm2_Relative_Mode mode;
|
||||||
|
} relative;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
Ecore_Drm2_Display_State *current;
|
Ecore_Drm2_Display_State *current;
|
||||||
|
|
Loading…
Reference in New Issue