0
|
1 /* BMP - Cross-platform multimedia player
|
|
2 * Copyright (C) 2003-2004 BMP development team.
|
|
3 *
|
|
4 * Based on XMMS:
|
|
5 * Copyright (C) 1998-2003 XMMS development team.
|
|
6 *
|
|
7 * This program is free software; you can redistribute it and/or modify
|
|
8 * it under the terms of the GNU General Public License as published by
|
|
9 * the Free Software Foundation; either version 2 of the License, or
|
|
10 * (at your option) any later version.
|
|
11 *
|
|
12 * This program is distributed in the hope that it will be useful,
|
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15 * GNU General Public License for more details.
|
|
16 *
|
|
17 * You should have received a copy of the GNU General Public License
|
|
18 * along with this program; if not, write to the Free Software
|
|
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
20 */
|
|
21 #ifndef PBUTTON_H
|
|
22 #define PBUTTON_H
|
|
23
|
|
24 #include <glib.h>
|
|
25 #include <gdk/gdk.h>
|
|
26
|
|
27 #include "widget.h"
|
|
28 #include "skin.h"
|
|
29
|
|
30 #define PBUTTON(x) ((PButton *)(x))
|
|
31 struct _PButton {
|
|
32 Widget pb_widget;
|
|
33 gint pb_nx, pb_ny;
|
|
34 gint pb_px, pb_py;
|
|
35 gboolean pb_pressed;
|
|
36 gboolean pb_inside;
|
|
37 gboolean pb_allow_draw;
|
|
38 void (*pb_push_cb) (void);
|
|
39 SkinPixmapId pb_skin_index1, pb_skin_index2;
|
|
40 };
|
|
41
|
|
42 typedef struct _PButton PButton;
|
|
43
|
|
44 PButton *create_pbutton(GList ** wlist, GdkPixmap * parent, GdkGC * gc,
|
|
45 gint x, gint y, gint w, gint h, gint nx, gint ny,
|
|
46 gint px, gint py, void (*cb) (void), SkinPixmapId si);
|
|
47 PButton *create_pbutton_ex(GList ** wlist, GdkPixmap * parent, GdkGC * gc,
|
|
48 gint x, gint y, gint w, gint h, gint nx,
|
|
49 gint ny, gint px, gint py, void (*cb) (void),
|
|
50 SkinPixmapId si1, SkinPixmapId si2);
|
|
51 void free_pbutton(PButton * b);
|
|
52 void pbutton_set_skin_index(PButton * b, SkinPixmapId si);
|
|
53 void pbutton_set_skin_index1(PButton * b, SkinPixmapId si);
|
|
54 void pbutton_set_skin_index2(PButton * b, SkinPixmapId si);
|
|
55 void pbutton_set_button_data(PButton * b, gint nx, gint ny, gint px, gint py);
|
|
56
|
|
57 #endif
|