widgets/widgetapp/inc/widgetappdefs.rh
changeset 0 dd21522fd290
child 16 a359256acfc6
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2008 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 the License "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:  Global definitions for Widget UI.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WIDGETAPPDEFS_RH
       
    20 #define WIDGETAPPDEFS_RH
       
    21 
       
    22 /* Application UID of WidgetUI. */
       
    23 #define KWidgetAppUid 0x10282822 
       
    24 
       
    25 /**
       
    26 * When launching a widget, widget UID needs to be provided. In case the
       
    27 * widget is supposed to be put to Home Screen's miniview, the size of 
       
    28 * widget must be provided also. Default non-miniview value for size is (0, 0).
       
    29 *
       
    30 * The data is provided to WidgetUI in TUInt8 descriptor, so it can be read
       
    31 * with RReadStream. The descriptor is passed to WidgetUI as command line 
       
    32 * parameter, as in RApaLsSession::StartDocument.
       
    33 *
       
    34 * Message parameter format for WidgetUI for launching a widget:
       
    35 * TUInt32 TUInt32 TInt32 TInt32 
       
    36 * Description:
       
    37 *
       
    38 * Protocol version (currently 1)
       
    39 * UID of widget
       
    40 * Miniview width value (scaled down to TInt automatically)
       
    41 * Miniview height value (scaled down to TInt automatically).
       
    42 
       
    43 * There is no protocol version identifier in the message due to 
       
    44 * legacy reasons (S60 ver 3.2.3). For 5.0
       
    45 *
       
    46 * It is possible to bring a widget to foreground also by 
       
    47 * calling TApaTask::BringToForeground when WidgetUI is already running. 
       
    48 * In this case, use UID KNullUid.
       
    49 */
       
    50 /* sizeof( TUint32 )+ sizeof( TUid ) + sizeof( TInt32 ) */
       
    51 #define KWidgetUiMaxMessageLength 12
       
    52 
       
    53 enum TWidgetOperations
       
    54     {
       
    55     LaunchFullscreen,
       
    56     LaunchMiniview,
       
    57     Deactivate,
       
    58     WidgetResume,
       
    59     WidgetSuspend,
       
    60     WidgetSelect,
       
    61     Uninitialized
       
    62     };
       
    63 
       
    64 #endif // WIDGETAPPDEFS_RH
       
    65 
       
    66 // End of File