@revizly/sharp-libvips-dev 1.0.60 → 1.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cplusplus/VError.cpp +28 -0
- package/include/expat.h +13 -6
- package/include/expat_config.h +3 -3
- package/include/ffi.h +3 -3
- package/include/gio-unix-2.0/gio/gdesktopappinfo.h +40 -23
- package/include/gio-unix-2.0/gio/gunixmounts.h +3 -3
- package/include/glib-2.0/gio/gasyncinitable.h +32 -32
- package/include/glib-2.0/gio/gasyncresult.h +4 -4
- package/include/glib-2.0/gio/gbufferedinputstream.h +28 -28
- package/include/glib-2.0/gio/gbufferedoutputstream.h +3 -3
- package/include/glib-2.0/gio/gcancellable.h +6 -6
- package/include/glib-2.0/gio/gcharsetconverter.h +3 -3
- package/include/glib-2.0/gio/gconverter.h +16 -16
- package/include/glib-2.0/gio/gdatainputstream.h +3 -3
- package/include/glib-2.0/gio/gdataoutputstream.h +25 -25
- package/include/glib-2.0/gio/gfile.h +369 -369
- package/include/glib-2.0/gio/gfileattribute.h +4 -4
- package/include/glib-2.0/gio/gfileenumerator.h +18 -18
- package/include/glib-2.0/gio/gfileinfo.h +63 -63
- package/include/glib-2.0/gio/gfileinputstream.h +11 -11
- package/include/glib-2.0/gio/gfileiostream.h +11 -11
- package/include/glib-2.0/gio/gfilemonitor.h +1 -1
- package/include/glib-2.0/gio/gfileoutputstream.h +8 -8
- package/include/glib-2.0/gio/gicon.h +1 -1
- package/include/glib-2.0/gio/ginetaddress.h +1 -1
- package/include/glib-2.0/gio/ginetaddressmask.h +5 -5
- package/include/glib-2.0/gio/ginitable.h +16 -16
- package/include/glib-2.0/gio/ginputstream.h +47 -47
- package/include/glib-2.0/gio/gio-visibility.h +34 -0
- package/include/glib-2.0/gio/gioenums.h +3 -1
- package/include/glib-2.0/gio/giomodule.h +5 -5
- package/include/glib-2.0/gio/gioscheduler.h +10 -10
- package/include/glib-2.0/gio/giostream.h +16 -16
- package/include/glib-2.0/gio/giotypes.h +13 -12
- package/include/glib-2.0/gio/gloadableicon.h +13 -13
- package/include/glib-2.0/gio/gmemoryinputstream.h +1 -1
- package/include/glib-2.0/gio/gmountoperation.h +14 -14
- package/include/glib-2.0/gio/gnetworkaddress.h +5 -5
- package/include/glib-2.0/gio/gnetworkmonitor.h +10 -10
- package/include/glib-2.0/gio/gnetworkservice.h +2 -2
- package/include/glib-2.0/gio/goutputstream.h +76 -76
- package/include/glib-2.0/gio/gpollableinputstream.h +9 -9
- package/include/glib-2.0/gio/gpollableoutputstream.h +18 -18
- package/include/glib-2.0/gio/gpollableutils.h +18 -18
- package/include/glib-2.0/gio/gproxy.h +25 -25
- package/include/glib-2.0/gio/gproxyaddress.h +6 -6
- package/include/glib-2.0/gio/gproxyresolver.h +25 -25
- package/include/glib-2.0/gio/gresource.h +26 -26
- package/include/glib-2.0/gio/gseekable.h +16 -16
- package/include/glib-2.0/gio/gsimpleasyncresult.h +40 -40
- package/include/glib-2.0/gio/gsocket.h +103 -103
- package/include/glib-2.0/gio/gsocketaddress.h +2 -2
- package/include/glib-2.0/gio/gsocketaddressenumerator.h +14 -14
- package/include/glib-2.0/gio/gsocketclient.h +25 -25
- package/include/glib-2.0/gio/gsocketconnection.h +16 -16
- package/include/glib-2.0/gio/gsocketcontrolmessage.h +8 -8
- package/include/glib-2.0/gio/gsocketlistener.h +15 -15
- package/include/glib-2.0/gio/gsocketservice.h +1 -1
- package/include/glib-2.0/gio/gsrvtarget.h +3 -3
- package/include/glib-2.0/gio/gtcpconnection.h +1 -1
- package/include/glib-2.0/gio/gtcpwrapperconnection.h +1 -1
- package/include/glib-2.0/gio/gtlsbackend.h +1 -1
- package/include/glib-2.0/gio/gtlscertificate.h +10 -10
- package/include/glib-2.0/gio/gtlsclientconnection.h +5 -5
- package/include/glib-2.0/gio/gtlsconnection.h +23 -23
- package/include/glib-2.0/gio/gtlsserverconnection.h +2 -2
- package/include/glib-2.0/gio/gvfs.h +14 -14
- package/include/glib-2.0/gio/gvolume.h +8 -8
- package/include/glib-2.0/gio/gvolumemonitor.h +1 -1
- package/include/glib-2.0/gio/gzlibcompressor.h +1 -1
- package/include/glib-2.0/girepository/gi-visibility.h +34 -0
- package/include/glib-2.0/glib/deprecated/gmain.h +1 -1
- package/include/glib-2.0/glib/deprecated/grel.h +1 -1
- package/include/glib-2.0/glib/deprecated/gthread.h +1 -1
- package/include/glib-2.0/glib/galloca.h +2 -2
- package/include/glib-2.0/glib/garray.h +56 -56
- package/include/glib-2.0/glib/gbookmarkfile.h +93 -93
- package/include/glib-2.0/glib/gconvert.h +43 -43
- package/include/glib-2.0/glib/gdataset.h +14 -14
- package/include/glib-2.0/glib/gdate.h +17 -17
- package/include/glib-2.0/glib/gdir.h +2 -2
- package/include/glib-2.0/glib/gerror.h +1 -1
- package/include/glib-2.0/glib/ghook.h +103 -103
- package/include/glib-2.0/glib/giochannel.h +90 -90
- package/include/glib-2.0/glib/gkeyfile.h +112 -111
- package/include/glib-2.0/glib/glib-visibility.h +34 -0
- package/include/glib-2.0/glib/glist.h +37 -37
- package/include/glib-2.0/glib/gmacros.h +84 -27
- package/include/glib-2.0/glib/gmain.h +10 -10
- package/include/glib-2.0/glib/gmappedfile.h +4 -4
- package/include/glib-2.0/glib/gmarkup.h +2 -2
- package/include/glib-2.0/glib/gmem.h +68 -68
- package/include/glib-2.0/glib/gmessages.h +14 -14
- package/include/glib-2.0/glib/gnode.h +76 -76
- package/include/glib-2.0/glib/goption.h +45 -45
- package/include/glib-2.0/glib/gpattern.h +6 -6
- package/include/glib-2.0/glib/gpoll.h +6 -6
- package/include/glib-2.0/glib/gprimes.h +2 -2
- package/include/glib-2.0/glib/gprintf.h +10 -10
- package/include/glib-2.0/glib/gqsort.h +5 -5
- package/include/glib-2.0/glib/gquark.h +9 -5
- package/include/glib-2.0/glib/gqueue.h +1 -1
- package/include/glib-2.0/glib/grand.h +12 -12
- package/include/glib-2.0/glib/gscanner.h +138 -138
- package/include/glib-2.0/glib/gslice.h +15 -15
- package/include/glib-2.0/glib/gslist.h +34 -34
- package/include/glib-2.0/glib/gspawn.h +1 -1
- package/include/glib-2.0/glib/gstdio.h +16 -10
- package/include/glib-2.0/glib/gstrfuncs.h +63 -63
- package/include/glib-2.0/glib/gtestutils.h +2 -2
- package/include/glib-2.0/glib/gtimer.h +9 -9
- package/include/glib-2.0/glib/gtree.h +3 -3
- package/include/glib-2.0/glib/gtypes.h +166 -166
- package/include/glib-2.0/glib/gutils.h +35 -33
- package/include/glib-2.0/glib/gversionmacros.h +9 -0
- package/include/glib-2.0/glib-object.h +1 -1
- package/include/glib-2.0/glib.h +1 -1
- package/include/glib-2.0/gmodule/gmodule-visibility.h +34 -0
- package/include/glib-2.0/gmodule.h +12 -12
- package/include/glib-2.0/gobject/gclosure.h +82 -82
- package/include/glib-2.0/gobject/genums.h +43 -43
- package/include/glib-2.0/gobject/gmarshal.h +2 -2
- package/include/glib-2.0/gobject/gobject-visibility.h +34 -0
- package/include/glib-2.0/gobject/gobject.h +97 -97
- package/include/glib-2.0/gobject/gobjectnotifyqueue.c +12 -12
- package/include/glib-2.0/gobject/gparam.h +96 -96
- package/include/glib-2.0/gobject/gparamspecs.h +157 -157
- package/include/glib-2.0/gobject/gsignal.h +189 -189
- package/include/glib-2.0/gobject/gsourceclosure.h +1 -1
- package/include/glib-2.0/gobject/gtype.h +139 -139
- package/include/glib-2.0/gobject/gtypemodule.h +5 -5
- package/include/glib-2.0/gobject/gtypeplugin.h +32 -32
- package/include/glib-2.0/gobject/gvalue.h +34 -34
- package/include/glib-2.0/gobject/gvaluearray.h +21 -21
- package/include/glib-2.0/gobject/gvaluecollector.h +117 -117
- package/include/glib-2.0/gobject/gvaluetypes.h +74 -74
- package/include/harfbuzz/hb-font.h +22 -0
- package/include/harfbuzz/hb-ot-layout.h +11 -0
- package/include/harfbuzz/hb-version.h +2 -2
- package/include/libimagequant.h +4 -0
- package/include/vips/VError8.h +3 -4
- package/include/vips/util.h +15 -1
- package/include/vips/version.h +1 -1
- package/package.json +1 -1
- package/versions.json +5 -5
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* This library is distributed in the hope that it will be useful,
|
|
12
12
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14
14
|
* Lesser General Public License for more details.
|
|
15
15
|
*
|
|
16
16
|
* You should have received a copy of the GNU Lesser General Public
|
|
@@ -37,169 +37,169 @@ G_BEGIN_DECLS
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
/* --- typedefs --- */
|
|
40
|
-
typedef struct _GHook
|
|
41
|
-
typedef struct _GHookList
|
|
42
|
-
|
|
43
|
-
typedef gint
|
|
44
|
-
|
|
45
|
-
typedef gboolean
|
|
46
|
-
|
|
47
|
-
typedef void
|
|
48
|
-
|
|
49
|
-
typedef gboolean
|
|
50
|
-
|
|
51
|
-
typedef void
|
|
52
|
-
typedef gboolean
|
|
53
|
-
typedef void
|
|
54
|
-
|
|
40
|
+
typedef struct _GHook GHook;
|
|
41
|
+
typedef struct _GHookList GHookList;
|
|
42
|
+
|
|
43
|
+
typedef gint (*GHookCompareFunc) (GHook *new_hook,
|
|
44
|
+
GHook *sibling);
|
|
45
|
+
typedef gboolean (*GHookFindFunc) (GHook *hook,
|
|
46
|
+
gpointer data);
|
|
47
|
+
typedef void (*GHookMarshaller) (GHook *hook,
|
|
48
|
+
gpointer marshal_data);
|
|
49
|
+
typedef gboolean (*GHookCheckMarshaller) (GHook *hook,
|
|
50
|
+
gpointer marshal_data);
|
|
51
|
+
typedef void (*GHookFunc) (gpointer data);
|
|
52
|
+
typedef gboolean (*GHookCheckFunc) (gpointer data);
|
|
53
|
+
typedef void (*GHookFinalizeFunc) (GHookList *hook_list,
|
|
54
|
+
GHook *hook);
|
|
55
55
|
typedef enum
|
|
56
56
|
{
|
|
57
|
-
G_HOOK_FLAG_ACTIVE
|
|
58
|
-
G_HOOK_FLAG_IN_CALL
|
|
57
|
+
G_HOOK_FLAG_ACTIVE = 1 << 0,
|
|
58
|
+
G_HOOK_FLAG_IN_CALL = 1 << 1,
|
|
59
59
|
G_HOOK_FLAG_RESERVED1 = 1 << 2, /*< private >*/
|
|
60
60
|
G_HOOK_FLAG_RESERVED2 = 1 << 3, /*< private >*/
|
|
61
|
-
G_HOOK_FLAG_MASK
|
|
61
|
+
G_HOOK_FLAG_MASK = 0x0f
|
|
62
62
|
} G_GNUC_FLAG_ENUM GHookFlagMask;
|
|
63
|
-
#define G_HOOK_FLAG_USER_SHIFT
|
|
63
|
+
#define G_HOOK_FLAG_USER_SHIFT (4)
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
/* --- structures --- */
|
|
67
67
|
struct _GHookList
|
|
68
68
|
{
|
|
69
|
-
gulong
|
|
70
|
-
guint
|
|
71
|
-
guint
|
|
72
|
-
GHook
|
|
73
|
-
gpointer
|
|
69
|
+
gulong seq_id;
|
|
70
|
+
guint hook_size : 16;
|
|
71
|
+
guint is_setup : 1;
|
|
72
|
+
GHook *hooks;
|
|
73
|
+
gpointer dummy3;
|
|
74
74
|
GHookFinalizeFunc finalize_hook;
|
|
75
|
-
gpointer
|
|
75
|
+
gpointer dummy[2];
|
|
76
76
|
};
|
|
77
77
|
struct _GHook
|
|
78
78
|
{
|
|
79
|
-
gpointer
|
|
80
|
-
GHook
|
|
81
|
-
GHook
|
|
82
|
-
guint
|
|
83
|
-
gulong
|
|
84
|
-
guint
|
|
85
|
-
gpointer
|
|
79
|
+
gpointer data;
|
|
80
|
+
GHook *next;
|
|
81
|
+
GHook *prev;
|
|
82
|
+
guint ref_count;
|
|
83
|
+
gulong hook_id;
|
|
84
|
+
guint flags;
|
|
85
|
+
gpointer func;
|
|
86
86
|
GDestroyNotify destroy;
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
/* --- macros --- */
|
|
91
|
-
#define
|
|
92
|
-
#define
|
|
93
|
-
#define
|
|
94
|
-
|
|
95
|
-
#define
|
|
96
|
-
|
|
97
|
-
#define G_HOOK_IS_VALID(hook)
|
|
98
|
-
|
|
91
|
+
#define G_HOOK(hook) ((GHook*) (hook))
|
|
92
|
+
#define G_HOOK_FLAGS(hook) (G_HOOK (hook)->flags)
|
|
93
|
+
#define G_HOOK_ACTIVE(hook) ((G_HOOK_FLAGS (hook) & \
|
|
94
|
+
G_HOOK_FLAG_ACTIVE) != 0)
|
|
95
|
+
#define G_HOOK_IN_CALL(hook) ((G_HOOK_FLAGS (hook) & \
|
|
96
|
+
G_HOOK_FLAG_IN_CALL) != 0)
|
|
97
|
+
#define G_HOOK_IS_VALID(hook) (G_HOOK (hook)->hook_id != 0 && \
|
|
98
|
+
(G_HOOK_FLAGS (hook) & \
|
|
99
99
|
G_HOOK_FLAG_ACTIVE))
|
|
100
|
-
#define G_HOOK_IS_UNLINKED(hook)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
#define G_HOOK_IS_UNLINKED(hook) (G_HOOK (hook)->next == NULL && \
|
|
101
|
+
G_HOOK (hook)->prev == NULL && \
|
|
102
|
+
G_HOOK (hook)->hook_id == 0 && \
|
|
103
|
+
G_HOOK (hook)->ref_count == 0)
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
/* --- prototypes --- */
|
|
107
107
|
/* callback maintenance functions */
|
|
108
108
|
GLIB_AVAILABLE_IN_ALL
|
|
109
|
-
void
|
|
110
|
-
|
|
109
|
+
void g_hook_list_init (GHookList *hook_list,
|
|
110
|
+
guint hook_size);
|
|
111
111
|
GLIB_AVAILABLE_IN_ALL
|
|
112
|
-
void
|
|
112
|
+
void g_hook_list_clear (GHookList *hook_list);
|
|
113
113
|
GLIB_AVAILABLE_IN_ALL
|
|
114
|
-
GHook*
|
|
114
|
+
GHook* g_hook_alloc (GHookList *hook_list);
|
|
115
115
|
GLIB_AVAILABLE_IN_ALL
|
|
116
|
-
void
|
|
117
|
-
|
|
116
|
+
void g_hook_free (GHookList *hook_list,
|
|
117
|
+
GHook *hook);
|
|
118
118
|
GLIB_AVAILABLE_IN_ALL
|
|
119
|
-
GHook *
|
|
120
|
-
|
|
119
|
+
GHook * g_hook_ref (GHookList *hook_list,
|
|
120
|
+
GHook *hook);
|
|
121
121
|
GLIB_AVAILABLE_IN_ALL
|
|
122
|
-
void
|
|
123
|
-
|
|
122
|
+
void g_hook_unref (GHookList *hook_list,
|
|
123
|
+
GHook *hook);
|
|
124
124
|
GLIB_AVAILABLE_IN_ALL
|
|
125
|
-
gboolean g_hook_destroy
|
|
126
|
-
|
|
125
|
+
gboolean g_hook_destroy (GHookList *hook_list,
|
|
126
|
+
gulong hook_id);
|
|
127
127
|
GLIB_AVAILABLE_IN_ALL
|
|
128
|
-
void
|
|
129
|
-
|
|
128
|
+
void g_hook_destroy_link (GHookList *hook_list,
|
|
129
|
+
GHook *hook);
|
|
130
130
|
GLIB_AVAILABLE_IN_ALL
|
|
131
|
-
void
|
|
132
|
-
|
|
131
|
+
void g_hook_prepend (GHookList *hook_list,
|
|
132
|
+
GHook *hook);
|
|
133
133
|
GLIB_AVAILABLE_IN_ALL
|
|
134
|
-
void
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
void g_hook_insert_before (GHookList *hook_list,
|
|
135
|
+
GHook *sibling,
|
|
136
|
+
GHook *hook);
|
|
137
137
|
GLIB_AVAILABLE_IN_ALL
|
|
138
|
-
void
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
void g_hook_insert_sorted (GHookList *hook_list,
|
|
139
|
+
GHook *hook,
|
|
140
|
+
GHookCompareFunc func);
|
|
141
141
|
GLIB_AVAILABLE_IN_ALL
|
|
142
|
-
GHook*
|
|
143
|
-
|
|
142
|
+
GHook* g_hook_get (GHookList *hook_list,
|
|
143
|
+
gulong hook_id);
|
|
144
144
|
GLIB_AVAILABLE_IN_ALL
|
|
145
|
-
GHook*
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
GHook* g_hook_find (GHookList *hook_list,
|
|
146
|
+
gboolean need_valids,
|
|
147
|
+
GHookFindFunc func,
|
|
148
|
+
gpointer data);
|
|
149
149
|
GLIB_AVAILABLE_IN_ALL
|
|
150
|
-
GHook*
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
GHook* g_hook_find_data (GHookList *hook_list,
|
|
151
|
+
gboolean need_valids,
|
|
152
|
+
gpointer data);
|
|
153
153
|
GLIB_AVAILABLE_IN_ALL
|
|
154
|
-
GHook*
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
GHook* g_hook_find_func (GHookList *hook_list,
|
|
155
|
+
gboolean need_valids,
|
|
156
|
+
gpointer func);
|
|
157
157
|
GLIB_AVAILABLE_IN_ALL
|
|
158
|
-
GHook*
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
GHook* g_hook_find_func_data (GHookList *hook_list,
|
|
159
|
+
gboolean need_valids,
|
|
160
|
+
gpointer func,
|
|
161
|
+
gpointer data);
|
|
162
162
|
/* return the first valid hook, and increment its reference count */
|
|
163
163
|
GLIB_AVAILABLE_IN_ALL
|
|
164
|
-
GHook*
|
|
165
|
-
|
|
164
|
+
GHook* g_hook_first_valid (GHookList *hook_list,
|
|
165
|
+
gboolean may_be_in_call);
|
|
166
166
|
/* return the next valid hook with incremented reference count, and
|
|
167
167
|
* decrement the reference count of the original hook
|
|
168
168
|
*/
|
|
169
169
|
GLIB_AVAILABLE_IN_ALL
|
|
170
|
-
GHook*
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
GHook* g_hook_next_valid (GHookList *hook_list,
|
|
171
|
+
GHook *hook,
|
|
172
|
+
gboolean may_be_in_call);
|
|
173
173
|
/* GHookCompareFunc implementation to insert hooks sorted by their id */
|
|
174
174
|
GLIB_AVAILABLE_IN_ALL
|
|
175
|
-
gint
|
|
176
|
-
|
|
175
|
+
gint g_hook_compare_ids (GHook *new_hook,
|
|
176
|
+
GHook *sibling);
|
|
177
177
|
/* convenience macros */
|
|
178
|
-
#define
|
|
178
|
+
#define g_hook_append( hook_list, hook ) \
|
|
179
179
|
g_hook_insert_before ((hook_list), NULL, (hook))
|
|
180
180
|
/* invoke all valid hooks with the (*GHookFunc) signature.
|
|
181
181
|
*/
|
|
182
182
|
GLIB_AVAILABLE_IN_ALL
|
|
183
|
-
void
|
|
184
|
-
|
|
183
|
+
void g_hook_list_invoke (GHookList *hook_list,
|
|
184
|
+
gboolean may_recurse);
|
|
185
185
|
/* invoke all valid hooks with the (*GHookCheckFunc) signature,
|
|
186
186
|
* and destroy the hook if FALSE is returned.
|
|
187
187
|
*/
|
|
188
188
|
GLIB_AVAILABLE_IN_ALL
|
|
189
|
-
void
|
|
190
|
-
|
|
189
|
+
void g_hook_list_invoke_check (GHookList *hook_list,
|
|
190
|
+
gboolean may_recurse);
|
|
191
191
|
/* invoke a marshaller on all valid hooks.
|
|
192
192
|
*/
|
|
193
193
|
GLIB_AVAILABLE_IN_ALL
|
|
194
|
-
void
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
194
|
+
void g_hook_list_marshal (GHookList *hook_list,
|
|
195
|
+
gboolean may_recurse,
|
|
196
|
+
GHookMarshaller marshaller,
|
|
197
|
+
gpointer marshal_data);
|
|
198
198
|
GLIB_AVAILABLE_IN_ALL
|
|
199
|
-
void
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
void g_hook_list_marshal_check (GHookList *hook_list,
|
|
200
|
+
gboolean may_recurse,
|
|
201
|
+
GHookCheckMarshaller marshaller,
|
|
202
|
+
gpointer marshal_data);
|
|
203
203
|
|
|
204
204
|
G_END_DECLS
|
|
205
205
|
|
|
@@ -40,7 +40,7 @@ G_BEGIN_DECLS
|
|
|
40
40
|
/* GIOChannel
|
|
41
41
|
*/
|
|
42
42
|
|
|
43
|
-
typedef struct _GIOChannel
|
|
43
|
+
typedef struct _GIOChannel GIOChannel;
|
|
44
44
|
typedef struct _GIOFuncs GIOFuncs;
|
|
45
45
|
|
|
46
46
|
typedef enum
|
|
@@ -122,10 +122,10 @@ typedef enum
|
|
|
122
122
|
G_IO_FLAG_NONE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
|
|
123
123
|
G_IO_FLAG_APPEND = 1 << 0,
|
|
124
124
|
G_IO_FLAG_NONBLOCK = 1 << 1,
|
|
125
|
-
G_IO_FLAG_IS_READABLE = 1 << 2,
|
|
126
|
-
G_IO_FLAG_IS_WRITABLE = 1 << 3,
|
|
125
|
+
G_IO_FLAG_IS_READABLE = 1 << 2, /* Read only flag */
|
|
126
|
+
G_IO_FLAG_IS_WRITABLE = 1 << 3, /* Read only flag */
|
|
127
127
|
G_IO_FLAG_IS_WRITEABLE = 1 << 3, /* Misspelling in 2.29.10 and earlier */
|
|
128
|
-
G_IO_FLAG_IS_SEEKABLE = 1 << 4,
|
|
128
|
+
G_IO_FLAG_IS_SEEKABLE = 1 << 4, /* Read only flag */
|
|
129
129
|
G_IO_FLAG_MASK = (1 << 5) - 1,
|
|
130
130
|
G_IO_FLAG_GET_MASK = G_IO_FLAG_MASK,
|
|
131
131
|
G_IO_FLAG_SET_MASK = G_IO_FLAG_APPEND | G_IO_FLAG_NONBLOCK
|
|
@@ -140,55 +140,55 @@ struct _GIOChannel
|
|
|
140
140
|
gchar *encoding;
|
|
141
141
|
GIConv read_cd;
|
|
142
142
|
GIConv write_cd;
|
|
143
|
-
gchar *line_term;
|
|
144
|
-
guint line_term_len;
|
|
143
|
+
gchar *line_term; /* String which indicates the end of a line of text */
|
|
144
|
+
guint line_term_len; /* So we can have null in the line term */
|
|
145
145
|
|
|
146
146
|
gsize buf_size;
|
|
147
|
-
GString *read_buf;
|
|
147
|
+
GString *read_buf; /* Raw data from the channel */
|
|
148
148
|
GString *encoded_read_buf; /* Channel data converted to UTF-8 */
|
|
149
|
-
GString *write_buf;
|
|
150
|
-
gchar partial_write_buf[6];
|
|
149
|
+
GString *write_buf; /* Data ready to be written to the file */
|
|
150
|
+
gchar partial_write_buf[6]; /* UTF-8 partial characters, null terminated */
|
|
151
151
|
|
|
152
152
|
/* Group the flags together, immediately after partial_write_buf, to save memory */
|
|
153
153
|
|
|
154
|
-
guint use_buffer : 1;
|
|
155
|
-
guint do_encode : 1;
|
|
156
|
-
guint close_on_unref : 1;
|
|
157
|
-
guint is_readable : 1;
|
|
158
|
-
guint is_writeable : 1;
|
|
159
|
-
guint is_seekable : 1;
|
|
154
|
+
guint use_buffer : 1; /* The encoding uses the buffers */
|
|
155
|
+
guint do_encode : 1; /* The encoding uses the GIConv converters */
|
|
156
|
+
guint close_on_unref : 1; /* Close the channel on final unref */
|
|
157
|
+
guint is_readable : 1; /* Cached GIOFlag */
|
|
158
|
+
guint is_writeable : 1; /* ditto */
|
|
159
|
+
guint is_seekable : 1; /* ditto */
|
|
160
160
|
|
|
161
|
-
gpointer reserved1;
|
|
162
|
-
gpointer reserved2;
|
|
161
|
+
gpointer reserved1;
|
|
162
|
+
gpointer reserved2;
|
|
163
163
|
};
|
|
164
164
|
|
|
165
165
|
typedef gboolean (*GIOFunc) (GIOChannel *source,
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
GIOCondition condition,
|
|
167
|
+
gpointer data);
|
|
168
168
|
struct _GIOFuncs
|
|
169
169
|
{
|
|
170
170
|
GIOStatus (*io_read) (GIOChannel *channel,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
171
|
+
gchar *buf,
|
|
172
|
+
gsize count,
|
|
173
|
+
gsize *bytes_read,
|
|
174
|
+
GError **err);
|
|
175
175
|
GIOStatus (*io_write) (GIOChannel *channel,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
const gchar *buf,
|
|
177
|
+
gsize count,
|
|
178
|
+
gsize *bytes_written,
|
|
179
|
+
GError **err);
|
|
180
180
|
GIOStatus (*io_seek) (GIOChannel *channel,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
181
|
+
gint64 offset,
|
|
182
|
+
GSeekType type,
|
|
183
|
+
GError **err);
|
|
184
184
|
GIOStatus (*io_close) (GIOChannel *channel,
|
|
185
|
-
|
|
185
|
+
GError **err);
|
|
186
186
|
GSource* (*io_create_watch) (GIOChannel *channel,
|
|
187
|
-
|
|
187
|
+
GIOCondition condition);
|
|
188
188
|
void (*io_free) (GIOChannel *channel);
|
|
189
189
|
GIOStatus (*io_set_flags) (GIOChannel *channel,
|
|
190
190
|
GIOFlags flags,
|
|
191
|
-
|
|
191
|
+
GError **err);
|
|
192
192
|
GIOFlags (*io_get_flags) (GIOChannel *channel);
|
|
193
193
|
};
|
|
194
194
|
|
|
@@ -221,113 +221,113 @@ void g_io_channel_close (GIOChannel *channel);
|
|
|
221
221
|
|
|
222
222
|
GLIB_AVAILABLE_IN_ALL
|
|
223
223
|
GIOStatus g_io_channel_shutdown (GIOChannel *channel,
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
gboolean flush,
|
|
225
|
+
GError **err);
|
|
226
226
|
GLIB_AVAILABLE_IN_ALL
|
|
227
227
|
guint g_io_add_watch_full (GIOChannel *channel,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
228
|
+
gint priority,
|
|
229
|
+
GIOCondition condition,
|
|
230
|
+
GIOFunc func,
|
|
231
|
+
gpointer user_data,
|
|
232
|
+
GDestroyNotify notify);
|
|
233
233
|
GLIB_AVAILABLE_IN_ALL
|
|
234
234
|
GSource * g_io_create_watch (GIOChannel *channel,
|
|
235
|
-
|
|
235
|
+
GIOCondition condition);
|
|
236
236
|
GLIB_AVAILABLE_IN_ALL
|
|
237
237
|
guint g_io_add_watch (GIOChannel *channel,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
GIOCondition condition,
|
|
239
|
+
GIOFunc func,
|
|
240
|
+
gpointer user_data);
|
|
241
241
|
|
|
242
242
|
/* character encoding conversion involved functions.
|
|
243
243
|
*/
|
|
244
244
|
|
|
245
245
|
GLIB_AVAILABLE_IN_ALL
|
|
246
246
|
void g_io_channel_set_buffer_size (GIOChannel *channel,
|
|
247
|
-
|
|
247
|
+
gsize size);
|
|
248
248
|
GLIB_AVAILABLE_IN_ALL
|
|
249
249
|
gsize g_io_channel_get_buffer_size (GIOChannel *channel);
|
|
250
250
|
GLIB_AVAILABLE_IN_ALL
|
|
251
251
|
GIOCondition g_io_channel_get_buffer_condition (GIOChannel *channel);
|
|
252
252
|
GLIB_AVAILABLE_IN_ALL
|
|
253
253
|
GIOStatus g_io_channel_set_flags (GIOChannel *channel,
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
GIOFlags flags,
|
|
255
|
+
GError **error);
|
|
256
256
|
GLIB_AVAILABLE_IN_ALL
|
|
257
257
|
GIOFlags g_io_channel_get_flags (GIOChannel *channel);
|
|
258
258
|
GLIB_AVAILABLE_IN_ALL
|
|
259
259
|
void g_io_channel_set_line_term (GIOChannel *channel,
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
const gchar *line_term,
|
|
261
|
+
gint length);
|
|
262
262
|
GLIB_AVAILABLE_IN_ALL
|
|
263
263
|
const gchar * g_io_channel_get_line_term (GIOChannel *channel,
|
|
264
|
-
|
|
264
|
+
gint *length);
|
|
265
265
|
GLIB_AVAILABLE_IN_ALL
|
|
266
|
-
void
|
|
267
|
-
|
|
266
|
+
void g_io_channel_set_buffered (GIOChannel *channel,
|
|
267
|
+
gboolean buffered);
|
|
268
268
|
GLIB_AVAILABLE_IN_ALL
|
|
269
|
-
gboolean
|
|
269
|
+
gboolean g_io_channel_get_buffered (GIOChannel *channel);
|
|
270
270
|
GLIB_AVAILABLE_IN_ALL
|
|
271
271
|
GIOStatus g_io_channel_set_encoding (GIOChannel *channel,
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
const gchar *encoding,
|
|
273
|
+
GError **error);
|
|
274
274
|
GLIB_AVAILABLE_IN_ALL
|
|
275
275
|
const gchar * g_io_channel_get_encoding (GIOChannel *channel);
|
|
276
276
|
GLIB_AVAILABLE_IN_ALL
|
|
277
|
-
void g_io_channel_set_close_on_unref
|
|
278
|
-
|
|
277
|
+
void g_io_channel_set_close_on_unref (GIOChannel *channel,
|
|
278
|
+
gboolean do_close);
|
|
279
279
|
GLIB_AVAILABLE_IN_ALL
|
|
280
|
-
gboolean g_io_channel_get_close_on_unref
|
|
280
|
+
gboolean g_io_channel_get_close_on_unref (GIOChannel *channel);
|
|
281
281
|
|
|
282
282
|
|
|
283
283
|
GLIB_AVAILABLE_IN_ALL
|
|
284
284
|
GIOStatus g_io_channel_flush (GIOChannel *channel,
|
|
285
|
-
|
|
285
|
+
GError **error);
|
|
286
286
|
GLIB_AVAILABLE_IN_ALL
|
|
287
287
|
GIOStatus g_io_channel_read_line (GIOChannel *channel,
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
288
|
+
gchar **str_return,
|
|
289
|
+
gsize *length,
|
|
290
|
+
gsize *terminator_pos,
|
|
291
|
+
GError **error);
|
|
292
292
|
GLIB_AVAILABLE_IN_ALL
|
|
293
293
|
GIOStatus g_io_channel_read_line_string (GIOChannel *channel,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
294
|
+
GString *buffer,
|
|
295
|
+
gsize *terminator_pos,
|
|
296
|
+
GError **error);
|
|
297
297
|
GLIB_AVAILABLE_IN_ALL
|
|
298
298
|
GIOStatus g_io_channel_read_to_end (GIOChannel *channel,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
299
|
+
gchar **str_return,
|
|
300
|
+
gsize *length,
|
|
301
|
+
GError **error);
|
|
302
302
|
GLIB_AVAILABLE_IN_ALL
|
|
303
303
|
GIOStatus g_io_channel_read_chars (GIOChannel *channel,
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
304
|
+
gchar *buf,
|
|
305
|
+
gsize count,
|
|
306
|
+
gsize *bytes_read,
|
|
307
|
+
GError **error);
|
|
308
308
|
GLIB_AVAILABLE_IN_ALL
|
|
309
309
|
GIOStatus g_io_channel_read_unichar (GIOChannel *channel,
|
|
310
|
-
|
|
311
|
-
|
|
310
|
+
gunichar *thechar,
|
|
311
|
+
GError **error);
|
|
312
312
|
GLIB_AVAILABLE_IN_ALL
|
|
313
313
|
GIOStatus g_io_channel_write_chars (GIOChannel *channel,
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
314
|
+
const gchar *buf,
|
|
315
|
+
gssize count,
|
|
316
|
+
gsize *bytes_written,
|
|
317
|
+
GError **error);
|
|
318
318
|
GLIB_AVAILABLE_IN_ALL
|
|
319
319
|
GIOStatus g_io_channel_write_unichar (GIOChannel *channel,
|
|
320
|
-
|
|
321
|
-
|
|
320
|
+
gunichar thechar,
|
|
321
|
+
GError **error);
|
|
322
322
|
GLIB_AVAILABLE_IN_ALL
|
|
323
323
|
GIOStatus g_io_channel_seek_position (GIOChannel *channel,
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
324
|
+
gint64 offset,
|
|
325
|
+
GSeekType type,
|
|
326
|
+
GError **error);
|
|
327
327
|
GLIB_AVAILABLE_IN_ALL
|
|
328
328
|
GIOChannel* g_io_channel_new_file (const gchar *filename,
|
|
329
|
-
|
|
330
|
-
|
|
329
|
+
const gchar *mode,
|
|
330
|
+
GError **error);
|
|
331
331
|
|
|
332
332
|
/* Error handling */
|
|
333
333
|
|
|
@@ -379,16 +379,16 @@ GLIB_VAR GSourceFuncs g_io_watch_funcs;
|
|
|
379
379
|
*/
|
|
380
380
|
GLIB_AVAILABLE_IN_ALL
|
|
381
381
|
void g_io_channel_win32_make_pollfd (GIOChannel *channel,
|
|
382
|
-
|
|
383
|
-
|
|
382
|
+
GIOCondition condition,
|
|
383
|
+
GPollFD *fd);
|
|
384
384
|
|
|
385
385
|
/* This can be used to wait until at least one of the channels is readable.
|
|
386
386
|
* On Unix you would do a select() on the file descriptors of the channels.
|
|
387
387
|
*/
|
|
388
388
|
GLIB_AVAILABLE_IN_ALL
|
|
389
389
|
gint g_io_channel_win32_poll (GPollFD *fds,
|
|
390
|
-
|
|
391
|
-
|
|
390
|
+
gint n_fds,
|
|
391
|
+
gint timeout_);
|
|
392
392
|
|
|
393
393
|
/* Create an IO channel for Windows messages for window handle hwnd. */
|
|
394
394
|
#if GLIB_SIZEOF_VOID_P == 8
|