Define | ||
---|---|---|
ASExtensionMgrGetHFT | ||
HFTCallReplacedEntry | ||
HFTEntryReplaceable
A flag that specifies whether an HFT entry is replaceable:
If the flag is set, the new entry can be replaced. Clients should generally use this value, allowing other clients to subsequently replace the method again.
If the flag is not set, the new entry cannot be replaced.
|
||
HFT_ERROR_NO_VERSION | ||
kHFT_IN_BETA_FLAG |
Typedef | ||
---|---|---|
HFT
An object that describes a set of exported functions. It is an array of function pointers, where the first element is unused.
|
||
HFTData | ||
HFTDataRec | ||
HFTEntry
An HFTEntry may be cast to a pointer to a function whose prototype must be provided by the HFT's description file.
|
||
HFTLocations | ||
HFTServer
Each HFT is serviced by an HFT server. The HFT server is responsible for handling requests to obtain or destroy its HFT. An HFTServer is an object that manages several versions of an HFT for different clients which may have been compiled with different versions of the HFT's API.
|
Structure | ||
---|---|---|
_t_HFTData
A data structure to pass to an HFT server to create a new HFT. New in Acrobat 6.0.
|
||
_t_HFTLocations |
Callback | ||
---|---|---|
HFTServerDestroyProc
A callback for an HFT server. This destroys the specified HFT (for example, by calling HFTServerDestroy()).
|
||
HFTServerProvideHFTProc
A callback for an HFT server. This returns an HFT with the specified version number. If the HFT has not yet been created, create and return it. If the HFT already exists, do not create a new copy of it; simply return the existing copy.
|
Method | ||
---|---|---|
Gets the specified version of the Host Function Table (HFT) that has the specified name. If you want to get one of the Acrobat viewer's built-in HFTs, use the predefined global variables for the HFT Values instead of this method.
|
||
void HFTDestroy(HFT hft)
Destroys an existing HFT by freeing all the HFT's memory. Call this method only if you are absolutely sure that neither your plug-in nor any other plug-in will use the HFT again. Because this is usually impossible to know, plug-ins should not destroy HFTs. It is even dangerous to destroy an HFT at unload time, because the order in which plug-ins are unloaded is not specified.
|
||
Gets the HFTEntry that was replaced by the specified HFTEntry in the specified entry. Plug-ins should generally not use this method directly, but use the CALL_REPLACED_PROC macro instead.
|
||
ASVersion HFTGetVersion(HFT hft)
Returns the version of the HFT, if available.
|
||
ASBool HFTIsValid(HFT hft)
Tests whether an HFT is valid.
|
||
Obsolete. See HFTNewEx(). Creates a new HFT by calling the specified HFT server's HFTServerProvideHFTProc().
|
||
Extends HFTNew() with version information in Acrobat 6. Creates a new HFT by calling the specified HFT server's HFTServerProvideHFTProc().
|
||
Replaces the specified entry in the specified HFT. This allows a plug-in to override and replace certain methods in Acrobat's API. See Replaceable Methods for a list of replaceable methods. This method can be used from anywhere in the plug-in, but it makes the most sense for most plug-ins to replace methods in the importReplaceAndRegisterCallback() procedure. Plug-ins register their HFTs in the export callback, but the code to populate the function table is only executed when the first client requests the HFT.
|
||
void HFTReplaceEntryEx(HFT hft, Selector sel, HFTEntry newEntry, ASExtension extension, ASFlagBits flags)
A new version of HFTReplaceEntry() that adds the extension argument.
|
||
void HFTServerDestroy(HFTServer hftServer)
Destroys an HFT server. Call this method only if the HFT will not be used again.
|
||
HFTServer HFTServerNew(const char* name, HFTServerProvideHFTProc serverProc, HFTServerDestroyProc destroyProc, void* clientData)
Creates a new Host Function Table (HFT) server. An HFT server is responsible for creating an instance of an HFT with the specified version number, and destroying the HFT.
|
||
Removes the oldEntry item from hft at sel if the extension fields match. It allows HFT replacements to be undone in cases such as with the DigSig plug-in, which replaces a method that Acrobat could use after DigSig unloads.
|
ASExtensionMgrGetHFT |
Product availability: PDFL |
Platform availability: Macintosh, Windows, UNIX |
#define ASExtensionMgrGetHFT ASGetHFTByNameAndVersion
File: CorCalls.h |
Line: 356 |
HFT_ERROR_NO_VERSION |
Product availability: All |
Platform availability: All |
#define HFT_ERROR_NO_VERSION (0xFFFFFFFF)
File: ASExpT.h |
Line: 559 |
HFTCallReplacedEntry |
Product availability: Acrobat, Reader |
Platform availability: Macintosh, Windows, UNIX |
#define HFTCallReplacedEntry (*((sel##PROTO)(HFTGetReplacedEntry((hft), sel, (oldProc)))))
File: ASCalls.h |
Line: 524 |
HFTEntryReplaceable |
Product availability: All |
Platform availability: All |
#define HFTEntryReplaceable (0x00000001)
A flag that specifies whether an HFT entry is replaceable:
If the flag is set, the new entry can be replaced. Clients should generally use this value, allowing other clients to subsequently replace the method again.
If the flag is not set, the new entry cannot be replaced.
See Also
File: CoreExpT.h |
Line: 177 |
kHFT_IN_BETA_FLAG |
Product availability: All |
Platform availability: All |
#define kHFT_IN_BETA_FLAG 0x80000000
File: CoreExpT.h |
Line: 164 |
HFT |
Product availability: All |
Platform availability: All |
typedef HFTEntry HFT;
An object that describes a set of exported functions. It is an array of function pointers, where the first element is unused.
File: CoreExpT.h |
Line: 161 |
HFTData |
Product availability: All |
Platform availability: All |
typedef HFTDataRec HFTData;
File: ASExpT.h |
Line: 581 |
HFTDataRec |
Product availability: All |
Platform availability: All |
typedef _t_HFTData HFTDataRec;
File: ASExpT.h |
Line: 580 |
HFTEntry |
Product availability: All |
Platform availability: All |
typedef void* HFTEntry;
An HFTEntry may be cast to a pointer to a function whose prototype must be provided by the HFT's description file.
File: CoreExpT.h |
Line: 150 |
HFTLocations |
Product availability: All |
Platform availability: All |
typedef _t_HFTLocations HFTLocations;
File: PDFLInitHFT.h |
Line: 86 |
HFTServer |
Product availability: All |
Platform availability: All |
typedef struct _t_HFTServer* HFTServer;
Each HFT is serviced by an HFT server. The HFT server is responsible for handling requests to obtain or destroy its HFT. An HFTServer
is an object that manages several versions of an HFT for different clients which may have been compiled with different versions of the HFT's API.
See Also
File: ASExpT.h |
Line: 589 |
_t_HFTData |
Product availability: All |
Platform availability: All |
A data structure to pass to an HFT server to create a new HFT. New in Acrobat 6.0.
See Also
File: ASExpT.h |
Line: 567 |
size | Set to |
|
numSelectors | The number of entries in the new HFT. This determines the number of methods that the HFT can contain; each method occupies one entry. |
|
version | The version number. |
|
hftProcs | Optional. This should point to an HFT array of function pointers. |
_t_HFTLocations |
Product availability: All |
Platform availability: All |
struct _t_HFTLocations {
ASUns8 dummy;
}
File: PDFLInitHFT.h |
Line: 36 |
HFTServerDestroyProc |
Product availability: All |
Platform availability: All |
A callback for an HFT server. This destroys the specified HFT (for example, by calling HFTServerDestroy()).
See Also
File: ASExpT.h |
Line: 616 |
HFTServerProvideHFTProc |
Product availability: All |
Platform availability: All |
A callback for an HFT server. This returns an HFT with the specified version number. If the HFT has not yet been created, create and return it. If the HFT already exists, do not create a new copy of it; simply return the existing copy.
See Also
File: ASExpT.h |
Line: 606 |
ASExtensionMgrGetHFT | () |
Product availability: All |
Platform availability: All |
Gets the specified version of the Host Function Table (HFT) that has the specified name. If you want to get one of the Acrobat viewer's built-in HFTs, use the predefined global variables for the HFT Values instead of this method.
Parameters
name — | ||
version — |
See Also
Since
File: CorProcs.h |
Line: 218 |
HFTDestroy | () |
Product availability: All |
Platform availability: All |
void HFTDestroy(HFT hft)
Destroys an existing HFT by freeing all the HFT's memory. Call this method only if you are absolutely sure that neither your plug-in nor any other plug-in will use the HFT again. Because this is usually impossible to know, plug-ins should not destroy HFTs. It is even dangerous to destroy an HFT at unload time, because the order in which plug-ins are unloaded is not specified.
Parameters
hft — | The HFT to destroy. |
See Also
Since
File: ASProcs.h |
Line: 235 |
HFTGetReplacedEntry | () |
Product availability: All |
Platform availability: All |
Gets the HFTEntry that was replaced by the specified HFTEntry in the specified entry. Plug-ins should generally not use this method directly, but use the CALL_REPLACED_PROC
macro instead.
It is necessary to specify both a selector (the index of an entry in the HFT's table of callback pointers) and an HFTEntry (a callback pointer) because a method may be replaced several times, and the various replacement methods are kept in a linked list. The selector determines which linked list is examined, and the HFTEntry determines the entry in the linked list to return.
Parameters
hft — | The HFT in which a replaced entry is retrieved. See HFTReplaceEntry() for more information. |
|
sel — | The selector whose previous value is obtained. See HFTReplaceEntry() for more information. |
|
oldEntry — |
The entry present prior to being replaced. |
See Also
Since
File: ASProcs.h |
Line: 309 |
HFTGetVersion | () |
Product availability: All |
Platform availability: All |
Returns the version of the HFT, if available.
Parameters
hft — |
The version number if the HFT is valid and the version is available, |
See Also
Since
File: ASProcs.h |
Line: 2469 |
HFTIsValid | () |
Product availability: All |
Platform availability: All |
Tests whether an HFT is valid.
Parameters
hft — | IN/OUT The HFT to test. |
|
Since
File: ASProcs.h |
Line: 1555 |
HFTNew | () |
Product availability: All |
Platform availability: All |
Obsolete. See HFTNewEx(). Creates a new HFT by calling the specified HFT server's HFTServerProvideHFTProc().
Parameters
hftServer — | The HFT server for the HFT being created. The HFT server must have been created previously using HFTServerNew(). |
|
numSelectors — | The number of entries in the new HFT. This determines the number of methods that the HFT can contain; each method occupies one entry. |
The newly created HFT. |
See Also
Since
File: ASProcs.h |
Line: 221 |
HFTNewEx | () |
Product availability: All |
Platform availability: All |
Extends HFTNew() with version information in Acrobat 6. Creates a new HFT by calling the specified HFT server's HFTServerProvideHFTProc().
Parameters
hftServer — | The HFT server for the HFT being created. The HFT server must have been created previously using HFTServerNew(). |
|
data — | The data to pass to the server, which includes:
|
The newly created HFT. |
See Also
Since
File: ASProcs.h |
Line: 2494 |
HFTReplaceEntry | () |
Product availability: All |
Platform availability: All |
void HFTReplaceEntry(HFT hft, Selector sel, HFTEntry newEntry, ASFlagBits flags)
Replaces the specified entry in the specified HFT. This allows a plug-in to override and replace certain methods in Acrobat's API. See Replaceable Methods for a list of replaceable methods. This method can be used from anywhere in the plug-in, but it makes the most sense for most plug-ins to replace methods in the importReplaceAndRegisterCallback() procedure. Plug-ins register their HFTs in the export callback, but the code to populate the function table is only executed when the first client requests the HFT.
Plug-ins can use the REPLACE
macro instead of calling HFTReplaceEntry() directly.
All plug-ins, and Acrobat itself, share a single copy of each HFT. As a result, when a plug-in replaces the implementation of a method, all other plug-ins and Acrobat also use the new implementation of that method. In addition, once a method's implementation has been replaced, there is no way to remove the new implementation without restarting Acrobat.
Parameters
hft — | The HFT in which a method is replaced. Use ASExtensionMgrGetHFT() to get the HFT, given its name. For the HFTs built into the Acrobat viewer, global variables containing the HFTs have been defined, so you can skip calling ASExtensionMgrGetHFT() for these HFTs. |
|
sel — | The entry in the HFT to replace, derived from the method's name by appending |
|
newEntry — | The function to replace the current one. The function pointer must be converted to an HFTEntry using the ASCallbackCreateReplacement() macro. |
|
flags — | The new entry's properties. Currently, only HFTEntryReplaceable is defined. |
See Also
Exceptions
Since
File: ASProcs.h |
Line: 282 |
HFTReplaceEntryEx | () |
Product availability: All |
Platform availability: All |
void HFTReplaceEntryEx(HFT hft, Selector sel, HFTEntry newEntry, ASExtension extension, ASFlagBits flags)
A new version of HFTReplaceEntry() that adds the extension argument.
Plug-ins can use the REPLACE macro instead of calling HFTReplaceEntryEx directly.
Parameters
hft — | The HFT in which a method is replaced. Use ASExtensionMgrGetHFT() to get the HFT, given its name. For the HFTs built into the Acrobat viewer, global variables containing the HFTs have been defined, so you can skip calling ASExtensionMgrGetHFT() for these HFTs. |
|
sel — | The entry in the HFT to replace, derived from the method's name by appending |
|
newEntry — | The function to replace the current one. The function pointer must be converted to an HFTEntry using the ASCallbackCreateReplacement() macro. |
|
extension — | Plug-ins should pass in |
|
flags — | The new entry's properties. Currently, only |
See Also
Exceptions
Since
File: ASProcs.h |
Line: 2071 |
HFTServerDestroy | () |
Product availability: All |
Platform availability: All |
void HFTServerDestroy(HFTServer hftServer)
Destroys an HFT server. Call this method only if the HFT will not be used again.
Parameters
hftServer — | IN/OUT The HFT server to destroy. |
See Also
Since
File: ASProcs.h |
Line: 203 |
HFTServerNew | () |
Product availability: All |
Platform availability: All |
HFTServer HFTServerNew(const char* name, HFTServerProvideHFTProc serverProc, HFTServerDestroyProc destroyProc, void* clientData)
Creates a new Host Function Table (HFT) server. An HFT server is responsible for creating an instance of an HFT with the specified version number, and destroying the HFT.
Parameters
name — | ||
serverProc — | (Required) A user-supplied callback that provides an HFT when given a version number. This procedure is called by ASExtensionMgrGetHFT() when another plug-in imports the HFT. |
|
destroyProc — | (Optional) A user-supplied callback that destroys the specified HFT (this generally means deallocating the memory associated with the HFT). This procedure is called by HFTDestroy(). |
|
clientData — |
The newly created HFT server. |
See Also
Since
File: ASProcs.h |
Line: 193 |
HFTUnreplaceEntry | () |
Product availability: All |
Platform availability: All |
void HFTUnreplaceEntry(HFT hft, Selector sel, HFTEntry oldEntry, ASExtension extension)
Removes the oldEntry
item from hft
at sel
if the extension fields match. It allows HFT replacements to be undone in cases such as with the DigSig plug-in, which replaces a method that Acrobat could use after DigSig unloads.
Parameters
hft — | The HFT in which a method is un-replaced. Use ASExtensionMgrGetHFT() to get the HFT, given its name. For the HFTs built into the Acrobat viewer, global variables containing the HFTs have been defined, so you can skip calling ASExtensionMgrGetHFT() for these HFTs. |
|
sel — | The entry in the HFT to un-replace, derived from the method's name by appending |
|
oldEntry — | The old function to be replaced. The function pointer must be converted to an HFTEntry using the ASCallbackCreateReplacement() macro. |
|
extension — | An object of type ASExtension. |
See Also
Since
File: ASProcs.h |
Line: 2098 |