Back to index

gcompris  8.2.2
plugin.h
Go to the documentation of this file.
00001 /* gcompris - plugin.h
00002  *
00003  * Time-stamp: <2005/09/14 23:30:48 yves>
00004  *
00005  * Copyright (C) 2000 Bruno Coudoin
00006  *
00007  *   This program is free software; you can redistribute it and/or modify
00008  *   it under the terms of the GNU General Public License as published by
00009  *   the Free Software Foundation; either version 2 of the License, or
00010  *   (at your option) any later version.
00011  *
00012  *   This program is distributed in the hope that it will be useful,
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *   GNU General Public License for more details.
00016  *
00017  *   You should have received a copy of the GNU General Public License
00018  *   along with this program; if not, write to the Free Software
00019  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  */
00021 #ifndef PLUGIN_H
00022 #define PLUGIN_H
00023 
00024 #include "profile.h"
00025 
00026 /* Forward declaration of GcomprisBoard */
00027 typedef struct _GcomprisBoard         GcomprisBoard;
00028 
00029 /* Return 1 if the board plugin can handle this board */
00030 typedef       gboolean      (*GcomprisIsOurBoard)   (GcomprisBoard *gcomprisBoard);
00031 
00032 typedef void          (*GcomprisInitBoard)    (GcomprisBoard *gcomprisBoard);
00033 typedef void          (*GcomprisStartBoard)   (GcomprisBoard *gcomprisBoard);
00034 typedef void          (*GcomprisPauseBoard)   (gboolean pause);
00035 typedef void          (*GcomprisEndBoard)     (void);
00036 typedef gint          (*GcomprisKeyPress)     (guint keyval,
00037                                           gchar *commited_str,
00038                                           gchar *preedit_str);
00039 typedef void          (*GcomprisOK)           (void);
00040 typedef void          (*GcomprisSetLevel)     (guint level);
00041 typedef void          (*GcomprisConfig)       ();
00042 typedef void          (*GcomprisRepeat)       ();
00043 typedef void          (*GcomprisConfigStart)  (GcomprisBoard *gcomprisBoard,
00044                                           GcomprisProfile *profile);
00045 typedef void          (*GcomprisConfigStop)    (void);
00046 
00047 typedef struct
00048 {
00049   void *handle;                    /* Filled in by gcompris */
00050   char *filename;           /* Filled in by gcompris */
00051   char *name;               /* The name that describes this board */
00052   char *description;        /* The description that describes this board */
00053   char *author;                    /* The author of this board */
00054 
00055   GcomprisInitBoard    init;       /* Called when the plugin is loaded */
00056 
00057   void (*cleanup) (void);          /* Called when gcompris exit */
00058   void (*about) (void);            /* Show the about box */
00059   void (*configure) (void); /* Show the configuration dialog */
00060 
00061   GcomprisStartBoard   start_board;
00062   GcomprisPauseBoard   pause_board;
00063   GcomprisEndBoard     end_board;
00064 
00065   GcomprisIsOurBoard   is_our_board; /* Return 1 if the plugin can handle the board file */
00066 
00067   GcomprisKeyPress     key_press;
00068   GcomprisOK           ok;
00069   GcomprisSetLevel     set_level;
00070   GcomprisConfig       config;
00071   GcomprisRepeat       repeat;
00072 
00073   GcomprisConfigStart  config_start;
00074   GcomprisConfigStop   config_stop;
00075 
00076 }
00077 BoardPlugin;
00078 
00079 /* Board plugin entry point */
00080 BoardPlugin *get_bplugin_info(void);
00081 
00082 #endif
00083 
00084 /* Local Variables: */
00085 /* mode:c */
00086 /* eval:(load-library "time-stamp") */
00087 /* eval:(make-local-variable 'write-file-hooks) */
00088 /* eval:(add-hook 'write-file-hooks 'time-stamp) */
00089 /* eval:(setq time-stamp-format '(time-stamp-yyyy/mm/dd time-stamp-hh:mm:ss user-login-name)) */
00090 /* End: */