]> git.saurik.com Git - apple/icu.git/blame - icuSources/samples/layout/gnomeglue.cpp
ICU-64232.0.1.tar.gz
[apple/icu.git] / icuSources / samples / layout / gnomeglue.cpp
CommitLineData
46f4442e 1/*
f3c0d7a5
A
2 *
3 * © 2016 and later: Unicode, Inc. and others.
4 * License & terms of use: http://www.unicode.org/copyright.html#License
46f4442e
A
5 *
6 * (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved
7 *
8 */
9
10#include <gnome.h>
11#include <ft2build.h>
12#include FT_FREETYPE_H
13
14#include "unicode/utypes.h"
15#include "loengine.h"
16#include "rsurface.h"
17#include "gsupport.h"
18
19#include "gnomeglue.h"
20
21#include "LETypes.h"
22#include "LEFontInstance.h"
23#include "GnomeGUISupport.h"
24#include "GnomeFontMap.h"
25#include "GnomeFontInstance.h"
26#include "ScriptCompositeFontInstance.h"
27
28
29U_CDECL_BEGIN
30
31gs_guiSupport *gs_gnomeGuiSupportOpen()
32{
33 return (gs_guiSupport *) new GnomeGUISupport();
34}
35
36void gs_gnomeGuiSupportClose(gs_guiSupport *guiSupport)
37{
38 GnomeGUISupport *gs = (GnomeGUISupport *) guiSupport;
39
40 delete gs;
41}
42
43rs_surface *rs_gnomeRenderingSurfaceOpen(GtkWidget *theWidget)
44{
45 return (rs_surface *) new GnomeSurface(theWidget);
46}
47
48void rs_gnomeRenderingSurfaceClose(rs_surface *surface)
49{
50 GnomeSurface *rs = (GnomeSurface *) surface;
51
52 delete rs;
53}
54
55fm_fontMap *fm_gnomeFontMapOpen(FT_Library engine, const char *fileName, le_int16 pointSize, gs_guiSupport *guiSupport, LEErrorCode *status)
56{
57 return (fm_fontMap *) new GnomeFontMap(engine, fileName, pointSize, (GnomeGUISupport *) guiSupport, *status);
58}
59
60void fm_fontMapClose(fm_fontMap *fontMap)
61{
62 GnomeFontMap *fm = (GnomeFontMap *) fontMap;
63
64 delete fm;
65}
66
67le_font *le_scriptCompositeFontOpen(fm_fontMap *fontMap)
68{
69 return (le_font *) new ScriptCompositeFontInstance((FontMap *) fontMap);
70}
71
72void le_fontClose(le_font *font)
73{
74 LEFontInstance *fi = (LEFontInstance *) font;
75
76 delete fi;
77}
78
79U_CDECL_END