コード例 #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 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!");
        }
    }
コード例 #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 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!");
        }
    }
コード例 #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-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!");
        }
    }