/scilab-master-1333395999/modules/renderer/src/jni/DrawableSegsGL.hxx

# · C++ Header · 192 lines · 74 code · 40 blank · 78 comment · 5 complexity · 4087ebafc4945c4fd84b62cc485823d7 MD5 · raw file

  1. /* Generated by GIWS (version 2.0.0) with command:
  2. giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/DrawableSegsGL.giws.xml
  3. */
  4. /*
  5. Copyright 2007-2008 INRIA
  6. Copyright 2008-2011 DIGITEO
  7. Copyright 2011-2012 Scilab Enterprises
  8. Author : Sylvestre Ledru & others
  9. This is generated code.
  10. This software is a computer program whose purpose is to hide the complexity
  11. of accessing Java objects/methods from C++ code.
  12. This software is governed by the CeCILL-B license under French law and
  13. abiding by the rules of distribution of free software. You can use,
  14. modify and/ or redistribute the software under the terms of the CeCILL-B
  15. license as circulated by CEA, CNRS and INRIA at the following URL
  16. "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
  21. liability.
  22. In this respect, the user's attention is drawn to the risks associated
  23. with loading, using, modifying and/or developing or reproducing the
  24. software by the user in light of its specific status of free software,
  25. that may mean that it is complicated to manipulate, and that also
  26. therefore means that it is reserved for developers and experienced
  27. professionals having in-depth computer knowledge. Users are therefore
  28. encouraged to load and test the software's suitability as regards their
  29. requirements in conditions enabling the security of their systems and/or
  30. data to be ensured and, more generally, to use and operate it in the
  31. same conditions as regards security.
  32. The fact that you are presently reading this means that you have had
  33. knowledge of the CeCILL-B license and that you accept its terms.
  34. */
  35. #ifndef __ORG_SCILAB_MODULES_RENDERER_SEGSDRAWING_DRAWABLESEGSGL__
  36. #define __ORG_SCILAB_MODULES_RENDERER_SEGSDRAWING_DRAWABLESEGSGL__
  37. #include <iostream>
  38. #include <string>
  39. #include <string.h>
  40. #include <stdlib.h>
  41. #include <jni.h>
  42. #include "GiwsException.hxx"
  43. #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
  44. typedef signed char byte;
  45. #else
  46. #pragma message("Byte has been redefined elsewhere. Some problems can happen")
  47. #endif
  48. #ifndef GIWSEXPORT
  49. # if defined(_MSC_VER) || defined(__WIN32__) || defined(__CYGWIN__)
  50. # if defined(STATIC_LINKED)
  51. # define GIWSEXPORT
  52. # else
  53. # define GIWSEXPORT __declspec(dllexport)
  54. # endif
  55. # else
  56. # if __GNUC__ >= 4
  57. # define GIWSEXPORT __attribute__ ((visibility ("default")))
  58. # else
  59. # define GIWSEXPORT
  60. # endif
  61. # endif
  62. #endif
  63. namespace org_scilab_modules_renderer_segsDrawing {
  64. class GIWSEXPORT DrawableSegsGL {
  65. private:
  66. JavaVM * jvm;
  67. protected:
  68. jmethodID voiddisplayID; // cache method id
  69. jmethodID voidinitializeDrawingjintintID; // cache method id
  70. jmethodID voidendDrawingID; // cache method id
  71. jmethodID voidshowjintintID; // cache method id
  72. jmethodID voiddestroyjintintID; // cache method id
  73. jmethodID voidtranslatejdoubledoublejdoubledoublejdoubledoubleID; // cache method id
  74. jmethodID voidendTranslateID; // cache method id
  75. jmethodID voidclipXjdoubledoublejdoubledoubleID; // cache method id
  76. jmethodID voidclipYjdoubledoublejdoubledoubleID; // cache method id
  77. jmethodID voidclipZjdoubledoublejdoubledoubleID; // cache method id
  78. jmethodID voidunClipID; // cache method id
  79. jobject instance;
  80. jclass instanceClass; // cache class
  81. // Caching (if any)
  82. /**
  83. * Get the environment matching to the current thread.
  84. */
  85. virtual JNIEnv * getCurrentEnv();
  86. public:
  87. // Constructor
  88. /**
  89. * Create a wrapping of the object from a JNIEnv.
  90. * It will call the default constructor
  91. * @param JEnv_ the Java Env
  92. */
  93. DrawableSegsGL(JavaVM * jvm_);
  94. /**
  95. * Create a wrapping of an already existing object from a JNIEnv.
  96. * The object must have already been instantiated
  97. * @param JEnv_ the Java Env
  98. * @param JObj the object
  99. */
  100. DrawableSegsGL(JavaVM * jvm_, jobject JObj);
  101. /**
  102. * This is a fake constructor to avoid the constructor
  103. * chaining when dealing with extended giws classes
  104. */
  105. #ifdef FAKEGIWSDATATYPE
  106. DrawableSegsGL(fakeGiwsDataType::fakeGiwsDataType /* unused */) {}
  107. #endif
  108. // Destructor
  109. ~DrawableSegsGL();
  110. // Generic method
  111. // Synchronization methods
  112. /**
  113. * Enter monitor associated with the object.
  114. * Equivalent of creating a "synchronized(obj)" scope in Java.
  115. */
  116. void synchronize();
  117. /**
  118. * Exit monitor associated with the object.
  119. * Equivalent of ending a "synchronized(obj)" scope.
  120. */
  121. void endSynchronize();
  122. // Methods
  123. void display();
  124. void initializeDrawing(int figureIndex);
  125. void endDrawing();
  126. void show(int figureIndex);
  127. void destroy(int parentFigureIndex);
  128. void translate(double tx, double ty, double tz);
  129. void endTranslate();
  130. void clipX(double xMin, double xMax);
  131. void clipY(double yMin, double yMax);
  132. void clipZ(double zMin, double zMax);
  133. void unClip();
  134. /**
  135. * Get class name to use for static methods
  136. * @return class name to use for static methods
  137. */
  138. static const std::string className()
  139. {
  140. return "org/scilab/modules/renderer/segsDrawing/DrawableSegsGL";
  141. }
  142. };
  143. }
  144. #endif