Download 14 - Docu + Design Daube

Transcript
Creating Your Client’s User Interface
3
IntT F_ApiNotification(IntT notification,
IntT state);
This argument
Means
notification
A constant that specifies the notification point. See the table below for a list
of the constants.
state
Specifies whether to turn notification for the notification point on or off.
Specify True to request notification or False to turn notification off.
For most events, there are several notification points, or stages in the event when the
FrameMaker product can notify your client. For example, when the FrameMaker product
saves a file, there are two notification points: one immediately before and one immediately
after it saves the file. The following table lists the notification points and constants the
FrameMaker product passes to F_ApiNotify() for some events.
Event or operation
Notification points
Notification constants
Frame binary
document opened
Before checking the type of the
file to be opened
FA_Note_PreFileType
After checking the type of the
file to be opened
FA_Note_PostFileType
Before opening the file
FA_Note_PreOpenDoc
After opening the file
FA_Note_PostOpenDoc
Filterable document
opened
Before checking the type of the
file to be opened
FA_Note_FilterIn
Document saved in
Frame binary format
Before saving the document
FA_Note_PreSaveDoc
After saving the document
FA_Note_PostSaveDoc
Document saved as
filterable type
Before saving the document
FA_Note_FilterOut
Document exited
Before exiting the document
FA_Note_PreQuitDoc
After exiting the document
FA_Note_PostQuitDoc
For a complete list of events and notification points, see ‘‘F_ApiNotification()’’ on page 226 of
the FDK Programmer’s Reference.
You can request notification in your client’s F_ApiInitialize() callback or anywhere
you want in your client.
Example
Suppose you want the FrameMaker product to notify your client whenever the user exits a
document. To request this notification when your client is first started, write the
F_ApiInitialize() callback as follows:
FDK Programmer’s Guide
35