~ubuntu-branches/ubuntu/vivid/gimp/vivid

« back to all changes in this revision

Viewing changes to libgimp/gimpmisc_pdb.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach
  • Date: 2012-05-08 18:50:03 UTC
  • mto: (1.1.26) (0.5.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 71.
  • Revision ID: package-import@ubuntu.com-20120508185003-tltkvbaysf8d2426
ImportĀ upstreamĀ versionĀ 2.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* LIBGIMP - The GIMP Library
2
 
 * Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
3
 
 *
4
 
 * gimpmisc_pdb.c
5
 
 *
6
 
 * This library is free software; you can redistribute it and/or
7
 
 * modify it under the terms of the GNU Lesser General Public
8
 
 * License as published by the Free Software Foundation; either
9
 
 * version 2 of the License, or (at your option) any later version.
10
 
 *
11
 
 * This library 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 GNU
14
 
 * Lesser General Public License for more details.
15
 
 *
16
 
 * You should have received a copy of the GNU Lesser General Public
17
 
 * License along with this library; if not, write to the
18
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
 
 * Boston, MA 02111-1307, USA.
20
 
 */
21
 
 
22
 
/* NOTE: This file is auto-generated by pdbgen.pl */
23
 
 
24
 
#include "config.h"
25
 
 
26
 
#include "gimp.h"
27
 
 
28
 
/**
29
 
 * gimp_version:
30
 
 *
31
 
 * Returns the host GIMP version.
32
 
 *
33
 
 * This procedure returns the version number of the currently running
34
 
 * GIMP.
35
 
 *
36
 
 * Returns: GIMP version number.
37
 
 */
38
 
gchar *
39
 
gimp_version (void)
40
 
{
41
 
  GimpParam *return_vals;
42
 
  gint nreturn_vals;
43
 
  gchar *version = NULL;
44
 
 
45
 
  return_vals = gimp_run_procedure ("gimp-version",
46
 
                                    &nreturn_vals,
47
 
                                    GIMP_PDB_END);
48
 
 
49
 
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
50
 
    version = g_strdup (return_vals[1].data.d_string);
51
 
 
52
 
  gimp_destroy_params (return_vals, nreturn_vals);
53
 
 
54
 
  return version;
55
 
}
56
 
 
57
 
/**
58
 
 * gimp_getpid:
59
 
 *
60
 
 * Returns the PID of the host GIMP process.
61
 
 *
62
 
 * This procedure returns the process ID of the currently running GIMP.
63
 
 *
64
 
 * Returns: The PID.
65
 
 *
66
 
 * Since: GIMP 2.4
67
 
 */
68
 
gint
69
 
gimp_getpid (void)
70
 
{
71
 
  GimpParam *return_vals;
72
 
  gint nreturn_vals;
73
 
  gint pid = 0;
74
 
 
75
 
  return_vals = gimp_run_procedure ("gimp-getpid",
76
 
                                    &nreturn_vals,
77
 
                                    GIMP_PDB_END);
78
 
 
79
 
  if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
80
 
    pid = return_vals[1].data.d_int32;
81
 
 
82
 
  gimp_destroy_params (return_vals, nreturn_vals);
83
 
 
84
 
  return pid;
85
 
}