-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GTkl sample fixed & ported to Mercury; Win32 sample ported to Mercury…
… (with bugs)
- Loading branch information
Showing
13 changed files
with
299 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
Mercury/Island/GUI/Basic Linux Gtk App/BasicGtkApp.elements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="yes"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="4.0"> | ||
<PropertyGroup> | ||
<ProductVersion>3.5</ProductVersion> | ||
<RootNamespace>BasicGtkApp</RootNamespace> | ||
<ProjectGuid>{C34F7909-BC5D-4C8E-A693-8EDBA7E7058E}</ProjectGuid> | ||
<OutputType>Executable</OutputType> | ||
<AssemblyName>BasicGtkApp</AssemblyName> | ||
<AllowGlobals>False</AllowGlobals> | ||
<AllowLegacyWith>False</AllowLegacyWith> | ||
<AllowLegacyOutParams>False</AllowLegacyOutParams> | ||
<AllowLegacyCreate>False</AllowLegacyCreate> | ||
<AllowUnsafeCode>False</AllowUnsafeCode> | ||
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration> | ||
<Name>BasicGtkApp</Name> | ||
<WarnOnCaseMismatch>True</WarnOnCaseMismatch> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> | ||
<Optimize>False</Optimize> | ||
<OutputPath>bin\Debug</OutputPath> | ||
<DefineConstants>DEBUG;TRACE;</DefineConstants> | ||
<GenerateDebugInfo>True</GenerateDebugInfo> | ||
<CaptureConsoleOutput>False</CaptureConsoleOutput> | ||
<StartMode>Project</StartMode> | ||
<RuntimeVersion>v25</RuntimeVersion> | ||
<XmlDoc>False</XmlDoc> | ||
<XmlDocWarningLevel>WarningOnPublicMembers</XmlDocWarningLevel> | ||
<EnableUnmanagedDebugging>False</EnableUnmanagedDebugging> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> | ||
<Optimize>true</Optimize> | ||
<OutputPath>.</OutputPath> | ||
<GenerateDebugInfo>False</GenerateDebugInfo> | ||
<EnableAsserts>False</EnableAsserts> | ||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
<CaptureConsoleOutput>False</CaptureConsoleOutput> | ||
<StartMode>Project</StartMode> | ||
<RegisterForComInterop>False</RegisterForComInterop> | ||
<RuntimeVersion>v25</RuntimeVersion> | ||
<XmlDoc>False</XmlDoc> | ||
<XmlDocWarningLevel>WarningOnPublicMembers</XmlDocWarningLevel> | ||
<EnableUnmanagedDebugging>False</EnableUnmanagedDebugging> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="atk" /> | ||
<Reference Include="cairo" /> | ||
<Reference Include="gc" /> | ||
<Reference Include="gdk" /> | ||
<Reference Include="glib" /> | ||
<Reference Include="gtk" /> | ||
<Reference Include="Island" /> | ||
<Reference Include="pango" /> | ||
<Reference Include="rtl" /> | ||
<Reference Include="Swift" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Program.vb" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildExtensionsPath)\RemObjects Software\Elements\RemObjects.Elements.Island.Linux.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.25420.1 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{656346D9-4656-40DA-A068-22D5425D4639}") = "BasicGtkApp", "BasicGtkApp.elements", "{C34F7909-BC5D-4C8E-A693-8EDBA7E7058E}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Default = Debug|Default | ||
Release|Default = Release|Default | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{C34F7909-BC5D-4C8E-A693-8EDBA7E7058E}.Debug|Default.ActiveCfg = Debug | ||
{C34F7909-BC5D-4C8E-A693-8EDBA7E7058E}.Debug|Default.Build.0 = Debug | ||
{C34F7909-BC5D-4C8E-A693-8EDBA7E7058E}.Release|Default.ActiveCfg = Release | ||
{C34F7909-BC5D-4C8E-A693-8EDBA7E7058E}.Release|Default.Build.0 = Release | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// based on https://developer.gnome.org/gtk3/stable/gtk-getting-started.html | ||
|
||
Imports atk | ||
Imports gobject | ||
Imports gio | ||
Imports gtk | ||
|
||
/* | ||
!!! Please note: in order to run this sample, you need to manually copy it to a Linux PC or VM with an active GUI, and run it. | ||
!!! | ||
!!! GUI applications cannot be run via SSH or CrossBox 2, and they are also not supported on "Bash on Windows". | ||
*/ | ||
|
||
Class Program | ||
Shared Dim window As Ptr(Of GtkWindow) | ||
|
||
Shared Sub clicked(app As GtkWidget, userdata As Ptr(Of Void)) | ||
Dim dialog = TryCast(gtk_message_dialog_new(Null, GtkDialogFlags.GTK_DIALOG_DESTROY_WITH_PARENT, GtkMessageType.GTK_MESSAGE_INFO, GtkButtonsType.GTK_BUTTONS_OK, "Hello World!"), Ptr(Of GtkDialog)) | ||
gtk_dialog_run(dialog) | ||
gtk_widget_destroy(dialog) | ||
End Sub | ||
|
||
Shared Function Main(args As String()) As Int32 | ||
window = TryCast(gtk_window_new(GtkWindowType.GTK_WINDOW_TOPLEVEL), Ptr(Of GtkWindow)) | ||
gtk_window_set_title(window, "RemObjects C# - Island GTK Sample") | ||
gtk_window_set_default_size(window, 200, 200) | ||
Dim button_box = gtk_hbutton_box_new() | ||
gtk_container_add(window, button_box) | ||
Dim button = gtk_button_new_with_label("Hello World") | ||
g_signal_connect_data(TryCast(button, glib.gpointer), "clicked", TryCast(TryCast(AddressOf(clicked), Ptr(Of Void)), glib.GVoidFunc), Null, Null, TryCast(0, GConnectFlags)) | ||
gtk_container_add(TryCast(button_box, Ptr(Of GtkContainer)), button) | ||
gtk_widget_show_all(window) | ||
gtk_main() | ||
End Function | ||
End Class |
54 changes: 54 additions & 0 deletions
54
Mercury/Island/GUI/Basic Windows GUI App/BasicWindowsApp.elements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="yes"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="4.0"> | ||
<PropertyGroup> | ||
<ProductVersion>3.5</ProductVersion> | ||
<RootNamespace>BasicWindowsApp</RootNamespace> | ||
<ProjectGuid>{186BBBBD-FEB0-4658-92A8-6CA339FD27BB}</ProjectGuid> | ||
<OutputType>WinExe</OutputType> | ||
<AssemblyName>BasicWindowsApp</AssemblyName> | ||
<AllowGlobals>False</AllowGlobals> | ||
<AllowLegacyWith>False</AllowLegacyWith> | ||
<AllowLegacyOutParams>False</AllowLegacyOutParams> | ||
<AllowLegacyCreate>False</AllowLegacyCreate> | ||
<AllowUnsafeCode>False</AllowUnsafeCode> | ||
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration> | ||
<Name>BasicWindowsApp</Name> | ||
<WarnOnCaseMismatch>True</WarnOnCaseMismatch> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> | ||
<Optimize>False</Optimize> | ||
<OutputPath>bin\Debug</OutputPath> | ||
<DefineConstants>DEBUG;TRACE;</DefineConstants> | ||
<GenerateDebugInfo>True</GenerateDebugInfo> | ||
<CaptureConsoleOutput>False</CaptureConsoleOutput> | ||
<StartMode>Project</StartMode> | ||
<RuntimeVersion>v25</RuntimeVersion> | ||
<XmlDoc>False</XmlDoc> | ||
<XmlDocWarningLevel>WarningOnPublicMembers</XmlDocWarningLevel> | ||
<EnableUnmanagedDebugging>False</EnableUnmanagedDebugging> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> | ||
<Optimize>true</Optimize> | ||
<OutputPath>.</OutputPath> | ||
<GenerateDebugInfo>False</GenerateDebugInfo> | ||
<EnableAsserts>False</EnableAsserts> | ||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
<CaptureConsoleOutput>False</CaptureConsoleOutput> | ||
<StartMode>Project</StartMode> | ||
<RegisterForComInterop>False</RegisterForComInterop> | ||
<RuntimeVersion>v25</RuntimeVersion> | ||
<XmlDoc>False</XmlDoc> | ||
<XmlDocWarningLevel>WarningOnPublicMembers</XmlDocWarningLevel> | ||
<EnableUnmanagedDebugging>False</EnableUnmanagedDebugging> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="gc" /> | ||
<Reference Include="Island" /> | ||
<Reference Include="rtl" /> | ||
<Reference Include="Swift" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Program.vb" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildExtensionsPath)\RemObjects Software\Elements\RemObjects.Elements.Island.Windows.targets" /> | ||
</Project> |
20 changes: 20 additions & 0 deletions
20
Mercury/Island/GUI/Basic Windows GUI App/BasicWindowsApp.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# RemObjects Fire | ||
Project("{656346D9-4656-40DA-A068-22D5425D4639}") = "BasicWindowsApp", "BasicWindowsApp.elements", "{186BBBBD-FEB0-4658-92A8-6CA339FD27BB}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|AnyCPU = Debug|AnyCPU | ||
Release|AnyCPU = Release|AnyCPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{186BBBBD-FEB0-4658-92A8-6CA339FD27BB}.Debug|AnyCPU.ActiveCfg = Debug|AnyCPU | ||
{186BBBBD-FEB0-4658-92A8-6CA339FD27BB}.Debug|AnyCPU.Build.0 = Debug|AnyCPU | ||
{186BBBBD-FEB0-4658-92A8-6CA339FD27BB}.Release|AnyCPU.ActiveCfg = Release|AnyCPU | ||
{186BBBBD-FEB0-4658-92A8-6CA339FD27BB}.Release|AnyCPU.Build.0 = Release|AnyCPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.