Ecore_FB - Frame buffer convenience functions.

Functions used to set up and shut down the Ecore_Framebuffer functions. More...

Data Structures

struct  _Ecore_Fb_Event_Key_Down
 Framebuffer Key Down event. More...
struct  _Ecore_Fb_Event_Key_Up
 Framebuffer Key Up event. More...
struct  _Ecore_Fb_Event_Mouse_Button_Down
 Framebuffer Mouse Down event. More...
struct  _Ecore_Fb_Event_Mouse_Button_Up
 Framebuffer Mouse Up event. More...
struct  _Ecore_Fb_Event_Mouse_Move
 Framebuffer Mouse Move event. More...
struct  _Ecore_Fb_Event_Mouse_Wheel
 Framebuffer Mouse Wheel event. More...

Typedefs

typedef struct
_Ecore_Fb_Input_Device 
Ecore_Fb_Input_Device
 Input device handler.
typedef enum
_Ecore_Fb_Input_Device_Cap 
Ecore_Fb_Input_Device_Cap
 Device capabilities.
typedef struct
_Ecore_Fb_Event_Key_Down 
Ecore_Fb_Event_Key_Down
 FB Key Down event.
typedef struct
_Ecore_Fb_Event_Key_Up 
Ecore_Fb_Event_Key_Up
 FB Key Up event.
typedef struct
_Ecore_Fb_Event_Mouse_Button_Down 
Ecore_Fb_Event_Mouse_Button_Down
 FB Mouse Down event.
typedef struct
_Ecore_Fb_Event_Mouse_Button_Up 
Ecore_Fb_Event_Mouse_Button_Up
 FB Mouse Up event.
typedef struct
_Ecore_Fb_Event_Mouse_Move 
Ecore_Fb_Event_Mouse_Move
 FB Mouse Move event.
typedef struct
_Ecore_Fb_Event_Mouse_Wheel 
Ecore_Fb_Event_Mouse_Wheel
 FB Mouse Wheel event.

Enumerations

enum  _Ecore_Fb_Input_Device_Cap
 

Device capabilities.


Functions

EAPI int ecore_fb_init (const char *name)
 Initialize the Ecore_Fb library.
EAPI int ecore_fb_shutdown (void)
 Shut down the Ecore_Fb library.
EAPI void ecore_fb_size_get (int *w, int *h)
 Retrieve the width and height of the current frame buffer in pixels.
EAPI void ecore_fb_callback_gain_set (void(*func)(void *data), void *data)
 Set a callback called when a virtual terminal is gained.
EAPI void ecore_fb_callback_lose_set (void(*func)(void *data), void *data)
 Set a callback called when a virtual terminal is lost.
EAPI Ecore_Fb_Input_Deviceecore_fb_input_device_open (const char *dev)
 Open an input device.
EAPI void ecore_fb_input_device_close (Ecore_Fb_Input_Device *dev)
 Close the given device.
EAPI void ecore_fb_input_device_listen (Ecore_Fb_Input_Device *dev, Eina_Bool listen)
 Set the listen mode for an input device .
EAPI const char * ecore_fb_input_device_name_get (Ecore_Fb_Input_Device *dev)
 Retrieve the name of the given device.
EAPI Ecore_Fb_Input_Device_Cap ecore_fb_input_device_cap_get (Ecore_Fb_Input_Device *dev)
 Retrieve the capability of the given device.
EAPI void ecore_fb_input_device_axis_size_set (Ecore_Fb_Input_Device *dev, int w, int h)
 Set the axis size of the given device.
EAPI void ecore_fb_touch_screen_calibrate_set (int xscale, int xtrans, int yscale, int ytrans, int xyswap)
 Calibrates the touschreen using the given parameters.
EAPI void ecore_fb_touch_screen_calibrate_get (int *xscale, int *xtrans, int *yscale, int *ytrans, int *xyswap)
 Retrieves the calibration parameters of the touchscreen.
EAPI void ecore_fb_input_device_threshold_click_set (Ecore_Fb_Input_Device *dev, double threshold)
 Set the threshold of mouse clicks of the given device.
EAPI double ecore_fb_input_device_threshold_click_get (Ecore_Fb_Input_Device *dev)
 Get the threshold of mouse clicks of the given device.

Variables

EAPI int ECORE_FB_EVENT_KEY_DOWN
 FB Key Down event.
EAPI int ECORE_FB_EVENT_KEY_UP
 FB Key Up event.
EAPI int ECORE_FB_EVENT_MOUSE_BUTTON_DOWN
 FB Mouse Down event.
EAPI int ECORE_FB_EVENT_MOUSE_BUTTON_UP
 FB Mouse Up event.
EAPI int ECORE_FB_EVENT_MOUSE_MOVE
 FB Mouse Move event.
EAPI int ECORE_FB_EVENT_MOUSE_WHEEL
 FB Mouse Wheel event.

Detailed Description

Functions used to set up and shut down the Ecore_Framebuffer functions.


Function Documentation

EAPI void ecore_fb_callback_gain_set ( void(*)(void *data)  func,
void *  data 
)

Set a callback called when a virtual terminal is gained.

Parameters:
funcThe callback called when vt is gained.
dataThe data to pass to the callback.

This function sets the callback func which will be called when a virtual terminal is gained (for example you press Ctrl-Alt-F1 to go to vt1 and your app was using vt1). data will be pass to func if the callback is called.

EAPI void ecore_fb_callback_lose_set ( void(*)(void *data)  func,
void *  data 
)

Set a callback called when a virtual terminal is lost.

Parameters:
funcThe callback called when vt is lost.
dataThe data to pass to the callback.

This function sets the callback func which will be called when a virtual terminal is lost (someone wants the tv from you and you want to give up that vt). data will be pass to func if the callback is called.

EAPI int ecore_fb_init ( const char *  name)

Initialize the Ecore_Fb library.

Parameters:
nameDevice target name.
Returns:
1 or greater on success, 0 on error.

This function sets up all the Ecore_Fb library. It returns 0 on failure, otherwise it returns the number of times it has already been called.

When Ecore_Fb is not used anymore, call ecore_fb_shutdown() to shut down the Ecore_Fb library.

References ecore_event_type_new(), ECORE_FB_EVENT_KEY_DOWN, ECORE_FB_EVENT_KEY_UP, ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, ECORE_FB_EVENT_MOUSE_BUTTON_UP, ECORE_FB_EVENT_MOUSE_MOVE, and ECORE_FB_EVENT_MOUSE_WHEEL.

EAPI void ecore_fb_input_device_axis_size_set ( Ecore_Fb_Input_Device dev,
int  w,
int  h 
)

Set the axis size of the given device.

Parameters:
devThe device to set the axis size to.
wThe width of the axis.
hThe 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.

EAPI Ecore_Fb_Input_Device_Cap ecore_fb_input_device_cap_get ( Ecore_Fb_Input_Device dev)

Retrieve the capability of the given device.

Parameters:
devThe device to get the name from.
Returns:
The capability of the device.

This function returns the capability of the device dev. If dev is NULL, this function returns #ECORE_FB_INPUT_DEVICE_CAP_NONE.

EAPI void ecore_fb_input_device_close ( Ecore_Fb_Input_Device dev)

Close the given device.

Parameters:
devThe device to close

This function closes the device dev. If dev is NULL, this function does nothing.

EAPI void ecore_fb_input_device_listen ( Ecore_Fb_Input_Device dev,
Eina_Bool  listen 
)

Set the listen mode for an input device .

Parameters:
devThe device to set the mode of.
listenEINA_FALSE to disable listening mode, EINA_TRUE to enable it.

This function enables or disables listening on the input device dev. If listen is #EINA_FALSE, listening mode is disabled, if it is #EINA_TRUE, it is enabled.

References ECORE_FD_READ, and ecore_main_fd_handler_add().

EAPI const char * ecore_fb_input_device_name_get ( Ecore_Fb_Input_Device dev)

Retrieve the name of the given device.

Parameters:
devThe device to get the name from.
Returns:
The name of the device.

This function returns the name of the device dev. If dev is NULL, this function returns NULL.

EAPI Ecore_Fb_Input_Device * ecore_fb_input_device_open ( const char *  dev)

Open an input device.

Parameters:
devThe device to open.
Returns:
The Ecore_Fb_Input_Device object that has been opened.

This function opens the input device named dev and returns the object for it, or returns NULL on failure.

EAPI double ecore_fb_input_device_threshold_click_get ( Ecore_Fb_Input_Device dev)

Get the threshold of mouse clicks of the given device.

Parameters:
devThe device to set the threshodl mouse click from.
Returns:
The threshold value.

This function returns the threshold of mouse clicks of the device dev. If dev is NULL, this function returns 0.0.

EAPI void ecore_fb_input_device_threshold_click_set ( Ecore_Fb_Input_Device dev,
double  threshold 
)

Set the threshold of mouse clicks of the given device.

Parameters:
devThe device to set the threshodl mouse click to.
thresholdThe threshold value.

This function sets the threshold of mouse clicks of the device dev to threshold. If dev is NULL, this function does nothing.

EAPI int ecore_fb_shutdown ( void  )

Shut down the Ecore_Fb library.

Returns:
0 when the library is completely shut down, 1 or greater otherwise.

This function shuts down the Ecore_Fb library. It returns 0 when it has been called the same number of times than ecore_fb_init().

EAPI void ecore_fb_size_get ( int *  w,
int *  h 
)

Retrieve the width and height of the current frame buffer in pixels.

Parameters:
wPointer to an integer in which to store the width.
hPointer to an interge in which to store the height.

This function retrieves the size of the current frame buffer in pixels. w and h can be buffers that will be filled with the corresponding values. If one of them is NULL, nothing will be done for that parameter.

EAPI void ecore_fb_touch_screen_calibrate_get ( int *  xscale,
int *  xtrans,
int *  yscale,
int *  ytrans,
int *  xyswap 
)

Retrieves the calibration parameters of the touchscreen.

Parameters:
xscalePointer to an integer in which to store the X scaling. Note that 256 = 1.0.
xtransPointer to an integer in which to store the X translation.
yscalePointer to an integer in which to store the Y scaling.
ytransPointer to an integer in which to store the Y translation.
xyswapPointer to an integer in which to store the Swap X & Y flag.
EAPI void ecore_fb_touch_screen_calibrate_set ( int  xscale,
int  xtrans,
int  yscale,
int  ytrans,
int  xyswap 
)

Calibrates the touschreen using the given parameters.

Parameters:
xscaleX scaling, where 256 = 1.0
xtransX translation.
yscaleY scaling.
ytransY translation.
xyswapSwap X & Y flag.