#define NEWT_COLORSET_ACTSELLISTBOX 23
#define NEWT_COLORSET_SELLISTBOX 24
+#define NEWT_COLORSET_CUSTOM(x) (30 + (x))
+
#define NEWT_ARG_LAST -100000
#define NEWT_ARG_APPEND -1
newtComponent newtRadiobutton(int left, int top, const char * text, int isDefault,
newtComponent prevButton);
newtComponent newtRadioGetCurrent(newtComponent setMember);
-newtComponent newtListitem(int left, int top, const char * text, int isDefault,
- newtComponent prevItem, const void * data, int flags);
-void newtListitemSet(newtComponent co, const char * text);
-void * newtListitemGetData(newtComponent co);
+void newtRadioSetCurrent(newtComponent setMember);
void newtGetScreenSize(int * cols, int * rows);
newtComponent newtLabel(int left, int top, const char * text);
void newtLabelSetText(newtComponent co, const char * text);
+void newtLabelSetColors(newtComponent co, int colorset);
newtComponent newtVerticalScrollbar(int left, int top, int height,
int normalColorset, int thumbColorset);
void newtScrollbarSet(newtComponent co, int where, int total);
+void newtScrollbarSetColors(newtComponent co, int normal, int thumb);
newtComponent newtListbox(int left, int top, int height, int flags);
void * newtListboxGetCurrent(newtComponent co);
void newtTextboxSetText(newtComponent co, const char * text);
void newtTextboxSetHeight(newtComponent co, int height);
int newtTextboxGetNumLines(newtComponent co);
+void newtTextboxSetColors(newtComponent co, int normal, int active);
char * newtReflowText(char * text, int width, int flexDown, int flexUp,
int * actualWidth, int * actualHeight);
struct newtExitStruct {
enum { NEWT_EXIT_HOTKEY, NEWT_EXIT_COMPONENT, NEWT_EXIT_FDREADY,
- NEWT_EXIT_TIMER } reason;
+ NEWT_EXIT_TIMER, NEWT_EXIT_ERROR } reason;
union {
int watch;
int key;
void newtFormRun(newtComponent co, struct newtExitStruct * es);
void newtDrawForm(newtComponent form);
void newtFormAddHotKey(newtComponent co, int key);
+int newtFormGetScrollPosition(newtComponent co);
+void newtFormSetScrollPosition(newtComponent co, int position);
typedef int (*newtEntryFilter)(newtComponent entry, void * data, int ch,
int cursor);
void newtEntrySetFilter(newtComponent co, newtEntryFilter filter, void * data);
char * newtEntryGetValue(newtComponent co);
void newtEntrySetFlags(newtComponent co, int flags, enum newtFlagsSense sense);
+void newtEntrySetColors(newtComponent co, int normal, int disabled);
+int newtEntryGetCursorPosition(newtComponent co);
+void newtEntrySetCursorPosition(newtComponent co, int position);
newtComponent newtScale(int left, int top, int width, long long fullValue);
void newtScaleSet(newtComponent co, unsigned long long amount);
+void newtScaleSetColors(newtComponent co, int empty, int full);
void newtComponentAddCallback(newtComponent co, newtCallback f, void * data);
void newtComponentTakesFocus(newtComponent co, int val);
+void newtComponentGetPosition(newtComponent co, int * left, int * top);
+void newtComponentGetSize(newtComponent co, int * width, int * height);
+
/* This callback is called when a component is destroyed. */
void newtComponentAddDestroyCallback(newtComponent co,
newtCallback f, void * data);
/* not really a key, but newtGetKey returns it */
#define NEWT_KEY_RESIZE NEWT_KEY_EXTRA_BASE + 113
+#define NEWT_KEY_ERROR NEWT_KEY_EXTRA_BASE + 114
#define NEWT_ANCHOR_LEFT (1 << 0)
#define NEWT_ANCHOR_RIGHT (1 << 1)