ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/Client.xs
(Generate patch)

Comparing deliantra/Deliantra-Client/Client.xs (file contents):
Revision 1.254 by root, Sun Jan 6 18:12:20 2008 UTC vs.
Revision 1.258 by root, Thu Apr 10 14:35:50 2008 UTC

51#ifndef PANGO_VERSION_CHECK 51#ifndef PANGO_VERSION_CHECK
52# define PANGO_VERSION_CHECK(a,b,c) 0 52# define PANGO_VERSION_CHECK(a,b,c) 0
53#endif 53#endif
54 54
55#if !PANGO_VERSION_CHECK (1, 15, 2) 55#if !PANGO_VERSION_CHECK (1, 15, 2)
56# define pango_layout_get_line_readonly pango_layout_get_line_readonly 56# define pango_layout_get_line_readonly pango_layout_get_line
57# define pango_layout_get_lines_readonly pango_layout_get_lines_readonly 57# define pango_layout_get_lines_readonly pango_layout_get_lines
58# define pango_layout_iter_get_line_readonly pango_layout_iter_get_line_readonly 58# define pango_layout_iter_get_line_readonly pango_layout_iter_get_line
59# define pango_layout_iter_get_run_readonly pango_layout_iter_get_run_readonly 59# define pango_layout_iter_get_run_readonly pango_layout_iter_get_run
60#endif 60#endif
61 61
62#ifndef _WIN32 62#ifndef _WIN32
63# include <sys/types.h> 63# include <sys/types.h>
64# include <sys/socket.h> 64# include <sys/socket.h>
185 185
186static void 186static void
187layout_update_font (DC__Layout self) 187layout_update_font (DC__Layout self)
188{ 188{
189 /* use a random scale factor to account for unknown descenders, 0.8 works 189 /* use a random scale factor to account for unknown descenders, 0.8 works
190 * reasonably well with bitstream vera 190 * reasonably well with dejavu/bistream fonts
191 */ 191 */
192 PangoFontDescription *font = self->font ? self->font : default_font; 192 PangoFontDescription *font = self->font ? self->font : default_font;
193 193
194 pango_font_description_set_absolute_size (font, 194 pango_font_description_set_absolute_size (font,
195 MAX (MIN_FONT_HEIGHT, self->base_height) * (PANGO_SCALE * 8 / 10)); 195 MAX (MIN_FONT_HEIGHT, self->base_height) * (PANGO_SCALE * 8 / 10));
673 CODE: 673 CODE:
674{ 674{
675 opengl_fontmap = pango_opengl_font_map_new (); 675 opengl_fontmap = pango_opengl_font_map_new ();
676 pango_opengl_font_map_set_default_substitute ((PangoOpenGLFontMap *)opengl_fontmap, substitute_func, 0, 0); 676 pango_opengl_font_map_set_default_substitute ((PangoOpenGLFontMap *)opengl_fontmap, substitute_func, 0, 0);
677 opengl_context = pango_opengl_font_map_create_context ((PangoOpenGLFontMap *)opengl_fontmap); 677 opengl_context = pango_opengl_font_map_create_context ((PangoOpenGLFontMap *)opengl_fontmap);
678 /*pango_context_set_font_description (opengl_context, default_font);*/
678#if PANGO_VERSION_CHECK (1, 15, 2) 679#if PANGO_VERSION_CHECK (1, 15, 2)
679 pango_context_set_language (opengl_context, pango_language_from_string ("en")); 680 pango_context_set_language (opengl_context, pango_language_from_string ("en"));
680 /*pango_context_set_base_dir (opengl_context, PANGO_DIRECTION_WEAK_LTR);*/ 681 /*pango_context_set_base_dir (opengl_context, PANGO_DIRECTION_WEAK_LTR);*/
681#endif 682#endif
682} 683}
770SDL_GetKeyName (int sym) 771SDL_GetKeyName (int sym)
771 772
772int 773int
773SDL_GetAppState () 774SDL_GetAppState ()
774 775
776int
777SDL_GetModState ()
778
775void 779void
776poll_events () 780poll_events ()
777 PPCODE: 781 PPCODE:
778{ 782{
779 SDL_Event ev; 783 SDL_Event ev;
912 } 916 }
913 } 917 }
914#endif 918#endif
915} 919}
916 920
917void 921int
918add_font (char *file) 922add_font (char *file)
919 CODE: 923 CODE:
920 FcConfigAppFontAddFile (0, (const FcChar8 *)file); 924 RETVAL = FcConfigAppFontAddFile (0, (const FcChar8 *)file);
925 OUTPUT:
926 RETVAL
921 927
922void 928void
923load_image_inline (SV *image_) 929load_image_inline (SV *image_)
924 ALIAS: 930 ALIAS:
925 load_image_file = 1 931 load_image_file = 1

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines