gimp

gimp — Main functions needed for building a GIMP plug-in.

Functions

#define GIMP_MAIN()
gint gimp_main ()
GimpPlugIn * gimp_get_plug_in ()
GimpPDB * gimp_get_pdb ()
void gimp_quit ()
guint gimp_tile_width ()
guint gimp_tile_height ()
gboolean gimp_show_help_button ()
gboolean gimp_export_color_profile ()
gboolean gimp_export_comment ()
gboolean gimp_export_exif ()
gboolean gimp_export_xmp ()
gboolean gimp_export_iptc ()
GimpCheckSize gimp_check_size ()
GimpCheckType gimp_check_type ()
GimpDisplay * gimp_default_display ()
const gchar * gimp_wm_class ()
const gchar * gimp_display_name ()
gint gimp_monitor_number ()
guint32 gimp_user_time ()
const gchar * gimp_icon_theme_dir ()
const gchar * gimp_get_progname ()
gchar * gimp_version ()
gint gimp_getpid ()
gboolean gimp_attach_parasite ()
gboolean gimp_detach_parasite ()
GimpParasite * gimp_get_parasite ()
gchar ** gimp_get_parasite_list ()
GFile * gimp_temp_file ()

Types and Values

Description

Main functions needed for building a GIMP plug-in. This header includes all other GIMP Library headers.

Also contains some miscellaneous procedures that don't fit in any other category.

Functions

GIMP_MAIN()

#define             GIMP_MAIN(plug_in_type)

A macro that expands to the appropriate main() function for the platform being compiled for.

To use this macro, simply place a line that contains just the code

GIMP_MAIN (MY_TYPE_PLUG_IN)

at the toplevel of your file. No semicolon should be used.

Parameters

plug_in_type

The GType of the plug-in's GimpPlugIn subclass

 

Since: 3.0


gimp_main ()

gint
gimp_main (GType plug_in_type,
           gint argc,
           gchar *argv[]);

The main plug-in function that must be called with the plug-in's GimpPlugIn subclass GType and the 'argc' and 'argv' that are passed to the platform's main().

See also: GIMP_MAIN(), GimpPlugIn.

Parameters

plug_in_type

the type of the GimpPlugIn subclass of the plug-in

 

argc

the number of arguments

 

argv

the arguments.

[array length=argc]

Returns

an exit status as defined by the C library, on success EXIT_SUCCESS.

Since: 3.0


gimp_get_plug_in ()

GimpPlugIn *
gimp_get_plug_in (void);

This function returns the plug-in's GimpPlugIn instance, which is a a singleton that can exist exactly once per running plug-in.

Returns

The plug-in's GimpPlugIn singleton.

[transfer none][nullable]

Since: 3.0


gimp_get_pdb ()

GimpPDB *
gimp_get_pdb (void);

This function returns the plug-in's GimpPDB instance, which is a singleton that can exist exactly once per running plug-in.

Returns

The plug-in's GimpPDB singleton.

[transfer none][nullable]

Since: 3.0


gimp_quit ()

void
gimp_quit (void);

Forcefully causes the GIMP library to exit and close down its connection to main gimp application. This function never returns.


gimp_tile_width ()

guint
gimp_tile_width (void);

Returns the tile width GIMP is using.

This is a constant value given at plug-in configuration time.

Returns

the tile_width


gimp_tile_height ()

guint
gimp_tile_height (void);

Returns the tile height GIMP is using.

This is a constant value given at plug-in configuration time.

Returns

the tile_height


gimp_show_help_button ()

gboolean
gimp_show_help_button (void);

Returns whether or not GimpDialog should automatically add a help button if help_func and help_id are given.

This is a constant value given at plug-in configuration time.

Returns

the show_help_button boolean

Since: 2.2


gimp_export_color_profile ()

gboolean
gimp_export_color_profile (void);

Returns whether file plug-ins should default to exporting the image's color profile.

Returns

TRUE if preferences are set to export the color profile.

Since: 2.10.4


gimp_export_comment ()

gboolean
gimp_export_comment (void);

Returns whether file plug-ins should default to exporting the image's comment.

Returns

TRUE if preferences are set to export the comment.

Since: 3.0


gimp_export_exif ()

gboolean
gimp_export_exif (void);

Returns whether file plug-ins should default to exporting Exif metadata, according preferences (original settings is FALSE since metadata can contain sensitive information).

Returns

TRUE if preferences are set to export Exif.

Since: 2.10


gimp_export_xmp ()

gboolean
gimp_export_xmp (void);

Returns whether file plug-ins should default to exporting XMP metadata, according preferences (original settings is FALSE since metadata can contain sensitive information).

Returns

TRUE if preferences are set to export XMP.

Since: 2.10


gimp_export_iptc ()

gboolean
gimp_export_iptc (void);

Returns whether file plug-ins should default to exporting IPTC metadata, according preferences (original settings is FALSE since metadata can contain sensitive information).

Returns

TRUE if preferences are set to export IPTC.

Since: 2.10


gimp_check_size ()

GimpCheckSize
gimp_check_size (void);

Returns the size of the checkerboard to be used in previews.

This is a constant value given at plug-in configuration time.

Returns

the check_size value

Since: 2.2


gimp_check_type ()

GimpCheckType
gimp_check_type (void);

Returns the type of the checkerboard to be used in previews.

This is a constant value given at plug-in configuration time.

Returns

the check_type value

Since: 2.2


gimp_default_display ()

GimpDisplay *
gimp_default_display (void);

Returns the default display ID. This corresponds to the display the running procedure's menu entry was invoked from.

This is a constant value given at plug-in configuration time.

Returns

the default display ID The object belongs to libgimp and you should not free it.

[transfer none]


gimp_wm_class ()

const gchar *
gimp_wm_class (void);

Returns the window manager class to be used for plug-in windows.

This is a constant value given at plug-in configuration time.

Returns

the window manager class


gimp_display_name ()

const gchar *
gimp_display_name (void);

Returns the display to be used for plug-in windows.

This is a constant value given at plug-in configuration time. Will return NULL if GIMP has been started with no GUI, either via "--no-interface" flag, or a console build.

Returns

the display name


gimp_monitor_number ()

gint
gimp_monitor_number (void);

Returns the monitor number to be used for plug-in windows.

This is a constant value given at plug-in configuration time.

Returns

the monitor number


gimp_user_time ()

guint32
gimp_user_time (void);

Returns the timestamp of the user interaction that should be set on the plug-in window. This is handled transparently, plug-in authors do not have to care about it.

This is a constant value given at plug-in configuration time.

Returns

timestamp for plug-in window

Since: 2.6


gimp_icon_theme_dir ()

const gchar *
gimp_icon_theme_dir (void);

Returns the directory of the current icon theme.

This is a constant value given at plug-in configuration time.

Returns

the icon theme directory

Since: 2.10.4


gimp_get_progname ()

const gchar *
gimp_get_progname (void);

Returns the plug-in's executable name.

Returns

the executable name


gimp_version ()

gchar *
gimp_version (void);

Returns the host GIMP version.

This procedure returns the version number of the currently running GIMP.

Returns

GIMP version number. The returned value must be freed with g_free().

[transfer full]


gimp_getpid ()

gint
gimp_getpid (void);

Returns the PID of the host GIMP process.

This procedure returns the process ID of the currently running GIMP.

Returns

The PID.

Since: 2.4


gimp_attach_parasite ()

gboolean
gimp_attach_parasite (const GimpParasite *parasite);

Add a global parasite.

This procedure attaches a global parasite. It has no return values.

Parameters

parasite

The parasite to attach.

 

Returns

TRUE on success.

Since: 2.8


gimp_detach_parasite ()

gboolean
gimp_detach_parasite (const gchar *name);

Removes a global parasite.

This procedure detaches a global parasite from. It has no return values.

Parameters

name

The name of the parasite to detach.

 

Returns

TRUE on success.

Since: 2.8


gimp_get_parasite ()

GimpParasite *
gimp_get_parasite (const gchar *name);

Look up a global parasite.

Finds and returns the global parasite that was previously attached.

Parameters

name

The name of the parasite to find.

 

Returns

The found parasite.

[transfer full]

Since: 2.8


gimp_get_parasite_list ()

gchar **
gimp_get_parasite_list (gint *num_parasites);

List all parasites.

Returns a list of all currently attached global parasites.

Parameters

num_parasites

The number of attached parasites.

[out]

Returns

The names of currently attached parasites. The returned value must be freed with g_strfreev().

[array length=num_parasites][element-type gchar*][transfer full]

Since: 2.8


gimp_temp_file ()

GFile *
gimp_temp_file (const gchar *extension);

Generates a unique temporary file.

Generates a unique file using the temp path supplied in the user's gimprc.

Parameters

extension

The extension the file will have.

 

Returns

The new temp file.

[transfer full]

Types and Values

gimp_get_data

#define gimp_get_data      gimp_pdb_get_data

gimp_get_data_size

#define gimp_get_data_size gimp_pdb_get_data_size

gimp_set_data

#define gimp_set_data      gimp_pdb_set_data

enum GimpPixbufTransparency

How to deal with transparency when creating thubnail pixbufs from images and drawables.

Members

GIMP_PIXBUF_KEEP_ALPHA

Create a pixbuf with alpha

 

GIMP_PIXBUF_SMALL_CHECKS

Show transparency as small checks

 

GIMP_PIXBUF_LARGE_CHECKS

Show transparency as large checks