ruby-libnotify 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS.rdoc +4 -0
- data/CHANGELOG.rdoc +55 -0
- data/COPYING +504 -0
- data/README.rdoc +46 -0
- data/doc/classes/Notify.html +343 -0
- data/doc/classes/Notify.src/M000001.html +39 -0
- data/doc/classes/Notify.src/M000002.html +24 -0
- data/doc/classes/Notify.src/M000003.html +25 -0
- data/doc/classes/Notify.src/M000004.html +24 -0
- data/doc/classes/Notify.src/M000005.html +37 -0
- data/doc/classes/Notify.src/M000006.html +55 -0
- data/doc/classes/Notify/Notification.html +787 -0
- data/doc/classes/Notify/Notification.src/M000007.html +65 -0
- data/doc/classes/Notify/Notification.src/M000008.html +49 -0
- data/doc/classes/Notify/Notification.src/M000009.html +43 -0
- data/doc/classes/Notify/Notification.src/M000010.html +35 -0
- data/doc/classes/Notify/Notification.src/M000011.html +33 -0
- data/doc/classes/Notify/Notification.src/M000012.html +36 -0
- data/doc/classes/Notify/Notification.src/M000013.html +48 -0
- data/doc/classes/Notify/Notification.src/M000014.html +36 -0
- data/doc/classes/Notify/Notification.src/M000015.html +38 -0
- data/doc/classes/Notify/Notification.src/M000016.html +38 -0
- data/doc/classes/Notify/Notification.src/M000017.html +39 -0
- data/doc/classes/Notify/Notification.src/M000018.html +38 -0
- data/doc/classes/Notify/Notification.src/M000019.html +45 -0
- data/doc/classes/Notify/Notification.src/M000020.html +67 -0
- data/doc/classes/Notify/Notification.src/M000021.html +33 -0
- data/doc/classes/Notify/Notification.src/M000022.html +33 -0
- data/doc/classes/Notify/Notification.src/M000023.html +36 -0
- data/doc/classes/Notify/Notification.src/M000024.html +34 -0
- data/doc/created.rid +1 -0
- data/doc/files/lib/RNotify_rb.html +102 -0
- data/doc/files/rnotify_c.html +90 -0
- data/doc/fr_class_index.html +27 -0
- data/doc/fr_file_index.html +27 -0
- data/doc/fr_method_index.html +71 -0
- data/doc/index.html +21 -0
- data/doc/rdoc-style.css +299 -0
- data/examples/action.rb +39 -0
- data/examples/attach_to.rb +43 -0
- data/examples/attach_to_status_icon.rb +47 -0
- data/examples/base.rb +29 -0
- data/examples/geometry-hints.rb +37 -0
- data/examples/icon.png +0 -0
- data/examples/info.rb +27 -0
- data/examples/markup.rb +29 -0
- data/examples/multi-actions.rb +44 -0
- data/examples/update.rb +36 -0
- data/examples/urgency.rb +47 -0
- data/examples/xy.rb +32 -0
- data/ext/extconf.rb +67 -0
- data/ext/rnotify.c +814 -0
- data/lib/RNotify.rb +15 -0
- data/setup.rb +1333 -0
- metadata +120 -0
data/README.rdoc
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
= ruby-libnotify
|
2
|
+
|
3
|
+
ruby-libnotify is a ruby binding for libnotify (http://www.galago-project.org)
|
4
|
+
|
5
|
+
== Requirements
|
6
|
+
|
7
|
+
* Ruby >= 1.8.6 (not tested with previous versions)
|
8
|
+
* libnotify >= 0.4.1 (not tested with previous versions)
|
9
|
+
* ruby-gtk2 and its dependencies
|
10
|
+
|
11
|
+
== Install
|
12
|
+
|
13
|
+
* ruby setup.rb config
|
14
|
+
* ruby setup.rb setup
|
15
|
+
* ruby setup.rb install (as root)
|
16
|
+
|
17
|
+
OR
|
18
|
+
|
19
|
+
* gem install ruby-libnotify
|
20
|
+
|
21
|
+
== API Documentation
|
22
|
+
|
23
|
+
Visit the page http://ruby-libnotify.rubyforge.org
|
24
|
+
|
25
|
+
== Bug Report
|
26
|
+
|
27
|
+
Use this page http://github.com/vargolo/ruby-libnotify/issues
|
28
|
+
|
29
|
+
OR
|
30
|
+
|
31
|
+
send me an email (see AUTHORS.rdoc)
|
32
|
+
|
33
|
+
*IMPORTANT*: the subject of the email MUST contain 'ruby-libnotify' otherwise will be ignored
|
34
|
+
|
35
|
+
== Thanks to
|
36
|
+
|
37
|
+
* Jan Losinski (bugs report)
|
38
|
+
|
39
|
+
== License
|
40
|
+
|
41
|
+
ruby-libnotify is released under the terms of the LGPL license
|
42
|
+
|
43
|
+
== Authors
|
44
|
+
|
45
|
+
(c) Luca Russo 2006 - 2010
|
46
|
+
|
@@ -0,0 +1,343 @@
|
|
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>Module: Notify [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="classHeader">
|
46
|
+
<table class="header-table">
|
47
|
+
<tr class="top-aligned-row">
|
48
|
+
<td><strong>Module</strong></td>
|
49
|
+
<td class="class-name-in-header">Notify</td>
|
50
|
+
</tr>
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>In:</strong></td>
|
53
|
+
<td>
|
54
|
+
|
55
|
+
|
56
|
+
<a href="../files/lib/RNotify_rb.html">
|
57
|
+
|
58
|
+
lib/RNotify.rb
|
59
|
+
|
60
|
+
</a>
|
61
|
+
|
62
|
+
|
63
|
+
<br />
|
64
|
+
|
65
|
+
|
66
|
+
<a href="../files/rnotify_c.html">
|
67
|
+
|
68
|
+
rnotify.c
|
69
|
+
|
70
|
+
</a>
|
71
|
+
|
72
|
+
|
73
|
+
<br />
|
74
|
+
|
75
|
+
</td>
|
76
|
+
</tr>
|
77
|
+
|
78
|
+
|
79
|
+
</table>
|
80
|
+
</div>
|
81
|
+
<!-- banner header -->
|
82
|
+
|
83
|
+
<div id="bodyContent">
|
84
|
+
|
85
|
+
<div id="contextContent">
|
86
|
+
|
87
|
+
<div id="description">
|
88
|
+
<p>
|
89
|
+
libnotify ruby interface [ <a
|
90
|
+
href="http://www.galago-project.org">www.galago-project.org</a> ]
|
91
|
+
</p>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
</div>
|
96
|
+
|
97
|
+
|
98
|
+
<div id="method-list">
|
99
|
+
<h3 class="section-bar">Methods</h3>
|
100
|
+
|
101
|
+
<div class="name-list">
|
102
|
+
|
103
|
+
<a href="#M000004">app_name</a>
|
104
|
+
|
105
|
+
<a href="#M000001">init</a>
|
106
|
+
|
107
|
+
<a href="#M000003">init?</a>
|
108
|
+
|
109
|
+
<a href="#M000005">server_caps</a>
|
110
|
+
|
111
|
+
<a href="#M000006">server_info</a>
|
112
|
+
|
113
|
+
<a href="#M000002">uninit</a>
|
114
|
+
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
|
118
|
+
</div>
|
119
|
+
|
120
|
+
<!-- if includes -->
|
121
|
+
|
122
|
+
<div id="section">
|
123
|
+
|
124
|
+
<div id="class-list">
|
125
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
126
|
+
|
127
|
+
Class <a href="Notify/Notification.html" class="link">Notify::Notification</a><br />
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
<div id="constants-list">
|
132
|
+
<h3 class="section-bar">Constants</h3>
|
133
|
+
|
134
|
+
<div class="name-list">
|
135
|
+
<table summary="Constants">
|
136
|
+
|
137
|
+
<tr class="top-aligned-row context-row">
|
138
|
+
<td class="context-item-name">VERSION</td>
|
139
|
+
<td>=</td>
|
140
|
+
<td class="context-item-value">"0.4.1"</td>
|
141
|
+
|
142
|
+
</tr>
|
143
|
+
|
144
|
+
</table>
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
<!-- if method_list -->
|
152
|
+
|
153
|
+
<div id="methods">
|
154
|
+
|
155
|
+
<h3 class="section-bar">Public Class methods</h3>
|
156
|
+
|
157
|
+
|
158
|
+
<div id="method-M000004" class="method-detail">
|
159
|
+
<a name="M000004"></a>
|
160
|
+
|
161
|
+
<div class="method-heading">
|
162
|
+
|
163
|
+
<a href="Notify.src/M000004.html" target="Code" class="method-signature"
|
164
|
+
onclick="popupCode('Notify.src/M000004.html');return false;">
|
165
|
+
|
166
|
+
<span class="method-name">app_name<br />
|
167
|
+
</span>
|
168
|
+
|
169
|
+
</a>
|
170
|
+
|
171
|
+
</div>
|
172
|
+
|
173
|
+
<div class="method-description">
|
174
|
+
|
175
|
+
<p>
|
176
|
+
Returns the application name passed to <a
|
177
|
+
href="Notify.html#M000001">Notify.init</a>
|
178
|
+
</p>
|
179
|
+
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
|
183
|
+
|
184
|
+
<div id="method-M000001" class="method-detail">
|
185
|
+
<a name="M000001"></a>
|
186
|
+
|
187
|
+
<div class="method-heading">
|
188
|
+
|
189
|
+
<a href="Notify.src/M000001.html" target="Code" class="method-signature"
|
190
|
+
onclick="popupCode('Notify.src/M000001.html');return false;">
|
191
|
+
|
192
|
+
<span class="method-name">init(name)<br />
|
193
|
+
</span>
|
194
|
+
|
195
|
+
</a>
|
196
|
+
|
197
|
+
</div>
|
198
|
+
|
199
|
+
<div class="method-description">
|
200
|
+
|
201
|
+
<p>
|
202
|
+
name = application name (required)
|
203
|
+
</p>
|
204
|
+
<p>
|
205
|
+
Initialize libnotify. This must be called before any other functions. Throw
|
206
|
+
an expection If name is empty or nil
|
207
|
+
</p>
|
208
|
+
<p>
|
209
|
+
Returns TRUE if the library initialized properly, FALSE otherwise
|
210
|
+
</p>
|
211
|
+
|
212
|
+
</div>
|
213
|
+
</div>
|
214
|
+
|
215
|
+
|
216
|
+
<div id="method-M000003" class="method-detail">
|
217
|
+
<a name="M000003"></a>
|
218
|
+
|
219
|
+
<div class="method-heading">
|
220
|
+
|
221
|
+
<a href="Notify.src/M000003.html" target="Code" class="method-signature"
|
222
|
+
onclick="popupCode('Notify.src/M000003.html');return false;">
|
223
|
+
|
224
|
+
<span class="method-name">init?<br />
|
225
|
+
</span>
|
226
|
+
|
227
|
+
</a>
|
228
|
+
|
229
|
+
</div>
|
230
|
+
|
231
|
+
<div class="method-description">
|
232
|
+
|
233
|
+
<p>
|
234
|
+
Returns TRUE if libnotify is inizialized, FALSE otherwise
|
235
|
+
</p>
|
236
|
+
|
237
|
+
</div>
|
238
|
+
</div>
|
239
|
+
|
240
|
+
|
241
|
+
<div id="method-M000005" class="method-detail">
|
242
|
+
<a name="M000005"></a>
|
243
|
+
|
244
|
+
<div class="method-heading">
|
245
|
+
|
246
|
+
<a href="Notify.src/M000005.html" target="Code" class="method-signature"
|
247
|
+
onclick="popupCode('Notify.src/M000005.html');return false;">
|
248
|
+
|
249
|
+
<span class="method-name">server_caps<br />
|
250
|
+
</span>
|
251
|
+
|
252
|
+
</a>
|
253
|
+
|
254
|
+
</div>
|
255
|
+
|
256
|
+
<div class="method-description">
|
257
|
+
|
258
|
+
<p>
|
259
|
+
Queries the server for its capabilities and returns them in an Array
|
260
|
+
</p>
|
261
|
+
|
262
|
+
</div>
|
263
|
+
</div>
|
264
|
+
|
265
|
+
|
266
|
+
<div id="method-M000006" class="method-detail">
|
267
|
+
<a name="M000006"></a>
|
268
|
+
|
269
|
+
<div class="method-heading">
|
270
|
+
|
271
|
+
<a href="Notify.src/M000006.html" target="Code" class="method-signature"
|
272
|
+
onclick="popupCode('Notify.src/M000006.html');return false;">
|
273
|
+
|
274
|
+
<span class="method-name">server_info<br />
|
275
|
+
</span>
|
276
|
+
|
277
|
+
</a>
|
278
|
+
|
279
|
+
</div>
|
280
|
+
|
281
|
+
<div class="method-description">
|
282
|
+
|
283
|
+
<p>
|
284
|
+
Queries the server for its information (name, vendor, server version,
|
285
|
+
notification version)
|
286
|
+
</p>
|
287
|
+
<p>
|
288
|
+
Returns FALSE if there were errors, an Hash otherwise
|
289
|
+
</p>
|
290
|
+
<p>
|
291
|
+
example:
|
292
|
+
</p>
|
293
|
+
<pre>
|
294
|
+
h = Notify.server_info
|
295
|
+
p h[:name] #print the product name of the server
|
296
|
+
p h[:vendor] #print the vendor
|
297
|
+
p h[:version] #print the server version
|
298
|
+
p h[:spec_version] #print the specification version supported
|
299
|
+
</pre>
|
300
|
+
|
301
|
+
</div>
|
302
|
+
</div>
|
303
|
+
|
304
|
+
|
305
|
+
<div id="method-M000002" class="method-detail">
|
306
|
+
<a name="M000002"></a>
|
307
|
+
|
308
|
+
<div class="method-heading">
|
309
|
+
|
310
|
+
<a href="Notify.src/M000002.html" target="Code" class="method-signature"
|
311
|
+
onclick="popupCode('Notify.src/M000002.html');return false;">
|
312
|
+
|
313
|
+
<span class="method-name">uninit<br />
|
314
|
+
</span>
|
315
|
+
|
316
|
+
</a>
|
317
|
+
|
318
|
+
</div>
|
319
|
+
|
320
|
+
<div class="method-description">
|
321
|
+
|
322
|
+
<p>
|
323
|
+
Deinitialize libnotify, you must to call this before quit the program
|
324
|
+
</p>
|
325
|
+
|
326
|
+
</div>
|
327
|
+
</div>
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
</div>
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
</div>
|
337
|
+
|
338
|
+
<div id="validator-badges">
|
339
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
340
|
+
</div>
|
341
|
+
|
342
|
+
</body>
|
343
|
+
</html>
|
@@ -0,0 +1,39 @@
|
|
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>init (Notify)</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
|
+
* init(name)
|
13
|
+
*
|
14
|
+
* name = application name (required)
|
15
|
+
*
|
16
|
+
* Initialize libnotify. This must be called before any other functions.
|
17
|
+
* Throw an expection If name is empty or nil
|
18
|
+
*
|
19
|
+
* Returns TRUE if the library initialized properly, FALSE otherwise
|
20
|
+
*/
|
21
|
+
static VALUE
|
22
|
+
_wrap_notify_init(VALUE self, VALUE app_name)
|
23
|
+
{
|
24
|
+
gboolean init;
|
25
|
+
char *name = NIL_P(app_name) ? NULL : StringValuePtr(app_name);
|
26
|
+
|
27
|
+
if(name == NULL || *name == '\0')
|
28
|
+
rb_raise(rb_eRuntimeError,
|
29
|
+
"You MUST call this method with a valid string that will be used as Application name");
|
30
|
+
else
|
31
|
+
init = notify_init(name);
|
32
|
+
|
33
|
+
if(init == TRUE)
|
34
|
+
return Qtrue;
|
35
|
+
|
36
|
+
return Qfalse;
|
37
|
+
}</pre>
|
38
|
+
</body>
|
39
|
+
</html>
|
@@ -0,0 +1,24 @@
|
|
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>uninit (Notify)</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
|
+
* uninit
|
13
|
+
*
|
14
|
+
* Deinitialize libnotify, you must to call this before quit the program
|
15
|
+
*/
|
16
|
+
static VALUE
|
17
|
+
_wrap_notify_uninit(VALUE self)
|
18
|
+
{
|
19
|
+
notify_uninit();
|
20
|
+
|
21
|
+
return Qnil;
|
22
|
+
}</pre>
|
23
|
+
</body>
|
24
|
+
</html>
|