diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2010-02-22 23:33:52 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2010-02-22 23:33:52 +0200 |
commit | fd822dd120bd3eec1c54f2dbb00d24c1a92f732b (patch) | |
tree | 3bf9cb4de53b52b57df66134da33b20e8bef4f47 | |
parent | 1c95748b10367b2e02a99bfcc6d6397dea5bb673 (diff) | |
download | fpGUI-fd822dd120bd3eec1c54f2dbb00d24c1a92f732b.tar.xz |
Removed IFDEf's in fpg_main by using fpg_interface unit
* Introduced a new unit fpg_interface.pas which defines
alias types. This binds the backend classes with fpg_main
without the need for IFDEF's.
* Rename all classes in fpg_x11 and fpg_gdi with platform
specific class names.
-rw-r--r-- | src/corelib/fpg_main.pas | 17 | ||||
-rw-r--r-- | src/corelib/gdi/fpg_gdi.pas | 255 | ||||
-rw-r--r-- | src/corelib/gdi/fpg_interface.pas | 40 | ||||
-rw-r--r-- | src/corelib/gdi/fpgui_toolkit.lpk | 6 | ||||
-rw-r--r-- | src/corelib/gdi/fpgui_toolkit.pas | 2 | ||||
-rw-r--r-- | src/corelib/x11/fpg_interface.pas | 40 | ||||
-rw-r--r-- | src/corelib/x11/fpg_x11.pas | 248 | ||||
-rw-r--r-- | src/corelib/x11/fpgui_toolkit.lpk | 6 | ||||
-rw-r--r-- | src/corelib/x11/fpgui_toolkit.pas | 22 |
9 files changed, 356 insertions, 280 deletions
diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas index 1bb68e22..da5b77d9 100644 --- a/src/corelib/fpg_main.pas +++ b/src/corelib/fpg_main.pas @@ -1,7 +1,7 @@ { fpGUI - Free Pascal GUI Library - Copyright (C) 2006 - 2009 See the file AUTHORS.txt, included in this + Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, @@ -21,7 +21,6 @@ unit fpg_main; {.$Define DEBUG} -{ TODO : Remove IFDEF in Interface uses clause } { TODO : Implement font size adjustments for each platform. eg: linux=10pt & windows=8pt } interface @@ -29,16 +28,8 @@ interface uses Classes, SysUtils, - fpg_base - // This is the only place we have such IFDEF!!! Is this ok, or must we - // implement it like we have done for the previous version of fpGFX? - {$IFDEF MSWINDOWS} - ,fpg_gdi - {$ENDIF} - {$IFDEF UNIX} - ,fpg_x11 - {$ENDIF} - ; + fpg_base, + fpg_interface; type TOrientation = (orVertical, orHorizontal); @@ -321,10 +312,12 @@ type TfpgClipboard = class(TfpgClipboardImpl) end; + TfpgFileList = class(TfpgFileListImpl) end; + var fpgStyle: TfpgStyle; { TODO -ograemeg : move this into fpgApplication } fpgCaret: TfpgCaret; { TODO -ograemeg : move this into fpgApplication } diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas index e9ef18e6..08676a77 100644 --- a/src/corelib/gdi/fpg_gdi.pas +++ b/src/corelib/gdi/fpg_gdi.pas @@ -1,7 +1,7 @@ { fpGUI - Free Pascal GUI Library - Copyright (C) 2006 - 2009 See the file AUTHORS.txt, included in this + Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, @@ -44,12 +44,11 @@ var FontSmoothingType: Cardinal; type - // forward declaration - TfpgWindowImpl = class; + TfpgGDIWindow = class; - TfpgFontResourceImpl = class(TfpgFontResourceBase) + TfpgGDIFontResource = class(TfpgFontResourceBase) private FFontData: HFONT; FMetrics: Windows.TEXTMETRIC; @@ -67,11 +66,7 @@ type end; - TfpgFontImpl = class(TfpgFontBase) - end; - - - TfpgImageImpl = class(TfpgImageBase) + TfpgGDIImage = class(TfpgImageBase) private FBMPHandle: HBITMAP; FMaskHandle: HBITMAP; @@ -87,18 +82,16 @@ type end; - { TfpgCanvasImpl } - - TfpgCanvasImpl = class(TfpgCanvasBase) + TfpgGDICanvas = class(TfpgCanvasBase) private FDrawing: boolean; FBufferBitmap: HBitmap; - FDrawWindow: TfpgWindowImpl; + FDrawWindow: TfpgGDIWindow; Fgc: TfpgDCHandle; FBufgc: TfpgDCHandle; FWinGC: TfpgDCHandle; FBackgroundColor: TfpgColor; - FCurFontRes: TfpgFontResourceImpl; + FCurFontRes: TfpgGDIFontResource; FClipRect: TfpgRect; FClipRectSet: Boolean; FWindowsColor: longword; @@ -141,18 +134,18 @@ type end; - TfpgWindowImpl = class(TfpgWindowBase) + TfpgGDIWindow = class(TfpgWindowBase) private FMouseInWindow: boolean; FNonFullscreenRect: TfpgRect; FNonFullscreenStyle: longword; FFullscreenIsSet: boolean; FSkipResizeMessage: boolean; - function DoMouseEnterLeaveCheck(AWindow: TfpgWindowImpl; uMsg, wParam, lParam: Cardinal): Boolean; + function DoMouseEnterLeaveCheck(AWindow: TfpgGDIWindow; uMsg, wParam, lParam: Cardinal): Boolean; procedure WindowSetFullscreen(aFullScreen, aUpdate: boolean); protected FWinHandle: TfpgWinHandle; - FModalForWin: TfpgWindowImpl; + FModalForWin: TfpgGDIWindow; FWinStyle: longword; FWinStyleEx: longword; FParentWinHandle: TfpgWinHandle; @@ -177,7 +170,7 @@ type end; - TfpgApplicationImpl = class(TfpgApplicationBase) + TfpgGDIApplication = class(TfpgApplicationBase) protected FDisplay: HDC; WindowClass: TWndClass; @@ -220,7 +213,7 @@ type end; - TfpgClipboardImpl = class(TfpgClipboardBase) + TfpgGDIClipboard = class(TfpgClipboardBase) protected FClipboardText: TfpgString; function DoGetText: TfpgString; override; @@ -229,7 +222,7 @@ type end; - TfpgFileListImpl = class(TfpgFileListBase) + TfpgGDIFileList = class(TfpgFileListBase) function EncodeAttributesString(attrs: longword): TFileModeString; constructor Create; override; function InitializeEntry(sr: TSearchRec): TFileEntry; override; @@ -455,10 +448,10 @@ begin begin // write('Hooked HCBT_ACTIVATE at '+IntToStr(wParam)+': '); if (wapplication.TopModalForm <> nil) and - (wParam <> TfpgWindowImpl(wapplication.TopModalForm).FWinHandle) then + (wParam <> TfpgGDIWindow(wapplication.TopModalForm).FWinHandle) then begin // writeln('stopped'); - SetActiveWindow(TfpgWindowImpl(wapplication.TopModalForm).FWinHandle); + SetActiveWindow(TfpgGDIWindow(wapplication.TopModalForm).FWinHandle); Result := 1; end else begin @@ -471,10 +464,10 @@ end; function fpgWindowProc(hwnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall; var - w: TfpgWindowImpl; - pw: TfpgWindowImpl; + w: TfpgGDIWindow; + pw: TfpgGDIWindow; kwg: TfpgWidget; - mw: TfpgWindowImpl; + mw: TfpgGDIWindow; kcode: integer; i: integer; sstate: integer; @@ -526,7 +519,7 @@ var begin if uMsg = WM_CREATE then begin - w := TfpgWindowImpl(PCreateStruct(lParam)^.lpCreateParams); + w := TfpgGDIWindow(PCreateStruct(lParam)^.lpCreateParams); w.FWinHandle := hwnd; // this is very important, because number of messages sent // before the createwindow returns the window handle Windows.SetWindowLong(hwnd, GWL_USERDATA, longword(w)); @@ -564,10 +557,10 @@ begin Exit; //==> end; - w := TfpgWindowImpl(Windows.GetWindowLong(hwnd, GWL_USERDATA)); + w := TfpgGDIWindow(Windows.GetWindowLong(hwnd, GWL_USERDATA)); Result := 0; - if not (w is TfpgWindowImpl) then + if not (w is TfpgGDIWindow) then begin {$IFDEF DEBUG} writeln('fpGFX/GDI: Unable to detect Window - using DefWindowProc'); {$ENDIF} Result := Windows.DefWindowProc(hwnd, uMsg, wParam, lParam); @@ -694,7 +687,7 @@ begin mw := GetMyWidgetFromHandle(h); pw := mw; while (pw <> nil) and (pw.Parent <> nil) do - pw := TfpgWindowImpl(pw.Parent); + pw := TfpgGDIWindow(pw.Parent); if ((pw = nil) or (PopupListFind(pw.WinHandle) = nil)) and (not PopupDontCloseWidget(TfpgWidget(mw))) and @@ -708,7 +701,7 @@ begin if (wapplication.TopModalForm <> nil) then begin mw := nil; - mw := TfpgWindowImpl(WidgetParentForm(TfpgWidget(w))); + mw := TfpgGDIWindow(WidgetParentForm(TfpgWidget(w))); if (mw <> nil) and (wapplication.TopModalForm <> mw) then blockmsg := True; end; @@ -854,9 +847,9 @@ begin mw := nil; h := WindowFromPoint(pt); if h > 0 then // get window mouse is hovering over - mw := TfpgWindowImpl(Windows.GetWindowLong(h, GWL_USERDATA)); + mw := TfpgGDIWindow(Windows.GetWindowLong(h, GWL_USERDATA)); - if (mw is TfpgWindowImpl) then + if (mw is TfpgGDIWindow) then begin msgp.mouse.x := pt.x; msgp.mouse.y := pt.y; @@ -962,7 +955,7 @@ begin end; end; -{ TfpgApplicationImpl } +{ TfpgGDIApplication } // helper function for DoGetFontFaceList function MyFontEnumerator(var LogFont: ENUMLOGFONTEX; var TextMetric: NEWTEXTMETRICEX; @@ -978,7 +971,7 @@ begin Result := 1; end; -function TfpgApplicationImpl.DoGetFontFaceList: TStringList; +function TfpgGDIApplication.DoGetFontFaceList: TStringList; var LFont: TLogFont; begin @@ -989,7 +982,7 @@ begin Result.Sort; end; -function TfpgApplicationImpl.GetHiddenWindow: HWND; +function TfpgGDIApplication.GetHiddenWindow: HWND; begin if (FHiddenWindow = 0) then begin @@ -1006,12 +999,12 @@ begin Windows.RegisterClass(@HiddenWndClass); FHiddenWindow := CreateWindow('FPGHIDDEN', '', - DWORD(WS_POPUP), 0, 0, 0, 0, TfpgWindowImpl(MainForm).FWinHandle, 0, MainInstance, nil); + DWORD(WS_POPUP), 0, 0, 0, 0, TfpgGDIWindow(MainForm).FWinHandle, 0, MainInstance, nil); end; Result := FHiddenWindow; end; -constructor TfpgApplicationImpl.Create(const AParams: string); +constructor TfpgGDIApplication.Create(const AParams: string); begin inherited Create(AParams); FIsInitialized := False; @@ -1064,20 +1057,20 @@ begin wapplication := TfpgApplication(self); end; -destructor TfpgApplicationImpl.Destroy; +destructor TfpgGDIApplication.Destroy; begin UnhookWindowsHookEx(ActivationHook); inherited Destroy; end; -function TfpgApplicationImpl.DoMessagesPending: boolean; +function TfpgGDIApplication.DoMessagesPending: boolean; var Msg: TMsg; begin Result := Windows.PeekMessageW(@Msg, 0, 0, 0, PM_NOREMOVE); end; -procedure TfpgApplicationImpl.DoWaitWindowMessage(atimeoutms: integer); +procedure TfpgGDIApplication.DoWaitWindowMessage(atimeoutms: integer); var Msg: TMsg; timerid: longword; @@ -1086,7 +1079,7 @@ var begin timerid := 0; if Assigned(wapplication.MainForm) then - ltimerWnd := TfpgWindowImpl(wapplication.MainForm).WinHandle + ltimerWnd := TfpgGDIWindow(wapplication.MainForm).WinHandle else ltimerWnd := 0; @@ -1110,12 +1103,12 @@ begin Windows.KillTimer(ltimerWnd, 1); // same IDEvent as used in SetTimer end; -procedure TfpgApplicationImpl.DoFlush; +procedure TfpgGDIApplication.DoFlush; begin GdiFlush; end; -function TfpgApplicationImpl.GetScreenWidth: TfpgCoord; +function TfpgGDIApplication.GetScreenWidth: TfpgCoord; var r: TRECT; begin @@ -1124,7 +1117,7 @@ begin // Result := Windows.GetSystemMetrics(SM_CXSCREEN); end; -function TfpgApplicationImpl.GetScreenHeight: TfpgCoord; +function TfpgGDIApplication.GetScreenHeight: TfpgCoord; var r: TRECT; begin @@ -1133,35 +1126,35 @@ begin // Result := Windows.GetSystemMetrics(SM_CYSCREEN); end; -function TfpgApplicationImpl.Screen_dpi_x: integer; +function TfpgGDIApplication.Screen_dpi_x: integer; begin Result := GetDeviceCaps(wapplication.display, LOGPIXELSX) end; -function TfpgApplicationImpl.Screen_dpi_y: integer; +function TfpgGDIApplication.Screen_dpi_y: integer; begin Result := GetDeviceCaps(wapplication.display, LOGPIXELSY) end; -function TfpgApplicationImpl.Screen_dpi: integer; +function TfpgGDIApplication.Screen_dpi: integer; begin Result := Screen_dpi_y; end; -{ TfpgWindowImpl } +{ TfpgGDIWindow } var // this are required for Windows MouseEnter & MouseExit detection. uLastWindowHndl: TfpgWinHandle; -function TfpgWindowImpl.DoMouseEnterLeaveCheck(AWindow: TfpgWindowImpl; uMsg, wParam, lParam: Cardinal): Boolean; +function TfpgGDIWindow.DoMouseEnterLeaveCheck(AWindow: TfpgGDIWindow; uMsg, wParam, lParam: Cardinal): Boolean; var pt, spt: Windows.POINT; msgp: TfpgMessageParams; CursorInDifferentWindow: boolean; CurrentWindowHndl: TfpgWinHandle; MouseCaptureWHndl: TfpgWinHandle; - LastWindow: TfpgWindowImpl; - CurrentWindow: TfpgWindowImpl; + LastWindow: TfpgGDIWindow; + CurrentWindow: TfpgGDIWindow; begin // vvzh: this method currently cannot receive mouse events when mouse pointer // is outside of the application window. We could try to play with @@ -1211,7 +1204,7 @@ begin uLastWindowHndl := CurrentWindowHndl; end; -procedure TfpgWindowImpl.WindowSetFullscreen(aFullScreen, aUpdate: boolean); +procedure TfpgGDIWindow.WindowSetFullscreen(aFullScreen, aUpdate: boolean); begin if aFullScreen = FFullscreenIsSet then Exit; //==> @@ -1221,7 +1214,7 @@ begin FNonFullscreenStyle := FWinStyle; FNonFullscreenRect.SetRect(Left, Top, Width, Height); // vvzh: the following lines are the workaround for bug. When calling - // WindowSetFullscreen from TfpgWindowImpl.DoAllocateWindowHandle, + // WindowSetFullscreen from TfpgGDIWindow.DoAllocateWindowHandle, // Left and Top are equal to -2147483648. As the result, if // we set FullScreen := True at the form creation time and then // call SetFullScreen(False) the form disappears, because it is moved @@ -1270,7 +1263,7 @@ begin FFullscreenIsSet := aFullScreen; end; -procedure TfpgWindowImpl.DoAllocateWindowHandle(AParent: TfpgWindowBase); +procedure TfpgGDIWindow.DoAllocateWindowHandle(AParent: TfpgWindowBase); var wcname: string; wname: string; @@ -1290,7 +1283,7 @@ begin wcname := 'FPGWIN'; if aparent <> nil then - FParentWinHandle := TfpgWindowImpl(AParent).WinHandle + FParentWinHandle := TfpgGDIWindow(AParent).WinHandle else FParentWinHandle := 0; @@ -1389,7 +1382,7 @@ begin FSkipResizeMessage := False; end; -procedure TfpgWindowImpl.DoReleaseWindowHandle; +procedure TfpgGDIWindow.DoReleaseWindowHandle; begin if FWinHandle <= 0 then Exit; @@ -1397,12 +1390,12 @@ begin FWinHandle := 0; end; -procedure TfpgWindowImpl.DoRemoveWindowLookup; +procedure TfpgGDIWindow.DoRemoveWindowLookup; begin // Nothing to do here end; -procedure TfpgWindowImpl.DoSetWindowVisible(const AValue: Boolean); +procedure TfpgGDIWindow.DoSetWindowVisible(const AValue: Boolean); var r: TRect; begin @@ -1431,7 +1424,7 @@ begin Windows.ShowWindow(FWinHandle, SW_HIDE); end; -procedure TfpgWindowImpl.DoMoveWindow(const x: TfpgCoord; const y: TfpgCoord); +procedure TfpgGDIWindow.DoMoveWindow(const x: TfpgCoord; const y: TfpgCoord); begin if HandleIsValid then Windows.SetWindowPos( @@ -1440,18 +1433,18 @@ begin SWP_NOZORDER or SWP_NOSIZE);// or SWP_NOREDRAW); end; -function TfpgWindowImpl.DoWindowToScreen(ASource: TfpgWindowBase; const AScreenPos: TPoint): TPoint; +function TfpgGDIWindow.DoWindowToScreen(ASource: TfpgWindowBase; const AScreenPos: TPoint): TPoint; begin - if not TfpgWindowImpl(ASource).HandleIsValid then + if not TfpgGDIWindow(ASource).HandleIsValid then Exit; //==> Result.X := AScreenPos.X; Result.Y := AScreenPos.Y; - ClientToScreen(TfpgWindowImpl(ASource).WinHandle, Result); + ClientToScreen(TfpgGDIWindow(ASource).WinHandle, Result); end; { -procedure TfpgWindowImpl.MoveToScreenCenter; +procedure TfpgGDIWindow.MoveToScreenCenter; var r : TRECT; begin @@ -1462,7 +1455,7 @@ begin end; } -procedure TfpgWindowImpl.DoSetWindowTitle(const atitle: string); +procedure TfpgGDIWindow.DoSetWindowTitle(const atitle: string); begin if UnicodeEnabledOS then Windows.SetWindowTextW(WinHandle, PWideChar(Utf8Decode(ATitle))) @@ -1470,7 +1463,7 @@ begin Windows.SetWindowText(WinHandle, PChar(Utf8ToAnsi(ATitle))); end; -procedure TfpgWindowImpl.DoSetMouseCursor; +procedure TfpgGDIWindow.DoSetMouseCursor; var hc: HCURSOR; begin @@ -1498,24 +1491,24 @@ begin SetCursor(hc); end; -constructor TfpgWindowImpl.Create(AOwner: TComponent); +constructor TfpgGDIWindow.Create(AOwner: TComponent); begin inherited Create(AOwner); FWinHandle := 0; FFullscreenIsSet := false; end; -procedure TfpgWindowImpl.ActivateWindow; +procedure TfpgGDIWindow.ActivateWindow; begin SetForegroundWindow(FWinHandle); end; -procedure TfpgWindowImpl.CaptureMouse; +procedure TfpgGDIWindow.CaptureMouse; begin Windows.SetCapture(FWinHandle); end; -procedure TfpgWindowImpl.ReleaseMouse; +procedure TfpgGDIWindow.ReleaseMouse; begin Windows.ReleaseCapture; // if PopupListFirst <> nil then @@ -1523,18 +1516,18 @@ begin // if GfxFirstPopup <> nil then SetCapture(GfxFirstPopup^.wg.WinHandle); end; -procedure TfpgWindowImpl.SetFullscreen(AValue: Boolean); +procedure TfpgGDIWindow.SetFullscreen(AValue: Boolean); begin inherited SetFullscreen(AValue); WindowSetFullscreen(AValue, True); end; -function TfpgWindowImpl.HandleIsValid: boolean; +function TfpgGDIWindow.HandleIsValid: boolean; begin Result := FWinHandle > 0; end; -procedure TfpgWindowImpl.DoUpdateWindowPosition; +procedure TfpgGDIWindow.DoUpdateWindowPosition; var bx, by: integer; begin @@ -1548,9 +1541,9 @@ begin FSkipResizeMessage := False; end; -{ TfpgCanvasImpl } +{ TfpgGDICanvas } -constructor TfpgCanvasImpl.Create; +constructor TfpgGDICanvas.Create; begin inherited; FDrawing := False; @@ -1558,7 +1551,7 @@ begin FBufferBitmap := 0; end; -destructor TfpgCanvasImpl.Destroy; +destructor TfpgGDICanvas.Destroy; begin if FDrawing then DoEndDraw; @@ -1566,7 +1559,7 @@ begin inherited; end; -procedure TfpgCanvasImpl.DoBeginDraw(awin: TfpgWindowBase; buffered: boolean); +procedure TfpgGDICanvas.DoBeginDraw(awin: TfpgWindowBase; buffered: boolean); var ARect: TfpgRect; bmsize: Windows.TSIZE; @@ -1575,7 +1568,7 @@ begin begin // check if the dimensions are ok GetBitmapDimensionEx(FBufferBitmap, bmsize); - FDrawWindow := TfpgWindowImpl(awin); + FDrawWindow := TfpgGDIWindow(awin); DoGetWinRect(ARect); if (bmsize.cx <> (ARect.Right-ARect.Left+1)) or (bmsize.cy <> (ARect.Bottom-ARect.Top+1)) then @@ -1584,7 +1577,7 @@ begin if not FDrawing then begin - FDrawWindow := TfpgWindowImpl(awin); + FDrawWindow := TfpgGDIWindow(awin); FWinGC := Windows.GetDC(FDrawWindow.FWinHandle); if buffered then @@ -1623,7 +1616,7 @@ begin FDrawing := True; end; -procedure TfpgCanvasImpl.DoEndDraw; +procedure TfpgGDICanvas.DoEndDraw; begin if FDrawing then begin @@ -1640,22 +1633,22 @@ begin end; end; -function TfpgCanvasImpl.GetPixel(X, Y: integer): TfpgColor; +function TfpgGDICanvas.GetPixel(X, Y: integer): TfpgColor; var c: longword; begin c := Windows.GetPixel(Fgc, X, Y); if c = CLR_INVALID then - Writeln('fpGFX/GDI: TfpgCanvasImpl.GetPixel returned an invalid color'); + Writeln('fpGFX/GDI: TfpgGDICanvas.GetPixel returned an invalid color'); Result := WinColorTofpgColor(c); end; -procedure TfpgCanvasImpl.SetPixel(X, Y: integer; const AValue: TfpgColor); +procedure TfpgGDICanvas.SetPixel(X, Y: integer; const AValue: TfpgColor); begin Windows.SetPixel(Fgc, X, Y, fpgColorToWin(AValue)); end; -procedure TfpgCanvasImpl.DoDrawArc(x, y, w, h: TfpgCoord; a1, a2: Extended); +procedure TfpgGDICanvas.DoDrawArc(x, y, w, h: TfpgCoord; a1, a2: Extended); var SX, SY, EX, EY: Longint; begin @@ -1673,7 +1666,7 @@ begin {$ENDIF} end; -procedure TfpgCanvasImpl.DoFillArc(x, y, w, h: TfpgCoord; a1, a2: Extended); +procedure TfpgGDICanvas.DoFillArc(x, y, w, h: TfpgCoord; a1, a2: Extended); var SX, SY, EX, EY: Longint; begin @@ -1691,20 +1684,20 @@ begin {$ENDIF} end; -procedure TfpgCanvasImpl.DoDrawPolygon(Points: PPoint; NumPts: Integer; Winding: boolean); +procedure TfpgGDICanvas.DoDrawPolygon(Points: PPoint; NumPts: Integer; Winding: boolean); //var // pts: array of TPoint; begin Windows.Polygon(Fgc, Points, NumPts); end; -procedure TfpgCanvasImpl.DoPutBufferToScreen(x, y, w, h: TfpgCoord); +procedure TfpgGDICanvas.DoPutBufferToScreen(x, y, w, h: TfpgCoord); begin if FBufferBitmap > 0 then BitBlt(FWinGC, x, y, w, h, Fgc, x, y, SRCCOPY); end; -procedure TfpgCanvasImpl.DoAddClipRect(const ARect: TfpgRect); +procedure TfpgGDICanvas.DoAddClipRect(const ARect: TfpgRect); var rg: HRGN; begin @@ -1716,19 +1709,19 @@ begin DeleteObject(rg); end; -procedure TfpgCanvasImpl.DoClearClipRect; +procedure TfpgGDICanvas.DoClearClipRect; begin SelectClipRgn(Fgc, 0); FClipRectSet := False; end; -procedure TfpgCanvasImpl.DoDrawLine(x1, y1, x2, y2: TfpgCoord); +procedure TfpgGDICanvas.DoDrawLine(x1, y1, x2, y2: TfpgCoord); begin Windows.MoveToEx(Fgc, x1, y1, nil); Windows.LineTo(Fgc, x2, y2); end; -procedure TfpgCanvasImpl.DoDrawRectangle(x, y, w, h: TfpgCoord); +procedure TfpgGDICanvas.DoDrawRectangle(x, y, w, h: TfpgCoord); var wr: Windows.TRect; r: TfpgRect; @@ -1751,7 +1744,7 @@ begin end; end; -procedure TfpgCanvasImpl.DoDrawString(x, y: TfpgCoord; const txt: string); +procedure TfpgGDICanvas.DoDrawString(x, y: TfpgCoord; const txt: string); var WideText: widestring; begin @@ -1766,7 +1759,7 @@ begin {$endif} end; -procedure TfpgCanvasImpl.DoFillRectangle(x, y, w, h: TfpgCoord); +procedure TfpgGDICanvas.DoFillRectangle(x, y, w, h: TfpgCoord); var wr: Windows.TRect; begin @@ -1777,7 +1770,7 @@ begin Windows.FillRect(Fgc, wr, FBrush); end; -procedure TfpgCanvasImpl.DoFillTriangle(x1, y1, x2, y2, x3, y3: TfpgCoord); +procedure TfpgGDICanvas.DoFillTriangle(x1, y1, x2, y2, x3, y3: TfpgCoord); var pts: array[1..3] of Windows.TPoint; begin @@ -1790,12 +1783,12 @@ begin Windows.Polygon(Fgc, pts, 3); end; -function TfpgCanvasImpl.DoGetClipRect: TfpgRect; +function TfpgGDICanvas.DoGetClipRect: TfpgRect; begin Result := FClipRect; end; -procedure TfpgCanvasImpl.DoGetWinRect(out r: TfpgRect); +procedure TfpgGDICanvas.DoGetWinRect(out r: TfpgRect); var wr: TRect; begin @@ -1806,7 +1799,7 @@ begin r.Height := wr.Bottom - wr.Top + 1; end; -procedure TfpgCanvasImpl.DoSetClipRect(const ARect: TfpgRect); +procedure TfpgGDICanvas.DoSetClipRect(const ARect: TfpgRect); begin FClipRectSet := True; FClipRect := ARect; @@ -1815,7 +1808,7 @@ begin SelectClipRgn(Fgc, FClipRegion); end; -procedure TfpgCanvasImpl.DoSetColor(cl: TfpgColor); +procedure TfpgGDICanvas.DoSetColor(cl: TfpgColor); begin DeleteObject(FBrush); FWindowsColor := fpgColorToWin(cl); @@ -1824,7 +1817,7 @@ begin SelectObject(Fgc, FBrush); end; -procedure TfpgCanvasImpl.DoSetLineStyle(awidth: integer; astyle: TfpgLineStyle); +procedure TfpgGDICanvas.DoSetLineStyle(awidth: integer; astyle: TfpgLineStyle); const cDot: array[1..2] of DWORD = (1, 1); cDash: array[1..4] of DWORD = (4, 2, 4, 2); @@ -1858,12 +1851,12 @@ begin SelectObject(Fgc, FPen); end; -procedure TfpgCanvasImpl.DoSetTextColor(cl: TfpgColor); +procedure TfpgGDICanvas.DoSetTextColor(cl: TfpgColor); begin Windows.SetTextColor(Fgc, fpgColorToWin(cl)); end; -procedure TfpgCanvasImpl.TryFreeBackBuffer; +procedure TfpgGDICanvas.TryFreeBackBuffer; begin if FBufferBitmap > 0 then DeleteObject(FBufferBitmap); @@ -1874,15 +1867,15 @@ begin FBufgc := 0; end; -procedure TfpgCanvasImpl.DoSetFontRes(fntres: TfpgFontResourceBase); +procedure TfpgGDICanvas.DoSetFontRes(fntres: TfpgFontResourceBase); begin if fntres = nil then Exit; //==> - FCurFontRes := TfpgFontResourceImpl(fntres); + FCurFontRes := TfpgGDIFontResource(fntres); Windows.SelectObject(Fgc, FCurFontRes.Handle); end; -procedure TfpgCanvasImpl.DoDrawImagePart(x, y: TfpgCoord; img: TfpgImageBase; xi, yi, w, h: integer); +procedure TfpgGDICanvas.DoDrawImagePart(x, y: TfpgCoord; img: TfpgImageBase; xi, yi, w, h: integer); const DSTCOPY = $00AA0029; ROP_DSPDxax = $00E20746; @@ -1894,22 +1887,22 @@ begin Exit; //==> tmpdc := CreateCompatibleDC(wapplication.display); - SelectObject(tmpdc, TfpgImageImpl(img).BMPHandle); + SelectObject(tmpdc, TfpgGDIImage(img).BMPHandle); - if TfpgImageImpl(img).FIsTwoColor then + if TfpgGDIImage(img).FIsTwoColor then rop := PATCOPY else rop := SRCCOPY; - if TfpgImageImpl(img).MaskHandle > 0 then - MaskBlt(Fgc, x, y, w, h, tmpdc, xi, yi, TfpgImageImpl(img).MaskHandle, xi, yi, MakeRop4(rop, DSTCOPY)) + if TfpgGDIImage(img).MaskHandle > 0 then + MaskBlt(Fgc, x, y, w, h, tmpdc, xi, yi, TfpgGDIImage(img).MaskHandle, xi, yi, MakeRop4(rop, DSTCOPY)) else BitBlt(Fgc, x, y, w, h, tmpdc, xi, yi, rop); DeleteDC(tmpdc); end; -procedure TfpgCanvasImpl.DoXORFillRectangle(col: TfpgColor; x, y, w, h: TfpgCoord); +procedure TfpgGDICanvas.DoXORFillRectangle(col: TfpgColor; x, y, w, h: TfpgCoord); var hb: HBRUSH; nullpen: HPEN; @@ -1928,9 +1921,9 @@ begin SelectObject(Fgc, FPen); end; -{ TfpgFontResourceImpl } +{ TfpgGDIFontResource } -constructor TfpgFontResourceImpl.Create(const afontdesc: string); +constructor TfpgGDIFontResource.Create(const afontdesc: string); begin FFontData := OpenFontByDesc(afontdesc); @@ -1941,14 +1934,14 @@ begin end; end; -destructor TfpgFontResourceImpl.Destroy; +destructor TfpgGDIFontResource.Destroy; begin if HandleIsValid then Windows.DeleteObject(FFontData); inherited; end; -function TfpgFontResourceImpl.OpenFontByDesc(const desc: string): HFONT; +function TfpgGDIFontResource.OpenFontByDesc(const desc: string): HFONT; var lf: Windows.LOGFONT; facename: string; @@ -2040,27 +2033,27 @@ begin Result := CreateFontIndirectA(@lf); end; -function TfpgFontResourceImpl.HandleIsValid: boolean; +function TfpgGDIFontResource.HandleIsValid: boolean; begin Result := FFontData <> 0; end; -function TfpgFontResourceImpl.GetAscent: integer; +function TfpgGDIFontResource.GetAscent: integer; begin Result := FMetrics.tmAscent; end; -function TfpgFontResourceImpl.GetDescent: integer; +function TfpgGDIFontResource.GetDescent: integer; begin Result := FMetrics.tmDescent; end; -function TfpgFontResourceImpl.GetHeight: integer; +function TfpgGDIFontResource.GetHeight: integer; begin Result := FMetrics.tmHeight; end; -function TfpgFontResourceImpl.GetTextWidth(const txt: string): integer; +function TfpgGDIFontResource.GetTextWidth(const txt: string): integer; var ts: Windows.SIZE; WideText: widestring; @@ -2082,16 +2075,16 @@ begin Result := ts.cx; end; -{ TfpgImageImpl } +{ TfpgGDIImage } -constructor TfpgImageImpl.Create; +constructor TfpgGDIImage.Create; begin FBMPHandle := 0; FMaskHandle := 0; FIsTwoColor := False; end; -procedure TfpgImageImpl.DoFreeImage; +procedure TfpgGDIImage.DoFreeImage; begin if FBMPHandle > 0 then DeleteObject(FBMPHandle); @@ -2101,7 +2094,7 @@ begin FMaskHandle := 0; end; -procedure TfpgImageImpl.DoInitImage(acolordepth, awidth, aheight: integer; aimgdata: Pointer); +procedure TfpgGDIImage.DoInitImage(acolordepth, awidth, aheight: integer; aimgdata: Pointer); var bi: TBitmapInfo; begin @@ -2141,7 +2134,7 @@ type bmColors: array[1..2] of longword; end; -procedure TfpgImageImpl.DoInitImageMask(awidth, aheight: integer; aimgdata: Pointer); +procedure TfpgGDIImage.DoInitImageMask(awidth, aheight: integer; aimgdata: Pointer); var bi: TMyMonoBitmap; pbi: PBitmapInfo; @@ -2172,9 +2165,9 @@ begin SetDIBits(wapplication.display, FMaskHandle, 0, aheight, aimgdata, pbi^, DIB_RGB_COLORS); end; -{ TfpgClipboardImpl } +{ TfpgGDIClipboard } -function TfpgClipboardImpl.DoGetText: TfpgString; +function TfpgGDIClipboard.DoGetText: TfpgString; var h: THANDLE; p: PChar; @@ -2200,7 +2193,7 @@ begin Result := FClipboardText; end; -procedure TfpgClipboardImpl.DoSetText(const AValue: TfpgString); +procedure TfpgGDIClipboard.DoSetText(const AValue: TfpgString); begin FClipboardText := AValue; if OpenClipboard(FClipboardWndHandle) then @@ -2211,7 +2204,7 @@ begin end; end; -procedure TfpgClipboardImpl.InitClipboard; +procedure TfpgGDIClipboard.InitClipboard; begin {$WARNING This does not work! 'FPGUI' window class was not registered, so CreateWindowEx always returns 0} @@ -2231,9 +2224,9 @@ begin ); end; -{ TfpgFileListImpl } +{ TfpgGDIFileList } -function TfpgFileListImpl.EncodeAttributesString(attrs: longword +function TfpgGDIFileList.EncodeAttributesString(attrs: longword ): TFileModeString; begin Result := ''; @@ -2245,13 +2238,13 @@ begin if (attrs and FILE_ATTRIBUTE_COMPRESSED) <> 0 then Result := Result + 'c'; end; -constructor TfpgFileListImpl.Create; +constructor TfpgGDIFileList.Create; begin inherited Create; FHasFileMode := false; end; -function TfpgFileListImpl.InitializeEntry(sr: TSearchRec): TFileEntry; +function TfpgGDIFileList.InitializeEntry(sr: TSearchRec): TFileEntry; begin Result := inherited InitializeEntry(sr); if Assigned(Result) then @@ -2262,7 +2255,7 @@ begin end; end; -procedure TfpgFileListImpl.PopulateSpecialDirs(const aDirectory: TfpgString); +procedure TfpgGDIFileList.PopulateSpecialDirs(const aDirectory: TfpgString); const MAX_DRIVES = 25; var diff --git a/src/corelib/gdi/fpg_interface.pas b/src/corelib/gdi/fpg_interface.pas new file mode 100644 index 00000000..f37d5cc4 --- /dev/null +++ b/src/corelib/gdi/fpg_interface.pas @@ -0,0 +1,40 @@ +{ + fpGUI - Free Pascal GUI Library + + Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this + distribution, for details of the copyright. + + See the file COPYING.modifiedLGPL, included in this distribution, + for details about redistributing fpGUI. + + 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. + + Description: + This unit defines alias types to bind each backend graphics library + to fpg_main without the need for IFDEF's +} + +unit fpg_interface; + +{$mode objfpc}{$H+} + +interface + +uses + fpg_gdi; + +type + TfpgFontResourceImpl = TfpgGDIFontResource; + TfpgImageImpl = TfpgGDIImage; + TfpgCanvasImpl = TfpgGDICanvas; + TfpgWindowImpl = TfpgGDIWindow; + TfpgApplicationImpl = TfpgGDIApplication; + TfpgClipboardImpl = TfpgGDIClipboard; + TfpgFileListImpl = TfpgGDIFileList; + +implementation + +end. + diff --git a/src/corelib/gdi/fpgui_toolkit.lpk b/src/corelib/gdi/fpgui_toolkit.lpk index 8b661e62..d286d855 100644 --- a/src/corelib/gdi/fpgui_toolkit.lpk +++ b/src/corelib/gdi/fpgui_toolkit.lpk @@ -26,7 +26,7 @@ <License Value="LGPL 2 with static linking exception. "/>
<Version Minor="7"/>
- <Files Count="73">
+ <Files Count="74">
<Item1>
<Filename Value="..\stdimages.inc"/>
<Type Value="Include"/>
@@ -319,6 +319,10 @@ <Filename Value="..\..\gui\fpg_colorwheel.pas"/>
<UnitName Value="fpg_ColorWheel"/>
</Item73>
+ <Item74>
+ <Filename Value="fpg_interface.pas"/>
+ <UnitName Value="fpg_interface"/>
+ </Item74>
</Files>
<LazDoc Paths="..\..\..\docs\xml\corelib\;..\..\..\docs\xml\corelib\x11\;..\..\..\docs\xml\corelib\gdi\;..\..\..\docs\xml\gui\"/>
<RequiredPkgs Count="1">
diff --git a/src/corelib/gdi/fpgui_toolkit.pas b/src/corelib/gdi/fpgui_toolkit.pas index 1d63fc3e..607ac0bc 100644 --- a/src/corelib/gdi/fpgui_toolkit.pas +++ b/src/corelib/gdi/fpgui_toolkit.pas @@ -17,7 +17,7 @@ uses fpg_menu, fpg_mru, fpg_panel, fpg_popupcalendar, fpg_progressbar, fpg_radiobutton, fpg_scrollbar, fpg_style, fpg_tab, fpg_trackbar, fpg_tree, fpgui_db, fpg_gdi, fpg_impl, fpg_splitter, fpg_hint, fpg_spinedit, - fpg_extgraphics, fpg_ColorMapping, fpg_ColorWheel; + fpg_extgraphics, fpg_ColorMapping, fpg_ColorWheel, fpg_interface; implementation diff --git a/src/corelib/x11/fpg_interface.pas b/src/corelib/x11/fpg_interface.pas new file mode 100644 index 00000000..571186b0 --- /dev/null +++ b/src/corelib/x11/fpg_interface.pas @@ -0,0 +1,40 @@ +{ + fpGUI - Free Pascal GUI Library + + Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this + distribution, for details of the copyright. + + See the file COPYING.modifiedLGPL, included in this distribution, + for details about redistributing fpGUI. + + 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. + + Description: + This unit defines alias types to bind each backend graphics library + to fpg_main without the need for IFDEF's +} + +unit fpg_interface; + +{$mode objfpc}{$H+} + +interface + +uses + fpg_x11; + +type + TfpgFontResourceImpl = TfpgX11FontResource; + TfpgImageImpl = TfpgX11Image; + TfpgCanvasImpl = TfpgX11Canvas; + TfpgWindowImpl = TfpgX11Window; + TfpgApplicationImpl = TfpgX11Application; + TfpgClipboardImpl = TfpgX11Clipboard; + TfpgFileListImpl = TfpgX11FileList; + +implementation + +end. + diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas index efe85b19..7b85a236 100644 --- a/src/corelib/x11/fpg_x11.pas +++ b/src/corelib/x11/fpg_x11.pas @@ -109,7 +109,6 @@ const PROP_MWM_HINTS_ELEMENTS = 5; type - TXWindowStateFlag = (xwsfMapped); TXWindowStateFlags = set of TXWindowStateFlag; @@ -117,10 +116,10 @@ type TX11EventFilter = function(const AEvent: TXEvent): Boolean of object; // forward declaration - TfpgWindowImpl = class; + TfpgX11Window = class; - TfpgFontResourceImpl = class(TfpgFontResourceBase) + TfpgX11FontResource = class(TfpgFontResourceBase) private FFontData: PXftFont; function DoGetTextWidthClassic(const txt: string): integer; @@ -138,7 +137,7 @@ type end; - TfpgImageImpl = class(TfpgImageBase) + TfpgX11Image = class(TfpgImageBase) private FXimg: TXImage; FXimgmask: TXImage; @@ -153,14 +152,14 @@ type end; - TfpgCanvasImpl = class(TfpgCanvasBase) + TfpgX11Canvas = class(TfpgCanvasBase) private FDrawing: boolean; - FDrawWindow: TfpgWindowImpl; + FDrawWindow: TfpgX11Window; FBufferPixmap: TfpgDCHandle; FDrawHandle: TfpgDCHandle; Fgc: TfpgGContext; - FCurFontRes: TfpgFontResourceImpl; + FCurFontRes: TfpgX11FontResource; FClipRect: TfpgRect; FClipRectSet: boolean; FXftDraw: PXftDraw; @@ -203,12 +202,12 @@ type end; - TfpgWindowImpl = class(TfpgWindowBase) + TfpgX11Window = class(TfpgWindowBase) protected FWinFlags: TXWindowStateFlags; FWinHandle: TfpgWinHandle; FBackupWinHandle: TfpgWinHandle; // Used by DestroyNotify & UnmapNotify events - FModalForWin: TfpgWindowImpl; + FModalForWin: TfpgX11Window; procedure DoAllocateWindowHandle(AParent: TfpgWindowBase); override; procedure DoReleaseWindowHandle; override; procedure DoRemoveWindowLookup; override; @@ -229,7 +228,7 @@ type end; - TfpgApplicationImpl = class(TfpgApplicationBase) + TfpgX11Application = class(TfpgApplicationBase) private FComposeBuffer: String[32]; FComposeStatus: TStatus; @@ -273,7 +272,7 @@ type end; - TfpgClipboardImpl = class(TfpgClipboardBase) + TfpgX11Clipboard = class(TfpgClipboardBase) private FWaitingForSelection: Boolean; protected @@ -284,11 +283,13 @@ type end; - TfpgFileListImpl = class(TfpgFileListBase) - function EncodeModeString(FileMode: longword): TFileModeString; - constructor Create; override; + TfpgX11FileList = class(TfpgFileListBase) + protected function InitializeEntry(sr: TSearchRec): TFileEntry; override; procedure PopulateSpecialDirs(const aDirectory: TfpgString); override; + public + constructor Create; override; + function EncodeModeString(FileMode: longword): TFileModeString; end; @@ -383,7 +384,7 @@ type // single direction linked list WindowLookupRec = record - w: TfpgWindowImpl; + w: TfpgX11Window; Next: PWindowLookupRec; end; @@ -391,7 +392,7 @@ var FirstWindowLookupRec: PWindowLookupRec; LastWindowLookupRec: PWindowLookupRec; -procedure AddWindowLookup(w: TfpgWindowImpl); +procedure AddWindowLookup(w: TfpgX11Window); var p: PWindowLookupRec; begin @@ -408,7 +409,7 @@ begin LastWindowLookupRec := p; end; -procedure RemoveWindowLookup(w: TfpgWindowImpl); +procedure RemoveWindowLookup(w: TfpgX11Window); var prevp: PWindowLookupRec; p: PWindowLookupRec; @@ -437,7 +438,7 @@ begin end; end; -function FindWindowByHandle(wh: TfpgWinHandle): TfpgWindowImpl; +function FindWindowByHandle(wh: TfpgWinHandle): TfpgX11Window; var p: PWindowLookupRec; begin @@ -457,7 +458,7 @@ begin Result := nil; end; -function FindWindowByBackupHandle(wh: TfpgWinHandle): TfpgWindowImpl; +function FindWindowByBackupHandle(wh: TfpgWinHandle): TfpgX11Window; var p: PWindowLookupRec; begin @@ -566,9 +567,9 @@ begin end; -{ TfpgApplicationImpl } +{ TfpgX11Application } -function TfpgApplicationImpl.ConvertShiftState(AState: Cardinal): TShiftState; +function TfpgX11Application.ConvertShiftState(AState: Cardinal): TShiftState; begin Result := []; if (AState and Button1Mask) <> 0 then @@ -595,7 +596,7 @@ begin Include(Result, ssAltGr); end; -function TfpgApplicationImpl.KeySymToKeycode(KeySym: TKeySym): Word; +function TfpgX11Application.KeySymToKeycode(KeySym: TKeySym): Word; const Table_20aX: array[$20a0..$20ac] of Word = (keyEcuSign, keyColonSign, keyCruzeiroSign, keyFFrancSign, keyLiraSign, keyMillSign, keyNairaSign, @@ -664,7 +665,7 @@ begin {$ENDIF} end; -function TfpgApplicationImpl.StartComposing(const Event: TXEvent): TKeySym; +function TfpgX11Application.StartComposing(const Event: TXEvent): TKeySym; var l: integer; begin @@ -674,7 +675,7 @@ begin SetLength(FComposeBuffer, l); end; -function TfpgApplicationImpl.DoGetFontFaceList: TStringList; +function TfpgX11Application.DoGetFontFaceList: TStringList; var pfs: PFcFontSet; ppat: PPFcPattern; @@ -706,7 +707,7 @@ begin Result.Sort; end; -constructor TfpgApplicationImpl.Create(const AParams: string); +constructor TfpgX11Application.Create(const AParams: string); begin inherited Create(AParams); FIsInitialized := False; @@ -749,7 +750,7 @@ begin xapplication := TfpgApplication(self); end; -destructor TfpgApplicationImpl.Destroy; +destructor TfpgX11Application.Destroy; begin netlayer.Free; XCloseDisplay(FDisplay); @@ -757,7 +758,7 @@ begin inherited Destroy; end; -function TfpgApplicationImpl.DoMessagesPending: boolean; +function TfpgX11Application.DoMessagesPending: boolean; begin Result := (XPending(display) > 0); end; @@ -823,15 +824,15 @@ begin end; end; -procedure TfpgApplicationImpl.DoWaitWindowMessage(atimeoutms: integer); +procedure TfpgX11Application.DoWaitWindowMessage(atimeoutms: integer); var ev: TXEvent; NewEvent: TXevent; i: integer; r: integer; blockmsg: boolean; - w: TfpgWindowImpl; - ew: TfpgWindowImpl; + w: TfpgX11Window; + ew: TfpgX11Window; kwg: TfpgWidget; wh: TfpgWinHandle; wa: TXWindowAttributes; @@ -1042,7 +1043,7 @@ begin begin ew := w; while (w <> nil) and (w.Parent <> nil) do - w := TfpgWindowImpl(w.Parent); + w := TfpgX11Window(w.Parent); if (w <> nil) and (PopupListFind(w.WinHandle) = nil) and (not PopupDontCloseWidget(TfpgWidget(ew))) then @@ -1055,7 +1056,7 @@ begin w := FindWindowByHandle(ev.xbutton.window); // restore w if xapplication.TopModalForm <> nil then begin - ew := TfpgWindowImpl(WidgetParentForm(TfpgWidget(w))); + ew := TfpgX11Window(WidgetParentForm(TfpgWidget(w))); if (ew <> nil) and (xapplication.TopModalForm <> ew) and (waUnblockableMessages in ew.WindowAttributes = False) then blockmsg := true; end; @@ -1133,7 +1134,7 @@ begin ReportLostWindow(ev); if xapplication.TopModalForm <> nil then begin - ew := TfpgWindowImpl(WidgetParentForm(TfpgWidget(w))); + ew := TfpgX11Window(WidgetParentForm(TfpgWidget(w))); if (ew <> nil) and (xapplication.TopModalForm <> ew) and (waUnblockableMessages in ew.WindowAttributes = False) then blockmsg := true; end; @@ -1168,7 +1169,7 @@ begin if xapplication.TopModalForm <> nil then begin // This is ugly!!!!!!!!!!!!!!! - ew := TfpgWindowImpl(WidgetParentForm(TfpgWidget(w))); + ew := TfpgX11Window(WidgetParentForm(TfpgWidget(w))); if (ew <> nil) and (xapplication.TopModalForm <> ew) and (waUnblockableMessages in ew.WindowAttributes = False) then blockmsg := true; end; @@ -1271,7 +1272,7 @@ begin if not Assigned(w) then ReportLostWindow(ev) else - RemoveWindowLookup(TfpgWindowImpl(w)); + RemoveWindowLookup(TfpgX11Window(w)); end; X.GraphicsExpose, @@ -1294,12 +1295,12 @@ begin end; end; -procedure TfpgApplicationImpl.DoFlush; +procedure TfpgX11Application.DoFlush; begin XFlush(FDisplay); end; -function TfpgApplicationImpl.GetScreenWidth: TfpgCoord; +function TfpgX11Application.GetScreenWidth: TfpgCoord; var wa: TXWindowAttributes; begin @@ -1307,7 +1308,7 @@ begin Result := wa.Width; end; -function TfpgApplicationImpl.GetScreenHeight: TfpgCoord; +function TfpgX11Application.GetScreenHeight: TfpgCoord; var wa: TXWindowAttributes; begin @@ -1315,7 +1316,7 @@ begin Result := wa.Height; end; -function TfpgApplicationImpl.Screen_dpi_x: integer; +function TfpgX11Application.Screen_dpi_x: integer; var mm: integer; begin @@ -1328,7 +1329,7 @@ begin Result := 96; // seems to be a well known default. :-( end; -function TfpgApplicationImpl.Screen_dpi_y: integer; +function TfpgX11Application.Screen_dpi_y: integer; var mm: integer; begin @@ -1341,7 +1342,7 @@ begin Result := Screen_dpi_x; // same as width end; -function TfpgApplicationImpl.Screen_dpi: integer; +function TfpgX11Application.Screen_dpi: integer; begin Result := Screen_dpi_y; {$IFDEF DEBUG} @@ -1351,9 +1352,9 @@ begin {$ENDIF} end; -{ TfpgWindowImpl } +{ TfpgX11Window } -procedure TfpgWindowImpl.DoAllocateWindowHandle(AParent: TfpgWindowBase); +procedure TfpgX11Window.DoAllocateWindowHandle(AParent: TfpgWindowBase); var pwh: TfpgWinHandle; wh: TfpgWinHandle; @@ -1372,7 +1373,7 @@ begin Exit; //==> if AParent <> nil then - pwh := TfpgWindowImpl(AParent).WinHandle + pwh := TfpgX11Window(AParent).WinHandle else pwh := xapplication.RootWindow; @@ -1461,9 +1462,9 @@ begin begin lmwh := 0; if fpgApplication.PrevModalForm <> nil then - lmwh := TfpgWindowImpl(fpgApplication.PrevModalForm).WinHandle + lmwh := TfpgX11Window(fpgApplication.PrevModalForm).WinHandle else if fpgApplication.MainForm <> nil then - lmwh := TfpgWindowImpl(fpgApplication.MainForm).WinHandle; + lmwh := TfpgX11Window(fpgApplication.MainForm).WinHandle; if lmwh <> 0 then begin XSetTransientForHint(xapplication.display, FWinHandle, lmwh); @@ -1514,7 +1515,7 @@ begin AddWindowLookup(self); end; -procedure TfpgWindowImpl.DoReleaseWindowHandle; +procedure TfpgX11Window.DoReleaseWindowHandle; //var // lCallTrace: IInterface; begin @@ -1533,13 +1534,13 @@ begin FWinHandle := 0; end; -procedure TfpgWindowImpl.DoRemoveWindowLookup; +procedure TfpgX11Window.DoRemoveWindowLookup; begin // PrintCallTraceDbgLn('RemoveWindowLookup ' + Name + ' [' + Classname + ']'); RemoveWindowLookup(self); end; -procedure TfpgWindowImpl.DoSetWindowVisible(const AValue: Boolean); +procedure TfpgX11Window.DoSetWindowVisible(const AValue: Boolean); begin if AValue then begin @@ -1558,34 +1559,34 @@ begin end; end; -function TfpgWindowImpl.HandleIsValid: boolean; +function TfpgX11Window.HandleIsValid: boolean; begin Result := (FWinHandle > 0); end; -procedure TfpgWindowImpl.DoMoveWindow(const x: TfpgCoord; const y: TfpgCoord); +procedure TfpgX11Window.DoMoveWindow(const x: TfpgCoord; const y: TfpgCoord); begin if HandleIsValid then XMoveWindow(xapplication.display, FWinHandle, x, y); end; -function TfpgWindowImpl.DoWindowToScreen(ASource: TfpgWindowBase; const AScreenPos: TPoint): TPoint; +function TfpgX11Window.DoWindowToScreen(ASource: TfpgWindowBase; const AScreenPos: TPoint): TPoint; var dx: integer; dy: integer; cw: TfpgWinHandle; begin - if not TfpgWindowImpl(ASource).HandleIsValid then + if not TfpgX11Window(ASource).HandleIsValid then Exit; //==> - XTranslateCoordinates(xapplication.display, TfpgWindowImpl(ASource).WinHandle, + XTranslateCoordinates(xapplication.display, TfpgX11Window(ASource).WinHandle, XDefaultRootWindow(xapplication.display), AScreenPos.X, AScreenPos.Y, @dx, @dy, @cw); Result.X := dx; Result.Y := dy; end; -procedure TfpgWindowImpl.DoUpdateWindowPosition; +procedure TfpgX11Window.DoUpdateWindowPosition; var w: longword; h: longword; @@ -1603,7 +1604,7 @@ begin XMoveResizeWindow(xapplication.display, FWinHandle, FLeft, FTop, w, h); end; -procedure TfpgWindowImpl.DoSetMouseCursor; +procedure TfpgX11Window.DoSetMouseCursor; var xc: TCursor; shape: integer; @@ -1632,7 +1633,7 @@ begin XFreeCursor(xapplication.Display, xc); end; -procedure TfpgWindowImpl.DoSetWindowTitle(const ATitle: string); +procedure TfpgX11Window.DoSetWindowTitle(const ATitle: string); var tp: TXTextProperty; begin @@ -1652,19 +1653,19 @@ begin XSetWMIconName(xapplication.Display, FWinHandle, @tp); end; -constructor TfpgWindowImpl.Create(AOwner: TComponent); +constructor TfpgX11Window.Create(AOwner: TComponent); begin inherited Create(AOwner); FWinHandle := 0; FBackupWinHandle := 0; end; -procedure TfpgWindowImpl.ActivateWindow; +procedure TfpgX11Window.ActivateWindow; begin XSetInputFocus(xapplication.Display, FWinHandle, RevertToParent, CurrentTime); end; -procedure TfpgWindowImpl.CaptureMouse; +procedure TfpgX11Window.CaptureMouse; begin XGrabPointer(xapplication.Display, FWinHandle, TBool(False), @@ -1678,20 +1679,20 @@ begin ); end; -procedure TfpgWindowImpl.ReleaseMouse; +procedure TfpgX11Window.ReleaseMouse; begin XUngrabPointer(xapplication.display, CurrentTime); end; -procedure TfpgWindowImpl.SetFullscreen(AValue: Boolean); +procedure TfpgX11Window.SetFullscreen(AValue: Boolean); begin inherited SetFullscreen(AValue); fpgApplication.netlayer.WindowSetFullscreen(FWinHandle, AValue); end; -{ TfpgFontResourceImpl } +{ TfpgX11FontResource } -function TfpgFontResourceImpl.DoGetTextWidthClassic(const txt: string): integer; +function TfpgX11FontResource.DoGetTextWidthClassic(const txt: string): integer; var extents: TXGlyphInfo; begin @@ -1699,7 +1700,7 @@ begin Result := extents.xOff; end; -function TfpgFontResourceImpl.DoGetTextWidthWorkaround(const txt: string): integer; +function TfpgX11FontResource.DoGetTextWidthWorkaround(const txt: string): integer; var extents: TXGlyphInfo; ch: string; @@ -1715,40 +1716,40 @@ begin end; end; -constructor TfpgFontResourceImpl.Create(const afontdesc: string); +constructor TfpgX11FontResource.Create(const afontdesc: string); begin FFontData := XftFontOpenName(xapplication.display, xapplication.DefaultScreen, PChar(afontdesc)); end; -destructor TfpgFontResourceImpl.Destroy; +destructor TfpgX11FontResource.Destroy; begin if HandleIsValid then XftFontClose(xapplication.Display, FFontData); inherited; end; -function TfpgFontResourceImpl.HandleIsValid: boolean; +function TfpgX11FontResource.HandleIsValid: boolean; begin Result := (FFontData <> nil); end; -function TfpgFontResourceImpl.GetAscent: integer; +function TfpgX11FontResource.GetAscent: integer; begin Result := FFontData^.ascent; end; -function TfpgFontResourceImpl.GetDescent: integer; +function TfpgX11FontResource.GetDescent: integer; begin Result := FFontData^.descent; end; -function TfpgFontResourceImpl.GetHeight: integer; +function TfpgX11FontResource.GetHeight: integer; begin // Do NOT use FFontData^.height as it isn't as accurate Result := GetAscent + GetDescent; end; -function TfpgFontResourceImpl.GetTextWidth(const txt: string): integer; +function TfpgX11FontResource.GetTextWidth(const txt: string): integer; begin if length(txt) < 1 then begin @@ -1763,9 +1764,9 @@ begin Result := DoGetTextWidthWorkaround(txt); end; -{ TfpgCanvasImpl } +{ TfpgX11Canvas } -constructor TfpgCanvasImpl.Create; +constructor TfpgX11Canvas.Create; begin inherited; FDrawing := False; @@ -1778,7 +1779,7 @@ begin FClipRegion := nil; end; -destructor TfpgCanvasImpl.Destroy; +destructor TfpgX11Canvas.Destroy; begin if FDrawing then DoEndDraw; @@ -1787,7 +1788,7 @@ begin inherited Destroy; end; -procedure TfpgCanvasImpl.DoBeginDraw(awin: TfpgWindowBase; buffered: boolean); +procedure TfpgX11Canvas.DoBeginDraw(awin: TfpgWindowBase; buffered: boolean); var x: integer; y: integer; @@ -1800,15 +1801,15 @@ var pmh: longword; GcValues: TXGcValues; begin - if Assigned(TfpgWindowImpl(awin)) then + if Assigned(TfpgX11Window(awin)) then begin // This occurs every now and again with TfpgMemo and InvertCaret painting! // Investigate this. - if not TfpgWindowImpl(awin).HasHandle then + if not TfpgX11Window(awin).HasHandle then raise Exception.Create('Window doesn''t have a Handle'); end; - XGetGeometry(xapplication.display, TfpgWindowImpl(awin).FWinHandle, @rw, @x, @y, @w, @h, @bw, @d); + XGetGeometry(xapplication.display, TfpgX11Window(awin).FWinHandle, @rw, @x, @y, @w, @h, @bw, @d); if FDrawing and buffered and (FBufferPixmap > 0) then if FBufferPixmap > 0 then @@ -1821,7 +1822,7 @@ begin if not FDrawing then begin - FDrawWindow := TfpgWindowImpl(awin); + FDrawWindow := TfpgX11Window(awin); if buffered then begin @@ -1877,13 +1878,12 @@ begin XDefaultColormap(xapplication.display, xapplication.DefaultScreen)); FClipRegion := XCreateRegion; - end; FDrawing := True; end; -procedure TfpgCanvasImpl.DoPutBufferToScreen(x, y, w, h: TfpgCoord); +procedure TfpgX11Canvas.DoPutBufferToScreen(x, y, w, h: TfpgCoord); var cgc: TfpgGContext; GcValues: TXGcValues; @@ -1896,7 +1896,7 @@ begin end; end; -procedure TfpgCanvasImpl.DoEndDraw; +procedure TfpgX11Canvas.DoEndDraw; begin if FDrawing then begin @@ -1912,7 +1912,7 @@ begin end; end; -function TfpgCanvasImpl.GetPixel(X, Y: integer): TfpgColor; +function TfpgX11Canvas.GetPixel(X, Y: integer): TfpgColor; var Image: PXImage; Pixel: Cardinal; @@ -1937,7 +1937,7 @@ begin end; end; -procedure TfpgCanvasImpl.SetPixel(X, Y: integer; const AValue: TfpgColor); +procedure TfpgX11Canvas.SetPixel(X, Y: integer; const AValue: TfpgColor); var oldColor: TfpgColor; begin @@ -1947,19 +1947,19 @@ begin SetColor(oldColor); end; -procedure TfpgCanvasImpl.DoDrawArc(x, y, w, h: TfpgCoord; a1, a2: Extended); +procedure TfpgX11Canvas.DoDrawArc(x, y, w, h: TfpgCoord; a1, a2: Extended); begin XDrawArc(xapplication.display, FDrawHandle, Fgc, x, y, w-1, h-1, Trunc(64 * a1), Trunc(64 * a2)); end; -procedure TfpgCanvasImpl.DoFillArc(x, y, w, h: TfpgCoord; a1, a2: Extended); +procedure TfpgX11Canvas.DoFillArc(x, y, w, h: TfpgCoord; a1, a2: Extended); begin XFillArc(xapplication.display, FDrawHandle, Fgc, x, y, w, h, Trunc(64 * a1), Trunc(64 * a2)); end; -procedure TfpgCanvasImpl.DoDrawPolygon(Points: fpg_base.PPoint; NumPts: Integer; Winding: boolean); +procedure TfpgX11Canvas.DoDrawPolygon(Points: fpg_base.PPoint; NumPts: Integer; Winding: boolean); var PointArray: PXPoint; i: integer; @@ -1976,7 +1976,7 @@ begin FreeMem(PointArray); end; -procedure TfpgCanvasImpl.BufferFreeTimer(Sender: TObject); +procedure TfpgX11Canvas.BufferFreeTimer(Sender: TObject); begin {$IFDEF DEBUG} WriteLn('fpGFX/X11: Freeing Buffer w=', FPixWidth, ' h=', FPixHeight); @@ -1985,31 +1985,31 @@ begin FreeAndNil(FBufferFreeTimer); end; -procedure TfpgCanvasImpl.TryFreePixmap; +procedure TfpgX11Canvas.TryFreePixmap; begin if FBufferPixmap > 0 then XFreePixmap(xapplication.Display, FBufferPixmap); FBufferPixmap := 0; end; -procedure TfpgCanvasImpl.DoSetFontRes(fntres: TfpgFontResourceBase); +procedure TfpgX11Canvas.DoSetFontRes(fntres: TfpgFontResourceBase); begin if fntres = nil then Exit; //==> - FCurFontRes := TfpgFontResourceImpl(fntres); + FCurFontRes := TfpgX11FontResource(fntres); end; -procedure TfpgCanvasImpl.DoSetTextColor(cl: TfpgColor); +procedure TfpgX11Canvas.DoSetTextColor(cl: TfpgColor); begin SetXftColor(cl, FColorTextXft); end; -procedure TfpgCanvasImpl.DoSetColor(cl: TfpgColor); +procedure TfpgX11Canvas.DoSetColor(cl: TfpgColor); begin XSetForeGround(xapplication.display, Fgc, fpgColorToX(cl)); end; -procedure TfpgCanvasImpl.DoSetLineStyle(awidth: integer; astyle: TfpgLineStyle); +procedure TfpgX11Canvas.DoSetLineStyle(awidth: integer; astyle: TfpgLineStyle); const cDot: array[0..1] of Char = #1#1; cDash: array[0..1] of Char = #4#2; @@ -2056,7 +2056,7 @@ begin end; { case } end; -procedure TfpgCanvasImpl.DoDrawString(x, y: TfpgCoord; const txt: string); +procedure TfpgX11Canvas.DoDrawString(x, y: TfpgCoord; const txt: string); begin if Length(txt) < 1 then Exit; //==> @@ -2065,7 +2065,7 @@ begin y + FCurFontRes.GetAscent, PChar(txt), Length(txt)); end; -procedure TfpgCanvasImpl.DoGetWinRect(out r: TfpgRect); +procedure TfpgX11Canvas.DoGetWinRect(out r: TfpgRect); var rw: TfpgWinHandle; x: integer; @@ -2079,12 +2079,12 @@ begin @(r.width), @(r.height), @bw, @d); end; -procedure TfpgCanvasImpl.DoFillRectangle(x, y, w, h: TfpgCoord); +procedure TfpgX11Canvas.DoFillRectangle(x, y, w, h: TfpgCoord); begin XFillRectangle(xapplication.display, FDrawHandle, Fgc, x, y, w, h); end; -procedure TfpgCanvasImpl.DoXORFillRectangle(col: TfpgColor; x, y, w, h: TfpgCoord); +procedure TfpgX11Canvas.DoXORFillRectangle(col: TfpgColor; x, y, w, h: TfpgCoord); begin XSetForeGround(xapplication.display, Fgc, fpgColorToX(fpgColorToRGB(col))); XSetFunction(xapplication.display, Fgc, GXxor); @@ -2093,7 +2093,7 @@ begin XSetFunction(xapplication.display, Fgc, GXcopy); end; -procedure TfpgCanvasImpl.DoFillTriangle(x1, y1, x2, y2, x3, y3: TfpgCoord); +procedure TfpgX11Canvas.DoFillTriangle(x1, y1, x2, y2, x3, y3: TfpgCoord); var pts: array[1..3] of TXPoint; begin @@ -2104,20 +2104,20 @@ begin XFillPolygon(xapplication.display, FDrawHandle, Fgc, @pts, 3, CoordModeOrigin, X.Complex); end; -procedure TfpgCanvasImpl.DoDrawRectangle(x, y, w, h: TfpgCoord); +procedure TfpgX11Canvas.DoDrawRectangle(x, y, w, h: TfpgCoord); begin // writeln(Format('DoDrawRectangle x=%d y=%d w=%d h=%d', [x, y, w, h])); // Same behavior as Windows. See documentation for reason. XDrawRectangle(xapplication.display, FDrawHandle, Fgc, x, y, w-1, h-1); end; -procedure TfpgCanvasImpl.DoDrawLine(x1, y1, x2, y2: TfpgCoord); +procedure TfpgX11Canvas.DoDrawLine(x1, y1, x2, y2: TfpgCoord); begin // Same behavior as Windows. See documentation for reason. XDrawLine(xapplication.display, FDrawHandle, Fgc, x1, y1, x2, y2); end; -procedure TfpgCanvasImpl.DoSetClipRect(const ARect: TfpgRect); +procedure TfpgX11Canvas.DoSetClipRect(const ARect: TfpgRect); var r: TXRectangle; rg: TRegion; @@ -2138,12 +2138,12 @@ begin XDestroyRegion(rg); end; -function TfpgCanvasImpl.DoGetClipRect: TfpgRect; +function TfpgX11Canvas.DoGetClipRect: TfpgRect; begin Result := FClipRect; end; -procedure TfpgCanvasImpl.DoAddClipRect(const ARect: TfpgRect); +procedure TfpgX11Canvas.DoAddClipRect(const ARect: TfpgRect); var r: TXRectangle; rg: TRegion; @@ -2165,7 +2165,7 @@ begin XDestroyRegion(rg); end; -procedure TfpgCanvasImpl.DoClearClipRect; +procedure TfpgX11Canvas.DoClearClipRect; var r: TfpgRect; begin @@ -2174,7 +2174,7 @@ begin FClipRectSet := False; end; -procedure TfpgCanvasImpl.DoDrawImagePart(x, y: TfpgCoord; img: TfpgImageBase; xi, yi, w, h: integer); +procedure TfpgX11Canvas.DoDrawImagePart(x, y: TfpgCoord; img: TfpgImageBase; xi, yi, w, h: integer); var msk: TPixmap; gc2: Tgc; @@ -2197,7 +2197,7 @@ begin XFillRectangle(xapplication.display, msk, gc2, 0, 0, w, h); XSetForeground(xapplication.display, gc2, 1); - XPutImage(xapplication.display, msk, gc2, TfpgImageImpl(img).XImageMask, xi, yi, 0, 0, w, h); + XPutImage(xapplication.display, msk, gc2, TfpgX11Image(img).XImageMask, xi, yi, 0, 0, w, h); drawgc := XCreateGc(xapplication.display, FDrawHandle, 0, @GcValues); XSetClipMask(xapplication.display, drawgc, msk); @@ -2212,19 +2212,19 @@ begin XPutImage(xapplication.display, FDrawHandle, Fgc, TfpgImage(img).XImage, xi, yi, x, y, w, h); end; -{ TfpgImageImpl } +{ TfpgX11Image } -constructor TfpgImageImpl.Create; +constructor TfpgX11Image.Create; begin inherited Create; end; -procedure TfpgImageImpl.DoFreeImage; +procedure TfpgX11Image.DoFreeImage; begin // does nothing on X11 end; -procedure TfpgImageImpl.DoInitImage(acolordepth, awidth, aheight: integer; aimgdata: Pointer); +procedure TfpgX11Image.DoInitImage(acolordepth, awidth, aheight: integer; aimgdata: Pointer); begin FMasked := False; @@ -2271,7 +2271,7 @@ begin XInitImage(@FXimg); end; -procedure TfpgImageImpl.DoInitImageMask(awidth, aheight: integer; aimgdata: Pointer); +procedure TfpgX11Image.DoInitImageMask(awidth, aheight: integer; aimgdata: Pointer); begin FMasked := True; @@ -2301,19 +2301,19 @@ begin XInitImage(@FXimgMask); end; -function TfpgImageImpl.XImage: PXImage; +function TfpgX11Image.XImage: PXImage; begin Result := @FXimg; end; -function TfpgImageImpl.XImageMask: PXImage; +function TfpgX11Image.XImageMask: PXImage; begin Result := @FXimgMask; end; -{ TfpgClipboardImpl } +{ TfpgX11Clipboard } -function TfpgClipboardImpl.DoGetText: TfpgString; +function TfpgX11Clipboard.DoGetText: TfpgString; begin XConvertSelection(xapplication.Display, xapplication.xia_clipboard, XA_STRING, xapplication.xia_clipboard, FClipboardWndHandle, 0); @@ -2329,23 +2329,23 @@ begin Result := FClipboardText; end; -procedure TfpgClipboardImpl.DoSetText(const AValue: TfpgString); +procedure TfpgX11Clipboard.DoSetText(const AValue: TfpgString); begin FClipboardText := AValue; XSetSelectionOwner(xapplication.Display, xapplication.xia_clipboard, FClipboardWndHandle, 0); end; -procedure TfpgClipboardImpl.InitClipboard; +procedure TfpgX11Clipboard.InitClipboard; begin FWaitingForSelection := False; FClipboardWndHandle := XCreateSimpleWindow(xapplication.Display, xapplication.RootWindow, 10, 10, 10, 10, 0, 0, 0); end; -{ TfpgFileListImpl } +{ TfpgX11FileList } -function TfpgFileListImpl.EncodeModeString(FileMode: longword): TFileModeString; +function TfpgX11FileList.EncodeModeString(FileMode: longword): TFileModeString; const modestring: string[9] = 'xwrxwrxwr'; // must be in reverse order var @@ -2368,13 +2368,13 @@ begin end; end; -constructor TfpgFileListImpl.Create; +constructor TfpgX11FileList.Create; begin inherited Create; FHasFileMode := true; end; -function TfpgFileListImpl.InitializeEntry(sr: TSearchRec): TFileEntry; +function TfpgX11FileList.InitializeEntry(sr: TSearchRec): TFileEntry; var info: Tstat; fullname: TfpgString; @@ -2404,7 +2404,7 @@ begin end; end; -procedure TfpgFileListImpl.PopulateSpecialDirs(const aDirectory: TfpgString); +procedure TfpgX11FileList.PopulateSpecialDirs(const aDirectory: TfpgString); var ds: string; begin diff --git a/src/corelib/x11/fpgui_toolkit.lpk b/src/corelib/x11/fpgui_toolkit.lpk index 1303fabf..d47e94e8 100644 --- a/src/corelib/x11/fpgui_toolkit.lpk +++ b/src/corelib/x11/fpgui_toolkit.lpk @@ -28,7 +28,7 @@ <License Value="LGPL 2 with static linking exception. "/> <Version Minor="7"/> - <Files Count="77"> + <Files Count="78"> <Item1> <Filename Value="../stdimages.inc"/> <Type Value="Include"/> @@ -337,6 +337,10 @@ <Filename Value="../../gui/fpg_colorwheel.pas"/> <UnitName Value="fpg_ColorWheel"/> </Item77> + <Item78> + <Filename Value="fpg_interface.pas"/> + <UnitName Value="fpg_interface"/> + </Item78> </Files> <LazDoc Paths="../../../docs/xml/corelib/;../../../docs/xml/corelib/x11/;../../../docs/xml/corelib/gdi/;../../../docs/xml/gui/"/> <RequiredPkgs Count="1"> diff --git a/src/corelib/x11/fpgui_toolkit.pas b/src/corelib/x11/fpgui_toolkit.pas index b6e85833..d6531ef9 100644 --- a/src/corelib/x11/fpgui_toolkit.pas +++ b/src/corelib/x11/fpgui_toolkit.pas @@ -1,4 +1,4 @@ -{ This file was automatically created by Lazarus. do not edit ! +{ This file was automatically created by Lazarus. do not edit! This source is only used to compile and install the package. } @@ -8,15 +8,17 @@ interface uses fpg_base, fpg_main, fpg_cmdlineparams, fpg_command_intf, fpg_constants, - fpg_extinterpolation, fpg_imagelist, fpg_imgfmt_bmp, fpg_pofiles, fpg_popupwindow, - fpg_stdimages, fpg_stringhashlist, fpg_translations, fpg_stringutils, fpg_utils, - fpg_widget, fpg_wuline, fpg_impl, fpg_x11, fpg_netlayer_x11, fpg_keyconv_x11, fpg_xft_x11, - fpg_animation, fpg_basegrid, fpg_button, fpg_checkbox, fpg_combobox, fpg_customgrid, - fpg_dialogs, fpg_editcombo, fpg_edit, fpg_form, fpg_gauge, fpg_grid, fpg_hyperlink, - fpg_iniutils, fpg_label, fpg_listbox, fpg_listview, fpg_memo, fpg_menu, fpg_mru, fpg_panel, - fpg_popupcalendar, fpg_progressbar, fpg_radiobutton, fpg_scrollbar, fpg_style, fpg_tab, - fpg_trackbar, fpg_tree, fpgui_db, fpg_splitter, fpg_hint, fpg_spinedit, fpg_extgraphics, - fpg_ColorMapping, fpg_ColorWheel; + fpg_extinterpolation, fpg_imagelist, fpg_imgfmt_bmp, fpg_pofiles, + fpg_popupwindow, fpg_stdimages, fpg_stringhashlist, fpg_translations, + fpg_stringutils, fpg_utils, fpg_widget, fpg_wuline, fpg_impl, fpg_x11, + fpg_netlayer_x11, fpg_keyconv_x11, fpg_xft_x11, fpg_animation, fpg_basegrid, + fpg_button, fpg_checkbox, fpg_combobox, fpg_customgrid, fpg_dialogs, + fpg_editcombo, fpg_edit, fpg_form, fpg_gauge, fpg_grid, fpg_hyperlink, + fpg_iniutils, fpg_label, fpg_listbox, fpg_listview, fpg_memo, fpg_menu, + fpg_mru, fpg_panel, fpg_popupcalendar, fpg_progressbar, fpg_radiobutton, + fpg_scrollbar, fpg_style, fpg_tab, fpg_trackbar, fpg_tree, fpgui_db, + fpg_splitter, fpg_hint, fpg_spinedit, fpg_extgraphics, fpg_ColorMapping, + fpg_ColorWheel, fpg_interface; implementation |