├── Cargo.toml ├── awesomium-sys ├── Cargo.toml ├── build.rs └── src │ └── lib.rs └── src └── lib.rs /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "awesomium" 3 | version = "0.0.1" 4 | 5 | [dependencies] 6 | awesomium-sys = { path = "./awesomium-sys" } 7 | 8 | -------------------------------------------------------------------------------- /awesomium-sys/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "awesomium-sys" 3 | version = "0.0.1" 4 | build = "build.rs" 5 | -------------------------------------------------------------------------------- /awesomium-sys/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | println!("cargo:rustc-link-lib=awesomium-1.6.5"); 3 | } 4 | -------------------------------------------------------------------------------- /awesomium-sys/src/lib.rs: -------------------------------------------------------------------------------- 1 | /* automatically generated by rust-bindgen */ 2 | 3 | #![allow(dead_code, 4 | non_camel_case_types, 5 | non_upper_case_globals, 6 | non_snake_case)] 7 | pub type size_t = usize; 8 | pub type wchar_t = ::std::os::raw::c_int; 9 | pub type __u_char = ::std::os::raw::c_uchar; 10 | pub type __u_short = ::std::os::raw::c_ushort; 11 | pub type __u_int = ::std::os::raw::c_uint; 12 | pub type __u_long = ::std::os::raw::c_ulong; 13 | pub type __int8_t = ::std::os::raw::c_char; 14 | pub type __uint8_t = ::std::os::raw::c_uchar; 15 | pub type __int16_t = ::std::os::raw::c_short; 16 | pub type __uint16_t = ::std::os::raw::c_ushort; 17 | pub type __int32_t = ::std::os::raw::c_int; 18 | pub type __uint32_t = ::std::os::raw::c_uint; 19 | pub type __int64_t = ::std::os::raw::c_long; 20 | pub type __uint64_t = ::std::os::raw::c_ulong; 21 | pub type __quad_t = ::std::os::raw::c_long; 22 | pub type __u_quad_t = ::std::os::raw::c_ulong; 23 | pub type __dev_t = ::std::os::raw::c_ulong; 24 | pub type __uid_t = ::std::os::raw::c_uint; 25 | pub type __gid_t = ::std::os::raw::c_uint; 26 | pub type __ino_t = ::std::os::raw::c_ulong; 27 | pub type __ino64_t = ::std::os::raw::c_ulong; 28 | pub type __mode_t = ::std::os::raw::c_uint; 29 | pub type __nlink_t = ::std::os::raw::c_ulong; 30 | pub type __off_t = ::std::os::raw::c_long; 31 | pub type __off64_t = ::std::os::raw::c_long; 32 | pub type __pid_t = ::std::os::raw::c_int; 33 | #[repr(C)] 34 | #[derive(Copy, Clone)] 35 | #[derive(Debug)] 36 | pub struct __fsid_t { 37 | pub __val: [::std::os::raw::c_int; 2usize], 38 | } 39 | impl ::std::default::Default for __fsid_t { 40 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 41 | } 42 | pub type __clock_t = ::std::os::raw::c_long; 43 | pub type __rlim_t = ::std::os::raw::c_ulong; 44 | pub type __rlim64_t = ::std::os::raw::c_ulong; 45 | pub type __id_t = ::std::os::raw::c_uint; 46 | pub type __time_t = ::std::os::raw::c_long; 47 | pub type __useconds_t = ::std::os::raw::c_uint; 48 | pub type __suseconds_t = ::std::os::raw::c_long; 49 | pub type __daddr_t = ::std::os::raw::c_int; 50 | pub type __key_t = ::std::os::raw::c_int; 51 | pub type __clockid_t = ::std::os::raw::c_int; 52 | pub type __timer_t = *mut ::std::os::raw::c_void; 53 | pub type __blksize_t = ::std::os::raw::c_long; 54 | pub type __blkcnt_t = ::std::os::raw::c_long; 55 | pub type __blkcnt64_t = ::std::os::raw::c_long; 56 | pub type __fsblkcnt_t = ::std::os::raw::c_ulong; 57 | pub type __fsblkcnt64_t = ::std::os::raw::c_ulong; 58 | pub type __fsfilcnt_t = ::std::os::raw::c_ulong; 59 | pub type __fsfilcnt64_t = ::std::os::raw::c_ulong; 60 | pub type __fsword_t = ::std::os::raw::c_long; 61 | pub type __ssize_t = ::std::os::raw::c_long; 62 | pub type __syscall_slong_t = ::std::os::raw::c_long; 63 | pub type __syscall_ulong_t = ::std::os::raw::c_ulong; 64 | pub type __loff_t = __off64_t; 65 | pub type __qaddr_t = *mut __quad_t; 66 | pub type __caddr_t = *mut ::std::os::raw::c_char; 67 | pub type __intptr_t = ::std::os::raw::c_long; 68 | pub type __socklen_t = ::std::os::raw::c_uint; 69 | #[repr(C)] 70 | #[derive(Copy, Clone)] 71 | #[derive(Debug)] 72 | pub struct wait { 73 | pub _bindgen_data_: [u32; 1usize], 74 | } 75 | impl wait { 76 | pub unsafe fn w_status(&mut self) -> *mut ::std::os::raw::c_int { 77 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 78 | ::std::mem::transmute(raw.offset(0)) 79 | } 80 | pub unsafe fn __wait_terminated(&mut self) -> *mut Struct_Unnamed1 { 81 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 82 | ::std::mem::transmute(raw.offset(0)) 83 | } 84 | pub unsafe fn __wait_stopped(&mut self) -> *mut Struct_Unnamed2 { 85 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 86 | ::std::mem::transmute(raw.offset(0)) 87 | } 88 | } 89 | impl ::std::default::Default for wait { 90 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 91 | } 92 | #[repr(C)] 93 | #[derive(Copy, Clone)] 94 | #[derive(Debug)] 95 | pub struct Struct_Unnamed1 { 96 | pub _bindgen_bitfield_1_: ::std::os::raw::c_uint, 97 | } 98 | impl ::std::default::Default for Struct_Unnamed1 { 99 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 100 | } 101 | #[repr(C)] 102 | #[derive(Copy, Clone)] 103 | #[derive(Debug)] 104 | pub struct Struct_Unnamed2 { 105 | pub _bindgen_bitfield_1_: ::std::os::raw::c_uint, 106 | } 107 | impl ::std::default::Default for Struct_Unnamed2 { 108 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 109 | } 110 | #[repr(C)] 111 | #[derive(Copy, Clone)] 112 | #[derive(Debug)] 113 | pub struct __WAIT_STATUS { 114 | pub _bindgen_data_: [u64; 1usize], 115 | } 116 | impl __WAIT_STATUS { 117 | pub unsafe fn __uptr(&mut self) -> *mut *mut wait { 118 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 119 | ::std::mem::transmute(raw.offset(0)) 120 | } 121 | pub unsafe fn __iptr(&mut self) -> *mut *mut ::std::os::raw::c_int { 122 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 123 | ::std::mem::transmute(raw.offset(0)) 124 | } 125 | } 126 | impl ::std::default::Default for __WAIT_STATUS { 127 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 128 | } 129 | #[repr(C)] 130 | #[derive(Copy, Clone)] 131 | #[derive(Debug)] 132 | pub struct div_t { 133 | pub quot: ::std::os::raw::c_int, 134 | pub rem: ::std::os::raw::c_int, 135 | } 136 | impl ::std::default::Default for div_t { 137 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 138 | } 139 | #[repr(C)] 140 | #[derive(Copy, Clone)] 141 | #[derive(Debug)] 142 | pub struct ldiv_t { 143 | pub quot: ::std::os::raw::c_long, 144 | pub rem: ::std::os::raw::c_long, 145 | } 146 | impl ::std::default::Default for ldiv_t { 147 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 148 | } 149 | #[repr(C)] 150 | #[derive(Copy, Clone)] 151 | #[derive(Debug)] 152 | pub struct lldiv_t { 153 | pub quot: ::std::os::raw::c_longlong, 154 | pub rem: ::std::os::raw::c_longlong, 155 | } 156 | impl ::std::default::Default for lldiv_t { 157 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 158 | } 159 | pub type u_char = __u_char; 160 | pub type u_short = __u_short; 161 | pub type u_int = __u_int; 162 | pub type u_long = __u_long; 163 | pub type quad_t = __quad_t; 164 | pub type u_quad_t = __u_quad_t; 165 | pub type fsid_t = __fsid_t; 166 | pub type loff_t = __loff_t; 167 | pub type ino_t = __ino_t; 168 | pub type dev_t = __dev_t; 169 | pub type gid_t = __gid_t; 170 | pub type mode_t = __mode_t; 171 | pub type nlink_t = __nlink_t; 172 | pub type uid_t = __uid_t; 173 | pub type off_t = __off_t; 174 | pub type pid_t = __pid_t; 175 | pub type id_t = __id_t; 176 | pub type ssize_t = isize; 177 | pub type daddr_t = __daddr_t; 178 | pub type caddr_t = __caddr_t; 179 | pub type key_t = __key_t; 180 | pub type clock_t = __clock_t; 181 | pub type time_t = __time_t; 182 | pub type clockid_t = __clockid_t; 183 | pub type timer_t = __timer_t; 184 | pub type ulong = ::std::os::raw::c_ulong; 185 | pub type ushort = ::std::os::raw::c_ushort; 186 | pub type uint_ = ::std::os::raw::c_uint; 187 | pub type int8_t = i8; 188 | pub type int16_t = i16; 189 | pub type int32_t = i32; 190 | pub type int64_t = i64; 191 | pub type u_int8_t = ::std::os::raw::c_uchar; 192 | pub type u_int16_t = ::std::os::raw::c_ushort; 193 | pub type u_int32_t = ::std::os::raw::c_uint; 194 | pub type u_int64_t = ::std::os::raw::c_ulong; 195 | pub type register_t = ::std::os::raw::c_long; 196 | pub type __sig_atomic_t = ::std::os::raw::c_int; 197 | #[repr(C)] 198 | #[derive(Copy, Clone)] 199 | #[derive(Debug)] 200 | pub struct __sigset_t { 201 | pub __val: [::std::os::raw::c_ulong; 16usize], 202 | } 203 | impl ::std::default::Default for __sigset_t { 204 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 205 | } 206 | pub type sigset_t = __sigset_t; 207 | #[repr(C)] 208 | #[derive(Copy, Clone)] 209 | #[derive(Debug)] 210 | pub struct timespec { 211 | pub tv_sec: __time_t, 212 | pub tv_nsec: __syscall_slong_t, 213 | } 214 | impl ::std::default::Default for timespec { 215 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 216 | } 217 | #[repr(C)] 218 | #[derive(Copy, Clone)] 219 | #[derive(Debug)] 220 | pub struct timeval { 221 | pub tv_sec: __time_t, 222 | pub tv_usec: __suseconds_t, 223 | } 224 | impl ::std::default::Default for timeval { 225 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 226 | } 227 | pub type suseconds_t = __suseconds_t; 228 | pub type __fd_mask = ::std::os::raw::c_long; 229 | #[repr(C)] 230 | #[derive(Copy, Clone)] 231 | #[derive(Debug)] 232 | pub struct fd_set { 233 | pub __fds_bits: [__fd_mask; 16usize], 234 | } 235 | impl ::std::default::Default for fd_set { 236 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 237 | } 238 | pub type fd_mask = __fd_mask; 239 | pub type blksize_t = __blksize_t; 240 | pub type blkcnt_t = __blkcnt_t; 241 | pub type fsblkcnt_t = __fsblkcnt_t; 242 | pub type fsfilcnt_t = __fsfilcnt_t; 243 | pub type pthread_t = ::std::os::raw::c_ulong; 244 | #[repr(C)] 245 | #[derive(Copy)] 246 | pub struct pthread_attr_t { 247 | pub _bindgen_data_: [u64; 7usize], 248 | } 249 | impl pthread_attr_t { 250 | pub unsafe fn __size(&mut self) 251 | -> *mut [::std::os::raw::c_char; 56usize] { 252 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 253 | ::std::mem::transmute(raw.offset(0)) 254 | } 255 | pub unsafe fn __align(&mut self) -> *mut ::std::os::raw::c_long { 256 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 257 | ::std::mem::transmute(raw.offset(0)) 258 | } 259 | } 260 | impl ::std::clone::Clone for pthread_attr_t { 261 | fn clone(&self) -> Self { *self } 262 | } 263 | impl ::std::default::Default for pthread_attr_t { 264 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 265 | } 266 | #[repr(C)] 267 | #[derive(Copy, Clone)] 268 | #[derive(Debug)] 269 | pub struct __pthread_internal_list { 270 | pub __prev: *mut __pthread_internal_list, 271 | pub __next: *mut __pthread_internal_list, 272 | } 273 | impl ::std::default::Default for __pthread_internal_list { 274 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 275 | } 276 | pub type __pthread_list_t = __pthread_internal_list; 277 | #[repr(C)] 278 | #[derive(Copy)] 279 | pub struct pthread_mutex_t { 280 | pub _bindgen_data_: [u64; 5usize], 281 | } 282 | impl pthread_mutex_t { 283 | pub unsafe fn __data(&mut self) -> *mut __pthread_mutex_s { 284 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 285 | ::std::mem::transmute(raw.offset(0)) 286 | } 287 | pub unsafe fn __size(&mut self) 288 | -> *mut [::std::os::raw::c_char; 40usize] { 289 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 290 | ::std::mem::transmute(raw.offset(0)) 291 | } 292 | pub unsafe fn __align(&mut self) -> *mut ::std::os::raw::c_long { 293 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 294 | ::std::mem::transmute(raw.offset(0)) 295 | } 296 | } 297 | impl ::std::clone::Clone for pthread_mutex_t { 298 | fn clone(&self) -> Self { *self } 299 | } 300 | impl ::std::default::Default for pthread_mutex_t { 301 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 302 | } 303 | #[repr(C)] 304 | #[derive(Copy, Clone)] 305 | #[derive(Debug)] 306 | pub struct __pthread_mutex_s { 307 | pub __lock: ::std::os::raw::c_int, 308 | pub __count: ::std::os::raw::c_uint, 309 | pub __owner: ::std::os::raw::c_int, 310 | pub __nusers: ::std::os::raw::c_uint, 311 | pub __kind: ::std::os::raw::c_int, 312 | pub __spins: ::std::os::raw::c_short, 313 | pub __elision: ::std::os::raw::c_short, 314 | pub __list: __pthread_list_t, 315 | } 316 | impl ::std::default::Default for __pthread_mutex_s { 317 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 318 | } 319 | #[repr(C)] 320 | #[derive(Copy, Clone)] 321 | #[derive(Debug)] 322 | pub struct pthread_mutexattr_t { 323 | pub _bindgen_data_: [u32; 1usize], 324 | } 325 | impl pthread_mutexattr_t { 326 | pub unsafe fn __size(&mut self) -> *mut [::std::os::raw::c_char; 4usize] { 327 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 328 | ::std::mem::transmute(raw.offset(0)) 329 | } 330 | pub unsafe fn __align(&mut self) -> *mut ::std::os::raw::c_int { 331 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 332 | ::std::mem::transmute(raw.offset(0)) 333 | } 334 | } 335 | impl ::std::default::Default for pthread_mutexattr_t { 336 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 337 | } 338 | #[repr(C)] 339 | #[derive(Copy)] 340 | pub struct pthread_cond_t { 341 | pub _bindgen_data_: [u64; 6usize], 342 | } 343 | impl pthread_cond_t { 344 | pub unsafe fn __data(&mut self) -> *mut Struct_Unnamed3 { 345 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 346 | ::std::mem::transmute(raw.offset(0)) 347 | } 348 | pub unsafe fn __size(&mut self) 349 | -> *mut [::std::os::raw::c_char; 48usize] { 350 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 351 | ::std::mem::transmute(raw.offset(0)) 352 | } 353 | pub unsafe fn __align(&mut self) -> *mut ::std::os::raw::c_longlong { 354 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 355 | ::std::mem::transmute(raw.offset(0)) 356 | } 357 | } 358 | impl ::std::clone::Clone for pthread_cond_t { 359 | fn clone(&self) -> Self { *self } 360 | } 361 | impl ::std::default::Default for pthread_cond_t { 362 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 363 | } 364 | #[repr(C)] 365 | #[derive(Copy, Clone)] 366 | #[derive(Debug)] 367 | pub struct Struct_Unnamed3 { 368 | pub __lock: ::std::os::raw::c_int, 369 | pub __futex: ::std::os::raw::c_uint, 370 | pub __total_seq: ::std::os::raw::c_ulonglong, 371 | pub __wakeup_seq: ::std::os::raw::c_ulonglong, 372 | pub __woken_seq: ::std::os::raw::c_ulonglong, 373 | pub __mutex: *mut ::std::os::raw::c_void, 374 | pub __nwaiters: ::std::os::raw::c_uint, 375 | pub __broadcast_seq: ::std::os::raw::c_uint, 376 | } 377 | impl ::std::default::Default for Struct_Unnamed3 { 378 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 379 | } 380 | #[repr(C)] 381 | #[derive(Copy, Clone)] 382 | #[derive(Debug)] 383 | pub struct pthread_condattr_t { 384 | pub _bindgen_data_: [u32; 1usize], 385 | } 386 | impl pthread_condattr_t { 387 | pub unsafe fn __size(&mut self) -> *mut [::std::os::raw::c_char; 4usize] { 388 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 389 | ::std::mem::transmute(raw.offset(0)) 390 | } 391 | pub unsafe fn __align(&mut self) -> *mut ::std::os::raw::c_int { 392 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 393 | ::std::mem::transmute(raw.offset(0)) 394 | } 395 | } 396 | impl ::std::default::Default for pthread_condattr_t { 397 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 398 | } 399 | pub type pthread_key_t = ::std::os::raw::c_uint; 400 | pub type pthread_once_t = ::std::os::raw::c_int; 401 | #[repr(C)] 402 | #[derive(Copy)] 403 | pub struct pthread_rwlock_t { 404 | pub _bindgen_data_: [u64; 7usize], 405 | } 406 | impl pthread_rwlock_t { 407 | pub unsafe fn __data(&mut self) -> *mut Struct_Unnamed4 { 408 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 409 | ::std::mem::transmute(raw.offset(0)) 410 | } 411 | pub unsafe fn __size(&mut self) 412 | -> *mut [::std::os::raw::c_char; 56usize] { 413 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 414 | ::std::mem::transmute(raw.offset(0)) 415 | } 416 | pub unsafe fn __align(&mut self) -> *mut ::std::os::raw::c_long { 417 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 418 | ::std::mem::transmute(raw.offset(0)) 419 | } 420 | } 421 | impl ::std::clone::Clone for pthread_rwlock_t { 422 | fn clone(&self) -> Self { *self } 423 | } 424 | impl ::std::default::Default for pthread_rwlock_t { 425 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 426 | } 427 | #[repr(C)] 428 | #[derive(Copy, Clone)] 429 | #[derive(Debug)] 430 | pub struct Struct_Unnamed4 { 431 | pub __lock: ::std::os::raw::c_int, 432 | pub __nr_readers: ::std::os::raw::c_uint, 433 | pub __readers_wakeup: ::std::os::raw::c_uint, 434 | pub __writer_wakeup: ::std::os::raw::c_uint, 435 | pub __nr_readers_queued: ::std::os::raw::c_uint, 436 | pub __nr_writers_queued: ::std::os::raw::c_uint, 437 | pub __writer: ::std::os::raw::c_int, 438 | pub __shared: ::std::os::raw::c_int, 439 | pub __rwelision: ::std::os::raw::c_char, 440 | pub __pad1: [::std::os::raw::c_uchar; 7usize], 441 | pub __pad2: ::std::os::raw::c_ulong, 442 | pub __flags: ::std::os::raw::c_uint, 443 | } 444 | impl ::std::default::Default for Struct_Unnamed4 { 445 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 446 | } 447 | #[repr(C)] 448 | #[derive(Copy, Clone)] 449 | #[derive(Debug)] 450 | pub struct pthread_rwlockattr_t { 451 | pub _bindgen_data_: [u64; 1usize], 452 | } 453 | impl pthread_rwlockattr_t { 454 | pub unsafe fn __size(&mut self) -> *mut [::std::os::raw::c_char; 8usize] { 455 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 456 | ::std::mem::transmute(raw.offset(0)) 457 | } 458 | pub unsafe fn __align(&mut self) -> *mut ::std::os::raw::c_long { 459 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 460 | ::std::mem::transmute(raw.offset(0)) 461 | } 462 | } 463 | impl ::std::default::Default for pthread_rwlockattr_t { 464 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 465 | } 466 | pub type pthread_spinlock_t = ::std::os::raw::c_int; 467 | #[repr(C)] 468 | #[derive(Copy, Clone)] 469 | #[derive(Debug)] 470 | pub struct pthread_barrier_t { 471 | pub _bindgen_data_: [u64; 4usize], 472 | } 473 | impl pthread_barrier_t { 474 | pub unsafe fn __size(&mut self) 475 | -> *mut [::std::os::raw::c_char; 32usize] { 476 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 477 | ::std::mem::transmute(raw.offset(0)) 478 | } 479 | pub unsafe fn __align(&mut self) -> *mut ::std::os::raw::c_long { 480 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 481 | ::std::mem::transmute(raw.offset(0)) 482 | } 483 | } 484 | impl ::std::default::Default for pthread_barrier_t { 485 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 486 | } 487 | #[repr(C)] 488 | #[derive(Copy, Clone)] 489 | #[derive(Debug)] 490 | pub struct pthread_barrierattr_t { 491 | pub _bindgen_data_: [u32; 1usize], 492 | } 493 | impl pthread_barrierattr_t { 494 | pub unsafe fn __size(&mut self) -> *mut [::std::os::raw::c_char; 4usize] { 495 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 496 | ::std::mem::transmute(raw.offset(0)) 497 | } 498 | pub unsafe fn __align(&mut self) -> *mut ::std::os::raw::c_int { 499 | let raw: *mut u8 = ::std::mem::transmute(&self._bindgen_data_); 500 | ::std::mem::transmute(raw.offset(0)) 501 | } 502 | } 503 | impl ::std::default::Default for pthread_barrierattr_t { 504 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 505 | } 506 | #[repr(C)] 507 | #[derive(Copy, Clone)] 508 | #[derive(Debug)] 509 | pub struct random_data { 510 | pub fptr: *mut int32_t, 511 | pub rptr: *mut int32_t, 512 | pub state: *mut int32_t, 513 | pub rand_type: ::std::os::raw::c_int, 514 | pub rand_deg: ::std::os::raw::c_int, 515 | pub rand_sep: ::std::os::raw::c_int, 516 | pub end_ptr: *mut int32_t, 517 | } 518 | impl ::std::default::Default for random_data { 519 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 520 | } 521 | #[repr(C)] 522 | #[derive(Copy, Clone)] 523 | #[derive(Debug)] 524 | pub struct drand48_data { 525 | pub __x: [::std::os::raw::c_ushort; 3usize], 526 | pub __old_x: [::std::os::raw::c_ushort; 3usize], 527 | pub __c: ::std::os::raw::c_ushort, 528 | pub __init: ::std::os::raw::c_ushort, 529 | pub __a: ::std::os::raw::c_ulonglong, 530 | } 531 | impl ::std::default::Default for drand48_data { 532 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 533 | } 534 | pub type __compar_fn_t = 535 | ::std::option::Option ::std::os::raw::c_int>; 540 | pub type wchar16 = ::std::os::raw::c_ushort; 541 | pub type int64 = ::std::os::raw::c_long; 542 | pub enum _awe_webview { } 543 | pub type awe_webview = _awe_webview; 544 | pub enum _awe_jsvalue { } 545 | pub type awe_jsvalue = _awe_jsvalue; 546 | pub enum _awe_jsarray { } 547 | pub type awe_jsarray = _awe_jsarray; 548 | pub enum _awe_jsobject { } 549 | pub type awe_jsobject = _awe_jsobject; 550 | pub enum _awe_renderbuffer { } 551 | pub type awe_renderbuffer = _awe_renderbuffer; 552 | pub enum _awe_header_definition { } 553 | pub type awe_header_definition = _awe_header_definition; 554 | pub enum _awe_resource_response { } 555 | pub type awe_resource_response = _awe_resource_response; 556 | pub enum _awe_resource_request { } 557 | pub type awe_resource_request = _awe_resource_request; 558 | pub enum _awe_upload_element { } 559 | pub type awe_upload_element = _awe_upload_element; 560 | pub enum _awe_string { } 561 | pub type awe_string = _awe_string; 562 | pub enum _awe_history_query_result { } 563 | pub type awe_history_query_result = _awe_history_query_result; 564 | pub enum _awe_history_entry { } 565 | pub type awe_history_entry = _awe_history_entry; 566 | #[derive(Copy, Clone)] 567 | #[repr(u32)] 568 | #[derive(Debug)] 569 | pub enum _awe_loglevel { 570 | AWE_LL_NONE = 0, 571 | AWE_LL_NORMAL = 1, 572 | AWE_LL_VERBOSE = 2, 573 | } 574 | pub type awe_loglevel = _awe_loglevel; 575 | #[derive(Copy, Clone)] 576 | #[repr(u32)] 577 | #[derive(Debug)] 578 | pub enum _awe_mousebutton { 579 | AWE_MB_LEFT = 0, 580 | AWE_MB_MIDDLE = 1, 581 | AWE_MB_RIGHT = 2, 582 | } 583 | pub type awe_mousebutton = _awe_mousebutton; 584 | #[derive(Copy, Clone)] 585 | #[repr(u32)] 586 | #[derive(Debug)] 587 | pub enum _awe_url_filtering_mode { 588 | AWE_UFM_NONE = 0, 589 | AWE_UFM_BLACKLIST = 1, 590 | AWE_UFM_WHITELIST = 2, 591 | } 592 | pub type awe_url_filtering_mode = _awe_url_filtering_mode; 593 | #[derive(Copy, Clone)] 594 | #[repr(u32)] 595 | #[derive(Debug)] 596 | pub enum _awe_webkey_type { 597 | AWE_WKT_KEYDOWN = 0, 598 | AWE_WKT_KEYUP = 1, 599 | AWE_WKT_CHAR = 2, 600 | } 601 | pub type awe_webkey_type = _awe_webkey_type; 602 | #[derive(Copy, Clone)] 603 | #[repr(u32)] 604 | #[derive(Debug)] 605 | pub enum _awe_webkey_modifiers { 606 | AWE_WKM_SHIFT_KEY = 1, 607 | AWE_WKM_CONTROL_KEY = 2, 608 | AWE_WKM_ALT_KEY = 4, 609 | AWE_WKM_META_KEY = 8, 610 | AWE_WKM_IS_KEYPAD = 16, 611 | AWE_WKM_IS_AUTOREPEAT = 32, 612 | } 613 | pub type awe_webkey_modifiers = _awe_webkey_modifiers; 614 | #[derive(Copy, Clone)] 615 | #[repr(u32)] 616 | #[derive(Debug)] 617 | pub enum _awe_cursor_type { 618 | AWE_CUR_POINTER = 0, 619 | AWE_CUR_CROSS = 1, 620 | AWE_CUR_HAND = 2, 621 | AWE_CUR_IBEAM = 3, 622 | AWE_CUR_WAIT = 4, 623 | AWE_CUR_HELP = 5, 624 | AWE_CUR_EAST_RESIZE = 6, 625 | AWE_CUR_NORTH_RESIZE = 7, 626 | AWE_CUR_NORTHEAST_RESIZE = 8, 627 | AWE_CUR_NORTHWEST_RESIZE = 9, 628 | AWE_CUR_SOUTH_RESIZE = 10, 629 | AWE_CUR_SOUTHEAST_RESIZE = 11, 630 | AWE_CUR_SOUTHWEST_RESIZE = 12, 631 | AWE_CUR_WEST_RESIZE = 13, 632 | AWE_CUR_NORTHSOUTH_RESIZE = 14, 633 | AWE_CUR_EASTWEST_RESIZE = 15, 634 | AWE_CUR_NORTHEAST_SOUTHWEST_RESIZE = 16, 635 | AWE_CUR_NORTHWEST_SOUTHEAST_RESIZE = 17, 636 | AWE_CUR_COLUMN_RESIZE = 18, 637 | AWE_CUR_ROW_RESIZE = 19, 638 | AWE_CUR_MIDDLE_PANNING = 20, 639 | AWE_CUR_EAST_PANNING = 21, 640 | AWE_CUR_NORTH_PANNING = 22, 641 | AWE_CUR_NORTHEAST_PANNING = 23, 642 | AWE_CUR_NORTHWEST_PANNING = 24, 643 | AWE_CUR_SOUTH_PANNING = 25, 644 | AWE_CUR_SOUTHEAST_PANNING = 26, 645 | AWE_CUR_SOUTHWEST_PANNING = 27, 646 | AWE_CUR_WEST_PANNING = 28, 647 | AWE_CUR_MOVE = 29, 648 | AWE_CUR_VERTICAL_TEXT = 30, 649 | AWE_CUR_CELL = 31, 650 | AWE_CUR_CONTEXT_MENU = 32, 651 | AWE_CUR_ALIAS = 33, 652 | AWE_CUR_PROGRESS = 34, 653 | AWE_CUR_NO_DROP = 35, 654 | AWE_CUR_COPY = 36, 655 | AWE_CUR_NONE = 37, 656 | AWE_CUR_NOT_ALLOWED = 38, 657 | AWE_CUR_ZOOM_IN = 39, 658 | AWE_CUR_ZOOM_OUT = 40, 659 | AWE_CUR_CUSTOM = 41, 660 | } 661 | pub type awe_cursor_type = _awe_cursor_type; 662 | #[derive(Copy, Clone)] 663 | #[repr(u32)] 664 | #[derive(Debug)] 665 | pub enum _awe_ime_state { 666 | AWE_IME_DISABLE = 0, 667 | AWE_IME_MOVE_WINDOW = 1, 668 | AWE_IME_COMPLETE_COMPOSITION = 2, 669 | } 670 | pub type awe_ime_state = _awe_ime_state; 671 | #[derive(Copy, Clone)] 672 | #[repr(u32)] 673 | #[derive(Debug)] 674 | pub enum _awe_media_type { 675 | AWE_MEDIA_TYPE_NONE = 0, 676 | AWE_MEDIA_TYPE_IMAGE = 1, 677 | AWE_MEDIA_TYPE_VIDEO = 2, 678 | AWE_MEDIA_TYPE_AUDIO = 3, 679 | } 680 | pub type awe_media_type = _awe_media_type; 681 | #[derive(Copy, Clone)] 682 | #[repr(u32)] 683 | #[derive(Debug)] 684 | pub enum _awe_media_state { 685 | AWE_MEDIA_STATE_NONE = 0, 686 | AWE_MEDIA_STATE_ERROR = 1, 687 | AWE_MEDIA_STATE_PAUSED = 2, 688 | AWE_MEDIA_STATE_MUTED = 4, 689 | AWE_MEDIA_STATE_LOOP = 8, 690 | AWE_MEDIA_STATE_CAN_SAVE = 16, 691 | AWE_MEDIA_STATE_HAS_AUDIO = 32, 692 | } 693 | #[derive(Copy, Clone)] 694 | #[repr(u32)] 695 | #[derive(Debug)] 696 | pub enum _awe_can_edit_flags { 697 | AWE_CAN_EDIT_NOTHING = 0, 698 | AWE_CAN_UNDO = 1, 699 | AWE_CAN_REDO = 2, 700 | AWE_CAN_CUT = 4, 701 | AWE_CAN_COPY = 8, 702 | AWE_CAN_PASTE = 16, 703 | AWE_CAN_DELETE = 32, 704 | AWE_CAN_SELECT_ALL = 64, 705 | } 706 | #[derive(Copy, Clone)] 707 | #[repr(u32)] 708 | #[derive(Debug)] 709 | pub enum _awe_dialog_flags { 710 | AWE_DIALOG_HAS_OK_BUTTON = 1, 711 | AWE_DIALOG_HAS_CANCEL_BUTTON = 2, 712 | AWE_DIALOG_HAS_PROMPT_FIELD = 4, 713 | AWE_DIALOG_HAS_MESSAGE = 8, 714 | } 715 | #[repr(C)] 716 | #[derive(Copy, Clone)] 717 | #[derive(Debug)] 718 | pub struct _awe_webkeyboardevent { 719 | pub type_: awe_webkey_type, 720 | pub modifiers: ::std::os::raw::c_int, 721 | pub virtual_key_code: ::std::os::raw::c_int, 722 | pub native_key_code: ::std::os::raw::c_int, 723 | pub text: [wchar16; 4usize], 724 | pub unmodified_text: [wchar16; 4usize], 725 | pub is_system_key: u8, 726 | } 727 | impl ::std::default::Default for _awe_webkeyboardevent { 728 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 729 | } 730 | pub type awe_webkeyboardevent = _awe_webkeyboardevent; 731 | #[repr(C)] 732 | #[derive(Copy, Clone)] 733 | #[derive(Debug)] 734 | pub struct _awe_rect { 735 | pub x: ::std::os::raw::c_int, 736 | pub y: ::std::os::raw::c_int, 737 | pub width: ::std::os::raw::c_int, 738 | pub height: ::std::os::raw::c_int, 739 | } 740 | impl ::std::default::Default for _awe_rect { 741 | fn default() -> Self { unsafe { ::std::mem::zeroed() } } 742 | } 743 | pub type awe_rect = _awe_rect; 744 | #[derive(Copy, Clone)] 745 | #[repr(u32)] 746 | #[derive(Debug)] 747 | pub enum _awe_jsvalue_type { 748 | JSVALUE_TYPE_NULL = 0, 749 | JSVALUE_TYPE_BOOLEAN = 1, 750 | JSVALUE_TYPE_INTEGER = 2, 751 | JSVALUE_TYPE_DOUBLE = 3, 752 | JSVALUE_TYPE_STRING = 4, 753 | JSVALUE_TYPE_OBJECT = 5, 754 | JSVALUE_TYPE_ARRAY = 6, 755 | } 756 | pub type awe_jsvalue_type = _awe_jsvalue_type; 757 | extern "C" { 758 | pub fn __ctype_get_mb_cur_max() -> size_t; 759 | pub fn atof(__nptr: *const ::std::os::raw::c_char) 760 | -> ::std::os::raw::c_double; 761 | pub fn atoi(__nptr: *const ::std::os::raw::c_char) 762 | -> ::std::os::raw::c_int; 763 | pub fn atol(__nptr: *const ::std::os::raw::c_char) 764 | -> ::std::os::raw::c_long; 765 | pub fn atoll(__nptr: *const ::std::os::raw::c_char) 766 | -> ::std::os::raw::c_longlong; 767 | pub fn strtod(__nptr: *const ::std::os::raw::c_char, 768 | __endptr: *mut *mut ::std::os::raw::c_char) 769 | -> ::std::os::raw::c_double; 770 | pub fn strtof(__nptr: *const ::std::os::raw::c_char, 771 | __endptr: *mut *mut ::std::os::raw::c_char) 772 | -> ::std::os::raw::c_float; 773 | pub fn strtold(__nptr: *const ::std::os::raw::c_char, 774 | __endptr: *mut *mut ::std::os::raw::c_char) 775 | -> ::std::os::raw::c_double; 776 | pub fn strtol(__nptr: *const ::std::os::raw::c_char, 777 | __endptr: *mut *mut ::std::os::raw::c_char, 778 | __base: ::std::os::raw::c_int) -> ::std::os::raw::c_long; 779 | pub fn strtoul(__nptr: *const ::std::os::raw::c_char, 780 | __endptr: *mut *mut ::std::os::raw::c_char, 781 | __base: ::std::os::raw::c_int) -> ::std::os::raw::c_ulong; 782 | pub fn strtoq(__nptr: *const ::std::os::raw::c_char, 783 | __endptr: *mut *mut ::std::os::raw::c_char, 784 | __base: ::std::os::raw::c_int) 785 | -> ::std::os::raw::c_longlong; 786 | pub fn strtouq(__nptr: *const ::std::os::raw::c_char, 787 | __endptr: *mut *mut ::std::os::raw::c_char, 788 | __base: ::std::os::raw::c_int) 789 | -> ::std::os::raw::c_ulonglong; 790 | pub fn strtoll(__nptr: *const ::std::os::raw::c_char, 791 | __endptr: *mut *mut ::std::os::raw::c_char, 792 | __base: ::std::os::raw::c_int) 793 | -> ::std::os::raw::c_longlong; 794 | pub fn strtoull(__nptr: *const ::std::os::raw::c_char, 795 | __endptr: *mut *mut ::std::os::raw::c_char, 796 | __base: ::std::os::raw::c_int) 797 | -> ::std::os::raw::c_ulonglong; 798 | pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char; 799 | pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; 800 | pub fn select(__nfds: ::std::os::raw::c_int, __readfds: *mut fd_set, 801 | __writefds: *mut fd_set, __exceptfds: *mut fd_set, 802 | __timeout: *mut timeval) -> ::std::os::raw::c_int; 803 | pub fn pselect(__nfds: ::std::os::raw::c_int, __readfds: *mut fd_set, 804 | __writefds: *mut fd_set, __exceptfds: *mut fd_set, 805 | __timeout: *const timespec, __sigmask: *const __sigset_t) 806 | -> ::std::os::raw::c_int; 807 | pub fn gnu_dev_major(__dev: ::std::os::raw::c_ulonglong) 808 | -> ::std::os::raw::c_uint; 809 | pub fn gnu_dev_minor(__dev: ::std::os::raw::c_ulonglong) 810 | -> ::std::os::raw::c_uint; 811 | pub fn gnu_dev_makedev(__major: ::std::os::raw::c_uint, 812 | __minor: ::std::os::raw::c_uint) 813 | -> ::std::os::raw::c_ulonglong; 814 | pub fn random() -> ::std::os::raw::c_long; 815 | pub fn srandom(__seed: ::std::os::raw::c_uint); 816 | pub fn initstate(__seed: ::std::os::raw::c_uint, 817 | __statebuf: *mut ::std::os::raw::c_char, 818 | __statelen: size_t) -> *mut ::std::os::raw::c_char; 819 | pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) 820 | -> *mut ::std::os::raw::c_char; 821 | pub fn random_r(__buf: *mut random_data, __result: *mut int32_t) 822 | -> ::std::os::raw::c_int; 823 | pub fn srandom_r(__seed: ::std::os::raw::c_uint, __buf: *mut random_data) 824 | -> ::std::os::raw::c_int; 825 | pub fn initstate_r(__seed: ::std::os::raw::c_uint, 826 | __statebuf: *mut ::std::os::raw::c_char, 827 | __statelen: size_t, __buf: *mut random_data) 828 | -> ::std::os::raw::c_int; 829 | pub fn setstate_r(__statebuf: *mut ::std::os::raw::c_char, 830 | __buf: *mut random_data) -> ::std::os::raw::c_int; 831 | pub fn rand() -> ::std::os::raw::c_int; 832 | pub fn srand(__seed: ::std::os::raw::c_uint); 833 | pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) 834 | -> ::std::os::raw::c_int; 835 | pub fn drand48() -> ::std::os::raw::c_double; 836 | pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) 837 | -> ::std::os::raw::c_double; 838 | pub fn lrand48() -> ::std::os::raw::c_long; 839 | pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) 840 | -> ::std::os::raw::c_long; 841 | pub fn mrand48() -> ::std::os::raw::c_long; 842 | pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) 843 | -> ::std::os::raw::c_long; 844 | pub fn srand48(__seedval: ::std::os::raw::c_long); 845 | pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) 846 | -> *mut ::std::os::raw::c_ushort; 847 | pub fn lcong48(__param: *mut ::std::os::raw::c_ushort); 848 | pub fn drand48_r(__buffer: *mut drand48_data, 849 | __result: *mut ::std::os::raw::c_double) 850 | -> ::std::os::raw::c_int; 851 | pub fn erand48_r(__xsubi: *mut ::std::os::raw::c_ushort, 852 | __buffer: *mut drand48_data, 853 | __result: *mut ::std::os::raw::c_double) 854 | -> ::std::os::raw::c_int; 855 | pub fn lrand48_r(__buffer: *mut drand48_data, 856 | __result: *mut ::std::os::raw::c_long) 857 | -> ::std::os::raw::c_int; 858 | pub fn nrand48_r(__xsubi: *mut ::std::os::raw::c_ushort, 859 | __buffer: *mut drand48_data, 860 | __result: *mut ::std::os::raw::c_long) 861 | -> ::std::os::raw::c_int; 862 | pub fn mrand48_r(__buffer: *mut drand48_data, 863 | __result: *mut ::std::os::raw::c_long) 864 | -> ::std::os::raw::c_int; 865 | pub fn jrand48_r(__xsubi: *mut ::std::os::raw::c_ushort, 866 | __buffer: *mut drand48_data, 867 | __result: *mut ::std::os::raw::c_long) 868 | -> ::std::os::raw::c_int; 869 | pub fn srand48_r(__seedval: ::std::os::raw::c_long, 870 | __buffer: *mut drand48_data) -> ::std::os::raw::c_int; 871 | pub fn seed48_r(__seed16v: *mut ::std::os::raw::c_ushort, 872 | __buffer: *mut drand48_data) -> ::std::os::raw::c_int; 873 | pub fn lcong48_r(__param: *mut ::std::os::raw::c_ushort, 874 | __buffer: *mut drand48_data) -> ::std::os::raw::c_int; 875 | pub fn malloc(__size: size_t) -> *mut ::std::os::raw::c_void; 876 | pub fn calloc(__nmemb: size_t, __size: size_t) 877 | -> *mut ::std::os::raw::c_void; 878 | pub fn realloc(__ptr: *mut ::std::os::raw::c_void, __size: size_t) 879 | -> *mut ::std::os::raw::c_void; 880 | pub fn free(__ptr: *mut ::std::os::raw::c_void); 881 | pub fn cfree(__ptr: *mut ::std::os::raw::c_void); 882 | pub fn alloca(__size: size_t) -> *mut ::std::os::raw::c_void; 883 | pub fn valloc(__size: size_t) -> *mut ::std::os::raw::c_void; 884 | pub fn posix_memalign(__memptr: *mut *mut ::std::os::raw::c_void, 885 | __alignment: size_t, __size: size_t) 886 | -> ::std::os::raw::c_int; 887 | pub fn aligned_alloc(__alignment: size_t, __size: size_t) 888 | -> *mut ::std::os::raw::c_void; 889 | pub fn abort(); 890 | pub fn atexit(__func: ::std::option::Option) 891 | -> ::std::os::raw::c_int; 892 | pub fn at_quick_exit(__func: ::std::option::Option) 893 | -> ::std::os::raw::c_int; 894 | pub fn on_exit(__func: 895 | ::std::option::Option, 899 | __arg: *mut ::std::os::raw::c_void) 900 | -> ::std::os::raw::c_int; 901 | pub fn exit(__status: ::std::os::raw::c_int); 902 | pub fn quick_exit(__status: ::std::os::raw::c_int); 903 | pub fn _Exit(__status: ::std::os::raw::c_int); 904 | pub fn getenv(__name: *const ::std::os::raw::c_char) 905 | -> *mut ::std::os::raw::c_char; 906 | pub fn putenv(__string: *mut ::std::os::raw::c_char) 907 | -> ::std::os::raw::c_int; 908 | pub fn setenv(__name: *const ::std::os::raw::c_char, 909 | __value: *const ::std::os::raw::c_char, 910 | __replace: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 911 | pub fn unsetenv(__name: *const ::std::os::raw::c_char) 912 | -> ::std::os::raw::c_int; 913 | pub fn clearenv() -> ::std::os::raw::c_int; 914 | pub fn mktemp(__template: *mut ::std::os::raw::c_char) 915 | -> *mut ::std::os::raw::c_char; 916 | pub fn mkstemp(__template: *mut ::std::os::raw::c_char) 917 | -> ::std::os::raw::c_int; 918 | pub fn mkstemps(__template: *mut ::std::os::raw::c_char, 919 | __suffixlen: ::std::os::raw::c_int) 920 | -> ::std::os::raw::c_int; 921 | pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) 922 | -> *mut ::std::os::raw::c_char; 923 | pub fn system(__command: *const ::std::os::raw::c_char) 924 | -> ::std::os::raw::c_int; 925 | pub fn realpath(__name: *const ::std::os::raw::c_char, 926 | __resolved: *mut ::std::os::raw::c_char) 927 | -> *mut ::std::os::raw::c_char; 928 | pub fn bsearch(__key: *const ::std::os::raw::c_void, 929 | __base: *const ::std::os::raw::c_void, __nmemb: size_t, 930 | __size: size_t, __compar: __compar_fn_t) 931 | -> *mut ::std::os::raw::c_void; 932 | pub fn qsort(__base: *mut ::std::os::raw::c_void, __nmemb: size_t, 933 | __size: size_t, __compar: __compar_fn_t); 934 | pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 935 | pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long; 936 | pub fn llabs(__x: ::std::os::raw::c_longlong) 937 | -> ::std::os::raw::c_longlong; 938 | pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) 939 | -> div_t; 940 | pub fn ldiv(__numer: ::std::os::raw::c_long, 941 | __denom: ::std::os::raw::c_long) -> ldiv_t; 942 | pub fn lldiv(__numer: ::std::os::raw::c_longlong, 943 | __denom: ::std::os::raw::c_longlong) -> lldiv_t; 944 | pub fn ecvt(__value: ::std::os::raw::c_double, 945 | __ndigit: ::std::os::raw::c_int, 946 | __decpt: *mut ::std::os::raw::c_int, 947 | __sign: *mut ::std::os::raw::c_int) 948 | -> *mut ::std::os::raw::c_char; 949 | pub fn fcvt(__value: ::std::os::raw::c_double, 950 | __ndigit: ::std::os::raw::c_int, 951 | __decpt: *mut ::std::os::raw::c_int, 952 | __sign: *mut ::std::os::raw::c_int) 953 | -> *mut ::std::os::raw::c_char; 954 | pub fn gcvt(__value: ::std::os::raw::c_double, 955 | __ndigit: ::std::os::raw::c_int, 956 | __buf: *mut ::std::os::raw::c_char) 957 | -> *mut ::std::os::raw::c_char; 958 | pub fn qecvt(__value: ::std::os::raw::c_double, 959 | __ndigit: ::std::os::raw::c_int, 960 | __decpt: *mut ::std::os::raw::c_int, 961 | __sign: *mut ::std::os::raw::c_int) 962 | -> *mut ::std::os::raw::c_char; 963 | pub fn qfcvt(__value: ::std::os::raw::c_double, 964 | __ndigit: ::std::os::raw::c_int, 965 | __decpt: *mut ::std::os::raw::c_int, 966 | __sign: *mut ::std::os::raw::c_int) 967 | -> *mut ::std::os::raw::c_char; 968 | pub fn qgcvt(__value: ::std::os::raw::c_double, 969 | __ndigit: ::std::os::raw::c_int, 970 | __buf: *mut ::std::os::raw::c_char) 971 | -> *mut ::std::os::raw::c_char; 972 | pub fn ecvt_r(__value: ::std::os::raw::c_double, 973 | __ndigit: ::std::os::raw::c_int, 974 | __decpt: *mut ::std::os::raw::c_int, 975 | __sign: *mut ::std::os::raw::c_int, 976 | __buf: *mut ::std::os::raw::c_char, __len: size_t) 977 | -> ::std::os::raw::c_int; 978 | pub fn fcvt_r(__value: ::std::os::raw::c_double, 979 | __ndigit: ::std::os::raw::c_int, 980 | __decpt: *mut ::std::os::raw::c_int, 981 | __sign: *mut ::std::os::raw::c_int, 982 | __buf: *mut ::std::os::raw::c_char, __len: size_t) 983 | -> ::std::os::raw::c_int; 984 | pub fn qecvt_r(__value: ::std::os::raw::c_double, 985 | __ndigit: ::std::os::raw::c_int, 986 | __decpt: *mut ::std::os::raw::c_int, 987 | __sign: *mut ::std::os::raw::c_int, 988 | __buf: *mut ::std::os::raw::c_char, __len: size_t) 989 | -> ::std::os::raw::c_int; 990 | pub fn qfcvt_r(__value: ::std::os::raw::c_double, 991 | __ndigit: ::std::os::raw::c_int, 992 | __decpt: *mut ::std::os::raw::c_int, 993 | __sign: *mut ::std::os::raw::c_int, 994 | __buf: *mut ::std::os::raw::c_char, __len: size_t) 995 | -> ::std::os::raw::c_int; 996 | pub fn mblen(__s: *const ::std::os::raw::c_char, __n: size_t) 997 | -> ::std::os::raw::c_int; 998 | pub fn mbtowc(__pwc: *mut wchar_t, __s: *const ::std::os::raw::c_char, 999 | __n: size_t) -> ::std::os::raw::c_int; 1000 | pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) 1001 | -> ::std::os::raw::c_int; 1002 | pub fn mbstowcs(__pwcs: *mut wchar_t, __s: *const ::std::os::raw::c_char, 1003 | __n: size_t) -> size_t; 1004 | pub fn wcstombs(__s: *mut ::std::os::raw::c_char, __pwcs: *const wchar_t, 1005 | __n: size_t) -> size_t; 1006 | pub fn rpmatch(__response: *const ::std::os::raw::c_char) 1007 | -> ::std::os::raw::c_int; 1008 | pub fn getsubopt(__optionp: *mut *mut ::std::os::raw::c_char, 1009 | __tokens: *const *mut ::std::os::raw::c_char, 1010 | __valuep: *mut *mut ::std::os::raw::c_char) 1011 | -> ::std::os::raw::c_int; 1012 | pub fn getloadavg(__loadavg: *mut ::std::os::raw::c_double, 1013 | __nelem: ::std::os::raw::c_int) 1014 | -> ::std::os::raw::c_int; 1015 | pub fn awe_is_child_process(argc: ::std::os::raw::c_int, 1016 | argv: *mut *mut ::std::os::raw::c_char) -> u8; 1017 | pub fn awe_child_process_main(argc: ::std::os::raw::c_int, 1018 | argv: *mut *mut ::std::os::raw::c_char) 1019 | -> ::std::os::raw::c_int; 1020 | pub fn awe_string_empty() -> *const awe_string; 1021 | pub fn awe_string_create_from_ascii(str: *const ::std::os::raw::c_char, 1022 | len: size_t) -> *mut awe_string; 1023 | pub fn awe_string_create_from_wide(str: *const wchar_t, len: size_t) 1024 | -> *mut awe_string; 1025 | pub fn awe_string_create_from_utf8(str: *const ::std::os::raw::c_char, 1026 | len: size_t) -> *mut awe_string; 1027 | pub fn awe_string_create_from_utf16(str: *const wchar16, len: size_t) 1028 | -> *mut awe_string; 1029 | pub fn awe_string_destroy(str: *mut awe_string); 1030 | pub fn awe_string_get_length(str: *const awe_string) -> size_t; 1031 | pub fn awe_string_get_utf16(str: *const awe_string) -> *const wchar16; 1032 | pub fn awe_string_to_wide(str: *const awe_string, dest: *mut wchar_t, 1033 | len: size_t) -> ::std::os::raw::c_int; 1034 | pub fn awe_string_to_utf8(str: *const awe_string, 1035 | dest: *mut ::std::os::raw::c_char, len: size_t) 1036 | -> ::std::os::raw::c_int; 1037 | pub fn awe_webcore_initialize(enable_plugins: u8, enable_javascript: u8, 1038 | enable_databases: u8, 1039 | package_path: *const awe_string, 1040 | locale_path: *const awe_string, 1041 | user_data_path: *const awe_string, 1042 | plugin_path: *const awe_string, 1043 | log_path: *const awe_string, 1044 | log_level: awe_loglevel, 1045 | force_single_process: u8, 1046 | child_process_path: *const awe_string, 1047 | enable_auto_detect_encoding: u8, 1048 | accept_language_override: *const awe_string, 1049 | default_charset_override: *const awe_string, 1050 | user_agent_override: *const awe_string, 1051 | proxy_server: *const awe_string, 1052 | proxy_config_script: *const awe_string, 1053 | auth_server_whitelist: *const awe_string, 1054 | save_cache_and_cookies: u8, 1055 | max_cache_size: ::std::os::raw::c_int, 1056 | disable_same_origin_policy: u8, 1057 | disable_win_message_pump: u8, 1058 | custom_css: *const awe_string); 1059 | pub fn awe_webcore_initialize_default(); 1060 | pub fn awe_webcore_shutdown(); 1061 | pub fn awe_webcore_set_base_directory(base_dir_path: *const awe_string); 1062 | pub fn awe_webcore_create_webview(width: ::std::os::raw::c_int, 1063 | height: ::std::os::raw::c_int, 1064 | view_source: u8) -> *mut awe_webview; 1065 | pub fn awe_webcore_set_custom_response_page(status_code: 1066 | ::std::os::raw::c_int, 1067 | file_path: *const awe_string); 1068 | pub fn awe_webcore_update(); 1069 | pub fn awe_webcore_get_base_directory() -> *const awe_string; 1070 | pub fn awe_webcore_are_plugins_enabled() -> u8; 1071 | pub fn awe_webcore_clear_cache(); 1072 | pub fn awe_webcore_clear_cookies(); 1073 | pub fn awe_webcore_set_cookie(url: *const awe_string, 1074 | cookie_string: *const awe_string, 1075 | is_http_only: u8, force_session_cookie: u8); 1076 | pub fn awe_webcore_get_cookies(url: *const awe_string, 1077 | exclude_http_only: u8) 1078 | -> *const awe_string; 1079 | pub fn awe_webcore_delete_cookie(url: *const awe_string, 1080 | cookie_name: *const awe_string); 1081 | pub fn awe_webcore_set_suppress_printer_dialog(suppress: u8); 1082 | pub fn awe_webcore_query_history(full_text_query: *const awe_string, 1083 | num_days_ago: ::std::os::raw::c_int, 1084 | max_count: ::std::os::raw::c_int) 1085 | -> *mut awe_history_query_result; 1086 | pub fn awe_webview_destroy(webview: *mut awe_webview); 1087 | pub fn awe_webview_load_url(webview: *mut awe_webview, 1088 | url: *const awe_string, 1089 | frame_name: *const awe_string, 1090 | username: *const awe_string, 1091 | password: *const awe_string); 1092 | pub fn awe_webview_load_html(webview: *mut awe_webview, 1093 | html: *const awe_string, 1094 | frame_name: *const awe_string); 1095 | pub fn awe_webview_load_file(webview: *mut awe_webview, 1096 | file: *const awe_string, 1097 | frame_name: *const awe_string); 1098 | pub fn awe_webview_get_url(webview: *mut awe_webview) -> *mut awe_string; 1099 | pub fn awe_webview_go_to_history_offset(webview: *mut awe_webview, 1100 | offset: ::std::os::raw::c_int); 1101 | pub fn awe_webview_get_history_back_count(webview: *mut awe_webview) 1102 | -> ::std::os::raw::c_int; 1103 | pub fn awe_webview_get_history_forward_count(webview: *mut awe_webview) 1104 | -> ::std::os::raw::c_int; 1105 | pub fn awe_webview_stop(webview: *mut awe_webview); 1106 | pub fn awe_webview_reload(webview: *mut awe_webview); 1107 | pub fn awe_webview_execute_javascript(webview: *mut awe_webview, 1108 | javascript: *const awe_string, 1109 | frame_name: *const awe_string); 1110 | pub fn awe_webview_execute_javascript_with_result(webview: 1111 | *mut awe_webview, 1112 | javascript: 1113 | *const awe_string, 1114 | frame_name: 1115 | *const awe_string, 1116 | timeout_ms: 1117 | ::std::os::raw::c_int) 1118 | -> *mut awe_jsvalue; 1119 | pub fn awe_webview_call_javascript_function(webview: *mut awe_webview, 1120 | object: *const awe_string, 1121 | function: *const awe_string, 1122 | arguments: *const awe_jsarray, 1123 | frame_name: 1124 | *const awe_string); 1125 | pub fn awe_webview_create_object(webview: *mut awe_webview, 1126 | object_name: *const awe_string); 1127 | pub fn awe_webview_destroy_object(webview: *mut awe_webview, 1128 | object_name: *const awe_string); 1129 | pub fn awe_webview_set_object_property(webview: *mut awe_webview, 1130 | object_name: *const awe_string, 1131 | property_name: *const awe_string, 1132 | value: *const awe_jsvalue); 1133 | pub fn awe_webview_set_object_callback(webview: *mut awe_webview, 1134 | object_name: *const awe_string, 1135 | callback_name: *const awe_string); 1136 | pub fn awe_webview_is_loading_page(webview: *mut awe_webview) -> u8; 1137 | pub fn awe_webview_is_dirty(webview: *mut awe_webview) -> u8; 1138 | pub fn awe_webview_get_dirty_bounds(webview: *mut awe_webview) 1139 | -> awe_rect; 1140 | pub fn awe_webview_render(webview: *mut awe_webview) 1141 | -> *const awe_renderbuffer; 1142 | pub fn awe_webview_pause_rendering(webview: *mut awe_webview); 1143 | pub fn awe_webview_resume_rendering(webview: *mut awe_webview); 1144 | pub fn awe_webview_inject_mouse_move(webview: *mut awe_webview, 1145 | x: ::std::os::raw::c_int, 1146 | y: ::std::os::raw::c_int); 1147 | pub fn awe_webview_inject_mouse_down(webview: *mut awe_webview, 1148 | button: awe_mousebutton); 1149 | pub fn awe_webview_inject_mouse_up(webview: *mut awe_webview, 1150 | button: awe_mousebutton); 1151 | pub fn awe_webview_inject_mouse_wheel(webview: *mut awe_webview, 1152 | scroll_amount_vert: 1153 | ::std::os::raw::c_int, 1154 | scroll_amount_horz: 1155 | ::std::os::raw::c_int); 1156 | pub fn awe_webview_inject_keyboard_event(webview: *mut awe_webview, 1157 | key_event: awe_webkeyboardevent); 1158 | pub fn awe_webview_cut(webview: *mut awe_webview); 1159 | pub fn awe_webview_copy(webview: *mut awe_webview); 1160 | pub fn awe_webview_paste(webview: *mut awe_webview); 1161 | pub fn awe_webview_select_all(webview: *mut awe_webview); 1162 | pub fn awe_webview_copy_image_at(webview: *mut awe_webview, 1163 | x: ::std::os::raw::c_int, 1164 | y: ::std::os::raw::c_int); 1165 | pub fn awe_webview_set_zoom(webview: *mut awe_webview, 1166 | zoom_percent: ::std::os::raw::c_int); 1167 | pub fn awe_webview_reset_zoom(webview: *mut awe_webview); 1168 | pub fn awe_webview_get_zoom(webview: *mut awe_webview) 1169 | -> ::std::os::raw::c_int; 1170 | pub fn awe_webview_get_zoom_for_host(webview: *mut awe_webview, 1171 | host: *const awe_string) 1172 | -> ::std::os::raw::c_int; 1173 | pub fn awe_webview_resize(webview: *mut awe_webview, 1174 | width: ::std::os::raw::c_int, 1175 | height: ::std::os::raw::c_int, 1176 | wait_for_repaint: u8, 1177 | repaint_timeout_ms: ::std::os::raw::c_int) 1178 | -> u8; 1179 | pub fn awe_webview_is_resizing(webview: *mut awe_webview) -> u8; 1180 | pub fn awe_webview_unfocus(webview: *mut awe_webview); 1181 | pub fn awe_webview_focus(webview: *mut awe_webview); 1182 | pub fn awe_webview_set_transparent(webview: *mut awe_webview, 1183 | is_transparent: u8); 1184 | pub fn awe_webview_is_transparent(webview: *mut awe_webview) -> u8; 1185 | pub fn awe_webview_set_url_filtering_mode(webview: *mut awe_webview, 1186 | mode: awe_url_filtering_mode); 1187 | pub fn awe_webview_add_url_filter(webview: *mut awe_webview, 1188 | filter: *const awe_string); 1189 | pub fn awe_webview_clear_all_url_filters(webview: *mut awe_webview); 1190 | pub fn awe_webview_set_header_definition(webview: *mut awe_webview, 1191 | name: *const awe_string, 1192 | num_fields: size_t, 1193 | field_names: 1194 | *mut *const awe_string, 1195 | field_values: 1196 | *mut *const awe_string); 1197 | pub fn awe_webview_add_header_rewrite_rule(webview: *mut awe_webview, 1198 | rule: *const awe_string, 1199 | name: *const awe_string); 1200 | pub fn awe_webview_remove_header_rewrite_rule(webview: *mut awe_webview, 1201 | rule: *const awe_string); 1202 | pub fn awe_webview_remove_header_rewrite_rules_by_definition_name(webview: 1203 | *mut awe_webview, 1204 | name: 1205 | *const awe_string); 1206 | pub fn awe_webview_choose_file(webview: *mut awe_webview, 1207 | file_path: *const awe_string); 1208 | pub fn awe_webview_print(webview: *mut awe_webview); 1209 | pub fn awe_webview_request_scroll_data(webview: *mut awe_webview, 1210 | frame_name: *const awe_string); 1211 | pub fn awe_webview_find(webview: *mut awe_webview, 1212 | request_id: ::std::os::raw::c_int, 1213 | search_string: *const awe_string, forward: u8, 1214 | case_sensitive: u8, find_next: u8); 1215 | pub fn awe_webview_stop_find(webview: *mut awe_webview, 1216 | clear_selection: u8); 1217 | pub fn awe_webview_translate_page(webview: *mut awe_webview, 1218 | source_language: *const awe_string, 1219 | target_language: *const awe_string); 1220 | pub fn awe_webview_activate_ime(webview: *mut awe_webview, activate: u8); 1221 | pub fn awe_webview_set_ime_composition(webview: *mut awe_webview, 1222 | input_string: *const awe_string, 1223 | cursor_pos: ::std::os::raw::c_int, 1224 | target_start: 1225 | ::std::os::raw::c_int, 1226 | target_end: ::std::os::raw::c_int); 1227 | pub fn awe_webview_confirm_ime_composition(webview: *mut awe_webview, 1228 | input_string: 1229 | *const awe_string); 1230 | pub fn awe_webview_cancel_ime_composition(webview: *mut awe_webview); 1231 | pub fn awe_webview_login(webview: *mut awe_webview, 1232 | request_id: ::std::os::raw::c_int, 1233 | username: *const awe_string, 1234 | password: *const awe_string); 1235 | pub fn awe_webview_cancel_login(webview: *mut awe_webview, 1236 | request_id: ::std::os::raw::c_int); 1237 | pub fn awe_webview_close_javascript_dialog(webview: *mut awe_webview, 1238 | request_id: 1239 | ::std::os::raw::c_int, 1240 | was_cancelled: u8, 1241 | prompt_text: 1242 | *const awe_string); 1243 | pub fn awe_webview_set_callback_begin_navigation(webview: 1244 | *mut awe_webview, 1245 | callback: 1246 | ::std::option::Option); 1252 | pub fn awe_webview_set_callback_begin_loading(webview: *mut awe_webview, 1253 | callback: 1254 | ::std::option::Option); 1264 | pub fn awe_webview_set_callback_finish_loading(webview: *mut awe_webview, 1265 | callback: 1266 | ::std::option::Option); 1268 | pub fn awe_webview_set_callback_js_callback(webview: *mut awe_webview, 1269 | callback: 1270 | ::std::option::Option); 1278 | pub fn awe_webview_set_callback_receive_title(webview: *mut awe_webview, 1279 | callback: 1280 | ::std::option::Option); 1286 | pub fn awe_webview_set_callback_change_tooltip(webview: *mut awe_webview, 1287 | callback: 1288 | ::std::option::Option); 1292 | pub fn awe_webview_set_callback_change_cursor(webview: *mut awe_webview, 1293 | callback: 1294 | ::std::option::Option); 1298 | pub fn awe_webview_set_callback_change_keyboard_focus(webview: 1299 | *mut awe_webview, 1300 | callback: 1301 | ::std::option::Option); 1305 | pub fn awe_webview_set_callback_change_target_url(webview: 1306 | *mut awe_webview, 1307 | callback: 1308 | ::std::option::Option); 1312 | pub fn awe_webview_set_callback_open_external_link(webview: 1313 | *mut awe_webview, 1314 | callback: 1315 | ::std::option::Option); 1321 | pub fn awe_webview_set_callback_request_download(webview: 1322 | *mut awe_webview, 1323 | callback: 1324 | ::std::option::Option); 1328 | pub fn awe_webview_set_callback_web_view_crashed(webview: 1329 | *mut awe_webview, 1330 | callback: 1331 | ::std::option::Option); 1333 | pub fn awe_webview_set_callback_plugin_crashed(webview: *mut awe_webview, 1334 | callback: 1335 | ::std::option::Option); 1339 | pub fn awe_webview_set_callback_request_move(webview: *mut awe_webview, 1340 | callback: 1341 | ::std::option::Option); 1347 | pub fn awe_webview_set_callback_get_page_contents(webview: 1348 | *mut awe_webview, 1349 | callback: 1350 | ::std::option::Option); 1356 | pub fn awe_webview_set_callback_dom_ready(webview: *mut awe_webview, 1357 | callback: 1358 | ::std::option::Option); 1360 | pub fn awe_webview_set_callback_request_file_chooser(webview: 1361 | *mut awe_webview, 1362 | callback: 1363 | ::std::option::Option); 1371 | pub fn awe_webview_set_callback_get_scroll_data(webview: *mut awe_webview, 1372 | callback: 1373 | ::std::option::Option); 1385 | pub fn awe_webview_set_callback_js_console_message(webview: 1386 | *mut awe_webview, 1387 | callback: 1388 | ::std::option::Option); 1396 | pub fn awe_webview_set_callback_get_find_results(webview: 1397 | *mut awe_webview, 1398 | callback: 1399 | ::std::option::Option); 1411 | pub fn awe_webview_set_callback_update_ime(webview: *mut awe_webview, 1412 | callback: 1413 | ::std::option::Option); 1419 | pub fn awe_webview_set_callback_show_context_menu(webview: 1420 | *mut awe_webview, 1421 | callback: 1422 | ::std::option::Option); 1446 | pub fn awe_webview_set_callback_request_login(webview: *mut awe_webview, 1447 | callback: 1448 | ::std::option::Option); 1462 | pub fn awe_webview_set_callback_change_history(webview: *mut awe_webview, 1463 | callback: 1464 | ::std::option::Option); 1470 | pub fn awe_webview_set_callback_finish_resize(webview: *mut awe_webview, 1471 | callback: 1472 | ::std::option::Option); 1478 | pub fn awe_webview_set_callback_show_javascript_dialog(webview: 1479 | *mut awe_webview, 1480 | callback: 1481 | ::std::option::Option); 1493 | pub fn awe_jsvalue_create_null_value() -> *mut awe_jsvalue; 1494 | pub fn awe_jsvalue_create_bool_value(value: u8) -> *mut awe_jsvalue; 1495 | pub fn awe_jsvalue_create_integer_value(value: ::std::os::raw::c_int) 1496 | -> *mut awe_jsvalue; 1497 | pub fn awe_jsvalue_create_double_value(value: ::std::os::raw::c_double) 1498 | -> *mut awe_jsvalue; 1499 | pub fn awe_jsvalue_create_string_value(value: *const awe_string) 1500 | -> *mut awe_jsvalue; 1501 | pub fn awe_jsvalue_create_object_value(value: *const awe_jsobject) 1502 | -> *mut awe_jsvalue; 1503 | pub fn awe_jsvalue_create_array_value(value: *const awe_jsarray) 1504 | -> *mut awe_jsvalue; 1505 | pub fn awe_jsvalue_destroy(jsvalue: *mut awe_jsvalue); 1506 | pub fn awe_jsvalue_get_type(jsvalue: *const awe_jsvalue) 1507 | -> awe_jsvalue_type; 1508 | pub fn awe_jsvalue_to_string(jsvalue: *const awe_jsvalue) 1509 | -> *mut awe_string; 1510 | pub fn awe_jsvalue_to_integer(jsvalue: *const awe_jsvalue) 1511 | -> ::std::os::raw::c_int; 1512 | pub fn awe_jsvalue_to_double(jsvalue: *const awe_jsvalue) 1513 | -> ::std::os::raw::c_double; 1514 | pub fn awe_jsvalue_to_boolean(jsvalue: *const awe_jsvalue) -> u8; 1515 | pub fn awe_jsvalue_get_array(jsvalue: *const awe_jsvalue) 1516 | -> *const awe_jsarray; 1517 | pub fn awe_jsvalue_get_object(jsvalue: *const awe_jsvalue) 1518 | -> *const awe_jsobject; 1519 | pub fn awe_jsarray_create(jsvalue_array: *mut *const awe_jsvalue, 1520 | length: size_t) -> *mut awe_jsarray; 1521 | pub fn awe_jsarray_destroy(jsarray: *mut awe_jsarray); 1522 | pub fn awe_jsarray_get_size(jsarray: *const awe_jsarray) -> size_t; 1523 | pub fn awe_jsarray_get_element(jsarray: *const awe_jsarray, index: size_t) 1524 | -> *const awe_jsvalue; 1525 | pub fn awe_jsobject_create() -> *mut awe_jsobject; 1526 | pub fn awe_jsobject_destroy(jsobject: *mut awe_jsobject); 1527 | pub fn awe_jsobject_has_property(jsobject: *const awe_jsobject, 1528 | property_name: *const awe_string) -> u8; 1529 | pub fn awe_jsobject_get_property(jsobject: *const awe_jsobject, 1530 | property_name: *const awe_string) 1531 | -> *const awe_jsvalue; 1532 | pub fn awe_jsobject_set_property(jsobject: *mut awe_jsobject, 1533 | property_name: *const awe_string, 1534 | value: *const awe_jsvalue); 1535 | pub fn awe_jsobject_get_size(jsobject: *mut awe_jsobject) -> size_t; 1536 | pub fn awe_jsobject_get_keys(jsobject: *mut awe_jsobject) 1537 | -> *mut awe_jsarray; 1538 | pub fn awe_renderbuffer_get_width(renderbuffer: *const awe_renderbuffer) 1539 | -> ::std::os::raw::c_int; 1540 | pub fn awe_renderbuffer_get_height(renderbuffer: *const awe_renderbuffer) 1541 | -> ::std::os::raw::c_int; 1542 | pub fn awe_renderbuffer_get_rowspan(renderbuffer: *const awe_renderbuffer) 1543 | -> ::std::os::raw::c_int; 1544 | pub fn awe_renderbuffer_get_buffer(renderbuffer: *const awe_renderbuffer) 1545 | -> *const ::std::os::raw::c_uchar; 1546 | pub fn awe_renderbuffer_copy_to(renderbuffer: *const awe_renderbuffer, 1547 | dest_buffer: *mut ::std::os::raw::c_uchar, 1548 | dest_rowspan: ::std::os::raw::c_int, 1549 | dest_depth: ::std::os::raw::c_int, 1550 | convert_to_rgba: u8, flip_y: u8); 1551 | pub fn awe_renderbuffer_copy_to_float(renderbuffer: 1552 | *const awe_renderbuffer, 1553 | dest_buffer: 1554 | *mut ::std::os::raw::c_float); 1555 | pub fn awe_renderbuffer_save_to_png(renderbuffer: *const awe_renderbuffer, 1556 | file_path: *const awe_string, 1557 | preserve_transparency: u8) -> u8; 1558 | pub fn awe_renderbuffer_save_to_jpeg(renderbuffer: 1559 | *const awe_renderbuffer, 1560 | file_path: *const awe_string, 1561 | quality: ::std::os::raw::c_int) 1562 | -> u8; 1563 | pub fn awe_renderbuffer_get_alpha_at_point(renderbuffer: 1564 | *const awe_renderbuffer, 1565 | x: ::std::os::raw::c_int, 1566 | y: ::std::os::raw::c_int) 1567 | -> ::std::os::raw::c_uchar; 1568 | pub fn awe_renderbuffer_flush_alpha(renderbuffer: 1569 | *const awe_renderbuffer); 1570 | pub fn awe_webview_set_callback_resource_request(webview: 1571 | *mut awe_webview, 1572 | callback: 1573 | ::std::option::Option 1578 | *mut awe_resource_response>); 1579 | pub fn awe_webview_set_callback_resource_response(webview: 1580 | *mut awe_webview, 1581 | callback: 1582 | ::std::option::Option); 1598 | pub fn awe_resource_response_create(num_bytes: size_t, 1599 | buffer: *mut ::std::os::raw::c_uchar, 1600 | mime_type: *const awe_string) 1601 | -> *mut awe_resource_response; 1602 | pub fn awe_resource_response_create_from_file(file_path: 1603 | *const awe_string) 1604 | -> *mut awe_resource_response; 1605 | pub fn awe_resource_request_cancel(request: *mut awe_resource_request); 1606 | pub fn awe_resource_request_get_url(request: *mut awe_resource_request) 1607 | -> *mut awe_string; 1608 | pub fn awe_resource_request_get_method(request: *mut awe_resource_request) 1609 | -> *mut awe_string; 1610 | pub fn awe_resource_request_set_method(request: *mut awe_resource_request, 1611 | method: *const awe_string); 1612 | pub fn awe_resource_request_get_referrer(request: 1613 | *mut awe_resource_request) 1614 | -> *mut awe_string; 1615 | pub fn awe_resource_request_set_referrer(request: 1616 | *mut awe_resource_request, 1617 | referrer: *const awe_string); 1618 | pub fn awe_resource_request_get_extra_headers(request: 1619 | *mut awe_resource_request) 1620 | -> *mut awe_string; 1621 | pub fn awe_resource_request_set_extra_headers(request: 1622 | *mut awe_resource_request, 1623 | headers: *const awe_string); 1624 | pub fn awe_resource_request_append_extra_header(request: 1625 | *mut awe_resource_request, 1626 | name: *const awe_string, 1627 | value: *const awe_string); 1628 | pub fn awe_resource_request_get_num_upload_elements(request: 1629 | *mut awe_resource_request) 1630 | -> size_t; 1631 | pub fn awe_resource_request_get_upload_element(request: 1632 | *mut awe_resource_request, 1633 | idx: size_t) 1634 | -> *const awe_upload_element; 1635 | pub fn awe_resource_request_clear_upload_elements(request: 1636 | *mut awe_resource_request); 1637 | pub fn awe_resource_request_append_upload_file_path(request: 1638 | *mut awe_resource_request, 1639 | file_path: 1640 | *const awe_string); 1641 | pub fn awe_resource_request_append_upload_bytes(request: 1642 | *mut awe_resource_request, 1643 | bytes: *const awe_string); 1644 | pub fn awe_upload_element_is_file_path(ele: *const awe_upload_element) 1645 | -> u8; 1646 | pub fn awe_upload_element_is_bytes(ele: *const awe_upload_element) -> u8; 1647 | pub fn awe_upload_element_get_bytes(ele: *const awe_upload_element) 1648 | -> *mut awe_string; 1649 | pub fn awe_upload_element_get_file_path(ele: *const awe_upload_element) 1650 | -> *mut awe_string; 1651 | pub fn awe_history_query_result_destroy(res: 1652 | *mut awe_history_query_result); 1653 | pub fn awe_history_query_result_get_size(res: 1654 | *mut awe_history_query_result) 1655 | -> size_t; 1656 | pub fn awe_history_query_result_get_entry_at_index(res: 1657 | *mut awe_history_query_result, 1658 | idx: size_t) 1659 | -> *mut awe_history_entry; 1660 | pub fn awe_history_entry_destroy(entry: *mut awe_history_entry); 1661 | pub fn awe_history_entry_get_url(entry: *mut awe_history_entry) 1662 | -> *mut awe_string; 1663 | pub fn awe_history_entry_get_title(entry: *mut awe_history_entry) 1664 | -> *mut awe_string; 1665 | pub fn awe_history_entry_get_visit_time(entry: *mut awe_history_entry) 1666 | -> ::std::os::raw::c_double; 1667 | pub fn awe_history_entry_get_visit_count(entry: *mut awe_history_entry) 1668 | -> ::std::os::raw::c_int; 1669 | } 1670 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | extern crate awesomium_sys as awe; 2 | 3 | use std::ffi::CStr; 4 | use std::ffi::CString; 5 | use std::os::raw::{c_void}; 6 | use std::cell::RefCell; 7 | use std::ptr::null_mut; 8 | use std::convert::From; 9 | 10 | pub struct AweString(*const awe::awe_string); 11 | 12 | fn awe_string_create_from_ascii(string : &str) -> AweString { 13 | AweString (unsafe { 14 | let string = CString::new(string).unwrap(); 15 | awe::awe_string_create_from_ascii(string.as_ptr(), string.as_bytes().len()) 16 | }) 17 | } 18 | 19 | fn awe_string_empty() -> AweString { 20 | AweString(unsafe { awe::awe_string_empty() }) 21 | } 22 | 23 | 24 | impl<'a> From> for AweString { 25 | fn from(string : Option<&'a str>) -> Self { 26 | match string { 27 | None => awe_string_empty(), 28 | Some(string) => awe_string_create_from_ascii(string) 29 | } 30 | } 31 | } 32 | 33 | impl<'a> From<&'a str> for AweString { 34 | fn from(string : &'a str) -> Self { 35 | awe_string_create_from_ascii(string) 36 | } 37 | } 38 | 39 | pub fn awe_webcore_initialize_default() { 40 | unsafe { awe::awe_webcore_initialize_default(); } 41 | } 42 | 43 | pub struct AweWebView { 44 | web_view : *mut awe::awe_webview 45 | } 46 | 47 | pub fn awe_webcore_create_webview(width : isize, 48 | height : isize, 49 | view_source : bool) -> AweWebView { 50 | AweWebView { 51 | web_view : unsafe { 52 | awe::awe_webcore_create_webview(width as i32, height as i32, view_source as u8) 53 | } 54 | } 55 | } 56 | 57 | pub struct InitializeParams<'a> { 58 | pub enable_plugins: bool, 59 | pub enable_javascript: bool, 60 | pub enable_databases: bool, 61 | pub package_path: Option<&'a str>, 62 | pub locale_path: Option<&'a str>, 63 | pub user_data_path: Option<&'a str>, 64 | pub plugin_path: Option<&'a str>, 65 | pub log_path: Option<&'a str>, 66 | pub log_level: awe::awe_loglevel, 67 | pub force_single_process: bool, 68 | pub child_process_path: Option<&'a str>, 69 | pub enable_auto_detect_encoding: bool, 70 | pub accept_language_override: Option<&'a str>, 71 | pub default_charset_override: Option<&'a str>, 72 | pub user_agent_override: Option<&'a str>, 73 | pub proxy_server: Option<&'a str>, 74 | pub proxy_config_script: Option<&'a str>, 75 | pub auth_server_whitelist: Option<&'a str>, 76 | pub save_cache_and_cookies: bool, 77 | pub max_cache_size: i32, 78 | pub disable_same_origin_policy: bool, 79 | pub disable_win_message_pump: bool, 80 | pub custom_css: Option<&'a str> 81 | } 82 | 83 | impl <'a> Default for InitializeParams<'a> { 84 | fn default() -> InitializeParams<'a> { 85 | InitializeParams { 86 | enable_plugins : false, 87 | enable_javascript : true, 88 | enable_databases : false, 89 | package_path : None, 90 | locale_path : None, 91 | user_data_path : None, 92 | plugin_path : None, 93 | log_path : None, 94 | log_level : awe::_awe_loglevel::AWE_LL_NORMAL, 95 | force_single_process : false, 96 | child_process_path : None, 97 | enable_auto_detect_encoding : true, 98 | accept_language_override : None, 99 | default_charset_override : None, 100 | user_agent_override : None, 101 | proxy_server : None, 102 | proxy_config_script : None, 103 | save_cache_and_cookies : true, 104 | max_cache_size : 0, 105 | disable_same_origin_policy : false, 106 | disable_win_message_pump : false, 107 | custom_css : None, 108 | auth_server_whitelist : None 109 | } 110 | } 111 | } 112 | pub fn awe_webcore_initialize<'a>(params : InitializeParams<'a>) { 113 | unsafe { 114 | awe::awe_webcore_initialize( 115 | params.enable_plugins as u8, 116 | params.enable_javascript as u8, 117 | params.enable_databases as u8, 118 | AweString::from(params.package_path).0, 119 | AweString::from(params.locale_path).0, 120 | AweString::from(params.user_data_path).0, 121 | AweString::from(params.plugin_path).0, 122 | AweString::from(params.log_path).0, 123 | params.log_level, 124 | params.force_single_process as u8, 125 | AweString::from(params.child_process_path).0, 126 | params.enable_auto_detect_encoding as u8, 127 | AweString::from(params.accept_language_override).0, 128 | AweString::from(params.default_charset_override).0, 129 | AweString::from(params.user_agent_override).0, 130 | AweString::from(params.proxy_server).0, 131 | AweString::from(params.proxy_config_script).0, 132 | AweString::from(params.auth_server_whitelist).0, 133 | params.save_cache_and_cookies as u8, 134 | params.max_cache_size, 135 | params.disable_same_origin_policy as u8, 136 | params.disable_win_message_pump as u8, 137 | AweString::from(params.custom_css).0) 138 | } 139 | } 140 | 141 | pub fn awe_webcore_set_base_directory(path : &str) { 142 | unsafe { 143 | let path = CString::new(path).unwrap(); 144 | let string = awe::awe_string_create_from_ascii(path.as_ptr(), path.as_bytes().len()); 145 | awe::awe_webcore_set_base_directory(string); 146 | } 147 | } 148 | 149 | pub fn awe_webcore_update() { 150 | unsafe { awe::awe_webcore_update(); } 151 | } 152 | 153 | thread_local!(static LOG_CALLBACK: RefCell<*mut c_void> = 154 | RefCell::new(null_mut())); 155 | 156 | impl AweWebView { 157 | pub fn set_callback_js_console_message(&self, callback : F) 158 | where F : Fn(&AweWebView, &str, i32, &str) { 159 | LOG_CALLBACK.with(|log| { 160 | *log.borrow_mut() = &callback as *const _ as *mut c_void; 161 | }); 162 | 163 | unsafe { awe::awe_webview_set_callback_js_console_message(self.web_view, 164 | Some(wrapper::)); 165 | } 166 | 167 | unsafe extern "C" fn wrapper(caller: *mut awe::awe_webview, 168 | message: *const awe::awe_string, 169 | line_number: ::std::os::raw::c_int, 170 | source: *const awe::awe_string) 171 | where F : Fn(&AweWebView, &str, i32, &str) { 172 | 173 | let mut umessage : [i8; 200] = [0; 200]; 174 | 175 | awe::awe_string_to_utf8(message, umessage.as_mut_ptr(), 200); 176 | 177 | let mut usource : [i8; 200] = [0; 200]; 178 | awe::awe_string_to_utf8(source, usource.as_mut_ptr(), 200); 179 | LOG_CALLBACK.with(|z| { 180 | let closure = *z.borrow_mut() as *mut F; 181 | (*closure)( 182 | &AweWebView{ web_view : caller }, 183 | CStr::from_ptr(umessage.as_ptr()).to_str().unwrap(), 184 | line_number, 185 | CStr::from_ptr(usource.as_ptr()).to_str().unwrap()); }); 186 | } 187 | 188 | 189 | } 190 | 191 | pub fn set_callback_finish_loading(&self, callback : F) 192 | where F : Fn(&AweWebView) { 193 | FINISH_CALLBACK.with(|log| { 194 | *log.borrow_mut() = &callback as *const _ as *mut c_void; 195 | }); 196 | 197 | unsafe { awe::awe_webview_set_callback_finish_loading(self.web_view, 198 | Some(wrapper::)); 199 | } 200 | 201 | unsafe extern "C" fn wrapper(caller: *mut awe::awe_webview) 202 | where F : Fn(&AweWebView) { 203 | 204 | LOG_CALLBACK.with(|z| { 205 | let closure = *z.borrow_mut() as *mut F; 206 | (*closure)( &AweWebView{ web_view : caller } ); 207 | }); 208 | } 209 | } 210 | pub fn set_transparent(&self, transparent : bool) { 211 | unsafe { 212 | awe::awe_webview_set_transparent(self.web_view, transparent as u8); 213 | } 214 | } 215 | 216 | pub fn load_file(&self, path : &str, _frame_name : &str) { 217 | let path = CString::new(path).unwrap(); 218 | let string = unsafe { awe::awe_string_create_from_ascii(path.as_ptr(), path.as_bytes().len()) }; 219 | 220 | unsafe { awe::awe_webview_load_file(self.web_view, 221 | string, 222 | awe::awe_string_empty()) } 223 | } 224 | 225 | pub fn is_loading_page(&self) -> bool { 226 | unsafe { awe::awe_webview_is_loading_page(self.web_view) != 0 } 227 | } 228 | 229 | pub fn render(&self) -> AweRenderBuffer { 230 | AweRenderBuffer { 231 | buffer : unsafe {awe::awe_webview_render(self.web_view)} 232 | } 233 | } 234 | 235 | pub fn execute_javascript(&self, javascript : &str, frame_name : Option<&str>) { 236 | unsafe { 237 | awe::awe_webview_execute_javascript( 238 | self.web_view, 239 | AweString::from(javascript).0, 240 | AweString::from(frame_name).0) 241 | } 242 | } 243 | } 244 | 245 | thread_local!(static FINISH_CALLBACK: RefCell<*mut c_void> = 246 | RefCell::new(null_mut())); 247 | 248 | 249 | pub struct AweRenderBuffer { 250 | buffer : *const awe::awe_renderbuffer 251 | } 252 | 253 | pub fn awe_renderbuffer_get_buffer(buffer : &AweRenderBuffer) -> *const u8 { 254 | unsafe { awe::awe_renderbuffer_get_buffer(buffer.buffer) } 255 | } 256 | 257 | pub fn awe_renderbuffer_get_buffer_slice(buffer : &AweRenderBuffer) -> &[(u8, u8, u8, u8)] { 258 | let width = awe_renderbuffer_get_width(buffer); 259 | let height = awe_renderbuffer_get_height(buffer); 260 | let buffer = unsafe { awe::awe_renderbuffer_get_buffer(buffer.buffer) }; 261 | let buffer : *const (u8, u8, u8, u8) = unsafe { ::std::mem::transmute(buffer)}; 262 | unsafe {::std::slice::from_raw_parts(buffer, (width * height) as usize) } 263 | } 264 | pub fn awe_renderbuffer_get_width(buffer : &AweRenderBuffer) -> i32 { 265 | unsafe { awe::awe_renderbuffer_get_width(buffer.buffer) } 266 | } 267 | pub fn awe_renderbuffer_get_height(buffer : &AweRenderBuffer) -> i32 { 268 | unsafe { awe::awe_renderbuffer_get_height(buffer.buffer) } 269 | } 270 | --------------------------------------------------------------------------------