WIP: suite lecture + mises en forme (arrays) perso; qui fait quoi ? (include/ui.h)

This commit is contained in:
Jean Sirmai 2023-11-10 10:07:01 +01:00
parent b8e70e8231
commit 14b326435b
Signed by: jean
GPG Key ID: FB3115C340E057E3
1 changed files with 34 additions and 79 deletions

View File

@ -56,79 +56,42 @@ G_DECLARE_FINAL_TYPE (GemGraphClientApplication,
GemGraphClientApplication *gem_graph_client_application_new(const char *application_id, GemGraphClientApplication *gem_graph_client_application_new(const char *application_id,
GApplicationFlags flags); GApplicationFlags flags);
G_END_DECLS G_END_DECLS
void ui_enable_action(const char *name); void ui_enable_action (const char *name);
void ui_disable_action (const char *name);
void ui_disable_action(const char *name);
//
// Actions // Actions
//
void on_about_action(GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void on_quit_action(GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void on_preferences_action(GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void on_togglesidebar_action(GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void on_editmode_action(GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void on_runmode_action(GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void on_presentmode_action(GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void on_openfile_action(GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void on_closefile_action(GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void on_savefile_action(GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void on_toast_close_action(GSimpleAction *action,
GVariant *parameter,
gpointer user_data);
void on_about_action (GSimpleAction *action, GVariant *parameter, gpointer user_data);
void on_quit_action (GSimpleAction *action, GVariant *parameter, gpointer user_data);
void on_preferences_action (GSimpleAction *action, GVariant *parameter, gpointer user_data);
void on_togglesidebar_action (GSimpleAction *action, GVariant *parameter, gpointer user_data);
void on_editmode_action (GSimpleAction *action, GVariant *parameter, gpointer user_data);
void on_runmode_action (GSimpleAction *action, GVariant *parameter, gpointer user_data);
void on_presentmode_action (GSimpleAction *action, GVariant *parameter, gpointer user_data);
void on_openfile_action (GSimpleAction *action, GVariant *parameter, gpointer user_data);
void on_closefile_action (GSimpleAction *action, GVariant *parameter, gpointer user_data);
void on_savefile_action (GSimpleAction *action, GVariant *parameter, gpointer user_data);
void on_toast_close_action (GSimpleAction *action, GVariant *parameter, gpointer user_data);
static const GActionEntry app_actions[] = { static const GActionEntry app_actions[] = {
{ "quit", on_quit_action, NULL, NULL, NULL }, { "quit", on_quit_action, NULL, NULL, NULL },
{ "about", on_about_action, NULL, NULL, NULL }, { "about", on_about_action, NULL, NULL, NULL },
{ "preferences", on_preferences_action, NULL, NULL, NULL }, { "preferences", on_preferences_action, NULL, NULL, NULL },
{ "togglesidebar", on_togglesidebar_action, NULL, NULL, NULL }, { "togglesidebar", on_togglesidebar_action, NULL, NULL, NULL },
{ "editmode", on_editmode_action, NULL, NULL, NULL }, { "editmode", on_editmode_action, NULL, NULL, NULL },
{ "runmode", on_runmode_action, NULL, NULL, NULL }, { "runmode", on_runmode_action, NULL, NULL, NULL },
{ "presentmode", on_presentmode_action, NULL, NULL, NULL }, { "presentmode", on_presentmode_action, NULL, NULL, NULL },
{ "openfile", on_openfile_action, NULL, NULL, NULL }, { "openfile", on_openfile_action, NULL, NULL, NULL },
{ "closefile", on_closefile_action, NULL, NULL, NULL }, { "closefile", on_closefile_action, NULL, NULL, NULL },
{ "savefile", on_savefile_action, NULL, NULL, NULL }, { "savefile", on_savefile_action, NULL, NULL, NULL },
{ "toastclose", on_toast_close_action, NULL, NULL, NULL }, { "toastclose", on_toast_close_action, NULL, NULL, NULL },
}; };
//
// Actions responses // Actions responses
//
void on_openfile_response(GtkNativeDialog *native, void on_openfile_response(GtkNativeDialog *native,
int response, int response,
GemGraphClientWindow *self); GemGraphClientWindow *self);
@ -137,29 +100,21 @@ void on_openfile_response_complete(GObject *source_object,
GAsyncResult *result, GAsyncResult *result,
GemGraphClientWindow *self); GemGraphClientWindow *self);
//
// General events // General events
//
void on_axis_value_change(GtkAdjustment *adjustment, gpointer data);
gboolean on_render(GtkGLArea * area, GdkGLContext * context); void on_axis_value_change (GtkAdjustment *adjustment, gpointer data);
gboolean on_render (GtkGLArea * area, GdkGLContext * context);
void on_realize(GtkWidget *widget); void on_realize (GtkWidget *widget);
void on_unrealize (GtkWidget *widget);
void on_unrealize(GtkWidget *widget); void on_close_window (GtkWidget *widget);
void on_close_window(GtkWidget *widget);
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
//
// Window primitives // Window primitives
//
void ui_set_stack(const char *mode); void ui_set_stack (const char *mode);
void ui_setup_glarea (GtkGLArea *target, GtkBox *target_controls);
void ui_setup_glarea(GtkGLArea *target, GtkBox *target_controls); void ui_send_internal_notification (const char *message);
void ui_send_internal_notification(const char *message); void ui_close_internal_notification (void);
void ui_close_internal_notification(void); void ui_toggle_sidebar ();
void ui_toggle_sidebar();