*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/*
**
**
** Routines of the update phase that apply equally to both types of
** multibuffer set members, windows and multibuffers.
*/
#include <stdio.h>
#ifdef SERVER_DGA
#endif /* SERVER_DGA */
#include "dga_incls.h"
#include "pix_grab.h"
#include "mbufsetstr.h"
/*
** The update phase entry routine for mbufset members.
** Called if the master change count of the shared info
** differs from the last recorded count in the client structure.
*/
int
{
int status;
#ifdef MT
if (dgaMTOn) {
/* check the real change count that we saved away */
return (0);
}
}
#endif
/* establish the new real lock subject */
/* save last lock subject. This may be used later in the update phase */
/* start out assuming we're not aliased. This may change if we detect
aliasing later in the update phase */
/* the first thing we do is distinguish between locking a window
and a multibuffer. The update logic is different */
if (bufIndex == -1) {
} else {
}
#ifdef MT
if (dgaMTOn) {
/* save the real change count */
/* For the MT case, make sure that this update function gets called
* the next time around, so overwrite the change count to make it
* different.
*/
}
#endif
return (status);
}
/*
** See if the shared info of the main window is still valid.
** Nonzero is returned if it is no longer valid and has become
** a zombie.
*/
int
{
if (infop->w_obsolete) {
return (1);
} else {
return (0);
}
}
/*
** The way we deal with any composition change is to destroy the old
** multibuffer set and establish a new one.
*/
void
{
/* check to see if this is an actual composition change or simply
a display change */
/* no change -- must be only a display change */
return;
}
/* this is a real composition change. Destroy the old mbufset (if any)
and create a new one */
/* remember whether window was previously multibuffered. This is
used later in the update phase to determine the reason for the
mbufset change */
/* destroy the old one */
if (pMbs) {
}
return;
}
/* create a new one */
if (!pMbs) {
/* TODO: really the only way we have of responding to this is treat
it as a zombie. It's not ideal, but what else can we do? */
}
}
/*
** If a render buffer notification function has been registered
** and the current effective lock subject differs from the current
** write buffer, call the notification function to change the render
** buffer state.
*/
void
{
short *pRendBuf;
/* has client registered the notification function? */
if (!dgawin->rendBufNotifyFunc) {
return;
}
/* we only need to notify in single-address access mode */
return;
}
/*
* Only notify if rend buf is different from what we want it to be
* Note: we treat the write buffer index as the render buffer and ignore
* the read buffer index.
*/
/* update the shared info so both the server and other clients can
see and react to the change */
}
}
/*
** A derivative change is one which is dependent on changes discovered
** earlier in the update phase (i.e. the basic changes). We determine here which ones need
** to be reported. Derivative changes may be reported along with
** the basic changes. The derivative changes in common for mbufset
** members are: site change.
*/
void
{
/* safety */
/* check for zombie */
/* report both a site change and a clip for zombies. This is simply
more insurance that the client will sync up with the null clip. */
return;
}
/* check for first time */
return;
return;
}
/* check for cache change */
return;
}
/* check for alias change */
return;
}
/* check for mbufset composition change */
return;
}
}
/*
** If we can report any changes through notification, do so now.
*/
void
{
/* report any mbufset change */
}
}
}
/* there are no notify functions for the following:
clip, cursor, bstore, cache */
}
void
{
return;
}
/* check for window devinfo change */
}
/* check for nonviewable mbuf devinfo change */
}
/* Note: viewable mbufs don't have dev info */
}
static void
{
if (dgawin->siteNotifyFunc) {
} else {
/* client must find out through dga_draw_sitechg */
}
}
static void
{
/* figure out reason for change */
} else {
/* this might happen if the mbufset was activated and then, in
the same update phase, deactivated. In this case, allow it,
but just don't report any changes */
return;
}
if (dgawin->mbNotifyFunc) {
} else {
/* client must find out through dga_draw_mbchg */
}
}
static void
{
if (dgawin->ovlStateNotifyFunc) {
dgawin->c_ovlstate);
} else {
/* client must find out through dga_draw_sitechg */
}
}