mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 17:19:46 +02:00
customdrawws: Adds a skeleton for X11
git-svn-id: trunk@33416 -
This commit is contained in:
parent
afb21705e9
commit
df5611a7ff
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -5407,12 +5407,14 @@ lcl/interfaces/customdrawn/customdrawnint.pas svneol=native#text/pascal
|
||||
lcl/interfaces/customdrawn/customdrawnobject.inc svneol=native#text/pascal
|
||||
lcl/interfaces/customdrawn/customdrawnobject_cocoa.inc svneol=native#text/pascal
|
||||
lcl/interfaces/customdrawn/customdrawnobject_win.inc svneol=native#text/pascal
|
||||
lcl/interfaces/customdrawn/customdrawnobject_x11.inc svneol=native#text/pascal
|
||||
lcl/interfaces/customdrawn/customdrawnwscontrols.pp svneol=native#text/plain
|
||||
lcl/interfaces/customdrawn/customdrawnwscontrols_win.inc svneol=native#text/pascal
|
||||
lcl/interfaces/customdrawn/customdrawnwsfactory.pas svneol=native#text/pascal
|
||||
lcl/interfaces/customdrawn/customdrawnwsforms.pp svneol=native#text/plain
|
||||
lcl/interfaces/customdrawn/customdrawnwsforms_cocoa.inc svneol=native#text/pascal
|
||||
lcl/interfaces/customdrawn/customdrawnwsforms_win.inc svneol=native#text/pascal
|
||||
lcl/interfaces/customdrawn/customdrawnwsforms_x11.inc svneol=native#text/pascal
|
||||
lcl/interfaces/customdrawn/interfaces.pas svneol=native#text/pascal
|
||||
lcl/interfaces/customdrawn/wincallback.inc svneol=native#text/pascal
|
||||
lcl/interfaces/customdrawn/winproc.pas svneol=native#text/pascal
|
||||
|
266
lcl/interfaces/customdrawn/customdrawnobject_x11.inc
Normal file
266
lcl/interfaces/customdrawn/customdrawnobject_x11.inc
Normal file
@ -0,0 +1,266 @@
|
||||
{%MainUnit customdrawnint.pas}
|
||||
|
||||
{******************************************************************************
|
||||
customdrawnobject_win.inc
|
||||
******************************************************************************
|
||||
|
||||
*****************************************************************************
|
||||
* *
|
||||
* This file is part of the Lazarus Component Library (LCL) *
|
||||
* *
|
||||
* See the file COPYING.modifiedLGPL.txt, 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. *
|
||||
* *
|
||||
*****************************************************************************
|
||||
}
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCDWidgetSet.Create
|
||||
Params: None
|
||||
Returns: Nothing
|
||||
|
||||
Constructor for the class.
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCDWidgetSet.BackendCreate;
|
||||
begin
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWinCEWidgetSet.Destroy
|
||||
Params: None
|
||||
Returns: Nothing
|
||||
|
||||
destructor for the class.
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCDWidgetSet.BackendDestroy;
|
||||
begin
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWinCEWidgetSet.AppInit
|
||||
Params: None
|
||||
Returns: Nothing
|
||||
|
||||
initialize Windows
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCDWidgetSet.AppInit(var ScreenInfo: TScreenInfo);
|
||||
begin
|
||||
{$ifdef VerboseWinCE}
|
||||
// DebugLn('TWinCEWidgetSet.AppInit');
|
||||
{$endif}
|
||||
|
||||
end;
|
||||
|
||||
procedure TCDWidgetSet.AppRun(const ALoop: TApplicationMainLoop);
|
||||
begin
|
||||
end;
|
||||
|
||||
(*
|
||||
function TWinCEWidgetSet.GetAppHandle: THandle;
|
||||
begin
|
||||
Result:= FAppHandle;
|
||||
end;
|
||||
|
||||
procedure TWinCEWidgetSet.SetAppHandle(const AValue: THandle);
|
||||
begin
|
||||
// Do it only if handle is not yet created (for example for DLL initialization)
|
||||
// if handle is already created we can't reassign it
|
||||
if AppHandle = 0 then
|
||||
FAppHandle := AValue;
|
||||
end;*)
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWinCEWidgetSet.AppMinimize
|
||||
Params: None
|
||||
Returns: Nothing
|
||||
|
||||
Minimizes the whole application to the taskbar
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCDWidgetSet.AppMinimize;
|
||||
begin
|
||||
// Windows.SendMessage(FAppHandle, WM_SYSCOMMAND, SC_MINIMIZE, 0);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWinCEWidgetSet.AppRestore
|
||||
Params: None
|
||||
Returns: Nothing
|
||||
|
||||
Restore minimized whole application from taskbar
|
||||
------------------------------------------------------------------------------}
|
||||
|
||||
procedure TCDWidgetSet.AppRestore;
|
||||
begin
|
||||
// Windows.SendMessage(FAppHandle, WM_SYSCOMMAND, SC_RESTORE, 0);
|
||||
end;
|
||||
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWinCEWidgetSet.AppBringToFront
|
||||
Params: None
|
||||
Returns: Nothing
|
||||
|
||||
Brings the entire application on top of all other non-topmost programs
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCDWidgetSet.AppBringToFront;
|
||||
begin
|
||||
end;
|
||||
|
||||
(*
|
||||
procedure TWinCEWidgetSet.SetDesigning(AComponent: TComponent);
|
||||
begin
|
||||
//if Data<>nil then EnableWindow((AComponent As TWinControl).Handle, boolean(Data^));
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWinCEWidgetSet.SetCallback
|
||||
Params: Msg - message for which to set a callback
|
||||
Sender - object to which callback will be sent
|
||||
Returns: nothing
|
||||
|
||||
Applies a Message to the sender
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TWinCEWidgetSet.SetCallback(Msg: LongInt; Sender: TObject);
|
||||
var
|
||||
Window: HWnd;
|
||||
begin
|
||||
//DebugLn('Trace:TWinCEWidgetSet.SetCallback - Start');
|
||||
//DebugLn(Format('Trace:TWinCEWidgetSet.SetCallback - Class Name --> %S', [Sender.ClassName]));
|
||||
//DebugLn(Format('Trace:TWinCEWidgetSet.SetCallback - Message Name --> %S', [GetMessageName(Msg)]));
|
||||
if Sender Is TControlCanvas then
|
||||
Window := TControlCanvas(Sender).Handle
|
||||
else if Sender Is TCustomForm then
|
||||
Window := TCustomForm(Sender).Handle
|
||||
else
|
||||
Window := TWinControl(Sender).Handle;
|
||||
if Window=0 then exit;
|
||||
|
||||
//DebugLn('Trace:TWinCEWidgetSet.SetCallback - Exit');
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWinCEWidgetSet.RemoveCallbacks
|
||||
Params: Sender - object from which to remove callbacks
|
||||
Returns: nothing
|
||||
|
||||
Removes Call Back Signals from the sender
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TWinCEWidgetSet.RemoveCallbacks(Sender: TObject);
|
||||
var
|
||||
Window: HWnd;
|
||||
begin
|
||||
if Sender Is TControlCanvas then
|
||||
Window := TControlCanvas(Sender).Handle
|
||||
else if Sender Is TCustomForm then
|
||||
Window := TCustomForm(Sender).Handle
|
||||
else
|
||||
Window := (Sender as TWinControl).Handle;
|
||||
if Window=0 then exit;
|
||||
end;*)
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWinCEWidgetSet.AppProcessMessages
|
||||
Params: None
|
||||
Returns: Nothing
|
||||
|
||||
Handle all pending messages
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCDWidgetSet.AppProcessMessages;
|
||||
begin
|
||||
end;
|
||||
(*
|
||||
procedure TWinCEWidgetSet.CheckPipeEvents;
|
||||
var
|
||||
lHandler: PPipeEventInfo;
|
||||
// lBytesAvail: dword;
|
||||
// SomethingChanged: Boolean;
|
||||
ChangedCount:integer;
|
||||
begin
|
||||
lHandler := FWaitPipeHandlers;
|
||||
ChangedCount := 0;
|
||||
while (lHandler <> nil) and (ChangedCount < 10) do
|
||||
begin
|
||||
{
|
||||
roozbeh : ooops not supported
|
||||
SomethingChanged:=true;
|
||||
if Windows.PeekNamedPipe(lHandler^.Handle, nil, 0, nil, @lBytesAvail, nil) then
|
||||
begin
|
||||
if lBytesAvail <> 0 then
|
||||
lHandler^.OnEvent(lHandler^.UserData, [prDataAvailable])
|
||||
else
|
||||
SomethingChanged := false;
|
||||
end else
|
||||
lHandler^.OnEvent(lHandler^.UserData, [prBroken]);
|
||||
if SomethingChanged then
|
||||
lHandler := FWaitPipeHandlers
|
||||
else begin
|
||||
lHandler := lHandler^.Next;
|
||||
ChangedCount := 0;
|
||||
end;
|
||||
inc(ChangedCount);}
|
||||
end;
|
||||
end;*)
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWinCEWidgetSet.AppWaitMessage
|
||||
Params: None
|
||||
Returns: Nothing
|
||||
|
||||
Passes execution control to Windows
|
||||
------------------------------------------------------------------------------}
|
||||
//roozbeh:new update...whole procedure body is added.what is it?
|
||||
procedure TCDWidgetSet.AppWaitMessage;
|
||||
begin
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWinCEWidgetSet.AppTerminate
|
||||
Params: None
|
||||
Returns: Nothing
|
||||
|
||||
Tells Windows to halt and destroy
|
||||
------------------------------------------------------------------------------}
|
||||
|
||||
procedure TCDWidgetSet.AppTerminate;
|
||||
begin
|
||||
//DebugLn('Trace:TWinCEWidgetSet.AppTerminate - Start');
|
||||
end;
|
||||
|
||||
|
||||
procedure TCDWidgetSet.AppSetTitle(const ATitle: string);
|
||||
begin
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function: CreateTimer
|
||||
Params: Interval:
|
||||
TimerFunc: Callback
|
||||
Returns: a Timer id (use this ID to destroy timer)
|
||||
|
||||
Design: A timer which calls TimerCallBackProc, is created.
|
||||
The TimerCallBackProc calls the TimerFunc.
|
||||
------------------------------------------------------------------------------}
|
||||
function TCDWidgetSet.CreateTimer(Interval: integer; TimerFunc: TWSTimerProc) : THandle;
|
||||
begin
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function: DestroyTimer
|
||||
Params: TimerHandle
|
||||
Returns:
|
||||
------------------------------------------------------------------------------}
|
||||
function TCDWidgetSet.DestroyTimer(TimerHandle: THandle) : boolean;
|
||||
begin
|
||||
end;
|
||||
(*
|
||||
procedure TWinCEWidgetSet.HandleWakeMainThread(Sender: TObject);
|
||||
begin
|
||||
// wake up GUI thread by sending a message to it
|
||||
Windows.PostMessage(AppHandle, WM_NULL, 0, 0);
|
||||
end;
|
||||
*)
|
||||
|
@ -86,7 +86,7 @@ type
|
||||
|
||||
class procedure SetBounds(const AWinControl: TWinControl;
|
||||
const ALeft, ATop, AWidth, AHeight: Integer); override;
|
||||
{$ifdef CD_Windows}
|
||||
{$if defined(CD_Windows) or defined(CD_X11)}
|
||||
class procedure SetBorderIcons(const AForm: TCustomForm;
|
||||
const ABorderIcons: TBorderIcons); override;
|
||||
class procedure SetFormBorderStyle(const AForm: TCustomForm;
|
||||
@ -155,5 +155,8 @@ implementation
|
||||
{$ifdef CD_Cocoa}
|
||||
{$include customdrawnwsforms_cocoa.inc}
|
||||
{$endif}
|
||||
{$ifdef CD_X11}
|
||||
{$include customdrawnwsforms_x11.inc}
|
||||
{$endif}
|
||||
|
||||
end.
|
||||
|
@ -67,7 +67,7 @@ end;
|
||||
Creates a Windows CE Form, initializes it according to it´s properties and shows it
|
||||
------------------------------------------------------------------------------}
|
||||
class function TCDWSCustomForm.CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): HWND;
|
||||
const AParams: TCreateParams): TLCLIntfHandle;
|
||||
var
|
||||
Params: TCreateWindowExParams;
|
||||
LForm : TCustomForm;
|
||||
|
49
lcl/interfaces/customdrawn/customdrawnwsforms_x11.inc
Normal file
49
lcl/interfaces/customdrawn/customdrawnwsforms_x11.inc
Normal file
@ -0,0 +1,49 @@
|
||||
{$MainForm customdrawnwsforms.pp}
|
||||
|
||||
{ TCDWSCustomForm }
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TCDWSCustomForm.CreateHandle
|
||||
Params: None
|
||||
Returns: Nothing
|
||||
|
||||
Creates a Windows CE Form, initializes it according to it´s properties and shows it
|
||||
------------------------------------------------------------------------------}
|
||||
class function TCDWSCustomForm.CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): TLCLIntfHandle;
|
||||
begin
|
||||
end;
|
||||
|
||||
class procedure TCDWSCustomForm.SetBorderIcons(const AForm: TCustomForm;
|
||||
const ABorderIcons: TBorderIcons);
|
||||
begin
|
||||
end;
|
||||
|
||||
class procedure TCDWSCustomForm.SetFormBorderStyle(const AForm: TCustomForm;
|
||||
const AFormBorderStyle: TFormBorderStyle);
|
||||
begin
|
||||
RecreateWnd(AForm);
|
||||
end;
|
||||
|
||||
class procedure TCDWSCustomForm.SetBounds(const AWinControl: TWinControl;
|
||||
const ALeft, ATop, AWidth, AHeight: Integer);
|
||||
begin
|
||||
end;
|
||||
|
||||
class procedure TCDWSCustomForm.SetIcon(const AForm: TCustomForm; const Small, Big: HICON);
|
||||
begin
|
||||
end;
|
||||
|
||||
class procedure TCDWSCustomForm.SetShowInTaskbar(const AForm: TCustomForm;
|
||||
const AValue: TShowInTaskbar);
|
||||
begin
|
||||
end;
|
||||
|
||||
class procedure TCDWSCustomForm.ShowModal(const ACustomForm: TCustomForm);
|
||||
begin
|
||||
end;
|
||||
|
||||
class procedure TCDWSCustomForm.ShowHide(const AWinControl: TWinControl);
|
||||
begin
|
||||
end;
|
||||
|
@ -85,7 +85,7 @@ end;"/>
|
||||
<Item10 Value="android"/>
|
||||
<Item11 Value="customdrawn"/>
|
||||
</Values>
|
||||
<ValueDescriptions Count="10"/>
|
||||
<ValueDescriptions Count="11"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Identifier Value="fpGUIPlatform"/>
|
||||
@ -110,7 +110,7 @@ end;"/>
|
||||
<License Value="modified LGPL-2
|
||||
"/>
|
||||
<Version Major="1" Release="1"/>
|
||||
<Files Count="364">
|
||||
<Files Count="366">
|
||||
<Item1>
|
||||
<Filename Value="android/androidint.pas"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
@ -1803,11 +1803,21 @@ end;"/>
|
||||
<Item363>
|
||||
<Filename Value="customdrawn/customdrawnwsforms_win.inc"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="customdrawnwsforms_win"/>
|
||||
</Item363>
|
||||
<Item364>
|
||||
<Filename Value="customdrawn/customdrawnwscontrols_win.inc"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
<UnitName Value="customdrawnwscontrols_win"/>
|
||||
</Item364>
|
||||
<Item365>
|
||||
<Filename Value="customdrawn/customdrawnwsforms_x11.inc"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
</Item365>
|
||||
<Item366>
|
||||
<Filename Value="customdrawn/customdrawnobject_x11.inc"/>
|
||||
<AddToUsesPkgSection Value="False"/>
|
||||
</Item366>
|
||||
</Files>
|
||||
<LazDoc Paths="../../docs/xml/lcl"/>
|
||||
<i18n>
|
||||
|
Loading…
Reference in New Issue
Block a user