/********************************************************************** ADOBE SYSTEMS INCORPORATED Copyright (C) 2007 Adobe Systems Incorporated All rights reserved. NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms of the Adobe license agreement accompanying it. If you have received this file from a source other than Adobe, then your use, modification, or distribution of it requires the prior written permission of Adobe. --------------------------------------------------------------------- WLHFTProcs.h *********************************************************************/ /** Register Web Driver.
Registers a driver with the Weblink plug-in. It must be called during the import, replace, and register phase of the plug-in initialization process of any plug-ins that want to use Weblink services.
@param driverName IN The driver's name. It is aNULL
-terminated C string shown to
the user to identify the current driver. The string is limited
to 255 characters and is copied internally.
@param driverRock IN A pointer to a driver-defined data structure. This value is
passed to the driver for every driver-supplied function call.
@param wdVec IN A pointer to a data structure of driver-supplied callback
functions. It is not copied; therefore, the structure must be
either statically or dynamically allocated, rather than
automatically allocated as a local variable. It must not be
modified, moved, or deallocated until the plug-in
terminates within Acrobat.
@return Registration status. true
if the registration was successful, false
otherwise. Failure
occurs if there is insufficient memory or the version number in wdVec
is incompatible
with the Weblink plug-in.
*/
PIPROC(ASBool, RegisterWebDriver, (char *driverName, void *driverRock, WebDriverVector *wdVec), driverName, driverRock, wdVec)
/** Creates a new Weblink progress.
It creates a new Weblink progress monitor to provide feedback during long operations. Current web browsers follow links asynchronously and use BeginWebProgress(), UpdateWebProgress(), and EndWebProgress() to assure a user that a request is making progress.
@param message IN Message text. ANULL
-terminated C string that represents a
message to display with the progress monitor.
@param flags IN Possible flag options for the progress monitor. There are two
flags defined (in WLHft.h):
Flag option | Description |
---|---|
PROGRESS_HAS_METER | Put a thermometer-style meter in the progress display. |
PROGRESS_HAS_CANCEL | Add either a Cancel button or a message directing the user how to abort the operation. |
NULL
value if the monitor's creation was successful,
NULL
otherwise. In the current implementation, there can be at most one progress monitor.
*/
PIPROC(WebProgressMonitor, BeginWebProgress, (char *message, ASUns32 flags, ASInt32 timeoutTime), message, flags, timeoutTime)
/** Updates Web Progress.
It updates the state of the current progress monitor.
@param progMon IN The current progress monitor returned from BeginWebProgress(). @param message IN Message text. If non-NULL
, the text displayed is changed to
that represented by message
. If message
is NULL
, the text is not changed.
@param from IN The lower bound of a sub-range between 0
and outOf
to
highlight: from
and to
are the lower and upper bounds of
a subrange between 0
and outOf
to highlight. Typically the
lower bound, from
, is zero, but a driver may wish to
indicate the progress of an operation that has no known magnitude
as a priority. It could do so with a chaser light
display by cycling the lower bound, from
, through the range
between 0
and outOf - 1
, and defining the upper bound,
to
, as from + 1
.
@param to IN The upper bound of a sub-range between 0
and outOf
to highlight.
@param outOf IN If progMon
was created with the PROGRESS_HAS_METER
flag, the from
, to
, and outOf
arguments are used to
change the state of the bar. The range of the meter is
defined from 0
to outOf
.
@param timeoutTime IN (Optional) The new timeout period in seconds. If it is non-zero, a
new timeout is set.
@return Update status. true
if the update was successful, false
if the monitor timed out or
the user canceled the operation. The latter case only happens when the progress
monitor was created with the PROGRESS_HAS_CANCEL
flag in BeginWebProgress().
*/
PIPROC(ASBool, UpdateWebProgress, (WebProgressMonitor progMon, char *message, ASInt32 from, ASInt32 to, ASInt32 outOf, ASInt32 timeoutTime),
progMon, message, from, to, outOf, timeoutTime)
/** Ends Web Progress.
Terminates the current progress monitor.
@param progMon IN The current progress monitor. */ PIPROC(void, EndWebProgress, (WebProgressMonitor progMon), progMon) /** Get App Specifier.Obtains a platform-specific structure specifying the application the user has chosen as the web browser.
@param promptUser INtrue
if there is no current web browser and the user is
prompted to choose one, false
otherwise.
@return A pointer to a platform-specific data structure that specifies the web browser. On the
Mac OS, it is a pointer to an FSSpec. On Windows and UNIX platforms,
it is a pointer to a string (char*
) representing the full path of the executable
application.
*/
PIPROC(WDAppSpecifier, GetAppSpecifier, (ASBool promptUser), promptUser)
/** Checks if the Cancel button was clicked.
It tests whether the user clicked the Cancel button in the progress monitor dialog.
@param progMon IN The current progress monitor. @returntrue
if the progress monitor has been canceled, false
otherwise.
*/
PIPROC(ASBool, WebProgressDidCancel, (WebProgressMonitor progMon), progMon)
/** Opens a new URL.
Asks Weblink to follow the specified URL. If the URL specifies a PDF document, it opens it in a new window (an AVDoc view). It is used by other plug-ins that wish to start a download.
@param avd IN If specified, it is the AVDoc that contains the source of the URL. @param cURL IN The URL to be opened. @param cFormData IN The data for a form to be posted. @returntrue
if the request succeeded, false
otherwise.
*/
PIPROC(ASBool, WWWOpenURL, (AVDoc avd, char *cURL, char *cFormData), avd, cURL, cFormData)
/** Creates Or Deletes WebLinks
Used by other plug-ins that want to create or delete weblinks in a document.
Adobe Reader does not, by default, create or delete items in a PDF document.
@param bCreate IN A boolean to indicate whether links should be created. If it isfalse
, links will be deleted.
@param pdd IN The PDDoc in which to create or delete weblinks.
@param nStart IN The starting page
@param nEnd IN The ending page
@param pm IN The current progress monitor.
@param vPMData IN The data to be passed to the progress monitor.
@param cp IN The cancel proc
@param vCPData IN The data to be passed to the cancel proc.
@return The number of web links created or deleted.
@product_exclude RDR
*/
PIPROC(ASInt32, WLCreateOrDeleteWebLinks, (ASBool bCreate, PDDoc pdd, ASInt32 nStart, ASInt32 nEnd, ProgressMonitor pm, void *vPMData, CancelProc cp, void *vCPData),
bCreate, pdd, nStart, nEnd, pm, vPMData, cp, vCPData)
/** Opens a new URL With Parameters .
Asks Weblink to follow a URL, specifying a target frame. If the URL specifies a PDF document, it opens it in a new window (an AVDoc view). It is used by other plug-ins that wish to start a download and specify a target frame.
@param avd If specified, it is the AVDoc that contains the source of the URL. @param cURL The URL to be opened. @param cFormData The data for a form to be posted. @param params The parameter block specifying the name of the frame. @returntrue
if the request succeeded, false
otherwise.
*/
PIPROC(ASBool, WWWOpenURLWithParams, (AVDoc avd, char *cURL, char *cFormData, WWWOpenURLParams params), avd, cURL, cFormData, params)