This commit is contained in:
parent
306f791641
commit
0fde05fa03
4 changed files with 8 additions and 9 deletions
|
|
@ -235,14 +235,14 @@ MWDECL void (*MwLLGetClipboard)(MwLL handle);
|
||||||
MWDECL void (*MwLLGetCursorCoord)(MwLL handle, MwPoint* point);
|
MWDECL void (*MwLLGetCursorCoord)(MwLL handle, MwPoint* point);
|
||||||
MWDECL void (*MwLLGetScreenSize)(MwLL handle, MwRect* rect);
|
MWDECL void (*MwLLGetScreenSize)(MwLL handle, MwRect* rect);
|
||||||
|
|
||||||
/*font renderer */
|
/* font renderer */
|
||||||
MWDECL void MwFLSetup();
|
MWDECL void MwFLSetup(void);
|
||||||
|
|
||||||
#ifdef USE_FREETYPE2
|
#ifdef USE_FREETYPE2
|
||||||
MWDECL int MWFL_FT2Setup();
|
MWDECL int MWFL_FT2Setup(void);
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_STB_TRUETYPE
|
#ifdef USE_STB_TRUETYPE
|
||||||
MWDECL int MwFL_STBTTSetup();
|
MWDECL int MwFL_STBTTSetup(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MWDECL int (*MwFLDrawText)(MwWidget handle, MwPoint* point, const char* text, int bold, int align, MwLLColor color);
|
MWDECL int (*MwFLDrawText)(MwWidget handle, MwPoint* point, const char* text, int bold, int align, MwLLColor color);
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ static void ft2_MwFontFree(void* handle) {
|
||||||
free(ttf);
|
free(ttf);
|
||||||
}
|
}
|
||||||
|
|
||||||
int MWFL_FT2Setup() {
|
int MWFL_FT2Setup(void) {
|
||||||
MwFLDrawText = ft2_MwDrawText;
|
MwFLDrawText = ft2_MwDrawText;
|
||||||
MwFLTextWidth = ft2_MwTextWidth;
|
MwFLTextWidth = ft2_MwTextWidth;
|
||||||
MwFLTextHeight = ft2_MwTextHeight;
|
MwFLTextHeight = ft2_MwTextHeight;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#ifdef USE_STB_TRUETYPE
|
#ifdef USE_STB_TRUETYPE
|
||||||
#include <stdlib.h>
|
|
||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
|
|
||||||
#include "../../external/stb_truetype.h"
|
#include "../../external/stb_truetype.h"
|
||||||
|
|
@ -129,7 +128,7 @@ static void stbtt_MwFontFree(void* handle) {
|
||||||
free(ttf);
|
free(ttf);
|
||||||
}
|
}
|
||||||
|
|
||||||
int MwFL_STBTTSetup() {
|
int MwFL_STBTTSetup(void) {
|
||||||
MwFLDrawText = stbtt_MwDrawText;
|
MwFLDrawText = stbtt_MwDrawText;
|
||||||
MwFLTextWidth = stbtt_MwTextWidth;
|
MwFLTextWidth = stbtt_MwTextWidth;
|
||||||
MwFLTextHeight = stbtt_MwTextHeight;
|
MwFLTextHeight = stbtt_MwTextHeight;
|
||||||
|
|
|
||||||
|
|
@ -140,8 +140,8 @@ static void bitmap_MwDrawText(MwWidget handle, MwPoint* point, const char* text,
|
||||||
free(px);
|
free(px);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef int (*call_t)();
|
typedef int (*call_t)(void);
|
||||||
void MwFLSetup() {
|
void MwFLSetup(void) {
|
||||||
call_t calls[] = {
|
call_t calls[] = {
|
||||||
#ifdef USE_FREETYPE2
|
#ifdef USE_FREETYPE2
|
||||||
MWFL_FT2Setup,
|
MWFL_FT2Setup,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue