661 EPasswordAlwaysTriggerNow, |
650 EPasswordAlwaysTriggerNow, |
662 /** Equivalent to setting the password mode to EPasswordOnceADay and triggering |
651 /** Equivalent to setting the password mode to EPasswordOnceADay and triggering |
663 an instant password check. */ |
652 an instant password check. */ |
664 EPasswordOnceADayTriggerNow, |
653 EPasswordOnceADayTriggerNow, |
665 }; |
654 }; |
666 struct TTextCursor |
655 enum TPriorities { |
667 /** Text cursor parameter information. |
656 /** |
668 |
657 Defines the value EAllPriorities. |
669 A text cursor is a rectangular area which can be set to flash. It is normally |
658 */ |
670 only visible when the window group which owns it has the keyboard focus. This |
659 EAllPriorities=KMinTInt, |
671 structure is used to define the parameters of a text cursor, which can be |
660 }; |
672 selected for use through the window group using RWindowGroup::SetTextCursor(). |
|
673 |
|
674 Custom (non-rectangular) text cursors are supported from v7.0s. They are added |
|
675 to the window server using RWsSession::SetCustomTextCursor(), after which |
|
676 they can be selected for use through the window group, in the same way as |
|
677 standard rectangular cursors. They have a unique identifier, stored in the |
|
678 iType member, which must be greater than ETypeLastBasic. Custom text cursors |
|
679 are clipped to their iHeight and iWidth values. Their iColour member is not |
|
680 used. |
|
681 |
|
682 @publishedAll |
|
683 @released */ |
|
684 { |
|
685 // The different normal text cursors |
|
686 // A Text cursor can either be a predefined one |
|
687 // or a general sprite. Cursors between ETypeFirst |
|
688 // and ETypeLastBasic are predefined ones (even though |
|
689 // the ones above ETypeLast do not exist and are |
|
690 // for future use) |
|
691 /** Cursor type values. |
|
692 |
|
693 The values between ETypeFirst and ETypeLastBasic are reserved for predefined |
|
694 cursors. Custom text cursors must have a value greater than ETypeLastBasic. |
|
695 |
|
696 The values not listed below are for internal use only. */ |
|
697 enum ENamedCursors |
|
698 { |
|
699 /** @internalAll */ |
|
700 ETypeNone, |
|
701 /** Standard filled rectangular cursor. */ |
|
702 ETypeRectangle, |
|
703 /** Standard hollow rectangular cursor. */ |
|
704 ETypeHollowRectangle, |
|
705 /** The first predefined cursor type. |
|
706 |
|
707 Equivalent to ETypeRectangle. This can be used for iterating through the predefined |
|
708 cursor types. */ |
|
709 ETypeFirst=ETypeRectangle, |
|
710 /** The last predefined cursor type. |
|
711 |
|
712 Equivalent to ETypeHollowRectangle. This can be used for iterating through |
|
713 the predefined cursor types. */ |
|
714 ETypeLast=ETypeHollowRectangle, |
|
715 /** Reserved for future use. |
|
716 |
|
717 All custom text cursors must have a type value greater than this. */ |
|
718 ETypeLastBasic = 1000, |
|
719 }; |
|
720 /** Added for compatibility with previous releases. */ |
|
721 typedef TInt EType; |
|
722 /** Cursor flash and clipping flags. |
|
723 |
|
724 The flags not listed below are for internal use only. */ |
|
725 enum EFlags |
|
726 { |
|
727 /** The text cursor should not flash. */ |
|
728 EFlagNoFlash = 0x00000001, |
|
729 /** The bitmap of each sprite member is clipped left of its x-origin and right of |
|
730 its x-origin plus iWidth. |
|
731 |
|
732 Used for custom text cursors only. */ |
|
733 EFlagClipHorizontal = 0x00000002, |
|
734 /** The bitmap of each sprite member is clipped vertically. |
|
735 |
|
736 How it is clipped depends on the text cursor's vertical alignment, see the |
|
737 TCustomTextCursorAlignment enum in class RWsSession. |
|
738 |
|
739 Used for custom text cursors only. */ |
|
740 EFlagClipVertical = 0x00000004, |
|
741 /** @internalComponent */ |
|
742 EUserFlags = 0x0000FFFF, |
|
743 /** @internalComponent */ |
|
744 EFlagClipped = 0x00010000, |
|
745 /** @internalComponent */ |
|
746 EPrivateFlags = 0xFFFF0000, |
|
747 }; |
|
748 /** The cursor type. |
|
749 |
|
750 For possible values, see the ENamedCursors enum. */ |
|
751 TInt iType; |
|
752 /** The height of the text cursor. |
|
753 |
|
754 This value is also used for clipping custom text cursors, if the EFlagClipVertical |
|
755 flag is set. */ |
|
756 TInt iHeight; |
|
757 /** The ascent of the text cursor (the distance between the origin and the top). */ |
|
758 TInt iAscent; |
|
759 /** The width of the text cursor. |
|
760 |
|
761 Custom text cursors are clipped to this value, if the EFlagClipHorizontal |
|
762 flag is set. */ |
|
763 TInt iWidth; |
|
764 /** Cursor flash and clipping flags. |
|
765 |
|
766 For possible values, see the EFlags enum. */ |
|
767 TUint iFlags; |
|
768 /** The colour of the text cursor. |
|
769 |
|
770 If the cursor is flashing, this colour is XOR'd with the screen. |
|
771 |
|
772 This value is not used for custom text cursors. */ |
|
773 TRgb iColor; |
|
774 }; |
|
775 |
661 |
776 /** Sprite flags. |
662 /** Sprite flags. |
777 |
663 |
778 These can be combined using a bit-wise OR operation. |
664 These can be combined using a bit-wise OR operation. |
779 |
665 |
785 { |
671 { |
786 /** Flash sprite on and off. |
672 /** Flash sprite on and off. |
787 |
673 |
788 All flashing is done on the same timer, including the text cursor. */ |
674 All flashing is done on the same timer, including the text cursor. */ |
789 ESpriteFlash=0x1, |
675 ESpriteFlash=0x1, |
790 /** With this flag set, the sprite is displayed over the window and all its children. |
676 /** This flag no longer has any effect. |
791 |
677 |
792 Without the flag, the sprite is only displayed over the window's visible area. |
678 If you want a sprite to appear on top of all windows, you can create a floating sprite |
793 |
679 by specifying a RWindowGroup as parent to the sprite. */ |
794 This is particularly useful when the sprite is owned by a window group, as |
|
795 it means the sprite will be displayed over the whole screen. |
|
796 |
|
797 Notes: |
|
798 |
|
799 By default a sprite is clipped to the visible region of the window that owns |
|
800 it. |
|
801 |
|
802 Sprites with this flag set are displayed in front of sprites without this |
|
803 flag. */ |
|
804 ESpriteNoChildClip=0x2, |
680 ESpriteNoChildClip=0x2, |
805 /** The sprite's appearance will not change when it is on a shadowed part of the |
681 /** The sprite's appearance will not change when it is on a shadowed part of the |
806 screen. |
682 screen. |
807 |
683 |
808 (Typically this is used for sprites attached to window groups so that |
684 (Typically this is used for sprites attached to window groups so that |
809 they are perceived to be floating above the windows). */ |
685 they are perceived to be floating above the windows). */ |
810 ESpriteNoShadows=0x4, |
686 ESpriteNoShadows=0x4 |
811 /** @internalComponent */ |
|
812 ESpriteNonSystemFlags=0x0000FFFF, |
|
813 /** @internalComponent */ |
|
814 ESpriteSystemFlags= 0xFFFF0000, |
|
815 /** @internalComponent */ |
|
816 ESpritePointer=0x10000, |
|
817 /** @internalComponent */ |
|
818 ESpriteOOM=0x20000, |
|
819 /** @internalComponent */ |
|
820 ESpriteDisabled=0x40000, |
|
821 /** @internalComponent */ |
|
822 ESpriteActive=0x80000, |
|
823 }; |
687 }; |
824 |
688 |
825 struct TSpriteMember |
689 struct TSpriteMember |
826 /** Sprite member. |
690 /** Sprite member. |
827 |
691 |
1169 { |
993 { |
1170 public: |
994 public: |
1171 /** Event data size. */ |
995 /** Event data size. */ |
1172 enum |
996 enum |
1173 { |
997 { |
1174 /** The size of a TPointerEvent. |
998 /** |
1175 |
|
1176 This is the maximum number of bytes of data that can be returned by EventData(). |
999 This is the maximum number of bytes of data that can be returned by EventData(). |
1177 Note: this value is 24 bytes.*/ |
1000 Note: this value is 32 bytes.*/ |
1178 EWsEventDataSize=sizeof(TPointerEvent)+8 |
1001 EWsEventDataSize=sizeof(TAdvancedPointerEvent) |
1179 }; |
1002 }; |
1180 public: |
1003 public: |
1181 inline TPointerEvent* Pointer() const; |
1004 inline TWsEvent(); |
|
1005 inline TAdvancedPointerEvent* Pointer() const; |
1182 inline TKeyEvent* Key() const; |
1006 inline TKeyEvent* Key() const; |
1183 inline TModifiersChangedEvent* ModifiersChanged() const; |
1007 inline TModifiersChangedEvent* ModifiersChanged() const; |
1184 inline TWsVisibilityChangedEvent* VisibilityChanged(); |
1008 inline TWsVisibilityChangedEvent* VisibilityChanged(); |
1185 inline const TWsVisibilityChangedEvent* VisibilityChanged() const; |
1009 inline const TWsVisibilityChangedEvent* VisibilityChanged() const; |
|
1010 inline TWsDisplayChangedEvent* DisplayChanged(); |
|
1011 inline const TWsDisplayChangedEvent* DisplayChanged() const; |
1186 inline TWsErrorMessage* ErrorMessage() const; |
1012 inline TWsErrorMessage* ErrorMessage() const; |
1187 inline TUint8* EventData() const; |
1013 inline TUint8* EventData() const; |
1188 inline TInt Type() const; |
1014 inline TInt Type() const; |
1189 inline TUint Handle() const; |
1015 inline TUint Handle() const; |
1190 inline TTime Time() const; |
1016 inline TTime Time() const; |
1191 inline void SetType(TInt aType); |
1017 inline void SetType(TInt aType); |
1192 inline void SetHandle(TUint aHandle); |
1018 inline void SetHandle(TUint aHandle); |
1193 inline void SetTimeNow(); |
1019 inline void SetTimeNow(); |
1194 inline TInt* Int() const; |
1020 inline TInt* Int() const; |
|
1021 IMPORT_C void InitAdvancedPointerEvent(TPointerEvent::TType aType, TUint aModifiers, const TPoint3D &aPoint3D, TUint8 aPointerNumber); |
|
1022 IMPORT_C void SetPointerNumber(TUint8 aPointerNumber); |
|
1023 IMPORT_C void SetPointerZ(TInt aZ); |
1195 protected: |
1024 protected: |
1196 /** @internalComponent */ |
1025 TInt iType; /**< WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only. */ |
1197 TInt iType; |
1026 TUint iHandle; /**< WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only. */ |
1198 /** @internalComponent */ |
1027 TTime iTime; /**< WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only. */ |
1199 TUint iHandle; |
1028 TUint8 iEventData[EWsEventDataSize]; /**< WARNING: Member variable for internal use ONLY. Compatibility is not guaranteed in future releases. Please access using the provided get/set APIs only. */ |
1200 /** @internalComponent */ |
|
1201 TTime iTime; |
|
1202 /** @internalComponent */ |
|
1203 TUint8 iEventData[EWsEventDataSize]; |
|
1204 }; |
1029 }; |
1205 |
1030 |
1206 |
1031 |
1207 class RWsPointerCursor; |
1032 class RWsPointerCursor; |
1208 |
1033 |
1543 public: |
1378 public: |
1544 IMPORT_C RWsSession(); |
1379 IMPORT_C RWsSession(); |
1545 IMPORT_C TInt Connect(); |
1380 IMPORT_C TInt Connect(); |
1546 IMPORT_C TInt Connect(RFs& aFileServer); |
1381 IMPORT_C TInt Connect(RFs& aFileServer); |
1547 IMPORT_C void Close(); |
1382 IMPORT_C void Close(); |
1548 IMPORT_C TVersion Version(); |
1383 IMPORT_C TVersion Version() const; |
1549 |
1384 |
1550 IMPORT_C TInt SetHotKey(THotKey aType, TUint aKeyCode, TUint aModifierMask, TUint aModifier); |
1385 IMPORT_C TInt SetHotKey(THotKey aType, TUint aKeyCode, TUint aModifierMask, TUint aModifier); |
1551 IMPORT_C TInt ClearHotKeys(THotKey aType); |
1386 IMPORT_C TInt ClearHotKeys(THotKey aType); |
1552 IMPORT_C TInt RestoreDefaultHotKey(THotKey aType); |
1387 IMPORT_C TInt RestoreDefaultHotKey(THotKey aType); |
1553 // |
1388 // |
1554 IMPORT_C void EventReady(TRequestStatus *aStat); |
1389 IMPORT_C void EventReady(TRequestStatus *aStat); |
1555 IMPORT_C void EventReadyCancel(); |
1390 IMPORT_C void EventReadyCancel(); |
1556 IMPORT_C void GetEvent(TWsEvent &aEvent); |
1391 IMPORT_C void GetEvent(TWsEvent &aEvent) const; |
1557 IMPORT_C void PurgePointerEvents(); |
1392 IMPORT_C void PurgePointerEvents(); |
1558 // |
1393 // |
1559 IMPORT_C void RedrawReady(TRequestStatus *aStat); |
1394 IMPORT_C void RedrawReady(TRequestStatus *aStat); |
1560 IMPORT_C void RedrawReadyCancel(); |
1395 IMPORT_C void RedrawReadyCancel(); |
1561 IMPORT_C void GetRedraw(TWsRedrawEvent &aEvent); |
1396 IMPORT_C void GetRedraw(TWsRedrawEvent &aEvent); |
1562 // |
1397 // |
1563 IMPORT_C void PriorityKeyReady(TRequestStatus *aStat); |
1398 IMPORT_C void PriorityKeyReady(TRequestStatus *aStat); |
1564 IMPORT_C void PriorityKeyReadyCancel(); |
1399 IMPORT_C void PriorityKeyReadyCancel(); |
1565 IMPORT_C void GetPriorityKey(TWsPriorityKeyEvent &aEvent); |
1400 IMPORT_C void GetPriorityKey(TWsPriorityKeyEvent &aEvent) const; |
1566 // |
1401 // |
1567 IMPORT_C void Flush(); |
1402 IMPORT_C void Flush(); |
1568 IMPORT_C TBool SetAutoFlush(TBool aState); |
1403 IMPORT_C TBool SetAutoFlush(TBool aState); |
1569 IMPORT_C TInt SetKeyboardRepeatRate(const TTimeIntervalMicroSeconds32 &aInitialTime, const TTimeIntervalMicroSeconds32 &aTime); |
1404 IMPORT_C TInt SetKeyboardRepeatRate(const TTimeIntervalMicroSeconds32 &aInitialTime, const TTimeIntervalMicroSeconds32 &aTime); |
1570 IMPORT_C void GetKeyboardRepeatRate(TTimeIntervalMicroSeconds32 &aInitialTime, TTimeIntervalMicroSeconds32 &aTime); |
1405 IMPORT_C void GetKeyboardRepeatRate(TTimeIntervalMicroSeconds32 &aInitialTime, TTimeIntervalMicroSeconds32 &aTime) const; |
1571 IMPORT_C void GetDoubleClickSettings(TTimeIntervalMicroSeconds32 &aInterval, TInt &aDistance); |
1406 IMPORT_C void GetDoubleClickSettings(TTimeIntervalMicroSeconds32 &aInterval, TInt &aDistance) const; |
1572 IMPORT_C TInt SetDoubleClick(const TTimeIntervalMicroSeconds32 &aInterval, TInt aDistance); |
1407 IMPORT_C TInt SetDoubleClick(const TTimeIntervalMicroSeconds32 &aInterval, TInt aDistance); |
1573 // |
1408 // |
1574 IMPORT_C TInt NumWindowGroups() const; |
1409 IMPORT_C TInt NumWindowGroups() const; |
1575 IMPORT_C TInt WindowGroupList(CArrayFixFlat<TInt> *aWindowList); |
1410 IMPORT_C TInt WindowGroupList(CArrayFixFlat<TInt> *aWindowList) const; |
1576 IMPORT_C TInt WindowGroupList(RArray<TWindowGroupChainInfo>* aWindowList); |
1411 IMPORT_C TInt WindowGroupList(RArray<TWindowGroupChainInfo>* aWindowList) const; |
1577 IMPORT_C TInt NumWindowGroups(TInt aPriority) const; |
1412 IMPORT_C TInt NumWindowGroups(TInt aPriority) const; |
1578 IMPORT_C TInt WindowGroupList(TInt aPriority, CArrayFixFlat<TInt> *aWindowList); |
1413 IMPORT_C TInt WindowGroupList(TInt aPriority, CArrayFixFlat<TInt> *aWindowList) const; |
1579 IMPORT_C TInt WindowGroupList(TInt aPriority, RArray<TWindowGroupChainInfo>* aWindowList); |
1414 IMPORT_C TInt WindowGroupList(TInt aPriority, RArray<TWindowGroupChainInfo>* aWindowList) const; |
1580 IMPORT_C TInt GetFocusWindowGroup(); |
1415 IMPORT_C TInt GetFocusWindowGroup() const; |
1581 IMPORT_C TInt GetDefaultOwningWindow(); |
1416 IMPORT_C TInt GetDefaultOwningWindow() const; |
1582 IMPORT_C TInt SetWindowGroupOrdinalPosition(TInt aIdentifier, TInt aPosition); |
1417 IMPORT_C TInt SetWindowGroupOrdinalPosition(TInt aIdentifier, TInt aPosition); |
1583 IMPORT_C TInt GetWindowGroupClientThreadId(TInt aIdentifier, TThreadId &aThreadId); |
1418 IMPORT_C TInt GetWindowGroupClientThreadId(TInt aIdentifier, TThreadId &aThreadId) const; |
1584 IMPORT_C TInt GetWindowGroupHandle(TInt aIdentifier); |
1419 IMPORT_C TInt GetWindowGroupHandle(TInt aIdentifier) const; |
1585 IMPORT_C TInt GetWindowGroupOrdinalPriority(TInt aIdentifier); |
1420 IMPORT_C TInt GetWindowGroupOrdinalPriority(TInt aIdentifier) const; |
1586 IMPORT_C TInt SendEventToWindowGroup(TInt aIdentifier, const TWsEvent &aEvent); |
1421 IMPORT_C TInt SendEventToWindowGroup(TInt aIdentifier, const TWsEvent &aEvent); |
1587 IMPORT_C TInt SendEventToAllWindowGroups(const TWsEvent &aEvent); |
1422 IMPORT_C TInt SendEventToAllWindowGroups(const TWsEvent &aEvent); |
1588 IMPORT_C TInt SendEventToAllWindowGroups(TInt aPriority, const TWsEvent &aEvent); |
1423 IMPORT_C TInt SendEventToAllWindowGroups(TInt aPriority, const TWsEvent &aEvent); |
1589 IMPORT_C TInt SendEventToOneWindowGroupsPerClient(const TWsEvent &aEvent); |
1424 IMPORT_C TInt SendEventToOneWindowGroupsPerClient(const TWsEvent &aEvent); |
1590 IMPORT_C TInt GetWindowGroupNameFromIdentifier(TInt aIdentifier, TDes &aWindowName); |
1425 IMPORT_C TInt GetWindowGroupNameFromIdentifier(TInt aIdentifier, TDes &aWindowName) const; |
1591 IMPORT_C TInt FindWindowGroupIdentifier(TInt aPreviousIdentifier,const TDesC& aMatch,TInt aOffset=0); |
1426 IMPORT_C TInt FindWindowGroupIdentifier(TInt aPreviousIdentifier,const TDesC& aMatch,TInt aOffset=0) const; |
1592 IMPORT_C TInt FindWindowGroupIdentifier(TInt aPreviousIdentifier,TThreadId aThreadId); |
1427 IMPORT_C TInt FindWindowGroupIdentifier(TInt aPreviousIdentifier,TThreadId aThreadId) const; |
1593 IMPORT_C TInt SendMessageToWindowGroup(TInt aIdentifier, TUid aUid, const TDesC8 &aParams); |
1428 IMPORT_C TInt SendMessageToWindowGroup(TInt aIdentifier, TUid aUid, const TDesC8 &aParams); |
1594 IMPORT_C TInt SendMessageToAllWindowGroups(TUid aUid, const TDesC8& aParams); |
1429 IMPORT_C TInt SendMessageToAllWindowGroups(TUid aUid, const TDesC8& aParams); |
1595 IMPORT_C TInt SendMessageToAllWindowGroups(TInt aPriority, TUid aUid, const TDesC8& aParams); |
1430 IMPORT_C TInt SendMessageToAllWindowGroups(TInt aPriority, TUid aUid, const TDesC8& aParams); |
1596 IMPORT_C TInt FetchMessage(TUid &aUid, TPtr8 &aParams, const TWsEvent& aMessageEvent); |
1431 IMPORT_C TInt FetchMessage(TUid &aUid, TPtr8 &aParams, const TWsEvent& aMessageEvent) const; |
1597 // |
1432 // |
1598 IMPORT_C void SetShadowVector(const TPoint &aVector); |
1433 IMPORT_C void SetShadowVector(const TPoint &aVector); |
1599 IMPORT_C TPoint ShadowVector() const; |
1434 IMPORT_C TPoint ShadowVector() const; |
1600 // |
1435 // |
1601 IMPORT_C void SetBackgroundColor(TRgb aColor); |
1436 IMPORT_C void SetBackgroundColor(TRgb aColor); |
1602 IMPORT_C TRgb GetBackgroundColor() const; |
1437 IMPORT_C TRgb GetBackgroundColor() const; |
1603 // |
1438 // |
1604 IMPORT_C TInt RegisterSurface(TInt aScreenNumber, const TSurfaceId& aSurface); ///< @publishedPartner |
1439 IMPORT_C TInt RegisterSurface(TInt aScreenNumber, const TSurfaceId& aSurface); |
1605 IMPORT_C void UnregisterSurface(TInt aScreenNumber, const TSurfaceId& aSurface); ///< @publishedPartner |
1440 IMPORT_C void UnregisterSurface(TInt aScreenNumber, const TSurfaceId& aSurface); |
1606 IMPORT_C TInt PreferredSurfaceConfigurationSize(); ///< @publishedPartner |
1441 IMPORT_C TInt PreferredSurfaceConfigurationSize() const; |
1607 // |
1442 // |
1608 IMPORT_C TInt SetSystemPointerCursor(const RWsPointerCursor &aPointerCursor,TInt aCursorNumber); |
1443 IMPORT_C TInt SetSystemPointerCursor(const RWsPointerCursor &aPointerCursor,TInt aCursorNumber); |
1609 IMPORT_C void ClearSystemPointerCursor(TInt aCursorNumber); |
1444 IMPORT_C void ClearSystemPointerCursor(TInt aCursorNumber); |
1610 IMPORT_C TInt ClaimSystemPointerCursorList(); |
1445 IMPORT_C TInt ClaimSystemPointerCursorList(); |
1611 IMPORT_C void FreeSystemPointerCursorList(); |
1446 IMPORT_C void FreeSystemPointerCursorList(); |
1612 // |
1447 // |
1613 IMPORT_C TInt SetCustomTextCursor(TInt aIdentifier, const TArray<TSpriteMember>& aSpriteMemberArray, TUint aSpriteFlags, TCustomTextCursorAlignment aAlignment); |
1448 IMPORT_C TInt SetCustomTextCursor(TInt aIdentifier, const TArray<TSpriteMember>& aSpriteMemberArray, TUint aSpriteFlags, TCustomTextCursorAlignment aAlignment); |
1614 // |
1449 // |
1615 IMPORT_C TInt ResourceCount(); |
1450 IMPORT_C TInt ResourceCount() const; |
1616 IMPORT_C void PasswordEntered(); |
1451 IMPORT_C void PasswordEntered(); |
1617 IMPORT_C void ComputeMode(TComputeMode aMode); |
1452 IMPORT_C void ComputeMode(TComputeMode aMode); |
1618 // |
1453 // |
1619 IMPORT_C TInt HeapCount() const; |
1454 IMPORT_C TInt HeapCount() const; |
1620 IMPORT_C TInt DebugInfo(TInt aFunction, TInt aParam=0) const; |
1455 IMPORT_C TInt DebugInfo(TInt aFunction, TInt aParam=0) const; |
1621 IMPORT_C TInt DebugInfo(TInt aFunction, TDes8& aReturnBuf, TInt aParam=0) const; |
1456 IMPORT_C TInt DebugInfo(TInt aFunction, TDes8& aReturnBuf, TInt aParam=0) const; |
1622 IMPORT_C void HeapSetFail(TInt aTAllocFail,TInt aValue); |
1457 IMPORT_C void HeapSetFail(TInt aTAllocFail,TInt aValue); |
|
1458 IMPORT_C void HeapSetBurstFail(TInt aTAllocFail,TInt aRate,TInt aBurst); |
1623 IMPORT_C TInt SetModifierState(TEventModifier aModifier,TModifierState aState); |
1459 IMPORT_C TInt SetModifierState(TEventModifier aModifier,TModifierState aState); |
1624 IMPORT_C TInt GetModifierState() const; |
1460 IMPORT_C TInt GetModifierState() const; |
1625 // |
1461 // |
1626 IMPORT_C TInt RequestOffEvents(TBool aOn,RWindowTreeNode *aWin=NULL); |
1462 IMPORT_C TInt RequestOffEvents(TBool aOn,RWindowTreeNode *aWin=NULL); |
1627 IMPORT_C TDisplayMode GetDefModeMaxNumColors(TInt& aColor,TInt& aGray) const; |
1463 IMPORT_C TDisplayMode GetDefModeMaxNumColors(TInt& aColor,TInt& aGray) const; |
1646 IMPORT_C TInt SetSystemFaded(TBool aFaded); |
1482 IMPORT_C TInt SetSystemFaded(TBool aFaded); |
1647 IMPORT_C TInt SetSystemFaded(TBool aFaded,TUint8 aBlackMap,TUint8 aWhiteMap); |
1483 IMPORT_C TInt SetSystemFaded(TBool aFaded,TUint8 aBlackMap,TUint8 aWhiteMap); |
1648 |
1484 |
1649 // Functions for multiple screens |
1485 // Functions for multiple screens |
1650 IMPORT_C TInt SetFocusScreen(TInt aScreenNumber); |
1486 IMPORT_C TInt SetFocusScreen(TInt aScreenNumber); |
1651 IMPORT_C TInt GetFocusScreen(); |
1487 IMPORT_C TInt GetFocusScreen() const; |
1652 IMPORT_C void ClearAllRedrawStores(); |
1488 IMPORT_C void ClearAllRedrawStores(); |
|
1489 IMPORT_C TInt NumWindowGroups(TInt aScreenNumber,TInt aPriority) const; |
|
1490 IMPORT_C TInt NumberOfScreens() const; |
|
1491 IMPORT_C TInt WindowGroupList(CArrayFixFlat<TInt>* aWindowList,TInt aScreenNumber,TInt aPriority=EAllPriorities) const; |
|
1492 IMPORT_C TInt GetFocusWindowGroup(TInt aScreenNumber) const; |
|
1493 IMPORT_C TInt GetDefaultOwningWindow(TInt aScreenNumber) const; |
|
1494 IMPORT_C TDisplayMode GetDefModeMaxNumColors(TInt aScreenNumber,TInt& aColor,TInt& aGray) const; |
|
1495 IMPORT_C TInt GetColorModeList(TInt aScreenNumber,CArrayFixFlat<TInt>* aModeList) const; |
1653 #if defined(__WINS__) |
1496 #if defined(__WINS__) |
1654 // Function for WINS behaviour only |
1497 // Function for WINS behaviour only |
1655 // |
|
1656 IMPORT_C void SetRemoveKeyCode(TBool aRemove); |
1498 IMPORT_C void SetRemoveKeyCode(TBool aRemove); |
1657 IMPORT_C void SimulateXyInputType(TXYInputType aInputType); //Only for testing WSERV |
1499 IMPORT_C void SimulateXyInputType(TInt aInputType); //Only for testing WSERV |
1658 #endif |
1500 #endif |
1659 // |
1501 // |
1660 IMPORT_C void SimulateRawEvent(TRawEvent aEvent); |
1502 IMPORT_C void SimulateRawEvent(TRawEvent aEvent); |
1661 IMPORT_C void SimulateKeyEvent(TKeyEvent aEvent); |
1503 IMPORT_C void SimulateKeyEvent(TKeyEvent aEvent); |
1662 IMPORT_C void LogCommand(TLoggingCommand aCommand); |
1504 IMPORT_C void LogCommand(TLoggingCommand aCommand); |
1663 IMPORT_C void LogMessage(const TLogMessageText &aMessage); |
1505 IMPORT_C void LogMessage(const TLogMessageText &aMessage); |
1664 // |
1506 |
1665 // Functions for test code use only |
1507 // Functions for test code use only |
1666 // |
|
1667 IMPORT_C void SystemInfo(TInt &aSystemInfoNumber, SSystemInfo &aSystemInfo); |
1508 IMPORT_C void SystemInfo(TInt &aSystemInfoNumber, SSystemInfo &aSystemInfo); |
1668 IMPORT_C void TestWrite(TInt aHandle,TInt aOpcode,const TAny *aData, TInt aLength); |
1509 IMPORT_C void TestWrite(TInt aHandle,TInt aOpcode,const TAny *aData, TInt aLength); |
1669 IMPORT_C void TestWriteReply(TInt aHandle,TInt aOpcode,const TAny *aData, TInt aLength); |
1510 IMPORT_C void TestWriteReply(TInt aHandle,TInt aOpcode,const TAny *aData, TInt aLength); |
1670 IMPORT_C void TestWriteReplyP(TInt aHandle,TInt aOpcode,const TAny *aData,TInt aLength,TDes8 *aReplyPackage); |
1511 IMPORT_C void TestWriteReplyP(TInt aHandle,TInt aOpcode,const TAny *aData,TInt aLength,TDes8 *aReplyPackage); |
1671 IMPORT_C TInt TestWriteReplyByProvidingRemoteReadAccess(TInt aHandle,TInt aOpcode,const TDesC8& aData,const TDesC8& aRemoteReadBuffer); |
1512 IMPORT_C TInt TestWriteReplyByProvidingRemoteReadAccess(TInt aHandle,TInt aOpcode,const TDesC8& aData,const TDesC8& aRemoteReadBuffer); |
1672 IMPORT_C TInt TestWriteReplyByProvidingRemoteReadAccess(TInt aHandle,TInt aOpcode,const TDesC8& aData,const TDesC16& aRemoteReadBuffer); |
1513 IMPORT_C TInt TestWriteReplyByProvidingRemoteReadAccess(TInt aHandle,TInt aOpcode,const TDesC8& aData,const TDesC16& aRemoteReadBuffer); |
1673 |
1514 |
1674 IMPORT_C TInt Finish(); |
1515 IMPORT_C TInt Finish(); |
1675 IMPORT_C void SyncMsgBuf(); |
1516 IMPORT_C void SyncMsgBuf(); |
|
1517 |
|
1518 // Getters and setters for pointer event's thresholds |
|
1519 IMPORT_C TInt SetCloseProximityThresholds(TInt aEnterCloseProximityThreshold, TInt aExitCloseProximityThreshold); |
|
1520 IMPORT_C TInt GetEnterCloseProximityThreshold() const; |
|
1521 IMPORT_C TInt GetExitCloseProximityThreshold() const; |
|
1522 IMPORT_C TInt SetHighPressureThresholds(TInt aEnterHighPressureThreshold, TInt aExitHighPressureThreshold); |
|
1523 IMPORT_C TInt GetEnterHighPressureThreshold() const; |
|
1524 IMPORT_C TInt GetExitHighPressureThreshold() const; |
|
1525 // |
|
1526 IMPORT_C void EnableWindowSizeCacheL(); |
|
1527 |
1676 // functions not exported, used by CWsGraphic |
1528 // functions not exported, used by CWsGraphic |
1677 void GraphicMessageReady(TRequestStatus *aStat); |
1529 void GraphicMessageReady(TRequestStatus *aStat); |
1678 void GetGraphicMessage(TDes8& aData); |
1530 void GetGraphicMessage(TDes8& aData) const; |
1679 void GraphicMessageCancel(); |
1531 void GraphicMessageCancel(); |
1680 void GraphicAbortMessage(TInt aError); |
1532 void GraphicAbortMessage(TInt aError); |
1681 TInt GraphicFetchHeaderMessage(); |
1533 TInt GraphicFetchHeaderMessage(); |
1682 private: |
1534 private: |
1683 TInt doWindowGroupList(TInt aPriority, RArray<TWindowGroupChainInfo>* aWindowListCh, TInt aNumOpcode, TInt aListOpcode); |
1535 TInt doWindowGroupList(TInt aPriority, RArray<TWindowGroupChainInfo>* aWindowListCh, TInt aNumOpcode, TInt aListOpcode) const; |
1684 TInt doWindowGroupList(TInt aPriority,CArrayFixFlat<TInt>* aWindowListId,TInt aNumOpcode,TInt aListOpcode); |
1536 TInt doWindowGroupList(TInt aScreenNumber, TInt aPriority, CArrayFixFlat<TInt>* aWindowListId, TInt aNumOpcode, TInt aListOpcode) const; |
1685 TInt doSetHotKey(TInt aOpcode, TInt aType, TUint aKeycode, TUint aModifierMask, TUint aModifiers); |
1537 TInt doSetHotKey(TInt aOpcode, TInt aType, TUint aKeycode, TUint aModifierMask, TUint aModifiers); |
1686 void doReadEvent(TRequestStatus *aStat, TInt aOpcode); |
1538 void doReadEvent(TRequestStatus *aStat, TInt aOpcode); |
1687 |
1539 |
1688 private: |
1540 private: |
1689 void connectL(); |
1541 void connectL(); |
1832 IMPORT_C TPoint Position() const; |
1684 IMPORT_C TPoint Position() const; |
1833 IMPORT_C TPoint AbsPosition() const; |
1685 IMPORT_C TPoint AbsPosition() const; |
1834 IMPORT_C TInt SetCornerType(TCornerType aCornerType, TInt aCornerFlags=0); |
1686 IMPORT_C TInt SetCornerType(TCornerType aCornerType, TInt aCornerFlags=0); |
1835 IMPORT_C TInt SetShape(const TRegion &aRegion); |
1687 IMPORT_C TInt SetShape(const TRegion &aRegion); |
1836 IMPORT_C TInt SetRequiredDisplayMode(TDisplayMode aMode); |
1688 IMPORT_C TInt SetRequiredDisplayMode(TDisplayMode aMode); |
1837 IMPORT_C TDisplayMode DisplayMode(); |
1689 IMPORT_C TDisplayMode DisplayMode() const; |
1838 IMPORT_C void EnableBackup(TUint aBackupType=EWindowBackupAreaBehind); |
1690 IMPORT_C void EnableBackup(TUint aBackupType=EWindowBackupAreaBehind); |
1839 IMPORT_C void RequestPointerRepeatEvent(TTimeIntervalMicroSeconds32 aTime,const TRect &aRect); |
1691 IMPORT_C void RequestPointerRepeatEvent(TTimeIntervalMicroSeconds32 aTime,const TRect &aRect); |
1840 IMPORT_C void CancelPointerRepeatEventRequest(); |
1692 IMPORT_C void CancelPointerRepeatEventRequest(); |
|
1693 IMPORT_C TInt RequestPointerRepeatEvent(TTimeIntervalMicroSeconds32 aTime,const TRect &aRect, const TUint8 aPointerNumber); //< @prototype |
|
1694 IMPORT_C TInt CancelPointerRepeatEventRequest(const TUint8 aPointerNumber); //< @prototype |
1841 IMPORT_C TInt AllocPointerMoveBuffer(TInt aMaxPoints, TUint aFlags); |
1695 IMPORT_C TInt AllocPointerMoveBuffer(TInt aMaxPoints, TUint aFlags); |
1842 IMPORT_C void FreePointerMoveBuffer(); |
1696 IMPORT_C void FreePointerMoveBuffer(); |
1843 IMPORT_C void EnablePointerMoveBuffer(); |
1697 IMPORT_C void EnablePointerMoveBuffer(); |
1844 IMPORT_C void DisablePointerMoveBuffer(); |
1698 IMPORT_C void DisablePointerMoveBuffer(); |
1845 IMPORT_C TInt RetrievePointerMoveBuffer(TDes8 &aBuf); |
1699 IMPORT_C TInt RetrievePointerMoveBuffer(TDes8 &aBuf) const; |
1846 IMPORT_C void DiscardPointerMoveBuffer(); |
1700 IMPORT_C void DiscardPointerMoveBuffer(); |
1847 IMPORT_C TInt AddKeyRect(const TRect &aRect, TInt aScanCode, TBool aActivatedByPointerSwitchOn); |
1701 IMPORT_C TInt AddKeyRect(const TRect &aRect, TInt aScanCode, TBool aActivatedByPointerSwitchOn); |
1848 IMPORT_C void RemoveAllKeyRects(); |
1702 IMPORT_C void RemoveAllKeyRects(); |
1849 IMPORT_C TInt PasswordWindow(TPasswordMode aPasswordMode); |
1703 IMPORT_C TInt PasswordWindow(TPasswordMode aPasswordMode); |
1850 IMPORT_C void FadeBehind(TBool aFade); |
1704 IMPORT_C void FadeBehind(TBool aFade); |
1851 IMPORT_C TBool IsFaded(); |
1705 IMPORT_C TBool IsFaded() const; |
1852 IMPORT_C TBool IsNonFading(); |
1706 IMPORT_C TBool IsNonFading() const; |
1853 IMPORT_C TInt MoveToGroup(TInt aIdentifier); |
1707 IMPORT_C TInt MoveToGroup(TInt aIdentifier); |
1854 IMPORT_C TInt SetBackgroundSurface(const TSurfaceId& aSurface); ///< @publishedPartner |
1708 IMPORT_C TInt SetBackgroundSurface(const TSurfaceId& aSurface); |
1855 IMPORT_C TInt SetBackgroundSurface(const TSurfaceConfiguration& aConfiguration, TBool aTriggerRedraw); ///< @publishedPartner |
1709 IMPORT_C TInt SetBackgroundSurface(const TSurfaceConfiguration& aConfiguration, TBool aTriggerRedraw); |
1856 IMPORT_C void RemoveBackgroundSurface(TBool aTriggerRedraw); ///< @publishedPartner |
1710 IMPORT_C void RemoveBackgroundSurface(TBool aTriggerRedraw); |
1857 IMPORT_C TInt GetBackgroundSurface(TSurfaceConfiguration& aConfiguration); ///< @publishedPartner |
1711 IMPORT_C TInt GetBackgroundSurface(TSurfaceConfiguration& aConfiguration) const; |
1858 IMPORT_C TRgb KeyColor(); ///< @publishedPartner whilst prototype |
1712 IMPORT_C void SetSurfaceTransparency(TBool aSurfaceTransparency); |
|
1713 IMPORT_C TRgb KeyColor() const; |
|
1714 IMPORT_C void EnableAdvancedPointers(); |
1859 protected: |
1715 protected: |
1860 TInt construct(const RWindowTreeNode &parent,TUint32 aHandle, TInt aType, TDisplayMode aDisplayMode); |
1716 TInt construct(const RWindowTreeNode &parent,TUint32 aHandle, TInt aType, TDisplayMode aDisplayMode); |
1861 }; |
1717 }; |
1862 |
1718 |
1863 |
1719 |
2202 IMPORT_C virtual void DrawBitmap(const TPoint &aTopLeft, const CFbsBitmap *aDevice); |
2080 IMPORT_C virtual void DrawBitmap(const TPoint &aTopLeft, const CFbsBitmap *aDevice); |
2203 IMPORT_C virtual void DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aDevice); |
2081 IMPORT_C virtual void DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aDevice); |
2204 IMPORT_C virtual void DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aDevice, const TRect &aSourceRect); |
2082 IMPORT_C virtual void DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aDevice, const TRect &aSourceRect); |
2205 IMPORT_C virtual void DrawBitmapMasked(const TRect& aDestRect, const CFbsBitmap* aBitmap, const TRect& aSourceRect, const CFbsBitmap* aMaskBitmap, TBool aInvertMask); |
2083 IMPORT_C virtual void DrawBitmapMasked(const TRect& aDestRect, const CFbsBitmap* aBitmap, const TRect& aSourceRect, const CFbsBitmap* aMaskBitmap, TBool aInvertMask); |
2206 IMPORT_C virtual void DrawBitmapMasked(const TRect& aDestRect, const CWsBitmap* aBitmap, const TRect& aSourceRect, const CWsBitmap* aMaskBitmap, TBool aInvertMask); |
2084 IMPORT_C virtual void DrawBitmapMasked(const TRect& aDestRect, const CWsBitmap* aBitmap, const TRect& aSourceRect, const CWsBitmap* aMaskBitmap, TBool aInvertMask); |
|
2085 |
|
2086 // Required as not all DrawText and DrawTextVertical functions are implemented in CWindowGc |
|
2087 using CBitmapContext::DrawText; |
|
2088 using CBitmapContext::DrawTextVertical; |
2207 // |
2089 // |
2208 // Text drawing subject to drawing mode |
2090 // Text drawing subject to drawing mode |
2209 // Subject to used font, pen color, drawing mode, |
2091 // Subject to used font, pen color, drawing mode, |
2210 // word and char justification |
2092 // word and char justification |
2211 IMPORT_C virtual void DrawText(const TDesC &aBuf,const TPoint &aPos); |
2093 IMPORT_C virtual void DrawText(const TDesC &aBuf,const TPoint &aPos); |
2250 IMPORT_C void Reserved_CBitmapContext_3(); |
2135 IMPORT_C void Reserved_CBitmapContext_3(); |
2251 |
2136 |
2252 public: |
2137 public: |
2253 IMPORT_C virtual void DrawWsGraphic(const TWsGraphicId& aId,const TRect& aDestRect); |
2138 IMPORT_C virtual void DrawWsGraphic(const TWsGraphicId& aId,const TRect& aDestRect); |
2254 IMPORT_C virtual void DrawWsGraphic(const TWsGraphicId& aId,const TRect& aDestRect,const TDesC8& aData); |
2139 IMPORT_C virtual void DrawWsGraphic(const TWsGraphicId& aId,const TRect& aDestRect,const TDesC8& aData); |
2255 |
|
2256 private: |
2140 private: |
2257 IMPORT_C virtual void Reserved_CWindowGc_3(); |
2141 IMPORT_C virtual void Reserved_CWindowGc_3(); |
2258 IMPORT_C virtual void Reserved_CWindowGc_4(); |
2142 IMPORT_C virtual void Reserved_CWindowGc_4(); |
2259 IMPORT_C virtual void Reserved_CWindowGc_5(); |
2143 IMPORT_C virtual void Reserved_CWindowGc_5(); |
2260 |
2144 |
2261 ////============================================================= |
2145 //============================================================= |
2262 private: // Private code |
2146 private: // Private code |
2263 TRgb Color(TInt aOpcode)const; |
2147 TRgb Color(TInt aOpcode)const; |
2264 void SetJustification(TInt aExcessWidth,TInt aNumGaps, TInt aOpcode); |
2148 void SetJustification(TInt aExcessWidth,TInt aNumGaps, TInt aOpcode); |
2265 void DrawArcOrPie(const TRect &aRect,const TPoint &aStart,const TPoint &aEnd, TInt aOpcode); |
2149 void DrawArcOrPie(const TRect &aRect,const TPoint &aStart,const TPoint &aEnd, TInt aOpcode); |
2266 void doDrawPolyLine(const CArrayFix<TPoint> *aPointArray, const TPoint* aPointList,TInt aNumPoints); |
2150 void doDrawPolyLine(const CArrayFix<TPoint> *aPointArray, const TPoint* aPointList,TInt aNumPoints); |
2267 TInt doDrawPolygon(const CArrayFix<TPoint> *aPointArray,const TPoint* aPointList,TInt aNumPoints,TFillRule aFillRule); |
2151 TInt doDrawPolygon(const CArrayFix<TPoint> *aPointArray,const TPoint* aPointList,TInt aNumPoints,TFillRule aFillRule); |
2268 void WriteTextPos(TInt aOpcode,TInt aOpcodePtr,const TPoint &aPos,const TDesC &aBuf) const; |
2152 void WriteTextPos(TInt aOpcode,TInt aOpcodePtr,const TPoint &aPos,const TDesC &aBuf) const; |
2269 void WriteTextCommand(TAny *aCmd, TInt aLen,const TDesC &aBuf,TInt aOpcode,TInt aOpcodePtr) const; |
2153 void WriteTextCommand(TAny *aCmd, TInt aLen,const TDesC &aBuf,TInt aOpcode,TInt aOpcodePtr) const; |
2270 void WriteTextCommand(TAny *aCmd, TInt aLen,const TDesC8 &aBuf,TInt aOpcode,TInt aOpcodePtr) const; |
2154 void WriteTextCommand(TAny *aCmd, TInt aLen,const TDesC8 &aBuf,TInt aOpcode,TInt aOpcodePtr) const; |
2271 void APIExGetUnderlineMetrics(TAny*& aOutput); |
2155 TInt APIExGetUnderlineMetrics(TAny*& aOutput); |
2272 TInt APIExSetShadowColor(TAny* aShadowColor); |
2156 TInt APIExSetShadowColor(TAny* aShadowColor); |
2273 |
2157 TInt APIExGetShadowColor(TAny*& aOutput); |
|
2158 // New DrawText API's that take in context |
|
2159 TInt APIExDrawText(const TDesC &aBuf,const TTextParameters* aParam,const TPoint &aPos); |
|
2160 TInt APIExDrawText(const TDesC &aBuf,const TTextParameters* aParam,const TRect &aBox,TInt aBaselineOffset,TTextAlign aHoriz=ELeft,TInt aLeftMrg=0); |
|
2161 TInt APIExDrawTextVertical(const TDesC& aText,const TTextParameters* aParam,const TPoint& aPos,TBool aUp); |
|
2162 TInt APIExDrawTextVertical(const TDesC& aText,const TTextParameters* aParam,const TRect& aBox,TInt aBaselineOffset,TBool aUp,TTextAlign aVert=ELeft,TInt aMargin=0); |
|
2163 TInt APIExInterface(TAny*& aInterface, TUid aInterfaceId); |
|
2164 |
|
2165 void DrawResource(const TPoint& aPos, const RWsDrawableSource& aSource, TGraphicsRotation aRotation=EGraphicsRotationNone); |
|
2166 void DrawResource(const TRect& aDestRect, const RWsDrawableSource& aSource, TGraphicsRotation aRotation=EGraphicsRotationNone); |
|
2167 void DrawResource(const TRect& aDestRect, const RWsDrawableSource& aSource, const TRect& aSrcRect, TGraphicsRotation aRotation=EGraphicsRotationNone); |
|
2168 void DrawResource(const TRect& aDestRect, const RWsDrawableSource& aSource, const TDesC8& aParam); |
|
2169 |
2274 private: // Private data |
2170 private: // Private data |
2275 CFbsFont *iFont; |
2171 class CPimpl; |
|
2172 CPimpl* iPimpl; |
2276 CWsScreenDevice *iDevice; |
2173 CWsScreenDevice *iDevice; |
2277 }; |
2174 }; |
2278 |
2175 |
2279 |
2176 |
2280 class CWsScreenDevice : public CBitmapDevice, public MWsClientClass |
2177 class CWsScreenDevice : public CBitmapDevice, public MWsClientClass |
2670 @publishedAll |
2580 @publishedAll |
2671 @released */ |
2581 @released */ |
2672 { |
2582 { |
2673 public: |
2583 public: |
2674 IMPORT_C static CDirectScreenAccess* NewL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWin,MDirectScreenAccess& aAbort); |
2584 IMPORT_C static CDirectScreenAccess* NewL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWin,MDirectScreenAccess& aAbort); |
|
2585 IMPORT_C static CDirectScreenAccess* NewL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWin,MDirectScreenAccess& aAbort,TBool aRegionTrackingOnly); |
2675 ~CDirectScreenAccess(); |
2586 ~CDirectScreenAccess(); |
2676 IMPORT_C void StartL(); |
2587 IMPORT_C void StartL(); |
2677 inline CFbsBitGc* Gc(); |
2588 inline CFbsBitGc* Gc(); |
2678 inline CFbsScreenDevice*& ScreenDevice(); |
2589 inline CFbsScreenDevice*& ScreenDevice(); |
2679 inline RRegion* DrawingRegion(); |
2590 inline RRegion* DrawingRegion(); |
2680 private: |
2591 private: |
2681 enum TFlags |
2592 enum TFlags |
2682 { |
2593 { |
2683 EDirectCheckModeChange=0x1, |
2594 EDirectCheckModeChange = 0x01, |
2684 EDirectCheckSizeModeChange=0x2, |
2595 EDirectCheckSizeModeChange = 0x02, |
|
2596 EDirectRegionTrackingOnly = 0x04, |
2685 }; |
2597 }; |
2686 private: |
2598 private: |
2687 inline CDirectScreenAccess(RWsSession& aWs,CWsScreenDevice* aScreenDevice,RWindowBase& aWindow,MDirectScreenAccess& aAbort); |
2599 inline CDirectScreenAccess(RWsSession& aWs,CWsScreenDevice* aScreenDevice,RWindowBase& aWindow,MDirectScreenAccess& aAbort); |
2688 void ConstructL(RWsSession& aWs); |
2600 void ConstructL(RWsSession& aWs,TBool aRegionTrackingOnly); |
2689 void CreateScreenObjectsL(TDisplayMode aCurrentMode); |
2601 void CreateScreenObjectsL(TDisplayMode aCurrentMode); |
2690 void UpdateSizeAndRotation(CFbsBitGc* aGc); |
2602 void UpdateSizeAndRotation(CFbsBitGc* aGc); |
2691 static TInt Restart(TAny* aDirect); |
2603 static TInt Restart(TAny* aDirect); |
2692 void Restart(); |
2604 void Restart(); |
2693 //Pure virtual functions from CActive |
2605 //Pure virtual functions from CActive |
2733 IMPORT_C RSoundPlugIn(); |
2645 IMPORT_C RSoundPlugIn(); |
2734 IMPORT_C RSoundPlugIn(RWsSession &aWs); |
2646 IMPORT_C RSoundPlugIn(RWsSession &aWs); |
2735 IMPORT_C TInt Construct(TUid aUid=KNullUid); |
2647 IMPORT_C TInt Construct(TUid aUid=KNullUid); |
2736 IMPORT_C void Close(); |
2648 IMPORT_C void Close(); |
2737 IMPORT_C void Destroy(); |
2649 IMPORT_C void Destroy(); |
2738 IMPORT_C TBool IsLoaded(TBool& aIsChangeable); |
2650 IMPORT_C TBool IsLoaded(TBool& aIsChangeable) const; |
2739 IMPORT_C TInt Unload(); |
2651 IMPORT_C TInt Unload(); |
2740 IMPORT_C TInt Load(const TDesC &aFileName); |
2652 IMPORT_C TInt Load(const TDesC &aFileName); |
2741 IMPORT_C void SetKeyClick(TBool aEnabled); |
2653 IMPORT_C void SetKeyClick(TBool aEnabled); |
2742 IMPORT_C void SetPenClick(TBool aEnabled); |
2654 IMPORT_C void SetPenClick(TBool aEnabled); |
2743 IMPORT_C TBool KeyClickEnabled(); |
2655 IMPORT_C TBool KeyClickEnabled() const; |
2744 IMPORT_C TBool PenClickEnabled(); |
2656 IMPORT_C TBool PenClickEnabled() const; |
2745 IMPORT_C TInt CommandReply(TInt aOpcode, const TPtrC8 &aArgs); |
2657 IMPORT_C TInt CommandReply(TInt aOpcode, const TPtrC8 &aArgs); |
2746 }; |
2658 }; |
2747 |
2659 |
2748 inline TInt MWsClientClass::WsHandle() const |
2660 inline TInt MWsClientClass::WsHandle() const |
2749 /** Gets the server side handle for the object. |
2661 /** Gets the server side handle for the object. |
2750 |
2662 |
2751 @return The server-side handle for the object. */ |
2663 @return The server-side handle for the object. */ |
2752 {return(iWsHandle);} |
2664 {return(iWsHandle);} |
|
2665 |
|
2666 inline const TAny* CWsScreenDevice::GetInterface(TUint aInterfaceId) const |
|
2667 { |
|
2668 return const_cast<CWsScreenDevice*>(this)->GetInterface(aInterfaceId); |
|
2669 } |
2753 |
2670 |
2754 inline TInt CWsScreenDevice::CreateContext(CWindowGc *&aGc) |
2671 inline TInt CWsScreenDevice::CreateContext(CWindowGc *&aGc) |
2755 /** Creates a graphics context for this device. |
2672 /** Creates a graphics context for this device. |
2756 |
2673 |
2757 This function always causes a flush of the window server buffer. |
2674 This function always causes a flush of the window server buffer. |
2777 |
2694 |
2778 @return The rectangle that needs redrawing. Co-ordinates are relative to |
2695 @return The rectangle that needs redrawing. Co-ordinates are relative to |
2779 the window whose handle is given by Handle(). */ |
2696 the window whose handle is given by Handle(). */ |
2780 {return(iRect);} |
2697 {return(iRect);} |
2781 |
2698 |
2782 inline TPointerEvent *TWsEvent::Pointer() const |
2699 inline TWsEvent::TWsEvent() |
|
2700 /** Constructor. Zero Initialise Data |
|
2701 @publishedAll |
|
2702 @released */ |
|
2703 { |
|
2704 iType=0; |
|
2705 iHandle=0; |
|
2706 iTime=0; |
|
2707 Mem::FillZ(iEventData,EWsEventDataSize); |
|
2708 } |
|
2709 |
|
2710 inline TAdvancedPointerEvent* TWsEvent::Pointer() const |
2783 /** Gets the pointer event. |
2711 /** Gets the pointer event. |
2784 |
2712 |
2785 This function can be used to get information about the pointer event if Type() |
2713 This method can be used to get information about the pointer event if Type() |
2786 returns an event of type EEventPointer. or EEventDragDrop. |
2714 returns an event of type EEventPointer or EEventDragDrop. |
2787 |
2715 |
2788 @return Structure containing pointer event data. */ |
2716 If the event has been received by the window without advanced pointer events enabled, |
2789 {return((TPointerEvent *)&iEventData);} |
2717 this method will return a pointer to TPointerEvent with additional fields of |
|
2718 TAdvancedPointerEvent being cleared to 0. |
|
2719 |
|
2720 @return Structure containing advanced pointer event data. |
|
2721 @see TPointerEvent::AdvancedPointerEvent() |
|
2722 @see RWindowBase::EnableAdvancedPointers() */ |
|
2723 {return((TAdvancedPointerEvent *)&iEventData);} |
|
2724 |
|
2725 inline TInt TAdvancedPointerEvent::PointerNumber() const |
|
2726 /** Gets the pointer number of the pointer whose state change is described by this event. |
|
2727 |
|
2728 As soon as the pointer (for example a finger) is detected by the device's sensors, |
|
2729 it is assigned a pointer number. Then all events related to this pointer always |
|
2730 use the same pointer number. When the device loses track of the pointer, |
|
2731 TPointerEvent::EOutOfRange is sent with its pointer number and the number is released |
|
2732 - from this time it may be re-used to identify another pointer coming into range. |
|
2733 |
|
2734 On a particular device, the pointer number is always an integer in the range 0 to |
|
2735 HALData::EPointerNumberOfPointers - 1. If the device doesn't provide value for |
|
2736 this attribute, it is assumed to be 1. |
|
2737 |
|
2738 Please note that in order to receive events from multiple pointers in a window, the method |
|
2739 RWindowBase::EnableAdvancedPointers() has to be called for this window's instance |
|
2740 before it is activated. Otherwise this window will only receive TPointerEvents from one |
|
2741 emulated pointer, which will always have pointer number 0. |
|
2742 |
|
2743 @return Pointer number of the pointer whose state change is described by this event. |
|
2744 @see RWindowBase::EnableAdvancedPointers() |
|
2745 @see HALData::EPointerNumberOfPointers */ |
|
2746 { |
|
2747 return IsAdvancedPointerEvent() ? DoGetPointerNumber() : ENonAdvancedPointerPointerNumber; |
|
2748 } |
|
2749 |
|
2750 inline TInt TAdvancedPointerEvent::Proximity() const |
|
2751 /** Gets the proximity of the pointer to the screen's surface. |
|
2752 Proximity units may vary between devices and may be non-linear. |
|
2753 Returned value will be a negative integer as the maximum supported proximity |
|
2754 range in Symbian OS is from KMinTInt to 0, where KMinTInt means the highest |
|
2755 proximity that Symbian OS can support and 0 means touching the screen. |
|
2756 HALData attributes provide more information about proximity support on particular |
|
2757 device. |
|
2758 |
|
2759 On platforms without pointer proximity support, proximity is always assumed to be 0. |
|
2760 |
|
2761 @return Proximity of the pointer to the screen's surface. |
|
2762 @see TAdvancedPointerEvent::Position3D() |
|
2763 @see TAdvancedPointerEvent::ProximityAndPressure() |
|
2764 @see HALData::EPointer3DMaxProximity |
|
2765 @see HALData::EPointer3DProximityStep */ |
|
2766 { |
|
2767 return IsAdvancedPointerEvent() ? DoGetProximity() : ENonAdvancedPointerZCoordinate; |
|
2768 } |
|
2769 |
|
2770 inline TInt TAdvancedPointerEvent::Pressure() const |
|
2771 /** Gets the pressure applied by the pointer to the screen. |
|
2772 Pressure units may vary between devices and may be non-linear. |
|
2773 Returned value will be a positive integer as the maximum supported pressure range |
|
2774 in Symbian OS is from 0 to KMaxTInt. HALData attributes provide more information |
|
2775 about pressure support on particular device. |
|
2776 |
|
2777 On platforms without pointer pressure support, pressure is always assumed to be 0. |
|
2778 |
|
2779 @return Pressure applied by the pointer to the screen. |
|
2780 @see TAdvancedPointerEvent::Pressure3D() |
|
2781 @see TAdvancedPointerEvent::ProximityAndPressure() |
|
2782 @see HALData::EPointer3DMaxPressure |
|
2783 @see HALData::EPointer3DPressureStep */ |
|
2784 { |
|
2785 return IsAdvancedPointerEvent() ? DoGetPressure() : ENonAdvancedPointerZCoordinate; |
|
2786 } |
|
2787 |
|
2788 inline TInt TAdvancedPointerEvent::ProximityAndPressure() const |
|
2789 /** Gets pressure applied by the pointer to the screen and proximity of the pointer |
|
2790 to the screen as one value. This is possible because the pointer is never in proximity |
|
2791 to the screen and pressing the screen at the same time. |
|
2792 |
|
2793 @return The value of proximity if the pointer is in proximity to the screen; proximity |
|
2794 is always represented as negative TInt. The value of pressure if the pointer |
|
2795 is touching the screen; pressure is always represented as positive TInt. |
|
2796 @see TAdvancedPointerEvent::Proximity() |
|
2797 @see TAdvancedPointerEvent::Pressure() |
|
2798 @see TAdvancedPointerEvent::PositionAndPressure3D() */ |
|
2799 {return IsAdvancedPointerEvent() ? DoGetProximityAndPressure() : ENonAdvancedPointerZCoordinate;} |
|
2800 |
|
2801 inline TPoint3D TAdvancedPointerEvent::PositionAndPressure3D() const |
|
2802 /** |
|
2803 @return Pointer's X and Y coordinates plus combined proximity and pressure as |
|
2804 Z coordinate. |
|
2805 @see TAdvancedPointerEvent::ProximityAndPressure() */ |
|
2806 { |
|
2807 TPoint3D point3D; |
|
2808 point3D.iX=iPosition.iX; |
|
2809 point3D.iY=iPosition.iY; |
|
2810 point3D.iZ=ProximityAndPressure(); |
|
2811 return point3D; |
|
2812 } |
|
2813 |
|
2814 inline TPoint3D TAdvancedPointerEvent::Position3D() const |
|
2815 /** |
|
2816 @return Pointer's X and Y coordinates plus pointer's proximity to the screen as |
|
2817 Z coordinate. Please note that returned Z coordinate will be always negative or 0. |
|
2818 @see TAdvancedPointerEvent::Proximity() */ |
|
2819 { |
|
2820 TPoint3D point3D; |
|
2821 point3D.iX=iPosition.iX; |
|
2822 point3D.iY=iPosition.iY; |
|
2823 point3D.iZ=IsAdvancedPointerEvent() ? DoGetProximity() : ENonAdvancedPointerZCoordinate; |
|
2824 return point3D; |
|
2825 } |
|
2826 |
|
2827 inline TPoint3D TAdvancedPointerEvent::Pressure3D() const |
|
2828 /** |
|
2829 @return Pointer's X and Y coordinates plus pressure applied by the pointer to the screen |
|
2830 as Z coordinate. |
|
2831 @see TAdvancedPointerEvent::Pressure() */ |
|
2832 { |
|
2833 TPoint3D point3D; |
|
2834 point3D.iX=iPosition.iX; |
|
2835 point3D.iY=iPosition.iY; |
|
2836 point3D.iZ=IsAdvancedPointerEvent() ? DoGetPressure() : ENonAdvancedPointerZCoordinate; |
|
2837 return point3D; |
|
2838 } |
2790 |
2839 |
2791 inline TKeyEvent *TWsEvent::Key() const |
2840 inline TKeyEvent *TWsEvent::Key() const |
2792 /** Gets the key event. |
2841 /** Gets the key event. |
2793 |
2842 |
2794 This function can be used to get information about the key event if Type() |
2843 This function can be used to get information about the key event if Type() |