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/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GDK_WINDOW_IMPL_H__
|
|
|
|
#define __GDK_WINDOW_IMPL_H__
|
|
|
|
|
|
|
|
#include <gdk/gdkwindow.h>
|
2010-12-17 00:00:01 +00:00
|
|
|
#include <gdk/gdkproperty.h>
|
2008-06-27 14:27:44 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GDK_TYPE_WINDOW_IMPL (gdk_window_impl_get_type ())
|
2010-11-22 19:42:00 +00:00
|
|
|
#define GDK_WINDOW_IMPL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW_IMPL, GdkWindowImpl))
|
|
|
|
#define GDK_WINDOW_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW_IMPL, GdkWindowImplClass))
|
|
|
|
#define GDK_IS_WINDOW_IMPL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_IMPL))
|
|
|
|
#define GDK_IS_WINDOW_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW_IMPL))
|
|
|
|
#define GDK_WINDOW_IMPL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW_IMPL, GdkWindowImplClass))
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2010-11-22 19:42:00 +00:00
|
|
|
typedef struct _GdkWindowImpl GdkWindowImpl;
|
|
|
|
typedef struct _GdkWindowImplClass GdkWindowImplClass;
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2010-11-22 19:42:00 +00:00
|
|
|
struct _GdkWindowImpl
|
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
|
|
|
};
|
|
|
|
|
|
|
|
struct _GdkWindowImplClass
|
|
|
|
{
|
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 *
|
|
|
|
(* ref_cairo_surface) (GdkWindow *window);
|
2013-07-03 14:03:25 +00:00
|
|
|
cairo_surface_t *
|
|
|
|
(* create_similar_image_surface) (GdkWindow * window,
|
|
|
|
cairo_format_t format,
|
|
|
|
int width,
|
|
|
|
int height);
|
2010-11-23 00:46:03 +00:00
|
|
|
|
2009-06-16 19:34:37 +00:00
|
|
|
void (* show) (GdkWindow *window,
|
|
|
|
gboolean already_mapped);
|
2008-06-27 14:27:44 +00:00
|
|
|
void (* hide) (GdkWindow *window);
|
|
|
|
void (* withdraw) (GdkWindow *window);
|
|
|
|
void (* raise) (GdkWindow *window);
|
|
|
|
void (* lower) (GdkWindow *window);
|
2009-09-02 21:38:55 +00:00
|
|
|
void (* restack_toplevel) (GdkWindow *window,
|
|
|
|
GdkWindow *sibling,
|
|
|
|
gboolean above);
|
2008-06-27 14:27:44 +00:00
|
|
|
|
|
|
|
void (* move_resize) (GdkWindow *window,
|
|
|
|
gboolean with_move,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
2016-06-15 15:00:38 +00:00
|
|
|
void (* move_to_rect) (GdkWindow *window,
|
|
|
|
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
|
|
|
|
|
|
|
GdkEventMask (* get_events) (GdkWindow *window);
|
|
|
|
void (* set_events) (GdkWindow *window,
|
|
|
|
GdkEventMask event_mask);
|
2010-05-25 22:38:44 +00:00
|
|
|
|
|
|
|
void (* set_device_cursor) (GdkWindow *window,
|
|
|
|
GdkDevice *device,
|
2008-06-27 14:27:44 +00:00
|
|
|
GdkCursor *cursor);
|
|
|
|
|
|
|
|
void (* get_geometry) (GdkWindow *window,
|
|
|
|
gint *x,
|
|
|
|
gint *y,
|
|
|
|
gint *width,
|
2010-12-05 13:40:35 +00:00
|
|
|
gint *height);
|
2014-02-28 01:58:13 +00:00
|
|
|
void (* get_root_coords) (GdkWindow *window,
|
2009-06-08 15:03:47 +00:00
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint *root_x,
|
|
|
|
gint *root_y);
|
2010-05-25 22:38:44 +00:00
|
|
|
gboolean (* get_device_state) (GdkWindow *window,
|
|
|
|
GdkDevice *device,
|
2013-07-03 09:52:58 +00:00
|
|
|
gdouble *x,
|
|
|
|
gdouble *y,
|
2010-05-25 22:38:44 +00:00
|
|
|
GdkModifierType *mask);
|
2014-11-22 16:08:34 +00:00
|
|
|
gboolean (* begin_paint) (GdkWindow *window);
|
2013-04-29 16:40:10 +00:00
|
|
|
void (* end_paint) (GdkWindow *window);
|
2008-06-27 14:27:44 +00:00
|
|
|
|
|
|
|
void (* shape_combine_region) (GdkWindow *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);
|
2008-12-17 10:24:46 +00:00
|
|
|
void (* input_shape_combine_region) (GdkWindow *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
|
|
|
*/
|
2014-06-21 22:03:56 +00:00
|
|
|
void (* queue_antiexpose) (GdkWindow *window,
|
|
|
|
cairo_region_t *update_area);
|
2010-07-21 18:37:33 +00:00
|
|
|
|
2008-12-15 14:04:44 +00:00
|
|
|
/* Called to do the windowing system specific part of gdk_window_destroy(),
|
|
|
|
*
|
|
|
|
* 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
|
|
|
*/
|
|
|
|
void (* destroy) (GdkWindow *window,
|
|
|
|
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 */
|
|
|
|
gboolean (* beep) (GdkWindow *window);
|
2010-12-05 20:58:23 +00:00
|
|
|
|
|
|
|
void (* focus) (GdkWindow *window,
|
|
|
|
guint32 timestamp);
|
|
|
|
void (* set_type_hint) (GdkWindow *window,
|
|
|
|
GdkWindowTypeHint hint);
|
|
|
|
GdkWindowTypeHint (* get_type_hint) (GdkWindow *window);
|
|
|
|
void (* set_modal_hint) (GdkWindow *window,
|
|
|
|
gboolean modal);
|
|
|
|
void (* set_skip_taskbar_hint) (GdkWindow *window,
|
|
|
|
gboolean skips_taskbar);
|
|
|
|
void (* set_skip_pager_hint) (GdkWindow *window,
|
|
|
|
gboolean skips_pager);
|
|
|
|
void (* set_urgency_hint) (GdkWindow *window,
|
|
|
|
gboolean urgent);
|
|
|
|
void (* set_geometry_hints) (GdkWindow *window,
|
|
|
|
const GdkGeometry *geometry,
|
|
|
|
GdkWindowHints geom_mask);
|
|
|
|
void (* set_title) (GdkWindow *window,
|
|
|
|
const gchar *title);
|
|
|
|
void (* set_role) (GdkWindow *window,
|
|
|
|
const gchar *role);
|
|
|
|
void (* set_startup_id) (GdkWindow *window,
|
|
|
|
const gchar *startup_id);
|
|
|
|
void (* set_transient_for) (GdkWindow *window,
|
|
|
|
GdkWindow *parent);
|
|
|
|
void (* get_frame_extents) (GdkWindow *window,
|
|
|
|
GdkRectangle *rect);
|
|
|
|
void (* set_accept_focus) (GdkWindow *window,
|
|
|
|
gboolean accept_focus);
|
|
|
|
void (* set_focus_on_map) (GdkWindow *window,
|
|
|
|
gboolean focus_on_map);
|
|
|
|
void (* set_icon_list) (GdkWindow *window,
|
|
|
|
GList *pixbufs);
|
|
|
|
void (* set_icon_name) (GdkWindow *window,
|
|
|
|
const gchar *name);
|
|
|
|
void (* iconify) (GdkWindow *window);
|
|
|
|
void (* deiconify) (GdkWindow *window);
|
|
|
|
void (* stick) (GdkWindow *window);
|
|
|
|
void (* unstick) (GdkWindow *window);
|
|
|
|
void (* maximize) (GdkWindow *window);
|
|
|
|
void (* unmaximize) (GdkWindow *window);
|
|
|
|
void (* fullscreen) (GdkWindow *window);
|
2015-07-13 16:30:42 +00:00
|
|
|
void (* fullscreen_on_monitor) (GdkWindow *window, gint monitor);
|
2013-01-21 10:49:45 +00:00
|
|
|
void (* apply_fullscreen_mode) (GdkWindow *window);
|
2010-12-05 20:58:23 +00:00
|
|
|
void (* unfullscreen) (GdkWindow *window);
|
|
|
|
void (* set_keep_above) (GdkWindow *window,
|
|
|
|
gboolean setting);
|
|
|
|
void (* set_keep_below) (GdkWindow *window,
|
|
|
|
gboolean setting);
|
|
|
|
GdkWindow * (* get_group) (GdkWindow *window);
|
|
|
|
void (* set_group) (GdkWindow *window,
|
|
|
|
GdkWindow *leader);
|
|
|
|
void (* set_decorations) (GdkWindow *window,
|
|
|
|
GdkWMDecoration decorations);
|
|
|
|
gboolean (* get_decorations) (GdkWindow *window,
|
|
|
|
GdkWMDecoration *decorations);
|
|
|
|
void (* set_functions) (GdkWindow *window,
|
|
|
|
GdkWMFunction functions);
|
|
|
|
void (* begin_resize_drag) (GdkWindow *window,
|
2011-11-05 05:10:16 +00:00
|
|
|
GdkWindowEdge edge,
|
|
|
|
GdkDevice *device,
|
|
|
|
gint button,
|
|
|
|
gint root_x,
|
|
|
|
gint root_y,
|
|
|
|
guint32 timestamp);
|
2010-12-05 20:58:23 +00:00
|
|
|
void (* begin_move_drag) (GdkWindow *window,
|
2011-11-05 05:10:16 +00:00
|
|
|
GdkDevice *device,
|
|
|
|
gint button,
|
|
|
|
gint root_x,
|
|
|
|
gint root_y,
|
|
|
|
guint32 timestamp);
|
2010-12-05 20:58:23 +00:00
|
|
|
void (* enable_synchronized_configure) (GdkWindow *window);
|
|
|
|
void (* configure_finished) (GdkWindow *window);
|
|
|
|
void (* set_opacity) (GdkWindow *window,
|
|
|
|
gdouble opacity);
|
|
|
|
void (* destroy_notify) (GdkWindow *window);
|
2011-02-01 17:11:35 +00:00
|
|
|
GdkDragProtocol (* get_drag_protocol) (GdkWindow *window,
|
|
|
|
GdkWindow **target);
|
2010-12-05 20:58:23 +00:00
|
|
|
void (* register_dnd) (GdkWindow *window);
|
2010-12-10 06:27:10 +00:00
|
|
|
GdkDragContext * (*drag_begin) (GdkWindow *window,
|
|
|
|
GdkDevice *device,
|
2015-12-07 18:47:45 +00:00
|
|
|
GList *targets,
|
|
|
|
gint x_root,
|
|
|
|
gint y_root);
|
2010-12-13 18:30:05 +00:00
|
|
|
|
|
|
|
void (*process_updates_recurse) (GdkWindow *window,
|
|
|
|
cairo_region_t *region);
|
2010-12-16 06:21:49 +00:00
|
|
|
|
|
|
|
void (*sync_rendering) (GdkWindow *window);
|
|
|
|
gboolean (*simulate_key) (GdkWindow *window,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
guint keyval,
|
|
|
|
GdkModifierType modifiers,
|
|
|
|
GdkEventType event_type);
|
|
|
|
gboolean (*simulate_button) (GdkWindow *window,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
guint button,
|
|
|
|
GdkModifierType modifiers,
|
|
|
|
GdkEventType event_type);
|
2010-12-17 00:00:01 +00:00
|
|
|
|
|
|
|
gboolean (*get_property) (GdkWindow *window,
|
|
|
|
GdkAtom property,
|
|
|
|
GdkAtom type,
|
|
|
|
gulong offset,
|
|
|
|
gulong length,
|
|
|
|
gint pdelete,
|
|
|
|
GdkAtom *actual_type,
|
|
|
|
gint *actual_format,
|
|
|
|
gint *actual_length,
|
|
|
|
guchar **data);
|
|
|
|
void (*change_property) (GdkWindow *window,
|
|
|
|
GdkAtom property,
|
|
|
|
GdkAtom type,
|
|
|
|
gint format,
|
|
|
|
GdkPropMode mode,
|
|
|
|
const guchar *data,
|
|
|
|
gint n_elements);
|
|
|
|
void (*delete_property) (GdkWindow *window,
|
|
|
|
GdkAtom property);
|
2013-01-18 14:47:29 +00:00
|
|
|
|
|
|
|
gint (* get_scale_factor) (GdkWindow *window);
|
2014-11-20 10:50:11 +00:00
|
|
|
void (* get_unscaled_size) (GdkWindow *window,
|
|
|
|
int *unscaled_width,
|
|
|
|
int *unscaled_height);
|
2013-05-14 20:23:33 +00:00
|
|
|
|
|
|
|
void (* set_opaque_region) (GdkWindow *window,
|
|
|
|
cairo_region_t *region);
|
2013-12-13 03:38:12 +00:00
|
|
|
void (* set_shadow_width) (GdkWindow *window,
|
|
|
|
gint left,
|
|
|
|
gint right,
|
|
|
|
gint top,
|
|
|
|
gint bottom);
|
2014-03-13 21:28:01 +00:00
|
|
|
gboolean (* show_window_menu) (GdkWindow *window,
|
|
|
|
GdkEvent *event);
|
2014-10-09 08:45:44 +00:00
|
|
|
GdkGLContext *(*create_gl_context) (GdkWindow *window,
|
2014-10-09 14:09:05 +00:00
|
|
|
gboolean attached,
|
2014-10-09 08:45:44 +00:00
|
|
|
GdkGLContext *share,
|
|
|
|
GError **error);
|
2008-06-27 14:27:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Interface Functions */
|
|
|
|
GType gdk_window_impl_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GDK_WINDOW_IMPL_H__ */
|