Removed intmax_t from the rest of the public API.

This commit is contained in:
Pietro Gagliardi 2016-06-13 21:23:05 -04:00
parent 864c6c2511
commit 2affdab837
4 changed files with 8 additions and 9 deletions

View File

@ -22,8 +22,7 @@ struct uiWindowsControl {
BOOL visible; BOOL visible;
void (*SyncEnableState)(uiWindowsControl *, int); void (*SyncEnableState)(uiWindowsControl *, int);
void (*SetParentHWND)(uiWindowsControl *, HWND); void (*SetParentHWND)(uiWindowsControl *, HWND);
// TODO consider changing these from intmax_t to int void (*MinimumSize)(uiWindowsControl *, int *, int *);
void (*MinimumSize)(uiWindowsControl *, intmax_t *, intmax_t *);
void (*MinimumSizeChanged)(uiWindowsControl *); void (*MinimumSizeChanged)(uiWindowsControl *);
void (*LayoutRect)(uiWindowsControl *c, RECT *r); void (*LayoutRect)(uiWindowsControl *c, RECT *r);
void (*AssignControlIDZOrder)(uiWindowsControl *, LONG_PTR *, HWND *); void (*AssignControlIDZOrder)(uiWindowsControl *, LONG_PTR *, HWND *);
@ -32,7 +31,7 @@ struct uiWindowsControl {
// TODO document // TODO document
_UI_EXTERN void uiWindowsControlSyncEnableState(uiWindowsControl *, int); _UI_EXTERN void uiWindowsControlSyncEnableState(uiWindowsControl *, int);
_UI_EXTERN void uiWindowsControlSetParentHWND(uiWindowsControl *, HWND); _UI_EXTERN void uiWindowsControlSetParentHWND(uiWindowsControl *, HWND);
_UI_EXTERN void uiWindowsControlMinimumSize(uiWindowsControl *, intmax_t *, intmax_t *); _UI_EXTERN void uiWindowsControlMinimumSize(uiWindowsControl *, int *, int *);
_UI_EXTERN void uiWindowsControlMinimumSizeChanged(uiWindowsControl *); _UI_EXTERN void uiWindowsControlMinimumSizeChanged(uiWindowsControl *);
_UI_EXTERN void uiWindowsControlLayoutRect(uiWindowsControl *, RECT *); _UI_EXTERN void uiWindowsControlLayoutRect(uiWindowsControl *, RECT *);
_UI_EXTERN void uiWindowsControlAssignControlIDZOrder(uiWindowsControl *, LONG_PTR *, HWND *); _UI_EXTERN void uiWindowsControlAssignControlIDZOrder(uiWindowsControl *, LONG_PTR *, HWND *);
@ -201,11 +200,11 @@ _UI_EXTERN char *uiWindowsWindowText(HWND hwnd);
_UI_EXTERN void uiWindowsSetWindowText(HWND hwnd, const char *text); _UI_EXTERN void uiWindowsSetWindowText(HWND hwnd, const char *text);
// TODO document // TODO document
_UI_EXTERN intmax_t uiWindowsWindowTextWidth(HWND hwnd); _UI_EXTERN int uiWindowsWindowTextWidth(HWND hwnd);
// TODO document // TODO document
// TODO point out this should only be used in a resize cycle // TODO point out this should only be used in a resize cycle
_UI_EXTERN void uiWindowsEnsureMoveWindowDuringResize(HWND hwnd, intmax_t x, intmax_t y, intmax_t width, intmax_t height); _UI_EXTERN void uiWindowsEnsureMoveWindowDuringResize(HWND hwnd, int x, int y, int width, int height);
// TODO document // TODO document
_UI_EXTERN void uiWindowsRegisterWM_COMMANDHandler(HWND hwnd, BOOL (*handler)(uiControl *, HWND, WORD, LRESULT *), uiControl *c); _UI_EXTERN void uiWindowsRegisterWM_COMMANDHandler(HWND hwnd, BOOL (*handler)(uiControl *, HWND, WORD, LRESULT *), uiControl *c);

View File

@ -11,7 +11,7 @@ void uiWindowsControlSetParentHWND(uiWindowsControl *c, HWND parent)
(*(c->SetParentHWND))(c, parent); (*(c->SetParentHWND))(c, parent);
} }
void uiWindowsControlMinimumSize(uiWindowsControl *c, intmax_t *width, intmax_t *height) void uiWindowsControlMinimumSize(uiWindowsControl *c, int *width, int *height)
{ {
(*(c->MinimumSize))(c, width, height); (*(c->MinimumSize))(c, width, height);
} }
@ -87,7 +87,7 @@ void uiWindowsControlAssignSoleControlIDZOrder(uiWindowsControl *c)
BOOL uiWindowsControlTooSmall(uiWindowsControl *c) BOOL uiWindowsControlTooSmall(uiWindowsControl *c)
{ {
RECT r; RECT r;
intmax_t width, height; int width, height;
uiWindowsControlLayoutRect(c, &r); uiWindowsControlLayoutRect(c, &r);
uiWindowsControlMinimumSize(c, &width, &height); uiWindowsControlMinimumSize(c, &width, &height);

View File

@ -38,7 +38,7 @@ void uiFreeText(char *text)
uiFree(text); uiFree(text);
} }
intmax_t uiWindowsWindowTextWidth(HWND hwnd) int uiWindowsWindowTextWidth(HWND hwnd)
{ {
LRESULT len; LRESULT len;
WCHAR *text; WCHAR *text;

View File

@ -23,7 +23,7 @@ void uiWindowsEnsureAssignControlIDZOrder(HWND hwnd, LONG_PTR *controlID, HWND *
*insertAfter = hwnd; *insertAfter = hwnd;
} }
void uiWindowsEnsureMoveWindowDuringResize(HWND hwnd, intmax_t x, intmax_t y, intmax_t width, intmax_t height) void uiWindowsEnsureMoveWindowDuringResize(HWND hwnd, int x, int y, int width, int height)
{ {
RECT r; RECT r;