ruby-libnotify 0.4.1.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. data/CHANGELOG.rdoc +12 -0
  2. data/README.rdoc +5 -7
  3. data/doc/Notify/Notification.html +1123 -0
  4. data/doc/Notify.html +518 -0
  5. data/doc/created.rid +3 -1
  6. data/doc/ext/rnotify_c.html +52 -0
  7. data/doc/images/brick.png +0 -0
  8. data/doc/images/brick_link.png +0 -0
  9. data/doc/images/bug.png +0 -0
  10. data/doc/images/bullet_black.png +0 -0
  11. data/doc/images/bullet_toggle_minus.png +0 -0
  12. data/doc/images/bullet_toggle_plus.png +0 -0
  13. data/doc/images/date.png +0 -0
  14. data/doc/images/find.png +0 -0
  15. data/doc/images/loadingAnimation.gif +0 -0
  16. data/doc/images/macFFBgHack.png +0 -0
  17. data/doc/images/package.png +0 -0
  18. data/doc/images/page_green.png +0 -0
  19. data/doc/images/page_white_text.png +0 -0
  20. data/doc/images/page_white_width.png +0 -0
  21. data/doc/images/plugin.png +0 -0
  22. data/doc/images/ruby.png +0 -0
  23. data/doc/images/tag_green.png +0 -0
  24. data/doc/images/wrench.png +0 -0
  25. data/doc/images/wrench_orange.png +0 -0
  26. data/doc/images/zoom.png +0 -0
  27. data/doc/index.html +93 -17
  28. data/doc/js/darkfish.js +116 -0
  29. data/doc/js/jquery.js +32 -0
  30. data/doc/js/quicksearch.js +114 -0
  31. data/doc/js/thickbox-compressed.js +10 -0
  32. data/doc/lib/RNotify_rb.html +56 -0
  33. data/doc/rdoc.css +706 -0
  34. data/examples/action.rb +1 -1
  35. data/examples/base.rb +1 -5
  36. data/examples/icon.png +0 -0
  37. data/examples/info.rb +1 -1
  38. data/examples/markup.rb +1 -4
  39. data/examples/multi-actions.rb +1 -1
  40. data/examples/update.rb +1 -6
  41. data/examples/urgency.rb +3 -8
  42. data/examples/xy.rb +1 -6
  43. data/ext/extconf.rb +23 -34
  44. data/ext/rnotify.c +72 -145
  45. data/lib/RNotify.rb +1 -1
  46. metadata +33 -52
  47. data/doc/classes/Notify/Notification.html +0 -787
  48. data/doc/classes/Notify/Notification.src/M000007.html +0 -65
  49. data/doc/classes/Notify/Notification.src/M000008.html +0 -49
  50. data/doc/classes/Notify/Notification.src/M000009.html +0 -43
  51. data/doc/classes/Notify/Notification.src/M000010.html +0 -35
  52. data/doc/classes/Notify/Notification.src/M000011.html +0 -33
  53. data/doc/classes/Notify/Notification.src/M000012.html +0 -36
  54. data/doc/classes/Notify/Notification.src/M000013.html +0 -48
  55. data/doc/classes/Notify/Notification.src/M000014.html +0 -36
  56. data/doc/classes/Notify/Notification.src/M000015.html +0 -38
  57. data/doc/classes/Notify/Notification.src/M000016.html +0 -38
  58. data/doc/classes/Notify/Notification.src/M000017.html +0 -39
  59. data/doc/classes/Notify/Notification.src/M000018.html +0 -38
  60. data/doc/classes/Notify/Notification.src/M000019.html +0 -45
  61. data/doc/classes/Notify/Notification.src/M000020.html +0 -67
  62. data/doc/classes/Notify/Notification.src/M000021.html +0 -33
  63. data/doc/classes/Notify/Notification.src/M000022.html +0 -33
  64. data/doc/classes/Notify/Notification.src/M000023.html +0 -36
  65. data/doc/classes/Notify/Notification.src/M000024.html +0 -34
  66. data/doc/classes/Notify.html +0 -343
  67. data/doc/classes/Notify.src/M000001.html +0 -39
  68. data/doc/classes/Notify.src/M000002.html +0 -24
  69. data/doc/classes/Notify.src/M000003.html +0 -25
  70. data/doc/classes/Notify.src/M000004.html +0 -24
  71. data/doc/classes/Notify.src/M000005.html +0 -37
  72. data/doc/classes/Notify.src/M000006.html +0 -55
  73. data/doc/files/lib/RNotify_rb.html +0 -102
  74. data/doc/files/rnotify_c.html +0 -90
  75. data/doc/fr_class_index.html +0 -27
  76. data/doc/fr_file_index.html +0 -27
  77. data/doc/fr_method_index.html +0 -71
  78. data/doc/rdoc-style.css +0 -299
  79. data/examples/attach_to.rb +0 -43
  80. data/examples/attach_to_status_icon.rb +0 -47
  81. data/examples/geometry-hints.rb +0 -37
data/doc/Notify.html ADDED
@@ -0,0 +1,518 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Module: Notify</title>
9
+
10
+ <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="./js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="./js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="./js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="module">
23
+
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="./index.html">Home</a>
29
+ <a href="./index.html#classes">Classes</a>
30
+ <a href="./index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="file-metadata">
36
+ <div id="file-list-section" class="section">
37
+ <h3 class="section-header">In Files</h3>
38
+ <div class="section-body">
39
+ <ul>
40
+
41
+ <li><a href="./lib/RNotify_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
+ class="thickbox" title="lib/RNotify.rb">lib/RNotify.rb</a></li>
43
+
44
+ <li><a href="./ext/rnotify_c.html?TB_iframe=true&amp;height=550&amp;width=785"
45
+ class="thickbox" title="ext/rnotify.c">ext/rnotify.c</a></li>
46
+
47
+ </ul>
48
+ </div>
49
+ </div>
50
+
51
+
52
+ </div>
53
+
54
+ <div id="class-metadata">
55
+
56
+ <!-- Parent Class -->
57
+
58
+
59
+ <!-- Namespace Contents -->
60
+
61
+ <div id="namespace-list-section" class="section">
62
+ <h3 class="section-header">Namespace</h3>
63
+ <ul class="link-list">
64
+
65
+ <li><span class="type">CLASS</span> <a href="Notify/Notification.html">Notify::Notification</a></li>
66
+
67
+ </ul>
68
+ </div>
69
+
70
+
71
+ <!-- Method Quickref -->
72
+
73
+ <div id="method-list-section" class="section">
74
+ <h3 class="section-header">Methods</h3>
75
+ <ul class="link-list">
76
+
77
+ <li><a href="#method-c-init">::init</a></li>
78
+
79
+ <li><a href="#method-c-init%3F">::init?</a></li>
80
+
81
+ <li><a href="#method-c-name">::name</a></li>
82
+
83
+ <li><a href="#method-c-name%3D">::name=</a></li>
84
+
85
+ <li><a href="#method-c-server_caps">::server_caps</a></li>
86
+
87
+ <li><a href="#method-c-server_info">::server_info</a></li>
88
+
89
+ <li><a href="#method-c-uninit">::uninit</a></li>
90
+
91
+ </ul>
92
+ </div>
93
+
94
+
95
+ <!-- Included Modules -->
96
+
97
+ </div>
98
+
99
+ <div id="project-metadata">
100
+
101
+
102
+
103
+ <div id="classindex-section" class="section project-section">
104
+ <h3 class="section-header">Class Index
105
+ <span class="search-toggle"><img src="./images/find.png"
106
+ height="16" width="16" alt="[+]"
107
+ title="show/hide quicksearch" /></span></h3>
108
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
109
+ <fieldset>
110
+ <legend>Quicksearch</legend>
111
+ <input type="text" name="quicksearch" value=""
112
+ class="quicksearch-field" />
113
+ </fieldset>
114
+ </form>
115
+
116
+ <ul class="link-list">
117
+
118
+ <li><a href="./Notify.html">Notify</a></li>
119
+
120
+ <li><a href="./Notify/Notification.html">Notify::Notification</a></li>
121
+
122
+ </ul>
123
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
124
+ </div>
125
+
126
+
127
+ </div>
128
+ </div>
129
+
130
+ <div id="documentation">
131
+ <h1 class="module">Notify</h1>
132
+
133
+ <div id="description">
134
+
135
+ </div>
136
+
137
+ <!-- Constants -->
138
+
139
+ <div id="constants-list" class="section">
140
+ <h3 class="section-header">Constants</h3>
141
+ <dl>
142
+
143
+ <dt><a name="VERSION">VERSION</a></dt>
144
+
145
+ <dd class="description"></dd>
146
+
147
+
148
+ </dl>
149
+ </div>
150
+
151
+
152
+ <!-- Attributes -->
153
+
154
+
155
+ <!-- Methods -->
156
+
157
+ <div id="public-class-method-details" class="method-section section">
158
+ <h3 class="section-header">Public Class Methods</h3>
159
+
160
+
161
+ <div id="init-method" class="method-detail ">
162
+ <a name="method-c-init"></a>
163
+
164
+ <div class="method-heading">
165
+
166
+ <span class="method-callseq">init(name)</span>
167
+ <span class="method-click-advice">click to toggle source</span>
168
+
169
+ </div>
170
+
171
+ <div class="method-description">
172
+
173
+ <p>
174
+ name = application name (required)
175
+ </p>
176
+ <p>
177
+ Initialize libnotify. This must be called before any other functions. Throw
178
+ an expection If name is empty or nil
179
+ </p>
180
+ <p>
181
+ Returns TRUE if the library initialized properly, FALSE otherwise
182
+ </p>
183
+
184
+
185
+
186
+ <div class="method-source-code"
187
+ id="init-source">
188
+ <pre>
189
+ static VALUE
190
+ _wrap_notify_init(VALUE self, VALUE app_name)
191
+ {
192
+ gboolean init;
193
+ char *name = NIL_P(app_name) ? NULL : StringValuePtr(app_name);
194
+
195
+ if(name == NULL || *name == '\0')
196
+ rb_raise(rb_eRuntimeError,
197
+ &quot;You MUST call this method with a valid string that will be used as Application name&quot;);
198
+ else
199
+ init = notify_init(name);
200
+
201
+ if(init == TRUE)
202
+ return Qtrue;
203
+
204
+ return Qfalse;
205
+ }</pre>
206
+ </div>
207
+
208
+ </div>
209
+
210
+
211
+
212
+
213
+ </div>
214
+
215
+
216
+ <div id="init--method" class="method-detail ">
217
+ <a name="method-c-init%3F"></a>
218
+
219
+ <div class="method-heading">
220
+
221
+ <span class="method-callseq">init?</span>
222
+ <span class="method-click-advice">click to toggle source</span>
223
+
224
+ </div>
225
+
226
+ <div class="method-description">
227
+
228
+ <p>
229
+ Returns TRUE if libnotify is inizialized, FALSE otherwise
230
+ </p>
231
+
232
+
233
+
234
+ <div class="method-source-code"
235
+ id="init--source">
236
+ <pre>
237
+ static VALUE
238
+ _wrap_notify_is_initted(VALUE self)
239
+ {
240
+ if(notify_is_initted())
241
+ return Qtrue;
242
+
243
+ return Qfalse;
244
+ }</pre>
245
+ </div>
246
+
247
+ </div>
248
+
249
+
250
+
251
+
252
+ </div>
253
+
254
+
255
+ <div id="name-method" class="method-detail ">
256
+ <a name="method-c-name"></a>
257
+
258
+ <div class="method-heading">
259
+
260
+ <span class="method-callseq">name</span>
261
+ <span class="method-click-advice">click to toggle source</span>
262
+
263
+ </div>
264
+
265
+ <div class="method-description">
266
+
267
+ <p>
268
+ Returns the application name passed to Notify.init
269
+ </p>
270
+
271
+
272
+
273
+ <div class="method-source-code"
274
+ id="name-source">
275
+ <pre>
276
+ static VALUE
277
+ _wrap_notify_get_app_name(VALUE self)
278
+ {
279
+ const gchar *name = notify_get_app_name();
280
+
281
+ return rb_str_new2(name);
282
+ }</pre>
283
+ </div>
284
+
285
+ </div>
286
+
287
+
288
+
289
+
290
+ </div>
291
+
292
+
293
+ <div id="name--method" class="method-detail ">
294
+ <a name="method-c-name%3D"></a>
295
+
296
+ <div class="method-heading">
297
+
298
+ <span class="method-callseq">name= new_name</span>
299
+ <span class="method-click-advice">click to toggle source</span>
300
+
301
+ </div>
302
+
303
+ <div class="method-description">
304
+
305
+ <p>
306
+ if new_name is a valid string, change the application name to new_name
307
+ otherwise nothing will be changed
308
+ </p>
309
+ <p>
310
+ ** ONLY WHEN COMPILED AGAINST LIBNOTIFY >= 0.7.2 **
311
+ </p>
312
+
313
+
314
+
315
+ <div class="method-source-code"
316
+ id="name--source">
317
+ <pre>
318
+ static VALUE
319
+ _wrap_notify_set_app_name(VALUE self, VALUE app_name)
320
+ {
321
+ char *name = NIL_P(app_name) ? NULL : StringValuePtr(app_name);
322
+
323
+ if(name != NULL || *name != '\0')
324
+ notify_set_app_name(name);
325
+
326
+ return Qnil;
327
+ }</pre>
328
+ </div>
329
+
330
+ </div>
331
+
332
+
333
+
334
+
335
+ </div>
336
+
337
+
338
+ <div id="server-caps-method" class="method-detail ">
339
+ <a name="method-c-server_caps"></a>
340
+
341
+ <div class="method-heading">
342
+
343
+ <span class="method-callseq">server_caps</span>
344
+ <span class="method-click-advice">click to toggle source</span>
345
+
346
+ </div>
347
+
348
+ <div class="method-description">
349
+
350
+ <p>
351
+ Queries the server for its capabilities and returns them in an Array
352
+ </p>
353
+
354
+
355
+
356
+ <div class="method-source-code"
357
+ id="server-caps-source">
358
+ <pre>
359
+ static VALUE
360
+ _wrap_notify_get_server_caps(VALUE self)
361
+ {
362
+ GList *caps = NULL;
363
+ VALUE rb_caps;
364
+
365
+ caps = notify_get_server_caps();
366
+ rb_caps = rb_ary_new();
367
+
368
+ do
369
+ {
370
+ rb_ary_push(rb_caps, rb_str_new2(caps-&gt;data));
371
+ caps = caps-&gt;next;
372
+ } while(caps != NULL);
373
+
374
+ g_list_foreach(caps, (GFunc)g_free, NULL);
375
+ g_list_free(caps);
376
+
377
+ return rb_caps;
378
+ }</pre>
379
+ </div>
380
+
381
+ </div>
382
+
383
+
384
+
385
+
386
+ </div>
387
+
388
+
389
+ <div id="server-info-method" class="method-detail ">
390
+ <a name="method-c-server_info"></a>
391
+
392
+ <div class="method-heading">
393
+
394
+ <span class="method-callseq">server_info</span>
395
+ <span class="method-click-advice">click to toggle source</span>
396
+
397
+ </div>
398
+
399
+ <div class="method-description">
400
+
401
+ <p>
402
+ Queries the server for its information (name, vendor, server version,
403
+ notification version)
404
+ </p>
405
+ <p>
406
+ Returns FALSE if there were errors, an Hash otherwise
407
+ </p>
408
+ <p>
409
+ example:
410
+ </p>
411
+ <pre>
412
+ h = Notify.server_info
413
+ p h[:name] #print the product name of the server
414
+ p h[:vendor] #print the vendor
415
+ p h[:version] #print the server version
416
+ p h[:spec_version] #print the specification version supported</pre>
417
+
418
+
419
+
420
+ <div class="method-source-code"
421
+ id="server-info-source">
422
+ <pre>
423
+ static VALUE
424
+ _wrap_notify_get_server_info(VALUE self)
425
+ {
426
+ gchar *serv_name = NULL,
427
+ *vendor = NULL,
428
+ *serv_version = NULL,
429
+ *spec_vers = NULL;
430
+ VALUE rb_info;
431
+
432
+ if(!notify_get_server_info(&amp;serv_name, &amp;vendor, &amp;serv_version, &amp;spec_vers))
433
+ return Qfalse;
434
+ else
435
+ {
436
+ rb_info = rb_hash_new();
437
+ rb_hash_aset(rb_info, ID2SYM(rb_intern(&quot;name&quot;)), rb_str_new2(serv_name));
438
+ rb_hash_aset(rb_info, ID2SYM(rb_intern(&quot;vendor&quot;)), rb_str_new2(vendor));
439
+ rb_hash_aset(rb_info, ID2SYM(rb_intern(&quot;version&quot;)), rb_str_new2(serv_version));
440
+ rb_hash_aset(rb_info, ID2SYM(rb_intern(&quot;spec_version&quot;)), rb_str_new2(spec_vers));
441
+
442
+ g_free(serv_name);
443
+ g_free(vendor);
444
+ g_free(serv_version);
445
+ g_free(spec_vers);
446
+ }
447
+
448
+ return rb_info;
449
+ }</pre>
450
+ </div>
451
+
452
+ </div>
453
+
454
+
455
+
456
+
457
+ </div>
458
+
459
+
460
+ <div id="uninit-method" class="method-detail ">
461
+ <a name="method-c-uninit"></a>
462
+
463
+ <div class="method-heading">
464
+
465
+ <span class="method-callseq">uninit</span>
466
+ <span class="method-click-advice">click to toggle source</span>
467
+
468
+ </div>
469
+
470
+ <div class="method-description">
471
+
472
+ <p>
473
+ Deinitialize libnotify, you must to call this before quit the program
474
+ </p>
475
+
476
+
477
+
478
+ <div class="method-source-code"
479
+ id="uninit-source">
480
+ <pre>
481
+ static VALUE
482
+ _wrap_notify_uninit(VALUE self)
483
+ {
484
+ notify_uninit();
485
+
486
+ return Qnil;
487
+ }</pre>
488
+ </div>
489
+
490
+ </div>
491
+
492
+
493
+
494
+
495
+ </div>
496
+
497
+
498
+ </div>
499
+
500
+
501
+ </div>
502
+
503
+
504
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
505
+
506
+ <p>Disabled; run with --debug to generate this.</p>
507
+
508
+ </div>
509
+
510
+ <div id="validator-badges">
511
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
512
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
513
+ Rdoc Generator</a> 1.1.6</small>.</p>
514
+ </div>
515
+
516
+ </body>
517
+ </html>
518
+
data/doc/created.rid CHANGED
@@ -1 +1,3 @@
1
- Mon, 11 Jan 2010 12:41:50 +0100
1
+ Sun, 03 Apr 2011 21:07:42 +0200
2
+ lib/RNotify.rb Sun, 03 Apr 2011 16:42:10 +0200
3
+ ext/rnotify.c Sun, 03 Apr 2011 21:07:34 +0200
@@ -0,0 +1,52 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
+
9
+ <title>File: rnotify.c [RDoc Documentation]</title>
10
+
11
+ <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="../js/jquery.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="../js/thickbox-compressed.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="../js/quicksearch.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+ <script src="../js/darkfish.js" type="text/javascript"
20
+ charset="utf-8"></script>
21
+ </head>
22
+
23
+ <body class="file file-popup">
24
+ <div id="metadata">
25
+ <dl>
26
+ <dt class="modified-date">Last Modified</dt>
27
+ <dd class="modified-date">2011-04-03 21:07:34 +0200</dd>
28
+
29
+
30
+ <dt class="requires">Requires</dt>
31
+ <dd class="requires">
32
+ <ul>
33
+
34
+ </ul>
35
+ </dd>
36
+
37
+
38
+
39
+ </dl>
40
+ </div>
41
+
42
+ <div id="documentation">
43
+
44
+ <div class="description">
45
+ <h2>Description</h2>
46
+
47
+ </div>
48
+
49
+ </div>
50
+ </body>
51
+ </html>
52
+
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file