1 |
756 |
jeremybenn |
|
2 |
|
|
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
3 |
|
|
|
4 |
|
|
#ifndef __gnu_java_awt_peer_gtk_GdkFontPeer__
|
5 |
|
|
#define __gnu_java_awt_peer_gtk_GdkFontPeer__
|
6 |
|
|
|
7 |
|
|
#pragma interface
|
8 |
|
|
|
9 |
|
|
#include <gnu/java/awt/peer/ClasspathFontPeer.h>
|
10 |
|
|
#include <gcj/array.h>
|
11 |
|
|
|
12 |
|
|
extern "Java"
|
13 |
|
|
{
|
14 |
|
|
namespace gnu
|
15 |
|
|
{
|
16 |
|
|
namespace classpath
|
17 |
|
|
{
|
18 |
|
|
class Pointer;
|
19 |
|
|
}
|
20 |
|
|
namespace java
|
21 |
|
|
{
|
22 |
|
|
namespace awt
|
23 |
|
|
{
|
24 |
|
|
namespace peer
|
25 |
|
|
{
|
26 |
|
|
namespace gtk
|
27 |
|
|
{
|
28 |
|
|
class GdkFontPeer;
|
29 |
|
|
class GdkFontPeer$GdkFontMetrics;
|
30 |
|
|
}
|
31 |
|
|
}
|
32 |
|
|
}
|
33 |
|
|
}
|
34 |
|
|
}
|
35 |
|
|
namespace java
|
36 |
|
|
{
|
37 |
|
|
namespace awt
|
38 |
|
|
{
|
39 |
|
|
class Font;
|
40 |
|
|
class FontMetrics;
|
41 |
|
|
namespace font
|
42 |
|
|
{
|
43 |
|
|
class FontRenderContext;
|
44 |
|
|
class GlyphMetrics;
|
45 |
|
|
class GlyphVector;
|
46 |
|
|
class LineMetrics;
|
47 |
|
|
}
|
48 |
|
|
namespace geom
|
49 |
|
|
{
|
50 |
|
|
class Rectangle2D;
|
51 |
|
|
}
|
52 |
|
|
}
|
53 |
|
|
namespace nio
|
54 |
|
|
{
|
55 |
|
|
class ByteBuffer;
|
56 |
|
|
}
|
57 |
|
|
namespace text
|
58 |
|
|
{
|
59 |
|
|
class CharacterIterator;
|
60 |
|
|
}
|
61 |
|
|
}
|
62 |
|
|
}
|
63 |
|
|
|
64 |
|
|
class gnu::java::awt::peer::gtk::GdkFontPeer : public ::gnu::java::awt::peer::ClasspathFontPeer
|
65 |
|
|
{
|
66 |
|
|
|
67 |
|
|
public: // actually package-private
|
68 |
|
|
static void initStaticState();
|
69 |
|
|
private:
|
70 |
|
|
void initState();
|
71 |
|
|
void dispose();
|
72 |
|
|
void setFont(::java::lang::String *, jint, jint);
|
73 |
|
|
public: // actually package-private
|
74 |
|
|
virtual void getFontMetrics(JArray< jdouble > *);
|
75 |
|
|
virtual void getTextMetrics(::java::lang::String *, JArray< jdouble > *);
|
76 |
|
|
virtual void releasePeerGraphicsResource();
|
77 |
|
|
public: // actually protected
|
78 |
|
|
virtual void finalize();
|
79 |
|
|
private:
|
80 |
|
|
::java::lang::String * buildString(::java::text::CharacterIterator *);
|
81 |
|
|
::java::lang::String * buildString(::java::text::CharacterIterator *, jint, jint);
|
82 |
|
|
::java::lang::String * buildString(JArray< jchar > *, jint, jint);
|
83 |
|
|
public:
|
84 |
|
|
GdkFontPeer(::java::lang::String *, jint);
|
85 |
|
|
GdkFontPeer(::java::lang::String *, jint, jint);
|
86 |
|
|
GdkFontPeer(::java::lang::String *, ::java::util::Map *);
|
87 |
|
|
public: // actually package-private
|
88 |
|
|
static ::java::awt::Font * initFont(::java::awt::Font *);
|
89 |
|
|
private:
|
90 |
|
|
void setupMetrics();
|
91 |
|
|
public:
|
92 |
|
|
virtual ::java::lang::String * getSubFamilyName(::java::awt::Font *, ::java::util::Locale *);
|
93 |
|
|
private:
|
94 |
|
|
JArray< jbyte > * getTrueTypeTable(jbyte, jbyte, jbyte, jbyte);
|
95 |
|
|
public:
|
96 |
|
|
virtual ::java::lang::String * getPostScriptName(::java::awt::Font *);
|
97 |
|
|
private:
|
98 |
|
|
::java::lang::String * getName(jint, ::java::util::Locale *);
|
99 |
|
|
public:
|
100 |
|
|
virtual jboolean canDisplay(::java::awt::Font *, jint);
|
101 |
|
|
virtual jint canDisplayUpTo(::java::awt::Font *, ::java::text::CharacterIterator *, jint, jint);
|
102 |
|
|
virtual ::java::awt::font::GlyphVector * createGlyphVector(::java::awt::Font *, ::java::awt::font::FontRenderContext *, ::java::text::CharacterIterator *);
|
103 |
|
|
virtual ::java::awt::font::GlyphVector * createGlyphVector(::java::awt::Font *, ::java::awt::font::FontRenderContext *, JArray< jint > *);
|
104 |
|
|
virtual jbyte getBaselineFor(::java::awt::Font *, jchar);
|
105 |
|
|
virtual ::java::awt::font::LineMetrics * getLineMetrics(::java::awt::Font *, ::java::text::CharacterIterator *, jint, jint, ::java::awt::font::FontRenderContext *);
|
106 |
|
|
virtual ::java::awt::geom::Rectangle2D * getMaxCharBounds(::java::awt::Font *, ::java::awt::font::FontRenderContext *);
|
107 |
|
|
virtual jint getMissingGlyphCode(::java::awt::Font *);
|
108 |
|
|
virtual ::java::lang::String * getGlyphName(::java::awt::Font *, jint);
|
109 |
|
|
virtual jint getNumGlyphs(::java::awt::Font *);
|
110 |
|
|
virtual jboolean hasUniformLineMetrics(::java::awt::Font *);
|
111 |
|
|
virtual ::java::awt::font::GlyphVector * layoutGlyphVector(::java::awt::Font *, ::java::awt::font::FontRenderContext *, JArray< jchar > *, jint, jint, jint);
|
112 |
|
|
virtual ::java::awt::font::LineMetrics * getLineMetrics(::java::awt::Font *, ::java::lang::String *, ::java::awt::font::FontRenderContext *);
|
113 |
|
|
virtual ::java::awt::FontMetrics * getFontMetrics(::java::awt::Font *);
|
114 |
|
|
public: // actually package-private
|
115 |
|
|
virtual ::java::awt::font::GlyphMetrics * getGlyphMetrics(jint);
|
116 |
|
|
virtual void putGlyphMetrics(jint, ::java::awt::font::GlyphMetrics *);
|
117 |
|
|
static ::java::awt::font::FontRenderContext * DEFAULT_CTX;
|
118 |
|
|
::java::util::HashMap * __attribute__((aligned(__alignof__( ::gnu::java::awt::peer::ClasspathFontPeer)))) textLayoutCache;
|
119 |
|
|
private:
|
120 |
|
|
jint native_state;
|
121 |
|
|
::java::util::HashMap * metricsCache;
|
122 |
|
|
static const jint FONT_METRICS_ASCENT = 0;
|
123 |
|
|
static const jint FONT_METRICS_MAX_ASCENT = 1;
|
124 |
|
|
static const jint FONT_METRICS_DESCENT = 2;
|
125 |
|
|
static const jint FONT_METRICS_MAX_DESCENT = 3;
|
126 |
|
|
static const jint FONT_METRICS_MAX_ADVANCE = 4;
|
127 |
|
|
static const jint FONT_METRICS_HEIGHT = 5;
|
128 |
|
|
static const jint FONT_METRICS_UNDERLINE_OFFSET = 6;
|
129 |
|
|
static const jint FONT_METRICS_UNDERLINE_THICKNESS = 7;
|
130 |
|
|
public: // actually package-private
|
131 |
|
|
jfloat ascent;
|
132 |
|
|
jfloat descent;
|
133 |
|
|
jfloat maxAscent;
|
134 |
|
|
jfloat maxDescent;
|
135 |
|
|
jfloat maxAdvance;
|
136 |
|
|
jfloat height;
|
137 |
|
|
jfloat underlineOffset;
|
138 |
|
|
jfloat underlineThickness;
|
139 |
|
|
::gnu::java::awt::peer::gtk::GdkFontPeer$GdkFontMetrics * metrics;
|
140 |
|
|
private:
|
141 |
|
|
::java::nio::ByteBuffer * nameTable;
|
142 |
|
|
::gnu::classpath::Pointer * nativeFont;
|
143 |
|
|
public:
|
144 |
|
|
static ::java::lang::Class class$;
|
145 |
|
|
};
|
146 |
|
|
|
147 |
|
|
#endif // __gnu_java_awt_peer_gtk_GdkFontPeer__
|