Spreadtrum platform MMK message transfer function machine

Spreadtrum function machine platform is a message-driven mechanism. Each window (control) message to the MMI kernel. Then by MMI kernel message, the dispatch process to the corresponding handle. The following will be the key message, for example, a general understanding about the message mechanism Spreadtrum platform.

1, generating a message: MMI main thread THREAD_ENTRY (P_APP). Here starts running from the boot. Then initializes each module. And initialize the service. Then the main thread enters a while (1) infinite loop. After receiving the message through MmiReceiveSignal MMK_DispatchExtSig distribution message,

2, the key conversion: MMK_DispatchMSGKbd ((MmiKeyPress *) (* signal_ptr)); redistributed PUSH message. MMIDEFAULT_ConvertKeyCode (signal_keycode); the bottom of the key, can be converted to the identified key MMK. HandleMSGKbd carry the key to the converted

3, the processing before the distribution key message: HandleMSGKbd function call MMK MMK_DefaultMSGKbd, default processing is performed, such as playing a key tone, a backlight process. And whether the need to continue the distribution process. If you still want to distribute urgently needed treatment, calling DefaultIsRespond determine whether the need to continue to respond.

4, distribution: the distribution of work before completion, sends the message to the window processing MMK_DispMsgToWin-> MMK_DispatchToHandle-> MMK_DispatchToHandle-> MMK_RunWinProc. Similarly, if the message is to be treated controls, will go to the MMK_RunCtrlProc distribution process

At this time, the key message has been sent to the window to the process, of course, the message may be handled in the middle. As.

Published 22 original articles · won praise 9 · views 8833

Guess you like

Origin blog.csdn.net/ljm_c_bok/article/details/82968443