GTK4: savepoint for the day

This commit is contained in:
NunoSempere 2024-07-20 20:35:15 -04:00
parent bf23c75dfd
commit a7e0a98b1d
2 changed files with 11 additions and 10 deletions

View File

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

View File

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