Package: gtk
Function gtk:init
Lambda Listgtk:init () Details
Call this function before using any other GTK functions in your GUI
applications.
It will initialize everything needed to operate the toolkit. If you are using the gtk:application class, you do not have to call the gtk:init or gtk:init-check functions. The "GApplication::startup" handler does it for you. This function will terminate your program if it was unable to initialize the windowing system for some reason. If you want your program to fall back to a textual interface you want to call the gtk:init-check function instead. GTK calls signal(SIGPIPE, SIG_IGN) during initialization, to ignore SIGPIPE signals, since these are almost never wanted in graphical applications. If you do need to handle SIGPIPE for some reason, reset the handler after the gtk:init call, but notice that other libraries, for example, libdbus or gvfs, might do similar things. | See also |
2024-11-5