5 char * rootFg
, * rootBg
;
6 char * borderFg
, * borderBg
;
7 char * windowFg
, * windowBg
;
8 char * shadowFg
, * shadowBg
;
9 char * titleFg
, * titleBg
;
10 char * buttonFg
, * buttonBg
;
11 char * actButtonFg
, * actButtonBg
;
12 char * checkboxFg
, * checkboxBg
;
13 char * actCheckboxFg
, * actCheckboxBg
;
14 char * entryFg
, * entryBg
;
17 extern struct newtColors newtDefaultColorPalette
;
20 int newtFinished(void);
22 void newtWaitForKey(void);
23 void newtClearKeyBuffer(void);
24 void newtDelay(int usecs
);
25 /* top, left are *not* counting the border */
26 int newtOpenWindow(int left
, int top
, int width
, int height
,
28 void newtPopWindow(void);
29 void newtSetColors(struct newtColors colors
);
30 void newtRefresh(void);
34 typedef struct newtComponent
* newtComponent
;
35 typedef struct newtForm
* newtForm
;
37 newtComponent
newtButton(int left
, int top
, char * text
);
38 newtComponent
newtCheckbox(int left
, int top
, char * text
, char defValue
,
39 char * seq
, char * result
);
40 newtComponent
newtRadiobutton(int left
, int top
, char * text
, int isDefault
,
41 newtComponent prevButton
);
43 #define NEWT_ENTRY_SCROLL (1 << 0)
44 #define NEWT_ENTRY_HIDDEN (1 << 1)
46 newtComponent
newtEntry(int left
, int top
, char * initialValue
, int width
,
47 char ** resultPtr
, int flags
);
51 newtForm
newtCreateForm(void);
52 void newtAddComponentToForm(newtForm form
, newtComponent co
);
53 void newtAddComponentsToForm(newtForm form
, ...);
54 newtComponent
newtRunForm(newtForm form
);
56 /* this also destroys all of the components on the form */
57 void newtDestroyForm(newtForm form
);
61 #define NEWT_KEY_TAB '\t'
62 #define NEWT_KEY_ENTER '\r'
63 #define NEWT_KEY_RETURN NEWT_KEY_ENTER
65 #define NEWT_KEY_EXTRA_BASE 0x8000
66 #define NEWT_KEY_UP NEWT_KEY_EXTRA_BASE + 1
67 #define NEWT_KEY_DOWN NEWT_KEY_EXTRA_BASE + 2
68 #define NEWT_KEY_LEFT NEWT_KEY_EXTRA_BASE + 4
69 #define NEWT_KEY_RIGHT NEWT_KEY_EXTRA_BASE + 5
70 #define NEWT_KEY_BKSPC NEWT_KEY_EXTRA_BASE + 6
71 #define NEWT_KEY_DELETE NEWT_KEY_EXTRA_BASE + 7
72 #define NEWT_KEY_HOME NEWT_KEY_EXTRA_BASE + 8
73 #define NEWT_KEY_END NEWT_KEY_EXTRA_BASE + 9