epoc32/include/e32event.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
     1.1 --- a/epoc32/include/e32event.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/e32event.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,9 +1,9 @@
     1.4  // Copyright (c) 1995-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 +// under the terms of the License "Eclipse Public License v1.0"
     1.9  // which accompanies this distribution, and is available
    1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12  //
    1.13  // Initial Contributors:
    1.14  // Nokia Corporation - initial contribution.
    1.15 @@ -18,6 +18,9 @@
    1.16  #ifndef __E32EVENT_H__
    1.17  #define __E32EVENT_H__
    1.18  #include <e32cmn.h>
    1.19 +#ifdef BTRACE_TRAWEVENT	
    1.20 +#include <e32btrace.h>
    1.21 +#endif
    1.22  
    1.23  /**
    1.24  @publishedAll
    1.25 @@ -288,6 +291,7 @@
    1.26  	IMPORT_C TPoint Pos() const;
    1.27  	IMPORT_C TInt ScanCode() const;
    1.28      IMPORT_C TInt Modifiers() const;
    1.29 +	IMPORT_C TInt Repeats() const;
    1.30      
    1.31      /**
    1.32      Gets the Cartesian coordinates of the 3D pointer end that is closer to the screen.
    1.33 @@ -339,7 +343,11 @@
    1.34  	@param aTip A Boolean indicating which end of the pointing device is closer to the screen.
    1.35  	*/	
    1.36  	inline void SetTip(TBool aTip)
    1.37 -		{iTip = TUint8(aTip);}
    1.38 +		{iTip = TUint8(aTip);
    1.39 +#ifdef BTRACE_TRAWEVENT	
    1.40 +		BTraceContext4(BTrace::ERawEvent, BTrace::ESetTipEvent,(TUint32)aTip);
    1.41 +#endif
    1.42 +		}
    1.43  
    1.44  	IMPORT_C void Set(TType aType,TInt aScanCode);
    1.45  	IMPORT_C void Set(TType aType,TInt aX,TInt aY);
    1.46 @@ -350,18 +358,53 @@
    1.47  
    1.48  	IMPORT_C void SetTilt(TType aType,TInt aPhi,TInt aTheta);
    1.49  	IMPORT_C void SetRotation(TType aType,TInt aAlpha);
    1.50 +	IMPORT_C void SetRepeat(TType aType,TInt aScanCode,TInt aRepeats);
    1.51  
    1.52 +	/**
    1.53 +	@return the pointer number of the the event
    1.54 +	*/
    1.55 +	inline TUint8 PointerNumber() const
    1.56 +		{
    1.57 +		return iPointerNumber;
    1.58 +		}
    1.59 +
    1.60 +
    1.61 +	/**
    1.62 +	The pointer number for the event is set
    1.63 +	The pointer  number should be more or equal 0 and should be less than HALData::EPointerMaxPointers,
    1.64 +	otherwise WSERV would ignore the event,ie 	0 <= aPointerNumber < HALData::EPointerMaxPointers 
    1.65 +	@param	aPointerNumber
    1.66 +	Error conditions: None.
    1.67 +	*/
    1.68 +	inline void SetPointerNumber(const TUint8 aPointerNumber)
    1.69 +		{
    1.70 +		iPointerNumber=aPointerNumber;	
    1.71 +#ifdef BTRACE_TRAWEVENT	
    1.72 +		BTraceContext4(BTrace::ERawEvent, BTrace::ESetPointerNumberEvent,(TUint32)aPointerNumber);
    1.73 +#endif
    1.74 +		}
    1.75 +
    1.76 +    /**
    1.77 +	Initialises the event with the supplied information	
    1.78 +	@param	aType	The event type.
    1.79 +	@param	aX		The X position.
    1.80 +	@param	aY		The Y position.
    1.81 +	@param	aZ		The Z position.
    1.82 +	@param  aPointerNumber   The pointer number for the event
    1.83 +	*/
    1.84 +	IMPORT_C void Set (TType aType, TInt aX, TInt aY, TInt aZ, TUint8 aPointerNumber);
    1.85 +	
    1.86  protected:
    1.87  	TUint8 iType;
    1.88  	TUint8 iTip;	/**< Indicates whether the tip or head of pointing device is closer to screen.*/
    1.89 -	TUint8 iSpare2;
    1.90 +	TUint8 iPointerNumber; //
    1.91  	TUint8 iDeviceNumber;
    1.92  	TUint iTicks;
    1.93  	union
    1.94  		{
    1.95  		struct {TInt x;TInt y;} pos;
    1.96  		struct {TInt x;TInt y;TInt z;TInt phi;TInt theta;TInt alpha;} pos3D;
    1.97 -		TInt scanCode;
    1.98 +		struct {TInt scanCode;TInt repeats;} key;
    1.99  		TInt modifiers;
   1.100  		} iU;
   1.101  	};
   1.102 @@ -388,23 +431,9 @@
   1.103  	inline TRawEvent &Event() const {return(*((TRawEvent *)&iBuf[0]));}
   1.104  	};
   1.105  
   1.106 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
   1.107 +#include <e32event_private.h>
   1.108 +#endif
   1.109  
   1.110 +#endif
   1.111  
   1.112 -
   1.113 -/**
   1.114 -@publishedPartner
   1.115 -@released
   1.116 -
   1.117 -Encapsulates information about a device's display screen.
   1.118 -*/
   1.119 -class TScreenInfoV01
   1.120 -	{
   1.121 -public:
   1.122 -	TBool iWindowHandleValid; /**< Indicates whether the window handle is valid.*/
   1.123 -	TAny *iWindowHandle;      /**< The window handle.*/
   1.124 -	TBool iScreenAddressValid;/**< Indicates whether the screen address is valid.*/
   1.125 -	TAny *iScreenAddress;     /**< The linear address of the screen.*/
   1.126 -	TSize iScreenSize;        /**< The size of the screen.*/
   1.127 -	};
   1.128 -//
   1.129 -#endif