1#![allow(deprecated)]
6
7use crate::{ffi, Window};
8use glib::{
9 object::ObjectType as _,
10 prelude::*,
11 signal::{connect_raw, SignalHandlerId},
12 translate::*,
13};
14use std::boxed::Box as Box_;
15
16glib::wrapper! {
17 #[doc(alias = "AdwAboutWindow")]
18 pub struct AboutWindow(Object<ffi::AdwAboutWindow, ffi::AdwAboutWindowClass>) @extends Window, gtk::Window, gtk::Widget, @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget, gtk::Native, gtk::Root, gtk::ShortcutManager;
19
20 match fn {
21 type_ => || ffi::adw_about_window_get_type(),
22 }
23}
24
25impl AboutWindow {
26 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
27 #[allow(deprecated)]
28 #[doc(alias = "adw_about_window_new")]
29 pub fn new() -> AboutWindow {
30 assert_initialized_main_thread!();
31 unsafe { gtk::Widget::from_glib_none(ffi::adw_about_window_new()).unsafe_cast() }
32 }
33
34 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
35 #[cfg(not(target_env = "msvc"))]
36 #[cfg_attr(docsrs, doc(cfg(not(target_env = "msvc"))))]
37 #[cfg(feature = "v1_4")]
38 #[cfg_attr(docsrs, doc(cfg(feature = "v1_4")))]
39 #[allow(deprecated)]
40 #[doc(alias = "adw_about_window_new_from_appdata")]
41 #[doc(alias = "new_from_appdata")]
42 pub fn from_appdata(resource_path: &str, release_notes_version: Option<&str>) -> AboutWindow {
43 assert_initialized_main_thread!();
44 unsafe {
45 gtk::Widget::from_glib_none(ffi::adw_about_window_new_from_appdata(
46 resource_path.to_glib_none().0,
47 release_notes_version.to_glib_none().0,
48 ))
49 .unsafe_cast()
50 }
51 }
52
53 pub fn builder() -> AboutWindowBuilder {
58 AboutWindowBuilder::new()
59 }
60
61 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
62 #[allow(deprecated)]
63 #[doc(alias = "adw_about_window_add_acknowledgement_section")]
64 pub fn add_acknowledgement_section(&self, name: Option<&str>, people: &[&str]) {
65 unsafe {
66 ffi::adw_about_window_add_acknowledgement_section(
67 self.to_glib_none().0,
68 name.to_glib_none().0,
69 people.to_glib_none().0,
70 );
71 }
72 }
73
74 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
75 #[allow(deprecated)]
76 #[doc(alias = "adw_about_window_add_credit_section")]
77 pub fn add_credit_section(&self, name: Option<&str>, people: &[&str]) {
78 unsafe {
79 ffi::adw_about_window_add_credit_section(
80 self.to_glib_none().0,
81 name.to_glib_none().0,
82 people.to_glib_none().0,
83 );
84 }
85 }
86
87 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
88 #[allow(deprecated)]
89 #[doc(alias = "adw_about_window_add_legal_section")]
90 pub fn add_legal_section(
91 &self,
92 title: &str,
93 copyright: Option<&str>,
94 license_type: gtk::License,
95 license: Option<&str>,
96 ) {
97 unsafe {
98 ffi::adw_about_window_add_legal_section(
99 self.to_glib_none().0,
100 title.to_glib_none().0,
101 copyright.to_glib_none().0,
102 license_type.into_glib(),
103 license.to_glib_none().0,
104 );
105 }
106 }
107
108 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
109 #[allow(deprecated)]
110 #[doc(alias = "adw_about_window_add_link")]
111 pub fn add_link(&self, title: &str, url: &str) {
112 unsafe {
113 ffi::adw_about_window_add_link(
114 self.to_glib_none().0,
115 title.to_glib_none().0,
116 url.to_glib_none().0,
117 );
118 }
119 }
120
121 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
122 #[allow(deprecated)]
123 #[doc(alias = "adw_about_window_get_application_icon")]
124 #[doc(alias = "get_application_icon")]
125 #[doc(alias = "application-icon")]
126 pub fn application_icon(&self) -> glib::GString {
127 unsafe {
128 from_glib_none(ffi::adw_about_window_get_application_icon(
129 self.to_glib_none().0,
130 ))
131 }
132 }
133
134 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
135 #[allow(deprecated)]
136 #[doc(alias = "adw_about_window_get_application_name")]
137 #[doc(alias = "get_application_name")]
138 #[doc(alias = "application-name")]
139 pub fn application_name(&self) -> glib::GString {
140 unsafe {
141 from_glib_none(ffi::adw_about_window_get_application_name(
142 self.to_glib_none().0,
143 ))
144 }
145 }
146
147 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
148 #[allow(deprecated)]
149 #[doc(alias = "adw_about_window_get_artists")]
150 #[doc(alias = "get_artists")]
151 pub fn artists(&self) -> Vec<glib::GString> {
152 unsafe {
153 FromGlibPtrContainer::from_glib_none(ffi::adw_about_window_get_artists(
154 self.to_glib_none().0,
155 ))
156 }
157 }
158
159 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
160 #[allow(deprecated)]
161 #[doc(alias = "adw_about_window_get_comments")]
162 #[doc(alias = "get_comments")]
163 pub fn comments(&self) -> glib::GString {
164 unsafe { from_glib_none(ffi::adw_about_window_get_comments(self.to_glib_none().0)) }
165 }
166
167 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
168 #[allow(deprecated)]
169 #[doc(alias = "adw_about_window_get_copyright")]
170 #[doc(alias = "get_copyright")]
171 pub fn copyright(&self) -> glib::GString {
172 unsafe { from_glib_none(ffi::adw_about_window_get_copyright(self.to_glib_none().0)) }
173 }
174
175 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
176 #[allow(deprecated)]
177 #[doc(alias = "adw_about_window_get_debug_info")]
178 #[doc(alias = "get_debug_info")]
179 #[doc(alias = "debug-info")]
180 pub fn debug_info(&self) -> glib::GString {
181 unsafe { from_glib_none(ffi::adw_about_window_get_debug_info(self.to_glib_none().0)) }
182 }
183
184 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
185 #[allow(deprecated)]
186 #[doc(alias = "adw_about_window_get_debug_info_filename")]
187 #[doc(alias = "get_debug_info_filename")]
188 #[doc(alias = "debug-info-filename")]
189 pub fn debug_info_filename(&self) -> glib::GString {
190 unsafe {
191 from_glib_none(ffi::adw_about_window_get_debug_info_filename(
192 self.to_glib_none().0,
193 ))
194 }
195 }
196
197 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
198 #[allow(deprecated)]
199 #[doc(alias = "adw_about_window_get_designers")]
200 #[doc(alias = "get_designers")]
201 pub fn designers(&self) -> Vec<glib::GString> {
202 unsafe {
203 FromGlibPtrContainer::from_glib_none(ffi::adw_about_window_get_designers(
204 self.to_glib_none().0,
205 ))
206 }
207 }
208
209 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
210 #[allow(deprecated)]
211 #[doc(alias = "adw_about_window_get_developer_name")]
212 #[doc(alias = "get_developer_name")]
213 #[doc(alias = "developer-name")]
214 pub fn developer_name(&self) -> glib::GString {
215 unsafe {
216 from_glib_none(ffi::adw_about_window_get_developer_name(
217 self.to_glib_none().0,
218 ))
219 }
220 }
221
222 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
223 #[allow(deprecated)]
224 #[doc(alias = "adw_about_window_get_developers")]
225 #[doc(alias = "get_developers")]
226 pub fn developers(&self) -> Vec<glib::GString> {
227 unsafe {
228 FromGlibPtrContainer::from_glib_none(ffi::adw_about_window_get_developers(
229 self.to_glib_none().0,
230 ))
231 }
232 }
233
234 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
235 #[allow(deprecated)]
236 #[doc(alias = "adw_about_window_get_documenters")]
237 #[doc(alias = "get_documenters")]
238 pub fn documenters(&self) -> Vec<glib::GString> {
239 unsafe {
240 FromGlibPtrContainer::from_glib_none(ffi::adw_about_window_get_documenters(
241 self.to_glib_none().0,
242 ))
243 }
244 }
245
246 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
247 #[allow(deprecated)]
248 #[doc(alias = "adw_about_window_get_issue_url")]
249 #[doc(alias = "get_issue_url")]
250 #[doc(alias = "issue-url")]
251 pub fn issue_url(&self) -> glib::GString {
252 unsafe { from_glib_none(ffi::adw_about_window_get_issue_url(self.to_glib_none().0)) }
253 }
254
255 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
256 #[allow(deprecated)]
257 #[doc(alias = "adw_about_window_get_license")]
258 #[doc(alias = "get_license")]
259 pub fn license(&self) -> glib::GString {
260 unsafe { from_glib_none(ffi::adw_about_window_get_license(self.to_glib_none().0)) }
261 }
262
263 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
264 #[allow(deprecated)]
265 #[doc(alias = "adw_about_window_get_license_type")]
266 #[doc(alias = "get_license_type")]
267 #[doc(alias = "license-type")]
268 pub fn license_type(&self) -> gtk::License {
269 unsafe {
270 from_glib(ffi::adw_about_window_get_license_type(
271 self.to_glib_none().0,
272 ))
273 }
274 }
275
276 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
277 #[allow(deprecated)]
278 #[doc(alias = "adw_about_window_get_release_notes")]
279 #[doc(alias = "get_release_notes")]
280 #[doc(alias = "release-notes")]
281 pub fn release_notes(&self) -> glib::GString {
282 unsafe {
283 from_glib_none(ffi::adw_about_window_get_release_notes(
284 self.to_glib_none().0,
285 ))
286 }
287 }
288
289 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
290 #[allow(deprecated)]
291 #[doc(alias = "adw_about_window_get_release_notes_version")]
292 #[doc(alias = "get_release_notes_version")]
293 #[doc(alias = "release-notes-version")]
294 pub fn release_notes_version(&self) -> glib::GString {
295 unsafe {
296 from_glib_none(ffi::adw_about_window_get_release_notes_version(
297 self.to_glib_none().0,
298 ))
299 }
300 }
301
302 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
303 #[allow(deprecated)]
304 #[doc(alias = "adw_about_window_get_support_url")]
305 #[doc(alias = "get_support_url")]
306 #[doc(alias = "support-url")]
307 pub fn support_url(&self) -> glib::GString {
308 unsafe { from_glib_none(ffi::adw_about_window_get_support_url(self.to_glib_none().0)) }
309 }
310
311 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
312 #[allow(deprecated)]
313 #[doc(alias = "adw_about_window_get_translator_credits")]
314 #[doc(alias = "get_translator_credits")]
315 #[doc(alias = "translator-credits")]
316 pub fn translator_credits(&self) -> glib::GString {
317 unsafe {
318 from_glib_none(ffi::adw_about_window_get_translator_credits(
319 self.to_glib_none().0,
320 ))
321 }
322 }
323
324 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
325 #[allow(deprecated)]
326 #[doc(alias = "adw_about_window_get_version")]
327 #[doc(alias = "get_version")]
328 pub fn version(&self) -> glib::GString {
329 unsafe { from_glib_none(ffi::adw_about_window_get_version(self.to_glib_none().0)) }
330 }
331
332 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
333 #[allow(deprecated)]
334 #[doc(alias = "adw_about_window_get_website")]
335 #[doc(alias = "get_website")]
336 pub fn website(&self) -> glib::GString {
337 unsafe { from_glib_none(ffi::adw_about_window_get_website(self.to_glib_none().0)) }
338 }
339
340 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
341 #[allow(deprecated)]
342 #[doc(alias = "adw_about_window_set_application_icon")]
343 #[doc(alias = "application-icon")]
344 pub fn set_application_icon(&self, application_icon: &str) {
345 unsafe {
346 ffi::adw_about_window_set_application_icon(
347 self.to_glib_none().0,
348 application_icon.to_glib_none().0,
349 );
350 }
351 }
352
353 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
354 #[allow(deprecated)]
355 #[doc(alias = "adw_about_window_set_application_name")]
356 #[doc(alias = "application-name")]
357 pub fn set_application_name(&self, application_name: &str) {
358 unsafe {
359 ffi::adw_about_window_set_application_name(
360 self.to_glib_none().0,
361 application_name.to_glib_none().0,
362 );
363 }
364 }
365
366 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
367 #[allow(deprecated)]
368 #[doc(alias = "adw_about_window_set_artists")]
369 #[doc(alias = "artists")]
370 pub fn set_artists(&self, artists: &[&str]) {
371 unsafe {
372 ffi::adw_about_window_set_artists(self.to_glib_none().0, artists.to_glib_none().0);
373 }
374 }
375
376 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
377 #[allow(deprecated)]
378 #[doc(alias = "adw_about_window_set_comments")]
379 #[doc(alias = "comments")]
380 pub fn set_comments(&self, comments: &str) {
381 unsafe {
382 ffi::adw_about_window_set_comments(self.to_glib_none().0, comments.to_glib_none().0);
383 }
384 }
385
386 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
387 #[allow(deprecated)]
388 #[doc(alias = "adw_about_window_set_copyright")]
389 #[doc(alias = "copyright")]
390 pub fn set_copyright(&self, copyright: &str) {
391 unsafe {
392 ffi::adw_about_window_set_copyright(self.to_glib_none().0, copyright.to_glib_none().0);
393 }
394 }
395
396 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
397 #[allow(deprecated)]
398 #[doc(alias = "adw_about_window_set_debug_info")]
399 #[doc(alias = "debug-info")]
400 pub fn set_debug_info(&self, debug_info: &str) {
401 unsafe {
402 ffi::adw_about_window_set_debug_info(
403 self.to_glib_none().0,
404 debug_info.to_glib_none().0,
405 );
406 }
407 }
408
409 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
410 #[allow(deprecated)]
411 #[doc(alias = "adw_about_window_set_debug_info_filename")]
412 #[doc(alias = "debug-info-filename")]
413 pub fn set_debug_info_filename(&self, filename: &str) {
414 unsafe {
415 ffi::adw_about_window_set_debug_info_filename(
416 self.to_glib_none().0,
417 filename.to_glib_none().0,
418 );
419 }
420 }
421
422 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
423 #[allow(deprecated)]
424 #[doc(alias = "adw_about_window_set_designers")]
425 #[doc(alias = "designers")]
426 pub fn set_designers(&self, designers: &[&str]) {
427 unsafe {
428 ffi::adw_about_window_set_designers(self.to_glib_none().0, designers.to_glib_none().0);
429 }
430 }
431
432 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
433 #[allow(deprecated)]
434 #[doc(alias = "adw_about_window_set_developer_name")]
435 #[doc(alias = "developer-name")]
436 pub fn set_developer_name(&self, developer_name: &str) {
437 unsafe {
438 ffi::adw_about_window_set_developer_name(
439 self.to_glib_none().0,
440 developer_name.to_glib_none().0,
441 );
442 }
443 }
444
445 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
446 #[allow(deprecated)]
447 #[doc(alias = "adw_about_window_set_developers")]
448 #[doc(alias = "developers")]
449 pub fn set_developers(&self, developers: &[&str]) {
450 unsafe {
451 ffi::adw_about_window_set_developers(
452 self.to_glib_none().0,
453 developers.to_glib_none().0,
454 );
455 }
456 }
457
458 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
459 #[allow(deprecated)]
460 #[doc(alias = "adw_about_window_set_documenters")]
461 #[doc(alias = "documenters")]
462 pub fn set_documenters(&self, documenters: &[&str]) {
463 unsafe {
464 ffi::adw_about_window_set_documenters(
465 self.to_glib_none().0,
466 documenters.to_glib_none().0,
467 );
468 }
469 }
470
471 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
472 #[allow(deprecated)]
473 #[doc(alias = "adw_about_window_set_issue_url")]
474 #[doc(alias = "issue-url")]
475 pub fn set_issue_url(&self, issue_url: &str) {
476 unsafe {
477 ffi::adw_about_window_set_issue_url(self.to_glib_none().0, issue_url.to_glib_none().0);
478 }
479 }
480
481 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
482 #[allow(deprecated)]
483 #[doc(alias = "adw_about_window_set_license")]
484 #[doc(alias = "license")]
485 pub fn set_license(&self, license: &str) {
486 unsafe {
487 ffi::adw_about_window_set_license(self.to_glib_none().0, license.to_glib_none().0);
488 }
489 }
490
491 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
492 #[allow(deprecated)]
493 #[doc(alias = "adw_about_window_set_license_type")]
494 #[doc(alias = "license-type")]
495 pub fn set_license_type(&self, license_type: gtk::License) {
496 unsafe {
497 ffi::adw_about_window_set_license_type(self.to_glib_none().0, license_type.into_glib());
498 }
499 }
500
501 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
502 #[allow(deprecated)]
503 #[doc(alias = "adw_about_window_set_release_notes")]
504 #[doc(alias = "release-notes")]
505 pub fn set_release_notes(&self, release_notes: &str) {
506 unsafe {
507 ffi::adw_about_window_set_release_notes(
508 self.to_glib_none().0,
509 release_notes.to_glib_none().0,
510 );
511 }
512 }
513
514 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
515 #[allow(deprecated)]
516 #[doc(alias = "adw_about_window_set_release_notes_version")]
517 #[doc(alias = "release-notes-version")]
518 pub fn set_release_notes_version(&self, version: &str) {
519 unsafe {
520 ffi::adw_about_window_set_release_notes_version(
521 self.to_glib_none().0,
522 version.to_glib_none().0,
523 );
524 }
525 }
526
527 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
528 #[allow(deprecated)]
529 #[doc(alias = "adw_about_window_set_support_url")]
530 #[doc(alias = "support-url")]
531 pub fn set_support_url(&self, support_url: &str) {
532 unsafe {
533 ffi::adw_about_window_set_support_url(
534 self.to_glib_none().0,
535 support_url.to_glib_none().0,
536 );
537 }
538 }
539
540 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
541 #[allow(deprecated)]
542 #[doc(alias = "adw_about_window_set_translator_credits")]
543 #[doc(alias = "translator-credits")]
544 pub fn set_translator_credits(&self, translator_credits: &str) {
545 unsafe {
546 ffi::adw_about_window_set_translator_credits(
547 self.to_glib_none().0,
548 translator_credits.to_glib_none().0,
549 );
550 }
551 }
552
553 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
554 #[allow(deprecated)]
555 #[doc(alias = "adw_about_window_set_version")]
556 #[doc(alias = "version")]
557 pub fn set_version(&self, version: &str) {
558 unsafe {
559 ffi::adw_about_window_set_version(self.to_glib_none().0, version.to_glib_none().0);
560 }
561 }
562
563 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
564 #[allow(deprecated)]
565 #[doc(alias = "adw_about_window_set_website")]
566 #[doc(alias = "website")]
567 pub fn set_website(&self, website: &str) {
568 unsafe {
569 ffi::adw_about_window_set_website(self.to_glib_none().0, website.to_glib_none().0);
570 }
571 }
572
573 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
574 #[cfg(feature = "v1_2")]
575 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
576 #[doc(alias = "activate-link")]
577 pub fn connect_activate_link<F: Fn(&Self, &str) -> bool + 'static>(
578 &self,
579 f: F,
580 ) -> SignalHandlerId {
581 unsafe extern "C" fn activate_link_trampoline<
582 F: Fn(&AboutWindow, &str) -> bool + 'static,
583 >(
584 this: *mut ffi::AdwAboutWindow,
585 uri: *mut std::ffi::c_char,
586 f: glib::ffi::gpointer,
587 ) -> glib::ffi::gboolean {
588 let f: &F = &*(f as *const F);
589 f(
590 &from_glib_borrow(this),
591 &glib::GString::from_glib_borrow(uri),
592 )
593 .into_glib()
594 }
595 unsafe {
596 let f: Box_<F> = Box_::new(f);
597 connect_raw(
598 self.as_ptr() as *mut _,
599 c"activate-link".as_ptr() as *const _,
600 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
601 activate_link_trampoline::<F> as *const (),
602 )),
603 Box_::into_raw(f),
604 )
605 }
606 }
607
608 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
609 #[cfg(feature = "v1_2")]
610 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
611 #[doc(alias = "application-icon")]
612 pub fn connect_application_icon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
613 unsafe extern "C" fn notify_application_icon_trampoline<F: Fn(&AboutWindow) + 'static>(
614 this: *mut ffi::AdwAboutWindow,
615 _param_spec: glib::ffi::gpointer,
616 f: glib::ffi::gpointer,
617 ) {
618 let f: &F = &*(f as *const F);
619 f(&from_glib_borrow(this))
620 }
621 unsafe {
622 let f: Box_<F> = Box_::new(f);
623 connect_raw(
624 self.as_ptr() as *mut _,
625 c"notify::application-icon".as_ptr() as *const _,
626 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
627 notify_application_icon_trampoline::<F> as *const (),
628 )),
629 Box_::into_raw(f),
630 )
631 }
632 }
633
634 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
635 #[cfg(feature = "v1_2")]
636 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
637 #[doc(alias = "application-name")]
638 pub fn connect_application_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
639 unsafe extern "C" fn notify_application_name_trampoline<F: Fn(&AboutWindow) + 'static>(
640 this: *mut ffi::AdwAboutWindow,
641 _param_spec: glib::ffi::gpointer,
642 f: glib::ffi::gpointer,
643 ) {
644 let f: &F = &*(f as *const F);
645 f(&from_glib_borrow(this))
646 }
647 unsafe {
648 let f: Box_<F> = Box_::new(f);
649 connect_raw(
650 self.as_ptr() as *mut _,
651 c"notify::application-name".as_ptr() as *const _,
652 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
653 notify_application_name_trampoline::<F> as *const (),
654 )),
655 Box_::into_raw(f),
656 )
657 }
658 }
659
660 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
661 #[cfg(feature = "v1_2")]
662 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
663 #[doc(alias = "artists")]
664 pub fn connect_artists_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
665 unsafe extern "C" fn notify_artists_trampoline<F: Fn(&AboutWindow) + 'static>(
666 this: *mut ffi::AdwAboutWindow,
667 _param_spec: glib::ffi::gpointer,
668 f: glib::ffi::gpointer,
669 ) {
670 let f: &F = &*(f as *const F);
671 f(&from_glib_borrow(this))
672 }
673 unsafe {
674 let f: Box_<F> = Box_::new(f);
675 connect_raw(
676 self.as_ptr() as *mut _,
677 c"notify::artists".as_ptr() as *const _,
678 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
679 notify_artists_trampoline::<F> as *const (),
680 )),
681 Box_::into_raw(f),
682 )
683 }
684 }
685
686 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
687 #[cfg(feature = "v1_2")]
688 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
689 #[doc(alias = "comments")]
690 pub fn connect_comments_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
691 unsafe extern "C" fn notify_comments_trampoline<F: Fn(&AboutWindow) + 'static>(
692 this: *mut ffi::AdwAboutWindow,
693 _param_spec: glib::ffi::gpointer,
694 f: glib::ffi::gpointer,
695 ) {
696 let f: &F = &*(f as *const F);
697 f(&from_glib_borrow(this))
698 }
699 unsafe {
700 let f: Box_<F> = Box_::new(f);
701 connect_raw(
702 self.as_ptr() as *mut _,
703 c"notify::comments".as_ptr() as *const _,
704 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
705 notify_comments_trampoline::<F> as *const (),
706 )),
707 Box_::into_raw(f),
708 )
709 }
710 }
711
712 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
713 #[cfg(feature = "v1_2")]
714 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
715 #[doc(alias = "copyright")]
716 pub fn connect_copyright_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
717 unsafe extern "C" fn notify_copyright_trampoline<F: Fn(&AboutWindow) + 'static>(
718 this: *mut ffi::AdwAboutWindow,
719 _param_spec: glib::ffi::gpointer,
720 f: glib::ffi::gpointer,
721 ) {
722 let f: &F = &*(f as *const F);
723 f(&from_glib_borrow(this))
724 }
725 unsafe {
726 let f: Box_<F> = Box_::new(f);
727 connect_raw(
728 self.as_ptr() as *mut _,
729 c"notify::copyright".as_ptr() as *const _,
730 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
731 notify_copyright_trampoline::<F> as *const (),
732 )),
733 Box_::into_raw(f),
734 )
735 }
736 }
737
738 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
739 #[cfg(feature = "v1_2")]
740 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
741 #[doc(alias = "debug-info")]
742 pub fn connect_debug_info_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
743 unsafe extern "C" fn notify_debug_info_trampoline<F: Fn(&AboutWindow) + 'static>(
744 this: *mut ffi::AdwAboutWindow,
745 _param_spec: glib::ffi::gpointer,
746 f: glib::ffi::gpointer,
747 ) {
748 let f: &F = &*(f as *const F);
749 f(&from_glib_borrow(this))
750 }
751 unsafe {
752 let f: Box_<F> = Box_::new(f);
753 connect_raw(
754 self.as_ptr() as *mut _,
755 c"notify::debug-info".as_ptr() as *const _,
756 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
757 notify_debug_info_trampoline::<F> as *const (),
758 )),
759 Box_::into_raw(f),
760 )
761 }
762 }
763
764 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
765 #[cfg(feature = "v1_2")]
766 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
767 #[doc(alias = "debug-info-filename")]
768 pub fn connect_debug_info_filename_notify<F: Fn(&Self) + 'static>(
769 &self,
770 f: F,
771 ) -> SignalHandlerId {
772 unsafe extern "C" fn notify_debug_info_filename_trampoline<
773 F: Fn(&AboutWindow) + 'static,
774 >(
775 this: *mut ffi::AdwAboutWindow,
776 _param_spec: glib::ffi::gpointer,
777 f: glib::ffi::gpointer,
778 ) {
779 let f: &F = &*(f as *const F);
780 f(&from_glib_borrow(this))
781 }
782 unsafe {
783 let f: Box_<F> = Box_::new(f);
784 connect_raw(
785 self.as_ptr() as *mut _,
786 c"notify::debug-info-filename".as_ptr() as *const _,
787 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
788 notify_debug_info_filename_trampoline::<F> as *const (),
789 )),
790 Box_::into_raw(f),
791 )
792 }
793 }
794
795 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
796 #[cfg(feature = "v1_2")]
797 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
798 #[doc(alias = "designers")]
799 pub fn connect_designers_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
800 unsafe extern "C" fn notify_designers_trampoline<F: Fn(&AboutWindow) + 'static>(
801 this: *mut ffi::AdwAboutWindow,
802 _param_spec: glib::ffi::gpointer,
803 f: glib::ffi::gpointer,
804 ) {
805 let f: &F = &*(f as *const F);
806 f(&from_glib_borrow(this))
807 }
808 unsafe {
809 let f: Box_<F> = Box_::new(f);
810 connect_raw(
811 self.as_ptr() as *mut _,
812 c"notify::designers".as_ptr() as *const _,
813 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
814 notify_designers_trampoline::<F> as *const (),
815 )),
816 Box_::into_raw(f),
817 )
818 }
819 }
820
821 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
822 #[cfg(feature = "v1_2")]
823 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
824 #[doc(alias = "developer-name")]
825 pub fn connect_developer_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
826 unsafe extern "C" fn notify_developer_name_trampoline<F: Fn(&AboutWindow) + 'static>(
827 this: *mut ffi::AdwAboutWindow,
828 _param_spec: glib::ffi::gpointer,
829 f: glib::ffi::gpointer,
830 ) {
831 let f: &F = &*(f as *const F);
832 f(&from_glib_borrow(this))
833 }
834 unsafe {
835 let f: Box_<F> = Box_::new(f);
836 connect_raw(
837 self.as_ptr() as *mut _,
838 c"notify::developer-name".as_ptr() as *const _,
839 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
840 notify_developer_name_trampoline::<F> as *const (),
841 )),
842 Box_::into_raw(f),
843 )
844 }
845 }
846
847 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
848 #[cfg(feature = "v1_2")]
849 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
850 #[doc(alias = "developers")]
851 pub fn connect_developers_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
852 unsafe extern "C" fn notify_developers_trampoline<F: Fn(&AboutWindow) + 'static>(
853 this: *mut ffi::AdwAboutWindow,
854 _param_spec: glib::ffi::gpointer,
855 f: glib::ffi::gpointer,
856 ) {
857 let f: &F = &*(f as *const F);
858 f(&from_glib_borrow(this))
859 }
860 unsafe {
861 let f: Box_<F> = Box_::new(f);
862 connect_raw(
863 self.as_ptr() as *mut _,
864 c"notify::developers".as_ptr() as *const _,
865 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
866 notify_developers_trampoline::<F> as *const (),
867 )),
868 Box_::into_raw(f),
869 )
870 }
871 }
872
873 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
874 #[cfg(feature = "v1_2")]
875 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
876 #[doc(alias = "documenters")]
877 pub fn connect_documenters_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
878 unsafe extern "C" fn notify_documenters_trampoline<F: Fn(&AboutWindow) + 'static>(
879 this: *mut ffi::AdwAboutWindow,
880 _param_spec: glib::ffi::gpointer,
881 f: glib::ffi::gpointer,
882 ) {
883 let f: &F = &*(f as *const F);
884 f(&from_glib_borrow(this))
885 }
886 unsafe {
887 let f: Box_<F> = Box_::new(f);
888 connect_raw(
889 self.as_ptr() as *mut _,
890 c"notify::documenters".as_ptr() as *const _,
891 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
892 notify_documenters_trampoline::<F> as *const (),
893 )),
894 Box_::into_raw(f),
895 )
896 }
897 }
898
899 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
900 #[cfg(feature = "v1_2")]
901 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
902 #[doc(alias = "issue-url")]
903 pub fn connect_issue_url_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
904 unsafe extern "C" fn notify_issue_url_trampoline<F: Fn(&AboutWindow) + 'static>(
905 this: *mut ffi::AdwAboutWindow,
906 _param_spec: glib::ffi::gpointer,
907 f: glib::ffi::gpointer,
908 ) {
909 let f: &F = &*(f as *const F);
910 f(&from_glib_borrow(this))
911 }
912 unsafe {
913 let f: Box_<F> = Box_::new(f);
914 connect_raw(
915 self.as_ptr() as *mut _,
916 c"notify::issue-url".as_ptr() as *const _,
917 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
918 notify_issue_url_trampoline::<F> as *const (),
919 )),
920 Box_::into_raw(f),
921 )
922 }
923 }
924
925 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
926 #[cfg(feature = "v1_2")]
927 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
928 #[doc(alias = "license")]
929 pub fn connect_license_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
930 unsafe extern "C" fn notify_license_trampoline<F: Fn(&AboutWindow) + 'static>(
931 this: *mut ffi::AdwAboutWindow,
932 _param_spec: glib::ffi::gpointer,
933 f: glib::ffi::gpointer,
934 ) {
935 let f: &F = &*(f as *const F);
936 f(&from_glib_borrow(this))
937 }
938 unsafe {
939 let f: Box_<F> = Box_::new(f);
940 connect_raw(
941 self.as_ptr() as *mut _,
942 c"notify::license".as_ptr() as *const _,
943 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
944 notify_license_trampoline::<F> as *const (),
945 )),
946 Box_::into_raw(f),
947 )
948 }
949 }
950
951 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
952 #[cfg(feature = "v1_2")]
953 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
954 #[doc(alias = "license-type")]
955 pub fn connect_license_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
956 unsafe extern "C" fn notify_license_type_trampoline<F: Fn(&AboutWindow) + 'static>(
957 this: *mut ffi::AdwAboutWindow,
958 _param_spec: glib::ffi::gpointer,
959 f: glib::ffi::gpointer,
960 ) {
961 let f: &F = &*(f as *const F);
962 f(&from_glib_borrow(this))
963 }
964 unsafe {
965 let f: Box_<F> = Box_::new(f);
966 connect_raw(
967 self.as_ptr() as *mut _,
968 c"notify::license-type".as_ptr() as *const _,
969 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
970 notify_license_type_trampoline::<F> as *const (),
971 )),
972 Box_::into_raw(f),
973 )
974 }
975 }
976
977 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
978 #[cfg(feature = "v1_2")]
979 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
980 #[doc(alias = "release-notes")]
981 pub fn connect_release_notes_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
982 unsafe extern "C" fn notify_release_notes_trampoline<F: Fn(&AboutWindow) + 'static>(
983 this: *mut ffi::AdwAboutWindow,
984 _param_spec: glib::ffi::gpointer,
985 f: glib::ffi::gpointer,
986 ) {
987 let f: &F = &*(f as *const F);
988 f(&from_glib_borrow(this))
989 }
990 unsafe {
991 let f: Box_<F> = Box_::new(f);
992 connect_raw(
993 self.as_ptr() as *mut _,
994 c"notify::release-notes".as_ptr() as *const _,
995 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
996 notify_release_notes_trampoline::<F> as *const (),
997 )),
998 Box_::into_raw(f),
999 )
1000 }
1001 }
1002
1003 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1004 #[cfg(feature = "v1_2")]
1005 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1006 #[doc(alias = "release-notes-version")]
1007 pub fn connect_release_notes_version_notify<F: Fn(&Self) + 'static>(
1008 &self,
1009 f: F,
1010 ) -> SignalHandlerId {
1011 unsafe extern "C" fn notify_release_notes_version_trampoline<
1012 F: Fn(&AboutWindow) + 'static,
1013 >(
1014 this: *mut ffi::AdwAboutWindow,
1015 _param_spec: glib::ffi::gpointer,
1016 f: glib::ffi::gpointer,
1017 ) {
1018 let f: &F = &*(f as *const F);
1019 f(&from_glib_borrow(this))
1020 }
1021 unsafe {
1022 let f: Box_<F> = Box_::new(f);
1023 connect_raw(
1024 self.as_ptr() as *mut _,
1025 c"notify::release-notes-version".as_ptr() as *const _,
1026 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1027 notify_release_notes_version_trampoline::<F> as *const (),
1028 )),
1029 Box_::into_raw(f),
1030 )
1031 }
1032 }
1033
1034 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1035 #[cfg(feature = "v1_2")]
1036 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1037 #[doc(alias = "support-url")]
1038 pub fn connect_support_url_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1039 unsafe extern "C" fn notify_support_url_trampoline<F: Fn(&AboutWindow) + 'static>(
1040 this: *mut ffi::AdwAboutWindow,
1041 _param_spec: glib::ffi::gpointer,
1042 f: glib::ffi::gpointer,
1043 ) {
1044 let f: &F = &*(f as *const F);
1045 f(&from_glib_borrow(this))
1046 }
1047 unsafe {
1048 let f: Box_<F> = Box_::new(f);
1049 connect_raw(
1050 self.as_ptr() as *mut _,
1051 c"notify::support-url".as_ptr() as *const _,
1052 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1053 notify_support_url_trampoline::<F> as *const (),
1054 )),
1055 Box_::into_raw(f),
1056 )
1057 }
1058 }
1059
1060 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1061 #[cfg(feature = "v1_2")]
1062 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1063 #[doc(alias = "translator-credits")]
1064 pub fn connect_translator_credits_notify<F: Fn(&Self) + 'static>(
1065 &self,
1066 f: F,
1067 ) -> SignalHandlerId {
1068 unsafe extern "C" fn notify_translator_credits_trampoline<F: Fn(&AboutWindow) + 'static>(
1069 this: *mut ffi::AdwAboutWindow,
1070 _param_spec: glib::ffi::gpointer,
1071 f: glib::ffi::gpointer,
1072 ) {
1073 let f: &F = &*(f as *const F);
1074 f(&from_glib_borrow(this))
1075 }
1076 unsafe {
1077 let f: Box_<F> = Box_::new(f);
1078 connect_raw(
1079 self.as_ptr() as *mut _,
1080 c"notify::translator-credits".as_ptr() as *const _,
1081 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1082 notify_translator_credits_trampoline::<F> as *const (),
1083 )),
1084 Box_::into_raw(f),
1085 )
1086 }
1087 }
1088
1089 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1090 #[cfg(feature = "v1_2")]
1091 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1092 #[doc(alias = "version")]
1093 pub fn connect_version_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1094 unsafe extern "C" fn notify_version_trampoline<F: Fn(&AboutWindow) + 'static>(
1095 this: *mut ffi::AdwAboutWindow,
1096 _param_spec: glib::ffi::gpointer,
1097 f: glib::ffi::gpointer,
1098 ) {
1099 let f: &F = &*(f as *const F);
1100 f(&from_glib_borrow(this))
1101 }
1102 unsafe {
1103 let f: Box_<F> = Box_::new(f);
1104 connect_raw(
1105 self.as_ptr() as *mut _,
1106 c"notify::version".as_ptr() as *const _,
1107 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1108 notify_version_trampoline::<F> as *const (),
1109 )),
1110 Box_::into_raw(f),
1111 )
1112 }
1113 }
1114
1115 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1116 #[cfg(feature = "v1_2")]
1117 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1118 #[doc(alias = "website")]
1119 pub fn connect_website_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1120 unsafe extern "C" fn notify_website_trampoline<F: Fn(&AboutWindow) + 'static>(
1121 this: *mut ffi::AdwAboutWindow,
1122 _param_spec: glib::ffi::gpointer,
1123 f: glib::ffi::gpointer,
1124 ) {
1125 let f: &F = &*(f as *const F);
1126 f(&from_glib_borrow(this))
1127 }
1128 unsafe {
1129 let f: Box_<F> = Box_::new(f);
1130 connect_raw(
1131 self.as_ptr() as *mut _,
1132 c"notify::website".as_ptr() as *const _,
1133 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1134 notify_website_trampoline::<F> as *const (),
1135 )),
1136 Box_::into_raw(f),
1137 )
1138 }
1139 }
1140}
1141
1142#[cfg(feature = "v1_2")]
1143#[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1144impl Default for AboutWindow {
1145 fn default() -> Self {
1146 Self::new()
1147 }
1148}
1149
1150#[must_use = "The builder must be built to be used"]
1155pub struct AboutWindowBuilder {
1156 builder: glib::object::ObjectBuilder<'static, AboutWindow>,
1157}
1158
1159impl AboutWindowBuilder {
1160 fn new() -> Self {
1161 Self {
1162 builder: glib::object::Object::builder(),
1163 }
1164 }
1165
1166 #[cfg(feature = "v1_2")]
1167 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1168 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1169 pub fn application_icon(self, application_icon: impl Into<glib::GString>) -> Self {
1170 Self {
1171 builder: self
1172 .builder
1173 .property("application-icon", application_icon.into()),
1174 }
1175 }
1176
1177 #[cfg(feature = "v1_2")]
1178 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1179 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1180 pub fn application_name(self, application_name: impl Into<glib::GString>) -> Self {
1181 Self {
1182 builder: self
1183 .builder
1184 .property("application-name", application_name.into()),
1185 }
1186 }
1187
1188 #[cfg(feature = "v1_2")]
1189 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1190 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1191 pub fn artists(self, artists: impl Into<glib::StrV>) -> Self {
1192 Self {
1193 builder: self.builder.property("artists", artists.into()),
1194 }
1195 }
1196
1197 #[cfg(feature = "v1_2")]
1198 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1199 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1200 pub fn comments(self, comments: impl Into<glib::GString>) -> Self {
1201 Self {
1202 builder: self.builder.property("comments", comments.into()),
1203 }
1204 }
1205
1206 #[cfg(feature = "v1_2")]
1207 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1208 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1209 pub fn copyright(self, copyright: impl Into<glib::GString>) -> Self {
1210 Self {
1211 builder: self.builder.property("copyright", copyright.into()),
1212 }
1213 }
1214
1215 #[cfg(feature = "v1_2")]
1216 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1217 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1218 pub fn debug_info(self, debug_info: impl Into<glib::GString>) -> Self {
1219 Self {
1220 builder: self.builder.property("debug-info", debug_info.into()),
1221 }
1222 }
1223
1224 #[cfg(feature = "v1_2")]
1225 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1226 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1227 pub fn debug_info_filename(self, debug_info_filename: impl Into<glib::GString>) -> Self {
1228 Self {
1229 builder: self
1230 .builder
1231 .property("debug-info-filename", debug_info_filename.into()),
1232 }
1233 }
1234
1235 #[cfg(feature = "v1_2")]
1236 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1237 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1238 pub fn designers(self, designers: impl Into<glib::StrV>) -> Self {
1239 Self {
1240 builder: self.builder.property("designers", designers.into()),
1241 }
1242 }
1243
1244 #[cfg(feature = "v1_2")]
1245 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1246 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1247 pub fn developer_name(self, developer_name: impl Into<glib::GString>) -> Self {
1248 Self {
1249 builder: self
1250 .builder
1251 .property("developer-name", developer_name.into()),
1252 }
1253 }
1254
1255 #[cfg(feature = "v1_2")]
1256 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1257 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1258 pub fn developers(self, developers: impl Into<glib::StrV>) -> Self {
1259 Self {
1260 builder: self.builder.property("developers", developers.into()),
1261 }
1262 }
1263
1264 #[cfg(feature = "v1_2")]
1265 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1266 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1267 pub fn documenters(self, documenters: impl Into<glib::StrV>) -> Self {
1268 Self {
1269 builder: self.builder.property("documenters", documenters.into()),
1270 }
1271 }
1272
1273 #[cfg(feature = "v1_2")]
1274 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1275 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1276 pub fn issue_url(self, issue_url: impl Into<glib::GString>) -> Self {
1277 Self {
1278 builder: self.builder.property("issue-url", issue_url.into()),
1279 }
1280 }
1281
1282 #[cfg(feature = "v1_2")]
1283 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1284 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1285 pub fn license(self, license: impl Into<glib::GString>) -> Self {
1286 Self {
1287 builder: self.builder.property("license", license.into()),
1288 }
1289 }
1290
1291 #[cfg(feature = "v1_2")]
1292 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1293 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1294 pub fn license_type(self, license_type: gtk::License) -> Self {
1295 Self {
1296 builder: self.builder.property("license-type", license_type),
1297 }
1298 }
1299
1300 #[cfg(feature = "v1_2")]
1301 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1302 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1303 pub fn release_notes(self, release_notes: impl Into<glib::GString>) -> Self {
1304 Self {
1305 builder: self.builder.property("release-notes", release_notes.into()),
1306 }
1307 }
1308
1309 #[cfg(feature = "v1_2")]
1310 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1311 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1312 pub fn release_notes_version(self, release_notes_version: impl Into<glib::GString>) -> Self {
1313 Self {
1314 builder: self
1315 .builder
1316 .property("release-notes-version", release_notes_version.into()),
1317 }
1318 }
1319
1320 #[cfg(feature = "v1_2")]
1321 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1322 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1323 pub fn support_url(self, support_url: impl Into<glib::GString>) -> Self {
1324 Self {
1325 builder: self.builder.property("support-url", support_url.into()),
1326 }
1327 }
1328
1329 #[cfg(feature = "v1_2")]
1330 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1331 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1332 pub fn translator_credits(self, translator_credits: impl Into<glib::GString>) -> Self {
1333 Self {
1334 builder: self
1335 .builder
1336 .property("translator-credits", translator_credits.into()),
1337 }
1338 }
1339
1340 #[cfg(feature = "v1_2")]
1341 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1342 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1343 pub fn version(self, version: impl Into<glib::GString>) -> Self {
1344 Self {
1345 builder: self.builder.property("version", version.into()),
1346 }
1347 }
1348
1349 #[cfg(feature = "v1_2")]
1350 #[cfg_attr(docsrs, doc(cfg(feature = "v1_2")))]
1351 #[cfg_attr(feature = "v1_6", deprecated = "Since 1.6")]
1352 pub fn website(self, website: impl Into<glib::GString>) -> Self {
1353 Self {
1354 builder: self.builder.property("website", website.into()),
1355 }
1356 }
1357
1358 #[cfg(feature = "v1_7")]
1359 #[cfg_attr(docsrs, doc(cfg(feature = "v1_7")))]
1360 pub fn adaptive_preview(self, adaptive_preview: bool) -> Self {
1361 Self {
1362 builder: self.builder.property("adaptive-preview", adaptive_preview),
1363 }
1364 }
1365
1366 pub fn content(self, content: &impl IsA<gtk::Widget>) -> Self {
1367 Self {
1368 builder: self.builder.property("content", content.clone().upcast()),
1369 }
1370 }
1371
1372 pub fn application(self, application: &impl IsA<gtk::Application>) -> Self {
1373 Self {
1374 builder: self
1375 .builder
1376 .property("application", application.clone().upcast()),
1377 }
1378 }
1379
1380 pub fn decorated(self, decorated: bool) -> Self {
1381 Self {
1382 builder: self.builder.property("decorated", decorated),
1383 }
1384 }
1385
1386 pub fn default_height(self, default_height: i32) -> Self {
1387 Self {
1388 builder: self.builder.property("default-height", default_height),
1389 }
1390 }
1391
1392 pub fn default_widget(self, default_widget: &impl IsA<gtk::Widget>) -> Self {
1393 Self {
1394 builder: self
1395 .builder
1396 .property("default-widget", default_widget.clone().upcast()),
1397 }
1398 }
1399
1400 pub fn default_width(self, default_width: i32) -> Self {
1401 Self {
1402 builder: self.builder.property("default-width", default_width),
1403 }
1404 }
1405
1406 pub fn deletable(self, deletable: bool) -> Self {
1407 Self {
1408 builder: self.builder.property("deletable", deletable),
1409 }
1410 }
1411
1412 pub fn destroy_with_parent(self, destroy_with_parent: bool) -> Self {
1413 Self {
1414 builder: self
1415 .builder
1416 .property("destroy-with-parent", destroy_with_parent),
1417 }
1418 }
1419
1420 pub fn display(self, display: &gdk::Display) -> Self {
1421 Self {
1422 builder: self.builder.property("display", display.clone()),
1423 }
1424 }
1425
1426 pub fn focus_visible(self, focus_visible: bool) -> Self {
1427 Self {
1428 builder: self.builder.property("focus-visible", focus_visible),
1429 }
1430 }
1431
1432 pub fn focus_widget(self, focus_widget: &impl IsA<gtk::Widget>) -> Self {
1433 Self {
1434 builder: self
1435 .builder
1436 .property("focus-widget", focus_widget.clone().upcast()),
1437 }
1438 }
1439
1440 pub fn fullscreened(self, fullscreened: bool) -> Self {
1441 Self {
1442 builder: self.builder.property("fullscreened", fullscreened),
1443 }
1444 }
1445
1446 #[cfg(feature = "gtk_v4_20")]
1447 #[cfg_attr(docsrs, doc(cfg(feature = "gtk_v4_20")))]
1448 pub fn gravity(self, gravity: gtk::WindowGravity) -> Self {
1449 Self {
1450 builder: self.builder.property("gravity", gravity),
1451 }
1452 }
1453
1454 #[cfg(feature = "gtk_v4_2")]
1455 #[cfg_attr(docsrs, doc(cfg(feature = "gtk_v4_2")))]
1456 pub fn handle_menubar_accel(self, handle_menubar_accel: bool) -> Self {
1457 Self {
1458 builder: self
1459 .builder
1460 .property("handle-menubar-accel", handle_menubar_accel),
1461 }
1462 }
1463
1464 pub fn hide_on_close(self, hide_on_close: bool) -> Self {
1465 Self {
1466 builder: self.builder.property("hide-on-close", hide_on_close),
1467 }
1468 }
1469
1470 pub fn icon_name(self, icon_name: impl Into<glib::GString>) -> Self {
1471 Self {
1472 builder: self.builder.property("icon-name", icon_name.into()),
1473 }
1474 }
1475
1476 pub fn maximized(self, maximized: bool) -> Self {
1477 Self {
1478 builder: self.builder.property("maximized", maximized),
1479 }
1480 }
1481
1482 pub fn mnemonics_visible(self, mnemonics_visible: bool) -> Self {
1483 Self {
1484 builder: self
1485 .builder
1486 .property("mnemonics-visible", mnemonics_visible),
1487 }
1488 }
1489
1490 pub fn modal(self, modal: bool) -> Self {
1491 Self {
1492 builder: self.builder.property("modal", modal),
1493 }
1494 }
1495
1496 pub fn resizable(self, resizable: bool) -> Self {
1497 Self {
1498 builder: self.builder.property("resizable", resizable),
1499 }
1500 }
1501
1502 pub fn startup_id(self, startup_id: impl Into<glib::GString>) -> Self {
1503 Self {
1504 builder: self.builder.property("startup-id", startup_id.into()),
1505 }
1506 }
1507
1508 pub fn title(self, title: impl Into<glib::GString>) -> Self {
1509 Self {
1510 builder: self.builder.property("title", title.into()),
1511 }
1512 }
1513
1514 #[cfg(feature = "gtk_v4_6")]
1515 #[cfg_attr(docsrs, doc(cfg(feature = "gtk_v4_6")))]
1516 pub fn titlebar(self, titlebar: &impl IsA<gtk::Widget>) -> Self {
1517 Self {
1518 builder: self.builder.property("titlebar", titlebar.clone().upcast()),
1519 }
1520 }
1521
1522 pub fn transient_for(self, transient_for: &impl IsA<gtk::Window>) -> Self {
1523 Self {
1524 builder: self
1525 .builder
1526 .property("transient-for", transient_for.clone().upcast()),
1527 }
1528 }
1529
1530 pub fn can_focus(self, can_focus: bool) -> Self {
1531 Self {
1532 builder: self.builder.property("can-focus", can_focus),
1533 }
1534 }
1535
1536 pub fn can_target(self, can_target: bool) -> Self {
1537 Self {
1538 builder: self.builder.property("can-target", can_target),
1539 }
1540 }
1541
1542 pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
1543 Self {
1544 builder: self.builder.property("css-classes", css_classes.into()),
1545 }
1546 }
1547
1548 pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
1549 Self {
1550 builder: self.builder.property("css-name", css_name.into()),
1551 }
1552 }
1553
1554 pub fn cursor(self, cursor: &gdk::Cursor) -> Self {
1555 Self {
1556 builder: self.builder.property("cursor", cursor.clone()),
1557 }
1558 }
1559
1560 pub fn focus_on_click(self, focus_on_click: bool) -> Self {
1561 Self {
1562 builder: self.builder.property("focus-on-click", focus_on_click),
1563 }
1564 }
1565
1566 pub fn focusable(self, focusable: bool) -> Self {
1567 Self {
1568 builder: self.builder.property("focusable", focusable),
1569 }
1570 }
1571
1572 pub fn halign(self, halign: gtk::Align) -> Self {
1573 Self {
1574 builder: self.builder.property("halign", halign),
1575 }
1576 }
1577
1578 pub fn has_tooltip(self, has_tooltip: bool) -> Self {
1579 Self {
1580 builder: self.builder.property("has-tooltip", has_tooltip),
1581 }
1582 }
1583
1584 pub fn height_request(self, height_request: i32) -> Self {
1585 Self {
1586 builder: self.builder.property("height-request", height_request),
1587 }
1588 }
1589
1590 pub fn hexpand(self, hexpand: bool) -> Self {
1591 Self {
1592 builder: self.builder.property("hexpand", hexpand),
1593 }
1594 }
1595
1596 pub fn hexpand_set(self, hexpand_set: bool) -> Self {
1597 Self {
1598 builder: self.builder.property("hexpand-set", hexpand_set),
1599 }
1600 }
1601
1602 pub fn layout_manager(self, layout_manager: &impl IsA<gtk::LayoutManager>) -> Self {
1603 Self {
1604 builder: self
1605 .builder
1606 .property("layout-manager", layout_manager.clone().upcast()),
1607 }
1608 }
1609
1610 #[cfg(feature = "gtk_v4_18")]
1611 #[cfg_attr(docsrs, doc(cfg(feature = "gtk_v4_18")))]
1612 pub fn limit_events(self, limit_events: bool) -> Self {
1613 Self {
1614 builder: self.builder.property("limit-events", limit_events),
1615 }
1616 }
1617
1618 pub fn margin_bottom(self, margin_bottom: i32) -> Self {
1619 Self {
1620 builder: self.builder.property("margin-bottom", margin_bottom),
1621 }
1622 }
1623
1624 pub fn margin_end(self, margin_end: i32) -> Self {
1625 Self {
1626 builder: self.builder.property("margin-end", margin_end),
1627 }
1628 }
1629
1630 pub fn margin_start(self, margin_start: i32) -> Self {
1631 Self {
1632 builder: self.builder.property("margin-start", margin_start),
1633 }
1634 }
1635
1636 pub fn margin_top(self, margin_top: i32) -> Self {
1637 Self {
1638 builder: self.builder.property("margin-top", margin_top),
1639 }
1640 }
1641
1642 pub fn name(self, name: impl Into<glib::GString>) -> Self {
1643 Self {
1644 builder: self.builder.property("name", name.into()),
1645 }
1646 }
1647
1648 pub fn opacity(self, opacity: f64) -> Self {
1649 Self {
1650 builder: self.builder.property("opacity", opacity),
1651 }
1652 }
1653
1654 pub fn overflow(self, overflow: gtk::Overflow) -> Self {
1655 Self {
1656 builder: self.builder.property("overflow", overflow),
1657 }
1658 }
1659
1660 pub fn receives_default(self, receives_default: bool) -> Self {
1661 Self {
1662 builder: self.builder.property("receives-default", receives_default),
1663 }
1664 }
1665
1666 pub fn sensitive(self, sensitive: bool) -> Self {
1667 Self {
1668 builder: self.builder.property("sensitive", sensitive),
1669 }
1670 }
1671
1672 pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
1673 Self {
1674 builder: self
1675 .builder
1676 .property("tooltip-markup", tooltip_markup.into()),
1677 }
1678 }
1679
1680 pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
1681 Self {
1682 builder: self.builder.property("tooltip-text", tooltip_text.into()),
1683 }
1684 }
1685
1686 pub fn valign(self, valign: gtk::Align) -> Self {
1687 Self {
1688 builder: self.builder.property("valign", valign),
1689 }
1690 }
1691
1692 pub fn vexpand(self, vexpand: bool) -> Self {
1693 Self {
1694 builder: self.builder.property("vexpand", vexpand),
1695 }
1696 }
1697
1698 pub fn vexpand_set(self, vexpand_set: bool) -> Self {
1699 Self {
1700 builder: self.builder.property("vexpand-set", vexpand_set),
1701 }
1702 }
1703
1704 pub fn visible(self, visible: bool) -> Self {
1705 Self {
1706 builder: self.builder.property("visible", visible),
1707 }
1708 }
1709
1710 pub fn width_request(self, width_request: i32) -> Self {
1711 Self {
1712 builder: self.builder.property("width-request", width_request),
1713 }
1714 }
1715
1716 pub fn accessible_role(self, accessible_role: gtk::AccessibleRole) -> Self {
1717 Self {
1718 builder: self.builder.property("accessible-role", accessible_role),
1719 }
1720 }
1721
1722 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
1725 pub fn build(self) -> AboutWindow {
1726 assert_initialized_main_thread!();
1727 self.builder.build()
1728 }
1729}