annotate src/audacious/ui_skinned_button.h @ 3746:d5580c6bca31

export xconvert API
author William Pitcock <nenolod@atheme.org>
date Sun, 14 Oct 2007 03:49:00 -0500
parents f02623377013
children 46591501603e
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
3121
3b6d316f8b09 GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents: 3105
diff changeset
7 * the Free Software Foundation; under version 3 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
3121
3b6d316f8b09 GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents: 3105
diff changeset
15 * along with this program. If not, see <http://www.gnu.org/licenses>.
3123
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
16 *
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
17 * The Audacious team does not consider modular code linking to
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
18 * Audacious or using our public API to be a derived work.
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
19 */
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
20
2842
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
21 #ifndef UISKINNEDBUTTON_H
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
22 #define UISKINNEDBUTTON_H
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
23
3219
2f08ee945857 fix includes
Tomasz Mon <desowin@gmail.com>
parents: 3123
diff changeset
24 #include <gtk/gtk.h>
3251
f02623377013 goodbye widgets directory
Tomasz Mon <desowin@gmail.com>
parents: 3219
diff changeset
25 #include "skin.h"
3219
2f08ee945857 fix includes
Tomasz Mon <desowin@gmail.com>
parents: 3123
diff changeset
26
3105
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
27 #define UI_SKINNED_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ui_skinned_button_get_type(), UiSkinnedButton))
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
28 #define UI_SKINNED_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ui_skinned_button_get_type(), UiSkinnedButtonClass))
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
29 #define UI_SKINNED_IS_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ui_skinned_button_get_type()))
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
30
2842
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
31 typedef struct _UiSkinnedButton UiSkinnedButton;
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
32 typedef struct _UiSkinnedButtonClass UiSkinnedButtonClass;
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
33
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
34 enum {
3105
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
35 TYPE_NOT_SET,
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
36 TYPE_PUSH,
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
37 TYPE_TOGGLE,
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
38 TYPE_SMALL
2843
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
39 };
91ef09fe7936 UiSkinnedButton can now work as TButton
Tomasz Mon <desowin@gmail.com>
parents: 2842
diff changeset
40
2842
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
41 struct _UiSkinnedButton {
3105
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
42 GtkWidget widget;
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
43
3105
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
44 GdkWindow *event_window;
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
45 gboolean button_down;
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
46 gboolean pressed;
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
47 gboolean hover;
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
48 gboolean inside;
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
49 gint type;
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
50 gint x, y;
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
51 };
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
52
2842
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
53 struct _UiSkinnedButtonClass {
3105
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
54 GtkWidgetClass parent_class;
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
55 void (* pressed) (UiSkinnedButton *button);
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
56 void (* released) (UiSkinnedButton *button);
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
57 void (* clicked) (UiSkinnedButton *button);
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
58 void (* right_clicked) (UiSkinnedButton *button);
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
59 void (* doubled) (UiSkinnedButton *button);
1912eba1004b cleaning
Tomasz Mon <desowin@gmail.com>
parents: 3006
diff changeset
60 void (* redraw) (UiSkinnedButton *button);
2822
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
61 };
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
62
2842
c2622a939e9e rename audacious_pbutton to ui_skinned_button
Tomasz Mon <desowin@gmail.com>
parents: 2834
diff changeset
63 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
64 GtkWidget* ui_skinned_button_new();
3005
3db40ad79fd9 request GdkGC when needed rather than carry one around
Tomasz Mon <desowin@gmail.com>
parents: 2998
diff changeset
65 void ui_skinned_push_button_setup(GtkWidget *button, GtkWidget *fixed, 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
66 void ui_skinned_set_push_button_data(GtkWidget *button, gint nx, gint ny, gint px, gint py);
3005
3db40ad79fd9 request GdkGC when needed rather than carry one around
Tomasz Mon <desowin@gmail.com>
parents: 2998
diff changeset
67 void ui_skinned_toggle_button_setup(GtkWidget *button, GtkWidget *fixed, 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);
3db40ad79fd9 request GdkGC when needed rather than carry one around
Tomasz Mon <desowin@gmail.com>
parents: 2998
diff changeset
68 void ui_skinned_small_button_setup(GtkWidget *button, GtkWidget *fixed, 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
69 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
70 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
71 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
72 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
73
9cfdff8a8b37 [svn] and of course I forgot new files
desowin
parents:
diff changeset
74 #endif