home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / libgimp / gimpmodule.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-06  |  2.3 KB  |  93 lines

  1. /* LIBGIMP - The GIMP Library 
  2.  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
  3.  *
  4.  * gimpmodule.h (C) 1999 Austin Donnelly <austin@greenend.org.uk>
  5.  *
  6.  * This program is free software; you can redistribute it and/or modify
  7.  * it under the terms of the GNU General Public License as published by
  8.  * the Free Software Foundation; either version 2 of the License, or
  9.  * (at your option) any later version.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program; if not, write to the Free Software
  18.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19.  */
  20.  
  21. #ifndef __GIMPMODULE_H__
  22. #define __GIMPMODULE_H__
  23.  
  24. #include <gmodule.h>
  25.  
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif /* __cplusplus */
  29.  
  30. /* For information look at the html documentation */
  31.  
  32.  
  33. typedef enum
  34. {
  35.   GIMP_MODULE_OK,
  36.   GIMP_MODULE_UNLOAD
  37. } GimpModuleStatus;
  38.  
  39.  
  40. typedef struct _GimpModuleInfo GimpModuleInfo;
  41.  
  42. struct _GimpModuleInfo
  43. {
  44.   gpointer     shutdown_data;
  45.  
  46.   const gchar *purpose;
  47.   const gchar *author;
  48.   const gchar *version;
  49.   const gchar *copyright;
  50.   const gchar *date;
  51. };
  52.  
  53.  
  54. /*  Module initialization  */
  55.  
  56. typedef GimpModuleStatus (* GimpModuleInitFunc) (GimpModuleInfo **module_info);
  57.  
  58.  
  59. #ifndef MODULE_COMPILATION
  60.  
  61. /*  On Win32 this declaration clashes with the definition
  62.  *  (which uses G_MODULE_EXPORT) and thus should be bypassed
  63.  *  when compiling the module itself.
  64.  */
  65. GimpModuleInitFunc module_init;
  66.  
  67. #endif /* ! MODULE_COMPILATION */
  68.  
  69.  
  70. /*  Module unload  */
  71.  
  72. typedef void (* GimpModuleCompletedCB) (gpointer               completed_data);
  73.  
  74. typedef void (* GimpModuleUnloadFunc)  (gpointer               shutdown_data,
  75.                     GimpModuleCompletedCB  completed_cb,
  76.                     gpointer               completed_data);
  77.  
  78.  
  79. #ifndef MODULE_COMPILATION
  80.  
  81. /*  The same as for module_init.
  82.  */
  83. GimpModuleUnloadFunc module_unload;
  84.  
  85. #endif /* ! MODULE_COMPILATION */
  86.  
  87.  
  88. #ifdef __cplusplus
  89. }
  90. #endif /* __cplusplus */
  91.  
  92. #endif /* __GIMPMODULE_H__ */
  93.