h6. [[WindowManager]] h6(. » [[WindowManager SWI Calls|SWI Calls]] h6((. » [[Wimp_Poll|Wimp_Poll]] h6(((. » [[Reason Codes|Reason Codes]] h6((((. » Gain_Caret h2. Gain_Caret h5. (Reason Code 12) |_<. Exit | | |<^. Block | | |>^. +0|Window handle | |>^. +4|Icon handle, or -1 if none | |>^. +8|X offset (relative to window origin) | |>^. +12|Y offset (relative to window origin) | |>^. +16|[[Caret Flags|Caret Flags]] | |>^. +20|Index into string, or -1 if none | h4. Use This code is returned from [[Wimp_Poll|Wimp_Poll]] and indicates that the window has now received the input focus. h4. Notes This event usually occurs due to a user clicking on an icon or window that accepts text. It can also happen if an application explicitly calls [[Wimp_SetCaretPosition|Wimp_SetCaretPosition]]. Windows and icons can be set to accept text by setting the button types within the [[Window Flags|window flag]] and [[Icon Flags|icon flags]] respectively. This event code is not generated if the input focus changes within the same window. h4. See also * [[Caret Flags|Caret Flags]] * [[Icon Button Types|Icon Button Types]] * [[Lose_Caret|Lose_Caret]] * [[Reason Codes|Reason Codes]] * [[Window Button Types|Window Button Types]] * [[Wimp_Poll|Wimp_Poll]] * [[Wimp_SetCaretPosition|Wimp_SetCaretPosition]]