98 lines
3.2 KiB
C
98 lines
3.2 KiB
C
//
|
||
//
|
||
//
|
||
// https://docs.gtk.org/gio/class.MenuItem.html
|
||
// https://docs.gtk.org/gio/ctor.MenuItem.new.html
|
||
//
|
||
// https://docs.gtk.org/gio/class.SimpleAction.html
|
||
// https://docs.gtk.org/gio/ctor.SimpleAction.new.html
|
||
//
|
||
// https://forge.a-lec.org/gem-graph/gem-graph-client/src/branch/devel/include/ui.h
|
||
/* static const GActionEntry app_actions [] = {
|
||
{ "quit", on_quit_action, NULL, NULL, NULL },
|
||
{ "about", on_about_action, NULL, NULL, NULL },
|
||
{ "preferences", on_preferences_action, NULL, NULL, NULL },
|
||
.... }; */
|
||
//
|
||
// https://forge.a-lec.org/gem-graph/gem-graph-client/src/branch/devel/src/ui/events.c
|
||
/* void on_about_action(GSimpleAction *action,
|
||
GVariant *parameter,
|
||
gpointer user_data)
|
||
{
|
||
static const char *authors[] = { "Adrien Bourmault (neox@a-lec.org)",
|
||
"Jean Sirmai (jean@a-lec.org)",
|
||
"Arthur Menges (arthur.menges@a-lec.org)",
|
||
NULL};
|
||
GemGraphClientApplication *self = user_data;
|
||
GtkWindow *window = NULL;
|
||
|
||
g_assert (GEM_GRAPH_CLIENT_IS_APPLICATION(self));
|
||
|
||
window = gtk_application_get_active_window(GTK_APPLICATION (self));
|
||
|
||
gtk_show_about_dialog(window,
|
||
"program-name", "Gem-graph",
|
||
"logo-icon-name", "application-x-executable",
|
||
"authors", authors,
|
||
"version", "0.1.0",
|
||
"copyright", "Copyright © 2023 Libre en Communs",
|
||
NULL);
|
||
} */
|
||
//
|
||
// https://forge.a-lec.org/gem-graph/gem-graph-client/src/branch/devel/src/ui/application.c
|
||
|
||
#include <unistd.h>
|
||
#include <gtk-4.0/gtk/gtk.h>
|
||
|
||
#define GEM_GRAPH_CLIENT_TYPE_WINDOW (gem_graph_client_window_get_type())
|
||
|
||
|
||
void on_preferences_action(GSimpleAction *action, // nom de type « GSimpleAction » inconnu
|
||
GVariant *parameter, // nom de type « GVariant » inconnu
|
||
gpointer user_data) // nom de type « gpointer » inconnu
|
||
{
|
||
// GemGraphClientApplication *self = user_data;
|
||
|
||
// g_assert(GEM_GRAPH_CLIENT_IS_APPLICATION(self));
|
||
|
||
// ui_send_internal_notification("Not implemented !");
|
||
}
|
||
|
||
|
||
/* void ui_enable_action(const char *name) {
|
||
g_simple_action_set_enabled(
|
||
(GSimpleAction *)g_action_map_lookup_action(
|
||
G_ACTION_MAP(application),
|
||
name),
|
||
true);
|
||
}
|
||
|
||
void ui_disable_action(const char *name) {
|
||
g_simple_action_set_enabled(
|
||
(GSimpleAction *)g_action_map_lookup_action(
|
||
G_ACTION_MAP(application),
|
||
name),
|
||
false);
|
||
}
|
||
|
||
*
|
||
* Window actual presentation on screen
|
||
*
|
||
*
|
||
static void gem_graph_client_application_activate(GApplication *app)
|
||
{
|
||
GtkWindow *window;
|
||
|
||
g_assert(GEM_GRAPH_CLIENT_IS_APPLICATION(app));
|
||
|
||
window = gtk_application_get_active_window(GTK_APPLICATION (app));
|
||
if (window == NULL)
|
||
window = g_object_new(GEM_GRAPH_CLIENT_TYPE_WINDOW,
|
||
"application", app,
|
||
NULL);
|
||
|
||
ui_set_stack(HOME_MODE);
|
||
|
||
gtk_window_present(window);
|
||
}
|
||
*/
|