diff options
Diffstat (limited to 'src/play-button.c')
-rw-r--r-- | src/play-button.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/play-button.c b/src/play-button.c index afb46d8..2fddbcf 100644 --- a/src/play-button.c +++ b/src/play-button.c @@ -53,6 +53,13 @@ Uses code from ctk #define PAUSE_X 62.0f #define PAUSE_Y 15.0f +// Transport events +enum { + PREVIOUS, + PLAY_PAUSE, + NEXT +}; + typedef struct _PlayButtonPrivate PlayButtonPrivate; struct _PlayButtonPrivate @@ -358,15 +365,15 @@ determine_button_event(GtkWidget* button, GdkEventButton* event) // For now very simple rectangular collision detection if(event->x > 40 && event->x < 80 && event->y > 22 && event->y < 46){ - result = 1; + result = PREVIOUS; } else if(event->x > 86 && event->x < 118 && event->y > 20 && event->y < 47){ - result = 2; + result = PLAY_PAUSE; } else if(event->x > 122 && event->x < 164 && event->y > 22 && event->y < 46){ - result = 3; + result = NEXT; } return result; |