Skip to content

Commit 20ea8ad

Browse files
examples: Unify glib::wrapper code style
1 parent a84f7d1 commit 20ea8ad

File tree

12 files changed

+27
-12
lines changed
  • examples
    • composite_template
    • content_provider/content_provider
    • custom_application/ex_application
    • custom_buildable/custom_buildable
    • custom_editable
    • custom_orientable/custom_orientable
    • scale_bin/scale_bin
    • squares/squares_widget
    • squeezer_bin/squeezer_bin
    • video_player/video_player_window

12 files changed

+27
-12
lines changed

examples/composite_template/ex_application_window/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ use gtk::{gio, glib, subclass::prelude::*};
44

55
glib::wrapper! {
66
pub struct ExApplicationWindow(ObjectSubclass<imp::ExApplicationWindow>)
7-
@extends gtk::Widget, gtk::Window, gtk::ApplicationWindow, @implements gio::ActionMap, gio::ActionGroup;
7+
@extends gtk::Widget, gtk::Window, gtk::ApplicationWindow,
8+
@implements gio::ActionMap, gio::ActionGroup;
89
}
910

1011
impl ExApplicationWindow {

examples/composite_template/ex_menu_button/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ mod imp;
33
use gtk::glib;
44

55
glib::wrapper! {
6-
pub struct ExMenuButton(ObjectSubclass<imp::ExMenuButton>) @extends gtk::Widget;
6+
pub struct ExMenuButton(ObjectSubclass<imp::ExMenuButton>)
7+
@extends gtk::Widget;
78
}

examples/content_provider/content_provider/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ mod imp;
33
use gtk::{gdk, glib};
44

55
glib::wrapper! {
6-
pub struct ContentProvider(ObjectSubclass<imp::ContentProvider>) @extends gdk::ContentProvider;
6+
pub struct ContentProvider(ObjectSubclass<imp::ContentProvider>)
7+
@extends gdk::ContentProvider;
78
}
89

910
impl ContentProvider {

examples/custom_application/ex_application/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ mod imp;
33
use gtk::{gio, glib};
44

55
glib::wrapper! {
6-
pub struct ExApplication(ObjectSubclass<imp::ExApplication>) @extends gio::Application, gtk::Application, @implements gio::ActionGroup, gio::ActionMap;
6+
pub struct ExApplication(ObjectSubclass<imp::ExApplication>)
7+
@extends gio::Application, gtk::Application,
8+
@implements gio::ActionGroup, gio::ActionMap;
79
}
810

911
impl Default for ExApplication {

examples/custom_buildable/custom_buildable/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ mod imp;
33
use gtk::{glib, prelude::*, subclass::prelude::*};
44

55
glib::wrapper! {
6-
pub struct CustomBuildable(ObjectSubclass<imp::CustomBuildable>) @extends gtk::Widget, @implements gtk::Buildable;
6+
pub struct CustomBuildable(ObjectSubclass<imp::CustomBuildable>)
7+
@extends gtk::Widget,
8+
@implements gtk::Buildable;
79
}
810

911
impl CustomBuildable {

examples/custom_editable/custom_editable/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ use gtk::{glib, prelude::*};
55
use crate::custom_tag::CustomTag;
66

77
glib::wrapper! {
8-
pub struct CustomEditable(ObjectSubclass<imp::CustomEditable>) @extends gtk::Widget, @implements gtk::Editable;
8+
pub struct CustomEditable(ObjectSubclass<imp::CustomEditable>)
9+
@extends gtk::Widget,
10+
@implements gtk::Editable;
911
}
1012

1113
impl Default for CustomEditable {

examples/custom_editable/custom_tag/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ pub mod imp;
33
use gtk::glib;
44

55
glib::wrapper! {
6-
pub struct CustomTag(ObjectSubclass<imp::CustomTag>) @extends gtk::Widget;
6+
pub struct CustomTag(ObjectSubclass<imp::CustomTag>)
7+
@extends gtk::Widget;
78
}
89

910
impl CustomTag {

examples/custom_orientable/custom_orientable/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ use gtk::glib;
44

55
glib::wrapper! {
66
pub struct CustomOrientable(ObjectSubclass<imp::CustomOrientable>)
7-
@extends gtk::Widget, @implements gtk::Orientable;
7+
@extends gtk::Widget,
8+
@implements gtk::Orientable;
89
}
910

1011
impl Default for CustomOrientable {

examples/scale_bin/scale_bin/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ mod imp;
33
use gtk::glib;
44

55
glib::wrapper! {
6-
pub struct ScaleBin(ObjectSubclass<imp::ScaleBin>) @extends gtk::Widget;
6+
pub struct ScaleBin(ObjectSubclass<imp::ScaleBin>)
7+
@extends gtk::Widget;
78
}
89

910
impl ScaleBin {

examples/squares/squares_widget/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ mod imp;
33
use gtk::glib;
44

55
glib::wrapper! {
6-
pub struct SquaresWidget(ObjectSubclass<imp::SquaresWidget>) @extends gtk::Widget;
6+
pub struct SquaresWidget(ObjectSubclass<imp::SquaresWidget>)
7+
@extends gtk::Widget;
78
}
89

910
impl Default for SquaresWidget {

0 commit comments

Comments
 (0)