[gtk: 1/2] Make GtkPasswordEntryBuffer public




commit d8bde48b87817c1a86c42a19ecdbdf93cfa85a6f
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 8 11:25:11 2021 +0000

    Make GtkPasswordEntryBuffer public

 gtk/gtk.h                                                  |  1 +
 gtk/gtkpasswordentry.c                                     |  2 +-
 gtk/gtkpasswordentrybuffer.c                               | 14 ++++++++++++--
 ...sswordentrybufferprivate.h => gtkpasswordentrybuffer.h} |  2 ++
 4 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtk.h b/gtk/gtk.h
index d5f50a86b3..4d5dc5902d 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -191,6 +191,7 @@
 #include <gtk/gtkpaned.h>
 #include <gtk/gtkpapersize.h>
 #include <gtk/gtkpasswordentry.h>
+#include <gtk/gtkpasswordentrybuffer.h>
 #include <gtk/gtkpicture.h>
 #include <gtk/gtkpopover.h>
 #include <gtk/gtkpopovermenu.h>
diff --git a/gtk/gtkpasswordentry.c b/gtk/gtkpasswordentry.c
index 1c11f5cb6a..7e6e470dd7 100644
--- a/gtk/gtkpasswordentry.c
+++ b/gtk/gtkpasswordentry.c
@@ -31,7 +31,7 @@
 #include "gtkimage.h"
 #include "gtkintl.h"
 #include "gtkmarshalers.h"
-#include "gtkpasswordentrybufferprivate.h"
+#include "gtkpasswordentrybuffer.h"
 #include "gtkprivate.h"
 #include "gtkwidgetprivate.h"
 #include "gtkcsspositionvalueprivate.h"
diff --git a/gtk/gtkpasswordentrybuffer.c b/gtk/gtkpasswordentrybuffer.c
index bbb51311c7..4a36d07729 100644
--- a/gtk/gtkpasswordentrybuffer.c
+++ b/gtk/gtkpasswordentrybuffer.c
@@ -21,7 +21,7 @@
 
 #include "config.h"
 
-#include "gtkpasswordentrybufferprivate.h"
+#include "gtkpasswordentrybuffer.h"
 
 #include "gtksecurememoryprivate.h"
 
@@ -30,6 +30,16 @@
 /* Initial size of buffer, in bytes */
 #define MIN_SIZE 16
 
+/**
+ * GtkPasswordEntryBuffer:
+ *
+ * A `GtkEntryBuffer` that locks the underlying memory to prevent it
+ * from being swapped to disk.
+ *
+ * `GtkPasswordEntry` uses a `GtkPasswordEntryBuffer`.
+ *
+ * Since 4.4.
+ */
 struct _GtkPasswordEntryBuffer
 {
   GtkEntryBuffer parent_instance;
@@ -192,7 +202,7 @@ gtk_password_entry_buffer_init (GtkPasswordEntryBuffer *self)
 {
 }
 
-/*< private >
+/**
  * gtk_password_entry_buffer_new:
  *
  * Creates a new `GtkEntryBuffer` using secure memory allocations.
diff --git a/gtk/gtkpasswordentrybufferprivate.h b/gtk/gtkpasswordentrybuffer.h
similarity index 96%
rename from gtk/gtkpasswordentrybufferprivate.h
rename to gtk/gtkpasswordentrybuffer.h
index 2f6f1da2cd..3ca2520d36 100644
--- a/gtk/gtkpasswordentrybufferprivate.h
+++ b/gtk/gtkpasswordentrybuffer.h
@@ -26,8 +26,10 @@ G_BEGIN_DECLS
 
 #define GTK_TYPE_PASSWORD_ENTRY_BUFFER (gtk_password_entry_buffer_get_type())
 
+GDK_AVAILABLE_IN_4_4
 G_DECLARE_FINAL_TYPE (GtkPasswordEntryBuffer, gtk_password_entry_buffer, GTK, PASSWORD_ENTRY_BUFFER, 
GtkEntryBuffer)
 
+GDK_AVAILABLE_IN_4_4
 GtkEntryBuffer *        gtk_password_entry_buffer_new   (void);
 
 G_END_DECLS


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