2008-07-01 22:57:50 +00:00
|
|
|
/* GDK - The GIMP Drawing Kit
|
2008-06-27 14:27:44 +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/>.
|
2008-06-27 14:27:44 +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
|
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
|
|
*/
|
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
#ifndef __GDK_SURFACE_IMPL_H__
|
|
|
|
#define __GDK_SURFACE_IMPL_H__
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2018-03-20 10:46:11 +00:00
|
|
|
#include <gdk/gdksurface.h>
|
2010-12-17 00:00:01 +00:00
|
|
|
#include <gdk/gdkproperty.h>
|
2008-06-27 14:27:44 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
#define GDK_TYPE_SURFACE_IMPL (gdk_surface_impl_get_type ())
|
|
|
|
#define GDK_SURFACE_IMPL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_SURFACE_IMPL, GdkSurfaceImpl))
|
|
|
|
#define GDK_SURFACE_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_SURFACE_IMPL, GdkSurfaceImplClass))
|
|
|
|
#define GDK_IS_SURFACE_IMPL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_SURFACE_IMPL))
|
|
|
|
#define GDK_IS_SURFACE_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_SURFACE_IMPL))
|
|
|
|
#define GDK_SURFACE_IMPL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_SURFACE_IMPL, GdkSurfaceImplClass))
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
typedef struct _GdkSurfaceImpl GdkSurfaceImpl;
|
|
|
|
typedef struct _GdkSurfaceImplClass GdkSurfaceImplClass;
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
struct _GdkSurfaceImpl
|
2008-06-27 14:27:44 +00:00
|
|
|
{
|
2010-11-24 14:11:34 +00:00
|
|
|
GObject parent;
|
2010-11-22 19:42:00 +00:00
|
|
|
};
|
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
struct _GdkSurfaceImplClass
|
2010-11-22 19:42:00 +00:00
|
|
|
{
|
2010-11-24 14:11:34 +00:00
|
|
|
GObjectClass parent_class;
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2010-11-23 00:46:03 +00:00
|
|
|
cairo_surface_t *
|
2018-03-20 14:14:10 +00:00
|
|
|
(* ref_cairo_surface) (GdkSurface *surface);
|
2010-11-23 00:46:03 +00:00
|
|
|
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* show) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
gboolean already_mapped);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* hide) (GdkSurface *surface);
|
|
|
|
void (* withdraw) (GdkSurface *surface);
|
|
|
|
void (* raise) (GdkSurface *surface);
|
|
|
|
void (* lower) (GdkSurface *surface);
|
|
|
|
void (* restack_toplevel) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
GdkSurface *sibling,
|
|
|
|
gboolean above);
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* move_resize) (GdkSurface *surface,
|
2008-06-27 14:27:44 +00:00
|
|
|
gboolean with_move,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* move_to_rect) (GdkSurface *surface,
|
2016-06-15 15:00:38 +00:00
|
|
|
const GdkRectangle *rect,
|
|
|
|
GdkGravity rect_anchor,
|
2018-03-20 11:05:26 +00:00
|
|
|
GdkGravity surface_anchor,
|
2016-06-15 15:00:38 +00:00
|
|
|
GdkAnchorHints anchor_hints,
|
|
|
|
gint rect_anchor_dx,
|
|
|
|
gint rect_anchor_dy);
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* get_geometry) (GdkSurface *surface,
|
2008-06-27 14:27:44 +00:00
|
|
|
gint *x,
|
|
|
|
gint *y,
|
|
|
|
gint *width,
|
2010-12-05 13:40:35 +00:00
|
|
|
gint *height);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* get_root_coords) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
gint x,
|
|
|
|
gint y,
|
2009-06-08 15:03:47 +00:00
|
|
|
gint *root_x,
|
|
|
|
gint *root_y);
|
2018-03-20 14:14:10 +00:00
|
|
|
gboolean (* get_device_state) (GdkSurface *surface,
|
2010-05-25 22:38:44 +00:00
|
|
|
GdkDevice *device,
|
2013-07-03 09:52:58 +00:00
|
|
|
gdouble *x,
|
|
|
|
gdouble *y,
|
2010-05-25 22:38:44 +00:00
|
|
|
GdkModifierType *mask);
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* input_shape_combine_region) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
const cairo_region_t *shape_region,
|
|
|
|
gint offset_x,
|
|
|
|
gint offset_y);
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
/* Called to do the windowing system specific part of gdk_surface_destroy(),
|
2008-12-15 14:04:44 +00:00
|
|
|
*
|
2018-03-20 14:14:10 +00:00
|
|
|
* surface: The window being destroyed
|
2008-12-15 14:04:44 +00:00
|
|
|
* recursing: If TRUE, then this is being called because a parent
|
2010-12-10 19:06:13 +00:00
|
|
|
* was destroyed. This generally means that the call to the windowing
|
2018-03-20 14:14:10 +00:00
|
|
|
* system to destroy the surface can be omitted, since it will be
|
2010-12-10 19:06:13 +00:00
|
|
|
* destroyed as a result of the parent being destroyed.
|
|
|
|
* Unless @foreign_destroy
|
2018-03-20 14:14:10 +00:00
|
|
|
* foreign_destroy: If TRUE, the surface or a parent was destroyed by some
|
|
|
|
* external agency. The surface has already been destroyed and no
|
2010-12-10 19:06:13 +00:00
|
|
|
* windowing system calls should be made. (This may never happen
|
|
|
|
* for some windowing systems.)
|
2008-12-15 14:04:44 +00:00
|
|
|
*/
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* destroy) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
gboolean recursing,
|
|
|
|
gboolean foreign_destroy);
|
2010-10-05 13:21:40 +00:00
|
|
|
|
2010-12-11 02:55:41 +00:00
|
|
|
|
2010-11-25 11:28:08 +00:00
|
|
|
/* optional */
|
2018-03-20 14:14:10 +00:00
|
|
|
gboolean (* beep) (GdkSurface *surface);
|
2010-12-05 20:58:23 +00:00
|
|
|
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* focus) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
guint32 timestamp);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_type_hint) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
GdkSurfaceTypeHint hint);
|
2018-03-20 14:14:10 +00:00
|
|
|
GdkSurfaceTypeHint (* get_type_hint) (GdkSurface *surface);
|
|
|
|
void (* set_modal_hint) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
gboolean modal);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_skip_taskbar_hint) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
gboolean skips_taskbar);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_skip_pager_hint) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
gboolean skips_pager);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_urgency_hint) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
gboolean urgent);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_geometry_hints) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
const GdkGeometry *geometry,
|
|
|
|
GdkSurfaceHints geom_mask);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_title) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
const gchar *title);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_startup_id) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
const gchar *startup_id);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_transient_for) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
GdkSurface *parent);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* get_frame_extents) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
GdkRectangle *rect);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_accept_focus) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
gboolean accept_focus);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_focus_on_map) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
gboolean focus_on_map);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_icon_list) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
GList *pixbufs);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_icon_name) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
const gchar *name);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* iconify) (GdkSurface *surface);
|
|
|
|
void (* deiconify) (GdkSurface *surface);
|
|
|
|
void (* stick) (GdkSurface *surface);
|
|
|
|
void (* unstick) (GdkSurface *surface);
|
|
|
|
void (* maximize) (GdkSurface *surface);
|
|
|
|
void (* unmaximize) (GdkSurface *surface);
|
|
|
|
void (* fullscreen) (GdkSurface *surface);
|
|
|
|
void (* fullscreen_on_monitor) (GdkSurface *surface,
|
2017-11-01 15:52:56 +00:00
|
|
|
GdkMonitor *monitor);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* apply_fullscreen_mode) (GdkSurface *surface);
|
|
|
|
void (* unfullscreen) (GdkSurface *surface);
|
|
|
|
void (* set_keep_above) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
gboolean setting);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_keep_below) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
gboolean setting);
|
2018-03-20 14:14:10 +00:00
|
|
|
GdkSurface * (* get_group) (GdkSurface *surface);
|
|
|
|
void (* set_group) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
GdkSurface *leader);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_decorations) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
GdkWMDecoration decorations);
|
2018-03-20 14:14:10 +00:00
|
|
|
gboolean (* get_decorations) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
GdkWMDecoration *decorations);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_functions) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
GdkWMFunction functions);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* begin_resize_drag) (GdkSurface *surface,
|
2018-03-20 10:40:08 +00:00
|
|
|
GdkSurfaceEdge edge,
|
2011-11-05 05:10:16 +00:00
|
|
|
GdkDevice *device,
|
|
|
|
gint button,
|
|
|
|
gint root_x,
|
|
|
|
gint root_y,
|
|
|
|
guint32 timestamp);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* begin_move_drag) (GdkSurface *surface,
|
2011-11-05 05:10:16 +00:00
|
|
|
GdkDevice *device,
|
|
|
|
gint button,
|
|
|
|
gint root_x,
|
|
|
|
gint root_y,
|
|
|
|
guint32 timestamp);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_opacity) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
gdouble opacity);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* destroy_notify) (GdkSurface *surface);
|
|
|
|
void (* register_dnd) (GdkSurface *surface);
|
2018-06-29 17:34:14 +00:00
|
|
|
GdkDrag * (*drag_begin) (GdkSurface *surface,
|
2017-11-18 04:53:25 +00:00
|
|
|
GdkDevice *device,
|
2017-12-13 14:03:53 +00:00
|
|
|
GdkContentProvider*content,
|
2017-12-11 00:45:31 +00:00
|
|
|
GdkDragAction actions,
|
|
|
|
gint dx,
|
|
|
|
gint dy);
|
2010-12-13 18:30:05 +00:00
|
|
|
|
2018-03-20 14:14:10 +00:00
|
|
|
gint (* get_scale_factor) (GdkSurface *surface);
|
|
|
|
void (* get_unscaled_size) (GdkSurface *surface,
|
2014-11-20 10:50:11 +00:00
|
|
|
int *unscaled_width,
|
|
|
|
int *unscaled_height);
|
2013-05-14 20:23:33 +00:00
|
|
|
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_opaque_region) (GdkSurface *surface,
|
2013-05-14 20:23:33 +00:00
|
|
|
cairo_region_t *region);
|
2018-03-20 14:14:10 +00:00
|
|
|
void (* set_shadow_width) (GdkSurface *surface,
|
2013-12-13 03:38:12 +00:00
|
|
|
gint left,
|
|
|
|
gint right,
|
|
|
|
gint top,
|
|
|
|
gint bottom);
|
2018-03-20 14:14:10 +00:00
|
|
|
gboolean (* show_window_menu) (GdkSurface *surface,
|
2014-03-13 21:28:01 +00:00
|
|
|
GdkEvent *event);
|
2018-03-20 14:14:10 +00:00
|
|
|
GdkGLContext *(*create_gl_context) (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
gboolean attached,
|
2014-10-09 08:45:44 +00:00
|
|
|
GdkGLContext *share,
|
|
|
|
GError **error);
|
2018-03-20 14:14:10 +00:00
|
|
|
gboolean (* supports_edge_constraints)(GdkSurface *surface);
|
2008-06-27 14:27:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Interface Functions */
|
2018-03-20 10:40:08 +00:00
|
|
|
GType gdk_surface_impl_get_type (void) G_GNUC_CONST;
|
2008-06-27 14:27:44 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
#endif /* __GDK_SURFACE_IMPL_H__ */
|