1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/cairo/libpixman/src/pixman-region16.c Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,67 @@ 1.4 +/* 1.5 + * Copyright © 2008 Red Hat, Inc. 1.6 + * 1.7 + * Permission to use, copy, modify, distribute, and sell this software 1.8 + * and its documentation for any purpose is hereby granted without 1.9 + * fee, provided that the above copyright notice appear in all copies 1.10 + * and that both that copyright notice and this permission notice 1.11 + * appear in supporting documentation, and that the name of 1.12 + * Red Hat, Inc. not be used in advertising or publicity pertaining to 1.13 + * distribution of the software without specific, written prior 1.14 + * permission. Red Hat, Inc. makes no representations about the 1.15 + * suitability of this software for any purpose. It is provided "as 1.16 + * is" without express or implied warranty. 1.17 + * 1.18 + * RED HAT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 1.19 + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 1.20 + * FITNESS, IN NO EVENT SHALL RED HAT, INC. BE LIABLE FOR ANY SPECIAL, 1.21 + * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER 1.22 + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 1.23 + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 1.24 + * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1.25 + * 1.26 + * Author: Soren Sandmann <sandmann@redhat.com> 1.27 + */ 1.28 +#ifdef HAVE_CONFIG_H 1.29 +#include <config.h> 1.30 +#endif 1.31 + 1.32 +#undef PIXMAN_DISABLE_DEPRECATED 1.33 + 1.34 +#include "pixman-private.h" 1.35 + 1.36 +#include <stdlib.h> 1.37 + 1.38 +typedef pixman_box16_t box_type_t; 1.39 +typedef pixman_region16_data_t region_data_type_t; 1.40 +typedef pixman_region16_t region_type_t; 1.41 +typedef int32_t overflow_int_t; 1.42 + 1.43 +typedef struct { 1.44 + int x, y; 1.45 +} point_type_t; 1.46 + 1.47 +#define PREFIX(x) pixman_region##x 1.48 + 1.49 +#define PIXMAN_REGION_MAX INT16_MAX 1.50 +#define PIXMAN_REGION_MIN INT16_MIN 1.51 + 1.52 +#include "pixman-region.c" 1.53 + 1.54 +/* This function exists only to make it possible to preserve the X ABI - 1.55 + * it should go away at first opportunity. 1.56 + * 1.57 + * The problem is that the X ABI exports the three structs and has used 1.58 + * them through macros. So the X server calls this function with 1.59 + * the addresses of those structs which makes the existing code continue to 1.60 + * work. 1.61 + */ 1.62 +PIXMAN_EXPORT void 1.63 +pixman_region_set_static_pointers (pixman_box16_t *empty_box, 1.64 + pixman_region16_data_t *empty_data, 1.65 + pixman_region16_data_t *broken_data) 1.66 +{ 1.67 + pixman_region_empty_box = empty_box; 1.68 + pixman_region_empty_data = empty_data; 1.69 + pixman_broken_data = broken_data; 1.70 +}