gitkreventloop.c File Reference

gitk renderer event loop More...

#include "gitkrincludes.h"

Include dependency graph for gitk-renderer-text/gitkreventloop.c:

Include dependency graph

Go to the source code of this file.

Functions

void gitkr_event_loop_end (void)
 terminates the event-loop

gint gitkr_event_loop_getkey (void)
 read a keycode from keyboard

void gitkr_event_loop_start (void)
 curses based event-loop

gint gitkr_event_loop_unescape_key (void)
 decode escape sequences

void handle_dialog_ctrl_widgets (GitkrTextLayoutPtr layout)
 run the event loop for the dialog control widgets

void handle_dialog_main_widgets (GitkrTextLayoutPtr layout)
 run the event loop for the main dialog widgets

void next_page (GitkrTextLayoutPtr layout)
 switch to next page

void next_widget (GitkrTextLayoutPtr layout)
 switch to next widget

void prev_page (GitkrTextLayoutPtr layout)
 switch to previous page

void prev_widget (GitkrTextLayoutPtr layout)
 switch to previous widget

void sighandler_on_sighup (int sig)
 catch SIGHUP and send GITK_EVENT_TYPE_ON_CLOSE event

void sighandler_on_sigint (int sig)
 catch SIGINT (ctrl-c) and send GITK_EVENT_TYPE_ON_CLOSE event

void sighandler_on_sigwinch (int sig)
 catch SIGWINCH and resize the termina


Variables

GitkDialogPtr cur_context
 current context, show all contexts of highest priority if NULL or use one if there is only one


Detailed Description

gitk renderer event loop

Id
gitkreventloop.c,v 1.46 2004/08/31 17:42:01 ensonic Exp

Author:
Stefan Kost <ensonic@users.sf.net>
Date:
Thu Sep 13 17:44:28 2001

Definition in file gitk-renderer-text/gitkreventloop.c.


Function Documentation

gint gitkr_event_loop_getkey void   ) 
 

read a keycode from keyboard

Todo:
sleep a bit

Definition at line 300 of file gitk-renderer-text/gitkreventloop.c.

References gitk_log1, gitkr_event_loop_unescape_key(), KEY_ESCAPE, and run.

Here is the call graph for this function:

gint gitkr_event_loop_unescape_key void   ) 
 

decode escape sequences

Definition at line 322 of file gitk-renderer-text/gitkreventloop.c.

References gitk_log, gitk_log3, KEY_DEL, KEY_INS, KEYCODE_TO_ASCII, KEYSEQ_2BYTES, and KEYSEQ_3BYTES.

Referenced by gitkr_event_loop_getkey().

void handle_dialog_ctrl_widgets GitkrTextLayoutPtr  layout  ) 
 

run the event loop for the dialog control widgets

Parameters:
layout the layout handle of the displayed dialog

Definition at line 253 of file gitk-renderer-text/gitkreventloop.c.

References GitkrTextLayout::ctrl, cur_context, GitkrTextLayout::currentWidget, GitkEvent::data, GitkrTextWidget::dialog, gitk_dialog_process_event(), GITK_EVENT_TYPE_ON_CLICKED, gitk_log1, gitk_log_intro, gitk_log_outro, gitkr_dialog_output_layout(), GITKR_TEXT_NAVIGATION, gitkr_widget_get_value(), gitkr_widget_optionchoice_free_ids(), gitkr_widget_optionchoice_get_ids(), GitkrTextLayoutPtr, GitkrTextWidgetPtr, GitkrTextWidget::handle, GitkrTextWidget::id, LINES, next_page(), prev_page(), run, GitkEvent::type, and GitkrTextLayoutPage::widgets.

Referenced by gitkr_event_loop_start(), and handle_dialog_main_widgets().

Here is the call graph for this function:

void handle_dialog_main_widgets GitkrTextLayoutPtr  layout  ) 
 

run the event loop for the main dialog widgets

Parameters:
layout the layout handle of the displayed dialog

Todo:
we really should initialise layout->currentPage and layout->currentWidget from XML

use SHIFT+KEY_TAB for it as well, if we can find out how to detect SHIFT

Definition at line 146 of file gitk-renderer-text/gitkreventloop.c.

References GitkrTextLayout::currentPage, GitkrTextLayout::currentWidget, GitkEvent::data, GitkWidget::dialog, gitk_dialog_move_focus(), gitk_dialog_process_event(), GITK_EVENT_TYPE_ON_CHANGED, GITK_EVENT_TYPE_ON_CLICKED, GITK_EVENT_TYPE_ON_CLOSE, gitk_log2, gitk_log3, gitk_log_intro, gitk_log_outro, GITK_WIDGET_TYPE_ACTION, GITK_WIDGET_TYPE_CHARACTERINPUT, GITK_WIDGET_TYPE_CHARACTERINPUT_ALPHABETIC, GITK_WIDGET_TYPE_OPTIONCHOICE, GITK_WIDGET_TYPE_OPTIONCHOICE_BOOLEAN, GITK_WIDGET_TYPE_OPTIONCHOICE_SINGLE, GITK_WIDGET_TYPE_OPTIONCHOICE_SINGLE_COMPACT, gitkr_event_loop_getkey(), gitkr_layout_get_current_widget(), gitkr_layout_get_current_widget_line(), GitkrTextLayoutPtr, GitkrTextWidgetPtr, GitkWidgetPtr, handle_dialog_ctrl_widgets(), GitkWidget::id, KEY_BACKSPACE, KEY_DEL, KEY_F1, KEY_F10, KEY_F2, KEY_INS, KEY_RETURN, KEY_TAB, KEYCODE_TO_ASCII, next_page(), next_widget(), GitkrTextLayout::pages, prev_page(), prev_widget(), run, GitkWidget::type, GitkEvent::type, and GitkrTextLayoutPage::widgets.

Referenced by gitkr_event_loop_start().

Here is the call graph for this function:

void next_page GitkrTextLayoutPtr  layout  ) 
 

switch to next page

Definition at line 121 of file gitk-renderer-text/gitkreventloop.c.

References cur_context, GitkrTextLayout::currentPage, GitkrTextLayout::currentWidget, gitkr_dialog_output_layout(), GitkrTextLayoutPtr, and GitkrTextLayout::numberOfPages.

Referenced by handle_dialog_ctrl_widgets(), and handle_dialog_main_widgets().

Here is the call graph for this function:

void next_widget GitkrTextLayoutPtr  layout  ) 
 

switch to next widget

Definition at line 80 of file gitk-renderer-text/gitkreventloop.c.

References cur_context, GitkrTextLayout::currentPage, GitkrTextLayout::currentWidget, gitk_dialog_move_focus(), gitkr_dialog_output_layout(), GitkrTextLayoutPtr, GitkrTextWidgetPtr, GitkWidgetPtr, GitkrTextLayout::pages, GitkrTextLayoutPage::widgets, and GitkrTextLayoutPage::widgetsPerPage.

Referenced by handle_dialog_main_widgets().

Here is the call graph for this function:

void prev_page GitkrTextLayoutPtr  layout  ) 
 

switch to previous page

Definition at line 133 of file gitk-renderer-text/gitkreventloop.c.

References cur_context, GitkrTextLayout::currentPage, GitkrTextLayout::currentWidget, gitkr_dialog_output_layout(), and GitkrTextLayoutPtr.

Referenced by handle_dialog_ctrl_widgets(), and handle_dialog_main_widgets().

Here is the call graph for this function:

void prev_widget GitkrTextLayoutPtr  layout  ) 
 

switch to previous widget

Definition at line 101 of file gitk-renderer-text/gitkreventloop.c.

References cur_context, GitkrTextLayout::currentPage, GitkrTextLayout::currentWidget, gitk_dialog_move_focus(), gitkr_dialog_output_layout(), GitkrTextLayoutPtr, GitkrTextWidgetPtr, GitkWidgetPtr, GitkrTextLayout::pages, GitkrTextLayoutPage::widgets, and GitkrTextLayoutPage::widgetsPerPage.

Referenced by handle_dialog_main_widgets().

Here is the call graph for this function:

void sighandler_on_sighup int  sig  ) 
 

catch SIGHUP and send GITK_EVENT_TYPE_ON_CLOSE event

Definition at line 392 of file gitk-renderer-text/gitkreventloop.c.

References GitkEvent::data, gitk_dialog_process_event(), gitk_event_loop_end(), GITK_EVENT_TYPE_ON_CLOSE, gitk_log, run, sighandler_on_sigint(), and GitkEvent::type.

Referenced by gitkr_init().

Here is the call graph for this function:

void sighandler_on_sigint int  sig  ) 
 

catch SIGINT (ctrl-c) and send GITK_EVENT_TYPE_ON_CLOSE event

Definition at line 377 of file gitk-renderer-text/gitkreventloop.c.

References GitkEvent::data, gitk_dialog_process_event(), gitk_event_loop_end(), GITK_EVENT_TYPE_ON_CLOSE, gitk_log, run, sighandler_on_sigint(), and GitkEvent::type.

Referenced by gitkr_init(), sighandler_on_sighup(), and sighandler_on_sigint().

Here is the call graph for this function:

void sighandler_on_sigwinch int  sig  ) 
 

catch SIGWINCH and resize the termina

Todo:
problematic when in subroutine-handler (e.g. while entering text)

Definition at line 407 of file gitk-renderer-text/gitkreventloop.c.

References cur_context, gitk_log, gitk_log2, gitkr_dialog_output_layout(), run, and sighandler_on_sigwinch().

Referenced by gitkr_init(), and sighandler_on_sigwinch().

Here is the call graph for this function:


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