## gimpprotocol gimpprotocol — The communication protocol between GIMP and it's plug-ins. |

## Synopsis

    #define     GIMP_PROTOCOL_VERSION
                GPConfig;
                GPTileReq;
                GPTileAck;
                GPTileData;
                GPParam;
                GPParamDef;
                GPProcRun;
                GPProcReturn;
                GPProcInstall;
                GPProcUninstall;
    void        gp_init                         (void);
    gboolean    gp_has_init_write               (GIOChannel *channel,
                                                 gpointer user_data);
    gboolean    gp_quit_write                   (GIOChannel *channel,
                                                 gpointer user_data);
    gboolean    gp_config_write                 (GIOChannel *channel,
                                                 GPConfig *config,
                                                 gpointer user_data);
    gboolean    gp_tile_req_write               (GIOChannel *channel,
                                                 GPTileReq *tile_req,
                                                 gpointer user_data);
    gboolean    gp_tile_ack_write               (GIOChannel *channel,
                                                 gpointer user_data);
    gboolean    gp_tile_data_write              (GIOChannel *channel,
                                                 GPTileData *tile_data,
                                                 gpointer user_data);
    gboolean    gp_proc_run_write               (GIOChannel *channel,
                                                 GPProcRun *proc_run,
                                                 gpointer user_data);
    gboolean    gp_proc_return_write            (GIOChannel *channel,
                                                 GPProcReturn *proc_return,
                                                 gpointer user_data);
    gboolean    gp_temp_proc_run_write          (GIOChannel *channel,
                                                 GPProcRun *proc_run,
                                                 gpointer user_data);
    gboolean    gp_temp_proc_return_write       (GIOChannel *channel,
                                                 GPProcReturn *proc_return,
                                                 gpointer user_data);
    gboolean    gp_proc_install_write           (GIOChannel *channel,
                                                 GPProcInstall *proc_install,
                                                 gpointer user_data);
    gboolean    gp_proc_uninstall_write         (GIOChannel *channel,
                                                 GPProcUninstall *proc_uninstall,
                                                 gpointer user_data);
    gboolean    gp_extension_ack_write          (GIOChannel *channel,
                                                 gpointer user_data);

## Description

The communication protocol between GIMP and it's plug-ins.

## Details

### GIMP_PROTOCOL_VERSION

    #define GIMP_PROTOCOL_VERSION  0x0011

### GPConfig

    typedef struct {
      guint32  version;
      guint32  tile_width;
      guint32  tile_height;
      gint32   shm_ID;
      gint8    check_size;
      gint8    check_type;
      gint8    show_help_button;
      gint8    gimp_reserved_4;
      gint8    gimp_reserved_5;
      gint8    gimp_reserved_6;
      gint8    gimp_reserved_7;
      gint8    gimp_reserved_8;
      gint8    install_cmap;
      gint8    show_tool_tips;
      gint32   min_colors;
      gint32   gdisp_ID;
      gchar   *app_name;
      gchar   *wm_class;
      gchar   *display_name;
      gint32   monitor_number;
    } GPConfig;

### GPTileReq

    typedef struct {
      gint32   drawable_ID;
      guint32  tile_num;
      guint32  shadow;
    } GPTileReq;

### GPTileAck

    typedef struct _GPTileAck GPTileAck;

### GPTileData

    typedef struct {
      gint32   drawable_ID;
      guint32  tile_num;
      guint32  shadow;
      guint32  bpp;
      guint32  width;
      guint32  height;
      guint32  use_shm;
      guchar  *data;
    } GPTileData;

### GPParam

    typedef struct {
      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;
        GimpRGB   d_color;
        struct
        {
          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;
        gint32 d_status;
      } data;
    } GPParam;

### GPParamDef

    typedef struct {
      guint32  type;
      gchar   *name;
      gchar   *description;
    } GPParamDef;

### GPProcRun

    typedef struct {
      gchar   *name;
      guint32  nparams;
      GPParam *params;
    } GPProcRun;

### GPProcReturn

    typedef struct {
      gchar   *name;
      guint32  nparams;
      GPParam *params;
    } GPProcReturn;

### GPProcInstall

    typedef struct {
      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;
      GPParamDef *params;
      GPParamDef *return_vals;
    } GPProcInstall;

### GPProcUninstall

    typedef struct {
      gchar *name;
    } GPProcUninstall;

### gp_init ()

    void        gp_init                         (void);

### gp_has_init_write ()

    gboolean    gp_has_init_write               (GIOChannel *channel,
                                                 gpointer user_data);

`channel` : |
`user_data` : |
Returns : |

### gp_quit_write ()

    gboolean    gp_quit_write                   (GIOChannel *channel,
                                                 gpointer user_data);

`channel` : |
`user_data` : |
Returns : |

### gp_config_write ()

    gboolean    gp_config_write                 (GIOChannel *channel,
                                                 GPConfig *config,
                                                 gpointer user_data);

`channel` : |
`config` : |
`user_data` : |
Returns : |

### gp_tile_req_write ()

    gboolean    gp_tile_req_write               (GIOChannel *channel,
                                                 GPTileReq *tile_req,
                                                 gpointer user_data);

`channel` : |
`tile_req` : |
`user_data` : |
Returns : |

### gp_tile_ack_write ()

    gboolean    gp_tile_ack_write               (GIOChannel *channel,
                                                 gpointer user_data);

`channel` : |
`user_data` : |
Returns : |

### gp_tile_data_write ()

    gboolean    gp_tile_data_write              (GIOChannel *channel,
                                                 GPTileData *tile_data,
                                                 gpointer user_data);

`channel` : |
`tile_data` : |
`user_data` : |
Returns : |

### gp_proc_run_write ()

    gboolean    gp_proc_run_write               (GIOChannel *channel,
                                                 GPProcRun *proc_run,
                                                 gpointer user_data);

`channel` : |
`proc_run` : |
`user_data` : |
Returns : |

### gp_proc_return_write ()

    gboolean    gp_proc_return_write            (GIOChannel *channel,
                                                 GPProcReturn *proc_return,
                                                 gpointer user_data);

`channel` : |
`proc_return` : |
`user_data` : |
Returns : |

### gp_temp_proc_run_write ()

    gboolean    gp_temp_proc_run_write          (GIOChannel *channel,
                                                 GPProcRun *proc_run,
                                                 gpointer user_data);

`channel` : |
`proc_run` : |
`user_data` : |
Returns : |

### gp_temp_proc_return_write ()

    gboolean    gp_temp_proc_return_write       (GIOChannel *channel,
                                                 GPProcReturn *proc_return,
                                                 gpointer user_data);

`channel` : |
`proc_return` : |
`user_data` : |
Returns : |

### gp_proc_install_write ()

    gboolean    gp_proc_install_write           (GIOChannel *channel,
                                                 GPProcInstall *proc_install,
                                                 gpointer user_data);

`channel` : |
`proc_install` : |
`user_data` : |
Returns : |

### gp_proc_uninstall_write ()

    gboolean    gp_proc_uninstall_write         (GIOChannel *channel,
                                                 GPProcUninstall *proc_uninstall,
                                                 gpointer user_data);

`channel` : |
`proc_uninstall` : |
`user_data` : |
Returns : |

### gp_extension_ack_write ()

    gboolean    gp_extension_ack_write          (GIOChannel *channel,
                                                 gpointer user_data);

`channel` : |
`user_data` : |
Returns : |

## See Also

libgimp-gimpwire