1 /* Generated by GIWS (version 2.0.1) with command:
2 giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/XlFontManager.giws.xml
6 This is generated code.
8 This software is a computer program whose purpose is to hide the complexity
9 of accessing Java objects/methods from C++ code.
11 This software is governed by the CeCILL-B license under French law and
12 abiding by the rules of distribution of free software. You can use,
13 modify and/ or redistribute the software under the terms of the CeCILL-B
14 license as circulated by CEA, CNRS and INRIA at the following URL
15 "http://www.cecill.info".
17 As a counterpart to the access to the source code and rights to copy,
18 modify and redistribute granted by the license, users are provided only
19 with a limited warranty and the software's author, the holder of the
20 economic rights, and the successive licensors have only limited
23 In this respect, the user's attention is drawn to the risks associated
24 with loading, using, modifying and/or developing or reproducing the
25 software by the user in light of its specific status of free software,
26 that may mean that it is complicated to manipulate, and that also
27 therefore means that it is reserved for developers and experienced
28 professionals having in-depth computer knowledge. Users are therefore
29 encouraged to load and test the software's suitability as regards their
30 requirements in conditions enabling the security of their systems and/or
31 data to be ensured and, more generally, to use and operate it in the
32 same conditions as regards security.
34 The fact that you are presently reading this means that you have had
35 knowledge of the CeCILL-B license and that you accept its terms.
39 #ifndef __ORG_SCILAB_MODULES_RENDERER_UTILS_TEXTRENDERING_XLFONTMANAGER__
40 #define __ORG_SCILAB_MODULES_RENDERER_UTILS_TEXTRENDERING_XLFONTMANAGER__
47 #include "GiwsException.hxx"
49 #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
50 typedef signed char byte;
52 #pragma message("Byte has been redefined elsewhere. Some problems can happen")
57 # if defined(_MSC_VER) || defined(__WIN32__) || defined(__CYGWIN__)
58 # if defined(STATIC_LINKED)
61 # define GIWSEXPORT __declspec(dllexport)
65 # define GIWSEXPORT __attribute__ ((visibility ("default")))
72 namespace org_scilab_modules_renderer_utils_textRendering {
73 class GIWSEXPORT XlFontManager {
79 jmethodID jobjectArray_getInstalledFontsNameID; // cache method id
80 jmethodID jintgetSizeInstalledFontsNameID; // cache method id
81 jmethodID jintgetSizeAvailableFontsNameID; // cache method id
82 jmethodID jobjectArray_getAvailableFontsNameID; // cache method id
83 jmethodID jbooleanisAvailableFontNamejstringjava_lang_StringID; // cache method id
84 jmethodID jintaddFontjstringjava_lang_StringID; // cache method id
85 jmethodID jintchangeFontjintintjstringjava_lang_StringID; // cache method id
86 jmethodID jintchangeFontWithPropertyjintintjstringjava_lang_StringjbooleanbooleanjbooleanbooleanID; // cache method id
87 jmethodID voidresetXlFontManagerID; // cache method id
88 jmethodID jintaddFontFromFilenamejstringjava_lang_StringID; // cache method id
89 jmethodID jintchangeFontFromFilenamejintintjstringjava_lang_StringID; // cache method id
94 jclass instanceClass; // cache class
101 * Get the environment matching to the current thread.
103 virtual JNIEnv * getCurrentEnv();
108 * Create a wrapping of the object from a JNIEnv.
109 * It will call the default constructor
110 * @param JEnv_ the Java Env
112 XlFontManager(JavaVM * jvm_);
115 * Create a wrapping of an already existing object from a JNIEnv.
116 * The object must have already been instantiated
117 * @param JEnv_ the Java Env
118 * @param JObj the object
120 XlFontManager(JavaVM * jvm_, jobject JObj);
124 * This is a fake constructor to avoid the constructor
125 * chaining when dealing with extended giws classes
127 #ifdef FAKEGIWSDATATYPE
128 XlFontManager(fakeGiwsDataType::fakeGiwsDataType /* unused */) {}
135 // Synchronization methods
137 * Enter monitor associated with the object.
138 * Equivalent of creating a "synchronized(obj)" scope in Java.
143 * Exit monitor associated with the object.
144 * Equivalent of ending a "synchronized(obj)" scope.
146 void endSynchronize();
149 char** getInstalledFontsName();
151 int getSizeInstalledFontsName();
153 int getSizeAvailableFontsName();
155 char** getAvailableFontsName();
157 bool isAvailableFontName(char const* fontname);
159 int addFont(char const* fontName);
161 int changeFont(int index, char const* fontName);
163 int changeFontWithProperty(int index, char const* fontName, bool isBold, bool isItalic);
165 void resetXlFontManager();
167 int addFontFromFilename(char const* FontFilename);
169 int changeFontFromFilename(int index, char const* FontFilename);
173 * Get class name to use for static methods
174 * @return class name to use for static methods
177 static const std::string className()
179 return "org/scilab/modules/renderer/utils/textRendering/XlFontManager";