source: releases/Pester/1.1b7/Source/PSTimer.h@ 658

Last change on this file since 658 was 61, checked in by Nicholas Riley, 22 years ago

Pester 1.1b1.

PSPowerManager: Fixed delegate method selectors to better reflect what
is going on (Apple's docs in IOKit Fundamentals help with this; the
kIOMessage*Sleep constants are really poorly named).

VERSION: Updated for 1.1b1.

PSSpeechAlert.h: Fixed company name.

PSAlert.[hm]: Added -prepareForAlarm: to support PSWakeAlert.

PSTimer.[hm]: Replacement for NSTimer that works properly across
sleep/wake cycles and will schedule wake timers.

PSAlerts.[hm]: Added -prepareForAlarm: to support PSWakeAlert.

Read Me.rtfd: Updated for 1.1b1.

PSAlarm.[hm]: Added -setWakeUp:, invoke -[PSAlerts prepareForAlarm],
replaced alarm timer NSTimer with PSTimer.

PSApplication.[hm]: Replaced dock update timer NSTimer with PSTimer.
Uncovered some issues, need to fix later. Enable alarm discard for
beta release.

PSWakeAlert.[hm]: Shared alert implementation for wakeup. Doesn't do
anything at trigger time, but uses new preparation interface to work
at alarm set time (should work for repeating alarms too, but I didn't
bother to test...)

PSAlarmSetController.m: Added support for PSWakeAlert. Save default
alert information on quit. Removed debug statements on hide/unhide;
it works fine regardless of whether the app is explicitly hidden or
the window hides itself.

PSAlarms.m: PSTimer support - invoke +[PSTimer setUp] to initialize
timer list.

File size: 1.3 KB
Line 
1//
2// PSTimer.h
3// Pester
4//
5// Created by Nicholas Riley on Sun Jan 05 2003.
6// Copyright (c) 2003 Nicholas Riley. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10
11
12@interface PSTimer : NSObject {
13 BOOL isValid;
14 BOOL repeats;
15 BOOL isWakeUp;
16 NSDate *fireDate;
17 NSTimeInterval timeInterval;
18 NSInvocation *invocation;
19 id userInfo;
20}
21
22+ (void)setUp;
23
24// partial emulation of Mac OS X 10.1 NSTimer interface
25// + (PSTimer *)timerWithTimeInterval:(NSTimeInterval)ti invocation:(NSInvocation *)invocation repeats:(BOOL)yesOrNo;
26// + (PSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti invocation:(NSInvocation *)invocation repeats:(BOOL)yesOrNo;
27
28// + (PSTimer *)timerWithTimeInterval:(NSTimeInterval)ti target:(id)aTarget selector:(SEL)aSelector userInfo:(id)userInfo repeats:(BOOL)yesOrNo;
29+ (PSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti target:(id)aTarget selector:(SEL)aSelector userInfo:(id)userInfo repeats:(BOOL)yesOrNo;
30
31// - (void)fire;
32
33- (NSDate *)fireDate;
34
35// - (NSTimeInterval)timeInterval; // NSTimer’s version returns 0 once timer is scheduled
36
37- (void)invalidate;
38- (BOOL)isValid;
39
40- (id)userInfo;
41
42// other methods
43
44- (BOOL)isWakeUp;
45- (void)setWakeUp:(BOOL)doWake;
46
47- (NSComparisonResult)compare:(PSTimer *)other;
48
49@end
Note: See TracBrowser for help on using the repository browser.