From 6ad335798d7116bc77b71fdc6851f4f7ceedf7a9 Mon Sep 17 00:00:00 2001 From: daleclack Date: Thu, 29 Oct 2020 07:52:32 +0800 Subject: [PATCH] Add gtk13 --- Gtk3/gtk13/Makefile.win | 28 ++++++++++++++++++ Gtk3/gtk13/gtk13.dev | 62 ++++++++++++++++++++++++++++++++++++++++ Gtk3/gtk13/gtk13.layout | 8 ++++++ Gtk3/gtk13/main.cpp | 36 +++++++++++++++++++++++ Gtk3/gtk13/main.o | Bin 0 -> 2998 bytes 5 files changed, 134 insertions(+) create mode 100644 Gtk3/gtk13/Makefile.win create mode 100644 Gtk3/gtk13/gtk13.dev create mode 100644 Gtk3/gtk13/gtk13.layout create mode 100644 Gtk3/gtk13/main.cpp create mode 100644 Gtk3/gtk13/main.o diff --git a/Gtk3/gtk13/Makefile.win b/Gtk3/gtk13/Makefile.win new file mode 100644 index 0000000..186e9b0 --- /dev/null +++ b/Gtk3/gtk13/Makefile.win @@ -0,0 +1,28 @@ +# Project: gtk13 +# Makefile created by Dev-C++ 5.11 + +CPP = g++.exe +CC = gcc.exe +WINDRES = windres.exe +OBJ = main.o +LINKOBJ = main.o +LIBS = -L"C:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib32" -L"C:/Dev-Cpp/gtk+/lib" -static-libgcc -lgtk-3 -lgdk-3 -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lpangocairo-1.0 -lpangoft2-1.0 -lfreetype -lfontconfig -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lm -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -mwindows -m32 +INCS = -I"C:/Dev-Cpp/MinGW64/include" -I"C:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/5.1.0/include" -I"C:/Dev-Cpp/gtk+/include/gtk-3.0" -I"C:/Dev-Cpp/gtk+/include/cairo" -I"C:/Dev-Cpp/gtk+/include/pango-1.0" -I"C:/Dev-Cpp/gtk+/include/atk-1.0" -I"C:/Dev-Cpp/gtk+/include/cairo" -I"C:/Dev-Cpp/gtk+/include/pixman-1" -I"C:/Dev-Cpp/gtk+/include" -I"C:/Dev-Cpp/gtk+/include/freetype2" -I"C:/Dev-Cpp/gtk+/include" -I"C:/Dev-Cpp/gtk+/include/libpng15" -I"C:/Dev-Cpp/gtk+/include/gdk-pixbuf-2.0" -I"C:/Dev-Cpp/gtk+/include/libpng15" -I"C:/Dev-Cpp/gtk+/include/glib-2.0" -I"C:/Dev-Cpp/gtk+/lib/glib-2.0/include" -I"C:/Dev-Cpp/gtk+/include/gtk-3.0/gtk" +CXXINCS = -I"C:/Dev-Cpp/MinGW64/include" -I"C:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/5.1.0/include" -I"C:/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++" -I"C:/Dev-Cpp/gtk+/include/gtk-3.0" -I"C:/Dev-Cpp/gtk+/include/cairo" -I"C:/Dev-Cpp/gtk+/include/pango-1.0" -I"C:/Dev-Cpp/gtk+/include/atk-1.0" -I"C:/Dev-Cpp/gtk+/include/cairo" -I"C:/Dev-Cpp/gtk+/include/pixman-1" -I"C:/Dev-Cpp/gtk+/include" -I"C:/Dev-Cpp/gtk+/include/freetype2" -I"C:/Dev-Cpp/gtk+/include" -I"C:/Dev-Cpp/gtk+/include/libpng15" -I"C:/Dev-Cpp/gtk+/include/gdk-pixbuf-2.0" -I"C:/Dev-Cpp/gtk+/include/libpng15" -I"C:/Dev-Cpp/gtk+/include/glib-2.0" -I"C:/Dev-Cpp/gtk+/lib/glib-2.0/include" -I"C:/Dev-Cpp/gtk+/include/gtk-3.0/gtk" +BIN = gtk13.exe +CXXFLAGS = $(CXXINCS) -m32 +CFLAGS = $(INCS) -m32 +RM = rm.exe -f + +.PHONY: all all-before all-after clean clean-custom + +all: all-before $(BIN) all-after + +clean: clean-custom + ${RM} $(OBJ) $(BIN) + +$(BIN): $(OBJ) + $(CPP) $(LINKOBJ) -o $(BIN) $(LIBS) + +main.o: main.cpp + $(CPP) -c main.cpp -o main.o $(CXXFLAGS) diff --git a/Gtk3/gtk13/gtk13.dev b/Gtk3/gtk13/gtk13.dev new file mode 100644 index 0000000..c40070a --- /dev/null +++ b/Gtk3/gtk13/gtk13.dev @@ -0,0 +1,62 @@ +[Project] +FileName=gtk13.dev +Name=gtk13 +Type=0 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker= +IsCpp=1 +Icon= +ExeOutput= +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName= +HostApplication= +UseCustomMakefile=0 +CustomMakefile= +CommandLine= +Folders= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=10 +CompilerSettings=0000000100000000000000000 +UnitCount=1 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit1] +FileName=main.cpp +CompileCpp=1 +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/Gtk3/gtk13/gtk13.layout b/Gtk3/gtk13/gtk13.layout new file mode 100644 index 0000000..8b81040 --- /dev/null +++ b/Gtk3/gtk13/gtk13.layout @@ -0,0 +1,8 @@ +[Editors] +Order=0 +Focused=0 +[Editor_0] +CursorCol=87 +CursorRow=13 +TopLine=10 +LeftChar=1 diff --git a/Gtk3/gtk13/main.cpp b/Gtk3/gtk13/main.cpp new file mode 100644 index 0000000..dff2d4d --- /dev/null +++ b/Gtk3/gtk13/main.cpp @@ -0,0 +1,36 @@ +#include +void hello(GtkWidget *widget,gpointer data){ + GtkWidget *dialog; + GtkWidget *content_area; + GtkWidget *label; + dialog=gtk_dialog_new(); + gtk_window_set_title(GTK_WINDOW(dialog),"gtk13"); + gtk_window_set_default_size(GTK_WINDOW(dialog),200,90); + gtk_window_set_position(GTK_WINDOW(dialog),GTK_WIN_POS_CENTER); + gtk_dialog_add_button(GTK_DIALOG(dialog),"OK",GTK_RESPONSE_OK); + content_area=gtk_dialog_get_content_area(GTK_DIALOG(dialog)); + label=gtk_label_new("Hello"); + g_signal_connect_swapped(dialog,"response",G_CALLBACK(gtk_widget_destroy),dialog); + gtk_container_add(GTK_CONTAINER(content_area),label); + gtk_widget_show_all(dialog); +} +int main(int argc,char **argv){ + GtkWidget *window; + GtkWidget *fixed; + GtkWidget *button; + gtk_init(&argc,&argv); + window=gtk_window_new(GTK_WINDOW_TOPLEVEL); + g_signal_connect(G_OBJECT(window),"destroy",G_CALLBACK(gtk_main_quit),NULL); + gtk_window_set_title(GTK_WINDOW(window),"gtk(13)"); + gtk_window_set_default_size(GTK_WINDOW(window),150,80); + gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER); + fixed=gtk_fixed_new(); + gtk_container_add(GTK_CONTAINER(window),fixed); + button=gtk_button_new_with_label("hello"); + gtk_widget_set_size_request(button,70,20); + gtk_fixed_put(GTK_FIXED(fixed),button,40,20); + g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(hello),(gpointer)window); + gtk_widget_show_all(window); + gtk_main(); + return 0; +} diff --git a/Gtk3/gtk13/main.o b/Gtk3/gtk13/main.o new file mode 100644 index 0000000000000000000000000000000000000000..7481e9e4b420d28e0c84774f09b7eccf9cffff03 GIT binary patch literal 2998 zcma)8PiP!f7=PPc*NraJ=%}sLy6RT9C2lvQDWQ0XCToQj%|(<7J|{abn<3NL?ar)e zgNTyT8VbRKB6!hD!Haki1(BMfH5U=Yn}`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