2003-09-23 01:09:32 -07:00
|
|
|
#ifndef _ECORE_FB_H
|
|
|
|
#define _ECORE_FB_H
|
|
|
|
|
2004-11-24 21:18:31 -08:00
|
|
|
#ifdef EAPI
|
|
|
|
#undef EAPI
|
|
|
|
#endif
|
|
|
|
#ifdef WIN32
|
|
|
|
# ifdef BUILDING_DLL
|
|
|
|
# define EAPI __declspec(dllexport)
|
|
|
|
# else
|
|
|
|
# define EAPI __declspec(dllimport)
|
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# ifdef GCC_HASCLASSVISIBILITY
|
|
|
|
# define EAPI __attribute__ ((visibility("default")))
|
|
|
|
# else
|
|
|
|
# define EAPI
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2004-04-29 20:10:17 -07:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief Ecore frame buffer system functions.
|
|
|
|
*/
|
|
|
|
|
2003-09-23 01:09:32 -07:00
|
|
|
/* FIXME:
|
|
|
|
* maybe a new module?
|
|
|
|
* - code to get battery info
|
|
|
|
* - code to get thermal info
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern int ECORE_FB_EVENT_KEY_DOWN; /**< FB Key Down event */
|
|
|
|
extern int ECORE_FB_EVENT_KEY_UP; /**< FB Key Up event */
|
|
|
|
extern int ECORE_FB_EVENT_MOUSE_BUTTON_DOWN; /**< FB Mouse Down event */
|
|
|
|
extern int ECORE_FB_EVENT_MOUSE_BUTTON_UP; /**< FB Mouse Up event */
|
|
|
|
extern int ECORE_FB_EVENT_MOUSE_MOVE; /**< FB Mouse Move event */
|
|
|
|
|
|
|
|
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 */
|
|
|
|
|
|
|
|
struct _Ecore_Fb_Event_Key_Down /** FB Key Down event */
|
|
|
|
{
|
2004-12-13 19:22:21 -08:00
|
|
|
char *keyname; /**< The name of the key that was pressed */
|
|
|
|
char *keysymbol; /**< The logical symbol of the key that was pressed */
|
|
|
|
char *key_compose; /**< The UTF-8 string conversion if any */
|
2003-09-23 01:09:32 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _Ecore_Fb_Event_Key_Up /** FB Key Up event */
|
|
|
|
{
|
|
|
|
char *keyname; /**< The name of the key that was released */
|
2004-12-13 19:22:21 -08:00
|
|
|
char *keysymbol; /**< The logical symbol of the key that was pressed */
|
|
|
|
char *key_compose; /**< The UTF-8 string conversion if any */
|
2003-09-23 01:09:32 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _Ecore_Fb_Event_Mouse_Button_Down /** FB Mouse Down event */
|
|
|
|
{
|
|
|
|
int button; /**< Mouse button that was pressed (1 - 32) */
|
|
|
|
int x; /**< Mouse co-ordinates when mouse button was pressed */
|
|
|
|
int y; /**< Mouse co-ordinates when mouse button was pressed */
|
|
|
|
int double_click : 1; /**< Set if click was a double click */
|
|
|
|
int triple_click : 1; /**< Set if click was a triple click */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Ecore_Fb_Event_Mouse_Button_Up /** FB Mouse Up event */
|
|
|
|
{
|
|
|
|
int button; /**< Mouse button that was released (1 - 32) */
|
|
|
|
int x; /**< Mouse co-ordinates when mouse button was raised */
|
|
|
|
int y; /**< Mouse co-ordinates when mouse button was raised */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _Ecore_Fb_Event_Mouse_Move /** FB Mouse Move event */
|
|
|
|
{
|
|
|
|
int x; /**< Mouse co-ordinates where the mouse cursor moved to */
|
|
|
|
int y; /**< Mouse co-ordinates where the mouse cursor moved to */
|
|
|
|
};
|
|
|
|
|
2004-11-24 21:18:31 -08:00
|
|
|
EAPI int ecore_fb_init(const char *name);
|
|
|
|
EAPI int ecore_fb_shutdown(void);
|
2003-09-23 01:09:32 -07:00
|
|
|
|
2004-11-24 21:18:31 -08:00
|
|
|
EAPI void ecore_fb_double_click_time_set(double t);
|
|
|
|
EAPI double ecore_fb_double_click_time_get(void);
|
2003-09-23 01:09:32 -07:00
|
|
|
|
2004-11-24 21:18:31 -08:00
|
|
|
EAPI void ecore_fb_size_get(int *w, int *h);
|
2003-09-23 01:09:32 -07:00
|
|
|
|
2004-11-24 21:18:31 -08:00
|
|
|
EAPI void ecore_fb_touch_screen_calibrate_set(int xscale, int xtrans, int yscale, int ytrans, int xyswap);
|
|
|
|
EAPI void ecore_fb_touch_screen_calibrate_get(int *xscale, int *xtrans, int *yscale, int *ytrans, int *xyswap);
|
2003-09-23 01:09:32 -07:00
|
|
|
|
2004-11-24 21:18:31 -08:00
|
|
|
EAPI void ecore_fb_backlight_set(int on);
|
|
|
|
EAPI int ecore_fb_backlight_get(void);
|
2003-09-23 01:09:32 -07:00
|
|
|
|
2004-11-24 21:18:31 -08:00
|
|
|
EAPI void ecore_fb_backlight_brightness_set(double br);
|
|
|
|
EAPI double ecore_fb_backlight_brightness_get(void);
|
2003-09-23 01:09:32 -07:00
|
|
|
|
2004-11-24 21:18:31 -08:00
|
|
|
EAPI void ecore_fb_led_set(int on);
|
|
|
|
EAPI void ecore_fb_led_blink_set(double speed);
|
2003-09-23 01:09:32 -07:00
|
|
|
|
2004-11-24 21:18:31 -08:00
|
|
|
EAPI void ecore_fb_contrast_set(double cr);
|
|
|
|
EAPI double ecore_fb_contrast_get(void);
|
2003-09-23 01:09:32 -07:00
|
|
|
|
2004-11-24 21:18:31 -08:00
|
|
|
EAPI double ecore_fb_light_sensor_get(void);
|
2003-09-23 01:09:32 -07:00
|
|
|
|
2004-11-24 21:18:31 -08:00
|
|
|
EAPI void ecore_fb_callback_gain_set(void (*func) (void *data), void *data);
|
|
|
|
EAPI void ecore_fb_callback_lose_set(void (*func) (void *data), void *data);
|
2003-09-23 01:09:32 -07:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|