diff --git a/Gtk4/gtk4-icon-test/.vscode/c_cpp_properties.json b/Gtk4/gtk4-icon-test/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..0d485ac --- /dev/null +++ b/Gtk4/gtk4-icon-test/.vscode/c_cpp_properties.json @@ -0,0 +1,39 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + //This is the gtk4 config file on vscode + //Due to no gtk4 on debian and ubuntu till now,the configure only support manjaro(Arch linux may can use it) + "${workspaceFolder}/**", + "/usr/include/gtk-4.0/**", + "/usr/include/pango-1.0/**", + "/usr/include/glib-2.0/**", + "/usr/lib/glib-2.0/include/**", + "/usr/include/harfbuzz/**", + "/usr/include/freetype2/**", + "/usr/include/libpng16/**", + "/usr/include/libmount/**", + "/usr/include/blkid/**", + "/usr/include/fribidi/**", + "/usr/include/cairo/**", + "/usr/include/lzo/**", + "/usr/include/pixman-1/**", + "/usr/include/gdk-pixbuf-2.0/**", + "/usr/include/graphene-1.0/**", + "/usr/lib/graphene-1.0/include/**", + "/usr/include/gio-unix-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 +} \ No newline at end of file diff --git a/Gtk4/gtk4-icon-test/.vscode/launch.json b/Gtk4/gtk4-icon-test/.vscode/launch.json new file mode 100644 index 0000000..d3b596e --- /dev/null +++ b/Gtk4/gtk4-icon-test/.vscode/launch.json @@ -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/gtk4-test", + "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" + } + ] +} diff --git a/Gtk4/gtk4-icon-test/.vscode/settings.json b/Gtk4/gtk4-icon-test/.vscode/settings.json new file mode 100644 index 0000000..0baae3a --- /dev/null +++ b/Gtk4/gtk4-icon-test/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "C_Cpp.errorSquiggles": "Disabled", + "cmake.configureOnOpen": false +} \ No newline at end of file diff --git a/Gtk4/gtk4-icon-test/.vscode/tasks.json b/Gtk4/gtk4-icon-test/.vscode/tasks.json new file mode 100644 index 0000000..b4ba7ab --- /dev/null +++ b/Gtk4/gtk4-icon-test/.vscode/tasks.json @@ -0,0 +1,62 @@ +{ + "tasks": [ + { + "type": "cppbuild", + "label": "C/C++: g++ build active file", + "command": "/usr/bin/g++", + "args": [ + "-g", + "src/*.cpp", + "-o", + "${workspaceFolder}/bin/gtk4-test", + "-pthread", + "-I${workspaceFolder}/", + "-I/usr/include/gtk-4.0", + "-I/usr/include/pango-1.0", + "-I/usr/include/glib-2.0", + "-I/usr/lib/glib-2.0/include", + "-I/usr/include/harfbuzz", + "-I/usr/include/freetype2", + "-I/usr/include/libpng16", + "-I/usr/include/libmount", + "-I/usr/include/blkid", + "-I/usr/include/fribidi", + "-I/usr/include/cairo", + "-I/usr/include/lzo", + "-I/usr/include/pixman-1", + "-I/usr/include/gdk-pixbuf-2.0", + "-I/usr/include/graphene-1.0", + "-I/usr/lib/graphene-1.0/include", + "-I/usr/include/gio-unix-2.0", + "-mfpmath=sse", + "-msse", + "-msse2", + "-lgtk-4", + "-lpangocairo-1.0", + "-lpango-1.0", + "-lharfbuzz", + "-lgdk_pixbuf-2.0", + "-lcairo-gobject", + "-lcairo", + "-lvulkan", + "-lgraphene-1.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" +} diff --git a/Gtk4/gtk4-icon-test/bin/gtk4-test b/Gtk4/gtk4-icon-test/bin/gtk4-test new file mode 100644 index 0000000..c291a88 Binary files /dev/null and b/Gtk4/gtk4-icon-test/bin/gtk4-test differ diff --git a/Gtk4/gtk4-icon-test/src/main.cpp b/Gtk4/gtk4-icon-test/src/main.cpp new file mode 100644 index 0000000..71e5f6f --- /dev/null +++ b/Gtk4/gtk4-icon-test/src/main.cpp @@ -0,0 +1,16 @@ +#include + +static void gtkmain(GtkApplication *app,gpointer data){ + GtkWidget *window; + window=gtk_application_window_new(app); + gtk_widget_show(window); +} + +int main(int argc,char *argv[]){ + GtkApplication *app; + int status; + app=gtk_application_new("org.gtk.Demo4",G_APPLICATION_NON_UNIQUE); + g_signal_connect(app,"activate",G_CALLBACK(gtkmain),NULL); + status=g_application_run(G_APPLICATION(app),argc,argv); + return status; +}