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