More intmax_t removal.
This commit is contained in:
parent
440635447d
commit
155299cdb9
|
@ -20,12 +20,12 @@ uiDrawFontFamilies *uiDrawListFontFamilies(void)
|
|||
return ff;
|
||||
}
|
||||
|
||||
uintmax_t uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff)
|
||||
int uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff)
|
||||
{
|
||||
return CFArrayGetCount(ff->fonts);
|
||||
}
|
||||
|
||||
char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, uintmax_t n)
|
||||
char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, int n)
|
||||
{
|
||||
CFStringRef familystr;
|
||||
char *family;
|
||||
|
@ -616,7 +616,7 @@ void doDrawText(CGContextRef c, CGFloat cheight, double x, double y, uiDrawTextL
|
|||
CGContextSetTextPosition(c, x, y);
|
||||
#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 out;
|
||||
|
@ -630,7 +630,7 @@ static CFRange charsToRange(uiDrawTextLayout *layout, intmax_t startChar, intmax
|
|||
|
||||
#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;
|
||||
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
|
||||
///// TODO reconsider this
|
||||
typedef struct uiDrawFontFamilies uiDrawFontFamilies;
|
||||
|
||||
_UI_EXTERN uiDrawFontFamilies *uiDrawListFontFamilies(void);
|
||||
_UI_EXTERN uintmax_t uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff);
|
||||
_UI_EXTERN char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, uintmax_t n);
|
||||
_UI_EXTERN int uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff);
|
||||
_UI_EXTERN char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, int n);
|
||||
_UI_EXTERN void uiDrawFreeFontFamilies(uiDrawFontFamilies *ff);
|
||||
///// END TODO
|
||||
|
||||
|
@ -524,7 +524,7 @@ _UI_EXTERN void uiDrawTextLayoutSetWidth(uiDrawTextLayout *layout, double width)
|
|||
_UI_EXTERN void uiDrawTextLayoutExtents(uiDrawTextLayout *layout, double *width, double *height);
|
||||
|
||||
// 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);
|
||||
|
||||
|
|
|
@ -19,12 +19,12 @@ uiDrawFontFamilies *uiDrawListFontFamilies(void)
|
|||
return ff;
|
||||
}
|
||||
|
||||
uintmax_t uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff)
|
||||
int uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff)
|
||||
{
|
||||
return ff->n;
|
||||
}
|
||||
|
||||
char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, uintmax_t n)
|
||||
char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, int n)
|
||||
{
|
||||
PangoFontFamily *f;
|
||||
|
||||
|
@ -265,7 +265,7 @@ void uiDrawText(uiDrawContext *c, double x, double y, uiDrawTextLayout *layout)
|
|||
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->end_index = layout->graphemes[endChar];
|
||||
|
@ -292,7 +292,7 @@ static void try138(void)
|
|||
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;
|
||||
guint16 rr, gg, bb, aa;
|
||||
|
|
|
@ -23,12 +23,12 @@ uiDrawFontFamilies *uiDrawListFontFamilies(void)
|
|||
return ff;
|
||||
}
|
||||
|
||||
uintmax_t uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff)
|
||||
int uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff)
|
||||
{
|
||||
return ff->fc->fonts->GetFontFamilyCount();
|
||||
}
|
||||
|
||||
char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, uintmax_t n)
|
||||
char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, int n)
|
||||
{
|
||||
IDWriteFontFamily *family;
|
||||
WCHAR *wname;
|
||||
|
@ -331,8 +331,8 @@ enum layoutAttrType {
|
|||
|
||||
struct layoutAttr {
|
||||
enum layoutAttrType type;
|
||||
intmax_t start;
|
||||
intmax_t end;
|
||||
int start;
|
||||
int end;
|
||||
double components[4];
|
||||
};
|
||||
|
||||
|
@ -516,7 +516,7 @@ void uiDrawText(uiDrawContext *c, double x, double y, uiDrawTextLayout *layout)
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue