Debian Codegraph @

gdk/quartz/gdkgeometry-quartz.c

raw
1 /* gdkgeometry-quartz.c
2 *
3 * Copyright (C) 2005 Imendio AB
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21 #include "config.h"
22
23 #include "gdkprivate-quartz.h"
24
25 void
26 _gdk_quartz_window_queue_translation (GdkWindow *window,
27 GdkGC *gc,
28 GdkRegion *area,
29 gint dx,
30 gint dy)
31 {
32 GdkWindowObject *private = (GdkWindowObject *)window;
33 GdkWindowImplQuartz *impl = (GdkWindowImplQuartz *)private->impl;
34
35 int i, n_rects;
36 GdkRegion *intersection;
37 GdkRectangle *rects;
38
39 /* We will intersect the known region that needs display with the given
40 * area. This intersection will be translated by dx, dy. For the end
41 * result, we will also set that it needs display.
42 */
43
44 if (!impl->needs_display_region)
45 return;
46
47 intersection = gdk_region_copy (impl->needs_display_region);
48 gdk_region_intersect (intersection, area);
49 gdk_region_offset (intersection, dx, dy);
50
51 gdk_region_get_rectangles (intersection, &rects, &n_rects);
52
53 for (i = 0; i < n_rects; i++)
54 _gdk_quartz_window_set_needs_display_in_rect (window, &rects[i]);
55
56 g_free (rects);
57 gdk_region_destroy (intersection);
58 }
59
60 gboolean
61 _gdk_quartz_window_queue_antiexpose (GdkWindow *window,
62 GdkRegion *area)
63 {
64 return FALSE;
65 }