Drm device functions

Functions that deal with finding, opening, closing, or obtaining various information about a drm device. More...

## Functions

EAPI Ecore_Drm2_Device * | ecore_drm2_device_open (const char *seat, unsigned int tty)
| Try to open the Ecore_Drm2_Device for a given seat.
EAPI void | ecore_drm2_device_close (Ecore_Drm2_Device *device)
| Close an open Ecore_Drm2_Device.
EAPI int | ecore_drm2_device_clock_id_get (Ecore_Drm2_Device *device)
| Get the type of clock used by a given Ecore_Drm2_Device.
EAPI void | ecore_drm2_device_cursor_size_get (Ecore_Drm2_Device *device, int *width, int *height)
| Get the size of the cursor supported by a given Ecore_Drm2_Device.
EAPI void | ecore_drm2_device_pointer_xy_get (Ecore_Drm2_Device *device, int *x, int *y)
| Get the current pointer position.
EAPI void | ecore_drm2_device_pointer_warp (Ecore_Drm2_Device *device, int x, int y)
| Warp the pointer position to given coordinates.
EAPI Eina_Bool | ecore_drm2_device_pointer_left_handed_set (Ecore_Drm2_Device *device, Eina_Bool left)
| Set a left handed mode for the given device.
EAPI void | ecore_drm2_device_window_set (Ecore_Drm2_Device *device, unsigned int window)
| Set which window is to be used for input events.
EAPI void | ecore_drm2_device_pointer_max_set (Ecore_Drm2_Device *device, int w, int h)
| Set maximium position that pointer device is allowed to move.
EAPI void | ecore_drm2_device_pointer_accel_speed_set (Ecore_Drm2_Device *device, double speed)
| Set pointer acceleration speed.
EAPI void | ecore_drm2_device_pointer_accel_profile_set (Ecore_Drm2_Device *device, uint32_t profile)
| Set pointer acceleration profile.
EAPI Eina_Bool | ecore_drm2_device_pointer_rotation_set (Ecore_Drm2_Device *device, int rotation)
| Set pointer value rotation.
EAPI void | ecore_drm2_device_touch_tap_to_click_enabled_set (Ecore_Drm2_Device *device, Eina_Bool enabled)
| Enable or disable pointer tap-to-click.
EAPI void | ecore_drm2_device_keyboard_info_set (Ecore_Drm2_Device *device, void *context, void *keymap, int group)
| Set info to be used on keyboards.
EAPI void | ecore_drm2_device_keyboard_group_set (Ecore_Drm2_Device *device, int group)
| Set a group layout to be used on keyboards.
EAPI unsigned int * | ecore_drm2_device_crtcs_get (Ecore_Drm2_Device *device, int *num)
| Get the crtcs of a given device.
EAPI void | ecore_drm2_device_screen_size_range_get (Ecore_Drm2_Device *device, int *minw, int *minh, int *maxw, int *maxh)
| Get the minimum and maximum screen size range.
EAPI void | ecore_drm2_device_calibrate (Ecore_Drm2_Device *device, int w, int h)
| Calibrate any input devices for given screen size.
EAPI Eina_Bool | ecore_drm2_device_vt_set (Ecore_Drm2_Device *device, int vt)
| Try to switch to a given virtual terminal.
EAPI Eina_Bool | ecore_drm2_device_prefer_shadow (Ecore_Drm2_Device *device)
| Get if a given device prefers the use of shadow buffers.
EAPI void | ecore_drm2_device_preferred_depth_get (Ecore_Drm2_Device *device, int *depth, int *bpp)
| Get the default depth & bpp from a given device.
EAPI int | ecore_drm2_device_fd_get (Ecore_Drm2_Device *device)
| Get the fd of an Ecore_Drm2_Device.
EAPI Eina_Bool | ecore_drm2_vblank_supported (Ecore_Drm2_Device *dev)
| Check if vblank is supported by the current video driver.

## Detailed Description

Functions that deal with finding, opening, closing, or obtaining various information about a drm device.

## Function Documentation

## ecore_drm2_device_open()

EAPI Ecore_Drm2_Device * ecore_drm2_device_open | ( | const char * | seat,
|  | unsigned int | tty )

Try to open the Ecore_Drm2_Device for a given seat.

Parameters

  seat |
  tty |

Returns
  An Ecore_Drm2_Device or NULL on failure.

Since
  1.18

References DBG, ecore_event_handler_add(), EINA_FALSE, elput_input_init(), elput_manager_close(), elput_manager_connect(), elput_manager_disconnect(), elput_manager_open(), ERR, and WRN.

## ecore_drm2_device_close()

EAPI void ecore_drm2_device_close | ( | Ecore_Drm2_Device * | device | ) |

Close an open Ecore_Drm2_Device.

Parameters

  device |

Since
  1.18

References ecore_event_handler_del(), EINA_SAFETY_ON_NULL_RETURN, eina_stringshare_del(), elput_input_shutdown(), and elput_manager_close().

## ecore_drm2_device_clock_id_get()

EAPI int ecore_drm2_device_clock_id_get | ( | Ecore_Drm2_Device * | device | ) |

Get the type of clock used by a given Ecore_Drm2_Device.

Parameters

  device |

Returns
  The clockid_t used by this drm device

Since
  1.18

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm2_device_cursor_size_get()

EAPI void ecore_drm2_device_cursor_size_get | ( | Ecore_Drm2_Device * | device,
|  | int * | width,
|  | int * | height )

Get the size of the cursor supported by a given Ecore_Drm2_Device.

Parameters

  device |
  width |
  height |

Since
  1.18

References EINA_SAFETY_ON_NULL_RETURN.

## ecore_drm2_device_pointer_xy_get()

EAPI void ecore_drm2_device_pointer_xy_get | ( | Ecore_Drm2_Device * | device,
|  | int * | x,
|  | int * | y )

Get the current pointer position.

Parameters

  device |
  x |
  y |

Since
  1.18

References EINA_SAFETY_ON_NULL_RETURN, and elput_input_pointer_xy_get().

## ecore_drm2_device_pointer_warp()

EAPI void ecore_drm2_device_pointer_warp | ( | Ecore_Drm2_Device * | device,
|  | int | x,
|  | int | y )

Warp the pointer position to given coordinates.

Parameters

  device |
  x |
  y |

Since
  1.18

References EINA_SAFETY_ON_NULL_RETURN, and elput_input_pointer_xy_set().

## ecore_drm2_device_pointer_left_handed_set()

EAPI Eina_Bool ecore_drm2_device_pointer_left_handed_set | ( | Ecore_Drm2_Device * | device,
|  | Eina_Bool | left )

Set a left handed mode for the given device.

Parameters

  device |
  left |

Returns
  EINA_TRUE on success, EINA_FALSE otherwise

Since
  1.18

References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, and elput_input_pointer_left_handed_set().

## ecore_drm2_device_window_set()

EAPI void ecore_drm2_device_window_set | ( | Ecore_Drm2_Device * | device,
|  | unsigned int | window )

Set which window is to be used for input events.

Parameters

  device |
  window |

Since
  1.18

References EINA_SAFETY_ON_NULL_RETURN, and elput_manager_window_set().

## ecore_drm2_device_pointer_max_set()

EAPI void ecore_drm2_device_pointer_max_set | ( | Ecore_Drm2_Device * | device,
|  | int | w,
|  | int | h )

Set maximium position that pointer device is allowed to move.

Parameters

  device |
  w |
  h |

Since
  1.18

References EINA_SAFETY_ON_NULL_RETURN, and elput_input_pointer_max_set().

## ecore_drm2_device_pointer_accel_speed_set()

EAPI void ecore_drm2_device_pointer_accel_speed_set | ( | Ecore_Drm2_Device * | device,
|  | double | speed )

Set pointer acceleration speed.

Parameters

  device |
  speed |

Since
  1.21

References EINA_SAFETY_ON_NULL_RETURN, and elput_input_pointer_accel_speed_set().

## ecore_drm2_device_pointer_accel_profile_set()

EAPI void ecore_drm2_device_pointer_accel_profile_set | ( | Ecore_Drm2_Device * | device,
|  | uint32_t | profile )

Set pointer acceleration profile.

Parameters

  device |
  profile |

Since
  1.21

References EINA_SAFETY_ON_NULL_RETURN, and elput_input_pointer_accel_profile_set().

## ecore_drm2_device_pointer_rotation_set()

EAPI Eina_Bool ecore_drm2_device_pointer_rotation_set | ( | Ecore_Drm2_Device * | device,
|  | int | rotation )

Set pointer value rotation.

Parameters

  device |
  rotation |

Returns
  EINA_TRUE on success, EINA_FALSE otherwise

Since
  1.20

References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, and elput_input_pointer_rotation_set().

## ecore_drm2_device_touch_tap_to_click_enabled_set()

EAPI void ecore_drm2_device_touch_tap_to_click_enabled_set | ( | Ecore_Drm2_Device * | device,
|  | Eina_Bool | enabled )

Enable or disable pointer tap-to-click.

Parameters

  device |
  enabled |

Since
  1.22

References EINA_SAFETY_ON_NULL_RETURN, and elput_input_touch_tap_to_click_enabled_set().

## ecore_drm2_device_keyboard_info_set()

EAPI void ecore_drm2_device_keyboard_info_set | ( | Ecore_Drm2_Device * | device,
|  | void * | context,
|  | void * | keymap,
|  | int | group )

Set info to be used on keyboards.

Parameters

  device |
  context |
  keymap |
  group |

Since
  1.20

References EINA_SAFETY_ON_NULL_RETURN, and elput_input_keyboard_info_set().

## ecore_drm2_device_keyboard_group_set()

EAPI void ecore_drm2_device_keyboard_group_set | ( | Ecore_Drm2_Device * | device,
|  | int | group )

Set a group layout to be used on keyboards.

Parameters

  device |
  group |

Since
  1.20

References EINA_SAFETY_ON_NULL_RETURN, and elput_input_keyboard_group_set().

## ecore_drm2_device_crtcs_get()

EAPI unsigned int * ecore_drm2_device_crtcs_get | ( | Ecore_Drm2_Device * | device,
|  | int * | num )

Get the crtcs of a given device.

Parameters

  device |
  num |

Returns
  The crtcs of this given device or NULL on failure

Since
  1.18

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm2_device_screen_size_range_get()

EAPI void ecore_drm2_device_screen_size_range_get | ( | Ecore_Drm2_Device * | device,
|  | int * | minw,
|  | int * | minh,
|  | int * | maxw,
|  | int * | maxh )

Get the minimum and maximum screen size range.

Parameters

  device |
  *minw |
  *minh |
  *maxw |
  *maxh |

Since
  1.18

References EINA_SAFETY_ON_NULL_RETURN.

## ecore_drm2_device_calibrate()

EAPI void ecore_drm2_device_calibrate | ( | Ecore_Drm2_Device * | device,
|  | int | w,
|  | int | h )

Calibrate any input devices for given screen size.

Parameters

  device |
  w |
  h |

Since
  1.18

References EINA_SAFETY_ON_NULL_RETURN, and elput_input_devices_calibrate().

## ecore_drm2_device_vt_set()

EAPI Eina_Bool ecore_drm2_device_vt_set | ( | Ecore_Drm2_Device * | device,
|  | int | vt )

Try to switch to a given virtual terminal.

Parameters

  device |
  vt |

Returns
  EINA_TRUE on success, EINA_FALSE otherwise

Since
  1.18

References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, and elput_manager_vt_set().

## ecore_drm2_device_prefer_shadow()

EAPI Eina_Bool ecore_drm2_device_prefer_shadow | ( | Ecore_Drm2_Device * | device | ) |

Get if a given device prefers the use of shadow buffers.

Parameters

  device |

Returns
  EINA_TRUE if preferred, EINA_FALSE otherwise

Since
  1.19

References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, and EINA_TRUE.

## ecore_drm2_device_preferred_depth_get()

EAPI void ecore_drm2_device_preferred_depth_get | ( | Ecore_Drm2_Device * | device,
|  | int * | depth,
|  | int * | bpp )

Get the default depth & bpp from a given device.

Parameters

  device |
  depth |
  bpp |

Since
  1.25

References EINA_SAFETY_ON_NULL_RETURN.

## ecore_drm2_device_fd_get()

EAPI int ecore_drm2_device_fd_get | ( | Ecore_Drm2_Device * | device | ) |

Get the fd of an Ecore_Drm2_Device.

Query the fd of the device.

Parameters

  device |

Since
  1.20

References EINA_SAFETY_ON_NULL_RETURN_VAL.

## ecore_drm2_vblank_supported()

EAPI Eina_Bool ecore_drm2_vblank_supported | ( | Ecore_Drm2_Device * | dev | ) |

Check if vblank is supported by the current video driver.

Parameters

  dev |

Returns
  EINA_TRUE if vblank is supported, EINA_FALSE otherwise

Since
  1.23

References EINA_FALSE, EINA_SAFETY_ON_NULL_RETURN_VAL, and EINA_TRUE.