Hildon-desktop-1: 2.0.7.debian.1.orig» SRC
Key code parsing for the SRC file:
############# 20090324 ##############
1, Main. c
Key points of the main function:
1) gtk_rc_add_default_file (gtkrc );
This function: hierarchical structure:
Gobject
+ ---- Gtkrcstyle
Document Source:
Http://library.gnome.org/devel/gtk/stable/gtk-Resource-Files.html#gtk-rc-add-default-file
Set the resource configuration file for later loading.
Here the resource configuration file is specified in $ home/. ossso/current-gtk-theme.maemo_af_desktop. The actual current-gtk-theme.maemo_af_desktop is just a
Link "file, which specifies the location of the configuration file.
2) Desktop = hd_shorttop_new ()
Create a custom component named desktop. hd_shorttop_class_init and hd_shorttop_init will be called here (both are described later in the hd-desktop.c ),
Hd_shorttop_init loads the resource configuration file set in 1.
3) hd_shorttop_run (hd_desktop (desktop ));
This function is responsible for the startup of the program before running the message loop (in the hd-desktop.c, as described later)
2. hd-desktop.c:
2.1, hd_shorttop_run function.
This function is responsible for running the main program. There are several key points:
1) hd_shorttop_load_containers (desktop );
It is responsible for reading the configuration file and setting the graphical interface of the program according to the configuration file (this function is very important and should be detailed)
2) Two hd_shorttop_watch_dir calls;
They are related to the path of the configuration file, which may be the location where the configuration file should be read.
2.2, hd_shorttop_class_init Function
Class preliminary test function. This function is only used to demonstrate that I have defined a new class. This new class is first tested in this function before it can be used.
2.3, hd_shorttop_init Function
This function is responsible for the specific operations on custom components. For example:
Locate the required configuration files to make simple arrangements for new components and connect signals.
#######################################