nonlib: Remove sigc++ dependencey from OSC::Endpoint.
This also removes sigc++ as a dependency for mixer and timeline.
This commit is contained in:
parent
c21e7b1381
commit
da225ff64a
|
@ -21,7 +21,6 @@ require_command FLUID lib/fltk/fluid/fluid
|
||||||
require_package JACK 0.103.0 jack
|
require_package JACK 0.103.0 jack
|
||||||
require_package lrdf 0.4.0 lrdf
|
require_package lrdf 0.4.0 lrdf
|
||||||
require_package liblo 0.23 liblo
|
require_package liblo 0.23 liblo
|
||||||
require_package sigcpp 2.0.0 sigc++-2.0
|
|
||||||
suggest_package XPM 2.0.0 xpm
|
suggest_package XPM 2.0.0 xpm
|
||||||
|
|
||||||
test_version `version_of liblo` 0.26 || warn "Version $(version_of liblo) of liblo is slow to create servers. Consider upgrading to 0.26 or later"
|
test_version `version_of liblo` 0.26 || warn "Version $(version_of liblo) of liblo is slow to create servers. Consider upgrading to 0.26 or later"
|
||||||
|
|
|
@ -254,9 +254,9 @@ Module::Port::generate_osc_path ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Module::Port::handle_signal_connection_state_changed ( OSC::Signal * )
|
Module::Port::handle_signal_connection_state_changed ( OSC::Signal *, void *o )
|
||||||
{
|
{
|
||||||
module()->redraw();
|
((Module::Port*)o)->module()->redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -286,8 +286,8 @@ Module::Port::change_osc_path ( char *path )
|
||||||
0.0, 1.0, scaled_default,
|
0.0, 1.0, scaled_default,
|
||||||
&Module::Port::osc_control_change_cv, this );
|
&Module::Port::osc_control_change_cv, this );
|
||||||
|
|
||||||
_scaled_signal->signal_connection_state_changed.connect(
|
|
||||||
sigc::mem_fun( this, &Module::Port::handle_signal_connection_state_changed ) );
|
_scaled_signal->connection_state_callback( handle_signal_connection_state_changed, this );
|
||||||
|
|
||||||
_unscaled_signal = mixer->osc_endpoint->add_signal( unscaled_path,
|
_unscaled_signal = mixer->osc_endpoint->add_signal( unscaled_path,
|
||||||
OSC::Signal::Input,
|
OSC::Signal::Input,
|
||||||
|
|
|
@ -259,7 +259,7 @@ public:
|
||||||
OSC::Signal *_scaled_signal;
|
OSC::Signal *_scaled_signal;
|
||||||
OSC::Signal *_unscaled_signal;
|
OSC::Signal *_unscaled_signal;
|
||||||
|
|
||||||
void handle_signal_connection_state_changed ( OSC::Signal *s );
|
static void handle_signal_connection_state_changed ( OSC::Signal *, void *o );
|
||||||
};
|
};
|
||||||
|
|
||||||
void bbox ( int &X, int &Y, int &W, int &H )
|
void bbox ( int &X, int &Y, int &W, int &H )
|
||||||
|
|
|
@ -306,7 +306,7 @@ namespace OSC
|
||||||
|
|
||||||
DMESSAGE( "Peer %s has disconnected from signal %s", p->name, ps->path() );
|
DMESSAGE( "Peer %s has disconnected from signal %s", p->name, ps->path() );
|
||||||
|
|
||||||
s->signal_connection_state_changed( s );
|
s->_connection_state_callback( s, s->_connection_state_userdata );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -358,7 +358,7 @@ namespace OSC
|
||||||
/* make a record of it ourselves */
|
/* make a record of it ourselves */
|
||||||
ps->_outgoing.push_back( s );
|
ps->_outgoing.push_back( s );
|
||||||
|
|
||||||
s->signal_connection_state_changed( s );
|
s->_connection_state_callback( s, s->_connection_state_userdata );
|
||||||
|
|
||||||
/* return 0; */
|
/* return 0; */
|
||||||
/* } */
|
/* } */
|
||||||
|
@ -872,7 +872,7 @@ namespace OSC
|
||||||
p->_scanning = false;
|
p->_scanning = false;
|
||||||
DMESSAGE( "Done scanning %s", p->name );
|
DMESSAGE( "Done scanning %s", p->name );
|
||||||
|
|
||||||
ep->signal_peer_scan_complete();
|
ep->_peer_scan_complete_callback(ep->_peer_scan_complete_userdata);
|
||||||
}
|
}
|
||||||
else if ( argc == 7 && p->_scanning )
|
else if ( argc == 7 && p->_scanning )
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,8 +25,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <sigc++/sigc++.h>
|
|
||||||
|
|
||||||
namespace OSC
|
namespace OSC
|
||||||
{
|
{
|
||||||
class OSC_Value
|
class OSC_Value
|
||||||
|
@ -163,6 +161,9 @@ namespace OSC
|
||||||
void *_user_data;
|
void *_user_data;
|
||||||
Parameter_Limits _parameter_limits;
|
Parameter_Limits _parameter_limits;
|
||||||
|
|
||||||
|
void (*_connection_state_callback)(OSC::Signal *, void*);
|
||||||
|
void *_connection_state_userdata;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Signal ( const char *path, Direction dir )
|
Signal ( const char *path, Direction dir )
|
||||||
|
@ -175,7 +176,11 @@ namespace OSC
|
||||||
_peer = NULL;
|
_peer = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
sigc::signal <void,Signal*> signal_connection_state_changed;
|
void connection_state_callback ( void(*_cb)(OSC::Signal *, void*), void *userdata)
|
||||||
|
{
|
||||||
|
_connection_state_callback = _cb;
|
||||||
|
_connection_state_userdata = userdata;
|
||||||
|
}
|
||||||
|
|
||||||
~Signal ( );
|
~Signal ( );
|
||||||
|
|
||||||
|
@ -278,6 +283,9 @@ namespace OSC
|
||||||
void del_signal ( Signal *signal );
|
void del_signal ( Signal *signal );
|
||||||
void send_signal_rename_notifications( Signal *s );
|
void send_signal_rename_notifications( Signal *s );
|
||||||
|
|
||||||
|
void (*_peer_scan_complete_callback)(void*);
|
||||||
|
void *_peer_scan_complete_userdata;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void list_peer_signals ( void (*callback) (const char *, const OSC::Signal *, void * ), void *v );
|
void list_peer_signals ( void (*callback) (const char *, const OSC::Signal *, void * ), void *v );
|
||||||
|
@ -355,7 +363,12 @@ namespace OSC
|
||||||
// can be used to point back to owning object.
|
// can be used to point back to owning object.
|
||||||
void *owner;
|
void *owner;
|
||||||
|
|
||||||
sigc::signal <void> signal_peer_scan_complete;
|
void peer_scan_complete_callback ( void(*_cb)(void*), void *userdata)
|
||||||
|
{
|
||||||
|
_peer_scan_complete_callback = _cb;
|
||||||
|
_peer_scan_complete_userdata = userdata;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
friend Signal::~Signal();
|
friend Signal::~Signal();
|
||||||
friend void Signal::rename ( const char *name );
|
friend void Signal::rename ( const char *name );
|
||||||
|
|
|
@ -17,7 +17,6 @@ require_command ar ar
|
||||||
require_command makedepend makedepend
|
require_command makedepend makedepend
|
||||||
require_package JACK 0.103.0 jack
|
require_package JACK 0.103.0 jack
|
||||||
require_package liblo 0.23 liblo
|
require_package liblo 0.23 liblo
|
||||||
require_package sigcpp 2.0.0 sigc++-2.0
|
|
||||||
|
|
||||||
test_version `version_of liblo` 0.26 || warn "Version $(version_of liblo) of liblo is slow to create servers. Consider upgrading to 0.26 or later"
|
test_version `version_of liblo` 0.26 || warn "Version $(version_of liblo) of liblo is slow to create servers. Consider upgrading to 0.26 or later"
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ require_command FLUID lib/fltk/fluid/fluid
|
||||||
require_package JACK 0.103.0 jack
|
require_package JACK 0.103.0 jack
|
||||||
require_package sndfile 1.0.17 sndfile
|
require_package sndfile 1.0.17 sndfile
|
||||||
require_package liblo 0.23 liblo
|
require_package liblo 0.23 liblo
|
||||||
require_package sigcpp 2.0.0 sigc++-2.0
|
|
||||||
suggest_package XPM 2.0.0 xpm
|
suggest_package XPM 2.0.0 xpm
|
||||||
|
|
||||||
if ! hostname_resolvable
|
if ! hostname_resolvable
|
||||||
|
|
|
@ -1620,7 +1620,7 @@ Timeline::init_osc ( const char *osc_port )
|
||||||
/* poll so we can keep OSC handlers running in the GUI thread and avoid extra sync */
|
/* poll so we can keep OSC handlers running in the GUI thread and avoid extra sync */
|
||||||
Fl::add_timeout( OSC_INTERVAL, &Timeline::check_osc, this );
|
Fl::add_timeout( OSC_INTERVAL, &Timeline::check_osc, this );
|
||||||
|
|
||||||
osc->signal_peer_scan_complete.connect( sigc::mem_fun( this, &Timeline::connect_osc ) );
|
osc->peer_scan_complete_callback( &Timeline::handle_peer_scan_complete, this );
|
||||||
|
|
||||||
if ( ! osc_thread )
|
if ( ! osc_thread )
|
||||||
{
|
{
|
||||||
|
@ -1676,6 +1676,12 @@ Timeline::reply_to_finger ( lo_message msg )
|
||||||
lo_address_free( reply );
|
lo_address_free( reply );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Timeline::handle_peer_scan_complete ( void *o )
|
||||||
|
{
|
||||||
|
((Timeline*)o)->connect_osc();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Timeline::connect_osc ( void )
|
Timeline::connect_osc ( void )
|
||||||
{
|
{
|
||||||
|
|
|
@ -122,6 +122,8 @@ class Timeline : public Fl_Single_Window, public RWLock
|
||||||
|
|
||||||
std::list <const Sequence_Widget*> _tempomap;
|
std::list <const Sequence_Widget*> _tempomap;
|
||||||
|
|
||||||
|
static void handle_peer_scan_complete ( void * v );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
OSC::Endpoint *osc;
|
OSC::Endpoint *osc;
|
||||||
|
|
Loading…
Reference in New Issue