commit a7e0a98b1d51d88f63831dee9258ca14bbff6fa9
parent bf23c75dfddabf757eb64e75916301cc45aaa088
Author: NunoSempere <nuno.semperelh@protonmail.com>
Date: Sat, 20 Jul 2024 20:35:15 -0400
GTK4: savepoint for the day
Diffstat:
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/makefile b/makefile
@@ -3,7 +3,7 @@ CC=gcc # alternatives: tcc, clang, zig cc
WARNINGS=-Wall
OPTIMIZED_SOME=-O3
OPTIMIZED_MORE=-Ofast -march=native -funit-at-a-time -flto # binary will not be compatible with other computers, but may be much faster
-DEBUG= # -g
+DEBUG=#
STD=-std=c99 # maybe consider moving to c11 and using safer string handling
# Dependencies for WebkitGTK4/GTK3
@@ -49,6 +49,9 @@ build4: $(SRC_4) $(PLUGINS) $(CONFIG) constants user_cache
$(CC) $(STD) $(WARNINGS) $(DEPRECATION_FLAGS) $(OPTIMIZED_MORE) $(DEBUG) $(INCS_4) $(PLUGINS) $(SRC_4) -o rosenrot $(LIBS_4) $(ADBLOCK)
@echo
+diagnose:
+ G_ENABLE_DIAGNOSTIC=1 ./rosenrot
+
constants:
@echo
@echo "# Computing constants"
diff --git a/rosenrot4.c b/rosenrot4.c
@@ -1,9 +1,9 @@
-#include <gdk/gdk.h>
+#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
-#include "config.h"
#include <webkit/webkit.h>
+#include "config.h"
#include "plugins/plugins.h"
/* Global declarations */
@@ -425,11 +425,9 @@ int main(int argc, char** argv)
window = GTK_WINDOW(gtk_window_new());
gtk_window_set_default_size(window, WIDTH, HEIGHT);
- /*
- GtkEventController *event_controller = gtk_event_controller_key_new();
- gtk_widget_add_controller(GTK_WIDGET(window), event_controller);
- g_signal_connect(event_controller, "key-pressed", G_CALLBACK(rose_keypress_event), notebook);
- */
+ // GtkEventController *event_controller = gtk_event_controller_key_new();
+ // gtk_widget_add_controller(GTK_WIDGET(window), event_controller);
+ // g_signal_connect(event_controller, "key-pressed", G_CALLBACK(rose_keypress_event), notebook);
// gtk_widget_add_controller(GTK_WIDGET(notebook), event_controller);
@@ -441,8 +439,8 @@ int main(int argc, char** argv)
g_signal_connect(window, "destroy", G_CALLBACK(exit), notebook);
*/
- // gtk_window_set_child(window, GTK_WIDGET(notebook));
- // gtk_window_set_child(GTK_CONTAINER(window), GTK_WIDGET(notebook))
+ gtk_window_set_child(window, GTK_WIDGET(notebook));
+ // gtk_window_set_child(GTK_CONTAINER(window), GTK_WIDGET(notebook));
// Bar
/*