00001 00012 #ifndef GITKR_EVENTLOOP_H 00013 #define GITKR_EVENTLOOP_H 00014 00015 #undef KEY_BACKSPACE 00016 00018 //#define KEY_BACKSPACE 0x08 00019 #define KEY_BACKSPACE 0x107 00020 00021 #define KEY_TAB 0x09 00022 00023 #define KEY_RETURN 0x0D 00024 00025 #define KEY_ESCAPE 0x1B 00026 00027 //-- aliases 00029 #define KEY_F1 0x109 /*KEY_F(1)*/ 00030 00031 #define KEY_F2 0x10a /*KEY_F(2)*/ 00032 00033 #define KEY_F10 0x112 /*KEY_F(0)*/ 00034 00035 //#define KEY_DEL KEY_DC 00036 #define KEY_DEL 0x07f 00037 00038 #define KEY_INS KEY_IC 00039 00043 #define KEYSEQ_2BYTES 0x04f 00044 00047 #define KEYSEQ_3BYTES 0x05b 00048 00052 #define KEYCODE_TO_ASCII(code) ((code>31 && code<256)?(char)code:'.') 00053 00054 #ifdef GITKR_EVENTLOOP_C 00055 void next_page(GitkrTextLayoutPtr layout); 00056 void prev_page(GitkrTextLayoutPtr layout); 00057 void handle_dialog_main_widgets(GitkrTextLayoutPtr layout); 00058 void handle_dialog_ctrl_widgets(GitkrTextLayoutPtr layout); 00059 00060 gint gitkr_event_loop_getkey(void); 00061 gint gitkr_event_loop_unescape_key(void); 00062 00063 void sighandler_on_sigint(int sig); 00064 void sighandler_on_sighup(int sig); 00065 void sighandler_on_sigwinch(int sig); 00066 #else 00067 #ifdef GITK_RENDERER_C 00068 extern gint gitkr_event_loop_getkey(void); 00069 extern gint gitkr_event_loop_unescape_key(void); 00070 00071 extern void sighandler_on_sigint(int sig); 00072 extern void sighandler_on_sighup(int sig); 00073 extern void sighandler_on_sigwinch(int sig); 00074 #endif 00075 #endif 00076 00077 #endif /* GITKR_EVENTLOOP_H */