Стартовый пул

This commit is contained in:
2024-04-02 08:46:59 +03:00
parent fd57fffd3a
commit 3bb34d000b
5591 changed files with 3291734 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="10"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="ptestvirtualscreen"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<Icon Value="0"/>
</General>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="BGLControls"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="ptestvirtualscreen.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<Target>
<Filename Value="ptestvirtualscreen"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@@ -0,0 +1,21 @@
program ptestvirtualscreen;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, Unit1
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,22 @@
object Form1: TForm1
Left = 598
Height = 240
Top = 229
Width = 320
Caption = 'Form1'
ClientHeight = 240
ClientWidth = 320
LCLVersion = '1.8.2.0'
object BGLVirtualScreen1: TBGLVirtualScreen
Left = 0
Height = 240
Top = 0
Width = 320
OnRedraw = BGLVirtualScreen1Redraw
Align = alClient
BevelWidth = 0
TabOrder = 0
UseDockManager = False
OnDblClick = BGLVirtualScreen1DblClick
end
end

View File

@@ -0,0 +1,69 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
BGLVirtualScreen, BGRAOpenGL;
type
{ TForm1 }
TForm1 = class(TForm)
BGLVirtualScreen1: TBGLVirtualScreen;
procedure BGLVirtualScreen1DblClick(Sender: TObject);
procedure BGLVirtualScreen1Redraw(Sender: TObject; BGLContext: TBGLContext);
private
OriginalBounds: TRect;
OriginalWindowState: TWindowState;
procedure SwitchFullScreen;
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
uses BGRABitmapTypes;
{ TForm1 }
procedure TForm1.SwitchFullScreen;
begin
if BorderStyle <> bsNone then begin
// To full screen
OriginalWindowState := WindowState;
OriginalBounds := BoundsRect;
BorderStyle := bsNone;
BoundsRect := Screen.MonitorFromWindow(Handle).BoundsRect;
end else begin
// From full screen
BorderStyle := bsSizeable;
if OriginalWindowState = wsMaximized then
WindowState := wsMaximized
else
BoundsRect := OriginalBounds;
end;
end;
procedure TForm1.BGLVirtualScreen1Redraw(Sender: TObject;
BGLContext: TBGLContext);
begin
BGLContext.Canvas.FillRect(10,10,100,100, CSSRed);
end;
// double-clic to switch to fullscreen
procedure TForm1.BGLVirtualScreen1DblClick(Sender: TObject);
begin
SwitchFullScreen;
end;
end.