windows: convert K&R function definitions to ANSI C
Convert the old-style (K&R) function definitions in windows/ to ANSI C prototypes, formatted in the project's convention: the return type on its own line and each parameter on its own line, indented four spaces, with the original parameter comments retained. Updates the windows headers (windows.h, windInt.h) to prototype the affected declarations. Builds cleanly under GCC 16 / C23 (with the -std=gnu17 build change). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
132155c942
commit
1fb9dd6310
|
|
@ -53,30 +53,30 @@ static char rcsid[] __attribute__ ((unused)) ="$Header: /usr/cvsroot/magic-8.0/w
|
|||
/* our window client ID */
|
||||
global WindClient windClientID = (WindClient) NULL;
|
||||
|
||||
extern int windBorderCmd();
|
||||
extern int windCaptionCmd(), windCrashCmd(), windCursorCmd();
|
||||
extern int windFilesCmd(), windCloseCmd(), windOpenCmd();
|
||||
extern int windQuitCmd(), windRedrawCmd();
|
||||
extern int windResetCmd(), windSpecialOpenCmd();
|
||||
extern int windOverCmd(), windUnderCmd(), windDebugCmd();
|
||||
extern int windDumpCmd(), windHelpCmd();
|
||||
extern int windMacroCmd(), windIntMacroCmd();
|
||||
extern int windLogCommandsCmd(), windUpdateCmd(), windSleepCmd();
|
||||
extern int windSetpointCmd();
|
||||
extern int windPushbuttonCmd();
|
||||
extern int windPauseCmd(), windGrstatsCmd();
|
||||
extern int windGrowCmd();
|
||||
extern int windUndoCmd(), windRedoCmd();
|
||||
extern int windCenterCmd(), windScrollCmd();
|
||||
extern int windVersionCmd(), windViewCmd(), windXviewCmd(), windZoomCmd();
|
||||
extern int windScrollBarsCmd(), windPositionsCmd();
|
||||
extern int windNamesCmd();
|
||||
extern void windBorderCmd();
|
||||
extern void windCaptionCmd(), windCrashCmd(), windCursorCmd();
|
||||
extern void windFilesCmd(), windCloseCmd(), windOpenCmd();
|
||||
extern void windQuitCmd(), windRedrawCmd();
|
||||
extern void windResetCmd(), windSpecialOpenCmd();
|
||||
extern void windOverCmd(), windUnderCmd(), windDebugCmd();
|
||||
extern void windDumpCmd(), windHelpCmd();
|
||||
extern void windMacroCmd(), windIntMacroCmd();
|
||||
extern void windLogCommandsCmd(), windUpdateCmd(), windSleepCmd();
|
||||
extern void windSetpointCmd();
|
||||
extern void windPushbuttonCmd();
|
||||
extern void windPauseCmd(), windGrstatsCmd();
|
||||
extern void windGrowCmd();
|
||||
extern void windUndoCmd(), windRedoCmd();
|
||||
extern void windCenterCmd(), windScrollCmd();
|
||||
extern void windVersionCmd(), windViewCmd(), windXviewCmd(), windZoomCmd();
|
||||
extern void windScrollBarsCmd(), windPositionsCmd();
|
||||
extern void windNamesCmd();
|
||||
|
||||
|
||||
#ifdef MAGIC_WRAPPER
|
||||
extern int windBypassCmd();
|
||||
extern void windBypassCmd();
|
||||
#else
|
||||
extern int windEchoCmd(), windSourceCmd(), windSendCmd();
|
||||
extern void windEchoCmd(), windSourceCmd(), windSendCmd();
|
||||
#endif
|
||||
|
||||
static Rect windFrameRect;
|
||||
|
|
@ -104,9 +104,9 @@ static int windCorner = WIND_ILG; /* Nearest corner when button went
|
|||
*/
|
||||
|
||||
void
|
||||
windButtonSetCursor(button, corner)
|
||||
int button; /* Button that is down. */
|
||||
int corner; /* Corner to be displayed in cursor. */
|
||||
windButtonSetCursor(
|
||||
int button, /* Button that is down. */
|
||||
int corner) /* Corner to be displayed in cursor. */
|
||||
{
|
||||
switch (corner)
|
||||
{
|
||||
|
|
@ -154,10 +154,9 @@ windButtonSetCursor(button, corner)
|
|||
*/
|
||||
|
||||
int
|
||||
windGetCorner(screenPoint, screenRect)
|
||||
Point *screenPoint;
|
||||
Rect *screenRect;
|
||||
|
||||
windGetCorner(
|
||||
Point *screenPoint,
|
||||
Rect *screenRect)
|
||||
{
|
||||
Rect r;
|
||||
|
||||
|
|
@ -200,15 +199,15 @@ windGetCorner(screenPoint, screenRect)
|
|||
*/
|
||||
|
||||
void
|
||||
windMoveRect(wholeRect, corner, p, rect)
|
||||
bool wholeRect; /* move the whole thing? or just a corner? */
|
||||
int corner; /* Specifies a corner in the format
|
||||
windMoveRect(
|
||||
bool wholeRect, /* move the whole thing? or just a corner? */
|
||||
int corner, /* Specifies a corner in the format
|
||||
* returned by ToolGetCorner.
|
||||
*/
|
||||
Point *p; /* New position of corner, in screen
|
||||
Point *p, /* New position of corner, in screen
|
||||
* coordinates.
|
||||
*/
|
||||
Rect *rect;
|
||||
Rect *rect)
|
||||
{
|
||||
int x, y, tmp;
|
||||
|
||||
|
|
@ -312,9 +311,9 @@ windMoveRect(wholeRect, corner, p, rect)
|
|||
*/
|
||||
|
||||
void
|
||||
windFrameDown(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windFrameDown(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
if (WindOldButtons == 0)
|
||||
{
|
||||
|
|
@ -341,9 +340,9 @@ windFrameDown(w, cmd)
|
|||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
windFrameUp(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windFrameUp(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
if (WindNewButtons == 0)
|
||||
{
|
||||
|
|
@ -391,9 +390,9 @@ windFrameUp(w, cmd)
|
|||
*/
|
||||
|
||||
bool
|
||||
windFrameButtons(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windFrameButtons(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
extern void windBarLocations();
|
||||
|
||||
|
|
@ -498,9 +497,9 @@ windFrameButtons(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windClientButtons(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windClientButtons(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
/*
|
||||
* Is this an initial 'down push' in a non-iconic window? If so, we
|
||||
|
|
@ -599,11 +598,11 @@ windClientButtons(w, cmd)
|
|||
*/
|
||||
|
||||
bool
|
||||
WindButtonInFrame(w, x, y, b)
|
||||
MagWindow *w;
|
||||
int x;
|
||||
int y;
|
||||
int b;
|
||||
WindButtonInFrame(
|
||||
MagWindow *w,
|
||||
int x,
|
||||
int y,
|
||||
int b)
|
||||
{
|
||||
TxCommand cmd;
|
||||
cmd.tx_p.p_x = x;
|
||||
|
|
@ -638,9 +637,9 @@ WindButtonInFrame(w, x, y, b)
|
|||
*/
|
||||
|
||||
void
|
||||
windCmdInterp(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windCmdInterp(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int cmdNum;
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
|||
#include "cif/cif.h"
|
||||
|
||||
/* Forward declarations */
|
||||
void windDoMacro();
|
||||
void windDoMacro(MagWindow *w, TxCommand *cmd, bool interactive);
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
|
|
@ -78,9 +78,9 @@ void windDoMacro();
|
|||
*/
|
||||
|
||||
void
|
||||
windBorderCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windBorderCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int place;
|
||||
bool value;
|
||||
|
|
@ -148,9 +148,9 @@ windBorderCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windCaptionCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windCaptionCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int place;
|
||||
Rect ts;
|
||||
|
|
@ -218,9 +218,9 @@ windCaptionCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windCenterCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windCenterCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
Point rootPoint;
|
||||
Rect newArea, oldArea;
|
||||
|
|
@ -318,9 +318,9 @@ windCenterCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windCloseCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windCloseCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
if ((cmd->tx_argc == 2) && GrWindowNamePtr)
|
||||
{
|
||||
|
|
@ -372,9 +372,9 @@ windCloseCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windBypassCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windBypassCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int saveCount;
|
||||
|
||||
|
|
@ -410,9 +410,9 @@ windBypassCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windCrashCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windCrashCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
if (cmd->tx_argc != 1)
|
||||
{
|
||||
|
|
@ -457,9 +457,9 @@ windCrashCmd(w, cmd)
|
|||
#define CURSOR_SCREEN 6
|
||||
|
||||
void
|
||||
windCursorCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windCursorCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
Point p_in, p_out;
|
||||
int resulttype, saveunits, idx;
|
||||
|
|
@ -588,9 +588,9 @@ windCursorCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windDebugCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windDebugCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
if (cmd->tx_argc != 1) goto usage;
|
||||
windPrintCommands = !windPrintCommands;
|
||||
|
|
@ -617,9 +617,9 @@ usage:
|
|||
*/
|
||||
|
||||
void
|
||||
windDumpCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windDumpCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
(void) windDump();
|
||||
}
|
||||
|
|
@ -643,9 +643,9 @@ windDumpCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windEchoCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windEchoCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int i;
|
||||
bool newline = TRUE;
|
||||
|
|
@ -686,9 +686,9 @@ windEchoCmd(w, cmd)
|
|||
/*ARGSUSED*/
|
||||
|
||||
void
|
||||
windFilesCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windFilesCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
#define NUM_FD 20 /* max number of open files per process */
|
||||
int fd;
|
||||
|
|
@ -740,9 +740,9 @@ windFilesCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windGrowCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windGrowCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
if (w == NULL)
|
||||
{
|
||||
|
|
@ -769,9 +769,9 @@ windGrowCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windGrstatsCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windGrstatsCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
char *RunStats(), *rstatp;
|
||||
static struct tms tlast, tdelta;
|
||||
|
|
@ -875,9 +875,9 @@ windGrstatsCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windHelpCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windHelpCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
ASSERT(FALSE, windHelpCmd);
|
||||
}
|
||||
|
|
@ -914,9 +914,9 @@ windHelpCmd(w, cmd)
|
|||
#define LOG_CMD_RESUME 4 // Resume command logging.
|
||||
|
||||
void
|
||||
windLogCommandsCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windLogCommandsCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
char *fileName = NULL;
|
||||
unsigned char flags = 0;
|
||||
|
|
@ -994,9 +994,9 @@ usage:
|
|||
*/
|
||||
|
||||
void
|
||||
windIntMacroCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windIntMacroCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
windDoMacro(w, cmd, TRUE);
|
||||
}
|
||||
|
|
@ -1018,9 +1018,9 @@ windIntMacroCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windMacroCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windMacroCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
windDoMacro(w, cmd, FALSE);
|
||||
}
|
||||
|
|
@ -1042,10 +1042,10 @@ windMacroCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windDoMacro(w, cmd, interactive)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
bool interactive;
|
||||
windDoMacro(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd,
|
||||
bool interactive)
|
||||
{
|
||||
char *cp, *cn;
|
||||
char nulltext[] = "";
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
|||
*/
|
||||
|
||||
void
|
||||
windOpenCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windOpenCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
Rect area;
|
||||
Point frame;
|
||||
|
|
@ -111,9 +111,9 @@ windOpenCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windOverCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windOverCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
if (cmd->tx_argc != 1)
|
||||
{
|
||||
|
|
@ -148,9 +148,9 @@ windOverCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windPauseCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windPauseCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int i;
|
||||
static char ssline[TX_MAX_CMDLEN];
|
||||
|
|
@ -200,9 +200,9 @@ const char * const actTable[] =
|
|||
*/
|
||||
|
||||
void
|
||||
windPushbuttonCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windPushbuttonCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int but, act;
|
||||
static TxCommand txcmd;
|
||||
|
|
@ -259,9 +259,9 @@ badusage:
|
|||
*/
|
||||
|
||||
void
|
||||
windQuitCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windQuitCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
clientRec *cr;
|
||||
bool checkfirst = TRUE;
|
||||
|
|
@ -332,9 +332,9 @@ windQuitCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windRedoCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windRedoCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int count;
|
||||
|
||||
|
|
@ -406,9 +406,9 @@ windRedoCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windRedrawCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windRedrawCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
WindAreaChanged((MagWindow *) NULL, (Rect *) NULL);
|
||||
}
|
||||
|
|
@ -432,9 +432,9 @@ windRedrawCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windResetCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windResetCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
if (cmd->tx_argc != 1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -72,9 +72,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
|||
*/
|
||||
|
||||
void
|
||||
windScrollCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windScrollCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
Rect r;
|
||||
int xsize, ysize;
|
||||
|
|
@ -211,9 +211,9 @@ windScrollCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windSetpointCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windSetpointCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int wid;
|
||||
Point rootPoint;
|
||||
|
|
@ -292,9 +292,9 @@ usage:
|
|||
}
|
||||
|
||||
int
|
||||
windSetPrintProc(name, val)
|
||||
char *name;
|
||||
char *val;
|
||||
windSetPrintProc(
|
||||
char *name,
|
||||
char *val)
|
||||
{
|
||||
TxPrintf("%s = \"%s\"\n", name, val);
|
||||
return 0;
|
||||
|
|
@ -316,9 +316,9 @@ windSetPrintProc(name, val)
|
|||
*/
|
||||
|
||||
void
|
||||
windSleepCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windSleepCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int time;
|
||||
|
||||
|
|
@ -360,9 +360,9 @@ windSleepCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windSourceCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windSourceCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
FILE *f;
|
||||
|
||||
|
|
@ -401,9 +401,9 @@ windSourceCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windSpecialOpenCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windSpecialOpenCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
WindClient wc;
|
||||
Rect area;
|
||||
|
|
@ -478,9 +478,9 @@ usage:
|
|||
*/
|
||||
|
||||
void
|
||||
windNamesCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windNamesCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
bool doforall = FALSE;
|
||||
WindClient wc = (WindClient)NULL;
|
||||
|
|
@ -591,9 +591,9 @@ windNamesCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windUnderCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windUnderCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
if (cmd->tx_argc != 1)
|
||||
{
|
||||
|
|
@ -631,9 +631,9 @@ windUnderCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windUndoCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windUndoCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int count;
|
||||
|
||||
|
|
@ -713,9 +713,9 @@ windUndoCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windUpdateCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windUpdateCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
if (cmd->tx_argc == 1)
|
||||
WindUpdate();
|
||||
|
|
@ -759,9 +759,9 @@ badusage:
|
|||
*/
|
||||
|
||||
void
|
||||
windVersionCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windVersionCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
if (cmd->tx_argc != 1) {
|
||||
TxError("Usage: %s\n", cmd->tx_argv[0]);
|
||||
|
|
@ -795,9 +795,9 @@ windVersionCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windViewCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windViewCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
if (w == NULL)
|
||||
return;
|
||||
|
|
@ -937,9 +937,9 @@ windViewCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windXviewCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windXviewCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
CellUse *celluse;
|
||||
int ViewUnexpandFunc();
|
||||
|
|
@ -967,9 +967,9 @@ windXviewCmd(w, cmd)
|
|||
*/
|
||||
|
||||
int
|
||||
ViewUnexpandFunc(use, windowMask)
|
||||
CellUse *use; /* Use that was just unexpanded. */
|
||||
int windowMask; /* Window where it was unexpanded. */
|
||||
ViewUnexpandFunc(
|
||||
CellUse *use, /* Use that was just unexpanded. */
|
||||
int windowMask) /* Window where it was unexpanded. */
|
||||
{
|
||||
if (use->cu_parent == NULL) return 0;
|
||||
DBWAreaChanged(use->cu_parent, &use->cu_bbox, windowMask,
|
||||
|
|
@ -998,9 +998,9 @@ ViewUnexpandFunc(use, windowMask)
|
|||
*/
|
||||
|
||||
void
|
||||
windScrollBarsCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windScrollBarsCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int place;
|
||||
static const char * const onoff[] = {"on", "off", 0};
|
||||
|
|
@ -1052,9 +1052,9 @@ windScrollBarsCmd(w, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
windSendCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windSendCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
MagWindow *toWindow;
|
||||
WindClient client;
|
||||
|
|
@ -1090,9 +1090,9 @@ windSendCmd(w, cmd)
|
|||
}
|
||||
|
||||
int
|
||||
windSendCmdFunc(w, cd)
|
||||
MagWindow *w;
|
||||
ClientData cd;
|
||||
windSendCmdFunc(
|
||||
MagWindow *w,
|
||||
ClientData cd)
|
||||
{
|
||||
*((MagWindow **) cd) = w;
|
||||
return 1;
|
||||
|
|
@ -1129,9 +1129,9 @@ typedef struct _cdwpos {
|
|||
*/
|
||||
|
||||
void
|
||||
windPositionsCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windPositionsCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
extern int windPositionsFunc();
|
||||
char *filename = NULL;
|
||||
|
|
@ -1174,9 +1174,9 @@ usage:
|
|||
}
|
||||
|
||||
int
|
||||
windPositionsFunc(w, cdata)
|
||||
MagWindow *w;
|
||||
ClientData cdata;
|
||||
windPositionsFunc(
|
||||
MagWindow *w,
|
||||
ClientData cdata)
|
||||
{
|
||||
cdwpos *windpos = (cdwpos *)cdata;
|
||||
Rect r;
|
||||
|
|
@ -1236,9 +1236,9 @@ windPositionsFunc(w, cdata)
|
|||
*/
|
||||
|
||||
void
|
||||
windZoomCmd(w, cmd)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd;
|
||||
windZoomCmd(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
float factor;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,8 +48,8 @@ static char rcsid[] __attribute__ ((unused)) = "$Header$";
|
|||
*/
|
||||
|
||||
void
|
||||
windPrintWindow(w)
|
||||
MagWindow *w;
|
||||
windPrintWindow(
|
||||
MagWindow *w)
|
||||
{
|
||||
LinkedRect *lr;
|
||||
|
||||
|
|
@ -136,8 +136,8 @@ windDump()
|
|||
*/
|
||||
|
||||
void
|
||||
windPrintCommand(cmd)
|
||||
TxCommand *cmd;
|
||||
windPrintCommand(
|
||||
TxCommand *cmd)
|
||||
{
|
||||
if (cmd->tx_button == TX_NO_BUTTON)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -78,7 +78,9 @@ bool windSomeSeparateRedisplay = FALSE;
|
|||
*/
|
||||
|
||||
int
|
||||
windCheckOnlyWindow(MagWindow **w, WindClient client)
|
||||
windCheckOnlyWindow(
|
||||
MagWindow **w,
|
||||
WindClient client)
|
||||
{
|
||||
MagWindow *sw, *tw;
|
||||
int wct = 0;
|
||||
|
|
@ -116,8 +118,8 @@ windCheckOnlyWindow(MagWindow **w, WindClient client)
|
|||
*/
|
||||
|
||||
void
|
||||
windFreeList(llr)
|
||||
LinkedRect **llr; /* A pointer to a list of linked rectangles */
|
||||
windFreeList(
|
||||
LinkedRect **llr) /* A pointer to a list of linked rectangles */
|
||||
{
|
||||
LinkedRect *lr, *freelr;
|
||||
|
||||
|
|
@ -211,8 +213,8 @@ windReClip()
|
|||
*/
|
||||
|
||||
void
|
||||
WindSeparateRedisplay(w)
|
||||
MagWindow *w;
|
||||
WindSeparateRedisplay(
|
||||
MagWindow *w)
|
||||
{
|
||||
windSomeSeparateRedisplay = TRUE;
|
||||
if (w->w_redrawAreas != (ClientData)NULL) return;
|
||||
|
|
@ -235,8 +237,8 @@ WindSeparateRedisplay(w)
|
|||
*/
|
||||
|
||||
void
|
||||
WindIconChanged(w)
|
||||
MagWindow *w;
|
||||
WindIconChanged(
|
||||
MagWindow *w)
|
||||
{
|
||||
ASSERT(w != NULL, "WindIconChanged");
|
||||
w->w_flags |= WIND_REDRAWICON;
|
||||
|
|
@ -264,9 +266,9 @@ WindIconChanged(w)
|
|||
*/
|
||||
|
||||
void
|
||||
WindAreaChanged(w, area)
|
||||
MagWindow *w; /* The window that changed. */
|
||||
Rect *area; /* The area in screen coordinates.
|
||||
WindAreaChanged(
|
||||
MagWindow *w, /* The window that changed. */
|
||||
Rect *area) /* The area in screen coordinates.
|
||||
* NULL means the whole screen. Caller
|
||||
* should clip this rectangle to the area
|
||||
* of the window.
|
||||
|
|
@ -346,9 +348,9 @@ WindAreaChanged(w, area)
|
|||
}
|
||||
|
||||
bool
|
||||
windChangedFunc(area, next)
|
||||
Rect *area; /* Area that is still unobscured. */
|
||||
LinkedRect *next; /* Next obscuring area. */
|
||||
windChangedFunc(
|
||||
Rect *area, /* Area that is still unobscured. */
|
||||
LinkedRect *next) /* Next obscuring area. */
|
||||
{
|
||||
/* If we're at the end of obscuring areas, paint an error
|
||||
* tile to mark what's to be redisplayed. Otherwise,
|
||||
|
|
@ -383,29 +385,29 @@ windChangedFunc(area, next)
|
|||
*/
|
||||
|
||||
void
|
||||
windBarLocations(w, leftBar, botBar, up, down, right, left, zoom)
|
||||
MagWindow *w; /* The window under consideration. */
|
||||
windBarLocations(
|
||||
MagWindow *w, /* The window under consideration. */
|
||||
/* The following are rectangles that will be filled
|
||||
* in by this procedure. The values will be in the
|
||||
* same coordinate sytem as w->w_allArea.
|
||||
*/
|
||||
Rect *leftBar; /* The location of the left scrollbar area (not the
|
||||
Rect *leftBar, /* The location of the left scrollbar area (not the
|
||||
* bar itself).
|
||||
*/
|
||||
Rect *botBar; /* The location of the bottom scrollbar area. */
|
||||
Rect *up; /* The location of the 'up arrow' icon above the
|
||||
Rect *botBar, /* The location of the bottom scrollbar area. */
|
||||
Rect *up, /* The location of the 'up arrow' icon above the
|
||||
* left scroll bar.
|
||||
*/
|
||||
Rect *down; /* The location of the 'down arrow' icon below the
|
||||
Rect *down, /* The location of the 'down arrow' icon below the
|
||||
* left scroll bar.
|
||||
*/
|
||||
Rect *right; /* The location of the 'right arrow' icon to the right
|
||||
Rect *right, /* The location of the 'right arrow' icon to the right
|
||||
* of the bottom scroll bar.
|
||||
*/
|
||||
Rect *left; /* The location of the 'left arrow' icon to the left of
|
||||
Rect *left, /* The location of the 'left arrow' icon to the left of
|
||||
* the bottom scroll bar.
|
||||
*/
|
||||
Rect *zoom; /* The location of the 'zoom' icon in the lower-left
|
||||
Rect *zoom) /* The location of the 'zoom' icon in the lower-left
|
||||
* corner of the window.
|
||||
*/
|
||||
{
|
||||
|
|
@ -462,9 +464,9 @@ windBarLocations(w, leftBar, botBar, up, down, right, left, zoom)
|
|||
*/
|
||||
|
||||
void
|
||||
WindDrawBorder(w, clip)
|
||||
MagWindow *w;
|
||||
Rect *clip;
|
||||
WindDrawBorder(
|
||||
MagWindow *w,
|
||||
Rect *clip)
|
||||
{
|
||||
Rect r;
|
||||
Rect leftBar, botBar, up, down, left, right, zoom;
|
||||
|
|
@ -633,9 +635,9 @@ leave:
|
|||
*/
|
||||
|
||||
void
|
||||
WindCaption(w, caption)
|
||||
MagWindow *w;
|
||||
char *caption; /* The string that is to be copied into the caption.
|
||||
WindCaption(
|
||||
MagWindow *w,
|
||||
char *caption) /* The string that is to be copied into the caption.
|
||||
* (The string is copied, not just pointed at.)
|
||||
*/
|
||||
{
|
||||
|
|
@ -666,8 +668,8 @@ WindCaption(w, caption)
|
|||
*/
|
||||
|
||||
void
|
||||
windNewView(w)
|
||||
MagWindow *w;
|
||||
windNewView(
|
||||
MagWindow *w)
|
||||
{
|
||||
Rect leftBar, botBar, up, down, right, left, zoom;
|
||||
|
||||
|
|
@ -696,8 +698,8 @@ windNewView(w)
|
|||
*/
|
||||
|
||||
void
|
||||
WindRedisplay(w)
|
||||
MagWindow *w;
|
||||
WindRedisplay(
|
||||
MagWindow *w)
|
||||
{
|
||||
WindAreaChanged(w, &(w->w_allArea));
|
||||
}
|
||||
|
|
@ -717,8 +719,8 @@ WindRedisplay(w)
|
|||
*/
|
||||
|
||||
void
|
||||
windRedrawIcon(w)
|
||||
MagWindow *w;
|
||||
windRedrawIcon(
|
||||
MagWindow *w)
|
||||
{
|
||||
Point p;
|
||||
clientRec *cl;
|
||||
|
|
@ -900,10 +902,10 @@ WindUpdate()
|
|||
*/
|
||||
|
||||
int
|
||||
windUpdateFunc(tile, dinfo, w)
|
||||
Tile *tile; /* Tile in the redisplay plane. */
|
||||
TileType dinfo; /* Split tile information (unused) */
|
||||
MagWindow *w; /* Window we're currently interested in. */
|
||||
windUpdateFunc(
|
||||
Tile *tile, /* Tile in the redisplay plane. */
|
||||
TileType dinfo, /* Split tile information (unused) */
|
||||
MagWindow *w) /* Window we're currently interested in. */
|
||||
{
|
||||
Rect area;
|
||||
|
||||
|
|
@ -968,10 +970,10 @@ windUpdateFunc(tile, dinfo, w)
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
windBackgroundFunc(tile, dinfo, notUsed)
|
||||
Tile *tile;
|
||||
TileType dinfo; /* (unused) */
|
||||
ClientData notUsed; /* (unused) */
|
||||
windBackgroundFunc(
|
||||
Tile *tile,
|
||||
TileType dinfo, /* (unused) */
|
||||
ClientData notUsed) /* (unused) */
|
||||
{
|
||||
Rect area;
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ extern MagWindow *windSearchPoint();
|
|||
|
||||
/* C99 compat */
|
||||
extern void windScreenToFrame();
|
||||
extern void WindPrintClientList();
|
||||
extern void WindPrintClientList(bool wizard);
|
||||
|
||||
/* ----------------- constants ----------------- */
|
||||
|
||||
|
|
|
|||
|
|
@ -221,21 +221,20 @@ WindInit()
|
|||
*/
|
||||
|
||||
WindClient
|
||||
WindAddClient(clientName, create, delete, redisplay, command, update,
|
||||
exitproc, reposition, icon)
|
||||
char *clientName; /* A textual name for the client. This
|
||||
WindAddClient(
|
||||
char *clientName, /* A textual name for the client. This
|
||||
* name will be visable in the user
|
||||
* interface as the name to use to switch
|
||||
* a window over to a new client
|
||||
*/
|
||||
bool (*create)();
|
||||
bool (*delete)();
|
||||
void (*redisplay)();
|
||||
void (*command)();
|
||||
void (*update)();
|
||||
bool (*exitproc)();
|
||||
void (*reposition)();
|
||||
GrGlyph *icon; /* An icon to draw when the window is closed.
|
||||
bool (*create)(),
|
||||
bool (*delete)(),
|
||||
void (*redisplay)(),
|
||||
void (*command)(),
|
||||
void (*update)(),
|
||||
bool (*exitproc)(),
|
||||
void (*reposition)(),
|
||||
GrGlyph *icon) /* An icon to draw when the window is closed.
|
||||
* (currently for Sun Windows only).
|
||||
*/
|
||||
{
|
||||
|
|
@ -288,9 +287,9 @@ WindAddClient(clientName, create, delete, redisplay, command, update,
|
|||
*/
|
||||
|
||||
WindClient
|
||||
WindGetClient(clientName, exact)
|
||||
char *clientName; /* the textual name of the client */
|
||||
bool exact; /* must the name be exact, or are abbreviations allowed */
|
||||
WindGetClient(
|
||||
char *clientName, /* the textual name of the client */
|
||||
bool exact) /* must the name be exact, or are abbreviations allowed */
|
||||
{
|
||||
clientRec *cr, *found;
|
||||
int length;
|
||||
|
|
@ -339,8 +338,8 @@ WindGetClient(clientName, exact)
|
|||
*/
|
||||
|
||||
char *
|
||||
WindGetClientName(client)
|
||||
WindClient client;
|
||||
WindGetClientName(
|
||||
WindClient client)
|
||||
{
|
||||
clientRec *clientrec = (clientRec *)client;
|
||||
if (client == (WindClient)NULL) return NULL;
|
||||
|
|
@ -366,8 +365,8 @@ WindGetClientName(client)
|
|||
*/
|
||||
|
||||
WindClient
|
||||
WindNextClient(client)
|
||||
WindClient client;
|
||||
WindNextClient(
|
||||
WindClient client)
|
||||
{
|
||||
clientRec *cr = (clientRec *)client;
|
||||
int length;
|
||||
|
|
@ -393,8 +392,8 @@ WindNextClient(client)
|
|||
*/
|
||||
|
||||
void
|
||||
WindPrintClientList(wizard)
|
||||
bool wizard; /* If true print the names of ALL clients, even those
|
||||
WindPrintClientList(
|
||||
bool wizard) /* If true print the names of ALL clients, even those
|
||||
* that don't have user-visable windows */
|
||||
{
|
||||
clientRec *cr;
|
||||
|
|
@ -424,10 +423,10 @@ WindPrintClientList(wizard)
|
|||
*/
|
||||
|
||||
int
|
||||
WindExecute(w, rc, cmd)
|
||||
MagWindow *w;
|
||||
WindClient rc;
|
||||
TxCommand *cmd;
|
||||
WindExecute(
|
||||
MagWindow *w,
|
||||
WindClient rc,
|
||||
TxCommand *cmd)
|
||||
{
|
||||
int cmdNum;
|
||||
clientRec *client = (clientRec *) rc;
|
||||
|
|
@ -469,11 +468,11 @@ WindExecute(w, rc, cmd)
|
|||
*/
|
||||
|
||||
void
|
||||
WindAddCommand(rc, text, func, dynamic)
|
||||
WindClient rc;
|
||||
char *text;
|
||||
void (*func)();
|
||||
bool dynamic;
|
||||
WindAddCommand(
|
||||
WindClient rc,
|
||||
char *text,
|
||||
void (*func)(),
|
||||
bool dynamic)
|
||||
{
|
||||
int cidx, numCommands = 0;
|
||||
clientRec *client = (clientRec *) rc;
|
||||
|
|
@ -552,10 +551,10 @@ WindAddCommand(rc, text, func, dynamic)
|
|||
*/
|
||||
|
||||
int
|
||||
WindReplaceCommand(rc, command, newfunc)
|
||||
WindClient rc;
|
||||
char *command;
|
||||
void (*newfunc)();
|
||||
WindReplaceCommand(
|
||||
WindClient rc,
|
||||
char *command,
|
||||
void (*newfunc)())
|
||||
{
|
||||
int cidx, clen;
|
||||
clientRec *client = (clientRec *) rc;
|
||||
|
|
@ -595,8 +594,8 @@ WindReplaceCommand(rc, command, newfunc)
|
|||
*/
|
||||
|
||||
const char * const *
|
||||
WindGetCommandTable(rc)
|
||||
WindClient rc;
|
||||
WindGetCommandTable(
|
||||
WindClient rc)
|
||||
{
|
||||
clientRec *client = (clientRec *) rc;
|
||||
return client->w_commandTable;
|
||||
|
|
|
|||
|
|
@ -75,8 +75,8 @@ int windCurNumWindows = 0;
|
|||
*/
|
||||
|
||||
void
|
||||
windUnlink(w)
|
||||
MagWindow *w;
|
||||
windUnlink(
|
||||
MagWindow *w)
|
||||
{
|
||||
ASSERT(w != (MagWindow *) NULL, "windUnlink");
|
||||
ASSERT(windTopWindow != (MagWindow *) NULL, "windUnlink");
|
||||
|
|
@ -127,8 +127,8 @@ windUnlink(w)
|
|||
*/
|
||||
|
||||
void
|
||||
windFree(w)
|
||||
MagWindow *w;
|
||||
windFree(
|
||||
MagWindow *w)
|
||||
{
|
||||
windWindowMask &= ~(1 << w->w_wid);
|
||||
windCurNumWindows--;
|
||||
|
|
@ -158,8 +158,8 @@ windFree(w)
|
|||
*/
|
||||
|
||||
void
|
||||
WindSetWindowAreas(w)
|
||||
MagWindow *w;
|
||||
WindSetWindowAreas(
|
||||
MagWindow *w)
|
||||
{
|
||||
switch ( WindPackageType )
|
||||
{
|
||||
|
|
@ -193,8 +193,8 @@ WindSetWindowAreas(w)
|
|||
*/
|
||||
|
||||
void
|
||||
windSetWindowPosition(w)
|
||||
MagWindow *w;
|
||||
windSetWindowPosition(
|
||||
MagWindow *w)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -214,8 +214,8 @@ windSetWindowPosition(w)
|
|||
*/
|
||||
|
||||
bool
|
||||
WindDelete(w)
|
||||
MagWindow *w;
|
||||
WindDelete(
|
||||
MagWindow *w)
|
||||
{
|
||||
clientRec *cr;
|
||||
|
||||
|
|
@ -253,16 +253,16 @@ WindDelete(w)
|
|||
*/
|
||||
|
||||
MagWindow *
|
||||
WindCreate(client, frameArea, isHint, argc, argv)
|
||||
WindClient client; /* The client that will control this window */
|
||||
Rect *frameArea; /* The area that the window is to occupy */
|
||||
bool isHint; /* TRUE if the above rectangle is only a
|
||||
WindCreate(
|
||||
WindClient client, /* The client that will control this window */
|
||||
Rect *frameArea, /* The area that the window is to occupy */
|
||||
bool isHint, /* TRUE if the above rectangle is only a
|
||||
* hint and it is OK for a window package to
|
||||
* override it to maintain a consistent
|
||||
* user interface.
|
||||
*/
|
||||
int argc; /* Passed to the client */
|
||||
char *argv[];
|
||||
int argc, /* Passed to the client */
|
||||
char *argv[])
|
||||
{
|
||||
MagWindow *w;
|
||||
clientRec *cr;
|
||||
|
|
@ -386,12 +386,12 @@ WindCreate(client, frameArea, isHint, argc, argv)
|
|||
*/
|
||||
|
||||
void
|
||||
WindOutToIn(w, out, in)
|
||||
MagWindow *w; /* Window under consideration */
|
||||
Rect *out; /* Pointer to rectangle of outside area of
|
||||
WindOutToIn(
|
||||
MagWindow *w, /* Window under consideration */
|
||||
Rect *out, /* Pointer to rectangle of outside area of
|
||||
* a window.
|
||||
*/
|
||||
Rect *in; /* Pointer to rectangle to be filled in with
|
||||
Rect *in) /* Pointer to rectangle to be filled in with
|
||||
* inside area corresponding to out.
|
||||
*/
|
||||
{
|
||||
|
|
@ -435,8 +435,8 @@ void WindInToOut(w, in, out)
|
|||
*/
|
||||
|
||||
void
|
||||
WindUnder(w)
|
||||
MagWindow *w; /* the window to be moved */
|
||||
WindUnder(
|
||||
MagWindow *w) /* the window to be moved */
|
||||
{
|
||||
Rect area;
|
||||
MagWindow *w2;
|
||||
|
|
@ -492,8 +492,8 @@ WindUnder(w)
|
|||
*/
|
||||
|
||||
void
|
||||
WindOver(w)
|
||||
MagWindow *w; /* the window to be moved */
|
||||
WindOver(
|
||||
MagWindow *w) /* the window to be moved */
|
||||
{
|
||||
LinkedRect *r;
|
||||
Rect area;
|
||||
|
|
@ -557,9 +557,9 @@ WindOver(w)
|
|||
*/
|
||||
|
||||
bool
|
||||
windFindUnobscured(area, okArea)
|
||||
Rect *area; /* Area that may be obscured. */
|
||||
Rect *okArea; /* Modified to contain one of the
|
||||
windFindUnobscured(
|
||||
Rect *area, /* Area that may be obscured. */
|
||||
Rect *okArea) /* Modified to contain one of the
|
||||
* unobscured areas.
|
||||
*/
|
||||
{
|
||||
|
|
@ -593,14 +593,14 @@ windFindUnobscured(area, okArea)
|
|||
*/
|
||||
|
||||
void
|
||||
WindReframe(w, r, inside, move)
|
||||
MagWindow *w; /* the window to be reframed */
|
||||
Rect *r; /* the new location in screen coordinates */
|
||||
bool inside; /* TRUE if the rectangle is the screen location of
|
||||
WindReframe(
|
||||
MagWindow *w, /* the window to be reframed */
|
||||
Rect *r, /* the new location in screen coordinates */
|
||||
bool inside, /* TRUE if the rectangle is the screen location of
|
||||
* the inside of the window, FALSE if the above
|
||||
* rectangle includes border areas.
|
||||
*/
|
||||
bool move; /* Move the coordinate system of the window the same
|
||||
bool move) /* Move the coordinate system of the window the same
|
||||
* amount as the lower left corner of the window?
|
||||
*/
|
||||
{
|
||||
|
|
@ -721,10 +721,9 @@ WindReframe(w, r, inside, move)
|
|||
}
|
||||
|
||||
bool
|
||||
windReframeFunc(area, w)
|
||||
Rect *area; /* Area to redisplay. */
|
||||
MagWindow *w; /* Window in which to redisplay. */
|
||||
|
||||
windReframeFunc(
|
||||
Rect *area, /* Area to redisplay. */
|
||||
MagWindow *w) /* Window in which to redisplay. */
|
||||
{
|
||||
WindAreaChanged(w, area);
|
||||
return FALSE;
|
||||
|
|
@ -749,8 +748,8 @@ windReframeFunc(area, w)
|
|||
*/
|
||||
|
||||
void
|
||||
WindFullScreen(w)
|
||||
MagWindow *w; /* Window to be blown up or shrunk back. */
|
||||
WindFullScreen(
|
||||
MagWindow *w) /* Window to be blown up or shrunk back. */
|
||||
{
|
||||
int i;
|
||||
MagWindow *w2;
|
||||
|
|
|
|||
|
|
@ -51,9 +51,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header$";
|
|||
*/
|
||||
|
||||
MagWindow *
|
||||
windSearchPoint(p, inside)
|
||||
Point *p; /* A point in screen coordinates */
|
||||
bool *inside; /* A pointer to a boolean variable that is set to
|
||||
windSearchPoint(
|
||||
Point *p, /* A point in screen coordinates */
|
||||
bool *inside) /* A pointer to a boolean variable that is set to
|
||||
* TRUE if the point is in the interior of the window,
|
||||
* and FALSE if it is in the border. If this pointer
|
||||
* is NULL then 'inside' is not filled in.
|
||||
|
|
@ -92,8 +92,8 @@ windSearchPoint(p, inside)
|
|||
*/
|
||||
|
||||
MagWindow *
|
||||
WindSearchWid(wid)
|
||||
int wid;
|
||||
WindSearchWid(
|
||||
int wid)
|
||||
{
|
||||
MagWindow *w;
|
||||
for(w = windTopWindow; w != (MagWindow *) NULL; w = w->w_nextWindow) {
|
||||
|
|
@ -119,8 +119,8 @@ WindSearchWid(wid)
|
|||
*/
|
||||
|
||||
MagWindow *
|
||||
WindSearchData(grdata)
|
||||
ClientData grdata;
|
||||
WindSearchData(
|
||||
ClientData grdata)
|
||||
{
|
||||
MagWindow *w;
|
||||
for(w = windTopWindow; w != (MagWindow *) NULL; w = w->w_nextWindow) {
|
||||
|
|
@ -158,22 +158,22 @@ WindSearchData(grdata)
|
|||
*/
|
||||
|
||||
int
|
||||
WindSearch(client, surfaceID, surfaceArea, func, clientData)
|
||||
WindClient client; /* Search for the windows that belong to
|
||||
WindSearch(
|
||||
WindClient client, /* Search for the windows that belong to
|
||||
* this client. NULL means all clients.
|
||||
*/
|
||||
ClientData surfaceID; /* The unique ID of the surface that we
|
||||
ClientData surfaceID, /* The unique ID of the surface that we
|
||||
* are looking for. If NULL then look for
|
||||
* any surface.
|
||||
*/
|
||||
Rect *surfaceArea; /* The area that we are looking for in surface
|
||||
Rect *surfaceArea, /* The area that we are looking for in surface
|
||||
* coordinates. If NULL then match without
|
||||
* regard to the area in the window.
|
||||
*/
|
||||
int (*func)(); /* The function to call with each window
|
||||
int (*func)(), /* The function to call with each window
|
||||
* that matches.
|
||||
*/
|
||||
ClientData clientData; /* The client data to be passed to the caller's
|
||||
ClientData clientData) /* The client data to be passed to the caller's
|
||||
* function.
|
||||
*/
|
||||
{
|
||||
|
|
|
|||
|
|
@ -83,10 +83,10 @@ extern void windHelp();
|
|||
*/
|
||||
|
||||
int
|
||||
WindSendCommand(w, cmd, quiet)
|
||||
MagWindow *w;
|
||||
TxCommand *cmd; /* A pointer to a command */
|
||||
bool quiet; /* Don't print error/warning messages if this is set */
|
||||
WindSendCommand(
|
||||
MagWindow *w,
|
||||
TxCommand *cmd, /* A pointer to a command */
|
||||
bool quiet) /* Don't print error/warning messages if this is set */
|
||||
{
|
||||
int windCmdNum, clientCmdNum;
|
||||
clientRec *rc;
|
||||
|
|
@ -351,8 +351,8 @@ WindSendCommand(w, cmd, quiet)
|
|||
*/
|
||||
|
||||
void
|
||||
WindGrabInput(client)
|
||||
WindClient client;
|
||||
WindGrabInput(
|
||||
WindClient client)
|
||||
{
|
||||
ASSERT( client != NULL, "WindGrabInput");
|
||||
StackPush( (ClientData) windGrabber, windGrabberStack);
|
||||
|
|
@ -376,8 +376,8 @@ WindGrabInput(client)
|
|||
*/
|
||||
|
||||
void
|
||||
WindReleaseInput(client)
|
||||
WindClient client;
|
||||
WindReleaseInput(
|
||||
WindClient client)
|
||||
{
|
||||
ASSERT( client == windGrabber, "WindReleaseInput");
|
||||
windGrabber = (WindClient) StackPop(windGrabberStack);
|
||||
|
|
@ -399,12 +399,12 @@ WindReleaseInput(client)
|
|||
*/
|
||||
|
||||
void
|
||||
windHelp(cmd, name, table)
|
||||
TxCommand *cmd; /* Information about command options. */
|
||||
char *name; /* Name of client for whom help is being
|
||||
windHelp(
|
||||
TxCommand *cmd, /* Information about command options. */
|
||||
char *name, /* Name of client for whom help is being
|
||||
* printed.
|
||||
*/
|
||||
char *table[]; /* Client's command table. */
|
||||
char *table[]) /* Client's command table. */
|
||||
{
|
||||
static char *capName = NULL;
|
||||
static char patString[200], *pattern;
|
||||
|
|
|
|||
|
|
@ -45,12 +45,12 @@ static char rcsid[] __attribute__ ((unused)) = "$Header$";
|
|||
*/
|
||||
|
||||
void
|
||||
WindScreenToSurface(w, screen, surface)
|
||||
MagWindow *w; /* Window in whose coordinates screen is
|
||||
WindScreenToSurface(
|
||||
MagWindow *w, /* Window in whose coordinates screen is
|
||||
* is defined.
|
||||
*/
|
||||
Rect *screen; /* A rectangle in screen coordinates */
|
||||
Rect *surface; /* A pointer to a rectangle to be filled
|
||||
Rect *screen, /* A rectangle in screen coordinates */
|
||||
Rect *surface) /* A pointer to a rectangle to be filled
|
||||
* in with a rectangle in surface coords that
|
||||
* is big enough to contain everything
|
||||
* displayed within the screen rectangle.
|
||||
|
|
@ -87,15 +87,15 @@ WindScreenToSurface(w, screen, surface)
|
|||
*/
|
||||
|
||||
void
|
||||
WindPointToSurface(w, screenPoint, surfacePoint, surfaceBox)
|
||||
MagWindow *w; /* Window in whose coordinate system the
|
||||
WindPointToSurface(
|
||||
MagWindow *w, /* Window in whose coordinate system the
|
||||
* transformation is to be done.
|
||||
*/
|
||||
Point *screenPoint; /* The point in screen coordinates. */
|
||||
Point *surfacePoint;/* Filled in with the nearest surface coordinate.
|
||||
Point *screenPoint, /* The point in screen coordinates. */
|
||||
Point *surfacePoint, /* Filled in with the nearest surface coordinate.
|
||||
* Nothing is filled in if the pointer is NULL.
|
||||
*/
|
||||
Rect *surfaceBox; /* Filled in with a box in surface coordinates that
|
||||
Rect *surfaceBox) /* Filled in with a box in surface coordinates that
|
||||
* surrounds the point. It is not filled in if this
|
||||
* is a NULL pointer.
|
||||
*/
|
||||
|
|
@ -175,12 +175,12 @@ WindPointToSurface(w, screenPoint, surfacePoint, surfaceBox)
|
|||
*/
|
||||
|
||||
void
|
||||
WindSurfaceToScreen(w, surface, screen)
|
||||
MagWindow *w; /* Window in whose coordinate system the
|
||||
WindSurfaceToScreen(
|
||||
MagWindow *w, /* Window in whose coordinate system the
|
||||
* transform is to be done.
|
||||
*/
|
||||
Rect *surface; /* Rectangle in surface coordinates of w. */
|
||||
Rect *screen; /* Rectangle filled in with screen coordinates
|
||||
Rect *surface, /* Rectangle in surface coordinates of w. */
|
||||
Rect *screen) /* Rectangle filled in with screen coordinates
|
||||
* (in w) of surface.
|
||||
*/
|
||||
{
|
||||
|
|
@ -265,10 +265,10 @@ WindSurfaceToScreen(w, surface, screen)
|
|||
*/
|
||||
|
||||
void
|
||||
WindSurfaceToScreenNoClip(w, surface, screen)
|
||||
MagWindow *w;
|
||||
Rect *surface;
|
||||
Rect *screen;
|
||||
WindSurfaceToScreenNoClip(
|
||||
MagWindow *w,
|
||||
Rect *surface,
|
||||
Rect *screen)
|
||||
{
|
||||
dlong tmp, dval;
|
||||
|
||||
|
|
@ -306,12 +306,12 @@ WindSurfaceToScreenNoClip(w, surface, screen)
|
|||
*/
|
||||
|
||||
void
|
||||
WindPointToScreen(w, surface, screen)
|
||||
MagWindow *w; /* Window in whose coordinate system the
|
||||
WindPointToScreen(
|
||||
MagWindow *w, /* Window in whose coordinate system the
|
||||
* transform is to be done.
|
||||
*/
|
||||
Point *surface; /* Point in surface coordinates of w. */
|
||||
Point *screen; /* Point filled in with screen coordinates
|
||||
Point *surface, /* Point in surface coordinates of w. */
|
||||
Point *screen) /* Point filled in with screen coordinates
|
||||
* (in w) of surface.
|
||||
*/
|
||||
{
|
||||
|
|
@ -352,12 +352,12 @@ WindPointToScreen(w, surface, screen)
|
|||
*/
|
||||
|
||||
void
|
||||
windScreenToFrame(w, screen, frame)
|
||||
MagWindow *w; /* Window in whose coordinate system the
|
||||
windScreenToFrame(
|
||||
MagWindow *w, /* Window in whose coordinate system the
|
||||
* transform is to be done.
|
||||
*/
|
||||
Point *screen; /* Point in screen coordinates of w. */
|
||||
Point *frame; /* Point filled in with frame coordinates.
|
||||
Point *screen, /* Point in screen coordinates of w. */
|
||||
Point *frame) /* Point filled in with frame coordinates.
|
||||
*/
|
||||
{
|
||||
switch ( WindPackageType )
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ extern void windNewView();
|
|||
*/
|
||||
|
||||
void
|
||||
windFixSurfaceArea(w)
|
||||
MagWindow *w; /* Window to fix up. */
|
||||
windFixSurfaceArea(
|
||||
MagWindow *w) /* Window to fix up. */
|
||||
{
|
||||
Rect newArea, tmp;
|
||||
|
||||
|
|
@ -92,8 +92,8 @@ windFixSurfaceArea(w)
|
|||
*/
|
||||
|
||||
void
|
||||
WindUnload(surfaceID)
|
||||
ClientData surfaceID; /* A unique ID for this surface */
|
||||
WindUnload(
|
||||
ClientData surfaceID) /* A unique ID for this surface */
|
||||
{
|
||||
MagWindow *mw;
|
||||
|
||||
|
|
@ -120,11 +120,11 @@ WindUnload(surfaceID)
|
|||
*/
|
||||
|
||||
bool
|
||||
WindLoad(w, client, surfaceID, surfaceArea)
|
||||
MagWindow *w;
|
||||
WindClient client; /* The unique identifier of the client */
|
||||
ClientData surfaceID; /* A unique ID for this surface */
|
||||
Rect *surfaceArea; /* The area that should appear in the window */
|
||||
WindLoad(
|
||||
MagWindow *w,
|
||||
WindClient client, /* The unique identifier of the client */
|
||||
ClientData surfaceID, /* A unique ID for this surface */
|
||||
Rect *surfaceArea) /* The area that should appear in the window */
|
||||
{
|
||||
if (client != w->w_client) return FALSE;
|
||||
|
||||
|
|
@ -151,9 +151,9 @@ WindLoad(w, client, surfaceID, surfaceArea)
|
|||
*/
|
||||
|
||||
void
|
||||
WindMove(w, surfaceArea)
|
||||
MagWindow *w; /* the window to be panned */
|
||||
Rect *surfaceArea; /* The area to be viewed */
|
||||
WindMove(
|
||||
MagWindow *w, /* the window to be panned */
|
||||
Rect *surfaceArea) /* The area to be viewed */
|
||||
{
|
||||
int size, xscale, yscale;
|
||||
int halfSizePixels, halfSizeUnits;
|
||||
|
|
@ -232,9 +232,9 @@ WindMove(w, surfaceArea)
|
|||
*/
|
||||
|
||||
void
|
||||
WindZoom(w, factor)
|
||||
MagWindow *w; /* the window to be zoomed */
|
||||
float factor; /* The amount to zoom by (1 is no change),
|
||||
WindZoom(
|
||||
MagWindow *w, /* the window to be zoomed */
|
||||
float factor) /* The amount to zoom by (1 is no change),
|
||||
* greater than 1 is a larger magnification
|
||||
* (zoom in), and less than 1 is less mag.
|
||||
* (zoom out) )
|
||||
|
|
@ -274,8 +274,9 @@ WindZoom(w, factor)
|
|||
*/
|
||||
|
||||
void
|
||||
WindScale(scalen, scaled)
|
||||
int scalen, scaled;
|
||||
WindScale(
|
||||
int scalen,
|
||||
int scaled)
|
||||
{
|
||||
MagWindow *w2;
|
||||
Rect newArea;
|
||||
|
|
@ -313,8 +314,9 @@ WindScale(scalen, scaled)
|
|||
*/
|
||||
|
||||
void
|
||||
WindTranslate(origx, origy)
|
||||
int origx, origy;
|
||||
WindTranslate(
|
||||
int origx,
|
||||
int origy)
|
||||
{
|
||||
extern bool DBMovePoint();
|
||||
MagWindow *w2;
|
||||
|
|
@ -355,8 +357,8 @@ WindTranslate(origx, origy)
|
|||
/* ARGSUSED */
|
||||
|
||||
void
|
||||
WindView(w)
|
||||
MagWindow *w;
|
||||
WindView(
|
||||
MagWindow *w)
|
||||
{
|
||||
Rect bbox;
|
||||
#define SLOP 10 /* Amount of border (in fraction of a screenfull)
|
||||
|
|
@ -399,15 +401,15 @@ WindView(w)
|
|||
*/
|
||||
|
||||
void
|
||||
WindScroll(w, surfaceOffset, screenOffset)
|
||||
MagWindow *w;
|
||||
Point *surfaceOffset; /* An offset in surface coordinates. The
|
||||
WindScroll(
|
||||
MagWindow *w,
|
||||
Point *surfaceOffset, /* An offset in surface coordinates. The
|
||||
* screen point that used to display surface
|
||||
* point (0,0) will now display surface point
|
||||
* surfaceOffset. Can be NULL to indicate
|
||||
* no offset.
|
||||
*/
|
||||
Point *screenOffset; /* An additional offset in screen coordinates.
|
||||
Point *screenOffset) /* An additional offset in screen coordinates.
|
||||
* Can be NULL to indicate no offset. If
|
||||
* non-NULL, then after scrolling according
|
||||
* to surfaceOffset, the view is adjusted again
|
||||
|
|
|
|||
|
|
@ -26,6 +26,12 @@
|
|||
#include "utils/magic.h"
|
||||
#include "utils/geometry.h"
|
||||
|
||||
/* Forward declarations to avoid circular includes */
|
||||
struct GR_GLY2;
|
||||
typedef struct GR_GLY2 GrGlyph;
|
||||
struct TxCommand_;
|
||||
typedef struct TxCommand_ TxCommand;
|
||||
|
||||
/* SUBPIXELBITS represents a fixed-point shift for representing the */
|
||||
/* scale factor between the screen and the layout. It is only */
|
||||
/* necessary that the screen resolution * SUBPIXEL does not overflow */
|
||||
|
|
@ -236,8 +242,8 @@ typedef struct WIND_S1 {
|
|||
#define WIND_NO_WINDOW -3 /* Use NULL for the window */
|
||||
|
||||
/* utility procs & special stuff */
|
||||
extern MagWindow *WindCreate();
|
||||
extern WindClient WindGetClient();
|
||||
extern MagWindow *WindCreate(WindClient client, Rect *frameArea, bool isHint, int argc, char *argv[]);
|
||||
extern WindClient WindGetClient(char *clientName, bool exact);
|
||||
extern WindClient WindNextClient();
|
||||
extern WindClient WindAddClient();
|
||||
extern char *WindGetClientName();
|
||||
|
|
@ -246,10 +252,10 @@ extern void WindUpdate();
|
|||
extern void WindDrawBorder();
|
||||
extern void WindOutToIn();
|
||||
extern void WindInToOut();
|
||||
extern void WindSetWindowAreas();
|
||||
extern void WindSetWindowAreas(MagWindow *w);
|
||||
extern void windFixSurfaceArea();
|
||||
extern int WindExecute();
|
||||
extern void WindAddCommand();
|
||||
extern int WindExecute(MagWindow *w, WindClient rc, TxCommand *cmd);
|
||||
extern void WindAddCommand(WindClient rc, char *text, void (*func)(), bool dynamic);
|
||||
extern int WindReplaceCommand();
|
||||
extern const char * const *WindGetCommandTable();
|
||||
extern int windCheckOnlyWindow(MagWindow **, WindClient);
|
||||
|
|
@ -262,8 +268,8 @@ extern MagWindow *WindSearchData();
|
|||
|
||||
|
||||
/* procs for moving the surface inside of a window (changing the view) */
|
||||
extern void WindZoom();
|
||||
extern void WindMove();
|
||||
extern void WindZoom(MagWindow *w, float factor);
|
||||
extern void WindMove(MagWindow *w, Rect *surfaceArea);
|
||||
extern void WindView();
|
||||
extern void WindScroll();
|
||||
|
||||
|
|
@ -271,21 +277,21 @@ extern void WindScroll();
|
|||
/* procs for moving the window itself */
|
||||
extern void WindOver();
|
||||
extern void WindUnder();
|
||||
extern void WindReframe();
|
||||
extern void WindReframe(MagWindow *w, Rect *r, bool inside, bool move);
|
||||
extern void WindFullScreen();
|
||||
|
||||
|
||||
/* procs to transform into and out of screen coordinates */
|
||||
|
||||
extern void WindScreenToSurface();
|
||||
extern void WindSurfaceToScreen();
|
||||
extern void WindPointToSurface();
|
||||
extern void WindSurfaceToScreen(MagWindow *w, Rect *surface, Rect *screen);
|
||||
extern void WindPointToSurface(MagWindow *w, Point *screenPoint, Point *surfacePoint, Rect *surfaceBox);
|
||||
extern void WindPointToScreen();
|
||||
extern void WindSurfaceToScreenNoClip();
|
||||
|
||||
/* procs to change things or inform the window manager about changes */
|
||||
extern void WindCaption();
|
||||
extern void WindAreaChanged();
|
||||
extern void WindCaption(MagWindow *w, char *caption);
|
||||
extern void WindAreaChanged(MagWindow *w, Rect *area);
|
||||
extern void WindIconChanged();
|
||||
extern bool WindLoad();
|
||||
extern void WindSeparateRedisplay();
|
||||
|
|
@ -302,7 +308,7 @@ extern void WindRedisplay();
|
|||
extern void windUnlink();
|
||||
extern void windReClip();
|
||||
extern void windFree();
|
||||
extern int WindSendCommand();
|
||||
extern int WindSendCommand(MagWindow *w, TxCommand *cmd, bool quiet);
|
||||
|
||||
/* interface variables */
|
||||
extern int WindDefaultFlags; /* Mask of properties applied to new windows */
|
||||
|
|
|
|||
Loading…
Reference in New Issue