simplelayout.h

Go to the documentation of this file.
00001 
00015 #ifndef _SIMPLELAYOUT_H_
00016 #define _SIMPLELAYOUT_H_
00017 
00018 #include "../jnilib.h"
00019 
00020 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023 
00025 #define CLS_FLOWLAYOUT "java/awt/FlowLayout"
00026 
00028 #define CLS_BORDERLAYOUT "java/awt/BorderLayout"
00029 
00031 #define CLS_GRIDLAYOUT "java/awt/GridLayout"
00032 
00033 #define BORDERLAYOUT_NORTH getStaticObjectFieldByName(CLS_BORDERLAYOUT, "NORTH", "Ljava/lang/String;")
00034 #define BORDERLAYOUT_EAST getStaticObjectFieldByName(CLS_BORDERLAYOUT, "EAST", "Ljava/lang/String;")
00035 #define BORDERLAYOUT_SOUTH getStaticObjectFieldByName(CLS_BORDERLAYOUT, "SOUTH", "Ljava/lang/String;")
00036 #define BORDERLAYOUT_WEST getStaticObjectFieldByName(CLS_BORDERLAYOUT, "WEST", "Ljava/lang/String;")
00037 #define BORDERLAYOUT_CENTER getStaticObjectFieldByName(CLS_BORDERLAYOUT, "CENTER", "Ljava/lang/String;")
00038 
00039 #define FLOWLAYOUT_LEFT getStaticIntFieldByName(CLS_FLOWLAYOUT, "LEFT")
00040 #define FLOWLAYOUT_RIGHT getStaticIntFieldByName(CLS_FLOWLAYOUT, "RIGHT")
00041 #define FLOWLAYOUT_CENTER getStaticIntFieldByName(CLS_FLOWLAYOUT, "CENTER")
00042 
00043 struct SimpleLayout_;
00044 
00045 struct SimpleLayoutCPP_;
00046 
00047 #ifdef __cplusplus
00048    typedef SimpleLayoutCPP_ SimpleLayout; 
00049    #define createFlowLayout createFlowLayoutCPP 
00050    #define createBorderLayout createBorderLayoutCPP 
00051    #define createGridLayout createGridLayoutCPP 
00052    #define deleteSimpleLayout deleteSimpleLayoutCPP 
00053 #else
00054    typedef struct SimpleLayout_ SimpleLayout; 
00055    #define createFlowLayout createFlowLayoutC 
00056    #define createBorderLayout createBorderLayoutC 
00057    #define createGridLayout createGridLayoutC 
00058    #define deleteSimpleLayout deleteSimpleLayoutC 
00059 #endif
00060 
00064 typedef struct SimpleLayoutData {
00065    jclass clssimplelayout; 
00066    jobject simplelayout; 
00067 } SimpleLayoutData;
00068 
00072 typedef struct SimpleLayout_ {
00073    SimpleLayoutData simplelayout;
00074    jobject (*getObject)(SimpleLayout* simplelayout);
00075 } SimpleLayout_;
00076 
00080 typedef struct SimpleLayoutCPP_ {
00081    SimpleLayoutData simplelayout;
00082    struct SimpleLayout_ *functions;
00083 
00084 #ifdef __cplusplus
00085    jobject getObject() {
00086       return functions->getObject(this);
00087    }
00088 #endif
00089 } SimpleLayoutCPP_;
00090 
00091 
00092 void createFlowLayoutC(SimpleLayout_* simplelayout, jint hgap, jint vgap, jint align);
00093 void createFlowLayoutCPP(SimpleLayoutCPP_* simplelayout, jint hgap, jint vgap, jint align);
00094 void createBorderLayoutC(SimpleLayout_* simplelayout, jint hgap, jint vgap);
00095 void createBorderLayoutCPP(SimpleLayoutCPP_* simplelayout, jint hgap, jint vgap);
00096 void createGridLayoutC(SimpleLayout_* simplelayout, jint hgap, jint vgap, jint rows, jint cols);
00097 void createGridLayoutCPP(SimpleLayoutCPP_* simplelayout, jint hgap, jint vgap, jint rows, jint cols);
00098 
00099 void deleteSimpleLayoutC(SimpleLayout_* simplelayout);
00100 void deleteSimpleLayoutCPP(SimpleLayoutCPP_* simplelayout);
00101 
00102 #ifdef __cplusplus
00103 } /* extern "C" */
00104 #endif
00105 
00106 #endif /* _SIMPLELAYOUT_H_ */
00107 
00108 /* end of file simplelayout.h */

Generated on Sat Nov 19 14:11:11 2005 for GrubC by  doxygen 1.4.4