mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-14 21:36:18 +02:00
Clean outdated DEFINEs from the code, like old compiler versions and FPC_HAS_CONSTREF.
git-svn-id: trunk@43628 -
This commit is contained in:
parent
ff218c978f
commit
c30eb3edd3
@ -69,13 +69,8 @@ uses
|
||||
file_utils_ ;
|
||||
|
||||
const
|
||||
{$IFDEF Ver2_2}
|
||||
xFalse = False;
|
||||
xTrue = True;
|
||||
{$ELSE}
|
||||
xFalse = 0;
|
||||
xTrue = 1;
|
||||
{$ENDIF}
|
||||
|
||||
{ TYPES DEFINITION }
|
||||
const
|
||||
|
@ -31,8 +31,6 @@ unit fppkg_mainfrm;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
{$IFDEF VER2_4}{$ERROR This package requires at least fpc 2.5.1}{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
|
@ -306,14 +306,9 @@ begin
|
||||
+le
|
||||
+'uses'+le
|
||||
+' Classes, SysUtils, httpDefs, fpweb,'
|
||||
{$ifndef VER2_4}
|
||||
+' custweb, custcgi;'+le
|
||||
{$else}
|
||||
+' custcgi;'+le
|
||||
{$endif}
|
||||
+le
|
||||
+'Type'+le
|
||||
{$ifndef VER2_4}
|
||||
+' TMyCGIHandler = Class(TCgiHandler)'+le
|
||||
+' Public'+le
|
||||
+' Procedure HandleRequest(ARequest : Trequest; AResponse : TResponse); override;'+le
|
||||
@ -334,18 +329,6 @@ begin
|
||||
+'begin'+le
|
||||
+' Result:=TMyCgiHandler.Create(self);'+le
|
||||
+'end;'+le
|
||||
{$else VER2_4}
|
||||
+' TMyCGIApp = Class(TCustomCGIApplication)'+le
|
||||
+' Protected'+le
|
||||
+' Procedure HandleRequest(ARequest : Trequest; AResponse : TResponse); override;'+le
|
||||
+' end;'+le
|
||||
+le+le
|
||||
+'Procedure TMyCGIApp.HandleRequest(ARequest : Trequest; AResponse : TResponse);'+le
|
||||
+le
|
||||
+'begin'+le
|
||||
+' // Your code here'+le
|
||||
+'end;'+le
|
||||
{$endif VER2_4}
|
||||
+le+le
|
||||
+'begin'+le
|
||||
+' With TMyCGIApp.Create(Nil) do'+le
|
||||
|
@ -789,11 +789,7 @@ begin
|
||||
AThread.AddToList(FFirstActiveThread,mtptlPool);
|
||||
AThread.Item.FState:=mtptsActive;
|
||||
if NewThread then
|
||||
{$IF defined(VER2_4_2) or defined(VER2_4_3)}
|
||||
AThread.Resume
|
||||
{$ELSE}
|
||||
AThread.Start
|
||||
{$ENDIF}
|
||||
else
|
||||
RTLeventSetEvent(AThread.Item.fWaitForPool);
|
||||
end;
|
||||
|
@ -13,20 +13,12 @@ unit GLGtkGlxContext;
|
||||
{$LinkLib GL}
|
||||
{$PACKRECORDS C}
|
||||
|
||||
{$IFNDEF VER2_4}
|
||||
{$Define UseFPGLX}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, ctypes, LCLProc, LCLType, X, XUtil, XLib, gl,
|
||||
InterfaceBase,
|
||||
{$IFDEF UseFPGLX}
|
||||
glx,
|
||||
{$ELSE}
|
||||
ctypes,
|
||||
{$ENDIF}
|
||||
WSLCLClasses,
|
||||
{$IFDEF LCLGTK2}
|
||||
LMessages, Gtk2Def, gdk2x, glib2, gdk2, gtk2, Gtk2Int,
|
||||
@ -36,51 +28,11 @@ uses
|
||||
{$ENDIF}
|
||||
Controls;
|
||||
|
||||
{$IFDEF UseFPGLX}
|
||||
type
|
||||
TGLBool = longbool;
|
||||
const
|
||||
GLXTrue:longbool = true;
|
||||
GLXFalse:longbool = false;
|
||||
{$ELSE}
|
||||
type
|
||||
TGLBool = cint;
|
||||
const
|
||||
GLXTrue = 1;
|
||||
GLXFalse = 0;
|
||||
|
||||
{ Constants below are the same as in FPC GLX unit. }
|
||||
|
||||
// GLX 1.3 and later:
|
||||
GLX_X_RENDERABLE = $8012;
|
||||
|
||||
// Tokens for glXChooseVisual and glXGetConfig.
|
||||
GLX_USE_GL = 1;
|
||||
GLX_BUFFER_SIZE = 2;
|
||||
GLX_LEVEL = 3;
|
||||
GLX_RGBA = 4;
|
||||
GLX_DOUBLEBUFFER = 5;
|
||||
GLX_STEREO = 6;
|
||||
GLX_AUX_BUFFERS = 7;
|
||||
GLX_RED_SIZE = 8;
|
||||
GLX_GREEN_SIZE = 9;
|
||||
GLX_BLUE_SIZE = 10;
|
||||
GLX_ALPHA_SIZE = 11;
|
||||
GLX_DEPTH_SIZE = 12;
|
||||
GLX_STENCIL_SIZE = 13;
|
||||
GLX_ACCUM_RED_SIZE = 14;
|
||||
GLX_ACCUM_GREEN_SIZE = 15;
|
||||
GLX_ACCUM_BLUE_SIZE = 16;
|
||||
GLX_ACCUM_ALPHA_SIZE = 17;
|
||||
|
||||
// For non conformant FBConfigs
|
||||
GLX_CONFIG_CAVEAT = 32;
|
||||
GLX_NON_CONFORMANT_CONFIG = 32781;
|
||||
|
||||
// GLX_ARB_multisample
|
||||
GLX_SAMPLE_BUFFERS_ARB = 100000;
|
||||
GLX_SAMPLES_ARB = 100001;
|
||||
{$ENDIF}
|
||||
|
||||
type
|
||||
TGdkGLContext = record end;
|
||||
@ -194,28 +146,6 @@ type
|
||||
//PGLXDrawable = ^GLXDrawable;
|
||||
GLXDrawable = {%H-}TXID;
|
||||
|
||||
{$IFNDEF UseFPGLX}
|
||||
{ GLX 1.0 functions. }
|
||||
|
||||
function glXChooseVisual(dpy:PDisplay; screen:longint; attrib_list:Plongint):PXVisualInfo;cdecl;external;
|
||||
procedure glXCopyContext(dpy:PDisplay; src:TGLXContext; dst:TGLXContext; mask: cardinal);cdecl;external;
|
||||
function glXCreateContext(dpy:PDisplay; vis:PXVisualInfo; share_list:TGLXContext; direct:TGLBool):TGLXContext;cdecl;external;
|
||||
function glXCreateGLXPixmap(dpy:PDisplay; vis:PXVisualInfo; pixmap:TPixmap):GLXPixmap;cdecl;external;
|
||||
procedure glXDestroyContext(dpy:PDisplay; ctx:TGLXContext);cdecl;external;
|
||||
procedure glXDestroyGLXPixmap(dpy:PDisplay; pix:GLXPixmap);cdecl;external;
|
||||
function glXGetConfig(dpy:PDisplay; vis:PXVisualInfo; attrib:longint; var value:longint):longint;cdecl;external;
|
||||
function glXGetCurrentContext:TGLXContext;cdecl;external;
|
||||
function glXGetCurrentDrawable:GLXDrawable;cdecl;external;
|
||||
function glXIsDirect(dpy:PDisplay; ctx:TGLXContext):TGLBool;cdecl;external;
|
||||
function glXMakeCurrent(dpy:PDisplay; drawable:GLXDrawable; ctx:TGLXContext):TGLBool;cdecl;external;
|
||||
function glXQueryExtension(dpy:PDisplay; var error_base:longint; var event_base:longint):TGLBool;cdecl;external;
|
||||
function glXQueryVersion(dpy:PDisplay; major:Plongint; minor:Plongint):TGLBool;cdecl;external;
|
||||
procedure glXSwapBuffers(dpy:PDisplay; drawable:GLXDrawable);cdecl;external;
|
||||
procedure glXUseXFont(font:TFont; first:longint; count:longint; list_base:longint);cdecl;external;
|
||||
procedure glXWaitGL;cdecl;external;
|
||||
procedure glXWaitX;cdecl;external;
|
||||
{$ENDIF}
|
||||
|
||||
procedure g_return_if_fail(b: boolean; const Msg: string);
|
||||
begin
|
||||
if not b then raise Exception.Create(Msg);
|
||||
@ -653,56 +583,15 @@ begin
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function gtk_gl_area_share_new(Attribs: TContextAttribs; share: PGtkGLArea
|
||||
): PGtkWidget;
|
||||
function gtk_gl_area_share_new(Attribs: TContextAttribs; share: PGtkGLArea): PGtkWidget;
|
||||
var
|
||||
gl_area: PGtkGLArea;
|
||||
{$IFNDEF UseFPGLX}
|
||||
visual: PGdkVisual;
|
||||
sharelist: PGdkGLContext;
|
||||
glcontext: PGdkGLContext;
|
||||
{$ENDIF}
|
||||
begin
|
||||
Result := nil;
|
||||
//DebugLn(['gtk_gl_area_share_new START']);
|
||||
if (share <> nil) and (not GTK_IS_GL_AREA(share)) then
|
||||
exit;
|
||||
{$IFDEF UseFPGLX}
|
||||
gl_area:=gtk_gl_area_share_new_usefpglx(Attribs, share);
|
||||
{$ELSE}
|
||||
{$IFNDEF MSWindows}
|
||||
{$IFDEF lclgtk2}
|
||||
visual := nil;
|
||||
{$ELSE}
|
||||
visual := gdk_gl_choose_visual(attrlist);
|
||||
if (visual = nil) then exit;
|
||||
{$ENDIF}
|
||||
{$ENDIF non MSWindows}
|
||||
|
||||
sharelist := nil;
|
||||
if share <> nil then sharelist := share^.glcontext;
|
||||
glcontext := gdk_gl_context_share_new(visual, sharelist, GLXTrue, attrlist);
|
||||
if (glcontext = nil) then exit;
|
||||
|
||||
{$IFNDEF MSWindows}
|
||||
if visual <> nil then begin
|
||||
// use colormap and visual suitable for OpenGL rendering
|
||||
gtk_widget_push_colormap(gdk_colormap_new(visual, gtk_TRUE));
|
||||
gtk_widget_push_visual(visual);
|
||||
end;
|
||||
{$ENDIF non MSWindows}
|
||||
|
||||
gl_area := gtk_type_new (gtk_gl_area_get_type);
|
||||
gl_area^.glcontext := glcontext;
|
||||
|
||||
{$IFNDEF MSWindows}
|
||||
if visual<>nil then begin
|
||||
// pop back defaults
|
||||
gtk_widget_pop_visual;
|
||||
gtk_widget_pop_colormap;
|
||||
end;
|
||||
{$ENDIF non MSWindows}
|
||||
{$ENDIF UseFPGLX}
|
||||
gl_area:=gtk_gl_area_share_new_usefpglx(Attribs, share);
|
||||
Result:=PGtkWidget(gl_area);
|
||||
end;
|
||||
|
||||
@ -1013,13 +902,7 @@ begin
|
||||
debugln(['LOpenGLCreateContext MultiSampling=',MultiSampling]);
|
||||
{$ENDIF}
|
||||
if (MultiSampling > 1) and
|
||||
{$IFDEF UseFPGLX}
|
||||
GLX_ARB_multisample(GetDefaultXDisplay, DefaultScreen(GetDefaultXDisplay))
|
||||
{$ELSE}
|
||||
false { no GLX_ARB_multisample support when UseFPGLX undefined,
|
||||
it would be too convoluted to replicate GLX unit extension querying
|
||||
functionality here }
|
||||
{$ENDIF}
|
||||
then begin
|
||||
{$IFDEF VerboseMultiSampling}
|
||||
debugln(['LOpenGLCreateContext GLX_ARB_multisample succeeded']);
|
||||
@ -1113,7 +996,7 @@ begin
|
||||
{$IFDEF VerboseMultiSampling}
|
||||
debugln(['CreateOpenGLContextAttrList MultiSampling=',MultiSampling]);
|
||||
{$ENDIF}
|
||||
UseFBConfig := {$IFDEF UseFPGLX} GLX_version_1_3(GetDefaultXDisplay) {$else} false {$endif};
|
||||
UseFBConfig := GLX_version_1_3(GetDefaultXDisplay);
|
||||
Result:=nil;
|
||||
CreateList;
|
||||
GetMem(Result,SizeOf(integer)*p);
|
||||
|
@ -242,11 +242,7 @@ begin
|
||||
Item.ProgressItem:=CreateProgressItem('FPCSrcScan',
|
||||
Format(lisCreatingFileIndexOfFPCSources, [Directory]),
|
||||
lisTheFileIndexIsNeededForFunctionsLikeFindDeclaratio);
|
||||
{$IF defined(VER2_4_2) or defined(VER2_4_3)}
|
||||
Item.Resume;
|
||||
{$ELSE}
|
||||
Item.Start;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
@ -87,15 +87,9 @@ type
|
||||
procedure ClearImages;
|
||||
public
|
||||
// IUnknown
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function QueryInterface(const iid: TGuid; out obj): LongInt; stdcall;
|
||||
function _AddRef: LongInt; stdcall;
|
||||
function _Release: LongInt; stdcall;
|
||||
{$ENDIF}
|
||||
// IImageCacheListener
|
||||
procedure CacheSetImageList(AImageList: TCustomImageList);
|
||||
procedure CacheSetImageIndex(AIndex, AImageIndex: Integer);
|
||||
|
@ -547,7 +547,7 @@ type
|
||||
procedure SetFPColor(const AValue: TFPColor); override;
|
||||
procedure SetHeight(Avalue: Integer);
|
||||
procedure SetName(AValue: string); override;
|
||||
procedure SetOrientation(AValue: Integer);{$IFNDEF VER2_4}{$IFNDEF VER2_5}override;{$ENDIF}{$ENDIF}// This was introduced in 2.5 quite late, and the Android pre-compiled compiler was before this, so I prefer to let it only for 2.6
|
||||
procedure SetOrientation(AValue: Integer); override; // This was introduced in 2.5 quite late, and the Android pre-compiled compiler was before this, so I prefer to let it only for 2.6
|
||||
procedure SetPitch(Value: TFontPitch);
|
||||
procedure SetSize(AValue: integer); override;
|
||||
procedure SetStyle(Value: TFontStyles);
|
||||
|
@ -287,11 +287,7 @@ begin
|
||||
FImageIndexes[i] := -1;
|
||||
end;
|
||||
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function TButtonGlyph.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function TButtonGlyph.QueryInterface(const iid: TGuid; out obj): longint; stdcall;
|
||||
{$ENDIF}
|
||||
begin
|
||||
if GetInterface(iid, obj) then
|
||||
Result := 0
|
||||
@ -299,12 +295,12 @@ begin
|
||||
Result := E_NOINTERFACE;
|
||||
end;
|
||||
|
||||
function TButtonGlyph._AddRef: longint; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TButtonGlyph._AddRef: longint; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function TButtonGlyph._Release: longint; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TButtonGlyph._Release: longint; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
@ -47,13 +47,6 @@ function OSError(AResult: OSStatus; const AObject: TObject; const AMethodName, A
|
||||
function OSError(AResult: OSStatus; const AMethodName, ACallName: String;
|
||||
const AText: String; AValidResult: OSStatus): Boolean;
|
||||
|
||||
{$IFDEF VER2_4}
|
||||
const
|
||||
kFontNoPlatformCode = $FFFFFFFF;
|
||||
kFontNoScriptCode = $FFFFFFFF;
|
||||
kFontNoLanguageCode = $FFFFFFFF;
|
||||
{$ENDIF}
|
||||
|
||||
var
|
||||
DefaultTextStyle: ATSUStyle; // default Carbon text style
|
||||
RGBColorSpace: CGColorSpaceRef; // global RGB color space
|
||||
|
@ -1505,14 +1505,3 @@ begin
|
||||
end;
|
||||
*)
|
||||
|
||||
// This code is unnecessary in FPC 2.6+,
|
||||
// it was required when the 2.5.1 snapshot was created
|
||||
{$ifdef ver2_5}
|
||||
procedure PASCALMAIN; external name 'PASCALMAIN';
|
||||
|
||||
procedure FPC_SHARED_LIB_START; [public, alias: 'FPC_SHARED_LIB_START'];
|
||||
begin
|
||||
PASCALMAIN;
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
|
@ -87,15 +87,9 @@ type
|
||||
procedure SetVisible(AValue: Boolean);
|
||||
protected
|
||||
// IUnknown implementation
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function QueryInterface(const iid : tguid;out obj) : longint;stdcall;
|
||||
function _AddRef : longint;stdcall;
|
||||
function _Release : longint;stdcall;
|
||||
{$ENDIF}
|
||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function EatArrowKeys(const AKey: Word): Boolean; virtual;
|
||||
function getText: String; virtual;
|
||||
procedure setText(AValue: String); virtual;
|
||||
|
@ -147,15 +147,9 @@ type
|
||||
function ShiftStateToQtModifiers(Shift: TShiftState): QtModifier;
|
||||
protected
|
||||
// IUnknown implementation
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function QueryInterface(const iid : tguid;out obj) : longint;stdcall;
|
||||
function _AddRef : longint;stdcall;
|
||||
function _Release : longint;stdcall;
|
||||
{$ENDIF}
|
||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function GetContext: HDC; virtual;
|
||||
function CreateWidget(const Params: TCreateParams):QWidgetH; virtual;
|
||||
procedure DestroyWidget; virtual;
|
||||
@ -5041,11 +5035,7 @@ begin
|
||||
if ssAlt in Shift then Inc(Result, QtALT);
|
||||
end;
|
||||
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function TQtWidget.QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function TQtWidget.QueryInterface(const iid: tguid; out obj): longint; stdcall;
|
||||
{$ENDIF}
|
||||
begin
|
||||
if GetInterface(iid, obj) then
|
||||
Result := 0
|
||||
@ -5053,20 +5043,12 @@ begin
|
||||
Result := E_NOINTERFACE;
|
||||
end;
|
||||
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function TQtWidget._AddRef: longint; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function TQtWidget._AddRef: longint; stdcall;
|
||||
{$ENDIF}
|
||||
begin
|
||||
Result := -1; // no ref counting
|
||||
end;
|
||||
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function TQtWidget._Release: longint; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function TQtWidget._Release: longint; stdcall;
|
||||
{$ENDIF}
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
@ -201,10 +201,8 @@ function Replace(Const Str, OrigStr, ReplStr: String; Const Global: Boolean): St
|
||||
Str into substrings around SplitStr }
|
||||
function Split(Const Str: String; SplitStr: String; Count: Integer; Const CaseSensitive: Boolean): TStringList;
|
||||
|
||||
//{$ifdef VER2_0}
|
||||
function GET_X_LPARAM(lp : Windows.LParam) : longint;
|
||||
function GET_Y_LPARAM(lp : Windows.LParam) : longint;
|
||||
//{$endif VER2_0}
|
||||
|
||||
// the declaration in the windows unit doesn't have the FlagsEx field
|
||||
type
|
||||
@ -351,18 +349,15 @@ Begin
|
||||
End;
|
||||
End;
|
||||
|
||||
//{$ifdef VER2_0}
|
||||
function GET_X_LPARAM(lp : Windows.LParam) : longint;
|
||||
begin
|
||||
result:=smallint(LOWORD(lp));
|
||||
end;
|
||||
|
||||
|
||||
function GET_Y_LPARAM(lp : Windows.LParam) : longint;
|
||||
begin
|
||||
result:=smallint(HIWORD(lp));
|
||||
end;
|
||||
//{$endif VER2_0}
|
||||
|
||||
Initialization
|
||||
|
||||
|
@ -390,15 +390,9 @@ type
|
||||
public
|
||||
function GetUpdateDescription: Boolean;
|
||||
procedure SetUpdateDescription(AValue: Boolean);
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function QueryInterface(const iid: TGuid; out obj): LongInt; stdcall;
|
||||
function _AddRef: LongInt; stdcall;
|
||||
function _Release: LongInt; stdcall;
|
||||
{$ENDIF}
|
||||
protected
|
||||
procedure ClearPixelToColorTree;
|
||||
procedure InternalRead(Str: TStream; Img: TFPCustomImage); override;
|
||||
@ -492,15 +486,9 @@ type
|
||||
public
|
||||
function GetUpdateDescription: Boolean;
|
||||
procedure SetUpdateDescription(AValue: Boolean);
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function QueryInterface(const iid: TGuid; out obj): LongInt; stdcall;
|
||||
function _AddRef: LongInt; stdcall;
|
||||
function _Release: LongInt; stdcall;
|
||||
{$ENDIF}
|
||||
protected
|
||||
procedure InitLineBuf;
|
||||
procedure FreeLineBuf;
|
||||
@ -539,15 +527,9 @@ type
|
||||
|
||||
TLazWriterBMP = class(TFPWriterBMP, ILazImageWriter)
|
||||
public
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function QueryInterface(const iid: TGuid; out obj): LongInt; stdcall;
|
||||
function _AddRef: LongInt; stdcall;
|
||||
function _Release: LongInt; stdcall;
|
||||
{$ENDIF}
|
||||
public
|
||||
procedure Initialize(AImage: TLazIntfImage);
|
||||
procedure Finalize;
|
||||
@ -572,15 +554,9 @@ type
|
||||
public
|
||||
function GetUpdateDescription: Boolean;
|
||||
procedure SetUpdateDescription(AValue: Boolean);
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function QueryInterface(const iid: TGuid; out obj): LongInt; stdcall;
|
||||
function _AddRef: LongInt; stdcall;
|
||||
function _Release: LongInt; stdcall;
|
||||
{$ENDIF}
|
||||
protected
|
||||
procedure DoDecompress; override;
|
||||
procedure HandleAlpha; override;
|
||||
@ -593,15 +569,9 @@ type
|
||||
|
||||
TLazWriterPNG = class(TFPWriterPNG, ILazImageWriter)
|
||||
public
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function QueryInterface(const iid: TGuid; out obj): LongInt; stdcall;
|
||||
function _AddRef: LongInt; stdcall;
|
||||
function _Release: LongInt; stdcall;
|
||||
{$ENDIF}
|
||||
public
|
||||
procedure Initialize(AImage: TLazIntfImage);
|
||||
procedure Finalize;
|
||||
@ -637,15 +607,9 @@ type
|
||||
public
|
||||
function GetUpdateDescription: Boolean;
|
||||
procedure SetUpdateDescription(AValue: Boolean);
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function QueryInterface(const iid: TGuid; out obj): LongInt; stdcall;
|
||||
function _AddRef: LongInt; stdcall;
|
||||
function _Release: LongInt; stdcall;
|
||||
{$ENDIF}
|
||||
protected
|
||||
procedure InternalRead(Str:TStream; Img:TFPCustomImage); override;
|
||||
public
|
||||
@ -656,15 +620,9 @@ type
|
||||
|
||||
TLazWriterTiff = class(TFPWriterTiff, ILazImageWriter)
|
||||
public
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function QueryInterface(const iid: TGuid; out obj): LongInt; stdcall;
|
||||
function _AddRef: LongInt; stdcall;
|
||||
function _Release: LongInt; stdcall;
|
||||
{$ENDIF}
|
||||
protected
|
||||
procedure InternalWrite(Stream: TStream; Img: TFPCustomImage); override;
|
||||
public
|
||||
@ -697,15 +655,9 @@ type
|
||||
public
|
||||
function GetUpdateDescription: Boolean;
|
||||
procedure SetUpdateDescription(AValue: Boolean);
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
function _Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function QueryInterface(const iid: TGuid; out obj): LongInt; stdcall;
|
||||
function _AddRef: LongInt; stdcall;
|
||||
function _Release: LongInt; stdcall;
|
||||
{$ENDIF}
|
||||
public
|
||||
constructor Create; override;
|
||||
destructor Destroy; override;
|
||||
@ -4320,11 +4272,7 @@ begin
|
||||
Progress(psEnding, 100, false, Rect(0,0,0,0), '', FContinue);
|
||||
end;
|
||||
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function TLazReaderXPM.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function TLazReaderXPM.QueryInterface(const iid: TGuid; out obj): longint; stdcall;
|
||||
{$ENDIF}
|
||||
begin
|
||||
if GetInterface(iid, obj)
|
||||
then Result := S_OK
|
||||
@ -4336,12 +4284,12 @@ begin
|
||||
FUpdateDescription := AValue;
|
||||
end;
|
||||
|
||||
function TLazReaderXPM._AddRef: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazReaderXPM._AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function TLazReaderXPM._Release: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazReaderXPM._Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
@ -5137,23 +5085,19 @@ begin
|
||||
BitsPerPixel := AImage.DataDescription.Depth;
|
||||
end;
|
||||
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function TLazWriterBMP.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function TLazWriterBMP.QueryInterface(const iid: TGuid; out obj): longint; stdcall;
|
||||
{$ENDIF}
|
||||
begin
|
||||
if GetInterface(iid, obj)
|
||||
then Result := S_OK
|
||||
else Result := E_NOINTERFACE;
|
||||
end;
|
||||
|
||||
function TLazWriterBMP._AddRef: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazWriterBMP._AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function TLazWriterBMP._Release: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazWriterBMP._Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
@ -5575,12 +5519,12 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TLazReaderDIB._AddRef: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazReaderDIB._AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function TLazReaderDIB._Release: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazReaderDIB._Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
@ -5832,11 +5776,7 @@ begin
|
||||
then CheckAlphaDescription(TheImage);
|
||||
end;
|
||||
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function TLazReaderDIB.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function TLazReaderDIB.QueryInterface(const iid: TGuid; out obj): longint; stdcall;
|
||||
{$ENDIF}
|
||||
begin
|
||||
if GetInterface(iid, obj)
|
||||
then Result := S_OK
|
||||
@ -6139,27 +6079,9 @@ begin
|
||||
end;
|
||||
|
||||
procedure TLazReaderPNG.HandleAlpha;
|
||||
{$ifdef VER2_4}
|
||||
var
|
||||
n: Integer;
|
||||
c: TFPColor;
|
||||
{$endif}
|
||||
begin
|
||||
inherited HandleAlpha;
|
||||
FAlphaPalette := Header.ColorType = 3;
|
||||
|
||||
// check for fpc 2.4, it expands the alpha channel wrong, so the MSByte isn't set
|
||||
{$ifdef VER2_4}
|
||||
if not FAlphaPalette then Exit;
|
||||
for n := 0 to ThePalette.Count - 1 do
|
||||
begin
|
||||
c := ThePalette[n];
|
||||
if c.Alpha and $FF00 <> 0 then Continue;
|
||||
if c.Alpha = 0 then Continue;
|
||||
c.Alpha := c.Alpha shl 8 or c.Alpha;
|
||||
ThePalette[n] := c;
|
||||
end;
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
procedure TLazReaderPNG.InternalRead(Str: TStream; Img: TFPCustomImage);
|
||||
@ -6168,11 +6090,7 @@ begin
|
||||
inherited InternalRead(Str, Img);
|
||||
end;
|
||||
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function TLazReaderPNG.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function TLazReaderPNG.QueryInterface(const iid: TGuid; out obj): longint; stdcall;
|
||||
{$ENDIF}
|
||||
begin
|
||||
if GetInterface(iid, obj)
|
||||
then Result := S_OK
|
||||
@ -6184,12 +6102,12 @@ begin
|
||||
FUpdateDescription := AValue;
|
||||
end;
|
||||
|
||||
function TLazReaderPNG._AddRef: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazReaderPNG._AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function TLazReaderPNG._Release: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazReaderPNG._Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
@ -6210,23 +6128,19 @@ begin
|
||||
or (AImage.DataDescription.BluePrec > 8);
|
||||
end;
|
||||
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function TLazWriterPNG.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function TLazWriterPNG.QueryInterface(const iid: TGuid; out obj): longint; stdcall;
|
||||
{$ENDIF}
|
||||
begin
|
||||
if GetInterface(iid, obj)
|
||||
then Result := S_OK
|
||||
else Result := E_NOINTERFACE;
|
||||
end;
|
||||
|
||||
function TLazWriterPNG._AddRef: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazWriterPNG._AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function TLazWriterPNG._Release: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazWriterPNG._Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
@ -6334,11 +6248,7 @@ begin
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function TLazReaderTiff.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function TLazReaderTiff.QueryInterface(const iid: TGuid; out obj): longint; stdcall;
|
||||
{$ENDIF}
|
||||
begin
|
||||
if GetInterface(iid, obj)
|
||||
then Result := S_OK
|
||||
@ -6350,12 +6260,12 @@ begin
|
||||
FUpdateDescription := AValue;
|
||||
end;
|
||||
|
||||
function TLazReaderTiff._AddRef: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazReaderTiff._AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function TLazReaderTiff._Release: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazReaderTiff._Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
@ -6391,23 +6301,19 @@ begin
|
||||
SaveToStream(Stream);
|
||||
end;
|
||||
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function TLazWriterTiff.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function TLazWriterTiff.QueryInterface(const iid: TGuid; out obj): longint; stdcall;
|
||||
{$ENDIF}
|
||||
begin
|
||||
if GetInterface(iid, obj)
|
||||
then Result := S_OK
|
||||
else Result := E_NOINTERFACE;
|
||||
end;
|
||||
|
||||
function TLazWriterTiff._AddRef: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazWriterTiff._AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function TLazWriterTiff._Release: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazWriterTiff._Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
@ -6474,23 +6380,19 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{$IFDEF FPC_HAS_CONSTREF}
|
||||
function TLazReaderIcnsPart.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
{$ELSE}
|
||||
function TLazReaderIcnsPart.QueryInterface(const iid: TGuid; out obj): longint; stdcall;
|
||||
{$ENDIF}
|
||||
begin
|
||||
if GetInterface(iid, obj)
|
||||
then Result := S_OK
|
||||
else Result := E_NOINTERFACE;
|
||||
end;
|
||||
|
||||
function TLazReaderIcnsPart._AddRef: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazReaderIcnsPart._AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function TLazReaderIcnsPart._Release: LongInt; {$IFDEF FPC_HAS_CONSTREF}{$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF}{$ELSE}stdcall{$ENDIF};
|
||||
function TLazReaderIcnsPart._Release: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||
begin
|
||||
Result := -1;
|
||||
end;
|
||||
|
@ -87,7 +87,7 @@ type
|
||||
FAssignedFont: TFPCustomFont;
|
||||
FAssignedPen: TFPCustomPen;
|
||||
FBaseWindowOrg: TPoint;
|
||||
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6)}
|
||||
{$if defined(ver2_6)}
|
||||
FLazClipRegion: TFPCustomRegion;
|
||||
{$endif}
|
||||
FWindowOrg: TPoint; // already in absolute coords with BaseWindowOrg summed up
|
||||
@ -127,11 +127,6 @@ type
|
||||
const ADestX, ADestY, ASourceX, ASourceY, ASourceWidth, ASourceHeight: Integer);
|
||||
procedure CanvasCopyRect(ASource: TLazCanvas;
|
||||
const ADestX, ADestY, ASourceX, ASourceY, ASourceWidth, ASourceHeight: Integer);
|
||||
// Compatibility with older FPC versions
|
||||
{$if defined(ver2_4) or defined(ver2_5)}
|
||||
procedure FillRect(const ARect: TRect);
|
||||
procedure FillRect(X1,Y1,X2,Y2: Integer);
|
||||
{$endif}
|
||||
// Fills the entire drawing with a color
|
||||
// AIgnoreClippingAndWindowOrg speeds up the drawing a lot, but it is dangerous,
|
||||
// don't use it unless you know what you are doing!
|
||||
@ -153,7 +148,7 @@ type
|
||||
// because operations of SetWindowOrg inside a non-native wincontrol will be
|
||||
// based upon the BaseWindowOrg which is set relative to the Form canvas
|
||||
property BaseWindowOrg: TPoint read FBaseWindowOrg write FBaseWindowOrg;
|
||||
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6)}
|
||||
{$if defined(ver2_6)}
|
||||
property ClipRegion: TFPCustomRegion read FLazClipRegion write FLazClipRegion;
|
||||
{$endif}
|
||||
property WindowOrg: TPoint read GetWindowOrg write SetWindowOrg;
|
||||
@ -216,7 +211,7 @@ var
|
||||
begin
|
||||
lx := x + FWindowOrg.X;
|
||||
ly := y + FWindowOrg.Y;
|
||||
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6)}
|
||||
{$if defined(ver2_6)}
|
||||
if Clipping and (not FLazClipRegion.IsPointInRegion(lx, ly)) then
|
||||
Exit;
|
||||
if (lx >= 0) and (lx < width) and (ly >= 0) and (ly < height) then
|
||||
@ -438,7 +433,7 @@ end;
|
||||
procedure TLazCanvas.SetLazClipRegion(ARegion: TLazRegion);
|
||||
begin
|
||||
Clipping := True;
|
||||
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6)}
|
||||
{$if defined(ver2_6)}
|
||||
ClipRect := TLazRegionRect(ARegion.Parts.Items[0]).Rect;
|
||||
FLazClipRegion := ARegion;
|
||||
{$else}
|
||||
@ -690,25 +685,6 @@ begin
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{$if defined(ver2_4) or defined(ver2_5)}
|
||||
procedure TLazCanvas.FillRect(const ARect: TRect);
|
||||
begin
|
||||
if (Brush.style <> bsClear) then
|
||||
begin
|
||||
//if not (brush is TFPCustomDrawBrush) then
|
||||
DoRectangleFill (ARect)
|
||||
//else
|
||||
// with ARect do
|
||||
// TFPCustomDrawBrush(Brush).Rectangle (left,top,right,bottom);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TLazCanvas.FillRect(X1, Y1, X2, Y2: Integer);
|
||||
begin
|
||||
FillRect (Rect(X1,Y1,X2,Y2));
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
procedure TLazCanvas.FillColor(AColor: TFPColor;
|
||||
AIgnoreClippingAndWindowOrg: Boolean);
|
||||
var
|
||||
|
@ -50,7 +50,7 @@ type
|
||||
function IsPointInPart(AX, AY: Integer): Boolean; override;
|
||||
end;
|
||||
|
||||
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6)}
|
||||
{$if defined(ver2_6)}
|
||||
TFPCustomRegion = class
|
||||
function GetBoundingRect: TRect; virtual; abstract;
|
||||
function IsPointInRegion(AX, AY: Integer): Boolean; virtual; abstract;
|
||||
|
@ -27,10 +27,8 @@ interface
|
||||
uses
|
||||
{$IFDEF Darwin}MacOSAll, {$ENDIF}
|
||||
{$IFDEF win32}
|
||||
{$IFnDEF VER2_4}
|
||||
Win9xWsManager, // Support for Lower/UpperWideStringProc on Win9x, also used by some Utf8 string handling functions
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$IFnDEF WithOldDebugln} LazLogger, {$ENDIF}
|
||||
Classes, SysUtils, Math, TypInfo, Types, FPCAdds, AvgLvlTree, FileUtil,
|
||||
LCLStrConsts, LCLType, WSReferences, LazMethodList, LazUTF8;
|
||||
|
@ -55,12 +55,7 @@ end;
|
||||
|
||||
procedure RegisterDB;
|
||||
begin
|
||||
RegisterComponents('Data Access',[TDatasource
|
||||
// Only for fpc version 2.4.1 and above
|
||||
{$IFNDEF VER2_4_0}
|
||||
,TBufDataset // this bites dbflaz
|
||||
{$ENDIF}
|
||||
]);
|
||||
RegisterComponents('Data Access',[TDatasource,TBufDataset]); // this bites dbflaz
|
||||
end;
|
||||
|
||||
procedure RegisterSimpleIPC;
|
||||
|
@ -18,10 +18,6 @@
|
||||
MA 02111-1307, USA.
|
||||
}
|
||||
|
||||
{$IFNDEF VER2_4}
|
||||
{$DEFINE HAVESTRICT}
|
||||
{$ENDIF}
|
||||
|
||||
unit frmmain;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
@ -908,9 +904,6 @@ Var
|
||||
S : String;
|
||||
|
||||
begin
|
||||
{$IFNDEF HAVESTRICT}
|
||||
MIStrict.Visible:=False;
|
||||
{$ENDIF}
|
||||
S:=GetAppConfigFile(false,true);
|
||||
PSMain.IniFileName:=S;
|
||||
S:=ExtractFilePath(S);
|
||||
@ -952,9 +945,7 @@ begin
|
||||
try
|
||||
P:=TJSONParser.Create(S);
|
||||
try
|
||||
{$IFDEF HAVESTRICT}
|
||||
P.Strict:=FStrict;
|
||||
{$ENDIF}
|
||||
D:=P.Parse;
|
||||
finally
|
||||
P.Free;
|
||||
|
Loading…
Reference in New Issue
Block a user