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