Main Page   Compound List   File List   Compound Members   File Members  

lib/gobj/view.h

Go to the documentation of this file.
00001 /* lib/view.h - view implementation
00002    Copyright (C) 1999, 2000, 2001 Thomas Uehlinger
00003 
00004    This program is free software; you can redistribute it and/or modify
00005    it under the terms of the GNU General Public License as published by
00006    the Free Software Foundation; either version 2, or (at your option)
00007    any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012    GNU General Public License for more details.
00013 
00014    You should have received a copy of the GNU General Public License
00015    along with this program; if not, write to the Free Software
00016    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
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 /* __cplusplus */
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 /* __cplusplus */
00252 
00253 #endif /* !gobj_lib_view_h */
00254 

Generated at Fri Aug 17 18:28:55 2001 for Gobj by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000