1use std::cell::Cell;
3use std::rc::Rc;
4
5#[allow(unused_imports)]
6use std::marker::PhantomData;
7
8#[allow(unused_imports)]
9use std::os::raw::c_void;
10
11#[allow(unused_imports)]
12use std::mem::transmute;
13
14#[allow(unused_imports)]
15use std::ffi::{CStr, CString};
16
17use rute_ffi_base::*;
18
19#[allow(unused_imports)]
20use auto::*;
21
22pub(crate) unsafe extern "C" fn line_edit_text_changed_trampoline_ud<T>(
23 self_c: *const c_void,
24 func: *const c_void,
25 arg0: *const ::std::os::raw::c_char,
26) {
27 let f: &&(Fn(&T, &str) + 'static) = transmute(func);
28 let str_in_arg0_0 = CStr::from_ptr(arg0);
29
30 let data = self_c as *const T;
31 f(&*data, str_in_arg0_0.to_str().unwrap());
32}
33
34#[allow(unused_variables)]
35pub(crate) unsafe extern "C" fn line_edit_text_changed_trampoline(
36 self_c: *const c_void,
37 func: *const c_void,
38 arg0: *const ::std::os::raw::c_char,
39) {
40 let f: &&(Fn(&str) + 'static) = transmute(func);
41 let str_in_arg0_0 = CStr::from_ptr(arg0);
42
43 f(str_in_arg0_0.to_str().unwrap());
44}
45
46pub(crate) unsafe extern "C" fn line_edit_text_edited_trampoline_ud<T>(
47 self_c: *const c_void,
48 func: *const c_void,
49 arg0: *const ::std::os::raw::c_char,
50) {
51 let f: &&(Fn(&T, &str) + 'static) = transmute(func);
52 let str_in_arg0_0 = CStr::from_ptr(arg0);
53
54 let data = self_c as *const T;
55 f(&*data, str_in_arg0_0.to_str().unwrap());
56}
57
58#[allow(unused_variables)]
59pub(crate) unsafe extern "C" fn line_edit_text_edited_trampoline(
60 self_c: *const c_void,
61 func: *const c_void,
62 arg0: *const ::std::os::raw::c_char,
63) {
64 let f: &&(Fn(&str) + 'static) = transmute(func);
65 let str_in_arg0_0 = CStr::from_ptr(arg0);
66
67 f(str_in_arg0_0.to_str().unwrap());
68}
69
70pub(crate) unsafe extern "C" fn line_edit_cursor_position_changed_trampoline_ud<T>(
71 self_c: *const c_void,
72 func: *const c_void,
73 arg0: i32,
74 arg1: i32,
75) {
76 let f: &&(Fn(&T, i32, i32) + 'static) = transmute(func);
77
78 let data = self_c as *const T;
79 f(&*data, arg0, arg1);
80}
81
82#[allow(unused_variables)]
83pub(crate) unsafe extern "C" fn line_edit_cursor_position_changed_trampoline(
84 self_c: *const c_void,
85 func: *const c_void,
86 arg0: i32,
87 arg1: i32,
88) {
89 let f: &&(Fn(i32, i32) + 'static) = transmute(func);
90
91 f(arg0, arg1);
92}
93
94pub(crate) unsafe extern "C" fn line_edit_return_pressed_trampoline_ud<T>(
95 self_c: *const c_void,
96 func: *const c_void,
97) {
98 let f: &&(Fn(&T) + 'static) = transmute(func);
99
100 let data = self_c as *const T;
101 f(&*data);
102}
103
104#[allow(unused_variables)]
105pub(crate) unsafe extern "C" fn line_edit_return_pressed_trampoline(
106 self_c: *const c_void,
107 func: *const c_void,
108) {
109 let f: &&(Fn() + 'static) = transmute(func);
110
111 f();
112}
113
114pub(crate) unsafe extern "C" fn line_edit_editing_finished_trampoline_ud<T>(
115 self_c: *const c_void,
116 func: *const c_void,
117) {
118 let f: &&(Fn(&T) + 'static) = transmute(func);
119
120 let data = self_c as *const T;
121 f(&*data);
122}
123
124#[allow(unused_variables)]
125pub(crate) unsafe extern "C" fn line_edit_editing_finished_trampoline(
126 self_c: *const c_void,
127 func: *const c_void,
128) {
129 let f: &&(Fn() + 'static) = transmute(func);
130
131 f();
132}
133
134pub(crate) unsafe extern "C" fn line_edit_selection_changed_trampoline_ud<T>(
135 self_c: *const c_void,
136 func: *const c_void,
137) {
138 let f: &&(Fn(&T) + 'static) = transmute(func);
139
140 let data = self_c as *const T;
141 f(&*data);
142}
143
144#[allow(unused_variables)]
145pub(crate) unsafe extern "C" fn line_edit_selection_changed_trampoline(
146 self_c: *const c_void,
147 func: *const c_void,
148) {
149 let f: &&(Fn() + 'static) = transmute(func);
150
151 f();
152}
153
154pub(crate) unsafe extern "C" fn line_edit_mouse_press_trampoline_ud<T>(
155 self_c: *const c_void,
156 func: *const c_void,
157 arg0: *const RUBase,
158) {
159 let f: &&(Fn(&T, &MouseEvent) + 'static) = transmute(func);
160 let obj_arg0_0 = MouseEvent::new_from_temporary(*(arg0 as *const RUMouseEvent));
161 let data = self_c as *const T;
162 f(&*data, &obj_arg0_0);
163}
164
165#[allow(unused_variables)]
166pub(crate) unsafe extern "C" fn line_edit_mouse_press_trampoline(
167 self_c: *const c_void,
168 func: *const c_void,
169 arg0: *const RUBase,
170) {
171 let f: &&(Fn(&MouseEvent) + 'static) = transmute(func);
172 let obj_arg0_0 = MouseEvent::new_from_temporary(*(arg0 as *const RUMouseEvent));
173 f(&obj_arg0_0);
174}
175
176pub(crate) unsafe extern "C" fn line_edit_mouse_move_trampoline_ud<T>(
177 self_c: *const c_void,
178 func: *const c_void,
179 arg0: *const RUBase,
180) {
181 let f: &&(Fn(&T, &MouseEvent) + 'static) = transmute(func);
182 let obj_arg0_0 = MouseEvent::new_from_temporary(*(arg0 as *const RUMouseEvent));
183 let data = self_c as *const T;
184 f(&*data, &obj_arg0_0);
185}
186
187#[allow(unused_variables)]
188pub(crate) unsafe extern "C" fn line_edit_mouse_move_trampoline(
189 self_c: *const c_void,
190 func: *const c_void,
191 arg0: *const RUBase,
192) {
193 let f: &&(Fn(&MouseEvent) + 'static) = transmute(func);
194 let obj_arg0_0 = MouseEvent::new_from_temporary(*(arg0 as *const RUMouseEvent));
195 f(&obj_arg0_0);
196}
197
198pub(crate) unsafe extern "C" fn line_edit_mouse_release_trampoline_ud<T>(
199 self_c: *const c_void,
200 func: *const c_void,
201 arg0: *const RUBase,
202) {
203 let f: &&(Fn(&T, &MouseEvent) + 'static) = transmute(func);
204 let obj_arg0_0 = MouseEvent::new_from_temporary(*(arg0 as *const RUMouseEvent));
205 let data = self_c as *const T;
206 f(&*data, &obj_arg0_0);
207}
208
209#[allow(unused_variables)]
210pub(crate) unsafe extern "C" fn line_edit_mouse_release_trampoline(
211 self_c: *const c_void,
212 func: *const c_void,
213 arg0: *const RUBase,
214) {
215 let f: &&(Fn(&MouseEvent) + 'static) = transmute(func);
216 let obj_arg0_0 = MouseEvent::new_from_temporary(*(arg0 as *const RUMouseEvent));
217 f(&obj_arg0_0);
218}
219
220pub(crate) unsafe extern "C" fn line_edit_mouse_double_click_trampoline_ud<T>(
221 self_c: *const c_void,
222 func: *const c_void,
223 arg0: *const RUBase,
224) {
225 let f: &&(Fn(&T, &MouseEvent) + 'static) = transmute(func);
226 let obj_arg0_0 = MouseEvent::new_from_temporary(*(arg0 as *const RUMouseEvent));
227 let data = self_c as *const T;
228 f(&*data, &obj_arg0_0);
229}
230
231#[allow(unused_variables)]
232pub(crate) unsafe extern "C" fn line_edit_mouse_double_click_trampoline(
233 self_c: *const c_void,
234 func: *const c_void,
235 arg0: *const RUBase,
236) {
237 let f: &&(Fn(&MouseEvent) + 'static) = transmute(func);
238 let obj_arg0_0 = MouseEvent::new_from_temporary(*(arg0 as *const RUMouseEvent));
239 f(&obj_arg0_0);
240}
241
242pub(crate) unsafe extern "C" fn line_edit_key_press_trampoline_ud<T>(
243 self_c: *const c_void,
244 func: *const c_void,
245 arg0: *const RUBase,
246) {
247 let f: &&(Fn(&T, &KeyEvent) + 'static) = transmute(func);
248 let obj_arg0_0 = KeyEvent::new_from_temporary(*(arg0 as *const RUKeyEvent));
249 let data = self_c as *const T;
250 f(&*data, &obj_arg0_0);
251}
252
253#[allow(unused_variables)]
254pub(crate) unsafe extern "C" fn line_edit_key_press_trampoline(
255 self_c: *const c_void,
256 func: *const c_void,
257 arg0: *const RUBase,
258) {
259 let f: &&(Fn(&KeyEvent) + 'static) = transmute(func);
260 let obj_arg0_0 = KeyEvent::new_from_temporary(*(arg0 as *const RUKeyEvent));
261 f(&obj_arg0_0);
262}
263
264pub(crate) unsafe extern "C" fn line_edit_focus_in_trampoline_ud<T>(
265 self_c: *const c_void,
266 func: *const c_void,
267 arg0: *const RUBase,
268) {
269 let f: &&(Fn(&T, &FocusEvent) + 'static) = transmute(func);
270 let obj_arg0_0 = FocusEvent::new_from_temporary(*(arg0 as *const RUFocusEvent));
271 let data = self_c as *const T;
272 f(&*data, &obj_arg0_0);
273}
274
275#[allow(unused_variables)]
276pub(crate) unsafe extern "C" fn line_edit_focus_in_trampoline(
277 self_c: *const c_void,
278 func: *const c_void,
279 arg0: *const RUBase,
280) {
281 let f: &&(Fn(&FocusEvent) + 'static) = transmute(func);
282 let obj_arg0_0 = FocusEvent::new_from_temporary(*(arg0 as *const RUFocusEvent));
283 f(&obj_arg0_0);
284}
285
286pub(crate) unsafe extern "C" fn line_edit_focus_out_trampoline_ud<T>(
287 self_c: *const c_void,
288 func: *const c_void,
289 arg0: *const RUBase,
290) {
291 let f: &&(Fn(&T, &FocusEvent) + 'static) = transmute(func);
292 let obj_arg0_0 = FocusEvent::new_from_temporary(*(arg0 as *const RUFocusEvent));
293 let data = self_c as *const T;
294 f(&*data, &obj_arg0_0);
295}
296
297#[allow(unused_variables)]
298pub(crate) unsafe extern "C" fn line_edit_focus_out_trampoline(
299 self_c: *const c_void,
300 func: *const c_void,
301 arg0: *const RUBase,
302) {
303 let f: &&(Fn(&FocusEvent) + 'static) = transmute(func);
304 let obj_arg0_0 = FocusEvent::new_from_temporary(*(arg0 as *const RUFocusEvent));
305 f(&obj_arg0_0);
306}
307
308pub(crate) unsafe extern "C" fn line_edit_paint_trampoline_ud<T>(
309 self_c: *const c_void,
310 func: *const c_void,
311 arg0: *const RUBase,
312) {
313 let f: &&(Fn(&T, &PaintEvent) + 'static) = transmute(func);
314 let obj_arg0_0 = PaintEvent::new_from_temporary(*(arg0 as *const RUPaintEvent));
315 let data = self_c as *const T;
316 f(&*data, &obj_arg0_0);
317}
318
319#[allow(unused_variables)]
320pub(crate) unsafe extern "C" fn line_edit_paint_trampoline(
321 self_c: *const c_void,
322 func: *const c_void,
323 arg0: *const RUBase,
324) {
325 let f: &&(Fn(&PaintEvent) + 'static) = transmute(func);
326 let obj_arg0_0 = PaintEvent::new_from_temporary(*(arg0 as *const RUPaintEvent));
327 f(&obj_arg0_0);
328}
329
330pub(crate) unsafe extern "C" fn line_edit_drag_enter_trampoline_ud<T>(
331 self_c: *const c_void,
332 func: *const c_void,
333 arg0: *const RUBase,
334) {
335 let f: &&(Fn(&T, &DragEnterEvent) + 'static) = transmute(func);
336 let obj_arg0_0 = DragEnterEvent::new_from_temporary(*(arg0 as *const RUDragEnterEvent));
337 let data = self_c as *const T;
338 f(&*data, &obj_arg0_0);
339}
340
341#[allow(unused_variables)]
342pub(crate) unsafe extern "C" fn line_edit_drag_enter_trampoline(
343 self_c: *const c_void,
344 func: *const c_void,
345 arg0: *const RUBase,
346) {
347 let f: &&(Fn(&DragEnterEvent) + 'static) = transmute(func);
348 let obj_arg0_0 = DragEnterEvent::new_from_temporary(*(arg0 as *const RUDragEnterEvent));
349 f(&obj_arg0_0);
350}
351
352pub(crate) unsafe extern "C" fn line_edit_drag_move_trampoline_ud<T>(
353 self_c: *const c_void,
354 func: *const c_void,
355 e: *const RUBase,
356) {
357 let f: &&(Fn(&T, &DragMoveEvent) + 'static) = transmute(func);
358 let obj_e_0 = DragMoveEvent::new_from_temporary(*(e as *const RUDragMoveEvent));
359 let data = self_c as *const T;
360 f(&*data, &obj_e_0);
361}
362
363#[allow(unused_variables)]
364pub(crate) unsafe extern "C" fn line_edit_drag_move_trampoline(
365 self_c: *const c_void,
366 func: *const c_void,
367 e: *const RUBase,
368) {
369 let f: &&(Fn(&DragMoveEvent) + 'static) = transmute(func);
370 let obj_e_0 = DragMoveEvent::new_from_temporary(*(e as *const RUDragMoveEvent));
371 f(&obj_e_0);
372}
373
374pub(crate) unsafe extern "C" fn line_edit_drag_leave_trampoline_ud<T>(
375 self_c: *const c_void,
376 func: *const c_void,
377 e: *const RUBase,
378) {
379 let f: &&(Fn(&T, &DragLeaveEvent) + 'static) = transmute(func);
380 let obj_e_0 = DragLeaveEvent::new_from_temporary(*(e as *const RUDragLeaveEvent));
381 let data = self_c as *const T;
382 f(&*data, &obj_e_0);
383}
384
385#[allow(unused_variables)]
386pub(crate) unsafe extern "C" fn line_edit_drag_leave_trampoline(
387 self_c: *const c_void,
388 func: *const c_void,
389 e: *const RUBase,
390) {
391 let f: &&(Fn(&DragLeaveEvent) + 'static) = transmute(func);
392 let obj_e_0 = DragLeaveEvent::new_from_temporary(*(e as *const RUDragLeaveEvent));
393 f(&obj_e_0);
394}
395
396pub(crate) unsafe extern "C" fn line_edit_drop_trampoline_ud<T>(
397 self_c: *const c_void,
398 func: *const c_void,
399 arg0: *const RUBase,
400) {
401 let f: &&(Fn(&T, &DropEvent) + 'static) = transmute(func);
402 let obj_arg0_0 = DropEvent::new_from_temporary(*(arg0 as *const RUDropEvent));
403 let data = self_c as *const T;
404 f(&*data, &obj_arg0_0);
405}
406
407#[allow(unused_variables)]
408pub(crate) unsafe extern "C" fn line_edit_drop_trampoline(
409 self_c: *const c_void,
410 func: *const c_void,
411 arg0: *const RUBase,
412) {
413 let f: &&(Fn(&DropEvent) + 'static) = transmute(func);
414 let obj_arg0_0 = DropEvent::new_from_temporary(*(arg0 as *const RUDropEvent));
415 f(&obj_arg0_0);
416}
417
418pub(crate) unsafe extern "C" fn line_edit_change_trampoline_ud<T>(
419 self_c: *const c_void,
420 func: *const c_void,
421 arg0: *const RUBase,
422) {
423 let f: &&(Fn(&T, &Event) + 'static) = transmute(func);
424 let obj_arg0_0 = Event::new_from_temporary(*(arg0 as *const RUEvent));
425 let data = self_c as *const T;
426 f(&*data, &obj_arg0_0);
427}
428
429#[allow(unused_variables)]
430pub(crate) unsafe extern "C" fn line_edit_change_trampoline(
431 self_c: *const c_void,
432 func: *const c_void,
433 arg0: *const RUBase,
434) {
435 let f: &&(Fn(&Event) + 'static) = transmute(func);
436 let obj_arg0_0 = Event::new_from_temporary(*(arg0 as *const RUEvent));
437 f(&obj_arg0_0);
438}
439
440pub(crate) unsafe extern "C" fn line_edit_context_menu_trampoline_ud<T>(
441 self_c: *const c_void,
442 func: *const c_void,
443 arg0: *const RUBase,
444) {
445 let f: &&(Fn(&T, &ContextMenuEvent) + 'static) = transmute(func);
446 let obj_arg0_0 = ContextMenuEvent::new_from_temporary(*(arg0 as *const RUContextMenuEvent));
447 let data = self_c as *const T;
448 f(&*data, &obj_arg0_0);
449}
450
451#[allow(unused_variables)]
452pub(crate) unsafe extern "C" fn line_edit_context_menu_trampoline(
453 self_c: *const c_void,
454 func: *const c_void,
455 arg0: *const RUBase,
456) {
457 let f: &&(Fn(&ContextMenuEvent) + 'static) = transmute(func);
458 let obj_arg0_0 = ContextMenuEvent::new_from_temporary(*(arg0 as *const RUContextMenuEvent));
459 f(&obj_arg0_0);
460}
461
462#[derive(Clone)]
568pub struct LineEdit<'a> {
569 #[doc(hidden)]
570 pub data: Rc<Cell<Option<*const RUBase>>>,
571 #[doc(hidden)]
572 pub all_funcs: *const RULineEditAllFuncs,
573 #[doc(hidden)]
574 pub owned: bool,
575 #[doc(hidden)]
576 pub _marker: PhantomData<::std::cell::Cell<&'a ()>>,
577}
578
579impl<'a> LineEdit<'a> {
580 pub fn new() -> LineEdit<'a> {
581 let data = Rc::new(Cell::new(None));
582
583 let ffi_data = unsafe {
584 ((*rute_ffi_get()).create_line_edit)(
585 ::std::ptr::null(),
586 transmute(rute_object_delete_callback as usize),
587 Rc::into_raw(data.clone()) as *const c_void,
588 )
589 };
590
591 data.set(Some(ffi_data.qt_data));
592
593 LineEdit {
594 data,
595 all_funcs: ffi_data.all_funcs,
596 owned: true,
597 _marker: PhantomData,
598 }
599 }
600 #[allow(dead_code)]
601 pub(crate) fn new_from_rc(ffi_data: RULineEdit) -> LineEdit<'a> {
602 LineEdit {
603 data: unsafe { Rc::from_raw(ffi_data.host_data as *const Cell<Option<*const RUBase>>) },
604 all_funcs: ffi_data.all_funcs,
605 owned: false,
606 _marker: PhantomData,
607 }
608 }
609
610 #[allow(dead_code)]
611 pub(crate) fn new_from_owned(ffi_data: RULineEdit) -> LineEdit<'a> {
612 LineEdit {
613 data: Rc::new(Cell::new(Some(ffi_data.qt_data as *const RUBase))),
614 all_funcs: ffi_data.all_funcs,
615 owned: true,
616 _marker: PhantomData,
617 }
618 }
619
620 #[allow(dead_code)]
621 pub(crate) fn new_from_temporary(ffi_data: RULineEdit) -> LineEdit<'a> {
622 LineEdit {
623 data: Rc::new(Cell::new(Some(ffi_data.qt_data as *const RUBase))),
624 all_funcs: ffi_data.all_funcs,
625 owned: false,
626 _marker: PhantomData,
627 }
628 }
629 pub fn text(&self) -> String {
659 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
660 unsafe {
661 let ret_val = ((*funcs).text)(obj_data);
662 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
663 ret_val
664 }
665 }
666 pub fn display_text(&self) -> String {
685 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
686 unsafe {
687 let ret_val = ((*funcs).display_text)(obj_data);
688 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
689 ret_val
690 }
691 }
692 pub fn placeholder_text(&self) -> String {
705 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
706 unsafe {
707 let ret_val = ((*funcs).placeholder_text)(obj_data);
708 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
709 ret_val
710 }
711 }
712 pub fn set_placeholder_text(&self, arg0: &str) -> &Self {
713 let str_in_arg0_1 = CString::new(arg0).unwrap();
714
715 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
716 unsafe {
717 ((*funcs).set_placeholder_text)(obj_data, str_in_arg0_1.as_ptr());
718 }
719 self
720 }
721 pub fn max_length(&self) -> i32 {
735 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
736 unsafe {
737 let ret_val = ((*funcs).max_length)(obj_data);
738 ret_val
739 }
740 }
741 pub fn set_max_length(&self, arg0: i32) -> &Self {
742 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
743 unsafe {
744 ((*funcs).set_max_length)(obj_data, arg0);
745 }
746 self
747 }
748 pub fn set_frame(&self, arg0: bool) -> &Self {
749 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
750 unsafe {
751 ((*funcs).set_frame)(obj_data, arg0);
752 }
753 self
754 }
755 pub fn has_frame(&self) -> bool {
756 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
757 unsafe {
758 let ret_val = ((*funcs).has_frame)(obj_data);
759 ret_val
760 }
761 }
762 pub fn set_clear_button_enabled(&self, enable: bool) -> &Self {
763 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
764 unsafe {
765 ((*funcs).set_clear_button_enabled)(obj_data, enable);
766 }
767 self
768 }
769 pub fn is_clear_button_enabled(&self) -> bool {
770 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
771 unsafe {
772 let ret_val = ((*funcs).is_clear_button_enabled)(obj_data);
773 ret_val
774 }
775 }
776 pub fn echo_mode(&self) -> EchoMode {
796 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
797 unsafe {
798 let ret_val = ((*funcs).echo_mode)(obj_data);
799 let ret_val = { transmute::<u32, EchoMode>(ret_val) };
800 ret_val
801 }
802 }
803 pub fn set_echo_mode(&self, arg0: EchoMode) -> &Self {
804 let enum_arg0_1 = arg0 as u32;
805
806 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
807 unsafe {
808 ((*funcs).set_echo_mode)(obj_data, enum_arg0_1);
809 }
810 self
811 }
812 pub fn is_read_only(&self) -> bool {
813 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
814 unsafe {
815 let ret_val = ((*funcs).is_read_only)(obj_data);
816 ret_val
817 }
818 }
819 pub fn set_read_only(&self, arg0: bool) -> &Self {
820 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
821 unsafe {
822 ((*funcs).set_read_only)(obj_data, arg0);
823 }
824 self
825 }
826 pub fn cursor_position(&self) -> i32 {
839 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
840 unsafe {
841 let ret_val = ((*funcs).cursor_position)(obj_data);
842 ret_val
843 }
844 }
845 pub fn set_cursor_position(&self, arg0: i32) -> &Self {
846 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
847 unsafe {
848 ((*funcs).set_cursor_position)(obj_data, arg0);
849 }
850 self
851 }
852 pub fn cursor_position_at<P: PointTrait<'a>>(&self, pos: &P) -> i32 {
855 let (obj_pos_1, _funcs) = pos.get_point_obj_funcs();
856
857 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
858 unsafe {
859 let ret_val = ((*funcs).cursor_position_at)(obj_data, obj_pos_1);
860 ret_val
861 }
862 }
863 pub fn set_alignment(&self, flag: Alignment) -> &Self {
864 let enum_flag_1 = flag.bits();
865
866 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
867 unsafe {
868 ((*funcs).set_alignment)(obj_data, enum_flag_1);
869 }
870 self
871 }
872 pub fn alignment(&self) -> Alignment {
880 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
881 unsafe {
882 let ret_val = ((*funcs).alignment)(obj_data);
883 let ret_val = Alignment::from_bits_truncate(ret_val);
884 ret_val
885 }
886 }
887 pub fn cursor_forward(&self, mark: bool, steps: i32) -> &Self {
894 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
895 unsafe {
896 ((*funcs).cursor_forward)(obj_data, mark, steps);
897 }
898 self
899 }
900 pub fn cursor_backward(&self, mark: bool, steps: i32) -> &Self {
907 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
908 unsafe {
909 ((*funcs).cursor_backward)(obj_data, mark, steps);
910 }
911 self
912 }
913 pub fn cursor_word_forward(&self, mark: bool) -> &Self {
919 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
920 unsafe {
921 ((*funcs).cursor_word_forward)(obj_data, mark);
922 }
923 self
924 }
925 pub fn cursor_word_backward(&self, mark: bool) -> &Self {
931 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
932 unsafe {
933 ((*funcs).cursor_word_backward)(obj_data, mark);
934 }
935 self
936 }
937 pub fn backspace(&self) -> &Self {
945 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
946 unsafe {
947 ((*funcs).backspace)(obj_data);
948 }
949 self
950 }
951 pub fn del(&self) -> &Self {
958 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
959 unsafe {
960 ((*funcs).del)(obj_data);
961 }
962 self
963 }
964 pub fn home(&self, mark: bool) -> &Self {
972 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
973 unsafe {
974 ((*funcs).home)(obj_data, mark);
975 }
976 self
977 }
978 pub fn end(&self, mark: bool) -> &Self {
986 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
987 unsafe {
988 ((*funcs).end)(obj_data, mark);
989 }
990 self
991 }
992 pub fn is_modified(&self) -> bool {
993 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
994 unsafe {
995 let ret_val = ((*funcs).is_modified)(obj_data);
996 ret_val
997 }
998 }
999 pub fn set_modified(&self, arg0: bool) -> &Self {
1000 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1001 unsafe {
1002 ((*funcs).set_modified)(obj_data, arg0);
1003 }
1004 self
1005 }
1006 pub fn set_selection(&self, arg0: i32, arg1: i32) -> &Self {
1014 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1015 unsafe {
1016 ((*funcs).set_selection)(obj_data, arg0, arg1);
1017 }
1018 self
1019 }
1020 pub fn has_selected_text(&self) -> bool {
1028 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1029 unsafe {
1030 let ret_val = ((*funcs).has_selected_text)(obj_data);
1031 ret_val
1032 }
1033 }
1034 pub fn selected_text(&self) -> String {
1042 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1043 unsafe {
1044 let ret_val = ((*funcs).selected_text)(obj_data);
1045 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
1046 ret_val
1047 }
1048 }
1049 pub fn selection_start(&self) -> i32 {
1057 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1058 unsafe {
1059 let ret_val = ((*funcs).selection_start)(obj_data);
1060 ret_val
1061 }
1062 }
1063 pub fn selection_end(&self) -> i32 {
1071 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1072 unsafe {
1073 let ret_val = ((*funcs).selection_end)(obj_data);
1074 ret_val
1075 }
1076 }
1077 pub fn selection_length(&self) -> i32 {
1084 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1085 unsafe {
1086 let ret_val = ((*funcs).selection_length)(obj_data);
1087 ret_val
1088 }
1089 }
1090 pub fn is_undo_available(&self) -> bool {
1091 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1092 unsafe {
1093 let ret_val = ((*funcs).is_undo_available)(obj_data);
1094 ret_val
1095 }
1096 }
1097 pub fn is_redo_available(&self) -> bool {
1098 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1099 unsafe {
1100 let ret_val = ((*funcs).is_redo_available)(obj_data);
1101 ret_val
1102 }
1103 }
1104 pub fn set_drag_enabled(&self, b: bool) -> &Self {
1105 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1106 unsafe {
1107 ((*funcs).set_drag_enabled)(obj_data, b);
1108 }
1109 self
1110 }
1111 pub fn drag_enabled(&self) -> bool {
1114 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1115 unsafe {
1116 let ret_val = ((*funcs).drag_enabled)(obj_data);
1117 ret_val
1118 }
1119 }
1120 pub fn set_cursor_move_style(&self, style: CursorMoveStyle) -> &Self {
1121 let enum_style_1 = style as u32;
1122
1123 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1124 unsafe {
1125 ((*funcs).set_cursor_move_style)(obj_data, enum_style_1);
1126 }
1127 self
1128 }
1129 pub fn cursor_move_style(&self) -> CursorMoveStyle {
1140 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1141 unsafe {
1142 let ret_val = ((*funcs).cursor_move_style)(obj_data);
1143 let ret_val = { transmute::<u32, CursorMoveStyle>(ret_val) };
1144 ret_val
1145 }
1146 }
1147 pub fn input_mask(&self) -> String {
1226 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1227 unsafe {
1228 let ret_val = ((*funcs).input_mask)(obj_data);
1229 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
1230 ret_val
1231 }
1232 }
1233 pub fn set_input_mask(&self, input_mask: &str) -> &Self {
1234 let str_in_input_mask_1 = CString::new(input_mask).unwrap();
1235
1236 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1237 unsafe {
1238 ((*funcs).set_input_mask)(obj_data, str_in_input_mask_1.as_ptr());
1239 }
1240 self
1241 }
1242 pub fn has_acceptable_input(&self) -> bool {
1243 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1244 unsafe {
1245 let ret_val = ((*funcs).has_acceptable_input)(obj_data);
1246 ret_val
1247 }
1248 }
1249 pub fn set_text_margins(&self, left: i32, top: i32, right: i32, bottom: i32) -> &Self {
1259 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1260 unsafe {
1261 ((*funcs).set_text_margins)(obj_data, left, top, right, bottom);
1262 }
1263 self
1264 }
1265 pub fn set_text_margins_2<M: MarginsTrait<'a>>(&self, margins: &M) -> &Self {
1275 let (obj_margins_1, _funcs) = margins.get_margins_obj_funcs();
1276
1277 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1278 unsafe {
1279 ((*funcs).set_text_margins_2)(obj_data, obj_margins_1);
1280 }
1281 self
1282 }
1283 pub fn text_margins(&self) -> Margins {
1288 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1289 unsafe {
1290 let ret_val = ((*funcs).text_margins)(obj_data);
1291 let t = ret_val;
1292 let ret_val;
1293 if t.host_data != ::std::ptr::null() {
1294 ret_val = Margins::new_from_rc(t);
1295 } else {
1296 ret_val = Margins::new_from_owned(t);
1297 }
1298 ret_val
1299 }
1300 }
1301 pub fn set_text(&self, arg0: &str) -> &Self {
1311 let str_in_arg0_1 = CString::new(arg0).unwrap();
1312
1313 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1314 unsafe {
1315 ((*funcs).set_text)(obj_data, str_in_arg0_1.as_ptr());
1316 }
1317 self
1318 }
1319 pub fn clear(&self) -> &Self {
1332 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1333 unsafe {
1334 ((*funcs).clear)(obj_data);
1335 }
1336 self
1337 }
1338 pub fn select_all(&self) -> &Self {
1347 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1348 unsafe {
1349 ((*funcs).select_all)(obj_data);
1350 }
1351 self
1352 }
1353 pub fn undo(&self) -> &Self {
1363 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1364 unsafe {
1365 ((*funcs).undo)(obj_data);
1366 }
1367 self
1368 }
1369 pub fn redo(&self) -> &Self {
1378 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1379 unsafe {
1380 ((*funcs).redo)(obj_data);
1381 }
1382 self
1383 }
1384 pub fn cut(&self) -> &Self {
1395 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1396 unsafe {
1397 ((*funcs).cut)(obj_data);
1398 }
1399 self
1400 }
1401 pub fn copy(&self) -> &Self {
1408 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1409 unsafe {
1410 ((*funcs).copy)(obj_data);
1411 }
1412 self
1413 }
1414 pub fn paste(&self) -> &Self {
1426 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1427 unsafe {
1428 ((*funcs).paste)(obj_data);
1429 }
1430 self
1431 }
1432 pub fn deselect(&self) -> &Self {
1438 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1439 unsafe {
1440 ((*funcs).deselect)(obj_data);
1441 }
1442 self
1443 }
1444 pub fn insert(&self, arg0: &str) -> &Self {
1452 let str_in_arg0_1 = CString::new(arg0).unwrap();
1453
1454 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1455 unsafe {
1456 ((*funcs).insert)(obj_data, str_in_arg0_1.as_ptr());
1457 }
1458 self
1459 }
1460 pub fn set_text_changed_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
1467 where
1468 F: Fn(&T, &str) + 'a,
1469 T: 'a,
1470 {
1471 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1472
1473 let f: Box<Box<Fn(&T, &str) + 'a>> = Box::new(Box::new(func));
1474 let user_data = data as *const _ as *const c_void;
1475
1476 unsafe {
1477 ((*funcs).set_text_changed_event)(
1478 obj_data,
1479 user_data,
1480 Box::into_raw(f) as *const _,
1481 transmute(line_edit_text_changed_trampoline_ud::<T> as usize),
1482 );
1483 }
1484
1485 self
1486 }
1487
1488 pub fn set_text_changed_event<F>(&self, func: F) -> &Self
1489 where
1490 F: Fn(&str) + 'a,
1491 {
1492 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1493 let f: Box<Box<Fn(&str) + 'a>> = Box::new(Box::new(func));
1494
1495 unsafe {
1496 ((*funcs).set_text_changed_event)(
1497 obj_data,
1498 ::std::ptr::null(),
1499 Box::into_raw(f) as *const _,
1500 transmute(line_edit_text_changed_trampoline as usize),
1501 );
1502 }
1503
1504 self
1505 }
1506 pub fn set_text_edited_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
1513 where
1514 F: Fn(&T, &str) + 'a,
1515 T: 'a,
1516 {
1517 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1518
1519 let f: Box<Box<Fn(&T, &str) + 'a>> = Box::new(Box::new(func));
1520 let user_data = data as *const _ as *const c_void;
1521
1522 unsafe {
1523 ((*funcs).set_text_edited_event)(
1524 obj_data,
1525 user_data,
1526 Box::into_raw(f) as *const _,
1527 transmute(line_edit_text_edited_trampoline_ud::<T> as usize),
1528 );
1529 }
1530
1531 self
1532 }
1533
1534 pub fn set_text_edited_event<F>(&self, func: F) -> &Self
1535 where
1536 F: Fn(&str) + 'a,
1537 {
1538 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1539 let f: Box<Box<Fn(&str) + 'a>> = Box::new(Box::new(func));
1540
1541 unsafe {
1542 ((*funcs).set_text_edited_event)(
1543 obj_data,
1544 ::std::ptr::null(),
1545 Box::into_raw(f) as *const _,
1546 transmute(line_edit_text_edited_trampoline as usize),
1547 );
1548 }
1549
1550 self
1551 }
1552 pub fn set_cursor_position_changed_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
1559 where
1560 F: Fn(&T, i32, i32) + 'a,
1561 T: 'a,
1562 {
1563 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1564
1565 let f: Box<Box<Fn(&T, i32, i32) + 'a>> = Box::new(Box::new(func));
1566 let user_data = data as *const _ as *const c_void;
1567
1568 unsafe {
1569 ((*funcs).set_cursor_position_changed_event)(
1570 obj_data,
1571 user_data,
1572 Box::into_raw(f) as *const _,
1573 transmute(line_edit_cursor_position_changed_trampoline_ud::<T> as usize),
1574 );
1575 }
1576
1577 self
1578 }
1579
1580 pub fn set_cursor_position_changed_event<F>(&self, func: F) -> &Self
1581 where
1582 F: Fn(i32, i32) + 'a,
1583 {
1584 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1585 let f: Box<Box<Fn(i32, i32) + 'a>> = Box::new(Box::new(func));
1586
1587 unsafe {
1588 ((*funcs).set_cursor_position_changed_event)(
1589 obj_data,
1590 ::std::ptr::null(),
1591 Box::into_raw(f) as *const _,
1592 transmute(line_edit_cursor_position_changed_trampoline as usize),
1593 );
1594 }
1595
1596 self
1597 }
1598 pub fn set_return_pressed_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
1605 where
1606 F: Fn(&T) + 'a,
1607 T: 'a,
1608 {
1609 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1610
1611 let f: Box<Box<Fn(&T) + 'a>> = Box::new(Box::new(func));
1612 let user_data = data as *const _ as *const c_void;
1613
1614 unsafe {
1615 ((*funcs).set_return_pressed_event)(
1616 obj_data,
1617 user_data,
1618 Box::into_raw(f) as *const _,
1619 transmute(line_edit_return_pressed_trampoline_ud::<T> as usize),
1620 );
1621 }
1622
1623 self
1624 }
1625
1626 pub fn set_return_pressed_event<F>(&self, func: F) -> &Self
1627 where
1628 F: Fn() + 'a,
1629 {
1630 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1631 let f: Box<Box<Fn() + 'a>> = Box::new(Box::new(func));
1632
1633 unsafe {
1634 ((*funcs).set_return_pressed_event)(
1635 obj_data,
1636 ::std::ptr::null(),
1637 Box::into_raw(f) as *const _,
1638 transmute(line_edit_return_pressed_trampoline as usize),
1639 );
1640 }
1641
1642 self
1643 }
1644 pub fn set_editing_finished_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
1651 where
1652 F: Fn(&T) + 'a,
1653 T: 'a,
1654 {
1655 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1656
1657 let f: Box<Box<Fn(&T) + 'a>> = Box::new(Box::new(func));
1658 let user_data = data as *const _ as *const c_void;
1659
1660 unsafe {
1661 ((*funcs).set_editing_finished_event)(
1662 obj_data,
1663 user_data,
1664 Box::into_raw(f) as *const _,
1665 transmute(line_edit_editing_finished_trampoline_ud::<T> as usize),
1666 );
1667 }
1668
1669 self
1670 }
1671
1672 pub fn set_editing_finished_event<F>(&self, func: F) -> &Self
1673 where
1674 F: Fn() + 'a,
1675 {
1676 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1677 let f: Box<Box<Fn() + 'a>> = Box::new(Box::new(func));
1678
1679 unsafe {
1680 ((*funcs).set_editing_finished_event)(
1681 obj_data,
1682 ::std::ptr::null(),
1683 Box::into_raw(f) as *const _,
1684 transmute(line_edit_editing_finished_trampoline as usize),
1685 );
1686 }
1687
1688 self
1689 }
1690 pub fn set_selection_changed_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
1696 where
1697 F: Fn(&T) + 'a,
1698 T: 'a,
1699 {
1700 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1701
1702 let f: Box<Box<Fn(&T) + 'a>> = Box::new(Box::new(func));
1703 let user_data = data as *const _ as *const c_void;
1704
1705 unsafe {
1706 ((*funcs).set_selection_changed_event)(
1707 obj_data,
1708 user_data,
1709 Box::into_raw(f) as *const _,
1710 transmute(line_edit_selection_changed_trampoline_ud::<T> as usize),
1711 );
1712 }
1713
1714 self
1715 }
1716
1717 pub fn set_selection_changed_event<F>(&self, func: F) -> &Self
1718 where
1719 F: Fn() + 'a,
1720 {
1721 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1722 let f: Box<Box<Fn() + 'a>> = Box::new(Box::new(func));
1723
1724 unsafe {
1725 ((*funcs).set_selection_changed_event)(
1726 obj_data,
1727 ::std::ptr::null(),
1728 Box::into_raw(f) as *const _,
1729 transmute(line_edit_selection_changed_trampoline as usize),
1730 );
1731 }
1732
1733 self
1734 }
1735 pub fn set_mouse_press_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
1737 where
1738 F: Fn(&T, &MouseEvent) + 'a,
1739 T: 'a,
1740 {
1741 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1742
1743 let f: Box<Box<Fn(&T, &MouseEvent) + 'a>> = Box::new(Box::new(func));
1744 let user_data = data as *const _ as *const c_void;
1745
1746 unsafe {
1747 ((*funcs).set_mouse_press_event)(
1748 obj_data,
1749 user_data,
1750 Box::into_raw(f) as *const _,
1751 transmute(line_edit_mouse_press_trampoline_ud::<T> as usize),
1752 );
1753 }
1754
1755 self
1756 }
1757
1758 pub fn set_mouse_press_event<F>(&self, func: F) -> &Self
1759 where
1760 F: Fn(&MouseEvent) + 'a,
1761 {
1762 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1763 let f: Box<Box<Fn(&MouseEvent) + 'a>> = Box::new(Box::new(func));
1764
1765 unsafe {
1766 ((*funcs).set_mouse_press_event)(
1767 obj_data,
1768 ::std::ptr::null(),
1769 Box::into_raw(f) as *const _,
1770 transmute(line_edit_mouse_press_trampoline as usize),
1771 );
1772 }
1773
1774 self
1775 }
1776 pub fn set_mouse_move_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
1778 where
1779 F: Fn(&T, &MouseEvent) + 'a,
1780 T: 'a,
1781 {
1782 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1783
1784 let f: Box<Box<Fn(&T, &MouseEvent) + 'a>> = Box::new(Box::new(func));
1785 let user_data = data as *const _ as *const c_void;
1786
1787 unsafe {
1788 ((*funcs).set_mouse_move_event)(
1789 obj_data,
1790 user_data,
1791 Box::into_raw(f) as *const _,
1792 transmute(line_edit_mouse_move_trampoline_ud::<T> as usize),
1793 );
1794 }
1795
1796 self
1797 }
1798
1799 pub fn set_mouse_move_event<F>(&self, func: F) -> &Self
1800 where
1801 F: Fn(&MouseEvent) + 'a,
1802 {
1803 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1804 let f: Box<Box<Fn(&MouseEvent) + 'a>> = Box::new(Box::new(func));
1805
1806 unsafe {
1807 ((*funcs).set_mouse_move_event)(
1808 obj_data,
1809 ::std::ptr::null(),
1810 Box::into_raw(f) as *const _,
1811 transmute(line_edit_mouse_move_trampoline as usize),
1812 );
1813 }
1814
1815 self
1816 }
1817 pub fn set_mouse_release_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
1819 where
1820 F: Fn(&T, &MouseEvent) + 'a,
1821 T: 'a,
1822 {
1823 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1824
1825 let f: Box<Box<Fn(&T, &MouseEvent) + 'a>> = Box::new(Box::new(func));
1826 let user_data = data as *const _ as *const c_void;
1827
1828 unsafe {
1829 ((*funcs).set_mouse_release_event)(
1830 obj_data,
1831 user_data,
1832 Box::into_raw(f) as *const _,
1833 transmute(line_edit_mouse_release_trampoline_ud::<T> as usize),
1834 );
1835 }
1836
1837 self
1838 }
1839
1840 pub fn set_mouse_release_event<F>(&self, func: F) -> &Self
1841 where
1842 F: Fn(&MouseEvent) + 'a,
1843 {
1844 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1845 let f: Box<Box<Fn(&MouseEvent) + 'a>> = Box::new(Box::new(func));
1846
1847 unsafe {
1848 ((*funcs).set_mouse_release_event)(
1849 obj_data,
1850 ::std::ptr::null(),
1851 Box::into_raw(f) as *const _,
1852 transmute(line_edit_mouse_release_trampoline as usize),
1853 );
1854 }
1855
1856 self
1857 }
1858 pub fn set_mouse_double_click_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
1860 where
1861 F: Fn(&T, &MouseEvent) + 'a,
1862 T: 'a,
1863 {
1864 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1865
1866 let f: Box<Box<Fn(&T, &MouseEvent) + 'a>> = Box::new(Box::new(func));
1867 let user_data = data as *const _ as *const c_void;
1868
1869 unsafe {
1870 ((*funcs).set_mouse_double_click_event)(
1871 obj_data,
1872 user_data,
1873 Box::into_raw(f) as *const _,
1874 transmute(line_edit_mouse_double_click_trampoline_ud::<T> as usize),
1875 );
1876 }
1877
1878 self
1879 }
1880
1881 pub fn set_mouse_double_click_event<F>(&self, func: F) -> &Self
1882 where
1883 F: Fn(&MouseEvent) + 'a,
1884 {
1885 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1886 let f: Box<Box<Fn(&MouseEvent) + 'a>> = Box::new(Box::new(func));
1887
1888 unsafe {
1889 ((*funcs).set_mouse_double_click_event)(
1890 obj_data,
1891 ::std::ptr::null(),
1892 Box::into_raw(f) as *const _,
1893 transmute(line_edit_mouse_double_click_trampoline as usize),
1894 );
1895 }
1896
1897 self
1898 }
1899 pub fn set_key_press_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
1910 where
1911 F: Fn(&T, &KeyEvent) + 'a,
1912 T: 'a,
1913 {
1914 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1915
1916 let f: Box<Box<Fn(&T, &KeyEvent) + 'a>> = Box::new(Box::new(func));
1917 let user_data = data as *const _ as *const c_void;
1918
1919 unsafe {
1920 ((*funcs).set_key_press_event)(
1921 obj_data,
1922 user_data,
1923 Box::into_raw(f) as *const _,
1924 transmute(line_edit_key_press_trampoline_ud::<T> as usize),
1925 );
1926 }
1927
1928 self
1929 }
1930
1931 pub fn set_key_press_event<F>(&self, func: F) -> &Self
1932 where
1933 F: Fn(&KeyEvent) + 'a,
1934 {
1935 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1936 let f: Box<Box<Fn(&KeyEvent) + 'a>> = Box::new(Box::new(func));
1937
1938 unsafe {
1939 ((*funcs).set_key_press_event)(
1940 obj_data,
1941 ::std::ptr::null(),
1942 Box::into_raw(f) as *const _,
1943 transmute(line_edit_key_press_trampoline as usize),
1944 );
1945 }
1946
1947 self
1948 }
1949 pub fn set_focus_in_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
1951 where
1952 F: Fn(&T, &FocusEvent) + 'a,
1953 T: 'a,
1954 {
1955 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1956
1957 let f: Box<Box<Fn(&T, &FocusEvent) + 'a>> = Box::new(Box::new(func));
1958 let user_data = data as *const _ as *const c_void;
1959
1960 unsafe {
1961 ((*funcs).set_focus_in_event)(
1962 obj_data,
1963 user_data,
1964 Box::into_raw(f) as *const _,
1965 transmute(line_edit_focus_in_trampoline_ud::<T> as usize),
1966 );
1967 }
1968
1969 self
1970 }
1971
1972 pub fn set_focus_in_event<F>(&self, func: F) -> &Self
1973 where
1974 F: Fn(&FocusEvent) + 'a,
1975 {
1976 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1977 let f: Box<Box<Fn(&FocusEvent) + 'a>> = Box::new(Box::new(func));
1978
1979 unsafe {
1980 ((*funcs).set_focus_in_event)(
1981 obj_data,
1982 ::std::ptr::null(),
1983 Box::into_raw(f) as *const _,
1984 transmute(line_edit_focus_in_trampoline as usize),
1985 );
1986 }
1987
1988 self
1989 }
1990 pub fn set_focus_out_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
1992 where
1993 F: Fn(&T, &FocusEvent) + 'a,
1994 T: 'a,
1995 {
1996 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
1997
1998 let f: Box<Box<Fn(&T, &FocusEvent) + 'a>> = Box::new(Box::new(func));
1999 let user_data = data as *const _ as *const c_void;
2000
2001 unsafe {
2002 ((*funcs).set_focus_out_event)(
2003 obj_data,
2004 user_data,
2005 Box::into_raw(f) as *const _,
2006 transmute(line_edit_focus_out_trampoline_ud::<T> as usize),
2007 );
2008 }
2009
2010 self
2011 }
2012
2013 pub fn set_focus_out_event<F>(&self, func: F) -> &Self
2014 where
2015 F: Fn(&FocusEvent) + 'a,
2016 {
2017 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2018 let f: Box<Box<Fn(&FocusEvent) + 'a>> = Box::new(Box::new(func));
2019
2020 unsafe {
2021 ((*funcs).set_focus_out_event)(
2022 obj_data,
2023 ::std::ptr::null(),
2024 Box::into_raw(f) as *const _,
2025 transmute(line_edit_focus_out_trampoline as usize),
2026 );
2027 }
2028
2029 self
2030 }
2031 pub fn set_paint_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
2033 where
2034 F: Fn(&T, &PaintEvent) + 'a,
2035 T: 'a,
2036 {
2037 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2038
2039 let f: Box<Box<Fn(&T, &PaintEvent) + 'a>> = Box::new(Box::new(func));
2040 let user_data = data as *const _ as *const c_void;
2041
2042 unsafe {
2043 ((*funcs).set_paint_event)(
2044 obj_data,
2045 user_data,
2046 Box::into_raw(f) as *const _,
2047 transmute(line_edit_paint_trampoline_ud::<T> as usize),
2048 );
2049 }
2050
2051 self
2052 }
2053
2054 pub fn set_paint_event<F>(&self, func: F) -> &Self
2055 where
2056 F: Fn(&PaintEvent) + 'a,
2057 {
2058 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2059 let f: Box<Box<Fn(&PaintEvent) + 'a>> = Box::new(Box::new(func));
2060
2061 unsafe {
2062 ((*funcs).set_paint_event)(
2063 obj_data,
2064 ::std::ptr::null(),
2065 Box::into_raw(f) as *const _,
2066 transmute(line_edit_paint_trampoline as usize),
2067 );
2068 }
2069
2070 self
2071 }
2072 pub fn set_drag_enter_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
2074 where
2075 F: Fn(&T, &DragEnterEvent) + 'a,
2076 T: 'a,
2077 {
2078 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2079
2080 let f: Box<Box<Fn(&T, &DragEnterEvent) + 'a>> = Box::new(Box::new(func));
2081 let user_data = data as *const _ as *const c_void;
2082
2083 unsafe {
2084 ((*funcs).set_drag_enter_event)(
2085 obj_data,
2086 user_data,
2087 Box::into_raw(f) as *const _,
2088 transmute(line_edit_drag_enter_trampoline_ud::<T> as usize),
2089 );
2090 }
2091
2092 self
2093 }
2094
2095 pub fn set_drag_enter_event<F>(&self, func: F) -> &Self
2096 where
2097 F: Fn(&DragEnterEvent) + 'a,
2098 {
2099 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2100 let f: Box<Box<Fn(&DragEnterEvent) + 'a>> = Box::new(Box::new(func));
2101
2102 unsafe {
2103 ((*funcs).set_drag_enter_event)(
2104 obj_data,
2105 ::std::ptr::null(),
2106 Box::into_raw(f) as *const _,
2107 transmute(line_edit_drag_enter_trampoline as usize),
2108 );
2109 }
2110
2111 self
2112 }
2113 pub fn set_drag_move_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
2115 where
2116 F: Fn(&T, &DragMoveEvent) + 'a,
2117 T: 'a,
2118 {
2119 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2120
2121 let f: Box<Box<Fn(&T, &DragMoveEvent) + 'a>> = Box::new(Box::new(func));
2122 let user_data = data as *const _ as *const c_void;
2123
2124 unsafe {
2125 ((*funcs).set_drag_move_event)(
2126 obj_data,
2127 user_data,
2128 Box::into_raw(f) as *const _,
2129 transmute(line_edit_drag_move_trampoline_ud::<T> as usize),
2130 );
2131 }
2132
2133 self
2134 }
2135
2136 pub fn set_drag_move_event<F>(&self, func: F) -> &Self
2137 where
2138 F: Fn(&DragMoveEvent) + 'a,
2139 {
2140 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2141 let f: Box<Box<Fn(&DragMoveEvent) + 'a>> = Box::new(Box::new(func));
2142
2143 unsafe {
2144 ((*funcs).set_drag_move_event)(
2145 obj_data,
2146 ::std::ptr::null(),
2147 Box::into_raw(f) as *const _,
2148 transmute(line_edit_drag_move_trampoline as usize),
2149 );
2150 }
2151
2152 self
2153 }
2154 pub fn set_drag_leave_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
2156 where
2157 F: Fn(&T, &DragLeaveEvent) + 'a,
2158 T: 'a,
2159 {
2160 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2161
2162 let f: Box<Box<Fn(&T, &DragLeaveEvent) + 'a>> = Box::new(Box::new(func));
2163 let user_data = data as *const _ as *const c_void;
2164
2165 unsafe {
2166 ((*funcs).set_drag_leave_event)(
2167 obj_data,
2168 user_data,
2169 Box::into_raw(f) as *const _,
2170 transmute(line_edit_drag_leave_trampoline_ud::<T> as usize),
2171 );
2172 }
2173
2174 self
2175 }
2176
2177 pub fn set_drag_leave_event<F>(&self, func: F) -> &Self
2178 where
2179 F: Fn(&DragLeaveEvent) + 'a,
2180 {
2181 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2182 let f: Box<Box<Fn(&DragLeaveEvent) + 'a>> = Box::new(Box::new(func));
2183
2184 unsafe {
2185 ((*funcs).set_drag_leave_event)(
2186 obj_data,
2187 ::std::ptr::null(),
2188 Box::into_raw(f) as *const _,
2189 transmute(line_edit_drag_leave_trampoline as usize),
2190 );
2191 }
2192
2193 self
2194 }
2195 pub fn set_drop_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
2197 where
2198 F: Fn(&T, &DropEvent) + 'a,
2199 T: 'a,
2200 {
2201 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2202
2203 let f: Box<Box<Fn(&T, &DropEvent) + 'a>> = Box::new(Box::new(func));
2204 let user_data = data as *const _ as *const c_void;
2205
2206 unsafe {
2207 ((*funcs).set_drop_event)(
2208 obj_data,
2209 user_data,
2210 Box::into_raw(f) as *const _,
2211 transmute(line_edit_drop_trampoline_ud::<T> as usize),
2212 );
2213 }
2214
2215 self
2216 }
2217
2218 pub fn set_drop_event<F>(&self, func: F) -> &Self
2219 where
2220 F: Fn(&DropEvent) + 'a,
2221 {
2222 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2223 let f: Box<Box<Fn(&DropEvent) + 'a>> = Box::new(Box::new(func));
2224
2225 unsafe {
2226 ((*funcs).set_drop_event)(
2227 obj_data,
2228 ::std::ptr::null(),
2229 Box::into_raw(f) as *const _,
2230 transmute(line_edit_drop_trampoline as usize),
2231 );
2232 }
2233
2234 self
2235 }
2236 pub fn set_change_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
2238 where
2239 F: Fn(&T, &Event) + 'a,
2240 T: 'a,
2241 {
2242 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2243
2244 let f: Box<Box<Fn(&T, &Event) + 'a>> = Box::new(Box::new(func));
2245 let user_data = data as *const _ as *const c_void;
2246
2247 unsafe {
2248 ((*funcs).set_change_event)(
2249 obj_data,
2250 user_data,
2251 Box::into_raw(f) as *const _,
2252 transmute(line_edit_change_trampoline_ud::<T> as usize),
2253 );
2254 }
2255
2256 self
2257 }
2258
2259 pub fn set_change_event<F>(&self, func: F) -> &Self
2260 where
2261 F: Fn(&Event) + 'a,
2262 {
2263 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2264 let f: Box<Box<Fn(&Event) + 'a>> = Box::new(Box::new(func));
2265
2266 unsafe {
2267 ((*funcs).set_change_event)(
2268 obj_data,
2269 ::std::ptr::null(),
2270 Box::into_raw(f) as *const _,
2271 transmute(line_edit_change_trampoline as usize),
2272 );
2273 }
2274
2275 self
2276 }
2277 pub fn set_context_menu_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
2293 where
2294 F: Fn(&T, &ContextMenuEvent) + 'a,
2295 T: 'a,
2296 {
2297 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2298
2299 let f: Box<Box<Fn(&T, &ContextMenuEvent) + 'a>> = Box::new(Box::new(func));
2300 let user_data = data as *const _ as *const c_void;
2301
2302 unsafe {
2303 ((*funcs).set_context_menu_event)(
2304 obj_data,
2305 user_data,
2306 Box::into_raw(f) as *const _,
2307 transmute(line_edit_context_menu_trampoline_ud::<T> as usize),
2308 );
2309 }
2310
2311 self
2312 }
2313
2314 pub fn set_context_menu_event<F>(&self, func: F) -> &Self
2315 where
2316 F: Fn(&ContextMenuEvent) + 'a,
2317 {
2318 let (obj_data, funcs) = self.get_line_edit_obj_funcs();
2319 let f: Box<Box<Fn(&ContextMenuEvent) + 'a>> = Box::new(Box::new(func));
2320
2321 unsafe {
2322 ((*funcs).set_context_menu_event)(
2323 obj_data,
2324 ::std::ptr::null(),
2325 Box::into_raw(f) as *const _,
2326 transmute(line_edit_context_menu_trampoline as usize),
2327 );
2328 }
2329
2330 self
2331 }
2332 #[doc(hidden)]
2333 pub fn win_id(&self) -> u64 {
2334 let (obj_data, funcs) = self.get_widget_obj_funcs();
2335 unsafe {
2336 let ret_val = ((*funcs).win_id)(obj_data);
2337 ret_val
2338 }
2339 }
2340 #[doc(hidden)]
2341 pub fn create_win_id(&self) -> &Self {
2342 let (obj_data, funcs) = self.get_widget_obj_funcs();
2343 unsafe {
2344 ((*funcs).create_win_id)(obj_data);
2345 }
2346 self
2347 }
2348 #[doc(hidden)]
2349 pub fn internal_win_id(&self) -> u64 {
2350 let (obj_data, funcs) = self.get_widget_obj_funcs();
2351 unsafe {
2352 let ret_val = ((*funcs).internal_win_id)(obj_data);
2353 ret_val
2354 }
2355 }
2356 #[doc(hidden)]
2357 pub fn effective_win_id(&self) -> u64 {
2358 let (obj_data, funcs) = self.get_widget_obj_funcs();
2359 unsafe {
2360 let ret_val = ((*funcs).effective_win_id)(obj_data);
2361 ret_val
2362 }
2363 }
2364 #[doc(hidden)]
2365 pub fn style(&self) -> Option<Style> {
2366 let (obj_data, funcs) = self.get_widget_obj_funcs();
2367 unsafe {
2368 let ret_val = ((*funcs).style)(obj_data);
2369 if ret_val.qt_data == ::std::ptr::null() {
2370 return None;
2371 }
2372 let t = ret_val;
2373 let ret_val;
2374 if t.host_data != ::std::ptr::null() {
2375 ret_val = Style::new_from_rc(t);
2376 } else {
2377 ret_val = Style::new_from_owned(t);
2378 }
2379 Some(ret_val)
2380 }
2381 }
2382 #[doc(hidden)]
2383 pub fn set_style<S: StyleTrait<'a>>(&self, arg0: &S) -> &Self {
2384 let (obj_arg0_1, _funcs) = arg0.get_style_obj_funcs();
2385
2386 let (obj_data, funcs) = self.get_widget_obj_funcs();
2387 unsafe {
2388 ((*funcs).set_style)(obj_data, obj_arg0_1);
2389 }
2390 self
2391 }
2392 #[doc(hidden)]
2393 pub fn is_top_level(&self) -> bool {
2394 let (obj_data, funcs) = self.get_widget_obj_funcs();
2395 unsafe {
2396 let ret_val = ((*funcs).is_top_level)(obj_data);
2397 ret_val
2398 }
2399 }
2400 #[doc(hidden)]
2401 pub fn is_window(&self) -> bool {
2402 let (obj_data, funcs) = self.get_widget_obj_funcs();
2403 unsafe {
2404 let ret_val = ((*funcs).is_window)(obj_data);
2405 ret_val
2406 }
2407 }
2408 #[doc(hidden)]
2409 pub fn is_modal(&self) -> bool {
2410 let (obj_data, funcs) = self.get_widget_obj_funcs();
2411 unsafe {
2412 let ret_val = ((*funcs).is_modal)(obj_data);
2413 ret_val
2414 }
2415 }
2416 #[doc(hidden)]
2417 pub fn window_modality(&self) -> WindowModality {
2418 let (obj_data, funcs) = self.get_widget_obj_funcs();
2419 unsafe {
2420 let ret_val = ((*funcs).window_modality)(obj_data);
2421 let ret_val = { transmute::<u32, WindowModality>(ret_val) };
2422 ret_val
2423 }
2424 }
2425 #[doc(hidden)]
2426 pub fn set_window_modality(&self, window_modality: WindowModality) -> &Self {
2427 let enum_window_modality_1 = window_modality as u32;
2428
2429 let (obj_data, funcs) = self.get_widget_obj_funcs();
2430 unsafe {
2431 ((*funcs).set_window_modality)(obj_data, enum_window_modality_1);
2432 }
2433 self
2434 }
2435 #[doc(hidden)]
2436 pub fn is_enabled(&self) -> bool {
2437 let (obj_data, funcs) = self.get_widget_obj_funcs();
2438 unsafe {
2439 let ret_val = ((*funcs).is_enabled)(obj_data);
2440 ret_val
2441 }
2442 }
2443 #[doc(hidden)]
2444 pub fn is_enabled_to<W: WidgetTrait<'a>>(&self, arg0: &W) -> bool {
2445 let (obj_arg0_1, _funcs) = arg0.get_widget_obj_funcs();
2446
2447 let (obj_data, funcs) = self.get_widget_obj_funcs();
2448 unsafe {
2449 let ret_val = ((*funcs).is_enabled_to)(obj_data, obj_arg0_1);
2450 ret_val
2451 }
2452 }
2453 #[doc(hidden)]
2454 pub fn set_enabled(&self, arg0: bool) -> &Self {
2455 let (obj_data, funcs) = self.get_widget_obj_funcs();
2456 unsafe {
2457 ((*funcs).set_enabled)(obj_data, arg0);
2458 }
2459 self
2460 }
2461 #[doc(hidden)]
2462 pub fn set_disabled(&self, arg0: bool) -> &Self {
2463 let (obj_data, funcs) = self.get_widget_obj_funcs();
2464 unsafe {
2465 ((*funcs).set_disabled)(obj_data, arg0);
2466 }
2467 self
2468 }
2469 #[doc(hidden)]
2470 pub fn set_window_modified(&self, arg0: bool) -> &Self {
2471 let (obj_data, funcs) = self.get_widget_obj_funcs();
2472 unsafe {
2473 ((*funcs).set_window_modified)(obj_data, arg0);
2474 }
2475 self
2476 }
2477 #[doc(hidden)]
2478 pub fn x(&self) -> i32 {
2479 let (obj_data, funcs) = self.get_widget_obj_funcs();
2480 unsafe {
2481 let ret_val = ((*funcs).x)(obj_data);
2482 ret_val
2483 }
2484 }
2485 #[doc(hidden)]
2486 pub fn y(&self) -> i32 {
2487 let (obj_data, funcs) = self.get_widget_obj_funcs();
2488 unsafe {
2489 let ret_val = ((*funcs).y)(obj_data);
2490 ret_val
2491 }
2492 }
2493 #[doc(hidden)]
2494 pub fn pos(&self) -> Point {
2495 let (obj_data, funcs) = self.get_widget_obj_funcs();
2496 unsafe {
2497 let ret_val = ((*funcs).pos)(obj_data);
2498 let t = ret_val;
2499 let ret_val;
2500 if t.host_data != ::std::ptr::null() {
2501 ret_val = Point::new_from_rc(t);
2502 } else {
2503 ret_val = Point::new_from_owned(t);
2504 }
2505 ret_val
2506 }
2507 }
2508 #[doc(hidden)]
2509 pub fn frame_size(&self) -> Size {
2510 let (obj_data, funcs) = self.get_widget_obj_funcs();
2511 unsafe {
2512 let ret_val = ((*funcs).frame_size)(obj_data);
2513 let t = ret_val;
2514 let ret_val;
2515 if t.host_data != ::std::ptr::null() {
2516 ret_val = Size::new_from_rc(t);
2517 } else {
2518 ret_val = Size::new_from_owned(t);
2519 }
2520 ret_val
2521 }
2522 }
2523 #[doc(hidden)]
2524 pub fn size(&self) -> Size {
2525 let (obj_data, funcs) = self.get_widget_obj_funcs();
2526 unsafe {
2527 let ret_val = ((*funcs).size)(obj_data);
2528 let t = ret_val;
2529 let ret_val;
2530 if t.host_data != ::std::ptr::null() {
2531 ret_val = Size::new_from_rc(t);
2532 } else {
2533 ret_val = Size::new_from_owned(t);
2534 }
2535 ret_val
2536 }
2537 }
2538 #[doc(hidden)]
2539 pub fn width(&self) -> i32 {
2540 let (obj_data, funcs) = self.get_widget_obj_funcs();
2541 unsafe {
2542 let ret_val = ((*funcs).width)(obj_data);
2543 ret_val
2544 }
2545 }
2546 #[doc(hidden)]
2547 pub fn height(&self) -> i32 {
2548 let (obj_data, funcs) = self.get_widget_obj_funcs();
2549 unsafe {
2550 let ret_val = ((*funcs).height)(obj_data);
2551 ret_val
2552 }
2553 }
2554 #[doc(hidden)]
2555 pub fn rect(&self) -> Rect {
2556 let (obj_data, funcs) = self.get_widget_obj_funcs();
2557 unsafe {
2558 let ret_val = ((*funcs).rect)(obj_data);
2559 let t = ret_val;
2560 let ret_val;
2561 if t.host_data != ::std::ptr::null() {
2562 ret_val = Rect::new_from_rc(t);
2563 } else {
2564 ret_val = Rect::new_from_owned(t);
2565 }
2566 ret_val
2567 }
2568 }
2569 #[doc(hidden)]
2570 pub fn children_rect(&self) -> Rect {
2571 let (obj_data, funcs) = self.get_widget_obj_funcs();
2572 unsafe {
2573 let ret_val = ((*funcs).children_rect)(obj_data);
2574 let t = ret_val;
2575 let ret_val;
2576 if t.host_data != ::std::ptr::null() {
2577 ret_val = Rect::new_from_rc(t);
2578 } else {
2579 ret_val = Rect::new_from_owned(t);
2580 }
2581 ret_val
2582 }
2583 }
2584 #[doc(hidden)]
2585 pub fn children_region(&self) -> Region {
2586 let (obj_data, funcs) = self.get_widget_obj_funcs();
2587 unsafe {
2588 let ret_val = ((*funcs).children_region)(obj_data);
2589 let t = ret_val;
2590 let ret_val;
2591 if t.host_data != ::std::ptr::null() {
2592 ret_val = Region::new_from_rc(t);
2593 } else {
2594 ret_val = Region::new_from_owned(t);
2595 }
2596 ret_val
2597 }
2598 }
2599 #[doc(hidden)]
2600 pub fn minimum_size(&self) -> Size {
2601 let (obj_data, funcs) = self.get_widget_obj_funcs();
2602 unsafe {
2603 let ret_val = ((*funcs).minimum_size)(obj_data);
2604 let t = ret_val;
2605 let ret_val;
2606 if t.host_data != ::std::ptr::null() {
2607 ret_val = Size::new_from_rc(t);
2608 } else {
2609 ret_val = Size::new_from_owned(t);
2610 }
2611 ret_val
2612 }
2613 }
2614 #[doc(hidden)]
2615 pub fn maximum_size(&self) -> Size {
2616 let (obj_data, funcs) = self.get_widget_obj_funcs();
2617 unsafe {
2618 let ret_val = ((*funcs).maximum_size)(obj_data);
2619 let t = ret_val;
2620 let ret_val;
2621 if t.host_data != ::std::ptr::null() {
2622 ret_val = Size::new_from_rc(t);
2623 } else {
2624 ret_val = Size::new_from_owned(t);
2625 }
2626 ret_val
2627 }
2628 }
2629 #[doc(hidden)]
2630 pub fn minimum_width(&self) -> i32 {
2631 let (obj_data, funcs) = self.get_widget_obj_funcs();
2632 unsafe {
2633 let ret_val = ((*funcs).minimum_width)(obj_data);
2634 ret_val
2635 }
2636 }
2637 #[doc(hidden)]
2638 pub fn minimum_height(&self) -> i32 {
2639 let (obj_data, funcs) = self.get_widget_obj_funcs();
2640 unsafe {
2641 let ret_val = ((*funcs).minimum_height)(obj_data);
2642 ret_val
2643 }
2644 }
2645 #[doc(hidden)]
2646 pub fn maximum_width(&self) -> i32 {
2647 let (obj_data, funcs) = self.get_widget_obj_funcs();
2648 unsafe {
2649 let ret_val = ((*funcs).maximum_width)(obj_data);
2650 ret_val
2651 }
2652 }
2653 #[doc(hidden)]
2654 pub fn maximum_height(&self) -> i32 {
2655 let (obj_data, funcs) = self.get_widget_obj_funcs();
2656 unsafe {
2657 let ret_val = ((*funcs).maximum_height)(obj_data);
2658 ret_val
2659 }
2660 }
2661 #[doc(hidden)]
2662 pub fn set_minimum_size<S: SizeTrait<'a>>(&self, arg0: &S) -> &Self {
2663 let (obj_arg0_1, _funcs) = arg0.get_size_obj_funcs();
2664
2665 let (obj_data, funcs) = self.get_widget_obj_funcs();
2666 unsafe {
2667 ((*funcs).set_minimum_size)(obj_data, obj_arg0_1);
2668 }
2669 self
2670 }
2671 #[doc(hidden)]
2672 pub fn set_minimum_size_2(&self, minw: i32, minh: i32) -> &Self {
2673 let (obj_data, funcs) = self.get_widget_obj_funcs();
2674 unsafe {
2675 ((*funcs).set_minimum_size_2)(obj_data, minw, minh);
2676 }
2677 self
2678 }
2679 #[doc(hidden)]
2680 pub fn set_maximum_size<S: SizeTrait<'a>>(&self, arg0: &S) -> &Self {
2681 let (obj_arg0_1, _funcs) = arg0.get_size_obj_funcs();
2682
2683 let (obj_data, funcs) = self.get_widget_obj_funcs();
2684 unsafe {
2685 ((*funcs).set_maximum_size)(obj_data, obj_arg0_1);
2686 }
2687 self
2688 }
2689 #[doc(hidden)]
2690 pub fn set_maximum_size_2(&self, maxw: i32, maxh: i32) -> &Self {
2691 let (obj_data, funcs) = self.get_widget_obj_funcs();
2692 unsafe {
2693 ((*funcs).set_maximum_size_2)(obj_data, maxw, maxh);
2694 }
2695 self
2696 }
2697 #[doc(hidden)]
2698 pub fn set_minimum_width(&self, minw: i32) -> &Self {
2699 let (obj_data, funcs) = self.get_widget_obj_funcs();
2700 unsafe {
2701 ((*funcs).set_minimum_width)(obj_data, minw);
2702 }
2703 self
2704 }
2705 #[doc(hidden)]
2706 pub fn set_minimum_height(&self, minh: i32) -> &Self {
2707 let (obj_data, funcs) = self.get_widget_obj_funcs();
2708 unsafe {
2709 ((*funcs).set_minimum_height)(obj_data, minh);
2710 }
2711 self
2712 }
2713 #[doc(hidden)]
2714 pub fn set_maximum_width(&self, maxw: i32) -> &Self {
2715 let (obj_data, funcs) = self.get_widget_obj_funcs();
2716 unsafe {
2717 ((*funcs).set_maximum_width)(obj_data, maxw);
2718 }
2719 self
2720 }
2721 #[doc(hidden)]
2722 pub fn set_maximum_height(&self, maxh: i32) -> &Self {
2723 let (obj_data, funcs) = self.get_widget_obj_funcs();
2724 unsafe {
2725 ((*funcs).set_maximum_height)(obj_data, maxh);
2726 }
2727 self
2728 }
2729 #[doc(hidden)]
2730 pub fn size_increment(&self) -> Size {
2731 let (obj_data, funcs) = self.get_widget_obj_funcs();
2732 unsafe {
2733 let ret_val = ((*funcs).size_increment)(obj_data);
2734 let t = ret_val;
2735 let ret_val;
2736 if t.host_data != ::std::ptr::null() {
2737 ret_val = Size::new_from_rc(t);
2738 } else {
2739 ret_val = Size::new_from_owned(t);
2740 }
2741 ret_val
2742 }
2743 }
2744 #[doc(hidden)]
2745 pub fn set_size_increment<S: SizeTrait<'a>>(&self, arg0: &S) -> &Self {
2746 let (obj_arg0_1, _funcs) = arg0.get_size_obj_funcs();
2747
2748 let (obj_data, funcs) = self.get_widget_obj_funcs();
2749 unsafe {
2750 ((*funcs).set_size_increment)(obj_data, obj_arg0_1);
2751 }
2752 self
2753 }
2754 #[doc(hidden)]
2755 pub fn set_size_increment_2(&self, w: i32, h: i32) -> &Self {
2756 let (obj_data, funcs) = self.get_widget_obj_funcs();
2757 unsafe {
2758 ((*funcs).set_size_increment_2)(obj_data, w, h);
2759 }
2760 self
2761 }
2762 #[doc(hidden)]
2763 pub fn base_size(&self) -> Size {
2764 let (obj_data, funcs) = self.get_widget_obj_funcs();
2765 unsafe {
2766 let ret_val = ((*funcs).base_size)(obj_data);
2767 let t = ret_val;
2768 let ret_val;
2769 if t.host_data != ::std::ptr::null() {
2770 ret_val = Size::new_from_rc(t);
2771 } else {
2772 ret_val = Size::new_from_owned(t);
2773 }
2774 ret_val
2775 }
2776 }
2777 #[doc(hidden)]
2778 pub fn set_base_size<S: SizeTrait<'a>>(&self, arg0: &S) -> &Self {
2779 let (obj_arg0_1, _funcs) = arg0.get_size_obj_funcs();
2780
2781 let (obj_data, funcs) = self.get_widget_obj_funcs();
2782 unsafe {
2783 ((*funcs).set_base_size)(obj_data, obj_arg0_1);
2784 }
2785 self
2786 }
2787 #[doc(hidden)]
2788 pub fn set_base_size_2(&self, basew: i32, baseh: i32) -> &Self {
2789 let (obj_data, funcs) = self.get_widget_obj_funcs();
2790 unsafe {
2791 ((*funcs).set_base_size_2)(obj_data, basew, baseh);
2792 }
2793 self
2794 }
2795 #[doc(hidden)]
2796 pub fn set_fixed_size<S: SizeTrait<'a>>(&self, arg0: &S) -> &Self {
2797 let (obj_arg0_1, _funcs) = arg0.get_size_obj_funcs();
2798
2799 let (obj_data, funcs) = self.get_widget_obj_funcs();
2800 unsafe {
2801 ((*funcs).set_fixed_size)(obj_data, obj_arg0_1);
2802 }
2803 self
2804 }
2805 #[doc(hidden)]
2806 pub fn set_fixed_size_2(&self, w: i32, h: i32) -> &Self {
2807 let (obj_data, funcs) = self.get_widget_obj_funcs();
2808 unsafe {
2809 ((*funcs).set_fixed_size_2)(obj_data, w, h);
2810 }
2811 self
2812 }
2813 #[doc(hidden)]
2814 pub fn set_fixed_width(&self, w: i32) -> &Self {
2815 let (obj_data, funcs) = self.get_widget_obj_funcs();
2816 unsafe {
2817 ((*funcs).set_fixed_width)(obj_data, w);
2818 }
2819 self
2820 }
2821 #[doc(hidden)]
2822 pub fn set_fixed_height(&self, h: i32) -> &Self {
2823 let (obj_data, funcs) = self.get_widget_obj_funcs();
2824 unsafe {
2825 ((*funcs).set_fixed_height)(obj_data, h);
2826 }
2827 self
2828 }
2829 #[doc(hidden)]
2830 pub fn map_to_global<P: PointTrait<'a>>(&self, arg0: &P) -> Point {
2831 let (obj_arg0_1, _funcs) = arg0.get_point_obj_funcs();
2832
2833 let (obj_data, funcs) = self.get_widget_obj_funcs();
2834 unsafe {
2835 let ret_val = ((*funcs).map_to_global)(obj_data, obj_arg0_1);
2836 let t = ret_val;
2837 let ret_val;
2838 if t.host_data != ::std::ptr::null() {
2839 ret_val = Point::new_from_rc(t);
2840 } else {
2841 ret_val = Point::new_from_owned(t);
2842 }
2843 ret_val
2844 }
2845 }
2846 #[doc(hidden)]
2847 pub fn map_from_global<P: PointTrait<'a>>(&self, arg0: &P) -> Point {
2848 let (obj_arg0_1, _funcs) = arg0.get_point_obj_funcs();
2849
2850 let (obj_data, funcs) = self.get_widget_obj_funcs();
2851 unsafe {
2852 let ret_val = ((*funcs).map_from_global)(obj_data, obj_arg0_1);
2853 let t = ret_val;
2854 let ret_val;
2855 if t.host_data != ::std::ptr::null() {
2856 ret_val = Point::new_from_rc(t);
2857 } else {
2858 ret_val = Point::new_from_owned(t);
2859 }
2860 ret_val
2861 }
2862 }
2863 #[doc(hidden)]
2864 pub fn map_to_parent<P: PointTrait<'a>>(&self, arg0: &P) -> Point {
2865 let (obj_arg0_1, _funcs) = arg0.get_point_obj_funcs();
2866
2867 let (obj_data, funcs) = self.get_widget_obj_funcs();
2868 unsafe {
2869 let ret_val = ((*funcs).map_to_parent)(obj_data, obj_arg0_1);
2870 let t = ret_val;
2871 let ret_val;
2872 if t.host_data != ::std::ptr::null() {
2873 ret_val = Point::new_from_rc(t);
2874 } else {
2875 ret_val = Point::new_from_owned(t);
2876 }
2877 ret_val
2878 }
2879 }
2880 #[doc(hidden)]
2881 pub fn map_from_parent<P: PointTrait<'a>>(&self, arg0: &P) -> Point {
2882 let (obj_arg0_1, _funcs) = arg0.get_point_obj_funcs();
2883
2884 let (obj_data, funcs) = self.get_widget_obj_funcs();
2885 unsafe {
2886 let ret_val = ((*funcs).map_from_parent)(obj_data, obj_arg0_1);
2887 let t = ret_val;
2888 let ret_val;
2889 if t.host_data != ::std::ptr::null() {
2890 ret_val = Point::new_from_rc(t);
2891 } else {
2892 ret_val = Point::new_from_owned(t);
2893 }
2894 ret_val
2895 }
2896 }
2897 #[doc(hidden)]
2898 pub fn map_to<P: PointTrait<'a>, W: WidgetTrait<'a>>(&self, arg0: &W, arg1: &P) -> Point {
2899 let (obj_arg0_1, _funcs) = arg0.get_widget_obj_funcs();
2900 let (obj_arg1_2, _funcs) = arg1.get_point_obj_funcs();
2901
2902 let (obj_data, funcs) = self.get_widget_obj_funcs();
2903 unsafe {
2904 let ret_val = ((*funcs).map_to)(obj_data, obj_arg0_1, obj_arg1_2);
2905 let t = ret_val;
2906 let ret_val;
2907 if t.host_data != ::std::ptr::null() {
2908 ret_val = Point::new_from_rc(t);
2909 } else {
2910 ret_val = Point::new_from_owned(t);
2911 }
2912 ret_val
2913 }
2914 }
2915 #[doc(hidden)]
2916 pub fn map_from<P: PointTrait<'a>, W: WidgetTrait<'a>>(&self, arg0: &W, arg1: &P) -> Point {
2917 let (obj_arg0_1, _funcs) = arg0.get_widget_obj_funcs();
2918 let (obj_arg1_2, _funcs) = arg1.get_point_obj_funcs();
2919
2920 let (obj_data, funcs) = self.get_widget_obj_funcs();
2921 unsafe {
2922 let ret_val = ((*funcs).map_from)(obj_data, obj_arg0_1, obj_arg1_2);
2923 let t = ret_val;
2924 let ret_val;
2925 if t.host_data != ::std::ptr::null() {
2926 ret_val = Point::new_from_rc(t);
2927 } else {
2928 ret_val = Point::new_from_owned(t);
2929 }
2930 ret_val
2931 }
2932 }
2933 #[doc(hidden)]
2934 pub fn window(&self) -> Option<Widget> {
2935 let (obj_data, funcs) = self.get_widget_obj_funcs();
2936 unsafe {
2937 let ret_val = ((*funcs).window)(obj_data);
2938 if ret_val.qt_data == ::std::ptr::null() {
2939 return None;
2940 }
2941 let t = ret_val;
2942 let ret_val;
2943 if t.host_data != ::std::ptr::null() {
2944 ret_val = Widget::new_from_rc(t);
2945 } else {
2946 ret_val = Widget::new_from_owned(t);
2947 }
2948 Some(ret_val)
2949 }
2950 }
2951 #[doc(hidden)]
2952 pub fn native_parent_widget(&self) -> Option<Widget> {
2953 let (obj_data, funcs) = self.get_widget_obj_funcs();
2954 unsafe {
2955 let ret_val = ((*funcs).native_parent_widget)(obj_data);
2956 if ret_val.qt_data == ::std::ptr::null() {
2957 return None;
2958 }
2959 let t = ret_val;
2960 let ret_val;
2961 if t.host_data != ::std::ptr::null() {
2962 ret_val = Widget::new_from_rc(t);
2963 } else {
2964 ret_val = Widget::new_from_owned(t);
2965 }
2966 Some(ret_val)
2967 }
2968 }
2969 #[doc(hidden)]
2970 pub fn palette(&self) -> Option<Palette> {
2971 let (obj_data, funcs) = self.get_widget_obj_funcs();
2972 unsafe {
2973 let ret_val = ((*funcs).palette)(obj_data);
2974 if ret_val.qt_data == ::std::ptr::null() {
2975 return None;
2976 }
2977 let t = ret_val;
2978 let ret_val;
2979 if t.host_data != ::std::ptr::null() {
2980 ret_val = Palette::new_from_rc(t);
2981 } else {
2982 ret_val = Palette::new_from_owned(t);
2983 }
2984 Some(ret_val)
2985 }
2986 }
2987 #[doc(hidden)]
2988 pub fn set_palette<P: PaletteTrait<'a>>(&self, arg0: &P) -> &Self {
2989 let (obj_arg0_1, _funcs) = arg0.get_palette_obj_funcs();
2990
2991 let (obj_data, funcs) = self.get_widget_obj_funcs();
2992 unsafe {
2993 ((*funcs).set_palette)(obj_data, obj_arg0_1);
2994 }
2995 self
2996 }
2997 #[doc(hidden)]
2998 pub fn set_background_role(&self, arg0: ColorRole) -> &Self {
2999 let enum_arg0_1 = arg0.bits();
3000
3001 let (obj_data, funcs) = self.get_widget_obj_funcs();
3002 unsafe {
3003 ((*funcs).set_background_role)(obj_data, enum_arg0_1);
3004 }
3005 self
3006 }
3007 #[doc(hidden)]
3008 pub fn background_role(&self) -> ColorRole {
3009 let (obj_data, funcs) = self.get_widget_obj_funcs();
3010 unsafe {
3011 let ret_val = ((*funcs).background_role)(obj_data);
3012 let ret_val = ColorRole::from_bits_truncate(ret_val);
3013 ret_val
3014 }
3015 }
3016 #[doc(hidden)]
3017 pub fn set_foreground_role(&self, arg0: ColorRole) -> &Self {
3018 let enum_arg0_1 = arg0.bits();
3019
3020 let (obj_data, funcs) = self.get_widget_obj_funcs();
3021 unsafe {
3022 ((*funcs).set_foreground_role)(obj_data, enum_arg0_1);
3023 }
3024 self
3025 }
3026 #[doc(hidden)]
3027 pub fn foreground_role(&self) -> ColorRole {
3028 let (obj_data, funcs) = self.get_widget_obj_funcs();
3029 unsafe {
3030 let ret_val = ((*funcs).foreground_role)(obj_data);
3031 let ret_val = ColorRole::from_bits_truncate(ret_val);
3032 ret_val
3033 }
3034 }
3035 #[doc(hidden)]
3036 pub fn font(&self) -> Option<Font> {
3037 let (obj_data, funcs) = self.get_widget_obj_funcs();
3038 unsafe {
3039 let ret_val = ((*funcs).font)(obj_data);
3040 if ret_val.qt_data == ::std::ptr::null() {
3041 return None;
3042 }
3043 let t = ret_val;
3044 let ret_val;
3045 if t.host_data != ::std::ptr::null() {
3046 ret_val = Font::new_from_rc(t);
3047 } else {
3048 ret_val = Font::new_from_owned(t);
3049 }
3050 Some(ret_val)
3051 }
3052 }
3053 #[doc(hidden)]
3054 pub fn set_font<F: FontTrait<'a>>(&self, arg0: &F) -> &Self {
3055 let (obj_arg0_1, _funcs) = arg0.get_font_obj_funcs();
3056
3057 let (obj_data, funcs) = self.get_widget_obj_funcs();
3058 unsafe {
3059 ((*funcs).set_font)(obj_data, obj_arg0_1);
3060 }
3061 self
3062 }
3063 #[doc(hidden)]
3064 pub fn cursor(&self) -> Cursor {
3065 let (obj_data, funcs) = self.get_widget_obj_funcs();
3066 unsafe {
3067 let ret_val = ((*funcs).cursor)(obj_data);
3068 let t = ret_val;
3069 let ret_val;
3070 if t.host_data != ::std::ptr::null() {
3071 ret_val = Cursor::new_from_rc(t);
3072 } else {
3073 ret_val = Cursor::new_from_owned(t);
3074 }
3075 ret_val
3076 }
3077 }
3078 #[doc(hidden)]
3079 pub fn set_cursor<C: CursorTrait<'a>>(&self, arg0: &C) -> &Self {
3080 let (obj_arg0_1, _funcs) = arg0.get_cursor_obj_funcs();
3081
3082 let (obj_data, funcs) = self.get_widget_obj_funcs();
3083 unsafe {
3084 ((*funcs).set_cursor)(obj_data, obj_arg0_1);
3085 }
3086 self
3087 }
3088 #[doc(hidden)]
3089 pub fn unset_cursor(&self) -> &Self {
3090 let (obj_data, funcs) = self.get_widget_obj_funcs();
3091 unsafe {
3092 ((*funcs).unset_cursor)(obj_data);
3093 }
3094 self
3095 }
3096 #[doc(hidden)]
3097 pub fn set_mouse_tracking(&self, enable: bool) -> &Self {
3098 let (obj_data, funcs) = self.get_widget_obj_funcs();
3099 unsafe {
3100 ((*funcs).set_mouse_tracking)(obj_data, enable);
3101 }
3102 self
3103 }
3104 #[doc(hidden)]
3105 pub fn has_mouse_tracking(&self) -> bool {
3106 let (obj_data, funcs) = self.get_widget_obj_funcs();
3107 unsafe {
3108 let ret_val = ((*funcs).has_mouse_tracking)(obj_data);
3109 ret_val
3110 }
3111 }
3112 #[doc(hidden)]
3113 pub fn under_mouse(&self) -> bool {
3114 let (obj_data, funcs) = self.get_widget_obj_funcs();
3115 unsafe {
3116 let ret_val = ((*funcs).under_mouse)(obj_data);
3117 ret_val
3118 }
3119 }
3120 #[doc(hidden)]
3121 pub fn set_tablet_tracking(&self, enable: bool) -> &Self {
3122 let (obj_data, funcs) = self.get_widget_obj_funcs();
3123 unsafe {
3124 ((*funcs).set_tablet_tracking)(obj_data, enable);
3125 }
3126 self
3127 }
3128 #[doc(hidden)]
3129 pub fn has_tablet_tracking(&self) -> bool {
3130 let (obj_data, funcs) = self.get_widget_obj_funcs();
3131 unsafe {
3132 let ret_val = ((*funcs).has_tablet_tracking)(obj_data);
3133 ret_val
3134 }
3135 }
3136 #[doc(hidden)]
3137 pub fn set_mask<B: BitmapTrait<'a>>(&self, arg0: &B) -> &Self {
3138 let (obj_arg0_1, _funcs) = arg0.get_bitmap_obj_funcs();
3139
3140 let (obj_data, funcs) = self.get_widget_obj_funcs();
3141 unsafe {
3142 ((*funcs).set_mask)(obj_data, obj_arg0_1);
3143 }
3144 self
3145 }
3146 #[doc(hidden)]
3147 pub fn set_mask_2<R: RegionTrait<'a>>(&self, arg0: &R) -> &Self {
3148 let (obj_arg0_1, _funcs) = arg0.get_region_obj_funcs();
3149
3150 let (obj_data, funcs) = self.get_widget_obj_funcs();
3151 unsafe {
3152 ((*funcs).set_mask_2)(obj_data, obj_arg0_1);
3153 }
3154 self
3155 }
3156 #[doc(hidden)]
3157 pub fn mask(&self) -> Region {
3158 let (obj_data, funcs) = self.get_widget_obj_funcs();
3159 unsafe {
3160 let ret_val = ((*funcs).mask)(obj_data);
3161 let t = ret_val;
3162 let ret_val;
3163 if t.host_data != ::std::ptr::null() {
3164 ret_val = Region::new_from_rc(t);
3165 } else {
3166 ret_val = Region::new_from_owned(t);
3167 }
3168 ret_val
3169 }
3170 }
3171 #[doc(hidden)]
3172 pub fn clear_mask(&self) -> &Self {
3173 let (obj_data, funcs) = self.get_widget_obj_funcs();
3174 unsafe {
3175 ((*funcs).clear_mask)(obj_data);
3176 }
3177 self
3178 }
3179 #[doc(hidden)]
3180 pub fn render<P: PaintDeviceTrait<'a>, Q: PointTrait<'a>, R: RegionTrait<'a>>(
3181 &self,
3182 target: &P,
3183 target_offset: &Q,
3184 source_region: &R,
3185 render_flags: RenderFlags,
3186 ) -> &Self {
3187 let (obj_target_1, _funcs) = target.get_paint_device_obj_funcs();
3188 let (obj_target_offset_2, _funcs) = target_offset.get_point_obj_funcs();
3189 let (obj_source_region_3, _funcs) = source_region.get_region_obj_funcs();
3190 let enum_render_flags_4 = render_flags.bits();
3191
3192 let (obj_data, funcs) = self.get_widget_obj_funcs();
3193 unsafe {
3194 ((*funcs).render)(
3195 obj_data,
3196 obj_target_1,
3197 obj_target_offset_2,
3198 obj_source_region_3,
3199 enum_render_flags_4,
3200 );
3201 }
3202 self
3203 }
3204 #[doc(hidden)]
3205 pub fn render_2<P: PainterTrait<'a>, Q: PointTrait<'a>, R: RegionTrait<'a>>(
3206 &self,
3207 painter: &P,
3208 target_offset: &Q,
3209 source_region: &R,
3210 render_flags: RenderFlags,
3211 ) -> &Self {
3212 let (obj_painter_1, _funcs) = painter.get_painter_obj_funcs();
3213 let (obj_target_offset_2, _funcs) = target_offset.get_point_obj_funcs();
3214 let (obj_source_region_3, _funcs) = source_region.get_region_obj_funcs();
3215 let enum_render_flags_4 = render_flags.bits();
3216
3217 let (obj_data, funcs) = self.get_widget_obj_funcs();
3218 unsafe {
3219 ((*funcs).render_2)(
3220 obj_data,
3221 obj_painter_1,
3222 obj_target_offset_2,
3223 obj_source_region_3,
3224 enum_render_flags_4,
3225 );
3226 }
3227 self
3228 }
3229 #[doc(hidden)]
3230 pub fn grab<R: RectTrait<'a>>(&self, rectangle: &R) -> Pixmap {
3231 let (obj_rectangle_1, _funcs) = rectangle.get_rect_obj_funcs();
3232
3233 let (obj_data, funcs) = self.get_widget_obj_funcs();
3234 unsafe {
3235 let ret_val = ((*funcs).grab)(obj_data, obj_rectangle_1);
3236 let t = ret_val;
3237 let ret_val;
3238 if t.host_data != ::std::ptr::null() {
3239 ret_val = Pixmap::new_from_rc(t);
3240 } else {
3241 ret_val = Pixmap::new_from_owned(t);
3242 }
3243 ret_val
3244 }
3245 }
3246 #[doc(hidden)]
3247 pub fn grab_gesture(&self, gtype: GestureType, flags: GestureFlags) -> &Self {
3248 let enum_gtype_1 = gtype.bits();
3249 let enum_flags_2 = flags.bits();
3250
3251 let (obj_data, funcs) = self.get_widget_obj_funcs();
3252 unsafe {
3253 ((*funcs).grab_gesture)(obj_data, enum_gtype_1, enum_flags_2);
3254 }
3255 self
3256 }
3257 #[doc(hidden)]
3258 pub fn ungrab_gesture(&self, gtype: GestureType) -> &Self {
3259 let enum_gtype_1 = gtype.bits();
3260
3261 let (obj_data, funcs) = self.get_widget_obj_funcs();
3262 unsafe {
3263 ((*funcs).ungrab_gesture)(obj_data, enum_gtype_1);
3264 }
3265 self
3266 }
3267 #[doc(hidden)]
3268 pub fn set_window_title(&self, arg0: &str) -> &Self {
3269 let str_in_arg0_1 = CString::new(arg0).unwrap();
3270
3271 let (obj_data, funcs) = self.get_widget_obj_funcs();
3272 unsafe {
3273 ((*funcs).set_window_title)(obj_data, str_in_arg0_1.as_ptr());
3274 }
3275 self
3276 }
3277 #[doc(hidden)]
3278 pub fn set_style_sheet(&self, style_sheet: &str) -> &Self {
3279 let str_in_style_sheet_1 = CString::new(style_sheet).unwrap();
3280
3281 let (obj_data, funcs) = self.get_widget_obj_funcs();
3282 unsafe {
3283 ((*funcs).set_style_sheet)(obj_data, str_in_style_sheet_1.as_ptr());
3284 }
3285 self
3286 }
3287 #[doc(hidden)]
3288 pub fn style_sheet(&self) -> String {
3289 let (obj_data, funcs) = self.get_widget_obj_funcs();
3290 unsafe {
3291 let ret_val = ((*funcs).style_sheet)(obj_data);
3292 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
3293 ret_val
3294 }
3295 }
3296 #[doc(hidden)]
3297 pub fn window_title(&self) -> String {
3298 let (obj_data, funcs) = self.get_widget_obj_funcs();
3299 unsafe {
3300 let ret_val = ((*funcs).window_title)(obj_data);
3301 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
3302 ret_val
3303 }
3304 }
3305 #[doc(hidden)]
3306 pub fn set_window_icon<I: IconTrait<'a>>(&self, icon: &I) -> &Self {
3307 let (obj_icon_1, _funcs) = icon.get_icon_obj_funcs();
3308
3309 let (obj_data, funcs) = self.get_widget_obj_funcs();
3310 unsafe {
3311 ((*funcs).set_window_icon)(obj_data, obj_icon_1);
3312 }
3313 self
3314 }
3315 #[doc(hidden)]
3316 pub fn window_icon(&self) -> Icon {
3317 let (obj_data, funcs) = self.get_widget_obj_funcs();
3318 unsafe {
3319 let ret_val = ((*funcs).window_icon)(obj_data);
3320 let t = ret_val;
3321 let ret_val;
3322 if t.host_data != ::std::ptr::null() {
3323 ret_val = Icon::new_from_rc(t);
3324 } else {
3325 ret_val = Icon::new_from_owned(t);
3326 }
3327 ret_val
3328 }
3329 }
3330 #[doc(hidden)]
3331 pub fn set_window_icon_text(&self, arg0: &str) -> &Self {
3332 let str_in_arg0_1 = CString::new(arg0).unwrap();
3333
3334 let (obj_data, funcs) = self.get_widget_obj_funcs();
3335 unsafe {
3336 ((*funcs).set_window_icon_text)(obj_data, str_in_arg0_1.as_ptr());
3337 }
3338 self
3339 }
3340 #[doc(hidden)]
3341 pub fn window_icon_text(&self) -> String {
3342 let (obj_data, funcs) = self.get_widget_obj_funcs();
3343 unsafe {
3344 let ret_val = ((*funcs).window_icon_text)(obj_data);
3345 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
3346 ret_val
3347 }
3348 }
3349 #[doc(hidden)]
3350 pub fn set_window_role(&self, arg0: &str) -> &Self {
3351 let str_in_arg0_1 = CString::new(arg0).unwrap();
3352
3353 let (obj_data, funcs) = self.get_widget_obj_funcs();
3354 unsafe {
3355 ((*funcs).set_window_role)(obj_data, str_in_arg0_1.as_ptr());
3356 }
3357 self
3358 }
3359 #[doc(hidden)]
3360 pub fn window_role(&self) -> String {
3361 let (obj_data, funcs) = self.get_widget_obj_funcs();
3362 unsafe {
3363 let ret_val = ((*funcs).window_role)(obj_data);
3364 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
3365 ret_val
3366 }
3367 }
3368 #[doc(hidden)]
3369 pub fn set_window_file_path(&self, file_path: &str) -> &Self {
3370 let str_in_file_path_1 = CString::new(file_path).unwrap();
3371
3372 let (obj_data, funcs) = self.get_widget_obj_funcs();
3373 unsafe {
3374 ((*funcs).set_window_file_path)(obj_data, str_in_file_path_1.as_ptr());
3375 }
3376 self
3377 }
3378 #[doc(hidden)]
3379 pub fn window_file_path(&self) -> String {
3380 let (obj_data, funcs) = self.get_widget_obj_funcs();
3381 unsafe {
3382 let ret_val = ((*funcs).window_file_path)(obj_data);
3383 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
3384 ret_val
3385 }
3386 }
3387 #[doc(hidden)]
3388 pub fn set_window_opacity(&self, level: f32) -> &Self {
3389 let (obj_data, funcs) = self.get_widget_obj_funcs();
3390 unsafe {
3391 ((*funcs).set_window_opacity)(obj_data, level);
3392 }
3393 self
3394 }
3395 #[doc(hidden)]
3396 pub fn window_opacity(&self) -> f32 {
3397 let (obj_data, funcs) = self.get_widget_obj_funcs();
3398 unsafe {
3399 let ret_val = ((*funcs).window_opacity)(obj_data);
3400 ret_val
3401 }
3402 }
3403 #[doc(hidden)]
3404 pub fn is_window_modified(&self) -> bool {
3405 let (obj_data, funcs) = self.get_widget_obj_funcs();
3406 unsafe {
3407 let ret_val = ((*funcs).is_window_modified)(obj_data);
3408 ret_val
3409 }
3410 }
3411 #[doc(hidden)]
3412 pub fn set_tool_tip(&self, arg0: &str) -> &Self {
3413 let str_in_arg0_1 = CString::new(arg0).unwrap();
3414
3415 let (obj_data, funcs) = self.get_widget_obj_funcs();
3416 unsafe {
3417 ((*funcs).set_tool_tip)(obj_data, str_in_arg0_1.as_ptr());
3418 }
3419 self
3420 }
3421 #[doc(hidden)]
3422 pub fn tool_tip(&self) -> String {
3423 let (obj_data, funcs) = self.get_widget_obj_funcs();
3424 unsafe {
3425 let ret_val = ((*funcs).tool_tip)(obj_data);
3426 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
3427 ret_val
3428 }
3429 }
3430 #[doc(hidden)]
3431 pub fn set_tool_tip_duration(&self, msec: i32) -> &Self {
3432 let (obj_data, funcs) = self.get_widget_obj_funcs();
3433 unsafe {
3434 ((*funcs).set_tool_tip_duration)(obj_data, msec);
3435 }
3436 self
3437 }
3438 #[doc(hidden)]
3439 pub fn tool_tip_duration(&self) -> i32 {
3440 let (obj_data, funcs) = self.get_widget_obj_funcs();
3441 unsafe {
3442 let ret_val = ((*funcs).tool_tip_duration)(obj_data);
3443 ret_val
3444 }
3445 }
3446 #[doc(hidden)]
3447 pub fn set_status_tip(&self, arg0: &str) -> &Self {
3448 let str_in_arg0_1 = CString::new(arg0).unwrap();
3449
3450 let (obj_data, funcs) = self.get_widget_obj_funcs();
3451 unsafe {
3452 ((*funcs).set_status_tip)(obj_data, str_in_arg0_1.as_ptr());
3453 }
3454 self
3455 }
3456 #[doc(hidden)]
3457 pub fn status_tip(&self) -> String {
3458 let (obj_data, funcs) = self.get_widget_obj_funcs();
3459 unsafe {
3460 let ret_val = ((*funcs).status_tip)(obj_data);
3461 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
3462 ret_val
3463 }
3464 }
3465 #[doc(hidden)]
3466 pub fn set_whats_this(&self, arg0: &str) -> &Self {
3467 let str_in_arg0_1 = CString::new(arg0).unwrap();
3468
3469 let (obj_data, funcs) = self.get_widget_obj_funcs();
3470 unsafe {
3471 ((*funcs).set_whats_this)(obj_data, str_in_arg0_1.as_ptr());
3472 }
3473 self
3474 }
3475 #[doc(hidden)]
3476 pub fn whats_this(&self) -> String {
3477 let (obj_data, funcs) = self.get_widget_obj_funcs();
3478 unsafe {
3479 let ret_val = ((*funcs).whats_this)(obj_data);
3480 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
3481 ret_val
3482 }
3483 }
3484 #[doc(hidden)]
3485 pub fn accessible_name(&self) -> String {
3486 let (obj_data, funcs) = self.get_widget_obj_funcs();
3487 unsafe {
3488 let ret_val = ((*funcs).accessible_name)(obj_data);
3489 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
3490 ret_val
3491 }
3492 }
3493 #[doc(hidden)]
3494 pub fn set_accessible_name(&self, name: &str) -> &Self {
3495 let str_in_name_1 = CString::new(name).unwrap();
3496
3497 let (obj_data, funcs) = self.get_widget_obj_funcs();
3498 unsafe {
3499 ((*funcs).set_accessible_name)(obj_data, str_in_name_1.as_ptr());
3500 }
3501 self
3502 }
3503 #[doc(hidden)]
3504 pub fn accessible_description(&self) -> String {
3505 let (obj_data, funcs) = self.get_widget_obj_funcs();
3506 unsafe {
3507 let ret_val = ((*funcs).accessible_description)(obj_data);
3508 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
3509 ret_val
3510 }
3511 }
3512 #[doc(hidden)]
3513 pub fn set_accessible_description(&self, description: &str) -> &Self {
3514 let str_in_description_1 = CString::new(description).unwrap();
3515
3516 let (obj_data, funcs) = self.get_widget_obj_funcs();
3517 unsafe {
3518 ((*funcs).set_accessible_description)(obj_data, str_in_description_1.as_ptr());
3519 }
3520 self
3521 }
3522 #[doc(hidden)]
3523 pub fn set_layout_direction(&self, direction: LayoutDirection) -> &Self {
3524 let enum_direction_1 = direction as u32;
3525
3526 let (obj_data, funcs) = self.get_widget_obj_funcs();
3527 unsafe {
3528 ((*funcs).set_layout_direction)(obj_data, enum_direction_1);
3529 }
3530 self
3531 }
3532 #[doc(hidden)]
3533 pub fn layout_direction(&self) -> LayoutDirection {
3534 let (obj_data, funcs) = self.get_widget_obj_funcs();
3535 unsafe {
3536 let ret_val = ((*funcs).layout_direction)(obj_data);
3537 let ret_val = { transmute::<u32, LayoutDirection>(ret_val) };
3538 ret_val
3539 }
3540 }
3541 #[doc(hidden)]
3542 pub fn unset_layout_direction(&self) -> &Self {
3543 let (obj_data, funcs) = self.get_widget_obj_funcs();
3544 unsafe {
3545 ((*funcs).unset_layout_direction)(obj_data);
3546 }
3547 self
3548 }
3549 #[doc(hidden)]
3550 pub fn is_right_to_left(&self) -> bool {
3551 let (obj_data, funcs) = self.get_widget_obj_funcs();
3552 unsafe {
3553 let ret_val = ((*funcs).is_right_to_left)(obj_data);
3554 ret_val
3555 }
3556 }
3557 #[doc(hidden)]
3558 pub fn is_left_to_right(&self) -> bool {
3559 let (obj_data, funcs) = self.get_widget_obj_funcs();
3560 unsafe {
3561 let ret_val = ((*funcs).is_left_to_right)(obj_data);
3562 ret_val
3563 }
3564 }
3565 #[doc(hidden)]
3566 pub fn set_focus(&self) -> &Self {
3567 let (obj_data, funcs) = self.get_widget_obj_funcs();
3568 unsafe {
3569 ((*funcs).set_focus)(obj_data);
3570 }
3571 self
3572 }
3573 #[doc(hidden)]
3574 pub fn is_active_window(&self) -> bool {
3575 let (obj_data, funcs) = self.get_widget_obj_funcs();
3576 unsafe {
3577 let ret_val = ((*funcs).is_active_window)(obj_data);
3578 ret_val
3579 }
3580 }
3581 #[doc(hidden)]
3582 pub fn activate_window(&self) -> &Self {
3583 let (obj_data, funcs) = self.get_widget_obj_funcs();
3584 unsafe {
3585 ((*funcs).activate_window)(obj_data);
3586 }
3587 self
3588 }
3589 #[doc(hidden)]
3590 pub fn clear_focus(&self) -> &Self {
3591 let (obj_data, funcs) = self.get_widget_obj_funcs();
3592 unsafe {
3593 ((*funcs).clear_focus)(obj_data);
3594 }
3595 self
3596 }
3597 #[doc(hidden)]
3598 pub fn set_focus_2(&self, reason: FocusReason) -> &Self {
3599 let enum_reason_1 = reason as u32;
3600
3601 let (obj_data, funcs) = self.get_widget_obj_funcs();
3602 unsafe {
3603 ((*funcs).set_focus_2)(obj_data, enum_reason_1);
3604 }
3605 self
3606 }
3607 #[doc(hidden)]
3608 pub fn focus_policy(&self) -> FocusPolicy {
3609 let (obj_data, funcs) = self.get_widget_obj_funcs();
3610 unsafe {
3611 let ret_val = ((*funcs).focus_policy)(obj_data);
3612 let ret_val = { transmute::<u32, FocusPolicy>(ret_val) };
3613 ret_val
3614 }
3615 }
3616 #[doc(hidden)]
3617 pub fn set_focus_policy(&self, policy: FocusPolicy) -> &Self {
3618 let enum_policy_1 = policy as u32;
3619
3620 let (obj_data, funcs) = self.get_widget_obj_funcs();
3621 unsafe {
3622 ((*funcs).set_focus_policy)(obj_data, enum_policy_1);
3623 }
3624 self
3625 }
3626 #[doc(hidden)]
3627 pub fn has_focus(&self) -> bool {
3628 let (obj_data, funcs) = self.get_widget_obj_funcs();
3629 unsafe {
3630 let ret_val = ((*funcs).has_focus)(obj_data);
3631 ret_val
3632 }
3633 }
3634 #[doc(hidden)]
3635 pub fn set_tab_order<W: WidgetTrait<'a>>(arg0: &W, arg1: &W) {
3636 let (obj_arg0_1, _funcs) = arg0.get_widget_obj_funcs();
3637 let (obj_arg1_2, _funcs) = arg1.get_widget_obj_funcs();
3638
3639 let (obj_data, funcs) = unsafe {
3640 (
3641 ::std::ptr::null(),
3642 (*((*rute_ffi_get()).get_widget)(::std::ptr::null()).all_funcs).widget_funcs,
3643 )
3644 };
3645 unsafe {
3646 ((*funcs).set_tab_order)(obj_data, obj_arg0_1, obj_arg1_2);
3647 }
3648 }
3649 #[doc(hidden)]
3650 pub fn set_focus_proxy<W: WidgetTrait<'a>>(&self, arg0: &W) -> &Self {
3651 let (obj_arg0_1, _funcs) = arg0.get_widget_obj_funcs();
3652
3653 let (obj_data, funcs) = self.get_widget_obj_funcs();
3654 unsafe {
3655 ((*funcs).set_focus_proxy)(obj_data, obj_arg0_1);
3656 }
3657 self
3658 }
3659 #[doc(hidden)]
3660 pub fn focus_proxy(&self) -> Option<Widget> {
3661 let (obj_data, funcs) = self.get_widget_obj_funcs();
3662 unsafe {
3663 let ret_val = ((*funcs).focus_proxy)(obj_data);
3664 if ret_val.qt_data == ::std::ptr::null() {
3665 return None;
3666 }
3667 let t = ret_val;
3668 let ret_val;
3669 if t.host_data != ::std::ptr::null() {
3670 ret_val = Widget::new_from_rc(t);
3671 } else {
3672 ret_val = Widget::new_from_owned(t);
3673 }
3674 Some(ret_val)
3675 }
3676 }
3677 #[doc(hidden)]
3678 pub fn context_menu_policy(&self) -> ContextMenuPolicy {
3679 let (obj_data, funcs) = self.get_widget_obj_funcs();
3680 unsafe {
3681 let ret_val = ((*funcs).context_menu_policy)(obj_data);
3682 let ret_val = { transmute::<u32, ContextMenuPolicy>(ret_val) };
3683 ret_val
3684 }
3685 }
3686 #[doc(hidden)]
3687 pub fn set_context_menu_policy(&self, policy: ContextMenuPolicy) -> &Self {
3688 let enum_policy_1 = policy as u32;
3689
3690 let (obj_data, funcs) = self.get_widget_obj_funcs();
3691 unsafe {
3692 ((*funcs).set_context_menu_policy)(obj_data, enum_policy_1);
3693 }
3694 self
3695 }
3696 #[doc(hidden)]
3697 pub fn grab_mouse(&self) -> &Self {
3698 let (obj_data, funcs) = self.get_widget_obj_funcs();
3699 unsafe {
3700 ((*funcs).grab_mouse)(obj_data);
3701 }
3702 self
3703 }
3704 #[doc(hidden)]
3705 pub fn grab_mouse_2<C: CursorTrait<'a>>(&self, arg0: &C) -> &Self {
3706 let (obj_arg0_1, _funcs) = arg0.get_cursor_obj_funcs();
3707
3708 let (obj_data, funcs) = self.get_widget_obj_funcs();
3709 unsafe {
3710 ((*funcs).grab_mouse_2)(obj_data, obj_arg0_1);
3711 }
3712 self
3713 }
3714 #[doc(hidden)]
3715 pub fn release_mouse(&self) -> &Self {
3716 let (obj_data, funcs) = self.get_widget_obj_funcs();
3717 unsafe {
3718 ((*funcs).release_mouse)(obj_data);
3719 }
3720 self
3721 }
3722 #[doc(hidden)]
3723 pub fn grab_keyboard(&self) -> &Self {
3724 let (obj_data, funcs) = self.get_widget_obj_funcs();
3725 unsafe {
3726 ((*funcs).grab_keyboard)(obj_data);
3727 }
3728 self
3729 }
3730 #[doc(hidden)]
3731 pub fn release_keyboard(&self) -> &Self {
3732 let (obj_data, funcs) = self.get_widget_obj_funcs();
3733 unsafe {
3734 ((*funcs).release_keyboard)(obj_data);
3735 }
3736 self
3737 }
3738 #[doc(hidden)]
3739 pub fn grab_shortcut<K: KeySequenceTrait<'a>>(&self, key: &K, context: ShortcutContext) -> i32 {
3740 let (obj_key_1, _funcs) = key.get_key_sequence_obj_funcs();
3741 let enum_context_2 = context as u32;
3742
3743 let (obj_data, funcs) = self.get_widget_obj_funcs();
3744 unsafe {
3745 let ret_val = ((*funcs).grab_shortcut)(obj_data, obj_key_1, enum_context_2);
3746 ret_val
3747 }
3748 }
3749 #[doc(hidden)]
3750 pub fn release_shortcut(&self, id: i32) -> &Self {
3751 let (obj_data, funcs) = self.get_widget_obj_funcs();
3752 unsafe {
3753 ((*funcs).release_shortcut)(obj_data, id);
3754 }
3755 self
3756 }
3757 #[doc(hidden)]
3758 pub fn set_shortcut_enabled(&self, id: i32, enable: bool) -> &Self {
3759 let (obj_data, funcs) = self.get_widget_obj_funcs();
3760 unsafe {
3761 ((*funcs).set_shortcut_enabled)(obj_data, id, enable);
3762 }
3763 self
3764 }
3765 #[doc(hidden)]
3766 pub fn set_shortcut_auto_repeat(&self, id: i32, enable: bool) -> &Self {
3767 let (obj_data, funcs) = self.get_widget_obj_funcs();
3768 unsafe {
3769 ((*funcs).set_shortcut_auto_repeat)(obj_data, id, enable);
3770 }
3771 self
3772 }
3773 #[doc(hidden)]
3774 pub fn mouse_grabber() -> Option<Widget<'a>> {
3775 let (obj_data, funcs) = unsafe {
3776 (
3777 ::std::ptr::null(),
3778 (*((*rute_ffi_get()).get_widget)(::std::ptr::null()).all_funcs).widget_funcs,
3779 )
3780 };
3781 unsafe {
3782 let ret_val = ((*funcs).mouse_grabber)(obj_data);
3783 if ret_val.qt_data == ::std::ptr::null() {
3784 return None;
3785 }
3786 let t = ret_val;
3787 let ret_val;
3788 if t.host_data != ::std::ptr::null() {
3789 ret_val = Widget::new_from_rc(t);
3790 } else {
3791 ret_val = Widget::new_from_owned(t);
3792 }
3793 Some(ret_val)
3794 }
3795 }
3796 #[doc(hidden)]
3797 pub fn keyboard_grabber() -> Option<Widget<'a>> {
3798 let (obj_data, funcs) = unsafe {
3799 (
3800 ::std::ptr::null(),
3801 (*((*rute_ffi_get()).get_widget)(::std::ptr::null()).all_funcs).widget_funcs,
3802 )
3803 };
3804 unsafe {
3805 let ret_val = ((*funcs).keyboard_grabber)(obj_data);
3806 if ret_val.qt_data == ::std::ptr::null() {
3807 return None;
3808 }
3809 let t = ret_val;
3810 let ret_val;
3811 if t.host_data != ::std::ptr::null() {
3812 ret_val = Widget::new_from_rc(t);
3813 } else {
3814 ret_val = Widget::new_from_owned(t);
3815 }
3816 Some(ret_val)
3817 }
3818 }
3819 #[doc(hidden)]
3820 pub fn updates_enabled(&self) -> bool {
3821 let (obj_data, funcs) = self.get_widget_obj_funcs();
3822 unsafe {
3823 let ret_val = ((*funcs).updates_enabled)(obj_data);
3824 ret_val
3825 }
3826 }
3827 #[doc(hidden)]
3828 pub fn set_updates_enabled(&self, enable: bool) -> &Self {
3829 let (obj_data, funcs) = self.get_widget_obj_funcs();
3830 unsafe {
3831 ((*funcs).set_updates_enabled)(obj_data, enable);
3832 }
3833 self
3834 }
3835 #[doc(hidden)]
3836 pub fn update(&self) -> &Self {
3837 let (obj_data, funcs) = self.get_widget_obj_funcs();
3838 unsafe {
3839 ((*funcs).update)(obj_data);
3840 }
3841 self
3842 }
3843 #[doc(hidden)]
3844 pub fn repaint(&self) -> &Self {
3845 let (obj_data, funcs) = self.get_widget_obj_funcs();
3846 unsafe {
3847 ((*funcs).repaint)(obj_data);
3848 }
3849 self
3850 }
3851 #[doc(hidden)]
3852 pub fn update_2(&self, x: i32, y: i32, w: i32, h: i32) -> &Self {
3853 let (obj_data, funcs) = self.get_widget_obj_funcs();
3854 unsafe {
3855 ((*funcs).update_2)(obj_data, x, y, w, h);
3856 }
3857 self
3858 }
3859 #[doc(hidden)]
3860 pub fn update_3<R: RectTrait<'a>>(&self, arg0: &R) -> &Self {
3861 let (obj_arg0_1, _funcs) = arg0.get_rect_obj_funcs();
3862
3863 let (obj_data, funcs) = self.get_widget_obj_funcs();
3864 unsafe {
3865 ((*funcs).update_3)(obj_data, obj_arg0_1);
3866 }
3867 self
3868 }
3869 #[doc(hidden)]
3870 pub fn update_4<R: RegionTrait<'a>>(&self, arg0: &R) -> &Self {
3871 let (obj_arg0_1, _funcs) = arg0.get_region_obj_funcs();
3872
3873 let (obj_data, funcs) = self.get_widget_obj_funcs();
3874 unsafe {
3875 ((*funcs).update_4)(obj_data, obj_arg0_1);
3876 }
3877 self
3878 }
3879 #[doc(hidden)]
3880 pub fn repaint_2(&self, x: i32, y: i32, w: i32, h: i32) -> &Self {
3881 let (obj_data, funcs) = self.get_widget_obj_funcs();
3882 unsafe {
3883 ((*funcs).repaint_2)(obj_data, x, y, w, h);
3884 }
3885 self
3886 }
3887 #[doc(hidden)]
3888 pub fn repaint_3<R: RectTrait<'a>>(&self, arg0: &R) -> &Self {
3889 let (obj_arg0_1, _funcs) = arg0.get_rect_obj_funcs();
3890
3891 let (obj_data, funcs) = self.get_widget_obj_funcs();
3892 unsafe {
3893 ((*funcs).repaint_3)(obj_data, obj_arg0_1);
3894 }
3895 self
3896 }
3897 #[doc(hidden)]
3898 pub fn repaint_4<R: RegionTrait<'a>>(&self, arg0: &R) -> &Self {
3899 let (obj_arg0_1, _funcs) = arg0.get_region_obj_funcs();
3900
3901 let (obj_data, funcs) = self.get_widget_obj_funcs();
3902 unsafe {
3903 ((*funcs).repaint_4)(obj_data, obj_arg0_1);
3904 }
3905 self
3906 }
3907 #[doc(hidden)]
3908 pub fn set_hidden(&self, hidden: bool) -> &Self {
3909 let (obj_data, funcs) = self.get_widget_obj_funcs();
3910 unsafe {
3911 ((*funcs).set_hidden)(obj_data, hidden);
3912 }
3913 self
3914 }
3915 #[doc(hidden)]
3916 pub fn show(&self) -> &Self {
3917 let (obj_data, funcs) = self.get_widget_obj_funcs();
3918 unsafe {
3919 ((*funcs).show)(obj_data);
3920 }
3921 self
3922 }
3923 #[doc(hidden)]
3924 pub fn hide(&self) -> &Self {
3925 let (obj_data, funcs) = self.get_widget_obj_funcs();
3926 unsafe {
3927 ((*funcs).hide)(obj_data);
3928 }
3929 self
3930 }
3931 #[doc(hidden)]
3932 pub fn show_minimized(&self) -> &Self {
3933 let (obj_data, funcs) = self.get_widget_obj_funcs();
3934 unsafe {
3935 ((*funcs).show_minimized)(obj_data);
3936 }
3937 self
3938 }
3939 #[doc(hidden)]
3940 pub fn show_maximized(&self) -> &Self {
3941 let (obj_data, funcs) = self.get_widget_obj_funcs();
3942 unsafe {
3943 ((*funcs).show_maximized)(obj_data);
3944 }
3945 self
3946 }
3947 #[doc(hidden)]
3948 pub fn show_full_screen(&self) -> &Self {
3949 let (obj_data, funcs) = self.get_widget_obj_funcs();
3950 unsafe {
3951 ((*funcs).show_full_screen)(obj_data);
3952 }
3953 self
3954 }
3955 #[doc(hidden)]
3956 pub fn show_normal(&self) -> &Self {
3957 let (obj_data, funcs) = self.get_widget_obj_funcs();
3958 unsafe {
3959 ((*funcs).show_normal)(obj_data);
3960 }
3961 self
3962 }
3963 #[doc(hidden)]
3964 pub fn close(&self) -> bool {
3965 let (obj_data, funcs) = self.get_widget_obj_funcs();
3966 unsafe {
3967 let ret_val = ((*funcs).close)(obj_data);
3968 ret_val
3969 }
3970 }
3971 #[doc(hidden)]
3972 pub fn raise(&self) -> &Self {
3973 let (obj_data, funcs) = self.get_widget_obj_funcs();
3974 unsafe {
3975 ((*funcs).raise)(obj_data);
3976 }
3977 self
3978 }
3979 #[doc(hidden)]
3980 pub fn lower(&self) -> &Self {
3981 let (obj_data, funcs) = self.get_widget_obj_funcs();
3982 unsafe {
3983 ((*funcs).lower)(obj_data);
3984 }
3985 self
3986 }
3987 #[doc(hidden)]
3988 pub fn stack_under<W: WidgetTrait<'a>>(&self, arg0: &W) -> &Self {
3989 let (obj_arg0_1, _funcs) = arg0.get_widget_obj_funcs();
3990
3991 let (obj_data, funcs) = self.get_widget_obj_funcs();
3992 unsafe {
3993 ((*funcs).stack_under)(obj_data, obj_arg0_1);
3994 }
3995 self
3996 }
3997 #[doc(hidden)]
3998 pub fn move_widget(&self, x: i32, y: i32) -> &Self {
3999 let (obj_data, funcs) = self.get_widget_obj_funcs();
4000 unsafe {
4001 ((*funcs).move_widget)(obj_data, x, y);
4002 }
4003 self
4004 }
4005 #[doc(hidden)]
4006 pub fn move_2<P: PointTrait<'a>>(&self, arg0: &P) -> &Self {
4007 let (obj_arg0_1, _funcs) = arg0.get_point_obj_funcs();
4008
4009 let (obj_data, funcs) = self.get_widget_obj_funcs();
4010 unsafe {
4011 ((*funcs).move_2)(obj_data, obj_arg0_1);
4012 }
4013 self
4014 }
4015 #[doc(hidden)]
4016 pub fn resize(&self, w: i32, h: i32) -> &Self {
4017 let (obj_data, funcs) = self.get_widget_obj_funcs();
4018 unsafe {
4019 ((*funcs).resize)(obj_data, w, h);
4020 }
4021 self
4022 }
4023 #[doc(hidden)]
4024 pub fn resize_2<S: SizeTrait<'a>>(&self, arg0: &S) -> &Self {
4025 let (obj_arg0_1, _funcs) = arg0.get_size_obj_funcs();
4026
4027 let (obj_data, funcs) = self.get_widget_obj_funcs();
4028 unsafe {
4029 ((*funcs).resize_2)(obj_data, obj_arg0_1);
4030 }
4031 self
4032 }
4033 #[doc(hidden)]
4034 pub fn adjust_size(&self) -> &Self {
4035 let (obj_data, funcs) = self.get_widget_obj_funcs();
4036 unsafe {
4037 ((*funcs).adjust_size)(obj_data);
4038 }
4039 self
4040 }
4041 #[doc(hidden)]
4042 pub fn is_visible(&self) -> bool {
4043 let (obj_data, funcs) = self.get_widget_obj_funcs();
4044 unsafe {
4045 let ret_val = ((*funcs).is_visible)(obj_data);
4046 ret_val
4047 }
4048 }
4049 #[doc(hidden)]
4050 pub fn is_visible_to<W: WidgetTrait<'a>>(&self, arg0: &W) -> bool {
4051 let (obj_arg0_1, _funcs) = arg0.get_widget_obj_funcs();
4052
4053 let (obj_data, funcs) = self.get_widget_obj_funcs();
4054 unsafe {
4055 let ret_val = ((*funcs).is_visible_to)(obj_data, obj_arg0_1);
4056 ret_val
4057 }
4058 }
4059 #[doc(hidden)]
4060 pub fn is_hidden(&self) -> bool {
4061 let (obj_data, funcs) = self.get_widget_obj_funcs();
4062 unsafe {
4063 let ret_val = ((*funcs).is_hidden)(obj_data);
4064 ret_val
4065 }
4066 }
4067 #[doc(hidden)]
4068 pub fn is_minimized(&self) -> bool {
4069 let (obj_data, funcs) = self.get_widget_obj_funcs();
4070 unsafe {
4071 let ret_val = ((*funcs).is_minimized)(obj_data);
4072 ret_val
4073 }
4074 }
4075 #[doc(hidden)]
4076 pub fn is_maximized(&self) -> bool {
4077 let (obj_data, funcs) = self.get_widget_obj_funcs();
4078 unsafe {
4079 let ret_val = ((*funcs).is_maximized)(obj_data);
4080 ret_val
4081 }
4082 }
4083 #[doc(hidden)]
4084 pub fn is_full_screen(&self) -> bool {
4085 let (obj_data, funcs) = self.get_widget_obj_funcs();
4086 unsafe {
4087 let ret_val = ((*funcs).is_full_screen)(obj_data);
4088 ret_val
4089 }
4090 }
4091 #[doc(hidden)]
4092 pub fn window_state(&self) -> WindowStates {
4093 let (obj_data, funcs) = self.get_widget_obj_funcs();
4094 unsafe {
4095 let ret_val = ((*funcs).window_state)(obj_data);
4096 let ret_val = WindowStates::from_bits_truncate(ret_val);
4097 ret_val
4098 }
4099 }
4100 #[doc(hidden)]
4101 pub fn set_window_state(&self, state: WindowStates) -> &Self {
4102 let enum_state_1 = state.bits();
4103
4104 let (obj_data, funcs) = self.get_widget_obj_funcs();
4105 unsafe {
4106 ((*funcs).set_window_state)(obj_data, enum_state_1);
4107 }
4108 self
4109 }
4110 #[doc(hidden)]
4111 pub fn override_window_state(&self, state: WindowStates) -> &Self {
4112 let enum_state_1 = state.bits();
4113
4114 let (obj_data, funcs) = self.get_widget_obj_funcs();
4115 unsafe {
4116 ((*funcs).override_window_state)(obj_data, enum_state_1);
4117 }
4118 self
4119 }
4120 #[doc(hidden)]
4121 pub fn size_hint(&self) -> Size {
4122 let (obj_data, funcs) = self.get_widget_obj_funcs();
4123 unsafe {
4124 let ret_val = ((*funcs).size_hint)(obj_data);
4125 let t = ret_val;
4126 let ret_val;
4127 if t.host_data != ::std::ptr::null() {
4128 ret_val = Size::new_from_rc(t);
4129 } else {
4130 ret_val = Size::new_from_owned(t);
4131 }
4132 ret_val
4133 }
4134 }
4135 #[doc(hidden)]
4136 pub fn minimum_size_hint(&self) -> Size {
4137 let (obj_data, funcs) = self.get_widget_obj_funcs();
4138 unsafe {
4139 let ret_val = ((*funcs).minimum_size_hint)(obj_data);
4140 let t = ret_val;
4141 let ret_val;
4142 if t.host_data != ::std::ptr::null() {
4143 ret_val = Size::new_from_rc(t);
4144 } else {
4145 ret_val = Size::new_from_owned(t);
4146 }
4147 ret_val
4148 }
4149 }
4150 #[doc(hidden)]
4151 pub fn size_policy(&self) -> SizePolicy {
4152 let (obj_data, funcs) = self.get_widget_obj_funcs();
4153 unsafe {
4154 let ret_val = ((*funcs).size_policy)(obj_data);
4155 let t = ret_val;
4156 let ret_val;
4157 if t.host_data != ::std::ptr::null() {
4158 ret_val = SizePolicy::new_from_rc(t);
4159 } else {
4160 ret_val = SizePolicy::new_from_owned(t);
4161 }
4162 ret_val
4163 }
4164 }
4165 #[doc(hidden)]
4166 pub fn set_size_policy<S: SizePolicyTrait<'a>>(&self, arg0: &S) -> &Self {
4167 let (obj_arg0_1, _funcs) = arg0.get_size_policy_obj_funcs();
4168
4169 let (obj_data, funcs) = self.get_widget_obj_funcs();
4170 unsafe {
4171 ((*funcs).set_size_policy)(obj_data, obj_arg0_1);
4172 }
4173 self
4174 }
4175 #[doc(hidden)]
4176 pub fn set_size_policy_2(&self, horizontal: Policy, vertical: Policy) -> &Self {
4177 let enum_horizontal_1 = horizontal as u32;
4178 let enum_vertical_2 = vertical as u32;
4179
4180 let (obj_data, funcs) = self.get_widget_obj_funcs();
4181 unsafe {
4182 ((*funcs).set_size_policy_2)(obj_data, enum_horizontal_1, enum_vertical_2);
4183 }
4184 self
4185 }
4186 #[doc(hidden)]
4187 pub fn height_for_width(&self, arg0: i32) -> i32 {
4188 let (obj_data, funcs) = self.get_widget_obj_funcs();
4189 unsafe {
4190 let ret_val = ((*funcs).height_for_width)(obj_data, arg0);
4191 ret_val
4192 }
4193 }
4194 #[doc(hidden)]
4195 pub fn has_height_for_width(&self) -> bool {
4196 let (obj_data, funcs) = self.get_widget_obj_funcs();
4197 unsafe {
4198 let ret_val = ((*funcs).has_height_for_width)(obj_data);
4199 ret_val
4200 }
4201 }
4202 #[doc(hidden)]
4203 pub fn visible_region(&self) -> Region {
4204 let (obj_data, funcs) = self.get_widget_obj_funcs();
4205 unsafe {
4206 let ret_val = ((*funcs).visible_region)(obj_data);
4207 let t = ret_val;
4208 let ret_val;
4209 if t.host_data != ::std::ptr::null() {
4210 ret_val = Region::new_from_rc(t);
4211 } else {
4212 ret_val = Region::new_from_owned(t);
4213 }
4214 ret_val
4215 }
4216 }
4217 #[doc(hidden)]
4218 pub fn set_contents_margins(&self, left: i32, top: i32, right: i32, bottom: i32) -> &Self {
4219 let (obj_data, funcs) = self.get_widget_obj_funcs();
4220 unsafe {
4221 ((*funcs).set_contents_margins)(obj_data, left, top, right, bottom);
4222 }
4223 self
4224 }
4225 #[doc(hidden)]
4226 pub fn set_contents_margins_2<M: MarginsTrait<'a>>(&self, margins: &M) -> &Self {
4227 let (obj_margins_1, _funcs) = margins.get_margins_obj_funcs();
4228
4229 let (obj_data, funcs) = self.get_widget_obj_funcs();
4230 unsafe {
4231 ((*funcs).set_contents_margins_2)(obj_data, obj_margins_1);
4232 }
4233 self
4234 }
4235 #[doc(hidden)]
4236 pub fn contents_margins(&self) -> Margins {
4237 let (obj_data, funcs) = self.get_widget_obj_funcs();
4238 unsafe {
4239 let ret_val = ((*funcs).contents_margins)(obj_data);
4240 let t = ret_val;
4241 let ret_val;
4242 if t.host_data != ::std::ptr::null() {
4243 ret_val = Margins::new_from_rc(t);
4244 } else {
4245 ret_val = Margins::new_from_owned(t);
4246 }
4247 ret_val
4248 }
4249 }
4250 #[doc(hidden)]
4251 pub fn contents_rect(&self) -> Rect {
4252 let (obj_data, funcs) = self.get_widget_obj_funcs();
4253 unsafe {
4254 let ret_val = ((*funcs).contents_rect)(obj_data);
4255 let t = ret_val;
4256 let ret_val;
4257 if t.host_data != ::std::ptr::null() {
4258 ret_val = Rect::new_from_rc(t);
4259 } else {
4260 ret_val = Rect::new_from_owned(t);
4261 }
4262 ret_val
4263 }
4264 }
4265 #[doc(hidden)]
4266 pub fn layout(&self) -> Option<Layout> {
4267 let (obj_data, funcs) = self.get_widget_obj_funcs();
4268 unsafe {
4269 let ret_val = ((*funcs).layout)(obj_data);
4270 if ret_val.qt_data == ::std::ptr::null() {
4271 return None;
4272 }
4273 let t = ret_val;
4274 let ret_val;
4275 if t.host_data != ::std::ptr::null() {
4276 ret_val = Layout::new_from_rc(t);
4277 } else {
4278 ret_val = Layout::new_from_owned(t);
4279 }
4280 Some(ret_val)
4281 }
4282 }
4283 #[doc(hidden)]
4284 pub fn set_layout<L: LayoutTrait<'a>>(&self, arg0: &L) -> &Self {
4285 let (obj_arg0_1, _funcs) = arg0.get_layout_obj_funcs();
4286
4287 let (obj_data, funcs) = self.get_widget_obj_funcs();
4288 unsafe {
4289 ((*funcs).set_layout)(obj_data, obj_arg0_1);
4290 }
4291 self
4292 }
4293 #[doc(hidden)]
4294 pub fn set_parent<W: WidgetTrait<'a>>(&self, parent: &W) -> &Self {
4295 let (obj_parent_1, _funcs) = parent.get_widget_obj_funcs();
4296
4297 let (obj_data, funcs) = self.get_widget_obj_funcs();
4298 unsafe {
4299 ((*funcs).set_parent)(obj_data, obj_parent_1);
4300 }
4301 self
4302 }
4303 #[doc(hidden)]
4304 pub fn set_parent_2<W: WidgetTrait<'a>>(&self, parent: &W, f: WindowFlags) -> &Self {
4305 let (obj_parent_1, _funcs) = parent.get_widget_obj_funcs();
4306 let enum_f_2 = f.bits();
4307
4308 let (obj_data, funcs) = self.get_widget_obj_funcs();
4309 unsafe {
4310 ((*funcs).set_parent_2)(obj_data, obj_parent_1, enum_f_2);
4311 }
4312 self
4313 }
4314 #[doc(hidden)]
4315 pub fn scroll(&self, dx: i32, dy: i32) -> &Self {
4316 let (obj_data, funcs) = self.get_widget_obj_funcs();
4317 unsafe {
4318 ((*funcs).scroll)(obj_data, dx, dy);
4319 }
4320 self
4321 }
4322 #[doc(hidden)]
4323 pub fn scroll_2<R: RectTrait<'a>>(&self, dx: i32, dy: i32, arg0: &R) -> &Self {
4324 let (obj_arg0_3, _funcs) = arg0.get_rect_obj_funcs();
4325
4326 let (obj_data, funcs) = self.get_widget_obj_funcs();
4327 unsafe {
4328 ((*funcs).scroll_2)(obj_data, dx, dy, obj_arg0_3);
4329 }
4330 self
4331 }
4332 #[doc(hidden)]
4333 pub fn focus_widget(&self) -> Option<Widget> {
4334 let (obj_data, funcs) = self.get_widget_obj_funcs();
4335 unsafe {
4336 let ret_val = ((*funcs).focus_widget)(obj_data);
4337 if ret_val.qt_data == ::std::ptr::null() {
4338 return None;
4339 }
4340 let t = ret_val;
4341 let ret_val;
4342 if t.host_data != ::std::ptr::null() {
4343 ret_val = Widget::new_from_rc(t);
4344 } else {
4345 ret_val = Widget::new_from_owned(t);
4346 }
4347 Some(ret_val)
4348 }
4349 }
4350 #[doc(hidden)]
4351 pub fn next_in_focus_chain(&self) -> Option<Widget> {
4352 let (obj_data, funcs) = self.get_widget_obj_funcs();
4353 unsafe {
4354 let ret_val = ((*funcs).next_in_focus_chain)(obj_data);
4355 if ret_val.qt_data == ::std::ptr::null() {
4356 return None;
4357 }
4358 let t = ret_val;
4359 let ret_val;
4360 if t.host_data != ::std::ptr::null() {
4361 ret_val = Widget::new_from_rc(t);
4362 } else {
4363 ret_val = Widget::new_from_owned(t);
4364 }
4365 Some(ret_val)
4366 }
4367 }
4368 #[doc(hidden)]
4369 pub fn previous_in_focus_chain(&self) -> Option<Widget> {
4370 let (obj_data, funcs) = self.get_widget_obj_funcs();
4371 unsafe {
4372 let ret_val = ((*funcs).previous_in_focus_chain)(obj_data);
4373 if ret_val.qt_data == ::std::ptr::null() {
4374 return None;
4375 }
4376 let t = ret_val;
4377 let ret_val;
4378 if t.host_data != ::std::ptr::null() {
4379 ret_val = Widget::new_from_rc(t);
4380 } else {
4381 ret_val = Widget::new_from_owned(t);
4382 }
4383 Some(ret_val)
4384 }
4385 }
4386 #[doc(hidden)]
4387 pub fn accept_drops(&self) -> bool {
4388 let (obj_data, funcs) = self.get_widget_obj_funcs();
4389 unsafe {
4390 let ret_val = ((*funcs).accept_drops)(obj_data);
4391 ret_val
4392 }
4393 }
4394 #[doc(hidden)]
4395 pub fn set_accept_drops(&self, on: bool) -> &Self {
4396 let (obj_data, funcs) = self.get_widget_obj_funcs();
4397 unsafe {
4398 ((*funcs).set_accept_drops)(obj_data, on);
4399 }
4400 self
4401 }
4402 #[doc(hidden)]
4403 pub fn parent_widget(&self) -> Option<Widget> {
4404 let (obj_data, funcs) = self.get_widget_obj_funcs();
4405 unsafe {
4406 let ret_val = ((*funcs).parent_widget)(obj_data);
4407 if ret_val.qt_data == ::std::ptr::null() {
4408 return None;
4409 }
4410 let t = ret_val;
4411 let ret_val;
4412 if t.host_data != ::std::ptr::null() {
4413 ret_val = Widget::new_from_rc(t);
4414 } else {
4415 ret_val = Widget::new_from_owned(t);
4416 }
4417 Some(ret_val)
4418 }
4419 }
4420 #[doc(hidden)]
4421 pub fn set_window_flags(&self, gtype: WindowFlags) -> &Self {
4422 let enum_gtype_1 = gtype.bits();
4423
4424 let (obj_data, funcs) = self.get_widget_obj_funcs();
4425 unsafe {
4426 ((*funcs).set_window_flags)(obj_data, enum_gtype_1);
4427 }
4428 self
4429 }
4430 #[doc(hidden)]
4431 pub fn window_flags(&self) -> WindowFlags {
4432 let (obj_data, funcs) = self.get_widget_obj_funcs();
4433 unsafe {
4434 let ret_val = ((*funcs).window_flags)(obj_data);
4435 let ret_val = WindowFlags::from_bits_truncate(ret_val);
4436 ret_val
4437 }
4438 }
4439 #[doc(hidden)]
4440 pub fn override_window_flags(&self, wtype: WindowFlags) -> &Self {
4441 let enum_wtype_1 = wtype.bits();
4442
4443 let (obj_data, funcs) = self.get_widget_obj_funcs();
4444 unsafe {
4445 ((*funcs).override_window_flags)(obj_data, enum_wtype_1);
4446 }
4447 self
4448 }
4449 #[doc(hidden)]
4450 pub fn find(arg0: u64) -> Option<Widget<'a>> {
4451 let (obj_data, funcs) = unsafe {
4452 (
4453 ::std::ptr::null(),
4454 (*((*rute_ffi_get()).get_widget)(::std::ptr::null()).all_funcs).widget_funcs,
4455 )
4456 };
4457 unsafe {
4458 let ret_val = ((*funcs).find)(obj_data, arg0);
4459 if ret_val.qt_data == ::std::ptr::null() {
4460 return None;
4461 }
4462 let t = ret_val;
4463 let ret_val;
4464 if t.host_data != ::std::ptr::null() {
4465 ret_val = Widget::new_from_rc(t);
4466 } else {
4467 ret_val = Widget::new_from_owned(t);
4468 }
4469 Some(ret_val)
4470 }
4471 }
4472 #[doc(hidden)]
4473 pub fn child_at(&self, x: i32, y: i32) -> Option<Widget> {
4474 let (obj_data, funcs) = self.get_widget_obj_funcs();
4475 unsafe {
4476 let ret_val = ((*funcs).child_at)(obj_data, x, y);
4477 if ret_val.qt_data == ::std::ptr::null() {
4478 return None;
4479 }
4480 let t = ret_val;
4481 let ret_val;
4482 if t.host_data != ::std::ptr::null() {
4483 ret_val = Widget::new_from_rc(t);
4484 } else {
4485 ret_val = Widget::new_from_owned(t);
4486 }
4487 Some(ret_val)
4488 }
4489 }
4490 #[doc(hidden)]
4491 pub fn child_at_2<P: PointTrait<'a>>(&self, p: &P) -> Option<Widget> {
4492 let (obj_p_1, _funcs) = p.get_point_obj_funcs();
4493
4494 let (obj_data, funcs) = self.get_widget_obj_funcs();
4495 unsafe {
4496 let ret_val = ((*funcs).child_at_2)(obj_data, obj_p_1);
4497 if ret_val.qt_data == ::std::ptr::null() {
4498 return None;
4499 }
4500 let t = ret_val;
4501 let ret_val;
4502 if t.host_data != ::std::ptr::null() {
4503 ret_val = Widget::new_from_rc(t);
4504 } else {
4505 ret_val = Widget::new_from_owned(t);
4506 }
4507 Some(ret_val)
4508 }
4509 }
4510 #[doc(hidden)]
4511 pub fn paint_engine(&self) -> Option<PaintEngine> {
4512 let (obj_data, funcs) = self.get_widget_obj_funcs();
4513 unsafe {
4514 let ret_val = ((*funcs).paint_engine)(obj_data);
4515 if ret_val.qt_data == ::std::ptr::null() {
4516 return None;
4517 }
4518 let t = ret_val;
4519 let ret_val;
4520 if t.host_data != ::std::ptr::null() {
4521 ret_val = PaintEngine::new_from_rc(t);
4522 } else {
4523 ret_val = PaintEngine::new_from_owned(t);
4524 }
4525 Some(ret_val)
4526 }
4527 }
4528 #[doc(hidden)]
4529 pub fn ensure_polished(&self) -> &Self {
4530 let (obj_data, funcs) = self.get_widget_obj_funcs();
4531 unsafe {
4532 ((*funcs).ensure_polished)(obj_data);
4533 }
4534 self
4535 }
4536 #[doc(hidden)]
4537 pub fn is_ancestor_of<W: WidgetTrait<'a>>(&self, child: &W) -> bool {
4538 let (obj_child_1, _funcs) = child.get_widget_obj_funcs();
4539
4540 let (obj_data, funcs) = self.get_widget_obj_funcs();
4541 unsafe {
4542 let ret_val = ((*funcs).is_ancestor_of)(obj_data, obj_child_1);
4543 ret_val
4544 }
4545 }
4546 #[doc(hidden)]
4547 pub fn auto_fill_background(&self) -> bool {
4548 let (obj_data, funcs) = self.get_widget_obj_funcs();
4549 unsafe {
4550 let ret_val = ((*funcs).auto_fill_background)(obj_data);
4551 ret_val
4552 }
4553 }
4554 #[doc(hidden)]
4555 pub fn set_auto_fill_background(&self, enabled: bool) -> &Self {
4556 let (obj_data, funcs) = self.get_widget_obj_funcs();
4557 unsafe {
4558 ((*funcs).set_auto_fill_background)(obj_data, enabled);
4559 }
4560 self
4561 }
4562 #[doc(hidden)]
4563 pub fn backing_store(&self) -> Option<BackingStore> {
4564 let (obj_data, funcs) = self.get_widget_obj_funcs();
4565 unsafe {
4566 let ret_val = ((*funcs).backing_store)(obj_data);
4567 if ret_val.qt_data == ::std::ptr::null() {
4568 return None;
4569 }
4570 let t = ret_val;
4571 let ret_val;
4572 if t.host_data != ::std::ptr::null() {
4573 ret_val = BackingStore::new_from_rc(t);
4574 } else {
4575 ret_val = BackingStore::new_from_owned(t);
4576 }
4577 Some(ret_val)
4578 }
4579 }
4580 #[doc(hidden)]
4581 pub fn window_handle(&self) -> Option<Window> {
4582 let (obj_data, funcs) = self.get_widget_obj_funcs();
4583 unsafe {
4584 let ret_val = ((*funcs).window_handle)(obj_data);
4585 if ret_val.qt_data == ::std::ptr::null() {
4586 return None;
4587 }
4588 let t = ret_val;
4589 let ret_val;
4590 if t.host_data != ::std::ptr::null() {
4591 ret_val = Window::new_from_rc(t);
4592 } else {
4593 ret_val = Window::new_from_owned(t);
4594 }
4595 Some(ret_val)
4596 }
4597 }
4598 #[doc(hidden)]
4599 pub fn create_window_container<A: WidgetTrait<'a>, W: WindowTrait<'a>>(
4600 window: &W,
4601 parent: &A,
4602 flags: WindowFlags,
4603 ) -> Option<Widget<'a>> {
4604 let (obj_window_1, _funcs) = window.get_window_obj_funcs();
4605 let (obj_parent_2, _funcs) = parent.get_widget_obj_funcs();
4606 let enum_flags_3 = flags.bits();
4607
4608 let (obj_data, funcs) = unsafe {
4609 (
4610 ::std::ptr::null(),
4611 (*((*rute_ffi_get()).get_widget)(::std::ptr::null()).all_funcs).widget_funcs,
4612 )
4613 };
4614 unsafe {
4615 let ret_val = ((*funcs).create_window_container)(
4616 obj_data,
4617 obj_window_1,
4618 obj_parent_2,
4619 enum_flags_3,
4620 );
4621 if ret_val.qt_data == ::std::ptr::null() {
4622 return None;
4623 }
4624 let t = ret_val;
4625 let ret_val;
4626 if t.host_data != ::std::ptr::null() {
4627 ret_val = Widget::new_from_rc(t);
4628 } else {
4629 ret_val = Widget::new_from_owned(t);
4630 }
4631 Some(ret_val)
4632 }
4633 }
4634 #[doc(hidden)]
4635 pub fn set_window_title_changed_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
4636 where
4637 F: Fn(&T, &str) + 'a,
4638 T: 'a,
4639 {
4640 let (obj_data, funcs) = self.get_widget_obj_funcs();
4641
4642 let f: Box<Box<Fn(&T, &str) + 'a>> = Box::new(Box::new(func));
4643 let user_data = data as *const _ as *const c_void;
4644
4645 unsafe {
4646 ((*funcs).set_window_title_changed_event)(
4647 obj_data,
4648 user_data,
4649 Box::into_raw(f) as *const _,
4650 transmute(widget_window_title_changed_trampoline_ud::<T> as usize),
4651 );
4652 }
4653
4654 self
4655 }
4656
4657 pub fn set_window_title_changed_event<F>(&self, func: F) -> &Self
4658 where
4659 F: Fn(&str) + 'a,
4660 {
4661 let (obj_data, funcs) = self.get_widget_obj_funcs();
4662 let f: Box<Box<Fn(&str) + 'a>> = Box::new(Box::new(func));
4663
4664 unsafe {
4665 ((*funcs).set_window_title_changed_event)(
4666 obj_data,
4667 ::std::ptr::null(),
4668 Box::into_raw(f) as *const _,
4669 transmute(widget_window_title_changed_trampoline as usize),
4670 );
4671 }
4672
4673 self
4674 }
4675 #[doc(hidden)]
4676 pub fn set_window_icon_changed_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
4677 where
4678 F: Fn(&T, &Icon) + 'a,
4679 T: 'a,
4680 {
4681 let (obj_data, funcs) = self.get_widget_obj_funcs();
4682
4683 let f: Box<Box<Fn(&T, &Icon) + 'a>> = Box::new(Box::new(func));
4684 let user_data = data as *const _ as *const c_void;
4685
4686 unsafe {
4687 ((*funcs).set_window_icon_changed_event)(
4688 obj_data,
4689 user_data,
4690 Box::into_raw(f) as *const _,
4691 transmute(widget_window_icon_changed_trampoline_ud::<T> as usize),
4692 );
4693 }
4694
4695 self
4696 }
4697
4698 pub fn set_window_icon_changed_event<F>(&self, func: F) -> &Self
4699 where
4700 F: Fn(&Icon) + 'a,
4701 {
4702 let (obj_data, funcs) = self.get_widget_obj_funcs();
4703 let f: Box<Box<Fn(&Icon) + 'a>> = Box::new(Box::new(func));
4704
4705 unsafe {
4706 ((*funcs).set_window_icon_changed_event)(
4707 obj_data,
4708 ::std::ptr::null(),
4709 Box::into_raw(f) as *const _,
4710 transmute(widget_window_icon_changed_trampoline as usize),
4711 );
4712 }
4713
4714 self
4715 }
4716 #[doc(hidden)]
4717 pub fn set_window_icon_text_changed_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
4718 where
4719 F: Fn(&T, &str) + 'a,
4720 T: 'a,
4721 {
4722 let (obj_data, funcs) = self.get_widget_obj_funcs();
4723
4724 let f: Box<Box<Fn(&T, &str) + 'a>> = Box::new(Box::new(func));
4725 let user_data = data as *const _ as *const c_void;
4726
4727 unsafe {
4728 ((*funcs).set_window_icon_text_changed_event)(
4729 obj_data,
4730 user_data,
4731 Box::into_raw(f) as *const _,
4732 transmute(widget_window_icon_text_changed_trampoline_ud::<T> as usize),
4733 );
4734 }
4735
4736 self
4737 }
4738
4739 pub fn set_window_icon_text_changed_event<F>(&self, func: F) -> &Self
4740 where
4741 F: Fn(&str) + 'a,
4742 {
4743 let (obj_data, funcs) = self.get_widget_obj_funcs();
4744 let f: Box<Box<Fn(&str) + 'a>> = Box::new(Box::new(func));
4745
4746 unsafe {
4747 ((*funcs).set_window_icon_text_changed_event)(
4748 obj_data,
4749 ::std::ptr::null(),
4750 Box::into_raw(f) as *const _,
4751 transmute(widget_window_icon_text_changed_trampoline as usize),
4752 );
4753 }
4754
4755 self
4756 }
4757 #[doc(hidden)]
4758 pub fn set_custom_context_menu_requested_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
4759 where
4760 F: Fn(&T, &Point) + 'a,
4761 T: 'a,
4762 {
4763 let (obj_data, funcs) = self.get_widget_obj_funcs();
4764
4765 let f: Box<Box<Fn(&T, &Point) + 'a>> = Box::new(Box::new(func));
4766 let user_data = data as *const _ as *const c_void;
4767
4768 unsafe {
4769 ((*funcs).set_custom_context_menu_requested_event)(
4770 obj_data,
4771 user_data,
4772 Box::into_raw(f) as *const _,
4773 transmute(widget_custom_context_menu_requested_trampoline_ud::<T> as usize),
4774 );
4775 }
4776
4777 self
4778 }
4779
4780 pub fn set_custom_context_menu_requested_event<F>(&self, func: F) -> &Self
4781 where
4782 F: Fn(&Point) + 'a,
4783 {
4784 let (obj_data, funcs) = self.get_widget_obj_funcs();
4785 let f: Box<Box<Fn(&Point) + 'a>> = Box::new(Box::new(func));
4786
4787 unsafe {
4788 ((*funcs).set_custom_context_menu_requested_event)(
4789 obj_data,
4790 ::std::ptr::null(),
4791 Box::into_raw(f) as *const _,
4792 transmute(widget_custom_context_menu_requested_trampoline as usize),
4793 );
4794 }
4795
4796 self
4797 }
4798 #[doc(hidden)]
4799 pub fn set_wheel_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
4800 where
4801 F: Fn(&T, &WheelEvent) + 'a,
4802 T: 'a,
4803 {
4804 let (obj_data, funcs) = self.get_widget_obj_funcs();
4805
4806 let f: Box<Box<Fn(&T, &WheelEvent) + 'a>> = Box::new(Box::new(func));
4807 let user_data = data as *const _ as *const c_void;
4808
4809 unsafe {
4810 ((*funcs).set_wheel_event)(
4811 obj_data,
4812 user_data,
4813 Box::into_raw(f) as *const _,
4814 transmute(widget_wheel_trampoline_ud::<T> as usize),
4815 );
4816 }
4817
4818 self
4819 }
4820
4821 pub fn set_wheel_event<F>(&self, func: F) -> &Self
4822 where
4823 F: Fn(&WheelEvent) + 'a,
4824 {
4825 let (obj_data, funcs) = self.get_widget_obj_funcs();
4826 let f: Box<Box<Fn(&WheelEvent) + 'a>> = Box::new(Box::new(func));
4827
4828 unsafe {
4829 ((*funcs).set_wheel_event)(
4830 obj_data,
4831 ::std::ptr::null(),
4832 Box::into_raw(f) as *const _,
4833 transmute(widget_wheel_trampoline as usize),
4834 );
4835 }
4836
4837 self
4838 }
4839 #[doc(hidden)]
4840 pub fn set_key_release_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
4841 where
4842 F: Fn(&T, &KeyEvent) + 'a,
4843 T: 'a,
4844 {
4845 let (obj_data, funcs) = self.get_widget_obj_funcs();
4846
4847 let f: Box<Box<Fn(&T, &KeyEvent) + 'a>> = Box::new(Box::new(func));
4848 let user_data = data as *const _ as *const c_void;
4849
4850 unsafe {
4851 ((*funcs).set_key_release_event)(
4852 obj_data,
4853 user_data,
4854 Box::into_raw(f) as *const _,
4855 transmute(widget_key_release_trampoline_ud::<T> as usize),
4856 );
4857 }
4858
4859 self
4860 }
4861
4862 pub fn set_key_release_event<F>(&self, func: F) -> &Self
4863 where
4864 F: Fn(&KeyEvent) + 'a,
4865 {
4866 let (obj_data, funcs) = self.get_widget_obj_funcs();
4867 let f: Box<Box<Fn(&KeyEvent) + 'a>> = Box::new(Box::new(func));
4868
4869 unsafe {
4870 ((*funcs).set_key_release_event)(
4871 obj_data,
4872 ::std::ptr::null(),
4873 Box::into_raw(f) as *const _,
4874 transmute(widget_key_release_trampoline as usize),
4875 );
4876 }
4877
4878 self
4879 }
4880 #[doc(hidden)]
4881 pub fn set_enter_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
4882 where
4883 F: Fn(&T, &Event) + 'a,
4884 T: 'a,
4885 {
4886 let (obj_data, funcs) = self.get_widget_obj_funcs();
4887
4888 let f: Box<Box<Fn(&T, &Event) + 'a>> = Box::new(Box::new(func));
4889 let user_data = data as *const _ as *const c_void;
4890
4891 unsafe {
4892 ((*funcs).set_enter_event)(
4893 obj_data,
4894 user_data,
4895 Box::into_raw(f) as *const _,
4896 transmute(widget_enter_trampoline_ud::<T> as usize),
4897 );
4898 }
4899
4900 self
4901 }
4902
4903 pub fn set_enter_event<F>(&self, func: F) -> &Self
4904 where
4905 F: Fn(&Event) + 'a,
4906 {
4907 let (obj_data, funcs) = self.get_widget_obj_funcs();
4908 let f: Box<Box<Fn(&Event) + 'a>> = Box::new(Box::new(func));
4909
4910 unsafe {
4911 ((*funcs).set_enter_event)(
4912 obj_data,
4913 ::std::ptr::null(),
4914 Box::into_raw(f) as *const _,
4915 transmute(widget_enter_trampoline as usize),
4916 );
4917 }
4918
4919 self
4920 }
4921 #[doc(hidden)]
4922 pub fn set_leave_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
4923 where
4924 F: Fn(&T, &Event) + 'a,
4925 T: 'a,
4926 {
4927 let (obj_data, funcs) = self.get_widget_obj_funcs();
4928
4929 let f: Box<Box<Fn(&T, &Event) + 'a>> = Box::new(Box::new(func));
4930 let user_data = data as *const _ as *const c_void;
4931
4932 unsafe {
4933 ((*funcs).set_leave_event)(
4934 obj_data,
4935 user_data,
4936 Box::into_raw(f) as *const _,
4937 transmute(widget_leave_trampoline_ud::<T> as usize),
4938 );
4939 }
4940
4941 self
4942 }
4943
4944 pub fn set_leave_event<F>(&self, func: F) -> &Self
4945 where
4946 F: Fn(&Event) + 'a,
4947 {
4948 let (obj_data, funcs) = self.get_widget_obj_funcs();
4949 let f: Box<Box<Fn(&Event) + 'a>> = Box::new(Box::new(func));
4950
4951 unsafe {
4952 ((*funcs).set_leave_event)(
4953 obj_data,
4954 ::std::ptr::null(),
4955 Box::into_raw(f) as *const _,
4956 transmute(widget_leave_trampoline as usize),
4957 );
4958 }
4959
4960 self
4961 }
4962 #[doc(hidden)]
4963 pub fn set_move_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
4964 where
4965 F: Fn(&T, &MoveEvent) + 'a,
4966 T: 'a,
4967 {
4968 let (obj_data, funcs) = self.get_widget_obj_funcs();
4969
4970 let f: Box<Box<Fn(&T, &MoveEvent) + 'a>> = Box::new(Box::new(func));
4971 let user_data = data as *const _ as *const c_void;
4972
4973 unsafe {
4974 ((*funcs).set_move_event)(
4975 obj_data,
4976 user_data,
4977 Box::into_raw(f) as *const _,
4978 transmute(widget_move_trampoline_ud::<T> as usize),
4979 );
4980 }
4981
4982 self
4983 }
4984
4985 pub fn set_move_event<F>(&self, func: F) -> &Self
4986 where
4987 F: Fn(&MoveEvent) + 'a,
4988 {
4989 let (obj_data, funcs) = self.get_widget_obj_funcs();
4990 let f: Box<Box<Fn(&MoveEvent) + 'a>> = Box::new(Box::new(func));
4991
4992 unsafe {
4993 ((*funcs).set_move_event)(
4994 obj_data,
4995 ::std::ptr::null(),
4996 Box::into_raw(f) as *const _,
4997 transmute(widget_move_trampoline as usize),
4998 );
4999 }
5000
5001 self
5002 }
5003 #[doc(hidden)]
5004 pub fn set_resize_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
5005 where
5006 F: Fn(&T, &ResizeEvent) + 'a,
5007 T: 'a,
5008 {
5009 let (obj_data, funcs) = self.get_widget_obj_funcs();
5010
5011 let f: Box<Box<Fn(&T, &ResizeEvent) + 'a>> = Box::new(Box::new(func));
5012 let user_data = data as *const _ as *const c_void;
5013
5014 unsafe {
5015 ((*funcs).set_resize_event)(
5016 obj_data,
5017 user_data,
5018 Box::into_raw(f) as *const _,
5019 transmute(widget_resize_trampoline_ud::<T> as usize),
5020 );
5021 }
5022
5023 self
5024 }
5025
5026 pub fn set_resize_event<F>(&self, func: F) -> &Self
5027 where
5028 F: Fn(&ResizeEvent) + 'a,
5029 {
5030 let (obj_data, funcs) = self.get_widget_obj_funcs();
5031 let f: Box<Box<Fn(&ResizeEvent) + 'a>> = Box::new(Box::new(func));
5032
5033 unsafe {
5034 ((*funcs).set_resize_event)(
5035 obj_data,
5036 ::std::ptr::null(),
5037 Box::into_raw(f) as *const _,
5038 transmute(widget_resize_trampoline as usize),
5039 );
5040 }
5041
5042 self
5043 }
5044 #[doc(hidden)]
5045 pub fn set_close_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
5046 where
5047 F: Fn(&T, &CloseEvent) + 'a,
5048 T: 'a,
5049 {
5050 let (obj_data, funcs) = self.get_widget_obj_funcs();
5051
5052 let f: Box<Box<Fn(&T, &CloseEvent) + 'a>> = Box::new(Box::new(func));
5053 let user_data = data as *const _ as *const c_void;
5054
5055 unsafe {
5056 ((*funcs).set_close_event)(
5057 obj_data,
5058 user_data,
5059 Box::into_raw(f) as *const _,
5060 transmute(widget_close_trampoline_ud::<T> as usize),
5061 );
5062 }
5063
5064 self
5065 }
5066
5067 pub fn set_close_event<F>(&self, func: F) -> &Self
5068 where
5069 F: Fn(&CloseEvent) + 'a,
5070 {
5071 let (obj_data, funcs) = self.get_widget_obj_funcs();
5072 let f: Box<Box<Fn(&CloseEvent) + 'a>> = Box::new(Box::new(func));
5073
5074 unsafe {
5075 ((*funcs).set_close_event)(
5076 obj_data,
5077 ::std::ptr::null(),
5078 Box::into_raw(f) as *const _,
5079 transmute(widget_close_trampoline as usize),
5080 );
5081 }
5082
5083 self
5084 }
5085 #[doc(hidden)]
5086 pub fn set_tablet_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
5087 where
5088 F: Fn(&T, &TabletEvent) + 'a,
5089 T: 'a,
5090 {
5091 let (obj_data, funcs) = self.get_widget_obj_funcs();
5092
5093 let f: Box<Box<Fn(&T, &TabletEvent) + 'a>> = Box::new(Box::new(func));
5094 let user_data = data as *const _ as *const c_void;
5095
5096 unsafe {
5097 ((*funcs).set_tablet_event)(
5098 obj_data,
5099 user_data,
5100 Box::into_raw(f) as *const _,
5101 transmute(widget_tablet_trampoline_ud::<T> as usize),
5102 );
5103 }
5104
5105 self
5106 }
5107
5108 pub fn set_tablet_event<F>(&self, func: F) -> &Self
5109 where
5110 F: Fn(&TabletEvent) + 'a,
5111 {
5112 let (obj_data, funcs) = self.get_widget_obj_funcs();
5113 let f: Box<Box<Fn(&TabletEvent) + 'a>> = Box::new(Box::new(func));
5114
5115 unsafe {
5116 ((*funcs).set_tablet_event)(
5117 obj_data,
5118 ::std::ptr::null(),
5119 Box::into_raw(f) as *const _,
5120 transmute(widget_tablet_trampoline as usize),
5121 );
5122 }
5123
5124 self
5125 }
5126 #[doc(hidden)]
5127 pub fn set_show_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
5128 where
5129 F: Fn(&T, &ShowEvent) + 'a,
5130 T: 'a,
5131 {
5132 let (obj_data, funcs) = self.get_widget_obj_funcs();
5133
5134 let f: Box<Box<Fn(&T, &ShowEvent) + 'a>> = Box::new(Box::new(func));
5135 let user_data = data as *const _ as *const c_void;
5136
5137 unsafe {
5138 ((*funcs).set_show_event)(
5139 obj_data,
5140 user_data,
5141 Box::into_raw(f) as *const _,
5142 transmute(widget_show_trampoline_ud::<T> as usize),
5143 );
5144 }
5145
5146 self
5147 }
5148
5149 pub fn set_show_event<F>(&self, func: F) -> &Self
5150 where
5151 F: Fn(&ShowEvent) + 'a,
5152 {
5153 let (obj_data, funcs) = self.get_widget_obj_funcs();
5154 let f: Box<Box<Fn(&ShowEvent) + 'a>> = Box::new(Box::new(func));
5155
5156 unsafe {
5157 ((*funcs).set_show_event)(
5158 obj_data,
5159 ::std::ptr::null(),
5160 Box::into_raw(f) as *const _,
5161 transmute(widget_show_trampoline as usize),
5162 );
5163 }
5164
5165 self
5166 }
5167 #[doc(hidden)]
5168 pub fn set_hide_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
5169 where
5170 F: Fn(&T, &HideEvent) + 'a,
5171 T: 'a,
5172 {
5173 let (obj_data, funcs) = self.get_widget_obj_funcs();
5174
5175 let f: Box<Box<Fn(&T, &HideEvent) + 'a>> = Box::new(Box::new(func));
5176 let user_data = data as *const _ as *const c_void;
5177
5178 unsafe {
5179 ((*funcs).set_hide_event)(
5180 obj_data,
5181 user_data,
5182 Box::into_raw(f) as *const _,
5183 transmute(widget_hide_trampoline_ud::<T> as usize),
5184 );
5185 }
5186
5187 self
5188 }
5189
5190 pub fn set_hide_event<F>(&self, func: F) -> &Self
5191 where
5192 F: Fn(&HideEvent) + 'a,
5193 {
5194 let (obj_data, funcs) = self.get_widget_obj_funcs();
5195 let f: Box<Box<Fn(&HideEvent) + 'a>> = Box::new(Box::new(func));
5196
5197 unsafe {
5198 ((*funcs).set_hide_event)(
5199 obj_data,
5200 ::std::ptr::null(),
5201 Box::into_raw(f) as *const _,
5202 transmute(widget_hide_trampoline as usize),
5203 );
5204 }
5205
5206 self
5207 }
5208 #[doc(hidden)]
5209 pub fn input_method_hints(&self) -> InputMethodHints {
5210 let (obj_data, funcs) = self.get_widget_obj_funcs();
5211 unsafe {
5212 let ret_val = ((*funcs).input_method_hints)(obj_data);
5213 let ret_val = InputMethodHints::from_bits_truncate(ret_val);
5214 ret_val
5215 }
5216 }
5217 #[doc(hidden)]
5218 pub fn set_input_method_hints(&self, hints: InputMethodHints) -> &Self {
5219 let enum_hints_1 = hints.bits();
5220
5221 let (obj_data, funcs) = self.get_widget_obj_funcs();
5222 unsafe {
5223 ((*funcs).set_input_method_hints)(obj_data, enum_hints_1);
5224 }
5225 self
5226 }
5227 #[doc(hidden)]
5228 pub fn painting_active(&self) -> bool {
5229 let (obj_data, funcs) = self.get_paint_device_obj_funcs();
5230 unsafe {
5231 let ret_val = ((*funcs).painting_active)(obj_data);
5232 ret_val
5233 }
5234 }
5235 #[doc(hidden)]
5236 pub fn logical_dpi_x(&self) -> i32 {
5237 let (obj_data, funcs) = self.get_paint_device_obj_funcs();
5238 unsafe {
5239 let ret_val = ((*funcs).logical_dpi_x)(obj_data);
5240 ret_val
5241 }
5242 }
5243 #[doc(hidden)]
5244 pub fn logical_dpi_y(&self) -> i32 {
5245 let (obj_data, funcs) = self.get_paint_device_obj_funcs();
5246 unsafe {
5247 let ret_val = ((*funcs).logical_dpi_y)(obj_data);
5248 ret_val
5249 }
5250 }
5251 #[doc(hidden)]
5252 pub fn physical_dpi_x(&self) -> i32 {
5253 let (obj_data, funcs) = self.get_paint_device_obj_funcs();
5254 unsafe {
5255 let ret_val = ((*funcs).physical_dpi_x)(obj_data);
5256 ret_val
5257 }
5258 }
5259 #[doc(hidden)]
5260 pub fn physical_dpi_y(&self) -> i32 {
5261 let (obj_data, funcs) = self.get_paint_device_obj_funcs();
5262 unsafe {
5263 let ret_val = ((*funcs).physical_dpi_y)(obj_data);
5264 ret_val
5265 }
5266 }
5267 #[doc(hidden)]
5268 pub fn device_pixel_ratio(&self) -> i32 {
5269 let (obj_data, funcs) = self.get_paint_device_obj_funcs();
5270 unsafe {
5271 let ret_val = ((*funcs).device_pixel_ratio)(obj_data);
5272 ret_val
5273 }
5274 }
5275 #[doc(hidden)]
5276 pub fn device_pixel_ratio_f(&self) -> f32 {
5277 let (obj_data, funcs) = self.get_paint_device_obj_funcs();
5278 unsafe {
5279 let ret_val = ((*funcs).device_pixel_ratio_f)(obj_data);
5280 ret_val
5281 }
5282 }
5283 #[doc(hidden)]
5284 pub fn color_count(&self) -> i32 {
5285 let (obj_data, funcs) = self.get_paint_device_obj_funcs();
5286 unsafe {
5287 let ret_val = ((*funcs).color_count)(obj_data);
5288 ret_val
5289 }
5290 }
5291 #[doc(hidden)]
5292 pub fn depth(&self) -> i32 {
5293 let (obj_data, funcs) = self.get_paint_device_obj_funcs();
5294 unsafe {
5295 let ret_val = ((*funcs).depth)(obj_data);
5296 ret_val
5297 }
5298 }
5299 #[doc(hidden)]
5300 pub fn object_name(&self) -> String {
5301 let (obj_data, funcs) = self.get_object_obj_funcs();
5302 unsafe {
5303 let ret_val = ((*funcs).object_name)(obj_data);
5304 let ret_val = CStr::from_ptr(ret_val).to_string_lossy().into_owned();
5305 ret_val
5306 }
5307 }
5308 #[doc(hidden)]
5309 pub fn set_object_name(&self, name: &str) -> &Self {
5310 let str_in_name_1 = CString::new(name).unwrap();
5311
5312 let (obj_data, funcs) = self.get_object_obj_funcs();
5313 unsafe {
5314 ((*funcs).set_object_name)(obj_data, str_in_name_1.as_ptr());
5315 }
5316 self
5317 }
5318 #[doc(hidden)]
5319 pub fn is_widget_type(&self) -> bool {
5320 let (obj_data, funcs) = self.get_object_obj_funcs();
5321 unsafe {
5322 let ret_val = ((*funcs).is_widget_type)(obj_data);
5323 ret_val
5324 }
5325 }
5326 #[doc(hidden)]
5327 pub fn is_window_type(&self) -> bool {
5328 let (obj_data, funcs) = self.get_object_obj_funcs();
5329 unsafe {
5330 let ret_val = ((*funcs).is_window_type)(obj_data);
5331 ret_val
5332 }
5333 }
5334 #[doc(hidden)]
5335 pub fn signals_blocked(&self) -> bool {
5336 let (obj_data, funcs) = self.get_object_obj_funcs();
5337 unsafe {
5338 let ret_val = ((*funcs).signals_blocked)(obj_data);
5339 ret_val
5340 }
5341 }
5342 #[doc(hidden)]
5343 pub fn block_signals(&self, b: bool) -> bool {
5344 let (obj_data, funcs) = self.get_object_obj_funcs();
5345 unsafe {
5346 let ret_val = ((*funcs).block_signals)(obj_data, b);
5347 ret_val
5348 }
5349 }
5350 #[doc(hidden)]
5351 pub fn start_timer(&self, interval: i32, timer_type: TimerType) -> i32 {
5352 let enum_timer_type_2 = timer_type as u32;
5353
5354 let (obj_data, funcs) = self.get_object_obj_funcs();
5355 unsafe {
5356 let ret_val = ((*funcs).start_timer)(obj_data, interval, enum_timer_type_2);
5357 ret_val
5358 }
5359 }
5360 #[doc(hidden)]
5361 pub fn start_timer_2(&self, time: u32, timer_type: TimerType) -> i32 {
5362 let enum_timer_type_2 = timer_type as u32;
5363
5364 let (obj_data, funcs) = self.get_object_obj_funcs();
5365 unsafe {
5366 let ret_val = ((*funcs).start_timer_2)(obj_data, time, enum_timer_type_2);
5367 ret_val
5368 }
5369 }
5370 #[doc(hidden)]
5371 pub fn kill_timer(&self, id: i32) -> &Self {
5372 let (obj_data, funcs) = self.get_object_obj_funcs();
5373 unsafe {
5374 ((*funcs).kill_timer)(obj_data, id);
5375 }
5376 self
5377 }
5378 #[doc(hidden)]
5379 pub fn install_event_filter<O: ObjectTrait<'a>>(&self, filter_obj: &O) -> &Self {
5380 let (obj_filter_obj_1, _funcs) = filter_obj.get_object_obj_funcs();
5381
5382 let (obj_data, funcs) = self.get_object_obj_funcs();
5383 unsafe {
5384 ((*funcs).install_event_filter)(obj_data, obj_filter_obj_1);
5385 }
5386 self
5387 }
5388 #[doc(hidden)]
5389 pub fn dump_object_tree(&self) -> &Self {
5390 let (obj_data, funcs) = self.get_object_obj_funcs();
5391 unsafe {
5392 ((*funcs).dump_object_tree)(obj_data);
5393 }
5394 self
5395 }
5396 #[doc(hidden)]
5397 pub fn dump_object_info(&self) -> &Self {
5398 let (obj_data, funcs) = self.get_object_obj_funcs();
5399 unsafe {
5400 ((*funcs).dump_object_info)(obj_data);
5401 }
5402 self
5403 }
5404 #[doc(hidden)]
5405 pub fn dump_object_tree_2(&self) -> &Self {
5406 let (obj_data, funcs) = self.get_object_obj_funcs();
5407 unsafe {
5408 ((*funcs).dump_object_tree_2)(obj_data);
5409 }
5410 self
5411 }
5412 #[doc(hidden)]
5413 pub fn dump_object_info_2(&self) -> &Self {
5414 let (obj_data, funcs) = self.get_object_obj_funcs();
5415 unsafe {
5416 ((*funcs).dump_object_info_2)(obj_data);
5417 }
5418 self
5419 }
5420 #[doc(hidden)]
5421 pub fn parent(&self) -> Option<Object> {
5422 let (obj_data, funcs) = self.get_object_obj_funcs();
5423 unsafe {
5424 let ret_val = ((*funcs).parent)(obj_data);
5425 if ret_val.qt_data == ::std::ptr::null() {
5426 return None;
5427 }
5428 let t = ret_val;
5429 let ret_val;
5430 if t.host_data != ::std::ptr::null() {
5431 ret_val = Object::new_from_rc(t);
5432 } else {
5433 ret_val = Object::new_from_owned(t);
5434 }
5435 Some(ret_val)
5436 }
5437 }
5438 #[doc(hidden)]
5439 pub fn delete_later(&self) -> &Self {
5440 let (obj_data, funcs) = self.get_object_obj_funcs();
5441 unsafe {
5442 ((*funcs).delete_later)(obj_data);
5443 }
5444 self
5445 }
5446 #[doc(hidden)]
5447 pub fn set_custom_event_ud<F, T>(&self, data: &'a T, func: F) -> &Self
5448 where
5449 F: Fn(&T, &Event) + 'a,
5450 T: 'a,
5451 {
5452 let (obj_data, funcs) = self.get_object_obj_funcs();
5453
5454 let f: Box<Box<Fn(&T, &Event) + 'a>> = Box::new(Box::new(func));
5455 let user_data = data as *const _ as *const c_void;
5456
5457 unsafe {
5458 ((*funcs).set_custom_event)(
5459 obj_data,
5460 user_data,
5461 Box::into_raw(f) as *const _,
5462 transmute(object_custom_trampoline_ud::<T> as usize),
5463 );
5464 }
5465
5466 self
5467 }
5468
5469 pub fn set_custom_event<F>(&self, func: F) -> &Self
5470 where
5471 F: Fn(&Event) + 'a,
5472 {
5473 let (obj_data, funcs) = self.get_object_obj_funcs();
5474 let f: Box<Box<Fn(&Event) + 'a>> = Box::new(Box::new(func));
5475
5476 unsafe {
5477 ((*funcs).set_custom_event)(
5478 obj_data,
5479 ::std::ptr::null(),
5480 Box::into_raw(f) as *const _,
5481 transmute(object_custom_trampoline as usize),
5482 );
5483 }
5484
5485 self
5486 }
5487
5488 pub fn build(&self) -> Self {
5489 self.clone()
5490 }
5491}
5492pub trait LineEditTrait<'a> {
5493 #[inline]
5494 #[doc(hidden)]
5495 fn get_line_edit_obj_funcs(&self) -> (*const RUBase, *const RULineEditFuncs);
5496}
5497
5498impl<'a> ObjectTrait<'a> for LineEdit<'a> {
5499 #[doc(hidden)]
5500 fn get_object_obj_funcs(&self) -> (*const RUBase, *const RUObjectFuncs) {
5501 let obj = self.data.get().unwrap();
5502 unsafe { (obj, (*self.all_funcs).object_funcs) }
5503 }
5504}
5505
5506impl<'a> PaintDeviceTrait<'a> for LineEdit<'a> {
5507 #[doc(hidden)]
5508 fn get_paint_device_obj_funcs(&self) -> (*const RUBase, *const RUPaintDeviceFuncs) {
5509 let obj = self.data.get().unwrap();
5510 unsafe { (obj, (*self.all_funcs).paint_device_funcs) }
5511 }
5512}
5513
5514impl<'a> WidgetTrait<'a> for LineEdit<'a> {
5515 #[doc(hidden)]
5516 fn get_widget_obj_funcs(&self) -> (*const RUBase, *const RUWidgetFuncs) {
5517 let obj = self.data.get().unwrap();
5518 unsafe { (obj, (*self.all_funcs).widget_funcs) }
5519 }
5520}
5521
5522impl<'a> LineEditTrait<'a> for LineEdit<'a> {
5523 #[doc(hidden)]
5524 fn get_line_edit_obj_funcs(&self) -> (*const RUBase, *const RULineEditFuncs) {
5525 let obj = self.data.get().unwrap();
5526 unsafe { (obj, (*self.all_funcs).line_edit_funcs) }
5527 }
5528}
5529#[repr(u32)]
5530pub enum ActionPosition {
5531 LeadingPosition = 0,
5532 TrailingPosition = 1,
5533}
5534
5535#[repr(u32)]
5536pub enum EchoMode {
5537 Normal = 0,
5538 NoEcho = 1,
5539 Password = 2,
5540 PasswordEchoOnEdit = 3,
5541}