@girs/dee-1.0 1.0.0-3.0.0-beta.12

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/dee-1.0.d.ts ADDED
@@ -0,0 +1,4100 @@
1
+
2
+ /*
3
+ * Type Definitions for Gjs (https://gjs.guide/)
4
+ *
5
+ * These type definitions are automatically generated, do not edit them by hand.
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
7
+ */
8
+ /**
9
+ * Dee-1.0
10
+ */
11
+
12
+ import type Gio from '@girs/gio-2.0';
13
+ import type GObject from '@girs/gobject-2.0';
14
+ import type GLib from '@girs/glib-2.0';
15
+
16
+ export namespace Dee {
17
+
18
+ /**
19
+ * Error codes for the ICU extension to Dee. These codes will be set when the
20
+ * error domain is #DEE_ICU_ERROR.
21
+ */
22
+ enum ICUError {
23
+ /**
24
+ * Error parsing a transliteration rule
25
+ */
26
+ BAD_RULE,
27
+ /**
28
+ * Error parsing a transliterator system id
29
+ */
30
+ BAD_ID,
31
+ /**
32
+ * The ICU subsystem returned an error that is not
33
+ * handled in Dee
34
+ */
35
+ UNKNOWN,
36
+ }
37
+ /**
38
+ * Enumeration defining behavior of the model with regards to writes from
39
+ * other peers in the swarm.
40
+ */
41
+ enum SharedModelAccessMode {
42
+ WORLD_WRITABLE,
43
+ LEADER_WRITABLE,
44
+ }
45
+ enum SharedModelError {
46
+ SHARED_MODEL_ERROR_LEADER_INVALIDATED,
47
+ }
48
+ /**
49
+ * Enumeration defining flushing behavior of a shared model.
50
+ */
51
+ enum SharedModelFlushMode {
52
+ AUTOMATIC,
53
+ MANUAL,
54
+ }
55
+ /**
56
+ * Error codes for the #DeeTransaction class. These codes will be set when the
57
+ * error domain is #DEE_TRANSACTION_ERROR.
58
+ */
59
+ enum TransactionError {
60
+ /**
61
+ * The target model has been
62
+ * modified while the transaction was open.
63
+ */
64
+ CONCURRENT_MODIFICATION,
65
+ /**
66
+ * Raised when someone tries to commit a
67
+ * transaction that has already been committed
68
+ */
69
+ COMMITTED,
70
+ }
71
+ /**
72
+ * Flags passed to dee_index_lookup() to control how matching is done.
73
+ * Note that it is not required that index backends support more than just
74
+ * #DEE_TERM_MATCH_EXACT.
75
+ *
76
+ * You can query for the supported flags with
77
+ * dee_index_get_supported_term_match_flags().
78
+ * @bitfield
79
+ */
80
+ enum TermMatchFlag {
81
+ /**
82
+ * Match terms byte for byte as specified in the
83
+ * query string
84
+ */
85
+ EXACT,
86
+ /**
87
+ * Match if the indexed term begins with the byte string
88
+ * being queried by. This is also sometimes known as
89
+ * truncated- or wildcard queries
90
+ */
91
+ PREFIX,
92
+ }
93
+ const PEER_DBUS_IFACE: string | null
94
+ /**
95
+ * String constant defining the name of the DBus Model interface.
96
+ */
97
+ const SEQUENCE_MODEL_DBUS_IFACE: string | null
98
+ /**
99
+ * String constant defining the name of the DBus Model interface.
100
+ */
101
+ const SHARED_MODEL_DBUS_IFACE: string | null
102
+ /**
103
+ * Create a new #DeeFilter with the given parameters. This call will zero
104
+ * the `out_filter` struct.
105
+ * @param map_func The #DeeFilterMapFunc to use for the filter
106
+ * @param map_notify The #DeeFilterMapNotify to use for the filter
107
+ */
108
+ function filter_new(map_func: FilterMapFunc, map_notify: FilterMapNotify): /* out_filter */ Filter
109
+ /**
110
+ * Create a #DeeFilter that takes string values from a column in the model
111
+ * and builds a #DeeFilterModel with the rows sorted according to the
112
+ * collation rules of the current locale.
113
+ * @param column The index of a column containing the strings to sort after
114
+ */
115
+ function filter_new_collator(column: number): /* out_filter */ Filter
116
+ /**
117
+ * Create a #DeeFilter that takes string values from a column in the model
118
+ * and builds a #DeeFilterModel with the rows sorted descending according to the
119
+ * collation rules of the current locale.
120
+ * @param column The index of a column containing the strings to sort after
121
+ */
122
+ function filter_new_collator_desc(column: number): /* out_filter */ Filter
123
+ /**
124
+ * Create a #DeeFilter that only includes rows from the original model
125
+ * which match a variant value in a given column. A #DeeFilterModel
126
+ * created with this filter will be ordered in accordance with its parent model.
127
+ *
128
+ * This method will work on any column, disregarding its schema, since the
129
+ * value comparison is done using g_variant_equal(). This means you can use
130
+ * this filter as a convenient fallback when there is no predefined filter
131
+ * for your column type if raw performance is not paramount.
132
+ * @param column The index of a column containing the string to match
133
+ * @param value A #GVariant value columns must match exactly. The matching semantics are those of g_variant_equal(). If `value` is floating the ownership will be transfered to the filter
134
+ */
135
+ function filter_new_for_any_column(column: number, value: GLib.Variant): /* out_filter */ Filter
136
+ /**
137
+ * Create a #DeeFilter that only includes rows from the original model
138
+ * which has an exact match on some string column. A #DeeFilterModel created
139
+ * with this filter will be ordered in accordance with its parent model.
140
+ * @param column The index of a column containing the string key to match
141
+ * @param key
142
+ */
143
+ function filter_new_for_key_column(column: number, key: string | null): /* out_filter */ Filter
144
+ /**
145
+ * Create a #DeeFilter that only includes rows from the original model
146
+ * which match a regular expression on some string column. A #DeeFilterModel
147
+ * created with this filter will be ordered in accordance with its parent model.
148
+ * @param column The index of a column containing the string to match
149
+ * @param regex The regular expression `column` must match
150
+ */
151
+ function filter_new_regex(column: number, regex: GLib.Regex): /* out_filter */ Filter
152
+ /**
153
+ * Create a new #DeeFilter sorting a model according to a #DeeCompareRowFunc.
154
+ * @param cmp_row A #DeeCompareRowFunc to use for sorting
155
+ */
156
+ function filter_new_sort(cmp_row: CompareRowFunc): /* out_filter */ Filter
157
+ function icu_error_quark(): GLib.Quark
158
+ /**
159
+ * Create a new #DeeModelReader with the given parameters. This call will zero
160
+ * the `out_reader` struct.
161
+ * @param reader_func The #DeeModelReaderFunc to use for the reader
162
+ */
163
+ function model_reader_new(reader_func: ModelReaderFunc): /* out_reader */ ModelReader
164
+ /**
165
+ * A #DeeModelReader reading a %gint32 from a #DeeModel at a given column
166
+ * @param column The column index to read a %gint32 from
167
+ */
168
+ function model_reader_new_for_int32_column(column: number): /* out_reader */ ModelReader
169
+ /**
170
+ * A #DeeModelReader reading a string from a #DeeModel at a given column
171
+ * @param column The column index to read a string from
172
+ */
173
+ function model_reader_new_for_string_column(column: number): /* out_reader */ ModelReader
174
+ /**
175
+ * A #DeeModelReader reading a %guint32 from a #DeeModel at a given column
176
+ * @param column The column index to read a %guint32 from
177
+ */
178
+ function model_reader_new_for_uint32_column(column: number): /* out_reader */ ModelReader
179
+ /**
180
+ * Get a pointer to the platform default #DeeResourceManager.
181
+ * @returns The default resource manager for the platform. Do not unreference. If you need to keep the instance around you must manually reference it.
182
+ */
183
+ function resource_manager_get_default(): ResourceManager
184
+ /**
185
+ * Reconstruct a #DeeSerializable from #GVariant data. For this function
186
+ * to work you need to register a parser with
187
+ * dee_serializable_register_parser(). Any native Dee class will do so
188
+ * automatically.
189
+ *
190
+ * This method only works on data created with dee_serializable_serialize()
191
+ * and <emphasis>not</emphasis> with data from dee_serializable_externalize().
192
+ *
193
+ * Since a #DeeSerializableParseFunc is not allowed to fail - by contract -
194
+ * it can be guaranteed that this function only returns %NULL in case there
195
+ * is no known parser for `type` and #GVariant signature of `data`.
196
+ * @param data The #GVariant data to parse. If this is a floating reference it will be consumed
197
+ * @param type The #GType of the class to instantiate from `data`
198
+ * @returns A newly constructed #GObject build from @data or %NULL in case no parser has been registered for the given #GType or variant signature. Free with g_object_unref().
199
+ */
200
+ function serializable_parse(data: GLib.Variant, type: GObject.GType): GObject.Object
201
+ /**
202
+ * Reconstruct a #DeeSerializable from #GVariant data. For this function
203
+ * to work you need to register a parser with
204
+ * dee_serializable_register_parser(). Any native Dee class will do so
205
+ * automatically.
206
+ *
207
+ * This method only works on data created with dee_serializable_externalize()
208
+ * and <emphasis>not</emphasis> with data from dee_serializable_serialize().
209
+ *
210
+ * Since a #DeeSerializableParseFunc is not allowed to fail - by contract -
211
+ * it can be guaranteed that this function only returns %NULL in case there
212
+ * is no known parser for the #GType or #GVariant signature of `data`.
213
+ * @param data The #GVariant data to parse
214
+ * @returns A newly constructed #GObject build from @data or %NULL in case no parser has been registered for the given #GType or variant signature. Free with g_object_unref().
215
+ */
216
+ function serializable_parse_external(data: GLib.Variant): GObject.Object
217
+ /**
218
+ * A collator takes an input string, most often a term produced from a
219
+ * #DeeAnalyzer, and outputs a collation key.
220
+ * @callback
221
+ * @param input The string to produce a collation key for
222
+ * @returns The collation key. Free with g_free() when done using it.
223
+ */
224
+ interface CollatorFunc {
225
+ (input: string | null): string | null
226
+ }
227
+ /**
228
+ * Compares `row1` and `row2`. Mainly used with dee_model_insert_sorted() and
229
+ * dee_model_find_sorted().
230
+ * @callback
231
+ * @param row1 The model being indexed
232
+ * @param row2 The row to extract terms for
233
+ * @returns -1, 0, or 1 if @row1 is respectively less than, equal, or greater than @row2.
234
+ */
235
+ interface CompareRowFunc {
236
+ (row1: GLib.Variant[], row2: GLib.Variant[]): number
237
+ }
238
+ /**
239
+ * Compares `row1` and `row2`. Mainly used with
240
+ * dee_model_insert_row_sorted_with_sizes() and
241
+ * dee_model_find_row_sorted_with_sizes().
242
+ * @callback
243
+ * @param row1 Row data
244
+ * @param row2 Row data to compare with
245
+ * @returns -1, 0, or 1 if @row1 is respectively less than, equal, or greater than @row2.
246
+ */
247
+ interface CompareRowSizedFunc {
248
+ (row1: GLib.Variant[], row2: GLib.Variant[]): number
249
+ }
250
+ /**
251
+ * Function used to collect the rows from a model that should be included in
252
+ * a #DeeFilterModel. To add rows to `filter_model` use the methods
253
+ * dee_filter_model_append_iter(), dee_filter_model_prepend_iter(),
254
+ * dee_filter_model_insert_iter(), and dee_filter_model_insert_iter_before().
255
+ *
256
+ * The iteration over the original model is purposely left to the map func
257
+ * in order to allow optimized iterations if the the caller has a priori
258
+ * knowledge of the sorting and grouping of the data in the original model.
259
+ * @callback
260
+ * @param orig_model The model containing the original data to filter
261
+ * @param filter_model The model that will contain the filtered results. The filter func must iterate over `orig_model` and add all relevant rows to `filter_model`. This model is guaranteed to be empty when the filter func is invoked
262
+ */
263
+ interface FilterMapFunc {
264
+ (orig_model: Model, filter_model: FilterModel): void
265
+ }
266
+ /**
267
+ * Callback invoked when a row is added to `orig_model`. To add rows to
268
+ * `filter_model` use the methods dee_filter_model_append_iter(),
269
+ * dee_filter_model_prepend_iter(), dee_filter_model_insert_iter(),
270
+ * and dee_filter_model_insert_iter_before().
271
+ * @callback
272
+ * @param orig_model The model containing the added row
273
+ * @param orig_iter A #DeeModelIter pointing to the new row in `orig_model`
274
+ * @param filter_model The model that was also passed to the #DeeModelMapFunc of the #DeeFilter this functions is a part of
275
+ * @returns %TRUE if @orig_iter was added to @filter_model
276
+ */
277
+ interface FilterMapNotify {
278
+ (orig_model: Model, orig_iter: ModelIter, filter_model: FilterModel): boolean
279
+ }
280
+ /**
281
+ * The signature of the function passed to dee_index_foreach().
282
+ *
283
+ * Be cautious if you plan on modifying the rows in the model via the
284
+ * DeeModelIter<!-- -->s you find. Your code may have to be reentrant since
285
+ * the index may change in reaction to the changes in the model. It's not
286
+ * impossible to do this in a non-broken manner, but it may likely require
287
+ * you calling dee_model_freeze_signals() and dee_model_thaw_signals() at
288
+ * strategic points.
289
+ * @callback
290
+ * @param key A key in the index being traversed
291
+ * @param rows A #DeeResultSet. Do not free or modify.
292
+ * @returns %FALSE if iteration should stop, %TRUE if it should continue
293
+ */
294
+ interface IndexIterFunc {
295
+ (key: string | null, rows: ResultSet): boolean
296
+ }
297
+ /**
298
+ * Extracts a string from a row in a model.
299
+ * @callback
300
+ * @param model The model being indexed
301
+ * @param iter The row to extract terms for
302
+ * @returns A newly allocated string with the row data to be indexed. Free with g_free().
303
+ */
304
+ interface ModelReaderFunc {
305
+ (model: Model, iter: ModelIter): string | null
306
+ }
307
+ interface SerializableParseFunc {
308
+ (data: GLib.Variant): GObject.Object
309
+ }
310
+ /**
311
+ * A term filter takes a list of terms and runs it through a filtering and/or
312
+ * set of transformations and stores the output in a #DeeTermList.
313
+ *
314
+ * You can register term filters on a #DeeAnalyzer with
315
+ * dee_analyzer_add_term_filter().
316
+ * @callback
317
+ * @param terms_in A #DeeTermList with the terms to filter
318
+ * @param terms_out A #DeeTermList to write the filtered terms to
319
+ */
320
+ interface TermFilterFunc {
321
+ (terms_in: TermList, terms_out: TermList): void
322
+ }
323
+ module Model {
324
+
325
+ // Signal callback interfaces
326
+
327
+ /**
328
+ * Signal callback interface for `changeset-finished`
329
+ */
330
+ interface ChangesetFinishedSignalCallback {
331
+ ($obj: Model): void
332
+ }
333
+
334
+ /**
335
+ * Signal callback interface for `changeset-started`
336
+ */
337
+ interface ChangesetStartedSignalCallback {
338
+ ($obj: Model): void
339
+ }
340
+
341
+ /**
342
+ * Signal callback interface for `row-added`
343
+ */
344
+ interface RowAddedSignalCallback {
345
+ ($obj: Model, iter: ModelIter): void
346
+ }
347
+
348
+ /**
349
+ * Signal callback interface for `row-changed`
350
+ */
351
+ interface RowChangedSignalCallback {
352
+ ($obj: Model, iter: ModelIter): void
353
+ }
354
+
355
+ /**
356
+ * Signal callback interface for `row-removed`
357
+ */
358
+ interface RowRemovedSignalCallback {
359
+ ($obj: Model, iter: ModelIter): void
360
+ }
361
+
362
+
363
+ // Constructor properties interface
364
+
365
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
366
+ }
367
+
368
+ }
369
+
370
+ interface Model {
371
+
372
+ // Owm methods of Dee-1.0.Dee.Model
373
+
374
+ /**
375
+ * Like dee_model_append() but intended for language bindings or
376
+ * situations where you work with models on a meta level and may not have
377
+ * a prior knowledge of the column schemas of the models. See also
378
+ * dee_model_build_row().
379
+ * @param row_members An array of #GVariants with type signature matching those of the column schemas of `self`. If any of the variants have floating references they will be consumed
380
+ * @returns A #DeeModelIter pointing to the new row
381
+ */
382
+ append_row(row_members: GLib.Variant[]): ModelIter
383
+ /**
384
+ * Notify listeners that the model is about to be changed, which means that
385
+ * multiple row additions / changes / removals will follow.
386
+ * The default implementation of this method will emit
387
+ * the ::changeset-started signal.
388
+ *
389
+ * It is not stricly necessary to enclose every change to a model
390
+ * in a dee_model_begin_changeset() and dee_model_end_changeset() calls, but
391
+ * doing so is highly recommended and allows implementing various optimizations.
392
+ *
393
+ * The usual way to perform multiple changes to a model is as follows:
394
+ *
395
+ * <programlisting>
396
+ * void update_model (DeeModel *model)
397
+ * {
398
+ * GVariant **added_row_data1 = ...;
399
+ * GVariant **added_row_data2 = ...;
400
+ *
401
+ * dee_model_begin_changeset (model);
402
+ *
403
+ * dee_model_remove (model, dee_model_get_first_iter (model));
404
+ * dee_model_append_row (model, added_row_data1);
405
+ * dee_model_append_row (model, added_row_data2);
406
+ *
407
+ * dee_model_end_changeset (model);
408
+ * }
409
+ * </programlisting>
410
+ */
411
+ begin_changeset(): void
412
+ /**
413
+ * Removes all rows in the model. Signals are emitted for each row in the model
414
+ */
415
+ clear(): void
416
+ /**
417
+ * This method is purely syntactic sugar for calling dee_model_set_tag() with
418
+ * a `value` of %NULL. It's included in order to help developers write more
419
+ * readable code.
420
+ * @param iter The row to clear the tag from
421
+ * @param tag The tag to clear from `iter`
422
+ */
423
+ clear_tag(iter: ModelIter, tag: ModelTag): void
424
+ /**
425
+ * Notify listeners that all changes have been committed to the model.
426
+ * The default implementation of this method will emit
427
+ * the ::changeset-finished signal.
428
+ *
429
+ * See also dee_model_begin_changeset().
430
+ */
431
+ end_changeset(): void
432
+ /**
433
+ * Finds a row in `self` according to the sorting specified by `cmp_func`.
434
+ * This method will assume that `self` is already sorted by `cmp_func`.
435
+ *
436
+ * If you use this method for searching you should only use
437
+ * dee_model_insert_row_sorted() to insert rows in the model.
438
+ * @param row_spec An array of #GVariants with type signature matching those of the column schemas of `self`. No references will be taken on the variants.
439
+ * @param cmp_func Callback used for comparison or rows
440
+ * @returns If @out_was_found is set to %TRUE then a #DeeModelIter pointing to the last matching row. If it is %FALSE then the iter pointing to the row just after where @row_spec_would have been inserted.
441
+ */
442
+ find_row_sorted(row_spec: GLib.Variant[], cmp_func: CompareRowFunc): [ /* returnType */ ModelIter, /* out_was_found */ boolean ]
443
+ /**
444
+ * Like dee_model_find_row_sorted(), but uses DeeCompareRowSizedFunc and
445
+ * therefore doesn't cause trouble when used from introspected languages.
446
+ *
447
+ * Finds a row in `self` according to the sorting specified by `cmp_func`.
448
+ * This method will assume that `self` is already sorted by `cmp_func`.
449
+ *
450
+ * If you use this method for searching you should only use
451
+ * dee_model_insert_row_sorted() (or dee_model_insert_row_sorted_with_sizes())
452
+ * to insert rows in the model.
453
+ * @param row_spec An array of #GVariants with type signature matching those of the column schemas of `self`. No references will be taken on the variants.
454
+ * @param cmp_func Callback used for comparison or rows
455
+ * @returns If @out_was_found is set to %TRUE then a #DeeModelIter pointing to the last matching row. If it is %FALSE then the iter pointing to the row just after where @row_spec_would have been inserted.
456
+ */
457
+ find_row_sorted_with_sizes(row_spec: GLib.Variant[], cmp_func: CompareRowSizedFunc): [ /* returnType */ ModelIter, /* out_was_found */ boolean ]
458
+ get_bool(iter: ModelIter, column: number): boolean
459
+ /**
460
+ * Get the column index of a column.
461
+ * @param column_name the column name to retrieve the index of
462
+ * @returns 0-based index of the column or -1 if column with this name wasn't found
463
+ */
464
+ get_column_index(column_name: string | null): number
465
+ /**
466
+ * Get a %NULL-terminated array of column names for the columns of `self`.
467
+ * These names can be used in calls to dee_model_build_named_row().
468
+ * @returns A %NULL-terminated array of #GVariant type strings. The length of the returned array is written to @num_columns. The returned array should not be freed or modified. It is owned by the model.
469
+ */
470
+ get_column_names(): string[]
471
+ /**
472
+ * Get the #GVariant signature of a column
473
+ * @param column the column to get retrieve the #GVariant type string of
474
+ * @returns the #GVariant signature of the column at index @column
475
+ */
476
+ get_column_schema(column: number): string | null
477
+ get_double(iter: ModelIter, column: number): number
478
+ /**
479
+ * Get the #GVariant signature of field previously registered with
480
+ * dee_model_register_vardict_schema().
481
+ * @param field_name name of vardict field to get schema of
482
+ * @returns the #GVariant signature for the field, or %NULL if given field wasn't registered with dee_model_register_vardict_schema().
483
+ */
484
+ get_field_schema(field_name: string | null): [ /* returnType */ string | null, /* out_column */ number ]
485
+ /**
486
+ * Retrieves a #DeeModelIter representing the first row in `self`.
487
+ * @returns A #DeeModelIter (owned by @self, do not free it)
488
+ */
489
+ get_first_iter(): ModelIter
490
+ get_int32(iter: ModelIter, column: number): number
491
+ get_int64(iter: ModelIter, column: number): number
492
+ /**
493
+ * Retrieves a #DeeModelIter representing the row at the given index.
494
+ *
495
+ * Note that this method does not have any performance guarantees. In particular
496
+ * it is not guaranteed to be <emphasis>O(1)</emphasis>.
497
+ * @param row position of the row to retrieve
498
+ * @returns A new #DeeModelIter, or %NULL if @row was out of bounds. The returned iter is owned by @self, so do not free it.
499
+ */
500
+ get_iter_at_row(row: number): ModelIter
501
+ /**
502
+ * Retrieves a #DeeModelIter pointing right <emphasis>after</emphasis> the
503
+ * last row in `self`. This is refered to also the the
504
+ * <emphasis>end iter</emphasis>.
505
+ *
506
+ * As with other iters the end iter, in particular, is stable over inserts,
507
+ * changes, or removals.
508
+ * @returns A #DeeModelIter (owned by @self, do not free it)
509
+ */
510
+ get_last_iter(): ModelIter
511
+ /**
512
+ * Gets the number of columns in `self`
513
+ * @returns the number of columns per row in @self
514
+ */
515
+ get_n_columns(): number
516
+ /**
517
+ * Gets the number of rows in `self`
518
+ * @returns the number of rows in @self
519
+ */
520
+ get_n_rows(): number
521
+ /**
522
+ * Get the numeric offset of `iter` into `self`. Note that this method is
523
+ * <emphasis>not</emphasis> guaranteed to be <emphasis>O(1)</emphasis>.
524
+ * @param iter The iter to get the position of
525
+ * @returns The integer offset of @iter in @self
526
+ */
527
+ get_position(iter: ModelIter): number
528
+ get_row(iter: ModelIter): [ /* returnType */ GLib.Variant[], /* out_row_members */ GLib.Variant[] ]
529
+ /**
530
+ * Get a %NULL-terminated array of #GVariant type strings that defines the
531
+ * required formats for the columns of `self`.
532
+ * @returns A %NULL-terminated array of #GVariant type strings. The length of the returned array is written to @num_columns. The returned array should not be freed or modified. It is owned by the model.
533
+ */
534
+ get_schema(): string[]
535
+ get_string(iter: ModelIter, column: number): string | null
536
+ /**
537
+ * Look up a tag value for a given row in a model. This method is guaranteed
538
+ * to be O(1).
539
+ * @param iter A #DeeModelIter pointing to the row to get the tag from
540
+ * @param tag The tag handle to retrieve the tag value for
541
+ * @returns Returns %NULL if @tag is unset otherwise the value of the tag as it was set with dee_model_set_tag().
542
+ */
543
+ get_tag(iter: ModelIter, tag: ModelTag): any | null
544
+ get_uchar(iter: ModelIter, column: number): number
545
+ get_uint32(iter: ModelIter, column: number): number
546
+ get_uint64(iter: ModelIter, column: number): number
547
+ get_value(iter: ModelIter, column: number): GLib.Variant
548
+ get_value_by_name(iter: ModelIter, column_name: string | null): GLib.Variant
549
+ /**
550
+ * Get a schema for variant dictionary column previously registered using
551
+ * dee_model_register_vardict_schema().
552
+ * @param column the column index to get the schemas for
553
+ * @returns Hashtable containing a mapping from field names to schemas or NULL. Note that keys and values in the hashtable may be owned by the model, so you need to create a deep copy if you intend to keep the hashtable around.
554
+ */
555
+ get_vardict_schema(column: number): GLib.HashTable
556
+ /**
557
+ * As dee_model_insert(), but intended for language bindings or
558
+ * situations where you work with models on a meta level and may not have
559
+ * a priori knowledge of the column schemas of the models. See also
560
+ * dee_model_build_row().
561
+ * @param pos The index to insert the row on. The existing row will be pushed down.
562
+ * @param row_members An array of #GVariants with type signature matching those of the column schemas of `self`. If any of the variants have floating references they will be consumed.
563
+ * @returns A #DeeModelIter pointing to the new row
564
+ */
565
+ insert_row(pos: number, row_members: GLib.Variant[]): ModelIter
566
+ /**
567
+ * As dee_model_insert_before(), but intended for language bindings or
568
+ * situations where you work with models on a meta level and may not have
569
+ * a priori knowledge of the column schemas of the models. See also
570
+ * dee_model_build_row().
571
+ * @param iter An iter pointing to the row before which to insert the new one
572
+ * @param row_members An array of #GVariants with type signature matching those of the column schemas of `self`. If any of the variants have floating references they will be consumed.
573
+ * @returns A #DeeModelIter pointing to the new row
574
+ */
575
+ insert_row_before(iter: ModelIter, row_members: GLib.Variant[]): ModelIter
576
+ /**
577
+ * Inserts a row in `self` according to the sorting specified by `cmp_func`.
578
+ * If you use this method for insertion you should not use other methods as this
579
+ * method assumes the model to be already sorted by `cmp_func`.
580
+ * @param row_members An array of #GVariants with type signature matching those of the column schemas of `self`. If any of the variants have floating references they will be consumed.
581
+ * @param cmp_func Callback used for comparison or rows
582
+ * @returns A #DeeModelIter pointing to the new row
583
+ */
584
+ insert_row_sorted(row_members: GLib.Variant[], cmp_func: CompareRowFunc): ModelIter
585
+ /**
586
+ * Inserts a row in `self` according to the sorting specified by `cmp_func`.
587
+ * If you use this method for insertion you should not use other methods as this
588
+ * method assumes the model to be already sorted by `cmp_func`.
589
+ * @param row_members An array of #GVariants with type signature matching those of the column schemas of `self`. If any of the variants have floating references they will be consumed.
590
+ * @param cmp_func Callback used for comparison or rows
591
+ * @returns A #DeeModelIter pointing to the new row
592
+ */
593
+ insert_row_sorted_with_sizes(row_members: GLib.Variant[], cmp_func: CompareRowSizedFunc): ModelIter
594
+ /**
595
+ * Checks if `iter` is the very first iter `self`.
596
+ * @param iter a #DeeModelIter
597
+ * @returns #TRUE if @iter is the first iter in the model
598
+ */
599
+ is_first(iter: ModelIter): boolean
600
+ /**
601
+ * Whether `iter` is the end iter of `self`. Note that the end iter points
602
+ * right <emphasis>after</emphasis> the last valid row in `self`.
603
+ * @param iter a #DeeModelIter
604
+ * @returns #TRUE if @iter is the last iter in the model
605
+ */
606
+ is_last(iter: ModelIter): boolean
607
+ /**
608
+ * Returns a #DeeModelIter that points to the next position in the model.
609
+ * @param iter a #DeeModelIter
610
+ * @returns A #DeeModelIter, pointing to the next row in the model. The iter is owned by @self, do not free it.
611
+ */
612
+ next(iter: ModelIter): ModelIter
613
+ /**
614
+ * Like dee_model_prepend() but intended for language bindings or
615
+ * situations where you work with models on a meta level and may not have
616
+ * a priori knowledge of the column schemas of the models. See also
617
+ * dee_model_build_row().
618
+ * @param row_members An array of #GVariants with type signature matching those of the column schemas of `self`. If any of the variants have floating references they will be consumed.
619
+ * @returns A #DeeModelIter pointing to the new row
620
+ */
621
+ prepend_row(row_members: GLib.Variant[]): ModelIter
622
+ /**
623
+ * Returns a #DeeModelIter that points to the previous position in the model.
624
+ * @param iter a #DeeModelIter
625
+ * @returns A #DeeModelIter, pointing to the previous row in the model. The iter is owned by @self, do not free it.
626
+ */
627
+ prev(iter: ModelIter): ModelIter
628
+ /**
629
+ * Register a new tag on a #DeeModel. A <emphasis>tag</emphasis> is an extra
630
+ * value attached to a given row on a model. The tags are invisible to all
631
+ * that doesn't have the tag handle returned by this method. #DeeModel
632
+ * implementations must ensure that dee_model_get_tag() is an O(1) operation.
633
+ *
634
+ * Tags can be very useful in associating some extra data to a row in a model
635
+ * and have that automatically synced when the model changes. If you're
636
+ * writing a tiled view for a model you might want to tag each row with the
637
+ * tile widget for that row. That way you have very convenient access to the
638
+ * tile widget given any row in the model.
639
+ *
640
+ * The private nature of tags and the fact that you can store arbitrary pointers
641
+ * and binary data in them also means that they are not serialized if you
642
+ * utilize a model implementation that exposes the #DeeSerializable interface.
643
+ * @param tag_destroy Function called when a tagged row is removed from the model. This function will also be called on all tagged rows when the model is finalized.
644
+ * @returns A #DeeModelTag handle that you can use to set and get tags with
645
+ */
646
+ register_tag(tag_destroy: GLib.DestroyNotify): ModelTag
647
+ /**
648
+ * Register schema for fields in a model containing column with variant
649
+ * dictionary schema ('a{sv}').
650
+ * The keys registered with this function can be later used
651
+ * with dee_model_build_named_row() function, as well as
652
+ * dee_model_get_value_by_name(). Note that it is possible to register
653
+ * the same field name for multiple columns, in which case you need to use
654
+ * fully-qualified "column_name::field" name in the calls to
655
+ * dee_model_build_named_row() and dee_model_get_field_schema().
656
+ * @param column the column index to register the schemas with
657
+ * @param schemas hashtable with keys specifying names of the fields and values defining their schema
658
+ */
659
+ register_vardict_schema(column: number, schemas: GLib.HashTable): void
660
+ /**
661
+ * Removes the row at the given position from the model.
662
+ * @param iter a #DeeModelIter pointing to the row to remove
663
+ */
664
+ remove(iter: ModelIter): void
665
+ /**
666
+ * Set column names used by `self`.
667
+ * This method must be called exactly once, but only after setting
668
+ * a schema of the model. Note that some constructors will do this for you.
669
+ * @param column_names A list of column names terminated by a %NULL
670
+ */
671
+ set_column_names_full(column_names: string[]): void
672
+ /**
673
+ * Sets all columns in the row `iter` points to, to those found in
674
+ * `row_members`. The variants in `row_members` must match the types defined in
675
+ * the model's schema.
676
+ * @param iter a #DeeModelIter
677
+ * @param row_members And array of #GVariant<!-- -->s with type signature matching those from the model schema. If any of the variants have floating references these will be consumed
678
+ */
679
+ set_row(iter: ModelIter, row_members: GLib.Variant[]): void
680
+ /**
681
+ * Set the #GVariant types and the number of columns used by `self`.
682
+ * This method must be called exactly once before using `self`. Note that
683
+ * some constructors will do this for you.
684
+ * @param column_schemas A list of #GVariant type strings terminated by a %NULL
685
+ */
686
+ set_schema_full(column_schemas: string[]): void
687
+ /**
688
+ * Set a tag on a row in a model. This function is guaranteed to be O(1).
689
+ * See also dee_model_register_tag().
690
+ *
691
+ * If `tag` is already set on this row the existing tag value will be destroyed
692
+ * with the #GDestroyNotify passed to the dee_model_register_tag().
693
+ * @param iter The row to set the tag on
694
+ * @param tag The tag handle for the tag as obtained from dee_model_register_tag()
695
+ * @param value The value to set for `tag`. Note that %NULL represents an unset tag
696
+ */
697
+ set_tag(iter: ModelIter, tag: ModelTag, value: any | null): void
698
+ /**
699
+ * Sets the data in `column` for the row `iter` points to, to `value`. The type
700
+ * of `value` must be convertible to the type of the column.
701
+ *
702
+ * When this method call completes the model will emit ::row-changed. You can
703
+ * edit the model in place without triggering the change signals by calling
704
+ * dee_model_set_value_silently().
705
+ * @param iter a #DeeModelIter
706
+ * @param column column number to set the value
707
+ * @param value New value for cell. If `value` is a floating reference the model will assume ownership of the variant
708
+ */
709
+ set_value(iter: ModelIter, column: number, value: GLib.Variant): void
710
+
711
+ // Own virtual methods of Dee-1.0.Dee.Model
712
+
713
+ /**
714
+ * Like dee_model_append() but intended for language bindings or
715
+ * situations where you work with models on a meta level and may not have
716
+ * a prior knowledge of the column schemas of the models. See also
717
+ * dee_model_build_row().
718
+ * @virtual
719
+ * @param row_members An array of #GVariants with type signature matching those of the column schemas of `self`. If any of the variants have floating references they will be consumed
720
+ * @returns A #DeeModelIter pointing to the new row
721
+ */
722
+ vfunc_append_row(row_members: GLib.Variant[]): ModelIter
723
+ /**
724
+ * Notify listeners that the model is about to be changed, which means that
725
+ * multiple row additions / changes / removals will follow.
726
+ * The default implementation of this method will emit
727
+ * the ::changeset-started signal.
728
+ *
729
+ * It is not stricly necessary to enclose every change to a model
730
+ * in a dee_model_begin_changeset() and dee_model_end_changeset() calls, but
731
+ * doing so is highly recommended and allows implementing various optimizations.
732
+ *
733
+ * The usual way to perform multiple changes to a model is as follows:
734
+ *
735
+ * <programlisting>
736
+ * void update_model (DeeModel *model)
737
+ * {
738
+ * GVariant **added_row_data1 = ...;
739
+ * GVariant **added_row_data2 = ...;
740
+ *
741
+ * dee_model_begin_changeset (model);
742
+ *
743
+ * dee_model_remove (model, dee_model_get_first_iter (model));
744
+ * dee_model_append_row (model, added_row_data1);
745
+ * dee_model_append_row (model, added_row_data2);
746
+ *
747
+ * dee_model_end_changeset (model);
748
+ * }
749
+ * </programlisting>
750
+ * @virtual
751
+ */
752
+ vfunc_begin_changeset(): void
753
+ vfunc_changeset_finished(): void
754
+ vfunc_changeset_started(): void
755
+ /**
756
+ * Removes all rows in the model. Signals are emitted for each row in the model
757
+ * @virtual
758
+ */
759
+ vfunc_clear(): void
760
+ /**
761
+ * Notify listeners that all changes have been committed to the model.
762
+ * The default implementation of this method will emit
763
+ * the ::changeset-finished signal.
764
+ *
765
+ * See also dee_model_begin_changeset().
766
+ * @virtual
767
+ */
768
+ vfunc_end_changeset(): void
769
+ /**
770
+ * Finds a row in `self` according to the sorting specified by `cmp_func`.
771
+ * This method will assume that `self` is already sorted by `cmp_func`.
772
+ *
773
+ * If you use this method for searching you should only use
774
+ * dee_model_insert_row_sorted() to insert rows in the model.
775
+ * @virtual
776
+ * @param row_spec An array of #GVariants with type signature matching those of the column schemas of `self`. No references will be taken on the variants.
777
+ * @param cmp_func Callback used for comparison or rows
778
+ * @returns If @out_was_found is set to %TRUE then a #DeeModelIter pointing to the last matching row. If it is %FALSE then the iter pointing to the row just after where @row_spec_would have been inserted.
779
+ */
780
+ vfunc_find_row_sorted(row_spec: GLib.Variant[], cmp_func: CompareRowFunc): [ /* returnType */ ModelIter, /* out_was_found */ boolean ]
781
+ vfunc_get_bool(iter: ModelIter, column: number): boolean
782
+ /**
783
+ * Get the column index of a column.
784
+ * @virtual
785
+ * @param column_name the column name to retrieve the index of
786
+ * @returns 0-based index of the column or -1 if column with this name wasn't found
787
+ */
788
+ vfunc_get_column_index(column_name: string | null): number
789
+ /**
790
+ * Get a %NULL-terminated array of column names for the columns of `self`.
791
+ * These names can be used in calls to dee_model_build_named_row().
792
+ * @virtual
793
+ * @returns A %NULL-terminated array of #GVariant type strings. The length of the returned array is written to @num_columns. The returned array should not be freed or modified. It is owned by the model.
794
+ */
795
+ vfunc_get_column_names(): string[]
796
+ /**
797
+ * Get the #GVariant signature of a column
798
+ * @virtual
799
+ * @param column the column to get retrieve the #GVariant type string of
800
+ * @returns the #GVariant signature of the column at index @column
801
+ */
802
+ vfunc_get_column_schema(column: number): string | null
803
+ vfunc_get_double(iter: ModelIter, column: number): number
804
+ /**
805
+ * Get the #GVariant signature of field previously registered with
806
+ * dee_model_register_vardict_schema().
807
+ * @virtual
808
+ * @param field_name name of vardict field to get schema of
809
+ * @returns the #GVariant signature for the field, or %NULL if given field wasn't registered with dee_model_register_vardict_schema().
810
+ */
811
+ vfunc_get_field_schema(field_name: string | null): [ /* returnType */ string | null, /* out_column */ number ]
812
+ /**
813
+ * Retrieves a #DeeModelIter representing the first row in `self`.
814
+ * @virtual
815
+ * @returns A #DeeModelIter (owned by @self, do not free it)
816
+ */
817
+ vfunc_get_first_iter(): ModelIter
818
+ vfunc_get_int32(iter: ModelIter, column: number): number
819
+ vfunc_get_int64(iter: ModelIter, column: number): number
820
+ /**
821
+ * Retrieves a #DeeModelIter representing the row at the given index.
822
+ *
823
+ * Note that this method does not have any performance guarantees. In particular
824
+ * it is not guaranteed to be <emphasis>O(1)</emphasis>.
825
+ * @virtual
826
+ * @param row position of the row to retrieve
827
+ * @returns A new #DeeModelIter, or %NULL if @row was out of bounds. The returned iter is owned by @self, so do not free it.
828
+ */
829
+ vfunc_get_iter_at_row(row: number): ModelIter
830
+ /**
831
+ * Retrieves a #DeeModelIter pointing right <emphasis>after</emphasis> the
832
+ * last row in `self`. This is refered to also the the
833
+ * <emphasis>end iter</emphasis>.
834
+ *
835
+ * As with other iters the end iter, in particular, is stable over inserts,
836
+ * changes, or removals.
837
+ * @virtual
838
+ * @returns A #DeeModelIter (owned by @self, do not free it)
839
+ */
840
+ vfunc_get_last_iter(): ModelIter
841
+ /**
842
+ * Gets the number of columns in `self`
843
+ * @virtual
844
+ * @returns the number of columns per row in @self
845
+ */
846
+ vfunc_get_n_columns(): number
847
+ /**
848
+ * Gets the number of rows in `self`
849
+ * @virtual
850
+ * @returns the number of rows in @self
851
+ */
852
+ vfunc_get_n_rows(): number
853
+ /**
854
+ * Get the numeric offset of `iter` into `self`. Note that this method is
855
+ * <emphasis>not</emphasis> guaranteed to be <emphasis>O(1)</emphasis>.
856
+ * @virtual
857
+ * @param iter The iter to get the position of
858
+ * @returns The integer offset of @iter in @self
859
+ */
860
+ vfunc_get_position(iter: ModelIter): number
861
+ vfunc_get_row(iter: ModelIter, out_row_members: GLib.Variant): GLib.Variant
862
+ /**
863
+ * Get a %NULL-terminated array of #GVariant type strings that defines the
864
+ * required formats for the columns of `self`.
865
+ * @virtual
866
+ * @returns A %NULL-terminated array of #GVariant type strings. The length of the returned array is written to @num_columns. The returned array should not be freed or modified. It is owned by the model.
867
+ */
868
+ vfunc_get_schema(): string[]
869
+ vfunc_get_string(iter: ModelIter, column: number): string | null
870
+ /**
871
+ * Look up a tag value for a given row in a model. This method is guaranteed
872
+ * to be O(1).
873
+ * @virtual
874
+ * @param iter A #DeeModelIter pointing to the row to get the tag from
875
+ * @param tag The tag handle to retrieve the tag value for
876
+ * @returns Returns %NULL if @tag is unset otherwise the value of the tag as it was set with dee_model_set_tag().
877
+ */
878
+ vfunc_get_tag(iter: ModelIter, tag: ModelTag): any | null
879
+ vfunc_get_uchar(iter: ModelIter, column: number): number
880
+ vfunc_get_uint32(iter: ModelIter, column: number): number
881
+ vfunc_get_uint64(iter: ModelIter, column: number): number
882
+ vfunc_get_value(iter: ModelIter, column: number): GLib.Variant
883
+ vfunc_get_value_by_name(iter: ModelIter, column_name: string | null): GLib.Variant
884
+ /**
885
+ * Get a schema for variant dictionary column previously registered using
886
+ * dee_model_register_vardict_schema().
887
+ * @virtual
888
+ * @param num_column
889
+ * @returns Hashtable containing a mapping from field names to schemas or NULL. Note that keys and values in the hashtable may be owned by the model, so you need to create a deep copy if you intend to keep the hashtable around.
890
+ */
891
+ vfunc_get_vardict_schema(num_column: number): GLib.HashTable
892
+ /**
893
+ * As dee_model_insert(), but intended for language bindings or
894
+ * situations where you work with models on a meta level and may not have
895
+ * a priori knowledge of the column schemas of the models. See also
896
+ * dee_model_build_row().
897
+ * @virtual
898
+ * @param pos The index to insert the row on. The existing row will be pushed down.
899
+ * @param row_members An array of #GVariants with type signature matching those of the column schemas of `self`. If any of the variants have floating references they will be consumed.
900
+ * @returns A #DeeModelIter pointing to the new row
901
+ */
902
+ vfunc_insert_row(pos: number, row_members: GLib.Variant[]): ModelIter
903
+ /**
904
+ * As dee_model_insert_before(), but intended for language bindings or
905
+ * situations where you work with models on a meta level and may not have
906
+ * a priori knowledge of the column schemas of the models. See also
907
+ * dee_model_build_row().
908
+ * @virtual
909
+ * @param iter An iter pointing to the row before which to insert the new one
910
+ * @param row_members An array of #GVariants with type signature matching those of the column schemas of `self`. If any of the variants have floating references they will be consumed.
911
+ * @returns A #DeeModelIter pointing to the new row
912
+ */
913
+ vfunc_insert_row_before(iter: ModelIter, row_members: GLib.Variant[]): ModelIter
914
+ /**
915
+ * Inserts a row in `self` according to the sorting specified by `cmp_func`.
916
+ * If you use this method for insertion you should not use other methods as this
917
+ * method assumes the model to be already sorted by `cmp_func`.
918
+ * @virtual
919
+ * @param row_members An array of #GVariants with type signature matching those of the column schemas of `self`. If any of the variants have floating references they will be consumed.
920
+ * @param cmp_func Callback used for comparison or rows
921
+ * @returns A #DeeModelIter pointing to the new row
922
+ */
923
+ vfunc_insert_row_sorted(row_members: GLib.Variant[], cmp_func: CompareRowFunc): ModelIter
924
+ /**
925
+ * Checks if `iter` is the very first iter `self`.
926
+ * @virtual
927
+ * @param iter a #DeeModelIter
928
+ * @returns #TRUE if @iter is the first iter in the model
929
+ */
930
+ vfunc_is_first(iter: ModelIter): boolean
931
+ /**
932
+ * Whether `iter` is the end iter of `self`. Note that the end iter points
933
+ * right <emphasis>after</emphasis> the last valid row in `self`.
934
+ * @virtual
935
+ * @param iter a #DeeModelIter
936
+ * @returns #TRUE if @iter is the last iter in the model
937
+ */
938
+ vfunc_is_last(iter: ModelIter): boolean
939
+ /**
940
+ * Returns a #DeeModelIter that points to the next position in the model.
941
+ * @virtual
942
+ * @param iter a #DeeModelIter
943
+ * @returns A #DeeModelIter, pointing to the next row in the model. The iter is owned by @self, do not free it.
944
+ */
945
+ vfunc_next(iter: ModelIter): ModelIter
946
+ /**
947
+ * Like dee_model_prepend() but intended for language bindings or
948
+ * situations where you work with models on a meta level and may not have
949
+ * a priori knowledge of the column schemas of the models. See also
950
+ * dee_model_build_row().
951
+ * @virtual
952
+ * @param row_members An array of #GVariants with type signature matching those of the column schemas of `self`. If any of the variants have floating references they will be consumed.
953
+ * @returns A #DeeModelIter pointing to the new row
954
+ */
955
+ vfunc_prepend_row(row_members: GLib.Variant[]): ModelIter
956
+ /**
957
+ * Returns a #DeeModelIter that points to the previous position in the model.
958
+ * @virtual
959
+ * @param iter a #DeeModelIter
960
+ * @returns A #DeeModelIter, pointing to the previous row in the model. The iter is owned by @self, do not free it.
961
+ */
962
+ vfunc_prev(iter: ModelIter): ModelIter
963
+ /**
964
+ * Register a new tag on a #DeeModel. A <emphasis>tag</emphasis> is an extra
965
+ * value attached to a given row on a model. The tags are invisible to all
966
+ * that doesn't have the tag handle returned by this method. #DeeModel
967
+ * implementations must ensure that dee_model_get_tag() is an O(1) operation.
968
+ *
969
+ * Tags can be very useful in associating some extra data to a row in a model
970
+ * and have that automatically synced when the model changes. If you're
971
+ * writing a tiled view for a model you might want to tag each row with the
972
+ * tile widget for that row. That way you have very convenient access to the
973
+ * tile widget given any row in the model.
974
+ *
975
+ * The private nature of tags and the fact that you can store arbitrary pointers
976
+ * and binary data in them also means that they are not serialized if you
977
+ * utilize a model implementation that exposes the #DeeSerializable interface.
978
+ * @virtual
979
+ * @param tag_destroy Function called when a tagged row is removed from the model. This function will also be called on all tagged rows when the model is finalized.
980
+ * @returns A #DeeModelTag handle that you can use to set and get tags with
981
+ */
982
+ vfunc_register_tag(tag_destroy: GLib.DestroyNotify): ModelTag
983
+ /**
984
+ * Register schema for fields in a model containing column with variant
985
+ * dictionary schema ('a{sv}').
986
+ * The keys registered with this function can be later used
987
+ * with dee_model_build_named_row() function, as well as
988
+ * dee_model_get_value_by_name(). Note that it is possible to register
989
+ * the same field name for multiple columns, in which case you need to use
990
+ * fully-qualified "column_name::field" name in the calls to
991
+ * dee_model_build_named_row() and dee_model_get_field_schema().
992
+ * @virtual
993
+ * @param num_column
994
+ * @param schemas hashtable with keys specifying names of the fields and values defining their schema
995
+ */
996
+ vfunc_register_vardict_schema(num_column: number, schemas: GLib.HashTable): void
997
+ /**
998
+ * Removes the row at the given position from the model.
999
+ * @virtual
1000
+ * @param iter a #DeeModelIter pointing to the row to remove
1001
+ */
1002
+ vfunc_remove(iter: ModelIter): void
1003
+ vfunc_row_added(iter: ModelIter): void
1004
+ vfunc_row_changed(iter: ModelIter): void
1005
+ vfunc_row_removed(iter: ModelIter): void
1006
+ /**
1007
+ * Set column names used by `self`.
1008
+ * This method must be called exactly once, but only after setting
1009
+ * a schema of the model. Note that some constructors will do this for you.
1010
+ * @virtual
1011
+ * @param column_names A list of column names terminated by a %NULL
1012
+ */
1013
+ vfunc_set_column_names_full(column_names: string[]): void
1014
+ /**
1015
+ * Sets all columns in the row `iter` points to, to those found in
1016
+ * `row_members`. The variants in `row_members` must match the types defined in
1017
+ * the model's schema.
1018
+ * @virtual
1019
+ * @param iter a #DeeModelIter
1020
+ * @param row_members And array of #GVariant<!-- -->s with type signature matching those from the model schema. If any of the variants have floating references these will be consumed
1021
+ */
1022
+ vfunc_set_row(iter: ModelIter, row_members: GLib.Variant[]): void
1023
+ /**
1024
+ * Set the #GVariant types and the number of columns used by `self`.
1025
+ * This method must be called exactly once before using `self`. Note that
1026
+ * some constructors will do this for you.
1027
+ * @virtual
1028
+ * @param column_schemas A list of #GVariant type strings terminated by a %NULL
1029
+ */
1030
+ vfunc_set_schema_full(column_schemas: string[]): void
1031
+ /**
1032
+ * Set a tag on a row in a model. This function is guaranteed to be O(1).
1033
+ * See also dee_model_register_tag().
1034
+ *
1035
+ * If `tag` is already set on this row the existing tag value will be destroyed
1036
+ * with the #GDestroyNotify passed to the dee_model_register_tag().
1037
+ * @virtual
1038
+ * @param iter The row to set the tag on
1039
+ * @param tag The tag handle for the tag as obtained from dee_model_register_tag()
1040
+ * @param value The value to set for `tag`. Note that %NULL represents an unset tag
1041
+ */
1042
+ vfunc_set_tag(iter: ModelIter, tag: ModelTag, value: any | null): void
1043
+ /**
1044
+ * Sets the data in `column` for the row `iter` points to, to `value`. The type
1045
+ * of `value` must be convertible to the type of the column.
1046
+ *
1047
+ * When this method call completes the model will emit ::row-changed. You can
1048
+ * edit the model in place without triggering the change signals by calling
1049
+ * dee_model_set_value_silently().
1050
+ * @virtual
1051
+ * @param iter a #DeeModelIter
1052
+ * @param column column number to set the value
1053
+ * @param value New value for cell. If `value` is a floating reference the model will assume ownership of the variant
1054
+ */
1055
+ vfunc_set_value(iter: ModelIter, column: number, value: GLib.Variant): void
1056
+
1057
+ // Own signals of Dee-1.0.Dee.Model
1058
+
1059
+ connect(sigName: "changeset-finished", callback: Model.ChangesetFinishedSignalCallback): number
1060
+ connect_after(sigName: "changeset-finished", callback: Model.ChangesetFinishedSignalCallback): number
1061
+ emit(sigName: "changeset-finished", ...args: any[]): void
1062
+ connect(sigName: "changeset-started", callback: Model.ChangesetStartedSignalCallback): number
1063
+ connect_after(sigName: "changeset-started", callback: Model.ChangesetStartedSignalCallback): number
1064
+ emit(sigName: "changeset-started", ...args: any[]): void
1065
+ connect(sigName: "row-added", callback: Model.RowAddedSignalCallback): number
1066
+ connect_after(sigName: "row-added", callback: Model.RowAddedSignalCallback): number
1067
+ emit(sigName: "row-added", iter: ModelIter, ...args: any[]): void
1068
+ connect(sigName: "row-changed", callback: Model.RowChangedSignalCallback): number
1069
+ connect_after(sigName: "row-changed", callback: Model.RowChangedSignalCallback): number
1070
+ emit(sigName: "row-changed", iter: ModelIter, ...args: any[]): void
1071
+ connect(sigName: "row-removed", callback: Model.RowRemovedSignalCallback): number
1072
+ connect_after(sigName: "row-removed", callback: Model.RowRemovedSignalCallback): number
1073
+ emit(sigName: "row-removed", iter: ModelIter, ...args: any[]): void
1074
+
1075
+ // Class property signals of Dee-1.0.Dee.Model
1076
+
1077
+ connect(sigName: string, callback: (...args: any[]) => void): number
1078
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1079
+ emit(sigName: string, ...args: any[]): void
1080
+ disconnect(id: number): void
1081
+ }
1082
+
1083
+ class Model extends GObject.Object {
1084
+
1085
+ // Own properties of Dee-1.0.Dee.Model
1086
+
1087
+ static name: string
1088
+ static $gtype: GObject.GType<Model>
1089
+
1090
+ // Constructors of Dee-1.0.Dee.Model
1091
+
1092
+ constructor(config?: Model.ConstructorProperties)
1093
+ _init(config?: Model.ConstructorProperties): void
1094
+ }
1095
+
1096
+ module ResourceManager {
1097
+
1098
+ // Constructor properties interface
1099
+
1100
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1101
+ }
1102
+
1103
+ }
1104
+
1105
+ interface ResourceManager {
1106
+
1107
+ // Owm methods of Dee-1.0.Dee.ResourceManager
1108
+
1109
+ /**
1110
+ * Load a resource from persistent storage. The loaded resource will be of the
1111
+ * same GType as when it was stored (provided that the same serialization and
1112
+ * parse functions are registered).
1113
+ *
1114
+ * In case of an error the error will be in the #GFileError domain. Specifically
1115
+ * if there is no resource with the name `resource_name` the error code will
1116
+ * be #G_FILE_ERROR_NOENT.
1117
+ *
1118
+ * Important note: This call may do blocking IO. The resource manager must
1119
+ * guarantee that this call is reasonably fast, like writing the externalized
1120
+ * resource to a file, but not blocking IO over a network socket.
1121
+ * @param resource_name The name of the resource to retrieve
1122
+ * @returns A newly allocated #GObject in case of success and %NULL otherwise. In case of a runtime error the @error pointer will be set.
1123
+ */
1124
+ load(resource_name: string | null): GObject.Object
1125
+ /**
1126
+ * Store a resource under a given name. The resource manager must guarantee
1127
+ * that the stored data survives system reboots and that you can recreate a
1128
+ * copy of `resource` by calling dee_resource_manager_load() using the
1129
+ * same `resource_name`.
1130
+ *
1131
+ * Important note: This call may do blocking IO. The resource manager must
1132
+ * guarantee that this call is reasonably fast, like writing the externalized
1133
+ * resource to a file, but not blocking IO over a network socket.
1134
+ * @param resource A #DeeSerializable to store under `resource_name`
1135
+ * @param resource_name The name to store the resource under. Will overwrite any existing resource with the same name
1136
+ * @returns %TRUE on success and %FALSE otherwise. In case of a runtime error the @error pointer will point to a #GError in the #DeeResourceError domain.
1137
+ */
1138
+ store(resource: Serializable, resource_name: string | null): boolean
1139
+
1140
+ // Own virtual methods of Dee-1.0.Dee.ResourceManager
1141
+
1142
+ /**
1143
+ * Load a resource from persistent storage. The loaded resource will be of the
1144
+ * same GType as when it was stored (provided that the same serialization and
1145
+ * parse functions are registered).
1146
+ *
1147
+ * In case of an error the error will be in the #GFileError domain. Specifically
1148
+ * if there is no resource with the name `resource_name` the error code will
1149
+ * be #G_FILE_ERROR_NOENT.
1150
+ *
1151
+ * Important note: This call may do blocking IO. The resource manager must
1152
+ * guarantee that this call is reasonably fast, like writing the externalized
1153
+ * resource to a file, but not blocking IO over a network socket.
1154
+ * @virtual
1155
+ * @param resource_name The name of the resource to retrieve
1156
+ * @returns A newly allocated #GObject in case of success and %NULL otherwise. In case of a runtime error the @error pointer will be set.
1157
+ */
1158
+ vfunc_load(resource_name: string | null): GObject.Object
1159
+ /**
1160
+ * Store a resource under a given name. The resource manager must guarantee
1161
+ * that the stored data survives system reboots and that you can recreate a
1162
+ * copy of `resource` by calling dee_resource_manager_load() using the
1163
+ * same `resource_name`.
1164
+ *
1165
+ * Important note: This call may do blocking IO. The resource manager must
1166
+ * guarantee that this call is reasonably fast, like writing the externalized
1167
+ * resource to a file, but not blocking IO over a network socket.
1168
+ * @virtual
1169
+ * @param resource A #DeeSerializable to store under `resource_name`
1170
+ * @param resource_name The name to store the resource under. Will overwrite any existing resource with the same name
1171
+ * @returns %TRUE on success and %FALSE otherwise. In case of a runtime error the @error pointer will point to a #GError in the #DeeResourceError domain.
1172
+ */
1173
+ vfunc_store(resource: Serializable, resource_name: string | null): boolean
1174
+
1175
+ // Class property signals of Dee-1.0.Dee.ResourceManager
1176
+
1177
+ connect(sigName: string, callback: (...args: any[]) => void): number
1178
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1179
+ emit(sigName: string, ...args: any[]): void
1180
+ disconnect(id: number): void
1181
+ }
1182
+
1183
+ class ResourceManager extends GObject.Object {
1184
+
1185
+ // Own properties of Dee-1.0.Dee.ResourceManager
1186
+
1187
+ static name: string
1188
+ static $gtype: GObject.GType<ResourceManager>
1189
+
1190
+ // Constructors of Dee-1.0.Dee.ResourceManager
1191
+
1192
+ constructor(config?: ResourceManager.ConstructorProperties)
1193
+ _init(config?: ResourceManager.ConstructorProperties): void
1194
+ /**
1195
+ * Get a pointer to the platform default #DeeResourceManager.
1196
+ * @returns The default resource manager for the platform. Do not unreference. If you need to keep the instance around you must manually reference it.
1197
+ */
1198
+ static get_default(): ResourceManager
1199
+ }
1200
+
1201
+ module ResultSet {
1202
+
1203
+ // Constructor properties interface
1204
+
1205
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1206
+ }
1207
+
1208
+ }
1209
+
1210
+ interface ResultSet {
1211
+
1212
+ // Owm methods of Dee-1.0.Dee.ResultSet
1213
+
1214
+ /**
1215
+ * Get the model associated with a result set
1216
+ * @returns The model that the rows point into
1217
+ */
1218
+ get_model(): Model
1219
+ /**
1220
+ * Get the number of #DeeModelIter<!-- -->s held in a #DeeResultSet.
1221
+ * @returns The number of rows held in the result set
1222
+ */
1223
+ get_n_rows(): number
1224
+ /**
1225
+ * Check if a call to dee_result_set_next() will succeed.
1226
+ * @returns %TRUE if and only if more rows can be retrieved by calling dee_result_set_next()
1227
+ */
1228
+ has_next(): boolean
1229
+ /**
1230
+ * Get the current row from the result set and advance the cursor.
1231
+ * To ensure that calls to this method will succeed you can call
1232
+ * dee_result_set_has_next().
1233
+ *
1234
+ * To retrieve the current row without advancing the cursor call
1235
+ * dee_result_set_peek() in stead of this method.
1236
+ * @returns The #DeeModelIter at the current cursor position
1237
+ */
1238
+ next(): ModelIter
1239
+ /**
1240
+ * Get the row at the current cursor position.
1241
+ *
1242
+ * To retrieve the current row and advance the cursor position call
1243
+ * dee_result_set_next() in stead of this method.
1244
+ * @returns The #DeeModelIter at the current cursor position
1245
+ */
1246
+ peek(): ModelIter
1247
+ /**
1248
+ * Set the cursor position. Following calls to dee_result_set_peek()
1249
+ * or dee_result_set_next() will read the row at position `pos`.
1250
+ * @param pos The position to seek to
1251
+ */
1252
+ seek(pos: number): void
1253
+ /**
1254
+ * Get the current position of the cursor.
1255
+ * @returns The current position of the cursor
1256
+ */
1257
+ tell(): number
1258
+
1259
+ // Own virtual methods of Dee-1.0.Dee.ResultSet
1260
+
1261
+ /**
1262
+ * Get the model associated with a result set
1263
+ * @virtual
1264
+ * @returns The model that the rows point into
1265
+ */
1266
+ vfunc_get_model(): Model
1267
+ /**
1268
+ * Get the number of #DeeModelIter<!-- -->s held in a #DeeResultSet.
1269
+ * @virtual
1270
+ * @returns The number of rows held in the result set
1271
+ */
1272
+ vfunc_get_n_rows(): number
1273
+ /**
1274
+ * Check if a call to dee_result_set_next() will succeed.
1275
+ * @virtual
1276
+ * @returns %TRUE if and only if more rows can be retrieved by calling dee_result_set_next()
1277
+ */
1278
+ vfunc_has_next(): boolean
1279
+ /**
1280
+ * Get the current row from the result set and advance the cursor.
1281
+ * To ensure that calls to this method will succeed you can call
1282
+ * dee_result_set_has_next().
1283
+ *
1284
+ * To retrieve the current row without advancing the cursor call
1285
+ * dee_result_set_peek() in stead of this method.
1286
+ * @virtual
1287
+ * @returns The #DeeModelIter at the current cursor position
1288
+ */
1289
+ vfunc_next(): ModelIter
1290
+ /**
1291
+ * Get the row at the current cursor position.
1292
+ *
1293
+ * To retrieve the current row and advance the cursor position call
1294
+ * dee_result_set_next() in stead of this method.
1295
+ * @virtual
1296
+ * @returns The #DeeModelIter at the current cursor position
1297
+ */
1298
+ vfunc_peek(): ModelIter
1299
+ /**
1300
+ * Set the cursor position. Following calls to dee_result_set_peek()
1301
+ * or dee_result_set_next() will read the row at position `pos`.
1302
+ * @virtual
1303
+ * @param pos The position to seek to
1304
+ */
1305
+ vfunc_seek(pos: number): void
1306
+ /**
1307
+ * Get the current position of the cursor.
1308
+ * @virtual
1309
+ * @returns The current position of the cursor
1310
+ */
1311
+ vfunc_tell(): number
1312
+
1313
+ // Class property signals of Dee-1.0.Dee.ResultSet
1314
+
1315
+ connect(sigName: string, callback: (...args: any[]) => void): number
1316
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1317
+ emit(sigName: string, ...args: any[]): void
1318
+ disconnect(id: number): void
1319
+ }
1320
+
1321
+ class ResultSet extends GObject.Object {
1322
+
1323
+ // Own properties of Dee-1.0.Dee.ResultSet
1324
+
1325
+ static name: string
1326
+ static $gtype: GObject.GType<ResultSet>
1327
+
1328
+ // Constructors of Dee-1.0.Dee.ResultSet
1329
+
1330
+ constructor(config?: ResultSet.ConstructorProperties)
1331
+ _init(config?: ResultSet.ConstructorProperties): void
1332
+ }
1333
+
1334
+ module Serializable {
1335
+
1336
+ // Constructor properties interface
1337
+
1338
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1339
+ }
1340
+
1341
+ }
1342
+
1343
+ interface Serializable {
1344
+
1345
+ // Owm methods of Dee-1.0.Dee.Serializable
1346
+
1347
+ /**
1348
+ * Build an externalized form of `self` which can be used together with
1349
+ * dee_serializable_parse_external() to rebuild a copy of `self`.
1350
+ *
1351
+ * It is important to note that the variant returned from this method does
1352
+ * not have the same type signature as returned from a call to
1353
+ * dee_serializable_serialize(). Externalization will wrap the serialized data
1354
+ * in a container format with versioning information and headers with type
1355
+ * information.
1356
+ * @returns A floating reference to a #GVariant with the externalized data.
1357
+ */
1358
+ externalize(): GLib.Variant
1359
+ /**
1360
+ * Build a clean serialized representation of `self`. The signature of the
1361
+ * returned variant is entirely determined by the underlying implementation.
1362
+ * You can recreate a serialized instance by calling dee_serializable_parse()
1363
+ * provided that you know the correct #GType for the serialized instance.
1364
+ * @returns A reference to a #GVariant with the serialized data. The variants type signature is entirely dependent of the underlying implementation. Free using g_variant_unref().
1365
+ */
1366
+ serialize(): GLib.Variant
1367
+
1368
+ // Own virtual methods of Dee-1.0.Dee.Serializable
1369
+
1370
+ /**
1371
+ * Build a clean serialized representation of `self`. The signature of the
1372
+ * returned variant is entirely determined by the underlying implementation.
1373
+ * You can recreate a serialized instance by calling dee_serializable_parse()
1374
+ * provided that you know the correct #GType for the serialized instance.
1375
+ * @virtual
1376
+ * @returns A reference to a #GVariant with the serialized data. The variants type signature is entirely dependent of the underlying implementation. Free using g_variant_unref().
1377
+ */
1378
+ vfunc_serialize(): GLib.Variant
1379
+
1380
+ // Class property signals of Dee-1.0.Dee.Serializable
1381
+
1382
+ connect(sigName: string, callback: (...args: any[]) => void): number
1383
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1384
+ emit(sigName: string, ...args: any[]): void
1385
+ disconnect(id: number): void
1386
+ }
1387
+
1388
+ class Serializable extends GObject.Object {
1389
+
1390
+ // Own properties of Dee-1.0.Dee.Serializable
1391
+
1392
+ static name: string
1393
+ static $gtype: GObject.GType<Serializable>
1394
+
1395
+ // Constructors of Dee-1.0.Dee.Serializable
1396
+
1397
+ constructor(config?: Serializable.ConstructorProperties)
1398
+ _init(config?: Serializable.ConstructorProperties): void
1399
+ /**
1400
+ * Reconstruct a #DeeSerializable from #GVariant data. For this function
1401
+ * to work you need to register a parser with
1402
+ * dee_serializable_register_parser(). Any native Dee class will do so
1403
+ * automatically.
1404
+ *
1405
+ * This method only works on data created with dee_serializable_serialize()
1406
+ * and <emphasis>not</emphasis> with data from dee_serializable_externalize().
1407
+ *
1408
+ * Since a #DeeSerializableParseFunc is not allowed to fail - by contract -
1409
+ * it can be guaranteed that this function only returns %NULL in case there
1410
+ * is no known parser for `type` and #GVariant signature of `data`.
1411
+ * @param data The #GVariant data to parse. If this is a floating reference it will be consumed
1412
+ * @param type The #GType of the class to instantiate from `data`
1413
+ * @returns A newly constructed #GObject build from @data or %NULL in case no parser has been registered for the given #GType or variant signature. Free with g_object_unref().
1414
+ */
1415
+ static parse(data: GLib.Variant, type: GObject.GType): GObject.Object
1416
+ /**
1417
+ * Reconstruct a #DeeSerializable from #GVariant data. For this function
1418
+ * to work you need to register a parser with
1419
+ * dee_serializable_register_parser(). Any native Dee class will do so
1420
+ * automatically.
1421
+ *
1422
+ * This method only works on data created with dee_serializable_externalize()
1423
+ * and <emphasis>not</emphasis> with data from dee_serializable_serialize().
1424
+ *
1425
+ * Since a #DeeSerializableParseFunc is not allowed to fail - by contract -
1426
+ * it can be guaranteed that this function only returns %NULL in case there
1427
+ * is no known parser for the #GType or #GVariant signature of `data`.
1428
+ * @param data The #GVariant data to parse
1429
+ * @returns A newly constructed #GObject build from @data or %NULL in case no parser has been registered for the given #GType or variant signature. Free with g_object_unref().
1430
+ */
1431
+ static parse_external(data: GLib.Variant): GObject.Object
1432
+ }
1433
+
1434
+ module Analyzer {
1435
+
1436
+ // Constructor properties interface
1437
+
1438
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1439
+ }
1440
+
1441
+ }
1442
+
1443
+ interface Analyzer {
1444
+
1445
+ // Owm methods of Dee-1.0.Dee.Analyzer
1446
+
1447
+ /**
1448
+ * Register a #DeeTermFilterFunc to be called whenever dee_analyzer_analyze()
1449
+ * is called.
1450
+ *
1451
+ * Term filters can be used to normalize, add, or remove terms from an input
1452
+ * data stream.
1453
+ * @param filter_func Function to call
1454
+ */
1455
+ add_term_filter(filter_func: TermFilterFunc): void
1456
+ /**
1457
+ * Extract terms and or collation keys from some input data (which is normally,
1458
+ * but not necessarily, a UTF-8 string).
1459
+ *
1460
+ * The terms and corresponding collation keys will be written in order to the
1461
+ * provided #DeeTermList<!-- -->s.
1462
+ *
1463
+ * Implementation notes for subclasses:
1464
+ * The analysis process must call dee_analyzer_tokenize() and run the tokens
1465
+ * through all term filters added with dee_analyzer_add_term_filter().
1466
+ * Collation keys must be generated with dee_analyzer_collate_key().
1467
+ * @param data The input data to analyze
1468
+ * @param terms_out A #DeeTermList to place the generated terms in. If %NULL to terms are generated
1469
+ * @param colkeys_out A #DeeTermList to place generated collation keys in. If %NULL no collation keys are generated
1470
+ */
1471
+ analyze(data: string | null, terms_out: TermList | null, colkeys_out: TermList | null): void
1472
+ /**
1473
+ * Compare collation keys generated by dee_analyzer_collate_key() with similar
1474
+ * semantics as strcmp(). See also dee_analyzer_collate_cmp_func() if you
1475
+ * need a version of this function that works as a #GCompareDataFunc.
1476
+ *
1477
+ * The default implementation in #DeeAnalyzer just uses strcmp().
1478
+ * @param key1 The first collation key to compare
1479
+ * @param key2 The second collation key to compare
1480
+ * @returns -1, 0 or 1, if @key1 is &lt;, == or &gt; than @key2.
1481
+ */
1482
+ collate_cmp(key1: string | null, key2: string | null): number
1483
+ /**
1484
+ * Generate a collation key for a set of input data (usually a UTF-8 string
1485
+ * passed through tokenization and term filters of the analyzer).
1486
+ *
1487
+ * The default implementation just calls g_strdup().
1488
+ * @param data The input data to generate a collation key for
1489
+ * @returns A newly allocated collation key. Use dee_analyzer_collate_cmp() or dee_analyzer_collate_cmp_func() to compare collation keys. Free with g_free().
1490
+ */
1491
+ collate_key(data: string | null): string | null
1492
+ /**
1493
+ * Tokenize some input data (which is normally, but not necessarily,
1494
+ * a UTF-8 string).
1495
+ *
1496
+ * Tokenization splits the input data into constituents (in most cases words),
1497
+ * but does not run it through any of the term filters set for the analyzer.
1498
+ * It is undefined if the tokenization process itself does any normalization.
1499
+ * @param data The input data to analyze
1500
+ * @param terms_out A #DeeTermList to place the generated tokens in.
1501
+ */
1502
+ tokenize(data: string | null, terms_out: TermList): void
1503
+
1504
+ // Own virtual methods of Dee-1.0.Dee.Analyzer
1505
+
1506
+ /**
1507
+ * Register a #DeeTermFilterFunc to be called whenever dee_analyzer_analyze()
1508
+ * is called.
1509
+ *
1510
+ * Term filters can be used to normalize, add, or remove terms from an input
1511
+ * data stream.
1512
+ * @virtual
1513
+ * @param filter_func Function to call
1514
+ */
1515
+ vfunc_add_term_filter(filter_func: TermFilterFunc): void
1516
+ /**
1517
+ * Extract terms and or collation keys from some input data (which is normally,
1518
+ * but not necessarily, a UTF-8 string).
1519
+ *
1520
+ * The terms and corresponding collation keys will be written in order to the
1521
+ * provided #DeeTermList<!-- -->s.
1522
+ *
1523
+ * Implementation notes for subclasses:
1524
+ * The analysis process must call dee_analyzer_tokenize() and run the tokens
1525
+ * through all term filters added with dee_analyzer_add_term_filter().
1526
+ * Collation keys must be generated with dee_analyzer_collate_key().
1527
+ * @virtual
1528
+ * @param data The input data to analyze
1529
+ * @param terms_out A #DeeTermList to place the generated terms in. If %NULL to terms are generated
1530
+ * @param colkeys_out A #DeeTermList to place generated collation keys in. If %NULL no collation keys are generated
1531
+ */
1532
+ vfunc_analyze(data: string | null, terms_out: TermList | null, colkeys_out: TermList | null): void
1533
+ /**
1534
+ * Compare collation keys generated by dee_analyzer_collate_key() with similar
1535
+ * semantics as strcmp(). See also dee_analyzer_collate_cmp_func() if you
1536
+ * need a version of this function that works as a #GCompareDataFunc.
1537
+ *
1538
+ * The default implementation in #DeeAnalyzer just uses strcmp().
1539
+ * @virtual
1540
+ * @param key1 The first collation key to compare
1541
+ * @param key2 The second collation key to compare
1542
+ * @returns -1, 0 or 1, if @key1 is &lt;, == or &gt; than @key2.
1543
+ */
1544
+ vfunc_collate_cmp(key1: string | null, key2: string | null): number
1545
+ /**
1546
+ * Generate a collation key for a set of input data (usually a UTF-8 string
1547
+ * passed through tokenization and term filters of the analyzer).
1548
+ *
1549
+ * The default implementation just calls g_strdup().
1550
+ * @virtual
1551
+ * @param data The input data to generate a collation key for
1552
+ * @returns A newly allocated collation key. Use dee_analyzer_collate_cmp() or dee_analyzer_collate_cmp_func() to compare collation keys. Free with g_free().
1553
+ */
1554
+ vfunc_collate_key(data: string | null): string | null
1555
+ /**
1556
+ * Tokenize some input data (which is normally, but not necessarily,
1557
+ * a UTF-8 string).
1558
+ *
1559
+ * Tokenization splits the input data into constituents (in most cases words),
1560
+ * but does not run it through any of the term filters set for the analyzer.
1561
+ * It is undefined if the tokenization process itself does any normalization.
1562
+ * @virtual
1563
+ * @param data The input data to analyze
1564
+ * @param terms_out A #DeeTermList to place the generated tokens in.
1565
+ */
1566
+ vfunc_tokenize(data: string | null, terms_out: TermList): void
1567
+
1568
+ // Class property signals of Dee-1.0.Dee.Analyzer
1569
+
1570
+ connect(sigName: string, callback: (...args: any[]) => void): number
1571
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1572
+ emit(sigName: string, ...args: any[]): void
1573
+ disconnect(id: number): void
1574
+ }
1575
+
1576
+ /**
1577
+ * All fields in the DeeAnalyzer structure are private and should never be
1578
+ * accessed directly
1579
+ * @class
1580
+ */
1581
+ class Analyzer extends GObject.Object {
1582
+
1583
+ // Own properties of Dee-1.0.Dee.Analyzer
1584
+
1585
+ static name: string
1586
+ static $gtype: GObject.GType<Analyzer>
1587
+
1588
+ // Constructors of Dee-1.0.Dee.Analyzer
1589
+
1590
+ constructor(config?: Analyzer.ConstructorProperties)
1591
+ constructor()
1592
+ static new(): Analyzer
1593
+ _init(config?: Analyzer.ConstructorProperties): void
1594
+ /**
1595
+ * A #GCompareDataFunc using a #DeeAnalyzer to compare the keys. This is just
1596
+ * a convenience wrapper around dee_analyzer_collate_cmp().
1597
+ * @param key1 The first key to compare
1598
+ * @param key2 The second key to compare
1599
+ * @param analyzer The #DeeAnalyzer to use for the comparison
1600
+ * @returns -1, 0 or 1, if @key1 is &lt;, == or &gt; than @key2.
1601
+ */
1602
+ static collate_cmp_func(key1: string | null, key2: string | null, analyzer: any | null): number
1603
+ }
1604
+
1605
+ module Client {
1606
+
1607
+ // Constructor properties interface
1608
+
1609
+ interface ConstructorProperties extends Peer.ConstructorProperties {
1610
+
1611
+ // Own constructor properties of Dee-1.0.Dee.Client
1612
+
1613
+ bus_address?: string | null
1614
+ }
1615
+
1616
+ }
1617
+
1618
+ interface Client {
1619
+
1620
+ // Own properties of Dee-1.0.Dee.Client
1621
+
1622
+ readonly bus_address: string | null
1623
+
1624
+ // Class property signals of Dee-1.0.Dee.Client
1625
+
1626
+ connect(sigName: "notify::bus-address", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
1627
+ connect_after(sigName: "notify::bus-address", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
1628
+ emit(sigName: "notify::bus-address", ...args: any[]): void
1629
+ connect(sigName: "notify::swarm-leader", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
1630
+ connect_after(sigName: "notify::swarm-leader", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
1631
+ emit(sigName: "notify::swarm-leader", ...args: any[]): void
1632
+ connect(sigName: "notify::swarm-name", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
1633
+ connect_after(sigName: "notify::swarm-name", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
1634
+ emit(sigName: "notify::swarm-name", ...args: any[]): void
1635
+ connect(sigName: "notify::swarm-owner", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
1636
+ connect_after(sigName: "notify::swarm-owner", callback: (($obj: Client, pspec: GObject.ParamSpec) => void)): number
1637
+ emit(sigName: "notify::swarm-owner", ...args: any[]): void
1638
+ connect(sigName: string, callback: (...args: any[]) => void): number
1639
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1640
+ emit(sigName: string, ...args: any[]): void
1641
+ disconnect(id: number): void
1642
+ }
1643
+
1644
+ class Client extends Peer {
1645
+
1646
+ // Own properties of Dee-1.0.Dee.Client
1647
+
1648
+ static name: string
1649
+ static $gtype: GObject.GType<Client>
1650
+
1651
+ // Constructors of Dee-1.0.Dee.Client
1652
+
1653
+ constructor(config?: Client.ConstructorProperties)
1654
+ /**
1655
+ * Creates a new instance of #DeeClient and tries to connect to #DeeServer
1656
+ * created using dee_server_new(). The #DeePeer:swarm-leader property will
1657
+ * be set once the client connects.
1658
+ * @constructor
1659
+ * @param swarm_name Name of swarm to join.
1660
+ * @returns A newly constructed #DeeClient.
1661
+ */
1662
+ constructor(swarm_name: string | null)
1663
+ /**
1664
+ * Creates a new instance of #DeeClient and tries to connect to #DeeServer
1665
+ * created using dee_server_new(). The #DeePeer:swarm-leader property will
1666
+ * be set once the client connects.
1667
+ * @constructor
1668
+ * @param swarm_name Name of swarm to join.
1669
+ * @returns A newly constructed #DeeClient.
1670
+ */
1671
+ static new(swarm_name: string | null): Client
1672
+
1673
+ // Overloads of new
1674
+
1675
+ /**
1676
+ * Create a new #DeePeer. The peer will immediately connect to the swarm
1677
+ * and start the peer discovery.
1678
+ * @constructor
1679
+ * @param swarm_name The name of the swarm to join. Fx &quot;org.example.DataProviders&quot;
1680
+ * @returns A newly constructed #DeePeer. Free with g_object_unref().
1681
+ */
1682
+ static new(swarm_name: string | null): Peer
1683
+ /**
1684
+ * Creates a new instance of #DeeClient and tries to connect to `bus_address`.
1685
+ * The #DeePeer:swarm-leader property will be set once the client connects.
1686
+ * @constructor
1687
+ * @param swarm_name Name of swarm to join.
1688
+ * @param bus_address D-Bus address to use when connecting to the server.
1689
+ * @returns A newly constructed #DeeClient.
1690
+ */
1691
+ static new_for_address(swarm_name: string | null, bus_address: string | null): Client
1692
+ _init(config?: Client.ConstructorProperties): void
1693
+ }
1694
+
1695
+ module FileResourceManager {
1696
+
1697
+ // Constructor properties interface
1698
+
1699
+ interface ConstructorProperties extends ResourceManager.ConstructorProperties, GObject.Object.ConstructorProperties {
1700
+
1701
+ // Own constructor properties of Dee-1.0.Dee.FileResourceManager
1702
+
1703
+ /**
1704
+ * Property holding the primary path used to store and load resources
1705
+ */
1706
+ primary_path?: string | null
1707
+ }
1708
+
1709
+ }
1710
+
1711
+ interface FileResourceManager extends ResourceManager {
1712
+
1713
+ // Own properties of Dee-1.0.Dee.FileResourceManager
1714
+
1715
+ /**
1716
+ * Property holding the primary path used to store and load resources
1717
+ */
1718
+ readonly primary_path: string | null
1719
+
1720
+ // Own fields of Dee-1.0.Dee.FileResourceManager
1721
+
1722
+ parent_instance: GObject.Object
1723
+
1724
+ // Owm methods of Dee-1.0.Dee.FileResourceManager
1725
+
1726
+ /**
1727
+ * Add a path to the set of paths searched for resources. The manager will
1728
+ * first search the primary path as specified in the constructor and then
1729
+ * search paths in the order they where added.
1730
+ * @param path The path to add to the set of searched paths
1731
+ */
1732
+ add_search_path(path: string | null): void
1733
+ /**
1734
+ * Helper method to access the :primary-path property.
1735
+ * @returns The value of the :primary-path property
1736
+ */
1737
+ get_primary_path(): string | null
1738
+
1739
+ // Class property signals of Dee-1.0.Dee.FileResourceManager
1740
+
1741
+ connect(sigName: "notify::primary-path", callback: (($obj: FileResourceManager, pspec: GObject.ParamSpec) => void)): number
1742
+ connect_after(sigName: "notify::primary-path", callback: (($obj: FileResourceManager, pspec: GObject.ParamSpec) => void)): number
1743
+ emit(sigName: "notify::primary-path", ...args: any[]): void
1744
+ connect(sigName: string, callback: (...args: any[]) => void): number
1745
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1746
+ emit(sigName: string, ...args: any[]): void
1747
+ disconnect(id: number): void
1748
+ }
1749
+
1750
+ class FileResourceManager extends GObject.Object {
1751
+
1752
+ // Own properties of Dee-1.0.Dee.FileResourceManager
1753
+
1754
+ static name: string
1755
+ static $gtype: GObject.GType<FileResourceManager>
1756
+
1757
+ // Constructors of Dee-1.0.Dee.FileResourceManager
1758
+
1759
+ constructor(config?: FileResourceManager.ConstructorProperties)
1760
+ /**
1761
+ * Create a new #DeeFileResourceManager with its primary store- and load
1762
+ * path set to `primary_path`.
1763
+ *
1764
+ * You can manually add fallback search paths by calling
1765
+ * dee_file_resource_manager_add_search_path().
1766
+ *
1767
+ * You normally don't need to create you own resource managers. Instead
1768
+ * you should call dee_resource_manager_get_default().
1769
+ * @constructor
1770
+ * @param primary_path The primary path used to store and load resources. If you pass %NULL the manager will use a default path.
1771
+ * @returns A newly allocated #DeeFileResourceManager. Free with g_object_unref().
1772
+ */
1773
+ constructor(primary_path: string | null)
1774
+ /**
1775
+ * Create a new #DeeFileResourceManager with its primary store- and load
1776
+ * path set to `primary_path`.
1777
+ *
1778
+ * You can manually add fallback search paths by calling
1779
+ * dee_file_resource_manager_add_search_path().
1780
+ *
1781
+ * You normally don't need to create you own resource managers. Instead
1782
+ * you should call dee_resource_manager_get_default().
1783
+ * @constructor
1784
+ * @param primary_path The primary path used to store and load resources. If you pass %NULL the manager will use a default path.
1785
+ * @returns A newly allocated #DeeFileResourceManager. Free with g_object_unref().
1786
+ */
1787
+ static new(primary_path: string | null): FileResourceManager
1788
+ _init(config?: FileResourceManager.ConstructorProperties): void
1789
+ }
1790
+
1791
+ module FilterModel {
1792
+
1793
+ // Constructor properties interface
1794
+
1795
+ interface ConstructorProperties extends Model.ConstructorProperties, Serializable.ConstructorProperties, ProxyModel.ConstructorProperties {
1796
+
1797
+ // Own constructor properties of Dee-1.0.Dee.FilterModel
1798
+
1799
+ /**
1800
+ * Property holding the #DeeFilter used to filter the model
1801
+ * defined in the #DeeFilterModel:back-end property.
1802
+ */
1803
+ filter?: Filter | null
1804
+ }
1805
+
1806
+ }
1807
+
1808
+ interface FilterModel extends Model, Serializable {
1809
+
1810
+ // Own properties of Dee-1.0.Dee.FilterModel
1811
+
1812
+ /**
1813
+ * Property holding the #DeeFilter used to filter the model
1814
+ * defined in the #DeeFilterModel:back-end property.
1815
+ */
1816
+ readonly filter: Filter
1817
+
1818
+ // Owm methods of Dee-1.0.Dee.FilterModel
1819
+
1820
+ /**
1821
+ * Includes `iter` from the back end model in the filtered model, appending
1822
+ * it to the end of the filtered rows.
1823
+ *
1824
+ * This method is usually called when implementing #DeeFilterMapFunc or
1825
+ * #DeeFilterMapNotify methods.
1826
+ * @param iter
1827
+ * @returns Always returns @iter
1828
+ */
1829
+ append_iter(iter: ModelIter): ModelIter
1830
+ /**
1831
+ * Check if `iter` from the back end model is mapped in `self`.
1832
+ * @param iter The #DeeModelIter to check
1833
+ * @returns %TRUE if and only if @iter is contained in @self.
1834
+ */
1835
+ contains(iter: ModelIter): boolean
1836
+ /**
1837
+ * Includes `iter` from the back end model in the filtered model, inserting it at
1838
+ * `pos` pushing other rows down.
1839
+ *
1840
+ * This method is usually called when implementing #DeeFilterMapFunc or
1841
+ * #DeeFilterMapNotify methods.
1842
+ * @param iter
1843
+ * @param pos
1844
+ * @returns Always returns @iter
1845
+ */
1846
+ insert_iter(iter: ModelIter, pos: number): ModelIter
1847
+ /**
1848
+ * Includes `iter` from the back end model in the filtered model, inserting it at
1849
+ * the position before `pos` pushing other rows down.
1850
+ *
1851
+ * This method is usually called when implementing #DeeFilterMapFunc or
1852
+ * #DeeFilterMapNotify methods.
1853
+ * @param iter
1854
+ * @param pos
1855
+ * @returns Always returns @iter
1856
+ */
1857
+ insert_iter_before(iter: ModelIter, pos: ModelIter): ModelIter
1858
+ /**
1859
+ * Inserts `iter` in `self` in a way that is consistent with the ordering of the
1860
+ * rows in the original #DeeModel behind `self`. THis method assumes that `self`
1861
+ * is already ordered this way. If that's not the case then this method has
1862
+ * undefined behaviour.
1863
+ *
1864
+ * This method is mainly intended as a helper for #DeeFilterMapNotify functions
1865
+ * of #DeeFilter implementations that creates filter models sorted in
1866
+ * accordance with the original models.
1867
+ * @param iter Iterator
1868
+ * @returns Always returns @iter
1869
+ */
1870
+ insert_iter_with_original_order(iter: ModelIter): ModelIter
1871
+ /**
1872
+ * Includes `iter` from the back end model in the filtered model, prepending
1873
+ * it to the beginning of the filtered rows.
1874
+ *
1875
+ * This method is usually called when implementing #DeeFilterMapFunc or
1876
+ * #DeeFilterMapNotify methods.
1877
+ * @param iter
1878
+ * @returns Always returns @iter
1879
+ */
1880
+ prepend_iter(iter: ModelIter): ModelIter
1881
+
1882
+ // Class property signals of Dee-1.0.Dee.FilterModel
1883
+
1884
+ connect(sigName: "notify::filter", callback: (($obj: FilterModel, pspec: GObject.ParamSpec) => void)): number
1885
+ connect_after(sigName: "notify::filter", callback: (($obj: FilterModel, pspec: GObject.ParamSpec) => void)): number
1886
+ emit(sigName: "notify::filter", ...args: any[]): void
1887
+ connect(sigName: "notify::back-end", callback: (($obj: FilterModel, pspec: GObject.ParamSpec) => void)): number
1888
+ connect_after(sigName: "notify::back-end", callback: (($obj: FilterModel, pspec: GObject.ParamSpec) => void)): number
1889
+ emit(sigName: "notify::back-end", ...args: any[]): void
1890
+ connect(sigName: "notify::inherit-seqnums", callback: (($obj: FilterModel, pspec: GObject.ParamSpec) => void)): number
1891
+ connect_after(sigName: "notify::inherit-seqnums", callback: (($obj: FilterModel, pspec: GObject.ParamSpec) => void)): number
1892
+ emit(sigName: "notify::inherit-seqnums", ...args: any[]): void
1893
+ connect(sigName: "notify::proxy-signals", callback: (($obj: FilterModel, pspec: GObject.ParamSpec) => void)): number
1894
+ connect_after(sigName: "notify::proxy-signals", callback: (($obj: FilterModel, pspec: GObject.ParamSpec) => void)): number
1895
+ emit(sigName: "notify::proxy-signals", ...args: any[]): void
1896
+ connect(sigName: string, callback: (...args: any[]) => void): number
1897
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1898
+ emit(sigName: string, ...args: any[]): void
1899
+ disconnect(id: number): void
1900
+ }
1901
+
1902
+ /**
1903
+ * All fields in the DeeFilterModel structure are private and should never be
1904
+ * accessed directly
1905
+ * @class
1906
+ */
1907
+ class FilterModel extends ProxyModel {
1908
+
1909
+ // Own properties of Dee-1.0.Dee.FilterModel
1910
+
1911
+ static name: string
1912
+ static $gtype: GObject.GType<FilterModel>
1913
+
1914
+ // Constructors of Dee-1.0.Dee.FilterModel
1915
+
1916
+ constructor(config?: FilterModel.ConstructorProperties)
1917
+ constructor(orig_model: Model, filter: Filter)
1918
+ static new(orig_model: Model, filter: Filter): FilterModel
1919
+ _init(config?: FilterModel.ConstructorProperties): void
1920
+ }
1921
+
1922
+ module GListResultSet {
1923
+
1924
+ // Constructor properties interface
1925
+
1926
+ interface ConstructorProperties extends ResultSet.ConstructorProperties, GObject.Object.ConstructorProperties {
1927
+ }
1928
+
1929
+ }
1930
+
1931
+ interface GListResultSet extends ResultSet {
1932
+
1933
+ // Own fields of Dee-1.0.Dee.GListResultSet
1934
+
1935
+ parent_instance: GObject.Object
1936
+
1937
+ // Class property signals of Dee-1.0.Dee.GListResultSet
1938
+
1939
+ connect(sigName: string, callback: (...args: any[]) => void): number
1940
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1941
+ emit(sigName: string, ...args: any[]): void
1942
+ disconnect(id: number): void
1943
+ }
1944
+
1945
+ class GListResultSet extends GObject.Object {
1946
+
1947
+ // Own properties of Dee-1.0.Dee.GListResultSet
1948
+
1949
+ static name: string
1950
+ static $gtype: GObject.GType<GListResultSet>
1951
+
1952
+ // Constructors of Dee-1.0.Dee.GListResultSet
1953
+
1954
+ constructor(config?: GListResultSet.ConstructorProperties)
1955
+ _init(config?: GListResultSet.ConstructorProperties): void
1956
+ }
1957
+
1958
+ module HashIndex {
1959
+
1960
+ // Constructor properties interface
1961
+
1962
+ interface ConstructorProperties extends Index.ConstructorProperties {
1963
+ }
1964
+
1965
+ }
1966
+
1967
+ interface HashIndex {
1968
+
1969
+ // Class property signals of Dee-1.0.Dee.HashIndex
1970
+
1971
+ connect(sigName: "notify::analyzer", callback: (($obj: HashIndex, pspec: GObject.ParamSpec) => void)): number
1972
+ connect_after(sigName: "notify::analyzer", callback: (($obj: HashIndex, pspec: GObject.ParamSpec) => void)): number
1973
+ emit(sigName: "notify::analyzer", ...args: any[]): void
1974
+ connect(sigName: "notify::model", callback: (($obj: HashIndex, pspec: GObject.ParamSpec) => void)): number
1975
+ connect_after(sigName: "notify::model", callback: (($obj: HashIndex, pspec: GObject.ParamSpec) => void)): number
1976
+ emit(sigName: "notify::model", ...args: any[]): void
1977
+ connect(sigName: "notify::reader", callback: (($obj: HashIndex, pspec: GObject.ParamSpec) => void)): number
1978
+ connect_after(sigName: "notify::reader", callback: (($obj: HashIndex, pspec: GObject.ParamSpec) => void)): number
1979
+ emit(sigName: "notify::reader", ...args: any[]): void
1980
+ connect(sigName: string, callback: (...args: any[]) => void): number
1981
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1982
+ emit(sigName: string, ...args: any[]): void
1983
+ disconnect(id: number): void
1984
+ }
1985
+
1986
+ /**
1987
+ * All fields in the DeeHashIndex structure are private and should never be
1988
+ * accessed directly
1989
+ * @class
1990
+ */
1991
+ class HashIndex extends Index {
1992
+
1993
+ // Own properties of Dee-1.0.Dee.HashIndex
1994
+
1995
+ static name: string
1996
+ static $gtype: GObject.GType<HashIndex>
1997
+
1998
+ // Constructors of Dee-1.0.Dee.HashIndex
1999
+
2000
+ constructor(config?: HashIndex.ConstructorProperties)
2001
+ /**
2002
+ * Create a new hash index.
2003
+ * @constructor
2004
+ * @param model The model to index
2005
+ * @param analyzer The #DeeAnalyzer used to tokenize and filter the terms extracted by `reader`
2006
+ * @param reader The #DeeModelReader used to extract terms from the model
2007
+ * @returns A newly allocated hash index. Free with g_object_unref().
2008
+ */
2009
+ constructor(model: Model, analyzer: Analyzer, reader: ModelReader)
2010
+ /**
2011
+ * Create a new hash index.
2012
+ * @constructor
2013
+ * @param model The model to index
2014
+ * @param analyzer The #DeeAnalyzer used to tokenize and filter the terms extracted by `reader`
2015
+ * @param reader The #DeeModelReader used to extract terms from the model
2016
+ * @returns A newly allocated hash index. Free with g_object_unref().
2017
+ */
2018
+ static new(model: Model, analyzer: Analyzer, reader: ModelReader): HashIndex
2019
+ _init(config?: HashIndex.ConstructorProperties): void
2020
+ }
2021
+
2022
+ module Index {
2023
+
2024
+ // Constructor properties interface
2025
+
2026
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
2027
+
2028
+ // Own constructor properties of Dee-1.0.Dee.Index
2029
+
2030
+ /**
2031
+ * The #DeeAnalyzer used to analyze terms extracted by the model reader
2032
+ */
2033
+ analyzer?: Analyzer | null
2034
+ /**
2035
+ * The #DeeModel being indexed
2036
+ */
2037
+ model?: Model | null
2038
+ /**
2039
+ * The #DeeModelReader used to extract terms from rows in the model
2040
+ */
2041
+ reader?: ModelReader | null
2042
+ }
2043
+
2044
+ }
2045
+
2046
+ interface Index {
2047
+
2048
+ // Own properties of Dee-1.0.Dee.Index
2049
+
2050
+ /**
2051
+ * The #DeeAnalyzer used to analyze terms extracted by the model reader
2052
+ */
2053
+ readonly analyzer: Analyzer
2054
+ /**
2055
+ * The #DeeModel being indexed
2056
+ */
2057
+ readonly model: Model
2058
+ /**
2059
+ * The #DeeModelReader used to extract terms from rows in the model
2060
+ */
2061
+ readonly reader: ModelReader
2062
+
2063
+ // Owm methods of Dee-1.0.Dee.Index
2064
+
2065
+ /**
2066
+ * Iterate over an index optionally starting from some given term. Note that
2067
+ * unordered indexes (like #DeeHashIndex) has undefined behaviour with
2068
+ * this method.
2069
+ * @param start_term The term to start from or %NULL to iterate over all terms
2070
+ * @param func Called for each term in the index
2071
+ */
2072
+ foreach(start_term: string | null, func: IndexIterFunc): void
2073
+ /**
2074
+ * Get the analyzer being used to analyze terms extracted with the
2075
+ * #DeeModelReader used by this index.
2076
+ * @returns The #DeeAnalyzer used to analyze terms with
2077
+ */
2078
+ get_analyzer(): Analyzer
2079
+ /**
2080
+ * Get the model being indexed by this index
2081
+ * @returns The #DeeModel being indexed by this index
2082
+ */
2083
+ get_model(): Model
2084
+ /**
2085
+ * Get the number of indexed rows. A row is only indexed if it has at least one
2086
+ * term associated with it. If the analyzer has returned 0 terms then the row
2087
+ * is omitted from the index.
2088
+ * @returns The number of rows in the index. Note that this may less than or equal to dee_model_get_n_rows().
2089
+ */
2090
+ get_n_rows(): number
2091
+ /**
2092
+ * Get the number of rows that matches a given term
2093
+ * @param term The term to look for
2094
+ * @returns The number of rows in the index registered for the given term
2095
+ */
2096
+ get_n_rows_for_term(term: string | null): number
2097
+ /**
2098
+ * Get the number of terms in the index
2099
+ * @returns The number of unique terms in the index
2100
+ */
2101
+ get_n_terms(): number
2102
+ /**
2103
+ * Get the reader being used to extract terms from rows in the model
2104
+ * @returns The #DeeModelReader used to extract terms with
2105
+ */
2106
+ get_reader(): ModelReader
2107
+ /**
2108
+ * Get the #DeeTermMatchFlag<!-- --> supported by this #DeeIndex instance
2109
+ * @returns A bit mask of the acceptedd #DeeTermMatchFlag<!-- -->s
2110
+ */
2111
+ get_supported_term_match_flags(): number
2112
+ lookup(term: string | null, flags: TermMatchFlag): ResultSet
2113
+ /**
2114
+ * Convenience function in for cases where you have a priori guarantee that
2115
+ * a dee_index_lookup() call will return exactly 0 or 1 row. If the lookup
2116
+ * returns more than 1 row a warning will be printed on standard error and
2117
+ * %NULL will be returned.
2118
+ *
2119
+ * The typical use case for this function is if you need something akin to
2120
+ * a primary key in a relational database.
2121
+ * @param term The exact term to match
2122
+ * @returns A #DeeModelIter pointing to the matching row or %NULL in case no rows matches @term
2123
+ */
2124
+ lookup_one(term: string | null): ModelIter
2125
+
2126
+ // Own virtual methods of Dee-1.0.Dee.Index
2127
+
2128
+ /**
2129
+ * Iterate over an index optionally starting from some given term. Note that
2130
+ * unordered indexes (like #DeeHashIndex) has undefined behaviour with
2131
+ * this method.
2132
+ * @virtual
2133
+ * @param start_term The term to start from or %NULL to iterate over all terms
2134
+ * @param func Called for each term in the index
2135
+ */
2136
+ vfunc_foreach(start_term: string | null, func: IndexIterFunc): void
2137
+ /**
2138
+ * Get the number of indexed rows. A row is only indexed if it has at least one
2139
+ * term associated with it. If the analyzer has returned 0 terms then the row
2140
+ * is omitted from the index.
2141
+ * @virtual
2142
+ * @returns The number of rows in the index. Note that this may less than or equal to dee_model_get_n_rows().
2143
+ */
2144
+ vfunc_get_n_rows(): number
2145
+ /**
2146
+ * Get the number of rows that matches a given term
2147
+ * @virtual
2148
+ * @param term The term to look for
2149
+ * @returns The number of rows in the index registered for the given term
2150
+ */
2151
+ vfunc_get_n_rows_for_term(term: string | null): number
2152
+ /**
2153
+ * Get the number of terms in the index
2154
+ * @virtual
2155
+ * @returns The number of unique terms in the index
2156
+ */
2157
+ vfunc_get_n_terms(): number
2158
+ /**
2159
+ * Get the #DeeTermMatchFlag<!-- --> supported by this #DeeIndex instance
2160
+ * @virtual
2161
+ * @returns A bit mask of the acceptedd #DeeTermMatchFlag<!-- -->s
2162
+ */
2163
+ vfunc_get_supported_term_match_flags(): number
2164
+ vfunc_lookup(term: string | null, flags: TermMatchFlag): ResultSet
2165
+
2166
+ // Class property signals of Dee-1.0.Dee.Index
2167
+
2168
+ connect(sigName: "notify::analyzer", callback: (($obj: Index, pspec: GObject.ParamSpec) => void)): number
2169
+ connect_after(sigName: "notify::analyzer", callback: (($obj: Index, pspec: GObject.ParamSpec) => void)): number
2170
+ emit(sigName: "notify::analyzer", ...args: any[]): void
2171
+ connect(sigName: "notify::model", callback: (($obj: Index, pspec: GObject.ParamSpec) => void)): number
2172
+ connect_after(sigName: "notify::model", callback: (($obj: Index, pspec: GObject.ParamSpec) => void)): number
2173
+ emit(sigName: "notify::model", ...args: any[]): void
2174
+ connect(sigName: "notify::reader", callback: (($obj: Index, pspec: GObject.ParamSpec) => void)): number
2175
+ connect_after(sigName: "notify::reader", callback: (($obj: Index, pspec: GObject.ParamSpec) => void)): number
2176
+ emit(sigName: "notify::reader", ...args: any[]): void
2177
+ connect(sigName: string, callback: (...args: any[]) => void): number
2178
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
2179
+ emit(sigName: string, ...args: any[]): void
2180
+ disconnect(id: number): void
2181
+ }
2182
+
2183
+ /**
2184
+ * All fields in the DeeIndex structure are private and should never be
2185
+ * accessed directly
2186
+ * @class
2187
+ */
2188
+ class Index extends GObject.Object {
2189
+
2190
+ // Own properties of Dee-1.0.Dee.Index
2191
+
2192
+ static name: string
2193
+ static $gtype: GObject.GType<Index>
2194
+
2195
+ // Constructors of Dee-1.0.Dee.Index
2196
+
2197
+ constructor(config?: Index.ConstructorProperties)
2198
+ _init(config?: Index.ConstructorProperties): void
2199
+ }
2200
+
2201
+ module Peer {
2202
+
2203
+ // Signal callback interfaces
2204
+
2205
+ /**
2206
+ * Signal callback interface for `connection-acquired`
2207
+ */
2208
+ interface ConnectionAcquiredSignalCallback {
2209
+ ($obj: Peer, object: Gio.DBusConnection): void
2210
+ }
2211
+
2212
+ /**
2213
+ * Signal callback interface for `connection-closed`
2214
+ */
2215
+ interface ConnectionClosedSignalCallback {
2216
+ ($obj: Peer, connection: Gio.DBusConnection): void
2217
+ }
2218
+
2219
+ /**
2220
+ * Signal callback interface for `peer-found`
2221
+ */
2222
+ interface PeerFoundSignalCallback {
2223
+ ($obj: Peer, name: string | null): void
2224
+ }
2225
+
2226
+ /**
2227
+ * Signal callback interface for `peer-lost`
2228
+ */
2229
+ interface PeerLostSignalCallback {
2230
+ ($obj: Peer, name: string | null): void
2231
+ }
2232
+
2233
+
2234
+ // Constructor properties interface
2235
+
2236
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
2237
+
2238
+ // Own constructor properties of Dee-1.0.Dee.Peer
2239
+
2240
+ swarm_name?: string | null
2241
+ swarm_owner?: boolean | null
2242
+ }
2243
+
2244
+ }
2245
+
2246
+ interface Peer {
2247
+
2248
+ // Own properties of Dee-1.0.Dee.Peer
2249
+
2250
+ readonly swarm_leader: string | null
2251
+ swarm_name: string | null
2252
+ readonly swarm_owner: boolean
2253
+
2254
+ // Owm methods of Dee-1.0.Dee.Peer
2255
+
2256
+ /**
2257
+ * Gets list of #GDBusConnection instances used by this #DeePeer instance.
2258
+ * @returns List of connections.
2259
+ */
2260
+ get_connections(): Gio.DBusConnection[]
2261
+ /**
2262
+ * In case this peer is connected to a message bus, gets the unique DBus
2263
+ * address of the current swarm leader, otherwise returns id of the leader.
2264
+ * @returns Unique DBus address of the current swarm leader, possibly %NULL if the leader has not been detected yet
2265
+ */
2266
+ get_swarm_leader(): string | null
2267
+ /**
2268
+ * Gets the unique name for this swarm. The swarm leader is the Peer owning
2269
+ * this name on the session bus.
2270
+ * @returns The swarm name
2271
+ */
2272
+ get_swarm_name(): string | null
2273
+ is_swarm_leader(): boolean
2274
+ /**
2275
+ * Gets the value of the :swarm-owner property.
2276
+ *
2277
+ * Note that this does NOT mean that the peer is leader of the swarm! Check also
2278
+ * dee_peer_is_swarm_leader().
2279
+ * @returns TRUE if the :swarm-owner property was set during construction.
2280
+ */
2281
+ is_swarm_owner(): boolean
2282
+ /**
2283
+ * Gets list of all peers currently in this swarm.
2284
+ * @returns List of peers (free using g_strfreev()).
2285
+ */
2286
+ list_peers(): string[]
2287
+
2288
+ // Own virtual methods of Dee-1.0.Dee.Peer
2289
+
2290
+ vfunc_connection_acquired(connection: Gio.DBusConnection): void
2291
+ vfunc_connection_closed(connection: Gio.DBusConnection): void
2292
+ /**
2293
+ * Gets list of #GDBusConnection instances used by this #DeePeer instance.
2294
+ * @virtual
2295
+ * @returns List of connections.
2296
+ */
2297
+ vfunc_get_connections(): Gio.DBusConnection[]
2298
+ /**
2299
+ * In case this peer is connected to a message bus, gets the unique DBus
2300
+ * address of the current swarm leader, otherwise returns id of the leader.
2301
+ * @virtual
2302
+ * @returns Unique DBus address of the current swarm leader, possibly %NULL if the leader has not been detected yet
2303
+ */
2304
+ vfunc_get_swarm_leader(): string | null
2305
+ vfunc_is_swarm_leader(): boolean
2306
+ /**
2307
+ * Gets list of all peers currently in this swarm.
2308
+ * @virtual
2309
+ * @returns List of peers (free using g_strfreev()).
2310
+ */
2311
+ vfunc_list_peers(): string[]
2312
+ vfunc_peer_found(name: string | null): void
2313
+ vfunc_peer_lost(name: string | null): void
2314
+
2315
+ // Own signals of Dee-1.0.Dee.Peer
2316
+
2317
+ connect(sigName: "connection-acquired", callback: Peer.ConnectionAcquiredSignalCallback): number
2318
+ connect_after(sigName: "connection-acquired", callback: Peer.ConnectionAcquiredSignalCallback): number
2319
+ emit(sigName: "connection-acquired", object: Gio.DBusConnection, ...args: any[]): void
2320
+ connect(sigName: "connection-closed", callback: Peer.ConnectionClosedSignalCallback): number
2321
+ connect_after(sigName: "connection-closed", callback: Peer.ConnectionClosedSignalCallback): number
2322
+ emit(sigName: "connection-closed", connection: Gio.DBusConnection, ...args: any[]): void
2323
+ connect(sigName: "peer-found", callback: Peer.PeerFoundSignalCallback): number
2324
+ connect_after(sigName: "peer-found", callback: Peer.PeerFoundSignalCallback): number
2325
+ emit(sigName: "peer-found", name: string | null, ...args: any[]): void
2326
+ connect(sigName: "peer-lost", callback: Peer.PeerLostSignalCallback): number
2327
+ connect_after(sigName: "peer-lost", callback: Peer.PeerLostSignalCallback): number
2328
+ emit(sigName: "peer-lost", name: string | null, ...args: any[]): void
2329
+
2330
+ // Class property signals of Dee-1.0.Dee.Peer
2331
+
2332
+ connect(sigName: "notify::swarm-leader", callback: (($obj: Peer, pspec: GObject.ParamSpec) => void)): number
2333
+ connect_after(sigName: "notify::swarm-leader", callback: (($obj: Peer, pspec: GObject.ParamSpec) => void)): number
2334
+ emit(sigName: "notify::swarm-leader", ...args: any[]): void
2335
+ connect(sigName: "notify::swarm-name", callback: (($obj: Peer, pspec: GObject.ParamSpec) => void)): number
2336
+ connect_after(sigName: "notify::swarm-name", callback: (($obj: Peer, pspec: GObject.ParamSpec) => void)): number
2337
+ emit(sigName: "notify::swarm-name", ...args: any[]): void
2338
+ connect(sigName: "notify::swarm-owner", callback: (($obj: Peer, pspec: GObject.ParamSpec) => void)): number
2339
+ connect_after(sigName: "notify::swarm-owner", callback: (($obj: Peer, pspec: GObject.ParamSpec) => void)): number
2340
+ emit(sigName: "notify::swarm-owner", ...args: any[]): void
2341
+ connect(sigName: string, callback: (...args: any[]) => void): number
2342
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
2343
+ emit(sigName: string, ...args: any[]): void
2344
+ disconnect(id: number): void
2345
+ }
2346
+
2347
+ /**
2348
+ * All fields in the DeePeer structure are private and should never be
2349
+ * accessed directly
2350
+ * @class
2351
+ */
2352
+ class Peer extends GObject.Object {
2353
+
2354
+ // Own properties of Dee-1.0.Dee.Peer
2355
+
2356
+ static name: string
2357
+ static $gtype: GObject.GType<Peer>
2358
+
2359
+ // Constructors of Dee-1.0.Dee.Peer
2360
+
2361
+ constructor(config?: Peer.ConstructorProperties)
2362
+ /**
2363
+ * Create a new #DeePeer. The peer will immediately connect to the swarm
2364
+ * and start the peer discovery.
2365
+ * @constructor
2366
+ * @param swarm_name The name of the swarm to join. Fx &quot;org.example.DataProviders&quot;
2367
+ * @returns A newly constructed #DeePeer. Free with g_object_unref().
2368
+ */
2369
+ constructor(swarm_name: string | null)
2370
+ /**
2371
+ * Create a new #DeePeer. The peer will immediately connect to the swarm
2372
+ * and start the peer discovery.
2373
+ * @constructor
2374
+ * @param swarm_name The name of the swarm to join. Fx &quot;org.example.DataProviders&quot;
2375
+ * @returns A newly constructed #DeePeer. Free with g_object_unref().
2376
+ */
2377
+ static new(swarm_name: string | null): Peer
2378
+ _init(config?: Peer.ConstructorProperties): void
2379
+ }
2380
+
2381
+ module ProxyModel {
2382
+
2383
+ // Constructor properties interface
2384
+
2385
+ interface ConstructorProperties extends Model.ConstructorProperties, Serializable.ConstructorProperties, SerializableModel.ConstructorProperties {
2386
+
2387
+ // Own constructor properties of Dee-1.0.Dee.ProxyModel
2388
+
2389
+ /**
2390
+ * The backend model used by this proxy model.
2391
+ */
2392
+ back_end?: Model | null
2393
+ /**
2394
+ * Boolean property defining whether sequence numbers will be inherited
2395
+ * from the back end model.
2396
+ * You will most likely want to set this property to false
2397
+ * if the implementation manipulates with the rows in the model and keep
2398
+ * track of seqnums yourself.
2399
+ */
2400
+ inherit_seqnums?: boolean | null
2401
+ /**
2402
+ * Boolean property defining whether or not to automatically forward signals
2403
+ * from the back end model. This is especially useful for sub classes wishing
2404
+ * to do their own more advanced signal forwarding.
2405
+ */
2406
+ proxy_signals?: boolean | null
2407
+ }
2408
+
2409
+ }
2410
+
2411
+ interface ProxyModel extends Model, Serializable {
2412
+
2413
+ // Own properties of Dee-1.0.Dee.ProxyModel
2414
+
2415
+ /**
2416
+ * The backend model used by this proxy model.
2417
+ */
2418
+ readonly back_end: Model
2419
+ /**
2420
+ * Boolean property defining whether sequence numbers will be inherited
2421
+ * from the back end model.
2422
+ * You will most likely want to set this property to false
2423
+ * if the implementation manipulates with the rows in the model and keep
2424
+ * track of seqnums yourself.
2425
+ */
2426
+ readonly inherit_seqnums: boolean
2427
+ /**
2428
+ * Boolean property defining whether or not to automatically forward signals
2429
+ * from the back end model. This is especially useful for sub classes wishing
2430
+ * to do their own more advanced signal forwarding.
2431
+ */
2432
+ readonly proxy_signals: boolean
2433
+
2434
+ // Class property signals of Dee-1.0.Dee.ProxyModel
2435
+
2436
+ connect(sigName: "notify::back-end", callback: (($obj: ProxyModel, pspec: GObject.ParamSpec) => void)): number
2437
+ connect_after(sigName: "notify::back-end", callback: (($obj: ProxyModel, pspec: GObject.ParamSpec) => void)): number
2438
+ emit(sigName: "notify::back-end", ...args: any[]): void
2439
+ connect(sigName: "notify::inherit-seqnums", callback: (($obj: ProxyModel, pspec: GObject.ParamSpec) => void)): number
2440
+ connect_after(sigName: "notify::inherit-seqnums", callback: (($obj: ProxyModel, pspec: GObject.ParamSpec) => void)): number
2441
+ emit(sigName: "notify::inherit-seqnums", ...args: any[]): void
2442
+ connect(sigName: "notify::proxy-signals", callback: (($obj: ProxyModel, pspec: GObject.ParamSpec) => void)): number
2443
+ connect_after(sigName: "notify::proxy-signals", callback: (($obj: ProxyModel, pspec: GObject.ParamSpec) => void)): number
2444
+ emit(sigName: "notify::proxy-signals", ...args: any[]): void
2445
+ connect(sigName: string, callback: (...args: any[]) => void): number
2446
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
2447
+ emit(sigName: string, ...args: any[]): void
2448
+ disconnect(id: number): void
2449
+ }
2450
+
2451
+ /**
2452
+ * All fields in the DeeProxyModel structure are private and should never be
2453
+ * accessed directly
2454
+ * @class
2455
+ */
2456
+ class ProxyModel extends SerializableModel {
2457
+
2458
+ // Own properties of Dee-1.0.Dee.ProxyModel
2459
+
2460
+ static name: string
2461
+ static $gtype: GObject.GType<ProxyModel>
2462
+
2463
+ // Constructors of Dee-1.0.Dee.ProxyModel
2464
+
2465
+ constructor(config?: ProxyModel.ConstructorProperties)
2466
+ _init(config?: ProxyModel.ConstructorProperties): void
2467
+ }
2468
+
2469
+ module SequenceModel {
2470
+
2471
+ // Constructor properties interface
2472
+
2473
+ interface ConstructorProperties extends Model.ConstructorProperties, Serializable.ConstructorProperties, SerializableModel.ConstructorProperties {
2474
+ }
2475
+
2476
+ }
2477
+
2478
+ interface SequenceModel extends Model, Serializable {
2479
+
2480
+ // Class property signals of Dee-1.0.Dee.SequenceModel
2481
+
2482
+ connect(sigName: string, callback: (...args: any[]) => void): number
2483
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
2484
+ emit(sigName: string, ...args: any[]): void
2485
+ disconnect(id: number): void
2486
+ }
2487
+
2488
+ /**
2489
+ * All fields in the DeeSequenceModel structure are private and should never be
2490
+ * accessed directly
2491
+ * @class
2492
+ */
2493
+ class SequenceModel extends SerializableModel {
2494
+
2495
+ // Own properties of Dee-1.0.Dee.SequenceModel
2496
+
2497
+ static name: string
2498
+ static $gtype: GObject.GType<SequenceModel>
2499
+
2500
+ // Constructors of Dee-1.0.Dee.SequenceModel
2501
+
2502
+ constructor(config?: SequenceModel.ConstructorProperties)
2503
+ /**
2504
+ * Create a new #DeeSequenceModel. Before using it you must normally set a
2505
+ * schema on it by calling dee_model_set_schema().
2506
+ * @constructor
2507
+ * @returns A newly created #DeeSequenceModel. Free with g_object_unref().
2508
+ */
2509
+ constructor()
2510
+ /**
2511
+ * Create a new #DeeSequenceModel. Before using it you must normally set a
2512
+ * schema on it by calling dee_model_set_schema().
2513
+ * @constructor
2514
+ * @returns A newly created #DeeSequenceModel. Free with g_object_unref().
2515
+ */
2516
+ static new(): SequenceModel
2517
+ _init(config?: SequenceModel.ConstructorProperties): void
2518
+ }
2519
+
2520
+ module SerializableModel {
2521
+
2522
+ // Constructor properties interface
2523
+
2524
+ interface ConstructorProperties extends Model.ConstructorProperties, Serializable.ConstructorProperties, GObject.Object.ConstructorProperties {
2525
+ }
2526
+
2527
+ }
2528
+
2529
+ interface SerializableModel extends Model, Serializable {
2530
+
2531
+ // Owm methods of Dee-1.0.Dee.SerializableModel
2532
+
2533
+ get_seqnum(): number
2534
+ /**
2535
+ * Increments sequence number of this #DeeSerializableModel.
2536
+ */
2537
+ inc_seqnum(): number
2538
+ /**
2539
+ * Sets sequence number of this #DeeSerializableModel.
2540
+ * @param seqnum Sequence number
2541
+ */
2542
+ set_seqnum(seqnum: number): void
2543
+
2544
+ // Class property signals of Dee-1.0.Dee.SerializableModel
2545
+
2546
+ connect(sigName: string, callback: (...args: any[]) => void): number
2547
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
2548
+ emit(sigName: string, ...args: any[]): void
2549
+ disconnect(id: number): void
2550
+ }
2551
+
2552
+ /**
2553
+ * All fields in the DeeSerializableModel structure are private and should never be
2554
+ * accessed directly
2555
+ * @class
2556
+ */
2557
+ class SerializableModel extends GObject.Object {
2558
+
2559
+ // Own properties of Dee-1.0.Dee.SerializableModel
2560
+
2561
+ static name: string
2562
+ static $gtype: GObject.GType<SerializableModel>
2563
+
2564
+ // Constructors of Dee-1.0.Dee.SerializableModel
2565
+
2566
+ constructor(config?: SerializableModel.ConstructorProperties)
2567
+ _init(config?: SerializableModel.ConstructorProperties): void
2568
+ }
2569
+
2570
+ module Server {
2571
+
2572
+ // Constructor properties interface
2573
+
2574
+ interface ConstructorProperties extends Peer.ConstructorProperties {
2575
+
2576
+ // Own constructor properties of Dee-1.0.Dee.Server
2577
+
2578
+ bus_address?: string | null
2579
+ same_user_only?: boolean | null
2580
+ }
2581
+
2582
+ }
2583
+
2584
+ interface Server {
2585
+
2586
+ // Own properties of Dee-1.0.Dee.Server
2587
+
2588
+ readonly bus_address: string | null
2589
+ readonly same_user_only: boolean
2590
+
2591
+ // Owm methods of Dee-1.0.Dee.Server
2592
+
2593
+ /**
2594
+ * Gets a D-Bus address string that can be used by clients to connect to server.
2595
+ * @returns A D-Bus address string. Do not free.
2596
+ */
2597
+ get_client_address(): string | null
2598
+
2599
+ // Class property signals of Dee-1.0.Dee.Server
2600
+
2601
+ connect(sigName: "notify::bus-address", callback: (($obj: Server, pspec: GObject.ParamSpec) => void)): number
2602
+ connect_after(sigName: "notify::bus-address", callback: (($obj: Server, pspec: GObject.ParamSpec) => void)): number
2603
+ emit(sigName: "notify::bus-address", ...args: any[]): void
2604
+ connect(sigName: "notify::same-user-only", callback: (($obj: Server, pspec: GObject.ParamSpec) => void)): number
2605
+ connect_after(sigName: "notify::same-user-only", callback: (($obj: Server, pspec: GObject.ParamSpec) => void)): number
2606
+ emit(sigName: "notify::same-user-only", ...args: any[]): void
2607
+ connect(sigName: "notify::swarm-leader", callback: (($obj: Server, pspec: GObject.ParamSpec) => void)): number
2608
+ connect_after(sigName: "notify::swarm-leader", callback: (($obj: Server, pspec: GObject.ParamSpec) => void)): number
2609
+ emit(sigName: "notify::swarm-leader", ...args: any[]): void
2610
+ connect(sigName: "notify::swarm-name", callback: (($obj: Server, pspec: GObject.ParamSpec) => void)): number
2611
+ connect_after(sigName: "notify::swarm-name", callback: (($obj: Server, pspec: GObject.ParamSpec) => void)): number
2612
+ emit(sigName: "notify::swarm-name", ...args: any[]): void
2613
+ connect(sigName: "notify::swarm-owner", callback: (($obj: Server, pspec: GObject.ParamSpec) => void)): number
2614
+ connect_after(sigName: "notify::swarm-owner", callback: (($obj: Server, pspec: GObject.ParamSpec) => void)): number
2615
+ emit(sigName: "notify::swarm-owner", ...args: any[]): void
2616
+ connect(sigName: string, callback: (...args: any[]) => void): number
2617
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
2618
+ emit(sigName: string, ...args: any[]): void
2619
+ disconnect(id: number): void
2620
+ }
2621
+
2622
+ class Server extends Peer {
2623
+
2624
+ // Own properties of Dee-1.0.Dee.Server
2625
+
2626
+ static name: string
2627
+ static $gtype: GObject.GType<Server>
2628
+
2629
+ // Constructors of Dee-1.0.Dee.Server
2630
+
2631
+ constructor(config?: Server.ConstructorProperties)
2632
+ /**
2633
+ * Creates a new instance of #DeeServer and tries to bind
2634
+ * to #DeeServer:bus-address. The #DeePeer:swarm-leader property will be set
2635
+ * when the binding succeeds.
2636
+ *
2637
+ * <note>
2638
+ * <para>
2639
+ * Note that this function will automatically determine the value
2640
+ * of #DeeServer:bus-address property and will generally cause your
2641
+ * application to use new socket for every #DeeServer with different swarm
2642
+ * name. See dee_server_new_for_address() if you'd like to share one
2643
+ * connection between multiple #DeeServer instances.
2644
+ * </para>
2645
+ * </note>
2646
+ * @constructor
2647
+ * @param swarm_name Name of swarm to join.
2648
+ * @returns A newly constructed #DeeServer.
2649
+ */
2650
+ constructor(swarm_name: string | null)
2651
+ /**
2652
+ * Creates a new instance of #DeeServer and tries to bind
2653
+ * to #DeeServer:bus-address. The #DeePeer:swarm-leader property will be set
2654
+ * when the binding succeeds.
2655
+ *
2656
+ * <note>
2657
+ * <para>
2658
+ * Note that this function will automatically determine the value
2659
+ * of #DeeServer:bus-address property and will generally cause your
2660
+ * application to use new socket for every #DeeServer with different swarm
2661
+ * name. See dee_server_new_for_address() if you'd like to share one
2662
+ * connection between multiple #DeeServer instances.
2663
+ * </para>
2664
+ * </note>
2665
+ * @constructor
2666
+ * @param swarm_name Name of swarm to join.
2667
+ * @returns A newly constructed #DeeServer.
2668
+ */
2669
+ static new(swarm_name: string | null): Server
2670
+
2671
+ // Overloads of new
2672
+
2673
+ /**
2674
+ * Create a new #DeePeer. The peer will immediately connect to the swarm
2675
+ * and start the peer discovery.
2676
+ * @constructor
2677
+ * @param swarm_name The name of the swarm to join. Fx &quot;org.example.DataProviders&quot;
2678
+ * @returns A newly constructed #DeePeer. Free with g_object_unref().
2679
+ */
2680
+ static new(swarm_name: string | null): Peer
2681
+ /**
2682
+ * Creates a new instance of #DeeServer and tries to bind to `bus_address`.
2683
+ * The #DeePeer:swarm-leader property will be set when the binding succeeds.
2684
+ *
2685
+ * If there is already a #DeeServer instance bound to `bus_address,`
2686
+ * the connection will be shared with the newly constructed instance.
2687
+ *
2688
+ * <note>
2689
+ * <para>
2690
+ * This function is primarily meant for sharing of one connection (socket)
2691
+ * between multiple DeeServers, so that you can create #DeeServer instances
2692
+ * with varying swarm names, but the same bus address, which will cause
2693
+ * them to share the connection (the sharing is possible only within
2694
+ * the same process though).
2695
+ * </para>
2696
+ * </note>
2697
+ * @constructor
2698
+ * @param swarm_name Name of swarm to join.
2699
+ * @param bus_address D-Bus address to use for the connection.
2700
+ * @returns A newly constructed #DeeServer.
2701
+ */
2702
+ static new_for_address(swarm_name: string | null, bus_address: string | null): Server
2703
+ _init(config?: Server.ConstructorProperties): void
2704
+ /**
2705
+ * Helper method which creates bus address string for the given name, which
2706
+ * should have the same format as a DBus unique name.
2707
+ * @param name A name to create bus address for.
2708
+ * @param include_username Include current user name as part of the bus address.
2709
+ * @returns Newly allocated string with bus address. Use g_free() to free.
2710
+ */
2711
+ static bus_address_for_name(name: string | null, include_username: boolean): string | null
2712
+ }
2713
+
2714
+ module SharedModel {
2715
+
2716
+ // Signal callback interfaces
2717
+
2718
+ /**
2719
+ * Signal callback interface for `begin-transaction`
2720
+ */
2721
+ interface BeginTransactionSignalCallback {
2722
+ ($obj: SharedModel, begin_seqnum: number, end_seqnum: number): void
2723
+ }
2724
+
2725
+ /**
2726
+ * Signal callback interface for `end-transaction`
2727
+ */
2728
+ interface EndTransactionSignalCallback {
2729
+ ($obj: SharedModel, begin_seqnum: number, end_seqnum: number): void
2730
+ }
2731
+
2732
+
2733
+ // Constructor properties interface
2734
+
2735
+ interface ConstructorProperties extends Model.ConstructorProperties, Serializable.ConstructorProperties, ProxyModel.ConstructorProperties {
2736
+
2737
+ // Own constructor properties of Dee-1.0.Dee.SharedModel
2738
+
2739
+ /**
2740
+ * Enumeration defining behavior of this model when trying to write to it.
2741
+ *
2742
+ * Setting this to #DEE_SHARED_MODEL_ACCESS_MODE_LEADER_WRITABLE is useful
2743
+ * when one process is considered an "owner" of a model and all the other
2744
+ * peers are supposed to only synchronize it for reading.
2745
+ *
2746
+ * See also DeePeer:swarm-owner property to ensure ownership of a swarm.
2747
+ */
2748
+ access_mode?: SharedModelAccessMode | null
2749
+ /**
2750
+ * Enumeration defining the flushing behavior.
2751
+ *
2752
+ * Setting this to #DEE_SHARED_MODEL_FLUSH_MODE_MANUAL will disable
2753
+ * automatic flushing that usually happens when the application's main event
2754
+ * loop is idle. Automatic flushing should be primarily disabled when
2755
+ * a shared model is used from multiple threads, or when not using #GMainLoop.
2756
+ * When disabled, dee_shared_model_flush_revision_queue() needs to be called
2757
+ * explicitely.
2758
+ */
2759
+ flush_mode?: SharedModelFlushMode | null
2760
+ /**
2761
+ * The #DeePeer that this model uses to connect to the swarm
2762
+ */
2763
+ peer?: Peer | null
2764
+ }
2765
+
2766
+ }
2767
+
2768
+ interface SharedModel extends Model, Serializable {
2769
+
2770
+ // Own properties of Dee-1.0.Dee.SharedModel
2771
+
2772
+ /**
2773
+ * Enumeration defining behavior of this model when trying to write to it.
2774
+ *
2775
+ * Setting this to #DEE_SHARED_MODEL_ACCESS_MODE_LEADER_WRITABLE is useful
2776
+ * when one process is considered an "owner" of a model and all the other
2777
+ * peers are supposed to only synchronize it for reading.
2778
+ *
2779
+ * See also DeePeer:swarm-owner property to ensure ownership of a swarm.
2780
+ */
2781
+ readonly access_mode: SharedModelAccessMode
2782
+ /**
2783
+ * Enumeration defining the flushing behavior.
2784
+ *
2785
+ * Setting this to #DEE_SHARED_MODEL_FLUSH_MODE_MANUAL will disable
2786
+ * automatic flushing that usually happens when the application's main event
2787
+ * loop is idle. Automatic flushing should be primarily disabled when
2788
+ * a shared model is used from multiple threads, or when not using #GMainLoop.
2789
+ * When disabled, dee_shared_model_flush_revision_queue() needs to be called
2790
+ * explicitely.
2791
+ */
2792
+ flush_mode: SharedModelFlushMode
2793
+ /**
2794
+ * The #DeePeer that this model uses to connect to the swarm
2795
+ */
2796
+ readonly peer: Peer
2797
+ /**
2798
+ * Boolean property defining whether or not the model has synchronized with
2799
+ * its peers (if any) yet.
2800
+ *
2801
+ * You should not modify a #DeeSharedModel that is not synchronized. Before
2802
+ * modifying the model in any way (except calling dee_model_set_schema())
2803
+ * you should wait for it to become synchronized.
2804
+ */
2805
+ readonly synchronized: boolean
2806
+
2807
+ // Owm methods of Dee-1.0.Dee.SharedModel
2808
+
2809
+ /**
2810
+ * Expert: All changes to `self` that has not yet been propagated to the peer
2811
+ * models are send. If you also want to block the mainloop until
2812
+ * all the underlying transport streams have been flushed use
2813
+ * dee_shared_model_flush_revision_queue_sync().
2814
+ *
2815
+ * Normally #DeeSharedModel collects changes to `self` into batches and sends
2816
+ * them automatically to all peers. You can use this call to provide fine
2817
+ * grained control of exactly when changes to `self` are synchronized to its
2818
+ * peers. This may for example be useful to improve the interactivity of your
2819
+ * application if you have a model-process which intermix small and light
2820
+ * changes with big and expensive changes. Using this call you can make sure
2821
+ * the model-process dispatches small changes more aggresively to the
2822
+ * view-process, while holding on to the expensive changes a bit longer.
2823
+ * @returns The number of revisions flushed.
2824
+ */
2825
+ flush_revision_queue(): number
2826
+ /**
2827
+ * Similar to dee_shared_model_flush_revision_queue(), but also blocks
2828
+ * the mainloop until all the underlying transport streams have been flushed.
2829
+ *
2830
+ * <emphasis>Important</emphasis>: This method <emphasis>may</emphasis> flush
2831
+ * your internal queue of DBus messages forcing them to be send before this call
2832
+ * returns.
2833
+ * @returns The number of revisions flushed.
2834
+ */
2835
+ flush_revision_queue_sync(): number
2836
+ /**
2837
+ * Convenience function for accessing the #DeeSharedModel:flush-mode property.
2838
+ * @returns The #DeeSharedModelFlushMode used by the model
2839
+ */
2840
+ get_flush_mode(): SharedModelFlushMode
2841
+ /**
2842
+ * Convenience function for accessing the #DeeSharedModel:peer property
2843
+ * @returns The #DeePeer used to interact with the peer models
2844
+ */
2845
+ get_peer(): Peer
2846
+ /**
2847
+ * Convenience function for accessing the #DeePeer:swarm-name property of the
2848
+ * #DeePeer defined in the #DeeSharedModel:peer property.
2849
+ * @returns The name of the swarm this model synchrnonizes with
2850
+ */
2851
+ get_swarm_name(): string | null
2852
+ /**
2853
+ * Check if the model is the swarm leader. This is a convenience function for
2854
+ * accessing the #DeeSharedModel:peer property and checking if it's the swarm
2855
+ * leader.
2856
+ * @returns The value of dee_peer_is_swarm_leader() for the #DeePeer used by this shared model
2857
+ */
2858
+ is_leader(): boolean
2859
+ /**
2860
+ * Check if the model is synchronized with its peers. Before modifying a
2861
+ * shared model in any way (except dee_model_set_schema()) you should wait for
2862
+ * it to become synchronized. This is normally done by waiting for the
2863
+ * &quot;notify::synchronized&quot; signal.
2864
+ *
2865
+ * This method is purely a convenience function for accessing the
2866
+ * #DeeSharedModel:synchronized property.
2867
+ * @returns The value of the :synchronized property
2868
+ */
2869
+ is_synchronized(): boolean
2870
+ /**
2871
+ * Convenience function for setting the #DeeSharedModel:flush-mode property.
2872
+ * @param mode Flush mode to use
2873
+ */
2874
+ set_flush_mode(mode: SharedModelFlushMode): void
2875
+
2876
+ // Own signals of Dee-1.0.Dee.SharedModel
2877
+
2878
+ connect(sigName: "begin-transaction", callback: SharedModel.BeginTransactionSignalCallback): number
2879
+ connect_after(sigName: "begin-transaction", callback: SharedModel.BeginTransactionSignalCallback): number
2880
+ emit(sigName: "begin-transaction", begin_seqnum: number, end_seqnum: number, ...args: any[]): void
2881
+ connect(sigName: "end-transaction", callback: SharedModel.EndTransactionSignalCallback): number
2882
+ connect_after(sigName: "end-transaction", callback: SharedModel.EndTransactionSignalCallback): number
2883
+ emit(sigName: "end-transaction", begin_seqnum: number, end_seqnum: number, ...args: any[]): void
2884
+
2885
+ // Class property signals of Dee-1.0.Dee.SharedModel
2886
+
2887
+ connect(sigName: "notify::access-mode", callback: (($obj: SharedModel, pspec: GObject.ParamSpec) => void)): number
2888
+ connect_after(sigName: "notify::access-mode", callback: (($obj: SharedModel, pspec: GObject.ParamSpec) => void)): number
2889
+ emit(sigName: "notify::access-mode", ...args: any[]): void
2890
+ connect(sigName: "notify::flush-mode", callback: (($obj: SharedModel, pspec: GObject.ParamSpec) => void)): number
2891
+ connect_after(sigName: "notify::flush-mode", callback: (($obj: SharedModel, pspec: GObject.ParamSpec) => void)): number
2892
+ emit(sigName: "notify::flush-mode", ...args: any[]): void
2893
+ connect(sigName: "notify::peer", callback: (($obj: SharedModel, pspec: GObject.ParamSpec) => void)): number
2894
+ connect_after(sigName: "notify::peer", callback: (($obj: SharedModel, pspec: GObject.ParamSpec) => void)): number
2895
+ emit(sigName: "notify::peer", ...args: any[]): void
2896
+ connect(sigName: "notify::synchronized", callback: (($obj: SharedModel, pspec: GObject.ParamSpec) => void)): number
2897
+ connect_after(sigName: "notify::synchronized", callback: (($obj: SharedModel, pspec: GObject.ParamSpec) => void)): number
2898
+ emit(sigName: "notify::synchronized", ...args: any[]): void
2899
+ connect(sigName: "notify::back-end", callback: (($obj: SharedModel, pspec: GObject.ParamSpec) => void)): number
2900
+ connect_after(sigName: "notify::back-end", callback: (($obj: SharedModel, pspec: GObject.ParamSpec) => void)): number
2901
+ emit(sigName: "notify::back-end", ...args: any[]): void
2902
+ connect(sigName: "notify::inherit-seqnums", callback: (($obj: SharedModel, pspec: GObject.ParamSpec) => void)): number
2903
+ connect_after(sigName: "notify::inherit-seqnums", callback: (($obj: SharedModel, pspec: GObject.ParamSpec) => void)): number
2904
+ emit(sigName: "notify::inherit-seqnums", ...args: any[]): void
2905
+ connect(sigName: "notify::proxy-signals", callback: (($obj: SharedModel, pspec: GObject.ParamSpec) => void)): number
2906
+ connect_after(sigName: "notify::proxy-signals", callback: (($obj: SharedModel, pspec: GObject.ParamSpec) => void)): number
2907
+ emit(sigName: "notify::proxy-signals", ...args: any[]): void
2908
+ connect(sigName: string, callback: (...args: any[]) => void): number
2909
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
2910
+ emit(sigName: string, ...args: any[]): void
2911
+ disconnect(id: number): void
2912
+ }
2913
+
2914
+ /**
2915
+ * All fields in the DeeSharedModel structure are private and should never be
2916
+ * accessed directly
2917
+ * @class
2918
+ */
2919
+ class SharedModel extends ProxyModel {
2920
+
2921
+ // Own properties of Dee-1.0.Dee.SharedModel
2922
+
2923
+ static name: string
2924
+ static $gtype: GObject.GType<SharedModel>
2925
+
2926
+ // Constructors of Dee-1.0.Dee.SharedModel
2927
+
2928
+ constructor(config?: SharedModel.ConstructorProperties)
2929
+ /**
2930
+ * Create a new empty shared model without any column schema associated.
2931
+ * The column schema will be set in one of two ways: firstly you may set it
2932
+ * manually with dee_model_set_schema() or secondly it will be set once
2933
+ * the first rows are exchanged with a peer model.
2934
+ *
2935
+ * A #DeeSharedModel with a schema manually set has to be created before
2936
+ * creating more #DeeSharedModel with the same `name`.
2937
+ *
2938
+ * A shared model created with this constructor will store row data in a
2939
+ * suitably picked memory backed model.
2940
+ * @constructor
2941
+ * @param name A well known name to publish this model under. Models sharing this name will synchronize with each other
2942
+ * @returns a new #DeeSharedModel
2943
+ */
2944
+ constructor(name: string | null)
2945
+ /**
2946
+ * Create a new empty shared model without any column schema associated.
2947
+ * The column schema will be set in one of two ways: firstly you may set it
2948
+ * manually with dee_model_set_schema() or secondly it will be set once
2949
+ * the first rows are exchanged with a peer model.
2950
+ *
2951
+ * A #DeeSharedModel with a schema manually set has to be created before
2952
+ * creating more #DeeSharedModel with the same `name`.
2953
+ *
2954
+ * A shared model created with this constructor will store row data in a
2955
+ * suitably picked memory backed model.
2956
+ * @constructor
2957
+ * @param name A well known name to publish this model under. Models sharing this name will synchronize with each other
2958
+ * @returns a new #DeeSharedModel
2959
+ */
2960
+ static new(name: string | null): SharedModel
2961
+ /**
2962
+ * Create a new empty shared model without any column schema associated.
2963
+ * The column schema will be set in one of two ways: firstly you may set it
2964
+ * manually with dee_model_set_schema() or secondly it will be set once
2965
+ * the first rows are exchanged with a peer model.
2966
+ *
2967
+ * A #DeeSharedModel with a schema manually set has to be created before
2968
+ * creating more #DeeSharedModel with the same `name`.
2969
+ *
2970
+ * A shared model created with this constructor will store row data in a
2971
+ * suitably picked memory backed model.
2972
+ * @constructor
2973
+ * @param peer A #DeePeer instance.
2974
+ * @returns a new #DeeSharedModel
2975
+ */
2976
+ static new_for_peer(peer: Peer): SharedModel
2977
+ /**
2978
+ * Create a new shared model storing all data in `back_end`.
2979
+ *
2980
+ * The model will start synchronizing with peer models as soon as possible and
2981
+ * the #DeeSharedModel:synchronized property will be set once finished.
2982
+ * @constructor
2983
+ * @param name A well known name to publish this model under. Models sharing this name will synchronize with each other
2984
+ * @param back_end The #DeeModel that will actually store the model data. Ownership of the ref to `back_end` is transfered to the shared model.
2985
+ * @returns a new #DeeSharedModel
2986
+ */
2987
+ static new_with_back_end(name: string | null, back_end: Model): SharedModel
2988
+ _init(config?: SharedModel.ConstructorProperties): void
2989
+ }
2990
+
2991
+ module TermList {
2992
+
2993
+ // Constructor properties interface
2994
+
2995
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
2996
+ }
2997
+
2998
+ }
2999
+
3000
+ interface TermList {
3001
+
3002
+ // Owm methods of Dee-1.0.Dee.TermList
3003
+
3004
+ /**
3005
+ * Add a term to the termlist. Note that it is possible to add a term multiple
3006
+ * times. The effect of this is determined by the #DeeModelIndex consuming the
3007
+ * #DeeTermList.
3008
+ * @param term The term to add
3009
+ * @returns Always returns @self
3010
+ */
3011
+ add_term(term: string | null): TermList
3012
+ /**
3013
+ * Remove all terms from a term list making it ready for reuse. Note that
3014
+ * term list implementations will often have optimized memory allocation
3015
+ * schemes so reuse is often more efficient than allocating a new term list
3016
+ * each time you need it.
3017
+ * @returns Always returns @self
3018
+ */
3019
+ clear(): TermList
3020
+ /**
3021
+ * Create a copy of `self` that shares the underlying string pool and containing
3022
+ * a list of terms as currently set in `self`.
3023
+ *
3024
+ * Subsequently freeing the original and keeping the clone around is not a
3025
+ * problem. The clone works as a standalone term list. The only gotcha may be
3026
+ * threading issues because of concurrent access to the shared string pool.
3027
+ *
3028
+ * Creating a clone very efficient since only very little memory allocation
3029
+ * is required. It's advised that you use a clone instead a new instance
3030
+ * whenever you work over a common corpus of strings.
3031
+ *
3032
+ * It is also worth noting that terms obtained from the original term list
3033
+ * and a clone can be compared directly as pointers (fx. with g_direct_equal()).
3034
+ * This is because they share the underlying string pool.
3035
+ * @returns A newly allocated term list. Free with g_object_unref().
3036
+ */
3037
+ clone(): TermList
3038
+ /**
3039
+ * Get the n'th term in the list.
3040
+ *
3041
+ * Note that in the default implementation it is guaranteed that the returned
3042
+ * string is valid for the entire lifetime of the #DeeTermList.
3043
+ * @param n The (zero based) offset into the term list
3044
+ * @returns The @n<!-- -->th string held in the term list
3045
+ */
3046
+ get_term(n: number): string | null
3047
+ num_terms(): number
3048
+
3049
+ // Own virtual methods of Dee-1.0.Dee.TermList
3050
+
3051
+ /**
3052
+ * Add a term to the termlist. Note that it is possible to add a term multiple
3053
+ * times. The effect of this is determined by the #DeeModelIndex consuming the
3054
+ * #DeeTermList.
3055
+ * @virtual
3056
+ * @param term The term to add
3057
+ * @returns Always returns @self
3058
+ */
3059
+ vfunc_add_term(term: string | null): TermList
3060
+ /**
3061
+ * Remove all terms from a term list making it ready for reuse. Note that
3062
+ * term list implementations will often have optimized memory allocation
3063
+ * schemes so reuse is often more efficient than allocating a new term list
3064
+ * each time you need it.
3065
+ * @virtual
3066
+ * @returns Always returns @self
3067
+ */
3068
+ vfunc_clear(): TermList
3069
+ /**
3070
+ * Create a copy of `self` that shares the underlying string pool and containing
3071
+ * a list of terms as currently set in `self`.
3072
+ *
3073
+ * Subsequently freeing the original and keeping the clone around is not a
3074
+ * problem. The clone works as a standalone term list. The only gotcha may be
3075
+ * threading issues because of concurrent access to the shared string pool.
3076
+ *
3077
+ * Creating a clone very efficient since only very little memory allocation
3078
+ * is required. It's advised that you use a clone instead a new instance
3079
+ * whenever you work over a common corpus of strings.
3080
+ *
3081
+ * It is also worth noting that terms obtained from the original term list
3082
+ * and a clone can be compared directly as pointers (fx. with g_direct_equal()).
3083
+ * This is because they share the underlying string pool.
3084
+ * @virtual
3085
+ * @returns A newly allocated term list. Free with g_object_unref().
3086
+ */
3087
+ vfunc_clone(): TermList
3088
+ /**
3089
+ * Get the n'th term in the list.
3090
+ *
3091
+ * Note that in the default implementation it is guaranteed that the returned
3092
+ * string is valid for the entire lifetime of the #DeeTermList.
3093
+ * @virtual
3094
+ * @param n The (zero based) offset into the term list
3095
+ * @returns The @n<!-- -->th string held in the term list
3096
+ */
3097
+ vfunc_get_term(n: number): string | null
3098
+ vfunc_num_terms(): number
3099
+
3100
+ // Class property signals of Dee-1.0.Dee.TermList
3101
+
3102
+ connect(sigName: string, callback: (...args: any[]) => void): number
3103
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
3104
+ emit(sigName: string, ...args: any[]): void
3105
+ disconnect(id: number): void
3106
+ }
3107
+
3108
+ /**
3109
+ * All fields in the DeeTermList structure are private and should never be
3110
+ * accessed directly
3111
+ * @class
3112
+ */
3113
+ class TermList extends GObject.Object {
3114
+
3115
+ // Own properties of Dee-1.0.Dee.TermList
3116
+
3117
+ static name: string
3118
+ static $gtype: GObject.GType<TermList>
3119
+
3120
+ // Constructors of Dee-1.0.Dee.TermList
3121
+
3122
+ constructor(config?: TermList.ConstructorProperties)
3123
+ _init(config?: TermList.ConstructorProperties): void
3124
+ }
3125
+
3126
+ module TextAnalyzer {
3127
+
3128
+ // Constructor properties interface
3129
+
3130
+ interface ConstructorProperties extends Analyzer.ConstructorProperties {
3131
+ }
3132
+
3133
+ }
3134
+
3135
+ interface TextAnalyzer {
3136
+
3137
+ // Class property signals of Dee-1.0.Dee.TextAnalyzer
3138
+
3139
+ connect(sigName: string, callback: (...args: any[]) => void): number
3140
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
3141
+ emit(sigName: string, ...args: any[]): void
3142
+ disconnect(id: number): void
3143
+ }
3144
+
3145
+ /**
3146
+ * All fields in the DeeTextAnalyzer structure are private and should never be
3147
+ * accessed directly
3148
+ * @class
3149
+ */
3150
+ class TextAnalyzer extends Analyzer {
3151
+
3152
+ // Own properties of Dee-1.0.Dee.TextAnalyzer
3153
+
3154
+ static name: string
3155
+ static $gtype: GObject.GType<TextAnalyzer>
3156
+
3157
+ // Constructors of Dee-1.0.Dee.TextAnalyzer
3158
+
3159
+ constructor(config?: TextAnalyzer.ConstructorProperties)
3160
+ constructor()
3161
+ static new(): TextAnalyzer
3162
+
3163
+ // Overloads of new
3164
+
3165
+ static new(): Analyzer
3166
+ _init(config?: TextAnalyzer.ConstructorProperties): void
3167
+ }
3168
+
3169
+ module Transaction {
3170
+
3171
+ // Constructor properties interface
3172
+
3173
+ interface ConstructorProperties extends Model.ConstructorProperties, Serializable.ConstructorProperties, SerializableModel.ConstructorProperties {
3174
+
3175
+ // Own constructor properties of Dee-1.0.Dee.Transaction
3176
+
3177
+ target?: Model | null
3178
+ }
3179
+
3180
+ }
3181
+
3182
+ interface Transaction extends Model, Serializable {
3183
+
3184
+ // Own properties of Dee-1.0.Dee.Transaction
3185
+
3186
+ readonly target: Model
3187
+
3188
+ // Owm methods of Dee-1.0.Dee.Transaction
3189
+
3190
+ /**
3191
+ * Apply a transaction to its target model. After this call the transaction
3192
+ * is invalidated and must be freed with g_object_unref().
3193
+ * @returns %TRUE if and only if the transaction successfully applies to :target.
3194
+ */
3195
+ commit(): boolean
3196
+ /**
3197
+ * Get the target model of a transaction. This is just a convenience method
3198
+ * for accessing the :target property.
3199
+ * @returns The target model
3200
+ */
3201
+ get_target(): Model
3202
+ /**
3203
+ * Check if a #DeeTransaction has been committed. This method is mainly for
3204
+ * debugging and testing purposes.
3205
+ * @returns %TRUE if and only if dee_transaction_commit() has completed successfully on the transaction.
3206
+ */
3207
+ is_committed(): boolean
3208
+
3209
+ // Class property signals of Dee-1.0.Dee.Transaction
3210
+
3211
+ connect(sigName: "notify::target", callback: (($obj: Transaction, pspec: GObject.ParamSpec) => void)): number
3212
+ connect_after(sigName: "notify::target", callback: (($obj: Transaction, pspec: GObject.ParamSpec) => void)): number
3213
+ emit(sigName: "notify::target", ...args: any[]): void
3214
+ connect(sigName: string, callback: (...args: any[]) => void): number
3215
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
3216
+ emit(sigName: string, ...args: any[]): void
3217
+ disconnect(id: number): void
3218
+ }
3219
+
3220
+ /**
3221
+ * All fields in the DeeTransaction structure are private and should never be
3222
+ * accessed directly
3223
+ * @class
3224
+ */
3225
+ class Transaction extends SerializableModel {
3226
+
3227
+ // Own properties of Dee-1.0.Dee.Transaction
3228
+
3229
+ static name: string
3230
+ static $gtype: GObject.GType<Transaction>
3231
+
3232
+ // Constructors of Dee-1.0.Dee.Transaction
3233
+
3234
+ constructor(config?: Transaction.ConstructorProperties)
3235
+ constructor(target: Model)
3236
+ static new(target: Model): Transaction
3237
+ _init(config?: Transaction.ConstructorProperties): void
3238
+ static error_quark(): GLib.Quark
3239
+ }
3240
+
3241
+ module TreeIndex {
3242
+
3243
+ // Constructor properties interface
3244
+
3245
+ interface ConstructorProperties extends Index.ConstructorProperties {
3246
+ }
3247
+
3248
+ }
3249
+
3250
+ interface TreeIndex {
3251
+
3252
+ // Class property signals of Dee-1.0.Dee.TreeIndex
3253
+
3254
+ connect(sigName: "notify::analyzer", callback: (($obj: TreeIndex, pspec: GObject.ParamSpec) => void)): number
3255
+ connect_after(sigName: "notify::analyzer", callback: (($obj: TreeIndex, pspec: GObject.ParamSpec) => void)): number
3256
+ emit(sigName: "notify::analyzer", ...args: any[]): void
3257
+ connect(sigName: "notify::model", callback: (($obj: TreeIndex, pspec: GObject.ParamSpec) => void)): number
3258
+ connect_after(sigName: "notify::model", callback: (($obj: TreeIndex, pspec: GObject.ParamSpec) => void)): number
3259
+ emit(sigName: "notify::model", ...args: any[]): void
3260
+ connect(sigName: "notify::reader", callback: (($obj: TreeIndex, pspec: GObject.ParamSpec) => void)): number
3261
+ connect_after(sigName: "notify::reader", callback: (($obj: TreeIndex, pspec: GObject.ParamSpec) => void)): number
3262
+ emit(sigName: "notify::reader", ...args: any[]): void
3263
+ connect(sigName: string, callback: (...args: any[]) => void): number
3264
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
3265
+ emit(sigName: string, ...args: any[]): void
3266
+ disconnect(id: number): void
3267
+ }
3268
+
3269
+ /**
3270
+ * All fields in the DeeTreeIndex structure are private and should never be
3271
+ * accessed directly
3272
+ * @class
3273
+ */
3274
+ class TreeIndex extends Index {
3275
+
3276
+ // Own properties of Dee-1.0.Dee.TreeIndex
3277
+
3278
+ static name: string
3279
+ static $gtype: GObject.GType<TreeIndex>
3280
+
3281
+ // Constructors of Dee-1.0.Dee.TreeIndex
3282
+
3283
+ constructor(config?: TreeIndex.ConstructorProperties)
3284
+ /**
3285
+ * Create a new tree index.
3286
+ * @constructor
3287
+ * @param model The model to index
3288
+ * @param analyzer The #DeeAnalyzer used to tokenize and filter the terms extracted by `reader`
3289
+ * @param reader The #DeeModelReader used to extract terms from the model
3290
+ * @returns A newly allocated tree index. Free with g_object_unref().
3291
+ */
3292
+ constructor(model: Model, analyzer: Analyzer, reader: ModelReader)
3293
+ /**
3294
+ * Create a new tree index.
3295
+ * @constructor
3296
+ * @param model The model to index
3297
+ * @param analyzer The #DeeAnalyzer used to tokenize and filter the terms extracted by `reader`
3298
+ * @param reader The #DeeModelReader used to extract terms from the model
3299
+ * @returns A newly allocated tree index. Free with g_object_unref().
3300
+ */
3301
+ static new(model: Model, analyzer: Analyzer, reader: ModelReader): TreeIndex
3302
+ _init(config?: TreeIndex.ConstructorProperties): void
3303
+ }
3304
+
3305
+ interface AnalyzerClass {
3306
+
3307
+ // Own fields of Dee-1.0.Dee.AnalyzerClass
3308
+
3309
+ analyze: (self: Analyzer, data: string | null, terms_out: TermList | null, colkeys_out: TermList | null) => void
3310
+ tokenize: (self: Analyzer, data: string | null, terms_out: TermList) => void
3311
+ add_term_filter: (self: Analyzer, filter_func: TermFilterFunc) => void
3312
+ collate_key: (self: Analyzer, data: string | null) => string | null
3313
+ collate_cmp: (self: Analyzer, key1: string | null, key2: string | null) => number
3314
+ }
3315
+
3316
+ abstract class AnalyzerClass {
3317
+
3318
+ // Own properties of Dee-1.0.Dee.AnalyzerClass
3319
+
3320
+ static name: string
3321
+ }
3322
+
3323
+ interface AnalyzerPrivate {
3324
+ }
3325
+
3326
+ /**
3327
+ * Ignore this structure.
3328
+ * @record
3329
+ */
3330
+ class AnalyzerPrivate {
3331
+
3332
+ // Own properties of Dee-1.0.Dee.AnalyzerPrivate
3333
+
3334
+ static name: string
3335
+ }
3336
+
3337
+ interface ClientClass {
3338
+ }
3339
+
3340
+ abstract class ClientClass {
3341
+
3342
+ // Own properties of Dee-1.0.Dee.ClientClass
3343
+
3344
+ static name: string
3345
+ }
3346
+
3347
+ interface ClientPrivate {
3348
+ }
3349
+
3350
+ /**
3351
+ * Ignore this structure.
3352
+ * @record
3353
+ */
3354
+ class ClientPrivate {
3355
+
3356
+ // Own properties of Dee-1.0.Dee.ClientPrivate
3357
+
3358
+ static name: string
3359
+ }
3360
+
3361
+ interface FileResourceManagerClass {
3362
+
3363
+ // Own fields of Dee-1.0.Dee.FileResourceManagerClass
3364
+
3365
+ parent_class: GObject.ObjectClass
3366
+ }
3367
+
3368
+ abstract class FileResourceManagerClass {
3369
+
3370
+ // Own properties of Dee-1.0.Dee.FileResourceManagerClass
3371
+
3372
+ static name: string
3373
+ }
3374
+
3375
+ interface Filter {
3376
+
3377
+ // Own fields of Dee-1.0.Dee.Filter
3378
+
3379
+ /**
3380
+ * The #DeeModelMapFunc used to construct
3381
+ * the initial contents of a #DeeFilterModel
3382
+ * @field
3383
+ */
3384
+ map_func: FilterMapFunc
3385
+ /**
3386
+ * Callback invoked when the original model changes
3387
+ * @field
3388
+ */
3389
+ map_notify: FilterMapNotify
3390
+ /**
3391
+ * Callback for freeing the `user_data`
3392
+ * `userdata` (closure): Free form user data associated with the filter.
3393
+ * This pointer will be passed to `map_func` and `map_notify`
3394
+ * @field
3395
+ */
3396
+ destroy: GLib.DestroyNotify
3397
+ userdata: any
3398
+
3399
+ // Owm methods of Dee-1.0.Dee.Filter
3400
+
3401
+ /**
3402
+ * Call the #DeeFilterMapFunc function of a #DeeFilter.
3403
+ * When using a #DeeFilterModel you should not call this method yourself.
3404
+ * @param orig_model The model that is being filtered
3405
+ * @param filter_model The #DeeFilterModel that holds the filtered subset of `orig_model`
3406
+ */
3407
+ map(orig_model: Model, filter_model: FilterModel): void
3408
+ /**
3409
+ * Call the #DeeFilterMapNotify function of a #DeeFilter.
3410
+ * When using a #DeeFilterModel you should not call this method yourself.
3411
+ * @param orig_iter The #DeeModelIter added to `orig_model`
3412
+ * @param orig_model The model that is being filtered
3413
+ * @param filter_model The #DeeFilterModel that holds the filtered subset of `orig_model`
3414
+ * @returns The return value from the #DeeFilterMapNotify. That is; %TRUE if @orig_iter was added to @filter_model
3415
+ */
3416
+ notify(orig_iter: ModelIter, orig_model: Model, filter_model: FilterModel): boolean
3417
+ }
3418
+
3419
+ /**
3420
+ * Structure encapsulating the mapping logic used to construct a #DeeFilterModel
3421
+ * @record
3422
+ */
3423
+ class Filter {
3424
+
3425
+ // Own properties of Dee-1.0.Dee.Filter
3426
+
3427
+ static name: string
3428
+
3429
+ // Constructors of Dee-1.0.Dee.Filter
3430
+
3431
+ /**
3432
+ * Create a new #DeeFilter with the given parameters. This call will zero
3433
+ * the `out_filter` struct.
3434
+ * @param map_func The #DeeFilterMapFunc to use for the filter
3435
+ * @param map_notify The #DeeFilterMapNotify to use for the filter
3436
+ */
3437
+ static new(map_func: FilterMapFunc, map_notify: FilterMapNotify): /* out_filter */ Filter
3438
+ /**
3439
+ * Create a #DeeFilter that takes string values from a column in the model
3440
+ * and builds a #DeeFilterModel with the rows sorted according to the
3441
+ * collation rules of the current locale.
3442
+ * @param column The index of a column containing the strings to sort after
3443
+ */
3444
+ static new_collator(column: number): /* out_filter */ Filter
3445
+ /**
3446
+ * Create a #DeeFilter that takes string values from a column in the model
3447
+ * and builds a #DeeFilterModel with the rows sorted descending according to the
3448
+ * collation rules of the current locale.
3449
+ * @param column The index of a column containing the strings to sort after
3450
+ */
3451
+ static new_collator_desc(column: number): /* out_filter */ Filter
3452
+ /**
3453
+ * Create a #DeeFilter that only includes rows from the original model
3454
+ * which match a variant value in a given column. A #DeeFilterModel
3455
+ * created with this filter will be ordered in accordance with its parent model.
3456
+ *
3457
+ * This method will work on any column, disregarding its schema, since the
3458
+ * value comparison is done using g_variant_equal(). This means you can use
3459
+ * this filter as a convenient fallback when there is no predefined filter
3460
+ * for your column type if raw performance is not paramount.
3461
+ * @param column The index of a column containing the string to match
3462
+ * @param value A #GVariant value columns must match exactly. The matching semantics are those of g_variant_equal(). If `value` is floating the ownership will be transfered to the filter
3463
+ */
3464
+ static new_for_any_column(column: number, value: GLib.Variant): /* out_filter */ Filter
3465
+ /**
3466
+ * Create a #DeeFilter that only includes rows from the original model
3467
+ * which has an exact match on some string column. A #DeeFilterModel created
3468
+ * with this filter will be ordered in accordance with its parent model.
3469
+ * @param column The index of a column containing the string key to match
3470
+ * @param key
3471
+ */
3472
+ static new_for_key_column(column: number, key: string | null): /* out_filter */ Filter
3473
+ /**
3474
+ * Create a #DeeFilter that only includes rows from the original model
3475
+ * which match a regular expression on some string column. A #DeeFilterModel
3476
+ * created with this filter will be ordered in accordance with its parent model.
3477
+ * @param column The index of a column containing the string to match
3478
+ * @param regex The regular expression `column` must match
3479
+ */
3480
+ static new_regex(column: number, regex: GLib.Regex): /* out_filter */ Filter
3481
+ /**
3482
+ * Create a new #DeeFilter sorting a model according to a #DeeCompareRowFunc.
3483
+ * @param cmp_row A #DeeCompareRowFunc to use for sorting
3484
+ */
3485
+ static new_sort(cmp_row: CompareRowFunc): /* out_filter */ Filter
3486
+ }
3487
+
3488
+ interface FilterModelClass {
3489
+ }
3490
+
3491
+ abstract class FilterModelClass {
3492
+
3493
+ // Own properties of Dee-1.0.Dee.FilterModelClass
3494
+
3495
+ static name: string
3496
+ }
3497
+
3498
+ interface FilterModelPrivate {
3499
+ }
3500
+
3501
+ /**
3502
+ * Ignore this structure.
3503
+ * @record
3504
+ */
3505
+ class FilterModelPrivate {
3506
+
3507
+ // Own properties of Dee-1.0.Dee.FilterModelPrivate
3508
+
3509
+ static name: string
3510
+ }
3511
+
3512
+ interface GListResultSetClass {
3513
+
3514
+ // Own fields of Dee-1.0.Dee.GListResultSetClass
3515
+
3516
+ parent_class: GObject.ObjectClass
3517
+ }
3518
+
3519
+ abstract class GListResultSetClass {
3520
+
3521
+ // Own properties of Dee-1.0.Dee.GListResultSetClass
3522
+
3523
+ static name: string
3524
+ }
3525
+
3526
+ interface HashIndexClass {
3527
+
3528
+ // Own fields of Dee-1.0.Dee.HashIndexClass
3529
+
3530
+ parent_class: IndexClass
3531
+ }
3532
+
3533
+ abstract class HashIndexClass {
3534
+
3535
+ // Own properties of Dee-1.0.Dee.HashIndexClass
3536
+
3537
+ static name: string
3538
+ }
3539
+
3540
+ interface HashIndexPrivate {
3541
+ }
3542
+
3543
+ class HashIndexPrivate {
3544
+
3545
+ // Own properties of Dee-1.0.Dee.HashIndexPrivate
3546
+
3547
+ static name: string
3548
+ }
3549
+
3550
+ interface ICUTermFilter {
3551
+
3552
+ // Owm methods of Dee-1.0.Dee.ICUTermFilter
3553
+
3554
+ /**
3555
+ * Apply a #DeeICUTermFilter on a piece of UTF-8 text.
3556
+ * @param text The text to apply the filter on
3557
+ * @returns A newly allocated string. Free with g_free().
3558
+ */
3559
+ apply(text: string | null): string | null
3560
+ /**
3561
+ * Free all resources allocated by a #DeeICUTermFilter.
3562
+ */
3563
+ destroy(): void
3564
+ }
3565
+
3566
+ class ICUTermFilter {
3567
+
3568
+ // Own properties of Dee-1.0.Dee.ICUTermFilter
3569
+
3570
+ static name: string
3571
+ }
3572
+
3573
+ interface IndexClass {
3574
+
3575
+ // Own fields of Dee-1.0.Dee.IndexClass
3576
+
3577
+ parent_class: GObject.ObjectClass
3578
+ lookup: (self: Index, term: string | null, flags: TermMatchFlag) => ResultSet
3579
+ foreach: (self: Index, start_term: string | null, func: IndexIterFunc) => void
3580
+ get_n_terms: (self: Index) => number
3581
+ get_n_rows: (self: Index) => number
3582
+ get_n_rows_for_term: (self: Index, term: string | null) => number
3583
+ get_supported_term_match_flags: (self: Index) => number
3584
+ }
3585
+
3586
+ abstract class IndexClass {
3587
+
3588
+ // Own properties of Dee-1.0.Dee.IndexClass
3589
+
3590
+ static name: string
3591
+ }
3592
+
3593
+ interface IndexPrivate {
3594
+ }
3595
+
3596
+ /**
3597
+ * Ignore this structure.
3598
+ * @record
3599
+ */
3600
+ class IndexPrivate {
3601
+
3602
+ // Own properties of Dee-1.0.Dee.IndexPrivate
3603
+
3604
+ static name: string
3605
+ }
3606
+
3607
+ interface ModelIface {
3608
+
3609
+ // Own fields of Dee-1.0.Dee.ModelIface
3610
+
3611
+ g_iface: GObject.TypeInterface
3612
+ row_added: (self: Model, iter: ModelIter) => void
3613
+ row_removed: (self: Model, iter: ModelIter) => void
3614
+ row_changed: (self: Model, iter: ModelIter) => void
3615
+ set_schema_full: (self: Model, column_schemas: string[]) => void
3616
+ get_schema: (self: Model) => string[]
3617
+ get_column_schema: (self: Model, column: number) => string | null
3618
+ get_field_schema: (self: Model, field_name: string | null) => [ /* returnType */ string | null, /* out_column */ number ]
3619
+ get_column_index: (self: Model, column_name: string | null) => number
3620
+ set_column_names_full: (self: Model, column_names: string[]) => void
3621
+ get_column_names: (self: Model) => string[]
3622
+ register_vardict_schema: (self: Model, num_column: number, schemas: GLib.HashTable) => void
3623
+ get_vardict_schema: (self: Model, num_column: number) => GLib.HashTable
3624
+ get_n_columns: (self: Model) => number
3625
+ get_n_rows: (self: Model) => number
3626
+ append_row: (self: Model, row_members: GLib.Variant[]) => ModelIter
3627
+ prepend_row: (self: Model, row_members: GLib.Variant[]) => ModelIter
3628
+ insert_row: (self: Model, pos: number, row_members: GLib.Variant[]) => ModelIter
3629
+ insert_row_before: (self: Model, iter: ModelIter, row_members: GLib.Variant[]) => ModelIter
3630
+ insert_row_sorted: (self: Model, row_members: GLib.Variant[], cmp_func: CompareRowFunc) => ModelIter
3631
+ find_row_sorted: (self: Model, row_spec: GLib.Variant[], cmp_func: CompareRowFunc) => [ /* returnType */ ModelIter, /* out_was_found */ boolean ]
3632
+ remove: (self: Model, iter: ModelIter) => void
3633
+ clear: (self: Model) => void
3634
+ set_value: (self: Model, iter: ModelIter, column: number, value: GLib.Variant) => void
3635
+ set_row: (self: Model, iter: ModelIter, row_members: GLib.Variant[]) => void
3636
+ get_value: (self: Model, iter: ModelIter, column: number) => GLib.Variant
3637
+ get_value_by_name: (self: Model, iter: ModelIter, column_name: string | null) => GLib.Variant
3638
+ get_first_iter: (self: Model) => ModelIter
3639
+ get_last_iter: (self: Model) => ModelIter
3640
+ get_iter_at_row: (self: Model, row: number) => ModelIter
3641
+ get_bool: (self: Model, iter: ModelIter, column: number) => boolean
3642
+ get_uchar: (self: Model, iter: ModelIter, column: number) => number
3643
+ get_int32: (self: Model, iter: ModelIter, column: number) => number
3644
+ get_uint32: (self: Model, iter: ModelIter, column: number) => number
3645
+ get_int64: (self: Model, iter: ModelIter, column: number) => number
3646
+ get_uint64: (self: Model, iter: ModelIter, column: number) => number
3647
+ get_double: (self: Model, iter: ModelIter, column: number) => number
3648
+ get_string: (self: Model, iter: ModelIter, column: number) => string | null
3649
+ next: (self: Model, iter: ModelIter) => ModelIter
3650
+ prev: (self: Model, iter: ModelIter) => ModelIter
3651
+ is_first: (self: Model, iter: ModelIter) => boolean
3652
+ is_last: (self: Model, iter: ModelIter) => boolean
3653
+ get_position: (self: Model, iter: ModelIter) => number
3654
+ register_tag: (self: Model, tag_destroy: GLib.DestroyNotify) => ModelTag
3655
+ get_tag: (self: Model, iter: ModelIter, tag: ModelTag) => any | null
3656
+ set_tag: (self: Model, iter: ModelIter, tag: ModelTag, value: any | null) => void
3657
+ get_row: (self: Model, iter: ModelIter, out_row_members: GLib.Variant) => GLib.Variant
3658
+ begin_changeset: (self: Model) => void
3659
+ end_changeset: (self: Model) => void
3660
+ changeset_started: (self: Model) => void
3661
+ changeset_finished: (self: Model) => void
3662
+ }
3663
+
3664
+ abstract class ModelIface {
3665
+
3666
+ // Own properties of Dee-1.0.Dee.ModelIface
3667
+
3668
+ static name: string
3669
+ }
3670
+
3671
+ interface ModelIter {
3672
+ }
3673
+
3674
+ /**
3675
+ * The DeeModelIter structure is private and should only be used with the
3676
+ * provided #DeeModel API. It is owned by DeeModel and should not be freed.
3677
+ * @record
3678
+ */
3679
+ class ModelIter {
3680
+
3681
+ // Own properties of Dee-1.0.Dee.ModelIter
3682
+
3683
+ static name: string
3684
+ }
3685
+
3686
+ interface ModelReader {
3687
+
3688
+ // Own fields of Dee-1.0.Dee.ModelReader
3689
+
3690
+ /**
3691
+ * The #DeeModelReaderFunc used to extract
3692
+ * string from a model
3693
+ * @field
3694
+ */
3695
+ reader_func: ModelReaderFunc
3696
+ /**
3697
+ * user data to pass to `reader_func`
3698
+ * @field
3699
+ */
3700
+ userdata: any
3701
+ /**
3702
+ * Called when the reader is destroyed
3703
+ * @field
3704
+ */
3705
+ destroy: GLib.DestroyNotify
3706
+
3707
+ // Owm methods of Dee-1.0.Dee.ModelReader
3708
+
3709
+ /**
3710
+ * Read data from a row in a #DeeModel and extract a string representation from
3711
+ * it.
3712
+ *
3713
+ * Note that generally a #DeeModelReader need not be confined to reading from
3714
+ * one specific column, although in practice most are.
3715
+ * @param model The #DeeModel to read a string from
3716
+ * @param iter The row to read a string from
3717
+ * @returns A newly allocated string. Free with g_free().
3718
+ */
3719
+ read(model: Model, iter: ModelIter): string | null
3720
+ }
3721
+
3722
+ /**
3723
+ * Structure encapsulating the information needed to read strings from a
3724
+ * model. Used for example by #DeeIndex.
3725
+ * @record
3726
+ */
3727
+ class ModelReader {
3728
+
3729
+ // Own properties of Dee-1.0.Dee.ModelReader
3730
+
3731
+ static name: string
3732
+
3733
+ // Constructors of Dee-1.0.Dee.ModelReader
3734
+
3735
+ /**
3736
+ * Create a new #DeeModelReader with the given parameters. This call will zero
3737
+ * the `out_reader` struct.
3738
+ * @param reader_func The #DeeModelReaderFunc to use for the reader
3739
+ */
3740
+ static new(reader_func: ModelReaderFunc): /* out_reader */ ModelReader
3741
+ /**
3742
+ * A #DeeModelReader reading a %gint32 from a #DeeModel at a given column
3743
+ * @param column The column index to read a %gint32 from
3744
+ */
3745
+ static new_for_int32_column(column: number): /* out_reader */ ModelReader
3746
+ /**
3747
+ * A #DeeModelReader reading a string from a #DeeModel at a given column
3748
+ * @param column The column index to read a string from
3749
+ */
3750
+ static new_for_string_column(column: number): /* out_reader */ ModelReader
3751
+ /**
3752
+ * A #DeeModelReader reading a %guint32 from a #DeeModel at a given column
3753
+ * @param column The column index to read a %guint32 from
3754
+ */
3755
+ static new_for_uint32_column(column: number): /* out_reader */ ModelReader
3756
+ }
3757
+
3758
+ interface ModelTag {
3759
+ }
3760
+
3761
+ /**
3762
+ * The DeeModelTag structure is private and should only be used with the
3763
+ * provided #DeeModel API. It is owned by DeeModel and should not be freed.
3764
+ * @record
3765
+ */
3766
+ class ModelTag {
3767
+
3768
+ // Own properties of Dee-1.0.Dee.ModelTag
3769
+
3770
+ static name: string
3771
+ }
3772
+
3773
+ interface PeerClass {
3774
+
3775
+ // Own fields of Dee-1.0.Dee.PeerClass
3776
+
3777
+ peer_found: (self: Peer, name: string | null) => void
3778
+ peer_lost: (self: Peer, name: string | null) => void
3779
+ connection_acquired: (self: Peer, connection: Gio.DBusConnection) => void
3780
+ connection_closed: (self: Peer, connection: Gio.DBusConnection) => void
3781
+ get_swarm_leader: (self: Peer) => string | null
3782
+ is_swarm_leader: (self: Peer) => boolean
3783
+ get_connections: (self: Peer) => Gio.DBusConnection[]
3784
+ list_peers: (self: Peer) => string[]
3785
+ }
3786
+
3787
+ abstract class PeerClass {
3788
+
3789
+ // Own properties of Dee-1.0.Dee.PeerClass
3790
+
3791
+ static name: string
3792
+ }
3793
+
3794
+ interface PeerPrivate {
3795
+ }
3796
+
3797
+ /**
3798
+ * Ignore this structure.
3799
+ * @record
3800
+ */
3801
+ class PeerPrivate {
3802
+
3803
+ // Own properties of Dee-1.0.Dee.PeerPrivate
3804
+
3805
+ static name: string
3806
+ }
3807
+
3808
+ interface ProxyModelClass {
3809
+ }
3810
+
3811
+ abstract class ProxyModelClass {
3812
+
3813
+ // Own properties of Dee-1.0.Dee.ProxyModelClass
3814
+
3815
+ static name: string
3816
+ }
3817
+
3818
+ interface ProxyModelPrivate {
3819
+ }
3820
+
3821
+ /**
3822
+ * Ignore this structure.
3823
+ * @record
3824
+ */
3825
+ class ProxyModelPrivate {
3826
+
3827
+ // Own properties of Dee-1.0.Dee.ProxyModelPrivate
3828
+
3829
+ static name: string
3830
+ }
3831
+
3832
+ interface ResourceManagerIface {
3833
+
3834
+ // Own fields of Dee-1.0.Dee.ResourceManagerIface
3835
+
3836
+ g_iface: GObject.TypeInterface
3837
+ store: (self: ResourceManager, resource: Serializable, resource_name: string | null) => boolean
3838
+ load: (self: ResourceManager, resource_name: string | null) => GObject.Object
3839
+ }
3840
+
3841
+ abstract class ResourceManagerIface {
3842
+
3843
+ // Own properties of Dee-1.0.Dee.ResourceManagerIface
3844
+
3845
+ static name: string
3846
+ }
3847
+
3848
+ interface ResultSetIface {
3849
+
3850
+ // Own fields of Dee-1.0.Dee.ResultSetIface
3851
+
3852
+ g_iface: GObject.TypeInterface
3853
+ get_n_rows: (self: ResultSet) => number
3854
+ next: (self: ResultSet) => ModelIter
3855
+ has_next: (self: ResultSet) => boolean
3856
+ peek: (self: ResultSet) => ModelIter
3857
+ seek: (self: ResultSet, pos: number) => void
3858
+ tell: (self: ResultSet) => number
3859
+ get_model: (self: ResultSet) => Model
3860
+ }
3861
+
3862
+ abstract class ResultSetIface {
3863
+
3864
+ // Own properties of Dee-1.0.Dee.ResultSetIface
3865
+
3866
+ static name: string
3867
+ }
3868
+
3869
+ interface SequenceModelClass {
3870
+ }
3871
+
3872
+ abstract class SequenceModelClass {
3873
+
3874
+ // Own properties of Dee-1.0.Dee.SequenceModelClass
3875
+
3876
+ static name: string
3877
+ }
3878
+
3879
+ interface SequenceModelPrivate {
3880
+ }
3881
+
3882
+ /**
3883
+ * Ignore this structure.
3884
+ * @record
3885
+ */
3886
+ class SequenceModelPrivate {
3887
+
3888
+ // Own properties of Dee-1.0.Dee.SequenceModelPrivate
3889
+
3890
+ static name: string
3891
+ }
3892
+
3893
+ interface SerializableIface {
3894
+
3895
+ // Own fields of Dee-1.0.Dee.SerializableIface
3896
+
3897
+ g_iface: GObject.TypeInterface
3898
+ serialize: (self: Serializable) => GLib.Variant
3899
+ }
3900
+
3901
+ abstract class SerializableIface {
3902
+
3903
+ // Own properties of Dee-1.0.Dee.SerializableIface
3904
+
3905
+ static name: string
3906
+ }
3907
+
3908
+ interface SerializableModelClass {
3909
+
3910
+ // Own fields of Dee-1.0.Dee.SerializableModelClass
3911
+
3912
+ get_seqnum: (self: Model) => number
3913
+ set_seqnum: (self: Model, seqnum: number) => void
3914
+ inc_seqnum: (self: Model) => number
3915
+ }
3916
+
3917
+ abstract class SerializableModelClass {
3918
+
3919
+ // Own properties of Dee-1.0.Dee.SerializableModelClass
3920
+
3921
+ static name: string
3922
+ }
3923
+
3924
+ interface SerializableModelPrivate {
3925
+ }
3926
+
3927
+ /**
3928
+ * Ignore this structure.
3929
+ * @record
3930
+ */
3931
+ class SerializableModelPrivate {
3932
+
3933
+ // Own properties of Dee-1.0.Dee.SerializableModelPrivate
3934
+
3935
+ static name: string
3936
+ }
3937
+
3938
+ interface ServerClass {
3939
+ }
3940
+
3941
+ abstract class ServerClass {
3942
+
3943
+ // Own properties of Dee-1.0.Dee.ServerClass
3944
+
3945
+ static name: string
3946
+ }
3947
+
3948
+ interface ServerPrivate {
3949
+ }
3950
+
3951
+ /**
3952
+ * Ignore this structure.
3953
+ * @record
3954
+ */
3955
+ class ServerPrivate {
3956
+
3957
+ // Own properties of Dee-1.0.Dee.ServerPrivate
3958
+
3959
+ static name: string
3960
+ }
3961
+
3962
+ interface SharedModelClass {
3963
+ }
3964
+
3965
+ abstract class SharedModelClass {
3966
+
3967
+ // Own properties of Dee-1.0.Dee.SharedModelClass
3968
+
3969
+ static name: string
3970
+ }
3971
+
3972
+ interface SharedModelPrivate {
3973
+ }
3974
+
3975
+ /**
3976
+ * Ignore this structure.
3977
+ * @record
3978
+ */
3979
+ class SharedModelPrivate {
3980
+
3981
+ // Own properties of Dee-1.0.Dee.SharedModelPrivate
3982
+
3983
+ static name: string
3984
+ }
3985
+
3986
+ interface TermListClass {
3987
+
3988
+ // Own fields of Dee-1.0.Dee.TermListClass
3989
+
3990
+ parent_class: GObject.ObjectClass
3991
+ get_term: (self: TermList, n: number) => string | null
3992
+ add_term: (self: TermList, term: string | null) => TermList
3993
+ num_terms: (self: TermList) => number
3994
+ clear: (self: TermList) => TermList
3995
+ clone: (self: TermList) => TermList
3996
+ }
3997
+
3998
+ abstract class TermListClass {
3999
+
4000
+ // Own properties of Dee-1.0.Dee.TermListClass
4001
+
4002
+ static name: string
4003
+ }
4004
+
4005
+ interface TermListPrivate {
4006
+ }
4007
+
4008
+ /**
4009
+ * Ignore this structure.
4010
+ * @record
4011
+ */
4012
+ class TermListPrivate {
4013
+
4014
+ // Own properties of Dee-1.0.Dee.TermListPrivate
4015
+
4016
+ static name: string
4017
+ }
4018
+
4019
+ interface TextAnalyzerClass {
4020
+ }
4021
+
4022
+ abstract class TextAnalyzerClass {
4023
+
4024
+ // Own properties of Dee-1.0.Dee.TextAnalyzerClass
4025
+
4026
+ static name: string
4027
+ }
4028
+
4029
+ interface TextAnalyzerPrivate {
4030
+ }
4031
+
4032
+ class TextAnalyzerPrivate {
4033
+
4034
+ // Own properties of Dee-1.0.Dee.TextAnalyzerPrivate
4035
+
4036
+ static name: string
4037
+ }
4038
+
4039
+ interface TransactionClass {
4040
+ }
4041
+
4042
+ abstract class TransactionClass {
4043
+
4044
+ // Own properties of Dee-1.0.Dee.TransactionClass
4045
+
4046
+ static name: string
4047
+ }
4048
+
4049
+ interface TransactionPrivate {
4050
+ }
4051
+
4052
+ /**
4053
+ * Ignore this structure.
4054
+ * @record
4055
+ */
4056
+ class TransactionPrivate {
4057
+
4058
+ // Own properties of Dee-1.0.Dee.TransactionPrivate
4059
+
4060
+ static name: string
4061
+ }
4062
+
4063
+ interface TreeIndexClass {
4064
+
4065
+ // Own fields of Dee-1.0.Dee.TreeIndexClass
4066
+
4067
+ parent_class: IndexClass
4068
+ }
4069
+
4070
+ abstract class TreeIndexClass {
4071
+
4072
+ // Own properties of Dee-1.0.Dee.TreeIndexClass
4073
+
4074
+ static name: string
4075
+ }
4076
+
4077
+ interface TreeIndexPrivate {
4078
+ }
4079
+
4080
+ class TreeIndexPrivate {
4081
+
4082
+ // Own properties of Dee-1.0.Dee.TreeIndexPrivate
4083
+
4084
+ static name: string
4085
+ }
4086
+
4087
+ /**
4088
+ * Name of the imported GIR library
4089
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
4090
+ */
4091
+ const __name__: string
4092
+ /**
4093
+ * Version of the imported GIR library
4094
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
4095
+ */
4096
+ const __version__: string
4097
+ }
4098
+
4099
+ export default Dee;
4100
+ // END