2000-02-26 11:41:06 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
2000-01-05 23:47:06 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* gimphelpui.h
|
2003-10-27 18:56:06 +08:00
|
|
|
* Copyright (C) 2000-2003 Michael Natterer <mitch@gimp.org>
|
2000-01-05 23:47:06 +08:00
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This library is free software: you can redistribute it and/or
|
2000-01-05 23:47:06 +08:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2009-01-18 06:28:01 +08:00
|
|
|
* version 3 of the License, or (at your option) any later version.
|
2003-10-27 18:56:06 +08:00
|
|
|
*
|
2000-02-26 11:41:06 +08:00
|
|
|
* 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
|
2000-01-05 23:47:06 +08:00
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2009-01-18 06:28:01 +08:00
|
|
|
* License along with this library. If not, see
|
2018-07-12 05:27:07 +08:00
|
|
|
* <https://www.gnu.org/licenses/>.
|
2000-01-05 23:47:06 +08:00
|
|
|
*/
|
2000-05-31 07:38:46 +08:00
|
|
|
|
2011-04-28 20:30:41 +08:00
|
|
|
#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
|
|
|
|
#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
2000-01-05 23:47:06 +08:00
|
|
|
#ifndef __GIMP_HELP_UI_H__
|
|
|
|
#define __GIMP_HELP_UI_H__
|
|
|
|
|
2001-11-23 07:46:13 +08:00
|
|
|
G_BEGIN_DECLS
|
2000-01-05 23:47:06 +08:00
|
|
|
|
2000-05-31 07:38:46 +08:00
|
|
|
/* For information look into the C source or the html documentation */
|
|
|
|
|
|
|
|
|
These changes enable help support for 3rd party plug-ins which install
2000-05-21 Michael Natterer <mitch@gimp.org>
These changes enable help support for 3rd party plug-ins which
install their help files outside GIMP's main help dir.
Instead of calling gimp_help(), gimp_plugin_help_func() etc.,
all help callbacks now have to call gimp_standard_help_func()
which has different implementations in the app and in libgimp.
There is a new function gimp_plugin_help_register() which can
be called during plug-in query. plug_in.c keeps a list of
executable_name/help_path pairs. Plug-ins have to pass their
exec. name to gimp_help() which uses the list to find the plug-in's
help directory.
* app/gimphelp.[ch]: gimp_help() now takes a help_path parameter.
help_path == NULL means the standard help directory. Various
changes to pass the help_path to the help browser.
* app/gimprc.c: save the plug-in's help_path in the pluginrc file.
* app/menus.c: ugly hack to enable help_paths in the "F1" callback.
* app/plug_in.[ch]: many help_path related changes. Use g_basename()
instead of strrchr(str,G_DIR_SEPARATOR), cosmetic cleanups.
* app/internal_procs.c
* app/gimphelp_cmds.c
* tools/pdbgen/pdb/gimphelp.pdb: new procedure
gimp_plugin_help_register(). gimp_help() takes a second parameter
which is the executable name (not the help_path).
* app/color_notebook.c
* app/commands.c
* app/lc_dialog.c
* app/preferences_dialog.c
* app/tools.c: call gimp_standard_help_func() instead of gimp_help().
* libgimp/gimp.c: new function gimp_get_progname() which returns
the full path of the plug-in's executable.
* libgimp/gimp.h: export the new function,
removed gimp_plugin_help_func(), gimp_help() takes the executable
name as second parameter.
* libgimp/gimpcompat.h: added gimp_plugin_help_func().
* libgimp/gimphelp.c: a wrapper for gimp_plugin_help_register(),
changed the calls to gimp_help.
* libgimp/gimphelpui.[ch]: call gimp_standard_help_func() instead
of gimp_help().
* plug-ins/helpbrowser/helpbrowser.c: now called with an additional
help_path parameter. Various changes to enable
help_path != gimp_standard_help_path.
Unrelated stuff:
* app/batch.h: added missing GPL header.
* app/gimpunit.c: had a LGPL header, merged some fprintf's into
one call.
* app/procedural_db.[ch]: cosmetic: g* types, s/g_malloc/g_new/,
prototypes, indentation.
* app/resize.c: use less packing widgets. didn't find the "offset"
redraw bug :(
2000-05-22 01:41:02 +08:00
|
|
|
/* the standard gimp help function
|
|
|
|
*/
|
2019-08-09 19:11:30 +08:00
|
|
|
void gimp_standard_help_func (const gchar *help_id,
|
|
|
|
gpointer help_data);
|
2000-01-11 23:48:00 +08:00
|
|
|
|
2001-08-01 07:28:56 +08:00
|
|
|
/* connect the help callback of a window */
|
2019-08-09 19:11:30 +08:00
|
|
|
void gimp_help_connect (GtkWidget *widget,
|
|
|
|
GimpHelpFunc help_func,
|
|
|
|
const gchar *help_id,
|
|
|
|
gpointer help_data,
|
|
|
|
GDestroyNotify help_data_destroy);
|
2000-01-05 23:47:06 +08:00
|
|
|
|
|
|
|
/* set help data for non-window widgets */
|
2019-08-09 19:11:30 +08:00
|
|
|
void gimp_help_set_help_data (GtkWidget *widget,
|
|
|
|
const gchar *tooltip,
|
|
|
|
const gchar *help_id);
|
2007-11-22 21:59:06 +08:00
|
|
|
|
|
|
|
/* set help data with markup for non-window widgets */
|
2019-08-09 19:11:30 +08:00
|
|
|
void gimp_help_set_help_data_with_markup (GtkWidget *widget,
|
|
|
|
const gchar *tooltip,
|
|
|
|
const gchar *help_id);
|
2000-01-05 23:47:06 +08:00
|
|
|
|
|
|
|
/* activate the context help inspector */
|
2019-08-09 19:11:30 +08:00
|
|
|
void gimp_context_help (GtkWidget *widget);
|
2000-01-05 23:47:06 +08:00
|
|
|
|
2000-05-31 07:38:46 +08:00
|
|
|
|
2010-07-06 00:01:28 +08:00
|
|
|
/**
|
|
|
|
* GIMP_HELP_ID:
|
|
|
|
*
|
|
|
|
* The #GQuark used to attach GIMP help IDs to widgets.
|
|
|
|
*
|
2015-06-01 03:18:09 +08:00
|
|
|
* Since: 2.2
|
2010-07-06 00:01:28 +08:00
|
|
|
**/
|
2004-05-03 23:54:54 +08:00
|
|
|
#define GIMP_HELP_ID (gimp_help_id_quark ())
|
|
|
|
|
2007-11-09 19:17:00 +08:00
|
|
|
GQuark gimp_help_id_quark (void) G_GNUC_CONST;
|
2004-05-03 23:54:54 +08:00
|
|
|
|
|
|
|
|
2001-11-23 07:46:13 +08:00
|
|
|
G_END_DECLS
|
2000-02-26 11:41:06 +08:00
|
|
|
|
2000-01-05 23:47:06 +08:00
|
|
|
#endif /* __GIMP_HELP_UI_H__ */
|