~elementary-os/elementaryos/os-patch-notify-osd-precise

« back to all changes in this revision

Viewing changes to examples/example-util.h

  • Committer: Sergey "Shnatsel" Davidoff
  • Date: 2012-06-18 21:08:31 UTC
  • Revision ID: shnatsel@gmail.com-20120618210831-g6k5y7vecjdylgic
Initial import, version 0.9.34-0ubuntu2

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
** Info: 
 
6
**    Header for some utility-functions for notification examples demonstrating
 
7
**    how to use libnotify correctly and at the same time comply to the new
 
8
**    jaunty notification spec (read: visual guidelines)
 
9
**
 
10
** Copyright 2009 Canonical Ltd.
 
11
**
 
12
** Author:
 
13
**    Mirco "MacSlow" Mueller <mirco.mueller@canonical.com>
 
14
**
 
15
** This program is free software: you can redistribute it and/or modify it
 
16
** under the terms of the GNU General Public License version 3, as published
 
17
** by the Free Software Foundation.
 
18
**
 
19
** This program is distributed in the hope that it will be useful, but
 
20
** WITHOUT ANY WARRANTY; without even the implied warranties of
 
21
** MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
22
** PURPOSE.  See the GNU General Public License for more details.
 
23
**
 
24
** You should have received a copy of the GNU General Public License along
 
25
** with this program.  If not, see <http://www.gnu.org/licenses/>.
 
26
**
 
27
*******************************************************************************/
 
28
 
 
29
#ifndef __EXAMPLE_UTIL_H
 
30
#define __EXAMPLE_UTIL_H
 
31
 
 
32
#include <glib.h>
 
33
#include <unistd.h>
 
34
#include <libnotify/notify.h>
 
35
 
 
36
typedef enum _Capability {
 
37
        CAP_ACTIONS = 0,
 
38
        CAP_BODY,
 
39
        CAP_BODY_HYPERLINKS,
 
40
        CAP_BODY_IMAGES,
 
41
        CAP_BODY_MARKUP,
 
42
        CAP_ICON_MULTI,
 
43
        CAP_ICON_STATIC,
 
44
        CAP_SOUND,
 
45
        CAP_IMAGE_SVG,
 
46
        CAP_SYNCHRONOUS,
 
47
        CAP_APPEND,
 
48
        CAP_LAYOUT_ICON_ONLY,
 
49
        CAP_TRUNCATION,
 
50
        CAP_MAX
 
51
} Capability;
 
52
 
 
53
#define ACTIONS          "actions"
 
54
#define BODY             "body"
 
55
#define BODY_HYPERLINKS  "body-hyperlinks"
 
56
#define BODY_IMAGES      "body-images"
 
57
#define BODY_MARKUP      "body-markup"
 
58
#define ICON_MULTI       "icon-multi"
 
59
#define ICON_STATIC      "icon-static"
 
60
#define SOUND            "sound"
 
61
#define IMAGE_SVG        "image/svg+xml"
 
62
#define SYNCHRONOUS      "x-canonical-private-synchronous"
 
63
#define APPEND           "x-canonical-append"
 
64
#define LAYOUT_ICON_ONLY "x-canonical-private-icon-only"
 
65
#define TRUNCATION       "x-canonical-truncation"
 
66
 
 
67
void
 
68
closed_handler (NotifyNotification* notification,
 
69
                gpointer            data);
 
70
 
 
71
void
 
72
set_cap (gpointer data,
 
73
         gpointer user_data);
 
74
 
 
75
void
 
76
init_caps (void);
 
77
 
 
78
gboolean
 
79
has_cap (Capability cap);
 
80
 
 
81
void
 
82
print_caps (void);
 
83
 
 
84
#endif /* __EXAMPLE_UTIL_H */
 
85