gimphelp_pdb.c 2.32 KB
Newer Older
1
/* LIBGIMP - The GIMP Library
2
 * Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
3
 *
4
 * gimphelp_pdb.c
5
 *
6
 * This library is free software: you can redistribute it and/or
7 8
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
9
 * version 3 of the License, or (at your option) any later version.
10 11 12 13
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * 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, see
18
 * <https://www.gnu.org/licenses/>.
19 20
 */

21
/* NOTE: This file is auto-generated by pdbgen.pl */
22

Sven Neumann's avatar
Sven Neumann committed
23 24
#include "config.h"

25 26
#include "gimp.h"

27 28

/**
29
 * SECTION: gimphelp
30 31 32 33 34 35 36
 * @title: gimphelp
 * @short_description: Loading help pages using gimp_help.
 *
 * Loading help pages using gimp_help.
 **/


37 38
/**
 * gimp_help:
39
 * @help_domain: The help domain in which help_id is registered.
40
 * @help_id: The help page's ID.
41 42 43 44
 *
 * Load a help page.
 *
 * This procedure loads the specified help page into the helpbrowser or
45 46
 * what ever is configured as help viewer. The help page is identified
 * by its domain and ID: if help_domain is NULL, we use the help_domain
47 48 49
 * which was registered using the gimp_plugin_help_register()
 * procedure. If help_domain is NULL and no help domain was registered,
 * the help domain of the main GIMP installation is used.
50 51
 *
 * Returns: TRUE on success.
52
 **/
53
gboolean
54
gimp_help (const gchar *help_domain,
55
           const gchar *help_id)
56
{
57 58
  GimpValueArray *args;
  GimpValueArray *return_vals;
59
  gboolean success = TRUE;
60

61 62 63
  args = gimp_value_array_new_from_types (NULL,
                                          G_TYPE_STRING, help_domain,
                                          G_TYPE_STRING, help_id,
64
                                          G_TYPE_NONE);
65

66 67 68
  return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
                                              "gimp-help",
                                              args);
69
  gimp_value_array_unref (args);
70

71
  success = GIMP_VALUES_GET_ENUM (return_vals, 0) == GIMP_PDB_SUCCESS;
72 73

  gimp_value_array_unref (return_vals);
74 75

  return success;
76
}