Xfce.org | Xfce Goodies | Xfce Foundation Classes | Xfce Bug Tracker | Xfce Wiki | Xfce Forum | Xfce DevBlog    

... the power of gtk, the power of c++!

Home | News | History | FAQ | Documentation | Download | Contact | Links

Online Documentation

The Xfce Foundation Classes comes with excellent documentation, all of which can be viewed online here
  • There is a large collection of widget HOWTOs that cover everything from general information and library structure to individual widget programming. Each widget HOWTO first discusses any widget basics and then works through a widget example. The HOWTOs are linked to the API reference manual so widget examples can be easily accessed from there.
  • There is a complete API reference manual. This manual is compiled by Doxygen from special comments in the XFC header files. Every typedef, enum and class has been documented, including all public and protected member functions and signals.
  • There is a good tutorial that targets both new and experienced GTK+ programmers. The tutorial takes you through the process building a real application, called 'XfcApp', which you can then use as the starting point for your own projects. The tutorial covers two important topics essential for new programmers: building a GNU autotools project and adding international language support.

Minimum Requirements

The libxfc_core library depends on the following:

The libxfc_ui library depends on libxfc_core and the following:

Most Linux distributions include these packages. Just make sure that the development packages are also installed on your system. Once XFC is installed you will find a complete reference manual and a tutorial in the <docs> directory. If the API reference manual is missing for some reason, don't worry. It's very likely your Linux distribution comes with a program called Doxygen, which should be in your <usr/bin> directory. When you run make for the first time, XFC will use Doxygen to compile the API reference manual from special comments in the header files.

Installing from source code

The first thing to do of course is download to the latest version of the source code.  The Xfce Foundation Classes uses CMake configuration, so once untar'd run run cmake with the --help argument to see a list of options. You should use the GNU compiler version 3.2.0 (or higher) to compile XFC.

You can compile and install XFC with the following commands run in the top-level source directory:

$ cmake .
$ make
$ make install

The '--prefix' argument takes the directory where you want XFC installed. If the directory is omitted XFC will install itself into the <usr/local> directory. By default, configure builds libxfc_core and libxfc_ui with debugging and compiler symbols so you can debug your applications during development. If you want libxfc_core and libxfc_ui built with debugging symbols, run cmake with the following option:

cmake -DCMAKE_BUILD_TYPE=Debug .

Run cmake with the --help option for more.

Compiling a XFC Application

To compile an XFC application you need to use pkg-config which can be obtained from freedesktop.org. pkg-config is a tool for managing library compile and link flags during make file exceution. It reads the xfcui-X.X.pc file (X.X is the version number) which comes with XFC to determine what compiler switches are needed to compile a XFC program. The --cflags option will output a list of include directories for the compiler to look in, and the --libs option will output the list of libraries for the compiler to link with and the directories to find them in. For example, a typical compile command would look like this:

g++ -Wall -g -O2 helloworld.cc -o helloworld `pkg-config xfcui-X.X --cflags --libs`

Replace X.X with the major and minor version numbers of the libxfc_ui library installed on your system.  Note that the type of single quote used in the compile command above is significant.

Valid XHTML 1.0  
    Copyright © 2004-2012 The XFC Development Team Xfce is © Olivier FOURDAN 1996-2005