Examining An Hft Source File; Example 16.4 Examining An Hft Source File - Adobe ACROBAT SDK 8.1 Manual

Developing plug-ins and applications
Table of Contents

Advertisement

Adobe Acrobat SDK
Developing Plug-ins and Applications
enum
{
DUMMYBLANKSELECTOR,
BeepOnceSEL,
BeepTwiceSEL,
BeepNTimesSEL,
NUMSELECTORSPlusOne
};
extern HFT gMyHFT;
#define NUMSELECTORS (NUMSELECTORSPlusOne - 1)
typedef ACCBPROTO1 void (ACCBPROTO2 *BeepOnceSELPROTO)(void);
#define BeepOnce (*((BeepOnceSELPROTO)(gMyHFT[BeepOnceSEL])))
typedef ACCBPROTO1 void (ACCBPROTO2 *BeepTwiceSELPROTO)(void);
#define BeepTwice (*((BeepTwiceSELPROTO)(gMyHFT[BeepTwiceSEL])))
typedef ACCBPROTO1 void (ACCBPROTO2 *BeepNTimesSELPROTO)(ASInt32 numtimes);
#define BeepNTimes (*((BeepNTimesSELPROTO)(gMyHFT[BeepNTimesSEL])))
/* End of MyHFT.h */
Examining
The following code example shows the syntax of a source file used to create an HFT. Notice that the
methods (
BeepNTimesImplementation
notice that the
"Importing HFTs and registering for notifications" on page

Example 16.4 Examining an HFT source file

#include "corcalls.h"
#include "avcalls.h"
#include "coscalls.h"
#include "pdcalls.h"
#include "ascalls.h"
#include "myhft.h"
//Declare global variables
HFTServer gMyHFTServer = NULL;
HFT gMyHFT = NULL;
/*
** The implementation for the BeepOnce() function. Note it
** has a different name than the #define for the function
** in MyHFT.h
*/
ACCB1 void ACCB2 BeepOnceImplementation ()
{
an HFT source file
BeepOnceImplementation
) that the HFT will make available to other plug-ins are defined. Also
PluginExportHFTs
,
BeepTwiceImplementation
method is defined. For information about this method, see
29.
Working with Host Function Tables
Examining HFT header and source files
, and
171

Advertisement

Table of Contents
loading

Table of Contents