Add MyTitleBar class for gtk160

This commit is contained in:
daleclack 2024-03-20 19:46:59 +08:00
parent 624f56780f
commit 3af5f3f338
3 changed files with 26 additions and 1 deletions

View File

@ -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

View File

@ -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)
{
}

View File

@ -0,0 +1,5 @@
#pragma once
#include <gtk/gtk.h>
G_DECLARE_FINAL_TYPE(MyTitleBar, my_titlebar, My, TitleBar, GObject)