I'm just getting started with gtk,anyone knows what this means?
GTK_WINDOW(window)->allow_shrink = TRUE;
I'm just getting started with gtk,anyone knows what this means?
GTK_WINDOW(window)->allow_shrink = TRUE;
If TRUE, the window has no mimimum size. Setting this to TRUE is 99% of the time a bad idea.
Default value: FALSE
If allow_shrink is TRUE, the user can shrink the window so that its children do not receive their full size request; this is basically a bad thing, because most widgets will look wrong if this happens. Furthermore GTK+ has a tendency to re-expand the window if size is recalculated for any reason. The upshot is that allow_shrink should always be set to FALSE.
It means the user can resize the window to smaller dimensions than were specified on creation of the window. GTK+ has an excellent reference, a quick search is all you need.
According to the GTK docs, something you shouldn't do:
If allow_shrink is TRUE, the user can shrink the window so that its children do not receive their full size request; this is basically a bad thing, because most widgets will look wrong if this happens. Furthermore GTK+ has a tendency to re-expand the window if size is recalculated for any reason. The upshot is that allow_shrink should always be set to FALSE.
See this page for more info.
If you are referring to the GTK_WINDOW(window)
part, then I imagine it is casting/adjusting the pointer to obtain a pointer to a struct
type for a window object that contains a variable called allow_shrink
.