2001-01-25 09:20:05 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
2003-11-08 01:29:02 +08:00
|
|
|
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
1998-01-25 18:26:47 +08:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
1999-11-18 05:13:50 +08:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
1998-01-25 18:26:47 +08:00
|
|
|
* License as published by the Free Software Foundation; either
|
2001-01-25 09:20:05 +08:00
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 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 15:54:39 +08:00
|
|
|
* Lesser General Public License for more details.
|
1998-01-25 18:26:47 +08:00
|
|
|
*
|
1999-11-18 05:13:50 +08:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
1998-04-13 13:44:11 +08:00
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
2001-01-25 09:20:05 +08:00
|
|
|
*/
|
2000-05-31 07:38:46 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
#ifndef __GIMP_PROTOCOL_H__
|
|
|
|
#define __GIMP_PROTOCOL_H__
|
|
|
|
|
2001-11-23 07:46:13 +08:00
|
|
|
G_BEGIN_DECLS
|
2000-05-31 07:38:46 +08:00
|
|
|
|
|
|
|
/* For information look into the C source or the html documentation */
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
/* Increment every time the protocol changes
|
|
|
|
*/
|
2004-03-24 02:31:35 +08:00
|
|
|
#define GIMP_PROTOCOL_VERSION 0x0011
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
2000-03-04 08:24:39 +08:00
|
|
|
enum
|
|
|
|
{
|
1997-11-25 06:05:25 +08: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 15:59:16 +08:00
|
|
|
GP_EXTENSION_ACK,
|
|
|
|
GP_HAS_INIT
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-03-04 08:24:39 +08: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-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
struct _GPConfig
|
|
|
|
{
|
2003-11-08 01:29:02 +08:00
|
|
|
guint32 version;
|
|
|
|
guint32 tile_width;
|
|
|
|
guint32 tile_height;
|
|
|
|
gint32 shm_ID;
|
2004-09-13 21:33:56 +08:00
|
|
|
gint8 check_size;
|
|
|
|
gint8 check_type;
|
2004-10-05 00:21:52 +08:00
|
|
|
gint8 show_help_button;
|
2004-09-03 20:19:26 +08:00
|
|
|
gint8 gimp_reserved_4;
|
|
|
|
gint8 gimp_reserved_5;
|
|
|
|
gint8 gimp_reserved_6;
|
|
|
|
gint8 gimp_reserved_7;
|
|
|
|
gint8 gimp_reserved_8;
|
2003-11-08 01:29:02 +08:00
|
|
|
gint8 install_cmap;
|
|
|
|
gint8 show_tool_tips;
|
|
|
|
gint32 min_colors;
|
|
|
|
gint32 gdisp_ID;
|
2004-02-17 22:03:07 +08:00
|
|
|
gchar *app_name;
|
2003-11-08 01:29:02 +08:00
|
|
|
gchar *wm_class;
|
|
|
|
gchar *display_name;
|
|
|
|
gint32 monitor_number;
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPTileReq
|
|
|
|
{
|
2004-10-05 00:21:52 +08:00
|
|
|
gint32 drawable_ID;
|
|
|
|
guint32 tile_num;
|
|
|
|
guint32 shadow;
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPTileData
|
|
|
|
{
|
2000-03-04 08:24:39 +08:00
|
|
|
gint32 drawable_ID;
|
|
|
|
guint32 tile_num;
|
|
|
|
guint32 shadow;
|
|
|
|
guint32 bpp;
|
|
|
|
guint32 width;
|
|
|
|
guint32 height;
|
|
|
|
guint32 use_shm;
|
|
|
|
guchar *data;
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPParam
|
|
|
|
{
|
|
|
|
guint32 type;
|
|
|
|
|
2000-03-04 08:24:39 +08:00
|
|
|
union
|
|
|
|
{
|
|
|
|
gint32 d_int32;
|
|
|
|
gint16 d_int16;
|
|
|
|
gint8 d_int8;
|
|
|
|
gdouble d_float;
|
|
|
|
gchar *d_string;
|
|
|
|
gint32 *d_int32array;
|
|
|
|
gint16 *d_int16array;
|
|
|
|
gint8 *d_int8array;
|
|
|
|
gdouble *d_floatarray;
|
|
|
|
gchar **d_stringarray;
|
2001-01-25 09:20:05 +08:00
|
|
|
GimpRGB d_color;
|
2000-03-04 08:24:39 +08:00
|
|
|
struct
|
|
|
|
{
|
1997-11-25 06:05:25 +08:00
|
|
|
gint32 x;
|
|
|
|
gint32 y;
|
|
|
|
gint32 width;
|
|
|
|
gint32 height;
|
|
|
|
} d_region;
|
|
|
|
gint32 d_display;
|
|
|
|
gint32 d_image;
|
|
|
|
gint32 d_layer;
|
|
|
|
gint32 d_channel;
|
|
|
|
gint32 d_drawable;
|
|
|
|
gint32 d_selection;
|
|
|
|
gint32 d_boundary;
|
|
|
|
gint32 d_path;
|
1998-10-08 16:15:21 +08:00
|
|
|
struct
|
|
|
|
{
|
2000-03-04 08:24:39 +08:00
|
|
|
gchar *name;
|
|
|
|
guint32 flags;
|
|
|
|
guint32 size;
|
|
|
|
gpointer data;
|
1998-10-08 16:15:21 +08:00
|
|
|
} d_parasite;
|
1997-11-25 06:05:25 +08:00
|
|
|
gint32 d_status;
|
|
|
|
} data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPParamDef
|
|
|
|
{
|
2000-03-04 08:24:39 +08:00
|
|
|
guint32 type;
|
|
|
|
gchar *name;
|
|
|
|
gchar *description;
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPProcRun
|
|
|
|
{
|
2000-03-04 08:24:39 +08:00
|
|
|
gchar *name;
|
|
|
|
guint32 nparams;
|
1997-11-25 06:05:25 +08:00
|
|
|
GPParam *params;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPProcReturn
|
|
|
|
{
|
2000-03-04 08:24:39 +08:00
|
|
|
gchar *name;
|
|
|
|
guint32 nparams;
|
1997-11-25 06:05:25 +08:00
|
|
|
GPParam *params;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPProcInstall
|
|
|
|
{
|
2000-03-04 08:24:39 +08:00
|
|
|
gchar *name;
|
|
|
|
gchar *blurb;
|
|
|
|
gchar *help;
|
|
|
|
gchar *author;
|
|
|
|
gchar *copyright;
|
|
|
|
gchar *date;
|
|
|
|
gchar *menu_path;
|
|
|
|
gchar *image_types;
|
|
|
|
guint32 type;
|
|
|
|
guint32 nparams;
|
|
|
|
guint32 nreturn_vals;
|
1997-11-25 06:05:25 +08:00
|
|
|
GPParamDef *params;
|
|
|
|
GPParamDef *return_vals;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GPProcUninstall
|
|
|
|
{
|
2000-03-04 08:24:39 +08:00
|
|
|
gchar *name;
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-03-04 08:24:39 +08:00
|
|
|
void gp_init (void);
|
|
|
|
|
2002-05-17 01:41:38 +08:00
|
|
|
gboolean gp_quit_write (GIOChannel *channel,
|
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_config_write (GIOChannel *channel,
|
2002-05-17 01:41:38 +08:00
|
|
|
GPConfig *config,
|
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_tile_req_write (GIOChannel *channel,
|
2002-05-17 01:41:38 +08:00
|
|
|
GPTileReq *tile_req,
|
|
|
|
gpointer user_data);
|
|
|
|
gboolean gp_tile_ack_write (GIOChannel *channel,
|
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_tile_data_write (GIOChannel *channel,
|
2002-05-17 01:41:38 +08:00
|
|
|
GPTileData *tile_data,
|
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_proc_run_write (GIOChannel *channel,
|
2002-05-17 01:41:38 +08:00
|
|
|
GPProcRun *proc_run,
|
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_proc_return_write (GIOChannel *channel,
|
2002-05-17 01:41:38 +08:00
|
|
|
GPProcReturn *proc_return,
|
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_temp_proc_run_write (GIOChannel *channel,
|
2002-05-17 01:41:38 +08:00
|
|
|
GPProcRun *proc_run,
|
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_temp_proc_return_write (GIOChannel *channel,
|
2002-05-17 01:41:38 +08:00
|
|
|
GPProcReturn *proc_return,
|
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_proc_install_write (GIOChannel *channel,
|
2002-05-17 01:41:38 +08:00
|
|
|
GPProcInstall *proc_install,
|
|
|
|
gpointer user_data);
|
2000-03-04 08:24:39 +08:00
|
|
|
gboolean gp_proc_uninstall_write (GIOChannel *channel,
|
2002-05-17 01:41:38 +08:00
|
|
|
GPProcUninstall *proc_uninstall,
|
|
|
|
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-25 06:05:25 +08:00
|
|
|
|
2005-12-14 21:19:18 +08:00
|
|
|
void gp_params_destroy (GPParam *params,
|
|
|
|
gint nparams);
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-11-23 07:46:13 +08:00
|
|
|
G_END_DECLS
|
2000-05-31 07:38:46 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
#endif /* __GIMP_PROTOCOL_H__ */
|