deleted file mode 100644
--- a/third_party/rust/cgl/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"944bf600c6230664922a011cbca026699969f2f89f6c7ff689835836ccd7b1de",".travis.yml":"ea512c9287deceaab4ee436a1246874c84e7a422a90cd3aa3e8f9d3121824674","COPYING":"ec82b96487e9e778ee610c7ab245162464782cfa1f555c2299333f8dbe5c036a","Cargo.toml":"95753be1a55ae87129e69f594f2dc3f14a4f6df4401296aad9fde35b40177814","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"62065228e42caebca7e7d7db1204cbb867033de5982ca4009928915e4095f3a3","README.md":"5b2cad1e1bd53b9f986974a23dbcbd951270a567d6c661f3584707d7ad198e82","src/cgl.rs":"d41fea7f18c07912f485d041baeb99010023084b449af69c6c92dfdcaf1c96e8","src/lib.rs":"8a86ac23aaea868d951a1c51300670d1eda525681d0b144964a6c81737f485e6"},"package":"86765cb42c2a2c497e142af72517c1b4d7ae5bb2f25dfa77a5c69642f2342d89"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/cgl/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Cargo.lock
-target
deleted file mode 100644
--- a/third_party/rust/cgl/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-os: osx
-language: rust
-sudo: false
-branches:
- except:
- - master
-notifications:
- webhooks: http://build.servo.org:54856/travis
deleted file mode 100644
--- a/third_party/rust/cgl/COPYING
+++ /dev/null
@@ -1,5 +0,0 @@
-Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-<LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-option. All files in the project carrying such notice may not be
-copied, modified, or distributed except according to those terms.
deleted file mode 100644
--- a/third_party/rust/cgl/Cargo.toml
+++ /dev/null
@@ -1,11 +0,0 @@
-[package]
-name = "cgl"
-license = "MIT / Apache-2.0"
-version = "0.2.1"
-authors = ["The Servo Project Developers"]
-description = "Rust bindings for CGL on Mac"
-repository = "https://github.com/servo/cgl-rs"
-
-[dependencies]
-libc = "0.2"
-gleam = "0.4"
deleted file mode 100644
--- a/third_party/rust/cgl/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/cgl/LICENSE-MIT
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2012-2013 Mozilla Foundation
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/cgl/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-rust-cgl
-========
-
-Rust bindings for CGL on Mac
deleted file mode 100644
--- a/third_party/rust/cgl/src/cgl.rs
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright 2013 The Servo Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Mac-specific OpenGL bindings.
-
-#![allow(non_upper_case_globals)]
-
-use gleam::gl::{GLenum, GLint, GLsizei, GLuint};
-use libc::{c_void, c_int, c_char};
-
-pub type CGLPixelFormatAttribute = c_int;
-pub type CGLContextParameter = c_int;
-pub type CGLContextEnable = c_int;
-pub type CGLGlobalOption = c_int;
-pub type CGLError = c_int;
-
-pub type CGLPixelFormatObj = *mut c_void;
-pub type CGLContextObj = *mut c_void;
-pub type CGLShareGroupObj = *mut c_void;
-pub type IOSurfaceRef = *mut c_void;
-
-pub const kCGLNoError: CGLError = 0;
-
-pub const kCGLPFAAllRenderers: CGLPixelFormatAttribute = 1;
-pub const kCGLPFADoubleBuffer: CGLPixelFormatAttribute = 5;
-pub const kCGLPFAStereo: CGLPixelFormatAttribute = 6;
-pub const kCGLPFAAuxBuffers: CGLPixelFormatAttribute = 7;
-pub const kCGLPFAColorSize: CGLPixelFormatAttribute = 8;
-pub const kCGLPFAAlphaSize: CGLPixelFormatAttribute = 11;
-pub const kCGLPFADepthSize: CGLPixelFormatAttribute = 12;
-pub const kCGLPFAStencilSize: CGLPixelFormatAttribute = 13;
-pub const kCGLPFAAccumSize: CGLPixelFormatAttribute = 14;
-pub const kCGLPFAMinimumPolicy: CGLPixelFormatAttribute = 51;
-pub const kCGLPFAMaximumPolicy: CGLPixelFormatAttribute = 52;
-pub const kCGLPFAOffScreen: CGLPixelFormatAttribute = 53;
-pub const kCGLPFAFullScreen: CGLPixelFormatAttribute = 54;
-pub const kCGLPFASampleBuffers: CGLPixelFormatAttribute = 55;
-pub const kCGLPFASamples: CGLPixelFormatAttribute = 56;
-pub const kCGLPFAAuxDepthStencil: CGLPixelFormatAttribute = 57;
-pub const kCGLPFAColorFloat: CGLPixelFormatAttribute = 58;
-pub const kCGLPFAMultisample: CGLPixelFormatAttribute = 59;
-pub const kCGLPFASupersample: CGLPixelFormatAttribute = 60;
-pub const kCGLPFASampleAlpha: CGLPixelFormatAttribute = 61;
-pub const kCGLPFARendererID: CGLPixelFormatAttribute = 70;
-pub const kCGLPFASingleRenderer: CGLPixelFormatAttribute = 71;
-pub const kCGLPFANoRecovery: CGLPixelFormatAttribute = 72;
-pub const kCGLPFAAccelerated: CGLPixelFormatAttribute = 73;
-pub const kCGLPFAClosestPolicy: CGLPixelFormatAttribute = 74;
-pub const kCGLPFARobust: CGLPixelFormatAttribute = 75;
-pub const kCGLPFABackingStore: CGLPixelFormatAttribute = 76;
-pub const kCGLPFAMPSafe: CGLPixelFormatAttribute = 78;
-pub const kCGLPFAWindow: CGLPixelFormatAttribute = 80;
-pub const kCGLPFAMultiScreen: CGLPixelFormatAttribute = 81;
-pub const kCGLPFACompliant: CGLPixelFormatAttribute = 83;
-pub const kCGLPFADisplayMask: CGLPixelFormatAttribute = 84;
-pub const kCGLPFAPBuffer: CGLPixelFormatAttribute = 90;
-pub const kCGLPFARemotePBuffer: CGLPixelFormatAttribute = 91;
-pub const kCGLPFAAllowOfflineRenderers: CGLPixelFormatAttribute = 96;
-pub const kCGLPFAAcceleratedCompute: CGLPixelFormatAttribute = 97;
-pub const kCGLPFAOpenGLProfile: CGLPixelFormatAttribute = 99;
-pub const kCGLPFAVirtualScreenCount: CGLPixelFormatAttribute = 128;
-
-pub const kCGLCESwapRectangle: CGLContextEnable = 201;
-pub const kCGLCESwapLimit: CGLContextEnable = 203;
-pub const kCGLCERasterization: CGLContextEnable = 221;
-pub const kCGLCEStateValidation: CGLContextEnable = 301;
-pub const kCGLCESurfaceBackingSize: CGLContextEnable = 305;
-pub const kCGLCEDisplayListOptimization: CGLContextEnable = 307;
-pub const kCGLCEMPEngine: CGLContextEnable = 313;
-pub const kCGLCECrashOnRemovedFunctions: CGLContextEnable = 316;
-
-pub const kCGLCPSwapRectangle: CGLContextParameter = 200;
-pub const kCGLCPSwapInterval: CGLContextParameter = 222;
-pub const kCGLCPDispatchTableSize: CGLContextParameter = 224;
-pub const kCGLCPClientStorage: CGLContextParameter = 226;
-pub const kCGLCPSurfaceTexture: CGLContextParameter = 228;
-pub const kCGLCPSurfaceOrder: CGLContextParameter = 235;
-pub const kCGLCPSurfaceOpacity: CGLContextParameter = 236;
-pub const kCGLCPSurfaceBackingSize: CGLContextParameter = 304;
-pub const kCGLCPSurfaceSurfaceVolatile: CGLContextParameter = 306;
-pub const kCGLCPReclaimResources: CGLContextParameter = 308;
-pub const kCGLCPCurrentRendererID: CGLContextParameter = 309;
-pub const kCGLCPGPUVertexProcessing: CGLContextParameter = 310;
-pub const kCGLCPGPUFragmentProcessing: CGLContextParameter = 311;
-pub const kCGLCPHasDrawable: CGLContextParameter = 314;
-pub const kCGLCPMPSwapsInFlight: CGLContextParameter = 315;
-
-pub const kCGLGOFormatCacheSize: CGLGlobalOption = 501;
-pub const kCGLGOClearFormatCache: CGLGlobalOption = 502;
-pub const kCGLGORetainRenderers: CGLGlobalOption = 503;
-pub const kCGLGOResetLibrary: CGLGlobalOption = 504;
-pub const kCGLGOUseErrorHandler: CGLGlobalOption = 505;
-pub const kCGLGOUseBuildCache: CGLGlobalOption = 506;
-
-pub const CORE_BOOLEAN_ATTRIBUTES: &'static [CGLPixelFormatAttribute] =
- &[kCGLPFAAllRenderers,
- kCGLPFADoubleBuffer,
- kCGLPFAStereo,
- kCGLPFAAuxBuffers,
- kCGLPFAMinimumPolicy,
- kCGLPFAMaximumPolicy,
- kCGLPFAOffScreen,
- kCGLPFAFullScreen,
- kCGLPFAAuxDepthStencil,
- kCGLPFAColorFloat,
- kCGLPFAMultisample,
- kCGLPFASupersample,
- kCGLPFASampleAlpha,
- kCGLPFASingleRenderer,
- kCGLPFANoRecovery,
- kCGLPFAAccelerated,
- kCGLPFAClosestPolicy,
- kCGLPFARobust,
- kCGLPFABackingStore,
- kCGLPFAMPSafe,
- kCGLPFAWindow,
- kCGLPFAMultiScreen,
- kCGLPFACompliant,
- kCGLPFAPBuffer,
- kCGLPFARemotePBuffer,
- kCGLPFAAllowOfflineRenderers,
- kCGLPFAAcceleratedCompute];
-
-pub const CORE_INTEGER_ATTRIBUTES: &'static [CGLPixelFormatAttribute] =
- &[kCGLPFAColorSize,
- kCGLPFAAlphaSize,
- kCGLPFADepthSize,
- kCGLPFAStencilSize,
- kCGLPFAAccumSize,
- kCGLPFASampleBuffers,
- kCGLPFASamples,
- kCGLPFARendererID,
- kCGLPFADisplayMask,
- kCGLPFAOpenGLProfile,
- kCGLPFAVirtualScreenCount];
-
-#[link(name = "OpenGL", kind = "framework")]
-extern {
- // CGLCurrent.h
-
- pub fn CGLSetCurrentContext(ctx: CGLContextObj) -> CGLError;
- pub fn CGLGetCurrentContext() -> CGLContextObj;
- pub fn CGLGetShareGroup(context: CGLContextObj) -> CGLShareGroupObj;
-
- // OpenGL.h
-
- // Pixel format functions
- pub fn CGLChoosePixelFormat(attribs: *const CGLPixelFormatAttribute,
- pix: *mut CGLPixelFormatObj,
- npix: *mut GLint) -> CGLError;
- pub fn CGLDescribePixelFormat(pix: CGLPixelFormatObj,
- pix_num: GLint,
- attrib: CGLPixelFormatAttribute,
- value: *mut GLint) -> CGLError;
- pub fn CGLDestroyPixelFormat(pix: CGLPixelFormatObj) -> CGLError;
-
- // Context functions
- pub fn CGLCreateContext(pix: CGLPixelFormatObj, share: CGLContextObj, ctx: *mut CGLContextObj) ->
- CGLError;
- pub fn CGLDestroyContext(ctx: CGLContextObj) -> CGLError;
- pub fn CGLGetPixelFormat(ctx: CGLContextObj) -> CGLPixelFormatObj;
-
- // Getting and Setting Context Options
- pub fn CGLEnable(ctx: CGLContextObj, pname: CGLContextEnable) -> CGLError;
- pub fn CGLDisable(ctx: CGLContextObj, pname: CGLContextEnable) -> CGLError;
- pub fn CGLIsEnabled(ctx: CGLContextObj, pname: CGLContextEnable, enable: &mut GLint) -> CGLError;
- pub fn CGLSetParameter(ctx: CGLContextObj, pname: CGLContextParameter, params: &GLint) -> CGLError;
- pub fn CGLGetParameter(ctx: CGLContextObj, pname: CGLContextParameter, params: &mut GLint) -> CGLError;
-
- // Locking functions
- pub fn CGLLockContext(ctx: CGLContextObj) -> CGLError;
- pub fn CGLUnlockContext(ctx: CGLContextObj) -> CGLError;
-
- // Getting and Setting Global Information
- pub fn CGLSetOption(pname: CGLGlobalOption, param: &GLint) -> CGLError;
- pub fn CGLGetOption(pname: CGLGlobalOption, param: &mut GLint) -> CGLError;
- pub fn CGLSetGlobalOption(pname: CGLGlobalOption, param: &GLint) -> CGLError;
- pub fn CGLGetGlobalOption(pname: CGLGlobalOption, param: &mut GLint) -> CGLError;
- pub fn CGLGetVersion (major: &mut GLint, minor: &mut GLint) -> CGLError;
-
- // CGLIOSurface.h
-
- pub fn CGLTexImageIOSurface2D(ctx: CGLContextObj, target: GLenum, internal_format: GLenum,
- width: GLsizei, height: GLsizei, format: GLenum, ty: GLenum,
- ioSurface: IOSurfaceRef, plane: GLuint) -> CGLError;
-
- // https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGL_OpenGL/#//apple_ref/c/func/CGLErrorString
-
- pub fn CGLErrorString(error: CGLError) -> *const c_char;
-}
deleted file mode 100644
--- a/third_party/rust/cgl/src/lib.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 The Servo Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![crate_name = "cgl"]
-#![crate_type = "lib"]
-
-extern crate libc;
-extern crate gleam;
-
-pub use cgl::*;
-
-mod cgl;
deleted file mode 100644
--- a/third_party/rust/error-chain/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"ed8bb3864902ddf6322e6b1d6358bcaec9b51382a5216b9526ad0987ae430b0d",".travis.yml":"d56246d6c8796c638b5012c2d7a91d9b6ec101b6a47128e2d4bfa957c1c784e8","CHANGELOG.md":"8eb613d4a417752d4d1c81e065853e5ba0a21530e0881886c2ae4ffbf0ce57cd","Cargo.toml":"9e551bbef17e031db548e1a81f52d249c94db73a194daf0fe2906bc9404b9805","README.md":"6771ca940645b2f7e7a018c8cd25b25f8bf35786e229b54fa2fded1f2d0ae411","examples/all.rs":"2e6d530e95907bde1e49bda7fde7167568d08a370ade44a153612e2d1cb899d7","examples/doc.rs":"574948eb776c3d363f5cff9a48015bab6c17828c7306dc3eb8818afa90a31a83","examples/quickstart.rs":"0cd227741ed3559c0ead90dcc643cef30b73255d9c9f15c2ee20c4a1085d6f5c","examples/size.rs":"7922acd891dfd06f1d36308a3ccdf03def2646b2f39bfd1b15cf2896247bad8f","src/error_chain.rs":"236c4feead97661b33541434ae71f32c279738a81d0d4b7ce9c50550d5d6a662","src/example_generated.rs":"edaead3c4911afd0a0870cfcab11f8835eb17447031d227bbb5d17210379f778","src/lib.rs":"14ce5d1e76185e762db2414b51411095ddd38207a6f4d9dd50d4a041e7b77d88","src/quick_error.rs":"1889b9ca1f7a5e9124275fd5da81e709d0d6bd3b06915bf320c23d4c4f083301","src/quick_main.rs":"755028c2b4305482a1ab86f8b1b68a95eac22b331c94e14d29777dc69dad1bf4","tests/quick_main.rs":"1d6a726856b954d4cffddab00602583921972ceeeb2bf7ba9ebbac6a51584b53","tests/tests.rs":"2f7ceee2f9808d0985c848d99fe967e8f0b549cf144d4d692a5c5d1c2ba7d660"},"package":"318cb3c71ee4cdea69fdc9e15c173b245ed6063e1709029e8fd32525a881120f"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/error-chain/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*~
-target/
-Cargo.lock
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/error-chain/.travis.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-language: rust
-rust:
-- stable
-- beta
-- nightly
-# Oldest supported version for all features.
-# Use of https://github.com/rust-lang/rfcs/pull/16
-- 1.13.0
-# Oldest supported version as dependency, with no features, tests, or examples.
-- 1.10.0
-
-sudo: false
-cache: cargo
-addons:
- apt:
- packages:
- - libcurl4-openssl-dev
- - libelf-dev
- - libdw-dev
-
-before_script:
-- |
- pip install 'travis-cargo<0.2' --user &&
- export PATH=$HOME/.local/bin:$PATH
-
-script:
-- travis-cargo build -- $FEATURES
-- travis-cargo --skip 1.10.0 test -- $FEATURES
-
-after_success:
-- travis-cargo --only stable doc
-- travis-cargo --only stable doc-upload
-
-env:
- global:
- - secure: ncxJbvJM1vCZfcEftjsFKJMxxhKLgWKaR8Go9AMo0VB5fB2XVW/6NYO5bQEEYpOf1Nc/+2FbI2+Dkz0S/mJpUcNSfBgablCHgwU2sHse7KsoaqfHj2mf1E3exjzSHoP96hPGicC5zAjSXFjCgJPOUSGqqRaJ7z5AsJLhJT6LuK7QpvwPBZzklUN8T+n1sVmws8TNmRIbaniq/q6wYHANHcy6Dl59dx4sKwniUGiZdUhCiddVpoxbECSxc0A8mN2pk7/aW+WGxK3goBs5ZF7+JXF318F62pDcXQmR5CX6WdpenIcJ25g1Vg1WhQ4Ifpe17CN0bfxV8ShuzrQUThCDMffZCo9XySBtODdEowwK1UIpjnFLfIxjOs45Cd8o3tM2j0CfvtnjOz6BCdUU0qiwNPPNx0wFkx3ZiOfSh+FhBhvyPM12HN2tdN0esgVBItFmEci+sSIIXqjVL6DNiu5zTjbu0bs6COwlUWdmL6vmsZtq5tl7Cno9+C3szxRVAkShGydd04l9NYjqNEzTa1EPG50OsnVRKGdRiFzSxhc3BWExNKvcQ4v867t6/PpPkW6s4oXmYI3+De+8O7ExWc6a4alcrDXKlMs5fCb5Pcd4Ju9kowcjkoJo5yf2wW3Ox5R8SJpaEEpvyhx5O/qtIxjhHNzeo8Wsr/6gdNDv20r91TI=
- - TRAVIS_CARGO_NIGHTLY_FEATURE=""
- matrix:
- - FEATURES=--features=backtrace
- - FEATURES=--no-default-features
-
-matrix:
- exclude:
- - env: FEATURES=--features=backtrace
- rust: 1.10.0
deleted file mode 100644
--- a/third_party/rust/error-chain/CHANGELOG.md
+++ /dev/null
@@ -1,82 +0,0 @@
-# Unreleased
-
-# 0.7.2
-
-- Add `quick_main!` (#88).
-- `allow(unused)` for the `Result` wrapper.
-- Minimum rust version supported is not 1.10 on some conditions (#103).
-
-# 0.7.1
-
-- [Add the `bail!` macro](https://github.com/brson/error-chain/pull/76)
-
-# 0.7.0
-
-- [Rollback several design changes to fix regressions](https://github.com/brson/error-chain/pull/75)
-- New `Variant(Error) #[attrs]` for `links` and `foreign_links`.
-- Hide implementation details from the doc.
-- Always generate `Error::backtrace`.
-
-# 0.6.2
-
-- Allow dead code.
-
-# 0.6.1
-
-- Fix wrong trait constraint in ResultExt implementation (#66).
-
-# 0.6.0
-
-- Conditional compilation for error variants.
-- Backtrace generation is now a feature.
-- More standard trait implementations for extra convenience.
-- Remove ChainErr.
-- Remove need to specify `ErrorKind` in `links {}`.
-- Add ResultExt trait.
-- Error.1 is a struct instead of a tuple.
-- Error is now a struct.
-- The declarations order is more flexible.
-- Way better error reporting when there is a syntax error in the macro call.
-- `Result` generation can be disabled.
-- At most one declaration of each type can be present.
-
-# 0.5.0
-
-- [Only generate backtraces with RUST_BACKTRACE set](https://github.com/brson/error-chain/pull/27)
-- [Fixup matching, disallow repeating "types" section](https://github.com/brson/error-chain/pull/26)
-- [Fix tests on stable/beta](https://github.com/brson/error-chain/pull/28)
-- [Only deploy docs when tagged](https://github.com/brson/error-chain/pull/30)
-
-Contributors: benaryorg, Brian Anderson, Georg Brandl
-
-# 0.4.2
-
-- [Fix the resolution of the ErrorKind description method](https://github.com/brson/error-chain/pull/24)
-
-Contributors: Brian Anderson
-
-# 0.4.1 (yanked)
-
-- [Fix a problem with resolving methods of the standard Error type](https://github.com/brson/error-chain/pull/22)
-
-Contributors: Brian Anderson
-
-# 0.4.0 (yanked)
-
-- [Remove the foreign link description and forward to the foreign error](https://github.com/brson/error-chain/pull/19)
-- [Allow missing sections](https://github.com/brson/error-chain/pull/17)
-
-Contributors: Brian Anderson, Taylor Cramer
-
-# 0.3.0
-
-- [Forward Display implementation for foreign errors](https://github.com/brson/error-chain/pull/13)
-
-Contributors: Brian Anderson, Taylor Cramer
-
-# 0.2.2
-
-- [Don't require `types` section in macro invocation](https://github.com/brson/error-chain/pull/8)
-- [Add "quick start" to README](https://github.com/brson/error-chain/pull/9)
-
-Contributors: Brian Anderson, Jake Shadle, Nate Mara
deleted file mode 100644
--- a/third_party/rust/error-chain/Cargo.toml
+++ /dev/null
@@ -1,22 +0,0 @@
-[package]
-
-name = "error-chain"
-version = "0.7.2"
-authors = [ "Brian Anderson <banderson@mozilla.com>",
- "Paul Colomiets <paul@colomiets.name>",
- "Colin Kiegel <kiegel@gmx.de>",
- "Yamakaky <yamakaky@yamaworld.fr>"]
-description = "Yet another error boilerplate library."
-
-documentation = "https://docs.rs/error-chain"
-homepage = "https://github.com/brson/error-chain"
-repository = "https://github.com/brson/error-chain"
-
-license = "MIT/Apache-2.0"
-
-[features]
-default = ["backtrace", "example_generated"]
-example_generated = []
-
-[dependencies]
-backtrace = { version = "0.3", optional = true }
deleted file mode 100644
--- a/third_party/rust/error-chain/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# error-chain - Consistent error handling for Rust
-
-[![Build Status](https://api.travis-ci.org/brson/error-chain.svg?branch=master)](https://travis-ci.org/brson/error-chain)
-[![Latest Version](https://img.shields.io/crates/v/error-chain.svg)](https://crates.io/crates/error-chain)
-[![License](https://img.shields.io/github/license/brson/error-chain.svg)](https://github.com/brson/error-chain)
-
-`error-chain` makes it easy to take full advantage of Rust's error
-handling features without the overhead of maintaining boilerplate
-error types and conversions. It implements an opinionated strategy for
-defining your own error types, as well as conversions from others'
-error types.
-
-[Documentation (crates.io)](https://docs.rs/error-chain).
-
-[Documentation (master)](https://brson.github.io/error-chain).
-
-## Quick start
-
-If you just want to set up your new project with error-chain,
-follow the [quickstart.rs] template, and read this [intro]
-to error-chain.
-
-[quickstart.rs]: https://github.com/brson/error-chain/blob/master/examples/quickstart.rs
-[intro]: http://brson.github.io/2016/11/30/starting-with-error-chain
-
-## Supported Rust version
-
-Please view the beginning of the [Travis configuration file](.travis.yml)
-to see the oldest supported Rust version.
-
-Note that `error-chain` supports older versions of Rust when built with
-`default-features = false`.
-
-## License
-
-MIT/Apache-2.0
deleted file mode 100644
--- a/third_party/rust/error-chain/examples/all.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-#[macro_use]
-extern crate error_chain;
-
-pub mod inner {
- error_chain! {}
-}
-
-#[cfg(feature = "a_feature")]
-pub mod feature {
- error_chain! {}
-}
-
-error_chain! {
- // Types generated by the macro. If empty of absent, it defaults to
- // Error, ErrorKind, Result;
- types {
- // With custom names:
- MyError, MyErrorKind, MyResult;
- // Without the `Result` wrapper:
- // Error, ErrorKind;
- }
-
- // Automatic bindings to others error types generated by `error_chain!`.
- links {
- Inner(inner::Error, inner::ErrorKind);
- // Attributes can be added at the end of the declaration.
- Feature(feature::Error, feature::ErrorKind) #[cfg(feature = "a_feature")];
- }
-
- // Bindings to types implementing std::error::Error.
- foreign_links {
- Io(::std::io::Error);
- }
-}
-
-fn main() {}
deleted file mode 100644
--- a/third_party/rust/error-chain/examples/doc.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-#![deny(missing_docs)]
-
-//! This module is used to check that all generated items are documented.
-
-#[macro_use]
-extern crate error_chain;
-
-/// Inner module.
-pub mod inner {
- error_chain! {
- }
-}
-
-error_chain! {
- links {
- Inner(inner::Error, inner::ErrorKind) #[doc = "Doc"];
- }
- foreign_links {
- Io(::std::io::Error) #[doc = "Io"];
- }
- errors {
- /// Doc
- Test2 {
-
- }
- }
-}
-
-fn main() {}
deleted file mode 100644
--- a/third_party/rust/error-chain/examples/quickstart.rs
+++ /dev/null
@@ -1,61 +0,0 @@
-// Simple and robust error handling with error-chain!
-// Use this as a template for new projects.
-
-// `error_chain!` can recurse deeply
-#![recursion_limit = "1024"]
-
-// Import the macro. Don't forget to add `error-chain` in your
-// `Cargo.toml`!
-#[macro_use]
-extern crate error_chain;
-
-// We'll put our errors in an `errors` module, and other modules in
-// this crate will `use errors::*;` to get access to everything
-// `error_chain!` creates.
-mod errors {
- // Create the Error, ErrorKind, ResultExt, and Result types
- error_chain! { }
-}
-
-use errors::*;
-
-fn main() {
- if let Err(ref e) = run() {
- use ::std::io::Write;
- let stderr = &mut ::std::io::stderr();
- let errmsg = "Error writing to stderr";
-
- writeln!(stderr, "error: {}", e).expect(errmsg);
-
- for e in e.iter().skip(1) {
- writeln!(stderr, "caused by: {}", e).expect(errmsg);
- }
-
- // The backtrace is not always generated. Try to run this example
- // with `RUST_BACKTRACE=1`.
- if let Some(backtrace) = e.backtrace() {
- writeln!(stderr, "backtrace: {:?}", backtrace).expect(errmsg);
- }
-
- ::std::process::exit(1);
- }
-}
-
-// Use this macro to auto-generate the main above. You may want to
-// set the `RUST_BACKTRACE` env variable to see a backtrace.
-//quick_main!(run);
-
-
-// Most functions will return the `Result` type, imported from the
-// `errors` module. It is a typedef of the standard `Result` type
-// for which the error type is always our own `Error`.
-fn run() -> Result<()> {
- use std::fs::File;
-
- // This operation will fail
- File::open("tretrete")
- .chain_err(|| "unable to open tretrete file")?;
-
- Ok(())
-}
-
deleted file mode 100644
--- a/third_party/rust/error-chain/examples/size.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-#[macro_use]
-extern crate error_chain;
-
-use std::mem::{size_of, size_of_val};
-
-error_chain! {
- errors {
- AVariant
- Another
- }
-}
-
-fn main() {
- println!("Memory usage in bytes");
- println!("---------------------");
- println!("Result<()>: {}", size_of::<Result<()>>());
- println!(" (): {}", size_of::<()>());
- println!(" Error: {}", size_of::<Error>());
- println!(" ErrorKind: {}", size_of::<ErrorKind>());
- let msg = ErrorKind::Msg("test".into());
- println!(" ErrorKind::Msg: {}", size_of_val(&msg));
- println!(" String: {}", size_of::<String>());
- println!(" State: {}", size_of::<error_chain::State>());
- #[cfg(feature = "backtrace")]
- {
- let state = error_chain::State {
- next_error: None,
- backtrace: None,
- };
- println!(" State.next_error: {}", size_of_val(&state.next_error));
- println!(" State.backtrace: {}", size_of_val(&state.backtrace));
- }
- #[cfg(not(feature = "backtrace"))]
- {
- let state = error_chain::State {
- next_error: None,
- };
- println!(" State.next_error: {}", size_of_val(&state.next_error));
- }
-}
deleted file mode 100644
--- a/third_party/rust/error-chain/src/error_chain.rs
+++ /dev/null
@@ -1,405 +0,0 @@
-/// Prefer to use `error_chain` instead of this macro.
-#[macro_export]
-macro_rules! error_chain_processed {
- // Default values for `types`.
- (
- types {}
- $( $rest: tt )*
- ) => {
- error_chain_processed! {
- types {
- Error, ErrorKind, ResultExt, Result;
- }
- $( $rest )*
- }
- };
- // With `Result` wrapper.
- (
- types {
- $error_name:ident, $error_kind_name:ident,
- $result_ext_name:ident, $result_name:ident;
- }
- $( $rest: tt )*
- ) => {
- error_chain_processed! {
- types {
- $error_name, $error_kind_name,
- $result_ext_name;
- }
- $( $rest )*
- }
- /// Convenient wrapper around `std::Result`.
- #[allow(unused)]
- pub type $result_name<T> = ::std::result::Result<T, $error_name>;
- };
- // Without `Result` wrapper.
- (
- types {
- $error_name:ident, $error_kind_name:ident,
- $result_ext_name:ident;
- }
-
- links {
- $( $link_variant:ident ( $link_error_path:path, $link_kind_path:path )
- $( #[$meta_links:meta] )*; ) *
- }
-
- foreign_links {
- $( $foreign_link_variant:ident ( $foreign_link_error_path:path )
- $( #[$meta_foreign_links:meta] )*; )*
- }
-
- errors {
- $( $error_chunks:tt ) *
- }
-
- ) => {
- /// The Error type.
- ///
- /// This struct is made of three things:
- ///
- /// - an `ErrorKind` which is used to determine the type of the error.
- /// - a backtrace, generated when the error is created.
- /// - an error chain, used for the implementation of `Error::cause()`.
- #[derive(Debug)]
- pub struct $error_name(
- // The members must be `pub` for `links`.
- /// The kind of the error.
- #[doc(hidden)]
- pub $error_kind_name,
- /// Contains the error chain and the backtrace.
- #[doc(hidden)]
- pub $crate::State,
- );
-
- impl $crate::ChainedError for $error_name {
- type ErrorKind = $error_kind_name;
-
- fn new(kind: $error_kind_name, state: $crate::State) -> $error_name {
- $error_name(kind, state)
- }
-
- fn from_kind(kind: Self::ErrorKind) -> Self {
- Self::from_kind(kind)
- }
-
- fn kind(&self) -> &Self::ErrorKind {
- self.kind()
- }
-
- fn iter(&self) -> $crate::ErrorChainIter {
- $crate::ErrorChainIter(Some(self))
- }
-
- fn backtrace(&self) -> Option<&$crate::Backtrace> {
- self.backtrace()
- }
-
- impl_extract_backtrace!($error_name
- $error_kind_name
- $([$link_error_path, $(#[$meta_links])*])*);
- }
-
- #[allow(dead_code)]
- impl $error_name {
- /// Constructs an error from a kind, and generates a backtrace.
- pub fn from_kind(kind: $error_kind_name) -> $error_name {
- $error_name(
- kind,
- $crate::State::default(),
- )
- }
-
- /// Returns the kind of the error.
- pub fn kind(&self) -> &$error_kind_name {
- &self.0
- }
-
- /// Iterates over the error chain.
- pub fn iter(&self) -> $crate::ErrorChainIter {
- $crate::ChainedError::iter(self)
- }
-
- /// Returns the backtrace associated with this error.
- pub fn backtrace(&self) -> Option<&$crate::Backtrace> {
- self.1.backtrace()
- }
- }
-
- impl ::std::error::Error for $error_name {
- fn description(&self) -> &str {
- self.0.description()
- }
-
- fn cause(&self) -> Option<&::std::error::Error> {
- match self.1.next_error {
- Some(ref c) => Some(&**c),
- None => {
- match self.0 {
- $(
- $(#[$meta_foreign_links])*
- $error_kind_name::$foreign_link_variant(ref foreign_err) => {
- foreign_err.cause()
- }
- ) *
- _ => None
- }
- }
- }
- }
- }
-
- impl ::std::fmt::Display for $error_name {
- fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
- ::std::fmt::Display::fmt(&self.0, f)
- }
- }
-
- $(
- $(#[$meta_links])*
- impl From<$link_error_path> for $error_name {
- fn from(e: $link_error_path) -> Self {
- $error_name(
- $error_kind_name::$link_variant(e.0),
- e.1,
- )
- }
- }
- ) *
-
- $(
- $(#[$meta_foreign_links])*
- impl From<$foreign_link_error_path> for $error_name {
- fn from(e: $foreign_link_error_path) -> Self {
- $error_name::from_kind(
- $error_kind_name::$foreign_link_variant(e)
- )
- }
- }
- ) *
-
- impl From<$error_kind_name> for $error_name {
- fn from(e: $error_kind_name) -> Self {
- $error_name::from_kind(e)
- }
- }
-
- impl<'a> From<&'a str> for $error_name {
- fn from(s: &'a str) -> Self {
- $error_name::from_kind(s.into())
- }
- }
-
- impl From<String> for $error_name {
- fn from(s: String) -> Self {
- $error_name::from_kind(s.into())
- }
- }
-
- impl ::std::ops::Deref for $error_name {
- type Target = $error_kind_name;
-
- fn deref(&self) -> &Self::Target {
- &self.0
- }
- }
-
-
- // The ErrorKind type
- // --------------
-
- quick_error! {
- /// The kind of an error.
- #[derive(Debug)]
- pub enum $error_kind_name {
-
- /// A convenient variant for String.
- Msg(s: String) {
- description(&s)
- display("{}", s)
- }
-
- $(
- $(#[$meta_links])*
- $link_variant(e: $link_kind_path) {
- description(e.description())
- display("{}", e)
- }
- ) *
-
- $(
- $(#[$meta_foreign_links])*
- $foreign_link_variant(err: $foreign_link_error_path) {
- description(::std::error::Error::description(err))
- display("{}", err)
- }
- ) *
-
- $($error_chunks)*
- }
- }
-
- $(
- $(#[$meta_links])*
- impl From<$link_kind_path> for $error_kind_name {
- fn from(e: $link_kind_path) -> Self {
- $error_kind_name::$link_variant(e)
- }
- }
- ) *
-
- impl<'a> From<&'a str> for $error_kind_name {
- fn from(s: &'a str) -> Self {
- $error_kind_name::Msg(s.to_string())
- }
- }
-
- impl From<String> for $error_kind_name {
- fn from(s: String) -> Self {
- $error_kind_name::Msg(s)
- }
- }
-
- impl From<$error_name> for $error_kind_name {
- fn from(e: $error_name) -> Self {
- e.0
- }
- }
-
- // The ResultExt trait defines the `chain_err` method.
-
- /// Additional methods for `Result`, for easy interaction with this crate.
- pub trait $result_ext_name<T, E> {
- /// If the `Result` is an `Err` then `chain_err` evaluates the closure,
- /// which returns *some type that can be converted to `ErrorKind`*, boxes
- /// the original error to store as the cause, then returns a new error
- /// containing the original error.
- fn chain_err<F, EK>(self, callback: F) -> ::std::result::Result<T, $error_name>
- where F: FnOnce() -> EK,
- EK: Into<$error_kind_name>;
- }
-
- impl<T, E> $result_ext_name<T, E> for ::std::result::Result<T, E> where E: ::std::error::Error + Send + 'static {
- fn chain_err<F, EK>(self, callback: F) -> ::std::result::Result<T, $error_name>
- where F: FnOnce() -> EK,
- EK: Into<$error_kind_name> {
- self.map_err(move |e| {
- let state = $crate::State::new::<$error_name>(Box::new(e), );
- $crate::ChainedError::new(callback().into(), state)
- })
- }
- }
-
-
- };
-}
-
-/// Internal macro used for reordering of the fields.
-#[doc(hidden)]
-#[macro_export]
-macro_rules! error_chain_processing {
- (
- ({}, $b:tt, $c:tt, $d:tt)
- types $content:tt
- $( $tail:tt )*
- ) => {
- error_chain_processing! {
- ($content, $b, $c, $d)
- $($tail)*
- }
- };
- (
- ($a:tt, {}, $c:tt, $d:tt)
- links $content:tt
- $( $tail:tt )*
- ) => {
- error_chain_processing! {
- ($a, $content, $c, $d)
- $($tail)*
- }
- };
- (
- ($a:tt, $b:tt, {}, $d:tt)
- foreign_links $content:tt
- $( $tail:tt )*
- ) => {
- error_chain_processing! {
- ($a, $b, $content, $d)
- $($tail)*
- }
- };
- (
- ($a:tt, $b:tt, $c:tt, {})
- errors $content:tt
- $( $tail:tt )*
- ) => {
- error_chain_processing! {
- ($a, $b, $c, $content)
- $($tail)*
- }
- };
- ( ($a:tt, $b:tt, $c:tt, $d:tt) ) => {
- error_chain_processed! {
- types $a
- links $b
- foreign_links $c
- errors $d
- }
- };
-}
-
-/// This macro is used for handling of duplicated and out-of-order fields. For
-/// the exact rules, see `error_chain_processed`.
-#[macro_export]
-macro_rules! error_chain {
- ( $( $block_name:ident { $( $block_content:tt )* } )* ) => {
- error_chain_processing! {
- ({}, {}, {}, {})
- $($block_name { $( $block_content )* })*
- }
- };
-}
-
-/// Macro used to manage the `backtrace` feature.
-///
-/// See
-/// https://www.reddit.com/r/rust/comments/57virt/hey_rustaceans_got_an_easy_question_ask_here/da5r4ti/?context=3
-/// for more details.
-#[macro_export]
-#[doc(hidden)]
-#[cfg(feature = "backtrace")]
-macro_rules! impl_extract_backtrace {
- ($error_name: ident
- $error_kind_name: ident
- $([$link_error_path: path, $(#[$meta_links: meta])*])*) => {
- fn extract_backtrace(e: &(::std::error::Error + Send + 'static))
- -> Option<::std::sync::Arc<$crate::Backtrace>> {
- if let Some(e) = e.downcast_ref::<$error_name>() {
- return e.1.backtrace.clone();
- }
- $(
- $( #[$meta_links] )*
- {
- if let Some(e) = e.downcast_ref::<$link_error_path>() {
- return e.1.backtrace.clone();
- }
- }
- ) *
- None
- }
- }
-}
-
-/// Macro used to manage the `backtrace` feature.
-///
-/// See
-/// https://www.reddit.com/r/rust/comments/57virt/hey_rustaceans_got_an_easy_question_ask_here/da5r4ti/?context=3
-/// for more details.
-#[macro_export]
-#[doc(hidden)]
-#[cfg(not(feature = "backtrace"))]
-macro_rules! impl_extract_backtrace {
- ($error_name: ident
- $error_kind_name: ident
- $([$link_error_path: path, $(#[$meta_links: meta])*])*) => {}
-}
deleted file mode 100644
--- a/third_party/rust/error-chain/src/example_generated.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-//! This modules show an example of code generated by the macro. IT MUST NOT BE
-//! USED OUTSIDE THIS CRATE.
-//!
-//! This is the basic error structure. You can see that `ErrorKind`
-//! has been populated in a variety of ways. All `ErrorKind`s get a
-//! `Msg` variant for basic errors. When strings are converted to
-//! `ErrorKind`s they become `ErrorKind::Msg`. The "links" defined in
-//! the macro are expanded to the `Inner` variant, and the
-//! "foreign links" to the `Io` variant.
-//!
-//! Both types come with a variety of `From` conversions as well:
-//! `Error` can be created from `ErrorKind`, `&str` and `String`,
-//! and the `links` and `foreign_links` error types. `ErrorKind`
-//! can be created from the corresponding `ErrorKind`s of the link
-//! types, as well as from `&str` and `String`.
-//!
-//! `into()` and `From::from` are used heavily to massage types into
-//! the right shape. Which one to use in any specific case depends on
-//! the influence of type inference, but there are some patterns that
-//! arise frequently.
-
-/// Another code generated by the macro.
-pub mod inner {
- error_chain! {}
-}
-
-error_chain! {
- links {
- Inner(inner::Error, inner::ErrorKind) #[doc = "Link to another `ErrorChain`."];
- }
- foreign_links {
- Io(::std::io::Error) #[doc = "Link to a `std::error::Error` type."];
- }
- errors {
- #[doc = "A custom error kind."]
- Custom
- }
-}
deleted file mode 100644
--- a/third_party/rust/error-chain/src/lib.rs
+++ /dev/null
@@ -1,581 +0,0 @@
-#![deny(missing_docs)]
-
-//! A library for consistent and reliable error handling
-//!
-//! error-chain makes it easy to take full advantage of Rust's
-//! powerful error handling features without the overhead of
-//! maintaining boilerplate error types and conversions. It implements
-//! an opinionated strategy for defining your own error types, as well
-//! as conversions from others' error types.
-//!
-//! ## Quick start
-//!
-//! If you just want to set up your new project with error-chain,
-//! follow the [quickstart.rs] template, and read this [intro]
-//! to error-chain.
-//!
-//! [quickstart.rs]: https://github.com/brson/error-chain/blob/master/examples/quickstart.rs
-//! [intro]: http://brson.github.io/2016/11/30/starting-with-error-chain
-//!
-//! ## Why error chain?
-//!
-//! * error-chain is easy to configure. Handle errors robustly with minimal
-//! effort.
-//! * Basic error handling requires no maintenance of custom error types
-//! nor the `From` conversions that make `?` work.
-//! * error-chain scales from simple error handling strategies to more
-//! rigorous. Return formatted strings for simple errors, only
-//! introducing error variants and their strong typing as needed for
-//! advanced error recovery.
-//! * error-chain makes it trivial to correctly manage the [cause] of
-//! the errors generated by your own code. This is the "chaining"
-//! in "error-chain".
-//!
-//! [cause]: https://doc.rust-lang.org/std/error/trait.Error.html#method.cause
-//!
-//! ## Principles of error-chain
-//!
-//! error-chain is based on the following principles:
-//!
-//! * No error should ever be discarded. This library primarily
-//! makes it easy to "chain" errors with the `chain_err` method.
-//! * Introducing new errors is trivial. Simple errors can be introduced
-//! at the error site with just a string.
-//! * Handling errors is possible with pattern matching.
-//! * Conversions between error types are done in an automatic and
-//! consistent way - `From` conversion behavior is never specified
-//! explicitly.
-//! * Errors implement Send.
-//! * Errors can carry backtraces.
-//!
-//! Similar to other libraries like [error-type] and [quick-error],
-//! this library introduces the error chaining mechanism originally
-//! employed by Cargo. The `error_chain!` macro declares the types
-//! and implementation boilerplate necessary for fulfilling a
-//! particular error-handling strategy. Most importantly it defines a
-//! custom error type (called `Error` by convention) and the `From`
-//! conversions that let the `try!` macro and `?` operator work.
-//!
-//! This library differs in a few ways from previous error libs:
-//!
-//! * Instead of defining the custom `Error` type as an enum, it is a
-//! struct containing an `ErrorKind` (which defines the
-//! `description` and `display` methods for the error), an opaque,
-//! optional, boxed `std::error::Error + Send + 'static` object
-//! (which defines the `cause`, and establishes the links in the
-//! error chain), and a `Backtrace`.
-//! * The macro also defines a `ResultExt` trait that defines a
-//! `chain_err` method. This method on all `std::error::Error + Send + 'static`
-//! types extends the error chain by boxing the current
-//! error into an opaque object and putting it inside a new concrete
-//! error.
-//! * It provides automatic `From` conversions between other error types
-//! defined by the `error_chain!` that preserve type information,
-//! and facilitate seamless error composition and matching of composed
-//! errors.
-//! * It provides automatic `From` conversions between any other error
-//! type that hides the type of the other error in the `cause` box.
-//! * If `RUST_BACKTRACE` is enabled, it collects a single backtrace at
-//! the earliest opportunity and propagates it down the stack through
-//! `From` and `ResultExt` conversions.
-//!
-//! To accomplish its goals it makes some tradeoffs:
-//!
-//! * The split between the `Error` and `ErrorKind` types can make it
-//! slightly more cumbersome to instantiate new (unchained) errors,
-//! requiring an `Into` or `From` conversion; as well as slightly
-//! more cumbersome to match on errors with another layer of types
-//! to match.
-//! * Because the error type contains `std::error::Error + Send + 'static` objects,
-//! it can't implement `PartialEq` for easy comparisons.
-//!
-//! ## Declaring error types
-//!
-//! Generally, you define one family of error types per crate, though
-//! it's also perfectly fine to define error types on a finer-grained
-//! basis, such as per module.
-//!
-//! Assuming you are using crate-level error types, typically you will
-//! define an `errors` module and inside it call `error_chain!`:
-//!
-//! ```
-//! # #[macro_use] extern crate error_chain;
-//! mod other_error {
-//! error_chain! {}
-//! }
-//!
-//! error_chain! {
-//! // The type defined for this error. These are the conventional
-//! // and recommended names, but they can be arbitrarily chosen.
-//! // It is also possible to leave this block out entirely, or
-//! // leave it empty, and these names will be used automatically.
-//! types {
-//! Error, ErrorKind, ResultExt, Result;
-//! }
-//!
-//! // Without the `Result` wrapper:
-//! //
-//! // types {
-//! // Error, ErrorKind, ResultExt;
-//! // }
-//!
-//! // Automatic conversions between this error chain and other
-//! // error chains. In this case, it will e.g. generate an
-//! // `ErrorKind` variant called `Dist` which in turn contains
-//! // the `rustup_dist::ErrorKind`, with conversions from
-//! // `rustup_dist::Error`.
-//! //
-//! // Optionally, some attributes can be added to a variant.
-//! //
-//! // This section can be empty.
-//! links {
-//! Another(other_error::Error, other_error::ErrorKind) #[cfg(unix)];
-//! }
-//!
-//! // Automatic conversions between this error chain and other
-//! // error types not defined by the `error_chain!`. These will be
-//! // wrapped in a new error with, in this case, the
-//! // `ErrorKind::Temp` variant. The description and cause will
-//! // forward to the description and cause of the original error.
-//! //
-//! // Optionally, some attributes can be added to a variant.
-//! //
-//! // This section can be empty.
-//! foreign_links {
-//! Fmt(::std::fmt::Error);
-//! Io(::std::io::Error) #[cfg(unix)];
-//! }
-//!
-//! // Define additional `ErrorKind` variants. The syntax here is
-//! // the same as `quick_error!`, but the `from()` and `cause()`
-//! // syntax is not supported.
-//! errors {
-//! InvalidToolchainName(t: String) {
-//! description("invalid toolchain name")
-//! display("invalid toolchain name: '{}'", t)
-//! }
-//! }
-//! }
-//!
-//! # fn main() {}
-//! ```
-//!
-//! Each section, `types`, `links`, `foreign_links`, and `errors` may
-//! be omitted if it is empty.
-//!
-//! This populates the module with a number of definitions,
-//! the most important of which are the `Error` type
-//! and the `ErrorKind` type. An example of generated code can be found in the
-//! [example_generated](example_generated) module.
-//!
-//! ## Returning new errors
-//!
-//! Introducing new error chains, with a string message:
-//!
-//! ```
-//! # #[macro_use] extern crate error_chain;
-//! # fn main() {}
-//! # error_chain! {}
-//! fn foo() -> Result<()> {
-//! Err("foo error!".into())
-//! }
-//! ```
-//!
-//! Introducing new error chains, with an `ErrorKind`:
-//!
-//! ```
-//! # #[macro_use] extern crate error_chain;
-//! # fn main() {}
-//! error_chain! {
-//! errors { FooError }
-//! }
-//!
-//! fn foo() -> Result<()> {
-//! Err(ErrorKind::FooError.into())
-//! }
-//! ```
-//!
-//! Note that the return type is the typedef `Result`, which is
-//! defined by the macro as `pub type Result<T> =
-//! ::std::result::Result<T, Error>`. Note that in both cases
-//! `.into()` is called to convert a type into the `Error` type; both
-//! strings and `ErrorKind` have `From` conversions to turn them into
-//! `Error`.
-//!
-//! When the error is emitted inside a `try!` macro or behind the
-//! `?` operator, the explicit conversion isn't needed; `try!` will
-//! automatically convert `Err(ErrorKind)` to `Err(Error)`. So the
-//! below is equivalent to the previous:
-//!
-//! ```
-//! # #[macro_use] extern crate error_chain;
-//! # fn main() {}
-//! # error_chain! { errors { FooError } }
-//! fn foo() -> Result<()> {
-//! Ok(try!(Err(ErrorKind::FooError)))
-//! }
-//!
-//! fn bar() -> Result<()> {
-//! Ok(try!(Err("bogus!")))
-//! }
-//! ```
-//!
-//! ## The `bail!` macro
-//!
-//! The above method of introducing new errors works but is a little
-//! verbose. Instead we can use the `bail!` macro, which, much like `try!`
-//! and `?`, performs an early return with conversions. With `bail!` the
-//! previous examples look like:
-//!
-//! ```
-//! # #[macro_use] extern crate error_chain;
-//! # fn main() {}
-//! # error_chain! { errors { FooError } }
-//! fn foo() -> Result<()> {
-//! bail!(ErrorKind::FooError);
-//!
-//! Ok(())
-//! }
-//!
-//! fn bar() -> Result<()> {
-//! bail!("bogus!");
-//!
-//! Ok(())
-//! }
-//! ```
-//!
-//! ## Chaining errors
-//!
-//! To extend the error chain:
-//!
-//! ```
-//! # #[macro_use] extern crate error_chain;
-//! # fn main() {}
-//! # error_chain! {}
-//! # fn do_something() -> Result<()> { unimplemented!() }
-//! # fn test() -> Result<()> {
-//! let res: Result<()> = do_something().chain_err(|| "something went wrong");
-//! # Ok(())
-//! # }
-//! ```
-//!
-//! `chain_err` can be called on any `Result` type where the contained
-//! error type implements `std::error::Error + Send + 'static`. If
-//! the `Result` is an `Err` then `chain_err` evaluates the closure,
-//! which returns *some type that can be converted to `ErrorKind`*,
-//! boxes the original error to store as the cause, then returns a new
-//! error containing the original error.
-//!
-//! ## Matching errors
-//!
-//! error-chain error variants are matched with simple patterns.
-//! `Error` is a tuple struct and its first field is the `ErrorKind`,
-//! making dispatching on error kinds relatively compact:
-//!
-//! ```
-//! # #[macro_use] extern crate error_chain;
-//! # fn main() {
-//! error_chain! {
-//! errors {
-//! InvalidToolchainName(t: String) {
-//! description("invalid toolchain name")
-//! display("invalid toolchain name: '{}'", t)
-//! }
-//! }
-//! }
-//!
-//! match Error::from("error!") {
-//! Error(ErrorKind::InvalidToolchainName(_), _) => { }
-//! Error(ErrorKind::Msg(_), _) => { }
-//! }
-//! # }
-//! ```
-//!
-//! Chained errors are also matched with (relatively) compact syntax
-//!
-//! ```
-//! # #[macro_use] extern crate error_chain;
-//! mod utils {
-//! error_chain! {
-//! errors {
-//! BadStuff {
-//! description("bad stuff")
-//! }
-//! }
-//! }
-//! }
-//!
-//! mod app {
-//! error_chain! {
-//! links {
-//! Utils(::utils::Error, ::utils::ErrorKind);
-//! }
-//! }
-//! }
-//!
-//!
-//! # fn main() {
-//! match app::Error::from("error!") {
-//! app::Error(app::ErrorKind::Utils(utils::ErrorKind::BadStuff), _) => { }
-//! _ => { }
-//! }
-//! # }
-//! ```
-//!
-//! ## Foreign links
-//!
-//! Errors that do not conform to the same conventions as this library
-//! can still be included in the error chain. They are considered "foreign
-//! errors", and are declared using the `foreign_links` block of the
-//! `error_chain!` macro. `Error`s are automatically created from
-//! foreign errors by the `try!` macro.
-//!
-//! Foreign links and regular links have one crucial difference:
-//! `From` conversions for regular links *do not introduce a new error
-//! into the error chain*, while conversions for foreign links *always
-//! introduce a new error into the error chain*. So for the example
-//! above all errors deriving from the `temp::Error` type will be
-//! presented to the user as a new `ErrorKind::Temp` variant, and the
-//! cause will be the original `temp::Error` error. In contrast, when
-//! `rustup_utils::Error` is converted to `Error` the two `ErrorKind`s
-//! are converted between each other to create a new `Error` but the
-//! old error is discarded; there is no "cause" created from the
-//! original error.
-//!
-//! ## Backtraces
-//!
-//! If the `RUST_BACKTRACE` environment variable is set to anything
-//! but ``0``, the earliest non-foreign error to be generated creates
-//! a single backtrace, which is passed through all `From` conversions
-//! and `chain_err` invocations of compatible types. To read the
-//! backtrace just call the `backtrace()` method.
-//!
-//! Backtrace generation can be disabled by turning off the `backtrace` feature.
-//!
-//! ## Iteration
-//!
-//! The `iter` method returns an iterator over the chain of error boxes.
-//!
-//! [error-type]: https://github.com/DanielKeep/rust-error-type
-//! [quick-error]: https://github.com/tailhook/quick-error
-
-
-#[cfg(feature = "backtrace")]
-extern crate backtrace;
-
-use std::error;
-use std::iter::Iterator;
-#[cfg(feature = "backtrace")]
-use std::sync::Arc;
-
-#[cfg(feature = "backtrace")]
-pub use backtrace::Backtrace;
-#[cfg(not(feature = "backtrace"))]
-/// Dummy type used when the `backtrace` feature is disabled.
-pub type Backtrace = ();
-
-#[macro_use]
-mod quick_error;
-#[macro_use]
-mod error_chain;
-#[macro_use]
-mod quick_main;
-pub use quick_main::ExitCode;
-#[cfg(feature = "example_generated")]
-pub mod example_generated;
-
-/// Iterator over the error chain using the `Error::cause()` method.
-pub struct ErrorChainIter<'a>(pub Option<&'a error::Error>);
-
-impl<'a> Iterator for ErrorChainIter<'a> {
- type Item = &'a error::Error;
-
- fn next<'b>(&'b mut self) -> Option<&'a error::Error> {
- match self.0.take() {
- Some(e) => {
- self.0 = e.cause();
- Some(e)
- }
- None => None,
- }
- }
-}
-
-/// Returns a backtrace of the current call stack if `RUST_BACKTRACE`
-/// is set to anything but ``0``, and `None` otherwise. This is used
-/// in the generated error implementations.
-#[cfg(feature = "backtrace")]
-#[doc(hidden)]
-pub fn make_backtrace() -> Option<Arc<Backtrace>> {
- match std::env::var_os("RUST_BACKTRACE") {
- Some(ref val) if val != "0" => Some(Arc::new(Backtrace::new())),
- _ => None,
- }
-}
-
-/// This trait is implemented on all the errors generated by the `error_chain`
-/// macro.
-pub trait ChainedError: error::Error + Send + 'static {
- /// Associated kind type.
- type ErrorKind;
-
- /// Constructs an error from a kind, and generates a backtrace.
- fn from_kind(kind: Self::ErrorKind) -> Self where Self: Sized;
-
- /// Returns the kind of the error.
- fn kind(&self) -> &Self::ErrorKind;
-
- /// Iterates over the error chain.
- fn iter(&self) -> ErrorChainIter;
-
- /// Returns the backtrace associated with this error.
- fn backtrace(&self) -> Option<&Backtrace>;
-
- /// Creates an error from its parts.
- #[doc(hidden)]
- fn new(kind: Self::ErrorKind, state: State) -> Self where Self: Sized;
-
- /// Returns the first known backtrace, either from its State or from one
- /// of the errors from `foreign_links`.
- #[cfg(feature = "backtrace")]
- #[doc(hidden)]
- fn extract_backtrace(e: &(error::Error + Send + 'static)) -> Option<Arc<Backtrace>>
- where Self: Sized;
-}
-
-/// Common state between errors.
-#[derive(Debug)]
-#[doc(hidden)]
-pub struct State {
- /// Next error in the error chain.
- pub next_error: Option<Box<error::Error + Send>>,
- /// Backtrace for the current error.
- #[cfg(feature = "backtrace")]
- pub backtrace: Option<Arc<Backtrace>>,
-}
-
-impl Default for State {
- #[cfg(feature = "backtrace")]
- fn default() -> State {
- State {
- next_error: None,
- backtrace: make_backtrace(),
- }
- }
-
- #[cfg(not(feature = "backtrace"))]
- fn default() -> State {
- State { next_error: None }
- }
-}
-
-impl State {
- /// Creates a new State type
- #[cfg(feature = "backtrace")]
- pub fn new<CE: ChainedError>(e: Box<error::Error + Send>) -> State {
- let backtrace = CE::extract_backtrace(&*e).or_else(make_backtrace);
- State {
- next_error: Some(e),
- backtrace: backtrace,
- }
- }
-
- /// Creates a new State type
- #[cfg(not(feature = "backtrace"))]
- pub fn new<CE: ChainedError>(e: Box<error::Error + Send>) -> State {
- State { next_error: Some(e) }
- }
-
- /// Returns the inner backtrace if present.
- #[cfg(feature = "backtrace")]
- pub fn backtrace(&self) -> Option<&Backtrace> {
- self.backtrace.as_ref().map(|v| &**v)
- }
-
- /// Returns the inner backtrace if present.
- #[cfg(not(feature = "backtrace"))]
- pub fn backtrace(&self) -> Option<&Backtrace> {
- None
- }
-}
-
-/// Exits a function early with an error
-///
-/// The `bail!` macro provides an easy way to exit a function.
-/// `bail!(expr)` is equivalent to writing.
-///
-/// ```
-/// # #[macro_use] extern crate error_chain;
-/// # error_chain! { }
-/// # fn main() { }
-/// # fn foo() -> Result<()> {
-/// # let expr = "";
-/// return Err(expr.into());
-/// # }
-/// ```
-///
-/// And as shorthand it takes a formatting string a la `println!`:
-///
-/// ```
-/// # #[macro_use] extern crate error_chain;
-/// # error_chain! { }
-/// # fn main() { }
-/// # fn foo() -> Result<()> {
-/// # let n = 0;
-/// bail!("bad number: {}", n);
-/// # }
-/// ```
-///
-/// # Examples
-///
-/// Bailing on a custom error:
-///
-/// ```
-/// # #[macro_use] extern crate error_chain;
-/// # fn main() {}
-/// error_chain! {
-/// errors { FooError }
-/// }
-///
-/// fn foo() -> Result<()> {
-/// if bad_condition() {
-/// bail!(ErrorKind::FooError);
-/// }
-///
-/// Ok(())
-/// }
-///
-/// # fn bad_condition() -> bool { true }
-/// ```
-///
-/// Bailing on a formatted string:
-///
-/// ```
-/// # #[macro_use] extern crate error_chain;
-/// # fn main() {}
-/// error_chain! { }
-///
-/// fn foo() -> Result<()> {
-/// if let Some(bad_num) = bad_condition() {
-/// bail!("so bad: {}", bad_num);
-/// }
-///
-/// Ok(())
-/// }
-///
-/// # fn bad_condition() -> Option<i8> { None }
-/// ```
-#[macro_export]
-macro_rules! bail {
- ($e:expr) => {
- return Err($e.into());
- };
- ($fmt:expr, $($arg:tt)+) => {
- return Err(format!($fmt, $($arg)+).into());
- };
-}
-
-#[doc(hidden)]
-pub mod mock {
- error_chain!{}
-}
deleted file mode 100644
--- a/third_party/rust/error-chain/src/quick_error.rs
+++ /dev/null
@@ -1,529 +0,0 @@
-// From https://github.com/tailhook/quick-error
-// Changes:
-// - replace `impl Error` by `impl Item::description`
-// - $imeta
-
-#[macro_export]
-macro_rules! quick_error {
- ( $(#[$meta:meta])*
- pub enum $name:ident { $($chunks:tt)* }
- ) => {
- quick_error!(SORT [pub enum $name $(#[$meta])* ]
- items [] buf []
- queue [ $($chunks)* ]);
- };
- ( $(#[$meta:meta])*
- enum $name:ident { $($chunks:tt)* }
- ) => {
- quick_error!(SORT [enum $name $(#[$meta])* ]
- items [] buf []
- queue [ $($chunks)* ]);
- };
- // Queue is empty, can do the work
- (SORT [enum $name:ident $( #[$meta:meta] )*]
- items [$($( #[$imeta:meta] )*
- => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
- {$( $ifuncs:tt )*} )* ]
- buf [ ]
- queue [ ]
- ) => {
- quick_error!(ENUM_DEFINITION [enum $name $( #[$meta] )*]
- body []
- queue [$($( #[$imeta] )*
- => $iitem: $imode [$( $ivar: $ityp ),*] )*]
- );
- quick_error!(IMPLEMENTATIONS $name {$(
- $iitem: $imode [$(#[$imeta])*] [$( $ivar: $ityp ),*] {$( $ifuncs )*}
- )*});
- $(
- quick_error!(ERROR_CHECK $imode $($ifuncs)*);
- )*
- };
- (SORT [pub enum $name:ident $( #[$meta:meta] )*]
- items [$($( #[$imeta:meta] )*
- => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
- {$( $ifuncs:tt )*} )* ]
- buf [ ]
- queue [ ]
- ) => {
- quick_error!(ENUM_DEFINITION [pub enum $name $( #[$meta] )*]
- body []
- queue [$($( #[$imeta] )*
- => $iitem: $imode [$( $ivar: $ityp ),*] )*]
- );
- quick_error!(IMPLEMENTATIONS $name {$(
- $iitem: $imode [$(#[$imeta])*] [$( $ivar: $ityp ),*] {$( $ifuncs )*}
- )*});
- $(
- quick_error!(ERROR_CHECK $imode $($ifuncs)*);
- )*
- };
- // Add meta to buffer
- (SORT [$( $def:tt )*]
- items [$($( #[$imeta:meta] )*
- => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
- {$( $ifuncs:tt )*} )* ]
- buf [$( #[$bmeta:meta] )*]
- queue [ #[$qmeta:meta] $( $tail:tt )*]
- ) => {
- quick_error!(SORT [$( $def )*]
- items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*]
- buf [$( #[$bmeta] )* #[$qmeta] ]
- queue [$( $tail )*]);
- };
- // Add ident to buffer
- (SORT [$( $def:tt )*]
- items [$($( #[$imeta:meta] )*
- => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
- {$( $ifuncs:tt )*} )* ]
- buf [$( #[$bmeta:meta] )*]
- queue [ $qitem:ident $( $tail:tt )*]
- ) => {
- quick_error!(SORT [$( $def )*]
- items [$( $(#[$imeta])*
- => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*]
- buf [$(#[$bmeta])* => $qitem : UNIT [ ] ]
- queue [$( $tail )*]);
- };
- // Flush buffer on meta after ident
- (SORT [$( $def:tt )*]
- items [$($( #[$imeta:meta] )*
- => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
- {$( $ifuncs:tt )*} )* ]
- buf [$( #[$bmeta:meta] )*
- => $bitem:ident: $bmode:tt [$( $bvar:ident: $btyp:ty ),*] ]
- queue [ #[$qmeta:meta] $( $tail:tt )*]
- ) => {
- quick_error!(SORT [$( $def )*]
- enum [$( $(#[$emeta])* => $eitem $(( $($etyp),* ))* )*
- $(#[$bmeta])* => $bitem: $bmode $(( $($btyp),* ))*]
- items [$($( #[$imeta:meta] )*
- => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*
- $bitem: $bmode [$( $bvar:$btyp ),*] {} ]
- buf [ #[$qmeta] ]
- queue [$( $tail )*]);
- };
- // Add tuple enum-variant
- (SORT [$( $def:tt )*]
- items [$($( #[$imeta:meta] )*
- => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
- {$( $ifuncs:tt )*} )* ]
- buf [$( #[$bmeta:meta] )* => $bitem:ident: UNIT [ ] ]
- queue [($( $qvar:ident: $qtyp:ty ),+) $( $tail:tt )*]
- ) => {
- quick_error!(SORT [$( $def )*]
- items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*]
- buf [$( #[$bmeta] )* => $bitem: TUPLE [$( $qvar:$qtyp ),*] ]
- queue [$( $tail )*]
- );
- };
- // Add struct enum-variant - e.g. { descr: &'static str }
- (SORT [$( $def:tt )*]
- items [$($( #[$imeta:meta] )*
- => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
- {$( $ifuncs:tt )*} )* ]
- buf [$( #[$bmeta:meta] )* => $bitem:ident: UNIT [ ] ]
- queue [{ $( $qvar:ident: $qtyp:ty ),+} $( $tail:tt )*]
- ) => {
- quick_error!(SORT [$( $def )*]
- items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*]
- buf [$( #[$bmeta] )* => $bitem: STRUCT [$( $qvar:$qtyp ),*] ]
- queue [$( $tail )*]);
- };
- // Add struct enum-variant, with excess comma - e.g. { descr: &'static str, }
- (SORT [$( $def:tt )*]
- items [$($( #[$imeta:meta] )*
- => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
- {$( $ifuncs:tt )*} )* ]
- buf [$( #[$bmeta:meta] )* => $bitem:ident: UNIT [ ] ]
- queue [{$( $qvar:ident: $qtyp:ty ),+ ,} $( $tail:tt )*]
- ) => {
- quick_error!(SORT [$( $def )*]
- items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*]
- buf [$( #[$bmeta] )* => $bitem: STRUCT [$( $qvar:$qtyp ),*] ]
- queue [$( $tail )*]);
- };
- // Add braces and flush always on braces
- (SORT [$( $def:tt )*]
- items [$($( #[$imeta:meta] )*
- => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
- {$( $ifuncs:tt )*} )* ]
- buf [$( #[$bmeta:meta] )*
- => $bitem:ident: $bmode:tt [$( $bvar:ident: $btyp:ty ),*] ]
- queue [ {$( $qfuncs:tt )*} $( $tail:tt )*]
- ) => {
- quick_error!(SORT [$( $def )*]
- items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*
- $(#[$bmeta])* => $bitem: $bmode [$( $bvar:$btyp ),*] {$( $qfuncs )*} ]
- buf [ ]
- queue [$( $tail )*]);
- };
- // Flush buffer on double ident
- (SORT [$( $def:tt )*]
- items [$($( #[$imeta:meta] )*
- => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
- {$( $ifuncs:tt )*} )* ]
- buf [$( #[$bmeta:meta] )*
- => $bitem:ident: $bmode:tt [$( $bvar:ident: $btyp:ty ),*] ]
- queue [ $qitem:ident $( $tail:tt )*]
- ) => {
- quick_error!(SORT [$( $def )*]
- items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*
- $(#[$bmeta])* => $bitem: $bmode [$( $bvar:$btyp ),*] {} ]
- buf [ => $qitem : UNIT [ ] ]
- queue [$( $tail )*]);
- };
- // Flush buffer on end
- (SORT [$( $def:tt )*]
- items [$($( #[$imeta:meta] )*
- => $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
- {$( $ifuncs:tt )*} )* ]
- buf [$( #[$bmeta:meta] )*
- => $bitem:ident: $bmode:tt [$( $bvar:ident: $btyp:ty ),*] ]
- queue [ ]
- ) => {
- quick_error!(SORT [$( $def )*]
- items [$( $(#[$imeta])* => $iitem: $imode [$( $ivar:$ityp ),*] {$( $ifuncs )*} )*
- $(#[$bmeta])* => $bitem: $bmode [$( $bvar:$btyp ),*] {} ]
- buf [ ]
- queue [ ]);
- };
- // Public enum (Queue Empty)
- (ENUM_DEFINITION [pub enum $name:ident $( #[$meta:meta] )*]
- body [$($( #[$imeta:meta] )*
- => $iitem:ident ($(($( $ttyp:ty ),+))*) {$({$( $svar:ident: $styp:ty ),*})*} )* ]
- queue [ ]
- ) => {
- $(#[$meta])*
- pub enum $name {
- $(
- $(#[$imeta])*
- $iitem $(($( $ttyp ),*))* $({$( $svar: $styp ),*})*,
- )*
- }
- };
- // Private enum (Queue Empty)
- (ENUM_DEFINITION [enum $name:ident $( #[$meta:meta] )*]
- body [$($( #[$imeta:meta] )*
- => $iitem:ident ($(($( $ttyp:ty ),+))*) {$({$( $svar:ident: $styp:ty ),*})*} )* ]
- queue [ ]
- ) => {
- $(#[$meta])*
- enum $name {
- $(
- $(#[$imeta])*
- $iitem $(($( $ttyp ),*))* $({$( $svar: $styp ),*})*,
- )*
- }
- };
- // Unit variant
- (ENUM_DEFINITION [$( $def:tt )*]
- body [$($( #[$imeta:meta] )*
- => $iitem:ident ($(($( $ttyp:ty ),+))*) {$({$( $svar:ident: $styp:ty ),*})*} )* ]
- queue [$( #[$qmeta:meta] )*
- => $qitem:ident: UNIT [ ] $( $queue:tt )*]
- ) => {
- quick_error!(ENUM_DEFINITION [ $($def)* ]
- body [$($( #[$imeta] )* => $iitem ($(($( $ttyp ),+))*) {$({$( $svar: $styp ),*})*} )*
- $( #[$qmeta] )* => $qitem () {} ]
- queue [ $($queue)* ]
- );
- };
- // Tuple variant
- (ENUM_DEFINITION [$( $def:tt )*]
- body [$($( #[$imeta:meta] )*
- => $iitem:ident ($(($( $ttyp:ty ),+))*) {$({$( $svar:ident: $styp:ty ),*})*} )* ]
- queue [$( #[$qmeta:meta] )*
- => $qitem:ident: TUPLE [$( $qvar:ident: $qtyp:ty ),+] $( $queue:tt )*]
- ) => {
- quick_error!(ENUM_DEFINITION [ $($def)* ]
- body [$($( #[$imeta] )* => $iitem ($(($( $ttyp ),+))*) {$({$( $svar: $styp ),*})*} )*
- $( #[$qmeta] )* => $qitem (($( $qtyp ),*)) {} ]
- queue [ $($queue)* ]
- );
- };
- // Struct variant
- (ENUM_DEFINITION [$( $def:tt )*]
- body [$($( #[$imeta:meta] )*
- => $iitem:ident ($(($( $ttyp:ty ),+))*) {$({$( $svar:ident: $styp:ty ),*})*} )* ]
- queue [$( #[$qmeta:meta] )*
- => $qitem:ident: STRUCT [$( $qvar:ident: $qtyp:ty ),*] $( $queue:tt )*]
- ) => {
- quick_error!(ENUM_DEFINITION [ $($def)* ]
- body [$($( #[$imeta] )* => $iitem ($(($( $ttyp ),+))*) {$({$( $svar: $styp ),*})*} )*
- $( #[$qmeta] )* => $qitem () {{$( $qvar: $qtyp ),*}} ]
- queue [ $($queue)* ]
- );
- };
- (IMPLEMENTATIONS
- $name:ident {$(
- $item:ident: $imode:tt [$(#[$imeta:meta])*] [$( $var:ident: $typ:ty ),*] {$( $funcs:tt )*}
- )*}
- ) => {
- #[allow(unused)]
- impl ::std::fmt::Display for $name {
- fn fmt(&self, fmt: &mut ::std::fmt::Formatter)
- -> ::std::fmt::Result
- {
- match *self {
- $(
- $(#[$imeta])*
- quick_error!(ITEM_PATTERN
- $name $item: $imode [$( ref $var ),*]
- ) => {
- let display_fn = quick_error!(FIND_DISPLAY_IMPL
- $name $item: $imode
- {$( $funcs )*});
-
- display_fn(self, fmt)
- }
- )*
- }
- }
- }
- /*#[allow(unused)]
- impl ::std::error::Error for $name {
- fn description(&self) -> &str {
- match *self {
- $(
- quick_error!(ITEM_PATTERN
- $name $item: $imode [$( ref $var ),*]
- ) => {
- quick_error!(FIND_DESCRIPTION_IMPL
- $item: $imode self fmt [$( $var ),*]
- {$( $funcs )*})
- }
- )*
- }
- }
- fn cause(&self) -> Option<&::std::error::Error> {
- match *self {
- $(
- quick_error!(ITEM_PATTERN
- $name $item: $imode [$( ref $var ),*]
- ) => {
- quick_error!(FIND_CAUSE_IMPL
- $item: $imode [$( $var ),*]
- {$( $funcs )*})
- }
- )*
- }
- }
- }*/
- #[allow(unused)]
- impl $name {
- /// A string describing the error kind.
- pub fn description(&self) -> &str {
- match *self {
- $(
- $(#[$imeta])*
- quick_error!(ITEM_PATTERN
- $name $item: $imode [$( ref $var ),*]
- ) => {
- quick_error!(FIND_DESCRIPTION_IMPL
- $item: $imode self fmt [$( $var ),*]
- {$( $funcs )*})
- }
- )*
- }
- }
- }
- $(
- quick_error!(FIND_FROM_IMPL
- $name $item: $imode [$( $var:$typ ),*]
- {$( $funcs )*});
- )*
- };
- (FIND_DISPLAY_IMPL $name:ident $item:ident: $imode:tt
- { display($self_:tt) -> ($( $exprs:tt )*) $( $tail:tt )*}
- ) => {
- |quick_error!(IDENT $self_): &$name, f: &mut ::std::fmt::Formatter| {
- write!(f, $( $exprs )*)
- }
- };
- (FIND_DISPLAY_IMPL $name:ident $item:ident: $imode:tt
- { display($pattern:expr) $( $tail:tt )*}
- ) => {
- |_, f: &mut ::std::fmt::Formatter| { write!(f, $pattern) }
- };
- (FIND_DISPLAY_IMPL $name:ident $item:ident: $imode:tt
- { display($pattern:expr, $( $exprs:tt )*) $( $tail:tt )*}
- ) => {
- |_, f: &mut ::std::fmt::Formatter| { write!(f, $pattern, $( $exprs )*) }
- };
- (FIND_DISPLAY_IMPL $name:ident $item:ident: $imode:tt
- { $t:tt $( $tail:tt )*}
- ) => {
- quick_error!(FIND_DISPLAY_IMPL
- $name $item: $imode
- {$( $tail )*})
- };
- (FIND_DISPLAY_IMPL $name:ident $item:ident: $imode:tt
- { }
- ) => {
- |self_: &$name, f: &mut ::std::fmt::Formatter| {
- write!(f, "{}", self_.description())
- }
- };
- (FIND_DESCRIPTION_IMPL $item:ident: $imode:tt $me:ident $fmt:ident
- [$( $var:ident ),*]
- { description($expr:expr) $( $tail:tt )*}
- ) => {
- $expr
- };
- (FIND_DESCRIPTION_IMPL $item:ident: $imode:tt $me:ident $fmt:ident
- [$( $var:ident ),*]
- { $t:tt $( $tail:tt )*}
- ) => {
- quick_error!(FIND_DESCRIPTION_IMPL
- $item: $imode $me $fmt [$( $var ),*]
- {$( $tail )*})
- };
- (FIND_DESCRIPTION_IMPL $item:ident: $imode:tt $me:ident $fmt:ident
- [$( $var:ident ),*]
- { }
- ) => {
- stringify!($item)
- };
- (FIND_CAUSE_IMPL $item:ident: $imode:tt
- [$( $var:ident ),*]
- { cause($expr:expr) $( $tail:tt )*}
- ) => {
- Some($expr)
- };
- (FIND_CAUSE_IMPL $item:ident: $imode:tt
- [$( $var:ident ),*]
- { $t:tt $( $tail:tt )*}
- ) => {
- quick_error!(FIND_CAUSE_IMPL
- $item: $imode [$( $var ),*]
- { $($tail)* })
- };
- (FIND_CAUSE_IMPL $item:ident: $imode:tt
- [$( $var:ident ),*]
- { }
- ) => {
- None
- };
- (FIND_FROM_IMPL $name:ident $item:ident: $imode:tt
- [$( $var:ident: $typ:ty ),*]
- { from() $( $tail:tt )*}
- ) => {
- $(
- impl From<$typ> for $name {
- fn from($var: $typ) -> $name {
- $name::$item($var)
- }
- }
- )*
- quick_error!(FIND_FROM_IMPL
- $name $item: $imode [$( $var:$typ ),*]
- {$( $tail )*});
- };
- (FIND_FROM_IMPL $name:ident $item:ident: UNIT
- [ ]
- { from($ftyp:ty) $( $tail:tt )*}
- ) => {
- impl From<$ftyp> for $name {
- fn from(_discarded_error: $ftyp) -> $name {
- $name::$item
- }
- }
- quick_error!(FIND_FROM_IMPL
- $name $item: UNIT [ ]
- {$( $tail )*});
- };
- (FIND_FROM_IMPL $name:ident $item:ident: TUPLE
- [$( $var:ident: $typ:ty ),*]
- { from($fvar:ident: $ftyp:ty) -> ($( $texpr:expr ),*) $( $tail:tt )*}
- ) => {
- impl From<$ftyp> for $name {
- fn from($fvar: $ftyp) -> $name {
- $name::$item($( $texpr ),*)
- }
- }
- quick_error!(FIND_FROM_IMPL
- $name $item: TUPLE [$( $var:$typ ),*]
- { $($tail)* });
- };
- (FIND_FROM_IMPL $name:ident $item:ident: STRUCT
- [$( $var:ident: $typ:ty ),*]
- { from($fvar:ident: $ftyp:ty) -> {$( $tvar:ident: $texpr:expr ),*} $( $tail:tt )*}
- ) => {
- impl From<$ftyp> for $name {
- fn from($fvar: $ftyp) -> $name {
- $name::$item {
- $( $tvar: $texpr ),*
- }
- }
- }
- quick_error!(FIND_FROM_IMPL
- $name $item: STRUCT [$( $var:$typ ),*]
- { $($tail)* });
- };
- (FIND_FROM_IMPL $name:ident $item:ident: $imode:tt
- [$( $var:ident: $typ:ty ),*]
- { $t:tt $( $tail:tt )*}
- ) => {
- quick_error!(FIND_FROM_IMPL
- $name $item: $imode [$( $var:$typ ),*]
- {$( $tail )*}
- );
- };
- (FIND_FROM_IMPL $name:ident $item:ident: $imode:tt
- [$( $var:ident: $typ:ty ),*]
- { }
- ) => {
- };
- (ITEM_BODY $(#[$imeta:meta])* $item:ident: UNIT
- ) => { };
- (ITEM_BODY $(#[$imeta:meta])* $item:ident: TUPLE
- [$( $typ:ty ),*]
- ) => {
- ($( $typ ),*)
- };
- (ITEM_BODY $(#[$imeta:meta])* $item:ident: STRUCT
- [$( $var:ident: $typ:ty ),*]
- ) => {
- {$( $var:$typ ),*}
- };
- (ITEM_PATTERN $name:ident $item:ident: UNIT []
- ) => {
- $name::$item
- };
- (ITEM_PATTERN $name:ident $item:ident: TUPLE
- [$( ref $var:ident ),*]
- ) => {
- $name::$item ($( ref $var ),*)
- };
- (ITEM_PATTERN $name:ident $item:ident: STRUCT
- [$( ref $var:ident ),*]
- ) => {
- $name::$item {$( ref $var ),*}
- };
- // This one should match all allowed sequences in "funcs" but not match
- // anything else.
- // This is to contrast FIND_* clauses which just find stuff they need and
- // skip everything else completely
- (ERROR_CHECK $imode:tt display($self_:tt) -> ($( $exprs:tt )*) $( $tail:tt )*)
- => { quick_error!(ERROR_CHECK $imode $($tail)*); };
- (ERROR_CHECK $imode:tt display($pattern: expr) $( $tail:tt )*)
- => { quick_error!(ERROR_CHECK $imode $($tail)*); };
- (ERROR_CHECK $imode:tt display($pattern: expr, $( $exprs:tt )*) $( $tail:tt )*)
- => { quick_error!(ERROR_CHECK $imode $($tail)*); };
- (ERROR_CHECK $imode:tt description($expr:expr) $( $tail:tt )*)
- => { quick_error!(ERROR_CHECK $imode $($tail)*); };
- (ERROR_CHECK $imode:tt cause($expr:expr) $($tail:tt)*)
- => { quick_error!(ERROR_CHECK $imode $($tail)*); };
- (ERROR_CHECK $imode:tt from() $($tail:tt)*)
- => { quick_error!(ERROR_CHECK $imode $($tail)*); };
- (ERROR_CHECK $imode:tt from($ftyp:ty) $($tail:tt)*)
- => { quick_error!(ERROR_CHECK $imode $($tail)*); };
- (ERROR_CHECK TUPLE from($fvar:ident: $ftyp:ty) -> ($( $e:expr ),*) $( $tail:tt )*)
- => { quick_error!(ERROR_CHECK TUPLE $($tail)*); };
- (ERROR_CHECK STRUCT from($fvar:ident: $ftyp:ty) -> {$( $v:ident: $e:expr ),*} $( $tail:tt )*)
- => { quick_error!(ERROR_CHECK STRUCT $($tail)*); };
- (ERROR_CHECK $imode:tt ) => {};
- // Utility functions
- (IDENT $ident:ident) => { $ident }
-}
deleted file mode 100644
--- a/third_party/rust/error-chain/src/quick_main.rs
+++ /dev/null
@@ -1,77 +0,0 @@
-/// Convenient wrapper to be able to use `try!` and such in the main. You can
-/// use it with a separated function:
-///
-/// ```ignore
-/// # #[macro_use] extern crate error_chain;
-/// # error_chain! {}
-/// quick_main!(run);
-///
-/// fn run() -> Result<()> {
-/// Err("error".into())
-/// }
-/// ```
-///
-/// or with a closure:
-///
-/// ```ignore
-/// # #[macro_use] extern crate error_chain;
-/// # error_chain! {}
-/// quick_main!(|| -> Result<()> {
-/// Err("error".into())
-/// });
-/// ```
-///
-/// You can also set the exit value of the process by returning a type that implements [`ExitCode`](trait.ExitCode.html):
-///
-/// ```ignore
-/// # #[macro_use] extern crate error_chain;
-/// # error_chain! {}
-/// quick_main!(run);
-///
-/// fn run() -> Result<u32> {
-/// Err("error".into())
-/// }
-/// ```
-#[macro_export]
-macro_rules! quick_main {
- ($main:expr) => {
- fn main() {
- use ::std::io::Write;
- let stderr = &mut ::std::io::stderr();
- let errmsg = "Error writing to stderr";
-
- ::std::process::exit(match $main() {
- Ok(ret) => $crate::ExitCode::code(ret),
- Err(ref e) => {
- let e: &$crate::ChainedError<ErrorKind=_> = e;
- writeln!(stderr, "Error: {}", e).expect(errmsg);
-
- for e in e.iter().skip(1) {
- writeln!(stderr, "Caused by: {}", e).expect(errmsg);
- }
-
- if let Some(backtrace) = e.backtrace() {
- writeln!(stderr, "{:?}", backtrace).expect(errmsg);
- }
-
- 1
- }
- });
- }
- };
-}
-
-/// Represents a value that can be used as the exit status of the process.
-/// See [`quick_main!`](macro.quick_main.html).
-pub trait ExitCode {
- /// Returns the value to use as the exit status.
- fn code(self) -> i32;
-}
-
-impl ExitCode for i32 {
- fn code(self) -> i32 { self }
-}
-
-impl ExitCode for () {
- fn code(self) -> i32 { 0 }
-}
deleted file mode 100644
--- a/third_party/rust/error-chain/tests/quick_main.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-#![allow(dead_code)]
-#[macro_use]
-extern crate error_chain;
-
-error_chain!();
-
-mod unit {
- use super::*;
- quick_main!(run);
-
- fn run() -> Result<()> {
- Ok(())
- }
-}
-
-mod i32 {
- use super::*;
- quick_main!(run);
-
- fn run() -> Result<i32> {
- Ok(1)
- }
-}
-
-mod closure {
- use super::*;
- quick_main!(|| -> Result<()> {
- Ok(())
- });
-}
deleted file mode 100644
--- a/third_party/rust/error-chain/tests/tests.rs
+++ /dev/null
@@ -1,543 +0,0 @@
-#![allow(dead_code)]
-//#![feature(trace_macros)]
-//
-//trace_macros!(true);
-
-#[macro_use]
-extern crate error_chain;
-
-#[test]
-fn smoke_test_1() {
- error_chain! {
- types {
- Error, ErrorKind, ResultExt, Result;
- }
-
- links { }
-
- foreign_links { }
-
- errors { }
- };
-}
-
-#[test]
-fn smoke_test_2() {
- error_chain! {
- types { }
-
- links { }
-
- foreign_links { }
-
- errors { }
- };
-}
-
-#[test]
-fn smoke_test_3() {
- error_chain! {
- links { }
-
- foreign_links { }
-
- errors { }
- };
-}
-
-#[test]
-fn smoke_test_4() {
- error_chain! {
- links { }
-
- foreign_links { }
-
- errors {
- HttpStatus(e: u32) {
- description("http request returned an unsuccessful status code")
- display("http request returned an unsuccessful status code: {}", e)
- }
- }
- };
-}
-
-#[test]
-fn smoke_test_5() {
- error_chain! {
- types { }
-
- links { }
-
- foreign_links { }
-
- errors {
- HttpStatus(e: u32) {
- description("http request returned an unsuccessful status code")
- display("http request returned an unsuccessful status code: {}", e)
- }
- }
- };
-}
-
-#[test]
-fn smoke_test_6() {
- error_chain! {
- errors {
- HttpStatus(e: u32) {
- description("http request returned an unsuccessful status code")
- display("http request returned an unsuccessful status code: {}", e)
- }
- }
- };
-}
-
-#[test]
-fn smoke_test_7() {
- error_chain! {
- types { }
-
- foreign_links { }
-
- errors {
- HttpStatus(e: u32) {
- description("http request returned an unsuccessful status code")
- display("http request returned an unsuccessful status code: {}", e)
- }
- }
- };
-}
-
-#[test]
-fn smoke_test_8() {
- error_chain! {
- types { }
-
- links { }
- links { }
-
- foreign_links { }
- foreign_links { }
-
- errors {
- FileNotFound
- AccessDenied
- }
- };
-}
-
-#[test]
-fn order_test_1() {
- error_chain! { types { } links { } foreign_links { } errors { } };
-}
-
-#[test]
-fn order_test_2() {
- error_chain! { links { } types { } foreign_links { } errors { } };
-}
-
-#[test]
-fn order_test_3() {
- error_chain! { foreign_links { } links { } errors { } types { } };
-}
-
-#[test]
-fn order_test_4() {
- error_chain! { errors { } types { } foreign_links { } };
-}
-
-#[test]
-fn order_test_5() {
- error_chain! { foreign_links { } types { } };
-}
-
-#[test]
-fn order_test_6() {
- error_chain! {
- links { }
-
- errors {
- HttpStatus(e: u32) {
- description("http request returned an unsuccessful status code")
- display("http request returned an unsuccessful status code: {}", e)
- }
- }
-
-
- foreign_links { }
- };
-}
-
-#[test]
-fn order_test_7() {
- error_chain! {
- links { }
-
- foreign_links { }
-
- types {
- Error, ErrorKind, ResultExt, Result;
- }
- };
-}
-
-
-#[test]
-fn order_test_8() {
- error_chain! {
- links { }
-
- foreign_links { }
- foreign_links { }
-
- types {
- Error, ErrorKind, ResultExt, Result;
- }
- };
-}
-
-#[test]
-fn empty() {
- error_chain! { };
-}
-
-#[test]
-#[cfg(feature = "backtrace")]
-fn has_backtrace_depending_on_env() {
- use std::env;
-
- error_chain! {
- types {}
- links {}
- foreign_links {}
- errors {
- MyError
- }
- }
-
- let original_value = env::var_os("RUST_BACKTRACE");
-
- // missing RUST_BACKTRACE and RUST_BACKTRACE=0
- env::remove_var("RUST_BACKTRACE");
- let err = Error::from(ErrorKind::MyError);
- assert!(err.backtrace().is_none());
- env::set_var("RUST_BACKTRACE", "0");
- let err = Error::from(ErrorKind::MyError);
- assert!(err.backtrace().is_none());
-
- // RUST_BACKTRACE set to anything but 0
- env::set_var("RUST_BACKTRACE", "yes");
- let err = Error::from(ErrorKind::MyError);
- assert!(err.backtrace().is_some());
-
- if let Some(var) = original_value {
- env::set_var("RUST_BACKTRACE", var);
- }
-}
-
-#[test]
-fn chain_err() {
- use std::fmt;
-
- error_chain! {
- foreign_links {
- Fmt(fmt::Error);
- }
- errors {
- Test
- }
- }
-
- let _: Result<()> = Err(fmt::Error).chain_err(|| "");
- let _: Result<()> = Err(Error::from_kind(ErrorKind::Test)).chain_err(|| "");
-}
-
-#[test]
-fn links() {
- mod test {
- error_chain! {}
- }
-
- error_chain! {
- links {
- Test(test::Error, test::ErrorKind);
- }
- }
-}
-
-#[cfg(test)]
-mod foreign_link_test {
-
- use std::fmt;
-
- // Note: foreign errors must be `pub` because they appear in the
- // signature of the public foreign_link_error_path
- #[derive(Debug)]
- pub struct ForeignError {
- cause: ForeignErrorCause
- }
-
- impl ::std::error::Error for ForeignError {
- fn description(&self) -> &'static str {
- "Foreign error description"
- }
-
- fn cause(&self) -> Option<&::std::error::Error> { Some(&self.cause) }
- }
-
- impl fmt::Display for ForeignError {
- fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
- write!(formatter, "Foreign error display")
- }
- }
-
- #[derive(Debug)]
- pub struct ForeignErrorCause {}
-
- impl ::std::error::Error for ForeignErrorCause {
- fn description(&self) -> &'static str {
- "Foreign error cause description"
- }
-
- fn cause(&self) -> Option<&::std::error::Error> { None }
- }
-
- impl fmt::Display for ForeignErrorCause {
- fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
- write!(formatter, "Foreign error cause display")
- }
- }
-
- error_chain! {
- types{
- Error, ErrorKind, ResultExt, Result;
- }
- links {}
- foreign_links {
- Foreign(ForeignError);
- Io(::std::io::Error);
- }
- errors {}
- }
-
- #[test]
- fn display_underlying_error() {
- let chained_error = try_foreign_error().err().unwrap();
- assert_eq!(
- format!("{}", ForeignError{ cause: ForeignErrorCause{} }),
- format!("{}", chained_error)
- );
- }
-
- #[test]
- fn finds_cause() {
- let chained_error = try_foreign_error().err().unwrap();
- assert_eq!(
- format!("{}", ForeignErrorCause{}),
- format!("{}", ::std::error::Error::cause(&chained_error).unwrap())
- );
- }
-
- #[test]
- fn iterates() {
- let chained_error = try_foreign_error().err().unwrap();
- let mut error_iter = chained_error.iter();
- assert_eq!(
- format!("{}", ForeignError{ cause: ForeignErrorCause{} }),
- format!("{}", error_iter.next().unwrap())
- );
- assert_eq!(
- format!("{}", ForeignErrorCause{}),
- format!("{}", error_iter.next().unwrap())
- );
- assert_eq!(
- format!("{:?}", None as Option<&::std::error::Error>),
- format!("{:?}", error_iter.next())
- );
- }
-
- fn try_foreign_error() -> Result<()> {
- try!(Err(ForeignError{
- cause: ForeignErrorCause{}
- }));
- Ok(())
- }
-}
-
-#[cfg(test)]
-mod attributes_test {
- #[allow(unused_imports)]
- use std::io;
-
- #[cfg(not(test))]
- mod inner {
- error_chain! {
-
- }
- }
-
- error_chain! {
- types {
- Error, ErrorKind, ResultExt, Result;
- }
-
- links {
- Inner(inner::Error, inner::ErrorKind) #[cfg(not(test))];
- }
-
- foreign_links {
- Io(io::Error) #[cfg(not(test))];
- }
-
- errors {
- #[cfg(not(test))]
- AnError {
-
- }
- }
- }
-}
-
-#[test]
-fn with_result() {
- error_chain! {
- types {
- Error, ErrorKind, ResultExt, Result;
- }
- }
- let _: Result<()> = Ok(());
-}
-
-#[test]
-fn without_result() {
- error_chain! {
- types {
- Error, ErrorKind, ResultExt;
- }
- }
- let _: Result<(), ()> = Ok(());
-}
-
-#[test]
-fn documentation() {
- mod inner {
- error_chain! {}
- }
-
- error_chain! {
- links {
- Inner(inner::Error, inner::ErrorKind) #[doc = "Doc"];
- }
- foreign_links {
- Io(::std::io::Error) #[doc = "Doc"];
- }
- errors {
- /// Doc
- Variant
- }
- }
-}
-
-#[cfg(test)]
-mod multiple_error_same_mod {
- error_chain! {
- types {
- MyError, MyErrorKind, MyResultExt, MyResult;
- }
- }
- error_chain! {}
-}
-
-#[doc(test)]
-#[deny(dead_code)]
-mod allow_dead_code {
- error_chain! {}
-}
-
-// Make sure links actually work!
-#[test]
-fn rustup_regression() {
- error_chain! {
- links {
- Download(error_chain::mock::Error, error_chain::mock::ErrorKind);
- }
-
- foreign_links { }
-
- errors {
- LocatingWorkingDir {
- description("could not locate working directory")
- }
- }
- }
-}
-
-#[test]
-fn error_patterns() {
- error_chain! {
- links { }
-
- foreign_links { }
-
- errors { }
- }
-
- // Tuples look nice when matching errors
- match Error::from("Test") {
- Error(ErrorKind::Msg(_), _) => {
- }
- }
-}
-
-#[test]
-fn error_first() {
- error_chain! {
- errors {
- LocatingWorkingDir {
- description("could not locate working directory")
- }
- }
-
- links {
- Download(error_chain::mock::Error, error_chain::mock::ErrorKind);
- }
-
- foreign_links { }
- }
-}
-
-#[test]
-fn bail() {
- error_chain! {
- errors { Foo }
- }
-
- fn foo() -> Result<()> {
- bail!(ErrorKind::Foo)
- }
-
- fn bar() -> Result<()> {
- bail!("bar")
- }
-
- fn baz() -> Result<()> {
- bail!("{}", "baz")
- }
-}
-
-/// Since the `types` declaration is a list of symbols, check if we
-/// don't change their meaning or order.
-#[test]
-fn types_declarations() {
- error_chain! {
- types {
- MyError, MyErrorKind, MyResultExt, MyResult;
- }
- }
-
- MyError::from_kind(MyErrorKind::Msg("".into()));
-
- let err: Result<(), ::std::io::Error> = Ok(());
- MyResultExt::chain_err(err, || "").unwrap();
-
- let _: MyResult<()> = Ok(());
-}
deleted file mode 100644
--- a/third_party/rust/metadeps/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"7fddeb99c2f6a8bf0c57f8ec992f4f3dd643174aaf358faaa704d9ae103eddda","Cargo.toml":"92121442fa4299ae532a607fa048008cabb3ff28434f89014be0763b971fe27c","README.md":"d9b95a8e3c7b120af66d04a2390e06cf784e5e29ad05e65877fa932602387fb5","src/lib.rs":"d03ec98e8c9aea41fecccc684564434e589200adad1363067a8f4297e0fa6531","tests/test.rs":"d7475de77f692d838605f9b9645993dbb8a7f8c4dc5fdfd41b8fa52d47f6352c","tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","tests/testlib.pc":"a6e8f05cbef472d36ebb4cbf00bd95410189ba8d41e5b2e974f53da4c62e2b60","tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"829fffe7ea1d747e23f64be972991bc516b2f1ac2ae4a3b33d8bea150c410151"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/metadeps/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/Cargo.lock
-/target
deleted file mode 100644
--- a/third_party/rust/metadeps/Cargo.toml
+++ /dev/null
@@ -1,17 +0,0 @@
-[package]
-name = "metadeps"
-version = "1.1.1"
-authors = ["Josh Triplett <josh@joshtriplett.org>"]
-license = "MIT/Apache-2.0"
-repository = "https://github.com/joshtriplett/metadeps"
-documentation = "http://docs.rs/metadeps"
-description = "Run pkg-config from declarative dependencies in Cargo.toml"
-keywords = ["pkg-config", "build-dependencies", "build-depends", "manifest", "metadata"]
-
-[dependencies]
-error-chain = { version = "0.7.1", default-features = false }
-pkg-config = "0.3.8"
-toml = { version = "0.2", default-features = false }
-
-[dev-dependencies]
-lazy_static = "0.2"
deleted file mode 100644
--- a/third_party/rust/metadeps/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-metadeps lets you write `pkg-config` dependencies in `Cargo.toml` metadata,
-rather than programmatically in `build.rs`. This makes those dependencies
-declarative, so other tools can read them as well.
-
-# Usage
-
-In your `Cargo.toml`, add the following to your `[build-dependencies]`:
-
-```toml
-metadeps = "1.1"
-```
-
-Then, to declare a dependency on `testlib >= 1.2`, and a conditional dependency
-on `testdata >= 4.5`, add the following section:
-
-```toml
-[package.metadata.pkg-config]
-testlib = "1.2"
-testdata = { version = "4.5", feature = "use-testdata" }
-```
-
-In your `build.rs`, add:
-
-```rust
-extern crate metadeps;
-
-fn main() {
- metadeps::probe().unwrap();
-}
-```
deleted file mode 100644
--- a/third_party/rust/metadeps/src/lib.rs
+++ /dev/null
@@ -1,84 +0,0 @@
-//! metadeps lets you write `pkg-config` dependencies in `Cargo.toml` metadata,
-//! rather than programmatically in `build.rs`. This makes those dependencies
-//! declarative, so other tools can read them as well.
-//!
-//! metadeps parses metadata like this in `Cargo.toml`:
-//!
-//! ```toml
-//! [package.metadata.pkg-config]
-//! testlib = "1.2"
-//! testdata = { version = "4.5", feature = "some-feature" }
-//! ```
-
-#![deny(missing_docs, warnings)]
-
-#[macro_use]
-extern crate error_chain;
-extern crate pkg_config;
-extern crate toml;
-
-use std::collections::HashMap;
-use std::env;
-use std::fs;
-use std::io::Read;
-use std::path::PathBuf;
-use pkg_config::{Config, Library};
-
-error_chain! {
- foreign_links {
- PkgConfig(pkg_config::Error) #[doc="pkg-config error"];
- }
-}
-
-/// Probe all libraries configured in the Cargo.toml
-/// `[package.metadata.pkg-config]` section.
-pub fn probe() -> Result<HashMap<String, Library>> {
- let dir = try!(env::var_os("CARGO_MANIFEST_DIR").ok_or("$CARGO_MANIFEST_DIR not set"));
- let mut path = PathBuf::from(dir);
- path.push("Cargo.toml");
- let mut manifest = try!(fs::File::open(&path).chain_err(||
- format!("Error opening {}", path.display())
- ));
- let mut manifest_str = String::new();
- try!(manifest.read_to_string(&mut manifest_str).chain_err(||
- format!("Error reading {}", path.display())
- ));
- let toml = try!(manifest_str.parse::<toml::Value>().map_err(|e|
- format!("Error parsing TOML from {}: {:?}", path.display(), e)
- ));
- let key = "package.metadata.pkg-config";
- let meta = try!(toml.lookup(key).ok_or(
- format!("No {} in {}", key, path.display())
- ));
- let table = try!(meta.as_table().ok_or(
- format!("{} not a table in {}", key, path.display())
- ));
- let mut libraries = HashMap::new();
- for (name, value) in table {
- let ref version = match value {
- &toml::Value::String(ref s) => s,
- &toml::Value::Table(ref t) => {
- let mut feature = None;
- let mut version = None;
- for (tname, tvalue) in t {
- match (tname.as_str(), tvalue) {
- ("feature", &toml::Value::String(ref s)) => { feature = Some(s); }
- ("version", &toml::Value::String(ref s)) => { version = Some(s); }
- _ => bail!("Unexpected key {}.{}.{} type {}", key, name, tname, tvalue.type_str()),
- }
- }
- if let Some(feature) = feature {
- let var = format!("CARGO_FEATURE_{}", feature.to_uppercase().replace('-', "_"));
- if env::var_os(var).is_none() {
- continue;
- }
- }
- try!(version.ok_or(format!("No version in {}.{}", key, name)))
- }
- _ => bail!("{}.{} not a string or table", key, name),
- };
- let library = try!(Config::new().atleast_version(&version).probe(name));
- libraries.insert(name.clone(), library);
- }
- Ok(libraries)
-}
deleted file mode 100644
--- a/third_party/rust/metadeps/tests/test.rs
+++ /dev/null
@@ -1,76 +0,0 @@
-#[macro_use]
-extern crate lazy_static;
-extern crate metadeps;
-extern crate pkg_config;
-
-use std::env;
-use std::sync::Mutex;
-
-lazy_static! {
- static ref LOCK: Mutex<()> = Mutex::new(());
-}
-
-fn toml(path: &str) -> metadeps::Result<std::collections::HashMap<String, pkg_config::Library>> {
- let _l = LOCK.lock();
- env::set_var("PKG_CONFIG_PATH", &env::current_dir().unwrap().join("tests"));
- env::set_var("CARGO_MANIFEST_DIR", &env::current_dir().unwrap().join("tests").join(path));
- env::set_var("CARGO_FEATURE_TEST_FEATURE", "");
- metadeps::probe()
-}
-
-#[test]
-fn good() {
- let libraries = toml("toml-good").unwrap();
- let testlib = libraries.get("testlib").unwrap();
- assert_eq!(testlib.version, "1.2.3");
- let testdata = libraries.get("testdata").unwrap();
- assert_eq!(testdata.version, "4.5.6");
- assert!(libraries.get("testmore").is_none());
-}
-
-fn toml_err(path: &str, err_starts_with: &str) {
- let err = toml(path).unwrap_err();
- if !err.description().starts_with(err_starts_with) {
- panic!("Expected error to start with: {:?}\nGot error: {:?}", err_starts_with, err);
- }
-}
-
-#[test]
-fn missing_file() {
- toml_err("toml-missing-file", "Error opening");
-}
-
-#[test]
-fn missing_key() {
- toml_err("toml-missing-key", "No package.metadata.pkg-config in");
-}
-
-#[test]
-fn not_table() {
- toml_err("toml-not-table", "package.metadata.pkg-config not a table in");
-}
-
-#[test]
-fn version_missing() {
- toml_err("toml-version-missing", "No version in package.metadata.pkg-config.testlib");
-}
-
-#[test]
-fn version_not_string() {
- toml_err("toml-version-not-string", "package.metadata.pkg-config.testlib not a string or table");
-}
-
-#[test]
-fn version_in_table_not_string() {
- toml_err("toml-version-in-table-not-string", "Unexpected key package.metadata.pkg-config.testlib.version type integer");
-}
-
-#[test]
-fn feature_not_string() {
- toml_err("toml-feature-not-string", "Unexpected key package.metadata.pkg-config.testlib.feature type integer");
-}
-
-#[test]
-fn unexpected_key() {
- toml_err("toml-unexpected-key", "Unexpected key package.metadata.pkg-config.testlib.color type string");
-}
deleted file mode 100644
--- a/third_party/rust/metadeps/tests/testdata.pc
+++ /dev/null
@@ -1,8 +0,0 @@
-Name: Test Data
-Description: Fake data to test pkg-config.
-Version: 4.5.6
-
-prefix=/usr
-datarootdir=${prefix}/share
-datadir=${datarootdir}
-testdata=${datadir}/testdata/test.dat
deleted file mode 100644
--- a/third_party/rust/metadeps/tests/testlib.pc
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=/usr
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib/x86_64-linux-gnu
-includedir=${prefix}/include/testlib
-
-Name: Test Library
-Description: A fake library to test pkg-config.
-Version: 1.2.3
-Libs: L${libdir} -ltest
-Cflags: -I${includedir}
deleted file mode 100644
--- a/third_party/rust/metadeps/tests/toml-missing-file/no-cargo-toml-here
+++ /dev/null
@@ -1,1 +0,0 @@
-No Cargo.toml here
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"7150ee9391a955b2ef7e0762fc61c0c1aab167620ca36d88d78062d93b8334ba",".travis.yml":"9b8376fc479996f32f8a690e6009fc2f7e9f6dc1b1224e0180a92ad65b0b2183","Cargo.toml":"c9adde499850222639dec26ff52a2f7c2285a970095a437231856bf3182eb3c6","Makefile":"85b6d903eecac170ac97f10d9d89b8366cd91f5ea2f7c6212704bc590b64cf50","README.md":"614cf0c6242be3e62e45a3d60ce9a2a1581bdc46b28b25d5f40caba558e4d615","build.rs":"95e0820ac2e24e0a4951b92454bbf4eb0967d389a4bc358a844156e5f425bd56","src/draw_buffer.rs":"4b3c61b230e4b4f025ec60b594489570b0ea159e1dada5910d3c0edadbaf6542","src/gl_context.rs":"633392d4b558d89877f70125f799a9c6f1788505d6837456e359198f028884d0","src/gl_context_attributes.rs":"8ddf99864f838ba847783d824e85eb71c8eea7d5dfb9950737dfb1472a33a4f6","src/gl_context_capabilities.rs":"9f665ad04d42d47d15ecbd430639d95da526ec5951f0b7abe2434adc1415c85d","src/gl_feature.rs":"b826884900c0e8d6317a41ebb6c30bdb468601bf1c030c376749bdb2ecd2f15a","src/gl_formats.rs":"d15a8e102ebac82c166be4ba2a6e6702a82d509ac61102157c26a0ae25f54ac7","src/gl_limits.rs":"a7837b11ded456ce454d9beb642359ac1ca755262654ac53bca371dd55b2d172","src/lib.rs":"9d66fc08d6fe533644e2f7dec11e3cdc6f2f237b2fb0bb1fc5996a933c87ab8e","src/platform/mod.rs":"29887128ed1e0c77b5b5dcd1bfc39ef0a53598db5325d76b71f5a772b480789b","src/platform/not_implemented/mod.rs":"d576e9fc3164f9e2a8ff9460a60eaa8ecada44c600de1a4d1bb5513ab93569af","src/platform/not_implemented/native_gl_context.rs":"fe018722b8bebbd59b6fae759dd78b0175d10bf110205b113ff155fd06d0f75d","src/platform/with_cgl/mod.rs":"b05dc146c9ba82d62410d9b0566a8aa70c77e7ec583ad4881c531d7118454543","src/platform/with_cgl/native_gl_context.rs":"c6271cfa96836d8f833f5efbc90352852557d582db41d2c513cc36c3f966ae88","src/platform/with_egl/mod.rs":"c52ac147eb051733070c36b2c62be8c57427f80999507f62a9ce801f4aac284c","src/platform/with_egl/native_gl_context.rs":"3a8342d53de9525a5478cc96b323dbad2b3628aa6655fe5f092834cc72256116","src/platform/with_egl/utils.rs":"508521e2bf3809ffe0dfea4fa4a358903f49c77a33aa42cc6c0e7458d992a2a7","src/platform/with_glx/mod.rs":"0e497f38b2071ed189995c91b27b0b199d31bfcc10836e2d26b55023d7aff503","src/platform/with_glx/native_gl_context.rs":"2c648ae18baac14290b2eca3581d474adfea00a29a7ad47a1100e564e74b9152","src/platform/with_glx/utils.rs":"eb81e0a4c62947fa5099c241cfe2e4dd075376d30b22864e042c0f536ac6be58","src/platform/with_osmesa/mod.rs":"995c1f1af7cb113e51f154796f65e95e145f4b25ea32354756f3380e9a7764b5","src/platform/with_wgl/mod.rs":"38f9b44b54c8a1bd4d25ae77a4ea6a2e5454a00b816764d7d74152c1f3c1b126","src/platform/with_wgl/native_gl_context.rs":"4aecd40a811cf38607b17db9724f79bb934e056f85c90c987b2aa82d637b7bb4","src/platform/with_wgl/utils.rs":"d9640c000dcb513cf0a13c4a0d35c423366b7d0894deff299affe0202bdeb770","src/platform/with_wgl/wgl_attributes.rs":"73b75da18519e048011e9c303e402cf7961e3652aa8f4d4ebf507b4ab83d06a3","src/tests.rs":"c0f7ab2584ee97691a9ab8cc00ebd725a040ef54ef56c285ed0cfbf84a7b0263"},"package":"cebfb377484b8fe608acabed968bc4108d44dcfa22318c2e8614eaffd8c5c5f8"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-target
-Cargo.lock
-*~
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/.travis.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-language: rust
-rust: nightly
-sudo: false
-
-addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - gcc-4.8
- - g++-4.8
- - libxxf86vm-dev
- - libosmesa6-dev
- - libgles2-mesa-dev
-
-before_install:
- - if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX=g++-4.8; fi
-
-os:
- - linux
- - osx
-
-script:
- - cargo build --verbose
- # We cannot test egl nor glx in Travis' linux
- # - cargo test --verbose
- # - cargo test --verbose --features test_egl_in_linux
- - if [ "$TRAVIS_OS_NAME" != "linux" ]; then cargo test --verbose; fi
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/Cargo.toml
+++ /dev/null
@@ -1,42 +0,0 @@
-[package]
-name = "offscreen_gl_context"
-license = "MIT / Apache-2.0"
-version = "0.8.2"
-authors = ["Emilio Cobos Álvarez <emilio@crisal.io>", "The Servo Project Developers"]
-description = "Creation and manipulation of HW accelerated offscreen rendering contexts in multiple platforms. Originally intended for the Servo project's WebGL implementation."
-repository = "https://github.com/emilio/rust-offscreen-rendering-context"
-build = "build.rs"
-
-[build-dependencies]
-gl_generator = "0.5"
-
-[features]
-default = ["x11"]
-osmesa = ["osmesa-sys"]
-# NOTE: Just for testing use, there are no other changes
-test_egl_in_linux = []
-
-[dependencies]
-log = "0.3"
-gleam = "0.4"
-euclid = "0.11"
-serde = { version = "0.9", optional = true }
-osmesa-sys = { version = "0.1", optional = true }
-
-[target.x86_64-apple-darwin.dependencies]
-core-foundation = "0.3.0"
-cgl = "0.2"
-
-[target.'cfg(target_os = "linux")'.dependencies.x11]
-optional = true
-version = "2.3.0"
-features = ["xlib"]
-
-[target.'cfg(target_os = "windows")'.dependencies]
-winapi = "0.2"
-gdi32-sys = "0.2"
-user32-sys = "0.2"
-kernel32-sys = "0.2"
-
-[target.'cfg(any(target_os="macos", target_os="windows"))'.dependencies]
-lazy_static = "0.2"
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-.PHONY: all tests
-all:
- @echo > /dev/null
-
-tests:
- cargo test --verbose
- cargo test --features texture_surface --verbose
- cargo test --features "test_osmesa" --verbose
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Offscreen graphics library for Servo
-[![Build
-Status](https://travis-ci.org/emilio/rust-offscreen-rendering-context.svg?branch=master)](https://travis-ci.org/emilio/rust-offscreen-rendering-context)
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/build.rs
+++ /dev/null
@@ -1,56 +0,0 @@
-extern crate gl_generator;
-
-use std::env;
-use std::fs::File;
-use std::path::PathBuf;
-use gl_generator::{Registry, Api, Profile, Fallbacks};
-
-fn main() {
- let target = env::var("TARGET").unwrap();
- let dest = PathBuf::from(&env::var("OUT_DIR").unwrap());
-
- if target.contains("linux") && cfg!(feature = "x11") {
- let mut file = File::create(&dest.join("glx_bindings.rs")).unwrap();
- Registry::new(Api::Glx, (1, 4), Profile::Core, Fallbacks::All, [])
- .write_bindings(gl_generator::StaticGenerator, &mut file).unwrap();
- println!("cargo:rustc-link-lib=GL");
- }
-
- if target.contains("android") || (target.contains("linux") && cfg!(feature = "test_egl_in_linux")) {
- let mut file = File::create(&dest.join("egl_bindings.rs")).unwrap();
- Registry::new(Api::Egl, (1, 4), Profile::Core, Fallbacks::All, [])
- .write_bindings(gl_generator::StaticGenerator, &mut file).unwrap();
- println!("cargo:rustc-link-lib=EGL");
- }
-
- if target.contains("windows") {
- let mut file = File::create(&dest.join("wgl_bindings.rs")).unwrap();
- Registry::new(Api::Wgl, (1, 0), Profile::Core, Fallbacks::All, [])
- .write_bindings(gl_generator::StaticGenerator, &mut file)
- .unwrap();
-
- let mut file = File::create(&dest.join("wgl_extra_bindings.rs")).unwrap();
- Registry::new(Api::Wgl, (1, 0), Profile::Core, Fallbacks::All, [
- "WGL_ARB_create_context",
- "WGL_ARB_create_context_profile",
- "WGL_ARB_create_context_robustness",
- "WGL_ARB_context_flush_control",
- "WGL_ARB_extensions_string",
- "WGL_ARB_framebuffer_sRGB",
- "WGL_ARB_multisample",
- "WGL_ARB_pixel_format",
- "WGL_ARB_pixel_format_float",
- "WGL_EXT_create_context_es2_profile",
- "WGL_EXT_extensions_string",
- "WGL_EXT_framebuffer_sRGB",
- "WGL_EXT_swap_control",
- ])
- .write_bindings(gl_generator::StructGenerator, &mut file).unwrap();
-
- println!("cargo:rustc-link-lib=opengl32");
- }
-
- if target.contains("darwin") {
- println!("cargo:rustc-link-lib=framework=OpenGL");
- }
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/draw_buffer.rs
+++ /dev/null
@@ -1,281 +0,0 @@
-use euclid::Size2D;
-use gleam::gl;
-use gleam::gl::types::{GLuint, GLenum, GLint};
-use std::rc::Rc;
-
-use GLContext;
-use NativeGLContextMethods;
-
-#[derive(Debug)]
-pub enum ColorAttachmentType {
- Texture,
- Renderbuffer,
-}
-
-impl Default for ColorAttachmentType {
- fn default() -> ColorAttachmentType {
- ColorAttachmentType::Renderbuffer
- }
-}
-
-
-/// We either have a color renderbuffer, or a surface bound to a texture bound
-/// to a framebuffer as a color attachment.
-///
-/// NB: The draw buffer manages it, and calls its destroy method on drop, this
-/// is just to avoid propagating the GL functions pointer further down.
-#[derive(Debug)]
-pub enum ColorAttachment {
- Renderbuffer(GLuint),
- Texture(GLuint),
-}
-
-impl ColorAttachment {
- pub fn color_attachment_type(&self) -> ColorAttachmentType {
- match *self {
- ColorAttachment::Renderbuffer(_) => ColorAttachmentType::Renderbuffer,
- ColorAttachment::Texture(_) => ColorAttachmentType::Texture,
- }
- }
-
- fn destroy(self, gl: &gl::Gl) {
- match self {
- ColorAttachment::Renderbuffer(id) => gl.delete_renderbuffers(&[id]),
- ColorAttachment::Texture(tex_id) => gl.delete_textures(&[tex_id]),
- }
- }
-}
-
-/// This structure represents an offscreen context
-/// draw buffer. It has a framebuffer, with at least
-/// color renderbuffer (alpha or not). It may also have
-/// a depth or stencil buffer, depending on context
-/// requirements.
-pub struct DrawBuffer {
- gl_: Rc<gl::Gl>,
- size: Size2D<i32>,
- framebuffer: GLuint,
- stencil_renderbuffer: GLuint,
- depth_renderbuffer: GLuint,
- color_attachment: Option<ColorAttachment>
- // samples: GLsizei,
-}
-
-/// Helper function to create a render buffer
-/// TODO(emilio): We'll need to switch between `glRenderbufferStorage` and
-/// `glRenderbufferStorageMultisample` when we support antialising
-fn create_renderbuffer(gl_: &gl::Gl,
- format: GLenum,
- size: &Size2D<i32>) -> GLuint {
- let ret = gl_.gen_renderbuffers(1)[0];
- gl_.bind_renderbuffer(gl::RENDERBUFFER, ret);
- gl_.renderbuffer_storage(gl::RENDERBUFFER, format, size.width, size.height);
- gl_.bind_renderbuffer(gl::RENDERBUFFER, 0);
-
- ret
-}
-
-impl DrawBuffer {
- pub fn new<T: NativeGLContextMethods>(context: &GLContext<T>,
- mut size: Size2D<i32>,
- color_attachment_type: ColorAttachmentType)
- -> Result<Self, &'static str>
- {
- const MIN_DRAWING_BUFFER_SIZE: i32 = 16;
- use std::cmp;
-
- let attrs = context.borrow_attributes();
- let capabilities = context.borrow_capabilities();
-
- debug!("Creating draw buffer {:?}, {:?}, attrs: {:?}, caps: {:?}",
- size, color_attachment_type, attrs, capabilities);
-
- if attrs.antialias && capabilities.max_samples == 0 {
- return Err("The given GLContext doesn't support requested antialising");
- }
-
- if attrs.preserve_drawing_buffer {
- return Err("preserveDrawingBuffer is not supported yet");
- }
-
- // See https://github.com/servo/servo/issues/12320
- size.width = cmp::max(MIN_DRAWING_BUFFER_SIZE, size.width);
- size.height = cmp::max(MIN_DRAWING_BUFFER_SIZE, size.height);
-
- let mut draw_buffer = DrawBuffer {
- gl_: context.clone_gl(),
- size: size,
- framebuffer: 0,
- color_attachment: None,
- stencil_renderbuffer: 0,
- depth_renderbuffer: 0,
- // samples: 0,
- };
-
- try!(context.make_current());
-
- try!(draw_buffer.init(context, color_attachment_type));
-
- debug_assert_eq!(draw_buffer.gl().check_frame_buffer_status(gl::FRAMEBUFFER),
- gl::FRAMEBUFFER_COMPLETE);
- debug_assert_eq!(draw_buffer.gl().get_error(),
- gl::NO_ERROR);
-
- Ok(draw_buffer)
- }
-
- #[inline(always)]
- pub fn get_framebuffer(&self) -> GLuint {
- self.framebuffer
- }
-
- #[inline(always)]
- pub fn size(&self) -> Size2D<i32> {
- self.size
- }
-
- #[inline(always)]
- // NOTE: We unwrap here because after creation the draw buffer
- // always have a color attachment
- pub fn color_attachment_type(&self) -> ColorAttachmentType {
- self.color_attachment.as_ref().unwrap().color_attachment_type()
- }
-
- pub fn get_bound_color_renderbuffer_id(&self) -> Option<GLuint> {
- match self.color_attachment.as_ref().unwrap() {
- &ColorAttachment::Renderbuffer(id) => Some(id),
- _ => None,
- }
- }
-
- pub fn get_bound_texture_id(&self) -> Option<GLuint> {
- match self.color_attachment.as_ref().unwrap() {
- &ColorAttachment::Renderbuffer(_) => None,
- &ColorAttachment::Texture(id) => Some(id),
- }
- }
-
- fn gl(&self) -> &gl::Gl {
- &*self.gl_
- }
-
-
- fn init<T: NativeGLContextMethods>(&mut self,
- context: &GLContext<T>,
- color_attachment_type: ColorAttachmentType)
- -> Result<(), &'static str> {
- let attrs = context.borrow_attributes();
- let formats = context.borrow_formats();
-
- assert!(self.color_attachment.is_none(),
- "Would leak color attachment!");
- self.color_attachment = match color_attachment_type {
- ColorAttachmentType::Renderbuffer => {
- let color_renderbuffer =
- create_renderbuffer(self.gl(), formats.color_renderbuffer, &self.size);
- debug_assert!(color_renderbuffer != 0);
-
- Some(ColorAttachment::Renderbuffer(color_renderbuffer))
- },
-
- // TODO(ecoal95): Allow more customization of textures
- ColorAttachmentType::Texture => {
- let texture = self.gl().gen_textures(1)[0];
- debug_assert!(texture != 0);
-
- self.gl().bind_texture(gl::TEXTURE_2D, texture);
- self.gl().tex_image_2d(gl::TEXTURE_2D, 0,
- formats.texture_internal as GLint, self.size.width, self.size.height, 0, formats.texture, formats.texture_type, None);
-
- // Low filtering to allow rendering
- self.gl().tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_MAG_FILTER, gl::NEAREST as GLint);
- self.gl().tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_MIN_FILTER, gl::NEAREST as GLint);
-
- // TODO(emilio): Check if these two are neccessary, probably not
- self.gl().tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_WRAP_S, gl::CLAMP_TO_EDGE as GLint);
- self.gl().tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_WRAP_T, gl::CLAMP_TO_EDGE as GLint);
-
- self.gl().bind_texture(gl::TEXTURE_2D, 0);
-
- debug_assert_eq!(self.gl().get_error(), gl::NO_ERROR);
-
- Some(ColorAttachment::Texture(texture))
- },
- };
-
- // After this we check if we need stencil and depth buffers
- if attrs.depth {
- self.depth_renderbuffer = create_renderbuffer(self.gl(), formats.depth, &self.size);
- debug_assert!(self.depth_renderbuffer != 0);
- }
-
- if attrs.stencil {
- self.stencil_renderbuffer = create_renderbuffer(self.gl(), formats.stencil, &self.size);
- debug_assert!(self.stencil_renderbuffer != 0);
- }
-
- self.framebuffer = self.gl().gen_framebuffers(1)[0];
- debug_assert!(self.framebuffer != 0);
-
- // Finally we attach them to the framebuffer
- self.attach_to_framebuffer()
- }
-
- fn attach_to_framebuffer(&mut self) -> Result<(), &'static str> {
- self.gl().bind_framebuffer(gl::FRAMEBUFFER, self.framebuffer);
- // NOTE: The assertion fails if the framebuffer is not bound
- debug_assert_eq!(self.gl().is_framebuffer(self.framebuffer), gl::TRUE);
-
- match *self.color_attachment.as_ref().unwrap() {
- ColorAttachment::Renderbuffer(color_renderbuffer) => {
- self.gl().framebuffer_renderbuffer(gl::FRAMEBUFFER,
- gl::COLOR_ATTACHMENT0,
- gl::RENDERBUFFER,
- color_renderbuffer);
- debug_assert_eq!(self.gl().is_renderbuffer(color_renderbuffer), gl::TRUE);
- },
- ColorAttachment::Texture(texture_id) => {
- self.gl().framebuffer_texture_2d(gl::FRAMEBUFFER,
- gl::COLOR_ATTACHMENT0,
- gl::TEXTURE_2D,
- texture_id, 0);
- },
- }
-
- if self.depth_renderbuffer != 0 {
- self.gl().framebuffer_renderbuffer(gl::FRAMEBUFFER,
- gl::DEPTH_ATTACHMENT,
- gl::RENDERBUFFER,
- self.depth_renderbuffer);
- debug_assert_eq!(self.gl().is_renderbuffer(self.depth_renderbuffer), gl::TRUE);
- }
-
- if self.stencil_renderbuffer != 0 {
- self.gl().framebuffer_renderbuffer(gl::FRAMEBUFFER,
- gl::STENCIL_ATTACHMENT,
- gl::RENDERBUFFER,
- self.stencil_renderbuffer);
- debug_assert_eq!(self.gl().is_renderbuffer(self.stencil_renderbuffer), gl::TRUE);
- }
-
- Ok(())
- }
-}
-
-// NOTE: The initially associated GLContext MUST be the current gl context
-// when drop is called. I know this is an important constraint.
-// Right now there are no problems, if not, consider using a pointer to a
-// parent with Rc<GLContext> and call make_current()
-impl Drop for DrawBuffer {
- fn drop(&mut self) {
- if let Some(att) = self.color_attachment.take() {
- att.destroy(self.gl());
- }
-
- self.gl().delete_framebuffers(&[self.framebuffer]);
-
- // NOTE: Color renderbuffer is destroyed on drop of
- // ColorAttachment
- self.gl().delete_renderbuffers(&[self.stencil_renderbuffer, self.depth_renderbuffer]);
- }
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/gl_context.rs
+++ /dev/null
@@ -1,231 +0,0 @@
-use euclid::Size2D;
-use gleam::gl;
-use gleam::gl::types::{GLuint};
-use std::rc::Rc;
-
-use NativeGLContextMethods;
-use GLContextAttributes;
-use GLContextCapabilities;
-use GLFormats;
-use GLLimits;
-use DrawBuffer;
-use ColorAttachmentType;
-
-/// This is a wrapper over a native headless GL context
-pub struct GLContext<Native> {
- gl_: Rc<gl::Gl>,
- native_context: Native,
- /// This an abstraction over a custom framebuffer
- /// with attachments according to WebGLContextAttributes
- // TODO(ecoal95): Ideally we may want a read and a draw
- // framebuffer, but this is not supported in GLES2, review
- // when we have better support
- draw_buffer: Option<DrawBuffer>,
- attributes: GLContextAttributes,
- capabilities: GLContextCapabilities,
- formats: GLFormats,
- limits: GLLimits,
-}
-
-impl<Native> GLContext<Native>
- where Native: NativeGLContextMethods,
-{
- pub fn create(api_type: gl::GlType,
- shared_with: Option<&Native::Handle>)
- -> Result<Self, &'static str> {
- Self::create_shared_with_dispatcher(api_type, shared_with, None)
- }
-
- pub fn create_shared_with_dispatcher(api_type: gl::GlType,
- shared_with: Option<&Native::Handle>,
- dispatcher: Option<Box<GLContextDispatcher>>)
- -> Result<Self, &'static str> {
- let native_context = try!(Native::create_shared_with_dispatcher(shared_with, dispatcher));
- let gl_ = match api_type {
- gl::GlType::Gl => unsafe { gl::GlFns::load_with(|s| Self::get_proc_address(s) as *const _) },
- gl::GlType::Gles => unsafe { gl::GlesFns::load_with(|s| Self::get_proc_address(s) as *const _) },
- };
-
- try!(native_context.make_current());
- let attributes = GLContextAttributes::any();
- let formats = GLFormats::detect(&attributes);
- let limits = GLLimits::detect(&*gl_);
-
- Ok(GLContext {
- gl_: gl_,
- native_context: native_context,
- draw_buffer: None,
- attributes: attributes,
- capabilities: GLContextCapabilities::detect(),
- formats: formats,
- limits: limits,
- })
- }
-
- #[inline(always)]
- pub fn get_proc_address(addr: &str) -> *const () {
- Native::get_proc_address(addr)
- }
-
- #[inline(always)]
- pub fn current_handle() -> Option<Native::Handle> {
- Native::current_handle()
- }
-
- pub fn new(size: Size2D<i32>,
- attributes: GLContextAttributes,
- color_attachment_type: ColorAttachmentType,
- api_type: gl::GlType,
- shared_with: Option<&Native::Handle>)
- -> Result<Self, &'static str> {
- Self::new_shared_with_dispatcher(size,
- attributes,
- color_attachment_type,
- api_type,
- shared_with,
- None)
- }
-
- pub fn new_shared_with_dispatcher(size: Size2D<i32>,
- attributes: GLContextAttributes,
- color_attachment_type: ColorAttachmentType,
- api_type: gl::GlType,
- shared_with: Option<&Native::Handle>,
- dispatcher: Option<Box<GLContextDispatcher>>)
- -> Result<Self, &'static str> {
- // We create a headless context with a dummy size, we're painting to the
- // draw_buffer's framebuffer anyways.
- let mut context =
- try!(Self::create_shared_with_dispatcher(api_type,
- shared_with,
- dispatcher));
-
- context.formats = GLFormats::detect(&attributes);
- context.attributes = attributes;
-
- try!(context.init_offscreen(size, color_attachment_type));
-
- Ok(context)
- }
-
- #[inline(always)]
- pub fn with_default_color_attachment(size: Size2D<i32>,
- attributes: GLContextAttributes,
- api_type: gl::GlType,
- shared_with: Option<&Native::Handle>)
- -> Result<Self, &'static str> {
- Self::new(size, attributes, ColorAttachmentType::default(), api_type, shared_with)
- }
-
- #[inline(always)]
- pub fn make_current(&self) -> Result<(), &'static str> {
- self.native_context.make_current()
- }
-
- #[inline(always)]
- pub fn unbind(&self) -> Result<(), &'static str> {
- let ret = self.native_context.unbind();
-
- // OSMesa doesn't allow any API to unbind a context before [1], and just
- // bails out on null context, buffer, or whatever, so not much we can do
- // here. Thus, ignore the failure and just flush the context if we're
- // using an old OSMesa version.
- //
- // [1]: https://www.mail-archive.com/mesa-dev@lists.freedesktop.org/msg128408.html
- if self.native_context.is_osmesa() && ret.is_err() {
- self.gl().flush();
- return Ok(())
- }
-
- ret
- }
-
- #[inline(always)]
- pub fn is_current(&self) -> bool {
- self.native_context.is_current()
- }
-
- #[inline(always)]
- pub fn handle(&self) -> Native::Handle {
- self.native_context.handle()
- }
-
- pub fn gl(&self) -> &gl::Gl {
- &*self.gl_
- }
-
- pub fn clone_gl(&self) -> Rc<gl::Gl> {
- self.gl_.clone()
- }
-
- // Allow borrowing these unmutably
- pub fn borrow_attributes(&self) -> &GLContextAttributes {
- &self.attributes
- }
-
- pub fn borrow_capabilities(&self) -> &GLContextCapabilities {
- &self.capabilities
- }
-
- pub fn borrow_formats(&self) -> &GLFormats {
- &self.formats
- }
-
- pub fn borrow_limits(&self) -> &GLLimits {
- &self.limits
- }
-
- pub fn borrow_draw_buffer(&self) -> Option<&DrawBuffer> {
- self.draw_buffer.as_ref()
- }
-
- pub fn get_framebuffer(&self) -> GLuint {
- if let Some(ref db) = self.draw_buffer {
- return db.get_framebuffer();
- }
-
- let ret = self.gl().get_integer_v(gl::FRAMEBUFFER_BINDING);
- ret as GLuint
- }
-
- pub fn draw_buffer_size(&self) -> Option<Size2D<i32>> {
- self.draw_buffer.as_ref().map(|db| db.size())
- }
-
- // We resize just replacing the draw buffer, we don't perform size optimizations
- // in order to keep this generic
- pub fn resize(&mut self, size: Size2D<i32>) -> Result<(), &'static str> {
- if self.draw_buffer.is_some() {
- let color_attachment_type =
- self.borrow_draw_buffer().unwrap().color_attachment_type();
- self.init_offscreen(size, color_attachment_type)
- } else {
- Err("No DrawBuffer found")
- }
- }
-
- fn init_offscreen(&mut self, size: Size2D<i32>, color_attachment_type: ColorAttachmentType) -> Result<(), &'static str> {
- try!(self.create_draw_buffer(size, color_attachment_type));
-
- debug_assert!(self.is_current());
-
- self.gl().clear_color(0.0, 0.0, 0.0, 0.0);
- self.gl().clear(gl::COLOR_BUFFER_BIT | gl::DEPTH_BUFFER_BIT | gl::STENCIL_BUFFER_BIT);
- self.gl().scissor(0, 0, size.width, size.height);
- self.gl().viewport(0, 0, size.width, size.height);
-
- Ok(())
- }
-
- fn create_draw_buffer(&mut self, size: Size2D<i32>, color_attachment_type: ColorAttachmentType) -> Result<(), &'static str> {
- self.draw_buffer = Some(try!(DrawBuffer::new(self, size, color_attachment_type)));
- Ok(())
- }
-}
-
-// Dispatches functions to the thread where a NativeGLContext is bound.
-// Right now it's used in the WGL implementation to dispatch functions to the thread
-// where the context we share from is bound. See the WGL implementation for more details.
-pub trait GLContextDispatcher {
- fn dispatch(&self, Box<Fn() + Send>);
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/gl_context_attributes.rs
+++ /dev/null
@@ -1,73 +0,0 @@
-#[cfg(feature = "serde")]
-use serde::{Deserialize, Deserializer, Serialize, Serializer};
-
-/// This structure represents the attributes the context must support
-/// It's almost (if not) identical to WebGLGLContextAttributes
-#[derive(Clone, Debug, Copy)]
-pub struct GLContextAttributes {
- pub alpha: bool,
- pub depth: bool,
- pub stencil: bool,
- pub antialias: bool,
- pub premultiplied_alpha: bool,
- pub preserve_drawing_buffer: bool,
-}
-
-#[cfg(feature = "serde")]
-impl Deserialize for GLContextAttributes {
- fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
- where D: Deserializer
- {
- let values = try!(<[_; 6]>::deserialize(deserializer));
- Ok(GLContextAttributes {
- alpha: values[0],
- depth: values[1],
- stencil: values[2],
- antialias: values[3],
- premultiplied_alpha: values[4],
- preserve_drawing_buffer: values[5],
- })
- }
-}
-
-#[cfg(feature = "serde")]
-impl Serialize for GLContextAttributes {
- fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
- where S: Serializer
- {
- let values = [
- self.alpha, self.depth, self.stencil,
- self.antialias, self.premultiplied_alpha, self.preserve_drawing_buffer,
- ];
- values.serialize(serializer)
- }
-}
-
-impl GLContextAttributes {
- pub fn any() -> GLContextAttributes {
- GLContextAttributes {
- alpha: false,
- depth: false,
- stencil: false,
- antialias: false,
- premultiplied_alpha: false,
- preserve_drawing_buffer: false,
- }
- }
-}
-
-impl Default for GLContextAttributes {
- // FIXME(ecoal95): `antialias` should be true by default
- // but we do not support antialising so... We must change it
- // when we do. See GLFeature.
- fn default() -> GLContextAttributes {
- GLContextAttributes {
- alpha: true,
- depth: true,
- stencil: false,
- antialias: false,
- premultiplied_alpha: true,
- preserve_drawing_buffer: false
- }
- }
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/gl_context_capabilities.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// use gleam::gl;
-use gleam::gl::{GLint};
-
-#[allow(unused_imports)]
-use GLFeature;
-
-/// This is a cross-platform struct, that every GLContext implementation
-/// should have under the field `capabilities`, as a public field
-/// This should allow us to know the capabilities of a given
-/// GLContext without repeating the same code over and over
-#[derive(Copy, Clone, Debug)]
-pub struct GLContextCapabilities {
- // max antialising samples, 0 if no antialising supported
- pub max_samples: GLint,
-}
-
-impl GLContextCapabilities {
- #[allow(unused_mut)]
- pub fn detect() -> GLContextCapabilities {
- let mut capabilities = GLContextCapabilities {
- max_samples: 0,
- };
-
-
- // FIXME(ecoal95): uncomment me when we have cross-system constants
- // if GLFeature::is_supported(GLFeature::FramebufferMultisample) {
- // unsafe { gl::GetIntegerv(gl::MAX_SAMPLES, &mut capabilities.max_samples as *mut GLint); };
- // }
-
- capabilities
- }
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/gl_feature.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-
-pub enum GLFeature {
- FramebufferMultisample, // Framebuffer multisample, for antialising
-}
-
-/// Possible feature requirements:
-/// * OpenGL version
-/// * GLES version
-/// * Extensions
-#[allow(dead_code)]
-pub struct GLFeatureRequirements {
- opengl_version: u32, // OpenGL version: 1.0 => 10, etc...
- gles_version: u32,
- // Better not check for extensions unless necessary
- // They use different symbols, and that adds a lot of complexity
- // extensions: Vec<&'static str>
-}
-
-// TODO: optimize (maybe use `rust-phf`)?
-fn get_feature_requirements(feature: GLFeature) -> GLFeatureRequirements {
- match feature {
- GLFeature::FramebufferMultisample => GLFeatureRequirements {
- opengl_version: 30,
- gles_version: 30,
- // extensions: vec!["GL_EXT_framebuffer_multisample"]
- }
- }
-}
-
-impl GLFeature {
- pub fn is_supported(feature: GLFeature) -> bool {
- let _ = get_feature_requirements(feature);
- // TODO
- false
- }
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/gl_formats.rs
+++ /dev/null
@@ -1,75 +0,0 @@
-use gleam::gl::types::GLenum;
-use gleam::gl;
-use GLContextAttributes;
-
-/// This structure is here to allow
-/// cross-platform formatting
-pub struct GLFormats {
- pub color_renderbuffer: GLenum,
- pub texture_internal: GLenum,
- pub texture: GLenum,
- pub texture_type: GLenum,
- pub depth: GLenum,
- pub stencil: GLenum
-}
-
-impl GLFormats {
- // In the future we may use extension detection et-al to improve this, for now
- // platform dependent.
- //
- // FIXME: In linux with GLES2 texture attachments create INVALID_ENUM errors.
- // I suspect that it's because of texture formats, but I need time to debugit.
- #[cfg(not(target_os="android"))]
- pub fn detect(attrs: &GLContextAttributes) -> GLFormats {
- if attrs.alpha {
- GLFormats {
- color_renderbuffer: gl::RGBA8,
- texture_internal: gl::RGBA,
- texture: gl::RGBA,
- texture_type: gl::UNSIGNED_BYTE,
- depth: gl::DEPTH_COMPONENT24,
- stencil: gl::STENCIL_INDEX8,
- }
- } else {
- GLFormats {
- color_renderbuffer: gl::RGB8,
- texture_internal: gl::RGB8,
- texture: gl::RGB,
- texture_type: gl::UNSIGNED_BYTE,
- depth: gl::DEPTH_COMPONENT24,
- stencil: gl::STENCIL_INDEX8,
- }
- }
- }
-
- #[cfg(target_os="android")]
- pub fn detect(attrs: &GLContextAttributes) -> GLFormats {
- // detect if the GPU supports RGB8 and RGBA8 renderbuffer/texture storage formats.
- // GL_ARM_rgba8 extension is similar to OES_rgb8_rgba8, but only exposes RGBA8.
- let extensions = gl::get_string(gl::EXTENSIONS);
- let extensions: Vec<&str> = extensions.split(&[',',' '][..]).collect();
- let has_rgb8 = extensions.contains(&"GL_OES_rgb8_rgba8");
- let has_rgba8 = has_rgb8 || extensions.contains(&"GL_ARM_rgba8");
-
- if attrs.alpha {
- GLFormats {
- color_renderbuffer: if has_rgba8 { gl::RGBA8 } else { gl::RGBA4 },
- texture_internal: gl::RGBA,
- texture: gl::RGBA,
- texture_type: if has_rgba8 { gl::UNSIGNED_BYTE } else { gl::UNSIGNED_SHORT_4_4_4_4 },
- depth: gl::DEPTH_COMPONENT16,
- stencil: gl::STENCIL_INDEX8,
- }
- } else {
- GLFormats {
- color_renderbuffer: if has_rgb8 { gl::RGB8 } else { gl::RGB565 },
- texture_internal: gl::RGB,
- texture: gl::RGB,
- texture_type: if has_rgb8 { gl::UNSIGNED_BYTE } else { gl::UNSIGNED_SHORT_4_4_4_4 },
- depth: gl::DEPTH_COMPONENT16,
- stencil: gl::STENCIL_INDEX8,
- }
- }
- }
-}
-
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/gl_limits.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-use gleam::gl;
-
-#[cfg(feature = "serde")]
-use serde::{Deserialize, Deserializer, Serialize, Serializer};
-
-#[derive(Debug, Clone)]
-pub struct GLLimits {
- pub max_vertex_attribs: u32,
- pub max_tex_size: u32,
- pub max_cube_map_tex_size: u32
-}
-
-#[cfg(feature = "serde")]
-impl Deserialize for GLLimits {
- fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
- where D: Deserializer
- {
- let values = try!(<[_; 3]>::deserialize(deserializer));
- Ok(GLLimits {
- max_vertex_attribs: values[0],
- max_tex_size: values[1],
- max_cube_map_tex_size: values[2],
- })
- }
-}
-
-#[cfg(feature = "serde")]
-impl Serialize for GLLimits {
- fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
- where S: Serializer
- {
- [self.max_vertex_attribs, self.max_tex_size, self.max_cube_map_tex_size]
- .serialize(serializer)
- }
-}
-
-impl GLLimits {
- pub fn detect(gl_: &gl::Gl) -> GLLimits {
- GLLimits {
- max_vertex_attribs: gl_.get_integer_v(gl::MAX_VERTEX_ATTRIBS) as u32,
- max_tex_size: gl_.get_integer_v(gl::MAX_TEXTURE_SIZE) as u32,
- max_cube_map_tex_size: gl_.get_integer_v(gl::MAX_CUBE_MAP_TEXTURE_SIZE) as u32
- }
- }
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/lib.rs
+++ /dev/null
@@ -1,81 +0,0 @@
-extern crate gleam;
-extern crate euclid;
-
-#[macro_use]
-extern crate log;
-
-#[cfg(feature="serde")]
-extern crate serde;
-
-#[cfg(all(target_os="linux", feature="x11"))]
-extern crate x11;
-#[cfg(target_os="macos")]
-extern crate cgl;
-#[cfg(target_os="macos")]
-extern crate core_foundation;
-#[cfg(feature="osmesa")]
-extern crate osmesa_sys;
-#[cfg(target_os = "windows")]
-extern crate winapi;
-#[cfg(target_os = "windows")]
-extern crate kernel32;
-#[cfg(target_os = "windows")]
-extern crate gdi32;
-#[cfg(target_os = "windows")]
-extern crate user32;
-#[cfg(any(target_os="macos", target_os="windows"))]
-#[macro_use]
-extern crate lazy_static;
-
-mod platform;
-pub use platform::{NativeGLContext, NativeGLContextMethods, NativeGLContextHandle};
-
-#[cfg(feature="osmesa")]
-pub use platform::{OSMesaContext, OSMesaContextHandle};
-
-mod gl_context;
-pub use gl_context::{GLContext, GLContextDispatcher};
-
-mod draw_buffer;
-pub use draw_buffer::{DrawBuffer, ColorAttachmentType};
-
-mod gl_context_attributes;
-pub use gl_context_attributes::GLContextAttributes;
-
-mod gl_context_capabilities;
-pub use gl_context_capabilities::GLContextCapabilities;
-
-mod gl_feature;
-pub use gl_feature::GLFeature;
-
-mod gl_formats;
-pub use gl_formats::GLFormats;
-
-mod gl_limits;
-pub use gl_limits::GLLimits;
-
-#[cfg(all(target_os="linux", feature="x11"))]
-#[allow(improper_ctypes)]
-mod glx {
- include!(concat!(env!("OUT_DIR"), "/glx_bindings.rs"));
-}
-
-#[cfg(any(target_os="android", all(target_os="linux", feature = "test_egl_in_linux")))]
-#[allow(non_camel_case_types)]
-mod egl {
- use std::os::raw::{c_long, c_void};
- pub type khronos_utime_nanoseconds_t = khronos_uint64_t;
- pub type khronos_uint64_t = u64;
- pub type khronos_ssize_t = c_long;
- pub type EGLint = i32;
- pub type EGLNativeDisplayType = *const c_void;
- pub type EGLNativePixmapType = *const c_void;
- pub type EGLNativeWindowType = *const c_void;
- pub type NativeDisplayType = EGLNativeDisplayType;
- pub type NativePixmapType = EGLNativePixmapType;
- pub type NativeWindowType = EGLNativeWindowType;
- include!(concat!(env!("OUT_DIR"), "/egl_bindings.rs"));
-}
-
-#[cfg(test)]
-mod tests;
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/mod.rs
+++ /dev/null
@@ -1,64 +0,0 @@
-use gl_context::GLContextDispatcher;
-
-pub trait NativeGLContextMethods: Sized {
- type Handle;
-
- fn get_proc_address(&str) -> *const ();
-
- // These are convenient methods to manage handles
- fn current() -> Option<Self>;
- fn current_handle() -> Option<Self::Handle>;
-
- fn create_shared(with: Option<&Self::Handle>) -> Result<Self, &'static str>;
-
- fn create_shared_with_dispatcher(with: Option<&Self::Handle>, _dispatcher: Option<Box<GLContextDispatcher>>)
- -> Result<Self, &'static str> {
- Self::create_shared(with)
- }
-
- fn create_headless() -> Result<Self, &'static str> {
- Self::create_shared(None)
- }
-
- fn handle(&self) -> Self::Handle;
- fn is_current(&self) -> bool;
- fn make_current(&self) -> Result<(), &'static str>;
- fn unbind(&self) -> Result<(), &'static str>;
-
- /// Just a somewhat dirty hack to special-case the handling of context
- /// unbinding on old OSMesa versions.
- fn is_osmesa(&self) -> bool { false }
-}
-
-#[cfg(all(target_os="linux", feature="x11"))]
-pub mod with_glx;
-#[cfg(all(target_os="linux", feature="x11"))]
-pub use self::with_glx::{NativeGLContext, NativeGLContextHandle};
-
-#[cfg(feature="osmesa")]
-pub mod with_osmesa;
-#[cfg(feature="osmesa")]
-pub use self::with_osmesa::{OSMesaContext, OSMesaContextHandle};
-#[cfg(all(target_os="linux", not(feature="x11")))]
-pub use self::with_osmesa::{OSMesaContext as NativeGLContext, OSMesaContextHandle as NativeGLContextHandle};
-
-
-#[cfg(any(target_os="android", all(target_os="linux", feature = "test_egl_in_linux")))]
-pub mod with_egl;
-#[cfg(target_os="android")]
-pub use self::with_egl::{NativeGLContext, NativeGLContextHandle};
-
-#[cfg(target_os="macos")]
-pub mod with_cgl;
-#[cfg(target_os="macos")]
-pub use self::with_cgl::{NativeGLContext, NativeGLContextHandle};
-
-#[cfg(target_os="windows")]
-pub mod with_wgl;
-#[cfg(target_os="windows")]
-pub use self::with_wgl::{NativeGLContext, NativeGLContextHandle};
-
-#[cfg(not(any(target_os="linux", target_os="android", target_os="macos", target_os="windows")))]
-pub mod not_implemented;
-#[cfg(not(any(target_os="linux", target_os="android", target_os="macos", target_os="windows")))]
-pub use self::not_implemented::{NativeGLContext, NativeGLContextHandle};
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/not_implemented/mod.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-mod native_gl_context;
-pub use self::native_gl_context::{NativeGLContext, NativeGLContextHandle};
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/not_implemented/native_gl_context.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-use NativeGLContextMethods;
-
-pub struct NativeGLContext;
-pub struct NativeGLContextHandle;
-
-impl NativeGLContextMethods for NativeGLContext {
- type Handle = NativeGLContextHandle;
-
- fn get_proc_address(_addr: &str) -> *const () {
- 0 as *const ()
- }
-
- fn create_shared(_with: Option<&Self::Handle>) -> Result<NativeGLContext, &'static str> {
- Err("Not implemented (yet)")
- }
-
- fn is_current(&self) -> bool {
- false
- }
-
- fn current() -> Option<Self> {
- None
- }
-
- fn current_handle() -> Option<Self::Handle> {
- None
- }
-
- fn make_current(&self) -> Result<(), &'static str> {
- Err("Not implemented (yet)")
- }
-
- fn unbind(&self) -> Result<(), &'static str> {
- unimplemented!()
- }
-
- fn handle(&self) -> Self::Handle {
- unimplemented!()
- }
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/with_cgl/mod.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-mod native_gl_context;
-pub use self::native_gl_context::NativeGLContext;
-pub use self::native_gl_context::NativeGLContextHandle;
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/with_cgl/native_gl_context.rs
+++ /dev/null
@@ -1,168 +0,0 @@
-use cgl::*;
-use std::mem;
-
-use core_foundation::bundle::{CFBundleGetBundleWithIdentifier, CFBundleGetFunctionPointerForName};
-use core_foundation::base::TCFType;
-use core_foundation::string::CFString;
-use std::str::FromStr;
-use std::sync::Mutex;
-
-use platform::NativeGLContextMethods;
-
-lazy_static! {
- static ref CHOOSE_PIXEL_FORMAT_MUTEX: Mutex<()> = Mutex::new(());
-}
-
-pub struct NativeGLContextHandle(CGLContextObj);
-
-unsafe impl Send for NativeGLContextHandle {}
-
-pub struct NativeGLContext {
- native_context: CGLContextObj,
- weak: bool,
-}
-
-impl NativeGLContext {
- pub fn new(share_context: Option<&CGLContextObj>,
- pixel_format: &CGLPixelFormatObj)
- -> Result<NativeGLContext, &'static str> {
-
- let shared = match share_context {
- Some(ctx) => *ctx,
- None => 0 as CGLContextObj
- };
-
- let mut native: CGLContextObj = unsafe { mem::uninitialized() };
-
- unsafe {
- if CGLCreateContext(*pixel_format, shared, &mut native) != 0 {
- return Err("CGLCreateContext");
- }
- }
-
- debug_assert!(native != 0 as CGLContextObj);
-
- Ok(NativeGLContext {
- native_context: native,
- weak: false,
- })
- }
-}
-
-impl Drop for NativeGLContext {
- fn drop(&mut self) {
- let _ = self.unbind();
- if !self.weak {
- unsafe {
- if CGLDestroyContext(self.native_context) != 0 {
- debug!("CGLDestroyContext returned an error");
- }
- }
- }
- }
-}
-
-impl NativeGLContextMethods for NativeGLContext {
- type Handle = NativeGLContextHandle;
-
- fn get_proc_address(addr: &str) -> *const () {
- let symbol_name: CFString = FromStr::from_str(addr).unwrap();
- let framework_name: CFString = FromStr::from_str("com.apple.opengl").unwrap();
- let framework = unsafe {
- CFBundleGetBundleWithIdentifier(framework_name.as_concrete_TypeRef())
- };
- let symbol = unsafe {
- CFBundleGetFunctionPointerForName(framework, symbol_name.as_concrete_TypeRef())
- };
- symbol as *const ()
- }
-
- fn current() -> Option<Self> {
- if let Some(handle) = Self::current_handle() {
- Some(NativeGLContext {
- native_context: handle.0,
- weak: true,
- })
- } else {
- None
- }
-
- }
-
- fn current_handle() -> Option<Self::Handle> {
- let current = unsafe { CGLGetCurrentContext() };
- if current != 0 as CGLContextObj {
- Some(NativeGLContextHandle(current))
- } else {
- None
- }
- }
-
- fn create_shared(with: Option<&Self::Handle>) -> Result<NativeGLContext, &'static str> {
- // CGLChoosePixelFormat fails if multiple threads try to open a display connection
- // simultaneously. The following error is returned by CGLChoosePixelFormat:
- // kCGLBadConnection - Invalid connection to Core Graphics.
- // We use a static mutex guard to fix this issue
- let _guard = CHOOSE_PIXEL_FORMAT_MUTEX.lock().unwrap();
-
- let mut attributes = [
- 0
- ];
-
- let mut pixel_format : CGLPixelFormatObj = unsafe { mem::uninitialized() };
- let mut pix_count = 0;
-
- unsafe {
- if CGLChoosePixelFormat(attributes.as_mut_ptr(), &mut pixel_format, &mut pix_count) != 0 {
- return Err("CGLChoosePixelFormat");
- }
-
- if pix_count == 0 {
- return Err("No pixel formats available");
- }
- }
-
- let result = NativeGLContext::new(with.map(|handle| &handle.0), &pixel_format);
-
- unsafe {
- if CGLDestroyPixelFormat(pixel_format) != 0 {
- debug!("CGLDestroyPixelformat errored");
- }
- }
-
- result
- }
-
- fn handle(&self) -> Self::Handle {
- NativeGLContextHandle(self.native_context)
- }
-
- #[inline(always)]
- fn is_current(&self) -> bool {
- unsafe {
- CGLGetCurrentContext() == self.native_context
- }
- }
-
- fn make_current(&self) -> Result<(), &'static str> {
- unsafe {
- if !self.is_current() &&
- CGLSetCurrentContext(self.native_context) != 0 {
- Err("CGLSetCurrentContext")
- } else {
- Ok(())
- }
- }
- }
-
- fn unbind(&self) -> Result<(), &'static str> {
- unsafe {
- if self.is_current() &&
- CGLSetCurrentContext(0 as CGLContextObj) != 0 {
- Err("CGLSetCurrentContext (on unbind)")
- } else {
- Ok(())
- }
- }
- }
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/with_egl/mod.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-mod native_gl_context;
-mod utils;
-pub use self::native_gl_context::NativeGLContext;
-pub use self::native_gl_context::NativeGLContextHandle;
-
-// NB: The last three zeros in egl attributes after the egl::EGL_NONE
-// are a workaround for workaround buggy implementations.
-// Also, when we compare a createxx call with zero, it's equivalent to
-// compare it with egl::EGL_NO_XX
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/with_egl/native_gl_context.rs
+++ /dev/null
@@ -1,156 +0,0 @@
-use euclid::Size2D;
-use platform::NativeGLContextMethods;
-use platform::with_egl::utils::{create_pixel_buffer_backed_offscreen_context};
-use std::ffi::CString;
-use egl;
-use egl::types::{EGLint, EGLBoolean, EGLDisplay, EGLSurface, EGLConfig, EGLContext};
-
-pub struct NativeGLContextHandle(pub EGLDisplay, pub EGLSurface);
-unsafe impl Send for NativeGLContextHandle {}
-
-pub struct NativeGLContext {
- native_display: EGLDisplay,
- native_surface: EGLSurface,
- native_context: EGLContext,
- weak: bool,
-}
-
-impl NativeGLContext {
- pub fn new(share_context: Option<&EGLContext>,
- display: EGLDisplay,
- surface: EGLSurface,
- config: EGLConfig)
- -> Result<NativeGLContext, &'static str> {
-
- let shared = match share_context {
- Some(ctx) => *ctx,
- None => egl::NO_CONTEXT as EGLContext,
- };
-
- let attributes = [
- egl::CONTEXT_CLIENT_VERSION as EGLint, 2,
- egl::NONE as EGLint, 0, 0, 0, // see mod.rs
- ];
-
- let ctx = unsafe { egl::CreateContext(display, config, shared, attributes.as_ptr()) };
-
- // TODO: Check for every type of error possible, not just client error?
- // Note if we do it we must do it too on egl::CreatePBufferSurface, etc...
- if ctx == (egl::NO_CONTEXT as EGLContext) {
- unsafe { egl::DestroySurface(display, surface) };
- return Err("Error creating an EGL context");
- }
-
- Ok(NativeGLContext {
- native_display: display,
- native_surface: surface,
- native_context: ctx,
- weak: false,
- })
- }
-}
-
-impl Drop for NativeGLContext {
- fn drop(&mut self) {
- let _ = self.unbind();
- if !self.weak {
- unsafe {
- if egl::DestroySurface(self.native_display, self.native_surface) == 0 {
- debug!("egl::DestroySurface failed");
- }
- if egl::DestroyContext(self.native_display, self.native_context) == 0 {
- debug!("egl::DestroyContext failed");
- }
- }
- }
- }
-}
-
-impl NativeGLContextMethods for NativeGLContext {
- type Handle = NativeGLContextHandle;
-
- fn get_proc_address(addr: &str) -> *const () {
- unsafe {
- let addr = CString::new(addr.as_bytes()).unwrap().as_ptr();
- egl::GetProcAddress(addr as *const _) as *const ()
- }
- }
-
- fn create_headless() -> Result<NativeGLContext, &'static str> {
- // We create a context with a dummy size, we can't rely on a
- // default framebuffer
- create_pixel_buffer_backed_offscreen_context(Size2D::new(16, 16), None)
- }
-
- fn create_shared(with: Option<&Self::Handle>) -> Result<NativeGLContext, &'static str> {
- create_pixel_buffer_backed_offscreen_context(Size2D::new(16, 16), with)
- }
-
- fn current_handle() -> Option<Self::Handle> {
- let native_context = unsafe { egl::GetCurrentContext() };
- let native_display = unsafe { egl::GetCurrentDisplay() };
-
- if native_context != egl::NO_CONTEXT && native_display != egl::NO_DISPLAY {
- Some(NativeGLContextHandle(native_context, native_display))
- } else {
- None
- }
- }
-
-
- fn current() -> Option<Self> {
- if let Some(handle) = Self::current_handle() {
- let surface = unsafe { egl::GetCurrentSurface(egl::DRAW as EGLint) };
-
- debug_assert!(surface != egl::NO_SURFACE);
-
- Some(NativeGLContext {
- native_context: handle.0,
- native_display: handle.1,
- native_surface: surface,
- weak: true,
- })
- } else {
- None
- }
- }
-
- #[inline(always)]
- fn is_current(&self) -> bool {
- unsafe {
- egl::GetCurrentContext() == self.native_context
- }
- }
-
- fn make_current(&self) -> Result<(), &'static str> {
- unsafe {
- if !self.is_current() &&
- egl::MakeCurrent(self.native_display,
- self.native_surface,
- self.native_surface,
- self.native_context) == (egl::FALSE as EGLBoolean) {
- Err("egl::MakeCurrent")
- } else {
- Ok(())
- }
- }
- }
-
- fn handle(&self) -> Self::Handle {
- NativeGLContextHandle(self.native_context, self.native_display)
- }
-
- fn unbind(&self) -> Result<(), &'static str> {
- unsafe {
- if self.is_current() &&
- egl::MakeCurrent(self.native_display,
- egl::NO_SURFACE as EGLSurface,
- egl::NO_SURFACE as EGLSurface,
- egl::NO_CONTEXT as EGLContext) == (egl::FALSE as EGLBoolean) {
- Err("egl::MakeCurrent (on unbind)")
- } else {
- Ok(())
- }
- }
- }
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/with_egl/utils.rs
+++ /dev/null
@@ -1,85 +0,0 @@
-use std::mem;
-use euclid::Size2D;
-use super::{NativeGLContext, NativeGLContextHandle};
-
-use egl;
-use egl::types::{EGLNativeDisplayType, EGLDisplay, EGLConfig, EGLSurface, EGLint};
-
-fn create_pbuffer_surface(display: EGLDisplay, config: EGLConfig, size: Size2D<i32>) -> Result<EGLSurface, &'static str> {
- let mut attrs = [
- egl::WIDTH as EGLint, size.width as EGLint,
- egl::HEIGHT as EGLint, size.height as EGLint,
- egl::NONE as EGLint, 0, 0, 0, // see mod.rs
- ];
-
- let surface = unsafe { egl::CreatePbufferSurface(display, config, &mut *attrs.as_mut_ptr()) };
-
- if surface == (egl::NO_SURFACE as EGLSurface) {
- return Err("egl::CreatePBufferSurface");
- }
-
- Ok(surface)
-}
-
-pub fn create_pixel_buffer_backed_offscreen_context(size: Size2D<i32>,
- shared_with: Option<&NativeGLContextHandle>)
- -> Result<NativeGLContext, &'static str> {
- let attributes = [
- egl::SURFACE_TYPE as EGLint, egl::PBUFFER_BIT as EGLint,
- egl::RENDERABLE_TYPE as EGLint, egl::OPENGL_ES2_BIT as EGLint,
- egl::RED_SIZE as EGLint, 8,
- egl::GREEN_SIZE as EGLint, 8,
- egl::BLUE_SIZE as EGLint, 8,
- egl::ALPHA_SIZE as EGLint, 0,
- egl::NONE as EGLint, 0, 0, 0, // see mod.rs
- ];
-
- let (shared_with, display) = match shared_with {
- Some(handle) => (Some(&handle.0), handle.1),
- None => {
- unsafe {
- let display = egl::GetDisplay(egl::DEFAULT_DISPLAY as EGLNativeDisplayType);
-
- if display == (egl::NO_DISPLAY as EGLDisplay) {
- return Err("egl::GetDisplay");
- }
-
- // TODO: Ensure this is correct. It seems it's refcounted, but not atomically, so
- // we can't `Terminate` it on drop.
- //
- // It's the default display anyways so it is not a big problem.
- if egl::Initialize(display, 0 as *mut _, 0 as *mut _) == 0 {
- return Err("egl::Initialize");
- }
-
- (None, display)
- }
- }
- };
-
-
- if display == (egl::NO_DISPLAY as EGLDisplay) {
- return Err("egl::GetDisplay");
- }
-
- let mut config : EGLConfig = unsafe { mem::uninitialized() };
- let mut found_configs : EGLint = 0;
-
- unsafe {
- if egl::ChooseConfig(display,
- attributes.as_ptr(),
- &mut config,
- 1,
- &mut found_configs) == egl::FALSE as u32 {
- return Err("egl::ChooseConfig");
- }
- }
-
- if found_configs == 0 {
- return Err("No EGL config for pBuffer");
- }
-
- let surface = try!(create_pbuffer_surface(display, config, size));
-
- NativeGLContext::new(shared_with, display, surface, config)
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/with_glx/mod.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-mod utils;
-mod native_gl_context;
-pub use self::native_gl_context::{NativeGLContext, NativeGLContextHandle};
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/with_glx/native_gl_context.rs
+++ /dev/null
@@ -1,145 +0,0 @@
-use std::ffi::CString;
-
-use glx;
-use std::os::raw::*;
-use glx::types::{GLXContext, GLXDrawable, GLXFBConfig, GLXPixmap};
-use euclid::Size2D;
-use super::utils::{create_offscreen_pixmap_backed_context};
-
-use platform::NativeGLContextMethods;
-
-pub struct NativeGLContextHandle(pub GLXContext, pub *mut glx::types::Display);
-
-unsafe impl Send for NativeGLContextHandle {}
-
-pub struct NativeGLContext {
- native_context: GLXContext,
- native_display: *mut glx::types::Display,
- native_drawable: GLXDrawable,
- weak: bool,
-}
-
-impl NativeGLContext {
- pub fn new(share_context: Option<&GLXContext>,
- display: *mut glx::types::Display,
- drawable: GLXDrawable,
- framebuffer_config: GLXFBConfig)
- -> Result<NativeGLContext, &'static str> {
-
- let shared = match share_context {
- Some(ctx) => *ctx,
- None => 0 as GLXContext,
- };
-
- let native = unsafe { glx::CreateNewContext(display, framebuffer_config, glx::RGBA_TYPE as c_int, shared, 1 as glx::types::Bool) };
-
- if native.is_null() {
- unsafe { glx::DestroyPixmap(display, drawable as GLXPixmap) };
- return Err("Error creating native glx context");
- }
-
- Ok(NativeGLContext {
- native_context: native,
- native_display: display,
- native_drawable: drawable,
- weak: false,
- })
- }
-
- pub fn as_native_glx_context(&self) -> GLXContext {
- self.native_context
- }
-}
-
-impl Drop for NativeGLContext {
- fn drop(&mut self) {
- // Unbind the current context to free the resources
- // inmediately
- if !self.weak {
- let _ = self.unbind(); // We don't want to panic
- unsafe {
- glx::DestroyContext(self.native_display, self.native_context);
- glx::DestroyPixmap(self.native_display, self.native_drawable as GLXPixmap);
- }
- }
- }
-}
-
-impl NativeGLContextMethods for NativeGLContext {
- type Handle = NativeGLContextHandle;
-
- fn get_proc_address(addr: &str) -> *const () {
- let addr = CString::new(addr.as_bytes()).unwrap();
- let addr = addr.as_ptr();
- unsafe {
- glx::GetProcAddress(addr as *const _) as *const ()
- }
- }
-
- fn current_handle() -> Option<Self::Handle> {
- let current = unsafe { glx::GetCurrentContext() };
- let dpy = unsafe { glx::GetCurrentDisplay() };
-
- if current.is_null() || dpy.is_null() {
- None
- } else {
- Some(NativeGLContextHandle(current, dpy))
- }
- }
-
- fn current() -> Option<NativeGLContext> {
- if let Some(handle) = Self::current_handle() {
- unsafe {
- Some(NativeGLContext {
- native_context: handle.0,
- native_display: handle.1,
- native_drawable: glx::GetCurrentDrawable(),
- weak: true,
- })
- }
- } else {
- None
- }
- }
-
- fn create_shared(with: Option<&Self::Handle>) -> Result<NativeGLContext, &'static str> {
- create_offscreen_pixmap_backed_context(Size2D::new(16, 16), with)
- }
-
- #[inline(always)]
- fn is_current(&self) -> bool {
- unsafe {
- glx::GetCurrentContext() == self.native_context
- }
- }
-
- fn handle(&self) -> NativeGLContextHandle {
- NativeGLContextHandle(self.native_context, self.native_display)
- }
-
- fn make_current(&self) -> Result<(), &'static str> {
- unsafe {
- if !self.is_current() &&
- glx::MakeCurrent(self.native_display,
- self.native_drawable,
- self.native_context) == 0 {
- Err("glx::MakeCurrent")
- } else {
- Ok(())
- }
- }
- }
-
- fn unbind(&self) -> Result<(), &'static str> {
- unsafe {
- if self.is_current() &&
- glx::MakeCurrent(self.native_display,
- 0 as GLXDrawable,
- 0 as GLXContext) == 0 {
- Err("glx::MakeCurrent (on unbind)")
- } else {
- Ok(())
- }
- }
- }
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/with_glx/utils.rs
+++ /dev/null
@@ -1,153 +0,0 @@
-use glx;
-use x11::xlib::*;
-use glx::types::GLXDrawable;
-use std::os::raw::*;
-use euclid::Size2D;
-
-use NativeGLContext;
-use NativeGLContextHandle;
-
-pub struct ScopedXFree<T> {
- ptr: *mut T
-}
-
-impl<T> ScopedXFree<T> {
- #[inline(always)]
- pub fn new(ptr: *mut T) -> ScopedXFree<T> {
- ScopedXFree {
- ptr: ptr
- }
- }
-
- #[inline(always)]
- pub fn as_ptr(&self) -> *mut T {
- self.ptr
- }
-}
-
-impl<T> Drop for ScopedXFree<T> {
- fn drop(&mut self) {
- if !self.ptr.is_null() {
- unsafe { XFree(self.ptr as *mut _); };
- }
- }
-}
-
-unsafe fn get_visual_and_depth(s: *mut Screen, id: VisualID) -> Result<(*mut Visual, c_int), &'static str> {
- for d in 0..((*s).ndepths as isize) {
- let depth_info : *mut Depth = (*s).depths.offset(d);
- for v in 0..((*depth_info).nvisuals as isize) {
- let visual : *mut Visual = (*depth_info).visuals.offset(v);
- if (*visual).visualid == id {
- return Ok((visual, (*depth_info).depth));
- }
- }
- }
-
- Err("Visual not on screen")
-}
-
-// Almost directly ported from
-// https://dxr.mozilla.org/mozilla-central/source/gfx/gl/GLContextProviderGLX.cpp
-pub fn create_offscreen_pixmap_backed_context(size: Size2D<i32>, shared_with: Option<&NativeGLContextHandle>) -> Result<NativeGLContext, &'static str> {
- let (shared_with, dpy) = match shared_with {
- Some(handle) => (Some(&handle.0), handle.1),
- None => {
- let dpy = unsafe { XOpenDisplay(0 as *mut c_char) as *mut glx::types::Display };
-
- if dpy.is_null() {
- return Err("glx::XOpenDisplay");
- }
-
- (None, dpy)
- }
- };
-
-
- // We try to get possible framebuffer configurations which
- // can be pixmap-backed and renderable
- let mut attributes = [
- glx::DRAWABLE_TYPE as c_int, glx::PIXMAP_BIT as c_int,
- glx::X_RENDERABLE as c_int, 1,
- 0 as c_int
- ];
-
- let mut config_count : c_int = 0;
-
- let configs = ScopedXFree::new(unsafe {
- glx::ChooseFBConfig(dpy,
- XDefaultScreen(dpy as *mut Display),
- attributes.as_mut_ptr(),
- &mut config_count)
- });
-
- if configs.as_ptr().is_null() {
- return Err("glx::ChooseFBConfig");
- }
-
- debug_assert!(config_count > 0);
-
- let mut config_index = 0;
- let mut visual_id = glx::NONE as c_int;
- for i in 0..(config_count as isize) {
- unsafe {
- let config = *configs.as_ptr().offset(i);
- let mut drawable_type : c_int = 0;
-
- // NOTE: glx's `Success` is unreachable from bindings, but it's defined to 0
- // TODO: Check if this conditional is neccesary:
- // Actually this gets the drawable type and checks if
- // contains PIXMAP_BIT, which should be true due to the attributes
- // in glx::ChooseFBConfig
- //
- // It's in Gecko's code, so may there be an implementation which returns bad
- // configurations?
- if glx::GetFBConfigAttrib(dpy, config, glx::DRAWABLE_TYPE as c_int, &mut drawable_type) != 0
- || (drawable_type & (glx::PIXMAP_BIT as c_int) == 0) {
- continue;
- }
-
- if glx::GetFBConfigAttrib(dpy, config, glx::VISUAL_ID as c_int, &mut visual_id) != 0
- || visual_id == 0 {
- continue;
- }
- }
-
- config_index = i;
- break;
- }
-
- if visual_id == 0 {
- return Err("We don't have any config with visuals");
- }
-
- unsafe {
- let screen = XDefaultScreenOfDisplay(dpy as *mut _);
-
- let (_, depth) = try!(get_visual_and_depth(screen, visual_id as VisualID));
-
- let pixmap = XCreatePixmap(dpy as *mut _,
- XRootWindowOfScreen(screen),
- size.width as c_uint,
- size.height as c_uint,
- depth as c_uint);
-
- if pixmap == 0 {
- return Err("XCreatePixMap");
- }
-
- let glx_pixmap = glx::CreatePixmap(dpy,
- *configs.as_ptr().offset(config_index),
- pixmap,
- 0 as *const c_int);
-
- if glx_pixmap == 0 {
- XFreePixmap(dpy as *mut _, pixmap);
- return Err("glx::createPixmap");
- }
-
- let chosen_config = *configs.as_ptr().offset(config_index);
-
- NativeGLContext::new(shared_with, dpy, glx_pixmap as GLXDrawable, chosen_config)
- }
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/with_osmesa/mod.rs
+++ /dev/null
@@ -1,121 +0,0 @@
-use std::ffi::CString;
-use std::ptr;
-
-use osmesa_sys;
-use gleam::gl;
-
-use platform::NativeGLContextMethods;
-
-const DUMMY_BUFFER_WIDTH: usize = 16;
-const DUMMY_BUFFER_HEIGHT: usize = 16;
-
-pub struct OSMesaContext {
- buffer: Vec<u8>,
- context: osmesa_sys::OSMesaContext,
-}
-
-pub struct OSMesaContextHandle(osmesa_sys::OSMesaContext);
-
-unsafe impl Send for OSMesaContextHandle {}
-
-impl OSMesaContext {
- pub fn new(share_with: Option<osmesa_sys::OSMesaContext>)
- -> Result<Self, &'static str> {
- let shared = match share_with {
- Some(ctx) => ctx,
- _ => ptr::null_mut(),
- };
-
- let context = unsafe {
- osmesa_sys::OSMesaCreateContext(osmesa_sys::OSMESA_RGBA, shared)
- };
-
- if context.is_null() {
- return Err("OSMesaCreateContext");
- }
-
- let buffer = vec![0u8; DUMMY_BUFFER_WIDTH * DUMMY_BUFFER_HEIGHT * 4];
- Ok(OSMesaContext {
- buffer: buffer,
- context: context,
- })
- }
-}
-
-impl NativeGLContextMethods for OSMesaContext {
- type Handle = OSMesaContextHandle;
-
- fn get_proc_address(addr: &str) -> *const () {
- let addr = CString::new(addr.as_bytes()).unwrap();
- let addr = addr.as_ptr();
- unsafe {
- ::std::mem::transmute(
- osmesa_sys::OSMesaGetProcAddress(addr as *const _))
- }
- }
-
- fn current_handle() -> Option<Self::Handle> {
- let current = unsafe { osmesa_sys::OSMesaGetCurrentContext() };
- if current.is_null() {
- None
- } else {
- Some(OSMesaContextHandle(current))
- }
- }
-
- fn current() -> Option<Self> {
- /* We can't access to the OSMesa buffer from here. */
- None
- }
-
- fn create_shared(with: Option<&Self::Handle>) -> Result<Self, &'static str> {
- Self::new(with.map(|w| w.0))
- }
-
- fn is_current(&self) -> bool {
- unsafe {
- osmesa_sys::OSMesaGetCurrentContext() == self.context
- }
- }
-
- fn handle(&self) -> Self::Handle {
- OSMesaContextHandle(self.context)
- }
-
- fn make_current(&self) -> Result<(), &'static str> {
- unsafe {
- if !self.is_current() &&
- osmesa_sys::OSMesaMakeCurrent(self.context,
- self.buffer.as_ptr() as *const _ as *mut _,
- gl::UNSIGNED_BYTE,
- DUMMY_BUFFER_WIDTH as i32,
- DUMMY_BUFFER_HEIGHT as i32) == 0 {
- Err("OSMesaMakeCurrent")
- } else {
- Ok(())
- }
- }
- }
-
- fn unbind(&self) -> Result<(), &'static str> {
- if self.is_current() {
- let ret = unsafe {
- osmesa_sys::OSMesaMakeCurrent(ptr::null_mut(),
- ptr::null_mut(), 0, 0, 0)
- };
- if ret == gl::FALSE {
- return Err("OSMesaMakeCurrent");
- }
- }
-
- Ok(())
- }
-
- fn is_osmesa(&self) -> bool { true }
-}
-
-impl Drop for OSMesaContext {
- fn drop(&mut self) {
- unsafe { osmesa_sys::OSMesaDestroyContext(self.context) }
- }
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/with_wgl/mod.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-/// WGL bindings
-pub mod wgl {
- include!(concat!(env!("OUT_DIR"), "/wgl_bindings.rs"));
-}
-
-/// Functions that are not necessarly always available
-pub mod wgl_ext {
- include!(concat!(env!("OUT_DIR"), "/wgl_extra_bindings.rs"));
-}
-
-mod wgl_attributes;
-mod native_gl_context;
-mod utils;
-pub use self::native_gl_context::NativeGLContext;
-pub use self::native_gl_context::NativeGLContextHandle;
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/with_wgl/native_gl_context.rs
+++ /dev/null
@@ -1,228 +0,0 @@
-use platform::NativeGLContextMethods;
-use gl_context::GLContextDispatcher;
-use std::ffi::CString;
-use std::os::raw::c_void;
-use std::ptr;
-use std::sync::mpsc;
-
-use winapi;
-use user32;
-use kernel32;
-use super::wgl;
-use super::wgl_attributes::*;
-use super::utils;
-
-// Wrappers to satisfy `Sync`.
-struct HMODULEWrapper(winapi::HMODULE);
-unsafe impl Sync for HMODULEWrapper {}
-
-lazy_static! {
- static ref GL_LIB: Option<HMODULEWrapper> = {
- let p = unsafe { kernel32::LoadLibraryA(b"opengl32.dll\0".as_ptr() as *const _) };
- if p.is_null() {
- error!("WGL: opengl32.dll not found!");
- None
- } else {
- debug!("WGL: opengl32.dll loaded!");
- Some(HMODULEWrapper(p))
- }
- };
-
- static ref PROC_ADDR_CTX: Option<NativeGLContext> = {
- match unsafe { utils::create_offscreen(ptr::null_mut(), &WGLAttributes::default()) } {
- Ok(ref res) => {
- let ctx = NativeGLContext {
- render_ctx: res.0,
- device_ctx: res.1,
- weak: false,
- };
- Some(ctx)
- }
- Err(s) => {
- error!("Error creating GetProcAddress helper context: {}", s);
- None
- }
- }
- };
-}
-
-pub struct NativeGLContext {
- render_ctx: winapi::HGLRC,
- device_ctx: winapi::HDC,
- weak: bool,
-}
-
-impl Drop for NativeGLContext {
- fn drop(&mut self) {
- unsafe {
- if !self.weak {
- // the context to be deleted needs to be unbound
- self.unbind().unwrap();
- wgl::DeleteContext(self.render_ctx as *const _);
- let window = user32::WindowFromDC(self.device_ctx);
- debug_assert!(!window.is_null());
- user32::ReleaseDC(window, self.device_ctx);
- user32::DestroyWindow(window);
- }
- }
- }
-}
-
-unsafe impl Send for NativeGLContext {}
-unsafe impl Sync for NativeGLContext {}
-
-pub struct NativeGLContextHandle(winapi::HGLRC, winapi::HDC);
-unsafe impl Send for NativeGLContextHandle {}
-unsafe impl Sync for NativeGLContextHandle {}
-
-impl NativeGLContextMethods for NativeGLContext {
- type Handle = NativeGLContextHandle;
-
- fn get_proc_address(addr: &str) -> *const () {
- let addr = CString::new(addr.as_bytes()).unwrap();
- let addr = addr.as_ptr();
- unsafe {
- if wgl::GetCurrentContext().is_null() {
- // wglGetProcAddress only works in the presence of a valid GL context
- // We use a dummy ctx when the caller calls this function without a valid GL context
- if let Some(ref ctx) = *PROC_ADDR_CTX {
- if ctx.make_current().is_err() {
- return ptr::null_mut();
- }
- } else {
- return ptr::null_mut();
- }
- }
-
- let p = wgl::GetProcAddress(addr) as *const _;
- if !p.is_null() {
- return p;
- }
- // wglGetProcAddress doesn't return function pointers for some legacy functions,
- // (the ones coming from OpenGL 1.1)
- // These functions are exported by the opengl32.dll itself,
- // so we have to fallback to kernel32 getProcAddress if wglGetProcAddress return null
- match *GL_LIB {
- Some(ref lib) => kernel32::GetProcAddress(lib.0, addr) as *const _,
- None => ptr::null_mut(),
- }
- }
- }
-
- fn create_shared(with: Option<&Self::Handle>) -> Result<NativeGLContext, &'static str> {
- Self::create_shared_with_dispatcher(with, None)
- }
-
- fn create_shared_with_dispatcher(with: Option<&Self::Handle>, dispatcher: Option<Box<GLContextDispatcher>>)
- -> Result<NativeGLContext, &'static str> {
- let (render_ctx, device_ctx) = match with {
- Some(ref handle) => (handle.0, handle.1),
- None => (ptr::null_mut(), ptr::null_mut())
- };
-
- if let Some(ref dispatcher) = dispatcher {
- // wglShareLists fails if the context to share is current in a different thread.
- // Additionally wglMakeCurrent cannot 'steal' a context that is current in other thread, so
- // we have to unbind the shared context in its own thread, call wglShareLists in this thread
- // and bind the original share context again when the wglShareList is completed.
- let (tx, rx) = mpsc::channel();
- dispatcher.dispatch(Box::new(move || {
- let result = unsafe {
- if wgl::MakeCurrent(ptr::null_mut(), ptr::null_mut()) == 0 {
- Err(())
- } else {
- Ok(())
- }
- };
- tx.send(result).unwrap();
- }));
- // Wait until wglMakeCurrent operation is completed in the thread of the shared context
- if rx.recv().unwrap().is_err() {
- return Err("Error creating WGL context: WGL::MakeCurrent failed in shared context")
- }
- }
-
- let result = match unsafe { utils::create_offscreen(render_ctx, &WGLAttributes::default()) } {
- Ok(ref res) => {
- let ctx = NativeGLContext {
- render_ctx: res.0,
- device_ctx: res.1,
- weak: false,
- };
- Ok(ctx)
- }
- Err(s) => {
- error!("WGL: {}", s);
- Err("Error creating WGL context")
- }
- };
-
- // Restore shared context
- if let Some(ref dispatcher) = dispatcher {
- let (tx, rx) = mpsc::channel();
- let handle = NativeGLContextHandle(render_ctx, device_ctx);
- dispatcher.dispatch(Box::new(move || {
- unsafe {
- if wgl::MakeCurrent(handle.1 as *const _, handle.0 as *const _) == 0 {
- error!("Error restoring WGL shared context: WGL MakeCurrent failed");
- }
- };
- tx.send(()).unwrap();
- }));
- // Wait until wglMakeCurrent operation is completed in the thread of the shared context
- rx.recv().unwrap();
- }
-
- result
- }
-
- fn is_current(&self) -> bool {
- unsafe { wgl::GetCurrentContext() == self.render_ctx as *const c_void }
- }
-
- fn current() -> Option<Self> {
- if let Some(handle) = Self::current_handle() {
- Some(NativeGLContext {
- render_ctx: handle.0,
- device_ctx: handle.1,
- weak: true,
- })
- } else {
- None
- }
- }
-
- fn current_handle() -> Option<Self::Handle> {
- let ctx = unsafe { wgl::GetCurrentContext() };
- let hdc = unsafe { wgl::GetCurrentDC() };
- if ctx.is_null() || hdc.is_null() {
- None
- } else {
- Some(NativeGLContextHandle(ctx as winapi::HGLRC, hdc as winapi::HDC))
- }
- }
-
- fn make_current(&self) -> Result<(), &'static str> {
- unsafe {
- if wgl::MakeCurrent(self.device_ctx as *const _, self.render_ctx as *const _) != 0 {
- Ok(())
- } else {
- Err("WGL::makeCurrent failed")
- }
- }
- }
-
- fn unbind(&self) -> Result<(), &'static str> {
- unsafe {
- if self.is_current() && wgl::MakeCurrent(ptr::null_mut(), ptr::null_mut()) == 0 {
- Err("WGL::MakeCurrent (on unbind)")
- } else {
- Ok(())
- }
- }
- }
-
- fn handle(&self) -> Self::Handle {
- NativeGLContextHandle(self.render_ctx, self.device_ctx)
- }
-}
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/with_wgl/utils.rs
+++ /dev/null
@@ -1,712 +0,0 @@
-use std::mem;
-use super::wgl_attributes::*;
-
-use std::ffi::{CStr, CString, OsStr};
-use std::os::raw::{c_void, c_int};
-use std::os::windows::ffi::OsStrExt;
-use std::io;
-use std::ptr;
-
-use winapi;
-use kernel32;
-use user32;
-use gdi32;
-use super::wgl;
-use super::wgl_ext;
-
-
-// #Attributions
-// This WGL implementation has been inspired by the code originating in Glutin.
-// We have used slightly modified version util functions to manage WGL contexts.
-// We simplified the win32 window creation because we don't need the event handler thread
-// We'd like to credit and thank all of the Glutin contributors for their work.
-// (https://github.com/tomaka/glutin)
-
-pub unsafe fn create_offscreen(shared_with: winapi::HGLRC,
- settings: &WGLAttributes)
- -> Result<(winapi::HGLRC, winapi::HDC), String> {
- let mut ctx = WGLScopedContext::default();
- ctx.window = try!(create_hidden_window());
- ctx.device_ctx = user32::GetDC(ctx.window);
- if ctx.device_ctx.is_null() {
- return Err("GetDC function failed".to_owned());
- }
-
- let extra = try!(load_extra_functions(ctx.window));
-
- let extensions = if extra.GetExtensionsStringARB.is_loaded() {
- let data = extra.GetExtensionsStringARB(ctx.device_ctx as *const _);
- let data = CStr::from_ptr(data).to_bytes().to_vec();
- String::from_utf8(data).unwrap()
- } else if extra.GetExtensionsStringEXT.is_loaded() {
- let data = extra.GetExtensionsStringEXT();
- let data = CStr::from_ptr(data).to_bytes().to_vec();
- String::from_utf8(data).unwrap()
- } else {
- String::new()
- };
-
- let (id, _) = if extensions.split(' ').find(|&i| i == "WGL_ARB_pixel_format").is_some() {
- try!(choose_arb_pixel_format(&extra, &extensions, ctx.device_ctx, &settings.pixel_format)
- .map_err(|_| "ARB pixel format not available".to_owned()))
- } else {
- try!(choose_native_pixel_format(ctx.device_ctx, &settings.pixel_format)
- .map_err(|_| "Native pixel format not available".to_owned()))
- };
-
- try!(set_pixel_format(ctx.device_ctx, id));
-
- let result = create_full_context(settings, &extra, &extensions, ctx.device_ctx, shared_with);
- if result.is_ok() {
- mem::forget(ctx); // Everything is ok, don't dispose the scoped ctx
- }
- result
-}
-
-// creates a basic context
-unsafe fn create_basic_context(hdc: winapi::HDC,
- share: winapi::HGLRC)
- -> Result<(winapi::HGLRC, winapi::HDC), String> {
- let mut ctx = WGLScopedContext::default();
- ctx.render_ctx = wgl::CreateContext(hdc as *const _) as winapi::HGLRC;
- if ctx.render_ctx.is_null() {
- return Err(format!("wglCreateContext failed: {}", io::Error::last_os_error()));
- }
-
- if !share.is_null() {
- if wgl::ShareLists(share as *const _, ctx.render_ctx as *const _) == 0 {
- return Err(format!("wglShareLists failed: {}", io::Error::last_os_error()));
- }
- };
-
- let result = (ctx.render_ctx, hdc);
- mem::forget(ctx); // Everything is ok, don't dispose the scoped ctx
- Ok(result)
-}
-
-// creates a full context: attempts to use optional ext WGL functions
-unsafe fn create_full_context(settings: &WGLAttributes,
- extra: &wgl_ext::Wgl,
- extensions: &str,
- hdc: winapi::HDC,
- share: winapi::HGLRC)
- -> Result<(winapi::HGLRC, winapi::HDC), String> {
- let mut extensions = extensions.split(' ');
- if extensions.find(|&i| i == "WGL_ARB_create_context").is_none() {
- let ctx = create_basic_context(hdc, share);
- if let Ok(ctx) = ctx {
- if wgl::MakeCurrent(ctx.1 as *const _, ctx.0 as *const _) == 0 {
- return Err("wglMakeCurrent failed creating a basic context".to_owned());
- }
- }
- return ctx;
- }
-
- let mut attributes = Vec::new();
- if settings.opengl_es {
- if extensions.find(|&i| i == "WGL_EXT_create_context_es2_profile").is_some() {
- attributes.push(wgl_ext::CONTEXT_PROFILE_MASK_ARB as c_int);
- attributes.push(wgl_ext::CONTEXT_ES2_PROFILE_BIT_EXT as c_int);
- } else {
- return Err("OpenGl Version Not Supported".to_owned());
- }
- }
-
- if settings.major_version > 0 {
- attributes.push(wgl_ext::CONTEXT_MAJOR_VERSION_ARB as c_int);
- attributes.push(settings.major_version as c_int);
- attributes.push(wgl_ext::CONTEXT_MINOR_VERSION_ARB as c_int);
- attributes.push(settings.minor_version as c_int);
- }
-
- attributes.push(wgl_ext::CONTEXT_FLAGS_ARB as c_int);
- attributes.push((if settings.debug {
- wgl_ext::CONTEXT_FLAGS_ARB
- } else {
- 0
- }) as c_int);
-
- attributes.push(0);
-
- let mut ctx = WGLScopedContext::default();
- ctx.render_ctx = extra.CreateContextAttribsARB(hdc as *const _,
- share as *const _,
- attributes.as_ptr()) as winapi::HGLRC;
-
- if ctx.render_ctx.is_null() {
- return Err(format!("wglCreateContextAttribsARB failed: {}",
- io::Error::last_os_error()));
- }
-
- if wgl::MakeCurrent(hdc as *const _, ctx.render_ctx as *const _) == 0 {
- return Err("wglMakeCurrent failed creating full context".to_owned());
- }
- // Disable or enable vsync
- if extensions.find(|&i| i == "WGL_EXT_swap_control").is_some() {
- if extra.SwapIntervalEXT(if settings.vsync { 1 } else { 0 }) == 0 {
- return Err("wglSwapIntervalEXT failed".to_owned());
- }
- }
- let result = (ctx.render_ctx as winapi::HGLRC, hdc);
- mem::forget(ctx);
- Ok(result)
-}
-
-unsafe fn create_hidden_window() -> Result<winapi::HWND, &'static str> {
- let class_name = register_window_class();
- let mut rect = winapi::RECT {
- left: 0,
- right: 1024 as winapi::LONG,
- top: 0,
- bottom: 768 as winapi::LONG,
- };
- let ex_style = winapi::WS_EX_APPWINDOW | winapi::WS_EX_WINDOWEDGE;
- let style = winapi::WS_OVERLAPPEDWINDOW | winapi::WS_CLIPSIBLINGS | winapi::WS_CLIPCHILDREN;
-
- user32::AdjustWindowRectEx(&mut rect, style, 0, ex_style);
- let title = OsStr::new("WGLwindow")
- .encode_wide()
- .chain(Some(0).into_iter())
- .collect::<Vec<_>>();
-
- let win = user32::CreateWindowExW(ex_style,
- class_name.as_ptr(),
- title.as_ptr(),
- style,
- winapi::CW_USEDEFAULT,
- winapi::CW_USEDEFAULT,
- rect.right - rect.left,
- rect.bottom - rect.top,
- ptr::null_mut(),
- ptr::null_mut(),
- kernel32::GetModuleHandleW(ptr::null()),
- ptr::null_mut());
- if win.is_null() {
- return Err("CreateWindowEx function failed");
- }
-
- Ok(win)
-}
-
-// Helper struct used to dispose resources in error paths
-struct WGLScopedContext {
- pub window: winapi::HWND,
- pub device_ctx: winapi::HDC,
- pub render_ctx: winapi::HGLRC,
-}
-
-impl Drop for WGLScopedContext {
- fn drop(&mut self) {
- unsafe {
- if !self.render_ctx.is_null() {
- wgl::DeleteContext(self.render_ctx as *const _);
- }
- if !self.device_ctx.is_null() && !self.window.is_null() {
- user32::ReleaseDC(self.window, self.device_ctx);
- }
- if !self.window.is_null() {
- user32::DestroyWindow(self.window);
- }
- }
- }
-}
-
-impl Default for WGLScopedContext {
- #[inline]
- fn default() -> WGLScopedContext {
- WGLScopedContext {
- window: ptr::null_mut(),
- device_ctx: ptr::null_mut(),
- render_ctx: ptr::null_mut(),
- }
- }
-}
-
-impl WGLScopedContext {
- fn new(window: winapi::HWND, device_ctx: winapi::HDC, render_ctx: winapi::HGLRC) -> WGLScopedContext {
- WGLScopedContext {
- window: window,
- device_ctx: device_ctx,
- render_ctx: render_ctx,
- }
- }
-}
-
-// ***********
-// Utilities to ease WGL context creation
-// Slightly modified versions of util functions taken from Glutin
-// (https://github.com/tomaka/glutin)
-// ***********
-
-unsafe fn register_window_class() -> Vec<u16> {
- let class_name = OsStr::new("Window Class")
- .encode_wide()
- .chain(Some(0).into_iter())
- .collect::<Vec<_>>();
-
- let class = winapi::WNDCLASSEXW {
- cbSize: mem::size_of::<winapi::WNDCLASSEXW>() as winapi::UINT,
- style: winapi::CS_HREDRAW | winapi::CS_VREDRAW | winapi::CS_OWNDC,
- lpfnWndProc: Some(proc_callback),
- cbClsExtra: 0,
- cbWndExtra: 0,
- hInstance: kernel32::GetModuleHandleW(ptr::null()),
- hIcon: ptr::null_mut(),
- hCursor: ptr::null_mut(), // must be null in order for cursor state to work properly
- hbrBackground: ptr::null_mut(),
- lpszMenuName: ptr::null(),
- lpszClassName: class_name.as_ptr(),
- hIconSm: ptr::null_mut(),
- };
-
- // We ignore errors because registering the same window class twice would trigger
- // an error, and because errors here are detected during CreateWindowEx anyway.
- // Also since there is no weird element in the struct, there is no reason for this
- // call to fail.
- user32::RegisterClassExW(&class);
-
- class_name
-}
-
-pub unsafe extern "system" fn proc_callback(window: winapi::HWND,
- msg: winapi::UINT,
- wparam: winapi::WPARAM,
- lparam: winapi::LPARAM)
- -> winapi::LRESULT {
- match msg {
- winapi::WM_PAINT => 0,
- winapi::WM_ERASEBKGND => 0,
- _ => user32::DefWindowProcW(window, msg, wparam, lparam),
- }
-}
-
-#[derive(Debug, Clone)]
-pub struct PixelFormat {
- pub hardware_accelerated: bool,
- pub color_bits: u8,
- pub alpha_bits: u8,
- pub depth_bits: u8,
- pub stencil_bits: u8,
- pub stereoscopy: bool,
- pub double_buffer: bool,
- pub multisampling: Option<u16>,
- pub srgb: bool,
-}
-
-unsafe fn choose_arb_pixel_format(extra: &wgl_ext::Wgl,
- extensions: &str,
- hdc: winapi::HDC,
- reqs: &WGLPixelFormat)
- -> Result<(c_int, PixelFormat), ()> {
- let descriptor = {
- let mut out: Vec<c_int> = Vec::with_capacity(37);
-
- out.push(wgl_ext::DRAW_TO_WINDOW_ARB as c_int);
- out.push(1);
-
- out.push(wgl_ext::SUPPORT_OPENGL_ARB as c_int);
- out.push(1);
-
- out.push(wgl_ext::PIXEL_TYPE_ARB as c_int);
- if reqs.float_color_buffer {
- if extensions.split(' ').find(|&i| i == "WGL_ARB_pixel_format_float").is_some() {
- out.push(wgl_ext::TYPE_RGBA_FLOAT_ARB as c_int);
- } else {
- return Err(());
- }
- } else {
- out.push(wgl_ext::TYPE_RGBA_ARB as c_int);
- }
-
- // Force hardware aceleration
- out.push(wgl_ext::ACCELERATION_ARB as c_int);
- out.push(wgl_ext::FULL_ACCELERATION_ARB as c_int);
-
- if let Some(color) = reqs.color_bits {
- out.push(wgl_ext::COLOR_BITS_ARB as c_int);
- out.push(color as c_int);
- }
-
- if let Some(alpha) = reqs.alpha_bits {
- out.push(wgl_ext::ALPHA_BITS_ARB as c_int);
- out.push(alpha as c_int);
- }
-
- if let Some(depth) = reqs.depth_bits {
- out.push(wgl_ext::DEPTH_BITS_ARB as c_int);
- out.push(depth as c_int);
- }
-
- if let Some(stencil) = reqs.stencil_bits {
- out.push(wgl_ext::STENCIL_BITS_ARB as c_int);
- out.push(stencil as c_int);
- }
-
- // Prefer double buffering if unspecified (probably shouldn't once you can choose)
- let double_buffer = reqs.double_buffer.unwrap_or(true);
- out.push(wgl_ext::DOUBLE_BUFFER_ARB as c_int);
- out.push(if double_buffer { 1 } else { 0 });
-
- if let Some(multisampling) = reqs.multisampling {
- if extensions.split(' ').find(|&i| i == "WGL_ARB_multisample").is_some() {
- out.push(wgl_ext::SAMPLE_BUFFERS_ARB as c_int);
- out.push(if multisampling == 0 { 0 } else { 1 });
- out.push(wgl_ext::SAMPLES_ARB as c_int);
- out.push(multisampling as c_int);
- } else {
- return Err(());
- }
- }
-
- out.push(wgl_ext::STEREO_ARB as c_int);
- out.push(if reqs.stereoscopy { 1 } else { 0 });
-
- if reqs.srgb {
- if extensions.split(' ').find(|&i| i == "WGL_ARB_framebuffer_sRGB").is_some() {
- out.push(wgl_ext::FRAMEBUFFER_SRGB_CAPABLE_ARB as c_int);
- out.push(1);
- } else if extensions.split(' ').find(|&i| i == "WGL_EXT_framebuffer_sRGB").is_some() {
- out.push(wgl_ext::FRAMEBUFFER_SRGB_CAPABLE_EXT as c_int);
- out.push(1);
- } else {
- return Err(());
- }
- }
-
- out.push(0);
- out
- };
-
- let mut format_id = mem::uninitialized();
- let mut num_formats = mem::uninitialized();
- if extra.ChoosePixelFormatARB(hdc as *const _,
- descriptor.as_ptr(),
- ptr::null(),
- 1,
- &mut format_id,
- &mut num_formats) == 0 {
- return Err(());
- }
-
- if num_formats == 0 {
- return Err(());
- }
-
- let get_info = |attrib: u32| {
- let mut value = mem::uninitialized();
- extra.GetPixelFormatAttribivARB(hdc as *const _,
- format_id as c_int,
- 0,
- 1,
- [attrib as c_int].as_ptr(),
- &mut value);
- value as u32
- };
-
- let pf_desc = PixelFormat {
- hardware_accelerated: get_info(wgl_ext::ACCELERATION_ARB) != wgl_ext::NO_ACCELERATION_ARB,
- color_bits: get_info(wgl_ext::RED_BITS_ARB) as u8 +
- get_info(wgl_ext::GREEN_BITS_ARB) as u8 +
- get_info(wgl_ext::BLUE_BITS_ARB) as u8,
- alpha_bits: get_info(wgl_ext::ALPHA_BITS_ARB) as u8,
- depth_bits: get_info(wgl_ext::DEPTH_BITS_ARB) as u8,
- stencil_bits: get_info(wgl_ext::STENCIL_BITS_ARB) as u8,
- stereoscopy: get_info(wgl_ext::STEREO_ARB) != 0,
- double_buffer: get_info(wgl_ext::DOUBLE_BUFFER_ARB) != 0,
- multisampling: {
- if extensions.split(' ').find(|&i| i == "WGL_ARB_multisample").is_some() {
- match get_info(wgl_ext::SAMPLES_ARB) {
- 0 => None,
- a => Some(a as u16),
- }
- } else {
- None
- }
- },
- srgb: if extensions.split(' ').find(|&i| i == "WGL_ARB_framebuffer_sRGB").is_some() {
- get_info(wgl_ext::FRAMEBUFFER_SRGB_CAPABLE_ARB) != 0
- } else if extensions.split(' ')
- .find(|&i| i == "WGL_EXT_framebuffer_sRGB")
- .is_some() {
- get_info(wgl_ext::FRAMEBUFFER_SRGB_CAPABLE_EXT) != 0
- } else {
- false
- },
- };
-
- Ok((format_id, pf_desc))
-}
-
-// Chooses a pixel formats without using WGL.
-// Gives less precise results than `enumerate_arb_pixel_formats`.
-unsafe fn choose_native_pixel_format(hdc: winapi::HDC,
- reqs: &WGLPixelFormat)
- -> Result<(c_int, PixelFormat), ()> {
- // handling non-supported stuff
- if reqs.float_color_buffer {
- return Err(());
- }
-
- match reqs.multisampling {
- Some(0) | None => (),
- Some(_) => return Err(()),
- };
-
- if reqs.stereoscopy {
- return Err(());
- }
-
- if reqs.srgb {
- return Err(());
- }
-
- // building the descriptor to pass to ChoosePixelFormat
- let descriptor = winapi::PIXELFORMATDESCRIPTOR {
- nSize: mem::size_of::<winapi::PIXELFORMATDESCRIPTOR>() as u16,
- nVersion: 1,
- dwFlags: {
- let f1 = match reqs.double_buffer {
- // Should be PFD_DOUBLEBUFFER_DONTCARE after you can choose
- None => winapi::PFD_DOUBLEBUFFER,
- Some(true) => winapi::PFD_DOUBLEBUFFER,
- Some(false) => 0,
- };
-
- let f2 = if reqs.stereoscopy {
- winapi::PFD_STEREO
- } else {
- 0
- };
-
- winapi::PFD_DRAW_TO_WINDOW | winapi::PFD_SUPPORT_OPENGL | f1 | f2
- },
- iPixelType: winapi::PFD_TYPE_RGBA,
- cColorBits: reqs.color_bits.unwrap_or(0),
- cRedBits: 0,
- cRedShift: 0,
- cGreenBits: 0,
- cGreenShift: 0,
- cBlueBits: 0,
- cBlueShift: 0,
- cAlphaBits: reqs.alpha_bits.unwrap_or(0),
- cAlphaShift: 0,
- cAccumBits: 0,
- cAccumRedBits: 0,
- cAccumGreenBits: 0,
- cAccumBlueBits: 0,
- cAccumAlphaBits: 0,
- cDepthBits: reqs.depth_bits.unwrap_or(0),
- cStencilBits: reqs.stencil_bits.unwrap_or(0),
- cAuxBuffers: 0,
- iLayerType: winapi::PFD_MAIN_PLANE,
- bReserved: 0,
- dwLayerMask: 0,
- dwVisibleMask: 0,
- dwDamageMask: 0,
- };
-
- // now querying
- let pf_id = gdi32::ChoosePixelFormat(hdc, &descriptor);
- if pf_id == 0 {
- return Err(());
- }
-
- // querying back the capabilities of what windows told us
- let mut output: winapi::PIXELFORMATDESCRIPTOR = mem::zeroed();
- if gdi32::DescribePixelFormat(hdc,
- pf_id,
- mem::size_of::<winapi::PIXELFORMATDESCRIPTOR>() as u32,
- &mut output) == 0 {
- return Err(());
- }
-
- // windows may return us a non-conforming pixel format if none are supported, so we have to
- // check this
- if (output.dwFlags & winapi::PFD_DRAW_TO_WINDOW) == 0 {
- return Err(());
- }
- if (output.dwFlags & winapi::PFD_SUPPORT_OPENGL) == 0 {
- return Err(());
- }
- if output.iPixelType != winapi::PFD_TYPE_RGBA {
- return Err(());
- }
-
- let pf_desc = PixelFormat {
- hardware_accelerated: (output.dwFlags & winapi::PFD_GENERIC_FORMAT) == 0,
- color_bits: output.cRedBits + output.cGreenBits + output.cBlueBits,
- alpha_bits: output.cAlphaBits,
- depth_bits: output.cDepthBits,
- stencil_bits: output.cStencilBits,
- stereoscopy: (output.dwFlags & winapi::PFD_STEREO) != 0,
- double_buffer: (output.dwFlags & winapi::PFD_DOUBLEBUFFER) != 0,
- multisampling: None,
- srgb: false,
- };
-
- if pf_desc.alpha_bits < reqs.alpha_bits.unwrap_or(0) {
- return Err(());
- }
- if pf_desc.depth_bits < reqs.depth_bits.unwrap_or(0) {
- return Err(());
- }
- if pf_desc.stencil_bits < reqs.stencil_bits.unwrap_or(0) {
- return Err(());
- }
- if pf_desc.color_bits < reqs.color_bits.unwrap_or(0) {
- return Err(());
- }
- if !pf_desc.hardware_accelerated {
- return Err(());
- }
- if let Some(req) = reqs.double_buffer {
- if pf_desc.double_buffer != req {
- return Err(());
- }
- }
-
- Ok((pf_id, pf_desc))
-}
-
-// Calls `SetPixelFormat` on a window.
-unsafe fn set_pixel_format(hdc: winapi::HDC, id: c_int) -> Result<(), String> {
- let mut output: winapi::PIXELFORMATDESCRIPTOR = mem::zeroed();
-
- if gdi32::DescribePixelFormat(hdc, id, mem::size_of::<winapi::PIXELFORMATDESCRIPTOR>()
- as winapi::UINT, &mut output) == 0 {
- return Err(format!("DescribePixelFormat function failed: {}",io::Error::last_os_error()));
- }
-
- if gdi32::SetPixelFormat(hdc, id, &output) == 0 {
- return Err(format!("SetPixelFormat function failed: {}",
- io::Error::last_os_error()));
- }
-
- Ok(())
-}
-
-// Loads the WGL functions that are not guaranteed to be supported.
-//
-// The `window` must be passed because the driver can vary depending on the window's
-// characteristics.
-unsafe fn load_extra_functions(window: winapi::HWND) -> Result<wgl_ext::Wgl, String> {
- let (ex_style, style) = (winapi::WS_EX_APPWINDOW,
- winapi::WS_POPUP | winapi::WS_CLIPSIBLINGS | winapi::WS_CLIPCHILDREN);
- // creating a dummy invisible window
- let mut dummy_window = {
- // getting the rect of the real window
- let rect = {
- let mut placement: winapi::WINDOWPLACEMENT = mem::zeroed();
- placement.length = mem::size_of::<winapi::WINDOWPLACEMENT>() as winapi::UINT;
- if user32::GetWindowPlacement(window, &mut placement) == 0 {
- return Err("user32::GetWindowPlacement failed".to_owned());
- }
- placement.rcNormalPosition
- };
-
- // getting the class name of the real window
- let mut class_name = [0u16; 128];
- if user32::GetClassNameW(window, class_name.as_mut_ptr(), 128) == 0 {
- return Err(format!("GetClassNameW function failed: {}",
- io::Error::last_os_error()));
- }
-
- // this dummy window should match the real one enough to get the same OpenGL driver
- let title = OsStr::new("Dummy")
- .encode_wide()
- .chain(Some(0).into_iter())
- .collect::<Vec<_>>();
- let win = user32::CreateWindowExW(ex_style,
- class_name.as_ptr(),
- title.as_ptr(),
- style,
- winapi::CW_USEDEFAULT,
- winapi::CW_USEDEFAULT,
- rect.right - rect.left,
- rect.bottom - rect.top,
- ptr::null_mut(),
- ptr::null_mut(),
- kernel32::GetModuleHandleW(ptr::null()),
- ptr::null_mut());
-
- if win.is_null() {
- return Err(format!("CreateWindowEx function failed: {}", io::Error::last_os_error()));
- }
-
- let hdc = user32::GetDC(win);
- let ctx = WGLScopedContext::new(win, hdc, ptr::null_mut());
-
- if hdc.is_null() {
- return Err(format!("GetDC function failed: {}", io::Error::last_os_error()));
- }
-
- ctx
- };
-
- // getting the pixel format that we will use and setting it
- {
- let id = try!(choose_dummy_pixel_format(dummy_window.device_ctx));
- try!(set_pixel_format(dummy_window.device_ctx, id));
- }
-
- // creating the dummy OpenGL context and making it current
- dummy_window.render_ctx = try!(create_basic_context(dummy_window.device_ctx, ptr::null_mut())).0;
- if wgl::MakeCurrent(dummy_window.device_ctx as *const _, dummy_window.render_ctx as *const _) == 0 {
- return Err("WGL::MakeCurrent failed before loading extra WGL functions".to_owned());
- }
-
- // loading the extra WGL functions
- let result = wgl_ext::Wgl::load_with(|addr| {
- let addr = CString::new(addr.as_bytes()).unwrap();
- let addr = addr.as_ptr();
- wgl::GetProcAddress(addr) as *const c_void
- });
-
- // Unbind the current context so WGLScopedContext can release resources properly
- // the context to be deleted needs to be unbound.
- wgl::MakeCurrent(ptr::null_mut(), ptr::null_mut());
-
- Ok(result)
-}
-
-// This function chooses a pixel format that is likely to be provided by
-// the main video driver of the system.
-fn choose_dummy_pixel_format(hdc: winapi::HDC) -> Result<c_int, &'static str> {
- // building the descriptor to pass to ChoosePixelFormat
- let descriptor = winapi::PIXELFORMATDESCRIPTOR {
- nSize: mem::size_of::<winapi::PIXELFORMATDESCRIPTOR>() as u16,
- nVersion: 1,
- dwFlags: winapi::PFD_DRAW_TO_WINDOW | winapi::PFD_SUPPORT_OPENGL | winapi::PFD_DOUBLEBUFFER,
- iPixelType: winapi::PFD_TYPE_RGBA,
- cColorBits: 24,
- cRedBits: 0,
- cRedShift: 0,
- cGreenBits: 0,
- cGreenShift: 0,
- cBlueBits: 0,
- cBlueShift: 0,
- cAlphaBits: 8,
- cAlphaShift: 0,
- cAccumBits: 0,
- cAccumRedBits: 0,
- cAccumGreenBits: 0,
- cAccumBlueBits: 0,
- cAccumAlphaBits: 0,
- cDepthBits: 24,
- cStencilBits: 8,
- cAuxBuffers: 0,
- iLayerType: winapi::PFD_MAIN_PLANE,
- bReserved: 0,
- dwLayerMask: 0,
- dwVisibleMask: 0,
- dwDamageMask: 0,
- };
-
- // now querying
- let pf_id = unsafe { gdi32::ChoosePixelFormat(hdc, &descriptor) };
- if pf_id == 0 {
- return Err("No available pixel format");
- }
-
- Ok(pf_id)
-}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/platform/with_wgl/wgl_attributes.rs
+++ /dev/null
@@ -1,82 +0,0 @@
-// Attributes to use when creating an OpenGL context.
-#[derive(Clone, Debug)]
-pub struct WGLAttributes {
- pub opengl_es: bool, // enable or disable OpenGL ES contest
- pub major_version: u32, // OpenGL major version. Set 0 to select the latest
- pub minor_version: u32, // OpenGL minor version.
- pub debug: bool, // Debug mode improves error information. Disabled by default.
- pub vsync: bool, // Enable or disable vsync for swap_buffers. Disabled by default.
- pub pixel_format: WGLPixelFormat, // Pixel format requirements
-}
-
-impl Default for WGLAttributes {
- #[inline]
- fn default() -> WGLAttributes {
- WGLAttributes {
- opengl_es: false,
- major_version: 2,
- minor_version: 1,
- debug: false,
- vsync: false,
- pixel_format: WGLPixelFormat::default(),
- }
- }
-}
-
-#[derive(Clone, Debug)]
-pub struct WGLPixelFormat {
- // Minimum number of bits for the color buffer, excluding alpha. `None` means "don't care".
- // The default is `Some(24)`.
- pub color_bits: Option<u8>,
-
- // If true, the color buffer must be in a floating point format. Default is `false`.
- //
- // Using floating points allows you to write values outside of the `[0.0, 1.0]` range.
- pub float_color_buffer: bool,
-
- // Minimum number of bits for the alpha in the color buffer. `None` means "don't care".
- // The default is `Some(8)`.
- pub alpha_bits: Option<u8>,
-
- // Minimum number of bits for the depth buffer. `None` means "don't care".
- // The default value is `Some(24)`.
- pub depth_bits: Option<u8>,
-
- // Minimum number of bits for the depth buffer. `None` means "don't care".
- // The default value is `Some(8)`.
- pub stencil_bits: Option<u8>,
-
- // If true, only double-buffered formats will be considered. If false, only single-buffer
- // formats. `None` means "don't care". The default is `Some(true)`.
- pub double_buffer: Option<bool>,
-
- // Contains the minimum number of samples per pixel in the color, depth and stencil buffers.
- // `None` means "don't care". Default is `None`.
- // A value of `Some(0)` indicates that multisampling must not be enabled.
- pub multisampling: Option<u16>,
-
- // If true, only stereoscopic formats will be considered. If false, only non-stereoscopic
- // formats. The default is `false`.
- pub stereoscopy: bool,
-
- // If true, only sRGB-capable formats will be considered. If false, don't care.
- // The default is `false`.
- pub srgb: bool,
-}
-
-impl Default for WGLPixelFormat {
- #[inline]
- fn default() -> WGLPixelFormat {
- WGLPixelFormat {
- color_bits: Some(24),
- float_color_buffer: false,
- alpha_bits: Some(8),
- depth_bits: Some(24),
- stencil_bits: Some(8),
- double_buffer: None,
- multisampling: None,
- stereoscopy: false,
- srgb: false,
- }
- }
-}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/offscreen_gl_context/src/tests.rs
+++ /dev/null
@@ -1,370 +0,0 @@
-use gleam::gl;
-use euclid::Size2D;
-
-use GLContext;
-#[cfg(all(target_os = "linux", feature = "test_egl_in_linux"))]
-use platform::with_egl::NativeGLContext;
-#[cfg(feature="test_osmesa")]
-use platform::OSMesaContext as NativeGLContext;
-#[cfg(not(any(feature = "test_egl_in_linux", feature = "test_osmesa")))]
-use NativeGLContext;
-use NativeGLContextMethods;
-use GLContextAttributes;
-use ColorAttachmentType;
-use std::thread;
-use std::sync::mpsc;
-
-#[cfg(target_os="macos")]
-#[link(name="OpenGL", kind="framework")]
-extern {}
-
-#[cfg(all(target_os="linux", feature="x11"))]
-#[link(name="GL")]
-extern {}
-
-fn test_gl_context<T: NativeGLContextMethods>(context: &GLContext<T>) {
- context.make_current().unwrap();
-
- context.gl().clear_color(1.0, 0.0, 0.0, 1.0);
- context.gl().clear(gl::COLOR_BUFFER_BIT);
-
- let size = context.draw_buffer_size().unwrap();
-
- let pixels = context.gl().read_pixels(0, 0, size.width, size.height, gl::RGBA, gl::UNSIGNED_BYTE);
-
- assert!(pixels.len() == (size.width * size.height * 4) as usize);
- test_pixels(&pixels);
-}
-
-fn test_pixels_eq(pixels: &[u8], to: &[u8]) {
- assert!(to.len() == 4);
- for pixel in pixels.chunks(4) {
- assert_eq!(pixel, to);
- }
-
-}
-
-fn test_pixels(pixels: &[u8]) {
- test_pixels_eq(pixels, &[255, 0, 0, 255]);
-}
-
-#[test]
-#[cfg(not(feature = "test_osmesa"))]
-fn test_unbinding() {
- let ctx = GLContext::<NativeGLContext>::new(Size2D::new(256, 256),
- GLContextAttributes::default(),
- ColorAttachmentType::Renderbuffer,
- gl::GlType::default(),
- None).unwrap();
-
- assert!(NativeGLContext::current_handle().is_some());
-
- ctx.unbind().unwrap();
- assert!(NativeGLContext::current_handle().is_none());
-}
-
-#[test]
-fn test_renderbuffer_color_attachment() {
- test_gl_context(&GLContext::<NativeGLContext>::new(Size2D::new(256, 256),
- GLContextAttributes::default(),
- ColorAttachmentType::Renderbuffer,
- gl::GlType::default(),
- None).unwrap());
-}
-
-#[test]
-fn test_texture_color_attachment() {
- let size = Size2D::new(256, 256);
- let context = GLContext::<NativeGLContext>::new(size,
- GLContextAttributes::default(),
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- None).unwrap();
- test_gl_context(&context);
-
- // Get the bound texture and check we're painting on it
- let texture_id = context.borrow_draw_buffer().unwrap().get_bound_texture_id().unwrap();
- assert!(texture_id != 0);
-
- assert!(context.gl().get_error() == gl::NO_ERROR);
-
- // Actually we just check that writing to the framebuffer works, and that there's a texture
- // attached to it. Doing a getTexImage should be a good idea, but it's not available on gles,
- // so what we should do is rebinding to another FBO.
- //
- // This is done in the `test_sharing` test though, so if that passes we know everything
- // works and we're just happy.
- let vec = context.gl().read_pixels(0, 0, size.width, size.height, gl::RGBA, gl::UNSIGNED_BYTE);
- test_pixels(&vec);
-}
-
-#[test]
-fn test_sharing() {
- let size = Size2D::new(256, 256);
- let primary = GLContext::<NativeGLContext>::new(size,
- GLContextAttributes::default(),
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- None).unwrap();
-
- let primary_texture_id = primary.borrow_draw_buffer().unwrap().get_bound_texture_id().unwrap();
- assert!(primary_texture_id != 0);
-
- let secondary = GLContext::<NativeGLContext>::new(size,
- GLContextAttributes::default(),
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- Some(&primary.handle())).unwrap();
-
- // Paint the second context red
- test_gl_context(&secondary);
-
- // Now the secondary context is bound, get the texture id, switch contexts, and check the
- // texture is there.
- let secondary_texture_id = secondary.borrow_draw_buffer().unwrap().get_bound_texture_id().unwrap();
- assert!(secondary_texture_id != 0);
-
- primary.make_current().unwrap();
- assert!(primary.gl().is_texture(secondary_texture_id) != 0);
-
- // Clearing and re-binding to a framebuffer instead of using getTexImage
- // since it's not available in GLES2
- primary.gl().clear_color(0.0, 0.0, 0.0, 1.0);
- primary.gl().clear(gl::COLOR_BUFFER_BIT);
-
- let vec = primary.gl().read_pixels(0, 0, size.width, size.height, gl::RGBA, gl::UNSIGNED_BYTE);
- test_pixels_eq(&vec, &[0, 0, 0, 255]);
-
- primary.gl().bind_texture(gl::TEXTURE_2D, secondary_texture_id);
-
- primary.gl().framebuffer_texture_2d(gl::FRAMEBUFFER,
- gl::COLOR_ATTACHMENT0,
- gl::TEXTURE_2D,
- secondary_texture_id, 0);
-
- let vec = primary.gl().read_pixels(0, 0, size.width, size.height, gl::RGBA, gl::UNSIGNED_BYTE);
- assert!(primary.gl().get_error() == gl::NO_ERROR);
-
- test_pixels(&vec);
-}
-
-#[test]
-fn test_multithread_render() {
- let size = Size2D::new(256, 256);
- let primary = GLContext::<NativeGLContext>::new(size,
- GLContextAttributes::default(),
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- None).unwrap();
- test_gl_context(&primary);
- let (tx, rx) = mpsc::channel();
- let (end_tx, end_rx) = mpsc::channel();
- thread::spawn(move ||{
- //create the context in a different thread
- let secondary = GLContext::<NativeGLContext>::new(size,
- GLContextAttributes::default(),
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- None).unwrap();
- secondary.make_current().unwrap();
- assert!(secondary.is_current());
- //render green adn test pixels
- secondary.gl().clear_color(0.0, 1.0, 0.0, 1.0);
- secondary.gl().clear(gl::COLOR_BUFFER_BIT);
-
- let vec = secondary.gl().read_pixels(0, 0, size.width, size.height, gl::RGBA, gl::UNSIGNED_BYTE);
- test_pixels_eq(&vec, &[0, 255, 0, 255]);
-
- tx.send(()).unwrap();
-
- // Avoid drop until test ends
- end_rx.recv().unwrap();
- });
- // Wait until thread has drawn the texture
- rx.recv().unwrap();
- // This context must remain to be current in this thread
- assert!(primary.is_current());
-
- // The colors must remain unchanged
- let vec = primary.gl().read_pixels(0, 0, size.width, size.height, gl::RGBA, gl::UNSIGNED_BYTE);
- test_pixels_eq(&vec, &[255, 0, 0, 255]);
-
- end_tx.send(()).unwrap();
-}
-
-struct SGLUint(gl::GLuint);
-unsafe impl Sync for SGLUint {}
-unsafe impl Send for SGLUint {}
-
-#[test]
-fn test_multithread_sharing() {
- let size = Size2D::new(256, 256);
- let primary = GLContext::<NativeGLContext>::new(size,
- GLContextAttributes::default(),
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- None).unwrap();
- primary.make_current().unwrap();
-
- let primary_texture_id = primary.borrow_draw_buffer().unwrap().get_bound_texture_id().unwrap();
- assert!(primary_texture_id != 0);
-
- let (tx, rx) = mpsc::channel();
- let (end_tx, end_rx) = mpsc::channel();
- let primary_handle = primary.handle();
-
- // Unbind required by some APIs as WGL
- primary.unbind().unwrap();
-
- thread::spawn(move || {
- // Create the context in a different thread
- let secondary = GLContext::<NativeGLContext>::new(size,
- GLContextAttributes::default(),
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- Some(&primary_handle)).unwrap();
- // Make the context current on this thread only
- secondary.make_current().unwrap();
- // Paint the second context red
- test_gl_context(&secondary);
- // Send texture_id to main thread
- let texture_id = secondary.borrow_draw_buffer().unwrap().get_bound_texture_id().unwrap();
- assert!(texture_id != 0);
- tx.send(SGLUint(texture_id)).unwrap();
- // Avoid drop until test ends
- end_rx.recv().unwrap();
- });
- // Wait until thread has drawn the texture
- let secondary_texture_id = rx.recv().unwrap().0;
-
- primary.make_current().unwrap();
-
- // Clearing and re-binding to a framebuffer instead of using getTexImage
- // since it's not available in GLES2
- primary.gl().clear_color(0.0, 0.0, 0.0, 1.0);
- primary.gl().clear(gl::COLOR_BUFFER_BIT);
-
- let vec = primary.gl().read_pixels(0, 0, size.width, size.height, gl::RGBA, gl::UNSIGNED_BYTE);
- test_pixels_eq(&vec, &[0, 0, 0, 255]);
-
-
- primary.gl().framebuffer_texture_2d(gl::FRAMEBUFFER,
- gl::COLOR_ATTACHMENT0,
- gl::TEXTURE_2D,
- secondary_texture_id,
- 0);
-
- let vec = primary.gl().read_pixels(0, 0, size.width, size.height, gl::RGBA, gl::UNSIGNED_BYTE);
- assert!(primary.gl().get_error() == gl::NO_ERROR);
-
- test_pixels(&vec);
- end_tx.send(()).unwrap();
-}
-
-#[test]
-fn test_limits() {
- let size = Size2D::new(256, 256);
- let context = GLContext::<NativeGLContext>::new(size,
- GLContextAttributes::default(),
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- None).unwrap();
- assert!(context.borrow_limits().max_vertex_attribs != 0);
-}
-
-#[test]
-fn test_no_alpha() {
- let mut attributes = GLContextAttributes::default();
- attributes.alpha = false;
-
- let size = Size2D::new(256, 256);
- let context = GLContext::<NativeGLContext>::new(size,
- attributes,
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- None).unwrap();
- assert!(context.borrow_limits().max_vertex_attribs != 0);
-}
-
-#[test]
-fn test_no_depth() {
- let mut attributes = GLContextAttributes::default();
- attributes.depth = false;
-
- let size = Size2D::new(256, 256);
- let context = GLContext::<NativeGLContext>::new(size,
- attributes,
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- None).unwrap();
- assert!(context.borrow_limits().max_vertex_attribs != 0);
-}
-
-#[test]
-fn test_no_depth_no_alpha() {
- let mut attributes = GLContextAttributes::default();
- attributes.depth = false;
- attributes.alpha = false;
-
- let size = Size2D::new(256, 256);
- let context = GLContext::<NativeGLContext>::new(size,
- attributes,
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- None).unwrap();
- assert!(context.borrow_limits().max_vertex_attribs != 0);
-}
-
-#[test]
-fn test_no_premul_alpha() {
- let mut attributes = GLContextAttributes::default();
- attributes.depth = false;
- attributes.alpha = false;
- attributes.premultiplied_alpha = false;
-
- let size = Size2D::new(256, 256);
- let context = GLContext::<NativeGLContext>::new(size,
- attributes,
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- None).unwrap();
- assert!(context.borrow_limits().max_vertex_attribs != 0);
-}
-
-#[test]
-fn test_in_a_row() {
- let mut attributes = GLContextAttributes::default();
- attributes.depth = false;
- attributes.alpha = false;
- attributes.premultiplied_alpha = false;
-
- let size = Size2D::new(256, 256);
- let context = GLContext::<NativeGLContext>::new(size,
- attributes.clone(),
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- None).unwrap();
-
- let handle = context.handle();
-
- GLContext::<NativeGLContext>::new(size,
- attributes.clone(),
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- Some(&handle)).unwrap();
-
- GLContext::<NativeGLContext>::new(size,
- attributes.clone(),
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- Some(&handle)).unwrap();
-}
-
-#[test]
-fn test_zero_size() {
- GLContext::<NativeGLContext>::new(Size2D::new(0, 320),
- GLContextAttributes::default(),
- ColorAttachmentType::Texture,
- gl::GlType::default(),
- None).unwrap();
-}
deleted file mode 100644
--- a/third_party/rust/osmesa-sys/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"944bf600c6230664922a011cbca026699969f2f89f6c7ff689835836ccd7b1de","Cargo.toml":"fac0f95ff5391a09743ec544dc6771d85769b8a6a45fbdea6227e8b3df1978fd","README.txt":"1367c50c9a6709e7131bbea78f6ac734abb889ccf4e8c607ab20c7c3cf4a1723","lib.rs":"9e3af6d2aec558af37e73ccb36270961c85907c9b5e6460e5a1ff1c7acc7c0bd"},"package":"88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/osmesa-sys/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Cargo.lock
-target
deleted file mode 100644
--- a/third_party/rust/osmesa-sys/Cargo.toml
+++ /dev/null
@@ -1,14 +0,0 @@
-[package]
-name = "osmesa-sys"
-version = "0.1.2"
-authors = ["Daggerbot <daggerbot@gmail.com>"]
-description = "OSMesa library bindings for Rust"
-license = "CC0-1.0"
-repository = "https://github.com/Daggerbot/osmesa-rs.git"
-
-[lib]
-name = "osmesa_sys"
-path = "lib.rs"
-
-[dependencies]
-shared_library = "0.1"
deleted file mode 100644
--- a/third_party/rust/osmesa-sys/README.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-osmesa-rs: Off-Screen Mesa bindings for Rust.
-The OSMesa library is available under the MIT license.
-These bindings are public domain.
deleted file mode 100644
--- a/third_party/rust/osmesa-sys/lib.rs
+++ /dev/null
@@ -1,92 +0,0 @@
-// osmesa-rs: Off-Screen Mesa bindings for Rust.
-// The OSMesa library is available under the MIT license.
-// These bindings are public domain.
-
-#![allow(non_snake_case)]
-
-#[macro_use]
-extern crate shared_library;
-
-use std::os::raw::{
- c_char,
- c_int,
- c_uchar,
- c_uint,
- c_void,
-};
-
-
-//
-// functions
-//
-
-#[cfg(target_os="macos")]
-const LIB_NAME: &'static str = "libOSMesa.dylib";
-
-#[cfg(not(target_os="macos"))]
-const LIB_NAME: &'static str = "libOSMesa.so";
-
-shared_library!(OsMesa, LIB_NAME,
- pub fn OSMesaColorClamp (enable: c_uchar),
- pub fn OSMesaCreateContext (format: c_uint, sharelist: OSMesaContext) -> OSMesaContext,
- pub fn OSMesaCreateContextExt (format: c_uint, depthBits: c_int, stencilBits: c_int, accumBits: c_int, sharelist: OSMesaContext) -> OSMesaContext,
- pub fn OSMesaCreateContextAttribs(attribList: *const c_int, sharelist: OSMesaContext) -> OSMesaContext,
- pub fn OSMesaDestroyContext (ctx: OSMesaContext),
- pub fn OSMesaGetColorBuffer (c: OSMesaContext, width: *mut c_int, height: *mut c_int, format: *mut c_int, buffer: *mut *mut c_void) -> c_uchar,
- pub fn OSMesaGetCurrentContext () -> OSMesaContext,
- pub fn OSMesaGetDepthBuffer (c: OSMesaContext, width: *mut c_int, height: *mut c_int, bytesPerValue: *mut c_int, buffer: *mut *mut c_void) -> c_uchar,
- pub fn OSMesaGetIntegerv (pname: c_int, value: *mut c_int),
- pub fn OSMesaGetProcAddress (funcName: *const c_char) -> OSMESAproc,
- pub fn OSMesaMakeCurrent (ctx: OSMesaContext, buffer: *mut c_void, _type: c_uint, width: c_int, height: c_int) -> c_uchar,
- pub fn OSMesaPixelStore (pname: c_int, value: c_int),
-);
-
-
-//
-// types
-//
-
-
-// opaque structs
-#[repr(C)] pub struct osmesa_context;
-
-// types
-pub type OSMesaContext = *mut osmesa_context;
-pub type OSMESAproc = Option<unsafe extern "C" fn ()>;
-
-
-//
-// constants
-//
-
-
-// context formats
-pub const OSMESA_BGRA: c_uint = 0x0001;
-pub const OSMESA_ARGB: c_uint = 0x0002;
-pub const OSMESA_BGR: c_uint = 0x0004;
-pub const OSMESA_RGB_565: c_uint = 0x0005;
-pub const OSMESA_COLOR_INDEX: c_uint = 0x1900;
-pub const OSMESA_RGB: c_uint = 0x1907;
-pub const OSMESA_RGBA: c_uint = 0x1908;
-
-// OSMesaGetIntegerv
-pub const OSMESA_WIDTH: c_int = 0x0020;
-pub const OSMESA_HEIGHT: c_int = 0x0021;
-pub const OSMESA_FORMAT: c_int = 0x0022;
-pub const OSMESA_TYPE: c_int = 0x0023;
-pub const OSMESA_MAX_WIDTH: c_int = 0x0024;
-pub const OSMESA_MAX_HEIGHT: c_int = 0x0025;
-
-// OSMesaPixelStore
-pub const OSMESA_ROW_LENGTH: c_int = 0x0010;
-pub const OSMESA_Y_UP: c_int = 0x0011;
-
-// OSMesaCreateContextAttribs
-pub const OSMESA_DEPTH_BITS: c_int = 0x30;
-pub const OSMESA_STENCIL_BITS: c_int = 0x31;
-pub const OSMESA_ACCUM_BITS: c_int = 0x32;
-pub const OSMESA_PROFILE: c_int = 0x33;
-pub const OSMESA_CORE_PROFILE: c_int = 0x34;
-pub const OSMESA_COMPAT_PROFILE: c_int = 0x35;
-pub const OSMESA_CONTEXT_MAJOR_VERSION: c_int = 0x36;
-pub const OSMESA_CONTEXT_MINOR_VERSION: c_int = 0x37;
deleted file mode 100644
--- a/third_party/rust/shared_library/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"f9b1ca6ae27d1c18215265024629a8960c31379f206d9ed20f64e0b2dcf79805",".travis.yml":"b9076e5a6d8b1a00602d4ebdfa145067428c1932032e0a86deecb0a1ffbcd5dc","Cargo.toml":"9a0d07a96946be5809263a7cd860c6a2bcb4b6c59ab867f374b6fded5b4003ef","src/dynamic_library.rs":"49bf9a598bf3b2df675d84a854b150638beddea11fdd1a2a8a9a3b42d012df76","src/lib.rs":"29f1aef9437d1ab891d17d6a6b86c6e1176813d372333cfdfc063b97586deb02"},"package":"fb04126b6fcfd2710fb5b6d18f4207b6c535f2850a7e1a43bcd526d44f30a79a"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/shared_library/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-target
-Cargo.lock
deleted file mode 100644
--- a/third_party/rust/shared_library/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-language: rust
-
-after_success:
- - |
- [ $TRAVIS_BRANCH = master ] &&
- [ $TRAVIS_PULL_REQUEST = false ] &&
- cargo publish --token ${CRATESIO_TOKEN}
- - |
- [ $TRAVIS_BRANCH = master ] &&
- [ $TRAVIS_PULL_REQUEST = false ] &&
- cargo doc &&
- echo '<meta http-equiv=refresh content=0;url=[CRATE NAME]/index.html>' > target/doc/index.html &&
- git clone https://github.com/davisp/ghp-import &&
- ./ghp-import/ghp-import -n target/doc &&
- git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
deleted file mode 100644
--- a/third_party/rust/shared_library/Cargo.toml
+++ /dev/null
@@ -1,11 +0,0 @@
-[package]
-name = "shared_library"
-version = "0.1.5"
-authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
-description = "Easily bind to and load shared libraries"
-license = "Apache-2.0/MIT"
-repository = "https://github.com/tomaka/shared_library/"
-
-[dependencies]
-libc = "0.2"
-lazy_static = "0.2"
deleted file mode 100644
--- a/third_party/rust/shared_library/src/dynamic_library.rs
+++ /dev/null
@@ -1,359 +0,0 @@
-// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Dynamic library facilities.
-//!
-//! A simple wrapper over the platform's dynamic library facilities
-
-#![allow(missing_docs)]
-
-use std::env;
-use std::ffi::{CString, OsString};
-use std::mem;
-use std::path::{Path, PathBuf};
-
-pub struct DynamicLibrary {
- handle: *mut u8
-}
-
-unsafe impl Send for DynamicLibrary {}
-unsafe impl Sync for DynamicLibrary {}
-
-impl Drop for DynamicLibrary {
- fn drop(&mut self) {
- match dl::check_for_errors_in(|| {
- unsafe {
- dl::close(self.handle)
- }
- }) {
- Ok(()) => {},
- Err(str) => panic!("{}", str)
- }
- }
-}
-
-impl DynamicLibrary {
- // FIXME (#12938): Until DST lands, we cannot decompose &str into
- // & and str, so we cannot usefully take ToCStr arguments by
- // reference (without forcing an additional & around &str). So we
- // are instead temporarily adding an instance for &Path, so that
- // we can take ToCStr as owned. When DST lands, the &Path instance
- // should be removed, and arguments bound by ToCStr should be
- // passed by reference. (Here: in the `open` method.)
-
- /// Lazily open a dynamic library. When passed None it gives a
- /// handle to the calling process
- pub fn open(filename: Option<&Path>) -> Result<DynamicLibrary, String> {
- let maybe_library = dl::open(filename.map(|path| path.as_os_str()));
-
- // The dynamic library must not be constructed if there is
- // an error opening the library so the destructor does not
- // run.
- match maybe_library {
- Err(err) => Err(err),
- Ok(handle) => Ok(DynamicLibrary { handle: handle })
- }
- }
-
- /// Prepends a path to this process's search path for dynamic libraries
- pub fn prepend_search_path(path: &Path) {
- let mut search_path = DynamicLibrary::search_path();
- search_path.insert(0, path.to_path_buf());
- env::set_var(DynamicLibrary::envvar(), &DynamicLibrary::create_path(&search_path));
- }
-
- /// From a slice of paths, create a new vector which is suitable to be an
- /// environment variable for this platforms dylib search path.
- pub fn create_path(path: &[PathBuf]) -> OsString {
- let mut newvar = OsString::new();
- for (i, path) in path.iter().enumerate() {
- if i > 0 { newvar.push(DynamicLibrary::separator()); }
- newvar.push(path);
- }
- return newvar;
- }
-
- /// Returns the environment variable for this process's dynamic library
- /// search path
- pub fn envvar() -> &'static str {
- if cfg!(windows) {
- "PATH"
- } else if cfg!(target_os = "macos") {
- "DYLD_LIBRARY_PATH"
- } else {
- "LD_LIBRARY_PATH"
- }
- }
-
- fn separator() -> &'static str {
- if cfg!(windows) { ";" } else { ":" }
- }
-
- /// Returns the current search path for dynamic libraries being used by this
- /// process
- pub fn search_path() -> Vec<PathBuf> {
- match env::var_os(DynamicLibrary::envvar()) {
- Some(var) => env::split_paths(&var).collect(),
- None => Vec::new(),
- }
- }
-
- /// Access the value at the symbol of the dynamic library
- pub unsafe fn symbol<T>(&self, symbol: &str) -> Result<*mut T, String> {
- // This function should have a lifetime constraint of 'a on
- // T but that feature is still unimplemented
-
- let raw_string = CString::new(symbol).unwrap();
- let maybe_symbol_value = dl::check_for_errors_in(|| {
- dl::symbol(self.handle, raw_string.as_ptr() as *const _)
- });
-
- // The value must not be constructed if there is an error so
- // the destructor does not run.
- match maybe_symbol_value {
- Err(err) => Err(err),
- Ok(symbol_value) => Ok(mem::transmute(symbol_value))
- }
- }
-}
-
-#[cfg(all(test, not(target_os = "ios")))]
-mod test {
- use super::*;
- use libc;
- use std::mem;
- use std::path::Path;
-
- #[test]
- #[cfg_attr(any(windows, target_os = "android"), ignore)] // FIXME #8818, #10379
- fn test_loading_cosine() {
- // The math library does not need to be loaded since it is already
- // statically linked in
- let libm = match DynamicLibrary::open(None) {
- Err(error) => panic!("Could not load self as module: {}", error),
- Ok(libm) => libm
- };
-
- let cosine: extern fn(libc::c_double) -> libc::c_double = unsafe {
- match libm.symbol("cos") {
- Err(error) => panic!("Could not load function cos: {}", error),
- Ok(cosine) => mem::transmute::<*mut u8, _>(cosine)
- }
- };
-
- let argument = 0.0;
- let expected_result = 1.0;
- let result = cosine(argument);
- if result != expected_result {
- panic!("cos({}) != {} but equaled {} instead", argument,
- expected_result, result)
- }
- }
-
- #[test]
- #[cfg(any(target_os = "linux",
- target_os = "macos",
- target_os = "freebsd",
- target_os = "dragonfly",
- target_os = "bitrig",
- target_os = "openbsd"))]
- fn test_errors_do_not_crash() {
- // Open /dev/null as a library to get an error, and make sure
- // that only causes an error, and not a crash.
- let path = Path::new("/dev/null");
- match DynamicLibrary::open(Some(&path)) {
- Err(_) => {}
- Ok(_) => panic!("Successfully opened the empty library.")
- }
- }
-}
-
-#[cfg(any(target_os = "linux",
- target_os = "android",
- target_os = "macos",
- target_os = "ios",
- target_os = "freebsd",
- target_os = "dragonfly",
- target_os = "bitrig",
- target_os = "openbsd",
- target_os = "emscripten"))]
-mod dl {
- use std::ffi::{CString, CStr, OsStr};
- use std::os::unix::ffi::OsStrExt;
- use std::str;
- use libc;
- use std::ptr;
- use std::sync::Mutex;
-
- lazy_static! {
- static ref LOCK: Mutex<()> = Mutex::new(());
- }
-
- pub fn open(filename: Option<&OsStr>) -> Result<*mut u8, String> {
- check_for_errors_in(|| {
- unsafe {
- match filename {
- Some(filename) => open_external(filename),
- None => open_internal(),
- }
- }
- })
- }
-
- const LAZY: libc::c_int = 1;
-
- unsafe fn open_external(filename: &OsStr) -> *mut u8 {
- let s = CString::new(filename.as_bytes().to_vec()).unwrap();
- dlopen(s.as_ptr() as *const _, LAZY) as *mut u8
- }
-
- unsafe fn open_internal() -> *mut u8 {
- dlopen(ptr::null(), LAZY) as *mut u8
- }
-
- pub fn check_for_errors_in<T, F>(f: F) -> Result<T, String> where
- F: FnOnce() -> T,
- {
- unsafe {
- // dlerror isn't thread safe, so we need to lock around this entire
- // sequence
- let _guard = LOCK.lock();
- let _old_error = dlerror();
-
- let result = f();
-
- let last_error = dlerror() as *const _;
- let ret = if ptr::null() == last_error {
- Ok(result)
- } else {
- let s = CStr::from_ptr(last_error).to_bytes();
- Err(str::from_utf8(s).unwrap().to_string())
- };
-
- ret
- }
- }
-
- pub unsafe fn symbol(handle: *mut u8,
- symbol: *const libc::c_char) -> *mut u8 {
- dlsym(handle as *mut libc::c_void, symbol) as *mut u8
- }
- pub unsafe fn close(handle: *mut u8) {
- dlclose(handle as *mut libc::c_void); ()
- }
-
- extern {
- fn dlopen(filename: *const libc::c_char,
- flag: libc::c_int) -> *mut libc::c_void;
- fn dlerror() -> *mut libc::c_char;
- fn dlsym(handle: *mut libc::c_void,
- symbol: *const libc::c_char) -> *mut libc::c_void;
- fn dlclose(handle: *mut libc::c_void) -> libc::c_int;
- }
-}
-
-#[cfg(target_os = "windows")]
-mod dl {
- use std::ffi::OsStr;
- use std::iter::Iterator;
- use libc;
- use std::ops::FnOnce;
- use std::io::Error as IoError;
- use std::os::windows::prelude::*;
- use std::option::Option::{self, Some, None};
- use std::ptr;
- use std::result::Result;
- use std::result::Result::{Ok, Err};
- use std::string::String;
- use std::vec::Vec;
-
- pub fn open(filename: Option<&OsStr>) -> Result<*mut u8, String> {
- // disable "dll load failed" error dialog.
- let prev_error_mode = unsafe {
- // SEM_FAILCRITICALERRORS 0x01
- let new_error_mode = 1;
- SetErrorMode(new_error_mode)
- };
-
- unsafe {
- SetLastError(0);
- }
-
- let result = match filename {
- Some(filename) => {
- let filename_str: Vec<_> =
- filename.encode_wide().chain(Some(0).into_iter()).collect();
- let result = unsafe {
- LoadLibraryW(filename_str.as_ptr() as *const libc::c_void)
- };
- // beware: Vec/String may change errno during drop!
- // so we get error here.
- if result == ptr::null_mut() {
- Err(format!("{}", IoError::last_os_error()))
- } else {
- Ok(result as *mut u8)
- }
- }
- None => {
- let mut handle = ptr::null_mut();
- let succeeded = unsafe {
- GetModuleHandleExW(0, ptr::null(), &mut handle)
- };
- if succeeded == 0 {
- Err(format!("{}", IoError::last_os_error()))
- } else {
- Ok(handle as *mut u8)
- }
- }
- };
-
- unsafe {
- SetErrorMode(prev_error_mode);
- }
-
- result
- }
-
- pub fn check_for_errors_in<T, F>(f: F) -> Result<T, String> where
- F: FnOnce() -> T,
- {
- unsafe {
- SetLastError(0);
-
- let result = f();
-
- let error = IoError::last_os_error();
- if 0 == error.raw_os_error().unwrap() {
- Ok(result)
- } else {
- Err(format!("{}", error))
- }
- }
- }
-
- pub unsafe fn symbol(handle: *mut u8, symbol: *const libc::c_char) -> *mut u8 {
- GetProcAddress(handle as *mut libc::c_void, symbol) as *mut u8
- }
- pub unsafe fn close(handle: *mut u8) {
- FreeLibrary(handle as *mut libc::c_void); ()
- }
-
- #[allow(non_snake_case)]
- extern "system" {
- fn SetLastError(error: libc::size_t);
- fn LoadLibraryW(name: *const libc::c_void) -> *mut libc::c_void;
- fn GetModuleHandleExW(dwFlags: u32, name: *const u16,
- handle: *mut *mut libc::c_void) -> i32;
- fn GetProcAddress(handle: *mut libc::c_void,
- name: *const libc::c_char) -> *mut libc::c_void;
- fn FreeLibrary(handle: *mut libc::c_void);
- fn SetErrorMode(uMode: libc::c_uint) -> libc::c_uint;
- }
-}
deleted file mode 100644
--- a/third_party/rust/shared_library/src/lib.rs
+++ /dev/null
@@ -1,175 +0,0 @@
-extern crate libc;
-
-#[macro_use]
-extern crate lazy_static;
-
-pub mod dynamic_library;
-
-/// Error that can happen while loading the shared library.
-#[derive(Debug, Clone)]
-pub enum LoadingError {
- ///
- LibraryNotFound {
- descr: String,
- },
-
- /// One of the symbols could not be found in the library.
- SymbolNotFound {
- /// The symbol.
- symbol: &'static str,
- }
-}
-
-#[macro_export]
-macro_rules! shared_library {
- ($struct_name:ident, pub $($rest:tt)+) => {
- shared_library!(__impl $struct_name [] [] [] pub $($rest)+);
- };
-
- ($struct_name:ident, fn $($rest:tt)+) => {
- shared_library!(__impl $struct_name [] [] [] fn $($rest)+);
- };
-
- ($struct_name:ident, static $($rest:tt)+) => {
- shared_library!(__impl $struct_name [] [] [] static $($rest)+);
- };
-
- ($struct_name:ident, $def_path:expr, $($rest:tt)+) => {
- shared_library!(__impl $struct_name [] [$def_path] [] $($rest)+);
- };
-
- (__impl $struct_name:ident
- [$($p1:tt)*] [$($p2:tt)*] [$($p3:tt)*]
- , $($rest:tt)*
- ) => {
- shared_library!(__impl $struct_name [$($p1)*] [$($p2)*] [$($p3)*] $($rest)*);
- };
-
- (__impl $struct_name:ident
- [$($p1:tt)*] [$($p2:tt)*] [$($p3:tt)*]
- pub $($rest:tt)*
- ) => {
- shared_library!(__impl $struct_name
- [$($p1)*] [$($p2)*] [$($p3)* pub] $($rest)*);
- };
-
- (__impl $struct_name:ident
- [$($p1:tt)*] [$($p2:tt)*] [$($p3:tt)*]
- fn $name:ident($($p:ident:$ty:ty),*) -> $ret:ty, $($rest:tt)*
- ) => {
- shared_library!(__impl $struct_name
- [$($p1)*, $name:unsafe extern fn($($p:$ty),*) -> $ret]
- [$($p2)*]
- [$($p3)*
- unsafe fn $name($($p:$ty),*) -> $ret {
- #![allow(dead_code)]
- ($struct_name::get_static_ref().$name)($($p),*)
- }
- ] $($rest)*);
- };
-
- (__impl $struct_name:ident
- [$($p1:tt)*] [$($p2:tt)*] [$($p3:tt)*]
- static $name:ident:$ty:ty, $($rest:tt)*
- ) => {
- shared_library!(__impl $struct_name
- [$($p1)*, $name: $ty]
- [$($p2)*]
- [$($p3)*] $($rest)*);
- };
-
- (__impl $struct_name:ident
- [$($p1:tt)*] [$($p2:tt)*] [$($p3:tt)*]
- fn $name:ident($($p:ident:$ty:ty),*), $($rest:tt)*
- ) => {
- shared_library!(__impl $struct_name
- [$($p1)*] [$($p2)*] [$($p3)*]
- fn $name($($p:$ty),*) -> (), $($rest)*);
- };
-
- (__impl $struct_name:ident [$(,$mem_n:ident:$mem_t:ty)+] [$($p2:tt)*] [$($p3:tt)*]) => {
- /// Symbols loaded from a shared library.
- #[allow(non_snake_case)]
- pub struct $struct_name {
- _library_guard: $crate::dynamic_library::DynamicLibrary,
- $(
- pub $mem_n: $mem_t,
- )+
- }
-
- impl $struct_name {
- /// Tries to open the dynamic library.
- #[allow(non_snake_case)]
- pub fn open(path: &::std::path::Path) -> Result<$struct_name, $crate::LoadingError> {
- use std::mem;
-
- let dylib = match $crate::dynamic_library::DynamicLibrary::open(Some(path)) {
- Ok(l) => l,
- Err(reason) => return Err($crate::LoadingError::LibraryNotFound { descr: reason })
- };
-
- $(
- let $mem_n: *mut () = match unsafe { dylib.symbol(stringify!($mem_n)) } {
- Ok(s) => s,
- Err(_) => return Err($crate::LoadingError::SymbolNotFound { symbol: stringify!($mem_n) }),
- };
- )+
-
- Ok($struct_name {
- _library_guard: dylib,
- $(
- $mem_n: unsafe { mem::transmute($mem_n) },
- )+
- })
- }
- }
-
- shared_library!(__write_static_fns $struct_name [] [$($p2)*] [$($p3)*]);
- };
-
- (__write_static_fns $struct_name:ident [$($p1:tt)*] [] [$($p3:tt)*]) => {
- };
-
- (__write_static_fns $struct_name:ident [$($p1:tt)*] [$defpath:expr] [$($standalones:item)+]) => {
- impl $struct_name {
- /// This function is used by the regular functions.
- fn get_static_ref() -> &'static $struct_name {
- $struct_name::try_loading().ok()
- .expect(concat!("Could not open dynamic \
- library `", stringify!($struct_name),
- "`"))
- }
-
- /// Try loading the static symbols linked to this library.
- pub fn try_loading() -> Result<&'static $struct_name, $crate::LoadingError> {
- use std::sync::{Mutex, Once, ONCE_INIT};
- use std::mem;
-
- unsafe {
- static mut DATA: *const Mutex<Option<$struct_name>> = 0 as *const _;
-
- static mut INIT: Once = ONCE_INIT;
- INIT.call_once(|| {
- let data = Box::new(Mutex::new(None));
- DATA = &*data;
- mem::forget(data);
- });
-
- let data: &Mutex<Option<$struct_name>> = &*DATA;
- let mut data = data.lock().unwrap();
-
- if let Some(ref data) = *data {
- return Ok(mem::transmute(data));
- }
-
- let path = ::std::path::Path::new($defpath);
- let result = try!($struct_name::open(path));
- *data = Some(result);
- Ok(mem::transmute(data.as_ref().unwrap()))
- }
- }
- }
-
- $($standalones)+
- };
-}
deleted file mode 100644
--- a/third_party/rust/toml/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"f9b1ca6ae27d1c18215265024629a8960c31379f206d9ed20f64e0b2dcf79805",".travis.yml":"7d917e42244b1d0d0304a11e8ef45bbc34e2a859bf35a752ed6069920a7cc8c5","Cargo.toml":"996f64a3b649cb71b337b03882f63e487de78fbddb97734c67c6fca015976f2c","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"a3505a33e4973ac97b3c7189f7b56b3a5f483218f1a23da5f625a718ad9adc16","examples/toml2json.rs":"d1980e1d53e712ea6f9d6b3a36ce156b075bf8c1dd7660c2947e7b81106ea41c","src/decoder/mod.rs":"23c4045e9131b26ea772797f4dc65a57fab4e4a59b340dcceb094db9dd5cc02e","src/decoder/rustc_serialize.rs":"e5fc97516f38a5997c514318c857173cc7ebfc9b06b0b0517127bdc02c18c625","src/decoder/serde.rs":"7cae3e1d2795d53c351f98b7d010dc4d579ac93f9e3e44dc307b9eca2186f2cc","src/display.rs":"2a9fea5f27328412dd3168571a94645711714261fef1f9348e4cab56138a640e","src/encoder/mod.rs":"b7af37d6cab330bb749717274d821cf34599cf210f19daa431fb0fdb0ef3c2b8","src/encoder/rustc_serialize.rs":"d444ea1995d4cba19ab6e17eabc9246070787a58d2b430997b55d6e1a88a5c30","src/encoder/serde.rs":"eb1d0237fa5d1d4367bcf3cff287cb10b9467d05ab817a696d7a6316350cdd11","src/lib.rs":"6c7e98f283e3263587c628c216ea2274375ab81286070937cec7cc79d82eed01","src/parser.rs":"6bb7694a3ad138b1ffafa6d9fc1dec342ea34af0219b2f560f3777014a21481b","tests/README.md":"3e7d07d64c34e117c3d862ee12e4947af8c133fb0b53f6f0de43cc3bfa5057b8","tests/formatting.rs":"bc672504cedbf956de645073baab876baf06c7f2bc120db20d27b1446c8b5f4b","tests/invalid-encoder/array-mixed-types-ints-and-floats.json":"206d2a353153efbcee74e7ee7b0f852e7a948cfb88417f74607b3ad6f020e373","tests/invalid.rs":"ef9b613246634673e43f95b8688f275d22726f41fb9ecb824504217e6f5d5c58","tests/invalid/array-mixed-types-arrays-and-ints.toml":"c1547b686357c7a865e333a7ce7eed1e30743ebc4daac8ea6148bdd84b7e4dc7","tests/invalid/array-mixed-types-ints-and-floats.toml":"baa235fc168869716680955fd5bdafab30b6fa9b3d09185086261a56ef12960e","tests/invalid/array-mixed-types-strings-and-ints.toml":"4440057ed90d4461db0be55cfd71299cad96b601d5faec2140666242f6fde147","tests/invalid/datetime-malformed-no-leads.toml":"1fa6bf72ea0b96be835ac031408f7acfd0b8d18d5f54b4c0fce8136aad27d22e","tests/invalid/datetime-malformed-no-secs.toml":"b9c30b7fa1847c80e381d68cc79834eefbb8813cd0eff465fb7cbe0733df429b","tests/invalid/datetime-malformed-no-t.toml":"490a46d2e707ef4f87987ec12a22afa5a71c97c5eaa0f4201a174c47846c6a4a","tests/invalid/datetime-malformed-no-z.toml":"6ca48b84c444b3ca51a480aa9688dd1044861010aff674a67e5cec34fd2eb489","tests/invalid/datetime-malformed-with-milli.toml":"62bfd0a6645bcb3f78211523e5673a3d1fa726d9e942c1643df243d6fba474c8","tests/invalid/duplicate-key-table.toml":"a896ea2180d16fcdd4f6c30aa27529b5b29e7e195a4e7a9944343028783602e9","tests/invalid/duplicate-keys.toml":"4bb0a65c22e7704893a2a51334eb2518af702850ef59aeecd5226e7b26bc07ec","tests/invalid/duplicate-tables.toml":"23b16ce26e1155ee6bf1fff559701dce86475c6a2878536b61f6b7e68be340de","tests/invalid/empty-implicit-table.toml":"d6026110dc0dee7babd69592218819328caa425f48cc879e895b29e48550c06c","tests/invalid/empty-table.toml":"37517e5f3dc66819f61f5a7bb8ace1921282415f10551d2defa5c3eb0985b570","tests/invalid/float-no-leading-zero.toml":"159654461094c938574ba2d2d09baa3d3c387dd6ed024fd411530c0573a1ec42","tests/invalid/float-no-trailing-digits.toml":"64e4f336186cd096be2804532dbd694dd50ea551d292a9cdbf0bef2abf227101","tests/invalid/key-after-array.toml":"314af33770170b53bf2ec3be43ea1609d981c81d62c968052499b85ed54ccce8","tests/invalid/key-after-table.toml":"ed0dcf38f003d184dd18d1518702da0115cbfb05a5a28cbcf42de2f9bdee05fa","tests/invalid/key-empty.toml":"4303477abf4c0b920b42e96edd61caecf9c1f2d5d97f56af876854cd725aff3c","tests/invalid/key-hash.toml":"cd2a2eba6032d32c829633d3cd2778aeba81f5ff554e69f62af6557d1dc712f6","tests/invalid/key-newline.toml":"06a313a6bd70c2db6a1f5bda479d854d8f87e037e3cabf18fb5db822466ffcac","tests/invalid/key-open-bracket.toml":"52dea939022949290e3a19f1291d15605429344dce3cd1aa1f1568ecad8ca365","tests/invalid/key-single-open-bracket.toml":"245843abef9e72e7efac30138a994bf6301e7e1d7d7042a33d42e863d2638811","tests/invalid/key-space.toml":"b4e336d07c27fb3d0f0a6e50b733e1546202dfd58aaf2f7956f56fd6f075b0a1","tests/invalid/key-start-bracket.toml":"3bd3748a9df1d25ab2661330a3da187bd4da3958292bbf0e8b59d7963634dd87","tests/invalid/key-two-equals.toml":"3ac0c4e339d47c86e57564e43147b772ae83933b78083dc78d0ef77e231df3f1","tests/invalid/string-bad-byte-escape.toml":"c665dcec7c02f442c4fdc80423698eed2376ce65779cf855371772293bec2927","tests/invalid/string-bad-escape.toml":"eeca691fbba3d270f58ae2953d2d1369a773e619e39d8c11f38d6bf6f8472e82","tests/invalid/string-byte-escapes.toml":"4a4604b32971de3a252cd01d2997b450972c3ec9030cf22a070d49c57f050da4","tests/invalid/string-no-close.toml":"bb2eaf96eb9f83a52bd0772abb313060a06b94f650efeb45edce774622686882","tests/invalid/table-array-implicit.toml":"9b841ea64d68be4deb54f67fc807b05fd235452ee563ffa7de69dbca64b2f7dd","tests/invalid/table-array-malformed-bracket.toml":"164f641b2628bf04f8202d9746a360a4a243faca1408dc2ecd0c0fdd2d1c2c27","tests/invalid/table-array-malformed-empty.toml":"56ca2a15019cf5c3555041a191f983dc72b1678f0de0afd1a7b8f46ed7970420","tests/invalid/table-empty.toml":"37517e5f3dc66819f61f5a7bb8ace1921282415f10551d2defa5c3eb0985b570","tests/invalid/table-nested-brackets-close.toml":"991e1210f81e24abcd735988f0d960d4ee94d2ec3b133c6fea6e24932d91c507","tests/invalid/table-nested-brackets-open.toml":"8fb569fc90fa606ae94708ee2bf205bff8db8a023624b3e52ef6b2c1a98ba1c6","tests/invalid/table-whitespace.toml":"2c2db1259adc641df0459e896d349d3db60965d5368d5c8ed50aedd3bc88f040","tests/invalid/table-with-pound.toml":"d8070437f07bd115ac8006c61e286401bd3be88728a62264796e757121750ecd","tests/invalid/text-after-array-entries.toml":"2530cace13292313983b90b01d63e4b8ac484809e7ef0ac79904923573eda7ec","tests/invalid/text-after-integer.toml":"6168ed823a135b8914956b04307aeec2347b10eb1aa79008406d7b547cbde682","tests/invalid/text-after-string.toml":"1771987dd679e1cc181cf53406ba313fdc3413a081d17a93da6041bf6ccccf5e","tests/invalid/text-after-table.toml":"f27ae56bb0b42d3af4c813392857afdfeb4bf8ab77ff896cd93ba32cf1a21b26","tests/invalid/text-before-array-separator.toml":"192d28699573abbdc521797576d4885adf756336c3e76971f10270603c957464","tests/invalid/text-in-array.toml":"50d7b16d7a03d470f1a907eebfeb156d0c696e6f9a8c734a5e4caa2365f54654","tests/valid.rs":"d2199e449a1f6b5aab1914f7b739ae0f496657ca249aa3b9bcdd85b89075e4e4","tests/valid/array-empty.json":"4ed46e8aa3586a7ddd9097cda38919699860052f188880de18e12d4acbee5307","tests/valid/array-empty.toml":"769faa42a690b02ad1b573277f0d793a4a38a7ecf30b9db67bf9836fe2b7778c","tests/valid/array-nospaces.json":"7c82b474797871488c2b522e9b852772a78c681a86900f780f7a0be4f901e1ec","tests/valid/array-nospaces.toml":"01fba63551b1051f7e117c9551c488b293bd3cd4745cbeec6b3709c32f2a3a64","tests/valid/arrays-hetergeneous.json":"dac4702412c90d5ddd6b898c3657c71d782d0aca46e5b9ca19cc694d3e226c0f","tests/valid/arrays-hetergeneous.toml":"361ae2e8470b47b12b336eb61eedd09abb20e216fbeb582b46d16a2831adda4d","tests/valid/arrays-nested.json":"34d6f8fd770f0728f38dbf0d686bed2c218bc16da978290c0208d3bf3704bdec","tests/valid/arrays-nested.toml":"a5941a01a2ba2fa179a3885039a5f81ca6c9876b2e8bea7b880563238be9f004","tests/valid/arrays.json":"315fff195a7d4c80e867e1f14c12a23e36dcc666e8de36138249b15e99bdd4dd","tests/valid/arrays.toml":"2d3c91b77d4f6a65a6a5a2c5ad521dbe86cc2f0ff389dfe58e8c34275cdc35c7","tests/valid/bool.json":"bb608b912fe4d89cb2186da957c10951780575bb34b2f43305335c745eff049c","tests/valid/bool.toml":"3c06ad4dce7430326f5f867105b2e9382def90cccb3ecb69f657c0b88974ab04","tests/valid/comments-everywhere.json":"800f8efd86d1bab4f91f0e367da52a2465e1480387df892561ed8948fd1a38c3","tests/valid/comments-everywhere.toml":"8636108c34f50d45244b142d342234b7535e01fba2db2d2ffed3430223009cea","tests/valid/datetime.json":"94f130c3b2a5f30c625a3a3168b9dfe52aa109b470c4e077f352b3dd79382a69","tests/valid/datetime.toml":"4e1b71ba31a1feef80a1e436225aa9c5d291bf780f558e7cfa76998fe2a29e08","tests/valid/empty.json":"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356","tests/valid/empty.toml":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","tests/valid/example-bom.toml":"50f3607be97de2f894ccd41a29d3a8a1b1f430982e5ab5bf43047874837f6a42","tests/valid/example-v0.3.0.json":"ec02332eb59dab93a50560771e4b01b972a29d93b6dca8954728c0631e1799a0","tests/valid/example-v0.3.0.toml":"aba9349588c1ba6af2a3ad0c1db2c3d311dca66b64f654480340a0823dfd4546","tests/valid/example-v0.4.0.json":"8b967b246ca2383172eaaecf790b2115a18020f63c70d0848d1dc25fc1fed5a9","tests/valid/example-v0.4.0.toml":"47ee4c4cd83637cd09aca6518f88c8ed56acc2b3022e5ea53d9121e5d35335ed","tests/valid/example.json":"c57fabb1be0ae7ed140fe7ae5082051571c85180204b8ae8d8da1e86133278c9","tests/valid/example.toml":"6f02b2a52ea63c70b629e41e06a8eb1eb4aab359ab966a7a397b248e13849c9c","tests/valid/example2.json":"de89432e78f0a074aae54650fedf151ceca3b0ccb148b8a66e18e2ed68024ba2","tests/valid/example2.toml":"c389eeb485fb7cb9445d617a9a0f8ba70049f08d66cf6b6f2a9a986574295de1","tests/valid/float.json":"9676c13fef00a01bc729456bfe27f1b24a1bd059c9a5913bb0b0401e976a0aab","tests/valid/float.toml":"b6784f554aa38bb210f0905c3bafdfae6db723a4f53288fb07febc66451bbc2d","tests/valid/hard_example.json":"8d170e73e156b8b6be559246880e9cb6a79b36f63d14bc97e3bdf2f2091e7a17","tests/valid/hard_example.toml":"cd3b89f8917a44f944b12fe47f69f86bb39f17db85d1a081bf0c134831eb90f9","tests/valid/implicit-and-explicit-after.json":"6dcaeaf8ee3479bf2cd5c14eb58970757175aaefab014bce9acb0b85e7bf9dd0","tests/valid/implicit-and-explicit-after.toml":"0599b16822764cdb1c3d3cf53f71186b97afc9f60f8d58358a4a89fe4d9477c3","tests/valid/implicit-and-explicit-before.json":"6dcaeaf8ee3479bf2cd5c14eb58970757175aaefab014bce9acb0b85e7bf9dd0","tests/valid/implicit-and-explicit-before.toml":"33435dddb68144b652ca5f5e0c4c53e4f7b3ca0166f9b944eda55f8d76ed2871","tests/valid/implicit-groups.json":"fc2bb43ec20c8c9148c8a70490b3a054506932c41687222ea11faae47eafb723","tests/valid/implicit-groups.toml":"248b3e8272ec43ce4af872981acde10628eeae73537ed6763a1f4245f5a9610c","tests/valid/integer.json":"0fc2d0cb1fb46d7805c1007b1fa4c46a65b273e56ae9d751df686e81d3a3354f","tests/valid/integer.toml":"74b964eb9561be6aa7266f6034cee1cd0657bdab8043a5ec9da33d9b184345da","tests/valid/key-equals-nospace.json":"b9878ee3585d1b48710a4bc09f2163b910ea71a2bfdaa8f1da68e599e8b30f47","tests/valid/key-equals-nospace.toml":"24cab0d01b67b184d0a737de3a5b5d47b8b69b36203273296d5ef763f7fdcf68","tests/valid/key-space.json":"30be539b01420be5cedc9078b88c3279bbef7c0bdde36ba8249ed8906112d5c7","tests/valid/key-space.toml":"9e9459b8cfebc404cf93d77c2d4082cadcd57165a2f9ce9cb35d1d12dc94a8c0","tests/valid/key-special-chars.json":"8bbebb20660d93efa73707bdb09e87a43c2b31c18f13df6388c701a1bc7cab8c","tests/valid/key-special-chars.toml":"c6cb0ba12d32f03cda4206097a1edb27cd154215d72e1c5791cc4f8dff2270b3","tests/valid/key-with-pound.json":"ea4dd79d0ad2a824bcce5c4c194d7fae82a7584a2ab7c0d83d6ddaae6130973e","tests/valid/key-with-pound.toml":"c334f676e19c01b96111277248654358cc8222fd0639aecaf429407e63b6a2dc","tests/valid/long-float.json":"7e103f56e490aa1b1fe5a762000ceb1f8c599f7d81aa215c90f5da41ab4ba6db","tests/valid/long-float.toml":"4d23f706f2a0d241840f6ea78657820c9c7b904c0c3c16828f8cc2574d7c8761","tests/valid/long-integer.json":"9ed7976639f0c2cd7f112584e2f5d272e92569be7135ea5bb9ba597abaff0767","tests/valid/long-integer.toml":"309f94be7ff5fd6f6dedbd257a1e6c171cb71aa74409ff3f8babda951f89d687","tests/valid/multiline-string.json":"3d67a8b992b85e9a2e58b77a1b76dc29745a9c2b4a362ad517786fed541948d7","tests/valid/multiline-string.toml":"7d6650009eb31a03d5b40b20712ef0157e9b787d9c966e66c38873a34e3b861c","tests/valid/raw-multiline-string.json":"4c95e34497433168cac25eb4132485c3bd13c35cad9d13d7becf7f90469dacca","tests/valid/raw-multiline-string.toml":"c724151024ccde432e0ec0d4ba60a5320d77841008116324c39516b8cbb94f4d","tests/valid/raw-string.json":"19268797aff8dfa28437d6ed8f9d813035f6eee50aade5fc774ba12b3290216b","tests/valid/raw-string.toml":"16510e05d477a0856ebaf38cacd0e9e18f02ab63ac7bd1a2eabbaa47a54d0e49","tests/valid/string-empty.json":"ece7d01326742a46e37d6404175118c0a91a2494f7ba2290bbc1d6f990ddb65b","tests/valid/string-empty.toml":"251e9e4052ede79f6b2462e71f73e0b7c9f5927484f6f77f0cd8b3c839b0c13b","tests/valid/string-escapes.json":"3d516f03cf94d5b5ee6b0887b8d37fdf21152752f049f5922a24adaacb5b8c35","tests/valid/string-escapes.toml":"86b1569e10fec91301709ad747012f0f42395050a2343b42aca450e001120f7a","tests/valid/string-simple.json":"622676e347676cce9f9733210acbd8056ce77a0588772ffd6efb05bb4e81b571","tests/valid/string-simple.toml":"ae74db09acea3be2ccae7f854f7b6f7c874ace9d4d87bf2f437b059a7d38a464","tests/valid/string-with-pound.json":"458a0add71536c1df5e1ed3ee5483c6eb48578abce0b0ebcdf75ea20d41ed6f4","tests/valid/string-with-pound.toml":"1aee397830d9ad2a93d41ee9c435acdbfef3758d1bb7c48bca7424fbbec89466","tests/valid/table-array-implicit.json":"3f7d3cdb468de67bc183162805d9c753ef5772f6f363ac2a26598387a5d991ea","tests/valid/table-array-implicit.toml":"66bcb030899a95e9a25ec44b7c9291b02f80ecbc324061cf1cd93223a2919f21","tests/valid/table-array-many.json":"3f21243eeb71ca3e5657a43559c806e12e3833e9f74c43c0c12aad9b0c853e4c","tests/valid/table-array-many.toml":"8d8ea546f954a81ca149a02147ae5f4bf075151cfcd530e62dcf05a04d843ffb","tests/valid/table-array-nest.json":"0a987d2bf1d5bc85f5c9433f23d389063600682a68538b6e57938a3c572959e4","tests/valid/table-array-nest.toml":"71b9c753bf773f232ac71cb2469a54ee0110ff137829045421edd7c5a64d6b6a","tests/valid/table-array-one.json":"7dc0ea3f7f843f7dc7443e68af43a1e5130a5fbae8a27fb02d8d92fa2487888e","tests/valid/table-array-one.toml":"4c478aea2dd7dfcfda682503b49e610f0fa4ce85a3b3cd0bc9041d4959e3626a","tests/valid/table-empty.json":"11e43e212d87b3b2547a5f2541f4091a3d2f6ba00b2a2004b07e02734e927ea7","tests/valid/table-empty.toml":"24d4941e67d5965d270eaebdb9816b994311e0f2f0e79ef6bb626f362c52842e","tests/valid/table-sub-empty.json":"85cca6d48a5993c4f207c21ed96652af4f50b6936b0807659c75317c1763b6db","tests/valid/table-sub-empty.toml":"ae92e90a806ffefcbf8cda83cb82acf7448f75efa50dcfb5e2384632d36471b3","tests/valid/table-whitespace.json":"ad84ac49a6d13f7c4a8af0e1e71fd7ff2a446aa16a34c21a809a0850dfa76e73","tests/valid/table-whitespace.toml":"2f15dafb263d2771671db299f6202b4b78d293aec1ded7641ec7eb1cb024b52c","tests/valid/table-with-pound.json":"151e76606efe77500cbb0aa8fcf8ccfadb124d533bb79a9caa62e937b826e676","tests/valid/table-with-pound.toml":"a1f86c2e3789cc89500ec1d5eac2ec0bdb94bf445fddc3cab558b5228f3aba56","tests/valid/unicode-escape.json":"ebbf81930fa92ea5822bb1ed808b798731abe5c97e64f6471e1e86878d79037c","tests/valid/unicode-escape.toml":"aa26e55e5526a0d00ad68eca774d5c43cbcdf24ae753e0219bf3ab31b9e628b8","tests/valid/unicode-literal.json":"1dd42756384b954955815dc3e906db64b4cd2c0c094f9b3c86633d1652d6d79d","tests/valid/unicode-literal.toml":"bffc6c3d4757de31d0cbfd7b8dc591edd2910fe8a4e1c46bbee422dddc841003"},"package":"736b60249cb25337bc196faa43ee12c705e426f3d55c214d73a4e7be06f92cb4"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/toml/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-target
-Cargo.lock
deleted file mode 100644
--- a/third_party/rust/toml/.travis.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-language: rust
-rust:
- - stable
- - beta
- - nightly
-sudo: false
-before_script:
- - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
-script:
- - cargo build --verbose
- - cargo build --verbose --no-default-features
- - cargo build --verbose --features serde --no-default-features
- - cargo test --verbose --features serde
- - cargo test --verbose --manifest-path serde-tests/Cargo.toml
- - rustdoc --test README.md -L target
- - cargo doc --no-deps
-after_success:
- - travis-cargo --only nightly doc-upload
- - travis-cargo coveralls --no-sudo
-env:
- global:
- secure: LZMkQQJT5LqLQQ8JyakjvHNqqMPy8lm/SyC+H5cKUVI/xk7xRuti4eKY937N8uSmbff2m9ZYlG6cNwIOfk/nWn8YsqxA8Wg/xugubWzqGuqu+NQ4IZVa7INT2Fiqyk5SPCh8B5fo2x7OBJ24SCkWb2p8bEWAuW8XdZZOdmi3H2I=
-notifications:
- email:
- on_success: never
-addons:
- apt:
- packages:
- - libcurl4-openssl-dev
- - libelf-dev
- - libdw-dev
deleted file mode 100644
--- a/third_party/rust/toml/Cargo.toml
+++ /dev/null
@@ -1,26 +0,0 @@
-[package]
-
-name = "toml"
-version = "0.2.1"
-authors = ["Alex Crichton <alex@alexcrichton.com>"]
-license = "MIT/Apache-2.0"
-readme = "README.md"
-keywords = ["encoding"]
-repository = "https://github.com/alexcrichton/toml-rs"
-homepage = "https://github.com/alexcrichton/toml-rs"
-documentation = "http://alexcrichton.com/toml-rs"
-description = """
-A native Rust encoder and decoder of TOML-formatted files and streams. Provides
-implementations of the standard Encodable/Decodable traits for TOML data to
-facilitate deserializing and serializing Rust structures.
-"""
-
-[dependencies]
-rustc-serialize = { optional = true, version = "0.3.0" }
-serde = { optional = true, version = "0.8" }
-
-[features]
-default = ["rustc-serialize"]
-
-[dev-dependencies]
-rustc-serialize = "0.3"
deleted file mode 100644
--- a/third_party/rust/toml/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/toml/LICENSE-MIT
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2014 Alex Crichton
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/toml/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# toml-rs
-
-[![Build Status](https://travis-ci.org/alexcrichton/toml-rs.svg?branch=master)](https://travis-ci.org/alexcrichton/toml-rs)
-[![Coverage Status](https://coveralls.io/repos/alexcrichton/toml-rs/badge.svg?branch=master&service=github)](https://coveralls.io/github/alexcrichton/toml-rs?branch=master)
-
-[Documentation](http://alexcrichton.com/toml-rs)
-
-A [TOML][toml] decoder and encoder for Rust. This library is currently compliant with
-the v0.4.0 version of TOML. This library will also likely continue to stay up to
-date with the TOML specification as changes happen.
-
-[toml]: https://github.com/toml-lang/toml
-
-```toml
-# Cargo.toml
-[dependencies]
-toml = "0.2"
-```
-
-# License
-
-`toml-rs` is primarily distributed under the terms of both the MIT license and
-the Apache License (Version 2.0), with portions covered by various BSD-like
-licenses.
-
-See LICENSE-APACHE, and LICENSE-MIT for details.
deleted file mode 100644
--- a/third_party/rust/toml/examples/toml2json.rs
+++ /dev/null
@@ -1,57 +0,0 @@
-#![deny(warnings)]
-
-extern crate toml;
-extern crate rustc_serialize;
-
-use std::fs::File;
-use std::env;
-use std::io;
-use std::io::prelude::*;
-
-use toml::Value;
-use rustc_serialize::json::Json;
-
-fn main() {
- let mut args = env::args();
- let mut input = String::new();
- let filename = if args.len() > 1 {
- let name = args.nth(1).unwrap();
- File::open(&name).and_then(|mut f| {
- f.read_to_string(&mut input)
- }).unwrap();
- name
- } else {
- io::stdin().read_to_string(&mut input).unwrap();
- "<stdin>".to_string()
- };
-
- let mut parser = toml::Parser::new(&input);
- let toml = match parser.parse() {
- Some(toml) => toml,
- None => {
- for err in &parser.errors {
- let (loline, locol) = parser.to_linecol(err.lo);
- let (hiline, hicol) = parser.to_linecol(err.hi);
- println!("{}:{}:{}-{}:{} error: {}",
- filename, loline, locol, hiline, hicol, err.desc);
- }
- return
- }
- };
- let json = convert(Value::Table(toml));
- println!("{}", json.pretty());
-}
-
-fn convert(toml: Value) -> Json {
- match toml {
- Value::String(s) => Json::String(s),
- Value::Integer(i) => Json::I64(i),
- Value::Float(f) => Json::F64(f),
- Value::Boolean(b) => Json::Boolean(b),
- Value::Array(arr) => Json::Array(arr.into_iter().map(convert).collect()),
- Value::Table(table) => Json::Object(table.into_iter().map(|(k, v)| {
- (k, convert(v))
- }).collect()),
- Value::Datetime(dt) => Json::String(dt),
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/src/decoder/mod.rs
+++ /dev/null
@@ -1,240 +0,0 @@
-use std::error;
-use std::fmt;
-
-use std::collections::{btree_map, BTreeMap};
-use std::iter::Peekable;
-
-use Value;
-use self::DecodeErrorKind::*;
-
-#[cfg(feature = "rustc-serialize")] mod rustc_serialize;
-#[cfg(feature = "serde")] mod serde;
-
-/// A structure to transform TOML values into Rust values.
-///
-/// This decoder implements the serialization `Decoder` interface, allowing
-/// `Decodable` types to be generated by this decoder. The input is any
-/// arbitrary TOML value.
-pub struct Decoder {
- /// The TOML value left over after decoding. This can be used to inspect
- /// whether fields were decoded or not.
- pub toml: Option<Value>,
- cur_field: Option<String>,
-
- // These aren't used if serde is in use
- #[cfg_attr(feature = "serde", allow(dead_code))]
- cur_map: Peekable<btree_map::IntoIter<String, Value>>,
- #[cfg_attr(feature = "serde", allow(dead_code))]
- leftover_map: ::Table,
-}
-
-/// Description for errors which can occur while decoding a type.
-#[derive(PartialEq, Debug)]
-pub struct DecodeError {
- /// Field that this error applies to.
- pub field: Option<String>,
- /// The type of error which occurred while decoding,
- pub kind: DecodeErrorKind,
-}
-
-/// Enumeration of possible errors which can occur while decoding a structure.
-#[derive(PartialEq, Debug)]
-pub enum DecodeErrorKind {
- /// An error flagged by the application, e.g. value out of range
- ApplicationError(String),
- /// A field was expected, but none was found.
- ExpectedField(/* type */ Option<&'static str>),
- /// A field was found, but it was not an expected one.
- UnknownField,
- /// A field was found, but it had the wrong type.
- ExpectedType(/* expected */ &'static str, /* found */ &'static str),
- /// The nth map key was expected, but none was found.
- ExpectedMapKey(usize),
- /// The nth map element was expected, but none was found.
- ExpectedMapElement(usize),
- /// An enum decoding was requested, but no variants were supplied
- NoEnumVariants,
- /// The unit type was being decoded, but a non-zero length string was found
- NilTooLong,
- /// There was an error with the syntactical structure of the TOML.
- SyntaxError,
- /// A custom error was generated when decoding.
- CustomError(String),
- /// The end of the TOML input was reached too soon
- EndOfStream,
- /// Produced by serde ...
- InvalidType(&'static str),
-}
-
-/// Decodes a TOML value into a decodable type.
-///
-/// This function will consume the given TOML value and attempt to decode it
-/// into the type specified. If decoding fails, `None` will be returned. If a
-/// finer-grained error is desired, then it is recommended to use `Decodable`
-/// directly.
-#[cfg(feature = "rustc-serialize")]
-pub fn decode<T: ::rustc_serialize::Decodable>(toml: Value) -> Option<T> {
- ::rustc_serialize::Decodable::decode(&mut Decoder::new(toml)).ok()
-}
-
-/// Decodes a TOML value into a decodable type.
-///
-/// This function will consume the given TOML value and attempt to decode it
-/// into the type specified. If decoding fails, `None` will be returned. If a
-/// finer-grained error is desired, then it is recommended to use `Decodable`
-/// directly.
-#[cfg(all(not(feature = "rustc-serialize"), feature = "serde"))]
-pub fn decode<T: ::serde::Deserialize>(toml: Value) -> Option<T> {
- ::serde::Deserialize::deserialize(&mut Decoder::new(toml)).ok()
-}
-
-/// Decodes a string into a toml-encoded value.
-///
-/// This function will parse the given string into a TOML value, and then parse
-/// the TOML value into the desired type. If any error occurs, `None` is
-/// returned.
-///
-/// If more fine-grained errors are desired, these steps should be driven
-/// manually.
-#[cfg(feature = "rustc-serialize")]
-pub fn decode_str<T: ::rustc_serialize::Decodable>(s: &str) -> Option<T> {
- ::Parser::new(s).parse().and_then(|t| decode(Value::Table(t)))
-}
-
-/// Decodes a string into a toml-encoded value.
-///
-/// This function will parse the given string into a TOML value, and then parse
-/// the TOML value into the desired type. If any error occurs, `None` is
-/// returned.
-///
-/// If more fine-grained errors are desired, these steps should be driven
-/// manually.
-#[cfg(all(not(feature = "rustc-serialize"), feature = "serde"))]
-pub fn decode_str<T: ::serde::Deserialize>(s: &str) -> Option<T> {
- ::Parser::new(s).parse().and_then(|t| decode(Value::Table(t)))
-}
-
-impl Decoder {
- /// Creates a new decoder, consuming the TOML value to decode.
- ///
- /// This decoder can be passed to the `Decodable` methods or driven
- /// manually.
- pub fn new(toml: Value) -> Decoder {
- Decoder::new_empty(Some(toml), None)
- }
-
- fn sub_decoder(&self, toml: Option<Value>, field: &str) -> Decoder {
- let cur_field = if field.is_empty() {
- self.cur_field.clone()
- } else {
- match self.cur_field {
- None => Some(field.to_string()),
- Some(ref s) => Some(format!("{}.{}", s, field))
- }
- };
- Decoder::new_empty(toml, cur_field)
- }
-
- fn new_empty(toml: Option<Value>, cur_field: Option<String>) -> Decoder {
- Decoder {
- toml: toml,
- cur_field: cur_field,
- leftover_map: BTreeMap::new(),
- cur_map: BTreeMap::new().into_iter().peekable(),
- }
- }
-
- fn err(&self, kind: DecodeErrorKind) -> DecodeError {
- DecodeError {
- field: self.cur_field.clone(),
- kind: kind,
- }
- }
-
- fn mismatch(&self, expected: &'static str,
- found: &Option<Value>) -> DecodeError{
- match *found {
- Some(ref val) => self.err(ExpectedType(expected, val.type_str())),
- None => self.err(ExpectedField(Some(expected))),
- }
- }
-}
-
-impl fmt::Display for DecodeError {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- try!(match self.kind {
- ApplicationError(ref err) => {
- write!(f, "{}", err)
- }
- ExpectedField(expected_type) => {
- match expected_type {
- Some("table") => write!(f, "expected a section"),
- Some(e) => write!(f, "expected a value of type `{}`", e),
- None => write!(f, "expected a value"),
- }
- }
- UnknownField => write!(f, "unknown field"),
- ExpectedType(expected, found) => {
- fn humanize(s: &str) -> String {
- if s == "section" {
- "a section".to_string()
- } else {
- format!("a value of type `{}`", s)
- }
- }
- write!(f, "expected {}, but found {}",
- humanize(expected),
- humanize(found))
- }
- ExpectedMapKey(idx) => {
- write!(f, "expected at least {} keys", idx + 1)
- }
- ExpectedMapElement(idx) => {
- write!(f, "expected at least {} elements", idx + 1)
- }
- NoEnumVariants => {
- write!(f, "expected an enum variant to decode to")
- }
- NilTooLong => {
- write!(f, "expected 0-length string")
- }
- SyntaxError => {
- write!(f, "syntax error")
- }
- EndOfStream => {
- write!(f, "end of stream")
- }
- InvalidType(s) => {
- write!(f, "invalid type: {}", s)
- }
- CustomError(ref s) => {
- write!(f, "custom error: {}", s)
- }
- });
- match self.field {
- Some(ref s) => {
- write!(f, " for the key `{}`", s)
- }
- None => Ok(())
- }
- }
-}
-
-impl error::Error for DecodeError {
- fn description(&self) -> &str {
- match self.kind {
- ApplicationError(ref s) => &**s,
- ExpectedField(..) => "expected a field",
- UnknownField => "found an unknown field",
- ExpectedType(..) => "expected a type",
- ExpectedMapKey(..) => "expected a map key",
- ExpectedMapElement(..) => "expected a map element",
- NoEnumVariants => "no enum variants to decode to",
- NilTooLong => "nonzero length string representing nil",
- SyntaxError => "syntax error",
- EndOfStream => "end of stream",
- InvalidType(..) => "invalid type",
- CustomError(..) => "custom error",
- }
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/src/decoder/rustc_serialize.rs
+++ /dev/null
@@ -1,371 +0,0 @@
-use rustc_serialize;
-use std::mem;
-use std::collections::BTreeMap;
-
-use super::{Decoder, DecodeError};
-use super::DecodeErrorKind::*;
-use Value;
-
-impl rustc_serialize::Decoder for Decoder {
- type Error = DecodeError;
- fn read_nil(&mut self) -> Result<(), DecodeError> {
- match self.toml {
- Some(Value::String(ref s)) if s.is_empty() => {}
- Some(Value::String(..)) => return Err(self.err(NilTooLong)),
- ref found => return Err(self.mismatch("string", found)),
- }
- self.toml.take();
- Ok(())
- }
- fn read_usize(&mut self) -> Result<usize, DecodeError> {
- self.read_i64().map(|i| i as usize)
- }
- fn read_u64(&mut self) -> Result<u64, DecodeError> {
- self.read_i64().map(|i| i as u64)
- }
- fn read_u32(&mut self) -> Result<u32, DecodeError> {
- self.read_i64().map(|i| i as u32)
- }
- fn read_u16(&mut self) -> Result<u16, DecodeError> {
- self.read_i64().map(|i| i as u16)
- }
- fn read_u8(&mut self) -> Result<u8, DecodeError> {
- self.read_i64().map(|i| i as u8)
- }
- fn read_isize(&mut self) -> Result<isize, DecodeError> {
- self.read_i64().map(|i| i as isize)
- }
- fn read_i64(&mut self) -> Result<i64, DecodeError> {
- match self.toml {
- Some(Value::Integer(i)) => { self.toml.take(); Ok(i) }
- ref found => Err(self.mismatch("integer", found)),
- }
- }
- fn read_i32(&mut self) -> Result<i32, DecodeError> {
- self.read_i64().map(|i| i as i32)
- }
- fn read_i16(&mut self) -> Result<i16, DecodeError> {
- self.read_i64().map(|i| i as i16)
- }
- fn read_i8(&mut self) -> Result<i8, DecodeError> {
- self.read_i64().map(|i| i as i8)
- }
- fn read_bool(&mut self) -> Result<bool, DecodeError> {
- match self.toml {
- Some(Value::Boolean(b)) => { self.toml.take(); Ok(b) }
- ref found => Err(self.mismatch("bool", found)),
- }
- }
- fn read_f64(&mut self) -> Result<f64, DecodeError> {
- match self.toml {
- Some(Value::Float(f)) => { self.toml.take(); Ok(f) },
- ref found => Err(self.mismatch("float", found)),
- }
- }
- fn read_f32(&mut self) -> Result<f32, DecodeError> {
- self.read_f64().map(|f| f as f32)
- }
- fn read_char(&mut self) -> Result<char, DecodeError> {
- let ch = match self.toml {
- Some(Value::String(ref s)) if s.chars().count() == 1 =>
- s.chars().next().unwrap(),
- ref found => return Err(self.mismatch("string", found)),
- };
- self.toml.take();
- Ok(ch)
- }
- fn read_str(&mut self) -> Result<String, DecodeError> {
- match self.toml.take() {
- Some(Value::String(s)) => Ok(s),
- found => {
- let err = Err(self.mismatch("string", &found));
- self.toml = found;
- err
- }
- }
- }
-
- // Compound types:
- fn read_enum<T, F>(&mut self, _name: &str, f: F)
- -> Result<T, DecodeError>
- where F: FnOnce(&mut Decoder) -> Result<T, DecodeError>
- {
- f(self)
- }
-
- fn read_enum_variant<T, F>(&mut self, names: &[&str], mut f: F)
- -> Result<T, DecodeError>
- where F: FnMut(&mut Decoder, usize) -> Result<T, DecodeError>
- {
- // When decoding enums, this crate takes the strategy of trying to
- // decode the current TOML as all of the possible variants, returning
- // success on the first one that succeeds.
- //
- // Note that fidelity of the errors returned here is a little nebulous,
- // but we try to return the error that had the relevant field as the
- // longest field. This way we hopefully match an error against what was
- // most likely being written down without losing too much info.
- let mut first_error = None::<DecodeError>;
- for i in 0..names.len() {
- let mut d = self.sub_decoder(self.toml.clone(), "");
- match f(&mut d, i) {
- Ok(t) => {
- self.toml = d.toml;
- return Ok(t)
- }
- Err(e) => {
- if let Some(ref first) = first_error {
- let my_len = e.field.as_ref().map(|s| s.len());
- let first_len = first.field.as_ref().map(|s| s.len());
- if my_len <= first_len {
- continue
- }
- }
- first_error = Some(e);
- }
- }
- }
- Err(first_error.unwrap_or_else(|| self.err(NoEnumVariants)))
- }
- fn read_enum_variant_arg<T, F>(&mut self, _a_idx: usize, f: F)
- -> Result<T, DecodeError>
- where F: FnOnce(&mut Decoder) -> Result<T, DecodeError>
- {
- f(self)
- }
-
- fn read_enum_struct_variant<T, F>(&mut self, _names: &[&str], _f: F)
- -> Result<T, DecodeError>
- where F: FnMut(&mut Decoder, usize) -> Result<T, DecodeError>
- {
- panic!()
- }
- fn read_enum_struct_variant_field<T, F>(&mut self,
- _f_name: &str,
- _f_idx: usize,
- _f: F)
- -> Result<T, DecodeError>
- where F: FnOnce(&mut Decoder) -> Result<T, DecodeError>
- {
- panic!()
- }
-
- fn read_struct<T, F>(&mut self, _s_name: &str, _len: usize, f: F)
- -> Result<T, DecodeError>
- where F: FnOnce(&mut Decoder) -> Result<T, DecodeError>
- {
- match self.toml {
- Some(Value::Table(..)) => {
- let ret = try!(f(self));
- match self.toml {
- Some(Value::Table(ref t)) if t.is_empty() => {}
- _ => return Ok(ret)
- }
- self.toml.take();
- Ok(ret)
- }
- ref found => Err(self.mismatch("table", found)),
- }
- }
- fn read_struct_field<T, F>(&mut self, f_name: &str, _f_idx: usize, f: F)
- -> Result<T, DecodeError>
- where F: FnOnce(&mut Decoder) -> Result<T, DecodeError>
- {
- let field = f_name.to_string();
- let toml = match self.toml {
- Some(Value::Table(ref mut table)) => {
- table.remove(&field)
- .or_else(|| table.remove(&f_name.replace("_", "-")))
- },
- ref found => return Err(self.mismatch("table", found)),
- };
- let mut d = self.sub_decoder(toml, f_name);
- let ret = try!(f(&mut d));
- if let Some(value) = d.toml {
- if let Some(Value::Table(ref mut table)) = self.toml {
- table.insert(field, value);
- }
- }
- Ok(ret)
- }
-
- fn read_tuple<T, F>(&mut self, tuple_len: usize, f: F)
- -> Result<T, DecodeError>
- where F: FnOnce(&mut Decoder) -> Result<T, DecodeError>
- {
- self.read_seq(move |d, len| {
- assert!(len == tuple_len,
- "expected tuple of length `{}`, found tuple \
- of length `{}`", tuple_len, len);
- f(d)
- })
- }
- fn read_tuple_arg<T, F>(&mut self, a_idx: usize, f: F)
- -> Result<T, DecodeError>
- where F: FnOnce(&mut Decoder) -> Result<T, DecodeError>
- {
- self.read_seq_elt(a_idx, f)
- }
-
- fn read_tuple_struct<T, F>(&mut self, _s_name: &str, _len: usize, _f: F)
- -> Result<T, DecodeError>
- where F: FnOnce(&mut Decoder) -> Result<T, DecodeError>
- {
- panic!()
- }
- fn read_tuple_struct_arg<T, F>(&mut self, _a_idx: usize, _f: F)
- -> Result<T, DecodeError>
- where F: FnOnce(&mut Decoder) -> Result<T, DecodeError>
- {
- panic!()
- }
-
- // Specialized types:
- fn read_option<T, F>(&mut self, mut f: F)
- -> Result<T, DecodeError>
- where F: FnMut(&mut Decoder, bool) -> Result<T, DecodeError>
- {
- match self.toml {
- Some(..) => f(self, true),
- None => f(self, false),
- }
- }
-
- fn read_seq<T, F>(&mut self, f: F) -> Result<T, DecodeError>
- where F: FnOnce(&mut Decoder, usize) -> Result<T, DecodeError>
- {
- let len = match self.toml {
- Some(Value::Array(ref arr)) => arr.len(),
- None => 0,
- ref found => return Err(self.mismatch("array", found)),
- };
- let ret = try!(f(self, len));
- match self.toml {
- Some(Value::Array(ref mut arr)) => {
- arr.retain(|slot| slot.as_integer() != Some(0));
- if !arr.is_empty() { return Ok(ret) }
- }
- _ => return Ok(ret)
- }
- self.toml.take();
- Ok(ret)
- }
- fn read_seq_elt<T, F>(&mut self, idx: usize, f: F)
- -> Result<T, DecodeError>
- where F: FnOnce(&mut Decoder) -> Result<T, DecodeError>
- {
- let toml = match self.toml {
- Some(Value::Array(ref mut arr)) => {
- mem::replace(&mut arr[idx], Value::Integer(0))
- }
- ref found => return Err(self.mismatch("array", found)),
- };
- let mut d = self.sub_decoder(Some(toml), "");
- let ret = try!(f(&mut d));
- if let Some(toml) = d.toml {
- if let Some(Value::Array(ref mut arr)) = self.toml {
- arr[idx] = toml;
- }
- }
- Ok(ret)
- }
-
- fn read_map<T, F>(&mut self, f: F)
- -> Result<T, DecodeError>
- where F: FnOnce(&mut Decoder, usize) -> Result<T, DecodeError>
- {
- let map = match self.toml.take() {
- Some(Value::Table(table)) => table,
- found => {
- self.toml = found;
- return Err(self.mismatch("table", &self.toml))
- }
- };
- let amt = map.len();
- let prev_iter = mem::replace(&mut self.cur_map,
- map.into_iter().peekable());
- let prev_map = mem::replace(&mut self.leftover_map, BTreeMap::new());
- let ret = try!(f(self, amt));
- let leftover = mem::replace(&mut self.leftover_map, prev_map);
- self.cur_map = prev_iter;
- if !leftover.is_empty() {
- self.toml = Some(Value::Table(leftover));
- }
- Ok(ret)
- }
- fn read_map_elt_key<T, F>(&mut self, idx: usize, f: F)
- -> Result<T, DecodeError>
- where F: FnOnce(&mut Decoder) -> Result<T, DecodeError>
- {
- let key = match self.cur_map.peek().map(|p| p.0.clone()) {
- Some(k) => k,
- None => return Err(self.err(ExpectedMapKey(idx))),
- };
- let val = Value::String(key.clone());
- f(&mut self.sub_decoder(Some(val), &key))
- }
- fn read_map_elt_val<T, F>(&mut self, idx: usize, f: F)
- -> Result<T, DecodeError>
- where F: FnOnce(&mut Decoder) -> Result<T, DecodeError>
- {
- match self.cur_map.next() {
- Some((key, value)) => {
- let mut d = self.sub_decoder(Some(value), &key);
- let ret = f(&mut d);
- if let Some(toml) = d.toml.take() {
- self.leftover_map.insert(key, toml);
- }
- ret
- }
- None => Err(self.err(ExpectedMapElement(idx))),
- }
- }
-
- fn error(&mut self, err: &str) -> DecodeError {
- DecodeError {
- field: self.cur_field.clone(),
- kind: ApplicationError(err.to_string())
- }
- }
-}
-
-#[cfg(test)]
-mod tests {
- use rustc_serialize::Decodable;
- use std::collections::HashMap;
-
- use {Parser, Decoder, Value};
-
- #[test]
- fn bad_enum_chooses_longest_error() {
- #[derive(RustcDecodable)]
- #[allow(dead_code)]
- struct Foo {
- wut: HashMap<String, Bar>,
- }
-
- #[derive(RustcDecodable)]
- enum Bar {
- Simple(String),
- Detailed(Baz),
- }
-
- #[derive(RustcDecodable, Debug)]
- struct Baz {
- features: Vec<String>,
- }
-
- let s = r#"
- [wut]
- a = { features = "" }
- "#;
- let v = Parser::new(s).parse().unwrap();
- let mut d = Decoder::new(Value::Table(v));
- let err = match Foo::decode(&mut d) {
- Ok(_) => panic!("expected error"),
- Err(e) => e,
- };
- assert_eq!(err.field.as_ref().unwrap(), "wut.a.features");
-
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/src/decoder/serde.rs
+++ /dev/null
@@ -1,773 +0,0 @@
-use serde::de;
-use Value;
-use super::{Decoder, DecodeError, DecodeErrorKind};
-use std::collections::BTreeMap;
-
-macro_rules! forward_to_deserialize {
- ($(
- $name:ident ( $( $arg:ident : $ty:ty ),* );
- )*) => {
- $(
- forward_to_deserialize!{
- func: $name ( $( $arg: $ty ),* );
- }
- )*
- };
-
- (func: deserialize_enum ( $( $arg:ident : $ty:ty ),* );) => {
- fn deserialize_enum<V>(
- &mut self,
- $(_: $ty,)*
- _visitor: V,
- ) -> ::std::result::Result<V::Value, Self::Error>
- where V: ::serde::de::EnumVisitor
- {
- Err(::serde::de::Error::invalid_type(::serde::de::Type::Enum))
- }
- };
-
- (func: $name:ident ( $( $arg:ident : $ty:ty ),* );) => {
- #[inline]
- fn $name<V>(
- &mut self,
- $(_: $ty,)*
- visitor: V,
- ) -> ::std::result::Result<V::Value, Self::Error>
- where V: ::serde::de::Visitor
- {
- self.deserialize(visitor)
- }
- };
-}
-
-impl de::Deserializer for Decoder {
- type Error = DecodeError;
-
- fn deserialize<V>(&mut self, mut visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- match self.toml.take() {
- Some(Value::String(s)) => visitor.visit_string(s),
- Some(Value::Integer(i)) => visitor.visit_i64(i),
- Some(Value::Float(f)) => visitor.visit_f64(f),
- Some(Value::Boolean(b)) => visitor.visit_bool(b),
- Some(Value::Datetime(s)) => visitor.visit_string(s),
- Some(Value::Array(a)) => {
- let len = a.len();
- let iter = a.into_iter();
- visitor.visit_seq(SeqDeserializer::new(iter, len, &mut self.toml))
- }
- Some(Value::Table(t)) => {
- visitor.visit_map(MapVisitor {
- iter: t.into_iter(),
- de: self,
- key: None,
- value: None,
- })
- }
- None => Err(self.err(DecodeErrorKind::EndOfStream)),
- }
- }
-
- fn deserialize_bool<V>(&mut self, mut visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- match self.toml.take() {
- Some(Value::Boolean(b)) => visitor.visit_bool(b),
- ref found => Err(self.mismatch("bool", found)),
- }
- }
-
- fn deserialize_i8<V>(&mut self, visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- self.deserialize_i64(visitor)
- }
-
- fn deserialize_i16<V>(&mut self, visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- self.deserialize_i64(visitor)
- }
-
- fn deserialize_i32<V>(&mut self, visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- self.deserialize_i64(visitor)
- }
-
- fn deserialize_i64<V>(&mut self, mut visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- match self.toml.take() {
- Some(Value::Integer(f)) => visitor.visit_i64(f),
- ref found => Err(self.mismatch("integer", found)),
- }
- }
-
- fn deserialize_isize<V>(&mut self, visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- self.deserialize_i64(visitor)
- }
-
- fn deserialize_u8<V>(&mut self, visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- self.deserialize_i64(visitor)
- }
-
- fn deserialize_u16<V>(&mut self, visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- self.deserialize_i64(visitor)
- }
-
- fn deserialize_u32<V>(&mut self, visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- self.deserialize_i64(visitor)
- }
-
- fn deserialize_u64<V>(&mut self, visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- self.deserialize_i64(visitor)
- }
-
- fn deserialize_usize<V>(&mut self, visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- self.deserialize_i64(visitor)
- }
-
- fn deserialize_f32<V>(&mut self, visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- self.deserialize_f64(visitor)
- }
-
- fn deserialize_f64<V>(&mut self, mut visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- match self.toml.take() {
- Some(Value::Float(f)) => visitor.visit_f64(f),
- ref found => Err(self.mismatch("float", found)),
- }
- }
-
- fn deserialize_str<V>(&mut self, mut visitor: V)
- -> Result<V::Value, Self::Error>
- where V: de::Visitor,
- {
- match self.toml.take() {
- Some(Value::String(s)) => visitor.visit_string(s),
- ref found => Err(self.mismatch("string", found)),
- }
- }
-
- fn deserialize_string<V>(&mut self, visitor: V)
- -> Result<V::Value, Self::Error>
- where V: de::Visitor,
- {
- self.deserialize_str(visitor)
- }
-
- fn deserialize_char<V>(&mut self, mut visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- match self.toml.take() {
- Some(Value::String(ref s)) if s.chars().count() == 1 => {
- visitor.visit_char(s.chars().next().unwrap())
- }
- ref found => return Err(self.mismatch("string", found)),
- }
- }
-
- fn deserialize_option<V>(&mut self, mut visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor
- {
- if self.toml.is_none() {
- visitor.visit_none()
- } else {
- visitor.visit_some(self)
- }
- }
-
- fn deserialize_seq<V>(&mut self, mut visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor,
- {
- if self.toml.is_none() {
- let iter = None::<i32>.into_iter();
- visitor.visit_seq(de::value::SeqDeserializer::new(iter, 0))
- } else {
- self.deserialize(visitor)
- }
- }
-
- fn deserialize_map<V>(&mut self, mut visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor,
- {
- match self.toml.take() {
- Some(Value::Table(t)) => {
- visitor.visit_map(MapVisitor {
- iter: t.into_iter(),
- de: self,
- key: None,
- value: None,
- })
- }
- ref found => Err(self.mismatch("table", found)),
- }
- }
-
- fn deserialize_enum<V>(&mut self,
- _enum: &str,
- variants: &[&str],
- mut visitor: V) -> Result<V::Value, DecodeError>
- where V: de::EnumVisitor,
- {
- // When decoding enums, this crate takes the strategy of trying to
- // decode the current TOML as all of the possible variants, returning
- // success on the first one that succeeds.
- //
- // Note that fidelity of the errors returned here is a little nebulous,
- // but we try to return the error that had the relevant field as the
- // longest field. This way we hopefully match an error against what was
- // most likely being written down without losing too much info.
- let mut first_error = None::<DecodeError>;
-
- for variant in 0..variants.len() {
- let mut de = VariantVisitor {
- de: self.sub_decoder(self.toml.clone(), ""),
- variant: variant,
- };
-
- match visitor.visit(&mut de) {
- Ok(value) => {
- self.toml = de.de.toml;
- return Ok(value);
- }
- Err(e) => {
- if let Some(ref first) = first_error {
- let my_len = e.field.as_ref().map(|s| s.len());
- let first_len = first.field.as_ref().map(|s| s.len());
- if my_len <= first_len {
- continue
- }
- }
- first_error = Some(e);
- }
- }
- }
-
- Err(first_error.unwrap_or_else(|| self.err(DecodeErrorKind::NoEnumVariants)))
- }
-
- // When #[derive(Deserialize)] encounters an unknown struct field it will
- // call this method (somehow), and we want to preserve all unknown struct
- // fields to return them upwards (to warn about unused keys), so we override
- // that here to not tamper with our own internal state.
- fn deserialize_ignored_any<V>(&mut self, visitor: V)
- -> Result<V::Value, Self::Error>
- where V: de::Visitor
- {
- use serde::de::value::ValueDeserializer;
- let mut d = <() as ValueDeserializer<Self::Error>>::into_deserializer(());
- d.deserialize(visitor)
- }
-
- fn deserialize_bytes<V>(&mut self, visitor: V)
- -> Result<V::Value, Self::Error>
- where V: de::Visitor
- {
- self.deserialize_seq(visitor)
- }
-
- fn deserialize_seq_fixed_size<V>(&mut self, _len: usize, visitor: V)
- -> Result<V::Value, Self::Error>
- where V: de::Visitor
- {
- self.deserialize_seq(visitor)
- }
-
- fn deserialize_newtype_struct<V>(&mut self, _name: &'static str, visitor: V)
- -> Result<V::Value, Self::Error>
- where V: de::Visitor
- {
- self.deserialize_seq(visitor)
- }
-
- fn deserialize_tuple_struct<V>(&mut self,
- _name: &'static str,
- _len: usize,
- visitor: V)
- -> Result<V::Value, Self::Error>
- where V: de::Visitor
- {
- self.deserialize_seq(visitor)
- }
-
- fn deserialize_struct<V>(&mut self,
- _name: &'static str,
- _fields: &'static [&'static str],
- visitor: V)
- -> Result<V::Value, Self::Error>
- where V: de::Visitor
- {
- self.deserialize_map(visitor)
- }
-
- fn deserialize_tuple<V>(&mut self,
- _len: usize,
- visitor: V)
- -> Result<V::Value, Self::Error>
- where V: de::Visitor
- {
- self.deserialize_seq(visitor)
- }
-
- forward_to_deserialize!{
- deserialize_unit();
- deserialize_unit_struct(name: &'static str);
- deserialize_struct_field();
- }
-}
-
-struct VariantVisitor {
- de: Decoder,
- variant: usize,
-}
-
-impl de::VariantVisitor for VariantVisitor {
- type Error = DecodeError;
-
- fn visit_variant<V>(&mut self) -> Result<V, DecodeError>
- where V: de::Deserialize
- {
- use serde::de::value::ValueDeserializer;
-
- let mut de = self.variant.into_deserializer();
-
- de::Deserialize::deserialize(&mut de)
- }
-
- fn visit_unit(&mut self) -> Result<(), DecodeError> {
- de::Deserialize::deserialize(&mut self.de)
- }
-
- fn visit_newtype<T>(&mut self) -> Result<T, DecodeError>
- where T: de::Deserialize,
- {
- de::Deserialize::deserialize(&mut self.de)
- }
-
- fn visit_tuple<V>(&mut self,
- _len: usize,
- visitor: V) -> Result<V::Value, DecodeError>
- where V: de::Visitor,
- {
- de::Deserializer::deserialize(&mut self.de, visitor)
- }
-
- fn visit_struct<V>(&mut self,
- _fields: &'static [&'static str],
- visitor: V) -> Result<V::Value, DecodeError>
- where V: de::Visitor,
- {
- de::Deserializer::deserialize(&mut self.de, visitor)
- }
-}
-
-struct SeqDeserializer<'a, I> {
- iter: I,
- len: usize,
- toml: &'a mut Option<Value>,
-}
-
-impl<'a, I> SeqDeserializer<'a, I> where I: Iterator<Item=Value> {
- fn new(iter: I, len: usize, toml: &'a mut Option<Value>) -> Self {
- SeqDeserializer {
- iter: iter,
- len: len,
- toml: toml,
- }
- }
-
- fn put_value_back(&mut self, v: Value) {
- *self.toml = self.toml.take().or(Some(Value::Array(Vec::new())));
- match self.toml.as_mut().unwrap() {
- &mut Value::Array(ref mut a) => {
- a.push(v);
- },
- _ => unreachable!(),
- }
- }
-}
-
-impl<'a, I> de::Deserializer for SeqDeserializer<'a, I>
- where I: Iterator<Item=Value>,
-{
- type Error = DecodeError;
-
- fn deserialize<V>(&mut self, mut visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor,
- {
- visitor.visit_seq(self)
- }
-
- forward_to_deserialize!{
- deserialize_bool();
- deserialize_usize();
- deserialize_u8();
- deserialize_u16();
- deserialize_u32();
- deserialize_u64();
- deserialize_isize();
- deserialize_i8();
- deserialize_i16();
- deserialize_i32();
- deserialize_i64();
- deserialize_f32();
- deserialize_f64();
- deserialize_char();
- deserialize_str();
- deserialize_string();
- deserialize_unit();
- deserialize_option();
- deserialize_seq();
- deserialize_seq_fixed_size(len: usize);
- deserialize_bytes();
- deserialize_map();
- deserialize_unit_struct(name: &'static str);
- deserialize_newtype_struct(name: &'static str);
- deserialize_tuple_struct(name: &'static str, len: usize);
- deserialize_struct(name: &'static str, fields: &'static [&'static str]);
- deserialize_struct_field();
- deserialize_tuple(len: usize);
- deserialize_enum(name: &'static str, variants: &'static [&'static str]);
- deserialize_ignored_any();
- }
-}
-
-impl<'a, I> de::SeqVisitor for SeqDeserializer<'a, I>
- where I: Iterator<Item=Value>
-{
- type Error = DecodeError;
-
- fn visit<V>(&mut self) -> Result<Option<V>, DecodeError>
- where V: de::Deserialize
- {
- match self.iter.next() {
- Some(value) => {
- self.len -= 1;
- let mut de = Decoder::new(value);
- let v = try!(de::Deserialize::deserialize(&mut de));
- if let Some(t) = de.toml {
- self.put_value_back(t);
- }
- Ok(Some(v))
- }
- None => Ok(None),
- }
- }
-
- fn end(&mut self) -> Result<(), DecodeError> {
- if self.len == 0 {
- Ok(())
- } else {
- Err(de::Error::end_of_stream())
- }
- }
-
- fn size_hint(&self) -> (usize, Option<usize>) {
- (self.len, Some(self.len))
- }
-}
-
-impl de::Error for DecodeError {
- fn custom<T: Into<String>>(msg: T) -> DecodeError {
- DecodeError {
- field: None,
- kind: DecodeErrorKind::CustomError(msg.into()),
- }
- }
- fn end_of_stream() -> DecodeError {
- DecodeError { field: None, kind: DecodeErrorKind::EndOfStream }
- }
- fn missing_field(name: &'static str) -> DecodeError {
- DecodeError {
- field: Some(name.to_string()),
- kind: DecodeErrorKind::ExpectedField(None),
- }
- }
- fn unknown_field(name: &str) -> DecodeError {
- DecodeError {
- field: Some(name.to_string()),
- kind: DecodeErrorKind::UnknownField,
- }
- }
- fn invalid_type(ty: de::Type) -> Self {
- DecodeError {
- field: None,
- kind: DecodeErrorKind::InvalidType(match ty {
- de::Type::Bool => "bool",
- de::Type::Usize |
- de::Type::U8 |
- de::Type::U16 |
- de::Type::U32 |
- de::Type::U64 |
- de::Type::Isize |
- de::Type::I8 |
- de::Type::I16 |
- de::Type::I32 |
- de::Type::I64 => "integer",
- de::Type::F32 |
- de::Type::F64 => "float",
- de::Type::Char |
- de::Type::Str |
- de::Type::String => "string",
- de::Type::Seq => "array",
- de::Type::Struct |
- de::Type::Map => "table",
- de::Type::Unit => "Unit",
- de::Type::Option => "Option",
- de::Type::UnitStruct => "UnitStruct",
- de::Type::NewtypeStruct => "NewtypeStruct",
- de::Type::TupleStruct => "TupleStruct",
- de::Type::FieldName => "FieldName",
- de::Type::Tuple => "Tuple",
- de::Type::Enum => "Enum",
- de::Type::VariantName => "VariantName",
- de::Type::StructVariant => "StructVariant",
- de::Type::TupleVariant => "TupleVariant",
- de::Type::UnitVariant => "UnitVariant",
- de::Type::Bytes => "Bytes",
- })
- }
- }
-}
-
-struct MapVisitor<'a, I> {
- iter: I,
- de: &'a mut Decoder,
- key: Option<String>,
- value: Option<Value>,
-}
-
-impl<'a, I> MapVisitor<'a, I> {
- fn put_value_back(&mut self, v: Value) {
- self.de.toml = self.de.toml.take().or_else(|| {
- Some(Value::Table(BTreeMap::new()))
- });
-
- match self.de.toml.as_mut().unwrap() {
- &mut Value::Table(ref mut t) => {
- t.insert(self.key.take().unwrap(), v);
- },
- _ => unreachable!(),
- }
- }
-}
-
-impl<'a, I> de::MapVisitor for MapVisitor<'a, I>
- where I: Iterator<Item=(String, Value)>
-{
- type Error = DecodeError;
-
- fn visit_key<K>(&mut self) -> Result<Option<K>, DecodeError>
- where K: de::Deserialize
- {
- while let Some((k, v)) = self.iter.next() {
- let mut dec = self.de.sub_decoder(Some(Value::String(k.clone())), &k);
- self.key = Some(k);
-
- match de::Deserialize::deserialize(&mut dec) {
- Ok(val) => {
- self.value = Some(v);
- return Ok(Some(val))
- }
-
- // If this was an unknown field, then we put the toml value
- // back into the map and keep going.
- Err(DecodeError {kind: DecodeErrorKind::UnknownField, ..}) => {
- self.put_value_back(v);
- }
-
- Err(e) => return Err(e),
- }
- }
- Ok(None)
- }
-
- fn visit_value<V>(&mut self) -> Result<V, DecodeError>
- where V: de::Deserialize
- {
- match self.value.take() {
- Some(t) => {
- let mut dec = {
- // Borrowing the key here because Rust doesn't have
- // non-lexical borrows yet.
- let key = match self.key {
- Some(ref key) => &**key,
- None => ""
- };
-
- self.de.sub_decoder(Some(t), key)
- };
- let v = try!(de::Deserialize::deserialize(&mut dec));
- if let Some(t) = dec.toml {
- self.put_value_back(t);
- }
- Ok(v)
- },
- None => Err(de::Error::end_of_stream())
- }
- }
-
- fn end(&mut self) -> Result<(), DecodeError> {
- if let Some(v) = self.value.take() {
- self.put_value_back(v);
- }
- while let Some((k, v)) = self.iter.next() {
- self.key = Some(k);
- self.put_value_back(v);
- }
- Ok(())
- }
-
- fn missing_field<V>(&mut self, field_name: &'static str)
- -> Result<V, DecodeError> where V: de::Deserialize {
- // See if the type can deserialize from a unit.
- match de::Deserialize::deserialize(&mut UnitDeserializer) {
- Err(DecodeError {
- kind: DecodeErrorKind::InvalidType(..),
- field,
- }) => Err(DecodeError {
- field: field.or(Some(field_name.to_string())),
- kind: DecodeErrorKind::ExpectedField(None),
- }),
- v => v,
- }
- }
-}
-
-struct UnitDeserializer;
-
-impl de::Deserializer for UnitDeserializer {
- type Error = DecodeError;
-
- fn deserialize<V>(&mut self, mut visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor,
- {
- visitor.visit_unit()
- }
-
- fn deserialize_option<V>(&mut self, mut visitor: V)
- -> Result<V::Value, DecodeError>
- where V: de::Visitor,
- {
- visitor.visit_none()
- }
-
- forward_to_deserialize!{
- deserialize_bool();
- deserialize_usize();
- deserialize_u8();
- deserialize_u16();
- deserialize_u32();
- deserialize_u64();
- deserialize_isize();
- deserialize_i8();
- deserialize_i16();
- deserialize_i32();
- deserialize_i64();
- deserialize_f32();
- deserialize_f64();
- deserialize_char();
- deserialize_str();
- deserialize_string();
- deserialize_unit();
- deserialize_seq();
- deserialize_seq_fixed_size(len: usize);
- deserialize_bytes();
- deserialize_map();
- deserialize_unit_struct(name: &'static str);
- deserialize_newtype_struct(name: &'static str);
- deserialize_tuple_struct(name: &'static str, len: usize);
- deserialize_struct(name: &'static str, fields: &'static [&'static str]);
- deserialize_struct_field();
- deserialize_tuple(len: usize);
- deserialize_enum(name: &'static str, variants: &'static [&'static str]);
- deserialize_ignored_any();
- }
-}
-
-impl de::Deserialize for Value {
- fn deserialize<D>(deserializer: &mut D) -> Result<Value, D::Error>
- where D: de::Deserializer
- {
- struct ValueVisitor;
-
- impl de::Visitor for ValueVisitor {
- type Value = Value;
-
- fn visit_bool<E>(&mut self, value: bool) -> Result<Value, E> {
- Ok(Value::Boolean(value))
- }
-
- fn visit_i64<E>(&mut self, value: i64) -> Result<Value, E> {
- Ok(Value::Integer(value))
- }
-
- fn visit_f64<E>(&mut self, value: f64) -> Result<Value, E> {
- Ok(Value::Float(value))
- }
-
- fn visit_str<E>(&mut self, value: &str) -> Result<Value, E> {
- Ok(Value::String(value.into()))
- }
-
- fn visit_string<E>(&mut self, value: String) -> Result<Value, E> {
- Ok(Value::String(value))
- }
-
- fn visit_seq<V>(&mut self, visitor: V) -> Result<Value, V::Error>
- where V: de::SeqVisitor
- {
- let values = try!(de::impls::VecVisitor::new().visit_seq(visitor));
- Ok(Value::Array(values))
- }
-
- fn visit_map<V>(&mut self, visitor: V) -> Result<Value, V::Error>
- where V: de::MapVisitor
- {
- let mut v = de::impls::BTreeMapVisitor::new();
- let values = try!(v.visit_map(visitor));
- Ok(Value::Table(values))
- }
- }
-
- deserializer.deserialize(ValueVisitor)
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/src/display.rs
+++ /dev/null
@@ -1,209 +0,0 @@
-use std::fmt;
-
-use Table as TomlTable;
-use Value::{self, String, Integer, Float, Boolean, Datetime, Array, Table};
-
-struct Printer<'a, 'b:'a> {
- output: &'a mut fmt::Formatter<'b>,
- stack: Vec<&'a str>,
-}
-
-struct Key<'a>(&'a [&'a str]);
-
-impl fmt::Display for Value {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- match *self {
- String(ref s) => write_str(f, s),
- Integer(i) => write!(f, "{}", i),
- Float(fp) => {
- try!(write!(f, "{}", fp));
- if fp % 1.0 == 0.0 { try!(write!(f, ".0")) }
- Ok(())
- }
- Boolean(b) => write!(f, "{}", b),
- Datetime(ref s) => write!(f, "{}", s),
- Table(ref t) => {
- let mut p = Printer { output: f, stack: Vec::new() };
- p.print(t)
- }
- Array(ref a) => {
- try!(write!(f, "["));
- for (i, v) in a.iter().enumerate() {
- if i != 0 { try!(write!(f, ", ")); }
- try!(write!(f, "{}", v));
- }
- write!(f, "]")
- }
- }
- }
-}
-
-fn write_str(f: &mut fmt::Formatter, s: &str) -> fmt::Result {
- try!(write!(f, "\""));
- for ch in s.chars() {
- match ch {
- '\u{8}' => try!(write!(f, "\\b")),
- '\u{9}' => try!(write!(f, "\\t")),
- '\u{a}' => try!(write!(f, "\\n")),
- '\u{c}' => try!(write!(f, "\\f")),
- '\u{d}' => try!(write!(f, "\\r")),
- '\u{22}' => try!(write!(f, "\\\"")),
- '\u{5c}' => try!(write!(f, "\\\\")),
- ch => try!(write!(f, "{}", ch)),
- }
- }
- write!(f, "\"")
-}
-
-impl<'a, 'b> Printer<'a, 'b> {
- fn print(&mut self, table: &'a TomlTable) -> fmt::Result {
- let mut space_out_first = false;
- for (k, v) in table.iter() {
- match *v {
- Table(..) => continue,
- Array(ref a) => {
- if let Some(&Table(..)) = a.first() {
- continue;
- }
- }
- _ => {}
- }
- space_out_first = true;
- try!(writeln!(self.output, "{} = {}", Key(&[k]), v));
- }
- for (i, (k, v)) in table.iter().enumerate() {
- match *v {
- Table(ref inner) => {
- self.stack.push(k);
- if space_out_first || i != 0 {
- try!(write!(self.output, "\n"));
- }
- try!(writeln!(self.output, "[{}]", Key(&self.stack)));
- try!(self.print(inner));
- self.stack.pop();
- }
- Array(ref inner) => {
- match inner.first() {
- Some(&Table(..)) => {}
- _ => continue
- }
- self.stack.push(k);
- for (j, inner) in inner.iter().enumerate() {
- if space_out_first || i != 0 || j != 0 {
- try!(write!(self.output, "\n"));
- }
- try!(writeln!(self.output, "[[{}]]", Key(&self.stack)));
- match *inner {
- Table(ref inner) => try!(self.print(inner)),
- _ => panic!("non-heterogeneous toml array"),
- }
- }
- self.stack.pop();
- }
- _ => {},
- }
- }
- Ok(())
- }
-}
-
-impl<'a> fmt::Display for Key<'a> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- for (i, part) in self.0.iter().enumerate() {
- if i != 0 { try!(write!(f, ".")); }
- let ok = part.chars().all(|c| {
- match c {
- 'a' ... 'z' |
- 'A' ... 'Z' |
- '0' ... '9' |
- '-' | '_' => true,
- _ => false,
- }
- });
- if ok {
- try!(write!(f, "{}", part));
- } else {
- try!(write_str(f, part));
- }
- }
- Ok(())
- }
-}
-
-#[cfg(test)]
-#[allow(warnings)]
-mod tests {
- use Value;
- use Value::{String, Integer, Float, Boolean, Datetime, Array, Table};
- use std::collections::BTreeMap;
-
- macro_rules! map( ($($k:expr => $v:expr),*) => ({
- let mut _m = BTreeMap::new();
- $(_m.insert($k.to_string(), $v);)*
- _m
- }) );
-
- #[test]
- fn simple_show() {
- assert_eq!(String("foo".to_string()).to_string(),
- "\"foo\"");
- assert_eq!(Integer(10).to_string(),
- "10");
- assert_eq!(Float(10.0).to_string(),
- "10.0");
- assert_eq!(Float(2.4).to_string(),
- "2.4");
- assert_eq!(Boolean(true).to_string(),
- "true");
- assert_eq!(Datetime("test".to_string()).to_string(),
- "test");
- assert_eq!(Array(vec![]).to_string(),
- "[]");
- assert_eq!(Array(vec![Integer(1), Integer(2)]).to_string(),
- "[1, 2]");
- }
-
- #[test]
- fn table() {
- assert_eq!(Table(map! { }).to_string(),
- "");
- assert_eq!(Table(map! { "test" => Integer(2) }).to_string(),
- "test = 2\n");
- assert_eq!(Table(map! {
- "test" => Integer(2),
- "test2" => Table(map! {
- "test" => String("wut".to_string())
- })
- }).to_string(),
- "test = 2\n\
- \n\
- [test2]\n\
- test = \"wut\"\n");
- assert_eq!(Table(map! {
- "test" => Integer(2),
- "test2" => Table(map! {
- "test" => String("wut".to_string())
- })
- }).to_string(),
- "test = 2\n\
- \n\
- [test2]\n\
- test = \"wut\"\n");
- assert_eq!(Table(map! {
- "test" => Integer(2),
- "test2" => Array(vec![Table(map! {
- "test" => String("wut".to_string())
- })])
- }).to_string(),
- "test = 2\n\
- \n\
- [[test2]]\n\
- test = \"wut\"\n");
- assert_eq!(Table(map! {
- "foo.bar" => Integer(2),
- "foo\"bar" => Integer(2)
- }).to_string(),
- "\"foo\\\"bar\" = 2\n\
- \"foo.bar\" = 2\n");
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/src/encoder/mod.rs
+++ /dev/null
@@ -1,203 +0,0 @@
-use std::collections::BTreeMap;
-use std::error;
-use std::fmt;
-use std::mem;
-
-use {Value, Table};
-
-#[cfg(feature = "rustc-serialize")] mod rustc_serialize;
-#[cfg(feature = "serde")] mod serde;
-
-/// A structure to transform Rust values into TOML values.
-///
-/// This encoder implements the serialization `Encoder` interface, allowing
-/// `Encodable` rust types to be fed into the encoder. The output of this
-/// encoder is a TOML `Table` structure. The resulting TOML can be stringified
-/// if necessary.
-///
-/// # Example
-///
-/// ```
-/// extern crate rustc_serialize;
-/// extern crate toml;
-///
-/// # fn main() {
-/// use toml::{Encoder, Value};
-/// use rustc_serialize::Encodable;
-///
-/// #[derive(RustcEncodable)]
-/// struct MyStruct { foo: isize, bar: String }
-/// let my_struct = MyStruct { foo: 4, bar: "hello!".to_string() };
-///
-/// let mut e = Encoder::new();
-/// my_struct.encode(&mut e).unwrap();
-///
-/// assert_eq!(e.toml.get(&"foo".to_string()), Some(&Value::Integer(4)))
-/// # }
-/// ```
-#[derive(Default, Debug)]
-pub struct Encoder {
- /// Output TOML that is emitted. The current version of this encoder forces
- /// the top-level representation of a structure to be a table.
- ///
- /// This field can be used to extract the return value after feeding a value
- /// into this `Encoder`.
- pub toml: Table,
- state: State,
-}
-
-/// Enumeration of errors which can occur while encoding a rust value into a
-/// TOML value.
-#[allow(missing_copy_implementations)]
-#[derive(Debug)]
-pub enum Error {
- /// Indication that a key was needed when a value was emitted, but no key
- /// was previously emitted.
- NeedsKey,
- /// Indication that a key was emitted, but no value was emitted.
- NoValue,
- /// Indicates that a map key was attempted to be emitted at an invalid
- /// location.
- InvalidMapKeyLocation,
- /// Indicates that a type other than a string was attempted to be used as a
- /// map key type.
- InvalidMapKeyType,
- /// A custom error type was generated
- Custom(String),
-}
-
-/// Internal state of the encoder when encoding transitions
-#[derive(Debug)]
-pub struct EncoderState {
- inner: State,
-}
-
-#[derive(PartialEq, Debug)]
-enum State {
- Start,
- NextKey(String),
- NextArray(Vec<Value>),
- NextMapKey,
-}
-
-impl Default for State {
- fn default() -> State { State::Start }
-}
-
-impl Encoder {
- /// Constructs a new encoder which will emit to the given output stream.
- pub fn new() -> Encoder {
- Encoder { state: State::Start, toml: BTreeMap::new() }
- }
-
- fn emit_value(&mut self, v: Value) -> Result<(), Error> {
- match mem::replace(&mut self.state, State::Start) {
- State::NextKey(key) => { self.toml.insert(key, v); Ok(()) }
- State::NextArray(mut vec) => {
- // TODO: validate types
- vec.push(v);
- self.state = State::NextArray(vec);
- Ok(())
- }
- State::NextMapKey => {
- match v {
- Value::String(s) => { self.state = State::NextKey(s); Ok(()) }
- _ => Err(Error::InvalidMapKeyType)
- }
- }
- _ => Err(Error::NeedsKey)
- }
- }
-
- fn emit_none(&mut self) -> Result<(), Error> {
- match mem::replace(&mut self.state, State::Start) {
- State::Start => unreachable!(),
- State::NextKey(_) => Ok(()),
- State::NextArray(..) => panic!("how to encode None in an array?"),
- State::NextMapKey => Err(Error::InvalidMapKeyLocation),
- }
- }
-
- fn seq_begin(&mut self) -> Result<State, Error> {
- Ok(mem::replace(&mut self.state, State::NextArray(Vec::new())))
- }
-
- fn seq_end(&mut self, old: State) -> Result<(), Error> {
- match mem::replace(&mut self.state, old) {
- State::NextArray(v) => self.emit_value(Value::Array(v)),
- _ => unreachable!(),
- }
- }
-
- fn table_key<F>(&mut self, f: F) -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- match mem::replace(&mut self.state, State::NextMapKey) {
- State::Start => {}
- _ => return Err(Error::InvalidMapKeyLocation),
- }
- try!(f(self));
- match self.state {
- State::NextKey(_) => Ok(()),
- _ => Err(Error::InvalidMapKeyLocation),
- }
- }
-}
-
-/// Encodes an encodable value into a TOML value.
-///
-/// This function expects the type given to represent a TOML table in some form.
-/// If encoding encounters an error, then this function will fail the task.
-#[cfg(feature = "rustc-serialize")]
-pub fn encode<T: ::rustc_serialize::Encodable>(t: &T) -> Value {
- let mut e = Encoder::new();
- t.encode(&mut e).unwrap();
- Value::Table(e.toml)
-}
-
-/// Encodes an encodable value into a TOML value.
-///
-/// This function expects the type given to represent a TOML table in some form.
-/// If encoding encounters an error, then this function will fail the task.
-#[cfg(all(not(feature = "rustc-serialize"), feature = "serde"))]
-pub fn encode<T: ::serde::Serialize>(t: &T) -> Value {
- let mut e = Encoder::new();
- t.serialize(&mut e).unwrap();
- Value::Table(e.toml)
-}
-
-/// Encodes an encodable value into a TOML string.
-///
-/// This function expects the type given to represent a TOML table in some form.
-/// If encoding encounters an error, then this function will fail the task.
-#[cfg(feature = "rustc-serialize")]
-pub fn encode_str<T: ::rustc_serialize::Encodable>(t: &T) -> String {
- encode(t).to_string()
-}
-
-/// Encodes an encodable value into a TOML string.
-///
-/// This function expects the type given to represent a TOML table in some form.
-/// If encoding encounters an error, then this function will fail the task.
-#[cfg(all(not(feature = "rustc-serialize"), feature = "serde"))]
-pub fn encode_str<T: ::serde::Serialize>(t: &T) -> String {
- encode(t).to_string()
-}
-
-impl fmt::Display for Error {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- match *self {
- Error::NeedsKey => write!(f, "need a key to encode"),
- Error::NoValue => write!(f, "no value to emit for a previous key"),
- Error::InvalidMapKeyLocation => write!(f, "a map cannot be emitted \
- at this location"),
- Error::InvalidMapKeyType => write!(f, "only strings can be used as \
- key types"),
- Error::Custom(ref s) => write!(f, "custom error: {}", s),
- }
- }
-}
-
-impl error::Error for Error {
- fn description(&self) -> &str { "TOML encoding error" }
-}
deleted file mode 100644
--- a/third_party/rust/toml/src/encoder/rustc_serialize.rs
+++ /dev/null
@@ -1,748 +0,0 @@
-use std::mem;
-
-use rustc_serialize;
-use Value;
-use super::{Encoder, Error, State};
-use super::Error::*;
-
-impl Encoder {
- fn table<F>(&mut self, f: F) -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- match mem::replace(&mut self.state, State::Start) {
- State::NextKey(key) => {
- let mut nested = Encoder::new();
- try!(f(&mut nested));
- self.toml.insert(key, Value::Table(nested.toml));
- Ok(())
- }
- State::NextArray(mut arr) => {
- let mut nested = Encoder::new();
- try!(f(&mut nested));
- arr.push(Value::Table(nested.toml));
- self.state = State::NextArray(arr);
- Ok(())
- }
- State::Start => f(self),
- State::NextMapKey => Err(Error::InvalidMapKeyLocation),
- }
- }
-
- fn seq<F>(&mut self, f: F) -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- let old = try!(self.seq_begin());
- try!(f(self));
- self.seq_end(old)
- }
-}
-
-impl rustc_serialize::Encoder for Encoder {
- type Error = Error;
-
- fn emit_nil(&mut self) -> Result<(), Error> { Ok(()) }
- fn emit_usize(&mut self, v: usize) -> Result<(), Error> {
- self.emit_i64(v as i64)
- }
- fn emit_u8(&mut self, v: u8) -> Result<(), Error> {
- self.emit_i64(v as i64)
- }
- fn emit_u16(&mut self, v: u16) -> Result<(), Error> {
- self.emit_i64(v as i64)
- }
- fn emit_u32(&mut self, v: u32) -> Result<(), Error> {
- self.emit_i64(v as i64)
- }
- fn emit_u64(&mut self, v: u64) -> Result<(), Error> {
- self.emit_i64(v as i64)
- }
- fn emit_isize(&mut self, v: isize) -> Result<(), Error> {
- self.emit_i64(v as i64)
- }
- fn emit_i8(&mut self, v: i8) -> Result<(), Error> {
- self.emit_i64(v as i64)
- }
- fn emit_i16(&mut self, v: i16) -> Result<(), Error> {
- self.emit_i64(v as i64)
- }
- fn emit_i32(&mut self, v: i32) -> Result<(), Error> {
- self.emit_i64(v as i64)
- }
- fn emit_i64(&mut self, v: i64) -> Result<(), Error> {
- self.emit_value(Value::Integer(v))
- }
- fn emit_bool(&mut self, v: bool) -> Result<(), Error> {
- self.emit_value(Value::Boolean(v))
- }
- fn emit_f32(&mut self, v: f32) -> Result<(), Error> { self.emit_f64(v as f64) }
- fn emit_f64(&mut self, v: f64) -> Result<(), Error> {
- self.emit_value(Value::Float(v))
- }
- fn emit_char(&mut self, v: char) -> Result<(), Error> {
- self.emit_str(&v.to_string())
- }
- fn emit_str(&mut self, v: &str) -> Result<(), Error> {
- self.emit_value(Value::String(v.to_string()))
- }
- fn emit_enum<F>(&mut self, _name: &str, f: F)
- -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- f(self)
- }
- fn emit_enum_variant<F>(&mut self, _v_name: &str, _v_id: usize,
- _len: usize, f: F) -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- f(self)
- }
- fn emit_enum_variant_arg<F>(&mut self, _a_idx: usize, f: F)
- -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- f(self)
- }
- fn emit_enum_struct_variant<F>(&mut self, _v_name: &str, _v_id: usize,
- _len: usize,
- _f: F)
- -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- panic!()
- }
- fn emit_enum_struct_variant_field<F>(&mut self,
- _f_name: &str,
- _f_idx: usize,
- _f: F)
- -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- panic!()
- }
- fn emit_struct<F>(&mut self, _name: &str, _len: usize, f: F)
- -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- self.table(f)
- }
- fn emit_struct_field<F>(&mut self, f_name: &str, _f_idx: usize, f: F)
- -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- let old = mem::replace(&mut self.state,
- State::NextKey(f_name.to_string()));
- try!(f(self));
- if self.state != State::Start {
- return Err(NoValue)
- }
- self.state = old;
- Ok(())
- }
- fn emit_tuple<F>(&mut self, len: usize, f: F)
- -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- self.emit_seq(len, f)
- }
- fn emit_tuple_arg<F>(&mut self, idx: usize, f: F)
- -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- self.emit_seq_elt(idx, f)
- }
- fn emit_tuple_struct<F>(&mut self, _name: &str, _len: usize, _f: F)
- -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- unimplemented!()
- }
- fn emit_tuple_struct_arg<F>(&mut self, _f_idx: usize, _f: F)
- -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- unimplemented!()
- }
- fn emit_option<F>(&mut self, f: F)
- -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- f(self)
- }
- fn emit_option_none(&mut self) -> Result<(), Error> {
- self.emit_none()
- }
- fn emit_option_some<F>(&mut self, f: F) -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- f(self)
- }
- fn emit_seq<F>(&mut self, _len: usize, f: F)
- -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- self.seq(f)
- }
- fn emit_seq_elt<F>(&mut self, _idx: usize, f: F)
- -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- f(self)
- }
- fn emit_map<F>(&mut self, len: usize, f: F)
- -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- self.emit_struct("foo", len, f)
- }
- fn emit_map_elt_key<F>(&mut self, _idx: usize, f: F) -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- self.table_key(f)
- }
- fn emit_map_elt_val<F>(&mut self, _idx: usize, f: F) -> Result<(), Error>
- where F: FnOnce(&mut Encoder) -> Result<(), Error>
- {
- f(self)
- }
-}
-
-impl rustc_serialize::Encodable for Value {
- fn encode<E>(&self, e: &mut E) -> Result<(), E::Error>
- where E: rustc_serialize::Encoder
- {
- match *self {
- Value::String(ref s) => e.emit_str(s),
- Value::Integer(i) => e.emit_i64(i),
- Value::Float(f) => e.emit_f64(f),
- Value::Boolean(b) => e.emit_bool(b),
- Value::Datetime(ref s) => e.emit_str(s),
- Value::Array(ref a) => {
- e.emit_seq(a.len(), |e| {
- for item in a {
- try!(item.encode(e));
- }
- Ok(())
- })
- }
- Value::Table(ref t) => {
- e.emit_map(t.len(), |e| {
- for (i, (key, value)) in t.iter().enumerate() {
- try!(e.emit_map_elt_key(i, |e| e.emit_str(key)));
- try!(e.emit_map_elt_val(i, |e| value.encode(e)));
- }
- Ok(())
- })
- }
- }
- }
-}
-
-#[cfg(test)]
-mod tests {
- use std::collections::{BTreeMap, HashSet};
- use rustc_serialize::{self, Encodable, Decodable};
-
- use {Encoder, Decoder, DecodeError};
- use Value;
- use Value::{Table, Integer, Array, Float};
-
- macro_rules! encode( ($t:expr) => ({
- let mut e = Encoder::new();
- $t.encode(&mut e).unwrap();
- e.toml
- }) );
-
- macro_rules! decode( ($t:expr) => ({
- let mut d = Decoder::new($t);
- Decodable::decode(&mut d).unwrap()
- }) );
-
- macro_rules! map( ($($k:ident, $v:expr),*) => ({
- let mut _m = BTreeMap::new();
- $(_m.insert(stringify!($k).to_string(), $v);)*
- _m
- }) );
-
- #[test]
- fn smoke() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: isize }
-
- let v = Foo { a: 2 };
- assert_eq!(encode!(v), map! { a, Integer(2) });
- assert_eq!(v, decode!(Table(encode!(v))));
- }
-
- #[test]
- fn smoke_hyphen() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a_b: isize }
-
- let v = Foo { a_b: 2 };
- assert_eq!(encode!(v), map! { a_b, Integer(2) });
- assert_eq!(v, decode!(Table(encode!(v))));
-
- let mut m = BTreeMap::new();
- m.insert("a-b".to_string(), Integer(2));
- assert_eq!(v, decode!(Table(encode!(v))));
- }
-
- #[test]
- fn nested() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: isize, b: Bar }
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Bar { a: String }
-
- let v = Foo { a: 2, b: Bar { a: "test".to_string() } };
- assert_eq!(encode!(v),
- map! {
- a, Integer(2),
- b, Table(map! {
- a, Value::String("test".to_string())
- })
- });
- assert_eq!(v, decode!(Table(encode!(v))));
- }
-
- #[test]
- fn application_decode_error() {
- #[derive(PartialEq, Debug)]
- struct Range10(usize);
- impl Decodable for Range10 {
- fn decode<D: rustc_serialize::Decoder>(d: &mut D) -> Result<Range10, D::Error> {
- let x: usize = try!(Decodable::decode(d));
- if x > 10 {
- Err(d.error("Value out of range!"))
- } else {
- Ok(Range10(x))
- }
- }
- }
- let mut d_good = Decoder::new(Integer(5));
- let mut d_bad1 = Decoder::new(Value::String("not an isize".to_string()));
- let mut d_bad2 = Decoder::new(Integer(11));
-
- assert_eq!(Ok(Range10(5)), Decodable::decode(&mut d_good));
-
- let err1: Result<Range10, _> = Decodable::decode(&mut d_bad1);
- assert!(err1.is_err());
- let err2: Result<Range10, _> = Decodable::decode(&mut d_bad2);
- assert!(err2.is_err());
- }
-
- #[test]
- fn array() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: Vec<isize> }
-
- let v = Foo { a: vec![1, 2, 3, 4] };
- assert_eq!(encode!(v),
- map! {
- a, Array(vec![
- Integer(1),
- Integer(2),
- Integer(3),
- Integer(4)
- ])
- });
- assert_eq!(v, decode!(Table(encode!(v))));
- }
-
- #[test]
- fn tuple() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: (isize, isize, isize, isize) }
-
- let v = Foo { a: (1, 2, 3, 4) };
- assert_eq!(encode!(v),
- map! {
- a, Array(vec![
- Integer(1),
- Integer(2),
- Integer(3),
- Integer(4)
- ])
- });
- assert_eq!(v, decode!(Table(encode!(v))));
- }
-
- #[test]
- fn inner_structs_with_options() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo {
- a: Option<Box<Foo>>,
- b: Bar,
- }
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Bar {
- a: String,
- b: f64,
- }
-
- let v = Foo {
- a: Some(Box::new(Foo {
- a: None,
- b: Bar { a: "foo".to_string(), b: 4.5 },
- })),
- b: Bar { a: "bar".to_string(), b: 1.0 },
- };
- assert_eq!(encode!(v),
- map! {
- a, Table(map! {
- b, Table(map! {
- a, Value::String("foo".to_string()),
- b, Float(4.5)
- })
- }),
- b, Table(map! {
- a, Value::String("bar".to_string()),
- b, Float(1.0)
- })
- });
- assert_eq!(v, decode!(Table(encode!(v))));
- }
-
- #[test]
- fn hashmap() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo {
- map: BTreeMap<String, isize>,
- set: HashSet<char>,
- }
-
- let v = Foo {
- map: {
- let mut m = BTreeMap::new();
- m.insert("foo".to_string(), 10);
- m.insert("bar".to_string(), 4);
- m
- },
- set: {
- let mut s = HashSet::new();
- s.insert('a');
- s
- },
- };
- assert_eq!(encode!(v),
- map! {
- map, Table(map! {
- foo, Integer(10),
- bar, Integer(4)
- }),
- set, Array(vec![Value::String("a".to_string())])
- }
- );
- assert_eq!(v, decode!(Table(encode!(v))));
- }
-
- #[test]
- fn tuple_struct() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo(isize, String, f64);
-
- let v = Foo(1, "foo".to_string(), 4.5);
- assert_eq!(
- encode!(v),
- map! {
- _field0, Integer(1),
- _field1, Value::String("foo".to_string()),
- _field2, Float(4.5)
- }
- );
- assert_eq!(v, decode!(Table(encode!(v))));
- }
-
- #[test]
- fn table_array() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: Vec<Bar>, }
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Bar { a: isize }
-
- let v = Foo { a: vec![Bar { a: 1 }, Bar { a: 2 }] };
- assert_eq!(
- encode!(v),
- map! {
- a, Array(vec![
- Table(map!{ a, Integer(1) }),
- Table(map!{ a, Integer(2) }),
- ])
- }
- );
- assert_eq!(v, decode!(Table(encode!(v))));
- }
-
- #[test]
- fn type_errors() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { bar: isize }
-
- let mut d = Decoder::new(Table(map! {
- bar, Float(1.0)
- }));
- let a: Result<Foo, DecodeError> = Decodable::decode(&mut d);
- match a {
- Ok(..) => panic!("should not have decoded"),
- Err(e) => {
- assert_eq!(e.to_string(),
- "expected a value of type `integer`, but \
- found a value of type `float` for the key `bar`");
- }
- }
- }
-
- #[test]
- fn missing_errors() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { bar: isize }
-
- let mut d = Decoder::new(Table(map! {
- }));
- let a: Result<Foo, DecodeError> = Decodable::decode(&mut d);
- match a {
- Ok(..) => panic!("should not have decoded"),
- Err(e) => {
- assert_eq!(e.to_string(),
- "expected a value of type `integer` for the key `bar`");
- }
- }
- }
-
- #[test]
- fn parse_enum() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: E }
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- enum E {
- Bar(isize),
- Baz(f64),
- Last(Foo2),
- }
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo2 {
- test: String,
- }
-
- let v = Foo { a: E::Bar(10) };
- assert_eq!(
- encode!(v),
- map! { a, Integer(10) }
- );
- assert_eq!(v, decode!(Table(encode!(v))));
-
- let v = Foo { a: E::Baz(10.2) };
- assert_eq!(
- encode!(v),
- map! { a, Float(10.2) }
- );
- assert_eq!(v, decode!(Table(encode!(v))));
-
- let v = Foo { a: E::Last(Foo2 { test: "test".to_string() }) };
- assert_eq!(
- encode!(v),
- map! { a, Table(map! { test, Value::String("test".to_string()) }) }
- );
- assert_eq!(v, decode!(Table(encode!(v))));
- }
-
- #[test]
- fn unused_fields() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: isize }
-
- let v = Foo { a: 2 };
- let mut d = Decoder::new(Table(map! {
- a, Integer(2),
- b, Integer(5)
- }));
- assert_eq!(v, Decodable::decode(&mut d).unwrap());
-
- assert_eq!(d.toml, Some(Table(map! {
- b, Integer(5)
- })));
- }
-
- #[test]
- fn unused_fields2() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: Bar }
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Bar { a: isize }
-
- let v = Foo { a: Bar { a: 2 } };
- let mut d = Decoder::new(Table(map! {
- a, Table(map! {
- a, Integer(2),
- b, Integer(5)
- })
- }));
- assert_eq!(v, Decodable::decode(&mut d).unwrap());
-
- assert_eq!(d.toml, Some(Table(map! {
- a, Table(map! {
- b, Integer(5)
- })
- })));
- }
-
- #[test]
- fn unused_fields3() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: Bar }
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Bar { a: isize }
-
- let v = Foo { a: Bar { a: 2 } };
- let mut d = Decoder::new(Table(map! {
- a, Table(map! {
- a, Integer(2)
- })
- }));
- assert_eq!(v, Decodable::decode(&mut d).unwrap());
-
- assert_eq!(d.toml, None);
- }
-
- #[test]
- fn unused_fields4() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: BTreeMap<String, String> }
-
- let v = Foo { a: map! { a, "foo".to_string() } };
- let mut d = Decoder::new(Table(map! {
- a, Table(map! {
- a, Value::String("foo".to_string())
- })
- }));
- assert_eq!(v, Decodable::decode(&mut d).unwrap());
-
- assert_eq!(d.toml, None);
- }
-
- #[test]
- fn unused_fields5() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: Vec<String> }
-
- let v = Foo { a: vec!["a".to_string()] };
- let mut d = Decoder::new(Table(map! {
- a, Array(vec![Value::String("a".to_string())])
- }));
- assert_eq!(v, Decodable::decode(&mut d).unwrap());
-
- assert_eq!(d.toml, None);
- }
-
- #[test]
- fn unused_fields6() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: Option<Vec<String>> }
-
- let v = Foo { a: Some(vec![]) };
- let mut d = Decoder::new(Table(map! {
- a, Array(vec![])
- }));
- assert_eq!(v, Decodable::decode(&mut d).unwrap());
-
- assert_eq!(d.toml, None);
- }
-
- #[test]
- fn unused_fields7() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: Vec<Bar> }
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Bar { a: isize }
-
- let v = Foo { a: vec![Bar { a: 1 }] };
- let mut d = Decoder::new(Table(map! {
- a, Array(vec![Table(map! {
- a, Integer(1),
- b, Integer(2)
- })])
- }));
- assert_eq!(v, Decodable::decode(&mut d).unwrap());
-
- assert_eq!(d.toml, Some(Table(map! {
- a, Array(vec![Table(map! {
- b, Integer(2)
- })])
- })));
- }
-
- #[test]
- fn unused_fields8() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: BTreeMap<String, Bar> }
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Bar { a: isize }
-
- let v = Foo { a: map! { a, Bar { a: 2 } } };
- let mut d = Decoder::new(Table(map! {
- a, Table(map! {
- a, Table(map! {
- a, Integer(2),
- b, Integer(2)
- })
- })
- }));
- assert_eq!(v, Decodable::decode(&mut d).unwrap());
-
- assert_eq!(d.toml, Some(Table(map! {
- a, Table(map! {
- a, Table(map! {
- b, Integer(2)
- })
- })
- })));
- }
-
- #[test]
- fn empty_arrays() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: Vec<Bar> }
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Bar;
-
- let v = Foo { a: vec![] };
- let mut d = Decoder::new(Table(map! {}));
- assert_eq!(v, Decodable::decode(&mut d).unwrap());
- }
-
- #[test]
- fn empty_arrays2() {
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Foo { a: Option<Vec<Bar>> }
- #[derive(RustcEncodable, RustcDecodable, PartialEq, Debug)]
- struct Bar;
-
- let v = Foo { a: None };
- let mut d = Decoder::new(Table(map! {}));
- assert_eq!(v, Decodable::decode(&mut d).unwrap());
-
- let v = Foo { a: Some(vec![]) };
- let mut d = Decoder::new(Table(map! {
- a, Array(vec![])
- }));
- assert_eq!(v, Decodable::decode(&mut d).unwrap());
- }
-
- #[test]
- fn round_trip() {
- let toml = r#"
- [test]
- foo = "bar"
-
- [[values]]
- foo = "baz"
-
- [[values]]
- foo = "qux"
- "#;
-
- let value: Value = toml.parse().unwrap();
- let val2 = ::encode_str(&value).parse().unwrap();
- assert_eq!(value, val2);
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/src/encoder/serde.rs
+++ /dev/null
@@ -1,339 +0,0 @@
-use std::mem;
-
-use serde::ser;
-use Value;
-use super::{Encoder, Error, EncoderState, State};
-
-impl Encoder {
- fn table_begin(&mut self) -> Result<Self, Error> {
- match self.state {
- State::NextMapKey => Err(Error::InvalidMapKeyLocation),
- _ => Ok(mem::replace(self, Encoder::new()))
- }
- }
-
- fn table_end(&mut self, mut state: Self) -> Result<(), Error> {
- match state.state {
- State::NextKey(key) => {
- mem::swap(&mut self.toml, &mut state.toml);
- self.toml.insert(key, Value::Table(state.toml));
- },
- State::NextArray(mut arr) => {
- mem::swap(&mut self.toml, &mut state.toml);
- arr.push(Value::Table(state.toml));
- self.state = State::NextArray(arr);
- },
- State::Start => {},
- State::NextMapKey => unreachable!(),
- }
- Ok(())
- }
-}
-
-impl ser::Serializer for Encoder {
- type Error = Error;
- type MapState = Self;
- type StructState = Self;
- type StructVariantState = Self;
- type SeqState = EncoderState;
- type TupleState = EncoderState;
- type TupleStructState = EncoderState;
- type TupleVariantState = EncoderState;
-
- fn serialize_bool(&mut self, v: bool) -> Result<(), Error> {
- self.emit_value(Value::Boolean(v))
- }
-
- fn serialize_i64(&mut self, v: i64) -> Result<(), Error> {
- self.emit_value(Value::Integer(v))
- }
-
- // TODO: checked casts
-
- fn serialize_u64(&mut self, v: u64) -> Result<(), Error> {
- self.serialize_i64(v as i64)
- }
-
- fn serialize_isize(&mut self, v: isize) -> Result<(), Error> {
- self.serialize_i64(v as i64)
- }
-
- fn serialize_usize(&mut self, v: usize) -> Result<(), Error> {
- self.serialize_i64(v as i64)
- }
-
- fn serialize_i8(&mut self, v: i8) -> Result<(), Error> {
- self.serialize_i64(v as i64)
- }
-
- fn serialize_u8(&mut self, v: u8) -> Result<(), Error> {
- self.serialize_i64(v as i64)
- }
-
- fn serialize_i16(&mut self, v: i16) -> Result<(), Error> {
- self.serialize_i64(v as i64)
- }
-
- fn serialize_u16(&mut self, v: u16) -> Result<(), Error> {
- self.serialize_i64(v as i64)
- }
-
- fn serialize_i32(&mut self, v: i32) -> Result<(), Error> {
- self.serialize_i64(v as i64)
- }
-
- fn serialize_u32(&mut self, v: u32) -> Result<(), Error> {
- self.serialize_i64(v as i64)
- }
-
- fn serialize_f32(&mut self, v: f32) -> Result<(), Error> {
- self.serialize_f64(v as f64)
- }
-
- fn serialize_f64(&mut self, v: f64) -> Result<(), Error> {
- self.emit_value(Value::Float(v))
- }
-
- fn serialize_str(&mut self, value: &str) -> Result<(), Error> {
- self.emit_value(Value::String(value.to_string()))
- }
-
- fn serialize_unit_struct(&mut self, _name: &'static str) -> Result<(), Error> {
- Ok(())
- }
-
- fn serialize_unit(&mut self) -> Result<(), Error> {
- Ok(())
- }
-
- fn serialize_none(&mut self) -> Result<(), Error> {
- self.emit_none()
- }
-
- fn serialize_char(&mut self, c: char) -> Result<(), Error> {
- self.serialize_str(&c.to_string())
- }
-
- fn serialize_some<V>(&mut self, value: V) -> Result<(), Error>
- where V: ser::Serialize
- {
- value.serialize(self)
- }
-
- fn serialize_bytes(&mut self, v: &[u8]) -> Result<(), Error> {
- let mut state = try!(self.serialize_seq(Some(v.len())));
- for c in v {
- try!(self.serialize_seq_elt(&mut state, c));
- }
- self.serialize_seq_end(state)
- }
-
- fn serialize_seq_fixed_size(&mut self, len: usize)
- -> Result<EncoderState, Error> {
- self.serialize_seq(Some(len))
- }
-
- fn serialize_seq(&mut self, _len: Option<usize>)
- -> Result<EncoderState, Error> {
- self.seq_begin().map(|s| EncoderState { inner: s })
- }
-
- fn serialize_seq_elt<T>(&mut self,
- _state: &mut EncoderState,
- value: T) -> Result<(), Error>
- where T: ser::Serialize
- {
- value.serialize(self)
- }
-
- fn serialize_seq_end(&mut self, state: EncoderState) -> Result<(), Error> {
- self.seq_end(state.inner)
- }
-
- fn serialize_tuple(&mut self, len: usize)
- -> Result<EncoderState, Error> {
- self.serialize_seq(Some(len))
- }
-
- fn serialize_tuple_elt<T>(&mut self,
- state: &mut EncoderState,
- value: T) -> Result<(), Error>
- where T: ser::Serialize
- {
- self.serialize_seq_elt(state, value)
- }
-
- fn serialize_tuple_end(&mut self, state: EncoderState) -> Result<(), Error> {
- self.serialize_seq_end(state)
- }
-
- fn serialize_tuple_struct(&mut self,
- _name: &'static str,
- len: usize) -> Result<EncoderState, Error> {
- self.serialize_seq(Some(len))
- }
-
- fn serialize_tuple_struct_elt<T>(&mut self,
- state: &mut EncoderState,
- value: T) -> Result<(), Error>
- where T: ser::Serialize
- {
- self.serialize_seq_elt(state, value)
- }
-
- fn serialize_tuple_struct_end(&mut self, state: EncoderState)
- -> Result<(), Error> {
- self.serialize_seq_end(state)
- }
-
- fn serialize_tuple_variant(&mut self,
- _name: &'static str,
- _id: usize,
- _variant: &'static str,
- len: usize) -> Result<EncoderState, Error> {
- self.serialize_seq(Some(len))
- }
-
- fn serialize_tuple_variant_elt<T>(&mut self,
- state: &mut EncoderState,
- value: T) -> Result<(), Error>
- where T: ser::Serialize
- {
- self.serialize_seq_elt(state, value)
- }
-
- fn serialize_tuple_variant_end(&mut self, state: EncoderState)
- -> Result<(), Error> {
- self.serialize_seq_end(state)
- }
-
- fn serialize_map(&mut self, _len: Option<usize>) -> Result<Self, Error> {
- self.table_begin()
- }
-
- fn serialize_map_key<K>(&mut self,
- _state: &mut Encoder,
- key: K) -> Result<(), Error>
- where K: ser::Serialize
- {
- self.table_key(|me| key.serialize(me))
- }
-
- fn serialize_map_value<V>(&mut self,
- _state: &mut Encoder,
- value: V) -> Result<(), Error>
- where V: ser::Serialize
- {
- value.serialize(self)
- }
-
- fn serialize_map_end(&mut self, state: Self) -> Result<(), Error> {
- self.table_end(state)
- }
-
- fn serialize_struct(&mut self,
- _name: &'static str,
- len: usize) -> Result<Self, Error> {
- self.serialize_map(Some(len))
- }
-
- fn serialize_struct_elt<V>(&mut self,
- state: &mut Encoder,
- key: &'static str,
- value: V) -> Result<(), Error>
- where V: ser::Serialize
- {
- try!(self.serialize_map_key(state, key));
- self.serialize_map_value(state, value)
- }
-
- fn serialize_struct_end(&mut self, state: Self) -> Result<(), Error> {
- self.serialize_map_end(state)
- }
-
- fn serialize_struct_variant(&mut self,
- _name: &'static str,
- _id: usize,
- _variant: &'static str,
- len: usize) -> Result<Self, Error> {
- self.serialize_map(Some(len))
- }
-
- fn serialize_struct_variant_elt<V>(&mut self,
- state: &mut Encoder,
- key: &'static str,
- value: V) -> Result<(), Error>
- where V: ser::Serialize
- {
- try!(self.serialize_map_key(state, key));
- self.serialize_map_value(state, value)
- }
-
- fn serialize_struct_variant_end(&mut self, state: Self) -> Result<(), Error> {
- self.serialize_map_end(state)
- }
-
- fn serialize_newtype_struct<T>(&mut self,
- _name: &'static str,
- value: T) -> Result<(), Self::Error>
- where T: ser::Serialize,
- {
- // Don't serialize the newtype struct in a tuple.
- value.serialize(self)
- }
-
- fn serialize_newtype_variant<T>(&mut self,
- _name: &'static str,
- _variant_index: usize,
- _variant: &'static str,
- value: T) -> Result<(), Self::Error>
- where T: ser::Serialize,
- {
- // Don't serialize the newtype struct variant in a tuple.
- value.serialize(self)
- }
-
- fn serialize_unit_variant(&mut self,
- _name: &'static str,
- _variant_index: usize,
- _variant: &'static str,
- ) -> Result<(), Self::Error>
- {
- Ok(())
- }
-}
-
-impl ser::Serialize for Value {
- fn serialize<E>(&self, e: &mut E) -> Result<(), E::Error>
- where E: ser::Serializer
- {
- match *self {
- Value::String(ref s) => e.serialize_str(s),
- Value::Integer(i) => e.serialize_i64(i),
- Value::Float(f) => e.serialize_f64(f),
- Value::Boolean(b) => e.serialize_bool(b),
- Value::Datetime(ref s) => e.serialize_str(s),
- Value::Array(ref a) => {
- let mut state = try!(e.serialize_seq(Some(a.len())));
- for el in a.iter() {
- try!(e.serialize_seq_elt(&mut state, el));
- }
- e.serialize_seq_end(state)
- }
- Value::Table(ref t) => {
- let mut state = try!(e.serialize_map(Some(t.len())));
- for (k, v) in t.iter() {
- try!(e.serialize_map_key(&mut state, k));
- try!(e.serialize_map_value(&mut state, v));
- }
- e.serialize_map_end(state)
- }
- }
- }
-}
-
-impl ser::Error for Error {
- fn custom<T: Into<String>>(msg: T) -> Error {
- Error::Custom(msg.into())
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/src/lib.rs
+++ /dev/null
@@ -1,492 +0,0 @@
-//! A TOML-parsing library
-//!
-//! This library is an implementation in Rust of a parser for TOML configuration
-//! files [1]. It is focused around high quality errors including specific spans
-//! and detailed error messages when things go wrong.
-//!
-//! This implementation currently passes the language agnostic [test suite][2].
-//!
-//! # Example
-//!
-//! ```
-//! let toml = r#"
-//! [test]
-//! foo = "bar"
-//! "#;
-//!
-//! let value = toml::Parser::new(toml).parse().unwrap();
-//! println!("{:?}", value);
-//! ```
-//!
-//! # Conversions
-//!
-//! This library also supports using the standard `Encodable` and `Decodable`
-//! traits with TOML values. This library provides the following conversion
-//! capabilities:
-//!
-//! * `String` => `toml::Value` - via `Parser`
-//! * `toml::Value` => `String` - via `Display`
-//! * `toml::Value` => rust object - via `Decoder`
-//! * rust object => `toml::Value` - via `Encoder`
-//!
-//! Convenience functions for performing multiple conversions at a time are also
-//! provided.
-//!
-//! [1]: https://github.com/mojombo/toml
-//! [2]: https://github.com/BurntSushi/toml-test
-
-#![doc(html_root_url = "http://alexcrichton.com/toml-rs")]
-#![deny(missing_docs)]
-#![cfg_attr(test, deny(warnings))]
-
-#[cfg(feature = "rustc-serialize")] extern crate rustc_serialize;
-#[cfg(feature = "serde")] extern crate serde;
-
-use std::collections::BTreeMap;
-use std::str::FromStr;
-
-pub use parser::{Parser, ParserError};
-
-#[cfg(any(feature = "rustc-serialize", feature = "serde"))]
-pub use self::encoder::{Encoder, Error, EncoderState, encode, encode_str};
-#[cfg(any(feature = "rustc-serialize", feature = "serde"))]
-pub use self::decoder::{Decoder, DecodeError, DecodeErrorKind, decode, decode_str};
-
-mod parser;
-mod display;
-#[cfg(any(feature = "rustc-serialize", feature = "serde"))]
-mod encoder;
-#[cfg(any(feature = "rustc-serialize", feature = "serde"))]
-mod decoder;
-
-/// Representation of a TOML value.
-#[derive(PartialEq, Clone, Debug)]
-#[allow(missing_docs)]
-pub enum Value {
- String(String),
- Integer(i64),
- Float(f64),
- Boolean(bool),
- Datetime(String),
- Array(Array),
- Table(Table),
-}
-
-/// Type representing a TOML array, payload of the `Value::Array` variant
-pub type Array = Vec<Value>;
-
-/// Type representing a TOML table, payload of the `Value::Table` variant
-pub type Table = BTreeMap<String, Value>;
-
-impl Value {
- /// Tests whether this and another value have the same type.
- pub fn same_type(&self, other: &Value) -> bool {
- match (self, other) {
- (&Value::String(..), &Value::String(..)) |
- (&Value::Integer(..), &Value::Integer(..)) |
- (&Value::Float(..), &Value::Float(..)) |
- (&Value::Boolean(..), &Value::Boolean(..)) |
- (&Value::Datetime(..), &Value::Datetime(..)) |
- (&Value::Array(..), &Value::Array(..)) |
- (&Value::Table(..), &Value::Table(..)) => true,
-
- _ => false,
- }
- }
-
- /// Returns a human-readable representation of the type of this value.
- pub fn type_str(&self) -> &'static str {
- match *self {
- Value::String(..) => "string",
- Value::Integer(..) => "integer",
- Value::Float(..) => "float",
- Value::Boolean(..) => "boolean",
- Value::Datetime(..) => "datetime",
- Value::Array(..) => "array",
- Value::Table(..) => "table",
- }
- }
-
- /// Extracts the string of this value if it is a string.
- pub fn as_str(&self) -> Option<&str> {
- match *self { Value::String(ref s) => Some(&**s), _ => None }
- }
-
- /// Extracts the integer value if it is an integer.
- pub fn as_integer(&self) -> Option<i64> {
- match *self { Value::Integer(i) => Some(i), _ => None }
- }
-
- /// Extracts the float value if it is a float.
- pub fn as_float(&self) -> Option<f64> {
- match *self { Value::Float(f) => Some(f), _ => None }
- }
-
- /// Extracts the boolean value if it is a boolean.
- pub fn as_bool(&self) -> Option<bool> {
- match *self { Value::Boolean(b) => Some(b), _ => None }
- }
-
- /// Extracts the datetime value if it is a datetime.
- ///
- /// Note that a parsed TOML value will only contain ISO 8601 dates. An
- /// example date is:
- ///
- /// ```notrust
- /// 1979-05-27T07:32:00Z
- /// ```
- pub fn as_datetime(&self) -> Option<&str> {
- match *self { Value::Datetime(ref s) => Some(&**s), _ => None }
- }
-
- /// Extracts the array value if it is an array.
- pub fn as_slice(&self) -> Option<&[Value]> {
- match *self { Value::Array(ref s) => Some(&**s), _ => None }
- }
-
- /// Extracts the table value if it is a table.
- pub fn as_table(&self) -> Option<&Table> {
- match *self { Value::Table(ref s) => Some(s), _ => None }
- }
-
- /// Lookups for value at specified path.
- ///
- /// Uses '.' as a path separator.
- ///
- /// Note: arrays have zero-based indexes.
- ///
- /// Note: empty path returns self.
- ///
- /// ```
- /// # #![allow(unstable)]
- /// let toml = r#"
- /// [test]
- /// foo = "bar"
- ///
- /// [[values]]
- /// foo = "baz"
- ///
- /// [[values]]
- /// foo = "qux"
- /// "#;
- /// let value: toml::Value = toml.parse().unwrap();
- ///
- /// let foo = value.lookup("test.foo").unwrap();
- /// assert_eq!(foo.as_str().unwrap(), "bar");
- ///
- /// let foo = value.lookup("values.1.foo").unwrap();
- /// assert_eq!(foo.as_str().unwrap(), "qux");
- ///
- /// let no_bar = value.lookup("test.bar");
- /// assert_eq!(no_bar.is_none(), true);
- /// ```
- pub fn lookup(&self, path: &str) -> Option<&Value> {
- let ref path = match Parser::new(path).lookup() {
- Some(path) => path,
- None => return None,
- };
- let mut cur_value = self;
- if path.is_empty() {
- return Some(cur_value)
- }
-
- for key in path {
- match *cur_value {
- Value::Table(ref hm) => {
- match hm.get(key) {
- Some(v) => cur_value = v,
- None => return None
- }
- },
- Value::Array(ref v) => {
- match key.parse::<usize>().ok() {
- Some(idx) if idx < v.len() => cur_value = &v[idx],
- _ => return None
- }
- },
- _ => return None
- }
- };
-
- Some(cur_value)
-
- }
- /// Lookups for mutable value at specified path.
- ///
- /// Uses '.' as a path separator.
- ///
- /// Note: arrays have zero-based indexes.
- ///
- /// Note: empty path returns self.
- ///
- /// ```
- /// # #![allow(unstable)]
- /// let toml = r#"
- /// [test]
- /// foo = "bar"
- ///
- /// [[values]]
- /// foo = "baz"
- ///
- /// [[values]]
- /// foo = "qux"
- /// "#;
- /// let mut value: toml::Value = toml.parse().unwrap();
- /// {
- /// let string = value.lookup_mut("test.foo").unwrap();
- /// assert_eq!(string, &mut toml::Value::String(String::from("bar")));
- /// *string = toml::Value::String(String::from("foo"));
- /// }
- /// let result = value.lookup_mut("test.foo").unwrap();
- /// assert_eq!(result.as_str().unwrap(), "foo");
- /// ```
- pub fn lookup_mut(&mut self, path: &str) -> Option<&mut Value> {
- let ref path = match Parser::new(path).lookup() {
- Some(path) => path,
- None => return None,
- };
-
- let mut cur = self;
- if path.is_empty() {
- return Some(cur)
- }
-
- for key in path {
- let tmp = cur;
- match *tmp {
- Value::Table(ref mut hm) => {
- match hm.get_mut(key) {
- Some(v) => cur = v,
- None => return None
- }
- }
- Value::Array(ref mut v) => {
- match key.parse::<usize>().ok() {
- Some(idx) if idx < v.len() => cur = &mut v[idx],
- _ => return None
- }
- }
- _ => return None
- }
- }
- Some(cur)
- }
-}
-
-impl FromStr for Value {
- type Err = Vec<ParserError>;
- fn from_str(s: &str) -> Result<Value, Vec<ParserError>> {
- let mut p = Parser::new(s);
- match p.parse().map(Value::Table) {
- Some(n) => Ok(n),
- None => Err(p.errors),
- }
- }
-}
-
-#[cfg(test)]
-mod tests {
- use super::Value;
-
- #[test]
- fn lookup_mut_change() {
- let toml = r#"
- [test]
- foo = "bar"
-
- [[values]]
- foo = "baz"
-
- [[values]]
- foo = "qux"
- "#;
-
- let mut value: Value = toml.parse().unwrap();
- {
- let foo = value.lookup_mut("values.0.foo").unwrap();
- *foo = Value::String(String::from("bar"));
- }
- let foo = value.lookup("values.0.foo").unwrap();
- assert_eq!(foo.as_str().unwrap(), "bar");
- }
-
- #[test]
- fn lookup_mut_valid() {
- let toml = r#"
- [test]
- foo = "bar"
-
- [[values]]
- foo = "baz"
-
- [[values]]
- foo = "qux"
- "#;
-
- let mut value: Value = toml.parse().unwrap();
-
- {
- let test_foo = value.lookup_mut("test.foo").unwrap();
- assert_eq!(test_foo.as_str().unwrap(), "bar");
- }
-
- {
- let foo1 = value.lookup_mut("values.1.foo").unwrap();
- assert_eq!(foo1.as_str().unwrap(), "qux");
- }
-
- assert!(value.lookup_mut("test.bar").is_none());
- assert!(value.lookup_mut("test.foo.bar").is_none());
- }
-
- #[test]
- fn lookup_mut_invalid_index() {
- let toml = r#"
- [[values]]
- foo = "baz"
- "#;
-
- let mut value: Value = toml.parse().unwrap();
-
- {
- let foo = value.lookup_mut("test.foo");
- assert!(foo.is_none());
- }
-
- {
- let foo = value.lookup_mut("values.100.foo");
- assert!(foo.is_none());
- }
-
- {
- let foo = value.lookup_mut("values.str.foo");
- assert!(foo.is_none());
- }
- }
-
- #[test]
- fn lookup_mut_self() {
- let mut value: Value = r#"foo = "bar""#.parse().unwrap();
-
- {
- let foo = value.lookup_mut("foo").unwrap();
- assert_eq!(foo.as_str().unwrap(), "bar");
- }
-
- let foo = value.lookup_mut("").unwrap();
- assert!(foo.as_table().is_some());
-
- let baz = foo.lookup_mut("foo").unwrap();
- assert_eq!(baz.as_str().unwrap(), "bar");
- }
-
- #[test]
- fn lookup_valid() {
- let toml = r#"
- [test]
- foo = "bar"
-
- [[values]]
- foo = "baz"
-
- [[values]]
- foo = "qux"
- "#;
-
- let value: Value = toml.parse().unwrap();
-
- let test_foo = value.lookup("test.foo").unwrap();
- assert_eq!(test_foo.as_str().unwrap(), "bar");
-
- let foo1 = value.lookup("values.1.foo").unwrap();
- assert_eq!(foo1.as_str().unwrap(), "qux");
-
- assert!(value.lookup("test.bar").is_none());
- assert!(value.lookup("test.foo.bar").is_none());
- }
-
- #[test]
- fn lookup_invalid_index() {
- let toml = r#"
- [[values]]
- foo = "baz"
- "#;
-
- let value: Value = toml.parse().unwrap();
-
- let foo = value.lookup("test.foo");
- assert!(foo.is_none());
-
- let foo = value.lookup("values.100.foo");
- assert!(foo.is_none());
-
- let foo = value.lookup("values.str.foo");
- assert!(foo.is_none());
- }
-
- #[test]
- fn lookup_self() {
- let value: Value = r#"foo = "bar""#.parse().unwrap();
-
- let foo = value.lookup("foo").unwrap();
- assert_eq!(foo.as_str().unwrap(), "bar");
-
- let foo = value.lookup("").unwrap();
- assert!(foo.as_table().is_some());
-
- let baz = foo.lookup("foo").unwrap();
- assert_eq!(baz.as_str().unwrap(), "bar");
- }
-
- #[test]
- fn lookup_advanced() {
- let value: Value = "[table]\n\"value\" = 0".parse().unwrap();
- let looked = value.lookup("table.\"value\"").unwrap();
- assert_eq!(*looked, Value::Integer(0));
- }
-
- #[test]
- fn lookup_advanced_table() {
- let value: Value = "[table.\"name.other\"]\nvalue = \"my value\"".parse().unwrap();
- let looked = value.lookup(r#"table."name.other".value"#).unwrap();
- assert_eq!(*looked, Value::String(String::from("my value")));
- }
-
- #[test]
- fn lookup_mut_advanced() {
- let mut value: Value = "[table]\n\"value\" = [0, 1, 2]".parse().unwrap();
- let looked = value.lookup_mut("table.\"value\".1").unwrap();
- assert_eq!(*looked, Value::Integer(1));
- }
-
- #[test]
- fn single_dot() {
- let value: Value = "[table]\n\"value\" = [0, 1, 2]".parse().unwrap();
- assert_eq!(None, value.lookup("."));
- }
-
- #[test]
- fn array_dot() {
- let value: Value = "[table]\n\"value\" = [0, 1, 2]".parse().unwrap();
- assert_eq!(None, value.lookup("0."));
- }
-
- #[test]
- fn dot_inside() {
- let value: Value = "[table]\n\"value\" = [0, 1, 2]".parse().unwrap();
- assert_eq!(None, value.lookup("table.\"value.0\""));
- }
-
- #[test]
- fn table_with_quotes() {
- let value: Value = "[table.\"element\"]\n\"value\" = [0, 1, 2]".parse().unwrap();
- assert_eq!(None, value.lookup("\"table.element\".\"value\".0"));
- }
-
- #[test]
- fn table_with_quotes_2() {
- let value: Value = "[table.\"element\"]\n\"value\" = [0, 1, 2]".parse().unwrap();
- assert_eq!(Value::Integer(0), *value.lookup("table.\"element\".\"value\".0").unwrap());
- }
-
-}
deleted file mode 100644
--- a/third_party/rust/toml/src/parser.rs
+++ /dev/null
@@ -1,1627 +0,0 @@
-use std::char;
-use std::collections::btree_map::{BTreeMap, Entry};
-use std::error::Error;
-use std::fmt;
-use std::str;
-
-macro_rules! try {
- ($e:expr) => (match $e { Some(s) => s, None => return None })
-}
-
-// We redefine Value because we need to keep track of encountered table
-// definitions, eg when parsing:
-//
-// [a]
-// [a.b]
-// [a]
-//
-// we have to error out on redefinition of [a]. This bit of data is difficult to
-// track in a side table so we just have a "stripped down" AST to work with
-// which has the relevant metadata fields in it.
-struct TomlTable {
- values: BTreeMap<String, Value>,
- defined: bool,
-}
-
-impl TomlTable {
- fn convert(self) -> super::Table {
- self.values.into_iter().map(|(k,v)| (k, v.convert())).collect()
- }
-}
-
-enum Value {
- String(String),
- Integer(i64),
- Float(f64),
- Boolean(bool),
- Datetime(String),
- Array(Vec<Value>),
- Table(TomlTable),
-}
-
-impl Value {
- fn type_str(&self) -> &'static str {
- match *self {
- Value::String(..) => "string",
- Value::Integer(..) => "integer",
- Value::Float(..) => "float",
- Value::Boolean(..) => "boolean",
- Value::Datetime(..) => "datetime",
- Value::Array(..) => "array",
- Value::Table(..) => "table",
- }
- }
-
- fn same_type(&self, other: &Value) -> bool {
- match (self, other) {
- (&Value::String(..), &Value::String(..)) |
- (&Value::Integer(..), &Value::Integer(..)) |
- (&Value::Float(..), &Value::Float(..)) |
- (&Value::Boolean(..), &Value::Boolean(..)) |
- (&Value::Datetime(..), &Value::Datetime(..)) |
- (&Value::Array(..), &Value::Array(..)) |
- (&Value::Table(..), &Value::Table(..)) => true,
-
- _ => false,
- }
- }
-
- fn convert(self) -> super::Value {
- match self {
- Value::String(x) => super::Value::String(x),
- Value::Integer(x) => super::Value::Integer(x),
- Value::Float(x) => super::Value::Float(x),
- Value::Boolean(x) => super::Value::Boolean(x),
- Value::Datetime(x) => super::Value::Datetime(x),
- Value::Array(v) =>
- super::Value::Array(
- v.into_iter().map(|x| x.convert()).collect()
- ),
- Value::Table(t) => super::Value::Table(t.convert())
- }
- }
-}
-
-/// Parser for converting a string to a TOML `Value` instance.
-///
-/// This parser contains the string slice that is being parsed, and exports the
-/// list of errors which have occurred during parsing.
-pub struct Parser<'a> {
- input: &'a str,
- cur: str::CharIndices<'a>,
- require_newline_after_table: bool,
-
- /// A list of all errors which have occurred during parsing.
- ///
- /// Not all parse errors are fatal, so this list is added to as much as
- /// possible without aborting parsing. If `None` is returned by `parse`, it
- /// is guaranteed that this list is not empty.
- pub errors: Vec<ParserError>,
-}
-
-/// A structure representing a parse error.
-///
-/// The data in this structure can be used to trace back to the original cause
-/// of the error in order to provide diagnostics about parse errors.
-#[derive(Debug, Clone)]
-pub struct ParserError {
- /// The low byte at which this error is pointing at.
- pub lo: usize,
- /// One byte beyond the last character at which this error is pointing at.
- pub hi: usize,
- /// A human-readable description explaining what the error is.
- pub desc: String,
-}
-
-impl<'a> Parser<'a> {
- /// Creates a new parser for a string.
- ///
- /// The parser can be executed by invoking the `parse` method.
- ///
- /// # Example
- ///
- /// ```
- /// let toml = r#"
- /// [test]
- /// foo = "bar"
- /// "#;
- ///
- /// let mut parser = toml::Parser::new(toml);
- /// match parser.parse() {
- /// Some(value) => println!("found toml: {:?}", value),
- /// None => {
- /// println!("parse errors: {:?}", parser.errors);
- /// }
- /// }
- /// ```
- pub fn new(s: &'a str) -> Parser<'a> {
- Parser {
- input: s,
- cur: s.char_indices(),
- errors: Vec::new(),
- require_newline_after_table: true,
- }
- }
-
- /// Converts a byte offset from an error message to a (line, column) pair
- ///
- /// All indexes are 0-based.
- pub fn to_linecol(&self, offset: usize) -> (usize, usize) {
- let mut cur = 0;
- for (i, line) in self.input.lines().enumerate() {
- if cur + line.len() + 1 > offset {
- return (i, offset - cur)
- }
- cur += line.len() + 1;
- }
- (self.input.lines().count(), 0)
- }
-
- /// Historical versions of toml-rs accidentally allowed a newline after a
- /// table definition, but the TOML spec requires a newline after a table
- /// definition header.
- ///
- /// This option can be set to `false` (the default is `true`) to emulate
- /// this behavior for backwards compatibility with older toml-rs versions.
- pub fn set_require_newline_after_table(&mut self, require: bool) {
- self.require_newline_after_table = require;
- }
-
- fn next_pos(&self) -> usize {
- self.cur.clone().next().map(|p| p.0).unwrap_or(self.input.len())
- }
-
- // Returns true and consumes the next character if it matches `ch`,
- // otherwise do nothing and return false
- fn eat(&mut self, ch: char) -> bool {
- match self.peek(0) {
- Some((_, c)) if c == ch => { self.cur.next(); true }
- Some(_) | None => false,
- }
- }
-
- // Peeks ahead `n` characters
- fn peek(&self, n: usize) -> Option<(usize, char)> {
- self.cur.clone().skip(n).next()
- }
-
- fn expect(&mut self, ch: char) -> bool {
- if self.eat(ch) { return true }
- let mut it = self.cur.clone();
- let lo = it.next().map(|p| p.0).unwrap_or(self.input.len());
- let hi = it.next().map(|p| p.0).unwrap_or(self.input.len());
- self.errors.push(ParserError {
- lo: lo,
- hi: hi,
- desc: match self.cur.clone().next() {
- Some((_, c)) => format!("expected `{}`, but found `{}`", ch, c),
- None => format!("expected `{}`, but found eof", ch)
- }
- });
- false
- }
-
- // Consumes a BOM (Byte Order Mark) if one is next
- fn bom(&mut self) -> bool {
- match self.peek(0) {
- Some((_, '\u{feff}')) => { self.cur.next(); true }
- _ => false
- }
- }
-
- // Consumes whitespace ('\t' and ' ') until another character (or EOF) is
- // reached. Returns if any whitespace was consumed
- fn ws(&mut self) -> bool {
- let mut ret = false;
- loop {
- match self.peek(0) {
- Some((_, '\t')) |
- Some((_, ' ')) => { self.cur.next(); ret = true; }
- _ => break,
- }
- }
- ret
- }
-
- // Consumes the rest of the line after a comment character
- fn comment(&mut self) -> bool {
- if !self.eat('#') { return false }
- for (_, ch) in self.cur.by_ref() {
- if ch == '\n' { break }
- }
- true
- }
-
- // Consumes a newline if one is next
- fn newline(&mut self) -> bool {
- match self.peek(0) {
- Some((_, '\n')) => { self.cur.next(); true }
- Some((_, '\r')) if self.peek(1).map(|c| c.1) == Some('\n') => {
- self.cur.next(); self.cur.next(); true
- }
- _ => false
- }
- }
-
- // Match EOF
- fn eof(&self) -> bool {
- self.peek(0).is_none()
- }
-
- /// Executes the parser, parsing the string contained within.
- ///
- /// This function will return the `TomlTable` instance if parsing is
- /// successful, or it will return `None` if any parse error or invalid TOML
- /// error occurs.
- ///
- /// If an error occurs, the `errors` field of this parser can be consulted
- /// to determine the cause of the parse failure.
- pub fn parse(&mut self) -> Option<super::Table> {
- let mut ret = TomlTable { values: BTreeMap::new(), defined: false };
- self.bom();
- while self.peek(0).is_some() {
- self.ws();
- if self.newline() { continue }
- if self.comment() { continue }
- if self.eat('[') {
- let array = self.eat('[');
- let start = self.next_pos();
-
- // Parse the name of the section
- let mut keys = Vec::new();
- loop {
- self.ws();
- if let Some(s) = self.key_name() {
- keys.push(s);
- }
- self.ws();
- if self.eat(']') {
- if array && !self.expect(']') { return None }
- break
- }
- if !self.expect('.') { return None }
- }
- if keys.is_empty() { return None }
-
- // Build the section table
- let mut table = TomlTable {
- values: BTreeMap::new(),
- defined: true,
- };
- if self.require_newline_after_table {
- self.ws();
- if !self.comment() && !self.newline() && !self.eof() {
- self.errors.push(ParserError {
- lo: start,
- hi: start,
- desc: "expected a newline after table definition".to_string(),
- });
- return None
- }
- }
- if !self.values(&mut table) { return None }
- if array {
- self.insert_array(&mut ret, &keys, Value::Table(table),
- start)
- } else {
- self.insert_table(&mut ret, &keys, table, start)
- }
- } else if !self.values(&mut ret) {
- return None
- }
- }
- if !self.errors.is_empty() {
- None
- } else {
- Some(ret.convert())
- }
- }
-
- // Parse an array index as a natural number
- fn array_index(&mut self) -> Option<String> {
- self.integer(0, false, false)
- }
-
- /// Parse a path into a vector of paths
- pub fn lookup(&mut self) -> Option<Vec<String>> {
- if self.input.is_empty() {
- return Some(vec![]);
- }
- let mut keys = Vec::new();
- loop {
- self.ws();
- if let Some(s) = self.key_name() {
- keys.push(s);
- } else if let Some(s) = self.array_index() {
- keys.push(s);
- } else {
- return None
- }
- self.ws();
- if !self.expect('.') { return Some(keys) }
- }
- }
-
- // Parse a single key name starting at `start`
- fn key_name(&mut self) -> Option<String> {
- let start = self.next_pos();
- let key = if self.eat('"') {
- self.finish_basic_string(start, false)
- } else if self.eat('\'') {
- self.finish_literal_string(start, false)
- } else {
- let mut ret = String::new();
- while let Some((_, ch)) = self.cur.clone().next() {
- match ch {
- 'a' ... 'z' |
- 'A' ... 'Z' |
- '0' ... '9' |
- '_' | '-' => { self.cur.next(); ret.push(ch) }
- _ => break,
- }
- }
- Some(ret)
- };
- match key {
- Some(ref name) if name.is_empty() => {
- self.errors.push(ParserError {
- lo: start,
- hi: start,
- desc: "expected a key but found an empty string".to_string(),
- });
- None
- }
- Some(name) => Some(name),
- None => None,
- }
- }
-
- // Parses the values into the given TomlTable. Returns true in case of success
- // and false in case of error.
- fn values(&mut self, into: &mut TomlTable) -> bool {
- loop {
- self.ws();
- if self.newline() { continue }
- if self.comment() { continue }
- match self.peek(0) {
- Some((_, '[')) => break,
- Some(..) => {}
- None => break,
- }
- let key_lo = self.next_pos();
- let key = match self.key_name() {
- Some(s) => s,
- None => return false
- };
- if !self.keyval_sep() { return false }
- let value = match self.value() {
- Some(value) => value,
- None => return false,
- };
- let end = self.next_pos();
- self.insert(into, key, value, key_lo);
- self.ws();
- if !self.comment() && !self.newline() {
- if self.peek(0).is_none() {
- return true
- }
- self.errors.push(ParserError {
- lo: key_lo,
- hi: end,
- desc: "expected a newline after a key".to_string(),
- });
- return false
- }
- }
- true
- }
-
- fn keyval_sep(&mut self) -> bool {
- self.ws();
- if !self.expect('=') { return false }
- self.ws();
- true
- }
-
- // Parses a value
- fn value(&mut self) -> Option<Value> {
- self.ws();
- match self.cur.clone().next() {
- Some((pos, '"')) => self.basic_string(pos),
- Some((pos, '\'')) => self.literal_string(pos),
- Some((pos, 't')) |
- Some((pos, 'f')) => self.boolean(pos),
- Some((pos, '[')) => self.array(pos),
- Some((pos, '{')) => self.inline_table(pos),
- Some((pos, '-')) |
- Some((pos, '+')) => self.number_or_datetime(pos),
- Some((pos, ch)) if is_digit(ch) => self.number_or_datetime(pos),
- _ => {
- let mut it = self.cur.clone();
- let lo = it.next().map(|p| p.0).unwrap_or(self.input.len());
- let hi = it.next().map(|p| p.0).unwrap_or(self.input.len());
- self.errors.push(ParserError {
- lo: lo,
- hi: hi,
- desc: "expected a value".to_string(),
- });
- None
- }
- }
- }
-
- // Parses a single or multi-line string
- fn basic_string(&mut self, start: usize) -> Option<Value> {
- if !self.expect('"') { return None }
- let mut multiline = false;
-
- // detect multiline literals, but be careful about empty ""
- // strings
- if self.eat('"') {
- if self.eat('"') {
- multiline = true;
- self.newline();
- } else {
- // empty
- return Some(Value::String(String::new()))
- }
- }
-
- self.finish_basic_string(start, multiline).map(Value::String)
- }
-
- // Finish parsing a basic string after the opening quote has been seen
- fn finish_basic_string(&mut self,
- start: usize,
- multiline: bool) -> Option<String> {
- let mut ret = String::new();
- loop {
- while multiline && self.newline() { ret.push('\n') }
- match self.cur.next() {
- Some((_, '"')) => {
- if multiline {
- if !self.eat('"') { ret.push_str("\""); continue }
- if !self.eat('"') { ret.push_str("\"\""); continue }
- }
- return Some(ret)
- }
- Some((pos, '\\')) => {
- if let Some(c) = escape(self, pos, multiline) {
- ret.push(c);
- }
- }
- Some((pos, ch)) if ch < '\u{1f}' => {
- self.errors.push(ParserError {
- lo: pos,
- hi: pos + 1,
- desc: format!("control character `{}` must be escaped",
- ch.escape_default().collect::<String>())
- });
- }
- Some((_, ch)) => ret.push(ch),
- None => {
- self.errors.push(ParserError {
- lo: start,
- hi: self.input.len(),
- desc: "unterminated string literal".to_string(),
- });
- return None
- }
- }
- }
-
- fn escape(me: &mut Parser, pos: usize, multiline: bool) -> Option<char> {
- if multiline && me.newline() {
- while me.ws() || me.newline() { /* ... */ }
- return None
- }
- match me.cur.next() {
- Some((_, 'b')) => Some('\u{8}'),
- Some((_, 't')) => Some('\u{9}'),
- Some((_, 'n')) => Some('\u{a}'),
- Some((_, 'f')) => Some('\u{c}'),
- Some((_, 'r')) => Some('\u{d}'),
- Some((_, '"')) => Some('\u{22}'),
- Some((_, '\\')) => Some('\u{5c}'),
- Some((pos, c @ 'u')) |
- Some((pos, c @ 'U')) => {
- let len = if c == 'u' {4} else {8};
- let num = &me.input[pos+1..];
- let num = if num.char_indices().nth(len).map(|(i, _)| i).unwrap_or(0) == len {
- &num[..len]
- } else {
- "invalid"
- };
- if let Some(n) = u32::from_str_radix(num, 16).ok() {
- if let Some(c) = char::from_u32(n) {
- me.cur.by_ref().skip(len - 1).next();
- return Some(c)
- } else {
- me.errors.push(ParserError {
- lo: pos + 1,
- hi: pos + 5,
- desc: format!("codepoint `{:x}` is \
- not a valid unicode \
- codepoint", n),
- })
- }
- } else {
- me.errors.push(ParserError {
- lo: pos,
- hi: pos + 1,
- desc: format!("expected {} hex digits \
- after a `{}` escape", len, c),
- })
- }
- None
- }
- Some((pos, ch)) => {
- let next_pos = me.next_pos();
- me.errors.push(ParserError {
- lo: pos,
- hi: next_pos,
- desc: format!("unknown string escape: `{}`",
- ch.escape_default().collect::<String>()),
- });
- None
- }
- None => {
- me.errors.push(ParserError {
- lo: pos,
- hi: pos + 1,
- desc: "unterminated escape sequence".to_string(),
- });
- None
- }
- }
- }
- }
-
- fn literal_string(&mut self, start: usize) -> Option<Value> {
- if !self.expect('\'') { return None }
- let mut multiline = false;
-
- // detect multiline literals
- if self.eat('\'') {
- if self.eat('\'') {
- multiline = true;
- self.newline();
- } else {
- return Some(Value::String(String::new())) // empty
- }
- }
-
- self.finish_literal_string(start, multiline).map(Value::String)
- }
-
- fn finish_literal_string(&mut self, start: usize, multiline: bool)
- -> Option<String> {
- let mut ret = String::new();
- loop {
- if !multiline && self.newline() {
- let next = self.next_pos();
- self.errors.push(ParserError {
- lo: start,
- hi: next,
- desc: "literal strings cannot contain newlines".to_string(),
- });
- return None
- }
- match self.cur.next() {
- Some((_, '\'')) => {
- if multiline {
- if !self.eat('\'') { ret.push_str("'"); continue }
- if !self.eat('\'') { ret.push_str("''"); continue }
- }
- return Some(ret)
- }
- Some((_, ch)) => ret.push(ch),
- None => {
- self.errors.push(ParserError {
- lo: start,
- hi: self.input.len(),
- desc: "unterminated string literal".to_string(),
- });
- return None
- }
- }
- }
- }
-
- fn number_or_datetime(&mut self, start: usize) -> Option<Value> {
- let mut is_float = false;
- let prefix = try!(self.integer(start, false, true));
- let decimal = if self.eat('.') {
- is_float = true;
- Some(try!(self.integer(start, true, false)))
- } else {
- None
- };
- let exponent = if self.eat('e') || self.eat('E') {
- is_float = true;
- Some(try!(self.integer(start, false, true)))
- } else {
- None
- };
- let end = self.next_pos();
- let input = &self.input[start..end];
- let ret = if decimal.is_none() &&
- exponent.is_none() &&
- !input.starts_with('+') &&
- !input.starts_with('-') &&
- start + 4 == end &&
- self.eat('-') {
- self.datetime(start)
- } else {
- let input = match (decimal, exponent) {
- (None, None) => prefix,
- (Some(ref d), None) => prefix + "." + d,
- (None, Some(ref e)) => prefix + "E" + e,
- (Some(ref d), Some(ref e)) => prefix + "." + d + "E" + e,
- };
- let input = input.trim_left_matches('+');
- if is_float {
- input.parse().ok().map(Value::Float)
- } else {
- input.parse().ok().map(Value::Integer)
- }
- };
- if ret.is_none() {
- self.errors.push(ParserError {
- lo: start,
- hi: end,
- desc: "invalid numeric literal".to_string(),
- });
- }
- ret
- }
-
- fn integer(&mut self,
- start: usize,
- allow_leading_zeros: bool,
- allow_sign: bool) -> Option<String> {
- let mut s = String::new();
- if allow_sign {
- if self.eat('-') { s.push('-'); }
- else if self.eat('+') { s.push('+'); }
- }
- match self.cur.next() {
- Some((_, '0')) if !allow_leading_zeros => {
- s.push('0');
- match self.peek(0) {
- Some((pos, c)) if '0' <= c && c <= '9' => {
- self.errors.push(ParserError {
- lo: start,
- hi: pos,
- desc: "leading zeroes are not allowed".to_string(),
- });
- return None
- }
- _ => {}
- }
- }
- Some((_, ch)) if '0' <= ch && ch <= '9' => {
- s.push(ch);
- }
- _ => {
- let pos = self.next_pos();
- self.errors.push(ParserError {
- lo: pos,
- hi: pos,
- desc: "expected start of a numeric literal".to_string(),
- });
- return None;
- }
- }
- let mut underscore = false;
- loop {
- match self.cur.clone().next() {
- Some((_, ch)) if '0' <= ch && ch <= '9' => {
- s.push(ch);
- self.cur.next();
- underscore = false;
- }
- Some((_, '_')) if !underscore => {
- self.cur.next();
- underscore = true;
- }
- Some(_) | None => break,
- }
- }
- if underscore {
- let pos = self.next_pos();
- self.errors.push(ParserError {
- lo: pos,
- hi: pos,
- desc: "numeral cannot end with an underscore".to_string(),
- });
- None
- } else {
- Some(s)
- }
- }
-
- fn boolean(&mut self, start: usize) -> Option<Value> {
- let rest = &self.input[start..];
- if rest.starts_with("true") {
- for _ in 0..4 {
- self.cur.next();
- }
- Some(Value::Boolean(true))
- } else if rest.starts_with("false") {
- for _ in 0..5 {
- self.cur.next();
- }
- Some(Value::Boolean(false))
- } else {
- let next = self.next_pos();
- self.errors.push(ParserError {
- lo: start,
- hi: next,
- desc: format!("unexpected character: `{}`",
- rest.chars().next().unwrap()),
- });
- None
- }
- }
-
- fn datetime(&mut self, start: usize) -> Option<Value> {
- // Up to `start` already contains the year, and we've eaten the next
- // `-`, so we just resume parsing from there.
-
- let mut valid = true;
-
- // month
- valid = valid && digit(self.cur.next());
- valid = valid && digit(self.cur.next());
-
- // day
- valid = valid && self.cur.next().map(|c| c.1) == Some('-');
- valid = valid && digit(self.cur.next());
- valid = valid && digit(self.cur.next());
-
- valid = valid && self.cur.next().map(|c| c.1) == Some('T');
-
- // hour
- valid = valid && digit(self.cur.next());
- valid = valid && digit(self.cur.next());
-
- // minute
- valid = valid && self.cur.next().map(|c| c.1) == Some(':');
- valid = valid && digit(self.cur.next());
- valid = valid && digit(self.cur.next());
-
- // second
- valid = valid && self.cur.next().map(|c| c.1) == Some(':');
- valid = valid && digit(self.cur.next());
- valid = valid && digit(self.cur.next());
-
- // fractional seconds
- if self.eat('.') {
- valid = valid && digit(self.cur.next());
- loop {
- match self.cur.clone().next() {
- Some((_, c)) if is_digit(c) => {
- self.cur.next();
- }
- _ => break,
- }
- }
- }
-
- // time zone
- if !self.eat('Z') {
- valid = valid && (self.eat('+') || self.eat('-'));
-
- // hour
- valid = valid && digit(self.cur.next());
- valid = valid && digit(self.cur.next());
-
- // minute
- valid = valid && self.cur.next().map(|c| c.1) == Some(':');
- valid = valid && digit(self.cur.next());
- valid = valid && digit(self.cur.next());
- }
-
- return if valid {
- Some(Value::Datetime(self.input[start..self.next_pos()].to_string()))
- } else {
- let next = self.next_pos();
- self.errors.push(ParserError {
- lo: start,
- hi: start + next,
- desc: "malformed date literal".to_string(),
- });
- None
- };
-
- fn digit(val: Option<(usize, char)>) -> bool {
- match val {
- Some((_, c)) => is_digit(c),
- None => false,
- }
- }
- }
-
- fn array(&mut self, _start: usize) -> Option<Value> {
- if !self.expect('[') { return None }
- let mut ret = Vec::new();
- fn consume(me: &mut Parser) {
- loop {
- me.ws();
- if !me.newline() && !me.comment() { break }
- }
- }
- let mut type_str = None;
- loop {
- // Break out early if we see the closing bracket
- consume(self);
- if self.eat(']') { return Some(Value::Array(ret)) }
-
- // Attempt to parse a value, triggering an error if it's the wrong
- // type.
- let start = self.next_pos();
- let value = try!(self.value());
- let end = self.next_pos();
- let expected = type_str.unwrap_or(value.type_str());
- if value.type_str() != expected {
- self.errors.push(ParserError {
- lo: start,
- hi: end,
- desc: format!("expected type `{}`, found type `{}`",
- expected, value.type_str()),
- });
- } else {
- type_str = Some(expected);
- ret.push(value);
- }
-
- // Look for a comma. If we don't find one we're done
- consume(self);
- if !self.eat(',') { break }
- }
- consume(self);
- if !self.expect(']') { return None }
- Some(Value::Array(ret))
- }
-
- fn inline_table(&mut self, _start: usize) -> Option<Value> {
- if !self.expect('{') { return None }
- self.ws();
- let mut ret = TomlTable { values: BTreeMap::new(), defined: true };
- if self.eat('}') { return Some(Value::Table(ret)) }
- loop {
- let lo = self.next_pos();
- let key = try!(self.key_name());
- if !self.keyval_sep() { return None }
- let value = try!(self.value());
- self.insert(&mut ret, key, value, lo);
-
- self.ws();
- if self.eat('}') { break }
- if !self.expect(',') { return None }
- self.ws();
- }
- Some(Value::Table(ret))
- }
-
- fn insert(&mut self, into: &mut TomlTable, key: String, value: Value,
- key_lo: usize) {
- if let Entry::Vacant(entry) = into.values.entry(key.clone()) {
- entry.insert(value);
- } else {
- self.errors.push(ParserError {
- lo: key_lo,
- hi: key_lo + key.len(),
- desc: format!("duplicate key: `{}`", key),
- });
- }
- }
-
- fn recurse<'b>(&mut self, mut cur: &'b mut TomlTable, keys: &'b [String],
- key_lo: usize) -> Option<(&'b mut TomlTable, &'b str)> {
- let key_hi = keys.iter().fold(0, |a, b| a + b.len());
- for part in keys[..keys.len() - 1].iter() {
- let tmp = cur;
-
- if tmp.values.contains_key(part) {
- match *tmp.values.get_mut(part).unwrap() {
- Value::Table(ref mut table) => cur = table,
- Value::Array(ref mut array) => {
- match array.last_mut() {
- Some(&mut Value::Table(ref mut table)) => cur = table,
- _ => {
- self.errors.push(ParserError {
- lo: key_lo,
- hi: key_hi,
- desc: format!("array `{}` does not contain \
- tables", part)
- });
- return None
- }
- }
- }
- _ => {
- self.errors.push(ParserError {
- lo: key_lo,
- hi: key_hi,
- desc: format!("key `{}` was not previously a table",
- part)
- });
- return None
- }
- }
- continue
- }
-
- // Initialize an empty table as part of this sub-key
- tmp.values.insert(part.clone(), Value::Table(TomlTable {
- values: BTreeMap::new(),
- defined: false,
- }));
- match *tmp.values.get_mut(part).unwrap() {
- Value::Table(ref mut inner) => cur = inner,
- _ => unreachable!(),
- }
- }
- Some((cur, &**keys.last().unwrap()))
- }
-
- fn insert_table(&mut self, into: &mut TomlTable, keys: &[String],
- table: TomlTable, key_lo: usize) {
- let (into, key) = match self.recurse(into, keys, key_lo) {
- Some(pair) => pair,
- None => return,
- };
- if !into.values.contains_key(key) {
- into.values.insert(key.to_owned(), Value::Table(table));
- return
- }
- if let Value::Table(ref mut into) = *into.values.get_mut(key).unwrap() {
- if into.defined {
- self.errors.push(ParserError {
- lo: key_lo,
- hi: key_lo + key.len(),
- desc: format!("redefinition of table `{}`", key),
- });
- }
- for (k, v) in table.values {
- if into.values.insert(k.clone(), v).is_some() {
- self.errors.push(ParserError {
- lo: key_lo,
- hi: key_lo + key.len(),
- desc: format!("duplicate key `{}` in table", k),
- });
- }
- }
- } else {
- self.errors.push(ParserError {
- lo: key_lo,
- hi: key_lo + key.len(),
- desc: format!("duplicate key `{}` in table", key),
- });
- }
- }
-
- fn insert_array(&mut self, into: &mut TomlTable,
- keys: &[String], value: Value, key_lo: usize) {
- let (into, key) = match self.recurse(into, keys, key_lo) {
- Some(pair) => pair,
- None => return,
- };
- if !into.values.contains_key(key) {
- into.values.insert(key.to_owned(), Value::Array(Vec::new()));
- }
- match *into.values.get_mut(key).unwrap() {
- Value::Array(ref mut vec) => {
- match vec.first() {
- Some(ref v) if !v.same_type(&value) => {
- self.errors.push(ParserError {
- lo: key_lo,
- hi: key_lo + key.len(),
- desc: format!("expected type `{}`, found type `{}`",
- v.type_str(), value.type_str()),
- })
- }
- Some(..) | None => {}
- }
- vec.push(value);
- }
- _ => {
- self.errors.push(ParserError {
- lo: key_lo,
- hi: key_lo + key.len(),
- desc: format!("key `{}` was previously not an array", key),
- });
- }
- }
- }
-}
-
-impl Error for ParserError {
- fn description(&self) -> &str { "TOML parse error" }
-}
-
-impl fmt::Display for ParserError {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- self.desc.fmt(f)
- }
-}
-
-fn is_digit(c: char) -> bool {
- match c { '0' ... '9' => true, _ => false }
-}
-
-#[cfg(test)]
-mod tests {
- use Value::Table;
- use Parser;
-
- macro_rules! bad {
- ($s:expr, $msg:expr) => ({
- let mut p = Parser::new($s);
- assert!(p.parse().is_none());
- assert!(p.errors.iter().any(|e| e.desc.contains($msg)),
- "errors: {:?}", p.errors);
- })
- }
-
- #[test]
- fn lookup_internal() {
- let mut parser = Parser::new(r#"hello."world\t".a.0.'escaped'.value"#);
- let result = vec![
- String::from("hello"),
- String::from("world\t"),
- String::from("a"),
- String::from("0"),
- String::from("escaped"),
- String::from("value")
- ];
-
- assert_eq!(parser.lookup().unwrap(), result);
- }
-
- #[test]
- fn lookup_internal_void() {
- let mut parser = Parser::new("");
- assert_eq!(parser.lookup().unwrap(), Vec::<String>::new());
- }
-
- #[test]
- fn lookup_internal_simple() {
- let mut parser = Parser::new("value");
- assert_eq!(parser.lookup().unwrap(), vec![String::from("value")]);
- }
-
- // This is due to key_name not parsing an empty "" correctly. Disabled for now.
- #[test]
- #[ignore]
- fn lookup_internal_quoted_void() {
- let mut parser = Parser::new("\"\"");
- assert_eq!(parser.lookup().unwrap(), vec![String::from("")]);
- }
-
-
- #[test]
- fn crlf() {
- let mut p = Parser::new("\
-[project]\r\n\
-\r\n\
-name = \"splay\"\r\n\
-version = \"0.1.0\"\r\n\
-authors = [\"alex@crichton.co\"]\r\n\
-\r\n\
-[[lib]]\r\n\
-\r\n\
-path = \"lib.rs\"\r\n\
-name = \"splay\"\r\n\
-description = \"\"\"\
-A Rust implementation of a TAR file reader and writer. This library does not\r\n\
-currently handle compression, but it is abstract over all I/O readers and\r\n\
-writers. Additionally, great lengths are taken to ensure that the entire\r\n\
-contents are never required to be entirely resident in memory all at once.\r\n\
-\"\"\"\
-");
- assert!(p.parse().is_some());
- }
-
- #[test]
- fn linecol() {
- let p = Parser::new("ab\ncde\nf");
- assert_eq!(p.to_linecol(0), (0, 0));
- assert_eq!(p.to_linecol(1), (0, 1));
- assert_eq!(p.to_linecol(3), (1, 0));
- assert_eq!(p.to_linecol(4), (1, 1));
- assert_eq!(p.to_linecol(7), (2, 0));
- }
-
- #[test]
- fn fun_with_strings() {
- let mut p = Parser::new(r#"
-bar = "\U00000000"
-key1 = "One\nTwo"
-key2 = """One\nTwo"""
-key3 = """
-One
-Two"""
-
-key4 = "The quick brown fox jumps over the lazy dog."
-key5 = """
-The quick brown \
-
-
- fox jumps over \
- the lazy dog."""
-key6 = """\
- The quick brown \
- fox jumps over \
- the lazy dog.\
- """
-# What you see is what you get.
-winpath = 'C:\Users\nodejs\templates'
-winpath2 = '\\ServerX\admin$\system32\'
-quoted = 'Tom "Dubs" Preston-Werner'
-regex = '<\i\c*\s*>'
-
-regex2 = '''I [dw]on't need \d{2} apples'''
-lines = '''
-The first newline is
-trimmed in raw strings.
- All other whitespace
- is preserved.
-'''
-"#);
- let table = Table(p.parse().unwrap());
- assert_eq!(table.lookup("bar").and_then(|k| k.as_str()), Some("\0"));
- assert_eq!(table.lookup("key1").and_then(|k| k.as_str()),
- Some("One\nTwo"));
- assert_eq!(table.lookup("key2").and_then(|k| k.as_str()),
- Some("One\nTwo"));
- assert_eq!(table.lookup("key3").and_then(|k| k.as_str()),
- Some("One\nTwo"));
-
- let msg = "The quick brown fox jumps over the lazy dog.";
- assert_eq!(table.lookup("key4").and_then(|k| k.as_str()), Some(msg));
- assert_eq!(table.lookup("key5").and_then(|k| k.as_str()), Some(msg));
- assert_eq!(table.lookup("key6").and_then(|k| k.as_str()), Some(msg));
-
- assert_eq!(table.lookup("winpath").and_then(|k| k.as_str()),
- Some(r"C:\Users\nodejs\templates"));
- assert_eq!(table.lookup("winpath2").and_then(|k| k.as_str()),
- Some(r"\\ServerX\admin$\system32\"));
- assert_eq!(table.lookup("quoted").and_then(|k| k.as_str()),
- Some(r#"Tom "Dubs" Preston-Werner"#));
- assert_eq!(table.lookup("regex").and_then(|k| k.as_str()),
- Some(r"<\i\c*\s*>"));
- assert_eq!(table.lookup("regex2").and_then(|k| k.as_str()),
- Some(r"I [dw]on't need \d{2} apples"));
- assert_eq!(table.lookup("lines").and_then(|k| k.as_str()),
- Some("The first newline is\n\
- trimmed in raw strings.\n \
- All other whitespace\n \
- is preserved.\n"));
- }
-
- #[test]
- fn tables_in_arrays() {
- let mut p = Parser::new(r#"
-[[foo]]
- #…
- [foo.bar]
- #…
-
-[[foo]] # ...
- #…
- [foo.bar]
- #...
-"#);
- let table = Table(p.parse().unwrap());
- table.lookup("foo.0.bar").unwrap().as_table().unwrap();
- table.lookup("foo.1.bar").unwrap().as_table().unwrap();
- }
-
- #[test]
- fn empty_table() {
- let mut p = Parser::new(r#"
-[foo]"#);
- let table = Table(p.parse().unwrap());
- table.lookup("foo").unwrap().as_table().unwrap();
- }
-
- #[test]
- fn fruit() {
- let mut p = Parser::new(r#"
-[[fruit]]
- name = "apple"
-
- [fruit.physical]
- color = "red"
- shape = "round"
-
- [[fruit.variety]]
- name = "red delicious"
-
- [[fruit.variety]]
- name = "granny smith"
-
-[[fruit]]
- name = "banana"
-
- [[fruit.variety]]
- name = "plantain"
-"#);
- let table = Table(p.parse().unwrap());
- assert_eq!(table.lookup("fruit.0.name").and_then(|k| k.as_str()),
- Some("apple"));
- assert_eq!(table.lookup("fruit.0.physical.color").and_then(|k| k.as_str()),
- Some("red"));
- assert_eq!(table.lookup("fruit.0.physical.shape").and_then(|k| k.as_str()),
- Some("round"));
- assert_eq!(table.lookup("fruit.0.variety.0.name").and_then(|k| k.as_str()),
- Some("red delicious"));
- assert_eq!(table.lookup("fruit.0.variety.1.name").and_then(|k| k.as_str()),
- Some("granny smith"));
- assert_eq!(table.lookup("fruit.1.name").and_then(|k| k.as_str()),
- Some("banana"));
- assert_eq!(table.lookup("fruit.1.variety.0.name").and_then(|k| k.as_str()),
- Some("plantain"));
- }
-
- #[test]
- fn stray_cr() {
- assert!(Parser::new("\r").parse().is_none());
- assert!(Parser::new("a = [ \r ]").parse().is_none());
- assert!(Parser::new("a = \"\"\"\r\"\"\"").parse().is_none());
- assert!(Parser::new("a = \"\"\"\\ \r \"\"\"").parse().is_none());
-
- let mut p = Parser::new("foo = '''\r'''");
- let table = Table(p.parse().unwrap());
- assert_eq!(table.lookup("foo").and_then(|k| k.as_str()), Some("\r"));
-
- let mut p = Parser::new("foo = '\r'");
- let table = Table(p.parse().unwrap());
- assert_eq!(table.lookup("foo").and_then(|k| k.as_str()), Some("\r"));
- }
-
- #[test]
- fn blank_literal_string() {
- let mut p = Parser::new("foo = ''");
- let table = Table(p.parse().unwrap());
- assert_eq!(table.lookup("foo").and_then(|k| k.as_str()), Some(""));
- }
-
- #[test]
- fn many_blank() {
- let mut p = Parser::new("foo = \"\"\"\n\n\n\"\"\"");
- let table = Table(p.parse().unwrap());
- assert_eq!(table.lookup("foo").and_then(|k| k.as_str()), Some("\n\n"));
- }
-
- #[test]
- fn literal_eats_crlf() {
- let mut p = Parser::new("
- foo = \"\"\"\\\r\n\"\"\"
- bar = \"\"\"\\\r\n \r\n \r\n a\"\"\"
- ");
- let table = Table(p.parse().unwrap());
- assert_eq!(table.lookup("foo").and_then(|k| k.as_str()), Some(""));
- assert_eq!(table.lookup("bar").and_then(|k| k.as_str()), Some("a"));
- }
-
- #[test]
- fn string_no_newline() {
- assert!(Parser::new("a = \"\n\"").parse().is_none());
- assert!(Parser::new("a = '\n'").parse().is_none());
- }
-
- #[test]
- fn bad_leading_zeros() {
- assert!(Parser::new("a = 00").parse().is_none());
- assert!(Parser::new("a = -00").parse().is_none());
- assert!(Parser::new("a = +00").parse().is_none());
- assert!(Parser::new("a = 00.0").parse().is_none());
- assert!(Parser::new("a = -00.0").parse().is_none());
- assert!(Parser::new("a = +00.0").parse().is_none());
- assert!(Parser::new("a = 9223372036854775808").parse().is_none());
- assert!(Parser::new("a = -9223372036854775809").parse().is_none());
- }
-
- #[test]
- fn bad_floats() {
- assert!(Parser::new("a = 0.").parse().is_none());
- assert!(Parser::new("a = 0.e").parse().is_none());
- assert!(Parser::new("a = 0.E").parse().is_none());
- assert!(Parser::new("a = 0.0E").parse().is_none());
- assert!(Parser::new("a = 0.0e").parse().is_none());
- assert!(Parser::new("a = 0.0e-").parse().is_none());
- assert!(Parser::new("a = 0.0e+").parse().is_none());
- assert!(Parser::new("a = 0.0e+00").parse().is_none());
- }
-
- #[test]
- fn floats() {
- macro_rules! t {
- ($actual:expr, $expected:expr) => ({
- let f = format!("foo = {}", $actual);
- let mut p = Parser::new(&f);
- let table = Table(p.parse().unwrap());
- assert_eq!(table.lookup("foo").and_then(|k| k.as_float()),
- Some($expected));
- })
- }
-
- t!("1.0", 1.0);
- t!("1.0e0", 1.0);
- t!("1.0e+0", 1.0);
- t!("1.0e-0", 1.0);
- t!("1.001e-0", 1.001);
- t!("2e10", 2e10);
- t!("2e+10", 2e10);
- t!("2e-10", 2e-10);
- t!("2_0.0", 20.0);
- t!("2_0.0_0e0_0", 20.0);
- t!("2_0.1_0e1_0", 20.1e10);
- }
-
- #[test]
- fn bare_key_names() {
- let mut p = Parser::new("
- foo = 3
- foo_3 = 3
- foo_-2--3--r23f--4-f2-4 = 3
- _ = 3
- - = 3
- 8 = 8
- \"a\" = 3
- \"!\" = 3
- \"a^b\" = 3
- \"\\\"\" = 3
- \"character encoding\" = \"value\"
- 'ʎǝʞ' = \"value\"
- ");
- let table = Table(p.parse().unwrap());
- assert!(table.lookup("foo").is_some());
- assert!(table.lookup("-").is_some());
- assert!(table.lookup("_").is_some());
- assert!(table.lookup("8").is_some());
- assert!(table.lookup("foo_3").is_some());
- assert!(table.lookup("foo_-2--3--r23f--4-f2-4").is_some());
- assert!(table.lookup("a").is_some());
- assert!(table.lookup("\"!\"").is_some());
- assert!(table.lookup("\"\\\"\"").is_some());
- assert!(table.lookup("\"character encoding\"").is_some());
- assert!(table.lookup("'ʎǝʞ'").is_some());
- }
-
- #[test]
- fn bad_keys() {
- assert!(Parser::new("key\n=3").parse().is_none());
- assert!(Parser::new("key=\n3").parse().is_none());
- assert!(Parser::new("key|=3").parse().is_none());
- assert!(Parser::new("\"\"=3").parse().is_none());
- assert!(Parser::new("=3").parse().is_none());
- assert!(Parser::new("\"\"|=3").parse().is_none());
- assert!(Parser::new("\"\n\"|=3").parse().is_none());
- assert!(Parser::new("\"\r\"|=3").parse().is_none());
- }
-
- #[test]
- fn bad_table_names() {
- assert!(Parser::new("[]").parse().is_none());
- assert!(Parser::new("[.]").parse().is_none());
- assert!(Parser::new("[\"\".\"\"]").parse().is_none());
- assert!(Parser::new("[a.]").parse().is_none());
- assert!(Parser::new("[\"\"]").parse().is_none());
- assert!(Parser::new("[!]").parse().is_none());
- assert!(Parser::new("[\"\n\"]").parse().is_none());
- assert!(Parser::new("[a.b]\n[a.\"b\"]").parse().is_none());
- assert!(Parser::new("[']").parse().is_none());
- assert!(Parser::new("[''']").parse().is_none());
- assert!(Parser::new("['''''']").parse().is_none());
- assert!(Parser::new("['\n']").parse().is_none());
- assert!(Parser::new("['\r\n']").parse().is_none());
- }
-
- #[test]
- fn table_names() {
- let mut p = Parser::new("
- [a.\"b\"]
- [\"f f\"]
- [\"f.f\"]
- [\"\\\"\"]
- ['a.a']
- ['\"\"']
- ");
- let table = Table(p.parse().unwrap());
- assert!(table.lookup("a.b").is_some());
- assert!(table.lookup("\"f f\"").is_some());
- assert!(table.lookup("\"\\\"\"").is_some());
- assert!(table.lookup("'\"\"'").is_some());
- }
-
- #[test]
- fn invalid_bare_numeral() {
- assert!(Parser::new("4").parse().is_none());
- }
-
- #[test]
- fn inline_tables() {
- assert!(Parser::new("a = {}").parse().is_some());
- assert!(Parser::new("a = {b=1}").parse().is_some());
- assert!(Parser::new("a = { b = 1 }").parse().is_some());
- assert!(Parser::new("a = {a=1,b=2}").parse().is_some());
- assert!(Parser::new("a = {a=1,b=2,c={}}").parse().is_some());
- assert!(Parser::new("a = {a=1,}").parse().is_none());
- assert!(Parser::new("a = {,}").parse().is_none());
- assert!(Parser::new("a = {a=1,a=1}").parse().is_none());
- assert!(Parser::new("a = {\n}").parse().is_none());
- assert!(Parser::new("a = {").parse().is_none());
- assert!(Parser::new("a = {a=[\n]}").parse().is_some());
- assert!(Parser::new("a = {\"a\"=[\n]}").parse().is_some());
- assert!(Parser::new("a = [\n{},\n{},\n]").parse().is_some());
- }
-
- #[test]
- fn number_underscores() {
- macro_rules! t {
- ($actual:expr, $expected:expr) => ({
- let f = format!("foo = {}", $actual);
- let mut p = Parser::new(&f);
- let table = Table(p.parse().unwrap());
- assert_eq!(table.lookup("foo").and_then(|k| k.as_integer()),
- Some($expected));
- })
- }
-
- t!("1_0", 10);
- t!("1_0_0", 100);
- t!("1_000", 1000);
- t!("+1_000", 1000);
- t!("-1_000", -1000);
- }
-
- #[test]
- fn bad_underscores() {
- assert!(Parser::new("foo = 0_").parse().is_none());
- assert!(Parser::new("foo = 0__0").parse().is_none());
- assert!(Parser::new("foo = __0").parse().is_none());
- assert!(Parser::new("foo = 1_0_").parse().is_none());
- }
-
- #[test]
- fn bad_unicode_codepoint() {
- bad!("foo = \"\\uD800\"", "not a valid unicode codepoint");
- }
-
- #[test]
- fn bad_strings() {
- bad!("foo = \"\\uxx\"", "expected 4 hex digits");
- bad!("foo = \"\\u\"", "expected 4 hex digits");
- bad!("foo = \"\\", "unterminated");
- bad!("foo = '", "unterminated");
- }
-
- #[test]
- fn empty_string() {
- let mut p = Parser::new("foo = \"\"");
- let table = Table(p.parse().unwrap());
- assert_eq!(table.lookup("foo").unwrap().as_str(), Some(""));
- }
-
- #[test]
- fn booleans() {
- let mut p = Parser::new("foo = true");
- let table = Table(p.parse().unwrap());
- assert_eq!(table.lookup("foo").unwrap().as_bool(), Some(true));
-
- let mut p = Parser::new("foo = false");
- let table = Table(p.parse().unwrap());
- assert_eq!(table.lookup("foo").unwrap().as_bool(), Some(false));
-
- assert!(Parser::new("foo = true2").parse().is_none());
- assert!(Parser::new("foo = false2").parse().is_none());
- assert!(Parser::new("foo = t1").parse().is_none());
- assert!(Parser::new("foo = f2").parse().is_none());
- }
-
- #[test]
- fn bad_nesting() {
- bad!("
- a = [2]
- [[a]]
- b = 5
- ", "expected type `integer`, found type `table`");
- bad!("
- a = 1
- [a.b]
- ", "key `a` was not previously a table");
- bad!("
- a = []
- [a.b]
- ", "array `a` does not contain tables");
- bad!("
- a = []
- [[a.b]]
- ", "array `a` does not contain tables");
- bad!("
- [a]
- b = { c = 2, d = {} }
- [a.b]
- c = 2
- ", "duplicate key `c` in table");
- }
-
- #[test]
- fn bad_table_redefine() {
- bad!("
- [a]
- foo=\"bar\"
- [a.b]
- foo=\"bar\"
- [a]
- ", "redefinition of table `a`");
- bad!("
- [a]
- foo=\"bar\"
- b = { foo = \"bar\" }
- [a]
- ", "redefinition of table `a`");
- bad!("
- [a]
- b = {}
- [a.b]
- ", "redefinition of table `b`");
-
- bad!("
- [a]
- b = {}
- [a]
- ", "redefinition of table `a`");
- }
-
- #[test]
- fn datetimes() {
- macro_rules! t {
- ($actual:expr) => ({
- let f = format!("foo = {}", $actual);
- let mut p = Parser::new(&f);
- let table = Table(p.parse().unwrap());
- assert_eq!(table.lookup("foo").and_then(|k| k.as_datetime()),
- Some($actual));
- })
- }
-
- t!("2016-09-09T09:09:09Z");
- t!("2016-09-09T09:09:09.0Z");
- t!("2016-09-09T09:09:09.0+10:00");
- t!("2016-09-09T09:09:09.01234567890-02:00");
- bad!("foo = 2016-09-09T09:09:09.Z", "malformed date literal");
- bad!("foo = 2016-9-09T09:09:09Z", "malformed date literal");
- bad!("foo = 2016-09-09T09:09:09+2:00", "malformed date literal");
- bad!("foo = 2016-09-09T09:09:09-2:00", "malformed date literal");
- bad!("foo = 2016-09-09T09:09:09Z-2:00", "expected");
- }
-
- #[test]
- fn require_newline_after_value() {
- bad!("0=0r=false", "expected a newline");
- bad!(r#"
-0=""o=""m=""r=""00="0"q="""0"""e="""0"""
-"#, "expected a newline");
- bad!(r#"
-[[0000l0]]
-0="0"[[0000l0]]
-0="0"[[0000l0]]
-0="0"l="0"
-"#, "expected a newline");
- bad!(r#"
-0=[0]00=[0,0,0]t=["0","0","0"]s=[1000-00-00T00:00:00Z,2000-00-00T00:00:00Z]
-"#, "expected a newline");
- bad!(r#"
-0=0r0=0r=false
-"#, "expected a newline");
- bad!(r#"
-0=0r0=0r=falsefal=false
-"#, "expected a newline");
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/README.md
+++ /dev/null
@@ -1,1 +0,0 @@
-Tests are from https://github.com/BurntSushi/toml-test
deleted file mode 100644
--- a/third_party/rust/toml/tests/formatting.rs
+++ /dev/null
@@ -1,52 +0,0 @@
-extern crate rustc_serialize;
-extern crate toml;
-use toml::encode_str;
-
-#[derive(Debug, Clone, Hash, PartialEq, Eq, RustcEncodable, RustcDecodable)]
-struct User {
- pub name: String,
- pub surname: String,
-}
-
-#[derive(Debug, Clone, Hash, PartialEq, Eq, RustcEncodable, RustcDecodable)]
-struct Users {
- pub user: Vec<User>,
-}
-
-#[derive(Debug, Clone, Hash, PartialEq, Eq, RustcEncodable, RustcDecodable)]
-struct TwoUsers {
- pub user0: User,
- pub user1: User,
-}
-
-#[test]
-fn no_unnecessary_newlines_array() {
- assert!(!encode_str(&Users {
- user: vec![
- User {
- name: "John".to_string(),
- surname: "Doe".to_string(),
- },
- User {
- name: "Jane".to_string(),
- surname: "Dough".to_string(),
- },
- ],
- })
- .starts_with("\n"));
-}
-
-#[test]
-fn no_unnecessary_newlines_table() {
- assert!(!encode_str(&TwoUsers {
- user0: User {
- name: "John".to_string(),
- surname: "Doe".to_string(),
- },
- user1: User {
- name: "Jane".to_string(),
- surname: "Dough".to_string(),
- },
- })
- .starts_with("\n"));
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid-encoder/array-mixed-types-ints-and-floats.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "ints-and-floats": {
- "type": "array",
- "value": [
- {
- "type": "integer",
- "value": "1"
- },
- {
- "type": "float",
- "value": "1.1"
- }
- ]
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid.rs
+++ /dev/null
@@ -1,108 +0,0 @@
-extern crate toml;
-
-use toml::{Parser};
-
-fn run(toml: &str) {
- let mut p = Parser::new(toml);
- let table = p.parse();
- assert!(table.is_none());
- assert!(p.errors.len() > 0);
-
- // test Parser::to_linecol with the generated error offsets
- for error in &p.errors {
- p.to_linecol(error.lo);
- p.to_linecol(error.hi);
- }
-}
-
-macro_rules! test( ($name:ident, $toml:expr) => (
- #[test]
- fn $name() { run($toml); }
-) );
-
-test!(array_mixed_types_arrays_and_ints,
- include_str!("invalid/array-mixed-types-arrays-and-ints.toml"));
-test!(array_mixed_types_ints_and_floats,
- include_str!("invalid/array-mixed-types-ints-and-floats.toml"));
-test!(array_mixed_types_strings_and_ints,
- include_str!("invalid/array-mixed-types-strings-and-ints.toml"));
-test!(datetime_malformed_no_leads,
- include_str!("invalid/datetime-malformed-no-leads.toml"));
-test!(datetime_malformed_no_secs,
- include_str!("invalid/datetime-malformed-no-secs.toml"));
-test!(datetime_malformed_no_t,
- include_str!("invalid/datetime-malformed-no-t.toml"));
-test!(datetime_malformed_no_z,
- include_str!("invalid/datetime-malformed-no-z.toml"));
-test!(datetime_malformed_with_milli,
- include_str!("invalid/datetime-malformed-with-milli.toml"));
-test!(duplicate_keys,
- include_str!("invalid/duplicate-keys.toml"));
-test!(duplicate_key_table,
- include_str!("invalid/duplicate-key-table.toml"));
-test!(duplicate_tables,
- include_str!("invalid/duplicate-tables.toml"));
-test!(empty_implicit_table,
- include_str!("invalid/empty-implicit-table.toml"));
-test!(empty_table,
- include_str!("invalid/empty-table.toml"));
-test!(float_no_leading_zero,
- include_str!("invalid/float-no-leading-zero.toml"));
-test!(float_no_trailing_digits,
- include_str!("invalid/float-no-trailing-digits.toml"));
-test!(key_after_array,
- include_str!("invalid/key-after-array.toml"));
-test!(key_after_table,
- include_str!("invalid/key-after-table.toml"));
-test!(key_empty,
- include_str!("invalid/key-empty.toml"));
-test!(key_hash,
- include_str!("invalid/key-hash.toml"));
-test!(key_newline,
- include_str!("invalid/key-newline.toml"));
-test!(key_open_bracket,
- include_str!("invalid/key-open-bracket.toml"));
-test!(key_single_open_bracket,
- include_str!("invalid/key-single-open-bracket.toml"));
-test!(key_space,
- include_str!("invalid/key-space.toml"));
-test!(key_start_bracket,
- include_str!("invalid/key-start-bracket.toml"));
-test!(key_two_equals,
- include_str!("invalid/key-two-equals.toml"));
-test!(string_bad_byte_escape,
- include_str!("invalid/string-bad-byte-escape.toml"));
-test!(string_bad_escape,
- include_str!("invalid/string-bad-escape.toml"));
-test!(string_byte_escapes,
- include_str!("invalid/string-byte-escapes.toml"));
-test!(string_no_close,
- include_str!("invalid/string-no-close.toml"));
-test!(table_array_implicit,
- include_str!("invalid/table-array-implicit.toml"));
-test!(table_array_malformed_bracket,
- include_str!("invalid/table-array-malformed-bracket.toml"));
-test!(table_array_malformed_empty,
- include_str!("invalid/table-array-malformed-empty.toml"));
-test!(table_empty,
- include_str!("invalid/table-empty.toml"));
-test!(table_nested_brackets_close,
- include_str!("invalid/table-nested-brackets-close.toml"));
-test!(table_nested_brackets_open,
- include_str!("invalid/table-nested-brackets-open.toml"));
-test!(table_whitespace,
- include_str!("invalid/table-whitespace.toml"));
-test!(table_with_pound,
- include_str!("invalid/table-with-pound.toml"));
-test!(text_after_array_entries,
- include_str!("invalid/text-after-array-entries.toml"));
-test!(text_after_integer,
- include_str!("invalid/text-after-integer.toml"));
-test!(text_after_string,
- include_str!("invalid/text-after-string.toml"));
-test!(text_after_table,
- include_str!("invalid/text-after-table.toml"));
-test!(text_before_array_separator,
- include_str!("invalid/text-before-array-separator.toml"));
-test!(text_in_array,
- include_str!("invalid/text-in-array.toml"));
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/array-mixed-types-arrays-and-ints.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-arrays-and-ints = [1, ["Arrays are not integers."]]
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/array-mixed-types-ints-and-floats.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-ints-and-floats = [1, 1.1]
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/array-mixed-types-strings-and-ints.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-strings-and-ints = ["hi", 42]
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/datetime-malformed-no-leads.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-no-leads = 1987-7-05T17:45:00Z
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/datetime-malformed-no-secs.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-no-secs = 1987-07-05T17:45Z
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/datetime-malformed-no-t.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-no-t = 1987-07-0517:45:00Z
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/datetime-malformed-no-z.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-no-z = 1987-07-05T17:45:00
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/datetime-malformed-with-milli.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-with-milli = 1987-07-5T17:45:00.12Z
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/duplicate-key-table.toml
+++ /dev/null
@@ -1,5 +0,0 @@
-[fruit]
-type = "apple"
-
-[fruit.type]
-apple = "yes"
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/duplicate-keys.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-dupe = false
-dupe = true
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/duplicate-tables.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-[a]
-[a]
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/empty-implicit-table.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-[naughty..naughty]
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/empty-table.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-[]
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/float-no-leading-zero.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-answer = .12345
-neganswer = -.12345
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/float-no-trailing-digits.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-answer = 1.
-neganswer = -1.
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/key-after-array.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-[[agencies]] owner = "S Cjelli"
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/key-after-table.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-[history] guard = "sleeping"
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/key-empty.toml
+++ /dev/null
@@ -1,1 +0,0 @@
- = 1
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/key-hash.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-a# = 1
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/key-newline.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-a
-= 1
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/key-open-bracket.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-[abc = 1
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/key-single-open-bracket.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-[
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/key-space.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-a b = 1
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/key-start-bracket.toml
+++ /dev/null
@@ -1,3 +0,0 @@
-[a]
-[xyz = 5
-[b]
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/key-two-equals.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-key= = 1
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/string-bad-byte-escape.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-naughty = "\xAg"
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/string-bad-escape.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-invalid-escape = "This string has a bad \a escape character."
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/string-byte-escapes.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-answer = "\x33"
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/string-no-close.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-no-ending-quote = "One time, at band camp
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/table-array-implicit.toml
+++ /dev/null
@@ -1,14 +0,0 @@
-# This test is a bit tricky. It should fail because the first use of
-# `[[albums.songs]]` without first declaring `albums` implies that `albums`
-# must be a table. The alternative would be quite weird. Namely, it wouldn't
-# comply with the TOML spec: "Each double-bracketed sub-table will belong to
-# the most *recently* defined table element *above* it."
-#
-# This is in contrast to the *valid* test, table-array-implicit where
-# `[[albums.songs]]` works by itself, so long as `[[albums]]` isn't declared
-# later. (Although, `[albums]` could be.)
-[[albums.songs]]
-name = "Glory Days"
-
-[[albums]]
-name = "Born in the USA"
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/table-array-malformed-bracket.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-[[albums]
-name = "Born to Run"
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/table-array-malformed-empty.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-[[]]
-name = "Born to Run"
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/table-empty.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-[]
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/table-nested-brackets-close.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-[a]b]
-zyx = 42
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/table-nested-brackets-open.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-[a[b]
-zyx = 42
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/table-whitespace.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-[invalid key]
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/table-with-pound.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-[key#group]
-answer = 42
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/text-after-array-entries.toml
+++ /dev/null
@@ -1,4 +0,0 @@
-array = [
- "Is there life after an array separator?", No
- "Entry"
-]
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/text-after-integer.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-answer = 42 the ultimate answer?
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/text-after-string.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-string = "Is there life after strings?" No.
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/text-after-table.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-[error] this shouldn't be here
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/text-before-array-separator.toml
+++ /dev/null
@@ -1,4 +0,0 @@
-array = [
- "Is there life before an array separator?" No,
- "Entry"
-]
deleted file mode 100644
--- a/third_party/rust/toml/tests/invalid/text-in-array.toml
+++ /dev/null
@@ -1,5 +0,0 @@
-array = [
- "Entry 1",
- I don't belong,
- "Entry 2",
-]
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid.rs
+++ /dev/null
@@ -1,195 +0,0 @@
-extern crate rustc_serialize;
-extern crate toml;
-
-use std::collections::BTreeMap;
-use rustc_serialize::json::Json;
-
-use toml::{Parser, Value};
-use toml::Value::{Table, Integer, Float, Boolean, Datetime, Array};
-
-fn to_json(toml: Value) -> Json {
- fn doit(s: &str, json: Json) -> Json {
- let mut map = BTreeMap::new();
- map.insert(format!("{}", "type"), Json::String(format!("{}", s)));
- map.insert(format!("{}", "value"), json);
- Json::Object(map)
- }
- match toml {
- Value::String(s) => doit("string", Json::String(s)),
- Integer(i) => doit("integer", Json::String(format!("{}", i))),
- Float(f) => doit("float", Json::String({
- let s = format!("{:.15}", f);
- let s = format!("{}", s.trim_right_matches('0'));
- if s.ends_with(".") {format!("{}0", s)} else {s}
- })),
- Boolean(b) => doit("bool", Json::String(format!("{}", b))),
- Datetime(s) => doit("datetime", Json::String(s)),
- Array(arr) => {
- let is_table = match arr.first() {
- Some(&Table(..)) => true,
- _ => false,
- };
- let json = Json::Array(arr.into_iter().map(to_json).collect());
- if is_table {json} else {doit("array", json)}
- }
- Table(table) => Json::Object(table.into_iter().map(|(k, v)| {
- (k, to_json(v))
- }).collect()),
- }
-}
-
-fn run(toml: &str, json: &str) {
- let mut p = Parser::new(toml);
- let table = p.parse();
- assert!(p.errors.len() == 0, "had_errors: {:?}",
- p.errors.iter().map(|e| {
- (e.desc.clone(), &toml[e.lo - 5..e.hi + 5])
- }).collect::<Vec<(String, &str)>>());
- assert!(table.is_some());
- let toml = Table(table.unwrap());
- let toml_string = format!("{}", toml);
-
- let json = Json::from_str(json).unwrap();
- let toml_json = to_json(toml.clone());
- assert!(json == toml_json,
- "expected\n{}\ngot\n{}\n",
- json.pretty(),
- toml_json.pretty());
-
- let table2 = Parser::new(&toml_string).parse().unwrap();
- // floats are a little lossy
- if table2.values().any(|v| v.as_float().is_some()) { return }
- assert_eq!(toml, Table(table2));
-}
-
-macro_rules! test( ($name:ident, $toml:expr, $json:expr) => (
- #[test]
- fn $name() { run($toml, $json); }
-) );
-
-test!(array_empty,
- include_str!("valid/array-empty.toml"),
- include_str!("valid/array-empty.json"));
-test!(array_nospaces,
- include_str!("valid/array-nospaces.toml"),
- include_str!("valid/array-nospaces.json"));
-test!(arrays_hetergeneous,
- include_str!("valid/arrays-hetergeneous.toml"),
- include_str!("valid/arrays-hetergeneous.json"));
-test!(arrays,
- include_str!("valid/arrays.toml"),
- include_str!("valid/arrays.json"));
-test!(arrays_nested,
- include_str!("valid/arrays-nested.toml"),
- include_str!("valid/arrays-nested.json"));
-test!(empty,
- include_str!("valid/empty.toml"),
- include_str!("valid/empty.json"));
-test!(bool,
- include_str!("valid/bool.toml"),
- include_str!("valid/bool.json"));
-test!(datetime,
- include_str!("valid/datetime.toml"),
- include_str!("valid/datetime.json"));
-test!(example,
- include_str!("valid/example.toml"),
- include_str!("valid/example.json"));
-test!(float,
- include_str!("valid/float.toml"),
- include_str!("valid/float.json"));
-test!(implicit_and_explicit_after,
- include_str!("valid/implicit-and-explicit-after.toml"),
- include_str!("valid/implicit-and-explicit-after.json"));
-test!(implicit_and_explicit_before,
- include_str!("valid/implicit-and-explicit-before.toml"),
- include_str!("valid/implicit-and-explicit-before.json"));
-test!(implicit_groups,
- include_str!("valid/implicit-groups.toml"),
- include_str!("valid/implicit-groups.json"));
-test!(integer,
- include_str!("valid/integer.toml"),
- include_str!("valid/integer.json"));
-test!(key_equals_nospace,
- include_str!("valid/key-equals-nospace.toml"),
- include_str!("valid/key-equals-nospace.json"));
-test!(key_space,
- include_str!("valid/key-space.toml"),
- include_str!("valid/key-space.json"));
-test!(key_special_chars,
- include_str!("valid/key-special-chars.toml"),
- include_str!("valid/key-special-chars.json"));
-test!(key_with_pound,
- include_str!("valid/key-with-pound.toml"),
- include_str!("valid/key-with-pound.json"));
-test!(long_float,
- include_str!("valid/long-float.toml"),
- include_str!("valid/long-float.json"));
-test!(long_integer,
- include_str!("valid/long-integer.toml"),
- include_str!("valid/long-integer.json"));
-test!(multiline_string,
- include_str!("valid/multiline-string.toml"),
- include_str!("valid/multiline-string.json"));
-test!(raw_multiline_string,
- include_str!("valid/raw-multiline-string.toml"),
- include_str!("valid/raw-multiline-string.json"));
-test!(raw_string,
- include_str!("valid/raw-string.toml"),
- include_str!("valid/raw-string.json"));
-test!(string_empty,
- include_str!("valid/string-empty.toml"),
- include_str!("valid/string-empty.json"));
-test!(string_escapes,
- include_str!("valid/string-escapes.toml"),
- include_str!("valid/string-escapes.json"));
-test!(string_simple,
- include_str!("valid/string-simple.toml"),
- include_str!("valid/string-simple.json"));
-test!(string_with_pound,
- include_str!("valid/string-with-pound.toml"),
- include_str!("valid/string-with-pound.json"));
-test!(table_array_implicit,
- include_str!("valid/table-array-implicit.toml"),
- include_str!("valid/table-array-implicit.json"));
-test!(table_array_many,
- include_str!("valid/table-array-many.toml"),
- include_str!("valid/table-array-many.json"));
-test!(table_array_nest,
- include_str!("valid/table-array-nest.toml"),
- include_str!("valid/table-array-nest.json"));
-test!(table_array_one,
- include_str!("valid/table-array-one.toml"),
- include_str!("valid/table-array-one.json"));
-test!(table_empty,
- include_str!("valid/table-empty.toml"),
- include_str!("valid/table-empty.json"));
-test!(table_sub_empty,
- include_str!("valid/table-sub-empty.toml"),
- include_str!("valid/table-sub-empty.json"));
-test!(table_whitespace,
- include_str!("valid/table-whitespace.toml"),
- include_str!("valid/table-whitespace.json"));
-test!(table_with_pound,
- include_str!("valid/table-with-pound.toml"),
- include_str!("valid/table-with-pound.json"));
-test!(unicode_escape,
- include_str!("valid/unicode-escape.toml"),
- include_str!("valid/unicode-escape.json"));
-test!(unicode_literal,
- include_str!("valid/unicode-literal.toml"),
- include_str!("valid/unicode-literal.json"));
-test!(hard_example,
- include_str!("valid/hard_example.toml"),
- include_str!("valid/hard_example.json"));
-test!(example2,
- include_str!("valid/example2.toml"),
- include_str!("valid/example2.json"));
-test!(example3,
- include_str!("valid/example-v0.3.0.toml"),
- include_str!("valid/example-v0.3.0.json"));
-test!(example4,
- include_str!("valid/example-v0.4.0.toml"),
- include_str!("valid/example-v0.4.0.json"));
-test!(example_bom,
- include_str!("valid/example-bom.toml"),
- include_str!("valid/example.json"));
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/array-empty.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "thevoid": { "type": "array", "value": [
- {"type": "array", "value": [
- {"type": "array", "value": [
- {"type": "array", "value": [
- {"type": "array", "value": []}
- ]}
- ]}
- ]}
- ]}
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/array-empty.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-thevoid = [[[[[]]]]]
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/array-nospaces.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "ints": {
- "type": "array",
- "value": [
- {"type": "integer", "value": "1"},
- {"type": "integer", "value": "2"},
- {"type": "integer", "value": "3"}
- ]
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/array-nospaces.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-ints = [1,2,3]
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/arrays-hetergeneous.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "mixed": {
- "type": "array",
- "value": [
- {"type": "array", "value": [
- {"type": "integer", "value": "1"},
- {"type": "integer", "value": "2"}
- ]},
- {"type": "array", "value": [
- {"type": "string", "value": "a"},
- {"type": "string", "value": "b"}
- ]},
- {"type": "array", "value": [
- {"type": "float", "value": "1.1"},
- {"type": "float", "value": "2.1"}
- ]}
- ]
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/arrays-hetergeneous.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-mixed = [[1, 2], ["a", "b"], [1.1, 2.1]]
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/arrays-nested.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "nest": {
- "type": "array",
- "value": [
- {"type": "array", "value": [
- {"type": "string", "value": "a"}
- ]},
- {"type": "array", "value": [
- {"type": "string", "value": "b"}
- ]}
- ]
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/arrays-nested.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-nest = [["a"], ["b"]]
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/arrays.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "ints": {
- "type": "array",
- "value": [
- {"type": "integer", "value": "1"},
- {"type": "integer", "value": "2"},
- {"type": "integer", "value": "3"}
- ]
- },
- "floats": {
- "type": "array",
- "value": [
- {"type": "float", "value": "1.1"},
- {"type": "float", "value": "2.1"},
- {"type": "float", "value": "3.1"}
- ]
- },
- "strings": {
- "type": "array",
- "value": [
- {"type": "string", "value": "a"},
- {"type": "string", "value": "b"},
- {"type": "string", "value": "c"}
- ]
- },
- "dates": {
- "type": "array",
- "value": [
- {"type": "datetime", "value": "1987-07-05T17:45:00Z"},
- {"type": "datetime", "value": "1979-05-27T07:32:00Z"},
- {"type": "datetime", "value": "2006-06-01T11:00:00Z"}
- ]
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/arrays.toml
+++ /dev/null
@@ -1,8 +0,0 @@
-ints = [1, 2, 3]
-floats = [1.1, 2.1, 3.1]
-strings = ["a", "b", "c"]
-dates = [
- 1987-07-05T17:45:00Z,
- 1979-05-27T07:32:00Z,
- 2006-06-01T11:00:00Z,
-]
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/bool.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "f": {"type": "bool", "value": "false"},
- "t": {"type": "bool", "value": "true"}
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/bool.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-t = true
-f = false
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/comments-everywhere.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "group": {
- "answer": {"type": "integer", "value": "42"},
- "more": {
- "type": "array",
- "value": [
- {"type": "integer", "value": "42"},
- {"type": "integer", "value": "42"}
- ]
- }
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/comments-everywhere.toml
+++ /dev/null
@@ -1,24 +0,0 @@
-# Top comment.
- # Top comment.
-# Top comment.
-
-# [no-extraneous-groups-please]
-
-[group] # Comment
-answer = 42 # Comment
-# no-extraneous-keys-please = 999
-# Inbetween comment.
-more = [ # Comment
- # What about multiple # comments?
- # Can you handle it?
- #
- # Evil.
-# Evil.
- 42, 42, # Comments within arrays are fun.
- # What about multiple # comments?
- # Can you handle it?
- #
- # Evil.
-# Evil.
-# ] Did I fool you?
-] # Hopefully not.
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/datetime.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "bestdayever": {"type": "datetime", "value": "1987-07-05T17:45:00Z"}
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/datetime.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-bestdayever = 1987-07-05T17:45:00Z
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/empty.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/example-bom.toml
+++ /dev/null
@@ -1,5 +0,0 @@
-best-day-ever = 1987-07-05T17:45:00Z
-
-[numtheory]
-boring = false
-perfection = [6, 28, 496]
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/example-v0.3.0.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"Array":{"key1":{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"},{"type":"integer","value":"3"}]},"key2":{"type":"array","value":[{"type":"string","value":"red"},{"type":"string","value":"yellow"},{"type":"string","value":"green"}]},"key3":{"type":"array","value":[{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]},{"type":"array","value":[{"type":"integer","value":"3"},{"type":"integer","value":"4"},{"type":"integer","value":"5"}]}]},"key4":{"type":"array","value":[{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]},{"type":"array","value":[{"type":"string","value":"a"},{"type":"string","value":"b"},{"type":"string","value":"c"}]}]},"key5":{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"},{"type":"integer","value":"3"}]},"key6":{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]}},"Booleans":{"False":{"type":"bool","value":"false"},"True":{"type":"bool","value":"true"}},"Datetime":{"key1":{"type":"datetime","value":"1979-05-27T07:32:00Z"}},"Float":{"both":{},"exponent":{},"fractional":{"key1":{"type":"float","value":"1.0"},"key2":{"type":"float","value":"3.1415"},"key3":{"type":"float","value":"-0.01"}}},"Integer":{"key1":{"type":"integer","value":"99"},"key2":{"type":"integer","value":"42"},"key3":{"type":"integer","value":"0"},"key4":{"type":"integer","value":"-17"}},"String":{"Literal":{"Multiline":{"lines":{"type":"string","value":"The first newline is\ntrimmed in raw strings.\n All other whitespace\n is preserved.\n"},"regex2":{"type":"string","value":"I [dw]on't need \\d{2} apples"}},"quoted":{"type":"string","value":"Tom \"Dubs\" Preston-Werner"},"regex":{"type":"string","value":"\u003c\\i\\c*\\s*\u003e"},"winpath":{"type":"string","value":"C:\\Users\\nodejs\\templates"},"winpath2":{"type":"string","value":"\\\\ServerX\\admin$\\system32\\"}},"Multiline":{"key1":{"type":"string","value":"One\nTwo"},"key2":{"type":"string","value":"One\nTwo"},"key3":{"type":"string","value":"One\nTwo"}},"Multilined":{"Singleline":{"key1":{"type":"string","value":"The quick brown fox jumps over the lazy dog."},"key2":{"type":"string","value":"The quick brown fox jumps over the lazy dog."},"key3":{"type":"string","value":"The quick brown fox jumps over the lazy dog."}}},"basic":{"type":"string","value":"I'm a string. \"You can quote me\". Name\u0009José\nLocation\u0009SF."}},"Table":{"key":{"type":"string","value":"value"}},"dog":{"tater":{"type":{"type":"string","value":"pug"}}},"fruit":[{"name":{"type":"string","value":"apple"},"physical":{"color":{"type":"string","value":"red"},"shape":{"type":"string","value":"round"}},"variety":[{"name":{"type":"string","value":"red delicious"}},{"name":{"type":"string","value":"granny smith"}}]},{"name":{"type":"string","value":"banana"},"variety":[{"name":{"type":"string","value":"plantain"}}]}],"products":[{"name":{"type":"string","value":"Hammer"},"sku":{"type":"integer","value":"738594937"}},{},{"color":{"type":"string","value":"gray"},"name":{"type":"string","value":"Nail"},"sku":{"type":"integer","value":"284758393"}}],"x":{"y":{"z":{"w":{}}}}}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/example-v0.3.0.toml
+++ /dev/null
@@ -1,182 +0,0 @@
-# Comment
-# I am a comment. Hear me roar. Roar.
-
-# Table
-# Tables (also known as hash tables or dictionaries) are collections of key/value pairs.
-# They appear in square brackets on a line by themselves.
-
-[Table]
-
-key = "value" # Yeah, you can do this.
-
-# Nested tables are denoted by table names with dots in them. Name your tables whatever crap you please, just don't use #, ., [ or ].
-
-[dog.tater]
-type = "pug"
-
-# You don't need to specify all the super-tables if you don't want to. TOML knows how to do it for you.
-
-# [x] you
-# [x.y] don't
-# [x.y.z] need these
-[x.y.z.w] # for this to work
-
-# String
-# There are four ways to express strings: basic, multi-line basic, literal, and multi-line literal.
-# All strings must contain only valid UTF-8 characters.
-
-[String]
-basic = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF."
-
-[String.Multiline]
-
-# The following strings are byte-for-byte equivalent:
-key1 = "One\nTwo"
-key2 = """One\nTwo"""
-key3 = """
-One
-Two"""
-
-[String.Multilined.Singleline]
-
-# The following strings are byte-for-byte equivalent:
-key1 = "The quick brown fox jumps over the lazy dog."
-
-key2 = """
-The quick brown \
-
-
- fox jumps over \
- the lazy dog."""
-
-key3 = """\
- The quick brown \
- fox jumps over \
- the lazy dog.\
- """
-
-[String.Literal]
-
-# What you see is what you get.
-winpath = 'C:\Users\nodejs\templates'
-winpath2 = '\\ServerX\admin$\system32\'
-quoted = 'Tom "Dubs" Preston-Werner'
-regex = '<\i\c*\s*>'
-
-
-[String.Literal.Multiline]
-
-regex2 = '''I [dw]on't need \d{2} apples'''
-lines = '''
-The first newline is
-trimmed in raw strings.
- All other whitespace
- is preserved.
-'''
-
-# Integer
-# Integers are whole numbers. Positive numbers may be prefixed with a plus sign.
-# Negative numbers are prefixed with a minus sign.
-
-[Integer]
-key1 = +99
-key2 = 42
-key3 = 0
-key4 = -17
-
-# Float
-# A float consists of an integer part (which may be prefixed with a plus or minus sign)
-# followed by a fractional part and/or an exponent part.
-
-[Float.fractional]
-
-# fractional
-key1 = +1.0
-key2 = 3.1415
-key3 = -0.01
-
-[Float.exponent]
-
-# exponent
-#key1 = 5e+22
-#key2 = 1e6
-#key3 = -2E-2
-
-[Float.both]
-
-# both
-#key = 6.626e-34
-
-# Boolean
-# Booleans are just the tokens you're used to. Always lowercase.
-
-[Booleans]
-True = true
-False = false
-
-# Datetime
-# Datetimes are RFC 3339 dates.
-
-[Datetime]
-key1 = 1979-05-27T07:32:00Z
-#key2 = 1979-05-27T00:32:00-07:00
-#key3 = 1979-05-27T00:32:00.999999-07:00
-
-# Array
-# Arrays are square brackets with other primitives inside. Whitespace is ignored. Elements are separated by commas. Data types may not be mixed.
-
-[Array]
-key1 = [ 1, 2, 3 ]
-key2 = [ "red", "yellow", "green" ]
-key3 = [ [ 1, 2 ], [3, 4, 5] ]
-key4 = [ [ 1, 2 ], ["a", "b", "c"] ] # this is ok
-
-#Arrays can also be multiline. So in addition to ignoring whitespace, arrays also ignore newlines between the brackets.
-# Terminating commas are ok before the closing bracket.
-
-key5 = [
- 1, 2, 3
-]
-key6 = [
- 1,
- 2, # this is ok
-]
-
-# Array of Tables
-# These can be expressed by using a table name in double brackets.
-# Each table with the same double bracketed name will be an element in the array.
-# The tables are inserted in the order encountered.
-
-[[products]]
-name = "Hammer"
-sku = 738594937
-
-[[products]]
-
-[[products]]
-name = "Nail"
-sku = 284758393
-color = "gray"
-
-
-# You can create nested arrays of tables as well.
-
-[[fruit]]
- name = "apple"
-
- [fruit.physical]
- color = "red"
- shape = "round"
-
- [[fruit.variety]]
- name = "red delicious"
-
- [[fruit.variety]]
- name = "granny smith"
-
-[[fruit]]
- name = "banana"
-
- [[fruit.variety]]
- name = "plantain"
-
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/example-v0.4.0.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"array":{"key1":{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"},{"type":"integer","value":"3"}]},"key2":{"type":"array","value":[{"type":"string","value":"red"},{"type":"string","value":"yellow"},{"type":"string","value":"green"}]},"key3":{"type":"array","value":[{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]},{"type":"array","value":[{"type":"integer","value":"3"},{"type":"integer","value":"4"},{"type":"integer","value":"5"}]}]},"key4":{"type":"array","value":[{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]},{"type":"array","value":[{"type":"string","value":"a"},{"type":"string","value":"b"},{"type":"string","value":"c"}]}]},"key5":{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"},{"type":"integer","value":"3"}]},"key6":{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]}},"boolean":{"False":{"type":"bool","value":"false"},"True":{"type":"bool","value":"true"}},"datetime":{},"float":{"both":{},"exponent":{},"fractional":{"key1":{"type":"float","value":"1.0"},"key2":{"type":"float","value":"3.1415"},"key3":{"type":"float","value":"-0.01"}},"underscores":{}},"fruit":[{"name":{"type":"string","value":"apple"},"physical":{"color":{"type":"string","value":"red"},"shape":{"type":"string","value":"round"}},"variety":[{"name":{"type":"string","value":"red delicious"}},{"name":{"type":"string","value":"granny smith"}}]},{"name":{"type":"string","value":"banana"},"variety":[{"name":{"type":"string","value":"plantain"}}]}],"integer":{"key1":{"type":"integer","value":"99"},"key2":{"type":"integer","value":"42"},"key3":{"type":"integer","value":"0"},"key4":{"type":"integer","value":"-17"},"underscores":{"key1":{"type":"integer","value":"1000"},"key2":{"type":"integer","value":"5349221"},"key3":{"type":"integer","value":"12345"}}},"products":[{"name":{"type":"string","value":"Hammer"},"sku":{"type":"integer","value":"738594937"}},{},{"color":{"type":"string","value":"gray"},"name":{"type":"string","value":"Nail"},"sku":{"type":"integer","value":"284758393"}}],"string":{"basic":{"basic":{"type":"string","value":"I'm a string. \"You can quote me\". Name\u0009José\nLocation\u0009SF."}},"literal":{"multiline":{"lines":{"type":"string","value":"The first newline is\ntrimmed in raw strings.\n All other whitespace\n is preserved.\n"},"regex2":{"type":"string","value":"I [dw]on't need \\d{2} apples"}},"quoted":{"type":"string","value":"Tom \"Dubs\" Preston-Werner"},"regex":{"type":"string","value":"\u003c\\i\\c*\\s*\u003e"},"winpath":{"type":"string","value":"C:\\Users\\nodejs\\templates"},"winpath2":{"type":"string","value":"\\\\ServerX\\admin$\\system32\\"}},"multiline":{"continued":{"key1":{"type":"string","value":"The quick brown fox jumps over the lazy dog."},"key2":{"type":"string","value":"The quick brown fox jumps over the lazy dog."},"key3":{"type":"string","value":"The quick brown fox jumps over the lazy dog."}},"key1":{"type":"string","value":"One\nTwo"},"key2":{"type":"string","value":"One\nTwo"},"key3":{"type":"string","value":"One\nTwo"}}},"table":{"inline":{"name":{"first":{"type":"string","value":"Tom"},"last":{"type":"string","value":"Preston-Werner"}},"point":{"x":{"type":"integer","value":"1"},"y":{"type":"integer","value":"2"}}},"key":{"type":"string","value":"value"},"subtable":{"key":{"type":"string","value":"another value"}}},"x":{"y":{"z":{"w":{}}}}}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/example-v0.4.0.toml
+++ /dev/null
@@ -1,235 +0,0 @@
-################################################################################
-## Comment
-
-# Speak your mind with the hash symbol. They go from the symbol to the end of
-# the line.
-
-
-################################################################################
-## Table
-
-# Tables (also known as hash tables or dictionaries) are collections of
-# key/value pairs. They appear in square brackets on a line by themselves.
-
-[table]
-
-key = "value" # Yeah, you can do this.
-
-# Nested tables are denoted by table names with dots in them. Name your tables
-# whatever crap you please, just don't use #, ., [ or ].
-
-[table.subtable]
-
-key = "another value"
-
-# You don't need to specify all the super-tables if you don't want to. TOML
-# knows how to do it for you.
-
-# [x] you
-# [x.y] don't
-# [x.y.z] need these
-[x.y.z.w] # for this to work
-
-
-################################################################################
-## Inline Table
-
-# Inline tables provide a more compact syntax for expressing tables. They are
-# especially useful for grouped data that can otherwise quickly become verbose.
-# Inline tables are enclosed in curly braces `{` and `}`. No newlines are
-# allowed between the curly braces unless they are valid within a value.
-
-[table.inline]
-
-name = { first = "Tom", last = "Preston-Werner" }
-point = { x = 1, y = 2 }
-
-
-################################################################################
-## String
-
-# There are four ways to express strings: basic, multi-line basic, literal, and
-# multi-line literal. All strings must contain only valid UTF-8 characters.
-
-[string.basic]
-
-basic = "I'm a string. \"You can quote me\". Name\tJos\u00E9\nLocation\tSF."
-
-[string.multiline]
-
-# The following strings are byte-for-byte equivalent:
-key1 = "One\nTwo"
-key2 = """One\nTwo"""
-key3 = """
-One
-Two"""
-
-[string.multiline.continued]
-
-# The following strings are byte-for-byte equivalent:
-key1 = "The quick brown fox jumps over the lazy dog."
-
-key2 = """
-The quick brown \
-
-
- fox jumps over \
- the lazy dog."""
-
-key3 = """\
- The quick brown \
- fox jumps over \
- the lazy dog.\
- """
-
-[string.literal]
-
-# What you see is what you get.
-winpath = 'C:\Users\nodejs\templates'
-winpath2 = '\\ServerX\admin$\system32\'
-quoted = 'Tom "Dubs" Preston-Werner'
-regex = '<\i\c*\s*>'
-
-
-[string.literal.multiline]
-
-regex2 = '''I [dw]on't need \d{2} apples'''
-lines = '''
-The first newline is
-trimmed in raw strings.
- All other whitespace
- is preserved.
-'''
-
-
-################################################################################
-## Integer
-
-# Integers are whole numbers. Positive numbers may be prefixed with a plus sign.
-# Negative numbers are prefixed with a minus sign.
-
-[integer]
-
-key1 = +99
-key2 = 42
-key3 = 0
-key4 = -17
-
-[integer.underscores]
-
-# For large numbers, you may use underscores to enhance readability. Each
-# underscore must be surrounded by at least one digit.
-key1 = 1_000
-key2 = 5_349_221
-key3 = 1_2_3_4_5 # valid but inadvisable
-
-
-################################################################################
-## Float
-
-# A float consists of an integer part (which may be prefixed with a plus or
-# minus sign) followed by a fractional part and/or an exponent part.
-
-[float.fractional]
-
-key1 = +1.0
-key2 = 3.1415
-key3 = -0.01
-
-[float.exponent]
-
-[float.both]
-
-[float.underscores]
-
-
-################################################################################
-## Boolean
-
-# Booleans are just the tokens you're used to. Always lowercase.
-
-[boolean]
-
-True = true
-False = false
-
-
-################################################################################
-## Datetime
-
-# Datetimes are RFC 3339 dates.
-
-[datetime]
-
-#key1 = 1979-05-27T07:32:00Z
-#key2 = 1979-05-27T00:32:00-07:00
-#key3 = 1979-05-27T00:32:00.999999-07:00
-
-
-################################################################################
-## Array
-
-# Arrays are square brackets with other primitives inside. Whitespace is
-# ignored. Elements are separated by commas. Data types may not be mixed.
-
-[array]
-
-key1 = [ 1, 2, 3 ]
-key2 = [ "red", "yellow", "green" ]
-key3 = [ [ 1, 2 ], [3, 4, 5] ]
-key4 = [ [ 1, 2 ], ["a", "b", "c"] ] # this is ok
-
-# Arrays can also be multiline. So in addition to ignoring whitespace, arrays
-# also ignore newlines between the brackets. Terminating commas are ok before
-# the closing bracket.
-
-key5 = [
- 1, 2, 3
-]
-key6 = [
- 1,
- 2, # this is ok
-]
-
-
-################################################################################
-## Array of Tables
-
-# These can be expressed by using a table name in double brackets. Each table
-# with the same double bracketed name will be an element in the array. The
-# tables are inserted in the order encountered.
-
-[[products]]
-
-name = "Hammer"
-sku = 738594937
-
-[[products]]
-
-[[products]]
-
-name = "Nail"
-sku = 284758393
-color = "gray"
-
-
-# You can create nested arrays of tables as well.
-
-[[fruit]]
- name = "apple"
-
- [fruit.physical]
- color = "red"
- shape = "round"
-
- [[fruit.variety]]
- name = "red delicious"
-
- [[fruit.variety]]
- name = "granny smith"
-
-[[fruit]]
- name = "banana"
-
- [[fruit.variety]]
- name = "plantain"
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/example.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "best-day-ever": {"type": "datetime", "value": "1987-07-05T17:45:00Z"},
- "numtheory": {
- "boring": {"type": "bool", "value": "false"},
- "perfection": {
- "type": "array",
- "value": [
- {"type": "integer", "value": "6"},
- {"type": "integer", "value": "28"},
- {"type": "integer", "value": "496"}
- ]
- }
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/example.toml
+++ /dev/null
@@ -1,5 +0,0 @@
-best-day-ever = 1987-07-05T17:45:00Z
-
-[numtheory]
-boring = false
-perfection = [6, 28, 496]
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/example2.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"clients":{"data":{"type":"array","value":[{"type":"array","value":[{"type":"string","value":"gamma"},{"type":"string","value":"delta"}]},{"type":"array","value":[{"type":"integer","value":"1"},{"type":"integer","value":"2"}]}]},"hosts":{"type":"array","value":[{"type":"string","value":"alpha"},{"type":"string","value":"omega"}]}},"database":{"connection_max":{"type":"integer","value":"5000"},"enabled":{"type":"bool","value":"true"},"ports":{"type":"array","value":[{"type":"integer","value":"8001"},{"type":"integer","value":"8001"},{"type":"integer","value":"8002"}]},"server":{"type":"string","value":"192.168.1.1"}},"owner":{"bio":{"type":"string","value":"GitHub Cofounder \u0026 CEO\nLikes tater tots and beer."},"dob":{"type":"datetime","value":"1979-05-27T07:32:00Z"},"name":{"type":"string","value":"Tom Preston-Werner"},"organization":{"type":"string","value":"GitHub"}},"products":[{"name":{"type":"string","value":"Hammer"},"sku":{"type":"integer","value":"738594937"}},{"color":{"type":"string","value":"gray"},"name":{"type":"string","value":"Nail"},"sku":{"type":"integer","value":"284758393"}}],"servers":{"alpha":{"dc":{"type":"string","value":"eqdc10"},"ip":{"type":"string","value":"10.0.0.1"}},"beta":{"country":{"type":"string","value":"中国"},"dc":{"type":"string","value":"eqdc10"},"ip":{"type":"string","value":"10.0.0.2"}}},"title":{"type":"string","value":"TOML Example"}}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/example2.toml
+++ /dev/null
@@ -1,47 +0,0 @@
-# This is a TOML document. Boom.
-
-title = "TOML Example"
-
-[owner]
-name = "Tom Preston-Werner"
-organization = "GitHub"
-bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
-dob = 1979-05-27T07:32:00Z # First class dates? Why not?
-
-[database]
-server = "192.168.1.1"
-ports = [ 8001, 8001, 8002 ]
-connection_max = 5000
-enabled = true
-
-[servers]
-
- # You can indent as you please. Tabs or spaces. TOML don't care.
- [servers.alpha]
- ip = "10.0.0.1"
- dc = "eqdc10"
-
- [servers.beta]
- ip = "10.0.0.2"
- dc = "eqdc10"
- country = "中国" # This should be parsed as UTF-8
-
-[clients]
-data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
-
-# Line breaks are OK when inside arrays
-hosts = [
- "alpha",
- "omega"
-]
-
-# Products
-
- [[products]]
- name = "Hammer"
- sku = 738594937
-
- [[products]]
- name = "Nail"
- sku = 284758393
- color = "gray"
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/float.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "pi": {"type": "float", "value": "3.14"},
- "negpi": {"type": "float", "value": "-3.14"}
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/float.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-pi = 3.14
-negpi = -3.14
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/hard_example.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"the":{"hard":{"another_test_string":{"type":"string","value":" Same thing, but with a string #"},"bit#":{"multi_line_array":{"type":"array","value":[{"type":"string","value":"]"}]},"what?":{"type":"string","value":"You don't think some user won't do that?"}},"harder_test_string":{"type":"string","value":" And when \"'s are in the string, along with # \""},"test_array":{"type":"array","value":[{"type":"string","value":"] "},{"type":"string","value":" # "}]},"test_array2":{"type":"array","value":[{"type":"string","value":"Test #11 ]proved that"},{"type":"string","value":"Experiment #9 was a success"}]}},"test_string":{"type":"string","value":"You'll hate me after this - #"}}}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/hard_example.toml
+++ /dev/null
@@ -1,33 +0,0 @@
-# Test file for TOML
-# Only this one tries to emulate a TOML file written by a user of the kind of parser writers probably hate
-# This part you'll really hate
-
-[the]
-test_string = "You'll hate me after this - #" # " Annoying, isn't it?
-
- [the.hard]
- test_array = [ "] ", " # "] # ] There you go, parse this!
- test_array2 = [ "Test #11 ]proved that", "Experiment #9 was a success" ]
- # You didn't think it'd as easy as chucking out the last #, did you?
- another_test_string = " Same thing, but with a string #"
- harder_test_string = " And when \"'s are in the string, along with # \"" # "and comments are there too"
- # Things will get harder
-
- [the.hard."bit#"]
- "what?" = "You don't think some user won't do that?"
- multi_line_array = [
- "]",
- # ] Oh yes I did
- ]
-
-# Each of the following keygroups/key value pairs should produce an error. Uncomment to them to test
-
-#[error] if you didn't catch this, your parser is broken
-#string = "Anything other than tabs, spaces and newline after a keygroup or key value pair has ended should produce an error unless it is a comment" like this
-#array = [
-# "This might most likely happen in multiline arrays",
-# Like here,
-# "or here,
-# and here"
-# ] End of array comment, forgot the #
-#number = 3.14 pi <--again forgot the #
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/implicit-and-explicit-after.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "a": {
- "better": {"type": "integer", "value": "43"},
- "b": {
- "c": {
- "answer": {"type": "integer", "value": "42"}
- }
- }
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/implicit-and-explicit-after.toml
+++ /dev/null
@@ -1,5 +0,0 @@
-[a.b.c]
-answer = 42
-
-[a]
-better = 43
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/implicit-and-explicit-before.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "a": {
- "better": {"type": "integer", "value": "43"},
- "b": {
- "c": {
- "answer": {"type": "integer", "value": "42"}
- }
- }
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/implicit-and-explicit-before.toml
+++ /dev/null
@@ -1,5 +0,0 @@
-[a]
-better = 43
-
-[a.b.c]
-answer = 42
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/implicit-groups.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "a": {
- "b": {
- "c": {
- "answer": {"type": "integer", "value": "42"}
- }
- }
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/implicit-groups.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-[a.b.c]
-answer = 42
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/integer.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "answer": {"type": "integer", "value": "42"},
- "neganswer": {"type": "integer", "value": "-42"}
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/integer.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-answer = 42
-neganswer = -42
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/key-equals-nospace.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "answer": {"type": "integer", "value": "42"}
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/key-equals-nospace.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-answer=42
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/key-space.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "a b": {"type": "integer", "value": "1"}
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/key-space.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-"a b" = 1
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/key-special-chars.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "~!@#$^&*()_+-`1234567890[]\\|/?><.,;:'": {
- "type": "integer", "value": "1"
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/key-special-chars.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-"~!@#$^&*()_+-`1234567890[]\\|/?><.,;:'" = 1
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/key-with-pound.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "key#name": {"type": "integer", "value": "5"}
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/key-with-pound.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-"key#name" = 5
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/long-float.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "longpi": {"type": "float", "value": "3.141592653589793"},
- "neglongpi": {"type": "float", "value": "-3.141592653589793"}
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/long-float.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-longpi = 3.141592653589793
-neglongpi = -3.141592653589793
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/long-integer.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "answer": {"type": "integer", "value": "9223372036854775807"},
- "neganswer": {"type": "integer", "value": "-9223372036854775808"}
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/long-integer.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-answer = 9223372036854775807
-neganswer = -9223372036854775808
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/multiline-string.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "multiline_empty_one": {
- "type": "string",
- "value": ""
- },
- "multiline_empty_two": {
- "type": "string",
- "value": ""
- },
- "multiline_empty_three": {
- "type": "string",
- "value": ""
- },
- "multiline_empty_four": {
- "type": "string",
- "value": ""
- },
- "equivalent_one": {
- "type": "string",
- "value": "The quick brown fox jumps over the lazy dog."
- },
- "equivalent_two": {
- "type": "string",
- "value": "The quick brown fox jumps over the lazy dog."
- },
- "equivalent_three": {
- "type": "string",
- "value": "The quick brown fox jumps over the lazy dog."
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/multiline-string.toml
+++ /dev/null
@@ -1,23 +0,0 @@
-multiline_empty_one = """"""
-multiline_empty_two = """
-"""
-multiline_empty_three = """\
- """
-multiline_empty_four = """\
- \
- \
- """
-
-equivalent_one = "The quick brown fox jumps over the lazy dog."
-equivalent_two = """
-The quick brown \
-
-
- fox jumps over \
- the lazy dog."""
-
-equivalent_three = """\
- The quick brown \
- fox jumps over \
- the lazy dog.\
- """
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/raw-multiline-string.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "oneline": {
- "type": "string",
- "value": "This string has a ' quote character."
- },
- "firstnl": {
- "type": "string",
- "value": "This string has a ' quote character."
- },
- "multiline": {
- "type": "string",
- "value": "This string\nhas ' a quote character\nand more than\none newline\nin it."
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/raw-multiline-string.toml
+++ /dev/null
@@ -1,9 +0,0 @@
-oneline = '''This string has a ' quote character.'''
-firstnl = '''
-This string has a ' quote character.'''
-multiline = '''
-This string
-has ' a quote character
-and more than
-one newline
-in it.'''
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/raw-string.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "backspace": {
- "type": "string",
- "value": "This string has a \\b backspace character."
- },
- "tab": {
- "type": "string",
- "value": "This string has a \\t tab character."
- },
- "newline": {
- "type": "string",
- "value": "This string has a \\n new line character."
- },
- "formfeed": {
- "type": "string",
- "value": "This string has a \\f form feed character."
- },
- "carriage": {
- "type": "string",
- "value": "This string has a \\r carriage return character."
- },
- "slash": {
- "type": "string",
- "value": "This string has a \\/ slash character."
- },
- "backslash": {
- "type": "string",
- "value": "This string has a \\\\ backslash character."
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/raw-string.toml
+++ /dev/null
@@ -1,7 +0,0 @@
-backspace = 'This string has a \b backspace character.'
-tab = 'This string has a \t tab character.'
-newline = 'This string has a \n new line character.'
-formfeed = 'This string has a \f form feed character.'
-carriage = 'This string has a \r carriage return character.'
-slash = 'This string has a \/ slash character.'
-backslash = 'This string has a \\ backslash character.'
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/string-empty.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "answer": {
- "type": "string",
- "value": ""
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/string-empty.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-answer = ""
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/string-escapes.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "backspace": {
- "type": "string",
- "value": "This string has a \u0008 backspace character."
- },
- "tab": {
- "type": "string",
- "value": "This string has a \u0009 tab character."
- },
- "newline": {
- "type": "string",
- "value": "This string has a \u000A new line character."
- },
- "formfeed": {
- "type": "string",
- "value": "This string has a \u000C form feed character."
- },
- "carriage": {
- "type": "string",
- "value": "This string has a \u000D carriage return character."
- },
- "quote": {
- "type": "string",
- "value": "This string has a \u0022 quote character."
- },
- "slash": {
- "type": "string",
- "value": "This string has a \u002F slash character."
- },
- "backslash": {
- "type": "string",
- "value": "This string has a \u005C backslash character."
- },
- "notunicode1": {
- "type": "string",
- "value": "This string does not have a unicode \\u escape."
- },
- "notunicode2": {
- "type": "string",
- "value": "This string does not have a unicode \u005Cu escape."
- },
- "notunicode3": {
- "type": "string",
- "value": "This string does not have a unicode \\u0075 escape."
- },
- "notunicode4": {
- "type": "string",
- "value": "This string does not have a unicode \\\u0075 escape."
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/string-escapes.toml
+++ /dev/null
@@ -1,12 +0,0 @@
-backspace = "This string has a \b backspace character."
-tab = "This string has a \t tab character."
-newline = "This string has a \n new line character."
-formfeed = "This string has a \f form feed character."
-carriage = "This string has a \r carriage return character."
-quote = "This string has a \" quote character."
-slash = "This string has a / slash character."
-backslash = "This string has a \\ backslash character."
-notunicode1 = "This string does not have a unicode \\u escape."
-notunicode2 = "This string does not have a unicode \u005Cu escape."
-notunicode3 = "This string does not have a unicode \\u0075 escape."
-notunicode4 = "This string does not have a unicode \\\u0075 escape."
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/string-simple.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "answer": {
- "type": "string",
- "value": "You are not drinking enough whisky."
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/string-simple.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-answer = "You are not drinking enough whisky."
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/string-with-pound.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "pound": {"type": "string", "value": "We see no # comments here."},
- "poundcomment": {
- "type": "string",
- "value": "But there are # some comments here."
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/string-with-pound.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-pound = "We see no # comments here."
-poundcomment = "But there are # some comments here." # Did I # mess you up?
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-array-implicit.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "albums": {
- "songs": [
- {"name": {"type": "string", "value": "Glory Days"}}
- ]
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-array-implicit.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-[[albums.songs]]
-name = "Glory Days"
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-array-many.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "people": [
- {
- "first_name": {"type": "string", "value": "Bruce"},
- "last_name": {"type": "string", "value": "Springsteen"}
- },
- {
- "first_name": {"type": "string", "value": "Eric"},
- "last_name": {"type": "string", "value": "Clapton"}
- },
- {
- "first_name": {"type": "string", "value": "Bob"},
- "last_name": {"type": "string", "value": "Seger"}
- }
- ]
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-array-many.toml
+++ /dev/null
@@ -1,11 +0,0 @@
-[[people]]
-first_name = "Bruce"
-last_name = "Springsteen"
-
-[[people]]
-first_name = "Eric"
-last_name = "Clapton"
-
-[[people]]
-first_name = "Bob"
-last_name = "Seger"
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-array-nest.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "albums": [
- {
- "name": {"type": "string", "value": "Born to Run"},
- "songs": [
- {"name": {"type": "string", "value": "Jungleland"}},
- {"name": {"type": "string", "value": "Meeting Across the River"}}
- ]
- },
- {
- "name": {"type": "string", "value": "Born in the USA"},
- "songs": [
- {"name": {"type": "string", "value": "Glory Days"}},
- {"name": {"type": "string", "value": "Dancing in the Dark"}}
- ]
- }
- ]
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-array-nest.toml
+++ /dev/null
@@ -1,17 +0,0 @@
-[[albums]]
-name = "Born to Run"
-
- [[albums.songs]]
- name = "Jungleland"
-
- [[albums.songs]]
- name = "Meeting Across the River"
-
-[[albums]]
-name = "Born in the USA"
-
- [[albums.songs]]
- name = "Glory Days"
-
- [[albums.songs]]
- name = "Dancing in the Dark"
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-array-one.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "people": [
- {
- "first_name": {"type": "string", "value": "Bruce"},
- "last_name": {"type": "string", "value": "Springsteen"}
- }
- ]
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-array-one.toml
+++ /dev/null
@@ -1,3 +0,0 @@
-[[people]]
-first_name = "Bruce"
-last_name = "Springsteen"
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-empty.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "a": {}
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-empty.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-[a]
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-sub-empty.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "a": { "b": {} }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-sub-empty.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-[a]
-[a.b]
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-whitespace.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "valid key": {}
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-whitespace.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-["valid key"]
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-with-pound.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "key#group": {
- "answer": {"type": "integer", "value": "42"}
- }
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/table-with-pound.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-["key#group"]
-answer = 42
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/unicode-escape.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "answer4": {"type": "string", "value": "\u03B4α"},
- "answer8": {"type": "string", "value": "\u03B4β"}
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/unicode-escape.toml
+++ /dev/null
@@ -1,2 +0,0 @@
-answer4 = "\u03B4α"
-answer8 = "\U000003B4β"
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/unicode-literal.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "answer": {"type": "string", "value": "δ"}
-}
deleted file mode 100644
--- a/third_party/rust/toml/tests/valid/unicode-literal.toml
+++ /dev/null
@@ -1,1 +0,0 @@
-answer = "δ"
deleted file mode 100644
--- a/third_party/rust/user32-sys/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","Cargo.toml":"56857d1d8a20ad92e2ba04c0a239b6c80e5de7e93a94da7fba78d84b80b0e6d4","README.md":"0f296ffa0eece6393079cb43dd94ecb064f9d6f8bcca2310ecac6c75b5b74be6","build.rs":"5880159389af1b9ab6d88e9f6206ab265dba0f4ded68b5689a0809c182d347f6","src/lib.rs":"e7f755ec0816d0142a4f25f6dc2f816aa452898709f6e5acc538529025127be9"},"package":"4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/user32-sys/Cargo.toml
+++ /dev/null
@@ -1,17 +0,0 @@
-[package]
-name = "user32-sys"
-version = "0.2.0"
-authors = ["Peter Atashian <retep998@gmail.com>"]
-description = "Contains function definitions for the Windows API library user32. See winapi for types and constants."
-documentation = "https://retep998.github.io/doc/user32/"
-repository = "https://github.com/retep998/winapi-rs"
-readme = "README.md"
-keywords = ["windows", "ffi", "win32"]
-license = "MIT"
-build = "build.rs"
-[lib]
-name = "user32"
-[dependencies]
-winapi = { version = "0.2.5", path = "../.." }
-[build-dependencies]
-winapi-build = { version = "0.1.1", path = "../../build" }
deleted file mode 100644
--- a/third_party/rust/user32-sys/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# user32 #
-Contains function definitions for the Windows API library user32. See winapi for types and constants.
-
-```toml
-[dependencies]
-user32-sys = "0.1.2"
-```
-
-```rust
-extern crate user32;
-```
-
-[Documentation](https://retep998.github.io/doc/user32/)
deleted file mode 100644
--- a/third_party/rust/user32-sys/build.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright © 2015, Peter Atashian
-// Licensed under the MIT License <LICENSE.md>
-extern crate build;
-fn main() {
- build::link("user32", false)
-}
deleted file mode 100644
--- a/third_party/rust/user32-sys/src/lib.rs
+++ /dev/null
@@ -1,1104 +0,0 @@
-// Copyright © 2015, Peter Atashian
-// Licensed under the MIT License <LICENSE.md>
-//! FFI bindings to user32.
-#![cfg(windows)]
-extern crate winapi;
-use winapi::*;
-extern "system" {
- pub fn ActivateKeyboardLayout(hkl: HKL, flags: UINT) -> HKL;
- pub fn AddClipboardFormatListener(hWnd: HWND) -> BOOL;
- pub fn AdjustWindowRect(lpRect: LPRECT, dwStyle: DWORD, bMenu: BOOL) -> BOOL;
- pub fn AdjustWindowRectEx(
- lpRect: LPRECT, dwStyle: DWORD, bMenu: BOOL, dwExStyle: DWORD,
- ) -> BOOL;
- pub fn AllowSetForegroundWindow(dwProcessId: DWORD) -> BOOL;
- pub fn AnimateWindow(hWnd: HWND, dwTime: DWORD, dwFlags: DWORD) -> BOOL;
- pub fn AnyPopup() -> BOOL;
- pub fn AppendMenuA(
- hMenu: HMENU, uFlags: UINT, uIDNewItem: UINT_PTR, lpNewItem: LPCSTR,
- ) -> BOOL;
- pub fn AppendMenuW(
- hMenu: HMENU, uFlags: UINT, uIDNewItem: UINT_PTR, lpNewItem: LPCWSTR,
- ) -> BOOL;
- pub fn ArrangeIconicWindows(hWnd: HWND) -> UINT;
- pub fn AttachThreadInput(idAttach: DWORD, idAttachTo: DWORD, fAttach: BOOL) -> BOOL;
- // pub fn BeginDeferWindowPos();
- pub fn BeginPaint(hwnd: HWND, lpPaint: LPPAINTSTRUCT) -> HDC;
- pub fn BlockInput(fBlockIt: BOOL) -> BOOL;
- pub fn BringWindowToTop(hWnd: HWND) -> BOOL;
- // pub fn BroadcastSystemMessage();
- pub fn BroadcastSystemMessageA(
- flags: DWORD, lpInfo: LPDWORD, Msg: UINT, wParam: WPARAM, lParam: LPARAM,
- ) -> LONG;
- // pub fn BroadcastSystemMessageExA();
- // pub fn BroadcastSystemMessageExW();
- pub fn BroadcastSystemMessageW(
- flags: DWORD, lpInfo: LPDWORD, Msg: UINT, wParam: WPARAM, lParam: LPARAM,
- ) -> LONG;
- pub fn CalculatePopupWindowPosition(
- anchorPoint: *const POINT, windowSize: *const SIZE, flags: UINT, excludeRect: *mut RECT,
- popupWindowPosition: *mut RECT,
- ) -> BOOL;
- pub fn CallMsgFilterA(lpMsg: LPMSG, nCode: c_int) -> BOOL;
- pub fn CallMsgFilterW(lpMsg: LPMSG, nCode: c_int) -> BOOL;
- pub fn CallNextHookEx(hhk: HHOOK, nCode: c_int, wParam: WPARAM, lParam: LPARAM) -> LRESULT;
- pub fn CallWindowProcA(
- lpPrevWndFunc: WNDPROC, hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM,
- ) -> LRESULT;
- pub fn CallWindowProcW(
- lpPrevWndFunc: WNDPROC, hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM,
- ) -> LRESULT;
- pub fn CancelShutdown() -> BOOL;
- // pub fn CascadeChildWindows();
- pub fn CascadeWindows(
- hwndParent: HWND, wHow: UINT, lpRect: *const RECT, cKids: UINT, lpKids: *const HWND,
- ) -> WORD;
- pub fn ChangeClipboardChain(hwndRemove: HWND, hwndNewNext: HWND) -> BOOL;
- pub fn ChangeDisplaySettingsA(lpDevMode: *mut DEVMODEA, dwFlags: DWORD) -> LONG;
- pub fn ChangeDisplaySettingsExA(
- lpszDeviceName: LPCSTR, lpDevMode: *mut DEVMODEA, hwnd: HWND, dwFlags: DWORD,
- lParam: LPVOID,
- ) -> LONG;
- pub fn ChangeDisplaySettingsExW(
- lpszDeviceName: LPCWSTR, lpDevMode: *mut DEVMODEW, hwnd: HWND, dwFlags: DWORD,
- lParam: LPVOID,
- ) -> LONG;
- pub fn ChangeDisplaySettingsW(lpDevMode: *mut DEVMODEW, dwFlags: DWORD) -> LONG;
- pub fn ChangeMenuA(
- hMenu: HMENU, cmd: UINT, lpszNewItem: LPCSTR, cmdInsert: UINT, flags: UINT,
- ) -> BOOL;
- pub fn ChangeMenuW(
- hMenu: HMENU, cmd: UINT, lpszNewItem: LPCWSTR, cmdInsert: UINT, flags: UINT,
- ) -> BOOL;
- pub fn ChangeWindowMessageFilter(message: UINT, dwFlag: DWORD) -> BOOL;
- pub fn ChangeWindowMessageFilterEx(
- hwnd: HWND, message: UINT, action: DWORD, pChangeFilterStruct: PCHANGEFILTERSTRUCT,
- ) -> BOOL;
- pub fn CharLowerA(lpsz: LPSTR) -> LPSTR;
- pub fn CharLowerBuffA(lpsz: LPSTR, cchLength: DWORD) -> DWORD;
- pub fn CharLowerBuffW(lpsz: LPWSTR, cchLength: DWORD) -> DWORD;
- pub fn CharLowerW(lpsz: LPWSTR) -> LPWSTR;
- pub fn CharNextA(lpsz: LPCSTR) -> LPSTR;
- pub fn CharNextExA(codePage: WORD, lpCurrentChar: LPSTR, dwFlags: DWORD) -> LPSTR;
- pub fn CharNextW(lpsz: LPCWSTR) -> LPWSTR;
- pub fn CharPrevA(lpszStart: LPCSTR, lpszCurrent: LPCSTR) -> LPSTR;
- pub fn CharPrevExA(
- codePage: WORD, lpStart: LPCSTR, lpCurrentChar: LPCSTR, dwFlags: DWORD,
- ) -> LPSTR;
- pub fn CharPrevW(lpszStart: LPCWSTR, lpszCurrent: LPCWSTR) -> LPWSTR;
- // pub fn CharToOemA();
- // pub fn CharToOemBuffA();
- // pub fn CharToOemBuffW();
- // pub fn CharToOemW();
- pub fn CharUpperA(lpsz: LPSTR) -> LPSTR;
- pub fn CharUpperBuffA(lpsz: LPSTR, cchLength: DWORD) -> DWORD;
- pub fn CharUpperBuffW(lpsz: LPWSTR, cchLength: DWORD) -> DWORD;
- pub fn CharUpperW(lpsz: LPWSTR) -> LPWSTR;
- pub fn CheckDlgButton(hDlg: HWND, nIDButton: c_int, uCheck: UINT) -> BOOL;
- pub fn CheckMenuItem(hMenu: HMENU, uIDCheckItem: UINT, uCheck: UINT) -> DWORD;
- pub fn CheckMenuRadioItem(
- hMenu: HMENU, first: UINT, last: UINT, check: UINT, flags: UINT,
- ) -> BOOL;
- pub fn CheckRadioButton(
- hDlg: HWND, nIDFirstButton: c_int, nIDLasatButton: c_int, nIDCheckButton: c_int,
- ) -> BOOL;
- pub fn ChildWindowFromPoint(hWndParent: HWND, point: POINT) -> HWND;
- pub fn ChildWindowFromPointEx(hwnd: HWND, pt: POINT, flags: UINT) -> HWND;
- pub fn ClientToScreen(hWnd: HWND, lpPoint: LPPOINT) -> BOOL;
- pub fn ClipCursor(lpRect: *const RECT) -> BOOL;
- pub fn CloseClipboard() -> BOOL;
- pub fn CloseDesktop(hDesktop: HDESK) -> BOOL;
- // pub fn CloseGestureInfoHandle();
- pub fn CloseTouchInputHandle(hTouchInput: HTOUCHINPUT) -> BOOL;
- pub fn CloseWindow(hWnd: HWND) -> BOOL;
- pub fn CloseWindowStation(hWinSta: HWINSTA) -> BOOL;
- pub fn CopyAcceleratorTableA(
- hAccelSrc: HACCEL, lpAccelDst: LPACCEL, cAccelEntries: c_int,
- ) -> c_int;
- pub fn CopyAcceleratorTableW(
- hAccelSrc: HACCEL, lpAccelDst: LPACCEL, cAccelEntries: c_int,
- ) -> c_int;
- pub fn CopyIcon(hIcon: HICON) -> HICON;
- pub fn CopyImage(h: HANDLE, type_: UINT, cx: c_int, cy: c_int, flags: UINT) -> HANDLE;
- pub fn CopyRect(lprcDst: LPRECT, lprcSrc: *const RECT) -> BOOL;
- pub fn CountClipboardFormats() -> c_int;
- pub fn CreateAcceleratorTableA(paccel: LPACCEL, cAccel: c_int) -> HACCEL;
- pub fn CreateAcceleratorTableW(paccel: LPACCEL, cAccel: c_int) -> HACCEL;
- pub fn CreateCaret(hWnd: HWND, hBitmap: HBITMAP, nWidth: c_int, nHeight: c_int) -> BOOL;
- pub fn CreateCursor(
- hInst: HINSTANCE, xHotSpot: c_int, yHotSpot: c_int, nWidth: c_int, nHeight: c_int,
- pvAndPlane: *const VOID, pvXORPlane: *const VOID,
- ) -> HCURSOR;
- pub fn CreateDesktopA(
- lpszDesktop: LPCSTR, lpszDevice: LPCSTR, pDevmode: *mut DEVMODEA, dwFlags: DWORD,
- dwDesiredAccess: ACCESS_MASK, lpsa: LPSECURITY_ATTRIBUTES,
- ) -> HDESK;
- // pub fn CreateDesktopExA();
- // pub fn CreateDesktopExW();
- pub fn CreateDesktopW(
- lpszDesktop: LPCWSTR, lpszDevice: LPCWSTR, pDevmode: *mut DEVMODEW, dwFlags: DWORD,
- dwDesiredAccess: ACCESS_MASK, lpsa: LPSECURITY_ATTRIBUTES,
- ) -> HDESK;
- pub fn CreateDialogIndirectParamA(
- hInstance: HINSTANCE, lpTemplate: LPCDLGTEMPLATEA, hWndParent: HWND, lpDialogFunc: DLGPROC,
- dwInitParam: LPARAM,
- ) -> HWND;
- pub fn CreateDialogIndirectParamW(
- hInstance: HINSTANCE, lpTemplate: LPCDLGTEMPLATEW, hWndParent: HWND, lpDialogFunc: DLGPROC,
- dwInitParam: LPARAM,
- ) -> HWND;
- pub fn CreateDialogParamA(
- hInstance: HINSTANCE, lpTemplateName: LPCSTR, hWndParent: HWND, lpDialogFunc: DLGPROC,
- dwInitParam: LPARAM,
- ) -> HWND;
- pub fn CreateDialogParamW(
- hInstance: HINSTANCE, lpTemplateName: LPCWSTR, hWndParent: HWND, lpDialogFunc: DLGPROC,
- dwInitParam: LPARAM,
- ) -> HWND;
- pub fn CreateIcon(
- hInstance: HINSTANCE, nWidth: c_int, nHeight: c_int, cPlanes: BYTE, cBitsPixel: BYTE,
- lpbANDbits: *const BYTE, lpbXORbits: *const BYTE,
- ) -> HICON;
- pub fn CreateIconFromResource(
- presbits: PBYTE, dwResSize: DWORD, fIcon: BOOL, dwVer: DWORD,
- ) -> HICON;
- pub fn CreateIconFromResourceEx(
- presbits: PBYTE, dwResSize: DWORD, fIcon: BOOL, dwVer: DWORD, cxDesired: c_int,
- cyDesired: c_int, Flags: UINT,
- ) -> HICON;
- pub fn CreateIconIndirect(piconinfo: PICONINFO) -> HICON;
- pub fn CreateMDIWindowA(
- lpClassName: LPCSTR, lpWindowName: LPCSTR, dwStyle: DWORD, X: c_int, Y: c_int,
- nWidth: c_int, nHeight: c_int, hWndParent: HWND, hInstance: HINSTANCE, lParam: LPARAM,
- ) -> HWND;
- pub fn CreateMDIWindowW(
- lpClassName: LPCWSTR, lpWindowName: LPCWSTR, dwStyle: DWORD, X: c_int, Y: c_int,
- nWidth: c_int, nHeight: c_int, hWndParent: HWND, hInstance: HINSTANCE, lParam: LPARAM,
- ) -> HWND;
- pub fn CreateMenu() -> HMENU;
- pub fn CreatePopupMenu() ->HMENU;
- pub fn CreateWindowExA(
- dwExStyle: DWORD, lpClassName: LPCSTR, lpWindowName: LPCSTR, dwStyle: DWORD, x: c_int,
- y: c_int, nWidth: c_int, nHeight: c_int, hWndParent: HWND, hMenu: HMENU,
- hInstance: HINSTANCE, lpParam: LPVOID,
- ) -> HWND;
- pub fn CreateWindowExW(
- dwExStyle: DWORD, lpClassName: LPCWSTR, lpWindowName: LPCWSTR, dwStyle: DWORD, x: c_int,
- y: c_int, nWidth: c_int, nHeight: c_int, hWndParent: HWND, hMenu: HMENU,
- hInstance: HINSTANCE, lpParam: LPVOID,
- ) -> HWND;
- pub fn CreateWindowStationA(
- lpwinsta: LPCSTR, dwFlags: DWORD, dwDesiredAccess: ACCESS_MASK, lpsa: LPSECURITY_ATTRIBUTES,
- ) -> HWINSTA;
- pub fn CreateWindowStationW(
- lpwinsta: LPCWSTR, dwFlags: DWORD, dwDesiredAccess: ACCESS_MASK,
- lpsa: LPSECURITY_ATTRIBUTES,
- ) -> HWINSTA;
- // pub fn DdeAbandonTransaction();
- // pub fn DdeAccessData();
- // pub fn DdeAddData();
- // pub fn DdeClientTransaction();
- // pub fn DdeCmpStringHandles();
- // pub fn DdeConnect();
- // pub fn DdeConnectList();
- // pub fn DdeCreateDataHandle();
- // pub fn DdeCreateStringHandleA();
- // pub fn DdeCreateStringHandleW();
- // pub fn DdeDisconnect();
- // pub fn DdeDisconnectList();
- // pub fn DdeEnableCallback();
- // pub fn DdeFreeDataHandle();
- // pub fn DdeFreeStringHandle();
- // pub fn DdeGetData();
- // pub fn DdeGetLastError();
- // pub fn DdeImpersonateClient();
- // pub fn DdeInitializeA();
- // pub fn DdeInitializeW();
- // pub fn DdeKeepStringHandle();
- // pub fn DdeNameService();
- // pub fn DdePostAdvise();
- // pub fn DdeQueryConvInfo();
- // pub fn DdeQueryNextServer();
- // pub fn DdeQueryStringA();
- // pub fn DdeQueryStringW();
- // pub fn DdeReconnect();
- // pub fn DdeSetQualityOfService();
- // pub fn DdeSetUserHandle();
- // pub fn DdeUnaccessData();
- // pub fn DdeUninitialize();
- pub fn DefDlgProcA(
- hDlg: HWND, msg: UINT, wParam: WPARAM, lParam: LPARAM,
- ) -> LRESULT;
- pub fn DefDlgProcW(
- hDlg: HWND, msg: UINT, wParam: WPARAM, lParam: LPARAM,
- ) -> LRESULT;
- pub fn DefFrameProcA(
- hwnd: HWND, hwndMDIClient: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM,
- ) -> LRESULT;
- pub fn DefFrameProcW(
- hwnd: HWND, hwndMDIClient: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM,
- ) -> LRESULT;
- pub fn DefMDIChildProcA(
- hwnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM,
- ) -> LRESULT;
- pub fn DefMDIChildProcW(
- hwnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM,
- ) -> LRESULT;
- pub fn DefRawInputProc(paRawInput: *mut PRAWINPUT, nInput: INT, cbSizeHeader: UINT) -> LRESULT;
- pub fn DefWindowProcA(hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM) -> LRESULT;
- pub fn DefWindowProcW(hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM) -> LRESULT;
- pub fn DeferWindowPos(
- hWinPosInfo: HDWP, hWnd: HWND, hWndInserAfter: HWND, x: c_int, y: c_int, cx: c_int,
- cy: c_int, uFlags: UINT,
- ) -> HDWP;
- pub fn DeleteMenu(hMenu: HMENU, uPosition: UINT, uFlags: UINT) -> BOOL;
- pub fn DeregisterShellHookWindow(hwnd: HWND) -> BOOL;
- pub fn DestroyAcceleratorTable(hAccel: HACCEL) -> BOOL;
- pub fn DestroyCaret() -> BOOL;
- pub fn DestroyCursor(hCursor: HCURSOR) -> BOOL;
- pub fn DestroyIcon(hIcon: HICON) -> BOOL;
- pub fn DestroyMenu(hMenu: HMENU) -> BOOL;
- pub fn DestroyWindow(hWnd: HWND) -> BOOL;
- pub fn DialogBoxIndirectParamA(
- hInstance: HINSTANCE, hDialogTemplate: LPCDLGTEMPLATEA, hWndParent: HWND,
- lpDialogFunc: DLGPROC, dwInitParam: LPARAM,
- ) -> INT_PTR;
- pub fn DialogBoxIndirectParamW(
- hInstance: HINSTANCE, hDialogTemplate: LPCDLGTEMPLATEW, hWndParent: HWND,
- lpDialogFunc: DLGPROC, dwInitParam: LPARAM,
- ) -> INT_PTR;
- pub fn DialogBoxParamA(
- hInstance: HINSTANCE, lpTemplateName: LPCSTR, hWndParent: HWND, lpDialogFunc: DLGPROC,
- dwInitParam: LPARAM,
- ) -> INT_PTR;
- pub fn DialogBoxParamW(
- hInstance: HINSTANCE, lpTemplateName: LPCWSTR, hWndParent: HWND, lpDialogFunc: DLGPROC,
- dwInitParam: LPARAM,
- ) -> INT_PTR;
- // pub fn DisableProcessWindowsGhosting();
- pub fn DispatchMessageA(lpmsg: *const MSG) -> LRESULT;
- pub fn DispatchMessageW(lpmsg: *const MSG) -> LRESULT;
- // pub fn DisplayConfigGetDeviceInfo();
- // pub fn DisplayConfigSetDeviceInfo();
- pub fn DlgDirListA(
- hDlg: HWND, lpPathSpec: LPSTR, nIDListBox: c_int, nIDStaticPath: c_int, uFileType: UINT
- ) -> c_int;
- pub fn DlgDirListComboBoxA(
- hDlg: HWND, lpPathSpec: LPSTR, nIDComboBox: c_int, nIDStaticPath: c_int, uFiletype: UINT
- ) -> c_int;
- pub fn DlgDirListComboBoxW(
- hDlg: HWND, lpPathSpec: LPWSTR, nIDComboBox: c_int, nIDStaticPath: c_int, uFiletype: UINT
- ) -> c_int;
- pub fn DlgDirListW(
- hDlg: HWND, lpPathSpec: LPWSTR, nIDListBox: c_int, nIDStaticPath: c_int, uFileType: UINT
- ) -> c_int;
- pub fn DlgDirSelectComboBoxExA(
- hwndDlg: HWND, lpString: LPSTR, cchOut: c_int, idComboBox: c_int
- ) -> BOOL;
- pub fn DlgDirSelectComboBoxExW(
- hwndDlg: HWND, lpString: LPWSTR, cchOut: c_int, idComboBox: c_int
- ) -> BOOL;
- pub fn DlgDirSelectExA(
- hwndDlg: HWND, lpString: LPSTR, chCount: c_int, idListBox: c_int
- ) -> BOOL;
- pub fn DlgDirSelectExW(
- hwndDlg: HWND, lpString: LPWSTR, chCount: c_int, idListBox: c_int
- ) -> BOOL;
- pub fn DragDetect(hwnd: HWND, pt: POINT) -> BOOL;
- pub fn DragObject(
- hwndParent: HWND, hwndFrom: HWND, fmt: UINT, data: ULONG_PTR, hcur: HCURSOR,
- ) -> DWORD;
- pub fn DrawAnimatedRects(
- hwnd: HWND, idAni: c_int, lprcFrom: *const RECT, lprcTo: *const RECT,
- ) -> BOOL;
- pub fn DrawCaption(hwnd: HWND, hdc: HDC, lprect: *const RECT, flags: UINT) -> BOOL;
- pub fn DrawEdge(hdc: HDC, qrc: LPRECT, edge: UINT, grfFlags: UINT) -> BOOL;
- pub fn DrawFocusRect(hDC: HDC, lprc: *const RECT) -> BOOL;
- // pub fn DrawFrame();
- pub fn DrawFrameControl(hdc: HDC, lprc: LPRECT, uType: UINT, uState: UINT) -> BOOL;
- pub fn DrawIcon(hDC: HDC, x: c_int, y: c_int, hIcon: HICON) -> BOOL;
- pub fn DrawIconEx(
- hdc: HDC, xLeft: c_int, yTop: c_int, hIcon: HICON, cxWidth: c_int, cyWidth: c_int,
- istepIfAniCur: UINT, hbrFlickerFreeDraw: HBRUSH, diFlags: UINT,
- ) -> BOOL;
- pub fn DrawMenuBar(hwnd: HWND) -> BOOL;
- pub fn DrawStateA(
- hdc: HDC, hbrFore: HBRUSH, qfnCallBack: DRAWSTATEPROC, lData: LPARAM, wData: WPARAM,
- x: c_int, y: c_int, cx: c_int, cy: c_int, uFlags: UINT,
- ) -> BOOL;
- pub fn DrawStateW(
- hdc: HDC, hbrFore: HBRUSH, qfnCallBack: DRAWSTATEPROC, lData: LPARAM, wData: WPARAM,
- x: c_int, y: c_int, cx: c_int, cy: c_int, uFlags: UINT,
- ) -> BOOL;
- pub fn DrawTextA(
- hdc: HDC, lpchText: LPCSTR, cchText: c_int, lprc: LPRECT, format: UINT,
- ) -> c_int;
- pub fn DrawTextExA(
- hdc: HDC, lpchText: LPCSTR, cchText: c_int, lprc: LPRECT, format: UINT,
- lpdtp: LPDRAWTEXTPARAMS,
- ) -> c_int;
- pub fn DrawTextExW(
- hdc: HDC, lpchText: LPCWSTR, cchText: c_int, lprc: LPRECT, format: UINT,
- lpdtp: LPDRAWTEXTPARAMS,
- ) -> c_int;
- pub fn DrawTextW(
- hdc: HDC, lpchText: LPCWSTR, cchText: c_int, lprc: LPRECT, format: UINT,
- ) -> c_int;
- // pub fn EditWndProc();
- pub fn EmptyClipboard() -> BOOL;
- pub fn EnableMenuItem(hMenu: HMENU, uIDEnableItem: UINT, uEnable: UINT) -> BOOL;
- pub fn EnableMouseInPointer(fEnable: BOOL) -> BOOL;
- pub fn EnableScrollBar(hWnd: HWND, wSBflags: UINT, wArrows: UINT) -> BOOL;
- // pub fn EnableSessionForMMCSS();
- pub fn EnableWindow(hWnd: HWND, bEnable: BOOL) -> BOOL;
- pub fn EndDeferWindowPos(hWinPosInfo: HDWP) -> BOOL;
- pub fn EndDialog(hDlg: HWND, nResult: INT_PTR) -> BOOL;
- pub fn EndMenu(hMenu: HMENU, uFlags: UINT, uIDNewItem: UINT_PTR, lpNewItem: LPCSTR) -> BOOL;
- pub fn EndPaint(hWnd: HWND, lpPaint: *const PAINTSTRUCT) -> BOOL;
- pub fn EndTask(hWnd: HWND, fShutDown: BOOL, fForce: BOOL) -> BOOL;
- pub fn EnumChildWindows(
- hwndParent: HWND, lpEnumFunc: WNDENUMPROC, lpParam: LPARAM,
- ) -> BOOL;
- pub fn EnumClipboardFormats(format: UINT) -> UINT;
- pub fn EnumDesktopWindows(hDesktop: HDESK, lpfn: WNDENUMPROC, lParam: LPARAM) -> BOOL;
- pub fn EnumDesktopsA(
- hwinsta: HWINSTA, lpEnumFunc: DESKTOPENUMPROCA, lParam: LPARAM,
- ) -> BOOL;
- pub fn EnumDesktopsW(
- hwinsta: HWINSTA, lpEnumFunc: DESKTOPENUMPROCW, lParam: LPARAM,
- ) -> BOOL;
- pub fn EnumDisplayDevicesA(
- lpDevice: LPCSTR, iDevNum: DWORD, lpDisplayDevice: PDISPLAY_DEVICEA, dwFlags: DWORD,
- ) -> BOOL;
- pub fn EnumDisplayDevicesW(
- lpDevice: LPCWSTR, iDevNum: DWORD, lpDisplayDevice: PDISPLAY_DEVICEW, dwFlags: DWORD,
- ) -> BOOL;
- pub fn EnumDisplayMonitors(
- hdc: HDC, lprcClip: LPCRECT, lpfnEnum: MONITORENUMPROC, dwData: LPARAM,
- ) -> BOOL;
- pub fn EnumDisplaySettingsA(
- lpszDeviceName: LPCSTR, iModeNum: DWORD, lpDevMode: *mut DEVMODEA,
- ) -> BOOL;
- pub fn EnumDisplaySettingsExA(
- lpszDeviceName: LPCSTR, iModeNum: DWORD, lpDevMode: *mut DEVMODEA, dwFlags: DWORD,
- ) -> BOOL;
- pub fn EnumDisplaySettingsExW(
- lpszDeviceName: LPCWSTR, iModeNum: DWORD, lpDevMode: *mut DEVMODEW, dwFlags: DWORD,
- ) -> BOOL;
- pub fn EnumDisplaySettingsW(
- lpszDeviceName: LPCWSTR, iModeNum: DWORD, lpDevMode: *mut DEVMODEW,
- ) -> BOOL;
- pub fn EnumPropsA(hWnd: HWND, lpEnumFunc: PROPENUMPROCA) -> c_int;
- pub fn EnumPropsExA(hWnd: HWND, lpEnumFunc: PROPENUMPROCA, lParam: LPARAM) -> c_int;
- pub fn EnumPropsExW(hWnd: HWND, lpEnumFunc: PROPENUMPROCW, lParam: LPARAM) -> c_int;
- pub fn EnumPropsW(hWnd: HWND, lpEnumFunc: PROPENUMPROCW) -> c_int;
- pub fn EnumThreadWindows(dwThreadId: DWORD, lpfn: WNDENUMPROC, lParam: LPARAM) -> BOOL;
- pub fn EnumWindowStationsA(lpEnumFunc: WINSTAENUMPROCA, lParam: LPARAM) -> BOOL;
- pub fn EnumWindowStationsW(lpEnumFunc: WINSTAENUMPROCW, lParam: LPARAM) -> BOOL;
- pub fn EnumWindows(lpEnumFunc: WNDENUMPROC, lParam: LPARAM) -> BOOL;
- // pub fn EqualRect();
- // pub fn EvaluateProximityToPolygon();
- // pub fn EvaluateProximityToRect();
- pub fn ExcludeUpdateRgn(hDC: HDC, hWnd: HWND) -> c_int;
- pub fn ExitWindowsEx(uFlags: UINT, dwReason: DWORD) -> BOOL;
- pub fn FillRect(hDC: HDC, lprc: *const RECT, hbr: HBRUSH) -> c_int;
- pub fn FindWindowA (lpClassName: LPCSTR, lpWindowName: LPCSTR) -> HWND;
- pub fn FindWindowExA(
- hWndParent: HWND, hWndChildAfter: HWND, lpszClass: LPCSTR, lpszWindow: LPCSTR,
- ) -> HWND;
- pub fn FindWindowExW(
- hWndParent: HWND, hWndChildAfter: HWND, lpszClass: LPCWSTR, lpszWindow: LPCWSTR,
- ) -> HWND;
- pub fn FindWindowW(lpClassName: LPCWSTR, lpWindowName: LPCWSTR) -> HWND;
- pub fn FlashWindow(hwnd: HWND, bInvert: BOOL) -> BOOL;
- pub fn FlashWindowEx(pfwi: PFLASHWINFO) -> BOOL;
- pub fn FrameRect(hDC: HDC, lprc: *const RECT, hbr: HBRUSH) -> c_int;
- // pub fn FreeDDElParam();
- pub fn GetActiveWindow() -> HWND;
- // pub fn GetAltTabInfo();
- // pub fn GetAltTabInfoA();
- // pub fn GetAltTabInfoW();
- pub fn GetAncestor(hWnd: HWND, gaFlags: UINT) -> HWND;
- pub fn GetAsyncKeyState(vKey: c_int) -> SHORT;
- // pub fn GetAutoRotationState();
- // pub fn GetCIMSSM();
- pub fn GetCapture() -> HWND;
- pub fn GetCaretBlinkTime() -> UINT;
- pub fn GetCaretPos(lpPoint: LPPOINT) -> BOOL;
- // pub fn GetClassInfoA();
- // pub fn GetClassInfoExA();
- pub fn GetClassInfoExW(
- hinst: HINSTANCE, lpszClass: LPCWSTR, lpwcx: LPWNDCLASSEXW,
- ) -> BOOL;
- pub fn GetClassInfoW(
- hInstance: HINSTANCE, lpClassName: LPCWSTR, lpWndClass: LPWNDCLASSW,
- ) -> BOOL;
- pub fn GetClassLongA(hWnd: HWND, nIndex: c_int) -> DWORD;
- #[cfg(target_arch = "x86_64")]
- pub fn GetClassLongPtrA(hWnd: HWND, nIndex: c_int) -> ULONG_PTR;
- #[cfg(target_arch = "x86_64")]
- pub fn GetClassLongPtrW(hWnd: HWND, nIndex: c_int) -> ULONG_PTR;
- pub fn GetClassLongW(hWnd: HWND, nIndex: c_int) -> DWORD;
- pub fn GetClassNameA(hWnd: HWND, lpClassName: LPCSTR, nMaxCount: c_int) -> c_int;
- pub fn GetClassNameW(hWnd: HWND, lpClassName: LPCWSTR, nMaxCount: c_int) -> c_int;
- pub fn GetClassWord(hWnd: HWND, nIndex: c_int) -> WORD;
- pub fn GetClientRect(hWnd: HWND, lpRect: LPRECT) -> BOOL;
- pub fn GetClipCursor(lpRect: LPRECT) -> BOOL;
- pub fn GetClipboardData(uFormat: UINT) -> HANDLE;
- pub fn GetClipboardFormatNameA(
- format: UINT, lpszFormatName: LPSTR, cchMaxCount: c_int,
- ) -> c_int;
- pub fn GetClipboardFormatNameW(
- format: UINT, lpszFormatName: LPWSTR, cchMaxCount: c_int,
- ) -> c_int;
- pub fn GetClipboardOwner() -> HWND;
- pub fn GetClipboardSequenceNumber() -> DWORD;
- pub fn GetClipboardViewer() -> HWND;
- // pub fn GetComboBoxInfo();
- // pub fn GetCurrentInputMessageSource();
- pub fn GetCursor() -> HCURSOR;
- // pub fn GetCursorInfo();
- pub fn GetCursorPos(lpPoint: LPPOINT) -> BOOL;
- pub fn GetDC(hWnd: HWND) -> HDC;
- pub fn GetDCEx(hWnd: HWND, hrgnClip: HRGN, flags: DWORD) -> HDC;
- pub fn GetDesktopWindow() -> HWND;
- pub fn GetDialogBaseUnits() -> LONG;
- // pub fn GetDisplayAutoRotationPreferences();
- // pub fn GetDisplayConfigBufferSizes();
- pub fn GetDlgCtrlID(hwnd: HWND) -> c_int;
- pub fn GetDlgItem(hDlg: HWND, nIDDlgItem: c_int) -> HWND;
- pub fn GetDlgItemInt(
- hDlg: HWND, nIDDlgItem: c_int, lpTranslated: *mut BOOL, bSigned: BOOL,
- ) -> UINT;
- pub fn GetDlgItemTextA(
- hDlg: HWND, nIDDlgItem: c_int, lpString: LPSTR, nMaxCount: c_int,
- ) -> UINT;
- pub fn GetDlgItemTextW(
- hDlg: HWND, nIDDlgItem: c_int, lpString: LPWSTR, nMaxCount: c_int,
- ) -> UINT;
- pub fn GetDoubleClickTime() -> UINT;
- pub fn GetFocus() -> HWND;
- pub fn GetForegroundWindow() -> HWND;
- // pub fn GetGUIThreadInfo();
- // pub fn GetGestureConfig();
- // pub fn GetGestureExtraArgs();
- // pub fn GetGestureInfo();
- // pub fn GetGuiResources();
- pub fn GetIconInfo(hIcon: HICON, piconinfo: PICONINFO) -> BOOL;
- // pub fn GetIconInfoExA();
- // pub fn GetIconInfoExW();
- // pub fn GetInputDesktop();
- // pub fn GetInputLocaleInfo();
- // pub fn GetInputState();
- pub fn GetKBCodePage() -> UINT;
- pub fn GetKeyNameTextA(lparam: LONG, lpString: LPSTR, cchSize: c_int) -> c_int;
- pub fn GetKeyNameTextW(lParam: LONG, lpString: LPWSTR, cchSize: c_int) -> c_int;
- pub fn GetKeyState(nVirtKey: c_int) -> SHORT;
- pub fn GetKeyboardLayout(idThread: DWORD) -> HKL;
- pub fn GetKeyboardLayoutList(nBuff: c_int, lpList: *mut HKL) -> c_int;
- pub fn GetKeyboardLayoutNameA(pwszKLID: LPSTR) -> BOOL;
- pub fn GetKeyboardLayoutNameW(pwszKLID: LPWSTR) -> BOOL;
- pub fn GetKeyboardState(lpKeyState: PBYTE) -> BOOL;
- pub fn GetKeyboardType(nTypeFlag: c_int) -> c_int;
- pub fn GetLastActivePopup(hWnd: HWND) -> HWND;
- // pub fn GetLastInputInfo();
- // pub fn GetLayeredWindowAttributes();
- // pub fn GetListBoxInfo();
- pub fn GetMenu(hWnd: HWND) -> HMENU;
- // pub fn GetMenuBarInfo();
- // pub fn GetMenuCheckMarkDimensions();
- // pub fn GetMenuContextHelpId();
- // pub fn GetMenuDefaultItem();
- // pub fn GetMenuInfo();
- // pub fn GetMenuItemCount();
- // pub fn GetMenuItemID();
- // pub fn GetMenuItemInfoA();
- // pub fn GetMenuItemInfoW();
- // pub fn GetMenuItemRect();
- // pub fn GetMenuState();
- // pub fn GetMenuStringA();
- // pub fn GetMenuStringW();
- // pub fn GetMessageA();
- // pub fn GetMessageExtraInfo();
- // pub fn GetMessagePos();
- pub fn GetMessageTime() -> LONG;
- pub fn GetMessageW(lpMsg: LPMSG, hWnd: HWND, wMsgFilterMin: UINT, wMsgFilterMax: UINT) -> BOOL;
- pub fn GetMonitorInfoA(hMonitor: HMONITOR, lpmi: LPMONITORINFO) -> BOOL;
- pub fn GetMonitorInfoW(hMonitor: HMONITOR, lpmi: LPMONITORINFO) -> BOOL;
- // pub fn GetMouseMovePointsEx();
- pub fn GetNextDlgGroupItem(hDlg: HWND, hCtl: HWND, bPrevious: BOOL) -> HWND;
- pub fn GetNextDlgTabItem(hDlg: HWND, hCtl: HWND, bPrevious: BOOL) -> HWND;
- pub fn GetOpenClipboardWindow() -> HWND;
- pub fn GetParent(hWnd: HWND) -> HWND;
- pub fn GetPhysicalCursorPos(lpPoint: LPPOINT) -> BOOL;
- // pub fn GetPointerCursorId();
- // pub fn GetPointerDevice();
- // pub fn GetPointerDeviceCursors();
- // pub fn GetPointerDeviceProperties();
- // pub fn GetPointerDeviceRects();
- // pub fn GetPointerDevices();
- // pub fn GetPointerFrameInfo();
- // pub fn GetPointerFrameInfoHistory();
- // pub fn GetPointerFramePenInfo();
- // pub fn GetPointerFramePenInfoHistory();
- // pub fn GetPointerFrameTouchInfo();
- // pub fn GetPointerFrameTouchInfoHistory();
- // pub fn GetPointerInfo();
- // pub fn GetPointerInfoHistory();
- // pub fn GetPointerInputTransform();
- // pub fn GetPointerPenInfo();
- // pub fn GetPointerPenInfoHistory();
- // pub fn GetPointerTouchInfo();
- // pub fn GetPointerTouchInfoHistory();
- pub fn GetPointerType(pointerId: UINT32, pointerType: *mut POINTER_INPUT_TYPE) -> BOOL;
- // pub fn GetPriorityClipboardFormat();
- // pub fn GetProcessDefaultLayout();
- // pub fn GetProcessWindowStation();
- pub fn GetPropA(hwnd: HWND, lpString: LPCSTR) -> HANDLE;
- pub fn GetPropW(hwnd: HWND, lpString: LPCWSTR) -> HANDLE;
- pub fn GetQueueStatus(flags: UINT) -> DWORD;
- pub fn GetRawInputBuffer(pData: PRAWINPUT, pcbSize: PUINT, cbSizeHeader: UINT) -> UINT;
- pub fn GetRawInputData(
- hRawInput: HRAWINPUT, uiCommand: UINT, pData: LPVOID, pcbSize: PUINT, cbSizeHeader: UINT,
- ) -> UINT;
- pub fn GetRawInputDeviceInfoA(
- hDevice: HANDLE, uiCommand: UINT, pData: LPVOID, pcbSize: PUINT,
- ) -> UINT;
- pub fn GetRawInputDeviceInfoW(
- hDevice: HANDLE, uiCommand: UINT, pData: LPVOID, pcbSize: PUINT,
- ) -> UINT;
- pub fn GetRawInputDeviceList(
- pRawInputDeviceList: PRAWINPUTDEVICELIST, puiNumDevices: PUINT, cbSize: UINT,
- ) -> UINT;
- // pub fn GetRawPointerDeviceData();
- pub fn GetRegisteredRawInputDevices(
- pRawInputDevices: PRAWINPUTDEVICE, puiNumDevices: PUINT, cbSize: UINT,
- ) -> UINT;
- // pub fn GetScrollBarInfo();
- pub fn GetScrollInfo(hwnd: HWND, nBar: c_int, lpsi: *mut SCROLLINFO) -> BOOL;
- pub fn GetScrollPos(hWnd: HWND, nBar: c_int) -> c_int;
- pub fn GetScrollRange(hWnd: HWND, nBar: c_int, lpMinPos: LPINT, lpMaxPos: LPINT) -> BOOL;
- pub fn GetShellWindow() -> HWND;
- // pub fn GetSubMenu();
- pub fn GetSysColor(nIndex: c_int) -> DWORD;
- pub fn GetSysColorBrush(nIndex: c_int) -> HBRUSH;
- pub fn GetSystemMenu(hWnd: HWND, bRevert: BOOL) -> HMENU;
- pub fn GetSystemMetrics(nIndex: c_int) -> c_int;
- pub fn GetTabbedTextExtentA(hdc: HDC, lpString: LPCSTR, chCount: c_int, nTabPositions: c_int,
- lpnTabStopPositions: *const INT
- ) -> DWORD;
- pub fn GetTabbedTextExtentW(hdc: HDC, lpString: LPCWSTR, chCount: c_int, nTabPositions: c_int,
- lpnTabStopPositions: *const INT
- ) -> DWORD;
- pub fn GetThreadDesktop(dwThreadId: DWORD) -> HDESK;
- // pub fn GetTitleBarInfo();
- pub fn GetTopWindow(hWnd: HWND) -> HWND;
- pub fn GetTouchInputInfo(
- hTouchInput: HTOUCHINPUT, cInputs: c_uint, pInputs: PTOUCHINPUT, cbSize: c_int
- ) -> BOOL;
- // pub fn GetUnpredictedMessagePos();
- pub fn GetUpdateRect(hWnd: HWND, lpRect: LPRECT, bErase: BOOL) -> BOOL;
- pub fn GetUpdateRgn(hWnd: HWND, hRgn: HRGN, bErase: BOOL) -> c_int;
- pub fn GetUpdatedClipboardFormats(
- lpuiFormats: PUINT, cFormats: UINT, pcFormatsOUT: PUINT,
- ) -> BOOL;
- // pub fn GetUserObjectInformationA();
- // pub fn GetUserObjectInformationW();
- // pub fn GetUserObjectSecurity();
- pub fn GetWindow(hWnd: HWND, uCmd: UINT) -> HWND;
- pub fn GetWindowContextHelpId(h: HWND) -> DWORD;
- pub fn GetWindowDC(hWnd: HWND) -> HDC;
- // pub fn GetWindowDisplayAffinity();
- // pub fn GetWindowFeedbackSetting();
- // pub fn GetWindowInfo();
- pub fn GetWindowLongA(hWnd: HWND, nIndex: c_int) -> LONG;
- #[cfg(target_arch = "x86_64")]
- pub fn GetWindowLongPtrA(hWnd: HWND, nIndex: c_int) -> LONG_PTR;
- #[cfg(target_arch = "x86_64")]
- pub fn GetWindowLongPtrW(hWnd: HWND, nIndex: c_int) -> LONG_PTR;
- pub fn GetWindowLongW(hWnd: HWND, nIndex: c_int) -> LONG;
- // pub fn GetWindowModuleFileName();
- pub fn GetWindowModuleFileNameA(
- hWnd: HWND, lpszFileName: LPCSTR, cchFileNameMax: UINT,
- ) -> UINT;
- pub fn GetWindowModuleFileNameW(
- hWnd: HWND, lpszFileName: LPWSTR, cchFileNameMax: UINT,
- ) -> UINT;
- pub fn GetWindowPlacement(hWnd: HWND, lpwndpl: *mut WINDOWPLACEMENT) -> BOOL;
- pub fn GetWindowRect(hWnd: HWND, lpRect: LPRECT) -> BOOL;
- pub fn GetWindowRgn(hWnd: HWND, hRgn: HRGN) -> c_int;
- pub fn GetWindowRgnBox(hWnd: HWND, lprc: LPRECT) -> c_int;
- pub fn GetWindowTextA(hWnd: HWND, lpString: LPSTR, nMaxCount: c_int) -> c_int;
- pub fn GetWindowTextLengthA(hWnd: HWND) -> c_int;
- pub fn GetWindowTextLengthW(hWnd: HWND) -> c_int;
- pub fn GetWindowTextW(hWnd: HWND, lpString: LPWSTR, nMaxCount: c_int) -> c_int;
- pub fn GetWindowThreadProcessId(hWnd: HWND, lpdwProcessId: LPDWORD) -> DWORD;
- pub fn GetWindowWord(hWnd: HWND,nIndex: c_int) -> WORD;
- pub fn GrayStringA(
- hDC: HDC, hBrush: HBRUSH, lpOutputFunc: GRAYSTRINGPROC, lpData: LPARAM, nCount: c_int,
- X: c_int, Y: c_int, nWidth: c_int, nHeight: c_int,
- ) -> BOOL;
- pub fn GrayStringW(
- hDC: HDC, hBrush: HBRUSH, lpOutputFunc: GRAYSTRINGPROC, lpData: LPARAM, nCount: c_int,
- X: c_int, Y: c_int, nWidth: c_int, nHeight: c_int,
- ) -> BOOL;
- pub fn HideCaret(hWnd: HWND) -> BOOL;
- pub fn HiliteMenuItem(hWnd: HWND, hMenu: HMENU, uIDHiliteItem: UINT, uHilite: UINT) -> BOOL;
- // pub fn IMPGetIMEA();
- // pub fn IMPGetIMEW();
- // pub fn IMPQueryIMEA();
- // pub fn IMPQueryIMEW();
- // pub fn IMPSetIMEA();
- // pub fn IMPSetIMEW();
- // pub fn ImpersonateDdeClientWindow();
- // pub fn InSendMessage();
- // pub fn InSendMessageEx();
- pub fn InflateRect(lprc: LPRECT, dx: c_int, dy: c_int) -> BOOL;
- // pub fn InitializeTouchInjection();
- // pub fn InjectTouchInput();
- pub fn InsertMenuA(
- hMenu: HMENU, uPosition: UINT, uFlags: UINT, uIDNewItem: UINT_PTR, lpNewItem: LPCSTR,
- ) -> BOOL;
- pub fn InsertMenuItemA(
- hmenu: HMENU, item: UINT, fByPosition: BOOL, lpmi: LPCMENUITEMINFOA,
- ) -> BOOL;
- pub fn InsertMenuItemW(
- hmenu: HMENU, item: UINT, fByPosition: BOOL, lpmi: LPCMENUITEMINFOW,
- ) -> BOOL;
- pub fn InsertMenuW(
- hMenu: HMENU, uPosition: UINT, uFlags: UINT, uIDNewItem: UINT_PTR, lpNewItem: LPCWSTR,
- ) -> BOOL;
- pub fn InternalGetWindowText(hWnd: HWND, pString: LPWSTR, cchMaxCount: c_int) -> c_int;
- pub fn IntersectRect(
- lprcDst: LPRECT, lprcSrc1: *const RECT, lprcSrc2: *const RECT,
- ) -> BOOL;
- pub fn InvalidateRect(hWnd: HWND, lpRect: *const RECT, bErase: BOOL) -> BOOL;
- pub fn InvalidateRgn(hWnd: HWND, hRgn: HRGN, bErase: BOOL) -> BOOL;
- pub fn InvertRect(hDC: HDC, lprc: *const RECT) -> BOOL;
- pub fn IsCharAlphaA(ch: CHAR) -> BOOL;
- pub fn IsCharAlphaNumericA(ch: CHAR) -> BOOL;
- pub fn IsCharAlphaNumericW(ch: WCHAR) -> BOOL;
- pub fn IsCharAlphaW(ch: WCHAR) -> BOOL;
- pub fn IsCharLowerA(ch: CHAR) -> BOOL;
- pub fn IsCharLowerW(ch: WCHAR) -> BOOL;
- pub fn IsCharUpperA(ch: CHAR) -> BOOL;
- pub fn IsCharUpperW(ch: WCHAR) -> BOOL;
- pub fn IsChild(hWndParent: HWND, hWnd: HWND) -> BOOL;
- pub fn IsClipboardFormatAvailable(format: UINT) -> BOOL;
- pub fn IsDialogMessageA(hDlg: HWND, lpMsg: LPMSG) -> BOOL;
- pub fn IsDialogMessageW(hDlg: HWND, lpMsg: LPMSG) -> BOOL;
- pub fn IsDlgButtonChecked(hDlg: HWND, nIDButton: c_int) -> UINT;
- pub fn IsGUIThread(bConvert: BOOL) -> BOOL;
- pub fn IsHungAppWindow(hwnd: HWND) -> BOOL;
- pub fn IsIconic(hWnd: HWND) -> BOOL;
- pub fn IsImmersiveProcess(hProcess: HANDLE) -> BOOL;
- // pub fn IsInDesktopWindowBand();
- pub fn IsMenu(hMenu: HMENU) -> BOOL;
- pub fn IsMouseInPointerEnabled() -> BOOL;
- pub fn IsProcessDPIAware() -> BOOL;
- pub fn IsRectEmpty(lprc: *const RECT) -> BOOL;
- pub fn IsTouchWindow(hwnd: HWND, pulFlags: PULONG) -> BOOL;
- pub fn IsWinEventHookInstalled(event: DWORD) -> BOOL;
- pub fn IsWindow(hWnd: HWND) -> BOOL;
- pub fn IsWindowEnabled(hWnd: HWND) -> BOOL;
- pub fn IsWindowUnicode(hWnd: HWND) -> BOOL;
- pub fn IsWindowVisible(hWnd: HWND) -> BOOL;
- pub fn IsWow64Message() -> BOOL;
- pub fn IsZoomed(hwnd: HWND) -> BOOL;
- pub fn KillTimer(hwnd: HWND, uIDEvent: UINT_PTR) -> BOOL;
- pub fn LoadAcceleratorsA(hInstance: HINSTANCE, lpTableName: LPCSTR) -> HACCEL;
- pub fn LoadAcceleratorsW(hInstance: HINSTANCE, lpTableName: LPCWSTR) -> HACCEL;
- pub fn LoadBitmapA(hInstance: HINSTANCE, lpBitmapName: LPCSTR) -> HBITMAP;
- pub fn LoadBitmapW(hInstance: HINSTANCE, lpBitmapName: LPCWSTR) -> HBITMAP;
- pub fn LoadCursorA(hInstance: HINSTANCE, lpCursorName: LPCSTR) -> HCURSOR;
- pub fn LoadCursorFromFileA(lpFileName: LPCSTR) -> HCURSOR;
- pub fn LoadCursorFromFileW(lpFileName: LPCWSTR) -> HCURSOR;
- pub fn LoadCursorW(hInstance: HINSTANCE, lpCursorName: LPCWSTR) -> HCURSOR;
- pub fn LoadIconA(hInstance: HINSTANCE, lpIconName: LPCSTR) -> HICON;
- pub fn LoadIconW(hInstance: HINSTANCE, lpIconName: LPCWSTR) -> HICON;
- pub fn LoadImageA(
- hInst: HINSTANCE, name: LPCSTR, type_: UINT, cx: c_int, cy: c_int, fuLoad: UINT,
- ) -> HANDLE;
- pub fn LoadImageW(
- hInst: HINSTANCE, name: LPCWSTR, type_: UINT, cx: c_int, cy: c_int, fuLoad: UINT,
- ) -> HANDLE;
- pub fn LoadKeyboardLayoutA(pwszKLID: LPCSTR, Flags: DWORD) -> HKL;
- pub fn LoadKeyboardLayoutW(pwszKLID: LPCWSTR, Flags: DWORD) -> HKL;
- pub fn LoadMenuA(hInstance: HINSTANCE, lpMenuName: LPCSTR) -> HMENU;
- pub fn LoadMenuIndirectA(lpMenuTemplate: *const MENUTEMPLATEA) -> HMENU;
- pub fn LoadMenuIndirectW(lpMenuTemplate: *const MENUTEMPLATEW) -> HMENU;
- pub fn LoadMenuW(hInstance: HINSTANCE, lpMenuName: LPCWSTR) -> HMENU;
- pub fn LoadStringA(
- hInstance: HINSTANCE, uID: UINT, lpBuffer: LPSTR, cchBufferMax: c_int,
- ) -> c_int;
- pub fn LoadStringW(
- hInstance: HINSTANCE, uID: UINT, lpBuffer: LPWSTR, cchBufferMax: c_int,
- ) -> c_int;
- pub fn LockSetForegroundWindow(uLockCode: UINT) -> BOOL;
- pub fn LockWindowUpdate(hWndLock: HWND) -> BOOL;
- pub fn LockWorkStation() -> BOOL;
- // pub fn LogicalToPhysicalPoint();
- // pub fn LogicalToPhysicalPointForPerMonitorDPI();
- pub fn LookupIconIdFromDirectory(presbits: PBYTE, fIcon: BOOL) -> c_int;
- pub fn LookupIconIdFromDirectoryEx(
- presbits: PBYTE, fIcon: BOOL, cxDesired: c_int, cyDesired: c_int, Flags: UINT,
- ) -> c_int;
- pub fn MapDialogRect(hDlg: HWND, lpRect: LPRECT) -> BOOL;
- pub fn MapVirtualKeyA(nCode: UINT, uMapType: UINT) -> UINT;
- pub fn MapVirtualKeyExA(nCode: UINT, uMapType: UINT, dwhkl: HKL) -> UINT;
- pub fn MapVirtualKeyExW(nCode: UINT, uMapType: UINT, dwhkl: HKL) -> UINT;
- pub fn MapVirtualKeyW(nCode: UINT, uMapType: UINT) -> UINT;
- pub fn MapWindowPoints(hWndFrom: HWND, hWndTo: HWND, lpPoints: LPPOINT, cPoints: UINT) -> c_int;
- pub fn MenuItemFromPoint(hWnd: HWND, hMenu: HMENU, ptScreen: POINT) -> c_int;
- pub fn MessageBeep(uType: UINT) -> BOOL;
- pub fn MessageBoxA(hWnd: HWND, lpText: LPCSTR, lpCaption: LPCSTR, uType: UINT) -> c_int;
- pub fn MessageBoxExA(
- hWnd: HWND, lpText: LPCSTR, lpCaption: LPCSTR, uType: UINT, wLanguageId: WORD,
- ) -> c_int;
- pub fn MessageBoxExW(
- hWnd: HWND, lpText: LPCWSTR, lpCaption: LPCWSTR, uType: UINT, wLanguageId: WORD,
- ) -> c_int;
- pub fn MessageBoxIndirectA(lpmbp: *const MSGBOXPARAMSA) -> c_int;
- pub fn MessageBoxIndirectW(lpmbp: *const MSGBOXPARAMSW) -> c_int;
- // pub fn MessageBoxTimeoutA();
- // pub fn MessageBoxTimeoutW();
- pub fn MessageBoxW(hWnd: HWND, lpText: LPCWSTR, lpCaption: LPCWSTR, uType: UINT) -> c_int;
- pub fn ModifyMenuA(
- hMnu: HMENU, uPosition: UINT, uFlags: UINT, uIDNewItem: UINT_PTR, lpNewItem: LPCSTR,
- ) -> BOOL;
- pub fn ModifyMenuW(
- hMnu: HMENU, uPosition: UINT, uFlags: UINT, uIDNewItem: UINT_PTR, lpNewItem: LPCWSTR,
- ) -> BOOL;
- pub fn MonitorFromPoint(pt: POINT, dwFlags: DWORD) -> HMONITOR;
- pub fn MonitorFromRect(lprc: LPCRECT, dwFlags: DWORD) -> HMONITOR;
- pub fn MonitorFromWindow(hwnd: HWND, dwFlags: DWORD) -> HMONITOR;
- pub fn MoveWindow(
- hWnd: HWND, X: c_int, Y: c_int, nWidth: c_int, nHeight: c_int, bRepaint: BOOL,
- ) -> BOOL;
- // Use UINT instead of DWORD for dwWaitMask to be consistent with GetQueueStatus
- pub fn MsgWaitForMultipleObjects(
- nCount: DWORD, pHandles: *const HANDLE, fWaitAll: BOOL, dwMilliseconds: DWORD,
- dwWakeMask: UINT,
- ) -> DWORD;
- pub fn MsgWaitForMultipleObjectsEx(
- nCount: DWORD, pHandles: *const HANDLE, dwMilliseconds: DWORD, dwWakeMask: UINT,
- dwFlags: DWORD,
- ) -> DWORD;
- pub fn NotifyWinEvent(event: DWORD, hwnd: HWND, idObject: LONG, idChild: LONG);
- pub fn OemKeyScan(wOemChar: WORD) -> DWORD;
- pub fn OemToCharA(pSrc: LPCSTR, pDst: LPSTR) -> BOOL;
- pub fn OemToCharBuffA(lpszSrc: LPCSTR, lpszDst: LPSTR, cchDstLength: DWORD) -> BOOL;
- pub fn OemToCharBuffW(lpszSrc: LPCSTR, lpszDst: LPWSTR, cchDstLength: DWORD) -> BOOL;
- pub fn OemToCharW(pSrc: LPCSTR, pDst: LPWSTR) -> BOOL;
- pub fn OffsetRect(lprc: LPRECT, dx: c_int, dy: c_int) -> BOOL;
- pub fn OpenClipboard(hWnd: HWND) -> BOOL;
- pub fn OpenDesktopA(
- lpszDesktop: LPCSTR, dwFlags: DWORD, fInherit: BOOL, dwDesiredAccess: ACCESS_MASK,
- ) -> HDESK;
- pub fn OpenDesktopW(
- lpszDesktop: LPCWSTR, dwFlags: DWORD, fInherit: BOOL, dwDesiredAccess: ACCESS_MASK,
- ) -> HDESK;
- pub fn OpenIcon(hWnd: HWND) -> BOOL;
- pub fn OpenInputDesktop(dwFlags: DWORD, fInherit: BOOL, dwDesiredAccess: ACCESS_MASK) -> HDESK;
- pub fn OpenWindowStationA(
- lpszWinSta: LPCSTR, fInherit: BOOL, dwDesiredAccess: ACCESS_MASK,
- ) -> HWINSTA;
- pub fn OpenWindowStationW(
- lpszWinSta: LPCWSTR, fInherit: BOOL, dwDesiredAccess: ACCESS_MASK,
- ) -> HWINSTA;
- pub fn PackDDElParam(msg: UINT, uiLo: UINT_PTR, uiHi: UINT_PTR) -> LPARAM;
- // pub fn PackTouchHitTestingProximityEvaluation();
- pub fn PaintDesktop(hdc: HDC) -> BOOL;
- pub fn PeekMessageA(
- lpMsg: LPMSG, hWnd: HWND, wMsgFilterMin: UINT, wMsgFilterMax: UINT, wRemoveMsg: UINT,
- ) -> BOOL;
- pub fn PeekMessageW(
- lpMsg: LPMSG, hWnd: HWND, wMsgFilterMin: UINT, wMsgFilterMax: UINT, wRemoveMsg: UINT,
- ) -> BOOL;
- // pub fn PhysicalToLogicalPoint();
- // pub fn PhysicalToLogicalPointForPerMonitorDPI();
- pub fn PostMessageA(hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM) -> BOOL;
- pub fn PostMessageW(hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM) -> BOOL;
- pub fn PostQuitMessage(nExitCode: c_int);
- pub fn PostThreadMessageA(
- idThread: DWORD, msg: UINT, wParam: WPARAM, lParam: LPARAM,
- ) -> BOOL;
- pub fn PostThreadMessageW(
- idThread: DWORD, msg: UINT, wParam: WPARAM, lParam: LPARAM,
- ) -> BOOL;
- pub fn PrintWindow(hwnd: HWND, hdcBlt: HDC, nFlags: UINT) -> BOOL;
- // pub fn PrivateExtractIconsA();
- // pub fn PrivateExtractIconsW();
- pub fn PtInRect(lprc: *const RECT, pt: POINT) -> BOOL;
- // pub fn QueryDisplayConfig();
- pub fn RealChildWindowFromPoint(
- hwndParent: HWND, ptParentClientCoords: POINT,
- ) -> HWND;
- pub fn RealGetWindowClass(
- hwnd: HWND, ptszClassName: LPSTR, cchClassNameMax: UINT,
- ) -> UINT;
- pub fn RealGetWindowClassA(
- hwnd: HWND, ptszClassName: LPSTR, cchClassNameMax: UINT,
- ) -> UINT;
- pub fn RealGetWindowClassW(
- hwnd: HWND, ptszClassName: LPWSTR, cchClassNameMax: UINT,
- ) -> UINT;
- pub fn RedrawWindow(
- hwnd: HWND, lprcUpdate: *const RECT, hrgnUpdate: HRGN, flags: UINT,
- ) -> BOOL;
- // pub fn RegisterClassA();
- // pub fn RegisterClassExA();
- pub fn RegisterClassExW(lpWndClass: *const WNDCLASSEXW) -> ATOM;
- pub fn RegisterClassW(lpWndClass: *const WNDCLASSW) -> ATOM;
- pub fn RegisterClipboardFormatA(lpszFormat: LPCSTR) -> UINT;
- pub fn RegisterClipboardFormatW(lpszFormat: LPCWSTR) -> UINT;
- pub fn RegisterDeviceNotificationA(
- hRecipient: HANDLE, notificationFilter: LPVOID, flags: DWORD,
- ) -> HDEVNOTIFY;
- pub fn RegisterDeviceNotificationW(
- hRecipient: HANDLE, notificationFilter: LPVOID, flags: DWORD,
- ) -> HDEVNOTIFY;
- pub fn RegisterHotKey(hwnd: HWND, id: c_int, fsModifiers: UINT, vk: UINT) -> BOOL;
- // pub fn RegisterPointerDeviceNotifications();
- // pub fn RegisterPointerInputTarget();
- // pub fn RegisterPowerSettingNotification();
- pub fn RegisterRawInputDevices(
- pRawInputDevices: PCRAWINPUTDEVICE, uiNumDevices: UINT, cbSize: UINT,
- ) -> BOOL;
- // pub fn RegisterShellHookWindow();
- // pub fn RegisterSuspendResumeNotification();
- // pub fn RegisterTouchHitTestingWindow();
- pub fn RegisterTouchWindow(hWnd: HWND, flags: ULONG) -> BOOL;
- pub fn RegisterWindowMessageA(lpString: LPCSTR) -> UINT;
- pub fn RegisterWindowMessageW(lpString: LPCWSTR) -> UINT;
- pub fn ReleaseCapture() -> BOOL;
- pub fn ReleaseDC(hWnd: HWND, hDC: HDC) -> c_int;
- // pub fn RemoveClipboardFormatListener();
- // pub fn RemoveMenu();
- pub fn RemovePropA(hWnd: HWND, lpStr: LPCSTR) -> HANDLE;
- pub fn RemovePropW(hWnd: HWND, lpStr: LPCWSTR) -> HANDLE;
- // pub fn ReplyMessage();
- // pub fn ReuseDDElParam();
- pub fn ScreenToClient(hWnd: HWND, lpPoint: LPPOINT) -> BOOL;
- pub fn ScrollDC(
- hDC: HDC, dx: c_int, dy: c_int, lprcScroll: *const RECT, lprcClip: *const RECT,
- hrgnUpdate: HRGN, lprcUpdate: LPRECT,
- ) -> BOOL;
- pub fn ScrollWindow(
- hWnd: HWND, xAmount: c_int, yAmount: c_int, lpRect: *const RECT, lpClipRect: *const RECT,
- ) -> BOOL;
- pub fn ScrollWindowEx(
- hWnd: HWND, dx: c_int, dy: c_int, prcScroll: *const RECT, prcClip: *const RECT,
- hrgnUpdate: HRGN, prcUpdate: LPRECT, flags: UINT,
- ) -> c_int;
- pub fn SendDlgItemMessageA(
- hDlg: HWND, nIDDlgItem: c_int, Msg: UINT, wParam: WPARAM, lParam: LPARAM,
- ) -> LRESULT;
- pub fn SendDlgItemMessageW(
- hDlg: HWND, nIDDlgItem: c_int, Msg: UINT, wParam: WPARAM, lParam: LPARAM,
- ) -> LRESULT;
- // pub fn SendIMEMessageExA();
- // pub fn SendIMEMessageExW();
- pub fn SendInput(cInputs: UINT, pInputs: LPINPUT, cbSize: c_int) -> UINT;
- pub fn SendMessageA(hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM) -> LRESULT;
- // pub fn SendMessageCallbackA();
- // pub fn SendMessageCallbackW();
- pub fn SendMessageTimeoutA(
- hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM, fuFlags: UINT, uTimeout: UINT,
- lpdwResult: PDWORD_PTR,
- ) -> LRESULT;
- pub fn SendMessageTimeoutW(
- hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM, fuFlags: UINT, uTimeout: UINT,
- lpdwResult: PDWORD_PTR,
- ) -> LRESULT;
- pub fn SendMessageW(hWnd: HWND, Msg: UINT, wParam: WPARAM, lParam: LPARAM) -> LRESULT;
- pub fn SendNotifyMessageA(hWnd: HWND, msg: UINT, wParam: WPARAM, lParam: LPARAM) -> BOOL;
- pub fn SendNotifyMessageW(hWnd: HWND, msg: UINT, wParam: WPARAM, lParam: LPARAM) -> BOOL;
- pub fn SetActiveWindow(hWnd: HWND) -> HWND;
- pub fn SetCapture(hWnd: HWND) -> HWND;
- pub fn SetCaretBlinkTime(uMSeconds: UINT) -> BOOL;
- pub fn SetCaretPos(x: c_int, y: c_int) -> BOOL;
- pub fn SetClassLongA(hWnd: HWND, nIndex: c_int, dwNewLong: LONG) -> DWORD;
- #[cfg(target_arch = "x86_64")]
- pub fn SetClassLongPtrA(hWnd: HWND, nIndex: c_int, dwNewLong: LONG_PTR) -> ULONG_PTR;
- #[cfg(target_arch = "x86_64")]
- pub fn SetClassLongPtrW(hWnd: HWND, nIndex: c_int, dwNewLong: LONG_PTR) -> ULONG_PTR;
- pub fn SetClassLongW(hWnd: HWND, nIndex: c_int, dwNewLong: LONG) -> DWORD;
- pub fn SetClassWord(hWnd: HWND, nIndex: c_int, wNewWord: WORD) -> WORD;
- pub fn SetClipboardData(uFormat: UINT, hMem: HANDLE) -> HANDLE;
- pub fn SetClipboardViewer(hWndNewViewer: HWND) -> HWND;
- // pub fn SetCoalescableTimer();
- pub fn SetCursor(hCursor: HCURSOR) -> HCURSOR;
- pub fn SetCursorPos(x: c_int, y: c_int) -> BOOL;
- // pub fn SetDebugErrorLevel();
- // pub fn SetDeskWallpaper();
- // pub fn SetDisplayAutoRotationPreferences();
- // pub fn SetDisplayConfig();
- pub fn SetDlgItemInt(hDlg: HWND, nIDDlgItem: c_int, uValue: UINT, bSigned: BOOL) -> BOOL;
- pub fn SetDlgItemTextA(hDlg: HWND, nIDDlgItem: c_int, lpString: LPCSTR) -> BOOL;
- pub fn SetDlgItemTextW(hDlg: HWND, nIDDlgItem: c_int, lpString: LPCWSTR) -> BOOL;
- pub fn SetDoubleClickTime(uInterval: UINT) -> BOOL;
- pub fn SetFocus(hWnd: HWND) -> HWND;
- pub fn SetForegroundWindow(hWnd: HWND) -> BOOL;
- // pub fn SetGestureConfig();
- pub fn SetKeyboardState(lpKeyState: LPBYTE) -> BOOL;
- pub fn SetLastErrorEx(dwErrCode: DWORD, dwType: DWORD);
- pub fn SetLayeredWindowAttributes(
- hwnd: HWND, crKey: COLORREF, bAlpha: BYTE, dwFlags: DWORD
- ) -> BOOL;
- pub fn SetMenu(hWnd: HWND, hMenu: HMENU) -> BOOL;
- // pub fn SetMenuContextHelpId();
- // pub fn SetMenuDefaultItem();
- // pub fn SetMenuInfo();
- // pub fn SetMenuItemBitmaps();
- // pub fn SetMenuItemInfoA();
- // pub fn SetMenuItemInfoW();
- // pub fn SetMessageExtraInfo();
- // pub fn SetMessageQueue();
- pub fn SetParent(hWndChild: HWND, hWndNewParent: HWND) -> HWND;
- pub fn SetPhysicalCursorPos(x: c_int, y: c_int) -> BOOL;
- // pub fn SetProcessDPIAware();
- // pub fn SetProcessDefaultLayout();
- // pub fn SetProcessRestrictionExemption();
- // pub fn SetProcessWindowStation();
- pub fn SetPropA(hWnd: HWND, lpString: LPCSTR, hData: HANDLE) -> BOOL;
- pub fn SetPropW(hWnd: HWND, lpString: LPCWSTR, hData: HANDLE) -> BOOL;
- pub fn SetRect(lprc: LPRECT, xLeft: c_int, yTop: c_int, xRight: c_int, yBottom: c_int) -> BOOL;
- pub fn SetRectEmpty(lprc: LPRECT) -> BOOL;
- pub fn SetScrollInfo(hwnd: HWND, nBar: c_int, lpsi: *const SCROLLINFO, redraw: BOOL) -> c_int;
- pub fn SetScrollPos(hWnd: HWND, nBar: c_int, nPos: c_int, bRedraw: BOOL) -> c_int;
- pub fn SetScrollRange(
- hWnd: HWND, nBar: c_int, nMinPos: c_int, nMaxPos: c_int, bRedraw: BOOL,
- ) -> BOOL;
- // pub fn SetShellWindow();
- pub fn SetSysColors(
- cElements: c_int, lpaElements: *const INT, lpaRgbValues: *const COLORREF,
- ) -> BOOL;
- pub fn SetSystemCursor(hcur: HCURSOR, id: DWORD) -> BOOL;
- pub fn SetThreadDesktop(hDesktop: HDESK) -> BOOL;
- pub fn SetTimer(
- hWnd: HWND, nIDEvent: UINT_PTR, uElapse: UINT, lpTimerFunc: TimerProc,
- ) -> UINT_PTR;
- // pub fn SetUserObjectInformationA();
- // pub fn SetUserObjectInformationW();
- // pub fn SetUserObjectSecurity();
- pub fn SetWinEventHook(
- eventMin: DWORD, eventMax: DWORD, hmodWinEventProc: HMODULE, pfnWinEventProc: WINEVENTPROC,
- idProcess: DWORD, idThread: DWORD, dwFlags: DWORD,
- ) -> HWINEVENTHOOK;
- pub fn SetWindowContextHelpId(h: HWND, d: DWORD) -> BOOL;
- // pub fn SetWindowDisplayAffinity();
- // pub fn SetWindowFeedbackSetting();
- pub fn SetWindowLongA(hWnd: HWND, nIndex: c_int, dwNewLong: LONG) -> LONG;
- #[cfg(target_arch = "x86_64")]
- pub fn SetWindowLongPtrA(hWnd: HWND, nIndex: c_int, dwNewLong: LONG_PTR) -> LONG_PTR;
- #[cfg(target_arch = "x86_64")]
- pub fn SetWindowLongPtrW(hWnd: HWND, nIndex: c_int, dwNewLong: LONG_PTR) -> LONG_PTR;
- pub fn SetWindowLongW(hWnd: HWND, nIndex: c_int, dwNewLong: LONG) -> LONG;
- pub fn SetWindowPlacement(hWnd: HWND, lpwndpl: *const WINDOWPLACEMENT) -> BOOL;
- pub fn SetWindowPos(
- hWnd: HWND, hWndInsertAfter: HWND, X: c_int, Y: c_int, cx: c_int, cy: c_int, uFlags: UINT,
- ) -> BOOL;
- pub fn SetWindowRgn(hWnd: HWND, hRgn: HRGN, bRedraw: BOOL) -> c_int;
- pub fn SetWindowTextA(hWnd: HWND, lpString: LPCSTR) -> BOOL;
- pub fn SetWindowTextW(hWnd: HWND, lpString: LPCWSTR) -> BOOL;
- pub fn SetWindowWord(hwnd: HWND, nIndex: c_int, wNewWord: WORD) -> WORD;
- // pub fn SetWindowsHookA();
- pub fn SetWindowsHookExA(
- idHook: c_int, lpfn: HOOKPROC, hmod: HINSTANCE, dwThreadId: DWORD,
- ) -> HHOOK;
- pub fn SetWindowsHookExW(
- idHook: c_int, lpfn: HOOKPROC, hmod: HINSTANCE, dwThreadId: DWORD,
- ) -> HHOOK;
- // pub fn SetWindowsHookW();
- pub fn ShowCaret(hWnd: HWND) -> BOOL;
- pub fn ShowCursor(bShow: BOOL) -> c_int;
- pub fn ShowOwnedPopups(hWnd: HWND, fShow: BOOL) -> BOOL;
- pub fn ShowScrollBar(hWnd: HWND, wBar: c_int, bShow: BOOL) -> BOOL;
- // pub fn ShowSystemCursor();
- pub fn ShowWindow(hWnd: HWND, nCmdShow: c_int) -> BOOL;
- pub fn ShowWindowAsync(hWnd: HWND, nCmdShow: c_int) -> BOOL;
- // pub fn ShutdownBlockReasonCreate();
- // pub fn ShutdownBlockReasonDestroy();
- // pub fn ShutdownBlockReasonQuery();
- // pub fn SkipPointerFrameMessages();
- // pub fn SoundSentry();
- // pub fn SubtractRect();
- pub fn SwapMouseButton(fSwap: BOOL) -> BOOL;
- pub fn SwitchDesktop(hDesktop: HDESK) -> BOOL;
- // pub fn SwitchToThisWindow();
- pub fn SystemParametersInfoA(
- uiAction: UINT, uiParam: UINT, pvParam: PVOID, fWinIni: UINT
- ) -> BOOL;
- pub fn SystemParametersInfoW(
- uiAction: UINT, uiParam: UINT, pvParam: PVOID, fWinIni: UINT
- ) -> BOOL;
- pub fn TabbedTextOutA(
- hdc: HDC, x: c_int, y: c_int, lpString: LPCSTR, chCount: c_int, nTabPositions: c_int,
- lpnTabStopPositions: *const INT, nTabOrigin: c_int,
- ) -> LONG;
- pub fn TabbedTextOutW(
- hdc: HDC, x: c_int, y: c_int, lpString: LPCWSTR, chCount: c_int, nTabPositions: c_int,
- lpnTabStopPositions: *const INT, nTabOrigin: c_int,
- ) -> LONG;
- // pub fn TileChildWindows();
- // pub fn TileWindows();
- // pub fn ToAscii();
- // pub fn ToAsciiEx();
- pub fn ToUnicode(
- wVirtKey: UINT, wScanCode: UINT, lpKeyState: *const BYTE, lwszBuff: LPWSTR, cchBuff: c_int,
- wFlags: UINT
- ) -> c_int;
- // pub fn ToUnicodeEx();
- pub fn TrackMouseEvent(lpEventTrack: LPTRACKMOUSEEVENT) -> BOOL;
- // pub fn TrackPopupMenu();
- // pub fn TrackPopupMenuEx();
- // pub fn TranslateAccelerator();
- // pub fn TranslateAcceleratorA();
- // pub fn TranslateAcceleratorW();
- // pub fn TranslateMDISysAccel();
- pub fn TranslateMessage(lpmsg: *const MSG) -> BOOL;
- pub fn UnhookWinEvent(hWinEventHook: HWINEVENTHOOK) -> BOOL;
- // pub fn UnhookWindowsHook();
- pub fn UnhookWindowsHookEx(hhk: HHOOK) -> BOOL;
- pub fn UnionRect(lprcDst: LPRECT, lprcSrc1: *const RECT, lprcSrc2: *const RECT) -> BOOL;
- pub fn UnloadKeyboardLayout(hkl: HKL) -> BOOL;
- pub fn UnpackDDElParam(msg: UINT, lParam: LPARAM, puiLo: PUINT_PTR, puiHi: PUINT_PTR) -> BOOL;
- pub fn UnregisterClassA(lpClassName: LPCSTR, hInstance: HINSTANCE) -> BOOL;
- pub fn UnregisterClassW(lpClassName: LPCWSTR, hInstance: HINSTANCE) -> BOOL;
- pub fn UnregisterDeviceNotification(Handle: HDEVNOTIFY) -> BOOL;
- pub fn UnregisterHotKey(hWnd: HWND, id: c_int) -> BOOL;
- // pub fn UnregisterPointerInputTarget();
- // pub fn UnregisterPowerSettingNotification();
- // pub fn UnregisterSuspendResumeNotification();
- // pub fn UnregisterTouchWindow();
- pub fn UpdateLayeredWindow(
- hWnd: HWND, hdcDst: HDC, pptDst: *mut POINT, psize: *mut SIZE, hdcSrc: HDC,
- pptSrc: *mut POINT, crKey: COLORREF, pblend: *mut BLENDFUNCTION, dwFlags: DWORD,
- ) -> BOOL;
- // pub fn UpdateLayeredWindowIndirect();
- pub fn UpdateWindow(hWnd: HWND) -> BOOL;
- pub fn UserHandleGrantAccess(hUserHandle: HANDLE, hJob: HANDLE, bGrant: BOOL) -> BOOL;
- pub fn ValidateRect(hWnd: HWND, lpRect: *const RECT) -> BOOL;
- pub fn ValidateRgn(hWnd: HWND, hRgn: HRGN) -> BOOL;
- pub fn VkKeyScanA(ch: CHAR) -> SHORT;
- pub fn VkKeyScanExA(ch: CHAR, dwhkl: HKL) -> SHORT;
- pub fn VkKeyScanExW(ch: WCHAR, dwhkl: HKL) -> SHORT;
- pub fn VkKeyScanW(ch: WCHAR) -> SHORT;
- // pub fn WINNLSEnableIME();
- // pub fn WINNLSGetEnableStatus();
- // pub fn WINNLSGetIMEHotkey();
- pub fn WaitForInputIdle(hProcess: HANDLE, dwMilliseconds: DWORD) -> DWORD;
- pub fn WaitMessage() -> BOOL;
- pub fn WinHelpA(hWndMain: HWND, lpszHelp: LPCSTR, uCommand: UINT, dwData: ULONG_PTR) -> BOOL;
- pub fn WinHelpW(hWndMain: HWND, lpszHelp: LPCWSTR, uCommand: UINT, dwData: ULONG_PTR) -> BOOL;
- pub fn WindowFromDC(hDC: HDC) -> HWND;
- // pub fn WindowFromPhysicalPoint();
- pub fn WindowFromPoint(Point: POINT) -> HWND;
- pub fn keybd_event(bVk: BYTE, bScan: BYTE, dwFlags: DWORD, dwExtraInfo: ULONG_PTR);
- pub fn mouse_event(dwFlags: DWORD, dx: DWORD, dy: DWORD, dwData: DWORD, dwExtraInfo: ULONG_PTR);
- // pub fn wsprintfA();
- // pub fn wsprintfW();
- // pub fn wvsprintfA();
- // pub fn wvsprintfW();
-}
deleted file mode 100644
--- a/third_party/rust/x11/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","Cargo.toml":"51a03803afe9ea2446fcd62bbf9ba678628b1dfdf1a56464dfd2ed8a8d017327","build.rs":"c4ec61284fcbf2d836d9b42e86b013baf168c14058632b7c3d676139157e484b","examples/hello-world.rs":"0fc60afb6ba41930e0e74fc31b835faa771b06eb70314cdd9a07e05204b1b389","examples/input.rs":"18a254cbd92871c1c27edf420ff29eb02e0dd6eb744ecbb8dbebcd590780b96a","examples/xrecord.rs":"d2458011f4ee170db613d5effa483f51ac56bceab7f25c44eee4cb22c1863207","src/dpms.rs":"77cb9237a0262350bf6553e40d6cc9e97a599bca089a457ef87c57c9b9cf6194","src/glx.rs":"f41af4853dadc3fbf5154c8a8108505123118ddd8e8d9c6122ed1cd2ffda4262","src/internal.rs":"9e1f269e36e6a92325be4f5e67185d60c12e4a74b98c454759c0161325d0d1e4","src/keysym.rs":"4d65901072224729fe18fb5c815242e51e75a34c1dfc88e5ac1cea19e8a423a8","src/lib.rs":"49ad75828478d09a2f0aceb7effe61fecea9785285cd17d8622b924e88740c5a","src/link.rs":"5a6f63372091daf218d27d55e8ab5775ccf591e50c532c4c442acdf2b64136a9","src/xcursor.rs":"3dafa1d232321eb35e1c1a3e5cf0677ab9fd273a2b97799a4a6fc20dc546522e","src/xf86vmode.rs":"98f074fade0d0c6e063644f6a9f8720c12f9533c01722ff83ca77ed11b61b9ce","src/xfixes.rs":"cc2a1681415c3d2d32331dd610567376b6eaa5f42d58b8940a1ff1d765d9cc85","src/xft.rs":"1d5ff70c95b3c5d339903ea347e4436e226bfd2c2990fd5b476472c1a6aedba0","src/xinerama.rs":"13f9007d027e081169a22a3ad3fd9fd2a78bdcd831489a654e22e7a6a7e4bde5","src/xinput.rs":"84f79c8eb57a8feff5897d282479d4535e3ea17876871caee93879818157d674","src/xinput2.rs":"413ee38d11c340ab9dd12a9cb95f6746df8bb158f1201cb7e9b9ec6f0aeabd42","src/xlib.rs":"d332108571a727027205a0e300a9d87543c95be8e1ce1c6cb21b81f70a67bab6","src/xlib_xcb.rs":"71ee6274e261bb8f0b82ea260afffa9273531f0f87df9541152412b88aff468f","src/xmd.rs":"149c818c19e90a14c8f60016cd18a04d0de4fd702fc5df89e5283f6ee1ce4852","src/xmu.rs":"262df634c584dac47d0d898dd75b6b2de7c4256b9b494cf89123d8279dad3020","src/xrandr.rs":"78315519ceb035358f0f331770371528b540016f49a26c41ae22fb3c05a52e89","src/xrecord.rs":"8339eea0b42c2206444d98ac35e2ca9df82fb666dca9e942970155e324213e93","src/xrender.rs":"7883ea45cf2bde0f8dc7593b1011737f2b8ecb0745e1364c72adf7462751dabe","src/xss.rs":"313df0898df612afc8bdf7a5c475679a5dfa011a377b48f1bf7a5572dc414bc5","src/xt.rs":"fa2324391a91387f44eeee6742c50676329f08d941d002ff70d4eb99f36af7bc","src/xtest.rs":"dcd0eb130ffb3cf96165d1699d6b625649c28ed819036a85b5f175c2a3479918"},"package":"124eb405bf0262a54e1a982d4ffe4cd1c24261bdb306e49996e2ce7d492284a8"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/x11/Cargo.toml
+++ /dev/null
@@ -1,52 +0,0 @@
-[package]
-name = "x11"
-version = "2.12.1"
-authors = ["Daggerbot <daggerbot@gmail.com>"]
-description = "X11 library bindings for Rust"
-license = "CC0-1.0"
-repository = "https://github.com/Daggerbot/x11-rs.git"
-build = "build.rs"
-documentation = "https://docs.rs/x11"
-workspace = ".."
-
-[features]
-dpms = []
-glx = []
-xcursor = []
-xf86vmode = []
-xft = []
-xinerama = []
-xinput = []
-xlib = []
-xlib_xcb = []
-xmu = []
-xrandr = []
-xrecord = ["xtst"]
-xrender = []
-xss = []
-xt = []
-xtest = ["xtst"]
-xtst = []
-
-[dependencies]
-libc = "0.2"
-
-[build-dependencies]
-metadeps = "1.1"
-
-[package.metadata.pkg-config]
-gl = { version = "1", feature = "glx" }
-x11 = { version = "1.4.99.1", feature = "xlib" }
-x11-xcb = { version = "1.6", feature = "xlib_xcb" }
-xcursor = { version = "1.1", feature = "xcursor" }
-xext = { version = "1.3", feature = "dpms" }
-xft = { version = "2.1", feature = "xft" }
-xi = { version = "1.7", feature = "xinput" }
-xinerama = { version = "1.1", feature = "xinerama" }
-xmu = { version = "1.1", feature = "xmu" }
-xrandr = { version = "1.5", feature = "xrandr" }
-xrender = { version = "0.9.6", feature = "xrender" }
-xscrnsaver = { version = "1.2", feature = "xss" }
-xt = { version = "1.1", feature = "xt" }
-xtst = { version = "1.2", feature = "xtst" }
-xxf86vm = { version = "1.1", feature = "xf86vmode" }
deleted file mode 100644
--- a/third_party/rust/x11/build.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-extern crate metadeps;
-
-fn main () {
- metadeps::probe().unwrap();
-}
deleted file mode 100644
--- a/third_party/rust/x11/examples/hello-world.rs
+++ /dev/null
@@ -1,89 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-#![cfg_attr(not(feature = "xlib"), allow(dead_code))]
-#![cfg_attr(not(feature = "xlib"), allow(unused_imports))]
-
-extern crate x11;
-
-use std::ffi::CString;
-use std::mem;
-use std::os::raw::*;
-use std::ptr;
-
-use x11::xlib;
-
-#[cfg(not(feature = "xlib"))]
-fn main () {
- panic!("this example requires `--features xlib`");
-}
-
-#[cfg(feature = "xlib")]
-fn main () {
- unsafe {
- // Open display connection.
- let display = xlib::XOpenDisplay(ptr::null());
-
- if display.is_null() {
- panic!("XOpenDisplay failed");
- }
-
- // Create window.
- let screen = xlib::XDefaultScreen(display);
- let root = xlib::XRootWindow(display, screen);
-
- let mut attributes: xlib::XSetWindowAttributes = mem::uninitialized();
- attributes.background_pixel = xlib::XWhitePixel(display, screen);
-
- let window = xlib::XCreateWindow(display, root,
- 0, 0, 400, 300,
- 0, 0,
- xlib::InputOutput as c_uint, ptr::null_mut(),
- xlib::CWBackPixel, &mut attributes);
-
- // Set window title.
- let title_str = CString::new("hello-world").unwrap();
- xlib::XStoreName(display, window, title_str.as_ptr() as *mut c_char);
-
- // Hook close requests.
- let wm_protocols_str = CString::new("WM_PROTOCOLS").unwrap();
- let wm_delete_window_str = CString::new("WM_DELETE_WINDOW").unwrap();
-
- let wm_protocols = xlib::XInternAtom(display, wm_protocols_str.as_ptr(), xlib::False);
- let wm_delete_window = xlib::XInternAtom(display, wm_delete_window_str.as_ptr(), xlib::False);
-
- let mut protocols = [wm_delete_window];
-
- xlib::XSetWMProtocols(display, window, protocols.as_mut_ptr(), protocols.len() as c_int);
-
- // Show window.
- xlib::XMapWindow(display, window);
-
- // Main loop.
- let mut event: xlib::XEvent = mem::uninitialized();
-
- loop {
- xlib::XNextEvent(display, &mut event);
-
- match event.get_type() {
- xlib::ClientMessage => {
- let xclient = xlib::XClientMessageEvent::from(event);
-
- if xclient.message_type == wm_protocols && xclient.format == 32 {
- let protocol = xclient.data.get_long(0) as xlib::Atom;
-
- if protocol == wm_delete_window {
- break;
- }
- }
- },
-
- _ => ()
- }
- }
-
- // Shut down.
- xlib::XCloseDisplay(display);
- }
-}
deleted file mode 100644
--- a/third_party/rust/x11/examples/input.rs
+++ /dev/null
@@ -1,384 +0,0 @@
-// XInput2 example for x11-rs
-//
-// This is a basic example showing how to use XInput2 to read
-// keyboard, mouse and other input events in X11.
-//
-// See Pete Hutterer's "XI2 Recipes" blog series,
-// starting at http://who-t.blogspot.co.uk/2009/05/xi2-recipes-part-1.html
-// for a guide.
-
-#![cfg_attr(not(feature = "xlib"), allow(dead_code))]
-#![cfg_attr(not(feature = "xlib"), allow(unused_imports))]
-
-extern crate x11;
-extern crate libc;
-
-use std::ffi::CString;
-use std::ptr::{
- null,
- null_mut,
-};
-use std::mem::{transmute, zeroed};
-use std::os::raw::*;
-use std::slice::{from_raw_parts};
-use x11::{xlib, xinput2};
-
-/// Provides a basic framework for connecting to an X Display,
-/// creating a window, displaying it and running the event loop
-pub struct DemoWindow {
- pub display: *mut xlib::Display,
- pub window: xlib::Window,
-
- wm_protocols: xlib::Atom,
- wm_delete_window: xlib::Atom
-}
-
-impl DemoWindow {
- /// Create a new window with a given title and size
- pub fn new(title: &str, width: u32, height: u32) -> DemoWindow {
- unsafe {
- // Open display
- let display = xlib::XOpenDisplay(null());
- if display == null_mut() {
- panic!("can't open display");
- }
-
- // Load atoms
- let wm_delete_window_str = CString::new("WM_DELETE_WINDOW").unwrap();
- let wm_protocols_str = CString::new("WM_PROTOCOLS").unwrap();
-
- let wm_delete_window = xlib::XInternAtom(display, wm_delete_window_str.as_ptr(), xlib::False);
- let wm_protocols = xlib::XInternAtom(display, wm_protocols_str.as_ptr(), xlib::False);
-
- if wm_delete_window == 0 || wm_protocols == 0 {
- panic!("can't load atoms");
- }
-
- // Create window
- let screen_num = xlib::XDefaultScreen(display);
- let root = xlib::XRootWindow(display, screen_num);
- let white_pixel = xlib::XWhitePixel(display, screen_num);
-
- let mut attributes: xlib::XSetWindowAttributes = zeroed();
- attributes.background_pixel = white_pixel;
-
- let window = xlib::XCreateWindow(display, root, 0, 0, width as c_uint, height as c_uint, 0, 0,
- xlib::InputOutput as c_uint, null_mut(),
- xlib::CWBackPixel, &mut attributes);
- // Set window title
- let title_str = CString::new(title).unwrap();
- xlib::XStoreName(display, window, title_str.as_ptr() as *mut _);
-
- // Subscribe to delete (close) events
- let mut protocols = [wm_delete_window];
-
- if xlib::XSetWMProtocols(display, window, &mut protocols[0] as *mut xlib::Atom, 1) == xlib::False {
- panic!("can't set WM protocols");
- }
-
- DemoWindow{
- display: display,
- window: window,
- wm_protocols: wm_protocols,
- wm_delete_window: wm_delete_window
- }
- }
- }
-
- /// Display the window
- pub fn show(&mut self) {
- unsafe {
- xlib::XMapWindow(self.display, self.window);
- }
- }
-
- /// Process events for the window. Window close events are handled automatically,
- /// other events are passed on to |event_handler|
- pub fn run_event_loop<EventHandler>(&mut self, mut event_handler: EventHandler)
- where EventHandler: FnMut(&xlib::XEvent) {
- let mut event: xlib::XEvent = unsafe{zeroed()};
- loop {
- unsafe{xlib::XNextEvent(self.display, &mut event)};
- match event.get_type() {
- xlib::ClientMessage => {
- let xclient: xlib::XClientMessageEvent = From::from(event);
-
- // WM_PROTOCOLS client message
- if xclient.message_type == self.wm_protocols && xclient.format == 32 {
- let protocol = xclient.data.get_long(0) as xlib::Atom;
-
- // WM_DELETE_WINDOW (close event)
- if protocol == self.wm_delete_window {
- break;
- }
- }
- },
- _ => event_handler(&event)
- }
- }
- }
-}
-
-impl Drop for DemoWindow {
- /// Destroys the window and disconnects from the display
- fn drop(&mut self) {
- unsafe {
- xlib::XDestroyWindow(self.display, self.window);
- xlib::XCloseDisplay(self.display);
- }
- }
-}
-
-const TITLE: &'static str = "XInput Demo";
-const DEFAULT_WIDTH: c_uint = 640;
-const DEFAULT_HEIGHT: c_uint = 480;
-
-#[derive(Debug)]
-enum AxisType {
- HorizontalScroll,
- VerticalScroll,
- Other
-}
-
-#[derive(Debug)]
-struct Axis {
- id: i32,
- device_id: i32,
- axis_number: i32,
- axis_type: AxisType
-}
-
-#[derive(Debug)]
-struct AxisValue {
- device_id: i32,
- axis_number: i32,
- value: f64
-}
-
-struct InputState {
- cursor_pos: (f64, f64),
- axis_values: Vec<AxisValue>
-}
-
-fn read_input_axis_info(display: *mut xlib::Display) -> Vec<Axis> {
- let mut axis_list = Vec::new();
- let mut device_count = 0;
-
- // only get events from the master devices which are 'attached'
- // to the keyboard or cursor
- let devices = unsafe{xinput2::XIQueryDevice(display, xinput2::XIAllMasterDevices, &mut device_count)};
- for i in 0..device_count {
- let device = unsafe { *(devices.offset(i as isize)) };
- for k in 0..device.num_classes {
- let class = unsafe { *(device.classes.offset(k as isize)) };
- match unsafe { (*class)._type } {
- xinput2::XIScrollClass => {
- let scroll_class: &xinput2::XIScrollClassInfo = unsafe{transmute(class)};
- axis_list.push(Axis{
- id: scroll_class.sourceid,
- device_id: device.deviceid,
- axis_number: scroll_class.number,
- axis_type: match scroll_class.scroll_type {
- xinput2::XIScrollTypeHorizontal => AxisType::HorizontalScroll,
- xinput2::XIScrollTypeVertical => AxisType::VerticalScroll,
- _ => { unreachable!() }
- }
- })
- },
- xinput2::XIValuatorClass => {
- let valuator_class: &xinput2::XIValuatorClassInfo = unsafe{transmute(class)};
- axis_list.push(Axis{
- id: valuator_class.sourceid,
- device_id: device.deviceid,
- axis_number: valuator_class.number,
- axis_type: AxisType::Other
- })
- },
- _ => { /* TODO */ }
- }
- }
- }
-
- axis_list.sort_by(|a, b| {
- if a.device_id != b.device_id {
- a.device_id.cmp(&b.device_id)
- } else if a.id != b.id {
- a.id.cmp(&b.id)
- } else {
- a.axis_number.cmp(&b.axis_number)
- }
- });
- axis_list
-}
-
-/// Given an input motion event for an axis and the previous
-/// state of the axises, return the horizontal/vertical
-/// scroll deltas
-fn calc_scroll_deltas(event: &xinput2::XIDeviceEvent,
- axis_id: i32,
- axis_value: f64,
- axis_list: &[Axis],
- prev_axis_values: &mut Vec<AxisValue>) -> (f64, f64) {
- let prev_value_pos = prev_axis_values.iter().position(|prev_axis| {
- prev_axis.device_id == event.sourceid &&
- prev_axis.axis_number == axis_id
- });
- let delta = match prev_value_pos {
- Some(idx) => axis_value - prev_axis_values[idx].value,
- None => 0.0
- };
-
- let new_axis_value = AxisValue{
- device_id: event.sourceid,
- axis_number: axis_id,
- value: axis_value
- };
-
- match prev_value_pos {
- Some(idx) => prev_axis_values[idx] = new_axis_value,
- None => prev_axis_values.push(new_axis_value)
- }
-
- let mut scroll_delta = (0.0, 0.0);
-
- for axis in axis_list.iter() {
- if axis.id == event.sourceid &&
- axis.axis_number == axis_id {
- match axis.axis_type {
- AxisType::HorizontalScroll => scroll_delta.0 = delta,
- AxisType::VerticalScroll => scroll_delta.1 = delta,
- _ => {}
- }
- }
- }
-
- scroll_delta
-}
-
-#[cfg(not(all(feature = "xlib", feature = "xinput")))]
-fn main () {
- panic!("this example requires `--features 'xlib xinput'`");
-}
-
-#[cfg(all(feature = "xlib", feature = "xinput"))]
-fn main () {
- let mut demo_window = DemoWindow::new(TITLE, DEFAULT_WIDTH, DEFAULT_HEIGHT);
-
- // query XInput support
- let mut opcode: c_int = 0;
- let mut event: c_int = 0;
- let mut error: c_int = 0;
- let xinput_str = CString::new("XInputExtension").unwrap();
- let xinput_available = unsafe {
- xlib::XQueryExtension(demo_window.display, xinput_str.as_ptr(), &mut opcode, &mut event, &mut error)
- };
- if xinput_available == xlib::False {
- panic!("XInput not available")
- }
-
- let mut xinput_major_ver = xinput2::XI_2_Major;
- let mut xinput_minor_ver = xinput2::XI_2_Minor;
- if unsafe{xinput2::XIQueryVersion(demo_window.display,
- &mut xinput_major_ver, &mut xinput_minor_ver)} != xlib::Success as c_int {
- panic!("XInput2 not available");
- }
- println!("XI version available {}.{}", xinput_major_ver, xinput_minor_ver);
-
- // init XInput events
- let mut mask: [c_uchar; 1] = [0];
- let mut input_event_mask = xinput2::XIEventMask {
- deviceid: xinput2::XIAllMasterDevices,
- mask_len: mask.len() as i32,
- mask: mask.as_mut_ptr()
- };
- let events = &[
- xinput2::XI_ButtonPress,
- xinput2::XI_ButtonRelease,
- xinput2::XI_KeyPress,
- xinput2::XI_KeyRelease,
- xinput2::XI_Motion
- ];
- for &event in events {
- xinput2::XISetMask(&mut mask, event);
- }
-
- match unsafe{xinput2::XISelectEvents(demo_window.display,
- demo_window.window, &mut input_event_mask, 1)} {
- status if status as u8 == xlib::Success => (),
- err => panic!("Failed to select events {:?}", err)
- }
-
- // Show window
- demo_window.show();
-
- // Main loop
- let display = demo_window.display;
- let axis_list = read_input_axis_info(display);
-
- let mut prev_state = InputState{
- cursor_pos: (0.0, 0.0),
- axis_values: Vec::new()
- };
-
- demo_window.run_event_loop(|event| {
- match event.get_type() {
- xlib::GenericEvent => {
- let mut cookie: xlib::XGenericEventCookie = From::from(*event);
- if unsafe{xlib::XGetEventData(display, &mut cookie)} != xlib::True {
- println!("Failed to retrieve event data");
- return;
- }
- match cookie.evtype {
- xinput2::XI_KeyPress | xinput2::XI_KeyRelease => {
- let event_data: &xinput2::XIDeviceEvent = unsafe{transmute(cookie.data)};
- if cookie.evtype == xinput2::XI_KeyPress {
- if event_data.flags & xinput2::XIKeyRepeat == 0 {
- println!("Key {} pressed", event_data.detail);
- }
- } else {
- println!("Key {} released", event_data.detail);
- }
- },
- xinput2::XI_ButtonPress | xinput2::XI_ButtonRelease => {
- let event_data: &xinput2::XIDeviceEvent = unsafe{transmute(cookie.data)};
- if cookie.evtype == xinput2::XI_ButtonPress {
- println!("Button {} pressed", event_data.detail);
- } else {
- println!("Button {} released", event_data.detail);
- }
- },
- xinput2::XI_Motion => {
- let event_data: &xinput2::XIDeviceEvent = unsafe{transmute(cookie.data)};
- let axis_state = event_data.valuators;
- let mask = unsafe{ from_raw_parts(axis_state.mask, axis_state.mask_len as usize) };
- let mut axis_count = 0;
-
- let mut scroll_delta = (0.0, 0.0);
- for axis_id in 0..axis_state.mask_len {
- if xinput2::XIMaskIsSet(&mask, axis_id) {
- let axis_value = unsafe{*axis_state.values.offset(axis_count)};
- let delta = calc_scroll_deltas(event_data, axis_id, axis_value, &axis_list, &mut prev_state.axis_values);
- scroll_delta.0 += delta.0;
- scroll_delta.1 += delta.1;
- axis_count += 1;
- }
- }
-
- if scroll_delta.0.abs() > 0.0 || scroll_delta.1.abs() > 0.0 {
- println!("Mouse wheel/trackpad scrolled by ({}, {})", scroll_delta.0, scroll_delta.1);
- }
-
- let new_cursor_pos = (event_data.event_x, event_data.event_y);
- if new_cursor_pos != prev_state.cursor_pos {
- println!("Mouse moved to ({}, {})", new_cursor_pos.0, new_cursor_pos.1);
- prev_state.cursor_pos = new_cursor_pos;
- }
- },
- _ => ()
- }
- unsafe{xlib::XFreeEventData(display, &mut cookie)};
- },
- _ => ()
- }
- });
-}
deleted file mode 100644
--- a/third_party/rust/x11/examples/xrecord.rs
+++ /dev/null
@@ -1,127 +0,0 @@
-// Example for X Record Extension
-
-#![cfg_attr(not(feature = "xlib"), allow(dead_code))]
-#![cfg_attr(not(feature = "xlib"), allow(unused_imports))]
-
-extern crate libc;
-extern crate x11;
-
-use std::ffi::CString;
-use std::ptr::{
- null,
- null_mut,
-};
-
-use std::os::raw::{
- c_int
-};
-use x11::xlib;
-use x11::xrecord;
-
-static mut EVENT_COUNT:u32 = 0;
-
-#[cfg(not(all(feature = "xlib", feature = "xrecord")))]
-fn main () {
- panic!("this example requires `--features 'xlib xrecord'`");
-}
-
-#[cfg(all(feature = "xlib", feature = "xrecord"))]
-fn main () {
- unsafe {
- // Open displays
- let dpy_control = xlib::XOpenDisplay(null());
- let dpy_data = xlib::XOpenDisplay(null());
- if dpy_control == null_mut() || dpy_data == null_mut() {
- panic!("can't open display");
- }
- // Enable synchronization
- xlib::XSynchronize(dpy_control, 1);
-
- let extension_name = CString::new("RECORD").unwrap();
-
- let extension = xlib::XInitExtension(
- dpy_control,
- extension_name.as_ptr());
- if extension.is_null() {
- panic!("Error init X Record Extension");
- }
-
- // Get version
- let mut version_major: c_int = 0;
- let mut version_minor: c_int = 0;
- xrecord::XRecordQueryVersion(
- dpy_control,
- &mut version_major,
- &mut version_minor
- );
- println!(
- "RECORD extension version {}.{}",
- version_major,
- version_minor
- );
-
- // Prepare record range
- let mut record_range: xrecord::XRecordRange = *xrecord::XRecordAllocRange();
- record_range.device_events.first = xlib::KeyPress as u8;
- record_range.device_events.last = xlib::MotionNotify as u8;
-
- // Create context
- let context = xrecord::XRecordCreateContext(
- dpy_control,
- 0,
- &mut xrecord::XRecordAllClients,
- 1,
- std::mem::transmute(&mut &mut record_range),
- 1
- );
-
- if context == 0 {
- panic!("Fail create Record context\n");
- }
-
- // Run
- let result = xrecord::XRecordEnableContext(
- dpy_data,
- context,
- Some(record_callback),
- &mut 0
- );
- if result == 0 {
- panic!("Cound not enable the Record context!\n");
- }
- }
-}
-
-unsafe extern "C" fn record_callback(_:*mut i8, raw_data: *mut xrecord::XRecordInterceptData) {
- EVENT_COUNT += 1;
- let data = &*raw_data;
-
- // Skip server events
- if data.category != xrecord::XRecordFromServer {
- return;
- }
-
- // Cast binary data
- let xdatum = &*(data.data as *mut XRecordDatum);
-
- let event_type = match xdatum.xtype as i32 {
- xlib::KeyPress => "KeyPress",
- xlib::KeyRelease => "KeyRelease",
- xlib::ButtonPress => "ButtonPress",
- xlib::ButtonRelease => "ButtonRelease",
- xlib::MotionNotify => "MotionNotify",
- _ => "Other"
- };
-
- println!("Event recieve\t{:?}\tevent.", event_type);
-
- xrecord::XRecordFreeData(raw_data);
-}
-
-#[repr(C)]
-struct XRecordDatum {
- xtype: u8,
- code: u8,
- unknown1: u8,
- unknown2: u8
-}
deleted file mode 100644
--- a/third_party/rust/x11/src/dpms.rs
+++ /dev/null
@@ -1,44 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::{ c_int };
-
-use xlib::{ Display, Status, Bool };
-use xmd::{ CARD16, BOOL };
-
-
-//
-// functions
-//
-
-
-x11_link! { Xext, xext, ["libXext.so.6", "libXext.so"], 9,
- pub fn DPMSQueryExtension (_1: *mut Display, _2: *mut c_int, _3: *mut c_int) -> Bool,
- pub fn DPMSGetVersion (_1: *mut Display, _2: *mut c_int, _3: *mut c_int) -> Status,
- pub fn DPMSCapable (_1: *mut Display) -> Bool,
- pub fn DPMSSetTimeouts (_1: *mut Display, _2: CARD16, _3: CARD16, _4: CARD16) -> Status,
- pub fn DPMSGetTimeouts (_1: *mut Display, _2: *mut CARD16, _3: *mut CARD16, _4: *mut CARD16) -> Bool,
- pub fn DPMSEnable (_1: *mut Display) -> Status,
- pub fn DPMSDisable (_1: *mut Display) -> Status,
- pub fn DPMSForceLevel (_1: *mut Display, _2: CARD16) -> Status,
- pub fn DPMSInfo (_1: *mut Display, _2: *mut CARD16, _3: *mut BOOL) -> Status,
-variadic:
-globals:
-}
-
-
-//
-// constants
-//
-
-
-pub const DPMSMajorVersion: c_int = 1;
-pub const DPMSMinorVersion: c_int = 1;
-
-pub const DPMSExtensionName: &'static str = "DPMS";
-
-pub const DPMSModeOn: CARD16 = 0;
-pub const DPMSModeStandby: CARD16 = 1;
-pub const DPMSModeSuspend: CARD16 = 2;
-pub const DPMSModeOff: CARD16 = 3;
deleted file mode 100644
--- a/third_party/rust/x11/src/glx.rs
+++ /dev/null
@@ -1,191 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::{
- c_char,
- c_int,
- c_uchar,
- c_uint,
- c_ulong,
-};
-
-use ::xlib::{
- Display,
- XID,
- XVisualInfo,
-};
-
-
-//
-// functions
-//
-
-
-x11_link! { Glx, gl, ["libGL.so.1", "libGL.so"], 39,
- pub fn glXChooseFBConfig (_4: *mut Display, _3: c_int, _2: *const c_int, _1: *mut c_int) -> *mut GLXFBConfig,
- pub fn glXChooseVisual (_3: *mut Display, _2: c_int, _1: *mut c_int) -> *mut XVisualInfo,
- pub fn glXCopyContext (_4: *mut Display, _3: GLXContext, _2: GLXContext, _1: c_ulong) -> (),
- pub fn glXCreateContext (_4: *mut Display, _3: *mut XVisualInfo, _2: GLXContext, _1: c_int) -> GLXContext,
- pub fn glXCreateGLXPixmap (_3: *mut Display, _2: *mut XVisualInfo, _1: c_ulong) -> c_ulong,
- pub fn glXCreateNewContext (_5: *mut Display, _4: GLXFBConfig, _3: c_int, _2: GLXContext, _1: c_int) -> GLXContext,
- pub fn glXCreatePbuffer (_3: *mut Display, _2: GLXFBConfig, _1: *const c_int) -> c_ulong,
- pub fn glXCreatePixmap (_4: *mut Display, _3: GLXFBConfig, _2: c_ulong, _1: *const c_int) -> c_ulong,
- pub fn glXCreateWindow (_4: *mut Display, _3: GLXFBConfig, _2: c_ulong, _1: *const c_int) -> c_ulong,
- pub fn glXDestroyContext (_2: *mut Display, _1: GLXContext) -> (),
- pub fn glXDestroyGLXPixmap (_2: *mut Display, _1: c_ulong) -> (),
- pub fn glXDestroyPbuffer (_2: *mut Display, _1: c_ulong) -> (),
- pub fn glXDestroyPixmap (_2: *mut Display, _1: c_ulong) -> (),
- pub fn glXDestroyWindow (_2: *mut Display, _1: c_ulong) -> (),
- pub fn glXGetClientString (_2: *mut Display, _1: c_int) -> *const c_char,
- pub fn glXGetConfig (_4: *mut Display, _3: *mut XVisualInfo, _2: c_int, _1: *mut c_int) -> c_int,
- pub fn glXGetCurrentContext () -> GLXContext,
- pub fn glXGetCurrentDisplay () -> *mut Display,
- pub fn glXGetCurrentDrawable () -> c_ulong,
- pub fn glXGetCurrentReadDrawable () -> c_ulong,
- pub fn glXGetFBConfigAttrib (_4: *mut Display, _3: GLXFBConfig, _2: c_int, _1: *mut c_int) -> c_int,
- pub fn glXGetFBConfigs (_3: *mut Display, _2: c_int, _1: *mut c_int) -> *mut GLXFBConfig,
- pub fn glXGetProcAddress (_1: *const c_uchar) -> Option<unsafe extern "C" fn ()>,
- pub fn glXGetSelectedEvent (_3: *mut Display, _2: c_ulong, _1: *mut c_ulong) -> (),
- pub fn glXGetVisualFromFBConfig (_2: *mut Display, _1: GLXFBConfig) -> *mut XVisualInfo,
- pub fn glXIsDirect (_2: *mut Display, _1: GLXContext) -> c_int,
- pub fn glXMakeContextCurrent (_4: *mut Display, _3: c_ulong, _2: c_ulong, _1: GLXContext) -> c_int,
- pub fn glXMakeCurrent (_3: *mut Display, _2: c_ulong, _1: GLXContext) -> c_int,
- pub fn glXQueryContext (_4: *mut Display, _3: GLXContext, _2: c_int, _1: *mut c_int) -> c_int,
- pub fn glXQueryDrawable (_4: *mut Display, _3: c_ulong, _2: c_int, _1: *mut c_uint) -> (),
- pub fn glXQueryExtension (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn glXQueryExtensionsString (_2: *mut Display, _1: c_int) -> *const c_char,
- pub fn glXQueryServerString (_3: *mut Display, _2: c_int, _1: c_int) -> *const c_char,
- pub fn glXQueryVersion (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn glXSelectEvent (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> (),
- pub fn glXSwapBuffers (_2: *mut Display, _1: c_ulong) -> (),
- pub fn glXUseXFont (_4: c_ulong, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn glXWaitGL () -> (),
- pub fn glXWaitX () -> (),
-variadic:
-globals:
-}
-
-
-//
-// types
-//
-
-
-// opaque structures
-#[repr(C)] pub struct __GLXcontextRec;
-#[repr(C)] pub struct __GLXFBConfigRec;
-
-// types
-pub type GLXContext = *mut __GLXcontextRec;
-pub type GLXContextID = XID;
-pub type GLXDrawable = XID;
-pub type GLXFBConfig = *mut __GLXFBConfigRec;
-pub type GLXFBConfigID = XID;
-pub type GLXPbuffer = XID;
-pub type GLXPixmap = XID;
-pub type GLXWindow = XID;
-
-
-//
-// constants
-//
-
-
-// config caveats
-pub const GLX_SLOW_CONFIG: c_int = 0x8001;
-pub const GLX_NON_CONFORMANT_CONFIG: c_int = 0x800d;
-
-// drawable type mask
-pub const GLX_WINDOW_BIT: c_int = 0x0001;
-pub const GLX_PIXMAP_BIT: c_int = 0x0002;
-pub const GLX_PBUFFER_BIT: c_int = 0x0004;
-
-// framebuffer attributes
-pub const GLX_USE_GL: c_int = 0x0001;
-pub const GLX_BUFFER_SIZE: c_int = 0x0002;
-pub const GLX_LEVEL: c_int = 0x0003;
-pub const GLX_RGBA: c_int = 0x0004;
-pub const GLX_DOUBLEBUFFER: c_int = 0x0005;
-pub const GLX_STEREO: c_int = 0x0006;
-pub const GLX_AUX_BUFFERS: c_int = 0x0007;
-pub const GLX_RED_SIZE: c_int = 0x0008;
-pub const GLX_GREEN_SIZE: c_int = 0x0009;
-pub const GLX_BLUE_SIZE: c_int = 0x000a;
-pub const GLX_ALPHA_SIZE: c_int = 0x000b;
-pub const GLX_DEPTH_SIZE: c_int = 0x000c;
-pub const GLX_STENCIL_SIZE: c_int = 0x000d;
-pub const GLX_ACCUM_RED_SIZE: c_int = 0x000e;
-pub const GLX_ACCUM_GREEN_SIZE: c_int = 0x000f;
-pub const GLX_ACCUM_BLUE_SIZE: c_int = 0x0010;
-pub const GLX_ACCUM_ALPHA_SIZE: c_int = 0x0011;
-pub const GLX_CONFIG_CAVEAT: c_int = 0x0020;
-pub const GLX_X_VISUAL_TYPE: c_int = 0x0022;
-pub const GLX_TRANSPARENT_TYPE: c_int = 0x0023;
-pub const GLX_TRANSPARENT_INDEX_VALUE: c_int = 0x0024;
-pub const GLX_TRANSPARENT_RED_VALUE: c_int = 0x0025;
-pub const GLX_TRANSPARENT_GREEN_VALUE: c_int = 0x0026;
-pub const GLX_TRANSPARENT_BLUE_VALUE: c_int = 0x0027;
-pub const GLX_TRANSPARENT_ALPHA_VALUE: c_int = 0x0028;
-pub const GLX_DRAWABLE_TYPE: c_int = 0x8010;
-pub const GLX_RENDER_TYPE: c_int = 0x8011;
-pub const GLX_X_RENDERABLE: c_int = 0x8012;
-pub const GLX_FBCONFIG_ID: c_int = 0x8013;
-
-// misc
-pub const GLX_DONT_CARE: c_int = -1;
-pub const GLX_NONE: c_int = 0x8000;
-
-// render type mask
-pub const GLX_RGBA_BIT: c_int = 0x0001;
-pub const GLX_COLOR_INDEX_BIT: c_int = 0x0002;
-
-// transparent types
-pub const GLX_TRANSPARENT_RGB: c_int = 0x8008;
-pub const GLX_TRANSPARENT_INDEX: c_int = 0x8009;
-
-// visual types
-pub const GLX_TRUE_COLOR: c_int = 0x8002;
-pub const GLX_DIRECT_COLOR: c_int = 0x8003;
-pub const GLX_PSEUDO_COLOR: c_int = 0x8004;
-pub const GLX_STATIC_COLOR: c_int = 0x8005;
-pub const GLX_GRAY_SCALE: c_int = 0x8006;
-pub const GLX_STATIC_GRAY: c_int = 0x8007;
-
-
-//
-// ARB extensions
-//
-
-
-pub mod arb {
- use std::os::raw::c_int;
-
- // context attributes
- pub const GLX_CONTEXT_MAJOR_VERSION_ARB: c_int = 0x2091;
- pub const GLX_CONTEXT_MINOR_VERSION_ARB: c_int = 0x2092;
- pub const GLX_CONTEXT_FLAGS_ARB: c_int = 0x2094;
- pub const GLX_CONTEXT_PROFILE_MASK_ARB: c_int = 0x9126;
-
- // context flags
- pub const GLX_CONTEXT_DEBUG_BIT_ARB: c_int = 0x0001;
- pub const GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB: c_int = 0x0002;
-
- // context profile mask
- pub const GLX_CONTEXT_CORE_PROFILE_BIT_ARB: c_int = 0x0001;
- pub const GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB: c_int = 0x0002;
-}
-
-
-//
-// EXT extensions
-//
-
-
-pub mod ext {
- use std::os::raw::c_int;
-
- // drawable attributes
- pub const GLX_SWAP_INTERVAL_EXT: c_int = 0x20f1;
- pub const GLX_MAX_SWAP_INTERVAL_EXT: c_int = 0x20f2;
-}
deleted file mode 100644
--- a/third_party/rust/x11/src/internal.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::cmp::min;
-use std::mem::{
- size_of,
- zeroed,
-};
-
-
-//
-// public functions
-//
-
-
-pub unsafe fn mem_eq<T: Sized> (a: &T, b: &T) -> bool {
- let a_addr = a as *const T as usize;
- let b_addr = b as *const T as usize;
-
- for i in 0..size_of::<T>() {
- if *((a_addr + i) as *const u8) != *((b_addr + i) as *const u8) {
- return false;
- }
- }
-
- return true;
-}
-
-pub unsafe fn transmute_union<I, O> (input: &I) -> O
- where I : Sized, O : Sized
-{
- let mut output: O = zeroed();
- let copy_len = min(size_of::<I>(), size_of::<O>());
-
- for i in 0..copy_len {
- *((&mut output as *mut O as usize + i) as *mut u8) = *((input as *const I as usize + i) as *const u8);
- }
-
- return output;
-}
deleted file mode 100644
--- a/third_party/rust/x11/src/keysym.rs
+++ /dev/null
@@ -1,1332 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::c_uint;
-
-pub const XK_BackSpace: c_uint = 0xFF08;
-pub const XK_Tab: c_uint = 0xFF09;
-pub const XK_Linefeed: c_uint = 0xFF0A;
-pub const XK_Clear: c_uint = 0xFF0B;
-pub const XK_Return: c_uint = 0xFF0D;
-pub const XK_Pause: c_uint = 0xFF13;
-pub const XK_Scroll_Lock: c_uint = 0xFF14;
-pub const XK_Sys_Req: c_uint = 0xFF15;
-pub const XK_Escape: c_uint = 0xFF1B;
-pub const XK_Delete: c_uint = 0xFFFF;
-pub const XK_Multi_key: c_uint = 0xFF20;
-pub const XK_Kanji: c_uint = 0xFF21;
-pub const XK_Muhenkan: c_uint = 0xFF22;
-pub const XK_Henkan_Mode: c_uint = 0xFF23;
-pub const XK_Henkan: c_uint = 0xFF23;
-pub const XK_Romaji: c_uint = 0xFF24;
-pub const XK_Hiragana: c_uint = 0xFF25;
-pub const XK_Katakana: c_uint = 0xFF26;
-pub const XK_Hiragana_Katakana: c_uint = 0xFF27;
-pub const XK_Zenkaku: c_uint = 0xFF28;
-pub const XK_Hankaku: c_uint = 0xFF29;
-pub const XK_Zenkaku_Hankaku: c_uint = 0xFF2A;
-pub const XK_Touroku: c_uint = 0xFF2B;
-pub const XK_Massyo: c_uint = 0xFF2C;
-pub const XK_Kana_Lock: c_uint = 0xFF2D;
-pub const XK_Kana_Shift: c_uint = 0xFF2E;
-pub const XK_Eisu_Shift: c_uint = 0xFF2F;
-pub const XK_Eisu_toggle: c_uint = 0xFF30;
-pub const XK_Home: c_uint = 0xFF50;
-pub const XK_Left: c_uint = 0xFF51;
-pub const XK_Up: c_uint = 0xFF52;
-pub const XK_Right: c_uint = 0xFF53;
-pub const XK_Down: c_uint = 0xFF54;
-pub const XK_Prior: c_uint = 0xFF55;
-pub const XK_Page_Up: c_uint = 0xFF55;
-pub const XK_Next: c_uint = 0xFF56;
-pub const XK_Page_Down: c_uint = 0xFF56;
-pub const XK_End: c_uint = 0xFF57;
-pub const XK_Begin: c_uint = 0xFF58;
-pub const XK_Win_L: c_uint = 0xFF5B;
-pub const XK_Win_R: c_uint = 0xFF5C;
-pub const XK_App: c_uint = 0xFF5D;
-pub const XK_Select: c_uint = 0xFF60;
-pub const XK_Print: c_uint = 0xFF61;
-pub const XK_Execute: c_uint = 0xFF62;
-pub const XK_Insert: c_uint = 0xFF63;
-pub const XK_Undo: c_uint = 0xFF65;
-pub const XK_Redo: c_uint = 0xFF66;
-pub const XK_Menu: c_uint = 0xFF67;
-pub const XK_Find: c_uint = 0xFF68;
-pub const XK_Cancel: c_uint = 0xFF69;
-pub const XK_Help: c_uint = 0xFF6A;
-pub const XK_Break: c_uint = 0xFF6B;
-pub const XK_Mode_switch: c_uint = 0xFF7E;
-pub const XK_script_switch: c_uint = 0xFF7E;
-pub const XK_Num_Lock: c_uint = 0xFF7F;
-pub const XK_KP_Space: c_uint = 0xFF80;
-pub const XK_KP_Tab: c_uint = 0xFF89;
-pub const XK_KP_Enter: c_uint = 0xFF8D;
-pub const XK_KP_F1: c_uint = 0xFF91;
-pub const XK_KP_F2: c_uint = 0xFF92;
-pub const XK_KP_F3: c_uint = 0xFF93;
-pub const XK_KP_F4: c_uint = 0xFF94;
-pub const XK_KP_Home: c_uint = 0xFF95;
-pub const XK_KP_Left: c_uint = 0xFF96;
-pub const XK_KP_Up: c_uint = 0xFF97;
-pub const XK_KP_Right: c_uint = 0xFF98;
-pub const XK_KP_Down: c_uint = 0xFF99;
-pub const XK_KP_Prior: c_uint = 0xFF9A;
-pub const XK_KP_Page_Up: c_uint = 0xFF9A;
-pub const XK_KP_Next: c_uint = 0xFF9B;
-pub const XK_KP_Page_Down: c_uint = 0xFF9B;
-pub const XK_KP_End: c_uint = 0xFF9C;
-pub const XK_KP_Begin: c_uint = 0xFF9D;
-pub const XK_KP_Insert: c_uint = 0xFF9E;
-pub const XK_KP_Delete: c_uint = 0xFF9F;
-pub const XK_KP_Equal: c_uint = 0xFFBD;
-pub const XK_KP_Multiply: c_uint = 0xFFAA;
-pub const XK_KP_Add: c_uint = 0xFFAB;
-pub const XK_KP_Separator: c_uint = 0xFFAC;
-pub const XK_KP_Subtract: c_uint = 0xFFAD;
-pub const XK_KP_Decimal: c_uint = 0xFFAE;
-pub const XK_KP_Divide: c_uint = 0xFFAF;
-pub const XK_KP_0: c_uint = 0xFFB0;
-pub const XK_KP_1: c_uint = 0xFFB1;
-pub const XK_KP_2: c_uint = 0xFFB2;
-pub const XK_KP_3: c_uint = 0xFFB3;
-pub const XK_KP_4: c_uint = 0xFFB4;
-pub const XK_KP_5: c_uint = 0xFFB5;
-pub const XK_KP_6: c_uint = 0xFFB6;
-pub const XK_KP_7: c_uint = 0xFFB7;
-pub const XK_KP_8: c_uint = 0xFFB8;
-pub const XK_KP_9: c_uint = 0xFFB9;
-pub const XK_F1: c_uint = 0xFFBE;
-pub const XK_F2: c_uint = 0xFFBF;
-pub const XK_F3: c_uint = 0xFFC0;
-pub const XK_F4: c_uint = 0xFFC1;
-pub const XK_F5: c_uint = 0xFFC2;
-pub const XK_F6: c_uint = 0xFFC3;
-pub const XK_F7: c_uint = 0xFFC4;
-pub const XK_F8: c_uint = 0xFFC5;
-pub const XK_F9: c_uint = 0xFFC6;
-pub const XK_F10: c_uint = 0xFFC7;
-pub const XK_F11: c_uint = 0xFFC8;
-pub const XK_L1: c_uint = 0xFFC8;
-pub const XK_F12: c_uint = 0xFFC9;
-pub const XK_L2: c_uint = 0xFFC9;
-pub const XK_F13: c_uint = 0xFFCA;
-pub const XK_L3: c_uint = 0xFFCA;
-pub const XK_F14: c_uint = 0xFFCB;
-pub const XK_L4: c_uint = 0xFFCB;
-pub const XK_F15: c_uint = 0xFFCC;
-pub const XK_L5: c_uint = 0xFFCC;
-pub const XK_F16: c_uint = 0xFFCD;
-pub const XK_L6: c_uint = 0xFFCD;
-pub const XK_F17: c_uint = 0xFFCE;
-pub const XK_L7: c_uint = 0xFFCE;
-pub const XK_F18: c_uint = 0xFFCF;
-pub const XK_L8: c_uint = 0xFFCF;
-pub const XK_F19: c_uint = 0xFFD0;
-pub const XK_L9: c_uint = 0xFFD0;
-pub const XK_F20: c_uint = 0xFFD1;
-pub const XK_L10: c_uint = 0xFFD1;
-pub const XK_F21: c_uint = 0xFFD2;
-pub const XK_R1: c_uint = 0xFFD2;
-pub const XK_F22: c_uint = 0xFFD3;
-pub const XK_R2: c_uint = 0xFFD3;
-pub const XK_F23: c_uint = 0xFFD4;
-pub const XK_R3: c_uint = 0xFFD4;
-pub const XK_F24: c_uint = 0xFFD5;
-pub const XK_R4: c_uint = 0xFFD5;
-pub const XK_F25: c_uint = 0xFFD6;
-pub const XK_R5: c_uint = 0xFFD6;
-pub const XK_F26: c_uint = 0xFFD7;
-pub const XK_R6: c_uint = 0xFFD7;
-pub const XK_F27: c_uint = 0xFFD8;
-pub const XK_R7: c_uint = 0xFFD8;
-pub const XK_F28: c_uint = 0xFFD9;
-pub const XK_R8: c_uint = 0xFFD9;
-pub const XK_F29: c_uint = 0xFFDA;
-pub const XK_R9: c_uint = 0xFFDA;
-pub const XK_F30: c_uint = 0xFFDB;
-pub const XK_R10: c_uint = 0xFFDB;
-pub const XK_F31: c_uint = 0xFFDC;
-pub const XK_R11: c_uint = 0xFFDC;
-pub const XK_F32: c_uint = 0xFFDD;
-pub const XK_R12: c_uint = 0xFFDD;
-pub const XK_F33: c_uint = 0xFFDE;
-pub const XK_R13: c_uint = 0xFFDE;
-pub const XK_F34: c_uint = 0xFFDF;
-pub const XK_R14: c_uint = 0xFFDF;
-pub const XK_F35: c_uint = 0xFFE0;
-pub const XK_R15: c_uint = 0xFFE0;
-pub const XK_Shift_L: c_uint = 0xFFE1;
-pub const XK_Shift_R: c_uint = 0xFFE2;
-pub const XK_Control_L: c_uint = 0xFFE3;
-pub const XK_Control_R: c_uint = 0xFFE4;
-pub const XK_Caps_Lock: c_uint = 0xFFE5;
-pub const XK_Shift_Lock: c_uint = 0xFFE6;
-pub const XK_Meta_L: c_uint = 0xFFE7;
-pub const XK_Meta_R: c_uint = 0xFFE8;
-pub const XK_Alt_L: c_uint = 0xFFE9;
-pub const XK_Alt_R: c_uint = 0xFFEA;
-pub const XK_Super_L: c_uint = 0xFFEB;
-pub const XK_Super_R: c_uint = 0xFFEC;
-pub const XK_Hyper_L: c_uint = 0xFFED;
-pub const XK_Hyper_R: c_uint = 0xFFEE;
-pub const XK_space: c_uint = 0x020;
-pub const XK_exclam: c_uint = 0x021;
-pub const XK_quotedbl: c_uint = 0x022;
-pub const XK_numbersign: c_uint = 0x023;
-pub const XK_dollar: c_uint = 0x024;
-pub const XK_percent: c_uint = 0x025;
-pub const XK_ampersand: c_uint = 0x026;
-pub const XK_apostrophe: c_uint = 0x027;
-pub const XK_quoteright: c_uint = 0x027;
-pub const XK_parenleft: c_uint = 0x028;
-pub const XK_parenright: c_uint = 0x029;
-pub const XK_asterisk: c_uint = 0x02a;
-pub const XK_plus: c_uint = 0x02b;
-pub const XK_comma: c_uint = 0x02c;
-pub const XK_minus: c_uint = 0x02d;
-pub const XK_period: c_uint = 0x02e;
-pub const XK_slash: c_uint = 0x02f;
-pub const XK_0: c_uint = 0x030;
-pub const XK_1: c_uint = 0x031;
-pub const XK_2: c_uint = 0x032;
-pub const XK_3: c_uint = 0x033;
-pub const XK_4: c_uint = 0x034;
-pub const XK_5: c_uint = 0x035;
-pub const XK_6: c_uint = 0x036;
-pub const XK_7: c_uint = 0x037;
-pub const XK_8: c_uint = 0x038;
-pub const XK_9: c_uint = 0x039;
-pub const XK_colon: c_uint = 0x03a;
-pub const XK_semicolon: c_uint = 0x03b;
-pub const XK_less: c_uint = 0x03c;
-pub const XK_equal: c_uint = 0x03d;
-pub const XK_greater: c_uint = 0x03e;
-pub const XK_question: c_uint = 0x03f;
-pub const XK_at: c_uint = 0x040;
-pub const XK_A: c_uint = 0x041;
-pub const XK_B: c_uint = 0x042;
-pub const XK_C: c_uint = 0x043;
-pub const XK_D: c_uint = 0x044;
-pub const XK_E: c_uint = 0x045;
-pub const XK_F: c_uint = 0x046;
-pub const XK_G: c_uint = 0x047;
-pub const XK_H: c_uint = 0x048;
-pub const XK_I: c_uint = 0x049;
-pub const XK_J: c_uint = 0x04a;
-pub const XK_K: c_uint = 0x04b;
-pub const XK_L: c_uint = 0x04c;
-pub const XK_M: c_uint = 0x04d;
-pub const XK_N: c_uint = 0x04e;
-pub const XK_O: c_uint = 0x04f;
-pub const XK_P: c_uint = 0x050;
-pub const XK_Q: c_uint = 0x051;
-pub const XK_R: c_uint = 0x052;
-pub const XK_S: c_uint = 0x053;
-pub const XK_T: c_uint = 0x054;
-pub const XK_U: c_uint = 0x055;
-pub const XK_V: c_uint = 0x056;
-pub const XK_W: c_uint = 0x057;
-pub const XK_X: c_uint = 0x058;
-pub const XK_Y: c_uint = 0x059;
-pub const XK_Z: c_uint = 0x05a;
-pub const XK_bracketleft: c_uint = 0x05b;
-pub const XK_backslash: c_uint = 0x05c;
-pub const XK_bracketright: c_uint = 0x05d;
-pub const XK_asciicircum: c_uint = 0x05e;
-pub const XK_underscore: c_uint = 0x05f;
-pub const XK_grave: c_uint = 0x060;
-pub const XK_quoteleft: c_uint = 0x060;
-pub const XK_a: c_uint = 0x061;
-pub const XK_b: c_uint = 0x062;
-pub const XK_c: c_uint = 0x063;
-pub const XK_d: c_uint = 0x064;
-pub const XK_e: c_uint = 0x065;
-pub const XK_f: c_uint = 0x066;
-pub const XK_g: c_uint = 0x067;
-pub const XK_h: c_uint = 0x068;
-pub const XK_i: c_uint = 0x069;
-pub const XK_j: c_uint = 0x06a;
-pub const XK_k: c_uint = 0x06b;
-pub const XK_l: c_uint = 0x06c;
-pub const XK_m: c_uint = 0x06d;
-pub const XK_n: c_uint = 0x06e;
-pub const XK_o: c_uint = 0x06f;
-pub const XK_p: c_uint = 0x070;
-pub const XK_q: c_uint = 0x071;
-pub const XK_r: c_uint = 0x072;
-pub const XK_s: c_uint = 0x073;
-pub const XK_t: c_uint = 0x074;
-pub const XK_u: c_uint = 0x075;
-pub const XK_v: c_uint = 0x076;
-pub const XK_w: c_uint = 0x077;
-pub const XK_x: c_uint = 0x078;
-pub const XK_y: c_uint = 0x079;
-pub const XK_z: c_uint = 0x07a;
-pub const XK_braceleft: c_uint = 0x07b;
-pub const XK_bar: c_uint = 0x07c;
-pub const XK_braceright: c_uint = 0x07d;
-pub const XK_asciitilde: c_uint = 0x07e;
-pub const XK_nobreakspace: c_uint = 0x0a0;
-pub const XK_exclamdown: c_uint = 0x0a1;
-pub const XK_cent: c_uint = 0x0a2;
-pub const XK_sterling: c_uint = 0x0a3;
-pub const XK_currency: c_uint = 0x0a4;
-pub const XK_yen: c_uint = 0x0a5;
-pub const XK_brokenbar: c_uint = 0x0a6;
-pub const XK_section: c_uint = 0x0a7;
-pub const XK_diaeresis: c_uint = 0x0a8;
-pub const XK_copyright: c_uint = 0x0a9;
-pub const XK_ordfeminine: c_uint = 0x0aa;
-pub const XK_guillemotleft: c_uint = 0x0ab;
-pub const XK_notsign: c_uint = 0x0ac;
-pub const XK_hyphen: c_uint = 0x0ad;
-pub const XK_registered: c_uint = 0x0ae;
-pub const XK_macron: c_uint = 0x0af;
-pub const XK_degree: c_uint = 0x0b0;
-pub const XK_plusminus: c_uint = 0x0b1;
-pub const XK_twosuperior: c_uint = 0x0b2;
-pub const XK_threesuperior: c_uint = 0x0b3;
-pub const XK_acute: c_uint = 0x0b4;
-pub const XK_mu: c_uint = 0x0b5;
-pub const XK_paragraph: c_uint = 0x0b6;
-pub const XK_periodcentered: c_uint = 0x0b7;
-pub const XK_cedilla: c_uint = 0x0b8;
-pub const XK_onesuperior: c_uint = 0x0b9;
-pub const XK_masculine: c_uint = 0x0ba;
-pub const XK_guillemotright: c_uint = 0x0bb;
-pub const XK_onequarter: c_uint = 0x0bc;
-pub const XK_onehalf: c_uint = 0x0bd;
-pub const XK_threequarters: c_uint = 0x0be;
-pub const XK_questiondown: c_uint = 0x0bf;
-pub const XK_Agrave: c_uint = 0x0c0;
-pub const XK_Aacute: c_uint = 0x0c1;
-pub const XK_Acircumflex: c_uint = 0x0c2;
-pub const XK_Atilde: c_uint = 0x0c3;
-pub const XK_Adiaeresis: c_uint = 0x0c4;
-pub const XK_Aring: c_uint = 0x0c5;
-pub const XK_AE: c_uint = 0x0c6;
-pub const XK_Ccedilla: c_uint = 0x0c7;
-pub const XK_Egrave: c_uint = 0x0c8;
-pub const XK_Eacute: c_uint = 0x0c9;
-pub const XK_Ecircumflex: c_uint = 0x0ca;
-pub const XK_Ediaeresis: c_uint = 0x0cb;
-pub const XK_Igrave: c_uint = 0x0cc;
-pub const XK_Iacute: c_uint = 0x0cd;
-pub const XK_Icircumflex: c_uint = 0x0ce;
-pub const XK_Idiaeresis: c_uint = 0x0cf;
-pub const XK_ETH: c_uint = 0x0d0;
-pub const XK_Eth: c_uint = 0x0d0;
-pub const XK_Ntilde: c_uint = 0x0d1;
-pub const XK_Ograve: c_uint = 0x0d2;
-pub const XK_Oacute: c_uint = 0x0d3;
-pub const XK_Ocircumflex: c_uint = 0x0d4;
-pub const XK_Otilde: c_uint = 0x0d5;
-pub const XK_Odiaeresis: c_uint = 0x0d6;
-pub const XK_multiply: c_uint = 0x0d7;
-pub const XK_Ooblique: c_uint = 0x0d8;
-pub const XK_Ugrave: c_uint = 0x0d9;
-pub const XK_Uacute: c_uint = 0x0da;
-pub const XK_Ucircumflex: c_uint = 0x0db;
-pub const XK_Udiaeresis: c_uint = 0x0dc;
-pub const XK_Yacute: c_uint = 0x0dd;
-pub const XK_THORN: c_uint = 0x0de;
-pub const XK_Thorn: c_uint = 0x0de;
-pub const XK_ssharp: c_uint = 0x0df;
-pub const XK_agrave: c_uint = 0x0e0;
-pub const XK_aacute: c_uint = 0x0e1;
-pub const XK_acircumflex: c_uint = 0x0e2;
-pub const XK_atilde: c_uint = 0x0e3;
-pub const XK_adiaeresis: c_uint = 0x0e4;
-pub const XK_aring: c_uint = 0x0e5;
-pub const XK_ae: c_uint = 0x0e6;
-pub const XK_ccedilla: c_uint = 0x0e7;
-pub const XK_egrave: c_uint = 0x0e8;
-pub const XK_eacute: c_uint = 0x0e9;
-pub const XK_ecircumflex: c_uint = 0x0ea;
-pub const XK_ediaeresis: c_uint = 0x0eb;
-pub const XK_igrave: c_uint = 0x0ec;
-pub const XK_iacute: c_uint = 0x0ed;
-pub const XK_icircumflex: c_uint = 0x0ee;
-pub const XK_idiaeresis: c_uint = 0x0ef;
-pub const XK_eth: c_uint = 0x0f0;
-pub const XK_ntilde: c_uint = 0x0f1;
-pub const XK_ograve: c_uint = 0x0f2;
-pub const XK_oacute: c_uint = 0x0f3;
-pub const XK_ocircumflex: c_uint = 0x0f4;
-pub const XK_otilde: c_uint = 0x0f5;
-pub const XK_odiaeresis: c_uint = 0x0f6;
-pub const XK_division: c_uint = 0x0f7;
-pub const XK_oslash: c_uint = 0x0f8;
-pub const XK_ugrave: c_uint = 0x0f9;
-pub const XK_uacute: c_uint = 0x0fa;
-pub const XK_ucircumflex: c_uint = 0x0fb;
-pub const XK_udiaeresis: c_uint = 0x0fc;
-pub const XK_yacute: c_uint = 0x0fd;
-pub const XK_thorn: c_uint = 0x0fe;
-pub const XK_ydiaeresis: c_uint = 0x0ff;
-pub const XK_Aogonek: c_uint = 0x1a1;
-pub const XK_breve: c_uint = 0x1a2;
-pub const XK_Lstroke: c_uint = 0x1a3;
-pub const XK_Lcaron: c_uint = 0x1a5;
-pub const XK_Sacute: c_uint = 0x1a6;
-pub const XK_Scaron: c_uint = 0x1a9;
-pub const XK_Scedilla: c_uint = 0x1aa;
-pub const XK_Tcaron: c_uint = 0x1ab;
-pub const XK_Zacute: c_uint = 0x1ac;
-pub const XK_Zcaron: c_uint = 0x1ae;
-pub const XK_Zabovedot: c_uint = 0x1af;
-pub const XK_aogonek: c_uint = 0x1b1;
-pub const XK_ogonek: c_uint = 0x1b2;
-pub const XK_lstroke: c_uint = 0x1b3;
-pub const XK_lcaron: c_uint = 0x1b5;
-pub const XK_sacute: c_uint = 0x1b6;
-pub const XK_caron: c_uint = 0x1b7;
-pub const XK_scaron: c_uint = 0x1b9;
-pub const XK_scedilla: c_uint = 0x1ba;
-pub const XK_tcaron: c_uint = 0x1bb;
-pub const XK_zacute: c_uint = 0x1bc;
-pub const XK_doubleacute: c_uint = 0x1bd;
-pub const XK_zcaron: c_uint = 0x1be;
-pub const XK_zabovedot: c_uint = 0x1bf;
-pub const XK_Racute: c_uint = 0x1c0;
-pub const XK_Abreve: c_uint = 0x1c3;
-pub const XK_Lacute: c_uint = 0x1c5;
-pub const XK_Cacute: c_uint = 0x1c6;
-pub const XK_Ccaron: c_uint = 0x1c8;
-pub const XK_Eogonek: c_uint = 0x1ca;
-pub const XK_Ecaron: c_uint = 0x1cc;
-pub const XK_Dcaron: c_uint = 0x1cf;
-pub const XK_Dstroke: c_uint = 0x1d0;
-pub const XK_Nacute: c_uint = 0x1d1;
-pub const XK_Ncaron: c_uint = 0x1d2;
-pub const XK_Odoubleacute: c_uint = 0x1d5;
-pub const XK_Rcaron: c_uint = 0x1d8;
-pub const XK_Uring: c_uint = 0x1d9;
-pub const XK_Udoubleacute: c_uint = 0x1db;
-pub const XK_Tcedilla: c_uint = 0x1de;
-pub const XK_racute: c_uint = 0x1e0;
-pub const XK_abreve: c_uint = 0x1e3;
-pub const XK_lacute: c_uint = 0x1e5;
-pub const XK_cacute: c_uint = 0x1e6;
-pub const XK_ccaron: c_uint = 0x1e8;
-pub const XK_eogonek: c_uint = 0x1ea;
-pub const XK_ecaron: c_uint = 0x1ec;
-pub const XK_dcaron: c_uint = 0x1ef;
-pub const XK_dstroke: c_uint = 0x1f0;
-pub const XK_nacute: c_uint = 0x1f1;
-pub const XK_ncaron: c_uint = 0x1f2;
-pub const XK_odoubleacute: c_uint = 0x1f5;
-pub const XK_udoubleacute: c_uint = 0x1fb;
-pub const XK_rcaron: c_uint = 0x1f8;
-pub const XK_uring: c_uint = 0x1f9;
-pub const XK_tcedilla: c_uint = 0x1fe;
-pub const XK_abovedot: c_uint = 0x1ff;
-pub const XK_Hstroke: c_uint = 0x2a1;
-pub const XK_Hcircumflex: c_uint = 0x2a6;
-pub const XK_Iabovedot: c_uint = 0x2a9;
-pub const XK_Gbreve: c_uint = 0x2ab;
-pub const XK_Jcircumflex: c_uint = 0x2ac;
-pub const XK_hstroke: c_uint = 0x2b1;
-pub const XK_hcircumflex: c_uint = 0x2b6;
-pub const XK_idotless: c_uint = 0x2b9;
-pub const XK_gbreve: c_uint = 0x2bb;
-pub const XK_jcircumflex: c_uint = 0x2bc;
-pub const XK_Cabovedot: c_uint = 0x2c5;
-pub const XK_Ccircumflex: c_uint = 0x2c6;
-pub const XK_Gabovedot: c_uint = 0x2d5;
-pub const XK_Gcircumflex: c_uint = 0x2d8;
-pub const XK_Ubreve: c_uint = 0x2dd;
-pub const XK_Scircumflex: c_uint = 0x2de;
-pub const XK_cabovedot: c_uint = 0x2e5;
-pub const XK_ccircumflex: c_uint = 0x2e6;
-pub const XK_gabovedot: c_uint = 0x2f5;
-pub const XK_gcircumflex: c_uint = 0x2f8;
-pub const XK_ubreve: c_uint = 0x2fd;
-pub const XK_scircumflex: c_uint = 0x2fe;
-pub const XK_kra: c_uint = 0x3a2;
-pub const XK_kappa: c_uint = 0x3a2;
-pub const XK_Rcedilla: c_uint = 0x3a3;
-pub const XK_Itilde: c_uint = 0x3a5;
-pub const XK_Lcedilla: c_uint = 0x3a6;
-pub const XK_Emacron: c_uint = 0x3aa;
-pub const XK_Gcedilla: c_uint = 0x3ab;
-pub const XK_Tslash: c_uint = 0x3ac;
-pub const XK_rcedilla: c_uint = 0x3b3;
-pub const XK_itilde: c_uint = 0x3b5;
-pub const XK_lcedilla: c_uint = 0x3b6;
-pub const XK_emacron: c_uint = 0x3ba;
-pub const XK_gcedilla: c_uint = 0x3bb;
-pub const XK_tslash: c_uint = 0x3bc;
-pub const XK_ENG: c_uint = 0x3bd;
-pub const XK_eng: c_uint = 0x3bf;
-pub const XK_Amacron: c_uint = 0x3c0;
-pub const XK_Iogonek: c_uint = 0x3c7;
-pub const XK_Eabovedot: c_uint = 0x3cc;
-pub const XK_Imacron: c_uint = 0x3cf;
-pub const XK_Ncedilla: c_uint = 0x3d1;
-pub const XK_Omacron: c_uint = 0x3d2;
-pub const XK_Kcedilla: c_uint = 0x3d3;
-pub const XK_Uogonek: c_uint = 0x3d9;
-pub const XK_Utilde: c_uint = 0x3dd;
-pub const XK_Umacron: c_uint = 0x3de;
-pub const XK_amacron: c_uint = 0x3e0;
-pub const XK_iogonek: c_uint = 0x3e7;
-pub const XK_eabovedot: c_uint = 0x3ec;
-pub const XK_imacron: c_uint = 0x3ef;
-pub const XK_ncedilla: c_uint = 0x3f1;
-pub const XK_omacron: c_uint = 0x3f2;
-pub const XK_kcedilla: c_uint = 0x3f3;
-pub const XK_uogonek: c_uint = 0x3f9;
-pub const XK_utilde: c_uint = 0x3fd;
-pub const XK_umacron: c_uint = 0x3fe;
-pub const XK_overline: c_uint = 0x47e;
-pub const XK_kana_fullstop: c_uint = 0x4a1;
-pub const XK_kana_openingbracket: c_uint = 0x4a2;
-pub const XK_kana_closingbracket: c_uint = 0x4a3;
-pub const XK_kana_comma: c_uint = 0x4a4;
-pub const XK_kana_conjunctive: c_uint = 0x4a5;
-pub const XK_kana_middledot: c_uint = 0x4a5;
-pub const XK_kana_WO: c_uint = 0x4a6;
-pub const XK_kana_a: c_uint = 0x4a7;
-pub const XK_kana_i: c_uint = 0x4a8;
-pub const XK_kana_u: c_uint = 0x4a9;
-pub const XK_kana_e: c_uint = 0x4aa;
-pub const XK_kana_o: c_uint = 0x4ab;
-pub const XK_kana_ya: c_uint = 0x4ac;
-pub const XK_kana_yu: c_uint = 0x4ad;
-pub const XK_kana_yo: c_uint = 0x4ae;
-pub const XK_kana_tsu: c_uint = 0x4af;
-pub const XK_kana_tu: c_uint = 0x4af;
-pub const XK_prolongedsound: c_uint = 0x4b0;
-pub const XK_kana_A: c_uint = 0x4b1;
-pub const XK_kana_I: c_uint = 0x4b2;
-pub const XK_kana_U: c_uint = 0x4b3;
-pub const XK_kana_E: c_uint = 0x4b4;
-pub const XK_kana_O: c_uint = 0x4b5;
-pub const XK_kana_KA: c_uint = 0x4b6;
-pub const XK_kana_KI: c_uint = 0x4b7;
-pub const XK_kana_KU: c_uint = 0x4b8;
-pub const XK_kana_KE: c_uint = 0x4b9;
-pub const XK_kana_KO: c_uint = 0x4ba;
-pub const XK_kana_SA: c_uint = 0x4bb;
-pub const XK_kana_SHI: c_uint = 0x4bc;
-pub const XK_kana_SU: c_uint = 0x4bd;
-pub const XK_kana_SE: c_uint = 0x4be;
-pub const XK_kana_SO: c_uint = 0x4bf;
-pub const XK_kana_TA: c_uint = 0x4c0;
-pub const XK_kana_CHI: c_uint = 0x4c1;
-pub const XK_kana_TI: c_uint = 0x4c1;
-pub const XK_kana_TSU: c_uint = 0x4c2;
-pub const XK_kana_TU: c_uint = 0x4c2;
-pub const XK_kana_TE: c_uint = 0x4c3;
-pub const XK_kana_TO: c_uint = 0x4c4;
-pub const XK_kana_NA: c_uint = 0x4c5;
-pub const XK_kana_NI: c_uint = 0x4c6;
-pub const XK_kana_NU: c_uint = 0x4c7;
-pub const XK_kana_NE: c_uint = 0x4c8;
-pub const XK_kana_NO: c_uint = 0x4c9;
-pub const XK_kana_HA: c_uint = 0x4ca;
-pub const XK_kana_HI: c_uint = 0x4cb;
-pub const XK_kana_FU: c_uint = 0x4cc;
-pub const XK_kana_HU: c_uint = 0x4cc;
-pub const XK_kana_HE: c_uint = 0x4cd;
-pub const XK_kana_HO: c_uint = 0x4ce;
-pub const XK_kana_MA: c_uint = 0x4cf;
-pub const XK_kana_MI: c_uint = 0x4d0;
-pub const XK_kana_MU: c_uint = 0x4d1;
-pub const XK_kana_ME: c_uint = 0x4d2;
-pub const XK_kana_MO: c_uint = 0x4d3;
-pub const XK_kana_YA: c_uint = 0x4d4;
-pub const XK_kana_YU: c_uint = 0x4d5;
-pub const XK_kana_YO: c_uint = 0x4d6;
-pub const XK_kana_RA: c_uint = 0x4d7;
-pub const XK_kana_RI: c_uint = 0x4d8;
-pub const XK_kana_RU: c_uint = 0x4d9;
-pub const XK_kana_RE: c_uint = 0x4da;
-pub const XK_kana_RO: c_uint = 0x4db;
-pub const XK_kana_WA: c_uint = 0x4dc;
-pub const XK_kana_N: c_uint = 0x4dd;
-pub const XK_voicedsound: c_uint = 0x4de;
-pub const XK_semivoicedsound: c_uint = 0x4df;
-pub const XK_kana_switch: c_uint = 0xFF7E;
-pub const XK_Arabic_comma: c_uint = 0x5ac;
-pub const XK_Arabic_semicolon: c_uint = 0x5bb;
-pub const XK_Arabic_question_mark: c_uint = 0x5bf;
-pub const XK_Arabic_hamza: c_uint = 0x5c1;
-pub const XK_Arabic_maddaonalef: c_uint = 0x5c2;
-pub const XK_Arabic_hamzaonalef: c_uint = 0x5c3;
-pub const XK_Arabic_hamzaonwaw: c_uint = 0x5c4;
-pub const XK_Arabic_hamzaunderalef: c_uint = 0x5c5;
-pub const XK_Arabic_hamzaonyeh: c_uint = 0x5c6;
-pub const XK_Arabic_alef: c_uint = 0x5c7;
-pub const XK_Arabic_beh: c_uint = 0x5c8;
-pub const XK_Arabic_tehmarbuta: c_uint = 0x5c9;
-pub const XK_Arabic_teh: c_uint = 0x5ca;
-pub const XK_Arabic_theh: c_uint = 0x5cb;
-pub const XK_Arabic_jeem: c_uint = 0x5cc;
-pub const XK_Arabic_hah: c_uint = 0x5cd;
-pub const XK_Arabic_khah: c_uint = 0x5ce;
-pub const XK_Arabic_dal: c_uint = 0x5cf;
-pub const XK_Arabic_thal: c_uint = 0x5d0;
-pub const XK_Arabic_ra: c_uint = 0x5d1;
-pub const XK_Arabic_zain: c_uint = 0x5d2;
-pub const XK_Arabic_seen: c_uint = 0x5d3;
-pub const XK_Arabic_sheen: c_uint = 0x5d4;
-pub const XK_Arabic_sad: c_uint = 0x5d5;
-pub const XK_Arabic_dad: c_uint = 0x5d6;
-pub const XK_Arabic_tah: c_uint = 0x5d7;
-pub const XK_Arabic_zah: c_uint = 0x5d8;
-pub const XK_Arabic_ain: c_uint = 0x5d9;
-pub const XK_Arabic_ghain: c_uint = 0x5da;
-pub const XK_Arabic_tatweel: c_uint = 0x5e0;
-pub const XK_Arabic_feh: c_uint = 0x5e1;
-pub const XK_Arabic_qaf: c_uint = 0x5e2;
-pub const XK_Arabic_kaf: c_uint = 0x5e3;
-pub const XK_Arabic_lam: c_uint = 0x5e4;
-pub const XK_Arabic_meem: c_uint = 0x5e5;
-pub const XK_Arabic_noon: c_uint = 0x5e6;
-pub const XK_Arabic_ha: c_uint = 0x5e7;
-pub const XK_Arabic_heh: c_uint = 0x5e7;
-pub const XK_Arabic_waw: c_uint = 0x5e8;
-pub const XK_Arabic_alefmaksura: c_uint = 0x5e9;
-pub const XK_Arabic_yeh: c_uint = 0x5ea;
-pub const XK_Arabic_fathatan: c_uint = 0x5eb;
-pub const XK_Arabic_dammatan: c_uint = 0x5ec;
-pub const XK_Arabic_kasratan: c_uint = 0x5ed;
-pub const XK_Arabic_fatha: c_uint = 0x5ee;
-pub const XK_Arabic_damma: c_uint = 0x5ef;
-pub const XK_Arabic_kasra: c_uint = 0x5f0;
-pub const XK_Arabic_shadda: c_uint = 0x5f1;
-pub const XK_Arabic_sukun: c_uint = 0x5f2;
-pub const XK_Arabic_switch: c_uint = 0xFF7E;
-pub const XK_Serbian_dje: c_uint = 0x6a1;
-pub const XK_Macedonia_gje: c_uint = 0x6a2;
-pub const XK_Cyrillic_io: c_uint = 0x6a3;
-pub const XK_Ukrainian_ie: c_uint = 0x6a4;
-pub const XK_Ukranian_je: c_uint = 0x6a4;
-pub const XK_Macedonia_dse: c_uint = 0x6a5;
-pub const XK_Ukrainian_i: c_uint = 0x6a6;
-pub const XK_Ukranian_i: c_uint = 0x6a6;
-pub const XK_Ukrainian_yi: c_uint = 0x6a7;
-pub const XK_Ukranian_yi: c_uint = 0x6a7;
-pub const XK_Cyrillic_je: c_uint = 0x6a8;
-pub const XK_Serbian_je: c_uint = 0x6a8;
-pub const XK_Cyrillic_lje: c_uint = 0x6a9;
-pub const XK_Serbian_lje: c_uint = 0x6a9;
-pub const XK_Cyrillic_nje: c_uint = 0x6aa;
-pub const XK_Serbian_nje: c_uint = 0x6aa;
-pub const XK_Serbian_tshe: c_uint = 0x6ab;
-pub const XK_Macedonia_kje: c_uint = 0x6ac;
-pub const XK_Byelorussian_shortu: c_uint = 0x6ae;
-pub const XK_Cyrillic_dzhe: c_uint = 0x6af;
-pub const XK_Serbian_dze: c_uint = 0x6af;
-pub const XK_numerosign: c_uint = 0x6b0;
-pub const XK_Serbian_DJE: c_uint = 0x6b1;
-pub const XK_Macedonia_GJE: c_uint = 0x6b2;
-pub const XK_Cyrillic_IO: c_uint = 0x6b3;
-pub const XK_Ukrainian_IE: c_uint = 0x6b4;
-pub const XK_Ukranian_JE: c_uint = 0x6b4;
-pub const XK_Macedonia_DSE: c_uint = 0x6b5;
-pub const XK_Ukrainian_I: c_uint = 0x6b6;
-pub const XK_Ukranian_I: c_uint = 0x6b6;
-pub const XK_Ukrainian_YI: c_uint = 0x6b7;
-pub const XK_Ukranian_YI: c_uint = 0x6b7;
-pub const XK_Cyrillic_JE: c_uint = 0x6b8;
-pub const XK_Serbian_JE: c_uint = 0x6b8;
-pub const XK_Cyrillic_LJE: c_uint = 0x6b9;
-pub const XK_Serbian_LJE: c_uint = 0x6b9;
-pub const XK_Cyrillic_NJE: c_uint = 0x6ba;
-pub const XK_Serbian_NJE: c_uint = 0x6ba;
-pub const XK_Serbian_TSHE: c_uint = 0x6bb;
-pub const XK_Macedonia_KJE: c_uint = 0x6bc;
-pub const XK_Byelorussian_SHORTU: c_uint = 0x6be;
-pub const XK_Cyrillic_DZHE: c_uint = 0x6bf;
-pub const XK_Serbian_DZE: c_uint = 0x6bf;
-pub const XK_Cyrillic_yu: c_uint = 0x6c0;
-pub const XK_Cyrillic_a: c_uint = 0x6c1;
-pub const XK_Cyrillic_be: c_uint = 0x6c2;
-pub const XK_Cyrillic_tse: c_uint = 0x6c3;
-pub const XK_Cyrillic_de: c_uint = 0x6c4;
-pub const XK_Cyrillic_ie: c_uint = 0x6c5;
-pub const XK_Cyrillic_ef: c_uint = 0x6c6;
-pub const XK_Cyrillic_ghe: c_uint = 0x6c7;
-pub const XK_Cyrillic_ha: c_uint = 0x6c8;
-pub const XK_Cyrillic_i: c_uint = 0x6c9;
-pub const XK_Cyrillic_shorti: c_uint = 0x6ca;
-pub const XK_Cyrillic_ka: c_uint = 0x6cb;
-pub const XK_Cyrillic_el: c_uint = 0x6cc;
-pub const XK_Cyrillic_em: c_uint = 0x6cd;
-pub const XK_Cyrillic_en: c_uint = 0x6ce;
-pub const XK_Cyrillic_o: c_uint = 0x6cf;
-pub const XK_Cyrillic_pe: c_uint = 0x6d0;
-pub const XK_Cyrillic_ya: c_uint = 0x6d1;
-pub const XK_Cyrillic_er: c_uint = 0x6d2;
-pub const XK_Cyrillic_es: c_uint = 0x6d3;
-pub const XK_Cyrillic_te: c_uint = 0x6d4;
-pub const XK_Cyrillic_u: c_uint = 0x6d5;
-pub const XK_Cyrillic_zhe: c_uint = 0x6d6;
-pub const XK_Cyrillic_ve: c_uint = 0x6d7;
-pub const XK_Cyrillic_softsign: c_uint = 0x6d8;
-pub const XK_Cyrillic_yeru: c_uint = 0x6d9;
-pub const XK_Cyrillic_ze: c_uint = 0x6da;
-pub const XK_Cyrillic_sha: c_uint = 0x6db;
-pub const XK_Cyrillic_e: c_uint = 0x6dc;
-pub const XK_Cyrillic_shcha: c_uint = 0x6dd;
-pub const XK_Cyrillic_che: c_uint = 0x6de;
-pub const XK_Cyrillic_hardsign: c_uint = 0x6df;
-pub const XK_Cyrillic_YU: c_uint = 0x6e0;
-pub const XK_Cyrillic_A: c_uint = 0x6e1;
-pub const XK_Cyrillic_BE: c_uint = 0x6e2;
-pub const XK_Cyrillic_TSE: c_uint = 0x6e3;
-pub const XK_Cyrillic_DE: c_uint = 0x6e4;
-pub const XK_Cyrillic_IE: c_uint = 0x6e5;
-pub const XK_Cyrillic_EF: c_uint = 0x6e6;
-pub const XK_Cyrillic_GHE: c_uint = 0x6e7;
-pub const XK_Cyrillic_HA: c_uint = 0x6e8;
-pub const XK_Cyrillic_I: c_uint = 0x6e9;
-pub const XK_Cyrillic_SHORTI: c_uint = 0x6ea;
-pub const XK_Cyrillic_KA: c_uint = 0x6eb;
-pub const XK_Cyrillic_EL: c_uint = 0x6ec;
-pub const XK_Cyrillic_EM: c_uint = 0x6ed;
-pub const XK_Cyrillic_EN: c_uint = 0x6ee;
-pub const XK_Cyrillic_O: c_uint = 0x6ef;
-pub const XK_Cyrillic_PE: c_uint = 0x6f0;
-pub const XK_Cyrillic_YA: c_uint = 0x6f1;
-pub const XK_Cyrillic_ER: c_uint = 0x6f2;
-pub const XK_Cyrillic_ES: c_uint = 0x6f3;
-pub const XK_Cyrillic_TE: c_uint = 0x6f4;
-pub const XK_Cyrillic_U: c_uint = 0x6f5;
-pub const XK_Cyrillic_ZHE: c_uint = 0x6f6;
-pub const XK_Cyrillic_VE: c_uint = 0x6f7;
-pub const XK_Cyrillic_SOFTSIGN: c_uint = 0x6f8;
-pub const XK_Cyrillic_YERU: c_uint = 0x6f9;
-pub const XK_Cyrillic_ZE: c_uint = 0x6fa;
-pub const XK_Cyrillic_SHA: c_uint = 0x6fb;
-pub const XK_Cyrillic_E: c_uint = 0x6fc;
-pub const XK_Cyrillic_SHCHA: c_uint = 0x6fd;
-pub const XK_Cyrillic_CHE: c_uint = 0x6fe;
-pub const XK_Cyrillic_HARDSIGN: c_uint = 0x6ff;
-pub const XK_Greek_ALPHAaccent: c_uint = 0x7a1;
-pub const XK_Greek_EPSILONaccent: c_uint = 0x7a2;
-pub const XK_Greek_ETAaccent: c_uint = 0x7a3;
-pub const XK_Greek_IOTAaccent: c_uint = 0x7a4;
-pub const XK_Greek_IOTAdiaeresis: c_uint = 0x7a5;
-pub const XK_Greek_OMICRONaccent: c_uint = 0x7a7;
-pub const XK_Greek_UPSILONaccent: c_uint = 0x7a8;
-pub const XK_Greek_UPSILONdieresis: c_uint = 0x7a9;
-pub const XK_Greek_OMEGAaccent: c_uint = 0x7ab;
-pub const XK_Greek_accentdieresis: c_uint = 0x7ae;
-pub const XK_Greek_horizbar: c_uint = 0x7af;
-pub const XK_Greek_alphaaccent: c_uint = 0x7b1;
-pub const XK_Greek_epsilonaccent: c_uint = 0x7b2;
-pub const XK_Greek_etaaccent: c_uint = 0x7b3;
-pub const XK_Greek_iotaaccent: c_uint = 0x7b4;
-pub const XK_Greek_iotadieresis: c_uint = 0x7b5;
-pub const XK_Greek_iotaaccentdieresis: c_uint = 0x7b6;
-pub const XK_Greek_omicronaccent: c_uint = 0x7b7;
-pub const XK_Greek_upsilonaccent: c_uint = 0x7b8;
-pub const XK_Greek_upsilondieresis: c_uint = 0x7b9;
-pub const XK_Greek_upsilonaccentdieresis: c_uint = 0x7ba;
-pub const XK_Greek_omegaaccent: c_uint = 0x7bb;
-pub const XK_Greek_ALPHA: c_uint = 0x7c1;
-pub const XK_Greek_BETA: c_uint = 0x7c2;
-pub const XK_Greek_GAMMA: c_uint = 0x7c3;
-pub const XK_Greek_DELTA: c_uint = 0x7c4;
-pub const XK_Greek_EPSILON: c_uint = 0x7c5;
-pub const XK_Greek_ZETA: c_uint = 0x7c6;
-pub const XK_Greek_ETA: c_uint = 0x7c7;
-pub const XK_Greek_THETA: c_uint = 0x7c8;
-pub const XK_Greek_IOTA: c_uint = 0x7c9;
-pub const XK_Greek_KAPPA: c_uint = 0x7ca;
-pub const XK_Greek_LAMDA: c_uint = 0x7cb;
-pub const XK_Greek_LAMBDA: c_uint = 0x7cb;
-pub const XK_Greek_MU: c_uint = 0x7cc;
-pub const XK_Greek_NU: c_uint = 0x7cd;
-pub const XK_Greek_XI: c_uint = 0x7ce;
-pub const XK_Greek_OMICRON: c_uint = 0x7cf;
-pub const XK_Greek_PI: c_uint = 0x7d0;
-pub const XK_Greek_RHO: c_uint = 0x7d1;
-pub const XK_Greek_SIGMA: c_uint = 0x7d2;
-pub const XK_Greek_TAU: c_uint = 0x7d4;
-pub const XK_Greek_UPSILON: c_uint = 0x7d5;
-pub const XK_Greek_PHI: c_uint = 0x7d6;
-pub const XK_Greek_CHI: c_uint = 0x7d7;
-pub const XK_Greek_PSI: c_uint = 0x7d8;
-pub const XK_Greek_OMEGA: c_uint = 0x7d9;
-pub const XK_Greek_alpha: c_uint = 0x7e1;
-pub const XK_Greek_beta: c_uint = 0x7e2;
-pub const XK_Greek_gamma: c_uint = 0x7e3;
-pub const XK_Greek_delta: c_uint = 0x7e4;
-pub const XK_Greek_epsilon: c_uint = 0x7e5;
-pub const XK_Greek_zeta: c_uint = 0x7e6;
-pub const XK_Greek_eta: c_uint = 0x7e7;
-pub const XK_Greek_theta: c_uint = 0x7e8;
-pub const XK_Greek_iota: c_uint = 0x7e9;
-pub const XK_Greek_kappa: c_uint = 0x7ea;
-pub const XK_Greek_lamda: c_uint = 0x7eb;
-pub const XK_Greek_lambda: c_uint = 0x7eb;
-pub const XK_Greek_mu: c_uint = 0x7ec;
-pub const XK_Greek_nu: c_uint = 0x7ed;
-pub const XK_Greek_xi: c_uint = 0x7ee;
-pub const XK_Greek_omicron: c_uint = 0x7ef;
-pub const XK_Greek_pi: c_uint = 0x7f0;
-pub const XK_Greek_rho: c_uint = 0x7f1;
-pub const XK_Greek_sigma: c_uint = 0x7f2;
-pub const XK_Greek_finalsmallsigma: c_uint = 0x7f3;
-pub const XK_Greek_tau: c_uint = 0x7f4;
-pub const XK_Greek_upsilon: c_uint = 0x7f5;
-pub const XK_Greek_phi: c_uint = 0x7f6;
-pub const XK_Greek_chi: c_uint = 0x7f7;
-pub const XK_Greek_psi: c_uint = 0x7f8;
-pub const XK_Greek_omega: c_uint = 0x7f9;
-pub const XK_Greek_switch: c_uint = 0xFF7E;
-pub const XK_leftradical: c_uint = 0x8a1;
-pub const XK_topleftradical: c_uint = 0x8a2;
-pub const XK_horizconnector: c_uint = 0x8a3;
-pub const XK_topintegral: c_uint = 0x8a4;
-pub const XK_botintegral: c_uint = 0x8a5;
-pub const XK_vertconnector: c_uint = 0x8a6;
-pub const XK_topleftsqbracket: c_uint = 0x8a7;
-pub const XK_botleftsqbracket: c_uint = 0x8a8;
-pub const XK_toprightsqbracket: c_uint = 0x8a9;
-pub const XK_botrightsqbracket: c_uint = 0x8aa;
-pub const XK_topleftparens: c_uint = 0x8ab;
-pub const XK_botleftparens: c_uint = 0x8ac;
-pub const XK_toprightparens: c_uint = 0x8ad;
-pub const XK_botrightparens: c_uint = 0x8ae;
-pub const XK_leftmiddlecurlybrace: c_uint = 0x8af;
-pub const XK_rightmiddlecurlybrace: c_uint = 0x8b0;
-pub const XK_topleftsummation: c_uint = 0x8b1;
-pub const XK_botleftsummation: c_uint = 0x8b2;
-pub const XK_topvertsummationconnector: c_uint = 0x8b3;
-pub const XK_botvertsummationconnector: c_uint = 0x8b4;
-pub const XK_toprightsummation: c_uint = 0x8b5;
-pub const XK_botrightsummation: c_uint = 0x8b6;
-pub const XK_rightmiddlesummation: c_uint = 0x8b7;
-pub const XK_lessthanequal: c_uint = 0x8bc;
-pub const XK_notequal: c_uint = 0x8bd;
-pub const XK_greaterthanequal: c_uint = 0x8be;
-pub const XK_integral: c_uint = 0x8bf;
-pub const XK_therefore: c_uint = 0x8c0;
-pub const XK_variation: c_uint = 0x8c1;
-pub const XK_infinity: c_uint = 0x8c2;
-pub const XK_nabla: c_uint = 0x8c5;
-pub const XK_approximate: c_uint = 0x8c8;
-pub const XK_similarequal: c_uint = 0x8c9;
-pub const XK_ifonlyif: c_uint = 0x8cd;
-pub const XK_implies: c_uint = 0x8ce;
-pub const XK_identical: c_uint = 0x8cf;
-pub const XK_radical: c_uint = 0x8d6;
-pub const XK_includedin: c_uint = 0x8da;
-pub const XK_includes: c_uint = 0x8db;
-pub const XK_intersection: c_uint = 0x8dc;
-pub const XK_union: c_uint = 0x8dd;
-pub const XK_logicaland: c_uint = 0x8de;
-pub const XK_logicalor: c_uint = 0x8df;
-pub const XK_partialderivative: c_uint = 0x8ef;
-pub const XK_function: c_uint = 0x8f6;
-pub const XK_leftarrow: c_uint = 0x8fb;
-pub const XK_uparrow: c_uint = 0x8fc;
-pub const XK_rightarrow: c_uint = 0x8fd;
-pub const XK_downarrow: c_uint = 0x8fe;
-pub const XK_blank: c_uint = 0x9df;
-pub const XK_soliddiamond: c_uint = 0x9e0;
-pub const XK_checkerboard: c_uint = 0x9e1;
-pub const XK_ht: c_uint = 0x9e2;
-pub const XK_ff: c_uint = 0x9e3;
-pub const XK_cr: c_uint = 0x9e4;
-pub const XK_lf: c_uint = 0x9e5;
-pub const XK_nl: c_uint = 0x9e8;
-pub const XK_vt: c_uint = 0x9e9;
-pub const XK_lowrightcorner: c_uint = 0x9ea;
-pub const XK_uprightcorner: c_uint = 0x9eb;
-pub const XK_upleftcorner: c_uint = 0x9ec;
-pub const XK_lowleftcorner: c_uint = 0x9ed;
-pub const XK_crossinglines: c_uint = 0x9ee;
-pub const XK_horizlinescan1: c_uint = 0x9ef;
-pub const XK_horizlinescan3: c_uint = 0x9f0;
-pub const XK_horizlinescan5: c_uint = 0x9f1;
-pub const XK_horizlinescan7: c_uint = 0x9f2;
-pub const XK_horizlinescan9: c_uint = 0x9f3;
-pub const XK_leftt: c_uint = 0x9f4;
-pub const XK_rightt: c_uint = 0x9f5;
-pub const XK_bott: c_uint = 0x9f6;
-pub const XK_topt: c_uint = 0x9f7;
-pub const XK_vertbar: c_uint = 0x9f8;
-pub const XK_emspace: c_uint = 0xaa1;
-pub const XK_enspace: c_uint = 0xaa2;
-pub const XK_em3space: c_uint = 0xaa3;
-pub const XK_em4space: c_uint = 0xaa4;
-pub const XK_digitspace: c_uint = 0xaa5;
-pub const XK_punctspace: c_uint = 0xaa6;
-pub const XK_thinspace: c_uint = 0xaa7;
-pub const XK_hairspace: c_uint = 0xaa8;
-pub const XK_emdash: c_uint = 0xaa9;
-pub const XK_endash: c_uint = 0xaaa;
-pub const XK_signifblank: c_uint = 0xaac;
-pub const XK_ellipsis: c_uint = 0xaae;
-pub const XK_doubbaselinedot: c_uint = 0xaaf;
-pub const XK_onethird: c_uint = 0xab0;
-pub const XK_twothirds: c_uint = 0xab1;
-pub const XK_onefifth: c_uint = 0xab2;
-pub const XK_twofifths: c_uint = 0xab3;
-pub const XK_threefifths: c_uint = 0xab4;
-pub const XK_fourfifths: c_uint = 0xab5;
-pub const XK_onesixth: c_uint = 0xab6;
-pub const XK_fivesixths: c_uint = 0xab7;
-pub const XK_careof: c_uint = 0xab8;
-pub const XK_figdash: c_uint = 0xabb;
-pub const XK_leftanglebracket: c_uint = 0xabc;
-pub const XK_decimalpoint: c_uint = 0xabd;
-pub const XK_rightanglebracket: c_uint = 0xabe;
-pub const XK_marker: c_uint = 0xabf;
-pub const XK_oneeighth: c_uint = 0xac3;
-pub const XK_threeeighths: c_uint = 0xac4;
-pub const XK_fiveeighths: c_uint = 0xac5;
-pub const XK_seveneighths: c_uint = 0xac6;
-pub const XK_trademark: c_uint = 0xac9;
-pub const XK_signaturemark: c_uint = 0xaca;
-pub const XK_trademarkincircle: c_uint = 0xacb;
-pub const XK_leftopentriangle: c_uint = 0xacc;
-pub const XK_rightopentriangle: c_uint = 0xacd;
-pub const XK_emopencircle: c_uint = 0xace;
-pub const XK_emopenrectangle: c_uint = 0xacf;
-pub const XK_leftsinglequotemark: c_uint = 0xad0;
-pub const XK_rightsinglequotemark: c_uint = 0xad1;
-pub const XK_leftdoublequotemark: c_uint = 0xad2;
-pub const XK_rightdoublequotemark: c_uint = 0xad3;
-pub const XK_prescription: c_uint = 0xad4;
-pub const XK_minutes: c_uint = 0xad6;
-pub const XK_seconds: c_uint = 0xad7;
-pub const XK_latincross: c_uint = 0xad9;
-pub const XK_hexagram: c_uint = 0xada;
-pub const XK_filledrectbullet: c_uint = 0xadb;
-pub const XK_filledlefttribullet: c_uint = 0xadc;
-pub const XK_filledrighttribullet: c_uint = 0xadd;
-pub const XK_emfilledcircle: c_uint = 0xade;
-pub const XK_emfilledrect: c_uint = 0xadf;
-pub const XK_enopencircbullet: c_uint = 0xae0;
-pub const XK_enopensquarebullet: c_uint = 0xae1;
-pub const XK_openrectbullet: c_uint = 0xae2;
-pub const XK_opentribulletup: c_uint = 0xae3;
-pub const XK_opentribulletdown: c_uint = 0xae4;
-pub const XK_openstar: c_uint = 0xae5;
-pub const XK_enfilledcircbullet: c_uint = 0xae6;
-pub const XK_enfilledsqbullet: c_uint = 0xae7;
-pub const XK_filledtribulletup: c_uint = 0xae8;
-pub const XK_filledtribulletdown: c_uint = 0xae9;
-pub const XK_leftpointer: c_uint = 0xaea;
-pub const XK_rightpointer: c_uint = 0xaeb;
-pub const XK_club: c_uint = 0xaec;
-pub const XK_diamond: c_uint = 0xaed;
-pub const XK_heart: c_uint = 0xaee;
-pub const XK_maltesecross: c_uint = 0xaf0;
-pub const XK_dagger: c_uint = 0xaf1;
-pub const XK_doubledagger: c_uint = 0xaf2;
-pub const XK_checkmark: c_uint = 0xaf3;
-pub const XK_ballotcross: c_uint = 0xaf4;
-pub const XK_musicalsharp: c_uint = 0xaf5;
-pub const XK_musicalflat: c_uint = 0xaf6;
-pub const XK_malesymbol: c_uint = 0xaf7;
-pub const XK_femalesymbol: c_uint = 0xaf8;
-pub const XK_telephone: c_uint = 0xaf9;
-pub const XK_telephonerecorder: c_uint = 0xafa;
-pub const XK_phonographcopyright: c_uint = 0xafb;
-pub const XK_caret: c_uint = 0xafc;
-pub const XK_singlelowquotemark: c_uint = 0xafd;
-pub const XK_doublelowquotemark: c_uint = 0xafe;
-pub const XK_cursor: c_uint = 0xaff;
-pub const XK_leftcaret: c_uint = 0xba3;
-pub const XK_rightcaret: c_uint = 0xba6;
-pub const XK_downcaret: c_uint = 0xba8;
-pub const XK_upcaret: c_uint = 0xba9;
-pub const XK_overbar: c_uint = 0xbc0;
-pub const XK_downtack: c_uint = 0xbc2;
-pub const XK_upshoe: c_uint = 0xbc3;
-pub const XK_downstile: c_uint = 0xbc4;
-pub const XK_underbar: c_uint = 0xbc6;
-pub const XK_jot: c_uint = 0xbca;
-pub const XK_quad: c_uint = 0xbcc;
-pub const XK_uptack: c_uint = 0xbce;
-pub const XK_circle: c_uint = 0xbcf;
-pub const XK_upstile: c_uint = 0xbd3;
-pub const XK_downshoe: c_uint = 0xbd6;
-pub const XK_rightshoe: c_uint = 0xbd8;
-pub const XK_leftshoe: c_uint = 0xbda;
-pub const XK_lefttack: c_uint = 0xbdc;
-pub const XK_righttack: c_uint = 0xbfc;
-pub const XK_hebrew_doublelowline: c_uint = 0xcdf;
-pub const XK_hebrew_aleph: c_uint = 0xce0;
-pub const XK_hebrew_bet: c_uint = 0xce1;
-pub const XK_hebrew_beth: c_uint = 0xce1;
-pub const XK_hebrew_gimel: c_uint = 0xce2;
-pub const XK_hebrew_gimmel: c_uint = 0xce2;
-pub const XK_hebrew_dalet: c_uint = 0xce3;
-pub const XK_hebrew_daleth: c_uint = 0xce3;
-pub const XK_hebrew_he: c_uint = 0xce4;
-pub const XK_hebrew_waw: c_uint = 0xce5;
-pub const XK_hebrew_zain: c_uint = 0xce6;
-pub const XK_hebrew_zayin: c_uint = 0xce6;
-pub const XK_hebrew_chet: c_uint = 0xce7;
-pub const XK_hebrew_het: c_uint = 0xce7;
-pub const XK_hebrew_tet: c_uint = 0xce8;
-pub const XK_hebrew_teth: c_uint = 0xce8;
-pub const XK_hebrew_yod: c_uint = 0xce9;
-pub const XK_hebrew_finalkaph: c_uint = 0xcea;
-pub const XK_hebrew_kaph: c_uint = 0xceb;
-pub const XK_hebrew_lamed: c_uint = 0xcec;
-pub const XK_hebrew_finalmem: c_uint = 0xced;
-pub const XK_hebrew_mem: c_uint = 0xcee;
-pub const XK_hebrew_finalnun: c_uint = 0xcef;
-pub const XK_hebrew_nun: c_uint = 0xcf0;
-pub const XK_hebrew_samech: c_uint = 0xcf1;
-pub const XK_hebrew_samekh: c_uint = 0xcf1;
-pub const XK_hebrew_ayin: c_uint = 0xcf2;
-pub const XK_hebrew_finalpe: c_uint = 0xcf3;
-pub const XK_hebrew_pe: c_uint = 0xcf4;
-pub const XK_hebrew_finalzade: c_uint = 0xcf5;
-pub const XK_hebrew_finalzadi: c_uint = 0xcf5;
-pub const XK_hebrew_zade: c_uint = 0xcf6;
-pub const XK_hebrew_zadi: c_uint = 0xcf6;
-pub const XK_hebrew_qoph: c_uint = 0xcf7;
-pub const XK_hebrew_kuf: c_uint = 0xcf7;
-pub const XK_hebrew_resh: c_uint = 0xcf8;
-pub const XK_hebrew_shin: c_uint = 0xcf9;
-pub const XK_hebrew_taw: c_uint = 0xcfa;
-pub const XK_hebrew_taf: c_uint = 0xcfa;
-pub const XK_Hebrew_switch: c_uint = 0xFF7E;
-
-pub const XF86XK_ModeLock: c_uint = 0x1008FF01;
-pub const XF86XK_MonBrightnessUp: c_uint = 0x1008FF02;
-pub const XF86XK_MonBrightnessDown: c_uint = 0x1008FF03;
-pub const XF86XK_KbdLightOnOff: c_uint = 0x1008FF04;
-pub const XF86XK_KbdBrightnessUp: c_uint = 0x1008FF05;
-pub const XF86XK_KbdBrightnessDown: c_uint = 0x1008FF06;
-pub const XF86XK_Standby: c_uint = 0x1008FF10;
-pub const XF86XK_AudioLowerVolume: c_uint = 0x1008FF11;
-pub const XF86XK_AudioMute: c_uint = 0x1008FF12;
-pub const XF86XK_AudioRaiseVolume: c_uint = 0x1008FF13;
-pub const XF86XK_AudioPlay: c_uint = 0x1008FF14;
-pub const XF86XK_AudioStop: c_uint = 0x1008FF15;
-pub const XF86XK_AudioPrev: c_uint = 0x1008FF16;
-pub const XF86XK_AudioNext: c_uint = 0x1008FF17;
-pub const XF86XK_HomePage: c_uint = 0x1008FF18;
-pub const XF86XK_Mail: c_uint = 0x1008FF19;
-pub const XF86XK_Start: c_uint = 0x1008FF1A;
-pub const XF86XK_Search: c_uint = 0x1008FF1B;
-pub const XF86XK_AudioRecord: c_uint = 0x1008FF1C;
-pub const XF86XK_Calculator: c_uint = 0x1008FF1D;
-pub const XF86XK_Memo: c_uint = 0x1008FF1E;
-pub const XF86XK_ToDoList: c_uint = 0x1008FF1F;
-pub const XF86XK_Calendar: c_uint = 0x1008FF20;
-pub const XF86XK_PowerDown: c_uint = 0x1008FF21;
-pub const XF86XK_ContrastAdjust: c_uint = 0x1008FF22;
-pub const XF86XK_RockerUp: c_uint = 0x1008FF23;
-pub const XF86XK_RockerDown: c_uint = 0x1008FF24;
-pub const XF86XK_RockerEnter: c_uint = 0x1008FF25;
-pub const XF86XK_Back: c_uint = 0x1008FF26;
-pub const XF86XK_Forward: c_uint = 0x1008FF27;
-pub const XF86XK_Stop: c_uint = 0x1008FF28;
-pub const XF86XK_Refresh: c_uint = 0x1008FF29;
-pub const XF86XK_PowerOff: c_uint = 0x1008FF2A;
-pub const XF86XK_WakeUp: c_uint = 0x1008FF2B;
-pub const XF86XK_Eject: c_uint = 0x1008FF2C;
-pub const XF86XK_ScreenSaver: c_uint = 0x1008FF2D;
-pub const XF86XK_WWW: c_uint = 0x1008FF2E;
-pub const XF86XK_Sleep: c_uint = 0x1008FF2F;
-pub const XF86XK_Favorites: c_uint = 0x1008FF30;
-pub const XF86XK_AudioPause: c_uint = 0x1008FF31;
-pub const XF86XK_AudioMedia: c_uint = 0x1008FF32;
-pub const XF86XK_MyComputer: c_uint = 0x1008FF33;
-pub const XF86XK_VendorHome: c_uint = 0x1008FF34;
-pub const XF86XK_LightBulb: c_uint = 0x1008FF35;
-pub const XF86XK_Shop: c_uint = 0x1008FF36;
-pub const XF86XK_History: c_uint = 0x1008FF37;
-pub const XF86XK_OpenURL: c_uint = 0x1008FF38;
-pub const XF86XK_AddFavorite: c_uint = 0x1008FF39;
-pub const XF86XK_HotLinks: c_uint = 0x1008FF3A;
-pub const XF86XK_BrightnessAdjust: c_uint = 0x1008FF3B;
-pub const XF86XK_Finance: c_uint = 0x1008FF3C;
-pub const XF86XK_Community: c_uint = 0x1008FF3D;
-pub const XF86XK_AudioRewind: c_uint = 0x1008FF3E;
-pub const XF86XK_BackForward: c_uint = 0x1008FF3F;
-pub const XF86XK_Launch0: c_uint = 0x1008FF40;
-pub const XF86XK_Launch1: c_uint = 0x1008FF41;
-pub const XF86XK_Launch2: c_uint = 0x1008FF42;
-pub const XF86XK_Launch3: c_uint = 0x1008FF43;
-pub const XF86XK_Launch4: c_uint = 0x1008FF44;
-pub const XF86XK_Launch5: c_uint = 0x1008FF45;
-pub const XF86XK_Launch6: c_uint = 0x1008FF46;
-pub const XF86XK_Launch7: c_uint = 0x1008FF47;
-pub const XF86XK_Launch8: c_uint = 0x1008FF48;
-pub const XF86XK_Launch9: c_uint = 0x1008FF49;
-pub const XF86XK_LaunchA: c_uint = 0x1008FF4A;
-pub const XF86XK_LaunchB: c_uint = 0x1008FF4B;
-pub const XF86XK_LaunchC: c_uint = 0x1008FF4C;
-pub const XF86XK_LaunchD: c_uint = 0x1008FF4D;
-pub const XF86XK_LaunchE: c_uint = 0x1008FF4E;
-pub const XF86XK_LaunchF: c_uint = 0x1008FF4F;
-pub const XF86XK_ApplicationLeft: c_uint = 0x1008FF50;
-pub const XF86XK_ApplicationRight: c_uint = 0x1008FF51;
-pub const XF86XK_Book: c_uint = 0x1008FF52;
-pub const XF86XK_CD: c_uint = 0x1008FF53;
-pub const XF86XK_Calculater: c_uint = 0x1008FF54;
-pub const XF86XK_Clear: c_uint = 0x1008FF55;
-pub const XF86XK_Close: c_uint = 0x1008FF56;
-pub const XF86XK_Copy: c_uint = 0x1008FF57;
-pub const XF86XK_Cut: c_uint = 0x1008FF58;
-pub const XF86XK_Display: c_uint = 0x1008FF59;
-pub const XF86XK_DOS: c_uint = 0x1008FF5A;
-pub const XF86XK_Documents: c_uint = 0x1008FF5B;
-pub const XF86XK_Excel: c_uint = 0x1008FF5C;
-pub const XF86XK_Explorer: c_uint = 0x1008FF5D;
-pub const XF86XK_Game: c_uint = 0x1008FF5E;
-pub const XF86XK_Go: c_uint = 0x1008FF5F;
-pub const XF86XK_iTouch: c_uint = 0x1008FF60;
-pub const XF86XK_LogOff: c_uint = 0x1008FF61;
-pub const XF86XK_Market: c_uint = 0x1008FF62;
-pub const XF86XK_Meeting: c_uint = 0x1008FF63;
-pub const XF86XK_MenuKB: c_uint = 0x1008FF65;
-pub const XF86XK_MenuPB: c_uint = 0x1008FF66;
-pub const XF86XK_MySites: c_uint = 0x1008FF67;
-pub const XF86XK_New: c_uint = 0x1008FF68;
-pub const XF86XK_News: c_uint = 0x1008FF69;
-pub const XF86XK_OfficeHome: c_uint = 0x1008FF6A;
-pub const XF86XK_Open: c_uint = 0x1008FF6B;
-pub const XF86XK_Option: c_uint = 0x1008FF6C;
-pub const XF86XK_Paste: c_uint = 0x1008FF6D;
-pub const XF86XK_Phone: c_uint = 0x1008FF6E;
-pub const XF86XK_Q: c_uint = 0x1008FF70;
-pub const XF86XK_Reply: c_uint = 0x1008FF72;
-pub const XF86XK_Reload: c_uint = 0x1008FF73;
-pub const XF86XK_RotateWindows: c_uint = 0x1008FF74;
-pub const XF86XK_RotationPB: c_uint = 0x1008FF75;
-pub const XF86XK_RotationKB: c_uint = 0x1008FF76;
-pub const XF86XK_Save: c_uint = 0x1008FF77;
-pub const XF86XK_ScrollUp: c_uint = 0x1008FF78;
-pub const XF86XK_ScrollDown: c_uint = 0x1008FF79;
-pub const XF86XK_ScrollClick: c_uint = 0x1008FF7A;
-pub const XF86XK_Send: c_uint = 0x1008FF7B;
-pub const XF86XK_Spell: c_uint = 0x1008FF7C;
-pub const XF86XK_SplitScreen: c_uint = 0x1008FF7D;
-pub const XF86XK_Support: c_uint = 0x1008FF7E;
-pub const XF86XK_TaskPane: c_uint = 0x1008FF7F;
-pub const XF86XK_Terminal: c_uint = 0x1008FF80;
-pub const XF86XK_Tools: c_uint = 0x1008FF81;
-pub const XF86XK_Travel: c_uint = 0x1008FF82;
-pub const XF86XK_UserPB: c_uint = 0x1008FF84;
-pub const XF86XK_User1KB: c_uint = 0x1008FF85;
-pub const XF86XK_User2KB: c_uint = 0x1008FF86;
-pub const XF86XK_Video: c_uint = 0x1008FF87;
-pub const XF86XK_WheelButton: c_uint = 0x1008FF88;
-pub const XF86XK_Word: c_uint = 0x1008FF89;
-pub const XF86XK_Xfer: c_uint = 0x1008FF8A;
-pub const XF86XK_ZoomIn: c_uint = 0x1008FF8B;
-pub const XF86XK_ZoomOut: c_uint = 0x1008FF8C;
-pub const XF86XK_Away: c_uint = 0x1008FF8D;
-pub const XF86XK_Messenger: c_uint = 0x1008FF8E;
-pub const XF86XK_WebCam: c_uint = 0x1008FF8F;
-pub const XF86XK_MailForward: c_uint = 0x1008FF90;
-pub const XF86XK_Pictures: c_uint = 0x1008FF91;
-pub const XF86XK_Music: c_uint = 0x1008FF92;
-pub const XF86XK_Battery: c_uint = 0x1008FF93;
-pub const XF86XK_Bluetooth: c_uint = 0x1008FF94;
-pub const XF86XK_WLAN: c_uint = 0x1008FF95;
-pub const XF86XK_UWB: c_uint = 0x1008FF96;
-pub const XF86XK_AudioForward: c_uint = 0x1008FF97;
-pub const XF86XK_AudioRepeat: c_uint = 0x1008FF98;
-pub const XF86XK_AudioRandomPlay: c_uint = 0x1008FF99;
-pub const XF86XK_Subtitle: c_uint = 0x1008FF9A;
-pub const XF86XK_AudioCycleTrack: c_uint = 0x1008FF9B;
-pub const XF86XK_CycleAngle: c_uint = 0x1008FF9C;
-pub const XF86XK_FrameBack: c_uint = 0x1008FF9D;
-pub const XF86XK_FrameForward: c_uint = 0x1008FF9E;
-pub const XF86XK_Time: c_uint = 0x1008FF9F;
-pub const XF86XK_Select: c_uint = 0x1008FFA0;
-pub const XF86XK_View: c_uint = 0x1008FFA1;
-pub const XF86XK_TopMenu: c_uint = 0x1008FFA2;
-pub const XF86XK_Red: c_uint = 0x1008FFA3;
-pub const XF86XK_Green: c_uint = 0x1008FFA4;
-pub const XF86XK_Yellow: c_uint = 0x1008FFA5;
-pub const XF86XK_Blue: c_uint = 0x1008FFA6;
-pub const XF86XK_Suspend: c_uint = 0x1008FFA7;
-pub const XF86XK_Hibernate: c_uint = 0x1008FFA8;
-pub const XF86XK_TouchpadToggle: c_uint = 0x1008FFA9;
-pub const XF86XK_TouchpadOn: c_uint = 0x1008FFB0;
-pub const XF86XK_TouchpadOff: c_uint = 0x1008FFB1;
-pub const XF86XK_AudioMicMute: c_uint = 0x1008FFB2;
-pub const XF86XK_Switch_VT_1: c_uint = 0x1008FE01;
-pub const XF86XK_Switch_VT_2: c_uint = 0x1008FE02;
-pub const XF86XK_Switch_VT_3: c_uint = 0x1008FE03;
-pub const XF86XK_Switch_VT_4: c_uint = 0x1008FE04;
-pub const XF86XK_Switch_VT_5: c_uint = 0x1008FE05;
-pub const XF86XK_Switch_VT_6: c_uint = 0x1008FE06;
-pub const XF86XK_Switch_VT_7: c_uint = 0x1008FE07;
-pub const XF86XK_Switch_VT_8: c_uint = 0x1008FE08;
-pub const XF86XK_Switch_VT_9: c_uint = 0x1008FE09;
-pub const XF86XK_Switch_VT_10: c_uint = 0x1008FE0A;
-pub const XF86XK_Switch_VT_11: c_uint = 0x1008FE0B;
-pub const XF86XK_Switch_VT_12: c_uint = 0x1008FE0C;
-pub const XF86XK_Ungrab: c_uint = 0x1008FE20;
-pub const XF86XK_ClearGrab: c_uint = 0x1008FE21;
-pub const XF86XK_Next_VMode: c_uint = 0x1008FE22;
-pub const XF86XK_Prev_VMode: c_uint = 0x1008FE23;
-pub const XF86XK_LogWindowTree: c_uint = 0x1008FE24;
-pub const XF86XK_LogGrabInfo: c_uint = 0x1008FE25;
-
-pub const XK_ISO_Lock: c_uint = 0xfe01;
-pub const XK_ISO_Level2_Latch: c_uint = 0xfe02;
-pub const XK_ISO_Level3_Shift: c_uint = 0xfe03;
-pub const XK_ISO_Level3_Latch: c_uint = 0xfe04;
-pub const XK_ISO_Level3_Lock: c_uint = 0xfe05;
-pub const XK_ISO_Level5_Shift: c_uint = 0xfe11;
-pub const XK_ISO_Level5_Latch: c_uint = 0xfe12;
-pub const XK_ISO_Level5_Lock: c_uint = 0xfe13;
-pub const XK_ISO_Group_Shift: c_uint = 0xff7e;
-pub const XK_ISO_Group_Latch: c_uint = 0xfe06;
-pub const XK_ISO_Group_Lock: c_uint = 0xfe07;
-pub const XK_ISO_Next_Group: c_uint = 0xfe08;
-pub const XK_ISO_Next_Group_Lock: c_uint = 0xfe09;
-pub const XK_ISO_Prev_Group: c_uint = 0xfe0a;
-pub const XK_ISO_Prev_Group_Lock: c_uint = 0xfe0b;
-pub const XK_ISO_First_Group: c_uint = 0xfe0c;
-pub const XK_ISO_First_Group_Lock: c_uint = 0xfe0d;
-pub const XK_ISO_Last_Group: c_uint = 0xfe0e;
-pub const XK_ISO_Last_Group_Lock: c_uint = 0xfe0f;
-
-pub const XK_ISO_Left_Tab: c_uint = 0xfe20;
-pub const XK_ISO_Move_Line_Up: c_uint = 0xfe21;
-pub const XK_ISO_Move_Line_Down: c_uint = 0xfe22;
-pub const XK_ISO_Partial_Line_Up: c_uint = 0xfe23;
-pub const XK_ISO_Partial_Line_Down: c_uint = 0xfe24;
-pub const XK_ISO_Partial_Space_Left: c_uint = 0xfe25;
-pub const XK_ISO_Partial_Space_Right: c_uint = 0xfe26;
-pub const XK_ISO_Set_Margin_Left: c_uint = 0xfe27;
-pub const XK_ISO_Set_Margin_Right: c_uint = 0xfe28;
-pub const XK_ISO_Release_Margin_Left: c_uint = 0xfe29;
-pub const XK_ISO_Release_Margin_Right: c_uint = 0xfe2a;
-pub const XK_ISO_Release_Both_Margins: c_uint = 0xfe2b;
-pub const XK_ISO_Fast_Cursor_Left: c_uint = 0xfe2c;
-pub const XK_ISO_Fast_Cursor_Right: c_uint = 0xfe2d;
-pub const XK_ISO_Fast_Cursor_Up: c_uint = 0xfe2e;
-pub const XK_ISO_Fast_Cursor_Down: c_uint = 0xfe2f;
-pub const XK_ISO_Continuous_Underline: c_uint = 0xfe30;
-pub const XK_ISO_Discontinuous_Underline: c_uint = 0xfe31;
-pub const XK_ISO_Emphasize: c_uint = 0xfe32;
-pub const XK_ISO_Center_Object: c_uint = 0xfe33;
-pub const XK_ISO_Enter: c_uint = 0xfe34;
-
-pub const XK_dead_grave: c_uint = 0xfe50;
-pub const XK_dead_acute: c_uint = 0xfe51;
-pub const XK_dead_circumflex: c_uint = 0xfe52;
-pub const XK_dead_tilde: c_uint = 0xfe53;
-pub const XK_dead_perispomeni: c_uint = 0xfe53;
-pub const XK_dead_macron: c_uint = 0xfe54;
-pub const XK_dead_breve: c_uint = 0xfe55;
-pub const XK_dead_abovedot: c_uint = 0xfe56;
-pub const XK_dead_diaeresis: c_uint = 0xfe57;
-pub const XK_dead_abovering: c_uint = 0xfe58;
-pub const XK_dead_doubleacute: c_uint = 0xfe59;
-pub const XK_dead_caron: c_uint = 0xfe5a;
-pub const XK_dead_cedilla: c_uint = 0xfe5b;
-pub const XK_dead_ogonek: c_uint = 0xfe5c;
-pub const XK_dead_iota: c_uint = 0xfe5d;
-pub const XK_dead_voiced_sound: c_uint = 0xfe5e;
-pub const XK_dead_semivoiced_sound: c_uint = 0xfe5f;
-pub const XK_dead_belowdot: c_uint = 0xfe60;
-pub const XK_dead_hook: c_uint = 0xfe61;
-pub const XK_dead_horn: c_uint = 0xfe62;
-pub const XK_dead_stroke: c_uint = 0xfe63;
-pub const XK_dead_abovecomma: c_uint = 0xfe64;
-pub const XK_dead_psili: c_uint = 0xfe64;
-pub const XK_dead_abovereversedcomma: c_uint = 0xfe65;
-pub const XK_dead_dasia: c_uint = 0xfe65;
-pub const XK_dead_doublegrave: c_uint = 0xfe66;
-pub const XK_dead_belowring: c_uint = 0xfe67;
-pub const XK_dead_belowmacron: c_uint = 0xfe68;
-pub const XK_dead_belowcircumflex: c_uint = 0xfe69;
-pub const XK_dead_belowtilde: c_uint = 0xfe6a;
-pub const XK_dead_belowbreve: c_uint = 0xfe6b;
-pub const XK_dead_belowdiaeresis: c_uint = 0xfe6c;
-pub const XK_dead_invertedbreve: c_uint = 0xfe6d;
-pub const XK_dead_belowcomma: c_uint = 0xfe6e;
-pub const XK_dead_currency: c_uint = 0xfe6f;
-
-pub const XK_dead_lowline: c_uint = 0xfe90;
-pub const XK_dead_aboveverticalline: c_uint = 0xfe91;
-pub const XK_dead_belowverticalline: c_uint = 0xfe92;
-pub const XK_dead_longsolidusoverlay: c_uint = 0xfe93;
-
-pub const XK_dead_a: c_uint = 0xfe80;
-pub const XK_dead_A: c_uint = 0xfe81;
-pub const XK_dead_e: c_uint = 0xfe82;
-pub const XK_dead_E: c_uint = 0xfe83;
-pub const XK_dead_i: c_uint = 0xfe84;
-pub const XK_dead_I: c_uint = 0xfe85;
-pub const XK_dead_o: c_uint = 0xfe86;
-pub const XK_dead_O: c_uint = 0xfe87;
-pub const XK_dead_u: c_uint = 0xfe88;
-pub const XK_dead_U: c_uint = 0xfe89;
-pub const XK_dead_small_schwa: c_uint = 0xfe8a;
-pub const XK_dead_capital_schwa: c_uint = 0xfe8b;
-
-pub const XK_dead_greek: c_uint = 0xfe8c;
-
-pub const XK_First_Virtual_Screen: c_uint = 0xfed0;
-pub const XK_Prev_Virtual_Screen: c_uint = 0xfed1;
-pub const XK_Next_Virtual_Screen: c_uint = 0xfed2;
-pub const XK_Last_Virtual_Screen: c_uint = 0xfed4;
-pub const XK_Terminate_Server: c_uint = 0xfed5;
-
-pub const XK_AccessX_Enable: c_uint = 0xfe70;
-pub const XK_AccessX_Feedback_Enable: c_uint = 0xfe71;
-pub const XK_RepeatKeys_Enable: c_uint = 0xfe72;
-pub const XK_SlowKeys_Enable: c_uint = 0xfe73;
-pub const XK_BounceKeys_Enable: c_uint = 0xfe74;
-pub const XK_StickyKeys_Enable: c_uint = 0xfe75;
-pub const XK_MouseKeys_Enable: c_uint = 0xfe76;
-pub const XK_MouseKeys_Accel_Enable: c_uint = 0xfe77;
-pub const XK_Overlay1_Enable: c_uint = 0xfe78;
-pub const XK_Overlay2_Enable: c_uint = 0xfe79;
-pub const XK_AudibleBell_Enable: c_uint = 0xfe7a;
-
-pub const XK_Pointer_Left: c_uint = 0xfee0;
-pub const XK_Pointer_Right: c_uint = 0xfee1;
-pub const XK_Pointer_Up: c_uint = 0xfee2;
-pub const XK_Pointer_Down: c_uint = 0xfee3;
-pub const XK_Pointer_UpLeft: c_uint = 0xfee4;
-pub const XK_Pointer_UpRight: c_uint = 0xfee5;
-pub const XK_Pointer_DownLeft: c_uint = 0xfee6;
-pub const XK_Pointer_DownRight: c_uint = 0xfee7;
-pub const XK_Pointer_Button_Dflt: c_uint = 0xfee8;
-pub const XK_Pointer_Button1: c_uint = 0xfee9;
-pub const XK_Pointer_Button2: c_uint = 0xfeea;
-pub const XK_Pointer_Button3: c_uint = 0xfeeb;
-pub const XK_Pointer_Button4: c_uint = 0xfeec;
-pub const XK_Pointer_Button5: c_uint = 0xfeed;
-pub const XK_Pointer_DblClick_Dflt: c_uint = 0xfeee;
-pub const XK_Pointer_DblClick1: c_uint = 0xfeef;
-pub const XK_Pointer_DblClick2: c_uint = 0xfef0;
-pub const XK_Pointer_DblClick3: c_uint = 0xfef1;
-pub const XK_Pointer_DblClick4: c_uint = 0xfef2;
-pub const XK_Pointer_DblClick5: c_uint = 0xfef3;
-pub const XK_Pointer_Drag_Dflt: c_uint = 0xfef4;
-pub const XK_Pointer_Drag1: c_uint = 0xfef5;
-pub const XK_Pointer_Drag2: c_uint = 0xfef6;
-pub const XK_Pointer_Drag3: c_uint = 0xfef7;
-pub const XK_Pointer_Drag4: c_uint = 0xfef8;
-pub const XK_Pointer_Drag5: c_uint = 0xfefd;
-
-pub const XK_Pointer_EnableKeys: c_uint = 0xfef9;
-pub const XK_Pointer_Accelerate: c_uint = 0xfefa;
-pub const XK_Pointer_DfltBtnNext: c_uint = 0xfefb;
-pub const XK_Pointer_DfltBtnPrev: c_uint = 0xfefc;
-
-pub const XK_ch: c_uint = 0xfea0;
-pub const XK_Ch: c_uint = 0xfea1;
-pub const XK_CH: c_uint = 0xfea2;
-pub const XK_c_h: c_uint = 0xfea3;
-pub const XK_C_h: c_uint = 0xfea4;
-pub const XK_C_H: c_uint = 0xfea5;
deleted file mode 100644
--- a/third_party/rust/x11/src/lib.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-#![allow(non_camel_case_types)]
-#![allow(non_snake_case)]
-#![allow(non_upper_case_globals)]
-#![allow(improper_ctypes)]
-
-extern crate libc;
-
-#[macro_use]
-mod link;
-mod internal;
-
-#[macro_use]
-pub mod xlib;
-
-pub mod dpms;
-pub mod glx;
-pub mod keysym;
-pub mod xcursor;
-pub mod xf86vmode;
-pub mod xfixes;
-pub mod xft;
-pub mod xinerama;
-pub mod xinput;
-pub mod xinput2;
-pub mod xmd;
-pub mod xmu;
-pub mod xrandr;
-pub mod xrecord;
-pub mod xrender;
-pub mod xss;
-pub mod xt;
-pub mod xtest;
-pub mod xlib_xcb;
deleted file mode 100644
--- a/third_party/rust/x11/src/link.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-macro_rules! x11_link {
- { $struct_name:ident, $pkg_name:expr, [$($lib_name:expr),*], $nsyms:expr,
- $(pub fn $fn_name:ident ($($param_name:ident : $param_type:ty),*) -> $ret_type:ty,)*
- variadic:
- $(pub fn $vfn_name:ident ($($vparam_name: ident : $vparam_type:ty),+) -> $vret_type:ty,)*
- globals:
- $(pub static $var_name:ident : $var_type:ty,)*
- } => {
- extern "C" {
- $(pub fn $fn_name ($($param_name : $param_type),*) -> $ret_type;)*
- $(pub fn $vfn_name ($($vparam_name : $vparam_type),+, ...) -> $vret_type;)*
- }
-
- extern {
- $(pub static $var_name : $var_type;)*
- }
- }
-}
deleted file mode 100644
--- a/third_party/rust/x11/src/xcursor.rs
+++ /dev/null
@@ -1,211 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::{
- c_char,
- c_int,
- c_long,
- c_uchar,
- c_uint,
- c_ulong,
- c_void,
-};
-use libc::FILE;
-
-use ::xlib::{
- Cursor,
- Display,
- XColor,
- XImage,
-};
-
-
-//
-// functions
-//
-
-
-x11_link! { Xcursor, xcursor, ["libXcursor.so.1", "libXcursor.so"], 59,
- pub fn XcursorAnimateCreate (_1: *mut XcursorCursors) -> *mut XcursorAnimate,
- pub fn XcursorAnimateDestroy (_1: *mut XcursorAnimate) -> (),
- pub fn XcursorAnimateNext (_1: *mut XcursorAnimate) -> c_ulong,
- pub fn XcursorCommentCreate (_2: c_uint, _1: c_int) -> *mut XcursorComment,
- pub fn XcursorCommentDestroy (_1: *mut XcursorComment) -> (),
- pub fn XcursorCommentsCreate (_1: c_int) -> *mut XcursorComments,
- pub fn XcursorCommentsDestroy (_1: *mut XcursorComments) -> (),
- pub fn XcursorCursorsCreate (_2: *mut Display, _1: c_int) -> *mut XcursorCursors,
- pub fn XcursorCursorsDestroy (_1: *mut XcursorCursors) -> (),
- pub fn XcursorFileLoad (_3: *mut FILE, _2: *mut *mut XcursorComments, _1: *mut *mut XcursorImages) -> c_int,
- pub fn XcursorFileLoadAllImages (_1: *mut FILE) -> *mut XcursorImages,
- pub fn XcursorFileLoadImage (_2: *mut FILE, _1: c_int) -> *mut XcursorImage,
- pub fn XcursorFileLoadImages (_2: *mut FILE, _1: c_int) -> *mut XcursorImages,
- pub fn XcursorFilenameLoad (_3: *const c_char, _2: *mut *mut XcursorComments, _1: *mut *mut XcursorImages) -> c_int,
- pub fn XcursorFilenameLoadAllImages (_1: *const c_char) -> *mut XcursorImages,
- pub fn XcursorFilenameLoadCursor (_2: *mut Display, _1: *const c_char) -> c_ulong,
- pub fn XcursorFilenameLoadCursors (_2: *mut Display, _1: *const c_char) -> *mut XcursorCursors,
- pub fn XcursorFilenameLoadImage (_2: *const c_char, _1: c_int) -> *mut XcursorImage,
- pub fn XcursorFilenameLoadImages (_2: *const c_char, _1: c_int) -> *mut XcursorImages,
- pub fn XcursorFilenameSave (_3: *const c_char, _2: *const XcursorComments, _1: *const XcursorImages) -> c_int,
- pub fn XcursorFilenameSaveImages (_2: *const c_char, _1: *const XcursorImages) -> c_int,
- pub fn XcursorFileSave (_3: *mut FILE, _2: *const XcursorComments, _1: *const XcursorImages) -> c_int,
- pub fn XcursorFileSaveImages (_2: *mut FILE, _1: *const XcursorImages) -> c_int,
- pub fn XcursorGetDefaultSize (_1: *mut Display) -> c_int,
- pub fn XcursorGetTheme (_1: *mut Display) -> *mut c_char,
- pub fn XcursorGetThemeCore (_1: *mut Display) -> c_int,
- pub fn XcursorImageCreate (_2: c_int, _1: c_int) -> *mut XcursorImage,
- pub fn XcursorImageDestroy (_1: *mut XcursorImage) -> (),
- pub fn XcursorImageHash (_2: *mut XImage, _1: *mut c_uchar) -> (),
- pub fn XcursorImageLoadCursor (_2: *mut Display, _1: *const XcursorImage) -> c_ulong,
- pub fn XcursorImagesCreate (_1: c_int) -> *mut XcursorImages,
- pub fn XcursorImagesDestroy (_1: *mut XcursorImages) -> (),
- pub fn XcursorImagesLoadCursor (_2: *mut Display, _1: *const XcursorImages) -> c_ulong,
- pub fn XcursorImagesLoadCursors (_2: *mut Display, _1: *const XcursorImages) -> *mut XcursorCursors,
- pub fn XcursorImagesSetName (_2: *mut XcursorImages, _1: *const c_char) -> (),
- pub fn XcursorLibraryLoadCursor (_2: *mut Display, _1: *const c_char) -> c_ulong,
- pub fn XcursorLibraryLoadCursors (_2: *mut Display, _1: *const c_char) -> *mut XcursorCursors,
- pub fn XcursorLibraryLoadImage (_3: *const c_char, _2: *const c_char, _1: c_int) -> *mut XcursorImage,
- pub fn XcursorLibraryLoadImages (_3: *const c_char, _2: *const c_char, _1: c_int) -> *mut XcursorImages,
- pub fn XcursorLibraryPath () -> *const c_char,
- pub fn XcursorLibraryShape (_1: *const c_char) -> c_int,
- pub fn XcursorNoticeCreateBitmap (_4: *mut Display, _3: c_ulong, _2: c_uint, _1: c_uint) -> (),
- pub fn XcursorNoticePutBitmap (_3: *mut Display, _2: c_ulong, _1: *mut XImage) -> (),
- pub fn XcursorSetDefaultSize (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XcursorSetTheme (_2: *mut Display, _1: *const c_char) -> c_int,
- pub fn XcursorSetThemeCore (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XcursorShapeLoadCursor (_2: *mut Display, _1: c_uint) -> c_ulong,
- pub fn XcursorShapeLoadCursors (_2: *mut Display, _1: c_uint) -> *mut XcursorCursors,
- pub fn XcursorShapeLoadImage (_3: c_uint, _2: *const c_char, _1: c_int) -> *mut XcursorImage,
- pub fn XcursorShapeLoadImages (_3: c_uint, _2: *const c_char, _1: c_int) -> *mut XcursorImages,
- pub fn XcursorSupportsAnim (_1: *mut Display) -> c_int,
- pub fn XcursorSupportsARGB (_1: *mut Display) -> c_int,
- pub fn XcursorTryShapeBitmapCursor (_7: *mut Display, _6: c_ulong, _5: c_ulong, _4: *mut XColor, _3: *mut XColor, _2: c_uint, _1: c_uint) -> c_ulong,
- pub fn XcursorTryShapeCursor (_7: *mut Display, _6: c_ulong, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *const XColor, _1: *const XColor) -> c_ulong,
- pub fn XcursorXcFileLoad (_3: *mut XcursorFile, _2: *mut *mut XcursorComments, _1: *mut *mut XcursorImages) -> c_int,
- pub fn XcursorXcFileLoadAllImages (_1: *mut XcursorFile) -> *mut XcursorImages,
- pub fn XcursorXcFileLoadImage (_2: *mut XcursorFile, _1: c_int) -> *mut XcursorImage,
- pub fn XcursorXcFileLoadImages (_2: *mut XcursorFile, _1: c_int) -> *mut XcursorImages,
- pub fn XcursorXcFileSave (_3: *mut XcursorFile, _2: *const XcursorComments, _1: *const XcursorImages) -> c_int,
-variadic:
-globals:
-}
-
-
-//
-// types
-//
-
-
-pub type XcursorBool = c_int;
-pub type XcursorDim = XcursorUInt;
-pub type XcursorPixel = XcursorUInt;
-pub type XcursorUInt = c_uint;
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-pub struct _XcursorAnimate {
- pub cursors: *mut XcursorCursors,
- pub sequence: c_int,
-}
-pub type XcursorAnimate = _XcursorAnimate;
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-pub struct _XcursorChunkHeader {
- pub header: XcursorUInt,
- pub type_: XcursorUInt,
- pub subtype: XcursorUInt,
- pub version: XcursorUInt,
-}
-pub type XcursorChunkHeader = _XcursorChunkHeader;
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-pub struct _XcursorComment {
- pub version: XcursorUInt,
- pub comment_type: XcursorUInt,
- pub comment: *mut c_char,
-}
-pub type XcursorComment = _XcursorComment;
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-pub struct _XcursorComments {
- pub ncomment: c_int,
- pub comments: *mut *mut XcursorComment,
-}
-pub type XcursorComments = _XcursorComments;
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-pub struct _XcursorCursors {
- pub dpy: *mut Display,
- pub ref_: c_int,
- pub ncursor: c_int,
- pub cursors: *mut Cursor,
-}
-pub type XcursorCursors = _XcursorCursors;
-
-#[derive(Copy)]
-#[repr(C)]
-pub struct _XcursorFile {
- pub closure: *mut c_void,
- pub read: Option<unsafe extern "C" fn (*mut XcursorFile, *mut c_uchar, c_int) -> c_int>,
- pub write: Option<unsafe extern "C" fn (*mut XcursorFile, *mut c_uchar, c_int) -> c_int>,
- pub seek: Option<unsafe extern "C" fn (*mut XcursorFile, c_long, c_int) -> c_int>,
-}
-pub type XcursorFile = _XcursorFile;
-
-impl Clone for _XcursorFile {
- fn clone (&self) -> _XcursorFile {
- _XcursorFile {
- closure: self.closure,
- read: self.read,
- write: self.write,
- seek: self.seek,
- }
- }
-}
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-pub struct _XcursorFileHeader {
- pub magic: XcursorUInt,
- pub header: XcursorUInt,
- pub version: XcursorUInt,
- pub ntoc: XcursorUInt,
- pub tocs: *mut XcursorFileToc,
-}
-pub type XcursorFileHeader = _XcursorFileHeader;
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-pub struct _XcursorFileToc {
- pub type_: XcursorUInt,
- pub subtype: XcursorUInt,
- pub position: XcursorUInt,
-}
-pub type XcursorFileToc = _XcursorFileToc;
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-pub struct _XcursorImage {
- pub version: XcursorUInt,
- pub size: XcursorDim,
- pub width: XcursorDim,
- pub height: XcursorDim,
- pub xhot: XcursorDim,
- pub yhot: XcursorDim,
- pub delay: XcursorUInt,
- pub pixels: *mut XcursorPixel,
-}
-pub type XcursorImage = _XcursorImage;
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-pub struct _XcursorImages {
- pub nimage: c_int,
- pub images: *mut *mut XcursorImage,
- pub name: *mut c_char,
-}
-pub type XcursorImages = _XcursorImages;
deleted file mode 100644
--- a/third_party/rust/x11/src/xf86vmode.rs
+++ /dev/null
@@ -1,149 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::{
- c_char,
- c_float,
- c_int,
- c_uchar,
- c_uint,
- c_ulong,
- c_ushort,
-};
-
-use std::mem;
-use ::internal::transmute_union;
-
-use ::xlib::{
- Bool,
- Display,
- Time,
- Window,
- XEvent,
-};
-
-
-//
-// functions
-//
-
-
-x11_link! { Xf86vmode, xxf86vm, ["libXxf86vm.so.1", "libXxf86vm.so"], 22,
- pub fn XF86VidModeAddModeLine (_4: *mut Display, _3: c_int, _2: *mut XF86VidModeModeInfo, _1: *mut XF86VidModeModeInfo) -> c_int,
- pub fn XF86VidModeDeleteModeLine (_3: *mut Display, _2: c_int, _1: *mut XF86VidModeModeInfo) -> c_int,
- pub fn XF86VidModeGetAllModeLines (_4: *mut Display, _3: c_int, _2: *mut c_int, _1: *mut *mut *mut XF86VidModeModeInfo) -> c_int,
- pub fn XF86VidModeGetDotClocks (_6: *mut Display, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut *mut c_int) -> c_int,
- pub fn XF86VidModeGetGamma (_3: *mut Display, _2: c_int, _1: *mut XF86VidModeGamma) -> c_int,
- pub fn XF86VidModeGetGammaRamp (_6: *mut Display, _5: c_int, _4: c_int, _3: *mut c_ushort, _2: *mut c_ushort, _1: *mut c_ushort) -> c_int,
- pub fn XF86VidModeGetGammaRampSize (_3: *mut Display, _2: c_int, _1: *mut c_int) -> c_int,
- pub fn XF86VidModeGetModeLine (_4: *mut Display, _3: c_int, _2: *mut c_int, _1: *mut XF86VidModeModeLine) -> c_int,
- pub fn XF86VidModeGetMonitor (_3: *mut Display, _2: c_int, _1: *mut XF86VidModeMonitor) -> c_int,
- pub fn XF86VidModeGetPermissions (_3: *mut Display, _2: c_int, _1: *mut c_int) -> c_int,
- pub fn XF86VidModeGetViewPort (_4: *mut Display, _3: c_int, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XF86VidModeLockModeSwitch (_3: *mut Display, _2: c_int, _1: c_int) -> c_int,
- pub fn XF86VidModeModModeLine (_3: *mut Display, _2: c_int, _1: *mut XF86VidModeModeLine) -> c_int,
- pub fn XF86VidModeQueryExtension (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XF86VidModeQueryVersion (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XF86VidModeSetClientVersion (_1: *mut Display) -> c_int,
- pub fn XF86VidModeSetGamma (_3: *mut Display, _2: c_int, _1: *mut XF86VidModeGamma) -> c_int,
- pub fn XF86VidModeSetGammaRamp (_6: *mut Display, _5: c_int, _4: c_int, _3: *mut c_ushort, _2: *mut c_ushort, _1: *mut c_ushort) -> c_int,
- pub fn XF86VidModeSetViewPort (_4: *mut Display, _3: c_int, _2: c_int, _1: c_int) -> c_int,
- pub fn XF86VidModeSwitchMode (_3: *mut Display, _2: c_int, _1: c_int) -> c_int,
- pub fn XF86VidModeSwitchToMode (_3: *mut Display, _2: c_int, _1: *mut XF86VidModeModeInfo) -> c_int,
- pub fn XF86VidModeValidateModeLine (_3: *mut Display, _2: c_int, _1: *mut XF86VidModeModeInfo) -> c_int,
-variadic:
-globals:
-}
-
-
-//
-// types
-//
-
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-pub struct XF86VidModeGamma {
- pub red: c_float,
- pub green: c_float,
- pub blue: c_float,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XF86VidModeModeInfo {
- pub dotclock: c_uint,
- pub hdisplay: c_ushort,
- pub hsyncstart: c_ushort,
- pub hsyncend: c_ushort,
- pub htotal: c_ushort,
- pub hskew: c_ushort,
- pub vdisplay: c_ushort,
- pub vsyncstart: c_ushort,
- pub vsyncend: c_ushort,
- pub vtotal: c_ushort,
- pub flags: c_uint,
- pub privsize: c_int,
- pub private: *mut i32,
-}
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-pub struct XF86VidModeModeLine {
- pub hdisplay: c_ushort,
- pub hsyncstart: c_ushort,
- pub hsyncend: c_ushort,
- pub htotal: c_ushort,
- pub hskew: c_ushort,
- pub vdisplay: c_ushort,
- pub vsyncstart: c_ushort,
- pub vsyncend: c_ushort,
- pub vtotal: c_ushort,
- pub flags: c_uint,
- pub privsize: c_int,
- pub private: *mut i32,
-}
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-pub struct XF86VidModeMonitor {
- pub vendor: *mut c_char,
- pub model: *mut c_char,
- pub EMPTY: c_float,
- pub nhsync: c_uchar,
- pub hsync: *mut XF86VidModeSyncRange,
- pub nvsync: c_uchar,
- pub vsync: *mut XF86VidModeSyncRange,
-}
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-pub struct XF86VidModeSyncRange {
- pub hi: c_float,
- pub lo: c_float,
-}
-
-
-//
-// event structures
-//
-
-
-#[derive(Clone, Copy)]
-#[repr(C)]
-pub struct XF86VidModeNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub root: Window,
- pub state: c_int,
- pub kind: c_int,
- pub forced: bool,
- pub time: Time,
-}
-
-event_conversions_and_tests! {
- XF86VidModeNotifyEvent,
-}
deleted file mode 100644
--- a/third_party/rust/x11/src/xfixes.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use ::xlib::XID;
-
-
-//
-// types
-//
-
-
-pub type PointerBarrier = XID;
deleted file mode 100644
--- a/third_party/rust/x11/src/xft.rs
+++ /dev/null
@@ -1,219 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::*;
-
-use xlib::{Display, Region, Visual, XRectangle};
-use xrender::{XGlyphInfo, XRenderColor};
-
-
-//
-// external types
-//
-
-
-// freetype
-pub enum FT_FaceRec {}
-pub type FT_UInt = c_uint;
-
-// fontconfig
-pub type FcChar32 = c_uint;
-pub enum FcCharSet {}
-pub enum FcPattern {}
-
-#[repr(C)]
-pub enum FcEndian { Big, Little }
-
-#[repr(C)]
-pub enum FcResult { Match, NoMatch, TypeMismatch, NoId, OutOfMemory }
-
-
-//
-// functions
-//
-
-
-x11_link! { Xft, xft, ["libXft.so.2", "libXft.so"], 77,
- pub fn XftCharExists (_2: *mut Display, _1: *mut XftFont, _0: c_uint) -> c_int,
- pub fn XftCharFontSpecRender (_7: *mut Display, _6: c_int, _5: c_ulong, _4: c_ulong, _3: c_int, _2: c_int, _1: *const XftCharFontSpec, _0: c_int) -> (),
- pub fn XftCharIndex (_2: *mut Display, _1: *mut XftFont, _0: c_uint) -> c_uint,
- pub fn XftCharSpecRender (_8: *mut Display, _7: c_int, _6: c_ulong, _5: *mut XftFont, _4: c_ulong, _3: c_int, _2: c_int, _1: *const XftCharSpec, _0: c_int) -> (),
- pub fn XftColorAllocName (_4: *mut Display, _3: *const Visual, _2: c_ulong, _1: *const c_char, _0: *mut XftColor) -> c_int,
- pub fn XftColorAllocValue (_4: *mut Display, _3: *mut Visual, _2: c_ulong, _1: *const XRenderColor, _0: *mut XftColor) -> c_int,
- pub fn XftColorFree (_3: *mut Display, _2: *mut Visual, _1: c_ulong, _0: *mut XftColor) -> (),
- pub fn XftDefaultHasRender (_0: *mut Display) -> c_int,
- pub fn XftDefaultSet (_1: *mut Display, _0: *mut FcPattern) -> c_int,
- pub fn XftDefaultSubstitute (_2: *mut Display, _1: c_int, _0: *mut FcPattern) -> (),
- pub fn XftDrawChange (_1: *mut XftDraw, _0: c_ulong) -> (),
- pub fn XftDrawCharFontSpec (_3: *mut XftDraw, _2: *const XftColor, _1: *const XftCharFontSpec, _0: c_int) -> (),
- pub fn XftDrawCharSpec (_4: *mut XftDraw, _3: *const XftColor, _2: *mut XftFont, _1: *const XftCharSpec, _0: c_int) -> (),
- pub fn XftDrawColormap (_0: *mut XftDraw) -> c_ulong,
- pub fn XftDrawCreate (_3: *mut Display, _2: c_ulong, _1: *mut Visual, _0: c_ulong) -> *mut XftDraw,
- pub fn XftDrawCreateAlpha (_2: *mut Display, _1: c_ulong, _0: c_int) -> *mut XftDraw,
- pub fn XftDrawCreateBitmap (_1: *mut Display, _0: c_ulong) -> *mut XftDraw,
- pub fn XftDrawDestroy (_0: *mut XftDraw) -> (),
- pub fn XftDrawDisplay (_0: *mut XftDraw) -> *mut Display,
- pub fn XftDrawDrawable (_0: *mut XftDraw) -> c_ulong,
- pub fn XftDrawGlyphFontSpec (_3: *mut XftDraw, _2: *const XftColor, _1: *const XftGlyphFontSpec, _0: c_int) -> (),
- pub fn XftDrawGlyphs (_6: *mut XftDraw, _5: *const XftColor, _4: *mut XftFont, _3: c_int, _2: c_int, _1: *const c_uint, _0: c_int) -> (),
- pub fn XftDrawGlyphSpec (_4: *mut XftDraw, _3: *const XftColor, _2: *mut XftFont, _1: *const XftGlyphSpec, _0: c_int) -> (),
- pub fn XftDrawPicture (_0: *mut XftDraw) -> c_ulong,
- pub fn XftDrawRect (_5: *mut XftDraw, _4: *const XftColor, _3: c_int, _2: c_int, _1: c_uint, _0: c_uint) -> (),
- pub fn XftDrawSetClip (_1: *mut XftDraw, _0: Region) -> c_int,
- pub fn XftDrawSetClipRectangles (_4: *mut XftDraw, _3: c_int, _2: c_int, _1: *const XRectangle, _0: c_int) -> c_int,
- pub fn XftDrawSetSubwindowMode (_1: *mut XftDraw, _0: c_int) -> (),
- pub fn XftDrawSrcPicture (_1: *mut XftDraw, _0: *const XftColor) -> c_ulong,
- pub fn XftDrawString16 (_6: *mut XftDraw, _5: *const XftColor, _4: *mut XftFont, _3: c_int, _2: c_int, _1: *const c_ushort, _0: c_int) -> (),
- pub fn XftDrawString32 (_6: *mut XftDraw, _5: *const XftColor, _4: *mut XftFont, _3: c_int, _2: c_int, _1: *const c_uint, _0: c_int) -> (),
- pub fn XftDrawString8 (_6: *mut XftDraw, _5: *const XftColor, _4: *mut XftFont, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (),
- pub fn XftDrawStringUtf16 (_7: *mut XftDraw, _6: *const XftColor, _5: *mut XftFont, _4: c_int, _3: c_int, _2: *const c_uchar, _1: FcEndian, _0: c_int) -> (),
- pub fn XftDrawStringUtf8 (_6: *mut XftDraw, _5: *const XftColor, _4: *mut XftFont, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (),
- pub fn XftDrawVisual (_0: *mut XftDraw) -> *mut Visual,
- pub fn XftFontCheckGlyph (_5: *mut Display, _4: *mut XftFont, _3: c_int, _2: c_uint, _1: *mut c_uint, _0: *mut c_int) -> c_int,
- pub fn XftFontClose (_1: *mut Display, _0: *mut XftFont) -> (),
- pub fn XftFontCopy (_1: *mut Display, _0: *mut XftFont) -> *mut XftFont,
- pub fn XftFontInfoCreate (_1: *mut Display, _0: *const FcPattern) -> *mut XftFontInfo,
- pub fn XftFontInfoDestroy (_1: *mut Display, _0: *mut XftFontInfo) -> (),
- pub fn XftFontInfoEqual (_1: *const XftFontInfo, _0: *const XftFontInfo) -> c_int,
- pub fn XftFontInfoHash (_0: *const XftFontInfo) -> c_uint,
- pub fn XftFontLoadGlyphs (_4: *mut Display, _3: *mut XftFont, _2: c_int, _1: *const c_uint, _0: c_int) -> (),
- pub fn XftFontMatch (_3: *mut Display, _2: c_int, _1: *const FcPattern, _0: *mut FcResult) -> *mut FcPattern,
- pub fn XftFontOpenInfo (_2: *mut Display, _1: *mut FcPattern, _0: *mut XftFontInfo) -> *mut XftFont,
- pub fn XftFontOpenName (_2: *mut Display, _1: c_int, _0: *const c_char) -> *mut XftFont,
- pub fn XftFontOpenPattern (_1: *mut Display, _0: *mut FcPattern) -> *mut XftFont,
- pub fn XftFontOpenXlfd (_2: *mut Display, _1: c_int, _0: *const c_char) -> *mut XftFont,
- pub fn XftFontUnloadGlyphs (_3: *mut Display, _2: *mut XftFont, _1: *const c_uint, _0: c_int) -> (),
- pub fn XftGetVersion () -> c_int,
- pub fn XftGlyphExtents (_4: *mut Display, _3: *mut XftFont, _2: *const c_uint, _1: c_int, _0: *mut XGlyphInfo) -> (),
- pub fn XftGlyphFontSpecRender (_7: *mut Display, _6: c_int, _5: c_ulong, _4: c_ulong, _3: c_int, _2: c_int, _1: *const XftGlyphFontSpec, _0: c_int) -> (),
- pub fn XftGlyphRender (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uint, _0: c_int) -> (),
- pub fn XftGlyphSpecRender (_8: *mut Display, _7: c_int, _6: c_ulong, _5: *mut XftFont, _4: c_ulong, _3: c_int, _2: c_int, _1: *const XftGlyphSpec, _0: c_int) -> (),
- pub fn XftInit (_0: *const c_char) -> c_int,
- pub fn XftInitFtLibrary () -> c_int,
- pub fn XftLockFace (_0: *mut XftFont) -> *mut FT_FaceRec,
- pub fn XftNameParse (_0: *const c_char) -> *mut FcPattern,
- pub fn XftNameUnparse (_2: *mut FcPattern, _1: *mut c_char, _0: c_int) -> c_int,
- pub fn XftTextExtents16 (_4: *mut Display, _3: *mut XftFont, _2: *const c_ushort, _1: c_int, _0: *mut XGlyphInfo) -> (),
- pub fn XftTextExtents32 (_4: *mut Display, _3: *mut XftFont, _2: *const c_uint, _1: c_int, _0: *mut XGlyphInfo) -> (),
- pub fn XftTextExtents8 (_4: *mut Display, _3: *mut XftFont, _2: *const c_uchar, _1: c_int, _0: *mut XGlyphInfo) -> (),
- pub fn XftTextExtentsUtf16 (_5: *mut Display, _4: *mut XftFont, _3: *const c_uchar, _2: FcEndian, _1: c_int, _0: *mut XGlyphInfo) -> (),
- pub fn XftTextExtentsUtf8 (_4: *mut Display, _3: *mut XftFont, _2: *const c_uchar, _1: c_int, _0: *mut XGlyphInfo) -> (),
- pub fn XftTextRender16 (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_ushort, _0: c_int) -> (),
- pub fn XftTextRender16BE (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (),
- pub fn XftTextRender16LE (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (),
- pub fn XftTextRender32 (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uint, _0: c_int) -> (),
- pub fn XftTextRender32BE (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (),
- pub fn XftTextRender32LE (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (),
- pub fn XftTextRender8 (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (),
- pub fn XftTextRenderUtf16 (_11: *mut Display, _10: c_int, _9: c_ulong, _8: *mut XftFont, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const c_uchar, _1: FcEndian, _0: c_int) -> (),
- pub fn XftTextRenderUtf8 (_10: *mut Display, _9: c_int, _8: c_ulong, _7: *mut XftFont, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: *const c_uchar, _0: c_int) -> (),
- pub fn XftUnlockFace (_0: *mut XftFont) -> (),
- pub fn XftXlfdParse (_2: *const c_char, _1: c_int, _0: c_int) -> *mut FcPattern,
-variadic:
- pub fn XftFontOpen (_1: *mut Display, _0: c_int) -> *mut XftFont,
- pub fn XftListFonts (_1: *mut Display, _0: c_int) -> *mut XftFontSet,
-globals:
-}
-
-
-//
-// types
-//
-
-
-pub enum XftFontInfo {}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XftFont {
- pub ascent: c_int,
- pub descent: c_int,
- pub height: c_int,
- pub max_advance_width: c_int,
- pub charset: *mut FcCharSet,
- pub pattern: *mut FcPattern,
-}
-
-pub enum XftDraw {}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XftColor {
- pub pixel: c_ulong,
- pub color: XRenderColor,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XftCharSpec {
- pub ucs4: FcChar32,
- pub x: c_short,
- pub y: c_short,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XftCharFontSpec {
- pub font: *mut XftFont,
- pub ucs4: FcChar32,
- pub x: c_short,
- pub y: c_short,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XftFontSet {
- pub nfont: c_int,
- pub sfont: c_int,
- pub fonts: *mut *mut XftPattern,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XftGlyphSpec {
- pub glyph: FT_UInt,
- pub x: c_short,
- pub y: c_short,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XftGlyphFontSpec {
- pub font: *mut XftFont,
- pub glyph: FT_UInt,
- pub x: c_short,
- pub y: c_short,
-}
-
-pub enum XftPattern {}
-
-
-//
-// constants
-//
-
-
-// font attributes
-pub const XFT_FAMILY: &'static str = "family";
-pub const XFT_STYLE: &'static str = "style";
-pub const XFT_SLANT: &'static str = "slant";
-pub const XFT_WEIGHT: &'static str = "weight";
-pub const XFT_SIZE: &'static str = "size";
-pub const XFT_PIXEL_SIZE: &'static str = "pixelsize";
-pub const XFT_SPACING: &'static str = "spacing";
-pub const XFT_FOUNDRY: &'static str = "foundry";
-pub const XFT_ANTIALIAS: &'static str = "antialias";
-
-// slant values
-pub const XFT_SLANT_ROMAN: c_int = 0;
-pub const XFT_SLANT_ITALIC: c_int = 100;
-pub const XFT_SLANT_OBLIQUE: c_int = 110;
-
-// attribute types
-pub const XftTypeVoid: c_int = 0;
-pub const XftTypeInteger: c_int = 1;
-pub const XftTypeDouble: c_int = 2;
-pub const XftTypeString: c_int = 3;
-pub const XftTypeBool: c_int = 4;
-pub const XftTypeMatrix: c_int = 5;
deleted file mode 100644
--- a/third_party/rust/x11/src/xinerama.rs
+++ /dev/null
@@ -1,66 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::{
- c_int,
- c_short,
-};
-
-use ::xlib::{
- Bool,
- Display,
- Drawable,
- Status,
- Window,
- XID,
-};
-
-
-//
-// functions
-//
-
-
-x11_link! { Xlib, xinerama, ["libXinerama.so.1", "libXinerama.so"], 10,
- pub fn XineramaIsActive (dpy: *mut Display) -> Bool,
- pub fn XineramaQueryExtension (dpy: *mut Display, event_base: c_int, error_base: c_int) -> Bool,
- pub fn XineramaQueryScreens (dpy: *mut Display, number: *mut c_int) -> *mut XineramaScreenInfo,
- pub fn XineramaQueryVersion (dpy: *mut Display, major_versionp: *mut c_int, minor_versionp: *mut c_int) -> Status,
- pub fn XPanoramiXAllocInfo () -> *mut XPanoramiXInfo,
- pub fn XPanoramiXGetScreenCount (dpy: *mut Display, drawable: Drawable, panoramiX_info: *mut XPanoramiXInfo) -> Status,
- pub fn XPanoramiXGetScreenSize (dpy: *mut Display, drawable: Drawable, screen_num: c_int, panoramiX_info: *mut XPanoramiXInfo) -> Status,
- pub fn XPanoramiXGetState (dpy: *mut Display, drawable: Drawable, panoramiX_info: *mut XPanoramiXInfo) -> Status,
- pub fn XPanoramiXQueryExtension (dpy: *mut Display, event_base_return: *mut c_int, error_base_return: *mut c_int) -> Bool,
- pub fn XPanoramiXQueryVersion (dpy: *mut Display, major_version_return: *mut c_int, minor_version_return: *mut c_int) -> Status,
-variadic:
-globals:
-}
-
-
-//
-// types
-//
-
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XineramaScreenInfo {
- pub screen_number: c_int,
- pub x_org: c_short,
- pub y_org: c_short,
- pub width: c_short,
- pub height: c_short,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XPanoramiXInfo {
- pub window: Window,
- pub screen: c_int,
- pub State: c_int,
- pub width: c_int,
- pub height: c_int,
- pub ScreenCount: c_int,
- pub eventMask: XID,
-}
deleted file mode 100644
--- a/third_party/rust/x11/src/xinput.rs
+++ /dev/null
@@ -1,165 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::{
- c_char,
- c_int,
- c_long,
- c_short,
- c_uchar,
- c_uint,
- c_ulong,
-};
-
-use ::xlib::{
- Atom,
- Display,
- Time,
- XEvent,
- XID,
- XModifierKeymap,
-};
-
-//
-// functions
-//
-
-x11_link! { XInput, xi, ["libXi.so.6", "libXi.so"], 44,
- pub fn XAllowDeviceEvents (_4: *mut Display, _3: *mut XDevice, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XChangeDeviceControl (_4: *mut Display, _3: *mut XDevice, _2: c_int, _1: *mut XDeviceControl) -> c_int,
- pub fn XChangeDeviceDontPropagateList (_5: *mut Display, _4: c_ulong, _3: c_int, _2: *mut c_ulong, _1: c_int) -> c_int,
- pub fn XChangeDeviceKeyMapping (_6: *mut Display, _5: *mut XDevice, _4: c_int, _3: c_int, _2: *mut c_ulong, _1: c_int) -> c_int,
- pub fn XChangeDeviceProperty (_8: *mut Display, _7: *mut XDevice, _6: c_ulong, _5: c_ulong, _4: c_int, _3: c_int, _2: *const c_uchar, _1: c_int) -> (),
- pub fn XChangeFeedbackControl (_4: *mut Display, _3: *mut XDevice, _2: c_ulong, _1: *mut XFeedbackControl) -> c_int,
- pub fn XChangeKeyboardDevice (_2: *mut Display, _1: *mut XDevice) -> c_int,
- pub fn XChangePointerDevice (_4: *mut Display, _3: *mut XDevice, _2: c_int, _1: c_int) -> c_int,
- pub fn XCloseDevice (_2: *mut Display, _1: *mut XDevice) -> c_int,
- pub fn XDeleteDeviceProperty (_3: *mut Display, _2: *mut XDevice, _1: c_ulong) -> (),
- pub fn XDeviceBell (_5: *mut Display, _4: *mut XDevice, _3: c_ulong, _2: c_ulong, _1: c_int) -> c_int,
- pub fn XFreeDeviceControl (_1: *mut XDeviceControl) -> (),
- pub fn XFreeDeviceList (_1: *mut XDeviceInfo) -> (),
- pub fn XFreeDeviceMotionEvents (_1: *mut XDeviceTimeCoord) -> (),
- pub fn XFreeDeviceState (_1: *mut XDeviceState) -> (),
- pub fn XFreeFeedbackList (_1: *mut XFeedbackState) -> (),
- pub fn XGetDeviceButtonMapping (_4: *mut Display, _3: *mut XDevice, _2: *mut c_uchar, _1: c_uint) -> c_int,
- pub fn XGetDeviceControl (_3: *mut Display, _2: *mut XDevice, _1: c_int) -> *mut XDeviceControl,
- pub fn XGetDeviceDontPropagateList (_3: *mut Display, _2: c_ulong, _1: *mut c_int) -> *mut c_ulong,
- pub fn XGetDeviceFocus (_5: *mut Display, _4: *mut XDevice, _3: *mut c_ulong, _2: *mut c_int, _1: *mut c_ulong) -> c_int,
- pub fn XGetDeviceKeyMapping (_5: *mut Display, _4: *mut XDevice, _3: c_uchar, _2: c_int, _1: *mut c_int) -> *mut c_ulong,
- pub fn XGetDeviceModifierMapping (_2: *mut Display, _1: *mut XDevice) -> *mut XModifierKeymap,
- pub fn XGetDeviceMotionEvents (_7: *mut Display, _6: *mut XDevice, _5: c_ulong, _4: c_ulong, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> *mut XDeviceTimeCoord,
- pub fn XGetDeviceProperty (_12: *mut Display, _11: *mut XDevice, _10: c_ulong, _9: c_long, _8: c_long, _7: c_int, _6: c_ulong, _5: *mut c_ulong, _4: *mut c_int, _3: *mut c_ulong, _2: *mut c_ulong, _1: *mut *mut c_uchar) -> c_int,
- pub fn XGetExtensionVersion (_2: *mut Display, _1: *const c_char) -> *mut XExtensionVersion,
- pub fn XGetFeedbackControl (_3: *mut Display, _2: *mut XDevice, _1: *mut c_int) -> *mut XFeedbackState,
- pub fn XGetSelectedExtensionEvents (_6: *mut Display, _5: c_ulong, _4: *mut c_int, _3: *mut *mut c_ulong, _2: *mut c_int, _1: *mut *mut c_ulong) -> c_int,
- pub fn XGrabDevice (_9: *mut Display, _8: *mut XDevice, _7: c_ulong, _6: c_int, _5: c_int, _4: *mut c_ulong, _3: c_int, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XGrabDeviceButton (_11: *mut Display, _10: *mut XDevice, _9: c_uint, _8: c_uint, _7: *mut XDevice, _6: c_ulong, _5: c_int, _4: c_uint, _3: *mut c_ulong, _2: c_int, _1: c_int) -> c_int,
- pub fn XGrabDeviceKey (_11: *mut Display, _10: *mut XDevice, _9: c_uint, _8: c_uint, _7: *mut XDevice, _6: c_ulong, _5: c_int, _4: c_uint, _3: *mut c_ulong, _2: c_int, _1: c_int) -> c_int,
-
- pub fn XListDeviceProperties (_3: *mut Display, _2: *mut XDevice, _1: *mut c_int) -> *mut c_ulong,
- pub fn XListInputDevices (_2: *mut Display, _1: *mut c_int) -> *mut XDeviceInfo,
- pub fn XOpenDevice (_2: *mut Display, _1: c_ulong) -> *mut XDevice,
- pub fn XQueryDeviceState (_2: *mut Display, _1: *mut XDevice) -> *mut XDeviceState,
- pub fn XSelectExtensionEvent (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: c_int) -> c_int,
- pub fn XSendExtensionEvent (_7: *mut Display, _6: *mut XDevice, _5: c_ulong, _4: c_int, _3: c_int, _2: *mut c_ulong, _1: *mut XEvent) -> c_int,
- pub fn XSetDeviceButtonMapping (_4: *mut Display, _3: *mut XDevice, _2: *mut c_uchar, _1: c_int) -> c_int,
- pub fn XSetDeviceFocus (_5: *mut Display, _4: *mut XDevice, _3: c_ulong, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XSetDeviceMode (_3: *mut Display, _2: *mut XDevice, _1: c_int) -> c_int,
- pub fn XSetDeviceModifierMapping (_3: *mut Display, _2: *mut XDevice, _1: *mut XModifierKeymap) -> c_int,
- pub fn XSetDeviceValuators (_5: *mut Display, _4: *mut XDevice, _3: *mut c_int, _2: c_int, _1: c_int) -> c_int,
- pub fn XUngrabDevice (_3: *mut Display, _2: *mut XDevice, _1: c_ulong) -> c_int,
- pub fn XUngrabDeviceButton (_6: *mut Display, _5: *mut XDevice, _4: c_uint, _3: c_uint, _2: *mut XDevice, _1: c_ulong) -> c_int,
- pub fn XUngrabDeviceKey (_6: *mut Display, _5: *mut XDevice, _4: c_uint, _3: c_uint, _2: *mut XDevice, _1: c_ulong) -> c_int,
-variadic:
-globals:
-}
-
-
-//
-// types
-//
-
-pub enum _XAnyClassinfo {}
-
-pub type XAnyClassPtr = *mut _XAnyClassinfo;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XDevice {
- pub device_id: XID,
- pub num_classes: c_int,
- pub classes: *mut XInputClassInfo,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XDeviceControl {
- pub control: XID,
- pub length: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XDeviceInfo {
- pub id: XID,
- pub type_: Atom,
- pub name: *mut c_char,
- pub num_classes: c_int,
- pub use_: c_int,
- pub inputclassinfo: XAnyClassPtr,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XDeviceState {
- pub device_id: XID,
- pub num_classes: c_int,
- pub data: *mut XInputClass,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XDeviceTimeCoord {
- pub time: Time,
- pub data: *mut c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XExtensionVersion {
- pub present: c_int,
- pub major_version: c_short,
- pub minor_version: c_short,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XFeedbackControl {
- pub class: XID,
- pub length: c_int,
- pub id: XID,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XFeedbackState {
- pub class: XID,
- pub length: c_int,
- pub id: XID,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XInputClass {
- pub class: c_uchar,
- pub length: c_uchar,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XInputClassInfo {
- pub input_class: c_uchar,
- pub event_type_base: c_uchar,
-}
-
deleted file mode 100644
--- a/third_party/rust/x11/src/xinput2.rs
+++ /dev/null
@@ -1,757 +0,0 @@
-use xfixes::PointerBarrier;
-use xlib::{Atom, Display, Time, Window};
-use std::os::raw::{c_int, c_uint, c_long, c_double, c_ulong, c_uchar};
-
-//
-// macro translations
-//
-fn mask_byte(mask_flag: i32) -> usize {
- (mask_flag >> 3) as usize
-}
-
-pub fn XISetMask(mask: &mut [::std::os::raw::c_uchar], event: i32) {
- mask[mask_byte(event)] |= 1 << (event & 7);
-}
-
-pub fn XIClearMask(mask: &mut [::std::os::raw::c_uchar], event: i32) {
- mask[mask_byte(event)] &= 1 << (event & 7);
-}
-
-pub fn XIMaskIsSet(mask: &[::std::os::raw::c_uchar], event: i32) -> bool {
- (mask[mask_byte(event)] & (1 << (event & 7))) != 0
-}
-
-//
-// functions
-//
-x11_link! { XInput2, xi, ["libXi.so.6", "libXi.so"], 34,
- pub fn XIAllowEvents (_4: *mut Display, _3: c_int, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XIAllowTouchEvents (_5: *mut Display, _4: c_int, _3: c_uint, _2: c_ulong, _1: c_int) -> c_int,
- pub fn XIBarrierReleasePointer (_4: *mut Display, _3: c_int, _2: c_ulong, _1: c_uint) -> (),
- pub fn XIBarrierReleasePointers (_3: *mut Display, _2: *mut XIBarrierReleasePointerInfo, _1: c_int) -> (),
- pub fn XIChangeHierarchy (_3: *mut Display, _2: *mut XIAnyHierarchyChangeInfo, _1: c_int) -> c_int,
- pub fn XIChangeProperty (_8: *mut Display, _7: c_int, _6: c_ulong, _5: c_ulong, _4: c_int, _3: c_int, _2: *mut c_uchar, _1: c_int) -> (),
- pub fn XIDefineCursor (_4: *mut Display, _3: c_int, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XIDeleteProperty (_3: *mut Display, _2: c_int, _1: c_ulong) -> (),
- pub fn XIFreeDeviceInfo (_1: *mut XIDeviceInfo) -> (),
- pub fn XIGetClientPointer (_3: *mut Display, _2: c_ulong, _1: *mut c_int) -> c_int,
- pub fn XIGetFocus (_3: *mut Display, _2: c_int, _1: *mut c_ulong) -> c_int,
- pub fn XIGetProperty (_12: *mut Display, _11: c_int, _10: c_ulong, _9: c_long, _8: c_long, _7: c_int, _6: c_ulong, _5: *mut c_ulong, _4: *mut c_int, _3: *mut c_ulong, _2: *mut c_ulong, _1: *mut *mut c_uchar) -> c_int,
- pub fn XIGetSelectedEvents (_3: *mut Display, _2: c_ulong, _1: *mut c_int) -> *mut XIEventMask,
- pub fn XIGrabButton (_11: *mut Display, _10: c_int, _9: c_int, _8: c_ulong, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: *mut XIEventMask, _2: c_int, _1: *mut XIGrabModifiers) -> c_int,
- pub fn XIGrabDevice (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_ulong, _5: c_ulong, _4: c_int, _3: c_int, _2: c_int, _1: *mut XIEventMask) -> c_int,
- pub fn XIGrabEnter (_10: *mut Display, _9: c_int, _8: c_ulong, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: *mut XIEventMask, _2: c_int, _1: *mut XIGrabModifiers) -> c_int,
- pub fn XIGrabFocusIn (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: *mut XIEventMask, _2: c_int, _1: *mut XIGrabModifiers) -> c_int,
- pub fn XIGrabKeycode (_10: *mut Display, _9: c_int, _8: c_int, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: *mut XIEventMask, _2: c_int, _1: *mut XIGrabModifiers) -> c_int,
- pub fn XIGrabTouchBegin (_7: *mut Display, _6: c_int, _5: c_ulong, _4: c_int, _3: *mut XIEventMask, _2: c_int, _1: *mut XIGrabModifiers) -> c_int,
- pub fn XIListProperties (_3: *mut Display, _2: c_int, _1: *mut c_int) -> *mut c_ulong,
- pub fn XIQueryDevice (_3: *mut Display, _2: c_int, _1: *mut c_int) -> *mut XIDeviceInfo,
- pub fn XIQueryPointer (_12: *mut Display, _11: c_int, _10: c_ulong, _9: *mut c_ulong, _8: *mut c_ulong, _7: *mut c_double, _6: *mut c_double, _5: *mut c_double, _4: *mut c_double, _3: *mut XIButtonState, _2: *mut XIModifierState, _1: *mut XIModifierState) -> c_int,
- pub fn XIQueryVersion (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XISelectEvents (_4: *mut Display, _3: c_ulong, _2: *mut XIEventMask, _1: c_int) -> c_int,
- pub fn XISetClientPointer (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int,
- pub fn XISetFocus (_4: *mut Display, _3: c_int, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XIUndefineCursor (_3: *mut Display, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XIUngrabButton (_6: *mut Display, _5: c_int, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int,
- pub fn XIUngrabDevice (_3: *mut Display, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XIUngrabEnter (_5: *mut Display, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int,
- pub fn XIUngrabFocusIn (_5: *mut Display, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int,
- pub fn XIUngrabKeycode (_6: *mut Display, _5: c_int, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int,
- pub fn XIUngrabTouchBegin (_5: *mut Display, _4: c_int, _3: c_ulong, _2: c_int, _1: *mut XIGrabModifiers) -> c_int,
- pub fn XIWarpPointer (_10: *mut Display, _9: c_int, _8: c_ulong, _7: c_ulong, _6: c_double, _5: c_double, _4: c_uint, _3: c_uint, _2: c_double, _1: c_double) -> c_int,
-variadic:
-globals:
-}
-
-//
-// constants
-// (auto-generated with cmacros)
-//
-
-pub const XInput_2_0: i32 = 7;
-pub const XI_2_Major: i32 = 2;
-pub const XI_2_Minor: i32 = 3;
-pub const XIPropertyDeleted: i32 = 0;
-pub const XIPropertyCreated: i32 = 1;
-pub const XIPropertyModified: i32 = 2;
-pub const XIPropModeReplace: i32 = 0;
-pub const XIPropModePrepend: i32 = 1;
-pub const XIPropModeAppend: i32 = 2;
-pub const XINotifyNormal: i32 = 0;
-pub const XINotifyGrab: i32 = 1;
-pub const XINotifyUngrab: i32 = 2;
-pub const XINotifyWhileGrabbed: i32 = 3;
-pub const XINotifyPassiveGrab: i32 = 4;
-pub const XINotifyPassiveUngrab: i32 = 5;
-pub const XINotifyAncestor: i32 = 0;
-pub const XINotifyVirtual: i32 = 1;
-pub const XINotifyInferior: i32 = 2;
-pub const XINotifyNonlinear: i32 = 3;
-pub const XINotifyNonlinearVirtual: i32 = 4;
-pub const XINotifyPointer: i32 = 5;
-pub const XINotifyPointerRoot: i32 = 6;
-pub const XINotifyDetailNone: i32 = 7;
-pub const XIGrabModeSync: i32 = 0;
-pub const XIGrabModeAsync: i32 = 1;
-pub const XIGrabModeTouch: i32 = 2;
-pub const XIGrabSuccess: i32 = 0;
-pub const XIAlreadyGrabbed: i32 = 1;
-pub const XIGrabInvalidTime: i32 = 2;
-pub const XIGrabNotViewable: i32 = 3;
-pub const XIGrabFrozen: i32 = 4;
-pub const XIGrabtypeButton: i32 = 0;
-pub const XIGrabtypeKeycode: i32 = 1;
-pub const XIGrabtypeEnter: i32 = 2;
-pub const XIGrabtypeFocusIn: i32 = 3;
-pub const XIGrabtypeTouchBegin: i32 = 4;
-pub const XIAnyButton: i32 = 0;
-pub const XIAnyKeycode: i32 = 0;
-pub const XIAsyncDevice: i32 = 0;
-pub const XISyncDevice: i32 = 1;
-pub const XIReplayDevice: i32 = 2;
-pub const XIAsyncPairedDevice: i32 = 3;
-pub const XIAsyncPair: i32 = 4;
-pub const XISyncPair: i32 = 5;
-pub const XIAcceptTouch: i32 = 6;
-pub const XIRejectTouch: i32 = 7;
-pub const XISlaveSwitch: i32 = 1;
-pub const XIDeviceChange: i32 = 2;
-pub const XIMasterAdded: i32 = (1 << 0);
-pub const XIMasterRemoved: i32 = (1 << 1);
-pub const XISlaveAdded: i32 = (1 << 2);
-pub const XISlaveRemoved: i32 = (1 << 3);
-pub const XISlaveAttached: i32 = (1 << 4);
-pub const XISlaveDetached: i32 = (1 << 5);
-pub const XIDeviceEnabled: i32 = (1 << 6);
-pub const XIDeviceDisabled: i32 = (1 << 7);
-pub const XIAddMaster: i32 = 1;
-pub const XIRemoveMaster: i32 = 2;
-pub const XIAttachSlave: i32 = 3;
-pub const XIDetachSlave: i32 = 4;
-pub const XIAttachToMaster: i32 = 1;
-pub const XIFloating: i32 = 2;
-pub const XIModeRelative: i32 = 0;
-pub const XIModeAbsolute: i32 = 1;
-pub const XIMasterPointer: i32 = 1;
-pub const XIMasterKeyboard: i32 = 2;
-pub const XISlavePointer: i32 = 3;
-pub const XISlaveKeyboard: i32 = 4;
-pub const XIFloatingSlave: i32 = 5;
-pub const XIKeyClass: i32 = 0;
-pub const XIButtonClass: i32 = 1;
-pub const XIValuatorClass: i32 = 2;
-pub const XIScrollClass: i32 = 3;
-pub const XITouchClass: i32 = 8;
-pub const XIScrollTypeVertical: i32 = 1;
-pub const XIScrollTypeHorizontal: i32 = 2;
-pub const XIScrollFlagNoEmulation: i32 = (1 << 0);
-pub const XIScrollFlagPreferred: i32 = (1 << 1);
-pub const XIKeyRepeat: i32 = (1 << 16);
-pub const XIPointerEmulated: i32 = (1 << 16);
-pub const XITouchPendingEnd: i32 = (1 << 16);
-pub const XITouchEmulatingPointer: i32 = (1 << 17);
-pub const XIBarrierPointerReleased: i32 = (1 << 0);
-pub const XIBarrierDeviceIsGrabbed: i32 = (1 << 1);
-pub const XIDirectTouch: i32 = 1;
-pub const XIDependentTouch: i32 = 2;
-pub const XIAllDevices: i32 = 0;
-pub const XIAllMasterDevices: i32 = 1;
-pub const XI_DeviceChanged: i32 = 1;
-pub const XI_KeyPress: i32 = 2;
-pub const XI_KeyRelease: i32 = 3;
-pub const XI_ButtonPress: i32 = 4;
-pub const XI_ButtonRelease: i32 = 5;
-pub const XI_Motion: i32 = 6;
-pub const XI_Enter: i32 = 7;
-pub const XI_Leave: i32 = 8;
-pub const XI_FocusIn: i32 = 9;
-pub const XI_FocusOut: i32 = 10;
-pub const XI_HierarchyChanged: i32 = 11;
-pub const XI_PropertyEvent: i32 = 12;
-pub const XI_RawKeyPress: i32 = 13;
-pub const XI_RawKeyRelease: i32 = 14;
-pub const XI_RawButtonPress: i32 = 15;
-pub const XI_RawButtonRelease: i32 = 16;
-pub const XI_RawMotion: i32 = 17;
-pub const XI_TouchBegin: i32 = 18 /* XI 2.2 */;
-pub const XI_TouchUpdate: i32 = 19;
-pub const XI_TouchEnd: i32 = 20;
-pub const XI_TouchOwnership: i32 = 21;
-pub const XI_RawTouchBegin: i32 = 22;
-pub const XI_RawTouchUpdate: i32 = 23;
-pub const XI_RawTouchEnd: i32 = 24;
-pub const XI_BarrierHit: i32 = 25 /* XI 2.3 */;
-pub const XI_BarrierLeave: i32 = 26;
-pub const XI_LASTEVENT: i32 = XI_BarrierLeave;
-pub const XI_DeviceChangedMask: i32 = (1 << XI_DeviceChanged);
-pub const XI_KeyPressMask: i32 = (1 << XI_KeyPress);
-pub const XI_KeyReleaseMask: i32 = (1 << XI_KeyRelease);
-pub const XI_ButtonPressMask: i32 = (1 << XI_ButtonPress);
-pub const XI_ButtonReleaseMask: i32 = (1 << XI_ButtonRelease);
-pub const XI_MotionMask: i32 = (1 << XI_Motion);
-pub const XI_EnterMask: i32 = (1 << XI_Enter);
-pub const XI_LeaveMask: i32 = (1 << XI_Leave);
-pub const XI_FocusInMask: i32 = (1 << XI_FocusIn);
-pub const XI_FocusOutMask: i32 = (1 << XI_FocusOut);
-pub const XI_HierarchyChangedMask: i32 = (1 << XI_HierarchyChanged);
-pub const XI_PropertyEventMask: i32 = (1 << XI_PropertyEvent);
-pub const XI_RawKeyPressMask: i32 = (1 << XI_RawKeyPress);
-pub const XI_RawKeyReleaseMask: i32 = (1 << XI_RawKeyRelease);
-pub const XI_RawButtonPressMask: i32 = (1 << XI_RawButtonPress);
-pub const XI_RawButtonReleaseMask: i32 = (1 << XI_RawButtonRelease);
-pub const XI_RawMotionMask: i32 = (1 << XI_RawMotion);
-pub const XI_TouchBeginMask: i32 = (1 << XI_TouchBegin);
-pub const XI_TouchEndMask: i32 = (1 << XI_TouchEnd);
-pub const XI_TouchOwnershipChangedMask: i32 = (1 << XI_TouchOwnership);
-pub const XI_TouchUpdateMask: i32 = (1 << XI_TouchUpdate);
-pub const XI_RawTouchBeginMask: i32 = (1 << XI_RawTouchBegin);
-pub const XI_RawTouchEndMask: i32 = (1 << XI_RawTouchEnd);
-pub const XI_RawTouchUpdateMask: i32 = (1 << XI_RawTouchUpdate);
-pub const XI_BarrierHitMask: i32 = (1 << XI_BarrierHit);
-pub const XI_BarrierLeaveMask: i32 = (1 << XI_BarrierLeave);
-
-//
-// structs
-// (auto-generated with rust-bindgen)
-//
-
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed1 {
- pub _type: ::std::os::raw::c_int,
- pub name: *mut ::std::os::raw::c_char,
- pub send_core: ::std::os::raw::c_int,
- pub enable: ::std::os::raw::c_int,
-}
-impl ::std::clone::Clone for Struct_Unnamed1 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed1 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIAddMasterInfo = Struct_Unnamed1;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed2 {
- pub _type: ::std::os::raw::c_int,
- pub deviceid: ::std::os::raw::c_int,
- pub return_mode: ::std::os::raw::c_int,
- pub return_pointer: ::std::os::raw::c_int,
- pub return_keyboard: ::std::os::raw::c_int,
-}
-impl ::std::clone::Clone for Struct_Unnamed2 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed2 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIRemoveMasterInfo = Struct_Unnamed2;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed3 {
- pub _type: ::std::os::raw::c_int,
- pub deviceid: ::std::os::raw::c_int,
- pub new_master: ::std::os::raw::c_int,
-}
-impl ::std::clone::Clone for Struct_Unnamed3 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed3 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIAttachSlaveInfo = Struct_Unnamed3;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed4 {
- pub _type: ::std::os::raw::c_int,
- pub deviceid: ::std::os::raw::c_int,
-}
-impl ::std::clone::Clone for Struct_Unnamed4 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed4 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIDetachSlaveInfo = Struct_Unnamed4;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Union_Unnamed5 {
- pub _bindgen_data_: [u64; 3usize],
-}
-impl Union_Unnamed5 {
- pub unsafe fn _type(&mut self) -> *mut ::std::os::raw::c_int {
- let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
- ::std::mem::transmute(raw.offset(0))
- }
- pub unsafe fn add(&mut self) -> *mut XIAddMasterInfo {
- let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
- ::std::mem::transmute(raw.offset(0))
- }
- pub unsafe fn remove(&mut self) -> *mut XIRemoveMasterInfo {
- let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
- ::std::mem::transmute(raw.offset(0))
- }
- pub unsafe fn attach(&mut self) -> *mut XIAttachSlaveInfo {
- let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
- ::std::mem::transmute(raw.offset(0))
- }
- pub unsafe fn detach(&mut self) -> *mut XIDetachSlaveInfo {
- let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_);
- ::std::mem::transmute(raw.offset(0))
- }
-}
-impl ::std::clone::Clone for Union_Unnamed5 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Union_Unnamed5 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIAnyHierarchyChangeInfo = Union_Unnamed5;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed6 {
- pub base: ::std::os::raw::c_int,
- pub latched: ::std::os::raw::c_int,
- pub locked: ::std::os::raw::c_int,
- pub effective: ::std::os::raw::c_int,
-}
-impl ::std::clone::Clone for Struct_Unnamed6 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed6 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIModifierState = Struct_Unnamed6;
-pub type XIGroupState = XIModifierState;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed7 {
- pub mask_len: ::std::os::raw::c_int,
- pub mask: *mut ::std::os::raw::c_uchar,
-}
-impl ::std::clone::Clone for Struct_Unnamed7 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed7 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIButtonState = Struct_Unnamed7;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed8 {
- pub mask_len: ::std::os::raw::c_int,
- pub mask: *mut ::std::os::raw::c_uchar,
- pub values: *mut ::std::os::raw::c_double,
-}
-impl ::std::clone::Clone for Struct_Unnamed8 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed8 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIValuatorState = Struct_Unnamed8;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed9 {
- pub deviceid: ::std::os::raw::c_int,
- pub mask_len: ::std::os::raw::c_int,
- pub mask: *mut ::std::os::raw::c_uchar,
-}
-impl ::std::clone::Clone for Struct_Unnamed9 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed9 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIEventMask = Struct_Unnamed9;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed10 {
- pub _type: ::std::os::raw::c_int,
- pub sourceid: ::std::os::raw::c_int,
-}
-impl ::std::clone::Clone for Struct_Unnamed10 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed10 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIAnyClassInfo = Struct_Unnamed10;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed11 {
- pub _type: ::std::os::raw::c_int,
- pub sourceid: ::std::os::raw::c_int,
- pub num_buttons: ::std::os::raw::c_int,
- pub labels: *mut Atom,
- pub state: XIButtonState,
-}
-impl ::std::clone::Clone for Struct_Unnamed11 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed11 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIButtonClassInfo = Struct_Unnamed11;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed12 {
- pub _type: ::std::os::raw::c_int,
- pub sourceid: ::std::os::raw::c_int,
- pub num_keycodes: ::std::os::raw::c_int,
- pub keycodes: *mut ::std::os::raw::c_int,
-}
-impl ::std::clone::Clone for Struct_Unnamed12 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed12 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIKeyClassInfo = Struct_Unnamed12;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed13 {
- pub _type: ::std::os::raw::c_int,
- pub sourceid: ::std::os::raw::c_int,
- pub number: ::std::os::raw::c_int,
- pub label: Atom,
- pub min: ::std::os::raw::c_double,
- pub max: ::std::os::raw::c_double,
- pub value: ::std::os::raw::c_double,
- pub resolution: ::std::os::raw::c_int,
- pub mode: ::std::os::raw::c_int,
-}
-impl ::std::clone::Clone for Struct_Unnamed13 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed13 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIValuatorClassInfo = Struct_Unnamed13;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed14 {
- pub _type: ::std::os::raw::c_int,
- pub sourceid: ::std::os::raw::c_int,
- pub number: ::std::os::raw::c_int,
- pub scroll_type: ::std::os::raw::c_int,
- pub increment: ::std::os::raw::c_double,
- pub flags: ::std::os::raw::c_int,
-}
-impl ::std::clone::Clone for Struct_Unnamed14 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed14 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIScrollClassInfo = Struct_Unnamed14;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed15 {
- pub _type: ::std::os::raw::c_int,
- pub sourceid: ::std::os::raw::c_int,
- pub mode: ::std::os::raw::c_int,
- pub num_touches: ::std::os::raw::c_int,
-}
-impl ::std::clone::Clone for Struct_Unnamed15 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed15 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XITouchClassInfo = Struct_Unnamed15;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed16 {
- pub deviceid: ::std::os::raw::c_int,
- pub name: *mut ::std::os::raw::c_char,
- pub _use: ::std::os::raw::c_int,
- pub attachment: ::std::os::raw::c_int,
- pub enabled: ::std::os::raw::c_int,
- pub num_classes: ::std::os::raw::c_int,
- pub classes: *mut *mut XIAnyClassInfo,
-}
-impl ::std::clone::Clone for Struct_Unnamed16 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed16 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIDeviceInfo = Struct_Unnamed16;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed17 {
- pub modifiers: ::std::os::raw::c_int,
- pub status: ::std::os::raw::c_int,
-}
-impl ::std::clone::Clone for Struct_Unnamed17 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed17 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIGrabModifiers = Struct_Unnamed17;
-pub type BarrierEventID = ::std::os::raw::c_uint;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed18 {
- pub deviceid: ::std::os::raw::c_int,
- pub barrier: PointerBarrier,
- pub eventid: BarrierEventID,
-}
-impl ::std::clone::Clone for Struct_Unnamed18 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed18 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIBarrierReleasePointerInfo = Struct_Unnamed18;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed19 {
- pub _type: ::std::os::raw::c_int,
- pub serial: ::std::os::raw::c_ulong,
- pub send_event: ::std::os::raw::c_int,
- pub display: *mut Display,
- pub extension: ::std::os::raw::c_int,
- pub evtype: ::std::os::raw::c_int,
- pub time: Time,
-}
-impl ::std::clone::Clone for Struct_Unnamed19 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed19 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIEvent = Struct_Unnamed19;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed20 {
- pub deviceid: ::std::os::raw::c_int,
- pub attachment: ::std::os::raw::c_int,
- pub _use: ::std::os::raw::c_int,
- pub enabled: ::std::os::raw::c_int,
- pub flags: ::std::os::raw::c_int,
-}
-impl ::std::clone::Clone for Struct_Unnamed20 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed20 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIHierarchyInfo = Struct_Unnamed20;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed21 {
- pub _type: ::std::os::raw::c_int,
- pub serial: ::std::os::raw::c_ulong,
- pub send_event: ::std::os::raw::c_int,
- pub display: *mut Display,
- pub extension: ::std::os::raw::c_int,
- pub evtype: ::std::os::raw::c_int,
- pub time: Time,
- pub flags: ::std::os::raw::c_int,
- pub num_info: ::std::os::raw::c_int,
- pub info: *mut XIHierarchyInfo,
-}
-impl ::std::clone::Clone for Struct_Unnamed21 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed21 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIHierarchyEvent = Struct_Unnamed21;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed22 {
- pub _type: ::std::os::raw::c_int,
- pub serial: ::std::os::raw::c_ulong,
- pub send_event: ::std::os::raw::c_int,
- pub display: *mut Display,
- pub extension: ::std::os::raw::c_int,
- pub evtype: ::std::os::raw::c_int,
- pub time: Time,
- pub deviceid: ::std::os::raw::c_int,
- pub sourceid: ::std::os::raw::c_int,
- pub reason: ::std::os::raw::c_int,
- pub num_classes: ::std::os::raw::c_int,
- pub classes: *mut *mut XIAnyClassInfo,
-}
-impl ::std::clone::Clone for Struct_Unnamed22 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed22 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIDeviceChangedEvent = Struct_Unnamed22;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed23 {
- pub _type: ::std::os::raw::c_int,
- pub serial: ::std::os::raw::c_ulong,
- pub send_event: ::std::os::raw::c_int,
- pub display: *mut Display,
- pub extension: ::std::os::raw::c_int,
- pub evtype: ::std::os::raw::c_int,
- pub time: Time,
- pub deviceid: ::std::os::raw::c_int,
- pub sourceid: ::std::os::raw::c_int,
- pub detail: ::std::os::raw::c_int,
- pub root: Window,
- pub event: Window,
- pub child: Window,
- pub root_x: ::std::os::raw::c_double,
- pub root_y: ::std::os::raw::c_double,
- pub event_x: ::std::os::raw::c_double,
- pub event_y: ::std::os::raw::c_double,
- pub flags: ::std::os::raw::c_int,
- pub buttons: XIButtonState,
- pub valuators: XIValuatorState,
- pub mods: XIModifierState,
- pub group: XIGroupState,
-}
-impl ::std::clone::Clone for Struct_Unnamed23 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed23 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIDeviceEvent = Struct_Unnamed23;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed24 {
- pub _type: ::std::os::raw::c_int,
- pub serial: ::std::os::raw::c_ulong,
- pub send_event: ::std::os::raw::c_int,
- pub display: *mut Display,
- pub extension: ::std::os::raw::c_int,
- pub evtype: ::std::os::raw::c_int,
- pub time: Time,
- pub deviceid: ::std::os::raw::c_int,
- pub sourceid: ::std::os::raw::c_int,
- pub detail: ::std::os::raw::c_int,
- pub flags: ::std::os::raw::c_int,
- pub valuators: XIValuatorState,
- pub raw_values: *mut ::std::os::raw::c_double,
-}
-impl ::std::clone::Clone for Struct_Unnamed24 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed24 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIRawEvent = Struct_Unnamed24;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed25 {
- pub _type: ::std::os::raw::c_int,
- pub serial: ::std::os::raw::c_ulong,
- pub send_event: ::std::os::raw::c_int,
- pub display: *mut Display,
- pub extension: ::std::os::raw::c_int,
- pub evtype: ::std::os::raw::c_int,
- pub time: Time,
- pub deviceid: ::std::os::raw::c_int,
- pub sourceid: ::std::os::raw::c_int,
- pub detail: ::std::os::raw::c_int,
- pub root: Window,
- pub event: Window,
- pub child: Window,
- pub root_x: ::std::os::raw::c_double,
- pub root_y: ::std::os::raw::c_double,
- pub event_x: ::std::os::raw::c_double,
- pub event_y: ::std::os::raw::c_double,
- pub mode: ::std::os::raw::c_int,
- pub focus: ::std::os::raw::c_int,
- pub same_screen: ::std::os::raw::c_int,
- pub buttons: XIButtonState,
- pub mods: XIModifierState,
- pub group: XIGroupState,
-}
-impl ::std::clone::Clone for Struct_Unnamed25 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed25 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIEnterEvent = Struct_Unnamed25;
-pub type XILeaveEvent = XIEnterEvent;
-pub type XIFocusInEvent = XIEnterEvent;
-pub type XIFocusOutEvent = XIEnterEvent;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed26 {
- pub _type: ::std::os::raw::c_int,
- pub serial: ::std::os::raw::c_ulong,
- pub send_event: ::std::os::raw::c_int,
- pub display: *mut Display,
- pub extension: ::std::os::raw::c_int,
- pub evtype: ::std::os::raw::c_int,
- pub time: Time,
- pub deviceid: ::std::os::raw::c_int,
- pub property: Atom,
- pub what: ::std::os::raw::c_int,
-}
-impl ::std::clone::Clone for Struct_Unnamed26 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed26 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIPropertyEvent = Struct_Unnamed26;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed27 {
- pub _type: ::std::os::raw::c_int,
- pub serial: ::std::os::raw::c_ulong,
- pub send_event: ::std::os::raw::c_int,
- pub display: *mut Display,
- pub extension: ::std::os::raw::c_int,
- pub evtype: ::std::os::raw::c_int,
- pub time: Time,
- pub deviceid: ::std::os::raw::c_int,
- pub sourceid: ::std::os::raw::c_int,
- pub touchid: ::std::os::raw::c_uint,
- pub root: Window,
- pub event: Window,
- pub child: Window,
- pub flags: ::std::os::raw::c_int,
-}
-impl ::std::clone::Clone for Struct_Unnamed27 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed27 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XITouchOwnershipEvent = Struct_Unnamed27;
-#[repr(C)]
-#[derive(Copy)]
-pub struct Struct_Unnamed28 {
- pub _type: ::std::os::raw::c_int,
- pub serial: ::std::os::raw::c_ulong,
- pub send_event: ::std::os::raw::c_int,
- pub display: *mut Display,
- pub extension: ::std::os::raw::c_int,
- pub evtype: ::std::os::raw::c_int,
- pub time: Time,
- pub deviceid: ::std::os::raw::c_int,
- pub sourceid: ::std::os::raw::c_int,
- pub event: Window,
- pub root: Window,
- pub root_x: ::std::os::raw::c_double,
- pub root_y: ::std::os::raw::c_double,
- pub dx: ::std::os::raw::c_double,
- pub dy: ::std::os::raw::c_double,
- pub dtime: ::std::os::raw::c_int,
- pub flags: ::std::os::raw::c_int,
- pub barrier: PointerBarrier,
- pub eventid: BarrierEventID,
-}
-impl ::std::clone::Clone for Struct_Unnamed28 {
- fn clone(&self) -> Self { *self }
-}
-impl ::std::default::Default for Struct_Unnamed28 {
- fn default() -> Self { unsafe { ::std::mem::zeroed() } }
-}
-pub type XIBarrierEvent = Struct_Unnamed28;
-
deleted file mode 100644
--- a/third_party/rust/x11/src/xlib.rs
+++ /dev/null
@@ -1,3212 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::mem;
-use std::slice;
-use std::os::raw::{
- c_char,
- c_double,
- c_int,
- c_long,
- c_short,
- c_schar,
- c_uchar,
- c_uint,
- c_ulong,
- c_ushort,
- c_void,
-};
-
-use libc::wchar_t;
-
-use ::internal::{
- mem_eq,
- transmute_union,
-};
-
-// deprecated
-pub mod xkb {}
-
-
-//
-// functions
-//
-
-
-x11_link! { Xlib, x11, ["libX11.so.6", "libX11.so"], 767,
- pub fn XActivateScreenSaver (_1: *mut Display) -> c_int,
- pub fn XAddConnectionWatch (_3: *mut Display, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char, c_int, c_int, *mut *mut c_char)>, _1: *mut c_char) -> c_int,
- pub fn XAddExtension (_1: *mut Display) -> *mut XExtCodes,
- pub fn XAddHost (_2: *mut Display, _1: *mut XHostAddress) -> c_int,
- pub fn XAddHosts (_3: *mut Display, _2: *mut XHostAddress, _1: c_int) -> c_int,
- pub fn XAddPixel (_2: *mut XImage, _1: c_long) -> c_int,
- pub fn XAddToExtensionList (_2: *mut *mut XExtData, _1: *mut XExtData) -> c_int,
- pub fn XAddToSaveSet (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XAllocClassHint () -> *mut XClassHint,
- pub fn XAllocColor (_3: *mut Display, _2: c_ulong, _1: *mut XColor) -> c_int,
- pub fn XAllocColorCells (_7: *mut Display, _6: c_ulong, _5: c_int, _4: *mut c_ulong, _3: c_uint, _2: *mut c_ulong, _1: c_uint) -> c_int,
- pub fn XAllocColorPlanes (_11: *mut Display, _10: c_ulong, _9: c_int, _8: *mut c_ulong, _7: c_int, _6: c_int, _5: c_int, _4: c_int, _3: *mut c_ulong, _2: *mut c_ulong, _1: *mut c_ulong) -> c_int,
- pub fn XAllocIconSize () -> *mut XIconSize,
- pub fn XAllocNamedColor (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: *mut XColor, _1: *mut XColor) -> c_int,
- pub fn XAllocSizeHints () -> *mut XSizeHints,
- pub fn XAllocStandardColormap () -> *mut XStandardColormap,
- pub fn XAllocWMHints () -> *mut XWMHints,
- pub fn XAllowEvents (_3: *mut Display, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XAllPlanes () -> c_ulong,
- pub fn XAutoRepeatOff (_1: *mut Display) -> c_int,
- pub fn XAutoRepeatOn (_1: *mut Display) -> c_int,
- pub fn XBaseFontNameListOfFontSet (_1: XFontSet) -> *mut c_char,
- pub fn XBell (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XBitmapBitOrder (_1: *mut Display) -> c_int,
- pub fn XBitmapPad (_1: *mut Display) -> c_int,
- pub fn XBitmapUnit (_1: *mut Display) -> c_int,
- pub fn XBlackPixel (_2: *mut Display, _1: c_int) -> c_ulong,
- pub fn XBlackPixelOfScreen (_1: *mut Screen) -> c_ulong,
- pub fn XCellsOfScreen (_1: *mut Screen) -> c_int,
- pub fn XChangeActivePointerGrab (_4: *mut Display, _3: c_uint, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XChangeGC (_4: *mut Display, _3: GC, _2: c_ulong, _1: *mut XGCValues) -> c_int,
- pub fn XChangeKeyboardControl (_3: *mut Display, _2: c_ulong, _1: *mut XKeyboardControl) -> c_int,
- pub fn XChangeKeyboardMapping (_5: *mut Display, _4: c_int, _3: c_int, _2: *mut c_ulong, _1: c_int) -> c_int,
- pub fn XChangePointerControl (_6: *mut Display, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int,
- pub fn XChangeProperty (_8: *mut Display, _7: c_ulong, _6: c_ulong, _5: c_ulong, _4: c_int, _3: c_int, _2: *const c_uchar, _1: c_int) -> c_int,
- pub fn XChangeSaveSet (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int,
- pub fn XChangeWindowAttributes (_4: *mut Display, _3: c_ulong, _2: c_ulong, _1: *mut XSetWindowAttributes) -> c_int,
- pub fn XCheckIfEvent (_4: *mut Display, _3: *mut XEvent, _2: Option<unsafe extern "C" fn (*mut Display, *mut XEvent, *mut c_char) -> c_int>, _1: *mut c_char) -> c_int,
- pub fn XCheckMaskEvent (_3: *mut Display, _2: c_long, _1: *mut XEvent) -> c_int,
- pub fn XCheckTypedEvent (_3: *mut Display, _2: c_int, _1: *mut XEvent) -> c_int,
- pub fn XCheckTypedWindowEvent (_4: *mut Display, _3: c_ulong, _2: c_int, _1: *mut XEvent) -> c_int,
- pub fn XCheckWindowEvent (_4: *mut Display, _3: c_ulong, _2: c_long, _1: *mut XEvent) -> c_int,
- pub fn XCirculateSubwindows (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int,
- pub fn XCirculateSubwindowsDown (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XCirculateSubwindowsUp (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XClearArea (_7: *mut Display, _6: c_ulong, _5: c_int, _4: c_int, _3: c_uint, _2: c_uint, _1: c_int) -> c_int,
- pub fn XClearWindow (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XClipBox (_2: Region, _1: *mut XRectangle) -> c_int,
- pub fn XCloseDisplay (_1: *mut Display) -> c_int,
- pub fn XCloseIM (_1: XIM) -> c_int,
- pub fn XCloseOM (_1: XOM) -> c_int,
- pub fn XcmsAddColorSpace (_1: *mut XcmsColorSpace) -> c_int,
- pub fn XcmsAddFunctionSet (_1: *mut XcmsFunctionSet) -> c_int,
- pub fn XcmsAllocColor (_4: *mut Display, _3: c_ulong, _2: *mut XcmsColor, _1: c_ulong) -> c_int,
- pub fn XcmsAllocNamedColor (_6: *mut Display, _5: c_ulong, _4: *const c_char, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_ulong) -> c_int,
- pub fn XcmsCCCOfColormap (_2: *mut Display, _1: c_ulong) -> XcmsCCC,
- pub fn XcmsCIELabClipab (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsCIELabClipL (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsCIELabClipLab (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsCIELabQueryMaxC (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsCIELabQueryMaxL (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsCIELabQueryMaxLC (_3: XcmsCCC, _2: c_double, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsCIELabQueryMinL (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsCIELabToCIEXYZ (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int,
- pub fn XcmsCIELabWhiteShiftColors (_7: XcmsCCC, _6: *mut XcmsColor, _5: *mut XcmsColor, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsCIELuvClipL (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsCIELuvClipLuv (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsCIELuvClipuv (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsCIELuvQueryMaxC (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsCIELuvQueryMaxL (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsCIELuvQueryMaxLC (_3: XcmsCCC, _2: c_double, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsCIELuvQueryMinL (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsCIELuvToCIEuvY (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int,
- pub fn XcmsCIELuvWhiteShiftColors (_7: XcmsCCC, _6: *mut XcmsColor, _5: *mut XcmsColor, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsCIEuvYToCIELuv (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int,
- pub fn XcmsCIEuvYToCIEXYZ (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int,
- pub fn XcmsCIEuvYToTekHVC (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int,
- pub fn XcmsCIExyYToCIEXYZ (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int,
- pub fn XcmsCIEXYZToCIELab (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int,
- pub fn XcmsCIEXYZToCIEuvY (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int,
- pub fn XcmsCIEXYZToCIExyY (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int,
- pub fn XcmsCIEXYZToRGBi (_4: XcmsCCC, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsClientWhitePointOfCCC (_1: XcmsCCC) -> *mut XcmsColor,
- pub fn XcmsConvertColors (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_ulong, _1: *mut c_int) -> c_int,
- pub fn XcmsCreateCCC (_8: *mut Display, _7: c_int, _6: *mut Visual, _5: *mut XcmsColor, _4: Option<unsafe extern "C" fn (XcmsCCC, *mut XcmsColor, c_uint, c_uint, *mut c_int) -> c_int>, _3: *mut c_char, _2: Option<unsafe extern "C" fn (XcmsCCC, *mut XcmsColor, *mut XcmsColor, c_ulong, *mut XcmsColor, c_uint, *mut c_int) -> c_int>, _1: *mut c_char) -> XcmsCCC,
- pub fn XcmsDefaultCCC (_2: *mut Display, _1: c_int) -> XcmsCCC,
- pub fn XcmsDisplayOfCCC (_1: XcmsCCC) -> *mut Display,
- pub fn XcmsFormatOfPrefix (_1: *mut c_char) -> c_ulong,
- pub fn XcmsFreeCCC (_1: XcmsCCC) -> (),
- pub fn XcmsLookupColor (_6: *mut Display, _5: c_ulong, _4: *const c_char, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_ulong) -> c_int,
- pub fn XcmsPrefixOfFormat (_1: c_ulong) -> *mut c_char,
- pub fn XcmsQueryBlack (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsQueryBlue (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsQueryColor (_4: *mut Display, _3: c_ulong, _2: *mut XcmsColor, _1: c_ulong) -> c_int,
- pub fn XcmsQueryColors (_5: *mut Display, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: c_ulong) -> c_int,
- pub fn XcmsQueryGreen (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsQueryRed (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsQueryWhite (_3: XcmsCCC, _2: c_ulong, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsRGBiToCIEXYZ (_4: XcmsCCC, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsRGBiToRGB (_4: XcmsCCC, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsRGBToRGBi (_4: XcmsCCC, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsScreenNumberOfCCC (_1: XcmsCCC) -> c_int,
- pub fn XcmsScreenWhitePointOfCCC (_1: XcmsCCC) -> *mut XcmsColor,
- pub fn XcmsSetCCCOfColormap (_3: *mut Display, _2: c_ulong, _1: XcmsCCC) -> XcmsCCC,
- pub fn XcmsSetCompressionProc (_3: XcmsCCC, _2: Option<unsafe extern "C" fn (XcmsCCC, *mut XcmsColor, c_uint, c_uint, *mut c_int) -> c_int>, _1: *mut c_char) -> Option<unsafe extern "C" fn (XcmsCCC, *mut XcmsColor, c_uint, c_uint, *mut c_int) -> c_int>,
- pub fn XcmsSetWhiteAdjustProc (_3: XcmsCCC, _2: Option<unsafe extern "C" fn (XcmsCCC, *mut XcmsColor, *mut XcmsColor, c_ulong, *mut XcmsColor, c_uint, *mut c_int) -> c_int>, _1: *mut c_char) -> Option<unsafe extern "C" fn (XcmsCCC, *mut XcmsColor, *mut XcmsColor, c_ulong, *mut XcmsColor, c_uint, *mut c_int) -> c_int>,
- pub fn XcmsSetWhitePoint (_2: XcmsCCC, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsStoreColor (_3: *mut Display, _2: c_ulong, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsStoreColors (_5: *mut Display, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsTekHVCClipC (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsTekHVCClipV (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsTekHVCClipVC (_5: XcmsCCC, _4: *mut XcmsColor, _3: c_uint, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsTekHVCQueryMaxC (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsTekHVCQueryMaxV (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsTekHVCQueryMaxVC (_3: XcmsCCC, _2: c_double, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsTekHVCQueryMaxVSamples (_4: XcmsCCC, _3: c_double, _2: *mut XcmsColor, _1: c_uint) -> c_int,
- pub fn XcmsTekHVCQueryMinV (_4: XcmsCCC, _3: c_double, _2: c_double, _1: *mut XcmsColor) -> c_int,
- pub fn XcmsTekHVCToCIEuvY (_4: XcmsCCC, _3: *mut XcmsColor, _2: *mut XcmsColor, _1: c_uint) -> c_int,
- pub fn XcmsTekHVCWhiteShiftColors (_7: XcmsCCC, _6: *mut XcmsColor, _5: *mut XcmsColor, _4: c_ulong, _3: *mut XcmsColor, _2: c_uint, _1: *mut c_int) -> c_int,
- pub fn XcmsVisualOfCCC (_1: XcmsCCC) -> *mut Visual,
- pub fn XConfigureWindow (_4: *mut Display, _3: c_ulong, _2: c_uint, _1: *mut XWindowChanges) -> c_int,
- pub fn XConnectionNumber (_1: *mut Display) -> c_int,
- pub fn XContextDependentDrawing (_1: XFontSet) -> c_int,
- pub fn XContextualDrawing (_1: XFontSet) -> c_int,
- pub fn XConvertCase (_3: c_ulong, _2: *mut c_ulong, _1: *mut c_ulong) -> (),
- pub fn XConvertSelection (_6: *mut Display, _5: c_ulong, _4: c_ulong, _3: c_ulong, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XCopyArea (_10: *mut Display, _9: c_ulong, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int,
- pub fn XCopyColormapAndFree (_2: *mut Display, _1: c_ulong) -> c_ulong,
- pub fn XCopyGC (_4: *mut Display, _3: GC, _2: c_ulong, _1: GC) -> c_int,
- pub fn XCopyPlane (_11: *mut Display, _10: c_ulong, _9: c_ulong, _8: GC, _7: c_int, _6: c_int, _5: c_uint, _4: c_uint, _3: c_int, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XCreateBitmapFromData (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: c_uint, _1: c_uint) -> c_ulong,
- pub fn XCreateColormap (_4: *mut Display, _3: c_ulong, _2: *mut Visual, _1: c_int) -> c_ulong,
- pub fn XCreateFontCursor (_2: *mut Display, _1: c_uint) -> c_ulong,
- pub fn XCreateFontSet (_5: *mut Display, _4: *const c_char, _3: *mut *mut *mut c_char, _2: *mut c_int, _1: *mut *mut c_char) -> XFontSet,
- pub fn XCreateGC (_4: *mut Display, _3: c_ulong, _2: c_ulong, _1: *mut XGCValues) -> GC,
- pub fn XCreateGlyphCursor (_7: *mut Display, _6: c_ulong, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *const XColor, _1: *const XColor) -> c_ulong,
- pub fn XCreateImage (_10: *mut Display, _9: *mut Visual, _8: c_uint, _7: c_int, _6: c_int, _5: *mut c_char, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> *mut XImage,
- pub fn XCreatePixmap (_5: *mut Display, _4: c_ulong, _3: c_uint, _2: c_uint, _1: c_uint) -> c_ulong,
- pub fn XCreatePixmapCursor (_7: *mut Display, _6: c_ulong, _5: c_ulong, _4: *mut XColor, _3: *mut XColor, _2: c_uint, _1: c_uint) -> c_ulong,
- pub fn XCreatePixmapFromBitmapData (_8: *mut Display, _7: c_ulong, _6: *mut c_char, _5: c_uint, _4: c_uint, _3: c_ulong, _2: c_ulong, _1: c_uint) -> c_ulong,
- pub fn XCreateRegion () -> Region,
- pub fn XCreateSimpleWindow (_9: *mut Display, _8: c_ulong, _7: c_int, _6: c_int, _5: c_uint, _4: c_uint, _3: c_uint, _2: c_ulong, _1: c_ulong) -> c_ulong,
- pub fn XCreateWindow (_12: *mut Display, _11: c_ulong, _10: c_int, _9: c_int, _8: c_uint, _7: c_uint, _6: c_uint, _5: c_int, _4: c_uint, _3: *mut Visual, _2: c_ulong, _1: *mut XSetWindowAttributes) -> c_ulong,
- pub fn XDefaultColormap (_2: *mut Display, _1: c_int) -> c_ulong,
- pub fn XDefaultColormapOfScreen (_1: *mut Screen) -> c_ulong,
- pub fn XDefaultDepth (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XDefaultDepthOfScreen (_1: *mut Screen) -> c_int,
- pub fn XDefaultGC (_2: *mut Display, _1: c_int) -> GC,
- pub fn XDefaultGCOfScreen (_1: *mut Screen) -> GC,
- pub fn XDefaultRootWindow (_1: *mut Display) -> c_ulong,
- pub fn XDefaultScreen (_1: *mut Display) -> c_int,
- pub fn XDefaultScreenOfDisplay (_1: *mut Display) -> *mut Screen,
- pub fn XDefaultString () -> *const c_char,
- pub fn XDefaultVisual (_2: *mut Display, _1: c_int) -> *mut Visual,
- pub fn XDefaultVisualOfScreen (_1: *mut Screen) -> *mut Visual,
- pub fn XDefineCursor (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XDeleteContext (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int,
- pub fn XDeleteModifiermapEntry (_3: *mut XModifierKeymap, _2: c_uchar, _1: c_int) -> *mut XModifierKeymap,
- pub fn XDeleteProperty (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XDestroyIC (_1: XIC) -> (),
- pub fn XDestroyImage (_1: *mut XImage) -> c_int,
- pub fn XDestroyOC (_1: XFontSet) -> (),
- pub fn XDestroyRegion (_1: Region) -> c_int,
- pub fn XDestroySubwindows (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XDestroyWindow (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XDirectionalDependentDrawing (_1: XFontSet) -> c_int,
- pub fn XDisableAccessControl (_1: *mut Display) -> c_int,
- pub fn XDisplayCells (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XDisplayHeight (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XDisplayHeightMM (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XDisplayKeycodes (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XDisplayMotionBufferSize (_1: *mut Display) -> c_ulong,
- pub fn XDisplayName (_1: *const c_char) -> *mut c_char,
- pub fn XDisplayOfIM (_1: XIM) -> *mut Display,
- pub fn XDisplayOfOM (_1: XOM) -> *mut Display,
- pub fn XDisplayOfScreen (_1: *mut Screen) -> *mut Display,
- pub fn XDisplayPlanes (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XDisplayString (_1: *mut Display) -> *mut c_char,
- pub fn XDisplayWidth (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XDisplayWidthMM (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XDoesBackingStore (_1: *mut Screen) -> c_int,
- pub fn XDoesSaveUnders (_1: *mut Screen) -> c_int,
- pub fn XDrawArc (_9: *mut Display, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int,
- pub fn XDrawArcs (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XArc, _1: c_int) -> c_int,
- pub fn XDrawImageString (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> c_int,
- pub fn XDrawImageString16 (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *const XChar2b, _1: c_int) -> c_int,
- pub fn XDrawLine (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int,
- pub fn XDrawLines (_6: *mut Display, _5: c_ulong, _4: GC, _3: *mut XPoint, _2: c_int, _1: c_int) -> c_int,
- pub fn XDrawPoint (_5: *mut Display, _4: c_ulong, _3: GC, _2: c_int, _1: c_int) -> c_int,
- pub fn XDrawPoints (_6: *mut Display, _5: c_ulong, _4: GC, _3: *mut XPoint, _2: c_int, _1: c_int) -> c_int,
- pub fn XDrawRectangle (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XDrawRectangles (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XRectangle, _1: c_int) -> c_int,
- pub fn XDrawSegments (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XSegment, _1: c_int) -> c_int,
- pub fn XDrawString (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> c_int,
- pub fn XDrawString16 (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *const XChar2b, _1: c_int) -> c_int,
- pub fn XDrawText (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XTextItem, _1: c_int) -> c_int,
- pub fn XDrawText16 (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XTextItem16, _1: c_int) -> c_int,
- pub fn XEHeadOfExtensionList (_1: XEDataObject) -> *mut *mut XExtData,
- pub fn XEmptyRegion (_1: Region) -> c_int,
- pub fn XEnableAccessControl (_1: *mut Display) -> c_int,
- pub fn XEqualRegion (_2: Region, _1: Region) -> c_int,
- pub fn XESetBeforeFlush (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XExtCodes, *const c_char, c_long)>) -> Option<unsafe extern "C" fn (*mut Display, *mut XExtCodes, *const c_char, c_long)>,
- pub fn XESetCloseDisplay (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XExtCodes) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XExtCodes) -> c_int>,
- pub fn XESetCopyEventCookie (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XGenericEventCookie, *mut XGenericEventCookie) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XGenericEventCookie, *mut XGenericEventCookie) -> c_int>,
- pub fn XESetCopyGC (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>,
- pub fn XESetCreateFont (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XFontStruct, *mut XExtCodes) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XFontStruct, *mut XExtCodes) -> c_int>,
- pub fn XESetCreateGC (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>,
- pub fn XESetError (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut xError, *mut XExtCodes, *mut c_int) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut xError, *mut XExtCodes, *mut c_int) -> c_int>,
- pub fn XESetErrorString (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, c_int, *mut XExtCodes, *mut c_char, c_int) -> *mut c_char>) -> Option<unsafe extern "C" fn (*mut Display, c_int, *mut XExtCodes, *mut c_char, c_int) -> *mut c_char>,
- pub fn XESetEventToWire (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XEvent, *mut xEvent) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XEvent, *mut xEvent) -> c_int>,
- pub fn XESetFlushGC (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>,
- pub fn XESetFreeFont (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XFontStruct, *mut XExtCodes) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XFontStruct, *mut XExtCodes) -> c_int>,
- pub fn XESetFreeGC (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, GC, *mut XExtCodes) -> c_int>,
- pub fn XESetPrintErrorValues (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XErrorEvent, *mut c_void)>) -> Option<unsafe extern "C" fn (*mut Display, *mut XErrorEvent, *mut c_void)>,
- pub fn XESetWireToError (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XErrorEvent, *mut xError) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XErrorEvent, *mut xError) -> c_int>,
- pub fn XESetWireToEvent (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XEvent, *mut xEvent) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XEvent, *mut xEvent) -> c_int>,
- pub fn XESetWireToEventCookie (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut Display, *mut XGenericEventCookie, *mut xEvent) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XGenericEventCookie, *mut xEvent) -> c_int>,
- pub fn XEventMaskOfScreen (_1: *mut Screen) -> c_long,
- pub fn XEventsQueued (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XExtendedMaxRequestSize (_1: *mut Display) -> c_long,
- pub fn XExtentsOfFontSet (_1: XFontSet) -> *mut XFontSetExtents,
- pub fn XFetchBuffer (_3: *mut Display, _2: *mut c_int, _1: c_int) -> *mut c_char,
- pub fn XFetchBytes (_2: *mut Display, _1: *mut c_int) -> *mut c_char,
- pub fn XFetchName (_3: *mut Display, _2: c_ulong, _1: *mut *mut c_char) -> c_int,
- pub fn XFillArc (_9: *mut Display, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int,
- pub fn XFillArcs (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XArc, _1: c_int) -> c_int,
- pub fn XFillPolygon (_7: *mut Display, _6: c_ulong, _5: GC, _4: *mut XPoint, _3: c_int, _2: c_int, _1: c_int) -> c_int,
- pub fn XFillRectangle (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XFillRectangles (_5: *mut Display, _4: c_ulong, _3: GC, _2: *mut XRectangle, _1: c_int) -> c_int,
- pub fn XFilterEvent (_2: *mut XEvent, _1: c_ulong) -> c_int,
- pub fn XFindContext (_4: *mut Display, _3: c_ulong, _2: c_int, _1: *mut *mut c_char) -> c_int,
- pub fn XFindOnExtensionList (_2: *mut *mut XExtData, _1: c_int) -> *mut XExtData,
- pub fn XFlush (_1: *mut Display) -> c_int,
- pub fn XFlushGC (_2: *mut Display, _1: GC) -> (),
- pub fn XFontsOfFontSet (_3: XFontSet, _2: *mut *mut *mut XFontStruct, _1: *mut *mut *mut c_char) -> c_int,
- pub fn XForceScreenSaver (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XFree (_1: *mut c_void) -> c_int,
- pub fn XFreeColormap (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XFreeColors (_5: *mut Display, _4: c_ulong, _3: *mut c_ulong, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XFreeCursor (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XFreeEventData (_2: *mut Display, _1: *mut XGenericEventCookie) -> (),
- pub fn XFreeExtensionList (_1: *mut *mut c_char) -> c_int,
- pub fn XFreeFont (_2: *mut Display, _1: *mut XFontStruct) -> c_int,
- pub fn XFreeFontInfo (_3: *mut *mut c_char, _2: *mut XFontStruct, _1: c_int) -> c_int,
- pub fn XFreeFontNames (_1: *mut *mut c_char) -> c_int,
- pub fn XFreeFontPath (_1: *mut *mut c_char) -> c_int,
- pub fn XFreeFontSet (_2: *mut Display, _1: XFontSet) -> (),
- pub fn XFreeGC (_2: *mut Display, _1: GC) -> c_int,
- pub fn XFreeModifiermap (_1: *mut XModifierKeymap) -> c_int,
- pub fn XFreePixmap (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XFreeStringList (_1: *mut *mut c_char) -> (),
- pub fn XGContextFromGC (_1: GC) -> c_ulong,
- pub fn XGeometry (_13: *mut Display, _12: c_int, _11: *const c_char, _10: *const c_char, _9: c_uint, _8: c_uint, _7: c_uint, _6: c_int, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XGetAtomName (_2: *mut Display, _1: c_ulong) -> *mut c_char,
- pub fn XGetAtomNames (_4: *mut Display, _3: *mut c_ulong, _2: c_int, _1: *mut *mut c_char) -> c_int,
- pub fn XGetClassHint (_3: *mut Display, _2: c_ulong, _1: *mut XClassHint) -> c_int,
- pub fn XGetCommand (_4: *mut Display, _3: c_ulong, _2: *mut *mut *mut c_char, _1: *mut c_int) -> c_int,
- pub fn XGetDefault (_3: *mut Display, _2: *const c_char, _1: *const c_char) -> *mut c_char,
- pub fn XGetErrorDatabaseText (_6: *mut Display, _5: *const c_char, _4: *const c_char, _3: *const c_char, _2: *mut c_char, _1: c_int) -> c_int,
- pub fn XGetErrorText (_4: *mut Display, _3: c_int, _2: *mut c_char, _1: c_int) -> c_int,
- pub fn XGetEventData (_2: *mut Display, _1: *mut XGenericEventCookie) -> c_int,
- pub fn XGetFontPath (_2: *mut Display, _1: *mut c_int) -> *mut *mut c_char,
- pub fn XGetFontProperty (_3: *mut XFontStruct, _2: c_ulong, _1: *mut c_ulong) -> c_int,
- pub fn XGetGCValues (_4: *mut Display, _3: GC, _2: c_ulong, _1: *mut XGCValues) -> c_int,
- pub fn XGetGeometry (_9: *mut Display, _8: c_ulong, _7: *mut c_ulong, _6: *mut c_int, _5: *mut c_int, _4: *mut c_uint, _3: *mut c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int,
- pub fn XGetIconName (_3: *mut Display, _2: c_ulong, _1: *mut *mut c_char) -> c_int,
- pub fn XGetIconSizes (_4: *mut Display, _3: c_ulong, _2: *mut *mut XIconSize, _1: *mut c_int) -> c_int,
- pub fn XGetImage (_8: *mut Display, _7: c_ulong, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_ulong, _1: c_int) -> *mut XImage,
- pub fn XGetInputFocus (_3: *mut Display, _2: *mut c_ulong, _1: *mut c_int) -> c_int,
- pub fn XGetKeyboardControl (_2: *mut Display, _1: *mut XKeyboardState) -> c_int,
- pub fn XGetKeyboardMapping (_4: *mut Display, _3: c_uchar, _2: c_int, _1: *mut c_int) -> *mut c_ulong,
- pub fn XGetModifierMapping (_1: *mut Display) -> *mut XModifierKeymap,
- pub fn XGetMotionEvents (_5: *mut Display, _4: c_ulong, _3: c_ulong, _2: c_ulong, _1: *mut c_int) -> *mut XTimeCoord,
- pub fn XGetNormalHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int,
- pub fn XGetPixel (_3: *mut XImage, _2: c_int, _1: c_int) -> c_ulong,
- pub fn XGetPointerControl (_4: *mut Display, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XGetPointerMapping (_3: *mut Display, _2: *mut c_uchar, _1: c_int) -> c_int,
- pub fn XGetRGBColormaps (_5: *mut Display, _4: c_ulong, _3: *mut *mut XStandardColormap, _2: *mut c_int, _1: c_ulong) -> c_int,
- pub fn XGetScreenSaver (_5: *mut Display, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XGetSelectionOwner (_2: *mut Display, _1: c_ulong) -> c_ulong,
- pub fn XGetSizeHints (_4: *mut Display, _3: c_ulong, _2: *mut XSizeHints, _1: c_ulong) -> c_int,
- pub fn XGetStandardColormap (_4: *mut Display, _3: c_ulong, _2: *mut XStandardColormap, _1: c_ulong) -> c_int,
- pub fn XGetSubImage (_11: *mut Display, _10: c_ulong, _9: c_int, _8: c_int, _7: c_uint, _6: c_uint, _5: c_ulong, _4: c_int, _3: *mut XImage, _2: c_int, _1: c_int) -> *mut XImage,
- pub fn XGetTextProperty (_4: *mut Display, _3: c_ulong, _2: *mut XTextProperty, _1: c_ulong) -> c_int,
- pub fn XGetTransientForHint (_3: *mut Display, _2: c_ulong, _1: *mut c_ulong) -> c_int,
- pub fn XGetVisualInfo (_4: *mut Display, _3: c_long, _2: *mut XVisualInfo, _1: *mut c_int) -> *mut XVisualInfo,
- pub fn XGetWindowAttributes (_3: *mut Display, _2: c_ulong, _1: *mut XWindowAttributes) -> c_int,
- pub fn XGetWindowProperty (_12: *mut Display, _11: c_ulong, _10: c_ulong, _9: c_long, _8: c_long, _7: c_int, _6: c_ulong, _5: *mut c_ulong, _4: *mut c_int, _3: *mut c_ulong, _2: *mut c_ulong, _1: *mut *mut c_uchar) -> c_int,
- pub fn XGetWMClientMachine (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> c_int,
- pub fn XGetWMColormapWindows (_4: *mut Display, _3: c_ulong, _2: *mut *mut c_ulong, _1: *mut c_int) -> c_int,
- pub fn XGetWMHints (_2: *mut Display, _1: c_ulong) -> *mut XWMHints,
- pub fn XGetWMIconName (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> c_int,
- pub fn XGetWMName (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> c_int,
- pub fn XGetWMNormalHints (_4: *mut Display, _3: c_ulong, _2: *mut XSizeHints, _1: *mut c_long) -> c_int,
- pub fn XGetWMProtocols (_4: *mut Display, _3: c_ulong, _2: *mut *mut c_ulong, _1: *mut c_int) -> c_int,
- pub fn XGetWMSizeHints (_5: *mut Display, _4: c_ulong, _3: *mut XSizeHints, _2: *mut c_long, _1: c_ulong) -> c_int,
- pub fn XGetZoomHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int,
- pub fn XGrabButton (_10: *mut Display, _9: c_uint, _8: c_uint, _7: c_ulong, _6: c_int, _5: c_uint, _4: c_int, _3: c_int, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XGrabKey (_7: *mut Display, _6: c_int, _5: c_uint, _4: c_ulong, _3: c_int, _2: c_int, _1: c_int) -> c_int,
- pub fn XGrabKeyboard (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XGrabPointer (_9: *mut Display, _8: c_ulong, _7: c_int, _6: c_uint, _5: c_int, _4: c_int, _3: c_ulong, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XGrabServer (_1: *mut Display) -> c_int,
- pub fn XHeightMMOfScreen (_1: *mut Screen) -> c_int,
- pub fn XHeightOfScreen (_1: *mut Screen) -> c_int,
- pub fn XIconifyWindow (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int,
- pub fn XIfEvent (_4: *mut Display, _3: *mut XEvent, _2: Option<unsafe extern "C" fn (*mut Display, *mut XEvent, *mut c_char) -> c_int>, _1: *mut c_char) -> c_int,
- pub fn XImageByteOrder (_1: *mut Display) -> c_int,
- pub fn XIMOfIC (_1: XIC) -> XIM,
- pub fn XInitExtension (_2: *mut Display, _1: *const c_char) -> *mut XExtCodes,
- pub fn XInitImage (_1: *mut XImage) -> c_int,
- pub fn XInitThreads () -> c_int,
- pub fn XInsertModifiermapEntry (_3: *mut XModifierKeymap, _2: c_uchar, _1: c_int) -> *mut XModifierKeymap,
- pub fn XInstallColormap (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XInternalConnectionNumbers (_3: *mut Display, _2: *mut *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XInternAtom (_3: *mut Display, _2: *const c_char, _1: c_int) -> c_ulong,
- pub fn XInternAtoms (_5: *mut Display, _4: *mut *mut c_char, _3: c_int, _2: c_int, _1: *mut c_ulong) -> c_int,
- pub fn XIntersectRegion (_3: Region, _2: Region, _1: Region) -> c_int,
- pub fn XkbAddDeviceLedInfo (_3: XkbDeviceInfoPtr, _2: c_uint, _1: c_uint) -> XkbDeviceLedInfoPtr,
- pub fn XkbAddGeomColor (_3: XkbGeometryPtr, _2: *mut c_char, _1: c_uint) -> XkbColorPtr,
- pub fn XkbAddGeomDoodad (_3: XkbGeometryPtr, _2: XkbSectionPtr, _1: c_ulong) -> XkbDoodadPtr,
- pub fn XkbAddGeomKey (_1: XkbRowPtr) -> XkbKeyPtr,
- pub fn XkbAddGeomKeyAlias (_3: XkbGeometryPtr, _2: *mut c_char, _1: *mut c_char) -> XkbKeyAliasPtr,
- pub fn XkbAddGeomOutline (_2: XkbShapePtr, _1: c_int) -> XkbOutlinePtr,
- pub fn XkbAddGeomOverlay (_3: XkbSectionPtr, _2: c_ulong, _1: c_int) -> XkbOverlayPtr,
- pub fn XkbAddGeomOverlayKey (_4: XkbOverlayPtr, _3: XkbOverlayRowPtr, _2: *mut c_char, _1: *mut c_char) -> XkbOverlayKeyPtr,
- pub fn XkbAddGeomOverlayRow (_3: XkbOverlayPtr, _2: c_int, _1: c_int) -> XkbOverlayRowPtr,
- pub fn XkbAddGeomProperty (_3: XkbGeometryPtr, _2: *mut c_char, _1: *mut c_char) -> XkbPropertyPtr,
- pub fn XkbAddGeomRow (_2: XkbSectionPtr, _1: c_int) -> XkbRowPtr,
- pub fn XkbAddGeomSection (_5: XkbGeometryPtr, _4: c_ulong, _3: c_int, _2: c_int, _1: c_int) -> XkbSectionPtr,
- pub fn XkbAddGeomShape (_3: XkbGeometryPtr, _2: c_ulong, _1: c_int) -> XkbShapePtr,
- pub fn XkbAddKeyType (_5: XkbDescPtr, _4: c_ulong, _3: c_int, _2: c_int, _1: c_int) -> XkbKeyTypePtr,
- pub fn XkbAllocClientMap (_3: XkbDescPtr, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbAllocCompatMap (_3: XkbDescPtr, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbAllocControls (_2: XkbDescPtr, _1: c_uint) -> c_int,
- pub fn XkbAllocDeviceInfo (_3: c_uint, _2: c_uint, _1: c_uint) -> XkbDeviceInfoPtr,
- pub fn XkbAllocGeomColors (_2: XkbGeometryPtr, _1: c_int) -> c_int,
- pub fn XkbAllocGeomDoodads (_2: XkbGeometryPtr, _1: c_int) -> c_int,
- pub fn XkbAllocGeometry (_2: XkbDescPtr, _1: XkbGeometrySizesPtr) -> c_int,
- pub fn XkbAllocGeomKeyAliases (_2: XkbGeometryPtr, _1: c_int) -> c_int,
- pub fn XkbAllocGeomKeys (_2: XkbRowPtr, _1: c_int) -> c_int,
- pub fn XkbAllocGeomOutlines (_2: XkbShapePtr, _1: c_int) -> c_int,
- pub fn XkbAllocGeomOverlayKeys (_2: XkbOverlayRowPtr, _1: c_int) -> c_int,
- pub fn XkbAllocGeomOverlayRows (_2: XkbOverlayPtr, _1: c_int) -> c_int,
- pub fn XkbAllocGeomOverlays (_2: XkbSectionPtr, _1: c_int) -> c_int,
- pub fn XkbAllocGeomPoints (_2: XkbOutlinePtr, _1: c_int) -> c_int,
- pub fn XkbAllocGeomProps (_2: XkbGeometryPtr, _1: c_int) -> c_int,
- pub fn XkbAllocGeomRows (_2: XkbSectionPtr, _1: c_int) -> c_int,
- pub fn XkbAllocGeomSectionDoodads (_2: XkbSectionPtr, _1: c_int) -> c_int,
- pub fn XkbAllocGeomSections (_2: XkbGeometryPtr, _1: c_int) -> c_int,
- pub fn XkbAllocGeomShapes (_2: XkbGeometryPtr, _1: c_int) -> c_int,
- pub fn XkbAllocIndicatorMaps (_1: XkbDescPtr) -> c_int,
- pub fn XkbAllocKeyboard () -> XkbDescPtr,
- pub fn XkbAllocNames (_4: XkbDescPtr, _3: c_uint, _2: c_int, _1: c_int) -> c_int,
- pub fn XkbAllocServerMap (_3: XkbDescPtr, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbApplyCompatMapToKey (_3: XkbDescPtr, _2: c_uchar, _1: XkbChangesPtr) -> c_int,
- pub fn XkbApplyVirtualModChanges (_3: XkbDescPtr, _2: c_uint, _1: XkbChangesPtr) -> c_int,
- pub fn XkbBell (_4: *mut Display, _3: c_ulong, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XkbBellEvent (_4: *mut Display, _3: c_ulong, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XkbChangeDeviceInfo (_3: *mut Display, _2: XkbDeviceInfoPtr, _1: XkbDeviceChangesPtr) -> c_int,
- pub fn XkbChangeEnabledControls (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbChangeKeycodeRange (_4: XkbDescPtr, _3: c_int, _2: c_int, _1: XkbChangesPtr) -> c_int,
- pub fn XkbChangeMap (_3: *mut Display, _2: XkbDescPtr, _1: XkbMapChangesPtr) -> c_int,
- pub fn XkbChangeNames (_3: *mut Display, _2: XkbDescPtr, _1: XkbNameChangesPtr) -> c_int,
- pub fn XkbChangeTypesOfKey (_6: XkbDescPtr, _5: c_int, _4: c_int, _3: c_uint, _2: *mut c_int, _1: XkbMapChangesPtr) -> c_int,
- pub fn XkbComputeEffectiveMap (_3: XkbDescPtr, _2: XkbKeyTypePtr, _1: *mut c_uchar) -> c_int,
- pub fn XkbComputeRowBounds (_3: XkbGeometryPtr, _2: XkbSectionPtr, _1: XkbRowPtr) -> c_int,
- pub fn XkbComputeSectionBounds (_2: XkbGeometryPtr, _1: XkbSectionPtr) -> c_int,
- pub fn XkbComputeShapeBounds (_1: XkbShapePtr) -> c_int,
- pub fn XkbComputeShapeTop (_2: XkbShapePtr, _1: XkbBoundsPtr) -> c_int,
- pub fn XkbCopyKeyType (_2: XkbKeyTypePtr, _1: XkbKeyTypePtr) -> c_int,
- pub fn XkbCopyKeyTypes (_3: XkbKeyTypePtr, _2: XkbKeyTypePtr, _1: c_int) -> c_int,
- pub fn XkbDeviceBell (_7: *mut Display, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XkbDeviceBellEvent (_7: *mut Display, _6: c_ulong, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XkbFindOverlayForKey (_3: XkbGeometryPtr, _2: XkbSectionPtr, _1: *mut c_char) -> *mut c_char,
- pub fn XkbForceBell (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XkbForceDeviceBell (_5: *mut Display, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int,
- pub fn XkbFreeClientMap (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (),
- pub fn XkbFreeCompatMap (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (),
- pub fn XkbFreeComponentList (_1: XkbComponentListPtr) -> (),
- pub fn XkbFreeControls (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (),
- pub fn XkbFreeDeviceInfo (_3: XkbDeviceInfoPtr, _2: c_uint, _1: c_int) -> (),
- pub fn XkbFreeGeomColors (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn XkbFreeGeomDoodads (_3: XkbDoodadPtr, _2: c_int, _1: c_int) -> (),
- pub fn XkbFreeGeometry (_3: XkbGeometryPtr, _2: c_uint, _1: c_int) -> (),
- pub fn XkbFreeGeomKeyAliases (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn XkbFreeGeomKeys (_4: XkbRowPtr, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn XkbFreeGeomOutlines (_4: XkbShapePtr, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn XkbFreeGeomOverlayKeys (_4: XkbOverlayRowPtr, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn XkbFreeGeomOverlayRows (_4: XkbOverlayPtr, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn XkbFreeGeomOverlays (_4: XkbSectionPtr, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn XkbFreeGeomPoints (_4: XkbOutlinePtr, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn XkbFreeGeomProperties (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn XkbFreeGeomRows (_4: XkbSectionPtr, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn XkbFreeGeomSections (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn XkbFreeGeomShapes (_4: XkbGeometryPtr, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn XkbFreeIndicatorMaps (_1: XkbDescPtr) -> (),
- pub fn XkbFreeKeyboard (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (),
- pub fn XkbFreeNames (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (),
- pub fn XkbFreeServerMap (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> (),
- pub fn XkbGetAutoRepeatRate (_4: *mut Display, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int,
- pub fn XkbGetAutoResetControls (_3: *mut Display, _2: *mut c_uint, _1: *mut c_uint) -> c_int,
- pub fn XkbGetCompatMap (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int,
- pub fn XkbGetControls (_3: *mut Display, _2: c_ulong, _1: XkbDescPtr) -> c_int,
- pub fn XkbGetDetectableAutoRepeat (_2: *mut Display, _1: *mut c_int) -> c_int,
- pub fn XkbGetDeviceButtonActions (_5: *mut Display, _4: XkbDeviceInfoPtr, _3: c_int, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbGetDeviceInfo (_5: *mut Display, _4: c_uint, _3: c_uint, _2: c_uint, _1: c_uint) -> XkbDeviceInfoPtr,
- pub fn XkbGetDeviceInfoChanges (_3: *mut Display, _2: XkbDeviceInfoPtr, _1: XkbDeviceChangesPtr) -> c_int,
- pub fn XkbGetDeviceLedInfo (_5: *mut Display, _4: XkbDeviceInfoPtr, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbGetGeometry (_2: *mut Display, _1: XkbDescPtr) -> c_int,
- pub fn XkbGetIndicatorMap (_3: *mut Display, _2: c_ulong, _1: XkbDescPtr) -> c_int,
- pub fn XkbGetIndicatorState (_3: *mut Display, _2: c_uint, _1: *mut c_uint) -> c_int,
- pub fn XkbGetKeyActions (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int,
- pub fn XkbGetKeyBehaviors (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int,
- pub fn XkbGetKeyboard (_3: *mut Display, _2: c_uint, _1: c_uint) -> XkbDescPtr,
- pub fn XkbGetKeyboardByName (_6: *mut Display, _5: c_uint, _4: XkbComponentNamesPtr, _3: c_uint, _2: c_uint, _1: c_int) -> XkbDescPtr,
- pub fn XkbGetKeyExplicitComponents (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int,
- pub fn XkbGetKeyModifierMap (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int,
- pub fn XkbGetKeySyms (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int,
- pub fn XkbGetKeyTypes (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int,
- pub fn XkbGetKeyVirtualModMap (_4: *mut Display, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int,
- pub fn XkbGetMap (_3: *mut Display, _2: c_uint, _1: c_uint) -> XkbDescPtr,
- pub fn XkbGetMapChanges (_3: *mut Display, _2: XkbDescPtr, _1: XkbMapChangesPtr) -> c_int,
- pub fn XkbGetNamedDeviceIndicator (_9: *mut Display, _8: c_uint, _7: c_uint, _6: c_uint, _5: c_ulong, _4: *mut c_int, _3: *mut c_int, _2: XkbIndicatorMapPtr, _1: *mut c_int) -> c_int,
- pub fn XkbGetNamedGeometry (_3: *mut Display, _2: XkbDescPtr, _1: c_ulong) -> c_int,
- pub fn XkbGetNamedIndicator (_6: *mut Display, _5: c_ulong, _4: *mut c_int, _3: *mut c_int, _2: XkbIndicatorMapPtr, _1: *mut c_int) -> c_int,
- pub fn XkbGetNames (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int,
- pub fn XkbGetPerClientControls (_2: *mut Display, _1: *mut c_uint) -> c_int,
- pub fn XkbGetState (_3: *mut Display, _2: c_uint, _1: XkbStatePtr) -> c_int,
- pub fn XkbGetUpdatedMap (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int,
- pub fn XkbGetVirtualMods (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int,
- pub fn XkbGetXlibControls (_1: *mut Display) -> c_uint,
- pub fn XkbIgnoreExtension (_1: c_int) -> c_int,
- pub fn XkbInitCanonicalKeyTypes (_3: XkbDescPtr, _2: c_uint, _1: c_int) -> c_int,
- pub fn XkbKeycodeToKeysym (_4: *mut Display, _3: c_uchar, _2: c_int, _1: c_int) -> c_ulong,
- pub fn XkbKeysymToModifiers (_2: *mut Display, _1: c_ulong) -> c_uint,
- pub fn XkbKeyTypesForCoreSymbols (_6: XkbDescPtr, _5: c_int, _4: *mut c_ulong, _3: c_uint, _2: *mut c_int, _1: *mut c_ulong) -> c_int,
- pub fn XkbLatchGroup (_3: *mut Display, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbLatchModifiers (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbLibraryVersion (_2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XkbListComponents (_4: *mut Display, _3: c_uint, _2: XkbComponentNamesPtr, _1: *mut c_int) -> XkbComponentListPtr,
- pub fn XkbLockGroup (_3: *mut Display, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbLockModifiers (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbLookupKeyBinding (_6: *mut Display, _5: c_ulong, _4: c_uint, _3: *mut c_char, _2: c_int, _1: *mut c_int) -> c_int,
- pub fn XkbLookupKeySym (_5: *mut Display, _4: c_uchar, _3: c_uint, _2: *mut c_uint, _1: *mut c_ulong) -> c_int,
- pub fn XkbNoteControlsChanges (_3: XkbControlsChangesPtr, _2: *mut XkbControlsNotifyEvent, _1: c_uint) -> (),
- pub fn XkbNoteDeviceChanges (_3: XkbDeviceChangesPtr, _2: *mut XkbExtensionDeviceNotifyEvent, _1: c_uint) -> (),
- pub fn XkbNoteMapChanges (_3: XkbMapChangesPtr, _2: *mut XkbMapNotifyEvent, _1: c_uint) -> (),
- pub fn XkbNoteNameChanges (_3: XkbNameChangesPtr, _2: *mut XkbNamesNotifyEvent, _1: c_uint) -> (),
- pub fn XkbOpenDisplay (_6: *mut c_char, _5: *mut c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> *mut Display,
- pub fn XkbQueryExtension (_6: *mut Display, _5: *mut c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XkbRefreshKeyboardMapping (_1: *mut XkbMapNotifyEvent) -> c_int,
- pub fn XkbResizeDeviceButtonActions (_2: XkbDeviceInfoPtr, _1: c_uint) -> c_int,
- pub fn XkbResizeKeyActions (_3: XkbDescPtr, _2: c_int, _1: c_int) -> *mut XkbAction,
- pub fn XkbResizeKeySyms (_3: XkbDescPtr, _2: c_int, _1: c_int) -> *mut c_ulong,
- pub fn XkbResizeKeyType (_5: XkbDescPtr, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int,
- pub fn XkbSelectEventDetails (_5: *mut Display, _4: c_uint, _3: c_uint, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XkbSelectEvents (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbSetAtomFuncs (_2: Option<unsafe extern "C" fn (*mut Display, *const c_char, c_int) -> c_ulong>, _1: Option<unsafe extern "C" fn (*mut Display, c_ulong) -> *mut c_char>) -> (),
- pub fn XkbSetAutoRepeatRate (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbSetAutoResetControls (_4: *mut Display, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int,
- pub fn XkbSetCompatMap (_4: *mut Display, _3: c_uint, _2: XkbDescPtr, _1: c_int) -> c_int,
- pub fn XkbSetControls (_3: *mut Display, _2: c_ulong, _1: XkbDescPtr) -> c_int,
- pub fn XkbSetDebuggingFlags (_8: *mut Display, _7: c_uint, _6: c_uint, _5: *mut c_char, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int,
- pub fn XkbSetDetectableAutoRepeat (_3: *mut Display, _2: c_int, _1: *mut c_int) -> c_int,
- pub fn XkbSetDeviceButtonActions (_4: *mut Display, _3: XkbDeviceInfoPtr, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbSetDeviceInfo (_3: *mut Display, _2: c_uint, _1: XkbDeviceInfoPtr) -> c_int,
- pub fn XkbSetDeviceLedInfo (_5: *mut Display, _4: XkbDeviceInfoPtr, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbSetGeometry (_3: *mut Display, _2: c_uint, _1: XkbGeometryPtr) -> c_int,
- pub fn XkbSetIgnoreLockMods (_6: *mut Display, _5: c_uint, _4: c_uint, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbSetIndicatorMap (_3: *mut Display, _2: c_ulong, _1: XkbDescPtr) -> c_int,
- pub fn XkbSetMap (_3: *mut Display, _2: c_uint, _1: XkbDescPtr) -> c_int,
- pub fn XkbSetNamedDeviceIndicator (_9: *mut Display, _8: c_uint, _7: c_uint, _6: c_uint, _5: c_ulong, _4: c_int, _3: c_int, _2: c_int, _1: XkbIndicatorMapPtr) -> c_int,
- pub fn XkbSetNamedIndicator (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: c_int, _1: XkbIndicatorMapPtr) -> c_int,
- pub fn XkbSetNames (_5: *mut Display, _4: c_uint, _3: c_uint, _2: c_uint, _1: XkbDescPtr) -> c_int,
- pub fn XkbSetPerClientControls (_3: *mut Display, _2: c_uint, _1: *mut c_uint) -> c_int,
- pub fn XkbSetServerInternalMods (_6: *mut Display, _5: c_uint, _4: c_uint, _3: c_uint, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XkbSetXlibControls (_3: *mut Display, _2: c_uint, _1: c_uint) -> c_uint,
- pub fn XkbToControl (_1: c_char) -> c_char,
- pub fn XkbTranslateKeyCode (_5: XkbDescPtr, _4: c_uchar, _3: c_uint, _2: *mut c_uint, _1: *mut c_ulong) -> c_int,
- pub fn XkbTranslateKeySym (_6: *mut Display, _5: *mut c_ulong, _4: c_uint, _3: *mut c_char, _2: c_int, _1: *mut c_int) -> c_int,
- pub fn XkbUpdateActionVirtualMods (_3: XkbDescPtr, _2: *mut XkbAction, _1: c_uint) -> c_int,
- pub fn XkbUpdateKeyTypeVirtualMods (_4: XkbDescPtr, _3: XkbKeyTypePtr, _2: c_uint, _1: XkbChangesPtr) -> (),
- pub fn XkbUpdateMapFromCore (_6: XkbDescPtr, _5: c_uchar, _4: c_int, _3: c_int, _2: *mut c_ulong, _1: XkbChangesPtr) -> c_int,
- pub fn XkbUseExtension (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XkbVirtualModsToReal (_3: XkbDescPtr, _2: c_uint, _1: *mut c_uint) -> c_int,
- pub fn XkbXlibControlsImplemented () -> c_uint,
- pub fn XKeycodeToKeysym (_3: *mut Display, _2: c_uchar, _1: c_int) -> c_ulong,
- pub fn XKeysymToKeycode (_2: *mut Display, _1: c_ulong) -> c_uchar,
- pub fn XKeysymToString (_1: c_ulong) -> *mut c_char,
- pub fn XKillClient (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XLastKnownRequestProcessed (_1: *mut Display) -> c_ulong,
- pub fn XListDepths (_3: *mut Display, _2: c_int, _1: *mut c_int) -> *mut c_int,
- pub fn XListExtensions (_2: *mut Display, _1: *mut c_int) -> *mut *mut c_char,
- pub fn XListFonts (_4: *mut Display, _3: *const c_char, _2: c_int, _1: *mut c_int) -> *mut *mut c_char,
- pub fn XListFontsWithInfo (_5: *mut Display, _4: *const c_char, _3: c_int, _2: *mut c_int, _1: *mut *mut XFontStruct) -> *mut *mut c_char,
- pub fn XListHosts (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> *mut XHostAddress,
- pub fn XListInstalledColormaps (_3: *mut Display, _2: c_ulong, _1: *mut c_int) -> *mut c_ulong,
- pub fn XListPixmapFormats (_2: *mut Display, _1: *mut c_int) -> *mut XPixmapFormatValues,
- pub fn XListProperties (_3: *mut Display, _2: c_ulong, _1: *mut c_int) -> *mut c_ulong,
- pub fn XLoadFont (_2: *mut Display, _1: *const c_char) -> c_ulong,
- pub fn XLoadQueryFont (_2: *mut Display, _1: *const c_char) -> *mut XFontStruct,
- pub fn XLocaleOfFontSet (_1: XFontSet) -> *mut c_char,
- pub fn XLocaleOfIM (_1: XIM) -> *mut c_char,
- pub fn XLocaleOfOM (_1: XOM) -> *mut c_char,
- pub fn XLockDisplay (_1: *mut Display) -> (),
- pub fn XLookupColor (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: *mut XColor, _1: *mut XColor) -> c_int,
- pub fn XLookupKeysym (_2: *mut XKeyEvent, _1: c_int) -> c_ulong,
- pub fn XLookupString (_5: *mut XKeyEvent, _4: *mut c_char, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int,
- pub fn XLowerWindow (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XMapRaised (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XMapSubwindows (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XMapWindow (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XMaskEvent (_3: *mut Display, _2: c_long, _1: *mut XEvent) -> c_int,
- pub fn XMatchVisualInfo (_5: *mut Display, _4: c_int, _3: c_int, _2: c_int, _1: *mut XVisualInfo) -> c_int,
- pub fn XMaxCmapsOfScreen (_1: *mut Screen) -> c_int,
- pub fn XMaxRequestSize (_1: *mut Display) -> c_long,
- pub fn XmbDrawImageString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (),
- pub fn XmbDrawString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (),
- pub fn XmbDrawText (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XmbTextItem, _1: c_int) -> (),
- pub fn XmbLookupString (_6: XIC, _5: *mut XKeyEvent, _4: *mut c_char, _3: c_int, _2: *mut c_ulong, _1: *mut c_int) -> c_int,
- pub fn XmbResetIC (_1: XIC) -> *mut c_char,
- pub fn XmbSetWMProperties (_9: *mut Display, _8: c_ulong, _7: *const c_char, _6: *const c_char, _5: *mut *mut c_char, _4: c_int, _3: *mut XSizeHints, _2: *mut XWMHints, _1: *mut XClassHint) -> (),
- pub fn XmbTextEscapement (_3: XFontSet, _2: *const c_char, _1: c_int) -> c_int,
- pub fn XmbTextExtents (_5: XFontSet, _4: *const c_char, _3: c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int,
- pub fn XmbTextListToTextProperty (_5: *mut Display, _4: *mut *mut c_char, _3: c_int, _2: XICCEncodingStyle, _1: *mut XTextProperty) -> c_int,
- pub fn XmbTextPerCharExtents (_9: XFontSet, _8: *const c_char, _7: c_int, _6: *mut XRectangle, _5: *mut XRectangle, _4: c_int, _3: *mut c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int,
- pub fn XmbTextPropertyToTextList (_4: *mut Display, _3: *const XTextProperty, _2: *mut *mut *mut c_char, _1: *mut c_int) -> c_int,
- pub fn XMinCmapsOfScreen (_1: *mut Screen) -> c_int,
- pub fn XMoveResizeWindow (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XMoveWindow (_4: *mut Display, _3: c_ulong, _2: c_int, _1: c_int) -> c_int,
- pub fn XNewModifiermap (_1: c_int) -> *mut XModifierKeymap,
- pub fn XNextEvent (_2: *mut Display, _1: *mut XEvent) -> c_int,
- pub fn XNextRequest (_1: *mut Display) -> c_ulong,
- pub fn XNoOp (_1: *mut Display) -> c_int,
- pub fn XOffsetRegion (_3: Region, _2: c_int, _1: c_int) -> c_int,
- pub fn XOMOfOC (_1: XFontSet) -> XOM,
- pub fn XOpenDisplay (_1: *const c_char) -> *mut Display,
- pub fn XOpenIM (_4: *mut Display, _3: XrmDatabase, _2: *mut c_char, _1: *mut c_char) -> XIM,
- pub fn XOpenOM (_4: *mut Display, _3: XrmDatabase, _2: *const c_char, _1: *const c_char) -> XOM,
- pub fn XParseColor (_4: *mut Display, _3: c_ulong, _2: *const c_char, _1: *mut XColor) -> c_int,
- pub fn XParseGeometry (_5: *const c_char, _4: *mut c_int, _3: *mut c_int, _2: *mut c_uint, _1: *mut c_uint) -> c_int,
- pub fn XPeekEvent (_2: *mut Display, _1: *mut XEvent) -> c_int,
- pub fn XPeekIfEvent (_4: *mut Display, _3: *mut XEvent, _2: Option<unsafe extern "C" fn (*mut Display, *mut XEvent, *mut c_char) -> c_int>, _1: *mut c_char) -> c_int,
- pub fn XPending (_1: *mut Display) -> c_int,
- pub fn Xpermalloc (_1: c_uint) -> *mut c_char,
- pub fn XPlanesOfScreen (_1: *mut Screen) -> c_int,
- pub fn XPointInRegion (_3: Region, _2: c_int, _1: c_int) -> c_int,
- pub fn XPolygonRegion (_3: *mut XPoint, _2: c_int, _1: c_int) -> Region,
- pub fn XProcessInternalConnection (_2: *mut Display, _1: c_int) -> (),
- pub fn XProtocolRevision (_1: *mut Display) -> c_int,
- pub fn XProtocolVersion (_1: *mut Display) -> c_int,
- pub fn XPutBackEvent (_2: *mut Display, _1: *mut XEvent) -> c_int,
- pub fn XPutImage (_10: *mut Display, _9: c_ulong, _8: GC, _7: *mut XImage, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XPutPixel (_4: *mut XImage, _3: c_int, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XQLength (_1: *mut Display) -> c_int,
- pub fn XQueryBestCursor (_6: *mut Display, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int,
- pub fn XQueryBestSize (_7: *mut Display, _6: c_int, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int,
- pub fn XQueryBestStipple (_6: *mut Display, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int,
- pub fn XQueryBestTile (_6: *mut Display, _5: c_ulong, _4: c_uint, _3: c_uint, _2: *mut c_uint, _1: *mut c_uint) -> c_int,
- pub fn XQueryColor (_3: *mut Display, _2: c_ulong, _1: *mut XColor) -> c_int,
- pub fn XQueryColors (_4: *mut Display, _3: c_ulong, _2: *mut XColor, _1: c_int) -> c_int,
- pub fn XQueryExtension (_5: *mut Display, _4: *const c_char, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XQueryFont (_2: *mut Display, _1: c_ulong) -> *mut XFontStruct,
- pub fn XQueryKeymap (_2: *mut Display, _1: *mut c_char) -> c_int,
- pub fn XQueryPointer (_9: *mut Display, _8: c_ulong, _7: *mut c_ulong, _6: *mut c_ulong, _5: *mut c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_uint) -> c_int,
- pub fn XQueryTextExtents (_8: *mut Display, _7: c_ulong, _6: *const c_char, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XCharStruct) -> c_int,
- pub fn XQueryTextExtents16 (_8: *mut Display, _7: c_ulong, _6: *const XChar2b, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XCharStruct) -> c_int,
- pub fn XQueryTree (_6: *mut Display, _5: c_ulong, _4: *mut c_ulong, _3: *mut c_ulong, _2: *mut *mut c_ulong, _1: *mut c_uint) -> c_int,
- pub fn XRaiseWindow (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XReadBitmapFile (_8: *mut Display, _7: c_ulong, _6: *const c_char, _5: *mut c_uint, _4: *mut c_uint, _3: *mut c_ulong, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XReadBitmapFileData (_6: *const c_char, _5: *mut c_uint, _4: *mut c_uint, _3: *mut *mut c_uchar, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XRebindKeysym (_6: *mut Display, _5: c_ulong, _4: *mut c_ulong, _3: c_int, _2: *const c_uchar, _1: c_int) -> c_int,
- pub fn XRecolorCursor (_4: *mut Display, _3: c_ulong, _2: *mut XColor, _1: *mut XColor) -> c_int,
- pub fn XReconfigureWMWindow (_5: *mut Display, _4: c_ulong, _3: c_int, _2: c_uint, _1: *mut XWindowChanges) -> c_int,
- pub fn XRectInRegion (_5: Region, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XRefreshKeyboardMapping (_1: *mut XMappingEvent) -> c_int,
- pub fn XRegisterIMInstantiateCallback (_6: *mut Display, _5: XrmDatabase, _4: *mut c_char, _3: *mut c_char, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char, *mut c_char)>, _1: *mut c_char) -> c_int,
- pub fn XRemoveConnectionWatch (_3: *mut Display, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char, c_int, c_int, *mut *mut c_char)>, _1: *mut c_char) -> (),
- pub fn XRemoveFromSaveSet (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XRemoveHost (_2: *mut Display, _1: *mut XHostAddress) -> c_int,
- pub fn XRemoveHosts (_3: *mut Display, _2: *mut XHostAddress, _1: c_int) -> c_int,
- pub fn XReparentWindow (_5: *mut Display, _4: c_ulong, _3: c_ulong, _2: c_int, _1: c_int) -> c_int,
- pub fn XResetScreenSaver (_1: *mut Display) -> c_int,
- pub fn XResizeWindow (_4: *mut Display, _3: c_ulong, _2: c_uint, _1: c_uint) -> c_int,
- pub fn XResourceManagerString (_1: *mut Display) -> *mut c_char,
- pub fn XRestackWindows (_3: *mut Display, _2: *mut c_ulong, _1: c_int) -> c_int,
- pub fn XrmCombineDatabase (_3: XrmDatabase, _2: *mut XrmDatabase, _1: c_int) -> (),
- pub fn XrmCombineFileDatabase (_3: *const c_char, _2: *mut XrmDatabase, _1: c_int) -> c_int,
- pub fn XrmDestroyDatabase (_1: XrmDatabase) -> (),
- pub fn XrmEnumerateDatabase (_6: XrmDatabase, _5: *mut c_int, _4: *mut c_int, _3: c_int, _2: Option<unsafe extern "C" fn (*mut XrmDatabase, *mut XrmBinding, *mut c_int, *mut c_int, *mut XrmValue, *mut c_char) -> c_int>, _1: *mut c_char) -> c_int,
- pub fn XrmGetDatabase (_1: *mut Display) -> XrmDatabase,
- pub fn XrmGetFileDatabase (_1: *const c_char) -> XrmDatabase,
- pub fn XrmGetResource (_5: XrmDatabase, _4: *const c_char, _3: *const c_char, _2: *mut *mut c_char, _1: *mut XrmValue) -> c_int,
- pub fn XrmGetStringDatabase (_1: *const c_char) -> XrmDatabase,
- pub fn XrmInitialize () -> (),
- pub fn XrmLocaleOfDatabase (_1: XrmDatabase) -> *const c_char,
- pub fn XrmMergeDatabases (_2: XrmDatabase, _1: *mut XrmDatabase) -> (),
- pub fn XrmParseCommand (_6: *mut XrmDatabase, _5: XrmOptionDescList, _4: c_int, _3: *const c_char, _2: *mut c_int, _1: *mut *mut c_char) -> (),
- pub fn XrmPermStringToQuark (_1: *const c_char) -> c_int,
- pub fn XrmPutFileDatabase (_2: XrmDatabase, _1: *const c_char) -> (),
- pub fn XrmPutLineResource (_2: *mut XrmDatabase, _1: *const c_char) -> (),
- pub fn XrmPutResource (_4: *mut XrmDatabase, _3: *const c_char, _2: *const c_char, _1: *mut XrmValue) -> (),
- pub fn XrmPutStringResource (_3: *mut XrmDatabase, _2: *const c_char, _1: *const c_char) -> (),
- pub fn XrmQGetResource (_5: XrmDatabase, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XrmValue) -> c_int,
- pub fn XrmQGetSearchList (_5: XrmDatabase, _4: *mut c_int, _3: *mut c_int, _2: *mut *mut XrmDatabase, _1: c_int) -> c_int,
- pub fn XrmQGetSearchResource (_5: *mut *mut XrmDatabase, _4: c_int, _3: c_int, _2: *mut c_int, _1: *mut XrmValue) -> c_int,
- pub fn XrmQPutResource (_5: *mut XrmDatabase, _4: *mut XrmBinding, _3: *mut c_int, _2: c_int, _1: *mut XrmValue) -> (),
- pub fn XrmQPutStringResource (_4: *mut XrmDatabase, _3: *mut XrmBinding, _2: *mut c_int, _1: *const c_char) -> (),
- pub fn XrmQuarkToString (_1: c_int) -> *mut c_char,
- pub fn XrmSetDatabase (_2: *mut Display, _1: XrmDatabase) -> (),
- pub fn XrmStringToBindingQuarkList (_3: *const c_char, _2: *mut XrmBinding, _1: *mut c_int) -> (),
- pub fn XrmStringToQuark (_1: *const c_char) -> c_int,
- pub fn XrmStringToQuarkList (_2: *const c_char, _1: *mut c_int) -> (),
- pub fn XrmUniqueQuark () -> c_int,
- pub fn XRootWindow (_2: *mut Display, _1: c_int) -> c_ulong,
- pub fn XRootWindowOfScreen (_1: *mut Screen) -> c_ulong,
- pub fn XRotateBuffers (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XRotateWindowProperties (_5: *mut Display, _4: c_ulong, _3: *mut c_ulong, _2: c_int, _1: c_int) -> c_int,
- pub fn XSaveContext (_4: *mut Display, _3: c_ulong, _2: c_int, _1: *const c_char) -> c_int,
- pub fn XScreenCount (_1: *mut Display) -> c_int,
- pub fn XScreenNumberOfScreen (_1: *mut Screen) -> c_int,
- pub fn XScreenOfDisplay (_2: *mut Display, _1: c_int) -> *mut Screen,
- pub fn XScreenResourceString (_1: *mut Screen) -> *mut c_char,
- pub fn XSelectInput (_3: *mut Display, _2: c_ulong, _1: c_long) -> c_int,
- pub fn XSendEvent (_5: *mut Display, _4: c_ulong, _3: c_int, _2: c_long, _1: *mut XEvent) -> c_int,
- pub fn XServerVendor (_1: *mut Display) -> *mut c_char,
- pub fn XSetAccessControl (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XSetAfterFunction (_2: *mut Display, _1: Option<unsafe extern "C" fn (*mut Display) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display) -> c_int>,
- pub fn XSetArcMode (_3: *mut Display, _2: GC, _1: c_int) -> c_int,
- pub fn XSetAuthorization (_4: *mut c_char, _3: c_int, _2: *mut c_char, _1: c_int) -> (),
- pub fn XSetBackground (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int,
- pub fn XSetClassHint (_3: *mut Display, _2: c_ulong, _1: *mut XClassHint) -> c_int,
- pub fn XSetClipMask (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int,
- pub fn XSetClipOrigin (_4: *mut Display, _3: GC, _2: c_int, _1: c_int) -> c_int,
- pub fn XSetClipRectangles (_7: *mut Display, _6: GC, _5: c_int, _4: c_int, _3: *mut XRectangle, _2: c_int, _1: c_int) -> c_int,
- pub fn XSetCloseDownMode (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XSetCommand (_4: *mut Display, _3: c_ulong, _2: *mut *mut c_char, _1: c_int) -> c_int,
- pub fn XSetDashes (_5: *mut Display, _4: GC, _3: c_int, _2: *const c_char, _1: c_int) -> c_int,
- pub fn XSetErrorHandler (_1: Option<unsafe extern "C" fn (*mut Display, *mut XErrorEvent) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display, *mut XErrorEvent) -> c_int>,
- pub fn XSetFillRule (_3: *mut Display, _2: GC, _1: c_int) -> c_int,
- pub fn XSetFillStyle (_3: *mut Display, _2: GC, _1: c_int) -> c_int,
- pub fn XSetFont (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int,
- pub fn XSetFontPath (_3: *mut Display, _2: *mut *mut c_char, _1: c_int) -> c_int,
- pub fn XSetForeground (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int,
- pub fn XSetFunction (_3: *mut Display, _2: GC, _1: c_int) -> c_int,
- pub fn XSetGraphicsExposures (_3: *mut Display, _2: GC, _1: c_int) -> c_int,
- pub fn XSetICFocus (_1: XIC) -> (),
- pub fn XSetIconName (_3: *mut Display, _2: c_ulong, _1: *const c_char) -> c_int,
- pub fn XSetIconSizes (_4: *mut Display, _3: c_ulong, _2: *mut XIconSize, _1: c_int) -> c_int,
- pub fn XSetInputFocus (_4: *mut Display, _3: c_ulong, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XSetIOErrorHandler (_1: Option<unsafe extern "C" fn (*mut Display) -> c_int>) -> Option<unsafe extern "C" fn (*mut Display) -> c_int>,
- pub fn XSetLineAttributes (_6: *mut Display, _5: GC, _4: c_uint, _3: c_int, _2: c_int, _1: c_int) -> c_int,
- pub fn XSetLocaleModifiers (_1: *const c_char) -> *mut c_char,
- pub fn XSetModifierMapping (_2: *mut Display, _1: *mut XModifierKeymap) -> c_int,
- pub fn XSetNormalHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int,
- pub fn XSetPlaneMask (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int,
- pub fn XSetPointerMapping (_3: *mut Display, _2: *const c_uchar, _1: c_int) -> c_int,
- pub fn XSetRegion (_3: *mut Display, _2: GC, _1: Region) -> c_int,
- pub fn XSetRGBColormaps (_5: *mut Display, _4: c_ulong, _3: *mut XStandardColormap, _2: c_int, _1: c_ulong) -> (),
- pub fn XSetScreenSaver (_5: *mut Display, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> c_int,
- pub fn XSetSelectionOwner (_4: *mut Display, _3: c_ulong, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XSetSizeHints (_4: *mut Display, _3: c_ulong, _2: *mut XSizeHints, _1: c_ulong) -> c_int,
- pub fn XSetStandardColormap (_4: *mut Display, _3: c_ulong, _2: *mut XStandardColormap, _1: c_ulong) -> (),
- pub fn XSetStandardProperties (_8: *mut Display, _7: c_ulong, _6: *const c_char, _5: *const c_char, _4: c_ulong, _3: *mut *mut c_char, _2: c_int, _1: *mut XSizeHints) -> c_int,
- pub fn XSetState (_6: *mut Display, _5: GC, _4: c_ulong, _3: c_ulong, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XSetStipple (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int,
- pub fn XSetSubwindowMode (_3: *mut Display, _2: GC, _1: c_int) -> c_int,
- pub fn XSetTextProperty (_4: *mut Display, _3: c_ulong, _2: *mut XTextProperty, _1: c_ulong) -> (),
- pub fn XSetTile (_3: *mut Display, _2: GC, _1: c_ulong) -> c_int,
- pub fn XSetTransientForHint (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XSetTSOrigin (_4: *mut Display, _3: GC, _2: c_int, _1: c_int) -> c_int,
- pub fn XSetWindowBackground (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XSetWindowBackgroundPixmap (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XSetWindowBorder (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XSetWindowBorderPixmap (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XSetWindowBorderWidth (_3: *mut Display, _2: c_ulong, _1: c_uint) -> c_int,
- pub fn XSetWindowColormap (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XSetWMClientMachine (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> (),
- pub fn XSetWMColormapWindows (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: c_int) -> c_int,
- pub fn XSetWMHints (_3: *mut Display, _2: c_ulong, _1: *mut XWMHints) -> c_int,
- pub fn XSetWMIconName (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> (),
- pub fn XSetWMName (_3: *mut Display, _2: c_ulong, _1: *mut XTextProperty) -> (),
- pub fn XSetWMNormalHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> (),
- pub fn XSetWMProperties (_9: *mut Display, _8: c_ulong, _7: *mut XTextProperty, _6: *mut XTextProperty, _5: *mut *mut c_char, _4: c_int, _3: *mut XSizeHints, _2: *mut XWMHints, _1: *mut XClassHint) -> (),
- pub fn XSetWMProtocols (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: c_int) -> c_int,
- pub fn XSetWMSizeHints (_4: *mut Display, _3: c_ulong, _2: *mut XSizeHints, _1: c_ulong) -> (),
- pub fn XSetZoomHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int,
- pub fn XShrinkRegion (_3: Region, _2: c_int, _1: c_int) -> c_int,
- pub fn XStoreBuffer (_4: *mut Display, _3: *const c_char, _2: c_int, _1: c_int) -> c_int,
- pub fn XStoreBytes (_3: *mut Display, _2: *const c_char, _1: c_int) -> c_int,
- pub fn XStoreColor (_3: *mut Display, _2: c_ulong, _1: *mut XColor) -> c_int,
- pub fn XStoreColors (_4: *mut Display, _3: c_ulong, _2: *mut XColor, _1: c_int) -> c_int,
- pub fn XStoreName (_3: *mut Display, _2: c_ulong, _1: *const c_char) -> c_int,
- pub fn XStoreNamedColor (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: c_ulong, _1: c_int) -> c_int,
- pub fn XStringListToTextProperty (_3: *mut *mut c_char, _2: c_int, _1: *mut XTextProperty) -> c_int,
- pub fn XStringToKeysym (_1: *const c_char) -> c_ulong,
- pub fn XSubImage (_5: *mut XImage, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> *mut XImage,
- pub fn XSubtractRegion (_3: Region, _2: Region, _1: Region) -> c_int,
- pub fn XSupportsLocale () -> c_int,
- pub fn XSync (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XSynchronize (_2: *mut Display, _1: c_int) -> Option<unsafe extern "C" fn (*mut Display) -> c_int>,
- pub fn XTextExtents (_7: *mut XFontStruct, _6: *const c_char, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XCharStruct) -> c_int,
- pub fn XTextExtents16 (_7: *mut XFontStruct, _6: *const XChar2b, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut XCharStruct) -> c_int,
- pub fn XTextPropertyToStringList (_3: *mut XTextProperty, _2: *mut *mut *mut c_char, _1: *mut c_int) -> c_int,
- pub fn XTextWidth (_3: *mut XFontStruct, _2: *const c_char, _1: c_int) -> c_int,
- pub fn XTextWidth16 (_3: *mut XFontStruct, _2: *const XChar2b, _1: c_int) -> c_int,
- pub fn XTranslateCoordinates (_8: *mut Display, _7: c_ulong, _6: c_ulong, _5: c_int, _4: c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_ulong) -> c_int,
- pub fn XUndefineCursor (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XUngrabButton (_4: *mut Display, _3: c_uint, _2: c_uint, _1: c_ulong) -> c_int,
- pub fn XUngrabKey (_4: *mut Display, _3: c_int, _2: c_uint, _1: c_ulong) -> c_int,
- pub fn XUngrabKeyboard (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XUngrabPointer (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XUngrabServer (_1: *mut Display) -> c_int,
- pub fn XUninstallColormap (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XUnionRectWithRegion (_3: *mut XRectangle, _2: Region, _1: Region) -> c_int,
- pub fn XUnionRegion (_3: Region, _2: Region, _1: Region) -> c_int,
- pub fn XUnloadFont (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XUnlockDisplay (_1: *mut Display) -> (),
- pub fn XUnmapSubwindows (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XUnmapWindow (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XUnregisterIMInstantiateCallback (_6: *mut Display, _5: XrmDatabase, _4: *mut c_char, _3: *mut c_char, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char, *mut c_char)>, _1: *mut c_char) -> c_int,
- pub fn XUnsetICFocus (_1: XIC) -> (),
- pub fn Xutf8DrawImageString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (),
- pub fn Xutf8DrawString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (),
- pub fn Xutf8DrawText (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XmbTextItem, _1: c_int) -> (),
- pub fn Xutf8LookupString (_6: XIC, _5: *mut XKeyEvent, _4: *mut c_char, _3: c_int, _2: *mut c_ulong, _1: *mut c_int) -> c_int,
- pub fn Xutf8ResetIC (_1: XIC) -> *mut c_char,
- pub fn Xutf8SetWMProperties (_9: *mut Display, _8: c_ulong, _7: *const c_char, _6: *const c_char, _5: *mut *mut c_char, _4: c_int, _3: *mut XSizeHints, _2: *mut XWMHints, _1: *mut XClassHint) -> (),
- pub fn Xutf8TextEscapement (_3: XFontSet, _2: *const c_char, _1: c_int) -> c_int,
- pub fn Xutf8TextExtents (_5: XFontSet, _4: *const c_char, _3: c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int,
- pub fn Xutf8TextListToTextProperty (_5: *mut Display, _4: *mut *mut c_char, _3: c_int, _2: XICCEncodingStyle, _1: *mut XTextProperty) -> c_int,
- pub fn Xutf8TextPerCharExtents (_9: XFontSet, _8: *const c_char, _7: c_int, _6: *mut XRectangle, _5: *mut XRectangle, _4: c_int, _3: *mut c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int,
- pub fn Xutf8TextPropertyToTextList (_4: *mut Display, _3: *const XTextProperty, _2: *mut *mut *mut c_char, _1: *mut c_int) -> c_int,
- pub fn XVendorRelease (_1: *mut Display) -> c_int,
- pub fn XVisualIDFromVisual (_1: *mut Visual) -> c_ulong,
- pub fn XWarpPointer (_9: *mut Display, _8: c_ulong, _7: c_ulong, _6: c_int, _5: c_int, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int,
- pub fn XwcDrawImageString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const wchar_t, _1: c_int) -> (),
- pub fn XwcDrawString (_8: *mut Display, _7: c_ulong, _6: XFontSet, _5: GC, _4: c_int, _3: c_int, _2: *const wchar_t, _1: c_int) -> (),
- pub fn XwcDrawText (_7: *mut Display, _6: c_ulong, _5: GC, _4: c_int, _3: c_int, _2: *mut XwcTextItem, _1: c_int) -> (),
- pub fn XwcFreeStringList (_1: *mut *mut wchar_t) -> (),
- pub fn XwcLookupString (_6: XIC, _5: *mut XKeyEvent, _4: *mut wchar_t, _3: c_int, _2: *mut c_ulong, _1: *mut c_int) -> c_int,
- pub fn XwcResetIC (_1: XIC) -> *mut wchar_t,
- pub fn XwcTextEscapement (_3: XFontSet, _2: *const wchar_t, _1: c_int) -> c_int,
- pub fn XwcTextExtents (_5: XFontSet, _4: *const wchar_t, _3: c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int,
- pub fn XwcTextListToTextProperty (_5: *mut Display, _4: *mut *mut wchar_t, _3: c_int, _2: XICCEncodingStyle, _1: *mut XTextProperty) -> c_int,
- pub fn XwcTextPerCharExtents (_9: XFontSet, _8: *const wchar_t, _7: c_int, _6: *mut XRectangle, _5: *mut XRectangle, _4: c_int, _3: *mut c_int, _2: *mut XRectangle, _1: *mut XRectangle) -> c_int,
- pub fn XwcTextPropertyToTextList (_4: *mut Display, _3: *const XTextProperty, _2: *mut *mut *mut wchar_t, _1: *mut c_int) -> c_int,
- pub fn XWhitePixel (_2: *mut Display, _1: c_int) -> c_ulong,
- pub fn XWhitePixelOfScreen (_1: *mut Screen) -> c_ulong,
- pub fn XWidthMMOfScreen (_1: *mut Screen) -> c_int,
- pub fn XWidthOfScreen (_1: *mut Screen) -> c_int,
- pub fn XWindowEvent (_4: *mut Display, _3: c_ulong, _2: c_long, _1: *mut XEvent) -> c_int,
- pub fn XWithdrawWindow (_3: *mut Display, _2: c_ulong, _1: c_int) -> c_int,
- pub fn XWMGeometry (_11: *mut Display, _10: c_int, _9: *const c_char, _8: *const c_char, _7: c_uint, _6: *mut XSizeHints, _5: *mut c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XWriteBitmapFile (_7: *mut Display, _6: *const c_char, _5: c_ulong, _4: c_uint, _3: c_uint, _2: c_int, _1: c_int) -> c_int,
- pub fn XXorRegion (_3: Region, _2: Region, _1: Region) -> c_int,
-variadic:
- pub fn XCreateIC (_1: XIM) -> XIC,
- pub fn XCreateOC (_1: XOM) -> XFontSet,
- pub fn XGetICValues (_1: XIC) -> *mut c_char,
- pub fn XGetIMValues (_1: XIM) -> *mut c_char,
- pub fn XGetOCValues (_1: XFontSet) -> *mut c_char,
- pub fn XGetOMValues (_1: XOM) -> *mut c_char,
- pub fn XSetICValues (_1: XIC) -> *mut c_char,
- pub fn XSetIMValues (_1: XIM) -> *mut c_char,
- pub fn XSetOCValues (_1: XFontSet) -> *mut c_char,
- pub fn XSetOMValues (_1: XOM) -> *mut c_char,
- pub fn XVaCreateNestedList (_1: c_int) -> *mut c_void,
-globals:
-}
-
-
-//
-// types
-//
-
-
-// common types
-pub type Atom = XID;
-pub type Bool = c_int;
-pub type Colormap = XID;
-pub type Cursor = XID;
-pub type Drawable = XID;
-pub type Font = XID;
-pub type GContext = XID;
-pub type KeyCode = c_uchar;
-pub type KeySym = XID;
-pub type Mask = c_ulong;
-pub type Pixmap = XID;
-pub type Status = Bool;
-pub type Time = c_ulong;
-pub type VisualID = XID;
-pub type Window = XID;
-pub type XID = c_ulong;
-pub type XPointer = *mut c_char;
-
-// opaque structures
-pub enum _XDisplay {}
-pub enum xError {}
-pub enum xEvent {}
-pub enum _XGC {}
-pub enum _XIC {}
-pub enum _XIM {}
-pub enum _XRegion {}
-pub enum _XOC {}
-pub enum _XOM {}
-pub enum _XrmHashBucketRec {}
-
-// TODO structs
-#[repr(C)] pub struct _XcmsCCC;
-#[repr(C)] pub struct XcmsColor;
-#[repr(C)] pub struct _XcmsColorSpace;
-#[repr(C)] pub struct _XcmsFunctionSet;
-#[repr(C)] pub struct _XkbAction;
-#[repr(C)] pub struct _XkbBounds;
-#[repr(C)] pub struct _XkbChanges;
-#[repr(C)] pub struct _XkbClientMapRec;
-#[repr(C)] pub struct _XkbColor;
-#[repr(C)] pub struct _XkbComponentList;
-#[repr(C)] pub struct _XkbComponentNames;
-#[repr(C)] pub struct _XkbControls;
-#[repr(C)] pub struct _XkbControlsChanges;
-#[repr(C)] pub struct _XkbControlsNotify;
-#[repr(C)] pub struct _XkbDeviceChanges;
-#[repr(C)] pub struct _XkbDeviceInfo;
-#[repr(C)] pub struct _XkbDeviceLedInfo;
-#[repr(C)] pub struct _XkbDoodad;
-#[repr(C)] pub struct _XkbExtensionDeviceNotify;
-#[repr(C)] pub struct _XkbGeometry;
-#[repr(C)] pub struct _XkbGeometrySizes;
-#[repr(C)] pub struct _XkbIndicatorMapRec;
-#[repr(C)] pub struct _XkbKey;
-#[repr(C)] pub struct _XkbKeyType;
-#[repr(C)] pub struct _XkbMapChanges;
-#[repr(C)] pub struct _XkbMods;
-#[repr(C)] pub struct _XkbNameChanges;
-#[repr(C)] pub struct _XkbNamesNotify;
-#[repr(C)] pub struct _XkbOutline;
-#[repr(C)] pub struct _XkbOverlay;
-#[repr(C)] pub struct _XkbOverlayKey;
-#[repr(C)] pub struct _XkbOverlayRow;
-#[repr(C)] pub struct _XkbProperty;
-#[repr(C)] pub struct _XkbRow;
-#[repr(C)] pub struct _XkbSection;
-#[repr(C)] pub struct _XkbServerMapRec;
-#[repr(C)] pub struct _XkbShape;
-#[repr(C)] pub struct _XkbStateRec;
-#[repr(C)] pub struct _XkbSymInterpretRec;
-
-// union placeholders
-pub type XEDataObject = *mut c_void;
-
-// misc typedefs
-pub type Display = _XDisplay;
-pub type GC = *mut _XGC;
-pub type Region = *mut _XRegion;
-pub type XcmsCCC = *mut _XcmsCCC;
-pub type XcmsColorSpace = _XcmsColorSpace;
-pub type XcmsFunctionSet = _XcmsFunctionSet;
-pub type XFontSet = *mut _XOC;
-pub type XIC = *mut _XIC;
-pub type XIM = *mut _XIM;
-pub type XkbAction = _XkbAction;
-pub type XkbBoundsPtr = *mut _XkbBounds;
-pub type XkbChangesPtr = *mut _XkbChanges;
-pub type XkbClientMapPtr = *mut _XkbClientMapRec;
-pub type XkbColorPtr = *mut _XkbColor;
-pub type XkbCompatMapPtr = *mut _XkbCompatMapRec;
-pub type XkbComponentListPtr = *mut _XkbComponentList;
-pub type XkbComponentNamesPtr = *mut _XkbComponentNames;
-pub type XkbControlsChangesPtr = *mut _XkbControlsChanges;
-pub type XkbControlsNotifyEvent = _XkbControlsNotify;
-pub type XkbControlsPtr = *mut _XkbControls;
-pub type XkbDescPtr = *mut _XkbDesc;
-pub type XkbDeviceChangesPtr = *mut _XkbDeviceChanges;
-pub type XkbDeviceInfoPtr = *mut _XkbDeviceInfo;
-pub type XkbDeviceLedInfoPtr = *mut _XkbDeviceLedInfo;
-pub type XkbDoodadPtr = *mut _XkbDoodad;
-pub type XkbExtensionDeviceNotifyEvent = _XkbExtensionDeviceNotify;
-pub type XkbGeometryPtr = *mut _XkbGeometry;
-pub type XkbGeometrySizesPtr = *mut _XkbGeometrySizes;
-pub type XkbIndicatorMapPtr = *mut _XkbIndicatorMapRec;
-pub type XkbIndicatorMapRec = _XkbIndicatorMapRec;
-pub type XkbIndicatorPtr = *mut _XkbIndicatorRec;
-pub type XkbKeyTypePtr = *mut _XkbKeyType;
-pub type XkbMapChangesPtr = *mut _XkbMapChanges;
-pub type XkbMapNotifyEvent = _XkbMapNotifyEvent;
-pub type XkbModsPtr = *mut _XkbMods;
-pub type XkbModsRec = _XkbMods;
-pub type XkbNameChangesPtr = *mut _XkbNameChanges;
-pub type XkbNamesNotifyEvent = _XkbNamesNotify;
-pub type XkbNamesPtr = *mut _XkbNamesRec;
-pub type XkbKeyAliasPtr = *mut _XkbKeyAliasRec;
-pub type XkbKeyNamePtr = *mut _XkbKeyNameRec;
-pub type XkbKeyPtr = *mut _XkbKey;
-pub type XkbOutlinePtr = *mut _XkbOutline;
-pub type XkbOverlayKeyPtr = *mut _XkbOverlayKey;
-pub type XkbOverlayPtr = *mut _XkbOverlay;
-pub type XkbOverlayRowPtr = *mut _XkbOverlayRow;
-pub type XkbPropertyPtr = *mut _XkbProperty;
-pub type XkbRowPtr = *mut _XkbRow;
-pub type XkbSectionPtr = *mut _XkbSection;
-pub type XkbServerMapPtr = *mut _XkbServerMapRec;
-pub type XkbShapePtr = *mut _XkbShape;
-pub type XkbStatePtr = *mut _XkbStateRec;
-pub type XkbSymInterpretPtr = *mut _XkbSymInterpretRec;
-pub type XOM = *mut _XOM;
-pub type XrmDatabase = *mut _XrmHashBucketRec;
-pub type XrmOptionDescList = *mut XrmOptionDescRec;
-
-// function pointers
-pub type XConnectionWatchProc = Option<unsafe extern "C" fn (*mut Display, XPointer, c_int, Bool, XPointer)>;
-
-// C enums
-pub type XICCEncodingStyle = c_int;
-pub type XOrientation = c_int;
-pub type XrmBinding = c_int;
-pub type XrmOptionKind = c_int;
-
-#[allow(dead_code)]
-#[cfg(test)]
-#[repr(C)]
-enum TestEnum {
- Variant1,
- Variant2,
-}
-
-#[test]
-fn enum_size_test () {
- assert!(::std::mem::size_of::<TestEnum>() == ::std::mem::size_of::<c_int>());
-}
-
-
-//
-// event structures
-//
-
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XEvent {
- pub pad: [c_long; 24],
-}
-
-impl XEvent {
- pub fn get_type (&self) -> c_int {
- unsafe {
- *(self as *const XEvent as *const c_int)
- }
- }
-}
-
-macro_rules! event_conversions_and_tests {
- { $($ty:ty,)* } => {
- #[test]
- fn xevent_size_test () {
- use std::mem::size_of;
- let xevent_size = size_of::<XEvent>();
- $(assert!(xevent_size >= size_of::<$ty>());)*
- }
-
- $(
- impl AsMut<$ty> for XEvent {
- fn as_mut (&mut self) -> &mut $ty {
- unsafe { mem::transmute(self) }
- }
- }
-
- impl AsRef<$ty> for XEvent {
- fn as_ref (&self) -> &$ty {
- unsafe { mem::transmute(self) }
- }
- }
-
- impl From<$ty> for XEvent {
- fn from (other: $ty) -> XEvent {
- unsafe { transmute_union(&other) }
- }
- }
-
- impl<'a> From<&'a $ty> for XEvent {
- fn from (other: &'a $ty) -> XEvent {
- unsafe { transmute_union(other) }
- }
- }
-
- impl From<XEvent> for $ty {
- fn from (xevent: XEvent) -> $ty {
- unsafe { transmute_union(&xevent) }
- }
- }
-
- impl<'a> From<&'a XEvent> for $ty {
- fn from (xevent: &'a XEvent) -> $ty {
- unsafe { transmute_union(xevent) }
- }
- }
- )*
- };
-}
-
-event_conversions_and_tests! {
- XAnyEvent,
- XButtonEvent,
- XCirculateEvent,
- XCirculateRequestEvent,
- XClientMessageEvent,
- XColormapEvent,
- XConfigureEvent,
- XConfigureRequestEvent,
- XCreateWindowEvent,
- XCrossingEvent,
- XDestroyWindowEvent,
- XErrorEvent,
- XExposeEvent,
- XFocusChangeEvent,
- XGenericEventCookie,
- XGraphicsExposeEvent,
- XGravityEvent,
- XKeyEvent,
- XKeymapEvent,
- XMapEvent,
- XMappingEvent,
- XMapRequestEvent,
- XMotionEvent,
- XNoExposeEvent,
- XPropertyEvent,
- XReparentEvent,
- XResizeRequestEvent,
- XSelectionClearEvent,
- XSelectionEvent,
- XSelectionRequestEvent,
- XUnmapEvent,
- XVisibilityEvent,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XAnyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XButtonEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub root: Window,
- pub subwindow: Window,
- pub time: Time,
- pub x: c_int,
- pub y: c_int,
- pub x_root: c_int,
- pub y_root: c_int,
- pub state: c_uint,
- pub button: c_uint,
- pub same_screen: Bool,
-}
-pub type XButtonPressedEvent = XButtonEvent;
-pub type XButtonReleasedEvent = XButtonEvent;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XCirculateEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub event: Window,
- pub window: Window,
- pub place: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XCirculateRequestEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub parent: Window,
- pub window: Window,
- pub place: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XClientMessageEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub message_type: Atom,
- pub format: c_int,
- pub data: ClientMessageData,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XColormapEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub colormap: Colormap,
- pub new: Bool,
- pub state: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XConfigureEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub event: Window,
- pub window: Window,
- pub x: c_int,
- pub y: c_int,
- pub width: c_int,
- pub height: c_int,
- pub border_width: c_int,
- pub above: Window,
- pub override_redirect: Bool,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XConfigureRequestEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub parent: Window,
- pub window: Window,
- pub x: c_int,
- pub y: c_int,
- pub width: c_int,
- pub height: c_int,
- pub border_width: c_int,
- pub above: Window,
- pub detail: c_int,
- pub value_mask: c_ulong,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XCreateWindowEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub parent: Window,
- pub window: Window,
- pub x: c_int,
- pub y: c_int,
- pub width: c_int,
- pub height: c_int,
- pub border_width: c_int,
- pub override_redirect: Bool,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XCrossingEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub root: Window,
- pub subwindow: Window,
- pub time: Time,
- pub x: c_int,
- pub y: c_int,
- pub x_root: c_int,
- pub y_root: c_int,
- pub mode: c_int,
- pub detail: c_int,
- pub same_screen: Bool,
- pub focus: Bool,
- pub state: c_uint,
-}
-pub type XEnterWindowEvent = XCrossingEvent;
-pub type XLeaveWindowEvent = XCrossingEvent;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XDestroyWindowEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub event: Window,
- pub window: Window,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XErrorEvent {
- pub type_: c_int,
- pub display: *mut Display,
- pub resourceid: XID,
- pub serial: c_ulong,
- pub error_code: c_uchar,
- pub request_code: c_uchar,
- pub minor_code: c_uchar,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XExposeEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub x: c_int,
- pub y: c_int,
- pub width: c_int,
- pub height: c_int,
- pub count: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XFocusChangeEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub mode: c_int,
- pub detail: c_int,
-}
-pub type XFocusInEvent = XFocusChangeEvent;
-pub type XFocusOutEvent = XFocusChangeEvent;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XGraphicsExposeEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub drawable: Drawable,
- pub x: c_int,
- pub y: c_int,
- pub width: c_int,
- pub height: c_int,
- pub count: c_int,
- pub major_code: c_int,
- pub minor_code: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XGravityEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub event: Window,
- pub window: Window,
- pub x: c_int,
- pub y: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XKeyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub root: Window,
- pub subwindow: Window,
- pub time: Time,
- pub x: c_int,
- pub y: c_int,
- pub x_root: c_int,
- pub y_root: c_int,
- pub state: c_uint,
- pub keycode: c_uint,
- pub same_screen: Bool,
-}
-pub type XKeyPressedEvent = XKeyEvent;
-pub type XKeyReleasedEvent = XKeyEvent;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XKeymapEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub key_vector: [c_char; 32],
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XMapEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub event: Window,
- pub window: Window,
- pub override_redirect: Bool,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XMappingEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub event: Window,
- pub request: c_int,
- pub first_keycode: c_int,
- pub count: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XMapRequestEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub parent: Window,
- pub window: Window,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XMotionEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub root: Window,
- pub subwindow: Window,
- pub time: Time,
- pub x: c_int,
- pub y: c_int,
- pub x_root: c_int,
- pub y_root: c_int,
- pub state: c_uint,
- pub is_hint: c_char,
- pub same_screen: Bool,
-}
-pub type XPointerMovedEvent = XMotionEvent;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XNoExposeEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub drawable: Drawable,
- pub major_code: c_int,
- pub minor_code: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XPropertyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub atom: Atom,
- pub time: Time,
- pub state: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XReparentEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub event: Window,
- pub window: Window,
- pub parent: Window,
- pub x: c_int,
- pub y: c_int,
- pub override_redirect: Bool,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XResizeRequestEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub width: c_int,
- pub height: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XSelectionClearEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub selection: Atom,
- pub time: Time,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XSelectionEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub requestor: Window,
- pub selection: Atom,
- pub target: Atom,
- pub property: Atom,
- pub time: Time,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XSelectionRequestEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub owner: Window,
- pub requestor: Window,
- pub selection: Atom,
- pub target: Atom,
- pub property: Atom,
- pub time: Time,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XUnmapEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub event: Window,
- pub window: Window,
- pub from_configure: Bool,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XVisibilityEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub state: c_int,
-}
-
-
-//
-// Xkb structs
-//
-
-
-#[repr(C)]
-pub struct _XkbCompatMapRec {
- pub sym_interpret: XkbSymInterpretPtr,
- pub groups: [XkbModsRec; XkbNumKbdGroups],
- pub num_si: c_ushort,
- pub size_si: c_ushort,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XkbDesc {
- pub dpy: *mut Display,
- pub flags: c_ushort,
- pub device_spec: c_ushort,
- pub min_key_code: KeyCode,
- pub max_key_code: KeyCode,
- pub ctrls: XkbControlsPtr,
- pub server: XkbServerMapPtr,
- pub map: XkbClientMapPtr,
- pub indicators: XkbIndicatorPtr,
- pub names: XkbNamesPtr,
- pub compat: XkbCompatMapPtr,
- pub geom: XkbGeometryPtr,
-}
-
-#[repr(C)]
-pub struct _XkbIndicatorRec {
- pub phys_indicators: c_ulong,
- pub maps: [XkbIndicatorMapRec; XkbNumIndicators],
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XkbKeyAliasRec {
- pub real: [c_char; XkbKeyNameLength],
- pub alias: [c_char; XkbKeyNameLength],
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XkbKeyNameRec {
- pub name: [c_char; XkbKeyNameLength],
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XkbNamesRec {
- pub keycodes: Atom,
- pub geometry: Atom,
- pub symbols: Atom,
- pub types: Atom,
- pub compat: Atom,
- pub vmods: [Atom; XkbNumVirtualMods],
- pub indicators: [Atom; XkbNumIndicators],
- pub groups: [Atom; XkbNumKbdGroups],
- pub keys: XkbKeyNamePtr,
- pub key_aliases: XkbKeyAliasPtr,
- pub radio_groups: *mut Atom,
- pub phys_symbols: Atom,
- pub num_keys: c_uchar,
- pub num_key_aliases: c_uchar,
- pub num_rg: c_ushort,
-}
-
-
-//
-// Xkb event structs
-//
-
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XkbAnyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub time: Time,
- pub xkb_type: c_int,
- pub device: c_uint,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XkbNewKeyboardNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub time: Time,
- pub xkb_type: c_int,
- pub device: c_int,
- pub old_device: c_int,
- pub min_key_code: c_int,
- pub max_key_code: c_int,
- pub old_min_key_code: c_int,
- pub old_max_key_code: c_int,
- pub changed: c_uint,
- pub req_major: c_char,
- pub req_minor: c_char,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XkbMapNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub time: Time,
- pub xkb_type: c_int,
- pub device: c_int,
- pub changed: c_uint,
- pub flags: c_uint,
- pub first_type: c_int,
- pub num_types: c_int,
- pub min_key_code: KeyCode,
- pub max_key_code: KeyCode,
- pub first_key_sym: KeyCode,
- pub first_key_act: KeyCode,
- pub first_key_bahavior: KeyCode,
- pub first_key_explicit: KeyCode,
- pub first_modmap_key: KeyCode,
- pub first_vmodmap_key: KeyCode,
- pub num_key_syms: c_int,
- pub num_key_acts: c_int,
- pub num_key_behaviors: c_int,
- pub num_key_explicit: c_int,
- pub num_modmap_keys: c_int,
- pub num_vmodmap_keys: c_int,
- pub vmods: c_uint,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XkbStateNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub time: Time,
- pub xkb_type: c_int,
- pub device: c_int,
- pub changed: c_uint,
- pub group: c_int,
- pub base_group: c_int,
- pub latched_group: c_int,
- pub locked_group: c_int,
- pub mods: c_uint,
- pub base_mods: c_uint,
- pub latched_mods: c_uint,
- pub locked_mods: c_uint,
- pub compat_state: c_int,
- pub grab_mods: c_uchar,
- pub compat_grab_mods: c_uchar,
- pub lookup_mods: c_uchar,
- pub compat_lookup_mods: c_uchar,
- pub ptr_buttons: c_int,
- pub keycode: KeyCode,
- pub event_type: c_char,
- pub req_major: c_char,
- pub req_minor: c_char,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XkbControlsNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub time: Time,
- pub xkb_type: c_int,
- pub device: c_int,
- pub changed_ctrls: c_uint,
- pub enabled_ctrls: c_uint,
- pub enabled_ctrl_changes: c_uint,
- pub num_groups: c_int,
- pub keycode: KeyCode,
- pub event_type: c_char,
- pub req_major: c_char,
- pub req_minor: c_char,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XkbIndicatorNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub time: Time,
- pub xkb_type: c_int,
- pub device: c_int,
- pub changed: c_uint,
- pub state: c_uint,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XkbNamesNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub time: Time,
- pub xkb_type: c_int,
- pub device: c_int,
- pub changed: c_uint,
- pub first_type: c_int,
- pub num_types: c_int,
- pub first_lvl: c_int,
- pub num_lvls: c_int,
- pub num_aliases: c_int,
- pub num_radio_groups: c_int,
- pub changed_vmods: c_uint,
- pub changed_groups: c_uint,
- pub changed_indicators: c_uint,
- pub first_key: c_int,
- pub num_keys: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XkbCompatMapNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub time: Time,
- pub xkb_type: c_int,
- pub device: c_int,
- pub changed_groups: c_uint,
- pub first_si: c_int,
- pub num_si: c_int,
- pub num_total_si: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XkbBellNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub time: Time,
- pub xkb_type: c_int,
- pub device: c_int,
- pub percent: c_int,
- pub pitch: c_int,
- pub duration: c_int,
- pub bell_class: c_int,
- pub bell_id: c_int,
- pub name: Atom,
- pub window: Window,
- pub event_only: Bool,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XkbActionMessageEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub time: Time,
- pub xkb_type: c_int,
- pub device: c_int,
- pub keycode: KeyCode,
- pub press: Bool,
- pub key_event_follows: Bool,
- pub group: c_int,
- pub mods: c_uint,
- pub message: [c_char; XkbActionMessageLength + 1],
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XkbAccessXNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub time: Time,
- pub xkb_type: c_int,
- pub device: c_int,
- pub detail: c_int,
- pub keycode: c_int,
- pub sk_delay: c_int,
- pub debounce_delay: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XkbExtensionDeviceNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub time: Time,
- pub xkb_type: c_int,
- pub device: c_int,
- pub reason: c_uint,
- pub supported: c_uint,
- pub unsupported: c_uint,
- pub first_btn: c_int,
- pub num_btns: c_int,
- pub leds_defined: c_uint,
- pub led_state: c_uint,
- pub led_class: c_int,
- pub led_id: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XkbEvent {
- _pad: [c_long; 24],
-}
-
-macro_rules! test_xkb_event_size {
- { $($ty:ty,)* } => { $(
- assert!(::std::mem::size_of::<XkbEvent>() >= ::std::mem::size_of::<$ty>());
- )* };
-}
-
-#[test]
-fn xkb_event_size_test () {
- test_xkb_event_size! {
- XkbAnyEvent,
- XkbNewKeyboardNotifyEvent,
- XkbMapNotifyEvent,
- XkbStateNotifyEvent,
- XkbControlsNotifyEvent,
- XkbIndicatorNotifyEvent,
- XkbNamesNotifyEvent,
- XkbCompatMapNotifyEvent,
- XkbBellNotifyEvent,
- XkbActionMessageEvent,
- XkbAccessXNotifyEvent,
- XkbExtensionDeviceNotifyEvent,
- }
-}
-
-pub enum XkbKbdDpyStateRec {}
-pub type XkbKbdDpyStatePtr = *mut XkbKbdDpyStateRec;
-
-
-//
-// other structures
-//
-
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct Depth {
- pub depth: c_int,
- pub nvisuals: c_int,
- pub visuals: *mut Visual,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct Screen {
- pub ext_data: *mut XExtData,
- pub display: *mut Display,
- pub root: Window,
- pub width: c_int,
- pub height: c_int,
- pub mwidth: c_int,
- pub mheight: c_int,
- pub ndepths: c_int,
- pub depths: *mut Depth,
- pub root_depth: c_int,
- pub root_visual: *mut Visual,
- pub default_gc: GC,
- pub cmap: Colormap,
- pub white_pixel: c_ulong,
- pub black_pixel: c_ulong,
- pub max_maps: c_int,
- pub min_maps: c_int,
- pub backing_store: c_int,
- pub save_unders: Bool,
- pub root_input_mask: c_long,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct ScreenFormat {
- pub ext_data: *mut XExtData,
- pub depth: c_int,
- pub bits_per_pixel: c_int,
- pub scanline_pad: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct Visual {
- pub ext_data: *mut XExtData,
- pub visualid: VisualID,
- pub class: c_int,
- pub red_mask: c_ulong,
- pub green_mask: c_ulong,
- pub blue_mask: c_ulong,
- pub bits_per_rgb: c_int,
- pub map_entries: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XArc {
- pub x: c_short,
- pub y: c_short,
- pub width: c_ushort,
- pub height: c_ushort,
- pub angle1: c_short,
- pub angle2: c_short,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XChar2b {
- pub byte1: c_uchar,
- pub byte2: c_uchar,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XCharStruct {
- pub lbearing: c_short,
- pub rbearing: c_short,
- pub width: c_short,
- pub ascent: c_short,
- pub descent: c_short,
- pub attributes: c_ushort,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XClassHint {
- pub res_name: *mut c_char,
- pub res_class: *mut c_char,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XColor {
- pub pixel: c_ulong,
- pub red: c_ushort,
- pub green: c_ushort,
- pub blue: c_ushort,
- pub flags: c_char,
- pub pad: c_char,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XComposeStatus {
- pub compose_ptr: XPointer,
- pub chars_matched: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XExtCodes {
- pub extension: c_int,
- pub major_opcode: c_int,
- pub first_event: c_int,
- pub first_error: c_int,
-}
-
-#[repr(C)]
-pub struct XExtData {
- pub number: c_int,
- pub next: *mut XExtData,
- pub free_private: Option<unsafe extern "C" fn () -> c_int>,
- pub private_data: XPointer,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XFontProp {
- pub name: Atom,
- pub card32: c_ulong,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XFontSetExtents {
- pub max_ink_extent: XRectangle,
- pub max_logical_extent: XRectangle,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XFontStruct {
- pub ext_data: *mut XExtData,
- pub fid: Font,
- pub direction: c_uint,
- pub min_char_or_byte2: c_uint,
- pub max_char_or_byte2: c_uint,
- pub min_byte1: c_uint,
- pub max_byte1: c_uint,
- pub all_chars_exist: Bool,
- pub default_char: c_uint,
- pub n_properties: c_int,
- pub properties: *mut XFontProp,
- pub min_bounds: XCharStruct,
- pub max_bounds: XCharStruct,
- pub per_char: *mut XCharStruct,
- pub ascent: c_int,
- pub descent: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XGCValues {
- pub function: c_int,
- pub plane_mask: c_ulong,
- pub foreground: c_ulong,
- pub background: c_ulong,
- pub line_width: c_int,
- pub line_style: c_int,
- pub cap_style: c_int,
- pub join_style: c_int,
- pub fill_style: c_int,
- pub fill_rule: c_int,
- pub arc_mode: c_int,
- pub tile: Pixmap,
- pub stipple: Pixmap,
- pub ts_x_origin: c_int,
- pub ts_y_origin: c_int,
- pub font: Font,
- pub subwindow_mode: c_int,
- pub graphics_exposures: Bool,
- pub clip_x_origin: c_int,
- pub clip_y_origin: c_int,
- pub clip_mask: Pixmap,
- pub dash_offset: c_int,
- pub dashes: c_char,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XGenericEventCookie {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub extension: c_int,
- pub evtype: c_int,
- pub cookie: c_uint,
- pub data: *mut c_void,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XHostAddress {
- pub family: c_int,
- pub length: c_int,
- pub address: *mut c_char,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XIconSize {
- pub min_width: c_int,
- pub min_height: c_int,
- pub max_width: c_int,
- pub max_height: c_int,
- pub width_inc: c_int,
- pub height_inc: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XImage {
- pub width: c_int,
- pub height: c_int,
- pub xoffset: c_int,
- pub format: c_int,
- pub data: *mut c_char,
- pub byte_order: c_int,
- pub bitmap_unit: c_int,
- pub bitmap_bit_order: c_int,
- pub bitmap_pad: c_int,
- pub depth: c_int,
- pub bytes_per_line: c_int,
- pub bits_per_pixel: c_int,
- pub red_mask: c_ulong,
- pub green_mask: c_ulong,
- pub blue_mask: c_ulong,
- pub obdata: XPointer,
- pub funcs: ImageFns,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XKeyboardControl {
- pub key_click_percent: c_int,
- pub bell_percent: c_int,
- pub bell_pitch: c_int,
- pub bell_duration: c_int,
- pub led: c_int,
- pub led_mode: c_int,
- pub key: c_int,
- pub auto_repeat_mode: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XKeyboardState {
- pub key_click_percent: c_int,
- pub bell_percent: c_int,
- pub bell_pitch: c_uint,
- pub bell_duration: c_uint,
- pub led_mask: c_ulong,
- pub global_auto_repeat: c_int,
- pub auto_repeats: [c_char; 32],
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XmbTextItem {
- pub chars: *mut c_char,
- pub nchars: c_int,
- pub delta: c_int,
- pub font_set: XFontSet,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XModifierKeymap {
- pub max_keypermod: c_int,
- pub modifiermap: *mut KeyCode,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XOMCharSetList {
- pub charset_count: c_int,
- pub charset_list: *mut *mut c_char,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XPixmapFormatValues {
- pub depth: c_int,
- pub bits_per_pixel: c_int,
- pub scanline_pad: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XPoint {
- pub x: c_short,
- pub y: c_short,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRectangle {
- pub x: c_short,
- pub y: c_short,
- pub width: c_ushort,
- pub height: c_ushort,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XrmOptionDescRec {
- pub option: *mut c_char,
- pub specifier: *mut c_char,
- pub argKind: XrmOptionKind,
- pub value: XPointer,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XrmValue {
- pub size: c_uint,
- pub addr: XPointer,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XSegment {
- pub x1: c_short,
- pub y1: c_short,
- pub x2: c_short,
- pub y2: c_short,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XSetWindowAttributes {
- pub background_pixmap: Pixmap,
- pub background_pixel: c_ulong,
- pub border_pixmap: Pixmap,
- pub border_pixel: c_ulong,
- pub bit_gravity: c_int,
- pub win_gravity: c_int,
- pub backing_store: c_int,
- pub backing_planes: c_ulong,
- pub backing_pixel: c_ulong,
- pub save_under: Bool,
- pub event_mask: c_long,
- pub do_not_propagate_mask: c_long,
- pub override_redirect: Bool,
- pub colormap: Colormap,
- pub cursor: Cursor,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XSizeHints {
- pub flags: c_long,
- pub x: c_int,
- pub y: c_int,
- pub width: c_int,
- pub height: c_int,
- pub min_width: c_int,
- pub min_height: c_int,
- pub max_width: c_int,
- pub max_height: c_int,
- pub width_inc: c_int,
- pub height_inc: c_int,
- pub min_aspect: AspectRatio,
- pub max_aspect: AspectRatio,
- pub base_width: c_int,
- pub base_height: c_int,
- pub win_gravity: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XStandardColormap {
- pub colormap: Colormap,
- pub red_max: c_ulong,
- pub red_mult: c_ulong,
- pub green_max: c_ulong,
- pub green_mult: c_ulong,
- pub blue_max: c_ulong,
- pub blue_mult: c_ulong,
- pub base_pixel: c_ulong,
- pub visualid: VisualID,
- pub killid: XID,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XTextItem {
- pub chars: *mut c_char,
- pub nchars: c_int,
- pub delta: c_int,
- pub font: Font,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XTextItem16 {
- pub chars: *mut XChar2b,
- pub nchars: c_int,
- pub delta: c_int,
- pub font: Font,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XTextProperty {
- pub value: *mut c_uchar,
- pub encoding: Atom,
- pub format: c_int,
- pub nitems: c_ulong,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XTimeCoord {
- pub time: Time,
- pub x: c_short,
- pub y: c_short,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XVisualInfo {
- pub visual: *mut Visual,
- pub visualid: VisualID,
- pub screen: c_int,
- pub depth: c_int,
- pub class: c_int,
- pub red_mask: c_ulong,
- pub green_mask: c_ulong,
- pub blue_mask: c_ulong,
- pub colormap_size: c_int,
- pub bits_per_rgb: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XwcTextItem {
- pub chars: *mut wchar_t,
- pub nchars: c_int,
- pub delta: c_int,
- pub font_set: XFontSet,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XWindowAttributes {
- pub x: c_int,
- pub y: c_int,
- pub width: c_int,
- pub height: c_int,
- pub border_width: c_int,
- pub depth: c_int,
- pub visual: *mut Visual,
- pub root: Window,
- pub class: c_int,
- pub bit_gravity: c_int,
- pub win_gravity: c_int,
- pub backing_store: c_int,
- pub backing_planes: c_ulong,
- pub backing_pixel: c_ulong,
- pub save_under: Bool,
- pub colormap: Colormap,
- pub map_installed: Bool,
- pub map_state: c_int,
- pub all_event_masks: c_long,
- pub your_event_mask: c_long,
- pub do_not_propagate_mask: c_long,
- pub override_redirect: Bool,
- pub screen: *mut Screen,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XWindowChanges {
- pub x: c_int,
- pub y: c_int,
- pub width: c_int,
- pub height: c_int,
- pub border_width: c_int,
- pub sibling: Window,
- pub stack_mode: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XWMHints {
- pub flags: c_long,
- pub input: Bool,
- pub initial_state: c_int,
- pub icon_pixmap: Pixmap,
- pub icon_window: Window,
- pub icon_x: c_int,
- pub icon_y: c_int,
- pub icon_mask: Pixmap,
- pub window_group: XID,
-}
-
-
-//
-// anonymous structures
-//
-
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct AspectRatio {
- pub x: c_int,
- pub y: c_int,
-}
-
-#[derive(Clone, Copy, Default, PartialEq)]
-#[repr(C)]
-pub struct ClientMessageData {
- longs: [c_long; 5],
-}
-
-impl ClientMessageData {
- pub fn as_bytes (&self) -> &[c_char] {
- self.as_ref()
- }
-
- pub fn as_bytes_mut (&mut self) -> &mut [c_char] {
- self.as_mut()
- }
-
- pub fn as_longs (&self) -> &[c_long] {
- self.as_ref()
- }
-
- pub fn as_longs_mut (&mut self) -> &mut [c_long] {
- self.as_mut()
- }
-
- pub fn as_shorts (&self) -> &[c_short] {
- self.as_ref()
- }
-
- pub fn as_shorts_mut (&mut self) -> &mut [c_short] {
- self.as_mut()
- }
-
- pub fn get_byte (&self, index: usize) -> c_char {
- self.as_bytes()[index]
- }
-
- pub fn get_long (&self, index: usize) -> c_long {
- self.longs[index]
- }
-
- pub fn get_short (&self, index: usize) -> c_short {
- self.as_shorts()[index]
- }
-
- pub fn new() -> ClientMessageData {
- ClientMessageData { longs: [0; 5] }
- }
-
- pub fn set_byte (&mut self, index: usize, value: c_char) {
- self.as_bytes_mut()[index] = value;
- }
-
- pub fn set_long (&mut self, index: usize, value: c_long) {
- self.longs[index] = value;
- }
-
- pub fn set_short (&mut self, index: usize, value: c_short) {
- self.as_shorts_mut()[index] = value;
- }
-}
-
-macro_rules! client_message_data_conversions {
- { $($ty:ty[$n:expr],)* } => {
- $(
- impl AsMut<[$ty]> for ClientMessageData {
- fn as_mut (&mut self) -> &mut [$ty] {
- unsafe { slice::from_raw_parts_mut(self.longs.as_mut_ptr() as *mut $ty, $n) }
- }
- }
-
- impl AsRef<[$ty]> for ClientMessageData {
- fn as_ref (&self) -> &[$ty] {
- unsafe { slice::from_raw_parts(self.longs.as_ptr() as *mut $ty, $n) }
- }
- }
-
- impl From<[$ty; $n]> for ClientMessageData {
- fn from (array: [$ty; $n]) -> ClientMessageData {
- unsafe { transmute_union(&array) }
- }
- }
- )*
- };
-}
-
-client_message_data_conversions! {
- c_schar[20],
- c_uchar[20],
- c_short[10],
- c_ushort[10],
- c_long[5],
- c_ulong[5],
-}
-
-#[test]
-fn client_message_size_test () {
- assert!(::std::mem::size_of::<ClientMessageData>() >= ::std::mem::size_of::<[c_char; 20]>());
- assert!(::std::mem::size_of::<ClientMessageData>() >= ::std::mem::size_of::<[c_short; 10]>());
-}
-
-#[derive(Copy)]
-#[repr(C)]
-pub struct ImageFns {
- pub create_image: Option<unsafe extern "C" fn (*mut Display, *mut Visual, c_uint, c_int, c_int, *mut c_char, c_uint, c_uint, c_int, c_int) -> *mut XImage>,
- pub destroy_image: Option<unsafe extern "C" fn (*mut XImage) -> c_int>,
- pub get_pixel: Option<unsafe extern "C" fn (*mut XImage, c_int, c_int) -> c_ulong>,
- pub put_pixel: Option<unsafe extern "C" fn (*mut XImage, c_int, c_int, c_ulong) -> c_int>,
- pub sub_image: Option<unsafe extern "C" fn (*mut XImage, c_int, c_int, c_uint, c_uint) -> *mut XImage>,
- pub add_pixel: Option<unsafe extern "C" fn (&mut XImage, c_long) -> c_int>,
-}
-
-impl Clone for ImageFns {
- fn clone (&self) -> ImageFns {
- *self
- }
-}
-
-impl PartialEq for ImageFns {
- fn eq (&self, rhs: &ImageFns) -> bool {
- unsafe { mem_eq(self, rhs) }
- }
-}
-
-
-//
-// constants
-//
-
-
-// allocate colormap
-pub const AllocNone: c_int = 0;
-pub const AllocAll: c_int = 1;
-
-// array sizes
-pub const XkbKeyNameLength: usize = 4;
-pub const XkbNumIndicators: usize = 32;
-pub const XkbNumKbdGroups: usize = 4;
-pub const XkbNumVirtualMods: usize = 16;
-
-// atoms
-pub const XA_PRIMARY: Atom = 1;
-pub const XA_SECONDARY: Atom = 2;
-pub const XA_ARC: Atom = 3;
-pub const XA_ATOM: Atom = 4;
-pub const XA_BITMAP: Atom = 5;
-pub const XA_CARDINAL: Atom = 6;
-pub const XA_COLORMAP: Atom = 7;
-pub const XA_CURSOR: Atom = 8;
-pub const XA_CUT_BUFFER0: Atom = 9;
-pub const XA_CUT_BUFFER1: Atom = 10;
-pub const XA_CUT_BUFFER2: Atom = 11;
-pub const XA_CUT_BUFFER3: Atom = 12;
-pub const XA_CUT_BUFFER4: Atom = 13;
-pub const XA_CUT_BUFFER5: Atom = 14;
-pub const XA_CUT_BUFFER6: Atom = 15;
-pub const XA_CUT_BUFFER7: Atom = 16;
-pub const XA_DRAWABLE: Atom = 17;
-pub const XA_FONT: Atom = 18;
-pub const XA_INTEGER: Atom = 19;
-pub const XA_PIXMAP: Atom = 20;
-pub const XA_POINT: Atom = 21;
-pub const XA_RECTANGLE: Atom = 22;
-pub const XA_RESOURCE_MANAGER: Atom = 23;
-pub const XA_RGB_COLOR_MAP: Atom = 24;
-pub const XA_RGB_BEST_MAP: Atom = 25;
-pub const XA_RGB_BLUE_MAP: Atom = 26;
-pub const XA_RGB_DEFAULT_MAP: Atom = 27;
-pub const XA_RGB_GRAY_MAP: Atom = 28;
-pub const XA_RGB_GREEN_MAP: Atom = 29;
-pub const XA_RGB_RED_MAP: Atom = 30;
-pub const XA_STRING: Atom = 31;
-pub const XA_VISUALID: Atom = 32;
-pub const XA_WINDOW: Atom = 33;
-pub const XA_WM_COMMAND: Atom = 34;
-pub const XA_WM_HINTS: Atom = 35;
-pub const XA_WM_CLIENT_MACHINE: Atom = 36;
-pub const XA_WM_ICON_NAME: Atom = 37;
-pub const XA_WM_ICON_SIZE: Atom = 38;
-pub const XA_WM_NAME: Atom = 39;
-pub const XA_WM_NORMAL_HINTS: Atom = 40;
-pub const XA_WM_SIZE_HINTS: Atom = 41;
-pub const XA_WM_ZOOM_HINTS: Atom = 42;
-pub const XA_MIN_SPACE: Atom = 43;
-pub const XA_NORM_SPACE: Atom = 44;
-pub const XA_MAX_SPACE: Atom = 45;
-pub const XA_END_SPACE: Atom = 46;
-pub const XA_SUPERSCRIPT_X: Atom = 47;
-pub const XA_SUPERSCRIPT_Y: Atom = 48;
-pub const XA_SUBSCRIPT_X: Atom = 49;
-pub const XA_SUBSCRIPT_Y: Atom = 50;
-pub const XA_UNDERLINE_POSITION: Atom = 51;
-pub const XA_UNDERLINE_THICKNESS: Atom = 52;
-pub const XA_STRIKEOUT_ASCENT: Atom = 53;
-pub const XA_STRIKEOUT_DESCENT: Atom = 54;
-pub const XA_ITALIC_ANGLE: Atom = 55;
-pub const XA_X_HEIGHT: Atom = 56;
-pub const XA_QUAD_WIDTH: Atom = 57;
-pub const XA_WEIGHT: Atom = 58;
-pub const XA_POINT_SIZE: Atom = 59;
-pub const XA_RESOLUTION: Atom = 60;
-pub const XA_COPYRIGHT: Atom = 61;
-pub const XA_NOTICE: Atom = 62;
-pub const XA_FONT_NAME: Atom = 63;
-pub const XA_FAMILY_NAME: Atom = 64;
-pub const XA_FULL_NAME: Atom = 65;
-pub const XA_CAP_HEIGHT: Atom = 66;
-pub const XA_WM_CLASS: Atom = 67;
-pub const XA_WM_TRANSIENT_FOR: Atom = 68;
-
-// boolean values
-pub const False: Bool = 0;
-pub const True: Bool = 1;
-
-// clip rect ordering
-pub const Unsorted: c_int = 0;
-pub const YSorted: c_int = 1;
-pub const YXSorted: c_int = 2;
-pub const YXBanded: c_int = 3;
-
-// color component mask
-pub const DoRed: c_char = 1;
-pub const DoGreen: c_char = 2;
-pub const DoBlue: c_char = 4;
-
-// error codes
-pub const Success: c_uchar = 0;
-pub const BadRequest: c_uchar = 1;
-pub const BadValue: c_uchar = 2;
-pub const BadWindow: c_uchar = 3;
-pub const BadPixmap: c_uchar = 4;
-pub const BadAtom: c_uchar = 5;
-pub const BadCursor: c_uchar = 6;
-pub const BadFont: c_uchar = 7;
-pub const BadMatch: c_uchar = 8;
-pub const BadDrawable: c_uchar = 9;
-pub const BadAccess: c_uchar = 10;
-pub const BadAlloc: c_uchar = 11;
-pub const BadColor: c_uchar = 12;
-pub const BadGC: c_uchar = 13;
-pub const BadIDChoice: c_uchar = 14;
-pub const BadName: c_uchar = 15;
-pub const BadLength: c_uchar = 16;
-pub const BadImplementation: c_uchar = 17;
-pub const FirstExtensionError: c_uchar = 128;
-pub const LastExtensionError: c_uchar = 255;
-
-// event kinds
-pub const KeyPress: c_int = 2;
-pub const KeyRelease: c_int = 3;
-pub const ButtonPress: c_int = 4;
-pub const ButtonRelease: c_int = 5;
-pub const MotionNotify: c_int = 6;
-pub const EnterNotify: c_int = 7;
-pub const LeaveNotify: c_int = 8;
-pub const FocusIn: c_int = 9;
-pub const FocusOut: c_int = 10;
-pub const KeymapNotify: c_int = 11;
-pub const Expose: c_int = 12;
-pub const GraphicsExpose: c_int = 13;
-pub const NoExpose: c_int = 14;
-pub const VisibilityNotify: c_int = 15;
-pub const CreateNotify: c_int = 16;
-pub const DestroyNotify: c_int = 17;
-pub const UnmapNotify: c_int = 18;
-pub const MapNotify: c_int = 19;
-pub const MapRequest: c_int = 20;
-pub const ReparentNotify: c_int = 21;
-pub const ConfigureNotify: c_int = 22;
-pub const ConfigureRequest: c_int = 23;
-pub const GravityNotify: c_int = 24;
-pub const ResizeRequest: c_int = 25;
-pub const CirculateNotify: c_int = 26;
-pub const CirculateRequest: c_int = 27;
-pub const PropertyNotify: c_int = 28;
-pub const SelectionClear: c_int = 29;
-pub const SelectionRequest: c_int = 30;
-pub const SelectionNotify: c_int = 31;
-pub const ColormapNotify: c_int = 32;
-pub const ClientMessage: c_int = 33;
-pub const MappingNotify: c_int = 34;
-pub const GenericEvent: c_int = 35;
-pub const LASTEvent: c_int = 36;
-
-// event mask
-pub const NoEventMask: c_long = 0;
-pub const KeyPressMask: c_long = 0x0000_0001;
-pub const KeyReleaseMask: c_long = 0x0000_0002;
-pub const ButtonPressMask: c_long = 0x0000_0004;
-pub const ButtonReleaseMask: c_long = 0x0000_0008;
-pub const EnterWindowMask: c_long = 0x0000_0010;
-pub const LeaveWindowMask: c_long = 0x0000_0020;
-pub const PointerMotionMask: c_long = 0x0000_0040;
-pub const PointerMotionHintMask: c_long = 0x0000_0080;
-pub const Button1MotionMask: c_long = 0x0000_0100;
-pub const Button2MotionMask: c_long = 0x0000_0200;
-pub const Button3MotionMask: c_long = 0x0000_0400;
-pub const Button4MotionMask: c_long = 0x0000_0800;
-pub const Button5MotionMask: c_long = 0x0000_1000;
-pub const ButtonMotionMask: c_long = 0x0000_2000;
-pub const KeymapStateMask: c_long = 0x0000_4000;
-pub const ExposureMask: c_long = 0x0000_8000;
-pub const VisibilityChangeMask: c_long = 0x0001_0000;
-pub const StructureNotifyMask: c_long = 0x0002_0000;
-pub const ResizeRedirectMask: c_long = 0x0004_0000;
-pub const SubstructureNotifyMask: c_long = 0x0008_0000;
-pub const SubstructureRedirectMask: c_long = 0x0010_0000;
-pub const FocusChangeMask: c_long = 0x0020_0000;
-pub const PropertyChangeMask: c_long = 0x0040_0000;
-pub const ColormapChangeMask: c_long = 0x0080_0000;
-pub const OwnerGrabButtonMask: c_long = 0x0100_0000;
-
-// property modes
-pub const PropModeReplace: c_int = 0;
-pub const PropModePrepend: c_int = 1;
-pub const PropModeAppend: c_int = 2;
-
-// modifier names
-pub const ShiftMapIndex: c_int = 0;
-pub const LockMapIndex: c_int = 1;
-pub const ControlMapIndex: c_int = 2;
-pub const Mod1MapIndex: c_int = 3;
-pub const Mod2MapIndex: c_int = 4;
-pub const Mod3MapIndex: c_int = 5;
-pub const Mod4MapIndex: c_int = 6;
-pub const Mod5MapIndex: c_int = 7;
-
-// button masks
-pub const Button1Mask: c_uint = (1<<8);
-pub const Button2Mask: c_uint = (1<<9);
-pub const Button3Mask: c_uint = (1<<10);
-pub const Button4Mask: c_uint = (1<<11);
-pub const Button5Mask: c_uint = (1<<12);
-pub const AnyModifier: c_uint = (1<<15);
-
-// Notify modes
-pub const NotifyNormal: c_int = 0;
-pub const NotifyGrab: c_int = 1;
-pub const NotifyUngrab: c_int = 2;
-pub const NotifyWhileGrabbed: c_int = 3;
-
-pub const NotifyHint: c_int = 1;
-
-// Notify detail
-pub const NotifyAncestor: c_int = 0;
-pub const NotifyVirtual: c_int = 1;
-pub const NotifyInferior: c_int = 2;
-pub const NotifyNonlinear: c_int = 3;
-pub const NotifyNonlinearVirtual: c_int = 4;
-pub const NotifyPointer: c_int = 5;
-pub const NotifyPointerRoot: c_int = 6;
-pub const NotifyDetailNone: c_int = 7;
-
-// Visibility notify
-pub const VisibilityUnobscured: c_int = 0;
-pub const VisibilityPartiallyObscured: c_int = 1;
-pub const VisibilityFullyObscured: c_int = 2;
-
-// Circulation request
-pub const PlaceOnTop: c_int = 0;
-pub const PlaceOnBottom: c_int = 1;
-
-// protocol families
-pub const FamilyInternet: c_int = 0;
-pub const FamilyDECnet: c_int = 1;
-pub const FamilyChaos: c_int = 2;
-pub const FamilyInternet6: c_int = 6;
-
-// authentication families not tied to a specific protocol
-pub const FamilyServerInterpreted: c_int = 5;
-
-// property notification
-pub const PropertyNewValue: c_int = 0;
-pub const PropertyDelete: c_int = 1;
-
-// Color Map notification
-pub const ColormapUninstalled: c_int = 0;
-pub const ColormapInstalled: c_int = 1;
-
-// grab modes
-pub const GrabModeSync: c_int = 0;
-pub const GrabModeAsync: c_int = 1;
-
-// grab status
-pub const GrabSuccess: c_int = 0;
-pub const AlreadyGrabbed: c_int = 1;
-pub const GrabInvalidTime: c_int = 2;
-pub const GrabNotViewable: c_int = 3;
-pub const GrabFrozen: c_int = 4;
-
-// AllowEvents modes
-pub const AsyncPointer: c_int = 0;
-pub const SyncPointer: c_int = 1;
-pub const ReplayPointer: c_int = 2;
-pub const AsyncKeyboard: c_int = 3;
-pub const SyncKeyboard: c_int = 4;
-pub const ReplayKeyboard: c_int = 5;
-pub const AsyncBoth: c_int = 6;
-pub const SyncBoth: c_int = 7;
-
-// Used in SetInputFocus, GetInputFocus
-pub const RevertToNone: c_int = 0;
-pub const RevertToPointerRoot: c_int = 1;
-pub const RevertToParent: c_int = 2;
-
-
-// ConfigureWindow structure
-pub const CWX: c_ushort = (1<<0);
-pub const CWY: c_ushort = (1<<1);
-pub const CWWidth: c_ushort = (1<<2);
-pub const CWHeight: c_ushort = (1<<3);
-pub const CWBorderWidth: c_ushort = (1<<4);
-pub const CWSibling: c_ushort = (1<<5);
-pub const CWStackMode: c_ushort = (1<<6);
-
-// gravity
-pub const ForgetGravity: c_int = 0;
-pub const UnmapGravity: c_int = 0;
-pub const NorthWestGravity: c_int = 1;
-pub const NorthGravity: c_int = 2;
-pub const NorthEastGravity: c_int = 3;
-pub const WestGravity: c_int = 4;
-pub const CenterGravity: c_int = 5;
-pub const EastGravity: c_int = 6;
-pub const SouthWestGravity: c_int = 7;
-pub const SouthGravity: c_int = 8;
-pub const SouthEastGravity: c_int = 9;
-pub const StaticGravity: c_int = 10;
-
-// image format
-pub const XYBitmap: c_int = 0;
-pub const XYPixmap: c_int = 1;
-pub const ZPixmap: c_int = 2;
-
-// Used in CreateWindow for backing-store hint
-pub const NotUseful: c_int = 0;
-pub const WhenMapped: c_int = 1;
-pub const Always: c_int = 2;
-
-// map state
-pub const IsUnmapped: c_int = 0;
-pub const IsUnviewable: c_int = 1;
-pub const IsViewable: c_int = 2;
-
-// modifier keys mask
-pub const ShiftMask: c_uint = 0x01;
-pub const LockMask: c_uint = 0x02;
-pub const ControlMask: c_uint = 0x04;
-pub const Mod1Mask: c_uint = 0x08;
-pub const Mod2Mask: c_uint = 0x10;
-pub const Mod3Mask: c_uint = 0x20;
-pub const Mod4Mask: c_uint = 0x40;
-pub const Mod5Mask: c_uint = 0x80;
-
-// mouse buttons
-pub const Button1: c_uint = 1;
-pub const Button2: c_uint = 2;
-pub const Button3: c_uint = 3;
-pub const Button4: c_uint = 4;
-pub const Button5: c_uint = 5;
-
-// size hints mask
-pub const USPosition: c_long = 0x0001;
-pub const USSize: c_long = 0x0002;
-pub const PPosition: c_long = 0x0004;
-pub const PSize: c_long = 0x0008;
-pub const PMinSize: c_long = 0x0010;
-pub const PMaxSize: c_long = 0x0020;
-pub const PResizeInc: c_long = 0x0040;
-pub const PAspect: c_long = 0x0080;
-pub const PBaseSize: c_long = 0x0100;
-pub const PWinGravity: c_long = 0x0200;
-pub const PAllHints: c_long = PPosition | PSize | PMinSize | PMaxSize | PResizeInc | PAspect;
-
-// Used in ChangeSaveSet
-pub const SetModeInsert: c_int = 0;
-pub const SetModeDelete: c_int = 1;
-
-// Used in ChangeCloseDownMode
-pub const DestroyAll: c_int = 0;
-pub const RetainPermanent: c_int = 1;
-pub const RetainTemporary: c_int = 2;
-
-// Window stacking method (in configureWindow)
-pub const Above: c_int = 0;
-pub const Below: c_int = 1;
-pub const TopIf: c_int = 2;
-pub const BottomIf: c_int = 3;
-pub const Opposite: c_int = 4;
-
-// Circulation direction
-pub const RaiseLowest: c_int = 0;
-pub const LowerHighest: c_int = 1;
-
-// graphics functions
-pub const GXclear: c_int = 0x0;
-pub const GXand: c_int = 0x1;
-pub const GXandReverse: c_int = 0x2;
-pub const GXcopy: c_int = 0x3;
-pub const GXandInverted: c_int = 0x4;
-pub const GXnoop: c_int = 0x5;
-pub const GXxor: c_int = 0x6;
-pub const GXor: c_int = 0x7;
-pub const GXnor: c_int = 0x8;
-pub const GXequiv: c_int = 0x9;
-pub const GXinvert: c_int = 0xa;
-pub const GXorReverse: c_int = 0xb;
-pub const GXcopyInverted: c_int = 0xc;
-pub const GXorInverted: c_int = 0xd;
-pub const GXnand: c_int = 0xe;
-pub const GXset: c_int = 0xf;
-
-// LineStyle
-pub const LineSolid: c_int = 0;
-pub const LineOnOffDash: c_int = 1;
-pub const LineDoubleDash: c_int = 2;
-
-// capStyle
-pub const CapNotLast: c_int = 0;
-pub const CapButt: c_int = 1;
-pub const CapRound: c_int = 2;
-pub const CapProjecting: c_int = 3;
-
-// joinStyle
-pub const JoinMiter: c_int = 0;
-pub const JoinRound: c_int = 1;
-pub const JoinBevel: c_int = 2;
-
-// fillStyle
-pub const FillSolid: c_int = 0;
-pub const FillTiled: c_int = 1;
-pub const FillStippled: c_int = 2;
-pub const FillOpaqueStippled: c_int = 3;
-
-// fillRule
-pub const EvenOddRule: c_int = 0;
-pub const WindingRule: c_int = 1;
-
-// subwindow mode
-pub const ClipByChildren: c_int = 0;
-pub const IncludeInferiors: c_int = 1;
-
-// CoordinateMode for drawing routines
-pub const CoordModeOrigin: c_int = 0;
-pub const CoordModePrevious: c_int = 1;
-
-// Polygon shapes
-pub const Complex: c_int = 0;
-pub const Nonconvex: c_int = 1;
-pub const Convex: c_int = 2;
-
-// Arc modes for PolyFillArc
-pub const ArcChord: c_int = 0;
-pub const ArcPieSlice: c_int = 1;
-
-// GC components
-pub const GCFunction: c_uint = (1<<0);
-pub const GCPlaneMask: c_uint = (1<<1);
-pub const GCForeground: c_uint = (1<<2);
-pub const GCBackground: c_uint = (1<<3);
-pub const GCLineWidth: c_uint = (1<<4);
-pub const GCLineStyle: c_uint = (1<<5);
-pub const GCCapStyle: c_uint = (1<<6);
-pub const GCJoinStyle: c_uint = (1<<7);
-pub const GCFillStyle: c_uint = (1<<8);
-pub const GCFillRule: c_uint = (1<<9);
-pub const GCTile: c_uint = (1<<10);
-pub const GCStipple: c_uint = (1<<11);
-pub const GCTileStipXOrigin: c_uint = (1<<12);
-pub const GCTileStipYOrigin: c_uint = (1<<13);
-pub const GCFont : c_uint = (1<<14);
-pub const GCSubwindowMode: c_uint = (1<<15);
-pub const GCGraphicsExposures: c_uint = (1<<16);
-pub const GCClipXOrigin: c_uint = (1<<17);
-pub const GCClipYOrigin: c_uint = (1<<18);
-pub const GCClipMask: c_uint = (1<<19);
-pub const GCDashOffset: c_uint = (1<<20);
-pub const GCDashList: c_uint = (1<<21);
-pub const GCArcMode: c_uint = (1<<22);
-
-pub const GCLastBit: c_uint = 22;
-
-// draw direction
-pub const FontLeftToRight: c_int = 0;
-pub const FontRightToLeft: c_int = 1;
-
-pub const FontChange: c_uchar = 255;
-
-// QueryBestSize Class
-pub const CursorShape: c_int = 0;
-pub const TileShape: c_int = 1;
-pub const StippleShape: c_int = 2;
-
-// keyboard autorepeat
-pub const AutoRepeatModeOff: c_int = 0;
-pub const AutoRepeatModeOn: c_int = 1;
-pub const AutoRepeatModeDefault: c_int = 2;
-
-pub const LedModeOff: c_int = 0;
-pub const LedModeOn: c_int = 1;
-
-// masks for ChangeKeyboardControl
-pub const KBKeyClickPercent: c_ulong = (1<<0);
-pub const KBBellPercent: c_ulong = (1<<1);
-pub const KBBellPitch: c_ulong = (1<<2);
-pub const KBBellDuration: c_ulong = (1<<3);
-pub const KBLed: c_ulong = (1<<4);
-pub const KBLedMode: c_ulong = (1<<5);
-pub const KBKey: c_ulong = (1<<6);
-pub const KBAutoRepeatMode: c_ulong = (1<<7);
-
-pub const MappingSuccess: c_uchar = 0;
-pub const MappingBusy: c_uchar = 1;
-pub const MappingFailed: c_uchar = 2;
-
-pub const MappingModifier: c_int = 0;
-pub const MappingKeyboard: c_int = 1;
-pub const MappingPointer: c_int = 2;
-
-// screensaver
-pub const DontPreferBlanking: c_int = 0;
-pub const PreferBlanking: c_int = 1;
-pub const DefaultBlanking: c_int = 2;
-
-pub const DisableScreenSaver: c_int = 0;
-pub const DisableScreenInterval: c_int = 0;
-
-pub const DontAllowExposures: c_int = 0;
-pub const AllowExposures: c_int = 1;
-pub const DefaultExposures: c_int = 2;
-
-pub const ScreenSaverReset: c_int = 0;
-pub const ScreenSaverActive: c_int = 1;
-
-// hosts and connections
-pub const HostInsert: c_uchar = 0;
-pub const HostDelete: c_uchar = 1;
-
-pub const EnableAccess: c_int = 1;
-pub const DisableAccess: c_int = 0;
-
-// visual class
-pub const StaticGray: c_int = 0;
-pub const GrayScale: c_int = 1;
-pub const StaticColor: c_int = 2;
-pub const PseudoColor: c_int = 3;
-pub const TrueColor: c_int = 4;
-pub const DirectColor: c_int = 5;
-
-// visual info mask
-pub const VisualNoMask: c_long = 0x0000;
-pub const VisualIDMask: c_long = 0x0001;
-pub const VisualScreenMask: c_long = 0x0002;
-pub const VisualDepthMask: c_long = 0x0004;
-pub const VisualClassMask: c_long = 0x0008;
-pub const VisualRedMaskMask: c_long = 0x0010;
-pub const VisualGreenMaskMask: c_long = 0x0020;
-pub const VisualBlueMaskMask: c_long = 0x0040;
-pub const VisualColormapSizeMask: c_long = 0x0080;
-pub const VisualBitsPerRGBMask: c_long = 0x0100;
-pub const VisualAllMask: c_long = 0x01ff;
-
-// window attributes
-pub const CWBackPixmap: c_ulong = 0x0001;
-pub const CWBackPixel: c_ulong = 0x0002;
-pub const CWBorderPixmap: c_ulong = 0x0004;
-pub const CWBorderPixel: c_ulong = 0x0008;
-pub const CWBitGravity: c_ulong = 0x0010;
-pub const CWWinGravity: c_ulong = 0x0020;
-pub const CWBackingStore: c_ulong = 0x0040;
-pub const CWBackingPlanes: c_ulong = 0x0080;
-pub const CWBackingPixel: c_ulong = 0x0100;
-pub const CWOverrideRedirect: c_ulong = 0x0200;
-pub const CWSaveUnder: c_ulong = 0x0400;
-pub const CWEventMask: c_ulong = 0x0800;
-pub const CWDontPropagate: c_ulong = 0x1000;
-pub const CWColormap: c_ulong = 0x2000;
-pub const CWCursor: c_ulong = 0x4000;
-
-// window classes
-pub const InputOutput: c_int = 1;
-pub const InputOnly: c_int = 2;
-
-// XCreateIC values
-pub const XIMPreeditArea: c_int = 0x0001;
-pub const XIMPreeditCallbacks: c_int = 0x0002;
-pub const XIMPreeditPosition: c_int = 0x0004;
-pub const XIMPreeditNothing: c_int = 0x0008;
-pub const XIMPreeditNone: c_int = 0x0010;
-pub const XIMStatusArea: c_int = 0x0100;
-pub const XIMStatusCallbacks: c_int = 0x0200;
-pub const XIMStatusNothing: c_int = 0x0400;
-pub const XIMStatusNone: c_int = 0x0800;
-
-// Byte order used in imageByteOrder and bitmapBitOrder
-pub const LSBFirst: c_int = 0;
-pub const MSBFirst: c_int = 1;
-
-// Reserved resource and constant definitions
-//pub const None: c_int = 0;
-pub const ParentRelative: c_int = 1;
-pub const CopyFromParent: c_int = 0;
-pub const PointerWindow: c_int = 0;
-pub const InputFocus: c_int = 1;
-pub const PointerRoot: c_int = 1;
-pub const AnyPropertyType: c_int = 0;
-pub const AnyKey: c_int = 0;
-pub const AnyButton: c_int = 0;
-pub const AllTemporary: c_int = 0;
-pub const CurrentTime: Time = 0;
-pub const NoSymbol: c_int = 0;
-
-/* Definitions for the X window system likely to be used by applications */
-pub const X_PROTOCOL: c_int = 11;
-pub const X_PROTOCOL_REVISION: c_int = 0;
-
-pub const XNVaNestedList: &'static str = "XNVaNestedList";
-pub const XNQueryInputStyle: &'static str = "queryInputStyle";
-pub const XNClientWindow: &'static str = "clientWindow";
-pub const XNInputStyle: &'static str = "inputStyle";
-pub const XNFocusWindow: &'static str = "focusWindow";
-pub const XNResourceName: &'static str = "resourceName";
-pub const XNResourceClass: &'static str = "resourceClass";
-pub const XNGeometryCallback: &'static str = "geometryCallback";
-pub const XNDestroyCallback: &'static str = "destroyCallback";
-pub const XNFilterEvents: &'static str = "filterEvents";
-pub const XNPreeditStartCallback: &'static str = "preeditStartCallback";
-pub const XNPreeditDoneCallback: &'static str = "preeditDoneCallback";
-pub const XNPreeditDrawCallback: &'static str = "preeditDrawCallback";
-pub const XNPreeditCaretCallback: &'static str = "preeditCaretCallback";
-pub const XNPreeditStateNotifyCallback: &'static str = "preeditStateNotifyCallback";
-pub const XNPreeditAttributes: &'static str = "preeditAttributes";
-pub const XNStatusStartCallback: &'static str = "statusStartCallback";
-pub const XNStatusDoneCallback: &'static str = "statusDoneCallback";
-pub const XNStatusDrawCallback: &'static str = "statusDrawCallback";
-pub const XNStatusAttributes: &'static str = "statusAttributes";
-pub const XNArea: &'static str = "area";
-pub const XNAreaNeeded: &'static str = "areaNeeded";
-pub const XNSpotLocation: &'static str = "spotLocation";
-pub const XNColormap: &'static str = "colorMap";
-pub const XNStdColormap: &'static str = "stdColorMap";
-pub const XNForeground: &'static str = "foreground";
-pub const XNBackground: &'static str = "background";
-pub const XNBackgroundPixmap: &'static str = "backgroundPixmap";
-pub const XNFontSet: &'static str = "fontSet";
-pub const XNLineSpace: &'static str = "lineSpace";
-pub const XNCursor: &'static str = "cursor";
-
-pub const XNQueryIMValuesList: &'static str = "queryIMValuesList";
-pub const XNQueryICValuesList: &'static str = "queryICValuesList";
-pub const XNVisiblePosition: &'static str = "visiblePosition";
-pub const XNR6PreeditCallback: &'static str = "r6PreeditCallback";
-pub const XNStringConversionCallback: &'static str = "stringConversionCallback";
-pub const XNStringConversion: &'static str = "stringConversion";
-pub const XNResetState: &'static str = "resetState";
-pub const XNHotKey: &'static str = "hotKey";
-pub const XNHotKeyState: &'static str = "hotKeyState";
-pub const XNPreeditState: &'static str = "preeditState";
-pub const XNSeparatorofNestedList: &'static str = "separatorofNestedList";
-
-pub const XBufferOverflow: i32 = -1;
-pub const XLookupNone: i32 = 1;
-pub const XLookupChars: i32 = 2;
-pub const XLookupKeySym: i32 = 3;
-pub const XLookupBoth: i32 = 4;
-
-// Xkb constants
-pub const XkbActionMessageLength: usize = 6;
-
-pub const XkbOD_Success: c_int = 0;
-pub const XkbOD_BadLibraryVersion: c_int = 1;
-pub const XkbOD_ConnectionRefused: c_int = 2;
-pub const XkbOD_NonXkbServer: c_int = 3;
-pub const XkbOD_BadServerVersion: c_int = 4;
-
-pub const XkbLC_ForceLatinLookup: c_uint = 1 << 0;
-pub const XkbLC_ConsumeLookupMods: c_uint = 1 << 1;
-pub const XkbLC_AlwaysConsumeShiftAndLock: c_uint = 1 << 2;
-pub const XkbLC_IgnoreNewKeyboards: c_uint = 1 << 3;
-pub const XkbLC_ControlFallback: c_uint = 1 << 4;
-pub const XkbLC_ConsumeKeysOnComposeFail: c_uint = 1 << 29;
-pub const XkbLC_ComposeLED: c_uint = 1 << 30;
-pub const XkbLC_BeepOnComposeFail: c_uint = 1 << 31;
-
-pub const XkbLC_AllComposeControls: c_uint = 0xc000_0000;
-pub const XkbLC_AllControls: c_uint = 0xc000_001f;
-
-pub const XkbNewKeyboardNotify: c_int = 0;
-pub const XkbMapNotify: c_int = 1;
-pub const XkbStateNotify: c_int = 2;
-pub const XkbControlsNotify: c_int = 3;
-pub const XkbIndicatorStateNotify: c_int = 4;
-pub const XkbIndicatorMapNotify: c_int = 5;
-pub const XkbNamesNotify: c_int = 6;
-pub const XkbCompatMapNotify: c_int = 7;
-pub const XkbBellNotify: c_int = 8;
-pub const XkbActionMessage: c_int = 9;
-pub const XkbAccessXNotify: c_int = 10;
-pub const XkbExtensionDeviceNotify: c_int = 11;
-
-pub const XkbNewKeyboardNotifyMask: c_ulong = 1 << 0;
-pub const XkbMapNotifyMask: c_ulong = 1 << 1;
-pub const XkbStateNotifyMask: c_ulong = 1 << 2;
-pub const XkbControlsNotifyMask: c_ulong = 1 << 3;
-pub const XkbIndicatorStateNotifyMask: c_ulong = 1 << 4;
-pub const XkbIndicatorMapNotifyMask: c_ulong = 1 << 5;
-pub const XkbNamesNotifyMask: c_ulong = 1 << 6;
-pub const XkbCompatMapNotifyMask: c_ulong = 1 << 7;
-pub const XkbBellNotifyMask: c_ulong = 1 << 8;
-pub const XkbActionMessageMask: c_ulong = 1 << 9;
-pub const XkbAccessXNotifyMask: c_ulong = 1 << 10;
-pub const XkbExtensionDeviceNotifyMask: c_ulong = 1 << 11;
-pub const XkbAllEventsMask: c_ulong = 0xfff;
deleted file mode 100644
--- a/third_party/rust/x11/src/xlib_xcb.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-use std::os::raw::c_void;
-use ::xlib::Display;
-
-x11_link! { Xlib_xcb, xlib_xcb, ["libX11-xcb.so.1", "libX11-xcb.so"], 1,
- pub fn XGetXCBConnection(_1: *mut Display) -> *mut xcb_connection_t,
- variadic:
- globals:
-}
-
-pub type xcb_connection_t = c_void;
deleted file mode 100644
--- a/third_party/rust/x11/src/xmd.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-pub type INT8 = i8;
-pub type INT16 = i16;
-pub type INT32 = i32;
-pub type INT64 = i64;
-
-pub type CARD8 = u8;
-pub type CARD16 = u16;
-pub type CARD32 = u32;
-pub type CARD64 = u64;
-
-pub type BYTE = CARD8;
-pub type BOOL = CARD8;
deleted file mode 100644
--- a/third_party/rust/x11/src/xmu.rs
+++ /dev/null
@@ -1,199 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::{
- c_char,
- c_int,
- c_uchar,
- c_uint,
- c_ulong,
- c_void,
-};
-use libc::FILE;
-
-use ::xlib::{
- Display,
- GC,
- Screen,
- XColor,
- XComposeStatus,
- XErrorEvent,
- XEvent,
- XKeyEvent,
- XrmValue,
- XSizeHints,
- XStandardColormap,
- XVisualInfo,
-};
-use ::xt::{
- Widget,
- XtAppContext,
-};
-
-
-//
-// functions
-//
-
-
-x11_link! { Xmu, xmu, ["libXmu.so.6", "libXmu.so"], 132,
- pub fn XmuAddCloseDisplayHook (_3: *mut Display, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char) -> c_int>, _1: *mut c_char) -> *mut c_char,
- pub fn XmuAddInitializer (_2: Option<unsafe extern "C" fn (XtAppContext, *mut c_char)>, _1: *mut c_char) -> (),
- pub fn XmuAllStandardColormaps (_1: *mut Display) -> c_int,
- pub fn XmuAppendSegment (_2: *mut XmuSegment, _1: *mut XmuSegment) -> c_int,
- pub fn XmuAreaAnd (_2: *mut XmuArea, _1: *mut XmuArea) -> *mut XmuArea,
- pub fn XmuAreaCopy (_2: *mut XmuArea, _1: *mut XmuArea) -> *mut XmuArea,
- pub fn XmuAreaDup (_1: *mut XmuArea) -> *mut XmuArea,
- pub fn XmuAreaNot (_5: *mut XmuArea, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> *mut XmuArea,
- pub fn XmuAreaOrXor (_3: *mut XmuArea, _2: *mut XmuArea, _1: c_int) -> *mut XmuArea,
- pub fn XmuCallInitializers (_1: XtAppContext) -> (),
- pub fn XmuClientWindow (_2: *mut Display, _1: c_ulong) -> c_ulong,
- pub fn XmuCompareISOLatin1 (_2: *const c_char, _1: *const c_char) -> c_int,
- pub fn XmuConvertStandardSelection (_8: Widget, _7: c_ulong, _6: *mut c_ulong, _5: *mut c_ulong, _4: *mut c_ulong, _3: *mut *mut c_char, _2: *mut c_ulong, _1: *mut c_int) -> c_char,
- pub fn XmuCopyISOLatin1Lowered (_2: *mut c_char, _1: *const c_char) -> (),
- pub fn XmuCopyISOLatin1Uppered (_2: *mut c_char, _1: *const c_char) -> (),
- pub fn XmuCreateColormap (_2: *mut Display, _1: *mut XStandardColormap) -> c_int,
- pub fn XmuCreatePixmapFromBitmap (_8: *mut Display, _7: c_ulong, _6: c_ulong, _5: c_uint, _4: c_uint, _3: c_uint, _2: c_ulong, _1: c_ulong) -> c_ulong,
- pub fn XmuCreateStippledPixmap (_4: *mut Screen, _3: c_ulong, _2: c_ulong, _1: c_uint) -> c_ulong,
- pub fn XmuCursorNameToIndex (_1: *const c_char) -> c_int,
- pub fn XmuCvtBackingStoreToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XmuCvtFunctionToCallback (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (),
- pub fn XmuCvtGravityToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XmuCvtJustifyToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XmuCvtLongToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XmuCvtOrientationToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XmuCvtShapeStyleToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XmuCvtStringToBackingStore (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (),
- pub fn XmuCvtStringToBitmap (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (),
- pub fn XmuCvtStringToColorCursor (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XmuCvtStringToCursor (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (),
- pub fn XmuCvtStringToGravity (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (),
- pub fn XmuCvtStringToJustify (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (),
- pub fn XmuCvtStringToLong (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (),
- pub fn XmuCvtStringToOrientation (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (),
- pub fn XmuCvtStringToShapeStyle (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XmuCvtStringToWidget (_4: *mut XrmValue, _3: *mut c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (),
- pub fn XmuCvtWidgetToString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XmuDeleteStandardColormap (_3: *mut Display, _2: c_int, _1: c_ulong) -> (),
- pub fn XmuDestroyScanlineList (_1: *mut XmuScanline) -> (),
- pub fn XmuDestroySegmentList (_1: *mut XmuSegment) -> (),
- pub fn XmuDistinguishableColors (_2: *mut XColor, _1: c_int) -> c_int,
- pub fn XmuDistinguishablePixels (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: c_int) -> c_int,
- pub fn XmuDQAddDisplay (_3: *mut XmuDisplayQueue, _2: *mut Display, _1: *mut c_char) -> *mut XmuDisplayQueueEntry,
- pub fn XmuDQCreate (_3: Option<unsafe extern "C" fn (*mut XmuDisplayQueue, *mut XmuDisplayQueueEntry) -> c_int>, _2: Option<unsafe extern "C" fn (*mut XmuDisplayQueue) -> c_int>, _1: *mut c_char) -> *mut XmuDisplayQueue,
- pub fn XmuDQDestroy (_2: *mut XmuDisplayQueue, _1: c_int) -> c_int,
- pub fn XmuDQLookupDisplay (_2: *mut XmuDisplayQueue, _1: *mut Display) -> *mut XmuDisplayQueueEntry,
- pub fn XmuDQRemoveDisplay (_2: *mut XmuDisplayQueue, _1: *mut Display) -> c_int,
- pub fn XmuDrawLogo (_8: *mut Display, _7: c_ulong, _6: GC, _5: GC, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> (),
- pub fn XmuDrawRoundedRectangle (_9: *mut Display, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn XmuFillRoundedRectangle (_9: *mut Display, _8: c_ulong, _7: GC, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: c_int, _1: c_int) -> (),
- pub fn XmuGetAtomName (_2: *mut Display, _1: c_ulong) -> *mut c_char,
- pub fn XmuGetColormapAllocation (_5: *mut XVisualInfo, _4: c_ulong, _3: *mut c_ulong, _2: *mut c_ulong, _1: *mut c_ulong) -> c_int,
- pub fn XmuGetHostname (_2: *mut c_char, _1: c_int) -> c_int,
- pub fn XmuInternAtom (_2: *mut Display, _1: AtomPtr) -> c_ulong,
- pub fn XmuInternStrings (_4: *mut Display, _3: *mut *mut c_char, _2: c_uint, _1: *mut c_ulong) -> (),
- pub fn XmuLocateBitmapFile (_8: *mut Screen, _7: *const c_char, _6: *mut c_char, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_ulong,
- pub fn XmuLocatePixmapFile (_11: *mut Screen, _10: *const c_char, _9: c_ulong, _8: c_ulong, _7: c_uint, _6: *mut c_char, _5: c_int, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_ulong,
- pub fn XmuLookupAPL (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int,
- pub fn XmuLookupArabic (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int,
- pub fn XmuLookupCloseDisplayHook (_4: *mut Display, _3: *mut c_char, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char) -> c_int>, _1: *mut c_char) -> c_int,
- pub fn XmuLookupCyrillic (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int,
- pub fn XmuLookupGreek (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int,
- pub fn XmuLookupHebrew (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int,
- pub fn XmuLookupJISX0201 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int,
- pub fn XmuLookupKana (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int,
- pub fn XmuLookupLatin1 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int,
- pub fn XmuLookupLatin2 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int,
- pub fn XmuLookupLatin3 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int,
- pub fn XmuLookupLatin4 (_5: *mut XKeyEvent, _4: *mut c_uchar, _3: c_int, _2: *mut c_ulong, _1: *mut XComposeStatus) -> c_int,
- pub fn XmuLookupStandardColormap (_7: *mut Display, _6: c_int, _5: c_ulong, _4: c_uint, _3: c_ulong, _2: c_int, _1: c_int) -> c_int,
- pub fn XmuLookupString (_6: *mut XKeyEvent, _5: *mut c_uchar, _4: c_int, _3: *mut c_ulong, _2: *mut XComposeStatus, _1: c_ulong) -> c_int,
- pub fn XmuMakeAtom (_1: *const c_char) -> AtomPtr,
- pub fn XmuNameOfAtom (_1: AtomPtr) -> *mut c_char,
- pub fn XmuNCopyISOLatin1Lowered (_3: *mut c_char, _2: *const c_char, _1: c_int) -> (),
- pub fn XmuNCopyISOLatin1Uppered (_3: *mut c_char, _2: *const c_char, _1: c_int) -> (),
- pub fn XmuNewArea (_4: c_int, _3: c_int, _2: c_int, _1: c_int) -> *mut XmuArea,
- pub fn XmuNewCvtStringToWidget (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XmuNewScanline (_3: c_int, _2: c_int, _1: c_int) -> *mut XmuScanline,
- pub fn XmuNewSegment (_2: c_int, _1: c_int) -> *mut XmuSegment,
- pub fn XmuOptimizeArea (_1: *mut XmuArea) -> *mut XmuArea,
- pub fn XmuOptimizeScanline (_1: *mut XmuScanline) -> *mut XmuScanline,
- pub fn XmuPrintDefaultErrorMessage (_3: *mut Display, _2: *mut XErrorEvent, _1: *mut FILE) -> c_int,
- pub fn XmuReadBitmapData (_6: *mut FILE, _5: *mut c_uint, _4: *mut c_uint, _3: *mut *mut c_uchar, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XmuReadBitmapDataFromFile (_6: *const c_char, _5: *mut c_uint, _4: *mut c_uint, _3: *mut *mut c_uchar, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XmuRegisterExternalAgent (_4: Widget, _3: *mut c_void, _2: *mut XEvent, _1: *mut c_char) -> (),
- pub fn XmuReleaseStippledPixmap (_2: *mut Screen, _1: c_ulong) -> (),
- pub fn XmuRemoveCloseDisplayHook (_4: *mut Display, _3: *mut c_char, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char) -> c_int>, _1: *mut c_char) -> c_int,
- pub fn XmuReshapeWidget (_4: Widget, _3: c_int, _2: c_int, _1: c_int) -> c_char,
- pub fn XmuScanlineAnd (_2: *mut XmuScanline, _1: *mut XmuScanline) -> *mut XmuScanline,
- pub fn XmuScanlineAndSegment (_2: *mut XmuScanline, _1: *mut XmuSegment) -> *mut XmuScanline,
- pub fn XmuScanlineCopy (_2: *mut XmuScanline, _1: *mut XmuScanline) -> *mut XmuScanline,
- pub fn XmuScanlineEqu (_2: *mut XmuScanline, _1: *mut XmuScanline) -> c_int,
- pub fn XmuScanlineNot (_3: *mut XmuScanline, _2: c_int, _1: c_int) -> *mut XmuScanline,
- pub fn XmuScanlineOr (_2: *mut XmuScanline, _1: *mut XmuScanline) -> *mut XmuScanline,
- pub fn XmuScanlineOrSegment (_2: *mut XmuScanline, _1: *mut XmuSegment) -> *mut XmuScanline,
- pub fn XmuScanlineXor (_2: *mut XmuScanline, _1: *mut XmuScanline) -> *mut XmuScanline,
- pub fn XmuScanlineXorSegment (_2: *mut XmuScanline, _1: *mut XmuSegment) -> *mut XmuScanline,
- pub fn XmuScreenOfWindow (_2: *mut Display, _1: c_ulong) -> *mut Screen,
- pub fn XmuSimpleErrorHandler (_2: *mut Display, _1: *mut XErrorEvent) -> c_int,
- pub fn XmuStandardColormap (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_uint, _5: c_ulong, _4: c_ulong, _3: c_ulong, _2: c_ulong, _1: c_ulong) -> *mut XStandardColormap,
- pub fn XmuUpdateMapHints (_3: *mut Display, _2: c_ulong, _1: *mut XSizeHints) -> c_int,
- pub fn XmuValidArea (_1: *mut XmuArea) -> c_int,
- pub fn XmuValidScanline (_1: *mut XmuScanline) -> c_int,
- pub fn XmuVisualStandardColormaps (_6: *mut Display, _5: c_int, _4: c_ulong, _3: c_uint, _2: c_int, _1: c_int) -> c_int,
- pub fn XmuWnCountOwnedResources (_3: *mut XmuWidgetNode, _2: *mut XmuWidgetNode, _1: c_int) -> c_int,
- pub fn XmuWnFetchResources (_3: *mut XmuWidgetNode, _2: Widget, _1: *mut XmuWidgetNode) -> (),
- pub fn XmuWnInitializeNodes (_2: *mut XmuWidgetNode, _1: c_int) -> (),
- pub fn XmuWnNameToNode (_3: *mut XmuWidgetNode, _2: c_int, _1: *const c_char) -> *mut XmuWidgetNode,
-variadic:
- pub fn XmuSnprintf (_3: *mut c_char, _2: c_int, _1: *const c_char) -> c_int,
-globals:
- pub static _XA_ATOM_PAIR: AtomPtr,
- pub static _XA_CHARACTER_POSITION: AtomPtr,
- pub static _XA_CLASS: AtomPtr,
- pub static _XA_CLIENT_WINDOW: AtomPtr,
- pub static _XA_CLIPBOARD: AtomPtr,
- pub static _XA_COMPOUND_TEXT: AtomPtr,
- pub static _XA_DECNET_ADDRESS: AtomPtr,
- pub static _XA_DELETE: AtomPtr,
- pub static _XA_FILENAME: AtomPtr,
- pub static _XA_HOSTNAME: AtomPtr,
- pub static _XA_IP_ADDRESS: AtomPtr,
- pub static _XA_LENGTH: AtomPtr,
- pub static _XA_LIST_LENGTH: AtomPtr,
- pub static _XA_NAME: AtomPtr,
- pub static _XA_NET_ADDRESS: AtomPtr,
- pub static _XA_NULL: AtomPtr,
- pub static _XA_OWNER_OS: AtomPtr,
- pub static _XA_SPAN: AtomPtr,
- pub static _XA_TARGETS: AtomPtr,
- pub static _XA_TEXT: AtomPtr,
- pub static _XA_TIMESTAMP: AtomPtr,
- pub static _XA_USER: AtomPtr,
- pub static _XA_UTF8_STRING: AtomPtr,
-}
-
-
-//
-// types
-//
-
-
-// TODO structs
-#[repr(C)] pub struct _AtomRec;
-#[repr(C)] pub struct _XmuArea;
-#[repr(C)] pub struct _XmuDisplayQueue;
-#[repr(C)] pub struct _XmuDisplayQueueEntry;
-#[repr(C)] pub struct _XmuScanline;
-#[repr(C)] pub struct _XmuSegment;
-#[repr(C)] pub struct _XmuWidgetNode;
-
-// struct typedefs
-pub type AtomPtr = *mut _AtomRec;
-pub type XmuArea = _XmuArea;
-pub type XmuDisplayQueue = _XmuDisplayQueue;
-pub type XmuDisplayQueueEntry = _XmuDisplayQueueEntry;
-pub type XmuScanline = _XmuScanline;
-pub type XmuSegment = _XmuSegment;
-pub type XmuWidgetNode = _XmuWidgetNode;
deleted file mode 100644
--- a/third_party/rust/x11/src/xrandr.rs
+++ /dev/null
@@ -1,555 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::{ c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort };
-use std::mem;
-
-use ::internal::transmute_union;
-use xlib::{ Atom, Bool, Display, Drawable, Status, Time, XEvent, XID, Window };
-use xrender::{ XFixed, XTransform };
-
-
-//
-// functions
-//
-
-
-x11_link! { Xrandr, xrandr, ["libXrandr.so.2", "libXrandr.so"], 70,
- pub fn XRRAddOutputMode (dpy: *mut Display, output: RROutput, mode: RRMode) -> (),
- pub fn XRRAllocGamma (size: c_int) -> *mut XRRCrtcGamma,
- pub fn XRRAllocModeInfo (name: *const c_char, nameLength: c_int) -> *mut XRRModeInfo,
- pub fn XRRAllocateMonitor (dpy: *mut Display, noutput: c_int) -> *mut XRRMonitorInfo,
- pub fn XRRChangeOutputProperty (dpy: *mut Display, output: RROutput, property: Atom, type_: Atom, format: c_int, mode: c_int, data: *const c_uchar, nelements: c_int) -> (),
- pub fn XRRChangeProviderProperty (dpy: *mut Display, provider: RRProvider, property: Atom, type_: Atom, format: c_int, mode: c_int, data: *const c_uchar, nelements: c_int) -> (),
- pub fn XRRConfigCurrentConfiguration (config: *mut XRRScreenConfiguration, rotation: *mut Rotation) -> SizeID,
- pub fn XRRConfigCurrentRate (config: *mut XRRScreenConfiguration) -> c_short,
- pub fn XRRConfigRates (config: *mut XRRScreenConfiguration, sizeID: c_int, nrates: *mut c_int) -> *mut c_short,
- pub fn XRRConfigRotations (config: *mut XRRScreenConfiguration, current_rotation: *mut Rotation) -> Rotation,
- pub fn XRRConfigSizes (config: *mut XRRScreenConfiguration, nsizes: *mut c_int) -> *mut XRRScreenSize,
- pub fn XRRConfigTimes (config: *mut XRRScreenConfiguration, config_timestamp: *mut Time) -> Time,
- pub fn XRRConfigureOutputProperty (dpy: *mut Display, output: RROutput, property: Atom, pending: Bool, range: Bool, num_values: c_int, values: *mut c_long) -> (),
- pub fn XRRConfigureProviderProperty (dpy: *mut Display, provider: RRProvider, property: Atom, pending: Bool, range: Bool, num_values: c_int, values: *mut c_long) -> (),
- pub fn XRRCreateMode (dpy: *mut Display, window: Window, modeInfo: *mut XRRModeInfo) -> RRMode,
- pub fn XRRDeleteMonitor (dpy: *mut Display, window: Window, name: Atom) -> (),
- pub fn XRRDeleteOutputMode (dpy: *mut Display, output: RROutput, mode: RRMode) -> (),
- pub fn XRRDeleteOutputProperty (dpy: *mut Display, output: RROutput, property: Atom) -> (),
- pub fn XRRDeleteProviderProperty (dpy: *mut Display, provider: RRProvider, property: Atom) -> (),
- pub fn XRRDestroyMode (dpy: *mut Display, mode: RRMode) -> (),
- pub fn XRRFreeCrtcInfo (crtcInfo: *mut XRRCrtcInfo) -> (),
- pub fn XRRFreeGamma (gamma: *mut XRRCrtcGamma) -> (),
- pub fn XRRFreeModeInfo (modeInfo: *mut XRRModeInfo) -> (),
- pub fn XRRFreeMonitors (monitors: *mut XRRMonitorInfo) -> (),
- pub fn XRRFreeOutputInfo (outputInfo: *mut XRROutputInfo) -> (),
- pub fn XRRFreePanning (panning: *mut XRRPanning) -> (),
- pub fn XRRFreeProviderInfo (provider: *mut XRRProviderInfo) -> (),
- pub fn XRRFreeProviderResources (resources: *mut XRRProviderResources) -> (),
- pub fn XRRFreeScreenConfigInfo (config: *mut XRRScreenConfiguration) -> (),
- pub fn XRRFreeScreenResources (resources: *mut XRRScreenResources) -> (),
- pub fn XRRGetCrtcGamma (dpy: *mut Display, crtc: RRCrtc) -> *mut XRRCrtcGamma,
- pub fn XRRGetCrtcGammaSize (dpy: *mut Display, crtc: RRCrtc) -> c_int,
- pub fn XRRGetCrtcInfo (dpy: *mut Display, resources: *mut XRRScreenResources, crtc: RRCrtc) -> *mut XRRCrtcInfo,
- pub fn XRRGetCrtcTransform (dpy: *mut Display, crtc: RRCrtc, attributes: *mut *mut XRRCrtcTransformAttributes) -> Status,
- pub fn XRRGetMonitors (dpy: *mut Display, window: Window, get_active: Bool, nmonitors: *mut c_int) -> *mut XRRMonitorInfo,
- pub fn XRRGetOutputInfo (dpy: *mut Display, resources: *mut XRRScreenResources, output: RROutput) -> *mut XRROutputInfo,
- pub fn XRRGetOutputPrimary (dpy: *mut Display, window: Window) -> RROutput,
- pub fn XRRGetOutputProperty (dpy: *mut Display, output: RROutput, property: Atom, offset: c_long, length: c_long, _delete: Bool, pending: Bool, req_type: Atom, actual_type: *mut Atom, actual_format: *mut c_int, nitems: *mut c_ulong, bytes_after: *mut c_ulong, prop: *mut *mut c_uchar) -> c_int,
- pub fn XRRGetPanning (dpy: *mut Display, resources: *mut XRRScreenResources, crtc: RRCrtc) -> *mut XRRPanning,
- pub fn XRRGetProviderInfo (dpy: *mut Display, resources: *mut XRRScreenResources, provider: RRProvider) -> *mut XRRProviderInfo,
- pub fn XRRGetProviderProperty (dpy: *mut Display, provider: RRProvider, property: Atom, offset: c_long, length: c_long, _delete: Bool, pending: Bool, req_type: Atom, actual_type: *mut Atom, actual_format: *mut c_int, nitems: *mut c_ulong, bytes_after: *mut c_ulong, prop: *mut *mut c_uchar) -> c_int,
- pub fn XRRGetProviderResources (dpy: *mut Display, window: Window) -> *mut XRRProviderResources,
- pub fn XRRGetScreenInfo (dpy: *mut Display, window: Window) -> *mut XRRScreenConfiguration,
- pub fn XRRGetScreenResources (dpy: *mut Display, window: Window) -> *mut XRRScreenResources,
- pub fn XRRGetScreenResourcesCurrent (dpy: *mut Display, window: Window) -> *mut XRRScreenResources,
- pub fn XRRGetScreenSizeRange (dpy: *mut Display, window: Window, minWidth: *mut c_int, minHeight: *mut c_int, maxWidth: *mut c_int, maxHeight: *mut c_int) -> Status,
- pub fn XRRListOutputProperties (dpy: *mut Display, output: RROutput, nprop: *mut c_int) -> *mut Atom,
- pub fn XRRListProviderProperties (dpy: *mut Display, provider: RRProvider, nprop: *mut c_int) -> *mut Atom,
- pub fn XRRQueryExtension (dpy: *mut Display, event_base_return: *mut c_int, error_base_return: *mut c_int) -> Bool,
- pub fn XRRQueryOutputProperty (dpy: *mut Display, output: RROutput, property: Atom) -> *mut XRRPropertyInfo,
- pub fn XRRQueryProviderProperty (dpy: *mut Display, provider: RRProvider, property: Atom) -> *mut XRRPropertyInfo,
- pub fn XRRQueryVersion (dpy: *mut Display, major_version_return: *mut c_int, minor_version_return: *mut c_int) -> Status,
- pub fn XRRRates (dpy: *mut Display, screen: c_int, sizeID: c_int, nrates: *mut c_int) -> *mut c_short,
- pub fn XRRRootToScreen (dpy: *mut Display, root: Window) -> c_int,
- pub fn XRRRotations (dpy: *mut Display, screen: c_int, current_rotation: *mut Rotation) -> Rotation,
- pub fn XRRSelectInput (dpy: *mut Display, window: Window, mask: c_int) -> (),
- pub fn XRRSetCrtcConfig (dpy: *mut Display, resources: *mut XRRScreenResources, crtc: RRCrtc, timestamp: Time, x: c_int, y: c_int, mode: RRMode, rotation: Rotation, outputs: *mut RROutput, noutputs: c_int) -> Status,
- pub fn XRRSetCrtcGamma (dpy: *mut Display, crtc: RRCrtc, gamma: *mut XRRCrtcGamma) -> (),
- pub fn XRRSetCrtcTransform (dpy: *mut Display, crtc: RRCrtc, transform: *mut XTransform, filter: *const c_char, params: *mut XFixed, nparams: c_int) -> (),
- pub fn XRRSetMonitor (dpy: *mut Display, window: Window, monitor: *mut XRRMonitorInfo) -> (),
- pub fn XRRSetOutputPrimary (dpy: *mut Display, window: Window, output: RROutput) -> (),
- pub fn XRRSetPanning (dpy: *mut Display, resources: *mut XRRScreenResources, crtc: RRCrtc, panning: *mut XRRPanning) -> Status,
- pub fn XRRSetProviderOffloadSink (dpy: *mut Display, provider: XID, sink_provider: XID) -> c_int,
- pub fn XRRSetProviderOutputSource (dpy: *mut Display, provider: XID, source_provider: XID) -> c_int,
- pub fn XRRSetScreenConfig (dpy: *mut Display, config: *mut XRRScreenConfiguration, draw: Drawable, size_index: c_int, rotation: Rotation, timestamp: Time) -> Status,
- pub fn XRRSetScreenConfigAndRate (dpy: *mut Display, config: *mut XRRScreenConfiguration, draw: Drawable, size_index: c_int, rotation: Rotation, rate: c_short, timestamp: Time) -> Status,
- pub fn XRRSetScreenSize (dpy: *mut Display, window: Window, width: c_int, height: c_int, mmWidth: c_int, mmHeight: c_int) -> (),
- pub fn XRRSizes (dpy: *mut Display, screen: c_int, nsizes: *mut c_int) -> *mut XRRScreenSize,
- pub fn XRRTimes (dpy: *mut Display, screen: c_int, config_timestamp: *mut Time) -> Time,
- pub fn XRRUpdateConfiguration (event: *mut XEvent) -> c_int,
-variadic:
-globals:
-}
-
-
-//
-// types
-//
-
-
-pub type Connection = c_ushort;
-pub type Rotation = c_ushort;
-pub type SizeID = c_ushort;
-pub type SubpixelOrder = c_ushort;
-
-pub type RROutput = XID;
-pub type RRCrtc = XID;
-pub type RRMode = XID;
-pub type RRProvider = XID;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRScreenSize {
- pub width: c_int,
- pub height: c_int,
- pub mwidth: c_int,
- pub mheight: c_int,
-}
-
-#[repr(C)] pub struct XRRScreenConfiguration;
-
-pub type XRRModeFlags = c_ulong;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRModeInfo {
- pub id: RRMode,
- pub width: c_uint,
- pub height: c_uint,
- pub dotClock: c_ulong,
- pub hSyncStart: c_uint,
- pub hSyncEnd: c_uint,
- pub hTotal: c_uint,
- pub hSkew: c_uint,
- pub vSyncStart: c_uint,
- pub vSyncEnd: c_uint,
- pub vTotal: c_uint,
- pub name: *mut c_char,
- pub nameLength: c_uint,
- pub modeFlags: XRRModeFlags,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRScreenResources {
- pub timestamp: Time,
- pub configTimestamp: Time,
- pub ncrtc: c_int,
- pub crtcs: *mut RRCrtc,
- pub noutput: c_int,
- pub outputs: *mut RROutput,
- pub nmode: c_int,
- pub modes: *mut XRRModeInfo,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRROutputInfo {
- pub timestamp: Time,
- pub crtc: RRCrtc,
- pub name: *mut c_char,
- pub nameLen: c_int,
- pub mm_width: c_ulong,
- pub mm_height: c_ulong,
- pub connection: Connection,
- pub subpixel_order: SubpixelOrder,
- pub ncrtc: c_int,
- pub crtcs: *mut RRCrtc,
- pub nclone: c_int,
- pub clones: *mut RROutput,
- pub nmode: c_int,
- pub npreferred: c_int,
- pub modes: *mut RRMode,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRPropertyInfo {
- pub pending: Bool,
- pub range: Bool,
- pub immutable: Bool,
- pub num_values: c_int,
- pub values: *mut c_long,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRCrtcInfo {
- pub timestamp: Time,
- pub x: c_int,
- pub y: c_int,
- pub width: c_uint,
- pub height: c_uint,
- pub mode: RRMode,
- pub rotation: Rotation,
- pub noutput: c_int,
- pub outputs: *mut RROutput,
- pub rotations: Rotation,
- pub npossible: c_int,
- pub possible: *mut RROutput,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRCrtcGamma {
- pub size: c_int,
- pub red: *mut c_ushort,
- pub green: *mut c_ushort,
- pub blue: *mut c_ushort,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRCrtcTransformAttributes {
- pub pendingTransform: XTransform,
- pub pendingFilter: *mut c_char,
- pub pendingNparams: c_int,
- pub pendingParams: *mut XFixed,
- pub currentTransform: XTransform,
- pub currentFilter: *mut c_char,
- pub currentNparams: c_int,
- pub currentParams: *mut XFixed,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRPanning {
- pub timestamp: Time,
- pub left: c_uint,
- pub top: c_uint,
- pub width: c_uint,
- pub height: c_uint,
- pub track_left: c_uint,
- pub track_top: c_uint,
- pub track_width: c_uint,
- pub track_height: c_uint,
- pub border_left: c_int,
- pub border_top: c_int,
- pub border_right: c_int,
- pub border_bottom: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRProviderResources {
- pub timestamp: Time,
- pub nproviders: c_int,
- pub providers: *mut RRProvider,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRProviderInfo {
- pub capabilities: c_uint,
- pub ncrtcs: c_int,
- pub crtcs: *mut RRCrtc,
- pub noutputs: c_int,
- pub outputs: *mut RROutput,
- pub name: *mut c_char,
- pub nassociatedproviders: c_int,
- pub associated_providers: *mut RRProvider,
- pub associated_capability: *mut c_uint,
- pub nameLen: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRMonitorInfo {
- pub name: Atom,
- pub primary: Bool,
- pub automatic: Bool,
- pub noutput: c_int,
- pub x: c_int,
- pub y: c_int,
- pub width: c_int,
- pub height: c_int,
- pub mwidth: c_int,
- pub mheight: c_int,
- pub outputs: *mut RROutput,
-}
-
-
-//
-// event structures
-//
-
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRScreenChangeNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub root: Window,
- pub timestamp: Time,
- pub config_timestamp: Time,
- pub size_index: SizeID,
- pub subpixel_order: SubpixelOrder,
- pub rotation: Rotation,
- pub width: c_int,
- pub height: c_int,
- pub mwidth: c_int,
- pub mheight: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub subtype: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRROutputChangeNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub subtype: c_int,
- pub output: RROutput,
- pub crtc: RRCrtc,
- pub mode: RRMode,
- pub rotation: Rotation,
- pub connection: Connection,
- pub subpixel_order: SubpixelOrder,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRCrtcChangeNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub subtype: c_int,
- pub crtc: RRCrtc,
- pub mode: RRMode,
- pub rotation: Rotation,
- pub x: c_int,
- pub y: c_int,
- pub width: c_uint,
- pub height: c_uint,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRROutputPropertyNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub subtype: c_int,
- pub output: RROutput,
- pub property: Atom,
- pub timestamp: Time,
- pub state: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRProviderChangeNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub subtype: c_int,
- pub provider: RRProvider,
- pub timestamp: Time,
- pub current_role: c_uint,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRProviderPropertyNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub subtype: c_int,
- pub provider: RRProvider,
- pub property: Atom,
- pub timestamp: Time,
- pub state: c_int,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRRResourceChangeNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub subtype: c_int,
- pub timestamp: Time,
-}
-
-event_conversions_and_tests! {
- XRRScreenChangeNotifyEvent, XRRNotifyEvent, XRROutputChangeNotifyEvent,
- XRRCrtcChangeNotifyEvent, XRROutputPropertyNotifyEvent, XRRProviderChangeNotifyEvent,
- XRRProviderPropertyNotifyEvent, XRRResourceChangeNotifyEvent,
-}
-
-
-//
-// constants
-//
-
-
-pub const RANDR_NAME: &'static str = "RANDR";
-pub const RANDR_MAJOR: c_int = 1;
-pub const RANDR_MINOR: c_int = 5;
-
-pub const RRNumberErrors: c_int = 4;
-pub const RRNumberEvents: c_int = 2;
-pub const RRNumberRequests: c_int = 45;
-
-pub const X_RRQueryVersion: c_int = 0;
-pub const X_RROldGetScreenInfo: c_int = 1;
-pub const X_RRSetScreenConfig: c_int = 2;
-pub const X_RROldScreenChangeSelectInput: c_int = 3;
-pub const X_RRSelectInput: c_int = 4;
-pub const X_RRGetScreenInfo: c_int = 5;
-
-pub const X_RRGetScreenSizeRange: c_int = 6;
-pub const X_RRSetScreenSize: c_int = 7;
-pub const X_RRGetScreenResources: c_int = 8;
-pub const X_RRGetOutputInfo: c_int = 9;
-pub const X_RRListOutputProperties: c_int = 10;
-pub const X_RRQueryOutputProperty: c_int = 11;
-pub const X_RRConfigureOutputProperty: c_int = 12;
-pub const X_RRChangeOutputProperty: c_int = 13;
-pub const X_RRDeleteOutputProperty: c_int = 14;
-pub const X_RRGetOutputProperty: c_int = 15;
-pub const X_RRCreateMode: c_int = 16;
-pub const X_RRDestroyMode: c_int = 17;
-pub const X_RRAddOutputMode: c_int = 18;
-pub const X_RRDeleteOutputMode: c_int = 19;
-pub const X_RRGetCrtcInfo: c_int = 20;
-pub const X_RRSetCrtcConfig: c_int = 21;
-pub const X_RRGetCrtcGammaSize: c_int = 22;
-pub const X_RRGetCrtcGamma: c_int = 23;
-pub const X_RRSetCrtcGamma: c_int = 24;
-
-pub const X_RRGetScreenResourcesCurrent: c_int = 25;
-pub const X_RRSetCrtcTransform: c_int = 26;
-pub const X_RRGetCrtcTransform: c_int = 27;
-pub const X_RRGetPanning: c_int = 28;
-pub const X_RRSetPanning: c_int = 29;
-pub const X_RRSetOutputPrimary: c_int = 30;
-pub const X_RRGetOutputPrimary: c_int = 31;
-
-pub const X_RRGetProviders: c_int = 32;
-pub const X_RRGetProviderInfo: c_int = 33;
-pub const X_RRSetProviderOffloadSink: c_int = 34;
-pub const X_RRSetProviderOutputSource: c_int = 35;
-pub const X_RRListProviderProperties: c_int = 36;
-pub const X_RRQueryProviderProperty: c_int = 37;
-pub const X_RRConfigureProviderProperty: c_int = 38;
-pub const X_RRChangeProviderProperty: c_int = 39;
-pub const X_RRDeleteProviderProperty: c_int = 40;
-pub const X_RRGetProviderProperty: c_int = 41;
-
-pub const X_RRGetMonitors: c_int = 42;
-pub const X_RRSetMonitor: c_int = 43;
-pub const X_RRDeleteMonitor: c_int = 44;
-
-pub const RRTransformUnit: c_int = 1 << 0;
-pub const RRTransformScaleUp: c_int = 1 << 1;
-pub const RRTransformScaleDown: c_int = 1 << 2;
-pub const RRTransformProjective: c_int = 1 << 3;
-
-pub const RRScreenChangeNotifyMask: c_int = 1 << 0;
-pub const RRCrtcChangeNotifyMask: c_int = 1 << 1;
-pub const RROutputChangeNotifyMask: c_int = 1 << 2;
-pub const RROutputPropertyNotifyMask: c_int = 1 << 3;
-pub const RRProviderChangeNotifyMask: c_int = 1 << 4;
-pub const RRProviderPropertyNotifyMask: c_int = 1 << 5;
-pub const RRResourceChangeNotifyMask: c_int = 1 << 6;
-
-pub const RRScreenChangeNotify: c_int = 0;
-pub const RRNotify: c_int = 1;
-pub const RRNotify_CrtcChange: c_int = 0;
-pub const RRNotify_OutputChange: c_int = 1;
-pub const RRNotify_OutputProperty: c_int = 2;
-pub const RRNotify_ProviderChange: c_int = 3;
-pub const RRNotify_ProviderProperty: c_int = 4;
-pub const RRNotify_ResourceChange: c_int = 5;
-
-pub const RR_Rotate_0: c_int = 1;
-pub const RR_Rotate_90: c_int = 2;
-pub const RR_Rotate_180: c_int = 4;
-pub const RR_Rotate_270: c_int = 8;
-
-pub const RR_Reflect_X: c_int = 16;
-pub const RR_Reflect_Y: c_int = 32;
-
-pub const RRSetConfigSuccess: c_int = 0;
-pub const RRSetConfigInvalidConfigTime: c_int = 1;
-pub const RRSetConfigInvalidTime: c_int = 2;
-pub const RRSetConfigFailed: c_int = 3;
-
-pub const RR_HSyncPositive: c_int = 0x00000001;
-pub const RR_HSyncNegative: c_int = 0x00000002;
-pub const RR_VSyncPositive: c_int = 0x00000004;
-pub const RR_VSyncNegative: c_int = 0x00000008;
-pub const RR_Interlace: c_int = 0x00000010;
-pub const RR_DoubleScan: c_int = 0x00000020;
-pub const RR_CSync: c_int = 0x00000040;
-pub const RR_CSyncPositive: c_int = 0x00000080;
-pub const RR_CSyncNegative: c_int = 0x00000100;
-pub const RR_HSkewPresent: c_int = 0x00000200;
-pub const RR_BCast: c_int = 0x00000400;
-pub const RR_PixelMultiplex: c_int = 0x00000800;
-pub const RR_DoubleClock: c_int = 0x00001000;
-pub const RR_ClockDivideBy2: c_int = 0x00002000;
-
-pub const RR_Connected: c_int = 0;
-pub const RR_Disconnected: c_int = 1;
-pub const RR_UnknownConnection: c_int = 2;
-
-pub const BadRROutput: c_int = 0;
-pub const BadRRCrtc: c_int = 1;
-pub const BadRRMode: c_int = 2;
-pub const BadRRProvider: c_int = 3;
-
-pub const RR_PROPERTY_BACKLIGHT: &'static str = "Backlight";
-pub const RR_PROPERTY_RANDR_EDID: &'static str = "EDID";
-pub const RR_PROPERTY_SIGNAL_FORMAT: &'static str = "SignalFormat";
-pub const RR_PROPERTY_SIGNAL_PROPERTIES: &'static str = "SignalProperties";
-pub const RR_PROPERTY_CONNECTOR_TYPE: &'static str = "ConnectorType";
-pub const RR_PROPERTY_CONNECTOR_NUMBER: &'static str = "ConnectorNumber";
-pub const RR_PROPERTY_COMPATIBILITY_LIST: &'static str = "CompatibilityList";
-pub const RR_PROPERTY_CLONE_LIST: &'static str = "CloneList";
-pub const RR_PROPERTY_BORDER: &'static str = "Border";
-pub const RR_PROPERTY_BORDER_DIMENSIONS: &'static str = "BorderDimensions";
-pub const RR_PROPERTY_GUID: &'static str = "GUID";
-pub const RR_PROPERTY_RANDR_TILE: &'static str = "TILE";
-
-pub const RR_Capability_None: c_int = 0;
-pub const RR_Capability_SourceOutput: c_int = 1;
-pub const RR_Capability_SinkOutput: c_int = 2;
-pub const RR_Capability_SourceOffload: c_int = 4;
-pub const RR_Capability_SinkOffload: c_int = 8;
-
deleted file mode 100644
--- a/third_party/rust/x11/src/xrecord.rs
+++ /dev/null
@@ -1,137 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::{
- c_char,
- c_int,
- c_uchar,
- c_ulong,
- c_ushort,
-};
-
-use ::xlib::{
- Bool,
- Display,
- Time,
- XID,
-};
-
-
-//
-// functions
-//
-
-
-x11_link! { Xf86vmode, xtst, ["libXtst.so.6", "libXtst.so"], 14,
- pub fn XRecordAllocRange () -> *mut XRecordRange,
- pub fn XRecordCreateContext (_6: *mut Display, _5: c_int, _4: *mut c_ulong, _3: c_int, _2: *mut *mut XRecordRange, _1: c_int) -> c_ulong,
- pub fn XRecordDisableContext (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XRecordEnableContext (_4: *mut Display, _3: c_ulong, _2: Option<unsafe extern "C" fn (*mut c_char, *mut XRecordInterceptData)>, _1: *mut c_char) -> c_int,
- pub fn XRecordEnableContextAsync (_4: *mut Display, _3: c_ulong, _2: Option<unsafe extern "C" fn (*mut c_char, *mut XRecordInterceptData)>, _1: *mut c_char) -> c_int,
- pub fn XRecordFreeContext (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XRecordFreeData (_1: *mut XRecordInterceptData) -> (),
- pub fn XRecordFreeState (_1: *mut XRecordState) -> (),
- pub fn XRecordGetContext (_3: *mut Display, _2: c_ulong, _1: *mut *mut XRecordState) -> c_int,
- pub fn XRecordIdBaseMask (_1: *mut Display) -> c_ulong,
- pub fn XRecordProcessReplies (_1: *mut Display) -> (),
- pub fn XRecordQueryVersion (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XRecordRegisterClients (_7: *mut Display, _6: c_ulong, _5: c_int, _4: *mut c_ulong, _3: c_int, _2: *mut *mut XRecordRange, _1: c_int) -> c_int,
- pub fn XRecordUnregisterClients (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: c_int) -> c_int,
-variadic:
-globals:
-}
-
-
-//
-// constants
-//
-
-
-pub const XRecordFromServerTime: c_int = 0x01;
-pub const XRecordFromClientTime: c_int = 0x02;
-pub const XRecordFromClientSequence: c_int = 0x04;
-
-pub const XRecordCurrentClients: c_ulong = 1;
-pub const XRecordFutureClients: c_ulong = 2;
-pub const XRecordAllClients: c_ulong = 3;
-
-pub const XRecordFromServer: c_int = 0;
-pub const XRecordFromClient: c_int = 1;
-pub const XRecordClientStarted: c_int = 2;
-pub const XRecordClientDied: c_int = 3;
-pub const XRecordStartOfData: c_int = 4;
-pub const XRecordEndOfData: c_int = 5;
-
-
-//
-// types
-//
-
-
-pub type XRecordClientSpec = c_ulong;
-pub type XRecordContext = c_ulong;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRecordClientInfo {
- pub client: XRecordClientSpec,
- pub nranges: c_ulong,
- pub ranges: *mut *mut XRecordRange,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRecordExtRange {
- pub ext_major: XRecordRange8,
- pub ext_minor: XRecordRange16,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRecordInterceptData {
- pub id_base: XID,
- pub server_time: Time,
- pub client_seq: c_ulong,
- pub category: c_int,
- pub client_swapped: Bool,
- pub data: *mut c_uchar,
- pub data_len: c_ulong,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRecordRange {
- pub core_requests: XRecordRange8,
- pub core_replies: XRecordRange8,
- pub ext_requests: XRecordExtRange,
- pub ext_replies: XRecordExtRange,
- pub delivered_events: XRecordRange8,
- pub device_events: XRecordRange8,
- pub errors: XRecordRange8,
- pub client_started: Bool,
- pub client_died: Bool,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRecordRange8 {
- pub first: c_uchar,
- pub last: c_uchar,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRecordRange16 {
- pub first: c_ushort,
- pub last: c_ushort,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRecordState {
- pub enabled: Bool,
- pub datum_flags: c_int,
- pub nclients: c_ulong,
- pub client_info: *mut *mut XRecordClientInfo,
-}
deleted file mode 100644
--- a/third_party/rust/x11/src/xrender.rs
+++ /dev/null
@@ -1,463 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::{
- c_char,
- c_double,
- c_int,
- c_short,
- c_uint,
- c_ulong,
- c_ushort,
-};
-
-use ::xlib::{
- Atom,
- Bool,
- Colormap,
- Cursor,
- Display,
- Pixmap,
- Region,
- Visual,
- XID,
- XRectangle,
-};
-
-
-//
-// functions
-//
-
-
-x11_link! { Xrender, xrender, ["libXrender.so.1", "libXrender.so"], 44,
- pub fn XRenderAddGlyphs (_7: *mut Display, _6: c_ulong, _5: *const c_ulong, _4: *const XGlyphInfo, _3: c_int, _2: *const c_char, _1: c_int) -> (),
- pub fn XRenderAddTraps (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: *const XTrap, _1: c_int) -> (),
- pub fn XRenderChangePicture (_4: *mut Display, _3: c_ulong, _2: c_ulong, _1: *const XRenderPictureAttributes) -> (),
- pub fn XRenderComposite (_13: *mut Display, _12: c_int, _11: c_ulong, _10: c_ulong, _9: c_ulong, _8: c_int, _7: c_int, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> (),
- pub fn XRenderCompositeDoublePoly (_12: *mut Display, _11: c_int, _10: c_ulong, _9: c_ulong, _8: *const XRenderPictFormat, _7: c_int, _6: c_int, _5: c_int, _4: c_int, _3: *const XPointDouble, _2: c_int, _1: c_int) -> (),
- pub fn XRenderCompositeString16 (_12: *mut Display, _11: c_int, _10: c_ulong, _9: c_ulong, _8: *const XRenderPictFormat, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const c_ushort, _1: c_int) -> (),
- pub fn XRenderCompositeString32 (_12: *mut Display, _11: c_int, _10: c_ulong, _9: c_ulong, _8: *const XRenderPictFormat, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const c_uint, _1: c_int) -> (),
- pub fn XRenderCompositeString8 (_12: *mut Display, _11: c_int, _10: c_ulong, _9: c_ulong, _8: *const XRenderPictFormat, _7: c_ulong, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const c_char, _1: c_int) -> (),
- pub fn XRenderCompositeText16 (_11: *mut Display, _10: c_int, _9: c_ulong, _8: c_ulong, _7: *const XRenderPictFormat, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const XGlyphElt16, _1: c_int) -> (),
- pub fn XRenderCompositeText32 (_11: *mut Display, _10: c_int, _9: c_ulong, _8: c_ulong, _7: *const XRenderPictFormat, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const XGlyphElt32, _1: c_int) -> (),
- pub fn XRenderCompositeText8 (_11: *mut Display, _10: c_int, _9: c_ulong, _8: c_ulong, _7: *const XRenderPictFormat, _6: c_int, _5: c_int, _4: c_int, _3: c_int, _2: *const XGlyphElt8, _1: c_int) -> (),
- pub fn XRenderCompositeTrapezoids (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_ulong, _5: *const XRenderPictFormat, _4: c_int, _3: c_int, _2: *const XTrapezoid, _1: c_int) -> (),
- pub fn XRenderCompositeTriangles (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_ulong, _5: *const XRenderPictFormat, _4: c_int, _3: c_int, _2: *const XTriangle, _1: c_int) -> (),
- pub fn XRenderCompositeTriFan (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_ulong, _5: *const XRenderPictFormat, _4: c_int, _3: c_int, _2: *const XPointFixed, _1: c_int) -> (),
- pub fn XRenderCompositeTriStrip (_9: *mut Display, _8: c_int, _7: c_ulong, _6: c_ulong, _5: *const XRenderPictFormat, _4: c_int, _3: c_int, _2: *const XPointFixed, _1: c_int) -> (),
- pub fn XRenderCreateAnimCursor (_3: *mut Display, _2: c_int, _1: *mut XAnimCursor) -> c_ulong,
- pub fn XRenderCreateConicalGradient (_5: *mut Display, _4: *const XConicalGradient, _3: *const c_int, _2: *const XRenderColor, _1: c_int) -> c_ulong,
- pub fn XRenderCreateCursor (_4: *mut Display, _3: c_ulong, _2: c_uint, _1: c_uint) -> c_ulong,
- pub fn XRenderCreateGlyphSet (_2: *mut Display, _1: *const XRenderPictFormat) -> c_ulong,
- pub fn XRenderCreateLinearGradient (_5: *mut Display, _4: *const XLinearGradient, _3: *const c_int, _2: *const XRenderColor, _1: c_int) -> c_ulong,
- pub fn XRenderCreatePicture (_5: *mut Display, _4: c_ulong, _3: *const XRenderPictFormat, _2: c_ulong, _1: *const XRenderPictureAttributes) -> c_ulong,
- pub fn XRenderCreateRadialGradient (_5: *mut Display, _4: *const XRadialGradient, _3: *const c_int, _2: *const XRenderColor, _1: c_int) -> c_ulong,
- pub fn XRenderCreateSolidFill (_2: *mut Display, _1: *const XRenderColor) -> c_ulong,
- pub fn XRenderFillRectangle (_8: *mut Display, _7: c_int, _6: c_ulong, _5: *const XRenderColor, _4: c_int, _3: c_int, _2: c_uint, _1: c_uint) -> (),
- pub fn XRenderFillRectangles (_6: *mut Display, _5: c_int, _4: c_ulong, _3: *const XRenderColor, _2: *const XRectangle, _1: c_int) -> (),
- pub fn XRenderFindFormat (_4: *mut Display, _3: c_ulong, _2: *const XRenderPictFormat, _1: c_int) -> *mut XRenderPictFormat,
- pub fn XRenderFindStandardFormat (_2: *mut Display, _1: c_int) -> *mut XRenderPictFormat,
- pub fn XRenderFindVisualFormat (_2: *mut Display, _1: *const Visual) -> *mut XRenderPictFormat,
- pub fn XRenderFreeGlyphs (_4: *mut Display, _3: c_ulong, _2: *const c_ulong, _1: c_int) -> (),
- pub fn XRenderFreeGlyphSet (_2: *mut Display, _1: c_ulong) -> (),
- pub fn XRenderFreePicture (_2: *mut Display, _1: c_ulong) -> (),
- pub fn XRenderParseColor (_3: *mut Display, _2: *mut c_char, _1: *mut XRenderColor) -> c_int,
- pub fn XRenderQueryExtension (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XRenderQueryFilters (_2: *mut Display, _1: c_ulong) -> *mut XFilters,
- pub fn XRenderQueryFormats (_1: *mut Display) -> c_int,
- pub fn XRenderQueryPictIndexValues (_3: *mut Display, _2: *const XRenderPictFormat, _1: *mut c_int) -> *mut XIndexValue,
- pub fn XRenderQuerySubpixelOrder (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XRenderQueryVersion (_3: *mut Display, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XRenderReferenceGlyphSet (_2: *mut Display, _1: c_ulong) -> c_ulong,
- pub fn XRenderSetPictureClipRectangles (_6: *mut Display, _5: c_ulong, _4: c_int, _3: c_int, _2: *const XRectangle, _1: c_int) -> (),
- pub fn XRenderSetPictureClipRegion (_3: *mut Display, _2: c_ulong, _1: Region) -> (),
- pub fn XRenderSetPictureFilter (_5: *mut Display, _4: c_ulong, _3: *const c_char, _2: *mut c_int, _1: c_int) -> (),
- pub fn XRenderSetPictureTransform (_3: *mut Display, _2: c_ulong, _1: *mut XTransform) -> (),
- pub fn XRenderSetSubpixelOrder (_3: *mut Display, _2: c_int, _1: c_int) -> c_int,
-variadic:
-globals:
-}
-
-
-//
-// types
-//
-
-
-pub type Glyph = XID;
-pub type GlyphSet = XID;
-pub type PictFormat = XID;
-pub type Picture = XID;
-pub type XDouble = c_double;
-pub type XFixed = c_int;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XAnimCursor {
- pub cursor: Cursor,
- pub delay: c_ulong,
-}
-pub type XAnimCursor = _XAnimCursor;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XCircle {
- pub x: XFixed,
- pub y: XFixed,
- pub radius: XFixed,
-}
-pub type XCircle = _XCircle;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XConicalGradient {
- pub center: XPointFixed,
- pub angle: XFixed,
-}
-pub type XConicalGradient = _XConicalGradient;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XFilters {
- pub nfilter: c_int,
- pub filter: *mut *mut c_char,
- pub nalias: c_int,
- pub alias: *mut c_short,
-}
-pub type XFilters = _XFilters;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XGlyphElt8 {
- pub glyphset: GlyphSet,
- pub chars: *mut c_char,
- pub nchars: c_int,
- pub xOff: c_int,
- pub yOff: c_int,
-}
-pub type XGlyphElt8 = _XGlyphElt8;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XGlyphElt16 {
- pub glyphset: GlyphSet,
- pub chars: *mut c_ushort,
- pub nchars: c_int,
- pub xOff: c_int,
- pub yOff: c_int,
-}
-pub type XGlyphElt16 = _XGlyphElt16;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XGlyphElt32 {
- pub glyphset: GlyphSet,
- pub chars: *mut c_uint,
- pub nchars: c_int,
- pub xOff: c_int,
- pub yOff: c_int,
-}
-pub type XGlyphElt32 = _XGlyphElt32;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XGlyphInfo {
- pub width: c_ushort,
- pub height: c_ushort,
- pub x: c_short,
- pub y: c_short,
- pub xOff: c_short,
- pub yOff: c_short,
-}
-pub type XGlyphInfo = _XGlyphInfo;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XIndexValue {
- pub pixel: c_ulong,
- pub red: c_ushort,
- pub green: c_ushort,
- pub blue: c_ushort,
- pub alpha: c_ushort,
-}
-pub type XIndexValue = _XIndexValue;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XLinearGradient {
- pub p1: XPointFixed,
- pub p2: XPointFixed,
-}
-pub type XLinearGradient = _XLinearGradient;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XLineFixed {
- pub p1: XPointFixed,
- pub p2: XPointFixed,
-}
-pub type XLineFixed = _XLineFixed;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XPointDouble {
- pub x: XDouble,
- pub y: XDouble,
-}
-pub type XPointDouble = _XPointDouble;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XPointFixed {
- pub x: XFixed,
- pub y: XFixed,
-}
-pub type XPointFixed = _XPointFixed;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XRadialGradient {
- pub inner: XCircle,
- pub outer: XCircle,
-}
-pub type XRadialGradient = _XRadialGradient;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRenderColor {
- pub red: c_ushort,
- pub green: c_ushort,
- pub blue: c_ushort,
- pub alpha: c_ushort,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRenderDirectFormat {
- pub red: c_short,
- pub redMask: c_short,
- pub green: c_short,
- pub greenMask: c_short,
- pub blue: c_short,
- pub blueMask: c_short,
- pub alpha: c_short,
- pub alphaMask: c_short,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XRenderPictFormat {
- pub id: PictFormat,
- pub type_: c_int,
- pub depth: c_int,
- pub direct: XRenderDirectFormat,
- pub colormap: Colormap,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XRenderPictureAttributes {
- pub repeat: c_int,
- pub alpha_map: Picture,
- pub alpha_x_origin: c_int,
- pub alpha_y_origin: c_int,
- pub clip_x_origin: c_int,
- pub clip_y_origin: c_int,
- pub clip_mask: Pixmap,
- pub graphics_exposures: Bool,
- pub subwindow_mode: c_int,
- pub poly_edge: c_int,
- pub poly_mode: c_int,
- pub dither: Atom,
- pub component_alpha: Bool,
-}
-pub type XRenderPictureAttributes = _XRenderPictureAttributes;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XSpanFix {
- pub left: XFixed,
- pub right: XFixed,
- pub y: XFixed,
-}
-pub type XSpanFix = _XSpanFix;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XTrap {
- pub top: XSpanFix,
- pub bottom: XSpanFix,
-}
-pub type XTrap = _XTrap;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XTrapezoid {
- pub top: XFixed,
- pub bottom: XFixed,
- pub left: XLineFixed,
- pub right: XLineFixed,
-}
-pub type XTrapezoid = _XTrapezoid;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XTriangle {
- pub p1: XPointFixed,
- pub p2: XPointFixed,
- pub p3: XPointFixed,
-}
-pub type XTriangle = _XTriangle;
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct _XTransform {
- pub matrix: [[XFixed; 3]; 3],
-}
-pub type XTransform = _XTransform;
-
-
-//
-// constants
-//
-
-
-// pict format mask
-pub const PictFormatID: c_ulong = 1 << 0;
-pub const PictFormatType: c_ulong = 1 << 1;
-pub const PictFormatDepth: c_ulong = 1 << 2;
-pub const PictFormatRed: c_ulong = 1 << 3;
-pub const PictFormatRedMask: c_ulong = 1 << 4;
-pub const PictFormatGreen: c_ulong = 1 << 5;
-pub const PictFormatGreenMask: c_ulong = 1 << 6;
-pub const PictFormatBlue: c_ulong = 1 << 7;
-pub const PictFormatBlueMask: c_ulong = 1 << 8;
-pub const PictFormatAlpha: c_ulong = 1 << 9;
-pub const PictFormatAlphaMask: c_ulong = 1 << 10;
-pub const PictFormatColormap: c_ulong = 1 << 11;
-
-// error codes
-pub const BadPictFormat: c_int = 0;
-pub const BadPicture: c_int = 1;
-pub const BadPictOp: c_int = 2;
-pub const BadGlyphSet: c_int = 3;
-pub const BadGlyph: c_int = 4;
-pub const RenderNumberErrors: c_int = BadGlyph + 1;
-
-// pict types
-pub const PictTypeIndexed: c_int = 0;
-pub const PictTypeDirect: c_int = 1;
-
-// ops
-pub const PictOpMinimum: c_int = 0;
-pub const PictOpClear: c_int = 0;
-pub const PictOpSrc: c_int = 1;
-pub const PictOpDst: c_int = 2;
-pub const PictOpOver: c_int = 3;
-pub const PictOpOverReverse: c_int = 4;
-pub const PictOpIn: c_int = 5;
-pub const PictOpInReverse: c_int = 6;
-pub const PictOpOut: c_int = 7;
-pub const PictOpOutReverse: c_int = 8;
-pub const PictOpAtop: c_int = 9;
-pub const PictOpAtopReverse: c_int = 10;
-pub const PictOpXor: c_int = 11;
-pub const PictOpAdd: c_int = 12;
-pub const PictOpSaturate: c_int = 13;
-pub const PictOpMaximum: c_int = 13;
-
-pub const PictOpDisjointMinimum: c_int = 0x10;
-pub const PictOpDisjointClear: c_int = 0x10;
-pub const PictOpDisjointSrc: c_int = 0x11;
-pub const PictOpDisjointDst: c_int = 0x12;
-pub const PictOpDisjointOver: c_int = 0x13;
-pub const PictOpDisjointOverReverse: c_int = 0x14;
-pub const PictOpDisjointIn: c_int = 0x15;
-pub const PictOpDisjointInReverse: c_int = 0x16;
-pub const PictOpDisjointOut: c_int = 0x17;
-pub const PictOpDisjointOutReverse: c_int = 0x18;
-pub const PictOpDisjointAtop: c_int = 0x19;
-pub const PictOpDisjointAtopReverse: c_int = 0x1a;
-pub const PictOpDisjointXor: c_int = 0x1b;
-pub const PictOpDisjointMaximum: c_int = 0x1b;
-
-pub const PictOpConjointMinimum: c_int = 0x20;
-pub const PictOpConjointClear: c_int = 0x20;
-pub const PictOpConjointSrc: c_int = 0x21;
-pub const PictOpConjointDst: c_int = 0x22;
-pub const PictOpConjointOver: c_int = 0x23;
-pub const PictOpConjointOverReverse: c_int = 0x24;
-pub const PictOpConjointIn: c_int = 0x25;
-pub const PictOpConjointInReverse: c_int = 0x26;
-pub const PictOpConjointOut: c_int = 0x27;
-pub const PictOpConjointOutReverse: c_int = 0x28;
-pub const PictOpConjointAtop: c_int = 0x29;
-pub const PictOpConjointAtopReverse: c_int = 0x2a;
-pub const PictOpConjointXor: c_int = 0x2b;
-pub const PictOpConjointMaximum: c_int = 0x2b;
-
-pub const PictOpBlendMinimum: c_int = 0x30;
-pub const PictOpMultiply: c_int = 0x30;
-pub const PictOpScreen: c_int = 0x31;
-pub const PictOpOverlay: c_int = 0x32;
-pub const PictOpDarken: c_int = 0x33;
-pub const PictOpLighten: c_int = 0x34;
-pub const PictOpColorDodge: c_int = 0x35;
-pub const PictOpColorBurn: c_int = 0x36;
-pub const PictOpHardLight: c_int = 0x37;
-pub const PictOpSoftLight: c_int = 0x38;
-pub const PictOpDifference: c_int = 0x39;
-pub const PictOpExclusion: c_int = 0x3a;
-pub const PictOpHSLHue: c_int = 0x3b;
-pub const PictOpHSLSaturation: c_int = 0x3c;
-pub const PictOpHSLColor: c_int = 0x3d;
-pub const PictOpHSLLuminosity: c_int = 0x3e;
-pub const PictOpBlendMaximum: c_int = 0x3e;
-
-// poly edge types
-pub const PolyEdgeSharp: c_int = 0;
-pub const PolyEdgeSmooth: c_int = 1;
-
-// poly modes
-pub const PolyModePrecise: c_int = 0;
-pub const PolyModeImprecise: c_int = 1;
-
-// picture attributes mask
-pub const CPRepeat: c_int = 1 << 0;
-pub const CPAlphaMap: c_int = 1 << 1;
-pub const CPAlphaXOrigin: c_int = 1 << 2;
-pub const CPAlphaYOrigin: c_int = 1 << 3;
-pub const CPClipXOrigin: c_int = 1 << 4;
-pub const CPClipYOrigin: c_int = 1 << 5;
-pub const CPClipMask: c_int = 1 << 6;
-pub const CPGraphicsExposure: c_int = 1 << 7;
-pub const CPSubwindowMode: c_int = 1 << 8;
-pub const CPPolyEdge: c_int = 1 << 9;
-pub const CPPolyMode: c_int = 1 << 10;
-pub const CPDither: c_int = 1 << 11;
-pub const CPComponentAlpha: c_int = 1 << 12;
-pub const CPLastBit: c_int = 12;
-
-// filter methods
-pub const FilterNearest: &'static str = "nearest";
-pub const FilterBilinear: &'static str = "bilinear";
-pub const FilterConvolution: &'static str = "convolution";
-pub const FilterFast: &'static str = "fast";
-pub const FilterGood: &'static str = "good";
-pub const FilterBest: &'static str = "best";
-
-// subpixel orders
-pub const SubPixelUnknown: c_int = 0;
-pub const SubPixelHorizontalRGB: c_int = 1;
-pub const SubPixelHorizontalBGR: c_int = 2;
-pub const SubPixelVerticalRGB: c_int = 3;
-pub const SubPixelVerticalBGR: c_int = 4;
-pub const SubPixelNone: c_int = 5;
-
-// repeat attributes
-pub const RepeatNone: c_int = 0;
-pub const RepeatNormal: c_int = 1;
-pub const RepeatPad: c_int = 2;
-pub const RepeatReflect: c_int = 3;
deleted file mode 100644
--- a/third_party/rust/x11/src/xss.rs
+++ /dev/null
@@ -1,100 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::{ c_int, c_uint, c_ulong };
-use std::mem;
-
-use ::internal::transmute_union;
-use xlib::{ Atom, Bool, Display, Drawable, Status, Time, Visual, XEvent, XID, XSetWindowAttributes, Window };
-
-
-//
-// functions
-//
-
-
-x11_link! { Xss, xscrnsaver, ["libXss.so.2", "libXss.so"], 11,
- pub fn XScreenSaverQueryExtension (_1: *mut Display, _2: *mut c_int, _3: *mut c_int) -> Bool,
- pub fn XScreenSaverQueryVersion (_1: *mut Display, _2: *mut c_int, _3: *mut c_int) -> Status,
- pub fn XScreenSaverAllocInfo () -> *mut XScreenSaverInfo,
- pub fn XScreenSaverQueryInfo (_1: *mut Display, _2: Drawable, _3: *mut XScreenSaverInfo) -> Status,
- pub fn XScreenSaverSelectInput (_1: *mut Display, _2: Drawable, _3: c_ulong) -> (),
- pub fn XScreenSaverSetAttributes (_1: *mut Display, _2: Drawable, _3: c_int, _4: c_int, _5: c_uint, _6: c_uint, _7: c_uint, _8: c_int, _9: c_uint, _10: *mut Visual, _11: c_ulong, _12: *mut XSetWindowAttributes) -> (),
- pub fn XScreenSaverUnsetAttributes (_1: *mut Display, _2: Drawable) -> (),
- pub fn XScreenSaverRegister (_1: *mut Display, _2: c_int, _3: XID, _4: Atom) -> Status,
- pub fn XScreenSaverUnregister (_1: *mut Display, _2: c_int) -> Status,
- pub fn XScreenSaverGetRegistered (_1: *mut Display, _2: c_int, _3: *mut XID, _4: *mut Atom) -> Status,
- pub fn XScreenSaverSuspend (_1: *mut Display, _2: Bool) -> (),
-variadic:
-globals:
-}
-
-
-//
-// types
-//
-
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XScreenSaverInfo {
- pub window: Window,
- pub state: c_int,
- pub kind: c_int,
- pub til_or_since: c_ulong,
- pub idle: c_ulong,
- pub eventMask: c_ulong,
-}
-
-
-//
-// event structures
-//
-
-
-#[derive(Clone, Copy, PartialEq)]
-#[repr(C)]
-pub struct XScreenSaverNotifyEvent {
- pub type_: c_int,
- pub serial: c_ulong,
- pub send_event: Bool,
- pub display: *mut Display,
- pub window: Window,
- pub root: Window,
- pub state: c_int,
- pub kind: c_int,
- pub forced: Bool,
- pub time: Time,
-}
-
-event_conversions_and_tests! {
- XScreenSaverNotifyEvent,
-}
-
-
-//
-// constants
-//
-
-
-pub const ScreenSaverName: &'static str = "MIT-SCREEN-SAVER";
-pub const ScreenSaverPropertyName: &'static str = "_MIT_SCREEN_SAVER_ID";
-
-pub const ScreenSaverNotifyMask: c_ulong = 0x00000001;
-pub const ScreenSaverCycleMask: c_ulong = 0x00000002;
-
-pub const ScreenSaverMajorVersion: c_int = 1;
-pub const ScreenSaverMinorVersion: c_int = 1;
-
-pub const ScreenSaverOff: c_int = 0;
-pub const ScreenSaverOn: c_int = 1;
-pub const ScreenSaverCycle: c_int = 2;
-pub const ScreenSaverDisabled: c_int = 3;
-
-pub const ScreenSaverBlanked: c_int = 0;
-pub const ScreenSaverInternal: c_int = 1;
-pub const ScreenSaverExternal: c_int = 2;
-
-pub const ScreenSaverNotify: c_int = 0;
-pub const ScreenSaverNumberEvents: c_int = 1;
deleted file mode 100644
--- a/third_party/rust/x11/src/xt.rs
+++ /dev/null
@@ -1,398 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::{
- c_char,
- c_int,
- c_long,
- c_short,
- c_uchar,
- c_uint,
- c_ulong,
- c_ushort,
- c_void,
-};
-
-use ::xlib::{
- Display,
- GC,
- Region,
- Screen,
- Visual,
- XEvent,
- XGCValues,
- _XrmHashBucketRec,
- XrmOptionDescList,
- XrmValue,
- XSelectionRequestEvent,
- XSetWindowAttributes,
-};
-
-
-//
-// functions
-//
-
-
-x11_link! { Xt, xt, ["libXt.so.6", "libXt.so"], 300,
- pub fn XtAddActions (_2: *mut XtActionsRec, _1: c_uint) -> (),
- pub fn XtAddCallback (_4: Widget, _3: *const c_char, _2: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut c_void)>, _1: *mut c_void) -> (),
- pub fn XtAddCallbacks (_3: Widget, _2: *const c_char, _1: XtCallbackList) -> (),
- pub fn XtAddConverter (_5: *const c_char, _4: *const c_char, _3: Option<unsafe extern "C" fn (*mut XrmValue, *mut c_uint, *mut XrmValue, *mut XrmValue)>, _2: XtConvertArgList, _1: c_uint) -> (),
- pub fn XtAddEventHandler (_5: Widget, _4: c_ulong, _3: c_char, _2: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _1: *mut c_void) -> (),
- pub fn XtAddExposureToRegion (_2: *mut XEvent, _1: Region) -> (),
- pub fn XtAddGrab (_3: Widget, _2: c_char, _1: c_char) -> (),
- pub fn XtAddInput (_4: c_int, _3: *mut c_void, _2: Option<unsafe extern "C" fn (*mut c_void, *mut c_int, *mut c_ulong)>, _1: *mut c_void) -> c_ulong,
- pub fn XtAddRawEventHandler (_5: Widget, _4: c_ulong, _3: c_char, _2: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _1: *mut c_void) -> (),
- pub fn XtAddSignal (_2: Option<unsafe extern "C" fn (*mut c_void, *mut c_ulong)>, _1: *mut c_void) -> c_ulong,
- pub fn XtAddTimeOut (_3: c_ulong, _2: Option<unsafe extern "C" fn (*mut c_void, *mut c_ulong)>, _1: *mut c_void) -> c_ulong,
- pub fn XtAddWorkProc (_2: Option<unsafe extern "C" fn (*mut c_void) -> c_char>, _1: *mut c_void) -> c_ulong,
- pub fn XtAllocateGC (_6: Widget, _5: c_uint, _4: c_ulong, _3: *mut XGCValues, _2: c_ulong, _1: c_ulong) -> GC,
- pub fn XtAppAddActionHook (_3: XtAppContext, _2: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut c_char, *mut XEvent, *mut *mut c_char, *mut c_uint)>, _1: *mut c_void) -> *mut c_void,
- pub fn XtAppAddActions (_3: XtAppContext, _2: *mut XtActionsRec, _1: c_uint) -> (),
- pub fn XtAppAddBlockHook (_3: XtAppContext, _2: Option<unsafe extern "C" fn (*mut c_void)>, _1: *mut c_void) -> c_ulong,
- pub fn XtAppAddConverter (_6: XtAppContext, _5: *const c_char, _4: *const c_char, _3: Option<unsafe extern "C" fn (*mut XrmValue, *mut c_uint, *mut XrmValue, *mut XrmValue)>, _2: XtConvertArgList, _1: c_uint) -> (),
- pub fn XtAppAddInput (_5: XtAppContext, _4: c_int, _3: *mut c_void, _2: Option<unsafe extern "C" fn (*mut c_void, *mut c_int, *mut c_ulong)>, _1: *mut c_void) -> c_ulong,
- pub fn XtAppAddSignal (_3: XtAppContext, _2: Option<unsafe extern "C" fn (*mut c_void, *mut c_ulong)>, _1: *mut c_void) -> c_ulong,
- pub fn XtAppAddTimeOut (_4: XtAppContext, _3: c_ulong, _2: Option<unsafe extern "C" fn (*mut c_void, *mut c_ulong)>, _1: *mut c_void) -> c_ulong,
- pub fn XtAppAddWorkProc (_3: XtAppContext, _2: Option<unsafe extern "C" fn (*mut c_void) -> c_char>, _1: *mut c_void) -> c_ulong,
- pub fn XtAppCreateShell (_6: *const c_char, _5: *const c_char, _4: WidgetClass, _3: *mut Display, _2: *mut Arg, _1: c_uint) -> Widget,
- pub fn XtAppError (_2: XtAppContext, _1: *const c_char) -> (),
- pub fn XtAppErrorMsg (_7: XtAppContext, _6: *const c_char, _5: *const c_char, _4: *const c_char, _3: *const c_char, _2: *mut *mut c_char, _1: *mut c_uint) -> (),
- pub fn XtAppGetErrorDatabase (_1: XtAppContext) -> *mut *mut _XrmHashBucketRec,
- pub fn XtAppGetErrorDatabaseText (_8: XtAppContext, _7: *const c_char, _6: *const c_char, _5: *const c_char, _4: *const c_char, _3: *mut c_char, _2: c_int, _1: *mut _XrmHashBucketRec) -> (),
- pub fn XtAppGetExitFlag (_1: XtAppContext) -> c_char,
- pub fn XtAppGetSelectionTimeout (_1: XtAppContext) -> c_ulong,
- pub fn XtAppInitialize (_9: *mut XtAppContext, _8: *const c_char, _7: XrmOptionDescList, _6: c_uint, _5: *mut c_int, _4: *mut *mut c_char, _3: *mut *mut c_char, _2: *mut Arg, _1: c_uint) -> Widget,
- pub fn XtAppLock (_1: XtAppContext) -> (),
- pub fn XtAppMainLoop (_1: XtAppContext) -> (),
- pub fn XtAppNextEvent (_2: XtAppContext, _1: *mut XEvent) -> (),
- pub fn XtAppPeekEvent (_2: XtAppContext, _1: *mut XEvent) -> c_char,
- pub fn XtAppPending (_1: XtAppContext) -> c_ulong,
- pub fn XtAppProcessEvent (_2: XtAppContext, _1: c_ulong) -> (),
- pub fn XtAppReleaseCacheRefs (_2: XtAppContext, _1: *mut *mut c_void) -> (),
- pub fn XtAppSetErrorHandler (_2: XtAppContext, _1: Option<unsafe extern "C" fn (*mut c_char)>) -> Option<unsafe extern "C" fn (*mut c_char)>,
- pub fn XtAppSetErrorMsgHandler (_2: XtAppContext, _1: Option<unsafe extern "C" fn (*mut c_char, *mut c_char, *mut c_char, *mut c_char, *mut *mut c_char, *mut c_uint)>) -> Option<unsafe extern "C" fn (*mut c_char, *mut c_char, *mut c_char, *mut c_char, *mut *mut c_char, *mut c_uint)>,
- pub fn XtAppSetExitFlag (_1: XtAppContext) -> (),
- pub fn XtAppSetFallbackResources (_2: XtAppContext, _1: *mut *mut c_char) -> (),
- pub fn XtAppSetSelectionTimeout (_2: XtAppContext, _1: c_ulong) -> (),
- pub fn XtAppSetTypeConverter (_8: XtAppContext, _7: *const c_char, _6: *const c_char, _5: Option<unsafe extern "C" fn (*mut Display, *mut XrmValue, *mut c_uint, *mut XrmValue, *mut XrmValue, *mut *mut c_void) -> c_char>, _4: XtConvertArgList, _3: c_uint, _2: c_int, _1: Option<unsafe extern "C" fn (XtAppContext, *mut XrmValue, *mut c_void, *mut XrmValue, *mut c_uint)>) -> (),
- pub fn XtAppSetWarningHandler (_2: XtAppContext, _1: Option<unsafe extern "C" fn (*mut c_char)>) -> Option<unsafe extern "C" fn (*mut c_char)>,
- pub fn XtAppSetWarningMsgHandler (_2: XtAppContext, _1: Option<unsafe extern "C" fn (*mut c_char, *mut c_char, *mut c_char, *mut c_char, *mut *mut c_char, *mut c_uint)>) -> Option<unsafe extern "C" fn (*mut c_char, *mut c_char, *mut c_char, *mut c_char, *mut *mut c_char, *mut c_uint)>,
- pub fn XtAppUnlock (_1: XtAppContext) -> (),
- pub fn XtAppWarning (_2: XtAppContext, _1: *const c_char) -> (),
- pub fn XtAppWarningMsg (_7: XtAppContext, _6: *const c_char, _5: *const c_char, _4: *const c_char, _3: *const c_char, _2: *mut *mut c_char, _1: *mut c_uint) -> (),
- pub fn XtAugmentTranslations (_2: Widget, _1: *mut _TranslationData) -> (),
- pub fn XtBuildEventMask (_1: Widget) -> c_ulong,
- pub fn XtCallAcceptFocus (_2: Widget, _1: *mut c_ulong) -> c_char,
- pub fn XtCallActionProc (_5: Widget, _4: *const c_char, _3: *mut XEvent, _2: *mut *mut c_char, _1: c_uint) -> (),
- pub fn XtCallbackExclusive (_3: Widget, _2: *mut c_void, _1: *mut c_void) -> (),
- pub fn XtCallbackNone (_3: Widget, _2: *mut c_void, _1: *mut c_void) -> (),
- pub fn XtCallbackNonexclusive (_3: Widget, _2: *mut c_void, _1: *mut c_void) -> (),
- pub fn XtCallbackPopdown (_3: Widget, _2: *mut c_void, _1: *mut c_void) -> (),
- pub fn XtCallbackReleaseCacheRef (_3: Widget, _2: *mut c_void, _1: *mut c_void) -> (),
- pub fn XtCallbackReleaseCacheRefList (_3: Widget, _2: *mut c_void, _1: *mut c_void) -> (),
- pub fn XtCallCallbackList (_3: Widget, _2: XtCallbackList, _1: *mut c_void) -> (),
- pub fn XtCallCallbacks (_3: Widget, _2: *const c_char, _1: *mut c_void) -> (),
- pub fn XtCallConverter (_7: *mut Display, _6: Option<unsafe extern "C" fn (*mut Display, *mut XrmValue, *mut c_uint, *mut XrmValue, *mut XrmValue, *mut *mut c_void) -> c_char>, _5: *mut XrmValue, _4: c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCalloc (_2: c_uint, _1: c_uint) -> *mut c_char,
- pub fn XtCancelSelectionRequest (_2: Widget, _1: c_ulong) -> (),
- pub fn XtChangeManagedSet (_6: *mut Widget, _5: c_uint, _4: Option<unsafe extern "C" fn (Widget, *mut Widget, *mut c_uint, *mut Widget, *mut c_uint, *mut c_void)>, _3: *mut c_void, _2: *mut Widget, _1: c_uint) -> (),
- pub fn XtClass (_1: Widget) -> WidgetClass,
- pub fn XtCloseDisplay (_1: *mut Display) -> (),
- pub fn XtConfigureWidget (_6: Widget, _5: c_short, _4: c_short, _3: c_ushort, _2: c_ushort, _1: c_ushort) -> (),
- pub fn XtConvert (_5: Widget, _4: *const c_char, _3: *mut XrmValue, _2: *const c_char, _1: *mut XrmValue) -> (),
- pub fn XtConvertAndStore (_5: Widget, _4: *const c_char, _3: *mut XrmValue, _2: *const c_char, _1: *mut XrmValue) -> c_char,
- pub fn XtConvertCase (_4: *mut Display, _3: c_ulong, _2: *mut c_ulong, _1: *mut c_ulong) -> (),
- pub fn XtCreateApplicationContext () -> XtAppContext,
- pub fn XtCreateApplicationShell (_4: *const c_char, _3: WidgetClass, _2: *mut Arg, _1: c_uint) -> Widget,
- pub fn XtCreateManagedWidget (_5: *const c_char, _4: WidgetClass, _3: Widget, _2: *mut Arg, _1: c_uint) -> Widget,
- pub fn XtCreatePopupShell (_5: *const c_char, _4: WidgetClass, _3: Widget, _2: *mut Arg, _1: c_uint) -> Widget,
- pub fn XtCreateSelectionRequest (_2: Widget, _1: c_ulong) -> (),
- pub fn XtCreateWidget (_5: *const c_char, _4: WidgetClass, _3: Widget, _2: *mut Arg, _1: c_uint) -> Widget,
- pub fn XtCreateWindow (_5: Widget, _4: c_uint, _3: *mut Visual, _2: c_ulong, _1: *mut XSetWindowAttributes) -> (),
- pub fn XtCvtColorToPixel (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtIntToBool (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtIntToBoolean (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtIntToColor (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtIntToFloat (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtIntToFont (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtIntToPixel (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtIntToPixmap (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtIntToShort (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtIntToUnsignedChar (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToAcceleratorTable (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToAtom (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToBool (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToBoolean (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToCommandArgArray (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToCursor (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToDimension (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToDirectoryString (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToDisplay (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToFile (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToFloat (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToFont (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToFontSet (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToFontStruct (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToGravity (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToInitialState (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToInt (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToPixel (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToRestartStyle (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToShort (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToTranslationTable (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToUnsignedChar (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtCvtStringToVisual (_6: *mut Display, _5: *mut XrmValue, _4: *mut c_uint, _3: *mut XrmValue, _2: *mut XrmValue, _1: *mut *mut c_void) -> c_char,
- pub fn XtDatabase (_1: *mut Display) -> *mut _XrmHashBucketRec,
- pub fn XtDestroyApplicationContext (_1: XtAppContext) -> (),
- pub fn XtDestroyGC (_1: GC) -> (),
- pub fn XtDestroyWidget (_1: Widget) -> (),
- pub fn XtDirectConvert (_5: Option<unsafe extern "C" fn (*mut XrmValue, *mut c_uint, *mut XrmValue, *mut XrmValue)>, _4: *mut XrmValue, _3: c_uint, _2: *mut XrmValue, _1: *mut XrmValue) -> (),
- pub fn XtDisownSelection (_3: Widget, _2: c_ulong, _1: c_ulong) -> (),
- pub fn XtDispatchEvent (_1: *mut XEvent) -> c_char,
- pub fn XtDispatchEventToWidget (_2: Widget, _1: *mut XEvent) -> c_char,
- pub fn XtDisplay (_1: Widget) -> *mut Display,
- pub fn XtDisplayInitialize (_8: XtAppContext, _7: *mut Display, _6: *const c_char, _5: *const c_char, _4: XrmOptionDescList, _3: c_uint, _2: *mut c_int, _1: *mut *mut c_char) -> (),
- pub fn XtDisplayOfObject (_1: Widget) -> *mut Display,
- pub fn XtDisplayStringConversionWarning (_3: *mut Display, _2: *const c_char, _1: *const c_char) -> (),
- pub fn XtDisplayToApplicationContext (_1: *mut Display) -> XtAppContext,
- pub fn XtError (_1: *const c_char) -> (),
- pub fn XtErrorMsg (_6: *const c_char, _5: *const c_char, _4: *const c_char, _3: *const c_char, _2: *mut *mut c_char, _1: *mut c_uint) -> (),
- pub fn XtFindFile (_4: *const c_char, _3: Substitution, _2: c_uint, _1: Option<unsafe extern "C" fn (*mut c_char) -> c_char>) -> *mut c_char,
- pub fn XtFree (_1: *mut c_char) -> (),
- pub fn XtGetActionKeysym (_2: *mut XEvent, _1: *mut c_uint) -> c_ulong,
- pub fn XtGetActionList (_3: WidgetClass, _2: *mut *mut XtActionsRec, _1: *mut c_uint) -> (),
- pub fn XtGetApplicationNameAndClass (_3: *mut Display, _2: *mut *mut c_char, _1: *mut *mut c_char) -> (),
- pub fn XtGetApplicationResources (_6: Widget, _5: *mut c_void, _4: *mut XtResource, _3: c_uint, _2: *mut Arg, _1: c_uint) -> (),
- pub fn XtGetClassExtension (_5: WidgetClass, _4: c_uint, _3: c_int, _2: c_long, _1: c_uint) -> *mut c_void,
- pub fn XtGetConstraintResourceList (_3: WidgetClass, _2: *mut *mut XtResource, _1: *mut c_uint) -> (),
- pub fn XtGetDisplays (_3: XtAppContext, _2: *mut *mut *mut Display, _1: *mut c_uint) -> (),
- pub fn XtGetErrorDatabase () -> *mut *mut _XrmHashBucketRec,
- pub fn XtGetErrorDatabaseText (_6: *const c_char, _5: *const c_char, _4: *const c_char, _3: *const c_char, _2: *mut c_char, _1: c_int) -> (),
- pub fn XtGetGC (_3: Widget, _2: c_ulong, _1: *mut XGCValues) -> GC,
- pub fn XtGetKeyboardFocusWidget (_1: Widget) -> Widget,
- pub fn XtGetKeysymTable (_3: *mut Display, _2: *mut c_uchar, _1: *mut c_int) -> *mut c_ulong,
- pub fn XtGetMultiClickTime (_1: *mut Display) -> c_int,
- pub fn XtGetResourceList (_3: WidgetClass, _2: *mut *mut XtResource, _1: *mut c_uint) -> (),
- pub fn XtGetSelectionParameters (_7: Widget, _6: c_ulong, _5: *mut c_void, _4: *mut c_ulong, _3: *mut *mut c_void, _2: *mut c_ulong, _1: *mut c_int) -> (),
- pub fn XtGetSelectionRequest (_3: Widget, _2: c_ulong, _1: *mut c_void) -> *mut XSelectionRequestEvent,
- pub fn XtGetSelectionTimeout () -> c_ulong,
- pub fn XtGetSelectionValue (_6: Widget, _5: c_ulong, _4: c_ulong, _3: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut c_ulong, *mut c_ulong, *mut c_void, *mut c_ulong, *mut c_int)>, _2: *mut c_void, _1: c_ulong) -> (),
- pub fn XtGetSelectionValueIncremental (_6: Widget, _5: c_ulong, _4: c_ulong, _3: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut c_ulong, *mut c_ulong, *mut c_void, *mut c_ulong, *mut c_int)>, _2: *mut c_void, _1: c_ulong) -> (),
- pub fn XtGetSelectionValues (_7: Widget, _6: c_ulong, _5: *mut c_ulong, _4: c_int, _3: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut c_ulong, *mut c_ulong, *mut c_void, *mut c_ulong, *mut c_int)>, _2: *mut *mut c_void, _1: c_ulong) -> (),
- pub fn XtGetSelectionValuesIncremental (_7: Widget, _6: c_ulong, _5: *mut c_ulong, _4: c_int, _3: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut c_ulong, *mut c_ulong, *mut c_void, *mut c_ulong, *mut c_int)>, _2: *mut *mut c_void, _1: c_ulong) -> (),
- pub fn XtGetSubresources (_8: Widget, _7: *mut c_void, _6: *const c_char, _5: *const c_char, _4: *mut XtResource, _3: c_uint, _2: *mut Arg, _1: c_uint) -> (),
- pub fn XtGetSubvalues (_5: *mut c_void, _4: *mut XtResource, _3: c_uint, _2: *mut Arg, _1: c_uint) -> (),
- pub fn XtGetValues (_3: Widget, _2: *mut Arg, _1: c_uint) -> (),
- pub fn XtGrabButton (_9: Widget, _8: c_int, _7: c_uint, _6: c_char, _5: c_uint, _4: c_int, _3: c_int, _2: c_ulong, _1: c_ulong) -> (),
- pub fn XtGrabKey (_6: Widget, _5: c_uchar, _4: c_uint, _3: c_char, _2: c_int, _1: c_int) -> (),
- pub fn XtGrabKeyboard (_5: Widget, _4: c_char, _3: c_int, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XtGrabPointer (_8: Widget, _7: c_char, _6: c_uint, _5: c_int, _4: c_int, _3: c_ulong, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XtHasCallbacks (_2: Widget, _1: *const c_char) -> XtCallbackStatus,
- pub fn XtHooksOfDisplay (_1: *mut Display) -> Widget,
- pub fn XtInitialize (_6: *const c_char, _5: *const c_char, _4: XrmOptionDescList, _3: c_uint, _2: *mut c_int, _1: *mut *mut c_char) -> Widget,
- pub fn XtInitializeWidgetClass (_1: WidgetClass) -> (),
- pub fn XtInsertEventHandler (_6: Widget, _5: c_ulong, _4: c_char, _3: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _2: *mut c_void, _1: XtListPosition) -> (),
- pub fn XtInsertEventTypeHandler (_6: Widget, _5: c_int, _4: *mut c_void, _3: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _2: *mut c_void, _1: XtListPosition) -> (),
- pub fn XtInsertRawEventHandler (_6: Widget, _5: c_ulong, _4: c_char, _3: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _2: *mut c_void, _1: XtListPosition) -> (),
- pub fn XtInstallAccelerators (_2: Widget, _1: Widget) -> (),
- pub fn XtInstallAllAccelerators (_2: Widget, _1: Widget) -> (),
- pub fn XtIsApplicationShell (_1: Widget) -> c_char,
- pub fn XtIsComposite (_1: Widget) -> c_char,
- pub fn XtIsConstraint (_1: Widget) -> c_char,
- pub fn XtIsManaged (_1: Widget) -> c_char,
- pub fn XtIsObject (_1: Widget) -> c_char,
- pub fn XtIsOverrideShell (_1: Widget) -> c_char,
- pub fn XtIsRealized (_1: Widget) -> c_char,
- pub fn XtIsRectObj (_1: Widget) -> c_char,
- pub fn XtIsSensitive (_1: Widget) -> c_char,
- pub fn XtIsSessionShell (_1: Widget) -> c_char,
- pub fn XtIsShell (_1: Widget) -> c_char,
- pub fn XtIsSubclass (_2: Widget, _1: WidgetClass) -> c_char,
- pub fn XtIsTopLevelShell (_1: Widget) -> c_char,
- pub fn XtIsTransientShell (_1: Widget) -> c_char,
- pub fn XtIsVendorShell (_1: Widget) -> c_char,
- pub fn XtIsWidget (_1: Widget) -> c_char,
- pub fn XtIsWMShell (_1: Widget) -> c_char,
- pub fn XtKeysymToKeycodeList (_4: *mut Display, _3: c_ulong, _2: *mut *mut c_uchar, _1: *mut c_uint) -> (),
- pub fn XtLastEventProcessed (_1: *mut Display) -> *mut XEvent,
- pub fn XtLastTimestampProcessed (_1: *mut Display) -> c_ulong,
- pub fn XtMainLoop () -> (),
- pub fn XtMakeGeometryRequest (_3: Widget, _2: *mut XtWidgetGeometry, _1: *mut XtWidgetGeometry) -> XtGeometryResult,
- pub fn XtMakeResizeRequest (_5: Widget, _4: c_ushort, _3: c_ushort, _2: *mut c_ushort, _1: *mut c_ushort) -> XtGeometryResult,
- pub fn XtMalloc (_1: c_uint) -> *mut c_char,
- pub fn XtManageChild (_1: Widget) -> (),
- pub fn XtManageChildren (_2: *mut Widget, _1: c_uint) -> (),
- pub fn XtMapWidget (_1: Widget) -> (),
- pub fn XtMenuPopupAction (_4: Widget, _3: *mut XEvent, _2: *mut *mut c_char, _1: *mut c_uint) -> (),
- pub fn XtMergeArgLists (_4: *mut Arg, _3: c_uint, _2: *mut Arg, _1: c_uint) -> *mut Arg,
- pub fn XtMoveWidget (_3: Widget, _2: c_short, _1: c_short) -> (),
- pub fn XtName (_1: Widget) -> *mut c_char,
- pub fn XtNameToWidget (_2: Widget, _1: *const c_char) -> Widget,
- pub fn XtNewString (_1: *mut c_char) -> *mut c_char,
- pub fn XtNextEvent (_1: *mut XEvent) -> (),
- pub fn XtNoticeSignal (_1: c_ulong) -> (),
- pub fn XtOpenApplication (_10: *mut XtAppContext, _9: *const c_char, _8: XrmOptionDescList, _7: c_uint, _6: *mut c_int, _5: *mut *mut c_char, _4: *mut *mut c_char, _3: WidgetClass, _2: *mut Arg, _1: c_uint) -> Widget,
- pub fn XtOpenDisplay (_8: XtAppContext, _7: *const c_char, _6: *const c_char, _5: *const c_char, _4: XrmOptionDescList, _3: c_uint, _2: *mut c_int, _1: *mut *mut c_char) -> *mut Display,
- pub fn XtOverrideTranslations (_2: Widget, _1: *mut _TranslationData) -> (),
- pub fn XtOwnSelection (_6: Widget, _5: c_ulong, _4: c_ulong, _3: Option<unsafe extern "C" fn (Widget, *mut c_ulong, *mut c_ulong, *mut c_ulong, *mut *mut c_void, *mut c_ulong, *mut c_int) -> c_char>, _2: Option<unsafe extern "C" fn (Widget, *mut c_ulong)>, _1: Option<unsafe extern "C" fn (Widget, *mut c_ulong, *mut c_ulong)>) -> c_char,
- pub fn XtOwnSelectionIncremental (_8: Widget, _7: c_ulong, _6: c_ulong, _5: Option<unsafe extern "C" fn (Widget, *mut c_ulong, *mut c_ulong, *mut c_ulong, *mut *mut c_void, *mut c_ulong, *mut c_int, *mut c_ulong, *mut c_void, *mut *mut c_void) -> c_char>, _4: Option<unsafe extern "C" fn (Widget, *mut c_ulong, *mut c_void)>, _3: Option<unsafe extern "C" fn (Widget, *mut c_ulong, *mut c_ulong, *mut *mut c_void, *mut c_void)>, _2: Option<unsafe extern "C" fn (Widget, *mut c_ulong, *mut c_ulong, *mut *mut c_void, *mut c_void)>, _1: *mut c_void) -> c_char,
- pub fn XtParent (_1: Widget) -> Widget,
- pub fn XtParseAcceleratorTable (_1: *const c_char) -> *mut _TranslationData,
- pub fn XtParseTranslationTable (_1: *const c_char) -> *mut _TranslationData,
- pub fn XtPeekEvent (_1: *mut XEvent) -> c_char,
- pub fn XtPending () -> c_char,
- pub fn XtPopdown (_1: Widget) -> (),
- pub fn XtPopup (_2: Widget, _1: XtGrabKind) -> (),
- pub fn XtPopupSpringLoaded (_1: Widget) -> (),
- pub fn XtProcessEvent (_1: c_ulong) -> (),
- pub fn XtProcessLock () -> (),
- pub fn XtProcessUnlock () -> (),
- pub fn XtQueryGeometry (_3: Widget, _2: *mut XtWidgetGeometry, _1: *mut XtWidgetGeometry) -> XtGeometryResult,
- pub fn XtRealizeWidget (_1: Widget) -> (),
- pub fn XtRealloc (_2: *mut c_char, _1: c_uint) -> *mut c_char,
- pub fn XtRegisterCaseConverter (_4: *mut Display, _3: Option<unsafe extern "C" fn (*mut Display, c_ulong, *mut c_ulong, *mut c_ulong)>, _2: c_ulong, _1: c_ulong) -> (),
- pub fn XtRegisterDrawable (_3: *mut Display, _2: c_ulong, _1: Widget) -> (),
- pub fn XtRegisterExtensionSelector (_5: *mut Display, _4: c_int, _3: c_int, _2: Option<unsafe extern "C" fn (Widget, *mut c_int, *mut *mut c_void, c_int, *mut c_void)>, _1: *mut c_void) -> (),
- pub fn XtRegisterGrabAction (_5: Option<unsafe extern "C" fn (Widget, *mut XEvent, *mut *mut c_char, *mut c_uint)>, _4: c_char, _3: c_uint, _2: c_int, _1: c_int) -> (),
- pub fn XtReleaseGC (_2: Widget, _1: GC) -> (),
- pub fn XtReleasePropertyAtom (_2: Widget, _1: c_ulong) -> (),
- pub fn XtRemoveActionHook (_1: *mut c_void) -> (),
- pub fn XtRemoveAllCallbacks (_2: Widget, _1: *const c_char) -> (),
- pub fn XtRemoveBlockHook (_1: c_ulong) -> (),
- pub fn XtRemoveCallback (_4: Widget, _3: *const c_char, _2: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut c_void)>, _1: *mut c_void) -> (),
- pub fn XtRemoveCallbacks (_3: Widget, _2: *const c_char, _1: XtCallbackList) -> (),
- pub fn XtRemoveEventHandler (_5: Widget, _4: c_ulong, _3: c_char, _2: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _1: *mut c_void) -> (),
- pub fn XtRemoveEventTypeHandler (_5: Widget, _4: c_int, _3: *mut c_void, _2: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _1: *mut c_void) -> (),
- pub fn XtRemoveGrab (_1: Widget) -> (),
- pub fn XtRemoveInput (_1: c_ulong) -> (),
- pub fn XtRemoveRawEventHandler (_5: Widget, _4: c_ulong, _3: c_char, _2: Option<unsafe extern "C" fn (Widget, *mut c_void, *mut XEvent, *mut c_char)>, _1: *mut c_void) -> (),
- pub fn XtRemoveSignal (_1: c_ulong) -> (),
- pub fn XtRemoveTimeOut (_1: c_ulong) -> (),
- pub fn XtRemoveWorkProc (_1: c_ulong) -> (),
- pub fn XtReservePropertyAtom (_1: Widget) -> c_ulong,
- pub fn XtResizeWidget (_4: Widget, _3: c_ushort, _2: c_ushort, _1: c_ushort) -> (),
- pub fn XtResizeWindow (_1: Widget) -> (),
- pub fn XtResolvePathname (_8: *mut Display, _7: *const c_char, _6: *const c_char, _5: *const c_char, _4: *const c_char, _3: Substitution, _2: c_uint, _1: Option<unsafe extern "C" fn (*mut c_char) -> c_char>) -> *mut c_char,
- pub fn XtScreen (_1: Widget) -> *mut Screen,
- pub fn XtScreenDatabase (_1: *mut Screen) -> *mut _XrmHashBucketRec,
- pub fn XtScreenOfObject (_1: Widget) -> *mut Screen,
- pub fn XtSendSelectionRequest (_3: Widget, _2: c_ulong, _1: c_ulong) -> (),
- pub fn XtSessionGetToken (_1: Widget) -> XtCheckpointToken,
- pub fn XtSessionReturnToken (_1: XtCheckpointToken) -> (),
- pub fn XtSetErrorHandler (_1: Option<unsafe extern "C" fn (*mut c_char)>) -> (),
- pub fn XtSetErrorMsgHandler (_1: Option<unsafe extern "C" fn (*mut c_char, *mut c_char, *mut c_char, *mut c_char, *mut *mut c_char, *mut c_uint)>) -> (),
- pub fn XtSetEventDispatcher (_3: *mut Display, _2: c_int, _1: Option<unsafe extern "C" fn (*mut XEvent) -> c_char>) -> Option<unsafe extern "C" fn (*mut XEvent) -> c_char>,
- pub fn XtSetKeyboardFocus (_2: Widget, _1: Widget) -> (),
- pub fn XtSetKeyTranslator (_2: *mut Display, _1: Option<unsafe extern "C" fn (*mut Display, c_uchar, c_uint, *mut c_uint, *mut c_ulong)>) -> (),
- pub fn XtSetLanguageProc (_3: XtAppContext, _2: Option<unsafe extern "C" fn (*mut Display, *mut c_char, *mut c_void) -> *mut c_char>, _1: *mut c_void) -> Option<unsafe extern "C" fn (*mut Display, *mut c_char, *mut c_void) -> *mut c_char>,
- pub fn XtSetMappedWhenManaged (_2: Widget, _1: c_char) -> (),
- pub fn XtSetMultiClickTime (_2: *mut Display, _1: c_int) -> (),
- pub fn XtSetSelectionParameters (_6: Widget, _5: c_ulong, _4: c_ulong, _3: *mut c_void, _2: c_ulong, _1: c_int) -> (),
- pub fn XtSetSelectionTimeout (_1: c_ulong) -> (),
- pub fn XtSetSensitive (_2: Widget, _1: c_char) -> (),
- pub fn XtSetSubvalues (_5: *mut c_void, _4: *mut XtResource, _3: c_uint, _2: *mut Arg, _1: c_uint) -> (),
- pub fn XtSetTypeConverter (_7: *const c_char, _6: *const c_char, _5: Option<unsafe extern "C" fn (*mut Display, *mut XrmValue, *mut c_uint, *mut XrmValue, *mut XrmValue, *mut *mut c_void) -> c_char>, _4: XtConvertArgList, _3: c_uint, _2: c_int, _1: Option<unsafe extern "C" fn (XtAppContext, *mut XrmValue, *mut c_void, *mut XrmValue, *mut c_uint)>) -> (),
- pub fn XtSetValues (_3: Widget, _2: *mut Arg, _1: c_uint) -> (),
- pub fn XtSetWarningHandler (_1: Option<unsafe extern "C" fn (*mut c_char)>) -> (),
- pub fn XtSetWarningMsgHandler (_1: Option<unsafe extern "C" fn (*mut c_char, *mut c_char, *mut c_char, *mut c_char, *mut *mut c_char, *mut c_uint)>) -> (),
- pub fn XtSetWMColormapWindows (_3: Widget, _2: *mut Widget, _1: c_uint) -> (),
- pub fn XtStringConversionWarning (_2: *const c_char, _1: *const c_char) -> (),
- pub fn XtSuperclass (_1: Widget) -> WidgetClass,
- pub fn XtToolkitInitialize () -> (),
- pub fn XtToolkitThreadInitialize () -> c_char,
- pub fn XtTranslateCoords (_5: Widget, _4: c_short, _3: c_short, _2: *mut c_short, _1: *mut c_short) -> (),
- pub fn XtTranslateKey (_5: *mut Display, _4: c_uchar, _3: c_uint, _2: *mut c_uint, _1: *mut c_ulong) -> (),
- pub fn XtTranslateKeycode (_5: *mut Display, _4: c_uchar, _3: c_uint, _2: *mut c_uint, _1: *mut c_ulong) -> (),
- pub fn XtUngrabButton (_3: Widget, _2: c_uint, _1: c_uint) -> (),
- pub fn XtUngrabKey (_3: Widget, _2: c_uchar, _1: c_uint) -> (),
- pub fn XtUngrabKeyboard (_2: Widget, _1: c_ulong) -> (),
- pub fn XtUngrabPointer (_2: Widget, _1: c_ulong) -> (),
- pub fn XtUninstallTranslations (_1: Widget) -> (),
- pub fn XtUnmanageChild (_1: Widget) -> (),
- pub fn XtUnmanageChildren (_2: *mut Widget, _1: c_uint) -> (),
- pub fn XtUnmapWidget (_1: Widget) -> (),
- pub fn XtUnrealizeWidget (_1: Widget) -> (),
- pub fn XtUnregisterDrawable (_2: *mut Display, _1: c_ulong) -> (),
- pub fn XtWarning (_1: *const c_char) -> (),
- pub fn XtWarningMsg (_6: *const c_char, _5: *const c_char, _4: *const c_char, _3: *const c_char, _2: *mut *mut c_char, _1: *mut c_uint) -> (),
- pub fn XtWidgetToApplicationContext (_1: Widget) -> XtAppContext,
- pub fn XtWindow (_1: Widget) -> c_ulong,
- pub fn XtWindowOfObject (_1: Widget) -> c_ulong,
- pub fn XtWindowToWidget (_2: *mut Display, _1: c_ulong) -> Widget,
-variadic:
- pub fn XtAsprintf (_2: *mut *mut c_char, _1: *const c_char) -> c_uint,
- pub fn XtVaAppCreateShell (_4: *const c_char, _3: *const c_char, _2: WidgetClass, _1: *mut Display) -> Widget,
- pub fn XtVaAppInitialize (_7: *mut XtAppContext, _6: *const c_char, _5: XrmOptionDescList, _4: c_uint, _3: *mut c_int, _2: *mut *mut c_char, _1: *mut *mut c_char) -> Widget,
- pub fn XtVaCreateArgsList (_1: *mut c_void) -> *mut c_void,
- pub fn XtVaCreateManagedWidget (_3: *const c_char, _2: WidgetClass, _1: Widget) -> Widget,
- pub fn XtVaCreatePopupShell (_3: *const c_char, _2: WidgetClass, _1: Widget) -> Widget,
- pub fn XtVaCreateWidget (_3: *const c_char, _2: WidgetClass, _1: Widget) -> Widget,
- pub fn XtVaGetApplicationResources (_4: Widget, _3: *mut c_void, _2: *mut XtResource, _1: c_uint) -> (),
- pub fn XtVaGetSubresources (_6: Widget, _5: *mut c_void, _4: *const c_char, _3: *const c_char, _2: *mut XtResource, _1: c_uint) -> (),
- pub fn XtVaGetSubvalues (_3: *mut c_void, _2: *mut XtResource, _1: c_uint) -> (),
- pub fn XtVaGetValues (_1: Widget) -> (),
- pub fn XtVaOpenApplication (_8: *mut XtAppContext, _7: *const c_char, _6: XrmOptionDescList, _5: c_uint, _4: *mut c_int, _3: *mut *mut c_char, _2: *mut *mut c_char, _1: WidgetClass) -> Widget,
- pub fn XtVaSetSubvalues (_3: *mut c_void, _2: *mut XtResource, _1: c_uint) -> (),
- pub fn XtVaSetValues (_1: Widget) -> (),
-globals:
-}
-
-
-//
-// types
-//
-
-
-// TODO structs
-#[repr(C)] pub struct Arg;
-#[repr(C)] pub struct SubstitutionRec;
-#[repr(C)] pub struct _TranslationData;
-#[repr(C)] pub struct _WidgetClassRec;
-#[repr(C)] pub struct _WidgetRec;
-#[repr(C)] pub struct _XtActionsRec;
-#[repr(C)] pub struct _XtAppStruct;
-#[repr(C)] pub struct _XtCallbackRec;
-#[repr(C)] pub struct _XtCheckpointTokenRec;
-#[repr(C)] pub struct XtConvertArgRec;
-#[repr(C)] pub struct _XtResource;
-#[repr(C)] pub struct XtWidgetGeometry;
-
-// C enums
-pub type XtCallbackStatus = c_int;
-pub type XtGeometryResult = c_int;
-pub type XtGrabKind = c_int;
-pub type XtListPosition = c_int;
-
-#[allow(dead_code)]
-#[cfg(test)]
-#[repr(C)]
-enum TestEnum {
- Variant1,
- Variant2,
-}
-
-#[test]
-fn enum_size_test () {
- assert!(::std::mem::size_of::<TestEnum>() == ::std::mem::size_of::<c_int>());
-}
-
-// struct typedefs
-pub type ArgList = *mut Arg;
-pub type Substitution = *mut SubstitutionRec;
-pub type Widget = *mut _WidgetRec;
-pub type WidgetClass = *mut _WidgetClassRec;
-pub type XtAccelerators = *mut _TranslationData;
-pub type XtActionList = *mut _XtActionsRec;
-pub type XtActionsRec = _XtActionsRec;
-pub type XtAppContext = *mut _XtAppStruct;
-pub type XtCallbackList = *mut _XtCallbackRec;
-pub type XtCallbackRec = _XtCallbackRec;
-pub type XtCheckpointToken = *mut _XtCheckpointTokenRec;
-pub type XtCheckpointTokenRec = _XtCheckpointTokenRec;
-pub type XtConvertArgList = *mut XtConvertArgRec;
-pub type XtResource = _XtResource;
-pub type XtResourceList = *mut _XtResource;
-pub type XtTranslations = *mut _TranslationData;
deleted file mode 100644
--- a/third_party/rust/x11/src/xtest.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-// x11-rs: Rust bindings for X11 libraries
-// The X11 libraries are available under the MIT license.
-// These bindings are public domain.
-
-use std::os::raw::{
- c_int,
- c_uint,
- c_ulong,
-};
-
-use ::xinput::XDevice;
-use ::xlib::{
- Display,
- GC,
- Visual,
-};
-
-
-//
-// functions
-//
-
-
-x11_link! { Xf86vmode, xtst, ["libXtst.so.6", "libXtst.so"], 15,
- pub fn XTestCompareCurrentCursorWithWindow (_2: *mut Display, _1: c_ulong) -> c_int,
- pub fn XTestCompareCursorWithWindow (_3: *mut Display, _2: c_ulong, _1: c_ulong) -> c_int,
- pub fn XTestDiscard (_1: *mut Display) -> c_int,
- pub fn XTestFakeButtonEvent (_4: *mut Display, _3: c_uint, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XTestFakeDeviceButtonEvent (_7: *mut Display, _6: *mut XDevice, _5: c_uint, _4: c_int, _3: *mut c_int, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XTestFakeDeviceKeyEvent (_7: *mut Display, _6: *mut XDevice, _5: c_uint, _4: c_int, _3: *mut c_int, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XTestFakeDeviceMotionEvent (_7: *mut Display, _6: *mut XDevice, _5: c_int, _4: c_int, _3: *mut c_int, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XTestFakeKeyEvent (_4: *mut Display, _3: c_uint, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XTestFakeMotionEvent (_5: *mut Display, _4: c_int, _3: c_int, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XTestFakeProximityEvent (_6: *mut Display, _5: *mut XDevice, _4: c_int, _3: *mut c_int, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XTestFakeRelativeMotionEvent (_4: *mut Display, _3: c_int, _2: c_int, _1: c_ulong) -> c_int,
- pub fn XTestGrabControl (_2: *mut Display, _1: c_int) -> c_int,
- pub fn XTestQueryExtension (_5: *mut Display, _4: *mut c_int, _3: *mut c_int, _2: *mut c_int, _1: *mut c_int) -> c_int,
- pub fn XTestSetGContextOfGC (_2: GC, _1: c_ulong) -> (),
- pub fn XTestSetVisualIDOfVisual (_2: *mut Visual, _1: c_ulong) -> (),
-variadic:
-globals:
-}
--- a/toolkit/library/gtest/rust/Cargo.lock
+++ b/toolkit/library/gtest/rust/Cargo.lock
@@ -111,25 +111,16 @@ dependencies = [
]
[[package]]
name = "cfg-if"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
-name = "cgl"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "gleam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "clang-sys"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -244,21 +235,16 @@ name = "env_logger"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "error-chain"
-version = "0.7.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
name = "euclid"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -423,26 +409,16 @@ source = "registry+https://github.com/ru
name = "memchr"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "metadeps"
-version = "1.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "error-chain 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "mp4parse"
version = "0.7.1"
dependencies = [
"bitreader 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -496,54 +472,25 @@ source = "registry+https://github.com/ru
name = "num_cpus"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "offscreen_gl_context"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "core-foundation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gl_generator 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "x11 2.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "ordered-float"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "osmesa-sys"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "shared_library 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "owning_ref"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "parking_lot"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -786,25 +733,16 @@ name = "servo_url"
version = "0.0.1"
dependencies = [
"servo_rand 0.0.1",
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "shared_library"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "siphasher"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "smallvec"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -986,21 +924,16 @@ source = "registry+https://github.com/ru
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "toml"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
name = "unicode-bidi"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1036,25 +969,16 @@ name = "url"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "user32-sys"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "utf8-ranges"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "uuid"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1079,17 +1003,17 @@ source = "registry+https://github.com/ru
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "webrender"
-version = "0.25.0"
+version = "0.26.0"
dependencies = [
"app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bincode 1.0.0-alpha4 (registry+https://github.com/rust-lang/crates.io-index)",
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-text 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1097,70 +1021,59 @@ dependencies = [
"euclid 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"freetype 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gamma-lut 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
- "offscreen_gl_context 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_profiler 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"threadpool 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
- "webrender_traits 0.26.0",
+ "webrender_traits 0.27.0",
]
[[package]]
name = "webrender_bindings"
version = "0.1.0"
dependencies = [
"app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "webrender 0.25.0",
- "webrender_traits 0.26.0",
+ "webrender 0.26.0",
+ "webrender_traits 0.27.0",
]
[[package]]
name = "webrender_traits"
-version = "0.26.0"
+version = "0.27.0"
dependencies = [
"app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"dwrote 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "offscreen_gl_context 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "winapi"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
-name = "x11"
-version = "2.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
- "metadeps 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "xdg"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "xml-rs"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1178,30 +1091,28 @@ dependencies = [
"checksum bindgen 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "facc480c409c373db3c870e377ce223e5e07d979efc2604691dc6f583e8ded0f"
"checksum bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9bf6104718e80d7b26a68fdbacff3481cfc05df670821affc7e9cbc1884400c"
"checksum bit-vec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5b97c2c8e8bbb4251754f559df8af22fb264853c7d009084a576cdf12565089d"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"checksum bitreader 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "80b13e2ab064ff3aa0bdbf1eff533f9822dc37899821f5f98c67f263eab51707"
"checksum byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c40977b0ee6b9885c9013cd41d9feffdd22deb3bb4dc3a71d901cc7a77de18c8"
"checksum cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "393a5f0088efbe41f9d1fcd062f24e83c278608420e62109feb2c8abee07de7d"
"checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"
-"checksum cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "86765cb42c2a2c497e142af72517c1b4d7ae5bb2f25dfa77a5c69642f2342d89"
"checksum clang-sys 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f98f0715ff67f27ca6a2f8f0ffc2a56f8edbc7acd57489c29eadc3a15c4eafe"
"checksum clap 2.20.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7db281b0520e97fbd15cd615dcd8f8bcad0c26f5f7d5effe705f090f39e9a758"
"checksum core-foundation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f51ce3b8ebe311c56de14231eb57572c15abebd2d32b3bcb99bcdb9c101f5ac3"
"checksum core-foundation-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "41115a6aa5d3e1e5ef98148373f25971d1fad53818553f216495f9e67e90a624"
"checksum core-graphics 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ead017dcf77f503dc991f6b52de6084eeea60a94b0a652baa9bf88654a28e83f"
"checksum core-text 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0e9719616a10f717628e074744f8c55df7b450f7a34d29c196d14f4498aad05d"
"checksum cssparser 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "112b0e846ce6b441564c908a2e74d98a2c6f2cbe838b0f32d037d5bfb9e982ca"
"checksum cssparser-macros 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f0415de0bdbce823c0db204e00a62c8240fa2d3e04cd13ff7c6396e4446b95"
"checksum deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1614659040e711785ed8ea24219140654da1729f3ec8a47a9719d041112fe7bf"
"checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90"
"checksum dwrote 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74114b6b49d6731835da7a28a3642651451e315f7f9b9d04e907e65a45681796"
"checksum env_logger 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ed39959122ea027670b704fb70539f4286ddf4a49eefede23bf0b4b2a069ec03"
-"checksum error-chain 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "318cb3c71ee4cdea69fdc9e15c173b245ed6063e1709029e8fd32525a881120f"
"checksum euclid 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34559b159306de36203986eff799f83ef2bfb301a29fad333883f1a74a4cc6b0"
"checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344"
"checksum freetype 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fde23272c687e4570aefec06cb71174ec0f5284b725deac4e77ba2665d635faf"
"checksum gamma-lut 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8728df930776135895cbb25cbdd17791cde7d4285d53cf58fe6ee2e6412455"
"checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518"
"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
"checksum gl_generator 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1d8edc81c5ae84605a62f5dac661a2313003b26d59839f81d47d46cf0f16a55"
"checksum gleam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2958396a0a358d2de747b31329f5ae2229070602b0f51edd5d682f92c307c332"
@@ -1212,24 +1123,21 @@ dependencies = [
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
"checksum khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09c9d3760673c427d46f91a0350f0a84a52e6bc5a84adf26dc610b6c52436630"
"checksum lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6abe0ee2e758cd6bc8a2cd56726359007748fbf4128da998b65d0b70f881e19b"
"checksum libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "684f330624d8c3784fb9558ca46c4ce488073a8d22450415c5eb4f4cfb0d11b5"
"checksum libloading 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fd1835a714c1f67ba073a493493c23686a480e2614e208c921834808b1f19d8f"
"checksum log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054"
"checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1"
"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
-"checksum metadeps 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829fffe7ea1d747e23f64be972991bc516b2f1ac2ae4a3b33d8bea150c410151"
"checksum nom 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b8c256fd9471521bcb84c3cdba98921497f1a331cbc15b8030fc63b82050ce"
"checksum num-integer 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "21e4df1098d1d797d27ef0c69c178c3fab64941559b290fcae198e0825c9c8b5"
"checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99"
"checksum num_cpus 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a225d1e2717567599c24f88e49f00856c6e825a12125181ee42c4257e3688d39"
-"checksum offscreen_gl_context 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cebfb377484b8fe608acabed968bc4108d44dcfa22318c2e8614eaffd8c5c5f8"
"checksum ordered-float 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "da12c96037889ae0be29dd2bdd260e5a62a7df24e6466d5a15bb8131c1c200a8"
-"checksum osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b"
"checksum owning_ref 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9d52571ddcb42e9c900c901a18d8d67e393df723fcd51dd59c5b1a85d0acb6cc"
"checksum parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "fa12d706797d42551663426a45e2db2e0364bd1dbf6aeada87e89c5f981f43e9"
"checksum parking_lot_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "56a19dcbb5d1e32b6cccb8a9aa1fc2a38418c8699652e735e2bf391a3dc0aa16"
"checksum pdqsort 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ceca1642c89148ca05611cc775a0c383abef355fc4907c4e95f49f7b09d6287c"
"checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc"
"checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f"
"checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03"
"checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2"
@@ -1244,17 +1152,16 @@ dependencies = [
"checksum regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4278c17d0f6d62dfef0ab00028feb45bd7d2102843f80763474eeb1be8a10c01"
"checksum regex-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9191b1f57603095f105d317e375d19b1c9c5c3185ea9633a99a6dcbed04457"
"checksum rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "237546c689f20bb44980270c73c3b9edd0891c1be49cc1274406134a66d3957b"
"checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7"
"checksum serde 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)" = "05a67b8a53f885f4b6e3ed183806035819f9862474e747fe4488a6d63bcbfcb7"
"checksum serde_codegen_internals 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d52006899f910528a10631e5b727973fe668f3228109d1707ccf5bad5490b6e"
"checksum serde_derive 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f15ea24bd037b2d64646b4d934fa99c649be66e3f7b29fb595a5543b212b1452"
"checksum serde_json 0.9.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6501ac6f8b74f9b1033f7ddf79a08edfa0f58d6f8e3190cb8dc97736afa257a8"
-"checksum shared_library 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fb04126b6fcfd2710fb5b6d18f4207b6c535f2850a7e1a43bcd526d44f30a79a"
"checksum siphasher 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ffc669b726f2bc9a3bcff66e5e23b56ba6bf70e22a34c3d7b6d0b3450b65b84"
"checksum smallvec 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dca03f2f42500a9ef8ac0d16183dff8bed40e3dcf98f9d4147928548d5c4236e"
"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
"checksum syn 0.11.8 (registry+https://github.com/rust-lang/crates.io-index)" = "37c279fb816210c9bb28b2c292664581e7b87b4561e86b94df462664d8620bb8"
"checksum synom 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "27e31aa4b09b9f4cb12dff3c30ba503e17b1a624413d764d32dab76e3920e5bc"
"checksum syntex 0.54.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb3f52553a966675982404dc34028291b347e0c9a9c0b0b34f2da6be8a0443f8"
"checksum syntex_errors 0.54.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dee2f6e49c075f71332bb775219d5982bee6732d26227fa1ae1b53cdb12f5cc5"
"checksum syntex_pos 0.54.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8df3921c7945dfb9ffc53aa35adb2cf4313b5ab5f079c3619b3d4eb82a0efc2b"
@@ -1262,27 +1169,24 @@ dependencies = [
"checksum target_build_utils 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f42dc058080c19c6a58bdd1bf962904ee4f5ef1fe2a81b529f31dacc750c679f"
"checksum term 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d168af3930b369cfe245132550579d47dfd873d69470755a19c2c6568dbbd989"
"checksum term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "07b6c1ac5b3fffd75073276bca1ceed01f67a28537097a2a9539e116e50fb21a"
"checksum thread-id 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4437c97558c70d129e40629a5b385b3fb1ffac301e63941335e4d354081ec14a"
"checksum thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c85048c6260d17cf486ceae3282d9fb6b90be220bf5b28c400f5485ffc29f0c7"
"checksum thread_profiler 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf947d192a9be60ef5131cc7a4648886ba89d712f16700ebbf80c8a69d05d48f"
"checksum threadpool 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "59f6d3eff89920113dac9db44dde461d71d01e88a5b57b258a0466c32b5d7fe1"
"checksum time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "211b63c112206356ef1ff9b19355f43740fc3f85960c598a93d3a3d3ba7beade"
-"checksum toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "736b60249cb25337bc196faa43ee12c705e426f3d55c214d73a4e7be06f92cb4"
"checksum unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a078ebdd62c0e71a709c3d53d2af693fe09fe93fbff8344aebe289b78f9032"
"checksum unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e28fa37426fceeb5cf8f41ee273faa7c82c47dc8fba5853402841e665fcd86ff"
"checksum unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18127285758f0e2c6cf325bb3f3d138a12fee27de4f23e146cd6a179f26c2cf3"
"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f"
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
"checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91"
"checksum url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5ba8a749fb4479b043733416c244fa9d1d3af3d7c23804944651c8a448cb87e"
-"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47"
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
"checksum uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7cfec50b0842181ba6e713151b72f4ec84a6a7e2c9c8a8a3ffc37bb1cd16b231"
"checksum vec_map 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cac5efe5cb0fa14ec2f84f83c701c562ee63f6dcc680861b21d65c682adfb05f"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
-"checksum x11 2.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "124eb405bf0262a54e1a982d4ffe4cd1c24261bdb306e49996e2ce7d492284a8"
"checksum xdg 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "77b831a5ba77110f438f0ac5583aafeb087f70432998ba6b7dcb1d32185db453"
"checksum xml-rs 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7ec6c39eaa68382c8e31e35239402c0a9489d4141a8ceb0c716099a0b515b562"
--- a/toolkit/library/rust/Cargo.lock
+++ b/toolkit/library/rust/Cargo.lock
@@ -109,25 +109,16 @@ dependencies = [
]
[[package]]
name = "cfg-if"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
-name = "cgl"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "gleam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "clang-sys"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -242,21 +233,16 @@ name = "env_logger"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "error-chain"
-version = "0.7.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
name = "euclid"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -421,26 +407,16 @@ source = "registry+https://github.com/ru
name = "memchr"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "metadeps"
-version = "1.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "error-chain 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "mp4parse"
version = "0.7.1"
dependencies = [
"bitreader 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -483,54 +459,25 @@ source = "registry+https://github.com/ru
name = "num_cpus"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "offscreen_gl_context"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "core-foundation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "gl_generator 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "gleam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "x11 2.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "ordered-float"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "osmesa-sys"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "shared_library 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "owning_ref"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "parking_lot"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -773,25 +720,16 @@ name = "servo_url"
version = "0.0.1"
dependencies = [
"servo_rand 0.0.1",
"url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "shared_library"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "siphasher"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "smallvec"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -973,21 +911,16 @@ source = "registry+https://github.com/ru
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "toml"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
name = "unicode-bidi"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1023,25 +956,16 @@ name = "url"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
-name = "user32-sys"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "utf8-ranges"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "uuid"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1066,17 +990,17 @@ source = "registry+https://github.com/ru
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "webrender"
-version = "0.25.0"
+version = "0.26.0"
dependencies = [
"app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bincode 1.0.0-alpha4 (registry+https://github.com/rust-lang/crates.io-index)",
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-text 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1084,70 +1008,59 @@ dependencies = [
"euclid 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"freetype 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gamma-lut 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
- "offscreen_gl_context 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"thread_profiler 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"threadpool 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
- "webrender_traits 0.26.0",
+ "webrender_traits 0.27.0",
]
[[package]]
name = "webrender_bindings"
version = "0.1.0"
dependencies = [
"app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "webrender 0.25.0",
- "webrender_traits 0.26.0",
+ "webrender 0.26.0",
+ "webrender_traits 0.27.0",
]
[[package]]
name = "webrender_traits"
-version = "0.26.0"
+version = "0.27.0"
dependencies = [
"app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"dwrote 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "offscreen_gl_context 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "winapi"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
-name = "x11"
-version = "2.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
- "metadeps 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "xdg"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "xml-rs"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1165,30 +1078,28 @@ dependencies = [
"checksum bindgen 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "facc480c409c373db3c870e377ce223e5e07d979efc2604691dc6f583e8ded0f"
"checksum bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9bf6104718e80d7b26a68fdbacff3481cfc05df670821affc7e9cbc1884400c"
"checksum bit-vec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "5b97c2c8e8bbb4251754f559df8af22fb264853c7d009084a576cdf12565089d"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"checksum bitreader 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "80b13e2ab064ff3aa0bdbf1eff533f9822dc37899821f5f98c67f263eab51707"
"checksum byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c40977b0ee6b9885c9013cd41d9feffdd22deb3bb4dc3a71d901cc7a77de18c8"
"checksum cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "393a5f0088efbe41f9d1fcd062f24e83c278608420e62109feb2c8abee07de7d"
"checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c"
-"checksum cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "86765cb42c2a2c497e142af72517c1b4d7ae5bb2f25dfa77a5c69642f2342d89"
"checksum clang-sys 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f98f0715ff67f27ca6a2f8f0ffc2a56f8edbc7acd57489c29eadc3a15c4eafe"
"checksum clap 2.20.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7db281b0520e97fbd15cd615dcd8f8bcad0c26f5f7d5effe705f090f39e9a758"
"checksum core-foundation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f51ce3b8ebe311c56de14231eb57572c15abebd2d32b3bcb99bcdb9c101f5ac3"
"checksum core-foundation-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "41115a6aa5d3e1e5ef98148373f25971d1fad53818553f216495f9e67e90a624"
"checksum core-graphics 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ead017dcf77f503dc991f6b52de6084eeea60a94b0a652baa9bf88654a28e83f"
"checksum core-text 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0e9719616a10f717628e074744f8c55df7b450f7a34d29c196d14f4498aad05d"
"checksum cssparser 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "112b0e846ce6b441564c908a2e74d98a2c6f2cbe838b0f32d037d5bfb9e982ca"
"checksum cssparser-macros 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f0415de0bdbce823c0db204e00a62c8240fa2d3e04cd13ff7c6396e4446b95"
"checksum deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1614659040e711785ed8ea24219140654da1729f3ec8a47a9719d041112fe7bf"
"checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90"
"checksum dwrote 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74114b6b49d6731835da7a28a3642651451e315f7f9b9d04e907e65a45681796"
"checksum env_logger 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ed39959122ea027670b704fb70539f4286ddf4a49eefede23bf0b4b2a069ec03"
-"checksum error-chain 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "318cb3c71ee4cdea69fdc9e15c173b245ed6063e1709029e8fd32525a881120f"
"checksum euclid 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34559b159306de36203986eff799f83ef2bfb301a29fad333883f1a74a4cc6b0"
"checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344"
"checksum freetype 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fde23272c687e4570aefec06cb71174ec0f5284b725deac4e77ba2665d635faf"
"checksum gamma-lut 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8728df930776135895cbb25cbdd17791cde7d4285d53cf58fe6ee2e6412455"
"checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518"
"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
"checksum gl_generator 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1d8edc81c5ae84605a62f5dac661a2313003b26d59839f81d47d46cf0f16a55"
"checksum gleam 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2958396a0a358d2de747b31329f5ae2229070602b0f51edd5d682f92c307c332"
@@ -1199,24 +1110,21 @@ dependencies = [
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
"checksum khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09c9d3760673c427d46f91a0350f0a84a52e6bc5a84adf26dc610b6c52436630"
"checksum lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6abe0ee2e758cd6bc8a2cd56726359007748fbf4128da998b65d0b70f881e19b"
"checksum libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "684f330624d8c3784fb9558ca46c4ce488073a8d22450415c5eb4f4cfb0d11b5"
"checksum libloading 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fd1835a714c1f67ba073a493493c23686a480e2614e208c921834808b1f19d8f"
"checksum log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054"
"checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1"
"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
-"checksum metadeps 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829fffe7ea1d747e23f64be972991bc516b2f1ac2ae4a3b33d8bea150c410151"
"checksum nom 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b8c256fd9471521bcb84c3cdba98921497f1a331cbc15b8030fc63b82050ce"
"checksum num-integer 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "21e4df1098d1d797d27ef0c69c178c3fab64941559b290fcae198e0825c9c8b5"
"checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99"
"checksum num_cpus 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a225d1e2717567599c24f88e49f00856c6e825a12125181ee42c4257e3688d39"
-"checksum offscreen_gl_context 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cebfb377484b8fe608acabed968bc4108d44dcfa22318c2e8614eaffd8c5c5f8"
"checksum ordered-float 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "da12c96037889ae0be29dd2bdd260e5a62a7df24e6466d5a15bb8131c1c200a8"
-"checksum osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88cfece6e95d2e717e0872a7f53a8684712ad13822a7979bc760b9c77ec0013b"
"checksum owning_ref 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9d52571ddcb42e9c900c901a18d8d67e393df723fcd51dd59c5b1a85d0acb6cc"
"checksum parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "fa12d706797d42551663426a45e2db2e0364bd1dbf6aeada87e89c5f981f43e9"
"checksum parking_lot_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "56a19dcbb5d1e32b6cccb8a9aa1fc2a38418c8699652e735e2bf391a3dc0aa16"
"checksum pdqsort 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ceca1642c89148ca05611cc775a0c383abef355fc4907c4e95f49f7b09d6287c"
"checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc"
"checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f"
"checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03"
"checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2"
@@ -1231,17 +1139,16 @@ dependencies = [
"checksum regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4278c17d0f6d62dfef0ab00028feb45bd7d2102843f80763474eeb1be8a10c01"
"checksum regex-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9191b1f57603095f105d317e375d19b1c9c5c3185ea9633a99a6dcbed04457"
"checksum rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "237546c689f20bb44980270c73c3b9edd0891c1be49cc1274406134a66d3957b"
"checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7"
"checksum serde 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)" = "05a67b8a53f885f4b6e3ed183806035819f9862474e747fe4488a6d63bcbfcb7"
"checksum serde_codegen_internals 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d52006899f910528a10631e5b727973fe668f3228109d1707ccf5bad5490b6e"
"checksum serde_derive 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f15ea24bd037b2d64646b4d934fa99c649be66e3f7b29fb595a5543b212b1452"
"checksum serde_json 0.9.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6501ac6f8b74f9b1033f7ddf79a08edfa0f58d6f8e3190cb8dc97736afa257a8"
-"checksum shared_library 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fb04126b6fcfd2710fb5b6d18f4207b6c535f2850a7e1a43bcd526d44f30a79a"
"checksum siphasher 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ffc669b726f2bc9a3bcff66e5e23b56ba6bf70e22a34c3d7b6d0b3450b65b84"
"checksum smallvec 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dca03f2f42500a9ef8ac0d16183dff8bed40e3dcf98f9d4147928548d5c4236e"
"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
"checksum syn 0.11.8 (registry+https://github.com/rust-lang/crates.io-index)" = "37c279fb816210c9bb28b2c292664581e7b87b4561e86b94df462664d8620bb8"
"checksum synom 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "27e31aa4b09b9f4cb12dff3c30ba503e17b1a624413d764d32dab76e3920e5bc"
"checksum syntex 0.54.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb3f52553a966675982404dc34028291b347e0c9a9c0b0b34f2da6be8a0443f8"
"checksum syntex_errors 0.54.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dee2f6e49c075f71332bb775219d5982bee6732d26227fa1ae1b53cdb12f5cc5"
"checksum syntex_pos 0.54.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8df3921c7945dfb9ffc53aa35adb2cf4313b5ab5f079c3619b3d4eb82a0efc2b"
@@ -1249,27 +1156,24 @@ dependencies = [
"checksum target_build_utils 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f42dc058080c19c6a58bdd1bf962904ee4f5ef1fe2a81b529f31dacc750c679f"
"checksum term 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d168af3930b369cfe245132550579d47dfd873d69470755a19c2c6568dbbd989"
"checksum term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "07b6c1ac5b3fffd75073276bca1ceed01f67a28537097a2a9539e116e50fb21a"
"checksum thread-id 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4437c97558c70d129e40629a5b385b3fb1ffac301e63941335e4d354081ec14a"
"checksum thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c85048c6260d17cf486ceae3282d9fb6b90be220bf5b28c400f5485ffc29f0c7"
"checksum thread_profiler 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf947d192a9be60ef5131cc7a4648886ba89d712f16700ebbf80c8a69d05d48f"
"checksum threadpool 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "59f6d3eff89920113dac9db44dde461d71d01e88a5b57b258a0466c32b5d7fe1"
"checksum time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "211b63c112206356ef1ff9b19355f43740fc3f85960c598a93d3a3d3ba7beade"
-"checksum toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "736b60249cb25337bc196faa43ee12c705e426f3d55c214d73a4e7be06f92cb4"
"checksum unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a078ebdd62c0e71a709c3d53d2af693fe09fe93fbff8344aebe289b78f9032"
"checksum unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e28fa37426fceeb5cf8f41ee273faa7c82c47dc8fba5853402841e665fcd86ff"
"checksum unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18127285758f0e2c6cf325bb3f3d138a12fee27de4f23e146cd6a179f26c2cf3"
"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f"
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
"checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91"
"checksum url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5ba8a749fb4479b043733416c244fa9d1d3af3d7c23804944651c8a448cb87e"
-"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47"
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
"checksum uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7cfec50b0842181ba6e713151b72f4ec84a6a7e2c9c8a8a3ffc37bb1cd16b231"
"checksum vec_map 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cac5efe5cb0fa14ec2f84f83c701c562ee63f6dcc680861b21d65c682adfb05f"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
-"checksum x11 2.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "124eb405bf0262a54e1a982d4ffe4cd1c24261bdb306e49996e2ce7d492284a8"
"checksum xdg 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "77b831a5ba77110f438f0ac5583aafeb087f70432998ba6b7dcb1d32185db453"
"checksum xml-rs 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7ec6c39eaa68382c8e31e35239402c0a9489d4141a8ceb0c716099a0b515b562"