annotate audacious/widget.h @ 420:44c513ae3527 trunk

[svn] Remove equalization code. We do this same processing in the core in 0.2.
author nenolod
date Fri, 13 Jan 2006 14:50:54 -0800
parents 02c17a5c99e3
children f12d7e208b43
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
1 /* BMP - Cross-platform multimedia player
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
2 * Copyright (C) 2003-2004 BMP development team.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
3 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
4 * Based on XMMS:
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
5 * Copyright (C) 1998-2003 XMMS development team.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10 * (at your option) any later version.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 * GNU General Public License for more details.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
16 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
21 #ifndef WIDGET_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22 #define WIDGET_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
25 #include <glib.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
26 #include <gdk/gdk.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
27 #include <gtk/gtk.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
28
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
29
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
30 typedef struct _Widget Widget;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
31
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33 typedef void (*WidgetButtonPressFunc) (GtkWidget *, GdkEventButton *,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34 gpointer);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
35 typedef void (*WidgetButtonReleaseFunc) (GtkWidget *, GdkEventButton *,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
36 gpointer);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
37 typedef void (*WidgetMotionFunc) (GtkWidget *, GdkEventMotion *, gpointer);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
38 typedef void (*WidgetDrawFunc) (Widget *);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
39 typedef void (*WidgetScrollFunc) (GtkWidget *, GdkEventScroll *, gpointer);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
40
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
41
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
42 #define WIDGET(x) ((Widget *)(x))
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
43 struct _Widget {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
44 GdkPixmap *parent;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
45 GdkGC *gc;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
46
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
47 gint x, y;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
48 gint width, height;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
49
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
50 gint visible;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
51 gboolean redraw;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
52
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
53 GMutex *mutex;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
54
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55 WidgetButtonPressFunc button_press_cb;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
56 WidgetButtonReleaseFunc button_release_cb;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57 WidgetMotionFunc motion_cb;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
58 WidgetDrawFunc draw;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59 WidgetScrollFunc mouse_scroll_cb;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
60 };
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
61
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
62
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
63 void widget_init(Widget * widget, GdkPixmap * parent, GdkGC * gc,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
64 gint x, gint y, gint width, gint height, gint visible);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
65
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
66 void widget_set_position(Widget * widget, gint x, gint y);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
67 void widget_set_size(Widget * widget, gint width, gint height);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
68 void widget_queue_redraw(Widget * widget);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
69
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
70 void widget_lock(Widget * widget);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
71 void widget_unlock(Widget * widget);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
72
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
73 gboolean widget_contains(Widget * widget, gint x, gint y);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
74
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
75 void widget_show(Widget * widget);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
76 void widget_hide(Widget * widget);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
77 gboolean widget_is_visible(Widget * widget);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
78
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
79 void widget_resize(Widget * widget, gint width, gint height);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
80 void widget_move(Widget * widget, gint x, gint y);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
81 void widget_draw(Widget * widget);
237
02c17a5c99e3 [svn] - Implement widget_draw_quick(widget_t *) for doing an immediate draw
nenolod
parents: 0
diff changeset
82 void widget_draw_quick(Widget * widget);
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
83
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
84 void handle_press_cb(GList * wlist, GtkWidget * widget,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
85 GdkEventButton * event);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
86 void handle_release_cb(GList * wlist, GtkWidget * widget,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
87 GdkEventButton * event);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
88 void handle_motion_cb(GList * wlist, GtkWidget * widget,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
89 GdkEventMotion * event);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
90 void handle_scroll_cb(GList * wlist, GtkWidget * widget,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
91 GdkEventScroll * event);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
92
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
93 void widget_list_add(GList ** list, Widget * widget);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
94 void widget_list_draw(GList * list, gboolean * redraw, gboolean force);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
95 void widget_list_change_pixmap(GList * list, GdkPixmap * pixmap);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
96 void widget_list_clear_redraw(GList * list);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
97 void widget_list_lock(GList * list);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
98 void widget_list_unlock(GList * list);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
99
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
100
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
101
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
102 #endif