📄 gtkmain.sgml
字号:
Analogical to gtk_true() this function does nothing but always returns %FALSE.</para>@Returns: %FALSE<!-- ##### FUNCTION gtk_grab_add ##### --><para>Makes @widget the current grabbed widget. This means that interaction with other widgets in the same application is blocked and mouse as well as keyboard events are delivered to this widget.</para>@widget: The widget that grabs keyboard and pointer events.<!-- ##### FUNCTION gtk_grab_get_current ##### --><para>Queries the current grab of the default window group. </para>@Returns: The widget which currently has the grab or %NULL if no grab is active.<!-- ##### FUNCTION gtk_grab_remove ##### --><para>Removes the grab from the given widget. You have to pair calls to gtk_grab_add()and gtk_grab_remove().</para>@widget: The widget which gives up the grab.<!-- ##### FUNCTION gtk_init_add ##### --><para>Registers a function to be called when the mainloop is started.</para>@function: Function to invoke when gtk_main() is called next.@data: Data to pass to that function.<!-- ##### FUNCTION gtk_quit_add_destroy ##### --><para>Trigger destruction of @object in case the mainloop at level @main_levelis quit.</para>@main_level: Level of the mainloop which shall trigger the destruction.@object: Object to be destroyed.<!-- ##### FUNCTION gtk_quit_add ##### --><para>Registers a function to be called when an instance of the mainloop is left.</para>@main_level: Level at which termination the function shall be called. You can pass 0 here to have the function run at the termination of the current mainloop.@function: The function to call. This should return 0 to be removed from the list of quit handlers. Otherwise the function might be called again.@data: Pointer to pass when calling @function.@Returns: A handle for this quit handler (you need this for gtk_quit_remove()) or 0 if you passed a %NULL pointer in @function.<!-- ##### FUNCTION gtk_quit_add_full ##### --><para>Registers a function to be called when an instance of the mainloop is left.In comparison to gtk_quit_add() this function adds the possibility to pass a marshaller and a function to be called when the quit handler is freed.</para><para>The former can be used to run interpreted code instead of a compiled functionwhile the latter can be used to free the information stored in @data (whileyou can do this in @function as well)... So this function will mostly beused by GTK+ wrappers for languages other than C.</para>@main_level: Level at which termination the function shall be called. You can pass 0 here to have the function run at the termination of the current mainloop.@function: The function to call. This should return 0 to be removed from the list of quit handlers. Otherwise the function might be called again.@marshal: The marshaller to be used. If this is non-%NULL, @function is ignored.@data: Pointer to pass when calling @function.@destroy: Function to call to destruct @data. Gets @data as argument.@Returns: A handle for this quit handler (you need this for gtk_quit_remove()) or 0 if you passed a %NULL pointer in @function.<!-- ##### FUNCTION gtk_quit_remove ##### --><para>Removes a quit handler by its identifier.</para>@quit_handler_id: Identifier for the handler returned when installing it.<!-- ##### FUNCTION gtk_quit_remove_by_data ##### --><para>Removes a quit handler identified by its @data field.</para>@data: The pointer passed as @data to gtk_quit_add() or gtk_quit_add_full().<!-- ##### FUNCTION gtk_timeout_add_full ##### --><para>Registers a function to be called periodically. The function will be calledrepeatedly after @interval milliseconds until it returns %FALSE at which point the timeout is destroyed and will not be called again.</para>@interval: The time between calls to the function, in milliseconds (1/1000ths of a second.)@function: The function to call periodically.@marshal: The marshaller to use instead of the function (if non-%NULL).@data: The data to pass to the function.@destroy: Function to call when the timeout is destroyed or %NULL.@Returns: A unique id for the event source.@Deprecated: 2.4: Use g_timeout_add_full() instead.<!-- ##### FUNCTION gtk_timeout_add ##### --><para>Registers a function to be called periodically. The function will be calledrepeatedly after @interval milliseconds until it returns %FALSE at which point the timeout is destroyed and will not be called again.</para>@interval: The time between calls to the function, in milliseconds (1/1000ths of a second.)@function: The function to call periodically.@data: The data to pass to the function.@Returns: A unique id for the event source.@Deprecated: 2.4: Use g_timeout_add() instead.<!-- ##### FUNCTION gtk_timeout_remove ##### --><para>Removes the given timeout destroying all information about it.</para>@timeout_handler_id: The identifier returned when installing the timeout.@Deprecated: 2.4: Use g_source_remove() instead.<!-- ##### FUNCTION gtk_idle_add ##### --><para>Causes the mainloop to call the given function whenever no events with higher priority are to be processed. The default priority is %GTK_PRIORITY_DEFAULT, which is rather low.</para>@function: The function to call.@data: The information to pass to the function.@Returns: a unique handle for this registration.@Deprecated: 2.4: Use g_idle_add() instead.<!-- ##### FUNCTION gtk_idle_add_priority ##### --><para>Like gtk_idle_add() this function allows you to have a function calledwhen the event loop is idle. The difference is that you can give a priority different from %GTK_PRIORITY_DEFAULT to the idle function.</para>@priority: The priority which should not be above %G_PRIORITY_HIGH_IDLE.Note that you will interfere with GTK+ if you use a priority above%GTK_PRIORITY_RESIZE.@function: The function to call.@data: Data to pass to that function.@Returns: A unique id for the event source.@Deprecated: 2.4: Use g_idle_add_full() instead.<!-- ##### FUNCTION gtk_idle_add_full ##### --><para>Like gtk_idle_add() this function allows you to have a function calledwhen the event loop is idle. The difference is that you can give a priority different from %GTK_PRIORITY_DEFAULT to the idle function.</para>@priority: The priority which should not be above %G_PRIORITY_HIGH_IDLE.Note that you will interfere with GTK+ if you use a priority above%GTK_PRIORITY_RESIZE.@function: The function to call.@marshal: The marshaller to use instead of the function (if non-%NULL).@data: Data to pass to that function.@destroy: Function to call when the timeout is destroyed or %NULL.@Returns: A unique id for the event source.@Deprecated: 2.4: Use g_idle_add_full() instead.<!-- ##### FUNCTION gtk_idle_remove ##### --><para>Removes the idle function with the given id.</para>@idle_handler_id: Identifies the idle function to remove.@Deprecated: 2.4: Use g_source_remove() instead.<!-- ##### FUNCTION gtk_idle_remove_by_data ##### --><para>Removes the idle function identified by the user data.</para>@data: remove the idle function which was registered with this user data.@Deprecated: 2.4: Use g_idle_remove_by_data() instead.<!-- ##### FUNCTION gtk_input_add_full ##### --><para>Registers a function to be called when a condition becomes true on a file descriptor.</para>@source: a file descriptor.@condition: the condition.@function: The function to call.@marshal: The marshaller to use instead of the function (if non-%NULL).@data: callback data passed to @function.@destroy: callback function to call with @data when the input handler is removed, or %NULL.@Returns: A unique id for the event source; to be used with gtk_input_remove().@Deprecated: 2.4: Use g_io_add_watch_full() instead.<!-- ##### FUNCTION gtk_input_remove ##### --><para>Removes the function with the given id.</para>@input_handler_id: Identifies the function to remove.@Deprecated: 2.4: Use g_source_remove() instead.<!-- ##### MACRO GTK_PRIORITY_REDRAW ##### --><para>Use this priority for redrawing related stuff. It is used internally byGTK+ to do pending redraws. This priority is lower than %GTK_PRIORITY_RESIZEto avoid redrawing a widget just before resizing (and therefore redrawingit again).</para>@Deprecated: 2.4: This macro is deprecated. You should use %GDK_PRIORITY_REDRAW instead.<!-- ##### MACRO GTK_PRIORITY_RESIZE ##### --><para>Use this priority for resizing related stuff. It is used internally byGTK+ to compute the sizes of widgets. This priority is higher than %GTK_PRIORITY_REDRAW to avoid resizing a widget which was just redrawn.</para><!-- ##### MACRO GTK_PRIORITY_HIGH ##### --><para>Use this for high priority timeouts. This priority is never used insideGTK+ so everything running at this priority will be running before anythinginside the toolkit.</para>@Deprecated: 2.4: This macro is deprecated. You should use %G_PRIORITY_HIGH instead.<!-- ##### MACRO GTK_PRIORITY_INTERNAL ##### --><para>This priority is for GTK+ internal stuff. Don't use it in your applications.</para><!-- ##### MACRO GTK_PRIORITY_DEFAULT ##### --><para>Default priority for idle functions.</para>@Deprecated: 2.4: This macro is deprecated. You should use %G_PRIORITY_DEFAULT_IDLE instead.<!-- ##### MACRO GTK_PRIORITY_LOW ##### --><para>Priority for very unimportant background tasks.</para>@Deprecated: 2.4: This macro is deprecated. You should use %G_PRIORITY_LOW instead.<!-- ##### FUNCTION gtk_key_snooper_install ##### --><para>Installs a key snooper function, which will get called on all key eventsbefore delivering them normally.</para>@snooper: a #GtkKeySnoopFunc.@func_data: data to pass to @snooper.@Returns: a unique id for this key snooper for use with gtk_key_snooper_remove().<!-- ##### USER_FUNCTION GtkKeySnoopFunc ##### --><para>Key snooper functions are called before normal event delivery.They can be used to implement custom key event handling.</para>@grab_widget: the widget to which the event will be delivered.@event: the key event.@func_data: the @func_data supplied to gtk_key_snooper_install().@Returns: %TRUE to stop further processing of @event, %FALSE to continue.<!-- ##### FUNCTION gtk_key_snooper_remove ##### --><para>Removes the key snooper function with the given id.</para>@snooper_handler_id: Identifies the key snooper to remove.<!-- ##### FUNCTION gtk_get_current_event ##### --><para></para>@Returns: <!-- ##### FUNCTION gtk_get_current_event_time ##### --><para></para>@Returns: <!-- ##### FUNCTION gtk_get_current_event_state ##### --><para></para>@state: @Returns: <!-- ##### FUNCTION gtk_get_event_widget ##### --><para></para>@event: @Returns: <!-- ##### FUNCTION gtk_propagate_event ##### --><para></para>@widget: @event:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -