ruby-libnotify 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/AUTHORS.rdoc +4 -0
  2. data/CHANGELOG.rdoc +55 -0
  3. data/COPYING +504 -0
  4. data/README.rdoc +46 -0
  5. data/doc/classes/Notify.html +343 -0
  6. data/doc/classes/Notify.src/M000001.html +39 -0
  7. data/doc/classes/Notify.src/M000002.html +24 -0
  8. data/doc/classes/Notify.src/M000003.html +25 -0
  9. data/doc/classes/Notify.src/M000004.html +24 -0
  10. data/doc/classes/Notify.src/M000005.html +37 -0
  11. data/doc/classes/Notify.src/M000006.html +55 -0
  12. data/doc/classes/Notify/Notification.html +787 -0
  13. data/doc/classes/Notify/Notification.src/M000007.html +65 -0
  14. data/doc/classes/Notify/Notification.src/M000008.html +49 -0
  15. data/doc/classes/Notify/Notification.src/M000009.html +43 -0
  16. data/doc/classes/Notify/Notification.src/M000010.html +35 -0
  17. data/doc/classes/Notify/Notification.src/M000011.html +33 -0
  18. data/doc/classes/Notify/Notification.src/M000012.html +36 -0
  19. data/doc/classes/Notify/Notification.src/M000013.html +48 -0
  20. data/doc/classes/Notify/Notification.src/M000014.html +36 -0
  21. data/doc/classes/Notify/Notification.src/M000015.html +38 -0
  22. data/doc/classes/Notify/Notification.src/M000016.html +38 -0
  23. data/doc/classes/Notify/Notification.src/M000017.html +39 -0
  24. data/doc/classes/Notify/Notification.src/M000018.html +38 -0
  25. data/doc/classes/Notify/Notification.src/M000019.html +45 -0
  26. data/doc/classes/Notify/Notification.src/M000020.html +67 -0
  27. data/doc/classes/Notify/Notification.src/M000021.html +33 -0
  28. data/doc/classes/Notify/Notification.src/M000022.html +33 -0
  29. data/doc/classes/Notify/Notification.src/M000023.html +36 -0
  30. data/doc/classes/Notify/Notification.src/M000024.html +34 -0
  31. data/doc/created.rid +1 -0
  32. data/doc/files/lib/RNotify_rb.html +102 -0
  33. data/doc/files/rnotify_c.html +90 -0
  34. data/doc/fr_class_index.html +27 -0
  35. data/doc/fr_file_index.html +27 -0
  36. data/doc/fr_method_index.html +71 -0
  37. data/doc/index.html +21 -0
  38. data/doc/rdoc-style.css +299 -0
  39. data/examples/action.rb +39 -0
  40. data/examples/attach_to.rb +43 -0
  41. data/examples/attach_to_status_icon.rb +47 -0
  42. data/examples/base.rb +29 -0
  43. data/examples/geometry-hints.rb +37 -0
  44. data/examples/icon.png +0 -0
  45. data/examples/info.rb +27 -0
  46. data/examples/markup.rb +29 -0
  47. data/examples/multi-actions.rb +44 -0
  48. data/examples/update.rb +36 -0
  49. data/examples/urgency.rb +47 -0
  50. data/examples/xy.rb +32 -0
  51. data/ext/extconf.rb +67 -0
  52. data/ext/rnotify.c +814 -0
  53. data/lib/RNotify.rb +15 -0
  54. data/setup.rb +1333 -0
  55. metadata +120 -0
@@ -0,0 +1,38 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <title>hint_byte (Notify::Notification)</title>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8
+ </head>
9
+ <body class="standalone-code">
10
+ <pre>/*
11
+ * call-seq:
12
+ * hint_byte(key, value)
13
+ *
14
+ * key = The hint
15
+ *
16
+ * value = The hint's value
17
+ *
18
+ * Sets a hint with a byte value
19
+ */
20
+ static VALUE
21
+ _wrap_notification_set_hint_byte(VALUE self, VALUE key, VALUE value)
22
+ {
23
+ char *vkey = NIL_P(key) ? NULL : StringValuePtr(key);
24
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
25
+
26
+ #ifdef DEBUG
27
+ if(NOTIFY_IS_NOTIFICATION(n))
28
+ rb_warn(&quot;set_hint_byte, ok&quot;);
29
+ else
30
+ rb_warn(&quot;set_hint_byte, no ok&quot;);
31
+ #endif
32
+
33
+ notify_notification_set_hint_byte(n, vkey, FIX2INT(value));
34
+
35
+ return Qnil;
36
+ }</pre>
37
+ </body>
38
+ </html>
@@ -0,0 +1,45 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <title>geometry_hints (Notify::Notification)</title>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8
+ </head>
9
+ <body class="standalone-code">
10
+ <pre>/*
11
+ * call-seq:
12
+ * geometry_hints(screen, x, y)
13
+ *
14
+ * ** WHEN COMPILED AGAINST LIBNOTIFY 0.4.1 OR HIGHER **
15
+ *
16
+ * screen = The Gdk::Screen the notification should appear on
17
+ *
18
+ * x = The X coordinate to point to
19
+ *
20
+ * y = The Y coordinate to point to
21
+ *
22
+ * Sets the geometry hints on the notification
23
+ */
24
+ static VALUE
25
+ _wrap_notification_set_geometry_hints(VALUE self, VALUE screen, VALUE x, VALUE y)
26
+ {
27
+ GdkScreen *sc = GDK_SCREEN(RVAL2GOBJ(screen));
28
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
29
+
30
+ if(sc == NULL)
31
+ rb_raise(rb_eArgError, &quot;REQUIRED: the `screen` field&quot;);
32
+
33
+ #ifdef DEBUG
34
+ if(NOTIFY_IS_NOTIFICATION(n) &amp;&amp; GDK_IS_SCREEN(sc))
35
+ rb_warn(&quot;set_geometry_hints, ok&quot;);
36
+ else
37
+ rb_warn(&quot;set_geometry_hints, no ok&quot;);
38
+ #endif
39
+
40
+ notify_notification_set_geometry_hints(n, sc, FIX2INT(x), FIX2INT(y));
41
+
42
+ return Qnil;
43
+ }</pre>
44
+ </body>
45
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <title>add_action (Notify::Notification)</title>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8
+ </head>
9
+ <body class="standalone-code">
10
+ <pre>/*
11
+ * call-seq:
12
+ * add_action(action, label, user_data) { |action, user_data| ... }
13
+ *
14
+ * action = The action id
15
+ *
16
+ * label = The action label
17
+ *
18
+ * user_data = Custom data to pass into the block (optional)
19
+ *
20
+ * Adds an action. When the action is invoked, the specified block will be called
21
+ *
22
+ * Examples:
23
+ *
24
+ * myinstance.add_action( &quot;MyAction&quot;, &quot;MyLabel&quot; ) do |action|
25
+ * # something to do
26
+ * end
27
+ *
28
+ * Or
29
+ *
30
+ * myinstance.add_action( &quot;MyAction&quot;, &quot;MyLabel&quot;, MyData ) do |action, mydata|
31
+ * # something to do
32
+ * end
33
+ */
34
+ static VALUE
35
+ _wrap_notification_add_action(int argc, VALUE *argv, VALUE self)
36
+ {
37
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
38
+ VALUE action, label, data, body;
39
+ ActionData *actionData = NULL;
40
+
41
+ #ifdef DEBUG
42
+ if(NOTIFY_IS_NOTIFICATION(n))
43
+ rb_warn(&quot;add_action, ok&quot;);
44
+ else
45
+ rb_warn(&quot;add_action, no ok&quot;);
46
+ #endif
47
+
48
+ if(!rb_block_given_p())
49
+ rb_raise(rb_eRuntimeError, &quot;This method requires a block&quot;);
50
+
51
+ rb_scan_args(argc, argv, &quot;21&amp;&quot;, &amp;action, &amp;label, &amp;data, &amp;body);
52
+
53
+ actionData = g_new0(ActionData, 1);
54
+ actionData-&gt;callback = body;
55
+ actionData-&gt;action = action;
56
+ actionData-&gt;user_data = data;
57
+
58
+ notify_notification_add_action(n,
59
+ NIL_P(action) ? NULL : StringValuePtr(action),
60
+ NIL_P(label) ? NULL : StringValuePtr(label),
61
+ (NotifyActionCallback) _notification_action_cb,
62
+ actionData, (GFreeFunc)_notification_action_free);
63
+
64
+ return Qnil;
65
+ }</pre>
66
+ </body>
67
+ </html>
@@ -0,0 +1,33 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <title>clear_actions (Notify::Notification)</title>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8
+ </head>
9
+ <body class="standalone-code">
10
+ <pre>/*
11
+ * call-seq:
12
+ * clear_actions
13
+ *
14
+ * Clears all actions from the notification. Remember to use this method before call the Notification#close method.
15
+ */
16
+ static VALUE
17
+ _wrap_notification_clear_actions(VALUE self)
18
+ {
19
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
20
+
21
+ #ifdef DEBUG
22
+ if(NOTIFY_IS_NOTIFICATION(n))
23
+ rb_warn(&quot;clear_actions, ok&quot;);
24
+ else
25
+ rb_warn(&quot;clear_actions, no ok&quot;);
26
+ #endif
27
+
28
+ notify_notification_clear_actions(n);
29
+
30
+ return Qnil;
31
+ }</pre>
32
+ </body>
33
+ </html>
@@ -0,0 +1,33 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <title>clear_hints (Notify::Notification)</title>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8
+ </head>
9
+ <body class="standalone-code">
10
+ <pre>/*
11
+ * call-seq:
12
+ * clear_hints
13
+ *
14
+ * Clears all hints from the notification. Remember to use this method before call the Notification#close method.
15
+ */
16
+ static VALUE
17
+ _wrap_notification_clear_hints(VALUE self)
18
+ {
19
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
20
+
21
+ #ifdef DEBUG
22
+ if(NOTIFY_IS_NOTIFICATION(n))
23
+ rb_warn(&quot;clear_hints, ok&quot;);
24
+ else
25
+ rb_warn(&quot;clear_hints, no ok&quot;);
26
+ #endif
27
+
28
+ notify_notification_clear_hints(n);
29
+
30
+ return Qnil;
31
+ }</pre>
32
+ </body>
33
+ </html>
@@ -0,0 +1,36 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <title>closed_reason (Notify::Notification)</title>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8
+ </head>
9
+ <body class="standalone-code">
10
+ <pre>/*
11
+ * call-seq:
12
+ * closed_reason
13
+ *
14
+ * ** WHEN COMPILED AGAINST LIBNOTIFY 0.4.5 OR HIGHER **
15
+ *
16
+ * Returns the reason code why the notification was closed
17
+ */
18
+ static VALUE
19
+ _wrap_notification_get_closed_reason(VALUE self)
20
+ {
21
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
22
+ int reason = -1;
23
+
24
+ #ifdef DEBUG
25
+ if(NOTIFY_IS_NOTIFICATION(n))
26
+ rb_warn(&quot;closed_reason, ok&quot;);
27
+ else
28
+ rb_warn(&quot;closed_reason, no ok&quot;);
29
+ #endif
30
+
31
+ reason = notify_notification_get_closed_reason(n);
32
+
33
+ return INT2FIX(reason);
34
+ }</pre>
35
+ </body>
36
+ </html>
@@ -0,0 +1,34 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <title>close (Notify::Notification)</title>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
8
+ </head>
9
+ <body class="standalone-code">
10
+ <pre>/*
11
+ * call-seq:
12
+ * close
13
+ *
14
+ * Tells the notification server to hide the notification on the screen.
15
+ */
16
+ static VALUE
17
+ _wrap_notification_close(VALUE self)
18
+ {
19
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
20
+
21
+ #ifdef DEBUG
22
+ if(NOTIFY_IS_NOTIFICATION(n))
23
+ rb_warn(&quot;close, ok&quot;);
24
+ else
25
+ rb_warn(&quot;close, no ok&quot;);
26
+ #endif
27
+
28
+ if(notify_notification_close(n, NULL))
29
+ return Qtrue;
30
+
31
+ return Qfalse;
32
+ }</pre>
33
+ </body>
34
+ </html>
@@ -0,0 +1 @@
1
+ Mon, 11 Jan 2010 12:41:50 +0100
@@ -0,0 +1,102 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <title>File: RNotify.rb [RDoc Documentation]</title>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
8
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
9
+ <script type="text/javascript">
10
+ // <![CDATA[
11
+
12
+ function popupCode( url ) {
13
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14
+ }
15
+
16
+ function toggleCode( id ) {
17
+ if ( document.getElementById )
18
+ elem = document.getElementById( id );
19
+ else if ( document.all )
20
+ elem = eval( "document.all." + id );
21
+ else
22
+ return false;
23
+
24
+ elemStyle = elem.style;
25
+
26
+ if ( elemStyle.display != "block" ) {
27
+ elemStyle.display = "block"
28
+ } else {
29
+ elemStyle.display = "none"
30
+ }
31
+
32
+ return true;
33
+ }
34
+
35
+ // Make codeblocks hidden by default
36
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
+
38
+ // ]]>
39
+ </script>
40
+
41
+ </head>
42
+ <body>
43
+
44
+
45
+ <div id="fileHeader">
46
+ <h1>RNotify.rb</h1>
47
+ <table class="header-table">
48
+ <tr class="top-aligned-row">
49
+ <td><strong>Path:</strong></td>
50
+ <td>lib/RNotify.rb
51
+
52
+ </td>
53
+ </tr>
54
+ <tr class="top-aligned-row">
55
+ <td><strong>Last Update:</strong></td>
56
+ <td>2010-01-08 17:22:42 +0100</td>
57
+ </tr>
58
+ </table>
59
+ </div>
60
+ <!-- banner header -->
61
+
62
+ <div id="bodyContent">
63
+
64
+ <div id="contextContent">
65
+
66
+ <div id="requires-list">
67
+ <h3 class="section-bar">Required files</h3>
68
+
69
+ <div class="name-list">
70
+
71
+ gtk2&nbsp;&nbsp;
72
+
73
+ rnotify.so&nbsp;&nbsp;
74
+
75
+ </div>
76
+ </div>
77
+
78
+ </div>
79
+
80
+
81
+ </div>
82
+
83
+ <!-- if includes -->
84
+
85
+ <div id="section">
86
+
87
+
88
+
89
+
90
+ <!-- if method_list -->
91
+
92
+
93
+
94
+
95
+ </div>
96
+
97
+ <div id="validator-badges">
98
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
99
+ </div>
100
+
101
+ </body>
102
+ </html>
@@ -0,0 +1,90 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <title>File: rnotify.c [RDoc Documentation]</title>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
8
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
9
+ <script type="text/javascript">
10
+ // <![CDATA[
11
+
12
+ function popupCode( url ) {
13
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14
+ }
15
+
16
+ function toggleCode( id ) {
17
+ if ( document.getElementById )
18
+ elem = document.getElementById( id );
19
+ else if ( document.all )
20
+ elem = eval( "document.all." + id );
21
+ else
22
+ return false;
23
+
24
+ elemStyle = elem.style;
25
+
26
+ if ( elemStyle.display != "block" ) {
27
+ elemStyle.display = "block"
28
+ } else {
29
+ elemStyle.display = "none"
30
+ }
31
+
32
+ return true;
33
+ }
34
+
35
+ // Make codeblocks hidden by default
36
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
+
38
+ // ]]>
39
+ </script>
40
+
41
+ </head>
42
+ <body>
43
+
44
+
45
+ <div id="fileHeader">
46
+ <h1>rnotify.c</h1>
47
+ <table class="header-table">
48
+ <tr class="top-aligned-row">
49
+ <td><strong>Path:</strong></td>
50
+ <td>rnotify.c
51
+
52
+ </td>
53
+ </tr>
54
+ <tr class="top-aligned-row">
55
+ <td><strong>Last Update:</strong></td>
56
+ <td>2010-01-11 12:41:45 +0100</td>
57
+ </tr>
58
+ </table>
59
+ </div>
60
+ <!-- banner header -->
61
+
62
+ <div id="bodyContent">
63
+
64
+ <div id="contextContent">
65
+
66
+ </div>
67
+
68
+
69
+ </div>
70
+
71
+ <!-- if includes -->
72
+
73
+ <div id="section">
74
+
75
+
76
+
77
+
78
+ <!-- if method_list -->
79
+
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="validator-badges">
86
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
87
+ </div>
88
+
89
+ </body>
90
+ </html>