Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

Commit 28a613b

Browse files
committed
Rename impl_ to imp
See gtk-rs/gtk-rs-core#437
1 parent 67f3a18 commit 28a613b

16 files changed

+96
-96
lines changed

gtk/src/subclass/application.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ unsafe impl<T: GtkApplicationImpl> IsSubclassable<T> for Application {
6767
wptr: *mut ffi::GtkWindow,
6868
) {
6969
let instance = &*(ptr as *mut T::Instance);
70-
let imp = instance.impl_();
70+
let imp = instance.imp();
7171
let wrap: Borrowed<Application> = from_glib_borrow(ptr);
7272

7373
imp.window_added(wrap.unsafe_cast_ref(), &from_glib_borrow(wptr))
@@ -77,7 +77,7 @@ unsafe impl<T: GtkApplicationImpl> IsSubclassable<T> for Application {
7777
wptr: *mut ffi::GtkWindow,
7878
) {
7979
let instance = &*(ptr as *mut T::Instance);
80-
let imp = instance.impl_();
80+
let imp = instance.imp();
8181
let wrap: Borrowed<Application> = from_glib_borrow(ptr);
8282

8383
imp.window_removed(wrap.unsafe_cast_ref(), &from_glib_borrow(wptr))
@@ -87,7 +87,7 @@ unsafe impl<T: GtkApplicationImpl> IsSubclassable<T> for Application {
8787
ptr: *mut gio::ffi::GApplication,
8888
) {
8989
let instance = &*(ptr as *mut T::Instance);
90-
let imp = instance.impl_();
90+
let imp = instance.imp();
9191
let wrap: Borrowed<gio::Application> = from_glib_borrow(ptr);
9292
crate::rt::set_initialized();
9393
imp.startup(wrap.unsafe_cast_ref())

gtk/src/subclass/button.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ unsafe impl<T: ButtonImpl> IsSubclassable<T> for Button {
6060

6161
unsafe extern "C" fn button_activate<T: ButtonImpl>(ptr: *mut ffi::GtkButton) {
6262
let instance = &*(ptr as *mut T::Instance);
63-
let imp = instance.impl_();
63+
let imp = instance.imp();
6464
let wrap: Borrowed<Button> = from_glib_borrow(ptr);
6565

6666
imp.activate(wrap.unsafe_cast_ref())
6767
}
6868

6969
unsafe extern "C" fn button_clicked<T: ButtonImpl>(ptr: *mut ffi::GtkButton) {
7070
let instance = &*(ptr as *mut T::Instance);
71-
let imp = instance.impl_();
71+
let imp = instance.imp();
7272
let wrap: Borrowed<Button> = from_glib_borrow(ptr);
7373

7474
imp.clicked(wrap.unsafe_cast_ref())

gtk/src/subclass/cell_renderer.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ unsafe extern "C" fn cell_renderer_get_request_mode<T: CellRendererImpl>(
448448
ptr: *mut ffi::GtkCellRenderer,
449449
) -> ffi::GtkSizeRequestMode {
450450
let instance = &*(ptr as *mut T::Instance);
451-
let imp = instance.impl_();
451+
let imp = instance.imp();
452452
let wrap: Borrowed<CellRenderer> = from_glib_borrow(ptr);
453453

454454
imp.request_mode(wrap.unsafe_cast_ref()).into_glib()
@@ -461,7 +461,7 @@ unsafe extern "C" fn cell_renderer_get_preferred_width<T: CellRendererImpl>(
461461
natptr: *mut c_int,
462462
) {
463463
let instance = &*(ptr as *mut T::Instance);
464-
let imp = instance.impl_();
464+
let imp = instance.imp();
465465
let wrap: Borrowed<CellRenderer> = from_glib_borrow(ptr);
466466
let widget: Borrowed<Widget> = from_glib_borrow(wdgtptr);
467467

@@ -482,7 +482,7 @@ unsafe extern "C" fn cell_renderer_get_preferred_height_for_width<T: CellRendere
482482
nat_height_ptr: *mut c_int,
483483
) {
484484
let instance = &*(ptr as *mut T::Instance);
485-
let imp = instance.impl_();
485+
let imp = instance.imp();
486486
let wrap: Borrowed<CellRenderer> = from_glib_borrow(ptr);
487487
let widget: Borrowed<Widget> = from_glib_borrow(wdgtptr);
488488

@@ -503,7 +503,7 @@ unsafe extern "C" fn cell_renderer_get_preferred_height<T: CellRendererImpl>(
503503
natptr: *mut c_int,
504504
) {
505505
let instance = &*(ptr as *mut T::Instance);
506-
let imp = instance.impl_();
506+
let imp = instance.imp();
507507
let wrap: Borrowed<CellRenderer> = from_glib_borrow(ptr);
508508
let widget: Borrowed<Widget> = from_glib_borrow(wdgtptr);
509509

@@ -524,7 +524,7 @@ unsafe extern "C" fn cell_renderer_get_preferred_width_for_height<T: CellRendere
524524
nat_width_ptr: *mut c_int,
525525
) {
526526
let instance = &*(ptr as *mut T::Instance);
527-
let imp = instance.impl_();
527+
let imp = instance.imp();
528528
let wrap: Borrowed<CellRenderer> = from_glib_borrow(ptr);
529529
let widget: Borrowed<Widget> = from_glib_borrow(wdgtptr);
530530

@@ -546,7 +546,7 @@ unsafe extern "C" fn cell_renderer_get_aligned_area<T: CellRendererImpl>(
546546
alignedptr: *mut gdk::ffi::GdkRectangle,
547547
) {
548548
let instance = &*(ptr as *mut T::Instance);
549-
let imp = instance.impl_();
549+
let imp = instance.imp();
550550
let wrap: Borrowed<CellRenderer> = from_glib_borrow(ptr);
551551
let widget: Borrowed<Widget> = from_glib_borrow(wdgtptr);
552552

@@ -568,7 +568,7 @@ unsafe extern "C" fn cell_renderer_render<T: CellRendererImpl>(
568568
flags: ffi::GtkCellRendererState,
569569
) {
570570
let instance = &*(ptr as *mut T::Instance);
571-
let imp = instance.impl_();
571+
let imp = instance.imp();
572572
let wrap: Borrowed<CellRenderer> = from_glib_borrow(ptr);
573573
let widget: Borrowed<Widget> = from_glib_borrow(wdgtptr);
574574
let cr: Borrowed<cairo::Context> = from_glib_borrow(crptr);
@@ -593,7 +593,7 @@ unsafe extern "C" fn cell_renderer_activate<T: CellRendererImpl>(
593593
flags: ffi::GtkCellRendererState,
594594
) -> glib::ffi::gboolean {
595595
let instance = &*(ptr as *mut T::Instance);
596-
let imp = instance.impl_();
596+
let imp = instance.imp();
597597
let wrap: Borrowed<CellRenderer> = from_glib_borrow(ptr);
598598
let widget: Borrowed<Widget> = from_glib_borrow(wdgtptr);
599599
let evt: Borrowed<Option<gdk::Event>> = from_glib_borrow(evtptr);
@@ -620,7 +620,7 @@ unsafe extern "C" fn cell_renderer_start_editing<T: CellRendererImpl>(
620620
flags: ffi::GtkCellRendererState,
621621
) -> *mut ffi::GtkCellEditable {
622622
let instance = &*(ptr as *mut T::Instance);
623-
let imp = instance.impl_();
623+
let imp = instance.imp();
624624
let wrap: Borrowed<CellRenderer> = from_glib_borrow(ptr);
625625
let widget: Borrowed<Widget> = from_glib_borrow(wdgtptr);
626626
let evt: Borrowed<Option<gdk::Event>> = from_glib_borrow(evtptr);
@@ -642,7 +642,7 @@ unsafe extern "C" fn cell_renderer_editing_canceled<T: CellRendererImpl>(
642642
ptr: *mut ffi::GtkCellRenderer,
643643
) {
644644
let instance = &*(ptr as *mut T::Instance);
645-
let imp = instance.impl_();
645+
let imp = instance.imp();
646646
let wrap: Borrowed<CellRenderer> = from_glib_borrow(ptr);
647647

648648
imp.editing_canceled(wrap.unsafe_cast_ref());
@@ -654,7 +654,7 @@ unsafe extern "C" fn cell_renderer_editing_started<T: CellRendererImpl>(
654654
pathptr: *const c_char,
655655
) {
656656
let instance = &*(ptr as *mut T::Instance);
657-
let imp = instance.impl_();
657+
let imp = instance.imp();
658658
let wrap: Borrowed<CellRenderer> = from_glib_borrow(ptr);
659659
let editable = from_glib_borrow(editableptr);
660660

gtk/src/subclass/cell_renderer_accel.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ unsafe extern "C" fn cell_renderer_accel_edited<T: CellRendererAccelImpl>(
104104
hardware_keycode: c_uint,
105105
) {
106106
let instance = &*(ptr as *mut T::Instance);
107-
let imp = instance.impl_();
107+
let imp = instance.imp();
108108
let wrap: Borrowed<CellRendererAccel> = from_glib_borrow(ptr);
109109

110110
imp.accel_edited(
@@ -121,7 +121,7 @@ unsafe extern "C" fn cell_renderer_accel_cleared<T: CellRendererAccelImpl>(
121121
path: *const c_char,
122122
) {
123123
let instance = &*(ptr as *mut T::Instance);
124-
let imp = instance.impl_();
124+
let imp = instance.imp();
125125
let wrap: Borrowed<CellRendererAccel> = from_glib_borrow(ptr);
126126

127127
imp.accel_cleared(wrap.unsafe_cast_ref(), &GString::from_glib_borrow(path))

gtk/src/subclass/cell_renderer_text.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ unsafe extern "C" fn cell_renderer_text_edited<T: CellRendererTextImpl>(
5858
new_text: *const c_char,
5959
) {
6060
let instance = &*(ptr as *mut T::Instance);
61-
let imp = instance.impl_();
61+
let imp = instance.imp();
6262
let wrap: Borrowed<CellRendererText> = from_glib_borrow(ptr);
6363

6464
imp.edited(

gtk/src/subclass/cell_renderer_toggle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ unsafe extern "C" fn cell_renderer_toggle_toggled<T: CellRendererToggleImpl>(
5656
path: *const c_char,
5757
) {
5858
let instance = &*(ptr as *mut T::Instance);
59-
let imp = instance.impl_();
59+
let imp = instance.imp();
6060
let wrap: Borrowed<CellRendererToggle> = from_glib_borrow(ptr);
6161

6262
imp.toggled(wrap.unsafe_cast_ref(), &GString::from_glib_borrow(path))

gtk/src/subclass/container.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ unsafe extern "C" fn container_add<T: ContainerImpl>(
168168
wdgtptr: *mut ffi::GtkWidget,
169169
) {
170170
let instance = &*(ptr as *mut T::Instance);
171-
let imp = instance.impl_();
171+
let imp = instance.imp();
172172
let wrap: Borrowed<Container> = from_glib_borrow(ptr);
173173
let widget: Borrowed<Widget> = from_glib_borrow(wdgtptr);
174174

@@ -180,7 +180,7 @@ unsafe extern "C" fn container_remove<T: ContainerImpl>(
180180
wdgtptr: *mut ffi::GtkWidget,
181181
) {
182182
let instance = &*(ptr as *mut T::Instance);
183-
let imp = instance.impl_();
183+
let imp = instance.imp();
184184
let wrap: Borrowed<Container> = from_glib_borrow(ptr);
185185
let widget: Borrowed<Widget> = from_glib_borrow(wdgtptr);
186186

@@ -189,7 +189,7 @@ unsafe extern "C" fn container_remove<T: ContainerImpl>(
189189

190190
unsafe extern "C" fn container_check_resize<T: ContainerImpl>(ptr: *mut ffi::GtkContainer) {
191191
let instance = &*(ptr as *mut T::Instance);
192-
let imp = instance.impl_();
192+
let imp = instance.imp();
193193
let wrap: Borrowed<Container> = from_glib_borrow(ptr);
194194

195195
imp.check_resize(wrap.unsafe_cast_ref())
@@ -200,7 +200,7 @@ unsafe extern "C" fn container_set_focus_child<T: ContainerImpl>(
200200
wdgtptr: *mut ffi::GtkWidget,
201201
) {
202202
let instance = &*(ptr as *mut T::Instance);
203-
let imp = instance.impl_();
203+
let imp = instance.imp();
204204
let wrap: Borrowed<Container> = from_glib_borrow(ptr);
205205
let widget: Borrowed<Option<Widget>> = from_glib_borrow(wdgtptr);
206206

@@ -211,7 +211,7 @@ unsafe extern "C" fn container_child_type<T: ContainerImpl>(
211211
ptr: *mut ffi::GtkContainer,
212212
) -> glib::ffi::GType {
213213
let instance = &*(ptr as *mut T::Instance);
214-
let imp = instance.impl_();
214+
let imp = instance.imp();
215215
let wrap: Borrowed<Container> = from_glib_borrow(ptr);
216216

217217
imp.child_type(wrap.unsafe_cast_ref()).into_glib()
@@ -222,7 +222,7 @@ unsafe extern "C" fn container_get_path_for_child<T: ContainerImpl>(
222222
wdgtptr: *mut ffi::GtkWidget,
223223
) -> *mut ffi::GtkWidgetPath {
224224
let instance = &*(ptr as *mut T::Instance);
225-
let imp = instance.impl_();
225+
let imp = instance.imp();
226226
let wrap: Borrowed<Container> = from_glib_borrow(ptr);
227227
let widget: Borrowed<Widget> = from_glib_borrow(wdgtptr);
228228

@@ -240,7 +240,7 @@ unsafe extern "C" fn container_forall<T: ObjectSubclass>(
240240
T: ContainerImpl,
241241
{
242242
let instance = &*(ptr as *mut T::Instance);
243-
let imp = instance.impl_();
243+
let imp = instance.imp();
244244
let wrap: Borrowed<Container> = from_glib_borrow(ptr);
245245
let callback = Callback {
246246
callback,

gtk/src/subclass/dialog.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ unsafe impl<T: DialogImpl> IsSubclassable<T> for Dialog {
6666

6767
unsafe extern "C" fn dialog_response<T: DialogImpl>(ptr: *mut ffi::GtkDialog, responseptr: i32) {
6868
let instance = &*(ptr as *mut T::Instance);
69-
let imp = instance.impl_();
69+
let imp = instance.imp();
7070
let wrap: Borrowed<Dialog> = from_glib_borrow(ptr);
7171
let res: ResponseType = from_glib(responseptr);
7272

@@ -75,7 +75,7 @@ unsafe extern "C" fn dialog_response<T: DialogImpl>(ptr: *mut ffi::GtkDialog, re
7575

7676
unsafe extern "C" fn dialog_close<T: DialogImpl>(ptr: *mut ffi::GtkDialog) {
7777
let instance = &*(ptr as *mut T::Instance);
78-
let imp = instance.impl_();
78+
let imp = instance.imp();
7979
let wrap: Borrowed<Dialog> = from_glib_borrow(ptr);
8080

8181
imp.close(wrap.unsafe_cast_ref())

gtk/src/subclass/icon_view.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ unsafe extern "C" fn icon_view_item_activated<T: IconViewImpl>(
168168
path: *mut ffi::GtkTreePath,
169169
) {
170170
let instance = &*(ptr as *mut T::Instance);
171-
let imp = instance.impl_();
171+
let imp = instance.imp();
172172
let wrap: Borrowed<IconView> = from_glib_borrow(ptr);
173173
let path = from_glib_borrow(path);
174174

@@ -177,39 +177,39 @@ unsafe extern "C" fn icon_view_item_activated<T: IconViewImpl>(
177177

178178
unsafe extern "C" fn icon_view_selection_changed<T: IconViewImpl>(ptr: *mut ffi::GtkIconView) {
179179
let instance = &*(ptr as *mut T::Instance);
180-
let imp = instance.impl_();
180+
let imp = instance.imp();
181181
let wrap: Borrowed<IconView> = from_glib_borrow(ptr);
182182

183183
imp.selection_changed(wrap.unsafe_cast_ref())
184184
}
185185

186186
unsafe extern "C" fn icon_view_select_all<T: IconViewImpl>(ptr: *mut ffi::GtkIconView) {
187187
let instance = &*(ptr as *mut T::Instance);
188-
let imp = instance.impl_();
188+
let imp = instance.imp();
189189
let wrap: Borrowed<IconView> = from_glib_borrow(ptr);
190190

191191
imp.select_all(wrap.unsafe_cast_ref())
192192
}
193193

194194
unsafe extern "C" fn icon_view_unselect_all<T: IconViewImpl>(ptr: *mut ffi::GtkIconView) {
195195
let instance = &*(ptr as *mut T::Instance);
196-
let imp = instance.impl_();
196+
let imp = instance.imp();
197197
let wrap: Borrowed<IconView> = from_glib_borrow(ptr);
198198

199199
imp.unselect_all(wrap.unsafe_cast_ref())
200200
}
201201

202202
unsafe extern "C" fn icon_view_select_cursor_item<T: IconViewImpl>(ptr: *mut ffi::GtkIconView) {
203203
let instance = &*(ptr as *mut T::Instance);
204-
let imp = instance.impl_();
204+
let imp = instance.imp();
205205
let wrap: Borrowed<IconView> = from_glib_borrow(ptr);
206206

207207
imp.select_cursor_item(wrap.unsafe_cast_ref())
208208
}
209209

210210
unsafe extern "C" fn icon_view_toggle_cursor_item<T: IconViewImpl>(ptr: *mut ffi::GtkIconView) {
211211
let instance = &*(ptr as *mut T::Instance);
212-
let imp = instance.impl_();
212+
let imp = instance.imp();
213213
let wrap: Borrowed<IconView> = from_glib_borrow(ptr);
214214

215215
imp.toggle_cursor_item(wrap.unsafe_cast_ref())
@@ -221,7 +221,7 @@ unsafe extern "C" fn icon_view_move_cursor<T: IconViewImpl>(
221221
count: c_int,
222222
) -> glib::ffi::gboolean {
223223
let instance = &*(ptr as *mut T::Instance);
224-
let imp = instance.impl_();
224+
let imp = instance.imp();
225225
let wrap: Borrowed<IconView> = from_glib_borrow(ptr);
226226

227227
imp.move_cursor(wrap.unsafe_cast_ref(), from_glib(step), count)
@@ -232,7 +232,7 @@ unsafe extern "C" fn icon_view_activate_cursor_item<T: IconViewImpl>(
232232
ptr: *mut ffi::GtkIconView,
233233
) -> glib::ffi::gboolean {
234234
let instance = &*(ptr as *mut T::Instance);
235-
let imp = instance.impl_();
235+
let imp = instance.imp();
236236
let wrap: Borrowed<IconView> = from_glib_borrow(ptr);
237237

238238
imp.activate_cursor_item(wrap.unsafe_cast_ref()).into_glib()

0 commit comments

Comments
 (0)