Darwin: Renamed DarwinModeBlah to QuartzBlah
(cherry picked from commit 08ebf86d379b1ddfb08df65d29aea5df66de4327)
This commit is contained in:
parent
540439a966
commit
8a8239f2e2
|
@ -39,6 +39,7 @@
|
|||
/* ouch! */
|
||||
#define BOOL X_BOOL
|
||||
# include "darwin.h"
|
||||
# include "darwinEvents.h"
|
||||
# include "quartz.h"
|
||||
# define _APPLEWM_SERVER_
|
||||
# include "X11/extensions/applewm.h"
|
||||
|
|
|
@ -75,6 +75,9 @@
|
|||
#endif
|
||||
|
||||
#include "darwin.h"
|
||||
#include "darwinEvents.h"
|
||||
#include "darwinKeyboard.h"
|
||||
#include "quartz.h"
|
||||
#include "darwinClut8.h"
|
||||
|
||||
#ifdef ENABLE_DEBUG_LOG
|
||||
|
@ -195,7 +198,7 @@ static Bool DarwinAddScreen(
|
|||
pScreen->devPrivates[darwinScreenIndex].ptr = dfb;
|
||||
|
||||
// setup hardware/mode specific details
|
||||
ret = DarwinModeAddScreen(foundIndex, pScreen);
|
||||
ret = QuartzAddScreen(foundIndex, pScreen);
|
||||
foundIndex++;
|
||||
if (! ret)
|
||||
return FALSE;
|
||||
|
@ -274,7 +277,7 @@ static Bool DarwinAddScreen(
|
|||
pScreen->SaveScreen = DarwinSaveScreen;
|
||||
|
||||
// finish mode dependent screen setup including cursor support
|
||||
if (!DarwinModeSetupScreen(index, pScreen)) {
|
||||
if (!QuartzSetupScreen(index, pScreen)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -539,7 +542,7 @@ void InitInput( int argc, char **argv )
|
|||
|
||||
DarwinEQInit( (DevicePtr)darwinKeyboard, (DevicePtr)darwinPointer );
|
||||
|
||||
DarwinModeInitInput(argc, argv);
|
||||
QuartzInitInput(argc, argv);
|
||||
}
|
||||
|
||||
|
||||
|
@ -629,7 +632,7 @@ void InitOutput( ScreenInfo *pScreenInfo, int argc, char **argv )
|
|||
}
|
||||
|
||||
// Discover screens and do mode specific initialization
|
||||
DarwinModeInitOutput(argc, argv);
|
||||
QuartzInitOutput(argc, argv);
|
||||
|
||||
// Add screens
|
||||
for (i = 0; i < darwinScreensFound; i++) {
|
||||
|
@ -895,7 +898,7 @@ void ddxGiveUp( void )
|
|||
{
|
||||
ErrorF( "Quitting XQuartz...\n" );
|
||||
|
||||
DarwinModeGiveUp();
|
||||
QuartzGiveUp();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -52,26 +52,6 @@ int DarwinParseModifierList(const char *constmodifiers);
|
|||
void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo);
|
||||
void xf86SetRootClip (ScreenPtr pScreen, BOOL enable);
|
||||
|
||||
// From darwinEvents.c
|
||||
Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr);
|
||||
void DarwinEQEnqueue(const xEvent *e);
|
||||
void DarwinEQPointerPost(xEvent *e);
|
||||
void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
|
||||
void DarwinPokeEQ(void);
|
||||
void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y);
|
||||
void DarwinSendKeyboardEvents(int ev_type, int keycode);
|
||||
void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y);
|
||||
|
||||
// Mode specific functions
|
||||
Bool DarwinModeAddScreen(int index, ScreenPtr pScreen);
|
||||
Bool DarwinModeSetupScreen(int index, ScreenPtr pScreen);
|
||||
void DarwinModeInitOutput(int argc,char **argv);
|
||||
void DarwinModeInitInput(int argc, char **argv);
|
||||
void DarwinModeProcessEvent(xEvent *xe);
|
||||
void DarwinModeGiveUp(void);
|
||||
void DarwinModeBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class);
|
||||
|
||||
|
||||
#undef assert
|
||||
#define assert(x) { if ((x) == 0) \
|
||||
FatalError("assert failed on line %d of %s!\n", __LINE__, __FILE__); }
|
||||
|
@ -81,10 +61,6 @@ void DarwinModeBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class);
|
|||
#define SCREEN_PRIV(pScreen) \
|
||||
((DarwinFramebufferPtr)pScreen->devPrivates[darwinScreenIndex].ptr)
|
||||
|
||||
|
||||
#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0...
|
||||
|
||||
|
||||
/*
|
||||
* Global variables from darwin.c
|
||||
*/
|
||||
|
|
|
@ -43,6 +43,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include "mipointer.h"
|
||||
|
||||
#include "darwin.h"
|
||||
#include "quartz.h"
|
||||
#include "darwinKeyboard.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -361,7 +362,7 @@ void ProcessInputEvents(void) {
|
|||
// fall through
|
||||
default:
|
||||
// Check for mode specific event
|
||||
DarwinModeProcessEvent(&xe);
|
||||
QuartzProcessEvent(&xe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
|
||||
*
|
||||
* 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,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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.
|
||||
*
|
||||
* Except as contained in this notice, the name(s) of the above copyright
|
||||
* holders shall not be used in advertising or otherwise to promote the sale,
|
||||
* use or other dealings in this Software without prior written authorization.
|
||||
*/
|
||||
|
||||
#ifndef _DARWIN_EVENTS_H
|
||||
#define _DARWIN_EVENTS_H
|
||||
|
||||
Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr);
|
||||
void DarwinEQEnqueue(const xEvent *e);
|
||||
void DarwinEQPointerPost(xEvent *e);
|
||||
void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
|
||||
void DarwinPokeEQ(void);
|
||||
void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y);
|
||||
void DarwinSendKeyboardEvents(int ev_type, int keycode);
|
||||
void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y);
|
||||
|
||||
#endif /* _DARWIN_EVENTS_H */
|
|
@ -73,6 +73,8 @@
|
|||
#include <architecture/byte_order.h> // For the NXSwap*
|
||||
#include "darwin.h"
|
||||
#include "darwinKeyboard.h"
|
||||
#include "quartzKeyboard.h"
|
||||
#include "quartzAudio.h"
|
||||
|
||||
#ifdef NDEBUG
|
||||
#undef NDEBUG
|
||||
|
@ -791,7 +793,7 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) {
|
|||
DarwinModeSystemKeymapSeed();
|
||||
|
||||
assert( InitKeyboardDeviceStruct( (DevicePtr)pDev, &keySyms,
|
||||
keyInfo.modMap, DarwinModeBell,
|
||||
keyInfo.modMap, QuartzBell,
|
||||
DarwinChangeKeyboardControl ));
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "quartzCommon.h"
|
||||
#include "quartz.h"
|
||||
#include "darwin.h"
|
||||
#include "darwinEvents.h"
|
||||
#include "quartzAudio.h"
|
||||
#include "pseudoramiX.h"
|
||||
#define _APPLEWM_SERVER_
|
||||
|
@ -74,25 +75,25 @@ QuartzModeProcsPtr quartzProcs = NULL;
|
|||
const char *quartzOpenGLBundle = NULL;
|
||||
|
||||
#if defined(RANDR) && !defined(FAKE_RANDR)
|
||||
Bool DarwinModeRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) {
|
||||
Bool QuartzRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Bool DarwinModeRandRSetConfig (ScreenPtr pScreen,
|
||||
Bool QuartzRandRSetConfig (ScreenPtr pScreen,
|
||||
Rotation randr,
|
||||
int rate,
|
||||
RRScreenSizePtr pSize) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Bool DarwinModeRandRInit (ScreenPtr pScreen) {
|
||||
Bool QuartzRandRInit (ScreenPtr pScreen) {
|
||||
rrScrPrivPtr pScrPriv;
|
||||
|
||||
if (!RRScreenInit (pScreen)) return FALSE;
|
||||
|
||||
pScrPriv = rrGetScrPriv(pScreen);
|
||||
pScrPriv->rrGetInfo = DarwinModeRandRGetInfo;
|
||||
pScrPriv->rrSetConfig = DarwinModeRandRSetConfig;
|
||||
pScrPriv->rrGetInfo = QuartzRandRGetInfo;
|
||||
pScrPriv->rrSetConfig = QuartzRandRSetConfig;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
@ -106,10 +107,10 @@ Bool DarwinModeRandRInit (ScreenPtr pScreen) {
|
|||
*/
|
||||
|
||||
/*
|
||||
* DarwinModeAddScreen
|
||||
* QuartzAddScreen
|
||||
* Do mode dependent initialization of each screen for Quartz.
|
||||
*/
|
||||
Bool DarwinModeAddScreen(
|
||||
Bool QuartzAddScreen(
|
||||
int index,
|
||||
ScreenPtr pScreen)
|
||||
{
|
||||
|
@ -125,10 +126,10 @@ Bool DarwinModeAddScreen(
|
|||
|
||||
|
||||
/*
|
||||
* DarwinModeSetupScreen
|
||||
* QuartzSetupScreen
|
||||
* Finalize mode specific setup of each screen.
|
||||
*/
|
||||
Bool DarwinModeSetupScreen(
|
||||
Bool QuartzSetupScreen(
|
||||
int index,
|
||||
ScreenPtr pScreen)
|
||||
{
|
||||
|
@ -145,10 +146,10 @@ Bool DarwinModeSetupScreen(
|
|||
|
||||
|
||||
/*
|
||||
* DarwinModeInitOutput
|
||||
* QuartzInitOutput
|
||||
* Quartz display initialization.
|
||||
*/
|
||||
void DarwinModeInitOutput(
|
||||
void QuartzInitOutput(
|
||||
int argc,
|
||||
char **argv )
|
||||
{
|
||||
|
@ -184,10 +185,10 @@ void DarwinModeInitOutput(
|
|||
|
||||
|
||||
/*
|
||||
* DarwinModeInitInput
|
||||
* QuartzInitInput
|
||||
* Inform the main thread the X server is ready to handle events.
|
||||
*/
|
||||
void DarwinModeInitInput(
|
||||
void QuartzInitInput(
|
||||
int argc,
|
||||
char **argv )
|
||||
{
|
||||
|
@ -279,7 +280,7 @@ static void QuartzUpdateScreens(void)
|
|||
pScreen->height = height;
|
||||
|
||||
#ifndef FAKE_RANDR
|
||||
if(!DarwinModeRandRInit(pScreen))
|
||||
if(!QuartzRandRInit(pScreen))
|
||||
FatalError("Failed to init RandR extension.\n");
|
||||
#endif
|
||||
|
||||
|
@ -412,10 +413,10 @@ QuartzMessageServerThread(
|
|||
|
||||
|
||||
/*
|
||||
* DarwinModeProcessEvent
|
||||
* QuartzProcessEvent
|
||||
* Process Quartz specific events.
|
||||
*/
|
||||
void DarwinModeProcessEvent(
|
||||
void QuartzProcessEvent(
|
||||
xEvent *xe)
|
||||
{
|
||||
switch (xe->u.u.type) {
|
||||
|
@ -516,11 +517,11 @@ void DarwinModeProcessEvent(
|
|||
|
||||
|
||||
/*
|
||||
* DarwinModeGiveUp
|
||||
* QuartzGiveUp
|
||||
* Cleanup before X server shutdown
|
||||
* Release the screen and restore the Aqua cursor.
|
||||
*/
|
||||
void DarwinModeGiveUp(void)
|
||||
void QuartzGiveUp(void)
|
||||
{
|
||||
#if 0
|
||||
// Trying to switch cursors when quitting causes deadlock
|
||||
|
|
|
@ -124,4 +124,11 @@ typedef struct _QuartzModeProcs {
|
|||
extern QuartzModeProcsPtr quartzProcs;
|
||||
extern int quartzHasRoot, quartzEnableRootless;
|
||||
|
||||
Bool QuartzAddScreen(int index, ScreenPtr pScreen);
|
||||
Bool QuartzSetupScreen(int index, ScreenPtr pScreen);
|
||||
void QuartzInitOutput(int argc,char **argv);
|
||||
void QuartzInitInput(int argc, char **argv);
|
||||
void QuartzGiveUp(void);
|
||||
void QuartzProcessEvent(xEvent *xe);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -246,10 +246,10 @@ static void QuartzCoreAudioBell(
|
|||
|
||||
|
||||
/*
|
||||
* DarwinModeBell
|
||||
* QuartzBell
|
||||
* Ring the bell
|
||||
*/
|
||||
void DarwinModeBell(
|
||||
void QuartzBell(
|
||||
int volume, // volume in percent of max
|
||||
DeviceIntPtr pDevice,
|
||||
pointer ctrl,
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
// unshifted, shifted, modeswitch unshifted, modeswitch shifted
|
||||
#define GLYPHS_PER_KEY 4
|
||||
#define NUM_KEYCODES 248 // NX_NUMKEYCODES might be better
|
||||
#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0...
|
||||
#define MAX_KEYCODE NUM_KEYCODES + MIN_KEYCODE - 1
|
||||
|
||||
typedef struct darwinKeyboardInfo_struct {
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "quartzCommon.h"
|
||||
#include "xpr.h"
|
||||
#include "darwin.h"
|
||||
#include "darwinEvents.h"
|
||||
#include "Xplugin.h"
|
||||
|
||||
#include "mi.h"
|
||||
|
|
Loading…
Reference in New Issue