Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ishan Kumar Kaler
purr-data
Commits
9316925f
Commit
9316925f
authored
Apr 14, 2021
by
Jonathan Wilkes
Browse files
Merge branch 'aggraef/purr-data-pddplink-symbol-input'
parents
dbef0fe7
8c21dc9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
externals/pddp/pddplink-help.pd
View file @
9316925f
#N canvas 319 94 424 39
7
12;
#N canvas 319 94 424
5
39 12;
#X text 20 10 first entry;
#X text 50 50 three ways of linking to a;
#X text 50 170 three ways of linking to a;
...
...
@@ -21,6 +21,16 @@
#X obj 50 99 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X text 71 96 <-- bang to open the link;
#X text 50 410 purr-data only: pass the file name or URL as a symbol
to inlet #1 (a dummy filename argument is still needed), f 47;
#X msg 50 470 symbol http://puredata.info;
#X obj 250 450 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 250 470 symbol README.txt;
#X obj 50 499 pddplink dummy -box;
#X connect 13 0 8 0;
#X connect 15 0 4 0;
#X connect 17 0 12 0;
#X connect 20 0 23 0;
#X connect 21 0 22 0;
#X connect 22 0 23 0;
externals/pddp/pddplink.c
View file @
9316925f
...
...
@@ -221,13 +221,22 @@ static t_pd *pddplink_pdtarget(t_pddplink *x)
return
((
t_pd
*
)
x
);
/* internal error */
}
static
void
pddplink_
anything
(
t_pddplink
*
x
,
t_symbol
*
s
,
int
ac
,
t_atom
*
av
)
static
void
pddplink_
symbol
(
t_pddplink
*
x
,
t_symbol
*
s
)
{
if
(
x
->
x_ishit
)
{
startpost
(
"pddplink: internal error (%s"
,
(
s
?
s
->
s_name
:
""
));
postatom
(
ac
,
av
);
post
(
")"
);
post
(
"pddplink: internal error (%s)"
,
(
s
?
s
->
s_name
:
""
));
}
else
{
if
(
s
==
&
s_
)
return
;
// nothing to see here, move along...
x
->
x_ishit
=
1
;
char
final_name
[
FILENAME_MAX
];
sys_expandpathelems
(
s
->
s_name
,
final_name
);
gui_vmess
(
"gui_pddplink_open"
,
"ss"
,
final_name
,
x
->
x_dirsym
->
s_name
);
x
->
x_ishit
=
0
;
}
}
...
...
@@ -400,9 +409,7 @@ static void *pddplink_new(t_symbol *s, int ac, t_atom *av)
SETSYMBOL
(
&
x
->
x_openargs
[
0
],
x
->
x_ulink
);
SETSYMBOL
(
&
x
->
x_openargs
[
1
],
x
->
x_dirsym
);
x
->
x_ishit
=
0
;
if
(
x
->
x_isboxed
)
outlet_new
((
t_object
*
)
x
,
&
s_anything
);
else
if
(
!
x
->
x_isboxed
)
{
/* do we need to set ((t_text *)x)->te_type = T_TEXT; ? */
if
(
!
x
->
x_vistext
)
...
...
@@ -426,14 +433,14 @@ void pddplink_setup(void)
sizeof
(
t_pddplink
),
CLASS_NOINLET
|
CLASS_PATCHABLE
,
A_GIMME
,
0
);
class_add
anything
(
pddplink_class
,
pddplink_
anything
);
class_add
symbol
(
pddplink_class
,
pddplink_
symbol
);
class_setwidget
(
pddplink_class
,
&
pddplink_widgetbehavior
);
pddplinkbox_class
=
class_new
(
gensym
(
"pddplink"
),
0
,
(
t_method
)
pddplink_free
,
sizeof
(
t_pddplink
),
0
,
A_GIMME
,
0
);
class_addbang
(
pddplinkbox_class
,
pddplink_bang
);
class_add
anything
(
pddplinkbox_class
,
pddplink_
anything
);
class_add
symbol
(
pddplinkbox_class
,
pddplink_
symbol
);
class_addmethod
(
pddplinkbox_class
,
(
t_method
)
pddplink_click
,
gensym
(
"click"
),
A_FLOAT
,
A_FLOAT
,
A_FLOAT
,
A_FLOAT
,
A_FLOAT
,
0
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment