#ifndef _MEWLIB_
#define _MEWLIB_

#DEFINE WM_CHILDSIZE     (WM_USER + 100) // Client Size changing to Children
#DEFINE WM_PARENTSIZE    (WM_USER + 101)
#DEFINE WM_STATCLICK     (WM_USER + 102) // Messages from StatWin
#DEFINE WM_NEWACTIVEMDI	 (WM_USER + 106) // New active MDI window
#DEFINE WM_STATPREF      (WM_USER + 107)
#DEFINE WM_NEEDPARENTSIZE (WM_USER + 108)
#DEFINE WM_MEW_OPENFILE32 (WM_USER + 120)
#DEFINE WM_MEW_DLGRETURN (WM_USER + 200)

#DEFINE _FC_IGNORE_CASE   0x0001
#DEFINE _FC_IGNORE_INDENT 0x0002
#DEFINE _FC_IGNORE_BLANK  0x0004


IMPORT WORD   MEW_RegisterDLL           ( ASCIIZ name ) MEWLIB 2;
IMPORT WORD   MEW_UnregisterDLL         ( ASCIIZ name ) MEWLIB 61;
IMPORT WORD   MEW_3dSubClassCtl         ( WORD h ) MEWLIB 62;
IMPORT WORD   MEW_3dSubClassDlgEx       ( WORD h ) MEWLIB 63;

IMPORT WORD   HookFilePromptWithMacro   ( POINTER fileRec, ASCIIZ macro_name)   MEWLIB 10;
IMPORT WORD   HookColorPromptWithMacro  ( POINTER colorRec, ASCIIZ macro_name)  MEWLIB 11;
IMPORT WORD   HookPrintPromptWithMacro  ( POINTER printRec, ASCIIZ pd_macro_name, ASCIIZ ps_macro_name ) MEWLIB 12;
IMPORT WORD   HookFontPromptWithMacro   ( POINTER fontRec, ASCIIZ macro_name)   MEWLIB 13;

IMPORT VOID   GetGlobalStructure        ( WORD handle, POINTER dest, WORD size) MEWLIB 15;
IMPORT VOID   SetGlobalStructure        ( WORD handle, POINTER src,  WORD size) MEWLIB 16;

IMPORT BYTE   UseLongNames              () MEWLIB 21;
IMPORT VOID   ZShortenPath ( *ASCIIZ fpath, WORD max, HDC dc, HFONT font, WORD wPixels ) MEWLIB 22;

IMPORT DWORD  GetShiftUpTime            () MEWLIB 31;
IMPORT DWORD  GetCtrlUpTime             () MEWLIB 32;
IMPORT DWORD  GetAltUpTime              () MEWLIB 33;
IMPORT BYTE   InqInMouseLoop            () MEWLIB 34;

IMPORT VOID		MEW_ScrollUp( WORD count ) MEWLIB 40;
IMPORT VOID		MEW_ScrollDown( WORD count ) MEWLIB 41;
IMPORT VOID   MEW_Set_C_Row( DWORD wn, WORD r ) MEWLIB 42;

IMPORT VOID   SetCursorLock             ( DWORD win, DWORD id ) MEWLIB 150;

  // Set the global search highlight string
  // NOTE setting it to "" will turn global search highlight off
IMPORT VOID   SetSearchHighlightStr     ( ASCIIZ s, DWORD flags )  MEWLIB 151;
  // Store the global search highlight string into str s
IMPORT VOID   GetSearchHighlightStr     ( *ASCIIZ s, *DWORD flags ) MEWLIB 152;

IMPORT VOID   DrawBitmap    (HDC xdc, HBITMAP xbitmap, WORD xStart, WORD yStart, WORD flags)  MEWLIB 50;
IMPORT VOID   DrawBitmap256 (HDC xdc, WORD xbitmap, WORD xStart, WORD yStart, WORD flags)     MEWLIB 51;
IMPORT VOID   DrawBitmapBkColorEx (HDC xdc, WORD handle, POINTER tr, WORD flags, WORD idx, DWORD tc)  MEWLIB 52;
IMPORT VOID   DrawBitmapBkColorRes(HDC xdc, ASCIIZ p, WORD xStart, WORD yStart, WORD flags, WORD idx, DWORD tc)  MEWLIB 53;

IMPORT WORD   MewGetWinActive     ()          MEWLIB 213;
IMPORT DWORD  MEW32Message        ( WORD message, WORD wparam, DWORD lparam ) MEWLIB 80;
IMPORT WORD   GetOpenFile32Count  ()          MEWLIB 221;
IMPORT VOID   SetOpenFile32Count  ( WORD c )  MEWLIB 222;

IMPORT WORD   Win3_Copy     () MEWLIB 200;
IMPORT WORD   Win3_Paste    () MEWLIB 201;
IMPORT WORD   Win3_Clipboard() MEWLIB 202;
IMPORT BOOL   BufferToText  ( tGlobalHandle vp )                        MEWLIB 203;
IMPORT WORD   TextToBuffer  ( *DWORD vp, WORD s, BOOL realloc_to_size ) MEWLIB 204;

IMPORT VOID   BufferEraseNoReset()                                            MEWLIB 210;
IMPORT VOID   BufferLoadFile    ( ASCIIZ fn, DWORD linecount, BOOL no_reset)  MEWLIB 211;

IMPORT BYTE   WcmdIsEnabled   ( WORD window_num, WORD wid )                   MEWLIB 212;
IMPORT DWORD  ProcessDisableString( ASCIIZ s )                                MEWLIB 214;

IMPORT VOID   EncryptStr  ( POINTER s, POINTER key )  MEWLIB 6;
IMPORT VOID   DecypherStr ( POINTER s, POINTER key )  MEWLIB 7;

IMPORT BYTE   GetToolbarUpdate  ()                    MEWLIB 8;
IMPORT VOID   SetToolbarUpdate  ( BYTE b )            MEWLIB 9;

IMPORT BYTE   Fcompare  ( WORD w1, WORD w2, WORD tw, *DWORD c1, *DWORD c2,
                          DWORD line_count1, DWORD line_count2,
                          *DWORD twl, DWORD true_eof1, DWORD true_eof2,
                          WORD flags
                        ) MEWLIB 65;

IMPORT INT    ActivateAppMenu ( ASCIIZ app, ASCIIZ windowclass, ASCIIZ menustr, Word Active ) MEWLIB 70;
IMPORT WORD   FindTask        ( ASCIIZ app )                      MEWLIB 71;
IMPORT WORD   FindTaskWindow  ( WORD task, ASCIIZ windowclass )   MEWLIB 72;
IMPORT WORD   FindChildWindow ( WORD parent, ASCIIZ windowclass ) MEWLIB 73;
IMPORT INT    ActivateWinMenu ( WORD wnd, ASCIIZ menustr, Word Active ) MEWLIB 74;

IMPORT DWORD  GetStartupMem   () MEWLIB 90;
IMPORT DWORD  GetMemAvail     () MEWLIB 91;
IMPORT DWORD  GetTotalVMBlocks() MEWLIB 92;
IMPORT DWORD  GetFileVMBlocks () MEWLIB 93;

IMPORT WORD   Get_Window_Font ( WORD wn,  *ASCIIZ font_name, *INT font_size,
                                *WORD Oem_Ansi)         MEWLIB 230;
IMPORT WORD   Get_Window_Font_Handle ( WORD wn, *WORD nhandle, *WORD bhandle,
                                *WORD ihandle, *WORD ibhandle) MEWLIB 231;
IMPORT WORD   Set_Window_Font ( WORD wn, ASCIIZ font_name, INT font_size,
                                WORD Oem_Ansi)          MEWLIB 232;

IMPORT WORD   Get_OEM_Ansi    (WORD wn)                 MEWLIB 240;
IMPORT VOID   Set_OEM_Ansi    (WORD wn, WORD Oem_Ansi)  MEWLIB 241;

IMPORT WORD   RulerOn         (Word wn)                 MEWLIB 250;
IMPORT WORD   RulerOff        (Word wn)                 MEWLIB 251;
IMPORT WORD   RulerStatus     (Word wn)                 MEWLIB 252;
IMPORT WORD   RulerZero       (Word wn, WORD pos)       MEWLIB 253;

IMPORT WORD   PrintFromWindow   ( WORD parent, WORD win, POINTER pds, POINTER pPrnOpt) MEWLIB 20;
IMPORT WORD   GetDevNamesHandle ()                      MEWLIB 260;
IMPORT WORD   SetDevNamesHandle (WORD handle)           MEWLIB 261;
IMPORT WORD   GetDevModeHandle  ()                      MEWLIB 262;
IMPORT WORD   SetDevModeHandle  (WORD handle)           MEWLIB 263;

IMPORT WORD		SetRepeat					(WORD count, WORD key, WORD refresh)  MEWLIB 270;

#endif