OSDN Git Service

no bone
[nethackexpress/trunk.git] / sys / mac / mmodal.c
1 /*      SCCS Id: @(#)mmodal.c   3.1     93/01/24                  */
2 /* Copyright (c) Jon W{tte, Hao-Yang Wang, Jonathan Handler 1992. */
3 /* NetHack may be freely redistributed.  See license for details. */
4
5 #if !TARGET_API_MAC_CARBON
6 # include <Dialogs.h>
7 # include <ControlDefinitions.h>
8 #else
9 # include <Carbon/Carbon.h>
10 #endif
11
12 #include "macpopup.h"
13
14 /* Flash a dialog button when its accelerator key is pressed */
15 void
16 FlashButton(DialogRef wind, short item) {
17         short type;
18         Handle handle;
19         Rect rect;
20         unsigned long ticks;
21
22         /* Apple recommends 8 ticks */
23         GetDialogItem(wind, item, &type, &handle, &rect);
24         HiliteControl((ControlHandle)handle, kControlButtonPart);
25         Delay(8, &ticks);
26         HiliteControl((ControlHandle)handle, 0);
27         return;
28 }
29
30