Ecore_Drm.h File Reference

## Data Structures

struct | _Ecore_Drm_Fb
struct | _Ecore_Drm_Device
struct | _Ecore_Drm_Event_Activate
struct | _Ecore_Drm_Event_Output
struct | _Ecore_Drm_Output_Mode

## Macros

#define | EAPI
#define | ECORE_DRM_PLANE_ROTATION_NORMAL 1
#define | ECORE_DRM_PLANE_ROTATION_90 2
#define | ECORE_DRM_PLANE_ROTATION_180 4
#define | ECORE_DRM_PLANE_ROTATION_270 8
#define | ECORE_DRM_PLANE_ROTATION_REFLECT_X 16
#define | ECORE_DRM_PLANE_ROTATION_REFLECT_Y 32
#define | EAPI

## Typedefs

typedef enum _Ecore_Drm_Evdev_Capabilities | Ecore_Drm_Evdev_Capabilities
typedef enum _Ecore_Drm_Evdev_Event_Type | Ecore_Drm_Evdev_Event_Type
typedef enum _Ecore_Drm_Seat_Capabilities | Ecore_Drm_Seat_Capabilities
typedef struct _Ecore_Drm_Fb | Ecore_Drm_Fb
typedef enum _Ecore_Drm_Plane_Type | Ecore_Drm_Plane_Type
typedef struct _Ecore_Drm_Device | Ecore_Drm_Device
typedef struct _Ecore_Drm_Output_Mode | Ecore_Drm_Output_Mode
typedef struct _Ecore_Drm_Output | Ecore_Drm_Output
typedef struct _Ecore_Drm_Input | Ecore_Drm_Input
typedef struct _Ecore_Drm_Evdev | Ecore_Drm_Evdev
typedef struct _Ecore_Drm_Seat | Ecore_Drm_Seat
typedef struct _Ecore_Drm_Sprite | Ecore_Drm_Sprite
typedef struct _Ecore_Drm_Event_Activate | Ecore_Drm_Event_Activate
typedef struct _Ecore_Drm_Plane | Ecore_Drm_Plane
typedef struct _Ecore_Drm_Event_Output | Ecore_Drm_Event_Output
typedef void(* | Ecore_Drm_Pageflip_Cb) (void *data)

## Enumerations

enum | _Ecore_Drm_Evdev_Capabilities { EVDEV_KEYBOARD = (1 << 0) , EVDEV_BUTTON = (1 << 1) , EVDEV_MOTION_ABS = (1 << 2) , EVDEV_MOTION_REL = (1 << 3) , EVDEV_TOUCH = (1 << 4) }
enum | _Ecore_Drm_Evdev_Event_Type { EVDEV_NONE , EVDEV_ABSOLUTE_TOUCH_DOWN , EVDEV_ABSOLUTE_MOTION , EVDEV_ABSOLUTE_TOUCH_UP , EVDEV_ABSOLUTE_MT_DOWN , EVDEV_ABSOLUTE_MT_MOTION , EVDEV_ABSOLUTE_MT_UP , EVDEV_RELATIVE_MOTION }
enum | _Ecore_Drm_Seat_Capabilities { EVDEV_SEAT_POINTER = (1 << 0) , EVDEV_SEAT_KEYBOARD = (1 << 1) , EVDEV_SEAT_TOUCH = (1 << 2) }
enum | _Ecore_Drm_Plane_Type { ECORE_DRM_PLANE_TYPE_OVERLAY , ECORE_DRM_PLANE_TYPE_PRIMARY , ECORE_DRM_PLANE_TYPE_CURSOR }

## Functions

EAPI int | ecore_drm_init (void)
| Initialize the Ecore_Drm library.
EAPI int | ecore_drm_shutdown (void)
| Shutdown the Ecore_Drm library.
EAPI Ecore_Drm_Device * | ecore_drm_device_find (const char *name, const char *seat)
| Finds a drm device in the system.
EAPI void | ecore_drm_device_free (Ecore_Drm_Device *dev)
| Frees an Ecore_Drm_Device.
EAPI Eina_Bool | ecore_drm_device_open (Ecore_Drm_Device *dev)
| Opens an Ecore_Drm_Device.
EAPI Eina_Bool | ecore_drm_device_close (Ecore_Drm_Device *dev)
| Closes an Ecore_Drm_Device.
EAPI Eina_Bool | ecore_drm_device_master_get (Ecore_Drm_Device *dev)
| Gets if a given Ecore_Drm_Device is master.
EAPI Eina_Bool | ecore_drm_device_master_set (Ecore_Drm_Device *dev)
| Sets a given Ecore_Drm_Device to master.
EAPI Eina_Bool | ecore_drm_device_master_drop (Ecore_Drm_Device *dev)
| Tells a given Ecore_Drm_Device to stop being master.
EAPI int | ecore_drm_device_fd_get (Ecore_Drm_Device *dev)
| Gets the file descriptor of Ecore_Drm_Devices.
EAPI void | ecore_drm_device_window_set (Ecore_Drm_Device *dev, unsigned int window)
| Sets the window of Ecore_Drm_Devices.
EAPI const char * | ecore_drm_device_name_get (Ecore_Drm_Device *dev)
| Gets the name of the Ecore_Drm_Device.
EAPI Eina_Bool | ecore_drm_device_software_setup (Ecore_Drm_Device *dev)
| Sets up an Ecore_Drm_Device for software rendering.
EAPI Eina_Bool | ecore_drm_device_pointer_left_handed_set (Ecore_Drm_Device *dev, Eina_Bool left_handed)
| Sets a left handed mode at the given Ecore_Drm_Device.
EAPI void | ecore_drm_device_keyboard_cached_context_set (struct xkb_context *ctx)
| Sets up a cached context to use same context for each devices.
EAPI void | ecore_drm_device_keyboard_cached_keymap_set (struct xkb_keymap *map)
| Sets up a cached keymap to use same keymap for each devices This function will setup a cached keymap to use same keymap for each devices.
EAPI Ecore_Drm_Output * | ecore_drm_device_output_find (Ecore_Drm_Device *dev, int x, int y)
| Finds an Ecore_Drm_Output at the given coordinates.
EAPI Eina_Bool | ecore_drm_tty_open (Ecore_Drm_Device *dev, const char *name)
| Opens a tty for use.
EAPI Eina_Bool | ecore_drm_tty_close (Ecore_Drm_Device *dev)
| Closes an already opened tty.
EAPI Eina_Bool | ecore_drm_tty_release (Ecore_Drm_Device *dev)
| Releases a virtual terminal.
EAPI Eina_Bool | ecore_drm_tty_acquire (Ecore_Drm_Device *dev)
| Acquires a virtual terminal.
EAPI int | ecore_drm_tty_get (Ecore_Drm_Device *dev)
| Gets the opened virtual terminal file descriptor.
EAPI Eina_Bool | ecore_drm_outputs_create (Ecore_Drm_Device *dev)
| Creates outputs for a drm device.
EAPI void | ecore_drm_output_free (Ecore_Drm_Output *output)
| Frees an Ecore_Drm_Output.
EAPI void | ecore_drm_output_cursor_size_set (Ecore_Drm_Output *output, int handle, int w, int h)
| Sets the cursor size for Ecore_Drm_Output.
EAPI Eina_Bool | ecore_drm_output_enable (Ecore_Drm_Output *output)
| Enables a Ecore_Drm_Output.
EAPI void | ecore_drm_output_disable (Ecore_Drm_Output *output)
| Disables a Ecore_Drm_Output.
EAPI void | ecore_drm_output_fb_release (Ecore_Drm_Output *output, Ecore_Drm_Fb *fb)
EAPI void | ecore_drm_output_repaint (Ecore_Drm_Output *output)
EAPI void | ecore_drm_output_size_get (Ecore_Drm_Device *dev, int output, int *w, int *h)
| Gets the output size of Ecore_Drm_Device.
EAPI void | ecore_drm_outputs_geometry_get (Ecore_Drm_Device *dev, int *x, int *y, int *w, int *h)
| TODO: Doxy.
EAPI unsigned int | ecore_drm_output_crtc_id_get (Ecore_Drm_Output *output)
| Gets the crtc id of an output.
EAPI unsigned int | ecore_drm_output_crtc_buffer_get (Ecore_Drm_Output *output)
| Gets the crtc buffer of an output.
EAPI unsigned int | ecore_drm_output_connector_id_get (Ecore_Drm_Output *output)
| Gets the connector id of an output.
EAPI Eina_Bool | ecore_drm_inputs_create (Ecore_Drm_Device *dev)
EAPI void | ecore_drm_inputs_destroy (Ecore_Drm_Device *dev)
EAPI Eina_Bool | ecore_drm_inputs_enable (Ecore_Drm_Input *input)
EAPI void | ecore_drm_inputs_disable (Ecore_Drm_Input *input)
EAPI void | ecore_drm_inputs_device_axis_size_set (Ecore_Drm_Evdev *dev, int w, int h)
| Set the axis size of the given device.
EAPI Eina_Bool | ecore_drm_sprites_create (Ecore_Drm_Device *dev)
EAPI void | ecore_drm_sprites_destroy (Ecore_Drm_Device *dev)
EAPI void | ecore_drm_sprites_fb_set (Ecore_Drm_Sprite *sprite, int fb_id, int flags)
EAPI Eina_Bool | ecore_drm_sprites_crtc_supported (Ecore_Drm_Output *output, unsigned int supported)
EAPI Ecore_Drm_Fb * | ecore_drm_fb_create (Ecore_Drm_Device *dev, int width, int height)
EAPI void | ecore_drm_fb_destroy (Ecore_Drm_Fb *fb)
EAPI void | ecore_drm_fb_dirty (Ecore_Drm_Fb *fb, Eina_Rectangle *rects, unsigned int count)
| Marks an Ecore_Drm_Fb as dirty.
EINA_DEPRECATED EAPI void | ecore_drm_fb_set (Ecore_Drm_Device *dev, Ecore_Drm_Fb *fb)
| Sets an Ecore_Drm_Fb as the current framebuffer.
EAPI void | ecore_drm_fb_send (Ecore_Drm_Device *dev, Ecore_Drm_Fb *fb, Ecore_Drm_Pageflip_Cb func, void *data)
EAPI Eina_Bool | ecore_drm_launcher_connect (Ecore_Drm_Device *dev)
EAPI void | ecore_drm_launcher_disconnect (Ecore_Drm_Device *dev)
EAPI void | ecore_drm_output_position_get (Ecore_Drm_Output *output, int *x, int *y)
| Gets the output position of Ecore_Drm_Output.
EAPI void | ecore_drm_output_current_resolution_get (Ecore_Drm_Output *output, int *w, int *h, unsigned int *refresh)
| Gets the current resolution of Ecore_Drm_Output.
EAPI void | ecore_drm_output_physical_size_get (Ecore_Drm_Output *output, int *w, int *h)
| Gets the physical size of Ecore_Drm_Output.
EAPI unsigned int | ecore_drm_output_subpixel_order_get (Ecore_Drm_Output *output)
| Gets the subpixel order of Ecore_Drm_Output.
EAPI Eina_Stringshare * | ecore_drm_output_model_get (Ecore_Drm_Output *output)
| Gets the model of Ecore_Drm_Output.
EAPI Eina_Stringshare * | ecore_drm_output_make_get (Ecore_Drm_Output *output)
| Gets the make of Ecore_Drm_Output.
EAPI char * | ecore_drm_output_name_get (Ecore_Drm_Output *output)
| Gets the name of Ecore_Drm_Output.
EAPI void | ecore_drm_output_dpms_set (Ecore_Drm_Output *output, int level)
| Sets the dpms level of an Ecore_Drm_Output.
EAPI void | ecore_drm_output_gamma_set (Ecore_Drm_Output *output, uint16_t size, uint16_t *r, uint16_t *g, uint16_t *b)
| Sets the gamma level of an Ecore_Drm_Output.
EAPI void | ecore_drm_device_pointer_xy_get (Ecore_Drm_Device *dev, int *x, int *y)
| Gets the pointer position of Ecore_Drm_Device.
EAPI void | ecore_drm_device_pointer_warp (Ecore_Drm_Device *dev, int x, int y)
| Warps the pointer position of Ecore_Drm_Device.
EAPI const Eina_List * | ecore_drm_devices_get (void)
| Gets the list of drm devices which are allocated.
EAPI void | ecore_drm_screen_size_range_get (Ecore_Drm_Device *dev, int *minw, int *minh, int *maxw, int *maxh)
| Gets the minimum and maximum screen size range.
EAPI Eina_Bool | ecore_drm_output_connected_get (Ecore_Drm_Output *output)
| Gets if a given output is connected.
EAPI unsigned int | ecore_drm_output_connector_type_get (Ecore_Drm_Output *output)
| Gets the connector type of a given Ecore_Drm_Output.
EAPI Eina_Bool | ecore_drm_output_backlight_get (Ecore_Drm_Output *output)
| Gets if a given output has a backlight.
EAPI char * | ecore_drm_output_edid_get (Ecore_Drm_Output *output)
| Gets the edid of a given output.
EAPI Eina_List * | ecore_drm_output_modes_get (Ecore_Drm_Output *output)
| Gets a list of the modes supported on a given output.
EAPI Ecore_Drm_Output * | ecore_drm_output_primary_get (Ecore_Drm_Device *dev)
| Gets the output which is marked as primary.
EAPI void | ecore_drm_output_primary_set (Ecore_Drm_Output *output)
| Sets a given output as primary.
EAPI void | ecore_drm_output_crtc_size_get (Ecore_Drm_Output *output, int *width, int *height)
| Gets the size of the crtc for a given output.
EAPI Ecore_Drm_Output * | ecore_drm_device_output_name_find (Ecore_Drm_Device *dev, const char *name)
| Finds an Ecore_Drm_Output which has the given name.
EAPI Eina_Bool | ecore_drm_output_possible_crtc_get (Ecore_Drm_Output *output, unsigned int crtc)
| Gets if an Ecore_Drm_Output can be used on a given crtc.
EAPI Eina_Bool | ecore_drm_output_mode_set (Ecore_Drm_Output *output, Ecore_Drm_Output_Mode *mode, int x, int y)
| Sets a given mode to be used on an Ecore_Drm_Output.
EAPI unsigned int | ecore_drm_output_supported_rotations_get (Ecore_Drm_Output *output, Ecore_Drm_Plane_Type type)
EAPI Eina_Bool | ecore_drm_output_rotation_set (Ecore_Drm_Output *output, Ecore_Drm_Plane_Type type, unsigned int rotation)
EAPI Eina_Bool | ecore_drm_evdev_key_remap_enable (Ecore_Drm_Evdev *edev, Eina_Bool enable)
| Enables key remap functionality on a Ecore_Drm_Evdev.
EAPI Eina_Bool | ecore_drm_evdev_key_remap_set (Ecore_Drm_Evdev *edev, int *from_keys, int *to_keys, int num)
| Sets a given set of keys as remapped keys on a Ecore_Drm_Evdev.

## Variables

EAPI int | ECORE_DRM_EVENT_ACTIVATE
EAPI int | ECORE_DRM_EVENT_OUTPUT
EAPI int | ECORE_DRM_EVENT_SEAT_ADD

## Typedef Documentation

## Ecore_Drm_Plane

typedef struct _Ecore_Drm_Plane Ecore_Drm_Plane

Since
  1.18

## Ecore_Drm_Event_Output

typedef struct _Ecore_Drm_Event_Output Ecore_Drm_Event_Output

Since
  1.14

## Ecore_Drm_Pageflip_Cb

typedef void(* Ecore_Drm_Pageflip_Cb) (void *data)

Since
  1.14

## Function Documentation

## ecore_drm_outputs_geometry_get()

EAPI void ecore_drm_outputs_geometry_get | ( | Ecore_Drm_Device * | dev,
|  | int * | x,
|  | int * | y,
|  | int * | w,
|  | int * | h )

TODO: Doxy.

Since
  1.12

References ecore_drm_outputs_geometry_get(), EINA_LIST_FOREACH, EINA_SAFETY_ON_NULL_RETURN, and MAX.

Referenced by ecore_drm_device_software_setup(), and ecore_drm_outputs_geometry_get().

## Variable Documentation

## ECORE_DRM_EVENT_OUTPUT

EAPI int ECORE_DRM_EVENT_OUTPUT

extern

Since
  1.14

Referenced by ecore_drm_init(), and ecore_drm_shutdown().

## ECORE_DRM_EVENT_SEAT_ADD

EAPI int ECORE_DRM_EVENT_SEAT_ADD

extern

Since
  1.14

Referenced by ecore_drm_init(), and ecore_drm_shutdown().