Shuttle Surface: request_factory and MSVC compatible struct
This commit is contained in:
parent
3546a7291b
commit
d28dc9ee08
@ -93,6 +93,17 @@ ContourDesignControlProtocol::probe ()
|
||||
return true;
|
||||
}
|
||||
|
||||
void*
|
||||
ContourDesignControlProtocol::request_factory (uint32_t num_requests)
|
||||
{
|
||||
/* AbstractUI<T>::request_buffer_factory() is a template method only
|
||||
* instantiated in this source module. To provide something visible for
|
||||
* use in the interface/descriptor, we have this static method that is
|
||||
* template-free.
|
||||
*/
|
||||
return request_buffer_factory (num_requests);
|
||||
}
|
||||
|
||||
int
|
||||
ContourDesignControlProtocol::set_active (bool yn)
|
||||
{
|
||||
|
@ -78,6 +78,7 @@ public:
|
||||
DeviceType device_type() const { return _device_type; }
|
||||
|
||||
static bool probe ();
|
||||
static void* request_factory (uint32_t);
|
||||
|
||||
int set_active (bool yn);
|
||||
|
||||
|
@ -50,16 +50,23 @@ probe_contourdesign_protocol (ControlProtocolDescriptor*)
|
||||
return ContourDesignControlProtocol::probe ();
|
||||
}
|
||||
|
||||
static void*
|
||||
contourdesign_request_buffer_factory (uint32_t num_requests)
|
||||
{
|
||||
return ContourDesignControlProtocol::request_factory (num_requests);
|
||||
}
|
||||
|
||||
static ControlProtocolDescriptor contourdesign_descriptor = {
|
||||
name : "ContourDesign",
|
||||
id : "uri://ardour.org/surfaces/contourdesign:0",
|
||||
ptr : 0,
|
||||
module : 0,
|
||||
mandatory : 0,
|
||||
supports_feedback : false,
|
||||
probe : probe_contourdesign_protocol,
|
||||
initialize : new_contourdesign_protocol,
|
||||
destroy : delete_contourdesign_protocol
|
||||
/* name : */ "ContourDesign",
|
||||
/* id : */ "uri://ardour.org/surfaces/contourdesign:0",
|
||||
/* ptr : */ 0,
|
||||
/* module : */ 0,
|
||||
/* mandatory : */ 0,
|
||||
/* supports_feedback : */ false,
|
||||
/* probe : */ probe_contourdesign_protocol,
|
||||
/* initialize : */ new_contourdesign_protocol,
|
||||
/* destroy : */ delete_contourdesign_protocol,
|
||||
/* request_buffer_factory : */ contourdesign_request_buffer_factory
|
||||
};
|
||||
|
||||
extern "C" ARDOURSURFACE_API ControlProtocolDescriptor* protocol_descriptor () { return &contourdesign_descriptor; }
|
||||
|
Loading…
Reference in New Issue
Block a user