首頁 / LinuxDev / GTK+ 2.0 教學-連接和切斷信號處理函式

GTK+ 2.0 教學-連接和切斷信號處理函式

信號函式

連接和切斷信號處理函式

gulong g_signal_connect( GObject     *object,
                         const gchar *name,
                         GCallback    func,
                         gpointer     func_data );

gulong g_signal_connect_after( GObject       *object,
                               const gchar   *name,
                               GCallback      func,
                               gpointer       func_data );

gulong g_signal_connect_swapped( GObject       *object,
                                 const gchar   *name,
                                 GCallback      func,
                                 GObject       *slot_object );

void g_signal_handler_disconnect( GObject *object,
                                  gulong   handler_id );

void g_signal_handlers_disconnect_by_func( GObject   *object,
                                           GCallback  func,
                                           gpointer   data );

Blocking and Unblocking Signal Handlers

void g_signal_handler_block( GObject *object,
                             gulong   handler_id);

void g_signal_handlers_block_by_func( GObject   *object,
                                      GCallback  func,
                                      gpointer   data );

void g_signal_handler_unblock( GObject *object,
                               gulong   handler_id );

void g_signal_handler_unblock_by_func( GObject   *object,
                                       GCallback  func,
                                       gpointer   data );

發出和停止信號

void g_signal_emit( GObject *object,
                    guint      signal_id,
                    ... );

void g_signal_emit_by_name( GObject     *object,
                            const gchar *name,
                            ... );

void g_signal_emitv( const GValue *instance_and_params,
                     guint         signal_id,
                     GQuark        detail,
                     GValue       *return_value );

void g_signal_stop_emission( GObject *object,
                             guint    signal_id,
                             GQuark   detail );

void g_signal_stop_emission_by_name( GObject   *object,
                                     const gchar *detailed_signal );
馬上成為工作達人的Fans

About ㄚ琪

工作達人Fun Taiwan的創辦者及總編,可以在這裡更認識他。

2 comments

發表迴響

你的電子郵件位址並不會被公開。 Required fields are marked *

*

這個網站採用 Akismet 服務減少垃圾留言。進一步瞭解 Akismet 如何處理網站訪客的留言資料

Scroll To Top