//================================================================
// E3D library common things
//
// - Callbacks
// - Undoable operators core
// - System feature registry
//
// AUTHOR:  Gabor Nagy
// DATE:    2026-Apr-16 01:43:01
//
// Copyright (C) 1996-2026 by Gabor Nagy. All rights reserved.
//================================================================
#ifndef _E3D_h
#define _E3D_h

#ifndef _E3D_Types_h
#include <E3D/Types.h>
#endif


#if defined (__cplusplus) && (!(defined (__CPLUSLIBS)))
extern "C" {
#endif

//----------------------------------------------------------------
// Function prototypes
//----------------------------------------------------------------
extern void           E3d_CallCallbacks(ECoreObject* PCoreObject,  ECallbackRec* PCallbacks, const EIndex PNCallbacks,  ECallbackStruct* PCallData);

extern E3dCoordinate  E3d_SnapCoordinateTo(const E3dCoordinate PF, const E3dCoordinate PS);
extern void           E3d_ColorShadeByLuma(EcRGBAiColor* PColorLum, const EcRGBAiColor* PColor, EcRGBAiColor* PColorRet);

extern EBool          E3d_RectangleVisible(const E3dMatrix PWorldToClipMatrix, const E3dCoordinate PCenterX, const E3dCoordinate PCenterY, const E3dCoordinate PSizeX, const E3dCoordinate PSizeY);

EListA_s(extern, E3dFeaturePtr, E3d_Features);

extern E3dFeature*  E3dFeature_Register(const int PType, const char* PName);
extern E3dFeature*  E3dFeature_ByName(const char* PName);
extern void         E3dFeature_Deactivate(E3dFeature* PFeature);
extern void         E3dFeature_Remove(E3dFeature* PFeature);
extern void         E3dFeatures_Free(void);

extern void         E3dObjectsAndComponents_Print(const EObjectAndComponentsListA* PList);

#if defined (__cplusplus) && (!(defined (__CPLUSLIBS)))
}	// Close scope of 'extern "C"' declaration
#endif

#endif	// _E3D_h
