GTK + 2.0 Tutorial - In-depth exploration signal processing function

zhaozj2021-02-16  157

In-depth exploration signal processing function

Let's take a look at the declaration of the function gtk_signal_connect ().

Gulong G_Signal_Connect (GPointer Object, Const Gchar * Name, GCallback Func, Gpointer Func_Data);

Note that the type Gulong of the return value is a logo that identifies your callback function. Each signal and each object may have multiple callback functions, and they will run in the order set.

With this logo, you can remove the callback function from the list with the following functions:

Void g_signal_handler_disconnect (gpoint Object, gulong id);

You can also use g_signal_handler_block () and g_signal_handler_unblock () to temporarily disconnect the connection.

Void g_signal_handler_block (gpoint Object, gulong id);

Void g_signal_handlers_block_by_func (gpoint Object, GCallback Func, Gpointer Data);

Void g_signal_handler_unblock (gpoint Object, gulong id);

Void g_signal_handlers_unblock_by_func (gpoint Object, GCallback Func, Gpointer Data);

转载请注明原文地址:https://www.9cbs.com/read-8480.html

New Post(0)