fixed compilation of gtk2 interface on windows

git-svn-id: trunk@6728 -
This commit is contained in:
vincents 2005-02-03 21:10:07 +00:00
parent d690c4c03e
commit c29fc540b8
3 changed files with 31 additions and 9 deletions

View File

@ -57,7 +57,12 @@ interface
{$EndIF}
uses
// rtl+ftl
{$IFDEF WIN32}
// use windows unit first,
// if not, Rect and Point are taken from the windows unit instead of classes.
Windows,
{$ENDIF}
// rtl+fcl
Classes, SysUtils, FPCAdds,
// interfacebase
InterfaceBase,
@ -71,9 +76,6 @@ uses
{$IFDEF UNIX}
x, xlib,
{$ENDIF}
{$IFDEF WIN32}
Windows,
{$ENDIF}
// LCL
ExtDlgs, Dialogs, Controls, Forms, LCLStrConsts, LMessages,
LCLProc, LCLIntf, LCLType, gtkDef, DynHashArray, gtkMsgQueue,
@ -440,6 +442,9 @@ end.
{ =============================================================================
$Log$
Revision 1.220 2005/02/03 21:10:07 vincents
fixed compilation of gtk2 interface on windows
Revision 1.219 2005/01/13 22:07:10 mattias
added mouse cursors for 8 uni directions, imlemented for gtk

View File

@ -2925,14 +2925,19 @@ end;
procedure InitKeyboardTables;
var
n: Integer;
VK: Byte;
VKey: Byte;
begin
for n := 0 to 255 do
begin
MCharToVK[Chr(n)] := Windows.VkKeyScan(Chr(n));
VK := MapVirtualKey(n, 3);
MKeyCodeToVK[n] := VK;
MVKToKeyCode[VK] := n;
MCharToVK[Chr(n)] := TVKeyRecord(Windows.VkKeyScan(Chr(n)));
VKey := MapVirtualKey(n, 3);
MKeyCodeToVK[n] := VKey;
if VKey <> $FF
then MVKeyInfo[VKey].KeyCode := Byte(n);
//WARNING: the other fields of MVKeyInfo are not set.
//At this moment it is not clear, what they should be.
//This is code is to be removed when the keyboard handling is updated for
//gtk2, (gtk1 won't be supported on windows), so it will be obsolete soon
end
end;
{$ENDIF}
@ -7924,6 +7929,9 @@ end;
{ =============================================================================
$Log$
Revision 1.331 2005/02/03 21:10:07 vincents
fixed compilation of gtk2 interface on windows
Revision 1.330 2005/01/24 16:06:42 mattias
implemented DoubleClick for quick selection in new dialog

View File

@ -30,6 +30,11 @@ interface
{off $DEFINE VerboseAccelerator}
uses
{$IFDEF win32}
// use windows unit first,
// if not, Rect and Point are taken from the windows unit instead of classes.
Windows, // needed for keyboard handling
{$endif}
SysUtils, Classes, FPCAdds,
{$IFDEF UNIX}
{$ifndef VER1_0}
@ -44,7 +49,9 @@ uses
InterfaceBase,
{$IFDEF gtk2}
glib2, gdk2pixbuf, gdk2, gtk2, Pango,
{$IFNDEF win32}
X, XLib, XUtil, //Keyboard handling
{$ENDIF}
{$ELSE}
glib, gdk, gtk, {$Ifndef NoGdkPixbufLib}gdkpixbuf,{$EndIf} GtkFontCache,
{$ENDIF}
@ -462,10 +469,12 @@ procedure ReleaseMouseCapture;
procedure UpdateMouseCaptureControl;
{$IFNDEF GTK2_2}
{$IFNDEF win32}
// MWE:
// TODO: check if the new keyboard routines require X on GTK2
function X11Display: Pointer;
{$ENDIF}
{$ENDIF}
// designing
type