gitkcallback.c File Reference

libgitk callback routines More...

#include "gitkincludes.h"

Include dependency graph for gitkcallback.c:

Include dependency graph

Go to the source code of this file.

Functions

void gitk__dialog_attach_callback (GitkDialogPtr const dialog, gchar *const widget_id, const GitkEventType type, gpointer const user_data, GitkCallbackPtr const callback, gchar *const callback_name)
 connect a callback-method to one event-slot of a widget in a dialog. Widget related callbacks need a dialog and a widget_id. For global callbacks both parameters need to be NULL.

void gitk_dialog_detach_callback (GitkDialogPtr const dialog, gchar *const widget_id, const GitkEventType type)
 removes the callback from one event-slot of a widget

gboolean gitk_dialog_process_event (GitkDialogPtr const dialog, gchar *const widget_id, GitkEventPtr const event)
 searches event-callback lists for a callback to this event for this widget and ivokes it. It first checks the list of callbacks that belongs to the dialog. If no handler is found, the global callbacklist (those of handlers connected with dialog=NULL) is searched.

void gitk_dialog_trans_callback (GitkDialogPtr dialog)
 registers all global callbacks in giml dialog

GitkCallbackNodePtr gitk_get_callback_node (GitkDialogPtr const dialog, gchar *const widget_id, const GitkEventType type)
 searches the related callback list to retrieve call-back node


Variables

gchar * callback_names []


Detailed Description

libgitk callback routines

Id
gitkcallback.c,v 1.22 2004/10/28 08:53:50 ensonic Exp

Author:
Stefan Kost <ensonic@users.sf.net>
Date:
Thu Jan 17 11:22:38 2002

Definition in file gitkcallback.c.


Function Documentation

GitkCallbackNodePtr gitk_get_callback_node GitkDialogPtr const  dialog,
gchar *const  widget_id,
const GitkEventType  type
[static]
 

searches the related callback list to retrieve call-back node

Parameters:
dialog to which dialog is the callback related, if NULL then it is a global event
widget_id to which widget the event applies, if NULL then it is a global event
type what kind of event it is

Definition at line 35 of file gitkcallback.c.

References GitkDialog::callback_list, gitk_global_callback_list, GitkCallbackNodePtr, GitkDialogPtr, GitkEventType, GitkCallbackNode::type, and GitkCallbackNode::widget_id.

Referenced by gitk_dialog_detach_callback(), and gitk_dialog_process_event().


Variable Documentation

gchar* callback_names[] [static]
 

Initial value:

{
  "onClose",
  "onShow",
  "onHide",
  "onClicked",
  "onChanged"
}
human readable callback names for addition to the xml document

Definition at line 20 of file gitkcallback.c.

Referenced by gitk__dialog_attach_callback(), gitk_dialog_detach_callback(), and gitk_dialog_trans_callback().


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