mirror of
https://github.com/Interlisp/maiko.git
synced 2026-02-25 08:20:03 +00:00
* Remove unnecessary calls to XLOCK/XUNLOCK The X methods called by flush_display_region() and flush_display_lineregion() handle the locking/unlocking, therefore it is unnecessary to invoke the locking here. * Remove explict signals when doing XUNLOCK() Call getXsignaldata() directly if a signal happened while X code was locked, instead of generating a signal and then handling it. Some macros and functions needed to pass the DspInterface instead of extracting the X display and window and passing those so that the correct structure was available for the XUNLOCK() call.
56 lines
1.4 KiB
C
Executable File
56 lines
1.4 KiB
C
Executable File
/* $Id: xdefs.h,v 1.4 2001/12/26 22:17:01 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */
|
|
|
|
|
|
|
|
/************************************************************************/
|
|
/* */
|
|
/* (C) Copyright 1989-2001 Venue. All Rights Reserved. */
|
|
/* Manufactured in the United States of America. */
|
|
/* */
|
|
/************************************************************************/
|
|
#ifndef XDEFS_H
|
|
#define XDEFS_H 1
|
|
|
|
#define DEF_WIN_X 20
|
|
#define DEF_WIN_Y 20
|
|
#define DEF_WIN_WIDTH 565
|
|
#define DEF_WIN_HEIGHT 430
|
|
#define WIN_MIN_WIDTH 150
|
|
#define WIN_MIN_HEIGHT 100
|
|
#define DEF_BDRWIDE 2
|
|
#define SCROLL_WIDTH 18
|
|
#define WINDOW_NAME "Medley (C) Copyright 1980-2001 Venue"
|
|
#define ICON_NAME "Medley"
|
|
|
|
|
|
#define WIN_MAX_WIDTH 2048
|
|
#define WIN_MAX_HEIGHT 2048
|
|
#define SCROLL_PITCH 30
|
|
|
|
|
|
#ifdef LOCK_X_UPDATES
|
|
|
|
#include <unistd.h>
|
|
#include <signal.h>
|
|
#include "xwinmandefs.h"
|
|
|
|
extern int XLocked;
|
|
extern int XNeedSignal;
|
|
/* this is !0 if we're locked; it should be 0 or larger always */
|
|
|
|
#define XLOCK do { XLocked++; /* printf("L"); fflush(stdout);*/} while (0)
|
|
#define XUNLOCK(dsp) \
|
|
do { XLocked--;/* printf("U"); fflush(stdout);*/ \
|
|
if (XNeedSignal) \
|
|
{ \
|
|
XNeedSignal = 0; \
|
|
getXsignaldata(dsp); \
|
|
}; \
|
|
} while (0)
|
|
#else
|
|
#define XLOCK
|
|
#define XUNLOCK(dsp)
|
|
#endif /* LOCK_X_UPDATES */
|
|
|
|
#endif /* XDEFS_H */
|