/[libvob]/libvob/include/vob/jni/Types.hxx
ViewVC logotype

Diff of /libvob/include/vob/jni/Types.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29 by mudyc, Mon Aug 4 13:47:50 2003 UTC revision 1.30 by tjl, Fri Aug 15 18:53:38 2003 UTC
# Line 28  Types.hxx Line 28  Types.hxx
28    
29  #include <jni.h>  #include <jni.h>
30    
 #include <GLMosaicText.hxx>  
31    
32  #include <vob/Vob.hxx>  #include <vob/Vob.hxx>
33  #include <vob/Types.hxx>  #include <vob/Types.hxx>
# Line 43  Types.hxx Line 42  Types.hxx
42  namespace GLMosaicText {  namespace GLMosaicText {
43      namespace Mosaic {      namespace Mosaic {
44          template<class Format> class GLMosaicText::Mosaic::Raster;          template<class Format> class GLMosaicText::Mosaic::Raster;
45            namespace Format {
46                struct Alpha;
47                struct RGBA;
48            }
49      }      }
50        template<class X, class Y> class DenseGlyphs;
51        template<class X, class Y> class Renderer;
52  }  }
53    
54  namespace Vob {  namespace Vob {
# Line 70  namespace Vob { Line 75  namespace Vob {
75      namespace JNI {      namespace JNI {
76          struct TexAccum_JNI;          struct TexAccum_JNI;
77      }      }
78        namespace Font {
79            struct RealFont;
80    
81            // XXX Copied from include/vob/vobs/Text.hxx
82            typedef GLMosaicText::Renderer<
83                        GLMosaicText::DenseGlyphs<unsigned short, GLMosaicText::Mosaic::Format::Alpha>,
84                        unsigned short>
85                    DefaultTextRenderer;
86    
87        }
88    
89  namespace JNI {  namespace JNI {
90      PREDBGVAR(dbg);      PREDBGVAR(dbg);
# Line 104  namespace JNI { Line 119  namespace JNI {
119                                     // template param                                     // template param
120      extern ObjectStorer<P> papers;      extern ObjectStorer<P> papers;
121    
122      // XXX Copied from include/vob/vobs/Text.hxx      typedef ::Vob::Font::RealFont RF;
123      typedef GLMosaicText::Renderer<      extern ObjectStorer<RF> textrenderers;
                 GLMosaicText::DenseGlyphs<unsigned short>,  
                 unsigned short>  
             DefaultTextRenderer;  
   
     // XXX MEMLEAK  
     struct RealFont {  
         GLMosaicText::Font *f;  
         DefaultTextRenderer *rend;  
        RealFont(GLMosaicText::Font *f) : f(f) {  
            rend = new DefaultTextRenderer(f);  
        }  
        float getGlyphWidth(int c) { return rend->g.getGlyphWidth(c); }  
     };  
   
     extern ObjectStorer<RealFont> textrenderers;  
124    
125  #define START_VOB_JNI_CONVERSION(type, javaName_, jnitype_)     \  #define START_VOB_JNI_CONVERSION(type, javaName_, jnitype_)     \
126      struct JParameter<type> {                                   \      struct JParameter<type> {                                   \
# Line 257  namespace JNI { Line 257  namespace JNI {
257              out = in;              out = in;
258      END_VOB_JNI_CONVERSION      END_VOB_JNI_CONVERSION
259    
260      START_VOB_JNI_CONVERSION_IDDED(DefaultTextRenderer *,      START_VOB_JNI_CONVERSION_IDDED(Font::RealFont *,
261                  "GL.Font")                  "GL.Font")
262          out = textrenderers[in]->rend;          out = textrenderers[in];
263      END_VOB_JNI_CONVERSION      END_VOB_JNI_CONVERSION
264    
265      START_VOB_JNI_CONVERSION_IDDED(::Vob::Paper::Paper *,      START_VOB_JNI_CONVERSION_IDDED(::Vob::Paper::Paper *,

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26