Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi All,

I have an application where I merged another standalone Image viewer application. When control comes to Image viewer's event handler, first IDISPLAY_ClearScreen() does not respond(does not clear the previous screen).

First of all I thought that first IDISPLAY_Update() is not working, but when I checked it by loading on the device, it showed current screen behind the previous screen, which gave me clue that first clearScreen() is not working. (Next time when control comes to the same point , it worked fine... i.e. it cleared the screen).

Can anybody come up with any guess, where the problem could be ? :confused:

Thanks & regards.

No replies? Please do reply , need help ....

No replies? Please do reply , need help ....

palavi u can just put the code part.
my suggestions:
1> you are able to see one screen behind the other, so it cud be the reason that " you r clearing the rectangle of front screen size i.e the foreground screen". so u can use "idisplay_setcliprect" api and set the rectangle to the size of the screen prior to clearing the screen.
2> you can use the "idisplay_fill rect" api to fill the screen rect with desired color

palavi u can just put the code part.
my suggestions:
1> you are able to see one screen behind the other, so it cud be the reason that " you r clearing the rectangle of front screen size i.e the foreground screen". so u can use "idisplay_setcliprect" api and set the rectangle to the size of the screen prior to clearing the screen.
2> you can use the "idisplay_fill rect" api to fill the screen rect with desired color

Hi Prashant,
Thanks for the reply.
It didn't work.
boolean Image::Image_HandleEvent(uint16 nKeyPressed)
{
switch(nKeyPressed)
{
case AVK_SELECT:
IDISPLAY_ClearScreen(m_pUIMgr->GetCtlMgr()->m_pIDisplay);
DisplaySoftKeys();
DisplayImage(m_szBuf[m_nImageIdx]);
DisplayHeader(m_szBuf[m_nImageIdx]);
return TRUE;
}

Hi Prashant,
Thanks for the reply.
It didn't work.
boolean Image::Image_HandleEvent(uint16 nKeyPressed)
{
switch(nKeyPressed)
{
case AVK_SELECT:
IDISPLAY_ClearScreen(m_pUIMgr->GetCtlMgr()->m_pIDisplay);
DisplaySoftKeys();
DisplayImage(m_szBuf[m_nImageIdx]);
DisplayHeader(m_szBuf[m_nImageIdx]);
return TRUE;
}

hope u r updating screen before return true

hope u r updating screen before return true

pallavi have u updated the screen? make sure you updating after draw functions

pallavi have u updated the screen? make sure you updating after draw functions

I was having update screen statement in the code... but as behaviour was same even if i comment the statement, i didn't put it in the snippet. :confused:
it works absolutely fine in second button click(select key).

I was having update screen statement in the code... but as behaviour was same even if i comment the statement, i didn't put it in the snippet. :confused:
it works absolutely fine in second button click(select key).

comment all other functions below clearscreen ,just keep clearscreen and update (if u hav not done this already) n check out.
Then only u can be sure wt actually is happening coz most probably mistake lies somewhere else .

comment all other functions below clearscreen ,just keep clearscreen and update (if u hav not done this already) n check out.
Then only u can be sure wt actually is happening coz most probably mistake lies somewhere else .

thanks for the reply.
its clearing the screen in second click.

thanks for the reply.
its clearing the screen in second click.

put IDisplayUpdateEX(pdisplay,false) just after clear screen along with break point . watch uor simulator simultaneously while debugging at this point (giving space for uor simulator in half screen of uor monitor ) now u can check on execution of IDisplayUpdateEX(pdisplay,false) (n henceforth clearscreen), wt happened to uor screen .. ....coz" clearscreen fails" I never heard!!

put IDisplayUpdateEX(pdisplay,false) just after clear screen along with break point . watch uor simulator simultaneously while debugging at this point (giving space for uor simulator in half screen of uor monitor ) now u can check on execution of IDisplayUpdateEX(pdisplay,false) (n henceforth clearscreen), wt happened to uor screen .. ....coz" clearscreen fails" I never heard!!

Ashutosh, u r correct. ClearScreen is working. But problem seems some whr else.i wud like to explain u the scenario: on select key - a playlist is displayed. on down arrow key - hightlight switches to second file in the playlist.
Now when i press select key first time, previous layout doesn't go.
(I tested the code on device, the display list appears behind previous layout.(coz wen i tested the code, my rect size were diffrent for prev layout and for displaying playlist.that's y i cud see that list is behind the prev layout.))
when i press down arrow key, display list comes with highlight on second file.
when i press select key twice, display list appears(which shud happen on first click of select key).I think the first event remains in queue and get cleared when second event comes.
do u have idea, how to clear the event queue forcefully? Is thr any API for clearing the queue?
Thanks for replying.

Ashutosh, u r correct. ClearScreen is working. But problem seems some whr else.i wud like to explain u the scenario: on select key - a playlist is displayed. on down arrow key - hightlight switches to second file in the playlist.
Now when i press select key first time, previous layout doesn't go.
(I tested the code on device, the display list appears behind previous layout.(coz wen i tested the code, my rect size were diffrent for prev layout and for displaying playlist.that's y i cud see that list is behind the prev layout.))
when i press down arrow key, display list comes with highlight on second file.
when i press select key twice, display list appears(which shud happen on first click of select key).I think the first event remains in queue and get cleared when second event comes.
do u have idea, how to clear the event queue forcefully? Is thr any API for clearing the queue?
Thanks for replying.

I got the point. The playlist was displayed but, the flow after displaying playlist(timer for player was started here) was to draw the layout(previous timer). I want to stop that floe to stop when i enter into the player. I cancelled previous timer and staretd player's timer, but still it completes whatever flow it was inside. n thats y the layout is displayed again... :mad:

I got the point. The playlist was displayed but, the flow after displaying playlist(timer for player was started here) was to draw the layout(previous timer). I want to stop that floe to stop when i enter into the player. I cancelled previous timer and staretd player's timer, but still it completes whatever flow it was inside. n thats y the layout is displayed again... :mad:

its resolved... i put an "if" statement before painting the layout... if control is inside player, don't paint the layout.. thanks for replying n helping. :)

its resolved... i put an "if" statement before painting the layout... if control is inside player, don't paint the layout.. thanks for replying n helping. :)