diff options
81 files changed, 233 insertions, 231 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index 74535bfb0c..c8371a71aa 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -146,8 +146,8 @@ metadata/asap.c | |||
146 | #ifdef HAVE_TAGCACHE | 146 | #ifdef HAVE_TAGCACHE |
147 | tagcache.c | 147 | tagcache.c |
148 | #endif | 148 | #endif |
149 | #ifdef HAVE_TOUCHPAD | 149 | #ifdef HAVE_TOUCHSCREEN |
150 | keymaps/keymap-touchpad.c | 150 | keymaps/keymap-touchscreen.c |
151 | #endif | 151 | #endif |
152 | #if (CONFIG_KEYPAD == IRIVER_H100_PAD) \ | 152 | #if (CONFIG_KEYPAD == IRIVER_H100_PAD) \ |
153 | || (CONFIG_KEYPAD == IRIVER_H300_PAD) | 153 | || (CONFIG_KEYPAD == IRIVER_H300_PAD) |
diff --git a/apps/action.c b/apps/action.c index b1dd98df08..5ceeeb896f 100644 --- a/apps/action.c +++ b/apps/action.c | |||
@@ -39,7 +39,7 @@ static intptr_t last_data = 0; | |||
39 | static int last_action = ACTION_NONE; | 39 | static int last_action = ACTION_NONE; |
40 | static bool repeated = false; | 40 | static bool repeated = false; |
41 | 41 | ||
42 | #ifdef HAVE_TOUCHPAD | 42 | #ifdef HAVE_TOUCHSCREEN |
43 | static bool short_press = false; | 43 | static bool short_press = false; |
44 | #endif | 44 | #endif |
45 | 45 | ||
@@ -145,12 +145,12 @@ static int get_action_worker(int context, int timeout, | |||
145 | return ACTION_NONE; /* "safest" return value */ | 145 | return ACTION_NONE; /* "safest" return value */ |
146 | } | 146 | } |
147 | last_context = context; | 147 | last_context = context; |
148 | #ifdef HAVE_TOUCHPAD | 148 | #ifdef HAVE_TOUCHSCREEN |
149 | if (button & BUTTON_TOUCHPAD) | 149 | if (button & BUTTON_TOUCHSCREEN) |
150 | { | 150 | { |
151 | repeated = false; | 151 | repeated = false; |
152 | short_press = false; | 152 | short_press = false; |
153 | if (last_button & BUTTON_TOUCHPAD) | 153 | if (last_button & BUTTON_TOUCHSCREEN) |
154 | { | 154 | { |
155 | if ((button & BUTTON_REL) && | 155 | if ((button & BUTTON_REL) && |
156 | ((last_button & BUTTON_REPEAT)==0)) | 156 | ((last_button & BUTTON_REPEAT)==0)) |
@@ -161,7 +161,7 @@ static int get_action_worker(int context, int timeout, | |||
161 | repeated = true; | 161 | repeated = true; |
162 | } | 162 | } |
163 | last_button = button; | 163 | last_button = button; |
164 | return ACTION_TOUCHPAD; | 164 | return ACTION_TOUCHSCREEN; |
165 | } | 165 | } |
166 | #endif | 166 | #endif |
167 | #ifndef HAS_BUTTON_HOLD | 167 | #ifndef HAS_BUTTON_HOLD |
@@ -282,18 +282,18 @@ int get_action_statuscode(int *button) | |||
282 | return ret; | 282 | return ret; |
283 | } | 283 | } |
284 | 284 | ||
285 | #ifdef HAVE_TOUCHPAD | 285 | #ifdef HAVE_TOUCHSCREEN |
286 | /* return BUTTON_NONE on error | 286 | /* return BUTTON_NONE on error |
287 | * BUTTON_REPEAT if repeated press | 287 | * BUTTON_REPEAT if repeated press |
288 | * BUTTON_REPEAT|BUTTON_REL if release after repeated press | 288 | * BUTTON_REPEAT|BUTTON_REL if release after repeated press |
289 | * BUTTON_REL if its a short press = release after press | 289 | * BUTTON_REL if its a short press = release after press |
290 | * BUTTON_TOUCHPAD if press | 290 | * BUTTON_TOUCHSCREEN if press |
291 | */ | 291 | */ |
292 | int action_get_touchpad_press(short *x, short *y) | 292 | int action_get_touchscreen_press(short *x, short *y) |
293 | { | 293 | { |
294 | static int last_data = 0; | 294 | static int last_data = 0; |
295 | int data; | 295 | int data; |
296 | if ((last_button & BUTTON_TOUCHPAD) == 0) | 296 | if ((last_button & BUTTON_TOUCHSCREEN) == 0) |
297 | return BUTTON_NONE; | 297 | return BUTTON_NONE; |
298 | data = button_get_data(); | 298 | data = button_get_data(); |
299 | if (last_button & BUTTON_REL) | 299 | if (last_button & BUTTON_REL) |
@@ -314,6 +314,6 @@ int action_get_touchpad_press(short *x, short *y) | |||
314 | /* This is to return a BUTTON_REL after a BUTTON_REPEAT. */ | 314 | /* This is to return a BUTTON_REL after a BUTTON_REPEAT. */ |
315 | if (last_button & BUTTON_REL) | 315 | if (last_button & BUTTON_REL) |
316 | return BUTTON_REPEAT|BUTTON_REL; | 316 | return BUTTON_REPEAT|BUTTON_REL; |
317 | return BUTTON_TOUCHPAD; | 317 | return BUTTON_TOUCHSCREEN; |
318 | } | 318 | } |
319 | #endif | 319 | #endif |
diff --git a/apps/action.h b/apps/action.h index 94bf732ab6..743e1470dc 100644 --- a/apps/action.h +++ b/apps/action.h | |||
@@ -82,8 +82,8 @@ enum { | |||
82 | ACTION_NONE = BUTTON_NONE, | 82 | ACTION_NONE = BUTTON_NONE, |
83 | ACTION_UNKNOWN, | 83 | ACTION_UNKNOWN, |
84 | ACTION_REDRAW, /* returned if keys are locked and we splash()'ed */ | 84 | ACTION_REDRAW, /* returned if keys are locked and we splash()'ed */ |
85 | ACTION_TOUCHPAD, | 85 | ACTION_TOUCHSCREEN, |
86 | ACTION_TOUCHPAD_MODE, /* toggle the touchpad mode */ | 86 | ACTION_TOUCHSCREEN_MODE, /* toggle the touchscreen mode */ |
87 | 87 | ||
88 | /* standard actions, use these first */ | 88 | /* standard actions, use these first */ |
89 | ACTION_STD_PREV, | 89 | ACTION_STD_PREV, |
@@ -265,13 +265,13 @@ int get_action_statuscode(int *button); | |||
265 | BUTTON_NONE or flagged with SYS_EVENT */ | 265 | BUTTON_NONE or flagged with SYS_EVENT */ |
266 | intptr_t get_action_data(void); | 266 | intptr_t get_action_data(void); |
267 | 267 | ||
268 | #ifdef HAVE_TOUCHPAD | 268 | #ifdef HAVE_TOUCHSCREEN |
269 | /* return BUTTON_NONE on error | 269 | /* return BUTTON_NONE on error |
270 | BUTTON_REPEAT if repeated press | 270 | BUTTON_REPEAT if repeated press |
271 | BUTTON_REL if its a short press | 271 | BUTTON_REL if its a short press |
272 | BUTTON_TOUCHPAD otherwise | 272 | BUTTON_TOUCHSCREEN otherwise |
273 | */ | 273 | */ |
274 | int action_get_touchpad_press(short *x, short *y); | 274 | int action_get_touchscreen_press(short *x, short *y); |
275 | #endif | 275 | #endif |
276 | 276 | ||
277 | #endif /* __ACTION_H__ */ | 277 | #endif /* __ACTION_H__ */ |
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index 5a8bc69450..a3f5da92ea 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c | |||
@@ -285,17 +285,17 @@ void list_draw(struct screen *display, struct viewport *parent, | |||
285 | } | 285 | } |
286 | 286 | ||
287 | 287 | ||
288 | #if defined(HAVE_TOUCHPAD) | 288 | #if defined(HAVE_TOUCHSCREEN) |
289 | /* This needs to be fixed if we ever get more than 1 touchscreen on a target. | 289 | /* This needs to be fixed if we ever get more than 1 touchscreen on a target. |
290 | * This also assumes the whole screen is used, which is a bad assumption but | 290 | * This also assumes the whole screen is used, which is a bad assumption but |
291 | * fine until customizable lists comes in... | 291 | * fine until customizable lists comes in... |
292 | */ | 292 | */ |
293 | static bool scrolling=false; | 293 | static bool scrolling=false; |
294 | 294 | ||
295 | unsigned gui_synclist_do_touchpad(struct gui_synclist * gui_list, struct viewport *parent) | 295 | unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list, struct viewport *parent) |
296 | { | 296 | { |
297 | short x, y; | 297 | short x, y; |
298 | unsigned button = action_get_touchpad_press(&x, &y); | 298 | unsigned button = action_get_touchscreen_press(&x, &y); |
299 | int line; | 299 | int line; |
300 | struct screen *display = &screens[SCREEN_MAIN]; | 300 | struct screen *display = &screens[SCREEN_MAIN]; |
301 | if (button == BUTTON_NONE) | 301 | if (button == BUTTON_NONE) |
diff --git a/apps/gui/color_picker.c b/apps/gui/color_picker.c index 87af8ae3ed..d1ac2a9103 100644 --- a/apps/gui/color_picker.c +++ b/apps/gui/color_picker.c | |||
@@ -330,13 +330,13 @@ static void draw_screen(struct screen *display, char *title, | |||
330 | set_drawinfo(display, DRMODE_SOLID, text_color, background_color); | 330 | set_drawinfo(display, DRMODE_SOLID, text_color, background_color); |
331 | } | 331 | } |
332 | 332 | ||
333 | #ifdef HAVE_TOUCHPAD | 333 | #ifdef HAVE_TOUCHSCREEN |
334 | static int touchpad_slider(struct rgb_pick *rgb, int *selected_slider) | 334 | static int touchscreen_slider(struct rgb_pick *rgb, int *selected_slider) |
335 | { | 335 | { |
336 | short x,y; | 336 | short x,y; |
337 | int text_top,i,x1; | 337 | int text_top,i,x1; |
338 | int slider_left, slider_width; | 338 | int slider_left, slider_width; |
339 | unsigned button = action_get_touchpad_press(&x, &y); | 339 | unsigned button = action_get_touchscreen_press(&x, &y); |
340 | bool display_three_rows; | 340 | bool display_three_rows; |
341 | int max_label_width; | 341 | int max_label_width; |
342 | struct screen *display = &screens[SCREEN_MAIN]; | 342 | struct screen *display = &screens[SCREEN_MAIN]; |
@@ -426,9 +426,9 @@ bool set_color(struct screen *display, char *title, unsigned *color, | |||
426 | } | 426 | } |
427 | 427 | ||
428 | button = get_action(CONTEXT_SETTINGS_COLOURCHOOSER, TIMEOUT_BLOCK); | 428 | button = get_action(CONTEXT_SETTINGS_COLOURCHOOSER, TIMEOUT_BLOCK); |
429 | #ifdef HAVE_TOUCHPAD | 429 | #ifdef HAVE_TOUCHSCREEN |
430 | if (button == ACTION_TOUCHPAD) | 430 | if (button == ACTION_TOUCHSCREEN) |
431 | button = touchpad_slider(&rgb, &slider); | 431 | button = touchscreen_slider(&rgb, &slider); |
432 | #endif | 432 | #endif |
433 | 433 | ||
434 | switch (button) | 434 | switch (button) |
diff --git a/apps/gui/list.c b/apps/gui/list.c index 12ff929e8a..77ec090b04 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c | |||
@@ -576,9 +576,9 @@ void gui_synclist_speak_item(struct gui_synclist * lists) | |||
576 | } | 576 | } |
577 | 577 | ||
578 | extern intptr_t get_action_data(void); | 578 | extern intptr_t get_action_data(void); |
579 | #if defined(HAVE_TOUCHPAD) | 579 | #if defined(HAVE_TOUCHSCREEN) |
580 | /* this needs to be fixed if we ever get more than 1 touchscreen on a target */ | 580 | /* this needs to be fixed if we ever get more than 1 touchscreen on a target */ |
581 | unsigned gui_synclist_do_touchpad(struct gui_synclist * gui_list, struct viewport *parent); | 581 | unsigned gui_synclist_do_touchscreen(struct gui_synclist * gui_list, struct viewport *parent); |
582 | #endif | 582 | #endif |
583 | 583 | ||
584 | bool gui_synclist_do_button(struct gui_synclist * lists, | 584 | bool gui_synclist_do_button(struct gui_synclist * lists, |
@@ -619,9 +619,9 @@ bool gui_synclist_do_button(struct gui_synclist * lists, | |||
619 | } | 619 | } |
620 | #endif | 620 | #endif |
621 | 621 | ||
622 | #if defined(HAVE_TOUCHPAD) | 622 | #if defined(HAVE_TOUCHSCREEN) |
623 | if (action == ACTION_TOUCHPAD) | 623 | if (action == ACTION_TOUCHSCREEN) |
624 | action = *actionptr = gui_synclist_do_touchpad(lists, &parent[SCREEN_MAIN]); | 624 | action = *actionptr = gui_synclist_do_touchscreen(lists, &parent[SCREEN_MAIN]); |
625 | #endif | 625 | #endif |
626 | 626 | ||
627 | switch (wrap) | 627 | switch (wrap) |
diff --git a/apps/keymaps/keymap-touchpad.c b/apps/keymaps/keymap-touchscreen.c index b658fe48fe..a56eefd427 100644 --- a/apps/keymaps/keymap-touchpad.c +++ b/apps/keymaps/keymap-touchscreen.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | /* Button Code Definitions for touchpad targets */ | 22 | /* Button Code Definitions for touchscreen targets */ |
23 | #include <stdio.h> | 23 | #include <stdio.h> |
24 | #include <string.h> | 24 | #include <string.h> |
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
@@ -34,7 +34,7 @@ const struct button_mapping* target_get_context_mapping(int context); | |||
34 | get_context_mapping() at the bottom of the file is called by action.c as usual. | 34 | get_context_mapping() at the bottom of the file is called by action.c as usual. |
35 | if the context is for the remote control its then passed straight to | 35 | if the context is for the remote control its then passed straight to |
36 | target_get_context_mapping(). | 36 | target_get_context_mapping(). |
37 | These tables are only used for the touchpad buttons, so at the end of each | 37 | These tables are only used for the touchscreen buttons, so at the end of each |
38 | CONTEXT_CUSTOM2 is OR'ed with the context and then sent to target_get_context_mapping() | 38 | CONTEXT_CUSTOM2 is OR'ed with the context and then sent to target_get_context_mapping() |
39 | (NOTE: CONTEXT_CUSTOM2 will be stripped before being sent to make it easier.) | 39 | (NOTE: CONTEXT_CUSTOM2 will be stripped before being sent to make it easier.) |
40 | In the target keymap, remember to |CONTEXT_CUSTOM2 in the LAST_ITEM_IN_LIST__NEXTLIST() macro | 40 | In the target keymap, remember to |CONTEXT_CUSTOM2 in the LAST_ITEM_IN_LIST__NEXTLIST() macro |
@@ -43,7 +43,7 @@ const struct button_mapping* target_get_context_mapping(int context); | |||
43 | */ | 43 | */ |
44 | 44 | ||
45 | 45 | ||
46 | /* touchpad "buttons" | 46 | /* touchscreen "buttons" |
47 | screen is split into a 3x3 grid for buttons... | 47 | screen is split into a 3x3 grid for buttons... |
48 | BUTTON_TOPLEFT BUTTON_TOPMIDDLE BUTTON_TOPRIGHT | 48 | BUTTON_TOPLEFT BUTTON_TOPMIDDLE BUTTON_TOPRIGHT |
49 | BUTTON_MIDLEFT BUTTON_CENTER BUTTON_MIDRIGHT | 49 | BUTTON_MIDLEFT BUTTON_CENTER BUTTON_MIDRIGHT |
diff --git a/apps/main.c b/apps/main.c index 1f2625df6c..d59d17a5f1 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -131,8 +131,8 @@ static void app_main(void) | |||
131 | screens[i].update(); | 131 | screens[i].update(); |
132 | } | 132 | } |
133 | tree_gui_init(); | 133 | tree_gui_init(); |
134 | #ifdef HAVE_TOUCHPAD | 134 | #ifdef HAVE_TOUCHSCREEN |
135 | touchpad_set_mode(TOUCHPAD_BUTTON); | 135 | touchscreen_set_mode(TOUCHSCREEN_BUTTON); |
136 | #endif | 136 | #endif |
137 | root_menu(); | 137 | root_menu(); |
138 | } | 138 | } |
diff --git a/apps/plugin.c b/apps/plugin.c index 7f546011a9..6889248402 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -237,8 +237,8 @@ static const struct plugin_api rockbox_api = { | |||
237 | #ifdef HAS_BUTTON_HOLD | 237 | #ifdef HAS_BUTTON_HOLD |
238 | button_hold, | 238 | button_hold, |
239 | #endif | 239 | #endif |
240 | #ifdef HAVE_TOUCHPAD | 240 | #ifdef HAVE_TOUCHSCREEN |
241 | touchpad_set_mode, | 241 | touchscreen_set_mode, |
242 | #endif | 242 | #endif |
243 | 243 | ||
244 | #ifdef HAVE_BUTTON_LIGHT | 244 | #ifdef HAVE_BUTTON_LIGHT |
diff --git a/apps/plugin.h b/apps/plugin.h index fa5993d97f..7ce91bbf99 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -345,8 +345,8 @@ struct plugin_api { | |||
345 | #ifdef HAS_BUTTON_HOLD | 345 | #ifdef HAS_BUTTON_HOLD |
346 | bool (*button_hold)(void); | 346 | bool (*button_hold)(void); |
347 | #endif | 347 | #endif |
348 | #ifdef HAVE_TOUCHPAD | 348 | #ifdef HAVE_TOUCHSCREEN |
349 | void (*touchpad_set_mode)(enum touchpad_mode); | 349 | void (*touchscreen_set_mode)(enum touchscreen_mode); |
350 | #endif | 350 | #endif |
351 | #ifdef HAVE_BUTTON_LIGHT | 351 | #ifdef HAVE_BUTTON_LIGHT |
352 | void (*buttonlight_set_timeout)(int value); | 352 | void (*buttonlight_set_timeout)(int value); |
diff --git a/apps/plugins/CATEGORIES b/apps/plugins/CATEGORIES index a8110593f0..1cf530b5af 100644 --- a/apps/plugins/CATEGORIES +++ b/apps/plugins/CATEGORIES | |||
@@ -89,7 +89,7 @@ test_fps,apps | |||
89 | test_grey,apps | 89 | test_grey,apps |
90 | test_sampr,apps | 90 | test_sampr,apps |
91 | test_scanrate,apps | 91 | test_scanrate,apps |
92 | test_touchpad,apps | 92 | test_touchscreen,apps |
93 | test_viewports,apps | 93 | test_viewports,apps |
94 | text_editor,apps | 94 | text_editor,apps |
95 | vbrfix,viewers | 95 | vbrfix,viewers |
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index 90e9b405c8..4361bbc491 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c | |||
@@ -154,7 +154,7 @@ PLUGIN_HEADER | |||
154 | #error No keymap defined! | 154 | #error No keymap defined! |
155 | #endif | 155 | #endif |
156 | 156 | ||
157 | #ifdef HAVE_TOUCHPAD | 157 | #ifdef HAVE_TOUCHSCREEN |
158 | #ifndef BATTERY_ON | 158 | #ifndef BATTERY_ON |
159 | #define BATTERY_ON BUTTON_CENTER | 159 | #define BATTERY_ON BUTTON_CENTER |
160 | #endif | 160 | #endif |
diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c index 7d69e8f602..e6a9fbd8cd 100644 --- a/apps/plugins/blackjack.c +++ b/apps/plugins/blackjack.c | |||
@@ -261,7 +261,7 @@ PLUGIN_HEADER | |||
261 | #error No keymap defined! | 261 | #error No keymap defined! |
262 | #endif | 262 | #endif |
263 | 263 | ||
264 | #ifdef HAVE_TOUCHPAD | 264 | #ifdef HAVE_TOUCHSCREEN |
265 | #ifndef BJACK_START | 265 | #ifndef BJACK_START |
266 | #define BJACK_START BUTTON_CENTER | 266 | #define BJACK_START BUTTON_CENTER |
267 | #endif | 267 | #endif |
@@ -1238,7 +1238,7 @@ static unsigned int blackjack_menu(struct game_context* bj) { | |||
1238 | rb->lcd_puts(0, 10, str); | 1238 | rb->lcd_puts(0, 10, str); |
1239 | #endif | 1239 | #endif |
1240 | 1240 | ||
1241 | #ifdef HAVE_TOUCHPAD | 1241 | #ifdef HAVE_TOUCHSCREEN |
1242 | rb->lcd_puts(0, 2, "LCD CENTRE to start & to hit"); | 1242 | rb->lcd_puts(0, 2, "LCD CENTRE to start & to hit"); |
1243 | rb->lcd_puts(0, 3, "LCD BOTTOMLEFT to stay"); | 1243 | rb->lcd_puts(0, 3, "LCD BOTTOMLEFT to stay"); |
1244 | rb->lcd_puts(0, 4, "LCD BOTTOMRIGHT to save/resume"); | 1244 | rb->lcd_puts(0, 4, "LCD BOTTOMRIGHT to save/resume"); |
diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c index bae5b8285b..65aaa3ef09 100644 --- a/apps/plugins/bounce.c +++ b/apps/plugins/bounce.c | |||
@@ -148,7 +148,7 @@ PLUGIN_HEADER | |||
148 | #error No keymap defined! | 148 | #error No keymap defined! |
149 | #endif | 149 | #endif |
150 | 150 | ||
151 | #ifdef HAVE_TOUCHPAD | 151 | #ifdef HAVE_TOUCHSCREEN |
152 | #ifndef BOUNCE_LEFT | 152 | #ifndef BOUNCE_LEFT |
153 | #define BOUNCE_LEFT BUTTON_MIDLEFT | 153 | #define BOUNCE_LEFT BUTTON_MIDLEFT |
154 | #endif | 154 | #endif |
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index c3cdcad967..d6b1827b94 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c | |||
@@ -173,7 +173,7 @@ PLUGIN_HEADER | |||
173 | #error No keymap defined! | 173 | #error No keymap defined! |
174 | #endif | 174 | #endif |
175 | 175 | ||
176 | #ifdef HAVE_TOUCHPAD | 176 | #ifdef HAVE_TOUCHSCREEN |
177 | #ifndef LEFT | 177 | #ifndef LEFT |
178 | #define LEFT BUTTON_MIDLEFT | 178 | #define LEFT BUTTON_MIDLEFT |
179 | #endif | 179 | #endif |
@@ -448,7 +448,7 @@ enum menu_items { | |||
448 | #endif | 448 | #endif |
449 | 449 | ||
450 | 450 | ||
451 | #ifdef HAVE_TOUCHPAD | 451 | #ifdef HAVE_TOUCHSCREEN |
452 | #include "lib/touchscreen.h" | 452 | #include "lib/touchscreen.h" |
453 | 453 | ||
454 | static struct ts_mapping main_menu_items[4] = | 454 | static struct ts_mapping main_menu_items[4] = |
@@ -1024,8 +1024,8 @@ int game_menu(int when) | |||
1024 | rb->lcd_update(); | 1024 | rb->lcd_update(); |
1025 | 1025 | ||
1026 | button = rb->button_get(true); | 1026 | button = rb->button_get(true); |
1027 | #ifdef HAVE_TOUCHPAD | 1027 | #ifdef HAVE_TOUCHSCREEN |
1028 | if(button & BUTTON_TOUCHPAD) | 1028 | if(button & BUTTON_TOUCHSCREEN) |
1029 | { | 1029 | { |
1030 | unsigned int result = touchscreen_map(&main_menu, rb->button_get_data() >> 16, rb->button_get_data() & 0xffff); | 1030 | unsigned int result = touchscreen_map(&main_menu, rb->button_get_data() >> 16, rb->button_get_data() & 0xffff); |
1031 | if(result != (unsigned)-1 && button & BUTTON_REL) | 1031 | if(result != (unsigned)-1 && button & BUTTON_REL) |
@@ -1176,8 +1176,8 @@ int help(int when) | |||
1176 | #ifdef RC_QUIT | 1176 | #ifdef RC_QUIT |
1177 | case RC_QUIT: | 1177 | case RC_QUIT: |
1178 | #endif | 1178 | #endif |
1179 | #ifdef HAVE_TOUCHPAD | 1179 | #ifdef HAVE_TOUCHSCREEN |
1180 | case BUTTON_TOUCHPAD: | 1180 | case BUTTON_TOUCHSCREEN: |
1181 | #endif | 1181 | #endif |
1182 | case QUIT: | 1182 | case QUIT: |
1183 | switch (game_menu(when)) { | 1183 | switch (game_menu(when)) { |
@@ -1871,8 +1871,8 @@ int game_loop(void) | |||
1871 | button = QUIT; | 1871 | button = QUIT; |
1872 | #endif | 1872 | #endif |
1873 | 1873 | ||
1874 | #ifdef HAVE_TOUCHPAD | 1874 | #ifdef HAVE_TOUCHSCREEN |
1875 | if(button & BUTTON_TOUCHPAD) | 1875 | if(button & BUTTON_TOUCHSCREEN) |
1876 | { | 1876 | { |
1877 | short touch_x, touch_y; | 1877 | short touch_x, touch_y; |
1878 | touch_x = rb->button_get_data() >> 16; | 1878 | touch_x = rb->button_get_data() >> 16; |
@@ -1936,7 +1936,7 @@ int game_loop(void) | |||
1936 | pad_pos_x-=8; | 1936 | pad_pos_x-=8; |
1937 | } | 1937 | } |
1938 | } | 1938 | } |
1939 | #ifdef HAVE_TOUCHPAD | 1939 | #ifdef HAVE_TOUCHSCREEN |
1940 | } | 1940 | } |
1941 | #endif | 1941 | #endif |
1942 | 1942 | ||
diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c index cbbbeaa293..3a3947d81a 100644 --- a/apps/plugins/calculator.c +++ b/apps/plugins/calculator.c | |||
@@ -265,7 +265,7 @@ PLUGIN_HEADER | |||
265 | #error No keymap defined! | 265 | #error No keymap defined! |
266 | #endif | 266 | #endif |
267 | 267 | ||
268 | #ifdef HAVE_TOUCHPAD | 268 | #ifdef HAVE_TOUCHSCREEN |
269 | #ifndef CALCULATOR_LEFT | 269 | #ifndef CALCULATOR_LEFT |
270 | #define CALCULATOR_LEFT BUTTON_MIDLEFT | 270 | #define CALCULATOR_LEFT BUTTON_MIDLEFT |
271 | #endif | 271 | #endif |
@@ -1549,8 +1549,8 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
1549 | 1549 | ||
1550 | while (calStatus != cal_exit ) { | 1550 | while (calStatus != cal_exit ) { |
1551 | btn = rb->button_get_w_tmo(HZ/2); | 1551 | btn = rb->button_get_w_tmo(HZ/2); |
1552 | #ifdef HAVE_TOUCHPAD | 1552 | #ifdef HAVE_TOUCHSCREEN |
1553 | if(btn & BUTTON_TOUCHPAD) | 1553 | if(btn & BUTTON_TOUCHSCREEN) |
1554 | { | 1554 | { |
1555 | struct ts_raster_result res; | 1555 | struct ts_raster_result res; |
1556 | if(touchscreen_map_raster(&calc_raster, rb->button_get_data() >> 16, rb->button_get_data() & 0xffff, &res) == 1) | 1556 | if(touchscreen_map_raster(&calc_raster, rb->button_get_data() >> 16, rb->button_get_data() & 0xffff, &res) == 1) |
@@ -1575,7 +1575,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
1575 | sciButtonsProcess(); | 1575 | sciButtonsProcess(); |
1576 | break; | 1576 | break; |
1577 | } | 1577 | } |
1578 | btn = BUTTON_TOUCHPAD; | 1578 | btn = BUTTON_TOUCHSCREEN; |
1579 | } | 1579 | } |
1580 | } | 1580 | } |
1581 | } | 1581 | } |
diff --git a/apps/plugins/chessbox/chessbox_pgn.h b/apps/plugins/chessbox/chessbox_pgn.h index 48357ee5fa..2054316770 100644 --- a/apps/plugins/chessbox/chessbox_pgn.h +++ b/apps/plugins/chessbox/chessbox_pgn.h | |||
@@ -274,7 +274,7 @@ | |||
274 | #error No keymap defined! | 274 | #error No keymap defined! |
275 | #endif | 275 | #endif |
276 | 276 | ||
277 | #ifdef HAVE_TOUCHPAD | 277 | #ifdef HAVE_TOUCHSCREEN |
278 | #ifndef CB_LEVEL | 278 | #ifndef CB_LEVEL |
279 | #define CB_LEVEL BUTTON_TOPLEFT | 279 | #define CB_LEVEL BUTTON_TOPLEFT |
280 | #endif | 280 | #endif |
diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c index d808956f9d..b4d2ed0547 100644 --- a/apps/plugins/chessclock.c +++ b/apps/plugins/chessclock.c | |||
@@ -194,7 +194,7 @@ PLUGIN_HEADER | |||
194 | #error No keymap defined! | 194 | #error No keymap defined! |
195 | #endif | 195 | #endif |
196 | 196 | ||
197 | #ifdef HAVE_TOUCHPAD | 197 | #ifdef HAVE_TOUCHSCREEN |
198 | #ifndef CHC_SETTINGS_OK | 198 | #ifndef CHC_SETTINGS_OK |
199 | #define CHC_SETTINGS_OK BUTTON_CENTER | 199 | #define CHC_SETTINGS_OK BUTTON_CENTER |
200 | #endif | 200 | #endif |
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c index 6bddfa23c6..be624ed711 100644 --- a/apps/plugins/chip8.c +++ b/apps/plugins/chip8.c | |||
@@ -1086,7 +1086,7 @@ STATIC void chip8 (void) | |||
1086 | #error No keymap defined! | 1086 | #error No keymap defined! |
1087 | #endif | 1087 | #endif |
1088 | 1088 | ||
1089 | #ifdef HAVE_TOUCHPAD | 1089 | #ifdef HAVE_TOUCHSCREEN |
1090 | #ifndef CHIP8_OFF | 1090 | #ifndef CHIP8_OFF |
1091 | #define CHIP8_OFF BUTTON_TOPLEFT | 1091 | #define CHIP8_OFF BUTTON_TOPLEFT |
1092 | #endif | 1092 | #endif |
diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c index 9b854ae0e1..c61d012898 100644 --- a/apps/plugins/chopper.c +++ b/apps/plugins/chopper.c | |||
@@ -112,7 +112,7 @@ Still To do: | |||
112 | #error No keymap defined! | 112 | #error No keymap defined! |
113 | #endif | 113 | #endif |
114 | 114 | ||
115 | #ifdef HAVE_TOUCHPAD | 115 | #ifdef HAVE_TOUCHSCREEN |
116 | #ifndef QUIT | 116 | #ifndef QUIT |
117 | #define QUIT BUTTON_TOPLEFT | 117 | #define QUIT BUTTON_TOPLEFT |
118 | #endif | 118 | #endif |
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c index 55721fb6c2..35737a65b3 100644 --- a/apps/plugins/cube.c +++ b/apps/plugins/cube.c | |||
@@ -250,7 +250,7 @@ PLUGIN_HEADER | |||
250 | #error No keymap defined! | 250 | #error No keymap defined! |
251 | #endif | 251 | #endif |
252 | 252 | ||
253 | #ifdef HAVE_TOUCHPAD | 253 | #ifdef HAVE_TOUCHSCREEN |
254 | // not enough touchfields, so CUBE_QUIT have to be | 254 | // not enough touchfields, so CUBE_QUIT have to be |
255 | // mapped to a real button | 255 | // mapped to a real button |
256 | //ifndef CUBE_QUIT | 256 | //ifndef CUBE_QUIT |
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c index cb6d967b0c..58be699a5f 100644 --- a/apps/plugins/doom/i_video.c +++ b/apps/plugins/doom/i_video.c | |||
@@ -272,7 +272,7 @@ void I_ShutdownGraphics(void) | |||
272 | #error Keymap not defined! | 272 | #error Keymap not defined! |
273 | #endif | 273 | #endif |
274 | 274 | ||
275 | #ifdef HAVE_TOUCHPAD | 275 | #ifdef HAVE_TOUCHSCREEN |
276 | #ifndef DOOMBUTTON_UP | 276 | #ifndef DOOMBUTTON_UP |
277 | #define DOOMBUTTON_UP BUTTON_TOPMIDDLE | 277 | #define DOOMBUTTON_UP BUTTON_TOPMIDDLE |
278 | #endif | 278 | #endif |
diff --git a/apps/plugins/fireworks.c b/apps/plugins/fireworks.c index f3beb6532a..43cd04a985 100644 --- a/apps/plugins/fireworks.c +++ b/apps/plugins/fireworks.c | |||
@@ -77,7 +77,7 @@ static const struct plugin_api* rb; | |||
77 | #error No keymap defined! | 77 | #error No keymap defined! |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | #ifdef HAVE_TOUCHPAD | 80 | #ifdef HAVE_TOUCHSCREEN |
81 | #ifndef BTN_MENU | 81 | #ifndef BTN_MENU |
82 | #define BTN_MENU (BUTTON_TOPLEFT|BUTTON_REL) | 82 | #define BTN_MENU (BUTTON_TOPLEFT|BUTTON_REL) |
83 | #endif | 83 | #endif |
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c index 9d3a9a25f4..6eff1472df 100644 --- a/apps/plugins/flipit.c +++ b/apps/plugins/flipit.c | |||
@@ -216,7 +216,7 @@ PLUGIN_HEADER | |||
216 | #error No keymap defined! | 216 | #error No keymap defined! |
217 | #endif | 217 | #endif |
218 | 218 | ||
219 | #ifdef HAVE_TOUCHPAD | 219 | #ifdef HAVE_TOUCHSCREEN |
220 | #ifndef FLIPIT_LEFT | 220 | #ifndef FLIPIT_LEFT |
221 | #define FLIPIT_LEFT BUTTON_MIDLEFT | 221 | #define FLIPIT_LEFT BUTTON_MIDLEFT |
222 | #endif | 222 | #endif |
@@ -675,7 +675,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
675 | rb->lcd_putsxy(2, 48, "[MENU] step by step"); | 675 | rb->lcd_putsxy(2, 48, "[MENU] step by step"); |
676 | #endif | 676 | #endif |
677 | 677 | ||
678 | #ifdef HAVE_TOUCHPAD | 678 | #ifdef HAVE_TOUCHSCREEN |
679 | rb->lcd_putsxy(2, 8, "[BOTTOMLEFT] to stop"); | 679 | rb->lcd_putsxy(2, 8, "[BOTTOMLEFT] to stop"); |
680 | rb->lcd_putsxy(2, 18, "[CENTRE] toggle"); | 680 | rb->lcd_putsxy(2, 18, "[CENTRE] toggle"); |
681 | rb->lcd_putsxy(2, 28, "[TOPRIGHT] shuffle"); | 681 | rb->lcd_putsxy(2, 28, "[TOPRIGHT] shuffle"); |
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c index 44094c254b..a46580ad95 100644 --- a/apps/plugins/invadrox.c +++ b/apps/plugins/invadrox.c | |||
@@ -124,7 +124,7 @@ PLUGIN_HEADER | |||
124 | #error INVADROX: Unsupported keypad | 124 | #error INVADROX: Unsupported keypad |
125 | #endif | 125 | #endif |
126 | 126 | ||
127 | #ifdef HAVE_TOUCHPAD | 127 | #ifdef HAVE_TOUCHSCREEN |
128 | #ifndef QUIT | 128 | #ifndef QUIT |
129 | #define QUIT BUTTON_TOPLEFT | 129 | #define QUIT BUTTON_TOPLEFT |
130 | #endif | 130 | #endif |
diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index 7f4cd4bd41..6f547fdf39 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c | |||
@@ -157,7 +157,7 @@ PLUGIN_HEADER | |||
157 | #error No keymap defined! | 157 | #error No keymap defined! |
158 | #endif | 158 | #endif |
159 | 159 | ||
160 | #ifdef HAVE_TOUCHPAD | 160 | #ifdef HAVE_TOUCHSCREEN |
161 | #ifndef JEWELS_UP | 161 | #ifndef JEWELS_UP |
162 | #define JEWELS_UP BUTTON_TOPMIDDLE | 162 | #define JEWELS_UP BUTTON_TOPMIDDLE |
163 | #endif | 163 | #endif |
@@ -1610,7 +1610,7 @@ static int jewels_main(struct game_context* bj) { | |||
1610 | #warning: missing help text. | 1610 | #warning: missing help text. |
1611 | #endif | 1611 | #endif |
1612 | 1612 | ||
1613 | #ifdef HAVE_TOUCHPAD | 1613 | #ifdef HAVE_TOUCHSCREEN |
1614 | rb->lcd_puts(0, 2, "Swap pairs of jewels to"); | 1614 | rb->lcd_puts(0, 2, "Swap pairs of jewels to"); |
1615 | rb->lcd_puts(0, 3, "form connected segments"); | 1615 | rb->lcd_puts(0, 3, "form connected segments"); |
1616 | rb->lcd_puts(0, 4, "of three or more of the"); | 1616 | rb->lcd_puts(0, 4, "of three or more of the"); |
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index ffc9d49a98..142e982d0b 100644 --- a/apps/plugins/jpeg.c +++ b/apps/plugins/jpeg.c | |||
@@ -218,7 +218,7 @@ PLUGIN_HEADER | |||
218 | #error No keymap defined! | 218 | #error No keymap defined! |
219 | #endif | 219 | #endif |
220 | 220 | ||
221 | #ifdef HAVE_TOUCHPAD | 221 | #ifdef HAVE_TOUCHSCREEN |
222 | #ifndef JPEG_UP | 222 | #ifndef JPEG_UP |
223 | #define JPEG_UP BUTTON_TOPMIDDLE | 223 | #define JPEG_UP BUTTON_TOPMIDDLE |
224 | #endif | 224 | #endif |
diff --git a/apps/plugins/lamp.c b/apps/plugins/lamp.c index 8a673944bc..a938d7a7f2 100644 --- a/apps/plugins/lamp.c +++ b/apps/plugins/lamp.c | |||
@@ -79,7 +79,7 @@ PLUGIN_HEADER | |||
79 | #endif | 79 | #endif |
80 | #endif | 80 | #endif |
81 | 81 | ||
82 | #ifdef HAVE_TOUCHPAD | 82 | #ifdef HAVE_TOUCHSCREEN |
83 | # ifndef LAMP_LEFT | 83 | # ifndef LAMP_LEFT |
84 | # define LAMP_LEFT BUTTON_MIDLEFT | 84 | # define LAMP_LEFT BUTTON_MIDLEFT |
85 | # endif | 85 | # endif |
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES index 775db0587e..d21f21af15 100644 --- a/apps/plugins/lib/SOURCES +++ b/apps/plugins/lib/SOURCES | |||
@@ -39,7 +39,7 @@ bmp_smooth_scale.c | |||
39 | #endif | 39 | #endif |
40 | pluginlib_actions.c | 40 | pluginlib_actions.c |
41 | helper.c | 41 | helper.c |
42 | #ifdef HAVE_TOUCHPAD | 42 | #ifdef HAVE_TOUCHSCREEN |
43 | touchscreen.c | 43 | touchscreen.c |
44 | #endif | 44 | #endif |
45 | md5.c | 45 | md5.c |
diff --git a/apps/plugins/lib/pluginlib_actions.c b/apps/plugins/lib/pluginlib_actions.c index 996e2178b4..a6bf28302f 100644 --- a/apps/plugins/lib/pluginlib_actions.c +++ b/apps/plugins/lib/pluginlib_actions.c | |||
@@ -67,7 +67,7 @@ const struct button_mapping remote_directions[] = | |||
67 | 67 | ||
68 | const struct button_mapping generic_directions[] = | 68 | const struct button_mapping generic_directions[] = |
69 | { | 69 | { |
70 | #ifdef HAVE_TOUCHPAD | 70 | #ifdef HAVE_TOUCHSCREEN |
71 | { PLA_UP, BUTTON_TOPMIDDLE, BUTTON_NONE}, | 71 | { PLA_UP, BUTTON_TOPMIDDLE, BUTTON_NONE}, |
72 | { PLA_DOWN, BUTTON_BOTTOMMIDDLE, BUTTON_NONE}, | 72 | { PLA_DOWN, BUTTON_BOTTOMMIDDLE, BUTTON_NONE}, |
73 | { PLA_LEFT, BUTTON_MIDLEFT, BUTTON_NONE}, | 73 | { PLA_LEFT, BUTTON_MIDLEFT, BUTTON_NONE}, |
@@ -162,7 +162,7 @@ const struct button_mapping generic_directions[] = | |||
162 | 162 | ||
163 | const struct button_mapping generic_left_right_fire[] = | 163 | const struct button_mapping generic_left_right_fire[] = |
164 | { | 164 | { |
165 | #ifdef HAVE_TOUCHPAD | 165 | #ifdef HAVE_TOUCHSCREEN |
166 | { PLA_LEFT, BUTTON_MIDLEFT, BUTTON_NONE}, | 166 | { PLA_LEFT, BUTTON_MIDLEFT, BUTTON_NONE}, |
167 | { PLA_LEFT_REPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE}, | 167 | { PLA_LEFT_REPEAT, BUTTON_MIDLEFT|BUTTON_REPEAT, BUTTON_NONE}, |
168 | { PLA_RIGHT, BUTTON_MIDRIGHT, BUTTON_NONE}, | 168 | { PLA_RIGHT, BUTTON_MIDRIGHT, BUTTON_NONE}, |
@@ -266,7 +266,7 @@ const struct button_mapping generic_left_right_fire[] = | |||
266 | /* these were taken from the bubbles plugin, so may need tweaking */ | 266 | /* these were taken from the bubbles plugin, so may need tweaking */ |
267 | const struct button_mapping generic_actions[] = | 267 | const struct button_mapping generic_actions[] = |
268 | { | 268 | { |
269 | #ifdef HAVE_TOUCHPAD | 269 | #ifdef HAVE_TOUCHSCREEN |
270 | {PLA_QUIT, BUTTON_BOTTOMRIGHT, BUTTON_NONE}, | 270 | {PLA_QUIT, BUTTON_BOTTOMRIGHT, BUTTON_NONE}, |
271 | {PLA_START, BUTTON_CENTER, BUTTON_NONE}, | 271 | {PLA_START, BUTTON_CENTER, BUTTON_NONE}, |
272 | {PLA_MENU, BUTTON_TOPLEFT, BUTTON_NONE}, | 272 | {PLA_MENU, BUTTON_TOPLEFT, BUTTON_NONE}, |
@@ -399,7 +399,7 @@ const struct button_mapping generic_actions[] = | |||
399 | 399 | ||
400 | const struct button_mapping generic_increase_decrease[] = | 400 | const struct button_mapping generic_increase_decrease[] = |
401 | { | 401 | { |
402 | #ifdef HAVE_TOUCHPAD | 402 | #ifdef HAVE_TOUCHSCREEN |
403 | {PLA_INC, BUTTON_TOPMIDDLE, BUTTON_NONE}, | 403 | {PLA_INC, BUTTON_TOPMIDDLE, BUTTON_NONE}, |
404 | {PLA_DEC, BUTTON_BOTTOMMIDDLE, BUTTON_NONE}, | 404 | {PLA_DEC, BUTTON_BOTTOMMIDDLE, BUTTON_NONE}, |
405 | {PLA_INC_REPEAT, BUTTON_TOPMIDDLE|BUTTON_REPEAT, BUTTON_NONE}, | 405 | {PLA_INC_REPEAT, BUTTON_TOPMIDDLE|BUTTON_REPEAT, BUTTON_NONE}, |
diff --git a/apps/plugins/lib/touchscreen.c b/apps/plugins/lib/touchscreen.c index cda2f46f1e..5b7517349a 100644 --- a/apps/plugins/lib/touchscreen.c +++ b/apps/plugins/lib/touchscreen.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #include "plugin.h" | 22 | #include "plugin.h" |
23 | 23 | ||
24 | #ifdef HAVE_TOUCHPAD | 24 | #ifdef HAVE_TOUCHSCREEN |
25 | 25 | ||
26 | #include "touchscreen.h" | 26 | #include "touchscreen.h" |
27 | 27 | ||
@@ -132,4 +132,4 @@ struct ts_raster_button_result touchscreen_raster_map_button(struct ts_raster_bu | |||
132 | return ret; | 132 | return ret; |
133 | } | 133 | } |
134 | 134 | ||
135 | #endif /* HAVE_TOUCHPAD */ | 135 | #endif /* HAVE_TOUCHSCREEN */ |
diff --git a/apps/plugins/lib/touchscreen.h b/apps/plugins/lib/touchscreen.h index 7050db669b..cd5251e46f 100644 --- a/apps/plugins/lib/touchscreen.h +++ b/apps/plugins/lib/touchscreen.h | |||
@@ -22,7 +22,9 @@ | |||
22 | #ifndef _PLUGIN_LIB_TOUCHSCREEN_H_ | 22 | #ifndef _PLUGIN_LIB_TOUCHSCREEN_H_ |
23 | #define _PLUGIN_LIB_TOUCHSCREEN_H_ | 23 | #define _PLUGIN_LIB_TOUCHSCREEN_H_ |
24 | 24 | ||
25 | #ifdef HAVE_TOUCHPAD | 25 | #include "plugin.h" |
26 | |||
27 | #ifdef HAVE_TOUCHSCREEN | ||
26 | 28 | ||
27 | struct ts_mapping | 29 | struct ts_mapping |
28 | { | 30 | { |
@@ -88,5 +90,5 @@ struct ts_raster_button_result | |||
88 | 90 | ||
89 | struct ts_raster_button_result touchscreen_raster_map_button(struct ts_raster_button_mapping *map, int x, int y, int button); | 91 | struct ts_raster_button_result touchscreen_raster_map_button(struct ts_raster_button_mapping *map, int x, int y, int button); |
90 | 92 | ||
91 | #endif /* HAVE_TOUCHPAD */ | 93 | #endif /* HAVE_TOUCHSCREEN */ |
92 | #endif /* _PLUGIN_LIB_TOUCHSCREEN_H_ */ | 94 | #endif /* _PLUGIN_LIB_TOUCHSCREEN_H_ */ |
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c index dd03dd800c..779ce8845d 100644 --- a/apps/plugins/logo.c +++ b/apps/plugins/logo.c | |||
@@ -160,7 +160,7 @@ const unsigned char rockbox16x7[] = { | |||
160 | #endif | 160 | #endif |
161 | #endif /* CONFIG_REMOTE_KEYPAD */ | 161 | #endif /* CONFIG_REMOTE_KEYPAD */ |
162 | 162 | ||
163 | #ifdef HAVE_TOUCHPAD | 163 | #ifdef HAVE_TOUCHSCREEN |
164 | #ifndef LP_QUIT | 164 | #ifndef LP_QUIT |
165 | #define LP_QUIT BUTTON_TOPLEFT | 165 | #define LP_QUIT BUTTON_TOPLEFT |
166 | #endif | 166 | #endif |
diff --git a/apps/plugins/mandelbrot.c b/apps/plugins/mandelbrot.c index e4e83111e3..ca7f708fc8 100644 --- a/apps/plugins/mandelbrot.c +++ b/apps/plugins/mandelbrot.c | |||
@@ -227,7 +227,7 @@ PLUGIN_HEADER | |||
227 | #error No keymap defined! | 227 | #error No keymap defined! |
228 | #endif | 228 | #endif |
229 | 229 | ||
230 | #ifdef HAVE_TOUCHPAD | 230 | #ifdef HAVE_TOUCHSCREEN |
231 | #ifndef MANDELBROT_UP | 231 | #ifndef MANDELBROT_UP |
232 | #define MANDELBROT_UP BUTTON_TOPMIDDLE | 232 | #define MANDELBROT_UP BUTTON_TOPMIDDLE |
233 | #endif | 233 | #endif |
diff --git a/apps/plugins/matrix.c b/apps/plugins/matrix.c index 2b63be90e7..fe54b2938a 100644 --- a/apps/plugins/matrix.c +++ b/apps/plugins/matrix.c | |||
@@ -103,7 +103,7 @@ extern const fb_data matrix_normal[]; | |||
103 | #error Unsupported keypad | 103 | #error Unsupported keypad |
104 | #endif | 104 | #endif |
105 | 105 | ||
106 | #ifdef HAVE_TOUCHPAD | 106 | #ifdef HAVE_TOUCHSCREEN |
107 | #ifndef MATRIX_EXIT | 107 | #ifndef MATRIX_EXIT |
108 | #define MATRIX_EXIT BUTTON_TOPLEFT | 108 | #define MATRIX_EXIT BUTTON_TOPLEFT |
109 | #endif | 109 | #endif |
diff --git a/apps/plugins/midi/midiplay.c b/apps/plugins/midi/midiplay.c index a394aaccb1..d76e0382ad 100644 --- a/apps/plugins/midi/midiplay.c +++ b/apps/plugins/midi/midiplay.c | |||
@@ -154,7 +154,7 @@ PLUGIN_IRAM_DECLARE | |||
154 | #error No keymap defined! | 154 | #error No keymap defined! |
155 | #endif | 155 | #endif |
156 | 156 | ||
157 | #ifdef HAVE_TOUCHPAD | 157 | #ifdef HAVE_TOUCHSCREEN |
158 | #ifndef BTN_QUIT | 158 | #ifndef BTN_QUIT |
159 | #define BTN_QUIT BUTTON_TOPLEFT | 159 | #define BTN_QUIT BUTTON_TOPLEFT |
160 | #endif | 160 | #endif |
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c index 266d12fc8d..c37c9e8795 100644 --- a/apps/plugins/minesweeper.c +++ b/apps/plugins/minesweeper.c | |||
@@ -192,7 +192,7 @@ enum minesweeper_status { | |||
192 | #error No keymap defined! | 192 | #error No keymap defined! |
193 | #endif | 193 | #endif |
194 | 194 | ||
195 | #ifdef HAVE_TOUCHPAD | 195 | #ifdef HAVE_TOUCHSCREEN |
196 | #ifndef MINESWP_QUIT | 196 | #ifndef MINESWP_QUIT |
197 | # define MINESWP_QUIT BUTTON_TOPLEFT | 197 | # define MINESWP_QUIT BUTTON_TOPLEFT |
198 | #endif | 198 | #endif |
@@ -305,7 +305,7 @@ int stack_pos = 0; | |||
305 | /* a usefull string for snprintf */ | 305 | /* a usefull string for snprintf */ |
306 | char str[30]; | 306 | char str[30]; |
307 | 307 | ||
308 | #ifdef HAVE_TOUCHPAD | 308 | #ifdef HAVE_TOUCHSCREEN |
309 | 309 | ||
310 | #include "lib/touchscreen.h" | 310 | #include "lib/touchscreen.h" |
311 | static struct ts_raster mine_raster = { 0, 0, MAX_WIDTH, MAX_HEIGHT, TileSize, TileSize }; | 311 | static struct ts_raster mine_raster = { 0, 0, MAX_WIDTH, MAX_HEIGHT, TileSize, TileSize }; |
@@ -485,7 +485,7 @@ void mine_show( void ) | |||
485 | button = rb->button_get(true); | 485 | button = rb->button_get(true); |
486 | while( ( button == BUTTON_NONE ) | 486 | while( ( button == BUTTON_NONE ) |
487 | || ( button & (BUTTON_REL|BUTTON_REPEAT) ) ); | 487 | || ( button & (BUTTON_REL|BUTTON_REPEAT) ) ); |
488 | #ifdef HAVE_TOUCHPAD | 488 | #ifdef HAVE_TOUCHSCREEN |
489 | button = BUTTON_NONE; | 489 | button = BUTTON_NONE; |
490 | #endif | 490 | #endif |
491 | } | 491 | } |
@@ -582,7 +582,7 @@ enum minesweeper_status minesweeper( void ) | |||
582 | top = (LCD_HEIGHT-height*TileSize)/2; | 582 | top = (LCD_HEIGHT-height*TileSize)/2; |
583 | left = (LCD_WIDTH-width*TileSize)/2; | 583 | left = (LCD_WIDTH-width*TileSize)/2; |
584 | 584 | ||
585 | #ifdef HAVE_TOUCHPAD | 585 | #ifdef HAVE_TOUCHSCREEN |
586 | mine_raster.tl_x = left; | 586 | mine_raster.tl_x = left; |
587 | mine_raster.tl_y = top; | 587 | mine_raster.tl_y = top; |
588 | mine_raster.width = width*TileSize; | 588 | mine_raster.width = width*TileSize; |
@@ -633,21 +633,21 @@ enum minesweeper_status minesweeper( void ) | |||
633 | rb->lcd_update(); | 633 | rb->lcd_update(); |
634 | 634 | ||
635 | button = rb->button_get(true); | 635 | button = rb->button_get(true); |
636 | #ifdef HAVE_TOUCHPAD | 636 | #ifdef HAVE_TOUCHSCREEN |
637 | if(button & BUTTON_TOUCHPAD) | 637 | if(button & BUTTON_TOUCHSCREEN) |
638 | { | 638 | { |
639 | struct ts_raster_result res; | 639 | struct ts_raster_result res; |
640 | if(touchscreen_map_raster(&mine_raster, rb->button_get_data() >> 16, rb->button_get_data() & 0xffff, &res) == 1) | 640 | if(touchscreen_map_raster(&mine_raster, rb->button_get_data() >> 16, rb->button_get_data() & 0xffff, &res) == 1) |
641 | { | 641 | { |
642 | button &= ~BUTTON_TOUCHPAD; | 642 | button &= ~BUTTON_TOUCHSCREEN; |
643 | lastbutton &= ~BUTTON_TOUCHPAD; | 643 | lastbutton &= ~BUTTON_TOUCHSCREEN; |
644 | 644 | ||
645 | if(button & BUTTON_REPEAT && lastbutton != MINESWP_TOGGLE && lastbutton ^ BUTTON_REPEAT) | 645 | if(button & BUTTON_REPEAT && lastbutton != MINESWP_TOGGLE && lastbutton ^ BUTTON_REPEAT) |
646 | button = MINESWP_TOGGLE; | 646 | button = MINESWP_TOGGLE; |
647 | else if(button == BUTTON_REL && lastbutton ^ BUTTON_REPEAT) | 647 | else if(button == BUTTON_REL && lastbutton ^ BUTTON_REPEAT) |
648 | button = MINESWP_DISCOVER; | 648 | button = MINESWP_DISCOVER; |
649 | else | 649 | else |
650 | button |= BUTTON_TOUCHPAD; | 650 | button |= BUTTON_TOUCHSCREEN; |
651 | 651 | ||
652 | x = res.x; | 652 | x = res.x; |
653 | y = res.y; | 653 | y = res.y; |
diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c index dbd647330f..b750efb6b3 100644 --- a/apps/plugins/mosaique.c +++ b/apps/plugins/mosaique.c | |||
@@ -131,7 +131,7 @@ PLUGIN_HEADER | |||
131 | #error No keymap defined! | 131 | #error No keymap defined! |
132 | #endif | 132 | #endif |
133 | 133 | ||
134 | #ifdef HAVE_TOUCHPAD | 134 | #ifdef HAVE_TOUCHSCREEN |
135 | #ifndef MOSAIQUE_QUIT | 135 | #ifndef MOSAIQUE_QUIT |
136 | #define MOSAIQUE_QUIT BUTTON_TOPLEFT | 136 | #define MOSAIQUE_QUIT BUTTON_TOPLEFT |
137 | #endif | 137 | #endif |
diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c index 0dce32e9df..1e159da2c8 100644 --- a/apps/plugins/mp3_encoder.c +++ b/apps/plugins/mp3_encoder.c | |||
@@ -2460,7 +2460,7 @@ void get_mp3_filename(const char *wav_name) | |||
2460 | #error No keymap defined! | 2460 | #error No keymap defined! |
2461 | #endif | 2461 | #endif |
2462 | 2462 | ||
2463 | #ifdef HAVE_TOUCHPAD | 2463 | #ifdef HAVE_TOUCHSCREEN |
2464 | #ifndef MP3ENC_PREV | 2464 | #ifndef MP3ENC_PREV |
2465 | #define MP3ENC_PREV BUTTON_MIDLEFT | 2465 | #define MP3ENC_PREV BUTTON_MIDLEFT |
2466 | #endif | 2466 | #endif |
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c index 17a1cbbb69..e53b37f810 100644 --- a/apps/plugins/mpegplayer/mpeg_settings.c +++ b/apps/plugins/mpegplayer/mpeg_settings.c | |||
@@ -128,7 +128,7 @@ struct mpeg_settings settings; | |||
128 | #error No keymap defined! | 128 | #error No keymap defined! |
129 | #endif | 129 | #endif |
130 | 130 | ||
131 | #ifdef HAVE_TOUCHPAD | 131 | #ifdef HAVE_TOUCHSCREEN |
132 | #ifndef MPEG_START_TIME_SELECT | 132 | #ifndef MPEG_START_TIME_SELECT |
133 | #define MPEG_START_TIME_SELECT BUTTON_CENTER | 133 | #define MPEG_START_TIME_SELECT BUTTON_CENTER |
134 | #endif | 134 | #endif |
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index c58a2f6d0f..fd6d3dbd1a 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c | |||
@@ -201,7 +201,7 @@ PLUGIN_IRAM_DECLARE | |||
201 | #elif CONFIG_KEYPAD == MROBE500_PAD | 201 | #elif CONFIG_KEYPAD == MROBE500_PAD |
202 | #define MPEG_MENU BUTTON_RC_HEART | 202 | #define MPEG_MENU BUTTON_RC_HEART |
203 | #define MPEG_STOP BUTTON_POWER | 203 | #define MPEG_STOP BUTTON_POWER |
204 | #define MPEG_PAUSE BUTTON_TOUCHPAD | 204 | #define MPEG_PAUSE BUTTON_TOUCHSCREEN |
205 | #define MPEG_VOLDOWN BUTTON_RC_VOL_DOWN | 205 | #define MPEG_VOLDOWN BUTTON_RC_VOL_DOWN |
206 | #define MPEG_VOLUP BUTTON_RC_VOL_UP | 206 | #define MPEG_VOLUP BUTTON_RC_VOL_UP |
207 | #define MPEG_RW BUTTON_RC_REW | 207 | #define MPEG_RW BUTTON_RC_REW |
@@ -235,7 +235,7 @@ PLUGIN_IRAM_DECLARE | |||
235 | #error No keymap defined! | 235 | #error No keymap defined! |
236 | #endif | 236 | #endif |
237 | 237 | ||
238 | #ifdef HAVE_TOUCHPAD | 238 | #ifdef HAVE_TOUCHSCREEN |
239 | #ifndef MPEG_MENU | 239 | #ifndef MPEG_MENU |
240 | #define MPEG_MENU (BUTTON_TOPRIGHT|BUTTON_REL) | 240 | #define MPEG_MENU (BUTTON_TOPRIGHT|BUTTON_REL) |
241 | #endif | 241 | #endif |
diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c index 76ff5f5744..9cb59a8fad 100644 --- a/apps/plugins/oscilloscope.c +++ b/apps/plugins/oscilloscope.c | |||
@@ -192,7 +192,7 @@ PLUGIN_HEADER | |||
192 | #error No keymap defined! | 192 | #error No keymap defined! |
193 | #endif | 193 | #endif |
194 | 194 | ||
195 | #ifdef HAVE_TOUCHPAD | 195 | #ifdef HAVE_TOUCHSCREEN |
196 | #ifndef OSCILLOSCOPE_QUIT | 196 | #ifndef OSCILLOSCOPE_QUIT |
197 | #define OSCILLOSCOPE_QUIT BUTTON_TOPLEFT | 197 | #define OSCILLOSCOPE_QUIT BUTTON_TOPLEFT |
198 | #endif | 198 | #endif |
diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h index 56e7600d58..4e51e3c868 100644 --- a/apps/plugins/pacbox/pacbox.h +++ b/apps/plugins/pacbox/pacbox.h | |||
@@ -153,7 +153,7 @@ | |||
153 | 153 | ||
154 | #endif | 154 | #endif |
155 | 155 | ||
156 | #ifdef HAVE_TOUCHPAD | 156 | #ifdef HAVE_TOUCHSCREEN |
157 | #ifndef PACMAN_UP | 157 | #ifndef PACMAN_UP |
158 | #define PACMAN_UP BUTTON_MIDRIGHT | 158 | #define PACMAN_UP BUTTON_MIDRIGHT |
159 | #endif | 159 | #endif |
diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c index 4ba8156e8b..04f5ba9273 100644 --- a/apps/plugins/pegbox.c +++ b/apps/plugins/pegbox.c | |||
@@ -282,7 +282,7 @@ PLUGIN_HEADER | |||
282 | #error Unsupported keymap! | 282 | #error Unsupported keymap! |
283 | #endif | 283 | #endif |
284 | 284 | ||
285 | #ifdef HAVE_TOUCHPAD | 285 | #ifdef HAVE_TOUCHSCREEN |
286 | #ifndef PEGBOX_QUIT | 286 | #ifndef PEGBOX_QUIT |
287 | #define PEGBOX_QUIT BUTTON_TOPLEFT | 287 | #define PEGBOX_QUIT BUTTON_TOPLEFT |
288 | #endif | 288 | #endif |
@@ -370,7 +370,7 @@ PLUGIN_HEADER | |||
370 | #define BOARD_Y 0 | 370 | #define BOARD_Y 0 |
371 | #endif | 371 | #endif |
372 | 372 | ||
373 | #ifdef HAVE_TOUCHPAD | 373 | #ifdef HAVE_TOUCHSCREEN |
374 | #include "lib/touchscreen.h" | 374 | #include "lib/touchscreen.h" |
375 | 375 | ||
376 | static struct ts_mapping main_menu_items[5] = | 376 | static struct ts_mapping main_menu_items[5] = |
@@ -385,7 +385,7 @@ static struct ts_mapping main_menu_items[5] = | |||
385 | #elif LCD_WIDTH > 112 | 385 | #elif LCD_WIDTH > 112 |
386 | 0, LCD_HEIGHT - 8, SYSFONT_WIDTH*28, SYSFONT_HEIGHT | 386 | 0, LCD_HEIGHT - 8, SYSFONT_WIDTH*28, SYSFONT_HEIGHT |
387 | #else | 387 | #else |
388 | #error "Touchpad isn't supported on non-bitmap screens!" | 388 | #error "Touchscreen isn't supported on non-bitmap screens!" |
389 | #endif | 389 | #endif |
390 | } | 390 | } |
391 | 391 | ||
@@ -640,8 +640,8 @@ static void display_text(char *str, bool waitkey) | |||
640 | key = rb->button_get(true); | 640 | key = rb->button_get(true); |
641 | switch (key) | 641 | switch (key) |
642 | { | 642 | { |
643 | #ifdef HAVE_TOUCHPAD | 643 | #ifdef HAVE_TOUCHSCREEN |
644 | case BUTTON_TOUCHPAD: | 644 | case BUTTON_TOUCHSCREEN: |
645 | #endif | 645 | #endif |
646 | case PEGBOX_QUIT: | 646 | case PEGBOX_QUIT: |
647 | case PEGBOX_LEFT: | 647 | case PEGBOX_LEFT: |
@@ -769,8 +769,8 @@ static void new_piece(struct game_context* pb, unsigned int x_loc, | |||
769 | while (!exit) { | 769 | while (!exit) { |
770 | draw_board(pb); | 770 | draw_board(pb); |
771 | button = rb->button_get(true); | 771 | button = rb->button_get(true); |
772 | #ifdef HAVE_TOUCHPAD | 772 | #ifdef HAVE_TOUCHSCREEN |
773 | if(button & BUTTON_TOUCHPAD) | 773 | if(button & BUTTON_TOUCHSCREEN) |
774 | { | 774 | { |
775 | pegbox_raster_btn.two_d_from.y = x_loc; | 775 | pegbox_raster_btn.two_d_from.y = x_loc; |
776 | pegbox_raster_btn.two_d_from.x = y_loc; | 776 | pegbox_raster_btn.two_d_from.x = y_loc; |
@@ -1107,8 +1107,8 @@ static unsigned int pegbox_menu(struct game_context* pb) { | |||
1107 | /* handle menu button presses */ | 1107 | /* handle menu button presses */ |
1108 | button = rb->button_get(true); | 1108 | button = rb->button_get(true); |
1109 | 1109 | ||
1110 | #ifdef HAVE_TOUCHPAD | 1110 | #ifdef HAVE_TOUCHSCREEN |
1111 | if(button & BUTTON_TOUCHPAD) | 1111 | if(button & BUTTON_TOUCHSCREEN) |
1112 | { | 1112 | { |
1113 | unsigned int result = touchscreen_map(&main_menu, rb->button_get_data() >> 16, rb->button_get_data() & 0xffff); | 1113 | unsigned int result = touchscreen_map(&main_menu, rb->button_get_data() >> 16, rb->button_get_data() & 0xffff); |
1114 | if(result != (unsigned)-1 && button & BUTTON_REL) | 1114 | if(result != (unsigned)-1 && button & BUTTON_REL) |
@@ -1240,8 +1240,8 @@ static int pegbox(struct game_context* pb) { | |||
1240 | 1240 | ||
1241 | while (true) { | 1241 | while (true) { |
1242 | temp_var = rb->button_get(true); | 1242 | temp_var = rb->button_get(true); |
1243 | #ifdef HAVE_TOUCHPAD | 1243 | #ifdef HAVE_TOUCHSCREEN |
1244 | if(temp_var & BUTTON_TOUCHPAD) | 1244 | if(temp_var & BUTTON_TOUCHSCREEN) |
1245 | { | 1245 | { |
1246 | pegbox_raster_btn.two_d_from.y = pb->player_row; | 1246 | pegbox_raster_btn.two_d_from.y = pb->player_row; |
1247 | pegbox_raster_btn.two_d_from.x = pb->player_col; | 1247 | pegbox_raster_btn.two_d_from.x = pb->player_col; |
diff --git a/apps/plugins/plasma.c b/apps/plugins/plasma.c index 35ce9daa83..e1527e1907 100644 --- a/apps/plugins/plasma.c +++ b/apps/plugins/plasma.c | |||
@@ -104,7 +104,7 @@ static int plasma_frequency; | |||
104 | 104 | ||
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | #ifdef HAVE_TOUCHPAD | 107 | #ifdef HAVE_TOUCHSCREEN |
108 | #ifndef PLASMA_QUIT | 108 | #ifndef PLASMA_QUIT |
109 | #define PLASMA_QUIT BUTTON_TOPLEFT | 109 | #define PLASMA_QUIT BUTTON_TOPLEFT |
110 | #endif | 110 | #endif |
@@ -114,7 +114,7 @@ static int plasma_frequency; | |||
114 | #ifndef PLASMA_DECREASE_FREQUENCY | 114 | #ifndef PLASMA_DECREASE_FREQUENCY |
115 | #define PLASMA_DECREASE_FREQUENCY BUTTON_MIDLEFT | 115 | #define PLASMA_DECREASE_FREQUENCY BUTTON_MIDLEFT |
116 | #endif | 116 | #endif |
117 | #endif /* HAVE_TOUCHPAD */ | 117 | #endif /* HAVE_TOUCHSCREEN */ |
118 | 118 | ||
119 | #ifndef PLASMA_QUIT | 119 | #ifndef PLASMA_QUIT |
120 | #define PLASMA_QUIT BUTTON_OFF | 120 | #define PLASMA_QUIT BUTTON_OFF |
@@ -147,11 +147,11 @@ static int plasma_frequency; | |||
147 | #elif CONFIG_KEYPAD == GIGABEAT_S_PAD | 147 | #elif CONFIG_KEYPAD == GIGABEAT_S_PAD |
148 | #define PLASMA_REGEN_COLORS BUTTON_SELECT | 148 | #define PLASMA_REGEN_COLORS BUTTON_SELECT |
149 | #endif | 149 | #endif |
150 | #ifdef HAVE_TOUCHPAD | 150 | #ifdef HAVE_TOUCHSCREEN |
151 | #ifndef PLASMA_REGEN_COLORS | 151 | #ifndef PLASMA_REGEN_COLORS |
152 | #define PLASMA_REGEN_COLORS BUTTON_CENTER | 152 | #define PLASMA_REGEN_COLORS BUTTON_CENTER |
153 | #endif | 153 | #endif |
154 | #endif /* HAVE_TOUCHPAD */ | 154 | #endif /* HAVE_TOUCHSCREEN */ |
155 | #endif /* HAVE_LCD_COLOR */ | 155 | #endif /* HAVE_LCD_COLOR */ |
156 | 156 | ||
157 | #define WAV_AMP 90 | 157 | #define WAV_AMP 90 |
diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c index 60d704337f..27721fcfab 100644 --- a/apps/plugins/pong.c +++ b/apps/plugins/pong.c | |||
@@ -155,7 +155,7 @@ PLUGIN_HEADER | |||
155 | #error No keymap defined! | 155 | #error No keymap defined! |
156 | #endif | 156 | #endif |
157 | 157 | ||
158 | #ifdef HAVE_TOUCHPAD | 158 | #ifdef HAVE_TOUCHSCREEN |
159 | #ifndef PONG_QUIT | 159 | #ifndef PONG_QUIT |
160 | #define PONG_QUIT BUTTON_TOPMIDDLE | 160 | #define PONG_QUIT BUTTON_TOPMIDDLE |
161 | #endif | 161 | #endif |
@@ -398,7 +398,7 @@ int keys(struct pong *p) | |||
398 | #endif | 398 | #endif |
399 | 399 | ||
400 | /* number of ticks this function will loop reading keys */ | 400 | /* number of ticks this function will loop reading keys */ |
401 | #ifndef HAVE_TOUCHPAD | 401 | #ifndef HAVE_TOUCHSCREEN |
402 | int time = 4; | 402 | int time = 4; |
403 | #else | 403 | #else |
404 | int time = 1; | 404 | int time = 1; |
@@ -409,9 +409,9 @@ int keys(struct pong *p) | |||
409 | while(end > *rb->current_tick) { | 409 | while(end > *rb->current_tick) { |
410 | key = rb->button_get_w_tmo(end - *rb->current_tick); | 410 | key = rb->button_get_w_tmo(end - *rb->current_tick); |
411 | 411 | ||
412 | #ifdef HAVE_TOUCHPAD | 412 | #ifdef HAVE_TOUCHSCREEN |
413 | short touch_x, touch_y; | 413 | short touch_x, touch_y; |
414 | if(key & BUTTON_TOUCHPAD) | 414 | if(key & BUTTON_TOUCHSCREEN) |
415 | { | 415 | { |
416 | touch_x = rb->button_get_data() >> 16; | 416 | touch_x = rb->button_get_data() >> 16; |
417 | touch_y = rb->button_get_data() & 0xFFFF; | 417 | touch_y = rb->button_get_data() & 0xFFFF; |
diff --git a/apps/plugins/reversi/reversi-gui.h b/apps/plugins/reversi/reversi-gui.h index 3a3cdda3ce..a03be8ee70 100644 --- a/apps/plugins/reversi/reversi-gui.h +++ b/apps/plugins/reversi/reversi-gui.h | |||
@@ -151,7 +151,7 @@ | |||
151 | #error No keymap defined! | 151 | #error No keymap defined! |
152 | #endif | 152 | #endif |
153 | 153 | ||
154 | #ifdef HAVE_TOUCHPAD | 154 | #ifdef HAVE_TOUCHSCREEN |
155 | #ifndef REVERSI_QUIT | 155 | #ifndef REVERSI_QUIT |
156 | #define REVERSI_QUIT BUTTON_TOPLEFT | 156 | #define REVERSI_QUIT BUTTON_TOPLEFT |
157 | #endif | 157 | #endif |
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index 27ae8e2f99..c4580665ab 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c | |||
@@ -221,7 +221,7 @@ PLUGIN_HEADER | |||
221 | #error No keymap defined! | 221 | #error No keymap defined! |
222 | #endif | 222 | #endif |
223 | 223 | ||
224 | #ifdef HAVE_TOUCHPAD | 224 | #ifdef HAVE_TOUCHSCREEN |
225 | #ifndef ROCKBLOX_OFF | 225 | #ifndef ROCKBLOX_OFF |
226 | #define ROCKBLOX_OFF BUTTON_TOPLEFT | 226 | #define ROCKBLOX_OFF BUTTON_TOPLEFT |
227 | #endif | 227 | #endif |
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c index d214807c2d..1de2c2f4d1 100644 --- a/apps/plugins/rockboy/rockboy.c +++ b/apps/plugins/rockboy/rockboy.c | |||
@@ -86,7 +86,7 @@ static void setoptions (void) | |||
86 | fd = open(optionsave, O_RDONLY); | 86 | fd = open(optionsave, O_RDONLY); |
87 | if(fd < 0) /* no options to read, set defaults */ | 87 | if(fd < 0) /* no options to read, set defaults */ |
88 | { | 88 | { |
89 | #ifdef HAVE_TOUCHPAD | 89 | #ifdef HAVE_TOUCHSCREEN |
90 | options.LEFT=BUTTON_MIDLEFT; | 90 | options.LEFT=BUTTON_MIDLEFT; |
91 | options.RIGHT=BUTTON_MIDRIGHT; | 91 | options.RIGHT=BUTTON_MIDRIGHT; |
92 | #else | 92 | #else |
@@ -219,7 +219,7 @@ static void setoptions (void) | |||
219 | #error No Keymap Defined! | 219 | #error No Keymap Defined! |
220 | #endif | 220 | #endif |
221 | 221 | ||
222 | #ifdef HAVE_TOUCHPAD | 222 | #ifdef HAVE_TOUCHSCREEN |
223 | options.UP=BUTTON_TOPMIDDLE; | 223 | options.UP=BUTTON_TOPMIDDLE; |
224 | options.DOWN=BUTTON_BOTTOMMIDDLE; | 224 | options.DOWN=BUTTON_BOTTOMMIDDLE; |
225 | 225 | ||
diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c index 6436d9baa5..32c746cc3e 100644 --- a/apps/plugins/rockpaint.c +++ b/apps/plugins/rockpaint.c | |||
@@ -126,7 +126,7 @@ PLUGIN_HEADER | |||
126 | #error "Please define keys for this keypad" | 126 | #error "Please define keys for this keypad" |
127 | #endif | 127 | #endif |
128 | 128 | ||
129 | #ifdef HAVE_TOUCHPAD | 129 | #ifdef HAVE_TOUCHSCREEN |
130 | #ifndef ROCKPAINT_QUIT | 130 | #ifndef ROCKPAINT_QUIT |
131 | #define ROCKPAINT_QUIT BUTTON_TOPLEFT | 131 | #define ROCKPAINT_QUIT BUTTON_TOPLEFT |
132 | #endif | 132 | #endif |
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c index 9ed15f4b8a..9303985d03 100644 --- a/apps/plugins/sliding_puzzle.c +++ b/apps/plugins/sliding_puzzle.c | |||
@@ -148,7 +148,7 @@ PLUGIN_HEADER | |||
148 | #error No keymap defined! | 148 | #error No keymap defined! |
149 | #endif | 149 | #endif |
150 | 150 | ||
151 | #ifdef HAVE_TOUCHPAD | 151 | #ifdef HAVE_TOUCHSCREEN |
152 | #ifndef PUZZLE_QUIT | 152 | #ifndef PUZZLE_QUIT |
153 | #define PUZZLE_QUIT BUTTON_TOPLEFT | 153 | #define PUZZLE_QUIT BUTTON_TOPLEFT |
154 | #endif | 154 | #endif |
@@ -676,7 +676,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
676 | rb->lcd_putsxy(0, 28, "[MODE] shuffle"); | 676 | rb->lcd_putsxy(0, 28, "[MODE] shuffle"); |
677 | rb->lcd_putsxy(0, 38, "[MENU] change pic"); | 677 | rb->lcd_putsxy(0, 38, "[MENU] change pic"); |
678 | #endif | 678 | #endif |
679 | #ifdef HAVE_TOUCHPAD | 679 | #ifdef HAVE_TOUCHSCREEN |
680 | rb->lcd_putsxy(0, 18, PUZZLE_QUIT_TEXT " to stop"); | 680 | rb->lcd_putsxy(0, 18, PUZZLE_QUIT_TEXT " to stop"); |
681 | rb->lcd_putsxy(0, 28, PUZZLE_SHUFFLE_TEXT " shuffle"); | 681 | rb->lcd_putsxy(0, 28, PUZZLE_SHUFFLE_TEXT " shuffle"); |
682 | rb->lcd_putsxy(0, 38, PUZZLE_PICTURE_TEXT " change pic"); | 682 | rb->lcd_putsxy(0, 38, PUZZLE_PICTURE_TEXT " change pic"); |
diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c index 21dcebbdb0..0f5923454b 100644 --- a/apps/plugins/snake.c +++ b/apps/plugins/snake.c | |||
@@ -149,7 +149,7 @@ PLUGIN_HEADER | |||
149 | #error No keymap defined! | 149 | #error No keymap defined! |
150 | #endif | 150 | #endif |
151 | 151 | ||
152 | #ifdef HAVE_TOUCHPAD | 152 | #ifdef HAVE_TOUCHSCREEN |
153 | #ifndef SNAKE_QUIT | 153 | #ifndef SNAKE_QUIT |
154 | #define SNAKE_QUIT BUTTON_TOPLEFT | 154 | #define SNAKE_QUIT BUTTON_TOPLEFT |
155 | #endif | 155 | #endif |
diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c index ff868538f3..1bddeb6b3b 100644 --- a/apps/plugins/snake2.c +++ b/apps/plugins/snake2.c | |||
@@ -297,7 +297,7 @@ PLUGIN_HEADER | |||
297 | #error No keymap defined! | 297 | #error No keymap defined! |
298 | #endif | 298 | #endif |
299 | 299 | ||
300 | #ifdef HAVE_TOUCHPAD | 300 | #ifdef HAVE_TOUCHSCREEN |
301 | #ifndef SNAKE2_LEFT | 301 | #ifndef SNAKE2_LEFT |
302 | #define SNAKE2_LEFT BUTTON_MIDLEFT | 302 | #define SNAKE2_LEFT BUTTON_MIDLEFT |
303 | #endif | 303 | #endif |
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index 4e8263aadf..f8e73682dc 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c | |||
@@ -280,7 +280,7 @@ PLUGIN_HEADER | |||
280 | #error No keymap defined! | 280 | #error No keymap defined! |
281 | #endif | 281 | #endif |
282 | 282 | ||
283 | #ifdef HAVE_TOUCHPAD | 283 | #ifdef HAVE_TOUCHSCREEN |
284 | #ifndef SOKOBAN_LEFT | 284 | #ifndef SOKOBAN_LEFT |
285 | #define SOKOBAN_LEFT BUTTON_MIDLEFT | 285 | #define SOKOBAN_LEFT BUTTON_MIDLEFT |
286 | #endif | 286 | #endif |
@@ -1240,7 +1240,7 @@ static int sokoban_menu(void) | |||
1240 | rb->lcd_putsxy(3, 56, "[SELECT+UP] Next Level"); | 1240 | rb->lcd_putsxy(3, 56, "[SELECT+UP] Next Level"); |
1241 | #endif | 1241 | #endif |
1242 | 1242 | ||
1243 | #ifdef HAVE_TOUCHPAD | 1243 | #ifdef HAVE_TOUCHSCREEN |
1244 | rb->lcd_putsxy(3, 6, SOKOBAN_MENU_NAME " Menu"); | 1244 | rb->lcd_putsxy(3, 6, SOKOBAN_MENU_NAME " Menu"); |
1245 | rb->lcd_putsxy(3, 16, SOKOBAN_UNDO_NAME " Undo"); | 1245 | rb->lcd_putsxy(3, 16, SOKOBAN_UNDO_NAME " Undo"); |
1246 | rb->lcd_putsxy(3, 26, SOKOBAN_REDO_NAME " Redo"); | 1246 | rb->lcd_putsxy(3, 26, SOKOBAN_REDO_NAME " Redo"); |
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index 385aa11a41..2baea48c8d 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c | |||
@@ -307,7 +307,7 @@ static const struct plugin_api* rb; | |||
307 | #error No keymap defined! | 307 | #error No keymap defined! |
308 | #endif | 308 | #endif |
309 | 309 | ||
310 | #ifdef HAVE_TOUCHPAD | 310 | #ifdef HAVE_TOUCHSCREEN |
311 | //#ifndef SOL_QUIT | 311 | //#ifndef SOL_QUIT |
312 | //# define SOL_QUIT BUTTON_TOPLEFT | 312 | //# define SOL_QUIT BUTTON_TOPLEFT |
313 | //endif | 313 | //endif |
diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c index ac6ff4ee55..21cfb1e794 100644 --- a/apps/plugins/spacerocks.c +++ b/apps/plugins/spacerocks.c | |||
@@ -209,7 +209,7 @@ static const struct plugin_api* rb; /* global api struct pointer */ | |||
209 | #error No keymap defined! | 209 | #error No keymap defined! |
210 | #endif | 210 | #endif |
211 | 211 | ||
212 | #ifdef HAVE_TOUCHPAD | 212 | #ifdef HAVE_TOUCHSCREEN |
213 | #ifndef AST_PAUSE | 213 | #ifndef AST_PAUSE |
214 | #define AST_PAUSE BUTTON_CENTER | 214 | #define AST_PAUSE BUTTON_CENTER |
215 | #endif | 215 | #endif |
diff --git a/apps/plugins/star.c b/apps/plugins/star.c index 23bfd3ceef..401519bdee 100644 --- a/apps/plugins/star.c +++ b/apps/plugins/star.c | |||
@@ -237,7 +237,7 @@ PLUGIN_HEADER | |||
237 | #error No keymap defined! | 237 | #error No keymap defined! |
238 | #endif | 238 | #endif |
239 | 239 | ||
240 | #ifdef HAVE_TOUCHPAD | 240 | #ifdef HAVE_TOUCHSCREEN |
241 | //#ifndef STAR_QUIT | 241 | //#ifndef STAR_QUIT |
242 | //#define STAR_QUIT BUTTON_TOPLEFT | 242 | //#define STAR_QUIT BUTTON_TOPLEFT |
243 | //#define STAR_QUIT_NAME "[TOPLEFT]" | 243 | //#define STAR_QUIT_NAME "[TOPLEFT]" |
@@ -1075,7 +1075,7 @@ static int star_menu(void) | |||
1075 | "[PLAY+RIGHT] Reset level\n" | 1075 | "[PLAY+RIGHT] Reset level\n" |
1076 | "[PLAY+UP] Next level", true); | 1076 | "[PLAY+UP] Next level", true); |
1077 | #endif | 1077 | #endif |
1078 | #ifdef HAVE_TOUCHPAD | 1078 | #ifdef HAVE_TOUCHSCREEN |
1079 | star_display_text("KEYS\n\n" | 1079 | star_display_text("KEYS\n\n" |
1080 | STAR_TOGGLE_CONTROL_NAME " Toggle Control\n" | 1080 | STAR_TOGGLE_CONTROL_NAME " Toggle Control\n" |
1081 | STAR_QUIT_NAME " Exit\n" | 1081 | STAR_QUIT_NAME " Exit\n" |
diff --git a/apps/plugins/starfield.c b/apps/plugins/starfield.c index 0544569dc5..53198d0a5f 100644 --- a/apps/plugins/starfield.c +++ b/apps/plugins/starfield.c | |||
@@ -92,7 +92,7 @@ static const struct plugin_api* rb; /* global api struct pointer */ | |||
92 | #define STARFIELD_QUIT BUTTON_POWER | 92 | #define STARFIELD_QUIT BUTTON_POWER |
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | #ifdef HAVE_TOUCHPAD | 95 | #ifdef HAVE_TOUCHSCREEN |
96 | #ifndef STARFIELD_QUIT | 96 | #ifndef STARFIELD_QUIT |
97 | #define STARFIELD_QUIT BUTTON_TOPLEFT | 97 | #define STARFIELD_QUIT BUTTON_TOPLEFT |
98 | #endif | 98 | #endif |
diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c index 6bd6d2be2a..ae71a12f80 100644 --- a/apps/plugins/stopwatch.c +++ b/apps/plugins/stopwatch.c | |||
@@ -154,7 +154,7 @@ PLUGIN_HEADER | |||
154 | #error No keymap defined! | 154 | #error No keymap defined! |
155 | #endif | 155 | #endif |
156 | 156 | ||
157 | #ifdef HAVE_TOUCHPAD | 157 | #ifdef HAVE_TOUCHSCREEN |
158 | #ifndef STOPWATCH_QUIT | 158 | #ifndef STOPWATCH_QUIT |
159 | #define STOPWATCH_QUIT BUTTON_TOPLEFT | 159 | #define STOPWATCH_QUIT BUTTON_TOPLEFT |
160 | #endif | 160 | #endif |
diff --git a/apps/plugins/sudoku/sudoku.h b/apps/plugins/sudoku/sudoku.h index 22abdfed57..fb64ef9a66 100644 --- a/apps/plugins/sudoku/sudoku.h +++ b/apps/plugins/sudoku/sudoku.h | |||
@@ -190,7 +190,7 @@ | |||
190 | #error No keymap defined! | 190 | #error No keymap defined! |
191 | #endif | 191 | #endif |
192 | 192 | ||
193 | #ifdef HAVE_TOUCHPAD | 193 | #ifdef HAVE_TOUCHSCREEN |
194 | #ifndef SUDOKU_BUTTON_QUIT | 194 | #ifndef SUDOKU_BUTTON_QUIT |
195 | #define SUDOKU_BUTTON_QUIT BUTTON_TOPLEFT | 195 | #define SUDOKU_BUTTON_QUIT BUTTON_TOPLEFT |
196 | #endif | 196 | #endif |
diff --git a/apps/plugins/superdom.c b/apps/plugins/superdom.c index 64d91b7c48..088cdaea33 100644 --- a/apps/plugins/superdom.c +++ b/apps/plugins/superdom.c | |||
@@ -134,7 +134,7 @@ char buf[255]; | |||
134 | 134 | ||
135 | #endif | 135 | #endif |
136 | 136 | ||
137 | #ifdef HAVE_TOUCHPAD | 137 | #ifdef HAVE_TOUCHSCREEN |
138 | #ifndef SUPERDOM_OK | 138 | #ifndef SUPERDOM_OK |
139 | #define SUPERDOM_OK BUTTON_CENTER | 139 | #define SUPERDOM_OK BUTTON_CENTER |
140 | #endif | 140 | #endif |
diff --git a/apps/plugins/test_touchpad.c b/apps/plugins/test_touchscreen.c index 1d4480a46c..84c8e96cb5 100644 --- a/apps/plugins/test_touchpad.c +++ b/apps/plugins/test_touchscreen.c | |||
@@ -23,11 +23,11 @@ | |||
23 | PLUGIN_HEADER | 23 | PLUGIN_HEADER |
24 | 24 | ||
25 | #if (CONFIG_KEYPAD == COWOND2_PAD) | 25 | #if (CONFIG_KEYPAD == COWOND2_PAD) |
26 | #define TOUCHPAD_QUIT BUTTON_POWER | 26 | #define TOUCHSCREEN_QUIT BUTTON_POWER |
27 | #define TOUCHPAD_TOGGLE BUTTON_MENU | 27 | #define TOUCHSCREEN_TOGGLE BUTTON_MENU |
28 | #elif (CONFIG_KEYPAD == MROBE500_PAD) | 28 | #elif (CONFIG_KEYPAD == MROBE500_PAD) |
29 | #define TOUCHPAD_QUIT BUTTON_POWER | 29 | #define TOUCHSCREEN_QUIT BUTTON_POWER |
30 | #define TOUCHPAD_TOGGLE BUTTON_RC_MODE | 30 | #define TOUCHSCREEN_TOGGLE BUTTON_RC_MODE |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | static const struct plugin_api* rb; | 33 | static const struct plugin_api* rb; |
@@ -36,13 +36,13 @@ static const struct plugin_api* rb; | |||
36 | enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) | 36 | enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) |
37 | { | 37 | { |
38 | int button = 0; | 38 | int button = 0; |
39 | enum touchpad_mode mode = TOUCHPAD_BUTTON; | 39 | enum touchscreen_mode mode = TOUCHSCREEN_BUTTON; |
40 | 40 | ||
41 | /* standard stuff */ | 41 | /* standard stuff */ |
42 | (void)parameter; | 42 | (void)parameter; |
43 | rb = api; | 43 | rb = api; |
44 | 44 | ||
45 | rb->touchpad_set_mode(mode); | 45 | rb->touchscreen_set_mode(mode); |
46 | 46 | ||
47 | /* wait until user closes plugin */ | 47 | /* wait until user closes plugin */ |
48 | do | 48 | do |
@@ -99,10 +99,10 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
99 | x = 2*(LCD_WIDTH/3); y = 2*(LCD_HEIGHT/3); | 99 | x = 2*(LCD_WIDTH/3); y = 2*(LCD_HEIGHT/3); |
100 | } | 100 | } |
101 | 101 | ||
102 | if (button & TOUCHPAD_TOGGLE && (button & BUTTON_REL)) | 102 | if (button & TOUCHSCREEN_TOGGLE && (button & BUTTON_REL)) |
103 | { | 103 | { |
104 | mode = (mode == TOUCHPAD_POINT) ? TOUCHPAD_BUTTON : TOUCHPAD_POINT; | 104 | mode = (mode == TOUCHSCREEN_POINT) ? TOUCHSCREEN_BUTTON : TOUCHSCREEN_POINT; |
105 | rb->touchpad_set_mode(mode); | 105 | rb->touchscreen_set_mode(mode); |
106 | } | 106 | } |
107 | 107 | ||
108 | if (button & BUTTON_REL) draw_rect = false; | 108 | if (button & BUTTON_REL) draw_rect = false; |
@@ -115,7 +115,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
115 | rb->lcd_fillrect(x, y, LCD_WIDTH/3, LCD_HEIGHT/3); | 115 | rb->lcd_fillrect(x, y, LCD_WIDTH/3, LCD_HEIGHT/3); |
116 | } | 116 | } |
117 | 117 | ||
118 | if (draw_rect || button & BUTTON_TOUCHPAD) | 118 | if (draw_rect || button & BUTTON_TOUCHSCREEN) |
119 | { | 119 | { |
120 | intptr_t button_data = rb->button_get_data(); | 120 | intptr_t button_data = rb->button_get_data(); |
121 | x = button_data >> 16; | 121 | x = button_data >> 16; |
@@ -125,7 +125,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
125 | rb->lcd_fillrect(x-7, y-7, 14, 14); | 125 | rb->lcd_fillrect(x-7, y-7, 14, 14); |
126 | 126 | ||
127 | /* in stylus mode, show REL position in black */ | 127 | /* in stylus mode, show REL position in black */ |
128 | if (mode == TOUCHPAD_POINT && (button & BUTTON_REL)) | 128 | if (mode == TOUCHSCREEN_POINT && (button & BUTTON_REL)) |
129 | rb->lcd_set_foreground(LCD_BLACK); | 129 | rb->lcd_set_foreground(LCD_BLACK); |
130 | else | 130 | else |
131 | rb->lcd_set_foreground(LCD_WHITE); | 131 | rb->lcd_set_foreground(LCD_WHITE); |
@@ -135,7 +135,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
135 | } | 135 | } |
136 | rb->lcd_update(); | 136 | rb->lcd_update(); |
137 | 137 | ||
138 | } while (button != TOUCHPAD_QUIT); | 138 | } while (button != TOUCHSCREEN_QUIT); |
139 | 139 | ||
140 | return PLUGIN_OK; | 140 | return PLUGIN_OK; |
141 | } | 141 | } |
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index 7005745e01..806688514e 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c | |||
@@ -262,7 +262,7 @@ PLUGIN_HEADER | |||
262 | #error No keymap defined! | 262 | #error No keymap defined! |
263 | #endif | 263 | #endif |
264 | 264 | ||
265 | #ifdef HAVE_TOUCHPAD | 265 | #ifdef HAVE_TOUCHSCREEN |
266 | #ifndef VIEWER_QUIT | 266 | #ifndef VIEWER_QUIT |
267 | #define VIEWER_QUIT BUTTON_TOPLEFT | 267 | #define VIEWER_QUIT BUTTON_TOPLEFT |
268 | #endif | 268 | #endif |
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c index b18c4f0db0..4c98e6df8f 100644 --- a/apps/plugins/vu_meter.c +++ b/apps/plugins/vu_meter.c | |||
@@ -213,7 +213,7 @@ PLUGIN_HEADER | |||
213 | #error No keymap defined! | 213 | #error No keymap defined! |
214 | #endif | 214 | #endif |
215 | 215 | ||
216 | #ifdef HAVE_TOUCHPAD | 216 | #ifdef HAVE_TOUCHSCREEN |
217 | #ifndef VUMETER_QUIT | 217 | #ifndef VUMETER_QUIT |
218 | #define VUMETER_QUIT BUTTON_TOPLEFT | 218 | #define VUMETER_QUIT BUTTON_TOPLEFT |
219 | #define LABEL_QUIT "TOPLEFT" | 219 | #define LABEL_QUIT "TOPLEFT" |
diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index 5469073588..6586e78b2c 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c | |||
@@ -225,7 +225,7 @@ PLUGIN_HEADER | |||
225 | #error No keymap defined! | 225 | #error No keymap defined! |
226 | #endif | 226 | #endif |
227 | 227 | ||
228 | #ifdef HAVE_TOUCHPAD | 228 | #ifdef HAVE_TOUCHSCREEN |
229 | #ifndef BTN_DIR_UP | 229 | #ifndef BTN_DIR_UP |
230 | #define BTN_DIR_UP BUTTON_TOPMIDDLE | 230 | #define BTN_DIR_UP BUTTON_TOPMIDDLE |
231 | #endif | 231 | #endif |
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c index 0faf8a27be..8490d6bae6 100644 --- a/apps/plugins/xobox.c +++ b/apps/plugins/xobox.c | |||
@@ -149,7 +149,7 @@ PLUGIN_HEADER | |||
149 | #error No keymap defined! | 149 | #error No keymap defined! |
150 | #endif | 150 | #endif |
151 | 151 | ||
152 | #ifdef HAVE_TOUCHPAD | 152 | #ifdef HAVE_TOUCHSCREEN |
153 | #ifndef QUIT | 153 | #ifndef QUIT |
154 | #define QUIT BUTTON_TOPLEFT | 154 | #define QUIT BUTTON_TOPLEFT |
155 | #endif | 155 | #endif |
diff --git a/apps/plugins/zxbox/keymaps.h b/apps/plugins/zxbox/keymaps.h index 932c360991..777ddccac3 100644 --- a/apps/plugins/zxbox/keymaps.h +++ b/apps/plugins/zxbox/keymaps.h | |||
@@ -127,7 +127,7 @@ | |||
127 | 127 | ||
128 | #endif | 128 | #endif |
129 | 129 | ||
130 | #ifdef HAVE_TOUCHPAD | 130 | #ifdef HAVE_TOUCHSCREEN |
131 | #ifndef ZX_UP | 131 | #ifndef ZX_UP |
132 | #define ZX_UP BUTTON_TOPMIDDLE | 132 | #define ZX_UP BUTTON_TOPMIDDLE |
133 | #endif | 133 | #endif |
diff --git a/apps/plugins/zxbox/zxbox_keyb.c b/apps/plugins/zxbox/zxbox_keyb.c index 146d7432b4..f57b8e4f16 100644 --- a/apps/plugins/zxbox/zxbox_keyb.c +++ b/apps/plugins/zxbox/zxbox_keyb.c | |||
@@ -138,7 +138,7 @@ | |||
138 | 138 | ||
139 | #endif | 139 | #endif |
140 | 140 | ||
141 | #ifdef HAVE_TOUCHPAD | 141 | #ifdef HAVE_TOUCHSCREEN |
142 | #ifndef KBD_SELECT | 142 | #ifndef KBD_SELECT |
143 | #define KBD_SELECT BUTTON_CENTER | 143 | #define KBD_SELECT BUTTON_CENTER |
144 | #endif | 144 | #endif |
diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c index ee46eb8eb4..c71d43d40e 100755 --- a/bootloader/mrobe500.c +++ b/bootloader/mrobe500.c | |||
@@ -54,13 +54,13 @@ extern int line; | |||
54 | #if 0 | 54 | #if 0 |
55 | struct touch_calibration_point tl, br; | 55 | struct touch_calibration_point tl, br; |
56 | 56 | ||
57 | void touchpad_get_one_point(struct touch_calibration_point *p) | 57 | void touchscreen_get_one_point(struct touch_calibration_point *p) |
58 | { | 58 | { |
59 | int data = 0; | 59 | int data = 0; |
60 | int start = current_tick; | 60 | int start = current_tick; |
61 | while (TIME_AFTER(start+(HZ/3), current_tick)) | 61 | while (TIME_AFTER(start+(HZ/3), current_tick)) |
62 | { | 62 | { |
63 | if (button_read_device()&BUTTON_TOUCHPAD) | 63 | if (button_read_device()&BUTTON_TOUCHSCREEN) |
64 | { | 64 | { |
65 | data = button_get_last_touch(); | 65 | data = button_get_last_touch(); |
66 | p->val_x = data>>16; | 66 | p->val_x = data>>16; |
@@ -74,7 +74,7 @@ void touchpad_get_one_point(struct touch_calibration_point *p) | |||
74 | 74 | ||
75 | #define MARGIN 25 | 75 | #define MARGIN 25 |
76 | #define LEN 7 | 76 | #define LEN 7 |
77 | void touchpad_calibrate_screen(void) | 77 | void touchscreen_calibrate_screen(void) |
78 | { | 78 | { |
79 | reset_screen(); | 79 | reset_screen(); |
80 | printf("touch the center of the crosshairs to calibrate"); | 80 | printf("touch the center of the crosshairs to calibrate"); |
@@ -83,7 +83,7 @@ void touchpad_calibrate_screen(void) | |||
83 | lcd_vline(MARGIN, MARGIN-LEN, MARGIN+LEN); | 83 | lcd_vline(MARGIN, MARGIN-LEN, MARGIN+LEN); |
84 | lcd_update(); | 84 | lcd_update(); |
85 | tl.px_x = MARGIN; tl.px_y = MARGIN; | 85 | tl.px_x = MARGIN; tl.px_y = MARGIN; |
86 | touchpad_get_one_point(&tl); | 86 | touchscreen_get_one_point(&tl); |
87 | reset_screen(); | 87 | reset_screen(); |
88 | printf("touch the center of the crosshairs to calibrate"); | 88 | printf("touch the center of the crosshairs to calibrate"); |
89 | /* get the topright value */ | 89 | /* get the topright value */ |
@@ -91,7 +91,7 @@ void touchpad_calibrate_screen(void) | |||
91 | lcd_vline(LCD_WIDTH-MARGIN, LCD_HEIGHT-MARGIN-LEN, LCD_HEIGHT-MARGIN+LEN); | 91 | lcd_vline(LCD_WIDTH-MARGIN, LCD_HEIGHT-MARGIN-LEN, LCD_HEIGHT-MARGIN+LEN); |
92 | lcd_update(); | 92 | lcd_update(); |
93 | br.px_x = LCD_WIDTH-MARGIN; br.px_y = LCD_HEIGHT-MARGIN; | 93 | br.px_x = LCD_WIDTH-MARGIN; br.px_y = LCD_HEIGHT-MARGIN; |
94 | touchpad_get_one_point(&br); | 94 | touchscreen_get_one_point(&br); |
95 | reset_screen(); | 95 | reset_screen(); |
96 | line++; | 96 | line++; |
97 | printf("tl %d %d", tl.val_x, tl.val_y); | 97 | printf("tl %d %d", tl.val_x, tl.val_y); |
@@ -108,7 +108,7 @@ void mrdebug(void) | |||
108 | int button=0; | 108 | int button=0; |
109 | #if 0 | 109 | #if 0 |
110 | use_calibration(false); | 110 | use_calibration(false); |
111 | touchpad_calibrate_screen(); | 111 | touchscreen_calibrate_screen(); |
112 | use_calibration(true); | 112 | use_calibration(true); |
113 | #endif | 113 | #endif |
114 | 114 | ||
@@ -148,15 +148,15 @@ void mrdebug(void) | |||
148 | else if (button == BUTTON_RC_HEART) | 148 | else if (button == BUTTON_RC_HEART) |
149 | { | 149 | { |
150 | printf("POINT"); | 150 | printf("POINT"); |
151 | touchpad_set_mode(TOUCHPAD_POINT); | 151 | touchscreen_set_mode(TOUCHSCREEN_POINT); |
152 | } | 152 | } |
153 | else if (button == BUTTON_RC_MODE) | 153 | else if (button == BUTTON_RC_MODE) |
154 | { | 154 | { |
155 | printf("BUTTON"); | 155 | printf("BUTTON"); |
156 | touchpad_set_mode(TOUCHPAD_BUTTON); | 156 | touchscreen_set_mode(TOUCHSCREEN_BUTTON); |
157 | } | 157 | } |
158 | #if 1 | 158 | #if 1 |
159 | else if (button&BUTTON_TOUCHPAD) | 159 | else if (button&BUTTON_TOUCHSCREEN) |
160 | { | 160 | { |
161 | if (button&BUTTON_REL) | 161 | if (button&BUTTON_REL) |
162 | continue; | 162 | continue; |
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index 7be7fbc1b3..8ad93ae022 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c | |||
@@ -517,7 +517,7 @@ static int button_read(void) | |||
517 | 517 | ||
518 | /* Filter the button status. It is only accepted if we get the same | 518 | /* Filter the button status. It is only accepted if we get the same |
519 | status twice in a row. */ | 519 | status twice in a row. */ |
520 | #ifndef HAVE_TOUCHPAD | 520 | #ifndef HAVE_TOUCHSCREEN |
521 | if (btn != last_read) | 521 | if (btn != last_read) |
522 | retval = lastbtn; | 522 | retval = lastbtn; |
523 | else | 523 | else |
diff --git a/firmware/export/button.h b/firmware/export/button.h index f47639b3c7..0b4c8fd2b0 100644 --- a/firmware/export/button.h +++ b/firmware/export/button.h | |||
@@ -60,30 +60,30 @@ void wheel_send_events(bool send); | |||
60 | int button_apply_acceleration(const unsigned int data); | 60 | int button_apply_acceleration(const unsigned int data); |
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | #define BUTTON_NONE 0x00000000 | 63 | #define BUTTON_NONE 0x00000000 |
64 | 64 | ||
65 | /* Button modifiers */ | 65 | /* Button modifiers */ |
66 | #define BUTTON_REL 0x02000000 | 66 | #define BUTTON_REL 0x02000000 |
67 | #define BUTTON_REPEAT 0x04000000 | 67 | #define BUTTON_REPEAT 0x04000000 |
68 | #define BUTTON_TOUCHPAD 0x08000000 | 68 | #define BUTTON_TOUCHSCREEN 0x08000000 |
69 | 69 | ||
70 | #ifdef HAVE_TOUCHPAD | 70 | #ifdef HAVE_TOUCHSCREEN |
71 | #if !defined(BUTTON_TOPLEFT) || !defined(BUTTON_TOPMIDDLE) \ | 71 | #if !defined(BUTTON_TOPLEFT) || !defined(BUTTON_TOPMIDDLE) \ |
72 | || !defined(BUTTON_TOPRIGHT) || !defined(BUTTON_MIDLEFT) \ | 72 | || !defined(BUTTON_TOPRIGHT) || !defined(BUTTON_MIDLEFT) \ |
73 | || !defined(BUTTON_CENTER) || !defined(BUTTON_MIDRIGHT) \ | 73 | || !defined(BUTTON_CENTER) || !defined(BUTTON_MIDRIGHT) \ |
74 | || !defined(BUTTON_BOTTOMLEFT) || !defined(BUTTON_BOTTOMMIDDLE) \ | 74 | || !defined(BUTTON_BOTTOMLEFT) || !defined(BUTTON_BOTTOMMIDDLE) \ |
75 | || !defined(BUTTON_BOTTOMRIGHT) | 75 | || !defined(BUTTON_BOTTOMRIGHT) |
76 | #error Touchpad button mode BUTTON_* defines not set up correctly | 76 | #error Touchscreen button mode BUTTON_* defines not set up correctly |
77 | #endif | 77 | #endif |
78 | enum touchpad_mode { | 78 | enum touchscreen_mode { |
79 | TOUCHPAD_POINT = 0, /* touchpad returns pixel co-ords */ | 79 | TOUCHSCREEN_POINT = 0, /* touchscreen returns pixel co-ords */ |
80 | TOUCHPAD_BUTTON, /* touchpad returns BUTTON_* area codes | 80 | TOUCHSCREEN_BUTTON, /* touchscreen returns BUTTON_* area codes |
81 | actual pixel value will still be accessable | 81 | actual pixel value will still be accessable |
82 | from button_get_data */ | 82 | from button_get_data */ |
83 | }; | 83 | }; |
84 | /* maybe define the number of buttons in button-target.h ? */ | 84 | /* maybe define the number of buttons in button-target.h ? */ |
85 | void touchpad_set_mode(enum touchpad_mode mode); | 85 | void touchscreen_set_mode(enum touchscreen_mode mode); |
86 | enum touchpad_mode touchpad_get_mode(void); | 86 | enum touchscreen_mode touchscreen_get_mode(void); |
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | #endif /* _BUTTON_H_ */ | 89 | #endif /* _BUTTON_H_ */ |
diff --git a/firmware/export/config-cowond2.h b/firmware/export/config-cowond2.h index 828dc076b7..841390b479 100644 --- a/firmware/export/config-cowond2.h +++ b/firmware/export/config-cowond2.h | |||
@@ -60,7 +60,7 @@ | |||
60 | 60 | ||
61 | /* define this to indicate your device's keypad */ | 61 | /* define this to indicate your device's keypad */ |
62 | #define CONFIG_KEYPAD COWOND2_PAD | 62 | #define CONFIG_KEYPAD COWOND2_PAD |
63 | #define HAVE_TOUCHPAD | 63 | #define HAVE_TOUCHSCREEN |
64 | #define HAVE_BUTTON_DATA | 64 | #define HAVE_BUTTON_DATA |
65 | 65 | ||
66 | /* define this if you have a real-time clock */ | 66 | /* define this if you have a real-time clock */ |
diff --git a/firmware/export/config-mrobe500.h b/firmware/export/config-mrobe500.h index d7e172b50f..285a53a014 100644 --- a/firmware/export/config-mrobe500.h +++ b/firmware/export/config-mrobe500.h | |||
@@ -86,7 +86,7 @@ | |||
86 | #define DEFAULT_REMOTE_CONTRAST_SETTING 7 | 86 | #define DEFAULT_REMOTE_CONTRAST_SETTING 7 |
87 | 87 | ||
88 | #define CONFIG_KEYPAD MROBE500_PAD | 88 | #define CONFIG_KEYPAD MROBE500_PAD |
89 | #define HAVE_TOUCHPAD | 89 | #define HAVE_TOUCHSCREEN |
90 | #define HAVE_BUTTON_DATA | 90 | #define HAVE_BUTTON_DATA |
91 | 91 | ||
92 | /* Define this if you do software codec */ | 92 | /* Define this if you do software codec */ |
diff --git a/firmware/export/config-ondavx747.h b/firmware/export/config-ondavx747.h index 1c2be01d93..ffb5e90a75 100644 --- a/firmware/export/config-ondavx747.h +++ b/firmware/export/config-ondavx747.h | |||
@@ -66,7 +66,7 @@ | |||
66 | 66 | ||
67 | #define CONFIG_KEYPAD ONDAVX747_PAD | 67 | #define CONFIG_KEYPAD ONDAVX747_PAD |
68 | #define HAS_BUTTON_HOLD | 68 | #define HAS_BUTTON_HOLD |
69 | #define HAVE_TOUCHPAD | 69 | #define HAVE_TOUCHSCREEN |
70 | #define HAVE_BUTTON_DATA | 70 | #define HAVE_BUTTON_DATA |
71 | 71 | ||
72 | /* Define this if you do software codec */ | 72 | /* Define this if you do software codec */ |
diff --git a/firmware/target/arm/tcc780x/cowond2/button-cowond2.c b/firmware/target/arm/tcc780x/cowond2/button-cowond2.c index 0da55e3f0a..9449bcdf30 100644 --- a/firmware/target/arm/tcc780x/cowond2/button-cowond2.c +++ b/firmware/target/arm/tcc780x/cowond2/button-cowond2.c | |||
@@ -28,24 +28,24 @@ | |||
28 | 28 | ||
29 | #define TOUCH_MARGIN 8 | 29 | #define TOUCH_MARGIN 8 |
30 | 30 | ||
31 | static enum touchpad_mode current_mode = TOUCHPAD_POINT; | 31 | static enum touchscreen_mode current_mode = TOUCHSCREEN_POINT; |
32 | 32 | ||
33 | static short last_x, last_y; | 33 | static short last_x, last_y; |
34 | static bool touch_available = false; | 34 | static bool touch_available = false; |
35 | 35 | ||
36 | static int touchpad_buttons[3][3] = | 36 | static int touchscreen_buttons[3][3] = |
37 | { | 37 | { |
38 | {BUTTON_TOPLEFT, BUTTON_TOPMIDDLE, BUTTON_TOPRIGHT}, | 38 | {BUTTON_TOPLEFT, BUTTON_TOPMIDDLE, BUTTON_TOPRIGHT}, |
39 | {BUTTON_MIDLEFT, BUTTON_CENTER, BUTTON_MIDRIGHT}, | 39 | {BUTTON_MIDLEFT, BUTTON_CENTER, BUTTON_MIDRIGHT}, |
40 | {BUTTON_BOTTOMLEFT, BUTTON_BOTTOMMIDDLE, BUTTON_BOTTOMRIGHT}, | 40 | {BUTTON_BOTTOMLEFT, BUTTON_BOTTOMMIDDLE, BUTTON_BOTTOMRIGHT}, |
41 | }; | 41 | }; |
42 | 42 | ||
43 | void touchpad_set_mode(enum touchpad_mode mode) | 43 | void touchscreen_set_mode(enum touchscreen_mode mode) |
44 | { | 44 | { |
45 | current_mode = mode; | 45 | current_mode = mode; |
46 | } | 46 | } |
47 | 47 | ||
48 | enum touchpad_mode touchpad_get_mode(void) | 48 | enum touchscreen_mode touchscreen_get_mode(void) |
49 | { | 49 | { |
50 | return current_mode; | 50 | return current_mode; |
51 | } | 51 | } |
@@ -58,7 +58,7 @@ void button_set_touch_available(void) | |||
58 | struct touch_calibration_point { | 58 | struct touch_calibration_point { |
59 | short px_x; /* known pixel value */ | 59 | short px_x; /* known pixel value */ |
60 | short px_y; | 60 | short px_y; |
61 | short val_x; /* touchpad value at the known pixel */ | 61 | short val_x; /* touchscreen value at the known pixel */ |
62 | short val_y; | 62 | short val_y; |
63 | }; | 63 | }; |
64 | 64 | ||
@@ -188,15 +188,15 @@ int button_read_device(int *data) | |||
188 | *data = touch_to_pixels(x, y); | 188 | *data = touch_to_pixels(x, y); |
189 | switch (current_mode) | 189 | switch (current_mode) |
190 | { | 190 | { |
191 | case TOUCHPAD_POINT: | 191 | case TOUCHSCREEN_POINT: |
192 | btn |= BUTTON_TOUCHPAD; | 192 | btn |= BUTTON_TOUCHSCREEN; |
193 | break; | 193 | break; |
194 | case TOUCHPAD_BUTTON: | 194 | case TOUCHSCREEN_BUTTON: |
195 | { | 195 | { |
196 | int px_x = (*data&0xffff0000)>>16; | 196 | int px_x = (*data&0xffff0000)>>16; |
197 | int px_y = (*data&0x0000ffff); | 197 | int px_y = (*data&0x0000ffff); |
198 | btn |= touchpad_buttons[px_y/(LCD_HEIGHT/3)] | 198 | btn |= touchscreen_buttons[px_y/(LCD_HEIGHT/3)] |
199 | [px_x/(LCD_WIDTH/3)]; | 199 | [px_x/(LCD_WIDTH/3)]; |
200 | break; | 200 | break; |
201 | } | 201 | } |
202 | } | 202 | } |
@@ -208,7 +208,7 @@ int button_read_device(int *data) | |||
208 | if (!(GPIOA & 0x4)) | 208 | if (!(GPIOA & 0x4)) |
209 | btn |= BUTTON_POWER; | 209 | btn |= BUTTON_POWER; |
210 | 210 | ||
211 | if(btn & BUTTON_TOUCHPAD && !is_backlight_on(true)) | 211 | if(btn & BUTTON_TOUCHSCREEN && !is_backlight_on(true)) |
212 | *data = 0; | 212 | *data = 0; |
213 | 213 | ||
214 | return btn; | 214 | return btn; |
diff --git a/firmware/target/arm/tcc780x/cowond2/button-target.h b/firmware/target/arm/tcc780x/cowond2/button-target.h index d315d0172f..faf660fc71 100644 --- a/firmware/target/arm/tcc780x/cowond2/button-target.h +++ b/firmware/target/arm/tcc780x/cowond2/button-target.h | |||
@@ -44,7 +44,7 @@ void button_set_touch_available(void); | |||
44 | #define BUTTON_UP BUTTON_TOPMIDDLE | 44 | #define BUTTON_UP BUTTON_TOPMIDDLE |
45 | #define BUTTON_DOWN BUTTON_BOTTOMMIDDLE | 45 | #define BUTTON_DOWN BUTTON_BOTTOMMIDDLE |
46 | 46 | ||
47 | /* Touchpad Screen Area Buttons */ | 47 | /* Touch Screen Area Buttons */ |
48 | #define BUTTON_TOPLEFT 0x00000010 | 48 | #define BUTTON_TOPLEFT 0x00000010 |
49 | #define BUTTON_TOPMIDDLE 0x00000020 | 49 | #define BUTTON_TOPMIDDLE 0x00000020 |
50 | #define BUTTON_TOPRIGHT 0x00000040 | 50 | #define BUTTON_TOPRIGHT 0x00000040 |
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c index 26136ce59b..ba2cedb76c 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c +++ b/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c | |||
@@ -42,18 +42,18 @@ | |||
42 | static short last_x, last_y, last_z1, last_z2; /* for the touch screen */ | 42 | static short last_x, last_y, last_z1, last_z2; /* for the touch screen */ |
43 | static bool touch_available = false; | 43 | static bool touch_available = false; |
44 | 44 | ||
45 | static enum touchpad_mode current_mode = TOUCHPAD_POINT; | 45 | static enum touchscreen_mode current_mode = TOUCHSCREEN_POINT; |
46 | static int touchpad_buttons[3][3] = { | 46 | static int touchscreen_buttons[3][3] = { |
47 | {BUTTON_TOPLEFT, BUTTON_TOPMIDDLE, BUTTON_TOPRIGHT}, | 47 | {BUTTON_TOPLEFT, BUTTON_TOPMIDDLE, BUTTON_TOPRIGHT}, |
48 | {BUTTON_MIDLEFT, BUTTON_CENTER, BUTTON_MIDRIGHT}, | 48 | {BUTTON_MIDLEFT, BUTTON_CENTER, BUTTON_MIDRIGHT}, |
49 | {BUTTON_BOTTOMLEFT, BUTTON_BOTTOMMIDDLE, BUTTON_BOTTOMRIGHT}, | 49 | {BUTTON_BOTTOMLEFT, BUTTON_BOTTOMMIDDLE, BUTTON_BOTTOMRIGHT}, |
50 | }; | 50 | }; |
51 | 51 | ||
52 | void touchpad_set_mode(enum touchpad_mode mode) | 52 | void touchscreen_set_mode(enum touchscreen_mode mode) |
53 | { | 53 | { |
54 | current_mode = mode; | 54 | current_mode = mode; |
55 | } | 55 | } |
56 | enum touchpad_mode touchpad_get_mode(void) | 56 | enum touchscreen_mode touchscreen_get_mode(void) |
57 | { | 57 | { |
58 | return current_mode; | 58 | return current_mode; |
59 | } | 59 | } |
@@ -185,13 +185,13 @@ int button_read_device(int *data) | |||
185 | *data = touch_to_pixels(x, y); | 185 | *data = touch_to_pixels(x, y); |
186 | switch (current_mode) | 186 | switch (current_mode) |
187 | { | 187 | { |
188 | case TOUCHPAD_POINT: | 188 | case TOUCHSCREEN_POINT: |
189 | r_button |= BUTTON_TOUCHPAD; | 189 | r_button |= BUTTON_TOUCHSCREEN; |
190 | break; | 190 | break; |
191 | case TOUCHPAD_BUTTON: | 191 | case TOUCHSCREEN_BUTTON: |
192 | { | 192 | { |
193 | int px_x = ((*data&0xffff0000)>>16), px_y = ((*data&0x0000ffff)); | 193 | int px_x = ((*data&0xffff0000)>>16), px_y = ((*data&0x0000ffff)); |
194 | r_button |= touchpad_buttons[px_y/(LCD_HEIGHT/3)][px_x/(LCD_WIDTH/3)]; | 194 | r_button |= touchscreen_buttons[px_y/(LCD_HEIGHT/3)][px_x/(LCD_WIDTH/3)]; |
195 | oldbutton = r_button; | 195 | oldbutton = r_button; |
196 | break; | 196 | break; |
197 | } | 197 | } |
@@ -233,7 +233,7 @@ int button_read_device(int *data) | |||
233 | return r_button; | 233 | return r_button; |
234 | } | 234 | } |
235 | 235 | ||
236 | /* Touchpad data available interupt */ | 236 | /* Touchscreen data available interupt */ |
237 | void read_battery_inputs(void); | 237 | void read_battery_inputs(void); |
238 | void GIO14(void) | 238 | void GIO14(void) |
239 | { | 239 | { |
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/button-target.h b/firmware/target/arm/tms320dm320/mrobe-500/button-target.h index 30cc55dada..5b888b3e0a 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/button-target.h +++ b/firmware/target/arm/tms320dm320/mrobe-500/button-target.h | |||
@@ -33,7 +33,7 @@ int button_read_device(int *data); | |||
33 | struct touch_calibration_point { | 33 | struct touch_calibration_point { |
34 | short px_x; /* known pixel value */ | 34 | short px_x; /* known pixel value */ |
35 | short px_y; | 35 | short px_y; |
36 | short val_x; /* touchpad value at the known pixel */ | 36 | short val_x; /* touchscreen value at the known pixel */ |
37 | short val_y; | 37 | short val_y; |
38 | }; | 38 | }; |
39 | void use_calibration(bool enable); | 39 | void use_calibration(bool enable); |
@@ -55,7 +55,7 @@ void use_calibration(bool enable); | |||
55 | 55 | ||
56 | #define BUTTON_TOUCH 0x00000200 | 56 | #define BUTTON_TOUCH 0x00000200 |
57 | 57 | ||
58 | /* Touchpad Screen Area Buttons */ | 58 | /* Touch Screen Area Buttons */ |
59 | #define BUTTON_TOPLEFT 0x00004000 | 59 | #define BUTTON_TOPLEFT 0x00004000 |
60 | #define BUTTON_TOPMIDDLE 0x00008000 | 60 | #define BUTTON_TOPMIDDLE 0x00008000 |
61 | #define BUTTON_TOPRIGHT 0x00010000 | 61 | #define BUTTON_TOPRIGHT 0x00010000 |
@@ -67,8 +67,8 @@ void use_calibration(bool enable); | |||
67 | #define BUTTON_BOTTOMRIGHT 0x00400000 | 67 | #define BUTTON_BOTTOMRIGHT 0x00400000 |
68 | 68 | ||
69 | /* compatibility hacks | 69 | /* compatibility hacks |
70 | not mapped to the touchpad button areas because | 70 | not mapped to the touchscreen button areas because |
71 | the touchpad is not always in that mode */ | 71 | the touchscreen is not always in that mode */ |
72 | #define BUTTON_LEFT BUTTON_RC_REW | 72 | #define BUTTON_LEFT BUTTON_RC_REW |
73 | #define BUTTON_RIGHT BUTTON_RC_FF | 73 | #define BUTTON_RIGHT BUTTON_RC_FF |
74 | 74 | ||
diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx747/button-target.h b/firmware/target/mips/ingenic_jz47xx/onda_vx747/button-target.h index 23ce386cb1..677e4d1c67 100644 --- a/firmware/target/mips/ingenic_jz47xx/onda_vx747/button-target.h +++ b/firmware/target/mips/ingenic_jz47xx/onda_vx747/button-target.h | |||
@@ -44,7 +44,7 @@ void button_set_touch_available(void); | |||
44 | #define BUTTON_UP BUTTON_TOPMIDDLE | 44 | #define BUTTON_UP BUTTON_TOPMIDDLE |
45 | #define BUTTON_DOWN BUTTON_BOTTOMMIDDLE | 45 | #define BUTTON_DOWN BUTTON_BOTTOMMIDDLE |
46 | 46 | ||
47 | /* Touchpad Screen Area Buttons */ | 47 | /* Touch Screen Area Buttons */ |
48 | #define BUTTON_TOPLEFT 0x00000010 | 48 | #define BUTTON_TOPLEFT 0x00000010 |
49 | #define BUTTON_TOPMIDDLE 0x00000020 | 49 | #define BUTTON_TOPMIDDLE 0x00000020 |
50 | #define BUTTON_TOPRIGHT 0x00000040 | 50 | #define BUTTON_TOPRIGHT 0x00000040 |
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c index 843f685226..47ecb2b368 100644 --- a/uisimulator/sdl/button.c +++ b/uisimulator/sdl/button.c | |||
@@ -32,16 +32,16 @@ | |||
32 | 32 | ||
33 | static intptr_t button_data; /* data value from last message dequeued */ | 33 | static intptr_t button_data; /* data value from last message dequeued */ |
34 | 34 | ||
35 | #ifdef HAVE_TOUCHPAD | 35 | #ifdef HAVE_TOUCHSCREEN |
36 | static int mouse_coords = 0; | 36 | static int mouse_coords = 0; |
37 | static enum touchpad_mode touchpad_mode = TOUCHPAD_POINT; | 37 | static enum touchscreen_mode touchscreen_mode = TOUCHSCREEN_POINT; |
38 | void touchpad_set_mode(enum touchpad_mode mode) | 38 | void touchscreen_set_mode(enum touchscreen_mode mode) |
39 | { | 39 | { |
40 | touchpad_mode = mode; | 40 | touchscreen_mode = mode; |
41 | } | 41 | } |
42 | enum touchpad_mode touchpad_get_mode(void) | 42 | enum touchscreen_mode touchscreen_get_mode(void) |
43 | { | 43 | { |
44 | return touchpad_mode; | 44 | return touchscreen_mode; |
45 | } | 45 | } |
46 | #endif | 46 | #endif |
47 | /* how long until repeat kicks in */ | 47 | /* how long until repeat kicks in */ |
@@ -120,23 +120,23 @@ void button_event(int key, bool pressed) | |||
120 | switch (key) | 120 | switch (key) |
121 | { | 121 | { |
122 | 122 | ||
123 | #ifdef HAVE_TOUCHPAD | 123 | #ifdef HAVE_TOUCHSCREEN |
124 | case BUTTON_TOUCHPAD: | 124 | case BUTTON_TOUCHSCREEN: |
125 | data = mouse_coords; | 125 | data = mouse_coords; |
126 | switch (touchpad_mode) | 126 | switch (touchscreen_mode) |
127 | { | 127 | { |
128 | case TOUCHPAD_POINT: | 128 | case TOUCHSCREEN_POINT: |
129 | new_btn = BUTTON_TOUCHPAD; | 129 | new_btn = BUTTON_TOUCHSCREEN; |
130 | break; | 130 | break; |
131 | case TOUCHPAD_BUTTON: | 131 | case TOUCHSCREEN_BUTTON: |
132 | { | 132 | { |
133 | static int touchpad_buttons[3][3] = { | 133 | static int touchscreen_buttons[3][3] = { |
134 | {BUTTON_TOPLEFT, BUTTON_TOPMIDDLE, BUTTON_TOPRIGHT}, | 134 | {BUTTON_TOPLEFT, BUTTON_TOPMIDDLE, BUTTON_TOPRIGHT}, |
135 | {BUTTON_MIDLEFT, BUTTON_CENTER, BUTTON_MIDRIGHT}, | 135 | {BUTTON_MIDLEFT, BUTTON_CENTER, BUTTON_MIDRIGHT}, |
136 | {BUTTON_BOTTOMLEFT, BUTTON_BOTTOMMIDDLE, BUTTON_BOTTOMRIGHT}, | 136 | {BUTTON_BOTTOMLEFT, BUTTON_BOTTOMMIDDLE, BUTTON_BOTTOMRIGHT}, |
137 | }; | 137 | }; |
138 | int px_x = ((data&0xffff0000)>>16), px_y = ((data&0x0000ffff)); | 138 | int px_x = ((data&0xffff0000)>>16), px_y = ((data&0x0000ffff)); |
139 | new_btn = touchpad_buttons[px_y/(LCD_HEIGHT/3)][px_x/(LCD_WIDTH/3)]; | 139 | new_btn = touchscreen_buttons[px_y/(LCD_HEIGHT/3)][px_x/(LCD_WIDTH/3)]; |
140 | break; | 140 | break; |
141 | } | 141 | } |
142 | } | 142 | } |
@@ -171,8 +171,8 @@ void button_event(int key, bool pressed) | |||
171 | case SDLK_F4: | 171 | case SDLK_F4: |
172 | if(pressed) | 172 | if(pressed) |
173 | { | 173 | { |
174 | touchpad_mode = (touchpad_mode == TOUCHPAD_POINT ? TOUCHPAD_BUTTON : TOUCHPAD_POINT); | 174 | touchscreen_mode = (touchscreen_mode == TOUCHSCREEN_POINT ? TOUCHSCREEN_BUTTON : TOUCHSCREEN_POINT); |
175 | printf("Touchpad mode: %s\n", touchpad_mode == TOUCHPAD_POINT ? "TOUCHPAD_POINT" : "TOUCHPAD_BUTTON"); | 175 | printf("Touchscreen mode: %s\n", touchscreen_mode == TOUCHSCREEN_POINT ? "TOUCHSCREEN_POINT" : "TOUCHSCREEN_BUTTON"); |
176 | } | 176 | } |
177 | break; | 177 | break; |
178 | 178 | ||
@@ -1105,7 +1105,7 @@ long button_get_w_tmo(int ticks) | |||
1105 | 1105 | ||
1106 | intptr_t button_get_data(void) | 1106 | intptr_t button_get_data(void) |
1107 | { | 1107 | { |
1108 | #ifdef HAVE_TOUCHPAD | 1108 | #ifdef HAVE_TOUCHSCREEN |
1109 | return button_data; | 1109 | return button_data; |
1110 | #else | 1110 | #else |
1111 | /* Needed by the accelerating wheel driver for Sansa e200 */ | 1111 | /* Needed by the accelerating wheel driver for Sansa e200 */ |
@@ -1113,7 +1113,7 @@ intptr_t button_get_data(void) | |||
1113 | #endif | 1113 | #endif |
1114 | } | 1114 | } |
1115 | 1115 | ||
1116 | #ifdef HAVE_TOUCHPAD | 1116 | #ifdef HAVE_TOUCHSCREEN |
1117 | extern bool debug_wps; | 1117 | extern bool debug_wps; |
1118 | void mouse_tick_task(void) | 1118 | void mouse_tick_task(void) |
1119 | { | 1119 | { |
@@ -1134,7 +1134,7 @@ void mouse_tick_task(void) | |||
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | mouse_coords = (x<<16)|y; | 1136 | mouse_coords = (x<<16)|y; |
1137 | button_event(BUTTON_TOUCHPAD, true); | 1137 | button_event(BUTTON_TOUCHSCREEN, true); |
1138 | if (debug_wps) | 1138 | if (debug_wps) |
1139 | printf("Mouse at: (%d, %d)\n", x, y); | 1139 | printf("Mouse at: (%d, %d)\n", x, y); |
1140 | } | 1140 | } |
@@ -1142,7 +1142,7 @@ void mouse_tick_task(void) | |||
1142 | #endif | 1142 | #endif |
1143 | void button_init(void) | 1143 | void button_init(void) |
1144 | { | 1144 | { |
1145 | #ifdef HAVE_TOUCHPAD | 1145 | #ifdef HAVE_TOUCHSCREEN |
1146 | tick_add_task(mouse_tick_task); | 1146 | tick_add_task(mouse_tick_task); |
1147 | #endif | 1147 | #endif |
1148 | } | 1148 | } |
diff --git a/uisimulator/sdl/uisdl.c b/uisimulator/sdl/uisdl.c index f0e99070e5..156e4203f6 100644 --- a/uisimulator/sdl/uisdl.c +++ b/uisimulator/sdl/uisdl.c | |||
@@ -78,7 +78,7 @@ void gui_message_loop(void) | |||
78 | button_event(event.key.keysym.sym, false); | 78 | button_event(event.key.keysym.sym, false); |
79 | sim_exit_irq_handler(); | 79 | sim_exit_irq_handler(); |
80 | break; | 80 | break; |
81 | #ifndef HAVE_TOUCHPAD | 81 | #ifndef HAVE_TOUCHSCREEN |
82 | case SDL_MOUSEBUTTONDOWN: | 82 | case SDL_MOUSEBUTTONDOWN: |
83 | if (debug_wps && event.button.button == 1) | 83 | if (debug_wps && event.button.button == 1) |
84 | { | 84 | { |
@@ -88,7 +88,7 @@ void gui_message_loop(void) | |||
88 | #else | 88 | #else |
89 | case SDL_MOUSEBUTTONUP: | 89 | case SDL_MOUSEBUTTONUP: |
90 | sim_enter_irq_handler(); | 90 | sim_enter_irq_handler(); |
91 | button_event(BUTTON_TOUCHPAD, false); | 91 | button_event(BUTTON_TOUCHSCREEN, false); |
92 | sim_exit_irq_handler(); | 92 | sim_exit_irq_handler(); |
93 | break; | 93 | break; |
94 | #endif | 94 | #endif |