mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 16:42:06 +02:00
fixed fpc source include path for darwin
git-svn-id: trunk@8409 -
This commit is contained in:
parent
adbd284641
commit
b69992a7da
@ -172,7 +172,8 @@ begin
|
|||||||
|
|
||||||
// Create a UPP for EventLoopEventHandler and QuitEventHandler
|
// Create a UPP for EventLoopEventHandler and QuitEventHandler
|
||||||
|
|
||||||
EventLoopUPP := NewEventHandlerUPP(EventHandlerProcPtr(Pointer(@EventLoopEventHandler)));
|
EventLoopUPP := NewEventHandlerUPP(EventHandlerProcPtr(
|
||||||
|
Pointer(@EventLoopEventHandler)));
|
||||||
//todo: raise exception ??
|
//todo: raise exception ??
|
||||||
if EventLoopUPP = nil then Exit;
|
if EventLoopUPP = nil then Exit;
|
||||||
|
|
||||||
@ -194,18 +195,24 @@ begin
|
|||||||
// standard event handlers are installed while our event loop runs.
|
// standard event handlers are installed while our event loop runs.
|
||||||
|
|
||||||
EventSpec := MakeEventSpec('Laz ', 'Main');
|
EventSpec := MakeEventSpec('Laz ', 'Main');
|
||||||
if InstallApplicationEventHandler(EventLoopUPP, 1, @EventSpec, nil, @EventLoopHandler) <> noErr
|
if InstallApplicationEventHandler(EventLoopUPP, 1, @EventSpec, nil,
|
||||||
|
@EventLoopHandler) <> noErr
|
||||||
then Exit;
|
then Exit;
|
||||||
|
|
||||||
try
|
try
|
||||||
if CreateEvent(nil, EventSpec.eventClass, EventSpec.eventKind, GetCurrentEventTime, kEventAttributeNone, DummyEvent) <> noErr
|
if CreateEvent(nil, EventSpec.eventClass, EventSpec.eventKind,
|
||||||
|
GetCurrentEventTime, kEventAttributeNone,
|
||||||
|
DummyEvent) <> noErr
|
||||||
then Exit;
|
then Exit;
|
||||||
|
|
||||||
try
|
try
|
||||||
if SetEventParameter(DummyEvent, MakeFourCC('Loop'), MakeFourCC('TAML'), SizeOf(ALoop), @ALoop) <> noErr
|
if SetEventParameter(DummyEvent, MakeFourCC('Loop'),
|
||||||
|
MakeFourCC('TAML'), SizeOf(ALoop),
|
||||||
|
@ALoop) <> noErr
|
||||||
then Exit;
|
then Exit;
|
||||||
|
|
||||||
if PostEventToQueue(GetMainEventQueue, DummyEvent, kEventPriorityHigh) <> noErr
|
if PostEventToQueue(GetMainEventQueue, DummyEvent,
|
||||||
|
kEventPriorityHigh) <> noErr
|
||||||
then Exit;
|
then Exit;
|
||||||
|
|
||||||
RunApplicationEventLoop;
|
RunApplicationEventLoop;
|
||||||
@ -230,7 +237,8 @@ var
|
|||||||
begin
|
begin
|
||||||
Target := GetEventDispatcherTarget;
|
Target := GetEventDispatcherTarget;
|
||||||
repeat
|
repeat
|
||||||
if ReceiveNextEvent(0, nil, kEventDurationNoWait, True, Event) <> noErr then Break;
|
if ReceiveNextEvent(0, nil, kEventDurationNoWait, True, Event) <> noErr then
|
||||||
|
Break;
|
||||||
{$IFDEF DebugEventLoop}
|
{$IFDEF DebugEventLoop}
|
||||||
PInteger(@EC)^ := GetEventClass(Event);
|
PInteger(@EC)^ := GetEventClass(Event);
|
||||||
EC[4] := #0;
|
EC[4] := #0;
|
||||||
|
@ -70,6 +70,7 @@ var
|
|||||||
Msg: TLMMouseMove;
|
Msg: TLMMouseMove;
|
||||||
Info:PWidgetInfo;
|
Info:PWidgetInfo;
|
||||||
begin
|
begin
|
||||||
|
debugln('TrackProgress');
|
||||||
GetGlobalMouse(Pt);
|
GetGlobalMouse(Pt);
|
||||||
Window := HIViewGetWindow(AControl);
|
Window := HIViewGetWindow(AControl);
|
||||||
GetWindowBounds(Window, kWindowStructureRgn, R);
|
GetWindowBounds(Window, kWindowStructureRgn, R);
|
||||||
@ -359,11 +360,13 @@ var
|
|||||||
TmpSpec: EventTypeSpec;
|
TmpSpec: EventTypeSpec;
|
||||||
begin
|
begin
|
||||||
TmpSpec := MakeEventSpec(kEventClassWindow, kEventWindowClose);
|
TmpSpec := MakeEventSpec(kEventClassWindow, kEventWindowClose);
|
||||||
InstallWindowEventHandler(AInfo^.Widget, RegisterEventHandler(@CarbonPrivateWindow_Close),
|
InstallWindowEventHandler(AInfo^.Widget,
|
||||||
|
RegisterEventHandler(@CarbonPrivateWindow_Close),
|
||||||
1, @TmpSpec, Pointer(AInfo), nil);
|
1, @TmpSpec, Pointer(AInfo), nil);
|
||||||
|
|
||||||
TmpSpec := MakeEventSpec(kEventClassWindow, kEventWindowClosed);
|
TmpSpec := MakeEventSpec(kEventClassWindow, kEventWindowClosed);
|
||||||
InstallWindowEventHandler(AInfo^.Widget, RegisterEventHandler(@CarbonPrivateWindow_Closed),
|
InstallWindowEventHandler(AInfo^.Widget,
|
||||||
|
RegisterEventHandler(@CarbonPrivateWindow_Closed),
|
||||||
1, @TmpSpec, Pointer(AInfo), nil);
|
1, @TmpSpec, Pointer(AInfo), nil);
|
||||||
|
|
||||||
MouseSpec[0].eventClass := kEventClassMouse;
|
MouseSpec[0].eventClass := kEventClassMouse;
|
||||||
@ -381,7 +384,8 @@ begin
|
|||||||
MouseSpec[6].eventClass := kEventClassMouse;
|
MouseSpec[6].eventClass := kEventClassMouse;
|
||||||
MouseSpec[6].eventKind := kEventMouseWheelMoved;
|
MouseSpec[6].eventKind := kEventMouseWheelMoved;
|
||||||
|
|
||||||
InstallWindowEventHandler(AInfo^.Widget, RegisterEventHandler(@CarbonPrivateWindow_MouseProc),
|
InstallWindowEventHandler(AInfo^.Widget,
|
||||||
|
RegisterEventHandler(@CarbonPrivateWindow_MouseProc),
|
||||||
7, @MouseSpec[0], Pointer(AInfo), nil);
|
7, @MouseSpec[0], Pointer(AInfo), nil);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
@ -57,12 +57,14 @@ begin
|
|||||||
|
|
||||||
if IsValidControlHandle(AWidget)
|
if IsValidControlHandle(AWidget)
|
||||||
then begin
|
then begin
|
||||||
SetControlProperty(AWidget, LAZARUS_FOURCC, WIDGETINFO_FOURCC, SizeOf(Result), @Result);
|
SetControlProperty(AWidget, LAZARUS_FOURCC, WIDGETINFO_FOURCC,
|
||||||
|
SizeOf(Result), @Result);
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
// there is no (cheap) check for windows so assume a window
|
// there is no (cheap) check for windows so assume a window
|
||||||
// when it is not a control.
|
// when it is not a control.
|
||||||
SetWindowProperty(AWidget, LAZARUS_FOURCC, WIDGETINFO_FOURCC, SizeOf(Result), @Result);
|
SetWindowProperty(AWidget, LAZARUS_FOURCC, WIDGETINFO_FOURCC,
|
||||||
|
SizeOf(Result), @Result);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -141,7 +141,6 @@ begin
|
|||||||
NewWindowClass:=kDocumentWindowClass;
|
NewWindowClass:=kDocumentWindowClass;
|
||||||
|
|
||||||
if CreateNewWindow(NewWindowClass,
|
if CreateNewWindow(NewWindowClass,
|
||||||
kWindowCompositingAttribute or
|
|
||||||
kWindowStandardDocumentAttributes or
|
kWindowStandardDocumentAttributes or
|
||||||
kWindowStandardHandlerAttribute or
|
kWindowStandardHandlerAttribute or
|
||||||
kWindowLiveResizeAttribute or
|
kWindowLiveResizeAttribute or
|
||||||
|
@ -251,6 +251,10 @@ begin
|
|||||||
OnShow:=@Form1Show;
|
OnShow:=@Form1Show;
|
||||||
OnUTF8KeyPress:=@Form1UTF8KeyPress;
|
OnUTF8KeyPress:=@Form1UTF8KeyPress;
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
|
|
||||||
|
Name:='Form1';
|
||||||
|
Caption:='Title Form1';
|
||||||
|
SetBounds(100,90,350,200);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
|
@ -365,6 +365,10 @@ begin
|
|||||||
OnShow:=@Form1Show;
|
OnShow:=@Form1Show;
|
||||||
OnUTF8KeyPress:=@Form1UTF8KeyPress;
|
OnUTF8KeyPress:=@Form1UTF8KeyPress;
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
|
|
||||||
|
Name:='Form1';
|
||||||
|
Caption:='test1_2button';
|
||||||
|
SetBounds(100,90,200,250);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user