~indicator-applet-developers/notify-osd/trunk

« back to all changes in this revision

Viewing changes to src/stack.h

  • Committer: Mirco Müller
  • Date: 2008-11-25 16:39:26 UTC
  • Revision ID: mirco.mueller@ubuntu.com-20081125163926-r6iy1151qomc4a0i
added new modules

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
**3456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
 
3
**      10        20        30        40        50        60        70        80
 
4
**
 
5
** project:
 
6
**    alsdorf
 
7
**
 
8
** file:
 
9
**    stack.h
 
10
**
 
11
** author(s):
 
12
**    Mirco "MacSlow" Mueller <mirco.mueller@canonical.com>
 
13
**    David Barth <david.barth@canonical.com>
 
14
**
 
15
** copyright (C) Canonical, oct. 2008
 
16
**
 
17
*******************************************************************************/
 
18
 
 
19
#ifndef __STACK_H
 
20
#define __STACK_H
 
21
 
 
22
#include <glib-object.h>
 
23
 
 
24
G_BEGIN_DECLS
 
25
 
 
26
#define STACK_TYPE             (stack_get_type ())
 
27
#define STACK(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), STACK_TYPE, Stack))
 
28
#define STACK_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), STACK_TYPE, StackClass))
 
29
#define IS_STACK(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STACK_TYPE))
 
30
#define IS_STACK_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), STACK_TYPE))
 
31
#define STACK_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), STACK_TYPE, StackClass))
 
32
 
 
33
typedef struct _Stack      Stack;
 
34
typedef struct _StackClass StackClass;
 
35
 
 
36
/* instance structure */
 
37
struct _Stack
 
38
{
 
39
        GObject parent;
 
40
 
 
41
        /* private */
 
42
        GList* synchronous;
 
43
        GList* asynchronous;
 
44
        guint  next_id;
 
45
        GList* timers;
 
46
};
 
47
 
 
48
/* class structure */
 
49
struct _StackClass
 
50
{
 
51
        GObjectClass parent;
 
52
};
 
53
 
 
54
GType stack_get_type (void);
 
55
 
 
56
Stack*
 
57
stack_new (void);
 
58
 
 
59
void
 
60
stack_del (Stack* self);
 
61
 
 
62
guint
 
63
stack_get_next_id (Stack* self);
 
64
 
 
65
void
 
66
stack_add_async (Stack* self,
 
67
                 guint  id);
 
68
 
 
69
void
 
70
stack_remove_async (Stack* self,
 
71
                    guint  id);
 
72
 
 
73
void
 
74
stack_add_sync (Stack* self,
 
75
                guint  id);
 
76
 
 
77
void
 
78
stack_remove_sync (Stack* self,
 
79
                   guint  id);
 
80
 
 
81
G_END_DECLS
 
82
 
 
83
#endif /* __STACK_H */