mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 07:09:23 +02:00
--- Merging r31009 into '.':
U packages/rtl-extra/src/aros/sockets.pp --- Recording mergeinfo for merge of r31009 into '.': U . --- Merging r31011 into '.': U packages/morphunits/src/mui.pas --- Recording mergeinfo for merge of r31011 into '.': G . --- Merging r31012 into '.': U packages/amunits/src/otherlibs/mui.pas G packages/morphunits/src/mui.pas U packages/arosunits/src/mui.pas --- Recording mergeinfo for merge of r31012 into '.': G . --- Merging r31014 into '.': U packages/amunits/examples/bezier.pas U packages/amunits/examples/bezier2.pas --- Recording mergeinfo for merge of r31014 into '.': G . # revisions: 31009,31011,31012,31014 git-svn-id: branches/fixes_3_0@31100 -
This commit is contained in:
parent
9b35c793aa
commit
aa99dd7192
@ -35,7 +35,7 @@ Program Bezier;
|
|||||||
nils.sjoholm@mailbox.swipnet.se
|
nils.sjoholm@mailbox.swipnet.se
|
||||||
}
|
}
|
||||||
|
|
||||||
uses exec, intuition, agraphics, utility,pastoc, systemvartags;
|
uses exec, intuition, agraphics, utility, systemvartags;
|
||||||
|
|
||||||
type
|
type
|
||||||
PointRec = packed Record
|
PointRec = packed Record
|
||||||
@ -249,9 +249,9 @@ begin
|
|||||||
|
|
||||||
rp := w^.RPort;
|
rp := w^.RPort;
|
||||||
GfxMove(rp, 252, 30);
|
GfxMove(rp, 252, 30);
|
||||||
GfxText(rp, pas2c('Enter points by pressing the left mouse button'), 46);
|
GfxText(rp, 'Enter points by pressing the left mouse button', 46);
|
||||||
GfxMove(rp, 252, 40);
|
GfxMove(rp, 252, 40);
|
||||||
GfxText(rp, pas2c('Double click on the last point to begin drawing'), 47);
|
GfxText(rp, 'Double click on the last point to begin drawing', 47);
|
||||||
repeat
|
repeat
|
||||||
GetPoints; { Both these routines will quit if }
|
GetPoints; { Both these routines will quit if }
|
||||||
DrawBezier; { the window is closed. }
|
DrawBezier; { the window is closed. }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Program Bezier;
|
Program Bezier2;
|
||||||
|
|
||||||
|
|
||||||
{ This program draws Bezier curves in the slow, simple, recursive
|
{ This program draws Bezier curves in the slow, simple, recursive
|
||||||
@ -26,7 +26,7 @@ Program Bezier;
|
|||||||
nils.sjoholm@mailbox.swipnet.se
|
nils.sjoholm@mailbox.swipnet.se
|
||||||
}
|
}
|
||||||
|
|
||||||
uses exec, intuition, agraphics, utility, pastoc, systemvartags;
|
uses exec, intuition, agraphics, utility, systemvartags;
|
||||||
|
|
||||||
type
|
type
|
||||||
PointRec = Record
|
PointRec = Record
|
||||||
|
@ -1520,12 +1520,12 @@ uses exec, intuition,utility,agraphics,iffparse;
|
|||||||
{ MUI_MinMax structure holds information about minimum, maximum
|
{ MUI_MinMax structure holds information about minimum, maximum
|
||||||
and default dimensions of an object. }
|
and default dimensions of an object. }
|
||||||
tMUI_MinMax = record
|
tMUI_MinMax = record
|
||||||
MinWidth : WORD;
|
MinWidth : SmallInt;
|
||||||
MinHeight : WORD;
|
MinHeight : SmallInt;
|
||||||
MaxWidth : WORD;
|
MaxWidth : SmallInt;
|
||||||
MaxHeight : WORD;
|
MaxHeight : SmallInt;
|
||||||
DefWidth : WORD;
|
DefWidth : SmallInt;
|
||||||
DefHeight : WORD;
|
DefHeight : SmallInt;
|
||||||
end;
|
end;
|
||||||
pMUI_MinMax = ^tMUI_MinMax;
|
pMUI_MinMax = ^tMUI_MinMax;
|
||||||
|
|
||||||
|
@ -530,16 +530,16 @@ uses
|
|||||||
ehn_Class : PIClass;
|
ehn_Class : PIClass;
|
||||||
ehn_Events : LongWord;
|
ehn_Events : LongWord;
|
||||||
end;
|
end;
|
||||||
{$else}
|
{$else}
|
||||||
tMUI_EventHandlerNode = record
|
tMUI_EventHandlerNode = record
|
||||||
ehn_Node : TNode;
|
ehn_Node : TNode;
|
||||||
ehn_Flags : WORD;
|
ehn_Flags : WORD;
|
||||||
ehn_Object : PObject_;
|
ehn_Object : PObject_;
|
||||||
ehn_Class : PIClass;
|
ehn_Class : PIClass;
|
||||||
ehn_Events : LongWord;
|
ehn_Events : LongWord;
|
||||||
ehn_Priority : BYTE;
|
ehn_Priority : BYTE;
|
||||||
end;
|
end;
|
||||||
{$endif}
|
{$endif}
|
||||||
pMUI_EventHandlerNode = ^tMUI_EventHandlerNode;
|
pMUI_EventHandlerNode = ^tMUI_EventHandlerNode;
|
||||||
{ flags for ehn_Flags }
|
{ flags for ehn_Flags }
|
||||||
|
|
||||||
@ -1508,12 +1508,12 @@ uses
|
|||||||
{ MUI_MinMax structure holds information about minimum, maximum
|
{ MUI_MinMax structure holds information about minimum, maximum
|
||||||
and default dimensions of an object. }
|
and default dimensions of an object. }
|
||||||
tMUI_MinMax = record
|
tMUI_MinMax = record
|
||||||
MinWidth : WORD;
|
MinWidth : SmallInt;
|
||||||
MinHeight : WORD;
|
MinHeight : SmallInt;
|
||||||
MaxWidth : WORD;
|
MaxWidth : SmallInt;
|
||||||
MaxHeight : WORD;
|
MaxHeight : SmallInt;
|
||||||
DefWidth : WORD;
|
DefWidth : SmallInt;
|
||||||
DefHeight : WORD;
|
DefHeight : SmallInt;
|
||||||
end;
|
end;
|
||||||
pMUI_MinMax = ^tMUI_MinMax;
|
pMUI_MinMax = ^tMUI_MinMax;
|
||||||
|
|
||||||
@ -3469,7 +3469,7 @@ uses
|
|||||||
var
|
var
|
||||||
MUIMasterBase : pLibrary;
|
MUIMasterBase : pLibrary;
|
||||||
|
|
||||||
function MUI_NewObjectA(class_ : PChar; tags : pTagItem) : PObject_; syscall MUIMasterBase 5;
|
function MUI_NewObjectA(class_ : PChar; tags : pTagItem) : PObject_; syscall MUIMasterBase 5;
|
||||||
procedure MUI_DisposeObject(obj : PObject_); syscall MUIMasterBase 6;
|
procedure MUI_DisposeObject(obj : PObject_); syscall MUIMasterBase 6;
|
||||||
function MUI_RequestA(app : Pointer; win : Pointer; flags : LONGBITS; title : PChar; gadgets : PChar; format : PChar; params : Pointer) : LongInt; syscall MUIMasterBase 7;
|
function MUI_RequestA(app : Pointer; win : Pointer; flags : LONGBITS; title : PChar; gadgets : PChar; format : PChar; params : Pointer) : LongInt; syscall MUIMasterBase 7;
|
||||||
function MUI_AllocAslRequest(typ : LongWord; tags : pTagItem) : Pointer; syscall MUIMasterBase 8;
|
function MUI_AllocAslRequest(typ : LongWord; tags : pTagItem) : Pointer; syscall MUIMasterBase 8;
|
||||||
|
@ -248,11 +248,11 @@ const
|
|||||||
end;
|
end;
|
||||||
pMUIS_InfoClient = ^tMUIS_InfoClient;
|
pMUIS_InfoClient = ^tMUIS_InfoClient;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ ** Object Types for MUI_MakeObject() }
|
{ ** Object Types for MUI_MakeObject() }
|
||||||
{ ************************************************************************* }
|
{ ************************************************************************* }
|
||||||
|
|
||||||
const
|
const
|
||||||
MUIO_Label = 1; { PChar label, LongWord flags }
|
MUIO_Label = 1; { PChar label, LongWord flags }
|
||||||
MUIO_Button = 2; { PChar label }
|
MUIO_Button = 2; { PChar label }
|
||||||
@ -379,7 +379,7 @@ const
|
|||||||
MUII_BACKGROUND = 128; { These are direct color }
|
MUII_BACKGROUND = 128; { These are direct color }
|
||||||
MUII_SHADOW = 129; { combinations and are not }
|
MUII_SHADOW = 129; { combinations and are not }
|
||||||
MUII_SHINE = 130; { affected by users prefs. }
|
MUII_SHINE = 130; { affected by users prefs. }
|
||||||
MUII_FILL = 131;
|
MUII_FILL = 131;
|
||||||
MUII_SHADOWBACK = 132; { Generally, you should }
|
MUII_SHADOWBACK = 132; { Generally, you should }
|
||||||
MUII_SHADOWFILL = 133; { avoid using them. Better }
|
MUII_SHADOWFILL = 133; { avoid using them. Better }
|
||||||
MUII_SHADOWSHINE = 134; { use one of the customized }
|
MUII_SHADOWSHINE = 134; { use one of the customized }
|
||||||
@ -782,7 +782,7 @@ type
|
|||||||
end;
|
end;
|
||||||
pMUIP_NoNotifySet = ^tMUIP_NoNotifySet;
|
pMUIP_NoNotifySet = ^tMUIP_NoNotifySet;
|
||||||
|
|
||||||
tMUIP_Notify = record { ... }
|
tMUIP_Notify = record { ... }
|
||||||
MethodID : LongWord;
|
MethodID : LongWord;
|
||||||
TrigAttr : LongWord;
|
TrigAttr : LongWord;
|
||||||
TrigVal : LongWord;
|
TrigVal : LongWord;
|
||||||
@ -1016,7 +1016,7 @@ type
|
|||||||
pMUIP_Application_AddInputHandler = ^tMUIP_Application_AddInputHandler;
|
pMUIP_Application_AddInputHandler = ^tMUIP_Application_AddInputHandler;
|
||||||
|
|
||||||
tMUIP_Application_BuildSettingsPanel = record
|
tMUIP_Application_BuildSettingsPanel = record
|
||||||
MethodID : LongWord;
|
MethodID : LongWord;
|
||||||
number: LongWord;
|
number: LongWord;
|
||||||
end;
|
end;
|
||||||
pMUIP_Application_BuildSettingsPanel = ^tMUIP_Application_BuildSettingsPanel;
|
pMUIP_Application_BuildSettingsPanel = ^tMUIP_Application_BuildSettingsPanel;
|
||||||
@ -1328,7 +1328,7 @@ const
|
|||||||
{ FIX ME!!! #define MUIV_Window_AltWidth_Visible(p) (-100-(p)) }
|
{ FIX ME!!! #define MUIV_Window_AltWidth_Visible(p) (-100-(p)) }
|
||||||
{ FIX ME!!! #define MUIV_Window_AltWidth_Screen(p) (-200-(p)) }
|
{ FIX ME!!! #define MUIV_Window_AltWidth_Screen(p) (-200-(p)) }
|
||||||
MUIV_Window_AltWidth_Scaled = -(1000);
|
MUIV_Window_AltWidth_Scaled = -(1000);
|
||||||
{ FIX ME!!! #define MUIV_Window_Height_MinMax(p) (0-(p)) }
|
{ FIX ME!!! #define MUIV_Window_Height_MinMax(p) (0-(p)) }
|
||||||
{ FIX ME!!! #define MUIV_Window_Height_Visible(p) (-100-(p)) }
|
{ FIX ME!!! #define MUIV_Window_Height_Visible(p) (-100-(p)) }
|
||||||
{ FIX ME!!! #define MUIV_Window_Height_Screen(p) (-200-(p)) }
|
{ FIX ME!!! #define MUIV_Window_Height_Screen(p) (-200-(p)) }
|
||||||
MUIV_Window_Height_Scaled = -(1000);
|
MUIV_Window_Height_Scaled = -(1000);
|
||||||
@ -1398,12 +1398,12 @@ type
|
|||||||
{ MUI_MinMax structure holds information about minimum, maximum
|
{ MUI_MinMax structure holds information about minimum, maximum
|
||||||
and default dimensions of an object. }
|
and default dimensions of an object. }
|
||||||
tMUI_MinMax = record
|
tMUI_MinMax = record
|
||||||
MinWidth : shortint;
|
MinWidth : SmallInt;
|
||||||
MinHeight : shortint;
|
MinHeight : SmallInt;
|
||||||
MaxWidth : shortint;
|
MaxWidth : SmallInt;
|
||||||
MaxHeight : shortint;
|
MaxHeight : SmallInt;
|
||||||
DefWidth : shortint;
|
DefWidth : SmallInt;
|
||||||
DefHeight : shortint;
|
DefHeight : SmallInt;
|
||||||
end;
|
end;
|
||||||
pMUI_MinMax = ^tMUI_MinMax;
|
pMUI_MinMax = ^tMUI_MinMax;
|
||||||
|
|
||||||
@ -1890,7 +1890,7 @@ const
|
|||||||
MUIA_Prop_UseWinBorder = $8042deee; { V13 i.. LongInt }
|
MUIA_Prop_UseWinBorder = $8042deee; { V13 i.. LongInt }
|
||||||
MUIA_Prop_Visible = $8042fea6; { V4 isg LongInt }
|
MUIA_Prop_Visible = $8042fea6; { V4 isg LongInt }
|
||||||
|
|
||||||
const
|
const
|
||||||
MUIV_Prop_UseWinBorder_None = 0;
|
MUIV_Prop_UseWinBorder_None = 0;
|
||||||
MUIV_Prop_UseWinBorder_Left = 1;
|
MUIV_Prop_UseWinBorder_Left = 1;
|
||||||
MUIV_Prop_UseWinBorder_Right = 2;
|
MUIV_Prop_UseWinBorder_Right = 2;
|
||||||
@ -3313,10 +3313,10 @@ syscall legacy MUIMasterBase 36;
|
|||||||
|
|
||||||
function MUI_RequestA(app : POINTER location 'd0';
|
function MUI_RequestA(app : POINTER location 'd0';
|
||||||
win : POINTER location 'd1';
|
win : POINTER location 'd1';
|
||||||
flags : LongWord location 'd2';
|
flags : LongWord location 'd2';
|
||||||
title : pChar location 'a0';
|
title : pChar location 'a0';
|
||||||
gadgets : pChar location 'a1';
|
gadgets : pChar location 'a1';
|
||||||
format : pChar location 'a2';
|
format : pChar location 'a2';
|
||||||
params : POINTER location 'a3') : longint;
|
params : POINTER location 'a3') : longint;
|
||||||
syscall legacy MUIMasterBase 42;
|
syscall legacy MUIMasterBase 42;
|
||||||
|
|
||||||
@ -3350,10 +3350,10 @@ syscall legacy MUIMasterBase 96;
|
|||||||
procedure MUI_Redraw(obj : pObject_ location 'a0'; flags : LongWord location 'd0');
|
procedure MUI_Redraw(obj : pObject_ location 'a0'; flags : LongWord location 'd0');
|
||||||
syscall legacy MUIMasterBase 102;
|
syscall legacy MUIMasterBase 102;
|
||||||
|
|
||||||
function MUI_CreateCustomClass(base : pLibrary location 'a0';
|
function MUI_CreateCustomClass(base : pLibrary location 'a0';
|
||||||
supername : pChar location 'a1';
|
supername : pChar location 'a1';
|
||||||
supermcc : pMUI_CustomClass location 'a2';
|
supermcc : pMUI_CustomClass location 'a2';
|
||||||
datasize : LONGINT location 'd0';
|
datasize : LONGINT location 'd0';
|
||||||
dispatcher : POINTER location 'a3') : pMUI_CustomClass;
|
dispatcher : POINTER location 'a3') : pMUI_CustomClass;
|
||||||
syscall legacy MUIMasterBase 108;
|
syscall legacy MUIMasterBase 108;
|
||||||
|
|
||||||
@ -3363,32 +3363,32 @@ syscall legacy MUIMasterBase 114;
|
|||||||
function MUI_MakeObjectA(typ: LONGINT location 'd0'; params : pLongWord location 'a0') : pLongWord;
|
function MUI_MakeObjectA(typ: LONGINT location 'd0'; params : pLongWord location 'a0') : pLongWord;
|
||||||
syscall legacy MUIMasterBase 120;
|
syscall legacy MUIMasterBase 120;
|
||||||
|
|
||||||
function MUI_Layout(obj : pObject_ location 'a0';
|
function MUI_Layout(obj : pObject_ location 'a0';
|
||||||
l : LONGINT location 'd0';
|
l : LONGINT location 'd0';
|
||||||
t : LONGINT location 'd1';
|
t : LONGINT location 'd1';
|
||||||
w : LONGINT location 'd2';
|
w : LONGINT location 'd2';
|
||||||
h : LONGINT location 'd3';
|
h : LONGINT location 'd3';
|
||||||
flags : LongWord location 'd4') : BOOLEAN;
|
flags : LongWord location 'd4') : BOOLEAN;
|
||||||
syscall legacy MUIMasterBase 126;
|
syscall legacy MUIMasterBase 126;
|
||||||
|
|
||||||
|
|
||||||
function MUI_ObtainPen(mri : pMUI_RenderInfo location 'a0';
|
function MUI_ObtainPen(mri : pMUI_RenderInfo location 'a0';
|
||||||
spec : pMUI_PenSpec location 'a1';
|
spec : pMUI_PenSpec location 'a1';
|
||||||
flags : LongWord location 'd0') : LONGINT;
|
flags : LongWord location 'd0') : LONGINT;
|
||||||
syscall legacy MUIMasterBase 156;
|
syscall legacy MUIMasterBase 156;
|
||||||
|
|
||||||
procedure MUI_ReleasePen(mri : pMUI_RenderInfo location 'a0';
|
procedure MUI_ReleasePen(mri : pMUI_RenderInfo location 'a0';
|
||||||
pen : LONGINT location 'd0');
|
pen : LONGINT location 'd0');
|
||||||
syscall legacy MUIMasterBase 162;
|
syscall legacy MUIMasterBase 162;
|
||||||
|
|
||||||
function MUI_AddClipping(mri : pMUI_RenderInfo location 'a0';
|
function MUI_AddClipping(mri : pMUI_RenderInfo location 'a0';
|
||||||
l : smallint location 'd0';
|
l : smallint location 'd0';
|
||||||
t : smallint location 'd1';
|
t : smallint location 'd1';
|
||||||
w : smallint location 'd2';
|
w : smallint location 'd2';
|
||||||
h : smallint location 'd3') : POINTER;
|
h : smallint location 'd3') : POINTER;
|
||||||
syscall legacy MUIMasterBase 168;
|
syscall legacy MUIMasterBase 168;
|
||||||
|
|
||||||
procedure MUI_RemoveClipping(mri : pMUI_RenderInfo location 'a0';
|
procedure MUI_RemoveClipping(mri : pMUI_RenderInfo location 'a0';
|
||||||
h : POINTER location 'a1');
|
h : POINTER location 'a1');
|
||||||
syscall legacy MUIMasterBase 174;
|
syscall legacy MUIMasterBase 174;
|
||||||
|
|
||||||
@ -3460,7 +3460,7 @@ function OBJ_IsInObject(x,y : smallint; obj : pObject_): boolean; inline;
|
|||||||
|
|
||||||
function MUIV_Window_AltHeight_MinMax(p : longint) : longint; inline;
|
function MUIV_Window_AltHeight_MinMax(p : longint) : longint; inline;
|
||||||
function MUIV_Window_AltHeight_Visible(p : longint) : longint; inline;
|
function MUIV_Window_AltHeight_Visible(p : longint) : longint; inline;
|
||||||
function MUIV_Window_AltHeight_Screen(p : longint) : longint; inline;
|
function MUIV_Window_AltHeight_Screen(p : longint) : longint; inline;
|
||||||
function MUIV_Window_AltTopEdge_Delta(p : longint) : longint; inline;
|
function MUIV_Window_AltTopEdge_Delta(p : longint) : longint; inline;
|
||||||
function MUIV_Window_AltWidth_MinMax(p : longint) : longint; inline;
|
function MUIV_Window_AltWidth_MinMax(p : longint) : longint; inline;
|
||||||
function MUIV_Window_AltWidth_Visible(p : longint) : longint; inline;
|
function MUIV_Window_AltWidth_Visible(p : longint) : longint; inline;
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
**********************************************************************}
|
**********************************************************************}
|
||||||
{$PACKRECORDS 2}
|
{$PACKRECORDS 2}
|
||||||
|
{.$DEFINE SOCKETS_DEBUG}
|
||||||
unit Sockets;
|
unit Sockets;
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
@ -258,14 +259,37 @@ end;
|
|||||||
{$i sockovl.inc}
|
{$i sockovl.inc}
|
||||||
{$i sockets.inc}
|
{$i sockets.inc}
|
||||||
|
|
||||||
// FIXME: this doesn't make any sense here, because SocketBase should be task-specific
|
const
|
||||||
// but FPC doesn't support that yet (TODO)
|
BSDSOCKET_LIBRARY_VER = 4;
|
||||||
{$WARNING FIX ME, TODO}
|
|
||||||
|
|
||||||
|
procedure BSDSocketOpen;
|
||||||
|
begin
|
||||||
|
{$IFDEF SOCKETS_DEBUG}
|
||||||
|
SysDebugLn('FPC Sockets: Opening bsdsocket.library...');
|
||||||
|
{$ENDIF}
|
||||||
|
SocketBase:=OpenLibrary('bsdsocket.library', BSDSOCKET_LIBRARY_VER);
|
||||||
|
{$IFDEF SOCKETS_DEBUG}
|
||||||
|
if SocketBase = nil then
|
||||||
|
SysDebugLn('FPC Sockets: FAILED to open bsdsocket.library.')
|
||||||
|
else
|
||||||
|
SysDebugLn('FPC Sockets: bsdsocket.library opened successfully.');
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure BSDSocketClose;
|
||||||
|
begin
|
||||||
|
if (SocketBase<>NIL) then CloseLibrary(SocketBase);
|
||||||
|
SocketBase:=NIL;
|
||||||
|
{$IFDEF SOCKETS_DEBUG}
|
||||||
|
SysDebugLn('FPC Sockets: bsdsocket.library closed.');
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
SocketBase := OpenLibrary('bsdsocket.library',0);
|
AddThreadInitProc(@BSDSocketOpen);
|
||||||
|
AddThreadExitProc(@BSDSocketClose);
|
||||||
|
BSDSocketOpen;
|
||||||
|
|
||||||
finalization
|
finalization
|
||||||
if SocketBase <> nil then
|
BSDSocketClose;
|
||||||
CloseLibrary(SocketBase);
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user