I am trying to catch the “get-child-position” of the GtkOverlay and I am not sure if I understand its documentation right.
For this I came with the following callback function:
gboolean pos_callback ( GtkOverlay *overlay, GtkWidget *widget, GdkRectangle *allocation )
{
if ( GTK_IS_OVERLAY( overlay ) )
{
g_print( "Callback\n" );
allocation->height = 100;
allocation->width = 100;
allocation->x = 100;
allocation->y = 100;
g_object_set( widget,
"halign", GTK_ALIGN_END,
"valign", GTK_ALIGN_CENTER,
NULL );
return TRUE;
}
return FALSE;
}
and called from main with:
g_signal_connect_swapped( overlay, "get-child-position", G_CALLBACK( pos_callback ), overlay );
How exactly works this Signal?