diff --git a/windows/area.hpp b/windows/area.hpp index e733b84e..86a62de6 100644 --- a/windows/area.hpp +++ b/windows/area.hpp @@ -13,8 +13,8 @@ struct uiArea { BOOL scrolling; int scrollWidth; int scrollHeight; - intmax_t hscrollpos; - intmax_t vscrollpos; + int hscrollpos; + int vscrollpos; int hwheelCarry; int vwheelCarry; diff --git a/windows/areascroll.cpp b/windows/areascroll.cpp index 3e05d0aa..f18d0ad8 100644 --- a/windows/areascroll.cpp +++ b/windows/areascroll.cpp @@ -12,14 +12,14 @@ // - error if these are called without scrollbars? struct scrollParams { - intmax_t *pos; - intmax_t pagesize; - intmax_t length; + int *pos; + int pagesize; + int length; int *wheelCarry; UINT wheelSPIAction; }; -static void scrollto(uiArea *a, int which, struct scrollParams *p, intmax_t pos) +static void scrollto(uiArea *a, int which, struct scrollParams *p, int pos) { SCROLLINFO si; @@ -48,14 +48,14 @@ static void scrollto(uiArea *a, int which, struct scrollParams *p, intmax_t pos) SetScrollInfo(a->hwnd, which, &si, TRUE); } -static void scrollby(uiArea *a, int which, struct scrollParams *p, intmax_t delta) +static void scrollby(uiArea *a, int which, struct scrollParams *p, int delta) { scrollto(a, which, p, *(p->pos) + delta); } static void scroll(uiArea *a, int which, struct scrollParams *p, WPARAM wParam, LPARAM lParam) { - intmax_t pos; + int pos; SCROLLINFO si; pos = *(p->pos); @@ -134,7 +134,7 @@ static void hscrollParams(uiArea *a, struct scrollParams *p) p->wheelSPIAction = SPI_GETWHEELSCROLLCHARS; } -static void hscrollto(uiArea *a, intmax_t pos) +static void hscrollto(uiArea *a, int pos) { struct scrollParams p; @@ -142,7 +142,7 @@ static void hscrollto(uiArea *a, intmax_t pos) scrollto(a, SB_HORZ, &p, pos); } -static void hscrollby(uiArea *a, intmax_t delta) +static void hscrollby(uiArea *a, int delta) { struct scrollParams p; @@ -179,7 +179,7 @@ static void vscrollParams(uiArea *a, struct scrollParams *p) p->wheelSPIAction = SPI_GETWHEELSCROLLLINES; } -static void vscrollto(uiArea *a, intmax_t pos) +static void vscrollto(uiArea *a, int pos) { struct scrollParams p; @@ -187,7 +187,7 @@ static void vscrollto(uiArea *a, intmax_t pos) scrollto(a, SB_VERT, &p, pos); } -static void vscrollby(uiArea *a, intmax_t delta) +static void vscrollby(uiArea *a, int delta) { struct scrollParams p; diff --git a/windows/container.cpp b/windows/container.cpp index 31c93a23..9ec1e280 100644 --- a/windows/container.cpp +++ b/windows/container.cpp @@ -6,6 +6,8 @@ // - uiRadioButtons // - uiSpinbox // - uiTab +// - uiForm +// - uiGrid struct containerInit { uiWindowsControl *c; @@ -23,7 +25,7 @@ static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP struct containerInit *init; uiWindowsControl *c; void (*onResize)(uiWindowsControl *); - intmax_t minwid, minht; + int minwid, minht; LRESULT lResult; if (handleParentMessages(hwnd, uMsg, wParam, lParam, &lResult) != FALSE) diff --git a/windows/menu.cpp b/windows/menu.cpp index bfac0129..6112fc13 100644 --- a/windows/menu.cpp +++ b/windows/menu.cpp @@ -4,8 +4,8 @@ // LONGTERM migrate to std::vector static uiMenu **menus = NULL; -static uintmax_t len = 0; -static uintmax_t cap = 0; +static size_t len = 0; +static size_t cap = 0; static BOOL menusFinalized = FALSE; static WORD curID = 100; // start somewhere safe static BOOL hasQuit = FALSE; @@ -15,8 +15,8 @@ static BOOL hasAbout = FALSE; struct uiMenu { WCHAR *name; uiMenuItem **items; - uintmax_t len; - uintmax_t cap; + size_t len; + size_t cap; }; struct uiMenuItem { @@ -28,8 +28,8 @@ struct uiMenuItem { BOOL disabled; // template for new instances; kept in sync with everything else BOOL checked; HMENU *hmenus; - uintmax_t len; - uintmax_t cap; + size_t len; + size_t cap; }; enum { @@ -45,7 +45,7 @@ enum { static void sync(uiMenuItem *item) { - uintmax_t i; + size_t i; MENUITEMINFOW mi; ZeroMemory(&mi, sizeof (MENUITEMINFOW)); @@ -246,7 +246,7 @@ static void appendMenuItem(HMENU menu, uiMenuItem *item) static HMENU makeMenu(uiMenu *m) { HMENU menu; - uintmax_t i; + size_t i; menu = CreatePopupMenu(); if (menu == NULL) @@ -260,7 +260,7 @@ HMENU makeMenubar(void) { HMENU menubar; HMENU menu; - uintmax_t i; + size_t i; menusFinalized = TRUE; @@ -281,7 +281,7 @@ void runMenuEvent(WORD id, uiWindow *w) { uiMenu *m; uiMenuItem *item; - uintmax_t i, j; + size_t i, j; // this isn't optimal, but it works, and it should be just fine for most cases for (i = 0; i < len; i++) { @@ -306,9 +306,9 @@ found: static void freeMenu(uiMenu *m, HMENU submenu) { - uintmax_t i; + size_t i; uiMenuItem *item; - uintmax_t j; + size_t j; for (i = 0; i < m->len; i++) { item = m->items[i]; @@ -326,7 +326,7 @@ static void freeMenu(uiMenu *m, HMENU submenu) void freeMenubar(HMENU menubar) { - uintmax_t i; + size_t i; MENUITEMINFOW mi; for (i = 0; i < len; i++) { @@ -344,7 +344,7 @@ void uninitMenus(void) { uiMenu *m; uiMenuItem *item; - uintmax_t i, j; + size_t i, j; for (i = 0; i < len; i++) { m = menus[i];