Frame¶
Functions for working with the position and size of a view.
-
PuglPoint puglGetPositionHint(const PuglView *view, PuglPositionHint hint)¶
Get a position hint for the view.
This can be used to get the default or current position of a view, in screen coordinates with an upper left origin.
-
PuglArea puglGetSizeHint(const PuglView *view, PuglSizeHint hint)¶
Get a size hint for the view.
This can be used to get the default, current, minimum, and maximum size of a view, as well as the supported range of aspect ratios.
-
PuglStatus puglSetPositionHint(PuglView *view, PuglPositionHint hint, int x, int y)¶
Set a position hint for the view.
This can be used to set the default or current position of a view.
This should be called before
puglRealize()so the initial window for the view can be configured correctly. It may also be used dynamically after the window is realized, for some hints.- Returns:
An error code on failure, but always succeeds if the view isn’t yet realized.
-
PuglStatus puglSetSizeHint(PuglView *view, PuglSizeHint hint, unsigned width, unsigned height)¶
Set a size hint for the view.
This can be used to set the default, current, minimum, and maximum size of a view, as well as the supported range of aspect ratios.
This should be called before
puglRealize()so the initial window for the view can be configured correctly. It may also be used dynamically after the window is realized, for some hints.- Returns:
An error code on failure, but always succeeds if the view isn’t yet realized.