uiresources_pub/pictograph_api/tsrc/inc/akniconutilsext.h
changeset 0 05e9090e2422
equal deleted inserted replaced
-1:000000000000 0:05e9090e2422
       
     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 "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:  test aknpictographinterface.h
       
    15                       akniconsrvclient.h
       
    16                       akniconutils.h
       
    17                       akninternaliconutils.h
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 #ifndef C_AKNICONUTILSEXT_H
       
    24 #define C_AKNICONUTILSEXT_H
       
    25 
       
    26 
       
    27 #include <akniconutils.h>
       
    28 #include <eikenv.h>
       
    29 #include <akniconobserver.h>
       
    30 
       
    31 class CTestIconProvider : public CBase,
       
    32                           public MAknIconFileProvider
       
    33     {
       
    34 public:
       
    35 
       
    36     /**
       
    37     * Returns an open file handle to the icon file.
       
    38     * This method should leave if an icon file with specified type does
       
    39     * not exist. That may be the case e.g. with MBM file,
       
    40     * if there are no bitmap icons.
       
    41     *
       
    42     * Note! RFs::ShareProtected must be called to the RFs instance used
       
    43     * for opening the file.
       
    44     *
       
    45     * @param aFile Icon file should be opened in this file handle, which
       
    46     * is an empty file handle, when the AknIcon framework calls this method.
       
    47     * The AknIcon framework takes care of closing the file handle after
       
    48     * having used it.
       
    49     * @param aType Icon file type.
       
    50     */
       
    51     virtual void RetrieveIconFileHandleL( RFile& aFile,
       
    52             const TIconFileType aType );
       
    53 
       
    54     /**
       
    55     * With this method, AknIcon framework informs that it does not use
       
    56     * this MAknIconFileProvider instance any more. After this call,
       
    57     * it is ok to delete the object. This can be implemented simply
       
    58     * e.g. by deleting self in this callback.
       
    59     * Normally, this callback is invoked when the icon in question
       
    60     * is deleted.
       
    61     * Note, however, that if the same MAknIconFileProvider instance is
       
    62     * supplied in multiple CreateIcon calls, then it must be accessible
       
    63     * by AknIcon framework until it has signalled a matching amount
       
    64     * of these callbacks.
       
    65     */
       
    66     virtual void Finished();
       
    67 
       
    68 private: // data
       
    69 
       
    70     /**
       
    71      * Not Own
       
    72      */
       
    73     CEikonEnv* iEnv;
       
    74 
       
    75     };
       
    76 
       
    77 class CTestIconObserver : public CBase,
       
    78                           public MAknIconObserver
       
    79     {
       
    80     public:
       
    81 
       
    82         /**
       
    83         * This is an abstract class for specifying an interface for 
       
    84         * receiving notifications when an icon's frame buffer has been updated.
       
    85         * An object of derived class implementing this interface should be registered
       
    86         * for a given icon to the AknIcon framework using 
       
    87         * function AknIconUtils::SetObserver().
       
    88         * 
       
    89         * AknIcon framework calls this function whenever the frame buffer of the observed icon
       
    90         * changes. This observer mechanism is mainly useful in animated icons cases.
       
    91         * The observer e.g. can redraw the icon on the screen when the frame of the animated 
       
    92         * icon has changed.
       
    93         *
       
    94         * @since 2.8
       
    95         * @param aBitmap bitmap or mask of the icon
       
    96         */
       
    97         virtual void BitmapChanged( CFbsBitmap* aBitmap );
       
    98 
       
    99     };
       
   100 
       
   101 #endif // C_AKNICONUTILSEXT_H