Archived
Initial commit, with a basic window and GLArea
This commit is contained in:
@@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"id" : "com.brodybrooks.WorldBuilder",
|
||||||
|
"runtime" : "org.gnome.Platform",
|
||||||
|
"runtime-version" : "48",
|
||||||
|
"sdk" : "org.gnome.Sdk",
|
||||||
|
"sdk-extensions" : [
|
||||||
|
"org.freedesktop.Sdk.Extension.vala"
|
||||||
|
],
|
||||||
|
"command" : "worldbuilder",
|
||||||
|
"finish-args" : [
|
||||||
|
"--share=network",
|
||||||
|
"--share=ipc",
|
||||||
|
"--socket=fallback-x11",
|
||||||
|
"--device=dri",
|
||||||
|
"--socket=wayland"
|
||||||
|
],
|
||||||
|
"build-options" : {
|
||||||
|
"append-path" : "/usr/lib/sdk/vala/bin",
|
||||||
|
"prepend-ld-library-path" : "/usr/lib/sdk/vala/lib"
|
||||||
|
},
|
||||||
|
"cleanup" : [
|
||||||
|
"/include",
|
||||||
|
"/lib/pkgconfig",
|
||||||
|
"/man",
|
||||||
|
"/share/doc",
|
||||||
|
"/share/gtk-doc",
|
||||||
|
"/share/man",
|
||||||
|
"/share/pkgconfig",
|
||||||
|
"/share/vala",
|
||||||
|
"*.la",
|
||||||
|
"*.a"
|
||||||
|
],
|
||||||
|
"modules" : [
|
||||||
|
{
|
||||||
|
"name" : "worldbuilder",
|
||||||
|
"builddir" : true,
|
||||||
|
"buildsystem" : "meson",
|
||||||
|
"sources" : [
|
||||||
|
{
|
||||||
|
"type" : "git",
|
||||||
|
"url" : "file:///home/brody/Projects"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=WorldBuilder
|
||||||
|
Exec=worldbuilder
|
||||||
|
Icon=com.brodybrooks.WorldBuilder
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=Utility;
|
||||||
|
Keywords=GTK;
|
||||||
|
StartupNotify=true
|
||||||
|
DBusActivatable=true
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<schemalist gettext-domain="worldbuilder">
|
||||||
|
<schema id="com.brodybrooks.WorldBuilder" path="/com/brodybrooks/WorldBuilder/">
|
||||||
|
</schema>
|
||||||
|
</schemalist>
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<component type="desktop-application">
|
||||||
|
<id>com.brodybrooks.WorldBuilder</id>
|
||||||
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
|
<project_license>GPL-3.0-or-later</project_license>
|
||||||
|
|
||||||
|
<name>WorldBuilder</name>
|
||||||
|
<summary>Keep the summary shorter, between 10 and 35 characters</summary>
|
||||||
|
<description>
|
||||||
|
<p>No description</p>
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<developer id="tld.vendor">
|
||||||
|
<name>Developer name</name>
|
||||||
|
</developer>
|
||||||
|
|
||||||
|
<!-- Required: Should be a link to the upstream homepage for the component -->
|
||||||
|
<url type="homepage">https://example.org/</url>
|
||||||
|
<!-- Recommended: It is highly recommended for open-source projects to display the source code repository -->
|
||||||
|
<url type="vcs-browser">https://example.org/repository</url>
|
||||||
|
<!-- Should point to the software's bug tracking system, for users to report new bugs -->
|
||||||
|
<url type="bugtracker">https://example.org/issues</url>
|
||||||
|
<!-- Should link a FAQ page for this software, to answer some of the most-asked questions in detail -->
|
||||||
|
<!-- URLs of this type should point to a webpage where users can submit or modify translations of the upstream project -->
|
||||||
|
<url type="translate">https://example.org/translate</url>
|
||||||
|
<url type="faq">https://example.org/faq</url>
|
||||||
|
<!-- Should provide a web link to an online user's reference, a software manual or help page -->
|
||||||
|
<url type="help">https://example.org/help</url>
|
||||||
|
<!-- URLs of this type should point to a webpage showing information on how to donate to the described software project -->
|
||||||
|
<url type="donation">https://example.org/donate</url>
|
||||||
|
<!-- This could for example be an HTTPS URL to an online form or a page describing how to contact the developer -->
|
||||||
|
<url type="contact">https://example.org/contact</url>
|
||||||
|
<!-- URLs of this type should point to a webpage showing information on how to contribute to the described software project -->
|
||||||
|
<url type="contribute">https://example.org/contribute</url>
|
||||||
|
|
||||||
|
<translation type="gettext">worldbuilder</translation>
|
||||||
|
<!-- All graphical applications having a desktop file must have this tag in the MetaInfo.
|
||||||
|
If this is present, appstreamcli compose will pull icons, keywords and categories from the desktop file. -->
|
||||||
|
<launchable type="desktop-id">com.brodybrooks.WorldBuilder.desktop</launchable>
|
||||||
|
<!-- Use the OARS website (https://hughsie.github.io/oars/generate.html) to generate these and make sure to use oars-1.1 -->
|
||||||
|
<content_rating type="oars-1.1" />
|
||||||
|
|
||||||
|
<!-- Applications should set a brand color in both light and dark variants like so -->
|
||||||
|
<branding>
|
||||||
|
<color type="primary" scheme_preference="light">#ff00ff</color>
|
||||||
|
<color type="primary" scheme_preference="dark">#993d3d</color>
|
||||||
|
</branding>
|
||||||
|
|
||||||
|
<screenshots>
|
||||||
|
<screenshot type="default">
|
||||||
|
<image>https://example.org/example1.png</image>
|
||||||
|
<caption>A caption</caption>
|
||||||
|
</screenshot>
|
||||||
|
<screenshot>
|
||||||
|
<image>https://example.org/example2.png</image>
|
||||||
|
<caption>A caption</caption>
|
||||||
|
</screenshot>
|
||||||
|
</screenshots>
|
||||||
|
|
||||||
|
<releases>
|
||||||
|
<release version="1.0.1" date="2024-01-18">
|
||||||
|
<url type="details">https://example.org/changelog.html#version_1.0.1</url>
|
||||||
|
<description translate="no">
|
||||||
|
<p>Release description</p>
|
||||||
|
<ul>
|
||||||
|
<li>List of changes</li>
|
||||||
|
<li>List of changes</li>
|
||||||
|
</ul>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
</releases>
|
||||||
|
|
||||||
|
</component>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[D-BUS Service]
|
||||||
|
Name=com.brodybrooks.WorldBuilder
|
||||||
|
Exec=@bindir@/worldbuilder --gapplication-service
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="33.750061mm"
|
||||||
|
height="33.750061mm"
|
||||||
|
viewBox="0 0 33.750061 33.750061"
|
||||||
|
version="1.1"
|
||||||
|
id="svg974">
|
||||||
|
<defs
|
||||||
|
id="defs968">
|
||||||
|
<clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath18689">
|
||||||
|
<rect
|
||||||
|
clip-path="none"
|
||||||
|
transform="rotate(45)"
|
||||||
|
ry="32.000008"
|
||||||
|
rx="32.000008"
|
||||||
|
y="123.9986"
|
||||||
|
x="486.03726"
|
||||||
|
height="362.94299"
|
||||||
|
width="362.94299"
|
||||||
|
id="rect18691"
|
||||||
|
style="display:inline;opacity:1;vector-effect:none;fill:#4a86cf;fill-opacity:1;stroke:none;stroke-width:26.0669;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" />
|
||||||
|
</clipPath>
|
||||||
|
<clipPath
|
||||||
|
clipPathUnits="userSpaceOnUse"
|
||||||
|
id="clipPath18689-3">
|
||||||
|
<rect
|
||||||
|
clip-path="none"
|
||||||
|
transform="rotate(45)"
|
||||||
|
ry="32.000008"
|
||||||
|
rx="32.000008"
|
||||||
|
y="123.9986"
|
||||||
|
x="486.03726"
|
||||||
|
height="362.94299"
|
||||||
|
width="362.94299"
|
||||||
|
id="rect18691-6"
|
||||||
|
style="display:inline;opacity:1;vector-effect:none;fill:#4a86cf;fill-opacity:1;stroke:none;stroke-width:26.0669;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" />
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
<metadata
|
||||||
|
id="metadata971">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(-61.819823,-103.94395)">
|
||||||
|
<g
|
||||||
|
transform="matrix(0.26367235,0,0,0.26367235,61.819823,-529.39703)"
|
||||||
|
style="display:inline;stroke-width:0.25;enable-background:new"
|
||||||
|
id="g1836">
|
||||||
|
<title
|
||||||
|
id="title1838">application-x-executable</title>
|
||||||
|
<g
|
||||||
|
transform="matrix(0.25,0,0,0.25,0,2295)"
|
||||||
|
id="g18818"
|
||||||
|
style="stroke-width:0.25">
|
||||||
|
<g
|
||||||
|
style="stroke-width:0.269963"
|
||||||
|
transform="matrix(0.92605186,0,0,0.92605186,18.930729,50.876335)"
|
||||||
|
id="g18590">
|
||||||
|
<g
|
||||||
|
style="stroke-width:0.269963"
|
||||||
|
id="g18681"
|
||||||
|
clip-path="url(#clipPath18689-3)">
|
||||||
|
<rect
|
||||||
|
style="opacity:1;vector-effect:none;fill:#3584e4;fill-opacity:1;stroke:none;stroke-width:8.22095;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||||
|
id="rect18571"
|
||||||
|
width="424"
|
||||||
|
height="424"
|
||||||
|
x="458.33722"
|
||||||
|
y="90.641701"
|
||||||
|
rx="10.092117"
|
||||||
|
ry="10.092117"
|
||||||
|
transform="matrix(0.60528171,0.60528171,-0.60528171,0.60528171,33.440632,99.073632)"
|
||||||
|
clip-path="none" />
|
||||||
|
<circle
|
||||||
|
style="opacity:1;vector-effect:none;fill:#f66151;fill-opacity:1;stroke:none;stroke-width:7.03712;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||||
|
id="path18706"
|
||||||
|
cx="0"
|
||||||
|
cy="0"
|
||||||
|
r="0"
|
||||||
|
transform="translate(0,-212)" />
|
||||||
|
<circle
|
||||||
|
style="opacity:1;vector-effect:none;fill:#f66151;fill-opacity:1;stroke:none;stroke-width:7.03712;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
|
||||||
|
id="path18708"
|
||||||
|
cx="0"
|
||||||
|
cy="0"
|
||||||
|
r="0"
|
||||||
|
transform="translate(0,-212)" />
|
||||||
|
<path
|
||||||
|
style="display:inline;opacity:1;vector-effect:none;fill:#98c1f1;fill-opacity:1;stroke:none;stroke-width:7.03712;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new"
|
||||||
|
d="m 408.91993,561.9183 -9.8861,29.82892 a 172.97099,172.97099 0 0 0 -1.42693,-0.0713 172.97099,172.97099 0 0 0 -23.92891,1.85189 l -13.80082,-28.50125 a 203.29325,203.29325 0 0 0 -29.40085,7.97217 l 2.28619,31.40474 a 172.97099,172.97099 0 0 0 -22.73152,11.31923 l -23.71796,-21.103 a 203.29325,203.29325 0 0 0 -24.05918,18.6741 l 14.09863,28.07319 a 172.97099,172.97099 0 0 0 -16.63608,19.21074 l -30.05845,-10.44758 a 203.29325,203.29325 0 0 0 -15.01683,26.48807 l 23.73035,20.50738 a 172.97099,172.97099 0 0 0 -7.98456,24.14293 l -31.73044,1.84879 a 203.29325,203.29325 0 0 0 -3.77825,30.21664 l 29.82892,9.8861 a 172.97099,172.97099 0 0 0 -0.0713,1.42693 172.97099,172.97099 0 0 0 1.85188,23.92889 l -28.50125,13.80084 a 203.29325,203.29325 0 0 0 7.97215,29.40084 l 31.40475,-2.28619 a 172.97099,172.97099 0 0 0 11.31922,22.73152 l -21.10296,23.71797 a 203.29325,203.29325 0 0 0 18.67409,24.05918 l 28.07319,-14.09863 a 172.97099,172.97099 0 0 0 19.21074,16.63606 l -10.44758,30.05847 a 203.29325,203.29325 0 0 0 26.48806,15.01683 l 20.50739,-23.73036 a 172.97099,172.97099 0 0 0 24.14293,7.98457 l 1.8488,31.73043 a 203.29325,203.29325 0 0 0 30.21666,3.77826 l 9.8861,-29.82892 a 172.97099,172.97099 0 0 0 1.42693,0.0713 172.97099,172.97099 0 0 0 23.9289,-1.85188 l 13.80084,28.50125 a 203.29325,203.29325 0 0 0 29.40084,-7.97217 l -2.2862,-31.40474 a 172.97099,172.97099 0 0 0 22.73153,-11.31922 l 23.71796,21.10297 A 203.29325,203.29325 0 0 0 532.96,916.00016 l -14.09864,-28.07319 a 172.97099,172.97099 0 0 0 16.63607,-19.21073 l 30.05846,10.44757 a 203.29325,203.29325 0 0 0 15.01683,-26.48807 l -23.73036,-20.50738 a 172.97099,172.97099 0 0 0 7.98457,-24.14293 l 31.73044,-1.84879 a 203.29325,203.29325 0 0 0 3.77825,-30.21667 l -29.82892,-9.8861 a 172.97099,172.97099 0 0 0 0.0713,-1.42692 172.97099,172.97099 0 0 0 -1.85189,-23.9289 l 28.50124,-13.80084 a 203.29325,203.29325 0 0 0 -7.97215,-29.40084 l -31.40474,2.2862 a 172.97099,172.97099 0 0 0 -11.31923,-22.73153 l 21.10297,-23.71797 a 203.29325,203.29325 0 0 0 -18.67409,-24.05918 l -28.07319,14.09863 a 172.97099,172.97099 0 0 0 -19.21074,-16.63606 l 10.44757,-30.05847 A 203.29325,203.29325 0 0 0 485.6357,581.68117 l -20.50738,23.73035 a 172.97099,172.97099 0 0 0 -24.14293,-7.98455 l -1.84879,-31.73044 a 203.29325,203.29325 0 0 0 -30.21667,-3.77826 z M 397.6069,637.72208 A 126.92605,126.92605 0 0 1 524.5318,764.64699 126.92605,126.92605 0 0 1 397.6069,891.57189 126.92605,126.92605 0 0 1 270.682,764.64699 126.92605,126.92605 0 0 1 397.6069,637.72208 Z"
|
||||||
|
id="path18717-4" />
|
||||||
|
<path
|
||||||
|
id="path18758"
|
||||||
|
d="m 51.748325,401.28402 -9.8861,29.82892 c -0.475543,-0.0257 -0.951191,-0.0495 -1.42693,-0.0713 -8.00956,0.0625 -16.005106,0.6813 -23.92891,1.85189 L 2.7055639,404.39228 c -9.9858697,1.91835 -19.8137359,4.58322 -29.4008489,7.97217 l 2.28619,31.40474 c -7.844275,3.21103 -15.441918,6.9943 -22.73152,11.31923 l -23.71796,-21.103 c -8.475372,5.61437 -16.517661,11.85658 -24.05918,18.6741 l 14.09863,28.07319 c -6.008901,5.98701 -11.569263,12.40791 -16.636077,19.21074 l -30.058438,-10.44758 c -5.66072,8.44155 -10.68041,17.29574 -15.01683,26.48807 l 23.73035,20.50738 c -3.25027,7.84084 -5.919,15.91028 -7.98456,24.14293 l -31.73044,1.84879 c -2.01308,9.96359 -3.27604,20.06413 -3.77825,30.21664 l 29.82892,9.8861 c -0.0257,0.47554 -0.0495,0.95119 -0.0713,1.42693 0.0625,8.00955 0.68129,16.00509 1.85188,23.92889 l -28.50125,13.80084 c 1.91835,9.98587 4.58321,19.81373 7.97215,29.40084 l 31.40475,-2.28619 c 3.21102,7.84427 6.99429,15.44192 11.31922,22.73152 l -21.10296,23.71797 c 5.61437,8.47537 11.85658,16.51766 18.67409,24.05918 l 28.073175,-14.09863 c 5.987006,6.00889 12.407911,11.56925 19.21074,16.63606 l -10.44758,30.05847 c 8.441549,5.66072 17.295731,10.68041 26.48806,15.01683 l 20.50739,-23.73036 c 7.840839,3.25027 15.910282,5.91901 24.142929,7.98457 l 1.8488,31.73043 c 9.9635962,2.01309 20.064147,3.27605 30.216661,3.77826 l 9.8861,-29.82892 c 0.475543,0.0257 0.951191,0.0495 1.42693,0.0713 8.009557,-0.0625 16.005099,-0.68129 23.9289,-1.85188 l 13.80084,28.50125 c 9.985867,-1.91835 19.813731,-4.58322 29.400855,-7.97217 l -2.2862,-31.40474 c 7.84428,-3.21102 15.44192,-6.99429 22.73153,-11.31922 l 23.71796,21.10297 c 8.47538,-5.61437 16.51767,-11.85658 24.05919,-18.6741 l -14.09864,-28.07319 c 6.0089,-5.987 11.56926,-12.4079 16.63607,-19.21073 l 30.05846,10.44757 c 5.66072,-8.44155 10.68041,-17.29574 15.01683,-26.48807 l -23.73036,-20.50738 c 3.25027,-7.84084 5.91901,-15.91028 7.98457,-24.14293 l 31.73044,-1.84879 c 2.01308,-9.9636 3.27604,-20.06415 3.77825,-30.21667 l -29.82892,-9.8861 c 0.0257,-0.47554 0.0495,-0.95118 0.0713,-1.42692 -0.0625,-8.00956 -0.6813,-16.0051 -1.85189,-23.9289 l 28.50124,-13.80084 c -1.91835,-9.98587 -4.58321,-19.81373 -7.97215,-29.40084 l -31.40474,2.2862 c -3.21103,-7.84428 -6.9943,-15.44192 -11.31923,-22.73153 l 21.10297,-23.71797 c -5.61437,-8.47537 -11.85658,-16.51766 -18.67409,-24.05918 l -28.07319,14.09863 c -5.98701,-6.00889 -12.40791,-11.56925 -19.21074,-16.63606 l 10.44757,-30.05847 c -8.44155,-5.66072 -17.29572,-10.6804 -26.48805,-15.01682 l -20.50738,23.73035 c -7.84085,-3.25027 -15.910298,-5.91899 -24.142945,-7.98455 l -1.84879,-31.73044 c -9.9636,-2.01309 -20.064152,-3.27605 -30.21667,-3.77826 z"
|
||||||
|
style="display:inline;opacity:1;vector-effect:none;fill:#1a5fb4;fill-opacity:1;stroke:none;stroke-width:7.03712;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path
|
||||||
|
style="display:inline;opacity:0.534;vector-effect:none;fill:#1a5fb4;fill-opacity:1;stroke:none;stroke-width:1.62918;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new"
|
||||||
|
clip-path="none"
|
||||||
|
d="m 8.4765625,2676 c -1.1711695,2.8866 -0.5827763,6.3078 1.7656255,8.6562 l 48.101562,48.1016 c 3.133898,3.1339 8.178602,3.1339 11.3125,0 l 48.10156,-48.1016 c 2.3484,-2.3484 2.9368,-5.7696 1.76563,-8.6562 -0.39174,0.9655 -0.98013,1.8708 -1.76563,2.6562 l -48.10156,48.1016 c -3.133898,3.1339 -8.178602,3.1339 -11.3125,0 L 10.242188,2678.6562 C 9.4566904,2677.8708 8.8682972,2676.9655 8.4765625,2676 Z"
|
||||||
|
transform="matrix(4,0,0,4,0,-10028)"
|
||||||
|
id="rect18571-6" />
|
||||||
|
</g>
|
||||||
|
<rect
|
||||||
|
y="2402"
|
||||||
|
x="-1.5000001e-06"
|
||||||
|
height="128"
|
||||||
|
width="128"
|
||||||
|
id="rect9125-7-2"
|
||||||
|
style="display:inline;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:none;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g color="#000" fill="#2e3436"><path d="M7.188 2.281c-.094.056-.192.125-.29.19L5.566 3.803a1.684 1.684 0 11-2.17 2.17L2.332 7.037c.506-.069 1.017-.136 1.2.026.242.214.139 1.031.155 1.656.213.088.427.171.657.219.04.008.085-.007.125 0 .337-.525.683-1.288 1-1.344.322-.057.905.562 1.406.937a3.67 3.67 0 00.656-.468c-.195-.595-.594-1.369-.437-1.657.158-.29 1.019-.37 1.625-.531.028-.183.062-.371.062-.562 0-.075-.027-.146-.031-.22-.587-.217-1.435-.385-1.562-.687-.128-.302.34-1.021.593-1.593a3.722 3.722 0 00-.593-.532zm3.875 3.25c-.165.475-.305 1.086-.47 1.563-.43.047-.84.14-1.218.312-.38-.322-.787-.773-1.156-1.093a5.562 5.562 0 00-.688.468c.177.46.453 1.001.625 1.469-.298.309-.531.67-.719 1.063-.494 0-1.102-.084-1.593-.094a5.68 5.68 0 00-.219.812c.435.24 1.006.468 1.438.72-.006.093-.032.185-.032.28 0 .333.049.66.125.97-.382.304-.898.63-1.28.937.015.044.04.083.058.127l.613.613c.417-.1.868-.223 1.266-.303.248.343.532.626.875.875-.027.135-.068.283-.104.428.174-.063.34-.155.482-.297l1.432-1.432a1.994 1.994 0 01.533-3.918c.919 0 1.684.623 1.918 1.467l1.338-1.338c.06-.06.11-.124.156-.191-.035-.062-.06-.13-.1-.188.096-.152.205-.31.315-.47.017-.348-.1-.7-.37-.971l-.177-.176c-.28.192-.561.387-.83.555-.345-.233-.746-.383-1.156-.5-.077-.507-.107-1.132-.187-1.625a5.44 5.44 0 00-.875-.063zm-9.247.608c-.087.068-.173.138-.254.205l.014.035z" style="marker:none" overflow="visible"/><path d="M8.707.293a1 1 0 00-1.415 0l-6.999 7a1 1 0 000 1.413l7 7.001a1 1 0 001.415 0l7-7a1 1 0 000-1.413zm-.708 2.121l5.587 5.587L8 13.586 2.414 7.999z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal;marker:none" font-weight="400" font-family="sans-serif" overflow="visible"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,13 @@
|
|||||||
|
application_id = 'com.brodybrooks.WorldBuilder'
|
||||||
|
|
||||||
|
scalable_dir = 'hicolor' / 'scalable' / 'apps'
|
||||||
|
install_data(
|
||||||
|
scalable_dir / ('@0@.svg').format(application_id),
|
||||||
|
install_dir: get_option('datadir') / 'icons' / scalable_dir
|
||||||
|
)
|
||||||
|
|
||||||
|
symbolic_dir = 'hicolor' / 'symbolic' / 'apps'
|
||||||
|
install_data(
|
||||||
|
symbolic_dir / ('@0@-symbolic.svg').format(application_id),
|
||||||
|
install_dir: get_option('datadir') / 'icons' / symbolic_dir
|
||||||
|
)
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
desktop_file = i18n.merge_file(
|
||||||
|
input: 'com.brodybrooks.WorldBuilder.desktop.in',
|
||||||
|
output: 'com.brodybrooks.WorldBuilder.desktop',
|
||||||
|
type: 'desktop',
|
||||||
|
po_dir: '../po',
|
||||||
|
install: true,
|
||||||
|
install_dir: get_option('datadir') / 'applications'
|
||||||
|
)
|
||||||
|
|
||||||
|
desktop_utils = find_program('desktop-file-validate', required: false)
|
||||||
|
if desktop_utils.found()
|
||||||
|
test('Validate desktop file', desktop_utils, args: [desktop_file])
|
||||||
|
endif
|
||||||
|
|
||||||
|
appstream_file = i18n.merge_file(
|
||||||
|
input: 'com.brodybrooks.WorldBuilder.metainfo.xml.in',
|
||||||
|
output: 'com.brodybrooks.WorldBuilder.metainfo.xml',
|
||||||
|
po_dir: '../po',
|
||||||
|
install: true,
|
||||||
|
install_dir: get_option('datadir') / 'metainfo'
|
||||||
|
)
|
||||||
|
|
||||||
|
appstreamcli = find_program('appstreamcli', required: false, disabler: true)
|
||||||
|
test('Validate appstream file', appstreamcli,
|
||||||
|
args: ['validate', '--no-net', '--explain', appstream_file])
|
||||||
|
|
||||||
|
install_data('com.brodybrooks.WorldBuilder.gschema.xml',
|
||||||
|
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
|
||||||
|
)
|
||||||
|
|
||||||
|
compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true)
|
||||||
|
test('Validate schema file',
|
||||||
|
compile_schemas,
|
||||||
|
args: ['--strict', '--dry-run', meson.current_source_dir()])
|
||||||
|
|
||||||
|
|
||||||
|
service_conf = configuration_data()
|
||||||
|
service_conf.set('bindir', get_option('prefix') / get_option('bindir'))
|
||||||
|
configure_file(
|
||||||
|
input: 'com.brodybrooks.WorldBuilder.service.in',
|
||||||
|
output: 'com.brodybrooks.WorldBuilder.service',
|
||||||
|
configuration: service_conf,
|
||||||
|
install_dir: get_option('datadir') / 'dbus-1' / 'services'
|
||||||
|
)
|
||||||
|
|
||||||
|
subdir('icons')
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
project('worldbuilder', ['c', 'vala'],
|
||||||
|
version: '0.1.0',
|
||||||
|
meson_version: '>= 1.0.0',
|
||||||
|
default_options: [ 'warning_level=2', 'werror=false', ],
|
||||||
|
)
|
||||||
|
|
||||||
|
i18n = import('i18n')
|
||||||
|
gnome = import('gnome')
|
||||||
|
valac = meson.get_compiler('vala')
|
||||||
|
cc = meson.get_compiler('c')
|
||||||
|
|
||||||
|
|
||||||
|
srcdir = meson.project_source_root() / 'src'
|
||||||
|
|
||||||
|
config_h = configuration_data()
|
||||||
|
config_h.set_quoted('PACKAGE_VERSION', meson.project_version ())
|
||||||
|
config_h.set_quoted('GETTEXT_PACKAGE', 'worldbuilder')
|
||||||
|
config_h.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir'))
|
||||||
|
configure_file(output: 'config.h', configuration: config_h)
|
||||||
|
|
||||||
|
config_dep = valac.find_library ('config', dirs: srcdir)
|
||||||
|
config_inc = include_directories('.')
|
||||||
|
|
||||||
|
add_project_arguments('-DGETTEXT_PACKAGE="' + meson.project_name () + '"', language: 'c')
|
||||||
|
|
||||||
|
|
||||||
|
subdir('data')
|
||||||
|
subdir('src')
|
||||||
|
subdir('po')
|
||||||
|
|
||||||
|
gnome.post_install(
|
||||||
|
glib_compile_schemas: true,
|
||||||
|
gtk_update_icon_cache: true,
|
||||||
|
update_desktop_database: true,
|
||||||
|
)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# Please keep this file sorted alphabetically.
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# List of source files containing translatable strings.
|
||||||
|
# Please keep this file sorted alphabetically.
|
||||||
|
data/com.brodybrooks.WorldBuilder.desktop.in
|
||||||
|
data/com.brodybrooks.WorldBuilder.metainfo.xml.in
|
||||||
|
data/com.brodybrooks.WorldBuilder.gschema.xml
|
||||||
|
src/main.vala
|
||||||
|
src/window.vala
|
||||||
|
src/window.ui
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
i18n.gettext('worldbuilder', preset: 'glib')
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
/* application.vala
|
||||||
|
*
|
||||||
|
* Copyright 2026 Brody Brooks
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Worldbuilder.Application : Adw.Application {
|
||||||
|
|
||||||
|
public Application () {
|
||||||
|
Object (
|
||||||
|
application_id: "com.brodybrooks.WorldBuilder",
|
||||||
|
flags: ApplicationFlags.DEFAULT_FLAGS,
|
||||||
|
resource_base_path: "/com/brodybrooks/WorldBuilder"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
construct {
|
||||||
|
ActionEntry[] action_entries = {
|
||||||
|
{ "about", this.on_about_action },
|
||||||
|
{ "preferences", this.on_preferences_action },
|
||||||
|
{ "quit", this.quit }
|
||||||
|
};
|
||||||
|
this.add_action_entries (action_entries, this);
|
||||||
|
this.set_accels_for_action ("app.quit", {"<control>q"});
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void activate () {
|
||||||
|
base.activate ();
|
||||||
|
var win = this.active_window ?? new Worldbuilder.Window (this);
|
||||||
|
win.present ();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void on_about_action () {
|
||||||
|
string[] developers = { "Brody Brooks" };
|
||||||
|
var about = new Adw.AboutDialog () {
|
||||||
|
application_name = "WorldBuilder",
|
||||||
|
application_icon = "com.brodybrooks.WorldBuilder",
|
||||||
|
developer_name = "Brody Brooks",
|
||||||
|
translator_credits = _("translator-credits"),
|
||||||
|
version = "0.1.0",
|
||||||
|
developers = developers,
|
||||||
|
copyright = "© 2026 Brody Brooks",
|
||||||
|
};
|
||||||
|
|
||||||
|
about.present (this.active_window);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void on_preferences_action () {
|
||||||
|
message ("app.preferences action activated");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
|
||||||
|
namespace Config {
|
||||||
|
public const string GETTEXT_PACKAGE;
|
||||||
|
public const string LOCALEDIR;
|
||||||
|
public const string PACKAGE_VERSION;
|
||||||
|
}
|
||||||
@@ -0,0 +1,191 @@
|
|||||||
|
/**
|
||||||
|
* A 4-by-4 matrix useful in OpenGL matrix operations.
|
||||||
|
*/
|
||||||
|
public struct Ch3.Mat4x4 {
|
||||||
|
public float data[4*4];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new matrix with a value along its diagonal.
|
||||||
|
*/
|
||||||
|
public Mat4x4 (float diagonal_value) {
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
this[i, i] = diagonal_value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Mat4x4.identity () {
|
||||||
|
this (1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct a perspective transform.
|
||||||
|
*
|
||||||
|
* @param fov field of view, angle in radians
|
||||||
|
* @param aspect_ratio width / height
|
||||||
|
* @param near distance to near plane along the z axis
|
||||||
|
* @param far distance to far plane along the z axis
|
||||||
|
*/
|
||||||
|
public Mat4x4.perspective (float fov, float aspect_ratio, float near, float far) {
|
||||||
|
// see http://www.songho.ca/opengl/gl_projectionmatrix.html
|
||||||
|
|
||||||
|
float height_2 = Math.tanf (fov / 2) * near;
|
||||||
|
float width_2 = aspect_ratio * height_2;
|
||||||
|
|
||||||
|
this[0, 0] = near / width_2;
|
||||||
|
|
||||||
|
this[1, 1] = near / height_2;
|
||||||
|
|
||||||
|
this[2, 2] = -(far + near) / (far - near);
|
||||||
|
this[2, 3] = -2 * far * near / (far - near);
|
||||||
|
|
||||||
|
this[3, 2] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a transformation matrix for a camera looking at `target` from
|
||||||
|
* `position`.
|
||||||
|
*
|
||||||
|
* @param position the position of the camera
|
||||||
|
* @param target what the camera is looking at
|
||||||
|
* @param up a direction that represents "up"
|
||||||
|
*/
|
||||||
|
public Mat4x4.look_at (Vec3 position, Vec3 target, Vec3 up) {
|
||||||
|
// see https://learnopengl.com/Getting-started/Camera
|
||||||
|
|
||||||
|
up = up.normalized ();
|
||||||
|
var direction = position.subtract (target).normalized ();
|
||||||
|
var right = up.cross (direction).normalized ();
|
||||||
|
up = direction.cross (right).normalized ();
|
||||||
|
|
||||||
|
this[0, 0] = right.x;
|
||||||
|
this[0, 1] = right.y;
|
||||||
|
this[0, 2] = right.z;
|
||||||
|
this[0, 3] = right.x * (-position.x) + right.y + (-position.y) + right.z * (-position.z);
|
||||||
|
|
||||||
|
this[1, 0] = up.x;
|
||||||
|
this[1, 1] = up.y;
|
||||||
|
this[1, 2] = up.z;
|
||||||
|
this[1, 3] = up.x * (-position.x) + up.y * (-position.y) + up.z * (-position.z);
|
||||||
|
|
||||||
|
this[2, 0] = direction.x;
|
||||||
|
this[2, 1] = direction.y;
|
||||||
|
this[2, 2] = direction.z;
|
||||||
|
this[2, 3] = direction.x * (-position.x) + direction.y * (-position.y) + direction.z * (-position.z);
|
||||||
|
|
||||||
|
this[3, 3] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void set (int row, int col, float value) {
|
||||||
|
data[col*4 + row] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float get (int row, int col) {
|
||||||
|
return data[col*4 + row];
|
||||||
|
}
|
||||||
|
|
||||||
|
public Mat4x4 write (int row, int col, float value) {
|
||||||
|
var copy = this;
|
||||||
|
copy[row, col] = value;
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Mat4x4 rotateX (float radians) {
|
||||||
|
// see https://learnopengl.com/Getting-started/Transformations
|
||||||
|
var copy = this;
|
||||||
|
// rotate around x axis
|
||||||
|
float sin_x, cos_x;
|
||||||
|
Math.sincosf (radians, out sin_x, out cos_x);
|
||||||
|
for (int col = 0; col < 4; col++) {
|
||||||
|
// copy[0, col] = this[0, col];
|
||||||
|
copy[1, col] = cos_x * this[1, col] - sin_x * this[2, col];
|
||||||
|
copy[2, col] = sin_x * this[1, col] + cos_x * this[2, col];
|
||||||
|
// copy[3, col] = this[3, col];
|
||||||
|
}
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Mat4x4 rotateY (float radians) {
|
||||||
|
var copy = this;
|
||||||
|
// rotate around y axis
|
||||||
|
float sin_y, cos_y;
|
||||||
|
Math.sincosf (radians, out sin_y, out cos_y);
|
||||||
|
for (int col = 0; col < 4; col++) {
|
||||||
|
copy[0, col] = cos_y * this[0, col] + sin_y * this[2, col];
|
||||||
|
// copy[1, col] = this[1, col];
|
||||||
|
copy[2, col] = -sin_y * this[0, col] + cos_y * this[2, col];
|
||||||
|
// copy[3, col] = this[3, col];
|
||||||
|
}
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Mat4x4 rotateZ (float radians) {
|
||||||
|
var copy = this;
|
||||||
|
// rotate around z axis
|
||||||
|
float sin_z, cos_z;
|
||||||
|
Math.sincosf (radians, out sin_z, out cos_z);
|
||||||
|
for (int col = 0; col < 4; col++) {
|
||||||
|
copy[0, col] = cos_z * this[0, col] - sin_z * this[1, col];
|
||||||
|
copy[1, col] = sin_z * this[0, col] + cos_z * this[1, col];
|
||||||
|
// copy[2, col] = this[2, col];
|
||||||
|
// copy[3, col] = this[3, col];
|
||||||
|
}
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Mat4x4 scale (float x, float y, float z) {
|
||||||
|
var copy = this;
|
||||||
|
copy[0, 0] *= x;
|
||||||
|
copy[1, 1] *= y;
|
||||||
|
copy[2, 2] *= z;
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Mat4x4 translate (float x, float y, float z) {
|
||||||
|
var copy = this;
|
||||||
|
copy[0, 3] += x;
|
||||||
|
copy[1, 3] += y;
|
||||||
|
copy[2, 3] += z;
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Mat4x4 multiply (Mat4x4 other) {
|
||||||
|
var result = Mat4x4 (0);
|
||||||
|
|
||||||
|
// this x other = result
|
||||||
|
for (int row = 0; row < 4; row++)
|
||||||
|
for (int col = 0; col < 4; col++)
|
||||||
|
for (int k = 0; k < 4; k++) // FIXME: codegen with result[row, col] += ... versus = ... + ...
|
||||||
|
result[row, col] = result[row, col] + this[row, k] * other[k, col];
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string to_string (string format = "%f") {
|
||||||
|
string vals[4*4];
|
||||||
|
int maxlen = 0;
|
||||||
|
|
||||||
|
for (int row = 0; row < 4; row++) {
|
||||||
|
for (int col = 0; col < 4; col++) {
|
||||||
|
vals[col*4 + row] = this[row, col].to_string (format);
|
||||||
|
var len = vals[col*4 + row].length;
|
||||||
|
if (len > maxlen)
|
||||||
|
maxlen = len;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var sb = new StringBuilder ();
|
||||||
|
for (int row = 0; row < 4; row++) {
|
||||||
|
sb.append ("| ");
|
||||||
|
for (int col = 0; col < 4; col++) {
|
||||||
|
var len = vals[col*4 + row].length;
|
||||||
|
sb.append (vals[col*4 + row]);
|
||||||
|
for (int i = 0; i < maxlen - len; i++)
|
||||||
|
sb.append_c (' ');
|
||||||
|
if (col < 3)
|
||||||
|
sb.append_c (' ');
|
||||||
|
}
|
||||||
|
sb.append (" |\n");
|
||||||
|
}
|
||||||
|
return sb.str;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
public struct Worldbuilder.Vector2 {
|
||||||
|
public float x;
|
||||||
|
public float y;
|
||||||
|
|
||||||
|
public Vec2 (float x = 0, float y = 0) {
|
||||||
|
this.x = x;
|
||||||
|
this.y = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string to_string () {
|
||||||
|
return @"<$x,$y>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
public struct Worldbuilder.Vector3 {
|
||||||
|
public float x;
|
||||||
|
public float y;
|
||||||
|
public float z;
|
||||||
|
|
||||||
|
public Vector3 (float x = 0, float y = 0, float z = 0)
|
||||||
|
{
|
||||||
|
this.x = x;
|
||||||
|
this.y = y;
|
||||||
|
this.z = z;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 normalized ()
|
||||||
|
requires (length >= 1e-9)
|
||||||
|
{
|
||||||
|
return Vector3 (x/length, y/length, z/length);
|
||||||
|
}
|
||||||
|
|
||||||
|
public float length
|
||||||
|
{
|
||||||
|
get { return Math.sqrtf (x*x + y*y + z*z); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 add (Vector3 other)
|
||||||
|
{
|
||||||
|
return Vector3 (x + other.x, y + other.y, z + other.z);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 subtract (Vector3 other)
|
||||||
|
{
|
||||||
|
return Vector3 (x - other.x, y - other.y, z - other.z);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 cross (Vector3 other)
|
||||||
|
{
|
||||||
|
return Vector3 (y * other.z - z * other.y, -(x * other.z - z * other.x), x * other.y - y * other.x);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string to_string ()
|
||||||
|
{
|
||||||
|
return @"<$x,$y,$z>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
/* main.vala
|
||||||
|
*
|
||||||
|
* Copyright 2026 Brody Brooks
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
|
||||||
|
int main (string[] args) {
|
||||||
|
Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR);
|
||||||
|
Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8");
|
||||||
|
Intl.textdomain (Config.GETTEXT_PACKAGE);
|
||||||
|
|
||||||
|
var app = new Worldbuilder.Application ();
|
||||||
|
return app.run (args);
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
worldbuilder_sources = [
|
||||||
|
'main.vala',
|
||||||
|
'application.vala',
|
||||||
|
'window.vala',
|
||||||
|
]
|
||||||
|
|
||||||
|
worldbuilder_deps = [
|
||||||
|
config_dep,
|
||||||
|
dependency('gtk4', version: '>= 4.2'),
|
||||||
|
dependency('libadwaita-1', version: '>= 1.4'),
|
||||||
|
cc.find_library('epoxy'),
|
||||||
|
valac.find_library('gl', dirs: meson.source_root() / 'vapi'),
|
||||||
|
]
|
||||||
|
|
||||||
|
worldbuilder_sources += gnome.compile_resources('worldbuilder-resources',
|
||||||
|
'worldbuilder.gresource.xml',
|
||||||
|
c_name: 'worldbuilder'
|
||||||
|
)
|
||||||
|
|
||||||
|
executable('worldbuilder', worldbuilder_sources,
|
||||||
|
dependencies: worldbuilder_deps,
|
||||||
|
include_directories: config_inc,
|
||||||
|
install: true,
|
||||||
|
)
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
public class Worldbuilder.SceneRenderer : Object
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<interface>
|
||||||
|
<object class="AdwShortcutsDialog" id="shortcuts_dialog">
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsSection">
|
||||||
|
<property name="title" translatable="yes">Shortcuts</property>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Show Shortcuts</property>
|
||||||
|
<property name="action-name">app.shortcuts</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="AdwShortcutsItem">
|
||||||
|
<property name="title" translatable="yes" context="shortcut window">Quit</property>
|
||||||
|
<property name="action-name">app.quit</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk" version="4.0"/>
|
||||||
|
<requires lib="Adw" version="1.0"/>
|
||||||
|
<template class="WorldbuilderWindow" parent="AdwApplicationWindow">
|
||||||
|
<property name="title" translatable="yes">WorldBuilder</property>
|
||||||
|
<style>
|
||||||
|
<class name="devel"/>
|
||||||
|
</style>
|
||||||
|
<property name="default-width">800</property>
|
||||||
|
<property name="default-height">600</property>
|
||||||
|
<property name="content">
|
||||||
|
<object class="AdwToolbarView">
|
||||||
|
|
||||||
|
<child type="top">
|
||||||
|
<object class="AdwHeaderBar">
|
||||||
|
<child type="end">
|
||||||
|
<object class="GtkMenuButton">
|
||||||
|
<property name="primary">True</property>
|
||||||
|
<property name="icon-name">open-menu-symbolic</property>
|
||||||
|
<property name="tooltip-text" translatable="yes">Main Menu</property>
|
||||||
|
<property name="menu-model">primary_menu</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<property name="content">
|
||||||
|
<object class="GtkGLArea" id="draw_area">
|
||||||
|
<property name="hexpand">true</property>
|
||||||
|
<property name="vexpand">true</property>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
|
</template>
|
||||||
|
<menu id="primary_menu">
|
||||||
|
<section>
|
||||||
|
<item>
|
||||||
|
<attribute name="label" translatable="yes">_Preferences</attribute>
|
||||||
|
<attribute name="action">app.preferences</attribute>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
|
||||||
|
<attribute name="action">app.shortcuts</attribute>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<attribute name="label" translatable="yes">_About WorldBuilder</attribute>
|
||||||
|
<attribute name="action">app.about</attribute>
|
||||||
|
</item>
|
||||||
|
</section>
|
||||||
|
</menu>
|
||||||
|
</interface>
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/* window.vala
|
||||||
|
*
|
||||||
|
* Copyright 2026 Brody Brooks
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
|
||||||
|
[GtkTemplate (ui = "/com/brodybrooks/WorldBuilder/window.ui")]
|
||||||
|
public class Worldbuilder.Window : Adw.ApplicationWindow {
|
||||||
|
[GtkChild]
|
||||||
|
private unowned Gtk.GLArea draw_area;
|
||||||
|
|
||||||
|
public Window (Gtk.Application app) {
|
||||||
|
Object (application: app);
|
||||||
|
|
||||||
|
draw_area.render.connect(Render);
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool Render (Gtk.GLArea area, Gdk.GLContext context)
|
||||||
|
{
|
||||||
|
// set the background color
|
||||||
|
GL.glClearColor (0.1f, 0.2f, 0.4f, 1.0f);
|
||||||
|
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<gresources>
|
||||||
|
<gresource prefix="/com/brodybrooks/WorldBuilder">
|
||||||
|
<file preprocess="xml-stripblanks">window.ui</file>
|
||||||
|
<file preprocess="xml-stripblanks">shortcuts-dialog.ui</file>
|
||||||
|
</gresource>
|
||||||
|
</gresources>
|
||||||
+14555
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user