//-----------------------------------------------------------------------------
// NINDOWS API
//-----------------------------------------------------------------------------

#ifndef _NWAPI_H_
#define _NWAPI_H_

extern "C" {
//-----------------------------------------------------------------------------
void nwInflateRect( PNWRECT pR, int n );
PNWCOLOR nwGetSystemColor( NWCOLORARRAY eColorArray );
int nwClipCheck( PNWRECT pClip, PNWRECT pRect );
PNWCONTROL nwGetTopControl( PNWPOINT p );
int nwCheckRect( PNWRECT pR, PNWPOINT pP );

void nwRegistCallback( NWCALLBACKCONTEXT eCtx, PNWCALLBACK pFunc );
void nwUnregistCallback( NWCALLBACKCONTEXT eCtx, PNWCALLBACK pFunc );
void nwRequestCallback( NWCALLBACKCONTEXT eCtx, void* pParam );

int nwGetGlobalIndex( void );
float nwGetZDepth( void );
void nwSetZDepth( float fZ );

PNWDESKTOP nwGetDesktop( void );
PNWFONT nwGetCurrentFont( void );
PNWBITMAP nwGetCurrentIcon( void );
PNWCONTROL nwGetCapture( void );
void nwGetCursorPos( PNWPOINT p );
void nwSetCursorPos( PNWPOINT p );
void nwHideGlobalPopup( void );

void nwBringToFront( PNWFORM pForm );
void nwSetActiveForm( PNWFORM pForm );
PNWFORM nwGetActiveForm( void );

PNWMENUITEM nwAddUserMenu( PNWMENUTEMPLATE pMenu );
void nwDelUserMenu( PNWMENUITEM pMenuItem );

void nwRegistForm( PNWFORM pForm );
void nwUnregistForm( PNWFORM pForm );

void nwShowDialog( PNWCONTROL pCtrl, char *pCaption, char *pMessage, int nShowFlags );
int nwCheckDebugCode( void );

int nwSendMessage( PNWCONTROL pControl, NWMSG eMsg, int nParamW, void* pParamL );
int nwPostMessage( PNWCONTROL pControl, NWMSG eMsg, int nParamW, void* pParamL );
int nwPeekMessage( PNWMESSAGE pMes );
//-----------------------------------------------------------------------------
}
#endif
