35
35
public class IconValue
37
public static void pushNotification (String icon,
40
Notification n = new Notification ("Brightness", // for a11y-reasons supply something meaning full
41
"", // this needs to be empty!
43
n.AddHint ("value", val);
44
n.AddHint ("x-canonical-private-synchronous", "");
46
Mono.Unix.Native.Syscall.sleep (1);
37
49
public static void Main ()
39
51
// call this so we can savely use the m_capabilities array later
45
57
// try the icon-value case, usually used for synchronous bubbles
46
58
if (ExampleUtil.HasCap (ExampleUtil.Capability.CAP_SYNCHRONOUS))
48
Notification n = new Notification ("Brightness", // for a11y-reasons supply something meaning full
49
"", // this needs to be empty!
50
"notification-keyboard-brightness-high");
51
n.AddHint ("value", 95);
52
n.AddHint ("x-canonical-private-synchronous", "");
60
pushNotification ("notification-keyboard-brightness-low",
63
pushNotification ("notification-keyboard-brightness-medium",
66
pushNotification ("notification-keyboard-brightness-high",
69
pushNotification ("notification-keyboard-brightness-full",
72
// trigger "overshoot"-effect
73
pushNotification ("notification-keyboard-brightness-full",
76
pushNotification ("notification-keyboard-brightness-high",
79
pushNotification ("notification-keyboard-brightness-medium",
82
pushNotification ("notification-keyboard-brightness-low",
85
pushNotification ("notification-keyboard-brightness-off",
88
// trigger "undershoot"-effect
89
pushNotification ("notification-keyboard-brightness-off",
56
93
Console.WriteLine ("The daemon does not support the x-canonical-private-synchronous hint!");