Century Embedded Technologies Nano-X SDK and Developer's Guide

Century Software, Inc.

With Century Embedded Technologies' Nano-X SDK you have the development environment and tools you need to develop applicaitons for embedded Linux solutions.


Table of Contents
I. Century Embedded SDK Overview
1. SDK Overview
SDK Contents
Using the SDK
2. Working with the Century Software PDA ScreenTop
Adding an Application to the ScreenTop
II. Hardware Specific Procedures
3. Assabet
Installing the Century Software Assabet SDK
Install Bootldr
Creating a Unique Development Tree
Building a Kernel and Installing It on Your Assabet
Building the Century Desktop and Its Applications for Your PC
Building the Century Desktop and Its Applications for Your Assabet
Make a RAMDisk for the Filesystems
Upoading Kernel and RAMDisk files to the Assabet
Installing the Skiff Toolchain
Compiling and Installing an Application for the Assabet
4. Compaq iPAQ
Installing the Century Software iPAQ SDK
Installing Linux on the Compaq iPAQ with Windows CE
Creating a Unique Development Tree
Building a Kernel and Installing It on Your iPAQ
Building the Century Desktop and Its Applications for Your PC
Building the Century Desktop and Its Applications for Your iPAQ
Make CRAMFS Files for the Filesystems
Upoading Kernel and CRAMFS files to the iPAQ
Installing the Skiff Toolchain
Compiling and Installing an Application for the Compaq iPAQ
Restoring Windows CE to the Compaq iPAQ
III. An Overview of Nano-X
5. Fundamental Concepts of Nano-X
Windows
Graphics Contexts
Events
Modifiers and Mouse Buttons
Bitmaps
Error Codes
Screen Properties
6. Nano-X Architecture
Funtamental Architecture Elements
Device-Independent Engine Features
Nano-X API
Nano-X API
IV. Nano-X API Reference
I. Data Types
Integral Data Types — Simple data types defined in nano-X
GR_EVENT — Generic event structure
GR_EVENT_BUTTON — Mouse button event structure
GR_EVENT_ERROR — Error event structure
GR_EVENT_EXPOSURE — Window exposure event structure
GR_EVENT_FDINPUT — File descriptor input event struvture
GR_EVENT_GENERAL — General purpose event structure
GR_EVENT_KEYSTROKE — Keyboard event structure
GR_EVENT_MOUSE — Mouse position event structure
GR_EVENT_UPDATE — Window update event structure
II. Enumerations
GR_ERROR — Error event codes
GR_EVENT_MASK — Event masks
GR_EVENT_TYPE — Event types
GR_UPDATE_TYPE — Window update event, event subtypes
GR_WM_PROPS — Window properties
III. Functions
GrArc — Draw an arc or pie
GrArcAngle — Draw an arc or pie
GrArea — Draw a multiple-bit-per-pixel bitmap
GrBitmap — Draw a bitmap
GrCheckNextEvent — Get the next event from the event queue
GrClearWindow — Clear the content of a window
GrClose — Close the connection to the server
GrCopyGC — Copy a graphics context
GrDefaultErrorHandler — The default error handler
GrDestroyGC — Destroy a graphics context
GrDestroyRegion — Destroy a region
GrDestroyWindow — Destroy an existing window
GrEllipse — Draw the perimeter of an ellipse
GrEmptyRegion — Test if a region is empty
GrEqualRegion — Test if two regions are equal
GrFillEllipse — Draw a filled ellipse
GrFillPoly — Draw a filled polygon
GrFillRect — Draw a filled rectangle
GrFlush — Flush graphics requests
GrGetFontInfo — Retrieve data for a font
GrGetGCInfo — Retrieve a graphics context's settings
GrGetGCTextSize — Return the size of a text string for a particular graphics context
GrGetNextEvent — Wait for and retrieve the next event from the event queue
GrGetRegionBox — Return a polygon that defines the region
GrGetScreenInfo — Retrieve screen configuration data
GrGetSysColor — Return the RGB color value for a system-defined color
GrGetWindowInfo — Retrieve data for a window
GrGetWMProperties — Retrieve window management data for a window
GrIntersectRegion — Find the intersecting areas of two regions
GrLine — Draw a line
GrLowerWindow — Lower a window below its siblings
GrMapWindow — Make a window visible on the screen
GrMoveCursor — Move the cursor to specified coordinates
GrMoveWindow — Move a window to new coordinates
GrNewGC — Allocate a new graphic context
GrNewInputWindow — Create a new input window
GrNewPolygonRegion — Create a new region based on a set of points
GrNewRegion — Allocate a new region
GrNewPixmap — Allocate a new pixmap
GrNewWindow — Create a new window
GrOffsetRegion — Move a region
GrOpen — Open a connection to the server from a new client
GrPeekEvent — Copy the next event from the event queue
GrPoint — Draw a point
GrPointInRegion — Test if a region contains a specified point
GrPoints — Draw a set of points
GrPoly — Draw the perimeter of a polygon
GrRaiseWindow — Raise a window above its siblings
GrReadArea — Create a bitmap from the content of a drawable area
GrRect — Draw the perimeter of a rectangle
GrRectInRegion — Test if a region contains a rectangle
GrReparentWindow — Change a window's parent window
GrResizeWindow — Change the dimensions of a window
GrSelectEvents — Select the events this client wants to receive
GrSetBorderColor — Set a window's border color
GrSetCursor — Set the cursor for a window
GrSetErrorHandler — Specify the error handling function
GrSetFocus — Set the focus to a specified window
GrSetGCBackground — Set the background color in a graphics context
GrSetGCFont — Set the font used in a graphics context
GrSetGCForeground — Set the foreground color in a graphics context
GrSetGCMode — Set the drawing mode for a graphics context
GrSetGCRegion — Set the clip region to use with a graphics context
GrSetGCUseBackground — Set whether or not to draw the background color
GrSubtractRegion — Remove the area of one region from another
GrText — Draw a text string
GrUnionRectWithRegion — Add the area of a rectangle to a region
GrUnionRegion — Add the areas of two regions
GrUnmapWindow — Remove a window from the screen
GrXorRegion — Calculate the exclusive or of two regions
V. FLTK 1.0.7
Preface
Organization
Conventions
Abbreviations
Copyrights and Trademarks
7. Introduction to FLTK
History of FLTK
Features
Licensing
What Does "FLTK" Mean?
Building and Installing FLTK Under UNIX
Building FLTK Under Microsoft Windows
Building FLTK Under OS/2
Internet Resources
Reporting Bugs
8. FLTK Basics
Naming
Header Files
Compiling Programs with Standard Compilers
Compiling Programs with Microsoft Visual C++
Writing Your First FLTK Program
9. Common Widgets and Attributes
Buttons
Text
Valuators
Groups
Setting the Size and Position of Widgets
Colors
Box Types
Labels and Label Types
Callbacks
Shortcuts
10. Designing a Simple Text Editor
Determining the Goals of the Text Editor
Designing the Main Window
Variables
Menubars and Menus
Editing the Text
The Replace Dialog
Callbacks
Other Functions
Compiling the Editor
The Final Product
11. Drawing Things in FLTK
When Can You Draw Things in FLTK?
FLTK Drawing Functions
12. Handling Events
The FLTK Event Model
Mouse Events
Focus Events
Keyboard Events
Widget Events
Clipboard Events
Fl::event_*() methods
Event Propagation
FLTK Compose-Character Sequences
13. Extending and Adding Widgets
Subclassing
Making a Subclass of Fl_Widget
The Constructor
Protected Methods of Fl_Widget
Handling Events
Drawing the Widget
Resizing the Widget
Making a Composite Widget
Cut and Paste Support
Making a subclass of Fl_Window
14. Programming with FLUID
What is FLUID?
Running FLUID Under UNIX
Running FLUID Under Microsoft Windows
Compiling .fl files
A Short Tutorial
FLUID Reference
15. Using OpenGL
Using OpenGL in FLTK
Making a Subclass of Fl_Gl_Window
Using OpenGL in Normal FLTK Windows
OpenGL Drawing Functions
Using OpenGL Optimizer with FLTK
A. Widget Reference
class FL_Adjuster — value adjuster widget
class Fl_Box — box drawing widget
class Fl_Browser — scrolling list widget
class Fl_Browser_ — browser base class
class Fl_Button — button widget
class Fl_Chart — chart widget
class Fl_Check_Button — check button widget
class Fl_Choice — Pop up menu widget
class Fl_Clock — clock widget
class Fl_Color_Chooser — color chooser widget
class Fl_Counter — floating-point counter widget
class Fl_Dial — circular dial widget
class Fl_Double_Window — double-buffered window widget
class Fl_End — dummy group end widget
class Fl_Float_Input — floating point number input widget
class Fl_Free — forms free widget
class Fl_Gl_Window — OpenGL widget
class Fl_Group — container widget
class Fl_Hold_Browser — single item selection widget
class Fl_Input — text input widget
class Fl_Input_ — virtual base class for input and output widgets
class Fl_Int_Input — integer input widget
class Fl_Light_Button — lighted toggle button widget
class Fl_Menu_ — parent class for all menu widgets
class Fl_Menu_Bar — menubar interface widget
class Fl_Menu_Button — pop-up menu widget
struct Fl_Menu_Item — single menu item structure
class Fl_Menu_Window — menu window widget
class Fl_Multi_Browser — multiple selection list widget
class Fl_Multiline_Input — multiline input widget
class Fl_Multiline_Output — multiple line text display widget
class Fl_Output — text display widget
class Fl_Overlay_Window — overlay window widget
class Fl_Pack — compression and alignment widet
class Fl_Positioner — Forms-compatible 2D input widegt
class Fl_Repeat_Button — repeat button widget
class Fl_Return_Button — return button widget
class Fl_Roller — roller widget
class Fl_Round_Button — round (lighted) button widget
class Fl_Scroll — scrolling window widget
class Fl_Scrollbar — scrollbar widget
class Fl_Secret_Input — hidden input widget
class Fl_Select_Browser — selectable list widget
class Fl_Single_Window — single-buffered window widget
class Fl_Slider — slider widget
class Fl_Tabs — card tab paging widget
class Fl_Tile — tiled window resizing widget
class Fl_Timer — Forms timer widget
class Fl_Valuator — floating-point value widget
class Fl_Value_Input — editable floating-point value widget
class Fl_Value_Output — floating-point value display widget
class Fl_Value_Slider — value slider widget
class Fl_Widget — base class for all widgets
class Fl_Window — window widget
B. Function Reference
Functions
FL:: Methods
C. Enumeration Reference
Version Numbers
Events
Callback "When" Conditions
Fl::event_key() Values
Fl::event_state() Values
Alignment Values
Fonts
Colors
Cursors
FD "When" Conditions
Damage Masks
D. GLUT Compatibility
Using the GLUT Compatibility Header File
Known Problems
Mixing GLUT and FLTK Code
class Fl_Glut_Window
E. Forms Compatibility
Importing Forms Layout Files
Using the Compatibility Header File
Problems You Will Encounter
Additional Notes
F. Operating System Issues
X-Specific Interface
WIN32-Specific Interface
G. Software License
GNU LIBRARY GENERAL PUBLIC LICENSE
List of Tables
6-1. Nano-X Core Modules
6-2. Region Routines
6-3. Nano-X Messaging Functions
6-4. Nano-X Window Registration, Creation & Destruction Functions
6-5. Nano-X Graphics Drawing API
6-6. Nano-X Utility Functions
6-7. Nano-X Rectangle & Region Functions
6-8. Nano-X Region Creation & Manipulation Functions
6-9. Nano-X Clip Region Functions
6-10. Nano-X Graphics Drawing Functions
6-11. Nano-X Utility Functions
List of Examples
1. GR_EVENT Usage
8-1. hello.cxx