Update gtk40

This commit is contained in:
daleclack 2021-02-09 18:33:53 +08:00
parent 5ba5807e07
commit 62116f8c85
3 changed files with 20 additions and 17 deletions

View File

@ -6,27 +6,25 @@
//For linux amd64 and linux on arm64,some include path may different //For linux amd64 and linux on arm64,some include path may different
//Commet and uncomment these lines to compile on a specificed archtiecture //Commet and uncomment these lines to compile on a specificed archtiecture
//Arm64 linux libs //Arm64 linux libs
/*
"/usr/lib/aarch64-linux-gnu/dbus-1.0/include/**", "/usr/lib/aarch64-linux-gnu/dbus-1.0/include/**",
"/usr/lib/aarch64-linux-gnu/glib-2.0/include", "/usr/lib/aarch64-linux-gnu/glib-2.0/include",
*/
//amd64 linux libs(For ubuntu) //amd64 linux libs(For ubuntu)
/* /*
"/usr/lib/x86_64-linux-gnu/dbus-1.0/include", "/usr/lib/x86_64-linux-gnu/dbus-1.0/include",
"/usr/lib/x86_64-linux-gnu/glib-2.0/include", "/usr/lib/x86_64-linux-gnu/glib-2.0/include",
*/ */
//For debian and ubuntu,kali //For debian and ubuntu,kali
/*
"/usr/include/gtk-3.0/gtk/**", "/usr/include/gtk-3.0/gtk/**",
"/usr/include/uuid/**", "/usr/include/uuid/**",
*/
//For manjaro(Arch linux) //For manjaro(Arch linux)
/*
"/usr/lib/dbus-1.0/include/**", "/usr/lib/dbus-1.0/include/**",
"/usr/lib/glib-2.0/include/**", "/usr/lib/glib-2.0/include/**",
"/usr/include/lzo/**", "/usr/include/lzo/**",
"/usr/include/cloudproviders/**", "/usr/include/cloudproviders/**",
*/
"${workspaceFolder}/**", "${workspaceFolder}/**",
"/usr/include/gtk-3.0/**", "/usr/include/gtk-3.0/**",
"/usr/include/at-spi2-atk/2.0/**", "/usr/include/at-spi2-atk/2.0/**",

View File

@ -6,32 +6,32 @@
"command": "/usr/bin/g++", "command": "/usr/bin/g++",
"args": [ "args": [
"-g", "-g",
"${workspaceFolder}/src/*.cpp", "src/*.cpp",
"-o", "-o",
"${workspaceFolder}/bin/gtk40", "${workspaceFolder}/bin/gtk40",
"-pthread", "-pthread",
"-I${workspaceFolder}",
//For Arm64 linux //For Arm64 linux
/*
"-I/usr/lib/aarch64-linux-gnu/dbus-1.0/include", "-I/usr/lib/aarch64-linux-gnu/dbus-1.0/include",
"-I/usr/lib/aarch64-linux-gnu/glib-2.0/include", "-I/usr/lib/aarch64-linux-gnu/glib-2.0/include",
*/
//For amd64 linux //For amd64 linux
/* /*
"-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include", "-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include",
"-I/usr/lib/x86_64-linux-gnu/glib-2.0/include", "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include",
*/ */
//Ubuntu and kali include paths //Ubuntu and kali include paths
"-I/usr/include/uuid",
//Manjaro linux and Arch linux include args
/* /*
"-I/usr/include/uuid",
*/
//Manjaro linux and Arch linux include args
"-I${workspaceFolder}",
"-I/usr/lib/glib-2.0/include", "-I/usr/lib/glib-2.0/include",
"-I/usr/lib/dbus-1.0/include", "-I/usr/lib/dbus-1.0/include",
"-I/usr/include/lzo", "-I/usr/include/lzo",
"-I/usr/include/cloudproviders", "-I/usr/include/cloudproviders",
*/
"-I/usr/include/gtk-3.0", "-I/usr/include/gtk-3.0",
"-I/usr/include/at-spi2-atk/2.0", "-I/usr/include/at-spi2-atk/2.0",
"-I/usr/include/at-spi-2.0", "-I/usr/include/at-spi-2.0",

View File

@ -41,7 +41,12 @@ static void gtkmain(GtkApplication *app,gpointer user_data){
//Window initalize //Window initalize
window=gtk_application_window_new(app); window=gtk_application_window_new(app);
gtk_window_set_default_size(GTK_WINDOW(window),540,360); gtk_window_set_default_size(GTK_WINDOW(window),540,360);
gtk_window_set_title(GTK_WINDOW(window),"gtk40(based on Gtk4 test)"); //GtkHeaderBar
GtkWidget *header=gtk_header_bar_new();
gtk_header_bar_set_title(GTK_HEADER_BAR(header),"gtk40(based on Gtk4 test)");
gtk_header_bar_set_show_close_button(GTK_HEADER_BAR(header),TRUE);
gtk_header_bar_set_decoration_layout(GTK_HEADER_BAR(header),"close,minimize,maximize:icon");
gtk_window_set_titlebar(GTK_WINDOW(window),header);
//Window icon //Window icon
gtk_window_set_icon_name(GTK_WINDOW(window),"gtk4-icon"); gtk_window_set_icon_name(GTK_WINDOW(window),"gtk4-icon");
//GtkFixed //GtkFixed