// Borland C++ Builder
// Copyright (c) 1995, 2002 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'RVUni.pas' rev: 6.00

#ifndef RVUniHPP
#define RVUniHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <RVTypes.hpp>	// Pascal unit
#include <RVScroll.hpp>	// Pascal unit
#include <RVStyle.hpp>	// Pascal unit
#include <RVItem.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Rvuni
{
//-- type declarations -------------------------------------------------------
typedef int TRVIntegerArray[100001];

typedef int *PRVIntegerArray;

typedef unsigned TRVUnsignedArray[100001];

typedef unsigned *PRVUnsignedArray;

typedef Word TRVWordArray[100001];

typedef Word *PRVWordArray;

#pragma option push -b-
enum TRVUnicodeTestResult { rvutNo, rvutYes, rvutProbably, rvutEmpty, rvutError };
#pragma option pop

//-- var, const, procedure ---------------------------------------------------
static const Word UNI_LF = 0xa;
static const Word UNI_CR = 0xd;
static const Word UNI_LineSeparator = 0x2028;
static const Word UNI_ParagraphSeparator = 0x2029;
static const Word UNI_Tab = 0x9;
static const Word UNI_VerticalTab = 0xb;
static const Word UNI_FormFeed = 0xc;
static const Word UNI_LSB_FIRST = 0xfeff;
static const Word UNI_MSB_FIRST = 0xfffe;
static const Word UNI_FF = 0xc;
static const Word UNI_HYPHEN = 0x2d;
static const Word UNI_Space = 0x20;
static const Word UNI_ZERO_WIDTH_SPACE = 0x200b;
static const Word UNI_ZERO_WIDTH_JOINER = 0x200d;
static const Word UNI_WORD_JOINER = 0x2060;
static const Word UNI_SOFT_HYPHEN = 0xad;
static const Word UNI_NOT_SIGN = 0xac;
static const Word UNI_NON_BREAKING_HYPHEN = 0x2011;
static const char UNI_LSB_FIRST1 = '\xff';
static const char UNI_LSB_FIRST2 = '\xfe';
extern PACKAGE bool RVNT;
extern PACKAGE unsigned __fastcall RVMAKELCID(Word plgid);
extern PACKAGE void * __fastcall RVU_FindLineBreak(PRVWordArray Str, int Length, bool FullString);
extern PACKAGE bool __fastcall RVU_GetTextCaretPos(Graphics::TCanvas* Canvas, const AnsiString s, PRVIntegerArray PCP, Rvitem::TRVItemOptions ItemOptions, int Width);
extern PACKAGE bool __fastcall RVU_GetTextGlyphDX(Graphics::TCanvas* Canvas, const AnsiString s, PRVIntegerArray PDx, PRVWordArray PGlyphs, Rvitem::TRVItemOptions ItemOptions, int Width, int &nGlyphs);
extern PACKAGE bool __fastcall RVU_GetTextRangeCoords(Graphics::TCanvas* Canvas, const AnsiString s, int RangeStartOffs, int RangeLength, Rvitem::TRVItemOptions ItemOptions, int Width, int &X1, int &X2);
extern PACKAGE AnsiString __fastcall RVU_Copy(const AnsiString s, int Index, int Count, Rvitem::TRVItemOptions ItemOptions);
extern PACKAGE void __fastcall RVU_GetTextExtentPoint32W(Graphics::TCanvas* Canvas, void * str, int Len, tagSIZE &sz);
extern PACKAGE void __fastcall RVU_GetTextExtentExPoint(Graphics::TCanvas* Canvas, const AnsiString s, int MaxExtent, int &Fit, PRVIntegerArray PDx, Rvitem::TRVItemOptions ItemOptions);
extern PACKAGE void __fastcall RVU_GetTextExtentExPointPC(Graphics::TCanvas* Canvas, char * pc, int Length, int MaxExtent, int &Fit, PRVIntegerArray PDx, Rvitem::TRVItemOptions ItemOptions, tagSIZE &sz);
extern PACKAGE int __fastcall RVU_Length(const AnsiString s, Rvitem::TRVItemOptions ItemOptions);
extern PACKAGE int __fastcall RVU_TextWidth(const AnsiString s, Graphics::TCanvas* Canvas, Rvitem::TRVItemOptions ItemOptions);
extern PACKAGE bool __fastcall RVU_IsSpace(const AnsiString s, int Index, Rvitem::TRVItemOptions ItemOptions);
extern PACKAGE void __fastcall RVU_Delete(AnsiString &s, int Index, int Count, Rvitem::TRVItemOptions ItemOptions);
extern PACKAGE void __fastcall RVU_Insert(const AnsiString Source, AnsiString &s, int Index, Rvitem::TRVItemOptions ItemOptions);
extern PACKAGE int __fastcall RVU_OffsInPChar(int Offs, Rvitem::TRVItemOptions ItemOptions);
extern PACKAGE bool __fastcall RVU_DrawSelectedTextEx(int Left, int Top, int Width, int Height, const AnsiString s, Graphics::TCanvas* Canvas, Graphics::TCanvas* RefCanvas, int Index1, int Index2, Rvitem::TRVItemOptions ItemOptions, Rvscroll::TRVBiDiMode BiDiMode);
extern PACKAGE Graphics::TFontCharset __fastcall RVU_CodePage2Charset(Rvstyle::TRVCodePage CodePage);
extern PACKAGE Rvstyle::TRVCodePage __fastcall RVU_Charset2CodePage(Graphics::TFontCharset Charset);
extern PACKAGE unsigned __fastcall RVU_Charset2Language(Graphics::TFontCharset Charset);
extern PACKAGE WideString __fastcall RVU_RawUnicodeToWideString(const AnsiString s);
extern PACKAGE AnsiString __fastcall RVU_GetRawUnicode(const WideString s);
extern PACKAGE void __fastcall RVU_SwapWordBytes(PWORD arr, int Count);
extern PACKAGE void __fastcall RVU_ProcessByteOrderMark(PWORD &arr, int Count);
extern PACKAGE AnsiString __fastcall RVU_AnsiToUnicode(Rvstyle::TRVCodePage CodePage, const AnsiString s);
extern PACKAGE AnsiString __fastcall RVU_AnsiToUTF8(Rvstyle::TRVCodePage CodePage, const AnsiString s);
extern PACKAGE AnsiString __fastcall RVU_UnicodeToAnsi(Rvstyle::TRVCodePage CodePage, const AnsiString s);
extern PACKAGE bool __fastcall RVU_CanBeConvertedToAnsi(Rvstyle::TRVCodePage CodePage, const AnsiString s);
extern PACKAGE TRVUnicodeTestResult __fastcall RV_TestStreamUnicode(Classes::TStream* Stream);
extern PACKAGE TRVUnicodeTestResult __fastcall RV_TestFileUnicode(const AnsiString FileName);
extern PACKAGE TRVUnicodeTestResult __fastcall RV_TestStringUnicode(const AnsiString s);
extern PACKAGE Rvstyle::TRVCodePage __fastcall RVU_GetKeyboardCodePage(void);
extern PACKAGE unsigned __fastcall RVU_GetKeyboardLanguage(void);
extern PACKAGE AnsiString __fastcall RVU_KeyToUnicode(const AnsiString Key);
extern PACKAGE void * __fastcall RVU_StrScanW(void * Str, Word Ch, int Length);
extern PACKAGE unsigned __fastcall RVU_StrLenW(void * Str);
extern PACKAGE void __fastcall RVU_WriteHTMLEncodedUnicode(Classes::TStream* Stream, const AnsiString s, bool NoEmptyLines, bool SpecialCode);
extern PACKAGE AnsiString __fastcall RVU_GetHTMLEncodedUnicode(const AnsiString s, bool SpecialCode);
extern PACKAGE AnsiString __fastcall RVU_UnicodeToUTF8(const AnsiString s, bool SpecialCode);
extern PACKAGE AnsiString __fastcall RV_ReturnProcessedString(const AnsiString s, Rvstyle::TFontInfo* TextStyle, bool LastOnLine, bool ShowSpecialChars, bool ForDisplay);
extern PACKAGE void * __fastcall StrPosW(void * Str, void * SubStr);
extern PACKAGE AnsiString __fastcall RVU_RawByteStringToString(const AnsiString s, bool RawUnicode, Rvstyle::TRVCodePage CodePage);
extern PACKAGE AnsiString __fastcall RVU_StringToRawByteString(const AnsiString s, bool RawUnicode, Rvstyle::TRVCodePage CodePage);

}	/* namespace Rvuni */
using namespace Rvuni;
#pragma option pop	// -w-
#pragma option pop	// -Vx

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// RVUni
