2001-01-25 01:20:05 +00:00
|
|
|
/* LIBGIMP - The GIMP Library
|
2003-11-07 17:29:02 +00:00
|
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
1998-01-25 10:26:47 +00:00
|
|
|
*
|
2009-01-17 22:28:01 +00:00
|
|
|
* This library is free software: you can redistribute it and/or
|
1999-11-17 21:13:50 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
1998-01-25 10:26:47 +00:00
|
|
|
* License as published by the Free Software Foundation; either
|
2009-01-17 22:28:01 +00:00
|
|
|
* version 3 of the License, or (at your option) any later version.
|
2001-01-25 01:20:05 +00: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
|
1999-12-26 07:54:39 +00:00
|
|
|
* Lesser General Public License for more details.
|
1998-01-25 10:26:47 +00:00
|
|
|
*
|
1999-11-17 21:13:50 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2009-01-17 22:28:01 +00:00
|
|
|
* License along with this library. If not, see
|
2018-07-11 23:27:07 +02:00
|
|
|
* <https://www.gnu.org/licenses/>.
|
2001-01-25 01:20:05 +00:00
|
|
|
*/
|
2000-05-30 23:38:46 +00:00
|
|
|
|
1997-11-24 22:05:25 +00:00
|
|
|
#ifndef __GIMP_PROTOCOL_H__
|
|
|
|
#define __GIMP_PROTOCOL_H__
|
|
|
|
|
2001-11-22 23:46:13 +00:00
|
|
|
G_BEGIN_DECLS
|
2000-05-30 23:38:46 +00:00
|
|
|
|
|
|
|
/* For information look into the C source or the html documentation */
|
|
|
|
|
1997-11-24 22:05:25 +00:00
|
|
|
|
|
|
|
/* Increment every time the protocol changes
|
|
|
|
*/
|
2018-07-13 14:07:44 +02:00
|
|
|
#define GIMP_PROTOCOL_VERSION 0x0102
|
1997-11-24 22:05:25 +00:00
|
|
|
|
|
|
|
|
2000-03-04 00:24:39 +00:00
|
|
|
enum
|
|
|
|
{
|
1997-11-24 22:05:25 +00:00
|
|
|
GP_QUIT,
|
|
|
|
GP_CONFIG,
|
|
|
|
GP_TILE_REQ,
|
|
|
|
GP_TILE_ACK,
|
|
|
|
GP_TILE_DATA,
|
|
|
|
GP_PROC_RUN,
|
|
|
|
GP_PROC_RETURN,
|
|
|
|
GP_TEMP_PROC_RUN,
|
|
|
|
GP_TEMP_PROC_RETURN,
|
|
|
|
GP_PROC_INSTALL,
|
|
|
|
GP_PROC_UNINSTALL,
|
2002-02-12 07:59:16 +00:00
|
|
|
GP_EXTENSION_ACK,
|
|
|
|
GP_HAS_INIT
|
1997-11-24 22:05:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-03-04 00:24:39 +00:00
|
|
|
typedef struct _GPConfig GPConfig;
|
|
|
|
typedef struct _GPTileReq GPTileReq;
|
|
|
|
typedef struct _GPTileAck GPTileAck;
|
|
|
|
typedef struct _GPTileData GPTileData;
|
|
|
|
typedef struct _GPParam GPParam;
|
|
|
|
typedef struct _GPParamDef GPParamDef;
|
|
|
|
typedef struct _GPProcRun GPProcRun;
|
|
|
|
typedef struct _GPProcReturn GPProcReturn;
|
|
|
|
typedef struct _GPProcInstall GPProcInstall;
|
|
|
|
typedef struct _GPProcUninstall GPProcUninstall;
|
1997-11-24 22:05:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
struct _GPConfig
|
|
|
|
{
|
2003-11-07 17:29:02 +00:00
|
|
|
guint32 tile_width;
|
|
|
|
guint32 tile_height;
|
|
|
|
gint32 shm_ID;
|
2004-09-13 13:33:56 +00:00
|
|
|
gint8 check_size;
|
|
|
|
gint8 check_type;
|
2004-10-04 16:21:52 +00:00
|
|
|
gint8 show_help_button;
|
2006-06-01 15:34:58 +00:00
|
|
|
gint8 use_cpu_accel;
|
2014-02-25 21:19:25 +01:00
|
|
|
gint8 use_opencl;
|
2018-06-18 02:19:41 +02:00
|
|
|
gint8 export_profile;
|
2018-01-11 05:14:07 +01:00
|
|
|
gint8 export_exif;
|
|
|
|
gint8 export_xmp;
|
|
|
|
gint8 export_iptc;
|
2003-11-07 17:29:02 +00:00
|
|
|
gint32 gdisp_ID;
|
2004-02-17 14:03:07 +00:00
|
|
|
gchar *app_name;
|
2003-11-07 17:29:02 +00:00
|
|
|
gchar *wm_class;
|
|
|
|
gchar *display_name;
|
|
|
|
gint32 monitor_number;
|
2008-03-27 16:30:29 +00:00
|
|
|
guint32 timestamp;
|
libgimpbase, libgimp, app: pass icon theme dir to plug-ins through config
Pass the current icon theme directory to plug-ins through the
config message, and add a gimp_icon_theme_dir() libgimp function
for retrieving it. Note that we already have a similar
gimp_icon_get_theme_dir() PDB function, which we keep around, since
it can be used to dynamically query for the current icon dir,
unlike the former, and since it returns a dynamically-allocated
string, while the rest of the config-related functions return
statically allocated strings.
Use the new function, instead of gimp_get_icon_theme_dir(), in
gimp_ui_init(). This allows gimp_ui_init() to run without making
any PDB calls. Consequently, this allows us to start plug-ins that
call gimp_ui_init() without entering the main loop in the main app.
We're going to add a plug-in that displays an interactive dialog
while the main app is blocking waiting for an operation to
complete, and we need to be able to start the plug-in without
entering the main loop, to avoid the possibility of arbitrary code
being executed during the wait.
Bump the protocol version.
2018-05-29 11:20:54 -04:00
|
|
|
gchar *icon_theme_dir;
|
1997-11-24 22:05:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPTileReq
|
|
|
|
{
|
2004-10-04 16:21:52 +00:00
|
|
|
gint32 drawable_ID;
|
|
|
|
guint32 tile_num;
|
|
|
|
guint32 shadow;
|
1997-11-24 22:05:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPTileData
|
|
|
|
{
|
2000-03-04 00:24:39 +00:00
|
|
|
gint32 drawable_ID;
|
|
|
|
guint32 tile_num;
|
|
|
|
guint32 shadow;
|
|
|
|
guint32 bpp;
|
|
|
|
guint32 width;
|
|
|
|
guint32 height;
|
|
|
|
guint32 use_shm;
|
|
|
|
guchar *data;
|
1997-11-24 22:05:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPParam
|
|
|
|
{
|
|
|
|
guint32 type;
|
|
|
|
|
2000-03-04 00:24:39 +00:00
|
|
|
union
|
|
|
|
{
|
2007-04-12 14:32:44 +00:00
|
|
|
gint32 d_int32;
|
|
|
|
gint16 d_int16;
|
|
|
|
guint8 d_int8;
|
|
|
|
gdouble d_float;
|
|
|
|
gchar *d_string;
|
|
|
|
gint32 *d_int32array;
|
|
|
|
gint16 *d_int16array;
|
|
|
|
guint8 *d_int8array;
|
|
|
|
gdouble *d_floatarray;
|
|
|
|
gchar **d_stringarray;
|
2008-07-14 14:09:16 +00:00
|
|
|
GimpRGB *d_colorarray;
|
2007-04-12 14:32:44 +00:00
|
|
|
GimpRGB d_color;
|
|
|
|
gint32 d_display;
|
|
|
|
gint32 d_image;
|
2010-07-09 09:34:44 +02:00
|
|
|
gint32 d_item;
|
2007-04-12 14:32:44 +00:00
|
|
|
gint32 d_layer;
|
|
|
|
gint32 d_channel;
|
|
|
|
gint32 d_drawable;
|
|
|
|
gint32 d_selection;
|
|
|
|
gint32 d_boundary;
|
|
|
|
gint32 d_vectors;
|
|
|
|
gint32 d_status;
|
|
|
|
GimpParasite d_parasite;
|
1997-11-24 22:05:25 +00:00
|
|
|
} data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPParamDef
|
|
|
|
{
|
2000-03-04 00:24:39 +00:00
|
|
|
guint32 type;
|
|
|
|
gchar *name;
|
|
|
|
gchar *description;
|
1997-11-24 22:05:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPProcRun
|
|
|
|
{
|
2000-03-04 00:24:39 +00:00
|
|
|
gchar *name;
|
|
|
|
guint32 nparams;
|
1997-11-24 22:05:25 +00:00
|
|
|
GPParam *params;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPProcReturn
|
|
|
|
{
|
2000-03-04 00:24:39 +00:00
|
|
|
gchar *name;
|
|
|
|
guint32 nparams;
|
1997-11-24 22:05:25 +00:00
|
|
|
GPParam *params;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPProcInstall
|
|
|
|
{
|
2000-03-04 00:24:39 +00:00
|
|
|
gchar *name;
|
|
|
|
gchar *blurb;
|
|
|
|
gchar *help;
|
|
|
|
gchar *author;
|
|
|
|
gchar *copyright;
|
|
|
|
gchar *date;
|
2018-07-13 14:07:44 +02:00
|
|
|
gchar *menu_label;
|
2000-03-04 00:24:39 +00:00
|
|
|
gchar *image_types;
|
|
|
|
guint32 type;
|
|
|
|
guint32 nparams;
|
|
|
|
guint32 nreturn_vals;
|
1997-11-24 22:05:25 +00:00
|
|
|
GPParamDef *params;
|
|
|
|
GPParamDef *return_vals;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPProcUninstall
|
|
|
|
{
|
2000-03-04 00:24:39 +00:00
|
|
|
gchar *name;
|
1997-11-24 22:05:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-03-04 00:24:39 +00:00
|
|
|
void gp_init (void);
|
|
|
|
|
2002-05-16 17:41:38 +00:00
|
|
|
gboolean gp_quit_write (GIOChannel *channel,
|
|
|
|
gpointer user_data);
|
2000-03-04 00:24:39 +00:00
|
|
|
gboolean gp_config_write (GIOChannel *channel,
|
2006-04-12 10:53:28 +00:00
|
|
|
GPConfig *config,
|
2002-05-16 17:41:38 +00:00
|
|
|
gpointer user_data);
|
2000-03-04 00:24:39 +00:00
|
|
|
gboolean gp_tile_req_write (GIOChannel *channel,
|
2006-04-12 10:53:28 +00:00
|
|
|
GPTileReq *tile_req,
|
2002-05-16 17:41:38 +00:00
|
|
|
gpointer user_data);
|
|
|
|
gboolean gp_tile_ack_write (GIOChannel *channel,
|
|
|
|
gpointer user_data);
|
2000-03-04 00:24:39 +00:00
|
|
|
gboolean gp_tile_data_write (GIOChannel *channel,
|
2006-04-12 10:53:28 +00:00
|
|
|
GPTileData *tile_data,
|
2002-05-16 17:41:38 +00:00
|
|
|
gpointer user_data);
|
2000-03-04 00:24:39 +00:00
|
|
|
gboolean gp_proc_run_write (GIOChannel *channel,
|
2006-04-12 10:53:28 +00:00
|
|
|
GPProcRun *proc_run,
|
2002-05-16 17:41:38 +00:00
|
|
|
gpointer user_data);
|
2000-03-04 00:24:39 +00:00
|
|
|
gboolean gp_proc_return_write (GIOChannel *channel,
|
2006-04-12 10:53:28 +00:00
|
|
|
GPProcReturn *proc_return,
|
2002-05-16 17:41:38 +00:00
|
|
|
gpointer user_data);
|
2000-03-04 00:24:39 +00:00
|
|
|
gboolean gp_temp_proc_run_write (GIOChannel *channel,
|
2006-04-12 10:53:28 +00:00
|
|
|
GPProcRun *proc_run,
|
2002-05-16 17:41:38 +00:00
|
|
|
gpointer user_data);
|
2000-03-04 00:24:39 +00:00
|
|
|
gboolean gp_temp_proc_return_write (GIOChannel *channel,
|
2006-04-12 10:53:28 +00:00
|
|
|
GPProcReturn *proc_return,
|
2002-05-16 17:41:38 +00:00
|
|
|
gpointer user_data);
|
2000-03-04 00:24:39 +00:00
|
|
|
gboolean gp_proc_install_write (GIOChannel *channel,
|
2006-04-12 10:53:28 +00:00
|
|
|
GPProcInstall *proc_install,
|
2002-05-16 17:41:38 +00:00
|
|
|
gpointer user_data);
|
2000-03-04 00:24:39 +00:00
|
|
|
gboolean gp_proc_uninstall_write (GIOChannel *channel,
|
2006-04-12 10:53:28 +00:00
|
|
|
GPProcUninstall *proc_uninstall,
|
2002-05-16 17:41:38 +00:00
|
|
|
gpointer user_data);
|
|
|
|
gboolean gp_extension_ack_write (GIOChannel *channel,
|
|
|
|
gpointer user_data);
|
|
|
|
gboolean gp_has_init_write (GIOChannel *channel,
|
|
|
|
gpointer user_data);
|
1997-11-24 22:05:25 +00:00
|
|
|
|
2005-12-14 13:19:18 +00:00
|
|
|
void gp_params_destroy (GPParam *params,
|
|
|
|
gint nparams);
|
|
|
|
|
2017-05-21 15:13:33 +02:00
|
|
|
void gp_lock (void);
|
|
|
|
void gp_unlock (void);
|
|
|
|
|
1997-11-24 22:05:25 +00:00
|
|
|
|
2001-11-22 23:46:13 +00:00
|
|
|
G_END_DECLS
|
2000-05-30 23:38:46 +00:00
|
|
|
|
1997-11-24 22:05:25 +00:00
|
|
|
#endif /* __GIMP_PROTOCOL_H__ */
|