"Fossies" - the Fresh Open Source Software Archive

Member "wayland-1.18.0/tests/data/small-code.c" (11 Feb 2020, 1913 Bytes) of package /linux/misc/wayland-1.18.0.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "small-code.c": 1.17.0_vs_1.18.0.

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