[gtk/public-emojichooser] emojichooser: Make public



commit ef7172dc1ee86acb5ed686d16cea6c8bc3cad63a
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Feb 3 12:49:36 2020 +0100

    emojichooser: Make public
    
    This is a useful widget to have, and it has minimal api.
    
    Not having it public forces apps to recreate a lot of
    complicated machinery for not good reason, if they need
    an Emoji chooser in a different context.

 docs/reference/gtk/gtk4-docs.xml     |  1 +
 docs/reference/gtk/gtk4-sections.txt | 17 +++++++++++++++++
 docs/reference/gtk/gtk4.types.in     |  1 +
 gtk/gtk.h                            |  1 +
 gtk/gtkemojichooser.c                | 27 +++++++++++++++++++++++++++
 5 files changed, 47 insertions(+)
---
diff --git a/docs/reference/gtk/gtk4-docs.xml b/docs/reference/gtk/gtk4-docs.xml
index a85bbd80e4..b2afad8d64 100644
--- a/docs/reference/gtk/gtk4-docs.xml
+++ b/docs/reference/gtk/gtk4-docs.xml
@@ -246,6 +246,7 @@
       <xi:include href="xml/gtkfontbutton.xml" />
       <xi:include href="xml/gtkfontchooserwidget.xml" />
       <xi:include href="xml/gtkfontchooserdialog.xml" />
+      <xi:include href="xml/gtkemojichooser.xml" />
     </chapter>
 
     <chapter id="DrawingWidgets">
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 723e620a6e..445f0c287a 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -7147,3 +7147,20 @@ GTK_DRAG_ICON_GET_CLASS
 <SUBSECTION Private>
 gtk_drag_icon_get_type
 </SECTION>
+
+<SECTION>
+<FILE>gtkemojichooser</FILE>
+GtkEmojiChooser
+gtk_emoji_chooser_new
+
+<SUBSECTION Standard>
+GTK_TYPE_EMOJI_CHOOSER
+GTK_EMOJI_CHOOSER
+GTK_EMOJI_CHOOSER_CLASS
+GTK_IS_EMOJI_CHOOSER
+GTK_IS_EMOJI_CHOOSER_CLASS
+GTK_EMOJI_CHOOSER_GET_CLASS
+
+<SUBSECTION Private>
+gtk_emoji_chooser_get_type
+</SECTION>
diff --git a/docs/reference/gtk/gtk4.types.in b/docs/reference/gtk/gtk4.types.in
index 60d8712f97..19f4569d5b 100644
--- a/docs/reference/gtk/gtk4.types.in
+++ b/docs/reference/gtk/gtk4.types.in
@@ -62,6 +62,7 @@ gtk_drag_source_get_type
 gtk_drawing_area_get_type
 gtk_drop_target_get_type
 gtk_editable_get_type
+gtk_emoji_chooser_get_type
 gtk_entry_buffer_get_type
 gtk_entry_completion_get_type
 gtk_entry_get_type
diff --git a/gtk/gtk.h b/gtk/gtk.h
index 8205a19622..53bf22169b 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -95,6 +95,7 @@
 #include <gtk/gtkdragsource.h>
 #include <gtk/gtkdrawingarea.h>
 #include <gtk/gtkeditable.h>
+#include <gtk/gtkemojichooser.h>
 #include <gtk/gtkentry.h>
 #include <gtk/gtkentrybuffer.h>
 #include <gtk/gtkentrycompletion.h>
diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c
index 9865ce8aeb..9703fb91a5 100644
--- a/gtk/gtkemojichooser.c
+++ b/gtk/gtkemojichooser.c
@@ -36,6 +36,18 @@
 #include "gtkstylecontext.h"
 #include "gtktext.h"
 
+/**
+ * SECTION:emojichooser
+ * @Title: GtkEmojiChooser
+ * @Short_description: A popover to choose an Emoji character
+ *
+ * The #GtkEmojiChooser popover is used by text widgets such as #GtkEntry or
+ * #GtkTextView to offer users a convenient way to insert Emoji characters.
+ *
+ * GtkEmojiChooser emits the #GtkEmojiChooser:emoji-picked signal when an
+ * Emoji is selected.
+ */
+
 #define BOX_SPACE 6
 
 typedef struct {
@@ -711,6 +723,14 @@ gtk_emoji_chooser_class_init (GtkEmojiChooserClass *klass)
   object_class->finalize = gtk_emoji_chooser_finalize;
   widget_class->show = gtk_emoji_chooser_show;
 
+  /**
+   * GtkEmojiChooser::emoji-picked:
+   * @chooser: the #GtkEmojiChooser
+   * @text: the Unicode sequence for the picked Emoji, in UTF-8
+   *
+   * The ::emoji-picked signal is emitted when the user selects an
+   * Emoji.
+   */
   signals[EMOJI_PICKED] = g_signal_new ("emoji-picked",
                                         G_OBJECT_CLASS_TYPE (object_class),
                                         G_SIGNAL_RUN_LAST,
@@ -771,6 +791,13 @@ gtk_emoji_chooser_class_init (GtkEmojiChooserClass *klass)
   gtk_widget_class_bind_template_callback (widget_class, long_pressed_cb);
 }
 
+/**
+ * gtk_emoji_chooser_new:
+ *
+ * Creates a new #GtkEmojiChooser.
+ *
+ * Returns: a new #GtkEmojiChoser
+ */
 GtkWidget *
 gtk_emoji_chooser_new (void)
 {


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