9 # define EAPI __declspec(dllexport)
11 # define EAPI __declspec(dllimport)
16 # define EAPI __attribute__ ((visibility("default")))
27 * @brief Ecore frame buffer system functions.
32 * - code to get battery info
33 * - code to get thermal info
34 * ecore evas fb isnt good enough for weird things, like multiple fb's, same happens here.
35 * backlight support using new kernel interface
38 * ecore_fb_li_device_close_all ? or a shutdown of the subsystem?
46 typedef struct _Ecore_Fb_Input_Device Ecore_Fb_Input_Device; /* an input device handler */
48 /* device capabilities */
49 enum _Ecore_Fb_Input_Device_Cap
51 ECORE_FB_INPUT_DEVICE_CAP_NONE = 0x00000000,
52 ECORE_FB_INPUT_DEVICE_CAP_RELATIVE = 0x00000001,
53 ECORE_FB_INPUT_DEVICE_CAP_ABSOLUTE = 0x00000002,
54 ECORE_FB_INPUT_DEVICE_CAP_KEYS_OR_BUTTONS = 0x00000004
56 typedef enum _Ecore_Fb_Input_Device_Cap Ecore_Fb_Input_Device_Cap;
58 EAPI extern int ECORE_FB_EVENT_KEY_DOWN; /**< FB Key Down event */
59 EAPI extern int ECORE_FB_EVENT_KEY_UP; /**< FB Key Up event */
60 EAPI extern int ECORE_FB_EVENT_MOUSE_BUTTON_DOWN; /**< FB Mouse Down event */
61 EAPI extern int ECORE_FB_EVENT_MOUSE_BUTTON_UP; /**< FB Mouse Up event */
62 EAPI extern int ECORE_FB_EVENT_MOUSE_MOVE; /**< FB Mouse Move event */
63 EAPI extern int ECORE_FB_EVENT_MOUSE_WHEEL; /**< FB Mouse Wheel event */
65 typedef struct _Ecore_Fb_Event_Key_Down Ecore_Fb_Event_Key_Down; /**< FB Key Down event */
66 typedef struct _Ecore_Fb_Event_Key_Up Ecore_Fb_Event_Key_Up; /**< FB Key Up event */
67 typedef struct _Ecore_Fb_Event_Mouse_Button_Down Ecore_Fb_Event_Mouse_Button_Down; /**< FB Mouse Down event */
68 typedef struct _Ecore_Fb_Event_Mouse_Button_Up Ecore_Fb_Event_Mouse_Button_Up; /**< FB Mouse Up event */
69 typedef struct _Ecore_Fb_Event_Mouse_Move Ecore_Fb_Event_Mouse_Move; /**< FB Mouse Move event */
70 typedef struct _Ecore_Fb_Event_Mouse_Wheel Ecore_Fb_Event_Mouse_Wheel; /**< FB Mouse Wheel event */
72 struct _Ecore_Fb_Event_Key_Down /** FB Key Down event */
74 Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
75 char *keyname; /**< The name of the key that was pressed */
76 char *keysymbol; /**< The logical symbol of the key that was pressed */
77 char *key_compose; /**< The UTF-8 string conversion if any */
80 struct _Ecore_Fb_Event_Key_Up /** FB Key Up event */
82 Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
83 char *keyname; /**< The name of the key that was released */
84 char *keysymbol; /**< The logical symbol of the key that was pressed */
85 char *key_compose; /**< The UTF-8 string conversion if any */
88 struct _Ecore_Fb_Event_Mouse_Button_Down /** FB Mouse Down event */
90 Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
91 int button; /**< Mouse button that was pressed (1 - 32) */
92 int x; /**< Mouse co-ordinates when mouse button was pressed */
93 int y; /**< Mouse co-ordinates when mouse button was pressed */
94 int double_click : 1; /**< Set if click was a double click */
95 int triple_click : 1; /**< Set if click was a triple click */
98 struct _Ecore_Fb_Event_Mouse_Button_Up /** FB Mouse Up event */
100 Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
101 int button; /**< Mouse button that was released (1 - 32) */
102 int x; /**< Mouse co-ordinates when mouse button was raised */
103 int y; /**< Mouse co-ordinates when mouse button was raised */
106 struct _Ecore_Fb_Event_Mouse_Move /** FB Mouse Move event */
108 Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
109 int x; /**< Mouse co-ordinates where the mouse cursor moved to */
110 int y; /**< Mouse co-ordinates where the mouse cursor moved to */
113 struct _Ecore_Fb_Event_Mouse_Wheel /** FB Mouse Wheel event */
115 Ecore_Fb_Input_Device *dev;
117 int direction; /* 0 = vertical, 1 = horizontal */
118 int wheel; /* value 1 (left/up), -1 (right/down) */
122 EAPI void ecore_fb_callback_gain_set(void (*func) (void *data), void *data);
123 EAPI void ecore_fb_callback_lose_set(void (*func) (void *data), void *data);
125 EAPI Ecore_Fb_Input_Device *ecore_fb_input_device_open(const char *dev);
126 EAPI void ecore_fb_input_device_close(Ecore_Fb_Input_Device *dev);
127 EAPI void ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, int listen);
128 EAPI const char *ecore_fb_input_device_name_get(Ecore_Fb_Input_Device *dev);
129 EAPI Ecore_Fb_Input_Device_Cap ecore_fb_input_device_cap_get(Ecore_Fb_Input_Device *dev);
130 EAPI void ecore_fb_input_device_axis_size_set(Ecore_Fb_Input_Device *dev, int w, int h);
131 EAPI void ecore_fb_input_threshold_click_set(Ecore_Fb_Input_Device *dev, double threshold);
132 EAPI double ecore_fb_input_threshold_click_get(Ecore_Fb_Input_Device *dev);
134 EAPI int ecore_fb_init(const char *name);
135 EAPI int ecore_fb_shutdown(void);
136 EAPI void ecore_fb_size_get(int *w, int *h);
138 EAPI void ecore_fb_touch_screen_calibrate_set(int xscale, int xtrans, int yscale, int ytrans, int xyswap);
139 EAPI void ecore_fb_touch_screen_calibrate_get(int *xscale, int *xtrans, int *yscale, int *ytrans, int *xyswap);