1
/* LIBGIMP - The GIMP Library
2
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the
16
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
* Boston, MA 02111-1307, USA.
20
#ifndef __GIMP_WIRE_H__
21
#define __GIMP_WIRE_H__
25
/* For information look into the C source or the html documentation */
28
typedef struct _WireMessage WireMessage;
30
typedef void (* WireReadFunc) (GIOChannel *channel,
33
typedef void (* WireWriteFunc) (GIOChannel *channel,
36
typedef void (* WireDestroyFunc) (WireMessage *msg);
37
typedef gboolean (* WireIOFunc) (GIOChannel *channel,
41
typedef gboolean (* WireFlushFunc) (GIOChannel *channel,
52
void wire_register (guint32 type,
53
WireReadFunc read_func,
54
WireWriteFunc write_func,
55
WireDestroyFunc destroy_func);
57
void wire_set_reader (WireIOFunc read_func);
58
void wire_set_writer (WireIOFunc write_func);
59
void wire_set_flusher (WireFlushFunc flush_func);
61
gboolean wire_read (GIOChannel *channel,
65
gboolean wire_write (GIOChannel *channel,
69
gboolean wire_flush (GIOChannel *channel,
72
gboolean wire_error (void);
73
void wire_clear_error (void);
75
gboolean wire_read_msg (GIOChannel *channel,
78
gboolean wire_write_msg (GIOChannel *channel,
82
void wire_destroy (WireMessage *msg);
84
gboolean wire_read_int32 (GIOChannel *channel,
88
gboolean wire_read_int16 (GIOChannel *channel,
92
gboolean wire_read_int8 (GIOChannel *channel,
96
gboolean wire_read_double (GIOChannel *channel,
100
gboolean wire_read_string (GIOChannel *channel,
104
gboolean wire_write_int32 (GIOChannel *channel,
108
gboolean wire_write_int16 (GIOChannel *channel,
112
gboolean wire_write_int8 (GIOChannel *channel,
116
gboolean wire_write_double (GIOChannel *channel,
120
gboolean wire_write_string (GIOChannel *channel,
128
#endif /* __GIMP_WIRE_H__ */