#define NEWT_FLAG_HIDDEN (1 << 1)
#define NEWT_FLAG_SCROLL (1 << 2)
#define NEWT_FLAG_DISABLED (1 << 3)
-#define NEWT_FLAG_NOSCROLL (1 << 4) /* for listboxes */
-#define NEWT_FLAG_DOBORDER (1 << 5)
+/* OBSOLETE #define NEWT_FLAG_NOSCROLL (1 << 4) for listboxes */
+#define NEWT_FLAG_BORDER (1 << 5)
#define NEWT_FLAG_WRAP (1 << 6)
#define NEWT_FLAG_NOF12 (1 << 7)
#define NEWT_FLAG_MULTIPLE (1 << 8)
#define NEWT_FLAG_SELECTED (1 << 9)
+#define NEWT_FD_READ (1 << 0)
+#define NEWT_FD_WRITE (1 << 1)
+
/* Backwards compatibility */
#define NEWT_LISTBOX_RETURNEXIT NEWT_FLAG_RETURNEXIT
#define NEWT_ENTRY_SCROLL NEWT_FLAG_SCROLL
#define NEWT_TEXTBOX_SCROLL NEWT_FLAG_SCROLL
#define NEWT_FORM_NOF12 NEWT_FLAG_NOF12
-#define NEWT_FD_READ (1 << 0)
-#define NEWT_FD_WRITE (1 << 1)
+#define newtListboxAddEntry newtListboxAppendEntry
+
typedef struct newtComponent_struct * newtComponent;
void newtPushHelpLine(const char * text);
void newtRedrawHelpLine(void);
void newtPopHelpLine(void);
-void newtDrawRootText(int row, int col, const char * text);
+void newtDrawRootText(int col, int row, const char * text);
void newtBell(void);
/* Components */
void * newtListboxGetCurrent(newtComponent co);
void newtListboxSetCurrent(newtComponent co, int num);
void newtListboxSetCurrentByKey(newtComponent co, void * key);
-void newtListboxSetText(newtComponent co, int num, const char * text);
void newtListboxSetEntry(newtComponent co, int num, const char * text);
void newtListboxSetWidth(newtComponent co, int width);
-/* return the data passed to AddEntry */
void newtListboxSetData(newtComponent co, int num, void * data);
-int newtListboxAddEntry(newtComponent co, const char * text, const void * data);
+int newtListboxAppendEntry(newtComponent co, const char * text,
+ const void * data);
/* Send the key to insert after, or NULL to insert at the top */
int newtListboxInsertEntry(newtComponent co, const char * text, const void * data, void * key);
int newtListboxDeleteEntry(newtComponent co, void * data);
/* Returns an array of data pointers from items, last element is NULL */
void **newtListboxGetSelection(newtComponent co, int *numitems);
void newtListboxClearSelection(newtComponent co);
-void newtListboxSelectItem(newtComponent co, int item,
+void newtListboxSelectItem(newtComponent co, const void * key,
enum newtFlagsSense sense);
newtComponent newtTextboxReflowed(int left, int top, char * text, int width,
int flexDown, int flexUp, int flags);
-newtComponent newtTextbox(int left, int top, int with, int height, int flags);
+newtComponent newtTextbox(int left, int top, int width, int height, int flags);
void newtTextboxSetText(newtComponent co, const char * text);
void newtTextboxSetHeight(newtComponent co, int height);
int newtTextboxGetNumLines(newtComponent co);