14642e01fSmrg/*
235c4bbdfSmrg * Copyright (C) 2008-2012 Apple, Inc.
34642e01fSmrg * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
44642e01fSmrg *
54642e01fSmrg * Permission is hereby granted, free of charge, to any person obtaining a
64642e01fSmrg * copy of this software and associated documentation files (the "Software"),
74642e01fSmrg * to deal in the Software without restriction, including without limitation
84642e01fSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
94642e01fSmrg * and/or sell copies of the Software, and to permit persons to whom the
104642e01fSmrg * Software is furnished to do so, subject to the following conditions:
114642e01fSmrg *
124642e01fSmrg * The above copyright notice and this permission notice shall be included in
134642e01fSmrg * all copies or substantial portions of the Software.
144642e01fSmrg *
154642e01fSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
164642e01fSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
174642e01fSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
184642e01fSmrg * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
194642e01fSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
204642e01fSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
214642e01fSmrg * DEALINGS IN THE SOFTWARE.
224642e01fSmrg *
234642e01fSmrg * Except as contained in this notice, the name(s) of the above copyright
244642e01fSmrg * holders shall not be used in advertising or otherwise to promote the sale,
254642e01fSmrg * use or other dealings in this Software without prior written authorization.
264642e01fSmrg */
274642e01fSmrg
284642e01fSmrg#ifndef _DARWIN_H
294642e01fSmrg#define _DARWIN_H
304642e01fSmrg
314642e01fSmrg#include <IOKit/IOTypes.h>
324642e01fSmrg#include "inputstr.h"
334642e01fSmrg#include "scrnintstr.h"
344642e01fSmrg#include <X11/extensions/XKB.h>
3535c4bbdfSmrg#include <asl.h>
364642e01fSmrg
376747b715Smrg#include "darwinfb.h"
384642e01fSmrg
394642e01fSmrg// From darwin.c
4035c4bbdfSmrgvoid
4135c4bbdfSmrgDarwinPrintBanner(void);
4235c4bbdfSmrgint
4335c4bbdfSmrgDarwinParseModifierList(const char *constmodifiers, int separatelr);
4435c4bbdfSmrgvoid
4535c4bbdfSmrgDarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo);
464642e01fSmrg
474642e01fSmrg#define SCREEN_PRIV(pScreen) ((DarwinFramebufferPtr) \
4835c4bbdfSmrg                              dixLookupPrivate(&pScreen->devPrivates, \
4935c4bbdfSmrg                                               darwinScreenKey))
504642e01fSmrg
514642e01fSmrg/*
524642e01fSmrg * Global variables from darwin.c
534642e01fSmrg */
546747b715Smrgextern DevPrivateKeyRec darwinScreenKeyRec;
556747b715Smrg#define darwinScreenKey (&darwinScreenKeyRec)
5635c4bbdfSmrgextern int darwinScreensFound;
5735c4bbdfSmrgextern io_connect_t darwinParamConnect;
5835c4bbdfSmrgextern int darwinEventReadFD;
5935c4bbdfSmrgextern int darwinEventWriteFD;
6035c4bbdfSmrgextern DeviceIntPtr darwinPointer;
6135c4bbdfSmrgextern DeviceIntPtr darwinTabletCursor;
6235c4bbdfSmrgextern DeviceIntPtr darwinTabletStylus;
6335c4bbdfSmrgextern DeviceIntPtr darwinTabletEraser;
6435c4bbdfSmrgextern DeviceIntPtr darwinKeyboard;
654642e01fSmrg
664642e01fSmrg// User preferences
6735c4bbdfSmrgextern int darwinMouseAccelChange;
6835c4bbdfSmrgextern int darwinFakeButtons;
6935c4bbdfSmrgextern int darwinFakeMouse2Mask;
7035c4bbdfSmrgextern int darwinFakeMouse3Mask;
7135c4bbdfSmrgextern unsigned int darwinAppKitModMask;
7235c4bbdfSmrgextern unsigned int windowItemModMask;
7335c4bbdfSmrgextern int darwinSyncKeymap;
7435c4bbdfSmrgextern int darwinDesiredDepth;
754642e01fSmrg
764642e01fSmrg// location of X11's (0,0) point in global screen coordinates
7735c4bbdfSmrgextern int darwinMainScreenX;
7835c4bbdfSmrgextern int darwinMainScreenY;
794642e01fSmrg
8035c4bbdfSmrg// bundle-main.c
8135c4bbdfSmrgextern char *bundle_id_prefix;
824642e01fSmrg
8335c4bbdfSmrg_X_ATTRIBUTE_PRINTF(6, 7)
8435c4bbdfSmrgextern void
8535c4bbdfSmrgxq_asl_log(int level, const char *subsystem, const char *file,
8635c4bbdfSmrg           const char *function, int line, const char *fmt,
8735c4bbdfSmrg           ...);
884642e01fSmrg
8935c4bbdfSmrg#define ASL_LOG(level, subsystem, msg, args ...) xq_asl_log(level, subsystem, \
9035c4bbdfSmrg                                                            __FILE__, \
9135c4bbdfSmrg                                                            __FUNCTION__, \
9235c4bbdfSmrg                                                            __LINE__, msg, \
9335c4bbdfSmrg                                                            ## args)
9435c4bbdfSmrg#define DEBUG_LOG(msg, args ...)                 ASL_LOG(ASL_LEVEL_DEBUG, \
9535c4bbdfSmrg                                                         "XQuartz", msg, \
9635c4bbdfSmrg                                                         ## args)
9735c4bbdfSmrg#define TRACE()                                  DEBUG_LOG("TRACE")
984642e01fSmrg
994642e01fSmrg#endif  /* _DARWIN_H */
100