typedef
struct
_t_PDEObject
*
PDEObject
;
void
PDEAcquire(
IN
PDEObject
obj
);
obj | IN/OUT The element whose count is incremented.
|
Adds an identifier-value pair to an object.
The clientID-tag combination is a unique identifier for the value. Each client has its own identifier space. It is often convenient to use ASAtoms as tags.
Note: Tags are a purely memory-resident feature. In addition, management of tags is the responsibility of the client. A client must manage any memory pointed to by a tag. This method only contains a pointer to the data passed in by the client. The data and the pointer will not be saved to a file. The generic pointer type is not in the PDF specification.
void
PDEAddTag(
IN
PDEObject
object
,
IN
ExtensionID
clientID
,
IN
ASUns32
tag
,
IN
void
*
value
);
object | |
clientID | Identifies the caller/client. For clients, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem,
clientID should be zero. If there are multiple clients, each should specify a nonzero, non-negative clientID . (A negative clientID is reserved for the implementation.) |
tag | The tag to add to
object . If tag is 0 , this is the same as calling PDERemoveTag(). In other words, you cannot tell the difference between a tag whose value is zero and a tag that is nonexistent. |
value | A pointer to a value to associate with
object . Only the pointer is stored. If the pointer points to data, it is the responsibility of the client to manage the data and its memory. |
void
*
PDEGetTag(
IN
PDEObject
object
,
IN
ExtensionID
clientID
,
IN
ASUns32
tag
);
object | The element whose value is obtained.
|
clientID | Identifies the caller/client. For clients, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem,
clientID should be zero. If there are multiple clients, each should specify a nonzero, non-negative clientID . (A negative clientID is reserved for the implementation.) |
tag | The object's tag. If object has no tag, this is
0 . |
ASInt32
PDEObjectGetType(
IN
PDEObject
obj
);
obj | IN/OUT The element whose type is obtained.
|
Decrements the reference count for the object. If the count becomes zero, the object is destroyed.
Do not call PDERelease() on PDEContent that you acquired with PDPageAcquirePDEContent(); call PDPageReleasePDEContent() instead.
Note: Objects should only be disposed of with PDERelease() if the method by which they were obtained incremented the reference count for the object. In general, methods that get an object do not increment the reference count. Methods that increment the reference count typically contain the word acquire
or create
in the method name and specifically state that you must release the object.
void
PDERelease(
IN
PDEObject
obj
);
obj | IN/OUT The element released.
|
Removes an object's value for a given clientID-tag identifier that was added by PDEAddTag.
If PDEAddTag is called with a 0
tag, this is the same as calling PDERemoveTag().
void
PDERemoveTag(
IN
PDEObject
object
,
IN
ExtensionID
clientID
,
IN
ASUns32
tag
);
object | The element whose tag is removed.
|
clientID | Identifies the caller/client. For clients, this should be the gExtensionID extension. For the Adobe PDF Library, if there is only one client of the PDFEdit subsystem,
clientID should be zero. If there are multiple clients, each should specify a nonzero, non-negative clientID . (A negative clientID is reserved for the implementation.) |
tag | The tag value.
|