[beast: 6/9] BSE: add Object::changed() signal
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 6/9] BSE: add Object::changed() signal
- Date: Fri, 20 Nov 2015 22:09:01 +0000 (UTC)
commit 039d88d08af8d071f0a01c476b9e6dae1841c264
Author: Tim Janik <timj gnu org>
Date: Fri Nov 20 01:02:19 2015 +0100
BSE: add Object::changed() signal
Signed-off-by: Tim Janik <timj gnu org>
bse/bseapi.idl | 5 +++--
bse/bseobject.cc | 6 ++++++
bse/bseobject.hh | 1 +
3 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/bse/bseapi.idl b/bse/bseapi.idl
index a8682be..1f3f907 100644
--- a/bse/bseapi.idl
+++ b/bse/bseapi.idl
@@ -460,8 +460,9 @@ sequence TrackPartSeq;
/// Fundamental base type for all BSE objects.
interface Object {
- String debug_name (); ///< Object name useful for debugging output.
- int64 proxy_id (); ///< Retrieve the BseObject proxy ID for an Object.
+ String debug_name (); ///< Object name useful for debugging output.
+ int64 proxy_id (); ///< Retrieve the BseObject proxy ID for an Object.
+ signal void changed (String what); ///< Notification for object state or property changes.
};
/// Base interface type for objects that can be added to a container.
diff --git a/bse/bseobject.cc b/bse/bseobject.cc
index a61b894..158c451 100644
--- a/bse/bseobject.cc
+++ b/bse/bseobject.cc
@@ -42,6 +42,12 @@ ObjectImpl::proxy_id ()
return bo->unique_id;
}
+void
+ObjectImpl::changed (const String &what)
+{
+ sig_changed.emit (what);
+}
+
} // Bse
enum
diff --git a/bse/bseobject.hh b/bse/bseobject.hh
index 600f2fb..5efa248 100644
--- a/bse/bseobject.hh
+++ b/bse/bseobject.hh
@@ -13,6 +13,7 @@ public:
virtual ~ObjectImpl ();
virtual std::string debug_name () override;
virtual int64_t proxy_id () override;
+ void changed (const String &what);
operator BseObject* () { return gobject_; }
// template<class BseObjectPtr> BseObjectPtr as (); // provided by ObjectIface
virtual BseObject* as_bse_object () override { return gobject_; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]