This book describes how to programmatically work with the user interface (UI) elements that are part of the Palm OS® UI Library. It introduces each of the user interface elements and describes the Palm OS APIs that aid in working with the user interface.
This book focuses only on the tasks you perform by writing C code. Specifically, it does not cover the following:
- How to use a resource editor to create UI elements. See the documentation that came with your development environment, or see the book Resource File Formats, which describes the XML format used to define resources.
- How to design an interface that is user-friendly and conforms to Palm OS guidelines. See the book Palm OS User Interface Guidelines for this type of information.
IMPORTANT: The Exploring Palm OS series is intended for developers creating native applications for Palm OS Cobalt. If you are interested in developing applications that work through PACE and that also run on earlier Palm OS releases, read the latest versions of the Palm OS Programmer's API Reference and Palm OS Programmer's Companion instead.
Who Should Read This Book
You should read this book if you are a Palm OS software developer who writes applications, pinlets, or any other type of executable that displays a user interface.
Because virtually all Palm OS developers require some knowledge of how to present a user interface, this book is intended for developers with all levels of familiarity with Palm OS, from novice to expert. Novice programmers should first read Exploring Palm OS: Programming Basics to gain an understanding of the basic structure of a Palm OS application.
Expert Palm OS programmers will find that much of the Palm OS UI library is familiar and may want to just skim this book. Differences between the Palm OS Garnet API set and the Palm OS Cobalt API set are outlined in Exploring Palm OS: Porting Applications to Palm OS Cobalt.
What This Book Contains
This book contains the following information:
- Part I contains conceptual information and how-to information:
- Chapter 1, "The Display," describes display-level concepts and the basic display layout that users see. These are concepts that apply in all of the chapters that follow.
- Chapter 2, "Working with Forms and Dialogs," describes how to work with forms and dialogs.
- Chapter 3, "Working with Controls," describes how to work with controls: buttons, push buttons, check boxes, sliders, and so on.
- Chapter 4, "Working with Menus," describes how to work with menu bars and menu items.
- Chapter 5, "Displaying Text," describes how to display text in text fields, labels, and form titles. It also describes how to work with fonts.
- Chapter 6, "Working with Tables and Lists," describes how to work with tables and with lists.
- Chapter 7, "Creating Custom UI Elements (Gadgets)," describes how to create your own user interface elements.
- Chapter 8, "Drawing," describes how to do custom drawing to the screen.
- Chapter 9, "Working with Bitmaps," describes how to display bitmaps.
- Chapter 10, "Modifying the UI Color List," describes the UI color list and how to change it.
- Chapter 11, "Integrating with the Application Launcher," describes how to display your application in the application launcher.
- Part II contains reference information on the various portions of the UI Library.
Changes to This Book
- The default winding rule is odd. See "Take Advantage of Winding Rule."
-
FrmGetBitmapHandle()
andGcLoadBitmap()
both accept PNGs as well as BitmapType structures. Clarified when to useFrmGetBitmapHandle()
. See Chapter 9, "Working with Bitmaps." - Removed the warning about accessing
FieldAttrType
structure members directly.
- Modified descriptions of
CatMgrSelectFilter()
,FldReleaseStorage()
,TableDrawItemFuncType()
,TblSelectItem()
, and made minor corrections to other table function descriptions. - Modified descriptions of the drawing transformation functions and gradient functions. Added sample code to
GcRotate()
. - Minor editorial corrections.
The Exploring Palm OS Series
This book is a part of the Exploring Palm OS series. Together, the books in this series document and explain how to use the APIs exposed to third-party developers by the fully ARM-native versions of Palm OS, beginning with Palm OS Cobalt. Each of the books in the Exploring Palm OS series explains one aspect of the Palm operating system, and contains both conceptual and reference documentation for the pertinent technology.
As of this writing, the complete Exploring Palm OS series consists of the following titles:
- Exploring Palm OS: Programming Basics
- Exploring Palm OS: Memory, Databases, and Files
- Exploring Palm OS: User Interface
- Exploring Palm OS: User Interface Guidelines (coming soon)
- Exploring Palm OS: System Management
- Exploring Palm OS: Text and Localization
- Exploring Palm OS: Input Services
- Exploring Palm OS: High-Level Communications
- Exploring Palm OS: Low-Level Communications
- Exploring Palm OS: Telephony and SMS
- Exploring Palm OS: Multimedia
- Exploring Palm OS: Security and Cryptography
- Exploring Palm OS: Creating a FEP (coming soon)
- Exploring Palm OS: Porting Applications to Palm OS Cobalt
Additional Resources
- Documentation
PalmSource publishes its latest versions of documents for Palm OS developers at
- Training
PalmSource and its partners host training classes for Palm OS developers. For topics and schedules, check
- Knowledge Base
The Knowledge Base is a fast, web-based database of technical information. Search for frequently asked questions (FAQs), sample code, white papers, and the development documentation at