diff options
| author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-08-02 07:05:30 +0000 |
|---|---|---|
| committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-08-02 07:05:30 +0000 |
| commit | 0131a3873e0cb05bd357326b441f2cbc1884c657 (patch) | |
| tree | bf224f3e36c3b052f3583d5692eae12d9c922f55 /apps/plugins/lib/pluginlib_touchscreen.h | |
| parent | e9b061a7174298c61dd1f935a38654e07f573197 (diff) | |
| download | rockbox-0131a3873e0cb05bd357326b441f2cbc1884c657.zip rockbox-0131a3873e0cb05bd357326b441f2cbc1884c657.tar.gz rockbox-0131a3873e0cb05bd357326b441f2cbc1884c657.tar.bz2 rockbox-0131a3873e0cb05bd357326b441f2cbc1884c657.tar.xz | |
Pluginlib: Add support for general buttons. Add menu and quit buttons to Reversi. MRobe 500: Modify touch handler to return the previous data always rather than 0 when there is no touch.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22110 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to '')
| -rw-r--r-- | apps/plugins/lib/pluginlib_touchscreen.h (renamed from apps/plugins/lib/touchscreen.h) | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/apps/plugins/lib/touchscreen.h b/apps/plugins/lib/pluginlib_touchscreen.h index cd5251e..f278765 100644 --- a/apps/plugins/lib/touchscreen.h +++ b/apps/plugins/lib/pluginlib_touchscreen.h @@ -8,6 +8,7 @@ * $Id$ * * Copyright (C) 2008 by Maurus Cuelenaere +* Copyright (C) 2009 by Karl Kurbjun * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -26,6 +27,28 @@ #ifdef HAVE_TOUCHSCREEN +/******************************************************************************* + * Touchbutton + ******************************************************************************/ +struct touchbutton { + /* Each button has it's own viewport to define colors, drawstyle, location*/ + struct viewport vp; + bool repeat; /* requires the area be held for the action */ + int action; /* action this button will return */ + bool invisible; /* Is this an invisible button? */ + char *title; /* Specify a title */ + fb_data *pixmap; /* Currently unused, but will allow for a graphic */ +}; + +/* Get: tests for a button press and returns action. */ +int touchbutton_get(struct touchbutton *data, int button, int num_buttons); +/* Draw: Draws all visible buttons */ +void touchbutton_draw(struct touchbutton *data, int num_buttons); + + +/******************************************************************************* + * Touch mapping + ******************************************************************************/ struct ts_mapping { int tl_x; /* top left */ |