Unfortunately your code doesn't work:
- gtk_settings_get_default_() only returns a GtkSettings object if you have opened a window
- You have to initialize your variable to contain the double click value as type GValue and G_TYPE_INT
- g_object_get() and similar functions which require lists terminated with a NULL value don't work in PB, use g_object_get_property() instead
- You have to use g_value_get_int() to obtain the Integer value of the double click time
So finally this is a working example:
Code: Select all
#G_TYPE_INT = 6 << 2
DoubleClickTime.GValue
DoubleClickTime\g_type = #G_TYPE_INT
OpenWindow(0, 200, 100, 200, 170, "Test", #PB_Window_Invisible)
*Settings.GtkSettings = gtk_settings_get_default_()
If *Settings
g_object_get_property_(*Settings, "gtk-double-click-time", @DoubleClickTime)
MessageRequester("Info", "Double click time = " + Str(g_value_get_int_(@DoubleClickTime)) + " ms")
EndIf