forked from len0rd/rockbox
Wheel acceleration for e200. A general acceleration interface intended for use on any scroll target and by any code. A general interface to obtain data associated with most recently dequeued button presses and actions. Use #define HAVE_SCROLLWHEEL and set appropriate constants, values in the scroller driver that feel right.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13959 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3213d4a0f5
commit
873e0fd1ef
11 changed files with 168 additions and 30 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#define _BUTTON_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <inttypes.h>
|
||||
#include "config.h"
|
||||
#include "button-target.h"
|
||||
|
||||
|
|
@ -28,6 +29,7 @@ extern struct event_queue button_queue;
|
|||
void button_init (void);
|
||||
long button_get (bool block);
|
||||
long button_get_w_tmo(int ticks);
|
||||
intptr_t button_get_data(void);
|
||||
int button_status(void);
|
||||
void button_clear_queue(void);
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
|
|
@ -48,6 +50,10 @@ int wheel_status(void);
|
|||
void wheel_send_events(bool send);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SCROLLWHEEL
|
||||
int button_apply_acceleration(unsigned int data, unsigned int factor);
|
||||
#endif
|
||||
|
||||
#define BUTTON_NONE 0x00000000
|
||||
|
||||
/* Button modifiers */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue