1-by-1 black pixel for creating lines
1-by-1 black pixel for creating lines
EricGiguere.com > Books > Palm Database Programming > Chapter 3
Printer-friendly version Set your preferences
Read my blogs on AdSense and affiliate marketing
 
 
  
Learn about these ads

Palm Database Programming — The Electronic Version

Chapter 3: Development Tools and Software Development Kits

This material was published in 1999. See the free Palm OS Programming online course I developed for CodeWarriorU for some updated material.

Prev Chapter | Prev Section | Next Section | Contents

Palm OS Software Development Kit

The Palm OS Software Development Kit (SDK) is available for download from the Palm Computing Web site. The SDK contains a complete reference guide (either Palm OS SDK Reference or Developing Palm OS Applications) to Palm OS, the complete set of Palm OS header files and runtime libraries, the source to the built-in applications (such as the Address Book), the examples for the Palm OS Tutorial (available separately from the Web site), and a version of the Palm OS Emulator (discussed later in this chapter).

Although the compilers include a version of the SDK (CodeWarrior Release 5 includes the Palm OS 3.0 SDK, GCC includes the Palm OS 2.0 SDK), you should check the Palm Computing Web site regularly for new and updated versions of the SDK, especially if you're targeting the newer Palm devices like the Palm V. The most recent version of the SDK at the time this book was written is included on the accompanying CD-ROM.

The reference guide and the header files are the most important pieces of the SDK. You'll want to have links to the reference guide on your desktop for quick access. You might even want to print a copy of the complete reference guide, but given that it's about 1,000 pages in length you might find it simpler to purchase a printed copy instead. See the Web site for instructions on obtaining printed copies.

The header file directory structure isn't very complicated. A few header files are in the base directory, but most are found in the System and UI subdirectories and are referenced relative to the base directory:

      
#include <Common.h>
#include <System/SystemMgr.h>
#include <UI/UIAll.h>

Here is a short description of the most important header files:

  • <Common.h> defines the types common to all Palm OS header files, see the summary in Table 3.1. You should familiarize yourself with these types.
  • <System/SysAll.h> includes all the system header files.
  • <UI/UIAll.h> includes all the user interface header files.
  • <Pilot.h> includes <Common.h>, <System/SysAll.h> and <UI/UIAll.h>. Most application source files include <Pilot.h> as the first header file. Compile times for CodeWarrior users are shortened because a precompiled version of this header file is used.
  • <System/Globals.h> and <UI/UIGlobals.h> define the global variables used by Palm OS itself. These global variables are stored in dynamic memory. Don't use these variables directly, always use the equivalent Palm OS APIs.

A number of header files are private to Palm OS. These have names like <System/AlarmPrv.h> or <System/SystemPrv.h>. These header files should not be used by your programs, as the functions, types, and macros they define are reserved for use by the operating system.

Table 3.1 Common Palm OS Types

Type

Description

Boolean

Unsigned 8-bit Boolean (true or false)

Byte

Unsigned 8-bit integer

Char

Signed character (8-bit)

CharPtr

Character pointer (Char *)

DWord

Unsigned 32-bit integer

Err

Signed 16-bit error code

Int

Signed 16-bit integer

IntPtr

Pointer to Int (Int *)

LocalID

Unsigned 32-bit card-relative memory offset

Long

Signed 32-bit integer

LongPtr

Pointer to Long (Long *)

SByte

Signed 8-bit integer

SDWord

Signed 32-bit integer

Short

Signed 16-bit integer

ShortPtr

Pointer to Short (Short *)

SWord

Signed 16-bit integer

UChar

Unsigned character (8-bit)

UCharPtr

Unsigned character pointer (UChar *)

UInt

Unsigned 16-bit integer

UIntPtr

Pointer to UInt (UInt *)

ULong

Unsigned 32-bit integer

ULongPtr

Pointer to ULong (ULong *)

UShort

Unsigned 16-bit integer

UShortPtr

Pointer to UShort (UShort *)

VoidHandle

Memory handle (void **)

VoidPtr

Generic pointer (void *)

Word

Unsigned 16-bit integer

The Palm Computing platform uses 16-bit integers, so in both compilers the int type is a 16-bit type unless specified otherwise with a compiler option.

Prev Chapter | Prev Section | Next Section | Contents

Copyright ©1999 by Eric Giguere. All rights reserved. From Palm Database Programming: The Complete Developer's Guide. Reprinted here with permission from the publisher. Please see the copyright and disclaimer notices for more details.

If you find the material useful, consider buying one of my books, linking to this site from your own site or in your weblog, or sending me a note.

Google Web www.ericgiguere.com   
1-by-1 black pixel for creating lines
 
Copyright ©2003-2012 Eric Giguere | Send mail about this page | About this site | Privacy policy
Site design and programming by Eric Giguere | Hosting by KGB Internet Solutions
This site is Java-powered
Other sites: The Unofficial AdSense Blog | Google Suggest Explorer | Invisible Fence Guide | Synclastic
This page was last modified on November 18, 2003
1-by-1 black pixel for creating lines
1-by-1 black pixel for creating lines