gimp/libgimpbase/gimpprotocol.h

218 lines
5.1 KiB
C
Raw Normal View History

1998-01-25 18:26:47 +08:00
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* 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
* 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
* 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
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
1998-01-25 18:26:47 +08:00
*/
1997-11-25 06:05:25 +08:00
#ifndef __GIMP_PROTOCOL_H__
#define __GIMP_PROTOCOL_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* 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
*/
#define GP_VERSION 0x0004
1997-11-25 06:05:25 +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,
GP_EXTENSION_ACK
1997-11-25 06:05:25 +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
{
guint32 version;
guint32 tile_width;
guint32 tile_height;
gint32 shm_ID;
1997-11-25 06:05:25 +08:00
gdouble gamma;
gint8 install_cmap;
gint8 use_xshm;
gimprc.in replaced "color-cube" by "min-colors". 2000-04-30 Michael Natterer <mitch@gimp.org> * gimprc.in * app/gimprc.[ch]: replaced "color-cube" by "min-colors". * app/app_procs.c: read unitrc/gimprc before displaying the splash. * app/colormaps.c: set min_colors and install_cmap before initializing GdkRGB. * app/gimprc.[ch] * app/gimpunit.c: don't call the splash's progress_update function. * app/plug_in.c: pass min_colors instead of color_cube to plugins. * app/preferences_dialog.c: widget for min_colors. * libgimp/gimp.[ch]: s/color_cube/min_colors/ but left gimp_color_cube() there for source level compatibility. * libgimp/gimpprotocol.[ch]: changed the GPConfig message accordinly and increased the gimp protocol version number because the change breaks binary compatibility. Also actually pass the use_xshm variable over the wire (was only in the GPConfig struct before). Was it the right thing to do to increase the version number?? * libgimp/gimpui.c (gimp_ui_init): use the same code as the app for initializing GdkRGB. Never explicitly activate Gdk's SHM usage (only switch it off). * app/main.c * libgimp/gimp.c: reverted the handling of all signals except SIGCHLD back to plain old signal() because those signals are fatal anyway and sigaction() as used by gimp_signal_*() made debugging (stacktrace) impossible. * plug-ins/AlienMap/AlienMap.c * plug-ins/AlienMap2/AlienMap2.c * plug-ins/FractalExplorer/Dialogs.c * plug-ins/bmp/bmp.c * plug-ins/borderaverage/borderaverage.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/faxg3/faxg3.c * plug-ins/fits/fits.c * plug-ins/flame/flame.c * plug-ins/fp/fp.c * plug-ins/fp/fp_gtk.c * plug-ins/gdyntext/Makefile.am * plug-ins/gdyntext/gdyntext_ui.c * plug-ins/gfig/gfig.c * plug-ins/gflare/gflare.c * plug-ins/gfli/gfli.c * plug-ins/gimpressionist/gimpressionist.c * plug-ins/helpbrowser/helpbrowser.c * plug-ins/ifscompose/ifscompose.c * plug-ins/imagemap/Makefile.am * plug-ins/imagemap/imap_main.c * plug-ins/maze/maze_face.c * plug-ins/mosaic/mosaic.c * plug-ins/pagecurl/pagecurl.c * plug-ins/print/print.c * plug-ins/rcm/rcm_dialog.c * plug-ins/script-fu/script-fu-console.c * plug-ins/script-fu/script-fu-scripts.c * plug-ins/script-fu/script-fu-server.c * plug-ins/sel2path/Makefile.am * plug-ins/sel2path/sel2path.c * plug-ins/sgi/sgi.c * plug-ins/sinus/sinus.c * plug-ins/struc/struc.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c * plug-ins/xjt/xjt.c: use gimp_ui_init(). * plug-ins/Lighting/lighting_ui.c * plug-ins/MapObject/mapobject_ui.c: only switch Gdk SHM usage off, never on. Don't use gimp_ui_init() here because of libgck.
2000-05-01 02:17:55 +08:00
gint32 min_colors;
gint32 gdisp_ID;
1997-11-25 06:05:25 +08:00
};
struct _GPTileReq
{
gint32 drawable_ID;
1997-11-25 06:05:25 +08:00
guint32 tile_num;
guint32 shadow;
};
struct _GPTileData
{
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;
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;
struct
{
1997-11-25 06:05:25 +08:00
guint8 red;
guint8 green;
guint8 blue;
} d_color;
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;
struct
{
gchar *name;
guint32 flags;
guint32 size;
gpointer data;
} d_parasite;
1997-11-25 06:05:25 +08:00
gint32 d_status;
} data;
};
struct _GPParamDef
{
guint32 type;
gchar *name;
gchar *description;
1997-11-25 06:05:25 +08:00
};
struct _GPProcRun
{
gchar *name;
guint32 nparams;
1997-11-25 06:05:25 +08:00
GPParam *params;
};
struct _GPProcReturn
{
gchar *name;
guint32 nparams;
1997-11-25 06:05:25 +08:00
GPParam *params;
};
struct _GPProcInstall
{
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
{
gchar *name;
1997-11-25 06:05:25 +08:00
};
void gp_init (void);
gboolean gp_quit_write (GIOChannel *channel);
gboolean gp_config_write (GIOChannel *channel,
GPConfig *config);
gboolean gp_tile_req_write (GIOChannel *channel,
GPTileReq *tile_req);
gboolean gp_tile_ack_write (GIOChannel *channel);
gboolean gp_tile_data_write (GIOChannel *channel,
GPTileData *tile_data);
gboolean gp_proc_run_write (GIOChannel *channel,
GPProcRun *proc_run);
gboolean gp_proc_return_write (GIOChannel *channel,
GPProcReturn *proc_return);
gboolean gp_temp_proc_run_write (GIOChannel *channel,
GPProcRun *proc_run);
gboolean gp_temp_proc_return_write (GIOChannel *channel,
GPProcReturn *proc_return);
gboolean gp_proc_install_write (GIOChannel *channel,
GPProcInstall *proc_install);
gboolean gp_proc_uninstall_write (GIOChannel *channel,
GPProcUninstall *proc_uninstall);
gboolean gp_extension_ack_write (GIOChannel *channel);
1997-11-25 06:05:25 +08:00
#ifdef __cplusplus
}
#endif /* __cplusplus */
1997-11-25 06:05:25 +08:00
#endif /* __GIMP_PROTOCOL_H__ */