Mercurial > audlegacy-plugins
annotate src/skins/ui_skinned_button.h @ 3182:631d217913e0
alsa-ng: Fix arithmetic overflow on 32-bit systems.
author | John Lindgren <john.lindgren@tds.net> |
---|---|
date | Fri, 12 Jun 2009 09:17:09 -0400 |
parents | 51fc44b99b58 |
children |
rev | line source |
---|---|
2585 | 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 }; | |
61 | |
62 GType ui_skinned_button_get_type(void) G_GNUC_CONST; | |
63 GtkWidget* ui_skinned_button_new(); | |
64 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); | |
65 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); | |
66 void ui_skinned_small_button_setup(GtkWidget *button, GtkWidget *fixed, gint x, gint y, gint w, gint h); | |
67 void ui_skinned_button_set_skin_index2(GtkWidget *button, SkinPixmapId si); | |
68 void ui_skinned_button_move_relative(GtkWidget *button, gint x, gint y); | |
2668
a1431a900f28
introduce ui_skinned_button_set_inside
Tomasz Mon <desowin@gmail.com>
parents:
2585
diff
changeset
|
69 void ui_skinned_button_set_inside(GtkWidget *widget, gboolean inside); |
2585 | 70 |
71 #endif /* AUDACIOUS_UI_SKINNED_BUTTON_H */ |