📄 xos_font.h.svn-base
字号:
//**************************************************************
//Copyright (C), 2008-2008, AnyLook Co., Ltd.
//File name: xOS_Font.h
//Author: AnyLook
//Version: 1.0
//Date: 2008/07/31
//Description:
// xOS Include file
//Others:
//Function List:
//<Name> <desc>
//Simple
//History:
//<author> <time> <version > <desc>
// AnyLook 2008/07/31 1.0 build this moudle
//**************************************************************
#ifndef _xOS_FONT_H
#define _xOS_FONT_H
#ifdef __cplusplus
extern "C" {
#endif
#include "xOS_Font_VTBL.h"
static INLINE void xOS_Font_ByteSwappedUNICODE(int swapped)
{
if (GETFONT(g_pxOSList))
{
GETFONT(g_pxOSList)->Font_ByteSwappedUNICODE( swapped);
}
return ;
}
static INLINE void * xOS_Font_OpenFont(const char *file, int ptsize)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_OpenFont(file, ptsize);
}
return NULL;
}
static INLINE void * xOS_Font_OpenFontIndex(const char *file, int ptsize, long index)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_OpenFontIndex(file, ptsize, index);
}
return NULL;
}
static INLINE int xOS_Font_GetFontStyle(const void*font)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_GetFontStyle(font);
}
return 0;
}
static INLINE void xOS_Font_SetFontStyle(void*font, int style)
{
if (GETFONT(g_pxOSList))
{
GETFONT(g_pxOSList)->Font_SetFontStyle(font,style);
}
return ;
}
static INLINE int xOS_Font_FontHeight(const void*font)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_FontHeight(font);
}
return 0;
}
static INLINE int xOS_Font_FontAscent(const void*font)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_FontAscent(font);
}
return 0;
}
static INLINE int xOS_Font_FontDescent(const void*font)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_FontDescent(font);
}
return 0;
}
static INLINE int xOS_Font_FontLineSkip(const void*font)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_FontLineSkip(font);
}
return 0;
}
static INLINE long xOS_Font_FontFaces(const void*font)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_FontFaces(font);
}
return 0;
}
static INLINE int xOS_Font_FontFaceIsFixedWidth(const void*font)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_FontFaceIsFixedWidth(font);
}
return 0;
}
static INLINE char * xOS_Font_FontFaceFamilyName(const void*font)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_FontFaceFamilyName(font);
}
return NULL;
}
static INLINE char * xOS_Font_FontFaceStyleName(const void*font)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_FontFaceStyleName(font);
}
return NULL;
}
static INLINE int xOS_Font_GlyphMetrics(void*font, Uint16 ch,
int *minx, int *maxx,int *miny, int *maxy, int *advance)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_GlyphMetrics(font,ch,minx,maxx,miny,maxy,advance);
}
return 0;
}
static INLINE int xOS_Font_SizeText(void*font, const char *text, int *w, int *h)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_SizeText(font,text,w,h);
}
return 0;
}
static INLINE int xOS_Font_SizeUTF8(void*font, const char *text, int *w, int *h)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_SizeUTF8(font,text,w,h);
}
return 0;
}
static INLINE int xOS_Font_SizeUNICODE(void*font, const Uint16 *text, int *w, int *h)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_SizeUNICODE(font,text,w,h);
}
return 0;
}
static INLINE void * xOS_Font_RenderText_Solid(void*font, const char *text, xOS_Color fg)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_RenderText_Solid(font,text,fg);
}
return NULL;
}
static INLINE void * xOS_Font_RenderUTF8_Solid(void*font, const char *text, xOS_Color fg)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_RenderUTF8_Solid(font,text,fg);
}
return NULL;
}
static INLINE void * xOS_Font_RenderUNICODE_Solid(void*font, const Uint16 *text, xOS_Color fg)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_RenderUNICODE_Solid(font,text,fg);
}
return NULL;
}
static INLINE void * xOS_Font_RenderGlyph_Solid(void*font, Uint16 ch, xOS_Color fg)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_RenderGlyph_Solid(font,ch,fg);
}
return NULL;
}
static INLINE void * xOS_Font_RenderText_Shaded(void*font, const char *text, xOS_Color fg, xOS_Color bg)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_RenderText_Shaded(font,text,fg, bg);
}
return NULL;
}
static INLINE void * xOS_Font_RenderUTF8_Shaded(void*font, const char *text, xOS_Color fg, xOS_Color bg)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_RenderUTF8_Shaded(font,text,fg, bg);
}
return NULL;
}
static INLINE void * xOS_Font_RenderUNICODE_Shaded(void*font, const Uint16 *text, xOS_Color fg, xOS_Color bg)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_RenderUNICODE_Shaded(font,text,fg,bg);
}
return NULL;
}
static INLINE void * xOS_Font_RenderGlyph_Shaded(void*font, Uint16 ch, xOS_Color fg, xOS_Color bg)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_RenderGlyph_Shaded(font,ch,fg,bg);
}
return NULL;
}
static INLINE void * xOS_Font_RenderText_Blended(void*font, const char *text, xOS_Color fg)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_RenderText_Blended(font,text,fg);
}
return NULL;
}
static INLINE void * xOS_Font_RenderUTF8_Blended(void*font, const char *text, xOS_Color fg)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_RenderUTF8_Blended(font,text,fg);
}
return NULL;
}
static INLINE void * xOS_Font_RenderUNICODE_Blended(void*font, const Uint16 *text, xOS_Color fg)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_RenderUNICODE_Blended(font,text,fg);
}
return NULL;
}
static INLINE void * xOS_Font_RenderGlyph_Blended(void*font, Uint16 ch, xOS_Color fg)
{
if (GETFONT(g_pxOSList))
{
return GETFONT(g_pxOSList)->Font_RenderGlyph_Blended(font,ch,fg);
}
return NULL;
}
static INLINE void xOS_Font_CloseFont(void*font)
{
if (GETFONT(g_pxOSList))
{
GETFONT(g_pxOSList)->Font_CloseFont(font);
}
return ;
}
static INLINE void xOS_Font_ChangeGB32(uint16 *ucs2_ptr,const char *gb_ptr,int32 len)
{
if (GETFONT(g_pxOSList))
{
GETFONT(g_pxOSList)->Font_ChangeGB32(ucs2_ptr,gb_ptr,len);
}
return ;
}
#ifdef __cplusplus
}
#endif
#endif //_xOS_FONT_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -