// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

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

#ifndef RVUniHPP
#define RVUniHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <RVGrIn.hpp>	// Pascal unit
#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 bool RVVista;
extern PACKAGE unsigned __fastcall RVMAKELCID(Word plgid);
extern PACKAGE void * __fastcall RVU_FindLineBreak(PRVWordArray Str, int Length, bool FullString, bool 
	IgnoreEndingSpaces);
extern PACKAGE int __fastcall RVU_FindFirstLineBreak(AnsiString Str, Word PrevChar, bool SpacesBefore
	, Word &LastChar);
extern PACKAGE bool __fastcall RVU_GetTextCaretPos(Graphics::TCanvas* Canvas, const AnsiString s, PRVIntegerArray 
	PCP, Rvitem::TRVItemOptions ItemOptions, int Width, int Delta, Rvgrin::TRVGraphicInterface* GraphicInterface
	);
extern PACKAGE bool __fastcall RVU_GetTextGlyphDX(Graphics::TCanvas* Canvas, const AnsiString s, PRVIntegerArray 
	PDx, PRVWordArray PGlyphs, Rvitem::TRVItemOptions ItemOptions, int Width, int &nGlyphs, Rvgrin::TRVGraphicInterface* 
	GraphicInterface);
extern PACKAGE bool __fastcall RVU_GetTextRangeCoords(Graphics::TCanvas* Canvas, const AnsiString s, 
	int RangeStartOffs, int RangeLength, Rvitem::TRVItemOptions ItemOptions, int Width, int Delta, int 
	&X1, int &X2, Rvgrin::TRVGraphicInterface* GraphicInterface);
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, Rvgrin::TRVGraphicInterface* GraphicInterface);
extern PACKAGE void __fastcall RVU_GetTextExtentExPoint(Graphics::TCanvas* Canvas, const AnsiString 
	s, int MaxExtent, int &Fit, PRVIntegerArray PDx, Rvitem::TRVItemOptions ItemOptions, Rvgrin::TRVGraphicInterface* 
	GraphicInterface);
extern PACKAGE void __fastcall RVU_GetTextExtentExPointPC(Graphics::TCanvas* Canvas, char * pc, int 
	Length, int MaxExtent, int &Fit, PRVIntegerArray PDx, Rvitem::TRVItemOptions ItemOptions, tagSIZE &
	sz, Rvgrin::TRVGraphicInterface* GraphicInterface);
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, Rvgrin::TRVGraphicInterface* GraphicInterface);
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, const AnsiString 
	s, Graphics::TCanvas* Canvas, Graphics::TCanvas* RefCanvas, int Index1, int Index2, Rvitem::TRVItemOptions 
	ItemOptions, Rvscroll::TRVBiDiMode BiDiMode, bool UseRefCanvasRes, Rvgrin::TRVGraphicInterface* GraphicInterface
	);
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, bool NextSpace);
extern PACKAGE AnsiString __fastcall RVU_GetHTMLEncodedUnicode(const AnsiString s, bool SpecialCode, 
	bool NextSpace);
extern PACKAGE AnsiString __fastcall RVU_GetHTMLUTF8EncodedUnicode(const AnsiString s, bool SpecialCode
	, bool NextSpace);
extern PACKAGE AnsiString __fastcall RV_ReturnProcessedStringEx(const AnsiString s, Rvstyle::TFontInfo* 
	TextStyle, bool LastOnLine, bool ShowSpecialChars, bool ForDisplay, int &SelOffs1, int &SelOffs2);
extern PACKAGE AnsiString __fastcall RV_ReturnProcessedString(const AnsiString s, Rvstyle::TFontInfo* 
	TextStyle, bool LastOnLine, bool ShowSpecialChars, bool ForDisplay);
extern PACKAGE WideString __fastcall Utf8Decode(const AnsiString S);
extern PACKAGE AnsiString __fastcall Utf8Encode(const WideString WS);
extern PACKAGE void * __fastcall StrPosW(void * Str, void * SubStr);
extern PACKAGE void * __fastcall StrPosLW(void * Str, void * SubStr, int StrLen, int SubStrLen);
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 */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Rvuni;
#endif
#pragma option pop	// -w-
#pragma option pop	// -Vx

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