From 3866f14c102eec187e6fddbb7cf470df148053a3 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Tue, 13 Jul 2010 17:31:19 +0100 Subject: button press background done --- src/play-button.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/play-button.h') diff --git a/src/play-button.h b/src/play-button.h index 3eaabcc..37b3624 100644 --- a/src/play-button.h +++ b/src/play-button.h @@ -44,6 +44,8 @@ struct _PlayButton { GType play_button_get_type (void); void play_button_set_style(GtkWidget* button, GtkStyle* style); gint determine_button_event(GtkWidget* button, GdkEventButton* event); +void play_button_react_to_button_press(GtkWidget* button, gint command); +void play_button_react_to_button_release(GtkWidget* button); GtkWidget* play_button_new(); -- cgit v1.2.3 From 858c43dbd4be74c8979bc778b83a1642784a7e02 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Tue, 13 Jul 2010 18:12:45 +0100 Subject: moving towards the play button pause button swap --- src/play-button.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/play-button.h') diff --git a/src/play-button.h b/src/play-button.h index 37b3624..e82d59c 100644 --- a/src/play-button.h +++ b/src/play-button.h @@ -46,6 +46,7 @@ void play_button_set_style(GtkWidget* button, GtkStyle* style); gint determine_button_event(GtkWidget* button, GdkEventButton* event); void play_button_react_to_button_press(GtkWidget* button, gint command); void play_button_react_to_button_release(GtkWidget* button); +void play_button_toggle_play_pause(GtkWidget* button, int update); GtkWidget* play_button_new(); -- cgit v1.2.3 From 42f71fbdeb2beb78a3c4381caaa75c66e5b1b6b4 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Thu, 15 Jul 2010 15:46:54 +0100 Subject: tidied up some enums using typedefs and some more bits and pieces --- src/play-button.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/play-button.h') diff --git a/src/play-button.h b/src/play-button.h index e82d59c..6f646b5 100644 --- a/src/play-button.h +++ b/src/play-button.h @@ -33,6 +33,13 @@ G_BEGIN_DECLS typedef struct _PlayButton PlayButton; typedef struct _PlayButtonClass PlayButtonClass; +typedef enum { + TRANSPORT_PREVIOUS, + TRANSPORT_PLAY_PAUSE, + TRANSPORT_NEXT, + TRANSPORT_NADA +}PlayButtonEvent; + struct _PlayButtonClass { GtkDrawingAreaClass parent_class; }; @@ -43,8 +50,8 @@ struct _PlayButton { GType play_button_get_type (void); void play_button_set_style(GtkWidget* button, GtkStyle* style); -gint determine_button_event(GtkWidget* button, GdkEventButton* event); -void play_button_react_to_button_press(GtkWidget* button, gint command); +PlayButtonEvent determine_button_event(GtkWidget* button, GdkEventButton* event); +void play_button_react_to_button_press(GtkWidget* button, PlayButtonEvent command); void play_button_react_to_button_release(GtkWidget* button); void play_button_toggle_play_pause(GtkWidget* button, int update); -- cgit v1.2.3 From d92a4492dcfca6030f8a9b32c111e582ba4e8f96 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Tue, 20 Jul 2010 12:24:43 +0200 Subject: play pause both graphically and functionally now working --- src/play-button.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/play-button.h') diff --git a/src/play-button.h b/src/play-button.h index 6f646b5..727a489 100644 --- a/src/play-button.h +++ b/src/play-button.h @@ -40,6 +40,11 @@ typedef enum { TRANSPORT_NADA }PlayButtonEvent; +typedef enum { + PLAY, + PAUSE +}PlayButtonState; + struct _PlayButtonClass { GtkDrawingAreaClass parent_class; }; @@ -53,7 +58,7 @@ void play_button_set_style(GtkWidget* button, GtkStyle* style); PlayButtonEvent determine_button_event(GtkWidget* button, GdkEventButton* event); void play_button_react_to_button_press(GtkWidget* button, PlayButtonEvent command); void play_button_react_to_button_release(GtkWidget* button); -void play_button_toggle_play_pause(GtkWidget* button, int update); +void play_button_toggle_play_pause(GtkWidget* button, PlayButtonState update); GtkWidget* play_button_new(); -- cgit v1.2.3