File indexing completed on 2025-01-18 09:59:59
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef __G_RESOURCE_H__
0024 #define __G_RESOURCE_H__
0025
0026 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0027 #error "Only <gio/gio.h> can be included directly."
0028 #endif
0029
0030 #include <gio/giotypes.h>
0031
0032 G_BEGIN_DECLS
0033
0034
0035
0036
0037
0038
0039 #define G_TYPE_RESOURCE (g_resource_get_type ())
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049 #define G_RESOURCE_ERROR (g_resource_error_quark ())
0050 GIO_AVAILABLE_IN_2_32
0051 GQuark g_resource_error_quark (void);
0052
0053 typedef struct _GStaticResource GStaticResource;
0054
0055 struct _GStaticResource {
0056
0057 const guint8 *data;
0058 gsize data_len;
0059 GResource *resource;
0060 GStaticResource *next;
0061 gpointer padding;
0062 };
0063
0064 GIO_AVAILABLE_IN_2_32
0065 GType g_resource_get_type (void) G_GNUC_CONST;
0066 GIO_AVAILABLE_IN_2_32
0067 GResource * g_resource_new_from_data (GBytes *data,
0068 GError **error);
0069 GIO_AVAILABLE_IN_2_32
0070 GResource * g_resource_ref (GResource *resource);
0071 GIO_AVAILABLE_IN_2_32
0072 void g_resource_unref (GResource *resource);
0073 GIO_AVAILABLE_IN_2_32
0074 GResource * g_resource_load (const gchar *filename,
0075 GError **error);
0076 GIO_AVAILABLE_IN_2_32
0077 GInputStream *g_resource_open_stream (GResource *resource,
0078 const char *path,
0079 GResourceLookupFlags lookup_flags,
0080 GError **error);
0081 GIO_AVAILABLE_IN_2_32
0082 GBytes * g_resource_lookup_data (GResource *resource,
0083 const char *path,
0084 GResourceLookupFlags lookup_flags,
0085 GError **error);
0086 GIO_AVAILABLE_IN_2_32
0087 char ** g_resource_enumerate_children (GResource *resource,
0088 const char *path,
0089 GResourceLookupFlags lookup_flags,
0090 GError **error);
0091 GIO_AVAILABLE_IN_2_32
0092 gboolean g_resource_get_info (GResource *resource,
0093 const char *path,
0094 GResourceLookupFlags lookup_flags,
0095 gsize *size,
0096 guint32 *flags,
0097 GError **error);
0098
0099 GIO_AVAILABLE_IN_2_32
0100 void g_resources_register (GResource *resource);
0101 GIO_AVAILABLE_IN_2_32
0102 void g_resources_unregister (GResource *resource);
0103 GIO_AVAILABLE_IN_2_32
0104 GInputStream *g_resources_open_stream (const char *path,
0105 GResourceLookupFlags lookup_flags,
0106 GError **error);
0107 GIO_AVAILABLE_IN_2_32
0108 GBytes * g_resources_lookup_data (const char *path,
0109 GResourceLookupFlags lookup_flags,
0110 GError **error);
0111 GIO_AVAILABLE_IN_2_32
0112 char ** g_resources_enumerate_children (const char *path,
0113 GResourceLookupFlags lookup_flags,
0114 GError **error);
0115 GIO_AVAILABLE_IN_2_32
0116 gboolean g_resources_get_info (const char *path,
0117 GResourceLookupFlags lookup_flags,
0118 gsize *size,
0119 guint32 *flags,
0120 GError **error);
0121
0122
0123 GIO_AVAILABLE_IN_2_32
0124 void g_static_resource_init (GStaticResource *static_resource);
0125 GIO_AVAILABLE_IN_2_32
0126 void g_static_resource_fini (GStaticResource *static_resource);
0127 GIO_AVAILABLE_IN_2_32
0128 GResource *g_static_resource_get_resource (GStaticResource *static_resource);
0129
0130 G_END_DECLS
0131
0132 #endif