Removed most of the intmax_ts, which are all MinimumSize()s.

This commit is contained in:
Pietro Gagliardi 2016-06-13 21:54:15 -04:00
parent 8c974e7b77
commit 4524ffce5e
14 changed files with 32 additions and 32 deletions

View File

@ -33,7 +33,7 @@ uiWindowsControlAllDefaultsExceptDestroy(uiButton)
// from http://msdn.microsoft.com/en-us/library/windows/desktop/dn742486.aspx#sizingandspacing // from http://msdn.microsoft.com/en-us/library/windows/desktop/dn742486.aspx#sizingandspacing
#define buttonHeight 14 #define buttonHeight 14
static void uiButtonMinimumSize(uiWindowsControl *c, intmax_t *width, intmax_t *height) static void uiButtonMinimumSize(uiWindowsControl *c, int *width, int *height)
{ {
uiButton *b = uiButton(c); uiButton *b = uiButton(c);
SIZE size; SIZE size;

View File

@ -43,7 +43,7 @@ uiWindowsControlAllDefaultsExceptDestroy(uiCheckbox)
// from http://msdn.microsoft.com/en-us/library/windows/desktop/bb226818%28v=vs.85%29.aspx // from http://msdn.microsoft.com/en-us/library/windows/desktop/bb226818%28v=vs.85%29.aspx
#define checkboxXFromLeftOfBoxToLeftOfLabel 12 #define checkboxXFromLeftOfBoxToLeftOfLabel 12
static void uiCheckboxMinimumSize(uiWindowsControl *cc, intmax_t *width, intmax_t *height) static void uiCheckboxMinimumSize(uiWindowsControl *cc, int *width, int *height)
{ {
uiCheckbox *c = uiCheckbox(cc); uiCheckbox *c = uiCheckbox(cc);
uiWindowsSizing sizing; uiWindowsSizing sizing;

View File

@ -112,7 +112,7 @@ uiWindowsControlAllDefaultsExceptDestroy(uiColorButton)
#define buttonHeight 14 #define buttonHeight 14
// TODO check widths // TODO check widths
static void uiColorButtonMinimumSize(uiWindowsControl *c, intmax_t *width, intmax_t *height) static void uiColorButtonMinimumSize(uiWindowsControl *c, int *width, int *height)
{ {
uiColorButton *b = uiColorButton(c); uiColorButton *b = uiColorButton(c);
SIZE size; SIZE size;

View File

@ -113,7 +113,7 @@ uiWindowsControlAllDefaultsExceptDestroy(uiDateTimePicker)
// from http://msdn.microsoft.com/en-us/library/windows/desktop/dn742486.aspx#sizingandspacing // from http://msdn.microsoft.com/en-us/library/windows/desktop/dn742486.aspx#sizingandspacing
#define entryHeight 14 #define entryHeight 14
static void uiDateTimePickerMinimumSize(uiWindowsControl *c, intmax_t *width, intmax_t *height) static void uiDateTimePickerMinimumSize(uiWindowsControl *c, int *width, int *height)
{ {
uiDateTimePicker *d = uiDateTimePicker(c); uiDateTimePicker *d = uiDateTimePicker(c);
SIZE s; SIZE s;

View File

@ -46,7 +46,7 @@ uiWindowsControlAllDefaultsExceptDestroy(uiEditableCombobox)
#define comboboxWidth 107 /* this is actually the shorter progress bar width, but Microsoft only indicates as wide as necessary; LONGTERM */ #define comboboxWidth 107 /* this is actually the shorter progress bar width, but Microsoft only indicates as wide as necessary; LONGTERM */
#define comboboxHeight 14 /* LONGTERM: is this too high? */ #define comboboxHeight 14 /* LONGTERM: is this too high? */
static void uiEditableComboboxMinimumSize(uiWindowsControl *cc, intmax_t *width, intmax_t *height) static void uiEditableComboboxMinimumSize(uiWindowsControl *cc, int *width, int *height)
{ {
uiEditableCombobox *c = uiEditableCombobox(cc); uiEditableCombobox *c = uiEditableCombobox(cc);
uiWindowsSizing sizing; uiWindowsSizing sizing;

View File

@ -37,7 +37,7 @@ uiWindowsControlAllDefaultsExceptDestroy(uiEntry)
#define entryWidth 107 /* this is actually the shorter progress bar width, but Microsoft only indicates as wide as necessary */ #define entryWidth 107 /* this is actually the shorter progress bar width, but Microsoft only indicates as wide as necessary */
#define entryHeight 14 #define entryHeight 14
static void uiEntryMinimumSize(uiWindowsControl *c, intmax_t *width, intmax_t *height) static void uiEntryMinimumSize(uiWindowsControl *c, int *width, int *height)
{ {
uiEntry *e = uiEntry(c); uiEntry *e = uiEntry(c);
uiWindowsSizing sizing; uiWindowsSizing sizing;

View File

@ -55,7 +55,7 @@ uiWindowsControlAllDefaultsExceptDestroy(uiFontButton)
// from http://msdn.microsoft.com/en-us/library/windows/desktop/dn742486.aspx#sizingandspacing // from http://msdn.microsoft.com/en-us/library/windows/desktop/dn742486.aspx#sizingandspacing
#define buttonHeight 14 #define buttonHeight 14
static void uiFontButtonMinimumSize(uiWindowsControl *c, intmax_t *width, intmax_t *height) static void uiFontButtonMinimumSize(uiWindowsControl *c, int *width, int *height)
{ {
uiFontButton *b = uiFontButton(c); uiFontButton *b = uiFontButton(c);
SIZE size; SIZE size;

View File

@ -5,7 +5,7 @@ struct formChild {
uiControl *c; uiControl *c;
HWND label; HWND label;
int stretchy; int stretchy;
intmax_t height; int height;
}; };
struct uiForm { struct uiForm {
@ -34,13 +34,13 @@ static void formPadding(uiForm *f, int *xpadding, int *ypadding)
static void formRelayout(uiForm *f) static void formRelayout(uiForm *f)
{ {
RECT r; RECT r;
intmax_t x, y, width, height; int x, y, width, height;
int xpadding, ypadding; int xpadding, ypadding;
uintmax_t nStretchy; int nStretchy;
intmax_t labelwid, stretchyht; int labelwid, stretchyht;
intmax_t thiswid; int thiswid;
uintmax_t i; int i;
intmax_t minimumWidth, minimumHeight; int minimumWidth, minimumHeight;
uiWindowsSizing sizing; uiWindowsSizing sizing;
int labelht, labelyoff; int labelht, labelyoff;
@ -152,18 +152,18 @@ static void uiFormSyncEnableState(uiWindowsControl *c, int enabled)
uiWindowsControlDefaultSetParentHWND(uiForm) uiWindowsControlDefaultSetParentHWND(uiForm)
static void uiFormMinimumSize(uiWindowsControl *c, intmax_t *width, intmax_t *height) static void uiFormMinimumSize(uiWindowsControl *c, int *width, int *height)
{ {
uiForm *f = uiForm(c); uiForm *f = uiForm(c);
int xpadding, ypadding; int xpadding, ypadding;
uintmax_t nStretchy; int nStretchy;
// these two contain the largest minimum width and height of all stretchy controls in the form // these two contain the largest minimum width and height of all stretchy controls in the form
// all stretchy controls will use this value to determine the final minimum size // all stretchy controls will use this value to determine the final minimum size
intmax_t maxLabelWidth, maxControlWidth; int maxLabelWidth, maxControlWidth;
intmax_t maxStretchyHeight; int maxStretchyHeight;
intmax_t labelwid; int labelwid;
uintmax_t i; int i;
intmax_t minimumWidth, minimumHeight; int minimumWidth, minimumHeight;
uiWindowsSizing sizing; uiWindowsSizing sizing;
*width = 0; *width = 0;
@ -226,7 +226,7 @@ static void formArrangeChildren(uiForm *f)
{ {
LONG_PTR controlID; LONG_PTR controlID;
HWND insertAfter; HWND insertAfter;
uintmax_t i; int i;
controlID = 100; controlID = 100;
insertAfter = NULL; insertAfter = NULL;

View File

@ -89,11 +89,11 @@ static void uiGroupSyncEnableState(uiWindowsControl *c, int enabled)
uiWindowsControlDefaultSetParentHWND(uiGroup) uiWindowsControlDefaultSetParentHWND(uiGroup)
static void uiGroupMinimumSize(uiWindowsControl *c, intmax_t *width, intmax_t *height) static void uiGroupMinimumSize(uiWindowsControl *c, int *width, int *height)
{ {
uiGroup *g = uiGroup(c); uiGroup *g = uiGroup(c);
int mx, mtop, mbottom; int mx, mtop, mbottom;
intmax_t labelWidth; int labelWidth;
*width = 0; *width = 0;
*height = 0; *height = 0;
@ -164,7 +164,7 @@ static LRESULT CALLBACK groupSubProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
uiGroup *g = uiGroup(dwRefData); uiGroup *g = uiGroup(dwRefData);
WINDOWPOS *wp = (WINDOWPOS *) lParam; WINDOWPOS *wp = (WINDOWPOS *) lParam;
MINMAXINFO *mmi = (MINMAXINFO *) lParam; MINMAXINFO *mmi = (MINMAXINFO *) lParam;
intmax_t minwid, minht; int minwid, minht;
LRESULT lResult; LRESULT lResult;
if (handleParentMessages(hwnd, uMsg, wParam, lParam, &lResult) != FALSE) if (handleParentMessages(hwnd, uMsg, wParam, lParam, &lResult) != FALSE)

View File

@ -11,7 +11,7 @@ uiWindowsControlAllDefaults(uiLabel)
// via http://msdn.microsoft.com/en-us/library/windows/desktop/dn742486.aspx#sizingandspacing // via http://msdn.microsoft.com/en-us/library/windows/desktop/dn742486.aspx#sizingandspacing
#define labelHeight 8 #define labelHeight 8
static void uiLabelMinimumSize(uiWindowsControl *c, intmax_t *width, intmax_t *height) static void uiLabelMinimumSize(uiWindowsControl *c, int *width, int *height)
{ {
uiLabel *l = uiLabel(c); uiLabel *l = uiLabel(c);
uiWindowsSizing sizing; uiWindowsSizing sizing;

View File

@ -40,7 +40,7 @@ uiWindowsControlAllDefaultsExceptDestroy(uiMultilineEntry)
// LONGTERM change this for multiline text boxes (longterm because how?) // LONGTERM change this for multiline text boxes (longterm because how?)
#define entryHeight 14 #define entryHeight 14
static void uiMultilineEntryMinimumSize(uiWindowsControl *c, intmax_t *width, intmax_t *height) static void uiMultilineEntryMinimumSize(uiWindowsControl *c, int *width, int *height)
{ {
uiMultilineEntry *e = uiMultilineEntry(c); uiMultilineEntry *e = uiMultilineEntry(c);
uiWindowsSizing sizing; uiWindowsSizing sizing;

View File

@ -12,7 +12,7 @@ uiWindowsControlAllDefaults(uiProgressBar)
#define pbarWidth 237 #define pbarWidth 237
#define pbarHeight 8 #define pbarHeight 8
static void uiProgressBarMinimumSize(uiWindowsControl *c, intmax_t *width, intmax_t *height) static void uiProgressBarMinimumSize(uiWindowsControl *c, int *width, int *height)
{ {
uiProgressBar *p = uiProgressBar(c); uiProgressBar *p = uiProgressBar(c);
uiWindowsSizing sizing; uiWindowsSizing sizing;

View File

@ -15,7 +15,7 @@ uiWindowsControlAllDefaults(uiSeparator)
// via https://msdn.microsoft.com/en-us/library/windows/desktop/bb226818%28v=vs.85%29.aspx // via https://msdn.microsoft.com/en-us/library/windows/desktop/bb226818%28v=vs.85%29.aspx
#define separatorHeight 1 #define separatorHeight 1
static void uiSeparatorMinimumSize(uiWindowsControl *c, intmax_t *width, intmax_t *height) static void uiSeparatorMinimumSize(uiWindowsControl *c, int *width, int *height)
{ {
uiSeparator *s = uiSeparator(c); uiSeparator *s = uiSeparator(c);
uiWindowsSizing sizing; uiWindowsSizing sizing;

View File

@ -64,7 +64,7 @@ static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
CREATESTRUCTW *cs = (CREATESTRUCTW *) lParam; CREATESTRUCTW *cs = (CREATESTRUCTW *) lParam;
WINDOWPOS *wp = (WINDOWPOS *) lParam; WINDOWPOS *wp = (WINDOWPOS *) lParam;
MINMAXINFO *mmi = (MINMAXINFO *) lParam; MINMAXINFO *mmi = (MINMAXINFO *) lParam;
intmax_t width, height; int width, height;
LRESULT lResult; LRESULT lResult;
ww = GetWindowLongPtrW(hwnd, GWLP_USERDATA); ww = GetWindowLongPtrW(hwnd, GWLP_USERDATA);
@ -221,7 +221,7 @@ uiWindowsControlDefaultSyncEnableState(uiWindow)
// TODO // TODO
uiWindowsControlDefaultSetParentHWND(uiWindow) uiWindowsControlDefaultSetParentHWND(uiWindow)
static void uiWindowMinimumSize(uiWindowsControl *c, intmax_t *width, intmax_t *height) static void uiWindowMinimumSize(uiWindowsControl *c, int *width, int *height)
{ {
uiWindow *w = uiWindow(c); uiWindow *w = uiWindow(c);
uiWindowsSizing sizing; uiWindowsSizing sizing;
@ -375,7 +375,7 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar)
// this cannot queue a resize because it's called by the resize handler // this cannot queue a resize because it's called by the resize handler
void ensureMinimumWindowSize(uiWindow *w) void ensureMinimumWindowSize(uiWindow *w)
{ {
intmax_t width, height; int width, height;
RECT r; RECT r;
uiWindowsControlMinimumSize(uiWindowsControl(w), &width, &height); uiWindowsControlMinimumSize(uiWindowsControl(w), &width, &height);