Files | |
file | gitkcallback.c |
libgitk callback routines | |
file | gitkcallback.h |
libgitk callback routines | |
file | gitkdialog.c |
libgitk dialog class (xml-doc-tree) | |
file | gitktrans-domain.c |
applies domain specific transformation to doc-tree | |
file | gitktrans-domain.h |
applies domain specific transformation to doc-tree | |
file | gitktrans-expand.c |
expands giml dialog description with defaults | |
file | gitktrans-expand.h |
expands giml dialog description with defaults | |
file | gitktrans-i18n.c |
applies i18n to doc-tree | |
file | gitktrans-i18n.h |
applies i18n to doc-tree | |
file | gitktrans-style.c |
applies domain specific user style transformation to doc-tree | |
file | gitktrans-style.h |
applies stylesheets to doc-tree | |
file | gitktrans.c |
transformation pipeline | |
file | gitktrans.h |
transformation pipeline | |
Modules | |
group | libgitk transformation stylesheets |
Data Structures | |
struct | GitkCallbackNode |
general gitk event callback node More... | |
struct | GitkDialog |
gitk dialog, active dialog with a GitkLayout More... | |
Typedefs | |
typedef GitkCallbackNode | GitkCallbackNode |
gitk event callback node | |
typedef GitkCallbackNode * | GitkCallbackNodePtr |
pointer to GitkCallbackNode | |
typedef gboolean(* | GitkCallbackPtr )(GitkDialogPtr dialog, gchar *widget_id, GitkEventPtr event, gpointer user_data) |
gitk event callback | |
typedef GitkDialog | GitkDialog |
gitk dialog, active dialog with a GitkLayout | |
typedef GitkDialog * | GitkDialogPtr |
a pointer to GitkDialog | |
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. | |
xmlDocPtr | gitk__dialog_get_doc (GitkDialogPtr const dialog, GitkDialogAccessType access_type) |
get the source/destination giml/xml document | |
xmlNodePtr | gitk__dialog_get_widget (GitkDialogPtr const dialog, GitkDialogAccessType const access_type, gchar *const widget_id) |
retrieve the widget from the doc-tree | |
void | gitk__dialog_set_title (GitkDialogPtr const dialog, GitkDialogAccessType const access_type, gchar *const new_title) |
sets the dialog title | |
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 | |
void | gitk_dialog_free (GitkDialogPtr const dialog) |
free a GitkDialog. This unconnects all callbacks and releases memory. | |
xmlDocPtr | gitk_dialog_get_dst (GitkDialogPtr const dialog) |
get the target xml document, this takes care that the target document gets generated at least when someone accesses it | |
xmlDocPtr | gitk_dialog_get_src (GitkDialogPtr const dialog) |
get the source giml/xml document | |
void | gitk_dialog_hide (GitkDialogPtr const dialog) |
hide a dialog. Callbacks remain connected, so that calling gitk_dialog_show() reactivates the callbacks. | |
void | gitk_dialog_invalidate (GitkDialogPtr const dialog) |
invalidate the prepared dst doc, this ensures that on the next access the transformations are repeated | |
GitkDialogPtr | gitk_dialog_new (xmlDocPtr const doc) |
create GitkDialog from xml-doc | |
GitkDialogPtr | gitk_dialog_new_from_file (gchar *const filename) |
create a GitkDialog from a giml-file | |
GitkDialogPtr | gitk_dialog_new_from_memory (gchar *const buffer, const guint size) |
create a GitkDialog from a memory block containing giml dialog description | |
GitkDialogPtr | gitk_dialog_new_from_parser_context (xmlParserCtxtPtr const ctxt) |
create a GitkDialog from a parser context | |
GitkDialogPtr | gitk_dialog_new_from_string (gchar *const str) |
create a GitkDialog from a string containing giml dialog description | |
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_set_content (GitkDialogPtr const dialog, GitkDialogAccessType const access_type, xmlXPathCompExprPtr cxpath_expr, gchar *const xpath_expr, const gchar *const new_value) |
sets content in gitk doc tree to a new value | |
gboolean | gitk_dialog_show (GitkDialogPtr const dialog, gboolean const modal) |
show a dialog. When a dialog is show with model=TRUE, then it blocks all previous dialogs, unitl it is finished. The stack of dialog is maintained by the gitk context manager. | |
gboolean | gitk_dialog_trans (GitkDialogPtr const dialog) |
applies all transformations to GitkDialogPtr->src and puts result into GitkDialogPtr->dst. This transformation chain needs to be applied when structural changes have happend. | |
void | gitk_dialog_trans_callback (GitkDialogPtr dialog) |
registers all global callbacks in giml dialog | |
xmlDocPtr | gitk_dialog_trans_domain (xmlDocPtr const src) |
applies domain specific transformation | |
xmlDocPtr | gitk_dialog_trans_expand (xmlDocPtr const src) |
add default nodes to giml dialog | |
xmlDocPtr | gitk_dialog_trans_i18n (xmlDocPtr const src) |
translates i18n nodes in giml dialog | |
gboolean | gitk_dialog_trans_initial (GitkDialogPtr const dialog) |
applies all transformations initially to GitkDialogPtr->src. This transformation chain must be completed by executing the gitk_dialog_trans() chain. This initial transformation is only executed to save some time at retransformation steps (e.g. not retranslating static texts). | |
xmlDocPtr | gitk_dialog_trans_style (xmlDocPtr const src) |
applies domain specific iuser style transformation |
After the dialog has been created one can show it by using gitk_dialog_show(), then one would connect callbacks using gitk_dialog_attach_callback() and finally start the event loop gitk_event_loop_start(). Apart from widget local callback, global callbacks exist e.g. to intercept closing of dialogs.
When the user finished using the dialog, it nned to be made invisible by gitk_dialog_hide() and then can by freed using gitk_dialog_free().
|
gitk event callback node
|
|
pointer to GitkCallbackNode
Definition at line 253 of file gitk.h. Referenced by gitk__dialog_attach_callback(), gitk_dialog_detach_callback(), gitk_dialog_free(), gitk_dialog_process_event(), gitk_dialog_trans_callback(), gitk_done(), and gitk_get_callback_node(). |
|
gitk event callback
Definition at line 242 of file gitk.h. Referenced by gitk__dialog_attach_callback(). |
|
gitk dialog, active dialog with a GitkLayout
|
|
|
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.
Definition at line 73 of file gitkcallback.c. References GitkCallbackNode::callback, GitkDialog::callback_list, GitkCallbackNode::callback_name, callback_names, gitk__xpath_get_node(), GITK_DIALOG_ACCESS_CLIENT, GITK_DIALOG_ACCESS_RENDERER, gitk_dialog_list, GITK_EVENT_TYPE_ON_CHANGED, gitk_get_widget_xpath_expression(), gitk_global_callback_list, gitk_log2, GITK_NS_PREFIX, gitk_save_get_string, GitkCallbackNodePtr, GitkCallbackPtr, GitkDialogPtr, GitkEventType, GitkCallbackNode::type, GitkCallbackNode::user_data, and GitkCallbackNode::widget_id. |
Here is the call graph for this function:
|
get the source/destination giml/xml document
Definition at line 304 of file gitkdialog.c. References GITK_DIALOG_ACCESS_CLIENT, GITK_DIALOG_ACCESS_RENDERER, gitk_dialog_get_dst(), gitk_dialog_get_src(), GitkDialogAccessType, and GitkDialogPtr. Referenced by gitk__cxpath_get_object(). |
Here is the call graph for this function:
|
retrieve the widget from the doc-tree
Definition at line 402 of file gitkdialog.c. References gitk__xpath_get_node(), gitk_get_widget_xpath_expression(), GitkDialogAccessType, and GitkDialogPtr. Referenced by gitk__widget_get_value(), and gitk_dialog_move_focus(). |
Here is the call graph for this function:
|
sets the dialog title
Definition at line 422 of file gitkdialog.c. References gitk_dialog_set_content(), gitk_log1, GitkDialogAccessType, GitkDialogPtr, and xpath_get_dialog_name. |
Here is the call graph for this function:
|
removes the callback from one event-slot of a widget
Definition at line 134 of file gitkcallback.c. References GitkDialog::callback_list, GitkCallbackNode::callback_name, callback_names, gitk__xpath_get_node(), GITK_DIALOG_ACCESS_CLIENT, GITK_DIALOG_ACCESS_RENDERER, gitk_dialog_list, gitk_get_callback_node(), gitk_get_widget_xpath_expression(), gitk_global_callback_list, GITK_NS_PREFIX, GitkCallbackNodePtr, GitkDialogPtr, GitkEventType, and GitkCallbackNode::widget_id. |
Here is the call graph for this function:
|
free a GitkDialog. This unconnects all callbacks and releases memory.
Definition at line 148 of file gitkdialog.c. References GitkDialog::callback_list, GitkCallbackNode::callback_name, GitkDialog::dst, GitkCallbackNodePtr, GitkDialogPtr, GitkDialog::lock, GitkDialog::src, and GitkCallbackNode::widget_id. Referenced by gitk_dialog_new(), gitk_done(), gitk_template_message_with_title(), gitkr_done(), gitkr_select_context(), main(), main_show(), test_gitk_dialog_new_from_string_1(), test_gitk_dialog_show_1(), test_gitk_dialog_show_2(), test_gitk_valid_invalid_giml(), test_gitk_valid_not_giml(), test_gitk_valid_not_xml(), and test_gitk_widget_set_get_value(). |
|
get the target xml document, this takes care that the target document gets generated at least when someone accesses it
Definition at line 285 of file gitkdialog.c. References GitkDialog::dst, gitk_dialog_dump(), gitk_dialog_trans(), gitk_log, and GitkDialogPtr. Referenced by gitk__dialog_get_doc(). |
Here is the call graph for this function:
|
get the source giml/xml document
Definition at line 273 of file gitkdialog.c. References GitkDialogPtr, and GitkDialog::src. Referenced by gitk__dialog_get_doc(). |
|
hide a dialog. Callbacks remain connected, so that calling gitk_dialog_show() reactivates the callbacks.
Definition at line 67 of file gitkwrapper.c. References GitkEvent::data, gitk_dialog_list, gitk_dialog_process_event(), GITK_EVENT_TYPE_ON_DIALOG_HIDE, gitk_log, gitk_renderer, GitkDialogPtr, GitkRenderer::gitkr_dialog_hide, and GitkEvent::type. Referenced by gitk_done(), gitk_template_message_with_title(), gitkr_done(), gitkr_select_context(), main(), main_show(), test_gitk_dialog_show_1(), test_gitk_dialog_show_2(), and test_gitk_widget_set_get_value(). |
Here is the call graph for this function:
|
invalidate the prepared dst doc, this ensures that on the next access the transformations are repeated
Definition at line 319 of file gitkdialog.c. References GitkDialog::changed, GitkDialog::dst, and GitkDialogPtr. Referenced by gitk_event_loop_exchange(), and gitk_relayout(). |
|
create GitkDialog from xml-doc
Definition at line 233 of file gitkdialog.c. References GitkDialog::dst, gitk_dialog_dump(), gitk_dialog_free(), gitk_dialog_trans_initial(), gitk_dialog_validate(), gitk_log, gitk_log1, GitkDialogPtr, GitkDialog::lock, and GitkDialog::src. Referenced by gitk_dialog_new_from_parser_context(). |
Here is the call graph for this function:
|
create a GitkDialog from a giml-file
Definition at line 43 of file gitkdialog.c. References gitk_dialog_new_from_parser_context(), gitk_err1, and GitkDialogPtr. Referenced by gitk_template_message_with_title(), and main_show(). |
Here is the call graph for this function:
|
create a GitkDialog from a memory block containing giml dialog description
Definition at line 68 of file gitkdialog.c. References gitk_dialog_new_from_parser_context(), gitk_err, and GitkDialogPtr. |
Here is the call graph for this function:
|
create a GitkDialog from a parser context
Definition at line 118 of file gitkdialog.c. References _, gitk_dialog_new(), GITK_ERROR_INVALID_DOCUMENT, gitk_log2, gitk_set_error(), and GitkDialogPtr. Referenced by gitk_dialog_new_from_file(), gitk_dialog_new_from_memory(), and gitk_dialog_new_from_string(). |
Here is the call graph for this function:
|
create a GitkDialog from a string containing giml dialog description
Definition at line 93 of file gitkdialog.c. References gitk_dialog_new_from_parser_context(), gitk_err, and GitkDialogPtr. Referenced by gitkr_select_context(), main(), main_show(), test_gitk_dialog_new_from_string_1(), test_gitk_dialog_show_1(), test_gitk_dialog_show_2(), test_gitk_valid_invalid_giml(), test_gitk_valid_not_giml(), test_gitk_valid_not_xml(), and test_gitk_widget_set_get_value(). |
Here is the call graph for this function:
|
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.
Definition at line 186 of file gitkcallback.c. References GitkCallbackNode::callback, GitkCallbackNode::callback_name, gitk_get_callback_node(), gitk_log1, GitkCallbackNodePtr, GitkDialogPtr, GitkEventPtr, GitkEvent::type, and GitkCallbackNode::user_data. Referenced by gitk__widget_set_value(), gitk_dialog_hide(), gitk_dialog_show(), handle_dialog_ctrl_widgets(), handle_dialog_main_widgets(), sighandler_editable_widget_on_changed(), sighandler_on_sighup(), sighandler_on_sigint(), sighandler_option_widget_on_changed(), sighandler_widget_on_clicked(), and sighandler_window_on_close(). |
Here is the call graph for this function:
|
sets content in gitk doc tree to a new value
Definition at line 346 of file gitkdialog.c. References gitk__cxpath_get_node(), gitk_err, gitk_log, gitk_log1, gitk_toggle_access_type(), GitkDialogAccessType, and GitkDialogPtr. Referenced by gitk__dialog_set_title(), and gitk__widget_set_value(). |
Here is the call graph for this function:
|
Here is the call graph for this function:
|
applies all transformations to GitkDialogPtr->src and puts result into GitkDialogPtr->dst. This transformation chain needs to be applied when structural changes have happend.
Definition at line 74 of file gitktrans.c. References GitkDialog::dst, gitk_dialog_trans_domain(), gitk_dialog_trans_expand(), gitk_dialog_trans_i18n(), gitk_dialog_trans_style(), gitk_log, gitk_log_intro, gitk_log_outro, GITK_NS_URL, GitkDialogPtr, GitkDialog::ns, and GitkDialog::src. Referenced by gitk_dialog_get_dst(). |
Here is the call graph for this function:
|
registers all global callbacks in giml dialog
Definition at line 210 of file gitkcallback.c. References GitkCallbackNode::callback_name, callback_names, gitk__xpath_get_node(), GITK_DIALOG_ACCESS_CLIENT, GITK_DIALOG_ACCESS_RENDERER, gitk_global_callback_list, GITK_NS_PREFIX, GitkCallbackNodePtr, GitkDialogPtr, and GitkCallbackNode::type. Referenced by gitk_dialog_trans_initial(). |
Here is the call graph for this function:
|
applies domain specific transformation
Definition at line 23 of file gitktrans-domain.c. References gitk_err1, gitk_log1, gitk_renderer_name, xsl_domain, and XSL_ROOT_PATH. Referenced by gitk_dialog_trans(). |
|
add default nodes to giml dialog
Definition at line 24 of file gitktrans-expand.c. References gitk_err, gitk_log, and xsl_expand. Referenced by gitk_dialog_trans(), and gitk_dialog_trans_initial(). |
|
translates i18n nodes in giml dialog
Definition at line 94 of file gitktrans-i18n.c. References gitk_err, and xsl_i18n. Referenced by gitk_dialog_trans(). |
|
applies all transformations initially to GitkDialogPtr->src. This transformation chain must be completed by executing the gitk_dialog_trans() chain. This initial transformation is only executed to save some time at retransformation steps (e.g. not retranslating static texts).
Definition at line 32 of file gitktrans.c. References gitk_dialog_trans_callback(), gitk_dialog_trans_expand(), gitk_log, gitk_log_intro, gitk_log_outro, GITK_NS_URL, GitkDialogPtr, GitkDialog::ns, and GitkDialog::src. Referenced by gitk_dialog_new(). |
Here is the call graph for this function:
|
applies domain specific iuser style transformation
Definition at line 23 of file gitktrans-style.c. References gitk_err2, gitk_log2, gitk_renderer_name, gitk_style_name, XSL_ROOT_PATH, and xsl_style. Referenced by gitk_dialog_trans(). |