Public Attributes

NotifyInfo Struct Reference

This reference page is linked to from the following overview topics: Broadcast Notification System.


Search for all occurrences

Detailed Description

3ds Max supports a system where a plug-in can ask to receive a callback when certain events occur.

These are events such as the system unit settings changing, system time setting changing, or the user executing File/Reset, File/New, etc.

This structure is part of this system. It is available in release 2.0 and later only. The Interface class has related methods for registering callbacks.

The plug-in creates a callback function to process the notification. The notification callback function (NOTIFYPROC) is defined as follows:
typedef void (* NOTIFYPROC)(void *param, NotifyInfo *info);
The NotifyInfo structure is passed to the NOTIFYPROC to inform it of what it's being notified about.

The sample code below shows how this system may be used.

Sample Code:
// Declare the callback function
static void TimeUnitsChanged(void *param, NotifyInfo *info)
{
// Handle the units changing...
}
// Register the callback
RegisterNotification(TimeUnitsChanged,this, NOTIFY_TIMEUNITS_CHANGE);

// When done, unregister the callback
UnRegisterNotification(TimeUnitsChanged,this, NOTIFY_TIMEUNITS_CHANGE);
See Functions:
RegisterNotification(NOTIFYPROC proc, void *param, int code);
UnRegisterNotification(NOTIFYPROC proc, void *param, int code);
BroadcastNotification(int code);
BroadcastNotification(int code, void *callParam);
UnRegisterNotification(NOTIFYPROC proc, void *param);

#include <notify.h>

Inheritance diagram for NotifyInfo:
Inheritance graph
[legend]

List of all members.

Public Attributes

int  intcode
void *  callParam
  This pointer is available in release 3.0 and later only.

Member Data Documentation

int intcode
void* callParam

This pointer is available in release 3.0 and later only.


This parameter can be passed in with the function BroadcastNotification(int code, void *callParam).