1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
// Generated automatically from xc_misc.xml by rs_client.py version 0.9.0.
// Do not edit!


use ffi::base::*;

use libc::{c_char, c_int, c_uint, c_void};
use std;


pub const XCB_XC_MISC_MAJOR_VERSION: u32 = 1;
pub const XCB_XC_MISC_MINOR_VERSION: u32 = 1;

pub const XCB_XC_MISC_GET_VERSION: u8 = 0;

#[repr(C)]
pub struct xcb_xc_misc_get_version_request_t {
    pub major_opcode:         u8,
    pub minor_opcode:         u8,
    pub length:               u16,
    pub client_major_version: u16,
    pub client_minor_version: u16,
}

impl Copy for xcb_xc_misc_get_version_request_t {}
impl Clone for xcb_xc_misc_get_version_request_t {
    fn clone(&self) -> xcb_xc_misc_get_version_request_t { *self }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct xcb_xc_misc_get_version_cookie_t {
    pub(crate) sequence: c_uint
}

#[repr(C)]
pub struct xcb_xc_misc_get_version_reply_t {
    pub response_type:        u8,
    pub pad0:                 u8,
    pub sequence:             u16,
    pub length:               u32,
    pub server_major_version: u16,
    pub server_minor_version: u16,
}

impl Copy for xcb_xc_misc_get_version_reply_t {}
impl Clone for xcb_xc_misc_get_version_reply_t {
    fn clone(&self) -> xcb_xc_misc_get_version_reply_t { *self }
}

pub const XCB_XC_MISC_GET_XID_RANGE: u8 = 1;

#[repr(C)]
pub struct xcb_xc_misc_get_xid_range_request_t {
    pub major_opcode: u8,
    pub minor_opcode: u8,
    pub length:       u16,
}

impl Copy for xcb_xc_misc_get_xid_range_request_t {}
impl Clone for xcb_xc_misc_get_xid_range_request_t {
    fn clone(&self) -> xcb_xc_misc_get_xid_range_request_t { *self }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct xcb_xc_misc_get_xid_range_cookie_t {
    pub(crate) sequence: c_uint
}

#[repr(C)]
pub struct xcb_xc_misc_get_xid_range_reply_t {
    pub response_type: u8,
    pub pad0:          u8,
    pub sequence:      u16,
    pub length:        u32,
    pub start_id:      u32,
    pub count:         u32,
}

impl Copy for xcb_xc_misc_get_xid_range_reply_t {}
impl Clone for xcb_xc_misc_get_xid_range_reply_t {
    fn clone(&self) -> xcb_xc_misc_get_xid_range_reply_t { *self }
}

pub const XCB_XC_MISC_GET_XID_LIST: u8 = 2;

#[repr(C)]
pub struct xcb_xc_misc_get_xid_list_request_t {
    pub major_opcode: u8,
    pub minor_opcode: u8,
    pub length:       u16,
    pub count:        u32,
}

impl Copy for xcb_xc_misc_get_xid_list_request_t {}
impl Clone for xcb_xc_misc_get_xid_list_request_t {
    fn clone(&self) -> xcb_xc_misc_get_xid_list_request_t { *self }
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct xcb_xc_misc_get_xid_list_cookie_t {
    pub(crate) sequence: c_uint
}

#[repr(C)]
pub struct xcb_xc_misc_get_xid_list_reply_t {
    pub response_type: u8,
    pub pad0:          u8,
    pub sequence:      u16,
    pub length:        u32,
    pub ids_len:       u32,
    pub pad1:          [u8; 20],
}


#[link(name="xcb")]
extern {

    pub static mut xcb_xc_misc_id: xcb_extension_t;

    /// the returned value must be freed by the caller using libc::free().
    pub fn xcb_xc_misc_get_version_reply (c:      *mut xcb_connection_t,
                                          cookie: xcb_xc_misc_get_version_cookie_t,
                                          error:  *mut *mut xcb_generic_error_t)
            -> *mut xcb_xc_misc_get_version_reply_t;

    pub fn xcb_xc_misc_get_version (c:                    *mut xcb_connection_t,
                                    client_major_version: u16,
                                    client_minor_version: u16)
            -> xcb_xc_misc_get_version_cookie_t;

    pub fn xcb_xc_misc_get_version_unchecked (c:                    *mut xcb_connection_t,
                                              client_major_version: u16,
                                              client_minor_version: u16)
            -> xcb_xc_misc_get_version_cookie_t;

    /// the returned value must be freed by the caller using libc::free().
    pub fn xcb_xc_misc_get_xid_range_reply (c:      *mut xcb_connection_t,
                                            cookie: xcb_xc_misc_get_xid_range_cookie_t,
                                            error:  *mut *mut xcb_generic_error_t)
            -> *mut xcb_xc_misc_get_xid_range_reply_t;

    pub fn xcb_xc_misc_get_xid_range (c: *mut xcb_connection_t)
            -> xcb_xc_misc_get_xid_range_cookie_t;

    pub fn xcb_xc_misc_get_xid_range_unchecked (c: *mut xcb_connection_t)
            -> xcb_xc_misc_get_xid_range_cookie_t;

    pub fn xcb_xc_misc_get_xid_list_ids (R: *const xcb_xc_misc_get_xid_list_reply_t)
            -> *mut u32;

    pub fn xcb_xc_misc_get_xid_list_ids_length (R: *const xcb_xc_misc_get_xid_list_reply_t)
            -> c_int;

    pub fn xcb_xc_misc_get_xid_list_ids_end (R: *const xcb_xc_misc_get_xid_list_reply_t)
            -> xcb_generic_iterator_t;

    /// the returned value must be freed by the caller using libc::free().
    pub fn xcb_xc_misc_get_xid_list_reply (c:      *mut xcb_connection_t,
                                           cookie: xcb_xc_misc_get_xid_list_cookie_t,
                                           error:  *mut *mut xcb_generic_error_t)
            -> *mut xcb_xc_misc_get_xid_list_reply_t;

    pub fn xcb_xc_misc_get_xid_list (c:     *mut xcb_connection_t,
                                     count: u32)
            -> xcb_xc_misc_get_xid_list_cookie_t;

    pub fn xcb_xc_misc_get_xid_list_unchecked (c:     *mut xcb_connection_t,
                                               count: u32)
            -> xcb_xc_misc_get_xid_list_cookie_t;

} // extern