<ClCompile Include="..\gio\giomm\initable.cc" />
<ClCompile Include="..\gio\giomm\inputstream.cc" />
<ClCompile Include="..\gio\giomm\iostream.cc" />
+ <ClCompile Include="..\gio\giomm\listmodel.cc" />
+ <ClCompile Include="..\gio\giomm\liststore.cc" />
<ClCompile Include="..\gio\giomm\loadableicon.cc" />
<ClCompile Include="..\gio\giomm\memoryinputstream.cc" />
<ClCompile Include="..\gio\giomm\memoryoutputstream.cc" />
<ClInclude Include="..\gio\giomm\initable.h" />
<ClInclude Include="..\gio\giomm\inputstream.h" />
<ClInclude Include="..\gio\giomm\iostream.h" />
+ <ClInclude Include="..\gio\giomm\listmodel.h" />
+ <ClInclude Include="..\gio\giomm\liststore.h" />
<ClInclude Include="..\gio\giomm\loadableicon.h" />
<ClInclude Include="..\gio\giomm\memoryinputstream.h" />
<ClInclude Include="..\gio\giomm\memoryoutputstream.h" />
<ClCompile Include="..\gio\giomm\initable.cc"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\gio\giomm\inputstream.cc"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\gio\giomm\iostream.cc"><Filter>Source Files</Filter></ClCompile>
+ <ClCompile Include="..\gio\giomm\listmodel.cc"><Filter>Source Files</Filter></ClCompile>
+ <ClCompile Include="..\gio\giomm\liststore.cc"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\gio\giomm\loadableicon.cc"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\gio\giomm\memoryinputstream.cc"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\gio\giomm\memoryoutputstream.cc"><Filter>Source Files</Filter></ClCompile>
<ClInclude Include="..\gio\giomm\initable.h"><Filter>Header Files</Filter></ClInclude>
<ClInclude Include="..\gio\giomm\inputstream.h"><Filter>Header Files</Filter></ClInclude>
<ClInclude Include="..\gio\giomm\iostream.h"><Filter>Header Files</Filter></ClInclude>
+ <ClInclude Include="..\gio\giomm\listmodel.h"><Filter>Header Files</Filter></ClInclude>
+ <ClInclude Include="..\gio\giomm\liststore.h"><Filter>Header Files</Filter></ClInclude>
<ClInclude Include="..\gio\giomm\loadableicon.h"><Filter>Header Files</Filter></ClInclude>
<ClInclude Include="..\gio\giomm\memoryinputstream.h"><Filter>Header Files</Filter></ClInclude>
<ClInclude Include="..\gio\giomm\memoryoutputstream.h"><Filter>Header Files</Filter></ClInclude>
copy ..\glib\glibmm\date.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm
copy ..\glib\glibmm\datetime.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm
copy ..\glib\glibmm\debug.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm
+copy ..\glib\glibmm\enums.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm
copy ..\glib\glibmm\dispatcher.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm
copy ..\glib\glibmm\error.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm
copy ..\glib\glibmm\exception.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm
copy ..\glib\glibmm\private\convert_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private
copy ..\glib\glibmm\private\date_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private
copy ..\glib\glibmm\private\datetime_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private
+copy ..\glib\glibmm\private\enums_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private
copy ..\glib\glibmm\private\fileutils_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private
copy ..\glib\glibmm\private\interface_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private
copy ..\glib\glibmm\private\iochannel_p.h $(CopyDir)\include\glibmm-$(ApiMajorVersion).$(ApiMinorVersion)\glibmm\private
copy ..\gio\giomm\initable.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm
copy ..\gio\giomm\inputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm
copy ..\gio\giomm\iostream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm
+copy ..\gio\giomm\listmodel.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm
+copy ..\gio\giomm\liststore.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm
copy ..\gio\giomm\loadableicon.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm
copy ..\gio\giomm\memoryinputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm
copy ..\gio\giomm\memoryoutputstream.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm
copy ..\gio\giomm\private\initable_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private
copy ..\gio\giomm\private\inputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private
copy ..\gio\giomm\private\iostream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private
+copy ..\gio\giomm\private\listmodel_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private
+copy ..\gio\giomm\private\liststore_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private
copy ..\gio\giomm\private\loadableicon_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private
copy ..\gio\giomm\private\memoryinputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private
copy ..\gio\giomm\private\memoryoutputstream_p.h $(CopyDir)\include\giomm-$(ApiMajorVersion).$(ApiMinorVersion)\giomm\private
<ClCompile Include="..\glib\glibmm\datetime.cc" />
<ClCompile Include="..\glib\glibmm\debug.cc" />
<ClCompile Include="..\glib\glibmm\dispatcher.cc" />
+ <ClCompile Include="..\glib\glibmm\enums.cc" />
<ClCompile Include="..\glib\glibmm\error.cc" />
<ClCompile Include="..\glib\glibmm\exception.cc" />
<ClCompile Include="..\glib\glibmm\exceptionhandler.cc" />
<ClInclude Include="..\glib\glibmm\datetime.h" />
<ClInclude Include="..\glib\glibmm\debug.h" />
<ClInclude Include="..\glib\glibmm\dispatcher.h" />
+ <ClInclude Include="..\glib\glibmm\enums.h" />
<ClInclude Include="..\glib\glibmm\error.h" />
<ClInclude Include="..\glib\glibmm\exception.h" />
<ClInclude Include="..\glib\glibmm\exceptionhandler.h" />
<ClCompile Include="..\glib\glibmm\datetime.cc"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\glib\glibmm\debug.cc"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\glib\glibmm\dispatcher.cc"><Filter>Source Files</Filter></ClCompile>
+ <ClCompile Include="..\glib\glibmm\enums.cc"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\glib\glibmm\error.cc"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\glib\glibmm\exception.cc"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\glib\glibmm\exceptionhandler.cc"><Filter>Source Files</Filter></ClCompile>
<ClInclude Include="..\glib\glibmm\datetime.h"><Filter>Header Files</Filter></ClInclude>
<ClInclude Include="..\glib\glibmm\debug.h"><Filter>Header Files</Filter></ClInclude>
<ClInclude Include="..\glib\glibmm\dispatcher.h"><Filter>Header Files</Filter></ClInclude>
+ <ClInclude Include="..\glib\glibmm\enums.h"><Filter>Header Files</Filter></ClInclude>
<ClInclude Include="..\glib\glibmm\error.h"><Filter>Header Files</Filter></ClInclude>
<ClInclude Include="..\glib\glibmm\exception.h"><Filter>Header Files</Filter></ClInclude>
<ClInclude Include="..\glib\glibmm\exceptionhandler.h"><Filter>Header Files</Filter></ClInclude>
+2.49.2:
+
+Gio:
+* FilterInputStream: Added a constructor.
+ (Krzysztof Kosiński, Kjell Ahlstedt) Bug #572471
+* FilterOutputStream:
+ - Correct the property_base_stream() return type.
+ (Krzysztof Kosiński) Bug #572471
+ (Krzysztof Kosiński, Kjell Ahlstedt) Bug #572471
+* InputStream: Added a constructor, is_closed(), has_pending(),
+ set_pending(), clear_pending()
+ (Krzysztof Kosiński, Kjell Ahlstedt) Bug #572471
+* OutputStream: Added a constructor, is_closed(), is_closing(),
+ has_pending(), set_pending(), and clear_pending().
+ (Krzysztof Kosiński, Kjell Ahlstedt) Bug #572471
+* Pollable, InputStream, OutputStream: Return -1 on error in vfuncs.
+ (Kjell Ahlstedt)
+
+gmmproc:
+* Make h2def.py recognize some GDK_PIXBUF macros
+ (Kjell Ahlstedt)
+* Add optional argument err_return_value in _WRAP_VFUNC
+ (Kjell Ahlstedt)
+
+Build:
+* Visual Studio build files: Update projects
+ (Chun-wei Fan)
+
2.49.1:
gmmproc:
## You should have received a copy of the GNU Lesser General Public License
## along with this library. If not, see <http://www.gnu.org/licenses/>.
-AC_INIT([glibmm], [2.49.1],
+AC_INIT([glibmm], [2.49.2],
[http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm],
[glibmm], [http://www.gtkmm.org/])
AC_PREREQ([2.59])
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
_WRAP_PROPERTY("buffer-size", guint)
protected:
+ //TODO: When we can break ABI, add vfunc. See https://bugzilla.gnome.org/show_bug.cgi?id=572471
#m4 _CONVERSION(`GCancellable*', `const Glib::RefPtr<Cancellable>&', `Glib::wrap($3, true)')
- //_WRAP_VFUNC(gssize fill(gssize count, const Glib::RefPtr<Cancellable>& cancellable, GError** error), "fill")
-
+ //_WRAP_VFUNC(gssize fill(gssize count, const Glib::RefPtr<Cancellable>& cancellable), fill, errthrow, err_return_value -1)
};
} // namespace Gio
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
*/
#include <gio/gio.h>
+
+namespace Gio {
+
+FilterInputStream::FilterInputStream(const Glib::RefPtr<InputStream>& base_stream)
+: _CONSTRUCT("base_stream", const_cast<GInputStream*>(Glib::unwrap(base_stream)))
+{
+}
+
+} // namespace Gio
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
class FilterInputStream : public Gio::InputStream
{
_CLASS_GOBJECT(FilterInputStream, GFilterInputStream, G_FILTER_INPUT_STREAM, Gio::InputStream, GInputStream)
+
+protected:
+ // This needs to be hand-coded because there is no public GFilterInputStream constructor.
+ explicit FilterInputStream(const Glib::RefPtr<InputStream>& base_stream);
+
public:
_WRAP_METHOD(Glib::RefPtr<InputStream> get_base_stream(),
g_filter_input_stream_get_base_stream,
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
*/
#include <gio/gio.h>
+
+namespace Gio {
+
+FilterOutputStream::FilterOutputStream(const Glib::RefPtr<OutputStream>& base_stream)
+: _CONSTRUCT("base_stream", const_cast<GOutputStream*>(Glib::unwrap(base_stream)))
+{
+}
+
+} // namespace Gio
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
class FilterOutputStream : public Gio::OutputStream
{
_CLASS_GOBJECT(FilterOutputStream, GFilterOutputStream, G_FILTER_OUTPUT_STREAM, Gio::OutputStream, GOutputStream)
+
+protected:
+ // This needs to be hand-coded because there is no public GFilterOutputStream constructor.
+ explicit FilterOutputStream(const Glib::RefPtr<OutputStream>& base_stream);
+
public:
_WRAP_METHOD(Glib::RefPtr<OutputStream> get_base_stream(),
g_filter_output_stream_get_base_stream,
_WRAP_METHOD(bool get_close_base_stream() const, g_filter_output_stream_get_close_base_stream)
_WRAP_METHOD(void set_close_base_stream(bool close_base = true), g_filter_output_stream_set_close_base_stream)
- _WRAP_PROPERTY("base-stream", Glib::RefPtr<InputStream>)
+ _WRAP_PROPERTY("base-stream", Glib::RefPtr<OutputStream>)
_WRAP_PROPERTY("close-base-stream", bool)
};
)
)
+; GFileInputStream
+
+(define-vfunc tell
+ (of-object "GFileInputStream")
+ (return-type "goffset")
+)
+
+(define-vfunc can_seek
+ (of-object "GFileInputStream")
+ (return-type "gboolean")
+)
+
+(define-vfunc seek
+ (of-object "GFileInputStream")
+ (return-type "gboolean")
+ (parameters
+ '("goffset" "offset")
+ '("GSeekType" "type")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc query_info
+ (of-object "GFileInputStream")
+ (return-type "GFileInfo*")
+ (parameters
+ '("const-char*" "attributes")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc query_info_async
+ (of-object "GFileInputStream")
+ (return-type "void")
+ (parameters
+ '("const-char*" "attributes")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-vfunc query_info_finish
+ (of-object "GFileInputStream")
+ (return-type "GFileInfo*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+; GFileOutputStream
+
+(define-vfunc tell
+ (of-object "GFileOutputStream")
+ (return-type "goffset")
+)
+
+(define-vfunc can_seek
+ (of-object "GFileOutputStream")
+ (return-type "gboolean")
+)
+
+(define-vfunc seek
+ (of-object "GFileOutputStream")
+ (return-type "gboolean")
+ (parameters
+ '("goffset" "offset")
+ '("GSeekType" "type")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc can_truncate
+ (of-object "GFileOutputStream")
+ (return-type "gboolean")
+)
+
+(define-vfunc truncate_fn
+ (of-object "GFileOutputStream")
+ (return-type "gboolean")
+ (parameters
+ '("goffset" "offset")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc query_info
+ (of-object "GFileOutputStream")
+ (return-type "GFileInfo*")
+ (parameters
+ '("const-char*" "attributes")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc query_info_async
+ (of-object "GFileOutputStream")
+ (return-type "void")
+ (parameters
+ '("const-char*" "attributes")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-vfunc query_info_finish
+ (of-object "GFileOutputStream")
+ (return-type "GFileInfo*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc get_etag
+ (of-object "GFileOutputStream")
+ (return-type "char*")
+)
+
; GIcon
(define-vfunc hash
)
)
+; GInputStream
+
+(define-vfunc read_fn
+ (of-object "GInputStream")
+ (return-type "gssize")
+ (parameters
+ '("void*" "buffer")
+ '("gsize" "count")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc skip
+ (of-object "GInputStream")
+ (return-type "gssize")
+ (parameters
+ '("gsize" "count")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc close_fn
+ (of-object "GInputStream")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc read_async
+ (of-object "GInputStream")
+ (return-type "void")
+ (parameters
+ '("void*" "buffer")
+ '("gsize" "count")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-vfunc read_finish
+ (of-object "GInputStream")
+ (return-type "gssize")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc skip_async
+ (of-object "GInputStream")
+ (return-type "void")
+ (parameters
+ '("gsize" "count")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-vfunc skip_finish
+ (of-object "GInputStream")
+ (return-type "gssize")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc close_async
+ (of-object "GInputStream")
+ (return-type "void")
+ (parameters
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-vfunc close_finish
+ (of-object "GInputStream")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+; GListModel
+
+(define-vfunc get_item_type
+ (of-object "GListModel")
+ (return-type "GType")
+)
+
+(define-vfunc get_n_items
+ (of-object "GListModel")
+ (return-type "guint")
+)
+
+(define-vfunc get_item
+ (of-object "GListModel")
+ (return-type "gpointer")
+ (parameters
+ '("guint" "position")
+ )
+)
+
; GLoadableIcon
(define-vfunc load
)
)
+; GOutputStream
+
+(define-vfunc write_fn
+ (of-object "GOutputStream")
+ (return-type "gssize")
+ (parameters
+ '("const-void*" "buffer")
+ '("gsize" "count")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc splice
+ (of-object "GOutputStream")
+ (return-type "gssize")
+ (parameters
+ '("GInputStream*" "source")
+ '("GOutputStreamSpliceFlags" "flags")
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc flush
+ (of-object "GOutputStream")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc close_fn
+ (of-object "GOutputStream")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc write_async
+ (of-object "GOutputStream")
+ (return-type "void")
+ (parameters
+ '("const-void*" "buffer")
+ '("gsize" "count")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-vfunc write_finish
+ (of-object "GOutputStream")
+ (return-type "gssize")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc splice_async
+ (of-object "GOutputStream")
+ (return-type "void")
+ (parameters
+ '("GInputStream*" "source")
+ '("GOutputStreamSpliceFlags" "flags")
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-vfunc splice_finish
+ (of-object "GOutputStream")
+ (return-type "gssize")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc flush_async
+ (of-object "GOutputStream")
+ (return-type "void")
+ (parameters
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-vfunc flush_finish
+ (of-object "GOutputStream")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc close_async
+ (of-object "GOutputStream")
+ (return-type "void")
+ (parameters
+ '("int" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-vfunc close_finish
+ (of-object "GOutputStream")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+; GPermission
+
+(define-vfunc acquire
+ (of-object "GPermission")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc acquire_async
+ (of-object "GPermission")
+ (return-type "void")
+ (parameters
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-vfunc acquire_finish
+ (of-object "GPermission")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc release
+ (of-object "GPermission")
+ (return-type "gboolean")
+ (parameters
+ '("GCancellable*" "cancellable")
+ '("GError**" "error")
+ )
+)
+
+(define-vfunc release_async
+ (of-object "GPermission")
+ (return-type "void")
+ (parameters
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-vfunc release_finish
+ (of-object "GPermission")
+ (return-type "gboolean")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("GError**" "error")
+ )
+)
+
; GPollableInputStream
(define-vfunc can_poll
)
)
-; GPermission
-
-(define-vfunc acquire
- (of-object "GPermission")
- (return-type "gboolean")
- (parameters
- '("GCancellable*" "cancellable")
- '("GError**" "error")
- )
-)
-
-(define-vfunc acquire_async
- (of-object "GPermission")
- (return-type "void")
- (parameters
- '("GCancellable*" "cancellable")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-vfunc acquire_finish
- (of-object "GPermission")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-(define-vfunc release
- (of-object "GPermission")
- (return-type "gboolean")
- (parameters
- '("GCancellable*" "cancellable")
- '("GError**" "error")
- )
-)
-
-(define-vfunc release_async
- (of-object "GPermission")
- (return-type "void")
- (parameters
- '("GCancellable*" "cancellable")
- '("GAsyncReadyCallback" "callback")
- '("gpointer" "user_data")
- )
-)
-
-(define-vfunc release_finish
- (of-object "GPermission")
- (return-type "gboolean")
- (parameters
- '("GAsyncResult*" "result")
- '("GError**" "error")
- )
-)
-
-; GListModel
-(define-vfunc get_item_type
- (of-object "GListModel")
- (return-type "GType")
-)
-
-(define-vfunc get_n_items
- (of-object "GListModel")
- (return-type "guint")
-)
-
-(define-vfunc get_item
- (of-object "GListModel")
- (return-type "gpointer")
- (parameters
- '("guint" "position")
- )
-)
{
_CLASS_GOBJECT(InputStream, GInputStream, G_INPUT_STREAM, Glib::Object, GObject)
+protected:
+ _CTOR_DEFAULT
+
public:
_WRAP_METHOD(gssize read(void* buffer, gsize count, const Glib::RefPtr<Cancellable>& cancellable{?}),
g_input_stream_read,
g_input_stream_close_finish,
errthrow)
- // These are private inside the module (for implementations)
- _IGNORE(g_input_stream_has_pending, g_input_stream_is_closed, g_input_stream_set_pending, g_input_stream_clear_pending)
+ _WRAP_METHOD(bool is_closed() const, g_input_stream_is_closed, newin "2,50")
+ _WRAP_METHOD(bool has_pending() const, g_input_stream_has_pending, newin "2,50")
+
+protected:
+ _WRAP_METHOD(bool set_pending(), g_input_stream_set_pending, errthrow, newin "2,50")
+ _WRAP_METHOD(void clear_pending(), g_input_stream_clear_pending, newin "2,50")
+
+ //TODO: When we can break ABI, add vfuncs. See https://bugzilla.gnome.org/show_bug.cgi?id=572471
+#m4 _CONVERSION(`GCancellable*', `const Glib::RefPtr<Cancellable>&', `Glib::wrap($3, true)')
+ //_WRAP_VFUNC(gssize read(void* buffer, gsize count, const Glib::RefPtr<Cancellable>& cancellable), read_fn, errthrow, err_return_value -1)
+ //_WRAP_VFUNC(gssize skip(gsize count, const Glib::RefPtr<Cancellable>& cancellable), skip, errthrow, err_return_value -1)
+ //_WRAP_VFUNC(bool close(const Glib::RefPtr<Cancellable>& cancellable), close_fn, errthrow)
};
} // namespace Gio
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2008 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
#include <gio/gio.h>
#include <glibmm/bytes.h>
+
+namespace Gio
+{
+
+// Equivalent to g_memory_output_stream_new_resizable().
+MemoryOutputStream::MemoryOutputStream()
+: _CONSTRUCT("data", nullptr, "size", 0, "realloc-function", g_realloc,
+ "destroy-function", g_free)
+{
+}
+
+} // namespace Gio
{
_CLASS_GOBJECT(MemoryOutputStream, GMemoryOutputStream, G_MEMORY_OUTPUT_STREAM, Gio::OutputStream, GOutputStream)
_IMPLEMENTS_INTERFACE(Seekable)
+
protected:
+ // Hand-coded because it's equivalent to g_memory_output_stream_new_resizable(),
+ // which sets some properties to non-default values.
+ /** Creates a resizable stream.
+ */
+ MemoryOutputStream();
// TODO: more C++-like interface using sigc++
_WRAP_CTOR(MemoryOutputStream(void* data, gsize size, GReallocFunc realloc_function, GDestroyNotify destroy_function), g_memory_output_stream_new)
public:
+ _WRAP_CREATE()
// TODO: more C++-like interface using sigc++
_WRAP_CREATE(void* data, gsize size, GReallocFunc realloc_function, GDestroyNotify destroy_function)
_DEFS(giomm,gio)
_PINCLUDE(glibmm/private/object_p.h)
+_PINCLUDE(gio/gio.h) // for GOutputStreamSpliceFlags
namespace Gio
{
{
_CLASS_GOBJECT(OutputStream, GOutputStream, G_OUTPUT_STREAM, Glib::Object, GObject)
+protected:
+ _CTOR_DEFAULT
+
public:
_WRAP_METHOD(gssize write(const void* buffer, gsize count, const Glib::RefPtr<Cancellable>& cancellable{?}),
g_output_stream_close_finish,
errthrow)
- // These are private inside the module (for implementations)
- _IGNORE(g_output_stream_has_pending, g_output_stream_is_closed, g_output_stream_is_closing, g_output_stream_set_pending, g_output_stream_clear_pending)
-
+ _WRAP_METHOD(bool is_closed() const, g_output_stream_is_closed, newin "2,50")
+ _WRAP_METHOD(bool is_closing() const, g_output_stream_is_closing, newin "2,50")
+ _WRAP_METHOD(bool has_pending() const, g_output_stream_has_pending, newin "2,50")
+
+protected:
+ _WRAP_METHOD(bool set_pending(), g_output_stream_set_pending, errthrow, newin "2,50")
+ _WRAP_METHOD(void clear_pending(), g_output_stream_clear_pending, newin "2,50")
+
+ //TODO: When we can break ABI, add vfuncs. See https://bugzilla.gnome.org/show_bug.cgi?id=572471
+#m4 _CONVERSION(`GCancellable*', `const Glib::RefPtr<Cancellable>&', `Glib::wrap($3, true)')
+#m4 _CONVERSION(`GInputStream*', `const Glib::RefPtr<InputStream>&', `Glib::wrap($3, true)')
+ //_WRAP_VFUNC(gssize write(const void* buffer, gsize count, const Glib::RefPtr<Cancellable>& cancellable), write_fn, errthrow, err_return_value -1)
+ //_WRAP_VFUNC(gssize splice(const Glib::RefPtr<InputStream>& source, const Glib::RefPtr<Cancellable>& cancellable{.}, OutputStreamSpliceFlags flags{.}), splice, errthrow, err_return_value -1)
+ //_WRAP_VFUNC(bool flush(const Glib::RefPtr<Cancellable>& cancellable), flush, errthrow)
+ //_WRAP_VFUNC(bool close(const Glib::RefPtr<Cancellable>& cancellable), close_fn, errthrow)
};
} // namespace Gio
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2012 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
//TODO: _WRAP_VFUNC(Glib::RefPtr<Source> create_source(const Glib::RefPtr<Cancellable>& cancellable), "create_source")
- _WRAP_VFUNC(gssize read_nonblocking(void* buffer, gsize count), "read_nonblocking", errthrow)
+ _WRAP_VFUNC(gssize read_nonblocking(void* buffer, gsize count), "read_nonblocking", errthrow, err_return_value -1)
};
} // namespace Gio
-// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-
/* Copyright (C) 2012 The giomm Development Team
*
* This library is free software; you can redistribute it and/or
//TODO:_WRAP_VFUNC(Glib::RefPtr<Source> create_source(const Glib::RefPtr<Cancellable>& cancellable), "create_source")
- _WRAP_VFUNC(gssize write_nonblocking(const void* buffer, gsize count), "write_nonblocking", errthrow)
+ _WRAP_VFUNC(gssize write_nonblocking(const void* buffer, gsize count), "write_nonblocking", errthrow, err_return_value -1)
};
} // namespace Gio
pat = re.compile(r"""G_GNUC_WARN_UNUSED_RESULT|G_INLINE_FUNC""", re.MULTILINE)
buf = pat.sub('', buf)
- #strip *_DEPRECATED_IN_*_FOR (*):
- pat = re.compile(r"""[A-Z]+_DEPRECATED_IN_[0-9]_([0-9]*)_FOR\s*\(.*\)\S*""", re.MULTILINE)
+ #strip *_DEPRECATED_IN_*_FOR (*)
+ #e.g. GDK_DEPRECATED_IN_*_FOR (*) and GDK_PIXBUF_DEPRECATED_IN_*_FOR (*)
+ pat = re.compile(r"""([A-Z]+_){1,2}?DEPRECATED_IN_[0-9]_([0-9]*)_FOR\s*\(.*\)\S*""", re.MULTILINE)
buf = pat.sub('', buf)
#strip *_DEPRECATED*
- pat = re.compile(r"""[A-Z]+_DEPRECATED\S*""", re.MULTILINE)
+ pat = re.compile(r"""([A-Z]+_){1,2}?DEPRECATED\S*""", re.MULTILINE)
buf = pat.sub('', buf)
#strip *_AVAILABLE_IN_*
- pat = re.compile(r"""[A-Z]+_AVAILABLE_IN_[0-9]_[0-9]\S*""", re.MULTILINE)
+ pat = re.compile(r"""([A-Z]+_){1,2}?AVAILABLE_IN_[0-9]_[0-9]\S*""", re.MULTILINE)
buf = pat.sub('', buf)
#strip *_AVAILABLE_IN_ALL
- pat = re.compile(r"""[A-Z]+_AVAILABLE_IN_ALL\S*""", re.MULTILINE)
+ pat = re.compile(r"""([A-Z]+_){1,2}?AVAILABLE_IN_ALL\S*""", re.MULTILINE)
buf = pat.sub('', buf)
#strip G_DECLARE_FINAL_TYPE (*)
dnl `<cargs and names>',`<cnames>',`<cpparg names>',firstarg,
dnl $9 $10 $11 $12
dnl refreturn_ctype, keep_return, ifdef, errthrow,
-dnl $13 $14 $15 $16
-dnl slot_type, c_data_param_name, return_value, exception_handler)
+dnl $13 $14 $15 $16 $17
+dnl slot_type, c_data_param_name, return_value, err_return_value, exception_handler)
dnl
dnl Note: _get_current_wrapper_inline() could be used throughout for performance instead of _get_current_wrapper(),
dnl and is_derived_() instead of is_derived_(),
')dnl end refreturn_ctype
')dnl end void
}
-ifelse($16,,,`dnl if (exception_handler)
+ifelse($17,,,`dnl if (exception_handler)
catch(...)
{
try
{
ifelse($9,refreturn_ctype,`dnl
- return Glib::unwrap_copy`'(obj->$16`'());
+ return Glib::unwrap_copy`'(obj->$17`'());
', `dnl
- return _CONVERT($3, $4, `obj->$16`'()');
+ return _CONVERT($3, $4, `obj->$17`'()');
')dnl
}
')dnl end exception_handler
ifelse($4,void,`dnl
return;
',`dnl
-ifelse(`$15', `',`dnl
+ifelse(`$16', `',`dnl
using RType = $4;
return RType`'();
',`dnl
- return _CONVERT($3,$4,`$15');
+ return _CONVERT($3,$4,`$16');
')dnl
')dnl
}
{
Glib::exception_handlers_invoke`'();
}
-ifelse($16,,,`dnl if (exception_handler)
+ifelse($17,,,`dnl if (exception_handler)
}
')dnl
}
convert_args_c_to_cpp($objCFunc, $objCppfunc, $line_num);
my $returnValue = $$objCppfunc{return_value};
+ my $errReturnValue = $$objCppfunc{err_return_value};
my $exceptionHandler = $$objCppfunc{exception_handler};
- my $str = sprintf("_VFUNC_PCC(%s,%s,%s,%s,\`%s\',\`%s\',\`%s\',%s,%s,%s,%s,%s,%s,%s,%s,%s)dnl\n",
+ my $str = sprintf("_VFUNC_PCC(%s,%s,%s,%s,\`%s\',\`%s\',\`%s\',%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)dnl\n",
$$objCppfunc{name},
$cname,
$$objCppfunc{rettype},
$$objCppfunc{slot_type},
$$objCppfunc{c_data_param_name},
$returnValue,
+ $errReturnValue,
$exceptionHandler);
$self->append($str);
my $keep_return = 0;
my $refreturn_ctype = 0;
my $returnValue = "";
+ my $errReturnValue = "";
my $exceptionHandler = "";
my $custom_vfunc = 0;
my $custom_vfunc_callback = 0;
{
$returnValue = $1;
}
+ # Return value, if the C++ vfunc throws an exception which is propagated
+ # to the C callback.
+ # (Default is the default value of the return type or, if return_value
+ # is specified, the return_value.)
+ elsif($argRef =~ /^err_return_value\s+(.*)/)
+ {
+ $errReturnValue = $1;
+ }
# If exception handler is not defined, then Glib::exception_handlers_invoke
# method will be used for exception handling.
elsif($argRef =~ /^exception_handler\s+(.*)/)
$no_slot_copy = 1;
}
}
+ $errReturnValue = $returnValue if ($returnValue ne "" and $errReturnValue eq "");
$self->output_wrap_vfunc($argCppDecl, $argCName, $$self{filename}, $$self{line_num},
$refreturn, $keep_return, $refreturn_ctype, $custom_vfunc,
$custom_vfunc_callback, $ifdef, $errthrow,
- $slot_name, $slot_callback, $no_slot_copy, $returnValue, $exceptionHandler);
+ $slot_name, $slot_callback, $no_slot_copy,
+ $returnValue, $errReturnValue, $exceptionHandler);
}
# Common part of _WRAP_ENUM(), _WRAP_ENUM_DOCS_ONLY() and _WRAP_GERROR().
# void output_wrap_vfunc($CppDecl, $vfunc_name, $filename, $line_num,
# $refreturn, $keep_return, $refreturn_ctype,
# $custom_vfunc, $custom_vfunc_callback, $ifdef, $errthrow,
-# $slot_name, $slot_callback, $no_slot_copy, $returnValue, $exceptionHandler)
-sub output_wrap_vfunc($$$$$$$$$$$$$$$$$)
+# $slot_name, $slot_callback, $no_slot_copy, $returnValue,
+# $errReturnValue, $exceptionHandler)
+sub output_wrap_vfunc($$$$$$$$$$$$$$$$$$)
{
my ($self, $CppDecl, $vfunc_name, $filename, $line_num, $refreturn, $keep_return, $refreturn_ctype,
$custom_vfunc, $custom_vfunc_callback, $ifdef, $errthrow,
- $slot_name, $slot_callback, $no_slot_copy, $returnValue, $exceptionHandler) = @_;
+ $slot_name, $slot_callback, $no_slot_copy, $returnValue, $errReturnValue, $exceptionHandler) = @_;
#Some checks:
return if ($self->output_wrap_check($CppDecl, $vfunc_name, $filename, $line_num, '_WRAP_VFUNC'));
$$objCppVfunc{rettype_needs_ref} = $refreturn;
$$objCppVfunc{keep_return} = $keep_return;
$$objCppVfunc{return_value} = $returnValue;
+ $$objCppVfunc{err_return_value} = $errReturnValue;
$$objCppVfunc{exception_handler} = $exceptionHandler;
$$objCppVfunc{name} .= "_vfunc"; #All vfuncs should have the "_vfunc" suffix, and a separate easily-named invoker method.