Beispiel #1
0
    public static void Main()
    {
        // call this so we can savely use the m_capabilities array later
        ExampleUtil.InitCaps();

        // show what's supported
        ExampleUtil.PrintCaps();

        // try the summary-only case
        Notification n = new Notification("Summary-only", "");

        n.Show();
    }
Beispiel #2
0
    public static void Main()
    {
        // call this so we can savely use the m_capabilities array later
        ExampleUtil.InitCaps();

        // show what's supported
        ExampleUtil.PrintCaps();

        // try the summary-body case
        Notification n = new Notification("Totem",
                                          "This is a superfluous notification.");

        n.Show();
    }
Beispiel #3
0
    public static void Main()
    {
        // call this so we can savely use the m_capabilities array later
        ExampleUtil.InitCaps();

        // show what's supported
        ExampleUtil.PrintCaps();

        // try the icon-summary case
        Notification n = new Notification("WiFi connection lost",
                                          "",          // this needs to be empty
                                          "notification-network-wireless-disconnected");

        n.Show();
    }
Beispiel #4
0
    public static void Main()
    {
        // call this so we can savely use the m_capabilities array later
        ExampleUtil.InitCaps();

        // show what's supported
        ExampleUtil.PrintCaps();

        // try the icon-summary-body case
        Notification n = new Notification("Cole Raby",
                                          "Hey pal, what's up with the party next weekend? Will you join me and Anna?",
                                          "notification-message-im");

        n.Show();
    }
Beispiel #5
0
    public static void Main()
    {
        // call this so we can savely use the m_capabilities array later
        ExampleUtil.InitCaps();

        // show what's supported
        ExampleUtil.PrintCaps();

        // try the icon-value case, usually used for synchronous bubbles
        if (ExampleUtil.HasCap(ExampleUtil.Capability.CAP_SYNCHRONOUS))
        {
            pushNotification("notification-keyboard-brightness-low",
                             25);

            pushNotification("notification-keyboard-brightness-medium",
                             50);

            pushNotification("notification-keyboard-brightness-high",
                             75);

            pushNotification("notification-keyboard-brightness-full",
                             100);

            // trigger "overshoot"-effect
            pushNotification("notification-keyboard-brightness-full",
                             101);

            pushNotification("notification-keyboard-brightness-high",
                             75);

            pushNotification("notification-keyboard-brightness-medium",
                             50);

            pushNotification("notification-keyboard-brightness-low",
                             25);

            pushNotification("notification-keyboard-brightness-off",
                             0);

            // trigger "undershoot"-effect
            pushNotification("notification-keyboard-brightness-off",
                             -1);
        }
        else
        {
            Console.WriteLine("The daemon does not support the x-canonical-private-synchronous hint!");
        }
    }
    public static void Main()
    {
        // call this so we can savely use the m_capabilities array later
        ExampleUtil.InitCaps();

        // show what's supported
        ExampleUtil.PrintCaps();

        // try the append-hint
        if (ExampleUtil.HasCap(ExampleUtil.Capability.CAP_APPEND))
        {
            pushNotification("Cole Raby",
                             "Hey Bro Coly!",
                             "notification-message-im");

            pushNotification("Cole Raby",
                             "What's up dude?",
                             "notification-message-im");

            pushNotification("Cole Raby",
                             "Did you watch the air-race in Oshkosh last week?",
                             "notification-message-im");

            pushNotification("Cole Raby",
                             "Phil owned the place like no one before him!",
                             "notification-message-im");

            pushNotification("Cole Raby",
                             "Did really everything in the race work according to regulations?",
                             "notification-message-im");

            pushNotification("Cole Raby",
                             "Somehow I think to remember Burt Williams did cut corners and was not punished for this.",
                             "notification-message-im");

            pushNotification("Cole Raby",
                             "Hopefully the referees will watch the videos of the race.",
                             "notification-message-im");

            pushNotification("Cole Raby",
                             "Burt could get fined with US$ 50000 for that rule-violation :)",
                             "notification-message-im");
        }
        else
        {
            Console.WriteLine("The daemon does not support the x-canonical-append hint!");
        }
    }
Beispiel #7
0
    public static void Main()
    {
        // call this so we can savely use the m_capabilities array later
        ExampleUtil.InitCaps();

        // show what's supported
        ExampleUtil.PrintCaps();

        // try the icon-sonly case
        if (ExampleUtil.HasCap(ExampleUtil.Capability.CAP_LAYOUT_ICON_ONLY))
        {
            Notification n = new Notification("Eject",              // for a11y-reasons supply something meaning full
                                              "",                   // this needs to be empty!
                                              "notification-device-eject");
            n.AddHint("x-canonical-private-icon-only", "");
            n.Show();
        }
        else
        {
            Console.WriteLine("The daemon does not support the x-canonical-private-icon-only hint!");
        }
    }
    public static void Main()
    {
        // call this so we can savely use the m_capabilities array later
        ExampleUtil.InitCaps();

        // show what's supported
        ExampleUtil.PrintCaps();

        // try the icon-summary-body case
        Notification n = new Notification(
            "Inital notification",
            "This is the original content of this notification-bubble.",
            "notification-message-im");

        n.Show();
        Mono.Unix.Native.Syscall.sleep(3);          // simulate app activity

        // update the current notification with new content
        n.Summary  = "Updated notification";
        n.Body     = "Here the same bubble with new title- and body-text, even the icon can be changed on the update.";
        n.IconName = "notification-message-email";
        n.Show();
        Mono.Unix.Native.Syscall.sleep(6);          // wait longer now

        // create a new bubble using the icon-summary-body layout
        n = new Notification(
            "Initial layout",
            "This bubble uses the icon-title-body layout.",
            "notification-message-im");
        n.Show();
        Mono.Unix.Native.Syscall.sleep(3);          // simulate app activity

        // now update current bubble again, but change the layout
        n.Summary  = "Updated layout";
        n.Body     = "After the update we now have a bubble using the title-body layout.";
        n.IconName = " ";
        n.Show();
    }