API Guide Home (Online version only) |

# HsNav.h

Go to the documentation of this file.

    00001 /******************************************************************************
    00002  * Copyright (c) 2004 palmOne, Inc. or its subsidiaries.
    00003  * All rights reserved.
    00004  *****************************************************************************/
    00005 /**
    00006  *
    00007  * @ingroup HsNav
    00008  *
    00009  */
    00010
    00011 /**
    00012  * @file    HsNav.h
    00013  * @version
    00014  * @date
    00015  *
    00016  * @brief   Header file that 68K programs include to access
    00017  * HsNav functionality.
    00018  *
    00019  */
    00020
    00021
    00022 #ifndef   __HS_NAV_68K_H__
    00023 #define   __HS_NAV_68K_H__
    00024
    00025 /**
    00026  * Most of the definitions for HsNav are in HsNavCommon.h so that
    00027  * they can be shared by both 68K and ARM programs...
    00028  **/
    00029 #include <HsNavCommon.h>
    00030 #include <HsExt.h>  // For SYS_SEL_TRAP
    00031 #include <CoreTraps.h>
    00032
    00033 /**
    00034  * SYS_SEL_TRAP technically should be defined here as it is defined at the
    00035  *  beginning of HsExt.h.  However, since HsNav.h is always included with
    00036  *  HsExt.h (Hs.h and HsInt.h include both), we are fine.  If HsNav.h is ever
    00037  *  included without HsExt.h, then we'll have to do something different.
    00038  **/
    00039
    00040 #if PALMOS_SDK_VERSION < 0x0541
    00041
    00042 #ifdef __cplusplus
    00043 extern "C" {
    00044 #endif
    00045
    00046 /**
    00047  *  @brief Obtains the number of objects in a form’s navigation tab order.
    00048  *
    00049  *  @param formP:   IN:  Pointer to the form whose navigation information is to be obtained.
    00050  *  @retval UInt16 Returns the number of objects in the navigation tab order.
    00051  **/
    00052 UInt16
    00053 FrmCountObjectsInNavOrder (const FormType * formP)
    00054         SYS_SEL_TRAP (sysTrapNavSelector, NavSelectorFrmCountObjectsInNavOrder);
    00055
    00056 /**
    00057  *  @brief Obtains information about the navigation order of a form.
    00058  *
    00059  *  @param formP:   IN:  Pointer to the form whose focus order is to be obtained
    00060  *  @param navHeaderP:  IN:  If not NULL, filled with the header information for the form’s navigation order
    00061  *  @param navOrderP:   IN:  If not NULL, will point to an array with info for each object in the navigation order
    00062  *  @param numObjectsP: IN:  On entry, the number of entries allocated in the navigation order array. On exit,
    00063  *                           the number of entries filled in the navigation order array.
    00064  *  @retval Err Returns 0 if no error, error code otherwise.
    00065  **/
    00066 Err
    00067 FrmGetNavOrder (const FormType* formP, FrmNavHeaderType* navHeaderP,
    00068                 FrmNavOrderEntryType* navOrderP, UInt16* numObjectsP)
    00069         SYS_SEL_TRAP (sysTrapNavSelector, NavSelectorFrmGetNavOrder);
    00070
    00071 /**
    00072  *  @brief Sets the navigation order of a form. If the object with the current focus is removed
    00073  *         from the order, the object will be redrawn in its non-focused state and the form will
    00074  *         have no current focus. Makes a COPY of all information passed-in.
    00075  *
    00076  *  @param formP:   IN:  Pointer to the form whose focus order is to being set
    00077  *  @param navHeaderP:  IN:  Sets the header information for the form’s navigation order. This parameter
    00078  *                           cannot be NULL.
    00079  *  @param navOrderP:   IN:  Specifies the new navigation order for the form. The number of entries in the
    00080  *                           array must be equal to the header parameter’s numberOfObjects field. Caller can
    00081  *                           pass NULL if they do not want to change the form’s navigation order (they just
    00082  *                           want to change the header information).
    00083  *  @retval Err Returns 0 if no error, error code otherwise
    00084  **/
    00085 Err
    00086 FrmSetNavOrder (FormType* formP, FrmNavHeaderType* navHeaderP,
    00087                 FrmNavOrderEntryType* navOrderP)
    00088         SYS_SEL_TRAP (sysTrapNavSelector, NavSelectorFrmSetNavOrder);
    00089
    00090 /**
    00091  *  @brief Gets the navigation information for a single object in the form.
    00092  *
    00093  *  @param formP:       IN:  Pointer to the form whose navigation order is being obtained
    00094  *  @param targetObjectID:  IN:  The ID of the object whose navigation information is being obtained
    00095  *  @param afterObjectIDP:  IN:  On exit, will point to the ID of the object which is to the left of the target object.
    00096  *                                   If the target object is the first one in the tab order, will point to an ID of 0. Caller
    00097  *                                   can pass NULL if they do not need this information.
    00098  *  @param aboveObjectIDP:  IN:  On exit, will point to the ID of the object that is above the target object. An ID of
    00099  *                                   0 means the target object is in the top row of the form. Caller can pass NULL if
    00100  *                                   they do not need this information.
    00101  *  @param belowObjectIDP:  IN:  On exit, will point to the ID of the object that is below the target object. An ID of
    00102  *                                   0 means the target object is in the bottom row of the form. Caller can pass NULL
    00103  *                                   if they do not need this information.
    00104  *  @param objectFlagsP:    IN:  On exit, will point to the object flags for the target object. Caller can pass NULL
    00105  *                                   if they do not need this information.
    00106  *  @retval Err Returns 0 if no error, error code otherwise.
    00107  **/
    00108 Err
    00109 FrmGetNavEntry (const FormType* formP, UInt16 targetObjectID,
    00110                 UInt16* afterObjectIDP, UInt16* aboveObjectIDP,
    00111                 UInt16* belowObjectIDP, FrmNavObjectFlagsType* objectFlagsP)
    00112         SYS_SEL_TRAP (sysTrapNavSelector, NavSelectorFrmGetNavEntry);
    00113
    00114 /**
    00115  *  @brief Edits the navigation information for a single object in the form.
    00116  *
    00117  *  @param formP:       IN:  Pointer to the form whose navigation order is being changed
    00118  *  @param targetObjectID:  IN:  The ID of the object which is being edited, added, or removed.
    00119  *  @param afterObjectID:   IN:  The ID of the object which will be to the left of the target object. The object that
    00120  *                                   is currently to the right of the after object will then be to the right of the target
    00121  *                   object. An ID of 0 means the target object should be placed at the beginning of
    00122  *                   the order. An ID of 0xFFFF (frmInvalidObjectId) means that the target object
    00123  *                   should be completely removed from the navigation order.
    00124  *  @param aboveObjectID:   IN:  The ID of the object that will be above the target object. An ID of 0 means the
    00125  *                   target object is in the top row of the form.
    00126  *  @param belowObjectID:   IN:  The ID of the object that will be below the target object. An ID of 0 means the
    00127  *                   target object is in the bottom row of the form.
    00128  *  @param objectFlags:     IN:  The new object flags for the target object.
    00129  *  @retval Err Returns 0 if no error, error code otherwise.
    00130  **/
    00131 Err
    00132 FrmSetNavEntry (FormType* formP, UInt16 targetObjectID,
    00133                 UInt16 afterObjectID, UInt16 aboveObjectID,
    00134                 UInt16 belowObjectID, FrmNavObjectFlagsType objectFlags)
    00135         SYS_SEL_TRAP (sysTrapNavSelector, NavSelectorFrmSetNavEntry);
    00136
    00137 /**
    00138  *  @brief Gets the current navigation state of a form.
    00139  *
    00140  *  @param formP:   IN:  Pointer to the form whose navigation state is to be obtained.
    00141  *  @param stateFlagsP: IN:  On exit, points to a state flags field that describes the current navigation state
    00142  *  @retval Err Returns 0 if no error, error code otherwise
    00143  **/
    00144 Err
    00145 FrmGetNavState (const FormType* formP, FrmNavStateFlagsType* stateFlagsP)
    00146         SYS_SEL_TRAP (sysTrapNavSelector, NavSelectorFrmGetNavState);
    00147
    00148 /**
    00149  *  @brief Sets the navigation state of a form
    00150  *
    00151  *  @param formP:   IN:  Pointer to the form whose navigation state is being set
    00152  *  @param stateFlags:  IN:  State flags that describe the new navigation state
    00153  *  @retval Err Returns 0 if no error, error code otherwise
    00154  **/
    00155 Err
    00156 FrmSetNavState (FormType* formP, FrmNavStateFlagsType stateFlags)
    00157         SYS_SEL_TRAP (sysTrapNavSelector, NavSelectorFrmSetNavState);
    00158
    00159 /**
    00160  *  @brief
    00161  *
    00162  *  @param formP:   IN:
    00163  *  @param objectID:    IN:
    00164  *  @param extraInfo:   IN:
    00165  *  @param boundsInsideRingP:   IN:
    00166  *  @param ringStyle:   IN:
    00167  *  @param forceRestore:    IN:
    00168  *  @retval Err Error code.
    00169  **/
    00170 Err
    00171 FrmNavDrawFocusRing (FormType* formP, UInt16 objectID, Int16 extraInfo,
    00172                      RectangleType* boundsInsideRingP,
    00173                      FrmNavFocusRingStyleEnum ringStyle, Boolean forceRestore)
    00174         SYS_SEL_TRAP (sysTrapNavSelector, NavSelectorFrmNavDrawFocusRing);
    00175
    00176 /**
    00177  *  @brief
    00178  *
    00179  *  @param formP:   IN:
    00180  *  @retval Err Error code.
    00181  **/
    00182 Err
    00183 FrmNavRemoveFocusRing (FormType* formP)
    00184         SYS_SEL_TRAP (sysTrapNavSelector, NavSelectorFrmNavRemoveFocusRing);
    00185
    00186 /**
    00187  *  @brief
    00188  *
    00189  *  @param formP:   IN:
    00190  *  @param objectIDP:   IN:
    00191  *  @param extraInfoP:  IN:
    00192  *  @param boundsInsideRingP:   IN:
    00193  *  @param ringStyleP:  IN:
    00194  *  @retval Err Error code.
    00195  **/
    00196 Err
    00197 FrmNavGetFocusRingInfo (const FormType* formP, UInt16* objectIDP,
    00198                         Int16* extraInfoP, RectangleType* boundsInsideRingP,
    00199                         FrmNavFocusRingStyleEnum* ringStyleP)
    00200         SYS_SEL_TRAP (sysTrapNavSelector, NavSelectorFrmNavGetFocusRingInfo);
    00201
    00202 #endif // PALMOS_SDK_VERSION < 0x0541
    00203
    00204 /**
    00205  *  @brief
    00206  *
    00207  *  @param formP:   IN:
    00208  *  @param objID:   IN:
    00209  **/
    00210 void
    00211 FrmNavObjectTakeFocus (const FormType* formP, UInt16 objID)
    00212         SYS_SEL_TRAP (sysTrapNavSelector, NavSelectorFrmNavObjectTakeFocus);
    00213
    00214 #ifdef __cplusplus
    00215 }
    00216 #endif
    00217
    00218
    00219 #endif    // __HS_NAV_68K_H__

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