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
#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);
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
#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);
uiWindowsSizing sizing;

View File

@ -112,7 +112,7 @@ uiWindowsControlAllDefaultsExceptDestroy(uiColorButton)
#define buttonHeight 14
// 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);
SIZE size;

View File

@ -113,7 +113,7 @@ uiWindowsControlAllDefaultsExceptDestroy(uiDateTimePicker)
// from http://msdn.microsoft.com/en-us/library/windows/desktop/dn742486.aspx#sizingandspacing
#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);
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 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);
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 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);
uiWindowsSizing sizing;

View File

@ -55,7 +55,7 @@ uiWindowsControlAllDefaultsExceptDestroy(uiFontButton)
// from http://msdn.microsoft.com/en-us/library/windows/desktop/dn742486.aspx#sizingandspacing
#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);
SIZE size;

View File

@ -5,7 +5,7 @@ struct formChild {
uiControl *c;
HWND label;
int stretchy;
intmax_t height;
int height;
};
struct uiForm {
@ -34,13 +34,13 @@ static void formPadding(uiForm *f, int *xpadding, int *ypadding)
static void formRelayout(uiForm *f)
{
RECT r;
intmax_t x, y, width, height;
int x, y, width, height;
int xpadding, ypadding;
uintmax_t nStretchy;
intmax_t labelwid, stretchyht;
intmax_t thiswid;
uintmax_t i;
intmax_t minimumWidth, minimumHeight;
int nStretchy;
int labelwid, stretchyht;
int thiswid;
int i;
int minimumWidth, minimumHeight;
uiWindowsSizing sizing;
int labelht, labelyoff;
@ -152,18 +152,18 @@ static void uiFormSyncEnableState(uiWindowsControl *c, int enabled)
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);
int xpadding, ypadding;
uintmax_t nStretchy;
int nStretchy;
// 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
intmax_t maxLabelWidth, maxControlWidth;
intmax_t maxStretchyHeight;
intmax_t labelwid;
uintmax_t i;
intmax_t minimumWidth, minimumHeight;
int maxLabelWidth, maxControlWidth;
int maxStretchyHeight;
int labelwid;
int i;
int minimumWidth, minimumHeight;
uiWindowsSizing sizing;
*width = 0;
@ -226,7 +226,7 @@ static void formArrangeChildren(uiForm *f)
{
LONG_PTR controlID;
HWND insertAfter;
uintmax_t i;
int i;
controlID = 100;
insertAfter = NULL;

View File

@ -89,11 +89,11 @@ static void uiGroupSyncEnableState(uiWindowsControl *c, int enabled)
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);
int mx, mtop, mbottom;
intmax_t labelWidth;
int labelWidth;
*width = 0;
*height = 0;
@ -164,7 +164,7 @@ static LRESULT CALLBACK groupSubProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
uiGroup *g = uiGroup(dwRefData);
WINDOWPOS *wp = (WINDOWPOS *) lParam;
MINMAXINFO *mmi = (MINMAXINFO *) lParam;
intmax_t minwid, minht;
int minwid, minht;
LRESULT lResult;
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
#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);
uiWindowsSizing sizing;

View File

@ -40,7 +40,7 @@ uiWindowsControlAllDefaultsExceptDestroy(uiMultilineEntry)
// LONGTERM change this for multiline text boxes (longterm because how?)
#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);
uiWindowsSizing sizing;

View File

@ -12,7 +12,7 @@ uiWindowsControlAllDefaults(uiProgressBar)
#define pbarWidth 237
#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);
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
#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);
uiWindowsSizing sizing;

View File

@ -64,7 +64,7 @@ static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
CREATESTRUCTW *cs = (CREATESTRUCTW *) lParam;
WINDOWPOS *wp = (WINDOWPOS *) lParam;
MINMAXINFO *mmi = (MINMAXINFO *) lParam;
intmax_t width, height;
int width, height;
LRESULT lResult;
ww = GetWindowLongPtrW(hwnd, GWLP_USERDATA);
@ -221,7 +221,7 @@ uiWindowsControlDefaultSyncEnableState(uiWindow)
// TODO
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);
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
void ensureMinimumWindowSize(uiWindow *w)
{
intmax_t width, height;
int width, height;
RECT r;
uiWindowsControlMinimumSize(uiWindowsControl(w), &width, &height);