2 Building Your Application

The GEOS system is complex and provides so many services that the documentation at first may seem rather daunting. This chapter is meant to help you through the application process by directing you to the proper chapters for various functions.

This chapter is by no means a comprehensive list of all functions supported by GEOS. It is intended to be a guide to the chapters that cover some of the more widely-used functions and features.

2.1 What Everyone Should Read

Anyone who wants to program a GEOS application should read at least the first several chapters of the Concepts Book. Among the chapters you should read before going too far are

  • “System Architecture,” Chapter 3
    This chapter describes the GEOS system in an overview format. It can give you a good idea of how the system works and the features it might provide for your application. You should read this chapter now if you haven’t already.

  • “First Steps: Hello World,” Chapter 4
    This chapter describes the Geode Parameters file as well as an example of a simple application. The application puts up a window, uses a menu and a dialog box, and draws graphic-based text within a scrolling window. It also shows how GEOS messaging works, how a message is sent and handled, and how objects interact with each other.

  • “GEOS Programming,” Chapter 5
    This chapter details the basics and even many of the finer points of programming with the Goc preprocessor. Goc has many keywords used for object and class definition, message sending and handling, and resource definition. Before programming for GEOS, you must know how to use several of these keywords (though you can learn several of the most important ones from the sample applications).

  • “The GEOS User Interface,” Chapter 10
    This chapter describes the basic generic and visual UI object classes available. It also details a simple application which uses visual objects that draw themselves in a window, intercept mouse clicks, and allow the user to drag them around the screen. The sample application also illustrates how to create your own objects from the base GEOS visual classes.

2.2 Topics Listing

Listed below are many of the topics related to creating an application. Accompanying the topic is a list of chapters you will probably want to read to fully understand that topic.

2.2.1 Defining Your User Interface

“The GEOS User Interface”, Chapter 10, gives an overview of the User Interface and which objects you will want to use. Many user interface functions, objects, and features are listed below.

2.2.2 Providing Other User Interface

Besides the generic UI functions and objects described above, GEOS provides a number of sophisticated graphics commands and powerful graphic objects. Graphics must be drawn to a GEOS document and the document displayed in a GenView.

2.2.3 Documents and Data Structures

Applications that save files, print documents, or display multiple documents will be concerned with several of the topics listed below.

2.2.4 Accessing Hardware

GEOS is designed to allow applications to be as device-independent as possible. Some applications will need to access hardware directly, however.

  • Serial and Parallel Ports
    An application that needs to access the serial and parallel ports can do so using streams and the serial and parallel drivers. These are discussed in “Using Streams”, Chapter 21.

  • Disks, Drives, and CD ROM Drives
    Applications that work directly with disks and drives (utility programs especially) will use many of the features described in “File System”, Chapter 17.

  • Sound Hardware
    The standard PC speaker can be accessed through the sound library, discussed in “Sound Library”, Chapter 13. Drivers and libraries to allow applications to use more sophisticated sound hardware may be added later.

  • Video Hardware
    In general, GEOS takes care of all video driver operations; applications deal with the graphics system, which sends commands to the video drivers. For more information, see “Graphics Environment”, Chapter 23.

2.2.5 Programming Topics

A number of programming topics specific to Goc are described in “GEOS Programming”, Chapter 5. This chapter discusses the various Goc keywords and their uses. It also describes how to create and destroy objects, how to create classes, and how to send and receive messages. You should read this chapter if you plan on programming for GEOS using the C programming language.

For information on programming in assembly, see the Esp manual. It explains GEOS’s extensions to standard 80x86 assembly-language programming

2.2.6 Other Topics

Many other topics are discussed throughout the documentation. Some of those more commonly used are listed below.

  • Saving User Options
    Generic objects typically provide the features of option saving. If you need to enhance this, however, you can use the GEOS.INI file to save application-specific user options or information. This is discussed in “Applications and Geodes” Chapter 6.

  • Using Event Timers
    Many applications and libraries will use event timers. Timers are discussed in “Applications and Geodes” Chapter 6.

  • Supporting Quick-Transfer and Using the Clipboard
    To support the Edit menu’s Cut, Copy, and Paste functions, see “The Clipboard”, Chapter 7.

  • Serving International Markets
    GEOS is designed to allow easy translation of applications and libraries to other languages. See “Localization”, Chapter 8 for full details.

  • Using Multiple Threads
    Because GEOS is multithreaded, any application can create new threads for itself at any time. The issues and procedures of multiple threads are described in “Threads and Semaphores”, Appendix B.

Introduction <–    table of contents    –> System Architecture