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_FONT_H__ 00028 #define __ALICEML_FONT_H__ 00029 00030 #include "aliceml.h" 00031 #include "aliceml_array.h" 00032 #include "aliceml_color.h" 00033 #include "aliceml_string.h" 00034 00035 #ifdef __cplusplus 00036 extern "C" { 00037 #endif 00038 00042 struct ML_Font { 00043 void *abstract_font; 00045 ML_String8 *font_name; 00046 int font_index; 00047 int font_size; 00048 ML_FontStyle style; 00049 ML_Color color; 00050 00051 ML_Color shadow_color; 00052 int shadow_offset_x, shadow_offset_y; 00053 00054 ML_Color hemming_color; 00055 int hemming_width_x, hemming_width_y; 00056 00057 int ref_count; 00058 }; 00059 00063 typedef struct ML_SimpleFont { 00064 void *abstract_font; 00065 00066 const char *font_name; 00067 int font_index; 00068 int font_size; 00069 ML_FontStyle style; 00070 ML_Color color; 00071 } ML_SimpleFont; 00072 00074 ALICEMLAPI ML_Font * ALICEMLCALL ML_Font_Create(); 00075 00077 ALICEMLAPI ML_Font * ALICEMLCALL ML_Font_Clone(const ML_Font *font); 00078 00080 ALICEMLAPI ML_Font * ALICEMLCALL ML_Font_Unique(ML_Font *font); 00081 00083 ALICEMLAPI int ALICEMLCALL ML_Font_Share(ML_Font *font); 00084 00086 ALICEMLAPI void ALICEMLCALL ML_Font_Destroy(ML_Font *font); 00087 00089 ALICEMLAPI int ALICEMLCALL ML_Font_SetFontName(ML_Font *font, ML_String8 *name); 00090 00095 ALICEMLAPI int ALICEMLCALL ML_Font_Compare(const ML_Font *font1, const ML_Font *font2); 00096 00098 ALICEMLAPI int ALICEMLCALL ML_SimpleFont_Make(ML_SimpleFont *result, const ML_Font *font); 00099 00101 ALICEMLAPI ML_Array * ALICEMLCALL ML_FontStack_Create(); 00102 00103 #ifdef __cplusplus 00104 } 00105 #endif 00106 00107 #endif
1.4.7