webengine/widgetengine/inc/WidgetFuncs.h
changeset 0 dd21522fd290
child 13 10e98eab6f85
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Implemetation of CMediaGalleryWidgetFuncs
       
    15 *
       
    16 */
       
    17 #ifndef __WIDGETFUNCS_H__
       
    18 #define __WIDGETFUNCS_H__
       
    19 
       
    20 #include "config.h"
       
    21 #include <kjs/object.h>
       
    22 
       
    23 class MJSWidgetCallbacks;
       
    24 
       
    25 namespace KJS {
       
    26 
       
    27 class CWidgetEventHandler;
       
    28 
       
    29 class JSWidgetFunc : public JSObject
       
    30     {
       
    31     public:
       
    32         JSWidgetFunc(ExecState* exec, int aFuncType, MJSWidgetCallbacks* aWidgetCallbacks);
       
    33         virtual ~JSWidgetFunc();
       
    34 
       
    35     //From JSObject
       
    36     public:
       
    37         bool implementsCall() const;        
       
    38         JSValue* callAsFunction(ExecState *exec, JSObject *thisObj, const List &args);
       
    39         enum{
       
    40             openApplication,
       
    41             openURL,
       
    42             preferenceForKey,
       
    43             prepareForTransition,
       
    44             performTransition,
       
    45             setPreferenceForKey,
       
    46             setNavigationMode,
       
    47             setDisplayLandscape,
       
    48             setDisplayPortrait
       
    49             };
       
    50 
       
    51             
       
    52     private:        
       
    53         int funcType;
       
    54         MJSWidgetCallbacks* m_callbacks;                
       
    55         
       
    56     };
       
    57 
       
    58 };
       
    59 
       
    60 #endif