Mercurial > audlegacy
annotate src/audacious/widgets/widget.h @ 3097:bb1fa0aed8f4
add url unescape code to playlist_get_info_text().
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Thu, 19 Jul 2007 12:49:50 +0900 |
parents | 41d3854f3625 |
children | 3b6d316f8b09 |
rev | line source |
---|---|
2313 | 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 | |
3056
41d3854f3625
Set the license explicitly to GPL v2
Tomasz Mon <desowin@gmail.com>
parents:
2507
diff
changeset
|
9 * the Free Software Foundation; under version 2 of the License. |
2313 | 10 * |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
19 */ | |
20 | |
21 #ifndef _WIDGETCORE_H_ | |
22 #error Please do not include me directly! Use widgetcore.h instead! | |
23 #endif | |
24 | |
25 #ifndef WIDGET_H | |
26 #define WIDGET_H | |
27 | |
28 | |
29 #include <glib.h> | |
30 #include <gdk/gdk.h> | |
31 #include <gtk/gtk.h> | |
32 | |
33 | |
34 typedef struct _Widget Widget; | |
35 | |
36 | |
37 typedef void (*WidgetButtonPressFunc) (GtkWidget *, GdkEventButton *, | |
38 gpointer); | |
39 typedef void (*WidgetButtonReleaseFunc) (GtkWidget *, GdkEventButton *, | |
40 gpointer); | |
41 typedef void (*WidgetMotionFunc) (GtkWidget *, GdkEventMotion *, gpointer); | |
42 typedef void (*WidgetDrawFunc) (Widget *); | |
43 typedef void (*WidgetScrollFunc) (GtkWidget *, GdkEventScroll *, gpointer); | |
44 | |
45 | |
46 #define WIDGET(x) ((Widget *)(x)) | |
47 struct _Widget { | |
48 GdkPixmap *parent; | |
49 GdkGC *gc; | |
50 | |
51 gint x, y; | |
52 gint width, height; | |
53 | |
54 gint visible; | |
55 gboolean redraw; | |
56 | |
57 GMutex *mutex; | |
58 | |
59 WidgetButtonPressFunc button_press_cb; | |
60 WidgetButtonReleaseFunc button_release_cb; | |
61 WidgetMotionFunc motion_cb; | |
62 WidgetDrawFunc draw; | |
63 WidgetScrollFunc mouse_scroll_cb; | |
64 }; | |
65 | |
66 | |
67 void widget_init(Widget * widget, GdkPixmap * parent, GdkGC * gc, | |
68 gint x, gint y, gint width, gint height, gint visible); | |
69 | |
70 void widget_set_position(Widget * widget, gint x, gint y); | |
71 void widget_set_size(Widget * widget, gint width, gint height); | |
72 void widget_queue_redraw(Widget * widget); | |
73 | |
74 void widget_lock(Widget * widget); | |
75 void widget_unlock(Widget * widget); | |
76 | |
77 gboolean widget_contains(Widget * widget, gint x, gint y); | |
78 | |
79 void widget_show(Widget * widget); | |
80 void widget_hide(Widget * widget); | |
81 gboolean widget_is_visible(Widget * widget); | |
82 | |
83 void widget_resize(Widget * widget, gint width, gint height); | |
2507
e07c141dd326
[svn] - made new functions: widget_move_relative and widget_resize_relative
mf0102
parents:
2313
diff
changeset
|
84 void widget_resize_relative(Widget * widget, gint width, gint height); |
2313 | 85 void widget_move(Widget * widget, gint x, gint y); |
2507
e07c141dd326
[svn] - made new functions: widget_move_relative and widget_resize_relative
mf0102
parents:
2313
diff
changeset
|
86 void widget_move_relative(Widget * widget, gint x, gint y); |
2313 | 87 void widget_draw(Widget * widget); |
88 void widget_draw_quick(Widget * widget); | |
89 | |
90 void handle_press_cb(GList * wlist, GtkWidget * widget, | |
91 GdkEventButton * event); | |
92 void handle_release_cb(GList * wlist, GtkWidget * widget, | |
93 GdkEventButton * event); | |
94 void handle_motion_cb(GList * wlist, GtkWidget * widget, | |
95 GdkEventMotion * event); | |
96 void handle_scroll_cb(GList * wlist, GtkWidget * widget, | |
97 GdkEventScroll * event); | |
98 | |
99 void widget_list_add(GList ** list, Widget * widget); | |
100 void widget_list_draw(GList * list, gboolean * redraw, gboolean force); | |
101 void widget_list_change_pixmap(GList * list, GdkPixmap * pixmap); | |
102 void widget_list_clear_redraw(GList * list); | |
103 void widget_list_lock(GList * list); | |
104 void widget_list_unlock(GList * list); | |
105 | |
106 #endif |