Files
nethack/sys/mac/mmodal.c
Sean Hunt 97d6fade74 Reformat all C files.
I'll push a formatting guide at some point. There may still be
outstanding changes, but please feel free to resolve those as you arrive
a them.

To the best of my knowledge, there is no changes to the actual code
content, but the formatter does have the occasional bug. If you run into
an issue, please fix it!
2015-05-09 13:43:16 -04:00

32 lines
949 B
C

/* NetHack 3.6 mmodal.c $NHDT-Date: 1431192785 2015/05/09 17:33:05 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */
/* NetHack 3.6 mmodal.c $Date: 2009/05/06 10:49:18 $ $Revision: 1.7 $ */
/* SCCS Id: @(#)mmodal.c 3.5 1993/01/24 */
/* Copyright (c) Jon W{tte, Hao-Yang Wang, Jonathan Handler 1992. */
/* NetHack may be freely redistributed. See license for details. */
#if 1 /*!TARGET_API_MAC_CARBON*/
#include <Dialogs.h>
#include <ControlDefinitions.h>
#else
#include <Carbon/Carbon.h>
#endif
#include "macpopup.h"
/* Flash a dialog button when its accelerator key is pressed */
void
FlashButton(DialogRef wind, short item)
{
short type;
Handle handle;
Rect rect;
unsigned long ticks;
/* Apple recommends 8 ticks */
GetDialogItem(wind, item, &type, &handle, &rect);
HiliteControl((ControlHandle) handle, kControlButtonPart);
Delay(8, &ticks);
HiliteControl((ControlHandle) handle, 0);
return;
}