textarea.h

Go to the documentation of this file.
00001 
00011 #ifndef _TEXTAREA_H_
00012 #define _TEXTAREA_H_
00013 
00014 #include "../jnilib.h"
00015 
00016 #ifdef __cplusplus
00017 extern "C" {
00018 #endif
00019 
00021 #define CLS_TEXTAREA "java/awt/TextArea"
00022 
00023 struct TextArea_;
00024 
00025 struct TextAreaCPP_;
00026 
00027 #ifdef __cplusplus
00028    typedef TextAreaCPP_ TextArea; 
00029    #define createTextArea createTextAreaCPP 
00030    #define deleteTextArea deleteTextAreaCPP 
00031 #else
00032    typedef struct TextArea_ TextArea; 
00033    #define createTextArea createTextAreaC 
00034    #define deleteTextArea deleteTextAreaC 
00035 #endif
00036 
00040 typedef struct TextAreaData {
00041    jclass clstextarea; 
00042    jobject textarea; 
00043    jmethodID msetText; 
00044    jmethodID mgetText; 
00045    jmethodID mgetColumns; 
00046    jmethodID msetColumns; 
00047    jmethodID mgetRows; 
00048    jmethodID msetRows; 
00049 } TextAreaData;
00050 
00054 typedef struct TextArea_ {
00055    TextAreaData textarea;
00056    jobject (*getObject)(TextArea* textarea);
00057    void (*setText)(TextArea* textarea, const char* text);
00058    char* (*getText)(TextArea* textarea);
00059    void (*setSize)(TextArea* textarea, jint width, jint height);
00060    jint (*getHeight)(TextArea* textarea);
00061    jint (*getWidth)(TextArea* textarea);
00062    void (*setLocation)(TextArea* textarea, jint x, jint y);
00063    jint (*getX)(TextArea* textarea);
00064    jint (*getY)(TextArea* textarea);
00065    jint (*getColumns)(TextArea* textarea);
00066    void (*setColumns)(TextArea* textarea, jint columns);
00067    jint (*getRows)(TextArea* textarea);
00068    void (*setRows)(TextArea* textarea, jint rows);
00069 } TextArea_;
00070 
00074 typedef struct TextAreaCPP_ {
00075    TextAreaData textarea;
00076    struct TextArea_ *functions;
00077 
00078 #ifdef __cplusplus
00079    jobject getObject() {
00080       return functions->getObject(this);
00081    }
00082 
00083    void setText(const char* text) {
00084       functions->setText(this, text);
00085    }
00086 
00087    char* getText() {
00088       return functions->getText(this);
00089    }
00090 
00091    void setSize(jint width, jint height) {
00092       functions->setSize(this, width, height);
00093    }
00094 
00095    jint getHeight() {
00096       return functions->getHeight(this);
00097    }
00098 
00099    jint getWidth() {
00100       return functions->getWidth(this);
00101    }
00102 
00103    void setLocation(jint x, jint y) {
00104       functions->setLocation(this, x, y);
00105    }
00106 
00107    jint getX() {
00108       return functions->getX(this);
00109    }
00110 
00111    jint getY() {
00112       return functions->getY(this);
00113    }
00114 
00115    jint getColumns() {
00116       return functions->getColumns(this);
00117    }
00118 
00119    void setColumns(jint columns) {
00120       functions->setColumns(this, columns);
00121    }
00122 
00123    jint getRows() {
00124       return functions->getRows(this);
00125    }
00126 
00127    void setRows(jint rows) {
00128       functions->setRows(this, rows);
00129    }
00130 
00131 #endif
00132 } TextAreaCPP_;
00133 
00134 
00135 void createTextAreaC(TextArea_* textarea);
00136 void createTextAreaCPP(TextAreaCPP_* textarea);
00137 void deleteTextAreaC(TextArea_* textarea);
00138 void deleteTextAreaCPP(TextAreaCPP_* textarea);
00139 
00140 #ifdef __cplusplus
00141 } /* extern "C" */
00142 #endif
00143 
00144 #endif /* _TEXTAREA_H_ */
00145 
00146 /* end of file textarea.h */

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