01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: /**
18: * @author Ilya S. Okomin
19: * @version $Revision$
20: */package org.apache.harmony.awt.nativebridge.linux;
21:
22: import org.apache.harmony.awt.nativebridge.*;
23:
24: /**
25: * This file has been generated by a program.
26: *
27: *
28: */
29: public class LinuxNativeFontWrapper extends BasicLibWrapper {
30: static LinuxNativeFontWrapper instance;
31:
32: public static final byte FT_CURVE_TAG_ON = 1;
33: public static final byte FT_CURVE_TAG_CONIC = 0;
34: public static final byte FT_CURVE_TAG_CUBIC = 2;
35:
36: public static synchronized LinuxNativeFontWrapper getInstance() {
37: if (instance == null) {
38: instance = new LinuxNativeFontWrapper();
39: }
40: return instance;
41: }
42:
43: private LinuxNativeFontWrapper() {
44: }
45:
46: public static class GlyphBitmap extends CommonStructWrapper {
47:
48: public static final int sizeof = NativeBridge.is64 ? 48 : 32;
49:
50: GlyphBitmap(boolean direct) {
51: super (sizeof, direct);
52: }
53:
54: GlyphBitmap(VoidPointer base) {
55: super (base);
56: }
57:
58: GlyphBitmap(long addr) {
59: super (addr);
60: }
61:
62: public final void set_left(int val) {
63: byteBase.setInt32(0, val);
64: }
65:
66: public final int get_left() {
67: return byteBase.getInt32(0);
68: }
69:
70: public final void set_top(int val) {
71: byteBase.setInt32(4, val);
72: }
73:
74: public final int get_top() {
75: return byteBase.getInt32(4);
76: }
77:
78: public final Xft.FT_Bitmap get_bitmap() {
79: return Xft.instance.createFT_Bitmap(getElementPointer(8));
80: }
81:
82: public int size() {
83: return sizeof;
84: }
85: }
86:
87: public final GlyphBitmap createGlyphBitmap(boolean direct) {
88: return new GlyphBitmap(direct);
89: }
90:
91: public final GlyphBitmap createGlyphBitmap(VoidPointer base) {
92: return new GlyphBitmap(base);
93: }
94:
95: public final GlyphBitmap createGlyphBitmap(long addr) {
96: return new GlyphBitmap(addr);
97: }
98: }
|