2008-07-01 22:57:50 +00:00
|
|
|
|
/* GDK - The GIMP Drawing Kit
|
2005-07-12 05:09:13 +00:00
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
|
|
|
*
|
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2012-02-27 13:01:10 +00:00
|
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2005-07-12 05:09:13 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
|
|
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
|
|
|
* files for a list of changes. These files are distributed with
|
2008-05-28 14:01:57 +00:00
|
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
2005-07-12 05:09:13 +00:00
|
|
|
|
*/
|
|
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
|
#ifndef __GDK_SURFACE_H__
|
|
|
|
|
#define __GDK_SURFACE_H__
|
2012-12-28 14:57:34 +00:00
|
|
|
|
|
2019-11-27 13:33:43 +00:00
|
|
|
|
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
2008-05-28 14:01:57 +00:00
|
|
|
|
#error "Only <gdk/gdk.h> can be included directly."
|
|
|
|
|
#endif
|
|
|
|
|
|
2012-02-27 12:07:48 +00:00
|
|
|
|
#include <gdk/gdkversionmacros.h>
|
1999-10-01 23:18:30 +00:00
|
|
|
|
#include <gdk/gdktypes.h>
|
1999-11-08 20:14:59 +00:00
|
|
|
|
#include <gdk/gdkevents.h>
|
2012-10-03 22:34:01 +00:00
|
|
|
|
#include <gdk/gdkframeclock.h>
|
2017-11-01 15:52:56 +00:00
|
|
|
|
#include <gdk/gdkmonitor.h>
|
2020-02-16 11:59:24 +00:00
|
|
|
|
#include <gdk/gdkpopuplayout.h>
|
1999-10-01 23:18:30 +00:00
|
|
|
|
|
2005-06-12 05:32:25 +00:00
|
|
|
|
G_BEGIN_DECLS
|
1999-10-01 23:18:30 +00:00
|
|
|
|
|
|
|
|
|
/* Size restriction enumeration.
|
|
|
|
|
*/
|
2010-05-13 02:51:37 +00:00
|
|
|
|
/**
|
2018-03-20 10:40:08 +00:00
|
|
|
|
* GdkSurfaceHints:
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* @GDK_HINT_POS: indicates that the program has positioned the surface
|
2010-05-13 02:51:37 +00:00
|
|
|
|
* @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
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* @GDK_HINT_WIN_GRAVITY: surface gravity field is set
|
|
|
|
|
* @GDK_HINT_USER_POS: indicates that the surface’s position was explicitly set
|
2010-05-13 02:51:37 +00:00
|
|
|
|
* by the user
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* @GDK_HINT_USER_SIZE: indicates that the surface’s size was explicitly set by
|
2010-05-13 02:51:37 +00:00
|
|
|
|
* 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.
|
|
|
|
|
*/
|
1999-10-01 23:18:30 +00:00
|
|
|
|
typedef enum
|
|
|
|
|
{
|
2000-10-04 16:51:42 +00:00
|
|
|
|
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,
|
fix a typo.
2001-08-07 Havoc Pennington <hp@pobox.com>
* gtk/gtkfilesel.c (open_ref_dir): fix a typo.
* gtk/gtkplug.c (gtk_plug_init): remove setting of auto_shrink;
some fixage is needed here, but nothing simple. Owen understands
it. ;-)
* gtk/gtkwindow.h, gtk/gtkwindow.c: Rework code and API for window
sizing and positioning. Also, fix bug in compute_geometry_hints
(width/height confusion for setting min size).
(gtk_window_move): new function
(gtk_window_resize): new function
(gtk_window_get_size): new function
(gtk_window_get_position): new function
(gtk_window_parse_geometry): new function
* gtk/gtkwidget.c (gtk_widget_set_size_request): new function
(gtk_widget_get_size_request): new function
(gtk_widget_get_usize): delete, that was a short-lived function
;-)
(gtk_widget_set_usize): deprecate
(gtk_widget_set_uposition): deprecate, make it a trivial
gtk_window_move() wrapper
(gtk_widget_class_init): remove x/y/width/height properties,
add width_request height_request
* demos/*: update to avoid deprecated functions
* gtk/gtklayout.c: add x/y child properties
* gtk/gtkfixed.c: add x/y child properties, and get rid of
uses of "gint16"
* tests/testgtk.c (create_window_sizing): lots of tweaks to window
sizing test
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Ensure that
configure events on toplevel windows are always in root window
coordinates, following ICCCM spec that all synthetic events
are in root window coords already, while real events are
in parent window coords. Previously the code assumed that
coords of 0,0 were parent window coords, which was
really broken.
* gtk/gtkcontainer.c (gtk_container_get_focus_chain): fix
warning
* gdk/gdkwindow.h (GdkWindowHints): add GDK_HINT_USER_POS
and GDK_HINT_USER_SIZE so we can set USSize and USPosition
hints in gtk_window_parse_geometry()
* gdk/x11/gdkwindow-x11.c (gdk_window_set_geometry_hints): support
new USER_POS USER_SIZE hints
2001-08-10 03:46:08 +00:00
|
|
|
|
GDK_HINT_WIN_GRAVITY = 1 << 6,
|
|
|
|
|
GDK_HINT_USER_POS = 1 << 7,
|
|
|
|
|
GDK_HINT_USER_SIZE = 1 << 8
|
2018-03-20 10:40:08 +00:00
|
|
|
|
} GdkSurfaceHints;
|
1999-10-01 23:18:30 +00:00
|
|
|
|
|
2010-05-13 02:51:37 +00:00
|
|
|
|
/**
|
2018-03-20 10:40:08 +00:00
|
|
|
|
* GdkSurfaceEdge:
|
|
|
|
|
* @GDK_SURFACE_EDGE_NORTH_WEST: the top left corner.
|
|
|
|
|
* @GDK_SURFACE_EDGE_NORTH: the top edge.
|
|
|
|
|
* @GDK_SURFACE_EDGE_NORTH_EAST: the top right corner.
|
|
|
|
|
* @GDK_SURFACE_EDGE_WEST: the left edge.
|
|
|
|
|
* @GDK_SURFACE_EDGE_EAST: the right edge.
|
|
|
|
|
* @GDK_SURFACE_EDGE_SOUTH_WEST: the lower left corner.
|
|
|
|
|
* @GDK_SURFACE_EDGE_SOUTH: the lower edge.
|
|
|
|
|
* @GDK_SURFACE_EDGE_SOUTH_EAST: the lower right corner.
|
2010-05-13 02:51:37 +00:00
|
|
|
|
*
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* Determines a surface edge or corner.
|
2010-05-13 02:51:37 +00:00
|
|
|
|
*/
|
2001-03-29 21:17:45 +00:00
|
|
|
|
typedef enum
|
|
|
|
|
{
|
2018-03-20 10:40:08 +00:00
|
|
|
|
GDK_SURFACE_EDGE_NORTH_WEST,
|
|
|
|
|
GDK_SURFACE_EDGE_NORTH,
|
|
|
|
|
GDK_SURFACE_EDGE_NORTH_EAST,
|
|
|
|
|
GDK_SURFACE_EDGE_WEST,
|
|
|
|
|
GDK_SURFACE_EDGE_EAST,
|
|
|
|
|
GDK_SURFACE_EDGE_SOUTH_WEST,
|
|
|
|
|
GDK_SURFACE_EDGE_SOUTH,
|
2019-05-20 04:11:25 +00:00
|
|
|
|
GDK_SURFACE_EDGE_SOUTH_EAST
|
2018-03-20 10:40:08 +00:00
|
|
|
|
} GdkSurfaceEdge;
|
2001-03-29 21:17:45 +00:00
|
|
|
|
|
2013-01-21 10:49:45 +00:00
|
|
|
|
/**
|
|
|
|
|
* GdkFullscreenMode:
|
|
|
|
|
* @GDK_FULLSCREEN_ON_CURRENT_MONITOR: Fullscreen on current monitor only.
|
|
|
|
|
* @GDK_FULLSCREEN_ON_ALL_MONITORS: Span across all monitors when fullscreen.
|
|
|
|
|
*
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* Indicates which monitor (in a multi-head setup) a surface should span over
|
2013-01-21 10:49:45 +00:00
|
|
|
|
* when in fullscreen mode.
|
|
|
|
|
**/
|
|
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
GDK_FULLSCREEN_ON_CURRENT_MONITOR,
|
|
|
|
|
GDK_FULLSCREEN_ON_ALL_MONITORS
|
|
|
|
|
} GdkFullscreenMode;
|
|
|
|
|
|
2010-05-13 02:51:37 +00:00
|
|
|
|
/**
|
|
|
|
|
* GdkGeometry:
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* @min_width: minimum width of surface (or -1 to use requisition, with
|
2010-05-13 02:51:37 +00:00
|
|
|
|
* #GtkWindow only)
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* @min_height: minimum height of surface (or -1 to use requisition, with
|
2010-05-13 02:51:37 +00:00
|
|
|
|
* #GtkWindow only)
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* @max_width: maximum width of surface (or -1 to use requisition, with
|
2010-05-13 02:51:37 +00:00
|
|
|
|
* #GtkWindow only)
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* @max_height: maximum height of surface (or -1 to use requisition, with
|
2010-05-13 02:51:37 +00:00
|
|
|
|
* #GtkWindow only)
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* @base_width: allowed surface widths are @base_width + @width_inc * N where N
|
2010-05-13 02:51:37 +00:00
|
|
|
|
* is any integer (-1 allowed with #GtkWindow)
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* @base_height: allowed surface widths are @base_height + @height_inc * N where
|
2010-05-13 02:51:37 +00:00
|
|
|
|
* N is any integer (-1 allowed with #GtkWindow)
|
|
|
|
|
* @width_inc: width resize increment
|
|
|
|
|
* @height_inc: height resize increment
|
|
|
|
|
* @min_aspect: minimum width/height ratio
|
|
|
|
|
* @max_aspect: maximum width/height ratio
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* @win_gravity: surface gravity, see gtk_window_set_gravity()
|
2010-05-13 02:51:37 +00:00
|
|
|
|
*
|
|
|
|
|
* The #GdkGeometry struct gives the window manager information about
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* a surface’s geometry constraints. Normally you would set these on
|
2010-05-13 02:51:37 +00:00
|
|
|
|
* the GTK+ level using gtk_window_set_geometry_hints(). #GtkWindow
|
2018-03-20 10:40:08 +00:00
|
|
|
|
* then sets the hints on the #GdkSurface it creates.
|
2010-05-13 02:51:37 +00:00
|
|
|
|
*
|
2018-03-20 10:40:08 +00:00
|
|
|
|
* gdk_surface_set_geometry_hints() expects the hints to be fully valid already
|
2010-05-13 02:51:37 +00:00
|
|
|
|
* and simply passes them to the window manager; in contrast,
|
|
|
|
|
* gtk_window_set_geometry_hints() performs some interpretation. For example,
|
|
|
|
|
* #GtkWindow will apply the hints to the geometry widget instead of the
|
|
|
|
|
* toplevel window, if you set a geometry widget. Also, the
|
|
|
|
|
* @min_width/@min_height/@max_width/@max_height fields may be set to -1, and
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* #GtkWindow will substitute the size request of the surface or geometry widget.
|
2010-05-13 02:51:37 +00:00
|
|
|
|
* If the minimum size hint is not provided, #GtkWindow will use its requisition
|
|
|
|
|
* as the minimum size. If the minimum size is provided and a geometry widget is
|
|
|
|
|
* set, #GtkWindow will take the minimum size as the minimum size of the
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* geometry widget rather than the entire surface. The base size is treated
|
2010-05-13 02:51:37 +00:00
|
|
|
|
* similarly.
|
|
|
|
|
*
|
|
|
|
|
* The canonical use-case for gtk_window_set_geometry_hints() is to get a
|
|
|
|
|
* terminal widget to resize properly. Here, the terminal text area should be
|
|
|
|
|
* the geometry widget; #GtkWindow will then automatically set the base size to
|
|
|
|
|
* the size of other widgets in the terminal window, such as the menubar and
|
|
|
|
|
* scrollbar. Then, the @width_inc and @height_inc fields should be set to the
|
|
|
|
|
* size of one character in the terminal. Finally, the base size should be set
|
|
|
|
|
* to the size of one character. The net effect is that the minimum size of the
|
|
|
|
|
* terminal will have a 1x1 character terminal area, and only terminal sizes on
|
2014-02-05 19:50:22 +00:00
|
|
|
|
* the “character grid” will be allowed.
|
2010-05-13 02:51:37 +00:00
|
|
|
|
*
|
2014-02-07 18:01:26 +00:00
|
|
|
|
* Here’s an example of how the terminal example would be implemented, assuming
|
2014-02-05 19:50:22 +00:00
|
|
|
|
* a terminal area widget called “terminal” and a toplevel window “toplevel”:
|
2010-05-13 02:51:37 +00:00
|
|
|
|
*
|
2014-01-27 19:55:18 +00:00
|
|
|
|
* |[<!-- language="C" -->
|
2010-05-13 02:51:37 +00:00
|
|
|
|
* GdkGeometry hints;
|
|
|
|
|
*
|
|
|
|
|
* hints.base_width = terminal->char_width;
|
|
|
|
|
* hints.base_height = terminal->char_height;
|
|
|
|
|
* hints.min_width = terminal->char_width;
|
|
|
|
|
* hints.min_height = terminal->char_height;
|
|
|
|
|
* hints.width_inc = terminal->char_width;
|
|
|
|
|
* hints.height_inc = terminal->char_height;
|
|
|
|
|
*
|
|
|
|
|
* gtk_window_set_geometry_hints (GTK_WINDOW (toplevel),
|
|
|
|
|
* GTK_WIDGET (terminal),
|
|
|
|
|
* &hints,
|
|
|
|
|
* GDK_HINT_RESIZE_INC |
|
|
|
|
|
* GDK_HINT_MIN_SIZE |
|
|
|
|
|
* GDK_HINT_BASE_SIZE);
|
2014-01-27 17:12:55 +00:00
|
|
|
|
* ]|
|
2010-05-13 02:51:37 +00:00
|
|
|
|
*
|
|
|
|
|
* The other useful fields are the @min_aspect and @max_aspect fields; these
|
|
|
|
|
* contain a width/height ratio as a floating point number. If a geometry widget
|
|
|
|
|
* is set, the aspect applies to the geometry widget rather than the entire
|
|
|
|
|
* window. The most common use of these hints is probably to set @min_aspect and
|
|
|
|
|
* @max_aspect to the same value, thus forcing the window to keep a constant
|
|
|
|
|
* aspect ratio.
|
|
|
|
|
*/
|
2001-04-18 18:28:19 +00:00
|
|
|
|
struct _GdkGeometry
|
|
|
|
|
{
|
1999-10-01 23:18:30 +00:00
|
|
|
|
gint min_width;
|
|
|
|
|
gint min_height;
|
|
|
|
|
gint max_width;
|
|
|
|
|
gint max_height;
|
|
|
|
|
gint base_width;
|
|
|
|
|
gint base_height;
|
|
|
|
|
gint width_inc;
|
|
|
|
|
gint height_inc;
|
|
|
|
|
gdouble min_aspect;
|
|
|
|
|
gdouble max_aspect;
|
2000-10-04 16:51:42 +00:00
|
|
|
|
GdkGravity win_gravity;
|
1999-10-01 23:18:30 +00:00
|
|
|
|
};
|
|
|
|
|
|
2017-12-26 16:47:15 +00:00
|
|
|
|
/**
|
2018-03-20 10:40:08 +00:00
|
|
|
|
* GdkSurfaceState:
|
2019-03-29 15:55:58 +00:00
|
|
|
|
* @GDK_SURFACE_STATE_WITHDRAWN: the surface is not shown
|
2019-11-16 19:50:57 +00:00
|
|
|
|
* @GDK_SURFACE_STATE_MINIMIZED: the surface is minimized
|
2019-03-29 15:55:58 +00:00
|
|
|
|
* @GDK_SURFACE_STATE_MAXIMIZED: the surface is maximized
|
|
|
|
|
* @GDK_SURFACE_STATE_STICKY: the surface is sticky
|
|
|
|
|
* @GDK_SURFACE_STATE_FULLSCREEN: the surface is maximized without decorations
|
|
|
|
|
* @GDK_SURFACE_STATE_ABOVE: the surface is kept above other surfaces
|
|
|
|
|
* @GDK_SURFACE_STATE_BELOW: the surface is kept below other surfaces
|
|
|
|
|
* @GDK_SURFACE_STATE_FOCUSED: the surface is presented as focused (with active decorations)
|
|
|
|
|
* @GDK_SURFACE_STATE_TILED: the surface is in a tiled state
|
2018-06-25 23:21:08 +00:00
|
|
|
|
* @GDK_SURFACE_STATE_TOP_TILED: whether the top edge is tiled
|
|
|
|
|
* @GDK_SURFACE_STATE_TOP_RESIZABLE: whether the top edge is resizable
|
|
|
|
|
* @GDK_SURFACE_STATE_RIGHT_TILED: whether the right edge is tiled
|
|
|
|
|
* @GDK_SURFACE_STATE_RIGHT_RESIZABLE: whether the right edge is resizable
|
|
|
|
|
* @GDK_SURFACE_STATE_BOTTOM_TILED: whether the bottom edge is tiled
|
|
|
|
|
* @GDK_SURFACE_STATE_BOTTOM_RESIZABLE: whether the bottom edge is resizable
|
|
|
|
|
* @GDK_SURFACE_STATE_LEFT_TILED: whether the left edge is tiled
|
|
|
|
|
* @GDK_SURFACE_STATE_LEFT_RESIZABLE: whether the left edge is resizable
|
2017-12-26 16:47:15 +00:00
|
|
|
|
*
|
2018-03-20 14:14:10 +00:00
|
|
|
|
* Specifies the state of a toplevel surface.
|
2019-03-29 15:55:58 +00:00
|
|
|
|
*
|
|
|
|
|
* On platforms that support information about individual edges, the %GDK_SURFACE_STATE_TILED
|
|
|
|
|
* state will be set whenever any of the individual tiled states is set. On platforms
|
|
|
|
|
* that lack that support, the tiled state will give an indication of tiledness without
|
|
|
|
|
* any of the per-edge states being set.
|
2017-12-26 16:47:15 +00:00
|
|
|
|
*/
|
|
|
|
|
typedef enum
|
|
|
|
|
{
|
2018-03-20 10:40:08 +00:00
|
|
|
|
GDK_SURFACE_STATE_WITHDRAWN = 1 << 0,
|
2019-11-16 19:50:57 +00:00
|
|
|
|
GDK_SURFACE_STATE_MINIMIZED = 1 << 1,
|
2018-03-20 10:40:08 +00:00
|
|
|
|
GDK_SURFACE_STATE_MAXIMIZED = 1 << 2,
|
|
|
|
|
GDK_SURFACE_STATE_STICKY = 1 << 3,
|
|
|
|
|
GDK_SURFACE_STATE_FULLSCREEN = 1 << 4,
|
|
|
|
|
GDK_SURFACE_STATE_ABOVE = 1 << 5,
|
|
|
|
|
GDK_SURFACE_STATE_BELOW = 1 << 6,
|
|
|
|
|
GDK_SURFACE_STATE_FOCUSED = 1 << 7,
|
|
|
|
|
GDK_SURFACE_STATE_TILED = 1 << 8,
|
|
|
|
|
GDK_SURFACE_STATE_TOP_TILED = 1 << 9,
|
|
|
|
|
GDK_SURFACE_STATE_TOP_RESIZABLE = 1 << 10,
|
|
|
|
|
GDK_SURFACE_STATE_RIGHT_TILED = 1 << 11,
|
|
|
|
|
GDK_SURFACE_STATE_RIGHT_RESIZABLE = 1 << 12,
|
|
|
|
|
GDK_SURFACE_STATE_BOTTOM_TILED = 1 << 13,
|
|
|
|
|
GDK_SURFACE_STATE_BOTTOM_RESIZABLE = 1 << 14,
|
|
|
|
|
GDK_SURFACE_STATE_LEFT_TILED = 1 << 15,
|
|
|
|
|
GDK_SURFACE_STATE_LEFT_RESIZABLE = 1 << 16
|
|
|
|
|
} GdkSurfaceState;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _GdkSurfaceClass GdkSurfaceClass;
|
|
|
|
|
|
|
|
|
|
#define GDK_TYPE_SURFACE (gdk_surface_get_type ())
|
|
|
|
|
#define GDK_SURFACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_SURFACE, GdkSurface))
|
|
|
|
|
#define GDK_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_SURFACE, GdkSurfaceClass))
|
|
|
|
|
#define GDK_IS_SURFACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_SURFACE))
|
|
|
|
|
#define GDK_IS_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_SURFACE))
|
|
|
|
|
#define GDK_SURFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_SURFACE, GdkSurfaceClass))
|
|
|
|
|
|
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 10:40:08 +00:00
|
|
|
|
GType gdk_surface_get_type (void) G_GNUC_CONST;
|
2018-02-05 19:13:20 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-21 08:06:31 +00:00
|
|
|
|
GdkSurface * gdk_surface_new_toplevel (GdkDisplay *display,
|
|
|
|
|
int width,
|
|
|
|
|
int height);
|
2018-02-05 19:13:20 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-21 20:13:09 +00:00
|
|
|
|
GdkSurface * gdk_surface_new_popup (GdkSurface *parent,
|
2019-04-22 21:31:33 +00:00
|
|
|
|
gboolean autohide);
|
2016-10-17 18:11:23 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
void gdk_surface_destroy (GdkSurface *surface);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
gboolean gdk_surface_is_destroyed (GdkSurface *surface);
|
2010-05-25 22:38:44 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
GdkDisplay * gdk_surface_get_display (GdkSurface *surface);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
void gdk_surface_hide (GdkSurface *surface);
|
2018-06-05 15:46:34 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-03-01 19:29:06 +00:00
|
|
|
|
void gdk_surface_set_input_region (GdkSurface *surface,
|
|
|
|
|
cairo_region_t *region);
|
2006-02-20 01:36:50 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
gboolean gdk_surface_is_viewable (GdkSurface *surface);
|
1999-10-01 23:18:30 +00:00
|
|
|
|
|
2020-02-24 22:59:12 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
|
|
|
|
gboolean gdk_surface_get_mapped (GdkSurface *surface);
|
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-21 08:06:31 +00:00
|
|
|
|
void gdk_surface_set_cursor (GdkSurface *surface,
|
|
|
|
|
GdkCursor *cursor);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
GdkCursor *gdk_surface_get_cursor (GdkSurface *surface);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-21 08:06:31 +00:00
|
|
|
|
void gdk_surface_set_device_cursor (GdkSurface *surface,
|
|
|
|
|
GdkDevice *device,
|
|
|
|
|
GdkCursor *cursor);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
GdkCursor *gdk_surface_get_device_cursor (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
|
GdkDevice *device);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
int gdk_surface_get_width (GdkSurface *surface);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
int gdk_surface_get_height (GdkSurface *surface);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2019-05-29 03:41:56 +00:00
|
|
|
|
gboolean gdk_surface_translate_coordinates (GdkSurface *from,
|
|
|
|
|
GdkSurface *to,
|
|
|
|
|
double *x,
|
|
|
|
|
double *y);
|
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
gint gdk_surface_get_scale_factor (GdkSurface *surface);
|
2013-01-18 14:47:29 +00:00
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2019-04-19 19:39:23 +00:00
|
|
|
|
void gdk_surface_get_device_position (GdkSurface *surface,
|
|
|
|
|
GdkDevice *device,
|
|
|
|
|
double *x,
|
|
|
|
|
double *y,
|
|
|
|
|
GdkModifierType *mask);
|
2001-02-27 20:40:15 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-08-12 21:43:11 +00:00
|
|
|
|
cairo_surface_t *
|
2018-03-20 14:14:10 +00:00
|
|
|
|
gdk_surface_create_similar_surface (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
|
cairo_content_t content,
|
|
|
|
|
int width,
|
|
|
|
|
int height);
|
2010-08-12 21:43:11 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
void gdk_surface_beep (GdkSurface *surface);
|
1999-10-01 23:18:30 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
void gdk_surface_begin_resize_drag (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
|
GdkSurfaceEdge edge,
|
2019-03-23 18:56:21 +00:00
|
|
|
|
GdkDevice *device,
|
|
|
|
|
gint button,
|
|
|
|
|
gint x,
|
|
|
|
|
gint y,
|
|
|
|
|
guint32 timestamp);
|
2020-02-29 16:25:32 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
void gdk_surface_begin_move_drag (GdkSurface *surface,
|
2019-03-23 18:56:21 +00:00
|
|
|
|
GdkDevice *device,
|
|
|
|
|
gint button,
|
|
|
|
|
gint x,
|
|
|
|
|
gint y,
|
|
|
|
|
guint32 timestamp);
|
2001-03-29 21:17:45 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-28 14:42:26 +00:00
|
|
|
|
void gdk_surface_queue_expose (GdkSurface *surface);
|
2010-10-01 13:10:52 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
void gdk_surface_freeze_updates (GdkSurface *surface);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
void gdk_surface_thaw_updates (GdkSurface *surface);
|
2000-03-28 01:24:44 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 10:40:08 +00:00
|
|
|
|
void gdk_surface_constrain_size (GdkGeometry *geometry,
|
2018-03-21 08:06:31 +00:00
|
|
|
|
GdkSurfaceHints flags,
|
|
|
|
|
gint width,
|
|
|
|
|
gint height,
|
|
|
|
|
gint *new_width,
|
|
|
|
|
gint *new_height);
|
2001-03-29 21:17:45 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
void gdk_surface_set_support_multidevice (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
|
gboolean support_multidevice);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
gboolean gdk_surface_get_support_multidevice (GdkSurface *surface);
|
2001-08-23 15:26:49 +00:00
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
GdkFrameClock* gdk_surface_get_frame_clock (GdkSurface *surface);
|
2012-10-03 22:34:01 +00:00
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
void gdk_surface_set_opaque_region (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
|
cairo_region_t *region);
|
2013-05-14 20:23:33 +00:00
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-03-20 14:14:10 +00:00
|
|
|
|
void gdk_surface_set_shadow_width (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
|
gint left,
|
|
|
|
|
gint right,
|
|
|
|
|
gint top,
|
|
|
|
|
gint bottom);
|
2013-12-13 03:38:12 +00:00
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2018-04-11 22:16:43 +00:00
|
|
|
|
GdkCairoContext *gdk_surface_create_cairo_context(GdkSurface *surface);
|
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
|
|
|
|
GdkGLContext * gdk_surface_create_gl_context (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
|
GError **error);
|
2018-02-05 19:13:20 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2016-11-28 15:34:01 +00:00
|
|
|
|
GdkVulkanContext *
|
2018-04-11 22:16:43 +00:00
|
|
|
|
gdk_surface_create_vulkan_context(GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
|
GError **error);
|
2014-10-09 08:45:44 +00:00
|
|
|
|
|
2020-02-29 14:17:23 +00:00
|
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GdkSurface, g_object_unref)
|
|
|
|
|
|
2005-06-12 05:32:25 +00:00
|
|
|
|
G_END_DECLS
|
1999-10-01 23:18:30 +00:00
|
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
|
#endif /* __GDK_SURFACE_H__ */
|