1 /* 2 Arcan Shared Memory Interface 3 4 Copyright (c) 2014-2017, Bjorn Stahl 5 All rights reserved. 6 7 Redistribution and use in source and binary forms, 8 with or without modification, are permitted provided that the 9 following conditions are met: 10 11 1. Redistributions of source code must retain the above copyright notice, 12 this list of conditions and the following disclaimer. 13 14 2. Redistributions in binary form must reproduce the above copyright notice, 15 this list of conditions and the following disclaimer in the documentation 16 and/or other materials provided with the distribution. 17 18 3. Neither the name of the copyright holder nor the names of its contributors 19 may be used to endorse or promote products derived from this software without 20 specific prior written permission. 21 22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 24 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 27 OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32 THE POSSIBILITY OF SUCH DAMAGE. 33 */ 34 35 #ifndef HAVE_ARCAN_SHMIF 36 #define HAVE_ARCAN_SHMIF 37 38 /* 39 * This header pulls in all needed standard library headers, if that is 40 * undesired, hand-pick the individual ones that are needed or disable 41 * this toggle 42 */ 43 44 #if !defined(ARCAN_SHMIF_NO_STDHDR) && !defined(__cplusplus) 45 #include <limits.h> 46 #include <stdlib.h> 47 #include <stdint.h> 48 #include <stdio.h> 49 #include <stdatomic.h> 50 #include <stdbool.h> 51 #include <unistd.h> 52 #include <string.h> 53 #endif 54 55 /* 56 * Hide the memory page automatically for C++, this should be set for C 57 * as well when we ween all programs away from accessing the structure 58 * directly. 59 */ 60 #ifdef __cplusplus 61 #define ARCAN_SHMIF_HIDEPAGE 62 #endif 63 64 #include "arcan_shmif_interop.h" 65 #include "arcan_shmif_event.h" 66 #include "arcan_shmif_control.h" 67 #include "arcan_shmif_defs.h" 68 69 #ifndef __cplusplus 70 #include "arcan_shmif_sub.h" 71 #endif 72 73 #endif 74