## gimpwire gimpwire — The lowlevel I/O protocol used for communication between GIMP and it's plug-ins. |

## Synopsis

                        WireMessage;
    void                (*WireReadFunc)                     (GIOChannel *channel,
                                                             WireMessage *msg,
                                                             gpointer user_data);
    void                (*WireWriteFunc)                    (GIOChannel *channel,
                                                             WireMessage *msg,
                                                             gpointer user_data);
    void                (*WireDestroyFunc)                  (WireMessage *msg);
    gboolean            (*WireIOFunc)                       (GIOChannel *channel,
                                                             guint8 *buf,
                                                             gulong count,
                                                             gpointer user_data);
    gboolean            (*WireFlushFunc)                    (GIOChannel *channel,
                                                             gpointer user_data);
    void                wire_register                       (guint32 type,
                                                             WireReadFunc read_func,
                                                             WireWriteFunc write_func,
                                                             WireDestroyFunc destroy_func);
    void                wire_set_reader                     (WireIOFunc read_func);
    void                wire_set_writer                     (WireIOFunc write_func);
    void                wire_set_flusher                    (WireFlushFunc flush_func);
    gboolean            wire_read                           (GIOChannel *channel,
                                                             guint8 *buf,
                                                             gsize count,
                                                             gpointer user_data);
    gboolean            wire_write                          (GIOChannel *channel,
                                                             guint8 *buf,
                                                             gsize count,
                                                             gpointer user_data);
    gboolean            wire_flush                          (GIOChannel *channel,
                                                             gpointer user_data);
    gboolean            wire_error                          (void);
    void                wire_clear_error                    (void);
    gboolean            wire_read_msg                       (GIOChannel *channel,
                                                             WireMessage *msg,
                                                             gpointer user_data);
    gboolean            wire_write_msg                      (GIOChannel *channel,
                                                             WireMessage *msg,
                                                             gpointer user_data);
    void                wire_destroy                        (WireMessage *msg);
    gboolean            wire_read_int32                     (GIOChannel *channel,
                                                             guint32 *data,
                                                             gint count,
                                                             gpointer user_data);
    gboolean            wire_read_int16                     (GIOChannel *channel,
                                                             guint16 *data,
                                                             gint count,
                                                             gpointer user_data);
    gboolean            wire_read_int8                      (GIOChannel *channel,
                                                             guint8 *data,
                                                             gint count,
                                                             gpointer user_data);
    gboolean            wire_read_double                    (GIOChannel *channel,
                                                             gdouble *data,
                                                             gint count,
                                                             gpointer user_data);
    gboolean            wire_read_string                    (GIOChannel *channel,
                                                             gchar **data,
                                                             gint count,
                                                             gpointer user_data);
    gboolean            wire_write_int32                    (GIOChannel *channel,
                                                             guint32 *data,
                                                             gint count,
                                                             gpointer user_data);
    gboolean            wire_write_int16                    (GIOChannel *channel,
                                                             guint16 *data,
                                                             gint count,
                                                             gpointer user_data);
    gboolean            wire_write_int8                     (GIOChannel *channel,
                                                             guint8 *data,
                                                             gint count,
                                                             gpointer user_data);
    gboolean            wire_write_double                   (GIOChannel *channel,
                                                             gdouble *data,
                                                             gint count,
                                                             gpointer user_data);
    gboolean            wire_write_string                   (GIOChannel *channel,
                                                             gchar **data,
                                                             gint count,
                                                             gpointer user_data);

## Description

The lowlevel I/O protocol used for communication between GIMP and it's plug-ins.

## Details

### WireMessage

    typedef struct {
      guint32  type;
      gpointer data;
    } WireMessage;

### WireReadFunc ()

    void                (*WireReadFunc)                     (GIOChannel *channel,
                                                             WireMessage *msg,
                                                             gpointer user_data);

`channel` : |
`msg` : |
`user_data` : |

### WireWriteFunc ()

    void                (*WireWriteFunc)                    (GIOChannel *channel,
                                                             WireMessage *msg,
                                                             gpointer user_data);

`channel` : |
`msg` : |
`user_data` : |

### WireDestroyFunc ()

    void                (*WireDestroyFunc)                  (WireMessage *msg);

`msg` : |

### WireIOFunc ()

    gboolean            (*WireIOFunc)                       (GIOChannel *channel,
                                                             guint8 *buf,
                                                             gulong count,
                                                             gpointer user_data);

`channel` : |
`buf` : |
`count` : |
`user_data` : |
Returns : |

### WireFlushFunc ()

    gboolean            (*WireFlushFunc)                    (GIOChannel *channel,
                                                             gpointer user_data);

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

### wire_register ()

    void                wire_register                       (guint32 type,
                                                             WireReadFunc read_func,
                                                             WireWriteFunc write_func,
                                                             WireDestroyFunc destroy_func);

`type` : |
`read_func` : |
`write_func` : |
`destroy_func` : |

### wire_set_reader ()

    void                wire_set_reader                     (WireIOFunc read_func);

`read_func` : |

### wire_set_writer ()

    void                wire_set_writer                     (WireIOFunc write_func);

`write_func` : |

### wire_set_flusher ()

    void                wire_set_flusher                    (WireFlushFunc flush_func);

`flush_func` : |

### wire_read ()

    gboolean            wire_read                           (GIOChannel *channel,
                                                             guint8 *buf,
                                                             gsize count,
                                                             gpointer user_data);

`channel` : |
`buf` : |
`count` : |
`user_data` : |
Returns : |

### wire_write ()

    gboolean            wire_write                          (GIOChannel *channel,
                                                             guint8 *buf,
                                                             gsize count,
                                                             gpointer user_data);

`channel` : |
`buf` : |
`count` : |
`user_data` : |
Returns : |

### wire_flush ()

    gboolean            wire_flush                          (GIOChannel *channel,
                                                             gpointer user_data);

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

### wire_error ()

    gboolean            wire_error                          (void);

Returns : |

### wire_clear_error ()

    void                wire_clear_error                    (void);

### wire_read_msg ()

    gboolean            wire_read_msg                       (GIOChannel *channel,
                                                             WireMessage *msg,
                                                             gpointer user_data);

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

### wire_write_msg ()

    gboolean            wire_write_msg                      (GIOChannel *channel,
                                                             WireMessage *msg,
                                                             gpointer user_data);

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

### wire_destroy ()

    void                wire_destroy                        (WireMessage *msg);

`msg` : |

### wire_read_int32 ()

    gboolean            wire_read_int32                     (GIOChannel *channel,
                                                             guint32 *data,
                                                             gint count,
                                                             gpointer user_data);

`channel` : |
`data` : |
`count` : |
`user_data` : |
Returns : |

### wire_read_int16 ()

    gboolean            wire_read_int16                     (GIOChannel *channel,
                                                             guint16 *data,
                                                             gint count,
                                                             gpointer user_data);

`channel` : |
`data` : |
`count` : |
`user_data` : |
Returns : |

### wire_read_int8 ()

    gboolean            wire_read_int8                      (GIOChannel *channel,
                                                             guint8 *data,
                                                             gint count,
                                                             gpointer user_data);

`channel` : |
`data` : |
`count` : |
`user_data` : |
Returns : |

### wire_read_double ()

    gboolean            wire_read_double                    (GIOChannel *channel,
                                                             gdouble *data,
                                                             gint count,
                                                             gpointer user_data);

`channel` : |
`data` : |
`count` : |
`user_data` : |
Returns : |

### wire_read_string ()

    gboolean            wire_read_string                    (GIOChannel *channel,
                                                             gchar **data,
                                                             gint count,
                                                             gpointer user_data);

`channel` : |
`data` : |
`count` : |
`user_data` : |
Returns : |

### wire_write_int32 ()

    gboolean            wire_write_int32                    (GIOChannel *channel,
                                                             guint32 *data,
                                                             gint count,
                                                             gpointer user_data);

`channel` : |
`data` : |
`count` : |
`user_data` : |
Returns : |

### wire_write_int16 ()

    gboolean            wire_write_int16                    (GIOChannel *channel,
                                                             guint16 *data,
                                                             gint count,
                                                             gpointer user_data);

`channel` : |
`data` : |
`count` : |
`user_data` : |
Returns : |

### wire_write_int8 ()

    gboolean            wire_write_int8                     (GIOChannel *channel,
                                                             guint8 *data,
                                                             gint count,
                                                             gpointer user_data);

`channel` : |
`data` : |
`count` : |
`user_data` : |
Returns : |

### wire_write_double ()

    gboolean            wire_write_double                   (GIOChannel *channel,
                                                             gdouble *data,
                                                             gint count,
                                                             gpointer user_data);

`channel` : |
`data` : |
`count` : |
`user_data` : |
Returns : |

### wire_write_string ()

    gboolean            wire_write_string                   (GIOChannel *channel,
                                                             gchar **data,
                                                             gint count,
                                                             gpointer user_data);

`channel` : |
`data` : |
`count` : |
`user_data` : |
Returns : |

## See Also

libgimp-gimpprotocol