home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / app / misc_cmds.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-02-23  |  2.7 KB  |  109 lines

  1. /* The GIMP -- an image manipulation program
  2.  * Copyright (C) 1995-2000 Spencer Kimball and Peter Mattis
  3.  *
  4.  * This program is free software; you can redistribute it and/or modify
  5.  * it under the terms of the GNU General Public License as published by
  6.  * the Free Software Foundation; either version 2 of the License, or
  7.  * (at your option) any later version.
  8.  *
  9.  * This program is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.  * GNU General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU General Public License
  15.  * along with this program; if not, write to the Free Software
  16.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17.  */
  18.  
  19. /* NOTE: This file is autogenerated by pdbgen.pl. */
  20.  
  21. #include "procedural_db.h"
  22.  
  23. #include "app_procs.h"
  24.  
  25. #include "libgimp/gimpfeatures.h"
  26.  
  27. static ProcRecord version_proc;
  28. static ProcRecord quit_proc;
  29.  
  30. void
  31. register_misc_procs (void)
  32. {
  33.   procedural_db_register (&version_proc);
  34.   procedural_db_register (&quit_proc);
  35. }
  36.  
  37. static Argument *
  38. version_invoker (Argument *args)
  39. {
  40.   Argument *return_args;
  41.  
  42.   return_args = procedural_db_return_args (&version_proc, TRUE);
  43.   return_args[1].value.pdb_pointer = g_strdup (GIMP_VERSION);
  44.  
  45.   return return_args;
  46. }
  47.  
  48. static ProcArg version_outargs[] =
  49. {
  50.   {
  51.     PDB_STRING,
  52.     "version",
  53.     "The gimp version"
  54.   }
  55. };
  56.  
  57. static ProcRecord version_proc =
  58. {
  59.   "gimp_version",
  60.   "Returns the host gimp version.",
  61.   "This procedure returns the version number of the currently running gimp.",
  62.   "Manish Singh",
  63.   "Manish Singh",
  64.   "1999",
  65.   PDB_INTERNAL,
  66.   0,
  67.   NULL,
  68.   1,
  69.   version_outargs,
  70.   { { version_invoker } }
  71. };
  72.  
  73. static Argument *
  74. quit_invoker (Argument *args)
  75. {
  76.   gboolean kill_it;
  77.  
  78.   kill_it = args[0].value.pdb_int ? TRUE : FALSE;
  79.  
  80.   app_exit (kill_it);
  81.  
  82.   return procedural_db_return_args (&quit_proc, TRUE);
  83. }
  84.  
  85. static ProcArg quit_inargs[] =
  86. {
  87.   {
  88.     PDB_INT32,
  89.     "kill",
  90.     "Flag specifying whether to kill the gimp process or exit normally"
  91.   }
  92. };
  93.  
  94. static ProcRecord quit_proc =
  95. {
  96.   "gimp_quit",
  97.   "Causes the gimp to exit gracefully.",
  98.   "The internal procedure which can either be used to make the gimp quit normally, or to have the gimp clean up its resources and exit immediately. The normaly shutdown process allows for querying the user to save any dirty images.",
  99.   "Spencer Kimball & Peter Mattis",
  100.   "Spencer Kimball & Peter Mattis",
  101.   "1995-1996",
  102.   PDB_INTERNAL,
  103.   1,
  104.   quit_inargs,
  105.   0,
  106.   NULL,
  107.   { { quit_invoker } }
  108. };
  109.