Ecore_Drm.h File Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
Ecore_Drm.h File Reference

Ecore functions for dealing with drm, virtual terminals. More...

## 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

## 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 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_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) }

## Functions
EAPI int | ecore_drm_init (void)
| Initialize the Ecore_Drm library. More...
EAPI int | ecore_drm_shutdown (void)
| Shutdown the Ecore_Drm library. More...
EAPI Ecore_Drm_Device * | ecore_drm_device_find (const char *name, const char *seat)
| Find a drm device in the system. More...
EAPI void | ecore_drm_device_free (Ecore_Drm_Device *dev)
| Free an Ecore_Drm_Device. More...
EAPI Eina_Bool | ecore_drm_device_open (Ecore_Drm_Device *dev)
| Open an Ecore_Drm_Device. More...
EAPI Eina_Bool | ecore_drm_device_close (Ecore_Drm_Device *dev)
| Close an Ecore_Drm_Device. More...
EAPI Eina_Bool | ecore_drm_device_master_get (Ecore_Drm_Device *dev)
| Get if a given Ecore_Drm_Device is master. More...
EAPI Eina_Bool | ecore_drm_device_master_set (Ecore_Drm_Device *dev)
| Set a given Ecore_Drm_Device to master. More...
EAPI Eina_Bool | ecore_drm_device_master_drop (Ecore_Drm_Device *dev)
| Tell a given Ecore_Drm_Device to stop being master. More...
EAPI int | ecore_drm_device_fd_get (Ecore_Drm_Device *dev)
| Get the file descriptor of Ecore_Drm_Device. More...
EAPI void | ecore_drm_device_window_set (Ecore_Drm_Device *dev, unsigned int window)
| Set the window of Ecore_Drm_Device. More...
EAPI const char * | ecore_drm_device_name_get (Ecore_Drm_Device *dev)
| Get the name of the Ecore_Drm_Device. More...
EAPI Eina_Bool | ecore_drm_device_software_setup (Ecore_Drm_Device *dev)
| Setup an Ecore_Drm_Device for software rendering. More...
EAPI Eina_Bool | ecore_drm_device_pointer_left_handed_set (Ecore_Drm_Device *dev, Eina_Bool left_handed)
| Set a left handed mode at the given Ecore_Drm_Device. More...
EAPI void | ecore_drm_device_keyboard_cached_context_set (struct xkb_context *ctx)
| Setup a cached context to use same context for each devices. More...
EAPI void | ecore_drm_device_keyboard_cached_keymap_set (struct xkb_keymap *map)
| Setup a cached keymap to use same keymap for each devices. More...
EAPI Ecore_Drm_Output * | ecore_drm_device_output_find (Ecore_Drm_Device *dev, int x, int y)
| Find an Ecore_Drm_Output at the given coordinates. More...
EAPI Eina_Bool | ecore_drm_tty_open (Ecore_Drm_Device *dev, const char *name)
| Open a tty for use. More...
EAPI Eina_Bool | ecore_drm_tty_close (Ecore_Drm_Device *dev)
| Close an already opened tty. More...
EAPI Eina_Bool | ecore_drm_tty_release (Ecore_Drm_Device *dev)
| Release a virtual terminal. More...
EAPI Eina_Bool | ecore_drm_tty_acquire (Ecore_Drm_Device *dev)
| Acquire a virtual terminal. More...
EAPI int | ecore_drm_tty_get (Ecore_Drm_Device *dev)
| Get the opened virtual terminal file descriptor. More...
EAPI Eina_Bool | ecore_drm_outputs_create (Ecore_Drm_Device *dev)
| Create outputs for a drm device. More...
EAPI void | ecore_drm_output_free (Ecore_Drm_Output *output)
| Free an Ecore_Drm_Output. More...
EAPI void | ecore_drm_output_cursor_size_set (Ecore_Drm_Output *output, int handle, int w, int h)
| Set the cursor size for Ecore_Drm_Output. More...
EAPI Eina_Bool | ecore_drm_output_enable (Ecore_Drm_Output *output)
| Enable a Ecore_Drm_Output. More...
EAPI void | ecore_drm_output_disable (Ecore_Drm_Output *output)
| Disable a Ecore_Drm_Output. More...
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)
| Get the output size of Ecore_Drm_Device. More...
EAPI void | ecore_drm_outputs_geometry_get (Ecore_Drm_Device *dev, int *x, int *y, int *w, int *h)
| TODO: Doxy. More...
EAPI unsigned int | ecore_drm_output_crtc_id_get (Ecore_Drm_Output *output)
| Get the crtc id of an output. More...
EAPI unsigned int | ecore_drm_output_crtc_buffer_get (Ecore_Drm_Output *output)
| Get the crtc buffer of an output. More...
EAPI unsigned int | ecore_drm_output_connector_id_get (Ecore_Drm_Output *output)
| Get the connector id of an output. More...
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. More...
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)
| Mark an Ecore_Drm_Fb as dirty. More...
EAPI void | ecore_drm_fb_set (Ecore_Drm_Device *dev, Ecore_Drm_Fb *fb)
| Set an Ecore_Drm_Fb as the current framebuffer. More...
EAPI void | ecore_drm_fb_send (Ecore_Drm_Device *dev, Ecore_Drm_Fb *fb, Ecore_Drm_Pageflip_Cb func, void *data)
| Send an Ecore_Drm_Fb to the Ecore_Drm_Device. More...
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)
| Get the output position of Ecore_Drm_Output. More...
EAPI void | ecore_drm_output_current_resolution_get (Ecore_Drm_Output *output, int *w, int *h, unsigned int *refresh)
| Get the current resolution of Ecore_Drm_Output. More...
EAPI void | ecore_drm_output_physical_size_get (Ecore_Drm_Output *output, int *w, int *h)
| Get the physical size of Ecore_Drm_Output. More...
EAPI unsigned int | ecore_drm_output_subpixel_order_get (Ecore_Drm_Output *output)
| Get the subpixel order of Ecore_Drm_Output. More...
EAPI Eina_Stringshare * | ecore_drm_output_model_get (Ecore_Drm_Output *output)
| Get the model of Ecore_Drm_Output. More...
EAPI Eina_Stringshare * | ecore_drm_output_make_get (Ecore_Drm_Output *output)
| Get the make of Ecore_Drm_Output. More...
EAPI char * | ecore_drm_output_name_get (Ecore_Drm_Output *output)
| Get the name of Ecore_Drm_Output. More...
EAPI void | ecore_drm_output_dpms_set (Ecore_Drm_Output *output, int level)
| Set the dpms level of an Ecore_Drm_Output. More...
EAPI void | ecore_drm_output_gamma_set (Ecore_Drm_Output *output, uint16_t size, uint16_t *r, uint16_t *g, uint16_t *b)
| Set the gamma level of an Ecore_Drm_Output. More...
EAPI void | ecore_drm_device_pointer_xy_get (Ecore_Drm_Device *dev, int *x, int *y)
| Get the pointer position of Ecore_Drm_Device. More...
EAPI const Eina_List * | ecore_drm_devices_get (void)
| Get the list of drm devices which are allocated. More...
EAPI void | ecore_drm_screen_size_range_get (Ecore_Drm_Device *dev, int *minw, int *minh, int *maxw, int *maxh)
| Get the minimum and maximum screen size range. More...
EAPI Eina_Bool | ecore_drm_output_connected_get (Ecore_Drm_Output *output)
| Get if a given output is connected. More...
EAPI unsigned int | ecore_drm_output_connector_type_get (Ecore_Drm_Output *output)
| Get the connector type of a given Ecore_Drm_Output. More...
EAPI Eina_Bool | ecore_drm_output_backlight_get (Ecore_Drm_Output *output)
| Get if a given output has a backlight. More...
EAPI char * | ecore_drm_output_edid_get (Ecore_Drm_Output *output)
| Get the edid of a given output. More...
EAPI Eina_List * | ecore_drm_output_modes_get (Ecore_Drm_Output *output)
| Get a list of the modes supported on a given output. More...
EAPI Ecore_Drm_Output * | ecore_drm_output_primary_get (Ecore_Drm_Device *dev)
| Get the output which is marked as primary. More...
EAPI void | ecore_drm_output_primary_set (Ecore_Drm_Output *output)
| Set a given output as primary. More...
EAPI void | ecore_drm_output_crtc_size_get (Ecore_Drm_Output *output, int *width, int *height)
| Get the size of the crtc for a given output. More...
EAPI Ecore_Drm_Output * | ecore_drm_device_output_name_find (Ecore_Drm_Device *dev, const char *name)
| Find an Ecore_Drm_Output which has the given name. More...
EAPI Eina_Bool | ecore_drm_output_possible_crtc_get (Ecore_Drm_Output *output, unsigned int crtc)
| Get if an Ecore_Drm_Output can be used on a given crtc. More...
EAPI Eina_Bool | ecore_drm_output_mode_set (Ecore_Drm_Output *output, Ecore_Drm_Output_Mode *mode, int x, int y)
| Set a given mode to be used on an Ecore_Drm_Output. More...
EAPI Eina_Bool | ecore_drm_evdev_key_remap_enable (Ecore_Drm_Evdev *edev, Eina_Bool enable)
| Enable key remap functionality on a Ecore_Drm_Evdev. More...
EAPI Eina_Bool | ecore_drm_evdev_key_remap_set (Ecore_Drm_Evdev *edev, int *from_keys, int *to_keys, int num)
| Set a given set of keys as remapped keys on a Ecore_Drm_Evdev. More...

## Variables
EAPI int | ECORE_DRM_EVENT_ACTIVATE
EAPI int | ECORE_DRM_EVENT_OUTPUT
EAPI int | ECORE_DRM_EVENT_SEAT_ADD

## Detailed Description

Ecore functions for dealing with drm, virtual terminals.

## Typedef Documentation

typedef struct _Ecore_Drm_Event_Output Ecore_Drm_Event_Output

Since
  1.14

typedef void(* Ecore_Drm_Pageflip_Cb) (void *data)

Since
  1.14

## Function Documentation

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 EINA_LIST_FOREACH.

Referenced by ecore_drm_device_software_setup().

EAPI void ecore_drm_inputs_device_axis_size_set | ( | Ecore_Drm_Evdev * | edev,
|  | int | w,
|  | int | h
| ) |  |

Set the axis size of the given device.

Parameters

  dev | The device to set the axis size to.
  w | The width of the axis.
  h | The height of the axis.

This function sets set the width `w` and height `h` of the axis of device `dev`. If `dev` is a relative input device, a width and height must set for it. If its absolute set the ioctl correctly, if not, unsupported device.

References eeze_udev_find_by_subsystem_sysname(), eeze_udev_syspath_get_property(), eina_list_count(), EINA_LIST_FREE, eina_stringshare_del(), and ERR.

EAPI Eina_Bool ecore_drm_evdev_key_remap_enable | ( | Ecore_Drm_Evdev * | edev,
|  | Eina_Bool | enable
| ) |  |

Enable key remap functionality on a Ecore_Drm_Evdev.

This function will enable the key remap functionality to the given Ecore_Drm_Evdev

Parameters

  edev | The Ecore_Drm_Evdev to enable the key remap on
  enable | A valid Eina_Bool to enable or disable the key remap on the device

Returns
  EINA_FALSE is returned if the Ecore_Drm_Evdev is not valid, or if no libinput device has been assigned to it yet. EINA_TRUE will be returned if enabling key remap for this device succeeded.

Since
  1.17

Enable key remap functionality on a Ecore_Drm_Evdev.

Parameters

  edev | The Ecore_Drm_Evdev to enable the key remap on.
  enable | An Eina_Bool value to enable or disable the key remap on the device.

Returns
  EINA_FALSE is returned if the Ecore_Drm_Evdev is not valid, or if no libinput device has been assigned to it yet. EINA_TRUE will be returned if enabling key remap for this device succeeded.

This function enables/disables key remap functionality with the given enable value. If the given enable value is EINA_FALSE, the key remap functionality wil be disable and the existing hash table for remapping keys will be freed.

References EINA_FALSE, eina_hash_free(), and EINA_TRUE.

EAPI Eina_Bool ecore_drm_evdev_key_remap_set | ( | Ecore_Drm_Evdev * | edev,
|  | int * | from_keys,
|  | int * | to_keys,
|  | int | num
| ) |  |

Set a given set of keys as remapped keys on a Ecore_Drm_Evdev.

This function will create a hash table of remapping keys as a member of the given Ecore_Drm_Evdev

Parameters

  edev | The Ecore_Drm_Evdev to set the remapping keys on
  from_keys | A set of keycodes which contains the original keycode
  to_keys | A set of keycodes which contains the keycode to be remapped
  num | The number of keys to be applied

Returns
  EINA_FALSE is returned if the Ecore_Drm_Evdev is not valid, if no libinput device has been assigned to it yet, if key remap is not enabled yet, or the some of the given parameters such as from_keys, to_keys, num are not valid. EINA_TRUE will be returned if setting key remap for this device succeeded.

Since
  1.17

Set a given set of keys as remapped keys on a Ecore_Drm_Evdev.

Parameters

  edev | The Ecore_Drm_Evdev to set the remapping keys on
  from_keys | A set of keys which contains the original keycodes
  to_keys | A set of keys which contains the keycodes to be remapped
  num | The number of keys to be applied

Returns
  EINA_FALSE is returned if the Ecore_Drm_Evdev is not valid, if no libinput device has been assigned to it yet, if key remap is not enabled yet, or the some of the given parameters such as from_keys, to_keys, num are not valid. EINA_TRUE will be returned if setting key remap for this device succeeded.

This function will create a hash table of remapping keys as a member of the given device. This hash table will be used in _device_remapped_key_get() later on. Whenever a key event is coming from the the backend of ecore drm layer the keycode of it can be replaced with the key found in the hash table. If there is no key found, the coming keycode will be used.

References EINA_FALSE, eina_hash_add(), eina_hash_int32_new(), EINA_TRUE, and ERR.

## Variable Documentation

EAPI int ECORE_DRM_EVENT_OUTPUT

Since
  1.14

Referenced by ecore_drm_init().

EAPI int ECORE_DRM_EVENT_SEAT_ADD

Since
  1.14

Referenced by ecore_drm_init().