---
name: "ggiSetWriteFrame"
section: "3ggi"
platform: "linux"
package: "libggi2-dev"
version: "1:2.0.1-2"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/ggiSetDisplayFrame/3ggi"
---

# ggiSetWriteFrame(3ggi)

Set or get the current frame for display, writing and reading

Part of [ggiSetDisplayFrame(3ggi)](/ggiSetDisplayFrame/3ggi.md).

## NAME

ggiSetDisplayFrame, ggiSetWriteFrame, ggiSetReadFrame, ggiGetDisplayFrame, ggiGetWriteFrame, ggiGetReadFrame - Set or get the current frame for display, writing and reading

## SYNOPSIS

**#include \<ggi/ggi.h\>**

**int ggiSetDisplayFrame(ggi\_visual\_t** *vis***, int** *frameno***);**

**int ggiSetWriteFrame(ggi\_visual\_t** *vis***, int** *frameno***);**

**int ggiSetReadFrame(ggi\_visual\_t** *vis***, int** *frameno***);**

**int ggiGetDisplayFrame(ggi\_visual\_t** *vis***);**

**int ggiGetWriteFrame(ggi\_visual\_t** *vis***);**

**int ggiGetReadFrame(ggi\_visual\_t** *vis***);** .SH "DESCRIPTION"

These functions are used for selecting or getting the current buffers, when using the multiple buffering function of LibGGI.

**ggiSetDisplayFrame** sets the frame that gets displayed.

**ggiSetWriteFrame** sets the frame for write operations such as **ggiPuts** and **ggiHLine**.

**ggiSetReadFrame** sets the frame for read operations, like **ggiGetPixel** and the **ggiCrossBlit** source.

**ggiGetDisplayFrame** reports the frame currently displayed.

**ggiGetWriteFrame** reports the frame currently written to.

**ggiSetReadFrame** reports the frame currently read from.

Frames are numbered from 0 to the number of frames requested - 1.

## RETURN VALUE

The **ggiSet\*Frame** functions return 0 if they succeed, and \<0 if they fail.

The **ggiGet\*Frame** functions never fail.
