ftp.nice.ch/pub/next/unix/developer/previewPuppet.N.bs.tar.gz#/previewPuppet/Puppeteer.h

This is Puppeteer.h in view mode; [Download] [Up]

#import <appkit/appkit.h>

@interface Puppeteer:Object
{
	char *appName;		// The application name
	id appSpeaker;		// The main puppet speaker
	id journalSpeaker;	// The puppet's journal speaker
	port_t appPort;		// Port used by appSpeaker
	BOOL enabled;		// YES if strings are attached
	int pid;		// The application's pid
	int context;		// The application's postscript context
}

/*
 * Return an instance of puppeteer connected to the given app, or nil on failure.
 */
+ connectToApp:(const char *)theName launch:(BOOL)launch;
/*
 * Connect to the specified app. Returns YES on success.
 */
- (BOOL)connectToApp:(const char *)theName launch:(BOOL)launch;
/*
 * This is the method which actually posts the events to the puppet.
 */
- postEvent:(NXEvent *)event;
/*
 * Post a string to the puppet's key window.
 */
- postKeyboardString:(const char *)keyString flags:(int)flags;
/*
 * Post a keyboard event.
 */
- postKeyboardEvent:(int)eventType window:(int)window flags:(int)flags 
	charCode:(char)charCode;
/*
 * Uses postKeyboardEvent to send key down and key up events for the given character.
 */
- postKeyCode:(char)charCode window:(int)window flags:(int)flags;
/*
 * Post a mouse event.
 */
- postMouseEvent:(int)eventType window:(int)window flags:(int)flags 
	x:(double)x y:(double)y click:(int)click;
/*
 * Post events for a single mouse click.
 */
- postSingleClick:(int)window flags:(int)flags x:(double)x y:(double)y;
- postDoubleClick:(int)window flags:(int)flags x:(double)x y:(double)y;
- postTripleClick:(int)window flags:(int)flags x:(double)x y:(double)y;
/*
 * Activate/deactivate the application.
 */
- postActivate:(BOOL)activate;
/*
 * Drag the given window. Pseudo window numbers may be specified.
 */
- dragWindow:(int)winNumber deltaX:(double)x deltaY:(double)y;
/*
 * Return the application's pid.
 */
- (int)getPid;
/*
 * Returns a list of this application's windows. A new list is created each time this
 * method is called, and it is the caller's responsibility to free it and it's contents.
 * Each object is of the WindowInfo class.
 */
- windowList;
/*
 * Returns the application's postscript context.
 */
- (int)getContext;
/*
 * Return the number of windows belonging to puppet.
 */
- (int)windowCount;
/*
 * The following three methods return a WindowInfo object corresponding to NX_KEYWINDOW,
 * NX_MAINWINDOW and NX_MAINMENU respectively.
 */
- keyWindow;
- mainWindow;
- mainMenu;
/*
 * Returns a WindowInfo object for the given pseudo window number (eg NX_KEYWINDOW),
 * or nil if it can't be determined.
 */
- windowForPseudoNumber:(int)pseudoNumber;
/*
 * Attach strings to puppet. This must be called before events can be posted to it.
 */
- attachStrings;
/*
 * Release strings from puppet. This must be called to enable the application to once
 * more respond to real user events.
 */
- releaseStrings;
- ping;
- appSpeaker;

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.