1 /* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Modified by the GTK+ Team and others 1997-2005. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
30 #include "gdkwindow.h"
31 #include "gdkinternals.h"
32 #include "gdkwindowimpl.h"
33 #include "gdkpixmap.h"
34 #include "gdkdrawable.h"
36 #include "gdkscreen.h"
39 #include "gdkcursor.h"
44 * Offscreen windows can't be the child of a foreign window,
45 * nor contain foreign windows
46 * GDK_POINTER_MOTION_HINT_MASK isn't effective
49 typedef struct _GdkOffscreenWindow GdkOffscreenWindow;
50 typedef struct _GdkOffscreenWindowClass GdkOffscreenWindowClass;
52 struct _GdkOffscreenWindow
54 GdkDrawable parent_instance;
58 GdkColormap *colormap;
65 struct _GdkOffscreenWindowClass
67 GdkDrawableClass parent_class;
70 #define GDK_TYPE_OFFSCREEN_WINDOW (gdk_offscreen_window_get_type())
71 #define GDK_OFFSCREEN_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_OFFSCREEN_WINDOW, GdkOffscreenWindow))
72 #define GDK_IS_OFFSCREEN_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_OFFSCREEN_WINDOW))
73 #define GDK_OFFSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_OFFSCREEN_WINDOW, GdkOffscreenWindowClass))
74 #define GDK_IS_OFFSCREEN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_OFFSCREEN_WINDOW))
75 #define GDK_OFFSCREEN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_OFFSCREEN_WINDOW, GdkOffscreenWindowClass))
77 static void gdk_offscreen_window_impl_iface_init (GdkWindowImplIface *iface);
78 static void gdk_offscreen_window_hide (GdkWindow *window);
80 G_DEFINE_TYPE_WITH_CODE (GdkOffscreenWindow,
83 G_IMPLEMENT_INTERFACE (GDK_TYPE_WINDOW_IMPL,
84 gdk_offscreen_window_impl_iface_init));
88 gdk_offscreen_window_finalize (GObject *object)
90 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (object);
92 if (offscreen->cursor)
93 gdk_cursor_unref (offscreen->cursor);
95 offscreen->cursor = NULL;
97 g_object_unref (offscreen->pixmap);
99 G_OBJECT_CLASS (gdk_offscreen_window_parent_class)->finalize (object);
103 gdk_offscreen_window_init (GdkOffscreenWindow *window)
108 gdk_offscreen_window_destroy (GdkWindow *window,
110 gboolean foreign_destroy)
112 GdkWindowObject *private = GDK_WINDOW_OBJECT (window);
113 GdkOffscreenWindow *offscreen;
115 offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
117 gdk_offscreen_window_set_embedder (window, NULL);
120 gdk_offscreen_window_hide (window);
122 g_object_unref (offscreen->colormap);
123 offscreen->colormap = NULL;
127 is_parent_of (GdkWindow *parent,
138 w = gdk_window_get_parent (w);
145 gdk_offscreen_window_create_gc (GdkDrawable *drawable,
147 GdkGCValuesMask values_mask)
149 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
151 return gdk_gc_new_with_values (offscreen->pixmap, values, values_mask);
154 static cairo_surface_t *
155 gdk_offscreen_window_ref_cairo_surface (GdkDrawable *drawable)
157 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
159 return _gdk_drawable_ref_cairo_surface (offscreen->pixmap);
163 gdk_offscreen_window_get_colormap (GdkDrawable *drawable)
165 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
167 return offscreen->colormap;
171 gdk_offscreen_window_set_colormap (GdkDrawable *drawable,
172 GdkColormap*colormap)
174 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
176 if (colormap && GDK_WINDOW_DESTROYED (offscreen->wrapper))
179 if (offscreen->colormap == colormap)
182 if (offscreen->colormap)
183 g_object_unref (offscreen->colormap);
185 offscreen->colormap = colormap;
186 if (offscreen->colormap)
187 g_object_ref (offscreen->colormap);
192 gdk_offscreen_window_get_depth (GdkDrawable *drawable)
194 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
196 return gdk_drawable_get_depth (offscreen->wrapper);
200 gdk_offscreen_window_get_source_drawable (GdkDrawable *drawable)
202 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
204 return _gdk_drawable_get_source_drawable (offscreen->pixmap);
208 gdk_offscreen_window_get_composite_drawable (GdkDrawable *drawable,
213 gint *composite_x_offset,
214 gint *composite_y_offset)
216 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
218 return g_object_ref (offscreen->pixmap);
222 gdk_offscreen_window_get_screen (GdkDrawable *drawable)
224 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
226 return offscreen->screen;
230 gdk_offscreen_window_get_visual (GdkDrawable *drawable)
232 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
234 return gdk_drawable_get_visual (offscreen->wrapper);
238 add_damage (GdkOffscreenWindow *offscreen,
244 cairo_region_t *damage;
253 /* This should really take into account line width, line
254 * joins (and miter) and line caps. But these are hard
255 * to compute, rarely used and generally a pain. And in
256 * the end a snug damage rectangle is not that important
257 * as multiple damages are generally created anyway.
259 * So, we just add some padding around the rect.
260 * We use a padding of 3 pixels, plus an extra row
261 * below and on the right for the normal line size. I.E.
262 * line from (0,0) to (2,0) gets h=0 but is really
263 * at least one pixel tall.
271 damage = cairo_region_create_rectangle (&rect);
272 _gdk_window_add_damage (offscreen->wrapper, damage);
273 cairo_region_destroy (damage);
277 get_real_drawable (GdkOffscreenWindow *offscreen)
279 GdkPixmapObject *pixmap;
280 pixmap = (GdkPixmapObject *) offscreen->pixmap;
281 return GDK_DRAWABLE (pixmap->impl);
285 gdk_offscreen_window_draw_drawable (GdkDrawable *drawable,
294 GdkDrawable *original_src)
296 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
297 GdkDrawable *real_drawable = get_real_drawable (offscreen);
299 gdk_draw_drawable (real_drawable, gc,
304 add_damage (offscreen, xdest, ydest, width, height, FALSE);
308 gdk_offscreen_window_draw_rectangle (GdkDrawable *drawable,
316 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
317 GdkDrawable *real_drawable = get_real_drawable (offscreen);
319 gdk_draw_rectangle (real_drawable,
320 gc, filled, x, y, width, height);
322 add_damage (offscreen, x, y, width, height, !filled);
327 gdk_offscreen_window_draw_points (GdkDrawable *drawable,
332 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
333 GdkDrawable *real_drawable = get_real_drawable (offscreen);
335 gdk_draw_points (real_drawable,
343 int min_x, min_y, max_x, max_y, i;
345 min_x = max_x = points[0].x;
346 min_y = max_y = points[0].y;
348 for (i = 1; i < npoints; i++)
350 min_x = MIN (min_x, points[i].x);
351 max_x = MAX (max_x, points[i].x);
352 min_y = MIN (min_y, points[i].y);
353 max_y = MAX (max_y, points[i].y);
356 add_damage (offscreen, min_x, min_y,
364 gdk_offscreen_window_draw_segments (GdkDrawable *drawable,
369 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
370 GdkDrawable *real_drawable = get_real_drawable (offscreen);
372 gdk_draw_segments (real_drawable,
379 int min_x, min_y, max_x, max_y, i;
381 min_x = max_x = segs[0].x1;
382 min_y = max_y = segs[0].y1;
384 for (i = 0; i < nsegs; i++)
386 min_x = MIN (min_x, segs[i].x1);
387 max_x = MAX (max_x, segs[i].x1);
388 min_x = MIN (min_x, segs[i].x2);
389 max_x = MAX (max_x, segs[i].x2);
390 min_y = MIN (min_y, segs[i].y1);
391 max_y = MAX (max_y, segs[i].y1);
392 min_y = MIN (min_y, segs[i].y2);
393 max_y = MAX (max_y, segs[i].y2);
396 add_damage (offscreen, min_x, min_y,
398 max_y - min_y, TRUE);
404 gdk_offscreen_window_draw_lines (GdkDrawable *drawable,
409 GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
410 GdkDrawable *real_drawable = get_real_drawable (offscreen);
411 GdkWindowObject *private = GDK_WINDOW_OBJECT (offscreen->wrapper);
413 gdk_draw_lines (real_drawable,
418 /* Hard to compute the minimal size, as we don't know the line
419 width, and since joins are hard to calculate.
420 Its not that often used anyway, damage it all */
421 add_damage (offscreen, 0, 0, private->width, private->height, TRUE);
425 _gdk_offscreen_window_new (GdkWindow *window,
428 GdkWindowAttr *attributes,
429 gint attributes_mask)
431 GdkWindowObject *private;
432 GdkOffscreenWindow *offscreen;
434 g_return_if_fail (attributes != NULL);
436 if (attributes->wclass != GDK_INPUT_OUTPUT)
437 return; /* Can't support input only offscreens */
439 private = (GdkWindowObject *)window;
441 if (private->parent != NULL && GDK_WINDOW_DESTROYED (private->parent))
444 private->impl = g_object_new (GDK_TYPE_OFFSCREEN_WINDOW, NULL);
445 offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
446 offscreen->wrapper = window;
448 offscreen->screen = screen;
450 if (attributes_mask & GDK_WA_COLORMAP)
451 offscreen->colormap = g_object_ref (attributes->colormap);
454 if (gdk_screen_get_system_visual (screen) == visual)
456 offscreen->colormap = gdk_screen_get_system_colormap (screen);
457 g_object_ref (offscreen->colormap);
460 offscreen->colormap = gdk_colormap_new (visual, FALSE);
463 offscreen->pixmap = gdk_pixmap_new ((GdkDrawable *)private->parent,
467 gdk_drawable_set_colormap (offscreen->pixmap, offscreen->colormap);
471 gdk_offscreen_window_reparent (GdkWindow *window,
472 GdkWindow *new_parent,
476 GdkWindowObject *private = (GdkWindowObject *)window;
477 GdkWindowObject *new_parent_private = (GdkWindowObject *)new_parent;
478 GdkWindowObject *old_parent;
483 /* No input-output children of input-only windows */
484 if (new_parent_private->input_only && !private->input_only)
487 /* Don't create loops in hierarchy */
488 if (is_parent_of (window, new_parent))
492 was_mapped = GDK_WINDOW_IS_MAPPED (window);
494 gdk_window_hide (window);
497 private->parent->children = g_list_remove (private->parent->children, window);
499 old_parent = private->parent;
500 private->parent = new_parent_private;
504 if (new_parent_private)
505 private->parent->children = g_list_prepend (private->parent->children, window);
507 _gdk_synthesize_crossing_events_for_geometry_change (window);
509 _gdk_synthesize_crossing_events_for_geometry_change (GDK_WINDOW (old_parent));
515 from_embedder (GdkWindow *window,
516 double embedder_x, double embedder_y,
517 double *offscreen_x, double *offscreen_y)
519 GdkWindowObject *private;
521 private = (GdkWindowObject *)window;
523 g_signal_emit_by_name (private->impl_window,
525 embedder_x, embedder_y,
526 offscreen_x, offscreen_y,
531 to_embedder (GdkWindow *window,
532 double offscreen_x, double offscreen_y,
533 double *embedder_x, double *embedder_y)
535 GdkWindowObject *private;
537 private = (GdkWindowObject *)window;
539 g_signal_emit_by_name (private->impl_window,
541 offscreen_x, offscreen_y,
542 embedder_x, embedder_y,
547 gdk_offscreen_window_get_root_coords (GdkWindow *window,
553 GdkWindowObject *private = GDK_WINDOW_OBJECT (window);
554 GdkOffscreenWindow *offscreen;
560 offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
561 if (offscreen->embedder)
567 tmpx = floor (dx + 0.5);
568 tmpy = floor (dy + 0.5);
569 gdk_window_get_root_coords (offscreen->embedder,
584 gdk_offscreen_window_get_deskrelative_origin (GdkWindow *window,
588 GdkWindowObject *private = GDK_WINDOW_OBJECT (window);
589 GdkOffscreenWindow *offscreen;
595 offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
596 if (offscreen->embedder)
599 gdk_window_get_deskrelative_origin (offscreen->embedder,
605 tmpx = floor (tmpx + dx + 0.5);
606 tmpy = floor (tmpy + dy + 0.5);
619 gdk_offscreen_window_get_device_state (GdkWindow *window,
623 GdkModifierType *mask)
625 GdkWindowObject *private = GDK_WINDOW_OBJECT (window);
626 GdkOffscreenWindow *offscreen;
629 GdkModifierType tmpmask;
635 offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
636 if (offscreen->embedder != NULL)
638 gdk_window_get_device_position (offscreen->embedder, device, &tmpx, &tmpy, &tmpmask);
639 from_embedder (window,
642 tmpx = floor (dtmpx + 0.5);
643 tmpy = floor (dtmpy + 0.5);
656 * gdk_offscreen_window_get_pixmap:
657 * @window: a #GdkWindow
659 * Gets the offscreen pixmap that an offscreen window renders into.
660 * If you need to keep this around over window resizes, you need to
661 * add a reference to it.
663 * Returns: The offscreen pixmap, or %NULL if not offscreen
668 gdk_offscreen_window_get_pixmap (GdkWindow *window)
670 GdkWindowObject *private = (GdkWindowObject *)window;
671 GdkOffscreenWindow *offscreen;
673 g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
675 if (!GDK_IS_OFFSCREEN_WINDOW (private->impl))
678 offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
679 return offscreen->pixmap;
683 gdk_offscreen_window_raise (GdkWindow *window)
685 /* gdk_window_raise already changed the stacking order */
686 _gdk_synthesize_crossing_events_for_geometry_change (window);
690 gdk_offscreen_window_lower (GdkWindow *window)
692 /* gdk_window_lower already changed the stacking order */
693 _gdk_synthesize_crossing_events_for_geometry_change (window);
697 gdk_offscreen_window_move_resize_internal (GdkWindow *window,
702 gboolean send_expose_events)
704 GdkWindowObject *private = (GdkWindowObject *)window;
705 GdkOffscreenWindow *offscreen;
708 GdkPixmap *old_pixmap;
710 offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
717 if (private->destroyed)
722 dw = width - private->width;
723 dh = height - private->height;
728 if (private->width != width ||
729 private->height != height)
733 private->width = width;
734 private->height = height;
736 old_pixmap = offscreen->pixmap;
737 offscreen->pixmap = gdk_pixmap_new (GDK_DRAWABLE (old_pixmap),
742 cr = gdk_cairo_create (offscreen->pixmap);
743 gdk_cairo_set_source_pixmap (cr, old_pixmap, 0, 0);
748 if (GDK_WINDOW_IS_MAPPED (private))
750 // TODO: Only invalidate new area, i.e. for larger windows
751 gdk_window_invalidate_rect (window, NULL, TRUE);
752 _gdk_synthesize_crossing_events_for_geometry_change (window);
757 gdk_offscreen_window_move_resize (GdkWindow *window,
764 GdkWindowObject *private = (GdkWindowObject *)window;
765 GdkOffscreenWindow *offscreen;
767 offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
776 width = private->width;
779 height = private->height;
781 gdk_offscreen_window_move_resize_internal (window, x, y,
787 gdk_offscreen_window_show (GdkWindow *window,
788 gboolean already_mapped)
790 GdkWindowObject *private = (GdkWindowObject *)window;
792 gdk_window_clear_area_e (window, 0, 0,
793 private->width, private->height);
798 gdk_offscreen_window_hide (GdkWindow *window)
800 GdkWindowObject *private;
801 GdkOffscreenWindow *offscreen;
804 g_return_if_fail (window != NULL);
806 private = (GdkWindowObject*) window;
807 offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
809 /* May need to break grabs on children */
810 display = gdk_drawable_get_display (window);
812 /* TODO: This needs updating to the new grab world */
814 if (display->pointer_grab.window != NULL)
816 if (is_parent_of (window, display->pointer_grab.window))
818 /* Call this ourselves, even though gdk_display_pointer_ungrab
819 does so too, since we want to pass implicit == TRUE so the
820 broken grab event is generated */
821 _gdk_display_unset_has_pointer_grab (display,
825 gdk_display_pointer_ungrab (display, GDK_CURRENT_TIME);
832 gdk_offscreen_window_withdraw (GdkWindow *window)
837 gdk_offscreen_window_get_events (GdkWindow *window)
843 gdk_offscreen_window_set_events (GdkWindow *window,
844 GdkEventMask event_mask)
849 gdk_offscreen_window_set_background (GdkWindow *window,
850 const GdkColor *color)
852 GdkWindowObject *private = (GdkWindowObject *)window;
853 GdkColormap *colormap = gdk_drawable_get_colormap (window);
855 private->bg_color = *color;
856 gdk_colormap_query_color (colormap, private->bg_color.pixel, &private->bg_color);
858 if (private->bg_pixmap &&
859 private->bg_pixmap != GDK_PARENT_RELATIVE_BG &&
860 private->bg_pixmap != GDK_NO_BG)
861 g_object_unref (private->bg_pixmap);
863 private->bg_pixmap = NULL;
867 gdk_offscreen_window_set_back_pixmap (GdkWindow *window,
870 GdkWindowObject *private = (GdkWindowObject *)window;
873 private->bg_pixmap != GDK_PARENT_RELATIVE_BG &&
874 private->bg_pixmap != GDK_NO_BG &&
875 !gdk_drawable_get_colormap (pixmap))
877 g_warning ("gdk_window_set_back_pixmap(): pixmap must have a colormap");
881 if (private->bg_pixmap &&
882 private->bg_pixmap != GDK_PARENT_RELATIVE_BG &&
883 private->bg_pixmap != GDK_NO_BG)
884 g_object_unref (private->bg_pixmap);
886 private->bg_pixmap = pixmap;
889 private->bg_pixmap != GDK_PARENT_RELATIVE_BG &&
890 private->bg_pixmap != GDK_NO_BG)
891 g_object_ref (pixmap);
895 gdk_offscreen_window_shape_combine_region (GdkWindow *window,
896 const cairo_region_t *shape_region,
903 gdk_offscreen_window_input_shape_combine_region (GdkWindow *window,
904 const cairo_region_t *shape_region,
911 gdk_offscreen_window_set_static_gravities (GdkWindow *window,
918 gdk_offscreen_window_get_geometry (GdkWindow *window,
925 GdkWindowObject *private = (GdkWindowObject *)window;
927 g_return_if_fail (window == NULL || GDK_IS_WINDOW (window));
929 if (!GDK_WINDOW_DESTROYED (window))
936 *width = private->width;
938 *height = private->height;
940 *depth = private->depth;
945 gdk_offscreen_window_queue_antiexpose (GdkWindow *window,
946 cairo_region_t *area)
952 gdk_offscreen_window_queue_translation (GdkWindow *window,
954 cairo_region_t *area,
961 * gdk_offscreen_window_set_embedder:
962 * @window: a #GdkWindow
963 * @embedder: the #GdkWindow that @window gets embedded in
965 * Sets @window to be embedded in @embedder.
967 * To fully embed an offscreen window, in addition to calling this
968 * function, it is also necessary to handle the #GdkWindow::pick-embedded-child
969 * signal on the @embedder and the #GdkWindow::to-embedder and
970 * #GdkWindow::from-embedder signals on @window.
975 gdk_offscreen_window_set_embedder (GdkWindow *window,
978 GdkWindowObject *private = (GdkWindowObject *)window;
979 GdkOffscreenWindow *offscreen;
981 g_return_if_fail (GDK_IS_WINDOW (window));
983 if (!GDK_IS_OFFSCREEN_WINDOW (private->impl))
986 offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
990 g_object_ref (embedder);
991 GDK_WINDOW_OBJECT (embedder)->num_offscreen_children++;
994 if (offscreen->embedder)
996 g_object_unref (offscreen->embedder);
997 GDK_WINDOW_OBJECT (offscreen->embedder)->num_offscreen_children--;
1000 offscreen->embedder = embedder;
1004 * gdk_offscreen_window_get_embedder:
1005 * @window: a #GdkWindow
1007 * Gets the window that @window is embedded in.
1009 * Returns: the embedding #GdkWindow, or %NULL if @window is not an
1010 * embedded offscreen window
1015 gdk_offscreen_window_get_embedder (GdkWindow *window)
1017 GdkWindowObject *private = (GdkWindowObject *)window;
1018 GdkOffscreenWindow *offscreen;
1020 g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
1022 if (!GDK_IS_OFFSCREEN_WINDOW (private->impl))
1025 offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
1027 return offscreen->embedder;
1031 gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
1033 GdkDrawableClass *drawable_class = GDK_DRAWABLE_CLASS (klass);
1034 GObjectClass *object_class = G_OBJECT_CLASS (klass);
1036 object_class->finalize = gdk_offscreen_window_finalize;
1038 drawable_class->create_gc = gdk_offscreen_window_create_gc;
1039 drawable_class->ref_cairo_surface = gdk_offscreen_window_ref_cairo_surface;
1040 drawable_class->set_colormap = gdk_offscreen_window_set_colormap;
1041 drawable_class->get_colormap = gdk_offscreen_window_get_colormap;
1042 drawable_class->get_depth = gdk_offscreen_window_get_depth;
1043 drawable_class->get_screen = gdk_offscreen_window_get_screen;
1044 drawable_class->get_visual = gdk_offscreen_window_get_visual;
1045 drawable_class->get_source_drawable = gdk_offscreen_window_get_source_drawable;
1046 drawable_class->get_composite_drawable = gdk_offscreen_window_get_composite_drawable;
1048 drawable_class->draw_rectangle = gdk_offscreen_window_draw_rectangle;
1049 drawable_class->draw_drawable_with_src = gdk_offscreen_window_draw_drawable;
1050 drawable_class->draw_points = gdk_offscreen_window_draw_points;
1051 drawable_class->draw_segments = gdk_offscreen_window_draw_segments;
1052 drawable_class->draw_lines = gdk_offscreen_window_draw_lines;
1056 gdk_offscreen_window_impl_iface_init (GdkWindowImplIface *iface)
1058 iface->show = gdk_offscreen_window_show;
1059 iface->hide = gdk_offscreen_window_hide;
1060 iface->withdraw = gdk_offscreen_window_withdraw;
1061 iface->raise = gdk_offscreen_window_raise;
1062 iface->lower = gdk_offscreen_window_lower;
1063 iface->move_resize = gdk_offscreen_window_move_resize;
1064 iface->set_background = gdk_offscreen_window_set_background;
1065 iface->set_back_pixmap = gdk_offscreen_window_set_back_pixmap;
1066 iface->get_events = gdk_offscreen_window_get_events;
1067 iface->set_events = gdk_offscreen_window_set_events;
1068 iface->reparent = gdk_offscreen_window_reparent;
1069 iface->get_geometry = gdk_offscreen_window_get_geometry;
1070 iface->shape_combine_region = gdk_offscreen_window_shape_combine_region;
1071 iface->input_shape_combine_region = gdk_offscreen_window_input_shape_combine_region;
1072 iface->set_static_gravities = gdk_offscreen_window_set_static_gravities;
1073 iface->queue_antiexpose = gdk_offscreen_window_queue_antiexpose;
1074 iface->queue_translation = gdk_offscreen_window_queue_translation;
1075 iface->get_root_coords = gdk_offscreen_window_get_root_coords;
1076 iface->get_deskrelative_origin = gdk_offscreen_window_get_deskrelative_origin;
1077 iface->get_device_state = gdk_offscreen_window_get_device_state;
1078 iface->destroy = gdk_offscreen_window_destroy;