mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-18 21:10:00 +00:00
gdk: Deprecated some pixbuf apis
These are already documented as 'don't use in new apis'. Lets make it official and deprecate them properly.
This commit is contained in:
parent
d517b25ea3
commit
ed265f6a7e
@ -157,6 +157,9 @@ convert_no_alpha (guchar *dest_data,
|
||||
*
|
||||
* Returns: (nullable) (transfer full): A newly-created pixbuf with a
|
||||
* reference count of 1
|
||||
*
|
||||
* Deprecated: 4.12: Use [class@Gdk.Texture] and subclasses instead
|
||||
* cairo surfaces and pixbufs
|
||||
*/
|
||||
GdkPixbuf *
|
||||
gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
|
||||
@ -234,6 +237,9 @@ pixbuf_texture_unref_cb (guchar *pixels,
|
||||
* to draw it on screen.
|
||||
*
|
||||
* Returns: (transfer full) (nullable): a new `GdkPixbuf`
|
||||
*
|
||||
* Deprecated: 4.12: Use [class@Gdk.Texture] and subclasses instead
|
||||
* cairo surfaces and pixbufs
|
||||
*/
|
||||
GdkPixbuf *
|
||||
gdk_pixbuf_get_from_texture (GdkTexture *texture)
|
@ -33,13 +33,13 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_4_12
|
||||
GdkPixbuf *gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
|
||||
int src_x,
|
||||
int src_y,
|
||||
int width,
|
||||
int height);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GDK_DEPRECATED_IN_4_12
|
||||
GdkPixbuf *gdk_pixbuf_get_from_texture (GdkTexture *texture);
|
||||
|
||||
G_END_DECLS
|
7
gdk/deprecated/meson.build
Normal file
7
gdk/deprecated/meson.build
Normal file
@ -0,0 +1,7 @@
|
||||
gdk_deprecated_sources = [
|
||||
'deprecated/gdkpixbuf.c',
|
||||
]
|
||||
|
||||
gdk_deprecated_headers = [
|
||||
'deprecated/gdkpixbuf.h',
|
||||
]
|
@ -61,7 +61,7 @@
|
||||
#include <gdk/gdkmonitor.h>
|
||||
#include <gdk/gdkpaintable.h>
|
||||
#include <gdk/gdkpango.h>
|
||||
#include <gdk/gdkpixbuf.h>
|
||||
#include <gdk/deprecated/gdkpixbuf.h>
|
||||
#include <gdk/gdkpopup.h>
|
||||
#include <gdk/gdkpopuplayout.h>
|
||||
#include <gdk/gdkrectangle.h>
|
||||
|
@ -22,7 +22,7 @@
|
||||
#endif
|
||||
|
||||
#include <gdk/gdktypes.h>
|
||||
#include <gdk/gdkpixbuf.h>
|
||||
#include <gdk/deprecated/gdkpixbuf.h>
|
||||
#include <pango/pangocairo.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "gdkcontentserializer.h"
|
||||
|
||||
#include "gdkcontentformats.h"
|
||||
#include "gdkpixbuf.h"
|
||||
#include "deprecated/gdkpixbuf.h"
|
||||
#include "filetransferportalprivate.h"
|
||||
#include "gdktextureprivate.h"
|
||||
#include "gdkrgba.h"
|
||||
@ -642,7 +642,9 @@ pixbuf_serializer (GdkContentSerializer *serializer)
|
||||
else if (G_VALUE_HOLDS (value, GDK_TYPE_TEXTURE))
|
||||
{
|
||||
GdkTexture *texture = g_value_get_object (value);
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
pixbuf = gdk_pixbuf_get_from_texture (texture);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1,3 +1,5 @@
|
||||
subdir('deprecated')
|
||||
|
||||
gdk_public_sources = files([
|
||||
'gdk.c',
|
||||
'gdkapplaunchcontext.c',
|
||||
@ -38,7 +40,6 @@ gdk_public_sources = files([
|
||||
'gdkmonitor.c',
|
||||
'gdkpaintable.c',
|
||||
'gdkpango.c',
|
||||
'gdkpixbuf.c',
|
||||
'gdkpipeiostream.c',
|
||||
'gdkrectangle.c',
|
||||
'gdkrgba.c',
|
||||
@ -94,7 +95,6 @@ gdk_public_headers = files([
|
||||
'gdkmonitor.h',
|
||||
'gdkpaintable.h',
|
||||
'gdkpango.h',
|
||||
'gdkpixbuf.h',
|
||||
'gdkrectangle.h',
|
||||
'gdkrgba.h',
|
||||
'gdkseat.h',
|
||||
@ -112,8 +112,9 @@ gdk_public_headers = files([
|
||||
'gdkdragsurface.h',
|
||||
])
|
||||
install_headers(gdk_public_headers, subdir: 'gtk-4.0/gdk/')
|
||||
install_headers(gdk_deprecated_headers, subdir: 'gtk-4.0/gdk/deprecated')
|
||||
|
||||
gdk_sources = gdk_public_sources
|
||||
gdk_sources = gdk_public_sources + gdk_deprecated_sources
|
||||
|
||||
gdk_private_h_sources = files([
|
||||
'gdkeventsprivate.h',
|
||||
|
Loading…
Reference in New Issue
Block a user