gitkrrenderer.c

Go to the documentation of this file.
00001 
00012 #define GITK_RENDERER_C
00013 #define GITKR_RENDERER_C
00014 
00015 #include "gitkrincludes.h"
00016 
00020 void gitkr_render(void) {
00021   gitk_log("gitkr_render() beg");
00022   if(/* run && */ gitk_dialog_list) {
00023     GitkDialogPtr cur_context/*=gitk_context_get_current()*/;
00024     //-- let the user choose one context or just return one if there is only one
00026     //if(!cur_context) {
00027       cur_context=gitkr_set_context(); /* select a context */
00028     //}
00029     //-- now process that context
00030     if(cur_context) {
00031       gitk_log1("  cur_context=0x%08lx",(unsigned long)cur_context);
00032       //-- is context not yet layouted, or modified ?
00033       if(cur_context->changed) {
00034         //-- yes: layout context
00035         gitkr_dialog_generate_layout(cur_context);
00036         cur_context->changed=FALSE;
00037       }
00038         //-- display layout
00039       gitkr_dialog_output_layout(cur_context);
00040     }
00041   }
00042 }
00043 
00047 GitkDialogPtr gitkr_set_context(void) {
00048   GitkDialogPtr cur_context=NULL;
00049   gitk_log("gitkr_set_context() beg");
00050   if((cur_context=gitk_context_activate())==NULL) {
00051     cur_context=gitkr_select_context();
00052   }
00053   return(cur_context);
00054 }
00055 
00060 GitkDialogPtr gitkr_select_context(void) {
00061   GList* node;
00062 
00063   /* just return the first one atthe moment */
00064   node=g_list_first(gitk_dialog_list);
00065   return((GitkDialogPtr)node->data);
00066 }

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