• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *
3  * (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved
4  *
5  */
6 
7 #include <gnome.h>
8 #include <ft2build.h>
9 #include FT_FREETYPE_H
10 
11 #include "unicode/utypes.h"
12 #include "loengine.h"
13 #include "rsurface.h"
14 #include "gsupport.h"
15 
16 #include "gnomeglue.h"
17 
18 #include "LETypes.h"
19 #include "LEFontInstance.h"
20 #include "GnomeGUISupport.h"
21 #include "GnomeFontMap.h"
22 #include "GnomeFontInstance.h"
23 #include "ScriptCompositeFontInstance.h"
24 
25 
26 U_CDECL_BEGIN
27 
gs_gnomeGuiSupportOpen()28 gs_guiSupport *gs_gnomeGuiSupportOpen()
29 {
30     return (gs_guiSupport *) new GnomeGUISupport();
31 }
32 
gs_gnomeGuiSupportClose(gs_guiSupport * guiSupport)33 void gs_gnomeGuiSupportClose(gs_guiSupport *guiSupport)
34 {
35     GnomeGUISupport *gs = (GnomeGUISupport *) guiSupport;
36 
37     delete gs;
38 }
39 
rs_gnomeRenderingSurfaceOpen(GtkWidget * theWidget)40 rs_surface *rs_gnomeRenderingSurfaceOpen(GtkWidget *theWidget)
41 {
42     return (rs_surface *) new GnomeSurface(theWidget);
43 }
44 
rs_gnomeRenderingSurfaceClose(rs_surface * surface)45 void rs_gnomeRenderingSurfaceClose(rs_surface *surface)
46 {
47     GnomeSurface *rs = (GnomeSurface *) surface;
48 
49     delete rs;
50 }
51 
fm_gnomeFontMapOpen(FT_Library engine,const char * fileName,le_int16 pointSize,gs_guiSupport * guiSupport,LEErrorCode * status)52 fm_fontMap *fm_gnomeFontMapOpen(FT_Library engine, const char *fileName, le_int16 pointSize, gs_guiSupport *guiSupport, LEErrorCode *status)
53 {
54     return (fm_fontMap *) new GnomeFontMap(engine, fileName, pointSize, (GnomeGUISupport *) guiSupport, *status);
55 }
56 
fm_fontMapClose(fm_fontMap * fontMap)57 void fm_fontMapClose(fm_fontMap *fontMap)
58 {
59     GnomeFontMap *fm = (GnomeFontMap *) fontMap;
60 
61     delete fm;
62 }
63 
le_scriptCompositeFontOpen(fm_fontMap * fontMap)64 le_font *le_scriptCompositeFontOpen(fm_fontMap *fontMap)
65 {
66     return (le_font *) new ScriptCompositeFontInstance((FontMap *) fontMap);
67 }
68 
le_fontClose(le_font * font)69 void le_fontClose(le_font *font)
70 {
71     LEFontInstance *fi = (LEFontInstance *) font;
72 
73     delete fi;
74 }
75 
76 U_CDECL_END
77