AknGlobalPopupPriorityController Class Reference

class AknGlobalPopupPriorityController
AknGlobalPopupPriorityController is the public interface of the Popup Priority Controller system. This system is used in place of other window position, window group position, control stack and fade stack APIs to give correct behavior when prioritised notifiers and other global popups are displayed. The system works by allowing popups to be associated with a priority. When the system is enabled and a popup is shown, the app's window group will be brought forward to a priority of ECoeWinPriorityAlwaysAtFront + (highest shown popup priority). The app's window group is pushed to the background when no popups are displayed. Therefore this system should only be enabled for applications who only display popup windows, ie the notifier host apps.
Since
3.2
capability
SwEvent is required to display popups at global priorities.

Member Functions Documentation

AddPopupToControlStackL(CCoeControl &, TInt, TInt)

IMPORT_C void AddPopupToControlStackL ( CCoeControl & aPopup,
TInt aPriority = ECoeStackPriorityDefault,
TInt aStackingFlags = ECoeStackFlagStandard
) [static]

Puts a popup on the control stack with the specified priority and flags. If the popup (or its ultimate parent if it's a sub-popup) are not the highest priority popup, the control stack flags ECoeStackFlagRefusesAllKeys and ECoeStackFlagRefusesFocus will be added in. This makes the popup behave like a sleeping dialog while in the background. For correct behavior, the priority and flag parameters should be set as if the popup were in the foreground. This function analogous to CCoeAppUi::AddToStackL , and should be used in place of that for controls which may be used as global popups. When global popups are not enabled, this function forwards the call to CCoeAppUi::AddToStackL . It is still the responsibility of the calling code to remove popups from the control stack using CCoeAppUi::RemoveFromStack .

Parameters

CCoeControl & aPopup the popup or sub-popup which should be added to the control stack.
TInt aPriority = ECoeStackPriorityDefault the control stack priority for this popup
TInt aStackingFlags = ECoeStackFlagStandard the control stack flags for this popup

AddSubPopupL(CCoeControl &, CCoeControl &)

IMPORT_C void AddSubPopupL ( CCoeControl & aPopup,
CCoeControl & aSubPopup
) [static]

Adds a sub-popup to a parent popup. For instance a softkey control could be added to a global note popup window. The sub-popup's window and control stack positions will be changed as its parent's positions are changed. A popup may have at most one sub-popup and one parent popup.

Parameters

CCoeControl & aPopup the parent popup which will be have the sub popup added to it.
CCoeControl & aSubPopup the sub popup which is to follow the control stack and window position behavior of its parent.

AllowGlobalPopups(TBool)

IMPORT_C void AllowGlobalPopups ( TBool aAllow ) [static]

Set whether global popups are to be shown or not. If global popups are not allowed, the app's window group will be pushed to the background. Callers will need SwEvent

Parameters

TBool aAllow

EnablePriorityControlL()

IMPORT_C void EnablePriorityControlL ( ) [static]

Enables the Popup Priority Controller in this app. Before this function is called, all other functions in this API have no effect. It is safe to use the other APIs in all apps. They will only have effect where the system is enabled.

FadeBehindPopup(CCoeControl &, TAknPopupFader &, MAknFadedComponent &, TBool)

IMPORT_C void FadeBehindPopup ( CCoeControl & aPopup,
TAknPopupFader & aFader,
MAknFadedComponent & aFadedComponent,
TBool aFade
) [static]

This allows the global priority controller to control fade such that the top global popup is unfaded, and all other windows are faded. This function is analogous to TAknPopupFader::FadeBehindPopup . When global popups are not enabled, this function forwards the call to TAknPopupFader::FadeBehindPopup .

Parameters

CCoeControl & aPopup the popup to which the fade parameters apply
TAknPopupFader & aFader the TAknPopupFader normally used by the popup (nb this is not stored, so can be temporary).
MAknFadedComponent & aFadedComponent the faded component interface, allowing access to the components of the popup.
TBool aFade whether the screen behind the popup should be faded or not.

GlobalPopupsAllowed()

IMPORT_C TBool GlobalPopupsAllowed ( ) [static]

Return whether global popups are to be shown or not.

RemovePopupPriority(CCoeControl &)

IMPORT_C void RemovePopupPriority ( CCoeControl & aPopup ) [static]

Removes a popup from the set of shown popups and forgets the popup parameters. When a popup is set with any of the other APIs in this class, this function must be called when the popup is deleted. The common popup classes CEikDialog , CAknChoiceList, and CAknPopupList all call this from their destructors, in case their clients set a priority for them.

Parameters

CCoeControl & aPopup

RouseSleepingPopup(CCoeControl &, TBool)

IMPORT_C void RouseSleepingPopup ( CCoeControl & aPopup,
TBool aRoused
) [static]

Modifies the control stack flags as appropriate for a sleeping popup. This function is analogous to CEikonEnv::RouseSleepingDialog . When global popups are not enabled, this function forwards the call to CEikonEnv::RouseSleepingDialog .

Parameters

CCoeControl & aPopup the popup which should be roused.
TBool aRoused whether the popup should be roused or sent back to sleep.

SetPopupPriorityL(CCoeControl &, TInt)

IMPORT_C void SetPopupPriorityL ( CCoeControl & aPopup,
TInt aPriority
) [static]

Sets the priority for a popup control. The priority affects two things, how the popup is displayed in relation to other popups and how the app is displayed in relation to other apps. Popups with higher priority will have their windows placed before popups with lower priority. The app's window group priority will be affected by the highest priority popup shown. If a popup does not have a priority set, it is automatically given the default value of 0. Low priority popups should be given negative priority values. High priority popups should be given positive priority values.

Parameters

CCoeControl & aPopup
TInt aPriority

SetRootWinOrdinalPosition(TInt)

IMPORT_C void SetRootWinOrdinalPosition ( TInt aOrdinalPosition ) [static]

Sets the ordinal position for the Eikon environment's root window group, that will be used when a popup is shown.

Parameters

TInt aOrdinalPosition the ordinal position which the window group will use when showing popups. Note, ordinal position only affects windows groups with the same ordinal priority. Since popup priority affects window group ordinal priority, setting the ordinal position will have only a minor effect.

ShowPopup(CCoeControl &, TBool)

IMPORT_C void ShowPopup ( CCoeControl & aPopup,
TBool aShow
) [static]

Sets whether a popup is shown or not, which can affect the popup's window priority, the app's window group priority, the control stack and the fade stack. When a popup is shown, it is added to a list of shown popups and its window priority is set according to the position in this list. If the highest priority popup changes, the window group priority for the app is changed according to the new highest priority popup. The highest priority popup will also be activated on the control stack and placed at the top of the fade stack.

Parameters

CCoeControl & aPopup
TBool aShow