[gtk/matthiasc/for-master: 22/22] Remove GdkGeometry from public API
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 22/22] Remove GdkGeometry from public API
- Date: Sun, 19 Apr 2020 02:52:27 +0000 (UTC)
commit 67fb23a751a16f9b716867cc2b86da76d8dba6b9
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Apr 18 22:48:02 2020 -0400
Remove GdkGeometry from public API
The api to configure surfaces is now GdkToplevelLayout
and GdkPopupLayout. Unfortunately, there's still quite
a bit of internal use of GdkGeometry that will take some
time to clean up, so move it go gdkinternals.h for now.
docs/reference/gdk/gdk4-sections.txt | 3 ---
gdk/broadway/gdksurface-broadway.h | 1 +
gdk/gdkinternals.h | 45 +++++++++++++++++++++++++++++++++++
gdk/gdksurface.h | 46 ------------------------------------
gdk/x11/gdksurface-x11.h | 1 +
5 files changed, 47 insertions(+), 49 deletions(-)
---
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index e4e0689cdb..12128deb49 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -171,8 +171,6 @@ gdk_rgba_get_type
<TITLE>GdkSurface</TITLE>
<FILE>gdksurface</FILE>
GdkSurface
-GdkSurfaceHints
-GdkGeometry
GdkGravity
GdkSurfaceEdge
GdkSurfaceTypeHint
@@ -190,7 +188,6 @@ gdk_surface_get_height
gdk_surface_translate_coordinates
gdk_surface_begin_resize_drag
gdk_surface_begin_move_drag
-gdk_surface_constrain_size
gdk_surface_beep
gdk_surface_get_scale_factor
gdk_surface_set_opaque_region
diff --git a/gdk/broadway/gdksurface-broadway.h b/gdk/broadway/gdksurface-broadway.h
index 33ef70eb03..0ca144fc80 100644
--- a/gdk/broadway/gdksurface-broadway.h
+++ b/gdk/broadway/gdksurface-broadway.h
@@ -27,6 +27,7 @@
#include <gdk/gdksurfaceprivate.h>
#include "gdkbroadwaysurface.h"
+#include "gdkinternals.h"
G_BEGIN_DECLS
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 096b89aec5..0db0f633a5 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -301,6 +301,51 @@ void gdk_surface_get_geometry (GdkSurface *surface,
GdkGLContext *gdk_surface_get_shared_data_gl_context (GdkSurface *surface);
+/* Size restriction enumeration.
+ */
+/**
+ * GdkSurfaceHints:
+ * @GDK_HINT_POS: indicates that the program has positioned the surface
+ * @GDK_HINT_MIN_SIZE: min size fields are set
+ * @GDK_HINT_MAX_SIZE: max size fields are set
+ * @GDK_HINT_BASE_SIZE: base size fields are set
+ * @GDK_HINT_ASPECT: aspect ratio fields are set
+ * @GDK_HINT_RESIZE_INC: resize increment fields are set
+ * @GDK_HINT_WIN_GRAVITY: surface gravity field is set
+ * @GDK_HINT_USER_POS: indicates that the surface’s position was explicitly set
+ * by the user
+ * @GDK_HINT_USER_SIZE: indicates that the surface’s size was explicitly set by
+ * the user
+ *
+ * Used to indicate which fields of a #GdkGeometry struct should be paid
+ * attention to. Also, the presence/absence of @GDK_HINT_POS,
+ * @GDK_HINT_USER_POS, and @GDK_HINT_USER_SIZE is significant, though they don't
+ * directly refer to #GdkGeometry fields. @GDK_HINT_USER_POS will be set
+ * automatically by #GtkWindow if you call gtk_window_move().
+ * @GDK_HINT_USER_POS and @GDK_HINT_USER_SIZE should be set if the user
+ * specified a size/position using a --geometry command-line argument;
+ * gtk_window_parse_geometry() automatically sets these flags.
+ */
+typedef enum
+{
+ GDK_HINT_POS = 1 << 0,
+ GDK_HINT_MIN_SIZE = 1 << 1,
+ GDK_HINT_MAX_SIZE = 1 << 2,
+ GDK_HINT_BASE_SIZE = 1 << 3,
+ GDK_HINT_ASPECT = 1 << 4,
+ GDK_HINT_RESIZE_INC = 1 << 5,
+ GDK_HINT_WIN_GRAVITY = 1 << 6,
+ GDK_HINT_USER_POS = 1 << 7,
+ GDK_HINT_USER_SIZE = 1 << 8
+} GdkSurfaceHints;
+
+GDK_AVAILABLE_IN_ALL
+void gdk_surface_constrain_size (GdkGeometry *geometry,
+ GdkSurfaceHints flags,
+ gint width,
+ gint height,
+ gint *new_width,
+ gint *new_height);
/*
* GdkSeatGrabPrepareFunc:
diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h
index cd11aa368f..f299fbb3de 100644
--- a/gdk/gdksurface.h
+++ b/gdk/gdksurface.h
@@ -38,44 +38,6 @@
G_BEGIN_DECLS
-/* Size restriction enumeration.
- */
-/**
- * GdkSurfaceHints:
- * @GDK_HINT_POS: indicates that the program has positioned the surface
- * @GDK_HINT_MIN_SIZE: min size fields are set
- * @GDK_HINT_MAX_SIZE: max size fields are set
- * @GDK_HINT_BASE_SIZE: base size fields are set
- * @GDK_HINT_ASPECT: aspect ratio fields are set
- * @GDK_HINT_RESIZE_INC: resize increment fields are set
- * @GDK_HINT_WIN_GRAVITY: surface gravity field is set
- * @GDK_HINT_USER_POS: indicates that the surface’s position was explicitly set
- * by the user
- * @GDK_HINT_USER_SIZE: indicates that the surface’s size was explicitly set by
- * the user
- *
- * Used to indicate which fields of a #GdkGeometry struct should be paid
- * attention to. Also, the presence/absence of @GDK_HINT_POS,
- * @GDK_HINT_USER_POS, and @GDK_HINT_USER_SIZE is significant, though they don't
- * directly refer to #GdkGeometry fields. @GDK_HINT_USER_POS will be set
- * automatically by #GtkWindow if you call gtk_window_move().
- * @GDK_HINT_USER_POS and @GDK_HINT_USER_SIZE should be set if the user
- * specified a size/position using a --geometry command-line argument;
- * gtk_window_parse_geometry() automatically sets these flags.
- */
-typedef enum
-{
- GDK_HINT_POS = 1 << 0,
- GDK_HINT_MIN_SIZE = 1 << 1,
- GDK_HINT_MAX_SIZE = 1 << 2,
- GDK_HINT_BASE_SIZE = 1 << 3,
- GDK_HINT_ASPECT = 1 << 4,
- GDK_HINT_RESIZE_INC = 1 << 5,
- GDK_HINT_WIN_GRAVITY = 1 << 6,
- GDK_HINT_USER_POS = 1 << 7,
- GDK_HINT_USER_SIZE = 1 << 8
-} GdkSurfaceHints;
-
/**
* GdkSurfaceEdge:
* @GDK_SURFACE_EDGE_NORTH_WEST: the top left corner.
@@ -362,14 +324,6 @@ void gdk_surface_freeze_updates (GdkSurface *surface);
GDK_AVAILABLE_IN_ALL
void gdk_surface_thaw_updates (GdkSurface *surface);
-GDK_AVAILABLE_IN_ALL
-void gdk_surface_constrain_size (GdkGeometry *geometry,
- GdkSurfaceHints flags,
- gint width,
- gint height,
- gint *new_width,
- gint *new_height);
-
GDK_AVAILABLE_IN_ALL
void gdk_surface_set_support_multidevice (GdkSurface *surface,
gboolean support_multidevice);
diff --git a/gdk/x11/gdksurface-x11.h b/gdk/x11/gdksurface-x11.h
index 53abd500e5..13f74f66a4 100644
--- a/gdk/x11/gdksurface-x11.h
+++ b/gdk/x11/gdksurface-x11.h
@@ -27,6 +27,7 @@
#include "gdksurfaceprivate.h"
#include "gdkx11surface.h"
+#include "gdkinternals.h"
#include <X11/Xlib.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]