Blame gdk/quartz/gdkgeometry-quartz.c

Packit 98cdb6
/* gdkgeometry-quartz.c
Packit 98cdb6
 *
Packit 98cdb6
 * Copyright (C) 2005 Imendio AB
Packit 98cdb6
 *
Packit 98cdb6
 * This library is free software; you can redistribute it and/or
Packit 98cdb6
 * modify it under the terms of the GNU Lesser General Public
Packit 98cdb6
 * License as published by the Free Software Foundation; either
Packit 98cdb6
 * version 2 of the License, or (at your option) any later version.
Packit 98cdb6
 *
Packit 98cdb6
 * This library is distributed in the hope that it will be useful,
Packit 98cdb6
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 98cdb6
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 98cdb6
 * Lesser General Public License for more details.
Packit 98cdb6
 *
Packit 98cdb6
 * You should have received a copy of the GNU Lesser General Public
Packit 98cdb6
 * License along with this library; if not, write to the
Packit 98cdb6
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Packit 98cdb6
 * Boston, MA 02111-1307, USA.
Packit 98cdb6
 */
Packit 98cdb6
Packit 98cdb6
#include "config.h"
Packit 98cdb6
Packit 98cdb6
#include "gdkprivate-quartz.h"
Packit 98cdb6
Packit 98cdb6
void
Packit 98cdb6
_gdk_quartz_window_queue_translation (GdkWindow *window,
Packit 98cdb6
				      GdkGC     *gc,
Packit 98cdb6
                                      GdkRegion *area,
Packit 98cdb6
                                      gint       dx,
Packit 98cdb6
                                      gint       dy)
Packit 98cdb6
{
Packit 98cdb6
  GdkWindowObject *private = (GdkWindowObject *)window;
Packit 98cdb6
  GdkWindowImplQuartz *impl = (GdkWindowImplQuartz *)private->impl;
Packit 98cdb6
Packit 98cdb6
  int i, n_rects;
Packit 98cdb6
  GdkRegion *intersection;
Packit 98cdb6
  GdkRectangle *rects;
Packit 98cdb6
Packit 98cdb6
  /* We will intersect the known region that needs display with the given
Packit 98cdb6
   * area.  This intersection will be translated by dx, dy.  For the end
Packit 98cdb6
   * result, we will also set that it needs display.
Packit 98cdb6
   */
Packit 98cdb6
Packit 98cdb6
  if (!impl->needs_display_region)
Packit 98cdb6
    return;
Packit 98cdb6
Packit 98cdb6
  intersection = gdk_region_copy (impl->needs_display_region);
Packit 98cdb6
  gdk_region_intersect (intersection, area);
Packit 98cdb6
  gdk_region_offset (intersection, dx, dy);
Packit 98cdb6
Packit 98cdb6
  gdk_region_get_rectangles (intersection, &rects, &n_rects);
Packit 98cdb6
Packit 98cdb6
  for (i = 0; i < n_rects; i++)
Packit 98cdb6
    _gdk_quartz_window_set_needs_display_in_rect (window, &rects[i]);
Packit 98cdb6
Packit 98cdb6
  g_free (rects);
Packit 98cdb6
  gdk_region_destroy (intersection);
Packit 98cdb6
}
Packit 98cdb6
Packit 98cdb6
gboolean
Packit 98cdb6
_gdk_quartz_window_queue_antiexpose (GdkWindow *window,
Packit 98cdb6
                                     GdkRegion *area)
Packit 98cdb6
{
Packit 98cdb6
  return FALSE;
Packit 98cdb6
}