943N/A/* Copyright (c) 1993, 1997, Oracle and/or its affiliates. All rights reserved.
830N/A *
830N/A * Permission is hereby granted, free of charge, to any person obtaining a
919N/A * copy of this software and associated documentation files (the "Software"),
919N/A * to deal in the Software without restriction, including without limitation
919N/A * the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A * and/or sell copies of the Software, and to permit persons to whom the
919N/A * Software is furnished to do so, subject to the following conditions:
830N/A *
919N/A * The above copyright notice and this permission notice (including the next
919N/A * paragraph) shall be included in all copies or substantial portions of the
919N/A * Software.
830N/A *
919N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A * DEALINGS IN THE SOFTWARE.
830N/A */
830N/A
830N/A
830N/A/*
830N/A** mbsmemb_inquiry.c - state inquiry routines for mbufset members.
830N/A*/
830N/A
830N/A#ifdef SERVER_DGA
830N/A#include <X11/Xlib.h>
830N/A#endif /* SERVER_DGA */
830N/A#include "dga_incls.h"
830N/A#include "pix_grab.h"
830N/A#include "mbufsetstr.h"
830N/A
830N/Aextern int dgai_rtn_ungrab_common(_Dga_window dgawin, int drawableGrabber);
830N/Aextern int dga_rtn_bitsperpixel(Dga_window clientpi);
830N/A
830N/ADisplay *
830N/Adgai_mbsmemb_display (_Dga_window dgawin)
830N/A{
830N/A return (dgawin->w_dpy);
830N/A}
830N/A
830N/Achar *
830N/Adgai_mbsmemb_devname (_Dga_window dgawin)
830N/A{
830N/A if (dgawin->changeMask & DGA_CHANGE_ZOMBIE)
830N/A return (NULL);
830N/A
830N/A return(((WXINFO *) (dgawin->w_info))->w_devname);
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_devfd (_Dga_window dgawin)
830N/A{
830N/A return(dgawin->w_devfd);
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_depth (_Dga_window dgawin)
830N/A{
830N/A WXINFO *infop = (WXINFO *) dgawin->w_info;
830N/A
830N/A if (dgawin->changeMask & DGA_CHANGE_ZOMBIE)
830N/A return (NULL);
830N/A
830N/A if (infop->w_version >= 3)
830N/A return((int)infop->w_depth);
830N/A else
830N/A return (0);
830N/A}
830N/A
830N/Avoid
830N/Adgai_mbsmemb_set_client_infop (_Dga_window dgawin, void *client_info_ptr)
830N/A{
830N/A dgawin->w_client = client_info_ptr;
830N/A}
830N/A
830N/Avoid *
830N/Adgai_mbsmemb_get_client_infop (_Dga_window dgawin)
830N/A{
830N/A return (dgawin->w_client);
830N/A}
830N/A
830N/Avoid *
830N/Adgai_mbsmemb_devinfo (_Dga_window dgawin)
830N/A{
830N/A SHARED_PIXMAP_INFO *infop;
830N/A
830N/A if ((dgawin->eLockSubj == DGA_LOCKSUBJ_INVALID) ||
830N/A dgawin->changeMask & DGA_CHANGE_ZOMBIE) {
830N/A return (NULL);
830N/A }
830N/A
830N/A if (dgawin->eLockSubj == -1) {
830N/A WXINFO *infop = (WXINFO *) dgawin->w_info;
830N/A
830N/A return ((void *) &(infop->wx_dbuf.device_info));
830N/A }
830N/A infop = dgawin->pMbs->pNbShinfo[dgawin->eLockSubj];
830N/A return (((char *)infop) + infop->device_offset);
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_devinfochg (_Dga_window dgawin)
830N/A{
830N/A if (dgawin->changeMask & DGA_CHANGE_DEVINFO) {
830N/A dgawin->changeMask &= ~DGA_CHANGE_DEVINFO;
830N/A return (1);
830N/A } else {
830N/A return (0);
830N/A }
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_sitechg (_Dga_window dgawin, int *reason)
830N/A{
830N/A if (dgawin->changeMask & DGA_CHANGE_SITE) {
830N/A dgawin->changeMask &= ~DGA_CHANGE_SITE;
830N/A *reason = dgawin->siteChgReason;
830N/A return (1);
830N/A } else {
830N/A *reason = DGA_SITECHG_UNKNOWN;
830N/A return (0);
830N/A }
830N/A}
830N/A
830N/Avoid
830N/Adgai_mbsmemb_sitesetnotify (_Dga_window dgawin, DgaSiteNotifyFunc site_notify_func,
830N/A void *client_data)
830N/A{
830N/A dgawin->siteNotifyFunc = site_notify_func;
830N/A dgawin->siteNotifyClientData = client_data;
830N/A}
830N/A
830N/Avoid
830N/Adgai_mbsmemb_sitegetnotify (_Dga_window dgawin, DgaSiteNotifyFunc *site_notify_func,
830N/A void **client_data)
830N/A{
830N/A *site_notify_func = dgawin->siteNotifyFunc;
830N/A *client_data = dgawin->siteNotifyClientData;
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_site (_Dga_window dgawin)
830N/A{
830N/A SHARED_PIXMAP_INFO *infop;
830N/A
830N/A if ((dgawin->eLockSubj == DGA_LOCKSUBJ_INVALID)||
830N/A dgawin->changeMask & DGA_CHANGE_ZOMBIE) {
830N/A return (DGA_SITE_NULL);
830N/A }
830N/A
830N/A /* viewable drawables always are in device site */
830N/A if (DGA_LOCKSUBJ_VIEWABLE(dgawin, dgawin->eLockSubj)) {
830N/A return (DGA_SITE_DEVICE);
830N/A }
830N/A
830N/A /* the site of a nonviewable multibuffer depends on whether or not
830N/A it is cached */
830N/A
830N/A infop = dgawin->pMbs->pNbShinfo[dgawin->eLockSubj];
830N/A return (infop->cached ? DGA_SITE_DEVICE : DGA_SITE_SYSTEM);
830N/A}
830N/A
830N/Avoid *
830N/Adgai_mbsmemb_address (_Dga_window dgawin)
830N/A{
830N/A SHARED_PIXMAP_INFO *infop;
830N/A
830N/A if ((dgawin->eLockSubj == DGA_LOCKSUBJ_INVALID) ||
830N/A dgawin->changeMask & DGA_CHANGE_ZOMBIE ||
830N/A DGA_LOCKSUBJ_VIEWABLE(dgawin, dgawin->eLockSubj)) {
830N/A return (NULL);
830N/A }
830N/A
830N/A /* the return value is only valid for nonviewable multibuffers that
830N/A are not cached */
830N/A infop = dgawin->pMbs->pNbShinfo[dgawin->eLockSubj];
830N/A return (infop->cached ? NULL : (void *)(infop + 1));
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_linebytes (_Dga_window dgawin)
830N/A{
830N/A SHARED_PIXMAP_INFO *infop;
830N/A
830N/A if ((dgawin->eLockSubj == DGA_LOCKSUBJ_INVALID) ||
830N/A dgawin->changeMask & DGA_CHANGE_ZOMBIE ||
830N/A DGA_LOCKSUBJ_VIEWABLE(dgawin, dgawin->eLockSubj)) {
830N/A return (0);
830N/A }
830N/A
830N/A /* the return value is only valid for nonviewable multibuffers that
830N/A are not cached */
830N/A infop = dgawin->pMbs->pNbShinfo[dgawin->eLockSubj];
830N/A return (infop->cached ? 0 : infop->linebytes);
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_bitsperpixel (_Dga_window dgawin)
830N/A{
830N/A SHARED_PIXMAP_INFO *infop;
830N/A
830N/A if ((dgawin->eLockSubj == DGA_LOCKSUBJ_INVALID) ||
830N/A dgawin->changeMask & DGA_CHANGE_ZOMBIE ||
830N/A DGA_LOCKSUBJ_VIEWABLE(dgawin, dgawin->eLockSubj)) {
830N/A return (0);
830N/A }
830N/A
830N/A /* the return value is only valid for nonviewable multibuffers that
830N/A are not cached */
830N/A infop = dgawin->pMbs->pNbShinfo[dgawin->eLockSubj];
830N/A return (infop->cached ? 0 : infop->bitsperpixel);
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_clipchg (_Dga_window dgawin)
830N/A{
830N/A /* always force a clip change on a zombie to get the client
830N/A to notice */
830N/A if (dgawin->changeMask & DGA_CHANGE_ZOMBIE) {
830N/A return (1);
830N/A }
830N/A
830N/A if (DGA_LOCKSUBJ_VIEWABLE(dgawin, dgawin->eLockSubj)) {
830N/A if (dga_win_clipchg((Dga_window)dgawin) ||
830N/A (dgawin->changeMask & DGA_CHANGE_CLIP)) {
830N/A dgawin->changeMask &= ~DGA_CHANGE_CLIP;
830N/A return (1);
830N/A } else {
830N/A return (0);
830N/A }
830N/A } else {
830N/A /* nonviewable */
830N/A if (dgawin->changeMask & DGA_CHANGE_CLIP) {
830N/A dgawin->changeMask &= ~DGA_CHANGE_CLIP;
830N/A return (1);
830N/A } else {
830N/A return (0);
830N/A }
830N/A }
830N/A}
830N/A
830N/Avoid
830N/Adgai_mbsmemb_bbox(_Dga_window dgawin, int *xp, int *yp, int *widthp, int *heightp)
830N/A{
830N/A if ((dgawin->eLockSubj == DGA_LOCKSUBJ_INVALID) ||
830N/A dgawin->changeMask & DGA_CHANGE_ZOMBIE) {
830N/A *xp = 0;
830N/A *yp = 0;
830N/A *widthp = 0;
830N/A *heightp = 0;
830N/A return;
830N/A }
830N/A
830N/A if (DGA_LOCKSUBJ_VIEWABLE(dgawin, dgawin->eLockSubj)) {
830N/A dga_win_bbox((Dga_window)dgawin, xp, yp, widthp, heightp);
830N/A } else {
830N/A /* nonviewable */
830N/A SHARED_PIXMAP_INFO *infop;
830N/A
830N/A infop = dgawin->pMbs->pNbShinfo[dgawin->eLockSubj];
830N/A *xp = 0;
830N/A *yp = 0;
830N/A *widthp = infop->width;
830N/A *heightp = infop->height;
830N/A }
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_visibility (_Dga_window dgawin)
830N/A{
830N/A if (dgawin->changeMask & DGA_CHANGE_ZOMBIE) {
830N/A return (DGA_VIS_FULLY_OBSCURED);
830N/A }
830N/A
830N/A if (DGA_LOCKSUBJ_VIEWABLE(dgawin, dgawin->eLockSubj)) {
830N/A return (dgai_win_visibility((Dga_window)dgawin));
830N/A } else {
830N/A /* Non viewable mbufs are always unobscured */
830N/A return (DGA_VIS_UNOBSCURED);
830N/A }
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_empty (_Dga_window dgawin)
830N/A{
830N/A if ((dgawin->eLockSubj == DGA_LOCKSUBJ_INVALID)||
830N/A dgawin->changeMask & DGA_CHANGE_ZOMBIE) {
830N/A return (1);
830N/A }
830N/A
830N/A if (DGA_LOCKSUBJ_VIEWABLE(dgawin, dgawin->eLockSubj)) {
830N/A return (dga_win_empty((Dga_window)dgawin));
830N/A } else {
830N/A /* nonviewable */
830N/A SHARED_PIXMAP_INFO *infop;
830N/A
830N/A infop = dgawin->pMbs->pNbShinfo[dgawin->eLockSubj];
830N/A return (infop->width <= 0 || infop->height <= 0);
830N/A }
830N/A}
830N/A
830N/Astatic short nonviewableShape[] = {
830N/A 0, /* ymin */
830N/A 0, /* ymax: fill in based on height */
830N/A 0, /* xmin */
830N/A 0, /* xmax: fill in based on width */
830N/A DGA_X_EOL,
830N/A DGA_Y_EOL,
830N/A};
830N/A
830N/A#define YMAX_INDEX 1
830N/A#define XMAX_INDEX 3
830N/A
830N/Ashort *
830N/Adgai_mbsmemb_clipinfo (_Dga_window dgawin)
830N/A{
830N/A if ((dgawin->eLockSubj == DGA_LOCKSUBJ_INVALID) ||
830N/A dgawin->changeMask & DGA_CHANGE_ZOMBIE) {
830N/A return (NULL);
830N/A }
830N/A
830N/A if (DGA_LOCKSUBJ_VIEWABLE(dgawin, dgawin->eLockSubj)) {
830N/A return (dga_win_clipinfo((Dga_window)dgawin));
830N/A } else {
830N/A /* nonviewable */
830N/A SHARED_PIXMAP_INFO *infop;
830N/A
830N/A /* build a dummy shape describing the rectangle */
830N/A infop = dgawin->pMbs->pNbShinfo[dgawin->eLockSubj];
830N/A if (infop->width <= 0 || infop->height <= 0) {
830N/A return (NULL);
830N/A } else {
830N/A nonviewableShape[YMAX_INDEX] = infop->height - 1;
830N/A nonviewableShape[XMAX_INDEX] = infop->width - 1;
830N/A return (nonviewableShape);
830N/A }
830N/A }
830N/A}
830N/A
830N/A
830N/Aint
830N/Adgai_mbsmemb_singlerect (_Dga_window dgawin)
830N/A{
830N/A if (dgawin->changeMask & DGA_CHANGE_ZOMBIE) {
830N/A /* consider a zombie to be a "single rectangle" of 0 width and height */
830N/A return (1);
830N/A }
830N/A
830N/A if (DGA_LOCKSUBJ_VIEWABLE(dgawin, dgawin->eLockSubj)) {
830N/A return (dga_win_singlerect((Dga_window)dgawin));
830N/A } else {
830N/A /* nonviewable is always a single rectangle */
830N/A return (1);
830N/A }
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_obscured (_Dga_window dgawin)
830N/A{
830N/A if (dgawin->changeMask & DGA_CHANGE_ZOMBIE) {
830N/A /* consider a zombie to be always fully obscured */
830N/A return (1);
830N/A }
830N/A
830N/A if (DGA_LOCKSUBJ_VIEWABLE(dgawin, dgawin->eLockSubj)) {
830N/A return (dga_win_obscured((Dga_window)dgawin));
830N/A } else {
830N/A /* nonviewable can never be obscured */
830N/A return (0);
830N/A }
830N/A}
830N/A
830N/A
830N/Au_short
830N/Adgai_mbsmemb_borderwidth (_Dga_window dgawin)
830N/A{
830N/A if (dgawin->changeMask & DGA_CHANGE_ZOMBIE) {
830N/A /* zombies don't have borders */
830N/A return (0);
830N/A }
830N/A
830N/A if (DGA_LOCKSUBJ_WINDOW(dgawin, dgawin->eLockSubj)) {
830N/A return (dga_win_borderwidth((Dga_window)dgawin));
830N/A } else {
830N/A /* multibuffers don't have borders */
830N/A return (0);
830N/A }
830N/A}
830N/A
830N/A
830N/Atypedef void (*DgaCursTakeDownFuncOld)();
830N/A
830N/Avoid
830N/Adgai_mbsmemb_curshandle (_Dga_window dgawin, DgaCursTakeDownFunc take_down_func,
830N/A void *client_data)
830N/A{
830N/A Dga_window dgaw;
830N/A
830N/A /* Nonviewable drawables never have a cursor */
830N/A if (!DGA_LOCKSUBJ_VIEWABLE(dgawin, dgawin->eLockSubj)) {
830N/A return;
830N/A }
830N/A
830N/A /* viewable multibuffers share the cursor of the main window */
830N/A dgaw = (Dga_window) dgawin;
830N/A if (dga_win_curschg(dgaw)) {
830N/A if (dga_win_cursactive(dgaw)) {
830N/A dga_win_cursupdate(dgaw,
830N/A (DgaCursTakeDownFuncOld)take_down_func,
830N/A client_data);
830N/A }
830N/A }
830N/A}
830N/A
830N/A
830N/Aint
830N/Adgai_mbsmemb_rtngrab (_Dga_window dgawin)
830N/A{
830N/A /* rtngrab is not something that must be called from inside a lock
830N/A * and therefore the eLockSubj is meaningless. Just do a
830N/A * dga_rtn_grab() on the window. */
830N/A
830N/A return (dga_rtn_grab((Dga_window)dgawin));
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_rtnungrab (_Dga_window dgawin)
830N/A{
830N/A return (dgai_rtn_ungrab_common(dgawin,1));
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_rtnchg (_Dga_window dgawin)
830N/A{
830N/A if (DGA_LOCKSUBJ_WINDOW(dgawin, dgawin->eLockSubj)) {
830N/A return (dga_win_rtnchg((Dga_window)dgawin));
830N/A } else {
830N/A /* rtn is not applicable to multibuffers -- always force an activity check */
830N/A return (1);
830N/A }
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_rtnactive (_Dga_window dgawin)
830N/A{
830N/A if (DGA_LOCKSUBJ_WINDOW(dgawin, dgawin->eLockSubj)) {
830N/A return (dga_rtn_active((Dga_window)dgawin));
830N/A } else {
830N/A /* rtn is not applicable to multibuffers -- never active */
830N/A return (0);
830N/A }
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_rtncached (_Dga_window dgawin)
830N/A{
830N/A if (DGA_LOCKSUBJ_WINDOW(dgawin, dgawin->eLockSubj)) {
830N/A return (dga_rtn_cached((Dga_window)dgawin));
830N/A } else {
830N/A /* rtn is not applicable to multibuffers -- never cached */
830N/A return (0);
830N/A }
830N/A}
830N/A
830N/Avoid *
830N/Adgai_mbsmemb_rtndevinfop (_Dga_window dgawin)
830N/A{
830N/A if (DGA_LOCKSUBJ_WINDOW(dgawin, dgawin->eLockSubj)) {
830N/A return (dga_rtn_devinfo((Dga_window)dgawin));
830N/A } else {
830N/A /* rtn is not applicable to multibuffers -- no devinfo */
830N/A return (NULL);
830N/A }
830N/A}
830N/A
830N/Avoid
830N/Adgai_mbsmemb_rtndevtype (_Dga_window dgawin, u_char *type, char **name)
830N/A{
830N/A if (DGA_LOCKSUBJ_WINDOW(dgawin, dgawin->eLockSubj)) {
830N/A dga_rtn_devtype((Dga_window)dgawin, type, name);
830N/A } else {
830N/A /* rtn is not applicable to multibuffers -- values of return args are arbitrary */
830N/A *type = (u_char) 0;
830N/A *name = NULL;
830N/A }
830N/A}
830N/A
830N/Avoid
830N/Adgai_mbsmemb_rtndimensions (_Dga_window dgawin, short *width, short *height,
830N/A u_int *linebytes)
830N/A{
830N/A if (DGA_LOCKSUBJ_WINDOW(dgawin, dgawin->eLockSubj)) {
830N/A dga_rtn_dimensions((Dga_window)dgawin, width, height, linebytes);
830N/A } else {
830N/A /* rtn is not applicable to multibuffers -- values of return args are arbitrary */
830N/A *width = 0;
830N/A *height = 0;
830N/A *linebytes = 0;
830N/A }
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_rtnbitsperpixel (_Dga_window dgawin)
830N/A{
830N/A if (DGA_LOCKSUBJ_WINDOW(dgawin, dgawin->eLockSubj)) {
830N/A return (dga_rtn_bitsperpixel((Dga_window)dgawin));
830N/A } else {
830N/A /* rtn is not applicable to multibuffers -- values of return args are arbitrary */
830N/A return (0);
830N/A }
830N/A}
830N/A
830N/Avoid *
830N/Adgai_mbsmemb_rtnpixels (_Dga_window dgawin)
830N/A{
830N/A if (DGA_LOCKSUBJ_WINDOW(dgawin, dgawin->eLockSubj)) {
830N/A return (dga_rtn_pixels((Dga_window)dgawin));
830N/A } else {
830N/A /* rtn is not applicable to multibuffers -- return NULL */
830N/A return (NULL);
830N/A }
830N/A}
830N/A
830N/A
830N/Aint
830N/Adgai_mbsmemb_mbchg (_Dga_window dgawin, int *reason)
830N/A{
830N/A if (dgawin->changeMask & DGA_CHANGE_MBUFSET) {
830N/A dgawin->changeMask &= ~DGA_CHANGE_MBUFSET;
830N/A *reason = dgawin->mbChgReason;
830N/A return (1);
830N/A } else {
830N/A *reason = DGA_MBCHG_UNKNOWN;
830N/A return (0);
830N/A }
830N/A}
830N/A
830N/Avoid
830N/Adgai_mbsmemb_mbsetnotify (_Dga_window dgawin, DgaMbNotifyFunc mb_notify_func,
830N/A void *client_data)
830N/A{
830N/A dgawin->mbNotifyFunc = mb_notify_func;
830N/A dgawin->mbNotifyClientData = client_data;
830N/A}
830N/A
830N/Avoid
830N/Adgai_mbsmemb_mbgetnotify (_Dga_window dgawin, DgaMbNotifyFunc *mb_notify_func,
830N/A void **client_data)
830N/A{
830N/A *mb_notify_func = dgawin->mbNotifyFunc;
830N/A *client_data = dgawin->mbNotifyClientData;
830N/A}
830N/A
830N/A
830N/Aint
830N/Adgai_mbsmemb_mbaccessmode (_Dga_window dgawin)
830N/A{
830N/A if (!dgawin->pMbs) {
830N/A return (DGA_MBACCESS_NONE);
830N/A } else {
830N/A WXINFO *infop;
830N/A
830N/A infop = (WXINFO *) dgawin->w_info;
830N/A
830N/A return (infop->w_mbsInfo.accessMode);
830N/A }
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_mbsitetypeconst (_Dga_window dgawin)
830N/A{
830N/A if (!dgawin->pMbs) {
830N/A return (1);
830N/A } else {
830N/A WXINFO *infop;
830N/A
830N/A infop = (WXINFO *) dgawin->w_info;
830N/A
830N/A return (infop->w_mbsInfo.siteTypeConst);
830N/A }
830N/A}
830N/A
830N/Avoid
830N/Adgai_mbsmemb_mbsetrendbufnotify (_Dga_window dgawin, DgaRendBufNotifyFunc rb_notify_func,
830N/A void *client_data)
830N/A{
830N/A dgawin->rendBufNotifyFunc = rb_notify_func;
830N/A dgawin->rendBufNotifyClientData = client_data;
830N/A}
830N/A
830N/Avoid
830N/Adgai_mbsmemb_mbgetrendbufnotify (_Dga_window dgawin, DgaRendBufNotifyFunc *rb_notify_func,
830N/A void **client_data)
830N/A{
830N/A *rb_notify_func = dgawin->rendBufNotifyFunc;
830N/A *client_data = dgawin->rendBufNotifyClientData;
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_ovlstatechg (_Dga_window dgawin)
830N/A{
830N/A if (dgawin->changeMask & DGA_CHANGE_OVLSTATE) {
830N/A dgawin->changeMask &= ~DGA_CHANGE_OVLSTATE;
830N/A return (1);
830N/A } else {
830N/A return (0);
830N/A }
830N/A}
830N/A
830N/Aint
830N/Adgai_mbsmemb_ovlstate (_Dga_window dgawin)
830N/A{
830N/A /* REMIND: Do we need to check this stuff? */
830N/A if ((dgawin->eLockSubj == DGA_LOCKSUBJ_INVALID) ||
830N/A (dgawin->changeMask & DGA_CHANGE_ZOMBIE)) {
830N/A return (DGA_OVLSTATE_CONFLICT);
830N/A }
830N/A if (!dgawin->isOverlay)
830N/A /* Don't let clients do "overlay" rendering to regular windows! */
830N/A return DGA_OVLSTATE_CONFLICT;
830N/A else
830N/A return dgawin->c_ovlstate;
830N/A}
830N/A
830N/Avoid
830N/Adgai_mbsmemb_setovlstatenotify (_Dga_window dgawin,
830N/A DgaOvlStateNotifyFunc ovlstate_notify_func,
830N/A void *client_data)
830N/A{
830N/A dgawin->ovlStateNotifyFunc = ovlstate_notify_func;
830N/A dgawin->ovlStateNotifyClientData = client_data;
830N/A}
830N/A
830N/Avoid
830N/Adgai_mbsmemb_getovlstatenotify (_Dga_window dgawin,
830N/A DgaOvlStateNotifyFunc *ovlstate_notify_func,
830N/A void **client_data)
830N/A{
830N/A *ovlstate_notify_func = dgawin->ovlStateNotifyFunc;
830N/A *client_data = dgawin->ovlStateNotifyClientData;
830N/A}