| Line 89... |
Line 89... |
| 89 |
return CHOOSER_RESULT_OK;
|
89 |
return CHOOSER_RESULT_OK;
|
| 90 |
}
|
90 |
}
|
| 91 |
|
91 |
|
| 92 |
static enum chooser_result chooser_action_handler_wheel_handletick(struct chooser_data* data)
|
92 |
static enum chooser_result chooser_action_handler_wheel_handletick(struct chooser_data* data)
|
| 93 |
{
|
93 |
{
|
| - |
|
94 |
enum chooser_result rc = CHOOSER_RESULT_OK;
|
| 94 |
const struct chooser_action_handler_wheel_params* params;
|
95 |
const struct chooser_action_handler_wheel_params* params;
|
| 95 |
params = (const struct chooser_action_handler_wheel_params*)(data->info->actionhandlerparams);
|
96 |
params = (const struct chooser_action_handler_wheel_params*)(data->info->actionhandlerparams);
|
| 96 |
struct chooser_action_handler_wheel_data* adata;
|
97 |
struct chooser_action_handler_wheel_data* adata;
|
| 97 |
adata = (struct chooser_action_handler_wheel_data*)(data->actionhandlerdata);
|
98 |
adata = (struct chooser_action_handler_wheel_data*)(data->actionhandlerdata);
|
| - |
|
99 |
if (params->tick_force_redraw) rc = CHOOSER_RESULT_REDRAW;
|
| 98 |
if (adata->timeout_remaining == TIMEOUT_BLOCK) return CHOOSER_RESULT_OK;
|
100 |
if (adata->timeout_remaining == TIMEOUT_BLOCK) return rc;
|
| 99 |
long time = USEC_TIMER;
|
101 |
long time = USEC_TIMER;
|
| 100 |
adata->timeout_remaining -= time - adata->lasttick;
|
102 |
adata->timeout_remaining -= time - adata->lasttick;
|
| 101 |
adata->lasttick = time;
|
103 |
adata->lasttick = time;
|
| 102 |
if (adata->timeout_remaining < 0)
|
104 |
if (adata->timeout_remaining < 0)
|
| 103 |
{
|
105 |
{
|
| Line 105... |
Line 107... |
| 105 |
return CHOOSER_RESULT_CANCEL;
|
107 |
return CHOOSER_RESULT_CANCEL;
|
| 106 |
else if (params->timeout_item != CHOOSER_ACTION_HANDLER_WHEEL_TIMEOUT_ITEM_KEEP)
|
108 |
else if (params->timeout_item != CHOOSER_ACTION_HANDLER_WHEEL_TIMEOUT_ITEM_KEEP)
|
| 107 |
data->selected = &data->info->items[params->timeout_item];
|
109 |
data->selected = &data->info->items[params->timeout_item];
|
| 108 |
return CHOOSER_RESULT_FINISHED;
|
110 |
return CHOOSER_RESULT_FINISHED;
|
| 109 |
}
|
111 |
}
|
| 110 |
if (params->tick_force_redraw) return CHOOSER_RESULT_REDRAW;
|
- |
|
| 111 |
return CHOOSER_RESULT_OK;
|
112 |
return rc;
|
| 112 |
}
|
113 |
}
|
| 113 |
|
114 |
|
| 114 |
static int chooser_action_handler_wheel_stepsperitem(struct chooser_data* data)
|
115 |
static int chooser_action_handler_wheel_stepsperitem(struct chooser_data* data)
|
| 115 |
{
|
116 |
{
|
| 116 |
const struct chooser_action_handler_wheel_params* params;
|
117 |
const struct chooser_action_handler_wheel_params* params;
|