Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gdktexture.h
Go to the documentation of this file.
1/* gdktexture.h
2 *
3 * Copyright 2016 Benjamin Otte
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#pragma once
20
21#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
22#error "Only <gdk/gdk.h> can be included directly."
23#endif
24
25#include <gdk/gdktypes.h>
27
29
30#define GDK_TYPE_TEXTURE (gdk_texture_get_type ())
31
32#define GDK_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_TEXTURE, GdkTexture))
33#define GDK_IS_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_TEXTURE))
34
35typedef struct _GdkTextureClass GdkTextureClass;
36
37#define GDK_TEXTURE_ERROR (gdk_texture_error_quark ())
38
41
42/**
43 * GdkTextureError:
44 * @GDK_TEXTURE_ERROR_TOO_LARGE: Not enough memory to handle this image
45 * @GDK_TEXTURE_ERROR_CORRUPT_IMAGE: The image data appears corrupted
46 * @GDK_TEXTURE_ERROR_UNSUPPORTED_CONTENT: The image contains features
47 * that cannot be loaded
48 * @GDK_TEXTURE_ERROR_UNSUPPORTED_FORMAT: The image format is not supported
49 *
50 * Possible errors that can be returned by `GdkTexture` constructors.
51 *
52 * Since: 4.6
53 */
61
64
68GdkTexture * gdk_texture_new_from_resource (const char *resource_path);
71 GError **error);
74 GError **error);
77 GError **error);
78
85
88
91 guchar *data,
92 gsize stride);
95 const char *filename);
100 const char *filename);
103
105
107
typedefG_BEGIN_DECLS struct _GBytes GBytes
Definition garray.h:38
struct _GdkPixbuf GdkPixbuf
#define GDK_AVAILABLE_IN_4_10
#define GDK_AVAILABLE_IN_4_16
#define GDK_AVAILABLE_IN_4_6
#define GDK_AVAILABLE_IN_ALL
GdkMemoryFormat
Definition gdkenums.h:508
GdkTextureError
Definition gdktexture.h:55
@ GDK_TEXTURE_ERROR_CORRUPT_IMAGE
Definition gdktexture.h:57
@ GDK_TEXTURE_ERROR_UNSUPPORTED_CONTENT
Definition gdktexture.h:58
@ GDK_TEXTURE_ERROR_UNSUPPORTED_FORMAT
Definition gdktexture.h:59
@ GDK_TEXTURE_ERROR_TOO_LARGE
Definition gdktexture.h:56
GDK_AVAILABLE_IN_4_6 gboolean gdk_texture_save_to_tiff(GdkTexture *texture, const char *filename)
GDK_AVAILABLE_IN_4_10 GdkMemoryFormat gdk_texture_get_format(GdkTexture *self) G_GNUC_PURE
GDK_AVAILABLE_IN_4_6 GdkTexture * gdk_texture_new_from_bytes(GBytes *bytes, GError **error)
GDK_AVAILABLE_IN_4_6 GQuark gdk_texture_error_quark(void)
GDK_AVAILABLE_IN_4_16 GdkColorState * gdk_texture_get_color_state(GdkTexture *self)
GDK_AVAILABLE_IN_4_6 GBytes * gdk_texture_save_to_tiff_bytes(GdkTexture *texture)
GDK_AVAILABLE_IN_ALL GdkTexture * gdk_texture_new_from_resource(const char *resource_path)
GDK_AVAILABLE_IN_4_6 GdkTexture * gdk_texture_new_from_filename(const char *path, GError **error)
GDK_AVAILABLE_IN_ALL int gdk_texture_get_width(GdkTexture *texture) G_GNUC_PURE
GDK_AVAILABLE_IN_ALL GdkTexture * gdk_texture_new_for_pixbuf(GdkPixbuf *pixbuf)
GDK_AVAILABLE_IN_4_6 GBytes * gdk_texture_save_to_png_bytes(GdkTexture *texture)
GDK_AVAILABLE_IN_ALL void gdk_texture_download(GdkTexture *texture, guchar *data, gsize stride)
GDK_AVAILABLE_IN_ALL GdkTexture * gdk_texture_new_from_file(GFile *file, GError **error)
GDK_AVAILABLE_IN_ALL gboolean gdk_texture_save_to_png(GdkTexture *texture, const char *filename)
GDK_AVAILABLE_IN_ALL int gdk_texture_get_height(GdkTexture *texture) G_GNUC_PURE
GDK_AVAILABLE_IN_ALL GType gdk_texture_get_type(void) G_GNUC_CONST
struct _GdkTextureClass GdkTextureClass
Definition gdktexture.h:35
struct _GdkTexture GdkTexture
Definition gdktypes.h:82
struct _GdkColorState GdkColorState
Definition gdktypes.h:78
struct _GFile GFile
Definition giotypes.h:74
unsigned long gsize
Definition glibconfig.h:83
#define G_GNUC_PURE
Definition gmacros.h:287
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func)
Definition gmacros.h:1400
GOBJECT_AVAILABLE_IN_ALL void g_object_unref(gpointer object)
G_BEGIN_DECLS typedef guint32 GQuark
Definition gquark.h:38
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
unsigned char guchar
Definition gtypes.h:58
static void error(LoadState *S, const char *why)