mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 00:00:24 +02:00
MG: fixed mouse coords and fixed mouse clicked thru bug
git-svn-id: trunk@1349 -
This commit is contained in:
parent
17fff40131
commit
eb92710845
@ -105,32 +105,15 @@ procedure GTKAPIWidgetClient_DrawCaret(Client: PGTKAPIWidgetClient); forward;
|
|||||||
function GTKAPIWidgetClient_Timer(Client: Pointer): gint; cdecl;
|
function GTKAPIWidgetClient_Timer(Client: Pointer): gint; cdecl;
|
||||||
// returning 0 would stop the timer, 1 will restart it
|
// returning 0 would stop the timer, 1 will restart it
|
||||||
begin
|
begin
|
||||||
try
|
|
||||||
if PGTKAPIWidgetClient(Client)^.Caret.Timer<=0 then begin
|
if PGTKAPIWidgetClient(Client)^.Caret.Timer<=0 then begin
|
||||||
Result := 0;
|
Result := 0;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
except
|
|
||||||
Writeln('------Exception 1 in GTKAPIWidgetClient_Timer------');
|
|
||||||
end;
|
|
||||||
try
|
|
||||||
GTKAPIWidgetClient_DrawCaret(Client);
|
GTKAPIWidgetClient_DrawCaret(Client);
|
||||||
except
|
|
||||||
Writeln('------Exception 2 in GTKAPIWidgetClient_Timer------');
|
|
||||||
end;
|
|
||||||
try
|
|
||||||
if PGTKAPIWidgetClient(Client)^.Caret.Timer<>0 then
|
if PGTKAPIWidgetClient(Client)^.Caret.Timer<>0 then
|
||||||
Result := 1
|
Result := 1
|
||||||
else
|
else
|
||||||
Result := 0;
|
Result := 0;
|
||||||
except
|
|
||||||
Writeln('------Exception 3 in GTKAPIWidgetClient_Timer------');
|
|
||||||
writeln('Client = ',longint(Client));
|
|
||||||
if Assigned(Client) then
|
|
||||||
begin
|
|
||||||
writeln('Timer is ',Longint(PGTKAPIWidgetClient(Client)^.Caret.Timer));
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure GTKAPIWidgetClient_Realize(Widget: PGTKWidget); cdecl;
|
procedure GTKAPIWidgetClient_Realize(Widget: PGTKWidget); cdecl;
|
||||||
@ -240,6 +223,7 @@ type
|
|||||||
var
|
var
|
||||||
ObjectClass: PGTKObjectClass;
|
ObjectClass: PGTKObjectClass;
|
||||||
WidgetClass: PGTKWidgetClass;
|
WidgetClass: PGTKWidgetClass;
|
||||||
|
ClientClass: PGTKAPIWidgetClientClass;
|
||||||
SignalID: Guint;
|
SignalID: Guint;
|
||||||
{$IFDEF VER1_1}
|
{$IFDEF VER1_1}
|
||||||
AdjustParams: TAdjustParams;
|
AdjustParams: TAdjustParams;
|
||||||
@ -247,6 +231,7 @@ var
|
|||||||
begin
|
begin
|
||||||
ObjectClass := PGTKObjectClass(theClass);
|
ObjectClass := PGTKObjectClass(theClass);
|
||||||
WidgetClass := PGTKWidgetClass(theClass);
|
WidgetClass := PGTKWidgetClass(theClass);
|
||||||
|
ClientClass := PGTKAPIWidgetClientClass(theClass);
|
||||||
|
|
||||||
{$IFDEF VER1_1}
|
{$IFDEF VER1_1}
|
||||||
AdjustParams.Param1 := gtk_adjustment_get_type;
|
AdjustParams.Param1 := gtk_adjustment_get_type;
|
||||||
@ -258,7 +243,7 @@ begin
|
|||||||
'set_scroll_adjustments',
|
'set_scroll_adjustments',
|
||||||
GTK_RUN_FIRST,
|
GTK_RUN_FIRST,
|
||||||
ObjectClass^.thetype,
|
ObjectClass^.thetype,
|
||||||
(@PGTKAPIWidgetClientClass(theClass)^.set_scroll_adjustments - Pointer(theClass)),
|
(@ClientClass^.set_scroll_adjustments - Pointer(theClass)),
|
||||||
@gtk_marshal_NONE__POINTER_POINTER,
|
@gtk_marshal_NONE__POINTER_POINTER,
|
||||||
GTK_TYPE_NONE,
|
GTK_TYPE_NONE,
|
||||||
2,
|
2,
|
||||||
@ -279,7 +264,7 @@ begin
|
|||||||
focus_out_event := @GTKAPIWidgetClient_FocusOut;
|
focus_out_event := @GTKAPIWidgetClient_FocusOut;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
PGTKAPIWidgetClientClass(theClass)^.set_scroll_adjustments := nil;
|
ClientClass^.set_scroll_adjustments := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure GTKAPIWidgetClient_Init(Client, theClass: Pointer); cdecl;
|
procedure GTKAPIWidgetClient_Init(Client, theClass: Pointer); cdecl;
|
||||||
@ -313,11 +298,13 @@ const
|
|||||||
class_size: SizeOf(TGTKAPIWidgetClientClass)+100;
|
class_size: SizeOf(TGTKAPIWidgetClientClass)+100;
|
||||||
class_init_func: @GTKAPIWidgetClient_ClassInit;
|
class_init_func: @GTKAPIWidgetClient_ClassInit;
|
||||||
object_init_func : @GTKAPIWidgetClient_Init;
|
object_init_func : @GTKAPIWidgetClient_Init;
|
||||||
|
reserved_1: nil;
|
||||||
|
reserved_2: nil;
|
||||||
|
base_class_init_func: nil;
|
||||||
);
|
);
|
||||||
begin
|
begin
|
||||||
if (TheType = 0)
|
if (TheType = 0)
|
||||||
then TheType := gtk_type_unique(gtk_widget_get_type, @Info);
|
then TheType := gtk_type_unique(gtk_widget_get_type, @Info);
|
||||||
|
|
||||||
Result := TheType;
|
Result := TheType;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -625,10 +612,13 @@ const
|
|||||||
wawType: Guint = 0;
|
wawType: Guint = 0;
|
||||||
wawInfo: TGTKTypeInfo = (
|
wawInfo: TGTKTypeInfo = (
|
||||||
type_name: 'LCLWinapiWidget';
|
type_name: 'LCLWinapiWidget';
|
||||||
object_size: SizeOf(TGTKAPIWidget)+100;
|
object_size: SizeOf(TGTKAPIWidget)+100; // a TGTKScrolledWindow
|
||||||
class_size: SizeOf(TGTKAPIWidgetClass)+100;
|
class_size: SizeOf(TGTKAPIWidgetClass)+100;
|
||||||
class_init_func: @GTKAPIWidget_ClassInit;
|
class_init_func: @GTKAPIWidget_ClassInit;
|
||||||
object_init_func : @GTKAPIWidget_Init;
|
object_init_func : @GTKAPIWidget_Init;
|
||||||
|
reserved_1: nil;
|
||||||
|
reserved_2: nil;
|
||||||
|
base_class_init_func: nil;
|
||||||
);
|
);
|
||||||
begin
|
begin
|
||||||
if (wawType = 0)
|
if (wawType = 0)
|
||||||
@ -729,6 +719,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.31 2002/06/11 13:41:11 lazarus
|
||||||
|
MG: fixed mouse coords and fixed mouse clicked thru bug
|
||||||
|
|
||||||
Revision 1.30 2002/06/09 14:00:42 lazarus
|
Revision 1.30 2002/06/09 14:00:42 lazarus
|
||||||
MG: fixed persistent caret and implemented Form.BorderStyle=bsNone
|
MG: fixed persistent caret and implemented Form.BorderStyle=bsNone
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user