Mercurial > mplayer.hg
comparison gui/skin/font.h @ 32786:31f88a1387ad
Define constants in a single place.
author | ib |
---|---|
date | Thu, 10 Feb 2011 11:35:32 +0000 |
parents | 91625bcadbe8 |
children | d55d0bb7d00f |
comparison
equal
deleted
inserted
replaced
32785:91625bcadbe8 | 32786:31f88a1387ad |
---|---|
24 #include "gui/app.h" | 24 #include "gui/app.h" |
25 | 25 |
26 #define ASCII_CHRS 128 // number of ASCII characters | 26 #define ASCII_CHRS 128 // number of ASCII characters |
27 #define EXTRA_CHRS 128 // (arbitrary) number of non-ASCII characters | 27 #define EXTRA_CHRS 128 // (arbitrary) number of non-ASCII characters |
28 | 28 |
29 #define MAX_FONT_NAME 128 | |
30 #define MAX_FONTS 25 | |
31 | |
29 #define fntAlignLeft 0 | 32 #define fntAlignLeft 0 |
30 #define fntAlignCenter 1 | 33 #define fntAlignCenter 1 |
31 #define fntAlignRight 2 | 34 #define fntAlignRight 2 |
32 | 35 |
33 typedef struct | 36 typedef struct |
39 typedef struct | 42 typedef struct |
40 { | 43 { |
41 fntChar Fnt[ASCII_CHRS + EXTRA_CHRS]; | 44 fntChar Fnt[ASCII_CHRS + EXTRA_CHRS]; |
42 unsigned char nonASCIIidx[EXTRA_CHRS][4]; | 45 unsigned char nonASCIIidx[EXTRA_CHRS][4]; |
43 txSample Bitmap; | 46 txSample Bitmap; |
44 char name[128]; | 47 char name[MAX_FONT_NAME]; |
45 } bmpFont; | 48 } bmpFont; |
46 | 49 |
47 extern bmpFont * Fonts[26]; | 50 extern bmpFont * Fonts[MAX_FONTS + 1]; |
48 | 51 |
49 int fntAddNewFont( char * name ); | 52 int fntAddNewFont( char * name ); |
50 void fntFreeFont( void ); | 53 void fntFreeFont( void ); |
51 int fntFindID( char * name ); | 54 int fntFindID( char * name ); |
52 int fntGetCharIndex( int id, unsigned char **str, gboolean utf8, int direction ); | 55 int fntGetCharIndex( int id, unsigned char **str, gboolean utf8, int direction ); |