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 10:40:08 +00:00
|
|
|
(* ref_cairo_surface) (GdkSurface *window);
|
2013-07-03 14:03:25 +00:00
|
|
|
cairo_surface_t *
|
2018-03-20 10:40:08 +00:00
|
|
|
(* create_similar_image_surface) (GdkSurface * window,
|
2013-07-03 14:03:25 +00:00
|
|
|
cairo_format_t format,
|
|
|
|
int width,
|
|
|
|
int height);
|
2010-11-23 00:46:03 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* show) (GdkSurface *window,
|
2009-06-16 19:34:37 +00:00
|
|
|
gboolean already_mapped);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* hide) (GdkSurface *window);
|
|
|
|
void (* withdraw) (GdkSurface *window);
|
|
|
|
void (* raise) (GdkSurface *window);
|
|
|
|
void (* lower) (GdkSurface *window);
|
|
|
|
void (* restack_toplevel) (GdkSurface *window,
|
|
|
|
GdkSurface *sibling,
|
2009-09-02 21:38:55 +00:00
|
|
|
gboolean above);
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* move_resize) (GdkSurface *window,
|
2008-06-27 14:27:44 +00:00
|
|
|
gboolean with_move,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* move_to_rect) (GdkSurface *window,
|
2016-06-15 15:00:38 +00:00
|
|
|
const GdkRectangle *rect,
|
|
|
|
GdkGravity rect_anchor,
|
|
|
|
GdkGravity window_anchor,
|
|
|
|
GdkAnchorHints anchor_hints,
|
|
|
|
gint rect_anchor_dx,
|
|
|
|
gint rect_anchor_dy);
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
GdkEventMask (* get_events) (GdkSurface *window);
|
|
|
|
void (* set_events) (GdkSurface *window,
|
2008-06-27 14:27:44 +00:00
|
|
|
GdkEventMask event_mask);
|
2010-05-25 22:38:44 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* get_geometry) (GdkSurface *window,
|
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 10:40:08 +00:00
|
|
|
void (* get_root_coords) (GdkSurface *window,
|
2009-06-08 15:03:47 +00:00
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint *root_x,
|
|
|
|
gint *root_y);
|
2018-03-20 10:40:08 +00:00
|
|
|
gboolean (* get_device_state) (GdkSurface *window,
|
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);
|
2018-03-20 10:40:08 +00:00
|
|
|
gboolean (* begin_paint) (GdkSurface *window);
|
|
|
|
void (* end_paint) (GdkSurface *window);
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* shape_combine_region) (GdkSurface *window,
|
2010-06-28 12:54:37 +00:00
|
|
|
const cairo_region_t *shape_region,
|
2008-06-27 14:27:44 +00:00
|
|
|
gint offset_x,
|
|
|
|
gint offset_y);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* input_shape_combine_region) (GdkSurface *window,
|
2010-06-28 12:54:37 +00:00
|
|
|
const cairo_region_t *shape_region,
|
2008-12-17 10:24:46 +00:00
|
|
|
gint offset_x,
|
|
|
|
gint offset_y);
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2008-07-18 13:03:42 +00:00
|
|
|
/* Called before processing updates for a window. This gives the windowing
|
|
|
|
* layer a chance to save the region for later use in avoiding duplicate
|
2014-06-21 22:03:56 +00:00
|
|
|
* exposes.
|
2008-07-18 13:03:42 +00:00
|
|
|
*/
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* queue_antiexpose) (GdkSurface *window,
|
2014-06-21 22:03:56 +00:00
|
|
|
cairo_region_t *update_area);
|
2010-07-21 18:37:33 +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
|
|
|
*
|
|
|
|
* window: The window being destroyed
|
|
|
|
* 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
|
|
|
|
* system to destroy the window can be omitted, since it will be
|
|
|
|
* destroyed as a result of the parent being destroyed.
|
|
|
|
* Unless @foreign_destroy
|
|
|
|
* foreign_destroy: If TRUE, the window or a parent was destroyed by some
|
|
|
|
* external agency. The window has already been destroyed and no
|
|
|
|
* 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 10:40:08 +00:00
|
|
|
void (* destroy) (GdkSurface *window,
|
2008-12-15 14:04:44 +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 10:40:08 +00:00
|
|
|
gboolean (* beep) (GdkSurface *window);
|
2010-12-05 20:58:23 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* focus) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
guint32 timestamp);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_type_hint) (GdkSurface *window,
|
|
|
|
GdkSurfaceTypeHint hint);
|
|
|
|
GdkSurfaceTypeHint (* get_type_hint) (GdkSurface *window);
|
|
|
|
void (* set_modal_hint) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
gboolean modal);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_skip_taskbar_hint) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
gboolean skips_taskbar);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_skip_pager_hint) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
gboolean skips_pager);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_urgency_hint) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
gboolean urgent);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_geometry_hints) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
const GdkGeometry *geometry,
|
2018-03-20 10:40:08 +00:00
|
|
|
GdkSurfaceHints geom_mask);
|
|
|
|
void (* set_title) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
const gchar *title);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_role) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
const gchar *role);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_startup_id) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
const gchar *startup_id);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_transient_for) (GdkSurface *window,
|
|
|
|
GdkSurface *parent);
|
|
|
|
void (* get_frame_extents) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
GdkRectangle *rect);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_accept_focus) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
gboolean accept_focus);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_focus_on_map) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
gboolean focus_on_map);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_icon_list) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
GList *pixbufs);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_icon_name) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
const gchar *name);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* iconify) (GdkSurface *window);
|
|
|
|
void (* deiconify) (GdkSurface *window);
|
|
|
|
void (* stick) (GdkSurface *window);
|
|
|
|
void (* unstick) (GdkSurface *window);
|
|
|
|
void (* maximize) (GdkSurface *window);
|
|
|
|
void (* unmaximize) (GdkSurface *window);
|
|
|
|
void (* fullscreen) (GdkSurface *window);
|
|
|
|
void (* fullscreen_on_monitor) (GdkSurface *window,
|
2017-11-01 15:52:56 +00:00
|
|
|
GdkMonitor *monitor);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* apply_fullscreen_mode) (GdkSurface *window);
|
|
|
|
void (* unfullscreen) (GdkSurface *window);
|
|
|
|
void (* set_keep_above) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
gboolean setting);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_keep_below) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
gboolean setting);
|
2018-03-20 10:40:08 +00:00
|
|
|
GdkSurface * (* get_group) (GdkSurface *window);
|
|
|
|
void (* set_group) (GdkSurface *window,
|
|
|
|
GdkSurface *leader);
|
|
|
|
void (* set_decorations) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
GdkWMDecoration decorations);
|
2018-03-20 10:40:08 +00:00
|
|
|
gboolean (* get_decorations) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
GdkWMDecoration *decorations);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_functions) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
GdkWMFunction functions);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* begin_resize_drag) (GdkSurface *window,
|
|
|
|
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 10:40:08 +00:00
|
|
|
void (* begin_move_drag) (GdkSurface *window,
|
2011-11-05 05:10:16 +00:00
|
|
|
GdkDevice *device,
|
|
|
|
gint button,
|
|
|
|
gint root_x,
|
|
|
|
gint root_y,
|
|
|
|
guint32 timestamp);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* enable_synchronized_configure) (GdkSurface *window);
|
|
|
|
void (* configure_finished) (GdkSurface *window);
|
|
|
|
void (* set_opacity) (GdkSurface *window,
|
2010-12-05 20:58:23 +00:00
|
|
|
gdouble opacity);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* destroy_notify) (GdkSurface *window);
|
|
|
|
void (* register_dnd) (GdkSurface *window);
|
|
|
|
GdkDragContext * (*drag_begin) (GdkSurface *window,
|
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 10:40:08 +00:00
|
|
|
void (*process_updates_recurse) (GdkSurface *window,
|
2010-12-13 18:30:05 +00:00
|
|
|
cairo_region_t *region);
|
2010-12-16 06:21:49 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
gint (* get_scale_factor) (GdkSurface *window);
|
|
|
|
void (* get_unscaled_size) (GdkSurface *window,
|
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 10:40:08 +00:00
|
|
|
void (* set_opaque_region) (GdkSurface *window,
|
2013-05-14 20:23:33 +00:00
|
|
|
cairo_region_t *region);
|
2018-03-20 10:40:08 +00:00
|
|
|
void (* set_shadow_width) (GdkSurface *window,
|
2013-12-13 03:38:12 +00:00
|
|
|
gint left,
|
|
|
|
gint right,
|
|
|
|
gint top,
|
|
|
|
gint bottom);
|
2018-03-20 10:40:08 +00:00
|
|
|
gboolean (* show_window_menu) (GdkSurface *window,
|
2014-03-13 21:28:01 +00:00
|
|
|
GdkEvent *event);
|
2018-03-20 10:40:08 +00:00
|
|
|
GdkGLContext *(*create_gl_context) (GdkSurface *window,
|
2014-10-09 14:09:05 +00:00
|
|
|
gboolean attached,
|
2014-10-09 08:45:44 +00:00
|
|
|
GdkGLContext *share,
|
|
|
|
GError **error);
|
2018-03-20 10:40:08 +00:00
|
|
|
gboolean (* supports_edge_constraints)(GdkSurface *window);
|
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__ */
|