summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2024-03-24 18:19:19 +0100
committerStephan Bergmann <stephan.bergmann@allotropia.de>2024-03-24 23:14:06 +0100
commit0c29c417ef3f0b749042e5a461abae9c36cf655b (patch)
treeb033dad644566ebcfcd6ac93106f4ccbb920c0d5
parentdae7304df68493afcf6e9c9e490d65ea20d8211f (diff)
Avoid -Werror,-Wcast-function-type-mismatch
Change-Id: I12014c46bf4a22232c8739166effc42756e97dce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165252 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
-rw-r--r--vcl/unx/gtk3/a11y/atkaction.cxx3
-rw-r--r--vcl/unx/gtk3/a11y/atkcomponent.cxx3
-rw-r--r--vcl/unx/gtk3/a11y/atkeditabletext.cxx3
-rw-r--r--vcl/unx/gtk3/a11y/atkfactory.cxx10
-rw-r--r--vcl/unx/gtk3/a11y/atkhypertext.cxx10
-rw-r--r--vcl/unx/gtk3/a11y/atkimage.cxx3
-rw-r--r--vcl/unx/gtk3/a11y/atkselection.cxx3
-rw-r--r--vcl/unx/gtk3/a11y/atktable.cxx3
-rw-r--r--vcl/unx/gtk3/a11y/atktablecell.cxx3
-rw-r--r--vcl/unx/gtk3/a11y/atktext.cxx3
-rw-r--r--vcl/unx/gtk3/a11y/atkvalue.cxx3
-rw-r--r--vcl/unx/gtk3/a11y/atkwrapper.cxx25
-rw-r--r--vcl/unx/gtk3/a11y/atkwrapper.hxx20
-rw-r--r--vcl/unx/gtk3/gtkframe.cxx17
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx5
-rw-r--r--vcl/unx/gtk4/a11y.cxx13
-rw-r--r--vcl/unx/gtk4/gtkaccessibletext.cxx3
-rw-r--r--vcl/unx/gtk4/gtkaccessibletext.hxx2
18 files changed, 77 insertions, 55 deletions
diff --git a/vcl/unx/gtk3/a11y/atkaction.cxx b/vcl/unx/gtk3/a11y/atkaction.cxx
index 0a39d3bdf98e..09db51556936 100644
--- a/vcl/unx/gtk3/a11y/atkaction.cxx
+++ b/vcl/unx/gtk3/a11y/atkaction.cxx
@@ -253,8 +253,9 @@ action_wrapper_set_description (AtkAction *, gint, const gchar *)
} // extern "C"
void
-actionIfaceInit (AtkActionIface *iface)
+actionIfaceInit (gpointer iface_, gpointer)
{
+ auto const iface = static_cast<AtkActionIface *>(iface_);
g_return_if_fail (iface != nullptr);
iface->do_action = action_wrapper_do_action;
diff --git a/vcl/unx/gtk3/a11y/atkcomponent.cxx b/vcl/unx/gtk3/a11y/atkcomponent.cxx
index 154f0117f1bc..9b5bb2f6edfb 100644
--- a/vcl/unx/gtk3/a11y/atkcomponent.cxx
+++ b/vcl/unx/gtk3/a11y/atkcomponent.cxx
@@ -409,8 +409,9 @@ component_wrapper_remove_focus_handler (AtkComponent *component,
} // extern "C"
void
-componentIfaceInit (AtkComponentIface *iface)
+componentIfaceInit (gpointer iface_, gpointer)
{
+ auto const iface = static_cast<AtkComponentIface *>(iface_);
g_return_if_fail (iface != nullptr);
iface->add_focus_handler = component_wrapper_add_focus_handler;
diff --git a/vcl/unx/gtk3/a11y/atkeditabletext.cxx b/vcl/unx/gtk3/a11y/atkeditabletext.cxx
index f240c32324c6..51c015e7ce16 100644
--- a/vcl/unx/gtk3/a11y/atkeditabletext.cxx
+++ b/vcl/unx/gtk3/a11y/atkeditabletext.cxx
@@ -177,8 +177,9 @@ editable_text_wrapper_copy_text( AtkEditableText *text,
} // extern "C"
void
-editableTextIfaceInit (AtkEditableTextIface *iface)
+editableTextIfaceInit (gpointer iface_, gpointer)
{
+ auto const iface = static_cast<AtkEditableTextIface *>(iface_);
g_return_if_fail (iface != nullptr);
iface->set_text_contents = editable_text_wrapper_set_text_contents;
diff --git a/vcl/unx/gtk3/a11y/atkfactory.cxx b/vcl/unx/gtk3/a11y/atkfactory.cxx
index 2fc407b7bc06..bb19eb8cea8d 100644
--- a/vcl/unx/gtk3/a11y/atkfactory.cxx
+++ b/vcl/unx/gtk3/a11y/atkfactory.cxx
@@ -42,8 +42,9 @@ noop_wrapper_ref_state_set( AtkObject * )
}
static void
-atk_noop_object_wrapper_class_init(AtkNoOpObjectClass *klass)
+atk_noop_object_wrapper_class_init(gpointer klass_, gpointer)
{
+ auto const klass = static_cast<AtkNoOpObjectClass *>(klass_);
AtkObjectClass *atk_class = ATK_OBJECT_CLASS( klass );
atk_class->ref_state_set = noop_wrapper_ref_state_set;
}
@@ -60,7 +61,7 @@ atk_noop_object_wrapper_get_type()
sizeof (AtkNoOpObjectClass),
nullptr,
nullptr,
- reinterpret_cast<GClassInitFunc>(atk_noop_object_wrapper_class_init),
+ atk_noop_object_wrapper_class_init,
nullptr,
nullptr,
sizeof (AtkObjectWrapper),
@@ -154,8 +155,9 @@ AtkObject* ooo_fixed_get_accessible(GtkWidget *obj)
}
static void
-wrapper_factory_class_init( AtkObjectFactoryClass *klass )
+wrapper_factory_class_init( gpointer klass_, gpointer )
{
+ auto const klass = static_cast<AtkObjectFactoryClass *>(klass_);
klass->create_accessible = wrapper_factory_create_accessible;
klass->get_accessible_type = wrapper_factory_get_accessible_type;
}
@@ -169,7 +171,7 @@ wrapper_factory_get_type()
static const GTypeInfo tinfo =
{
sizeof (AtkObjectFactoryClass),
- nullptr, nullptr, reinterpret_cast<GClassInitFunc>(wrapper_factory_class_init),
+ nullptr, nullptr, wrapper_factory_class_init,
nullptr, nullptr, sizeof (AtkObjectFactory), 0, nullptr, nullptr
};
diff --git a/vcl/unx/gtk3/a11y/atkhypertext.cxx b/vcl/unx/gtk3/a11y/atkhypertext.cxx
index 83f6817fc9e2..c7f9b84b5550 100644
--- a/vcl/unx/gtk3/a11y/atkhypertext.cxx
+++ b/vcl/unx/gtk3/a11y/atkhypertext.cxx
@@ -131,8 +131,9 @@ hyper_link_is_selected_link( AtkHyperlink * )
}
static void
-hyper_link_class_init (AtkHyperlinkClass *klass)
+hyper_link_class_init (gpointer klass_, gpointer)
{
+ auto const klass = static_cast<AtkHyperlinkClass *>(klass_);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = hyper_link_finalize;
@@ -159,7 +160,7 @@ hyper_link_get_type()
sizeof (AtkHyperlinkClass),
nullptr, /* base init */
nullptr, /* base finalize */
- reinterpret_cast<GClassInitFunc>(hyper_link_class_init),
+ hyper_link_class_init,
nullptr, /* class finalize */
nullptr, /* class data */
sizeof (HyperLink), /* instance size */
@@ -169,7 +170,7 @@ hyper_link_get_type()
};
static const GInterfaceInfo atk_action_info = {
- reinterpret_cast<GInterfaceInitFunc>(actionIfaceInit),
+ actionIfaceInit,
nullptr,
nullptr
};
@@ -265,8 +266,9 @@ hypertext_get_link_index( AtkHypertext *hypertext,
} // extern "C"
void
-hypertextIfaceInit (AtkHypertextIface *iface)
+hypertextIfaceInit (gpointer iface_, gpointer)
{
+ auto const iface = static_cast<AtkHypertextIface *>(iface_);
g_return_if_fail (iface != nullptr);
iface->get_link = hypertext_get_link;
diff --git a/vcl/unx/gtk3/a11y/atkimage.cxx b/vcl/unx/gtk3/a11y/atkimage.cxx
index da4965b86828..a9af56f9cdc9 100644
--- a/vcl/unx/gtk3/a11y/atkimage.cxx
+++ b/vcl/unx/gtk3/a11y/atkimage.cxx
@@ -122,8 +122,9 @@ image_set_image_description( AtkImage *, const gchar * )
} // extern "C"
void
-imageIfaceInit (AtkImageIface *iface)
+imageIfaceInit (gpointer iface_, gpointer)
{
+ auto const iface = static_cast<AtkImageIface *>(iface_);
g_return_if_fail (iface != nullptr);
iface->set_image_description = image_set_image_description;
diff --git a/vcl/unx/gtk3/a11y/atkselection.cxx b/vcl/unx/gtk3/a11y/atkselection.cxx
index 0e74f1c295f4..511bfe506abb 100644
--- a/vcl/unx/gtk3/a11y/atkselection.cxx
+++ b/vcl/unx/gtk3/a11y/atkselection.cxx
@@ -190,8 +190,9 @@ selection_select_all_selection( AtkSelection *selection)
} // extern "C"
void
-selectionIfaceInit( AtkSelectionIface *iface)
+selectionIfaceInit( gpointer iface_, gpointer)
{
+ auto const iface = static_cast<AtkSelectionIface *>(iface_);
g_return_if_fail (iface != nullptr);
iface->add_selection = selection_add_selection;
diff --git a/vcl/unx/gtk3/a11y/atktable.cxx b/vcl/unx/gtk3/a11y/atktable.cxx
index 021f3c19c42c..d037591b48dd 100644
--- a/vcl/unx/gtk3/a11y/atktable.cxx
+++ b/vcl/unx/gtk3/a11y/atktable.cxx
@@ -609,8 +609,9 @@ table_wrapper_set_summary( AtkTable *, AtkObject * )
} // extern "C"
void
-tableIfaceInit (AtkTableIface *iface)
+tableIfaceInit (gpointer iface_, gpointer)
{
+ auto const iface = static_cast<AtkTableIface *>(iface_);
g_return_if_fail (iface != nullptr);
iface->ref_at = table_wrapper_ref_at;
diff --git a/vcl/unx/gtk3/a11y/atktablecell.cxx b/vcl/unx/gtk3/a11y/atktablecell.cxx
index 35d681b0628c..acdb64ef9031 100644
--- a/vcl/unx/gtk3/a11y/atktablecell.cxx
+++ b/vcl/unx/gtk3/a11y/atktablecell.cxx
@@ -253,8 +253,9 @@ static AtkObject* tablecell_wrapper_get_table(AtkTableCell* cell)
} // extern "C"
-void tablecellIfaceInit(AtkTableCellIface* iface)
+void tablecellIfaceInit(gpointer iface_, gpointer)
{
+ auto const iface = static_cast<AtkTableCellIface*>(iface_);
g_return_if_fail(iface != nullptr);
iface->get_column_span = tablecell_wrapper_get_column_span;
diff --git a/vcl/unx/gtk3/a11y/atktext.cxx b/vcl/unx/gtk3/a11y/atktext.cxx
index 8b1ab674227d..b140232055d3 100644
--- a/vcl/unx/gtk3/a11y/atktext.cxx
+++ b/vcl/unx/gtk3/a11y/atktext.cxx
@@ -852,8 +852,9 @@ text_wrapper_scroll_substring_to(AtkText *text,
} // extern "C"
void
-textIfaceInit (AtkTextIface *iface)
+textIfaceInit (gpointer iface_, gpointer)
{
+ auto const iface = static_cast<AtkTextIface *>(iface_);
g_return_if_fail (iface != nullptr);
iface->get_text = text_wrapper_get_text;
diff --git a/vcl/unx/gtk3/a11y/atkvalue.cxx b/vcl/unx/gtk3/a11y/atkvalue.cxx
index 014164da2027..545b1e082309 100644
--- a/vcl/unx/gtk3/a11y/atkvalue.cxx
+++ b/vcl/unx/gtk3/a11y/atkvalue.cxx
@@ -141,8 +141,9 @@ value_wrapper_set_current_value( AtkValue *value,
} // extern "C"
void
-valueIfaceInit (AtkValueIface *iface)
+valueIfaceInit (gpointer iface_, gpointer)
{
+ auto const iface = static_cast<AtkValueIface *>(iface_);
g_return_if_fail (iface != nullptr);
iface->get_current_value = value_wrapper_get_current_value;
diff --git a/vcl/unx/gtk3/a11y/atkwrapper.cxx b/vcl/unx/gtk3/a11y/atkwrapper.cxx
index c946a6e3daaf..757e56cdc434 100644
--- a/vcl/unx/gtk3/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk3/a11y/atkwrapper.cxx
@@ -684,8 +684,9 @@ atk_object_wrapper_finalize (GObject *obj)
}
static void
-atk_object_wrapper_class_init (AtkObjectWrapperClass *klass)
+atk_object_wrapper_class_init (gpointer klass_, gpointer)
{
+ auto const klass = static_cast<AtkObjectWrapperClass *>(klass_);
GObjectClass *gobject_class = G_OBJECT_CLASS( klass );
AtkObjectClass *atk_class = ATK_OBJECT_CLASS( klass );
@@ -744,7 +745,7 @@ atk_object_wrapper_get_type()
sizeof (AtkObjectWrapperClass),
nullptr,
nullptr,
- reinterpret_cast<GClassInitFunc>(atk_object_wrapper_class_init),
+ atk_object_wrapper_class_init,
nullptr,
nullptr,
sizeof (AtkObjectWrapper),
@@ -824,53 +825,53 @@ const struct {
} aTypeTable[] = {
// re-location heaven:
{
- "Comp", reinterpret_cast<GInterfaceInitFunc>(componentIfaceInit),
+ "Comp", componentIfaceInit,
atk_component_get_type,
cppu::UnoType<accessibility::XAccessibleComponent>::get
},
{
- "Act", reinterpret_cast<GInterfaceInitFunc>(actionIfaceInit),
+ "Act", actionIfaceInit,
atk_action_get_type,
cppu::UnoType<accessibility::XAccessibleAction>::get
},
{
- "Txt", reinterpret_cast<GInterfaceInitFunc>(textIfaceInit),
+ "Txt", textIfaceInit,
atk_text_get_type,
cppu::UnoType<accessibility::XAccessibleText>::get
},
{
- "Val", reinterpret_cast<GInterfaceInitFunc>(valueIfaceInit),
+ "Val", valueIfaceInit,
atk_value_get_type,
cppu::UnoType<accessibility::XAccessibleValue>::get
},
{
- "Tab", reinterpret_cast<GInterfaceInitFunc>(tableIfaceInit),
+ "Tab", tableIfaceInit,
atk_table_get_type,
cppu::UnoType<accessibility::XAccessibleTable>::get
},
{
- "Cell", reinterpret_cast<GInterfaceInitFunc>(tablecellIfaceInit),
+ "Cell", tablecellIfaceInit,
atk_table_cell_get_type,
// there is no UNO a11y interface for table cells, so this case is handled separately below
nullptr
},
{
- "Edt", reinterpret_cast<GInterfaceInitFunc>(editableTextIfaceInit),
+ "Edt", editableTextIfaceInit,
atk_editable_text_get_type,
cppu::UnoType<accessibility::XAccessibleEditableText>::get
},
{
- "Img", reinterpret_cast<GInterfaceInitFunc>(imageIfaceInit),
+ "Img", imageIfaceInit,
atk_image_get_type,
cppu::UnoType<accessibility::XAccessibleImage>::get
},
{
- "Hyp", reinterpret_cast<GInterfaceInitFunc>(hypertextIfaceInit),
+ "Hyp", hypertextIfaceInit,
atk_hypertext_get_type,
cppu::UnoType<accessibility::XAccessibleHypertext>::get
},
{
- "Sel", reinterpret_cast<GInterfaceInitFunc>(selectionIfaceInit),
+ "Sel", selectionIfaceInit,
atk_selection_get_type,
cppu::UnoType<accessibility::XAccessibleSelection>::get
}
diff --git a/vcl/unx/gtk3/a11y/atkwrapper.hxx b/vcl/unx/gtk3/a11y/atkwrapper.hxx
index 8d1aeb359bca..b3af41975b4d 100644
--- a/vcl/unx/gtk3/a11y/atkwrapper.hxx
+++ b/vcl/unx/gtk3/a11y/atkwrapper.hxx
@@ -101,16 +101,16 @@ AtkStateType mapAtkState( sal_Int64 nState );
AtkRelation* atk_object_wrapper_relation_new(const css::accessibility::AccessibleRelation& rRelation);
-void actionIfaceInit(AtkActionIface *iface);
-void componentIfaceInit(AtkComponentIface *iface);
-void editableTextIfaceInit(AtkEditableTextIface *iface);
-void hypertextIfaceInit(AtkHypertextIface *iface);
-void imageIfaceInit(AtkImageIface *iface);
-void selectionIfaceInit(AtkSelectionIface *iface);
-void tableIfaceInit(AtkTableIface *iface);
-void tablecellIfaceInit(AtkTableCellIface *iface);
-void textIfaceInit(AtkTextIface *iface);
-void valueIfaceInit(AtkValueIface *iface);
+void actionIfaceInit(gpointer iface_, gpointer);
+void componentIfaceInit(gpointer iface_, gpointer);
+void editableTextIfaceInit(gpointer iface_, gpointer);
+void hypertextIfaceInit(gpointer iface_, gpointer);
+void imageIfaceInit(gpointer iface_, gpointer);
+void selectionIfaceInit(gpointer iface_, gpointer);
+void tableIfaceInit(gpointer iface_, gpointer);
+void tablecellIfaceInit(gpointer iface_, gpointer);
+void textIfaceInit(gpointer iface_, gpointer);
+void valueIfaceInit(gpointer iface_, gpointer);
} // extern "C"
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 8bbc5354fb56..f44abeeeb78b 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -879,8 +879,9 @@ ooo_fixed_get_preferred_width(GtkWidget*, gint *minimum, gint *natural)
}
static void
-ooo_fixed_class_init(GtkFixedClass *klass)
+ooo_fixed_class_init(gpointer klass_, gpointer)
{
+ auto const klass = static_cast<GtkFixedClass *>(klass_);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
widget_class->get_accessible = ooo_fixed_get_accessible;
widget_class->get_preferred_height = ooo_fixed_get_preferred_height;
@@ -904,7 +905,7 @@ ooo_fixed_get_type()
sizeof (GtkFixedClass),
nullptr, /* base init */
nullptr, /* base finalize */
- reinterpret_cast<GClassInitFunc>(ooo_fixed_class_init), /* class init */
+ ooo_fixed_class_init, /* class init */
nullptr, /* class finalize */
nullptr, /* class data */
sizeof (GtkFixed), /* instance size */
@@ -950,6 +951,10 @@ static void damaged(void *handle,
pThis->damaged(nExtentsX, nExtentsY, nExtentsWidth, nExtentsHeight);
}
+#if !GTK_CHECK_VERSION(4,0,0)
+static void notifyUnref(gpointer data, GObject *) { g_object_unref(data); }
+#endif
+
void GtkSalFrame::InitCommon()
{
m_pSurface = nullptr;
@@ -1062,7 +1067,7 @@ void GtkSalFrame::InitCommon()
gtk_widget_add_controller(pEventWidget, GTK_EVENT_CONTROLLER(pZoomGesture));
#else
GtkGesture* pZoomGesture = gtk_gesture_zoom_new(GTK_WIDGET(pEventWidget));
- g_object_weak_ref(G_OBJECT(pEventWidget), reinterpret_cast<GWeakNotify>(g_object_unref), pZoomGesture);
+ g_object_weak_ref(G_OBJECT(pEventWidget), notifyUnref, pZoomGesture);
#endif
gtk_event_controller_set_propagation_phase(GTK_EVENT_CONTROLLER(pZoomGesture),
GTK_PHASE_TARGET);
@@ -1077,7 +1082,7 @@ void GtkSalFrame::InitCommon()
gtk_widget_add_controller(pEventWidget, GTK_EVENT_CONTROLLER(pRotateGesture));
#else
GtkGesture* pRotateGesture = gtk_gesture_rotate_new(GTK_WIDGET(pEventWidget));
- g_object_weak_ref(G_OBJECT(pEventWidget), reinterpret_cast<GWeakNotify>(g_object_unref), pRotateGesture);
+ g_object_weak_ref(G_OBJECT(pEventWidget), notifyUnref, pRotateGesture);
#endif
gtk_event_controller_set_propagation_phase(GTK_EVENT_CONTROLLER(pRotateGesture),
GTK_PHASE_TARGET);
@@ -1122,7 +1127,7 @@ void GtkSalFrame::InitCommon()
#if !GTK_CHECK_VERSION(4,0,0)
GtkGesture *pSwipe = gtk_gesture_swipe_new(pEventWidget);
- g_object_weak_ref(G_OBJECT(pEventWidget), reinterpret_cast<GWeakNotify>(g_object_unref), pSwipe);
+ g_object_weak_ref(G_OBJECT(pEventWidget), notifyUnref, pSwipe);
#else
GtkGesture *pSwipe = gtk_gesture_swipe_new();
gtk_widget_add_controller(pEventWidget, GTK_EVENT_CONTROLLER(pSwipe));
@@ -1132,7 +1137,7 @@ void GtkSalFrame::InitCommon()
#if !GTK_CHECK_VERSION(4,0,0)
GtkGesture *pLongPress = gtk_gesture_long_press_new(pEventWidget);
- g_object_weak_ref(G_OBJECT(pEventWidget), reinterpret_cast<GWeakNotify>(g_object_unref), pLongPress);
+ g_object_weak_ref(G_OBJECT(pEventWidget), notifyUnref, pLongPress);
#else
GtkGesture *pLongPress = gtk_gesture_long_press_new();
gtk_widget_add_controller(pEventWidget, GTK_EVENT_CONTROLLER(pLongPress));
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 7e0fa2fa5612..495e403d711a 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -8005,8 +8005,9 @@ immobilized_viewport_finalize(GObject* object)
G_OBJECT_CLASS(immobilized_viewport_parent_class)->finalize(object);
}
-static void immobilized_viewport_class_init(GtkWidgetClass* klass)
+static void immobilized_viewport_class_init(gpointer klass_, gpointer)
{
+ auto const klass = static_cast<GtkWidgetClass*>(klass_);
immobilized_viewport_parent_class = g_type_class_peek_parent(klass);
GObjectClass* o_class = G_OBJECT_CLASS(klass);
@@ -8037,7 +8038,7 @@ GType immobilized_viewport_get_type()
static_cast<guint16>(query.class_size),
nullptr, /* base init */
nullptr, /* base finalize */
- reinterpret_cast<GClassInitFunc>(immobilized_viewport_class_init), /* class init */
+ immobilized_viewport_class_init, /* class init */
nullptr, /* class finalize */
nullptr, /* class data */
static_cast<guint16>(query.instance_size), /* instance size */
diff --git a/vcl/unx/gtk4/a11y.cxx b/vcl/unx/gtk4/a11y.cxx
index bfb6e38b0038..184f6f3be95a 100644
--- a/vcl/unx/gtk4/a11y.cxx
+++ b/vcl/unx/gtk4/a11y.cxx
@@ -397,7 +397,7 @@ struct LoAccessibleClass
};
#if GTK_CHECK_VERSION(4, 10, 0)
-static void lo_accessible_range_init(GtkAccessibleRangeInterface* iface);
+static void lo_accessible_range_init(gpointer iface_, gpointer);
static gboolean lo_accessible_range_set_current_value(GtkAccessibleRange* self, double fNewValue);
#endif
@@ -412,12 +412,12 @@ const struct
const css::uno::Type& (*aGetUnoType)();
} TYPE_TABLE[] = {
#if GTK_CHECK_VERSION(4, 14, 0)
- { "Text", reinterpret_cast<GInterfaceInitFunc>(lo_accessible_text_init),
- gtk_accessible_text_get_type, cppu::UnoType<css::accessibility::XAccessibleText>::get },
+ { "Text", lo_accessible_text_init, gtk_accessible_text_get_type,
+ cppu::UnoType<css::accessibility::XAccessibleText>::get },
#endif
#if GTK_CHECK_VERSION(4, 10, 0)
- { "Value", reinterpret_cast<GInterfaceInitFunc>(lo_accessible_range_init),
- gtk_accessible_range_get_type, cppu::UnoType<css::accessibility::XAccessibleValue>::get },
+ { "Value", lo_accessible_range_init, gtk_accessible_range_get_type,
+ cppu::UnoType<css::accessibility::XAccessibleValue>::get },
#endif
};
@@ -562,8 +562,9 @@ static void lo_accessible_accessible_init(GtkAccessibleInterface* iface)
}
#if GTK_CHECK_VERSION(4, 10, 0)
-static void lo_accessible_range_init(GtkAccessibleRangeInterface* iface)
+static void lo_accessible_range_init(gpointer iface_, gpointer)
{
+ auto const iface = static_cast<GtkAccessibleRangeInterface*>(iface_);
iface->set_current_value = lo_accessible_range_set_current_value;
}
#endif
diff --git a/vcl/unx/gtk4/gtkaccessibletext.cxx b/vcl/unx/gtk4/gtkaccessibletext.cxx
index 51091e735327..0dc9b8cd04a9 100644
--- a/vcl/unx/gtk4/gtkaccessibletext.cxx
+++ b/vcl/unx/gtk4/gtkaccessibletext.cxx
@@ -221,8 +221,9 @@ static void lo_accessible_text_get_default_attributes(GtkAccessibleText* self,
convertUnoTextAttributesToGtk(aAttribs, attribute_names, attribute_values);
}
-void lo_accessible_text_init(GtkAccessibleTextInterface* iface)
+void lo_accessible_text_init(gpointer iface_, gpointer)
{
+ auto const iface = static_cast<GtkAccessibleTextInterface*>(iface_);
iface->get_contents = lo_accessible_text_get_contents;
iface->get_contents_at = lo_accessible_text_get_contents_at;
iface->get_caret_position = lo_accessible_text_get_caret_position;
diff --git a/vcl/unx/gtk4/gtkaccessibletext.hxx b/vcl/unx/gtk4/gtkaccessibletext.hxx
index 82acc7db418f..73d1eff2f1f5 100644
--- a/vcl/unx/gtk4/gtkaccessibletext.hxx
+++ b/vcl/unx/gtk4/gtkaccessibletext.hxx
@@ -13,7 +13,7 @@
#if GTK_CHECK_VERSION(4, 14, 0)
-void lo_accessible_text_init(GtkAccessibleTextInterface* iface);
+void lo_accessible_text_init(gpointer iface_, gpointer);
#endif