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