1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
// This file was generated by gir (4d68d19) from gir-files (11e0e6d)
// DO NOT EDIT
use TextBuffer;
use ffi;
use gdk;
use gdk_pixbuf;
use glib;
use glib::translate::*;
glib_wrapper! {
pub struct Clipboard(Object<ffi::GtkClipboard>);
match fn {
get_type => || ffi::gtk_clipboard_get_type(),
}
}
impl Clipboard {
pub fn clear(&self) {
unsafe {
ffi::gtk_clipboard_clear(self.to_glib_none().0);
}
}
pub fn get_display(&self) -> Option<gdk::Display> {
unsafe {
from_glib_none(ffi::gtk_clipboard_get_display(self.to_glib_none().0))
}
}
pub fn get_owner(&self) -> Option<glib::Object> {
unsafe {
from_glib_none(ffi::gtk_clipboard_get_owner(self.to_glib_none().0))
}
}
//pub fn request_contents(&self, target: /*Ignored*/&gdk::Atom, callback: /*Unknown conversion*//*Unimplemented*/ClipboardReceivedFunc, user_data: /*Unimplemented*/Fundamental: Pointer) {
// unsafe { TODO: call ffi::gtk_clipboard_request_contents() }
//}
//pub fn request_image(&self, callback: /*Unknown conversion*//*Unimplemented*/ClipboardImageReceivedFunc, user_data: /*Unimplemented*/Fundamental: Pointer) {
// unsafe { TODO: call ffi::gtk_clipboard_request_image() }
//}
//pub fn request_rich_text(&self, buffer: &TextBuffer, callback: /*Unknown conversion*//*Unimplemented*/ClipboardRichTextReceivedFunc, user_data: /*Unimplemented*/Fundamental: Pointer) {
// unsafe { TODO: call ffi::gtk_clipboard_request_rich_text() }
//}
//pub fn request_targets(&self, callback: /*Unknown conversion*//*Unimplemented*/ClipboardTargetsReceivedFunc, user_data: /*Unimplemented*/Fundamental: Pointer) {
// unsafe { TODO: call ffi::gtk_clipboard_request_targets() }
//}
//pub fn request_text(&self, callback: /*Unknown conversion*//*Unimplemented*/ClipboardTextReceivedFunc, user_data: /*Unimplemented*/Fundamental: Pointer) {
// unsafe { TODO: call ffi::gtk_clipboard_request_text() }
//}
//pub fn request_uris(&self, callback: /*Unknown conversion*//*Unimplemented*/ClipboardURIReceivedFunc, user_data: /*Unimplemented*/Fundamental: Pointer) {
// unsafe { TODO: call ffi::gtk_clipboard_request_uris() }
//}
//pub fn set_can_store(&self, targets: /*Ignored*/&[&TargetEntry], n_targets: i32) {
// unsafe { TODO: call ffi::gtk_clipboard_set_can_store() }
//}
pub fn set_image(&self, pixbuf: &gdk_pixbuf::Pixbuf) {
unsafe {
ffi::gtk_clipboard_set_image(self.to_glib_none().0, pixbuf.to_glib_none().0);
}
}
//pub fn set_with_data(&self, targets: /*Ignored*/&[&TargetEntry], n_targets: u32, get_func: /*Unknown conversion*//*Unimplemented*/ClipboardGetFunc, clear_func: /*Unknown conversion*//*Unimplemented*/ClipboardClearFunc, user_data: /*Unimplemented*/Fundamental: Pointer) -> bool {
// unsafe { TODO: call ffi::gtk_clipboard_set_with_data() }
//}
//pub fn set_with_owner<T: IsA<glib::Object>>(&self, targets: /*Ignored*/&[&TargetEntry], n_targets: u32, get_func: /*Unknown conversion*//*Unimplemented*/ClipboardGetFunc, clear_func: /*Unknown conversion*//*Unimplemented*/ClipboardClearFunc, owner: &T) -> bool {
// unsafe { TODO: call ffi::gtk_clipboard_set_with_owner() }
//}
pub fn store(&self) {
unsafe {
ffi::gtk_clipboard_store(self.to_glib_none().0);
}
}
//pub fn wait_for_contents(&self, target: /*Ignored*/&gdk::Atom) -> Option<SelectionData> {
// unsafe { TODO: call ffi::gtk_clipboard_wait_for_contents() }
//}
pub fn wait_for_image(&self) -> Option<gdk_pixbuf::Pixbuf> {
unsafe {
from_glib_full(ffi::gtk_clipboard_wait_for_image(self.to_glib_none().0))
}
}
//pub fn wait_for_rich_text(&self, buffer: &TextBuffer, format: /*Ignored*/&mut gdk::Atom) -> (/*Unimplemented*/Option<CArray TypeId { ns_id: 0, id: 3 }>, /*Unimplemented*/Fundamental: Size) {
// unsafe { TODO: call ffi::gtk_clipboard_wait_for_rich_text() }
//}
//pub fn wait_for_targets(&self, targets: /*Unimplemented*/Vec<gdk::Atom>) -> Option<i32> {
// unsafe { TODO: call ffi::gtk_clipboard_wait_for_targets() }
//}
pub fn wait_for_text(&self) -> Option<String> {
unsafe {
from_glib_full(ffi::gtk_clipboard_wait_for_text(self.to_glib_none().0))
}
}
pub fn wait_for_uris(&self) -> Vec<String> {
unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gtk_clipboard_wait_for_uris(self.to_glib_none().0))
}
}
pub fn wait_is_image_available(&self) -> bool {
unsafe {
from_glib(ffi::gtk_clipboard_wait_is_image_available(self.to_glib_none().0))
}
}
pub fn wait_is_rich_text_available(&self, buffer: &TextBuffer) -> bool {
unsafe {
from_glib(ffi::gtk_clipboard_wait_is_rich_text_available(self.to_glib_none().0, buffer.to_glib_none().0))
}
}
//pub fn wait_is_target_available(&self, target: /*Ignored*/&gdk::Atom) -> bool {
// unsafe { TODO: call ffi::gtk_clipboard_wait_is_target_available() }
//}
pub fn wait_is_text_available(&self) -> bool {
unsafe {
from_glib(ffi::gtk_clipboard_wait_is_text_available(self.to_glib_none().0))
}
}
pub fn wait_is_uris_available(&self) -> bool {
unsafe {
from_glib(ffi::gtk_clipboard_wait_is_uris_available(self.to_glib_none().0))
}
}
//pub fn get(selection: /*Ignored*/&gdk::Atom) -> Option<Clipboard> {
// unsafe { TODO: call ffi::gtk_clipboard_get() }
//}
#[cfg(feature = "v3_16")]
pub fn get_default(display: &gdk::Display) -> Option<Clipboard> {
assert_initialized_main_thread!();
unsafe {
from_glib_none(ffi::gtk_clipboard_get_default(display.to_glib_none().0))
}
}
//pub fn get_for_display(display: &gdk::Display, selection: /*Ignored*/&gdk::Atom) -> Option<Clipboard> {
// unsafe { TODO: call ffi::gtk_clipboard_get_for_display() }
//}
//pub fn connect_owner_change<Unsupported or ignored types>(&self, f: F) -> u64 {
// Ignored event: Gdk.EventOwnerChange
//}
}