1 // This file was generated by gir (https://github.com/gtk-rs/gir) 2 // from gir-files (https://github.com/gtk-rs/gir-files) 3 // DO NOT EDIT 4 5 use atk_sys; 6 use glib::object::IsA; 7 use glib::translate::*; 8 use std::fmt; 9 use std::mem; 10 use Object; 11 12 glib_wrapper! { 13 pub struct TableCell(Interface<atk_sys::AtkTableCell>) @requires Object; 14 15 match fn { 16 get_type => || atk_sys::atk_table_cell_get_type(), 17 } 18 } 19 20 pub const NONE_TABLE_CELL: Option<&TableCell> = None; 21 22 pub trait TableCellExt: 'static { 23 //fn get_column_header_cells(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 9 }; 24 get_column_span(&self) -> i3225 fn get_column_span(&self) -> i32; 26 get_position(&self) -> Option<(i32, i32)>27 fn get_position(&self) -> Option<(i32, i32)>; 28 get_row_column_span(&self) -> Option<(i32, i32, i32, i32)>29 fn get_row_column_span(&self) -> Option<(i32, i32, i32, i32)>; 30 31 //fn get_row_header_cells(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 9 }; 32 get_row_span(&self) -> i3233 fn get_row_span(&self) -> i32; 34 get_table(&self) -> Option<Object>35 fn get_table(&self) -> Option<Object>; 36 } 37 38 impl<O: IsA<TableCell>> TableCellExt for O { 39 //fn get_column_header_cells(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 9 } { 40 // unsafe { TODO: call atk_sys:atk_table_cell_get_column_header_cells() } 41 //} 42 get_column_span(&self) -> i3243 fn get_column_span(&self) -> i32 { 44 unsafe { atk_sys::atk_table_cell_get_column_span(self.as_ref().to_glib_none().0) } 45 } 46 get_position(&self) -> Option<(i32, i32)>47 fn get_position(&self) -> Option<(i32, i32)> { 48 unsafe { 49 let mut row = mem::uninitialized(); 50 let mut column = mem::uninitialized(); 51 let ret = from_glib(atk_sys::atk_table_cell_get_position( 52 self.as_ref().to_glib_none().0, 53 &mut row, 54 &mut column, 55 )); 56 if ret { 57 Some((row, column)) 58 } else { 59 None 60 } 61 } 62 } 63 get_row_column_span(&self) -> Option<(i32, i32, i32, i32)>64 fn get_row_column_span(&self) -> Option<(i32, i32, i32, i32)> { 65 unsafe { 66 let mut row = mem::uninitialized(); 67 let mut column = mem::uninitialized(); 68 let mut row_span = mem::uninitialized(); 69 let mut column_span = mem::uninitialized(); 70 let ret = from_glib(atk_sys::atk_table_cell_get_row_column_span( 71 self.as_ref().to_glib_none().0, 72 &mut row, 73 &mut column, 74 &mut row_span, 75 &mut column_span, 76 )); 77 if ret { 78 Some((row, column, row_span, column_span)) 79 } else { 80 None 81 } 82 } 83 } 84 85 //fn get_row_header_cells(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 9 } { 86 // unsafe { TODO: call atk_sys:atk_table_cell_get_row_header_cells() } 87 //} 88 get_row_span(&self) -> i3289 fn get_row_span(&self) -> i32 { 90 unsafe { atk_sys::atk_table_cell_get_row_span(self.as_ref().to_glib_none().0) } 91 } 92 get_table(&self) -> Option<Object>93 fn get_table(&self) -> Option<Object> { 94 unsafe { 95 from_glib_full(atk_sys::atk_table_cell_get_table( 96 self.as_ref().to_glib_none().0, 97 )) 98 } 99 } 100 } 101 102 impl fmt::Display for TableCell { fmt(&self, f: &mut fmt::Formatter) -> fmt::Result103 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 104 write!(f, "TableCell") 105 } 106 } 107