Started replacement of intmax_t and uintmax_t with int.

This commit is contained in:
Pietro Gagliardi 2016-06-13 20:46:11 -04:00
parent 857bbbf506
commit b26354d1e7
4 changed files with 20 additions and 21 deletions

View File

@ -14,7 +14,7 @@
NSMutableArray *children;
BOOL vertical;
int padded;
uintmax_t nStretchy;
int nStretchy;
NSLayoutConstraint *first;
NSMutableArray *inBetweens;
@ -36,7 +36,7 @@
- (CGFloat)paddingAmount;
- (void)establishOurConstraints;
- (void)append:(uiControl *)c stretchy:(int)stretchy;
- (void)delete:(uintmax_t)n;
- (void)delete:(int)n;
- (int)isPadded;
- (void)setPadded:(int)p;
- (BOOL)hugsTrailing;
@ -249,7 +249,7 @@ struct uiBox {
{
boxChild *bc;
NSLayoutPriority priority;
uintmax_t oldnStretchy;
int oldnStretchy;
bc = [boxChild new];
bc.c = c;
@ -285,7 +285,7 @@ struct uiBox {
[bc release]; // we don't need the initial reference now
}
- (void)delete:(uintmax_t)n
- (void)delete:(int)n
{
boxChild *bc;
int stretchy;
@ -405,7 +405,7 @@ void uiBoxAppend(uiBox *b, uiControl *c, int stretchy)
[b->view append:c stretchy:stretchy];
}
void uiBoxDelete(uiBox *b, uintmax_t n)
void uiBoxDelete(uiBox *b, int n)
{
[b->view delete:n];
}

2
ui.h
View File

@ -113,7 +113,7 @@ _UI_EXTERN uiButton *uiNewButton(const char *text);
typedef struct uiBox uiBox;
#define uiBox(this) ((uiBox *) (this))
_UI_EXTERN void uiBoxAppend(uiBox *b, uiControl *child, int stretchy);
_UI_EXTERN void uiBoxDelete(uiBox *b, uintmax_t index);
_UI_EXTERN void uiBoxDelete(uiBox *b, int index);
_UI_EXTERN int uiBoxPadded(uiBox *b);
_UI_EXTERN void uiBoxSetPadded(uiBox *b, int padded);
_UI_EXTERN uiBox *uiNewHorizontalBox(void);

View File

@ -88,7 +88,7 @@ void uiBoxAppend(uiBox *b, uiControl *c, int stretchy)
g_array_append_val(b->controls, bc);
}
void uiBoxDelete(uiBox *b, uintmax_t index)
void uiBoxDelete(uiBox *b, int index)
{
struct boxChild *bc;
GtkWidget *widget;

View File

@ -4,8 +4,8 @@
struct boxChild {
uiControl *c;
int stretchy;
intmax_t width;
intmax_t height;
int width;
int height;
};
struct uiBox {
@ -31,12 +31,12 @@ static void boxPadding(uiBox *b, int *xpadding, int *ypadding)
static void boxRelayout(uiBox *b)
{
RECT r;
intmax_t x, y, width, height;
int x, y, width, height;
int xpadding, ypadding;
uintmax_t nStretchy;
intmax_t stretchywid, stretchyht;
uintmax_t i;
intmax_t minimumWidth, minimumHeight;
int nStretchy;
int stretchywid, stretchyht;
int i;
int minimumWidth, minimumHeight;
uiWindowsSizing *d;
if (b->controls->size() == 0)
@ -149,16 +149,16 @@ static void uiBoxSyncEnableState(uiWindowsControl *c, int enabled)
uiWindowsControlDefaultSetParentHWND(uiBox)
static void uiBoxMinimumSize(uiWindowsControl *c, intmax_t *width, intmax_t *height)
static void uiBoxMinimumSize(uiWindowsControl *c, int *width, int *height)
{
uiBox *b = uiBox(c);
int xpadding, ypadding;
uintmax_t nStretchy;
int nStretchy;
// these two contain the largest minimum width and height of all stretchy controls in the box
// all stretchy controls will use this value to determine the final minimum size
intmax_t maxStretchyWidth, maxStretchyHeight;
uintmax_t i;
intmax_t minimumWidth, minimumHeight;
int maxStretchyWidth, maxStretchyHeight;
int i;
int minimumWidth, minimumHeight;
uiWindowsSizing sizing;
*width = 0;
@ -230,7 +230,6 @@ static void boxArrangeChildren(uiBox *b)
{
LONG_PTR controlID;
HWND insertAfter;
uintmax_t i;
controlID = 100;
insertAfter = NULL;
@ -251,7 +250,7 @@ void uiBoxAppend(uiBox *b, uiControl *c, int stretchy)
uiWindowsControlMinimumSizeChanged(uiWindowsControl(b));
}
void uiBoxDelete(uiBox *b, uintmax_t index)
void uiBoxDelete(uiBox *b, int index)
{
uiControl *c;