Mercurial > hg > xmms-sid
annotate src/xs_curve.h @ 928:8f1027a6b4a0
Oops, do not incorrectly set the reSID-FP backend filters to 0.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 18 Nov 2012 18:06:24 +0200 |
parents | b5b6b13a6d85 |
children |
rev | line source |
---|---|
526
fa95d942f226
Header cleanup; Moved some types from xmms-sid.h to xs_player.h; Renamed few functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
502
diff
changeset
|
1 #ifndef XS_CURVE_H |
fa95d942f226
Header cleanup; Moved some types from xmms-sid.h to xs_player.h; Renamed few functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
502
diff
changeset
|
2 #define XS_CURVE_H |
358 | 3 |
4 #include <gdk/gdk.h> | |
5 #include <gtk/gtkdrawingarea.h> | |
6 | |
7 #ifdef __cplusplus | |
8 extern "C" { | |
370
df6f12a00305
Work on filter curve widget begins, based on GtkCurve widget from Gtk+ 1.2.10.
Matti Hamalainen <ccr@tnsp.org>
parents:
358
diff
changeset
|
9 #endif |
358 | 10 |
545
425da926d310
Working on XSCurve widget implementation.
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
11 /* Macros for type-classing this GtkWidget/object |
425da926d310
Working on XSCurve widget implementation.
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
12 */ |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
13 #define XS_TYPE_CURVE (xs_curve_get_type()) |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
14 #define XS_CURVE(obj) (GTK_CHECK_CAST ((obj), XS_TYPE_CURVE, XSCurve)) |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
15 #define XS_CURVE_CLASS(luokka) (GTK_CHECK_CLASS_CAST ((luokka), XS_TYPE_CURVE, XSCurveClass)) |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
16 #define XS_IS_CURVE(obj) (GTK_CHECK_TYPE ((obj), XS_TYPE_CURVE)) |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
17 #define XS_IS_CURVE_CLASS(luokka) (GTK_CHECK_CLASS_TYPE ((luokka), XS_TYPE_CURVE)) |
358 | 18 |
19 | |
545
425da926d310
Working on XSCurve widget implementation.
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
20 /* Structures |
425da926d310
Working on XSCurve widget implementation.
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
21 */ |
629 | 22 typedef struct _XSCurve XSCurve; |
23 typedef struct _XSCurveClass XSCurveClass; | |
358 | 24 |
502
54d86ee98b98
Alpha/preliminary curve widget code merged.
Matti Hamalainen <ccr@tnsp.org>
parents:
384
diff
changeset
|
25 typedef struct { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
26 gfloat x,y; |
702 | 27 } xs_point_t; |
358 | 28 |
545
425da926d310
Working on XSCurve widget implementation.
Matti Hamalainen <ccr@tnsp.org>
parents:
526
diff
changeset
|
29 typedef struct { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
30 gint x, y; |
702 | 31 } xs_int_point_t; |
502
54d86ee98b98
Alpha/preliminary curve widget code merged.
Matti Hamalainen <ccr@tnsp.org>
parents:
384
diff
changeset
|
32 |
54d86ee98b98
Alpha/preliminary curve widget code merged.
Matti Hamalainen <ccr@tnsp.org>
parents:
384
diff
changeset
|
33 struct _XSCurve { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
34 GtkDrawingArea graph; |
358 | 35 |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
36 gint cursor_type; |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
37 gfloat min_x; |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
38 gfloat max_x; |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
39 gfloat min_y; |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
40 gfloat max_y; |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
41 GdkPixmap *pixmap; |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
42 gint grab_point; /* point currently grabbed */ |
358 | 43 |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
44 /* control points */ |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
45 gint nctlpoints; /* number of control points */ |
702 | 46 xs_point_t *ctlpoints; /* array of control points */ |
358 | 47 }; |
48 | |
502
54d86ee98b98
Alpha/preliminary curve widget code merged.
Matti Hamalainen <ccr@tnsp.org>
parents:
384
diff
changeset
|
49 struct _XSCurveClass { |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
50 GtkDrawingAreaClass parent_class; |
358 | 51 }; |
52 | |
53 | |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
54 GtkType xs_curve_get_type (void); |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
55 GtkWidget* xs_curve_new (void); |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
56 void xs_curve_reset (XSCurve *curve); |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
57 void xs_curve_set_range (XSCurve *curve, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
58 gfloat min_x, gfloat min_y, |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
59 gfloat max_x, gfloat max_y); |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
629
diff
changeset
|
60 gboolean xs_curve_realloc_data (XSCurve *curve, gint npoints); |
702 | 61 void xs_curve_get_data (XSCurve *curve, xs_point_t ***points, gint **npoints); |
62 gboolean xs_curve_set_points (XSCurve *curve, xs_int_point_t *points, gint npoints); | |
63 gboolean xs_curve_get_points (XSCurve *curve, xs_int_point_t **points, gint *npoints); | |
358 | 64 |
65 #ifdef __cplusplus | |
66 } | |
370
df6f12a00305
Work on filter curve widget begins, based on GtkCurve widget from Gtk+ 1.2.10.
Matti Hamalainen <ccr@tnsp.org>
parents:
358
diff
changeset
|
67 #endif |
358 | 68 |
526
fa95d942f226
Header cleanup; Moved some types from xmms-sid.h to xs_player.h; Renamed few functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
502
diff
changeset
|
69 #endif /* XS_CURVE_H */ |