~ubuntu-branches/ubuntu/maverick/gimp/maverick-updates

« back to all changes in this revision

Viewing changes to libgimpbase/gimpwire.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-12-09 19:44:52 UTC
  • Revision ID: james.westby@ubuntu.com-20051209194452-yggpemjlofpjqyf4
Tags: upstream-2.2.9
ImportĀ upstreamĀ versionĀ 2.2.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* LIBGIMP - The GIMP Library
 
2
 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
 
3
 *
 
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.
 
8
 *
 
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.
 
13
 *
 
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.
 
18
 */
 
19
 
 
20
#ifndef __GIMP_WIRE_H__
 
21
#define __GIMP_WIRE_H__
 
22
 
 
23
G_BEGIN_DECLS
 
24
 
 
25
/* For information look into the C source or the html documentation */
 
26
 
 
27
 
 
28
typedef struct _WireMessage  WireMessage;
 
29
 
 
30
typedef void     (* WireReadFunc)    (GIOChannel  *channel,
 
31
                                      WireMessage *msg,
 
32
                                      gpointer     user_data);
 
33
typedef void     (* WireWriteFunc)   (GIOChannel  *channel,
 
34
                                      WireMessage *msg,
 
35
                                      gpointer     user_data);
 
36
typedef void     (* WireDestroyFunc) (WireMessage *msg);
 
37
typedef gboolean (* WireIOFunc)      (GIOChannel  *channel,
 
38
                                      guint8      *buf,
 
39
                                      gulong       count,
 
40
                                      gpointer     user_data);
 
41
typedef gboolean (* WireFlushFunc)   (GIOChannel  *channel,
 
42
                                      gpointer     user_data);
 
43
 
 
44
 
 
45
struct _WireMessage
 
46
{
 
47
  guint32  type;
 
48
  gpointer data;
 
49
};
 
50
 
 
51
 
 
52
void      wire_register     (guint32          type,
 
53
                             WireReadFunc     read_func,
 
54
                             WireWriteFunc    write_func,
 
55
                             WireDestroyFunc  destroy_func);
 
56
 
 
57
void      wire_set_reader   (WireIOFunc       read_func);
 
58
void      wire_set_writer   (WireIOFunc       write_func);
 
59
void      wire_set_flusher  (WireFlushFunc    flush_func);
 
60
 
 
61
gboolean  wire_read         (GIOChannel      *channel,
 
62
                             guint8          *buf,
 
63
                             gsize            count,
 
64
                             gpointer         user_data);
 
65
gboolean  wire_write        (GIOChannel      *channel,
 
66
                             guint8          *buf,
 
67
                             gsize            count,
 
68
                             gpointer         user_data);
 
69
gboolean  wire_flush        (GIOChannel      *channel,
 
70
                             gpointer         user_data);
 
71
 
 
72
gboolean  wire_error        (void);
 
73
void      wire_clear_error  (void);
 
74
 
 
75
gboolean  wire_read_msg     (GIOChannel      *channel,
 
76
                             WireMessage     *msg,
 
77
                             gpointer         user_data);
 
78
gboolean  wire_write_msg    (GIOChannel      *channel,
 
79
                             WireMessage     *msg,
 
80
                             gpointer         user_data);
 
81
 
 
82
void      wire_destroy      (WireMessage     *msg);
 
83
 
 
84
gboolean  wire_read_int32   (GIOChannel      *channel,
 
85
                             guint32         *data,
 
86
                             gint             count,
 
87
                             gpointer         user_data);
 
88
gboolean  wire_read_int16   (GIOChannel      *channel,
 
89
                             guint16         *data,
 
90
                             gint             count,
 
91
                             gpointer         user_data);
 
92
gboolean  wire_read_int8    (GIOChannel      *channel,
 
93
                             guint8          *data,
 
94
                             gint             count,
 
95
                             gpointer         user_data);
 
96
gboolean  wire_read_double  (GIOChannel      *channel,
 
97
                             gdouble         *data,
 
98
                             gint             count,
 
99
                             gpointer         user_data);
 
100
gboolean  wire_read_string  (GIOChannel      *channel,
 
101
                             gchar          **data,
 
102
                             gint             count,
 
103
                             gpointer         user_data);
 
104
gboolean  wire_write_int32  (GIOChannel      *channel,
 
105
                             guint32         *data,
 
106
                             gint             count,
 
107
                             gpointer         user_data);
 
108
gboolean  wire_write_int16  (GIOChannel      *channel,
 
109
                             guint16         *data,
 
110
                             gint             count,
 
111
                             gpointer         user_data);
 
112
gboolean  wire_write_int8   (GIOChannel      *channel,
 
113
                             guint8          *data,
 
114
                             gint             count,
 
115
                             gpointer         user_data);
 
116
gboolean  wire_write_double (GIOChannel      *channel,
 
117
                             gdouble         *data,
 
118
                             gint             count,
 
119
                             gpointer         user_data);
 
120
gboolean  wire_write_string (GIOChannel      *channel,
 
121
                             gchar          **data,
 
122
                             gint             count,
 
123
                             gpointer         user_data);
 
124
 
 
125
 
 
126
G_END_DECLS
 
127
 
 
128
#endif /* __GIMP_WIRE_H__ */