// CodeGear C++Builder
// Copyright (c) 1995, 2009 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Rvuni.pas' rev: 21.00

#ifndef RvuniHPP
#define RvuniHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Ansistrings.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Rvitem.hpp>	// Pascal unit
#include <Rvstyle.hpp>	// Pascal unit
#include <Rvscroll.hpp>	// Pascal unit
#include <Rvtypes.hpp>	// Pascal unit
#include <Rvgrin.hpp>	// Pascal unit

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

namespace Rvuni
{
//-- type declarations -------------------------------------------------------
typedef StaticArray<int, 100001> TRVIntegerArray;

typedef TRVIntegerArray *PRVIntegerArray;

typedef StaticArray<unsigned, 100001> TRVUnsignedArray;

typedef TRVUnsignedArray *PRVUnsignedArray;

typedef StaticArray<System::Word, 100001> TRVWordArray;

typedef TRVWordArray *PRVWordArray;

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

//-- var, const, procedure ---------------------------------------------------
static const System::Word UNI_LF = 0xa;
static const System::Word UNI_CR = 0xd;
static const System::Word UNI_LineSeparator = 0x2028;
static const System::Word UNI_ParagraphSeparator = 0x2029;
static const System::Word UNI_Tab = 0x9;
static const System::Word UNI_VerticalTab = 0xb;
static const System::Word UNI_FormFeed = 0xc;
static const System::Word UNI_LSB_FIRST = 0xfeff;
static const System::Word UNI_MSB_FIRST = 0xfffe;
static const System::Word UNI_FF = 0xc;
static const System::Word UNI_HYPHEN = 0x2d;
static const System::Word UNI_Space = 0x20;
static const System::Word UNI_ZERO_WIDTH_SPACE = 0x200b;
static const System::Word UNI_ZERO_WIDTH_JOINER = 0x200d;
static const System::Word UNI_WORD_JOINER = 0x2060;
static const System::Word UNI_SOFT_HYPHEN = 0xad;
static const System::Word UNI_NOT_SIGN = 0xac;
static const System::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(System::Word plgid);
extern PACKAGE void * __fastcall RVU_FindLineBreak(PRVWordArray Str, int Length, bool FullString, bool IgnoreEndingSpaces);
extern PACKAGE int __fastcall RVU_FindFirstLineBreak(Rvtypes::TRVRawByteString Str, System::Word PrevChar, bool SpacesBefore, System::Word &LastChar);
extern PACKAGE bool __fastcall RVU_GetTextCaretPos(Graphics::TCanvas* Canvas, const Rvtypes::TRVRawByteString s, PRVIntegerArray PCP, Rvitem::TRVItemOptions ItemOptions, int Width, int Delta, Rvgrin::TRVGraphicInterface* GraphicInterface);
extern PACKAGE bool __fastcall RVU_GetTextGlyphDX(Graphics::TCanvas* Canvas, const Rvtypes::TRVRawByteString 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 Rvtypes::TRVRawByteString s, int RangeStartOffs, int RangeLength, Rvitem::TRVItemOptions ItemOptions, int Width, int Delta, int &X1, int &X2, Rvgrin::TRVGraphicInterface* GraphicInterface);
extern PACKAGE Rvtypes::TRVRawByteString __fastcall RVU_Copy(const Rvtypes::TRVRawByteString 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 Rvtypes::TRVRawByteString 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 Rvtypes::TRVRawByteString s, Rvitem::TRVItemOptions ItemOptions);
extern PACKAGE int __fastcall RVU_TextWidth(const Rvtypes::TRVRawByteString s, Graphics::TCanvas* Canvas, Rvitem::TRVItemOptions ItemOptions, Rvgrin::TRVGraphicInterface* GraphicInterface);
extern PACKAGE bool __fastcall RVU_IsSpace(const Rvtypes::TRVRawByteString s, int Index, Rvitem::TRVItemOptions ItemOptions);
extern PACKAGE void __fastcall RVU_Delete(Rvtypes::TRVRawByteString &s, int Index, int Count, Rvitem::TRVItemOptions ItemOptions);
extern PACKAGE void __fastcall RVU_Insert(const Rvtypes::TRVRawByteString Source, Rvtypes::TRVRawByteString &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 Rvtypes::TRVRawByteString 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 Rvtypes::TRVUnicodeString __fastcall RVU_RawUnicodeToWideString(const Rvtypes::TRVRawByteString s);
extern PACKAGE Rvtypes::TRVRawByteString __fastcall RVU_GetRawUnicode(const Rvtypes::TRVUnicodeString s);
extern PACKAGE void __fastcall RVU_SwapWordBytes(PWORD arr, int Count);
extern PACKAGE void __fastcall RVU_ProcessByteOrderMark(PWORD &arr, int Count);
extern PACKAGE Rvtypes::TRVRawByteString __fastcall RVU_AnsiToUnicode(Rvstyle::TRVCodePage CodePage, const Rvtypes::TRVAnsiString s);
extern PACKAGE Rvtypes::TRVRawByteString __fastcall RVU_AnsiToUTF8(Rvstyle::TRVCodePage CodePage, const Rvtypes::TRVAnsiString s);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RVU_UnicodeToAnsi(Rvstyle::TRVCodePage CodePage, const Rvtypes::TRVRawByteString s);
extern PACKAGE bool __fastcall RVU_CanBeConvertedToAnsi(Rvstyle::TRVCodePage CodePage, const Rvtypes::TRVRawByteString s);
extern PACKAGE TRVUnicodeTestResult __fastcall RV_TestStreamUnicode(Classes::TStream* Stream);
extern PACKAGE TRVUnicodeTestResult __fastcall RV_TestFileUnicode(const System::UnicodeString FileName);
extern PACKAGE TRVUnicodeTestResult __fastcall RV_TestStringUnicode(const Rvtypes::TRVRawByteString s);
extern PACKAGE Rvstyle::TRVCodePage __fastcall RVU_GetKeyboardCodePage(void);
extern PACKAGE unsigned __fastcall RVU_GetKeyboardLanguage(void);
extern PACKAGE Rvtypes::TRVRawByteString __fastcall RVU_KeyToUnicode(const Rvtypes::TRVAnsiString Key);
extern PACKAGE void * __fastcall RVU_StrScanW(void * Str, System::Word Ch, int Length);
extern PACKAGE unsigned __fastcall RVU_StrLenW(void * Str);
extern PACKAGE void __fastcall RVU_WriteHTMLEncodedUnicode(Classes::TStream* Stream, const Rvtypes::TRVRawByteString s, bool NoEmptyLines, bool SpecialCode, bool NextSpace);
extern PACKAGE Rvtypes::TRVAnsiString __fastcall RVU_GetHTMLEncodedUnicode(const Rvtypes::TRVRawByteString s, bool SpecialCode, bool NextSpace);
extern PACKAGE Rvtypes::TRVRawByteString __fastcall RVU_GetHTMLUTF8EncodedUnicode(const Rvtypes::TRVRawByteString s, bool SpecialCode, bool NextSpace);
extern PACKAGE Rvtypes::TRVRawByteString __fastcall RV_ReturnProcessedStringEx(const Rvtypes::TRVRawByteString s, Rvstyle::TFontInfo* TextStyle, bool LastOnLine, bool ShowSpecialChars, bool ForDisplay, int &SelOffs1, int &SelOffs2);
extern PACKAGE Rvtypes::TRVRawByteString __fastcall RV_ReturnProcessedString(const Rvtypes::TRVRawByteString s, Rvstyle::TFontInfo* TextStyle, bool LastOnLine, bool ShowSpecialChars, bool ForDisplay);
extern PACKAGE void * __fastcall StrPosW(void * Str, void * SubStr);
extern PACKAGE void * __fastcall StrPosLW(void * Str, void * SubStr, int StrLen, int SubStrLen);
extern PACKAGE System::UnicodeString __fastcall RVU_RawByteStringToString(const Rvtypes::TRVRawByteString s, bool RawUnicode, Rvstyle::TRVCodePage CodePage);
extern PACKAGE Rvtypes::TRVRawByteString __fastcall RVU_StringToRawByteString(const System::UnicodeString s, bool RawUnicode, Rvstyle::TRVCodePage CodePage);

}	/* namespace Rvuni */
using namespace Rvuni;
#pragma pack(pop)
#pragma option pop

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