Mercurial > audlegacy
annotate src/audacious/legacy/ui_skinned_button.h @ 4700:3a56d2786063
move all files belonging to the legacy UI to legacy/
author | mf0102 <0102@gmx.at> |
---|---|
date | Sun, 06 Jul 2008 17:55:40 +0200 |
parents | |
children |
rev | line source |
---|---|
4700
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
1 /* |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
2 * Audacious - a cross-platform multimedia player |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
3 * Copyright (c) 2007 Tomasz Moń |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
4 * |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
5 * This program is free software; you can redistribute it and/or modify |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
6 * it under the terms of the GNU General Public License as published by |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
7 * the Free Software Foundation; under version 3 of the License. |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
8 * |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
9 * This program is distributed in the hope that it will be useful, |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
12 * GNU General Public License for more details. |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
13 * |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
14 * You should have received a copy of the GNU General Public License |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
15 * along with this program. If not, see <http://www.gnu.org/licenses>. |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
16 * |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
17 * The Audacious team does not consider modular code linking to |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
18 * Audacious or using our public API to be a derived work. |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
19 */ |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
20 |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
21 #ifndef AUDACIOUS_UI_SKINNED_BUTTON_H |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
22 #define AUDACIOUS_UI_SKINNED_BUTTON_H |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
23 |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
24 #include <gtk/gtk.h> |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
25 #include "ui_skin.h" |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
26 |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
27 #define UI_SKINNED_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ui_skinned_button_get_type(), UiSkinnedButton)) |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
28 #define UI_SKINNED_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ui_skinned_button_get_type(), UiSkinnedButtonClass)) |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
29 #define UI_SKINNED_IS_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ui_skinned_button_get_type())) |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
30 |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
31 typedef struct _UiSkinnedButton UiSkinnedButton; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
32 typedef struct _UiSkinnedButtonClass UiSkinnedButtonClass; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
33 |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
34 enum { |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
35 TYPE_NOT_SET, |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
36 TYPE_PUSH, |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
37 TYPE_TOGGLE, |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
38 TYPE_SMALL |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
39 }; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
40 |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
41 struct _UiSkinnedButton { |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
42 GtkWidget widget; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
43 |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
44 GdkWindow *event_window; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
45 gboolean button_down; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
46 gboolean pressed; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
47 gboolean hover; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
48 gboolean inside; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
49 gint type; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
50 gint x, y; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
51 }; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
52 |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
53 struct _UiSkinnedButtonClass { |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
54 GtkWidgetClass parent_class; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
55 void (* pressed) (UiSkinnedButton *button); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
56 void (* released) (UiSkinnedButton *button); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
57 void (* clicked) (UiSkinnedButton *button); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
58 void (* right_clicked) (UiSkinnedButton *button); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
59 void (* scaled) (UiSkinnedButton *button); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
60 void (* redraw) (UiSkinnedButton *button); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
61 }; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
62 |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
63 GType ui_skinned_button_get_type(void) G_GNUC_CONST; |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
64 GtkWidget* ui_skinned_button_new(); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
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); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
66 void ui_skinned_set_push_button_data(GtkWidget *button, gint nx, gint ny, gint px, gint py); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
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); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
68 void ui_skinned_small_button_setup(GtkWidget *button, GtkWidget *fixed, gint x, gint y, gint w, gint h); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
69 void ui_skinned_button_set_skin_index(GtkWidget *button, SkinPixmapId si); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
70 void ui_skinned_button_set_skin_index1(GtkWidget *button, SkinPixmapId si); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
71 void ui_skinned_button_set_skin_index2(GtkWidget *button, SkinPixmapId si); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
72 void ui_skinned_button_move_relative(GtkWidget *button, gint x, gint y); |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
73 |
3a56d2786063
move all files belonging to the legacy UI to legacy/
mf0102 <0102@gmx.at>
parents:
diff
changeset
|
74 #endif /* AUDACIOUS_UI_SKINNED_BUTTON_H */ |