]> git.ipfire.org Git - thirdparty/newt.git/blobdiff - newt.h
install python modules to purelib and platlib
[thirdparty/newt.git] / newt.h
diff --git a/newt.h b/newt.h
index 4fcd047859aef679a3bdbcf919097519d6c2b660..07becc75bf4bb9d83a26b6e5f526deee06365916 100644 (file)
--- a/newt.h
+++ b/newt.h
@@ -31,6 +31,8 @@ extern "C" {
 #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
 
@@ -150,17 +152,16 @@ void newtCheckboxSetFlags(newtComponent co, int flags, enum newtFlagsSense sense
 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);
@@ -211,12 +212,13 @@ 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);
+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;
@@ -239,6 +241,8 @@ newtComponent newtRunForm(newtComponent form);              /* obsolete */
 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);
@@ -248,13 +252,20 @@ void newtEntrySet(newtComponent co, const char * value, int cursorAtEnd);
 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);
@@ -306,6 +317,7 @@ void newtComponentDestroy(newtComponent co);
 
 /* 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)