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

« back to all changes in this revision

Viewing changes to src/observer.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
**    observer.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 __OBSERVER_H
 
20
#define __OBSERVER_H
 
21
 
 
22
#include <glib-object.h>
 
23
#include <gtk/gtk.h>
 
24
 
 
25
G_BEGIN_DECLS
 
26
 
 
27
#define OBSERVER_TYPE             (observer_get_type ())
 
28
#define OBSERVER(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), OBSERVER_TYPE, Observer))
 
29
#define OBSERVER_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), OBSERVER_TYPE, ObserverClass))
 
30
#define IS_OBSERVER(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OBSERVER_TYPE))
 
31
#define IS_OBSERVER_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), OBSERVER_TYPE))
 
32
#define OBSERVER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), OBSERVER_TYPE, ObserverClass))
 
33
 
 
34
typedef struct _Observer      Observer;
 
35
typedef struct _ObserverClass ObserverClass;
 
36
 
 
37
/* instance structure */
 
38
struct _Observer
 
39
{
 
40
        GObject parent;
 
41
 
 
42
        /* private */
 
43
        GtkWidget* window;
 
44
        gint       timeout_frequency;
 
45
        guint      timeout_id;
 
46
        gint       pointer_x;
 
47
        gint       pointer_y;
 
48
};
 
49
 
 
50
/* class structure */
 
51
struct _ObserverClass
 
52
{
 
53
        GObjectClass parent;
 
54
};
 
55
 
 
56
GType Observer_get_type (void);
 
57
 
 
58
Observer*
 
59
observer_new (void);
 
60
 
 
61
void
 
62
observer_del (Observer* self);
 
63
 
 
64
gint
 
65
observer_get_x (Observer* self);
 
66
 
 
67
gint
 
68
observer_get_y (Observer* self);
 
69
 
 
70
G_END_DECLS
 
71
 
 
72
#endif /* __OBSERVER_H */