Initial import

This commit is contained in:
2025-11-18 09:19:15 +01:00
parent 6919487c3d
commit 9c99a01464
6 changed files with 305 additions and 0 deletions

38
main.cpp Normal file
View File

@@ -0,0 +1,38 @@
#include <iostream>
#include "gtkloader.h"
extern "C" {
#include "gtk-imports.h"
}
static void activate (GtkApplication* app, gpointer user_data)
{
GtkWidget *window;
window = gtk_application_window_new (app);
gtk_window_set_title (window, "Window");
gtk_window_set_default_size (window, 200, 200);
gtk_widget_show_all (window);
}
int main(int argc, char **argv)
{
GtkLoader l;
try {
l.loadGtk();
} catch(std::string msg) {
std::cerr << msg << std::endl;
}
GtkApplication *app;
int status;
app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
g_signal_connect (app, "activate", activate, NULL);
status = g_application_run (app, argc, argv);
g_object_unref (app);
return status;
}