| 1 | /* |
| 2 | * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
| 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 4 | * |
| 5 | * This code is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License version 2 only, as |
| 7 | * published by the Free Software Foundation. Oracle designates this |
| 8 | * particular file as subject to the "Classpath" exception as provided |
| 9 | * by Oracle in the LICENSE file that accompanied this code. |
| 10 | * |
| 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 14 | * version 2 for more details (a copy is included in the LICENSE file that |
| 15 | * accompanied this code). |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License version |
| 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
| 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | * |
| 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
| 22 | * or visit www.oracle.com if you need additional information or have any |
| 23 | * questions. |
| 24 | */ |
| 25 | |
| 26 | #ifndef SunFontIDIncludesDefined |
| 27 | #define SunFontIDIncludesDefined |
| 28 | |
| 29 | #include "jni.h" |
| 30 | |
| 31 | #ifdef __cplusplus |
| 32 | extern "C" { |
| 33 | #endif |
| 34 | |
| 35 | typedef struct FontManagerNativeIDs { |
| 36 | |
| 37 | /* sun/font/Font2D methods */ |
| 38 | jmethodID getMapperMID; |
| 39 | jmethodID getTableBytesMID; |
| 40 | jmethodID canDisplayMID; |
| 41 | jmethodID f2dCharToGlyphMID; |
| 42 | jmethodID f2dCharToVariationGlyphMID; |
| 43 | |
| 44 | /* sun/font/CharToGlyphMapper methods */ |
| 45 | jmethodID charToGlyphMID; |
| 46 | |
| 47 | /* sun/font/PhysicalStrike methods */ |
| 48 | jmethodID getGlyphMetricsMID; |
| 49 | jmethodID getGlyphPointMID; |
| 50 | jmethodID adjustPointMID; |
| 51 | jfieldID pScalerContextFID; |
| 52 | |
| 53 | /* java/awt/geom/Rectangle2D.Float */ |
| 54 | jclass rect2DFloatClass; |
| 55 | jmethodID rect2DFloatCtr; |
| 56 | jmethodID rect2DFloatCtr4; |
| 57 | jfieldID rectF2DX, rectF2DY, rectF2DWidth, rectF2DHeight; |
| 58 | |
| 59 | /* java/awt/geom/Point2D.Float */ |
| 60 | jclass pt2DFloatClass; |
| 61 | jmethodID pt2DFloatCtr; |
| 62 | jfieldID xFID, yFID; |
| 63 | |
| 64 | /* java/awt/geom/GeneralPath */ |
| 65 | jclass gpClass; |
| 66 | jmethodID gpCtr; |
| 67 | jmethodID gpCtrEmpty; |
| 68 | |
| 69 | /* sun/font/StrikeMetrics */ |
| 70 | jclass strikeMetricsClass; |
| 71 | jmethodID strikeMetricsCtr; |
| 72 | |
| 73 | /* sun/font/TrueTypeFont */ |
| 74 | jmethodID ttReadBlockMID; |
| 75 | jmethodID ttReadBytesMID; |
| 76 | |
| 77 | /* sun/font/Type1Font */ |
| 78 | jmethodID readFileMID; |
| 79 | |
| 80 | /* sun/font/GlyphList */ |
| 81 | jfieldID glyphListX, glyphListY, glyphListLen, |
| 82 | glyphImages, glyphListUsePos, glyphListPos, lcdRGBOrder, lcdSubPixPos; |
| 83 | } FontManagerNativeIDs; |
| 84 | |
| 85 | /* Note: we share variable in the context of fontmanager lib |
| 86 | but we need access method to use it from separate rasterizer lib */ |
| 87 | extern FontManagerNativeIDs sunFontIDs; |
| 88 | JNIEXPORT FontManagerNativeIDs getSunFontIDs(JNIEnv* env); |
| 89 | |
| 90 | #ifdef __cplusplus |
| 91 | } |
| 92 | #endif |
| 93 | |
| 94 | #endif |
| 95 | |