Mercurial > audlegacy-plugins
comparison src/sid/xs_curve.c @ 2643:45ef6d7c0174
Synchronized typedef name changes from XMMS-SID.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 25 May 2008 20:03:48 +0300 |
parents | 1223e8510d8a |
children |
comparison
equal
deleted
inserted
replaced
2642:c2603047a1a3 | 2643:45ef6d7c0174 |
---|---|
250 { | 250 { |
251 gfloat res = 5.0f; | 251 gfloat res = 5.0f; |
252 GtkStateType state; | 252 GtkStateType state; |
253 GtkStyle *style; | 253 GtkStyle *style; |
254 gint i, ox = -1, oy = -1; | 254 gint i, ox = -1, oy = -1; |
255 t_xs_point *p0, *p1, *p2, *p3; | 255 xs_point_t *p0, *p1, *p2, *p3; |
256 | 256 |
257 if (!curve->pixmap) | 257 if (!curve->pixmap) |
258 return; | 258 return; |
259 | 259 |
260 state = GTK_STATE_NORMAL; | 260 state = GTK_STATE_NORMAL; |
622 | 622 |
623 gboolean xs_curve_realloc_data(XSCurve *curve, gint npoints) | 623 gboolean xs_curve_realloc_data(XSCurve *curve, gint npoints) |
624 { | 624 { |
625 if (npoints != curve->nctlpoints) { | 625 if (npoints != curve->nctlpoints) { |
626 curve->nctlpoints = npoints; | 626 curve->nctlpoints = npoints; |
627 curve->ctlpoints = (t_xs_point *) g_realloc(curve->ctlpoints, | 627 curve->ctlpoints = (xs_point_t *) g_realloc(curve->ctlpoints, |
628 curve->nctlpoints * sizeof(*curve->ctlpoints)); | 628 curve->nctlpoints * sizeof(*curve->ctlpoints)); |
629 | 629 |
630 if (curve->ctlpoints == NULL) | 630 if (curve->ctlpoints == NULL) |
631 return FALSE; | 631 return FALSE; |
632 } | 632 } |
633 | 633 |
634 return TRUE; | 634 return TRUE; |
635 } | 635 } |
636 | 636 |
637 | 637 |
638 void xs_curve_get_data(XSCurve *curve, t_xs_point ***points, gint **npoints) | 638 void xs_curve_get_data(XSCurve *curve, xs_point_t ***points, gint **npoints) |
639 { | 639 { |
640 *points = &(curve->ctlpoints); | 640 *points = &(curve->ctlpoints); |
641 *npoints = &(curve->nctlpoints); | 641 *npoints = &(curve->nctlpoints); |
642 } | 642 } |
643 | 643 |
644 | 644 |
645 gboolean xs_curve_set_points(XSCurve *curve, t_xs_int_point *points, gint npoints) | 645 gboolean xs_curve_set_points(XSCurve *curve, xs_int_point_t *points, gint npoints) |
646 { | 646 { |
647 gint i; | 647 gint i; |
648 | 648 |
649 if (!xs_curve_realloc_data(curve, npoints + 4)) | 649 if (!xs_curve_realloc_data(curve, npoints + 4)) |
650 return FALSE; | 650 return FALSE; |
667 xs_curve_update(curve); | 667 xs_curve_update(curve); |
668 return TRUE; | 668 return TRUE; |
669 } | 669 } |
670 | 670 |
671 | 671 |
672 gboolean xs_curve_get_points(XSCurve *curve, t_xs_int_point **points, gint *npoints) | 672 gboolean xs_curve_get_points(XSCurve *curve, xs_int_point_t **points, gint *npoints) |
673 { | 673 { |
674 gint i, n; | 674 gint i, n; |
675 | 675 |
676 n = curve->nctlpoints - 4; | 676 n = curve->nctlpoints - 4; |
677 | 677 |
678 *points = g_malloc(n * sizeof(t_xs_int_point)); | 678 *points = g_malloc(n * sizeof(xs_int_point_t)); |
679 if (*points == NULL) | 679 if (*points == NULL) |
680 return FALSE; | 680 return FALSE; |
681 | 681 |
682 *npoints = n; | 682 *npoints = n; |
683 for (i = 2; i < curve->nctlpoints - 2; i++) { | 683 for (i = 2; i < curve->nctlpoints - 2; i++) { |