1*84e872a0SLloyd Pique /* SCANNER TEST */ 2*84e872a0SLloyd Pique 3*84e872a0SLloyd Pique /* 4*84e872a0SLloyd Pique * Copyright © 2016 Collabora, Ltd. 5*84e872a0SLloyd Pique * 6*84e872a0SLloyd Pique * Permission is hereby granted, free of charge, to any person 7*84e872a0SLloyd Pique * obtaining a copy of this software and associated documentation files 8*84e872a0SLloyd Pique * (the "Software"), to deal in the Software without restriction, 9*84e872a0SLloyd Pique * including without limitation the rights to use, copy, modify, merge, 10*84e872a0SLloyd Pique * publish, distribute, sublicense, and/or sell copies of the Software, 11*84e872a0SLloyd Pique * and to permit persons to whom the Software is furnished to do so, 12*84e872a0SLloyd Pique * subject to the following conditions: 13*84e872a0SLloyd Pique * 14*84e872a0SLloyd Pique * The above copyright notice and this permission notice (including the 15*84e872a0SLloyd Pique * next paragraph) shall be included in all copies or substantial 16*84e872a0SLloyd Pique * portions of the Software. 17*84e872a0SLloyd Pique * 18*84e872a0SLloyd Pique * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19*84e872a0SLloyd Pique * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20*84e872a0SLloyd Pique * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21*84e872a0SLloyd Pique * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 22*84e872a0SLloyd Pique * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 23*84e872a0SLloyd Pique * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 24*84e872a0SLloyd Pique * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 25*84e872a0SLloyd Pique * SOFTWARE. 26*84e872a0SLloyd Pique */ 27*84e872a0SLloyd Pique 28*84e872a0SLloyd Pique #include <stdlib.h> 29*84e872a0SLloyd Pique #include <stdint.h> 30*84e872a0SLloyd Pique #include "wayland-util.h" 31*84e872a0SLloyd Pique 32*84e872a0SLloyd Pique #ifndef __has_attribute 33*84e872a0SLloyd Pique # define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ 34*84e872a0SLloyd Pique #endif 35*84e872a0SLloyd Pique 36*84e872a0SLloyd Pique #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) 37*84e872a0SLloyd Pique #define WL_PRIVATE __attribute__ ((visibility("hidden"))) 38*84e872a0SLloyd Pique #else 39*84e872a0SLloyd Pique #define WL_PRIVATE 40*84e872a0SLloyd Pique #endif 41*84e872a0SLloyd Pique 42*84e872a0SLloyd Pique extern const struct wl_interface another_intf_interface; 43*84e872a0SLloyd Pique extern const struct wl_interface intf_not_here_interface; 44*84e872a0SLloyd Pique 45*84e872a0SLloyd Pique static const struct wl_interface *small_test_types[] = { 46*84e872a0SLloyd Pique NULL, 47*84e872a0SLloyd Pique &intf_not_here_interface, 48*84e872a0SLloyd Pique NULL, 49*84e872a0SLloyd Pique NULL, 50*84e872a0SLloyd Pique NULL, 51*84e872a0SLloyd Pique NULL, 52*84e872a0SLloyd Pique NULL, 53*84e872a0SLloyd Pique &another_intf_interface, 54*84e872a0SLloyd Pique }; 55*84e872a0SLloyd Pique 56*84e872a0SLloyd Pique static const struct wl_message intf_A_requests[] = { 57*84e872a0SLloyd Pique { "rq1", "sun", small_test_types + 0 }, 58*84e872a0SLloyd Pique { "rq2", "nsiufho", small_test_types + 1 }, 59*84e872a0SLloyd Pique { "destroy", "", small_test_types + 0 }, 60*84e872a0SLloyd Pique }; 61*84e872a0SLloyd Pique 62*84e872a0SLloyd Pique static const struct wl_message intf_A_events[] = { 63*84e872a0SLloyd Pique { "hey", "", small_test_types + 0 }, 64*84e872a0SLloyd Pique }; 65*84e872a0SLloyd Pique 66*84e872a0SLloyd Pique WL_PRIVATE const struct wl_interface intf_A_interface = { 67*84e872a0SLloyd Pique "intf_A", 3, 68*84e872a0SLloyd Pique 3, intf_A_requests, 69*84e872a0SLloyd Pique 1, intf_A_events, 70*84e872a0SLloyd Pique }; 71*84e872a0SLloyd Pique 72