no more submodule

This commit is contained in:
2024-09-15 22:40:48 +02:00
parent df3b8a3135
commit 0234b33671
5804 changed files with 943618 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "GtkSharp Contributors",
"classifications": [
"Gtk",
"GUI App"
],
"name": "Gtk Application",
"identity": "GtkSharp.Application.VBNet",
"groupIdentity": "GtkSharp.Application",
"shortName": "gtkapp",
"tags": {
"language": "VB",
"type": "project"
},
"sourceName": "GtkNamespace",
"preferNameDirectory": true,
"symbols": {
"targetframework": {
"type": "parameter",
"description": "The target framework for the project.",
"defaultValue": "net8.0",
"replaces": "$(FrameworkParameter)"
}
},
"primaryOutputs": [
{ "path": "GtkNamespace.vbproj" }
]
}

View File

@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>$(FrameworkParameter)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<None Remove="**\*.glade" />
<EmbeddedResource Include="**\*.glade">
<LogicalName>%(Filename)%(Extension)</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="GtkSharp" Version="3.24.24.*" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.18"/>
<object class="GtkWindow" id="MainWindow">
<property name="can_focus">False</property>
<property name="title" translatable="yes">Example Window</property>
<property name="default_width">480</property>
<property name="default_height">240</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">4</property>
<property name="margin_right">4</property>
<property name="margin_top">4</property>
<property name="margin_bottom">4</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="_label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Hello World!</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="_button1">
<property name="label" translatable="yes">Click me!</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

View File

@@ -0,0 +1,37 @@
Imports System
Imports Gtk
Imports UI = Gtk.Builder.ObjectAttribute
Namespace GtkNamespace
Public Class MainWindow
Inherits Window
Private _counter = 0
<UI>Private _label1 As Label
<UI>Private _button1 As Button
Public Sub New (builder as Builder)
MyBase.New(builder.GetRawOwnedObject("MainWindow"))
builder.Autoconnect (Me)
AddHandler MyBase.DeleteEvent, AddressOf Window_Delete
AddHandler _button1.Clicked, AddressOf Button1_Clicked
End Sub
Public Sub New ()
Me.New(new Builder("MainWindow.glade"))
End Sub
Private Sub Window_Delete (ByVal sender As Object, ByVal a As DeleteEventArgs)
Application.Quit ()
a.RetVal = true
End Sub
Private Sub Button1_Clicked (ByVal sender As Object, ByVal a As EventArgs)
_counter += 1
_label1.Text = "Hello World! This button has been clicked " + _counter.ToString() + " time(s)."
End Sub
End Class
End Namespace

View File

@@ -0,0 +1,21 @@
Imports System
Imports Gtk
Namespace GtkNamespace
Public Class MainClass
Public Shared Sub Main ()
Application.Init ()
Dim app as new Application ("org.GtkNamespace.GtkNamespace", GLib.ApplicationFlags.None)
app.Register (GLib.Cancellable.Current)
Dim win as new MainWindow ()
app.AddWindow (win)
win.Show ()
Application.Run ()
End Sub
End Class
End Namespace