Hildon-desktop-1: 2.0.7.debian.1.orig» code preliminary analysis in src (1)

Source: Internet
Author: User
Tags gtk

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.

#######################################

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.