It also provides a set of packages to set up idle functions, timeout functions, and functions to be called before and after entering the main loop.
Most programs should not need to call this function.
Compatibility is defined by two things: first the version of the running library is newer than the version required_major.required_minor.required_micro. Second the running library must be binary compatible with the version required_major.required_minor.required_micro (same major version.)
This function is primarily for GTK+ modules; the module can call this function to check that it wasn't loaded into an incompatible version of GTK+. However, such a check isn't completely reliable, since the module may be linked against an old version of GTK+ and calling the old version of gtk_check_version(), but still get loaded into an application using a newer version of GTK+.
Return value: %NULL if the GTK+ library is compatible with the given version, or a string describing the version mismatch.
while Gtk.Main.Events_Pending loop Dead := Gtk.Main.Main_Iteration; end loop;
While you should not call this function directly, you might want to know how exactly events are handled. So here is what this function does with the event: * Compress enter/leave notify events. If the event passed build an enter/leave pair together with the next event (peeked from GDK) both events are thrown away. This is to avoid a backlog of (de-)highlighting widgets crossed by the pointer.
* Find the widget which got the event. If the widget can't be determined the event is thrown away unless it belongs to a INCR transaction. In that case it is passed to gtk_selection_incr_event().
* Then the event is passed on a stack so you can query the currently handled event with gtk_get_current_event().
* The event is sent to a widget. If a grab is active all events for widgets that are not in the container in the grab widget are sent to the latter with a few exceptions: - Deletion and destruction events are still sent to the event widget for obvious reasons. - Events which directly relate to the visual representation of the event widget. - Leave events are delivered to the event widget if there was an enter event delivered to it before without the paired leave event - Drag events are not redirected because it is unclear what the semantics of that would be. - Another point of interest might be that all key events are first passed through the key snooper functions if there are any. Read the description of Key_Snooper_Install if you need this feature.
* After finishing the delivery the event is popped from the event stack.
All that said, you most likely don't want to use any of these functions; synthesizing events is rarely needed. Consider asking on the mailing list for better ways to achieve your goals. For example, use gdk_window_invalidate_rect() or gtk_widget_queue_draw() instead of making up expose events.
See also Gtk.Window.Gtk_Window_Group