changeset 3186:2c55510646c5

Updated #send_key / #send_button to return self instead of nil
author unexist
date Tue, 07 Feb 2012 21:17:42 +0100
parents 9f4cd1a80159
children d5ae3c9ebb57
files src/subtlext/subtlext.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/subtlext/subtlext.c	Mon Feb 06 13:43:28 2012 +0100
+++ b/src/subtlext/subtlext.c	Tue Feb 07 21:17:42 2012 +0100
@@ -539,7 +539,7 @@
 
 /* SubtlextSendButton {{{ */
 /*
- * call-seq: send_click(button, x, y) -> nil
+ * call-seq: send_click(button, x, y) -> Object
  *
  * Emulate a click on a window with optional button
  * and x/y position
@@ -548,7 +548,7 @@
  *  => nil
  *
  *  object.send_button(2)
- *  => nil
+ *  => Object
  */
 
 static VALUE
@@ -598,7 +598,7 @@
   XSendEvent(display, NUM2LONG(win), True, ButtonReleaseMask, &event);
   XFlush(display);
 
-  return Qnil;
+  return self;
 } /* }}} */
 
 #ifdef HAVE_X11_EXTENSIONS_XTEST_H
@@ -643,12 +643,12 @@
 
 /* SubtlextSendKey {{{ */
 /*
- * call-seq: send_key(key, x, y) -> nil
+ * call-seq: send_key(key, x, y) -> Object
  *
  * Emulate a keypress on a window
  *
  *  object.send_key("d")
- *  => nil
+ *  => Object
  */
 
 static VALUE
@@ -750,7 +750,7 @@
   else rb_raise(rb_eArgError, "Unexpected value-type `%s'",
     rb_obj_classname(keys));
 
-  return Qnil;
+  return self;
 } /* }}} */
 
 /* Focus */