| 1 | /* |
| 2 | * Copyright © 2019 Benjamin Otte |
| 3 | * |
| 4 | * This library is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Lesser General Public |
| 6 | * License as published by the Free Software Foundation; either |
| 7 | * version 2.1 of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This library is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * Lesser General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Lesser General Public |
| 15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 16 | * |
| 17 | * Authors: Benjamin Otte <[email protected]> |
| 18 | */ |
| 19 | |
| 20 | #include "config.h"cxx . . $ `<file>/build/config.h`/ |
| 21 | |
| 22 | #include "gtkdirectorylist.h"cxx . . $ `<file>/gtk/gtkdirectorylist.h`/ |
| 23 | |
| 24 | #include "gtkprivate.h"cxx . . $ `<file>/gtk/gtkprivate.h`/ |
| 25 | |
| 26 | /** |
| 27 | * GtkDirectoryList: |
| 28 | * |
| 29 | * A list model that wraps [[email protected]_children_async]. |
| 30 | * |
| 31 | * It presents a `GListModel` and fills it asynchronously with the `GFileInfo`s |
| 32 | * returned from that function. |
| 33 | * |
| 34 | * Enumeration will start automatically when the |
| 35 | * [[email protected]:file] property is set. |
| 36 | * |
| 37 | * While the `GtkDirectoryList` is being filled, the |
| 38 | * [[email protected]:loading] property will be set to %TRUE. You can |
| 39 | * listen to that property if you want to show information like a `GtkSpinner` |
| 40 | * or a "Loading..." text. |
| 41 | * |
| 42 | * If loading fails at any point, the [[email protected]:error] |
| 43 | * property will be set to give more indication about the failure. |
| 44 | * |
| 45 | * The `GFileInfo`s returned from a `GtkDirectoryList` have the "standard::file" |
| 46 | * attribute set to the `GFile` they refer to. This way you can get at the file |
| 47 | * that is referred to in the same way you would via g_file_enumerator_get_child(). |
| 48 | * This means you do not need access to the `GtkDirectoryList`, but can access |
| 49 | * the `GFile` directly from the `GFileInfo` when operating with a `GtkListView` |
| 50 | * or similar. |
| 51 | */ |
| 52 | |
| 53 | /* random number that everyone else seems to use, too */ |
| 54 | #define FILES_PER_QUERYcxx . . $ `gtk/gtkdirectorylist.c:54:9`! 100 |
| 55 | |
| 56 | enumcxx . . $ $anonymous_type_1549109003eaa11e_0# { |
| 57 | PROP_0cxx . . $ PROP_0., |
| 58 | PROP_ATTRIBUTEScxx . . $ PROP_ATTRIBUTES., |
| 59 | PROP_ERRORcxx . . $ PROP_ERROR., |
| 60 | PROP_FILEcxx . . $ PROP_FILE., |
| 61 | PROP_IO_PRIORITYcxx . . $ PROP_IO_PRIORITY., |
| 62 | PROP_ITEM_TYPEcxx . . $ PROP_ITEM_TYPE., |
| 63 | PROP_LOADINGcxx . . $ PROP_LOADING., |
| 64 | PROP_MONITOREDcxx . . $ PROP_MONITORED., |
| 65 | PROP_N_ITEMScxx . . $ PROP_N_ITEMS., |
| 66 | |
| 67 | NUM_PROPERTIEScxx . . $ NUM_PROPERTIES. |
| 68 | }; |
| 69 | |
| 70 | typedef struct _QueuedEventcxx . . $ _QueuedEvent# QueuedEventcxx . . $ QueuedEvent#; |
| 71 | struct _QueuedEventcxx . . $ _QueuedEvent# |
| 72 | { |
| 73 | GtkDirectoryListcxx . . $ GtkDirectoryList# *listcxx . . $ _QueuedEvent#list.; |
| 74 | GFilecxx . . $ GFile# *filecxx . . $ _QueuedEvent#file.; |
| 75 | GFileInfocxx . . $ GFileInfo# *infocxx . . $ _QueuedEvent#info.; |
| 76 | GFileMonitorEventcxx . . $ GFileMonitorEvent# eventcxx . . $ _QueuedEvent#event.; |
| 77 | }; |
| 78 | |
| 79 | static void |
| 80 | free_queued_eventcxx . . $ free_queued_event(5d22bdacc48458e8). (gpointercxx . . $ gpointer# data) |
| 81 | { |
| 82 | QueuedEventcxx . . $ QueuedEvent# *event = data; |
| 83 | |
| 84 | g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&event->file); |
| 85 | g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&event->info); |
| 86 | g_freecxx . . $ g_free(5d22bdacc48458e8). (event); |
| 87 | } |
| 88 | |
| 89 | struct _GtkDirectoryListcxx . . $ _GtkDirectoryList# |
| 90 | { |
| 91 | GObjectcxx . . $ GObject# parent_instancecxx . . $ _GtkDirectoryList#parent_instance.; |
| 92 | |
| 93 | char *attributescxx . . $ _GtkDirectoryList#attributes.; |
| 94 | GFilecxx . . $ GFile# *filecxx . . $ _GtkDirectoryList#file.; |
| 95 | GFileMonitorcxx . . $ GFileMonitor# *monitorcxx . . $ _GtkDirectoryList#monitor.; |
| 96 | gbooleancxx . . $ gboolean# monitoredcxx . . $ _GtkDirectoryList#monitored.; |
| 97 | int io_prioritycxx . . $ _GtkDirectoryList#io_priority.; |
| 98 | |
| 99 | GCancellablecxx . . $ GCancellable# *cancellablecxx . . $ _GtkDirectoryList#cancellable.; |
| 100 | GErrorcxx . . $ GError# *errorcxx . . $ _GtkDirectoryList#error.; /* Error while loading */ |
| 101 | GSequencecxx . . $ GSequence# *itemscxx . . $ _GtkDirectoryList#items.; /* Use GPtrArray or GListStore here? */ |
| 102 | GQueuecxx . . $ GQueue# eventscxx . . $ _GtkDirectoryList#events.; |
| 103 | }; |
| 104 | |
| 105 | struct _GtkDirectoryListClasscxx . . $ _GtkDirectoryListClass# |
| 106 | { |
| 107 | GObjectClasscxx . . $ GObjectClass# parent_classcxx . . $ _GtkDirectoryListClass#parent_class.; |
| 108 | }; |
| 109 | |
| 110 | static GParamSpeccxx . . $ GParamSpec# *propertiescxx . . $ properties.[NUM_PROPERTIEScxx . . $ NUM_PROPERTIES.] = { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, }; |
| 111 | |
| 112 | static GTypecxx . . $ GType# |
| 113 | gtk_directory_list_get_item_typecxx . . $ gtk_directory_list_get_item_type(94bfa31565da8ed5). (GListModelcxx . . $ GListModel# *list) |
| 114 | { |
| 115 | return G_TYPE_FILE_INFOcxx . . $ `<external>/10155032491143044340/gfileinfo.h:34:9`!; |
| 116 | } |
| 117 | |
| 118 | static guintcxx . . $ guint# |
| 119 | gtk_directory_list_get_n_itemscxx . . $ gtk_directory_list_get_n_items(43b97f6a983b4be8). (GListModelcxx . . $ GListModel# *list) |
| 120 | { |
| 121 | GtkDirectoryListcxx . . $ GtkDirectoryList# *self = GTK_DIRECTORY_LISTcxx . . $ GTK_DIRECTORY_LIST(b47b5c5847638c31). (list); |
| 122 | |
| 123 | return g_sequence_get_lengthcxx . . $ g_sequence_get_length(1b238430be024b3e). (self->itemscxx . . $ _GtkDirectoryList#items.); |
| 124 | } |
| 125 | |
| 126 | static gpointercxx . . $ gpointer# |
| 127 | gtk_directory_list_get_itemcxx . . $ gtk_directory_list_get_item(9715a6516b430a30). (GListModelcxx . . $ GListModel# *list, |
| 128 | guintcxx . . $ guint# position) |
| 129 | { |
| 130 | GtkDirectoryListcxx . . $ GtkDirectoryList# *self = GTK_DIRECTORY_LISTcxx . . $ GTK_DIRECTORY_LIST(b47b5c5847638c31). (list); |
| 131 | GSequenceItercxx . . $ GSequenceIter# *iter; |
| 132 | |
| 133 | iter = g_sequence_get_iter_at_poscxx . . $ g_sequence_get_iter_at_pos(d574b5fce5b65bd). (self->itemscxx . . $ _GtkDirectoryList#items., position); |
| 134 | |
| 135 | if (g_sequence_iter_is_endcxx . . $ g_sequence_iter_is_end(5b8ca6ef87da3483). (iter)) |
| 136 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 137 | else |
| 138 | return g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (g_sequence_get (iter)); |
| 139 | } |
| 140 | |
| 141 | static void |
| 142 | gtk_directory_list_model_initcxx . . $ gtk_directory_list_model_init(41b235b28ecdc2f9). (GListModelInterfacecxx . . $ GListModelInterface# *iface) |
| 143 | { |
| 144 | iface->get_item_typecxx . . $ _GListModelInterface#get_item_type. = gtk_directory_list_get_item_typecxx . . $ gtk_directory_list_get_item_type(94bfa31565da8ed5).; |
| 145 | iface->get_n_itemscxx . . $ _GListModelInterface#get_n_items. = gtk_directory_list_get_n_itemscxx . . $ gtk_directory_list_get_n_items(43b97f6a983b4be8).; |
| 146 | iface->get_itemcxx . . $ _GListModelInterface#get_item. = gtk_directory_list_get_itemcxx . . $ gtk_directory_list_get_item(9715a6516b430a30).; |
| 147 | } |
| 148 | |
| 149 | G_DEFINE_TYPE_WITH_CODEcxx . . $ `<external>/9567554376676449156/gtype.h:1850:9`! (GtkDirectoryList, gtk_directory_list, G_TYPE_OBJECTcxx . . $ `<external>/9567554376676449156/gtype.h:189:9`!, |
| 150 | G_IMPLEMENT_INTERFACEcxx . . $ `<external>/9567554376676449156/gtype.h:2115:9`! (G_TYPE_LIST_MODELcxx . . $ `<external>/10117917155607792737/glistmodel.h:36:9`!, gtk_directory_list_model_init)) |
| 151 | |
| 152 | static void |
| 153 | gtk_directory_list_set_propertycxx . . $ gtk_directory_list_set_property(d7c4bb29f36c0dc4). (GObjectcxx . . $ GObject# *object, |
| 154 | guintcxx . . $ guint# prop_id, |
| 155 | const GValuecxx . . $ GValue# *value, |
| 156 | GParamSpeccxx . . $ GParamSpec# *pspec) |
| 157 | { |
| 158 | GtkDirectoryListcxx . . $ GtkDirectoryList# *self = GTK_DIRECTORY_LISTcxx . . $ GTK_DIRECTORY_LIST(b47b5c5847638c31). (object); |
| 159 | |
| 160 | switch (prop_id) |
| 161 | { |
| 162 | case PROP_ATTRIBUTEScxx . . $ PROP_ATTRIBUTES.: |
| 163 | gtk_directory_list_set_attributescxx . . $ gtk_directory_list_set_attributes(c3bb736b3509ba19). (self, g_value_get_stringcxx . . $ g_value_get_string(cc0a2be2b8f7bdc8). (value)); |
| 164 | break; |
| 165 | case PROP_FILEcxx . . $ PROP_FILE.: |
| 166 | gtk_directory_list_set_filecxx . . $ gtk_directory_list_set_file(b288f38da59aabac). (self, g_value_get_objectcxx . . $ g_value_get_object(e12dff36056c2cce). (value)); |
| 167 | break; |
| 168 | |
| 169 | case PROP_IO_PRIORITYcxx . . $ PROP_IO_PRIORITY.: |
| 170 | gtk_directory_list_set_io_prioritycxx . . $ gtk_directory_list_set_io_priority(843d27e855ff0666). (self, g_value_get_intcxx . . $ g_value_get_int(f890c5c75ead5b21). (value)); |
| 171 | break; |
| 172 | |
| 173 | case PROP_MONITOREDcxx . . $ PROP_MONITORED.: |
| 174 | gtk_directory_list_set_monitoredcxx . . $ gtk_directory_list_set_monitored(843d27e855ff0666). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value)); |
| 175 | break; |
| 176 | |
| 177 | default: |
| 178 | G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, prop_id, pspec); |
| 179 | break; |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | static void |
| 184 | gtk_directory_list_get_propertycxx . . $ gtk_directory_list_get_property(cee2c52f22407c66). (GObjectcxx . . $ GObject# *object, |
| 185 | guintcxx . . $ guint# prop_id, |
| 186 | GValuecxx . . $ GValue# *value, |
| 187 | GParamSpeccxx . . $ GParamSpec# *pspec) |
| 188 | { |
| 189 | GtkDirectoryListcxx . . $ GtkDirectoryList# *self = GTK_DIRECTORY_LISTcxx . . $ GTK_DIRECTORY_LIST(b47b5c5847638c31). (object); |
| 190 | |
| 191 | switch (prop_id) |
| 192 | { |
| 193 | case PROP_ATTRIBUTEScxx . . $ PROP_ATTRIBUTES.: |
| 194 | g_value_set_stringcxx . . $ g_value_set_string(65b9ea7708b82b9b). (value, self->attributescxx . . $ _GtkDirectoryList#attributes.); |
| 195 | break; |
| 196 | |
| 197 | case PROP_ERRORcxx . . $ PROP_ERROR.: |
| 198 | g_value_set_boxedcxx . . $ g_value_set_boxed(806599f585dac18b). (value, self->errorcxx . . $ _GtkDirectoryList#error.); |
| 199 | break; |
| 200 | |
| 201 | case PROP_FILEcxx . . $ PROP_FILE.: |
| 202 | g_value_set_objectcxx . . $ g_value_set_object(e945b84c1e9702f). (value, self->filecxx . . $ _GtkDirectoryList#file.); |
| 203 | break; |
| 204 | |
| 205 | case PROP_IO_PRIORITYcxx . . $ PROP_IO_PRIORITY.: |
| 206 | g_value_set_intcxx . . $ g_value_set_int(b698c61e8e30c4ea). (value, self->io_prioritycxx . . $ _GtkDirectoryList#io_priority.); |
| 207 | break; |
| 208 | |
| 209 | case PROP_ITEM_TYPEcxx . . $ PROP_ITEM_TYPE.: |
| 210 | g_value_set_gtypecxx . . $ g_value_set_gtype(235192cae6c1f0e4). (value, G_TYPE_FILE_INFOcxx . . $ `<external>/10155032491143044340/gfileinfo.h:34:9`!); |
| 211 | break; |
| 212 | |
| 213 | case PROP_LOADINGcxx . . $ PROP_LOADING.: |
| 214 | g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, gtk_directory_list_is_loadingcxx . . $ gtk_directory_list_is_loading(670205e338f6774d). (self)); |
| 215 | break; |
| 216 | |
| 217 | case PROP_MONITOREDcxx . . $ PROP_MONITORED.: |
| 218 | g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, gtk_directory_list_get_monitoredcxx . . $ gtk_directory_list_get_monitored(670205e338f6774d). (self)); |
| 219 | break; |
| 220 | |
| 221 | case PROP_N_ITEMScxx . . $ PROP_N_ITEMS.: |
| 222 | g_value_set_uintcxx . . $ g_value_set_uint(f81c5c84daf56975). (value, g_sequence_get_lengthcxx . . $ g_sequence_get_length(1b238430be024b3e). (self->itemscxx . . $ _GtkDirectoryList#items.)); |
| 223 | break; |
| 224 | |
| 225 | default: |
| 226 | G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, prop_id, pspec); |
| 227 | break; |
| 228 | } |
| 229 | } |
| 230 | |
| 231 | static gbooleancxx . . $ gboolean# |
| 232 | gtk_directory_list_stop_loadingcxx . . $ gtk_directory_list_stop_loading(670205e338f6774d). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self) |
| 233 | { |
| 234 | if (self->cancellablecxx . . $ _GtkDirectoryList#cancellable. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 235 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 236 | |
| 237 | g_cancellable_cancelcxx . . $ g_cancellable_cancel(ff72ec99b913803a). (self->cancellablecxx . . $ _GtkDirectoryList#cancellable.); |
| 238 | g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&self->cancellable); |
| 239 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 240 | } |
| 241 | |
| 242 | static void directory_changedcxx . . $ directory_changed(ddc4a7f2b85a4aef). (GFileMonitorcxx . . $ GFileMonitor# *monitor, |
| 243 | GFilecxx . . $ GFile# *file, |
| 244 | GFilecxx . . $ GFile# *other_file, |
| 245 | GFileMonitorEventcxx . . $ GFileMonitorEvent# event, |
| 246 | gpointercxx . . $ gpointer# data); |
| 247 | |
| 248 | static void |
| 249 | gtk_directory_list_stop_monitoringcxx . . $ gtk_directory_list_stop_monitoring(3563273c400c074c). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self) |
| 250 | { |
| 251 | if (self->monitorcxx . . $ _GtkDirectoryList#monitor.) |
| 252 | g_signal_handlers_disconnect_by_funccxx . . $ `<external>/15952772511652638895/gsignal.h:629:9`! (self->monitor, directory_changed, self); |
| 253 | g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&self->monitor); |
| 254 | } |
| 255 | |
| 256 | static void |
| 257 | gtk_directory_list_disposecxx . . $ gtk_directory_list_dispose(6087475fa43034d3). (GObjectcxx . . $ GObject# *object) |
| 258 | { |
| 259 | GtkDirectoryListcxx . . $ GtkDirectoryList# *self = GTK_DIRECTORY_LISTcxx . . $ GTK_DIRECTORY_LIST(b47b5c5847638c31). (object); |
| 260 | |
| 261 | gtk_directory_list_stop_loadingcxx . . $ gtk_directory_list_stop_loading(670205e338f6774d). (self); |
| 262 | gtk_directory_list_stop_monitoringcxx . . $ gtk_directory_list_stop_monitoring(3563273c400c074c). (self); |
| 263 | |
| 264 | g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&self->file); |
| 265 | g_clear_pointercxx . . $ `<external>/1123956534522462559/gmem.h:135:9`! (&self->attributes, g_free); |
| 266 | |
| 267 | g_clear_errorcxx . . $ g_clear_error(19f343512d040fc2). (&self->errorcxx . . $ _GtkDirectoryList#error.); |
| 268 | g_clear_pointercxx . . $ `<external>/1123956534522462559/gmem.h:135:9`! (&self->items, g_sequence_free); |
| 269 | |
| 270 | g_queue_foreachcxx . . $ g_queue_foreach(60dd2faac4d0444a). (&self->eventscxx . . $ _GtkDirectoryList#events., (GFunccxx . . $ GFunc#) free_queued_eventcxx . . $ free_queued_event(5d22bdacc48458e8)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 271 | g_queue_clearcxx . . $ g_queue_clear(cc2a5da8b60f2a67). (&self->eventscxx . . $ _GtkDirectoryList#events.); |
| 272 | |
| 273 | G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_directory_list_parent_class)->disposecxx . . $ _GObjectClass#dispose. (object); |
| 274 | } |
| 275 | |
| 276 | static void |
| 277 | gtk_directory_list_class_initcxx . . $ gtk_directory_list_class_init(2df6cd400b4b87a8). (GtkDirectoryListClasscxx . . $ GtkDirectoryListClass# *class) |
| 278 | { |
| 279 | GObjectClasscxx . . $ GObjectClass# *gobject_class = G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (class); |
| 280 | |
| 281 | gobject_class->set_propertycxx . . $ _GObjectClass#set_property. = gtk_directory_list_set_propertycxx . . $ gtk_directory_list_set_property(d7c4bb29f36c0dc4).; |
| 282 | gobject_class->get_propertycxx . . $ _GObjectClass#get_property. = gtk_directory_list_get_propertycxx . . $ gtk_directory_list_get_property(cee2c52f22407c66).; |
| 283 | gobject_class->disposecxx . . $ _GObjectClass#dispose. = gtk_directory_list_disposecxx . . $ gtk_directory_list_dispose(6087475fa43034d3).; |
| 284 | |
| 285 | /** |
| 286 | * GtkDirectoryList:attributes: |
| 287 | * |
| 288 | * The attributes to query. |
| 289 | */ |
| 290 | propertiescxx . . $ properties.[PROP_ATTRIBUTEScxx . . $ PROP_ATTRIBUTES.] = |
| 291 | g_param_spec_stringcxx . . $ g_param_spec_string(378e8746be5cd899). ("attributes", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 292 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 293 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`! | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 294 | |
| 295 | /** |
| 296 | * GtkDirectoryList:error: |
| 297 | * |
| 298 | * Error encountered while loading files. |
| 299 | */ |
| 300 | propertiescxx . . $ properties.[PROP_ERRORcxx . . $ PROP_ERROR.] = |
| 301 | g_param_spec_boxedcxx . . $ g_param_spec_boxed(faf99966f027a127). ("error", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 302 | G_TYPE_ERRORcxx . . $ `<external>/9334670746570349148/glib-types.h:161:9`!, |
| 303 | GTK_PARAM_READABLEcxx . . $ `gtk/gtkprivate.h:42:9`! | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 304 | |
| 305 | /** |
| 306 | * GtkDirectoryList:file: |
| 307 | * |
| 308 | * File to query. |
| 309 | */ |
| 310 | propertiescxx . . $ properties.[PROP_FILEcxx . . $ PROP_FILE.] = |
| 311 | g_param_spec_objectcxx . . $ g_param_spec_object(faf99966f027a127). ("file", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 312 | G_TYPE_FILEcxx . . $ `<external>/13962853800498659056/gfile.h:34:9`!, |
| 313 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`! | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 314 | |
| 315 | /** |
| 316 | * GtkDirectoryList:io-priority: |
| 317 | * |
| 318 | * Priority used when loading. |
| 319 | */ |
| 320 | propertiescxx . . $ properties.[PROP_IO_PRIORITYcxx . . $ PROP_IO_PRIORITY.] = |
| 321 | g_param_spec_intcxx . . $ g_param_spec_int(eedf0a930522f60e). ("io-priority", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 322 | -G_MAXINTcxx . . $ `<external>/10505296616216143549/glibconfig.h:39:9`!, G_MAXINTcxx . . $ `<external>/10505296616216143549/glibconfig.h:39:9`!, G_PRIORITY_DEFAULTcxx . . $ `<external>/1856471541377536744/gmain.h:434:9`!, |
| 323 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`! | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 324 | |
| 325 | /** |
| 326 | * GtkDirectoryList:item-type: |
| 327 | * |
| 328 | * The type of items. See [[email protected]_item_type]. |
| 329 | * |
| 330 | * Since: 4.8 |
| 331 | **/ |
| 332 | propertiescxx . . $ properties.[PROP_ITEM_TYPEcxx . . $ PROP_ITEM_TYPE.] = |
| 333 | g_param_spec_gtypecxx . . $ g_param_spec_gtype(faf99966f027a127). ("item-type", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 334 | G_TYPE_FILE_INFOcxx . . $ `<external>/10155032491143044340/gfileinfo.h:34:9`!, |
| 335 | G_PARAM_READABLEcxx . . $ G_PARAM_READABLE. | G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!); |
| 336 | |
| 337 | /** |
| 338 | * GtkDirectoryList:loading: (getter is_loading) |
| 339 | * |
| 340 | * %TRUE if files are being loaded. |
| 341 | */ |
| 342 | propertiescxx . . $ properties.[PROP_LOADINGcxx . . $ PROP_LOADING.] = |
| 343 | g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("loading", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 344 | FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, |
| 345 | GTK_PARAM_READABLEcxx . . $ `gtk/gtkprivate.h:42:9`! | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 346 | |
| 347 | /** |
| 348 | * GtkDirectoryList:monitored: |
| 349 | * |
| 350 | * %TRUE if the directory is monitored for changed. |
| 351 | */ |
| 352 | propertiescxx . . $ properties.[PROP_MONITOREDcxx . . $ PROP_MONITORED.] = |
| 353 | g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("monitored", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 354 | TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, |
| 355 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`! | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.); |
| 356 | |
| 357 | /** |
| 358 | * GtkDirectoryList:n-items: |
| 359 | * |
| 360 | * The number of items. See [[email protected]_n_items]. |
| 361 | * |
| 362 | * Since: 4.8 |
| 363 | **/ |
| 364 | propertiescxx . . $ properties.[PROP_N_ITEMScxx . . $ PROP_N_ITEMS.] = |
| 365 | g_param_spec_uintcxx . . $ g_param_spec_uint(503a1013c8de17d5). ("n-items", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 366 | 0, G_MAXUINTcxx . . $ `<external>/10505296616216143549/glibconfig.h:40:9`!, 0, |
| 367 | G_PARAM_READABLEcxx . . $ G_PARAM_READABLE. | G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!); |
| 368 | |
| 369 | g_object_class_install_propertiescxx . . $ g_object_class_install_properties(569d03e6a4088541). (gobject_class, NUM_PROPERTIEScxx . . $ NUM_PROPERTIES., propertiescxx . . $ properties.); |
| 370 | } |
| 371 | |
| 372 | static void |
| 373 | gtk_directory_list_initcxx . . $ gtk_directory_list_init(3563273c400c074c). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self) |
| 374 | { |
| 375 | self->itemscxx . . $ _GtkDirectoryList#items. = g_sequence_newcxx . . $ g_sequence_new(10e7cce8a0a0b6c3). (g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).); |
| 376 | self->io_prioritycxx . . $ _GtkDirectoryList#io_priority. = G_PRIORITY_DEFAULTcxx . . $ `<external>/1856471541377536744/gmain.h:434:9`!; |
| 377 | self->monitoredcxx . . $ _GtkDirectoryList#monitored. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 378 | g_queue_initcxx . . $ g_queue_init(cc2a5da8b60f2a67). (&self->eventscxx . . $ _GtkDirectoryList#events.); |
| 379 | } |
| 380 | |
| 381 | /** |
| 382 | * gtk_directory_list_new: |
| 383 | * @file: (nullable): The file to query |
| 384 | * @attributes: (nullable): The attributes to query with |
| 385 | * |
| 386 | * Creates a new `GtkDirectoryList`. |
| 387 | * |
| 388 | * The `GtkDirectoryList` is querying the given @file |
| 389 | * with the given @attributes. |
| 390 | * |
| 391 | * Returns: a new `GtkDirectoryList` |
| 392 | **/ |
| 393 | GtkDirectoryListcxx . . $ GtkDirectoryList# * |
| 394 | gtk_directory_list_newcxx . . $ gtk_directory_list_new(7b1dece1056ed0a). (const char *attributes, |
| 395 | GFilecxx . . $ GFile# *file) |
| 396 | { |
| 397 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (file == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || G_IS_FILEcxx . . $ `<external>/13962853800498659056/gfile.h:36:9`! (file), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 398 | |
| 399 | return g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GTK_TYPE_DIRECTORY_LISTcxx . . $ `gtk/gtkdirectorylist.h:34:9`!, |
| 400 | "attributes", attributes, |
| 401 | "file", file, |
| 402 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 403 | } |
| 404 | |
| 405 | static void |
| 406 | gtk_directory_list_clear_itemscxx . . $ gtk_directory_list_clear_items(3563273c400c074c). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self) |
| 407 | { |
| 408 | guintcxx . . $ guint# n_items; |
| 409 | |
| 410 | n_items = g_sequence_get_lengthcxx . . $ g_sequence_get_length(1b238430be024b3e). (self->itemscxx . . $ _GtkDirectoryList#items.); |
| 411 | if (n_items > 0) |
| 412 | { |
| 413 | g_sequence_remove_rangecxx . . $ g_sequence_remove_range(d20620c625baf280). (g_sequence_get_begin_itercxx . . $ g_sequence_get_begin_iter(c65380f4a12a3407). (self->itemscxx . . $ _GtkDirectoryList#items.), |
| 414 | g_sequence_get_end_itercxx . . $ g_sequence_get_end_iter(c65380f4a12a3407). (self->itemscxx . . $ _GtkDirectoryList#items.)); |
| 415 | |
| 416 | g_list_model_items_changedcxx . . $ g_list_model_items_changed(2896dae0034144d8). (G_LIST_MODELcxx . . $ G_LIST_MODEL(26f73d2a39e7201f). (self), 0, n_items, 0); |
| 417 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_N_ITEMScxx . . $ PROP_N_ITEMS.]); |
| 418 | } |
| 419 | |
| 420 | if (self->errorcxx . . $ _GtkDirectoryList#error.) |
| 421 | { |
| 422 | g_clear_errorcxx . . $ g_clear_error(19f343512d040fc2). (&self->errorcxx . . $ _GtkDirectoryList#error.); |
| 423 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_ERRORcxx . . $ PROP_ERROR.]); |
| 424 | } |
| 425 | } |
| 426 | |
| 427 | static void |
| 428 | gtk_directory_list_enumerator_closed_cbcxx . . $ gtk_directory_list_enumerator_closed_cb(aa1d200d824d915d). (GObjectcxx . . $ GObject# *source, |
| 429 | GAsyncResultcxx . . $ GAsyncResult# *res, |
| 430 | gpointercxx . . $ gpointer# user_data) |
| 431 | { |
| 432 | g_file_enumerator_close_finishcxx . . $ g_file_enumerator_close_finish(6b7fb17460d54a67). (G_FILE_ENUMERATORcxx . . $ `<external>/17772405940456390569/gfileenumerator.h:35:9`! (source), res, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 433 | } |
| 434 | |
| 435 | static void |
| 436 | gtk_directory_list_got_files_cbcxx . . $ gtk_directory_list_got_files_cb(aa1d200d824d915d). (GObjectcxx . . $ GObject# *source, |
| 437 | GAsyncResultcxx . . $ GAsyncResult# *res, |
| 438 | gpointercxx . . $ gpointer# user_data) |
| 439 | { |
| 440 | GtkDirectoryListcxx . . $ GtkDirectoryList# *self = user_data; /* invalid if cancelled */ |
| 441 | GFileEnumeratorcxx . . $ GFileEnumerator# *enumerator = G_FILE_ENUMERATORcxx . . $ `<external>/17772405940456390569/gfileenumerator.h:35:9`! (source); |
| 442 | GErrorcxx . . $ GError# *error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 443 | GListcxx . . $ GList# *l, *files; |
| 444 | guintcxx . . $ guint# n; |
| 445 | |
| 446 | files = g_file_enumerator_next_files_finishcxx . . $ g_file_enumerator_next_files_finish(2d126dd78024480a). (enumerator, res, &error); |
| 447 | |
| 448 | if (files == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 449 | { |
| 450 | if (g_error_matchescxx . . $ g_error_matches(604444fafc3e7b63). (error, G_IO_ERRORcxx . . $ `<external>/13894955190784973534/gioerror.h:42:9`!, G_IO_ERROR_CANCELLEDcxx . . $ G_IO_ERROR_CANCELLED.)) |
| 451 | { |
| 452 | g_clear_errorcxx . . $ g_clear_error(19f343512d040fc2). (&error); |
| 453 | return; |
| 454 | } |
| 455 | |
| 456 | g_file_enumerator_close_asynccxx . . $ g_file_enumerator_close_async(5fc99facc6bf4e7a). (enumerator, |
| 457 | self->io_prioritycxx . . $ _GtkDirectoryList#io_priority., |
| 458 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 459 | gtk_directory_list_enumerator_closed_cbcxx . . $ gtk_directory_list_enumerator_closed_cb(aa1d200d824d915d)., |
| 460 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 461 | |
| 462 | g_object_freeze_notifycxx . . $ g_object_freeze_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 463 | |
| 464 | g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&self->cancellable); |
| 465 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_LOADINGcxx . . $ PROP_LOADING.]); |
| 466 | |
| 467 | if (error) |
| 468 | { |
| 469 | self->errorcxx . . $ _GtkDirectoryList#error. = error; |
| 470 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_ERRORcxx . . $ PROP_ERROR.]); |
| 471 | } |
| 472 | |
| 473 | g_object_thaw_notifycxx . . $ g_object_thaw_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 474 | return; |
| 475 | } |
| 476 | |
| 477 | n = 0; |
| 478 | for (l = files; l; l = l->nextcxx . . $ _GList#next.) |
| 479 | { |
| 480 | GFileInfocxx . . $ GFileInfo# *info; |
| 481 | GFilecxx . . $ GFile# *file; |
| 482 | |
| 483 | info = l->datacxx . . $ _GList#data.; |
| 484 | file = g_file_enumerator_get_childcxx . . $ g_file_enumerator_get_child(1a747664d7f7b64e). (enumerator, info); |
| 485 | g_file_info_set_attribute_objectcxx . . $ g_file_info_set_attribute_object(894c8d0b59322c35). (info, "standard::file", G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (file)); |
| 486 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (file); |
| 487 | g_sequence_appendcxx . . $ g_sequence_append(a2ec852d5817d205). (self->itemscxx . . $ _GtkDirectoryList#items., info); |
| 488 | n++; |
| 489 | } |
| 490 | g_list_freecxx . . $ g_list_free(d1b6ff1ff9a6d4b6). (files); |
| 491 | |
| 492 | g_file_enumerator_next_files_asynccxx . . $ g_file_enumerator_next_files_async(38e6f4b133c84239). (enumerator, |
| 493 | g_file_is_nativecxx . . $ g_file_is_native(1c6b5e197c84b8bc). (self->filecxx . . $ _GtkDirectoryList#file.) ? 50 * FILES_PER_QUERYcxx . . $ `gtk/gtkdirectorylist.c:54:9`! : FILES_PER_QUERYcxx . . $ `gtk/gtkdirectorylist.c:54:9`!, |
| 494 | self->io_prioritycxx . . $ _GtkDirectoryList#io_priority., |
| 495 | self->cancellablecxx . . $ _GtkDirectoryList#cancellable., |
| 496 | gtk_directory_list_got_files_cbcxx . . $ gtk_directory_list_got_files_cb(aa1d200d824d915d)., |
| 497 | self); |
| 498 | |
| 499 | if (n > 0) |
| 500 | { |
| 501 | g_list_model_items_changedcxx . . $ g_list_model_items_changed(2896dae0034144d8). (G_LIST_MODELcxx . . $ G_LIST_MODEL(26f73d2a39e7201f). (self), g_sequence_get_lengthcxx . . $ g_sequence_get_length(1b238430be024b3e). (self->itemscxx . . $ _GtkDirectoryList#items.) - n, 0, n); |
| 502 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_N_ITEMScxx . . $ PROP_N_ITEMS.]); |
| 503 | } |
| 504 | } |
| 505 | |
| 506 | static void |
| 507 | gtk_directory_list_got_enumerator_cbcxx . . $ gtk_directory_list_got_enumerator_cb(aa1d200d824d915d). (GObjectcxx . . $ GObject# *source, |
| 508 | GAsyncResultcxx . . $ GAsyncResult# *res, |
| 509 | gpointercxx . . $ gpointer# user_data) |
| 510 | { |
| 511 | GtkDirectoryListcxx . . $ GtkDirectoryList# *self = user_data; /* invalid if cancelled */ |
| 512 | GFilecxx . . $ GFile# *file = G_FILEcxx . . $ `<external>/13962853800498659056/gfile.h:35:9`! (source); |
| 513 | GFileEnumeratorcxx . . $ GFileEnumerator# *enumerator; |
| 514 | GErrorcxx . . $ GError# *error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 515 | |
| 516 | enumerator = g_file_enumerate_children_finishcxx . . $ g_file_enumerate_children_finish(790fe2af7c9a0838). (file, res, &error); |
| 517 | if (enumerator == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 518 | { |
| 519 | if (g_error_matchescxx . . $ g_error_matches(604444fafc3e7b63). (error, G_IO_ERRORcxx . . $ `<external>/13894955190784973534/gioerror.h:42:9`!, G_IO_ERROR_CANCELLEDcxx . . $ G_IO_ERROR_CANCELLED.)) |
| 520 | { |
| 521 | g_clear_errorcxx . . $ g_clear_error(19f343512d040fc2). (&error); |
| 522 | return; |
| 523 | } |
| 524 | |
| 525 | g_object_freeze_notifycxx . . $ g_object_freeze_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 526 | self->errorcxx . . $ _GtkDirectoryList#error. = error; |
| 527 | g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&self->cancellable); |
| 528 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_LOADINGcxx . . $ PROP_LOADING.]); |
| 529 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_ERRORcxx . . $ PROP_ERROR.]); |
| 530 | g_object_thaw_notifycxx . . $ g_object_thaw_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 531 | return; |
| 532 | } |
| 533 | |
| 534 | g_file_enumerator_next_files_asynccxx . . $ g_file_enumerator_next_files_async(38e6f4b133c84239). (enumerator, |
| 535 | g_file_is_nativecxx . . $ g_file_is_native(1c6b5e197c84b8bc). (file) ? 50 * FILES_PER_QUERYcxx . . $ `gtk/gtkdirectorylist.c:54:9`! : FILES_PER_QUERYcxx . . $ `gtk/gtkdirectorylist.c:54:9`!, |
| 536 | self->io_prioritycxx . . $ _GtkDirectoryList#io_priority., |
| 537 | self->cancellablecxx . . $ _GtkDirectoryList#cancellable., |
| 538 | gtk_directory_list_got_files_cbcxx . . $ gtk_directory_list_got_files_cb(aa1d200d824d915d)., |
| 539 | self); |
| 540 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (enumerator); |
| 541 | } |
| 542 | |
| 543 | static void |
| 544 | gtk_directory_list_start_loadingcxx . . $ gtk_directory_list_start_loading(3563273c400c074c). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self) |
| 545 | { |
| 546 | gbooleancxx . . $ gboolean# was_loading; |
| 547 | char *glib_apis_suck; |
| 548 | |
| 549 | was_loading = gtk_directory_list_stop_loadingcxx . . $ gtk_directory_list_stop_loading(670205e338f6774d). (self); |
| 550 | gtk_directory_list_clear_itemscxx . . $ gtk_directory_list_clear_items(3563273c400c074c). (self); |
| 551 | |
| 552 | if (self->filecxx . . $ _GtkDirectoryList#file. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 553 | { |
| 554 | if (was_loading) |
| 555 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_LOADINGcxx . . $ PROP_LOADING.]); |
| 556 | return; |
| 557 | } |
| 558 | |
| 559 | glib_apis_suck = g_strconcatcxx . . $ g_strconcat(a849077ff1b8d812). ("standard::name,", self->attributescxx . . $ _GtkDirectoryList#attributes., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 560 | self->cancellablecxx . . $ _GtkDirectoryList#cancellable. = g_cancellable_newcxx . . $ g_cancellable_new(decaddcb7afe0309). (); |
| 561 | g_file_enumerate_children_asynccxx . . $ g_file_enumerate_children_async(af983d0ac17f9c97). (self->filecxx . . $ _GtkDirectoryList#file., |
| 562 | glib_apis_suck, |
| 563 | G_FILE_QUERY_INFO_NONEcxx . . $ G_FILE_QUERY_INFO_NONE., |
| 564 | self->io_prioritycxx . . $ _GtkDirectoryList#io_priority., |
| 565 | self->cancellablecxx . . $ _GtkDirectoryList#cancellable., |
| 566 | gtk_directory_list_got_enumerator_cbcxx . . $ gtk_directory_list_got_enumerator_cb(aa1d200d824d915d)., |
| 567 | self); |
| 568 | g_freecxx . . $ g_free(5d22bdacc48458e8). (glib_apis_suck); |
| 569 | |
| 570 | if (!was_loading) |
| 571 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_LOADINGcxx . . $ PROP_LOADING.]); |
| 572 | } |
| 573 | |
| 574 | static GSequenceItercxx . . $ GSequenceIter# * |
| 575 | find_filecxx . . $ find_file(59fd09b64be04a35). (GSequencecxx . . $ GSequence# *sequence, |
| 576 | GFilecxx . . $ GFile# *file) |
| 577 | { |
| 578 | GSequenceItercxx . . $ GSequenceIter# *iter; |
| 579 | |
| 580 | for (iter = g_sequence_get_begin_itercxx . . $ g_sequence_get_begin_iter(c65380f4a12a3407). (sequence); |
| 581 | !g_sequence_iter_is_endcxx . . $ g_sequence_iter_is_end(5b8ca6ef87da3483). (iter); |
| 582 | iter = g_sequence_iter_nextcxx . . $ g_sequence_iter_next(5ad1731c2fb84d98). (iter)) |
| 583 | { |
| 584 | GFileInfocxx . . $ GFileInfo# *item = G_FILE_INFOcxx . . $ `<external>/10155032491143044340/gfileinfo.h:35:9`! (g_sequence_get (iter)); |
| 585 | GFilecxx . . $ GFile# *f = G_FILEcxx . . $ `<external>/13962853800498659056/gfile.h:35:9`! (g_file_info_get_attribute_object (item, "standard::file")); |
| 586 | |
| 587 | if (g_file_equalcxx . . $ g_file_equal(248007fe659871da). (f, file)) |
| 588 | return iter; |
| 589 | } |
| 590 | |
| 591 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 592 | } |
| 593 | |
| 594 | static gbooleancxx . . $ gboolean# |
| 595 | handle_eventcxx . . $ handle_event(90360b42afa5c462). (QueuedEventcxx . . $ QueuedEvent# *event) |
| 596 | { |
| 597 | GtkDirectoryListcxx . . $ GtkDirectoryList# *self = event->listcxx . . $ _QueuedEvent#list.; |
| 598 | GFilecxx . . $ GFile# *file = event->filecxx . . $ _QueuedEvent#file.; |
| 599 | GFileInfocxx . . $ GFileInfo# *info = event->infocxx . . $ _QueuedEvent#info.; |
| 600 | GSequenceItercxx . . $ GSequenceIter# *iter; |
| 601 | unsigned int position; |
| 602 | |
| 603 | switch ((int)event->eventcxx . . $ _QueuedEvent#event.) |
| 604 | { |
| 605 | case G_FILE_MONITOR_EVENT_MOVED_INcxx . . $ G_FILE_MONITOR_EVENT_MOVED_IN.: |
| 606 | case G_FILE_MONITOR_EVENT_CREATEDcxx . . $ G_FILE_MONITOR_EVENT_CREATED.: |
| 607 | if (!info) |
| 608 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 609 | |
| 610 | g_file_info_set_attribute_objectcxx . . $ g_file_info_set_attribute_object(894c8d0b59322c35). (info, "standard::file", G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (file)); |
| 611 | |
| 612 | iter = find_filecxx . . $ find_file(59fd09b64be04a35). (self->itemscxx . . $ _GtkDirectoryList#items., file); |
| 613 | if (iter) |
| 614 | { |
| 615 | position = g_sequence_iter_get_positioncxx . . $ g_sequence_iter_get_position(5b8ca6ef87da3483). (iter); |
| 616 | g_sequence_setcxx . . $ g_sequence_set(5759cc2eef4eaac9). (iter, g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (info)); |
| 617 | g_list_model_items_changedcxx . . $ g_list_model_items_changed(2896dae0034144d8). (G_LIST_MODELcxx . . $ G_LIST_MODEL(26f73d2a39e7201f). (self), position, 1, 1); |
| 618 | } |
| 619 | else |
| 620 | { |
| 621 | position = g_sequence_get_lengthcxx . . $ g_sequence_get_length(1b238430be024b3e). (self->itemscxx . . $ _GtkDirectoryList#items.); |
| 622 | g_sequence_appendcxx . . $ g_sequence_append(a2ec852d5817d205). (self->itemscxx . . $ _GtkDirectoryList#items., g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (info)); |
| 623 | g_list_model_items_changedcxx . . $ g_list_model_items_changed(2896dae0034144d8). (G_LIST_MODELcxx . . $ G_LIST_MODEL(26f73d2a39e7201f). (self), position, 0, 1); |
| 624 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_N_ITEMScxx . . $ PROP_N_ITEMS.]); |
| 625 | } |
| 626 | break; |
| 627 | |
| 628 | case G_FILE_MONITOR_EVENT_MOVED_OUTcxx . . $ G_FILE_MONITOR_EVENT_MOVED_OUT.: |
| 629 | case G_FILE_MONITOR_EVENT_DELETEDcxx . . $ G_FILE_MONITOR_EVENT_DELETED.: |
| 630 | iter = find_filecxx . . $ find_file(59fd09b64be04a35). (self->itemscxx . . $ _GtkDirectoryList#items., file); |
| 631 | if (iter) |
| 632 | { |
| 633 | position = g_sequence_iter_get_positioncxx . . $ g_sequence_iter_get_position(5b8ca6ef87da3483). (iter); |
| 634 | g_sequence_removecxx . . $ g_sequence_remove(63e94b58455269fd). (iter); |
| 635 | g_list_model_items_changedcxx . . $ g_list_model_items_changed(2896dae0034144d8). (G_LIST_MODELcxx . . $ G_LIST_MODEL(26f73d2a39e7201f). (self), position, 1, 0); |
| 636 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_N_ITEMScxx . . $ PROP_N_ITEMS.]); |
| 637 | } |
| 638 | break; |
| 639 | |
| 640 | case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGEDcxx . . $ G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED.: |
| 641 | if (!info) |
| 642 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 643 | |
| 644 | g_file_info_set_attribute_objectcxx . . $ g_file_info_set_attribute_object(894c8d0b59322c35). (info, "standard::file", G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (file)); |
| 645 | |
| 646 | iter = find_filecxx . . $ find_file(59fd09b64be04a35). (self->itemscxx . . $ _GtkDirectoryList#items., file); |
| 647 | if (iter) |
| 648 | { |
| 649 | position = g_sequence_iter_get_positioncxx . . $ g_sequence_iter_get_position(5b8ca6ef87da3483). (iter); |
| 650 | g_sequence_setcxx . . $ g_sequence_set(5759cc2eef4eaac9). (iter, g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (info)); |
| 651 | g_list_model_items_changedcxx . . $ g_list_model_items_changed(2896dae0034144d8). (G_LIST_MODELcxx . . $ G_LIST_MODEL(26f73d2a39e7201f). (self), position, 1, 1); |
| 652 | } |
| 653 | break; |
| 654 | |
| 655 | default: |
| 656 | g_assert_not_reachedcxx . . $ `<external>/15287032793271088244/gtestutils.h:274:9`! (); |
| 657 | } |
| 658 | |
| 659 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 660 | } |
| 661 | |
| 662 | static void |
| 663 | handle_eventscxx . . $ handle_events(3563273c400c074c). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self) |
| 664 | { |
| 665 | QueuedEventcxx . . $ QueuedEvent# *event; |
| 666 | |
| 667 | do |
| 668 | { |
| 669 | event = g_queue_peek_tailcxx . . $ g_queue_peek_tail(c6ab1b9245a3340). (&self->eventscxx . . $ _GtkDirectoryList#events.); |
| 670 | if (!event) |
| 671 | return; |
| 672 | |
| 673 | if (!handle_eventcxx . . $ handle_event(90360b42afa5c462). (event)) |
| 674 | return; |
| 675 | |
| 676 | event = g_queue_pop_tailcxx . . $ g_queue_pop_tail(c6ab1b9245a3340). (&self->eventscxx . . $ _GtkDirectoryList#events.); |
| 677 | free_queued_eventcxx . . $ free_queued_event(5d22bdacc48458e8). (event); |
| 678 | } |
| 679 | while (TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 680 | } |
| 681 | |
| 682 | static void |
| 683 | got_new_file_info_cbcxx . . $ got_new_file_info_cb(aa1d200d824d915d). (GObjectcxx . . $ GObject# *source, |
| 684 | GAsyncResultcxx . . $ GAsyncResult# *res, |
| 685 | gpointercxx . . $ gpointer# data) |
| 686 | { |
| 687 | QueuedEventcxx . . $ QueuedEvent# *event = data; |
| 688 | GtkDirectoryListcxx . . $ GtkDirectoryList# *self = event->listcxx . . $ _QueuedEvent#list.; |
| 689 | GFilecxx . . $ GFile# *file = event->filecxx . . $ _QueuedEvent#file.; |
| 690 | |
| 691 | event->infocxx . . $ _QueuedEvent#info. = g_file_query_info_finishcxx . . $ g_file_query_info_finish(283254bc22830d4b). (file, res, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 692 | handle_eventscxx . . $ handle_events(3563273c400c074c). (self); |
| 693 | } |
| 694 | |
| 695 | static void |
| 696 | got_existing_file_info_cbcxx . . $ got_existing_file_info_cb(aa1d200d824d915d). (GObjectcxx . . $ GObject# *source, |
| 697 | GAsyncResultcxx . . $ GAsyncResult# *res, |
| 698 | gpointercxx . . $ gpointer# data) |
| 699 | { |
| 700 | QueuedEventcxx . . $ QueuedEvent# *event = data; |
| 701 | GtkDirectoryListcxx . . $ GtkDirectoryList# *self = event->listcxx . . $ _QueuedEvent#list.; |
| 702 | GFilecxx . . $ GFile# *file = event->filecxx . . $ _QueuedEvent#file.; |
| 703 | |
| 704 | event->infocxx . . $ _QueuedEvent#info. = g_file_query_info_finishcxx . . $ g_file_query_info_finish(283254bc22830d4b). (file, res, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 705 | handle_eventscxx . . $ handle_events(3563273c400c074c). (self); |
| 706 | } |
| 707 | |
| 708 | static void |
| 709 | directory_changedcxx . . $ directory_changed(ddc4a7f2b85a4aef). (GFileMonitorcxx . . $ GFileMonitor# *monitor, |
| 710 | GFilecxx . . $ GFile# *file, |
| 711 | GFilecxx . . $ GFile# *other_file, |
| 712 | GFileMonitorEventcxx . . $ GFileMonitorEvent# event, |
| 713 | gpointercxx . . $ gpointer# data) |
| 714 | { |
| 715 | GtkDirectoryListcxx . . $ GtkDirectoryList# *self = GTK_DIRECTORY_LISTcxx . . $ GTK_DIRECTORY_LIST(b47b5c5847638c31). (data); |
| 716 | QueuedEventcxx . . $ QueuedEvent# *ev; |
| 717 | |
| 718 | switch (event) |
| 719 | { |
| 720 | case G_FILE_MONITOR_EVENT_MOVED_INcxx . . $ G_FILE_MONITOR_EVENT_MOVED_IN.: |
| 721 | case G_FILE_MONITOR_EVENT_CREATEDcxx . . $ G_FILE_MONITOR_EVENT_CREATED.: |
| 722 | ev = g_new0cxx . . $ `<external>/1123956534522462559/gmem.h:335:9`! (QueuedEvent, 1); |
| 723 | ev->listcxx . . $ _QueuedEvent#list. = self; |
| 724 | ev->eventcxx . . $ _QueuedEvent#event. = event; |
| 725 | ev->filecxx . . $ _QueuedEvent#file. = g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (file); |
| 726 | g_queue_push_headcxx . . $ g_queue_push_head(e8f7e029e141fccb). (&self->eventscxx . . $ _GtkDirectoryList#events., ev); |
| 727 | |
| 728 | g_file_query_info_asynccxx . . $ g_file_query_info_async(af983d0ac17f9c97). (file, |
| 729 | self->attributescxx . . $ _GtkDirectoryList#attributes., |
| 730 | G_FILE_QUERY_INFO_NONEcxx . . $ G_FILE_QUERY_INFO_NONE., |
| 731 | self->io_prioritycxx . . $ _GtkDirectoryList#io_priority., |
| 732 | self->cancellablecxx . . $ _GtkDirectoryList#cancellable., |
| 733 | got_new_file_info_cbcxx . . $ got_new_file_info_cb(aa1d200d824d915d)., |
| 734 | ev); |
| 735 | break; |
| 736 | |
| 737 | case G_FILE_MONITOR_EVENT_MOVED_OUTcxx . . $ G_FILE_MONITOR_EVENT_MOVED_OUT.: |
| 738 | case G_FILE_MONITOR_EVENT_DELETEDcxx . . $ G_FILE_MONITOR_EVENT_DELETED.: |
| 739 | ev = g_new0cxx . . $ `<external>/1123956534522462559/gmem.h:335:9`! (QueuedEvent, 1); |
| 740 | ev->listcxx . . $ _QueuedEvent#list. = self; |
| 741 | ev->eventcxx . . $ _QueuedEvent#event. = event; |
| 742 | ev->filecxx . . $ _QueuedEvent#file. = g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (file); |
| 743 | g_queue_push_headcxx . . $ g_queue_push_head(e8f7e029e141fccb). (&self->eventscxx . . $ _GtkDirectoryList#events., ev); |
| 744 | |
| 745 | handle_eventscxx . . $ handle_events(3563273c400c074c). (self); |
| 746 | break; |
| 747 | |
| 748 | case G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGEDcxx . . $ G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED.: |
| 749 | ev = g_new0cxx . . $ `<external>/1123956534522462559/gmem.h:335:9`! (QueuedEvent, 1); |
| 750 | ev->listcxx . . $ _QueuedEvent#list. = self; |
| 751 | ev->eventcxx . . $ _QueuedEvent#event. = event; |
| 752 | ev->filecxx . . $ _QueuedEvent#file. = g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (file); |
| 753 | g_queue_push_headcxx . . $ g_queue_push_head(e8f7e029e141fccb). (&self->eventscxx . . $ _GtkDirectoryList#events., ev); |
| 754 | |
| 755 | g_file_query_info_asynccxx . . $ g_file_query_info_async(af983d0ac17f9c97). (file, |
| 756 | self->attributescxx . . $ _GtkDirectoryList#attributes., |
| 757 | G_FILE_QUERY_INFO_NONEcxx . . $ G_FILE_QUERY_INFO_NONE., |
| 758 | self->io_prioritycxx . . $ _GtkDirectoryList#io_priority., |
| 759 | self->cancellablecxx . . $ _GtkDirectoryList#cancellable., |
| 760 | got_existing_file_info_cbcxx . . $ got_existing_file_info_cb(aa1d200d824d915d)., |
| 761 | ev); |
| 762 | break; |
| 763 | |
| 764 | case G_FILE_MONITOR_EVENT_RENAMEDcxx . . $ G_FILE_MONITOR_EVENT_RENAMED.: |
| 765 | ev = g_new0cxx . . $ `<external>/1123956534522462559/gmem.h:335:9`! (QueuedEvent, 1); |
| 766 | ev->listcxx . . $ _QueuedEvent#list. = self; |
| 767 | ev->eventcxx . . $ _QueuedEvent#event. = G_FILE_MONITOR_EVENT_DELETEDcxx . . $ G_FILE_MONITOR_EVENT_DELETED.; |
| 768 | ev->filecxx . . $ _QueuedEvent#file. = g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (file); |
| 769 | g_queue_push_headcxx . . $ g_queue_push_head(e8f7e029e141fccb). (&self->eventscxx . . $ _GtkDirectoryList#events., ev); |
| 770 | |
| 771 | ev = g_new0cxx . . $ `<external>/1123956534522462559/gmem.h:335:9`! (QueuedEvent, 1); |
| 772 | ev->listcxx . . $ _QueuedEvent#list. = self; |
| 773 | ev->eventcxx . . $ _QueuedEvent#event. = G_FILE_MONITOR_EVENT_CREATEDcxx . . $ G_FILE_MONITOR_EVENT_CREATED.; |
| 774 | ev->filecxx . . $ _QueuedEvent#file. = g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (other_file); |
| 775 | g_queue_push_headcxx . . $ g_queue_push_head(e8f7e029e141fccb). (&self->eventscxx . . $ _GtkDirectoryList#events., ev); |
| 776 | |
| 777 | g_file_query_info_asynccxx . . $ g_file_query_info_async(af983d0ac17f9c97). (other_file, |
| 778 | self->attributescxx . . $ _GtkDirectoryList#attributes., |
| 779 | G_FILE_QUERY_INFO_NONEcxx . . $ G_FILE_QUERY_INFO_NONE., |
| 780 | self->io_prioritycxx . . $ _GtkDirectoryList#io_priority., |
| 781 | self->cancellablecxx . . $ _GtkDirectoryList#cancellable., |
| 782 | got_existing_file_info_cbcxx . . $ got_existing_file_info_cb(aa1d200d824d915d)., |
| 783 | ev); |
| 784 | break; |
| 785 | |
| 786 | case G_FILE_MONITOR_EVENT_CHANGEDcxx . . $ G_FILE_MONITOR_EVENT_CHANGED.: |
| 787 | case G_FILE_MONITOR_EVENT_CHANGES_DONE_HINTcxx . . $ G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT.: |
| 788 | case G_FILE_MONITOR_EVENT_PRE_UNMOUNTcxx . . $ G_FILE_MONITOR_EVENT_PRE_UNMOUNT.: |
| 789 | case G_FILE_MONITOR_EVENT_UNMOUNTEDcxx . . $ G_FILE_MONITOR_EVENT_UNMOUNTED.: |
| 790 | case G_FILE_MONITOR_EVENT_MOVEDcxx . . $ G_FILE_MONITOR_EVENT_MOVED.: |
| 791 | default: |
| 792 | break; |
| 793 | } |
| 794 | } |
| 795 | |
| 796 | static void |
| 797 | gtk_directory_list_start_monitoringcxx . . $ gtk_directory_list_start_monitoring(3563273c400c074c). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self) |
| 798 | { |
| 799 | g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (self->monitor == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 800 | self->monitorcxx . . $ _GtkDirectoryList#monitor. = g_file_monitor_directorycxx . . $ g_file_monitor_directory(8c82d0cc758993c8). (self->filecxx . . $ _GtkDirectoryList#file., G_FILE_MONITOR_WATCH_MOVEScxx . . $ G_FILE_MONITOR_WATCH_MOVES., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 801 | if (self->monitorcxx . . $ _GtkDirectoryList#monitor.) |
| 802 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (self->monitor, "changed", G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (directory_changed), self); |
| 803 | } |
| 804 | |
| 805 | static void |
| 806 | gtk_directory_list_update_monitoringcxx . . $ gtk_directory_list_update_monitoring(3563273c400c074c). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self) |
| 807 | { |
| 808 | gtk_directory_list_stop_monitoringcxx . . $ gtk_directory_list_stop_monitoring(3563273c400c074c). (self); |
| 809 | if (self->filecxx . . $ _GtkDirectoryList#file. && self->monitoredcxx . . $ _GtkDirectoryList#monitored.) |
| 810 | gtk_directory_list_start_monitoringcxx . . $ gtk_directory_list_start_monitoring(3563273c400c074c). (self); |
| 811 | } |
| 812 | |
| 813 | /** |
| 814 | * gtk_directory_list_set_file: |
| 815 | * @self: a `GtkDirectoryList` |
| 816 | * @file: (nullable): the `GFile` to be enumerated |
| 817 | * |
| 818 | * Sets the @file to be enumerated and starts the enumeration. |
| 819 | * |
| 820 | * If @file is %NULL, the result will be an empty list. |
| 821 | */ |
| 822 | void |
| 823 | gtk_directory_list_set_filecxx . . $ gtk_directory_list_set_file(b288f38da59aabac). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self, |
| 824 | GFilecxx . . $ GFile# *file) |
| 825 | { |
| 826 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_DIRECTORY_LIST (self)); |
| 827 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (file == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || G_IS_FILEcxx . . $ `<external>/13962853800498659056/gfile.h:36:9`! (file)); |
| 828 | |
| 829 | if (self->filecxx . . $ _GtkDirectoryList#file. == file || |
| 830 | (self->filecxx . . $ _GtkDirectoryList#file. && file && g_file_equalcxx . . $ g_file_equal(248007fe659871da). (self->filecxx . . $ _GtkDirectoryList#file., file))) |
| 831 | return; |
| 832 | |
| 833 | g_object_freeze_notifycxx . . $ g_object_freeze_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 834 | |
| 835 | g_set_objectcxx . . $ `<external>/1341695927569185362/gobject.h:762:9`! (&self->file, file); |
| 836 | |
| 837 | gtk_directory_list_update_monitoringcxx . . $ gtk_directory_list_update_monitoring(3563273c400c074c). (self); |
| 838 | gtk_directory_list_start_loadingcxx . . $ gtk_directory_list_start_loading(3563273c400c074c). (self); |
| 839 | |
| 840 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_FILEcxx . . $ PROP_FILE.]); |
| 841 | |
| 842 | g_object_thaw_notifycxx . . $ g_object_thaw_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 843 | } |
| 844 | |
| 845 | /** |
| 846 | * gtk_directory_list_get_file: |
| 847 | * @self: a `GtkDirectoryList` |
| 848 | * |
| 849 | * Gets the file whose children are currently enumerated. |
| 850 | * |
| 851 | * Returns: (nullable) (transfer none): The file whose children are enumerated |
| 852 | **/ |
| 853 | GFilecxx . . $ GFile# * |
| 854 | gtk_directory_list_get_filecxx . . $ gtk_directory_list_get_file(5e86ee18bfbce4). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self) |
| 855 | { |
| 856 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_DIRECTORY_LIST (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 857 | |
| 858 | return self->filecxx . . $ _GtkDirectoryList#file.; |
| 859 | } |
| 860 | |
| 861 | /** |
| 862 | * gtk_directory_list_set_attributes: |
| 863 | * @self: a `GtkDirectoryList` |
| 864 | * @attributes: (nullable): the attributes to enumerate |
| 865 | * |
| 866 | * Sets the @attributes to be enumerated and starts the enumeration. |
| 867 | * |
| 868 | * If @attributes is %NULL, the list of file infos will still be created, it will just |
| 869 | * not contain any extra attributes. |
| 870 | */ |
| 871 | void |
| 872 | gtk_directory_list_set_attributescxx . . $ gtk_directory_list_set_attributes(c3bb736b3509ba19). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self, |
| 873 | const char *attributes) |
| 874 | { |
| 875 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_DIRECTORY_LIST (self)); |
| 876 | |
| 877 | if (self->attributescxx . . $ _GtkDirectoryList#attributes. == attributes) |
| 878 | return; |
| 879 | |
| 880 | g_object_freeze_notifycxx . . $ g_object_freeze_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 881 | |
| 882 | g_freecxx . . $ g_free(5d22bdacc48458e8). (self->attributescxx . . $ _GtkDirectoryList#attributes.); |
| 883 | self->attributescxx . . $ _GtkDirectoryList#attributes. = g_strdupcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:324:9`! (attributes); |
| 884 | |
| 885 | gtk_directory_list_start_loadingcxx . . $ gtk_directory_list_start_loading(3563273c400c074c). (self); |
| 886 | |
| 887 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_ATTRIBUTEScxx . . $ PROP_ATTRIBUTES.]); |
| 888 | |
| 889 | g_object_thaw_notifycxx . . $ g_object_thaw_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 890 | } |
| 891 | |
| 892 | /** |
| 893 | * gtk_directory_list_get_attributes: |
| 894 | * @self: a `GtkDirectoryList` |
| 895 | * |
| 896 | * Gets the attributes queried on the children. |
| 897 | * |
| 898 | * Returns: (nullable) (transfer none): The queried attributes |
| 899 | */ |
| 900 | const char * |
| 901 | gtk_directory_list_get_attributescxx . . $ gtk_directory_list_get_attributes(c7178a46c64365a7). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self) |
| 902 | { |
| 903 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_DIRECTORY_LIST (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 904 | |
| 905 | return self->attributescxx . . $ _GtkDirectoryList#attributes.; |
| 906 | } |
| 907 | |
| 908 | /** |
| 909 | * gtk_directory_list_set_io_priority: |
| 910 | * @self: a `GtkDirectoryList` |
| 911 | * @io_priority: IO priority to use |
| 912 | * |
| 913 | * Sets the IO priority to use while loading directories. |
| 914 | * |
| 915 | * Setting the priority while @self is loading will reprioritize the |
| 916 | * ongoing load as soon as possible. |
| 917 | * |
| 918 | * The default IO priority is %G_PRIORITY_DEFAULT, which is higher than |
| 919 | * the GTK redraw priority. If you are loading a lot of directories in |
| 920 | * parallel, lowering it to something like %G_PRIORITY_DEFAULT_IDLE |
| 921 | * may increase responsiveness. |
| 922 | */ |
| 923 | void |
| 924 | gtk_directory_list_set_io_prioritycxx . . $ gtk_directory_list_set_io_priority(843d27e855ff0666). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self, |
| 925 | int io_priority) |
| 926 | { |
| 927 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_DIRECTORY_LIST (self)); |
| 928 | |
| 929 | if (self->io_prioritycxx . . $ _GtkDirectoryList#io_priority. == io_priority) |
| 930 | return; |
| 931 | |
| 932 | self->io_prioritycxx . . $ _GtkDirectoryList#io_priority. = io_priority; |
| 933 | |
| 934 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_IO_PRIORITYcxx . . $ PROP_IO_PRIORITY.]); |
| 935 | } |
| 936 | |
| 937 | /** |
| 938 | * gtk_directory_list_get_io_priority: |
| 939 | * @self: a `GtkDirectoryList` |
| 940 | * |
| 941 | * Gets the IO priority set via gtk_directory_list_set_io_priority(). |
| 942 | * |
| 943 | * Returns: The IO priority. |
| 944 | */ |
| 945 | int |
| 946 | gtk_directory_list_get_io_prioritycxx . . $ gtk_directory_list_get_io_priority(670205e338f6774d). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self) |
| 947 | { |
| 948 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_DIRECTORY_LIST (self), G_PRIORITY_DEFAULTcxx . . $ `<external>/1856471541377536744/gmain.h:434:9`!); |
| 949 | |
| 950 | return self->io_prioritycxx . . $ _GtkDirectoryList#io_priority.; |
| 951 | } |
| 952 | |
| 953 | /** |
| 954 | * gtk_directory_list_is_loading: (get-property loading) |
| 955 | * @self: a `GtkDirectoryList` |
| 956 | * |
| 957 | * Returns %TRUE if the children enumeration is currently in |
| 958 | * progress. |
| 959 | * |
| 960 | * Files will be added to @self from time to time while loading is |
| 961 | * going on. The order in which are added is undefined and may change |
| 962 | * in between runs. |
| 963 | * |
| 964 | * Returns: %TRUE if @self is loading |
| 965 | */ |
| 966 | gbooleancxx . . $ gboolean# |
| 967 | gtk_directory_list_is_loadingcxx . . $ gtk_directory_list_is_loading(670205e338f6774d). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self) |
| 968 | { |
| 969 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_DIRECTORY_LIST (self), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 970 | |
| 971 | return self->cancellablecxx . . $ _GtkDirectoryList#cancellable. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 972 | } |
| 973 | |
| 974 | /** |
| 975 | * gtk_directory_list_get_error: |
| 976 | * @self: a `GtkDirectoryList` |
| 977 | * |
| 978 | * Gets the loading error, if any. |
| 979 | * |
| 980 | * If an error occurs during the loading process, the loading process |
| 981 | * will finish and this property allows querying the error that happened. |
| 982 | * This error will persist until a file is loaded again. |
| 983 | * |
| 984 | * An error being set does not mean that no files were loaded, and all |
| 985 | * successfully queried files will remain in the list. |
| 986 | * |
| 987 | * Returns: (nullable) (transfer none): The loading error or %NULL if |
| 988 | * loading finished successfully |
| 989 | */ |
| 990 | const GErrorcxx . . $ GError# * |
| 991 | gtk_directory_list_get_errorcxx . . $ gtk_directory_list_get_error(a21762f5824cdac0). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self) |
| 992 | { |
| 993 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_DIRECTORY_LIST (self), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 994 | |
| 995 | return self->errorcxx . . $ _GtkDirectoryList#error.; |
| 996 | } |
| 997 | |
| 998 | /** |
| 999 | * gtk_directory_list_set_monitored: |
| 1000 | * @self: a `GtkDirectoryList` |
| 1001 | * @monitored: %TRUE to monitor the directory for changes |
| 1002 | * |
| 1003 | * Sets whether the directory list will monitor the directory |
| 1004 | * for changes. |
| 1005 | * |
| 1006 | * If monitoring is enabled, the ::items-changed signal will |
| 1007 | * be emitted when the directory contents change. |
| 1008 | * |
| 1009 | * |
| 1010 | * When monitoring is turned on after the initial creation |
| 1011 | * of the directory list, the directory is reloaded to avoid |
| 1012 | * missing files that appeared between the initial loading |
| 1013 | * and when monitoring was turned on. |
| 1014 | */ |
| 1015 | void |
| 1016 | gtk_directory_list_set_monitoredcxx . . $ gtk_directory_list_set_monitored(843d27e855ff0666). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self, |
| 1017 | gbooleancxx . . $ gboolean# monitored) |
| 1018 | { |
| 1019 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_DIRECTORY_LIST (self)); |
| 1020 | |
| 1021 | if (self->monitoredcxx . . $ _GtkDirectoryList#monitored. == monitored) |
| 1022 | return; |
| 1023 | |
| 1024 | self->monitoredcxx . . $ _GtkDirectoryList#monitored. = monitored; |
| 1025 | |
| 1026 | gtk_directory_list_update_monitoringcxx . . $ gtk_directory_list_update_monitoring(3563273c400c074c). (self); |
| 1027 | if (monitored) |
| 1028 | gtk_directory_list_start_loadingcxx . . $ gtk_directory_list_start_loading(3563273c400c074c). (self); |
| 1029 | |
| 1030 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_MONITOREDcxx . . $ PROP_MONITORED.]); |
| 1031 | } |
| 1032 | |
| 1033 | /** |
| 1034 | * gtk_directory_list_get_monitored: |
| 1035 | * @self: a `GtkDirectoryList` |
| 1036 | * |
| 1037 | * Returns whether the directory list is monitoring |
| 1038 | * the directory for changes. |
| 1039 | * |
| 1040 | * Returns: %TRUE if the directory is monitored |
| 1041 | */ |
| 1042 | gbooleancxx . . $ gboolean# |
| 1043 | gtk_directory_list_get_monitoredcxx . . $ gtk_directory_list_get_monitored(670205e338f6774d). (GtkDirectoryListcxx . . $ GtkDirectoryList# *self) |
| 1044 | { |
| 1045 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_DIRECTORY_LIST (self), TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 1046 | |
| 1047 | return self->monitoredcxx . . $ _GtkDirectoryList#monitored.; |
| 1048 | } |