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

« back to all changes in this revision

Viewing changes to examples/icon-summary-body.cs

  • 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
//    Example of how to use libnotify correctly and at the same time comply to
 
7
//    the new jaunty notification spec (read: visual guidelines)
 
8
//
 
9
// Compile and run:
 
10
//    gmcs -pkg:notify-sharp example-util.cs icon-summary-body.cs \
 
11
//    -out:icon-summary-body.exe
 
12
//    mono icon-summary-body.exe
 
13
//
 
14
// Copyright 2009 Canonical Ltd.
 
15
//
 
16
// Author:
 
17
//    Mirco "MacSlow" Mueller <mirco.mueller@canonical.com>
 
18
//
 
19
// This program is free software: you can redistribute it and/or modify it
 
20
// under the terms of the GNU General Public License version 3, as published
 
21
// by the Free Software Foundation.
 
22
//
 
23
// This program is distributed in the hope that it will be useful, but
 
24
// WITHOUT ANY WARRANTY; without even the implied warranties of
 
25
// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
26
// PURPOSE.  See the GNU General Public License for more details.
 
27
//
 
28
// You should have received a copy of the GNU General Public License along
 
29
// with this program.  If not, see <http://www.gnu.org/licenses/>.
 
30
//
 
31
////////////////////////////////////////////////////////////////////////////////
 
32
 
 
33
using System;
 
34
using Notifications;
 
35
 
 
36
public class IconSummaryBody
 
37
{
 
38
        public static void Main ()
 
39
        {
 
40
                // call this so we can savely use the m_capabilities array later
 
41
                ExampleUtil.InitCaps ();
 
42
 
 
43
                // show what's supported
 
44
                ExampleUtil.PrintCaps ();
 
45
 
 
46
                // try the icon-summary-body case
 
47
                Notification n = new Notification ("Cole Raby",
 
48
                                                   "Hey pal, what's up with the party next weekend? Will you join me and Anna?",
 
49
                                                   "notification-message-im");
 
50
                n.Show ();
 
51
        }
 
52
}