annotate src/xs_curve.h @ 970:d90bca05521e

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 21 Nov 2012 00:16:03 +0200
parents b5b6b13a6d85
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 #include <gdk/gdk.h>
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 #include <gtk/gtkdrawingarea.h>
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 #ifdef __cplusplus
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
Matti Hamalainen <ccr@tnsp.org>
parents: 602
diff changeset
22 typedef struct _XSCurve XSCurve;
Matti Hamalainen <ccr@tnsp.org>
parents: 602
diff changeset
23 typedef struct _XSCurveClass XSCurveClass;
358
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
b5b6b13a6d85 Renamed some types.
Matti Hamalainen <ccr@tnsp.org>
parents: 660
diff changeset
27 } xs_point_t;
358
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
b5b6b13a6d85 Renamed some types.
Matti Hamalainen <ccr@tnsp.org>
parents: 660
diff changeset
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
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
b5b6b13a6d85 Renamed some types.
Matti Hamalainen <ccr@tnsp.org>
parents: 660
diff changeset
46 xs_point_t *ctlpoints; /* array of control points */
358
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
47 };
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51 };
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
b5b6b13a6d85 Renamed some types.
Matti Hamalainen <ccr@tnsp.org>
parents: 660
diff changeset
61 void xs_curve_get_data (XSCurve *curve, xs_point_t ***points, gint **npoints);
b5b6b13a6d85 Renamed some types.
Matti Hamalainen <ccr@tnsp.org>
parents: 660
diff changeset
62 gboolean xs_curve_set_points (XSCurve *curve, xs_int_point_t *points, gint npoints);
b5b6b13a6d85 Renamed some types.
Matti Hamalainen <ccr@tnsp.org>
parents: 660
diff changeset
63 gboolean xs_curve_get_points (XSCurve *curve, xs_int_point_t **points, gint *npoints);
358
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
64
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65 #ifdef __cplusplus
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
4f247b19c9ea Add new files
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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 */