Functions
Device manipulation functions

Functions that deal with finding, opening, closing, and otherwise using the DRM device itself. More...

Functions

EAPI Ecore_Drm_Deviceecore_drm_device_find (const char *name, const char *seat)
 Finds a drm device in the system. More...
 
EAPI void ecore_drm_device_free (Ecore_Drm_Device *dev)
 Frees an Ecore_Drm_Device. More...
 
EAPI Eina_Bool ecore_drm_device_open (Ecore_Drm_Device *dev)
 Opens an Ecore_Drm_Device. More...
 
EAPI Eina_Bool ecore_drm_device_close (Ecore_Drm_Device *dev)
 Closes an Ecore_Drm_Device. More...
 
EAPI Eina_Bool ecore_drm_device_master_get (Ecore_Drm_Device *dev)
 Gets if a given Ecore_Drm_Device is master. More...
 
EAPI Eina_Bool ecore_drm_device_master_set (Ecore_Drm_Device *dev)
 Sets a given Ecore_Drm_Device to master. More...
 
EAPI Eina_Bool ecore_drm_device_master_drop (Ecore_Drm_Device *dev)
 Tells a given Ecore_Drm_Device to stop being master. More...
 
EAPI int ecore_drm_device_fd_get (Ecore_Drm_Device *dev)
 Gets the file descriptor of Ecore_Drm_Devices. More...
 
EAPI void ecore_drm_device_window_set (Ecore_Drm_Device *dev, unsigned int window)
 Sets the window of Ecore_Drm_Devices. More...
 
EAPI const char * ecore_drm_device_name_get (Ecore_Drm_Device *dev)
 Gets the name of the Ecore_Drm_Device. More...
 
EAPI Eina_Bool ecore_drm_device_software_setup (Ecore_Drm_Device *dev)
 Sets up 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)
 Sets a left handed mode at the given Ecore_Drm_Device. More...
 
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. More...
 
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. More...
 
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. More...
 
EAPI void ecore_drm_device_pointer_xy_get (Ecore_Drm_Device *dev, int *x, int *y)
 Gets the pointer position of Ecore_Drm_Device. More...
 
EAPI void ecore_drm_device_pointer_warp (Ecore_Drm_Device *dev, int x, int y)
 Warps the pointer position of Ecore_Drm_Device. More...
 
EAPI const Eina_Listecore_drm_devices_get (void)
 Gets 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)
 Gets the minimum and maximum screen size range. More...
 
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. More...
 

Detailed Description

Functions that deal with finding, opening, closing, and otherwise using the DRM device itself.

Function Documentation

◆ ecore_drm_device_find()

EAPI Ecore_Drm_Device* ecore_drm_device_find ( const char *  name,
const char *  seat 
)

Finds a drm device in the system.

Parameters
nameThe name of the device to find. If NULL, this function will search for the default drm device.
seatThe name of the seat where this device may be found. If NULL, this function will use a default seat name 'seat0'.
Returns
An opaque Ecore_Drm_Device structure representing the card.

References DBG, eeze_udev_find_by_type(), eeze_udev_syspath_get_devpath(), eeze_udev_syspath_get_parent_filtered(), eeze_udev_syspath_get_property(), eeze_udev_syspath_get_sysattr(), eeze_udev_syspath_get_sysnum(), EEZE_UDEV_TYPE_DRM, EINA_FALSE, eina_list_append(), EINA_LIST_FOREACH, EINA_LIST_FREE, eina_stringshare_add(), eina_stringshare_del(), and EINA_TRUE.

◆ ecore_drm_device_free()

EAPI void ecore_drm_device_free ( Ecore_Drm_Device dev)

Frees an Ecore_Drm_Device.

This function will cleanup and free any previously allocated Ecore_Drm_Device.

Parameters
devThe Ecore_Drm_Device to free

◆ ecore_drm_device_open()

EAPI Eina_Bool ecore_drm_device_open ( Ecore_Drm_Device dev)

Opens an Ecore_Drm_Device.

This function will open an existing Ecore_Drm_Device for use.

Parameters
devThe Ecore_Drm_Device to try and open
Returns
EINA_TRUE on success, EINA_FALSE on failure

References DBG, ECORE_FD_READ, ecore_main_fd_handler_add(), EEZE_UDEV_EVENT_ADD, EEZE_UDEV_EVENT_CHANGE, EEZE_UDEV_EVENT_REMOVE, EEZE_UDEV_TYPE_DRM, eeze_udev_watch_add(), EINA_FALSE, EINA_TRUE, and ERR.

◆ ecore_drm_device_close()

EAPI Eina_Bool ecore_drm_device_close ( Ecore_Drm_Device dev)

Closes an Ecore_Drm_Device.

This function will close a previously opened Ecore_Drm_Device

Parameters
devThe Ecore_Drm_Device to free
Returns
EINA_TRUE on success, EINA_FALSE on failure

References eeze_udev_watch_del(), EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, and EINA_TRUE.

◆ ecore_drm_device_master_get()

EAPI Eina_Bool ecore_drm_device_master_get ( Ecore_Drm_Device dev)

Gets if a given Ecore_Drm_Device is master.

This function will check if the given drm device is set to master

Parameters
devThe Ecore_Drm_Device to check
Returns
EINA_TRUE if device is master, EINA_FALSE otherwise

References EINA_FALSE, and EINA_TRUE.

◆ ecore_drm_device_master_set()

EAPI Eina_Bool ecore_drm_device_master_set ( Ecore_Drm_Device dev)

Sets a given Ecore_Drm_Device to master.

This function will attempt to set a given drm device to be master

Parameters
devThe Ecore_Drm_Device to set
Returns
EINA_TRUE on success, EINA_FALSE on failure

References DBG, EINA_FALSE, and EINA_TRUE.

◆ ecore_drm_device_master_drop()

EAPI Eina_Bool ecore_drm_device_master_drop ( Ecore_Drm_Device dev)

Tells a given Ecore_Drm_Device to stop being master.

This function will attempt to ask a drm device to stop being master

Parameters
devThe Ecore_Drm_Device to set
Returns
EINA_TRUE on success, EINA_FALSE on failure

References DBG, EINA_FALSE, and EINA_TRUE.

◆ ecore_drm_device_fd_get()

EAPI int ecore_drm_device_fd_get ( Ecore_Drm_Device dev)

Gets the file descriptor of Ecore_Drm_Devices.

This function will get the file descriptor of drm device

Parameters
devThe Ecore_Drm_Device to get
Returns
fd Value on success, -1 on failure

References EINA_SAFETY_ON_NULL_RETURN_VAL.

◆ ecore_drm_device_window_set()

EAPI void ecore_drm_device_window_set ( Ecore_Drm_Device dev,
unsigned int  window 
)

Sets the window of Ecore_Drm_Devices.

This function will set the window for given drm devices.

Parameters
devThe Ecore_Drm_Device for which window is set
windowThe window to set
Since
1.10

References EINA_SAFETY_ON_TRUE_RETURN.

◆ ecore_drm_device_name_get()

EAPI const char* ecore_drm_device_name_get ( Ecore_Drm_Device dev)

Gets the name of the Ecore_Drm_Device.

This function will return the name of Ecore_Drm_Device.

Parameters
devThe Ecore_Drm_Device to get name
Returns
device name on success, NULL on failure
Since
1.10

References EINA_SAFETY_ON_TRUE_RETURN_VAL.

◆ ecore_drm_device_software_setup()

EAPI Eina_Bool ecore_drm_device_software_setup ( Ecore_Drm_Device dev)

Sets up an Ecore_Drm_Device for software rendering.

This function will setup an Ecore_Drm_Device for software rendering which includes creating dumb buffers to render into.

Parameters
devThe Ecore_Drm_Device to setup for software rendering
Returns
EINA_TRUE on success, EINA_FALSE on failure
Since
1.14

References EINA_FALSE, and EINA_SAFETY_ON_NULL_RETURN_VAL.

◆ ecore_drm_device_pointer_left_handed_set()

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.

This function will loop all the registered inputs in Ecore_Drm_Device and set/unset left handed mode.

Parameters
devThe Ecore_Drm_Device to set left handed mode
left_handedThe flag of enable/disable left handed mode
Returns
EINA_TRUE on success, EINA_FALSE on failure
Since
1.17

References EINA_FALSE, EINA_LIST_FOREACH, EINA_SAFETY_ON_NULL_RETURN_VAL, EINA_TRUE, and WRN.

◆ ecore_drm_device_keyboard_cached_context_set()

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.

This function will setup a cached context to use same context for each devices. This function will be called before initialize Ecore_Drm.

Parameters
ctxstruct xkb_context used in libxkbcommon
Since
1.17

References EINA_SAFETY_ON_NULL_RETURN.

◆ ecore_drm_device_keyboard_cached_keymap_set()

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.

This function will be called before initialize Ecore_Drm.

Parameters
mapstruct xkb_keymap used in libxkbcommon
Since
1.17

References EINA_SAFETY_ON_NULL_RETURN.

◆ ecore_drm_device_output_find()

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.

This function will loop all the existing outputs in Ecore_Drm_Device and return an output if one exists that encapsulates the given coordinates.

Parameters
devThe Ecore_Drm_Device to search
xThe x coordinate
yThe y coordinate
Returns
An Ecore_Drm_Output if one exists at these coordinates, or NULL
Since
1.14

References EINA_LIST_FOREACH, EINA_SAFETY_ON_NULL_RETURN_VAL, and EINA_SAFETY_ON_TRUE_RETURN_VAL.

◆ ecore_drm_device_pointer_xy_get()

EAPI void ecore_drm_device_pointer_xy_get ( Ecore_Drm_Device dev,
int *  x,
int *  y 
)

Gets the pointer position of Ecore_Drm_Device.

This function will give the pointer position of Ecore_Drm_Device.

Parameters
devThe Ecore_Drm_Device to get pointer position for
*xThe parameter in which output x co-ordinate is stored
*yThe parameter in which output y co-ordinate is stored
Since
1.14

References EINA_LIST_FOREACH, and EINA_SAFETY_ON_TRUE_RETURN.

◆ ecore_drm_device_pointer_warp()

EAPI void ecore_drm_device_pointer_warp ( Ecore_Drm_Device dev,
int  x,
int  y 
)

Warps the pointer position of Ecore_Drm_Device.

This function will set the pointer position of Ecore_Drm_Device.

Parameters
devThe Ecore_Drm_Device to set pointer position for
xThe new x co-ordinate
yThe new y co-ordinate
Since
1.18

References EINA_LIST_FOREACH, and EINA_SAFETY_ON_TRUE_RETURN.

◆ ecore_drm_devices_get()

EAPI const Eina_List* ecore_drm_devices_get ( void  )

Gets the list of drm devices which are allocated.

Returns
Eina_List of drm devices, NULL otherwise
Since
1.14

◆ ecore_drm_screen_size_range_get()

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.

Parameters
devThe Ecore_Drm_Device to get screen size range from
*minwThe parameter in which smallest width is stored
*minhThe parameter in which smallest height is stored
*maxwThe parameter in which largest width is stored
*maxhThe parameter in which largest height is stored
Since
1.15

References EINA_SAFETY_ON_NULL_RETURN.

◆ ecore_drm_device_output_name_find()

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.

This function will loop all the existing outputs in Ecore_Drm_Device and return an output if one exists that matches the given name.

Parameters
devThe Ecore_Drm_Device to search
nameThe Ecore_Drm_Output matching this name
Returns
An Ecore_Drm_Output if one exists at these coordinates or NULL
Since
1.15

References EINA_LIST_FOREACH, and EINA_SAFETY_ON_NULL_RETURN_VAL.