Mercurial > hg > xmms-sid
diff src/xs_curve.h @ 545:425da926d310
Working on XSCurve widget implementation.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 23 Feb 2007 05:10:00 +0000 |
parents | fa95d942f226 |
children | b6c7c26569cc |
line wrap: on
line diff
--- a/src/xs_curve.h Wed Feb 21 15:23:02 2007 +0000 +++ b/src/xs_curve.h Fri Feb 23 05:10:00 2007 +0000 @@ -8,7 +8,8 @@ extern "C" { #endif - +/* Macros for type-classing this GtkWidget/object + */ #define XS_TYPE_CURVE (xs_curve_get_type()) #define XS_CURVE(obj) (GTK_CHECK_CAST ((obj), XS_TYPE_CURVE, XSCurve)) #define XS_CURVE_CLASS(luokka) (GTK_CHECK_CLASS_CAST ((luokka), XS_TYPE_CURVE, XSCurveClass)) @@ -16,6 +17,8 @@ #define XS_IS_CURVE_CLASS(luokka) (GTK_CHECK_CLASS_TYPE ((luokka), XS_TYPE_CURVE)) +/* Structures + */ typedef struct _XSCurve XSCurve; typedef struct _XSCurveClass XSCurveClass; @@ -23,6 +26,9 @@ gfloat x,y; } t_xs_point; +typedef struct { + gint x, y; +} t_xs_int_point; struct _XSCurve { GtkDrawingArea graph; @@ -38,7 +44,7 @@ gint last; /* control points */ - gint num_ctlpoints; /* number of control points */ + gint nctlpoints; /* number of control points */ t_xs_point *ctlpoints; /* array of control points */ }; @@ -51,8 +57,12 @@ GtkWidget* xs_curve_new (void); void xs_curve_reset (XSCurve *curve); void xs_curve_set_range (XSCurve *curve, - gfloat min_x, gfloat max_x, - gfloat min_y, gfloat max_y); + gfloat min_x, gfloat min_y, + gfloat max_x, gfloat max_y); +gboolean xs_curve_realloc_data (XSCurve *curve, gint npoints); +void xs_curve_get_data (XSCurve *curve, t_xs_point ***points, gint **npoints); +gboolean xs_curve_set_points (XSCurve *curve, t_xs_int_point *points, gint npoints); +gboolean xs_curve_get_points (XSCurve *curve, t_xs_int_point **points, gint *npoints); #ifdef __cplusplus }