ruby-libnotify 0.4.1
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.
- 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
@@ -0,0 +1,65 @@
|
|
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>new (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
|
+
* new(summ, msg, icon, widget)
|
13
|
+
*
|
14
|
+
* summ = The summary text (required)
|
15
|
+
*
|
16
|
+
* msg = The body text or nil
|
17
|
+
*
|
18
|
+
* icon = The icon or nil
|
19
|
+
*
|
20
|
+
* widget = The widget (or a Gtk::StatusIcon, when compiled against GTK+ >= 2.9.2 and libnotify >= 0.4.1) to attach to or nil
|
21
|
+
*
|
22
|
+
* Creates and returns a new notification, throw an exception on error
|
23
|
+
*/
|
24
|
+
static VALUE
|
25
|
+
_wrap_notification_init(VALUE self, VALUE summ, VALUE msg,
|
26
|
+
VALUE icon, VALUE widget)
|
27
|
+
{
|
28
|
+
GObject *obj = G_OBJECT(RVAL2GOBJ(widget));
|
29
|
+
char *nsumm = NIL_P(summ) ? NULL : StringValuePtr(summ);
|
30
|
+
NotifyNotification *n = NULL;
|
31
|
+
|
32
|
+
if(nsumm == NULL || *nsumm == '\0')
|
33
|
+
rb_raise( rb_eArgError, "REQUIRED: the `summ` field" );
|
34
|
+
|
35
|
+
#ifdef HAVE_STATUS_ICON
|
36
|
+
if(GTK_IS_STATUS_ICON(obj))
|
37
|
+
n = notify_notification_new_with_status_icon(nsumm,
|
38
|
+
NIL_P(msg) ? NULL : StringValuePtr(msg),
|
39
|
+
NIL_P(icon) ? NULL : StringValuePtr(icon),
|
40
|
+
GTK_STATUS_ICON(obj));
|
41
|
+
else
|
42
|
+
n = notify_notification_new(nsumm,
|
43
|
+
NIL_P(msg) ? NULL : StringValuePtr(msg),
|
44
|
+
NIL_P(icon) ? NULL : StringValuePtr(icon),
|
45
|
+
GTK_WIDGET(obj));
|
46
|
+
#else
|
47
|
+
n = notify_notification_new(nsumm,
|
48
|
+
NIL_P(msg) ? NULL : StringValuePtr(msg),
|
49
|
+
NIL_P(icon) ? NULL : StringValuePtr(icon),
|
50
|
+
GTK_WIDGET(obj));
|
51
|
+
#endif
|
52
|
+
|
53
|
+
if(n == NULL)
|
54
|
+
rb_raise(rb_eRuntimeError, "Can not create a new notification");
|
55
|
+
|
56
|
+
G_INITIALIZE(self, n);
|
57
|
+
|
58
|
+
#ifdef DEBUG
|
59
|
+
rb_warn("init, ok");
|
60
|
+
#endif
|
61
|
+
|
62
|
+
return self;
|
63
|
+
}</pre>
|
64
|
+
</body>
|
65
|
+
</html>
|
@@ -0,0 +1,49 @@
|
|
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>update (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
|
+
* update(summ, msg, icon)
|
13
|
+
*
|
14
|
+
* summ = The new summary text (required)
|
15
|
+
*
|
16
|
+
* msg = The new body text or nil
|
17
|
+
*
|
18
|
+
* icon = The new icon or nil
|
19
|
+
*
|
20
|
+
* This won't send the update out and display it on the screen.
|
21
|
+
* For that, you will need to call the Notification#show method.
|
22
|
+
*
|
23
|
+
* Returns TRUE if ok, FALSE otherwise
|
24
|
+
*/
|
25
|
+
static VALUE
|
26
|
+
_wrap_notification_update(VALUE self, VALUE summ, VALUE msg, VALUE icon)
|
27
|
+
{
|
28
|
+
NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
|
29
|
+
char *nsumm = NIL_P(summ) ? NULL : StringValuePtr(summ);
|
30
|
+
char *nmsg = NIL_P(msg) ? NULL : StringValuePtr(msg);
|
31
|
+
char *nicon = NIL_P(icon) ? NULL : StringValuePtr(icon);
|
32
|
+
|
33
|
+
#ifdef DEBUG
|
34
|
+
if(NOTIFY_IS_NOTIFICATION(n))
|
35
|
+
rb_warn("update, ok");
|
36
|
+
else
|
37
|
+
rb_warn("update, no ok");
|
38
|
+
#endif
|
39
|
+
|
40
|
+
if(nsumm == NULL || *nsumm == '\0')
|
41
|
+
rb_raise(rb_eArgError, "REQUIRED: the `summ` field");
|
42
|
+
|
43
|
+
if(notify_notification_update(n, nsumm, nmsg, nicon) == TRUE)
|
44
|
+
return Qtrue;
|
45
|
+
|
46
|
+
return Qfalse;
|
47
|
+
}</pre>
|
48
|
+
</body>
|
49
|
+
</html>
|
@@ -0,0 +1,43 @@
|
|
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>attach_to (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
|
+
* attach_to(widget)
|
13
|
+
*
|
14
|
+
* widget = The widget (or a Gtk::StatusIcon, when compiled against GTK+ >= 2.9.2 and libnotify >= 0.4.1) to attach to
|
15
|
+
*
|
16
|
+
* Attaches the notification to a Gtk::Widget or Gtk::StatusIcon
|
17
|
+
*/
|
18
|
+
static VALUE
|
19
|
+
_wrap_notification_attach_to(VALUE self, VALUE widget)
|
20
|
+
{
|
21
|
+
GObject *obj = G_OBJECT(RVAL2GOBJ(widget));
|
22
|
+
NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
|
23
|
+
|
24
|
+
#ifdef DEBUG
|
25
|
+
if(NOTIFY_IS_NOTIFICATION(n))
|
26
|
+
rb_warn("attach_to, ok");
|
27
|
+
else
|
28
|
+
rb_warn("attach_to, no ok");
|
29
|
+
#endif
|
30
|
+
|
31
|
+
#ifdef HAVE_STATUS_ICON
|
32
|
+
if(GTK_IS_STATUS_ICON(obj))
|
33
|
+
notify_notification_attach_to_status_icon(n, GTK_STATUS_ICON(obj));
|
34
|
+
else
|
35
|
+
notify_notification_attach_to_widget(n, GTK_WIDGET(obj));
|
36
|
+
#else
|
37
|
+
notify_notification_attach_to_widget(n, GTK_WIDGET(obj));
|
38
|
+
#endif
|
39
|
+
|
40
|
+
return Qnil;
|
41
|
+
}</pre>
|
42
|
+
</body>
|
43
|
+
</html>
|
@@ -0,0 +1,35 @@
|
|
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>show (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
|
+
* show
|
13
|
+
*
|
14
|
+
* Tells the notification server to display the notification on the screen.
|
15
|
+
* if TRUE returns, show the notification otherwise returns FALSE
|
16
|
+
*/
|
17
|
+
static VALUE
|
18
|
+
_wrap_notification_show(VALUE self)
|
19
|
+
{
|
20
|
+
NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
|
21
|
+
|
22
|
+
#ifdef DEBUG
|
23
|
+
if(NOTIFY_IS_NOTIFICATION(n))
|
24
|
+
rb_warn("show, ok");
|
25
|
+
else
|
26
|
+
rb_warn("show, no ok");
|
27
|
+
#endif
|
28
|
+
|
29
|
+
if(notify_notification_show(n, NULL) == TRUE)
|
30
|
+
return Qtrue;
|
31
|
+
|
32
|
+
return Qfalse;
|
33
|
+
}</pre>
|
34
|
+
</body>
|
35
|
+
</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>timeout= (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
|
+
* timeout=(milliseconds)
|
13
|
+
*
|
14
|
+
* Sets the timeout in milliseconds.
|
15
|
+
*/
|
16
|
+
static VALUE
|
17
|
+
_wrap_notification_set_timeout(VALUE self, VALUE ml)
|
18
|
+
{
|
19
|
+
NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
|
20
|
+
|
21
|
+
#ifdef DEBUG
|
22
|
+
if(NOTIFY_IS_NOTIFICATION(n))
|
23
|
+
rb_warn("timeout, ok");
|
24
|
+
else
|
25
|
+
rb_warn("timeout, no ok");
|
26
|
+
#endif
|
27
|
+
|
28
|
+
notify_notification_set_timeout(n, FIX2INT(ml));
|
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>category= (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
|
+
* category=(category_name)
|
13
|
+
*
|
14
|
+
* category_name = The category name
|
15
|
+
*
|
16
|
+
* Sets the category
|
17
|
+
*/
|
18
|
+
static VALUE
|
19
|
+
_wrap_notification_set_category(VALUE self, VALUE cat_name)
|
20
|
+
{
|
21
|
+
char *cname = NIL_P(cat_name) ? NULL : StringValuePtr(cat_name);
|
22
|
+
NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
|
23
|
+
|
24
|
+
#ifdef DEBUG
|
25
|
+
if(NOTIFY_IS_NOTIFICATION(n))
|
26
|
+
rb_warn("set_category, ok");
|
27
|
+
else
|
28
|
+
rb_warn("set_category, not ok");
|
29
|
+
#endif
|
30
|
+
|
31
|
+
notify_notification_set_category(n, cname);
|
32
|
+
|
33
|
+
return Qnil;
|
34
|
+
}</pre>
|
35
|
+
</body>
|
36
|
+
</html>
|
@@ -0,0 +1,48 @@
|
|
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>urgency= (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
|
+
* urgency=(urgency_level)
|
13
|
+
*
|
14
|
+
* urgency_level = The urgency level
|
15
|
+
*
|
16
|
+
* Sets the urgency level
|
17
|
+
*/
|
18
|
+
static VALUE
|
19
|
+
_wrap_notification_set_urgency(VALUE self, VALUE urgency)
|
20
|
+
{
|
21
|
+
NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
|
22
|
+
|
23
|
+
#ifdef DEBUG
|
24
|
+
if(NOTIFY_IS_NOTIFICATION(n))
|
25
|
+
rb_warn("set_urgency, ok");
|
26
|
+
else
|
27
|
+
rb_warn("set_urgency, no ok");
|
28
|
+
#endif
|
29
|
+
|
30
|
+
switch(FIX2INT(urgency))
|
31
|
+
{
|
32
|
+
case NOTIFY_URGENCY_LOW:
|
33
|
+
notify_notification_set_urgency(n, NOTIFY_URGENCY_LOW);
|
34
|
+
break;
|
35
|
+
case NOTIFY_URGENCY_NORMAL:
|
36
|
+
notify_notification_set_urgency(n, NOTIFY_URGENCY_NORMAL);
|
37
|
+
break;
|
38
|
+
case NOTIFY_URGENCY_CRITICAL:
|
39
|
+
notify_notification_set_urgency(n, NOTIFY_URGENCY_CRITICAL);
|
40
|
+
break;
|
41
|
+
default:
|
42
|
+
notify_notification_set_urgency(n, NOTIFY_URGENCY_NORMAL);
|
43
|
+
}
|
44
|
+
|
45
|
+
return Qnil;
|
46
|
+
}</pre>
|
47
|
+
</body>
|
48
|
+
</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>pixbuf_icon= (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
|
+
* pixbuf_icon=(icon)
|
13
|
+
*
|
14
|
+
* icon = The icon
|
15
|
+
*
|
16
|
+
* Sets the icon from a Gdk::Pixbuf
|
17
|
+
*/
|
18
|
+
static VALUE
|
19
|
+
_wrap_notification_set_pixbuf_icon(VALUE self, VALUE icon)
|
20
|
+
{
|
21
|
+
GdkPixbuf *pix = GDK_PIXBUF(RVAL2GOBJ(icon));
|
22
|
+
NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
|
23
|
+
|
24
|
+
#ifdef DEBUG
|
25
|
+
if(NOTIFY_IS_NOTIFICATION(n) && GDK_IS_PIXBUF(pix))
|
26
|
+
rb_warn("pixbuf_icon, ok");
|
27
|
+
else
|
28
|
+
rb_warn("pixbuf_icon, no ok");
|
29
|
+
#endif
|
30
|
+
|
31
|
+
notify_notification_set_icon_from_pixbuf(n, pix);
|
32
|
+
|
33
|
+
return Qnil;
|
34
|
+
}</pre>
|
35
|
+
</body>
|
36
|
+
</html>
|
@@ -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>hint32 (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
|
+
* hint32(key, value)
|
13
|
+
*
|
14
|
+
* key = The hint
|
15
|
+
*
|
16
|
+
* value = The hint's value
|
17
|
+
*
|
18
|
+
* Sets a hint with a 32-bit integer value
|
19
|
+
*/
|
20
|
+
static VALUE
|
21
|
+
_wrap_notification_set_hint32(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("set_hint32, ok");
|
29
|
+
else
|
30
|
+
rb_warn("set_hint32, no ok");
|
31
|
+
#endif
|
32
|
+
|
33
|
+
notify_notification_set_hint_int32(n, vkey, FIX2INT(value));
|
34
|
+
|
35
|
+
return Qnil;
|
36
|
+
}</pre>
|
37
|
+
</body>
|
38
|
+
</html>
|
@@ -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_double (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_double(key, value)
|
13
|
+
*
|
14
|
+
* key = The hint
|
15
|
+
*
|
16
|
+
* value = The hint's value
|
17
|
+
*
|
18
|
+
* Sets a hint with a double value
|
19
|
+
*/
|
20
|
+
static VALUE
|
21
|
+
_wrap_notification_set_hint_double(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("set_hint_double, ok");
|
29
|
+
else
|
30
|
+
rb_warn("set_hint_double, no ok");
|
31
|
+
#endif
|
32
|
+
|
33
|
+
notify_notification_set_hint_double(n, vkey, NUM2DBL(value));
|
34
|
+
|
35
|
+
return Qnil;
|
36
|
+
}</pre>
|
37
|
+
</body>
|
38
|
+
</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>hint_string (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_string(key, value)
|
13
|
+
*
|
14
|
+
* key = The hint
|
15
|
+
*
|
16
|
+
* value = The hint's value
|
17
|
+
*
|
18
|
+
* Sets a hint with a string value
|
19
|
+
*/
|
20
|
+
static VALUE
|
21
|
+
_wrap_notification_set_hint_string(VALUE self, VALUE key, VALUE value)
|
22
|
+
{
|
23
|
+
char *vkey = NIL_P(key) ? NULL : StringValuePtr(key);
|
24
|
+
char *vvalue = NIL_P(value) ? NULL : StringValuePtr(value);
|
25
|
+
NotifyNotification *n = NOTIFY_NOTIFICATION(RVAL2GOBJ(self));
|
26
|
+
|
27
|
+
#ifdef DEBUG
|
28
|
+
if(NOTIFY_IS_NOTIFICATION(n))
|
29
|
+
rb_warn("set_hint_string, ok");
|
30
|
+
else
|
31
|
+
rb_warn("set_hint_string, no ok");
|
32
|
+
#endif
|
33
|
+
|
34
|
+
notify_notification_set_hint_string(n, vkey, vvalue);
|
35
|
+
|
36
|
+
return Qnil;
|
37
|
+
}</pre>
|
38
|
+
</body>
|
39
|
+
</html>
|