Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
Source/SVToken.h
/* |
File: SVToken.h |
Contains: |
Written by: Original version by Jon Lansdell and Nigel Humphreys. |
3.1 updates by Greg Sutton. |
Copyright: Copyright ©1995-1999 by Apple Computer, Inc., All Rights Reserved. |
You may incorporate this Apple sample source code into your program(s) without |
restriction. This Apple sample source code has been provided "AS IS" and the |
responsibility for its operation is yours. You are not permitted to redistribute |
this Apple sample source code as "Apple sample source code" after having made |
changes. If you're going to re-distribute the source, we require that you make |
it clear in the source that the code was descended from Apple sample source |
code, but that you've made changes. |
Change History (most recent first): |
7/19/1999 Karl Groethe Updated for Metrowerks Codewarror Pro 2.1 |
*/ |
#ifndef __SVTOKEN__ |
#define __SVTOKEN__ |
#include <AppleEvents.h> |
#include <AEObjects.h> |
#include <AERegistry.h> |
#include <Processes.h> |
#define pText 'TEXT' |
// Text Properties |
#define pLength 'leng' |
#define pOffset 'ofse' |
// Window Properties - See the Registry for Details |
#define pPosition 'ppos' |
#define pPageSetup 'PSET' // One of ours - Not in registry |
#define pGXPageSetup 'TFGX' // One of ours - Not in registry |
//#define pShowBorders 'PBOR' // Another of ours |
#define typeTPrint 'TPNT' // A raw TPrint record - also one of ours |
#define typeTGXPrint 'TPGX' // A raw flattened GX Job - also one of ours |
// Error Codes |
#define kAEGenericErr -1799 // ??? |
// Private AEObject definitions |
#define typeMyAppl 'BAPP' // sig of my private token type for the app - AppToken |
#define typeMyWndw 'BWIN' // sig of my private token type for windows - windowToken |
#define typeMyText 'BTXT' // sig of my private token type for text - textToken |
#define typeMyTextProp 'BPRP' // sig of my private token type for text properties - TextPropToken |
#define typeMyWindowProp 'WPRP' // sig of my private token type for window properties - WindowPropToken |
#define typeMyApplProp 'APRP' // sig of my private token type for appl properties - ApplPropToken |
// These are entirely private to our app - used only when resolving the object specifier |
typedef ProcessSerialNumber AppToken; |
struct ApplPropToken |
{ |
AppToken tokenApplToken; |
DescType tokenApplProperty; |
}; |
typedef struct ApplPropToken ApplPropToken; |
struct WindowToken |
{ |
WindowPtr tokenWindow; |
}; |
typedef struct WindowToken WindowToken; |
struct WindowPropToken |
{ |
WindowToken tokenWindowToken; |
DescType tokenProperty; |
}; |
typedef struct WindowPropToken WindowPropToken; |
struct TextToken |
{ |
WindowPtr tokenWindow; |
short tokenOffset; |
short tokenLength; |
}; |
typedef struct TextToken TextToken; |
struct TextPropToken |
{ |
TextToken tokenTextToken; |
DescType tokenProperty; |
}; |
typedef struct TextPropToken TextPropToken; |
#endif |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-07-22