summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h
diff options
context:
space:
mode:
authorJorge Luis Zapata Muga <jorgeluis.zapata@gmail.com>2006-07-31 04:13:51 +0000
committerJorge Luis Zapata Muga <jorgeluis.zapata@gmail.com>2006-07-31 04:13:51 +0000
commitb297b42db638495778746961300820a81988f918 (patch)
tree1a1040348e77e1a7248fae7ead8ac49e64a3c0dc /legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h
parent996645a4d619722eb0de6362c3f9731f74f769da (diff)
Ecore_Fb changes:
================ + remove of old ps2, touchscreen and keyboard input handlers + old code is kept on sperated files for backup in case someone needs it, but wont compile + addition of new linux input (evdev) handlers. (touchscreen is handled as an absolute axis device, no need for old code). It supports multiple input devices, you can have several mice for example. + new vt code, now it support allocating a new tty if root, or use current tty if normal user, correct vt switching on both cases + some more cleanups Ecore_Evas_Fb changes: ===================== + use the new ecore_fb SVN revision: 24326
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h88
1 files changed, 65 insertions, 23 deletions
diff --git a/legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h b/legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h
index 7627d82e81..cc83b7c4c8 100644
--- a/legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h
+++ b/legacy/ecore/src/lib/ecore_fb/Ecore_Fb.h
@@ -31,68 +31,112 @@
31 * maybe a new module? 31 * maybe a new module?
32 * - code to get battery info 32 * - code to get battery info
33 * - code to get thermal 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
36 * absolute axis
37 * joystick
38 *
34 */ 39 */
35 40
36#ifdef __cplusplus 41#ifdef __cplusplus
37extern "C" { 42extern "C" {
38#endif 43#endif
39 44
45
46typedef struct _Ecore_Fb_Input_Device Ecore_Fb_Input_Device; /* an input device handler */
47
48/* device capabilities */
49typedef enum _Ecore_Fb_Input_Device_Cap Ecore_Fb_Input_Device_Cap;
50enum _Ecore_Fb_Input_Device_Cap
51{
52 ECORE_FB_INPUT_DEVICE_CAP_NONE = 0x00000000,
53 ECORE_FB_INPUT_DEVICE_CAP_RELATIVE = 0x00000001,
54 ECORE_FB_INPUT_DEVICE_CAP_ABSOLUTE = 0x00000002,
55 ECORE_FB_INPUT_DEVICE_CAP_KEYS_OR_BUTTONS = 0x00000004
56};
57
58
40EAPI extern int ECORE_FB_EVENT_KEY_DOWN; /**< FB Key Down event */ 59EAPI extern int ECORE_FB_EVENT_KEY_DOWN; /**< FB Key Down event */
41EAPI extern int ECORE_FB_EVENT_KEY_UP; /**< FB Key Up event */ 60EAPI extern int ECORE_FB_EVENT_KEY_UP; /**< FB Key Up event */
42EAPI extern int ECORE_FB_EVENT_MOUSE_BUTTON_DOWN; /**< FB Mouse Down event */ 61EAPI extern int ECORE_FB_EVENT_MOUSE_BUTTON_DOWN; /**< FB Mouse Down event */
43EAPI extern int ECORE_FB_EVENT_MOUSE_BUTTON_UP; /**< FB Mouse Up event */ 62EAPI extern int ECORE_FB_EVENT_MOUSE_BUTTON_UP; /**< FB Mouse Up event */
44EAPI extern int ECORE_FB_EVENT_MOUSE_MOVE; /**< FB Mouse Move event */ 63EAPI extern int ECORE_FB_EVENT_MOUSE_MOVE; /**< FB Mouse Move event */
64EAPI extern int ECORE_FB_EVENT_MOUSE_WHEEL; /**< FB Mouse Wheel event */
45 65
46typedef struct _Ecore_Fb_Event_Key_Down Ecore_Fb_Event_Key_Down; /**< FB Key Down event */ 66typedef struct _Ecore_Fb_Event_Key_Down Ecore_Fb_Event_Key_Down; /**< FB Key Down event */
47typedef struct _Ecore_Fb_Event_Key_Up Ecore_Fb_Event_Key_Up; /**< FB Key Up event */ 67typedef struct _Ecore_Fb_Event_Key_Up Ecore_Fb_Event_Key_Up; /**< FB Key Up event */
48typedef struct _Ecore_Fb_Event_Mouse_Button_Down Ecore_Fb_Event_Mouse_Button_Down; /**< FB Mouse Down event */ 68typedef struct _Ecore_Fb_Event_Mouse_Button_Down Ecore_Fb_Event_Mouse_Button_Down; /**< FB Mouse Down event */
49typedef struct _Ecore_Fb_Event_Mouse_Button_Up Ecore_Fb_Event_Mouse_Button_Up; /**< FB Mouse Up event */ 69typedef struct _Ecore_Fb_Event_Mouse_Button_Up Ecore_Fb_Event_Mouse_Button_Up; /**< FB Mouse Up event */
50typedef struct _Ecore_Fb_Event_Mouse_Move Ecore_Fb_Event_Mouse_Move; /**< FB Mouse Move event */ 70typedef struct _Ecore_Fb_Event_Mouse_Move Ecore_Fb_Event_Mouse_Move; /**< FB Mouse Move event */
71typedef struct _Ecore_Fb_Event_Mouse_Wheel Ecore_Fb_Event_Mouse_Wheel; /**< FB Mouse Wheel event */
51 72
52struct _Ecore_Fb_Event_Key_Down /** FB Key Down event */ 73struct _Ecore_Fb_Event_Key_Down /** FB Key Down event */
53{ 74{
54 char *keyname; /**< The name of the key that was pressed */ 75 Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
55 char *keysymbol; /**< The logical symbol of the key that was pressed */ 76 char *keyname; /**< The name of the key that was pressed */
56 char *key_compose; /**< The UTF-8 string conversion if any */ 77 char *keysymbol; /**< The logical symbol of the key that was pressed */
78 char *key_compose; /**< The UTF-8 string conversion if any */
57}; 79};
58 80
59struct _Ecore_Fb_Event_Key_Up /** FB Key Up event */ 81struct _Ecore_Fb_Event_Key_Up /** FB Key Up event */
60{ 82{
61 char *keyname; /**< The name of the key that was released */ 83 Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
62 char *keysymbol; /**< The logical symbol of the key that was pressed */ 84 char *keyname; /**< The name of the key that was released */
63 char *key_compose; /**< The UTF-8 string conversion if any */ 85 char *keysymbol; /**< The logical symbol of the key that was pressed */
86 char *key_compose; /**< The UTF-8 string conversion if any */
64}; 87};
65 88
66struct _Ecore_Fb_Event_Mouse_Button_Down /** FB Mouse Down event */ 89struct _Ecore_Fb_Event_Mouse_Button_Down /** FB Mouse Down event */
67{ 90{
68 int button; /**< Mouse button that was pressed (1 - 32) */ 91 Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
69 int x; /**< Mouse co-ordinates when mouse button was pressed */ 92 int button; /**< Mouse button that was pressed (1 - 32) */
70 int y; /**< Mouse co-ordinates when mouse button was pressed */ 93 int x; /**< Mouse co-ordinates when mouse button was pressed */
71 int double_click : 1; /**< Set if click was a double click */ 94 int y; /**< Mouse co-ordinates when mouse button was pressed */
72 int triple_click : 1; /**< Set if click was a triple click */ 95 int double_click : 1; /**< Set if click was a double click */
96 int triple_click : 1; /**< Set if click was a triple click */
73}; 97};
74 98
75struct _Ecore_Fb_Event_Mouse_Button_Up /** FB Mouse Up event */ 99struct _Ecore_Fb_Event_Mouse_Button_Up /** FB Mouse Up event */
76{ 100{
77 int button; /**< Mouse button that was released (1 - 32) */ 101 Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
78 int x; /**< Mouse co-ordinates when mouse button was raised */ 102 int button; /**< Mouse button that was released (1 - 32) */
79 int y; /**< Mouse co-ordinates when mouse button was raised */ 103 int x; /**< Mouse co-ordinates when mouse button was raised */
104 int y; /**< Mouse co-ordinates when mouse button was raised */
80}; 105};
81 106
82struct _Ecore_Fb_Event_Mouse_Move /** FB Mouse Move event */ 107struct _Ecore_Fb_Event_Mouse_Move /** FB Mouse Move event */
83{ 108{
84 int x; /**< Mouse co-ordinates where the mouse cursor moved to */ 109 Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
85 int y; /**< Mouse co-ordinates where the mouse cursor moved to */ 110 int x; /**< Mouse co-ordinates where the mouse cursor moved to */
111 int y; /**< Mouse co-ordinates where the mouse cursor moved to */
86}; 112};
87 113
114struct _Ecore_Fb_Event_Mouse_Wheel /** FB Mouse Wheel event */
115{
116 Ecore_Fb_Input_Device *dev;
117 int x,y;
118 int direction; /* 0 = vertical, 1 = horizontal */
119 int wheel; /* value 1 (left/up), -1 (right/down) */
120};
121/* ecore_fb_vt.c */
122EAPI void ecore_fb_callback_gain_set(void (*func) (void *data), void *data);
123EAPI void ecore_fb_callback_lose_set(void (*func) (void *data), void *data);
124/* ecore_fb_li.c */
125EAPI Ecore_Fb_Input_Device *ecore_fb_input_device_open(const char *dev);
126EAPI void ecore_fb_input_device_close(Ecore_Fb_Input_Device *dev);
127EAPI void ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, int listen);
128EAPI const char *ecore_fb_input_device_name_get(Ecore_Fb_Input_Device *dev);
129EAPI Ecore_Fb_Input_Device_Cap ecore_fb_input_device_cap_get(Ecore_Fb_Input_Device *dev);
130EAPI void ecore_fb_input_device_axis_size_set(Ecore_Fb_Input_Device *dev, int w, int h);
131EAPI void ecore_fb_input_threshold_click_set(Ecore_Fb_Input_Device *dev, double threshold);
132EAPI double ecore_fb_input_threshold_click_get(Ecore_Fb_Input_Device *dev);
133/* ecore_fb.c */
88EAPI int ecore_fb_init(const char *name); 134EAPI int ecore_fb_init(const char *name);
89EAPI int ecore_fb_shutdown(void); 135EAPI int ecore_fb_shutdown(void);
90
91EAPI void ecore_fb_double_click_time_set(double t);
92EAPI double ecore_fb_double_click_time_get(void);
93
94EAPI void ecore_fb_size_get(int *w, int *h); 136EAPI void ecore_fb_size_get(int *w, int *h);
95 137
138/* DEPRECATED */
139#if 0
96EAPI void ecore_fb_touch_screen_calibrate_set(int xscale, int xtrans, int yscale, int ytrans, int xyswap); 140EAPI void ecore_fb_touch_screen_calibrate_set(int xscale, int xtrans, int yscale, int ytrans, int xyswap);
97EAPI void ecore_fb_touch_screen_calibrate_get(int *xscale, int *xtrans, int *yscale, int *ytrans, int *xyswap); 141EAPI void ecore_fb_touch_screen_calibrate_get(int *xscale, int *xtrans, int *yscale, int *ytrans, int *xyswap);
98 142
@@ -109,9 +153,7 @@ EAPI void ecore_fb_contrast_set(double cr);
109EAPI double ecore_fb_contrast_get(void); 153EAPI double ecore_fb_contrast_get(void);
110 154
111EAPI double ecore_fb_light_sensor_get(void); 155EAPI double ecore_fb_light_sensor_get(void);
112 156#endif
113EAPI void ecore_fb_callback_gain_set(void (*func) (void *data), void *data);
114EAPI void ecore_fb_callback_lose_set(void (*func) (void *data), void *data);
115 157
116#ifdef __cplusplus 158#ifdef __cplusplus
117} 159}