1 /** 2 * xrdp: A Remote Desktop Protocol server. 3 * 4 * Copyright (C) Jay Sorg 2016 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * 18 * region, from pixman.h 19 */ 20 21 #if !defined(PIXMAN_PIXMAN_H__) 22 #define PIXMAN_PIXMAN_H__ 23 24 typedef int pixman_bool_t; 25 26 struct pixman_region16_data 27 { 28 long size; 29 long numRects; 30 }; 31 32 struct pixman_box16 33 { 34 signed short x1, y1, x2, y2; 35 }; 36 37 struct pixman_region16 38 { 39 struct pixman_box16 extents; 40 struct pixman_region16_data *data; 41 }; 42 43 enum _pixman_region_overlap_t 44 { 45 PIXMAN_REGION_OUT, 46 PIXMAN_REGION_IN, 47 PIXMAN_REGION_PART 48 }; 49 50 typedef enum _pixman_region_overlap_t pixman_region_overlap_t; 51 52 typedef struct pixman_region16_data pixman_region16_data_t; 53 typedef struct pixman_box16 pixman_box16_t; 54 typedef struct pixman_region16 pixman_region16_t; 55 56 /* creation/destruction */ 57 void pixman_region_init (pixman_region16_t *region); 58 void pixman_region_init_rect (pixman_region16_t *region, 59 /**/ int x, 60 /**/ int y, 61 /**/ unsigned int width, 62 /**/ unsigned int height); 63 void pixman_region_fini (pixman_region16_t *region); 64 pixman_bool_t pixman_region_union (pixman_region16_t *new_reg, 65 /**/ pixman_region16_t *reg1, 66 /**/ pixman_region16_t *reg2); 67 pixman_bool_t pixman_region_subtract (pixman_region16_t *reg_d, 68 /**/ pixman_region16_t *reg_m, 69 /**/ pixman_region16_t *reg_s); 70 pixman_bool_t pixman_region_intersect (pixman_region16_t *new_reg, 71 /**/ pixman_region16_t *reg1, 72 /**/ pixman_region16_t *reg2); 73 pixman_box16_t *pixman_region_rectangles (pixman_region16_t *region, 74 /**/ int *n_rects); 75 76 #endif 77