PrevNextUpHome SophiaFramework UNIVERSE 5.3

9.22. Event List

The event consists of an event type and two parameters(P16 parameter and P32 parameter).

From BREW and SophiaFramework UNIVERSE point of view, there are 2 types of events as follows:

  1. BREW-defined event for BREW SDK
  2. Responder-defined event for SophiaFramework UNIVERSE

From the dispatching method point of view, there are 2 types of events as follows:

  1. Event of the distribute type: This event is distributed using the Distribute() function. For instance, a BREW-defined event is of this type.
  2. Event of the callback type: This event is distributed using the InvokeForward() or InvokeBackward() function. For instance, a responder-defined event is fo this type.

[Caution] User-defined event

Other than BREW-defined event and responder-defined event, user's own event("user-defined event") can be defined.

For the user-defined event, no dispatching rule is registered into the tracer.

Therefore, an event of the distribute type event is not received by only registering the handler for the event.

To receive the user-defined event of the distribute type, it is necessary to register its dispatching rule into the tracer.

Reference: Event | BREW-Defined Event | Responder-Defined Event | Distribute Type | Tracer | Callback Type | SFXEvent | SFXEventRange | SFCEventEnum | SFYResponder::Distribute | SFYResponder::InvokeBackward | SFYResponder::InvokeForward SFYApplication::Distribute | SFYApplication::InvokeBackward | SFYApplication::InvokeForward

9.22.1. BREW-Defined Event

BREW-defined event is an event to be defined for BREW SDK.

This event type has the name of the corresponding event type defined in BREW SDK with the SF prefix.

A BREW-defined event is of the distribute type, which is distributed to the responders from the SFYDistributer instance by the dispatching rule registered in tracer, and boots up the handler registered into the responder.

For instance, the SFEVT_KEY event(key event) is a BREW-defined event.

[Caution] Method to receive the BREW-defined event whose dispatching rule is registered into the standard tracer with "distributing condition: None[SFYTracer::STATE_NONE]"

The BREW-defined event whose dispatching rule is registered into the standard tracer with "distributing condition: None[SFYTracer::STATE_NONE] will be distributed to no responder including the root(SFZRoot) which the SFYApplication class contains by default.

This is because the rules of the standard tracer are registered into the SFYDistributer instance.

To receive this event, you have to register its handler directly into the SFYDistributer instance as follows:

  1. Get the SFYDistributer instance with the SFYApplication::GetDistributer function.
  2. Register the handler for this event with the SFYDistributer::RegisterHandler function.
  3. Though this handler may be defined anywhere, not pointer to a responder but "null" will be passed via the "invoker" parameter. Note this matter in case the invoker parameter will be used.

9.22.1.1. Applet-Bootup Event[SFEVT_APP_START]

Table 9.32. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_APP_START Distribute All from background to foreground Yes
[Tip] Dispatching and handling of event

The event will be distributed to all responders.

The event will be distributed to the responders from background to foreground. The handler will be booted up in the reverse order to be registered into the responder.

Even if some handler handles this event, the event handling will continue to boot up the next handler while it exists.

Table 9.33. Event parameter

P16 parameter P32 parameter P32 I/O Description
- AEEAppStart* type Read Only Same value with EVT_APP_START.

Example 9.159. Handler declaration

XANDLER_DECLARE_VOIDSTART(FUNCTION)

// or

XANDLER_DECLARE_BOOLSTART(FUNCTION)

Example 9.160. Handler implementation

XANDLER_IMPLEMENT_VOIDSTART(CLASS, FUNCTION, invoker, environment)
{
    return;
}

// or

XANDLER_IMPLEMENT_BOOLSTART(CLASS, FUNCTION, invoker, environment)
{
    return false;
}

Reference: Handler for the Applet-Bootup Event[XANDLER_DECLARE_VOIDSTART or XANDLER_DECLARE_BOOLSTART] | AEEAppStart | BREW API AEEEvent

9.22.1.2. Applet-Terminate Event[SFEVT_APP_STOP]

Table 9.34. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_APP_STOP Distribute All from foreground to background Yes
[Tip] Dispatching and handling of event

The event will be distributed to all responders.

The event will be distributed to the responders from foreground to background. The handler will be booted up in the reverse order to be registered into the responder.

Even if some handler handles this event, the event handling will continue to boot up the next handler while it exists.

Table 9.35. Event parameter

P16 parameter P32 parameter P32 I/O Description
- BoolPtr type Read Write Same value with EVT_APP_STOP.

Example 9.161. Handler declaration

XANDLER_DECLARE_VOIDSTOP(FUNCTION)

// or

XANDLER_DECLARE_BOOLSTOP(FUNCTION)

Example 9.162. Handler implementation

XANDLER_IMPLEMENT_VOIDSTOP(CLASS, FUNCTION, invoker, quitable)
{
    return;
}

// or

XANDLER_IMPLEMENT_BOOLSTOP(CLASS, FUNCTION, invoker, quitable)
{
    return false;
}

Reference: Handler for the Applet-Terminate Event[XANDLER_DECLARE_VOIDSTOP or XANDLER_DECLARE_BOOLSTOP] | BREW API AEEEvent

9.22.1.3. Applet-Resume Event[SFEVT_APP_RESUME]

Table 9.36. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_APP_RESUME Distribute All from background to foreground Yes
[Tip] Dispatching and handling of event

The event will be distributed to all responders.

The event will be distributed to the responders from background to foreground. The handler will be booted up in the reverse order to be registered into the responder.

Even if some handler handles this event, the event handling will continue to boot up the next handler while it exists.

Table 9.37. Event parameter

P16 parameter P32 parameter P32 I/O Description
- AEEAppStart* type Read Only Same value with EVT_APP_RESUME.

Example 9.163. Handler declaration

XANDLER_DECLARE_VOIDRESUME(FUNCTION)

// or

XANDLER_DECLARE_BOOLRESUME(FUNCTION)

Example 9.164. Handler implementation

XANDLER_IMPLEMENT_VOIDRESUME(CLASS, FUNCTION, invoker, environment)
{
    return;
}

// or

XANDLER_IMPLEMENT_BOOLRESUME(CLASS, FUNCTION, invoker, environment)
{
    return false;
}

Reference: Handler for the Applet-Resume Event[XANDLER_DECLARE_VOIDRESUME or XANDLER_DECLARE_BOOLRESUME] | AEEAppStart | BREW API AEEEvent

9.22.1.4. Applet-Suspend Event[SFEVT_APP_SUSPEND]

Table 9.38. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_APP_SUSPEND Distribute All from foreground to background Yes
[Tip] Dispatching and handling of event

The event will be distributed to all responders.

The event will be distributed to the responders from foreground to background. The handler will be booted up in the reverse order to be registered into the responder.

Even if some handler handles this event, the event handling will continue to boot up the next handler while it exists.

Table 9.39. Event parameter

P16 parameter P32 parameter P32 I/O Description
AEESuspendReason type AEESuspendInfo* type Read Only Same value with EVT_APP_SUSPEND.

Example 9.165. Handler declaration

XANDLER_DECLARE_VOIDSUSPEND(FUNCTION)

// or

XANDLER_DECLARE_BOOLSUSPEND(FUNCTION)

Example 9.166. Handler implementation

XANDLER_IMPLEMENT_VOIDSUSPEND(CLASS, FUNCTION, invoker, reason, info)
{
    return;
}

// or

XANDLER_IMPLEMENT_BOOLSUSPEND(CLASS, FUNCTION, invoker, reason, info)
{
    return false;
}

Reference: Handler for the Applet-Suspend Event[XANDLER_DECLARE_VOIDSUSPEND or XANDLER_DECLARE_BOOLSUSPEND] | AEESuspendReason | AEESuspendInfo | BREW API AEEEvent

9.22.1.5. Other Applet Event[from SFEVT_APP_CONFIG to SFEVT_APP_START_WINDOW]

Table 9.40. Event type

Event type Calling method Distributing condition Processing order Overloading condition
from SFEVT_APP_CONFIG to SFEVT_APP_START_WINDOW Distribute No from foreground to background No
[Tip] Dispatching and handling of event

This event will not be distributed to any responder(this event can be received by the SFYDistributer instance). Therefore, the handler for this event needs to be registered into the SFYDistributer instance.

The handler will be booted up in the reverse order to be registered.

If some handler handles this event, the event handling will end there.

Table 9.41. Event parameter

P16 parameter P32 parameter P32 I/O Description
Depend on event. Depend on event. Depend on event. Same value with from EVT_APP_CONFIG to EVT_APP_START_WINDOW.

Example 9.167. Handler declaration

XANDLER_DECLARE_VOIDEVENT(FUNCTION)

// or

XANDLER_DECLARE_BOOLEVENT(FUNCTION)

Example 9.168. Handler implementation

XANDLER_IMPLEMENT_VOIDEVENT(CLASS, FUNCTION, invoker, event)
{
    return;
}

// or

XANDLER_IMPLEMENT_BOOLEVENT(CLASS, FUNCTION, invoker, event)
{
    return false;
}

Reference: General Purpose Handler with Arguments [XANDLER_DECLARE_VOIDEVENT or XANDLER_DECLARE_BOOLEVENT] | BREW API AEEEvent

9.22.1.6. Key Event[from SFEVT_KEY to SFEVT_KEY_HOOK_RELEASE]

Table 9.42. Event type

Event type Calling method Distributing condition Processing order Overloading condition
from SFEVT_KEY to SFEVT_KEY_HOOK_RELEASE Distribute Focus from foreground to background No
[Tip] Dispatching and handling of event

The event will be distributed to the focused responders.

The event will be distributed to the responders from foreground to background. The handler will be booted up in the reverse order to be registered into the responder.

If some handler handles this event, the event handling will end there.

Table 9.43. Event parameter

P16 parameter P32 parameter P32 I/O Description
Depend on event. Depend on event. Depend on event. Same value with from EVT_KEY to EVT_KEY_HOOK_RELEASE.

Example 9.169. Handler declaration

XANDLER_DECLARE_VOIDEVENT(FUNCTION)

// or

XANDLER_DECLARE_BOOLEVENT(FUNCTION)

Example 9.170. Handler implementation

XANDLER_IMPLEMENT_VOIDEVENT(CLASS, FUNCTION, invoker, event)
{
    return;
}

// or

XANDLER_IMPLEMENT_BOOLEVENT(CLASS, FUNCTION, invoker, event)
{
    return false;
}

Reference: General Purpose Handler with Arguments [XANDLER_DECLARE_VOIDEVENT or XANDLER_DECLARE_BOOLEVENT] | BREW API AEEEvent

9.22.1.7. Control Event[from SFEVT_COMMAND to SFEVT_CTL_TEXT_MODECHANGED]

Table 9.44. Event type

Event type Calling method Distributing condition Processing order Overloading condition
from SFEVT_COMMAND to SFEVT_CTL_TEXT_MODECHANGED Distribute Focus from foreground to background No
[Tip] Dispatching and handling of event

The event will be distributed to the focused responders.

The event will be distributed to the responders from foreground to background. The handler will be booted up in the reverse order to be registered into the responder.

If some handler handles this event, the event handling will end there.

Table 9.45. Event parameter

P16 parameter P32 parameter P32 I/O Description
Depend on event. Depend on event. Depend on event. Same value with from EVT_COMMAND to EVT_CTL_TEXT_MODECHANGED.

Example 9.171. Handler declaration

XANDLER_DECLARE_VOIDEVENT(FUNCTION)

// or

XANDLER_DECLARE_BOOLEVENT(FUNCTION)

Example 9.172. Handler implementation

XANDLER_IMPLEMENT_VOIDEVENT(CLASS, FUNCTION, invoker, event)
{
    return;
}

// or

XANDLER_IMPLEMENT_BOOLEVENT(CLASS, FUNCTION, invoker, event)
{
    return false;
}

Reference: General Purpose Handler with Arguments [XANDLER_DECLARE_VOIDEVENT or XANDLER_DECLARE_BOOLEVENT] | BREW API AEEEvent

9.22.1.8. Dialog Event[from SFEVT_DIALOG_INIT to SFEVT_COPYRIGHT_END]

Table 9.46. Event type

Event type Calling method Distributing condition Processing order Overloading condition
from SFEVT_DIALOG_INIT to SFEVT_COPYRIGHT_END Distribute Focus from foreground to background No
[Tip] Dispatching and handling of event

The event will be distributed to the focused responders.

The event will be distributed to the responders from foreground to background. The handler will be booted up in the reverse order to be registered into the responder.

If some handler handles this event, the event handling will end there.

Table 9.47. Event parameter

P16 parameter P32 parameter P32 I/O Description
Depend on event. Depend on event. Depend on event. Same value with from EVT_DIALOG_INIT to EVT_COPYRIGHT_END.

Example 9.173. Handler declaration

XANDLER_DECLARE_VOIDEVENT(FUNCTION)

// or

XANDLER_DECLARE_BOOLEVENT(FUNCTION)

Example 9.174. Handler implementation

XANDLER_IMPLEMENT_VOIDEVENT(CLASS, FUNCTION, invoker, event)
{
    return;
}

// or

XANDLER_IMPLEMENT_BOOLEVENT(CLASS, FUNCTION, invoker, event)
{
    return false;
}

Reference: General Purpose Handler with Arguments [XANDLER_DECLARE_VOIDEVENT or XANDLER_DECLARE_BOOLEVENT] | BREW API AEEEvent

9.22.1.9. Shell Event[from SFEVT_ALARM to SFEVT_NOTIFY_FAILURE]

Table 9.48. Event type

Event type Calling method Distributing condition Processing order Overloading condition
from SFEVT_ALARM to SFEVT_NOTIFY_FAILURE Distribute No from foreground to background No
[Tip] Dispatching and handling of event

This event will not be distributed to any responder(this event can be received by the SFYDistributer instance). Therefore, the handler for this event needs to be registered into the SFYDistributer instance.

The handler will be booted up in the reverse order to be registered.

If some handler handles this event, the event handling will end there.

Table 9.49. Event parameter

P16 parameter P32 parameter P32 I/O Description
Depend on event. Depend on event. Depend on event. Same value with from EVT_ALARM to EVT_NOTIFY_FAILURE.

Example 9.175. Handler declaration

XANDLER_DECLARE_VOIDEVENT(FUNCTION)

// or

XANDLER_DECLARE_BOOLEVENT(FUNCTION)

Example 9.176. Handler implementation

XANDLER_IMPLEMENT_VOIDEVENT(CLASS, FUNCTION, invoker, event)
{
    return;
}

// or

XANDLER_IMPLEMENT_BOOLEVENT(CLASS, FUNCTION, invoker, event)
{
    return false;
}

Reference: General Purpose Handler with Arguments [XANDLER_DECLARE_VOIDEVENT or XANDLER_DECLARE_BOOLEVENT] | BREW API AEEEvent

9.22.1.10. Device Event[from SFEVT_FLIP to SFEVT_SCR_ROTATE]

Table 9.50. Event type

Event type Calling method Distributing condition Processing order Overloading condition
from SFEVT_FLIP to SFEVT_SCR_ROTATE Distribute No from foreground to background No
[Tip] Dispatching and handling of event

This event will not be distributed to any responder(this event can be received by the SFYDistributer instance). Therefore, the handler for this event needs to be registered into the SFYDistributer instance.

The handler will be booted up in the reverse order to be registered.

If some handler handles this event, the event handling will end there.

Table 9.51. Event parameter

P16 parameter P32 parameter P32 I/O Description
Depend on event. Depend on event. Depend on event. Same value with from EVT_FLIP to EVT_SCR_ROTATE.

Example 9.177. Handler declaration

XANDLER_DECLARE_VOIDEVENT(FUNCTION)

// or

XANDLER_DECLARE_BOOLEVENT(FUNCTION)

Example 9.178. Handler implementation

XANDLER_IMPLEMENT_VOIDEVENT(CLASS, FUNCTION, invoker, event)
{
    return;
}

// or

XANDLER_IMPLEMENT_BOOLEVENT(CLASS, FUNCTION, invoker, event)
{
    return false;
}

Reference: General Purpose Handler with Arguments [XANDLER_DECLARE_VOIDEVENT or XANDLER_DECLARE_BOOLEVENT] | BREW API AEEEvent

9.22.1.11. Clipboard Event[from SFEVT_CB_CUT to SFEVT_CB_PASTE]

Table 9.52. Event type

Event type Calling method Distributing condition Processing order Overloading condition
from SFEVT_CB_CUT to SFEVT_CB_PASTE Distribute No from foreground to background No
[Tip] Dispatching and handling of event

This event will not be distributed to any responder(this event can be received by the SFYDistributer instance). Therefore, the handler for this event needs to be registered into the SFYDistributer instance.

The handler will be booted up in the reverse order to be registered.

If some handler handles this event, the event handling will end there.

Table 9.53. Event parameter

P16 parameter P32 parameter P32 I/O Description
Depend on event. Depend on event. Depend on event. Same value with from EVT_CB_CUT to EVT_CB_PASTE.

Example 9.179. Handler declaration

XANDLER_DECLARE_VOIDEVENT(FUNCTION)

// or

XANDLER_DECLARE_BOOLEVENT(FUNCTION)

Example 9.180. Handler implementation

XANDLER_IMPLEMENT_VOIDEVENT(CLASS, FUNCTION, invoker, event)
{
    return;
}

// or

XANDLER_IMPLEMENT_BOOLEVENT(CLASS, FUNCTION, invoker, event)
{
    return false;
}

Reference: General Purpose Handler with Arguments [XANDLER_DECLARE_VOIDEVENT or XANDLER_DECLARE_BOOLEVENT] | BREW API AEEEvent

9.22.2. Responder-Defined Event

Responder-defined event is an event to be defined for SophiaFramework UNIVERSE.

The name of this event type has the SFEVT_RESPONDER_ prefix.

A responder-defined event is of the callback type. which is sent to a responder with the SFYResponder::InvokeForward / SFYApplication::InvokeForward or SFYResponder::InvokeBackward / SFYApplication::InvokeBackward functions and boots up the corresponding handler registered into the responder.

For instance, the SFEVT_RESPONDER_RENDER event(drawing event) is a responder-defined event.

9.22.2.1. Parent Child Event[SFEVT_RESPONDER_OWNER]

Table 9.54. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_RESPONDER_OWNER Callback - from background to foreground Yes
[Tip] Dispatching and handling of event

This event will be distributed only to the target responder(this event will not be distributed to any child responder of the target responder).

The handler will be booted up in the reverse order to be registered into the responder.

Even if some handler handles this event, the event handling will continue to boot up the next handler while it exists.

Table 9.55. Event parameter

P16 parameter P32 parameter P32 I/O Description
SFP16_OWNER_PARENT SFYResponderPtr type Read Only Notify that the parent responder has been changed.
SFP16_OWNER_REGISTER SFYResponderPtr type Read Only Notify that the child responder has been registered.
SFP16_OWNER_UNREGISTER SFYResponderPtr type Read Only Notify that the child responder has been unregistered.
SFP16_OWNER_ARRANGE SFYResponderPtr type Read Only Notify that order of the child responders has been changed.

Example 9.181. Handler declaration

XANDLER_DECLARE_VOIDOWNER(FUNCTION)

Example 9.182. Handler implementation

XANDLER_IMPLEMENT_VOIDOWNER(CLASS, FUNCTION, invoker, reason, responder)
{
    return;
}

Reference: Handler for the Parent Child Event[XANDLER_DECLARE_VOIDOWNER]

9.22.2.2. Parent Child Event[SFEVT_RESPONDER_FRAME]

Table 9.56. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_RESPONDER_OWNER Callback - from background to foreground Yes
[Tip] Dispatching and handling of event

This event will be distributed only to the target responder(this event will not be distributed to any child responder of the target responder).

The handler will be booted up in the reverse order to be registered into the responder.

Even if some handler handles this event, the event handling will continue to boot up the next handler while it exists.

Table 9.57. Event parameter

P16 parameter P32 parameter P32 I/O Description
SFP16_FRAME_FRAME SFYResponderPtr type Read Only Notify the content responder that its frame has been changed.
SFP16_FRAME_CONTENT SFYResponderPtr type Read Only Notify the frame that its content responder has been changed.

Example 9.183. Handler declaration

XANDLER_DECLARE_VOIDFRAME(FUNCTION)

Example 9.184. Handler implementation

XANDLER_IMPLEMENT_VOIDFRAME(CLASS, FUNCTION, invoker, reason, responder)
{
    return;
}

Reference: Handler for Frame Event[XANDLER_DECLARE_VOIDOWNER]

9.22.2.3. Region Event[SFEVT_RESPONDER_BOUND]

Table 9.58. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_RESPONDER_BOUND Callback - from background to foreground Yes
[Tip] Dispatching and handling of event

This event will be distributed only to the target responder(this event will not be distributed to any child responder of the target responder).

The handler will be booted up in the reverse order to be registered into the responder.

Even if some handler handles this event, the event handling will continue to boot up the next handler while it exists.

Table 9.59. Event parameter

P16 parameter P32 parameter P32 I/O Description
SFP16_BOUND_REQUEST SFXRectanglePtr type Read / Write Request to calculate the suitable region size.
SFP16_BOUND_OPTIMIZE SFXRectanglePtr type Read / Write Request to calculate the suitable region size within the size given via an argument.
SFP16_BOUND_REAL SFXRectanglePtr type Read Only Notify that the real region has been changed.
SFP16_BOUND_VIRTUAL SFXRectanglePtr type Read Only Notify that the virtual region has been changed.
SFP16_BOUND_GLOBAL SFXRectanglePtr type Read Only Notify that the global region has been changed.

Example 9.185. Handler declaration

XANDLER_DECLARE_VOIDBOUND(FUNCTION)

Example 9.186. Handler implementation

XANDLER_IMPLEMENT_VOIDBOUND(CLASS, FUNCTION, invoker, reason, rectangle)
{
    return;
}

Reference: Handler for the Region Event[XANDLER_DECLARE_VOIDBOUND]

9.22.2.4. Margin Event[SFEVT_RESPONDER_MARGIN]

Table 9.60. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_RESPONDER_MARGIN Callback - from background to foreground Yes
[Tip] Dispatching and handling of event

This event will be distributed only to the target responder(this event will not be distributed to any child responder of the target responder).

The handler will be booted up in the reverse order to be registered into the responder.

Even if some handler handles this event, the event handling will continue to boot up the next handler while it exists.

Table 9.61. Event parameter

P16 parameter P32 parameter P32 I/O Description
SFP16_MARGIN_REQUEST SFXMarginPtr type Read / Write Request to calculate the suitable margin size.

Example 9.187. Handler declaration

XANDLER_DECLARE_VOIDMARGIN(FUNCTION)

Example 9.188. Handler implementation

XANDLER_IMPLEMENT_VOIDMARGIN(CLASS, FUNCTION, invoker, reason, margin)
{
    return;
}

Reference: Handler for the Margin Event[XANDLER_DECLARE_VOIDMARGIN]

9.22.2.5. State Event[SFEVT_RESPONDER_STATE]

Table 9.62. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_RESPONDER_STATE Callback - from background to foreground Yes
[Tip] Dispatching and handling of event

This event will be distributed only to the target responder(this event will not be distributed to any child responder of the target responder).

The handler will be booted up in the reverse order to be registered into the responder.

Even if some handler handles this event, the event handling will continue to boot up the next handler while it exists.

Table 9.63. Event parameter

P16 parameter P32 parameter P32 I/O Description
SFP16_STATE_VALID Bool type Read Only Notify that the valid state has been changed.
SFP16_STATE_VISIBLE Bool type Read Only Notify that the visible state has been changed.
SFP16_STATE_ACTIVE Bool type Read Only Notify that the active state has been changed.
SFP16_STATE_ENABLE Bool type Read Only Notify that the enable state has been changed.
SFP16_STATE_FOCUS Bool type Read Only Notify that the focus state has been changed.
SFP16_STATE_PRESS Bool type Read Only Notify that the key-pressed state has been changed.

Example 9.189. Handler declaration

XANDLER_DECLARE_VOIDSTATE(FUNCTION)

Example 9.190. Handler implementation

XANDLER_IMPLEMENT_VOIDSTATE(CLASS, FUNCTION, invoker, reason, state)
{
    return;
}

Reference: Handler for the State Event[XANDLER_DECLARE_VOIDSTATE]

9.22.2.6. Focus Event[SFEVT_RESPONDER_FOCUS]

Table 9.64. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_RESPONDER_FOCUS Callback - from background to foreground Yes
[Tip] Dispatching and handling of event

This event will be distributed only to the target responder(this event will not be distributed to any child responder of the target responder).

The handler will be booted up in the reverse order to be registered into the responder.

Even if some handler handles this event, the event handling will continue to boot up the next handler while it exists.

Table 9.65. Event parameter

P16 parameter P32 parameter P32 I/O Description
SFP16_FOCUS_FORWARD Bool type Read Only Notify that the focus has been moved in normal order.
SFP16_FOCUS_BACKWARD Bool type Read Only Notify that the focus has been moved in the reverse order.

Example 9.191. Handler declaration

XANDLER_DECLARE_VOIDFOCUS(FUNCTION)

Example 9.192. Handler implementation

XANDLER_IMPLEMENT_VOIDFOCUS(CLASS, FUNCTION, invoker, reason, focus)
{
    return;
}

Reference: Handler for the Focus Event[XANDLER_DECLARE_VOIDFOCUS]

9.22.2.7. Drawing Event[SFEVT_RESPONDER_RENDER]

Table 9.66. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_RESPONDER_RENDER Callback - from background to foreground Yes
[Tip] Dispatching and handling of event

This event will be distributed only to the target responder(this event will not be distributed to any child responder of the target responder).

The handler will be booted up in the reverse order to be registered into the responder.

Even if some handler handles this event, the event handling will continue to boot up the next handler while it exists.

Table 9.67. Event parameter

P16 parameter P32 parameter P32 I/O Description
SFP16_RENDER_REQUEST SFXGraphicsPtr type Read Only Request to redraw.

Example 9.193. Handler declaration

XANDLER_DECLARE_VOIDRENDER(FUNCTION)

Example 9.194. Handler implementation

XANDLER_IMPLEMENT_VOIDRENDER(CLASS, FUNCTION, invoker, reason, graphics)
{
    return;
}

Reference: Handler for the Drawing Event[XANDLER_DECLARE_VOIDRENDER]

9.22.2.8. Style Event[SFEVT_RESPONDER_STYLE]

Table 9.68. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_RESPONDER_STYLE Callback - from background to foreground Yes
[Tip] Dispatching and handling of event

This event will be distributed only to the target responder(this event will not be distributed to any child responder of the target responder).

The handler will be booted up in the reverse order to be registered into the responder.

Even if some handler handles this event, the event handling will continue to boot up the next handler while it exists.

Table 9.69. Event parameter

P16 parameter P32 parameter P32 I/O Description
SFP16_STYLE_COLOR - - Notify that the color has been changed.
SFP16_STYLE_ALIGN - - Notify that the alignment has been changed.
SFP16_STYLE_TEXT - - Notify that the text has been changed.
SFP16_STYLE_FONT - - Notify that the font has been changed.
SFP16_STYLE_IMAGE - - Notify that the image has been changed.

Example 9.195. Handler declaration

XANDLER_DECLARE_VOIDSTYLE(FUNCTION)

Example 9.196. Handler implementation

XANDLER_IMPLEMENT_VOIDSTYLE(CLASS, FUNCTION, invoker, reason)
{
    return;
}

Reference: Handler for the Style Event[XANDLER_DECLARE_VOIDSTYLE]

9.22.2.9. Value Event[SFEVT_RESPONDER_VALUE]

Table 9.70. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_RESPONDER_VALUE Callback - from background to foreground Yes
[Tip] Dispatching and handling of event

This event will be distributed only to the target responder(this event will not be distributed to any child responder of the target responder).

The handler will be booted up in the reverse order to be registered into the responder.

Even if some handler handles this event, the event handling will continue to boot up the next handler while it exists.

Table 9.71. Event parameter

P16 parameter P32 parameter P32 I/O Description
SFP16_VALUE_MAXIMUM SInt32 type Read Only Notify that the maximum value has been changed.
SFP16_VALUE_MINIMUM SInt32 type Read Only Notify that the minimum value has been changed.
SFP16_VALUE_CURRENT SInt32 type Read Only Notify that the current value has been changed.

Example 9.197. Handler declaration

XANDLER_DECLARE_VOIDVALUE(FUNCTION)

Example 9.198. Handler implementation

XANDLER_IMPLEMENT_VOIDVALUE(CLASS, FUNCTION, invoker, reason, value)
{
    return;
}

Reference: Handler for the Value Event[XANDLER_DECLARE_VOIDVALUE]

9.22.2.10. Result Event[SFEVT_RESPONDER_RESULT]

Table 9.72. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_RESPONDER_RESULT Callback - from foreground to background No
[Tip] Dispatching and handling of event

This event will be distributed only to the target responder(this event will not be distributed to any child responder of the target responder).

The handler will be booted up in the reverse order to be registered into the responder.

If some handler handles this event, the event handling will end there.

Table 9.73. Event parameter

P16 parameter P32 parameter P32 I/O Description
SFP16_RESULT_OK SInt32 type Read Only Notify "Selected".
SFP16_RESULT_CANCEL - - Notify "Canceled".
SFP16_RESULT_ANOTHER - - Notify others.
SFP16_RESULT_ESCAPE - - Notify "Suspended".
SFP16_RESULT_ERROR SFCError type Read Only Notify "Error".

Example 9.199. Handler declaration

XANDLER_DECLARE_VOIDRESULT(FUNCTION)

Example 9.200. Handler implementation

XANDLER_IMPLEMENT_VOIDRESULT(CLASS, FUNCTION, invoker, reason, result)
{
    return;
}

Reference: Handler for the Result Event[XANDLER_DECLARE_VOIDRESULT]

9.22.2.11. SoftKey Event[SFEVT_RESPONDER_SOFTKEY]

Table 9.74. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_RESPONDER_SOFTKEY Callback - from foreground to background No
[Tip] Dispatching and handling of event

This event will be distributed only to the target responder(this event will not be distributed to any child responder of the target responder).

The handler will be booted up in the reverse order to be registered into the responder.

If some handler handles this event, the event handling will end there.

Table 9.75. Event parameter

P16 parameter P32 parameter P32 I/O Description
AVK_SOFT1 - - Notify that the SoftKey1 has been pressed.
AVK_SOFT2 - - Notify that the SoftKey2 has been pressed.
AVK_SOFT3 - - Notify that the SoftKey3 has been pressed.
AVK_SOFT4 - - Notify that the SoftKey4 has been pressed.

Example 9.201. Handler declaration

XANDLER_DECLARE_VOIDEVENT(FUNCTION)

// or

XANDLER_DECLARE_BOOLEVENT(FUNCTION)

Example 9.202. Handler implementation

XANDLER_IMPLEMENT_VOIDEVENT(CLASS, FUNCTION, invoker, event)
{
    return;
}

// or

XANDLER_IMPLEMENT_BOOLEVENT(CLASS, FUNCTION, invoker, event)
{
    return false;
}

Reference: General Purpose Handler with Arguments [XANDLER_DECLARE_VOIDEVENT or XANDLER_DECLARE_BOOLEVENT]

9.22.2.12. Scroll Bar Event[SFEVT_RESPONDER_SCROLLBAR]

Table 9.76. Event type

Event type Calling method Distributing condition Processing order Overloading condition
SFEVT_RESPONDER_SCROLLBAR Callback - from background to foreground Yes
[Tip] Dispatching and handling of event

This event will be distributed only to the target responder(this event will not be distributed to any child responder of the target responder).

The handler will be booted up in the reverse order to be registered into the responder.

Even if some handler handles this event, the event handling will continue to boot up the next handler while it exists.

Table 9.77. Event parameter

P16 parameter P32 parameter P32 I/O Description
SFP16_SCROLLBAR_ENABLE - - Notify the enable state of the scroll bar.

Example 9.203. Handler declaration

XANDLER_DECLARE_VOIDSCROLLBAR(FUNCTION)

Example 9.204. Handler implementation

XANDLER_IMPLEMENT_VOIDSCROLLBAR(CLASS, FUNCTION, invoker, reason)
{
    return;
}

Reference: Handler for the Scroll Bar Event[XANDLER_DECLARE_VOIDSCROLLBAR]

9.22.3. Other Constants

Table 9.78. Other event types

Event type Description
SFEVT_BEGIN Starting value.
SFEVT_APPLET_CLASS_BEGIN Starting value of the applet event.
SFEVT_APPLET_CLASS_END Ending value of the applet event.
SFEVT_KEY_CLASS_BEGIN Starting value of the key event.
SFEVT_KEY_CLASS_END Ending value of the key event.
SFEVT_CONTROL_CLASS_BEGIN Starting value of the control event.
SFEVT_CONTROL_CLASS_END Ending value of the control event.
SFEVT_DIALOG_CLASS_BEGIN Starting value of the dialog event.
SFEVT_DIALOG_CLASS_END Ending value of the dialog event.
SFEVT_SHELL_CLASS_BEGIN Starting value of the shell event.
SFEVT_SHELL_CLASS_END Ending value of the shell event.
SFEVT_DEVICE_CLASS_BEGIN Starting value of the device event.
SFEVT_DEVICE_CLASS_END Ending value of the device event.
SFEVT_CLIPBOARD_CLASS_BEGIN Starting value of the clipboard event.
SFEVT_CLIPBOARD_CLASS_END Ending value of the clipboard event.
SFEVT_OEM_CLASS_BEGIN Starting value of the OEM event.
SFEVT_OEM_CLASS_END Ending value of the OEM event.
SFEVT_DYNAMIC_CLASS_BEGIN Starting value of the dynamic event.
SFEVT_DYNAMIC_CLASS_END Ending value of the dynamic event.
SFEVT_RESPONDER_CLASS_BEGIN Starting value of the responder-defined event.
SFEVT_RESPONDER_CLASS_END Ending value of the responder-defined event.
SFEVT_USER_CLASS_BEGIN Starting value of the user-defined event.
SFEVT_USER User-defined event.
SFEVT_USER_CLASS_END Ending value of the user-defined event.
SFEVT_NONE Invalid event.
SFEVT_END Ending value.

Table 9.79. Other event parameters

Event parameter Description
SFP16_BEGIN Starting value.
SFP16_NONE Invalid parameter.
SFP16_END Ending value.