GNOME core libraries are a collection of foundation utility classes and functions. It covers many things from simple date-conversion functions to virtual filesystem access management. GNOME would not be as powerful as it is now without its core libraries. There are a lot of UI libraries out there that are not successful because of the lack of this kind of power. No wonder there are many libraries outside GNOME that also use GNOME core libraries to support their functionalities.
GNOME core libraries are composed from GLib and GIO, which are non-UI libraries for supporting our UI applications. These libraries connect our programs with files, networks, timers, and other important aspects in the operating system. Without this knowledge, we can probably make a beautiful program, but we would be incapable of interacting with the rest of the system.
In this chapter we shall learn about:
Ok, let's get started.
There are a few exercises in this chapter that need access to the Internet or the local network. Make sure you have a good connection before running the program. Another exercise requires access to removable hardware and mountable filesystems.
In this chapter, we will do something different regarding the Vala exercises. Because the nature of the discussions are independent of each other, each Vala exercise is done in its own project instead of continuously modifying a file in a single project. So, in each Vala exercise we will create a new project and work inside that project. The name of the project will be noted so you can easily compare your project with the source code that accompanies this book. Similar to the previous chapter, the project we create here is a Vala GTK+ (simple) project. In the project properties, we should not tick on the GtkBuilder support for user interface option and should pick No license in the License option.
In each exercise, the JavaScript code follows the Vala code and it is kept inside one file per exercise. The functionalities of the JavaScript code would be exactly the same. So you can opt to choose whether you want to use either the Vala or the JavaScript code, or both.