MentorLake.Gtk4 0.3.6

dotnet add package MentorLake.Gtk4 --version 0.3.6
NuGet\Install-Package MentorLake.Gtk4 -Version 0.3.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MentorLake.Gtk4" Version="0.3.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MentorLake.Gtk4 --version 0.3.6
#r "nuget: MentorLake.Gtk4, 0.3.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MentorLake.Gtk4 as a Cake Addin
#addin nuget:?package=MentorLake.Gtk4&version=0.3.6

// Install MentorLake.Gtk4 as a Cake Tool
#tool nuget:?package=MentorLake.Gtk4&version=0.3.6

<p style="color:#AA0000">This is still a work in progress.</p>

Summary

Bindings for the GTK4 libraries (GTK, GDK, GLib, etc.).

The GTK API is exposed via extension methods off of the safe handle classes. The P/Invoke definitions are internal so you don't interact with them directly. The constructor-like methods to create the safe handles are regular static methods off of the safe handle types.

Functions from the GTK API that normally would return void (e.g., gtk_button_set_label) return a safe handle instead to create a fluent DSL.

Example

var window = GtkWindowHandle.New()
	.SetChild(GtkBoxHandle.New(GtkOrientation.GTK_ORIENTATION_HORIZONTAL, 0)
		.Append(GtkButtonHandle.New()
			.SetLabel("TEST")
			.Connect(GtkButtonSignals.Clicked, () => Console.WriteLine("CLICK")))
		.Append(GtkImageHandle.NewFromIconName("face-smile")
			.SetIconSize(GtkIconSize.GTK_ICON_SIZE_LARGE)
			.SetSizeRequest(64, 64)));

Warning

The bindings are generated from the API docs and heuristics were needed to determine between arrays, pointers, out parameters, ref parameters, etc. If you find an issue then please submit a pull request.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.3.6 91 5/23/2024
0.3.5 60 5/22/2024
0.3.4 57 5/22/2024
0.3.3 66 5/22/2024
0.3.2 73 5/21/2024
0.3.1 68 5/21/2024
0.2.12 73 5/20/2024
0.2.11 73 5/19/2024
0.2.10 77 5/19/2024
0.2.9 93 4/28/2024
0.2.8 93 4/27/2024
0.2.7 92 4/21/2024
0.2.6 88 4/8/2024
0.2.5 77 4/8/2024
0.2.4 83 4/8/2024
0.2.3 107 3/29/2024
0.2.2 101 3/28/2024
0.2.1 86 3/27/2024
0.1.4 89 3/20/2024