Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wynn
purr-data
Commits
b52b3c4b
Commit
b52b3c4b
authored
Sep 16, 2011
by
Ivica Bukvic
Committed by
Hans-Christoph Steiner
Nov 02, 2011
Browse files
Pd-0.42.5-extended-l2ork-dev-20110916.tar.bz2
parent
979b88bb
Changes
14
Hide whitespace changes
Inline
Side-by-side
src/g_bang.c
View file @
b52b3c4b
...
...
@@ -51,10 +51,10 @@ void bng_draw_new(t_bng *x, t_glist *glist)
t_canvas
*
canvas
=
glist_getcanvas
(
glist
);
t_scalehandle
*
sh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sprintf
(
sh
->
h_pathname
,
".x%x.h%x"
,
(
int
)
canvas
,
(
int
)
sh
);
sprintf
(
sh
->
h_pathname
,
".x%
l
x.h%
l
x"
,
(
t_
int
)
canvas
,
(
t_
int
)
sh
);
t_scalehandle
*
lh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_lhandle
;
sprintf
(
lh
->
h_pathname
,
".x%x.h%x"
,
(
int
)
canvas
,
(
int
)
lh
);
sprintf
(
lh
->
h_pathname
,
".x%
l
x.h%
l
x"
,
(
t_
int
)
canvas
,
(
t_
int
)
lh
);
//if (glist_isvisible(canvas)) {
...
...
@@ -416,7 +416,7 @@ static void bng__clickhook(t_scalehandle *sh, t_floatarg f, t_floatarg xxx, t_fl
if
(
glist_isvisible
(
x
->
x_gui
.
x_glist
))
{
sys_vgui
(
"lower %s
\n
"
,
sh
->
h_pathname
);
t_scalehandle
*
othersh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sys_vgui
(
"lower .x%x.h%x
\n
"
,
(
int
)
glist_getcanvas
(
x
->
x_gui
.
x_glist
),
(
int
)
othersh
);
sys_vgui
(
"lower .x%
l
x.h%
l
x
\n
"
,
(
t_
int
)
glist_getcanvas
(
x
->
x_gui
.
x_glist
),
(
t_
int
)
othersh
);
}
sh
->
h_dragx
=
0
;
...
...
@@ -860,9 +860,9 @@ static void *bng_new(t_symbol *s, int argc, t_atom *argv)
x
->
x_gui
.
x_handle
=
pd_new
(
scalehandle_class
);
sh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sh
->
h_master
=
(
t_gobj
*
)
x
;
sprintf
(
buf
,
"_h%x"
,
(
int
)
sh
);
sprintf
(
buf
,
"_h%
l
x"
,
(
t_
int
)
sh
);
pd_bind
(
x
->
x_gui
.
x_handle
,
sh
->
h_bindsym
=
gensym
(
buf
));
sprintf
(
sh
->
h_outlinetag
,
"h%x"
,
(
int
)
sh
);
sprintf
(
sh
->
h_outlinetag
,
"h%
l
x"
,
(
t_
int
)
sh
);
sh
->
h_dragon
=
0
;
sh
->
h_scale
=
1
;
x
->
x_gui
.
scale_offset_x
=
0
;
...
...
@@ -875,9 +875,9 @@ static void *bng_new(t_symbol *s, int argc, t_atom *argv)
x
->
x_gui
.
x_lhandle
=
pd_new
(
scalehandle_class
);
lh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_lhandle
;
lh
->
h_master
=
(
t_gobj
*
)
x
;
sprintf
(
lhbuf
,
"_h%x"
,
(
int
)
lh
);
sprintf
(
lhbuf
,
"_h%
l
x"
,
(
t_
int
)
lh
);
pd_bind
(
x
->
x_gui
.
x_lhandle
,
lh
->
h_bindsym
=
gensym
(
lhbuf
));
sprintf
(
lh
->
h_outlinetag
,
"h%x"
,
(
int
)
lh
);
sprintf
(
lh
->
h_outlinetag
,
"h%
l
x"
,
(
t_
int
)
lh
);
lh
->
h_dragon
=
0
;
lh
->
h_scale
=
0
;
x
->
x_gui
.
label_offset_x
=
0
;
...
...
src/g_canvas.c
View file @
b52b3c4b
...
...
@@ -10,34 +10,10 @@ to be different but are now unified except for some fossilized names.) */
#include "m_pd.h"
#include "m_imp.h"
#include "s_stuff.h"
#include "g_magicglass.h"
#include "g_canvas.h"
#include <string.h>
#include "g_all_guis.h"
#include "g_magicglass.h"
// jsarlo
typedef
struct
_magicGlass
{
t_object
x_obj
;
t_object
*
x_connectedObj
;
int
x_connectedOutno
;
int
x_visible
;
char
x_string
[
4096
];
char
x_old_string
[
4096
];
int
x_x
;
int
x_y
;
int
x_c
;
float
x_sigF
;
int
x_dspOn
;
int
x_viewOn
;
float
x_maxSample
;
int
x_sampleCount
;
t_clock
*
x_clearClock
;
t_clock
*
x_flashClock
;
unsigned
int
x_maxSize
;
unsigned
int
x_issignal
;
};
// end jsarlo
/* LATER consider adding font size to this struct (see glist_getfont()) */
struct
_canvasenvironment
...
...
@@ -410,7 +386,7 @@ t_canvas *canvas_new(void *dummy, t_symbol *sel, int argc, t_atom *argv)
glist_init
(
x
);
// jsarlo
x
->
gl_magic_glass
=
magicGlass_new
(
(
int
)
x
);
x
->
gl_magic_glass
=
magicGlass_new
(
x
);
// end jsarlo
//if we are root canvas set the clock for script based destructor of the window
...
...
src/g_editor.c
View file @
b52b3c4b
...
...
@@ -7,9 +7,9 @@
#include "m_pd.h"
#include "m_imp.h"
#include "s_stuff.h"
#include "g_magicglass.h"
#include "g_canvas.h"
#include <string.h>
#include "g_magicglass.h"
void
glist_readfrombinbuf
(
t_glist
*
x
,
t_binbuf
*
b
,
char
*
filename
,
int
selectem
);
...
...
@@ -38,6 +38,7 @@ static int paste_xyoffset = 0; /* a counter of pastes to make x,y offsets */
static
void
canvas_mouseup_gop
(
t_canvas
*
x
,
t_gobj
*
g
);
static
void
canvas_done_popup
(
t_canvas
*
x
,
t_float
which
,
t_float
xpos
,
t_float
ypos
);
static
void
canvas_doarrange
(
t_canvas
*
x
,
t_float
which
,
t_gobj
*
oldy
,
t_gobj
*
oldy_prev
,
t_gobj
*
oldy_next
);
static
void
canvas_paste_xyoffset
(
t_canvas
*
x
);
// jsarlo
static
char
canvas_cnct_inlet_tag
[
4096
];
...
...
@@ -823,8 +824,9 @@ static void canvas_undo_paste(t_canvas *x, void *z, int action)
canvas_dopaste
(
x
,
copy_binbuf
);
/* if it was "duplicate" have to re-enact the displacement. */
if
(
canvas_undo_name
&&
canvas_undo_name
[
0
]
==
'd'
)
for
(
sel
=
x
->
gl_editor
->
e_selection
;
sel
;
sel
=
sel
->
sel_next
)
gobj_displace
(
sel
->
sel_what
,
x
,
10
,
10
);
//for (sel = x->gl_editor->e_selection; sel; sel = sel->sel_next)
// gobj_displace(sel->sel_what, x, 10, 10);
canvas_paste_xyoffset
(
x
);
}
else
if
(
action
==
UNDO_FREE
)
t_freebytes
(
buf
,
sizeof
(
*
buf
));
...
...
@@ -1150,7 +1152,7 @@ void canvas_setcursor(t_canvas *x, unsigned int cursornum)
static
unsigned
int
cursorwas
;
if
(
cursornum
>=
sizeof
(
cursorlist
)
/
sizeof
*
cursorlist
)
{
bug
(
"canvas_setcursor"
);
bug
(
"canvas_setcursor"
);
return
;
}
if
(
xwas
!=
x
||
cursorwas
!=
cursornum
)
...
...
@@ -1452,7 +1454,9 @@ void canvas_setgraph(t_glist *x, int flag, int nogoprect)
x
->
gl_pixheight
=
GLIST_DEFGRAPHHEIGHT
;
if
(
x
->
gl_owner
&&
!
x
->
gl_loading
&&
glist_isvisible
(
x
->
gl_owner
))
{
gobj_vis
(
&
x
->
gl_gobj
,
x
->
gl_owner
,
0
);
}
x
->
gl_isgraph
=
1
;
x
->
gl_hidetext
=
!
(
!
(
flag
&
2
));
if
(
!
nogoprect
&&
!
x
->
gl_goprect
)
...
...
@@ -1460,8 +1464,9 @@ void canvas_setgraph(t_glist *x, int flag, int nogoprect)
/* Ivica Ico Bukvic 5/16/10 <ico@bukvic.net> */
x
->
gl_goprect
=
1
;
}
if
(
glist_isvisible
(
x
)
&&
x
->
gl_goprect
)
if
(
glist_isvisible
(
x
)
&&
x
->
gl_goprect
)
{
glist_redraw
(
x
);
}
if
(
x
->
gl_owner
&&
!
x
->
gl_loading
&&
glist_isvisible
(
x
->
gl_owner
))
{
gobj_vis
(
&
x
->
gl_gobj
,
x
->
gl_owner
,
1
);
...
...
@@ -3253,8 +3258,20 @@ static void glist_donewloadbangs(t_glist *x)
static
void
canvas_paste_xyoffset
(
t_canvas
*
x
)
{
t_selection
*
sel
;
for
(
sel
=
x
->
gl_editor
->
e_selection
;
sel
;
sel
=
sel
->
sel_next
)
t_class
*
cl
;
int
resortin
=
0
;
int
resortout
=
0
;
for
(
sel
=
x
->
gl_editor
->
e_selection
;
sel
;
sel
=
sel
->
sel_next
)
{
gobj_displace
(
sel
->
sel_what
,
x
,
paste_xyoffset
*
10
,
paste_xyoffset
*
10
);
cl
=
pd_class
(
&
sel
->
sel_what
->
g_pd
);
if
(
cl
==
vinlet_class
)
resortin
=
1
;
if
(
cl
==
voutlet_class
)
resortout
=
1
;
}
if
(
resortin
)
canvas_resortinlets
(
x
);
if
(
resortout
)
canvas_resortoutlets
(
x
);
// alternative one-line implementation that
// replaces the entire function
//canvas_displaceselection(x, 10, 10);
...
...
@@ -3680,7 +3697,7 @@ void canvas_editmode(t_canvas *x, t_floatarg fyesplease)
}
x
->
gl_edit
=
!
x
->
gl_edit
;
if
(
x
->
gl_edit
&&
glist_isvisible
(
x
)
&&
glist_istoplevel
(
x
))
canvas_setcursor
(
x
,
CURSOR_EDITMODE_NOTHING
);
canvas_setcursor
(
x
,
CURSOR_EDITMODE_NOTHING
);
else
{
glist_noselect
(
x
);
...
...
src/g_hdial.c
View file @
b52b3c4b
...
...
@@ -65,9 +65,9 @@ void hradio_draw_new(t_hradio *x, t_glist *glist)
int
xx22
=
xx11b
+
dx
-
s4
;
t_scalehandle
*
sh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sprintf
(
sh
->
h_pathname
,
".x%x.h%x"
,
(
int
)
canvas
,
(
int
)
sh
);
sprintf
(
sh
->
h_pathname
,
".x%
l
x.h%
l
x"
,
(
t_
int
)
canvas
,
(
t_
int
)
sh
);
t_scalehandle
*
lh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_lhandle
;
sprintf
(
lh
->
h_pathname
,
".x%x.h%x"
,
(
int
)
canvas
,
(
int
)
lh
);
sprintf
(
lh
->
h_pathname
,
".x%
l
x.h%
l
x"
,
(
t_
int
)
canvas
,
(
t_
int
)
lh
);
//if (glist_isvisible(canvas)) {
...
...
@@ -450,7 +450,7 @@ static void hradio__clickhook(t_scalehandle *sh, t_floatarg f, t_floatarg xxx, t
if
(
glist_isvisible
(
x
->
x_gui
.
x_glist
))
{
sys_vgui
(
"lower %s
\n
"
,
sh
->
h_pathname
);
t_scalehandle
*
othersh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sys_vgui
(
"lower .x%x.h%x
\n
"
,
(
int
)
glist_getcanvas
(
x
->
x_gui
.
x_glist
),
(
int
)
othersh
);
sys_vgui
(
"lower .x%
l
x.h%
l
x
\n
"
,
(
t_
int
)
glist_getcanvas
(
x
->
x_gui
.
x_glist
),
(
t_
int
)
othersh
);
}
sh
->
h_dragx
=
0
;
...
...
@@ -961,9 +961,9 @@ static void *hradio_donew(t_symbol *s, int argc, t_atom *argv, int old)
x
->
x_gui
.
x_handle
=
pd_new
(
scalehandle_class
);
sh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sh
->
h_master
=
(
t_gobj
*
)
x
;
sprintf
(
buf
,
"_h%x"
,
(
int
)
sh
);
sprintf
(
buf
,
"_h%
l
x"
,
(
t_
int
)
sh
);
pd_bind
(
x
->
x_gui
.
x_handle
,
sh
->
h_bindsym
=
gensym
(
buf
));
sprintf
(
sh
->
h_outlinetag
,
"h%x"
,
(
int
)
sh
);
sprintf
(
sh
->
h_outlinetag
,
"h%
l
x"
,
(
t_
int
)
sh
);
sh
->
h_dragon
=
0
;
sh
->
h_scale
=
1
;
x
->
x_gui
.
scale_offset_x
=
0
;
...
...
@@ -976,9 +976,9 @@ static void *hradio_donew(t_symbol *s, int argc, t_atom *argv, int old)
x
->
x_gui
.
x_lhandle
=
pd_new
(
scalehandle_class
);
lh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_lhandle
;
lh
->
h_master
=
(
t_gobj
*
)
x
;
sprintf
(
lhbuf
,
"_h%x"
,
(
int
)
lh
);
sprintf
(
lhbuf
,
"_h%
l
x"
,
(
t_
int
)
lh
);
pd_bind
(
x
->
x_gui
.
x_lhandle
,
lh
->
h_bindsym
=
gensym
(
lhbuf
));
sprintf
(
lh
->
h_outlinetag
,
"h%x"
,
(
int
)
lh
);
sprintf
(
lh
->
h_outlinetag
,
"h%
l
x"
,
(
t_
int
)
lh
);
lh
->
h_dragon
=
0
;
lh
->
h_scale
=
0
;
x
->
x_gui
.
label_offset_x
=
0
;
...
...
src/g_hslider.c
View file @
b52b3c4b
...
...
@@ -74,9 +74,9 @@ static void hslider_draw_new(t_hslider *x, t_glist *glist)
t_canvas
*
canvas
=
glist_getcanvas
(
glist
);
t_scalehandle
*
sh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sprintf
(
sh
->
h_pathname
,
".x%x.h%x"
,
(
int
)
canvas
,
(
int
)
sh
);
sprintf
(
sh
->
h_pathname
,
".x%
l
x.h%
l
x"
,
(
t_
int
)
canvas
,
(
t_
int
)
sh
);
t_scalehandle
*
lh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_lhandle
;
sprintf
(
lh
->
h_pathname
,
".x%x.h%x"
,
(
int
)
canvas
,
(
int
)
lh
);
sprintf
(
lh
->
h_pathname
,
".x%
l
x.h%
l
x"
,
(
t_
int
)
canvas
,
(
t_
int
)
lh
);
//if (glist_isvisible(canvas)) {
...
...
@@ -433,7 +433,7 @@ static void hslider__clickhook(t_scalehandle *sh, t_floatarg f, t_floatarg xxx,
if
(
glist_isvisible
(
x
->
x_gui
.
x_glist
))
{
sys_vgui
(
"lower %s
\n
"
,
sh
->
h_pathname
);
t_scalehandle
*
othersh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sys_vgui
(
"lower .x%x.h%x
\n
"
,
(
int
)
glist_getcanvas
(
x
->
x_gui
.
x_glist
),
(
int
)
othersh
);
sys_vgui
(
"lower .x%
l
x.h%
l
x
\n
"
,
(
t_
int
)
glist_getcanvas
(
x
->
x_gui
.
x_glist
),
(
t_
int
)
othersh
);
}
sh
->
h_dragx
=
0
;
...
...
@@ -949,9 +949,9 @@ static void *hslider_new(t_symbol *s, int argc, t_atom *argv)
x
->
x_gui
.
x_handle
=
pd_new
(
scalehandle_class
);
sh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sh
->
h_master
=
(
t_gobj
*
)
x
;
sprintf
(
buf
,
"_h%x"
,
(
int
)
sh
);
sprintf
(
buf
,
"_h%
l
x"
,
(
t_
int
)
sh
);
pd_bind
(
x
->
x_gui
.
x_handle
,
sh
->
h_bindsym
=
gensym
(
buf
));
sprintf
(
sh
->
h_outlinetag
,
"h%x"
,
(
int
)
sh
);
sprintf
(
sh
->
h_outlinetag
,
"h%
l
x"
,
(
t_
int
)
sh
);
sh
->
h_dragon
=
0
;
sh
->
h_scale
=
1
;
x
->
x_gui
.
scale_offset_x
=
0
;
...
...
@@ -964,9 +964,9 @@ static void *hslider_new(t_symbol *s, int argc, t_atom *argv)
x
->
x_gui
.
x_lhandle
=
pd_new
(
scalehandle_class
);
lh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_lhandle
;
lh
->
h_master
=
(
t_gobj
*
)
x
;
sprintf
(
lhbuf
,
"_h%x"
,
(
int
)
lh
);
sprintf
(
lhbuf
,
"_h%
l
x"
,
(
t_
int
)
lh
);
pd_bind
(
x
->
x_gui
.
x_lhandle
,
lh
->
h_bindsym
=
gensym
(
lhbuf
));
sprintf
(
lh
->
h_outlinetag
,
"h%x"
,
(
int
)
lh
);
sprintf
(
lh
->
h_outlinetag
,
"h%
l
x"
,
(
t_
int
)
lh
);
lh
->
h_dragon
=
0
;
lh
->
h_scale
=
0
;
x
->
x_gui
.
label_offset_x
=
0
;
...
...
src/g_magicglass.c
View file @
b52b3c4b
...
...
@@ -4,6 +4,8 @@
#include "m_pd.h"
#include "m_imp.h"
#include "s_stuff.h"
#include "g_magicglass.h"
#define MG_CLOCK_CLEAR_DELAY 500.5
#define MG_CLOCK_FLASH_DELAY 50
#define MG_SAMPLE_COUNT 2205
...
...
@@ -12,29 +14,6 @@ EXTERN int glist_getfont(t_glist *x);
t_class
*
magicGlass_class
;
typedef
struct
_magicGlass
{
t_object
x_obj
;
t_object
*
x_connectedObj
;
int
x_connectedOutno
;
int
x_visible
;
char
x_string
[
4096
];
char
x_old_string
[
4096
];
int
x_x
;
int
x_y
;
int
x_c
;
float
x_sigF
;
int
x_dspOn
;
int
x_viewOn
;
float
x_maxSample
;
int
x_sampleCount
;
t_clock
*
x_clearClock
;
t_clock
*
x_flashClock
;
unsigned
int
x_maxSize
;
unsigned
int
x_issignal
;
int
x_display_font
;
}
t_magicGlass
;
void
magicGlass_clearText
(
t_magicGlass
*
x
);
void
magicGlass_bind
(
t_magicGlass
*
x
,
t_object
*
obj
,
int
outno
)
...
...
@@ -80,12 +59,12 @@ void magicGlass_updateText(t_magicGlass *x, int moved)
//fprintf(stderr,"magicglass_updateText\n");
int
bgSize
;
/* change second argument (10.0) to provide optimal scaling in the following entry */
float
font
=
(
float
)(
sys_hostfontsize
(
glist_getfont
(
(
t_glist
*
)(
x
->
x_c
)))
)
/
10
.
0
;
float
font
=
(
float
)(
sys_hostfontsize
(
glist_getfont
(
x
->
x_c
)))
/
10
.
0
;
if
(
font
<=
1
.
0
)
{
x
->
x_display_font
=
9
;
font
=
1
.
0
;
}
else
{
x
->
x_display_font
=
sys_hostfontsize
(
glist_getfont
(
(
t_glist
*
)(
x
->
x_c
))
)
;
x
->
x_display_font
=
sys_hostfontsize
(
glist_getfont
(
x
->
x_c
));
}
if
(
x
->
x_visible
)
...
...
@@ -262,7 +241,7 @@ void magicGlass_list(t_magicGlass *x, t_symbol *sym, int argc, t_atom *argv)
clock_delay
(
x
->
x_clearClock
,
MG_CLOCK_CLEAR_DELAY
);
}
void
magicGlass_setCanvas
(
t_magicGlass
*
x
,
in
t
c
)
void
magicGlass_setCanvas
(
t_magicGlass
*
x
,
t_glis
t
*
c
)
{
x
->
x_c
=
c
;
}
...
...
@@ -382,7 +361,7 @@ void magicGlass_dsp(t_magicGlass *x, t_signal **sp)
x
->
x_issignal
=
1
;
}
void
*
magicGlass_new
(
in
t
c
)
void
*
magicGlass_new
(
t_glis
t
*
c
)
{
//fprintf(stderr,"magicglass_new\n");
t_magicGlass
*
x
=
(
t_magicGlass
*
)
pd_new
(
magicGlass_class
);
...
...
src/g_magicglass.h
View file @
b52b3c4b
#ifndef __g_magicglass_h_
#define __g_magicglass_h_
typedef
struct
_magicGlass
{
t_object
x_obj
;
t_object
*
x_connectedObj
;
int
x_connectedOutno
;
int
x_visible
;
char
x_string
[
4096
];
char
x_old_string
[
4096
];
int
x_x
;
int
x_y
;
t_glist
*
x_c
;
float
x_sigF
;
int
x_dspOn
;
int
x_viewOn
;
float
x_maxSample
;
int
x_sampleCount
;
t_clock
*
x_clearClock
;
t_clock
*
x_flashClock
;
unsigned
int
x_maxSize
;
unsigned
int
x_issignal
;
int
x_display_font
;
}
t_magicGlass
;
EXTERN
void
magicGlass_bind
(
t_magicGlass
*
x
,
t_object
*
obj
,
int
outno
);
EXTERN
void
magicGlass_unbind
(
t_magicGlass
*
x
);
EXTERN
void
magicGlass_bang
(
t_magicGlass
*
x
);
...
...
@@ -5,7 +32,7 @@ EXTERN void magicGlass_float(t_magicGlass *x, t_float f);
EXTERN
void
magicGlass_symbol
(
t_magicGlass
*
x
,
t_symbol
*
sym
);
EXTERN
void
magicGlass_anything
(
t_magicGlass
*
x
,
t_symbol
*
sym
,
int
argc
,
t_atom
*
argv
);
EXTERN
void
magicGlass_list
(
t_magicGlass
*
x
,
t_symbol
*
sym
,
int
argc
,
t_atom
*
argv
);
EXTERN
void
magicGlass_setCanvas
(
t_magicGlass
*
x
,
in
t
c
);
EXTERN
void
magicGlass_setCanvas
(
t_magicGlass
*
x
,
t_glis
t
*
c
);
EXTERN
void
magicGlass_show
(
t_magicGlass
*
x
);
EXTERN
void
magicGlass_hide
(
t_magicGlass
*
x
);
EXTERN
void
magicGlass_moveText
(
t_magicGlass
*
x
,
int
pX
,
int
pY
);
...
...
@@ -13,7 +40,8 @@ EXTERN int magicGlass_bound(t_magicGlass *x);
EXTERN
int
magicGlass_isOn
(
t_magicGlass
*
x
);
EXTERN
void
magicGlass_setOn
(
t_magicGlass
*
x
,
int
i
);
EXTERN
void
magicGlass_setDsp
(
t_magicGlass
*
x
,
int
i
);
EXTERN
void
*
magicGlass_new
(
in
t
c
);
EXTERN
void
*
magicGlass_new
(
t_glis
t
*
c
);
EXTERN
void
magicGlass_free
(
t_magicGlass
*
x
);
EXTERN
void
magicGlass_setup
(
void
);
#endif
/* __g_magicglass_h_ */
src/g_toggle.c
View file @
b52b3c4b
...
...
@@ -55,10 +55,10 @@ void toggle_draw_new(t_toggle *x, t_glist *glist)
int
w
=
1
,
xx
=
text_xpix
(
&
x
->
x_gui
.
x_obj
,
glist
),
yy
=
text_ypix
(
&
x
->
x_gui
.
x_obj
,
glist
);
t_scalehandle
*
sh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sprintf
(
sh
->
h_pathname
,
".x%x.h%x"
,
(
int
)
canvas
,
(
int
)
sh
);
sprintf
(
sh
->
h_pathname
,
".x%
l
x.h%
l
x"
,
(
t_
int
)
canvas
,
(
t_
int
)
sh
);
t_scalehandle
*
lh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_lhandle
;
sprintf
(
lh
->
h_pathname
,
".x%x.h%x"
,
(
int
)
canvas
,
(
int
)
lh
);
sprintf
(
lh
->
h_pathname
,
".x%
l
x.h%
l
x"
,
(
t_
int
)
canvas
,
(
t_
int
)
lh
);
//if (glist_isvisible(canvas)) {
...
...
@@ -432,7 +432,7 @@ static void toggle__clickhook(t_scalehandle *sh, t_floatarg f, t_floatarg xxx, t
if
(
glist_isvisible
(
x
->
x_gui
.
x_glist
))
{
sys_vgui
(
"lower %s
\n
"
,
sh
->
h_pathname
);
t_scalehandle
*
othersh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sys_vgui
(
"lower .x%x.h%x
\n
"
,
(
int
)
glist_getcanvas
(
x
->
x_gui
.
x_glist
),
(
int
)
othersh
);
sys_vgui
(
"lower .x%
l
x.h%
l
x
\n
"
,
(
t_
int
)
glist_getcanvas
(
x
->
x_gui
.
x_glist
),
(
t_
int
)
othersh
);
}
sh
->
h_dragx
=
0
;
...
...
@@ -796,9 +796,9 @@ static void *toggle_new(t_symbol *s, int argc, t_atom *argv)
x
->
x_gui
.
x_handle
=
pd_new
(
scalehandle_class
);
sh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sh
->
h_master
=
(
t_gobj
*
)
x
;
sprintf
(
buf
,
"_h%x"
,
(
int
)
sh
);
sprintf
(
buf
,
"_h%
l
x"
,
(
t_
int
)
sh
);
pd_bind
(
x
->
x_gui
.
x_handle
,
sh
->
h_bindsym
=
gensym
(
buf
));
sprintf
(
sh
->
h_outlinetag
,
"h%x"
,
(
int
)
sh
);
sprintf
(
sh
->
h_outlinetag
,
"h%
l
x"
,
(
t_
int
)
sh
);
sh
->
h_dragon
=
0
;
sh
->
h_scale
=
1
;
x
->
x_gui
.
scale_offset_x
=
0
;
...
...
@@ -811,9 +811,9 @@ static void *toggle_new(t_symbol *s, int argc, t_atom *argv)
x
->
x_gui
.
x_lhandle
=
pd_new
(
scalehandle_class
);
lh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_lhandle
;
lh
->
h_master
=
(
t_gobj
*
)
x
;
sprintf
(
lhbuf
,
"_h%x"
,
(
int
)
lh
);
sprintf
(
lhbuf
,
"_h%
l
x"
,
(
t_
int
)
lh
);
pd_bind
(
x
->
x_gui
.
x_lhandle
,
lh
->
h_bindsym
=
gensym
(
lhbuf
));
sprintf
(
lh
->
h_outlinetag
,
"h%x"
,
(
int
)
lh
);
sprintf
(
lh
->
h_outlinetag
,
"h%
l
x"
,
(
t_
int
)
lh
);
lh
->
h_dragon
=
0
;
lh
->
h_scale
=
0
;
x
->
x_gui
.
label_offset_x
=
0
;
...
...
src/g_vdial.c
View file @
b52b3c4b
...
...
@@ -63,9 +63,9 @@ void vradio_draw_new(t_vradio *x, t_glist *glist)
int
xx21
=
xx11
+
s4
,
xx22
=
xx12
-
s4
;
t_scalehandle
*
sh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sprintf
(
sh
->
h_pathname
,
".x%x.h%x"
,
(
int
)
canvas
,
(
int
)
sh
);
sprintf
(
sh
->
h_pathname
,
".x%
l
x.h%
l
x"
,
(
t_
int
)
canvas
,
(
t_
int
)
sh
);
t_scalehandle
*
lh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_lhandle
;
sprintf
(
lh
->
h_pathname
,
".x%x.h%x"
,
(
int
)
canvas
,
(
int
)
lh
);
sprintf
(
lh
->
h_pathname
,
".x%
l
x.h%
l
x"
,
(
t_
int
)
canvas
,
(
t_
int
)
lh
);
//if (glist_isvisible(canvas)) {
...
...
@@ -450,7 +450,7 @@ static void vradio__clickhook(t_scalehandle *sh, t_floatarg f, t_floatarg xxx, t
if
(
glist_isvisible
(
x
->
x_gui
.
x_glist
))
{
sys_vgui
(
"lower %s
\n
"
,
sh
->
h_pathname
);
t_scalehandle
*
othersh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sys_vgui
(
"lower .x%x.h%x
\n
"
,
(
int
)
glist_getcanvas
(
x
->
x_gui
.
x_glist
),
(
int
)
othersh
);
sys_vgui
(
"lower .x%
l
x.h%
l
x
\n
"
,
(
t_
int
)
glist_getcanvas
(
x
->
x_gui
.
x_glist
),
(
t_
int
)
othersh
);
}
sh
->
h_dragx
=
0
;
...
...
@@ -963,9 +963,9 @@ static void *vradio_donew(t_symbol *s, int argc, t_atom *argv, int old)
x
->
x_gui
.
x_handle
=
pd_new
(
scalehandle_class
);
sh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sh
->
h_master
=
(
t_gobj
*
)
x
;
sprintf
(
buf
,
"_h%x"
,
(
int
)
sh
);
sprintf
(
buf
,
"_h%
l
x"
,
(
t_
int
)
sh
);
pd_bind
(
x
->
x_gui
.
x_handle
,
sh
->
h_bindsym
=
gensym
(
buf
));
sprintf
(
sh
->
h_outlinetag
,
"h%x"
,
(
int
)
sh
);
sprintf
(
sh
->
h_outlinetag
,
"h%
l
x"
,
(
t_
int
)
sh
);
sh
->
h_dragon
=
0
;
sh
->
h_scale
=
1
;
x
->
x_gui
.
scale_offset_x
=
0
;
...
...
@@ -978,9 +978,9 @@ static void *vradio_donew(t_symbol *s, int argc, t_atom *argv, int old)
x
->
x_gui
.
x_lhandle
=
pd_new
(
scalehandle_class
);
lh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_lhandle
;
lh
->
h_master
=
(
t_gobj
*
)
x
;
sprintf
(
lhbuf
,
"_h%x"
,
(
int
)
lh
);
sprintf
(
lhbuf
,
"_h%
l
x"
,
(
t_
int
)
lh
);
pd_bind
(
x
->
x_gui
.
x_lhandle
,
lh
->
h_bindsym
=
gensym
(
lhbuf
));
sprintf
(
lh
->
h_outlinetag
,
"h%x"
,
(
int
)
lh
);
sprintf
(
lh
->
h_outlinetag
,
"h%
l
x"
,
(
t_
int
)
lh
);
lh
->
h_dragon
=
0
;
lh
->
h_scale
=
0
;
x
->
x_gui
.
label_offset_x
=
0
;
...
...
src/g_vslider.c
View file @
b52b3c4b
...
...
@@ -57,9 +57,9 @@ static void vslider_draw_new(t_vslider *x, t_glist *glist)
t_canvas
*
canvas
=
glist_getcanvas
(
glist
);
t_scalehandle
*
sh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sprintf
(
sh
->
h_pathname
,
".x%x.h%x"
,
(
int
)
canvas
,
(
int
)
sh
);
sprintf
(
sh
->
h_pathname
,
".x%
l
x.h%
l
x"
,
(
t_
int
)
canvas
,
(
t_
int
)
sh
);
t_scalehandle
*
lh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_lhandle
;
sprintf
(
lh
->
h_pathname
,
".x%x.h%x"
,
(
int
)
canvas
,
(
int
)
lh
);
sprintf
(
lh
->
h_pathname
,
".x%
l
x.h%
l
x"
,
(
t_
int
)
canvas
,
(
t_
int
)
lh
);
//if (glist_isvisible(canvas)) {
...
...
@@ -424,7 +424,7 @@ static void vslider__clickhook(t_scalehandle *sh, t_floatarg f, t_floatarg xxx,
if
(
glist_isvisible
(
x
->
x_gui
.
x_glist
))
{
sys_vgui
(
"lower %s
\n
"
,
sh
->
h_pathname
);
t_scalehandle
*
othersh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sys_vgui
(
"lower .x%x.h%x
\n
"
,
(
int
)
glist_getcanvas
(
x
->
x_gui
.
x_glist
),
(
int
)
othersh
);
sys_vgui
(
"lower .x%
l
x.h%
l
x
\n
"
,
(
t_
int
)
glist_getcanvas
(
x
->
x_gui
.
x_glist
),
(
t_
int
)
othersh
);
}
sh
->
h_dragx
=
0
;
...
...
@@ -924,9 +924,9 @@ static void *vslider_new(t_symbol *s, int argc, t_atom *argv)
x
->
x_gui
.
x_handle
=
pd_new
(
scalehandle_class
);
sh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sh
->
h_master
=
(
t_gobj
*
)
x
;
sprintf
(
buf
,
"_h%x"
,
(
int
)
sh
);
sprintf
(
buf
,
"_h%
l
x"
,
(
t_
int
)
sh
);
pd_bind
(
x
->
x_gui
.
x_handle
,
sh
->
h_bindsym
=
gensym
(
buf
));
sprintf
(
sh
->
h_outlinetag
,
"h%x"
,
(
int
)
sh
);
sprintf
(
sh
->
h_outlinetag
,
"h%
l
x"
,
(
t_
int
)
sh
);
sh
->
h_dragon
=
0
;
sh
->
h_scale
=
1
;
x
->
x_gui
.
scale_offset_x
=
0
;
...
...
@@ -939,9 +939,9 @@ static void *vslider_new(t_symbol *s, int argc, t_atom *argv)
x
->
x_gui
.
x_lhandle
=
pd_new
(
scalehandle_class
);
lh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_lhandle
;
lh
->
h_master
=
(
t_gobj
*
)
x
;
sprintf
(
lhbuf
,
"_h%x"
,
(
int
)
lh
);
sprintf
(
lhbuf
,
"_h%
l
x"
,
(
t_
int
)
lh
);
pd_bind
(
x
->
x_gui
.
x_lhandle
,
lh
->
h_bindsym
=
gensym
(
lhbuf
));
sprintf
(
lh
->
h_outlinetag
,
"h%x"
,
(
int
)
lh
);
sprintf
(
lh
->
h_outlinetag
,
"h%
l
x"
,
(
t_
int
)
lh
);
lh
->
h_dragon
=
0
;
lh
->
h_scale
=
0
;
x
->
x_gui
.
label_offset_x
=
0
;
...
...
src/g_vumeter.c
View file @
b52b3c4b
...
...
@@ -112,9 +112,9 @@ static void vu_draw_new(t_vu *x, t_glist *glist)
int
led_col
,
yyy
,
i
,
k4
=
ypos
-
k3
;
t_scalehandle
*
sh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sprintf
(
sh
->
h_pathname
,
".x%x.h%x"
,
(
int
)
canvas
,
(
int
)
sh
);
sprintf
(
sh
->
h_pathname
,
".x%
l
x.h%
l
x"
,
(
t_
int
)
canvas
,
(
t_
int
)
sh
);
t_scalehandle
*
lh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_lhandle
;
sprintf
(
lh
->
h_pathname
,
".x%x.h%x"
,
(
int
)
canvas
,
(
int
)
lh
);
sprintf
(
lh
->
h_pathname
,
".x%
l
x.h%
l
x"
,
(
t_
int
)
canvas
,
(
t_
int
)
lh
);
//if (glist_isvisible(canvas)) {
...
...
@@ -648,7 +648,7 @@ static void vu__clickhook(t_scalehandle *sh, t_floatarg f, t_floatarg xxx, t_flo
if
(
glist_isvisible
(
x
->
x_gui
.
x_glist
))
{
sys_vgui
(
"lower %s
\n
"
,
sh
->
h_pathname
);
t_scalehandle
*
othersh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sys_vgui
(
"lower .x%x.h%x
\n
"
,
(
int
)
glist_getcanvas
(
x
->
x_gui
.
x_glist
),
(
int
)
othersh
);
sys_vgui
(
"lower .x%
l
x.h%
l
x
\n
"
,
(
t_
int
)
glist_getcanvas
(
x
->
x_gui
.
x_glist
),
(
t_
int
)
othersh
);
}
sh
->
h_dragx
=
0
;
...
...
@@ -1063,9 +1063,9 @@ static void *vu_new(t_symbol *s, int argc, t_atom *argv)
x
->
x_gui
.
x_handle
=
pd_new
(
scalehandle_class
);
sh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_handle
;
sh
->
h_master
=
(
t_gobj
*
)
x
;
sprintf
(
buf
,
"_h%x"
,
(
int
)
sh
);
sprintf
(
buf
,
"_h%
l
x"
,
(
t_
int
)
sh
);
pd_bind
(
x
->
x_gui
.
x_handle
,
sh
->
h_bindsym
=
gensym
(
buf
));
sprintf
(
sh
->
h_outlinetag
,
"h%x"
,
(
int
)
sh
);
sprintf
(
sh
->
h_outlinetag
,
"h%
l
x"
,
(
t_
int
)
sh
);
sh
->
h_dragon
=
0
;
sh
->
h_scale
=
1
;
x
->
x_gui
.
scale_offset_x
=
0
;
...
...
@@ -1078,9 +1078,9 @@ static void *vu_new(t_symbol *s, int argc, t_atom *argv)
x
->
x_gui
.
x_lhandle
=
pd_new
(
scalehandle_class
);
lh
=
(
t_scalehandle
*
)
x
->
x_gui
.
x_lhandle
;
lh
->
h_master
=
(
t_gobj
*
)
x
;
sprintf
(
lhbuf
,
"_h%x"
,
(
int
)
lh
);
sprintf
(
lhbuf
,
"_h%
l
x"
,
(
t_
int
)
lh
);
pd_bind
(
x
->
x_gui
.
x_lhandle
,
lh
->
h_bindsym
=
gensym
(
lhbuf
));
sprintf
(
lh
->
h_outlinetag
,
"h%x"
,
(
int
)
lh
);
sprintf
(
lh
->
h_outlinetag
,
"h%
l
x"
,
(
t_
int
)
lh
);
lh
->
h_dragon
=
0
;
lh
->
h_scale
=
0
;
x
->
x_gui
.
label_offset_x
=
0
;
...
...
src/m_pd.h
View file @
b52b3c4b
...
...
@@ -11,7 +11,7 @@ extern "C" {
#define PD_MAJOR_VERSION 0
#define PD_MINOR_VERSION 42
#define PD_BUGFIX_VERSION 5
#define PD_TEST_VERSION "extended-l2ork-20110
824
"
#define PD_TEST_VERSION "extended-l2ork-20110
916
"
/* old name for "MSW" flag -- we have to take it for the sake of many old
"nmakefiles" for externs, which will define NT and not MSW */
...
...
src/makefile.dependencies
View file @
b52b3c4b
...
...
@@ -105,8 +105,8 @@ g_canvas.o: g_canvas.c /usr/include/stdlib.h /usr/include/features.h \
/usr/include/_G_config.h /usr/include/wchar.h
\
/usr/lib/gcc/i486-linux-gnu/4.4.1/include/stdarg.h
\
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h
\
m_imp.h s_stuff.h g_canvas.h /usr/include/string.h
\
/usr/include/xlocale.h g_all_guis.h
g_magicglass.h
m_imp.h s_stuff.h
g_magicglass.h
g_canvas.h /usr/include/string.h
\
/usr/include/xlocale.h g_all_guis.h
g_graph.o
:
g_graph.c /usr/include/stdlib.h /usr/include/features.h
\
/usr/include/bits/predefs.h /usr/include/sys/cdefs.h
\
/usr/include/bits/wordsize.h /usr/include/gnu/stubs.h
\
...
...
@@ -264,8 +264,8 @@ g_editor.o: g_editor.c /usr/include/stdlib.h /usr/include/features.h \
/usr/include/_G_config.h /usr/include/wchar.h
\
/usr/lib/gcc/i486-linux-gnu/4.4.1/include/stdarg.h
\
/usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h m_pd.h
\
m_imp.h s_stuff.h g_canvas.h /usr/include/string.h
\
/usr/include/xlocale.h
g_magicglass.h
m_imp.h s_stuff.h
g_magicglass.h
g_canvas.h /usr/include/string.h
\
/usr/include/xlocale.h
g_all_guis.o
:
g_all_guis.c config.h /usr/include/stdlib.h
\
/usr/include/features.h /usr/include/bits/predefs.h
\
/usr/include/sys/cdefs.h /usr/include/bits/wordsize.h
\
...
...
@@ -493,7 +493,8 @@ g_magicglass.o: g_magicglass.c m_pd.h \
/usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h
\
/usr/lib/gcc/i486-linux-gnu/4.4.1/include/stdarg.h
\