-
Notifications
You must be signed in to change notification settings - Fork 0
/
action_list.h
35 lines (31 loc) · 1008 Bytes
/
action_list.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// action_list.h
// PebbleActionList
//
// Created by CocoaBob on 30/07/15.
// Copyright (c) 2015 CocoaBob. All rights reserved.
//
#pragma once
typedef char* (*ActionListGetTitleCallback)(size_t index, void *context);
typedef bool (*ActionListIsEnabledCallback)(size_t index, void *context);
typedef void (*ActionListSelectCallback)(Window *action_list_window, size_t index, void *context);
typedef struct {
void *context;
size_t num_rows;
size_t default_selection;
#ifdef PBL_COLOR
struct {
GColor background; // Left bar background color
GColor foreground; // Left bar level indicator's color
GColor text;
GColor text_selected;
GColor text_disabled;
} colors;
#endif
struct ActionListCallbacks {
ActionListGetTitleCallback get_title;
ActionListIsEnabledCallback is_enabled;
ActionListSelectCallback select_click;
} callbacks;
} ActionListConfig;
void action_list_open(ActionListConfig *config);