forked from enlightenment/efl
ecore-drm: Add API function to return the vt fd
@feature: Added API function to return the file descriptor from the opened virtual terminal. This is needed for use in ecore_evas. When it sets up the canvas, we pass this fd to the canvas for use in setting up the vt framebuffers Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
2fe6c88cf0
commit
fe7206d334
|
@ -147,6 +147,7 @@ EAPI Eina_Bool ecore_drm_tty_open(Ecore_Drm_Device *dev, const char *name);
|
|||
EAPI Eina_Bool ecore_drm_tty_close(Ecore_Drm_Device *dev);
|
||||
EAPI Eina_Bool ecore_drm_tty_release(Ecore_Drm_Device *dev);
|
||||
EAPI Eina_Bool ecore_drm_tty_acquire(Ecore_Drm_Device *dev);
|
||||
EAPI int ecore_drm_tty_get(Ecore_Drm_Device *dev);
|
||||
|
||||
EAPI Eina_Bool ecore_drm_outputs_create(Ecore_Drm_Device *dev);
|
||||
EAPI void ecore_drm_output_free(Ecore_Drm_Output *output);
|
||||
|
|
|
@ -295,3 +295,23 @@ ecore_drm_tty_acquire(Ecore_Drm_Device *dev)
|
|||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the opened virtual terminal file descriptor
|
||||
*
|
||||
* @param dev The Ecore_Drm_Device which owns this tty.
|
||||
*
|
||||
* @return The tty fd opened from previous call to ecore_drm_tty_open
|
||||
*
|
||||
* @ingroup Ecore_Drm_Tty_Group
|
||||
*
|
||||
* @since 1.10
|
||||
*/
|
||||
EAPI int
|
||||
ecore_drm_tty_get(Ecore_Drm_Device *dev)
|
||||
{
|
||||
/* check for valid device */
|
||||
if ((!dev) || (!dev->drm.name) || (dev->tty.fd < 0)) return -1;
|
||||
|
||||
return dev->tty.fd;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue