LayerAV_Layer
ObjectAVSys

AVSys provides various system-wide utilities, including setting the cursor shape, getting the current cursor, and beeping.



Enumeration Summary
 Enumeration
  AVSysIconType
Icon types for AVSysGetIconFromFilename() and so on.
Method Summary
 Method
 
Given an ASTimeRecP, it gets a string representing the date and time. This routine is locale-friendly.
 
void AVSysBeep(ASInt32 duration)
Beeps.
 
AVCursor AVSysGetCursor()
Gets the current cursor. Use this method when you want to change the cursor temporarily and be able to restore it to its current shape.
 
Gets an icon of the specified type from the specified file.
 
AVIcon AVSysGetIconFromMimeType(const char* mimeType, AVSysIconType itype)
Gets an icon of the specified type from the specified MIME type.
 
Gets an icon of the specified type from the specified type and creator (for Mac OS).
 
AVFlagBits32 AVSysGetModifiers()
Gets a flag indicating which modifier keys are currently being pressed.
 
AVCursor AVSysGetStandardCursor(ASInt32 cursorID)
Gets the specified cursor. The cursor can subsequently be displayed using AVSysSetCursor().
 
Gets the value of the UsePenForInput user preference attribute (currently unused).
 
Tests whether the mouse button is still being pressed.
 
Sets the cursor to the specified AVCursor.
 
void AVSysSetWaitCursor(ASBool turnOn, ASUns32 timeLimit)
Turns the wait cursor on or off. Unlike AVSysGetCursor(), AVSysSetWaitCursor() ensures that the wait cursor stays on until another call to AVSysSetWaitCursor() is made to turn it off, or the time limit is reached. When using this call to turn on the wait cursor, you must ensure that another call will be made to turn it back off.
 
Given an ASTimeRecP, it sets the ASText object passed in to the string representing the date and time. This routine is locale-friendly.
 
AVFlagBits32 AVSysTrackMouse(ASBool* canceled, ASBool* committed, ASBool removeEvents)
Query the state of the mouse buttons in a manner appropriate for click-drag operations. This is similar to AVSysMouseStillDown(), but can be used to query the state of the mouse even while it is up.


Enumeration Detail
AVSysIconType
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

enum AVSysIconType {
 kAVSysSmallIcon,
 
 kAVSysLargeIcon,
 
 kAVSysHugeIcon
}

File: AVExpT.h
Line: 9699



Method Detail
AVSysAllocTimeStringFromTimeRec()
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

char* AVSysAllocTimeStringFromTimeRec(ASTimeRecP timeRec)

Given an ASTimeRecP, it gets a string representing the date and time. This routine is locale-friendly.

The returned string is allocated using ASmalloc() and must be freed by the caller using ASfree().

Parameters

timeRec — 

IN/OUT A pointer to an ASTimeRec structure.

Returns

A string representing the date and time. It returns NULL if the conversion fails.

Since

PI_ACROVIEW_VERSION >= 0x00040000

File: AVProcs.h
Line: 4099
AVSysBeep() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVSysBeep(ASInt32 duration)

Beeps.

Parameters

duration — 

IN/OUT Always pass 0.

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 2503
AVSysGetCursor() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVCursor AVSysGetCursor()

Gets the current cursor. Use this method when you want to change the cursor temporarily and be able to restore it to its current shape.

Returns

The current cursor.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 2548
AVSysGetIconFromFilename() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVIcon AVSysGetIconFromFilename(ASText fname, AVSysIconType itype)

Gets an icon of the specified type from the specified file.

Parameters

fname — 

The file name.

 
itype — 

The icon type, kAVSysSmallIcon, or kAVSysLargeIcon.

Returns

The icon object, or NULL if no icon of the given type was found.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00060000

File: AVProcs.h
Line: 7613
AVSysGetIconFromMimeType() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVIcon AVSysGetIconFromMimeType(const char* mimeType, AVSysIconType itype)

Gets an icon of the specified type from the specified MIME type.

Parameters

mimeType — 

The MIME type.

 
itype — 

The icon type, kAVSysSmallIcon, or kAVSysLargeIcon.

Returns

The icon object, or NULL if no icon of the given type was found.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00060000

File: AVProcs.h
Line: 7626
AVSysGetIconFromTypeAndCreator() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVIcon AVSysGetIconFromTypeAndCreator(ASUns32 type, ASUns32 creator, AVSysIconType itype)

Gets an icon of the specified type from the specified type and creator (for Mac OS).

Parameters

type — 

The type value (which specifies a type such as PDF or GIF).

 
creator — 

The creator value (which specifies a creator such as Acrobat or Photoshop).

 
itype — 

The icon type, kAVSysSmallIcon, or kAVSysLargeIcon.

Returns

The icon object, or NULL if no icon of the given type was found.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00060000

File: AVProcs.h
Line: 7642
AVSysGetModifiers() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVFlagBits32 AVSysGetModifiers()

Gets a flag indicating which modifier keys are currently being pressed.

Returns

An OR of the Modifier Keys.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 2486
AVSysGetStandardCursor() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVCursor AVSysGetStandardCursor(ASInt32 cursorID)

Gets the specified cursor. The cursor can subsequently be displayed using AVSysSetCursor().

Parameters

cursorID — 

IN/OUT The cursor to show. It must be one of the Predefined Cursors.

Returns

The specified cursor.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 2516
AVSysGetUsePenForInput() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AVSysGetUsePenForInput()

Gets the value of the UsePenForInput user preference attribute (currently unused).

Returns

Currently, always true.

Since

PI_ACROVIEW_VERSION >= 0x00060000

File: AVProcs.h
Line: 8843
AVSysMouseIsStillDown() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AVSysMouseIsStillDown()

Tests whether the mouse button is still being pressed.

Returns

true if the user is holding the mouse button down and has not released it since the last mouse-down event, false otherwise.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00020000

File: AVProcs.h
Line: 2496
AVSysSetCursor() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVSysSetCursor(AVCursor cursor)

Sets the cursor to the specified AVCursor.

Parameters

cursor — 

The cursor to display. Predefined platform-independent cursors can be obtained using AVSysGetStandardCursor(). Clients can use their own custom cursors as follows:

Mac OS developers: 32/64-bit: Cast NSImage* to AVCursor and pass to AVSysSetCursor DEPRECATED 32-bit: Use the Mac OS Toolbox GetCursor call to retrieve your cursor from a resource. Cast the resulting CursHandle to an AVCursor and pass it to AVSysSetCursor().

Windows developers: Use the Windows API function LoadCursor to retrieve your cursor resource. Cast the resulting HCURSOR to an AVCursor and pass it to AVSysSetCursor().

AVSysGetCursor

AVSysGetStandardCursor

AVSysSetWaitCursor

PI_ACROVIEW_VERSION >= 0x00020000


File: AVProcs.h
Line: 2537
AVSysSetWaitCursor() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVSysSetWaitCursor(ASBool turnOn, ASUns32 timeLimit)

Turns the wait cursor on or off. Unlike AVSysGetCursor(), AVSysSetWaitCursor() ensures that the wait cursor stays on until another call to AVSysSetWaitCursor() is made to turn it off, or the time limit is reached. When using this call to turn on the wait cursor, you must ensure that another call will be made to turn it back off.

Parameters

turnOn — 

IN/OUT true sets the wait cursor, false resets it.

 
timeLimit — 

IN/OUT The time limit in ticks (1/60th of a second). If the time limit is reached, the wait cursor will be turned off as if you called AVSysSetWaitCursor(false, ... ). This value is ignored if it is less than or equal to 0 or if the turnOn parameter is false. Set this to a reasonable nonzero value to ensure that the user wait cursor will go away.

See Also

Since

PI_ACROVIEW_VERSION >= 0x00050000

File: AVProcs.h
Line: 6055
AVSysTimeASTextFromTimeRec() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AVSysTimeASTextFromTimeRec(ASTimeRecP timeRec, ASText text)

Given an ASTimeRecP, it sets the ASText object passed in to the string representing the date and time. This routine is locale-friendly.

Parameters

timeRec — 

IN/OUT A pointer to an ASTimeRec structure.

 
text — 

The allocated ASText object this method will store result in.

Since

PI_ACROVIEW_VERSION >= 0x00080000

File: AVProcs.h
Line: 9801
AVSysTrackMouse() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

AVFlagBits32 AVSysTrackMouse(ASBool* canceled, ASBool* committed, ASBool removeEvents)

Query the state of the mouse buttons in a manner appropriate for click-drag operations. This is similar to AVSysMouseStillDown(), but can be used to query the state of the mouse even while it is up.

Parameters

canceled — 

Set to indicate whether the user cancelled the operation (for example, by pressing ESC). It can be NULL.

 
committed — 

Set to indicate whether the use pressed Enter to commit the operation. It can be NULL.

 
removeEvents — 

If true, mouse events will be discarded to prevent mouse button change events from being sent after the drag operation is finished.

Returns

An integer indicates the current state of the mouse buttons:

  • Bit 0 will be set if the primary mouse button is down (this is normally the left button).

  • Bit 1 will be set if the secondary mouse button is down (this is normally the right button).

  • Bit 2 will be set if the tertiary mouse button is down (this is normally the wheel button).

Since

PI_ACROVIEW_VERSION >= 0x00080000

File: AVProcs.h
Line: 9666