GTK4: savepoint for the day
This commit is contained in:
parent
bf23c75dfd
commit
a7e0a98b1d
5
makefile
5
makefile
|
@ -3,7 +3,7 @@ CC=gcc # alternatives: tcc, clang, zig cc
|
||||||
WARNINGS=-Wall
|
WARNINGS=-Wall
|
||||||
OPTIMIZED_SOME=-O3
|
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
|
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
|
STD=-std=c99 # maybe consider moving to c11 and using safer string handling
|
||||||
|
|
||||||
# Dependencies for WebkitGTK4/GTK3
|
# 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)
|
$(CC) $(STD) $(WARNINGS) $(DEPRECATION_FLAGS) $(OPTIMIZED_MORE) $(DEBUG) $(INCS_4) $(PLUGINS) $(SRC_4) -o rosenrot $(LIBS_4) $(ADBLOCK)
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
|
diagnose:
|
||||||
|
G_ENABLE_DIAGNOSTIC=1 ./rosenrot
|
||||||
|
|
||||||
constants:
|
constants:
|
||||||
@echo
|
@echo
|
||||||
@echo "# Computing constants"
|
@echo "# Computing constants"
|
||||||
|
|
16
rosenrot4.c
16
rosenrot4.c
|
@ -1,9 +1,9 @@
|
||||||
#include <gdk/gdk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include <webkit/webkit.h>
|
#include <webkit/webkit.h>
|
||||||
|
#include "config.h"
|
||||||
#include "plugins/plugins.h"
|
#include "plugins/plugins.h"
|
||||||
|
|
||||||
/* Global declarations */
|
/* Global declarations */
|
||||||
|
@ -425,11 +425,9 @@ int main(int argc, char** argv)
|
||||||
window = GTK_WINDOW(gtk_window_new());
|
window = GTK_WINDOW(gtk_window_new());
|
||||||
gtk_window_set_default_size(window, WIDTH, HEIGHT);
|
gtk_window_set_default_size(window, WIDTH, HEIGHT);
|
||||||
|
|
||||||
/*
|
// GtkEventController *event_controller = gtk_event_controller_key_new();
|
||||||
GtkEventController *event_controller = gtk_event_controller_key_new();
|
// gtk_widget_add_controller(GTK_WIDGET(window), event_controller);
|
||||||
gtk_widget_add_controller(GTK_WIDGET(window), event_controller);
|
// g_signal_connect(event_controller, "key-pressed", G_CALLBACK(rose_keypress_event), notebook);
|
||||||
g_signal_connect(event_controller, "key-pressed", G_CALLBACK(rose_keypress_event), notebook);
|
|
||||||
*/
|
|
||||||
|
|
||||||
// gtk_widget_add_controller(GTK_WIDGET(notebook), event_controller);
|
// 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);
|
g_signal_connect(window, "destroy", G_CALLBACK(exit), notebook);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// gtk_window_set_child(window, GTK_WIDGET(notebook));
|
gtk_window_set_child(window, GTK_WIDGET(notebook));
|
||||||
// gtk_window_set_child(GTK_CONTAINER(window), GTK_WIDGET(notebook))
|
// gtk_window_set_child(GTK_CONTAINER(window), GTK_WIDGET(notebook));
|
||||||
|
|
||||||
// Bar
|
// Bar
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user