annotate src/sid/xs_curve.h @ 3195:16d4308fb36e

alsa-ng: Set type hint on prefs window, and don't use deprecated GTK funcs.
author John Lindgren <john.lindgren@tds.net>
date Thu, 09 Jul 2009 11:03:32 -0400
parents 45ef6d7c0174
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
1 #ifndef XS_CURVE_H
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
2 #define XS_CURVE_H
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
3
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
4 #include <gdk/gdk.h>
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
5 #include <gtk/gtkdrawingarea.h>
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
6
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
7 G_BEGIN_DECLS
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
8
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
9 /* Macros for type-classing this GtkWidget/object
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
10 */
2643
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
11 #define XS_TYPE_CURVE (xs_curve_get_type())
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
12 #define XS_CURVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XS_TYPE_CURVE, XSCurve))
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
13 #define XS_CURVE_CLASS(luokka) (G_TYPE_CHECK_CLASS_CAST ((luokka), XS_TYPE_CURVE, XSCurveClass))
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
14 #define XS_IS_CURVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XS_TYPE_CURVE))
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
15 #define XS_IS_CURVE_CLASS(luokka) (G_TYPE_CHECK_CLASS_TYPE ((luokka), XS_TYPE_CURVE))
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
16 #define XS_CURVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XS_TYPE_CURVE, XSCurveClass))
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
17
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
18
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
19 /* Structures
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
20 */
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
21 typedef struct _XSCurve XSCurve;
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
22 typedef struct _XSCurveClass XSCurveClass;
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
23
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
24 typedef struct {
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
25 gfloat x,y;
2643
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
26 } xs_point_t;
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
27
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
28 typedef struct {
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
29 gint x, y;
2643
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
30 } xs_int_point_t;
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
31
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
32 struct _XSCurve {
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
33 GtkDrawingArea graph;
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
34
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
35 gint cursor_type;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
36 gfloat min_x;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
37 gfloat max_x;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
38 gfloat min_y;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
39 gfloat max_y;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
40 GdkPixmap *pixmap;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
41 gint grab_point; /* point currently grabbed */
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
42
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
43 /* control points */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
44 gint nctlpoints; /* number of control points */
2643
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
45 xs_point_t *ctlpoints; /* array of control points */
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
46 };
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
47
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
48 struct _XSCurveClass {
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
49 GtkDrawingAreaClass parent_class;
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
50 };
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
51
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
52
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
53 GType xs_curve_get_type (void);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
54 GtkWidget* xs_curve_new (void);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
55 void xs_curve_reset (XSCurve *curve);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
56 void xs_curve_set_range (XSCurve *curve,
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
57 gfloat min_x, gfloat min_y,
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
58 gfloat max_x, gfloat max_y);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 1572
diff changeset
59 gboolean xs_curve_realloc_data (XSCurve *curve, gint npoints);
2643
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
60 void xs_curve_get_data (XSCurve *curve, xs_point_t ***points, gint **npoints);
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
61 gboolean xs_curve_set_points (XSCurve *curve, xs_int_point_t *points, gint npoints);
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
62 gboolean xs_curve_get_points (XSCurve *curve, xs_int_point_t **points, gint *npoints);
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
63
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
64 G_END_DECLS
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
65
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents:
diff changeset
66 #endif /* XS_CURVE_H */