Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. /* automatically generated by rust-bindgen */
  2.  
  3. #[repr(C)]
  4. #[derive(Debug, Copy)]
  5. pub struct Rectangle {
  6. pub width: ::std::os::raw::c_int,
  7. pub height: ::std::os::raw::c_int,
  8. }
  9. #[test]
  10. fn bindgen_test_layout_Rectangle() {
  11. assert_eq!(::std::mem::size_of::<Rectangle>() , 8usize);
  12. assert_eq!(::std::mem::align_of::<Rectangle>() , 4usize);
  13. }
  14. extern "C" {
  15. #[link_name = "_ZN9Rectangle14set_values_mutEii"]
  16. pub fn Rectangle_set_values_mut(this: *mut Rectangle,
  17. arg1: ::std::os::raw::c_int,
  18. arg2: ::std::os::raw::c_int);
  19. }
  20. extern "C" {
  21. #[link_name = "_ZNK9Rectangle10set_valuesEii"]
  22. pub fn Rectangle_set_values(this: *const Rectangle,
  23. arg1: ::std::os::raw::c_int,
  24. arg2: ::std::os::raw::c_int);
  25. }
  26. extern "C" {
  27. #[link_name = "_ZN9Rectangle9get_widthEv"]
  28. pub fn Rectangle_get_width(this: *mut Rectangle) -> ::std::os::raw::c_int;
  29. }
  30. extern "C" {
  31. #[link_name = "_ZN9Rectangle10get_heightEv"]
  32. pub fn Rectangle_get_height(this: *mut Rectangle)
  33. -> ::std::os::raw::c_int;
  34. }
  35. extern "C" {
  36. #[link_name = "_ZN9Rectangle4areaEv"]
  37. pub fn Rectangle_area(this: *mut Rectangle) -> ::std::os::raw::c_int;
  38. }
  39. extern "C" {
  40. #[link_name = "_ZN9RectangleC1Eii"]
  41. pub fn Rectangle_Rectangle(this: *mut Rectangle, w: ::std::os::raw::c_int,
  42. h: ::std::os::raw::c_int);
  43. }
  44. extern "C" {
  45. #[link_name = "_ZN9RectangleC1ERKS_"]
  46. pub fn Rectangle_Rectangle1(this: *mut Rectangle, r: *const Rectangle);
  47. }
  48. impl Clone for Rectangle {
  49. fn clone(&self) -> Self { *self }
  50. }
  51. impl Rectangle {
  52. #[inline]
  53. pub unsafe fn set_values_mut(&mut self, arg1: ::std::os::raw::c_int,
  54. arg2: ::std::os::raw::c_int) {
  55. Rectangle_set_values_mut(&mut *self, arg1, arg2)
  56. }
  57. #[inline]
  58. pub unsafe fn set_values(&self, arg1: ::std::os::raw::c_int,
  59. arg2: ::std::os::raw::c_int) {
  60. Rectangle_set_values(&*self, arg1, arg2)
  61. }
  62. #[inline]
  63. pub unsafe fn get_width(&mut self) -> ::std::os::raw::c_int {
  64. Rectangle_get_width(&mut *self)
  65. }
  66. #[inline]
  67. pub unsafe fn get_height(&mut self) -> ::std::os::raw::c_int {
  68. Rectangle_get_height(&mut *self)
  69. }
  70. #[inline]
  71. pub unsafe fn area(&mut self) -> ::std::os::raw::c_int {
  72. Rectangle_area(&mut *self)
  73. }
  74. #[inline]
  75. pub unsafe fn new(w: ::std::os::raw::c_int, h: ::std::os::raw::c_int)
  76. -> Self {
  77. let mut __bindgen_tmp = ::std::mem::uninitialized();
  78. Rectangle_Rectangle(&mut __bindgen_tmp, w, h);
  79. __bindgen_tmp
  80. }
  81. #[inline]
  82. pub unsafe fn new1(r: *const Rectangle) -> Self {
  83. let mut __bindgen_tmp = ::std::mem::uninitialized();
  84. Rectangle_Rectangle1(&mut __bindgen_tmp, r);
  85. __bindgen_tmp
  86. }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement