1. gdkdisplay-directfb.c initializes directfb Resource function gdk_display_open (const gchar * display_name)
This function initializes all resources of directfb, such as the keyboard and output layer.
Call function _ gdk_directfb_keyboard_init () to initialize the standard keyboard.
Call function _ gdk_events_init (void) to initialize the resource of the event receiving mechanism.
2. gdkevents-directfb.c initializes the resource of the event receiving mechanism _ gdk_events_init (void)
This function binds the porting layer function dfb_events_io_func of directfb in gdk to gsource (gdk event source)
3. gdkevents-directfb.c
Dfb_events_io_func (giochannel * channel, giocondition condition, gpointer data)
This function cyclically receives directfb events,
This function calls the dfb_events_process_window_event (& event-> window) function to translate directfb events into gdk events.
Call the dfb_events_dispatch () function to process gdk events.
4. gdkevents-directfb.c
Operate the directfb event function dfb_events_process_window_event (dfb1_wevent * event)
Call the gdk_event_translate (event, window) function );
5. gdkevents-directfb.c
Translate the specific window event function gdk_event_translate (dfb1_wevent * dfbevent, gdkwindow * window)
This function performs operations based on the DFB event type. For example, the remote control button event is dwet_keydown and dwet_keyup.
Call the gdk_directfb_event_make () function to create a gdk event.
Call the gdk_directfb_translate_key_event () function to convert the key event
6. gdkkeys-directfb.c
Gdk_directfb_translate_key_event (dfb1_wevent * dfb_event, gdkeventkey * event)
This function is mainly used to assign the hardware key values and logical key values of keys in the DFB event to the gdk event.
7. gdkevents-directfb.c processing gdk event function dfb_events_dispatch (void)
Call function _ gdk_event_func () to process specific gdk events
8. gdkevents. c
_ Gdk_event_func is a function pointer defined by gdk. It is assigned a value through the gdk_event_handler_set () function.
Comment "sets the function to call to handle all events from gdk" in the GTK source code package ".
9. gtkmain. c
The do_pre_parse_initialization () function calls gdk_event_handler_set () and assigns a value to _ gdk_event_func.
Gdk_event_handler_set (gdkeventfunc) gtk_main_do_event, null, null );
That is, _ gdk_event_func = gtk_main_do_event