-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyvonne-remote-ui.h
69 lines (54 loc) · 1.92 KB
/
yvonne-remote-ui.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
68
/*****************************************************
* This file is part of yvonne-remote.
* ( ncurses terminal interface )
*
* 2018, Jérôme Blanchi aka d.j.a.y
* http://github.com/d-j-a-y/yvonne-remote
*
* yvonne-remote 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
* 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 __YVONNEREMOTEUI__
#define __YVONNEREMOTEUI__
#include <stdarg.h>
#include <ncurses.h>
#define YRC_MENU_WIDTH 30
#define YRC_MENU_HEIGHT 10
#define YRC_MENU_ENTRY_NO -1
#define YRC_UI_FOOTER_H (4)
#define YRC_UI_INDEX_X (COLS-12)
#define YRC_UI_INDEX_TEXT_L (8)
typedef enum
{
YVONNE_MSG_ERROR,
YVONNE_MSG_WARNING,
YVONNE_MSG_INFO,
YVONNE_MSG_UI,
YVONNE_MSG_VIDEO_BANNER
} YvonneMsgType;
int yrc_uiSetup (void);
int yrc_uiRestore (void);
int yrc_menuOpen (void);
int yrc_menuClose (void);
void yrc_menuPrint (int highlight);
int yrc_menuCheckEntry (WINDOW* win, int *highlight);
int yrc_errorOpen (void);
int yrc_errorClose (void);
void yrc_stateMachineLocal (volatile sig_atomic_t *yrc_stateField);
void yrc_coloredPrintf (YvonneMsgType msgType, char* message, ...);
void yrc_uiPrintHelp (void);
void yrc_uiPrintLayout (void);
void yrc_uiPrintMediaIndex (int currentPhoto, int currentVideo);
void yrc_uiPrintMessage (YvonneMsgType msgType, char* errorMessage, ...);
#endif //__YVONNEREMOTEUI__