From f10b52e7ddda062f070ad29ed0f7e4619c031c95 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Sat, 27 Apr 2024 14:59:32 +0200 Subject: [PATCH] =?UTF-8?q?=C3=A9bauche=20de=20structuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 16 ++++++++-------- exec.o | Bin 26656 -> 26536 bytes main.c | 42 ++++++------------------------------------ warm.c | 8 ++++---- 4 files changed, 18 insertions(+), 48 deletions(-) diff --git a/Makefile b/Makefile index 1b522bc..35a3fe1 100644 --- a/Makefile +++ b/Makefile @@ -15,20 +15,22 @@ OPTIMIZE = -O2 all: exec -exec.o: main.c Makefile - $(CC) $(CFLAGS) $(WARNINGS) $(DEBUG) $(OPTIMIZE) -o $@ main.c +exec.o: + $(CC) $(CFLAGS) $(WARNINGS) $(DEBUG) $(OPTIMIZE) warm.c -o $@ main.c clean: rm -f exec.o -# Builder will call this to install the application before running. install: echo "Installing is not supported" -# Builder uses this target to run your application. -run: exec.o +run: ./exec.o + + + + # gcc $( pkg-config --cflags gtk4 ) -o exec main.c $( pkg-config --libs gtk4 ) # https://www.gnu.org/software/make/manual/ @@ -79,7 +81,5 @@ run: exec.o # A target can also be the name of an action to carry out, such as ‘clean’ - -# https://blog.stephane-robert.info/docs/makefile/ -# https://blog.stephane-robert.info/docs/task/ +# accessoirement : https://blog.stephane-robert.info/docs/makefile/ & /docs/task/ diff --git a/exec.o b/exec.o index 708cd5c0c7746113dacece9903521710d5c24275..b9b918bc55be96297fb67672fefeb2957a572385 100755 GIT binary patch delta 7908 zcmZX32|QF`_y5c=_H8WLvS%&JBx|-&cCv&-*|L^B`!?1z$kLUiWKAS$Lb8;d>_kE- zB8(*@LW%#qgZKBo{mc73&_VnJ|ZS?Kn*en$gCiffeaBn$ebXfKxPM-4M34<0Vy`5fGsJh3>PSY zf}{bN8Dt8OX+egF5o9`$p~%QVh6n*N7x0jjl>)NVbC;6`ULcOcRe>L*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activate (GtkApplication *app, gpointer user_data) { GtkWidget *button_0 = gtk_button_new_with_label ("Quit"); - GtkWidget *button_1 = gtk_button_new_with_label ("I"); - GtkWidget *button_2 = gtk_button_new_with_label ("II"); - GtkWidget *button_3 = gtk_button_new_with_label ("III"); - GtkWidget *button_4 = gtk_button_new_with_label ("IV"); - GtkWidget *button_5 = gtk_button_new_with_label ("V"); - - char *text = "niofnein"; - printf("in main.c : %s\n", text); -// print_text(text); - + GtkWidget *button_1 = gtk_button_new_with_label ("bouton (I)"); GtkWidget *window = gtk_application_window_new (app); GtkWidget *titlebar = gtk_header_bar_new(); - GtkWidget *switcher = gtk_stack_switcher_new(); // GtkWidget *sidebar = gtk_stack_sidebar_new(); GtkStack *stack = GTK_STACK (gtk_stack_new()); GtkWidget *page_0 = gtk_paned_new(GTK_ORIENTATION_VERTICAL); GtkWidget *page_1 = gtk_paned_new(GTK_ORIENTATION_VERTICAL); GtkWidget *grid = gtk_grid_new(); -// GtkWidget *grid_1 = gtk_grid_new(); - GtkWidget *box = gtk_box_new (0, 6); // 6 = spacing GtkWidget *box_1 = gtk_box_new (0, 6); // 6 = spacing gtk_window_set_title (GTK_WINDOW (window), "Window"); - gtk_widget_set_size_request (window, 60, 0); gtk_window_set_titlebar (GTK_WINDOW (window), titlebar); // header_bar -// gtk_window_set_overlay (GTK_WINDOW (window), overlay); // overlay gtk_window_set_child (GTK_WINDOW (window), grid); - g_signal_connect (button_1, "clicked", G_CALLBACK (print), "I'm n°1\n"); + g_signal_connect (button_1, "clicked", G_CALLBACK (print_text), "n°1\n"); gtk_grid_attach (GTK_GRID (grid), button_1, 0, 0, 1, 1); - g_signal_connect (button_2, "clicked", G_CALLBACK (print), "I'm n°2\n"); - gtk_grid_attach (GTK_GRID (grid), button_2, 1, 0, 1, 1); - g_signal_connect (button_0, "clicked", G_CALLBACK (print), "bye !...\n"); + g_signal_connect (button_0, "clicked", G_CALLBACK (print_text), "bye !...\n"); g_signal_connect_swapped (button_0, "clicked", G_CALLBACK (gtk_window_destroy), window); - gtk_grid_attach (GTK_GRID (grid), button_0, 0, 1, 2, 1); - gtk_box_append (GTK_BOX (box), button_3); - gtk_box_append (GTK_BOX (box), button_4); - gtk_box_append (GTK_BOX (box_1), button_5); - - - gtk_grid_attach (GTK_GRID (grid), box, 0, 2, 2, 1); - -// https://developer-old.gnome.org/gtk4/stable/GtkStack.html -// https://developer.gnome.org/documentation/index.html -// https://docs.gtk.org/gtk4/enum.AccessibleRole.html + gtk_grid_attach (GTK_GRID (grid), button_0, 1, 0, 1, 1); gtk_stack_add_titled (stack, page_0, "n°0", "A"); gtk_stack_add_titled (stack, page_1, "n°1", "B"); GtkStackPage *page_2 = gtk_stack_add_titled (stack, box_1, "any name", "C"); gtk_stack_page_set_name (page_2, "n°2"); - // gtk_grid_attach (GTK_GRID (grid_1), button_5, 0, 0, 1, 1); - gtk_orientable_set_orientation (GTK_ORIENTABLE (switcher), GTK_ORIENTATION_VERTICAL); gtk_orientable_set_orientation (GTK_ORIENTABLE (switcher), GTK_ORIENTATION_HORIZONTAL); @@ -74,7 +44,7 @@ static void activate (GtkApplication *app, gpointer user_data) { gtk_stack_get_visible_child_name (stack)); // gtk_stack_set_transition_type (GTK_STACK (stack), GTK_STACK_TRANSITION_TYPE_CROSSFADE); - gtk_grid_attach (GTK_GRID (grid), switcher, 0, 3, 2, 1); + gtk_grid_attach (GTK_GRID (grid), switcher, 0, 2, 2, 1); gtk_window_present (GTK_WINDOW (window)); } diff --git a/warm.c b/warm.c index b9fc6bc..0f22fe4 100644 --- a/warm.c +++ b/warm.c @@ -1,15 +1,15 @@ -#pragma once +//#pragma once #include #include #include - button_0 = gtk_button_new_with_label ("Quit"); +/* button_0 = gtk_button_new_with_label ("Quit"); GtkWidget *button_1 = gtk_button_new_with_label ("I"); GtkWidget *button_2 = gtk_button_new_with_label ("II"); GtkWidget *button_3 = gtk_button_new_with_label ("III"); GtkWidget *button_4 = gtk_button_new_with_label ("IV"); - GtkWidget *button_5 = gtk_button_new_with_label ("V"); + GtkWidget *button_5 = gtk_button_new_with_label ("V");*/ // GtkToggleButton *tb1 = GTK_TOGGLE_BUTTON (gtk_button_new_with_label ("tb1")); -void print_text(char *text) {printf("in warm.c : %s\n", text);} +void print_text(GtkWidget *widget, gpointer data) {g_print (data);}