libs-gui/Headers/AppKit/NSSpeechRecognizer.h

89 lines
2.4 KiB
C
Raw Normal View History

2019-12-06 10:01:51 +00:00
/* Definition of class NSSpeechRecognizer
Copyright (C) 2019 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: Fri Dec 6 04:55:59 EST 2019
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
2019-12-06 10:01:51 +00:00
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110 USA.
2019-12-06 10:01:51 +00:00
*/
#ifndef _NSSpeechRecognizer_h_GNUSTEP_GUI_INCLUDE
#define _NSSpeechRecognizer_h_GNUSTEP_GUI_INCLUDE
#import <Foundation/NSObject.h>
#import <AppKit/AppKitDefines.h>
2019-12-06 10:01:51 +00:00
#if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
2020-02-01 08:47:21 +00:00
@protocol NSSpeechRecognizerDelegate;
2019-12-06 10:01:51 +00:00
@interface NSSpeechRecognizer : NSObject
2020-02-01 09:16:48 +00:00
{
id<NSSpeechRecognizerDelegate> _delegate;
NSArray *_commands;
NSString *_displayCommandsTitle;
BOOL _blocksOtherRecognizers;
BOOL _listensInForegroundOnly;
}
2019-12-06 10:01:51 +00:00
2020-02-01 08:47:21 +00:00
// Initialize
- (instancetype) init;
- (id<NSSpeechRecognizerDelegate>) delegate;
2020-02-01 09:16:48 +00:00
- (void) setDelegate: (id<NSSpeechRecognizerDelegate>) delegate;
2020-02-01 08:47:21 +00:00
// Configuring...
- (NSArray *) commands;
- (void) setCommands: (NSArray *)commands;
- (NSString *) displayCommandsTitle;
- (void) setDisplayCommandsTitle: (NSString *)displayCommandsTitle;
- (BOOL) listensInForegroundOnly;
2020-02-01 09:16:48 +00:00
- (void) setListensInForegroundOnly: (BOOL)listensInForegroundOnly;
2020-02-01 08:47:21 +00:00
- (BOOL) blocksOtherRecognizers;
- (void) setBlocksOtherRecognizers: (BOOL)blocksOtherRecognizers;
// Listening
- (void) startListening;
- (void) stopListening;
@end
// Protocol
@protocol NSSpeechRecognizerDelegate
- (void) speechRecognizer: (NSSpeechRecognizer *)sender
didRecognizeCommand: (NSString *)command;
2019-12-06 10:01:51 +00:00
@end
APPKIT_EXPORT NSString *GSSpeechRecognizerDidRecognizeWordNotification;
2019-12-06 10:01:51 +00:00
#if defined(__cplusplus)
}
#endif
#endif /* GS_API_MACOSX */
#endif /* _NSSpeechRecognizer_h_GNUSTEP_GUI_INCLUDE */