aliceml_backend.h

説明を見る。
00001 /*
00002  * Copyright (c) 2005-2007  cielacanth <cielacanth AT s60.xrea.com>
00003  * All rights reserved.
00004  * 
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *    1. Redistributions of source code must retain the above copyright
00009  *       notice, this list of conditions and the following disclaimer.
00010  *    2. Redistributions in binary form must reproduce the above copyright
00011  *       notice, this list of conditions and the following disclaimer in the
00012  *       documentation and/or other materials provided with the distribution.
00013  * 
00014  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
00015  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00016  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00017  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
00018  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00019  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00020  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00021  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00022  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00023  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00024  * SUCH DAMAGE.
00025  */
00026 
00027 #ifndef __ALICEML_BACKEND_H__
00028 #define __ALICEML_BACKEND_H__
00029 
00030 #include "aliceml.h"
00031 #include "aliceml_rect.h"
00032 #include "aliceml_font.h"
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00045 struct ML_Backend {
00050     void * (ALICEMLCALL *CreateSurface)(ML_Message *message, int width, int height);
00051 
00056     void (ALICEMLCALL *DestroySurface)(void *surface);
00057 
00059     int (ALICEMLCALL *GetSurfaceSize)(void *surface, int *width, int *height);
00060 
00062     int (ALICEMLCALL *BlitSurface)(void *dst, int x, int y, ML_Rect *rect, void *src);
00063 
00065     int (ALICEMLCALL *BlitSurfaceWithAlpha)(void *dst, int x, int y, ML_Rect *rect, void *src, int alpha);
00066 
00068     void * (ALICEMLCALL *CreateFont)(ML_Message *message, const ML_SimpleFont *font);
00069 
00071     void (ALICEMLCALL *DestroyFont)(void *abstract_font);
00072 
00077     void * (ALICEMLCALL *CreateTextSurfaceUCS4)(ML_Message *message, const ML_SimpleFont *font, ML_char32 ucs4);
00078 
00083     int (ALICEMLCALL *GetTextSurfaceSizeUCS4)(const ML_SimpleFont *font, ML_char32 ucs4, int *w, int *h);
00084 
00089     void * (ALICEMLCALL *CreateTextSurfaceUTF16)(ML_Message *message, const ML_SimpleFont *font, const ML_char16 *utf16);
00090 
00095     int (ALICEMLCALL *GetTextSurfaceSizeUTF16)(const ML_SimpleFont *font, const ML_char16 *utf16, int *w, int *h);
00096 
00101     void * (ALICEMLCALL *CreateTextSurfaceUTF8)(ML_Message *message, const ML_SimpleFont *font, const ML_char8 *utf8);
00102 
00107     int (ALICEMLCALL *GetTextSurfaceSizeUTF8)(const ML_SimpleFont *font, const ML_char8 *utf8, int *w, int *h);
00108 };
00109 
00111 ALICEMLAPI void * ALICEMLCALL ML_Backend_CreateSurface(ML_Message *message, int width, int height);
00112 
00114 ALICEMLAPI void ALICEMLCALL ML_Backend_DestroySurface(ML_Backend *backend, void *surface);
00115 
00117 ALICEMLAPI int ALICEMLCALL ML_Backend_GetSurfaceSize(ML_Backend *backend, void *surface, int *width, int *height);
00118 
00120 int ALICEMLCALL ML_Backend_Blit(ML_Backend *backend, void *dst, int x, int y, ML_Rect *rect, void *src);
00121 
00123 int ALICEMLCALL ML_Backend_BlitWithAlpha(ML_Backend *backend, void *dst, int x, int y, ML_Rect *rect, void *src, int alpha);
00124 
00126 ALICEMLAPI void * ALICEMLCALL ML_Backend_CreateFont(ML_Message *message, const ML_Font *font);
00127 
00129 ALICEMLAPI void ALICEMLCALL ML_Backend_DestroyFont(ML_Backend *backend, void *abstract_font);
00130 
00136 ALICEMLAPI void * ALICEMLCALL ML_Backend_CreateTextSurface(ML_Message *message, const ML_Font *font, ML_char32 ucs4);
00137 
00139 ALICEMLAPI int ALICEMLCALL ML_Backend_GetTextSurfaceSize(ML_Backend *backend, const ML_Font *font, ML_char32 ucs4, int *w, int *h);
00140 
00144 typedef enum ML_VerticalText {
00145     ML_VERTICALTEXT_NORMAL,
00146     ML_VERTICALTEXT_ROTATE,
00147     ML_VERTICALTEXT_B_TO_T,
00148     ML_VERTICALTEXT_BL_TO_TR,
00149 } ML_VerticalText;
00150 
00152 ML_VerticalText ALICEMLCALL ML_FontBackend_GetVerticalTextUTF16(const ML_char16 *utf16);
00153 
00154 #ifdef __cplusplus
00155 }
00156 #endif
00157 
00158 #endif

AliceMLに対してSat Apr 21 13:06:20 2007に生成されました。  doxygen 1.4.7