1
/***************************************************************************
2
GUI_binding.cpp - description
4
begin : Fri Jan 17 2003
5
copyright : (C) 2003 by mean
6
email : fixounet@free.fr
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
20
/*******************THIS IS NOT USED ANYMORE********************/
21
/*******************THIS IS NOT USED ANYMORE********************/
22
/*******************THIS IS NOT USED ANYMORE********************/
23
/*******************THIS IS NOT USED ANYMORE********************/
24
/*******************THIS IS NOT USED ANYMORE********************/
25
/*******************THIS IS NOT USED ANYMORE********************/
26
/*******************THIS IS NOT USED ANYMORE********************/
27
/*******************THIS IS NOT USED ANYMORE********************/
28
/*******************THIS IS NOT USED ANYMORE********************/
32
#include <gdk/gdkkeysyms.h>
38
#include "../gui_action.hxx"
39
extern void HandleAction(Action act);
40
// when keys are pressed
41
// We have to duplicate the ALT ... shortcut
42
// because of change of focus ?
44
gboolean UI_on_key_press(GtkWidget *widget, GdkEventKey* event, gpointer user_data)
47
UNUSED_ARG(user_data);
48
gboolean shift = FALSE;
49
gboolean ctrl = FALSE;
53
//printf("key : %d (%c) \n",event->keyval,event->keyval);
55
if (event->state & GDK_CONTROL_MASK)
59
if (event->state & GDK_SHIFT_MASK)
63
if(event->state & GDK_MOD1_MASK)
73
switch (event->keyval)
76
action=ACT_NextKFrame;
79
action=ACT_PreviousKFrame;
83
case GDK_Left: case GDK_KP_Left:
86
if((shift == FALSE) && (ctrl == FALSE))
88
action = ACT_PreviousFrame;
91
else if((shift == TRUE) && (ctrl == TRUE))
93
action = ACT_Back100Frames;
98
action = ACT_Back50Frames;
103
action = ACT_Back25Frames;
108
case GDK_Right: case GDK_KP_Right:
109
if((shift == FALSE) && (ctrl == FALSE))
111
action = ACT_NextFrame;
114
else if((shift == TRUE) && (ctrl == TRUE))
116
action = ACT_Forward100Frames;
119
else if(ctrl == TRUE)
121
action = ACT_Forward50Frames;
125
action = ACT_Forward25Frames;
130
if(action!=ACT_DUMMY) // For me to handle
132
HandleAction(action);