Normally I used this method of coding:
int main (int argc, char **argv)
{
struct AppData appData; // personal structure
GtkApplication *app;
gint status;
app = gtk_application_new (PROGRAM_ID, G_APPLICATION_DEFAULT_FLAGS);
g_signal_connect (app, "startup", G_CALLBACK (cb_startup), &appData);
g_signal_connect (app, "activate", G_CALLBACK (cb_activate), &appData);
status = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
return status;
}
I’m trying to adapt my code like the trivial example:
include <gtk/gtk.h>
#include "exampleapp.h"
int main (int argc, char *argv[])
{
struct AppData appData; // personal structure
return g_application_run (G_APPLICATION (example_app_new ()), argc, argv);
}
My question is: how can I pass my personal structure in the above style code?