1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // 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 |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
7 // |
8 // Initial Contributors: |
8 // Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
10 // |
10 // |
11 // Contributors: |
11 // Contributors: |
309 virtual void CloseFont(CFbsFont *)=0; |
309 virtual void CloseFont(CFbsFont *)=0; |
310 /** Gets a reference to the calling client's thread. |
310 /** Gets a reference to the calling client's thread. |
311 |
311 |
312 @return A reference to the calling client's thread. */ |
312 @return A reference to the calling client's thread. */ |
313 virtual const RThread &Client()=0; |
313 virtual const RThread &Client()=0; |
314 virtual void ReplyBuf(const TDesC8 &aDes)=0; // Reply a buffer to the client |
314 /** Send a reply to the client process in response to a request |
315 virtual void ReplyBuf(const TDesC16 &aDes)=0; // Reply a buffer to the client |
315 from the client. |
|
316 |
|
317 @see RAnim::CommandReply() |
|
318 |
|
319 @param aDes The data to be sent back to the client |
|
320 */ |
|
321 virtual void ReplyBuf(const TDesC8 &aDes)=0; |
|
322 /** Send a reply to the client process in response to a request |
|
323 from the client. |
|
324 |
|
325 @see RAnim::CommandReply() |
|
326 |
|
327 @param aDes The data to be sent back to the client |
|
328 */ |
|
329 virtual void ReplyBuf(const TDesC16 &aDes)=0; |
316 /** Panics the client. |
330 /** Panics the client. |
317 |
331 |
318 This will result in the client thread being destroyed. */ |
332 This will result in the client thread being destroyed. */ |
319 virtual void Panic() const=0; |
333 virtual void Panic() const=0; |
|
334 |
320 //Event functions |
335 //Event functions |
|
336 |
321 /** Switches animation raw event handling on and off. |
337 /** Switches animation raw event handling on and off. |
322 |
338 |
323 If raw event handling is switched on, then raw events, e.g. pointer, key, or power events |
339 If raw event handling is switched on, then raw events, e.g. pointer, key, or power events |
324 are all offered to the animation event handling code's MEventHandler::OfferRawEvent(). |
340 are all offered to the animation event handling code's MEventHandler::OfferRawEvent(). |
325 |
341 |
|
342 If Animation works in a window for which advanced pointers have been enabled, |
|
343 then after switching on raw event handling it will receive pointer events from all |
|
344 detected pointers. Otherwise it will receive events only from one emulated pointer. |
|
345 |
326 @param aGetEvents If ETrue, raw events are passed to the animation |
346 @param aGetEvents If ETrue, raw events are passed to the animation |
327 event handling code. If EFalse, events are not passed to the animation. */ |
347 event handling code. If EFalse, events are not passed to the animation. |
|
348 @see RWindowBase::EnableAdvancedPointers() */ |
328 virtual void GetRawEvents(TBool aGetEvents) const=0; |
349 virtual void GetRawEvents(TBool aGetEvents) const=0; |
329 /** Posts a raw event, just as if it had come from the kernel. |
350 /** Posts a raw event, just as if it had come from the kernel. |
330 |
351 |
331 @param aRawEvent The raw event */ |
352 If aRawEvent has pointer-related type (move, switch on, down, up or out of range), |
|
353 then its Z coordinate and iPointerNumber fields will be validated and may be |
|
354 overwritten by WSERV in order to guarantee correct behaviour depending on: |
|
355 1. Pointer Pressure and Proximity support on current platform. |
|
356 2. Multiple pointers support on current platform. |
|
357 3. Animation's awareness of these fields. If Animation works in a window |
|
358 for which advanced pointers have been enabled, it is assumed that it has |
|
359 initialized these fields. Otherwise WSERV will assume that these fields have |
|
360 not been provided and may overwrite them with most appropriate values. |
|
361 For more information about event validation, please refer to System Documentation. |
|
362 |
|
363 @param aRawEvent The raw event |
|
364 @see RWindowBase::EnableAdvancedPointers() */ |
332 virtual void PostRawEvent(const TRawEvent &aRawEvent) const=0; |
365 virtual void PostRawEvent(const TRawEvent &aRawEvent) const=0; |
333 /** Posts a key event. |
366 /** Posts a key event. |
334 |
367 |
335 The function is similar to PostRawEvent() but should be |
368 The function is similar to PostRawEvent() but should be |
336 used for posting key events. |
369 used for posting key events. |
502 @param aWindowGroupId The window group ID. |
535 @param aWindowGroupId The window group ID. |
503 @param aPos The ordinal position to move the window to. |
536 @param aPos The ordinal position to move the window to. |
504 @param aOrdinalPriority The new ordinal priority of the window. |
537 @param aOrdinalPriority The new ordinal priority of the window. |
505 @return KErrNotFound if there is no window group with the specified ID, KErrNone otherwise. */ |
538 @return KErrNotFound if there is no window group with the specified ID, KErrNone otherwise. */ |
506 virtual TInt SetOrdinalPosition(TInt aWindowGroupId,TInt aPos,TInt aOrdinalPriority)=0; |
539 virtual TInt SetOrdinalPosition(TInt aWindowGroupId,TInt aPos,TInt aOrdinalPriority)=0; |
507 |
540 |
508 /** Accessor for window configuration. |
541 /** Accessor for window configuration. |
509 |
542 |
510 @param aWindowConfig Gets filled in with window configuration details. */ |
543 @param aWindowConfig Gets filled in with window configuration details. */ |
511 virtual void WindowConfig(TWindowConfig& aWindowConfig) const=0; |
544 virtual void WindowConfig(TWindowConfig& aWindowConfig) const=0; |
512 |
|
513 private: |
545 private: |
514 virtual void Reserved1() const; |
546 virtual void Reserved1() const; |
515 virtual void Reserved2() const; |
547 virtual void Reserved2() const; |
516 virtual void Reserved3() const; |
548 virtual void Reserved3() const; |
517 }; |
549 }; |
561 Command(), CommandReplyL(), Animate(), or FocusChanged() functions. |
593 Command(), CommandReplyL(), Animate(), or FocusChanged() functions. |
562 |
594 |
563 Note: this function is called automatically by the animation DLL framework in the |
595 Note: this function is called automatically by the animation DLL framework in the |
564 Redraw() function. */ |
596 Redraw() function. */ |
565 virtual void ActivateGc()=0; |
597 virtual void ActivateGc()=0; |
566 /** Sets the rectangle that this animation is to draw to. |
598 /** Sets the rectangle that this animation will draw to. |
567 |
599 |
568 This function must be called as part of the initialisation/construction of |
600 This function must be called as part of the initialisation/construction of |
569 the CAnim-derived object, i.e. in CAnim::ConstructL(). This is so that the |
601 the CAnim-derived object, i.e. in CAnim::ConstructL(). This is so that the |
570 window server knows which area the animation is operating in. |
602 window server knows which area the animation is operating in. Anything that |
|
603 is drawn by the animation outside this rectangle may not be redrawn correctly |
|
604 as the window server uses this rectangle to decide when the animation should |
|
605 be redrawn. |
571 |
606 |
572 @param aRect The rectangle to be drawn to. */ |
607 @param aRect The rectangle to be drawn to. */ |
573 virtual void SetRect(const TRect &aRect)=0; |
608 virtual void SetRect(const TRect &aRect)=0; |
574 /** Gets the window size. |
609 /** Gets the window size. |
575 |
610 |
675 |
710 |
676 @param aMember The index of the sprite member for which information is required. |
711 @param aMember The index of the sprite member for which information is required. |
677 @return A pointer to the sprite member. */ |
712 @return A pointer to the sprite member. */ |
678 virtual TSpriteMember *GetSpriteMember(TInt aMember) const=0; |
713 virtual TSpriteMember *GetSpriteMember(TInt aMember) const=0; |
679 /** Redraws part of a sprite. |
714 /** Redraws part of a sprite. |
680 |
|
681 WSERV1: |
|
682 |
|
683 The updates a sprite on the screen, possibly after the bitmap for a particular |
|
684 sprite member has been changed. |
|
685 |
|
686 Two types of redraw are possible. A full update takes the bitmap off the screen |
|
687 and then re-draws it. This is 'safe' in that the screen always reflects |
|
688 the contents of the sprite bitmap. However it can result in flicker. Use the |
|
689 aRect parameter to specify the (small) part of the sprite which has been changed, |
|
690 then any flicker will only occur in this rectangle. |
|
691 |
|
692 A full update is required if you have removed pixels from the mask, i.e. made |
|
693 pixels in the sprite transparent when they were not before. If drawing is |
|
694 additive, e.g. you are using a mask or the draw mode is EDrawModePEN, a partial |
|
695 update is possible. Otherwise the aFullUpdate argument is ignored and a full |
|
696 update is always done. |
|
697 |
|
698 Note: if the sprite member aMember is not visible then there is no need for a change |
|
699 to the display, so the aRect and aFullUpdate parameters are ignored. |
|
700 |
|
701 param aMember The index of the sprite member that is to be updated. |
|
702 param aRect The part of the sprite member which has changed. |
|
703 param aFullUpdate ETrue for a full update, EFalse otherwise. |
|
704 |
|
705 WSERV2: |
|
706 |
|
707 Updates a sprite on the screen, possibly after the bitmap for a particular |
715 Updates a sprite on the screen, possibly after the bitmap for a particular |
708 sprite member has been changed. |
716 sprite member has been changed. |
709 |
717 |
710 Use the aRect parameter to specify the (small) part of the sprite which has been changed, |
718 Use the aRect parameter to specify the (small) part of the sprite which has been changed, |
711 then any flicker will only occur in this rectangle. |
719 then any flicker will only occur in this rectangle. |
712 |
720 |
713 A full update used to be required if you had removed pixels from the mask, i.e. made |
721 A full update used to be required if you had removed pixels from the mask, i.e. made |
714 pixels in the sprite transparent when they were not before. If drawing is |
722 pixels in the sprite transparent when they were not before. If drawing is |
715 additive, e.g. you are using a mask or the draw mode is EDrawModePEN, a partial |
723 additive, e.g. you are using a mask or the draw mode is EDrawModePEN, a partial |
716 update used to be possible. But newer versions of the window-server always do full back to front rendering. |
724 update used to be possible. But current versions of the window-server always do full back to front rendering. |
717 |
725 |
718 Note: if the sprite member aMember is not visible then there is no need for a change |
726 Note: if the sprite member aMember is not visible then there is no need for a change |
719 to the display, so the aRect and aFullUpdate parameters are ignored. |
727 to the display, so the aRect and aFullUpdate parameters are ignored. |
720 |
728 |
721 @param aMember The index of the sprite member that is to be updated. |
729 @param aMember The index of the sprite member that is to be updated. |