Started replacement of intmax_t and uintmax_t with int.
This commit is contained in:
parent
857bbbf506
commit
b26354d1e7
10
darwin/box.m
10
darwin/box.m
|
@ -14,7 +14,7 @@
|
||||||
NSMutableArray *children;
|
NSMutableArray *children;
|
||||||
BOOL vertical;
|
BOOL vertical;
|
||||||
int padded;
|
int padded;
|
||||||
uintmax_t nStretchy;
|
int nStretchy;
|
||||||
|
|
||||||
NSLayoutConstraint *first;
|
NSLayoutConstraint *first;
|
||||||
NSMutableArray *inBetweens;
|
NSMutableArray *inBetweens;
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
- (CGFloat)paddingAmount;
|
- (CGFloat)paddingAmount;
|
||||||
- (void)establishOurConstraints;
|
- (void)establishOurConstraints;
|
||||||
- (void)append:(uiControl *)c stretchy:(int)stretchy;
|
- (void)append:(uiControl *)c stretchy:(int)stretchy;
|
||||||
- (void)delete:(uintmax_t)n;
|
- (void)delete:(int)n;
|
||||||
- (int)isPadded;
|
- (int)isPadded;
|
||||||
- (void)setPadded:(int)p;
|
- (void)setPadded:(int)p;
|
||||||
- (BOOL)hugsTrailing;
|
- (BOOL)hugsTrailing;
|
||||||
|
@ -249,7 +249,7 @@ struct uiBox {
|
||||||
{
|
{
|
||||||
boxChild *bc;
|
boxChild *bc;
|
||||||
NSLayoutPriority priority;
|
NSLayoutPriority priority;
|
||||||
uintmax_t oldnStretchy;
|
int oldnStretchy;
|
||||||
|
|
||||||
bc = [boxChild new];
|
bc = [boxChild new];
|
||||||
bc.c = c;
|
bc.c = c;
|
||||||
|
@ -285,7 +285,7 @@ struct uiBox {
|
||||||
[bc release]; // we don't need the initial reference now
|
[bc release]; // we don't need the initial reference now
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)delete:(uintmax_t)n
|
- (void)delete:(int)n
|
||||||
{
|
{
|
||||||
boxChild *bc;
|
boxChild *bc;
|
||||||
int stretchy;
|
int stretchy;
|
||||||
|
@ -405,7 +405,7 @@ void uiBoxAppend(uiBox *b, uiControl *c, int stretchy)
|
||||||
[b->view append:c stretchy:stretchy];
|
[b->view append:c stretchy:stretchy];
|
||||||
}
|
}
|
||||||
|
|
||||||
void uiBoxDelete(uiBox *b, uintmax_t n)
|
void uiBoxDelete(uiBox *b, int n)
|
||||||
{
|
{
|
||||||
[b->view delete:n];
|
[b->view delete:n];
|
||||||
}
|
}
|
||||||
|
|
2
ui.h
2
ui.h
|
@ -113,7 +113,7 @@ _UI_EXTERN uiButton *uiNewButton(const char *text);
|
||||||
typedef struct uiBox uiBox;
|
typedef struct uiBox uiBox;
|
||||||
#define uiBox(this) ((uiBox *) (this))
|
#define uiBox(this) ((uiBox *) (this))
|
||||||
_UI_EXTERN void uiBoxAppend(uiBox *b, uiControl *child, int stretchy);
|
_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 int uiBoxPadded(uiBox *b);
|
||||||
_UI_EXTERN void uiBoxSetPadded(uiBox *b, int padded);
|
_UI_EXTERN void uiBoxSetPadded(uiBox *b, int padded);
|
||||||
_UI_EXTERN uiBox *uiNewHorizontalBox(void);
|
_UI_EXTERN uiBox *uiNewHorizontalBox(void);
|
||||||
|
|
|
@ -88,7 +88,7 @@ void uiBoxAppend(uiBox *b, uiControl *c, int stretchy)
|
||||||
g_array_append_val(b->controls, bc);
|
g_array_append_val(b->controls, bc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void uiBoxDelete(uiBox *b, uintmax_t index)
|
void uiBoxDelete(uiBox *b, int index)
|
||||||
{
|
{
|
||||||
struct boxChild *bc;
|
struct boxChild *bc;
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
struct boxChild {
|
struct boxChild {
|
||||||
uiControl *c;
|
uiControl *c;
|
||||||
int stretchy;
|
int stretchy;
|
||||||
intmax_t width;
|
int width;
|
||||||
intmax_t height;
|
int height;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct uiBox {
|
struct uiBox {
|
||||||
|
@ -31,12 +31,12 @@ static void boxPadding(uiBox *b, int *xpadding, int *ypadding)
|
||||||
static void boxRelayout(uiBox *b)
|
static void boxRelayout(uiBox *b)
|
||||||
{
|
{
|
||||||
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 stretchywid, stretchyht;
|
int stretchywid, stretchyht;
|
||||||
uintmax_t i;
|
int i;
|
||||||
intmax_t minimumWidth, minimumHeight;
|
int minimumWidth, minimumHeight;
|
||||||
uiWindowsSizing *d;
|
uiWindowsSizing *d;
|
||||||
|
|
||||||
if (b->controls->size() == 0)
|
if (b->controls->size() == 0)
|
||||||
|
@ -149,16 +149,16 @@ static void uiBoxSyncEnableState(uiWindowsControl *c, int enabled)
|
||||||
|
|
||||||
uiWindowsControlDefaultSetParentHWND(uiBox)
|
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);
|
uiBox *b = uiBox(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 box
|
// 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
|
// all stretchy controls will use this value to determine the final minimum size
|
||||||
intmax_t maxStretchyWidth, maxStretchyHeight;
|
int maxStretchyWidth, maxStretchyHeight;
|
||||||
uintmax_t i;
|
int i;
|
||||||
intmax_t minimumWidth, minimumHeight;
|
int minimumWidth, minimumHeight;
|
||||||
uiWindowsSizing sizing;
|
uiWindowsSizing sizing;
|
||||||
|
|
||||||
*width = 0;
|
*width = 0;
|
||||||
|
@ -230,7 +230,6 @@ static void boxArrangeChildren(uiBox *b)
|
||||||
{
|
{
|
||||||
LONG_PTR controlID;
|
LONG_PTR controlID;
|
||||||
HWND insertAfter;
|
HWND insertAfter;
|
||||||
uintmax_t i;
|
|
||||||
|
|
||||||
controlID = 100;
|
controlID = 100;
|
||||||
insertAfter = NULL;
|
insertAfter = NULL;
|
||||||
|
@ -251,7 +250,7 @@ void uiBoxAppend(uiBox *b, uiControl *c, int stretchy)
|
||||||
uiWindowsControlMinimumSizeChanged(uiWindowsControl(b));
|
uiWindowsControlMinimumSizeChanged(uiWindowsControl(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
void uiBoxDelete(uiBox *b, uintmax_t index)
|
void uiBoxDelete(uiBox *b, int index)
|
||||||
{
|
{
|
||||||
uiControl *c;
|
uiControl *c;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue