Mercurial > hg > xmms-sid
comparison src/xs_curve.h @ 660:b0743dc9165d
Change tabs to 4 spaces, everywhere.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 02 Apr 2008 22:10:05 +0300 |
parents | ce1fe59627f2 |
children | b5b6b13a6d85 |
comparison
equal
deleted
inserted
replaced
659:04ea91a61225 | 660:b0743dc9165d |
---|---|
8 extern "C" { | 8 extern "C" { |
9 #endif | 9 #endif |
10 | 10 |
11 /* Macros for type-classing this GtkWidget/object | 11 /* Macros for type-classing this GtkWidget/object |
12 */ | 12 */ |
13 #define XS_TYPE_CURVE (xs_curve_get_type()) | 13 #define XS_TYPE_CURVE (xs_curve_get_type()) |
14 #define XS_CURVE(obj) (GTK_CHECK_CAST ((obj), XS_TYPE_CURVE, XSCurve)) | 14 #define XS_CURVE(obj) (GTK_CHECK_CAST ((obj), XS_TYPE_CURVE, XSCurve)) |
15 #define XS_CURVE_CLASS(luokka) (GTK_CHECK_CLASS_CAST ((luokka), XS_TYPE_CURVE, XSCurveClass)) | 15 #define XS_CURVE_CLASS(luokka) (GTK_CHECK_CLASS_CAST ((luokka), XS_TYPE_CURVE, XSCurveClass)) |
16 #define XS_IS_CURVE(obj) (GTK_CHECK_TYPE ((obj), XS_TYPE_CURVE)) | 16 #define XS_IS_CURVE(obj) (GTK_CHECK_TYPE ((obj), XS_TYPE_CURVE)) |
17 #define XS_IS_CURVE_CLASS(luokka) (GTK_CHECK_CLASS_TYPE ((luokka), XS_TYPE_CURVE)) | 17 #define XS_IS_CURVE_CLASS(luokka) (GTK_CHECK_CLASS_TYPE ((luokka), XS_TYPE_CURVE)) |
18 | 18 |
19 | 19 |
20 /* Structures | 20 /* Structures |
21 */ | 21 */ |
22 typedef struct _XSCurve XSCurve; | 22 typedef struct _XSCurve XSCurve; |
23 typedef struct _XSCurveClass XSCurveClass; | 23 typedef struct _XSCurveClass XSCurveClass; |
24 | 24 |
25 typedef struct { | 25 typedef struct { |
26 gfloat x,y; | 26 gfloat x,y; |
27 } t_xs_point; | 27 } t_xs_point; |
28 | 28 |
29 typedef struct { | 29 typedef struct { |
30 gint x, y; | 30 gint x, y; |
31 } t_xs_int_point; | 31 } t_xs_int_point; |
32 | 32 |
33 struct _XSCurve { | 33 struct _XSCurve { |
34 GtkDrawingArea graph; | 34 GtkDrawingArea graph; |
35 | 35 |
36 gint cursor_type; | 36 gint cursor_type; |
37 gfloat min_x; | 37 gfloat min_x; |
38 gfloat max_x; | 38 gfloat max_x; |
39 gfloat min_y; | 39 gfloat min_y; |
40 gfloat max_y; | 40 gfloat max_y; |
41 GdkPixmap *pixmap; | 41 GdkPixmap *pixmap; |
42 gint grab_point; /* point currently grabbed */ | 42 gint grab_point; /* point currently grabbed */ |
43 | 43 |
44 /* control points */ | 44 /* control points */ |
45 gint nctlpoints; /* number of control points */ | 45 gint nctlpoints; /* number of control points */ |
46 t_xs_point *ctlpoints; /* array of control points */ | 46 t_xs_point *ctlpoints; /* array of control points */ |
47 }; | 47 }; |
48 | 48 |
49 struct _XSCurveClass { | 49 struct _XSCurveClass { |
50 GtkDrawingAreaClass parent_class; | 50 GtkDrawingAreaClass parent_class; |
51 }; | 51 }; |
52 | 52 |
53 | 53 |
54 GtkType xs_curve_get_type (void); | 54 GtkType xs_curve_get_type (void); |
55 GtkWidget* xs_curve_new (void); | 55 GtkWidget* xs_curve_new (void); |
56 void xs_curve_reset (XSCurve *curve); | 56 void xs_curve_reset (XSCurve *curve); |
57 void xs_curve_set_range (XSCurve *curve, | 57 void xs_curve_set_range (XSCurve *curve, |
58 gfloat min_x, gfloat min_y, | 58 gfloat min_x, gfloat min_y, |
59 gfloat max_x, gfloat max_y); | 59 gfloat max_x, gfloat max_y); |
60 gboolean xs_curve_realloc_data (XSCurve *curve, gint npoints); | 60 gboolean xs_curve_realloc_data (XSCurve *curve, gint npoints); |
61 void xs_curve_get_data (XSCurve *curve, t_xs_point ***points, gint **npoints); | 61 void xs_curve_get_data (XSCurve *curve, t_xs_point ***points, gint **npoints); |
62 gboolean xs_curve_set_points (XSCurve *curve, t_xs_int_point *points, gint npoints); | 62 gboolean xs_curve_set_points (XSCurve *curve, t_xs_int_point *points, gint npoints); |
63 gboolean xs_curve_get_points (XSCurve *curve, t_xs_int_point **points, gint *npoints); | 63 gboolean xs_curve_get_points (XSCurve *curve, t_xs_int_point **points, gint *npoints); |
64 | 64 |
65 #ifdef __cplusplus | 65 #ifdef __cplusplus |
66 } | 66 } |
67 #endif | 67 #endif |
68 | 68 |