darwin.h revision b8e299dddd091ae24e0c08c45d91b8f937bd14d2
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
963cc96f97623aac2218f625e558cff1ddaea8c1Laszlo Hordos * Permission is hereby granted, free of charge, to any person obtaining a
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * copy of this software and associated documentation files (the "Software"),
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * to deal in the Software without restriction, including without limitation
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * the rights to use, copy, modify, merge, publish, distribute, sublicense,
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * and/or sell copies of the Software, and to permit persons to whom the
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * Software is furnished to do so, subject to the following conditions:
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * The above copyright notice and this permission notice shall be included in
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * all copies or substantial portions of the Software.
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * DEALINGS IN THE SOFTWARE.
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * Except as contained in this notice, the name(s) of the above copyright
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * holders shall not be used in advertising or otherwise to promote the sale,
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos * use or other dealings in this Software without prior written authorization.
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.h,v 1.20 2003/11/15 00:07:09 torrey Exp $ */
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordostypedef struct {
b1ad84aa02aa5c8ee457e35d790d2e91691da517Laszlo Hordosint DarwinParseModifierList(const char *constmodifiers);
7cffd25e51581b0461c6cf208995b8c5d66cb166Jon Branchvoid DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo);
b1ad84aa02aa5c8ee457e35d790d2e91691da517Laszlo Hordosvoid xf86SetRootClip (ScreenPtr pScreen, BOOL enable);
7cffd25e51581b0461c6cf208995b8c5d66cb166Jon BranchBool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr);
7cffd25e51581b0461c6cf208995b8c5d66cb166Jon Branchvoid DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
7cffd25e51581b0461c6cf208995b8c5d66cb166Jon Branchint DarwinModifierNXKeyToNXKeycode(int key, int side);
7cffd25e51581b0461c6cf208995b8c5d66cb166Jon Branchint DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide);
b1ad84aa02aa5c8ee457e35d790d2e91691da517Laszlo Hordosint DarwinModifierStringToNXKey(const char *string);
b1ad84aa02aa5c8ee457e35d790d2e91691da517Laszlo Hordos// Mode specific functions
b1ad84aa02aa5c8ee457e35d790d2e91691da517Laszlo HordosBool DarwinModeAddScreen(int index, ScreenPtr pScreen);
b1ad84aa02aa5c8ee457e35d790d2e91691da517Laszlo HordosBool DarwinModeSetupScreen(int index, ScreenPtr pScreen);
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordosvoid DarwinModeInitOutput(int argc,char **argv);
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordosvoid DarwinModeInitInput(int argc, char **argv);
521378a7df33486a3b37e90752117143cd7bd2a8Alin Briciint DarwinModeProcessArgument(int argc, char *argv[], int i);
963cc96f97623aac2218f625e558cff1ddaea8c1Laszlo Hordosvoid DarwinModeBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class);
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos#define assert(x) { if ((x) == 0) \
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos FatalError("assert failed on line %d of %s!\n", __LINE__, __FILE__); }
521378a7df33486a3b37e90752117143cd7bd2a8Alin Brici#define kern_assert(x) { if ((x) != KERN_SUCCESS) \
521378a7df33486a3b37e90752117143cd7bd2a8Alin Brici FatalError("assert failed on line %d of %s with kernel return 0x%x!\n", \
963cc96f97623aac2218f625e558cff1ddaea8c1Laszlo Hordos ((DarwinFramebufferPtr)pScreen->devPrivates[darwinScreenIndex].ptr)
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0...
b1ad84aa02aa5c8ee457e35d790d2e91691da517Laszlo Hordos * Global variables from darwin.c
b1ad84aa02aa5c8ee457e35d790d2e91691da517Laszlo Hordosextern int darwinScreenIndex; // index into pScreen.devPrivates
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos// User preferences
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordosextern unsigned int darwinDesiredWidth, darwinDesiredHeight;
963cc96f97623aac2218f625e558cff1ddaea8c1Laszlo Hordos// location of X11's (0,0) point in global screen coordinates
b1ad84aa02aa5c8ee457e35d790d2e91691da517Laszlo Hordos * Special ddx events understood by the X server
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos kXDarwinUpdateModifiers // update all modifier keys
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos = LASTEvent+1, // (from X.h list of event names)
521378a7df33486a3b37e90752117143cd7bd2a8Alin Brici kXDarwinUpdateButtons, // update state of mouse buttons 2 and up
521378a7df33486a3b37e90752117143cd7bd2a8Alin Brici * Quartz-specific events -- not used in IOKit mode
521378a7df33486a3b37e90752117143cd7bd2a8Alin Brici kXDarwinActivate, // restore X drawing and cursor
521378a7df33486a3b37e90752117143cd7bd2a8Alin Brici kXDarwinDeactivate, // clip X drawing and switch to Aqua cursor
521378a7df33486a3b37e90752117143cd7bd2a8Alin Brici kXDarwinSetRootClip, // enable or disable drawing to the X screen
521378a7df33486a3b37e90752117143cd7bd2a8Alin Brici kXDarwinQuit, // kill the X server and release the display
b1ad84aa02aa5c8ee457e35d790d2e91691da517Laszlo Hordos kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer
b1ad84aa02aa5c8ee457e35d790d2e91691da517Laszlo Hordos kXDarwinWritePasteboard, // copy X cut buffer onto Mac OS X pasteboard
963cc96f97623aac2218f625e558cff1ddaea8c1Laszlo Hordos * AppleWM events
0fdda69ce3627d501e4bb3103765f676bb1ab061Laszlo Hordos kXDarwinControllerNotify, // send an AppleWMControllerNotify event