3ds Max C++ API Reference
Loading...
Searching...
No Matches
NotifyInfo Struct Reference

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

#include <C:/adskgit/3dsmax/3dsmax/3dswin/src/maxsdk/include/notifyParams.h>

Inheritance diagram for NotifyInfo:

Classes

struct  notify_call_param_t
 struct that has the same size as a void* and behaves like a void*. More...

Public Attributes

NotifyCode intcode = 0
notify_call_param_t callParam = {}
 This param can be passed in with BroadcastNotification; Use GetNotifyParam to retrieve the callParam with the appropriate type in the notification callback.

Additional Inherited Members

Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown.
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned.
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned.
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown.
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned.
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen.
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen.
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen.
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.

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:
using NOTIFYPROC = void (*)(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 HandleFileOpen(void* param, NotifyInfo* info)
{
{
// Handle file open...
}
}
// Register the callback
// When done, unregister the callback
constexpr NotifyCode NOTIFY_FILE_POST_OPEN
Sent after a file is opened successfully.
Definition notify.h:150
notify_param_t< code > GetNotifyParam(NotifyInfo *info)
!
Definition notify.h:88
CoreExport int UnRegisterNotification(NOTIFYPROC proc, void *param, NotifyCode code)
CoreExport int RegisterNotification(NOTIFYPROC proc, void *param, NotifyCode code)
3ds Max supports a system where a plug-in can ask to receive a callback when certain events occur.
Definition notifyParams.h:89
The call parameter that accompanies the notification code NOTIFY_FILE_POST_OPEN.
Definition notifyParams.h:163
See Functions:
RegisterNotification(NOTIFYPROC proc, void* param, NotifyCode code);
UnRegisterNotification(NOTIFYPROC proc, void* param, NotifyCode code);
BroadcastNotification(NotifyCode code);
BroadcastNotification(NotifyCode code, void* callParam);
UnRegisterNotification(NOTIFYPROC proc, void *param);

Member Data Documentation

◆ intcode

NotifyCode intcode = 0

◆ callParam

notify_call_param_t callParam = {}

This param can be passed in with BroadcastNotification; Use GetNotifyParam to retrieve the callParam with the appropriate type in the notification callback.

111{};