1 | /* |
2 | * $Id: TEXTMETRIC.java,v 1.1.1.5 2004/05/25 20:23:27 hastings Exp $ |
3 | * |
4 | * (c) Copyright, Moebius Solutions, Inc., 2004 |
5 | * |
6 | * All Rights Reserved |
7 | * |
8 | * This material may be reproduced by or for the U. S. Government |
9 | * pursuant to the copyright license under the clause at |
10 | * DFARS 252.227-7014 (OCT 2001). |
11 | */ |
12 | |
13 | package com.moesol.bindings.platform_sdk.windows_api; |
14 | |
15 | import java.nio.ByteBuffer; |
16 | |
17 | import com.moesol.bindings.NativeStructure; |
18 | |
19 | /** |
20 | * Implement the Win32 TEXTMETRIC structure in java. |
21 | * |
22 | * @author hastings |
23 | */ |
24 | public class TEXTMETRIC extends NativeStructure { |
25 | // TEXTMETRIC |
26 | public TEXTMETRIC() { |
27 | super( new byte[sizeof()] ); |
28 | } |
29 | /* As a substructure on bb */ |
30 | public TEXTMETRIC(ByteBuffer bb) { |
31 | super( bb ); |
32 | } |
33 | public static int sizeof() { |
34 | return 56; |
35 | } |
36 | public void set_tmHeight(int v) { |
37 | putInt(0, v); |
38 | } |
39 | public int get_tmHeight() { |
40 | return getInt(0); |
41 | } |
42 | public void set_tmAscent(int v) { |
43 | putInt(4, v); |
44 | } |
45 | public int get_tmAscent() { |
46 | return getInt(4); |
47 | } |
48 | public void set_tmDescent(int v) { |
49 | putInt(8, v); |
50 | } |
51 | public int get_tmDescent() { |
52 | return getInt(8); |
53 | } |
54 | public void set_tmInternalLeading(int v) { |
55 | putInt(12, v); |
56 | } |
57 | public int get_tmInternalLeading() { |
58 | return getInt(12); |
59 | } |
60 | public void set_tmExternalLeading(int v) { |
61 | putInt(16, v); |
62 | } |
63 | public int get_tmExternalLeading() { |
64 | return getInt(16); |
65 | } |
66 | public void set_tmAveCharWidth(int v) { |
67 | putInt(20, v); |
68 | } |
69 | public int get_tmAveCharWidth() { |
70 | return getInt(20); |
71 | } |
72 | public void set_tmMaxCharWidth(int v) { |
73 | putInt(24, v); |
74 | } |
75 | public int get_tmMaxCharWidth() { |
76 | return getInt(24); |
77 | } |
78 | public void set_tmWeight(int v) { |
79 | putInt(28, v); |
80 | } |
81 | public int get_tmWeight() { |
82 | return getInt(28); |
83 | } |
84 | public void set_tmOverhang(int v) { |
85 | putInt(32, v); |
86 | } |
87 | public int get_tmOverhang() { |
88 | return getInt(32); |
89 | } |
90 | public void set_tmDigitizedAspectX(int v) { |
91 | putInt(36, v); |
92 | } |
93 | public int get_tmDigitizedAspectX() { |
94 | return getInt(36); |
95 | } |
96 | public void set_tmDigitizedAspectY(int v) { |
97 | putInt(40, v); |
98 | } |
99 | public int get_tmDigitizedAspectY() { |
100 | return getInt(40); |
101 | } |
102 | public void set_tmFirstChar(byte v) { |
103 | putByte(44, v); |
104 | } |
105 | public byte get_tmFirstChar() { |
106 | return getByte(44); |
107 | } |
108 | public void set_tmLastChar(byte v) { |
109 | putByte(45, v); |
110 | } |
111 | public byte get_tmLastChar() { |
112 | return getByte(45); |
113 | } |
114 | public void set_tmDefaultChar(byte v) { |
115 | putByte(46, v); |
116 | } |
117 | public byte get_tmDefaultChar() { |
118 | return getByte(46); |
119 | } |
120 | public void set_tmBreakChar(byte v) { |
121 | putByte(47, v); |
122 | } |
123 | public byte get_tmBreakChar() { |
124 | return getByte(47); |
125 | } |
126 | public void set_tmItalic(byte v) { |
127 | putByte(48, v); |
128 | } |
129 | public byte get_tmItalic() { |
130 | return getByte(48); |
131 | } |
132 | public void set_tmUnderlined(byte v) { |
133 | putByte(49, v); |
134 | } |
135 | public byte get_tmUnderlined() { |
136 | return getByte(49); |
137 | } |
138 | public void set_tmStruckOut(byte v) { |
139 | putByte(50, v); |
140 | } |
141 | public byte get_tmStruckOut() { |
142 | return getByte(50); |
143 | } |
144 | public void set_tmPitchAndFamily(byte v) { |
145 | putByte(51, v); |
146 | } |
147 | public byte get_tmPitchAndFamily() { |
148 | return getByte(51); |
149 | } |
150 | public void set_tmCharSet(byte v) { |
151 | putByte(52, v); |
152 | } |
153 | public byte get_tmCharSet() { |
154 | return getByte(52); |
155 | } |
156 | } |