---
name: "offer_focus"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/offer_focus"
---

# offer\_focus(3alleg)

Offers the input focus to a particular object. Allegro game programming library.

## NAME

offer\_focus - Offers the input focus to a particular object. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**int offer\_focus(DIALOG \*dialog, int obj, int \*focus\_obj, int force);**

## DESCRIPTION

Offers the input focus to a particular object. Normally the function sends the MSG\_WANTFOCUS message to query whether the object is willing to accept the focus. However, passing any non-zero value as force argument instructs the function to authoritatively set the focus to the object.

## SEE ALSO

[**find\_dialog\_focus**(3alleg)](/find_dialog_focus/3alleg.md)
