-
Notifications
You must be signed in to change notification settings - Fork 0
/
gtk.d
26916 lines (19223 loc) · 610 KB
/
gtk.d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Full GTK, GDK, Pango, ect... bindings
*
* Tedious work done by John Demme (me@teqdruid.com)
* h2d used as well.
*
* LGPL License from original header files probably applies.
*
* Known issue:
* Crashes at gtk_main if linked in. I'm not sure why. Solution:
Use as header file. Do not compile, and do not link into program.
*/
extern (C) {
alias int ptrdiff_t;
alias uint size_t;
alias int wchar_t;
alias byte gint8;
alias ubyte guint8;
alias short gint16;
alias ushort guint16;
alias int gint32;
alias uint guint32;
alias long gint64;
alias ulong guint64;
alias int gssize;
alias uint gsize;
alias _GStaticMutex GStaticMutex;
alias void _GMutex;
struct _GStaticMutex {
_GMutex *runtime_mutex;
union static_mutex_union {
char pad[24];
double dummy_double;
void *dummy_pointer;
int dummy_long;
}
static_mutex_union static_mutex;
}
alias _GSystemThread GSystemThread;
union _GSystemThread {
char data[4];
double dummy_double;
void *dummy_pointer;
int dummy_long;
}
alias int GPid;
alias char gchar;
alias short gshort;
alias int glong;
alias int gint;
alias gint gboolean;
alias ubyte guchar;
alias ushort gushort;
alias uint gulong;
alias uint guint;
alias float gfloat;
alias double gdouble;
alias void* gpointer;
alias void *gconstpointer;
alias gint (*GCompareFunc) (gpointer a,
gpointer b);
alias gint (*GCompareDataFunc) (gpointer a,
gpointer b,
gpointer user_data);
alias gboolean (*GEqualFunc) (gpointer a,
gpointer b);
alias void (*GDestroyNotify) (gpointer data);
alias void (*GFunc) (gpointer data,
gpointer user_data);
alias guint (*GHashFunc) (gpointer key);
alias void (*GHFunc) (gpointer key,
gpointer value,
gpointer user_data);
alias void (*GFreeFunc) (gpointer data);
alias _GDoubleIEEE754 GDoubleIEEE754;
alias _GFloatIEEE754 GFloatIEEE754;
union _GFloatIEEE754 {
gfloat v_float;
struct mpn_struct {
guint mantissa;
guint biased_exponent;
guint sign;
}
}
union _GDoubleIEEE754 {
gdouble v_double;
struct mpn_struct {
guint mantissa_low;
guint mantissa_high;
guint biased_exponent;
guint sign;
}
}
alias _GTimeVal GTimeVal;
struct _GTimeVal {
glong tv_sec;
glong tv_usec;
}
alias _GArray GArray;
alias _GByteArray GByteArray;
alias _GPtrArray GPtrArray;
struct _GArray {
gchar *data;
guint len;
}
struct _GByteArray {
guint8 *data;
guint len;
}
struct _GPtrArray {
gpointer *pdata;
guint len;
}
GArray* g_array_new (gboolean zero_terminated,
gboolean clear_,
guint element_size);
GArray* g_array_sized_new (gboolean zero_terminated,
gboolean clear_,
guint element_size,
guint reserved_size);
gchar* g_array_free (GArray *array,
gboolean free_segment);
GArray* g_array_append_vals (GArray *array,
gpointer data,
guint len);
GArray* g_array_prepend_vals (GArray *array,
gpointer data,
guint len);
GArray* g_array_insert_vals (GArray *array,
guint index_,
gpointer data,
guint len);
GArray* g_array_set_size (GArray *array,
guint length);
GArray* g_array_remove_index (GArray *array,
guint index_);
GArray* g_array_remove_index_fast (GArray *array,
guint index_);
GArray* g_array_remove_range (GArray *array,
guint index_,
guint length);
void g_array_sort (GArray *array,
GCompareFunc compare_func);
void g_array_sort_with_data (GArray *array,
GCompareDataFunc compare_func,
gpointer user_data);
GPtrArray* g_ptr_array_new ();
GPtrArray* g_ptr_array_sized_new (guint reserved_size);
gpointer* g_ptr_array_free (GPtrArray *array,
gboolean free_seg);
void g_ptr_array_set_size (GPtrArray *array,
gint length);
gpointer g_ptr_array_remove_index (GPtrArray *array,
guint index_);
gpointer g_ptr_array_remove_index_fast (GPtrArray *array,
guint index_);
gboolean g_ptr_array_remove (GPtrArray *array,
gpointer data);
gboolean g_ptr_array_remove_fast (GPtrArray *array,
gpointer data);
void g_ptr_array_remove_range (GPtrArray *array,
guint index_,
guint length);
void g_ptr_array_add (GPtrArray *array,
gpointer data);
void g_ptr_array_sort (GPtrArray *array,
GCompareFunc compare_func);
void g_ptr_array_sort_with_data (GPtrArray *array,
GCompareDataFunc compare_func,
gpointer user_data);
void g_ptr_array_foreach (GPtrArray *array,
GFunc func,
gpointer user_data);
GByteArray* g_byte_array_new ();
GByteArray* g_byte_array_sized_new (guint reserved_size);
guint8* g_byte_array_free (GByteArray *array,
gboolean free_segment);
GByteArray* g_byte_array_append (GByteArray *array,
guint8 *data,
guint len);
GByteArray* g_byte_array_prepend (GByteArray *array,
guint8 *data,
guint len);
GByteArray* g_byte_array_set_size (GByteArray *array,
guint length);
GByteArray* g_byte_array_remove_index (GByteArray *array,
guint index_);
GByteArray* g_byte_array_remove_index_fast (GByteArray *array,
guint index_);
GByteArray* g_byte_array_remove_range (GByteArray *array,
guint index_,
guint length);
void g_byte_array_sort (GByteArray *array,
GCompareFunc compare_func);
void g_byte_array_sort_with_data (GByteArray *array,
GCompareDataFunc compare_func,
gpointer user_data);
alias guint32 GQuark;
GQuark g_quark_try_string ( gchar *string);
GQuark g_quark_from_static_string ( gchar *string);
GQuark g_quark_from_string ( gchar *string);
gchar* g_quark_to_string (GQuark quark) ;
alias _GError GError;
struct _GError {
GQuark domain;
gint code;
gchar *message;
}
GError* g_error_new (GQuark domain,
gint code,
gchar *format,
...) ;
GError* g_error_new_literal (GQuark domain,
gint code,
gchar *message);
void g_error_free (GError *error);
GError* g_error_copy ( GError *error);
gboolean g_error_matches ( GError *error,
GQuark domain,
gint code);
void g_set_error (GError **err,
GQuark domain,
gint code,
gchar *format,
...) ;
void g_propagate_error (GError **dest,
GError *src);
void g_clear_error (GError **err);
gint g_atomic_int_exchange_and_add (gint *atomic,
gint val);
void g_atomic_int_add (gint *atomic,
gint val);
gboolean g_atomic_int_compare_and_exchange (gint *atomic,
gint oldval,
gint newval);
gboolean g_atomic_pointer_compare_and_exchange (gpointer *atomic,
gpointer oldval,
gpointer newval);
GQuark g_thread_error_quark ();
enum GThreadError {
G_THREAD_ERROR_AGAIN
};
alias gpointer (*GThreadFunc) (gpointer data);
enum GThreadPriority {
G_THREAD_PRIORITY_LOW,
G_THREAD_PRIORITY_NORMAL,
G_THREAD_PRIORITY_HIGH,
G_THREAD_PRIORITY_URGENT
};
alias _GThread GThread;
struct _GThread {
GThreadFunc func;
gpointer data;
gboolean joinable;
GThreadPriority priority;
}
alias _GMutex GMutex;
alias _GCond GCond;
alias void _GCond;
alias _GPrivate GPrivate;
alias void _GPrivate;
alias _GStaticPrivate GStaticPrivate;
alias _GThreadFunctions GThreadFunctions;
struct _GThreadFunctions {
GMutex* (*mutex_new) ();
void (*mutex_lock) (GMutex *mutex);
gboolean (*mutex_trylock) (GMutex *mutex);
void (*mutex_unlock) (GMutex *mutex);
void (*mutex_free) (GMutex *mutex);
GCond* (*cond_new) ();
void (*cond_signal) (GCond *cond);
void (*cond_broadcast) (GCond *cond);
void (*cond_wait) (GCond *cond,
GMutex *mutex);
gboolean (*cond_timed_wait) (GCond *cond,
GMutex *mutex,
GTimeVal *end_time);
void (*cond_free) (GCond *cond);
gpointer (*private_get) (GPrivate *private_key);
void (*private_set) (GPrivate *private_key,
gpointer data);
void (*thread_create) (GThreadFunc func,
gpointer data,
gulong stack_size,
gboolean joinable,
gboolean bound,
GThreadPriority priority,
gpointer thread,
GError **error);
void (*thread_yield) ();
void (*thread_join) (gpointer thread);
void (*thread_exit) ();
void (*thread_set_priority)(gpointer thread,
GThreadPriority priority);
void (*thread_self) (gpointer thread);
gboolean (*thread_equal) (gpointer thread1,
gpointer thread2);
}
GThreadFunctions g_thread_functions_for_glib_use;
gboolean g_thread_use_default_impl;
gboolean g_threads_got_initialized;
void g_thread_init (GThreadFunctions *vtable);
void g_thread_init_with_errorcheck_mutexes (GThreadFunctions* vtable);
GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex);
GThread* g_thread_create_full (GThreadFunc func,
gpointer data,
gulong stack_size,
gboolean joinable,
gboolean bound,
GThreadPriority priority,
GError **error);
GThread* g_thread_self ();
void g_thread_exit (gpointer retval);
gpointer g_thread_join (GThread *thread);
void g_thread_set_priority (GThread *thread,
GThreadPriority priority);
void g_static_mutex_init (GStaticMutex *mutex);
void g_static_mutex_free (GStaticMutex *mutex);
struct _GStaticPrivate {
guint index;
}
void g_static_private_init (GStaticPrivate *private_key);
gpointer g_static_private_get (GStaticPrivate *private_key);
void g_static_private_set (GStaticPrivate *private_key,
gpointer data,
GDestroyNotify notify);
void g_static_private_free (GStaticPrivate *private_key);
alias _GStaticRecMutex GStaticRecMutex;
struct _GStaticRecMutex {
GStaticMutex mutex;
guint depth;
GSystemThread owner;
}
void g_static_rec_mutex_init (GStaticRecMutex *mutex);
void g_static_rec_mutex_lock (GStaticRecMutex *mutex);
gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex);
void g_static_rec_mutex_unlock (GStaticRecMutex *mutex);
void g_static_rec_mutex_lock_full (GStaticRecMutex *mutex,
guint depth);
guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex);
void g_static_rec_mutex_free (GStaticRecMutex *mutex);
alias _GStaticRWLock GStaticRWLock;
struct _GStaticRWLock {
GStaticMutex mutex;
GCond *read_cond;
GCond *write_cond;
guint read_counter;
gboolean have_writer;
guint want_to_read;
guint want_to_write;
}
void g_static_rw_lock_init (GStaticRWLock* lock);
void g_static_rw_lock_reader_lock (GStaticRWLock* lock);
gboolean g_static_rw_lock_reader_trylock (GStaticRWLock* lock);
void g_static_rw_lock_reader_unlock (GStaticRWLock* lock);
void g_static_rw_lock_writer_lock (GStaticRWLock* lock);
gboolean g_static_rw_lock_writer_trylock (GStaticRWLock* lock);
void g_static_rw_lock_writer_unlock (GStaticRWLock* lock);
void g_static_rw_lock_free (GStaticRWLock* lock);
enum GOnceStatus {
G_ONCE_STATUS_NOTCALLED,
G_ONCE_STATUS_PROGRESS,
G_ONCE_STATUS_READY
};
alias _GOnce GOnce;
struct _GOnce {
GOnceStatus status;
gpointer retval;
}
gpointer g_once_impl (GOnce *once, GThreadFunc func, gpointer arg);
void glib_dummy_decl ();
alias _GAsyncQueue GAsyncQueue;
alias void _GAsyncQueue;
GAsyncQueue* g_async_queue_new ();
void g_async_queue_lock (GAsyncQueue *queue);
void g_async_queue_unlock (GAsyncQueue *queue);
void g_async_queue_ref (GAsyncQueue *queue);
void g_async_queue_unref (GAsyncQueue *queue);
void g_async_queue_ref_unlocked (GAsyncQueue *queue);
void g_async_queue_unref_and_unlock (GAsyncQueue *queue);
void g_async_queue_push (GAsyncQueue *queue,
gpointer data);
void g_async_queue_push_unlocked (GAsyncQueue *queue,
gpointer data);
gpointer g_async_queue_pop (GAsyncQueue *queue);
gpointer g_async_queue_pop_unlocked (GAsyncQueue *queue);
gpointer g_async_queue_try_pop (GAsyncQueue *queue);
gpointer g_async_queue_try_pop_unlocked (GAsyncQueue *queue);
gpointer g_async_queue_timed_pop (GAsyncQueue *queue,
GTimeVal *end_time);
gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue,
GTimeVal *end_time);
gint g_async_queue_length (GAsyncQueue *queue);
gint g_async_queue_length_unlocked (GAsyncQueue *queue);
void g_on_error_query ( gchar *prg_name);
void g_on_error_stack_trace ( gchar *prg_name);
alias _GAllocator GAllocator;
alias void _GAllocator;
alias _GMemChunk GMemChunk;
alias void _GMemChunk;
alias _GMemVTable GMemVTable;
gpointer g_malloc (gulong n_bytes);
gpointer g_malloc0 (gulong n_bytes);
gpointer g_realloc (gpointer mem,
gulong n_bytes);
void g_free (gpointer mem);
gpointer g_try_malloc (gulong n_bytes);
gpointer g_try_realloc (gpointer mem,
gulong n_bytes);
struct _GMemVTable {
gpointer (*malloc) (gsize n_bytes);
gpointer (*realloc) (gpointer mem,
gsize n_bytes);
void (*free) (gpointer mem);
gpointer (*calloc) (gsize n_blocks,
gsize n_block_bytes);
gpointer (*try_malloc) (gsize n_bytes);
gpointer (*try_realloc) (gpointer mem,
gsize n_bytes);
}
void g_mem_set_vtable (GMemVTable *vtable);
gboolean g_mem_is_system_malloc ();
GMemVTable *glib_mem_profiler_table;
void g_mem_profile ();
GMemChunk* g_mem_chunk_new ( gchar *name,
gint atom_size,
gulong area_size,
gint type);
void g_mem_chunk_destroy (GMemChunk *mem_chunk);
gpointer g_mem_chunk_alloc (GMemChunk *mem_chunk);
gpointer g_mem_chunk_alloc0 (GMemChunk *mem_chunk);
void g_mem_chunk_free (GMemChunk *mem_chunk,
gpointer mem);
void g_mem_chunk_clean (GMemChunk *mem_chunk);
void g_mem_chunk_reset (GMemChunk *mem_chunk);
void g_mem_chunk_print (GMemChunk *mem_chunk);
void g_mem_chunk_info ();
void g_blow_chunks ();
GAllocator* g_allocator_new ( gchar *name,
guint n_preallocs);
void g_allocator_free (GAllocator *allocator);
alias _GList GList;
struct _GList {
gpointer data;
GList *next;
GList *prev;
}
void g_list_push_allocator (GAllocator *allocator);
void g_list_pop_allocator ();
GList* g_list_alloc ();
void g_list_free (GList *list);
void g_list_free_1 (GList *list);
GList* g_list_append (GList *list,
gpointer data);
GList* g_list_prepend (GList *list,
gpointer data);
GList* g_list_insert (GList *list,
gpointer data,
gint position);
GList* g_list_insert_sorted (GList *list,
gpointer data,
GCompareFunc func);
GList* g_list_insert_before (GList *list,
GList *sibling,
gpointer data);
GList* g_list_concat (GList *list1,
GList *list2);
GList* g_list_remove (GList *list,
gpointer data);
GList* g_list_remove_all (GList *list,
gpointer data);
GList* g_list_remove_link (GList *list,
GList *llink);
GList* g_list_delete_link (GList *list,
GList *link_);
GList* g_list_reverse (GList *list);
GList* g_list_copy (GList *list);
GList* g_list_nth (GList *list,
guint n);
GList* g_list_nth_prev (GList *list,
guint n);
GList* g_list_find (GList *list,
gpointer data);
GList* g_list_find_custom (GList *list,
gpointer data,
GCompareFunc func);
gint g_list_position (GList *list,
GList *llink);
gint g_list_index (GList *list,
gpointer data);
GList* g_list_last (GList *list);
GList* g_list_first (GList *list);
guint g_list_length (GList *list);
void g_list_foreach (GList *list,
GFunc func,
gpointer user_data);
GList* g_list_sort (GList *list,
GCompareFunc compare_func);
GList* g_list_sort_with_data (GList *list,
GCompareDataFunc compare_func,
gpointer user_data);
gpointer g_list_nth_data (GList *list,
guint n);
alias _GCache GCache;
alias void _GCache;
alias gpointer (*GCacheNewFunc) (gpointer key);
alias gpointer (*GCacheDupFunc) (gpointer value);
alias void (*GCacheDestroyFunc) (gpointer value);
GCache* g_cache_new (GCacheNewFunc value_new_func,
GCacheDestroyFunc value_destroy_func,
GCacheDupFunc key_dup_func,
GCacheDestroyFunc key_destroy_func,
GHashFunc hash_key_func,
GHashFunc hash_value_func,
GEqualFunc key_equal_func);
void g_cache_destroy (GCache *cache);
gpointer g_cache_insert (GCache *cache,
gpointer key);
void g_cache_remove (GCache *cache,
gpointer value);
void g_cache_key_foreach (GCache *cache,
GHFunc func,
gpointer user_data);
void g_cache_value_foreach (GCache *cache,
GHFunc func,
gpointer user_data);
alias _GCompletion GCompletion;
alias gchar* (*GCompletionFunc) (gpointer);
alias gint (*GCompletionStrncmpFunc) (gchar *s1,
gchar *s2,
gsize n);
struct _GCompletion {
GList* items;
GCompletionFunc func;
gchar* prefix;
GList* cache;
GCompletionStrncmpFunc strncmp_func;
}
GCompletion* g_completion_new (GCompletionFunc func);
void g_completion_add_items (GCompletion* cmp,
GList* items);
void g_completion_remove_items (GCompletion* cmp,
GList* items);
void g_completion_clear_items (GCompletion* cmp);
GList* g_completion_complete (GCompletion* cmp,
gchar* prefix,
gchar** new_prefix);
GList* g_completion_complete_utf8 (GCompletion *cmp,
gchar* prefix,
gchar** new_prefix);
void g_completion_set_compare (GCompletion *cmp,
GCompletionStrncmpFunc strncmp_func);
void g_completion_free (GCompletion* cmp);
enum GConvertError {
G_CONVERT_ERROR_NO_CONVERSION,
G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
G_CONVERT_ERROR_FAILED,
G_CONVERT_ERROR_PARTIAL_INPUT,
G_CONVERT_ERROR_BAD_URI,
G_CONVERT_ERROR_NOT_ABSOLUTE_PATH
};
GQuark g_convert_error_quark ();
alias _GIConv *GIConv;
alias void _GIConv;
GIConv g_iconv_open ( gchar *to_codeset,
gchar *from_codeset);
size_t g_iconv (GIConv converter,
gchar **inbuf,
gsize *inbytes_left,
gchar **outbuf,
gsize *outbytes_left);
gint g_iconv_close (GIConv converter);
gchar* g_convert ( gchar *str,
gssize len,
gchar *to_codeset,
gchar *from_codeset,
gsize *bytes_read,
gsize *bytes_written,
GError **error);
gchar* g_convert_with_iconv ( gchar *str,
gssize len,
GIConv converter,
gsize *bytes_read,
gsize *bytes_written,
GError **error);
gchar* g_convert_with_fallback ( gchar *str,
gssize len,
gchar *to_codeset,
gchar *from_codeset,
gchar *fallback,
gsize *bytes_read,
gsize *bytes_written,
GError **error);
gchar* g_locale_to_utf8 ( gchar *opsysstring,
gssize len,
gsize *bytes_read,
gsize *bytes_written,
GError **error);
gchar* g_locale_from_utf8 ( gchar *utf8string,
gssize len,
gsize *bytes_read,
gsize *bytes_written,
GError **error);
gchar* g_filename_to_utf8 ( gchar *opsysstring,
gssize len,
gsize *bytes_read,
gsize *bytes_written,
GError **error);
gchar* g_filename_from_utf8 ( gchar *utf8string,
gssize len,
gsize *bytes_read,
gsize *bytes_written,
GError **error);
gchar *g_filename_from_uri ( gchar *uri,
gchar **hostname,
GError **error);
gchar *g_filename_to_uri ( gchar *filename,
gchar *hostname,
GError **error);
alias _GData GData;
alias void _GData;
alias void (*GDataForeachFunc) (GQuark key_id,
gpointer data,
gpointer user_data);
void g_datalist_init (GData **datalist);
void g_datalist_clear (GData **datalist);
gpointer g_datalist_id_get_data (GData **datalist,
GQuark key_id);
void g_datalist_id_set_data_full (GData **datalist,
GQuark key_id,
gpointer data,
GDestroyNotify destroy_func);
gpointer g_datalist_id_remove_no_notify (GData **datalist,
GQuark key_id);
void g_datalist_foreach (GData **datalist,
GDataForeachFunc func,
gpointer user_data);
void g_dataset_destroy (gpointer dataset_location);
gpointer g_dataset_id_get_data (gpointer dataset_location,
GQuark key_id);
void g_dataset_id_set_data_full (gpointer dataset_location,
GQuark key_id,
gpointer data,
GDestroyNotify destroy_func);
gpointer g_dataset_id_remove_no_notify (gpointer dataset_location,
GQuark key_id);
void g_dataset_foreach (gpointer dataset_location,
GDataForeachFunc func,
gpointer user_data);
alias gint32 GTime;
alias guint16 GDateYear;
alias guint8 GDateDay;
alias _GDate GDate;
enum GDateDMY {
G_DATE_DAY = 0,
G_DATE_MONTH = 1,
G_DATE_YEAR = 2
};
enum GDateWeekday {
G_DATE_BAD_WEEKDAY = 0,
G_DATE_MONDAY = 1,
G_DATE_TUESDAY = 2,
G_DATE_WEDNESDAY = 3,
G_DATE_THURSDAY = 4,
G_DATE_FRIDAY = 5,
G_DATE_SATURDAY = 6,
G_DATE_SUNDAY = 7
};
enum GDateMonth {
G_DATE_BAD_MONTH = 0,
G_DATE_JANUARY = 1,
G_DATE_FEBRUARY = 2,
G_DATE_MARCH = 3,
G_DATE_APRIL = 4,
G_DATE_MAY = 5,
G_DATE_JUNE = 6,
G_DATE_JULY = 7,
G_DATE_AUGUST = 8,
G_DATE_SEPTEMBER = 9,
G_DATE_OCTOBER = 10,
G_DATE_NOVEMBER = 11,
G_DATE_DECEMBER = 12
};
struct _GDate {
guint julian_days;
guint julian;
guint dmy;
guint day;
guint month;
guint year;
}
GDate* g_date_new ();
GDate* g_date_new_dmy (GDateDay day,
GDateMonth month,
GDateYear year);
GDate* g_date_new_julian (guint32 julian_day);
void g_date_free (GDate *date);
gboolean g_date_valid ( GDate *date);
gboolean g_date_valid_day (GDateDay day) ;
gboolean g_date_valid_month (GDateMonth month) ;
gboolean g_date_valid_year (GDateYear year) ;
gboolean g_date_valid_weekday (GDateWeekday weekday) ;
gboolean g_date_valid_julian (guint32 julian_date) ;
gboolean g_date_valid_dmy (GDateDay day,
GDateMonth month,
GDateYear year) ;
GDateWeekday g_date_get_weekday ( GDate *date);
GDateMonth g_date_get_month ( GDate *date);
GDateYear g_date_get_year ( GDate *date);
GDateDay g_date_get_day ( GDate *date);
guint32 g_date_get_julian ( GDate *date);
guint g_date_get_day_of_year ( GDate *date);
guint g_date_get_monday_week_of_year ( GDate *date);
guint g_date_get_sunday_week_of_year ( GDate *date);
void g_date_clear (GDate *date,
guint n_dates);