Add gtk8
This commit is contained in:
parent
1651817ce0
commit
813a82d548
|
@ -0,0 +1,33 @@
|
|||
# Project: gtk8
|
||||
# Makefile created by Dev-C++ 5.11
|
||||
|
||||
CPP = g++.exe
|
||||
CC = gcc.exe
|
||||
WINDRES = windres.exe
|
||||
RES = gtk8_private.res
|
||||
OBJ = main.o $(RES)
|
||||
LINKOBJ = main.o $(RES)
|
||||
LIBS = -L"C:/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib32" -static-libgcc -LC:/Dev-Cpp/gtk+/lib -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 -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"
|
||||
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++"
|
||||
BIN = gtk8.exe
|
||||
CXXFLAGS = $(CXXINCS) -m32 -mms-bitfields -IC:/Dev-Cpp/gtk+/include/gtk-3.0 -IC:/Dev-Cpp/gtk+/include/cairo -IC:/Dev-Cpp/gtk+/include/pango-1.0 -IC:/Dev-Cpp/gtk+/include/atk-1.0 -IC:/Dev-Cpp/gtk+/include/cairo -IC:/Dev-Cpp/gtk+/include/pixman-1 -IC:/Dev-Cpp/gtk+/include -IC:/Dev-Cpp/gtk+/include/freetype2 -IC:/Dev-Cpp/gtk+/include -IC:/Dev-Cpp/gtk+/include/libpng15 -IC:/Dev-Cpp/gtk+/include/gdk-pixbuf-2.0 -IC:/Dev-Cpp/gtk+/include/libpng15 -IC:/Dev-Cpp/gtk+/include/glib-2.0 -IC:/Dev-Cpp/gtk+/lib/glib-2.0/include
|
||||
CFLAGS = $(INCS) -m32 -mms-bitfields -IC:/Dev-Cpp/gtk+/include/gtk-3.0 -IC:/Dev-Cpp/gtk+/include/cairo -IC:/Dev-Cpp/gtk+/include/pango-1.0 -IC:/Dev-Cpp/gtk+/include/atk-1.0 -IC:/Dev-Cpp/gtk+/include/cairo -IC:/Dev-Cpp/gtk+/include/pixman-1 -IC:/Dev-Cpp/gtk+/include -IC:/Dev-Cpp/gtk+/include/freetype2 -IC:/Dev-Cpp/gtk+/include -IC:/Dev-Cpp/gtk+/include/libpng15 -IC:/Dev-Cpp/gtk+/include/gdk-pixbuf-2.0 -IC:/Dev-Cpp/gtk+/include/libpng15 -IC:/Dev-Cpp/gtk+/include/glib-2.0 -IC:/Dev-Cpp/gtk+/lib/glib-2.0/include
|
||||
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)
|
||||
$(CC) $(LINKOBJ) -o $(BIN) $(LIBS)
|
||||
|
||||
main.o: main.c
|
||||
$(CC) -c main.c -o main.o $(CFLAGS)
|
||||
|
||||
gtk8_private.res: gtk8_private.rc
|
||||
$(WINDRES) -i gtk8_private.rc -F pe-i386 --input-format=rc -o gtk8_private.res -O coff
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
[Project]
|
||||
FileName=gtk8.dev
|
||||
Name=gtk8
|
||||
Type=0
|
||||
Ver=2
|
||||
ObjFiles=
|
||||
Includes=
|
||||
Libs=
|
||||
PrivateResource=gtk8_private.rc
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=
|
||||
Linker=
|
||||
IsCpp=0
|
||||
Icon=gtk8.ico
|
||||
ExeOutput=
|
||||
ObjectOutput=
|
||||
LogOutput=
|
||||
LogOutputEnabled=0
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=gtk8.exe
|
||||
HostApplication=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
CommandLine=
|
||||
Folders=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=11
|
||||
CompilerSettings=0000000100000000000000000
|
||||
UnitCount=1
|
||||
|
||||
[VersionInfo]
|
||||
Major=1
|
||||
Minor=0
|
||||
Release=0
|
||||
Build=0
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=1.0.0.0
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
AutoIncBuildNr=0
|
||||
SyncProduct=1
|
||||
|
||||
[Unit1]
|
||||
FileName=main.c
|
||||
CompileCpp=0
|
||||
Folder=
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
|
@ -0,0 +1,8 @@
|
|||
[Editors]
|
||||
Order=0
|
||||
Focused=0
|
||||
[Editor_0]
|
||||
CursorCol=33
|
||||
CursorRow=6
|
||||
TopLine=1
|
||||
LeftChar=1
|
|
@ -0,0 +1,23 @@
|
|||
/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */
|
||||
/* DO NOT EDIT ! */
|
||||
|
||||
#ifndef GTK8_PRIVATE_H
|
||||
#define GTK8_PRIVATE_H
|
||||
|
||||
/* VERSION DEFINITIONS */
|
||||
#define VER_STRING "1.0.0.0"
|
||||
#define VER_MAJOR 1
|
||||
#define VER_MINOR 0
|
||||
#define VER_RELEASE 0
|
||||
#define VER_BUILD 0
|
||||
#define COMPANY_NAME ""
|
||||
#define FILE_VERSION "1.0.0.0"
|
||||
#define FILE_DESCRIPTION "Developed using the Dev-C++ IDE"
|
||||
#define INTERNAL_NAME ""
|
||||
#define LEGAL_COPYRIGHT ""
|
||||
#define LEGAL_TRADEMARKS ""
|
||||
#define ORIGINAL_FILENAME ""
|
||||
#define PRODUCT_NAME ""
|
||||
#define PRODUCT_VERSION "1.0.0.0"
|
||||
|
||||
#endif /*GTK8_PRIVATE_H*/
|
|
@ -0,0 +1,5 @@
|
|||
/* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */
|
||||
/* DO NOT EDIT! */
|
||||
|
||||
|
||||
A ICON "gtk8.ico"
|
Binary file not shown.
|
@ -0,0 +1,24 @@
|
|||
#include<gtk/gtk.h>
|
||||
void hello(GtkWidget *widget,gpointer *window){
|
||||
GtkWidget *dialog;
|
||||
dialog=gtk_message_dialog_new(window,GTK_DIALOG_DESTROY_WITH_PARENT,GTK_MESSAGE_INFO,GTK_BUTTONS_OK,"Hello World");
|
||||
gtk_window_set_title(GTK_WINDOW(dialog),"gtk(8)");
|
||||
gtk_window_set_position(GTK_WINDOW(dialog),GTK_WIN_POS_CENTER);
|
||||
gtk_button_set_label((GtkButton*)gtk_dialog_get_widget_for_response(GTK_DIALOG(dialog),GTK_RESPONSE_OK),"OK");
|
||||
gtk_dialog_run(GTK_DIALOG(dialog));
|
||||
gtk_widget_destroy(dialog);
|
||||
}
|
||||
int main(int argc,char *argv[]){
|
||||
gtk_init(&argc,&argv);
|
||||
GtkWidget *window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
GtkWidget *button=gtk_button_new_with_label("Hello");
|
||||
gtk_window_set_title(GTK_WINDOW(window),"gtk(8)");
|
||||
gtk_window_set_default_size(GTK_WINDOW(window),120,30);
|
||||
gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
|
||||
gtk_container_add(GTK_CONTAINER(window),button);
|
||||
g_signal_connect(G_OBJECT(window),"destroy",G_CALLBACK(gtk_main_quit),(gpointer)window);
|
||||
g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(hello),NULL);
|
||||
gtk_widget_show_all(window);
|
||||
gtk_main();
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue