mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 05:50:30 +02:00
started gtk2 interface
git-svn-id: trunk@2296 -
This commit is contained in:
parent
a13c68a071
commit
52222da2ae
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -572,6 +572,8 @@ lcl/interfaces/gtk/gtkwinapiwindow.pp svneol=native#text/pascal
|
||||
lcl/interfaces/gtk/interfaces.pp svneol=native#text/pascal
|
||||
lcl/interfaces/gtk/keymap.pp svneol=native#text/pascal
|
||||
lcl/interfaces/gtk/tnotebook_close_tab.xpm -text svneol=native#image/x-xpixmap
|
||||
lcl/interfaces/gtk2/gtk2int.pas svneol=native#text/pascal
|
||||
lcl/interfaces/gtk2/interfaces.pas svneol=native#text/pascal
|
||||
lcl/interfaces/qt/build.sh -text svneol=native#application/x-sh
|
||||
lcl/interfaces/qt/include/lpushbt.h svneol=native#text/plain
|
||||
lcl/interfaces/qt/include/lzqt.h svneol=native#text/plain
|
||||
|
@ -25,11 +25,17 @@ interface
|
||||
{$ENDIF}
|
||||
|
||||
uses
|
||||
SysUtils, Classes,
|
||||
{$Ifndef Win32}
|
||||
X, XLib,//Font retrieval
|
||||
{$EndIf}
|
||||
InterfaceBase, {$Ifndef NoGdkPixbufLib}gdkpixbuf,{$EndIf} gtk, gdk,
|
||||
glib, SysUtils, LMessages, Classes, Controls, Forms, VclGlobals,
|
||||
InterfaceBase,
|
||||
{$IFDEF gtk2}
|
||||
glib2, gdk2pixbuf, gdk2, gtk2,
|
||||
{$ELSE}
|
||||
glib, gdk, gtk, {$Ifndef NoGdkPixbufLib}gdkpixbuf,{$EndIf}
|
||||
{$ENDIF}
|
||||
LMessages, Controls, Forms, VclGlobals,
|
||||
LCLLinux, LCLType, gtkDef, DynHashArray, LazQueue, GraphType,
|
||||
GraphMath, Graphics, Buttons, Menus, GTKWinApiWindow, StdCtrls, ComCtrls,
|
||||
CListBox, KeyMap, Calendar, Arrow, Spin, CommCtrl, ExtCtrls, Dialogs,
|
||||
|
@ -35,7 +35,12 @@ unit GTKWinapiWindow;
|
||||
interface
|
||||
|
||||
uses
|
||||
glib, gdk, gtk;
|
||||
{$IFDEF gtk2}
|
||||
glib2, gdk2pixbuf, gdk2, gtk2,
|
||||
{$ELSE}
|
||||
glib, gdk, gtk, {$Ifndef NoGdkPixbufLib}gdkpixbuf,{$EndIf}
|
||||
{$ENDIF}
|
||||
SysUtils;
|
||||
|
||||
type
|
||||
PGTKAPIWidget = ^TGTKAPIWidget;
|
||||
@ -64,9 +69,6 @@ procedure GTKAPIWidget_SetCaretRespondToFocus(APIWidget: PGTKAPIWidget;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
sysutils;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// gtk_winapiwindow_internal
|
||||
//---------------------------------------------------------------------------
|
||||
@ -732,6 +734,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.38 2002/12/15 11:52:28 mattias
|
||||
started gtk2 interface
|
||||
|
||||
Revision 1.37 2002/02/09 02:13:38 mattias
|
||||
undid the TWinControls can now contain childs in gtk, due to slowness
|
||||
|
||||
|
@ -14,10 +14,13 @@
|
||||
}
|
||||
unit KeyMap;
|
||||
|
||||
{$mode objfpc}
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
LCLType, {$IFDEF gtk2}gdk2{$ELSE}gdk{$ENDIF};
|
||||
|
||||
function VK2GDK(const Key : word) : word;
|
||||
function GDK2VK(const Key : word) : word;
|
||||
|
||||
@ -25,13 +28,9 @@ function GDK2VK(const Key : word) : word;
|
||||
implementation
|
||||
|
||||
|
||||
uses LCLType, gdk;
|
||||
|
||||
function VK2GDK(const Key : word) : word;
|
||||
begin
|
||||
|
||||
{ Can someone come up with a better method ? Boy, I love Python ... }
|
||||
case Key of
|
||||
case Key of
|
||||
VK_UNKNOWN: Result:= 0;
|
||||
VK_LBUTTON: Result:= 1;
|
||||
VK_RBUTTON: Result:= 2;
|
||||
|
1521
lcl/interfaces/gtk2/Makefile
Normal file
1521
lcl/interfaces/gtk2/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
35
lcl/interfaces/gtk2/Makefile.fpc
Normal file
35
lcl/interfaces/gtk2/Makefile.fpc
Normal file
@ -0,0 +1,35 @@
|
||||
# $Id$
|
||||
#
|
||||
# Makefile.fpc for Lazarus for Free Pascal
|
||||
#
|
||||
|
||||
[package]
|
||||
main=lazarus/lcl
|
||||
version=0.8a
|
||||
|
||||
[require]
|
||||
packages=rtl fcl gtk
|
||||
|
||||
[target]
|
||||
units=interfaces
|
||||
implicitunits=gtk2int
|
||||
|
||||
[compiler]
|
||||
options=-gl -dgtk2
|
||||
unitdir=../../units ../gtk .
|
||||
unittargetdir=../../units/gtk2
|
||||
|
||||
[clean]
|
||||
files=$(wildcard ../../units/gtk2/*$(OEXT)) \
|
||||
$(wildcard ../../units/gtk2/*$(PPUEXT)) \
|
||||
$(wildcard ../../units/gtk2/*$(RSTEXT)) \
|
||||
$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
|
||||
|
||||
|
||||
[rules]
|
||||
.PHONY: cleartarget all
|
||||
|
||||
cleartarget:
|
||||
-$(DEL) ../../units/gtk2/interfaces$(PPUEXT) ../../units/interfaces$(PPUEXT)
|
||||
|
||||
all: cleartarget interfaces$(PPUEXT)
|
104
lcl/interfaces/gtk2/gtk2int.pas
Normal file
104
lcl/interfaces/gtk2/gtk2int.pas
Normal file
@ -0,0 +1,104 @@
|
||||
{
|
||||
/***************************************************************************
|
||||
gtk2int.pas - GTK2 Interface Object
|
||||
-------------------------------------
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
*****************************************************************************
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
* *
|
||||
* See the file COPYING.LCL, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* *
|
||||
*****************************************************************************
|
||||
}
|
||||
|
||||
unit Gtk2Int;
|
||||
|
||||
{$mode objfpc}
|
||||
{$LONGSTRINGS ON}
|
||||
|
||||
interface
|
||||
|
||||
{$ifdef Trace}
|
||||
{$ASSERTIONS ON}
|
||||
{$endif}
|
||||
|
||||
uses
|
||||
Classes, SysUtils, InterfaceBase, gdk2pixbuf, gtk2, gdk2, glib2, LMessages,
|
||||
Controls, Forms, VclGlobals, LCLLinux, LCLType, gtkDef, DynHashArray,
|
||||
LazQueue, GraphType, GraphMath, gtkInt;
|
||||
|
||||
type
|
||||
TGtk2Object = class(TGtkObject)
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Graphics, Buttons, Menus, GTKWinApiWindow, StdCtrls, ComCtrls, CListBox,
|
||||
KeyMap, Calendar, Arrow, Spin, CommCtrl, ExtCtrls, Dialogs, FileCtrl,
|
||||
LResources, Math, gtkglobals, gtkproc, LCLStrConsts;
|
||||
|
||||
|
||||
end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.1 2002/12/15 11:52:28 mattias
|
||||
started gtk2 interface
|
||||
|
||||
Revision 1.15 2002/02/09 01:48:23 mattias
|
||||
renamed TinterfaceObject.Init to AppInit and TWinControls can now contain childs in gtk
|
||||
|
||||
Revision 1.14 2002/11/03 22:40:00 lazarus
|
||||
MG: fixed ControlAtPos
|
||||
|
||||
Revision 1.13 2002/10/30 18:45:52 lazarus
|
||||
AJ: fixed compiling & removed '_' from custom stock items
|
||||
|
||||
Revision 1.12 2002/10/26 15:15:50 lazarus
|
||||
MG: broke LCL<->interface circles
|
||||
|
||||
Revision 1.11 2002/10/25 15:27:02 lazarus
|
||||
AJ: Moved form contents creation to gtkproc for code
|
||||
reuse between GNOME and GTK, and to make GNOME MDI
|
||||
programming easier later on.
|
||||
|
||||
Revision 1.10 2002/10/24 22:10:39 lazarus
|
||||
AJ: More changes for better code reuse between gnome & gtk interfaces
|
||||
|
||||
Revision 1.9 2002/10/23 20:47:27 lazarus
|
||||
AJ: Started Form Scrolling
|
||||
Started StaticText FocusControl
|
||||
Fixed Misc Dialog Problems
|
||||
Added TApplication.Title
|
||||
|
||||
Revision 1.8 2002/10/21 13:15:24 lazarus
|
||||
AJ:Try and fall back on default style if nil(aka default theme)
|
||||
|
||||
Revision 1.7 2002/10/21 03:23:34 lazarus
|
||||
AJ: rearranged GTK init stuff for proper GNOME init & less duplication between interfaces
|
||||
|
||||
Revision 1.6 2002/10/15 22:28:04 lazarus
|
||||
AJ: added forcelinebreaks
|
||||
|
||||
Revision 1.5 2002/10/14 14:29:50 lazarus
|
||||
AJ: Improvements to TUpDown; Added TStaticText & GNOME DrawText
|
||||
|
||||
Revision 1.4 2002/10/12 16:36:40 lazarus
|
||||
AJ: added new QueryUser/NotifyUser
|
||||
|
||||
Revision 1.3 2002/10/10 13:29:08 lazarus
|
||||
AJ: added LoadStockPixmap routine & minor fixes to/for GNOMEInt
|
||||
|
||||
|
||||
}
|
44
lcl/interfaces/gtk2/interfaces.pas
Normal file
44
lcl/interfaces/gtk2/interfaces.pas
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
/***************************************************************************
|
||||
Interfaces.pp - determines what interface to use
|
||||
--------------------------------------------------
|
||||
|
||||
Initial Revision : Thu July 1st CST 1999
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
*****************************************************************************
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
* *
|
||||
* See the file COPYING.LCL, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* *
|
||||
*****************************************************************************
|
||||
}
|
||||
unit Interfaces;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
InterfaceBase;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Gtk2Int, Forms;
|
||||
|
||||
initialization
|
||||
InterfaceObject := TGtk2Object.Create;
|
||||
|
||||
finalization
|
||||
FreeInterfaceObject;
|
||||
|
||||
end.
|
1
lcl/units/gtk2/CONTENT.TXT
Normal file
1
lcl/units/gtk2/CONTENT.TXT
Normal file
@ -0,0 +1 @@
|
||||
the GTK2 interface units
|
Loading…
Reference in New Issue
Block a user