Blame pixman/pixman-region16.c

Packit 030a23
/*
Packit 030a23
 * Copyright © 2008 Red Hat, Inc.
Packit 030a23
 *
Packit 030a23
 * Permission to use, copy, modify, distribute, and sell this software
Packit 030a23
 * and its documentation for any purpose is hereby granted without
Packit 030a23
 * fee, provided that the above copyright notice appear in all copies
Packit 030a23
 * and that both that copyright notice and this permission notice
Packit 030a23
 * appear in supporting documentation, and that the name of
Packit 030a23
 * Red Hat, Inc. not be used in advertising or publicity pertaining to
Packit 030a23
 * distribution of the software without specific, written prior
Packit 030a23
 * permission. Red Hat, Inc. makes no representations about the
Packit 030a23
 * suitability of this software for any purpose.  It is provided "as
Packit 030a23
 * is" without express or implied warranty.
Packit 030a23
 *
Packit 030a23
 * RED HAT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
Packit 030a23
 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
Packit 030a23
 * FITNESS, IN NO EVENT SHALL RED HAT, INC. BE LIABLE FOR ANY SPECIAL,
Packit 030a23
 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
Packit 030a23
 * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
Packit 030a23
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
Packit 030a23
 * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Packit 030a23
 *
Packit 030a23
 * Author: Soren Sandmann <sandmann@redhat.com>
Packit 030a23
 */
Packit 030a23
#ifdef HAVE_CONFIG_H
Packit 030a23
#include <config.h>
Packit 030a23
#endif
Packit 030a23
Packit 030a23
#undef PIXMAN_DISABLE_DEPRECATED
Packit 030a23
Packit 030a23
#include "pixman-private.h"
Packit 030a23
Packit 030a23
#include <stdlib.h>
Packit 030a23
Packit 030a23
typedef pixman_box16_t		box_type_t;
Packit 030a23
typedef pixman_region16_data_t	region_data_type_t;
Packit 030a23
typedef pixman_region16_t	region_type_t;
Packit 030a23
typedef int32_t                 overflow_int_t;
Packit 030a23
Packit 030a23
typedef struct {
Packit 030a23
    int x, y;
Packit 030a23
} point_type_t;
Packit 030a23
Packit 030a23
#define PREFIX(x) pixman_region##x
Packit 030a23
Packit 030a23
#define PIXMAN_REGION_MAX INT16_MAX
Packit 030a23
#define PIXMAN_REGION_MIN INT16_MIN
Packit 030a23
Packit 030a23
#include "pixman-region.c"
Packit 030a23
Packit 030a23
/* This function exists only to make it possible to preserve the X ABI -
Packit 030a23
 * it should go away at first opportunity.
Packit 030a23
 *
Packit 030a23
 * The problem is that the X ABI exports the three structs and has used
Packit 030a23
 * them through macros. So the X server calls this function with
Packit 030a23
 * the addresses of those structs which makes the existing code continue to
Packit 030a23
 * work.
Packit 030a23
 */
Packit 030a23
PIXMAN_EXPORT void
Packit 030a23
pixman_region_set_static_pointers (pixman_box16_t *empty_box,
Packit 030a23
				   pixman_region16_data_t *empty_data,
Packit 030a23
				   pixman_region16_data_t *broken_data)
Packit 030a23
{
Packit 030a23
    pixman_region_empty_box = empty_box;
Packit 030a23
    pixman_region_empty_data = empty_data;
Packit 030a23
    pixman_broken_data = broken_data;
Packit 030a23
}