. DirectXtras Home
        Home

DirectCommunication Xtra
DirectConnection Xtra
DirectControl Xtra
DirectEmail Xtra
DirectFTP Xtra
DirectImage Xtra
DirectInteraction Xtra
Documentation
License Agreement
Licensing Fees
Order Form
DirectOS Xtra
DirectSMS Xtra
DirectSound Xtra
DirectTransition Xtra
DirectTransition3D Xtra Set I
DirectTransition3D Xtra Set II
DirectTransition3D Xtra Set III
DirectTTS Xtra
XtrAgent
DirectXport Xtra

SpeechPlugin

Special Discounted Bundles

The Gallery
How To Order
Order Form
Check for Upgrades

Sign in
Change Your Profile

Contact Us
















    .
DirectXtras
Xtra Power for Director & Authorware



 DirectInteraction Xtra

Director 7.x Compatible Director 8.x CompatibleDirector MX Compatible     Windows Compatible   

DirectInteraction Xtra™ Version 1.0 Documentation

Developed by Tomer Berda, DirectXtras Inc.
(C) Copyright 2002-2003.
Last updated: January 26th, 2003.

 

DirectInteraction is a Scripting Xtra for Macromedia Director which provides Director applications with additional capabilities to interact with the user.

By using DirectInteraction Xtra, Director applications can:

  • Place icons on the tray bar (also known as the taskbar's status area) to represent the application and serve as status indicators.
    Get notification upon user interaction with tray bar icons.
    Tray bar icons include transparency support, can be set from image cast members and may be animated or modified in real time.

  • Display balloon ToolTips over the tray bar.
    Get notification when the balloon ToolTip is shown, clicked or timed out.

  • Get notification when the user drops file(s) on the Director stage.
    Obtain the full pathname of the dropped file(s) as well as the dropping point coordinates.

  • Create, display and manipulate context pop-up menus (also known as shortcut menus) which can be displayed anywhere on the screen
    and may include nested sub menus.

  • Get notification when the user rotates the mouse wheel, moves the mouse or presses one of its buttons, including support for the mouse middle and extra buttons.

  • Get notification when the user switches to or from the application.

  • Get notification when the screen saver activates.

The Xtra is available for Director 7 and above and is compatible with Windows 9X and newer (including 2000, ME, NT, XP).

 

Installation

Registration

About the Tray Bar

About Balloon ToolTips for Tray Bar Icons

About Context Menus

Functions Reference

diRegister()
diNotify()
diAcceptFileDrop()
diAddTrayIcon()
diModifyTrayIcon()
diRemoveTrayIcon()
diShowTrayIconBalloon()
diCreateMenu()
diDestroyMenu()
diInsertMenuItem()
diModifyMenuItem()
diRemoveMenuItem()

diShowMenu

Event Functions:

on DirectFileDrop()
onDirectBalloonShow()
on DirectBalloonClick()
onDirectBalloonTimeOut()
on DirectMouseDown()
on DirectMouseUp()
on DirectMouseDoubleClick()
on DirectMouseMove()
on DirectMouseWheel()
on DirectScreenSaverActivate()
on DirectWindowActivate()



 

Installation

DirectInteraction Xtra has an authoring version and a run time version. The trial version only includes the authoring version.

The authoring version is used by the Director authoring environment while developing your movie. It should be placed in your Director "Xtras" folder.

The run time version is used when running your movie as a stand-alone application. It should be placed in a folder named "Xtras" that is inside the folder that contains the host projector. Alternatively, the run time version can be bundled in projectors (in a similar way you bundle other Director files).

When creating Director projectors please note that if the Xtra is listed in the Modify->Movie->Xtras dialog  then the "Include in Projector" checkbox must be unchecked otherwise Director will bundle the Authoring version of the Xtra in the projector, which will not work outside the authoring environment. Instead, add the run time version of the Xtra in the "Create Projector" dialog or include it in the projector "Xtras" folder.

IMPORTANT: The authoring and run time versions can not coexist in the same "Xtras" folder, so be sure to place the appropriate version in the appropriate folder.

You can freely distribute the run time version of DirectInteraction Xtra with any application developed by you, and you alone. You can not redistribute the authoring version. Please refer to the license agreement for further information.

 

Registration

DirectInteraction Xtra is a commercial product. 

Basically, there are 3 types of licenses: Single, Site and Corporate.

Single License: Entitles an organization to receive one copy of the licensed Xtra(s) which can only be used by a single developer on a single computer at any one time.

Site License: Entitles an organization to receive one copy of the licensed Xtra(s) which can be used by any number of developers on any number of workstations within one site.

Corporate License: Entitles an organization to receive one copy of the licensed Xtra(s) which can be used by any number of developers on any number of workstations within the entire corporation (multiple sites).

Once you have licensed DirectInteraction Xtra, you will be given a serial number that should be passed to the diRegister() function in order to unlock the Xtra. Once the Xtra is unlocked, trial warnings will no longer be presented, there will be no other limitations and the run-time version of the Xtra will become activated. This function should be called before any other DirectInteraction Xtra functions are called.

Following is a sample code demonstrating how the Xtra can be registered:

on startMovie
   
diRegister (12345)

end

...where 12345 is your DirectInteraction Xtra serial number.

Be sure to protect the call to diRegister() so that the serial number does not become exposed. This can be done in a similar way you protect the rest of your application source code. If you intend to distribute your application with open source code simply remove the diRegister() call from your code. This will switch the Xtra into a trial mode. Alternatively, you can protect just the appropriate diRegister() call in your code.

You can freely distribute the run time version of the DirectInteraction Xtra with any projector developed by you, and you alone. You can not redistribute the authoring version. Please refer to the license agreement for further information.

 

About the Tray Bar

Applications can put icons in the taskbar's tray bar to indicate the status of an operation or to notify the user about an event. For example, an application might put a printer icon in the tray bar to show that a print job is under way. The tray bar is located at the right edge of the taskbar (if the taskbar is horizontal ) or at the bottom (if the taskbar is vertical ). The tray bar also displays the current time if the Show clock check box is selected in the taskbar properties.

DirectInteraction Xtra provides functions to add, modify, or delete icons from the tray bar. You can perform the following actions with tray bar icons:

The Xtra can provide additional information when the user performs mouse actions, such as moving the mouse pointer over the icon or clicking the icon. The Xtra notifies applications of mouse events by calling the event functions and passing the ID of the icon associated with the event. In this way, the Xtra can notify an application when the user, for instance, clicks a particular icon.

Applications should implement the event functions of notifications they are interested in receiving.

The results of various mouse events can be summarized as follows:

 

About Balloon ToolTips for Tray Bar Icons

A nonintrusive way to display an explanatory message for a tray bar icon is to implement a balloon ToolTip with its stem pointing to the icon. The Balloon ToolTip is displayed in a cartoon-style "balloon", with rounded corners. It can either be single-line or multi-line.

The ToolTip will disappear when clicked or timed out. The ToolTip will look similar to the following illustration.

 

Applications can call the diShowTrayIconBalloon() to display a balloon ToolTip.

No more than one balloon ToolTip at a time is displayed for the taskbar. If an application attempts to display a ToolTip when one is already being displayed, the ToolTip will not appear until the existing balloon ToolTip has been visible for at least the system minimum time out value. For example, a balloon ToolTip with time out set to 30 seconds has been visible for seven seconds when another application attempts to display a balloon ToolTip. If the system minimum timeout is ten seconds, the first ToolTip displays for an additional three seconds before being replaced by the second ToolTip.

DirectInteraction Xtra notifies applications when the balloon ToolTip is shown by calling the DirectBalloonShow() event function.

If the user clicks on the balloon ToolTip the Xtra notifies applications by calling the DirectBalloonClick() event function. If the balloon ToolTip is dismissed because of a time out the Xtra notifies applications by calling the DirectBalloonTimeOut() event function.

 

About Context Menus

DirectInteraction Xtra provides context pop-up menus, also known as shortcut menus. A context menu is not attached to the menu bar; it can appear anywhere on the screen. An application typically associates a context menu with a portion of a window, such as the Director stage, or with a specific object, such as a tray bar icon.

A context menu remains hidden until the user activates it, typically by right-clicking a selection, a toolbar, or a taskbar button. The menu is usually displayed at the position of the caret or mouse cursor.

DirectInteraction Xtra provides functions to create, display and destroy context menus as well as functions to insert, modify or delete menu items. You can perform the following actions with context menus:

 

Functions Reference

 

diRegister ( integer SerialNumber )

Registers DirectInteraction Xtra for the current authoring or run-time session.

Once you have purchased DirectInteraction Xtra, you will be given a serial number that should be passed to this method to unlock the Xtra. Once the Xtra is unlocked, trial warnings and limitations will no longer be presented and the run-time version of the Xtra will become activated (You will receive the run-time version of the Xtra when you purchase DirectInteraction).

Be sure to protect the call to diRegister() so that your serial number does not become exposed. This function should be called before any other DirectInteraction Xtra functions are called.

Parameter :

SerialNumber : An integer specifying the serial number given to you at the time of purchase.

Returns : Does not return a value.

 

diNotify ( integer State )

Installs and uninstalls notifications.

DirectInteraction Xtra will start notifying applications on events as soon as this function is called with the State parameter set to 1.

The Xtra notifies on events by calling the event functions. Applications should implement the event functions of events they are interested in receiving.

Parameter :

State : Set this parameter to 1 to install notifications or to 0 to uninstall notifications.

Returns : An integer indicating whether the function was successful or not. If 1 is returned, the function was successful. If 0 is returned, the function
was not successful.

 

diAcceptFileDrop ( integer State )

Allow files to be dragged and dropped on the Director stage.

Parameter :

State : Set this parameter to 1 to accept dropped files or to 0 to not accept dropped files.

Returns : An integer indicating whether the function was successful or not. If 1 is returned, the function was successful. If 0 is returned, the function
was not successful.

Remarks :

After calling this function with the State parameter set to 1, the Xtra will start notifying applications on dropped files through the DirectFileDrop() event function.

 

diAddTrayIcon ( string ToolTip, any IconCastMember, integer TransparentColor )

Adds an icon to the tray bar (also known as the taskbar's status area).

Parameters :

ToolTip : A string containing the text for the icon ToolTip. The ToolTip can have a maximum of 64 characters. It appears automatically, or pop up, when the user pauses the mouse pointer over the icon. The ToolTip appears near the pointer and disappears when the user clicks a mouse button or moves the pointer away from the icon.

IconCastMember : Reference to an image cast member that is the icon image.

TransparentColor : An integer indicating the icon's transparency color as the decimal equivalent of the 24-bit hexadecimal color value. For example, the hexadecimal value for pure white, FFFFFF, is equivalent to 16777215 in decimal numbers. Setting this parameter to 16777215 indicates that all white pixels in the icon whose RGB value is (255, 255, 255) will be set to the color of the tray bar underneath the icon.

Returns : If the function was successful the returned value is an identifier of the new icon. If the function was not successful, 0 is returned. Applications should store the returned ID for a later use. The returned ID can be used to modify the icon or to remove it. In addition, when an event occurs as a result of user interaction with the icon, the Xtra will call the appropriate event function and pass it the returned icon ID to identify the icon on which the event occurred.

Remarks :

If the user has selected the Show Clock check box in the taskbar properties, the system places the icon to the immediate left of the clock. Otherwise, the icon appears on the right side or at the bottom of the taskbar.
 

diModifyTrayIcon ( integer IconID, string ToolTip, any IconCastMember, integer TransparentColor )

Modifies an existing icon on the tray bar (also known as the taskbar's status area).

Parameters :

IconID : The ID of the icon to modify, as returned by diAddTrayIcon() when the icon was created.

ToolTip : A string containing the text for the icon ToolTip. The ToolTip can have a maximum of 64 characters. It appears automatically, or pop up, when the user pauses the mouse pointer over the icon. The ToolTip appears near the pointer and disappears when the user clicks a mouse button or moves the pointer away from the icon.

IconCastMember : Reference to an image cast member that is the icon image.

TransparentColor : An integer indicating the icon's transparency color as the decimal equivalent of the 24-bit hexadecimal color value. For example, the hexadecimal value for pure white, FFFFFF, is equivalent to 16777215 in decimal numbers. Setting this parameter to 16777215 indicates that all white pixels in the icon whose RGB value is (255, 255, 255) will be set to the color of the tray bar underneath the icon.

Returns : If the function was successful the returned value is the identifier of the icon. If the function was not successful, 0 is returned.

 

diRemoveTrayIcon ( integer IconID )

Removes an icon from the tray bar (also known as the taskbar's status area).

Parameter :

IconID : The ID of the icon to remove, as returned by diAddTrayIcon() when the icon was created.

Returns : An integer indicating whether the function was successful or not. If 1 is returned, the function was successful. If 0 is returned, the function
was not successful.

 

diShowTrayIconBalloon ( integer IconID, string BalloonTitle, string BalloonText, integer TimeOut, integer Icon )

Displays a text balloon ToolTip above the specified icon on the tray bar (also known as the taskbar's status area).

Parameters :

IconID : The ID of the icon to associate the balloon with, as returned by diAddTrayIcon() when the icon was created.

BalloonTitle : A string containing the title for the balloon ToolTip. The title appears in boldface above the text. It can have a maximum of 63 characters. If this parameter is set to an empty string the balloon ToolTip would not have a title.

BalloonText : A string containing the text for the balloon ToolTip. It can have a maximum of 255 characters. To remove a balloon ToolTip currently on display, set this parameter to an empty string.

TimeOut : An integer indicating the timeout value, in seconds, for the balloon ToolTip. The system enforces minimum and maximum timeout values. Values that are too large are set to the maximum value and values that are too small default to the minimum value. The system minimum and maximum timeout values are currently set at 10 seconds and 30 seconds, respectively.

Icon : An integer indicating the balloon ToolTip icon. The icon is placed to the left of the title and is only shown if a title is specified for the balloon ToolTip. Can be one of the following numbers:

0 - No icon.
1 - An information icon.
2 - A warning icon.
3 - An error icon.

 

Returns : An integer indicating whether the function was successful or not. If 1 is returned, the function was successful. If 0 is returned, the function
was not successful.

Remarks :

This feature is only available on Windows 2000 or later.

For more discussion of balloon ToolTips, see the About Balloon ToolTips for Tray Bar Icons chapter.

 

diCreateMenu ( )

Creates a new context menu, also known as a shortcut menu. The menu is initially empty. You can insert or append menu items by using the diInsertMenuItem() function.

Returns : If the function succeeds, the returned value is the ID of the newly created menu. If the function fails, the returned value is 0.

 

diDestroyMenu ( integer MenuID )

Destroys the specified context menu and frees any memory that the menu occupies.

Parameter :

MenuID : The ID of the menu to destroy as returned by diCreateMenu() when the menu was created.

Returns : An integer indicating whether the function was successful or not. If 1 is returned, the function was successful. If 0 is returned, the function
was not successful.

 

diInsertMenuItem ( integer MenuID, integer ItemID, integer BeforeItemID, any Item, integer Flags )

Inserts a new menu item to the specified context menu.

Parameters :

MenuID : The ID of the menu to add items to, as returned by diCreateMenu() when the menu was created.

ItemID : Specifies either the ID of the new menu item or, if the Flags parameter has the 'Popup' flag set, an ID of a menu to set as a submenu.

BeforeItemID : Specifies the menu item before which the new menu item is to be inserted. Set this parameter to 0 to append the item at the end of the specified menu.

Item : The menu item. The menu item can be a text or an image. For text, set this parameter to a text string. For image, set this parameter to a reference of an image cast member containing the image for the menu item.

Flags : Specifies the content, appearance, and behavior of the new menu item. This parameter can be a sum of the following values:

1 - Grayed. Disables the menu item and grays it so it cannot be selected. By default, menu items are not grayed.
2 - Disabled. Disables the menu item so that it cannot be selected, but does not gray it. By default, menu items are enabled.
8 - Checked. Places a check mark next to the menu item. By default, menu items are unchecked.
16 - Popup. Specifies that the menu item opens a drop-down menu or submenu. The ItemID parameter specifies the ID to the drop-down menu or submenu.
32 - Menu bar break. Places the item on a new column. The new column is separated from the old column by a vertical line.
64 - Menu break. Places the item on a new column without a separating vertical line.
2048 - Draws a horizontal dividing line. The line cannot be grayed, disabled, or highlighted. The Item parameter is ignored.

For example, to have the new item checked and grayed, set this parameter to 9 (8 + 1).

Returns : An integer indicating whether the function was successful or not. If 1 is returned, the function was successful. If 0 is returned, the function
was not successful.

 

diModifyMenuItem ( integer MenuID, integer ItemID, integer NewItemID, any Item, integer Flags )

Changes an existing menu item. This function is used to specify the content, appearance, and behavior of an existing menu item.

Parameters :

MenuID : The ID of the menu to modify, as returned by diCreateMenu() when the menu was created.

ItemID : Specifies the ID of the menu item to modify.

NewItemID : Specifies a new ID for the menu item or, if the Flags parameter has the 'Popup' flag set, an ID of a menu to set as a submenu.

Item : The menu item. The menu item can be a text or an image. For text, set this parameter to a text string. For image, set this parameter to a reference of an image cast member containing the image for the menu item.

Flags : Specifies the content, appearance, and behavior of the modified menu item. This parameter can be a sum of the following values:

1 - Grayed. Disables the menu item and grays it so it cannot be selected. By default, menu items are not grayed.
2 - Disabled. Disables the menu item so that it cannot be selected, but does not gray it. By default, menu items are enabled.
8 - Checked. Places a check mark next to the menu item. By default, menu items are unchecked.
16 - Popup. Specifies that the menu item opens a drop-down menu or submenu. The NewItemID parameter specifies the ID to the drop-down menu or submenu.
32 - Menu bar break. Places the item on a new column. The new column is separated from the old column by a vertical line.
64 - Menu break. Places the item on a new column without a separating vertical line.
2048 - Draws a horizontal dividing line. The line cannot be grayed, disabled, or highlighted. The Item parameter is ignored.

For example, to have the modified item checked and grayed, set this parameter to 9 (8 + 1).

Returns : An integer indicating whether the function was successful or not. If 1 is returned, the function was successful. If 0 is returned, the function
was not successful.

 

diRemoveMenuItem ( integer MenuID, integer ItemID )

Deletes a menu item or detaches a submenu from the specified context menu. If the menu item opens a drop-down menu or submenu, the function does not destroy the menu, allowing the menu to be reused.

Parameters :

MenuID : The ID of the menu to modify, as returned by diCreateMenu() when the menu was created.

ItemID : Specifies the ID of the menu item to delete.

Returns : An integer indicating whether the function was successful or not. If 1 is returned, the function was successful. If 0 is returned, the function
was not successful.

 

diShowMenu ( integer MenuID, integer X, integer Y )

Displays a context menu at the specified location and tracks the selection of items on the context menu.

The context menu can appear anywhere on the screen.

Parameters :

MenuID : The ID of the menu to display, as returned by diCreateMenu() when the menu was created.

X : Horizontal location of the shortcut menu, in screen coordinates.

Y : Vertical location of the shortcut menu, in screen coordinates.

Returns : An integer indicating the ID of the selected menu item. If the user cancels the menu without making a selection, or if an error occurs, the returned value is zero.

 

on DirectFileDrop ( integer X, integer Y, string FilePathName )

This function is being called by the Xtra when the user drags a file and drops it on the Director stage.

Parameters :

X : The X coordinate of the mouse cursor location, in pixels, by the time the file was dropped. The left most pixel on the screen is 0. The X coordinate increases as the mouse cursor moves right.

Y : The Y coordinate of the mouse cursor location, in pixels, by the time the file was dropped. The top most pixel on the screen is 0. The y coordinate increases as the mouse cursor moves down.

FilePathname : The full pathname of the dropped file.

Remarks :

If multiple files are dropped at the same time, this function will be called multiple times, once for each file.

Applications must first call diNotify(1) to install notifications before any event function can be called by the Xtra.

 

on DirectBalloonShow ( integer IconID )

This function is being called by the Xtra when a balloon ToolTip is shown as a result of a call to the diShowTrayIconBalloon() function.

Parameter :

IconID : The ID of the tray bar icon whose balloon ToolTip is shown, as returned by diAddTrayIcon() when the icon was created.

Remarks :

Applications must first call diNotify(1) to install notifications before any event function can be called by the Xtra.

 

on DirectBalloonClick ( integer IconID )

This function is being called by the Xtra when the user clicks to dismiss a balloon ToolTip.

Parameter :

IconID : The ID of the tray bar icon whose balloon ToolTip is dismissed, as returned by diAddTrayIcon() when the icon was created.

Remarks :

Applications must first call diNotify(1) to install notifications before any event function can be called by the Xtra.

 

on DirectBalloonTimeOut ( integer IconID )

This function is being called by the Xtra when a balloon ToolTip is dismissed because of a timeout.

Parameter :

IconID : The ID of the tray bar icon whose balloon ToolTip is dismissed, as returned by diAddTrayIcon() when the icon was created.

Remarks :

Applications must first call diNotify(1) to install notifications before any event function can be called by the Xtra.

 

on DirectMouseDown ( integer X, integer Y, integer ButtonNum, integer IconID )

This function is being called by the Xtra when the user presses a mouse button while the cursor is over one of the application's windows, context menus or tray bar icons.

Parameters :

X : The X coordinate of the mouse cursor location, in pixels. The left most pixel on the screen is 0. The X coordinate increases as the mouse cursor moves right.

Y : The Y coordinate of the mouse cursor location, in pixels. The top most pixel on the screen is 0. The y coordinate increases as the mouse cursor moves down.

ButtonNum : The number of the button that was pressed. Can be one of the following values:

1 - The left button.
2 - The right button.
3 - The middle button.
4 - The first extra button.
5 - The second extra button.

 

IconID : The ID of the tray bar icon on which the mouse button was pressed or 0 if the mouse button was pressed over one of the application's windows or context menus.

Remarks :

The Xtra can not distinguish between the first and second extra buttons when the mouse event is associated with a tray bar icon. As a result, the ButtonNum parameter will always be set to 5 if one of the two extra buttons is pressed.

Applications must first call diNotify(1) to install notifications before any event function can be called by the Xtra.

 

on DirectMouseUp ( integer X, integer Y, integer ButtonNum, integer IconID )

This function is being called by the Xtra when the user releases a mouse button while the cursor is over one of the application's windows, context menus or tray bar icons.

Parameters :

X : The X coordinate of the mouse cursor location, in pixels. The left most pixel on the screen is 0. The X coordinate increases as the mouse cursor moves right.

Y : The Y coordinate of the mouse cursor location, in pixels. The top most pixel on the screen is 0. The y coordinate increases as the mouse cursor moves down.

ButtonNum : The number of the button that was released. Can be one of the following values:

1 - The left button.
2 - The right button.
3 - The middle button.
4 - The first extra button.
5 - The second extra button.

 

IconID : The ID of the tray bar icon on which the mouse button was released or 0 if the mouse button was released over one of the application's windows or context menus.

Remarks :

The Xtra can not distinguish between the first and second extra buttons when the mouse event is associated with a tray bar icon. As a result, the ButtonNum parameter will always be set to 5 if one of the two extra buttons is released.

Applications must first call diNotify(1) to install notifications before any event function can be called by the Xtra.

 

on DirectMouseDoubleClick ( integer X, integer Y, integer ButtonNum, integer IconID )

This function is being called by the Xtra when the user double clicks a mouse button while the cursor is over one of the application's windows, context menus or tray bar icons.

Parameters :

X : The X coordinate of the mouse cursor location, in pixels. The left most pixel on the screen is 0. The X coordinate increases as the mouse cursor moves right.

Y : The Y coordinate of the mouse cursor location, in pixels. The top most pixel on the screen is 0. The y coordinate increases as the mouse cursor moves down.

ButtonNum : The number of the button that was double clicked. Can be one of the following values:

1 - The left button.
2 - The right button.
3 - The middle button.
4 - The first extra button.
5 - The second extra button.

 

IconID : The ID of the tray bar icon on which the mouse button was double clicked or 0 if the mouse button was released over one of the application's windows or context menus.

Remarks :

The Xtra can not distinguish between the first and second extra buttons when the mouse event is associated with a tray bar icon. As a result, the ButtonNum parameter will always be set to 5 if one of the two extra buttons is double clicked.

Applications must first call diNotify(1) to install notifications before any event function can be called by the Xtra.

 

on DirectMouseMove ( integer X, integer Y, integer IconID )

This function is being called by the Xtra when the user moves the mouse over one of the application's windows, context menus or tray bar icons.

Parameters :

X : The X coordinate of the mouse cursor location, in pixels. The left most pixel on the screen is 0. The X coordinate increases as the mouse cursor moves right.

Y : The Y coordinate of the mouse cursor location, in pixels. The top most pixel on the screen is 0. The y coordinate increases as the mouse cursor moves down.

ID : The ID of the tray bar icon on which the mouse is on or 0 if the mouse is over one of the application's windows or context menus.

Remarks :

Applications must first call diNotify(1) to install notifications before any event function can be called by the Xtra.

 

on DirectMouseWheel ( integer X, integer Y, integer Movement )

This function is being called by the Xtra when the user rotates the mouse wheel while the application is in focus.

Parameters :

X : The X coordinate of the mouse cursor location, in pixels. The left most pixel on the screen is 0. The X coordinate increases as the mouse cursor moves right.

Y : The Y coordinate of the mouse cursor location, in pixels. The top most pixel on the screen is 0. The y coordinate increases as the mouse cursor moves down.

Movement : The distance the wheel is rotated, expressed in multiples or divisions of 120. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user.

Remarks :

The wheel rotation will be a multiple of delta, which is set at 120. This is the threshold for action to be taken, and one such action (for example, scrolling one increment) should occur for each delta.

The delta was set to 120 to allow Microsoft or other vendors to build finer-resolution wheels in the future, including perhaps a freely-rotating wheel with no notches. The expectation is that such a device would send more messages per rotation, but with a smaller value in each message. To support this possibility, you should either add the incoming delta values until 120 is reached (so for a delta-rotation you get the same response), or scroll partial lines in response to the more frequent messages. You could also choose your scroll granularity and accumulate deltas until it is reached.

Remarks :

Applications must first call diNotify(1) to install notifications before any event function can be called by the Xtra.

 

on DirectScreenSaverActivate ( )

This function is being called by the Xtra when the screen saver application is executed as a result of system inactivity.

Remarks :

Applications must first call diNotify(1) to install notifications before any event function can be called by the Xtra.

 

on DirectWindowActivate ( integer Active )

This function is being called by the Xtra when the application window becomes active or inactive.

Parameter :

Active : This parameter is set to 1 when the application window is activated and to zero when the application window is deactivated.

Remarks :

This function is typically being called when the user switches to or from the application. If the application window is being activated and is not minimized it gains the keyboard focus.

Remarks :

Applications must first call diNotify(1) to install notifications before any event function can be called by the Xtra.



DirectXtras Inc.
P.O Box 2645, Menlo Park, CA, 94026, U.S.A
Voice: +1-415-5058249, Fax: +1-801-8585841
Toll Free: 1-800-4453093
E-mail General Information: info@directxtras.com
E-mail Technical Support: support@directxtras.com

Copyright © 1996-2004 DirectXtras Inc. All Rights Reserved.
WebMaster: tamar@directxtras.com
Last Updated: 1/30/2003 5:31:46 PM.