Implementing the Palm Software Development Kit
The Palm Software Development Kit (SDK) is a set of header files and libraries which can be used by developers in their programs to access specific system functions.

Let's take a closer look at the header files. You will notice that these files are written in C (as is the Palm OS itself). Therefore, in order to be able to implement their instructions and functions you'll need a C-based developing environment like Metrowerks' CodeWarrior.

With CASL, you'll need the Pro-edition and a C-compiler like GCC. After pressing F7 in order to compile your source file, open the generated C-file with a text-editor like Windows Notepad.

When you take a look at the top of the C-file, you will see something like this:

#include "CASL_support.h"
#include "CASL_optional.h" 
This way the compiler will know where to find the description of the functions we're using. Because most of the SDK's header files will be included automatically by the (GCC)-compiler, it is often unnecessary to make this referral. However, some header files are optional and must be included manually in order to prevent error messages from the compiler.

Now let's assume you'd like to lock all plastic keys on the Palm except both scroll-buttons. For this, we'll need to call the function KeySetMask from KeyMgr.h.

Search for the appropriate function in the C-file (when you've called your function "start", it will appear as "starT_cf_()") and edit the source-code as follows:

void starT_cf_(void)
   {
KeySetMask(0x02|0x04);     /* Disable all but the */ 
   }                       /* scroll buttons.     */
By the way, the call KeySetMask(0xFFFFFFFF) enables all plastic buttons again.

Now, all you need to do is to save the changes and choose "Make PRC" from the Build-menu. As you can see, the Palm SDK makes the CASL environment even more powerful and adds functionality your programs will lack otherwise.

For more information, click the Examples-link at the top of this page.

 

Get SDK Examples Go back