idlehomescreen/nativeuicontroller/inc/ainativeuimodel.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     1 /*
       
     2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Common NativeUi definitions and utilities
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef AINATIVEUIMODEL_H
       
    20 #define AINATIVEUIMODEL_H
       
    21 
       
    22 
       
    23 #include <e32std.h>
       
    24 
       
    25 namespace AiNativeUiController
       
    26 {
       
    27 
       
    28 /**
       
    29  *  Common NativeUi definitions and utilities
       
    30  *
       
    31  *  @since S60 3.2
       
    32  */
       
    33 
       
    34 namespace AiNativeUiModel
       
    35 {
       
    36 	/// Internal identifier for navi pane
       
    37 	_LIT8( KNaviPaneId, "navipane" );
       
    38 
       
    39     /// Constant for unassigned rendering priority value
       
    40     const TInt KNoPriority = KErrNotFound;
       
    41 
       
    42     struct TRenderingPriorityItem;
       
    43     
       
    44 /**
       
    45  * UI Control rendering priorities object.
       
    46  */ 
       
    47 class TRenderingPriorities
       
    48 	{
       
    49 public:
       
    50 
       
    51 	/**
       
    52 	 * Constructor for publishable items that need to be priorized.
       
    53 	 * @param aRenderingPriorities Array of priorized items
       
    54 	 * @aCount Number of items in the array
       
    55 	 */
       
    56 	TRenderingPriorities(const TRenderingPriorityItem* aRenderingPriorities, TInt aCount);
       
    57 
       
    58 	/**
       
    59 	 * Returns rendering priority for given ContentId.
       
    60 	 */
       
    61 	TInt RenderingPriority( TInt aContentId );	
       
    62 	
       
    63 	/**
       
    64 	 * Gets next content id with priority < aNextPriority.
       
    65 	 *
       
    66 	 * @param[in,out] aContentId	Next content id with priority < aNextPriority.
       
    67 	 * @param[in,out] aNextPriority	On entry the priority is used to search the 
       
    68 	 *						item content with next lowest priority. On exit
       
    69 	 *						the parameter's value is the rendering priority 
       
    70 	 *						of aContentId.
       
    71 	 * @return  true if next content item was found, false if out of
       
    72 	 *			content items with lower priority than aNextPriority.
       
    73 	 *			Out parameters are updated only if this function returns true.
       
    74 	 */
       
    75 	TBool GetNextContentId( TInt& aContentId, TInt& aNextPriority );
       
    76 
       
    77 private:  // Data
       
    78 
       
    79 	/**
       
    80 	 * An array that holds rendering priority related items.
       
    81 	 */
       
    82 	const TRenderingPriorityItem* iRenderingPriorities;
       
    83 	
       
    84 	/**
       
    85 	 * Number of items in the array.
       
    86 	 */
       
    87 	TInt iCount;
       
    88 
       
    89 	};
       
    90 
       
    91 /**
       
    92  * Returns rendering priorities for ui control.
       
    93  *
       
    94  * @param aUiElementId  UI control identifier.
       
    95  * @return UI control priorities object.
       
    96  */
       
    97 TRenderingPriorities RenderingPriorities( const TDesC8& aUiElementId );
       
    98     
       
    99 } // namespace AiNativeUiModel
       
   100 
       
   101 } // namespace AiNativeUiController
       
   102 
       
   103 #endif // AINATIVEUIMODEL_H