Module:    Win32-Rich-Edit
Copyright:    Original Code is Copyright (c) 1995-2004 Functional Objects, Inc.
              All rights reserved.
License:      See License.txt in this distribution for details.
Warranty:     Distributed WITHOUT WARRANTY OF ANY KIND

// This file is automatically generated from "richedit.h"; do not edit.

define inline-only constant $cchTextLimitDefault        = 32767;
define constant $RICHEDIT-CLASSA = "RichEdit20A";
define constant $RICHEDIT-CLASS10A = "RICHEDIT";
define constant $RICHEDIT-CLASSW = "RichEdit20W";
define inline-only constant $EM-CANPASTE                = #x432;
define inline-only constant $EM-DISPLAYBAND             = #x433;
define inline-only constant $EM-EXGETSEL                = #x434;
define inline-only constant $EM-EXLIMITTEXT             = #x435;
define inline-only constant $EM-EXLINEFROMCHAR          = #x436;
define inline-only constant $EM-EXSETSEL                = #x437;
define inline-only constant $EM-FINDTEXT                = #x438;
define inline-only constant $EM-FORMATRANGE             = #x439;
define inline-only constant $EM-GETCHARFORMAT           = #x43A;
define inline-only constant $EM-GETEVENTMASK            = #x43B;
define inline-only constant $EM-GETOLEINTERFACE         = #x43C;
define inline-only constant $EM-GETPARAFORMAT           = #x43D;
define inline-only constant $EM-GETSELTEXT              = #x43E;
define inline-only constant $EM-HIDESELECTION           = #x43F;
define inline-only constant $EM-PASTESPECIAL            = #x440;
define inline-only constant $EM-REQUESTRESIZE           = #x441;
define inline-only constant $EM-SELECTIONTYPE           = #x442;
define inline-only constant $EM-SETBKGNDCOLOR           = #x443;
define inline-only constant $EM-SETCHARFORMAT           = #x444;
define inline-only constant $EM-SETEVENTMASK            = #x445;
define inline-only constant $EM-SETOLECALLBACK          = #x446;
define inline-only constant $EM-SETPARAFORMAT           = #x447;
define inline-only constant $EM-SETTARGETDEVICE         = #x448;
define inline-only constant $EM-STREAMIN                = #x449;
define inline-only constant $EM-STREAMOUT               = #x44A;
define inline-only constant $EM-GETTEXTRANGE            = #x44B;
define inline-only constant $EM-FINDWORDBREAK           = #x44C;
define inline-only constant $EM-SETOPTIONS              = #x44D;
define inline-only constant $EM-GETOPTIONS              = #x44E;
define inline-only constant $EM-FINDTEXTEX              = #x44F;
define inline-only constant $EM-GETWORDBREAKPROCEX      = #x450;
define inline-only constant $EM-SETWORDBREAKPROCEX      = #x451;
define inline-only constant $EM-SETUNDOLIMIT            = #x452;
define inline-only constant $EM-REDO                    = #x454;
define inline-only constant $EM-CANREDO                 = #x455;
define inline-only constant $EM-GETUNDONAME             = #x456;
define inline-only constant $EM-GETREDONAME             = #x457;
define inline-only constant $EM-STOPGROUPTYPING         = #x458;
define inline-only constant $EM-SETTEXTMODE             = #x459;
define inline-only constant $EM-GETTEXTMODE             = #x45A;
// enum TEXTMODE:
define inline-only constant $TM-PLAINTEXT = 1;
define inline-only constant $TM-RICHTEXT = 2;
define inline-only constant $TM-SINGLELEVELUNDO = 4;
define inline-only constant $TM-MULTILEVELUNDO = 8;
define inline-only constant $TM-SINGLECODEPAGE = 16;
define inline-only constant $TM-MULTICODEPAGE = 32;

define inline-only constant $EM-AUTOURLDETECT           = #x45B;
define inline-only constant $EM-GETAUTOURLDETECT        = #x45C;
define inline-only constant $EM-SETPALETTE              = #x45D;
define inline-only constant $EM-GETTEXTEX               = #x45E;
define inline-only constant $EM-GETTEXTLENGTHEX         = #x45F;
define inline-only constant $EM-SETPUNCTUATION          = #x464;
define inline-only constant $EM-GETPUNCTUATION          = #x465;
define inline-only constant $EM-SETWORDWRAPMODE         = #x466;
define inline-only constant $EM-GETWORDWRAPMODE         = #x467;
define inline-only constant $EM-SETIMECOLOR             = #x468;
define inline-only constant $EM-GETIMECOLOR             = #x469;
define inline-only constant $EM-SETIMEOPTIONS           = #x46A;
define inline-only constant $EM-GETIMEOPTIONS           = #x46B;
define inline-only constant $EM-CONVPOSITION            = #x46C;
define inline-only constant $EM-SETLANGOPTIONS          = #x478;
define inline-only constant $EM-GETLANGOPTIONS          = #x479;
define inline-only constant $EM-GETIMECOMPMODE          = #x47A;
define inline-only constant $EM-FINDTEXTW               = #x47B;
define inline-only constant $EM-FINDTEXTEXW             = #x47C;
define inline-only constant $EM-SETBIDIOPTIONS          = #x4C8;
define inline-only constant $EM-GETBIDIOPTIONS          = #x4C9;
define inline-only constant $IMF-AUTOKEYBOARD           = #x0001;
define inline-only constant $IMF-AUTOFONT               = #x0002;
define inline-only constant $IMF-IMECANCELCOMPLETE      = #x0004;
define inline-only constant $IMF-IMEALWAYSSENDNOTIFY    = #x0008;
define inline-only constant $ICM-NOTOPEN                = #x0000;
define inline-only constant $ICM-LEVEL3                 = #x0001;
define inline-only constant $ICM-LEVEL2                 = #x0002;
define inline-only constant $ICM-LEVEL2-5               = #x0003;
define inline-only constant $ICM-LEVEL2-SUI             = #x0004;
define inline-only constant $EN-MSGFILTER               = #x0700;
define inline-only constant $EN-REQUESTRESIZE           = #x0701;
define inline-only constant $EN-SELCHANGE               = #x0702;
define inline-only constant $EN-DROPFILES               = #x0703;
define inline-only constant $EN-PROTECTED               = #x0704;
define inline-only constant $EN-CORRECTTEXT             = #x0705;
define inline-only constant $EN-STOPNOUNDO              = #x0706;
define inline-only constant $EN-IMECHANGE               = #x0707;
define inline-only constant $EN-SAVECLIPBOARD           = #x0708;
define inline-only constant $EN-OLEOPFAILED             = #x0709;
define inline-only constant $EN-OBJECTPOSITIONS         = #x070a;
define inline-only constant $EN-LINK                    = #x070b;
define inline-only constant $EN-DRAGDROPDONE            = #x070c;
define inline-only constant $EN-ALIGN-LTR               = #x0710;
define inline-only constant $EN-ALIGN-RTL               = #x0711;
define inline-only constant $ENM-NONE                   = #x00000000;
define inline-only constant $ENM-CHANGE                 = #x00000001;
define inline-only constant $ENM-UPDATE                 = #x00000002;
define inline-only constant $ENM-SCROLL                 = #x00000004;
define inline-only constant $ENM-KEYEVENTS              = #x00010000;
define inline-only constant $ENM-MOUSEEVENTS            = #x00020000;
define inline-only constant $ENM-REQUESTRESIZE          = #x00040000;
define inline-only constant $ENM-SELCHANGE              = #x00080000;
define inline-only constant $ENM-DROPFILES              = #x00100000;
define inline-only constant $ENM-PROTECTED              = #x00200000;
define inline-only constant $ENM-CORRECTTEXT            = #x00400000;
define inline-only constant $ENM-SCROLLEVENTS           = #x00000008;
define inline-only constant $ENM-DRAGDROPDONE           = #x00000010;
define inline-only constant $ENM-IMECHANGE              = #x00800000;
define inline-only constant $ENM-LANGCHANGE             = #x01000000;
define inline-only constant $ENM-OBJECTPOSITIONS        = #x02000000;
define inline-only constant $ENM-LINK                   = #x04000000;
define inline-only constant $ES-SAVESEL                 = #x00008000;
define inline-only constant $ES-SUNKEN                  = #x00004000;
define inline-only constant $ES-DISABLENOSCROLL         = #x00002000;
define inline-only constant $ES-SELECTIONBAR            = #x01000000;
define inline-only constant $ES-NOOLEDRAGDROP           = #x00000008;
define inline-only constant $ES-EX-NOCALLOLEINIT        = #x01000000;
define inline-only constant $ES-VERTICAL                = #x00400000;
define inline-only constant $ES-NOIME                   = #x00080000;
define inline-only constant $ES-SELFIME                 = #x00040000;
define inline-only constant $ECO-AUTOWORDSELECTION      = #x00000001;
define inline-only constant $ECO-AUTOVSCROLL            = #x00000040;
define inline-only constant $ECO-AUTOHSCROLL            = #x00000080;
define inline-only constant $ECO-NOHIDESEL              = #x00000100;
define inline-only constant $ECO-READONLY               = #x00000800;
define inline-only constant $ECO-WANTRETURN             = #x00001000;
define inline-only constant $ECO-SAVESEL                = #x00008000;
define inline-only constant $ECO-SELECTIONBAR           = #x01000000;
define inline-only constant $ECO-VERTICAL               = #x00400000;
define inline-only constant $ECOOP-SET                  = #x0001;
define inline-only constant $ECOOP-OR                   = #x0002;
define inline-only constant $ECOOP-AND                  = #x0003;
define inline-only constant $ECOOP-XOR                  = #x0004;
define inline-only constant $WB-CLASSIFY                =    3;
define inline-only constant $WB-MOVEWORDLEFT            =    4;
define inline-only constant $WB-MOVEWORDRIGHT           =    5;
define inline-only constant $WB-LEFTBREAK               =    6;
define inline-only constant $WB-RIGHTBREAK              =    7;
define inline-only constant $WB-MOVEWORDPREV            =    4;
define inline-only constant $WB-MOVEWORDNEXT            =    5;
define inline-only constant $WB-PREVBREAK               =    6;
define inline-only constant $WB-NEXTBREAK               =    7;
define inline-only constant $PC-FOLLOWING               =    1;
define inline-only constant $PC-LEADING                 =    2;
define inline-only constant $PC-OVERFLOW                =    3;
define inline-only constant $PC-DELIMITER               =    4;
define inline-only constant $WBF-WORDWRAP               = #x010;
define inline-only constant $WBF-WORDBREAK              = #x020;
define inline-only constant $WBF-OVERFLOW               = #x040;
define inline-only constant $WBF-LEVEL1                 = #x080;
define inline-only constant $WBF-LEVEL2                 = #x100;
define inline-only constant $WBF-CUSTOM                 = #x200;
define inline-only constant $IMF-FORCENONE              = #x0001;
define inline-only constant $IMF-FORCEENABLE            = #x0002;
define inline-only constant $IMF-FORCEDISABLE           = #x0004;
define inline-only constant $IMF-CLOSESTATUSWINDOW      = #x0008;
define inline-only constant $IMF-VERTICAL               = #x0020;
define inline-only constant $IMF-FORCEACTIVE            = #x0040;
define inline-only constant $IMF-FORCEINACTIVE          = #x0080;
define inline-only constant $IMF-FORCEREMEMBER          = #x0100;
define inline-only constant $IMF-MULTIPLEEDIT           = #x0400;
define inline-only constant $WBF-CLASS                  = #x0F;
define inline-only constant $WBF-ISWHITE                = #x10;
define inline-only constant $WBF-BREAKLINE              = #x20;
define inline-only constant $WBF-BREAKAFTER             = #x40;

define C-subtype <EDITWORDBREAKPROCEX> ( <C-function-pointer> ) end;
define macro <EDITWORDBREAKPROCEX>-callback-wrapper
 { <EDITWORDBREAKPROCEX>-callback-wrapper(?new:name,?old:name) } =>
 { define C-callable-wrapper ?new of ?old
  parameter pchText    :: <C-string>;
  parameter cchText    :: <LONG>;
  parameter bCharSet   :: <C-BYTE>;
  parameter action     :: <INT>;
  result value :: <LONG>;
 end C-callable-wrapper }
end;

define C-struct <CHARFORMATA>
  sealed inline-only slot cbSize-value   :: <UINT>;
  slot dwMask-value :: <C-both-unsigned-long>;
  slot dwEffects-value :: <C-both-unsigned-long>;
  sealed inline-only slot yHeight-value  :: <LONG>;
  sealed inline-only slot yOffset-value  :: <LONG>;
  sealed inline-only slot crTextColor-value :: <COLORREF>;
  sealed inline-only slot bCharSet-value :: <C-BYTE>;
  sealed inline-only slot bPitchAndFamily-value :: <C-BYTE>;
  sealed array slot szFaceName-array     :: <C-char>,
	length: $LF-FACESIZE, address-getter: szFaceName-value;
  pack: 4;
  pointer-type-name: <LPCHARFORMATA>;
  c-name: "struct _charformat";
end C-struct <CHARFORMATA>;
define constant <CHARFORMAT> = <CHARFORMATA>;
define constant <LPCHARFORMAT> = <LPCHARFORMATA>;
define inline-only constant $CFM-BOLD                   = #x00000001;
define inline-only constant $CFM-ITALIC                 = #x00000002;
define inline-only constant $CFM-UNDERLINE              = #x00000004;
define inline-only constant $CFM-STRIKEOUT              = #x00000008;
define inline-only constant $CFM-PROTECTED              = #x00000010;
define inline-only constant $CFM-LINK                   = #x00000020;
define inline-only constant $CFM-SIZE                   =
	as(<machine-word>, #x80000000);
define inline-only constant $CFM-COLOR                  =
	as(<machine-word>, #x40000000);
define inline-only constant $CFM-FACE                   =
	as(<machine-word>, #x20000000);
define inline-only constant $CFM-OFFSET                 =
	as(<machine-word>, #x10000000);
define inline-only constant $CFM-CHARSET                = #x08000000;
define inline-only constant $CFE-BOLD                   = #x0001;
define inline-only constant $CFE-ITALIC                 = #x0002;
define inline-only constant $CFE-UNDERLINE              = #x0004;
define inline-only constant $CFE-STRIKEOUT              = #x0008;
define inline-only constant $CFE-PROTECTED              = #x0010;
define inline-only constant $CFE-LINK                   = #x0020;
define inline-only constant $CFE-AUTOCOLOR              =
	as(<machine-word>, #x40000000);
define inline-only constant $yHeightCharPtsMost         = 1638;
define inline-only constant $SCF-SELECTION              = #x0001;
define inline-only constant $SCF-WORD                   = #x0002;
define inline-only constant $SCF-DEFAULT                = #x0000;
define inline-only constant $SCF-ALL                    = #x0004;
define inline-only constant $SCF-USEUIRULES             = #x0008;

define C-struct <CHARRANGE>
  sealed inline-only slot cpMin-value    :: <LONG>;
  sealed inline-only slot cpMax-value    :: <LONG>;
  pack: 4;
  pointer-type-name: <LPCHARRANGE>;
  c-name: "struct _charrange";
end C-struct <CHARRANGE>;

define C-struct <TEXTRANGEA>
  sealed inline-only slot chrg-value     :: <CHARRANGE>;
  sealed inline-only slot lpstrText-value :: <LPSTR>;
  pack: 4;
  pointer-type-name: <LPTEXTRANGEA>;
  c-name: "struct _textrange";
end C-struct <TEXTRANGEA>;
define constant <TEXTRANGE> = <TEXTRANGEA>;
define constant <LPTEXTRANGE> = <LPTEXTRANGEA>;

define C-subtype <EDITSTREAMCALLBACK> ( <C-function-pointer> ) end;
define macro <EDITSTREAMCALLBACK>-callback-wrapper
 { <EDITSTREAMCALLBACK>-callback-wrapper(?new:name,?old:name) } =>
 { define C-callable-wrapper ?new of ?old
  parameter dwCookie   :: <DWORD>;
  parameter pbBuff     :: <LPBYTE>;
  parameter cb         :: <LONG>;
  output parameter pcb :: <LPLONG>;
  result value :: <DWORD>;
  c-modifiers: "__stdcall";
 end C-callable-wrapper }
end;

define C-struct <EDITSTREAM>
  sealed inline-only slot dwCookie-value :: <DWORD>;
  sealed inline-only slot dwError-value  :: <DWORD>;
  sealed inline-only slot pfnCallback-value :: <EDITSTREAMCALLBACK>;
  pack: 4;
  pointer-type-name: <LPEDITSTREAM>;
  c-name: "struct _editstream";
end C-struct <EDITSTREAM>;
define inline-only constant $SF-TEXT                    = #x0001;
define inline-only constant $SF-RTF                     = #x0002;
define inline-only constant $SF-RTFNOOBJS               = #x0003;
define inline-only constant $SF-TEXTIZED                = #x0004;
define inline-only constant $SF-UNICODE                 = #x0010;
define inline-only constant $SFF-SELECTION              = #x8000;
define inline-only constant $SFF-PLAINRTF               = #x4000;

define C-struct <FINDTEXTA>
  sealed inline-only slot chrg-value     :: <CHARRANGE>;
  sealed inline-only slot lpstrText-value :: <LPSTR>;
  pack: 4;
  pointer-type-name: <LPFINDTEXTA>;
  c-name: "struct _findtext";
end C-struct <FINDTEXTA>;
define constant <FINDTEXT> = <FINDTEXTA>;
define constant <LPFINDTEXT> = <LPFINDTEXTA>;

define C-struct <FINDTEXTEXA>
  sealed inline-only slot chrg-value     :: <CHARRANGE>;
  sealed inline-only slot lpstrText-value :: <LPSTR>;
  sealed inline-only slot chrgText-value :: <CHARRANGE>;
  pack: 4;
  pointer-type-name: <LPFINDTEXTEXA>;
  c-name: "struct _findtextexa";
end C-struct <FINDTEXTEXA>;
define constant <FINDTEXTEX> = <FINDTEXTEXA>;
define constant <LPFINDTEXTEX> = <LPFINDTEXTEXA>;

define C-struct <FORMATRANGE>
  sealed inline-only slot hdc-value      :: <HDC>;
  sealed inline-only slot hdcTarget-value :: <HDC>;
  sealed inline-only slot rc-value       :: <RECT>;
  sealed inline-only slot rcPage-value   :: <RECT>;
  sealed inline-only slot chrg-value     :: <CHARRANGE>;
  pack: 4;
  pointer-type-name: <LPFORMATRANGE>;
  c-name: "struct _formatrange";
end C-struct <FORMATRANGE>;
define inline-only constant $MAX-TAB-STOPS              =   32;
define inline-only constant $lDefaultTab                =  720;

define C-struct <PARAFORMAT>
  sealed inline-only slot cbSize-value   :: <UINT>;
  slot dwMask-value :: <C-both-unsigned-long>;
  sealed inline-only slot wNumbering-value :: <WORD>;
  sealed inline-only slot wReserved      :: <WORD>;
  sealed inline-only slot dxStartIndent-value :: <LONG>;
  sealed inline-only slot dxRightIndent-value :: <LONG>;
  sealed inline-only slot dxOffset-value :: <LONG>;
  sealed inline-only slot wAlignment-value :: <WORD>;
  sealed inline-only slot cTabCount-value :: <SHORT>;
  sealed array slot rgxTabs-array        :: <LONG>,
	length: $MAX-TAB-STOPS, address-getter: rgxTabs-value;
  pack: 4;
  pointer-type-name: <LPPARAFORMAT>;
  c-name: "struct _paraformat";
end C-struct <PARAFORMAT>;
define inline-only constant $PFM-STARTINDENT            = #x00000001;
define inline-only constant $PFM-RIGHTINDENT            = #x00000002;
define inline-only constant $PFM-OFFSET                 = #x00000004;
define inline-only constant $PFM-ALIGNMENT              = #x00000008;
define inline-only constant $PFM-TABSTOPS               = #x00000010;
define inline-only constant $PFM-NUMBERING              = #x00000020;
define inline-only constant $PFM-OFFSETINDENT           =
	as(<machine-word>, #x80000000);
define inline-only constant $PFN-BULLET                 = #x0001;
define inline-only constant $PFA-LEFT                   = #x0001;
define inline-only constant $PFA-RIGHT                  = #x0002;
define inline-only constant $PFA-CENTER                 = #x0003;

define C-struct <CHARFORMAT2W>
  sealed inline-only slot cbSize-value   :: <UINT>;
  slot dwMask-value :: <C-both-unsigned-long>;
  slot dwEffects-value :: <C-both-unsigned-long>;
  sealed inline-only slot yHeight-value  :: <LONG>;
  sealed inline-only slot yOffset-value  :: <LONG>;
  sealed inline-only slot crTextColor-value :: <COLORREF>;
  sealed inline-only slot bCharSet-value :: <C-BYTE>;
  sealed inline-only slot bPitchAndFamily-value :: <C-BYTE>;
  sealed array slot szFaceName-array     :: <WCHAR>,
	length: $LF-FACESIZE, address-getter: szFaceName-value;
  sealed inline-only slot wWeight-value  :: <WORD>;
  sealed inline-only slot sSpacing-value :: <SHORT>;
  sealed inline-only slot crBackColor-value :: <COLORREF>;
  sealed inline-only slot lcid-value     :: <LCID>;
  sealed inline-only slot dwReserved     :: <DWORD>;
  sealed inline-only slot sStyle-value   :: <SHORT>;
  sealed inline-only slot wKerning-value :: <WORD>;
  sealed inline-only slot bUnderlineType-value :: <C-BYTE>;
  sealed inline-only slot bAnimation-value :: <C-BYTE>;
  sealed inline-only slot bRevAuthor-value :: <C-BYTE>;
  sealed inline-only slot bReserved1     :: <C-BYTE>;
  pack: 4;
  pointer-type-name: <LPCHARFORMAT2W>;
  c-name: "struct _charformat2w";
end C-struct <CHARFORMAT2W>;

define C-struct <CHARFORMAT2A>
  sealed inline-only slot cbSize-value   :: <UINT>;
  slot dwMask-value :: <C-both-unsigned-long>;
  slot dwEffects-value :: <C-both-unsigned-long>;
  sealed inline-only slot yHeight-value  :: <LONG>;
  sealed inline-only slot yOffset-value  :: <LONG>;
  sealed inline-only slot crTextColor-value :: <COLORREF>;
  sealed inline-only slot bCharSet-value :: <C-BYTE>;
  sealed inline-only slot bPitchAndFamily-value :: <C-BYTE>;
  sealed array slot szFaceName-array     :: <C-char>,
	length: $LF-FACESIZE, address-getter: szFaceName-value;
  sealed inline-only slot wWeight-value  :: <WORD>;
  sealed inline-only slot sSpacing-value :: <SHORT>;
  sealed inline-only slot crBackColor-value :: <COLORREF>;
  sealed inline-only slot lcid-value     :: <LCID>;
  sealed inline-only slot dwReserved     :: <DWORD>;
  sealed inline-only slot sStyle-value   :: <SHORT>;
  sealed inline-only slot wKerning-value :: <WORD>;
  sealed inline-only slot bUnderlineType-value :: <C-BYTE>;
  sealed inline-only slot bAnimation-value :: <C-BYTE>;
  sealed inline-only slot bRevAuthor-value :: <C-BYTE>;
  pack: 4;
  pointer-type-name: <LPCHARFORMAT2A>;
  c-name: "struct _charformat2a";
end C-struct <CHARFORMAT2A>;
define inline-only constant $CFM-EFFECTS                =
	%logior($CFM-BOLD, $CFM-ITALIC, $CFM-UNDERLINE, $CFM-COLOR, $CFM-STRIKEOUT, $CFE-PROTECTED, $CFM-LINK);
define inline-only constant $CFM-ALL                    =
	%logior($CFM-EFFECTS, $CFM-SIZE, $CFM-FACE, $CFM-OFFSET, $CFM-CHARSET);
define inline-only constant $PFM-ALL                    =
	%logior($PFM-STARTINDENT, $PFM-RIGHTINDENT, $PFM-OFFSET, $PFM-ALIGNMENT, $PFM-TABSTOPS, $PFM-NUMBERING, $PFM-OFFSETINDENT, $PFM-DIR);
define inline-only constant $CFM-SMALLCAPS              = #x0040;
define inline-only constant $CFM-ALLCAPS                = #x0080;
define inline-only constant $CFM-HIDDEN                 = #x0100;
define inline-only constant $CFM-OUTLINE                = #x0200;
define inline-only constant $CFM-SHADOW                 = #x0400;
define inline-only constant $CFM-EMBOSS                 = #x0800;
define inline-only constant $CFM-IMPRINT                = #x1000;
define inline-only constant $CFM-DISABLED               = #x2000;
define inline-only constant $CFM-REVISED                = #x4000;
define inline-only constant $CFM-BACKCOLOR              = #x04000000;
define inline-only constant $CFM-LCID                   = #x02000000;
define inline-only constant $CFM-UNDERLINETYPE          = #x00800000;
define inline-only constant $CFM-WEIGHT                 = #x00400000;
define inline-only constant $CFM-SPACING                = #x00200000;
define inline-only constant $CFM-KERNING                = #x00100000;
define inline-only constant $CFM-STYLE                  = #x00080000;
define inline-only constant $CFM-ANIMATION              = #x00040000;
define inline-only constant $CFM-REVAUTHOR              = #x00008000;
define inline-only constant $CFE-SUBSCRIPT              = #x00010000;
define inline-only constant $CFE-SUPERSCRIPT            = #x00020000;
define inline-only constant $CFM-SUBSCRIPT              =
	logior($CFE-SUBSCRIPT, $CFE-SUPERSCRIPT);
define inline-only constant $CFM-EFFECTS2               =
	%logior($CFM-EFFECTS, $CFM-DISABLED, $CFM-SMALLCAPS, $CFM-ALLCAPS, $CFM-HIDDEN, $CFM-OUTLINE, $CFM-SHADOW, $CFM-EMBOSS, $CFM-IMPRINT, $CFM-DISABLED, $CFM-REVISED, $CFM-SUBSCRIPT, $CFM-SUPERSCRIPT, $CFM-BACKCOLOR);
define inline-only constant $CFM-ALL2                   =
	%logior($CFM-ALL, $CFM-EFFECTS2, $CFM-BACKCOLOR, $CFM-LCID, $CFM-UNDERLINETYPE, $CFM-WEIGHT, $CFM-REVAUTHOR, $CFM-SPACING, $CFM-KERNING, $CFM-STYLE, $CFM-ANIMATION);
define inline-only constant $CFU-CF1UNDERLINE           = #xFF;
define inline-only constant $CFU-INVERT                 = #xFE;
define inline-only constant $CFU-UNDERLINEDOTTED        =  #x4;
define inline-only constant $CFU-UNDERLINEDOUBLE        =  #x3;
define inline-only constant $CFU-UNDERLINEWORD          =  #x2;
define inline-only constant $CFU-UNDERLINE              =  #x1;
define inline-only constant $CFU-UNDERLINENONE          =    0;

define C-struct <PARAFORMAT2>
  sealed inline-only slot cbSize-value   :: <UINT>;
  slot dwMask-value :: <C-both-unsigned-long>;
  sealed inline-only slot wNumbering-value :: <WORD>;
  sealed inline-only slot wReserved      :: <WORD>;
  sealed inline-only slot dxStartIndent-value :: <LONG>;
  sealed inline-only slot dxRightIndent-value :: <LONG>;
  sealed inline-only slot dxOffset-value :: <LONG>;
  sealed inline-only slot wAlignment-value :: <WORD>;
  sealed inline-only slot cTabCount-value :: <SHORT>;
  sealed array slot rgxTabs-array        :: <LONG>,
	length: $MAX-TAB-STOPS, address-getter: rgxTabs-value;
  sealed inline-only slot dySpaceBefore-value :: <LONG>;
  sealed inline-only slot dySpaceAfter-value :: <LONG>;
  sealed inline-only slot dyLineSpacing-value :: <LONG>;
  sealed inline-only slot sStyle-value   :: <SHORT>;
  sealed inline-only slot bLineSpacingRule-value :: <C-BYTE>;
  sealed inline-only slot bCRC-value     :: <C-BYTE>;
  sealed inline-only slot wShadingWeight-value :: <WORD>;
  sealed inline-only slot wShadingStyle-value :: <WORD>;
  sealed inline-only slot wNumberingStart-value :: <WORD>;
  sealed inline-only slot wNumberingStyle-value :: <WORD>;
  sealed inline-only slot wNumberingTab-value :: <WORD>;
  sealed inline-only slot wBorderSpace-value :: <WORD>;
  sealed inline-only slot wBorderWidth-value :: <WORD>;
  sealed inline-only slot wBorders-value :: <WORD>;
  pack: 4;
  pointer-type-name: <LPPARAFORMAT2>;
  c-name: "struct _paraformat2";
end C-struct <PARAFORMAT2>;
define inline-only constant $PFM-SPACEBEFORE            = #x00000040;
define inline-only constant $PFM-SPACEAFTER             = #x00000080;
define inline-only constant $PFM-LINESPACING            = #x00000100;
define inline-only constant $PFM-STYLE                  = #x00000400;
define inline-only constant $PFM-BORDER                 = #x00000800;
define inline-only constant $PFM-SHADING                = #x00001000;
define inline-only constant $PFM-NUMBERINGSTYLE         = #x00002000;
define inline-only constant $PFM-NUMBERINGTAB           = #x00004000;
define inline-only constant $PFM-NUMBERINGSTART         = #x00008000;
define inline-only constant $PFM-DIR                    = #x00010000;
define inline-only constant $PFM-RTLPARA                = #x00010000;
define inline-only constant $PFM-KEEP                   = #x00020000;
define inline-only constant $PFM-KEEPNEXT               = #x00040000;
define inline-only constant $PFM-PAGEBREAKBEFORE        = #x00080000;
define inline-only constant $PFM-NOLINENUMBER           = #x00100000;
define inline-only constant $PFM-NOWIDOWCONTROL         = #x00200000;
define inline-only constant $PFM-DONOTHYPHEN            = #x00400000;
define inline-only constant $PFM-SIDEBYSIDE             = #x00800000;
define inline-only constant $PFM-TABLE                  =
	as(<machine-word>, #xc0000000);
define inline-only constant $PFM-EFFECTS                =
	%logior($PFM-DIR, $PFM-KEEP, $PFM-KEEPNEXT, $PFM-TABLE, $PFM-PAGEBREAKBEFORE, $PFM-NOLINENUMBER, $PFM-NOWIDOWCONTROL, $PFM-DONOTHYPHEN, $PFM-SIDEBYSIDE, $PFM-TABLE);
define inline-only constant $PFM-ALL2                   =
	%logior($PFM-ALL, $PFM-EFFECTS, $PFM-SPACEBEFORE, $PFM-SPACEAFTER, $PFM-LINESPACING, $PFM-STYLE, $PFM-SHADING, $PFM-BORDER, $PFM-NUMBERINGTAB, $PFM-NUMBERINGSTART, $PFM-NUMBERINGSTYLE);
define inline-only constant $PFE-TABLEROW               = #xc000;
define inline-only constant $PFE-TABLECELLEND           = #x8000;
define inline-only constant $PFE-TABLECELL              = #x4000;

define C-struct <MSGFILTER>
  sealed inline-only slot nmhdr-value    :: <NMHDR>;
  sealed inline-only slot msg-value      :: <UINT>;
  sealed inline-only slot wParam-value   :: <WPARAM>;
  sealed inline-only slot lParam-value   :: <LPARAM>;
  pack: 4;
  pointer-type-name: <LPMSGFILTER>;
  c-name: "struct _msgfilter";
end C-struct <MSGFILTER>;

define C-struct <REQRESIZE>
  sealed inline-only slot nmhdr-value    :: <NMHDR>;
  sealed inline-only slot rc-value       :: <RECT>;
  pack: 4;
  pointer-type-name: <LPREQRESIZE>;
  c-name: "struct _reqresize";
end C-struct <REQRESIZE>;

define C-struct <SELCHANGE>
  sealed inline-only slot nmhdr-value    :: <NMHDR>;
  sealed inline-only slot chrg-value     :: <CHARRANGE>;
  sealed inline-only slot seltyp-value   :: <WORD>;
  pack: 4;
  pointer-type-name: <LPSELCHANGE>;
  c-name: "struct _selchange";
end C-struct <SELCHANGE>;
define inline-only constant $SEL-EMPTY                  = #x0000;
define inline-only constant $SEL-TEXT                   = #x0001;
define inline-only constant $SEL-OBJECT                 = #x0002;
define inline-only constant $SEL-MULTICHAR              = #x0004;
define inline-only constant $SEL-MULTIOBJECT            = #x0008;
define inline-only constant $GCM-RIGHTMOUSEDROP         = #x8000;

define C-struct <ENDROPFILES>
  sealed inline-only slot nmhdr-value    :: <NMHDR>;
  sealed inline-only slot hDrop-value    :: <HANDLE>;
  sealed inline-only slot cp-value       :: <LONG>;
  sealed inline-only slot fProtected-value :: <BOOL>;
  pack: 4;
  pointer-type-name: <LPENDROPFILES>;
  c-name: "struct _endropfiles";
end C-struct <ENDROPFILES>;

define C-struct <ENPROTECTED>
  sealed inline-only slot nmhdr-value    :: <NMHDR>;
  sealed inline-only slot msg-value      :: <UINT>;
  sealed inline-only slot wParam-value   :: <WPARAM>;
  sealed inline-only slot lParam-value   :: <LPARAM>;
  sealed inline-only slot chrg-value     :: <CHARRANGE>;
  pack: 4;
  pointer-type-name: <LPENPROTECTED>;
  c-name: "struct _enprotected";
end C-struct <ENPROTECTED>;

define C-struct <ENSAVECLIPBOARD>
  sealed inline-only slot nmhdr-value    :: <NMHDR>;
  sealed inline-only slot cObjectCount-value :: <LONG>;
  sealed inline-only slot cch-value      :: <LONG>;
  pack: 4;
  pointer-type-name: <LPENSAVECLIPBOARD>;
  c-name: "struct _ensaveclipboard";
end C-struct <ENSAVECLIPBOARD>;

define C-struct <ENOLEOPFAILED>
  sealed inline-only slot nmhdr-value    :: <NMHDR>;
  sealed inline-only slot iob-value      :: <LONG>;
  sealed inline-only slot lOper-value    :: <LONG>;
  sealed inline-only slot hr-value       :: <C-both-long> /* HRESULT */ ;
  pack: 4;
  pointer-type-name: <LPENOLEOPFAILED>;
  c-name: "struct _enoleopfailed";
end C-struct <ENOLEOPFAILED>;
define inline-only constant $OLEOP-DOVERB               =    1;

define C-struct <OBJECTPOSITIONS>
  sealed inline-only slot nmhdr-value    :: <NMHDR>;
  sealed inline-only slot cObjectCount-value :: <LONG>;
  sealed inline-only slot pcpPositions-value :: <LPLONG>;
  pack: 4;
  pointer-type-name: <LPOBJECTPOSITIONS>;
  c-name: "struct _objectpositions";
end C-struct <OBJECTPOSITIONS>;

define C-struct <ENLINK>
  sealed inline-only slot nmhdr-value    :: <NMHDR>;
  sealed inline-only slot msg-value      :: <UINT>;
  sealed inline-only slot wParam-value   :: <WPARAM>;
  sealed inline-only slot lParam-value   :: <LPARAM>;
  sealed inline-only slot chrg-value     :: <CHARRANGE>;
  pack: 4;
  pointer-type-name: <LPENLINK>;
  c-name: "struct _enlink";
end C-struct <ENLINK>;

define C-struct <ENCORRECTTEXT>
  sealed inline-only slot nmhdr-value    :: <NMHDR>;
  sealed inline-only slot chrg-value     :: <CHARRANGE>;
  sealed inline-only slot seltyp-value   :: <WORD>;
  pack: 4;
  pointer-type-name: <LPENCORRECTTEXT>;
  c-name: "struct _encorrecttext";
end C-struct <ENCORRECTTEXT>;

define C-struct <PUNCTUATION>
  sealed inline-only slot iSize-value    :: <UINT>;
  sealed inline-only slot szPunctuation-value :: <LPSTR>;
  pack: 4;
  pointer-type-name: <LPPUNCTUATION>;
  c-name: "struct _punctuation";
end C-struct <PUNCTUATION>;

define C-struct <COMPCOLOR>
  sealed inline-only slot crText-value   :: <COLORREF>;
  sealed inline-only slot crBackground-value :: <COLORREF>;
  slot dwEffects-value :: <C-both-unsigned-long>;
  pack: 4;
  pointer-type-name: <LPCOMPCOLOR>;
  c-name: "struct _compcolor";
end C-struct <COMPCOLOR>;
define constant $CF-RTF        = "Rich Text Format";
define constant $CF-RTFNOOBJS  = "Rich Text Format Without Objects";
define constant $CF-RETEXTOBJ  = "RichEdit Text and Objects";

define C-struct <REPASTESPECIAL>
  sealed inline-only slot dwAspect-value :: <DWORD>;
  sealed inline-only slot dwParam-value  :: <DWORD>;
  pack: 4;
  pointer-type-name: <LPREPASTESPECIAL>;
  c-name: "struct _repastespecial";
end C-struct <REPASTESPECIAL>;
// enum UNDONAMEID:
define inline-only constant $UID-UNKNOWN = 0;
define inline-only constant $UID-TYPING = 1;
define inline-only constant $UID-DELETE = 2;
define inline-only constant $UID-DRAGDROP = 3;
define inline-only constant $UID-CUT = 4;
define inline-only constant $UID-PASTE = 5;

define inline-only constant $GT-DEFAULT                 =    0;
define inline-only constant $GT-USECRLF                 =    1;

define C-struct <GETTEXTEX>
  sealed inline-only slot cb-value       :: <DWORD>;
  sealed inline-only slot flags-value    :: <DWORD>;
  sealed inline-only slot codepage-value :: <UINT>;
  sealed inline-only slot lpDefaultChar-value :: <LPCSTR>;
  sealed inline-only slot lpUsedDefChar-value :: <LPBOOL>;
  pack: 4;
  pointer-type-name: <LPGETTEXTEX>;
  c-name: "struct _gettextex";
end C-struct <GETTEXTEX>;
define inline-only constant $GTL-DEFAULT                =    0;
define inline-only constant $GTL-USECRLF                =    1;
define inline-only constant $GTL-PRECISE                =    2;
define inline-only constant $GTL-CLOSE                  =    4;
define inline-only constant $GTL-NUMCHARS               =    8;
define inline-only constant $GTL-NUMBYTES               =   16;

define C-struct <GETTEXTLENGTHEX>
  sealed inline-only slot flags-value    :: <DWORD>;
  sealed inline-only slot codepage-value :: <UINT>;
  pack: 4;
  pointer-type-name: <LPGETTEXTLENGTHEX>;
  c-name: "struct _gettextlengthex";
end C-struct <GETTEXTLENGTHEX>;

define C-struct <BIDIOPTIONS>
  sealed inline-only slot cbSize-value   :: <UINT>;
  sealed inline-only slot wMask-value    :: <WORD>;
  sealed inline-only slot wEffects-value :: <WORD>;
  pack: 4;
  pointer-type-name: <LPBIDIOPTIONS>;
  c-name: "struct _bidioptions";
end C-struct <BIDIOPTIONS>;
define inline-only constant $BOM-DEFPARADIR             = #x0001;
define inline-only constant $BOM-PLAINTEXT              = #x0002;
define inline-only constant $BOM-NEUTRALOVERRIDE        = #x0004;
define inline-only constant $BOM-CONTEXTREADING         = #x0008;
define inline-only constant $BOM-CONTEXTALIGNMENT       = #x0010;
define inline-only constant $BOE-RTLDIR                 = #x0001;
define inline-only constant $BOE-PLAINTEXT              = #x0002;
define inline-only constant $BOE-NEUTRALOVERRIDE        = #x0004;
define inline-only constant $BOE-CONTEXTREADING         = #x0008;
define inline-only constant $BOE-CONTEXTALIGNMENT       = #x0010;
define inline-only constant $FR-MATCHDIAC               =
	as(<machine-word>, #x20000000);
define inline-only constant $FR-MATCHKASHIDA            =
	as(<machine-word>, #x40000000);
define inline-only constant $FR-MATCHALEFHAMZA          =
	as(<machine-word>, #x80000000);
define inline-only constant $WCH-EMBEDDING              =
	as(<character>,#xFFFC);

define inline-only constant $RICHEDIT-CLASS = $RICHEDIT-CLASS10A;
define inline-only constant $CFM-SUPERSCRIPT = $CFM-SUBSCRIPT;
define inline-only constant $CFE-SMALLCAPS = $CFM-SMALLCAPS;
define inline-only constant $CFE-ALLCAPS = $CFM-ALLCAPS;
define inline-only constant $CFE-HIDDEN  = $CFM-HIDDEN;
define inline-only constant $CFE-OUTLINE = $CFM-OUTLINE;
define inline-only constant $CFE-SHADOW  = $CFM-SHADOW;
define inline-only constant $CFE-EMBOSS  = $CFM-EMBOSS;
define inline-only constant $CFE-IMPRINT = $CFM-IMPRINT;
define inline-only constant $CFE-DISABLED = $CFM-DISABLED;
define inline-only constant $CFE-REVISED = $CFM-REVISED;
define inline-only constant $CFE-AUTOBACKCOLOR = $CFM-BACKCOLOR;
