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.
This commit is contained in:
Matthias Clasen 2020-04-18 22:48:02 -04:00
parent ef832fd770
commit 3c987f073e
5 changed files with 47 additions and 49 deletions

View File

@ -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

View File

@ -27,6 +27,7 @@
#include <gdk/gdksurfaceprivate.h>
#include "gdkbroadwaysurface.h"
#include "gdkinternals.h"
G_BEGIN_DECLS

View File

@ -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 surfaces position was explicitly set
* by the user
* @GDK_HINT_USER_SIZE: indicates that the surfaces 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:

View File

@ -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 surfaces position was explicitly set
* by the user
* @GDK_HINT_USER_SIZE: indicates that the surfaces 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);

View File

@ -27,6 +27,7 @@
#include "gdksurfaceprivate.h"
#include "gdkx11surface.h"
#include "gdkinternals.h"
#include <X11/Xlib.h>