GIMP Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# gimpprotocol

## Name

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

## Synopsis

    #define     GP_VERSION
    struct      GPConfig;
    struct      GPTileReq;
    struct      GPTileAck;
    struct      GPTileData;
    struct      GPParam;
    struct      GPParamDef;
    struct      GPProcRun;
    struct      GPProcReturn;
    struct      GPProcInstall;
    struct      GPProcUninstall;
    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);

## Description

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

## Details

### GP_VERSION

    #define GP_VERSION 0x0004

### struct GPConfig

    struct GPConfig
    {
      guint32 version;
      guint32 tile_width;
      guint32 tile_height;
      gint32  shm_ID;
      gdouble gamma;
      gint8   install_cmap;
      gint8   use_xshm;
      gint32  min_colors;
      gint32  gdisp_ID;
    };

### struct GPTileReq

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

### struct GPTileAck

    struct GPTileAck;

### struct GPTileData

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

### struct GPParam

    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
        {
          guint8 red;
          guint8 green;
          guint8 blue;
        } 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;
    };

### struct GPParamDef

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

### struct GPProcRun

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

### struct GPProcReturn

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

### struct GPProcInstall

    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;
      GPParamDef *params;
      GPParamDef *return_vals;
    };

### struct GPProcUninstall

    struct GPProcUninstall
    {
      gchar *name;
    };

### gp_init ()

    void        gp_init                         (void);

### gp_quit_write ()

    gboolean    gp_quit_write                   (GIOChannel *channel);

`channel` : |
Returns : |

### gp_config_write ()

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

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

### gp_tile_req_write ()

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

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

### gp_tile_ack_write ()

    gboolean    gp_tile_ack_write               (GIOChannel *channel);

`channel` : |
Returns : |

### gp_tile_data_write ()

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

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

### gp_proc_run_write ()

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

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

### gp_proc_return_write ()

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

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

### gp_temp_proc_run_write ()

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

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

### gp_temp_proc_return_write ()

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

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

### gp_proc_install_write ()

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

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

### gp_proc_uninstall_write ()

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

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

### gp_extension_ack_write ()

    gboolean    gp_extension_ack_write          (GIOChannel *channel);

`channel` : |
Returns : |

## See Also

libgimp-gimpwire

<<< Previous Page | Home | Up | Next Page >>>
gimpproceduraldb | gimpselection