---
name: "offer_focus"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/offer_focus/3alleg4"
---

# offer\_focus(3alleg4)

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**(3alleg4)
