gitkHelloUser.c File Reference

first simple test for gitk. More...

#include "config.h"
#include <glib.h>
#include <stdio.h>
#include <libgitk/gitk.h>

Include dependency graph for gitkHelloUser.c:

Include dependency graph

Go to the source code of this file.

Functions

gboolean global_on_close (gpointer dialog, gchar *widget_id, GitkEventPtr event, gpointer user_data)
 handle global close events like pressing ctrl-c or closing the dialog window

gboolean global_on_dialog_hide (gpointer dialog, gchar *widget_id, GitkEventPtr event, gpointer user_data)
 gets invoked before a dialog will lose the focus

gboolean global_on_dialog_show (gpointer dialog, gchar *widget_id, GitkEventPtr event, gpointer user_data)
 gets invoked after a dialog has received the focus

void info_show (void)
 build and show info message

int main (int argc, char **argv)
 example main routine

gboolean main_on_changed (gpointer dialog, gchar *widget_id, GitkEventPtr event, gpointer user_data)
 gets invoked when a widgets value has been changed

gboolean main_on_clicked (gpointer dialog, gchar *widget_id, GitkEventPtr event, gpointer user_data)
 gets invoked when a action widget has been invoked

gboolean main_show (void)
 build and show main dialog


Variables

gboolean ret = TRUE
 dialog field: age application termination status

gchar * sex = NULL
 dialog field: sex

gchar * user_name = NULL
 dialog field: user name


Detailed Description

first simple test for gitk.

Id
gitkHelloUser.c,v 1.47 2004/07/20 10:07:38 ensonic Exp

Author:
Stefan Kost <ensonic@users.sf.net>
Date:
Fri Jun 29 16:43:27 2001

This is a simple dialog application. It queries a few information from the user and responds with a message box.

Todo:
add another field 'age' (number), when age <18 greet informal, otherwise formal

Definition in file gitkHelloUser.c.


Function Documentation

gboolean global_on_close gpointer  dialog,
gchar *  widget_id,
GitkEventPtr  event,
gpointer  user_data
 

handle global close events like pressing ctrl-c or closing the dialog window

Todo:
we should add a dialog here asking "Are you sure ?"

Definition at line 47 of file gitkHelloUser.c.

References gitk_log, GitkEventPtr, and ret.

Referenced by main(), and main_show().

gboolean global_on_dialog_hide gpointer  dialog,
gchar *  widget_id,
GitkEventPtr  event,
gpointer  user_data
 

gets invoked before a dialog will lose the focus

Definition at line 62 of file gitkHelloUser.c.

References gitk_log, and GitkEventPtr.

Referenced by main().

gboolean global_on_dialog_show gpointer  dialog,
gchar *  widget_id,
GitkEventPtr  event,
gpointer  user_data
 

gets invoked after a dialog has received the focus

Definition at line 55 of file gitkHelloUser.c.

References gitk_log, and GitkEventPtr.

Referenced by main().

void info_show void   ) 
 

build and show info message

Definition at line 148 of file gitkHelloUser.c.

References _, gitk_log1, gitk_template_message_with_title(), sex, and user_name.

Referenced by main().

Here is the call graph for this function:

int main int  argc,
char **  argv
 

example main routine

Definition at line 162 of file gitkHelloUser.c.

References _, bindtextdomain, gitk_done(), GITK_EVENT_TYPE_ON_CLOSE, GITK_EVENT_TYPE_ON_DIALOG_HIDE, GITK_EVENT_TYPE_ON_DIALOG_SHOW, gitk_init(), gitk_log, gitk_log1, gitk_log3, gitk_log_handler(), gitk_printf(), gitk_puts(), global_on_close(), global_on_dialog_hide(), global_on_dialog_show(), info_show(), main_show(), ret, sex, textdomain, and user_name.

Here is the call graph for this function:

gboolean main_on_changed gpointer  dialog,
gchar *  widget_id,
GitkEventPtr  event,
gpointer  user_data
 

gets invoked when a widgets value has been changed

Todo:
use translated versions here

Definition at line 88 of file gitkHelloUser.c.

References _, gitk_log2, gitk_save_get_string, and GitkEventPtr.

Referenced by main_show().

gboolean main_on_clicked gpointer  dialog,
gchar *  widget_id,
GitkEventPtr  event,
gpointer  user_data
 

gets invoked when a action widget has been invoked

Definition at line 71 of file gitkHelloUser.c.

References gitk_event_loop_end(), gitk_log1, GitkEventPtr, and ret.

Referenced by main_show().

Here is the call graph for this function:

gboolean main_show void   ) 
 

build and show main dialog

See also:
gitkHelloUser_main.xml

Definition at line 114 of file gitkHelloUser.c.

References _, GIML_PATH, gitk_dialog_free(), gitk_dialog_hide(), gitk_dialog_new_from_file(), gitk_dialog_show(), gitk_event_loop_start(), GITK_EVENT_TYPE_ON_CHANGED, GITK_EVENT_TYPE_ON_CLICKED, gitk_get_error_code(), gitk_get_error_str(), gitk_log, gitk_printf(), main_on_changed(), main_on_clicked(), sex, and user_name.

Referenced by main().

Here is the call graph for this function:


Variable Documentation

gboolean ret = TRUE
 

dialog field: age application termination status

Definition at line 40 of file gitkHelloUser.c.

Referenced by global_on_close(), main(), main_on_clicked(), and strapp().

gchar* sex = NULL
 

dialog field: sex

Definition at line 36 of file gitkHelloUser.c.

Referenced by info_show(), main(), and main_show().

gchar* user_name = NULL
 

dialog field: user name

Definition at line 34 of file gitkHelloUser.c.

Referenced by info_show(), main(), and main_show().


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