b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * quartz.h
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * External interface of the Quartz display modes seen by the generic, mode
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * independent parts of the Darwin X server.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Copyright (c) 2001-2003 Greg Parker and Torrey T. Lyons.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * All Rights Reserved.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Permission is hereby granted, free of charge, to any person obtaining a
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * copy of this software and associated documentation files (the "Software"),
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * to deal in the Software without restriction, including without limitation
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * and/or sell copies of the Software, and to permit persons to whom the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Software is furnished to do so, subject to the following conditions:
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * The above copyright notice and this permission notice shall be included in
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * all copies or substantial portions of the Software.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * DEALINGS IN THE SOFTWARE.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync *
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Except as contained in this notice, the name(s) of the above copyright
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * holders shall not be used in advertising or otherwise to promote the sale,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * use or other dealings in this Software without prior written authorization.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/quartz.h,v 1.3 2004/07/30 19:12:17 torrey Exp $ */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.h,v 1.7 2003/11/12 20:21:51 torrey Exp $ */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#ifndef _QUARTZ_H
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define _QUARTZ_H
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "quartzPasteboard.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "screenint.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#include "window.h"
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*------------------------------------------
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync Quartz display mode function types
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ------------------------------------------*/
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Display mode initialization
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef void (*DisplayInitProc)(void);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef Bool (*AddScreenProc)(int index, ScreenPtr pScreen);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef Bool (*SetupScreenProc)(int index, ScreenPtr pScreen);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef void (*InitInputProc)(int argc, char **argv);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Cursor functions
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef Bool (*InitCursorProc)(ScreenPtr pScreen);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef void (*CursorUpdateProc)(void);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Suspend and resume X11 activity
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef void (*SuspendScreenProc)(ScreenPtr pScreen);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef void (*ResumeScreenProc)(ScreenPtr pScreen, int x, int y);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef void (*CaptureScreensProc)(void);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef void (*ReleaseScreensProc)(void);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Screen state change support
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef void (*ScreenChangedProc)(void);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef void (*AddPseudoramiXScreensProc)(int *x, int *y, int *width, int *height);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef void (*UpdateScreenProc)(ScreenPtr pScreen);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Rootless helper functions
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef Bool (*IsX11WindowProc)(void *nsWindow, int windowNumber);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef void (*HideWindowsProc)(Bool hide);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Rootless functions for optional export to GLX layer
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef void * (*FrameForWindowProc)(WindowPtr pWin, Bool create);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef WindowPtr (*TopLevelParentProc)(WindowPtr pWindow);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef Bool (*CreateSurfaceProc)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync (ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned int client_id, unsigned int *surface_id,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned int key[2], void (*notify) (void *arg, void *data),
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync void *notify_data);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef Bool (*DestroySurfaceProc)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync (ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync void (*notify) (void *arg, void *data), void *notify_data);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/*
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Quartz display mode function list
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct _QuartzModeProcs {
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DisplayInitProc DisplayInit;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync AddScreenProc AddScreen;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync SetupScreenProc SetupScreen;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync InitInputProc InitInput;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync InitCursorProc InitCursor;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CursorUpdateProc CursorUpdate; // Not used if NULL
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync SuspendScreenProc SuspendScreen;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ResumeScreenProc ResumeScreen;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CaptureScreensProc CaptureScreens; // Only called in fullscreen
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ReleaseScreensProc ReleaseScreens; // Only called in fullscreen
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync ScreenChangedProc ScreenChanged;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync AddPseudoramiXScreensProc AddPseudoramiXScreens;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync UpdateScreenProc UpdateScreen;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync IsX11WindowProc IsX11Window;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync HideWindowsProc HideWindows;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync FrameForWindowProc FrameForWindow;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync TopLevelParentProc TopLevelParent;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync CreateSurfaceProc CreateSurface;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync DestroySurfaceProc DestroySurface;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync} QuartzModeProcsRec, *QuartzModeProcsPtr;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncextern QuartzModeProcsPtr quartzProcs;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsyncBool QuartzLoadDisplayBundle(const char *dpyBundleName);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#endif