diff --git a/include/fsm.h b/include/fsm.h index 3803055..3a7f02b 100644 --- a/include/fsm.h +++ b/include/fsm.h @@ -54,7 +54,9 @@ typedef struct disp_list {int value; struct disp_list *suiv;} disp_list ; typedef struct journal {int value; struct journal *prev;} journal; // ref: sudo cat /var/log/messages -void fsm_init(); // def: fsm/dispatch; call: main; +GtkApplication *fsf_get_app(); // def: main call: fsm/engine/engine; + +void fsm_init(bool mode_console); // def: fsm/dispatch; call: main; void fsm_preferences_init(); // def: fsm/prefer; call: fsm/dispatch; void fsm_measures_list_init(); // def: fsm/measure/manage.c; call: fsm/dispatch; void fsm_results_list_init(); // def: fsm/results; call: fsm/dispatch; @@ -103,6 +105,7 @@ void fsm_rule_trig_measure (int rule_id, int object_id, int measure_id); // --------------------------------------------------------------- WIP ------ void fsm_engine_init(); +void fsm_poetic_engine(); // --------------------------------------------------------------- WIP ------ int fsm_journal_push (journal **jj, int v_value); @@ -124,3 +127,4 @@ void fsm_disp_add_chart (disp_list d, int *p_chart); int fsm_disp_get_chart (disp_list d, int from, int to); void fsm_disp_remove_chart (disp_list d, int *p_chart); +void fsm_another_proto_engine (); diff --git a/manifest.scm b/manifest.scm index c1ac365..0e742e5 100644 --- a/manifest.scm +++ b/manifest.scm @@ -17,7 +17,7 @@ "libxml2" "glu" "glew" - "glfw" +;; "glfw" "cglm" "libepoxy" "pango@1.90.0" diff --git a/src/fsm/dispatch.c b/src/fsm/dispatch.c index e7cffc2..11e1710 100644 --- a/src/fsm/dispatch.c +++ b/src/fsm/dispatch.c @@ -58,15 +58,18 @@ /* F S M I N I T */ /******************************************************************************/ -void fsm_init() +void fsm_init(bool mode_console) { - - fsm_measures_list_init(); - fsm_results_list_init(); - fsm_displayable_list_init(); - fsm_preferences_init(); - - // fsm_engine_init(); // pour avancer, en attendant... 😇️ + if (mode_console) fsm_engine_init(); // pour avancer, en attendant... 😇️ + else { + fsm_measures_list_init(); + fsm_results_list_init(); + fsm_displayable_list_init(); + fsm_preferences_init(); + printf("exemple de format de journal : 2024-08-31 [%s()] %s\ + < NB ce printf() se trouve dans 'fsm/dispatch.c'\n", __func__, "message"); // logging TODO TODO + // un exemple : $ sudo cat /var/log/messages + } } diff --git a/src/fsm/engine.c b/src/fsm/engine.c deleted file mode 100644 index 98bc7d6..0000000 --- a/src/fsm/engine.c +++ /dev/null @@ -1,101 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * -* * -* Gem-graph client * -* Finite State Machine Engine * -* * -* Copyright © 2024 Libre en Communs * -* Copyright © 2024 Jean Sirmai * -* * -* This file is part of Gem-graph. * -* * -* This program is free software: you can redistribute it and/or modify it * -* under the terms of the GNU Affero General Public License * -* as published by the Free Software Foundation, * -* either version 3 of the License, * -* or (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; * -* without even the implied warranty of MERCHANTABILITY * -* or FITNESS FOR A PARTICULAR PURPOSE. * -* See the GNU Affero General Public License for more details. * -* * -* You should have received a copy of the GNU Affero General Public License * -* along with this program. If not, see . * -* * -* * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#include -#include -#include "../../include/fsm.h" -#include "../../include/signal.h" -#include "../../include/widget.h" - - -/******************************************************************************/ -/* */ -/* OOOOOOOOOOO OOOOO OOO OOO */ -/* OO OO OO OOOO OOOO */ -/* OO OO OO OO OO OO */ -/* OOOOOO OO OO OO OO OO */ -/* OO OO OO OOO OO */ -/* OO OO OO OO */ -/* OO OO OOO OO OO */ -/* OO OOOOOO OO OO */ -/* */ -/******************************************************************************/ - -static void proto_proto_proto_engine(); -void fsm_engine_init() -{ - if (0) printf ("src/fsm/engine.c | src/fsm/engine.c fsm_engine_init()\n"); - proto_proto_proto_engine(); - // \x1b[1F \x1b[2K == move to the beginning of previous line and clear it -} - -static void proto_proto_proto_engine() -{ - int milliseconds = 200; - struct timespec rem; - struct timespec req= { - (int)(milliseconds / 1000), /* secs (Must be Non-Negative) */ - (milliseconds % 1000) * 1000000 /* nano (Must be in range of 0 to 999999999) */ - }; - while (true) { - printf("O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("-O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("---O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("--- -O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("- - - O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" - - O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("- O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" O. \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" .O \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" . O \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" . O \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" . O \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" . O \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" . O \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" . O \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" . O \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" . O \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" O \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("- O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf(" -O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("-O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("-O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - printf("O . \n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); - } -} - diff --git a/src/fsm/engine/engine.c b/src/fsm/engine/engine.c new file mode 100644 index 0000000..283bea9 --- /dev/null +++ b/src/fsm/engine/engine.c @@ -0,0 +1,105 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * +* * +* Gem-graph client * +* Finite State Machine Engine * +* * +* Copyright © 2024 Libre en Communs * +* Copyright © 2024 Jean Sirmai * +* * +* This file is part of Gem-graph. * +* * +* This program is free software: you can redistribute it and/or modify it * +* under the terms of the GNU Affero General Public License * +* as published by the Free Software Foundation, * +* either version 3 of the License, * +* or (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; * +* without even the implied warranty of MERCHANTABILITY * +* or FITNESS FOR A PARTICULAR PURPOSE. * +* See the GNU Affero General Public License for more details. * +* * +* You should have received a copy of the GNU Affero General Public License * +* along with this program. If not, see . * +* * +* * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include +#include +#include "../../../include/fsm.h" +#include "../../../include/widget.h" + + +/******************************************************************************/ +/* */ +/* OOOOOOOOOOO OOOOO OOO OOO */ +/* OO OO OO OOOO OOOO */ +/* OO OO OO OO OO OO */ +/* OOOOOO OO OO OO OO OO */ +/* OO OO OO OOO OO */ +/* OO OO OO OO */ +/* OO OO OOO OO OO */ +/* OO OOOOOO OO OO */ +/* */ +/******************************************************************************/ + +static void fsm_strange_engine() +{ + int milliseconds = 100; + struct timespec rem; + struct timespec req= { + (int)(milliseconds / 1000), /* secs (Must be Non-Negative) */ + (milliseconds % 1000) * 1000000 /* nano (Must be in range of 0 to 999999999) */ + }; + int stop = 0; + while (! stop) { + printf(" | M . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | W . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | MO * |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | W=-O * |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | D=-- -O * |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | =- - - O * |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | -- O * |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | - O (*) |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O (*) |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O (*) |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O (*) |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O*) |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | (*O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | (*) O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | (*) O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | (*) O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | * O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | * O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | * O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | * O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | * O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O * |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O . .|\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O . .|\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | D . . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | M- . . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | W =- . . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | M = --- . . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | W =-- . . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | M=- . .|\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | W- . .|\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + if (getchar() == '\n') stop = 1; + } +// if (stop) g_object_unref (fsf_get_app()); // widget_design_main_window (NULL); // widget_get_main_window()); +} + + +void fsm_engine_init() +{ + if (1) printf ("src/fsm/engine.c | src/fsm/engine.c fsm_engine_init()\n"); + fsm_strange_engine(); + // \x1b[1F \x1b[2K == move to the beginning of previous line and clear it + //fsm_another_proto_engine(); +} + + diff --git a/src/fsm/engine/poetry.c b/src/fsm/engine/poetry.c new file mode 100644 index 0000000..9023231 --- /dev/null +++ b/src/fsm/engine/poetry.c @@ -0,0 +1,90 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * +* * +* Gem-graph client * +* Finite State Machine Engine * +* ... a little touch of poetry ... * +* * +* Copyright © 2024 Jean Sirmai * +* * +* This file is part of Gem-graph and of the dreams it may reveal. * +* * +* This program is free software: you can redistribute it and/or modify it * +* under the terms of the GNU Affero General Public License * +* as published by the Free Software Foundation, * +* either version 3 of the License, * +* or (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; * +* without even the implied warranty of MERCHANTABILITY * +* or FITNESS FOR A PARTICULAR PURPOSE. * +* See the GNU Affero General Public License for more details. * +* * +* You should have received a copy of the GNU Affero General Public License * +* along with this program. If not, see . * +* * +* * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include +#include +#include "../../../include/fsm.h" + + +/******************************************************************************/ +/* */ +/* OOOOOOOOOOO OOOOO OOO OOO */ +/* OO OO OO OOOO OOOO */ +/* OO OO OO OO OO OO */ +/* OOOOOO OO OO OO OO OO */ +/* OO OO OO OOO OO */ +/* OO OO OO OO */ +/* OO OO OOO OO OO */ +/* OO OOOOOO OO OO */ +/* */ +/******************************************************************************/ + +void fsm_poetic_engine() // 2024-08-31 +{ + int milliseconds = 100; + struct timespec rem; + struct timespec req= { + (int)(milliseconds / 1000), /* secs (Must be Non-Negative) */ + (milliseconds % 1000) * 1000000 /* nano (Must be in range of 0 to 999999999) */ + }; + while (true) { + printf(" | O . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | DO * |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | D=-O * |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | D=-- -O * |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | =- - - O * |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | -- O * |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | - O (*) |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O (*) |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O (*) |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O (*) |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O*) |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | (*O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | (*) O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | (*) O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | (*) O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | * O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | * O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | * O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | * O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | * O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O * |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O . .|\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | O . .|\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | D . . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | D- . . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | D =- . . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | D = --- . . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | D =-- . . |\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | D=- . .|\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + printf(" | D- . .|\n\x1b[1F\x1b[2K"); nanosleep(&req , &rem); + } +} diff --git a/src/fsm/engine/to_name.c b/src/fsm/engine/to_name.c new file mode 100644 index 0000000..dd3104a --- /dev/null +++ b/src/fsm/engine/to_name.c @@ -0,0 +1,78 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * +* * +* Gem-graph client * +* Finite State Machine Engine * +* * +* Copyright © 2024 Libre en Communs * +* Copyright © 2024 Jean Sirmai * +* * +* This file is part of Gem-graph. * +* * +* This program is free software: you can redistribute it and/or modify it * +* under the terms of the GNU Affero General Public License * +* as published by the Free Software Foundation, * +* either version 3 of the License, * +* or (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; * +* without even the implied warranty of MERCHANTABILITY * +* or FITNESS FOR A PARTICULAR PURPOSE. * +* See the GNU Affero General Public License for more details. * +* * +* You should have received a copy of the GNU Affero General Public License * +* along with this program. If not, see . * +* * +* * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include +#include +#include "../../../include/fsm.h" + + +/******************************************************************************/ +/* */ +/* OOOOOOOOOOO OOOOO OOO OOO */ +/* OO OO OO OOOO OOOO */ +/* OO OO OO OO OO OO */ +/* OOOOOO OO OO OO OO OO */ +/* OO OO OO OOO OO */ +/* OO OO OO OO */ +/* OO OO OOO OO OO */ +/* OO OOOOOO OO OO */ +/* */ +/******************************************************************************/ + +static int l = 196; +static char t[200]; // = {'|',' ','-',' ','|',' ','-',' ','|',' ','-',' ','|',' ','-',' ','|'}; + +static void init() +{ + for (int i = 0; i < l; i++) { + if (i % 4 == 0) t[i] = 'O'; + if (i % 4 == 1) t[i] = ' '; + if (i % 4 == 2) t[i] = '-'; + if (i % 4 == 3) t[i] = ' '; + } +} + +static void console() +{ + int milliseconds = 100; + struct timespec rem; + struct timespec req= { + (int)(milliseconds / 1000), /* secs (Must be Non-Negative) */ + (milliseconds % 1000) * 1000000 /* nano (Must be in range of 0 to 999999999) */ + }; + printf("\n> "); + for (int i = 0; i < l; i++) printf("%c", t[i]); + printf("<\n\x1b[1F\x1b[2K"); + nanosleep(&req , &rem); +} + +void fsm_another_proto_engine () +{ + init(); + console(); +} + diff --git a/src/main.c b/src/main.c index 8d2edbd..ad5fb46 100644 --- a/src/main.c +++ b/src/main.c @@ -133,22 +133,20 @@ #include "../include/signal.h" #include "../include/fsm.h" +GtkApplication *app; +GtkApplication *fsf_get_app() {return app;} int main (int argc, char **argv) { - GtkApplication *app; int status; - printf("exemple de format de journal : 2024-08-31 [%s()] %s\ - < NB ce printf() se trouve dans 'main'\n", __func__, "message"); // logging TODO TODO - // un exemple : $ sudo cat /var/log/messages - app = gtk_application_new ("org.gem-graph", G_APPLICATION_DEFAULT_FLAGS); - fsm_init (); // fsm = finite state machine (see : src/fsm/dispatch.c) + bool mode_console = FALSE; // TRUE FALSE + fsm_init (mode_console); // fsm = finite state machine (see : src/fsm/dispatch.c) g_signal_connect (app, "activate", G_CALLBACK (on_windows_activation), NULL); - // on_windows_activation <> see : src/widget/dispatch + // on_windows_activation <> see : src/widget/dispatch.c status = g_application_run (G_APPLICATION (app), argc, argv); g_object_unref (app); diff --git a/src/widget/dispatch.c b/src/widget/dispatch.c index f7022b2..5c27d0a 100644 --- a/src/widget/dispatch.c +++ b/src/widget/dispatch.c @@ -30,6 +30,7 @@ #include "../../include/widget.h" +#include "../../include/fsm.h" /******************************************************************************/ @@ -60,16 +61,25 @@ void on_windows_activation (GtkApplication *app) { // g_application_activate (G_APPLICATION (app)); < how ? > in main.c is // g_signal_connect (app, "activate", G_CALLBACK (on_windows_activation), NULL); -/* - printf(" We apologise for the temporary interruption to the window. 😇️\n\ - Please, ask 'src/widget/dispatch.c on_windows_activation (GtkApplication *app)'\n\ - to call: widget_design_main_window (main_window)\n"); -*/ + main_window = GTK_WINDOW (gtk_application_window_new (app)); dialog_window = GTK_WINDOW (gtk_application_window_new (app)); text_window = GTK_WINDOW (gtk_application_window_new (app)); +//-----------------------------------------------------------------------------------// +//-----------------------------------------------------------------------------------// + printf("mode_console 😇️\ + (see@ 'src/widget/dispatch.c on_windows_activation() < POUR RÉACTIVER GTK4)\n"); + +// S I P A S M O D E - C O N S O L E widget_design_main_window (main_window); // def: widget/topbar/dispatch +// S I P A S M O D E - C O N S O L E + + fsm_engine_init(); +//-----------------------------------------------------------------------------------// +//-----------------------------------------------------------------------------------// + + widget_design_dialog_window (main_window, dialog_window); widget_design_text_window (main_window, text_window); }