|
3 | 3 | // DO NOT EDIT
|
4 | 4 |
|
5 | 5 | use crate::{GLContext, MemoryFormat, Texture};
|
6 |
| -use glib::{ |
7 |
| - prelude::*, |
8 |
| - signal::{connect_raw, SignalHandlerId}, |
9 |
| - translate::*, |
10 |
| -}; |
11 |
| -use std::{boxed::Box as Box_, fmt, mem::transmute}; |
| 6 | +use glib::translate::*; |
| 7 | +use std::fmt; |
12 | 8 |
|
13 | 9 | glib::wrapper! {
|
14 | 10 | #[doc(alias = "GdkGLTextureBuilder")]
|
@@ -104,273 +100,6 @@ impl GLTextureBuilder {
|
104 | 100 | //pub fn set_sync(&self, sync: /*Unimplemented*/Option<Basic: Pointer>) {
|
105 | 101 | // unsafe { TODO: call ffi:gdk_gl_texture_builder_set_sync() }
|
106 | 102 | //}
|
107 |
| - |
108 |
| - #[cfg(feature = "v4_12")] |
109 |
| - #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] |
110 |
| - #[doc(alias = "context")] |
111 |
| - pub fn connect_context_notify<F: Fn(&Self) + Send + Sync + 'static>( |
112 |
| - &self, |
113 |
| - f: F, |
114 |
| - ) -> SignalHandlerId { |
115 |
| - unsafe extern "C" fn notify_context_trampoline< |
116 |
| - F: Fn(&GLTextureBuilder) + Send + Sync + 'static, |
117 |
| - >( |
118 |
| - this: *mut ffi::GdkGLTextureBuilder, |
119 |
| - _param_spec: glib::ffi::gpointer, |
120 |
| - f: glib::ffi::gpointer, |
121 |
| - ) { |
122 |
| - let f: &F = &*(f as *const F); |
123 |
| - f(&from_glib_borrow(this)) |
124 |
| - } |
125 |
| - unsafe { |
126 |
| - let f: Box_<F> = Box_::new(f); |
127 |
| - connect_raw( |
128 |
| - self.as_ptr() as *mut _, |
129 |
| - b"notify::context\0".as_ptr() as *const _, |
130 |
| - Some(transmute::<_, unsafe extern "C" fn()>( |
131 |
| - notify_context_trampoline::<F> as *const (), |
132 |
| - )), |
133 |
| - Box_::into_raw(f), |
134 |
| - ) |
135 |
| - } |
136 |
| - } |
137 |
| - |
138 |
| - #[cfg(feature = "v4_12")] |
139 |
| - #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] |
140 |
| - #[doc(alias = "format")] |
141 |
| - pub fn connect_format_notify<F: Fn(&Self) + Send + Sync + 'static>( |
142 |
| - &self, |
143 |
| - f: F, |
144 |
| - ) -> SignalHandlerId { |
145 |
| - unsafe extern "C" fn notify_format_trampoline< |
146 |
| - F: Fn(&GLTextureBuilder) + Send + Sync + 'static, |
147 |
| - >( |
148 |
| - this: *mut ffi::GdkGLTextureBuilder, |
149 |
| - _param_spec: glib::ffi::gpointer, |
150 |
| - f: glib::ffi::gpointer, |
151 |
| - ) { |
152 |
| - let f: &F = &*(f as *const F); |
153 |
| - f(&from_glib_borrow(this)) |
154 |
| - } |
155 |
| - unsafe { |
156 |
| - let f: Box_<F> = Box_::new(f); |
157 |
| - connect_raw( |
158 |
| - self.as_ptr() as *mut _, |
159 |
| - b"notify::format\0".as_ptr() as *const _, |
160 |
| - Some(transmute::<_, unsafe extern "C" fn()>( |
161 |
| - notify_format_trampoline::<F> as *const (), |
162 |
| - )), |
163 |
| - Box_::into_raw(f), |
164 |
| - ) |
165 |
| - } |
166 |
| - } |
167 |
| - |
168 |
| - #[cfg(feature = "v4_12")] |
169 |
| - #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] |
170 |
| - #[doc(alias = "has-mipmap")] |
171 |
| - pub fn connect_has_mipmap_notify<F: Fn(&Self) + Send + Sync + 'static>( |
172 |
| - &self, |
173 |
| - f: F, |
174 |
| - ) -> SignalHandlerId { |
175 |
| - unsafe extern "C" fn notify_has_mipmap_trampoline< |
176 |
| - F: Fn(&GLTextureBuilder) + Send + Sync + 'static, |
177 |
| - >( |
178 |
| - this: *mut ffi::GdkGLTextureBuilder, |
179 |
| - _param_spec: glib::ffi::gpointer, |
180 |
| - f: glib::ffi::gpointer, |
181 |
| - ) { |
182 |
| - let f: &F = &*(f as *const F); |
183 |
| - f(&from_glib_borrow(this)) |
184 |
| - } |
185 |
| - unsafe { |
186 |
| - let f: Box_<F> = Box_::new(f); |
187 |
| - connect_raw( |
188 |
| - self.as_ptr() as *mut _, |
189 |
| - b"notify::has-mipmap\0".as_ptr() as *const _, |
190 |
| - Some(transmute::<_, unsafe extern "C" fn()>( |
191 |
| - notify_has_mipmap_trampoline::<F> as *const (), |
192 |
| - )), |
193 |
| - Box_::into_raw(f), |
194 |
| - ) |
195 |
| - } |
196 |
| - } |
197 |
| - |
198 |
| - #[cfg(feature = "v4_12")] |
199 |
| - #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] |
200 |
| - #[doc(alias = "height")] |
201 |
| - pub fn connect_height_notify<F: Fn(&Self) + Send + Sync + 'static>( |
202 |
| - &self, |
203 |
| - f: F, |
204 |
| - ) -> SignalHandlerId { |
205 |
| - unsafe extern "C" fn notify_height_trampoline< |
206 |
| - F: Fn(&GLTextureBuilder) + Send + Sync + 'static, |
207 |
| - >( |
208 |
| - this: *mut ffi::GdkGLTextureBuilder, |
209 |
| - _param_spec: glib::ffi::gpointer, |
210 |
| - f: glib::ffi::gpointer, |
211 |
| - ) { |
212 |
| - let f: &F = &*(f as *const F); |
213 |
| - f(&from_glib_borrow(this)) |
214 |
| - } |
215 |
| - unsafe { |
216 |
| - let f: Box_<F> = Box_::new(f); |
217 |
| - connect_raw( |
218 |
| - self.as_ptr() as *mut _, |
219 |
| - b"notify::height\0".as_ptr() as *const _, |
220 |
| - Some(transmute::<_, unsafe extern "C" fn()>( |
221 |
| - notify_height_trampoline::<F> as *const (), |
222 |
| - )), |
223 |
| - Box_::into_raw(f), |
224 |
| - ) |
225 |
| - } |
226 |
| - } |
227 |
| - |
228 |
| - #[cfg(feature = "v4_12")] |
229 |
| - #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] |
230 |
| - #[doc(alias = "id")] |
231 |
| - pub fn connect_id_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { |
232 |
| - unsafe extern "C" fn notify_id_trampoline< |
233 |
| - F: Fn(&GLTextureBuilder) + Send + Sync + 'static, |
234 |
| - >( |
235 |
| - this: *mut ffi::GdkGLTextureBuilder, |
236 |
| - _param_spec: glib::ffi::gpointer, |
237 |
| - f: glib::ffi::gpointer, |
238 |
| - ) { |
239 |
| - let f: &F = &*(f as *const F); |
240 |
| - f(&from_glib_borrow(this)) |
241 |
| - } |
242 |
| - unsafe { |
243 |
| - let f: Box_<F> = Box_::new(f); |
244 |
| - connect_raw( |
245 |
| - self.as_ptr() as *mut _, |
246 |
| - b"notify::id\0".as_ptr() as *const _, |
247 |
| - Some(transmute::<_, unsafe extern "C" fn()>( |
248 |
| - notify_id_trampoline::<F> as *const (), |
249 |
| - )), |
250 |
| - Box_::into_raw(f), |
251 |
| - ) |
252 |
| - } |
253 |
| - } |
254 |
| - |
255 |
| - #[cfg(feature = "v4_12")] |
256 |
| - #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] |
257 |
| - #[doc(alias = "sync")] |
258 |
| - pub fn connect_sync_notify<F: Fn(&Self) + Send + Sync + 'static>( |
259 |
| - &self, |
260 |
| - f: F, |
261 |
| - ) -> SignalHandlerId { |
262 |
| - unsafe extern "C" fn notify_sync_trampoline< |
263 |
| - F: Fn(&GLTextureBuilder) + Send + Sync + 'static, |
264 |
| - >( |
265 |
| - this: *mut ffi::GdkGLTextureBuilder, |
266 |
| - _param_spec: glib::ffi::gpointer, |
267 |
| - f: glib::ffi::gpointer, |
268 |
| - ) { |
269 |
| - let f: &F = &*(f as *const F); |
270 |
| - f(&from_glib_borrow(this)) |
271 |
| - } |
272 |
| - unsafe { |
273 |
| - let f: Box_<F> = Box_::new(f); |
274 |
| - connect_raw( |
275 |
| - self.as_ptr() as *mut _, |
276 |
| - b"notify::sync\0".as_ptr() as *const _, |
277 |
| - Some(transmute::<_, unsafe extern "C" fn()>( |
278 |
| - notify_sync_trampoline::<F> as *const (), |
279 |
| - )), |
280 |
| - Box_::into_raw(f), |
281 |
| - ) |
282 |
| - } |
283 |
| - } |
284 |
| - |
285 |
| - #[cfg(feature = "v4_12")] |
286 |
| - #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] |
287 |
| - #[doc(alias = "update-region")] |
288 |
| - pub fn connect_update_region_notify<F: Fn(&Self) + Send + Sync + 'static>( |
289 |
| - &self, |
290 |
| - f: F, |
291 |
| - ) -> SignalHandlerId { |
292 |
| - unsafe extern "C" fn notify_update_region_trampoline< |
293 |
| - F: Fn(&GLTextureBuilder) + Send + Sync + 'static, |
294 |
| - >( |
295 |
| - this: *mut ffi::GdkGLTextureBuilder, |
296 |
| - _param_spec: glib::ffi::gpointer, |
297 |
| - f: glib::ffi::gpointer, |
298 |
| - ) { |
299 |
| - let f: &F = &*(f as *const F); |
300 |
| - f(&from_glib_borrow(this)) |
301 |
| - } |
302 |
| - unsafe { |
303 |
| - let f: Box_<F> = Box_::new(f); |
304 |
| - connect_raw( |
305 |
| - self.as_ptr() as *mut _, |
306 |
| - b"notify::update-region\0".as_ptr() as *const _, |
307 |
| - Some(transmute::<_, unsafe extern "C" fn()>( |
308 |
| - notify_update_region_trampoline::<F> as *const (), |
309 |
| - )), |
310 |
| - Box_::into_raw(f), |
311 |
| - ) |
312 |
| - } |
313 |
| - } |
314 |
| - |
315 |
| - #[cfg(feature = "v4_12")] |
316 |
| - #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] |
317 |
| - #[doc(alias = "update-texture")] |
318 |
| - pub fn connect_update_texture_notify<F: Fn(&Self) + Send + Sync + 'static>( |
319 |
| - &self, |
320 |
| - f: F, |
321 |
| - ) -> SignalHandlerId { |
322 |
| - unsafe extern "C" fn notify_update_texture_trampoline< |
323 |
| - F: Fn(&GLTextureBuilder) + Send + Sync + 'static, |
324 |
| - >( |
325 |
| - this: *mut ffi::GdkGLTextureBuilder, |
326 |
| - _param_spec: glib::ffi::gpointer, |
327 |
| - f: glib::ffi::gpointer, |
328 |
| - ) { |
329 |
| - let f: &F = &*(f as *const F); |
330 |
| - f(&from_glib_borrow(this)) |
331 |
| - } |
332 |
| - unsafe { |
333 |
| - let f: Box_<F> = Box_::new(f); |
334 |
| - connect_raw( |
335 |
| - self.as_ptr() as *mut _, |
336 |
| - b"notify::update-texture\0".as_ptr() as *const _, |
337 |
| - Some(transmute::<_, unsafe extern "C" fn()>( |
338 |
| - notify_update_texture_trampoline::<F> as *const (), |
339 |
| - )), |
340 |
| - Box_::into_raw(f), |
341 |
| - ) |
342 |
| - } |
343 |
| - } |
344 |
| - |
345 |
| - #[cfg(feature = "v4_12")] |
346 |
| - #[cfg_attr(docsrs, doc(cfg(feature = "v4_12")))] |
347 |
| - #[doc(alias = "width")] |
348 |
| - pub fn connect_width_notify<F: Fn(&Self) + Send + Sync + 'static>( |
349 |
| - &self, |
350 |
| - f: F, |
351 |
| - ) -> SignalHandlerId { |
352 |
| - unsafe extern "C" fn notify_width_trampoline< |
353 |
| - F: Fn(&GLTextureBuilder) + Send + Sync + 'static, |
354 |
| - >( |
355 |
| - this: *mut ffi::GdkGLTextureBuilder, |
356 |
| - _param_spec: glib::ffi::gpointer, |
357 |
| - f: glib::ffi::gpointer, |
358 |
| - ) { |
359 |
| - let f: &F = &*(f as *const F); |
360 |
| - f(&from_glib_borrow(this)) |
361 |
| - } |
362 |
| - unsafe { |
363 |
| - let f: Box_<F> = Box_::new(f); |
364 |
| - connect_raw( |
365 |
| - self.as_ptr() as *mut _, |
366 |
| - b"notify::width\0".as_ptr() as *const _, |
367 |
| - Some(transmute::<_, unsafe extern "C" fn()>( |
368 |
| - notify_width_trampoline::<F> as *const (), |
369 |
| - )), |
370 |
| - Box_::into_raw(f), |
371 |
| - ) |
372 |
| - } |
373 |
| - } |
374 | 103 | }
|
375 | 104 |
|
376 | 105 | #[cfg(feature = "v4_12")]
|
|
0 commit comments