[beast: 16/26] BSE: migrate enum ProjectState and signal state_changed into bseapi.idl
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 16/26] BSE: migrate enum ProjectState and signal state_changed into bseapi.idl
- Date: Fri, 14 Oct 2016 15:49:20 +0000 (UTC)
commit edf1fd1727addce932d43cf648af664b81a63400
Author: Tim Janik <timj gnu org>
Date: Tue May 31 12:58:05 2016 +0200
BSE: migrate enum ProjectState and signal state_changed into bseapi.idl
Signed-off-by: Tim Janik <timj gnu org>
beast-gtk/bstapp.cc | 7 ++++-
beast-gtk/bstapp.hh | 1 +
beast-gtk/bstprojectctrl.cc | 25 ++++++++-------
beast-gtk/bstprojectctrl.hh | 1 +
bse/bseapi.idl | 69 ++++++++++++++++++++++++------------------
bse/bseproject.cc | 61 +++++++++++++++++++------------------
bse/bseproject.hh | 58 ++++++++++++++++--------------------
bse/bseproject.proc | 24 ---------------
8 files changed, 117 insertions(+), 129 deletions(-)
---
diff --git a/beast-gtk/bstapp.cc b/beast-gtk/bstapp.cc
index aaf0010..b3ed95a 100644
--- a/beast-gtk/bstapp.cc
+++ b/beast-gtk/bstapp.cc
@@ -355,6 +355,8 @@ bst_app_finalize (GObject *object)
if (self->project)
{
+ self->project.sig_state_changed() -= self->sig_state_changed_id;
+ self->sig_state_changed_id = 0;
bse_proxy_disconnect (self->project.proxy_id(),
"any_signal", bst_app_reload_pages, self,
"any_signal", gxk_widget_update_actions, self,
@@ -382,10 +384,13 @@ bst_app_new (Bse::ProjectH project)
gxk_dialog_set_sizes (GXK_DIALOG (self), 500, 400, 950, 800);
self->project = project;
+ self->sig_state_changed_id = self->project.sig_state_changed() += [self] (Bse::ProjectState state) {
+ gxk_widget_update_actions (self);
+ };
+
bse_proxy_connect (self->project.proxy_id(),
"swapped_signal::item-added", bst_app_reload_pages, self,
"swapped_signal::item-remove", bst_app_reload_pages, self,
- "swapped_signal::state-changed", gxk_widget_update_actions, self,
"swapped_signal::property-notify::dirty", gxk_widget_update_actions, self,
NULL);
bst_window_sync_title_to_proxy (GXK_DIALOG (self), self->project.proxy_id(), "%s");
diff --git a/beast-gtk/bstapp.hh b/beast-gtk/bstapp.hh
index c62066d..4c0a2a9 100644
--- a/beast-gtk/bstapp.hh
+++ b/beast-gtk/bstapp.hh
@@ -26,6 +26,7 @@ struct _BstApp
GxkDialog window;
Bse::ProjectH project;
+ size_t sig_state_changed_id;
guint select_unseen_super : 1;
diff --git a/beast-gtk/bstprojectctrl.cc b/beast-gtk/bstprojectctrl.cc
index e5341cb..00bcd0e 100644
--- a/beast-gtk/bstprojectctrl.cc
+++ b/beast-gtk/bstprojectctrl.cc
@@ -46,18 +46,15 @@ bst_project_ctrl_finalize (GObject *object)
}
static void
-project_state_changed (BstProjectCtrl *self,
- SfiChoice choice)
+project_state_changed (BstProjectCtrl *self, Bse::ProjectState state)
{
- BseProjectState state = bse_project_state_from_choice (choice);
-
if (self->led)
switch (state)
{
- case BSE_PROJECT_ACTIVE:
+ case Bse::ProjectState::ACTIVE:
gxk_led_set_color (self->led, GXK_LED_BLUE);
break;
- case BSE_PROJECT_PLAYING:
+ case Bse::ProjectState::PLAYING:
gxk_led_set_color (self->led, GXK_LED_GREEN);
break;
default:
@@ -78,18 +75,21 @@ bst_project_ctrl_set_project (BstProjectCtrl *self, Bse::ProjectH project)
assert_return (BST_IS_PROJECT_CTRL (self));
if (self->project)
- bse_proxy_disconnect (self->project.proxy_id(),
- "any_signal", project_state_changed, self,
- "any_signal::release", project_release, self,
- NULL);
+ {
+ bse_proxy_disconnect (self->project.proxy_id(),
+ "any_signal::release", project_release, self,
+ NULL);
+ self->project.sig_state_changed() -= self->sig_state_changed_id;
+ self->sig_state_changed_id = 0;
+ }
self->project = project;
if (self->project)
{
bse_proxy_connect (self->project.proxy_id(),
- "swapped_signal::state-changed", project_state_changed, self,
"swapped_signal::release", project_release, self,
NULL);
- project_state_changed (self, bse_project_state_to_choice (bse_project_get_state
(self->project.proxy_id())));
+ self->sig_state_changed_id = self->project.sig_state_changed() += [self] (Bse::ProjectState state) {
project_state_changed (self, state); };
+ project_state_changed (self, self->project.get_state());
}
else if (self->led)
gxk_led_set_color (self->led, GXK_LED_OFF);
@@ -99,6 +99,7 @@ static void
bst_project_ctrl_init (BstProjectCtrl *self)
{
new (&self->project) Bse::ProjectH();
+ self->sig_state_changed_id = 0;
GtkWidget *box = GTK_WIDGET (self);
GtkWidget *frame;
guint spaceing = 0;
diff --git a/beast-gtk/bstprojectctrl.hh b/beast-gtk/bstprojectctrl.hh
index d44834d..381db2d 100644
--- a/beast-gtk/bstprojectctrl.hh
+++ b/beast-gtk/bstprojectctrl.hh
@@ -19,6 +19,7 @@ G_BEGIN_DECLS
typedef struct {
GtkHBox parent_instance;
Bse::ProjectH project;
+ size_t sig_state_changed_id;
GxkLed *led;
GtkWidget *stop;
GtkWidget *rew;
diff --git a/bse/bseapi.idl b/bse/bseapi.idl
index ded23ac..47a2cbf 100644
--- a/bse/bseapi.idl
+++ b/bse/bseapi.idl
@@ -815,31 +815,48 @@ interface MidiNotifier : Item {
interface MidiSynth : SNet {
};
+/// Enumeration describing the current activation and playback state of a project.
+enum ProjectState {
+ INACTIVE, ///< The project is not yet hooked to the sound engine.
+ ACTIVE, ///< The sound engine is activated (rnuning) for this project.
+ PLAYING ///< The project is active and the sequencer is running.
+};
+
/// Projects support loading, saving, playback and act as containers for all other sound objects.
interface Project : Container {
- void change_name (String name); ///< Change a project name without recording undo steps.
- Error play(); ///< Activate a project and start project playback (an already playing project is first
halted).
- Error activate(); ///< Activate a project, precondition to start playback.
- //ProjectState get_state(); ///< Retrieve the current project activation/playback state.
- bool can_play(); ///< Check whether project playback would makes sense.
- bool is_playing(); ///< Check whether a project is currently playing (song sequencing).
- bool is_active (); ///< Check whether a project is active (currently synthesizing).
- void start_playback(); ///< Start playback in an activated project.
- void stop_playback(); ///< Stop project playback.
- void deactivate(); ///< Deactivate the project, automatically stop playback.
- void stop(); ///< Stop project playback and deactivate project.
- void auto_deactivate (int32 msec_delay); ///< Automatically deactivate a few milliseconds after playback
stopped.
- int32 undo_depth(); ///< Check whether a project can perform undo steps.
- void undo(); ///< Undo a previous operation in a project.
- int32 redo_depth(); ///< Get the number of times redo can be called on the project.
- void redo(); ///< Redo a previously undone operation in a project.
- void clear_undo(); ///< Delete all recorded undo or redo steps.
- void clean_dirty(); ///< Clear a project's dirty flags.
- bool is_dirty(); ///< Check whether a project needs saving.
+ signal void state_changed (ProjectState newstate); ///< Signal notifies of project state changes.
+ ProjectState get_state (); ///< Retrieve the current project activation/playback state.
+ void change_name (String name); ///< Change a project name without recording undo steps.
+ Error play (); ///< Activate a project and start project playback (an already
playing project is first halted).
+ Error activate (); ///< Activate a project, precondition to start playback.
+ bool can_play (); ///< Check whether project playback would makes sense.
+ bool is_playing (); ///< Check whether a project is currently playing (song sequencing).
+ bool is_active (); ///< Check whether a project is active (currently synthesizing).
+ void start_playback (); ///< Start playback in an activated project.
+ void stop_playback (); ///< Stop project playback.
+ void deactivate (); ///< Deactivate the project, automatically stop playback.
+ void stop (); ///< Stop project playback and deactivate project.
+ void auto_deactivate (int32 msec_delay); ///< Automatically deactivate a few milliseconds
after playback stopped.
+ int32 undo_depth (); ///< Check whether a project can perform undo steps.
+ void undo (); ///< Undo a previous operation in a project.
+ int32 redo_depth (); ///< Get the number of times redo can be called on the project.
+ void redo (); ///< Redo a previously undone operation in a project.
+ void clear_undo (); ///< Delete all recorded undo or redo steps.
+ void clean_dirty (); ///< Clear a project's dirty flags.
+ bool is_dirty (); ///< Check whether a project needs saving.
+ //ItemSeq get_supers (); ///< Retrieve all Super type objects of this project.
+ //Error store_bse (Super super, String file_name, bool self_contained);
+ //Song create_song (String name); ///< Create a song for this project.
+ //WaveRepo get_wave_repo (); ///< Retrieve the project's unique wave repository.
+ //CSynth create_csynth (String name); ///< Create a synthsizer network for this project.
+ //MidiSynth create_midi_synth (String name); ///< Create a MIDI synthesizer network for this project.
+ //MidiNotifier get_midi_notifier (); ///< Retrieve the project's midi notifier object.
+ //void remove_snet (SNet snet); ///< Remove an existing synthesizer network from this
project.
+ Error restore_from_file (String file_name); ///< Load a project from file.
/// Inject a MIDI control event into the project's MIDI receiver.
- void inject_midi_control (int32 midi_channel, int32 midi_control, float64 control_value);
+ void inject_midi_control (int32 midi_channel, int32 midi_control, float64 control_value);
+ Error import_midi_file (String file_name); ///< Import a song from a MIDI file.
//Item find_item (String uname_path); ///< Find an item within a project, given its uname path.
- //ItemSeq get_supers(); ///< Retrieve all Super type objects of this project.
/// List uname paths for all items of a specified type within a project.
/// By their uname paths, items are uniquely identifyable within a project.
//StringSeq list_uname_paths (String item_type);
@@ -850,15 +867,7 @@ interface Project : Container {
/// The references to other objects (e.g. samples) can be stored
/// by reference (self_contained=false) or embedded in the output
/// file (self_contained=true).
- //Error store_bse (Super super, String file_name, bool self_contained);
- Error import_midi_file (String file_name); ///< Import a song from a MIDI file.
- Error restore_from_file (String file_name); ///< Load a project from file.
- //Song create_song (String name); ///< Create a song for this project.
- //WaveRepo get_wave_repo (); ///< Retrieve the project's unique wave repository.
- //CSynth create_csynth (String name); ///< Create a synthsizer network for this project.
- //MidiSynth create_midi_synth (String name); ///< Create a MIDI synthesizer network for this project.
- //MidiNotifier get_midi_notifier(); ///< Retrieve the project's midi notifier object.
- //void remove_snet (SNet snet); ///< Remove an existing synthesizer network from this project.
+
};
/// Interface for writing PCM wave data.
diff --git a/bse/bseproject.cc b/bse/bseproject.cc
index 2b6570c..9b0f329 100644
--- a/bse/bseproject.cc
+++ b/bse/bseproject.cc
@@ -75,7 +75,6 @@ static BseUndoStack* bse_project_get_undo (BseItem *item);
/* --- variables --- */
static GTypeClass *parent_class = NULL;
-static guint signal_state_changed = 0;
static GQuark quark_storage_trap = 0;
@@ -135,10 +134,6 @@ bse_project_class_init (BseProjectClass *klass)
PARAM_DIRTY,
sfi_pspec_bool ("dirty", NULL, "Whether project needs saving",
FALSE, "r"));
-
- signal_state_changed = bse_object_class_add_signal (object_class, "state-changed",
- G_TYPE_NONE,
- 1, BSE_TYPE_PROJECT_STATE);
}
static void
@@ -171,7 +166,7 @@ static void
bse_project_init (BseProject *self,
gpointer rclass)
{
- self->state = BSE_PROJECT_INACTIVE;
+ self->state = Bse::ProjectState::INACTIVE;
self->supers = NULL;
self->items = NULL;
self->in_undo = FALSE;
@@ -321,7 +316,7 @@ bse_project_push_undo_silent_deactivate (BseProject *self)
* an "add-on" step, which just prepares state for execution of further
* undo steps, if there are any pending.
*/
- if (self->state != BSE_PROJECT_INACTIVE)
+ if (self->state != Bse::ProjectState::INACTIVE)
{
BseUndoStack *ustack = bse_item_undo_open (self, "deactivate-project");
BseUndoStep *ustep = bse_undo_step_new (project_undo_do_deactivate, project_undo_do_deactivate_free,
1);
@@ -706,14 +701,13 @@ auto_deactivate (gpointer data)
{
BseProject *self = BSE_PROJECT (data);
self->deactivate_timer = 0;
- if (self->state == BSE_PROJECT_ACTIVE)
+ if (self->state == Bse::ProjectState::ACTIVE)
bse_project_deactivate (self);
return FALSE;
}
void
-bse_project_state_changed (BseProject *self,
- BseProjectState state)
+bse_project_state_changed (BseProject *self, Bse::ProjectState state)
{
assert_return (BSE_IS_PROJECT (self));
@@ -723,7 +717,7 @@ bse_project_state_changed (BseProject *self,
self->deactivate_timer = 0;
}
self->state = state;
- if (self->state == BSE_PROJECT_ACTIVE && self->deactivate_usecs >= 0)
+ if (self->state == Bse::ProjectState::ACTIVE && self->deactivate_usecs >= 0)
{
SfiTime stamp = Bse::TickStamp::current();
SfiTime delay_usecs = 0;
@@ -731,7 +725,7 @@ bse_project_state_changed (BseProject *self,
delay_usecs = (self->deactivate_min_tick - stamp) * 1000000 / bse_engine_sample_freq ();
self->deactivate_timer = bse_idle_timed (self->deactivate_usecs + delay_usecs, auto_deactivate, self);
}
- g_signal_emit (self, signal_state_changed, 0, state);
+ self->as<Bse::ProjectIface*>()->sig_state_changed.emit (state);
}
void
@@ -757,7 +751,7 @@ bse_project_activate (BseProject *self)
assert_return (BSE_IS_PROJECT (self), Bse::Error::INTERNAL);
- if (self->state != BSE_PROJECT_INACTIVE)
+ if (self->state != Bse::ProjectState::INACTIVE)
return Bse::Error::NONE;
assert_return (BSE_SOURCE_PREPARED (self) == FALSE, Bse::Error::INTERNAL);
@@ -786,7 +780,7 @@ bse_project_activate (BseProject *self)
super->context_handle = ~0;
}
bse_trans_commit (trans);
- bse_project_state_changed (self, BSE_PROJECT_ACTIVE);
+ bse_project_state_changed (self, Bse::ProjectState::ACTIVE);
return Bse::Error::NONE;
}
@@ -799,7 +793,7 @@ bse_project_start_playback (BseProject *self)
assert_return (BSE_IS_PROJECT (self));
- if (self->state != BSE_PROJECT_ACTIVE)
+ if (self->state != Bse::ProjectState::ACTIVE)
return;
assert_return (BSE_SOURCE_PREPARED (self) == TRUE);
@@ -830,7 +824,7 @@ bse_project_start_playback (BseProject *self)
bse_engine_wait_on_trans();
/* update state */
if (seen_synth || songs)
- bse_project_state_changed (self, BSE_PROJECT_PLAYING);
+ bse_project_state_changed (self, Bse::ProjectState::PLAYING);
/* then, start the sequencer */
while (songs)
Bse::Sequencer::instance().start_song ((BseSong*) sfi_ring_pop_head (&songs), 0);
@@ -844,7 +838,7 @@ bse_project_stop_playback (BseProject *self)
assert_return (BSE_IS_PROJECT (self));
- if (self->state != BSE_PROJECT_PLAYING)
+ if (self->state != Bse::ProjectState::PLAYING)
return;
assert_return (BSE_SOURCE_PREPARED (self) == TRUE);
@@ -867,7 +861,7 @@ bse_project_stop_playback (BseProject *self)
/* wait until after all modules have actually been dismissed */
bse_engine_wait_on_trans ();
/* update state */
- bse_project_state_changed (self, BSE_PROJECT_ACTIVE);
+ bse_project_state_changed (self, Bse::ProjectState::ACTIVE);
}
void
@@ -875,7 +869,7 @@ bse_project_check_auto_stop (BseProject *self)
{
assert_return (BSE_IS_PROJECT (self));
- if (self->state == BSE_PROJECT_PLAYING)
+ if (self->state == Bse::ProjectState::PLAYING)
{
GSList *slist;
for (slist = self->supers; slist; slist = slist->next)
@@ -899,7 +893,7 @@ bse_project_deactivate (BseProject *self)
assert_return (BSE_IS_PROJECT (self));
- if (self->state == BSE_PROJECT_INACTIVE)
+ if (self->state == Bse::ProjectState::INACTIVE)
return;
assert_return (BSE_SOURCE_PREPARED (self) == TRUE);
@@ -920,7 +914,7 @@ bse_project_deactivate (BseProject *self)
/* wait until after all modules have actually been dismissed */
bse_engine_wait_on_trans ();
bse_source_reset (BSE_SOURCE (self));
- bse_project_state_changed (self, BSE_PROJECT_INACTIVE);
+ bse_project_state_changed (self, Bse::ProjectState::INACTIVE);
bse_server_close_devices (bse_server_get ());
}
@@ -945,15 +939,15 @@ Error
ProjectImpl::play ()
{
BseProject *self = as<BseProject*>();
- BseProjectState state_before = self->state;
+ Bse::ProjectState state_before = self->state;
Bse::Error error = bse_project_activate (self);
if (error == 0)
{
- if (self->state == BSE_PROJECT_PLAYING)
+ if (self->state == Bse::ProjectState::PLAYING)
bse_project_stop_playback (self);
bse_project_start_playback (self);
}
- if (state_before == BSE_PROJECT_INACTIVE && self->state != BSE_PROJECT_INACTIVE)
+ if (state_before == Bse::ProjectState::INACTIVE && self->state != Bse::ProjectState::INACTIVE)
{
// some things work only (can only be undone) in deactivated projects
bse_project_push_undo_silent_deactivate (self);
@@ -965,9 +959,9 @@ Error
ProjectImpl::activate ()
{
BseProject *self = as<BseProject*>();
- BseProjectState state_before = self->state;
+ Bse::ProjectState state_before = self->state;
Bse::Error error = bse_project_activate (self);
- if (state_before == BSE_PROJECT_INACTIVE && self->state != BSE_PROJECT_INACTIVE)
+ if (state_before == Bse::ProjectState::INACTIVE && self->state != Bse::ProjectState::INACTIVE)
{
// some things work only (can only be undone) in deactivated projects
bse_project_push_undo_silent_deactivate (self);
@@ -988,23 +982,23 @@ bool
ProjectImpl::is_playing ()
{
BseProject *self = as<BseProject*>();
- return self->state == BSE_PROJECT_PLAYING;
+ return self->state == Bse::ProjectState::PLAYING;
}
bool
ProjectImpl::is_active ()
{
BseProject *self = as<BseProject*>();
- return self->state != BSE_PROJECT_INACTIVE;
+ return self->state != Bse::ProjectState::INACTIVE;
}
void
ProjectImpl::start_playback ()
{
BseProject *self = as<BseProject*>();
- BseProjectState state_before = self->state;
+ Bse::ProjectState state_before = self->state;
bse_project_start_playback (self);
- if (state_before == BSE_PROJECT_INACTIVE && self->state != BSE_PROJECT_INACTIVE)
+ if (state_before == Bse::ProjectState::INACTIVE && self->state != Bse::ProjectState::INACTIVE)
{
// some things work only (can only be undone) in deactivated projects
bse_project_push_undo_silent_deactivate (self);
@@ -1177,4 +1171,11 @@ ProjectImpl::restore_from_file (const String &file_name)
return Bse::Error (error);
}
+ProjectState
+ProjectImpl::get_state ()
+{
+ BseProject *self = as<BseProject*>();
+ return self->state;
+}
+
} // Bse
diff --git a/bse/bseproject.hh b/bse/bseproject.hh
index 292937f..2a399ad 100644
--- a/bse/bseproject.hh
+++ b/bse/bseproject.hh
@@ -16,13 +16,6 @@ G_BEGIN_DECLS
#define BSE_PROJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), BSE_TYPE_PROJECT,
BseProjectClass))
-/* --- BseProject object --- */
-typedef enum {
- BSE_PROJECT_INACTIVE,
- BSE_PROJECT_ACTIVE,
- BSE_PROJECT_PLAYING
-} BseProjectState;
-
struct BseProject : BseContainer {
GSList *supers;
GSList *items;
@@ -30,7 +23,7 @@ struct BseProject : BseContainer {
guint in_redo : 1;
BseUndoStack *undo_stack;
BseUndoStack *redo_stack;
- BseProjectState state;
+ Bse::ProjectState state;
guint deactivate_timer;
gint64 deactivate_usecs;
guint64 deactivate_min_tick;
@@ -49,7 +42,7 @@ void bse_project_set_auto_deactivate (BseProject *project,
void bse_project_keep_activated (BseProject *project,
guint64 min_tick);
void bse_project_state_changed (BseProject *project,
- BseProjectState state);
+ Bse::ProjectState state);
Bse::Error bse_project_restore (BseProject *project,
BseStorage *storage);
Bse::Error bse_project_store_bse (BseProject *project,
@@ -79,30 +72,31 @@ namespace Bse {
class ProjectImpl : public ContainerImpl, public virtual ProjectIface {
protected:
- virtual ~ProjectImpl ();
+ virtual ~ProjectImpl ();
public:
- explicit ProjectImpl (BseObject*);
- virtual void change_name (const String &name) override;
- virtual Error play () override;
- virtual Error activate () override;
- virtual bool can_play () override;
- virtual bool is_playing () override;
- virtual bool is_active () override;
- virtual void start_playback () override;
- virtual void stop_playback () override;
- virtual void deactivate () override;
- virtual void stop () override;
- virtual void auto_deactivate (int msec_delay) override;
- virtual int undo_depth () override;
- virtual void undo () override;
- virtual int redo_depth () override;
- virtual void redo () override;
- virtual void clear_undo () override;
- virtual void clean_dirty () override;
- virtual bool is_dirty () override;
- virtual void inject_midi_control (int midi_channel, int midi_control, double control_value) override;
- virtual Error import_midi_file (const String &file_name) override;
- virtual Error restore_from_file (const String &file_name) override;
+ explicit ProjectImpl (BseObject*);
+ virtual void change_name (const String &name) override;
+ virtual Error play () override;
+ virtual Error activate () override;
+ virtual bool can_play () override;
+ virtual bool is_playing () override;
+ virtual bool is_active () override;
+ virtual void start_playback () override;
+ virtual void stop_playback () override;
+ virtual void deactivate () override;
+ virtual void stop () override;
+ virtual void auto_deactivate (int msec_delay) override;
+ virtual int undo_depth () override;
+ virtual void undo () override;
+ virtual int redo_depth () override;
+ virtual void redo () override;
+ virtual void clear_undo () override;
+ virtual void clean_dirty () override;
+ virtual bool is_dirty () override;
+ virtual void inject_midi_control (int midi_channel, int midi_control, double control_value)
override;
+ virtual Error import_midi_file (const String &file_name) override;
+ virtual Error restore_from_file (const String &file_name) override;
+ virtual ProjectState get_state () override;
};
} // Bse
diff --git a/bse/bseproject.proc b/bse/bseproject.proc
index a219f1c..aa17632 100644
--- a/bse/bseproject.proc
+++ b/bse/bseproject.proc
@@ -286,27 +286,3 @@ METHOD (BseProject, get-supers) {
return Bse::Error::NONE;
}
-
-
-METHOD (BseProject, get-state) {
- HELP = "Retrieve the current project state.";
- IN = bse_param_spec_object ("project", "Project", "The project",
- BSE_TYPE_PROJECT, SFI_PARAM_STANDARD);
- OUT = bse_param_spec_genum ("state", "State", "Project playback/activation state",
- BSE_TYPE_PROJECT_STATE, BSE_PROJECT_INACTIVE, SFI_PARAM_STANDARD);
-} BODY (BseProcedureClass *proc,
- const GValue *in_values,
- GValue *out_values)
-{
- /* extract parameter values */
- BseProject *self = (BseProject*) bse_value_get_object (in_values++);
-
- /* check parameters */
- if (!BSE_IS_PROJECT (self))
- return Bse::Error::PROC_PARAM_INVAL;
-
- /* set output parameters */
- g_value_set_enum (out_values++, self->state);
-
- return Bse::Error::NONE;
-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]