Sha256: 9a258b6e1b5f8dcaf007991e2d0f8448658dca40fbc842209d871da6e3b3a7c6

Contents?: true

Size: 1.11 KB

Versions: 2

Compression:

Stored size: 1.11 KB

Contents

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>init (Notify)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre>/*
 * call-seq:
 *      init(name)
 *
 * name = application name (required)
 *
 * Initialize libnotify. This must be called before any other functions.
 * Throw an expection If name is empty or nil
 *
 * Returns TRUE if the library initialized properly, FALSE otherwise
 */
static VALUE
_wrap_notify_init(VALUE self, VALUE app_name)
{
  gboolean init;
  char *name = NIL_P(app_name) ? NULL : StringValuePtr(app_name);

  if(name == NULL || *name == '\0')
    rb_raise(rb_eRuntimeError,
             &quot;You MUST call this method with a valid string that will be used as Application name&quot;);
  else
    init = notify_init(name);

  if(init == TRUE)
    return Qtrue;

  return Qfalse;
}</pre>
</body>
</html>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-libnotify-0.4.1.1 doc/classes/Notify.src/M000001.html
ruby-libnotify-0.4.1 doc/classes/Notify.src/M000001.html