fixed fpc source include path for darwin

git-svn-id: trunk@8409 -
This commit is contained in:
mattias 2006-01-01 20:44:50 +00:00
parent adbd284641
commit b69992a7da
6 changed files with 33 additions and 12 deletions

View File

@ -172,7 +172,8 @@ begin
// Create a UPP for EventLoopEventHandler and QuitEventHandler
EventLoopUPP := NewEventHandlerUPP(EventHandlerProcPtr(Pointer(@EventLoopEventHandler)));
EventLoopUPP := NewEventHandlerUPP(EventHandlerProcPtr(
Pointer(@EventLoopEventHandler)));
//todo: raise exception ??
if EventLoopUPP = nil then Exit;
@ -194,18 +195,24 @@ begin
// standard event handlers are installed while our event loop runs.
EventSpec := MakeEventSpec('Laz ', 'Main');
if InstallApplicationEventHandler(EventLoopUPP, 1, @EventSpec, nil, @EventLoopHandler) <> noErr
if InstallApplicationEventHandler(EventLoopUPP, 1, @EventSpec, nil,
@EventLoopHandler) <> noErr
then Exit;
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;
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;
if PostEventToQueue(GetMainEventQueue, DummyEvent, kEventPriorityHigh) <> noErr
if PostEventToQueue(GetMainEventQueue, DummyEvent,
kEventPriorityHigh) <> noErr
then Exit;
RunApplicationEventLoop;
@ -230,7 +237,8 @@ var
begin
Target := GetEventDispatcherTarget;
repeat
if ReceiveNextEvent(0, nil, kEventDurationNoWait, True, Event) <> noErr then Break;
if ReceiveNextEvent(0, nil, kEventDurationNoWait, True, Event) <> noErr then
Break;
{$IFDEF DebugEventLoop}
PInteger(@EC)^ := GetEventClass(Event);
EC[4] := #0;

View File

@ -70,6 +70,7 @@ var
Msg: TLMMouseMove;
Info:PWidgetInfo;
begin
debugln('TrackProgress');
GetGlobalMouse(Pt);
Window := HIViewGetWindow(AControl);
GetWindowBounds(Window, kWindowStructureRgn, R);
@ -359,11 +360,13 @@ var
TmpSpec: EventTypeSpec;
begin
TmpSpec := MakeEventSpec(kEventClassWindow, kEventWindowClose);
InstallWindowEventHandler(AInfo^.Widget, RegisterEventHandler(@CarbonPrivateWindow_Close),
InstallWindowEventHandler(AInfo^.Widget,
RegisterEventHandler(@CarbonPrivateWindow_Close),
1, @TmpSpec, Pointer(AInfo), nil);
TmpSpec := MakeEventSpec(kEventClassWindow, kEventWindowClosed);
InstallWindowEventHandler(AInfo^.Widget, RegisterEventHandler(@CarbonPrivateWindow_Closed),
InstallWindowEventHandler(AInfo^.Widget,
RegisterEventHandler(@CarbonPrivateWindow_Closed),
1, @TmpSpec, Pointer(AInfo), nil);
MouseSpec[0].eventClass := kEventClassMouse;
@ -381,7 +384,8 @@ begin
MouseSpec[6].eventClass := kEventClassMouse;
MouseSpec[6].eventKind := kEventMouseWheelMoved;
InstallWindowEventHandler(AInfo^.Widget, RegisterEventHandler(@CarbonPrivateWindow_MouseProc),
InstallWindowEventHandler(AInfo^.Widget,
RegisterEventHandler(@CarbonPrivateWindow_MouseProc),
7, @MouseSpec[0], Pointer(AInfo), nil);
end;

View File

@ -57,12 +57,14 @@ begin
if IsValidControlHandle(AWidget)
then begin
SetControlProperty(AWidget, LAZARUS_FOURCC, WIDGETINFO_FOURCC, SizeOf(Result), @Result);
SetControlProperty(AWidget, LAZARUS_FOURCC, WIDGETINFO_FOURCC,
SizeOf(Result), @Result);
end
else begin
// there is no (cheap) check for windows so assume a window
// 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;

View File

@ -141,7 +141,6 @@ begin
NewWindowClass:=kDocumentWindowClass;
if CreateNewWindow(NewWindowClass,
kWindowCompositingAttribute or
kWindowStandardDocumentAttributes or
kWindowStandardHandlerAttribute or
kWindowLiveResizeAttribute or

View File

@ -251,6 +251,10 @@ begin
OnShow:=@Form1Show;
OnUTF8KeyPress:=@Form1UTF8KeyPress;
inherited Create(TheOwner);
Name:='Form1';
Caption:='Title Form1';
SetBounds(100,90,350,200);
end;
var

View File

@ -365,6 +365,10 @@ begin
OnShow:=@Form1Show;
OnUTF8KeyPress:=@Form1UTF8KeyPress;
inherited Create(TheOwner);
Name:='Form1';
Caption:='test1_2button';
SetBounds(100,90,200,250);
end;
var