1#!/bin/bash 2# Copyright 2019 The ChromiumOS Authors 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6cd "${0%/*}" 7 8cat >xlib.rs <<EOF 9// Copyright 2019 The ChromiumOS Authors 10// Use of this source code is governed by a BSD-style license that can be 11// found in the LICENSE file. 12 13//! Generated using ./xlib_generator.sh 14 15#![allow(clippy::upper_case_acronyms)] 16 17#[link(name = "X11")] 18extern "C" {} 19 20#[link(name = "Xext")] 21extern "C" {} 22 23EOF 24 25bindgen --no-layout-tests --no-derive-debug \ 26 --allowlist-function XAllocSizeHints \ 27 --allowlist-function XBlackPixelOfScreen \ 28 --allowlist-function XClearWindow \ 29 --allowlist-function XCloseDisplay \ 30 --allowlist-function XConnectionNumber \ 31 --allowlist-function XCreateGC \ 32 --allowlist-function XCreateSimpleWindow \ 33 --allowlist-function XDefaultDepthOfScreen \ 34 --allowlist-function XDefaultScreenOfDisplay \ 35 --allowlist-function XDefaultVisualOfScreen \ 36 --allowlist-function XDestroyImage \ 37 --allowlist-function XDestroyWindow \ 38 --allowlist-function XFlush \ 39 --allowlist-function XFree \ 40 --allowlist-function XFreeGC \ 41 --allowlist-function XGetVisualInfo \ 42 --allowlist-function XInternAtom \ 43 --allowlist-function XKeycodeToKeysym \ 44 --allowlist-function XMapRaised \ 45 --allowlist-function XNextEvent \ 46 --allowlist-function XOpenDisplay \ 47 --allowlist-function XPending \ 48 --allowlist-function XRootWindowOfScreen \ 49 --allowlist-function XScreenNumberOfScreen \ 50 --allowlist-function XSelectInput \ 51 --allowlist-function XSetWMNormalHints \ 52 --allowlist-function XSetWMProtocols \ 53 --allowlist-function XShmAttach \ 54 --allowlist-function XShmCreateImage \ 55 --allowlist-function XShmDetach \ 56 --allowlist-function XShmGetEventBase \ 57 --allowlist-function XShmPutImage \ 58 --allowlist-function XShmQueryExtension \ 59 --allowlist-function XStoreName \ 60 --allowlist-var 'XK_.*' \ 61 --allowlist-var ButtonPress \ 62 --allowlist-var ButtonPressMask \ 63 --allowlist-var Button1 \ 64 --allowlist-var Button1Mask \ 65 --allowlist-var ButtonRelease \ 66 --allowlist-var ButtonReleaseMask \ 67 --allowlist-var ClientMessage \ 68 --allowlist-var Expose \ 69 --allowlist-var ExposureMask \ 70 --allowlist-var KeyPress \ 71 --allowlist-var KeyPressMask \ 72 --allowlist-var KeyRelease \ 73 --allowlist-var KeyReleaseMask \ 74 --allowlist-var MotionNotify \ 75 --allowlist-var PMaxSize \ 76 --allowlist-var PMinSize \ 77 --allowlist-var PointerMotionMask \ 78 --allowlist-var ShmCompletion \ 79 --allowlist-var VisualBlueMaskMask \ 80 --allowlist-var VisualDepthMask \ 81 --allowlist-var VisualGreenMaskMask \ 82 --allowlist-var VisualRedMaskMask \ 83 --allowlist-var VisualScreenMask \ 84 --allowlist-var ZPixmap \ 85 --allowlist-type Display \ 86 --allowlist-type GC \ 87 --allowlist-type Screen \ 88 --allowlist-type XShmCompletionEvent \ 89 --allowlist-type ShmSeg \ 90 --allowlist-type Visual \ 91 --allowlist-type Window \ 92 --allowlist-type XVisualInfo \ 93 xlib_wrapper.h >>xlib.rs 94