gitkrenderer.h

Go to the documentation of this file.
00001 
00032 #ifndef GITK_RENDERER_H
00033 #define GITK_RENDERER_H
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00039 #ifdef GITK_RENDERER_C
00040 gboolean gitk_renderer_init(guint * const argc, gchar *** const argv, gboolean info_only);
00041 gboolean gitk_renderer_activate(guint * const argc, gchar *** const argv);
00042 void gitk_renderer_done(void);
00043 #else
00044 extern gboolean gitk_renderer_init(guint * const argc, gchar *** const argv, gboolean info_only);
00045 extern gboolean gitk_renderer_activate(guint * const argc, gchar *** const argv);
00046 extern void gitk_renderer_done(void);
00047 #endif
00048 
00049 //-- defines -------------------------------------------------------------------
00050 
00057 typedef enum GitkrInfo {
00059   GITKR_INFO_LOCALEDIR,
00061   GITKR_INFO_PACKAGE,
00065   GITKR_INFO_MEDIA_DOMAIN,
00070   GITKR_INFO_INTERFACE_LOCATION,
00071 } GitkrInfo;
00072 
00080 #define GITKR_INFO_INTERFACE_LOCATION_LOCAL "local"
00081 
00085 #define GITKR_INFO_INTERFACE_LOCATION_REMOTE "remote"
00086 
00087 //-- function pointer for renderer plugins -------------------------------------
00088 
00095 typedef gchar * (*GitkrInfoPtr)(GitkrInfo);
00096 
00103 typedef gboolean (*GitkrInitPtr)(guint *argc, gchar ***argv);
00109 typedef void (*GitkrDonePtr)(void);
00110 
00118 typedef void (*GitkrEventLoopStartPtr)(void);
00125 typedef void (*GitkrEventLoopEndPtr)(void);
00130 typedef void (*GitkrEventLoopRestartPtr)(void);
00131 
00139 typedef void (*GitkrElementsShowPtr)(GitkDialogPtr dialog);
00145 typedef void (*GitkrElementsHidePtr)(GitkDialogPtr dialog);
00151 //-- renderer ------------------------------------------------------------------
00152 
00156 #if defined(GITK_LIB_C) || defined(GITK_RENDERER_C)
00157 typedef struct GitkRenderer GitkRenderer;
00158 #else
00159 typedef void GitkRenderer;
00160 #endif
00161 
00164 typedef GitkRenderer *GitkRendererPtr;
00169 struct GitkRenderer {
00170   GModule *plugin;                                    
00172   GitkrInfoPtr gitkr_info;                            
00173   GitkrInitPtr gitkr_init;                            
00174   GitkrDonePtr gitkr_done;                            
00175   GitkrEventLoopStartPtr gitkr_event_loop_start;      
00176   GitkrEventLoopEndPtr gitkr_event_loop_end;          
00177   GitkrEventLoopRestartPtr gitkr_event_loop_restart;  
00178   GitkrElementsShowPtr gitkr_dialog_show;             
00179   GitkrElementsHidePtr gitkr_dialog_hide;             
00180 };
00181 
00182 //-- renderer API --------------------------------------------------------------
00183 
00184 #ifdef GITKR_INFO_C
00185 gchar *gitkr_info(GitkrInfo key);
00186 #else
00187 #ifdef GITK_RENDERER_C
00188 extern gchar *gitkr_info(GitkrInfo key);
00189 #endif
00190 #endif
00191 
00192 #ifdef GITKR_INIT_C
00193 gboolean gitkr_init(guint *argc, gchar ***argv);
00194 #else
00195 #ifdef GITK_RENDERER_C
00196 extern gboolean gitkr_init(guint *argc, gchar ***argv);
00197 #endif
00198 #endif
00199 
00200 #ifdef GITKR_DONE_C
00201 void gitkr_done(void);
00202 #else
00203 #ifdef GITK_RENDERER_C
00204 extern void gitkr_done(void);
00205 #endif
00206 #endif
00207 
00208 #ifdef GITKR_EVENTLOOP_C
00209 void gitkr_event_loop_start(void);
00210 void gitkr_event_loop_end(void);
00211 void gitkr_event_loop_restart(void);
00212 #else
00213 #ifdef GITK_RENDERER_C
00214 extern void gitkr_event_loop_start(void);
00215 extern void gitkr_event_loop_end(void);
00216 extern void gitkr_event_loop_restart(void);
00217 #endif
00218 #endif
00219 
00220 #ifdef GITKR_HIDESHOW_C
00221 void gitkr_dialog_show(GitkDialogPtr dialog);
00222 void gitkr_dialog_hide(GitkDialogPtr dialog);
00223 #else
00224 #ifdef GITK_RENDERER_C
00225 extern void gitkr_dialog_show(GitkDialogPtr dialog);
00226 extern void gitkr_dialog_hide(GitkDialogPtr dialog);
00227 #endif
00228 #endif
00229 
00230 #ifdef __cplusplus
00231 } // extern "C"
00232 #endif
00233 
00234 #endif /* GITK_RENDERER_H */

Generated on Thu Oct 28 10:59:09 2004 for gitk by doxygen 1.3.6