ruby-libnotify 0.4.1.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -0,0 +1,1123 @@
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>Class: Notify::Notification</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="class">
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="../ext/rnotify_c.html?TB_iframe=true&amp;height=550&amp;width=785"
42
+ class="thickbox" title="ext/rnotify.c">ext/rnotify.c</a></li>
43
+
44
+ </ul>
45
+ </div>
46
+ </div>
47
+
48
+
49
+ </div>
50
+
51
+ <div id="class-metadata">
52
+
53
+ <!-- Parent Class -->
54
+
55
+ <div id="parent-class-section" class="section">
56
+ <h3 class="section-header">Parent</h3>
57
+
58
+ <p class="link">Object</p>
59
+
60
+ </div>
61
+
62
+
63
+ <!-- Namespace Contents -->
64
+
65
+
66
+ <!-- Method Quickref -->
67
+
68
+ <div id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+ <ul class="link-list">
71
+
72
+ <li><a href="#method-c-new">::new</a></li>
73
+
74
+ <li><a href="#method-i-add_action">#add_action</a></li>
75
+
76
+ <li><a href="#method-i-category%3D">#category=</a></li>
77
+
78
+ <li><a href="#method-i-clear_actions">#clear_actions</a></li>
79
+
80
+ <li><a href="#method-i-clear_hints">#clear_hints</a></li>
81
+
82
+ <li><a href="#method-i-close">#close</a></li>
83
+
84
+ <li><a href="#method-i-closed_reason">#closed_reason</a></li>
85
+
86
+ <li><a href="#method-i-hint32">#hint32</a></li>
87
+
88
+ <li><a href="#method-i-hint_byte">#hint_byte</a></li>
89
+
90
+ <li><a href="#method-i-hint_double">#hint_double</a></li>
91
+
92
+ <li><a href="#method-i-hint_string">#hint_string</a></li>
93
+
94
+ <li><a href="#method-i-pixbuf_icon%3D">#pixbuf_icon=</a></li>
95
+
96
+ <li><a href="#method-i-show">#show</a></li>
97
+
98
+ <li><a href="#method-i-timeout%3D">#timeout=</a></li>
99
+
100
+ <li><a href="#method-i-update">#update</a></li>
101
+
102
+ <li><a href="#method-i-urgency%3D">#urgency=</a></li>
103
+
104
+ </ul>
105
+ </div>
106
+
107
+
108
+ <!-- Included Modules -->
109
+
110
+ </div>
111
+
112
+ <div id="project-metadata">
113
+
114
+
115
+
116
+ <div id="classindex-section" class="section project-section">
117
+ <h3 class="section-header">Class Index
118
+ <span class="search-toggle"><img src="../images/find.png"
119
+ height="16" width="16" alt="[+]"
120
+ title="show/hide quicksearch" /></span></h3>
121
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
122
+ <fieldset>
123
+ <legend>Quicksearch</legend>
124
+ <input type="text" name="quicksearch" value=""
125
+ class="quicksearch-field" />
126
+ </fieldset>
127
+ </form>
128
+
129
+ <ul class="link-list">
130
+
131
+ <li><a href="../Notify.html">Notify</a></li>
132
+
133
+ <li><a href="../Notify/Notification.html">Notify::Notification</a></li>
134
+
135
+ </ul>
136
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
137
+ </div>
138
+
139
+
140
+ </div>
141
+ </div>
142
+
143
+ <div id="documentation">
144
+ <h1 class="class">Notify::Notification</h1>
145
+
146
+ <div id="description">
147
+
148
+ </div>
149
+
150
+ <!-- Constants -->
151
+
152
+ <div id="constants-list" class="section">
153
+ <h3 class="section-header">Constants</h3>
154
+ <dl>
155
+
156
+ <dt><a name="URGENCY_LOW">URGENCY_LOW</a></dt>
157
+
158
+ <dd class="description"></dd>
159
+
160
+
161
+ <dt><a name="URGENCY_NORMAL">URGENCY_NORMAL</a></dt>
162
+
163
+ <dd class="description"></dd>
164
+
165
+
166
+ <dt><a name="URGENCY_CRITICAL">URGENCY_CRITICAL</a></dt>
167
+
168
+ <dd class="description"></dd>
169
+
170
+
171
+ <dt><a name="EXPIRES_DEFAULT">EXPIRES_DEFAULT</a></dt>
172
+
173
+ <dd class="description"></dd>
174
+
175
+
176
+ <dt><a name="EXPIRES_NEVER">EXPIRES_NEVER</a></dt>
177
+
178
+ <dd class="description"></dd>
179
+
180
+
181
+ </dl>
182
+ </div>
183
+
184
+
185
+ <!-- Attributes -->
186
+
187
+
188
+ <!-- Methods -->
189
+
190
+ <div id="public-class-method-details" class="method-section section">
191
+ <h3 class="section-header">Public Class Methods</h3>
192
+
193
+
194
+ <div id="new-method" class="method-detail ">
195
+ <a name="method-c-new"></a>
196
+
197
+ <div class="method-heading">
198
+
199
+ <span class="method-callseq">new(summ, msg, icon)</span>
200
+ <span class="method-click-advice">click to toggle source</span>
201
+
202
+ </div>
203
+
204
+ <div class="method-description">
205
+
206
+ <p>
207
+ summ = The summary text (required)
208
+ </p>
209
+ <p>
210
+ msg = The body text or nil
211
+ </p>
212
+ <p>
213
+ icon = The icon or nil
214
+ </p>
215
+ <p>
216
+ Creates and returns a new notification, throw an exception on error
217
+ </p>
218
+
219
+
220
+
221
+ <div class="method-source-code"
222
+ id="new-source">
223
+ <pre>
224
+ static VALUE
225
+ _wrap_notification_init(VALUE self, VALUE summ, VALUE msg, VALUE icon)
226
+ {
227
+ char *nsumm = NIL_P(summ) ? NULL : StringValuePtr(summ);
228
+ NotifyNotification *n = NULL;
229
+
230
+ if(nsumm == NULL || *nsumm == '\0')
231
+ rb_raise(rb_eArgError, &quot;You need to supply a valid summary string&quot;);
232
+
233
+ n = notify_notification_new(nsumm,
234
+ NIL_P(msg) ? NULL : StringValuePtr(msg),
235
+ NIL_P(icon) ? NULL : StringValuePtr(icon));
236
+
237
+ if(n == NULL)
238
+ rb_raise(rb_eRuntimeError, &quot;Can not create a new notification&quot;);
239
+
240
+ G_INITIALIZE(self, n);
241
+
242
+ #ifdef DEBUG
243
+ rb_warn(&quot;init, ok&quot;);
244
+ #endif
245
+
246
+ return self;
247
+ }</pre>
248
+ </div>
249
+
250
+ </div>
251
+
252
+
253
+
254
+
255
+ </div>
256
+
257
+
258
+ </div>
259
+
260
+ <div id="public-instance-method-details" class="method-section section">
261
+ <h3 class="section-header">Public Instance Methods</h3>
262
+
263
+
264
+ <div id="add-action-method" class="method-detail ">
265
+ <a name="method-i-add_action"></a>
266
+
267
+ <div class="method-heading">
268
+
269
+ <span class="method-callseq">add_action(action, label, user_data)</span>
270
+ <span class="method-click-advice">click to toggle source</span>
271
+
272
+ </div>
273
+
274
+ <div class="method-description">
275
+
276
+ <p>
277
+ action = The action id
278
+ </p>
279
+ <p>
280
+ label = The action label
281
+ </p>
282
+ <p>
283
+ user_data = Custom data to pass into the block (optional)
284
+ </p>
285
+ <p>
286
+ Adds an action. When the action is invoked, the specified block will be
287
+ called
288
+ </p>
289
+ <p>
290
+ Examples:
291
+ </p>
292
+ <p>
293
+ myinstance.add_action( &#8220;MyAction&#8221;, &#8220;MyLabel&#8221; ) do
294
+ |action|
295
+ </p>
296
+ <pre>
297
+ # something to do
298
+ </pre>
299
+ <p>
300
+ end
301
+ </p>
302
+ <p>
303
+ Or
304
+ </p>
305
+ <p>
306
+ myinstance.add_action( &#8220;MyAction&#8221;, &#8220;MyLabel&#8221;,
307
+ MyData ) do |action, mydata|
308
+ </p>
309
+ <pre>
310
+ # something to do
311
+ </pre>
312
+ <p>
313
+ end
314
+ </p>
315
+
316
+
317
+
318
+ <div class="method-source-code"
319
+ id="add-action-source">
320
+ <pre>
321
+ static VALUE
322
+ _wrap_notification_add_action(int argc, VALUE *argv, VALUE self)
323
+ {
324
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
325
+ VALUE action, label, data, body;
326
+ ActionData *actionData = NULL;
327
+
328
+ #ifdef DEBUG
329
+ if(NOTIFY_IS_NOTIFICATION(n))
330
+ rb_warn(&quot;add_action, ok&quot;);
331
+ else
332
+ rb_warn(&quot;add_action, no ok&quot;);
333
+ #endif
334
+
335
+ if(!rb_block_given_p())
336
+ rb_raise(rb_eRuntimeError, &quot;This method requires a block&quot;);
337
+
338
+ rb_scan_args(argc, argv, &quot;21&amp;&quot;, &amp;action, &amp;label, &amp;data, &amp;body);
339
+
340
+ actionData = g_new0(ActionData, 1);
341
+ actionData-&gt;callback = body;
342
+ actionData-&gt;action = action;
343
+ actionData-&gt;user_data = data;
344
+
345
+ notify_notification_add_action(n,
346
+ NIL_P(action) ? NULL : StringValuePtr(action),
347
+ NIL_P(label) ? NULL : StringValuePtr(label),
348
+ NOTIFY_ACTION_CALLBACK(_notification_action_cb),
349
+ actionData, (GFreeFunc)_notification_action_free);
350
+
351
+ return Qnil;
352
+ }</pre>
353
+ </div>
354
+
355
+ </div>
356
+
357
+
358
+
359
+
360
+ </div>
361
+
362
+
363
+ <div id="category--method" class="method-detail ">
364
+ <a name="method-i-category%3D"></a>
365
+
366
+ <div class="method-heading">
367
+
368
+ <span class="method-callseq">category=(category_name)</span>
369
+ <span class="method-click-advice">click to toggle source</span>
370
+
371
+ </div>
372
+
373
+ <div class="method-description">
374
+
375
+ <p>
376
+ category_name = The category name
377
+ </p>
378
+ <p>
379
+ Sets the category
380
+ </p>
381
+
382
+
383
+
384
+ <div class="method-source-code"
385
+ id="category--source">
386
+ <pre>
387
+ static VALUE
388
+ _wrap_notification_set_category(VALUE self, VALUE cat_name)
389
+ {
390
+ char *cname = NIL_P(cat_name) ? NULL : StringValuePtr(cat_name);
391
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
392
+
393
+ #ifdef DEBUG
394
+ if(NOTIFY_IS_NOTIFICATION(n))
395
+ rb_warn(&quot;set_category, ok&quot;);
396
+ else
397
+ rb_warn(&quot;set_category, not ok&quot;);
398
+ #endif
399
+
400
+ notify_notification_set_category(n, cname);
401
+
402
+ return Qnil;
403
+ }</pre>
404
+ </div>
405
+
406
+ </div>
407
+
408
+
409
+
410
+
411
+ </div>
412
+
413
+
414
+ <div id="clear-actions-method" class="method-detail ">
415
+ <a name="method-i-clear_actions"></a>
416
+
417
+ <div class="method-heading">
418
+
419
+ <span class="method-callseq">clear_actions</span>
420
+ <span class="method-click-advice">click to toggle source</span>
421
+
422
+ </div>
423
+
424
+ <div class="method-description">
425
+
426
+ <p>
427
+ Clears all actions from the notification. Remember to use this method
428
+ before call the <a
429
+ href="Notification.html#method-i-close">Notification#close</a> method.
430
+ </p>
431
+
432
+
433
+
434
+ <div class="method-source-code"
435
+ id="clear-actions-source">
436
+ <pre>
437
+ static VALUE
438
+ _wrap_notification_clear_actions(VALUE self)
439
+ {
440
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
441
+
442
+ #ifdef DEBUG
443
+ if(NOTIFY_IS_NOTIFICATION(n))
444
+ rb_warn(&quot;clear_actions, ok&quot;);
445
+ else
446
+ rb_warn(&quot;clear_actions, no ok&quot;);
447
+ #endif
448
+
449
+ notify_notification_clear_actions(n);
450
+
451
+ return Qnil;
452
+ }</pre>
453
+ </div>
454
+
455
+ </div>
456
+
457
+
458
+
459
+
460
+ </div>
461
+
462
+
463
+ <div id="clear-hints-method" class="method-detail ">
464
+ <a name="method-i-clear_hints"></a>
465
+
466
+ <div class="method-heading">
467
+
468
+ <span class="method-callseq">clear_hints</span>
469
+ <span class="method-click-advice">click to toggle source</span>
470
+
471
+ </div>
472
+
473
+ <div class="method-description">
474
+
475
+ <p>
476
+ Clears all hints from the notification. Remember to use this method before
477
+ call the <a href="Notification.html#method-i-close">Notification#close</a>
478
+ method.
479
+ </p>
480
+
481
+
482
+
483
+ <div class="method-source-code"
484
+ id="clear-hints-source">
485
+ <pre>
486
+ static VALUE
487
+ _wrap_notification_clear_hints(VALUE self)
488
+ {
489
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
490
+
491
+ #ifdef DEBUG
492
+ if(NOTIFY_IS_NOTIFICATION(n))
493
+ rb_warn(&quot;clear_hints, ok&quot;);
494
+ else
495
+ rb_warn(&quot;clear_hints, no ok&quot;);
496
+ #endif
497
+
498
+ notify_notification_clear_hints(n);
499
+
500
+ return Qnil;
501
+ }</pre>
502
+ </div>
503
+
504
+ </div>
505
+
506
+
507
+
508
+
509
+ </div>
510
+
511
+
512
+ <div id="close-method" class="method-detail ">
513
+ <a name="method-i-close"></a>
514
+
515
+ <div class="method-heading">
516
+
517
+ <span class="method-callseq">close</span>
518
+ <span class="method-click-advice">click to toggle source</span>
519
+
520
+ </div>
521
+
522
+ <div class="method-description">
523
+
524
+ <p>
525
+ Tells the notification server to hide the notification on the screen.
526
+ </p>
527
+
528
+
529
+
530
+ <div class="method-source-code"
531
+ id="close-source">
532
+ <pre>
533
+ static VALUE
534
+ _wrap_notification_close(VALUE self)
535
+ {
536
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
537
+
538
+ #ifdef DEBUG
539
+ if(NOTIFY_IS_NOTIFICATION(n))
540
+ rb_warn(&quot;close, ok&quot;);
541
+ else
542
+ rb_warn(&quot;close, no ok&quot;);
543
+ #endif
544
+
545
+ if(notify_notification_close(n, NULL))
546
+ return Qtrue;
547
+
548
+ return Qfalse;
549
+ }</pre>
550
+ </div>
551
+
552
+ </div>
553
+
554
+
555
+
556
+
557
+ </div>
558
+
559
+
560
+ <div id="closed-reason-method" class="method-detail ">
561
+ <a name="method-i-closed_reason"></a>
562
+
563
+ <div class="method-heading">
564
+
565
+ <span class="method-callseq">closed_reason</span>
566
+ <span class="method-click-advice">click to toggle source</span>
567
+
568
+ </div>
569
+
570
+ <div class="method-description">
571
+
572
+ <p>
573
+ Returns the reason code why the notification was closed
574
+ </p>
575
+
576
+
577
+
578
+ <div class="method-source-code"
579
+ id="closed-reason-source">
580
+ <pre>
581
+ static VALUE
582
+ _wrap_notification_get_closed_reason(VALUE self)
583
+ {
584
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
585
+ int reason = -1;
586
+
587
+ #ifdef DEBUG
588
+ if(NOTIFY_IS_NOTIFICATION(n))
589
+ rb_warn(&quot;closed_reason, ok&quot;);
590
+ else
591
+ rb_warn(&quot;closed_reason, no ok&quot;);
592
+ #endif
593
+
594
+ reason = notify_notification_get_closed_reason(n);
595
+
596
+ return INT2FIX(reason);
597
+ }</pre>
598
+ </div>
599
+
600
+ </div>
601
+
602
+
603
+
604
+
605
+ </div>
606
+
607
+
608
+ <div id="hint--method" class="method-detail ">
609
+ <a name="method-i-hint32"></a>
610
+
611
+ <div class="method-heading">
612
+
613
+ <span class="method-callseq">hint32(key, value)</span>
614
+ <span class="method-click-advice">click to toggle source</span>
615
+
616
+ </div>
617
+
618
+ <div class="method-description">
619
+
620
+ <p>
621
+ key = The hint
622
+ </p>
623
+ <p>
624
+ value = The hint&#8217;s value
625
+ </p>
626
+ <p>
627
+ Sets a hint with a 32-bit integer value
628
+ </p>
629
+
630
+
631
+
632
+ <div class="method-source-code"
633
+ id="hint--source">
634
+ <pre>
635
+ static VALUE
636
+ _wrap_notification_set_hint32(VALUE self, VALUE key, VALUE value)
637
+ {
638
+ char *vkey = NIL_P(key) ? NULL : StringValuePtr(key);
639
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
640
+
641
+ #ifdef DEBUG
642
+ if(NOTIFY_IS_NOTIFICATION(n))
643
+ rb_warn(&quot;set_hint32, ok&quot;);
644
+ else
645
+ rb_warn(&quot;set_hint32, no ok&quot;);
646
+ #endif
647
+
648
+ notify_notification_set_hint_int32(n, vkey, FIX2INT(value));
649
+
650
+ return Qnil;
651
+ }</pre>
652
+ </div>
653
+
654
+ </div>
655
+
656
+
657
+
658
+
659
+ </div>
660
+
661
+
662
+ <div id="hint-byte-method" class="method-detail ">
663
+ <a name="method-i-hint_byte"></a>
664
+
665
+ <div class="method-heading">
666
+
667
+ <span class="method-callseq">hint_byte(key, value)</span>
668
+ <span class="method-click-advice">click to toggle source</span>
669
+
670
+ </div>
671
+
672
+ <div class="method-description">
673
+
674
+ <p>
675
+ key = The hint
676
+ </p>
677
+ <p>
678
+ value = The hint&#8217;s value
679
+ </p>
680
+ <p>
681
+ Sets a hint with a byte value
682
+ </p>
683
+
684
+
685
+
686
+ <div class="method-source-code"
687
+ id="hint-byte-source">
688
+ <pre>
689
+ static VALUE
690
+ _wrap_notification_set_hint_byte(VALUE self, VALUE key, VALUE value)
691
+ {
692
+ char *vkey = NIL_P(key) ? NULL : StringValuePtr(key);
693
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
694
+
695
+ #ifdef DEBUG
696
+ if(NOTIFY_IS_NOTIFICATION(n))
697
+ rb_warn(&quot;set_hint_byte, ok&quot;);
698
+ else
699
+ rb_warn(&quot;set_hint_byte, no ok&quot;);
700
+ #endif
701
+
702
+ notify_notification_set_hint_byte(n, vkey, FIX2INT(value));
703
+
704
+ return Qnil;
705
+ }</pre>
706
+ </div>
707
+
708
+ </div>
709
+
710
+
711
+
712
+
713
+ </div>
714
+
715
+
716
+ <div id="hint-double-method" class="method-detail ">
717
+ <a name="method-i-hint_double"></a>
718
+
719
+ <div class="method-heading">
720
+
721
+ <span class="method-callseq">hint_double(key, value)</span>
722
+ <span class="method-click-advice">click to toggle source</span>
723
+
724
+ </div>
725
+
726
+ <div class="method-description">
727
+
728
+ <p>
729
+ key = The hint
730
+ </p>
731
+ <p>
732
+ value = The hint&#8217;s value
733
+ </p>
734
+ <p>
735
+ Sets a hint with a double value
736
+ </p>
737
+
738
+
739
+
740
+ <div class="method-source-code"
741
+ id="hint-double-source">
742
+ <pre>
743
+ static VALUE
744
+ _wrap_notification_set_hint_double(VALUE self, VALUE key, VALUE value)
745
+ {
746
+ char *vkey = NIL_P(key) ? NULL : StringValuePtr(key);
747
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
748
+
749
+ #ifdef DEBUG
750
+ if(NOTIFY_IS_NOTIFICATION(n))
751
+ rb_warn(&quot;set_hint_double, ok&quot;);
752
+ else
753
+ rb_warn(&quot;set_hint_double, no ok&quot;);
754
+ #endif
755
+
756
+ notify_notification_set_hint_double(n, vkey, NUM2DBL(value));
757
+
758
+ return Qnil;
759
+ }</pre>
760
+ </div>
761
+
762
+ </div>
763
+
764
+
765
+
766
+
767
+ </div>
768
+
769
+
770
+ <div id="hint-string-method" class="method-detail ">
771
+ <a name="method-i-hint_string"></a>
772
+
773
+ <div class="method-heading">
774
+
775
+ <span class="method-callseq">hint_string(key, value)</span>
776
+ <span class="method-click-advice">click to toggle source</span>
777
+
778
+ </div>
779
+
780
+ <div class="method-description">
781
+
782
+ <p>
783
+ key = The hint
784
+ </p>
785
+ <p>
786
+ value = The hint&#8217;s value
787
+ </p>
788
+ <p>
789
+ Sets a hint with a string value
790
+ </p>
791
+
792
+
793
+
794
+ <div class="method-source-code"
795
+ id="hint-string-source">
796
+ <pre>
797
+ static VALUE
798
+ _wrap_notification_set_hint_string(VALUE self, VALUE key, VALUE value)
799
+ {
800
+ char *vkey = NIL_P(key) ? NULL : StringValuePtr(key);
801
+ char *vvalue = NIL_P(value) ? NULL : StringValuePtr(value);
802
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
803
+
804
+ #ifdef DEBUG
805
+ if(NOTIFY_IS_NOTIFICATION(n))
806
+ rb_warn(&quot;set_hint_string, ok&quot;);
807
+ else
808
+ rb_warn(&quot;set_hint_string, no ok&quot;);
809
+ #endif
810
+
811
+ notify_notification_set_hint_string(n, vkey, vvalue);
812
+
813
+ return Qnil;
814
+ }</pre>
815
+ </div>
816
+
817
+ </div>
818
+
819
+
820
+
821
+
822
+ </div>
823
+
824
+
825
+ <div id="pixbuf-icon--method" class="method-detail ">
826
+ <a name="method-i-pixbuf_icon%3D"></a>
827
+
828
+ <div class="method-heading">
829
+
830
+ <span class="method-callseq">pixbuf_icon=(icon)</span>
831
+ <span class="method-click-advice">click to toggle source</span>
832
+
833
+ </div>
834
+
835
+ <div class="method-description">
836
+
837
+ <p>
838
+ icon = The icon
839
+ </p>
840
+ <p>
841
+ Sets the icon from a Gdk::Pixbuf
842
+ </p>
843
+
844
+
845
+
846
+ <div class="method-source-code"
847
+ id="pixbuf-icon--source">
848
+ <pre>
849
+ static VALUE
850
+ _wrap_notification_set_pixbuf_icon(VALUE self, VALUE icon)
851
+ {
852
+ GdkPixbuf *pix = GDK_PIXBUF(RVAL2GOBJ(icon));
853
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
854
+
855
+ #ifdef DEBUG
856
+ if(NOTIFY_IS_NOTIFICATION(n) &amp;&amp; GDK_IS_PIXBUF(pix))
857
+ rb_warn(&quot;pixbuf_icon, ok&quot;);
858
+ else
859
+ rb_warn(&quot;pixbuf_icon, no ok&quot;);
860
+ #endif
861
+
862
+ notify_notification_set_image_from_pixbuf(n, pix);
863
+
864
+ return Qnil;
865
+ }</pre>
866
+ </div>
867
+
868
+ </div>
869
+
870
+
871
+
872
+
873
+ </div>
874
+
875
+
876
+ <div id="show-method" class="method-detail ">
877
+ <a name="method-i-show"></a>
878
+
879
+ <div class="method-heading">
880
+
881
+ <span class="method-callseq">show</span>
882
+ <span class="method-click-advice">click to toggle source</span>
883
+
884
+ </div>
885
+
886
+ <div class="method-description">
887
+
888
+ <p>
889
+ Tells the notification server to display the notification on the screen. if
890
+ TRUE returns, show the notification otherwise returns FALSE
891
+ </p>
892
+
893
+
894
+
895
+ <div class="method-source-code"
896
+ id="show-source">
897
+ <pre>
898
+ static VALUE
899
+ _wrap_notification_show(VALUE self)
900
+ {
901
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
902
+
903
+ #ifdef DEBUG
904
+ if(NOTIFY_IS_NOTIFICATION(n))
905
+ rb_warn(&quot;show, ok&quot;);
906
+ else
907
+ rb_warn(&quot;show, no ok&quot;);
908
+ #endif
909
+
910
+ if(notify_notification_show(n, NULL) == TRUE)
911
+ return Qtrue;
912
+
913
+ return Qfalse;
914
+ }</pre>
915
+ </div>
916
+
917
+ </div>
918
+
919
+
920
+
921
+
922
+ </div>
923
+
924
+
925
+ <div id="timeout--method" class="method-detail ">
926
+ <a name="method-i-timeout%3D"></a>
927
+
928
+ <div class="method-heading">
929
+
930
+ <span class="method-callseq">timeout=(milliseconds)</span>
931
+ <span class="method-click-advice">click to toggle source</span>
932
+
933
+ </div>
934
+
935
+ <div class="method-description">
936
+
937
+ <p>
938
+ Sets the timeout in milliseconds.
939
+ </p>
940
+
941
+
942
+
943
+ <div class="method-source-code"
944
+ id="timeout--source">
945
+ <pre>
946
+ static VALUE
947
+ _wrap_notification_set_timeout(VALUE self, VALUE ml)
948
+ {
949
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
950
+
951
+ #ifdef DEBUG
952
+ if(NOTIFY_IS_NOTIFICATION(n))
953
+ rb_warn(&quot;timeout, ok&quot;);
954
+ else
955
+ rb_warn(&quot;timeout, no ok&quot;);
956
+ #endif
957
+
958
+ notify_notification_set_timeout(n, FIX2INT(ml));
959
+
960
+ return Qnil;
961
+ }</pre>
962
+ </div>
963
+
964
+ </div>
965
+
966
+
967
+
968
+
969
+ </div>
970
+
971
+
972
+ <div id="update-method" class="method-detail ">
973
+ <a name="method-i-update"></a>
974
+
975
+ <div class="method-heading">
976
+
977
+ <span class="method-callseq">update(summ, msg, icon)</span>
978
+ <span class="method-click-advice">click to toggle source</span>
979
+
980
+ </div>
981
+
982
+ <div class="method-description">
983
+
984
+ <p>
985
+ summ = The new summary text (required)
986
+ </p>
987
+ <p>
988
+ msg = The new body text or nil
989
+ </p>
990
+ <p>
991
+ icon = The new icon or nil
992
+ </p>
993
+ <p>
994
+ This won&#8217;t send the update out and display it on the screen. For
995
+ that, you will need to call the <a
996
+ href="Notification.html#method-i-show">Notification#show</a> method.
997
+ </p>
998
+ <p>
999
+ Returns TRUE if ok, FALSE otherwise
1000
+ </p>
1001
+
1002
+
1003
+
1004
+ <div class="method-source-code"
1005
+ id="update-source">
1006
+ <pre>
1007
+ static VALUE
1008
+ _wrap_notification_update(VALUE self, VALUE summ, VALUE msg, VALUE icon)
1009
+ {
1010
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
1011
+ char *nsumm = NIL_P(summ) ? NULL : StringValuePtr(summ);
1012
+ char *nmsg = NIL_P(msg) ? NULL : StringValuePtr(msg);
1013
+ char *nicon = NIL_P(icon) ? NULL : StringValuePtr(icon);
1014
+
1015
+ #ifdef DEBUG
1016
+ if(NOTIFY_IS_NOTIFICATION(n))
1017
+ rb_warn(&quot;update, ok&quot;);
1018
+ else
1019
+ rb_warn(&quot;update, no ok&quot;);
1020
+ #endif
1021
+
1022
+ if(nsumm == NULL || *nsumm == '\0')
1023
+ rb_raise(rb_eArgError, &quot;You need to supply a valid summary string&quot;);
1024
+
1025
+ if(notify_notification_update(n, nsumm, nmsg, nicon) == TRUE)
1026
+ return Qtrue;
1027
+
1028
+ return Qfalse;
1029
+ }</pre>
1030
+ </div>
1031
+
1032
+ </div>
1033
+
1034
+
1035
+
1036
+
1037
+ </div>
1038
+
1039
+
1040
+ <div id="urgency--method" class="method-detail ">
1041
+ <a name="method-i-urgency%3D"></a>
1042
+
1043
+ <div class="method-heading">
1044
+
1045
+ <span class="method-callseq">urgency=(urgency_level)</span>
1046
+ <span class="method-click-advice">click to toggle source</span>
1047
+
1048
+ </div>
1049
+
1050
+ <div class="method-description">
1051
+
1052
+ <p>
1053
+ urgency_level = The urgency level
1054
+ </p>
1055
+ <p>
1056
+ Sets the urgency level
1057
+ </p>
1058
+
1059
+
1060
+
1061
+ <div class="method-source-code"
1062
+ id="urgency--source">
1063
+ <pre>
1064
+ static VALUE
1065
+ _wrap_notification_set_urgency(VALUE self, VALUE urgency)
1066
+ {
1067
+ NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
1068
+
1069
+ #ifdef DEBUG
1070
+ if(NOTIFY_IS_NOTIFICATION(n))
1071
+ rb_warn(&quot;set_urgency, ok&quot;);
1072
+ else
1073
+ rb_warn(&quot;set_urgency, no ok&quot;);
1074
+ #endif
1075
+
1076
+ switch(FIX2INT(urgency))
1077
+ {
1078
+ case NOTIFY_URGENCY_LOW:
1079
+ notify_notification_set_urgency(n, NOTIFY_URGENCY_LOW);
1080
+ break;
1081
+ case NOTIFY_URGENCY_NORMAL:
1082
+ notify_notification_set_urgency(n, NOTIFY_URGENCY_NORMAL);
1083
+ break;
1084
+ case NOTIFY_URGENCY_CRITICAL:
1085
+ notify_notification_set_urgency(n, NOTIFY_URGENCY_CRITICAL);
1086
+ break;
1087
+ default:
1088
+ notify_notification_set_urgency(n, NOTIFY_URGENCY_NORMAL);
1089
+ }
1090
+
1091
+ return Qnil;
1092
+ }</pre>
1093
+ </div>
1094
+
1095
+ </div>
1096
+
1097
+
1098
+
1099
+
1100
+ </div>
1101
+
1102
+
1103
+ </div>
1104
+
1105
+
1106
+ </div>
1107
+
1108
+
1109
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
1110
+
1111
+ <p>Disabled; run with --debug to generate this.</p>
1112
+
1113
+ </div>
1114
+
1115
+ <div id="validator-badges">
1116
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
1117
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
1118
+ Rdoc Generator</a> 1.1.6</small>.</p>
1119
+ </div>
1120
+
1121
+ </body>
1122
+ </html>
1123
+