summaryrefslogtreecommitdiff
path: root/packages/xforms/src
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2008-01-27 09:51:30 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2008-01-27 09:51:30 +0000
commitaa091a96b9af690e847cf7aa4cc9fa0b87e65b90 (patch)
tree6b104af97846ce9ed969321dde854f12b9533a02 /packages/xforms/src
parent99adbee400607d33c0752682c6ef83aad92c2971 (diff)
downloadfpc-aa091a96b9af690e847cf7aa4cc9fa0b87e65b90.tar.gz
* xforms moved
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@10015 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/xforms/src')
-rw-r--r--packages/xforms/src/cursorfont.inc111
-rw-r--r--packages/xforms/src/fd2pascal.pp1122
-rw-r--r--packages/xforms/src/xforms.pp2909
3 files changed, 4142 insertions, 0 deletions
diff --git a/packages/xforms/src/cursorfont.inc b/packages/xforms/src/cursorfont.inc
new file mode 100644
index 0000000000..6cf3bd6965
--- /dev/null
+++ b/packages/xforms/src/cursorfont.inc
@@ -0,0 +1,111 @@
+{ $XConsortium: cursorfont.h,v 1.4 94/04/17 20:22:00 rws Exp $ }
+{
+
+Copyright (c) 1987 X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the X Consortium.
+
+}
+
+Const
+ XC_num_glyphs= 154;
+ XC_X_cursor= 0;
+ XC_arrow= 2;
+ XC_based_arrow_down= 4;
+ XC_based_arrow_up= 6;
+ XC_boat= 8;
+ XC_bogosity= 10;
+ XC_bottom_left_corner= 12;
+ XC_bottom_right_corner= 14;
+ XC_bottom_side= 16;
+ XC_bottom_tee= 18;
+ XC_box_spiral= 20;
+ XC_center_ptr= 22;
+ XC_circle= 24;
+ XC_clock= 26;
+ XC_coffee_mug= 28;
+ XC_cross= 30;
+ XC_cross_reverse= 32;
+ XC_crosshair= 34;
+ XC_diamond_cross= 36;
+ XC_dot= 38;
+ XC_dotbox= 40;
+ XC_double_arrow= 42;
+ XC_draft_large= 44;
+ XC_draft_small= 46;
+ XC_draped_box= 48;
+ XC_exchange= 50;
+ XC_fleur= 52;
+ XC_gobbler= 54;
+ XC_gumby= 56;
+ XC_hand1= 58;
+ XC_hand2= 60;
+ XC_heart= 62;
+ XC_icon= 64;
+ XC_iron_cross= 66;
+ XC_left_ptr= 68;
+ XC_left_side= 70;
+ XC_left_tee= 72;
+ XC_leftbutton= 74;
+ XC_ll_angle= 76;
+ XC_lr_angle= 78;
+ XC_man= 80;
+ XC_middlebutton= 82;
+ XC_mouse= 84;
+ XC_pencil= 86;
+ XC_pirate= 88;
+ XC_plus= 90;
+ XC_question_arrow= 92;
+ XC_right_ptr= 94;
+ XC_right_side= 96;
+ XC_right_tee= 98;
+ XC_rightbutton= 100;
+ XC_rtl_logo= 102;
+ XC_sailboat= 104;
+ XC_sb_down_arrow= 106;
+ XC_sb_h_double_arrow= 108;
+ XC_sb_left_arrow= 110;
+ XC_sb_right_arrow= 112;
+ XC_sb_up_arrow= 114;
+ XC_sb_v_double_arrow= 116;
+ XC_shuttle= 118;
+ XC_sizing= 120;
+ XC_spider= 122;
+ XC_spraycan= 124;
+ XC_star= 126;
+ XC_target= 128;
+ XC_tcross= 130;
+ XC_top_left_arrow= 132;
+ XC_top_left_corner= 134;
+ XC_top_right_corner= 136;
+ XC_top_side= 138;
+ XC_top_tee= 140;
+ XC_trek= 142;
+ XC_ul_angle= 144;
+ XC_umbrella= 146;
+ XC_ur_angle= 148;
+ XC_watch= 150;
+ XC_xterm= 152;
+
diff --git a/packages/xforms/src/fd2pascal.pp b/packages/xforms/src/fd2pascal.pp
new file mode 100644
index 0000000000..306a876f3b
--- /dev/null
+++ b/packages/xforms/src/fd2pascal.pp
@@ -0,0 +1,1122 @@
+Program fd2pascal;
+
+{ ---------------------------------------------------------------------------
+ Program to convert forms fdesign file to pascal code
+ Copyright (C) 1997 Michael Van Canneyt
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ --------------------------------------------------------------------------- }
+
+
+uses
+ baseunix,
+ Unix,
+ unixutil;
+
+Const RevString = '$Revision: 1.5 $';
+ NrOptions = 4;
+ Options : Array[0..NrOptions] Of String[20] =
+ ('v','callback','main','altformat','compensate');
+
+Type
+ { Properties of an object }
+ ContProps=(CPclass,CPtype,CPbox,CPBoxtype,CPColors,CPalignment,CPstyle,CPsize,
+ CPlcol,CPlabel,CPShortcut,CPresize,CPgravity,CPname,CPCallback,
+ CPargument,
+ CPinvalid);
+ { Properties of an object for which defaults must be set }
+ AdjProps=(APClass,APBoxtype,ApColors,APAlignment,APSize,APLcol,APstyle,APgravity);
+ { List of all object classes }
+ ObjClasses=(FL_INVALID,FL_BUTTON, FL_LIGHTBUTTON,FL_ROUNDBUTTON, FL_ROUND3DBUTTON,
+ FL_CHECKBUTTON, FL_BITMAPBUTTON, FL_PIXMAPBUTTON,FL_BITMAP, FL_PIXMAP,
+ FL_BOX, FL_TEXT, FL_MENU, FL_CHART, FL_CHOICE, FL_COUNTER, FL_SLIDER, FL_VALSLIDER, FL_INPUT,
+ FL_BROWSER,FL_DIAL,FL_TIMER,FL_CLOCK, FL_POSITIONER, FL_FREE,
+ FL_XYPLOT,FL_FRAME, FL_LABELFRAME, FL_CANVAS, FL_GLCANVAS,
+ FL_IMAGECANVAS, FL_FOLDER);
+ { Properties in preamble }
+ PreProps=(PPmagic,PPNrforms,PPUnitofMeasure,PPinvalid);
+ { Properties of a form }
+ FormProps=(FPName,FPWidth,FPHeight,FPnumObjs,FPinvalid);
+
+Const
+ { Names of all object properties }
+ ContPropNames : Array[ContProps] of string[20] =
+ ('class','type','box','boxtype','colors','alignment','style','size',
+ 'lcol','label','shortcut','resize','gravity','name','callback',
+ 'argument',
+ 'invalid');
+ { Names of all object properties which must be checked.}
+ AdjPropsNames : Array[AdjProps] of string[20] =
+ ('class','boxtype','colors','alignment','size','lcol','style','gravity');
+ { Names of all preamble properties }
+ PrePropNames : Array[PreProps] of string[20] =
+ ('Magic','Number of forms','Unit of measure','Invalid');
+ { Names of all form properties }
+ FormPropNames : Array[FormProps] of string[20] =
+ ('Name','Width','Height','Number of Objects','Invalid');
+ { Names of all object classes }
+ FObjClassNames : Array[ObjClasses] of string[20]=
+ ('FL_INVALID','BUTTON', 'LIGHTBUTTON','ROUNDBUTTON', 'ROUND3DBUTTON',
+ 'CHECKBUTTON', 'BITMAPBUTTON', 'PIXMAPBUTTON','BITMAP', 'PIXMAP',
+ 'BOX', 'TEXT', 'MENU', 'CHART', 'CHOICE', 'COUNTER', 'SLIDER', 'VALSLIDER', 'INPUT',
+ 'BROWSER','DIAL','TIMER','CLOCK', 'POSITIONER', 'FREE',
+ 'XYPLOT','FRAME', 'LABELFRAME', 'CANVAS', 'GLCANVAS',
+ 'IMAGECANVAS', 'FOLDER');
+
+ { Default properties. If empty a property is ignored.
+ To force setting of a property, put 'FL_FORCE' as a string.
+ Mind : Case sensitive }
+
+ DefProps : array[ObjClasses,AdjProps] of string[30] =
+ (('FL_INVALID','','','','','','FL_NORMAL_STYLE','FL_FORCE'),
+ ('BUTTON','FL_UP_BOX','FL_COL1 FL_COL1','FL_ALIGN_CENTER','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('LIGHTBUTTON','FL_UP_BOX','FL_COL1 FL_YELLOW','FL_ALIGN_CENTER','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('ROUNDBUTTON','FL_NO_BOX','FL_MCOL FL_YELLOW','FL_ALIGN_CENTER','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('ROUND3DBUTTON','FL_NO_BOX','FL_COL1 FL_BLACK','FL_ALIGN_CENTER','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('CHECKBUTTON','FL_NO_BOX','FL_COL1 FL_YELLOW','FL_ALIGN_CENTER','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('BITMAPBUTTON','FL_UP_BOX','FL_COL1 FL_BLUE','FL_ALIGN_BOTTOM','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('PIXMAPBUTTON','FL_UP_BOX','FL_COL1 FL_YELLOW','FL_ALIGN_BOTTOM','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('BITMAP','FL_NO_BOX','FL_COL1 FL_COL1','FL_ALIGN_BOTTOM','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('PIXMAP','FL_NO_BOX','FL_COL1 FL_COL1','FL_ALIGN_BOTTOM','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('BOX','','','','','','FL_NORMAL_STYLE','FL_FORCE'),
+ ('TEXT','FL_FLAT_BOX','FL_COL1 FL_MCOL','FL_ALIGN_LEFT','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('MENU','FL_BORDER_BOX','FL_COL1 FL_MCOL','FL_ALIGN_CENTER','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('CHART','FL_BORDER_BOX','FL_COL1','FL_ALIGN_BOTTOM','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('CHOICE','FL_ROUNDED_BOX','FL_COL1 FL_LCOL','FL_ALIGN_LEFT','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('COUNTER','FL_UP_BOX','FL_COL1 FL_BLUE','FL_ALIGN_BOTTOM','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('SLIDER','FL_DOWN_BOX','FL_COL1 FL_COL1','FL_ALIGN_BOTTOM','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('VALSLIDER','FL_DOWN_BOX','FL_COL1 FL_COL1','FL_ALIGN_BOTTOM','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('INPUT','FL_DOWN_BOX','FL_COL1 FL_MCOL','FL_ALIGN_LEFT','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('BROWSER','FL_DOWN_BOX','FL_COL1 FL_YELLOW','FL_ALIGN_BOTTOM','FL_SMALL_FONT','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('DIAL','FL_FLAT_BOX','FL_COL1 FL_RIGHT_BCOL','FL_ALIGN_BOTTOM','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('TIMER','FL_DOWN_BOX','FL_COL1 FL_RED','FL_ALIGN_CENTER','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('CLOCK','FL_UP_BOX','FL_INACTIVE_COL FL_BOTTOM_BCOL','FL_ALIGN_BOTTOM','','FL_BLACK','FL_NORMAL_STYLE','FL_FORCE'),
+ ('POSITIONER','FL_DOWN_BOX','FL_COL1 FL_RED','FL_ALIGN_BOTTOM','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('FREE','','','','','','FL_NORMAL_STYLE','FL_FORCE'),
+ ('XYPLOT','FL_FLAT_BOX','FL_COL1','FL_ALIGN_BOTTOM','','FL_LCOL','FL_NORMAL_STYLE','FL_FORCE'),
+ ('FRAME','','FL_BLACK FL_COL1','','','FL_BLACK','FL_NORMAL_STYLE','FL_FORCE'),
+ ('LABELFRAME','','','','','','FL_NORMAL_STYLE','FL_FORCE'),
+ ('CANVAS','FL_NO_BOX','','FL_ALIGN_TOP','','','FL_NORMAL_STYLE','FL_FORCE'),
+ ('GLCANVAS','','','','','','FL_NORMAL_STYLE','FL_FORCE'),
+ ('IMAGECANVAS','','','','','','FL_NORMAL_STYLE','FL_FORCE'),
+ ('FOLDER','','','','','','FL_NORMAL_STYLE','FL_FORCE'));
+
+Type
+ { object data type }
+ PControl = ^TControl;
+ TControl = Record
+ Props : array[ContProps] of string;
+ NextControl : PControl;
+ end;
+
+ { Form data type}
+ PFormRec = ^TFormRec;
+ TFormRec = Record
+ Name : String;
+ Width,Height : String[5];
+ Controls : PControl;
+ NextForm : PFormRec;
+ end;
+ { Callback data type }
+ PCBrec = ^TCBrec;
+ TCBrec = record
+ name : string;
+ next : PCBrec;
+ end;
+ { Property emitting procedures }
+ EmitProp = Procedure (Data : PControl;ObjClass : ObjClasses);
+
+Var
+ OptionsSet : Array[1..NrOptions] Of Boolean;
+ FileName : String;
+ Infile,outfile : Text;
+ LineNr : Longint;
+ NrForms,NrControls : Longint;
+ FormRoot : PFormRec;
+ cbroot : pcbrec;
+ { Default properties emitters }
+ EmitProcs : array [AdjProps] of EmitProp;
+ { Class specific property emitters. Nil pointers are ignored.}
+ ClassEmitters : Array[ObjClasses] of EmitProp;
+
+{ ------------------------------------------------------------------------
+ Utilities Code
+ ------------------------------------------------------------------------ }
+
+
+Function IntTostr (s : Longint) : String;
+
+var temp : String;
+
+begin
+ str(s,temp);
+ IntToStr:=Temp;
+end;
+
+
+Procedure EmitError (Const s : String);
+
+begin
+ writeln (stderr,'Error: ',s);
+ flush(stderr)
+end;
+
+Procedure EmitLineError (Const s : string);
+
+begin
+ EmitError('Line '+IntToStr(LineNr)+': '+s)
+end;
+
+
+{ ------------------------------------------------------------------------
+ Option handling Code
+ ------------------------------------------------------------------------ }
+
+
+Procedure DoOptions;
+
+Var i,j,k : byte;
+ os : string;
+
+Procedure ShowVersion;
+
+begin
+ Writeln ('fd2pascal : ',RevString);
+ Halt(0);
+end;
+
+Procedure ShowUsage;
+
+begin
+ Writeln ('fd2pascal : usage :');
+ writeln (' fd2pascal [options] filename');
+ writeln (' Where [options] may be zero or more of :');
+ writeln (' -compensate Emit size-compensation code.');
+ writeln (' -altformat Emit code in alternate format.');
+ writeln (' -main Emit program instead of unit.');
+ writeln (' -callback Emit callback stubs.');
+ writeln;
+ halt(0);
+end;
+
+begin
+ if paramcount=0 then
+ ShowUsage;
+ FileName:='';
+ for i:=1 to paramcount do
+ begin
+ if paramstr(i)[1]<>'-' then
+ If FileName<>'' then
+ EmitError('Only one filename supported. Ignoring :'+paramstr(i))
+ else
+ Filename:=Paramstr(i)
+ else
+ begin
+ os:=copy(paramstr(i),2,length(paramstr(i))-1);
+ k:=NrOptions+1;
+ for j:=0 to NrOptions do
+ if os=options[j] then k:=j;
+ if k=NrOptions+1 then
+ EmitError('Option not recognised : '+paramstr(i))
+ else
+ if k=0 then ShowVersion else OptionsSet[k]:=True;
+ end
+ end; {for}
+ if FileName='' then
+ begin
+ EmitError('No filename supplied. Exiting.');
+ halt(1);
+ end;
+end;
+
+{ ------------------------------------------------------------------------
+ Code for reading the input file.
+ ------------------------------------------------------------------------ }
+
+
+Procedure OpenFile;
+begin
+ if pos('.fd',FileName)=0 then
+ FileName:=FileName+'.fd';
+ assign(infile,Filename);
+{$i-}
+ reset (infile);
+{$i+}
+ if ioresult<>0 then
+ begin
+ EmitError('Can''t open : '+filename);
+ halt(1);
+ end;
+ LineNr:=0;
+end;
+
+Procedure CloseFile;
+
+begin
+ Close(infile);
+end;
+
+Procedure GetLine(Var S : String);
+
+begin
+ inc(LineNr);
+ Readln(infile,s);
+{$ifdef debug}
+ writeln ('Reading line : ',linenr)
+{$endif}
+end;
+
+Procedure ProcessPreAmbleLine (Const s: String);
+
+var key,value : string;
+ ppos : Longint;
+ i,k : PreProps;
+ code : Word;
+
+begin
+ if s='' then exit;
+ ppos:=pos(':',s);
+ if ppos=0 then
+ exit;
+ Key:=Copy(s,1,ppos-1);
+ Value:=Copy(s,ppos+2,length(s)-ppos-1);
+ k:=PPinvalid;
+ for i:=PPmagic to PPinvalid do
+ if key=PrePropNames[i] then k:=i;
+ if k=PPinvalid then
+ EmitLineError('Unknown keyword : '+Key)
+ else
+ Case K of
+ PPMagic,
+ PPunitofmeasure: ;
+ PPnrforms: begin
+ val(value,NrForms,code);
+ if code<>0 then EmitLineError('Invalid number of forms');
+ end;
+ end;
+end;
+
+{ ------------------------------------------------------------------------
+ Code for reading preamble.
+ ------------------------------------------------------------------------ }
+
+
+Procedure DoPreamble;
+
+var line : String;
+
+begin
+{$ifdef debug}
+ writeln ('Starting preamble');
+{$endif}
+ Getline (line);
+ while pos('= FORM =',line)=0 do
+ begin
+ ProcessPreAmbleLine(line);
+ GetLine(Line)
+ end;
+end;
+
+{ ------------------------------------------------------------------------
+ Code for reading 1 object.
+ ------------------------------------------------------------------------ }
+
+
+Procedure ProcessControlLine (PC : PControl; const S : String);
+
+Var Key,Value : String;
+ i,k : ContProps;
+ ppos : word;
+
+begin
+ if s='' then exit;
+ ppos:=pos(':',s);
+ if ppos=0 then
+ exit;
+ Key:=Copy(s,1,ppos-1);
+ Value:=Copy(s,ppos+2,length(s)-ppos-1);
+ K:=CPInvalid;
+ For i:=CPclass to CPInvalid do
+ if ContPropNames[i]=Key then k:=i;
+ if K=CPinvalid then
+ begin
+ EmitLineError('Unknown keyword'+key);
+ exit
+ end;
+ PC^.props[k]:=value;
+end;
+
+Procedure ProcessControl (PC : PControl);
+
+var line : String;
+
+begin
+{$ifdef debug}
+ Writeln ('Starting Control');
+{$endif}
+ Getline(Line);
+ while Line<>'' do
+ begin
+ ProcessControlLine (PC,line);
+ Getline(Line);
+ end;
+ Getline(Line)
+end;
+
+{ ------------------------------------------------------------------------
+ Code for reading 1 form.
+ ------------------------------------------------------------------------ }
+
+Procedure ProcessFormLine (PF : PFormRec; const S : String);
+
+Var Key,Value : String;
+ i,k : FormProps;
+ ppos,code : word;
+
+begin
+ if s='' then exit;
+ ppos:=pos(':',s);
+ if ppos=0 then
+ exit;
+ Key:=Copy(s,1,ppos-1);
+ Value:=Copy(s,ppos+2,length(s)-ppos-1);
+ K:=FPInvalid;
+ For i:=FPName to FPInvalid do
+ if FormPropNames[i]=Key then k:=i;
+ if K=FPinvalid then
+ begin
+ EmitLineError('Unknown keyword'+key);
+ exit
+ end;
+ case k of
+ FPname : PF^.name:=value;
+ FPWidth : PF^.width:=value;
+ FPHeight : PF^.height:=value;
+ FPNumObjs : begin
+ val(value,Nrcontrols,code);
+ If Code<>0 then EmitLineError('Invalid number of objects : '+value)
+ end;
+ end;
+end;
+
+Procedure ProcessForm (PF : PFormRec);
+
+Var line : String;
+ CurrentControl : PControl;
+ I : Integer;
+
+begin
+{$ifdef debug}
+ writeln('Starting form');
+{$endif}
+ NrControls:=0;
+ with PF^ do
+ begin
+ name:='';
+ Width:='';
+ Height:='';
+ Controls:=nil;
+ GetLine(Line);
+ while line<>'' do
+ begin
+ ProcessFormLine(PF,Line);
+ GetLine(Line);
+ end;
+ Getline(Line);
+ If NrControls=0 then
+ Controls:=nil
+ else
+ begin
+ New (Controls);
+ CurrentControl:=Controls;
+ for i:=1 to nrcontrols do
+ begin
+ ProcessControl(CurrentControl);
+ if i<NrControls then
+ New(CurrentControl^.NextControl)
+ else
+ CurrentControl^.NextControl:=nil;
+ CurrentControl:=CurrentControl^.NextControl
+ end; { for }
+ end; { Else }
+ end; { With }
+end;
+
+{ ------------------------------------------------------------------------
+ Code for reading the forms.
+ ------------------------------------------------------------------------ }
+
+
+Procedure DoForms;
+
+Var
+ i : Longint;
+ CurrentForm: PformRec;
+
+begin
+ FormRoot:=Nil;
+ if NrForms=0 then exit;
+ new(FormRoot);
+ Currentform:=FormRoot;
+ for i:=1 to nrforms do
+ begin
+ ProcessForm (CurrentForm);
+ If i=nrforms then
+ Currentform^.NextForm:=nil
+ else
+ New(CurrentForm^.NextForm);
+ CurrentForm:=CurrentForm^.NextForm;
+ end;
+end;
+
+{ ------------------------------------------------------------------------
+ Code for reading the postamble.
+ ------------------------------------------------------------------------ }
+
+
+Procedure DoPostamble;
+
+begin
+end;
+
+{ ------------------------------------------------------------------------
+ Code for writing the output file.
+ ------------------------------------------------------------------------ }
+
+Procedure OpenOutFile;
+
+var info : stat;
+
+begin
+ FileName:=Copy(Filename,1,Length(Filename)-3)+'.pp';
+ if fpstat(FileName,info)<>-1 Then
+ begin
+ { File exists, move to .bak}
+ fplink (FileName,FileName+'.bak');
+ fpunlink(FileName);
+ end;
+
+ assign(outfile,filename);
+{$i-}
+ rewrite(outfile);
+{$i+}
+ if ioresult<>0 then
+ begin
+ EmitError('Couldn''t open output file : '+filename);
+ halt(1)
+ end;
+end;
+
+Procedure CloseOutFile;
+
+begin
+ Close(OutFile);
+end;
+
+{ ------------------------------------------------------------------------
+ Code to emit Header/variable/type declarations
+ ------------------------------------------------------------------------ }
+
+
+Procedure EmitType (fp : Pformrec);
+
+var cp : PControl;
+
+begin
+ writeln (OutFile,' TFD_',fp^.name,' = record');
+ writeln (OutFile,' ',fp^.name,' : PFL_FORM;');
+ writeln (OutFile,' vdata : Pointer;');
+ writeln (OutFile,' ldata : Longint;');
+ cp:=fp^.controls;
+ {Skip first control, is formbackground }
+ if cp<>nil then cp:=cp^.nextcontrol;
+ while cp<>nil do
+ begin
+ if cp^.props[CPclass]<>'FL_END_GROUP' then
+ begin
+ write (Outfile,' ',cp^.props[CPname]);
+ if cp^.nextcontrol<>nil then
+ writeln (OutFile,',')
+ else
+ writeln (OutFile,' : PFL_OBJECT;');
+ end;
+ cp:=cp^.nextcontrol;
+ end;
+ writeln (OutFile,' end;');
+ writeln (OutFile,' PFD_',fp^.name,' = ^TFD_',fp^.name,';');
+ writeln (OutFile);
+end;
+
+Procedure EmitVar (fp : Pformrec);
+
+var cp : PControl;
+
+begin
+ writeln (OutFile,' ',fp^.name,' : PFL_FORM;');
+ cp:=fp^.controls;
+ {Skip first control, is formbackground }
+ if cp<>nil then cp:=cp^.nextcontrol;
+ while cp<>nil do
+ begin
+ if cp^.props[CPclass]<>'FL_END_GROUP' then
+ begin
+ write (Outfile,' ',cp^.props[CPname]);
+ if cp^.nextcontrol<>nil then
+ writeln (OutFile,',')
+ else
+ writeln (OutFile,' : PFL_OBJECT;');
+ end;
+ cp:=cp^.nextcontrol;
+ end;
+ writeln (OutFile);
+end;
+
+Procedure EmitHeader;
+
+var fp : PFormRec;
+
+begin
+ if OptionsSet[2] then
+ write (OutFile,'Program ')
+ else
+ write (OutFile,'Unit ');
+ writeln (OutFile,basename(filename,'.pp'),';');
+ writeln (OutFile);
+ writeln (OutFile,'{ Form definition file generated by fd2pascal }');
+ writeln (Outfile);
+ if not OptionsSet[2] then
+ begin
+ writeln (OutFile,'Interface');
+ writeln (OutFile);
+ end;
+ writeln (OutFile,'Uses forms;');
+ writeln (OutFile);
+ writeln (OutFile,' { Variable / Type definitions. }');
+ if Optionsset[3] then
+ writeln (OutFile,'Var')
+ else
+ writeln (OutFile,'Type');
+ fp:=FormRoot;
+ While fp<>nil do
+ begin
+ if not optionsset[3] then
+ EmitType(fp) { Emit Type definitions }
+ else
+ EmitVar(fp); { Emit Variable declaration}
+ fp:=fp^.nextform;
+ end;
+ if not optionsset[2] then
+ begin
+ { No program, we must emit interface stuff }
+ if not (optionsset[3]) then
+ begin
+ { Emit normal interface declarations
+ -> functions }
+ fp:=formroot;
+ while fp<>nil do
+ begin
+ with fp^ do
+ writeln (OutFile,'Function create_form_',name,' : PFD_',name,';');
+ fp:=fp^.nextform;
+ end;
+ end
+ else
+ begin
+ { Emit alternate interface declaration
+ -> 1 function to create all forms.}
+ writeln (OutFile,'Procedure Create_The_Forms;');
+ end;
+ writeln (OutFile);
+ writeln (OutFile,'Implementation');
+ end
+ else
+ begin
+ { We must make a program. }
+ if not(optionsset[3]) then
+ begin
+ { Normal format, so we need to emit variables for the forms.}
+ writeln (OutFile,'Var');
+ fp:=formroot;
+ while fp<>nil do
+ begin
+ writeln (OutFile,' ',fp^.name,' : PFD_',fp^.name,';');
+ fp:=fp^.nextform;
+ end;
+ writeln (OutFile);
+ end;
+ end;
+ writeln (OutFile);
+end;
+
+{ ------------------------------------------------------------------------
+ Code to emit footer/main program
+ ------------------------------------------------------------------------ }
+
+
+Procedure EmitCreateforms;
+
+var fp : PFormRec;
+
+begin
+ writeln (OutFile,'Procedure Create_The_Forms;');
+ writeln (OutFile);
+ writeln (OutFile,'begin');
+ fp:=FormRoot;
+ while fp<>nil do
+ begin
+ writeln(OutFile,'create_form_',fp^.name,';');
+ fp:=fp^.nextform;
+ end;
+ writeln (outFile,'End;');
+ writeln (OutFile);
+end;
+
+Procedure EmitAlternateMain;
+begin
+ { Alternate format, we just call creatallforms to create all forms}
+ writeln (OutFile,'Create_The_Forms;');
+ writeln (OutFile,' fl_show_form(',formroot^.name,
+ ',FL_PLACE_CENTER,FL_FULLBORDER,''',
+ FormRoot^.name,''');');
+end;
+
+Procedure EmitMain;
+
+var fp : PFormRec;
+
+begin
+ { variables are emitted in the header }
+ fp:=formroot;
+ { Create all forms }
+ while fp<>nil do
+ begin
+ writeln (OutFile,' ',fp^.name,' :=Create_Form_',fp^.name,';');
+ fp:=fp^.nextform;
+ end;
+ { Show the first form }
+ writeln (OutFile,' fl_show_form(',formroot^.name,'^.',Formroot^.name,
+ ',FL_PLACE_CENTER,FL_FULLBORDER,''',
+ FormRoot^.name,''');');
+end;
+
+Procedure EmitFooter;
+begin
+ if OptionsSet[3] then {Alternate format.}
+ EmitCreateForms;
+ if Optionsset[2] then
+ begin
+ {Emit Main Program}
+ writeln (OutFile);
+ writeln (OutFile,'Begin');
+ writeln (OutFile,' fl_initialize (@argc,argv,''',
+ basename(Filename,'.pp'),''',nil,0);');
+ if Not(OptionsSet[3]) then
+ EmitMain
+ else
+ EmitAlternateMain;
+ writeln (OutFile,' fl_do_forms;');
+ end
+ else
+ writeln (OutFile,'begin');
+ writeln (OutFile,'end.')
+end;
+
+
+
+
+{ ------------------------------------------------------------------------
+ Code to emit properties
+ ------------------------------------------------------------------------ }
+
+
+Function EmitString(S : string) : String;
+
+var temp : String;
+ i : longint;
+
+begin
+ temp:='''';
+ for i:=1 to length(s) do
+ if s[i]<>'''' then temp:=temp+s[i] else temp:=temp+'''''';
+ Temp:=temp+'''';
+ EmitString:=temp;
+end;
+
+Procedure EmitBoxtype (cp : PControl;ObjClass : ObjClasses);
+
+begin
+{$ifdef debug}
+ writeln ('EmitBoxType called with args:');
+ writeln (cp^.props[cpboxtype]);
+ writeln (defprops[objclass,APboxtype]);
+ writeln ('for object : ',defprops[objclass,apclass]);
+ writeln ('With object : ',cp^.props[cpclass]);
+{$endif}
+ if cp^.props[cpboxtype]<>defprops[objclass,APboxtype] then
+ writeln (OutFile,' fl_set_object_boxtype(obj,',
+ cp^.props[cpboxtype],');')
+end;
+
+Procedure EmitColors (cp : PControl;ObjClass : ObjClasses);
+
+var temp : string;
+
+begin
+ if cp^.props[cpcolors]<>defprops[objclass,APcolors] then
+ begin
+ temp:=cp^.props[cpcolors];
+ if pos(' ',temp)=0 then exit;
+ temp[pos(' ',temp)]:=',';
+ writeln (OutFile,' fl_set_object_color(obj,',temp,');');
+ end;
+end;
+
+Procedure EmitAlignment (cp : PControl;ObjClass : ObjClasses);
+
+begin
+ if cp^.props[cpalignment]<>defprops[objclass,APalignment] then
+ writeln (OutFile,' fl_set_object_alignment(obj,',
+ cp^.props[cpalignment],');');
+end;
+
+Procedure EmitLcol (cp : PControl;ObjClass : ObjClasses);
+
+begin
+ if cp^.props[cplcol]<>defprops[objclass,APlcol] then
+ writeln (OutFile,' fl_set_object_lcol(obj,',
+ cp^.props[cplcol],');');
+end;
+
+
+Procedure EmitSize (cp : PControl;ObjClass : ObjClasses);
+
+begin
+ if cp^.props[cpsize]<>defprops[objclass,APsize] then
+ writeln (OutFile,' fl_set_object_lsize(obj,',
+ cp^.props[cpsize],');');
+end;
+
+Procedure EmitStyle (cp : PControl;ObjClass : ObjClasses);
+
+begin
+ if cp^.props[cpstyle]<>defprops[objclass,APstyle] then
+ writeln (OutFile,' fl_set_object_lstyle(obj,',
+ cp^.props[cpstyle],');');
+end;
+
+Procedure EmitGravity (cp : PControl;ObjClass : ObjClasses);
+
+var temp: string;
+
+begin
+ if cp^.props[cpstyle]<>'FL_NoGravity FL_NoGravity' then
+ begin
+ temp:=cp^.props[cpstyle];
+ if pos(' ',temp)=0 then exit;
+ temp[pos(' ',temp)]:=',';
+ writeln (OutFile,' fl_set_object_gravity(obj,',
+ temp,');');
+ end;
+end;
+
+
+Procedure EmitProperties (Cp : PControl; Objclass : ObjClasses);
+
+Var i : AdjProps;
+
+begin
+ for i:=APboxtype to APgravity do
+ if DefProps[ObjClass,i]<>'' then
+ EmitProcs[i](cp,objclass);
+end;
+
+{ ------------------------------------------------------------------------
+ Code to emit objects
+ ------------------------------------------------------------------------ }
+
+Procedure EmitObject(cp : PControl);
+
+var temp : string;
+ I : Longint;
+ j,k : ObjClasses;
+
+begin
+with cp^ do
+ begin
+ temp:=lowercase(props[CPclass]);
+ delete(temp,1,3);
+ if temp='begin_group' then
+ begin
+ writeln (OutFile);
+ write (OutFile,' ');
+ if not (Optionsset[3]) then Write (OutFile,'fdui^.');
+ writeln (OutFile,props[cpname],':=fl_bgn_group;');
+ exit;
+ end
+ else if temp='end_group' then
+ begin
+ writeln (OutFile,' fl_end_group;');
+ writeln (OutFile);
+ exit;
+ end;
+ { Normal object. Emit creation code. }
+ write (OutFile,' obj:=fl_add_',temp,' (FL_',props[Cptype],',');
+ temp:=props[cpbox];
+ for i:=1 to 3 do
+ begin
+ write (OutFile,copy(temp,1,pos(' ',temp)-1),',');
+ delete (temp,1,pos(' ',temp));
+ end;
+ writeln (OutFile,temp,',',EmitString(props[cplabel]),');');
+ { Emit Callback code if needed }
+ if props[cpcallback]<>'' then
+ begin
+ write (OutFile,' fl_set_object_callback(obj,PFL_CALLBACKPTR(@');
+ write (OutFile,props[CPcallback],'),');
+ if props[CPargument]<>'' then
+ writeln (OutFile,props[CPargument],');')
+ else
+ writeln (OutFile,'0);');
+ end;
+ { If known object, start emitting properties }
+ temp:=props[CPclass];
+ delete(temp,1,3);
+ k:=FL_INVALID;
+ for j:=FL_BUTTON to FL_FOLDER do
+ if temp=DefProps[j,apclass] then k:=j;
+ if k<>FL_INVALID then
+ begin
+ { Emit defaults }
+ EmitProperties (cp,k);
+ { If A class-specific emitter exists, call it.}
+ if Assigned(ClassEmitters[k]) then
+ ClassEmitters[k] (cp,k);
+ end;
+ { Assign to needed object. }
+ if Optionsset[3] then
+ Writeln (OutFile,' ',props[cpname],':=obj;')
+ else
+ Writeln (OutFile,' fdui^.',props[cpname],':=obj;');
+ end;
+end;
+
+{ ------------------------------------------------------------------------
+ Code to emit forms
+ ------------------------------------------------------------------------ }
+
+Procedure EmitForm(fp : PFormRec);
+
+Var
+cp : PControl;
+
+begin
+with fp^ do
+ begin
+ if Optionsset[3] then
+ begin
+ writeln (OutFile,'Procedure create_form_',name,';');
+ writeln (OutFile);
+ writeln (OutFile,'Var obj : PFL_OBJECT;');
+ writeln (OutFile);
+ writeln (OutFile,'Begin');
+ writeln (OutFile,' If ',name,'<>nil then exit;');
+ write (OutFile,' ',name);
+ end
+ else
+ begin
+ writeln (OutFile,'Function create_form_',name,' : PFD_',name,';');
+ writeln (OutFile);
+ writeln (OutFile,'Var obj : PFL_OBJECT;');
+ writeln (OutFile,' fdui : PFD_',name,';');
+ writeln (OutFile);
+ writeln (OutFile,'Begin');
+ writeln (OutFile,' New(fdui);');
+ write (OutFile,' fdui^.',name);
+ end;
+ writeln (OutFile,':=fl_bgn_form(FL_NO_BOX,'
+ ,width,','
+ ,height,');');
+ cp:=controls;
+ writeln (OutFile,' obj:=fl_add_box(',cp^.props[CPboxtype],',0,0,',
+ width,',',
+ height,',',
+ EmitString (cp^.props[CPname]),');');
+ cp:=cp^.nextcontrol;
+ { Emit all objects }
+ while cp<>nil do
+ begin
+ EmitObject(cp);
+ cp:=cp^.nextcontrol;
+ end;
+ writeln (OutFile,' fl_end_form;');
+ if Optionsset[4] then
+ begin
+ { Emit Compensation code }
+ write (OutFile,' fl_adjust_form_size(');
+ if not(OptionsSet[3]) then write (OutFile,'fdui^.');
+ writeln(OutFile,fp^.name,');');
+ end;
+ if not(OptionsSet[3]) then
+ begin
+ writeln (OutFile,' fdui^.',fp^.name,'^.fdui:=fdui;');
+ writeln (OutFile,' create_form_',fp^.name,':=fdui;');
+ end;
+ writeln (OutFile,'end;');
+ writeln (OutFile);
+ end;
+end;
+
+Procedure EmitForms;
+
+var
+ fp : PformRec;
+begin
+ { Start emitting forms }
+ fp:=Formroot;
+ while fp<>nil do
+ begin
+ EmitForm(fp);
+ fp:=fp^.nextform;
+ end;
+end;
+
+{ ------------------------------------------------------------------------
+ Code to emit callbacks
+ ------------------------------------------------------------------------ }
+
+Procedure CollectCallbacks;
+
+Var CurrentCb,CBwalk : PCBrec;
+ fp : PformRec;
+ cp : PControl;
+
+begin
+ CbRoot:=nil;
+ CurrentCB:=cbroot;
+ fp:=formroot;
+ while fp<>nil do
+ begin
+ cp:=fp^.controls;
+ while cp<>nil do
+ begin
+ if cp^.props[CPcallback]<>'' then
+ if cbroot<>nil then
+ begin
+ cbwalk:=cbroot;
+ while cbwalk<>nil do
+ if upcase(cbwalk^.name)=upcase(cp^.props[CPcallback]) then
+ break
+ else
+ cbwalk:=cbwalk^.next;
+ if cbwalk=nil then
+ begin
+ new(currentcb^.next);
+ currentcb:=currentcb^.next;
+ currentcb^.name:=cp^.props[CPcallback];
+ currentcb^.next:=nil;
+ end;
+ end
+ else
+ begin
+ new(cbroot);
+ currentcb:=cbroot;
+ cbroot^.name:=cp^.props[CPcallback];
+ cbroot^.next:=nil;
+ end;
+ cp:=cp^.nextcontrol;
+ end;
+ fp:=fp^.nextform;
+ end;
+end;
+
+Procedure EmitCallback (Const s : string);
+
+begin
+ writeln (OutFile,'Procedure ',s,' (Sender: PFL_OBJECT; Data : Longint); export;');
+ writeln (OutFile);
+ writeln (OutFile,'begin');
+ writeln (OutFile,' { Place your code here }');
+ writeln (OutFile,'end;');
+ writeln (OutFile);
+end;
+
+Procedure EmitCallBacks;
+
+var cb : pcbrec;
+
+begin
+ { See if we must emit callback stubs }
+ If Optionsset[1] then
+ begin
+ cb:=cbroot;
+ while cb<>nil do
+ begin
+ EmitCallBack(cb^.Name);
+ cb:=cb^.next;
+ end;
+ end;
+end;
+
+
+{ ------------------------------------------------------------------------
+ EmitterTable initialization Code
+ ------------------------------------------------------------------------ }
+
+Procedure EmitDummy (cp : PControl;ObjClass : ObjClasses);
+
+begin
+end;
+
+Procedure InitEmitters;
+
+var i : objclasses;
+
+begin
+ EmitProcs[APClass]:=@EmitDummy;
+ EmitProcs[APBoxtype]:=@EmitBoxType;
+ EmitProcs[APColors]:=@EmitColors;
+ EmitProcs[APAlignment]:=@EmitAlignment;
+ EmitProcs[APlcol]:=@EmitLcol;
+ EmitProcs[APsize]:=@EmitSize;
+ EmitProcs[APStyle]:=@EmitStyle;
+ EmitProcs[APgravity]:=@EmitGravity;
+ for i:=FL_INVALID to FL_FOLDER do
+ ClassEmitters[i]:=EmitProp(Nil);
+end;
+
+{ ------------------------------------------------------------------------
+ Main program Code
+ ------------------------------------------------------------------------ }
+
+
+begin
+ { Process options }
+ DoOptions;
+ { Read input file }
+ OpenFile;
+ DoPreamble;
+ DoForms;
+ DoPostamble;
+ CloseFile;
+ { Write output file }
+ OpenOutfile;
+ InitEmitters;
+ CollectCallbacks;
+ EmitHeader;
+ EmitCallbacks;
+ EmitForms;
+ EmitFooter;
+ CloseOutFile;
+end.
diff --git a/packages/xforms/src/xforms.pp b/packages/xforms/src/xforms.pp
new file mode 100644
index 0000000000..2d5ded9ecf
--- /dev/null
+++ b/packages/xforms/src/xforms.pp
@@ -0,0 +1,2909 @@
+{
+}
+Unit xforms;
+Interface
+
+{$linklib forms}
+{$linklib c}
+{$linklib m}
+
+uses
+ x,xlib,xutil,xresource;
+
+const
+ FL_VERSION=0;
+ FL_REVISION=88;
+ FL_FIXLEVEL=0;
+ FL_INCLUDE_VERSION=FL_VERSION * 1000 + FL_REVISION;
+
+{ some general constants }
+ FL_ON = 1;
+ FL_OK = 1;
+ FL_VALID = 1;
+ FL_PREEMPT = 1;
+ FL_AUTO = 2;
+ FL_WHEN_NEEDED = FL_AUTO;
+
+ FL_OFF = 0;
+ {FL_NONE = 0;}
+ FL_CANCEL = 0;
+ FL_INVALID = 0;
+
+ FL_IGNORE = -1;
+ FL_CLOSE = -2;
+{
+ * The screen coordinate unit, FL_Coord, must be of signed type. Without
+ * prototype support, a type other than integer might not work right.
+ * If FL_Coord is float, FL_CoordIsFloat must be defined to be 1 so that
+ * round-off error can be checked. **TODO Float not tested ***
+ }
+Type PWord = ^Word;
+ PDouble = ^Double;
+ PFloat = ^Real;
+ PLongint = ^Longint;
+ PCardinal = ^Cardinal;
+
+type TFL_Coord = Longint ;
+ PFL_Coord = ^TFL_Coord;
+{ #define FL_CoordIsFloat 0 define this if FL_Coord is of type float }
+ TFL_COLOR = longint; { Was cardinal }
+ PFL_COLOR = ^TFL_COLOR;
+
+{
+ * Coordinates can be in pixels, milli-meters or points (1/72inch)
+ }
+ TFL_COORD_UNIT=Longint ;
+ { POssible values }
+Const
+ FL_COORD_PIXEL=0; { default, Pixel }
+ FL_COORD_MM=1; { milli-meter }
+ FL_COORD_POINT=2; { point }
+ FL_COORD_centiMM=3; { one hundredth of a mm }
+ FL_COORD_centiPOINT=4; { one hundredth of a point }
+
+{
+ * All object classes.
+ }
+
+type TFL_Class = Longint;
+
+Const { Possible values }
+ FL_INVALID_CLASS=0;
+ FL_BUTTON=1;
+ FL_LIGHTBUTTON=2;
+ FL_ROUNDBUTTON=3;
+ FL_ROUND_3DBUTTON=4;
+ FL_CHECKBUTTON=5;
+ FL_BITMAPBUTTON=6;
+ FL_PIXMAPBUTTON=7;
+ FL_BITMAP=8;
+ FL_PIXMAP=9;
+ FL_BOX=10;
+ FL_TEXT=11;
+ FL_MENU=12;
+ FL_CHART=13;
+ FL_CHOICE=14;
+ FL_COUNTER=15;
+ FL_SLIDER=16;
+ FL_VALSLIDER=17;
+ FL_INPUT=18;
+ FL_BROWSER=19;
+ FL_DIAL=21;
+ FL_TIMER=21;
+ FL_CLOCK=22;
+ FL_POSITIONER=23;
+ FL_FREE=24;
+ FL_XYPLOT=25;
+ FL_FRAME=26;
+ FL_LABELFRAME=27;
+ FL_CANVAS=28;
+ FL_GLCANVAS=29;
+ FL_TABFOLDER=30;
+ FL_SCROLLBAR=31;
+ FL_SCROLLBUTTON=32;
+ FL_MENUBAR=33;
+ FL_IMAGECANVAS=34;
+ FL_TEXTBOX=35;
+
+{ how to display a form onto screen }
+
+Type
+ TFL_PLace = Longint;
+
+Const
+ FL_PLACE_FREE = 0; { size remain resizable }
+ FL_PLACE_MOUSE = 1; { mouse centered on form }
+ FL_PLACE_CENTER = 2; { center of the screen }
+ FL_PLACE_POSITION = 4; { specific size }
+ FL_PLACE_SIZE = 8; { specific size }
+ FL_PLACE_GEOMETRY = 16; { specific position }
+ FL_PLACE_ASPECT = 32; { keep aspect ratio }
+ FL_PLACE_FULLSCREEN = 64; { scale to fit screen }
+ FL_PLACE_HOTSPOT = 128; { so mouse fall on (x,y) }
+ FL_PLACE_ICONIC = 256;
+ { modifier }
+ FL_FREE_SIZE = 1 shl 14;
+ FL_FIX_SIZE = 1 shl 15;
+
+ FL_PLACE_FREE_CENTER = FL_PLACE_CENTER or FL_FREE_SIZE;
+ FL_PLACE_CENTERFREE = FL_PLACE_CENTER or FL_FREE_SIZE;
+
+{ Window manager decoration request }
+
+type
+ TFL_DECORATION = Longint;
+
+Const { Possible values for FL_DECORATION }
+ FL_FULLBORDER = 1; { normal }
+ FL_TRANSIENT = 2; { set TRANSIENT_FOR property }
+ FL_NOBORDER = 3; { use override_redirect to supress decor. }
+ FL_MODAL = 1 << 8;
+type
+ { All box types }
+ TFL_BOX_TYPE = Longint;
+Const { Possible values }
+ FL_NO_BOX=0;
+ FL_UP_BOX=1;
+ FL_DOWN_BOX=2;
+ FL_BORDER_BOX=3;
+ FL_SHADOW_BOX=4;
+ FL_FRAME_BOX=5;
+ FL_ROUNDED_BOX=6;
+ FL_EMBOSSED_BOX=7;
+ FL_FLAT_BOX=8;
+ FL_RFLAT_BOX=9;
+ FL_RSHADOW_BOX=10;
+ FL_OVAL_BOX=11;
+ FL_ROUNDED3D_UPBOX=12;
+ FL_ROUNDED3D_DOWNBOX=13;
+ FL_OVAL3D_UPBOX=14;
+ FL_OVAL3D_DOWNBOX=15;
+ FL_OVAL3D_FRAMEBOX=16;
+ FL_OVAL3D_EMBOSSEDBOX=17;
+ { Internal use only }
+ FL_TOPTAB_UPBOX=18;
+ FL_SELECTED_TOPTAB_UPBOX=19;
+ FL_BOTTOMTAB_UPBOX=20;
+ FL_SELECTED_BOTTOMTAB_UPBOX=21;
+ FL_OSHADOW_BOX=22;
+
+{ How to place text relative to a box }
+Type
+ TFL_ALIGN = Longint;
+
+Const { Possible values for FL_ALIGN }
+ FL_ALIGN_CENTER = 0;
+ FL_ALIGN_TOP = 1;
+ FL_ALIGN_BOTTOM = 2;
+ FL_ALIGN_LEFT = 4;
+ FL_ALIGN_RIGHT = 8;
+ FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP or FL_ALIGN_LEFT;
+ FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP or FL_ALIGN_RIGHT;
+ FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM or FL_ALIGN_LEFT;
+ FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM or FL_ALIGN_RIGHT;
+ FL_ALIGN_INSIDE = (1 shl 13);
+ FL_ALIGN_VERT = (1 shl 14); { not functional yet }
+
+ FL_ALIGN_LEFT_TOP = FL_ALIGN_TOP_LEFT;
+ FL_ALIGN_RIGHT_TOP = FL_ALIGN_TOP_RIGHT;
+ FL_ALIGN_LEFT_BOTTOM = FL_ALIGN_BOTTOM_LEFT;
+ FL_ALIGN_RIGHT_BOTTOM = FL_ALIGN_BOTTOM_RIGHT;
+
+{ Mouse buttons }
+
+FL_MBUTTON1=1; FL_LEFT_MOUSE=FL_MBUTTON1;
+FL_MBUTTON2=2; FL_MIDDLE_MOUSE=FL_MBUTTON2;
+FL_MBUTTON3=3; FL_RIGHT_MOUSE=FL_MBUTTON3;
+FL_MBUTTON4=4;
+FL_MBUTTON5=5;
+
+
+{ control when to reutrn input, slider and dial object. }
+
+ FL_RETURN_END_CHANGED = 0;
+ FL_RETURN_CHANGED = 1;
+ FL_RETURN_END = 2;
+ FL_RETURN_ALWAYS = 3;
+ FL_RETURN_DBLCLICK = 4;
+
+{
+ * Some special color indeces for FL private colormap. It does not matter
+ * what the value of each enum is, but it must start from 0 and be
+ * consecutive.
+ }
+
+
+
+Type
+ TFL_DP_COL = Longint;
+Const
+ FL_BLACK = 0;
+ FL_RED = 1;
+ FL_GREEN = 2;
+ FL_YELLOW = 3;
+ FL_BLUE = 4;
+ FL_MAGENTA = 5;
+ FL_CYAN = 6;
+ FL_WHITE = 7;
+
+ FL_TOMATO = 8;
+ FL_INDIANRED = 9;
+ FL_SLATEBLUE = 10;
+
+ FL_COL1 = 11;
+ FL_RIGHT_BCOL = 12;
+ FL_BOTTOM_BCOL = 13;
+ FL_TOP_BCOL = 14;
+ FL_LEFT_BCOL = 15;
+ FL_MCOL = 16;
+
+ FL_INACTIVE = 17;
+ FL_PALEGREEN = 18;
+ FL_DARKGOLD = 19;
+
+ FL_ORCHID = 20;
+ FL_DARKCYAN = 21;
+ FL_DARKTOMATO = 22;
+ FL_WHEAT = 23;
+ FL_DARKORANGE = 24;
+ FL_DEEPPINK = 25;
+ FL_CHARTREUSE = 26;
+ FL_DARKVIOLET = 27;
+ FL_SPRINGGREEN = 28;
+ FL_DOGERBLUE = 29;
+
+ FL_FREE_COL1 = 256;
+ FL_FREE_COL2 = 257;
+ FL_FREE_COL3 = 258;
+ FL_FREE_COL4 = 259;
+ FL_FREE_COL5 = 260;
+ FL_FREE_COL6 = 261;
+ FL_FREE_COL7 = 262;
+ FL_FREE_COL8 = 263;
+ FL_FREE_COL9 = 264;
+ FL_FREE_COL10 = 265;
+ FL_FREE_COL11 = 266;
+ FL_FREE_COL12 = 267;
+ FL_FREE_COL13 = 268;
+ FL_FREE_COL14 = 269;
+ FL_FREE_COL15 = 270;
+ FL_FREE_COL16 = 271;
+
+FL_BUILT_IN_COLS = FL_DOGERBLUE+1;
+FL_INACTIVE_COL = FL_INACTIVE;
+
+{ Some aliases for the color. This is actually backwards ... }
+
+Const
+FL_GRAY16=FL_RIGHT_BCOL;
+FL_GRAY35 = FL_BOTTOM_BCOL;
+FL_GRAY80 = FL_TOP_BCOL;
+FL_GRAY90 = FL_LEFT_BCOL;
+FL_GRAY63 = FL_COL1;
+FL_GRAY75 = FL_MCOL;
+FL_LCOL = FL_BLACK;
+
+{
+ * Pop-up menu item attributes. NOTE if more than 8, need to change
+ * choice and menu class where mode is kept by a single byte
+ }
+ FL_PUP_NONE = 0;
+ FL_PUP_GREY = 1;
+ FL_PUP_BOX = 2;
+ FL_PUP_CHECK = 4;
+ FL_PUP_RADIO = 8;
+
+FL_PUP_GRAY = FL_PUP_GREY;
+FL_PUP_TOGGLE = FL_PUP_BOX;
+FL_PUP_INACTIVE = FL_PUP_GREY;
+
+type
+ TFL_PUP_CB = Procedure (p1 : Longint); { call back prototype } cdecl;
+ PFL_PUP_CB = ^TFL_PUP_CB;
+
+ TFL_PUP_ENTRY = record
+ TheText : pchar; { label of a popup/menu item }
+ CallBack : PFL_PUP_CB; { the callback function }
+ shortcut : pchar; { hotkeys }
+ mode : longint; { FL_PUP_GRAY, FL_PUP_CHECK etc }
+ end;
+ PFL_PUP_ENTRY = ^TFL_PUP_ENTRY;
+
+ TFL_MENU_ENTRY = TFL_PUP_ENTRY;
+ PFL_MENU_ENTRY = ^TFL_MENU_ENTRY;
+
+{ Events that a form reacts to. }
+type TFL_EVENT = Longint;
+Const { Possible values }
+ FL_NOEVENT = 0;
+ FL_DRAW = 1;
+ FL_PUSH = 2;
+ FL_RELEASE = 3;
+ FL_ENTER = 4;
+ FL_LEAVE = 5;
+ FL_MOUSE = 6;
+ FL_FOCUS = 7;
+ FL_UNFOCUS = 8;
+ FL_KEYBOARD = 9;
+ FL_MOTION = 10;
+ FL_STEP = 11;
+ FL_SHORTCUT = 12;
+ FL_FREEMEM = 13;
+ FL_OTHER = 14; { property, selection etc }
+ FL_DRAWLABEL = 15;
+ FL_DBLCLICK = 16; { double click }
+ FL_TRPLCLICK = 17; { triple click }
+ FL_PS = 18; { dump a form into EPS }
+
+const
+FL_MOVE=FL_MOTION; { for compatibility }
+
+{ Resize policies }
+type TFL_RESIZE_T = Longint;
+
+const
+ FL_RESIZE_NONE = 0;
+ FL_RESIZE_X = 1;
+ FL_RESIZE_Y = 2;
+
+const
+ FL_RESIZE_ALL = FL_RESIZE_X or FL_RESIZE_Y;
+
+{ Keyboard focus control }
+type
+ TFL_KEY = Longint;
+
+Const { Possible values for FL_KEY_Normal }
+ FL_KEY_NORMAL = 1; { normal keys(0-255) - tab +left/right }
+ FL_KEY_TAB = 2; { normal keys + 4 direction cursor }
+ FL_KEY_SPECIAL = 4; { only needs special keys(>255) }
+ FL_KEY_ALL = 7; { all keys }
+
+ FL_ALT_VAL = (1 shl 17); { alt + Key --> FL_ALT_VAL + key }
+
+{ Internal use }
+Type
+ TFL_FIND = Longint;
+Const
+ FL_FIND_INPUT =0;
+ FL_FIND_AUTOMATIC =1;
+ FL_FIND_MOUSE =2;
+ FL_FIND_CANVAS =3;
+ FL_FIND_KEYSPECIAL =4;
+
+{******************************************************************
+ * FONTS
+ *****************************************************************}
+
+Const FL_MAXFONTS=32; { max number of fonts }
+
+type TFL_TEXT_STYLE = Longint;
+Const
+ FL_INVALID_STYLE = -1;
+ FL_NORMAL_STYLE = 0;
+ FL_BOLD_STYLE = 1;
+ FL_ITALIC_STYLE = 2;
+ FL_BOLDITALIC_STYLE = 3;
+
+ FL_FIXED_STYLE = 4;
+ FL_FIXEDBOLD_STYLE = 5;
+ FL_FIXEDITALIC_STYLE = 6;
+ FL_FIXEDBOLDITALIC_STYLE = 7;
+
+ FL_TIMES_STYLE = 8;
+ FL_TIMESBOLD_STYLE = 9;
+ FL_TIMESITALIC_STYLE = 10;
+ FL_TIMESBOLDITALIC_STYLE = 11;
+
+ { The following are derived and must differ by multiples of SHADOW,
+ i.e., (FL_ENGRAVED%SHADOW) == 0. All being 2^n has the benefit that
+ (lstyle | FL_SHADOW) == (lstyle + FL_SHADOW). }
+
+Const
+ FL_SHADOW_STYLE = (1 shl 9);
+ FL_ENGRAVED_STYLE = (1 shl 10);
+ FL_EMBOSSED_STYLE = (1 shl 11);
+
+
+Type TFL_FONT_STYLE= TFL_TEXT_STYLE;
+
+{ Standard sizes in XForms }
+Const
+FL_TINY_SIZE = 8;
+FL_SMALL_SIZE = 10;
+FL_NORMAL_SIZE = 12;
+FL_MEDIUM_SIZE = 14;
+FL_LARGE_SIZE = 18;
+FL_HUGE_SIZE = 24;
+
+FL_DEFAULT_SIZE = FL_SMALL_SIZE;
+
+{ Defines for compatibility }
+
+FL_TINY_FONT = FL_TINY_SIZE;
+FL_SMALL_FONT = FL_SMALL_SIZE;
+FL_NORMAL_FONT= FL_NORMAL_SIZE;
+FL_MEDIUM_FONT= FL_MEDIUM_SIZE;
+FL_LARGE_FONT = FL_LARGE_SIZE;
+FL_HUGE_FONT = FL_HUGE_SIZE;
+
+FL_NORMAL_FONT1 = FL_SMALL_FONT;
+FL_NORMAL_FONT2 = FL_NORMAL_FONT;
+FL_DEFAULT_FONT = FL_SMALL_FONT;
+
+
+const
+FL_BOUND_WIDTH = 3; { Border width of boxes }
+
+cFL_BEGIN_GROUP = 10000;
+cFL_END_GROUP = 20000;
+{
+ * Definition of basic struct that holds an object
+ }
+
+FL_CLICK_TIMEOUT = 350; { double click interval }
+
+Type
+
+TFL_pixmap = record
+ thepixmap : Tpixmap;
+ Thewin : TWindow;
+ TheVisual : TVisual;
+ x,y : TFL_Coord;
+ w, h : word;
+ depth : Longint;
+ dbl_background : TFL_COLOR;
+ pixel : TFL_COLOR;
+end;
+
+Pform = ^TForm;
+
+{Pfl_pixmap = ^fl_pixmap;
+}
+
+Pflobjs = ^Tflobjs;
+
+THandle = Function (p1 : Pflobjs; p2 : Longint ; p3 : TFL_Coord; p4 : TFL_Coord;p5 : Longint ; p6 : pointer) : Longint; cdecl;
+PHandle = ^THandle;
+TObject_Callback = Procedure (P1 : Pflobjs;p2 : longint); cdecl;
+PObject_Callback = ^TObject_Callback;
+
+Tflobjs = record
+ form : PForm; { the form this object belong }
+ u_vdata : Pointer;
+ u_cdata : Pchar;
+ u_ldata : longint;
+
+ objclass : Longint ; { class of object, button, slider etc }
+ thetype : Longint; { type within the class }
+ boxtype : Longint ; { what kind of box type }
+ x, y, w, h : TFL_Coord; { obj. location and size }
+ bw : TFL_Coord;
+ col1, col2 : TFL_color; { colors of obj }
+ thelabel : pchar; { object label }
+ lcol : TFL_COLOR; { label color }
+ align : Longint;
+ lsize, lstyle : Longint; { label size and style }
+
+ shortcut : ^Longint;
+
+ handle : PHandle;
+ object_callback : PObject_Callback;
+ argument : Longint;
+
+ spec : pointer; { instantiation }
+
+ prehandle : PHandle;
+ posthandle : PHandle;
+
+
+ { re-configure preference }
+ resize : cardinal; { what to do if WM resizes the FORM }
+ nwgravity : cardinal; { how to re-position top-left corner }
+ segravity : cardinal; { how to re-position lower-right corner }
+
+ parent,child,nc : Pflobjs;
+ ischild : longint;
+
+ prev : pflobjs; { prev. obj in form }
+ next : pflobjs; { next. obj in form }
+
+ flpixmap : Pointer; { pixmap double buffering stateinfo }
+ use_pixmap : Longint; { true to use pixmap double buffering }
+
+ double_buffer : Longint; { only used by mesa/gl canvas }
+
+ { some interaction flags }
+ pushed: Longint ;
+ focus: Longint ;
+ belowmouse: Longint ;
+ active: Longint ; { if accept event }
+ input: Longint ;
+ wantkey: Longint ;
+ radio: Longint ;
+ automatic: Longint ;
+ redraw: Longint ;
+ visible: Longint ;
+ clip: Longint ;
+ click_timeout : cardinal;
+ c_vdata : pointer; { for class use }
+ c_cdata : pchar; { For class use }
+ c_ldata : longint; { for class use }
+ cspec_size : cardinal;
+ aux_col1, aux_col2 : TFL_COLOR;
+ dbl_background : TFL_COLOR;
+ how_return : longint;
+ reserved : array[0..5] of cardinal;
+ { the following are for application programs }
+end;
+
+TFL_OBJECT = TFlobjs;
+PFL_OBJECT = ^TFL_OBJECT;
+
+TCallback = Procedure (P1 : pflobjs; P2 : pointer); cdecl;
+PCallback = ^TCallback;
+{ callback function for an entire form }
+PFL_FORMCALLBACKPTR = PCallback;
+
+{ object callback function }
+PFL_CALLBACKPTR = PCallBack;
+
+{ preemptive callback function }
+PFL_RAW_CALLBACK = PCallback;
+
+{ at close (WM menu delete/close etc.) }
+PFL_FORM_ATCLOSE = PCallback;
+
+{ deactivate/activate callback }
+PFL_FORM_ATDEACTIVATE = PCallback;
+
+PFL_FORM_ATACTIVATE = PCallback;
+
+THandlePtr = Procedure ( p1 : PFL_Object; p2 : Longint; p3,p4 : TFL_COORD; p5 : Longint; p6 : pointer); cdecl;
+PHandlePTR = ^THandlePTR;
+
+PFL_HANDLEPTR = PHandlePTR;
+
+{
+extern FL_OBJECT *FL_EVENT;
+}
+{** FORM ***}
+
+PFL_FORM = ^TFL_FORM;
+
+Tform = record
+ fdui : Pointer;
+ u_vdata : pointer; { for application }
+ u_cdata : pchar;
+ u_ldata : longint;
+
+ thelabel : pchar; { window title }
+ window : cardinal; { X resource ID for window }
+ x, y, w, h : TFL_COORD; { current geometry info }
+ hotx, hoty : TFL_COORD; { hot-spot of the form }
+
+ first,last,focusobj : pflobjs;
+
+ form_callback : PFL_FORMCALLBACKPTR;
+ activate_callback : PFL_FORM_ATACTIVATE;
+ deactivate_callback: PFL_FORM_ATDEACTIVATE ;
+ form_cb_data, activate_data, deactivate_data : pointer;
+
+ key_callback,
+ push_callback,
+ crossing_callback,
+ motion_callback,
+ all_callback: PFL_RAW_CALLBACK ;
+
+ compress_mask : cardinal;
+ evmask : cardinal;
+
+ { WM_DELETE_WINDOW message handler }
+ close_callback : PFL_FORM_ATCLOSE ;
+ close_data : pointer;
+
+
+ flpixmap : pointer; { back buffer }
+
+ icon_pixmap : cardinal;
+ icon_mask : cardinal;
+
+ { interaction and other flags }
+ vmode : Longint ; { current X visual class }
+ deactivated : Longint ; { true if sensitive }
+ use_pixmap : Longint ; { true if dbl buffering }
+ frozen : Longint ; { true if sync change }
+ visible : Longint ; { true if mapped }
+ wm_border : Longint ; { window manager info }
+ prop : cardinal; { other attributes }
+ has_auto : Longint ;
+ top : Longint ;
+ sort_of_modal : Longint;
+ parent, child : PFL_FORM;
+ parent_obj : PFL_OBJECT;
+ reserved : array[0..9] of Longint;
+end;
+TFL_FORM = Tform;
+
+TFD_Any = record
+ form : PFL_FORM;
+ vdata : Pointer;
+ cdata : pchar;
+ ldata : longint;
+ end;
+
+PFD_ANY = ^TFD_ANY;
+
+
+{
+ * Async IO stuff
+ }
+
+const
+ FL_READ = 1;
+ FL_WRITE = 2;
+ FL_EXCEPT = 4;
+
+{ IO other than XEvent Q }
+Type
+
+TFL_IO_CALLBACK = Procedure (p1 :Longint ;p2 : pointer); cdecl;
+PFL_IO_CALLBACK = ^TFL_IO_CALLBACK;
+{ function definitions }
+Procedure fl_add_io_callback(p1 : Longint ; p2 : word; p3 : PFL_IO_CALLBACK; p4 : pointer); cdecl;external;
+Procedure fl_remove_io_callback(p1 : Longint ;p2 : word; p3 : PFL_IO_CALLBACK); cdecl;external;
+
+{ signals }
+type
+
+TFL_SIGNAL_HANDLER = Procedure (p1 : Longint ; p2 : pointer); cdecl;
+PFL_SIGNAL_HANDLER = ^TFL_SIGNAL_HANDLER ;
+
+Procedure fl_add_signal_callback(p1 : LongInt;p2 : PFL_SIGNAL_HANDLER;p3 : pointer); cdecl;external;
+Procedure fl_remove_signal_callback(p1 : Longint ); cdecl;external;
+Procedure fl_signal_caught(p1 :Longint ); cdecl;external;
+Procedure fl_app_signal_direct(p1 : Longint ); cdecl;external;
+
+Function fl_add_timeout (p1 : longint;p2 : PFL_SIGNAL_HANDLER;p3 : pointer) : longint; cdecl;external;
+Procedure fl_remove_timeout(p1 : Longint); cdecl;external;
+
+{ Some utility stuff }
+type
+
+TFL_VN_PAIR = record
+ val : Longint;
+ name : Pchar;
+end;
+
+PFL_VN_PAIR = ^TFL_VN_PAIR;
+
+Function fl_get_vn_value (p1 : PFL_VN_PAIR; p2 : pchar) : Longint; cdecl;external;
+Function fl_get_vn_name (p1 : PFL_VN_PAIR; p2 : Longint ) : Pchar; cdecl;external;
+Function fl_msleep (p1 : cardinal) : cardinal; cdecl;external;
+
+{
+ * Basic public routine prototypes
+ }
+
+Procedure fl_library_version(p1,p2 : pointer ); cdecl;external;
+
+{* Generic routines that deal with FORMS *}
+
+Function fl_bgn_form(P1 : Longint ; P2,p3 : TFL_Coord) : PFL_Form; cdecl;external;
+Procedure fl_end_form; cdecl;external;
+Function fl_do_forms : PFL_OBJECT ; cdecl;external;
+Function fl_check_forms : PFL_OBJECT; cdecl;external;
+Function fl_do_only_forms : PFL_OBJECT; cdecl;external;
+Function fl_check_only_forms : PFL_OBJECT; cdecl;external;
+Procedure fl_freeze_form(P1 : PFL_FORM); cdecl;external;
+
+Procedure fl_set_focus_object( P1 : PFL_FORM;p2 : PFL_OBJECT); cdecl;external;
+Procedure fl_reset_focus_object( p1 : PFL_OBJECT); cdecl;external;
+
+{
+#define fl_set_object_focus fl_set_focus_object
+}
+Function fl_set_form_atclose(p1 : PFL_FORM; p2 : PFL_FORM_ATCLOSE; p3 : pointer) : PFL_FORM_ATCLOSE ; cdecl;external;
+Function fl_set_atclose(p1 : PFL_FORM_ATCLOSE; p2: pointer) : PFL_FORM_ATCLOSE ; cdecl;external;
+
+Function fl_set_form_atactivate(p1 : PFL_FORM; P2 : PFL_FORM_ATACTIVATE; P3 : pointer) : PFL_FORM_ATACTIVATE ; cdecl;external;
+Function fl_set_form_atdeactivate(p1 : PFL_FORM;p2 : PFL_FORM_ATDEACTIVATE;p3 : pointer) : PFL_FORM_ATDEACTIVATE ; cdecl;external;
+
+Procedure fl_unfreeze_form (p1 : PFL_FORM); cdecl;external;
+Procedure fl_deactivate_form(p1 : PFL_FORM); cdecl;external;
+Procedure fl_activate_form(p1 : PFL_FORM); cdecl;external;
+Procedure fl_deactivate_all_forms; cdecl;external;
+Procedure fl_activate_all_forms; cdecl;external;
+Procedure fl_freeze_all_forms; cdecl;external;
+Procedure fl_unfreeze_all_forms; cdecl;external;
+Procedure fl_scale_form(p1 : PFL_FORM;p2,p3 : double); cdecl;external;
+Procedure fl_set_form_position(p1 : PFL_FORM; p2,p3 : TFL_Coord); cdecl;external;
+Procedure fl_set_form_title(p1 : PFL_FORM; p2 : pchar); cdecl;external;
+
+Procedure fl_set_form_property(p1 : PFL_FORM; p2 : word); cdecl;external;
+Procedure fl_set_app_mainform( p1 : PFL_FORM); cdecl;external;
+Function fl_get_app_mainform : PFL_FORM; cdecl;external;
+Procedure fl_set_app_nomainform(P1 : Longint ); cdecl;external;
+
+Procedure fl_set_form_callback(p1 : PFL_FORM; P2 : PFL_FORMCALLBACKPTR; P3 : pointer); cdecl;external;
+{
+#define fl_set_form_call_back fl_set_form_callback
+}
+
+Procedure fl_set_form_size(p1 : PFL_FORM; p2,p3 : TFL_Coord); cdecl;external;
+Procedure fl_set_form_hotspot(p1 : PFL_FORM; p2,p3 : TFL_Coord); cdecl;external;
+Procedure fl_set_form_hotobject(p1 : PFL_FORM; p2 : PFL_OBJECT); cdecl;external;
+Procedure fl_set_form_minsize(p1 : PFL_FORM ; p2,p3 :TFL_Coord); cdecl;external;
+Procedure fl_set_form_maxsize(p1 : PFL_FORM; p2,p3 :TFL_Coord); cdecl;external;
+Procedure fl_set_form_event_cmask(p1 : PFL_FORM; p2 : cardinal); cdecl;external;
+Function fl_get_form_event_cmask(p1 : PFL_FORM) : cardinal; cdecl;external;
+
+Procedure fl_set_form_geometry(p1 : PFL_FORM; p2,p3,p4,p5 : TFL_Coord); cdecl;external;
+
+{
+#define fl_set_initial_placement fl_set_form_geometry
+}
+
+Function fl_show_form (p1 : PFL_FORM; p2,p3 : Longint ; p4 : pchar) : Longint; cdecl;external;
+Procedure fl_hide_form(p1 : PFL_FORM); cdecl;external;
+Procedure fl_free_form(p1 : PFL_FORM); cdecl;external;
+Procedure fl_redraw_form(p1 : PFL_FORM); cdecl;external;
+Procedure fl_set_form_dblbuffer(p1 : PFL_FORM; p2 : Longint ); cdecl;external;
+Procedure fl_prepare_form_window(p1 : PFL_FORM; p2,p3 : Longint ; p4 : pchar); cdecl;external;
+Procedure fl_show_form_window(p1 : PFL_FORM); cdecl;external;
+Function fl_adjust_form_size(p1 : PFL_FORM) : double; cdecl;external;
+Function fl_form_is_visibe (p1 : PFL_FORM) : Longint; cdecl;external;
+
+Function fl_register_raw_callback(p1 : PFL_FORM; p2 : cardinal; P3 : PFL_RAW_CALLBACK): PFL_RAW_CALLBACK; cdecl;external;
+
+{
+#define fl_register_call_back fl_register_raw_callback
+}
+Function fl_bgn_group : PFL_OBJECT; cdecl;external;
+Function fl_end_group : PFL_OBJECT; cdecl;external;
+Procedure fl_addto_group (p1 : PFL_OBJECT); cdecl;external;
+
+{***** Routines that deal with FL_OBJECTS *******}
+
+Procedure fl_set_object_boxtype(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_object_bw(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_object_resize(p1 : PFL_OBJECT; p2 : word); cdecl;external;
+Procedure fl_set_object_gravity(p1 : PFL_OBJECT; p2,p3 : word ); cdecl;external;
+Procedure fl_set_object_lsize(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_object_lstyle(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_object_lcol(p1 : PFL_OBJECT; p2 : TFL_COLOR); cdecl;external;
+Procedure fl_set_object_return(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_object_lalign(p1 : PFL_OBJECT; p2 : Longint ); { to be removed } cdecl;external;
+Procedure fl_set_object_shortcut(p1 : PFL_OBJECT; p2 : pchar;p3 : Longint ); cdecl;external;
+Procedure fl_set_object_shortcutkey(p1 : PFL_OBJECT; p2 : word); cdecl;external;
+Procedure fl_set_object_dblbuffer(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_object_color(p1 : PFL_OBJECT; p2 : TFL_COLOR;p3 : TFL_COLOR); cdecl;external;
+Procedure fl_set_object_label(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+Procedure fl_set_object_position(p1 : PFL_OBJECT; p2,p3 :TFL_Coord); cdecl;external;
+Procedure fl_set_object_size(p1 : PFL_OBJECT; p2,p3 :TFL_Coord); cdecl;external;
+Procedure fl_set_object_automatic(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_draw_object_label(p1 : PFL_OBJECT); cdecl;external;
+Procedure fl_draw_object_label_outside(p1 : PFL_OBJECT); cdecl;external;
+Function fl_get_object_component(p1 : PFL_OBJECT; p2,p3,p4 : Longint): PFL_OBJECT; cdecl;external;
+
+{
+#define fl_set_object_dblclick(p1 : ob; p2 : timeout) (p1 : ob)->click_timeout = (p1 : timeout); p3 :p2 :
+}
+Procedure fl_set_object_geometry(p1 : PFL_OBJECT; p2,p3,p4,p5 :TFL_Coord); cdecl;external;
+
+
+Procedure fl_fit_object_label(p1 : PFL_OBJECT; p2,p3 :TFL_Coord); cdecl;external;
+
+{ no much get (p1 : yet ?) }
+
+Procedure fl_get_object_geometry(p1 : PFL_OBJECT; p2,p3,p4,p5 : PFL_Coord ); cdecl;external;
+Procedure fl_get_object_position(p1 : PFL_OBJECT; p2,p3 :PFL_COORD); cdecl;external;
+
+{ this one takes into account the label }
+Procedure fl_get_object_bbox (p1 : PFL_OBJECT; p2,p3,p4,p5 : PFL_COORD); cdecl;external;
+
+Procedure fl_call_object_callback(p1 : PFL_OBJECT); cdecl;external;
+Function fl_set_object_prehandler(p1 : PFL_OBJECT; p2 : PFL_HANDLEPTR) : PFL_HANDLEPTR ; cdecl;external;
+Function fl_set_object_posthandler(p1 : PFL_OBJECT; p2 : PFL_HANDLEPTR): PFL_HANDLEPTR ; cdecl;external;
+Function fl_set_object_callback(p1 : PFL_OBJECT; p2 : PFL_CALLBACKPTR; p3 :longint) : PFL_CALLBACKPTR ; cdecl;external;
+{
+#define fl_set_object_align fl_set_object_lalign
+#define fl_set_call_back fl_set_object_callback
+}
+Procedure fl_redraw_object(p1 : PFL_OBJECT); cdecl;external;
+Procedure fl_scale_object(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
+Procedure fl_show_object(p1 : PFL_OBJECT); cdecl;external;
+Procedure fl_hide_object(p1 : PFL_OBJECT); cdecl;external;
+Procedure fl_free_object(p1 : PFL_OBJECT); cdecl;external;
+Procedure fl_delete_object(p1 : PFL_OBJECT); cdecl;external;
+Procedure fl_trigger_object(p1 : PFL_OBJECT); cdecl;external;
+Procedure fl_activate_object(p1 : PFL_OBJECT); cdecl;external;
+Procedure fl_deactivate_object(p1 : PFL_OBJECT); cdecl;external;
+
+Type TFL_ENUMERATEPTR = Procedure (p : pchar); cdecl;
+ PFL_ENUMERATEPTR = ^TFL_ENUMERATEPTR;
+
+Procedure fl_enumerate_fonts (p1 : PFL_ENUMERATEPTR; p2 : longint); cdecl;external;
+
+Function fl_set_font_name(p1 : Longint ; p2 : pchar) : longint; cdecl;external;
+Procedure fl_set_font(p1 : Longint ; p2 : Longint ); cdecl;external;
+
+{ routines that facilitate free object }
+
+Function fl_get_char_height(p1,p2 : Longint ; p3,p4 : pointer) : Longint ; cdecl;external;
+Function fl_get_char_width(p1,p2 : Longint ) : Longint; cdecl;external;
+Function fl_get_string_height(p1 : Longint ; p2 : Longint ; p3 : pchar; p4 : Longint ; p5,p6 : pointer) : Longint ; cdecl;external;
+Function fl_get_string_width(p1 : Longint ; p2 : Longint ; p3 : pchar; p4 : Longint ) : Longint ; cdecl;external;
+Function fl_get_string_widthTAB(p1 : Longint ; p2 : Longint ; p3 : pchar; p4 : Longint ) : Longint ; cdecl;external;
+Function fl_get_string_dimension(p1 : Longint ; p2 : Longint ; p3 : pchar; p4 : Longint ; p5,p6 : pointer) : Longint ; cdecl;external;
+{
+#define fl_get_string_size fl_get_string_dimension
+}
+Procedure fl_get_align_xy(p1,p2,p3,p4,p5,p6,p7,p8,p9 : Longint ; p10,p11 : pointer); cdecl;external;
+
+Procedure fl_drw_text(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 : TFL_COLOR; p7,p8 : Longint ; p9 : pchar); cdecl;external;
+
+Procedure fl_drw_text_beside(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 : TFL_COLOR; p7,p8 : Longint ; p9 : pchar); cdecl;external;
+{
+#define fl_draw_text(p1 : a; p2 : x;y;w;h;c;st;sz;s) \
+ (p1 : (p1 : (p1 : a) & FL_ALIGN_INSIDE) ? fl_drw_text:fl_drw_text_beside)\
+ (p1 : a; p2 : x;y;w;h;c;st;sz;s)
+}
+
+Procedure fl_drw_text_cursor(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6,p7,p8: Longint ; p9 : Pchar; p10,p11: Longint ); cdecl;external;
+
+Procedure fl_drw_box(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 : TFL_COLOR; p7 : Longint ); cdecl;external;
+
+type
+
+FL_DRAWPTR = Procedure (p1,p2,p3,p4 : TFL_Coord; p5 : Longint ;p6: TFL_COLOR); cdecl;
+PFL_DRAWPTR = ^FL_DRAWPTR;
+
+Function fl_add_symbol(p1 : pchar; p2 : PFL_DRAWPTR; p3 :Longint ) : Longint ; cdecl;external;
+Function fl_draw_symbol(p1 : pchar; p2,p3,p4,p5 : TFL_Coord;p6 : TFL_COLOR) : Longint ; cdecl;external;
+
+const
+ FL_SLIDER_NONE = 0;
+ FL_SLIDER_BOX = 1;
+ FL_SLIDER_KNOB = 2;
+ FL_SLIDER_UP = 4;
+ FL_SLIDER_DOWN = 8;
+ FL_SLIDER_ALL = 15;
+
+Procedure fl_drw_slider (p1 :longint; p2,p3,P4,p5 : TFL_COORD; p6,p7 : TFL_COLOR;
+ p8 : Longint; p9,p10 : double; P11 : pchar; p12,p13,p14 : Longint);cdecl;external;
+
+
+Function fl_mapcolor(p1 : TFL_COLOR; p2,p3,p4 : Longint ) : cardinal; cdecl;external;
+Function fl_mapcolorname(p1 : TFL_COLOR; p2 : pchar) : longint; cdecl;external;
+{
+#define fl_mapcolor_name fl_mapcolorname
+}
+Function fl_getmcolor(p1 : TFL_COLOR; p2,p3,p4 : pointer) : cardinal; cdecl;external;
+Procedure fl_free_colors(p1 : PFL_COLOR; p2 : Longint ); cdecl;external;
+Procedure fl_free_pixels(p1 : pcardinal; p2 : Longint ); cdecl;external;
+Procedure fl_set_color_leak(p1 : Longint ); cdecl;external;
+Function fl_get_pixel(p1 : TFL_COLOR): cardinal; cdecl;external;
+{
+#define fl_get_flcolor fl_get_pixel
+}
+Procedure fl_get_icm_color(p1 : TFL_COLOR; p2,p3,p4 : pointer); cdecl;external;
+Procedure fl_set_icm_color(p1 : TFL_COLOR; p2,p3,p4 : Longint ); cdecl;external;
+
+Procedure fl_color(p1 : TFL_COLOR); cdecl;external;
+Procedure fl_bk_color(p1 : TFL_COLOR); cdecl;external;
+Procedure fl_textcolor(p1 : TFL_COLOR); cdecl;external;
+Procedure fl_bk_textcolor(p1 : TFL_COLOR); cdecl;external;
+Procedure fl_set_gamma(p1,p2,p3 :double); cdecl;external;
+
+Procedure fl_show_errors(p1 : Longint ); cdecl;external;
+
+{ Some macros }
+{
+#define FL_max(p1 : a; p2 : b) (p1 : (p1 : a) > (p1 : b) ? (p1 : a):(p1 : b) )
+#define FL_min(p1 : a; p2 : b) (p1 : (p1 : a) < (p1 : b) ? (p1 : a):(p1 : b) )
+#define FL_abs(p1 : a) (p1 : (p1 : a) > 0 ? (p1 : a):(p1 : -(p1 : a)))
+#define FL_nint(p1 : a) (p1 : (p1 : a) > 0 ? (p1 : (p1 : a) + 0.5):(p1 : (p1 : a) - 0.5))
+}
+type TFL_FSCB = Function (p1 : pchar; p2 : pointer) : Longint; cdecl;
+PFL_FSCB = ^TFL_FSCB;
+
+{ utilities for new objects }
+var fl_current_form : PFL_FORM; cvar;external;
+Procedure fl_add_object(p1 : PFL_FORM; p2 : PFL_OBJECT); cdecl;external;
+Procedure fl_addto_form(p1 : PFL_FORM); cdecl;external;
+Function fl_make_object(p1 : Longint ; p2,p3,p4,p5,p6 : TFL_Coord; p7 : pchar; P8 : PFL_HANDLEPTR) : PFL_OBJECT; cdecl;external;
+
+Procedure fl_set_coordunit(p1 : Longint ); cdecl;external;
+Function fl_get_coordunit : Longint ; cdecl;external;
+Procedure fl_set_border_width(p1 : Longint ); cdecl;external;
+Function fl_get_border_width : Longint ; cdecl;external;
+Procedure fl_set_scrollbar_type (p1 :longint); cdecl;external;
+
+Procedure fl_flip_yorigin; cdecl;external;
+
+Procedure fl_ringbell ( p1 : longint); cdecl;external;
+Procedure fl_gettime (p1,p2 : Plongint); cdecl;external;
+Function fl_whoami : pchar; cdecl;external;
+Function fl_now : pchar; cdecl;external;
+Function fl_mouse_button : longint; cdecl;external;
+
+
+{ this gives more flexibility for future changes }
+
+{
+#define fl_free free
+#define fl_malloc malloc
+#define fl_calloc calloc
+#define fl_realloc realloc
+}
+Const FL_MAX_MENU_CHOICE_ITEMS = 128;
+
+{
+ *
+ * X Window dependent stuff
+ *
+ }
+
+{ Still need conversion !! }
+{
+#include <X11/Xatom.h>
+#include <X11/keysym.h>
+}
+Const
+
+ FL_MINDEPTH = 1;
+
+
+{ FL_xxx does not do anything anymore; but kept for compatibility }
+ FL_illegalVisual = -1;
+ FL_StaticGray = StaticGray;
+ FL_GrayScale = GrayScale;
+ FL_StaticColor = StaticColor;
+ FL_PseudoColor = PseudoColor;
+ FL_TrueColor = TrueColor;
+ FL_DirectColor = DirectColor;
+ FL_DefaultVisual = 10; { special request }
+
+ FL_North = NorthGravity;
+ FL_NorthEast = NorthEastGravity;
+ FL_NorthWest = NorthWestGravity;
+ FL_South = SouthGravity;
+ FL_SouthEast = SouthEastGravity;
+ FL_SouthWest = SouthWestGravity;
+ FL_East = EastGravity;
+ FL_West = WestGravity;
+ FL_NoGravity = ForgetGravity;
+ FL_ForgetGravity = ForgetGravity;
+
+{
+#define FL_is_gray(p1 : v) (p1 : v==GrayScale || v==StaticGray)
+#define FL_is_rgb(p1 : v) (p1 : v==TrueColor || v==DirectColor)
+}
+
+{
+ * Internal colormap size. Not really very meaningful as fl_mapcolor
+ * and company allow color "leakage"; that is; although only FL_MAX_COLS
+ * are kept in the internal colormap; the server might have substantially
+ * more colors allocated
+ }
+
+FL_MAX_COLS = 1024;
+
+{
+ * FL graphics state information. Some are redundant.
+ }
+
+type
+TFL_STATE = record
+ xvinfo : PXVisualInfo;
+ cur_fnt : PXFontStruct; { current font in default GC }
+ colormap : TColormap ; { colormap valid for xvinfo }
+ trailblazer : TWindow ; { a valid window for xvinfo }
+ vclass, depth, { visual class and color depth }
+ rgb_bits, { primary color resolution }
+ dithered, { true if dithered color }
+ pcm : Longint; { true if colormap is not shared }
+ gc : Array [0..16] of TGC; { working GC }
+ textgc : array [0..16] of TGC; { GC used exclusively for text }
+ dimmedGC : TGC; { A GC having a checkboard stipple }
+ lut :array [0..FL_MAX_COLS] of cardinal; { secondary lookup table }
+ rshift : word;
+ rmask, rbits : Longint;
+ gshift : word;
+ gmask,gbits : Longint ;
+ bshift : word;
+ bmask, bbits : Longint ;
+end;
+PFL_State = ^TFL_State;
+
+{
+#define FL_State FL_STATE
+}
+
+{**** Global variables *****}
+
+Var
+
+fl_display : PDisplay;
+fl_screen : Longint;
+fl_root : TWindow; { root window }
+fl_vroot : TWindow; { virtual root window }
+fl_scrh : Longint;
+fl_scrw : Longint; { screen dimension in pixels }
+fl_vmode : Longint ;
+
+{ current version only runs in single visual mode }
+{
+#define fl_get_vclass(p1 : ) fl_vmode
+#define fl_get_form_vclass(p1 : a) fl_vmode
+}
+{
+fl_state[] : PFL_State ;
+fl_ul_magic_char : pchar;
+}
+
+Function fl_mode_capable(p1,p2 : longint ) : longint; cdecl;external;
+
+{
+#define fl_default_win(p1 : ) (p1 : fl_state[fl_vmode].trailblazer)
+#define fl_default_window(p1 : ) (p1 : fl_state[fl_vmode].trailblazer)
+}
+{
+ * All pixmaps used by FL_OBJECT to simulate double buffering have the
+ * following entries in the structure. TFL_Coord x;y are used to shift
+ * the origin of the drawing routines
+ }
+
+
+{ fonts related }
+Const
+FL_MAX_FONTSIZES=10;
+
+type
+ FL_FONT = record
+ fs : array[0..FL_MAX_FONTSIZES] of PXFontStruct; { cached fontstruct }
+ size : array [0..FL_MAX_FONTSIZES] of byte; { cached sizes }
+ nsize : byte; { cached so far }
+ fname : Array[1..80] of char; { without size info }
+end;
+
+{
+ * Some basic drawing routines
+ }
+
+type TFL_POINT = TXPoint;
+ PFL_Point = ^TFL_Point;
+ TFL_RECT = TXRECTANGLE;
+ PFL_RECT = ^TFL_RECT;
+
+{ rectangles }
+Procedure fl_rectangle(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 : TFL_COLOR); cdecl;external;
+Procedure fl_rectbound(p1,p2,p3,p4 : TFL_Coord;p5 : TFL_COLOR); cdecl;external;
+
+Procedure fl_rectf(x,y,w,h : TFL_COORD;c : TFL_COLOR);
+Procedure fl_rect(x,y,w,h : TFL_COORD;c : TFL_COLOR);
+
+
+{ rectangle with rounded-corners }
+Procedure fl_roundrectangle(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 :TFL_COLOR); cdecl;external;
+
+{
+#define fl_roundrectf(p1 : x; p2 : y;w;h;c) fl_roundrectangle(p1 : 1; p2 : x;y;w;h;c)
+#define fl_roundrect(p1 : x; p2 : y;w;h;c) fl_roundrectangle(p1 : 0; p2 : x;y;w;h;c)
+}
+{ general polygon and polylines }
+Procedure fl_polygon(p1 : Longint ; p2 : PFL_POINT; p3 : Longint ; p4 : TFL_COLOR); cdecl;external;
+
+(*
+#define fl_polyf(p1 : p; p2 : n;c) fl_polygon(p1 : 1; p2 : p; p3 : n; p4 : c)
+#define fl_polyl(p1 : p; p2 : n;c) fl_polygon(p1 : 0; p2 : p; p3 : n; p4 : c)
+#define fl_polybound(p1 : p; p2 : n;c) do {fl_polyf(p1 : p; p2 : n;c);fl_polyl(p1 : p; p2 : n;FL_BLACK);}while(p1 : 0)
+*)
+
+Procedure fl_lines(p1 : TFL_POINT; p2 : Longint ; p3 :TFL_COLOR); cdecl;external;
+Procedure fl_line(p1,p2,p3,p4 : TFL_Coord; p5 : TFL_COLOR); cdecl;external;
+Procedure fl_point(p1,p2 : TFL_Coord; p3: TFL_COLOR); cdecl;external;
+Procedure fl_points(p1 : PFL_POINT; p2 : Longint; p3: TFL_COLOR); cdecl;external;
+
+{
+#define fl_simple_line fl_line
+}
+Procedure fl_dashedlinestyle(p1 : pchar; p2 : Longint ); cdecl;external;
+Procedure fl_drawmode(p1 : Longint ); cdecl;external;
+
+{
+#define fl_diagline(p1 : x; p2 : y;w;h;c) fl_line(p1 : x; p2 : y;(p1 : x)+(p1 : w)-1; p2 : (p1 : y)+(p1 : h)-1; p2 : c)
+}
+{ line attributes }
+Const
+ FL_SOLID = 0;
+ FL_USERDASH = 1;
+ FL_USERDOUBLEDASH = 2;
+ FL_DOT = 3;
+ FL_DOTDASH = 4;
+ FL_DASH = 5;
+ FL_LONGDASH = 6;
+
+Procedure fl_linewidth(p1 : Longint ); cdecl;external;
+Procedure fl_linestyle(p1 : Longint ); cdecl;external;
+
+Function fl_get_linewidth : longint; cdecl;external;
+Function fl_get_linestyle : longint; cdecl;external;
+
+
+{* ellipses *}
+Procedure fl_oval(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 : TFL_COLOR); cdecl;external;
+Procedure fl_ovalbound(p1,p2,p3,p4 : TFL_Coord; p5 : TFL_COLOR); cdecl;external;
+Procedure fl_ovalarc(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6,p7 : Longint; p8 : TFL_COLOR); cdecl;external;
+
+{
+#define fl_ovalf(p1 : x; p2 : y;w;h;c) fl_oval(p1 : 1; p2 : x;y;w;h;c)
+#define fl_ovall(p1 : x; p2 : y;w;h;c) fl_oval(p1 : 0; p2 : x;y;w;h;c)
+#define fl_oval_bound fl_ovalbound
+
+#define fl_circf(p1 : x; p2 : y;r;col) fl_oval(p1 : 1; p2 : (p1 : x)-(p1 : r); p2 : (p1 : y)-(p1 : r); p2 : 2*(p1 : r); p2 : 2*(p1 : r); p2 : col)
+#define fl_circ(p1 : x; p2 : y;r;col) fl_oval(p1 : 0; p2 : (p1 : x)-(p1 : r); p2 : (p1 : y)-(p1 : r); p2 : 2*(p1 : r); p2 : 2*(p1 : r); p2 : col)
+}
+
+{ arcs }
+Procedure fl_pieslice(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6,p7 :Longint ; p8 : TFL_COLOR); cdecl;external;
+{
+#define fl_arcf(p1 : x; p2 : y;r;a1;a2;c) fl_pieslice(p1 : 1; p2 : (p1 : x)-(p1 : r); p2 : (p1 : y)-(p1 : r); p2 : \
+ (p1 : 2*(p1 : r)); p2 : (p1 : 2*(p1 : r)); p2 : a1;a2;c)
+
+#define fl_arc(p1 : x; p2 : y;r;a1;a2;c) fl_pieslice(p1 : 0; p2 : (p1 : x)-(p1 : r); p2 : (p1 : y)-(p1 : r); p2 : \
+ (p1 : 2*(p1 : r)); p2 : (p1 : 2*(p1 : r)); p2 : a1;a2;c)
+}
+{ misc. stuff }
+Procedure fl_add_vertex(p1,p2 : TFL_Coord); cdecl;external;
+Procedure fl_add_float_vertex(p1,p2 : real); cdecl;external;
+Procedure fl_reset_vertex; cdecl;external;
+Procedure fl_endline; cdecl;external;
+Procedure fl_endpolygon; cdecl;external;
+Procedure fl_endclosedline; cdecl;external;
+
+{
+#define fl_bgnline fl_reset_vertex
+#define fl_bgnclosedline fl_reset_vertex
+#define fl_bgnpolygon fl_reset_vertex
+#define fl_v2s(p1 : v) fl_add_vertex(p1 : v[0]; p2 : v[1])
+#define fl_v2i(p1 : v) fl_add_vertex(p1 : v[0]; p2 : v[1])
+#define fl_v2f(p1 : v) fl_add_float_vertex(p1 : v[0]; p2 : v[1])
+#define fl_v2d(p1 : v) fl_add_float_vertex(p1 : v[0]; p2 : v[1])
+}
+
+{ high level drawing routines }
+Procedure fl_drw_frame(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : TFL_COLOR; p7 : Longint ); cdecl;external;
+Procedure fl_drw_checkbox(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : TFL_COLOR;p7 : Longint ); cdecl;external;
+
+{
+ * Interfaces
+ }
+Function fl_get_fontstruct(p1,p2 : Longint ) : PXFontStruct; cdecl;external;
+{
+#define fl_get_font_struct fl_get_fontstruct
+#define fl_get_fntstruct fl_get_font_struct
+}
+
+Function fl_get_mouse(p1,p2 : PFL_COORD; p3 : pword) : TWindow; cdecl;external;
+Procedure fl_set_mouse(p1,p2 : TFL_Coord); cdecl;external;
+Function fl_get_win_mouse(p1 : TWindow; p2,p3 : PFL_COORD; p4 : pword) : TWindow; cdecl;external;
+Function fl_get_form_mouse(p1 : PFL_FORM; p2,p3 : PFL_COORD; p4 : pWord) : TWindow; cdecl;external;
+Function fl_win_to_form(p1 : TWindow) : PFL_form; cdecl;external;
+Procedure fl_set_form_icon(p1 : PFL_FORM; p2 : TPixmap; p3 :TPixmap); cdecl;external;
+
+{
+#define fl_raise_form(p1 : f) if(p1 : f->window) XRaiseWindow(p1 : fl_display; p2 : f->window)
+#define fl_lower_form(p1 : f) if(p1 : f->window) XLowerWindow(p1 : fl_display; p2 : f->window)
+}
+{
+#define fl_set_foreground(p1 : gc; p2 : c) XSetForeground(p1 : fl_display; p2 : gc;fl_get_pixel(p1 : c))
+#define fl_set_background(p1 : gc; p2 : c) XSetBackground(p1 : fl_display; p2 : gc;fl_get_pixel(p1 : c))
+}
+{ General windowing support }
+
+Function fl_wincreate(p1 : pchar) : TWindow; cdecl;external;
+Function fl_winshow(p1 : TWindow) : TWindow; cdecl;external;
+Function fl_winopen(p1 : pchar) : TWindow; cdecl;external;
+Procedure fl_winhide(p1 : TWindow); cdecl;external;
+Procedure fl_winclose(p1 : TWindow); cdecl;external;
+Procedure fl_winset(p1 : TWindow); cdecl;external;
+Function fl_winget : Twindow; cdecl;external;
+
+Procedure fl_winresize(p1 : TWindow; p2,p3 :TFL_Coord); cdecl;external;
+Procedure fl_winmove(p1 : TWindow; p2,p3 :TFL_Coord); cdecl;external;
+Procedure fl_winreshape(p1 : TWindow; p2,p3,p4,p5 : TFL_Coord); cdecl;external;
+Procedure fl_winicon(p1 : TWindow; p2 : TPixmap; p3 :TPixmap); cdecl;external;
+Procedure fl_winbackground(p1 : TWindow; p2 : cardinal); cdecl;external;
+Procedure fl_winstepunit(p1 : TWindow; p2,p3 :TFL_Coord); cdecl;external;
+Procedure fl_winisvalid(p1 : TWindow); cdecl;external;
+Procedure fl_wintitle(p1 : TWindow; p2 : pchar); cdecl;external;
+Procedure fl_winposition(p1,p2 : TFL_Coord); cdecl;external;
+
+{
+#define fl_pref_winposition fl_winposition
+#define fl_win_background fl_winbackground
+#define fl_set_winstepunit fl_winstepunit
+}
+
+
+Procedure fl_winminsize(p1 : TWindow; p2,p3 :TFL_Coord); cdecl;external;
+Procedure fl_winmaxsize(p1 : TWindow; p2,p3 :TFL_Coord); cdecl;external;
+Procedure fl_winaspect(p1 : TWindow; p2,p3 :TFL_Coord); cdecl;external;
+Procedure fl_reset_winconstraints(p1 : TWindow); cdecl;external;
+
+Procedure fl_winsize(p1,p2 : TFL_Coord); cdecl;external;
+Procedure fl_initial_winsize(p1,p2 : TFL_Coord); cdecl;external;
+{
+#define fl_pref_winsize fl_winsize
+}
+Procedure fl_initial_winstate(p1 : Longint ); cdecl;external;
+
+Function fl_create_colormap(p1 : PXVisualInfo; p2 : Longint ) : TColormap; cdecl;external;
+
+
+Procedure fl_wingeometry(p1,p2,p3,p4 : TFL_Coord); cdecl;external;
+{
+#define fl_pref_wingeometry fl_wingeometry
+}
+Procedure fl_initial_wingeometry(p1,p2,p3,p4 : TFL_Coord); cdecl;external;
+
+{
+Procedure fl_noborder; cdecl;external;
+Procedure fl_transient; cdecl;external;
+}
+
+Procedure fl_get_winsize(p1 : TWindow; p2,p3 :PFL_COORD); cdecl;external;
+Procedure fl_get_winorigin(p1 : TWindow; p2,p3 :PFL_COORD); cdecl;external;
+Procedure fl_get_wingeometry(p1 : TWindow; p2,p3,p4,p5 : PFL_COORD); cdecl;external;
+
+{ for compatibility }
+{
+#define fl_get_win_size fl_get_winsize
+#define fl_get_win_origin fl_get_winorigin
+#define fl_get_win_geometry fl_get_wingeometry
+#define fl_initial_winposition fl_pref_winposition
+
+#define fl_get_display(p1 : ) fl_display
+#define FL_FormDisplay(p1 : form) fl_display
+#define FL_ObjectDisplay(p1 : object) fl_display
+}
+
+{ the window an object belongints }
+
+Function FL_ObjWin ( P : PFL_Object) : TWindow;
+
+{
+#define FL_OBJECT_WID FL_ObjWin
+}
+
+{ all registerable events; including Client Message }
+const FL_ALL_EVENT = (KeyPressMask or KeyReleaseMask or
+ ButtonPressMask or ButtonReleaseMask or
+ EnterWindowMask or LeaveWindowMask or
+ ButtonMotionMask or PointerMotionMask);
+
+{ Timer related }
+
+ FL_TIMER_EVENT = $40000000;
+
+
+Function fl_XNextEvent(p1 : PXEvent) : Longint; cdecl;external;
+Function fl_XPeekEvent(p1 : PXEvent) : Longint; cdecl;external;
+Function fl_XEventsQueued(p1 : Longint ) : Longint; cdecl;external;
+Procedure fl_XPutBackEvent(p1 : PXEvent); cdecl;external;
+Function fl_last_event : PXEvent ; cdecl;external;
+
+type
+TFL_APPEVENT_CB = Procedure (p1 : PXEvent; p2 : pointer); cdecl;
+PFL_APPEVENT_CB = ^TFL_APPEVENT_CB;
+
+Function fl_set_event_callback(p1 : PFL_APPEVENT_CB; p2 : pointer) : PFL_APPEVENT_CB ; cdecl;external;
+Function fl_set_idle_callback(p1 : PFL_APPEVENT_CB; p2 : pointer) : PFL_APPEVENT_CB ; cdecl;external;
+Function fl_addto_selected_xevent(p1 : TWindow; p2 : longint) : Cardinal; cdecl;external;
+Function fl_remove_selected_xevent(p1 : TWindow; p2 : longint) : cardinal; cdecl;external;
+{
+#define fl_add_selected_xevent fl_addto_selected_xevent
+}
+{
+ * Group some WM stuff into a structure for easy maintainance
+ }
+const
+ FL_WM_SHIFT = 1;
+ FL_WM_NORMAL = 2;
+
+type TFL_WM_STUFF = record
+ rpx, rpy, { reparenting offset for full border }
+ trpx, trpy, { reparenting offset for transient }
+ bw, { additional border }
+ rep_method : Longint; { 1 for shifting; 2 for normal }
+ pos_request : word; { USPOSITION or PPOSITION }
+end;
+PFL_WM_STUFF = ^TFL_WM_STUFF;
+
+
+Function fl_add_event_callback(p1 : TWindow; p2 : Longint ; p3 : PFL_APPEVENT_CB; p4 : pointer) : PFL_APPEVENT_CB ; cdecl;external;
+
+Procedure fl_remove_event_callback(p1 : TWindow; p2 : Longint ); cdecl;external;
+Procedure fl_activate_event_callbacks(p1 : TWindow); cdecl;external;
+
+Function fl_print_xevent_name(p1 : pchar; p2 : PXEvent) : PXEvent; cdecl;external;
+
+{
+#define metakey_down(p1 : mask) (p1 : (p1 : mask) & Mod1Mask)
+#define shiftkey_down(p1 : mask) (p1 : (p1 : mask) & ShiftMask)
+#define controlkey_down(p1 : mask) (p1 : (p1 : mask) & ControlMask)
+#define button_down(p1 : mask) (p1 : (p1 : (p1 : mask) & Button1Mask) || \
+ (p1 : (p1 : mask) & Button2Mask) || \
+ (p1 : (p1 : mask) & Button3Mask))
+#define fl_keypressed fl_keysym_pressed
+}
+{***************** Resources **************}
+
+
+{ bool is Longint . FL_NONE is defined elsewhere }
+const
+ FL_NONE = 0;
+ FL_SHORT = 10;
+ FL_BOOL = 11;
+ FL_INT = 12;
+ FL_LONG = 13;
+ FL_FLOAT = 14;
+ FL_STRING = 15;
+
+Type TFL_RTYPE = Longint;
+
+TFL_RESOURCE = record
+ res_name, { resource name }
+ res_class : Pchar; { resource class }
+ rtype : TFL_RTYPE; { FL_INT; FL_FLOAT; FL_BOOL;FL_STRING }
+ thevar : pointer; { address for the variable }
+ defval : pchar; { default setting in string form }
+ bytes : Longint { used only for strings }
+end;
+PFL_RESOURCE = ^TFL_RESOURCE;
+
+Type
+ TFL_CMD_OPT = TXrmOptionDescRec;
+ PFL_CMD_OPT = ^TFL_CMD_OPT;
+
+Function fl_initialize(p1 : pointer; p2 : ppchar; p3 :pchar; p4 : PFL_CMD_OPT; p5 : Longint ) : Pdisplay; cdecl;external;
+Procedure fl_finish; cdecl;external;
+
+{ addfromhere }
+
+Function fl_get_resource(p1 : pchar; p2 : pchar; p3 : TFL_RTYPE; p4 : pchar; p5 : pointer; p6 :Longint ) : pchar; cdecl;external;
+Procedure fl_set_resource(p1 : pchar; p2 : pchar); cdecl;external;
+
+Procedure fl_get_app_resources(p1 : PFL_resource; p2 : Longint ); cdecl;external;
+Procedure fl_set_graphics_mode(p1 : Longint ; p2 : Longint ); cdecl;external;
+Procedure fl_set_visualID(p1 : longint); cdecl;external;
+Function fl_keysym_pressed(p1 : TKeySym) : Longint; cdecl;external;
+
+{
+#define buttonLabelSize buttonFontSize
+#define sliderLabelSize sliderFontSize
+#define inputLabelSize inputFontSize
+}
+{ All Form control variables. Named closely as its resource name }
+Type TFL_IOPT = record
+ rgamma, ggamma, bgamma : longint; { MUST BE FLOAT(single) !!! }
+ debug, sync,
+ depth, vclass, doubleBuffer,
+ ulPropWidth, ulThickness, { underline stuff }
+ buttonFontSize,
+ sliderFontSize,
+ inputFontSize,
+ browserFontSize,
+ menuFontSize,
+ choiceFontSize,
+ labelFontSize, { all other labels fonts }
+ pupFontSize, pupFontStyle, { font for pop-up menus }
+ privateColormap,
+ sharedColormap,
+ standardColormap,
+ ScrollBarType,
+ backingStore,
+ coordUnit,
+ borderWidth,
+ safe : Longint ;
+ rgbfile : pchar; { where RGB file is }
+ vname : array [0..23] of char;
+end;
+PFL_IOPT = ^TFL_IOPT;
+
+
+Const
+
+{ program default masks }
+
+ FL_PDDepth = 1 shl 1 ;
+ FL_PDClass = 1 shl 2 ;
+ FL_PDDouble = 1 shl 3 ;
+ FL_PDSync = 1 shl 4 ;
+ FL_PDPrivateMap = 1 shl 5 ;
+ FL_PDLeftScrollBar = 1 shl 6 ;
+ FL_PDPupFontSize = 1 shl 7 ;
+ FL_PDButtonFontSize = 1 shl 8 ;
+ FL_PDInputFontSize = 1 shl 9 ;
+ FL_PDSliderFontSize = 1 shl 10 ;
+ FL_PDVisual = 1 shl 11 ;
+ FL_PDULThickness = 1 shl 12 ;
+ FL_PDULPropWidth = 1 shl 13 ;
+ FL_PDBS = 1 shl 14 ;
+ FL_PDCoordUnit = 1 shl 15 ;
+ FL_PDDebug = 1 shl 16 ;
+ FL_PDSharedMap = 1 shl 17 ;
+ FL_PDStandardMap = 1 shl 18 ;
+ FL_PDBorderWidth = 1 shl 19 ;
+ FL_PDSafe = 1 shl 20 ;
+ FL_PDMenuFontSize = 1 shl 21 ;
+ FL_PDBrowserFontSize = 1 shl 22 ;
+ FL_PDChoiceFontSize = 1 shl 23 ;
+ FL_PDLabelFontSize = 1 shl 24;
+ FL_PDButtonLabelSize = FL_PDButtonFontSize;
+ FL_PDSliderLabelSize = FL_PDSliderFontSize;
+ FL_PDInputLabelSize = FL_PDInputFontSize;
+ FL_PDButtonLabel = FL_PDButtonLabelSize;
+
+Procedure fl_set_defaults(p1 : cardinal; p2 : PFL_IOPT); cdecl;external;
+Procedure fl_set_tabstop(p1 : pchar); cdecl;external;
+Procedure fl_get_defaults(p1 : PFL_IOPT); cdecl;external;
+Function fl_get_visual_depth : Longint; cdecl;external;
+Function fl_vclass_name(p1 : Longint ) : pchar; cdecl;external;
+Function fl_vclass_val(p1 : pchar) : Longint ; cdecl;external;
+Procedure fl_set_ul_property(p1 : Longint ; p2 : Longint ); cdecl;external;
+Procedure fl_set_clipping(p1 : TFL_Coord; p2 : TFL_Coord; p3 : TFL_Coord; p4 : TFL_Coord); cdecl;external;
+Procedure fl_set_gc_clipping(p1 : TGC; p2 : TFL_Coord; p3 : TFL_Coord; p4 : TFL_Coord; p5 : TFL_Coord); cdecl;external;
+Procedure fl_unset_gc_clipping(p1 : TGC); cdecl;external;
+Procedure fl_set_clippings(p1 : PFL_RECT; p2 : Longint ); cdecl;external;
+Procedure fl_unset_clipping; cdecl;external;
+
+Function fl_textgc : TGC; cdecl;external;
+{
+#define fl_set_text_clipping(p1 : a; p2 : b;c;d) fl_set_gc_clipping(p1 : fl_textgc; p2 : a;b;c;d)
+#define fl_unset_text_clipping(p1 : ) fl_unset_gc_clipping(p1 : fl_textgc)
+}
+
+Const
+ FL_NORMAL_BITMAP = 0;
+
+{**** Defaults ****}
+FL_BITMAP_BOXTYPE =FL_NO_BOX;
+FL_BITMAP_COL1 =FL_COL1; { background of bitmap }
+FL_BITMAP_COL2 =FL_COL1; { not used currently }
+FL_BITMAP_LCOL =FL_LCOL; { foreground of bitmap }
+FL_BITMAP_ALIGN =FL_ALIGN_BOTTOM;
+
+{**** Others ****}
+
+{FL_BITMAP_MAXSIZE = 128*128;}
+
+{**** Routines ****}
+Function fl_create_bitmap(p1 : Longint ; p2 : TFL_Coord; p3 : TFL_Coord; p4 : TFL_Coord; p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_bitmap(p1 : Longint ; p2 : TFL_Coord; p3 : TFL_Coord; p4 : TFL_Coord; p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+Procedure fl_set_bitmap_data(p1 : PFL_OBJECT; p2 : Longint ; p3 : Longint ; p4 : pointer); cdecl;external;
+Procedure fl_set_bitmap_file(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+Function fl_read_bitmapfile(p1 : TWindow; p2 : pchar; p3,p4 : pword; p5,p6 : pointer) : TPixmap ; cdecl;external;
+
+{
+#define fl_create_from_bitmapdata(p1 : win; p2 : data; p3 : w; p4 : h)\
+ XCreateBitmapFromData(p1 : fl_get_display(p1 : ); p2 : win; p3 :\
+ (p1 : char *)data; p2 : w; p3 :h)
+#define fl_set_bitmap_datafile fl_set_bitmap_file
+}
+
+{ PIXMAP stuff }
+
+Const
+FL_NORMAL_PIXMAP = 0;
+
+Function fl_create_pixmap(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 :pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_pixmap(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Procedure fl_set_pixmap_data(p1 : PFL_OBJECT; p2 : ppchar); cdecl;external;
+Procedure fl_set_pixmap_file(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+Procedure fl_set_pixmap_align(p1 : PFL_OBJECT; p2 : Longint ; p3 : Longint ; p4 : Longint ); cdecl;external;
+Procedure fl_set_pixmap_pixmap(p1 : PFL_OBJECT; p2 : TPixmap; p3 :TPixmap); cdecl;external;
+Procedure fl_set_pixmap_colorcloseness(p1 : Longint ; p2 : Longint ; p3 :Longint ); cdecl;external;
+Procedure fl_free_pixmap_pixmap(p1 : PFL_OBJECT); cdecl;external;
+Function fl_get_pixmap_pixmap(p1 : PFL_OBJECT; p2 : PPixmap; p3 : PPixmap) : TPixmap ; cdecl;external;
+
+Function fl_read_pixmapfile(p1 : TWindow; p2 : pchar;p3,p4 : pword; p5 : PPixmap;p6,p7 : pointer; p8 : TFL_COLOR) : TPixmap ; cdecl;external;
+Function fl_create_from_pixmapdata(p1 : TWindow; p2 : ppchar;p3,p4 : pword; p5 : PPixmap;p6,p7 : pointer; p8 : TFL_COLOR) : TPixmap ; cdecl;external;
+{
+#define fl_free_pixmap(p1 : id) if(p1 : id != None) XFreePixmap(p1 : fl_display; p2 : id);
+}
+
+Function fl_create_box(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_box(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Type TFL_BROWSER_TYPE = Longint;
+
+Const
+ FL_NORMAL_BROWSER = 0;
+ FL_SELECT_BROWSER = 1;
+ FL_HOLD_BROWSER = 2;
+ FL_MULTI_BROWSER = 3;
+
+{**** Defaults ****}
+
+ FL_BROWSER_BOXTYPE = FL_DOWN_BOX;
+ FL_BROWSER_COL1 = FL_COL1;
+ FL_BROWSER_COL2 = FL_YELLOW;
+ FL_BROWSER_LCOL = FL_LCOL;
+ FL_BROWSER_ALIGN = FL_ALIGN_BOTTOM;
+
+{**** Others ****}
+
+ FL_BROWSER_SLCOL = FL_COL1;
+ FL_BROWSER_LINELENGTH = 1024;
+ FL_BROWSER_FONTSIZE = FL_SMALL_FONT;
+
+{ as of .86
+ FL_SCROLLBAR_OFF = 0;
+ FL_SCROLLBAR_ON = 1;
+ FL_SCROLLBAR_ALWAYS_ON = 2;
+}
+
+{**** Routines ****}
+
+Function fl_create_browser(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_browser(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6: pchar) : PFL_OBJECT; cdecl;external;
+Procedure fl_clear_browser(p1 : PFL_OBJECT); cdecl;external;
+Procedure fl_add_browser_line(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+Procedure fl_addto_browser(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+Procedure fl_addto_browserchars(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+
+Procedure fl_insert_browser_line(p1 : PFL_OBJECT; p2 : Longint ; p3 :pchar); cdecl;external;
+Procedure fl_delete_browser_line(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_replace_browser_line(p1 : PFL_OBJECT; p2 : Longint ; p3 :pchar); cdecl;external;
+Function fl_get_browser_line(p1 : PFL_OBJECT; p2 : Longint ) : pchar; cdecl;external;
+Function fl_load_browser(p1 : PFL_OBJECT; p2 : pchar ) : Longint ; cdecl;external;
+
+Procedure fl_select_browser_line(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_deselect_browser_line(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_deselect_browser(p1 : PFL_OBJECT); cdecl;external;
+Function fl_isselected_browser_line(p1 : PFL_OBJECT; p2 : Longint ) : Longint ; cdecl;external;
+
+Function fl_get_browser_topline(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
+Function fl_get_browser(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
+Function fl_get_browser_maxline(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
+Function fl_get_browser_screenlines(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
+
+Procedure fl_set_browser_topline(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_browser_fontsize(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_browser_fontstyle(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_browser_specialkey(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_browser_vscrollbar(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_browser_hscrollbar(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_browser_leftslider(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_browser_line_selectable(p1 : PFL_OBJECT; p2 : Longint ; p3 :Longint ); cdecl;external;
+Procedure fl_get_browser_dimension(p1 : PFL_OBJECT; p2,p3,p4,p5 : PFL_COORD); cdecl;external;
+Procedure fl_set_browser_dblclick_callback(p1 : PFL_OBJECT; p2 : PFL_CALLBACKPTR; p3 :longint); cdecl;external;
+{
+#define fl_set_browser_leftscrollbar fl_set_browser_leftslider
+}
+Procedure fl_set_browser_xoffset(p1 : PFL_OBJECT; p2 : TFL_Coord); cdecl;external;
+Procedure fl_set_browser_scrollbarsize (p1 : PFL_OBJECT;p2,p3 : longint); cdecl;external;
+Procedure fl_show_browser_line(p1 : PFL_OBJECT; p2 : longint); cdecl;external;
+Function fl_get_browser_xoffset(p1 : PFL_OBJECT) : TFL_Coord ; cdecl;external;
+
+type
+ TFL_BUTTON_TYPE= Longint;
+
+Const
+ FL_NORMAL_BUTTON = 0;
+ FL_PUSH_BUTTON = 1;
+ FL_RADIO_BUTTON = 2;
+ FL_HIDDEN_BUTTON = 3;
+ FL_TOUCH_BUTTON = 4;
+ FL_INOUT_BUTTON = 5;
+ FL_RETURN_BUTTON = 6;
+ FL_HIDDEN_RET_BUTTON= 7;
+ FL_MENU_BUTTON = 8;
+
+type TFL_BUTTON_SPEC = record
+ pixmap,mask : TPixmap;
+ bits_w, bits_h : Cardinal;
+ val, { whether on }
+ mousebut, { mouse button that caused the push }
+ timdel, { time since last touch (p1 : TOUCH buttons) }
+ event : Longint; { what event triggers redraw }
+ cspecl : longint; { reserved for class specfic stuff }
+ cspecv : pointer; { misc. things }
+ filename : pchar;
+end;
+TFL_BUTTON_STRUCT = TFL_BUTTON_SPEC;
+PFL_BUTTON_STRUCT = ^TFL_BUTTON_STRUCT;
+
+TFL_DrawButton = Procedure (p1 : PFL_OBJECT); cdecl;
+PFL_DrawButton = ^TFL_DrawButton;
+TFL_CleanupButton = Procedure (p1 : PFL_BUTTON_STRUCT); cdecl;
+PFL_CleanupButton= ^TFL_CleanupButton;
+
+Const
+FL_BUTTON_BOXTYPE = FL_UP_BOX;
+FL_BUTTON_COL1 = FL_COL1;
+FL_BUTTON_COL2 = FL_COL1;
+FL_BUTTON_LCOL = FL_LCOL;
+FL_BUTTON_ALIGN = FL_ALIGN_CENTER;
+
+FL_BUTTON_MCOL1 = FL_MCOL;
+FL_BUTTON_MCOL2 = FL_MCOL;
+
+FL_BUTTON_BW = FL_BOUND_WIDTH;
+
+{
+ * light button defaults
+ }
+FL_LIGHTBUTTON_BOXTYPE = FL_UP_BOX;
+FL_LIGHTBUTTON_COL1 = FL_COL1;
+FL_LIGHTBUTTON_COL2 = FL_YELLOW;
+FL_LIGHTBUTTON_LCOL = FL_LCOL;
+FL_LIGHTBUTTON_ALIGN = FL_ALIGN_CENTER;
+
+{**** Others ****}
+
+FL_LIGHTBUTTON_TOPCOL = FL_COL1;
+FL_LIGHTBUTTON_MCOL = FL_MCOL;
+FL_LIGHTBUTTON_MINSIZE = 12;
+
+{* round button defaults **}
+
+ FL_ROUNDBUTTON_BOXTYPE = FL_NO_BOX;
+ FL_ROUNDBUTTON_COL1 = FL_MCOL;
+ FL_ROUNDBUTTON_COL2 = FL_YELLOW;
+ FL_ROUNDBUTTON_LCOL = FL_LCOL;
+ FL_ROUNDBUTTON_ALIGN = FL_ALIGN_CENTER;
+
+ FL_ROUNDBUTTON_TOPCOL = FL_COL1;
+ FL_ROUNDBUTTON_MCOL = FL_MCOL;
+
+{* round3d button defaults **}
+
+ FL_ROUND3DBUTTON_BOXTYPE = FL_NO_BOX;
+ FL_ROUND3DBUTTON3D_COL1 = FL_MCOL;
+ FL_ROUND3DBUTTON_COL2 = FL_YELLOW;
+ FL_ROUND3DBUTTON_LCOL = FL_LCOL;
+ FL_ROUND3DBUTTON_ALIGN = FL_ALIGN_CENTER;
+
+ FL_ROUND3DBUTTON_TOPCOL = FL_COL1;
+ FL_ROUND3DBUTTON_MCOL = FL_MCOL;
+
+{* check button defaults **}
+
+ FL_CHECKBUTTON_BOXTYPE = FL_NO_BOX;
+ FL_CHECKBUTTON_COL1 = FL_COL1;
+ FL_CHECKBUTTON_COL2 = FL_YELLOW;
+ FL_CHECKBUTTON_LCOL = FL_LCOL;
+ FL_CHECKBUTTON_ALIGN = FL_ALIGN_CENTER;
+
+ FL_CHECKBUTTON_TOPCOL = FL_COL1;
+ FL_CHECKBUTTON_MCOL = FL_MCOL;
+
+{* bitmap button defaults *}
+ FL_BITMAPBUTTON_BOXTYPE = FL_UP_BOX;
+ FL_BITMAPBUTTON_COL1 = FL_COL1; { bitmap background }
+ FL_BITMAPBUTTON_COL2 = FL_BLUE; { "focus" color }
+ FL_BITMAPBUTTON_LCOL = FL_LCOL; { bitmap foreground }
+ FL_BITMAPBUTTON_ALIGN = FL_ALIGN_BOTTOM;
+
+{* bitmap button defaults *}
+ FL_PIXMAPBUTTON_BOXTYPE = FL_UP_BOX;
+ FL_PIXMAPBUTTON_COL1 = FL_COL1; { box col }
+ FL_PIXMAPBUTTON_COL2 = FL_YELLOW; { bound rect }
+ FL_PIXMAPBUTTON_LCOL = FL_LCOL;
+ FL_PIXMAPBUTTON_ALIGN = FL_ALIGN_BOTTOM;
+
+{**** Routines ****}
+
+Function fl_create_button(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_create_roundbutton(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_create_round3dbutton(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_create_lightbutton(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_create_checkbutton(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_create_bitmapbutton(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_create_pixmapbutton(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Function fl_add_roundbutton(p1 : Longint ; p2,p3,p4,p5 :TFL_Coord; p6: pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_round3dbutton(p1 : Longint ; p2,p3,p4,p5 :TFL_Coord; p6: pchar) : PFL_OBJECT; cdecl;external;
+
+Function fl_add_lightbutton(p1 : Longint ; p2,p3,p4,p5 :TFL_Coord; p6: pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_checkbutton(p1 : Longint ; p2,p3,p4,p5 :TFL_Coord; p6: pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_button(p1 : Longint ; p2,p3,p4,p5 :TFL_Coord; p6: pchar) : PFL_OBJECT; cdecl;external;
+
+
+Procedure fl_set_bitmapbutton_data (p1 : PFL_OBJECT; p2,p3 : Longint ; p4 : pchar); cdecl;external;
+Procedure fl_set_bitmapbutton_file (p1 : PFL_OBJECT; p2: pchar); cdecl;external;
+Function fl_add_bitmapbutton (p1 : longint; p2,p3,p4,p5: TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+{
+#define fl_set_bitmapbutton_datafile fl_set_bitmapbutton_file
+}
+
+Function fl_add_pixmapbutton(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+Procedure fl_set_pixmapbutton_data(p1 : PFL_OBJECT; p2 : ppchar);
+Procedure fl_set_pixmapbutton_file(p1 : PFL_OBJECT; p2 : pchar);
+Procedure fl_set_pixmapbutton_align(p1 : PFL_OBJECT; p2 : Longint ; p3 : Longint ; p4 : Longint );
+Procedure fl_set_pixmapbutton_pixmap(p1 : PFL_OBJECT; p2 : TPixmap; p3 :TPixmap);
+Procedure fl_set_pixmapbutton_colorcloseness(p1 : Longint ; p2 : Longint ; p3 :Longint );
+Procedure fl_free_pixmapbutton_pixmap(p1 : PFL_OBJECT);
+Function fl_get_pixmapbutton_pixmap(p1 : PFL_OBJECT; p2 : PPixmap; p3 : PPixmap) : TPixmap;
+
+Function fl_get_button(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
+Procedure fl_set_button(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Function fl_get_button_numb(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
+
+Procedure fl_set_button_shortcut(p1 : PFL_OBJECT; p2 : pchar;p3 : Longint );
+
+Function fl_create_generic_button(p1,p2 : Longint ; p3,p4,p5,p6 : TFL_Coord;p7 : pchar) : PFL_OBJECT; cdecl;external;
+Procedure fl_add_button_class(p1 : Longint ; p2 : PFL_DRAWBUTTON; p3 : PFL_CLEANUPBUTTON); cdecl;external;
+
+
+{
+ *
+ * Header for FL_CANVAS
+ *
+ }
+
+
+
+type TFL_CANVAS_TYPE = Longint;
+
+const
+ FL_NORMAL_CANVAS = 0;
+ FL_SCROLLED_CANVAS = 1;
+
+Type
+TFL_HANDLE_CANVAS = Procedure (P1 : PFL_OBJECT; P2 : TWindow; P3 : Longint ; P4 : Longint ;
+ P5 : PXEvent; P6 : pointer);cdecl;
+PFL_HANDLE_CANVAS = ^TFL_HANDLE_CANVAS;
+
+TFL_MODIFY_CANVAS_PROP = Procedure (p1 : PFL_OBJECT); cdecl;
+PFL_MODIFY_CANVAS_PROP = ^TFL_MODIFY_CANVAS_PROP;
+
+{******************* Default ********************}
+
+Const FL_CANVAS_BOXTYPE = FL_DOWN_BOX;
+ FL_CANVAS_ALIGN = FL_ALIGN_TOP;
+
+
+{*********** Interfaces ***********************}
+
+
+Function fl_create_generic_canvas(p1 : Longint; p2 : Longint ; p3,p4,p5,p6 : TFL_Coord; p7 : pchar) : PFL_OBJECT; cdecl;external;
+
+Function fl_add_canvas(p1 : Longint; p2,p3,p4,p5 : TFL_Coord; p6 : pchar): PFL_OBJECT; cdecl;external;
+
+Function fl_create_canvas(p1 : Longint; p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Function fl_create_mesacanvas(p1 : Longint; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Function fl_add_mesacanvas(p1 : Longint; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+
+
+Procedure fl_set_canvas_decoration(p1 : PFL_OBJECT; p2 : Longint );
+Procedure fl_set_canvas_colormap(p1 : PFL_OBJECT; p2 : TColormap);cdecl;external;
+Procedure fl_set_canvas_visual(p1 : PFL_OBJECT; p2 : PVisual);cdecl;external;
+Procedure fl_set_canvas_depth(p1 : PFL_OBJECT; p2 : Longint );cdecl;external;
+Procedure fl_set_canvas_attributes(p1 : PFL_OBJECT; p2 : word; p3 : PXSetWindowAttributes);cdecl;external;
+
+Function fl_add_canvas_handler(p1 : PFL_OBJECT; p2 : Longint ; p3 : PFL_HANDLE_CANVAS; p4 : pointer) : PFL_HANDLE_CANVAS ; cdecl;external;
+
+Function fl_get_canvas_id(p1 : PFL_OBJECT ) : TWindow ; cdecl;external;
+Function fl_get_canvas_colormap(p1 : PFL_OBJECT ) : TColormap; cdecl;external;
+Function fl_get_canvas_depth(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
+Procedure fl_remove_canvas_handler(p1 : PFL_OBJECT; p2 : Longint ; p3 : PFL_HANDLE_CANVAS); cdecl;external;
+Procedure fl_hide_canvas(p1 : PFL_OBJECT); { internal use only } cdecl;external;
+Procedure fl_canvas_yield_to_shortcut(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_share_canvas_colormap(p1 : PFL_OBJECT; p2 : TColormap); cdecl;external;
+Procedure fl_modify_canvas_prop(p1 : PFL_OBJECT;
+ P2 : PFL_MODIFY_CANVAS_PROP;
+ p3 : PFL_MODIFY_CANVAS_PROP;
+ p4 : PFL_MODIFY_CANVAS_PROP);cdecl;external;
+
+{ OpenGL canvases }
+Function fl_create_glcanvas(p1 : Longint; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Function fl_add_glcanvas(p1 : Longint; p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Procedure fl_set_glcanvas_defaults(p1 : pointer); cdecl;external;
+Procedure fl_get_glcanvas_defaults(p1 : pointer); cdecl;external;
+Procedure fl_set_glcanvas_attributes(p1 : PFL_OBJECT; p2 : pointer); cdecl;external;
+Procedure fl_get_glcanvas_attributes(p1 : PFL_OBJECT; p2 : pointer); cdecl;external;
+Procedure fl_set_glcanvas_direct(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_activate_glcanvas(p1 : PFL_OBJECT); cdecl;external;
+
+Function fl_get_glcanvas_xvisualinfo(p1 : PFL_OBJECT ) : PXVisualInfo; cdecl;external;
+
+{
+# if defined(p1 : __GLX_glx_h__) || defined(p1 : GLX_H)
+Function fl_get_glcanvas_context(p1 : PFL_OBJECT ob ) : GLXContext ; cdecl;external;
+Function fl_glwincreate(p1 : *; p2 : GLXContext *; p3 : Longint ; p4 : Longint ) : TWindow ; cdecl;external;
+Function fl_glwinopen(p1 : *; p2 : GLXContext *; p3 : Longint ; p4 : Longint ) : TWindow ; cdecl;external;
+}
+
+
+
+{
+ *
+ * Object Class: Chart
+ *
+ }
+
+
+const
+ FL_BAR_CHART = 0;
+ FL_HORBAR_CHART = 1;
+ FL_LINE_CHART = 2;
+ FL_FILL_CHART = 3;
+ FL_SPIKE_CHART = 4;
+ FL_PIE_CHART = 5;
+ FL_SPECIALPIE_CHART = 6;
+
+Type TFL_CHART_TYPE = Longint;
+
+{**** Defaults ****}
+
+Const
+ FL_CHART_BOXTYPE = FL_BORDER_BOX;
+ FL_CHART_COL1 = FL_COL1;
+ FL_CHART_LCOL = FL_LCOL;
+ FL_CHART_ALIGN = FL_ALIGN_BOTTOM;
+
+{**** Others ****}
+ FL_CHART_MAX = 512;
+
+{**** Routines ****}
+
+Function fl_create_chart(p1 : Longint; p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_chart(p1 : longint; p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Procedure fl_clear_chart(p1 : PFL_OBJECT); cdecl;external;
+Procedure fl_add_chart_value(p1 : PFL_OBJECT; p2 : double; p3 : pchar; p4 : Longint ); cdecl;external;
+Procedure fl_insert_chart_value(p1 : PFL_OBJECT; p2 : Longint ; p3 : double; p4 : pchar; p5 : Longint ); cdecl;external;
+Procedure fl_replace_chart_value(p1 : PFL_OBJECT; p2 : Longint ; p3 : double; p4 : pchar; p5 : Longint ); cdecl;external;
+Procedure fl_set_chart_bounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
+Procedure fl_set_chart_maxnumb(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_chart_autosize(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_chart_lstyle(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_chart_lsize(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_chart_lcolor(p1 : PFL_OBJECT; p2 : TFL_COLOR); cdecl;external;
+
+
+const
+ FL_NORMAL_CHOICE = 0;
+ FL_NORMAL_CHOICE2 = 1;
+ FL_DROPLIST_CHOICE = 2;
+
+Type
+ TFL_CHOICE_TYPE = Longint;
+
+Const
+ FL_SIMPLE_CHOICE = FL_NORMAL_CHOICE;
+
+{**** Defaults ****}
+
+ FL_CHOICE_BOXTYPE = FL_ROUNDED_BOX;
+ FL_CHOICE_COL1 = FL_COL1;
+ FL_CHOICE_COL2 = FL_LCOL;
+ FL_CHOICE_LCOL = FL_LCOL;
+ FL_CHOICE_ALIGN = FL_ALIGN_LEFT;
+
+{**** Others ****}
+
+ FL_CHOICE_MCOL = FL_MCOL;
+ FL_CHOICE_MAXITEMS = 63;
+
+{**** Routines ****}
+
+Function fl_create_choice(p1 : longint; p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Function fl_add_choice(p1 : longint; p2,p3,p4,p5 : TFL_Coord; p6 : pchar ) : PFL_OBJECT; cdecl;external;
+Procedure fl_clear_choice(p1 : PFL_OBJECT); cdecl;external;
+Procedure fl_addto_choice(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+Procedure fl_replace_choice(p1 : PFL_OBJECT; p2 : Longint ; p3 :pchar); cdecl;external;
+Procedure fl_delete_choice(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_choice(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_choice_text(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+Function fl_get_choice(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
+Function fl_get_choice_item_text(p1 : PFL_OBJECT; p2 : Longint ) : pchar; cdecl;external;
+Function fl_get_choice_maxitems(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
+Function fl_get_choice_text(p1 : PFL_OBJECT ) : pchar; cdecl;external;
+Procedure fl_set_choice_fontsize(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_choice_fontstyle(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_choice_align(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_choice_item_mode(p1 : PFL_OBJECT; p2 : Longint ; p3 : word); cdecl;external;
+Procedure fl_set_choice_item_shortcut(p1 : PFL_OBJECT; p2 : Longint ; p3 :pchar); cdecl;external;
+Function fl_set_choice_entries(p1 : PFL_OBJECT ; p2 : PFL_PUP_ENTRY) : longint; cdecl;external;
+
+
+Const
+ FL_ANALOG_CLOCK = 0;
+ FL_DIGITAL_CLOCK = 1;
+
+ FL_CLOCK_BOXTYPE = FL_UP_BOX;
+ FL_CLOCK_COL1 = FL_INACTIVE_COL;
+ FL_CLOCK_COL2 = FL_BOTTOM_BCOL;
+ FL_CLOCK_LCOL = FL_BLACK;
+ FL_CLOCK_ALIGN = FL_ALIGN_BOTTOM;
+
+ FL_CLOCK_TOPCOL = FL_COL1;
+
+Function fl_create_clock(p1 : longint; p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Function fl_add_clock(p1 : longint; p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+Procedure fl_get_clock(p1 : PFL_OBJECT; p2,p3,p4 : pointer); cdecl;external;
+Function fl_set_clock_adjustment ( p1 : PFL_OBJECT; p2 : longint) : longint; cdecl;external;
+Procedure fl_set_clock_ampm(p1 : PFL_OBJECT; p2 : Longint); cdecl;external;
+
+
+Const
+ FL_NORMAL_COUNTER = 0;
+ FL_SIMPLE_COUNTER = 1;
+
+type TFL_COUNTER_TYPE = Longint;
+
+{**** Defaults ****}
+Const
+ FL_COUNTER_BOXTYPE = FL_UP_BOX;
+ FL_COUNTER_COL1 = FL_COL1;
+ FL_COUNTER_COL2 = FL_BLUE; { ct label }
+ FL_COUNTER_LCOL = FL_LCOL; { ct reporting }
+ FL_COUNTER_ALIGN = FL_ALIGN_BOTTOM;
+
+{**** Others ****}
+
+ FL_COUNTER_BW = FL_BOUND_WIDTH-1;
+
+{**** Routines ****}
+
+Function fl_create_counter(p1 : longint; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Function fl_add_counter(p1 : longint; p2,p3,p4,p5 : TFL_Coord;p6: pchar) : PFL_OBJECT; cdecl;external;
+
+Procedure fl_set_counter_value(p1 : PFL_OBJECT; p2 : double); cdecl;external;
+Procedure fl_set_counter_bounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
+Procedure fl_set_counter_step(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
+Procedure fl_set_counter_precision(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Function fl_get_counter_value(p1 : PFL_OBJECT ) : double ; cdecl;external;
+Procedure fl_get_counter_bounds(p1 : PFL_OBJECT; p2,p3 : pdouble); cdecl;external;
+Procedure fl_get_counter_step(p1 : PFL_OBJECT; p2,p3 : pdouble); cdecl;external;
+Procedure fl_set_counter_return(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_counter_filter(p1 : PFL_OBJECT;p2 : pointer); {!!!!} cdecl;external;
+{
+ pchar(p1 : *)(p1 : PFL_OBJECT; p2 : double; p3 :Longint ));
+}
+
+{
+ *
+ * Cursor defs and prototypes
+ *
+ }
+
+
+{$i cursorfont.inc}
+
+const FL_DEFAULT_CURSOR = -1;
+ FL_INVISIBLE_CURSOR = -2;
+
+Procedure fl_set_cursor(p1 : TWindow; p2 : Longint ); cdecl;external;
+Procedure fl_set_cursor_color(p1 : longint; p2 : TFL_COLOR; p3 :TFL_COLOR); cdecl;external;
+Function fl_create_bitmap_cursor(p1 : pchar; p2 : pchar; p3,p4,p5,p6 : Longint ) : TCursor; cdecl;external;
+Function fl_get_cursor_byname(p1 : longint ) : TCursor; cdecl;external;
+Function fl_create_animated_cursor(p1 : Plongint;p2 : longint): Longint; cdecl;external;
+
+{
+#define fl_reset_cursor(p1 : win) fl_set_cursor(p1 : win; p2 : -1);
+}
+
+
+Const
+ FL_NORMAL_DIAL = 0;
+ FL_LINE_DIAL = 1;
+ FL_FILL_DIAL = 2;
+
+ FL_DIAL_CW = 0;
+ FL_DIAL_CCW = 1;
+
+Type
+ TFL_DIAL_TYPE = Longint;
+
+{**** Defaults ****}
+Const
+
+ FL_DIAL_BOXTYPE = FL_FLAT_BOX;
+ FL_DIAL_COL1 = FL_COL1;
+ FL_DIAL_COL2 = FL_RIGHT_BCOL;
+ FL_DIAL_LCOL = FL_LCOL;
+ FL_DIAL_ALIGN = FL_ALIGN_BOTTOM;
+
+{**** Others ****}
+
+ FL_DIAL_TOPCOL = FL_COL1;
+
+{**** Routines ****}
+
+Function fl_create_dial(p1 : longint; p2,p3,p4,p5 : TFL_Coord;p6 :pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_dial(p1 : longint; p2,p3,p4,p5 : TFL_Coord;p6: pchar) : PFL_OBJECT; cdecl;external;
+
+Procedure fl_set_dial_value(p1 : PFL_OBJECT; p2 : double); cdecl;external;
+Function fl_get_dial_value(p1 : PFL_OBJECT ) : double ; cdecl;external;
+Procedure fl_set_dial_bounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
+Procedure fl_get_dial_bounds(p1 : PFL_OBJECT; p2 : pdouble; p3 :pdouble); cdecl;external;
+
+Procedure fl_set_dial_step(p1 : PFL_OBJECT; p2 : double); cdecl;external;
+Procedure fl_set_dial_return(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_dial_angles(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
+Procedure fl_set_dial_cross(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_dial_direction (p1 : PFL_OBJECT; p2 : Longint); cdecl;external;
+
+{
+ *
+ * Convenience Functions to read a directory cdecl;external;
+ }
+
+
+{ File types }
+
+Const
+ FT_FILE = 0;
+ FT_DIR = 1;
+ FT_LINK = 2;
+ FT_SOCK = 3;
+ FT_FIFO = 4;
+ FT_BLK = 5;
+ FT_CHR = 6;
+ FT_OTHER = 7;
+
+type TFL_Dirlist = record
+ name : pchar; { entry name }
+ ftype : longint; { FILE_TYPE }
+ dl_mtime : longint;
+ dl_size : cardinal;
+ filler : array[0..2] of longint;
+ end;
+ PFL_Dirlist = ^TFL_Dirlist;
+
+
+TFL_DIRLIST_FILTER = Procedure (p1 : pchar; p2 : Longint ); cdecl;
+PFL_DIRLIST_FILTER = ^TFL_DIRLIST_FILTER;
+
+Const
+ FL_ALPHASORT = 1;
+ FL_RALPHASORT = 2;
+ FL_MTIMESORT = 3;
+ FL_RMTIMESORT = 4;
+ FL_SIZESORT = 5;
+ FL_RSIZESORT = 6;
+
+
+{ read dir with pattern filtering. All dirs read might be cached.
+ * must not change dirlist in anyway.
+ }
+Function fl_get_dirlist(p1 : pchar; p2 : pchar; p3 : pointer;p4 :longint) : PFL_Dirlist; { rescan } cdecl;external;
+
+
+Function fl_set_dirlist_filter (p1 : PFL_DIRLIST_FILTER ) : PFL_DIRLIST_FILTER ; cdecl;external;
+Procedure fl_set_dirlist_sort ( p1 : longint); cdecl;external;
+
+Procedure fl_free_dirlist(p1 : PFL_Dirlist); cdecl;external;
+
+{ Free all directory caches }
+Procedure fl_free_all_dirlist; cdecl;external;
+
+Function fl_is_valid_dir(p1 : pchar ) : Longint; cdecl;external;
+Function fl_fmtime(p1 : pchar ) : cardinal ; cdecl;external;
+Function fl_fix_dirname(p1 : pchar) : pchar; cdecl;external;
+
+Const
+ FLPS_AUTO = 0;
+ FLPS_LANDSCAPE = 1;
+ FLPS_PORTRAIT = 2;
+
+
+ FLPS_BW = -1;
+ FLPS_GRAYSCALE=0;
+
+ type
+ TFLPS_CONTROL = record
+ ps_color,orientation,auto_fit,drawbox,eps : longint;
+ xdpi,ydpi,paper_w,paper_h, gamma : real; { Must be float }
+ end;
+ PFLPS_CONTROL = ^TFLPS_CONTROL;
+
+Function flps_init : PFLPS_CONTROL; cdecl;external;
+Function fl_object_ps_dump (p1 : PFL_OBJECT; p2 : pchar) : longint; cdecl;external;
+
+{ types of frames }
+Const
+ FL_NO_FRAME = 0;
+ FL_UP_FRAME = 1;
+ FL_DOWN_FRAME = 2;
+ FL_BORDER_FRAME = 3;
+ FL_SHADOW_FRAME = 4;
+ FL_ENGRAVED_FRAME = 5;
+ FL_ROUNDED_FRAME = 6;
+ FL_EMBOSSED_FRAME = 7;
+ FL_OVAL_FRAME = 8;
+
+ FL_FRAME_COL1 = FL_BLACK;
+ FL_FRAME_COL2 = FL_COL1;
+ FL_FRAME_LCOL = FL_BLACK;
+
+Function fl_create_frame(p1 : longint; p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_frame(p1 : longint; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_create_labelframe(p1 : longint; p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_labelframe(p1 : longint; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+
+{
+ *
+ * Object Class: Free
+ }
+
+Const
+ FL_NORMAL_FREE = 0;
+ FL_INACTIVE_FREE = 1;
+ FL_INPUT_FREE = 2;
+ FL_CONTINUOUS_FREE = 3;
+ FL_ALL_FREE = 4;
+Type
+ TFL_FREE_TYPE = Longint;
+ PFL_FREE_TYPE = ^TFL_FREE_TYPE;
+
+Const FL_SLEEPING_FREE = FL_INACTIVE_FREE;
+
+
+Function fl_create_free(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;p6: pchar; p7 : PFL_HANDLEPTR) : PFL_OBJECT; cdecl;external;
+Function fl_add_free(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;p6 : pchar; P7 : PFL_HANDLEPTR) : PFL_OBJECT; cdecl;external;
+
+Const
+ FLAlertDismissLabel = 'flAlert.dismiss.label';
+ FLQuestionYesLabel = 'flQuestion.yes.label';
+ FLQuestionNoLabel = 'flQuestion.no.label';
+ FLOKLabel = 'flInput.ok.label';
+ FLInputClearLabel = 'flInput.clear.label';
+ FLInputCancelLabel = 'flInput.cancel.label';
+
+{ from goodies.c }
+Procedure fl_set_goodies_font(p1 : LongInt; p2 : Longint ); cdecl;external;
+Procedure fl_show_message(p1 : pchar; p2 : pchar; p3 :pchar); cdecl;external;
+Procedure fl_show_messages(p1 : pchar); cdecl;external;
+Procedure fl_show_alert(p1 : pchar; p2 : pchar; p3 : pchar; p4 : Longint ); cdecl;external;
+Function fl_show_question(p1 : pchar; p2 : longint) : Longint ; cdecl;external;
+Function fl_show_input(p1 : pchar; p2 : pchar ) : pchar; cdecl;external;
+Function fl_show_simple_input(p1 : pchar; p2 : pchar ) : pchar; cdecl;external;
+Function fl_show_colormap(p1 : Longint ) : Longint ; cdecl;external;
+Function fl_show_choice(p1,p2,p3 : pchar; p4 : Longint ; p5,p6,p7 : pchar; p8 : Longint) : Longint; cdecl;external;
+Function fl_show_choices(p1 : pchar; p4 : Longint ; p5,p6,p7 : pchar; p8 : Longint) : Longint; cdecl;external;
+Procedure fl_set_choices_shortcut(p1,p2,p3 :pchar); cdecl;external;
+
+Procedure fl_show_oneliner(p1 : pchar; p2 : TFL_Coord; p3 :TFL_Coord); cdecl;external;
+Procedure fl_hide_oneliner; cdecl;external;
+Procedure fl_set_oneliner_font(p1 : LongInt; p2 : Longint ); cdecl;external;
+Procedure fl_set_oneliner_color(p1 : TFL_COLOR; p2 : TFL_COLOR); cdecl;external;
+
+type TFD_CMDLOG = record
+ form : PFL_FORM;
+ browser,close_browser,clear_browser : PFL_OBJECT;
+end;
+PFD_CMDLOG = ^TFD_CMDLOG;
+
+Function fl_exe_command(p1 : pchar; p2 : Longint) : Longint; cdecl;external;
+Function fl_end_command(p1 : longint) : Longint; cdecl;external;
+Function fl_check_command(p1 : longint) : longint; cdecl;external;
+Function fl_end_all_command : Longint; cdecl;external;
+Procedure fl_show_command_log(p1 : Longint); cdecl;external;
+Procedure fl_hide_command_log; cdecl;external;
+Procedure fl_clear_command_log; cdecl;external;
+Procedure fl_addto_command_log(p1 : pchar); cdecl;external;
+Procedure fl_set_command_log_position(p1,p2 :longint); cdecl;external;
+Function fl_get_command_log_fdstruct : PFD_CMDLOG; cdecl;external;
+
+{ aliases }
+{
+#define fl_open_command fl_exe_command
+#define fl_close_command fl_end_command
+}
+
+{****** from file selector ****************}
+
+Const FL_MAX_FSELECTOR = 6;
+
+type TFD_FSELECTOR = record
+ fselect : PFL_FORM;
+ browser, theinput, prompt, resbutt,
+ patbutt,dirbutt, cancel, ready : PFL_OBJECT;
+ dirlabel,patlabel : PFL_OBJECT;
+ appbut : array[0..2] of PFL_OBJECT;
+end;
+
+PFD_FSELECTOR = ^TFD_FSELECTOR;
+
+Function fl_use_fselector(p1 : LongInt ) : LongInt; cdecl;external;
+Function fl_show_fselector(p1,p2,p3,p4 : pchar) : pchar; cdecl;external;
+
+Procedure fl_set_fselector_fontsize (p1 : Longint); cdecl;external;
+Procedure fl_set_fselector_fontstyle (p1 : longint); cdecl;external;
+Procedure fl_set_fselector_placement(p1 : LongInt); cdecl;external;
+Procedure fl_set_fselector_border(p1 : LongInt); cdecl;external;
+
+{
+#define fl_set_fselector_transient(p1 : b) \
+ fl_set_fselector_border(p1 : (p1 : b)?FL_TRANSIENT:FL_FULLBORDER)
+}
+
+Type TFSelector_Callback = Function (P1 : Pchar; P2 : Pointer) : Longint; cdecl;
+ PFSelector_Callback = ^TFSelector_Callback;
+ TFL_Procedure = Procedure; cdecl;
+ PFL_Procedure = ^TFL_Procedure;
+
+Procedure fl_set_fselector_callback( p1 : PFSelector_Callback; p2 : pointer); cdecl;external;
+Function fl_get_filename : pchar; cdecl;external;
+Function fl_get_directory : pchar; cdecl;external;
+Function fl_get_pattern : pchar; cdecl;external;
+Function fl_set_directory (p1 : pchar ) : LongInt; cdecl;external;
+Procedure fl_set_pattern (p1 : pchar); cdecl;external;
+Procedure fl_refresh_fselector; cdecl;external;
+Procedure fl_add_fselector_appbutton(p1 : pchar; p2 : PFL_Procedure; p3 : pointer); cdecl;external;
+Procedure fl_remove_fselector_appbutton(p1 : pchar); cdecl;external;
+Procedure fl_disable_fselector_cache(p1 : LongInt); cdecl;external;
+Procedure fl_invalidate_fselector_cache; cdecl;external;
+Function fl_get_fselector_form : PFL_FORM; cdecl;external;
+Function fl_get_fselector_fdstruct : PFD_FSELECTOR; cdecl;external;
+Procedure fl_hide_fselector; cdecl;external;
+
+
+Procedure fl_set_fselector_filetype_marker(p1,p2,p3,p4,p5 : Longint); cdecl;external;
+
+{
+#define fl_show_file_selector fl_show_fselector
+#define fl_set_fselector_cb fl_set_fselector_callback
+#define fl_set_fselector_title(p1 : s) fl_set_form_title(p1 : fl_get_fselector_form(p1 : ); p2 : s)
+}
+
+
+{**** Types ****}
+
+Const
+ FL_NORMAL_INPUT = 0;
+ FL_FLOAT_INPUT = 1;
+ FL_INT_INPUT = 2;
+ FL_DATE_INPUT = 3;
+ FL_MULTILINE_INPUT = 4;
+ FL_HIDDEN_INPUT = 5;
+ FL_SECRET_INPUT = 6;
+
+ FL_INPUT_MMDD = 0;
+ FL_INPUT_DDMM = 1;
+
+Type TFL_INPUT_TYPE = Longint;
+
+{**** Defaults ****}
+
+Const
+ FL_INPUT_BOXTYPE = FL_DOWN_BOX;
+ FL_INPUT_COL1 = FL_COL1;
+ FL_INPUT_COL2 = FL_MCOL;
+ FL_INPUT_LCOL = FL_LCOL;
+ FL_INPUT_ALIGN = FL_ALIGN_LEFT;
+
+{**** Others ****}
+
+ FL_INPUT_TCOL = FL_LCOL;
+ FL_INPUT_CCOL = FL_BLUE;
+
+ cFL_RINGBELL = (1 shl 4);
+
+{**** Routines ****}
+
+Function fl_create_input(p1 : Longint; p2,p3,p4,p5 : TFL_Coord; p6: pchar) : PFL_OBJECT; cdecl;external;
+
+Function fl_add_input(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; P6 : pchar ) : PFL_OBJECT; cdecl;external;
+
+Procedure fl_set_input(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+Procedure fl_set_input_color(p1 : PFL_OBJECT; p2 : Longint ; p3 :Longint ); cdecl;external;
+Procedure fl_set_input_return(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_input_scroll(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_input_cursorpos(p1 : PFL_OBJECT; p2 : Longint ; p3 :Longint ); cdecl;external;
+Procedure fl_set_input_selected(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_input_selected_range(p1 : PFL_OBJECT; p2 : Longint ; p3 :Longint ); cdecl;external;
+Procedure fl_set_input_maxchars(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_input_format(p1 : PFL_OBJECT; p2,p3 : Longint ); cdecl;external;
+Procedure fl_set_input_hscrollbar(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_input_vscrollbar(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_input_xoffset(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_input_topline(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_input_scrollbarsize(p1 : PFL_OBJECT; p2,p3 : Longint ); cdecl;external;
+
+Function fl_get_input(p1 : PFL_OBJECT ) : pchar; cdecl;external;
+Function fl_get_input_cursorpos(p1 : PFL_OBJECT; p2,p3 : Pointer ) : LongInt; cdecl;external;
+Function fl_get_input_topline(p1 : PFL_OBJECT;p2,p3 : PLongint) : Longint; cdecl;external;
+Function fl_get_input_screenlines(p1 : PFL_OBJECT) : Longint; cdecl;external;
+Function fl_get_input_numberoflines(p1 : PFL_OBJECT) : Longint; cdecl;external;
+Procedure fl_get_input_format(p1 : PFL_OBJECT;p2,p3 : PLongint); cdecl;external;
+Function fl_get_input_selected_range(p1 : PFL_OBJECT; p2 : Longint ; p3 :Longint ) : pchar ; cdecl;external;
+
+
+
+type
+ TFL_INPUTVALIDATOR = Procedure (p1 : PFL_OBJECT; p2,p3 : pchar; p4 : Longint ); cdecl;
+ PFL_INPUTVALIDATOR= ^TFL_INPUTVALIDATOR;
+
+Function fl_set_input_filter(p1 : PFL_OBJECT; p2 : PFL_INPUTVALIDATOR ) : PFL_INPUTVALIDATOR ; cdecl;external;
+
+{
+#define fl_set_input_shortcut fl_set_object_shortcut
+#define ringbell(p1 : ) XBell(p1 : fl_display; p2 : 0)
+}
+
+type TFL_EditKeymap = record
+ { basic editing }
+ del_prev_char : Longint; { delete previous char }
+ del_next_char : Longint; { delete next char }
+ del_prev_word : Longint; { delete previous word }
+ del_next_word : Longint; { delete next word }
+
+ { movement }
+ moveto_prev_line : Longint; { one line up }
+ moveto_next_line : Longint; { one line down }
+ moveto_prev_char : Longint; { one char left }
+ moveto_next_char : Longint; { one char right }
+ moveto_prev_word : Longint; { one word left }
+ moveto_next_word : Longint; { one word right }
+ moveto_prev_page : Longint; { one page up }
+ moveto_next_page : Longint; { one page down }
+ moveto_bol : Longint; { move to begining of line }
+ moveto_eol : Longint; { move to end of line }
+ moveto_bof : Longint; { move to begin of file }
+ moveto_eof : Longint; { move to end of file }
+
+ { misc. stuff }
+ transpose : Longint; { switch two char positions }
+ paste : Longint; { paste the edit buffer }
+ backspace : Longint; { another del_prev_char }
+ del_to_bol : Longint; { cut to begining of line }
+ del_to_eol : Longint; { cut to end of line }
+ clear_field : Longint; { delete everything }
+ del_to_eos : Longint; { not implemented }
+ reserverd : array[0..3] of Longint; { fillter }
+end;
+PFL_EditKeymap = ^TFL_EditKeymap;
+
+Procedure fl_set_input_editkeymap(a: PFL_EditKeymap); cdecl;external;
+
+
+{*********** Object Class: Menu ***********}
+
+Const
+ FL_TOUCH_MENU = 0;
+ FL_PUSH_MENU = 1;
+ FL_PULLDOWN_MENU = 2;
+
+Type TFL_MENU_TYPE = Longint;
+
+{**** Defaults ****}
+
+Const
+ FL_MENU_BOXTYPE = FL_BORDER_BOX;
+ FL_MENU_COL1 = FL_COL1;
+ FL_MENU_COL2 = FL_MCOL;
+ FL_MENU_LCOL = FL_LCOL;
+ FL_MENU_ALIGN = FL_ALIGN_CENTER;
+
+{**** Others ****}
+
+ FL_MENU_MAXITEMS = 128;
+ FL_MENU_MAXSTR = 64;
+
+{**** Routines ****}
+
+Function fl_create_menu(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; P6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Function fl_add_menu(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; P6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Procedure fl_clear_menu(p1 : PFL_OBJECT); cdecl;external;
+Procedure fl_set_menu(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+Procedure fl_addto_menu(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+Procedure fl_replace_menu_item(p1 : PFL_OBJECT; p2 : Longint ; p3 :pchar); cdecl;external;
+Procedure fl_delete_menu_item(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+
+Procedure fl_set_menu_item_shortcut(p1 : PFL_OBJECT; p2 : Longint ; p3 :pchar); cdecl;external;
+Procedure fl_set_menu_item_mode(p1 : PFL_OBJECT; p2 : Longint ; p3 : Cardinal); cdecl;external;
+Procedure fl_show_menu_symbol(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_menu_popup(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Function fl_get_menu_popup(p1 : pfl_object): longint; cdecl;external;
+
+Function fl_get_menu(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
+Function fl_get_menu_item_text(p1 : PFL_OBJECT; p2 : Longint ) : pchar; cdecl;external;
+Function fl_get_menu_maxitems(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
+Function fl_get_menu_item_mode(p1 : PFL_OBJECT; p2 : Longint ) : Cardinal ; cdecl;external;
+Function fl_get_menu_text(p1 : PFL_OBJECT ) : pchar; cdecl;external;
+
+
+
+Const
+ FL_NORMAL_MENUBAR = 0;
+
+ FL_MENUBAR_BOXTYPE =FL_UP_BOX;
+ FL_MENUBAR_COL1 =FL_COL1;
+ FL_MENUBAR_COL2 =FL_MCOL;
+ FL_MENUBAR_LCOL =FL_LCOL;
+
+Function fl_create_menubar(p1 : longint; p2,p3,p4,p5 : TFL_COORD;p6 : Pchar): PFL_OBJECT; cdecl;external;
+Function fl_add_menubar(p1 : longint;p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Procedure fl_clear_menubar(p1 : PFL_OBJECT); cdecl;external;
+Procedure fl_set_menubar(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+Procedure fl_set_menubar_entries(p1 : PFL_OBJECT; p2 : pchar;p3 : PFL_PUP_ENTRY); cdecl;external;
+
+
+{
+ *
+ * Prototypes for pop-up menus
+ }
+
+
+Const
+ FL_MAXPUPI = 80; { max item each pup }
+ FL_PUP_PADH = 4; { space between each items }
+
+ type
+ TFL_PUP_ENTERCB = Procedure (p1 : longint; p2: pointer); cdecl;
+ PFL_PUP_ENTERCB = ^TFL_PUP_ENTERCB;
+
+ TFL_PUP_LEAVECB =Procedure (p1 : longint; p2: pointer); cdecl;
+ PFL_PUP_LEAVECB = ^TFL_PUP_LEAVECB;
+
+Function fl_setpup_entries(p1 : Longint; p2 : PFL_PUP_ENTRY) : Longint; cdecl;external;
+Function fl_newpup(p1 : TWindow ) : LongInt; cdecl;external;
+
+Function fl_defpup(p1 : TWindow; p2 : pchar) : LongInt; cdecl;external;
+Function fl_addtopup(p1 : longint; p2 : pchar) : LongInt; cdecl;external;
+
+Function fl_setpup_mode(p1 : Longint; p2 : Longint ; p3 : Cardinal) : Longint; cdecl;external;
+Procedure fl_freepup(p1 : Longint); cdecl;external;
+Function fl_dopup(p1 : Longint ) : LongInt; cdecl;external;
+
+Procedure fl_setpup_shortcut(p1 : Longint; p2 : Longint ; p3 :pchar); cdecl;external;
+Procedure fl_setpup_position(p1 : Longint; p2 : Longint ); cdecl;external;
+Procedure fl_setpup_selection(p1 : Longint; p2 : Longint ); cdecl;external;
+Procedure fl_setpup_shadow(p1 : LongInt; p2 : Longint {was LongInt}); cdecl;external;
+Procedure fl_setpup_softedge(p1 : LongInt; p2 : Longint ); cdecl;external;
+Function fl_setpup_fontsize(p1 : LongInt) : Longint; cdecl;external;
+Function fl_setpup_fontstyle(p1 : LongInt) : Longint; cdecl;external;
+Procedure fl_setpup_color(p1 : TFL_COLOR; p2 : TFL_COLOR); cdecl;external;
+Procedure fl_setpup_checkcolor(p1 : TFL_COLOR); cdecl;external;
+Function fl_setpup_default_fontsize(p1 : LongInt) : Longint;
+Function fl_setpup_default_fontstyle(p1 : LongInt) : Longint;
+Procedure fl_setpup_default_color(p1 : TFL_COLOR; p2 : TFL_COLOR);
+Procedure fl_setpup_default_checkcolor(p1 : TFL_COLOR);
+Procedure fl_setpup_title(p1 : LongInt; p2 : pchar); cdecl;external;
+Procedure fl_setpup_bw(p1 : LongInt; p2 : Longint ); cdecl;external;
+Procedure fl_setpup_pad(p1 : LongInt; p2 : Longint ; p3 :Longint ); cdecl;external;
+Function fl_setpup_cursor(p1 : LongInt; p2 : Longint ) : TCursor ; cdecl;external;
+Function fl_setpup_default_cursor(p1 : LongInt ) : TCursor ; cdecl;external;
+Function fl_setpup_maxpup(p1 : LongInt ) : LongInt; cdecl;external;
+Function fl_getpup_mode(p1 : LongInt; p2 : Longint ) : Cardinal; cdecl;external;
+Function fl_getpup_text(p1 : LongInt; p2 : Longint ) : pchar; cdecl;external;
+Procedure fl_showpup(p1 : LongInt); cdecl;external;
+Procedure fl_hidepup(p1 : LongInt); cdecl;external;
+
+{
+#define fl_setpup_hotkey fl_setpup_shortcut
+}
+
+Function fl_setpup_itemcb(p1 : LongInt; p2 : Longint ; p3 :PFL_PUP_CB ) : PFL_PUP_CB ; cdecl;external;
+Function fl_setpup_menucb(p1 : LongInt; p2 : PFL_PUP_CB ) : PFL_PUP_CB ; cdecl;external;
+Procedure fl_setpup_submenu(p1 : LongInt; p2 : Longint ; p3 :Longint ); cdecl;external;
+
+{
+#define fl_setpup fl_setpup_mode
+}
+
+Const
+ FL_NORMAL_POSITIONER = 0;
+
+{**** Defaults ****}
+
+ FL_POSITIONER_BOXTYPE = FL_DOWN_BOX;
+ FL_POSITIONER_COL1 = FL_COL1;
+ FL_POSITIONER_COL2 = FL_RED;
+ FL_POSITIONER_LCOL = FL_LCOL;
+ FL_POSITIONER_ALIGN = FL_ALIGN_BOTTOM;
+
+{**** Others ****}
+
+
+{**** Routines ****}
+
+Function fl_create_positioner(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_positioner(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Procedure fl_set_positioner_xvalue(p1 : PFL_OBJECT; p2 : double); cdecl;external;
+Function fl_get_positioner_xvalue(p1 : PFL_OBJECT ) : double ; cdecl;external;
+Procedure fl_set_positioner_xbounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
+Procedure fl_get_positioner_xbounds(p1 : PFL_OBJECT; p2 : pdouble ; p3 : pdouble); cdecl;external;
+Procedure fl_set_positioner_yvalue(p1 : PFL_OBJECT; p2 : double); cdecl;external;
+Function fl_get_positioner_yvalue(p1 : PFL_OBJECT ) : double ; cdecl;external;
+Procedure fl_set_positioner_ybounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
+Procedure fl_get_positioner_ybounds(p1 : PFL_OBJECT; p2 ,p3 :pdouble); cdecl;external;
+Procedure fl_set_positioner_xstep(p1 : PFL_OBJECT; p2 : double); cdecl;external;
+Procedure fl_set_positioner_ystep(p1 : PFL_OBJECT; p2 : double); cdecl;external;
+Procedure fl_set_positioner_return(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+
+Const
+ FL_HOR_SCROLLBAR = 0;
+ FL_VERT_SCROLLBAR = 1;
+ FL_HOR_THIN_SCROLLBAR = 2;
+ FL_VERT_THIN_SCROLLBAR = 3;
+ FL_HOR_NICE_SCROLLBAR = 4;
+ FL_VERT_NICE_SCROLLBAR = 5;
+ FL_HOR_PLAIN_SCROLLBAR = 6;
+ FL_VERT_PLAIN_SCROLLBAR = 7;
+
+ FL_HOR_BASIC_SCROLLBAR = FL_HOR_PLAIN_SCROLLBAR;
+ FL_VERT_BASIC_SCROLLBAR = FL_VERT_PLAIN_SCROLLBAR;
+
+ FL_THIN_SCROLLBAR = 0;
+ FL_PLAIN_SCROLLBAR = 1;
+ FL_NORMAL_SCROLLBAR = 2;
+ FL_NICE_SCROLLBAR = 3;
+
+Function fl_create_scrollbar(p1 : longint;p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT ; cdecl;external;
+Function fl_add_scrollbar(p1 : longint;p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT ; cdecl;external;
+
+Function fl_get_scrollbar_value(p1 : PFL_OBJECT) : double ; cdecl;external;
+Procedure fl_set_scrollbar_value(p1 : PFL_OBJECT; p2: double); cdecl;external;
+Procedure fl_set_scrollbar_size(p1 : PFL_OBJECT; p2 : double); cdecl;external;
+Procedure fl_set_scrollbar_increment(p1 : PFL_OBJECT;p2,p3: double); cdecl;external;
+Procedure fl_get_scrollbar_increment(p1 : PFL_OBJECT; p2,p3 : real {float !!}); cdecl;external;
+Procedure fl_set_scrollbar_bounds(p1 : PFL_OBJECT; p2,p3 : double); cdecl;external;
+Procedure fl_get_scrollbar_bounds(p1 : PFL_OBJECT; p2,p3 : real {float !!!}); cdecl;external;
+Procedure fl_set_scrollbar_return(p1 : PFL_OBJECT; p2 : longint); cdecl;external;
+Procedure fl_set_scrollbar_step(P1 : PFL_OBJECT;p2 : double); cdecl;external;
+
+
+
+{
+ *
+ * Object Class: Slider
+ *
+ }
+
+
+Const
+ FL_VERT_SLIDER = 0;
+ FL_HOR_SLIDER = 1;
+ FL_VERT_FILL_SLIDER = 2;
+ FL_HOR_FILL_SLIDER = 3;
+ FL_VERT_NICE_SLIDER = 4;
+ FL_HOR_NICE_SLIDER = 5;
+ FL_HOR_BROWSER_SLIDER = 6;
+ FL_VERT_BROWSER_SLIDER = 7;
+ FL_HOR_BROWSER_SLIDER2 = 8; { for Longint ernal use only }
+ FL_VERT_BROWSER_SLIDER2 = 9; { for Longint ernal use only }
+ FL_HOR_THIN_SLIDER = 10; { internal use }
+ FL_VERT_THIN_SLIDER = 11; { internal use }
+ FL_HOR_BASIC_SLIDER = 12; { internal use }
+ FL_VERT_BASIC_SLIDER = 13; { internal use }
+
+Type
+ TFL_SLIDER_TYPE = Longint;
+ PFL_SLIDER_TYPE = ^TFL_SLIDER_TYPE;
+
+
+{**** Defaults ****}
+Const
+ FL_SLIDER_BW1 = FL_BOUND_WIDTH;
+ FL_SLIDER_BW2 = FL_BOUND_WIDTH-1;
+
+ FL_SLIDER_BOXTYPE = FL_DOWN_BOX;
+ FL_SLIDER_COL1 = FL_COL1;
+ FL_SLIDER_COL2 = FL_COL1;
+ FL_SLIDER_LCOL = FL_LCOL;
+ FL_SLIDER_ALIGN = FL_ALIGN_BOTTOM;
+
+{**** Others ****}
+
+ FL_SLIDER_FINE = 0.05;
+ FL_SLIDER_WIDTH = 0.10;
+
+
+{**** Routines ****}
+
+Function fl_create_slider(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;p6: pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_slider(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;p6: pchar) : PFL_OBJECT; cdecl;external;
+
+Function fl_create_valslider(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;p6: pchar): PFL_OBJECT; cdecl;external;
+Function fl_add_valslider(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;P6: pchar) : PFL_OBJECT; cdecl;external;
+
+Procedure fl_set_slider_value(p1 : PFL_OBJECT; p2 : double); cdecl;external;
+Function fl_get_slider_value(p1 : PFL_OBJECT ) : double ; cdecl;external;
+Procedure fl_set_slider_bounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
+Procedure fl_get_slider_bounds(p1 : PFL_OBJECT; p2,p3 : pdouble); cdecl;external;
+
+Procedure fl_set_slider_return(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+
+Procedure fl_set_slider_step(p1 : PFL_OBJECT; p2 : double); cdecl;external;
+Procedure fl_set_slider_increment(p1 : PFL_OBJECT; p2,p3 : double); cdecl;external;
+Procedure fl_set_slider_size(p1 : PFL_OBJECT; p2 : double); cdecl;external;
+Procedure fl_set_slider_precision(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+
+Type
+ TFL_SLIDER_FILTER = Procedure (p1 : PFL_OBJECT; p2 : double; p3 :Longint ); cdecl;
+ PTFL_SLIDER_FILTER= ^TFL_SLIDER_FILTER ;
+
+Procedure fl_set_slider_filter(p1 : PFL_OBJECT; p2 : PTFL_SLIDER_FILTER); cdecl;external;
+
+const
+FL_TOP_TABFOLDER = 0;
+FL_BOTTOM_TABFOLDER = 1;
+FL_LEFT_TABFOLDER = 2;
+FL_RIGHT_TABFOLDER = 3;
+
+FL_NORMAL_TABFOLDER = FL_TOP_TABFOLDER;
+
+Function fl_create_tabfolder (p1 : longint;p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT ; cdecl;external;
+Function fl_add_tabfolder(p1 : longint;p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT ; cdecl;external;
+Function fl_addto_tabfolder(p1 : PFL_OBJECT; p2 : pchar; p3 : PFL_FORM) : PFL_OBJECT; cdecl;external;
+Procedure fl_delete_folder(p1 : PFL_OBJECT; p2 : PFL_FORM); cdecl;external;
+Procedure fl_delete_folder_bynumber(p1 : PFL_OBJECT; p2 : longint); cdecl;external;
+Procedure fl_delete_folder_byname(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+
+Procedure fl_set_folder(p1 : PFL_OBJECT; P2 : PFL_FORM); cdecl;external;
+Procedure fl_set_folder_byname(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+Procedure fl_set_folder_bynumber(p1 : PFL_OBJECT; p2 : longint); cdecl;external;
+Function fl_get_folder(p1 : PFL_OBJECT) : PFL_FORM; cdecl;external;
+Function fl_get_folder_number(p1 : PFL_OBJECT) : longint; cdecl;external;
+Function fl_get_folder_name(p1 : PFL_OBJECT) : pchar; cdecl;external;
+Function fl_get_active_folder(p1 : PFL_OBJECT) : PFL_FORM; cdecl;external;
+Function fl_get_active_folder_number(P1 : PFL_OBJECT) : longint; cdecl;external;
+Function fl_get_active_folder_name(p1 : PFL_OBJECT) : Pchar; cdecl;external;
+Procedure fl_get_folder_area(p1 : PFL_OBJECT; p2,p3,p4,p5 : PFL_Coord); cdecl;external;
+
+Procedure fl_replace_folder_bynumber(p1 : PFL_OBJECT;p2 : longint;p3 : PFL_FORM); cdecl;external;
+
+Const
+ FL_NORMAL_TEXT = 0;
+
+ FL_TEXT_BOXTYPE = FL_FLAT_BOX;
+ FL_TEXT_COL1 = FL_COL1;
+ FL_TEXT_COL2 = FL_MCOL;
+ FL_TEXT_LCOL = FL_LCOL;
+ FL_TEXT_ALIGN = FL_ALIGN_LEFT;
+
+Function fl_create_text(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; p6 : pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_text(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; p6 : pchar): PFL_OBJECT; cdecl;external;
+
+
+
+{
+ *
+ * Object Class: Timer
+ *
+ }
+
+
+Const
+ FL_NORMAL_TIMER = 0;
+ FL_VALUE_TIMER = 1;
+ FL_HIDDEN_TIMER = 2;
+
+Type TFL_TIMER_TYPE = Longint;
+
+{**** Defaults ****}
+Const
+
+FL_TIMER_BOXTYPE = FL_DOWN_BOX;
+FL_TIMER_COL1 = FL_COL1;
+FL_TIMER_COL2 = FL_RED;
+FL_TIMER_LCOL = FL_LCOL;
+FL_TIMER_ALIGN = FL_ALIGN_CENTER;
+
+{**** Others ****}
+
+ FL_TIMER_BLINKRATE = 0.2;
+
+Type TFL_TIMER_FILTER = Function (P1 : PFL_OBJECT;p2 : double) : pchar; cdecl;
+ PFL_TIMER_FILTER = ^TFL_TIMER_FILTER;
+
+{**** Routines ****}
+
+Function fl_create_timer(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;p6 : pchar) : PFL_OBJECT; cdecl;external;
+
+Function fl_add_timer(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;p6: pchar) : PFL_OBJECT; cdecl;external;
+
+Procedure fl_set_timer(p1 : PFL_OBJECT; p2 : double); cdecl;external;
+Function fl_get_timer(p1 : PFL_OBJECT ) : double ; cdecl;external;
+Procedure fl_set_timer_countup(p1 : PFL_OBJECT; p2 : Longint); cdecl;external;
+Function fl_set_timer_filter (p1 : PFL_OBJECT; p2 : PFL_TIMER_FILTER) : PFL_TIMER_FILTER; cdecl;external;
+Procedure fl_suspend_timer(p1 : PFL_OBJECT); cdecl;external;
+Procedure fl_resume_timer(p1 : PFL_OBJECT); cdecl;external;
+
+{
+ * Class FL_XYPLOT
+ }
+
+Const
+ FL_NORMAL_XYPLOT = 0; { solid line }
+ FL_SQUARE_XYPLOT = 1; { with added square }
+ FL_CIRCLE_XYPLOT = 2; { with added circle }
+ FL_FILL_XYPLOT = 3; { fill completely }
+ FL_POINTS_XYPLOT = 4; { only data points }
+ FL_DASHED_XYPLOT = 5; { dashed line }
+ FL_IMPULSE_XYPLOT = 6;
+ FL_ACTIVE_XYPLOT = 7; { accepts Longint eractive manipulations }
+ FL_EMPTY_XYPLOT = 8;
+Type
+ TFL_XYPLOT_TYPE = Longint;
+
+Const
+ FL_LINEAR = 0;
+ FL_LOG = 1;
+
+Const
+ FL_GRID_NONE = 0;
+ FL_GRID_MAJOR = 1;
+ FL_GRID_MINOR = 2;
+
+{**** Defaults ****}
+
+ FL_XYPLOT_BOXTYPE = FL_FLAT_BOX;
+ FL_XYPLOT_COL1 = FL_COL1;
+ FL_XYPLOT_LCOL = FL_LCOL;
+ FL_XYPLOT_ALIGN = FL_ALIGN_BOTTOM;
+ FL_MAX_XYPLOTOVERLAY = 32;
+
+{**** Others ****}
+
+Function fl_create_xyplot(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; p6: pchar) : PFL_OBJECT; cdecl;external;
+Function fl_add_xyplot(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; P6 : pchar ) : PFL_OBJECT; cdecl;external;
+Procedure fl_set_xyplot_data(p1 : PFL_OBJECT; p2,p3 : pfloat; p4 : Longint ; p5,p6,p7 : pchar); cdecl;external;
+Procedure fl_set_xyplot_file(p1 : PFL_OBJECT; p2,p3,p4,p5 :pchar); cdecl;external;
+
+Procedure fl_set_xyplot_return(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_xyplot_xtics(p1 : PFL_OBJECT; p2 : Longint ; p3 :Longint ); cdecl;external;
+Procedure fl_set_xyplot_ytics(p1 : PFL_OBJECT; p2 : Longint ; p3 :Longint ); cdecl;external;
+Procedure fl_set_xyplot_xbounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
+Procedure fl_set_xyplot_ybounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
+Function fl_set_xyplot_maxoverlays(p1 : PFL_OBJECT; p2 : Longint ) : Longint ; cdecl;external;
+Procedure fl_set_xyplot_overlay_type(p1 : PFL_OBJECT; p2 : Longint ; p3 : Longint ); cdecl;external;
+Procedure fl_set_xyplot_interpolate(p1 : PFL_OBJECT; p2 : Longint ; p3 : Longint ; p4 : double); cdecl;external;
+Procedure fl_set_xyplot_fontsize(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_xyplot_fontstyle(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_xyplot_inspect(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_xyplot_symbolsize(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+Procedure fl_set_xyplot_xscale(p1 : PFL_OBJECT; p2 : Longint ; p3 :double); cdecl;external;
+Procedure fl_set_xyplot_yscale(p1 : PFL_OBJECT; p2 : Longint ; p3 :double); cdecl;external;
+
+Procedure fl_set_xyplot_linewidth(p1 : PFL_OBJECT; p2,p3 : Longint); cdecl;external;
+Procedure fl_set_xyplot_xgrid(p1 : PFL_OBJECT; p2 : Longint); cdecl;external;
+Procedure fl_set_xyplot_ygrid(p1 : PFL_OBJECT; p2 : Longint); cdecl;external;
+Procedure fl_set_xyplot_alphaxtics(p1 : PFL_OBJECT; p2,p3 : pchar); cdecl;external;
+Procedure fl_set_xyplot_alphaytics(p1 : PFL_OBJECT; p2,p3 : pchar); cdecl;external;
+Procedure fl_set_xyplot_fixed_xaxis(p1 : PFL_OBJECT; p2,p3 : pchar); cdecl;external;
+Procedure fl_set_xyplot_fixed_yaxis(p1 : PFL_OBJECT; p2,p3 : pchar); cdecl;external;
+
+
+Procedure fl_get_xyplot_xbounds(p1 : PFL_OBJECT; p2,p3 : pfloat ); cdecl;external;
+Procedure fl_get_xyplot_ybounds(p1 : PFL_OBJECT; p2,p3 : pfloat ); cdecl;external;
+Procedure fl_get_xyplot(p1 : PFL_OBJECT; p2,p3 : pfloat; p4 : pointer); cdecl;external;
+Procedure fl_get_xyplot_data(p1 : PFL_OBJECT; p2,p3 : pfloat; p4 : pointer); cdecl;external;
+Procedure fl_get_xyplot_xmapping(p1 : PFL_OBJECT; p2,p3 : pfloat); cdecl;external;
+Procedure fl_get_xyplot_ymapping(p1 : PFL_OBJECT; p2,p3 : pfloat); cdecl;external;
+
+{
+#define fl_set_xyplot_datafile fl_set_xyplot_file
+}
+Procedure fl_add_xyplot_text(p1 : PFL_OBJECT; p2,p3 : double; p4 : pchar;p5 : Longint ; p6 :TFL_COLOR); cdecl;external;
+Procedure fl_add_xyplot_overlay(p1 : PFL_OBJECT; p2 : Longint ; p3,p4 : pfloat; p5 : Longint ; p6 :TFL_COLOR); cdecl;external;
+Procedure fl_delete_xyplot_text(p1 : PFL_OBJECT; p2 : pchar); cdecl;external;
+Procedure fl_delete_xyplot_overlay(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
+
+Procedure fl_replace_xyplot_point(p1 : PFL_OBJECT; p2 : Longint ; p3 : double; p4 : double); cdecl;external;
+Function fl_interpolate(p1,p2 : pfloat; p3 :Longint ;p4,p5 : pfloat; p6 : double; p7 : Longint ) : Longint; cdecl;external;
+Procedure fl_xyplot_s2w(p1 : PFL_OBJECT; p2 : double; p3 : double; p4,p5 : pfloat); cdecl;external;
+Procedure fl_xyplot_w2s(p1 : PFL_OBJECT; p2 : double; p3 : double; p4,p5 : pfloat); cdecl;external;
+
+implementation
+
+{ From here we implement function aliases which were #defined }
+
+procedure fl_set_button_shortcut(p1 : PFL_OBJECT; p2 : pchar;p3 : Longint );
+
+begin
+ fl_set_object_shortcut (p1,p2,p3);
+end;
+
+procedure fl_set_pixmapbutton_data(p1 : PFL_OBJECT; p2 : ppchar);
+
+begin
+ fl_set_pixmap_data(p1,p2);
+end;
+
+procedure fl_set_pixmapbutton_file(p1 : PFL_OBJECT; p2 : pchar);
+
+begin
+ fl_set_pixmap_file(p1,p2);
+end;
+
+procedure fl_set_pixmapbutton_align(p1 : PFL_OBJECT; p2 : Longint ; p3 : Longint ; p4 : Longint );
+begin
+ fl_set_pixmap_align(p1,p2,p3,p4);
+end;
+
+procedure fl_set_pixmapbutton_pixmap(p1 : PFL_OBJECT; p2 : TPixmap; p3 :TPixmap);
+begin
+ fl_set_pixmap_pixmap(p1,p2,p3);
+end;
+
+procedure fl_set_pixmapbutton_colorcloseness(p1 : Longint ; p2 : Longint ; p3 :Longint );
+begin
+fl_set_pixmap_colorcloseness(p1,p2,p3);
+end;
+
+procedure fl_free_pixmapbutton_pixmap(p1 : PFL_OBJECT);
+begin
+ fl_free_pixmap_pixmap(p1);
+end;
+
+function fl_get_pixmapbutton_pixmap(p1 : PFL_OBJECT; p2 : PPixmap; p3 : PPixmap) : TPixmap ;
+
+begin
+ fl_get_pixmapbutton_pixmap:=fl_get_pixmap_pixmap(p1,p2,p3);
+end;
+
+Function FL_ObjWin ( P : PFL_Object) : TWindow;
+
+begin
+if P^.objclass <> FL_CANVAS then
+ FL_ObjWin :=P^.form^.window
+else
+ FL_objWin := fl_get_canvas_id (p)
+end;
+
+procedure fl_rectf(x,y,w,h : TFL_COORD;c : TFL_COLOR);
+begin
+ fl_rectangle(1,x,y,w,h,c)
+end;
+
+procedure fl_rect(x,y,w,h : TFL_COORD;c : TFL_COLOR);
+begin
+ fl_rectangle(0,x,y,w,h,c)
+end;
+
+
+procedure fl_set_canvas_decoration(p1 : PFL_OBJECT; p2 : Longint );
+
+begin
+fl_set_object_boxtype (p1,p2);
+end;
+
+function fl_setpup_default_fontsize(p1 : LongInt) : Longint;
+
+begin
+ fl_setpup_default_fontsize:=fl_setpup_fontsize(p1)
+end;
+
+function fl_setpup_default_fontstyle(p1 : LongInt) : Longint;
+
+begin
+ fl_setpup_default_fontstyle:=fl_setpup_fontstyle(p1);
+end;
+
+procedure fl_setpup_default_color(p1 : TFL_COLOR; p2 : TFL_COLOR);
+begin
+ fl_setpup_color(p1,p2);
+end;
+
+procedure fl_setpup_default_checkcolor(p1 : TFL_COLOR);
+begin
+ fl_setpup_default_checkcolor(p1);
+end;
+
+end.