Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
purr-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Srashti Mittal
purr-data
Commits
9316925f
Commit
9316925f
authored
3 years ago
by
Jonathan Wilkes
Browse files
Options
Downloads
Plain Diff
Merge branch 'aggraef/purr-data-pddplink-symbol-input'
parents
dbef0fe7
8c21dc9a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
externals/pddp/pddplink-help.pd
+11
-1
11 additions, 1 deletion
externals/pddp/pddplink-help.pd
externals/pddp/pddplink.c
+16
-9
16 additions, 9 deletions
externals/pddp/pddplink.c
with
27 additions
and
10 deletions
externals/pddp/pddplink-help.pd
+
11
−
1
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;
This diff is collapsed.
Click to expand it.
externals/pddp/pddplink.c
+
16
−
9
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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment