os/mm/mmlibs/mmfw/inc/surfaceeventhandler.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmlibs/mmfw/inc/surfaceeventhandler.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,77 @@
     1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef SURFACEEVENTHANDLER_H
    1.20 +#define SURFACEEVENTHANDLER_H
    1.21 +
    1.22 +#include <mmf/common/mmfvideo.h>
    1.23 +
    1.24 +class TSurfaceId;
    1.25 +
    1.26 +/**
    1.27 +Clients intending to use ‘window-less’ graphics surfaces need to handle graphics surface specific events
    1.28 +generated by the MultiMedia Framework (MMF). The MMMFSurfaceEventHandler interface allows client to receive
    1.29 +these graphics surface specific events. A client intending to use the CVideoPlayerUtility2::AddDisplayL API
    1.30 +must implement this interface.
    1.31 +
    1.32 +@see CVideoPlayerUtility2
    1.33 +
    1.34 +@publishedPartner
    1.35 +@prototype
    1.36 +*/
    1.37 +
    1.38 +class MMMFSurfaceEventHandler
    1.39 +	{
    1.40 +public:
    1.41 +	/**
    1.42 +	MmsehSurfaceCreated is called when a graphics surface has been created on an added display. 
    1.43 +	Clients will only be notified of surfaces created on displays that they have added. 
    1.44 +	MMF still owns the graphics surface and can request the surface to be released by the client. 
    1.45 +	Before this method is called by CVideoPlayerUtility2 the graphics surface is registered with
    1.46 +	the Window Server.
    1.47 +
    1.48 +	@see TVideoAspectRatio
    1.49 +
    1.50 +	@param aDisplayId Display id the surface was created on.
    1.51 +	@param aId surface Id of graphics surface created.
    1.52 +	@param aCropRect Crop rectangle. The crop rectangle is the area of graphics surface containing viewable video. 
    1.53 +	@param aAspectRatio Aspect ratio of video.
    1.54 +	*/
    1.55 +
    1.56 +	virtual void MmsehSurfaceCreated(TInt aDisplayId, const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio) = 0;
    1.57 +
    1.58 +	/**
    1.59 +	MmsehSurfaceParametersChanged is called when either crop rectangle or aspect ratio of the surface changes.
    1.60 +
    1.61 +	@param aId Surface id of graphics surface with changed parameters.
    1.62 +	@param aCropRect New crop rectangle, this may be identical to previous value. The crop rectangle is the area of graphics surface containing viewable video.
    1.63 +	@param aAspectRatio New aspect ratio of video, this may be identical to previous value.
    1.64 +	*/
    1.65 +	virtual void MmsehSurfaceParametersChanged(const TSurfaceId& aId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio) = 0;
    1.66 +
    1.67 +	/**
    1.68 +	MmsehSurfaceRemoved is called when the MultiMedia Framework indicates that the surface is to be removed.
    1.69 +	Clients should stop using the graphics surface identified by aId before returning from the callback. 
    1.70 +	Further, clients should be prepared to receive a MmsehSurfaceCreated callback event with a new graphics
    1.71 +	surface to use.
    1.72 +
    1.73 +	@param aId Surface id of graphics surface to be removed.
    1.74 +	*/
    1.75 +
    1.76 +	virtual void MmsehRemoveSurface(const TSurfaceId& aId) = 0;
    1.77 +	};
    1.78 +
    1.79 +#endif // SURFACEEVENTHANDLER_H
    1.80 +