Releases: gircore/gir.core
0.8.0-preview.1
This release is the first preview of the upcoming 0.8.0 release. To get an overview of the planned features of the 0.8.0 release please see the corresponding milestone.
Important
This release includes GTK composite support which is a major milestone for the GirCore project. To reach this goal there were some breaking changes necessary. Those mainly affect the usage of Gtk.Builder, the creation of subclasses and to a lesser extent the creation of native classes. In total those changes are a first step to allow deeper integration with the GObject type system.
The API was held as backwards compatible as possible. Warnings are raised for APIs which will be removed in a later release (0.9.0). Please read ahead carefully to get an overview of the breaking changes and how to resolve them.
As the deeper GObject integration required modifications in the memory management code, there might be memory related bugs. If anything comes up please open an issue.
Noteworthy
- Feature: Composite template support, details below (#1405, #1395, #1425, #1419, #1442, #1437, #1455, #1466)
- Feature: New GdkWayland-4.0 nuget packages (#1423)
- Feature:
out/refenums are now supported (#1459) - Feature:
outopaque typed records are now supported (#1463) - Sample: New dropdown sample (#1428)
- Sample: New async-UI sample (#1461)
Breaking changes
The following sections describe the breaking changes and how to solve them. A more detailed explanation why the breaking changes are necessary can be found in the explanation of the diagnostic message 1007. Issue 1441 describes the available feature set between versions.
Instance creation
Since the beginning of GirCore constructors of GObjects were rendered as static factory methods. There is one exception: It is possible to create instances with a parameterless constructor or an array of ConstructArgument. As GObject itself expects all objects to be creatable without a parameterized class specific constructor this public constructor will be marked as obsolete and a new factory method will be rendered as an alternative. This means the API is not yet removed but its usage is discouraged as the deeper integration with GObject requires a workaround to make it work.
var obj = new MyObject(); // GirCore 1007 warning
var obj = new MyObject([]); // GirCore 1007 warning
var obj = MyObject.NewWithProperties([]); //No warningSubclasses
To make subclasses work they will rely on source generators to integrate dotnet deeply with the GObject type system. This requires some unsafe code to be rendered as C will call directly into dotnet code. For this to work projects using GObject based subclasses must set <AllowUnsafeBlocks>true</AllowUnsafeBlocks> in their csproj files.
The creation of subclasses includes several scenarios. The classic dotnet way of subclassing via a parent parameterless constructor now raises a warning. Please note that the Initialize method is called always if an instance of the subclass is created. Even if the instance is created by the GObject type system itself. Therefore it is safe to mark the member _value as not null.
public class MyObject : GObject.Object
{
private string _value;
public MyObject() // GirCore 1007 warning
{
_value = "test";
}
}
[GObject.Subclass<GObject.Object>]
public partial class MyObject
{
private string _value;
[MemberNotNull(nameof(_value))]
partial void Initialize() // No warning
{
_value = "test";
}
}For code that uses parameterized constructors without the GObject.SubclassAttribute a warning is emitted. Please note that _value got nullable in the reworked code. This is a direct result from the deeper GObject integration as GObject requires objects to be creatable without any explicit parameterized constructor.
public class MyObject : GObject.Object
{
private string _value;
public MyObject(string value) // GirCore 1007 warning
{
_value = value;
}
}
[GObject.Subclass<GObject.Object>]
public partial class MyObject
{
private string? _value;
public static MyObject NewWithValue(string value) // No warning
{
var obj = MyObject.NewWithProperties([]);
obj._value = value;
return obj;
}
}Code that already used the GObject.SubclassAttribute with a parameterized constructor must migrate as this() is not available anymore.
//Emits a compiler error
[GObject.Subclass<GObject.Object>]
public partial class MyObject
{
private string _value;
public MyObject(string value) : this()
{
_value = value;
}
}
//Emits no compiler error, uses a static factory method
[GObject.Subclass<GObject.Object>]
public partial class MyObject
{
private string? _value;
public static MyObject NewWithValue(string value)
{
var obj = MyObject.NewWithProperties([]);
obj._value = value;
return obj;
}
}Gtk.Builder and composite templates
To create some Gtk UI based on XML templates GirCore used Gtk.Builder. The user was required to inject instances created by Gtk.Builder into the dependency chain with some internal code needed to make it work at all. The deeper integration with the GObject type system in combination with composite template support allows to write UI classes like they should be.
Any Gtk.Builder based view classes must be migrated as the deeper type system integration does not support injecting arbitrary pointers without resulting memory management issues. Additionally Gtk.Builder implementation in GirCore does not connect members anymore. It is just doing what it was intended for: Creating Gtk.Widget hierarchies from a given XML file. The composite template support is a replacement for the original advertised workaround to mimic composite template like behaviour with Gtk.Builder.
Please note that the Gtk.Label in the composite sample must not be marked as nullable. The Gtk.Connect attributes tells the source generator that the member will be initialized by the template so it generates the MemberNotNullAttribute automatically in the background.
Another improvement over the Gtk.Builder variant is that Gtk.Template allows to specify a Gtk.TemplateLoader. Gtk.AssemblyResource is a Gtk.TemplateLoader which expects template files to be available as a dotnet assembly resource. By implementing a custom Gtk.TemplateLoader it is possible to load composite templates from any location.
Gtk.Subclass gained a new optional prameter: qualifiedName. This allows to specify the native name of the subclass. It makes it easier to reference the class in template files. If no qualifiedName is supplied the generated native class name is [namespace].[classname]. If the qualifiedName is set the generated native class name is [qualifiedName].
For a complete working sample of composite widgets please see the samples in the repository.
// Old Gtk.Builder way
public class SampleTestDialog : Gtk.Dialog
{
[Gtk.Connect("my_label")]
private readonly Gtk.Label _label;
private SampleTestDialog(Gtk.Builder builder, string name) : base(new Gtk.Internal.DialogHandle(builder.GetPointer(name), false))
{
builder.Connect(this);
_label.Label_ = "With support for connected members!";
}
public SampleTestDialog() : this(new Gtk.Builder("SampleTestDialog.ui"), "dialog")
{
}
}
//New Gtk composite templates
[GObject.Subclass<Gtk.Dialog>(qualifiedName: nameof(SampleTestDialog))]
[Gtk.Template<Gtk.AssemblyResource>("SampleTestDialog.ui")]
public partial class SampleTestDialog
{
[Gtk.Connect("my_label")]
private Gtk.Label _label;
partial void Initialize()
{
_label.Label_ = "With support for connected members!";
}
}That's all for 0.8.0-preview.1. A big thanks goes to all contributors which made this release possible through code contributions and providing feedback through issues or the matrix channel.
What's Changed
- Extract SoruceGenerator common functions by @badcel in #1405
- GObject-2.0.Integration: Block generic subclass support by @badcel in #1409
- Composite template support by @badcel in #1395
- GdkWayland-4.0 by @pancakesmeow in #1423
- #1421 Removed multiple Initialize calls by @mirthestam in #1425
- GTK composite template: Allow to connect members by @badcel in #1419
- Added GirCore1005 analyser by @hol430 in #1426
- GObject-2.0.Integration: Add GirCore1005 documentation by @badcel in #1434
- DropDown sample application by @kashifsoofi in #1428
- Gtk-4.0.Integration: Add analyzer rules to support composite templates by @badcel in #1442
- GObject: Log failed toggle notify in debug mode by @badcel in #1445
- Bump MSTest from 4.0.2 to 4.1.0 by @dependabot[bot] in #1452
- Manually set instance cache during object creation by @badcel in #1437
...
0.7.0
This is the first release of 0.7.0.
Please be aware that there are some breaking changes:
- Due to improved API generation
string[]parameters may not need an explicit size parameter anymore. Gst.Application.Initwas removed. Gstreamer does not provide anApplicationclass. This was a relict from the very beginning of the project and was a result of missing binding forgst_initwhich is now available asGst.Functions.Init.
There is a new ecosystem page on the homepage. Anyone interested in promoting their GirCore related library is welcome to open a pull request.
Noteworthy
Since 0.7.0-preview.3
- Fix:
Gtk.FontDialog.ChooseFaceAsync(#1350) - Fix:
InvalidCastExceptionon certain APIs (#1331) - Feature: Improved
Glib.PtrArraysupport (#1349, #1361) thanks @alansartorio - Feature: Dotnet 10 support (#1370 based on work from @kashifsoofi)
- Feature: Bindings for
GdkWin32(#1359) - Feature: Add
Gtk.CustomSorter.New<T>as a generic variant ofGtk.CustomSorter.New. See samples for usage (#1375) - Fix + Feature: Improved generation of native non null termainted string arrays. The public API does not require a length parameter anymore as the length is determined automatically. This changes allows to generate more string array related APIs. (#1379)
0.7.0-preview.3
- Feature: Add support for the GNOME 49 SDK including GTK 4.20 and libadwaita 1.8.
- Fix: Properties of type
Longare now always working as expected (#1311) - Feature: First steps to improve support for native
GLib.SList. See the unit tests for example usage (#1317) - Feature: New Pango methods and constants which are not available in the GIR file (#1320, #1321)
- Feature: Allow a
Cairo.ImageSurfaceto be directly created fromGLib.Bytes(#1322)
0.7.0-preview.2
- Signals which are part of an interface are now available in the bindings (#1302).
- A new convenience function to retrieve a
GLib.Bytesregion asReadOnlySpan(#1306). - Thanks to @czirok for adding bindings for librsvg (#1263).
- Thanks to @toomasz for adding bindings for GstApp which is part of GStreamer (#1276).
- Thanks to @AeonLucid for contributing support for callbacks which are nested in classes (#1290).
- Thanks to @UrtsiSantsi and @kashifsoofi for their ongoing support of the project.
0.7.0-preview.1
- Update to GNOME 48 which includes GTK 4.18 and libadwaita 1.7 (#1237).
- Bindings for libsecret are now available as a nuget package (#1236).
- The gir.core SynchronizationContext now implements the
Sendmethod allowing users to dispatch actions into the main thread (#1222). - Several bug fixes and improvements in regard to closures and signal handling (#1238, #1247, #1248)
- A bug fix which allows to properly set
uint64based properties (#1259).
What's Changed
- Update documentation by @badcel in #1206
- Build: Add new F# script to determine current version number by @badcel in #1207
- Move dotnet properties outside src folder by @badcel in #1208
- Move F# scripts to scripts folder by @badcel in #1209
- Release: Automatically create Github release by @badcel in #1210
- Fix auto release by @badcel in #1211
- Auto release: Install github cli tool by @badcel in #1212
- Auto release: Add nuget packages by @badcel in #1213
- Auto release: fix nuget path by @badcel in #1214
- Auto release: List nuget files relative to source path by @badcel in #1216
- Auto release: Add working directory as safe by @badcel in #1217
- Auto release: Integrate into CI by @badcel in #1218
- MainLoopSynchronizationContext: Implement Send by @badcel in #1222
- Add and use in tests platform attribute by @UrtsiSantsi in #1235
- Update to GNOME SDK 48 by @badcel in #1237
- Add GirCore.Secret with libsecret support by @czirok in #1236
- Add Pinta, fixes #1233 by @UrtsiSantsi in #1241
- Secret: Add sample to list collections by @badcel in #1242
- Closure: Bind closure to object lifetime by @badcel in #1238
- TypedRecords: Remove public OnDispose method by @badcel in #1246
- GObject: Move closure handling into safehandle by @badcel in #1247
- Add fixer for record-field name collision by @czirok in #1249
- Remove Parabolic from App list by @Lemon73-Computing in #1253
- CI: Introduce dependabot multi directory config by @Lemon73-Computing in #1254
- Rework Closures by @badcel in #1248
- Add missing support for ulong in GObject.Value to fix property accessors by @cameronwhite in #1259
- Bump version to 0.7.0 by @badcel in #1260
- Update gir files by @badcel in #1261
- CI: Install github cli by @badcel in #1262
- Rsvg-2.0.gir by @czirok in #1263
- Update gir files by @github-actions[bot] in #1194
- Update gir files by @github-actions[bot] in #1268
- Improve size based string array support by @badcel in #1225
- Add GstApp project by @toomasz in #1276
- Add ecosystem page by @badcel in #1283
- Add flatpak as a Linux app distribution framework by @UrtsiSantsi in #1285
- Add support for callbacks nested in classes by @AeonLucid in #1290
- #1148: Replace FluentAssertions with AwesomeAssertions by @kashifsoofi in #1293
- Implement interface signals by @badcel in #1279
- Support signals with parameter types from GLib by @badcel in #1302
- GLib.Bytes: Add GetRegionSpan method by @badcel in #1306
- Rename existing Long-Testers by @badcel in #1309
- Rename long tester by @badcel in #1312
- Properly support Long / ULong / Int64 / UInt64 properties by @badcel in #1311
- Add GObject.Object to generic type constraint of instance factory/wrapper by @ousnius in #1316
- GLib.SList: Add IEnumerable and related extensions by @ousnius in #1317
- Add Pango CSS scale factor constants by @ousnius in #1321
- Fix typo in exception for TypedRecord ParameterConverter by @ousnius in #1323
- Add Pango unit conversion/rounding functions from C function macros by @ousnius in #1320
- Generate methods with typed records as out parameter (non-nullable, no transfer) by @ousnius in #1324
- Cairo: Support ImageSurface for data by @badcel in #1322
- Bump AwesomeAssertions from 9.1.0 to 9.2.0 by @dependabot[bot] in #1326
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in #1300
- Bump AwesomeAssertions from 9.2.0 to 9.2.1 by @dependabot[bot] in #1333
- Update to GNOME 49 by @badcel in #1336
- First steps to support GLib.PtrArray by @badcel in #1349
- Fix: Choose face async by @badcel in #1350
- Track unit tests by @badcel in #1352
- Bump actions/checkout from 5 to 6 by @dependabot[bot] in #1348
- Update nugets by @badcel in #1353
- Add support for Prerequisites by @badcel in #1331
- GirCore1002: Do not raise false positive on static constructor by @badcel in #1357
- Remove buildalyzer dependency by @badcel in #1362
- Bump actions/download-artifact from 4 to 6 by @dependabot[bot] in #1360
- Glib ptr array function bindings by @badcel in #1361
- Support dotnet 10.0 by @badcel in #1370
- #1215: Migrate to slnx solution file format b...
0.7.0-preview.3
This release is the third preview of the upcoming 0.7.0 release. To get an overview of the planned features of the 0.7.0 release please see the corresponding milestone.
This release adds support for the GNOME 49 SDK including GTK 4.20 and libadwaita 1.8.
Noteworthy
- Fix: Properties of type
Longare now always working as expected (#1311) - Feature: First steps to improve support for native
GLib.SList. See the unit tests for example usage (#1317) - Feature: New Pango methods and constants which are not available in the GIR file (#1320, #1321)
- Feature: Allow a
Cairo.ImageSurfaceto be directly created fromGLib.Bytes(#1322)
What's Changed
- Rename existing Long-Testers by @badcel in #1309
- Rename long tester by @badcel in #1312
- Properly support Long / ULong / Int64 / UInt64 properties by @badcel in #1311
- Add GObject.Object to generic type constraint of instance factory/wrapper by @ousnius in #1316
- GLib.SList: Add IEnumerable and related extensions by @ousnius in #1317
- Add Pango CSS scale factor constants by @ousnius in #1321
- Fix typo in exception for TypedRecord ParameterConverter by @ousnius in #1323
- Add Pango unit conversion/rounding functions from C function macros by @ousnius in #1320
- Generate methods with typed records as out parameter (non-nullable, no transfer) by @ousnius in #1324
- Cairo: Support ImageSurface for data by @badcel in #1322
- Bump AwesomeAssertions from 9.1.0 to 9.2.0 by @dependabot[bot] in #1326
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in #1300
- Bump AwesomeAssertions from 9.2.0 to 9.2.1 by @dependabot[bot] in #1333
- Update to GNOME 49 by @badcel in #1336
New Contributors
Full Changelog: 0.7.0-preview.2...0.7.0-preview.3
0.7.0-preview.2
This release is the second preview of the upcoming 0.7.0 release. To get an overview of the planned features of the 0.7.0 release please see the corresponding milestone.
Noteworthy
- Signals which are part of an interface are now available in the bindings (#1302).
- A new convenience function to retrieve a
GLib.Bytesregion asReadOnlySpan(#1306). - Thanks to @czirok for adding bindings for librsvg (#1263).
- Thanks to @toomasz for adding bindings for GstApp which is part of GStreamer (#1276).
- Thanks to @AeonLucid for contributing support for callbacks which are nested in classes (#1290).
- Thanks to @UrtsiSantsi and @kashifsoofi for their ongoing support of the project.
What's Changed
- Rsvg-2.0.gir by @czirok in #1263
- Update gir files by @github-actions[bot] in #1194
- Update gir files by @github-actions[bot] in #1268
- Improve size based string array support by @badcel in #1225
- Add GstApp project by @toomasz in #1276
- Add ecosystem page by @badcel in #1283
- Add flatpak as a Linux app distribution framework by @UrtsiSantsi in #1285
- Add support for callbacks nested in classes by @AeonLucid in #1290
- #1148: Replace FluentAssertions with AwesomeAssertions by @kashifsoofi in #1293
- Implement interface signals by @badcel in #1279
- Support signals with parameter types from GLib by @badcel in #1302
- GLib.Bytes: Add GetRegionSpan method by @badcel in #1306
New Contributors
- @toomasz made their first contribution in #1276
- @AeonLucid made their first contribution in #1290
Full Changelog: 0.7.0-preview.1...0.7.0-preview.2
0.7.0-preview.1
This release is the first preview of the upcoming 0.7.0 release. To get an overview of the planned features of the 0.7.0 release please see the corresponding milestone.
Noteworthy
- Update to GNOME 48 which includes GTK 4.18 and libadwaita 1.7 (#1237).
- Bindings for libsecret are now available as a nuget package (#1236).
- The gir.core SynchronizationContext now implements the
Sendmethod allowing users to dispatch actions into the main thread (#1222). - Several bug fixes and improvements in regard to closures and signal handling (#1238, #1247, #1248)
- A bug fix which allows to properly set
uint64based properties (#1259).
What's Changed
- Update documentation by @badcel in #1206
- Build: Add new F# script to determine current version number by @badcel in #1207
- Move dotnet properties outside src folder by @badcel in #1208
- Move F# scripts to scripts folder by @badcel in #1209
- Release: Automatically create Github release by @badcel in #1210
- Fix auto release by @badcel in #1211
- Auto release: Install github cli tool by @badcel in #1212
- Auto release: Add nuget packages by @badcel in #1213
- Auto release: fix nuget path by @badcel in #1214
- Auto release: List nuget files relative to source path by @badcel in #1216
- Auto release: Add working directory as safe by @badcel in #1217
- Auto release: Integrate into CI by @badcel in #1218
- MainLoopSynchronizationContext: Implement Send by @badcel in #1222
- Add and use in tests platform attribute by @UrtsiSantsi in #1235
- Update to GNOME SDK 48 by @badcel in #1237
- Add GirCore.Secret with libsecret support by @czirok in #1236
- Add Pinta, fixes #1233 by @UrtsiSantsi in #1241
- Secret: Add sample to list collections by @badcel in #1242
- Closure: Bind closure to object lifetime by @badcel in #1238
- TypedRecords: Remove public OnDispose method by @badcel in #1246
- GObject: Move closure handling into safehandle by @badcel in #1247
- Add fixer for record-field name collision by @czirok in #1249
- Remove Parabolic from App list by @Lemon73-Computing in #1253
- CI: Introduce dependabot multi directory config by @Lemon73-Computing in #1254
- Rework Closures by @badcel in #1248
- Add missing support for ulong in GObject.Value to fix property accessors by @cameronwhite in #1259
- Bump version to 0.7.0 by @badcel in #1260
- Update gir files by @badcel in #1261
- CI: Install github cli by @badcel in #1262
New Contributors
- @czirok made their first contribution in #1236
- @Lemon73-Computing made their first contribution in #1253
Full Changelog: 0.6.3...0.7.0-preview.1
0.6.3
This is a follow up release to 0.6.2. This release adds some missing bits to GObject-2.0.Integration, adds IDisposable support on interfaces and fixes a bug in several async methods.
Noteworthy
- GObject-2.0.Integration: Subclassing now supports global namespaces (#1188)
- GObject-2.0.Integration: Generates a
partial Initialize()method to allow custom initialization of an object no matter if it is created by dotnet or C code. (#1189). See the Gridview-Sample to see how to use the new method. - Several GTK
asyncmethods now support a nullable parent window (#1199) - Interfaces implement
IDisposable(#1203)
What's Changed
- GObject.Object: Make "Dispose" method virtual again by @badcel in #1182
- Fix code format by @badcel in #1186
- GObject-2.0.Integration: Support global namespace by @badcel in #1188
- Remove UTF8 BOM by @badcel in #1197
- Allow NULL parent window in async dialog functions by @CommonGuy in #1199
- GObject-2.0.Integration: Improve subclass initialization by @badcel in #1189
- Interfaces should implement IDisposable by @badcel in #1203
New Contributors
- @CommonGuy made their first contribution in #1199
Full Changelog: 0.6.2...0.6.3
0.6.2
This is a follow up release to preview.1. Please be aware that this release includes several breaking changes.
The release 0.6.0 / 0.6.1 were skipped as there were problems with the publishing of the nugets:
- For 0.6.0 the new
GObject-2.0.Integrationpackage had an empty symbol package which resulted in an upload error. - For 0.6.1 there were nuget packages created for the tutorial projects which were missing nuget informations thus resulting in an upload error.
The partially uploaded packages got unlisted. This is the reason why this release has the version number 0.6.2.
Noteworthy
Since 0.6.0-preview.1
- Support for .NET 9.0 added. Support for .NET 6.0 and .NET 7.0 got removed.
- Rework of the
GObject.Objectinstantiation process. Those changes remove the reflection code for object instantiation and subclassing. This brings NativeAOT support a lot closer. - Internal: Support individual SafeHandles for classes allowing to report native memory consumption. This improves the garbage collection behavior of the dotnet runtime as classes like
Gdk.Pixbuftend to reference large portions of native memory.
0.6.0-preview.1
- Update to GNOME 47 which includes GTK 4.16 and libadwaita 1.6.
- The dummy implementation of
INotifyPropertyChangedonGObject.Objectwas removed. - Propertydefinitions have a new
Notify/Unnotifymethod which simplifies registration for property specific notifications. For details see the FAQ. - The size of the C
longdatatype on windows is now always 32 bit. On unix it corresponds to 64 / 32 bit depending on the system architecture. In earlier releases it was always 64 bit which was only correct for 64 bit unix systems. - The size of C
gsizeis now equivalent tonint. In earlier releases it was equal tolongwhich was wrong on 32 bit based systems. - Fixed implementation of the memory pressure feature of records. In earlier releases memory pressure was only removed if
Disposewas called. Now memory pressure is released automatically for records. The feature is not yet implemented for classes and will be part the full 0.6.0 release. - First steps to publish the GirCore generator as a
dotnet tool.
Breaking changes
Changed public APIs
- Obsolete interface
GLib.IHandlegot removed - Obsolete interface
GObject.IObjectgot removed GObject.Objectnew primary constructor requires aObjectHandle.protectedconstructors usingConstructArgument[]orIntPtrgot removed.GObject.Objectmethodprotected virtual void Initialize()got removed. To execute instance initialization either use a custom constructor or customObjectHandle.GdkPixbuf.PixbufLoader.FromBytesgot removed as it was a purely cosmetic helper function which is not available as native code. The following code shows the corresponding code to recreate the original behavior:
using var bytes = Bytes.New(data);
var pixbufLoader = PixbufLoader.New();
pixbufLoader.WriteBytes(bytes);
pixbufLoader.Close();
var pixbuf = pixbufLoader.GetPixbuf() ?? throw new Exception("No pixbuf loaded");Subclass changes
To implement reflection free instantiation and subclassing the data which the reflection based code retrieved during runtime must be available during compile time to register the class with the GObject typesystem. This is done automatically for all classes which are part of the GirCore nuget packages. If custom classes inherit from some GObject.Object this code must be written otherwise the new class is not properly registered with the GObject typesystem.
The boiler plate code needed to properly register a class can be completly avoided if the new nuget package GObject-2.0.Integration is used. This package provides a source generator which generates the needed code if the SubclassAttribute is set on the custom GObject subclass. Please see the following sample and refer to the FAQ:
[Subclass<GObject.Object>]
public partial class Data
{
public string? MyString { get; set; }
public Data(string myString) : this()
{
MyString = myString;
}
}What's Changed
- Remove INotifyPropertyChanged by @badcel in #1061
- Property: Add Notify / Unnotify methods by @badcel in #1062
- Improve long handling for structs by @badcel in #1065
- Remove duplicate semicolon in return statements by @adamreeve in #1068
- Map "gssize" to native integers by @badcel in #1069
- Improve long handling 2 by @badcel in #1067
- Add nullable annotation to nullable string array parameters in internal methods by @adamreeve in #1079
- Disable rendering code for repositories only required via includes by @adamreeve in #1086
- documenting System.DllNotFoundException troubleshooting by @lamg in #1085
- Improve struct freeing by @badcel in #1072
- Improve logging by @badcel in #1093
- Support loading repositories from files embedded as resources in GirTool by @adamreeve in #1091
- Readme: Update status by @badcel in #1096
- Generator: Support opaque typed records with copy / free annotations by @badcel in #1088
- Support copy annotation typed records by @badcel in #1103
- Add new modifier to class methods that hide base class methods by @adamreeve in #1097
- Add DBus sample to read desktop appearance color scheme by @badcel in #1110
- Foreign typed records: Implement IDisposable by @badcel in #1112
- Foreign typed records: Require to implement a handle release manually by @badcel in #1113
- Opaque typed records: Support adding memory pressure by @badcel in #1114
- ImageSurface: Support memory pressure by @badcel in #1115
- GObject.Type: Mark struct as readonly and make it a record by @badcel in #1117
- Improve alias support by @badcel in #1119
- GObject.Type: Add IsFundamental method by @badcel in #1123
- Differentiate between Long and CLong by @badcel in #1126
- Object: Fix ToggleNotify called after callback is disposed by @badcel in #1128
- Update gir files by @badcel in #1132
- Refactor GdkPixbuf-2.0.Tests by @badcel in #1133
- Update macos runner to version 14 by @badcel in #1134
- Initial hello world tutorials by @anthonyirwin82 in #1139
- Box Layout Tutorial by @anthonyirwin82 in #1143
- Move ChooseAsync method to correct class by @badcel in #1150
- Support class based safe handles by @badcel in #1118
- Tutorial: Use project reference instead of package reference by @badcel in #1152
- Class: Add public constructor which support ConstructArguments by @badcel in #1164
- Class: Add primary constructor by @badcel in #1165
- Add GObject-2.0.Integration.csproj by @badcel in #1158
- Update dependencies by @badcel in #1173
- GObject-2.0.Integration: Disable snupk generation by @badcel in #1176
- Do not publish tutorial projects by @badcel in #1179
New Contributors
- @adamreeve made their first contribution in #1068
- @lamg made their first contribution in #1085
- @anthonyirwin82 made their first contribution in #1139
Full Changelog: 0.5.0...0.6.2
0.6.0-preview.1
This release is the first preview of the upcoming 0.6.0 release. To get an overview of the planned features of the 0.6.0 release please see the corresponding milestone.
Noteworthy
- Update to GNOME 47 which includes GTK 4.16 and libadwaita 1.6.
- The dummy implementation of
INotifyPropertyChangedonGObject.Objectwas removed. - Propertydefinitions have a new
Notify/Unnotifymethod which simplifies registration for property specific notifications. For details see the FAQ. - The size of the C
longdatatype on windows is now always 32 bit. On unix it corresponds to 64 / 32 bit depending on the system architecture. In earlier releases it was always 64 bit which was only correct for 64 bit unix systems. - The size of C
gsizeis now equivalent tonint. In earlier releases it was equal tolongwhich was wrong on 32 bit based systems. - Fixed implementation of the memory pressure feature of records. In earlier releases memory pressure was only removed if
Disposewas called. Now memory pressure is released automatically for records. The feature is not yet implemented for classes and will be part the full 0.6.0 release. - First steps to publish the GirCore generator as a
dotnet tool.
What's Changed
- Remove INotifyPropertyChanged by @badcel in #1061
- Property: Add Notify / Unnotify methods by @badcel in #1062
- Improve long handling for structs by @badcel in #1065
- Remove duplicate semicolon in return statements by @adamreeve in #1068
- Map "gssize" to native integers by @badcel in #1069
- Improve long handling 2 by @badcel in #1067
- Add nullable annotation to nullable string array parameters in internal methods by @adamreeve in #1079
- Disable rendering code for repositories only required via includes by @adamreeve in #1086
- documenting System.DllNotFoundException troubleshooting by @lamg in #1085
- Improve struct freeing by @badcel in #1072
- Improve logging by @badcel in #1093
- Support loading repositories from files embedded as resources in GirTool by @adamreeve in #1091
- Readme: Update status by @badcel in #1096
- Generator: Support opaque typed records with copy / free annotations by @badcel in #1088
- Support copy annotation typed records by @badcel in #1103
- Add new modifier to class methods that hide base class methods by @adamreeve in #1097
- Add DBus sample to read desktop appearance color scheme by @badcel in #1110
- Foreign typed records: Implement IDisposable by @badcel in #1112
- Foreign typed records: Require to implement a handle release manually by @badcel in #1113
- Opaque typed records: Support adding memory pressure by @badcel in #1114
- ImageSurface: Support memory pressure by @badcel in #1115
- GObject.Type: Mark struct as readonly and make it a record by @badcel in #1117
- Improve alias support by @badcel in #1119
- GObject.Type: Add IsFundamental method by @badcel in #1123
- Differentiate between Long and CLong by @badcel in #1126
- Object: Fix ToggleNotify called after callback is disposed by @badcel in #1128
- Update gir files by @badcel in #1132
- Refactor GdkPixbuf-2.0.Tests by @badcel in #1133
- Update macos runner to version 14 by @badcel in #1134
New Contributors
- @adamreeve made their first contribution in #1068
- @lamg made their first contribution in #1085
Full Changelog: 0.5.0...0.6.0-preview.1
0.5.0
This release is the final version of the 0.5.0 release. This is a follow up release to preview.4.
Noteworthy
Since 0.5.0-preview.4
- All bindings were updated to support the GNOME SDK version 46. Among other things this adds support for GTK 4.14 and libadwaita 1.5. (#1052)
- The libraries get build explicitly for .NET 8 (#1038). Remark: If support for .NET 6 / 7 is dropped those versions will get droped from GirCore with the following release, too
- preview.4 added support for typed records but was missing a parameterless constructors. (#1002 )
- Support for foreign records was added (#1010 )
- Support for untyped records was added (#1013)
- Support for untyped foreign records was added (#1029)
- New samples for GTK were created by @kashifsoofi (#1022, #1024)
- A bug was fixed if an object was not freed on main thread (#1045)
- A bug was fixed if an interface was passed as a parameter into a method / function (#1055)
- The homepage got updated with new content and a new docfx version (#1039, #1040)
0.5.0-preview.4
- This release adds support for typed records constructors, methods, functions and fields. Previously in the public record API there was only the record type available without any possibility to access it's data. If you used some custom code to access this data please verify if you can replace this code with the newly available API. In general the available API surface should have improved significantly. (#965, #985, #986, #994)
- The generation of typed records lead to several API breaks in the
GObjectnamespace especially for the classGObject.Value. Those manually written methods originated from the very beginning of the project which were leaning into the direction to divert a lot farther from the original API. API breaks happened in other namespaces, too as manually written bindings got replaced by generated bindings which often have a slightly different method signature. (#981, #982, #991) - Enumerations got rebased on
intinstead oflongto match their C definition. (#989) - More bindings for
asyncmethods (#993)
0.5.0-preview.3
- Update to the latest Gnome SDK version 45. This includes GTK 4.12 and Libadwaita 1.4
- Improved API surface for opaque records which are not registered in the GObject type system.
0.5.0-preview.2
- More bindings for
asyncmethods (#953). - The parameterless
Gio.Application.Runmethod got removed as it is not part of the official Gio Api. AdditionallyGio.Application.RunWithSynchronizationContextnow has a parameter to provide arguments. To achieve the original behaviour just passnullas a parameter (#956). - Fixed a bug introduced in preview.1 which caused an exception if an opaque typed record was used in a
GObject.Value(#959).
0.5.0-preview.1
- The Gtk-4.0.DependencyInjection project was removed as there is not one way to do dependency injection right. Every project needs to find it's own solution.
- Improved API surface for opaque records which are registered as boxed types with the GObject type system.
What's Changed since 0.5.0-preview.4
- Small fixes by @badcel in #1005
- Avoid marshalling of instance data by @badcel in #1007
- Value: Avoid marshalling by @badcel in #1008
- Support foreign records by @badcel in #1010
- Typed Record: Add parameterless constructor by @badcel in #1002
- Fix warnings by @badcel in #1011
- Properties by @badcel in #1014
- Lazy parameter expressions by @badcel in #1020
- ListView sample with code only and ListItem template by @kashifsoofi in #1022
- GridView Sample with StringList and CustomObject ListStore by @kashifsoofi in #1024
- Add support for untyped records by @badcel in #1013
- Support foreigen untyped records by @badcel in #1029
- Remove legacy record code by @badcel in #1028
- Generator: Remove obsolete record class by @badcel in #1030
- Generator: Generate property descriptors for boxed records by @badcel in #1031
- Test: Add Variant test which uses VariantIter and VariantBuilder by @badcel in #1033
- Seal record types by @badcel in #1037
- Dotnet 8 by @badcel in #1038
- Document how to handle DllNotFoundException by @badcel in #1039
- Add documentation to gir.core repository by @badcel in #1040
- Tests: Add string array tests by @badcel in #1041
- ToggleRef: Remove toggle ref on main context by @badcel in #1045
- Typed Records: Implement IEquality via pointer comparison by @badcel in #1047
- Opaque typed Records: Implement IEquality via pointer comparison by @badcel in #1048
- Opaque untyped Records: Implement IEquality via pointer comparison by @badcel in #1049
- Untyped records: Implement IEquality via pointer comparison by @badcel in #1050
- Gnome sdk 46 by @badcel in #1052
- Handle parameter ownership transfer for interfaces by @badcel in #1055
- Fundamental types: Support returning a null value by @badcel in #1056
Full Changelog since 0.4.0: 0.4.0...0.5.0
0.5.0-preview.4
This release is the fourth preview of the upcoming 0.5.0 release. This is a follow up release to preview.3.
Noteworthy:
- This release adds support for typed records constructors, methods, functions and fields. Previously in the public record API there was only the record type available without any possibility to access it's data. If you used some custom code to access this data please verify if you can replace this code with the newly available API. In general the available API surface should have improved significantly. (#965, #985, #986, #994)
- The generation of typed records lead to several API breaks in the
GObjectnamespace especially for the classGObject.Value. Those manually written methods originated from the very beginning of the project which were leaning into the direction to divert a lot farther from the original API. API breaks happened in other namespaces, too as manually written bindings got replaced by generated bindings which often have a slightly different method signature. (#981, #982, #991) - Enumerations got rebased on
intinstead oflongto match their C definition. (#989) - More bindings for
asyncmethods (#993)
If you encounter any errors, missing features or encounter problems to adopt to the new version please open an issue.
Important
There is currently no public parameterless constructor available for typed records. To create a new instance of a typed record you need to create a managed handle first. For example to create an instance of Gdk.Rgba it would be: new Gdk.RGBA(RGBAManagedHandle.Create()). There will be a new parameterless constructor in the next version.
What's Changed
- GValue: Support setting a string array by @badcel in #981
- GValue: Support setting an enumeration / bitfield by @badcel in #982
- Bump Serilog.Sinks.Console from 5.0.0 to 5.0.1 in /src/GirTool by @dependabot in #983
- GirModel: Add field writable property by @badcel in #985
- Make struct fields readable by default by @badcel in #986
- Rebase enumerations on integer datatypes by @badcel in #989
- Support boxed records by @badcel in #965
- Update dependencies by @badcel in #990
- GValue.GetStringArray: Ensure type before accessing data by @badcel in #991
- Add Async FontDialog methods and sample by @kashifsoofi in #993
- Move GirTool, Integration folders and props files by @kashifsoofi in #995
- TypedRecord: Add field access by @badcel in #994
- Update GirCore.sln by @badcel in #998
New Contributors
- @kashifsoofi made their first contribution in #993
Full Changelog: 0.5.0-preview.3...0.5.0-preview.4