- /////////////// FICHIER GTK.MSGBOX.H //////////////////////
-
- /**
- ** STRUCTURE CONTENANT DES INFOS SUR LES FENETRES
- **/
- typedef struct TcoordoFenetre
- {
-
- gpointer FenetrePrin; // Contiendra l'adresse de la Fenêtre Principal
-
- }TcoordoFenetre;
-
- TcoordoFenetre * coord;
-
-
- // Prototype
- void MsgBox ( char message[], int msgType, gpointer addrWindow );
-
- ///////////////////////////////////////////////////////////
-
-
- /////////////// FICHIER GTK.MSGBOX.C //////////////////////
-
- #include <gtk/gtk.h>
-
- void MsgBox ( char message[], int msgType, gpointer addrWindow )
- {
-
- GtkWidget * msgBox;
-
- if ( addrWindow == NULL )
- {
- addrWindow = coord->FenetrePrin;
- }
-
- /* Cration de la boite de dialogue */
- msgBox = gtk_message_dialog_new (GTK_WINDOW(addrWindow),
- GTK_DIALOG_MODAL,
- msgType,
- GTK_BUTTONS_OK,
- "%s", message);
-
- /* Ouvre la boite de dialogue */
- gtk_dialog_run(GTK_DIALOG(msgBox));
-
- /* Détruit la boite de dialogue */
- gtk_widget_destroy(msgBox);
-
-
- }
-
- ///////////////////////////////////////////////////////////
/////////////// FICHIER GTK.MSGBOX.H //////////////////////
/**
** STRUCTURE CONTENANT DES INFOS SUR LES FENETRES
**/
typedef struct TcoordoFenetre
{
gpointer FenetrePrin; // Contiendra l'adresse de la Fenêtre Principal
}TcoordoFenetre;
TcoordoFenetre * coord;
// Prototype
void MsgBox ( char message[], int msgType, gpointer addrWindow );
///////////////////////////////////////////////////////////
/////////////// FICHIER GTK.MSGBOX.C //////////////////////
#include <gtk/gtk.h>
void MsgBox ( char message[], int msgType, gpointer addrWindow )
{
GtkWidget * msgBox;
if ( addrWindow == NULL )
{
addrWindow = coord->FenetrePrin;
}
/* Cration de la boite de dialogue */
msgBox = gtk_message_dialog_new (GTK_WINDOW(addrWindow),
GTK_DIALOG_MODAL,
msgType,
GTK_BUTTONS_OK,
"%s", message);
/* Ouvre la boite de dialogue */
gtk_dialog_run(GTK_DIALOG(msgBox));
/* Détruit la boite de dialogue */
gtk_widget_destroy(msgBox);
}
///////////////////////////////////////////////////////////