#include "pelemele_funct.h" #include #include #include #include #include int main (int argc, char *argv[]) { /* Initialiation GTK */ gtk_init (&argc, &argv); /* Initaliation GNOME VFS */ if (gnome_vfs_initialized () == FALSE) gnome_vfs_init(); /* Initialisation de gnome */ gnome_program_init("pelemele","0.0.1", LIBGNOMEUI_MODULE, argc, argv, GNOME_PARAM_NONE); gchar *repertoire = NULL; t_fond fond; GOptionEntry options[] = { {"nomrepertoire", 'r', 0, G_OPTION_ARG_STRING, &repertoire, "Repertoire", "r"}, {"longeur", 'l', 0, G_OPTION_ARG_INT, &fond.longueur, "Longeur", "l"}, {"hauteur" , 'h', 0, G_OPTION_ARG_INT, &fond.hauteur, "Hauteur", "h"}, {"nomfond", 'f', 0, G_OPTION_ARG_STRING, &fond.nom, "Fond", "f"}, {NULL} }; GOptionContext *ctx; /* Reglage du contexte d'option */ ctx = g_option_context_new("- Les options de Pelemele " ); g_option_context_add_main_entries(ctx, options, "pelemele"); /* Recuperation des options */ g_option_context_parse(ctx, &argc, &argv, NULL); g_printf("repertoire : %s", repertoire); /* Liberation du contexte */ g_option_context_free(ctx); return 0; }