×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    10

    Partial visibility of application

    Hi All,
    My query is when an application's control get partial visibility event of TWsVisibilityChangedEvent. I registered my control for EnableVisibilityChangeEvents(), but in HandleWsEventL() of AppUI I am getting only EFullyVisible or ECantBeSeen.

    Below is my code in HandleWsEventL():
    Code:
    case EEventWindowVisibilityChanged:
    			{
    			LogData(_L("Entering case: EEventWindowVisibilityChanged"));
    		    TWsVisibilityChangedEvent* event = reinterpret_cast<TWsVisibilityChangedEvent*>(aEvent.EventData());
    	    	TBool res1 = ((event->iFlags & TWsVisibilityChangedEvent::ECanBeSeen) && (event->iFlags & TWsVisibilityChangedEvent::EPartiallyVisible));
    	    	TBool res2 = ((event->iFlags & TWsVisibilityChangedEvent::ECanBeSeen) && (event->iFlags & TWsVisibilityChangedEvent::EFullyVisible));
    	    	TBool res3 = ((event->iFlags & TWsVisibilityChangedEvent::ECanBeSeen) && (event->iFlags & TWsVisibilityChangedEvent::ENotVisible));
    	    	TBool res4 = event->iFlags & TWsVisibilityChangedEvent::ECantBeSeen;
    	    	
    	    	if(res1)
    	    		{
    	    		LogData(_L("EPartiallyVisible"));
    				}
    	    	else if(res2)
    	    		{
    	    		LogData(_L("EFullyVisible"));
    	    		}
    	    	else if(res3)
    	    		{
    	    		LogData(_L("ENotVisible"));
    	    		}
    	    	else if(res4)
    	    		{
    	    		LogData(_L("ECantBeSeen"));
    	    		}
    	    	else
    	    		{
    	    		LogData(_L("Else"));
    	    		}
    			break;
    			}
    Please suggest me correct way of doing this.

    Thanks in Advance
    Sumit

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: Partial visibility of application

    where and How have you called this EnableVisibilityChangeEvents()?
    Regards,
    Shafali

  3. #3
    Registered User
    Join Date
    Sep 2009
    Posts
    10

    Re: Partial visibility of application

    Hi Shafali,
    i am calling it from CCoeControl derived class's ConstructL().

    Code:
    Window().EnableVisibilityChangeEvents();
    Thanks
    Sumit

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: Partial visibility of application

    Quote Originally Posted by acl_symbian View Post
    Hi All,
    My query is when an application's control get partial visibility event of TWsVisibilityChangedEvent. I registered my control for EnableVisibilityChangeEvents(), but in HandleWsEventL() of AppUI I am getting only EFullyVisible or ECantBeSeen.

    Below is my code in HandleWsEventL():
    Code:
    case EEventWindowVisibilityChanged:
    			{
    			LogData(_L("Entering case: EEventWindowVisibilityChanged"));
    		    TWsVisibilityChangedEvent* event = reinterpret_cast<TWsVisibilityChangedEvent*>(aEvent.EventData());
    	    	TBool res1 = ((event->iFlags & TWsVisibilityChangedEvent::ECanBeSeen) && (event->iFlags & TWsVisibilityChangedEvent::EPartiallyVisible));
    	    	TBool res2 = ((event->iFlags & TWsVisibilityChangedEvent::ECanBeSeen) && (event->iFlags & TWsVisibilityChangedEvent::EFullyVisible));
    	    	TBool res3 = ((event->iFlags & TWsVisibilityChangedEvent::ECanBeSeen) && (event->iFlags & TWsVisibilityChangedEvent::ENotVisible));
    	    	TBool res4 = event->iFlags & TWsVisibilityChangedEvent::ECantBeSeen;
    	    	
    	    	if(res1)
    	    		{
    	    		LogData(_L("EPartiallyVisible"));
    				}
    	    	else if(res2)
    	    		{
    	    		LogData(_L("EFullyVisible"));
    	    		}
    	    	else if(res3)
    	    		{
    	    		LogData(_L("ENotVisible"));
    	    		}
    	    	else if(res4)
    	    		{
    	    		LogData(_L("ECantBeSeen"));
    	    		}
    	    	else
    	    		{
    	    		LogData(_L("Else"));
    	    		}
    			break;
    			}
    Please suggest me correct way of doing this.

    Thanks in Advance
    Sumit
    his shouldn't be something like this:

    TBool res1 =event->iFlags & TWsVisibilityChangedEvent::EPartiallyVisible;
    TBool res2 = event->iFlags & TWsVisibilityChangedEvent::ECanBeSeen ;
    TBool res3= event->iFlags & TWsVisibilityChangedEvent::EFullyVisible;
    TBool res4 = event->iFlags & TWsVisibilityChangedEvent::ENotVisible;
    TBool res5 = event->iFlags & TWsVisibilityChangedEvent::ECantBeSeen;
    Regards,
    Shafali

  5. #5
    Registered User
    Join Date
    Sep 2009
    Posts
    10

    Re: Partial visibility of application

    Hi shafali,
    I'll try it on Monday, and let you know the result.

    Thanks
    Sumit

  6. #6
    Registered User
    Join Date
    Sep 2009
    Posts
    10

    Re: Partial visibility of application

    Hi Shafali,
    I tried with your solution, but the result is same. Actually I printed value of iFlags, its value is 2 (= ENotVisible), when my control is not visible and 5 in both the cases of Fully Visible and Partially Visible. So, both the flags (for EFullyVisible and EPartiallyVisible) are getting set.

    Some more info about the partially visible Use case: My app is displaying a ticker on home screen with full visiblity, but as soon as I open a menu(of different app) on home screen, my app is visible on top of this menu, with partial visiblity.

    please provide me some pointers in this regard, as I am stuck here.

    Thanks & Regards
    Sumit

Similar Threads

  1. Want to run a j2me application from symbian
    By joy.mca in forum Symbian
    Replies: 15
    Last Post: 2009-09-12, 12:32
  2. problem in Auto starting application in s60_2nd_fp3
    By gaurav.gupta in forum Symbian
    Replies: 14
    Last Post: 2009-04-30, 11:09
  3. AutoStart My application at bootup
    By prakashs in forum Symbian
    Replies: 7
    Last Post: 2009-03-24, 10:06
  4. Application icon visibility problem in N78
    By koinyk in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-10-26, 22:32
  5. Replies: 1
    Last Post: 2008-05-08, 12:32

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×