More intmax_t removal.
This commit is contained in:
parent
440635447d
commit
155299cdb9
|
@ -20,12 +20,12 @@ uiDrawFontFamilies *uiDrawListFontFamilies(void)
|
||||||
return ff;
|
return ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
uintmax_t uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff)
|
int uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff)
|
||||||
{
|
{
|
||||||
return CFArrayGetCount(ff->fonts);
|
return CFArrayGetCount(ff->fonts);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, uintmax_t n)
|
char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, int n)
|
||||||
{
|
{
|
||||||
CFStringRef familystr;
|
CFStringRef familystr;
|
||||||
char *family;
|
char *family;
|
||||||
|
@ -616,7 +616,7 @@ void doDrawText(CGContextRef c, CGFloat cheight, double x, double y, uiDrawTextL
|
||||||
CGContextSetTextPosition(c, x, y);
|
CGContextSetTextPosition(c, x, y);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static CFRange charsToRange(uiDrawTextLayout *layout, intmax_t startChar, intmax_t endChar)
|
static CFRange charsToRange(uiDrawTextLayout *layout, int startChar, int endChar)
|
||||||
{
|
{
|
||||||
CFRange start, end;
|
CFRange start, end;
|
||||||
CFRange out;
|
CFRange out;
|
||||||
|
@ -630,7 +630,7 @@ static CFRange charsToRange(uiDrawTextLayout *layout, intmax_t startChar, intmax
|
||||||
|
|
||||||
#define rangeToCFRange() charsToRange(layout, startChar, endChar)
|
#define rangeToCFRange() charsToRange(layout, startChar, endChar)
|
||||||
|
|
||||||
void uiDrawTextLayoutSetColor(uiDrawTextLayout *layout, intmax_t startChar, intmax_t endChar, double r, double g, double b, double a)
|
void uiDrawTextLayoutSetColor(uiDrawTextLayout *layout, int startChar, int endChar, double r, double g, double b, double a)
|
||||||
{
|
{
|
||||||
CGColorSpaceRef colorspace;
|
CGColorSpaceRef colorspace;
|
||||||
CGFloat components[4];
|
CGFloat components[4];
|
||||||
|
|
8
ui.h
8
ui.h
|
@ -445,12 +445,12 @@ _UI_EXTERN void uiDrawRestore(uiDrawContext *c);
|
||||||
|
|
||||||
// TODO manage the use of Text, Font, and TextFont, and of the uiDrawText prefix in general
|
// TODO manage the use of Text, Font, and TextFont, and of the uiDrawText prefix in general
|
||||||
|
|
||||||
///// TODO
|
///// TODO reconsider this
|
||||||
typedef struct uiDrawFontFamilies uiDrawFontFamilies;
|
typedef struct uiDrawFontFamilies uiDrawFontFamilies;
|
||||||
|
|
||||||
_UI_EXTERN uiDrawFontFamilies *uiDrawListFontFamilies(void);
|
_UI_EXTERN uiDrawFontFamilies *uiDrawListFontFamilies(void);
|
||||||
_UI_EXTERN uintmax_t uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff);
|
_UI_EXTERN int uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff);
|
||||||
_UI_EXTERN char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, uintmax_t n);
|
_UI_EXTERN char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, int n);
|
||||||
_UI_EXTERN void uiDrawFreeFontFamilies(uiDrawFontFamilies *ff);
|
_UI_EXTERN void uiDrawFreeFontFamilies(uiDrawFontFamilies *ff);
|
||||||
///// END TODO
|
///// END TODO
|
||||||
|
|
||||||
|
@ -524,7 +524,7 @@ _UI_EXTERN void uiDrawTextLayoutSetWidth(uiDrawTextLayout *layout, double width)
|
||||||
_UI_EXTERN void uiDrawTextLayoutExtents(uiDrawTextLayout *layout, double *width, double *height);
|
_UI_EXTERN void uiDrawTextLayoutExtents(uiDrawTextLayout *layout, double *width, double *height);
|
||||||
|
|
||||||
// and the attributes that you can set on a text layout
|
// and the attributes that you can set on a text layout
|
||||||
_UI_EXTERN void uiDrawTextLayoutSetColor(uiDrawTextLayout *layout, intmax_t startChar, intmax_t endChar, double r, double g, double b, double a);
|
_UI_EXTERN void uiDrawTextLayoutSetColor(uiDrawTextLayout *layout, int startChar, int endChar, double r, double g, double b, double a);
|
||||||
|
|
||||||
_UI_EXTERN void uiDrawText(uiDrawContext *c, double x, double y, uiDrawTextLayout *layout);
|
_UI_EXTERN void uiDrawText(uiDrawContext *c, double x, double y, uiDrawTextLayout *layout);
|
||||||
|
|
||||||
|
|
|
@ -19,12 +19,12 @@ uiDrawFontFamilies *uiDrawListFontFamilies(void)
|
||||||
return ff;
|
return ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
uintmax_t uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff)
|
int uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff)
|
||||||
{
|
{
|
||||||
return ff->n;
|
return ff->n;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, uintmax_t n)
|
char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, int n)
|
||||||
{
|
{
|
||||||
PangoFontFamily *f;
|
PangoFontFamily *f;
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ void uiDrawText(uiDrawContext *c, double x, double y, uiDrawTextLayout *layout)
|
||||||
g_object_unref(pl);
|
g_object_unref(pl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void addAttr(uiDrawTextLayout *layout, PangoAttribute *attr, intmax_t startChar, intmax_t endChar)
|
static void addAttr(uiDrawTextLayout *layout, PangoAttribute *attr, int startChar, int endChar)
|
||||||
{
|
{
|
||||||
attr->start_index = layout->graphemes[startChar];
|
attr->start_index = layout->graphemes[startChar];
|
||||||
attr->end_index = layout->graphemes[endChar];
|
attr->end_index = layout->graphemes[endChar];
|
||||||
|
@ -292,7 +292,7 @@ static void try138(void)
|
||||||
dlclose(handle);
|
dlclose(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void uiDrawTextLayoutSetColor(uiDrawTextLayout *layout, intmax_t startChar, intmax_t endChar, double r, double g, double b, double a)
|
void uiDrawTextLayoutSetColor(uiDrawTextLayout *layout, int startChar, int endChar, double r, double g, double b, double a)
|
||||||
{
|
{
|
||||||
PangoAttribute *attr;
|
PangoAttribute *attr;
|
||||||
guint16 rr, gg, bb, aa;
|
guint16 rr, gg, bb, aa;
|
||||||
|
|
|
@ -23,12 +23,12 @@ uiDrawFontFamilies *uiDrawListFontFamilies(void)
|
||||||
return ff;
|
return ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
uintmax_t uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff)
|
int uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff)
|
||||||
{
|
{
|
||||||
return ff->fc->fonts->GetFontFamilyCount();
|
return ff->fc->fonts->GetFontFamilyCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, uintmax_t n)
|
char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, int n)
|
||||||
{
|
{
|
||||||
IDWriteFontFamily *family;
|
IDWriteFontFamily *family;
|
||||||
WCHAR *wname;
|
WCHAR *wname;
|
||||||
|
@ -331,8 +331,8 @@ enum layoutAttrType {
|
||||||
|
|
||||||
struct layoutAttr {
|
struct layoutAttr {
|
||||||
enum layoutAttrType type;
|
enum layoutAttrType type;
|
||||||
intmax_t start;
|
int start;
|
||||||
intmax_t end;
|
int end;
|
||||||
double components[4];
|
double components[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -516,7 +516,7 @@ void uiDrawText(uiDrawContext *c, double x, double y, uiDrawTextLayout *layout)
|
||||||
black->Release();
|
black->Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
void uiDrawTextLayoutSetColor(uiDrawTextLayout *layout, intmax_t startChar, intmax_t endChar, double r, double g, double b, double a)
|
void uiDrawTextLayoutSetColor(uiDrawTextLayout *layout, int startChar, int endChar, double r, double g, double b, double a)
|
||||||
{
|
{
|
||||||
struct layoutAttr attr;
|
struct layoutAttr attr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue