forked from enlightenment/efl
ecore-drm2: Add API functions to get/set output relative mode
These API functions will be used inside Enlightenment in order to determine the proper extended screen size based on outputs relative position. @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
45bffff535
commit
a78dc2d816
|
@ -39,6 +39,17 @@ typedef enum _Ecore_Drm2_Fb_Status
|
||||||
ECORE_DRM2_FB_STATUS_PLANE_RELEASE = 32,
|
ECORE_DRM2_FB_STATUS_PLANE_RELEASE = 32,
|
||||||
} Ecore_Drm2_Fb_Status;
|
} Ecore_Drm2_Fb_Status;
|
||||||
|
|
||||||
|
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 device */
|
/* opaque structure to represent a drm device */
|
||||||
typedef struct _Ecore_Drm2_Device Ecore_Drm2_Device;
|
typedef struct _Ecore_Drm2_Device Ecore_Drm2_Device;
|
||||||
|
|
||||||
|
@ -790,6 +801,29 @@ EAPI void ecore_drm2_output_user_data_set(Ecore_Drm2_Output *o, void *data);
|
||||||
*/
|
*/
|
||||||
EAPI unsigned int ecore_drm2_output_subpixel_get(const Ecore_Drm2_Output *output);
|
EAPI unsigned int ecore_drm2_output_subpixel_get(const Ecore_Drm2_Output *output);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the relative mode for an output
|
||||||
|
*
|
||||||
|
* @param output The output to set relative mode
|
||||||
|
* @param relative The relative mode to set
|
||||||
|
*
|
||||||
|
* @ingroup Ecore_Drm2_Output_Group
|
||||||
|
* @since 1.21
|
||||||
|
*/
|
||||||
|
EAPI void ecore_drm2_output_relative_mode_set(Ecore_Drm2_Output *output, Ecore_Drm2_Relative_Mode mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the relative mode of an output
|
||||||
|
*
|
||||||
|
* @param output The output to retrieve relative mode for
|
||||||
|
*
|
||||||
|
* @return The relative mode of a given output
|
||||||
|
*
|
||||||
|
* @ingroup Ecore_Drm2_Output_Group
|
||||||
|
* @since 1.21
|
||||||
|
*/
|
||||||
|
EAPI Ecore_Drm2_Relative_Mode ecore_drm2_output_relative_mode_get(Ecore_Drm2_Output *output);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup Ecore_Drm2_Fb_Group Drm framebuffer functions
|
* @defgroup Ecore_Drm2_Fb_Group Drm framebuffer functions
|
||||||
*
|
*
|
||||||
|
|
|
@ -1653,3 +1653,17 @@ ecore_drm2_output_pending_get(Ecore_Drm2_Output *output)
|
||||||
|
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
ecore_drm2_output_relative_mode_set(Ecore_Drm2_Output *output, Ecore_Drm2_Relative_Mode mode)
|
||||||
|
{
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN(output);
|
||||||
|
output->relative.mode = mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Ecore_Drm2_Relative_Mode
|
||||||
|
ecore_drm2_output_relative_mode_get(Ecore_Drm2_Output *output)
|
||||||
|
{
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(output, ECORE_DRM2_RELATIVE_MODE_UNKNOWN);
|
||||||
|
return output->relative.mode;
|
||||||
|
}
|
||||||
|
|
|
@ -232,6 +232,11 @@ struct _Ecore_Drm2_Output
|
||||||
Ecore_Drm2_Backlight_Type type;
|
Ecore_Drm2_Backlight_Type type;
|
||||||
} backlight;
|
} backlight;
|
||||||
|
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
Ecore_Drm2_Relative_Mode mode;
|
||||||
|
} relative;
|
||||||
|
|
||||||
drmModeCrtcPtr ocrtc;
|
drmModeCrtcPtr ocrtc;
|
||||||
|
|
||||||
/* prep is for state we're preparing and have never
|
/* prep is for state we're preparing and have never
|
||||||
|
|
Loading…
Reference in New Issue