[glibmm] MemoryOutputStream: Add properties.
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glibmm] MemoryOutputStream: Add properties.
- Date: Fri, 5 Feb 2010 23:20:21 +0000 (UTC)
commit 44971dcf8d212dc45ce37402183358d978566f12
Author: Murray Cumming <murrayc murrayc com>
Date: Sat Feb 6 00:20:09 2010 +0100
MemoryOutputStream: Add properties.
* gio/src/gio_signals.defs: Regenerated.
* gio/src/memoryoutputstream.hg: Add properties, as suggesed in bug #605710.
ChangeLog | 7 ++++++
gio/src/gio_signals.defs | 45 +++++++++++++++++++++++++++++++++++++++++
gio/src/memoryoutputstream.hg | 13 +++++++++--
3 files changed, 62 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 68fa312..5e6b97b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-02-06 Murray Cumming <murrayc murrayc com>
+
+ MemoryOutputStream: Add properties.
+
+ * gio/src/gio_signals.defs: Regenerated.
+ * gio/src/memoryoutputstream.hg: Add properties, as suggesed in bug #605710.
+
2010-02-06 Krzysztof KosiÅ?ski <tweenk pl gmail com>
MemoryOutputStream: Fix the constructor.
diff --git a/gio/src/gio_signals.defs b/gio/src/gio_signals.defs
index c9d23a2..6e44a59 100644
--- a/gio/src/gio_signals.defs
+++ b/gio/src/gio_signals.defs
@@ -334,6 +334,51 @@
;; From GMemoryOutputStream
+(define-property data
+ (of-object "GMemoryOutputStream")
+ (prop-type "GParamPointer")
+ (docs "Pointer to buffer where data will be written.")
+ (readable #t)
+ (writable #t)
+ (construct-only #t)
+)
+
+(define-property size
+ (of-object "GMemoryOutputStream")
+ (prop-type "GParamULong")
+ (docs "Current size of the data buffer.")
+ (readable #t)
+ (writable #t)
+ (construct-only #t)
+)
+
+(define-property data-size
+ (of-object "GMemoryOutputStream")
+ (prop-type "GParamULong")
+ (docs "Size of data written to the buffer.")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
+(define-property realloc-function
+ (of-object "GMemoryOutputStream")
+ (prop-type "GParamPointer")
+ (docs "Function with realloc semantics called to enlarge the buffer.")
+ (readable #t)
+ (writable #t)
+ (construct-only #t)
+)
+
+(define-property destroy-function
+ (of-object "GMemoryOutputStream")
+ (prop-type "GParamPointer")
+ (docs "Function called with the buffer as argument when the stream is destroyed.")
+ (readable #t)
+ (writable #t)
+ (construct-only #t)
+)
+
;; From GMount
(define-signal changed
diff --git a/gio/src/memoryoutputstream.hg b/gio/src/memoryoutputstream.hg
index 7f092e9..a9d491b 100644
--- a/gio/src/memoryoutputstream.hg
+++ b/gio/src/memoryoutputstream.hg
@@ -45,14 +45,21 @@ class MemoryOutputStream :
_IMPLEMENTS_INTERFACE(Seekable)
protected:
// TODO: more C++-like interface using sigc++
- _WRAP_CTOR(MemoryOutputStream(gpointer data, gsize size, GReallocFunc realloc_function, GDestroyNotify destroy_function), g_memory_output_stream_new)
+ _WRAP_CTOR(MemoryOutputStream(void* data, gsize size, GReallocFunc realloc_function, GDestroyNotify destroy_function), g_memory_output_stream_new)
public:
// TODO: more C++-like interface using sigc++
- _WRAP_CREATE(gpointer data, gsize size, GReallocFunc realloc_function, GDestroyNotify destroy_function)
- _WRAP_METHOD(gpointer get_data(), g_memory_output_stream_get_data)
+ _WRAP_CREATE(void* data, gsize size, GReallocFunc realloc_function, GDestroyNotify destroy_function)
+ _WRAP_METHOD(void* get_data(), g_memory_output_stream_get_data)
_WRAP_METHOD(gsize get_size() const, g_memory_output_stream_get_size)
_WRAP_METHOD(gsize get_data_size() const, g_memory_output_stream_get_data_size)
+
+ _WRAP_PROPERTY("data", void*)
+ _WRAP_PROPERTY("data-size", gulong)
+ //Too C-like: _WRAP_PROPERTY("destroy-function", void*)
+ //Too C-like: _WRAP_PROPERTY("realloc-function" gpointer : Read / Write / Construct Only
+ _WRAP_PROPERTY("size", gulong)
+
};
} // namespace Gio
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]