@@ -5150,6 +5150,12 @@ in the macro, so you shouldn't use double quotes.</doc>
5150
5150
</parameter>
5151
5151
</parameters>
5152
5152
</function-macro>
5153
+ <function-macro name="DEPRECATED_ENUMERATOR_IN_2_86_FOR" c:identifier="GLIB_DEPRECATED_ENUMERATOR_IN_2_86_FOR" introspectable="0">
5154
+ <parameters>
5155
+ <parameter name="f">
5156
+ </parameter>
5157
+ </parameters>
5158
+ </function-macro>
5153
5159
<function-macro name="DEPRECATED_FOR" c:identifier="GLIB_DEPRECATED_FOR" introspectable="0">
5154
5160
<parameters>
5155
5161
<parameter name="f">
@@ -5336,6 +5342,12 @@ in the macro, so you shouldn't use double quotes.</doc>
5336
5342
</parameter>
5337
5343
</parameters>
5338
5344
</function-macro>
5345
+ <function-macro name="DEPRECATED_IN_2_86_FOR" c:identifier="GLIB_DEPRECATED_IN_2_86_FOR" introspectable="0">
5346
+ <parameters>
5347
+ <parameter name="f">
5348
+ </parameter>
5349
+ </parameters>
5350
+ </function-macro>
5339
5351
<function-macro name="DEPRECATED_MACRO_FOR" c:identifier="GLIB_DEPRECATED_MACRO_FOR" introspectable="0">
5340
5352
<parameters>
5341
5353
<parameter name="f">
@@ -5522,6 +5534,12 @@ in the macro, so you shouldn't use double quotes.</doc>
5522
5534
</parameter>
5523
5535
</parameters>
5524
5536
</function-macro>
5537
+ <function-macro name="DEPRECATED_MACRO_IN_2_86_FOR" c:identifier="GLIB_DEPRECATED_MACRO_IN_2_86_FOR" introspectable="0">
5538
+ <parameters>
5539
+ <parameter name="f">
5540
+ </parameter>
5541
+ </parameters>
5542
+ </function-macro>
5525
5543
<function-macro name="DEPRECATED_TYPE_FOR" c:identifier="GLIB_DEPRECATED_TYPE_FOR" introspectable="0">
5526
5544
<parameters>
5527
5545
<parameter name="f">
@@ -5708,6 +5726,12 @@ in the macro, so you shouldn't use double quotes.</doc>
5708
5726
</parameter>
5709
5727
</parameters>
5710
5728
</function-macro>
5729
+ <function-macro name="DEPRECATED_TYPE_IN_2_86_FOR" c:identifier="GLIB_DEPRECATED_TYPE_IN_2_86_FOR" introspectable="0">
5730
+ <parameters>
5731
+ <parameter name="f">
5732
+ </parameter>
5733
+ </parameters>
5734
+ </function-macro>
5711
5735
<constant name="DIR_SEPARATOR" value="47" c:type="G_DIR_SEPARATOR">
5712
5736
<doc xml:space="preserve">The directory separator character.
5713
5737
@@ -6132,6 +6156,34 @@ Can return 0 if the day is before the first Sunday of the year.</doc>
6132
6156
</instance-parameter>
6133
6157
</parameters>
6134
6158
</method>
6159
+ <method name="get_week_of_year" c:identifier="g_date_get_week_of_year" version="2.86">
6160
+ <doc xml:space="preserve">Calculates the week of the year during which this date falls.
6161
+
6162
+ The result depends on which day is considered the first day of the week,
6163
+ which varies by locale. Both `date` and `first_day_of_week` must be valid.
6164
+
6165
+ If @date is before the start of the first week of the year (for example,
6166
+ before the first Monday in January if @first_day_of_week is
6167
+ [enum@GLib.DateWeekday.MONDAY]) then zero will be returned.</doc>
6168
+ <return-value transfer-ownership="none">
6169
+ <doc xml:space="preserve">week number (starting from 1), or `0` if @date is before the start
6170
+ of the first week of the year</doc>
6171
+ <type name="guint" c:type="guint"/>
6172
+ </return-value>
6173
+ <parameters>
6174
+ <instance-parameter name="date" transfer-ownership="none">
6175
+ <doc xml:space="preserve">a [struct@GLib.Date]</doc>
6176
+ <type name="Date" c:type="const GDate*"/>
6177
+ </instance-parameter>
6178
+ <parameter name="first_day_of_week" transfer-ownership="none">
6179
+ <doc xml:space="preserve">the day which is considered the first day of the week
6180
+ (for example, this would be [enum@GLib.DateWeekday.SUNDAY] in US locales,
6181
+ [enum@GLib.DateWeekday.MONDAY] in British locales, and
6182
+ [enum@GLib.DateWeekday.SATURDAY] in Egyptian locales</doc>
6183
+ <type name="DateWeekday" c:type="GDateWeekday"/>
6184
+ </parameter>
6185
+ </parameters>
6186
+ </method>
6135
6187
<method name="get_weekday" c:identifier="g_date_get_weekday">
6136
6188
<doc xml:space="preserve">Returns the day of the week for a #GDate. The date must be valid.</doc>
6137
6189
<return-value transfer-ownership="none">
@@ -6534,6 +6586,34 @@ one of the extra days happens to be a Sunday.)</doc>
6534
6586
</parameter>
6535
6587
</parameters>
6536
6588
</function>
6589
+ <function name="get_weeks_in_year" c:identifier="g_date_get_weeks_in_year" version="2.86">
6590
+ <doc xml:space="preserve">Calculates the number of weeks in the year.
6591
+
6592
+ The result depends on which day is considered the first day of the week,
6593
+ which varies by locale. `first_day_of_week` must be valid.
6594
+
6595
+ The result will be either 52 or 53. Years always have 52 seven-day periods,
6596
+ plus one or two extra days depending on whether it’s a leap year. This
6597
+ function effectively calculates how many @first_day_of_week days there are in
6598
+ the year.</doc>
6599
+ <return-value transfer-ownership="none">
6600
+ <doc xml:space="preserve">the number of weeks in @year</doc>
6601
+ <type name="guint8" c:type="guint8"/>
6602
+ </return-value>
6603
+ <parameters>
6604
+ <parameter name="year" transfer-ownership="none">
6605
+ <doc xml:space="preserve">year to count weeks in</doc>
6606
+ <type name="DateYear" c:type="GDateYear"/>
6607
+ </parameter>
6608
+ <parameter name="first_day_of_week" transfer-ownership="none">
6609
+ <doc xml:space="preserve">the day which is considered the first day of the week
6610
+ (for example, this would be [enum@GLib.DateWeekday.SUNDAY] in US locales,
6611
+ [enum@GLib.DateWeekday.MONDAY] in British locales, and
6612
+ [enum@GLib.DateWeekday.SATURDAY] in Egyptian locales</doc>
6613
+ <type name="DateWeekday" c:type="GDateWeekday"/>
6614
+ </parameter>
6615
+ </parameters>
6616
+ </function>
6537
6617
<function name="is_leap_year" c:identifier="g_date_is_leap_year">
6538
6618
<doc xml:space="preserve">Returns %TRUE if the year is a leap year.
6539
6619
@@ -15345,7 +15425,7 @@ linked against at application run time.</doc>
15345
15425
<doc xml:space="preserve">The minimum value which can be held in a #gint8.</doc>
15346
15426
<type name="gint8" c:type="gint8"/>
15347
15427
</constant>
15348
- <constant name="MINOR_VERSION" value="84 " c:type="GLIB_MINOR_VERSION">
15428
+ <constant name="MINOR_VERSION" value="85 " c:type="GLIB_MINOR_VERSION">
15349
15429
<doc xml:space="preserve">The minor version number of the GLib library.
15350
15430
15351
15431
Like #gtk_minor_version, but from the headers used at
@@ -39749,6 +39829,19 @@ Here is an example for iterating with g_variant_iter_next_value():
39749
39829
<record name="VariantType" c:type="GVariantType" opaque="1" version="2.24" glib:type-name="GVariantType" glib:get-type="g_variant_type_get_gtype" c:symbol-prefix="variant_type">
39750
39830
<doc xml:space="preserve">A type in the [type@GLib.Variant] type system.
39751
39831
39832
+ [type@GLib.Variant] types are represented as strings, but have a strict
39833
+ syntax described below. All [type@GLib.VariantType]s passed to GLib must be
39834
+ valid, and they are typically expected to be static (i.e. not provided by
39835
+ user input) as they determine how binary [type@GLib.Variant] data is
39836
+ interpreted.
39837
+
39838
+ To convert a static string to a [type@GLib.VariantType] in C, use the
39839
+ [func@GLib.VARIANT_TYPE] casting macro. When GLib is compiled with checks
39840
+ enabled, it will validate the type. To check if an arbitrary string is a
39841
+ valid [type@GLib.VariantType], use [func@GLib.VariantType.string_is_valid].
39842
+
39843
+ ## GVariant Type System
39844
+
39752
39845
This section introduces the [type@GLib.Variant] type system. It is based, in
39753
39846
large part, on the D-Bus type system, with two major changes and
39754
39847
some minor lifting of restrictions. The
@@ -43206,6 +43299,30 @@ artifact and the argument passed to it should not be `volatile`.</doc>
43206
43299
</parameter>
43207
43300
</parameters>
43208
43301
</function>
43302
+ <function name="bit_lock_and_get" c:identifier="g_bit_lock_and_get" version="2.86">
43303
+ <doc xml:space="preserve">Sets the indicated @lock_bit in @address and atomically returns the new value.
43304
+
43305
+ This is like [func@GLib.bit_lock], except it can atomically return the new value at
43306
+ @address (right after obtaining the lock). Thus the value returned in @out_val
43307
+ always has the @lock_bit set.</doc>
43308
+ <return-value transfer-ownership="none">
43309
+ <type name="none" c:type="void"/>
43310
+ </return-value>
43311
+ <parameters>
43312
+ <parameter name="address" transfer-ownership="none">
43313
+ <doc xml:space="preserve">a pointer to an integer</doc>
43314
+ <type name="gint" c:type="gint*"/>
43315
+ </parameter>
43316
+ <parameter name="lock_bit" transfer-ownership="none">
43317
+ <doc xml:space="preserve">a bit value between 0 and 31</doc>
43318
+ <type name="guint" c:type="guint"/>
43319
+ </parameter>
43320
+ <parameter name="out_val" direction="out" caller-allocates="0" transfer-ownership="full" optional="1" allow-none="1">
43321
+ <doc xml:space="preserve">return location for the new value of the integer</doc>
43322
+ <type name="gint" c:type="gint*"/>
43323
+ </parameter>
43324
+ </parameters>
43325
+ </function>
43209
43326
<function name="bit_nth_lsf" c:identifier="g_bit_nth_lsf">
43210
43327
<doc xml:space="preserve">Find the position of the first bit set in @mask, searching
43211
43328
from (but not including) @nth_bit upwards. Bits are numbered
@@ -43315,6 +43432,36 @@ artifact and the argument passed to it should not be `volatile`.</doc>
43315
43432
</parameter>
43316
43433
</parameters>
43317
43434
</function>
43435
+ <function name="bit_unlock_and_set" c:identifier="g_bit_unlock_and_set" version="2.86">
43436
+ <doc xml:space="preserve">This is like [func@GLib.bit_unlock]() but also atomically sets @address to
43437
+ @val.
43438
+
43439
+ If @preserve_mask is not zero, then the @preserve_mask bits will be
43440
+ preserved in @address and are not set to @val.
43441
+
43442
+ Note that the @lock_bit bit will be always unset regardless of
43443
+ @val, @preserve_mask and the currently set value in @address.</doc>
43444
+ <return-value transfer-ownership="none">
43445
+ <type name="none" c:type="void"/>
43446
+ </return-value>
43447
+ <parameters>
43448
+ <parameter name="address" transfer-ownership="none">
43449
+ <doc xml:space="preserve">a pointer to an integer</doc>
43450
+ <type name="gint" c:type="gint*"/>
43451
+ </parameter>
43452
+ <parameter name="lock_bit" transfer-ownership="none">
43453
+ <doc xml:space="preserve">a bit value between 0 and 31</doc>
43454
+ <type name="guint" c:type="guint"/>
43455
+ </parameter>
43456
+ <parameter name="new_val" transfer-ownership="none">
43457
+ <type name="gint" c:type="gint"/>
43458
+ </parameter>
43459
+ <parameter name="preserve_mask" transfer-ownership="none">
43460
+ <doc xml:space="preserve">mask for bits from @address to preserve</doc>
43461
+ <type name="gint" c:type="gint"/>
43462
+ </parameter>
43463
+ </parameters>
43464
+ </function>
43318
43465
<function name="blow_chunks" c:identifier="g_blow_chunks">
43319
43466
<return-value transfer-ownership="none">
43320
43467
<type name="none" c:type="void"/>
@@ -45520,6 +45667,34 @@ one of the extra days happens to be a Sunday.)</doc>
45520
45667
</parameter>
45521
45668
</parameters>
45522
45669
</function>
45670
+ <function name="date_get_weeks_in_year" c:identifier="g_date_get_weeks_in_year" moved-to="Date.get_weeks_in_year" version="2.86">
45671
+ <doc xml:space="preserve">Calculates the number of weeks in the year.
45672
+
45673
+ The result depends on which day is considered the first day of the week,
45674
+ which varies by locale. `first_day_of_week` must be valid.
45675
+
45676
+ The result will be either 52 or 53. Years always have 52 seven-day periods,
45677
+ plus one or two extra days depending on whether it’s a leap year. This
45678
+ function effectively calculates how many @first_day_of_week days there are in
45679
+ the year.</doc>
45680
+ <return-value transfer-ownership="none">
45681
+ <doc xml:space="preserve">the number of weeks in @year</doc>
45682
+ <type name="guint8" c:type="guint8"/>
45683
+ </return-value>
45684
+ <parameters>
45685
+ <parameter name="year" transfer-ownership="none">
45686
+ <doc xml:space="preserve">year to count weeks in</doc>
45687
+ <type name="DateYear" c:type="GDateYear"/>
45688
+ </parameter>
45689
+ <parameter name="first_day_of_week" transfer-ownership="none">
45690
+ <doc xml:space="preserve">the day which is considered the first day of the week
45691
+ (for example, this would be [enum@GLib.DateWeekday.SUNDAY] in US locales,
45692
+ [enum@GLib.DateWeekday.MONDAY] in British locales, and
45693
+ [enum@GLib.DateWeekday.SATURDAY] in Egyptian locales</doc>
45694
+ <type name="DateWeekday" c:type="GDateWeekday"/>
45695
+ </parameter>
45696
+ </parameters>
45697
+ </function>
45523
45698
<function name="date_is_leap_year" c:identifier="g_date_is_leap_year" moved-to="Date.is_leap_year">
45524
45699
<doc xml:space="preserve">Returns %TRUE if the year is a leap year.
45525
45700
@@ -51814,8 +51989,8 @@ only use this on the lowest bits.</doc>
51814
51989
<parameter name="preserve_mask" transfer-ownership="none">
51815
51990
<doc xml:space="preserve">if non-zero, those bits of the current pointer in @address
51816
51991
are preserved.
51817
- Note that the @lock_bit bit will be always set according to @set,
51818
- regardless of @preserve_mask and the currently set value in @address.</doc>
51992
+ Note that the @lock_bit bit will be always unset regardless of
51993
+ @ptr, @preserve_mask and the currently set value in @address.</doc>
51819
51994
<type name="guintptr" c:type="guintptr"/>
51820
51995
</parameter>
51821
51996
</parameters>
@@ -53594,12 +53769,15 @@ in contrast to g_set_application_name().
53594
53769
If you are using #GApplication the program name is set in
53595
53770
g_application_run(). In case of GDK or GTK it is set in
53596
53771
gdk_init(), which is called by gtk_init() and the
53597
- #GtkApplication::startup handler. The program name is found by
53598
- taking the last component of @argv[0].
53772
+ #GtkApplication::startup handler. By default, the program name is
53773
+ found by taking the last component of @argv[0].
53599
53774
53600
53775
Since GLib 2.72, this function can be called multiple times
53601
53776
and is fully thread safe. Prior to GLib 2.72, this function
53602
- could only be called once per process.</doc>
53777
+ could only be called once per process.
53778
+
53779
+ See the [GTK documentation](https://docs.gtk.org/gtk4/migrating-3to4.html#set-a-proper-application-id)
53780
+ for requirements on integrating g_set_prgname() with GTK applications.</doc>
53603
53781
<return-value transfer-ownership="none">
53604
53782
<type name="none" c:type="void"/>
53605
53783
</return-value>
0 commit comments