[perl-Gtk2] Document Gtk2::Action->new



commit 55c81a5b0ab524f52db6606fb453ad218e7d05d4
Author: Kevin Ryde <user42 zip com au>
Date:   Sun Jul 19 14:18:52 2009 +0200

    Document Gtk2::Action->new
    
    Signed-off-by: Torsten Schönfeld <kaffeetisch gmx de>

 xs/GtkAction.xs |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/xs/GtkAction.xs b/xs/GtkAction.xs
index 01a5a31..0eda38c 100644
--- a/xs/GtkAction.xs
+++ b/xs/GtkAction.xs
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003-2006 by the gtk2-perl team (see the file AUTHORS)
+ * Copyright (c) 2003-2006, 2009 by the gtk2-perl team (see the file AUTHORS)
  *
  * Licensed under the LGPL, see LICENSE file for more information.
  *
@@ -10,6 +10,25 @@
 
 MODULE = Gtk2::Action	PACKAGE = Gtk2::Action	PREFIX = gtk_action_
 
+=for position post_interfaces
+
+=head1 CONSTRUCTOR
+
+=head2 action = Gtk2::Action->B<new> (key=>value,...)
+
+Create and return a new action object.  Note that this is the C<new>
+of L<Glib::Object|Glib::Object>, not C<gtk_action_new>.  Eg.
+
+    Gtk2::Action->new (name => 'open-foo',
+		       stock_id => 'gtk-open',
+		       tooltip => 'Start a foo');
+
+The keyword/value style is more flexible and a little clearer than the
+four direct arguments of C<gtk_action_new> (and also works better for
+subclasses).
+
+=cut
+
 const gchar* gtk_action_get_name (GtkAction *action);
 
 void gtk_action_activate (GtkAction *action);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]