summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox/PDa/extra/sliderh.c
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2009-05-24 21:28:16 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2009-05-24 21:28:16 +0000
commit526b5580dabbfed7cfe5439dc3a90ec727f563c2 (patch)
tree22b1af92348785daad16714ee5e2b633017e0e48 /apps/plugins/pdbox/PDa/extra/sliderh.c
parent4f2dfcc01b260d946044ef2b6af5fe36cb772c8d (diff)
downloadrockbox-526b5580dabbfed7cfe5439dc3a90ec727f563c2.tar.gz
rockbox-526b5580dabbfed7cfe5439dc3a90ec727f563c2.zip
Cut the files in half and it might work better (note to self: check your tree is really clean before patching)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21070 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pdbox/PDa/extra/sliderh.c')
-rw-r--r--apps/plugins/pdbox/PDa/extra/sliderh.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/apps/plugins/pdbox/PDa/extra/sliderh.c b/apps/plugins/pdbox/PDa/extra/sliderh.c
index 23a6d256e0..cfeb961a72 100644
--- a/apps/plugins/pdbox/PDa/extra/sliderh.c
+++ b/apps/plugins/pdbox/PDa/extra/sliderh.c
@@ -61,66 +61,4 @@ void sliderh_setup(void) {
61 class_setsavefn(sliderh_class,&sliderh_save); 61 class_setsavefn(sliderh_class,&sliderh_save);
62#endif 62#endif
63} 63}
64#include "m_pd.h"
65#include "g_canvas.h"
66
67
68#ifdef NT
69#pragma warning( disable : 4244 )
70#pragma warning( disable : 4305 )
71#endif
72
73#include "fatom.h"
74
75/* can we use the normal text save function ?? */
76
77static t_class *sliderh_class;
78
79static void sliderh_save(t_gobj *z, t_binbuf *b)
80{
81
82 t_fatom *x = (t_fatom *)z;
83
84 binbuf_addv(b, "ssiisiiisss", gensym("#X"),gensym("obj"),
85 x->x_obj.te_xpix, x->x_obj.te_ypix ,
86 gensym("sliderh"),x->x_max,x->x_min,x->x_width,x->x_send,x->x_color,x->x_bgcolor);
87 binbuf_addv(b, ";");
88}
89
90
91static void *sliderh_new(t_symbol* s, int argc, t_atom* argv)
92{
93 t_fatom *x = (t_fatom *)pd_new(sliderh_class);
94 x->x_type = gensym("hslider");
95 return fatom_new(x,argc,argv);
96}
97
98
99t_widgetbehavior sliderh_widgetbehavior;
100
101
102
103 64
104void sliderh_setup(void) {
105 sliderh_class = class_new(gensym("sliderh"), (t_newmethod)sliderh_new, 0,
106 sizeof(t_fatom),0,A_DEFFLOAT,A_DEFFLOAT,A_DEFFLOAT,0);
107
108 fatom_setup_common(sliderh_class);
109
110 sliderh_widgetbehavior.w_getrectfn = fatom_getrect;
111 sliderh_widgetbehavior.w_displacefn= fatom_displace;
112 sliderh_widgetbehavior.w_selectfn= fatom_select;
113 sliderh_widgetbehavior.w_activatefn=fatom_activate;
114 sliderh_widgetbehavior.w_deletefn= fatom_delete;
115 sliderh_widgetbehavior.w_visfn= fatom_vis;
116#if PD_MINOR_VERSION < 37
117 sliderh_widgetbehavior.w_savefn= sliderh_save;
118 sliderh_widgetbehavior.w_propertiesfn= NULL;
119#endif
120 sliderh_widgetbehavior.w_clickfn= NULL;
121
122 class_setwidget(sliderh_class,&sliderh_widgetbehavior);
123#if PD_MINOR_VERSION >= 37
124 class_setsavefn(sliderh_class,&sliderh_save);
125#endif
126}