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
Aayush
purr-data
Commits
64224ba2
Commit
64224ba2
authored
Dec 15, 2018
by
Jonathan Wilkes
Browse files
Merge branch 'port-knob-squashed'
parents
eab10ab4
fc9ee8af
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
externals/Makefile
View file @
64224ba2
...
...
@@ -134,11 +134,9 @@ ifeq ($(LIGHT),yes)
lib_targets
=
loaders-libdir pddp
INCREMENTAL
=
yes
else
lib_targets
=
adaptive arraysize autotune bassemu boids bsaylor comport creb cxc cyclone disis earplug ekext ext13 fftease fluid freeverb ggee hcs iem_ambi iem_bin_ambi iemlib iemgui iemguts iem_adaptfilt iemmatrix iemxmlrpc iem_delay iem_roomsim iem_spec2 iem_tab jasch_lib loaders-libdir lyonpotpourri mapping markex maxlib mjlib moocow moonlib motex mrpeach oscx pan pdcontainer pddp pdlua pdogg plugin pmpd rjlib sigpack smlib tof unauthorized vbap windowing zexy
lib_targets
=
adaptive arraysize autotune bassemu boids bsaylor comport creb cxc cyclone disis earplug ekext ext13 fftease
flatgui
fluid freeverb ggee hcs iem_ambi iem_bin_ambi iemlib iemgui iemguts iem_adaptfilt iemmatrix iemxmlrpc iem_delay iem_roomsim iem_spec2 iem_tab jasch_lib loaders-libdir lyonpotpourri mapping markex maxlib mjlib moocow moonlib motex mrpeach oscx pan pdcontainer pddp pdlua pdogg plugin pmpd rjlib sigpack smlib tof unauthorized vbap windowing zexy
endif
# DISABLED: flatgui
# NEW (IN-PROGRESS): flext
# this is for libraries that don't compile (yet) on all platforms
...
...
@@ -538,16 +536,21 @@ fftease_clean:
#------------------------------------------------------------------------------#
# FLATGUI
#
# Right now we're just building footils/knob and throwing it in the flatgui
# external directory for compatibility
#
flatgui
:
make
-C
$(externals_src)
/flatgui
CFLAGS
=
"
$(CFLAGS)
"
\
PD_PATH
=
$(pd_src)
PD_INCLUDE
=
$(pd_src)
/src
make
-C
$(externals_src)
/footils/knob
CFLAGS
=
"
$(CFLAGS)
"
\
PD_PATH
=
$(pd_src)
pdbinpath
=
$(pd_src)
/src
\
PD_INCLUDE
=
$(pd_src)
/src
flatgui_install
:
make
-C
$(externals_src)
/f
latgui
STRIP
=
"
$(STRIP)
"
\
make
-C
$(externals_src)
/f
ootils/knob
STRIP
=
"
$(STRIP)
"
\
DESTDIR
=
"
$(DESTDIR)
"
objectsdir
=
"
$(objectsdir)
"
install
flatgui_clean
:
make
-C
$(externals_src)
/f
latgui
clean
make
-C
$(externals_src)
/f
ootils/knob
clean
#------------------------------------------------------------------------------#
# FLEXT and FLEXT externals
...
...
externals/footils/knob/Makefile.pdlibbuilder.revised
0 → 100644
View file @
64224ba2
This diff is collapsed.
Click to expand it.
externals/footils/knob/knob.c
View file @
64224ba2
This diff is collapsed.
Click to expand it.
externals/footils/knob/makefile
View file @
64224ba2
NAME
=
knob
CSYM
=
knob
# !!!
# change these two
PD_DIR
=
../../../pd
#current: pd_nt pd_linux
current
:
pd_linux
# ----------------------- NT -----------------------
pd_nt
:
$(NAME).dll
.SUFFIXES
:
.dll
PDNTCFLAGS
=
/W3 /WX /O2 /G6 /DNT /DPD /nologo
# where is VC++ ???
VC
=
"C:
\P
rogramme
\M
icrosoft Visual Studio
\V
C98"
# where is your m_pd.h ???
PDNTINCLUDE
=
/I. /Ic:
\p
d
\t
cl
\i
nclude /Ic:
\p
d
\s
rc /I
$(VC)
\i
nclude /Iinclude
PDNTLDIR
=
$(VC)
\L
ib
PDNTLIB
=
$(PDNTLDIR)
\l
ibc.lib
\
$(PDNTLDIR)\oldnames.lib
\
$(PDNTLDIR)\kernel32.lib
\
$(PDNTLDIR)\user32.lib
\
$(PDNTLDIR)\uuid.lib
\
$(PDNTLDIR)\ws2_32.lib
\
c
:
\p
d
\b
in
\p
d.lib
.c.dll
:
cl
$(PDNTCFLAGS)
$(PDNTINCLUDE)
/c
$*
.c
link
/dll /export:
$(CSYM)
_setup
$*
.obj
$(PDNTLIB)
# ----------------------- IRIX 5.x -----------------------
pd_irix5
:
$(NAME).pd_irix5
.SUFFIXES
:
.pd_irix5
SGICFLAGS5
=
-o32
-DPD
-DUNIX
-DIRIX
-O2
SGIINCLUDE
=
-I
../../src
.c.pd_irix5
:
cc
$(SGICFLAGS5)
$(SGIINCLUDE)
-o
$*
.o
-c
$*
.c
ld
-elf
-shared
-rdata_shared
-o
$*
.pd_irix5
$*
.o
rm
$*
.o
# ----------------------- IRIX 6.x -----------------------
pd_irix6
:
$(NAME).pd_irix6
.SUFFIXES
:
.pd_irix6
SGICFLAGS6
=
-n32
-DPD
-DUNIX
-DIRIX
-DN32
-woff
1080,1064,1185
\
-OPT
:
roundoff=3 -OPT:IEEE_arithmetic=3 -OPT:cray_ivdep=true
\
-
Ofast
=
ip32
.c.pd_irix6
:
cc
$(SGICFLAGS6)
$(SGIINCLUDE)
-o
$*
.o
-c
$*
.c
ld
-n32
-IPA
-shared
-rdata_shared
-o
$*
.pd_irix6
$*
.o
rm
$*
.o
# ----------------------- LINUX i386 -----------------------
pd_linux
:
$(NAME).pd_linux
.SUFFIXES
:
.pd_linux
LINUXCFLAGS
=
-DPD
-DUNIX
-O2
-funroll-loops
-fomit-frame-pointer
\
-Wall
-W
-Wshadow
-Wstrict-prototypes
-Werror
\
-Wno-unused
-Wno-parentheses
-Wno-switch
# where is your m_pd.h ???
LINUXINCLUDE
=
-I
../../src
-I
$(PD_DIR)
/src
.c.pd_linux
:
cc
-O2
-Wall
-DPD
-fPIC
$(LINUXINCLUDE)
-c
$*
.c
ld
--export-dynamic
-shared
-o
$*
.pd_linux
$*
.o
-lc
strip
$*
.pd_linux
# ----------------------------------------------------------
install
:
cp
help-
*
.pd ../../doc/5.reference
clean
:
rm
-f
*
.o
*
.pd_
*
so_locations
# Makefile for mylib
lib.name
=
flatgui
class.sources
=
knob.c
# ldlibs = -lfluidsynth
datafiles
=
knob-help.pd clock.pd README
externalsdir
=
../../
include
Makefile.pdlibbuilder.revised
externals/moonlib/mknob.c
View file @
64224ba2
...
...
@@ -744,7 +744,7 @@ static void *mknob_new(t_symbol *s, int argc, t_atom *argv)
x
->
x_thick
=
0
;
iemgui_verify_snd_ne_rcv
(
&
x
->
x_gui
);
outlet_new
(
&
x
->
x_gui
.
x_obj
,
&
s_float
);
x
->
x_gui
.
x_obj
.
te_iemgui
=
1
;
x
->
x_gui
.
x_obj
.
te_iemgui
=
1
;
x
->
x_gui
.
x_handle
=
scalehandle_new
((
t_object
*
)
x
,
x
->
x_gui
.
x_glist
,
1
,
mknob__clickhook
,
mknob__motionhook
);
...
...
pd/nw/pdgui.js
View file @
64224ba2
...
...
@@ -1995,7 +1995,12 @@ function add_gobj_to_svg(svg, gobj) {
var
gui
=
(
function
()
{
var
c
=
{};
// object to hold references to all our canvas closures
var
last_thing
;
// last thing we got
// We store the last "thing" we fetched from the window. This is either
// the window itself or a "gobj". Regular old DOM elements that aren't
// a "gobj" container don't count. This way we can do a "get_gobj" then
// gang multiple element queries after it that work within our last
// "gobj." (Same for window.)
var
last_thing
;
var
null_fn
,
null_canvas
;
var
create_canvas
=
function
(
cid
,
w
)
{
var
get
=
function
(
parent
,
sel
,
arg
,
suffix
)
{
...
...
@@ -4152,7 +4157,8 @@ function gui_grid_point(cid, tag, x, y) {
}
// mknob from moonlib
function
gui_mknob_new
(
cid
,
tag
,
x
,
y
,
is_toplevel
,
show_in
,
show_out
)
{
function
gui_mknob_new
(
cid
,
tag
,
x
,
y
,
is_toplevel
,
show_in
,
show_out
,
is_footils_knob
)
{
gui
(
cid
).
get_elem
(
"
patchsvg
"
,
function
(
svg_elem
)
{
gui_gobj_new
(
cid
,
tag
,
"
obj
"
,
x
,
y
,
is_toplevel
);
});
...
...
@@ -4162,50 +4168,89 @@ function gui_mknob_new(cid, tag, x, y, is_toplevel, show_in, show_out) {
class
:
"
border
"
// now we can inherit the css border styles
}),
circle
=
create_item
(
cid
,
"
circle
"
,
{
class
:
"
circle
"
//
class: "circle"
}),
line
=
create_item
(
cid
,
"
line
"
,
{
class
:
"
dial
"
//
class: "dial"
});
frag
.
appendChild
(
border
);
frag
.
appendChild
(
circle
);
/* An extra circle for footils/knob */
if
(
!!
is_footils_knob
)
{
frag
.
appendChild
(
create_item
(
cid
,
"
circle
"
,
{
class
:
"
dial_frag
"
}));
}
frag
.
appendChild
(
line
);
return
frag
;
});
}
function
gui_configure_mknob
(
cid
,
tag
,
size
,
bg_color
,
fg_color
)
{
gui
(
cid
).
get_gobj
(
tag
)
function
knob_dashes
(
d
,
len
)
{
var
c
=
d
*
3.14159
;
return
(
c
*
len
)
+
"
"
+
(
c
*
(
1
-
len
));
}
function
knob_offset
(
d
)
{
return
d
*
3.14
*
-
0.28
;
}
function
gui_configure_mknob
(
cid
,
tag
,
size
,
bg_color
,
fg_color
,
is_footils_knob
)
{
var
w
=
size
,
h
=
!!
is_footils_knob
?
size
+
5
:
size
;
var
g
=
gui
(
cid
).
get_gobj
(
tag
)
.
q
(
"
.border
"
,
{
d
:
[
"
M
"
,
0
,
0
,
size
,
0
,
"
M
"
,
0
,
size
,
size
,
size
,
"
M
"
,
0
,
0
,
0
,
size
,
"
M
"
,
size
,
0
,
size
,
size
d
:
[
"
M
"
,
0
,
0
,
w
,
0
,
"
M
"
,
0
,
h
,
w
,
h
,
"
M
"
,
0
,
0
,
0
,
h
,
"
M
"
,
w
,
0
,
w
,
h
].
join
(
"
"
),
fill
:
"
none
"
,
})
.
q
(
"
.
circle
"
,
{
.
q
(
"
circle
"
,
{
cx
:
size
/
2
,
cy
:
size
/
2
,
r
:
size
/
2
,
fill
:
bg_color
,
fill
:
!!
is_footils_knob
?
"
none
"
:
bg_color
,
stroke
:
"
black
"
,
"
stroke-width
"
:
1
"
stroke-width
"
:
!!
is_footils_knob
?
3
:
1
,
"
stroke-dasharray
"
:
!!
is_footils_knob
?
knob_dashes
(
size
,
0.94
)
:
"
none
"
,
"
stroke-dashoffset
"
:
!!
is_footils_knob
?
knob_offset
(
size
)
:
"
0
"
})
.
q
(
"
.dial
"
,
{
.
q
(
"
line
"
,
{
// indicator
"
stroke-width
"
:
2
,
stroke
:
fg_color
});
if
(
!!
is_footils_knob
)
{
g
.
q
(
"
.dial_frag
"
,
{
cx
:
size
/
2
,
cy
:
size
/
2
,
r
:
size
/
2
,
fill
:
"
none
"
,
stroke
:
bg_color
,
"
stroke-width
"
:
3
,
"
stroke-dasharray
"
:
knob_dashes
(
size
,
0.94
),
"
stroke-dashoffset
"
:
knob_offset
(
size
)
});
}
}
function
gui_turn_mknob
(
cid
,
tag
,
x1
,
y1
,
x2
,
y2
)
{
gui
(
cid
).
get_gobj
(
tag
)
.
q
(
"
.dial
"
,
{
function
gui_turn_mknob
(
cid
,
tag
,
x1
,
y1
,
x2
,
y2
,
is_footils_knob
,
val
)
{
var
g
=
gui
(
cid
).
get_gobj
(
tag
)
.
q
(
"
line
"
,
{
// indicator
x1
:
x1
,
y1
:
y1
,
x2
:
x2
,
y2
:
y2
});
if
(
!!
is_footils_knob
)
{
g
.
q
(
"
.dial_frag
"
,
{
"
stroke-dasharray
"
:
knob_dashes
(
x1
*
2
,
val
*
0.94
)
});
}
}
function
add_popup
(
cid
,
popup
)
{
...
...
pd/src/g_all_guis.c
View file @
64224ba2
...
...
@@ -513,7 +513,6 @@ void iemgui_displace_withtag(t_gobj *z, t_glist *glist, int dx, int dy)
canvas_fixlinesfor
(
glist_getcanvas
(
glist
),
(
t_text
*
)
z
);
}
void
iemgui_select
(
t_gobj
*
z
,
t_glist
*
glist
,
int
selected
)
{
t_iemgui
*
x
=
(
t_iemgui
*
)
z
;
...
...
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