diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-04-18 22:48:02 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-04-19 10:41:18 -0400 |
commit | 3c987f073e4fb4c9fffb96118724f3c0d2d2e782 (patch) | |
tree | f014d661e5e19d6ba9a219da758ae38beb700f65 /gdk | |
parent | ef832fd770c47904d859af2927de4769021f8075 (diff) | |
download | gtk+-3c987f073e4fb4c9fffb96118724f3c0d2d2e782.tar.gz |
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.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/broadway/gdksurface-broadway.h | 1 | ||||
-rw-r--r-- | gdk/gdkinternals.h | 45 | ||||
-rw-r--r-- | gdk/gdksurface.h | 46 | ||||
-rw-r--r-- | gdk/x11/gdksurface-x11.h | 1 |
4 files changed, 47 insertions, 46 deletions
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. @@ -363,14 +325,6 @@ 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); GDK_AVAILABLE_IN_ALL 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> |