root/flow/flow-event.h

Revision 07449c2bf3b70df94f0f4a9c1c5ac174bcc43916, 2.3 kB (checked in by hansp <hansp>, 4 years ago)

User private sections for object data where it makes sense.

  • Property mode set to 100644
Line 
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
3 /* flow-event.h - An event that can be propagated along a pipeline.
4  *
5  * Copyright (C) 2006 Hans Petter Jansson
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  *
22  * Authors: Hans Petter Jansson <hpj@copyleft.no>
23  */
24
25 #ifndef _FLOW_EVENT_H
26 #define _FLOW_EVENT_H
27
28 #include <flow/flow-element.h>
29
30 G_BEGIN_DECLS
31
32 #define FLOW_TYPE_EVENT            (flow_event_get_type ())
33 #define FLOW_EVENT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), FLOW_TYPE_EVENT, FlowEvent))
34 #define FLOW_EVENT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), FLOW_TYPE_EVENT, FlowEventClass))
35 #define FLOW_IS_EVENT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FLOW_TYPE_EVENT))
36 #define FLOW_IS_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FLOW_TYPE_EVENT))
37 #define FLOW_EVENT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), FLOW_TYPE_EVENT, FlowEventClass))
38 GType   flow_event_get_type        (void) G_GNUC_CONST;
39
40 typedef struct _FlowEvent      FlowEvent;
41 typedef struct _FlowEventClass FlowEventClass;
42
43 struct _FlowEvent
44 {
45   GObject      parent;
46
47   /* --- Protected --- */
48
49   FlowElement *source_element;
50   gchar       *description;
51
52   /* --- Private --- */
53
54   gpointer     priv;
55 };
56
57 struct _FlowEventClass
58 {
59   GObjectClass parent_class;
60
61   void (*update_description) (FlowEvent *event);
62
63   /* Padding for future expansion */
64
65   void (*_pad_1) (void);
66   void (*_pad_2) (void);
67   void (*_pad_3) (void);
68   void (*_pad_4) (void);
69 };
70
71 G_END_DECLS
72
73 FlowElement *flow_event_get_source_element (FlowEvent *event);
74 const gchar *flow_event_get_description    (FlowEvent *event);
75
76 #endif  /* _FLOW_EVENT_H */
Note: See TracBrowser for help on using the browser.