g_signal_connect() and G_OBJECT
- From: Ingo Brückl <ib wupperonline de>
- To: gtk-app-devel-list gnome org
- Subject: g_signal_connect() and G_OBJECT
- Date: Fri, 30 Jun 2017 12:20:50 +0200
Hi,
it seems that it was common practice to cast the first argument of
g_signal_connect() to G_OBJECT when I started developing applications with
GTK+ quite a while ago. At least I've learned it that way and am doing it
ever since.
I repeatedly see usage of g_signal_connect() without that cast which seems
to make sense since "instance" only has to be a gpointer and will be checked
G_TYPE_CHECK_INSTANCE at run time.
So I'm just curious. Is/was there a reason for the G_OBJECT cast? Was it
necessary back in the days (when GTK+ 2 took over from GTK+ 1)?
Ingo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]