-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmenu.h
67 lines (51 loc) · 1.79 KB
/
menu.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
Calf Box, an open source musical instrument.
Copyright (C) 2010-2011 Krzysztof Foltman
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CBOX_MENU_H
#define CBOX_MENU_H
#include "config.h"
#if USE_NCURSES
#include <ncurses.h>
#include <stdint.h>
#include "menuitem.h"
#include "ui.h"
struct cbox_menu;
struct cbox_menu_item;
struct cbox_menu_page;
struct cbox_menu_state
{
struct cbox_menu_page *page;
struct cbox_menu *menu;
guint cursor;
int yoffset, yspace;
struct cbox_menu_measure size;
WINDOW *window;
void *context;
struct cbox_menu_state *caller;
int menu_is_temporary;
};
extern struct cbox_menu *cbox_menu_new(void);
extern struct cbox_menu_item *cbox_menu_add_item(struct cbox_menu *menu, struct cbox_menu_item *item);
extern void cbox_menu_destroy(struct cbox_menu *menu);
extern struct cbox_menu_state *cbox_menu_state_new(struct cbox_menu_page *page, struct cbox_menu *menu, WINDOW *window, void *context);
extern void cbox_menu_state_destroy(struct cbox_menu_state *st);
struct cbox_menu_page
{
struct cbox_ui_page page;
struct cbox_menu_state *state;
};
extern struct cbox_menu_page *cbox_menu_page_new(void);
extern void cbox_menu_page_destroy(struct cbox_menu_page *st);
#endif
#endif