forked from enlightenment/efl
ecore-drm: Add API function to return output modes
Summary: This adds a new API function to return a list of modes supported on a given output @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
34664306a9
commit
1ab4975491
|
@ -153,8 +153,14 @@ struct _Ecore_Drm_Event_Output
|
||||||
/* opaque structure to represent a drm device */
|
/* opaque structure to represent a drm device */
|
||||||
typedef struct _Ecore_Drm_Device Ecore_Drm_Device;
|
typedef struct _Ecore_Drm_Device Ecore_Drm_Device;
|
||||||
|
|
||||||
/* opaque structure to represent a drm output mode */
|
/* structure to represent a drm output mode */
|
||||||
typedef struct _Ecore_Drm_Output_Mode Ecore_Drm_Output_Mode;
|
typedef struct _Ecore_Drm_Output_Mode
|
||||||
|
{
|
||||||
|
unsigned int flags;
|
||||||
|
int width, height;
|
||||||
|
unsigned int refresh;
|
||||||
|
drmModeModeInfo info;
|
||||||
|
} Ecore_Drm_Output_Mode;
|
||||||
|
|
||||||
/* opaque structure to represent a drm output */
|
/* opaque structure to represent a drm output */
|
||||||
typedef struct _Ecore_Drm_Output Ecore_Drm_Output;
|
typedef struct _Ecore_Drm_Output Ecore_Drm_Output;
|
||||||
|
@ -836,6 +842,20 @@ EAPI Eina_Bool ecore_drm_output_backlight_get(Ecore_Drm_Output *output);
|
||||||
*/
|
*/
|
||||||
EAPI char *ecore_drm_output_edid_get(Ecore_Drm_Output *output);
|
EAPI char *ecore_drm_output_edid_get(Ecore_Drm_Output *output);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of the modes supported on a given output
|
||||||
|
*
|
||||||
|
* @param output The Ecore_Drm_Output to get the modes for
|
||||||
|
*
|
||||||
|
* @return An Eina_List of the modes supported for this output
|
||||||
|
*
|
||||||
|
* @note The returned list should not be freed
|
||||||
|
*
|
||||||
|
* @ingroup Ecore_Drm_Output_Group
|
||||||
|
* @since 1.15
|
||||||
|
*/
|
||||||
|
EAPI Eina_List *ecore_drm_output_modes_get(Ecore_Drm_Output *output);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1137,3 +1137,12 @@ ecore_drm_output_edid_get(Ecore_Drm_Output *output)
|
||||||
|
|
||||||
return strdup(output->edid_blob);
|
return strdup(output->edid_blob);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI Eina_List *
|
||||||
|
ecore_drm_output_modes_get(Ecore_Drm_Output *output)
|
||||||
|
{
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN_VAL(output->modes, NULL);
|
||||||
|
|
||||||
|
return output->modes;
|
||||||
|
}
|
||||||
|
|
|
@ -87,14 +87,6 @@ typedef struct _Ecore_Drm_Pageflip_Callback
|
||||||
int count;
|
int count;
|
||||||
} Ecore_Drm_Pageflip_Callback;
|
} Ecore_Drm_Pageflip_Callback;
|
||||||
|
|
||||||
struct _Ecore_Drm_Output_Mode
|
|
||||||
{
|
|
||||||
unsigned int flags;
|
|
||||||
int width, height;
|
|
||||||
unsigned int refresh;
|
|
||||||
drmModeModeInfo info;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef enum _Ecore_Drm_Backlight_Type
|
typedef enum _Ecore_Drm_Backlight_Type
|
||||||
{
|
{
|
||||||
ECORE_DRM_BACKLIGHT_RAW,
|
ECORE_DRM_BACKLIGHT_RAW,
|
||||||
|
|
Loading…
Reference in New Issue