[gtk+/wip/gmenu: 56/87] GtkApplicationMenuButton: add docs
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/gmenu: 56/87] GtkApplicationMenuButton: add docs
- Date: Sat, 3 Dec 2011 23:52:51 +0000 (UTC)
commit d81ec9de05b09f760010724e5ece7cbc4d13eaba
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Dec 1 08:33:08 2011 -0500
GtkApplicationMenuButton: add docs
gtk/gtkapplicationmenubutton.c | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkapplicationmenubutton.c b/gtk/gtkapplicationmenubutton.c
index cdfdbfd..2ce75d0 100644
--- a/gtk/gtkapplicationmenubutton.c
+++ b/gtk/gtkapplicationmenubutton.c
@@ -29,6 +29,26 @@
#include <string.h>
+/**
+ * SECTION:gtkapplicationmenubutton
+ * @title: GtkApplicationMenuButton
+ * @short_description: A button that shows the application menu
+ *
+ * A GtkApplicationMenuButton can be added to a #GtkApplicationWindow
+ * as an alternative way to present the application menu, if it is
+ * not shown by the desktop environment. GtkApplicationMenuButton
+ * automatically hides itself, and only appears when necessary. It
+ * is derived from #GtkButton, and you should use regular #GtkButton
+ * API to add a suitable icon or label. Note that #GtkApplicationWindow
+ * already provides a way to present the application menu, so a
+ * #GtkApplicationMenuButton is only needed if the default
+ * appearance (as part of a menubar) is not suitable.
+ *
+ * To configure the contents of the application menu, use
+ * g_application_set_menu() and g_application_set_action_group() on
+ * the #GtkApplication associated with the #GtkApplicationWindow.
+ */
+
struct _GtkApplicationMenuButton
{
GtkButton parent_instance;
@@ -202,6 +222,15 @@ gtk_application_menu_button_class_init (GtkApplicationMenuButtonClass *class)
object_class->finalize = gtk_application_menu_button_finalize;
}
+/**
+ * gtk_application_menu_button_new:
+ *
+ * Creates a new #GtkApplicationMenuButton.
+ *
+ * Returns: a newly created #GtkApplicationMenuButton
+ *
+ * Since: 3.4
+ */
GtkWidget *
gtk_application_menu_button_new (void)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]