forked from AuroraMiddleware/gtk
2cbe094b91
GdkContentFormatsBuilder is currently not introspectable, as it does not have a GType. We can turn it into a boxed type, but we need to implement memory management for it. The current gdk_content_formats_builder_free() function returns a newly constructed value, so we cannot use it as a GBoxedFreeFunc; additionally copying a GdkContentFormatsBuilder contents would make it a bit odd, as you could get multiple identical GdkContentFormats out of the copies. A simple approach is to model the GdkContentFormatsBuilder API to follow the GBytes one: use reference counting for memory management, and have a function to release a reference, return a GdkContentFormats, and reset the GdkContentFormatsBuilder state. For language bindings, we can provide a get_formats() function that returns the GdkContentFormats instance and resets the builder instance, leaving the reference count untouched. For C convenience we can keep gdk_content_formats_builder_free(), and make it a wrapper around gdk_content_formats_builder_get_formats(), with the guarantee that it'll free the builder instance regardless of its current reference count. https://bugzilla.gnome.org/show_bug.cgi?id=793097 https://blogs.gnome.org/otte/2018/02/03/builders/ |
||
---|---|---|
.. | ||
rc | ||
bdfcursor.c | ||
cursor.bdf | ||
gdkcursor-win32.c | ||
gdkdevice-virtual.c | ||
gdkdevice-virtual.h | ||
gdkdevice-win32.c | ||
gdkdevice-win32.h | ||
gdkdevice-wintab.c | ||
gdkdevice-wintab.h | ||
gdkdevicemanager-win32.c | ||
gdkdevicemanager-win32.h | ||
gdkdisplay-win32.c | ||
gdkdisplay-win32.h | ||
gdkdisplaymanager-win32.c | ||
gdkdnd-win32.c | ||
gdkevents-win32.c | ||
gdkgeometry-win32.c | ||
gdkglcontext-win32.c | ||
gdkglcontext-win32.h | ||
gdkglobals-win32.c | ||
gdkkeys-win32.c | ||
gdkmain-win32.c | ||
gdkmonitor-win32.c | ||
gdkmonitor-win32.h | ||
gdkprivate-win32.h | ||
gdkproperty-win32.c | ||
gdkscreen-win32.c | ||
gdkselection-win32.c | ||
gdkselection-win32.h | ||
gdkvulkancontext-win32.c | ||
gdkvulkancontext-win32.h | ||
gdkwin32.h | ||
gdkwin32cursor.h | ||
gdkwin32display.h | ||
gdkwin32displaymanager.h | ||
gdkwin32dnd-private.h | ||
gdkwin32dnd.h | ||
gdkwin32glcontext.h | ||
gdkwin32id.c | ||
gdkwin32keys.h | ||
gdkwin32misc.h | ||
gdkwin32monitor.h | ||
gdkwin32screen.h | ||
gdkwin32window.h | ||
gdkwindow-win32.c | ||
gdkwindow-win32.h | ||
libwntab32x.la | ||
meson.build | ||
pktdef.h | ||
wintab.h | ||
xcursors.h |