Add GtkUi 2.0

This commit is contained in:
daleclack 2021-04-17 11:21:30 +08:00
parent 6233612030
commit 105fd2c76e
55 changed files with 4873 additions and 0 deletions

59
Gtk3/.vscode/c_cpp_properties.json vendored Normal file
View File

@ -0,0 +1,59 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
//For linux amd64 and linux on arm64,some include path may different
//Commet and uncomment these lines to compile on a specificed archtiecture
//Arm64 linux libs
/*
"/usr/lib/aarch64-linux-gnu/dbus-1.0/include/**",
"/usr/lib/aarch64-linux-gnu/glib-2.0/include",
*/
//amd64 linux libs(For ubuntu)
/*
"/usr/lib/x86_64-linux-gnu/dbus-1.0/include",
"/usr/lib/x86_64-linux-gnu/glib-2.0/include",
*/
//For debian and ubuntu,kali
/*
"/usr/include/gtk-3.0/gtk/**",
"/usr/include/uuid/**",
*/
//For manjaro(Arch linux)
"/usr/lib/dbus-1.0/include/**",
"/usr/lib/glib-2.0/include/**",
"/usr/include/lzo/**",
"/usr/include/cloudproviders/**",
"${workspaceFolder}/**",
"/usr/include/gtk-3.0/**",
"/usr/include/at-spi2-atk/2.0/**",
"/usr/include/at-spi-2.0/**",
"/usr/include/dbus-1.0/**",
"/usr/include/gio-unix-2.0/**",
"/usr/include/cairo/**",
"/usr/include/pango-1.0/**",
"/usr/include/fribidi/**",
"/usr/include/harfbuzz/**",
"/usr/include/atk-1.0/**",
"/usr/include/pixman-1/**",
"/usr/include/freetype2/**",
"/usr/include/libpng16/**",
"/usr/include/gdk-pixbuf-2.0/**",
"/usr/include/libmount/**",
"/usr/include/blkid/**",
"/usr/include/glib-2.0/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "gnu17",
"cppStandard": "gnu++14",
"intelliSenseMode": "gcc-arm64",
"compilerArgs": [
"`pkg-config --cflags --libs gtk+-3.0`"
],
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}

29
Gtk3/.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,29 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "g++ - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/bin/gtk42",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++ build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
]
}

4
Gtk3/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,4 @@
{
"C_Cpp.errorSquiggles": "Disabled",
"cmake.configureOnOpen": false
}

82
Gtk3/.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,82 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-g",
"src/*.cpp",
"-o",
"${workspaceFolder}/bin/gtk42",
"-pthread",
//For Arm64 linux
/*
"-I/usr/lib/aarch64-linux-gnu/dbus-1.0/include",
"-I/usr/lib/aarch64-linux-gnu/glib-2.0/include",
*/
//For amd64 linux
/*
"-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include",
"-I/usr/lib/x86_64-linux-gnu/glib-2.0/include",
*/
//Ubuntu and kali include paths
/*
"-I/usr/include/uuid",
*/
//Manjaro linux and Arch linux include args
"-I${workspaceFolder}",
"-I/usr/lib/glib-2.0/include",
"-I/usr/lib/dbus-1.0/include",
"-I/usr/include/lzo",
"-I/usr/include/cloudproviders",
"-I/usr/include/gtk-3.0",
"-I/usr/include/at-spi2-atk/2.0",
"-I/usr/include/at-spi-2.0",
"-I/usr/include/dbus-1.0",
"-I/usr/include/gio-unix-2.0",
"-I/usr/include/cairo",
"-I/usr/include/pango-1.0",
"-I/usr/include/fribidi",
"-I/usr/include/harfbuzz",
"-I/usr/include/atk-1.0",
"-I/usr/include/pixman-1",
"-I/usr/include/freetype2",
"-I/usr/include/libpng16",
"-I/usr/include/gdk-pixbuf-2.0",
"-I/usr/include/libmount",
"-I/usr/include/blkid",
"-I/usr/include/glib-2.0",
//Manjaro linux lib args
"-lz",
"-lgtk-3",
"-lgdk-3",
"-lpangocairo-1.0",
"-lpango-1.0",
"-lharfbuzz",
"-latk-1.0",
"-lcairo-gobject",
"-lcairo",
"-lgdk_pixbuf-2.0",
"-lgio-2.0",
"-lgobject-2.0",
"-lglib-2.0",
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}

1
Gtk3/bin/README Normal file
View File

@ -0,0 +1 @@

57
Gtk3/gtk42/gtk42.cbp Normal file
View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="gtk42" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/gtk42" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
<Add directory="../" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/Release/gtk42" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
<Add directory="../" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Unit filename="../src/background.cpp" />
<Unit filename="../src/background.h" />
<Unit filename="../src/game.cpp" />
<Unit filename="../src/game.h" />
<Unit filename="../src/main.cpp" />
<Unit filename="../src/panel1.cpp" />
<Unit filename="../src/panel1.h" />
<Unit filename="../src/panel2.cpp" />
<Unit filename="../src/panel2.h" />
<Unit filename="../src/resources.cpp" />
<Unit filename="../src/win1.cpp" />
<Unit filename="../src/win1.h" />
<Unit filename="../src/winconf.cpp" />
<Unit filename="../src/winconf.h" />
<Unit filename="icon.rc">
<Option compilerVar="WINDRES" />
</Unit>
<Extensions>
<lib_finder disable_auto="1" />
</Extensions>
</Project>
</CodeBlocks_project_file>

67
Gtk3/gtk42/gtk42.depend Normal file
View File

@ -0,0 +1,67 @@
# depslib dependency file v1.0
1613552905 source:d:\gtk3\gtk42\src\background.cpp
"background.h"
"winconf.h"
"winpe.xpm"
1613195745 d:\gtk3\gtk42\src\background.h
<gtk/gtk.h>
1613270288 d:\gtk3\gtk42\src\winconf.h
<gtk/gtk.h>
1613125939 d:\gtk3\gtk42\\winpe.xpm
1614135385 source:d:\gtk3\gtk42\src\main.cpp
<gtk/gtk.h>
"background.h"
"winconf.h"
"panel1.h"
"panel2.h"
1613357404 d:\gtk3\gtk42\src\panel1.h
<gtk/gtk.h>
1613650403 d:\gtk3\gtk42\src\panel2.h
<gtk/gtk.h>
1613872672 source:d:\gtk3\gtk42\src\panel1.cpp
<ctime>
"panel1.h"
"winconf.h"
"background.h"
1613549116 source:d:\gtk3\gtk42\src\win1.cpp
"win1.h"
1613879080 d:\gtk3\gtk42\src\win1.h
<gtk/gtk.h>
1613552872 source:d:\gtk3\gtk42\src\winconf.cpp
<cstdio>
"winconf.h"
1613125939 d:\gtk3\gtk42\src\winpe.xpm
1613879180 source:d:\gtk3\gtk42\src\panel2.cpp
<cstdlib>
<thread>
"panel2.h"
"win1.h"
"game.h"
1614135733 source:d:\gtk3\gtk42\src\resources.cpp
<gio/gio.h>
<stdlib.h>
1613650621 source:d:\gtk3\gtk42\gtk42\icon.rc
1613878878 d:\gtk3\gtk42\src\game.h
<gtk/gtk.h>
<ctime>
<cstdlib>
<cstring>
1613878921 source:d:\gtk3\gtk42\src\game.cpp
"game.h"

30
Gtk3/gtk42/gtk42.layout Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Release" />
<File name="icon.rc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="28" topLine="0" />
</Cursor>
</File>
<File name="..\src\panel2.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="735" topLine="57" />
</Cursor>
</File>
<File name="..\src\panel2.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="399" topLine="0" />
</Cursor>
</File>
<File name="..\src\panel1.cpp" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="16" topLine="0" />
</Cursor>
</File>
<File name="..\src\main.cpp" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="883" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>

1
Gtk3/gtk42/icon.rc Normal file
View File

@ -0,0 +1 @@
MAINICON ICON "Icon_1.ico"

BIN
Gtk3/gtk42/icon_1.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

BIN
Gtk3/res/audacious.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

View File

@ -0,0 +1 @@
glib-compile-resources gtk42.resource.xml --target=../src/resources.cpp --generate-source

219
Gtk3/res/game1.ui Normal file
View File

@ -0,0 +1,219 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkWindow" id="window">
<property name="can-focus">False</property>
<property name="border-width">15</property>
<property name="title" translatable="yes">gtk31-guess</property>
<property name="destroy-with-parent">True</property>
<child>
<!-- n-columns=5 n-rows=7 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Select a button</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_1">
<property name="label" translatable="yes">1</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_2">
<property name="label" translatable="yes">2</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_3">
<property name="label" translatable="yes">3</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_4">
<property name="label" translatable="yes">4</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_go">
<property name="label" translatable="yes">Go</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_exit">
<property name="label" translatable="yes">Exit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="width-request">20</property>
<property name="height-request">20</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="width-request">20</property>
<property name="height-request">20</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="width-request">20</property>
<property name="height-request">20</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>

219
Gtk3/res/game1.ui~ Normal file
View File

@ -0,0 +1,219 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkWindow" id="window">
<property name="can-focus">False</property>
<property name="border-width">15</property>
<property name="title" translatable="yes">gtk31-guess</property>
<property name="destroy-with-parent">True</property>
<child>
<!-- n-columns=5 n-rows=7 -->
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkLabel" id="label">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Select a button</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_1">
<property name="label" translatable="yes">1</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_2">
<property name="label" translatable="yes">2</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_3">
<property name="label" translatable="yes">3</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_4">
<property name="label" translatable="yes">4</property>
<property name="width-request">100</property>
<property name="height-request">100</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image-position">top</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_go">
<property name="label" translatable="yes">Go</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_exit">
<property name="label" translatable="yes">Exit</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="left-attach">3</property>
<property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="width-request">20</property>
<property name="height-request">20</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="width-request">20</property>
<property name="height-request">20</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="width-request">20</property>
<property name="height-request">20</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>

BIN
Gtk3/res/gedit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
Gtk3/res/graphics.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

37
Gtk3/res/graphics.svg Normal file
View File

@ -0,0 +1,37 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' height='16' id='svg7384' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:svg='http://www.w3.org/2000/svg' version='1.1' width='16.180347' xmlns='http://www.w3.org/2000/svg'>
<metadata id='metadata20854'>
<rdf:RDF>
<cc:Work rdf:about=''>
<dc:title/>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs id='defs7386'>
<linearGradient id='linearGradient5606' osb:paint='solid'>
<stop id='stop5608' offset='0' style='stop-color:#000000;stop-opacity:1;'/>
</linearGradient>
<linearGradient id='linearGradient4526' osb:paint='solid'>
<stop id='stop4528' offset='0' style='stop-color:#ffffff;stop-opacity:1;'/>
</linearGradient>
<linearGradient id='linearGradient3600-4' osb:paint='gradient'>
<stop id='stop3602-7' offset='0' style='stop-color:#f4f4f4;stop-opacity:1'/>
<stop id='stop3604-6' offset='1' style='stop-color:#dbdbdb;stop-opacity:1'/>
</linearGradient>
</defs>
<g id='layer9' label='status' style='display:inline' transform='translate(-772.9997,-93.000005)'/>
<g id='layer2' style='display:inline' transform='translate(-531.9995,-460)'/>
<g id='layer4' style='display:inline' transform='translate(-531.9995,-460)'/>
<g id='g1812' style='display:inline' transform='translate(-531.9995,-460)'/>
<g id='g6217' style='display:inline' transform='translate(-531.9995,-460)'/>
<g id='layer3' style='display:inline' transform='translate(-531.9995,-460)'>
<path d='m 543.5,463 c -0.82843,0 -1.5,0.67157 -1.5,1.5 0,0.82843 0.67157,1.5 1.5,1.5 0.82843,0 1.5,-0.67157 1.5,-1.5 0,-0.82843 -0.67157,-1.5 -1.5,-1.5 z' id='path4527-0-5' style='color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5.99881363;marker:none;enable-background:accumulate'/>
<path d='m 535.99364,461 c -1.2582,0.0145 -2.17889,-0.0306 -2.93164,0.38477 -0.37637,0.20766 -0.67323,0.55938 -0.83789,0.99804 -0.16467,0.43867 -0.22461,0.95958 -0.22461,1.61719 v 4 4 c 0,0.65761 0.0599,1.17853 0.22461,1.61719 0.16467,0.43865 0.46152,0.79039 0.83789,0.99804 0.75275,0.41532 1.67345,0.3702 2.93164,0.38477 h 0.004 2.00195 4.125 2.00195 0.004 c 1.25819,-0.0146 2.17889,0.0306 2.93164,-0.38477 0.37637,-0.20765 0.67322,-0.55939 0.83789,-0.99804 0.16453,-0.43866 0.38385,-0.9792 0.22443,-1.61719 v -4 -4 c 0,-0.65761 -0.0599,-1.17852 -0.22461,-1.61719 -0.16466,-0.43866 -0.46152,-0.79038 -0.83789,-0.99804 -0.75275,-0.41537 -1.67344,-0.37027 -2.93164,-0.38477 h -0.004 -2.00186 -4.125 -2.00195 z m 2.00586,1 h 4.125 c 2,0 3.48446,-0.0156 4.22656,0.22461 0.98348,0.44721 0.77344,1.77539 0.77344,2.77539 -8.5e-4,2.12317 -0.0362,4.67696 -0.125,7 h -4.875 -4.125 -4.875 c -0.0888,-2.32304 -0.12415,-4.87683 -0.125,-7 0,-1 -0.21004,-2.32818 0.77344,-2.77539 C 534.51513,461.98438 535.9995,462 537.9995,462 Z' id='rect4520-6-6' style='color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.99920893;marker:none;enable-background:accumulate'/>
<path d='m 538,465.5 -3,5.5 H 537.71817 543 l -2.5,-4.5 -1,1.5 z' id='path4156-2-2' style='color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5.99881363;marker:none;enable-background:accumulate'/>
</g>
<g id='g1833' style='display:inline' transform='translate(-531.9995,-460)'/>
<g id='layer1' style='display:inline' transform='translate(-531.9995,-460)'/>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="gtk42">
<file>icon.png</file>
<file>audacious.png</file>
<file>gedit.png</file>
<file>vlc.png</file>
<file>user-home.png</file>
<file>icon.jpg</file>
<file>graphics.png</file>
<file>system.png</file>
<file>log-out.png</file>
<file preprocess="xml-stripblanks">window.ui</file>
<file preprocess="xml-stripblanks">leftpanel.ui</file>
<file preprocess="xml-stripblanks">toppanel.ui</file>
<file preprocess="xml-stripblanks">win_size.ui</file>
<file preprocess="xml-stripblanks">win1.ui</file>
<file preprocess="xml-stripblanks">game1.ui</file>
</gresource>
</gresources>

BIN
Gtk3/res/icon.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

BIN
Gtk3/res/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

258
Gtk3/res/leftpanel.ui Normal file
View File

@ -0,0 +1,258 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkPopover" id="popover1">
<property name="width-request">300</property>
<property name="height-request">400</property>
<property name="can-focus">False</property>
<property name="modal">False</property>
<child>
<object class="GtkNotebook">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tab-pos">left</property>
<property name="enable-popup">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="btnaud">
<property name="label" translatable="yes">audacious</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btngedit">
<property name="label" translatable="yes">Gedit Text Editor</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnvlc">
<property name="label" translatable="yes">VLC Media Player</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Applications (Linux)</property>
</object>
<packing>
<property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="btn_vlc">
<property name="label" translatable="yes">VLC Media Player</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_note">
<property name="label" translatable="yes">Notepad</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Applications (Win32)</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="btngame">
<property name="label" translatable="yes">Guess Game</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnabout">
<property name="label" translatable="yes">About</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image3</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">General Apps</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab-fill">False</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkButtonBox" id="left_panel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<property name="layout-style">start</property>
<child>
<object class="GtkMenuButton" id="btnstart">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="direction">right</property>
<property name="popover">popover1</property>
<child>
<object class="GtkImage" id="btn_image">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">start-here</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="stock">gtk-about</property>
</object>
</interface>

258
Gtk3/res/leftpanel.ui~ Normal file
View File

@ -0,0 +1,258 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkPopover" id="popover1">
<property name="width-request">300</property>
<property name="height-request">400</property>
<property name="can-focus">False</property>
<property name="modal">False</property>
<child>
<object class="GtkNotebook">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="tab-pos">left</property>
<property name="enable-popup">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="btnaud">
<property name="label" translatable="yes">audacious</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btngedit">
<property name="label" translatable="yes">Gedit Text Editor</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnvlc">
<property name="label" translatable="yes">VLC Media Player</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Applications (Linux)</property>
</object>
<packing>
<property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="btn_vlc">
<property name="label" translatable="yes">VLC Media Player</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btn_note">
<property name="label" translatable="yes">Notepad</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Applications (Win32)</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab-fill">False</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="btngame">
<property name="label" translatable="yes">Guess Game</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnabout">
<property name="label" translatable="yes">About</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image3</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">General Apps</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab-fill">False</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkButtonBox" id="left_panel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<property name="layout-style">start</property>
<child>
<object class="GtkMenuButton" id="btnstart">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="direction">right</property>
<property name="popover">popover1</property>
<child>
<object class="GtkImage" id="btn_image">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">start-here</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="stock">gtk-about</property>
</object>
</interface>

BIN
Gtk3/res/log-out.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

36
Gtk3/res/log-out.svg Normal file
View File

@ -0,0 +1,36 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' height='16' id='svg7384' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:svg='http://www.w3.org/2000/svg' version='1.1' width='16' xmlns='http://www.w3.org/2000/svg'>
<metadata id='metadata20854'>
<rdf:RDF>
<cc:Work rdf:about=''>
<dc:title/>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs id='defs7386'>
<linearGradient id='linearGradient5606' osb:paint='solid'>
<stop id='stop5608' offset='0' style='stop-color:#000000;stop-opacity:1;'/>
</linearGradient>
<linearGradient id='linearGradient4526' osb:paint='solid'>
<stop id='stop4528' offset='0' style='stop-color:#ffffff;stop-opacity:1;'/>
</linearGradient>
<linearGradient id='linearGradient3600-4' osb:paint='gradient'>
<stop id='stop3602-7' offset='0' style='stop-color:#f4f4f4;stop-opacity:1'/>
<stop id='stop3604-6' offset='1' style='stop-color:#dbdbdb;stop-opacity:1'/>
</linearGradient>
</defs>
<g id='layer9' label='status' style='display:inline' transform='translate(-333.00017,47)'/>
<g id='layer2' style='display:inline' transform='translate(-91.999969,-320)'/>
<g id='layer4' style='display:inline' transform='translate(-91.999969,-320)'/>
<g id='g1812' style='display:inline' transform='translate(-91.999969,-320)'/>
<g id='g6217' style='display:inline' transform='translate(-91.999969,-320)'/>
<g id='layer3' style='display:inline' transform='translate(-91.999969,-320)'/>
<g id='g1833' style='display:inline' transform='translate(-91.999969,-320)'/>
<g id='layer1' style='display:inline' transform='translate(-91.999969,-320)'>
<path d='m 92,321 v 14 h 11 v -5 h -1 v 4 h -9 v -12 h 9 v 5 h 1 v -6 z' id='rect3104' style='opacity:1;vector-effect:none;fill:#808080;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1'/>
<path d='m 107.08398,328 h -8.00195 v -2 c -0.76042,0.34766 -1.53409,0.73627 -2.32227,1.16602 -0.78078,0.43079 -1.53476,0.8757 -2.25976,1.33398 0.725,0.44911 1.47898,0.88953 2.25976,1.32031 0.78862,0.42999 1.56338,0.82276 2.32422,1.17969 v -2 h 8 z' id='path2614-6' style='color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:none;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:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.99999976;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate'/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
Gtk3/res/system.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

37
Gtk3/res/system.svg Normal file
View File

@ -0,0 +1,37 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' height='16' id='svg7384' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:svg='http://www.w3.org/2000/svg' version='1.1' width='16.01465' xmlns='http://www.w3.org/2000/svg'>
<metadata id='metadata20854'>
<rdf:RDF>
<cc:Work rdf:about=''>
<dc:title/>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
</cc:Work>
</rdf:RDF>
</metadata>
<defs id='defs7386'>
<linearGradient id='linearGradient5606' osb:paint='solid'>
<stop id='stop5608' offset='0' style='stop-color:#000000;stop-opacity:1;'/>
</linearGradient>
<linearGradient id='linearGradient4526' osb:paint='solid'>
<stop id='stop4528' offset='0' style='stop-color:#ffffff;stop-opacity:1;'/>
</linearGradient>
<linearGradient id='linearGradient3600-4' osb:paint='gradient'>
<stop id='stop3602-7' offset='0' style='stop-color:#f4f4f4;stop-opacity:1'/>
<stop id='stop3604-6' offset='1' style='stop-color:#dbdbdb;stop-opacity:1'/>
</linearGradient>
</defs>
<g id='layer9' label='status' style='display:inline' transform='translate(-893.0002,-93)'/>
<g id='layer2' style='display:inline' transform='translate(-652,-460)'/>
<g id='layer4' style='display:inline' transform='translate(-652,-460)'/>
<g id='g1812' style='display:inline' transform='translate(-652,-460)'/>
<g id='g6217' style='display:inline' transform='translate(-652,-460)'/>
<g id='layer3' style='display:inline' transform='translate(-652,-460)'>
<path d='m 660.18165,461.00391 c -2.48304,-0.0657 -4.92247,1.19408 -6.24805,3.49218 -1.9281,3.3427 -0.77551,7.62899 2.57032,9.5625 3.34581,1.93352 7.63439,0.79191 9.5625,-2.55078 1.9281,-3.34269 0.77551,-7.63289 -2.57032,-9.5664 -1.04556,-0.60423 -2.1858,-0.90763 -3.31445,-0.9375 z M 660.00001,462 a 6,6 0 0 1 6,6 6,6 0 0 1 -6,6 6,6 0 0 1 -6,-6 6,6 0 0 1 6,-6 z' id='path6626' style='color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:none;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:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.66666687;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate'/>
<path d='m 658.69016,460.122 v 1.545 c 0.86819,-0.1783 1.76406,-0.17647 2.63222,0.005 v -1.55 z m -2.75363,0.98912 -2.00544,1.70491 0.98801,1.17757 c 0.54939,-0.69591 1.23601,-1.27137 2.01736,-1.69076 z m 8.12867,0.0127 -0.99285,1.18353 c 0.0573,0.0293 0.11416,0.0595 0.17056,0.0905 0.71061,0.41285 1.33657,0.95679 1.84457,1.60287 l 1.00514,-1.19769 z m -11.60999,4.21684 -0.44056,2.59535 1.51535,0.26739 c -0.0273,-0.8866 0.12755,-1.76904 0.45509,-2.59274 z m 15.08573,0.003 -1.5228,0.26851 c 0.32999,0.82318 0.48779,1.70497 0.46365,2.59088 l 1.53286,-0.27 z m -13.68247,4.69464 -1.35149,0.78058 h -3.4e-4 l 1.33101,2.27098 1.33808,-0.77238 c -0.59006,-0.66203 -1.03836,-1.43772 -1.31723,-2.27918 z m 12.30081,0.003 c -0.13616,0.42225 -0.31536,0.82932 -0.53478,1.21481 -0.22083,0.38188 -0.48014,0.74014 -0.77388,1.0692 l 1.33883,0.77313 1.30158,-2.28811 z m -9.55687,3.47164 -0.53479,1.4688 2.47953,0.88448 0.52585,-1.44534 c -0.81119,-0.11877 -1.59279,-0.39022 -2.30338,-0.79995 -0.0563,-0.0351 -0.11203,-0.0711 -0.16721,-0.10799 z m 6.8133,0.0153 c -0.75448,0.46543 -1.59675,0.77091 -2.47468,0.89752 l 0.53031,1.45651 2.46761,-0.91651 z' id='path6628' style='color:#000000;display:inline;overflow:visible;visibility:visible;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.33333337;marker:none;enable-background:accumulate'/>
<path d='m 659.64845,463.01367 c -1.60235,0.11249 -3.12186,0.99052 -3.98242,2.48242 -1.37689,2.38706 -0.55308,5.45342 1.83593,6.83399 2.38903,1.38058 5.45319,0.56088 6.83008,-1.82617 1.37689,-2.38706 0.55308,-5.45145 -1.83594,-6.83203 -0.89588,-0.51773 -1.88625,-0.72569 -2.84765,-0.65821 z M 660.00001,464 a 4,4 0 0 1 4,4 4,4 0 0 1 -4,4 4,4 0 0 1 -4,-4 4,4 0 0 1 4,-4 z' id='path6630' style='color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:none;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:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#808080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.66666681;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate'/>
</g>
<g id='g1833' style='display:inline' transform='translate(-652,-460)'/>
<g id='layer1' style='display:inline' transform='translate(-652,-460)'/>
</svg>

After

Width:  |  Height:  |  Size: 6.2 KiB

28
Gtk3/res/title.ui Normal file
View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">start</property>
<child>
<object class="GtkLabel" id="labeltitle">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Gtk42 Desktop</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</interface>

28
Gtk3/res/title.ui~ Normal file
View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">start</property>
<child>
<object class="GtkLabel" id="labeltitle">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Gtk42 Desktop</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
</interface>

197
Gtk3/res/toppanel.ui Normal file
View File

@ -0,0 +1,197 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">ac-adapter-symbolic</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">system-help</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkPopover" id="popover1">
<property name="can-focus">False</property>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<property name="layout-style">start</property>
<child>
<object class="GtkButton" id="btnback">
<property name="label" translatable="yes">Change back</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image3</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnset">
<property name="label" translatable="yes">Win Settings</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image5</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="PanelExit">
<property name="label" translatable="yes">Exit mainwin</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image4</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkButtonBox" id="btnbox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="label_time">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">20:00 2021/2/14</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">6</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">7</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkVolumeButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="orientation">vertical</property>
<property name="icons">audio-volume-muted-symbolic
audio-volume-high-symbolic
audio-volume-low-symbolic
audio-volume-medium-symbolic</property>
<child internal-child="plus_button">
<object class="GtkButton">
<property name="can-focus">False</property>
<property name="receives-default">False</property>
</object>
</child>
<child internal-child="minus_button">
<object class="GtkButton">
<property name="can-focus">False</property>
<property name="receives-default">False</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">8</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkMenuButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="popover">popover1</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">9</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
</object>
</interface>

197
Gtk3/res/toppanel.ui~ Normal file
View File

@ -0,0 +1,197 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">ac-adapter-symbolic</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">system-help</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<object class="GtkPopover" id="popover1">
<property name="can-focus">False</property>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<property name="layout-style">start</property>
<child>
<object class="GtkButton" id="btnback">
<property name="label" translatable="yes">Change back</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image3</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnset">
<property name="label" translatable="yes">Win Settings</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image5</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="PanelExit">
<property name="label" translatable="yes">Exit mainwin</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image4</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkButtonBox" id="btnbox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="label_time">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">20:00 2021/2/14</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">6</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<property name="relief">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">7</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkVolumeButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="orientation">vertical</property>
<property name="icons">audio-volume-muted-symbolic
audio-volume-high-symbolic
audio-volume-low-symbolic
audio-volume-medium-symbolic</property>
<child internal-child="plus_button">
<object class="GtkButton">
<property name="can-focus">False</property>
<property name="receives-default">False</property>
</object>
</child>
<child internal-child="minus_button">
<object class="GtkButton">
<property name="can-focus">False</property>
<property name="receives-default">False</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">8</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkMenuButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="relief">none</property>
<property name="popover">popover1</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">9</property>
<property name="non-homogeneous">True</property>
</packing>
</child>
</object>
</interface>

BIN
Gtk3/res/user-home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
Gtk3/res/vlc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

36
Gtk3/res/win1.ui Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkAboutDialog" id="window1">
<property name="can-focus">False</property>
<property name="type-hint">dialog</property>
<property name="program-name">Gtk Ui</property>
<property name="version">2.0</property>
<property name="copyright" translatable="yes">2020-2021 Xe Corporation</property>
<property name="website">github.com/daleclack</property>
<property name="authors">Dale </property>
<property name="logo-icon-name">org.gtk.daleclack</property>
<child internal-child="vbox">
<object class="GtkBox" id="window">
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="layout-style">end</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>

36
Gtk3/res/win1.ui~ Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkAboutDialog" id="window1">
<property name="can-focus">False</property>
<property name="type-hint">dialog</property>
<property name="program-name">Gtk Ui</property>
<property name="version">2.0</property>
<property name="copyright" translatable="yes">2020-2021 Xe Corporation</property>
<property name="website">github.com/daleclack</property>
<property name="authors">Dale </property>
<property name="logo-icon-name">org.gtk.daleclack</property>
<child internal-child="vbox">
<object class="GtkBox" id="window">
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="layout-style">end</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>

158
Gtk3/res/win_size.ui Normal file
View File

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<object class="GtkDialog" id="dialog">
<property name="can-focus">False</property>
<property name="title" translatable="yes">Window size config</property>
<property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="btncancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</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="btnok">
<property name="label" translatable="yes">OK</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Input window size</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkEntry" id="entry_width">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">x</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_height">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnGet">
<property name="label" translatable="yes">Get size</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="btn_default">
<property name="label" translatable="yes">Use default config</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-6">btncancel</action-widget>
<action-widget response="-5">btnok</action-widget>
</action-widgets>
</object>
</interface>

159
Gtk3/res/win_size.ui~ Normal file
View File

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkDialog" id="dialog">
<property name="can-focus">False</property>
<property name="title" translatable="yes">Window size config</property>
<property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<object class="GtkButton" id="btncancel">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</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="btnok">
<property name="label" translatable="yes">OK</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Input window size</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkEntry" id="entry_width">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">x</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_height">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnGet">
<property name="label" translatable="yes">Get size</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButtonBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="layout-style">end</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="btn_default">
<property name="label" translatable="yes">Use default config</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-6">btncancel</action-widget>
<action-widget response="-5">btnok</action-widget>
</action-widgets>
</object>
</interface>

51
Gtk3/res/window.ui Normal file
View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">user-home</property>
</object>
<object class="GtkWindow" id="window">
<property name="can-focus">False</property>
<property name="title" translatable="yes">gtk(42)</property>
<property name="default-width">640</property>
<property name="default-height">360</property>
<property name="hide-titlebar-when-maximized">True</property>
<property name="icon-name">gtk4-icon</property>
<child>
<object class="GtkFixed" id="fixed">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkImage" id="background">
<property name="width-request">100</property>
<property name="height-request">80</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="stock">gtk-missing-image</property>
</object>
</child>
<child>
<object class="GtkButton" id="btn_home">
<property name="label" translatable="yes">Home</property>
<property name="width-request">100</property>
<property name="height-request">80</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<property name="relief">none</property>
<property name="image-position">top</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="x">70</property>
<property name="y">30</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

51
Gtk3/res/window.ui~ Normal file
View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">user-home</property>
</object>
<object class="GtkWindow" id="window">
<property name="can-focus">False</property>
<property name="title" translatable="yes">gtk(42)</property>
<property name="default-width">640</property>
<property name="default-height">360</property>
<property name="hide-titlebar-when-maximized">True</property>
<property name="icon-name">gtk4-icon</property>
<child>
<object class="GtkFixed" id="fixed">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkImage" id="background">
<property name="width-request">100</property>
<property name="height-request">80</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="stock">gtk-missing-image</property>
</object>
</child>
<child>
<object class="GtkButton" id="btn_home">
<property name="label" translatable="yes">Home</property>
<property name="width-request">100</property>
<property name="height-request">80</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<property name="relief">none</property>
<property name="image-position">top</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="x">70</property>
<property name="y">30</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

Binary file not shown.

52
Gtk3/src/background.cpp Normal file
View File

@ -0,0 +1,52 @@
#include "background.h"
#include "winconf.h"
#include "winpe.xpm"
void fileopen(GtkWidget *widget,GtkBuilder *builder){
GObject *parent=gtk_builder_get_object(builder,"window");
//Change background
GtkWidget *dialog;
GtkFileChooserAction action=GTK_FILE_CHOOSER_ACTION_OPEN;
dialog=gtk_file_chooser_dialog_new("Choose a image File",GTK_WINDOW(parent),action,
"OK",GTK_RESPONSE_OK,"Cancel",GTK_RESPONSE_CANCEL,NULL);
//Use GtkFileFilter to select image file
GtkFileFilter *filter=gtk_file_filter_new();
gtk_file_filter_add_pattern(filter,"*.png");
gtk_file_filter_add_pattern(filter,"*.jpg");
gtk_file_filter_add_pattern(filter,"*.jpeg");
gtk_file_filter_add_pattern(filter,"*.bmp");
gtk_file_filter_add_pattern(filter,"*.xpm");
gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog),filter);
gtk_widget_show(dialog);
g_signal_connect(dialog,"response",G_CALLBACK(dialog_response),builder);
}
void dialog_response(GtkWidget *widget,int response,GtkBuilder *builder){
//Handle file chooser response and set background
int width=640,height=360;
get_config(&width,&height);
GObject *background=gtk_builder_get_object(builder,"background");
const gchar *filename;
GFile *file;
//g_print("%s\n",filename);
if(response==GTK_RESPONSE_OK){
file=gtk_file_chooser_get_file(GTK_FILE_CHOOSER(widget));
filename=g_file_get_path(file);
GdkPixbuf *pixbuf=gdk_pixbuf_new_from_file(filename,NULL);
GdkPixbuf *sized=gdk_pixbuf_scale_simple(pixbuf,width,height,GDK_INTERP_BILINEAR);
gtk_image_set_from_pixbuf(GTK_IMAGE(background),sized);
g_object_unref(pixbuf);
g_object_unref(sized);
}
gtk_widget_destroy(widget);
}
void default_background(GtkBuilder *builder){
//Set the default background
int width=640,height=360;
get_config(&width,&height);
GObject *background=gtk_builder_get_object(builder,"background");
GdkPixbuf *pixbuf=gdk_pixbuf_new_from_xpm_data(winpe);
GdkPixbuf *sized=gdk_pixbuf_scale_simple(pixbuf,width,height,GDK_INTERP_BILINEAR);
gtk_image_set_from_pixbuf(GTK_IMAGE(background),sized);
}

14
Gtk3/src/background.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef __BACK_H_
#define __BACK_H_
#include <gtk/gtk.h>
void default_background(GtkBuilder *builder);
void fileopen(GtkWidget *widget,GtkBuilder *builder);
void dialog_response(GtkWidget *widget,int response,GtkBuilder *builder);
#endif

73
Gtk3/src/game.cpp Normal file
View File

@ -0,0 +1,73 @@
#include "game.h"
GObject *button[4];
GObject *label;
const char *btn_index[4]={"0","1","2","3"};
int flag;
void btn_click(GtkWidget *widget,gpointer data){
//Get image
GdkPixbuf *pixbuf=gdk_pixbuf_new_from_resource("/gtk42/icon.jpg",NULL);
GdkPixbuf *sized=gdk_pixbuf_scale_simple(pixbuf,50,50,GDK_INTERP_BILINEAR);
GtkWidget *image=gtk_image_new_from_pixbuf(sized);
//Get button index
char str[2];
strcpy(str,(char*)data);
//Set a image to the flag button and judge
gtk_button_set_image((GtkButton*)button[flag],image);
if(flag==str[0]-48){
gtk_label_set_label(GTK_LABEL(label),"Good luck!");
}else{
gtk_label_set_label(GTK_LABEL(label),"Flag missed.");
}
for(int i=0;i<4;i++){
gtk_widget_set_sensitive(GTK_WIDGET(button[i]),FALSE);
}
}
void buttons_init(GtkBuilder *builder){
//Initalize buttons
for(int i=0;i<4;i++){
char str[6];
sprintf(str,"btn_%d",i+1);
button[i]=gtk_builder_get_object(builder,str);
g_signal_connect(button[i],"clicked",G_CALLBACK(btn_click),(gpointer)btn_index[i]);
gtk_button_set_always_show_image(GTK_BUTTON(button[i]),TRUE);
}
}
void btngo_click(GtkWidget *widget,gpointer data){
//Reinitalize the buttons and the flag
gtk_label_set_label(GTK_LABEL(label),"Select a button");
for(int i=0;i<4;i++){
gtk_widget_set_sensitive(GTK_WIDGET(button[i]),TRUE);
gtk_button_set_image((GtkButton*)button[i],NULL);
}
srand((unsigned)time(NULL));
int x=rand();
flag=x%4;
}
void gamemain(GtkWidget *widget,GtkWindow *parent){
//Get objects from the Gtkbuilder and initalize the application
GtkBuilder *builder=gtk_builder_new();
GObject *window;
GdkPixbuf *pixbuf=gdk_pixbuf_new_from_resource("/gtk42/icon.jpg",NULL);
gtk_builder_add_from_resource(builder,"/gtk42/game1.ui",NULL);
window=gtk_builder_get_object(builder,"window");
gtk_window_set_icon(GTK_WINDOW(window),pixbuf);
//Get buttons from GtkBuilder
buttons_init(builder);
GObject *btn_go=gtk_builder_get_object(builder,"btn_go");
g_signal_connect(btn_go,"clicked",G_CALLBACK(btngo_click),(gpointer)builder);
GObject *btn_exit=gtk_builder_get_object(builder,"btn_exit");
g_signal_connect_swapped(btn_exit,"clicked",G_CALLBACK(gtk_widget_destroy),GTK_WIDGET(window));
label=gtk_builder_get_object(builder,"label");
//Initalize the flag
srand((unsigned)time(NULL));
int x=rand();
flag=x%4;
gtk_window_set_transient_for(GTK_WINDOW(window),parent);
gtk_widget_show_all(GTK_WIDGET(window));
g_object_unref(pixbuf);
}

17
Gtk3/src/game.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef __GAME_H_
#define __GAME_H_
#include <gtk/gtk.h>
#include <ctime>
#include <cstdlib>
#include <cstring>
void btn_click(GtkWidget *widget,gpointer data);
void buttons_init(GtkBuilder *builder);
void btngo_click(GtkWidget *widget,gpointer data);
void gamemain(GtkWidget *widget,GtkWindow *parent);
#endif

47
Gtk3/src/main.cpp Normal file
View File

@ -0,0 +1,47 @@
#include <gtk/gtk.h>
#include "background.h"
#include "winconf.h"
#include "panel1.h"
#include "panel2.h"
static void gtkmain(GtkApplication *app,gpointer user_data){
//Get main window
int width=640,height=360;
get_config(&width,&height);
//GtkBuilder *builder=gtk_builder_new_from_file("res/window.ui");
GtkBuilder *builder=gtk_builder_new_from_resource("/gtk42/window.ui");
GObject *window=gtk_builder_get_object(builder,"window");
gtk_window_set_default_size(GTK_WINDOW(window),width,height);
gtk_window_set_icon_name(GTK_WINDOW(window),"org.gtk.daleclack");
//Home button
GObject *img_home=gtk_builder_get_object(builder,"image1");
gtk_image_set_from_resource(GTK_IMAGE(img_home),"/gtk42/user-home.png");
//Get button for change background(moved to panel 1)
/*GObject *btn_back=gtk_builder_get_object(builder,"btnback");
g_signal_connect(btn_back,"clicked",G_CALLBACK(fileopen),builder);*/
//Config button(moved to panel 1)
/*GObject *btn_conf=gtk_builder_get_object(builder,"btnset");
g_signal_connect(btn_conf,"clicked",G_CALLBACK(conf_dialog),builder);*/
//default background
default_background(builder);
//Add a top panel with timer
GObject *fixed=gtk_builder_get_object(builder,"fixed");
add_toppanel(builder,GTK_FIXED(fixed));
add_leftpanel(builder,GTK_FIXED(fixed));
//Add window to the application and show
gtk_application_add_window(app,GTK_WINDOW(window));
gtk_widget_show_all(GTK_WIDGET(window));
}
int main(int argc,char *argv[]){
GtkApplication *app;
int status;
app=gtk_application_new("org.gtk.daleclack",G_APPLICATION_NON_UNIQUE);
g_signal_connect(app,"activate",G_CALLBACK(gtkmain),NULL);
status=g_application_run(G_APPLICATION(app),argc,argv);
return status;
}

59
Gtk3/src/panel1.cpp Normal file
View File

@ -0,0 +1,59 @@
#include <ctime>
#include "panel1.h"
#include "winconf.h"
#include "background.h"
gboolean change_time(gpointer data){
//Get local time
time_t t;
struct tm *local;
t=time(NULL);
local=localtime(&t);
//Format the time and set the time
char current_time[20];
sprintf(current_time,"%02d:%02d %04d/%02d/%02d",
local->tm_hour,local->tm_min,local->tm_year+1900,local->tm_mon+1,local->tm_mday);
//g_print("%s\n",current_time);
gtk_label_set_label(GTK_LABEL(data),current_time);
return TRUE;
}
void add_toppanel(GtkBuilder *builder,GtkFixed *fixed){
//Get position
int width=640,height=480;
get_config(&width,&height);
//Get panel
GtkBuilder *panel=gtk_builder_new_from_resource("/gtk42/toppanel.ui");
GObject *panel1=gtk_builder_get_object(panel,"btnbox");
gtk_widget_set_size_request(GTK_WIDGET(panel1),width,15);
//Get timer label and set time
GObject *label_time=gtk_builder_get_object(panel,"label_time");
g_timeout_add(100,change_time,label_time);
//Get popover window
GObject *popover=gtk_builder_get_object(panel,"popover1");
//Get button for change background
GObject *btn_back=gtk_builder_get_object(panel,"btnback");
GObject *img_back=gtk_builder_get_object(panel,"image3");
gtk_image_set_from_resource(GTK_IMAGE(img_back),"/gtk42/graphics.png");
//gtk_button_set_image(GTK_BUTTON(btn_back),GTK_WIDGET(img_back));
gtk_button_set_always_show_image(GTK_BUTTON(btn_back),TRUE);
g_signal_connect(btn_back,"clicked",G_CALLBACK(fileopen),builder);
g_signal_connect_swapped(btn_back,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//Config button
GObject *btn_conf=gtk_builder_get_object(panel,"btnset");
GObject *img_set=gtk_builder_get_object(panel,"image5");
gtk_image_set_from_resource(GTK_IMAGE(img_set),"/gtk42/system.png");
//gtk_button_set_image(GTK_BUTTON(btn_conf),GTK_WIDGET(img_set));
gtk_button_set_always_show_image(GTK_BUTTON(btn_conf),TRUE);
g_signal_connect(btn_conf,"clicked",G_CALLBACK(conf_dialog),builder);
g_signal_connect_swapped(btn_conf,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//Get Exit button
GObject *btn_exit=gtk_builder_get_object(panel,"PanelExit");
GObject *img_exit=gtk_builder_get_object(panel,"image4");
gtk_image_set_from_resource(GTK_IMAGE(img_exit),"/gtk42/log-out.png");
//gtk_button_set_image(GTK_BUTTON(btn_exit),GTK_WIDGET(img_exit));
gtk_button_set_always_show_image(GTK_BUTTON(btn_exit),TRUE);
GObject *window=gtk_builder_get_object(builder,"window");
g_signal_connect_swapped(btn_exit,"clicked",G_CALLBACK(gtk_widget_destroy),window);
gtk_fixed_put(fixed,GTK_WIDGET(panel1),0,0);
}

10
Gtk3/src/panel1.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef __TIMER_H_
#define __TIMER_H_
#include <gtk/gtk.h>
gboolean change_time(gpointer data);
void add_toppanel(GtkBuilder *builder,GtkFixed *fixed);
#endif

87
Gtk3/src/panel2.cpp Normal file
View File

@ -0,0 +1,87 @@
#include <cstdlib>
#include <thread>
#include "panel2.h"
#include "win1.h"
#include "game.h"
void add_leftpanel(GtkBuilder *builder,GtkFixed *fixed){
//Get Left panel
GtkBuilder *panel2=gtk_builder_new_from_resource("/gtk42/leftpanel.ui");
GObject *panel=gtk_builder_get_object(panel2,"left_panel");
//Set start button and image
GObject *btn_image=gtk_builder_get_object(panel2,"btn_image");
GdkPixbuf *pixbuf=gdk_pixbuf_new_from_resource("/gtk42/icon.png",NULL);
GdkPixbuf *sized=gdk_pixbuf_scale_simple(pixbuf,40,40,GDK_INTERP_BILINEAR);
gtk_image_set_from_pixbuf(GTK_IMAGE(btn_image),sized);
//Get popover window
GObject *popover=gtk_builder_get_object(panel2,"popover1");
//Button image
GtkWidget *img_vlc=gtk_image_new_from_resource("/gtk42/vlc.png");
GtkWidget *img_aud=gtk_image_new_from_resource("/gtk42/audacious.png");
GtkWidget *img_gedit=gtk_image_new_from_resource("/gtk42/gedit.png");
//Audacious bin exec
GObject *btn_audacious=gtk_builder_get_object(panel2,"btnaud");
gtk_button_set_image(GTK_BUTTON(btn_audacious),img_aud);
g_signal_connect(btn_audacious,"clicked",G_CALLBACK(btnaud_clicked),NULL);
g_signal_connect_swapped(btn_audacious,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//vlc exec button for linux
GObject *btnvlc=gtk_builder_get_object(panel2,"btnvlc");
GObject *img_vlc1=gtk_builder_get_object(panel2,"image1");
gtk_image_set_from_resource(GTK_IMAGE(img_vlc1),"/gtk42/vlc.png");
g_signal_connect(btnvlc,"clicked",G_CALLBACK(btnvlc_clicked),NULL);
g_signal_connect_swapped(btnvlc,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//Start Gedit Text Editor
GObject *btngedit=gtk_builder_get_object(panel2,"btngedit");
GObject *img_gedit1=gtk_builder_get_object(panel2,"image2");
gtk_image_set_from_resource(GTK_IMAGE(img_gedit1),"/gtk42/gedit.png");
g_signal_connect(btngedit,"clicked",G_CALLBACK(btngedit_clicked),NULL);
g_signal_connect_swapped(btngedit,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//Notepad on windows
GObject *btnnote=gtk_builder_get_object(panel2,"btn_note");
gtk_button_set_image(GTK_BUTTON(btnnote),img_gedit);
g_signal_connect(btnnote,"clicked",G_CALLBACK(btnnote_clicked),NULL);
g_signal_connect_swapped(btnnote,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//VLC on windows
GObject *btn_vlc=gtk_builder_get_object(panel2,"btn_vlc");
gtk_button_set_image(GTK_BUTTON(btn_vlc),img_vlc);
g_signal_connect(btn_vlc,"clicked",G_CALLBACK(btnvlc_win32),NULL);
g_signal_connect_swapped(btn_vlc,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//Get main window
GObject *window=gtk_builder_get_object(builder,"window");
//Gtk31 application
GObject *btngame=gtk_builder_get_object(panel2,"btngame");
g_signal_connect(btngame,"clicked",G_CALLBACK(gamemain),window);
g_signal_connect_swapped(btngame,"clicked",G_CALLBACK(gtk_widget_hide),popover);
//About window
GObject *btn_about=gtk_builder_get_object(panel2,"btnabout");
g_signal_connect(btn_about,"clicked",G_CALLBACK(win1_init),window);
g_signal_connect_swapped(btn_about,"clicked",G_CALLBACK(gtk_widget_hide),popover);
gtk_fixed_put(fixed,GTK_WIDGET(panel),0,25);
g_object_unref(pixbuf);
g_object_unref(sized);
}
void btnvlc_clicked(GtkWidget *widget,gpointer data){
std::thread first(system,"vlc");
first.detach();
}
void btngedit_clicked(GtkWidget *widget,gpointer data){
std::thread second(system,"gedit");
second.detach();
}
void btnaud_clicked(GtkWidget *widget,gpointer data){
std::thread third(system,"audacious");
third.detach();
}
void btnnote_clicked(GtkWidget *widget,gpointer data){
std::thread fourth(system,"start notepad");
fourth.detach();
}
void btnvlc_win32(GtkWidget *widget,gpointer data){
std::thread fifth(system,"start ..\\vlc\\vlc.exe");
fifth.detach();
}

18
Gtk3/src/panel2.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef __PANEL2_H_
#define __PANEL2_H_
#include <gtk/gtk.h>
void add_leftpanel(GtkBuilder *builder,GtkFixed *fixed);
void btnvlc_clicked(GtkWidget *widget,gpointer data);
void btngedit_clicked(GtkWidget *widget,gpointer data);
void btnaud_clicked(GtkWidget *widget,gpointer data);
void btnnote_clicked(GtkWidget *widget,gpointer data);
void btnvlc_win32(GtkWidget *widget,gpointer data);
#endif

14
Gtk3/src/win1.cpp Normal file
View File

@ -0,0 +1,14 @@
#include "win1.h"
void win1_init(GtkWidget *widget,GtkWindow *parent){
//"About" window
GtkBuilder *win1=gtk_builder_new_from_resource("/gtk42/win1.ui");
GObject *window1=gtk_builder_get_object(win1,"window1");
gtk_window_set_transient_for(GTK_WINDOW(window1),parent);
//Window icon fix for win32 platform
GdkPixbuf *logo=gdk_pixbuf_new_from_resource("/gtk42/icon.jpg",NULL);
GdkPixbuf *logo_sized=gdk_pixbuf_scale_simple(logo,100,100,GDK_INTERP_BILINEAR);
gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(window1),logo_sized);
g_signal_connect_swapped(window1,"response",G_CALLBACK(gtk_widget_destroy),window1);
gtk_widget_show_all(GTK_WIDGET(window1));
}

8
Gtk3/src/win1.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef __WIN1_H_
#define __WIN1_H_
#include <gtk/gtk.h>
void win1_init(GtkWidget *widget,GtkWindow *parent);
#endif

73
Gtk3/src/winconf.cpp Normal file
View File

@ -0,0 +1,73 @@
#include <cstdio>
#include "winconf.h"
void conf_dialog(GtkWidget *widget,GtkBuilder *builder){
//Window config dialog
GtkBuilder *conf_size=gtk_builder_new_from_resource("/gtk42/win_size.ui");
GObject *dialog=gtk_builder_get_object(conf_size,"dialog");
GObject *window=gtk_builder_get_object(builder,"window");
gtk_window_set_transient_for(GTK_WINDOW(dialog),GTK_WINDOW(window));
g_signal_connect(dialog,"response",G_CALLBACK(conf_response),conf_size);
//Set default config
GObject *entry_width=gtk_builder_get_object(conf_size,"entry_width");
gtk_entry_set_text(GTK_ENTRY(entry_width),"640");
GObject *entry_height=gtk_builder_get_object(conf_size,"entry_height");
gtk_entry_set_text(GTK_ENTRY(entry_height),"360");
//Get window size
GObject *btnGet=gtk_builder_get_object(conf_size,"btnGet");
g_signal_connect(btnGet,"clicked",G_CALLBACK(get_winsize),conf_size);
//Reset to default
GObject *btn_default=gtk_builder_get_object(conf_size,"btn_default");
g_signal_connect(btn_default,"clicked",G_CALLBACK(set_default),conf_size);
gtk_widget_show_all(GTK_WIDGET(dialog));
}
void conf_response(GtkWidget *widget,int response,GtkBuilder *builder_conf){
//Get width and height config and put the numbers into winsize.conf file
GObject *entry_width,*entry_height;
entry_width=gtk_builder_get_object(builder_conf,"entry_width");
entry_height=gtk_builder_get_object(builder_conf,"entry_height");
if(response==GTK_RESPONSE_OK){
const gchar *width,*height;
width=gtk_entry_get_text(GTK_ENTRY(entry_width));
height=gtk_entry_get_text(GTK_ENTRY(entry_height));
freopen("winsize.conf","w",stdout);
g_print("%s %s",width,height);
fclose(stdout);
}
gtk_widget_destroy(widget);
}
void set_default(GtkWidget *widget,GtkBuilder *builder_conf){
//Discard changes and set to default config
GObject *entry_width=gtk_builder_get_object(builder_conf,"entry_width");
GObject *entry_height=gtk_builder_get_object(builder_conf,"entry_height");
gtk_entry_set_text(GTK_ENTRY(entry_width),"640");
gtk_entry_set_text(GTK_ENTRY(entry_height),"360");
}
void get_winsize(GtkWidget *widget,GtkBuilder *builder_conf){
//Get current window size
int width=640,height=360;
char width1[7],height1[7];
GtkWindow *window;
//Get dialog window and entry
GObject *dialog=gtk_builder_get_object(builder_conf,"dialog");
GObject *entry_width=gtk_builder_get_object(builder_conf,"entry_width");
GObject *entry_height=gtk_builder_get_object(builder_conf,"entry_height");
//Get main window
window=gtk_window_get_transient_for(GTK_WINDOW(dialog));
gtk_window_get_size(GTK_WINDOW(window),&width,&height);
//g_print("%d %d\n",width,height);
sprintf(width1,"%d",width);
sprintf(height1,"%d",height);
gtk_entry_set_text(GTK_ENTRY(entry_width),width1);
gtk_entry_set_text(GTK_ENTRY(entry_height),height1);
}
void get_config(int *width,int *height){
freopen("winsize.conf","r",stdin);
scanf("%d",width);
scanf("%d",height);
fclose(stdin);
}

16
Gtk3/src/winconf.h Normal file
View File

@ -0,0 +1,16 @@
#ifndef __WIN_CONF_
#define __WIN_CONF_
#include <gtk/gtk.h>
void conf_dialog(GtkWidget *widget,GtkBuilder *builder);
void conf_response(GtkWidget *widget,int response,GtkBuilder *builder_conf);
void set_default(GtkWidget *widget,GtkBuilder *builder_conf);
void get_winsize(GtkWidget *widget,GtkBuilder *buider_conf);
void get_config(int *width,int *height);
#endif

1014
Gtk3/src/winpe.xpm Normal file

File diff suppressed because it is too large Load Diff

1014
Gtk3/winpe.xpm Normal file

File diff suppressed because it is too large Load Diff

1
Gtk3/winsize.conf Normal file
View File

@ -0,0 +1 @@
1280 720