LayerAV_Layer
ObjectWindows

Windows-specific utility methods are only available for plug-ins.

These methods allow a plug-in to:



Define Summary
 Define
 ACROCALLBACK (UNIX)
 ACROCALLBACK (Windows)
A macro used when declaring function prototypes. Its definition is platform-dependent. Use this macro in every function prototype you declare. Use before the return value in a function prototype.
 ACROCALLBACKPROTO (Windows)
 ACROEXPORT (UNIX)
 ACROEXPORT (Windows)
A macro used when declaring callback functions. Its definition is platform-dependent. Use this macro in every callback function you declare. Use before the return value in a function declaration.
 ACROEXPORTCDECL (UNIX)
 ACROEXPORTCDECL (Windows)
 ACROEXPORTDATA (UNIX)
 ACROEXPORTDATA (Windows)
 ACROEXPORTDATA1 (UNIX)
 ACROEXPORTDATA2 (UNIX)
 ACROEXPORTPRIV (UNIX)
 ACROEXPORTPRIV (Windows)
 ACROIMPORTDATA (Windows)
 ACROIMPORTDATA1 (UNIX)
 ACROIMPORTDATA1 (Windows)
 ACROIMPORTDATA2 (UNIX)
 ACROIMPORTDATA2 (Windows)
 ANSI_C (Windows)
 AS_LITTLEENDIAN (Macintosh)
 AS_LITTLEENDIAN (UNIX)
 AS_LITTLEENDIAN (Windows)
 AVEX1 (UNIX)
 AVEX1 (Windows)
 AVEX2 (UNIX)
 AVEX2 (Windows)
 CAROUSEL (Windows)
 ENVIRONMENT (Windows)
 FRACT_DEFINED (UNIX)
 FRACT_DEFINED (Windows)
 HUGEPTRTYPE (UNIX)
 HUGEPTRTYPE (Windows)
 IEEEFLOAT (Macintosh)
 IEEEFLOAT (UNIX)
 IEEEFLOAT (Windows)
 IEEESOFT (Macintosh)
 IEEESOFT (UNIX)
 IEEESOFT (Windows)
 MEMCPY_IMPLEMENTED (Windows)
 MEMSET_IMPLEMENTED (Windows)
 nENDLINE_CHARS (UNIX)
 nENDLINE_CHARS (Windows)
 nENDLINE_CHARS_UCS (UNIX)
 REPLACEABLE (UNIX)
 REPLACEABLE (Windows)
 sENDLINE (UNIX)
 sENDLINE (Windows)
 sENDLINE_UCS (UNIX)
 WIN (Windows)
 WINAPI (Windows)
 WINDOWS (Windows)
 _WINHFT_IS_BETA (Windows)
 _WINHFT_LATEST_VERSION (Windows)
 WINHFT_LATEST_VERSION (Windows)
 WINHFT_VERSION_4 (Windows)
 WINHFT_VERSION_5 (Windows)
 WINHFT_VERSION_8 (Windows)
 WINHFT_VERSION_9 (Windows)
 WIN_PLATFORM (Windows)
(Windows only, previously known as WIN_ENV) Defined if the client is being compiled for a Windows machine, undefined otherwise. MAC_PLATFORM, WIN_PLATFORM, and UNIX_PLATFORM should be used by client developers to conditionally compile platform-dependent code.
Typedef Summary
 Typedef
 COMServer (Windows)
 COMServerRec (Windows)
Structure Summary
 Structure
 _t_COMServer (Windows)
Callback Summary
 Callback
 COMServerGetIDispatchProcType (Windows)
 COMServerGetIDispatchProcTypeEx (Windows)
 COMServerGetNameProcType (Windows)
 COMServerGetNameProcTypeEx (Windows)
Method Summary
 Method
 
BOOL WinAppEnableIdleTimer(BOOL enable)
(Windows only) Allows a plug-in to turn the AVAppIdle timer on and off, which is needed when a plug-in calls another process and thus blocks Acrobat for an extended period of time.
 
(Windows only) Gets appropriate parent for any modal dialog boxes created by a plug-in. This method is only useful if there is an AVDoc; it cannot be used, for example, to put up a modal dialog box while a file is being opened.
 
(Windows only) Gets the appropriate parent for any modeless dialog boxes created by a plug-in.
 
HPALETTE WinAppGetPalette()
(Windows only) Gets the application's color palette in the case where the system is running in 256-color mode or less. Used when you want to set and realize a palette in an external window before drawing to it.
 
Gets the device context for a printer, which is the HDC used to print a document.
 
void WinAppLockViewer(BOOL lock)
This API is used to ensure that the application does not quit until the work that needs to be done by the interface registered with WinAppRegisterInterface() is done.
 
(Windows only) Register a COM interface.
 
(Windows only) Registers modeless dialog boxes with the viewer so that the dialog box gets the correct messages.
 
(Windows only) Unregisters a COM interface.
 
(Windows only) Un-registers modeless dialog boxes with the viewer.
Defines Detail
_WINHFT_IS_BETA 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define _WINHFT_IS_BETA 0

File: WinCalls.h
Line: 87
_WINHFT_LATEST_VERSION 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define _WINHFT_LATEST_VERSION 0x00090000

File: WinCalls.h
Line: 86
ACROCALLBACK 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define ACROCALLBACK

File: UnixPlatform.h
Line: 104
ACROCALLBACK 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define ACROCALLBACK __loadds

Description

A macro used when declaring function prototypes. Its definition is platform-dependent. Use this macro in every function prototype you declare. Use before the return value in a function prototype.

See Also


ACCB2
A macro used when declaring function prototypes. Its definition is platform-dependent. Use this macro in every function prototype you declare. Use after the return value in a function prototype.

ACCB2

File: WinPltfm.h
Line: 106
ACROCALLBACKPROTO 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define ACROCALLBACKPROTO

File: WinPltfm.h
Line: 68
ACROEXPORT 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define ACROEXPORT

File: UnixPlatform.h
Line: 100
ACROEXPORT 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define ACROEXPORT AVEX1

Description

A macro used when declaring callback functions. Its definition is platform-dependent. Use this macro in every callback function you declare. Use before the return value in a function declaration.

See Also


File: WinPltfm.h
Line: 122
ACROEXPORTCDECL 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define ACROEXPORTCDECL

File: UnixPlatform.h
Line: 101
ACROEXPORTCDECL 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define ACROEXPORTCDECL __cdecl __loadds __export

File: WinPltfm.h
Line: 140
ACROEXPORTDATA 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define ACROEXPORTDATA

File: UnixPlatform.h
Line: 102
ACROEXPORTDATA 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define ACROEXPORTDATA __export

File: WinPltfm.h
Line: 141
ACROEXPORTDATA1 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define ACROEXPORTDATA1

File: UnixPlatform.h
Line: 121
ACROEXPORTDATA2 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define ACROEXPORTDATA2

File: UnixPlatform.h
Line: 122
ACROEXPORTPRIV 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define ACROEXPORTPRIV

File: UnixPlatform.h
Line: 103
ACROEXPORTPRIV 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define ACROEXPORTPRIV __loadds __export

File: WinPltfm.h
Line: 139
ACROIMPORTDATA 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define ACROIMPORTDATA extern

File: WinPltfm.h
Line: 142
ACROIMPORTDATA1 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define ACROIMPORTDATA1

File: UnixPlatform.h
Line: 123
ACROIMPORTDATA1 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define ACROIMPORTDATA1

File: WinPltfm.h
Line: 143
ACROIMPORTDATA2 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define ACROIMPORTDATA2

File: UnixPlatform.h
Line: 124
ACROIMPORTDATA2 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define ACROIMPORTDATA2

File: WinPltfm.h
Line: 144
ANSI_C 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define ANSI_C 1

File: WinPltfm.h
Line: 181
AS_LITTLEENDIAN 
Product availability: Acrobat, Reader
Platform availability: Macintosh

Syntax

#define AS_LITTLEENDIAN TARGET_RT_LITTLE_ENDIAN

File: MacPlatform.h
Line: 24
AS_LITTLEENDIAN 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define AS_LITTLEENDIAN 0

File: UnixPlatform.h
Line: 79
AS_LITTLEENDIAN 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define AS_LITTLEENDIAN 1

File: WinPltfm.h
Line: 26
AVEX1 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define AVEX1

File: UnixPlatform.h
Line: 109
AVEX1 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define AVEX1

File: WinPltfm.h
Line: 64
AVEX2 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define AVEX2

File: UnixPlatform.h
Line: 110
AVEX2 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define AVEX2 __export

File: WinPltfm.h
Line: 65
CAROUSEL 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define CAROUSEL 1

File: WinPltfm.h
Line: 180
ENVIRONMENT 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define ENVIRONMENT h"

File: WinPltfm.h
Line: 179
FRACT_DEFINED 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define FRACT_DEFINED 0

File: UnixPlatform.h
Line: 90
FRACT_DEFINED 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define FRACT_DEFINED 0

File: WinPltfm.h
Line: 30
HUGEPTRTYPE 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define HUGEPTRTYPE

File: UnixPlatform.h
Line: 94
HUGEPTRTYPE 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define HUGEPTRTYPE __huge

File: WinPltfm.h
Line: 48
IEEEFLOAT 
Product availability: Acrobat, Reader
Platform availability: Macintosh

Syntax

#define IEEEFLOAT 0

File: MacPlatform.h
Line: 25
IEEEFLOAT 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define IEEEFLOAT 1

File: UnixPlatform.h
Line: 68
IEEEFLOAT 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define IEEEFLOAT 0

File: WinPltfm.h
Line: 27
IEEESOFT 
Product availability: Acrobat, Reader
Platform availability: Macintosh

Syntax

#define IEEESOFT 0

File: MacPlatform.h
Line: 26
IEEESOFT 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define IEEESOFT 0

File: UnixPlatform.h
Line: 87
IEEESOFT 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define IEEESOFT 0

File: WinPltfm.h
Line: 28
MEMCPY_IMPLEMENTED 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define MEMCPY_IMPLEMENTED 1

File: WinPltfm.h
Line: 37
MEMSET_IMPLEMENTED 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define MEMSET_IMPLEMENTED 1

File: WinPltfm.h
Line: 36
nENDLINE_CHARS 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define nENDLINE_CHARS 1

File: UnixPlatform.h
Line: 95
nENDLINE_CHARS 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define nENDLINE_CHARS 2

File: WinPltfm.h
Line: 52
nENDLINE_CHARS_UCS 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define nENDLINE_CHARS_UCS 2

File: UnixPlatform.h
Line: 97
REPLACEABLE 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define REPLACEABLE

File: UnixPlatform.h
Line: 99
REPLACEABLE 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define REPLACEABLE

File: WinPltfm.h
Line: 55
sENDLINE 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define sENDLINE "\n"

File: UnixPlatform.h
Line: 96
sENDLINE 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define sENDLINE "\015\012"

File: WinPltfm.h
Line: 53
sENDLINE_UCS 
Product availability: Acrobat, Reader
Platform availability: UNIX

Syntax

#define sENDLINE_UCS "\0\n"

File: UnixPlatform.h
Line: 98
WIN 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define WIN 1

File: WinPltfm.h
Line: 182
WIN_PLATFORM 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define WIN_PLATFORM 1

Description

(Windows only, previously known as WIN_ENV) Defined if the client is being compiled for a Windows machine, undefined otherwise. MAC_PLATFORM, WIN_PLATFORM, and UNIX_PLATFORM should be used by client developers to conditionally compile platform-dependent code.

WIN_PLATFORM must be defined in the arguments to the C compiler. The make files for the sample clients in the Acrobat SDK do this automatically.

See Also


File: WinPltfm.h
Line: 156
WINAPI 
Product availability: Acrobat, Reader, PDFL
Platform availability: Windows

Syntax

#define WINAPI _far _pascal

File: PIExcept.h
Line: 45
WINDOWS 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define WINDOWS h>

File: AVExpT.h
Line: 58
WINHFT_LATEST_VERSION 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define WINHFT_LATEST_VERSION _WINHFT_LATEST_VERSION)

File: WinCalls.h
Line: 90
WINHFT_VERSION_4 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define WINHFT_VERSION_4 0x00040000

File: WinCalls.h
Line: 92
WINHFT_VERSION_5 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define WINHFT_VERSION_5 0x00050000

File: WinCalls.h
Line: 93
WINHFT_VERSION_8 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define WINHFT_VERSION_8 0x00080000

File: WinCalls.h
Line: 94
WINHFT_VERSION_9 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

#define WINHFT_VERSION_9 WINHFT_LATEST_VERSION

File: WinCalls.h
Line: 95

Typedefs Detail
COMServer 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

typedef _t_COMServer COMServer;

File: WinExpT.h
Line: 49
COMServerRec 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

typedef _t_COMServer COMServerRec;

File: WinExpT.h
Line: 49


Structure Detail
_t_COMServer
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

struct _t_COMServer {
 ASSize_t size; 
 
 COMServerGetNameProcType GetName; 
 
 COMServerGetIDispatchProcType GetIDispatch; 
 
 COMServerGetNameProcTypeEx GetNameEx; 
 
 COMServerGetIDispatchProcTypeEx GetIDispatchEx; 
 
 void* clientData; 
}


File: WinExpT.h
Line: 41

Callbacks Detail
COMServerGetIDispatchProcType 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

IDispatch * (*COMServerGetIDispatchProcType)(void)

File: WinExpT.h
Line: 33
COMServerGetIDispatchProcTypeEx 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

IDispatch * (*COMServerGetIDispatchProcTypeEx)(void *clientData)

File: WinExpT.h
Line: 34
COMServerGetNameProcType 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

ASAtom (*COMServerGetNameProcType)(void)

File: WinExpT.h
Line: 30
COMServerGetNameProcTypeEx 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

ASAtom (*COMServerGetNameProcTypeEx)(void *clientData)

File: WinExpT.h
Line: 31

Method Detail
WinAppEnableIdleTimer()
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

BOOL WinAppEnableIdleTimer(BOOL enable)

(Windows only) Allows a plug-in to turn the AVAppIdle timer on and off, which is needed when a plug-in calls another process and thus blocks Acrobat for an extended period of time.

Parameters

enable — 

IN/OUT true to turn the timer on, false to turn it off.

Returns

The previous state of the AVAppIdle timer.

Since

PI_WIN_VERSION >= 0x00020000

File: winprocs.h
Line: 60
WinAppGetModalParent() 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

HWND WinAppGetModalParent(AVDoc doc)

(Windows only) Gets appropriate parent for any modal dialog boxes created by a plug-in. This method is only useful if there is an AVDoc; it cannot be used, for example, to put up a modal dialog box while a file is being opened.

In circumstances where there is no AVDoc, use the gHWND provided in PIMAIN.C. Although this does not give perfect results in some cases, there is no real alternative. For example, if a file is opened in an external application's window, the dialog box is not hidden if the external application is hidden.

Parameters

doc — 

IN/OUT The AVDoc for a PDF file if the dialog box is acting on an PDF document, which is generally the case. The AVDoc must be provided so that for external documents, the viewer can parent the dialog box of the external application instead of the viewer.

Returns

The HWND for the modal dialog box' parent.

See Also

Since

PI_WIN_VERSION >= 0x00020000

File: winprocs.h
Line: 85
WinAppGetModelessParent() 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

HWND WinAppGetModelessParent()

(Windows only) Gets the appropriate parent for any modeless dialog boxes created by a plug-in.

In previous versions of Acrobat, the correct parent was always gHWND and was provided in PIMAIN.C.

Returns

The HWND for the modeless dialog box' parent.

See Also

WinAppRegisterModelessDialog
WinAppUnregisterModelessDialog

Since

PI_WIN_VERSION >= 0x00080000

File: winprocs.h
Line: 155
WinAppGetPalette() 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

HPALETTE WinAppGetPalette()

(Windows only) Gets the application's color palette in the case where the system is running in 256-color mode or less. Used when you want to set and realize a palette in an external window before drawing to it.

Do not release this palette handle: it may be in use by other plug-ins.

Returns

The application's color palette. It is NULL if the system is running direct colors (15/ 16/ 24/ 32-bit) or no palette is being used.

Since

PI_WIN_VERSION >= 0x00020000

File: winprocs.h
Line: 101
WinAppGetPrinterHDC() 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

HDC WinAppGetPrinterHDC()

Gets the device context for a printer, which is the HDC used to print a document.

It is used if you need to modify the device context Acrobat creates when printing to a non-PostScript printer. You should register for the notification PDDocWillPrintPage() and acquire the printer DC for the page you wish to modify.

Returns

The printer device context.

Since

PI_WIN_VERSION >= 0x00040000

File: winprocs.h
Line: 117
WinAppLockViewer() 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

void WinAppLockViewer(BOOL lock)

This API is used to ensure that the application does not quit until the work that needs to be done by the interface registered with WinAppRegisterInterface() is done.

Parameters

lock — 

TRUE locks the Viewer, preventing it from quitting. FALSE allows the Viewer to quit. Calling WinAppLockViewer() with FALSE does not automatically quit the Viewer; it decrements an a reference count.

See Also

Since

PI_WIN_VERSION >= 0x00050000

File: winprocs.h
Line: 141
WinAppRegisterInterface() 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

BOOL WinAppRegisterInterface(COMServer pServer)

(Windows only) Register a COM interface.

Parameters

pServer — 

A pointer to COMServerRec.

Returns

true if the interface was registered with Acrobat, false otherwise.

Since

PI_WIN_VERSION >= 0x00050000

File: winprocs.h
Line: 128
WinAppRegisterModelessDialog() 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

void WinAppRegisterModelessDialog(HWND dialog)

(Windows only) Registers modeless dialog boxes with the viewer so that the dialog box gets the correct messages.

Parameters

dialog — 

IN/OUT The HWND for the dialog box to register.

See Also

Since

PI_WIN_VERSION >= 0x00020000

File: winprocs.h
Line: 38
WinAppUnregisterInterface() 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

void WinAppUnregisterInterface(COMServer pServer)

(Windows only) Unregisters a COM interface.

Parameters

pServer — 

A pointer to a COMServerRec.

Since

PI_WIN_VERSION >= 0x00090000

File: winprocs.h
Line: 162
WinAppUnRegisterModelessDialog() 
Product availability: Acrobat, Reader
Platform availability: Windows

Syntax

void WinAppUnRegisterModelessDialog(HWND dialog)

(Windows only) Un-registers modeless dialog boxes with the viewer.

Parameters

dialog — 

IN/OUT The HWND for the dialog box to un-register.

See Also

Since

PI_WIN_VERSION >= 0x00020000

File: winprocs.h
Line: 47