annotate src/audacious/ui_skinned_button.h @ 2918:4e71092ab29b trunk

remove evil GPL3 upgrade phrase
author Tomasz Mon <desowin@gmail.com>
date Fri, 29 Jun 2007 11:00:23 +0200
parents 5ed0674fabd6
children 7926d46872c8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
1 /*
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
2 * Audacious - a cross-platform multimedia player
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
3 * Copyright (c) 2007 Audacious development team.
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
4 *
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or modify
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
2918
4e71092ab29b remove evil GPL3 upgrade phrase
Tomasz Mon <desowin@gmail.com>
parents: 2901
diff changeset
7 * the Free Software Foundation; under version 2 of the License.
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
8 *
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
9 * This program is distributed in the hope that it will be useful,
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
12 * GNU General Public License for more details.
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
13 *
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
15 * along with this program; if not, write to the Free Software
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
17 */
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
18
2842
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
19 #ifndef UISKINNEDBUTTON_H
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
20 #define UISKINNEDBUTTON_H
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
21
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
22 #include <gdk/gdk.h>
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
23 #include <gtk/gtkbin.h>
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
24 #include <gtk/gtkenums.h>
2842
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
25 #include "widgets/skin.h"
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
26
2842
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
27 #define UI_TYPE_SKINNED_BUTTON (ui_skinned_button_get_type())
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
28 #define UI_SKINNED_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UI_TYPE_SKINNED_BUTTON, UiSkinnedButton))
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
29 #define UI_SKINNED_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UI_TYPE_SKINNED_BUTTON, UiSkinnedButtonClass))
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
30 #define UI_IS_SKINNED_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UI_TYPE_SKINNED_BUTTON))
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
31 #define UI_IS_SKINNED_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UI_TYPE_SKINNED_BUTTON))
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
32 #define UI_SKINNED_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UI_TYPE_SKINNED_BUTTON, GtkFlatButtonClass))
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
33
2842
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
34 typedef struct _UiSkinnedButton UiSkinnedButton;
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
35 typedef struct _UiSkinnedButtonClass UiSkinnedButtonClass;
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
36
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
37 enum {
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
38 PRESSED,
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
39 RELEASED,
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
40 CLICKED,
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
41 DOUBLED,
2829
4eda78b785ed [svn] - draw_main_window redraws custom gtk widgets
desowin
parents: 2822
diff changeset
42 REDRAW,
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
43 LAST_SIGNAL
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
44 };
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
45
2843
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
46 enum {
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
47 TYPE_NOT_SET,
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
48 TYPE_PUSH,
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
49 TYPE_TOGGLE,
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
50 TYPE_SMALL
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
51 };
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
52
2842
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
53 struct _UiSkinnedButton {
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
54 GtkBin bin;
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
55
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
56 GdkWindow *event_window;
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
57
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
58 gboolean button_down : 1;
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
59 gboolean pressed : 1;
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
60 gboolean hover : 1;
2843
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
61 gboolean inside : 1;
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
62 gint type;
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
63 //Skinned part, used in ui_playlist.c
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
64 gint x, y, nx, ny, px, py;
2833
1e97a0a228b7 [svn] - reduce number of redraws
desowin
parents: 2829
diff changeset
65
2843
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
66 //Toogle button needs also those
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
67 gint pnx, pny, ppx, ppy;
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
68
2833
1e97a0a228b7 [svn] - reduce number of redraws
desowin
parents: 2829
diff changeset
69 gboolean redraw;
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
70 };
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
71
2842
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
72 struct _UiSkinnedButtonClass {
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
73 GtkBinClass parent_class;
2842
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
74 void (* pressed) (UiSkinnedButton *button);
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
75 void (* released) (UiSkinnedButton *button);
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
76 void (* clicked) (UiSkinnedButton *button);
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
77 void (* doubled) (UiSkinnedButton *button);
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
78 void (* redraw) (UiSkinnedButton *button);
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
79 };
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
80
2842
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
81 GType ui_skinned_button_get_type(void) G_GNUC_CONST;
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
82 GtkWidget* ui_skinned_button_new();
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
83 void ui_skinned_push_button_setup(GtkWidget *button, GtkWidget *fixed, GdkPixmap * parent, GdkGC * gc, gint x, gint y, gint w, gint h, gint nx, gint ny, gint px, gint py, SkinPixmapId si);
2853
bec320cfcc12 use UiSkinnedButton instead of PButton in equalizerwin
Tomasz Mon <desowin@gmail.com>
parents: 2844
diff changeset
84 void ui_skinned_set_push_button_data(GtkWidget *button, gint nx, gint ny, gint px, gint py);
2843
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
85 void ui_skinned_toggle_button_setup(GtkWidget *button, GtkWidget *fixed, GdkPixmap *parent, GdkGC *gc, gint x, gint y, gint w, gint h, gint nx, gint ny, gint px, gint py, gint pnx, gint pny, gint ppx, gint ppy, SkinPixmapId si);
2844
22da7cd0eca0 UiSkinnedButton can now work as SButton
Tomasz Mon <desowin@gmail.com>
parents: 2843
diff changeset
86 void ui_skinned_small_button_setup(GtkWidget *button, GtkWidget *fixed, GdkPixmap *parent, GdkGC *gc, gint x, gint y, gint w, gint h);
2853
bec320cfcc12 use UiSkinnedButton instead of PButton in equalizerwin
Tomasz Mon <desowin@gmail.com>
parents: 2844
diff changeset
87 void ui_skinned_button_set_skin_index(GtkWidget *button, SkinPixmapId si);
bec320cfcc12 use UiSkinnedButton instead of PButton in equalizerwin
Tomasz Mon <desowin@gmail.com>
parents: 2844
diff changeset
88 void ui_skinned_button_set_skin_index1(GtkWidget *button, SkinPixmapId si);
bec320cfcc12 use UiSkinnedButton instead of PButton in equalizerwin
Tomasz Mon <desowin@gmail.com>
parents: 2844
diff changeset
89 void ui_skinned_button_set_skin_index2(GtkWidget *button, SkinPixmapId si);
2901
5ed0674fabd6 replace PButton in playlistwin with UiSkinnedButton, pbutton.c is no longer needed
Tomasz Mon <desowin@gmail.com>
parents: 2853
diff changeset
90 void ui_skinned_button_move_relative(GtkWidget *button, gint x, gint y);
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
91
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
92 #endif