Make it compile with libtool 2.2.6
[sdlpango.git] / src / SDL_Pango.h
bloba7a823e94a194fdc9c7bfd6791e0d9a7c1cf10b3
1 /* SDL_Pango.h -- A companion library to SDL for working with Pango.
2 Copyright (C) 2004 NAKAMURA Ken'ichi
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
19 /*! @file
20 @brief Header file of SDL_Pango
22 @author NAKAMURA Ken'ichi
23 @date 2004/08/26
24 $Revision: 1.3 $
27 #ifndef SDL_PANGO_H
28 #define SDL_PANGO_H
29 #define SDL_PANGO_HAS_GC_EXTENSIONS
31 #include "SDL.h"
33 #include "begin_code.h"
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
41 typedef struct _contextImpl SDLPango_Context;
43 /*!
44 General 4 X 4 matrix struct.
46 typedef struct _SDLPango_Matrix {
47 Uint8 m[4][4]; /*! Matrix variables */
48 } SDLPango_Matrix;
50 /*!
51 Specifies white back and black letter.
53 extern const SDLPango_Matrix *MATRIX_WHITE_BACK;
54 /*!
55 Specifies black back and white letter.
57 extern const SDLPango_Matrix *MATRIX_BLACK_BACK;
58 /*!
59 Specifies transparent back and black letter.
61 extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
62 /*!
63 Specifies transparent back and white letter.
65 extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
66 /*!
67 Specifies transparent back and transparent letter.
68 This is useful for KARAOKE like rendering.
70 extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
72 /*!
73 Specifies direction of text. See Pango reference for detail
75 typedef enum {
76 SDLPANGO_DIRECTION_LTR, /*! Left to right */
77 SDLPANGO_DIRECTION_RTL, /*! Right to left */
78 SDLPANGO_DIRECTION_WEAK_LTR, /*! Left to right (weak) */
79 SDLPANGO_DIRECTION_WEAK_RTL, /*! Right to left (weak) */
80 SDLPANGO_DIRECTION_NEUTRAL /*! Neutral */
81 } SDLPango_Direction;
83 /*!
84 Specifies alignment of text. See Pango reference for detail
86 typedef enum {
87 SDLPANGO_ALIGN_LEFT,
88 SDLPANGO_ALIGN_CENTER,
89 SDLPANGO_ALIGN_RIGHT
90 } SDLPango_Alignment;
92 extern DECLSPEC int SDLCALL SDLPango_Init();
94 extern DECLSPEC int SDLCALL SDLPango_WasInit();
96 extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext_GivenFontDesc(const char* font_desc);
97 extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext();
99 extern DECLSPEC void SDLCALL SDLPango_FreeContext(
100 SDLPango_Context *context);
102 extern DECLSPEC void SDLCALL SDLPango_SetSurfaceCreateArgs(
103 SDLPango_Context *context,
104 Uint32 flags,
105 int depth,
106 Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
108 extern DECLSPEC SDL_Surface * SDLCALL SDLPango_CreateSurfaceDraw(
109 SDLPango_Context *context);
111 extern DECLSPEC void SDLCALL SDLPango_Draw(
112 SDLPango_Context *context,
113 SDL_Surface *surface,
114 int x, int y);
116 extern DECLSPEC void SDLCALL SDLPango_SetDpi(
117 SDLPango_Context *context,
118 double dpi_x, double dpi_y);
120 extern DECLSPEC void SDLCALL SDLPango_SetMinimumSize(
121 SDLPango_Context *context,
122 int width, int height);
124 extern DECLSPEC void SDLCALL SDLPango_SetDefaultColor(
125 SDLPango_Context *context,
126 const SDLPango_Matrix *color_matrix);
128 extern DECLSPEC int SDLCALL SDLPango_GetLayoutWidth(
129 SDLPango_Context *context);
131 extern DECLSPEC int SDLCALL SDLPango_GetLayoutHeight(
132 SDLPango_Context *context);
134 extern DECLSPEC void SDLCALL SDLPango_SetMarkup(
135 SDLPango_Context *context,
136 const char *markup,
137 int length);
139 extern DECLSPEC void SDLCALL SDLPango_SetText_GivenAlignment(
140 SDLPango_Context *context,
141 const char *text,
142 int length,
143 SDLPango_Alignment alignment);
145 extern DECLSPEC void SDLCALL SDLPango_SetText(
146 SDLPango_Context *context,
147 const char *markup,
148 int length);
150 extern DECLSPEC void SDLCALL SDLPango_SetLanguage(
151 SDLPango_Context *context,
152 const char *language_tag);
154 extern DECLSPEC void SDLCALL SDLPango_SetBaseDirection(
155 SDLPango_Context *context,
156 SDLPango_Direction direction);
159 #ifdef __FT2_BUILD_UNIX_H__
161 extern DECLSPEC void SDLCALL SDLPango_CopyFTBitmapToSurface(
162 const FT_Bitmap *bitmap,
163 SDL_Surface *surface,
164 const SDLPango_Matrix *matrix,
165 SDL_Rect *rect);
167 #endif /* __FT2_BUILD_UNIX_H__ */
170 #ifdef __PANGO_H__
172 extern DECLSPEC PangoFontMap* SDLCALL SDLPango_GetPangoFontMap(
173 SDLPango_Context *context);
175 extern DECLSPEC PangoFontDescription* SDLCALL SDLPango_GetPangoFontDescription(
176 SDLPango_Context *context);
178 extern DECLSPEC PangoLayout* SDLCALL SDLPango_GetPangoLayout(
179 SDLPango_Context *context);
181 #endif /* __PANGO_H__ */
184 #ifdef __cplusplus
186 #endif
188 #include "close_code.h"
190 #endif /* SDL_PANGO_H */