Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ accept_focu(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtCallAcceptFocus(1)

XtSetKeyboardFocus(1)

 

Name

accept_focus — Core method for accepting or rejecting the keyboard focus. 

Synopsis

typedef Boolean (∗XtAcceptFocusProc)(Widget, Time ∗);

Arguments

wSpecifies the widget. 

timeSpecifies the X time of the event causing the accept focus. 

Description

When the keyboard focus is given to a widget by its parent, the parent will call XtCallAcceptFocus, which invokes the widget’s accept_focus method.  This method takes the keyboard focus using XtSetKeyboardFocus and the Xlib function XSetInputFocus and must return a Boolean to indicate whether the widget actually took the focus, so that the parent can give the focus to another widget if necessary. 

The accept_focus method is part of the Core class structure.  A widget that never wants the keyboard focus should set its accept_focus method to NULL when it initializes its class record. 

A widget can usurp the keyboard focus by calling the Xlib function XSetInputFocus explicitly.  Similarly, widgets can be notified of the loss of keyboard focus by specifying translations or event handlers for FocusIn and FocusOut events. 

See Also

XtCallAcceptFocus(1), XtSetKeyboardFocus(1). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026