mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 09:10:53 +02:00
os4units: mui added, DoMethod, DoSuperMethod and so on added.
git-svn-id: trunk@33585 -
This commit is contained in:
parent
a806114af6
commit
d9139219a9
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6332,6 +6332,7 @@ packages/os4units/src/inputevent.pas svneol=native#text/pascal
|
|||||||
packages/os4units/src/intuition.pas svneol=native#text/pascal
|
packages/os4units/src/intuition.pas svneol=native#text/pascal
|
||||||
packages/os4units/src/keymap.pas svneol=native#text/pascal
|
packages/os4units/src/keymap.pas svneol=native#text/pascal
|
||||||
packages/os4units/src/layers.pas svneol=native#text/pascal
|
packages/os4units/src/layers.pas svneol=native#text/pascal
|
||||||
|
packages/os4units/src/mui.pas svneol=native#text/pascal
|
||||||
packages/os4units/src/timer.pas svneol=native#text/pascal
|
packages/os4units/src/timer.pas svneol=native#text/pascal
|
||||||
packages/os4units/src/utility.pas svneol=native#text/pascal
|
packages/os4units/src/utility.pas svneol=native#text/pascal
|
||||||
packages/palmunits/Makefile svneol=native#text/plain
|
packages/palmunits/Makefile svneol=native#text/plain
|
||||||
|
@ -42,6 +42,7 @@ begin
|
|||||||
T:=P.Targets.AddUnit('clipboard.pas');
|
T:=P.Targets.AddUnit('clipboard.pas');
|
||||||
T:=P.Targets.AddUnit('iffparse.pas');
|
T:=P.Targets.AddUnit('iffparse.pas');
|
||||||
T:=P.Targets.AddUnit('intuition.pas');
|
T:=P.Targets.AddUnit('intuition.pas');
|
||||||
|
T:=P.Targets.AddUnit('mui.pas');
|
||||||
|
|
||||||
{$ifndef ALLPACKAGES}
|
{$ifndef ALLPACKAGES}
|
||||||
Run;
|
Run;
|
||||||
|
@ -4037,6 +4037,12 @@ function SetAttrs(obj: Pointer; const Tags: array of PtrUInt): LongWord;
|
|||||||
function SetGadgetAttrs(gadget: PGadget; Window: PWindow; Requester: PRequester; const argv: array of PtrUInt): LongWord;
|
function SetGadgetAttrs(gadget: PGadget; Window: PWindow; Requester: PRequester; const argv: array of PtrUInt): LongWord;
|
||||||
function EasyRequest(Window: PWindow; const EasyStruct: PEasyStruct; IDCMPPtr: PLongWord; const args: array of PtrUInt): LongInt;
|
function EasyRequest(Window: PWindow; const EasyStruct: PEasyStruct; IDCMPPtr: PLongWord; const args: array of PtrUInt): LongInt;
|
||||||
procedure SetWindowPointer(Win: PWindow; const Tags: array of PtrUInt);
|
procedure SetWindowPointer(Win: PWindow; const Tags: array of PtrUInt);
|
||||||
|
function DoMethodA(Obj: PObject_; Message: APTR): LongWord;
|
||||||
|
function DoMethod(Obj: PObject_; const Args: array of PtrUInt): LongWord;
|
||||||
|
function CoerceMethodA(cl: PIClass; Obj: PObject_; Message: APTR): LongWord;
|
||||||
|
function CoerceMethod(cl: PIClass; Obj: PObject_; const Args: array of PtrUInt): LongWord;
|
||||||
|
function DoSuperMethodA(cl: PIClass; Obj: PObject_; Message: APTR): LongWord;
|
||||||
|
function DoSuperMethod(cl: PIClass; Obj: PObject_; const Args: array of PtrUInt): LongWord;
|
||||||
|
|
||||||
|
|
||||||
{ Intuition macros }
|
{ Intuition macros }
|
||||||
@ -4096,6 +4102,53 @@ begin
|
|||||||
SetWindowPointerA(Win, @Tags);
|
SetWindowPointerA(Win, @Tags);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// Functions wrapper
|
||||||
|
|
||||||
|
function DoMethodA(Obj: PObject_; Message: APTR): LongWord; inline;
|
||||||
|
begin
|
||||||
|
DoMethodA := 0;
|
||||||
|
if Obj = nil then
|
||||||
|
Exit;
|
||||||
|
DoMethodA := CallHookPkt(PHook(OCLASS(Obj)), Obj, Message);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function DoMethod(Obj: PObject_; const Args: array of PtrUInt): LongWord; inline;
|
||||||
|
begin
|
||||||
|
DoMethod := 0;
|
||||||
|
if obj = nil then
|
||||||
|
Exit;
|
||||||
|
DoMethod := CallHookPkt(PHook(OCLASS(Obj)), Obj, @Args);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function DoSuperMethodA(cl: PIClass; Obj: PObject_; Message: APTR): LongWord; inline;
|
||||||
|
begin
|
||||||
|
DoSuperMethodA := 0;
|
||||||
|
if (cl = nil) or (obj = nil) then
|
||||||
|
Exit;
|
||||||
|
DoSuperMethodA := CallHookPkt(PHook(cl^.cl_Super), Obj, Message);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function DoSuperMethod(cl: PIClass; Obj: PObject_; const Args: array of PtrUInt): LongWord; inline;
|
||||||
|
begin
|
||||||
|
DoSuperMethod := 0;
|
||||||
|
if (cl = nil) or (obj = nil) then
|
||||||
|
Exit;
|
||||||
|
DoSuperMethod := CallHookPkt(PHook(cl^.cl_Super), Obj, @Args);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function CoerceMethodA(cl: PIClass; Obj: PObject_; Message: APTR): LongWord; inline;
|
||||||
|
begin
|
||||||
|
CoerceMethodA := 0;
|
||||||
|
if (cl = nil) or (obj = nil) then
|
||||||
|
Exit;
|
||||||
|
CoerceMethodA := CallHookPkt(PHook(cl), Obj, Message);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function CoerceMethod(cl: PIClass; Obj: PObject_; const Args: array of PtrUInt): LongWord; inline;
|
||||||
|
begin
|
||||||
|
CoerceMethod := CoerceMethodA(cl, Obj, @Args);
|
||||||
|
end;
|
||||||
|
|
||||||
function INST_DATA(cl: PIClass; o: P_Object): Pointer; inline;
|
function INST_DATA(cl: PIClass; o: P_Object): Pointer; inline;
|
||||||
begin
|
begin
|
||||||
INST_DATA := Pointer(PtrUInt(o) + cl^.cl_InstOffset);
|
INST_DATA := Pointer(PtrUInt(o) + cl^.cl_InstOffset);
|
||||||
|
4115
packages/os4units/src/mui.pas
Normal file
4115
packages/os4units/src/mui.pas
Normal file
File diff suppressed because it is too large
Load Diff
@ -320,6 +320,7 @@ function UCS4Valid(UCS4: LongInt): LongInt; syscall IUtility 360;
|
|||||||
|
|
||||||
|
|
||||||
function AllocNamedObject(Name: STRPTR; const Tags: array of PtrUInt): PNamedObject; inline;
|
function AllocNamedObject(Name: STRPTR; const Tags: array of PtrUInt): PNamedObject; inline;
|
||||||
|
function CallHook(Hook: PHook; Obj: APTR; Params: array of PtrUInt): LongWord; inline;
|
||||||
|
|
||||||
function TAG_(value: pointer): PtrUInt; overload; inline;
|
function TAG_(value: pointer): PtrUInt; overload; inline;
|
||||||
function TAG_(value: PChar): PtrUInt; overload; inline;
|
function TAG_(value: PChar): PtrUInt; overload; inline;
|
||||||
@ -338,6 +339,11 @@ begin
|
|||||||
AllocNamedObject := AllocNamedObjectA(Name, @Tags);
|
AllocNamedObject := AllocNamedObjectA(Name, @Tags);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function CallHook(Hook: PHook; Obj: APTR; Params: array of PtrUInt): LongWord; inline;
|
||||||
|
begin
|
||||||
|
CallHook := CallHookPkt(Hook, Obj, @Params);
|
||||||
|
end;
|
||||||
|
|
||||||
function TAG_(value: pointer): PtrUInt; inline;
|
function TAG_(value: pointer): PtrUInt; inline;
|
||||||
begin
|
begin
|
||||||
TAG_:=PtrUInt(value);
|
TAG_:=PtrUInt(value);
|
||||||
|
Loading…
Reference in New Issue
Block a user