API Guide Home (Online version only) |

# palmOneStatusBar.h

Go to the documentation of this file.

    00001 /*******************************************************************************
    00002  * Copyright (c) 2004-2005 palmOne, Inc. or its subsidiaries.
    00003  * All rights reserved.
    00004  ******************************************************************************/
    00005 /**
    00006  * @defgroup    StatusBar Status Bar Library
    00007  * @brief       This library provides support to manipulate the state of the status
    00008  *              bar on devices that utilize the Dynamic Input Area (DIA).
    00009  *
    00010  * Devices such as Tungsten T3 and Tungsten T5 allow users to collapse/expand the input
    00011  * area to support tall forms. This library allows the status/control bar to be hidden
    00012  * programmatically so that forms can be displayed full screen.
    00013  *
    00014  * Most of the APIs in the library should already exist in Palm OS SDK, and applications
    00015  * that are developed for DIA-enabled OS should first try to use the PalmSource's status
    00016  * bar API.
    00017  *
    00018  * @{
    00019  * @}
    00020  */
    00021 /**
    00022  * @ingroup StatusBar
    00023  */
    00024
    00025 /**
    00026  * @file    palmOneStatusBar.h
    00027  * @version 1.0
    00028  * @brief   Public common header file for palmOne defined Status Bar library.
    00029  *
    00030  * This file contains the function prototypes and constants for the palmOne Status Bar Library
    00031  * <hr>
    00032  */
    00033
    00034
    00035 #ifndef __STATUSBARMGRLIB_H__
    00036 #define __STATUSBARMGRLIB_H__
    00037
    00038 #include <PalmTypes.h>
    00039 #include <LibTraps.h>
    00040
    00041
    00042 /**
    00043  * @name Library Constants
    00044  *
    00045  */
    00046 /*@{*/
    00047 #define palmOneStatusBarLibName         "StatusBarMgrLib"   /**< StatusBar library name */
    00048 #define palmOneStatusBarLibCreator      'sBar'              /**< StatusBar library creator ID */
    00049 #define palmOneStatusBarLibType         sysFileTLibrary     /**< Default library type */
    00050 #define palmOneStatusBarFtrNumVersion   (0)                 /**< Version of the currently supported features */
    00051 /*@}*/
    00052
    00053 /**
    00054  * @name Error Codes
    00055  *
    00056  */
    00057 /*@{*/
    00058 #define palmOneStatusBarErrorClass          (appErrorClass  | 0x0900)
    00059 #define palmOneStatusBarErrNoStatusBar      (palmOneStatusBarErrorClass | 1)
    00060 #define palmOneStatusBarErrInvalidSelector  (palmOneStatusBarErrorClass | 2)
    00061 #define palmOneStatusBarErrInputWindowOpen  (palmOneStatusBarErrorClass | 3)
    00062 #define palmOneStatusBarErrBadParam         (palmOneStatusBarErrorClass | 101)
    00063 #define palmOneStatusBarErrInvalidState     (palmOneStatusBarErrorClass | 102)
    00064 /*@}*/
    00065
    00066 /**
    00067  * Status Bar Attributes
    00068  **/
    00069 typedef enum PalmOneStatAttrTypeTag
    00070 {
    00071     palmOneStatusBarAttrExists     = 0,         /**< device supports the status bar */
    00072     palmOneStatusBarAttrBarVisible,             /**< status bar is visible */
    00073     palmOneStatusBarAttrDimension               /**< bounds of status bar window */
    00074 } PalmOneStatAttrType;
    00075
    00076
    00077 /**
    00078  * @name Function Traps
    00079  *
    00080  */
    00081 /*@{*/
    00082 #define kPalmOneStatusBarMgrLibTrapOpen     sysLibTrapOpen
    00083 #define kPalmOneStatusBarMgrLibTrapClose    sysLibTrapClose
    00084 #define kPalmOneStatusBarMgrLibGetAttribute (sysLibTrapCustom)
    00085 #define kPalmOneStatusBarMgrLibHide         (sysLibTrapCustom + 1)
    00086 #define kPalmOneStatusBarMgrLibShow         (sysLibTrapCustom + 2)
    00087 /*@}*/
    00088
    00089 /**
    00090  * Prototypes
    00091  **/
    00092 #ifdef __cplusplus
    00093 extern "C" {
    00094 #endif
    00095
    00096 /**
    00097  * @brief Standard open library routine
    00098  *
    00099  * @param refnum:   IN: Library reference number
    00100  * @return Error code.
    00101  **/
    00102 Err PalmOneStatusBarLibOpen(UInt16 refnum)
    00103                 SYS_TRAP(kPalmOneStatusBarMgrLibTrapOpen);
    00104
    00105 /**
    00106  * @brief Standard close library routine
    00107  *
    00108  * @param refnum:   IN: Library reference number
    00109  * @return Error code.
    00110  **/
    00111 Err PalmOneStatusBarLibClose(UInt16 refnum)
    00112                 SYS_TRAP(kPalmOneStatusBarMgrLibTrapClose);
    00113
    00114 /**
    00115  * @brief Retrieve the current state of the status bar
    00116  *
    00117  * @param refnum:   IN: Library reference number
    00118  * @param selector: IN: Attribute selector (dimension or status)
    00119  * @param *dataP:   IN: Pointer to the returned attribute value.
    00120  * @return Error code.
    00121  **/
    00122 Err PalmOneStatusBarGetAttribute(UInt16 refnum, PalmOneStatAttrType selector, UInt32 *dataP)
    00123                 SYS_TRAP(kPalmOneStatusBarMgrLibGetAttribute);
    00124
    00125 /**
    00126  * @brief Hide the status bar from the bottom of the screen
    00127  *
    00128  * @param refnum:   IN:  Library reference number
    00129  * @return Error code.
    00130  **/
    00131 Err PalmOneStatusBarHide(UInt16 refnum)
    00132                 SYS_TRAP(kPalmOneStatusBarMgrLibHide);
    00133
    00134 /**
    00135  * @brief Unhide/show the status bar at the bottom of the screen
    00136  *
    00137  * @param refnum:   IN:  Library reference number
    00138  * @return Error code.
    00139  **/
    00140 Err PalmOneStatusBarShow(UInt16 refnum)
    00141                 SYS_TRAP(kPalmOneStatusBarMgrLibShow);
    00142
    00143 #ifdef __cplusplus
    00144 }
    00145 #endif
    00146
    00147 #endif  //__STATUSBARMGRLIB_H__

Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:54 2008 for Palm API Guide