nonlib: Remove sigc++ dependencey from OSC::Endpoint.

This also removes sigc++ as a dependency for mixer and timeline.
This commit is contained in:
Jonathan Moore Liles 2012-04-16 21:05:34 -07:00
parent c21e7b1381
commit da225ff64a
9 changed files with 34 additions and 16 deletions

1
mixer/configure vendored
View File

@ -21,7 +21,6 @@ require_command FLUID lib/fltk/fluid/fluid
require_package JACK 0.103.0 jack
require_package lrdf 0.4.0 lrdf
require_package liblo 0.23 liblo
require_package sigcpp 2.0.0 sigc++-2.0
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"

View File

@ -254,9 +254,9 @@ Module::Port::generate_osc_path ()
}
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
@ -286,8 +286,8 @@ Module::Port::change_osc_path ( char *path )
0.0, 1.0, scaled_default,
&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,
OSC::Signal::Input,

View File

@ -259,7 +259,7 @@ public:
OSC::Signal *_scaled_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 )

View File

@ -306,7 +306,7 @@ namespace OSC
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;
}
@ -358,7 +358,7 @@ namespace OSC
/* make a record of it ourselves */
ps->_outgoing.push_back( s );
s->signal_connection_state_changed( s );
s->_connection_state_callback( s, s->_connection_state_userdata );
/* return 0; */
/* } */
@ -872,7 +872,7 @@ namespace OSC
p->_scanning = false;
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 )
{

View File

@ -25,8 +25,6 @@
#include <stdlib.h>
#include <string.h>
#include <sigc++/sigc++.h>
namespace OSC
{
class OSC_Value
@ -163,6 +161,9 @@ namespace OSC
void *_user_data;
Parameter_Limits _parameter_limits;
void (*_connection_state_callback)(OSC::Signal *, void*);
void *_connection_state_userdata;
public:
Signal ( const char *path, Direction dir )
@ -175,7 +176,11 @@ namespace OSC
_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 ( );
@ -278,6 +283,9 @@ namespace OSC
void del_signal ( Signal *signal );
void send_signal_rename_notifications( Signal *s );
void (*_peer_scan_complete_callback)(void*);
void *_peer_scan_complete_userdata;
public:
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.
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 void Signal::rename ( const char *name );

1
nonlib/configure vendored
View File

@ -17,7 +17,6 @@ require_command ar ar
require_command makedepend makedepend
require_package JACK 0.103.0 jack
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"

1
timeline/configure vendored
View File

@ -28,7 +28,6 @@ require_command FLUID lib/fltk/fluid/fluid
require_package JACK 0.103.0 jack
require_package sndfile 1.0.17 sndfile
require_package liblo 0.23 liblo
require_package sigcpp 2.0.0 sigc++-2.0
suggest_package XPM 2.0.0 xpm
if ! hostname_resolvable

View File

@ -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 */
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 )
{
@ -1676,6 +1676,12 @@ Timeline::reply_to_finger ( lo_message msg )
lo_address_free( reply );
}
void
Timeline::handle_peer_scan_complete ( void *o )
{
((Timeline*)o)->connect_osc();
}
void
Timeline::connect_osc ( void )
{

View File

@ -122,6 +122,8 @@ class Timeline : public Fl_Single_Window, public RWLock
std::list <const Sequence_Widget*> _tempomap;
static void handle_peer_scan_complete ( void * v );
public:
OSC::Endpoint *osc;