Subversion Repositories freemyipod

Rev

Rev 504 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
504 theseven 1
//
2
//
3
//    Copyright 2011 TheSeven
4
//
5
//
6
//    This file is part of emCORE.
7
//
8
//    emCORE is free software: you can redistribute it and/or
9
//    modify it under the terms of the GNU General Public License as
10
//    published by the Free Software Foundation, either version 2 of the
11
//    License, or (at your option) any later version.
12
//
13
//    emCORE is distributed in the hope that it will be useful,
14
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
//    See the GNU General Public License for more details.
17
//
18
//    You should have received a copy of the GNU General Public License along
19
//    with emCORE.  If not, see <http://www.gnu.org/licenses/>.
20
//
21
//
22
 
23
 
24
#ifndef __CHOOSER_ACTION_HANDLER_WHEEL_H__
25
#define __CHOOSER_ACTION_HANDLER_WHEEL_H__
26
 
27
#include "emcorelib.h"
28
#include "libui.h"
29
#include "chooser.h"
30
 
31
 
32
enum chooser_action_handler_wheel_action
33
{
34
    CHOOSER_ACTION_HANDLER_WHEEL_ACTION_NONE = 0,
35
    CHOOSER_ACTION_HANDLER_WHEEL_ACTION_PREV,
36
    CHOOSER_ACTION_HANDLER_WHEEL_ACTION_NEXT,
37
    CHOOSER_ACTION_HANDLER_WHEEL_ACTION_SELECT,
38
    CHOOSER_ACTION_HANDLER_WHEEL_ACTION_CANCEL
39
};
40
 
526 theseven 41
#define CHOOSER_ACTION_HANDLER_WHEEL_TIMEOUT_ITEM_NULL -1
42
#define CHOOSER_ACTION_HANDLER_WHEEL_TIMEOUT_ITEM_KEEP -2
43
 
504 theseven 44
#define CHOOSER_ACTION_HANDLER_WHEEL_PARAMS_VERSION 1
45
 
46
struct chooser_action_handler_wheel_params
47
{
48
    int version;
49
    int stepsperitem;
50
    bool (*eventfilter)(struct chooser_data* data, enum button_event event, int which, int value);
526 theseven 51
    long timeout_initial;
52
    long timeout_idle;
53
    int timeout_item;
54
    bool tick_force_redraw;
504 theseven 55
    int buttoncount;
56
    enum chooser_action_handler_wheel_action buttonmap[];
57
};
58
 
526 theseven 59
struct chooser_action_handler_wheel_data
60
{
61
    long timeout_remaining;
62
    long lasttick;
63
};
504 theseven 64
 
526 theseven 65
 
504 theseven 66
extern const struct chooser_action_handler chooser_action_handler_wheel;
67
 
68
 
69
#endif