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