diff --git a/Gtk4/gtk160_wayland_test/CMakeLists.txt b/Gtk4/gtk160_wayland_test/CMakeLists.txt index 7c94b8a..ab2bc50 100644 --- a/Gtk4/gtk160_wayland_test/CMakeLists.txt +++ b/Gtk4/gtk160_wayland_test/CMakeLists.txt @@ -26,7 +26,7 @@ link_directories (${GTK_LIBRARY_DIRS}) # set(PO_DIR ${CMAKE_BINARY_DIR}/po/zh_CN/LC_MESSAGES) #Source files -set(SOURCE_FILE src/main.cpp src/MainWin.cpp src/TestWin.cpp) +set(SOURCE_FILE src/main.cpp src/MainWin.cpp src/TestWin.cpp src/MyTitleBar.cpp) #Compile Resource diff --git a/Gtk4/gtk160_wayland_test/src/MyTitleBar.cpp b/Gtk4/gtk160_wayland_test/src/MyTitleBar.cpp new file mode 100644 index 0000000..24565bb --- /dev/null +++ b/Gtk4/gtk160_wayland_test/src/MyTitleBar.cpp @@ -0,0 +1,20 @@ +#include "MyTitleBar.h" + +struct _MyTitleBar{ + GObject parent_instance; + GtkWindow *ctrl_window; + GtkWidget *header; + GtkWidget *btn_close, *btn_mini; +}; + +G_DEFINE_TYPE(MyTitleBar, my_titlebar, G_TYPE_OBJECT) + +static void my_titlebar_init(MyTitleBar *self) +{ + +} + +static void my_titlebar_class_init(MyTitleBarClass *klass) +{ + +} diff --git a/Gtk4/gtk160_wayland_test/src/MyTitleBar.h b/Gtk4/gtk160_wayland_test/src/MyTitleBar.h new file mode 100644 index 0000000..dff8be4 --- /dev/null +++ b/Gtk4/gtk160_wayland_test/src/MyTitleBar.h @@ -0,0 +1,5 @@ +#pragma once + +#include + +G_DECLARE_FINAL_TYPE(MyTitleBar, my_titlebar, My, TitleBar, GObject) \ No newline at end of file