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

Developer

Forums

Forums:

Prior to BREW 3.1, if I wanted to get the size of the secondary display I would call ISHELL_GetDeviceInfoEx() with AEE_DEVICEITEM_DISPINFO2, but the 3.1.2 SDK docs say this is deprecated in 3.1. So what's the proper procedure to get the size now?

Another question: how do I give control of the secondary display back to the phone? I want the secondary display to go back to displaying whatever the phone displays by default, but I may use the display again so I don't want to just get rid of my instance of the secondary display.

-Erik

ebrowne wrote:Prior to BREW 3.1, if I wanted to get the size of the secondary display I would call ISHELL_GetDeviceInfoEx() with AEE_DEVICEITEM_DISPINFO2, but the 3.1.2 SDK docs say this is deprecated in 3.1. So what's the proper procedure to get the size now?
Once you've obtained the IDisplay for the secondary display, you can get the device bitmap and call IBITMAP_GetInfo().
Quote:Another question: how do I give control of the secondary display back to the phone? I want the secondary display to go back to displaying whatever the phone displays by default, but I may use the display again so I don't want to just get rid of my instance of the secondary display.
That's the only way. You have to release all your references to the device bitmap. The IDisplay initially created for the display has two references: the destination and the device bitmap. You can set the destination to something else, but the only way you'll get the IDisplay to release its device bitmap pointer is to release the IDisplay.
What exactly do you want to avoid getting rid of? The IDisplay and the device bitmap are the only things you really have to get rid of. You can have a second IDisplay that you keep around, but has a null destination when you give up control of the display.

ebrowne wrote:Prior to BREW 3.1, if I wanted to get the size of the secondary display I would call ISHELL_GetDeviceInfoEx() with AEE_DEVICEITEM_DISPINFO2, but the 3.1.2 SDK docs say this is deprecated in 3.1. So what's the proper procedure to get the size now?
Once you've obtained the IDisplay for the secondary display, you can get the device bitmap and call IBITMAP_GetInfo().
Quote:Another question: how do I give control of the secondary display back to the phone? I want the secondary display to go back to displaying whatever the phone displays by default, but I may use the display again so I don't want to just get rid of my instance of the secondary display.
That's the only way. You have to release all your references to the device bitmap. The IDisplay initially created for the display has two references: the destination and the device bitmap. You can set the destination to something else, but the only way you'll get the IDisplay to release its device bitmap pointer is to release the IDisplay.
What exactly do you want to avoid getting rid of? The IDisplay and the device bitmap are the only things you really have to get rid of. You can have a second IDisplay that you keep around, but has a null destination when you give up control of the display.