2016-05-02 07:21:00 -07:00
|
|
|
#ifndef _ECORE_DRM2_H
|
|
|
|
# define _ECORE_DRM2_H
|
|
|
|
|
|
|
|
# include <Ecore.h>
|
|
|
|
|
|
|
|
# ifdef EAPI
|
|
|
|
# undef EAPI
|
|
|
|
# endif
|
|
|
|
|
2018-01-02 21:23:10 -08:00
|
|
|
# ifdef __GNUC__
|
|
|
|
# if __GNUC__ >= 4
|
|
|
|
# define EAPI __attribute__ ((visibility("default")))
|
|
|
|
# else // if __GNUC__ >= 4
|
2016-05-02 07:21:00 -07:00
|
|
|
# define EAPI
|
2018-01-02 21:23:10 -08:00
|
|
|
# endif // if __GNUC__ >= 4
|
|
|
|
# else // ifdef __GNUC__
|
|
|
|
# define EAPI
|
|
|
|
# endif // ifdef __GNUC__
|
2016-05-02 07:21:00 -07:00
|
|
|
|
|
|
|
# ifdef EFL_BETA_API_SUPPORT
|
|
|
|
|
2017-01-18 07:06:20 -08:00
|
|
|
typedef enum _Ecore_Drm2_Rotation
|
|
|
|
{
|
|
|
|
ECORE_DRM2_ROTATION_NORMAL = 1,
|
|
|
|
ECORE_DRM2_ROTATION_90 = 2,
|
|
|
|
ECORE_DRM2_ROTATION_180 = 4,
|
|
|
|
ECORE_DRM2_ROTATION_270 = 8,
|
|
|
|
ECORE_DRM2_ROTATION_REFLECT_X = 16,
|
|
|
|
ECORE_DRM2_ROTATION_REFLECT_Y = 32
|
|
|
|
} Ecore_Drm2_Rotation;
|
|
|
|
|
2017-06-15 10:55:03 -07:00
|
|
|
typedef enum _Ecore_Drm2_Fb_Status
|
|
|
|
{
|
|
|
|
ECORE_DRM2_FB_STATUS_SCANOUT_ON = 1,
|
|
|
|
ECORE_DRM2_FB_STATUS_SCANOUT_OFF = 2,
|
|
|
|
ECORE_DRM2_FB_STATUS_RELEASE = 4,
|
2017-06-16 14:19:29 -07:00
|
|
|
ECORE_DRM2_FB_STATUS_DELETED = 8,
|
2017-06-16 14:30:39 -07:00
|
|
|
ECORE_DRM2_FB_STATUS_PLANE_ASSIGN = 16,
|
|
|
|
ECORE_DRM2_FB_STATUS_PLANE_RELEASE = 32,
|
2017-06-15 10:55:03 -07:00
|
|
|
} Ecore_Drm2_Fb_Status;
|
|
|
|
|
2018-02-06 06:07:26 -08:00
|
|
|
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;
|
|
|
|
|
2016-05-02 07:40:47 -07:00
|
|
|
/* opaque structure to represent a drm device */
|
|
|
|
typedef struct _Ecore_Drm2_Device Ecore_Drm2_Device;
|
|
|
|
|
2016-05-02 08:26:44 -07:00
|
|
|
/* opaque structure to represent a framebuffer object */
|
|
|
|
typedef struct _Ecore_Drm2_Fb Ecore_Drm2_Fb;
|
|
|
|
|
|
|
|
/* opaque structure to represent an output device */
|
|
|
|
typedef struct _Ecore_Drm2_Output Ecore_Drm2_Output;
|
|
|
|
|
|
|
|
/* opaque structure to represent an output mode */
|
|
|
|
typedef struct _Ecore_Drm2_Output_Mode Ecore_Drm2_Output_Mode;
|
|
|
|
|
2017-03-24 05:01:51 -07:00
|
|
|
/* opaque structure to represent a hardware plane */
|
|
|
|
typedef struct _Ecore_Drm2_Plane Ecore_Drm2_Plane;
|
|
|
|
|
2016-05-02 08:26:44 -07:00
|
|
|
/* structure to represent event for output changes */
|
|
|
|
typedef struct _Ecore_Drm2_Event_Output_Changed
|
|
|
|
{
|
|
|
|
unsigned int id;
|
|
|
|
int x, y, w, h;
|
|
|
|
int phys_width, phys_height;
|
|
|
|
unsigned int refresh, scale;
|
|
|
|
int subpixel, transform;
|
|
|
|
const char *make, *model, *name;
|
|
|
|
Eina_Bool connected : 1;
|
|
|
|
Eina_Bool enabled : 1;
|
|
|
|
} Ecore_Drm2_Event_Output_Changed;
|
|
|
|
|
2016-05-09 09:47:02 -07:00
|
|
|
/* structure to represent event for session state changes */
|
|
|
|
typedef struct _Ecore_Drm2_Event_Activate
|
|
|
|
{
|
|
|
|
Eina_Bool active : 1;
|
|
|
|
} Ecore_Drm2_Event_Activate;
|
|
|
|
|
2016-11-14 12:22:19 -08:00
|
|
|
/* structure to represent a drm event context */
|
|
|
|
typedef struct _Ecore_Drm2_Context
|
|
|
|
{
|
|
|
|
int version;
|
|
|
|
void (*vblank_handler)(int fd, unsigned int sequence, unsigned int tv_sec,
|
|
|
|
unsigned int tv_usec, void *user_data);
|
|
|
|
void (*page_flip_handler)(int fd, unsigned int sequence, unsigned int tv_sec,
|
|
|
|
unsigned int tv_usec, void *user_data);
|
2020-05-01 07:26:54 -07:00
|
|
|
void (*page_flip_handler2)(int fd, unsigned int sequence, unsigned int tv_sec,
|
|
|
|
unsigned int tv_usec, unsigned int crtc_id, void *user_data);
|
2016-11-14 12:22:19 -08:00
|
|
|
} Ecore_Drm2_Context;
|
|
|
|
|
2016-05-02 08:26:44 -07:00
|
|
|
EAPI extern int ECORE_DRM2_EVENT_OUTPUT_CHANGED;
|
2016-05-09 09:47:02 -07:00
|
|
|
EAPI extern int ECORE_DRM2_EVENT_ACTIVATE;
|
2016-05-02 08:26:44 -07:00
|
|
|
|
2016-09-09 11:31:20 -07:00
|
|
|
typedef void (*Ecore_Drm2_Release_Handler)(void *data, Ecore_Drm2_Fb *b);
|
2017-06-15 10:55:03 -07:00
|
|
|
typedef void (*Ecore_Drm2_Fb_Status_Handler)(Ecore_Drm2_Fb *b, Ecore_Drm2_Fb_Status status, void *data);
|
2016-09-09 11:31:20 -07:00
|
|
|
|
2016-05-02 07:21:00 -07:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief Ecore functions for dealing with drm, virtual terminals
|
|
|
|
*
|
|
|
|
* @defgroup Ecore_Drm2_Group Ecore_Drm2 - Drm Integration
|
|
|
|
* @ingroup Ecore
|
|
|
|
*
|
|
|
|
* Ecore_Drm2 provides a wrapper and functions for using libdrm
|
|
|
|
*
|
|
|
|
* @li @ref Ecore_Drm2_Init_Group
|
|
|
|
* @li @ref Ecore_Drm2_Device_Group
|
2016-05-02 08:26:44 -07:00
|
|
|
* @li @ref Ecore_Drm2_Output_Group
|
2016-05-02 08:45:39 -07:00
|
|
|
* @li @ref Ecore_Drm2_Fb_Group
|
2017-03-27 08:54:38 -07:00
|
|
|
* @li @ref Ecore_Drm2_Plane_Group
|
2016-05-02 07:21:00 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup Ecore_Drm2_Init_Group Drm library Init and Shutdown functions
|
|
|
|
*
|
|
|
|
* Functions that start and shutdown the Ecore_Drm2 library
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize the Ecore_Drm2 library
|
|
|
|
*
|
|
|
|
* @return The number of times the library has been initialized without
|
|
|
|
* being shut down. 0 is returned if an error occurs.
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Init_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI int ecore_drm2_init(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Shutdown the Ecore_Drm2 library
|
|
|
|
*
|
|
|
|
* @return The number of times the library has been initialized without
|
|
|
|
* being shutdown. 0 is returned if an error occurs.
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Init_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI int ecore_drm2_shutdown(void);
|
|
|
|
|
2016-11-14 12:22:19 -08:00
|
|
|
/**
|
|
|
|
* Read and process pending Drm events
|
|
|
|
*
|
2017-07-21 13:48:40 -07:00
|
|
|
* @param dev drm device
|
2020-04-20 03:22:44 -07:00
|
|
|
* @param drmctx
|
2016-11-14 12:22:19 -08:00
|
|
|
*
|
|
|
|
* @return 0 on success, -1 otherwise
|
|
|
|
*
|
|
|
|
* @note: Do not ever use this function in applications !!!
|
|
|
|
* This is a special-purpose API function and should not be used by
|
|
|
|
* application developers.
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm_Init_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
2017-07-21 13:48:40 -07:00
|
|
|
EAPI int ecore_drm2_event_handle(Ecore_Drm2_Device *dev, Ecore_Drm2_Context *drmctx);
|
2016-11-14 12:22:19 -08:00
|
|
|
|
2016-05-02 07:40:47 -07:00
|
|
|
/**
|
|
|
|
* @defgroup Ecore_Drm2_Device_Group Drm device functions
|
|
|
|
*
|
|
|
|
* Functions that deal with finding, opening, closing, or obtaining various
|
|
|
|
* information about a drm device
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2017-08-03 12:56:19 -07:00
|
|
|
* Try to open the Ecore_Drm2_Device for a given seat
|
2016-05-02 07:40:47 -07:00
|
|
|
*
|
|
|
|
* @param seat
|
|
|
|
* @param tty
|
|
|
|
*
|
2017-08-03 12:56:19 -07:00
|
|
|
* @return An Ecore_Drm2_Device or NULL on failure.
|
2016-05-02 07:40:47 -07:00
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
2017-08-03 12:56:19 -07:00
|
|
|
EAPI Ecore_Drm2_Device *ecore_drm2_device_open(const char *seat, unsigned int tty);
|
2016-05-02 07:40:47 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Close an open Ecore_Drm2_Device
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_device_close(Ecore_Drm2_Device *device);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the type of clock used by a given Ecore_Drm2_Device
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
*
|
|
|
|
* @return The clockid_t used by this drm device
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI int ecore_drm2_device_clock_id_get(Ecore_Drm2_Device *device);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the size of the cursor supported by a given Ecore_Drm2_Device
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param width
|
|
|
|
* @param height
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_device_cursor_size_get(Ecore_Drm2_Device *device, int *width, int *height);
|
|
|
|
|
2016-05-04 08:03:15 -07:00
|
|
|
/**
|
|
|
|
* Get the current pointer position
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param x
|
|
|
|
* @param y
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_device_pointer_xy_get(Ecore_Drm2_Device *device, int *x, int *y);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Warp the pointer position to given coordinates
|
|
|
|
*
|
2020-04-20 03:22:44 -07:00
|
|
|
* @param device
|
2016-05-04 08:03:15 -07:00
|
|
|
* @param x
|
|
|
|
* @param y
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_device_pointer_warp(Ecore_Drm2_Device *device, int x, int y);
|
|
|
|
|
2016-05-24 06:32:21 -07:00
|
|
|
/**
|
|
|
|
* Set a left handed mode for the given device
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param left
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_device_pointer_left_handed_set(Ecore_Drm2_Device *device, Eina_Bool left);
|
|
|
|
|
2016-05-11 06:07:48 -07:00
|
|
|
/**
|
|
|
|
* Set which window is to be used for input events
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param window
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_device_window_set(Ecore_Drm2_Device *device, unsigned int window);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set maximium position that pointer device is allowed to move
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param w
|
|
|
|
* @param h
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_device_pointer_max_set(Ecore_Drm2_Device *device, int w, int h);
|
|
|
|
|
2017-08-24 08:32:51 -07:00
|
|
|
/**
|
|
|
|
* Set pointer acceleration speed
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param speed
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.21
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_device_pointer_accel_speed_set(Ecore_Drm2_Device *device, double speed);
|
|
|
|
|
2017-08-24 08:42:57 -07:00
|
|
|
/**
|
|
|
|
* Set pointer acceleration profile
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param profile
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.21
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_device_pointer_accel_profile_set(Ecore_Drm2_Device *device, uint32_t profile);
|
|
|
|
|
2017-06-08 06:23:17 -07:00
|
|
|
/**
|
|
|
|
* Set pointer value rotation
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param rotation
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_device_pointer_rotation_set(Ecore_Drm2_Device *device, int rotation);
|
|
|
|
|
2019-01-31 05:41:04 -08:00
|
|
|
/**
|
|
|
|
* Enable or disable pointer tap-to-click
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param enabled
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.22
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_device_touch_tap_to_click_enabled_set(Ecore_Drm2_Device *device, Eina_Bool enabled);
|
|
|
|
|
2016-05-27 06:55:11 -07:00
|
|
|
/**
|
2017-05-26 13:34:10 -07:00
|
|
|
* Set info to be used on keyboards
|
2016-05-27 06:55:11 -07:00
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param context
|
2017-05-26 13:34:10 -07:00
|
|
|
* @param keymap
|
|
|
|
* @param group
|
2016-05-27 06:55:11 -07:00
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
2017-05-26 13:34:10 -07:00
|
|
|
* @since 1.20
|
2016-05-27 06:55:11 -07:00
|
|
|
*/
|
2017-05-26 13:34:10 -07:00
|
|
|
EAPI void ecore_drm2_device_keyboard_info_set(Ecore_Drm2_Device *device, void *context, void *keymap, int group);
|
2016-05-27 06:55:11 -07:00
|
|
|
|
|
|
|
/**
|
2017-05-26 13:34:10 -07:00
|
|
|
* Set a group layout to be used on keyboards
|
2016-05-27 06:55:11 -07:00
|
|
|
*
|
|
|
|
* @param device
|
2017-05-26 13:34:10 -07:00
|
|
|
* @param group
|
2016-05-27 06:55:11 -07:00
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
2017-05-26 13:34:10 -07:00
|
|
|
* @since 1.20
|
2016-05-27 06:55:11 -07:00
|
|
|
*/
|
2017-05-26 13:34:10 -07:00
|
|
|
EAPI void ecore_drm2_device_keyboard_group_set(Ecore_Drm2_Device *device, int group);
|
2016-05-27 06:55:11 -07:00
|
|
|
|
2016-05-11 06:41:21 -07:00
|
|
|
/**
|
|
|
|
* Get the crtcs of a given device
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param num
|
|
|
|
*
|
|
|
|
* @return The crtcs of this given device or NULL on failure
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI unsigned int *ecore_drm2_device_crtcs_get(Ecore_Drm2_Device *device, int *num);
|
|
|
|
|
2016-05-11 06:42:42 -07:00
|
|
|
/**
|
|
|
|
* Get the minimum and maximum screen size range
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param *minw
|
|
|
|
* @param *minh
|
|
|
|
* @param *maxw
|
|
|
|
* @param *maxh
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_device_screen_size_range_get(Ecore_Drm2_Device *device, int *minw, int *minh, int *maxw, int *maxh);
|
|
|
|
|
2016-05-26 07:43:35 -07:00
|
|
|
/**
|
|
|
|
* Calibrate any input devices for given screen size
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param w
|
|
|
|
* @param h
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_device_calibrate(Ecore_Drm2_Device *device, int w, int h);
|
|
|
|
|
2016-07-27 10:28:10 -07:00
|
|
|
/**
|
|
|
|
* Try to switch to a given virtual terminal
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param vt
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_device_vt_set(Ecore_Drm2_Device *device, int vt);
|
|
|
|
|
2017-01-18 06:46:39 -08:00
|
|
|
/**
|
|
|
|
* Get if a given device prefers the use of shadow buffers
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE if preferred, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_device_prefer_shadow(Ecore_Drm2_Device *device);
|
|
|
|
|
2020-05-07 08:28:05 -07:00
|
|
|
/**
|
|
|
|
* Get the default depth & bpp from a given device
|
|
|
|
*
|
|
|
|
* @param device
|
2020-05-15 07:50:37 -07:00
|
|
|
* @param depth
|
|
|
|
* @param bpp
|
2020-05-07 08:28:05 -07:00
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.25
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_device_preferred_depth_get(Ecore_Drm2_Device *device, int *depth, int *bpp);
|
|
|
|
|
2016-05-02 08:26:44 -07:00
|
|
|
/**
|
|
|
|
* @defgroup Ecore_Drm2_Output_Group Drm output functions
|
|
|
|
*
|
|
|
|
* Functions that deal with setup of outputs
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Iterate drm resources and create outputs
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_outputs_create(Ecore_Drm2_Device *device);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Destroy any created outputs
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_outputs_destroy(Ecore_Drm2_Device *device);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the list of outputs from a drm device
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI const Eina_List *ecore_drm2_outputs_get(Ecore_Drm2_Device *device);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the dpms level of a given output
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return Integer value representing the state of DPMS on a given output
|
|
|
|
* or -1 on error
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI int ecore_drm2_output_dpms_get(Ecore_Drm2_Output *output);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the dpms level of a given output
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
* @param level
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_output_dpms_set(Ecore_Drm2_Output *output, int level);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the edid of a given output
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return A string representing the edid
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI char *ecore_drm2_output_edid_get(Ecore_Drm2_Output *output);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get if a given output has a backlight
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE if this output has a backlight, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_output_backlight_get(Ecore_Drm2_Output *output);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Find an output at the given position
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
* @param x
|
|
|
|
* @param y
|
|
|
|
*
|
|
|
|
* @return An Ecore_Drm2_Output which exists at the given coordinates, or NULL on failure
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Ecore_Drm2_Output *ecore_drm2_output_find(Ecore_Drm2_Device *device, int x, int y);
|
|
|
|
|
2016-11-28 07:00:49 -08:00
|
|
|
/**
|
|
|
|
* Get the dpi of a given output
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
* @param xdpi
|
|
|
|
* @param ydpi
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_output_dpi_get(Ecore_Drm2_Output *output, int *xdpi, int *ydpi);
|
|
|
|
|
2016-05-02 08:26:44 -07:00
|
|
|
/**
|
|
|
|
* Get the id of the crtc that an output is using
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return A valid crtc id or 0 on failure
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI unsigned int ecore_drm2_output_crtc_get(Ecore_Drm2_Output *output);
|
|
|
|
|
2016-05-11 06:37:50 -07:00
|
|
|
/**
|
2016-09-08 09:40:11 -07:00
|
|
|
* Return the most recently set Ecore_Drm2_Fb for a given output
|
|
|
|
*
|
|
|
|
* This may be the currently scanned out buffer, a buffer currently being
|
|
|
|
* flipped to scanout, or a buffer that has been submit but may not
|
|
|
|
* actually ever hit scanout at all.
|
2016-05-11 06:37:50 -07:00
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
2016-09-08 09:40:11 -07:00
|
|
|
* @return The latest Ecore_Drm2_Fb submit for this output, or NULL otherwise
|
2016-05-11 06:37:50 -07:00
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
2016-09-08 09:40:11 -07:00
|
|
|
* @since 1.19
|
2016-05-11 06:37:50 -07:00
|
|
|
*/
|
2016-09-08 09:40:11 -07:00
|
|
|
EAPI Ecore_Drm2_Fb *ecore_drm2_output_latest_fb_get(Ecore_Drm2_Output *output);
|
2016-05-11 06:37:50 -07:00
|
|
|
|
2016-05-11 06:21:17 -07:00
|
|
|
/**
|
|
|
|
* Get if a given output is marked as the primary output
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE if output is primary, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_output_primary_get(Ecore_Drm2_Output *output);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set a given output to be primary
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
* @param primary
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_output_primary_set(Ecore_Drm2_Output *output, Eina_Bool primary);
|
|
|
|
|
2016-05-11 06:24:12 -07:00
|
|
|
/**
|
|
|
|
* Get if a given output is enabled
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE if enabled, EINA_FALSE otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_output_enabled_get(Ecore_Drm2_Output *output);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set if a given output is enabled
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
* @param enabled
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_output_enabled_set(Ecore_Drm2_Output *output, Eina_Bool enabled);
|
|
|
|
|
2016-05-11 06:25:36 -07:00
|
|
|
/**
|
|
|
|
* Get the physical size of a given output
|
|
|
|
*
|
|
|
|
* This function will give the physical size (in mm) of an output
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
* @param *w
|
|
|
|
* @param *h
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_output_physical_size_get(Ecore_Drm2_Output *output, int *w, int *h);
|
|
|
|
|
2016-05-11 06:26:52 -07:00
|
|
|
/**
|
|
|
|
* Get a list of the modes supported on a given output
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return An Eina_List of the modes supported for this output
|
|
|
|
*
|
|
|
|
* @note The returned list should not be freed
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI const Eina_List *ecore_drm2_output_modes_get(Ecore_Drm2_Output *output);
|
|
|
|
|
2016-05-11 06:28:20 -07:00
|
|
|
/**
|
|
|
|
* Get information from an existing output mode
|
|
|
|
*
|
|
|
|
* @param mode
|
|
|
|
* @param w
|
|
|
|
* @param h
|
|
|
|
* @param refresh
|
|
|
|
* @param flags
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_output_mode_info_get(Ecore_Drm2_Output_Mode *mode, int *w, int *h, unsigned int *refresh, unsigned int *flags);
|
|
|
|
|
2016-05-11 06:29:48 -07:00
|
|
|
/**
|
|
|
|
* Set a given mode to be used on a given output
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
* @param mode
|
|
|
|
* @param x
|
|
|
|
* @param y
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_output_mode_set(Ecore_Drm2_Output *output, Ecore_Drm2_Output_Mode *mode, int x, int y);
|
|
|
|
|
2016-05-11 06:31:38 -07:00
|
|
|
/**
|
|
|
|
* Get the name of a given output
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return A string representing the output's name. Caller should free this return.
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI char *ecore_drm2_output_name_get(Ecore_Drm2_Output *output);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the model of a given output
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return A string representing the output's model. Caller should free this return.
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI char *ecore_drm2_output_model_get(Ecore_Drm2_Output *output);
|
|
|
|
|
2016-05-11 06:33:15 -07:00
|
|
|
/**
|
|
|
|
* Get if a given output is connected
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE if connected, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_output_connected_get(Ecore_Drm2_Output *output);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get if a given output is cloned
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE if cloned, EINA_FALSE otherwise.
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_output_cloned_get(Ecore_Drm2_Output *output);
|
|
|
|
|
2016-05-11 06:34:32 -07:00
|
|
|
/**
|
|
|
|
* Get the connector type of a given output
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return An unsigned integer representing the type of connector for this output
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI unsigned int ecore_drm2_output_connector_type_get(Ecore_Drm2_Output *output);
|
|
|
|
|
2017-08-03 16:26:18 -07:00
|
|
|
/**
|
|
|
|
* Get the geometry and refresh rate for a given output
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
* @param *x
|
|
|
|
* @param *y
|
|
|
|
* @param *w
|
|
|
|
* @param *h
|
|
|
|
* @param *refresh
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.21
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_output_info_get(Ecore_Drm2_Output *output, int *x, int *y, int *w, int *h, unsigned int *refresh);
|
|
|
|
|
2016-05-11 06:39:46 -07:00
|
|
|
/**
|
|
|
|
* Get if an output can be used on a given crtc
|
|
|
|
*
|
|
|
|
* This function will loop the possible crtcs of an encoder to determine if
|
|
|
|
* a given output can be assigned to a given crtc
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
* @param crtc
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE if the output can be assigned to given crtc, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_output_possible_crtc_get(Ecore_Drm2_Output *output, unsigned int crtc);
|
|
|
|
|
2016-11-29 06:15:07 -08:00
|
|
|
/**
|
|
|
|
* Set the gamma level of an Ecore_Drm_Output
|
|
|
|
*
|
|
|
|
* This function will set the gamma of an Ecore_Drm2_Output
|
|
|
|
*
|
|
|
|
* @param output The Ecore_Drm2_Output to set the gamma level on
|
|
|
|
* @param size The gamma table size to set
|
|
|
|
* @param red The amount to scale the red channel
|
|
|
|
* @param green The amount to scale the green channel
|
|
|
|
* @param blue The amount to scale the blue channel
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_output_gamma_set(Ecore_Drm2_Output *output, uint16_t size, uint16_t *red, uint16_t *green, uint16_t *blue);
|
|
|
|
|
2017-01-18 07:38:01 -08:00
|
|
|
/**
|
|
|
|
* Get the supported rotations of a given output
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return An integer representing possible rotations, or -1 on failure
|
|
|
|
*
|
|
|
|
* @note This function will only return valid values if Atomic support
|
|
|
|
* is enabled as it requires hardware plane support.
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI int ecore_drm2_output_supported_rotations_get(Ecore_Drm2_Output *output);
|
|
|
|
|
2017-01-18 08:29:14 -08:00
|
|
|
/**
|
|
|
|
* Set a rotation on a given output
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
* @param rotation
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @note This function will only work if Atomic support
|
|
|
|
* is enabled as it requires hardware plane support.
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_output_rotation_set(Ecore_Drm2_Output *output, int rotation);
|
|
|
|
|
2019-03-22 09:41:21 -07:00
|
|
|
/**
|
|
|
|
* Get current output rotation
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return An integer representing the output current rotation
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.22
|
|
|
|
*/
|
|
|
|
EAPI int ecore_drm2_output_rotation_get(Ecore_Drm2_Output *output);
|
|
|
|
|
2017-06-09 05:46:56 -07:00
|
|
|
/**
|
|
|
|
* Set the user data for the output's page flip handler
|
|
|
|
*
|
2020-04-20 03:22:44 -07:00
|
|
|
* @param o The output to update user data for
|
2017-06-09 05:46:56 -07:00
|
|
|
* @param data The new user data pointer
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_output_user_data_set(Ecore_Drm2_Output *o, void *data);
|
|
|
|
|
2018-02-20 07:33:51 -08:00
|
|
|
/**
|
|
|
|
* Get the user data for a given output
|
|
|
|
*
|
|
|
|
* @param output The output to get user data for
|
|
|
|
*
|
|
|
|
* @return The user data associated with given output
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.21
|
|
|
|
*/
|
|
|
|
EAPI void *ecore_drm2_output_user_data_get(Ecore_Drm2_Output *output);
|
|
|
|
|
2017-06-16 12:03:09 -07:00
|
|
|
/**
|
|
|
|
* Get the subpixel state of the output
|
|
|
|
* @param output the output
|
|
|
|
* @return The state value
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI unsigned int ecore_drm2_output_subpixel_get(const Ecore_Drm2_Output *output);
|
|
|
|
|
2018-02-06 06:07:26 -08:00
|
|
|
/**
|
|
|
|
* Set the relative mode for an output
|
|
|
|
*
|
|
|
|
* @param output The output to set relative mode
|
2020-04-20 03:22:44 -07:00
|
|
|
* @param mode The relative mode to set
|
2018-02-06 06:07:26 -08:00
|
|
|
*
|
|
|
|
* @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);
|
|
|
|
|
2018-02-21 09:16:31 -08:00
|
|
|
/**
|
|
|
|
* Set which output a given output is relative to
|
|
|
|
*
|
|
|
|
* @param output The output for which to set relative
|
|
|
|
* @param relative The output for which the first output is relative to
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.21
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_output_relative_to_set(Ecore_Drm2_Output *output, const char *relative);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get which output is relative to a given output
|
|
|
|
*
|
|
|
|
* @param output The output for which to retrieve relative
|
|
|
|
*
|
|
|
|
* @return The name of the output which is relative to the given output or NULL
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.21
|
|
|
|
*/
|
|
|
|
EAPI const char *ecore_drm2_output_relative_to_get(Ecore_Drm2_Output *output);
|
|
|
|
|
2016-05-02 08:45:39 -07:00
|
|
|
/**
|
|
|
|
* @defgroup Ecore_Drm2_Fb_Group Drm framebuffer functions
|
|
|
|
*
|
|
|
|
* Functions that deal with setup of framebuffers
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new framebuffer object
|
|
|
|
*
|
2017-07-21 13:48:40 -07:00
|
|
|
* @param dev
|
2016-05-02 08:45:39 -07:00
|
|
|
* @param width
|
|
|
|
* @param height
|
|
|
|
* @param depth
|
|
|
|
* @param bpp
|
|
|
|
* @param format
|
|
|
|
*
|
|
|
|
* @return A newly create framebuffer object, or NULL on failure
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Fb_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
2017-07-21 13:48:40 -07:00
|
|
|
EAPI Ecore_Drm2_Fb *ecore_drm2_fb_create(Ecore_Drm2_Device *dev, int width, int height, int depth, int bpp, unsigned int format);
|
2016-05-02 08:45:39 -07:00
|
|
|
|
2017-07-21 13:48:40 -07:00
|
|
|
EAPI Ecore_Drm2_Fb *ecore_drm2_fb_gbm_create(Ecore_Drm2_Device *dev, int width, int height, int depth, int bpp, unsigned int format, unsigned int handle, unsigned int stride, void *bo);
|
2016-05-02 08:45:39 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a framebuffer's mmap'd data
|
|
|
|
*
|
|
|
|
* @param fb
|
|
|
|
*
|
|
|
|
* @return The mmap'd area of the framebuffer or NULL on failure
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Fb_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void *ecore_drm2_fb_data_get(Ecore_Drm2_Fb *fb);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a framebuffer's size
|
|
|
|
*
|
|
|
|
* @param fb
|
|
|
|
*
|
|
|
|
* @return size of the framebuffers' mmap'd data or 0 on failure
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Fb_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI unsigned int ecore_drm2_fb_size_get(Ecore_Drm2_Fb *fb);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get a framebuffer's stride
|
|
|
|
*
|
|
|
|
* @param fb
|
|
|
|
*
|
|
|
|
* @return stride of the framebuffer or 0 on failure
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Fb_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI unsigned int ecore_drm2_fb_stride_get(Ecore_Drm2_Fb *fb);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Mark regions of a framebuffer as dirty
|
|
|
|
*
|
|
|
|
* @param fb
|
|
|
|
* @param rects
|
|
|
|
* @param count
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Fb_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_fb_dirty(Ecore_Drm2_Fb *fb, Eina_Rectangle *rects, unsigned int count);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Schedule a pageflip to the given Ecore_Drm2_Fb
|
|
|
|
*
|
2016-09-07 20:24:45 -07:00
|
|
|
* The caller is responsible for running a page flip handler
|
|
|
|
* and calling ecore_drm2_fb_flip_complete() when it completes.
|
|
|
|
*
|
2016-05-02 08:45:39 -07:00
|
|
|
* @param fb
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return The result of drmModePageFlip function call
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Fb_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
2016-09-02 11:59:12 -07:00
|
|
|
EAPI int ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output);
|
2016-05-02 08:45:39 -07:00
|
|
|
|
2016-09-07 20:24:45 -07:00
|
|
|
/**
|
|
|
|
* Must be called by a page flip handler when the flip completes.
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
*
|
|
|
|
* @return Whether there's an undisplayed buffer still in the queue.
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Fb_Group
|
|
|
|
* @since 1.18
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output);
|
|
|
|
|
2016-09-02 10:17:01 -07:00
|
|
|
/**
|
|
|
|
* Return the Ecore_Drm2_Fb's busy status
|
|
|
|
*
|
|
|
|
* @param fb
|
|
|
|
*
|
|
|
|
* @return The busy status
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Fb_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_fb_busy_get(Ecore_Drm2_Fb *fb);
|
|
|
|
|
2016-09-09 12:08:40 -07:00
|
|
|
/**
|
|
|
|
* Try to force a framebuffer release for an output
|
|
|
|
*
|
2016-11-18 07:41:52 -08:00
|
|
|
* This tries to release the next or optionally pending, or current
|
|
|
|
* buffer from the output. If successful there will be a release callback
|
|
|
|
* to the registered handler, and the fb will no longer be flagged busy.
|
2016-09-09 12:08:40 -07:00
|
|
|
*
|
2016-11-18 07:41:52 -08:00
|
|
|
* Releasing buffers committed to scanout will potentially cause flicker,
|
|
|
|
* so this is only done when the panic flag is set.
|
2016-09-09 12:08:40 -07:00
|
|
|
*
|
2020-04-20 03:22:44 -07:00
|
|
|
* @param o The output to force release
|
2016-11-18 07:41:52 -08:00
|
|
|
* @param panic Try to release even buffers committed to scanout
|
2016-12-07 09:28:33 -08:00
|
|
|
*
|
|
|
|
* @return EINA_TRUE if a buffer was released
|
|
|
|
*
|
2016-09-09 12:08:40 -07:00
|
|
|
* @ingroup Ecore_Drm2_Fb_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
2016-12-07 09:28:33 -08:00
|
|
|
EAPI Eina_Bool ecore_drm2_fb_release(Ecore_Drm2_Output *o, Eina_Bool panic);
|
2016-09-09 12:08:40 -07:00
|
|
|
|
2016-09-09 11:18:41 -07:00
|
|
|
/**
|
|
|
|
* Get the Framebuffer's gbm buffer object
|
|
|
|
*
|
|
|
|
* @param fb The framebuffer to query
|
|
|
|
*
|
|
|
|
* @return The gbm bo for the framebuffer
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
|
|
|
* @since 1.19
|
|
|
|
*/
|
|
|
|
EAPI void *ecore_drm2_fb_bo_get(Ecore_Drm2_Fb *fb);
|
|
|
|
|
2017-03-21 13:44:46 -07:00
|
|
|
/**
|
|
|
|
* Import a dmabuf object as a Framebuffer
|
|
|
|
*
|
2017-07-21 13:48:40 -07:00
|
|
|
* @param dev
|
2017-03-21 13:44:46 -07:00
|
|
|
* @param width
|
|
|
|
* @param height
|
|
|
|
* @param depth
|
|
|
|
* @param bpp
|
|
|
|
* @param format
|
2020-04-20 03:22:44 -07:00
|
|
|
* @param strides
|
2017-03-21 13:44:46 -07:00
|
|
|
* @param dmabuf_fd
|
|
|
|
* @param dmabuf_fd_count
|
|
|
|
*
|
|
|
|
* @return A newly created framebuffer object, or NULL on failure
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Fb_Group
|
|
|
|
* @since 1.20
|
|
|
|
*
|
|
|
|
*/
|
2017-07-21 13:48:40 -07:00
|
|
|
EAPI Ecore_Drm2_Fb *ecore_drm2_fb_dmabuf_import(Ecore_Drm2_Device *dev, int width, int height, int depth, int bpp, unsigned int format, unsigned int strides[4], int dmabuf_fd[4], int dmabuf_fd_count);
|
2017-03-21 13:44:46 -07:00
|
|
|
|
2017-06-09 05:46:56 -07:00
|
|
|
/**
|
|
|
|
* Discard a framebuffer object
|
|
|
|
*
|
|
|
|
* Decreases the refcount on a fb object. It will be destroyed when it's
|
|
|
|
* no longer attached to scanout or otherwise in use.
|
|
|
|
*
|
|
|
|
* @param fb
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Fb_Group
|
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_fb_discard(Ecore_Drm2_Fb *fb);
|
|
|
|
|
2017-03-27 08:54:38 -07:00
|
|
|
/**
|
|
|
|
* @defgroup Ecore_Drm2_Plane_Group Functions that deal with hardware planes
|
|
|
|
*
|
|
|
|
* Functions that deal with hardware plane manipulation
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Find a hardware plane where a given Ecore_Drm2_Fb can go based on format and size
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
* @param fb
|
|
|
|
*
|
|
|
|
* @return A newly allocated plane object, or NULL otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Plane_Group
|
|
|
|
* @since 1.20
|
|
|
|
*/
|
2017-05-03 08:51:14 -07:00
|
|
|
EAPI Ecore_Drm2_Plane *ecore_drm2_plane_assign(Ecore_Drm2_Output *output, Ecore_Drm2_Fb *fb, int x, int y);
|
2017-03-27 08:54:38 -07:00
|
|
|
|
2017-04-27 13:45:51 -07:00
|
|
|
/**
|
|
|
|
* Remove a hardware plane from display
|
|
|
|
*
|
|
|
|
* @param plane
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Plane_Group
|
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_plane_release(Ecore_Drm2_Plane *plane);
|
|
|
|
|
2017-03-27 10:30:56 -07:00
|
|
|
/**
|
|
|
|
* Set plane destination values
|
|
|
|
*
|
|
|
|
* @param plane
|
|
|
|
* @param x
|
|
|
|
* @param y
|
|
|
|
* @param w
|
|
|
|
* @param h
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Plane_Group
|
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_plane_destination_set(Ecore_Drm2_Plane *plane, int x, int y, int w, int h);
|
|
|
|
|
2017-04-28 13:30:34 -07:00
|
|
|
/**
|
|
|
|
* Set plane frame buffer
|
|
|
|
*
|
|
|
|
* @param plane
|
|
|
|
* @param fb
|
|
|
|
*
|
|
|
|
* @return whether the plane state has been successfully changed or not
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Plane_Group
|
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_plane_fb_set(Ecore_Drm2_Plane *plane, Ecore_Drm2_Fb *fb);
|
|
|
|
|
2017-06-15 10:55:03 -07:00
|
|
|
/**
|
|
|
|
* Register a callback for buffer status updates
|
|
|
|
*
|
|
|
|
* When a flip completes ecore_drm2 may release a buffer. Use this callback
|
|
|
|
* if you need to do bookkeeping or locking on buffer release.
|
|
|
|
*
|
|
|
|
* Additionally, an fb may be placed on scanout or removed from scanout by
|
|
|
|
* evas. When this happens a compositor needs to ensure the buffers aren't
|
|
|
|
* released back to a client while they're on scanout.
|
|
|
|
*
|
|
|
|
* @param fb The fb to register the callback on
|
|
|
|
* @param handler The function to handle the callback
|
|
|
|
* @param data The user data to pass to the callback
|
2019-04-01 07:31:08 -07:00
|
|
|
* @ingroup Ecore_Drm2_Fb_Group
|
2017-06-15 10:55:03 -07:00
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI void ecore_drm2_fb_status_handler_set(Ecore_Drm2_Fb *fb, Ecore_Drm2_Fb_Status_Handler handler, void *data);
|
2017-07-12 13:27:52 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the time of the last vblank
|
|
|
|
*
|
2017-07-28 07:40:40 -07:00
|
|
|
* Query the display hardware for the time of a vblank, potentially blocking.
|
|
|
|
*
|
|
|
|
* If sequence is 0 the time of the last vblank will be immediately returned,
|
|
|
|
* if it's above zero that number of vblanks will pass before the function
|
|
|
|
* returns.
|
2017-07-12 13:27:52 -07:00
|
|
|
*
|
|
|
|
* @param output
|
2017-07-28 07:40:40 -07:00
|
|
|
* @param sequence
|
2017-07-12 13:27:52 -07:00
|
|
|
* @param sec
|
|
|
|
* @param usec
|
|
|
|
*
|
2019-04-01 07:31:08 -07:00
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
2017-07-12 13:27:52 -07:00
|
|
|
* @since 1.20
|
|
|
|
*/
|
2017-07-28 07:40:40 -07:00
|
|
|
EAPI Eina_Bool ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int sequence, long *sec, long *usec);
|
2017-07-12 13:27:52 -07:00
|
|
|
|
2017-07-21 13:48:40 -07:00
|
|
|
/**
|
|
|
|
* Get the fd of an Ecore_Drm2_Device
|
|
|
|
*
|
|
|
|
* Query the fd of the device.
|
|
|
|
*
|
|
|
|
* @param device
|
|
|
|
*
|
2019-04-01 07:31:08 -07:00
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
2017-07-21 13:48:40 -07:00
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI int ecore_drm2_device_fd_get(Ecore_Drm2_Device *device);
|
|
|
|
|
2017-08-11 12:48:41 -07:00
|
|
|
/**
|
|
|
|
* Check if there's a pageflip in progress for an output
|
|
|
|
*
|
|
|
|
* Checks whether an output has submit a flip but not yet had
|
|
|
|
* a callback completion event for that flip yet.
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
* @return Whether there's a flip in progress or not
|
2019-04-01 07:31:08 -07:00
|
|
|
* @ingroup Ecore_Drm2_Output_Group
|
2017-08-11 12:48:41 -07:00
|
|
|
* @since 1.20
|
|
|
|
*/
|
|
|
|
EAPI Eina_Bool ecore_drm2_output_pending_get(Ecore_Drm2_Output *output);
|
|
|
|
|
2019-04-01 07:28:40 -07:00
|
|
|
/**
|
|
|
|
* Set the background color of an output's crtc
|
|
|
|
*
|
|
|
|
* @param output
|
|
|
|
* @param r
|
|
|
|
* @param g
|
|
|
|
* @param b
|
|
|
|
* @param a
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE on success, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @note This requires support from the video driver in order to function
|
|
|
|
*
|
|
|
|
* @since 1.23
|
|
|
|
*/
|
2019-04-18 06:10:49 -07:00
|
|
|
EAPI Eina_Bool ecore_drm2_output_background_color_set(Ecore_Drm2_Output *output, uint64_t r, uint64_t g, uint64_t b, uint64_t a);
|
2019-04-01 07:28:40 -07:00
|
|
|
|
2019-05-22 04:35:45 -07:00
|
|
|
/**
|
|
|
|
* Check if vblank is supported by the current video driver
|
|
|
|
*
|
|
|
|
* @param dev
|
|
|
|
*
|
|
|
|
* @return EINA_TRUE if vblank is supported, EINA_FALSE otherwise
|
|
|
|
*
|
|
|
|
* @ingroup Ecore_Drm2_Device_Group
|
|
|
|
* @since 1.23 */
|
|
|
|
EAPI Eina_Bool ecore_drm2_vblank_supported(Ecore_Drm2_Device *dev);
|
|
|
|
|
2016-05-02 07:21:00 -07:00
|
|
|
# endif
|
|
|
|
|
|
|
|
#endif
|