parent
660132a49d
commit
58c777783b
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,73 @@
|
||||
/**
|
||||
* xrdp: A Remote Desktop Protocol server.
|
||||
*
|
||||
* Copyright (C) Jay Sorg 2016
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* region, from pixman.h
|
||||
*/
|
||||
|
||||
#if !defined(PIXMAN_PIXMAN_H__)
|
||||
#define PIXMAN_PIXMAN_H__
|
||||
|
||||
typedef int pixman_bool_t;
|
||||
|
||||
struct pixman_region16_data
|
||||
{
|
||||
long size;
|
||||
long numRects;
|
||||
};
|
||||
|
||||
struct pixman_box16
|
||||
{
|
||||
signed short x1, y1, x2, y2;
|
||||
};
|
||||
|
||||
struct pixman_region16
|
||||
{
|
||||
struct pixman_box16 extents;
|
||||
struct pixman_region16_data *data;
|
||||
};
|
||||
|
||||
enum _pixman_region_overlap_t
|
||||
{
|
||||
PIXMAN_REGION_OUT,
|
||||
PIXMAN_REGION_IN,
|
||||
PIXMAN_REGION_PART
|
||||
};
|
||||
|
||||
typedef enum _pixman_region_overlap_t pixman_region_overlap_t;
|
||||
|
||||
typedef struct pixman_region16_data pixman_region16_data_t;
|
||||
typedef struct pixman_box16 pixman_box16_t;
|
||||
typedef struct pixman_region16 pixman_region16_t;
|
||||
|
||||
/* creation/destruction */
|
||||
void pixman_region_init (pixman_region16_t *region);
|
||||
void pixman_region_init_rect (pixman_region16_t *region,
|
||||
int x,
|
||||
int y,
|
||||
unsigned int width,
|
||||
unsigned int height);
|
||||
void pixman_region_fini (pixman_region16_t *region);
|
||||
pixman_bool_t pixman_region_union (pixman_region16_t *new_reg,
|
||||
pixman_region16_t *reg1,
|
||||
pixman_region16_t *reg2);
|
||||
pixman_bool_t pixman_region_subtract (pixman_region16_t *reg_d,
|
||||
pixman_region16_t *reg_m,
|
||||
pixman_region16_t *reg_s);
|
||||
pixman_box16_t * pixman_region_rectangles (pixman_region16_t *region,
|
||||
int *n_rects);
|
||||
|
||||
#endif
|
@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright © 2008 Red Hat, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software
|
||||
* and its documentation for any purpose is hereby granted without
|
||||
* fee, provided that the above copyright notice appear in all copies
|
||||
* and that both that copyright notice and this permission notice
|
||||
* appear in supporting documentation, and that the name of
|
||||
* Red Hat, Inc. not be used in advertising or publicity pertaining to
|
||||
* distribution of the software without specific, written prior
|
||||
* permission. Red Hat, Inc. makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as
|
||||
* is" without express or implied warranty.
|
||||
*
|
||||
* RED HAT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
|
||||
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS, IN NO EVENT SHALL RED HAT, INC. BE LIABLE FOR ANY SPECIAL,
|
||||
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
|
||||
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* Author: Soren Sandmann <sandmann@redhat.com>
|
||||
*/
|
||||
|
||||
/* taken from pixman 0.34
|
||||
altered to compile without all of pixman */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "pixman-region.h"
|
||||
|
||||
#define UINT32_MAX (4294967295U)
|
||||
#define INT16_MIN (-32767-1)
|
||||
#define INT16_MAX (32767)
|
||||
|
||||
#define PIXMAN_EXPORT
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
|
||||
#define MIN(x1, x2) ((x1) < (x2) ? (x1) : (x2))
|
||||
#define MAX(x1, x2) ((x1) > (x2) ? (x1) : (x2))
|
||||
|
||||
typedef int pixman_bool_t;
|
||||
|
||||
typedef pixman_box16_t box_type_t;
|
||||
typedef pixman_region16_data_t region_data_type_t;
|
||||
typedef pixman_region16_t region_type_t;
|
||||
typedef signed int overflow_int_t;
|
||||
|
||||
#define PREFIX(x) pixman_region##x
|
||||
|
||||
#define PIXMAN_REGION_MAX INT16_MAX
|
||||
#define PIXMAN_REGION_MIN INT16_MIN
|
||||
|
||||
#define FUNC "func"
|
||||
|
||||
#define critical_if_fail(expr)
|
||||
|
||||
int _pixman_log_error(const char *func, const char *format, ...)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#include "pixman-region.c"
|
||||
|
Loading…
Reference in new issue