mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-04 23:28:05 +02:00
XQuartz: Cleanup for strict-prototyping
Also fixed DarwinEQEnqueue to match changes to the callback And also use dpmsstubs.c rather than copying the code into darwin.c
This commit is contained in:
parent
fab82c097c
commit
4c5c30a4be
15 changed files with 32 additions and 50 deletions
|
|
@ -19,6 +19,7 @@ DIST_SUBDIRS = xpr bundle
|
|||
libXquartz_la_SOURCES = \
|
||||
$(top_srcdir)/fb/fbcmap_mi.c \
|
||||
$(top_srcdir)/mi/miinitext.c \
|
||||
$(top_srcdir)/Xext/dpmsstubs.c \
|
||||
X11Application.m \
|
||||
X11Controller.m \
|
||||
applewm.c \
|
||||
|
|
|
|||
|
|
@ -859,7 +859,7 @@ static void send_nsevent (NSEventType type, NSEvent *e) {
|
|||
NSWindow *window;
|
||||
int pointer_x, pointer_y, ev_button, ev_type;
|
||||
// int num_events=0, i=0, state;
|
||||
xEvent xe;
|
||||
// xEvent xe;
|
||||
|
||||
/* convert location to global top-left coordinates */
|
||||
location = [e locationInWindow];
|
||||
|
|
|
|||
|
|
@ -264,8 +264,7 @@ WMFreeEvents (data, id)
|
|||
}
|
||||
|
||||
static int
|
||||
ProcAppleWMSelectInput (client)
|
||||
register ClientPtr client;
|
||||
ProcAppleWMSelectInput (register ClientPtr client)
|
||||
{
|
||||
REQUEST(xAppleWMSelectInputReq);
|
||||
WMEventPtr pEvent, pNewEvent, *pHead;
|
||||
|
|
@ -479,13 +478,11 @@ ProcAppleWMSetFrontProcess(
|
|||
}
|
||||
|
||||
static int
|
||||
ProcAppleWMSetWindowLevel(
|
||||
register ClientPtr client
|
||||
)
|
||||
ProcAppleWMSetWindowLevel(register ClientPtr client)
|
||||
{
|
||||
REQUEST(xAppleWMSetWindowLevelReq);
|
||||
WindowPtr pWin;
|
||||
int errno;
|
||||
int err;
|
||||
|
||||
REQUEST_SIZE_MATCH(xAppleWMSetWindowLevelReq);
|
||||
|
||||
|
|
@ -497,9 +494,9 @@ ProcAppleWMSetWindowLevel(
|
|||
return BadValue;
|
||||
}
|
||||
|
||||
errno = appleWMProcs->SetWindowLevel(pWin, stuff->level);
|
||||
if (errno != Success) {
|
||||
return errno;
|
||||
err = appleWMProcs->SetWindowLevel(pWin, stuff->level);
|
||||
if (err != Success) {
|
||||
return err;
|
||||
}
|
||||
|
||||
return (client->noClientException);
|
||||
|
|
|
|||
|
|
@ -886,24 +886,6 @@ void AbortDDX( void )
|
|||
ddxGiveUp();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* DPMS extension stubs
|
||||
*/
|
||||
Bool DPMSSupported(void)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void DPMSSet(int level)
|
||||
{
|
||||
}
|
||||
|
||||
int DPMSGet(int *level)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#include "mivalidate.h" // for union _Validate used by windowstr.h
|
||||
#include "windowstr.h" // for struct _Window
|
||||
#include "scrnintstr.h" // for struct _Screen
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include "darwin.h"
|
||||
#include "quartz.h"
|
||||
#include "darwinKeyboard.h"
|
||||
#include "darwinEvents.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
|
|
@ -213,9 +214,8 @@ Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) {
|
|||
*
|
||||
* This should be deprecated in favor of miEQEnqueue -- BB
|
||||
*/
|
||||
void DarwinEQEnqueue(const xEvent *e) {
|
||||
void DarwinEQEnqueue(const xEventPtr e) {
|
||||
HWEventQueueType oldtail, newtail;
|
||||
char byte = 0;
|
||||
|
||||
oldtail = darwinEventQueue.tail;
|
||||
|
||||
|
|
@ -253,7 +253,7 @@ void DarwinEQEnqueue(const xEvent *e) {
|
|||
* DarwinEQPointerPost
|
||||
* Post a pointer event. Used by the mipointer.c routines.
|
||||
*/
|
||||
void DarwinEQPointerPost(xEvent *e) {
|
||||
void DarwinEQPointerPost(DeviceIntPtr pdev, xEventPtr e) {
|
||||
(*darwinEventQueue.pPtr->processInputProc)
|
||||
(e, (DeviceIntPtr)darwinEventQueue.pPtr, 1);
|
||||
}
|
||||
|
|
@ -274,7 +274,6 @@ void ProcessInputEvents(void) {
|
|||
EventRec *e;
|
||||
int x, y;
|
||||
xEvent xe;
|
||||
static int old_flags = 0; // last known modifier state
|
||||
// button number and modifier mask of currently pressed fake button
|
||||
input_check_flag=0;
|
||||
|
||||
|
|
|
|||
|
|
@ -28,12 +28,13 @@
|
|||
#define _DARWIN_EVENTS_H
|
||||
|
||||
Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr);
|
||||
void DarwinEQEnqueue(const xEvent *e);
|
||||
void DarwinEQPointerPost(xEvent *e);
|
||||
void DarwinEQEnqueue(const xEventPtr e);
|
||||
void DarwinEQPointerPost(DeviceIntPtr pDev, xEventPtr 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);
|
||||
void DarwinUpdateModKeys(int flags);
|
||||
|
||||
#endif /* _DARWIN_EVENTS_H */
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ static void parse_next_char_code(DataStream *s, KeySym *k) {
|
|||
* DarwinReadKeymapFile
|
||||
* Read the appropriate keymapping from a keymapping file.
|
||||
*/
|
||||
Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) {
|
||||
static Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) {
|
||||
struct stat st;
|
||||
NXEventSystemDevice info[20];
|
||||
int interface = 0, handler_id = 0;
|
||||
|
|
@ -439,7 +439,7 @@ Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) {
|
|||
/*
|
||||
* DarwinParseNXKeyMapping
|
||||
*/
|
||||
Bool DarwinParseNXKeyMapping(darwinKeyboardInfo *info) {
|
||||
static Bool DarwinParseNXKeyMapping(darwinKeyboardInfo *info) {
|
||||
KeySym *k;
|
||||
int i;
|
||||
short numMods, numKeys, numPadKeys = 0;
|
||||
|
|
@ -933,7 +933,7 @@ int DarwinModifierNXMaskToNXKey(int mask) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
const char *DarwinModifierNXMaskTostring(int mask) {
|
||||
static const char *DarwinModifierNXMaskTostring(int mask) {
|
||||
switch (mask) {
|
||||
case NX_ALPHASHIFTMASK: return "NX_ALPHASHIFTMASK";
|
||||
case NX_SHIFTMASK: return "NX_SHIFTMASK";
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ SOFTWARE.
|
|||
#include <X11/extensions/XI.h>
|
||||
#include <X11/extensions/XIproto.h>
|
||||
#include "XIstubs.h"
|
||||
#include "chgkbd.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
|
|
@ -88,16 +89,12 @@ SOFTWARE.
|
|||
*
|
||||
*/
|
||||
|
||||
int
|
||||
ChangeKeyboardDevice (old_dev, new_dev)
|
||||
DeviceIntPtr old_dev;
|
||||
DeviceIntPtr new_dev;
|
||||
{
|
||||
int ChangeKeyboardDevice (DeviceIntPtr old_dev, DeviceIntPtr new_dev) {
|
||||
/***********************************************************************
|
||||
DeleteFocusClassDeviceStruct(old_dev); * defined in xchgptr.c *
|
||||
**********************************************************************/
|
||||
return BadMatch;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
#include <X11/extensions/XI.h>
|
||||
#include <assert.h>
|
||||
|
||||
void NSBeep();
|
||||
void NSBeep(void);
|
||||
|
||||
typedef struct QuartzAudioRec {
|
||||
double frequency;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#endif
|
||||
|
||||
#include "quartzCommon.h"
|
||||
#include "quartzPasteboard.h"
|
||||
|
||||
#define BOOL xBOOL
|
||||
#include "darwin.h"
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@
|
|||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "quartzForeground.h"
|
||||
|
||||
int QuartzMoveToForeground() {
|
||||
ProcessSerialNumber psn = { 0, kCurrentProcess };
|
||||
OSStatus returnCode = TransformProcessType(& psn, kProcessTransformToForegroundApplication);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,6 @@
|
|||
#ifndef _QUARTZ_FOREGROUND_H_
|
||||
#define _QUARTZ_FOREGROUND_H_
|
||||
|
||||
int QuartzMoveToForeground();
|
||||
int QuartzMoveToForeground(void);
|
||||
|
||||
#endif /* _QUARTZ_FOREGROUND_H_ */
|
||||
|
|
|
|||
|
|
@ -34,11 +34,11 @@
|
|||
#define _QUARTZPASTEBOARD_H
|
||||
|
||||
// Aqua->X
|
||||
void QuartzReadPasteboard();
|
||||
void QuartzReadPasteboard(void);
|
||||
char * QuartzReadCocoaPasteboard(void); // caller must free string
|
||||
|
||||
// X->Aqua
|
||||
void QuartzWritePasteboard();
|
||||
void QuartzWritePasteboard(void);
|
||||
void QuartzWriteCocoaPasteboard(char *text);
|
||||
|
||||
#endif /* _QUARTZPASTEBOARD_H */
|
||||
|
|
|
|||
|
|
@ -52,8 +52,11 @@
|
|||
char **envpGlobal; // argcGlobal and argvGlobal
|
||||
// are from dix/globals.c
|
||||
|
||||
int main(int argc, char **argv, char **envp);
|
||||
void _InitHLTB(void);
|
||||
void DarwinHandleGUI(int argc, char **argv, char **envp);
|
||||
|
||||
static void server_thread (void *arg) {
|
||||
extern int main(int argc, char **argv, char **envp);
|
||||
exit (main (argcGlobal, argvGlobal, envpGlobal));
|
||||
}
|
||||
|
||||
|
|
@ -103,8 +106,6 @@ void DarwinHandleGUI(int argc, char **argv, char **envp) {
|
|||
before the main thread when we're _not_ prebound, things fail,
|
||||
so initialize by hand. */
|
||||
|
||||
extern void _InitHLTB(void);
|
||||
|
||||
_InitHLTB();
|
||||
X11ControllerMain(argc, (const char **)argv, server_thread, NULL);
|
||||
exit(0);
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include "swaprep.h"
|
||||
#include "dri.h"
|
||||
#include "dristruct.h"
|
||||
#include "xpr.h"
|
||||
|
||||
static int DRIErrorBase = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue