###############################################################################
# #
# Copyright © 1989-1991 by Artificial Horizons®, Inc. All rights reserved. #
# #
# This material constitutes the trade secrets and confidential, #
# proprietary information of Bruce Factor and Curtis Priem, and is #
# under license to Artificial Horizons, Inc. The material is not #
# to be disclosed, reproduced, copied, or used in any manner not #
# permitted under license from Artificial Horizons, Inc. For more #
# information email "ahi-interest@ahi.com". #
# #
###############################################################################
FBLOCK(3G) AVIATOR GRAPHICS INTERFACE FUNCTIONS FBLOCK(3G)
NAME
fblock, fbunlock - lock or unlock a frame buffer
SYNOPSIS
#include <agi.h>
int fblock(fbp)
register Fbuffer fbp;
void fbunlock(fbp)
register Fbuffer fbp;
SUNVIEW SYNOPSIS
#include <agi.h>
#include <suntool/sunview.h>
#include <suntool/canvas.h>
int fblock(fbp, canvas)
register Fbuffer fbp;
register Canvas canvas;
void fbunlock(fbp)
register Fbuffer fbp;
OPENWIN SYNOPSIS
#include <agi.h>
#include <xview/xview.h>
int fblock(fbp, dpy, win)
register Fbuffer fbp;
register Display *dpy;
register Window win;
void fbunlock(fbp)
register Fbuffer fbp;
DESCRIPTION
fblock() locks the state of the frame buffer. When running in a
windowing system fblock() also locks the state of the clip list.
No other process can access the frame buffer and the clip list does
not change until the frame buffer is unlocked.
fbunlock() unlocks the frame buffer and the clip list.
RETURN VALUES
fblock() returns the number of clip rectangles it takes to describe
the current window.
ERRORS
If an error occurs, the internal fberrno is set. fberrno can be read
using fberror(3G) and fbperror(3G).
WARNING
Do not invoke any window system calls (pixwin, xview, etc.) while the
frame buffer is locked. This may case the windowing system to hang.
PERFORMANCE
fbp should be declared a register.
fblock() and fbunlock() are very slow routines, especially in Sunview.
They should be called as little as possible. Normally they are called
once per frame or whenever rendering changes from one paint canvas to
another. They should be called at least 4 times a second to release
the frame buffer to other processes for updating.
If fblock() returns 0, jump directly to fbunlock() since nothing will
be drawn anyway.
AGI Release 1.8 Last change: 25 December 1991