Config Library

Up: GEOS SDK TechDocs | Up | Down | Next: 1 Providing the UI
| One-page Version of this Chapter for Easy Printing

Not all users are the same; not all computing environments are the same. Often some part of an application allows the user to tailor the UI to his wishes. The user may wish to specify some preferences at a system level rather than on an application level. To do this, the user will look to the Preferences Manager application. The config library provides mechanisms for writing Preferences modules.

Normally the purpose of a Preferences module's gadgetry is to set up some information in the user's .INI file. If you are encouraging other developers to take advantage of the configuration done by your module, be sure to document the .INI file categories and keys affected.

There are three main tasks involved in writing a Preferences module:

The first two routines exported in the module's .gp file will be responsible for carrying out the first two of these tasks. The final task is difficult to define--it will depend on the nature of your module.

Preferences modules written in C will need one more thing. To indicate that the preferences module is compatible with the standard GEOS 2.0 Preferences Manager applications, the module will need a local.mk makefile for compilation, and that local.mk file should include a line that reads:

_PROTO = 2.0

For information about local.mk files, see the Using Tools chapter.

Before you try to write a Preference module, there are some things you should already know. Each module is a library, so be sure to read the Libraries chapter. to find out how to write a GEOS library. It will let you know, among other things, that you must place the "c-api" flag in your library's GP file if its entry points are in C. .


Up: GEOS SDK TechDocs | Up | Down | Next: 1 Providing the UI
| One-page Version of this Chapter for Easy Printing