00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016
00017
00025 #include <gobjconfig.h>
00026
00027 #ifndef gobj_lib_view_h
00028 #define gobj_lib_view_h
00029
00030 #include <gobj/decls.h>
00031 #include <gobj/id.h>
00032 #include <gobj/context.h>
00033 #include <gobj/object.h>
00034 #include <gobj/nativemgr.h>
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 #if 0
00040 }
00041 #endif
00042
00043
00055 Gj_View* Gj_view_new(Gj_Ctx* ctx, char* name, Gj_Id* id, Gj_Id* type, Gj_Path* nativefunc);
00056
00057
00064 Gj_View* Gj_view_create(Gj_Ctx* ctx, Gj_Stream* stream);
00065
00066
00073 int Gj_view_delete(Gj_Ctx* ctx, Gj_View* ptr);
00074
00075
00082 int Gj_view_write(Gj_Ctx* ctx, Gj_View* view, Gj_Stream* stream);
00083
00084
00091 void Gj_view_register(Gj_Ctx* ctx, Gj_View* view);
00092
00093
00101 void Gj_view_finish(Gj_Ctx* ctx, Gj_View* view);
00102
00103
00108 Gj_Bool Gj_view_isRegistered(Gj_View* view);
00109
00110
00115 Gj_Bool Gj_view_isFinished(Gj_View* view);
00116
00117
00124 char* Gj_view_getName(Gj_View* view);
00125
00126
00135 Gj_Id* Gj_view_getId(Gj_Ctx* ctx, Gj_View* view);
00136
00137
00144 int Gj_view_addParameter(Gj_Ctx* ctx, Gj_View* view, char* name, Gj_Id* type);
00145
00146
00151 int Gj_view_getParameterCount(Gj_View* view);
00152
00153
00160 int Gj_view_getParameterNumber(Gj_Ctx* ctx, Gj_View* view, char* name);
00161
00162
00172 int Gj_view_setDefinition(Gj_Ctx* ctx, Gj_View* view, Gj_Object* def);
00173
00174
00181 Gj_Id* Gj_view_getType(Gj_View* view);
00182
00183
00184 #ifdef GJ_STDIO
00185 #include <stdio.h>
00192 void Gj_view_dump(Gj_Ctx* ctx, Gj_View* view, FILE* stream, int* indent);
00193 #endif
00194
00195
00200 struct gj_Parameter_struct;
00201
00202
00209 typedef struct gj_Parameter_struct {
00210
00211 char* name;
00212
00213 Gj_Id type;
00214
00215 struct gj_Parameter_struct* next;
00216
00217 } gj_Parameter;
00218
00219
00224 struct Gj_View_struct {
00225
00226 char* name;
00227
00228 Gj_Id id;
00229
00230 Gj_Id type;
00231
00232 Gj_Bool registered;
00233
00234 Gj_Bool finished;
00235
00236 Gj_Path* nativefuncname;
00237
00238 Gj_Nativefunc nativefunc;
00239
00240 Gj_Object* def;
00241
00242 gj_Parameter* parameters;
00243
00244 Gj_View* next;
00245
00246 };
00247
00248
00249 #ifdef __cplusplus
00250 }
00251 #endif
00252
00253 #endif
00254