blob: e553c0617b1fe2826a03585e04fc485164f03221 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
/*
*
* (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved
*
*/
#include <windows.h>
#include "unicode/utypes.h"
#include "loengine.h"
#include "rsurface.h"
#include "gsupport.h"
#include "gdiglue.h"
#include "LETypes.h"
#include "LEFontInstance.h"
#include "GDIGUISupport.h"
#include "GDIFontMap.h"
#include "ScriptCompositeFontInstance.h"
U_CDECL_BEGIN
gs_guiSupport *gs_gdiGuiSupportOpen()
{
return (gs_guiSupport *) new GDIGUISupport();
}
void gs_gdiGuiSupportClose(gs_guiSupport *guiSupport)
{
GDIGUISupport *gs = (GDIGUISupport *) guiSupport;
delete gs;
}
rs_surface *rs_gdiRenderingSurfaceOpen(HDC hdc)
{
return (rs_surface *) new GDISurface(hdc);
}
void rs_gdiRenderingSurfaceSetHDC(rs_surface *surface, HDC hdc)
{
GDISurface *rs = (GDISurface *) surface;
rs->setHDC(hdc);
}
void rs_gdiRenderingSurfaceClose(rs_surface *surface)
{
GDISurface *rs = (GDISurface *) surface;
delete rs;
}
fm_fontMap *fm_gdiFontMapOpen(rs_surface *surface, const char *fileName, le_int16 pointSize, gs_guiSupport *guiSupport, LEErrorCode *status)
{
return (fm_fontMap *) new GDIFontMap((GDISurface *) surface, fileName, pointSize, (GDIGUISupport *) guiSupport, *status);
}
void fm_fontMapClose(fm_fontMap *fontMap)
{
GDIFontMap *fm = (GDIFontMap *) fontMap;
delete fm;
}
le_font *le_scriptCompositeFontOpen(fm_fontMap *fontMap)
{
return (le_font *) new ScriptCompositeFontInstance((FontMap *) fontMap);
}
void le_fontClose(le_font *font)
{
LEFontInstance *fi = (LEFontInstance *) font;
delete fi;
}
U_CDECL_END
|