mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-15 11:36:06 +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_ ;
|
file_utils_ ;
|
||||||
|
|
||||||
const
|
const
|
||||||
{$IFDEF Ver2_2}
|
|
||||||
xFalse = False;
|
|
||||||
xTrue = True;
|
|
||||||
{$ELSE}
|
|
||||||
xFalse = 0;
|
xFalse = 0;
|
||||||
xTrue = 1;
|
xTrue = 1;
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
{ TYPES DEFINITION }
|
{ TYPES DEFINITION }
|
||||||
const
|
const
|
||||||
|
@ -31,8 +31,6 @@ unit fppkg_mainfrm;
|
|||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
{$IFDEF VER2_4}{$ERROR This package requires at least fpc 2.5.1}{$ENDIF}
|
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
@ -306,14 +306,9 @@ begin
|
|||||||
+le
|
+le
|
||||||
+'uses'+le
|
+'uses'+le
|
||||||
+' Classes, SysUtils, httpDefs, fpweb,'
|
+' Classes, SysUtils, httpDefs, fpweb,'
|
||||||
{$ifndef VER2_4}
|
|
||||||
+' custweb, custcgi;'+le
|
+' custweb, custcgi;'+le
|
||||||
{$else}
|
|
||||||
+' custcgi;'+le
|
|
||||||
{$endif}
|
|
||||||
+le
|
+le
|
||||||
+'Type'+le
|
+'Type'+le
|
||||||
{$ifndef VER2_4}
|
|
||||||
+' TMyCGIHandler = Class(TCgiHandler)'+le
|
+' TMyCGIHandler = Class(TCgiHandler)'+le
|
||||||
+' Public'+le
|
+' Public'+le
|
||||||
+' Procedure HandleRequest(ARequest : Trequest; AResponse : TResponse); override;'+le
|
+' Procedure HandleRequest(ARequest : Trequest; AResponse : TResponse); override;'+le
|
||||||
@ -334,18 +329,6 @@ begin
|
|||||||
+'begin'+le
|
+'begin'+le
|
||||||
+' Result:=TMyCgiHandler.Create(self);'+le
|
+' Result:=TMyCgiHandler.Create(self);'+le
|
||||||
+'end;'+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
|
+le+le
|
||||||
+'begin'+le
|
+'begin'+le
|
||||||
+' With TMyCGIApp.Create(Nil) do'+le
|
+' With TMyCGIApp.Create(Nil) do'+le
|
||||||
|
@ -789,11 +789,7 @@ begin
|
|||||||
AThread.AddToList(FFirstActiveThread,mtptlPool);
|
AThread.AddToList(FFirstActiveThread,mtptlPool);
|
||||||
AThread.Item.FState:=mtptsActive;
|
AThread.Item.FState:=mtptsActive;
|
||||||
if NewThread then
|
if NewThread then
|
||||||
{$IF defined(VER2_4_2) or defined(VER2_4_3)}
|
|
||||||
AThread.Resume
|
|
||||||
{$ELSE}
|
|
||||||
AThread.Start
|
AThread.Start
|
||||||
{$ENDIF}
|
|
||||||
else
|
else
|
||||||
RTLeventSetEvent(AThread.Item.fWaitForPool);
|
RTLeventSetEvent(AThread.Item.fWaitForPool);
|
||||||
end;
|
end;
|
||||||
|
@ -13,20 +13,12 @@ unit GLGtkGlxContext;
|
|||||||
{$LinkLib GL}
|
{$LinkLib GL}
|
||||||
{$PACKRECORDS C}
|
{$PACKRECORDS C}
|
||||||
|
|
||||||
{$IFNDEF VER2_4}
|
|
||||||
{$Define UseFPGLX}
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, ctypes, LCLProc, LCLType, X, XUtil, XLib, gl,
|
Classes, SysUtils, ctypes, LCLProc, LCLType, X, XUtil, XLib, gl,
|
||||||
InterfaceBase,
|
InterfaceBase,
|
||||||
{$IFDEF UseFPGLX}
|
|
||||||
glx,
|
glx,
|
||||||
{$ELSE}
|
|
||||||
ctypes,
|
|
||||||
{$ENDIF}
|
|
||||||
WSLCLClasses,
|
WSLCLClasses,
|
||||||
{$IFDEF LCLGTK2}
|
{$IFDEF LCLGTK2}
|
||||||
LMessages, Gtk2Def, gdk2x, glib2, gdk2, gtk2, Gtk2Int,
|
LMessages, Gtk2Def, gdk2x, glib2, gdk2, gtk2, Gtk2Int,
|
||||||
@ -36,51 +28,11 @@ uses
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Controls;
|
Controls;
|
||||||
|
|
||||||
{$IFDEF UseFPGLX}
|
|
||||||
type
|
type
|
||||||
TGLBool = longbool;
|
TGLBool = longbool;
|
||||||
const
|
const
|
||||||
GLXTrue:longbool = true;
|
GLXTrue:longbool = true;
|
||||||
GLXFalse:longbool = false;
|
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
|
type
|
||||||
TGdkGLContext = record end;
|
TGdkGLContext = record end;
|
||||||
@ -194,28 +146,6 @@ type
|
|||||||
//PGLXDrawable = ^GLXDrawable;
|
//PGLXDrawable = ^GLXDrawable;
|
||||||
GLXDrawable = {%H-}TXID;
|
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);
|
procedure g_return_if_fail(b: boolean; const Msg: string);
|
||||||
begin
|
begin
|
||||||
if not b then raise Exception.Create(Msg);
|
if not b then raise Exception.Create(Msg);
|
||||||
@ -653,56 +583,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
function gtk_gl_area_share_new(Attribs: TContextAttribs; share: PGtkGLArea
|
function gtk_gl_area_share_new(Attribs: TContextAttribs; share: PGtkGLArea): PGtkWidget;
|
||||||
): PGtkWidget;
|
|
||||||
var
|
var
|
||||||
gl_area: PGtkGLArea;
|
gl_area: PGtkGLArea;
|
||||||
{$IFNDEF UseFPGLX}
|
|
||||||
visual: PGdkVisual;
|
|
||||||
sharelist: PGdkGLContext;
|
|
||||||
glcontext: PGdkGLContext;
|
|
||||||
{$ENDIF}
|
|
||||||
begin
|
begin
|
||||||
Result := nil;
|
Result := nil;
|
||||||
//DebugLn(['gtk_gl_area_share_new START']);
|
//DebugLn(['gtk_gl_area_share_new START']);
|
||||||
if (share <> nil) and (not GTK_IS_GL_AREA(share)) then
|
if (share <> nil) and (not GTK_IS_GL_AREA(share)) then
|
||||||
exit;
|
exit;
|
||||||
{$IFDEF UseFPGLX}
|
gl_area:=gtk_gl_area_share_new_usefpglx(Attribs, share);
|
||||||
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}
|
|
||||||
Result:=PGtkWidget(gl_area);
|
Result:=PGtkWidget(gl_area);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1013,13 +902,7 @@ begin
|
|||||||
debugln(['LOpenGLCreateContext MultiSampling=',MultiSampling]);
|
debugln(['LOpenGLCreateContext MultiSampling=',MultiSampling]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if (MultiSampling > 1) and
|
if (MultiSampling > 1) and
|
||||||
{$IFDEF UseFPGLX}
|
|
||||||
GLX_ARB_multisample(GetDefaultXDisplay, DefaultScreen(GetDefaultXDisplay))
|
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
|
then begin
|
||||||
{$IFDEF VerboseMultiSampling}
|
{$IFDEF VerboseMultiSampling}
|
||||||
debugln(['LOpenGLCreateContext GLX_ARB_multisample succeeded']);
|
debugln(['LOpenGLCreateContext GLX_ARB_multisample succeeded']);
|
||||||
@ -1113,7 +996,7 @@ begin
|
|||||||
{$IFDEF VerboseMultiSampling}
|
{$IFDEF VerboseMultiSampling}
|
||||||
debugln(['CreateOpenGLContextAttrList MultiSampling=',MultiSampling]);
|
debugln(['CreateOpenGLContextAttrList MultiSampling=',MultiSampling]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
UseFBConfig := {$IFDEF UseFPGLX} GLX_version_1_3(GetDefaultXDisplay) {$else} false {$endif};
|
UseFBConfig := GLX_version_1_3(GetDefaultXDisplay);
|
||||||
Result:=nil;
|
Result:=nil;
|
||||||
CreateList;
|
CreateList;
|
||||||
GetMem(Result,SizeOf(integer)*p);
|
GetMem(Result,SizeOf(integer)*p);
|
||||||
|
@ -242,11 +242,7 @@ begin
|
|||||||
Item.ProgressItem:=CreateProgressItem('FPCSrcScan',
|
Item.ProgressItem:=CreateProgressItem('FPCSrcScan',
|
||||||
Format(lisCreatingFileIndexOfFPCSources, [Directory]),
|
Format(lisCreatingFileIndexOfFPCSources, [Directory]),
|
||||||
lisTheFileIndexIsNeededForFunctionsLikeFindDeclaratio);
|
lisTheFileIndexIsNeededForFunctionsLikeFindDeclaratio);
|
||||||
{$IF defined(VER2_4_2) or defined(VER2_4_3)}
|
|
||||||
Item.Resume;
|
|
||||||
{$ELSE}
|
|
||||||
Item.Start;
|
Item.Start;
|
||||||
{$ENDIF}
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -87,15 +87,9 @@ type
|
|||||||
procedure ClearImages;
|
procedure ClearImages;
|
||||||
public
|
public
|
||||||
// IUnknown
|
// IUnknown
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$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 _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||||
function _Release: 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
|
// IImageCacheListener
|
||||||
procedure CacheSetImageList(AImageList: TCustomImageList);
|
procedure CacheSetImageList(AImageList: TCustomImageList);
|
||||||
procedure CacheSetImageIndex(AIndex, AImageIndex: Integer);
|
procedure CacheSetImageIndex(AIndex, AImageIndex: Integer);
|
||||||
|
@ -547,7 +547,7 @@ type
|
|||||||
procedure SetFPColor(const AValue: TFPColor); override;
|
procedure SetFPColor(const AValue: TFPColor); override;
|
||||||
procedure SetHeight(Avalue: Integer);
|
procedure SetHeight(Avalue: Integer);
|
||||||
procedure SetName(AValue: string); override;
|
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 SetPitch(Value: TFontPitch);
|
||||||
procedure SetSize(AValue: integer); override;
|
procedure SetSize(AValue: integer); override;
|
||||||
procedure SetStyle(Value: TFontStyles);
|
procedure SetStyle(Value: TFontStyles);
|
||||||
|
@ -287,11 +287,7 @@ begin
|
|||||||
FImageIndexes[i] := -1;
|
FImageIndexes[i] := -1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function TButtonGlyph.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
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
|
begin
|
||||||
if GetInterface(iid, obj) then
|
if GetInterface(iid, obj) then
|
||||||
Result := 0
|
Result := 0
|
||||||
@ -299,12 +295,12 @@ begin
|
|||||||
Result := E_NOINTERFACE;
|
Result := E_NOINTERFACE;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
|
@ -47,13 +47,6 @@ function OSError(AResult: OSStatus; const AObject: TObject; const AMethodName, A
|
|||||||
function OSError(AResult: OSStatus; const AMethodName, ACallName: String;
|
function OSError(AResult: OSStatus; const AMethodName, ACallName: String;
|
||||||
const AText: String; AValidResult: OSStatus): Boolean;
|
const AText: String; AValidResult: OSStatus): Boolean;
|
||||||
|
|
||||||
{$IFDEF VER2_4}
|
|
||||||
const
|
|
||||||
kFontNoPlatformCode = $FFFFFFFF;
|
|
||||||
kFontNoScriptCode = $FFFFFFFF;
|
|
||||||
kFontNoLanguageCode = $FFFFFFFF;
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
var
|
var
|
||||||
DefaultTextStyle: ATSUStyle; // default Carbon text style
|
DefaultTextStyle: ATSUStyle; // default Carbon text style
|
||||||
RGBColorSpace: CGColorSpaceRef; // global RGB color space
|
RGBColorSpace: CGColorSpaceRef; // global RGB color space
|
||||||
|
@ -1505,14 +1505,3 @@ begin
|
|||||||
end;
|
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);
|
procedure SetVisible(AValue: Boolean);
|
||||||
protected
|
protected
|
||||||
// IUnknown implementation
|
// IUnknown implementation
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$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 _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
function _Release: 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 EatArrowKeys(const AKey: Word): Boolean; virtual;
|
function EatArrowKeys(const AKey: Word): Boolean; virtual;
|
||||||
function getText: String; virtual;
|
function getText: String; virtual;
|
||||||
procedure setText(AValue: String); virtual;
|
procedure setText(AValue: String); virtual;
|
||||||
|
@ -147,15 +147,9 @@ type
|
|||||||
function ShiftStateToQtModifiers(Shift: TShiftState): QtModifier;
|
function ShiftStateToQtModifiers(Shift: TShiftState): QtModifier;
|
||||||
protected
|
protected
|
||||||
// IUnknown implementation
|
// IUnknown implementation
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$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 _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
function _Release: 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 GetContext: HDC; virtual;
|
function GetContext: HDC; virtual;
|
||||||
function CreateWidget(const Params: TCreateParams):QWidgetH; virtual;
|
function CreateWidget(const Params: TCreateParams):QWidgetH; virtual;
|
||||||
procedure DestroyWidget; virtual;
|
procedure DestroyWidget; virtual;
|
||||||
@ -5041,11 +5035,7 @@ begin
|
|||||||
if ssAlt in Shift then Inc(Result, QtALT);
|
if ssAlt in Shift then Inc(Result, QtALT);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function TQtWidget.QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
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
|
begin
|
||||||
if GetInterface(iid, obj) then
|
if GetInterface(iid, obj) then
|
||||||
Result := 0
|
Result := 0
|
||||||
@ -5053,20 +5043,12 @@ begin
|
|||||||
Result := E_NOINTERFACE;
|
Result := E_NOINTERFACE;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function TQtWidget._AddRef: longint; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
function TQtWidget._AddRef: longint; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||||
{$ELSE}
|
|
||||||
function TQtWidget._AddRef: longint; stdcall;
|
|
||||||
{$ENDIF}
|
|
||||||
begin
|
begin
|
||||||
Result := -1; // no ref counting
|
Result := -1; // no ref counting
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function TQtWidget._Release: longint; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
function TQtWidget._Release: longint; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||||
{$ELSE}
|
|
||||||
function TQtWidget._Release: longint; stdcall;
|
|
||||||
{$ENDIF}
|
|
||||||
begin
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
|
@ -201,10 +201,8 @@ function Replace(Const Str, OrigStr, ReplStr: String; Const Global: Boolean): St
|
|||||||
Str into substrings around SplitStr }
|
Str into substrings around SplitStr }
|
||||||
function Split(Const Str: String; SplitStr: String; Count: Integer; Const CaseSensitive: Boolean): TStringList;
|
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_X_LPARAM(lp : Windows.LParam) : longint;
|
||||||
function GET_Y_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
|
// the declaration in the windows unit doesn't have the FlagsEx field
|
||||||
type
|
type
|
||||||
@ -351,18 +349,15 @@ Begin
|
|||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
//{$ifdef VER2_0}
|
|
||||||
function GET_X_LPARAM(lp : Windows.LParam) : longint;
|
function GET_X_LPARAM(lp : Windows.LParam) : longint;
|
||||||
begin
|
begin
|
||||||
result:=smallint(LOWORD(lp));
|
result:=smallint(LOWORD(lp));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function GET_Y_LPARAM(lp : Windows.LParam) : longint;
|
function GET_Y_LPARAM(lp : Windows.LParam) : longint;
|
||||||
begin
|
begin
|
||||||
result:=smallint(HIWORD(lp));
|
result:=smallint(HIWORD(lp));
|
||||||
end;
|
end;
|
||||||
//{$endif VER2_0}
|
|
||||||
|
|
||||||
Initialization
|
Initialization
|
||||||
|
|
||||||
|
@ -390,15 +390,9 @@ type
|
|||||||
public
|
public
|
||||||
function GetUpdateDescription: Boolean;
|
function GetUpdateDescription: Boolean;
|
||||||
procedure SetUpdateDescription(AValue: Boolean);
|
procedure SetUpdateDescription(AValue: Boolean);
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$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 _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||||
function _Release: 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
|
protected
|
||||||
procedure ClearPixelToColorTree;
|
procedure ClearPixelToColorTree;
|
||||||
procedure InternalRead(Str: TStream; Img: TFPCustomImage); override;
|
procedure InternalRead(Str: TStream; Img: TFPCustomImage); override;
|
||||||
@ -492,15 +486,9 @@ type
|
|||||||
public
|
public
|
||||||
function GetUpdateDescription: Boolean;
|
function GetUpdateDescription: Boolean;
|
||||||
procedure SetUpdateDescription(AValue: Boolean);
|
procedure SetUpdateDescription(AValue: Boolean);
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$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 _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||||
function _Release: 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
|
protected
|
||||||
procedure InitLineBuf;
|
procedure InitLineBuf;
|
||||||
procedure FreeLineBuf;
|
procedure FreeLineBuf;
|
||||||
@ -539,15 +527,9 @@ type
|
|||||||
|
|
||||||
TLazWriterBMP = class(TFPWriterBMP, ILazImageWriter)
|
TLazWriterBMP = class(TFPWriterBMP, ILazImageWriter)
|
||||||
public
|
public
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$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 _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||||
function _Release: 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
|
public
|
||||||
procedure Initialize(AImage: TLazIntfImage);
|
procedure Initialize(AImage: TLazIntfImage);
|
||||||
procedure Finalize;
|
procedure Finalize;
|
||||||
@ -572,15 +554,9 @@ type
|
|||||||
public
|
public
|
||||||
function GetUpdateDescription: Boolean;
|
function GetUpdateDescription: Boolean;
|
||||||
procedure SetUpdateDescription(AValue: Boolean);
|
procedure SetUpdateDescription(AValue: Boolean);
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$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 _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||||
function _Release: 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
|
protected
|
||||||
procedure DoDecompress; override;
|
procedure DoDecompress; override;
|
||||||
procedure HandleAlpha; override;
|
procedure HandleAlpha; override;
|
||||||
@ -593,15 +569,9 @@ type
|
|||||||
|
|
||||||
TLazWriterPNG = class(TFPWriterPNG, ILazImageWriter)
|
TLazWriterPNG = class(TFPWriterPNG, ILazImageWriter)
|
||||||
public
|
public
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$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 _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||||
function _Release: 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
|
public
|
||||||
procedure Initialize(AImage: TLazIntfImage);
|
procedure Initialize(AImage: TLazIntfImage);
|
||||||
procedure Finalize;
|
procedure Finalize;
|
||||||
@ -637,15 +607,9 @@ type
|
|||||||
public
|
public
|
||||||
function GetUpdateDescription: Boolean;
|
function GetUpdateDescription: Boolean;
|
||||||
procedure SetUpdateDescription(AValue: Boolean);
|
procedure SetUpdateDescription(AValue: Boolean);
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$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 _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||||
function _Release: 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
|
protected
|
||||||
procedure InternalRead(Str:TStream; Img:TFPCustomImage); override;
|
procedure InternalRead(Str:TStream; Img:TFPCustomImage); override;
|
||||||
public
|
public
|
||||||
@ -656,15 +620,9 @@ type
|
|||||||
|
|
||||||
TLazWriterTiff = class(TFPWriterTiff, ILazImageWriter)
|
TLazWriterTiff = class(TFPWriterTiff, ILazImageWriter)
|
||||||
public
|
public
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$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 _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||||
function _Release: 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
|
protected
|
||||||
procedure InternalWrite(Stream: TStream; Img: TFPCustomImage); override;
|
procedure InternalWrite(Stream: TStream; Img: TFPCustomImage); override;
|
||||||
public
|
public
|
||||||
@ -697,15 +655,9 @@ type
|
|||||||
public
|
public
|
||||||
function GetUpdateDescription: Boolean;
|
function GetUpdateDescription: Boolean;
|
||||||
procedure SetUpdateDescription(AValue: Boolean);
|
procedure SetUpdateDescription(AValue: Boolean);
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function QueryInterface(constref iid: TGuid; out obj): LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$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 _AddRef: LongInt; {$IFDEF WINDOWS}stdcall{$ELSE}cdecl{$ENDIF};
|
||||||
function _Release: 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
|
public
|
||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -4320,11 +4272,7 @@ begin
|
|||||||
Progress(psEnding, 100, false, Rect(0,0,0,0), '', FContinue);
|
Progress(psEnding, 100, false, Rect(0,0,0,0), '', FContinue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function TLazReaderXPM.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
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
|
begin
|
||||||
if GetInterface(iid, obj)
|
if GetInterface(iid, obj)
|
||||||
then Result := S_OK
|
then Result := S_OK
|
||||||
@ -4336,12 +4284,12 @@ begin
|
|||||||
FUpdateDescription := AValue;
|
FUpdateDescription := AValue;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
@ -5137,23 +5085,19 @@ begin
|
|||||||
BitsPerPixel := AImage.DataDescription.Depth;
|
BitsPerPixel := AImage.DataDescription.Depth;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function TLazWriterBMP.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
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
|
begin
|
||||||
if GetInterface(iid, obj)
|
if GetInterface(iid, obj)
|
||||||
then Result := S_OK
|
then Result := S_OK
|
||||||
else Result := E_NOINTERFACE;
|
else Result := E_NOINTERFACE;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
@ -5575,12 +5519,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
@ -5832,11 +5776,7 @@ begin
|
|||||||
then CheckAlphaDescription(TheImage);
|
then CheckAlphaDescription(TheImage);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function TLazReaderDIB.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
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
|
begin
|
||||||
if GetInterface(iid, obj)
|
if GetInterface(iid, obj)
|
||||||
then Result := S_OK
|
then Result := S_OK
|
||||||
@ -6139,27 +6079,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazReaderPNG.HandleAlpha;
|
procedure TLazReaderPNG.HandleAlpha;
|
||||||
{$ifdef VER2_4}
|
|
||||||
var
|
|
||||||
n: Integer;
|
|
||||||
c: TFPColor;
|
|
||||||
{$endif}
|
|
||||||
begin
|
begin
|
||||||
inherited HandleAlpha;
|
inherited HandleAlpha;
|
||||||
FAlphaPalette := Header.ColorType = 3;
|
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;
|
end;
|
||||||
|
|
||||||
procedure TLazReaderPNG.InternalRead(Str: TStream; Img: TFPCustomImage);
|
procedure TLazReaderPNG.InternalRead(Str: TStream; Img: TFPCustomImage);
|
||||||
@ -6168,11 +6090,7 @@ begin
|
|||||||
inherited InternalRead(Str, Img);
|
inherited InternalRead(Str, Img);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function TLazReaderPNG.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
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
|
begin
|
||||||
if GetInterface(iid, obj)
|
if GetInterface(iid, obj)
|
||||||
then Result := S_OK
|
then Result := S_OK
|
||||||
@ -6184,12 +6102,12 @@ begin
|
|||||||
FUpdateDescription := AValue;
|
FUpdateDescription := AValue;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
@ -6210,23 +6128,19 @@ begin
|
|||||||
or (AImage.DataDescription.BluePrec > 8);
|
or (AImage.DataDescription.BluePrec > 8);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function TLazWriterPNG.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
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
|
begin
|
||||||
if GetInterface(iid, obj)
|
if GetInterface(iid, obj)
|
||||||
then Result := S_OK
|
then Result := S_OK
|
||||||
else Result := E_NOINTERFACE;
|
else Result := E_NOINTERFACE;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
@ -6334,11 +6248,7 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function TLazReaderTiff.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
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
|
begin
|
||||||
if GetInterface(iid, obj)
|
if GetInterface(iid, obj)
|
||||||
then Result := S_OK
|
then Result := S_OK
|
||||||
@ -6350,12 +6260,12 @@ begin
|
|||||||
FUpdateDescription := AValue;
|
FUpdateDescription := AValue;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
@ -6391,23 +6301,19 @@ begin
|
|||||||
SaveToStream(Stream);
|
SaveToStream(Stream);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function TLazWriterTiff.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
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
|
begin
|
||||||
if GetInterface(iid, obj)
|
if GetInterface(iid, obj)
|
||||||
then Result := S_OK
|
then Result := S_OK
|
||||||
else Result := E_NOINTERFACE;
|
else Result := E_NOINTERFACE;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
@ -6474,23 +6380,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF FPC_HAS_CONSTREF}
|
|
||||||
function TLazReaderIcnsPart.QueryInterface(constref iid: TGuid; out obj): longint; {$IFDEF WINDOWs}stdcall{$ELSE}cdecl{$ENDIF};
|
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
|
begin
|
||||||
if GetInterface(iid, obj)
|
if GetInterface(iid, obj)
|
||||||
then Result := S_OK
|
then Result := S_OK
|
||||||
else Result := E_NOINTERFACE;
|
else Result := E_NOINTERFACE;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
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
|
begin
|
||||||
Result := -1;
|
Result := -1;
|
||||||
end;
|
end;
|
||||||
|
@ -87,7 +87,7 @@ type
|
|||||||
FAssignedFont: TFPCustomFont;
|
FAssignedFont: TFPCustomFont;
|
||||||
FAssignedPen: TFPCustomPen;
|
FAssignedPen: TFPCustomPen;
|
||||||
FBaseWindowOrg: TPoint;
|
FBaseWindowOrg: TPoint;
|
||||||
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6)}
|
{$if defined(ver2_6)}
|
||||||
FLazClipRegion: TFPCustomRegion;
|
FLazClipRegion: TFPCustomRegion;
|
||||||
{$endif}
|
{$endif}
|
||||||
FWindowOrg: TPoint; // already in absolute coords with BaseWindowOrg summed up
|
FWindowOrg: TPoint; // already in absolute coords with BaseWindowOrg summed up
|
||||||
@ -127,11 +127,6 @@ type
|
|||||||
const ADestX, ADestY, ASourceX, ASourceY, ASourceWidth, ASourceHeight: Integer);
|
const ADestX, ADestY, ASourceX, ASourceY, ASourceWidth, ASourceHeight: Integer);
|
||||||
procedure CanvasCopyRect(ASource: TLazCanvas;
|
procedure CanvasCopyRect(ASource: TLazCanvas;
|
||||||
const ADestX, ADestY, ASourceX, ASourceY, ASourceWidth, ASourceHeight: Integer);
|
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
|
// Fills the entire drawing with a color
|
||||||
// AIgnoreClippingAndWindowOrg speeds up the drawing a lot, but it is dangerous,
|
// AIgnoreClippingAndWindowOrg speeds up the drawing a lot, but it is dangerous,
|
||||||
// don't use it unless you know what you are doing!
|
// 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
|
// because operations of SetWindowOrg inside a non-native wincontrol will be
|
||||||
// based upon the BaseWindowOrg which is set relative to the Form canvas
|
// based upon the BaseWindowOrg which is set relative to the Form canvas
|
||||||
property BaseWindowOrg: TPoint read FBaseWindowOrg write FBaseWindowOrg;
|
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;
|
property ClipRegion: TFPCustomRegion read FLazClipRegion write FLazClipRegion;
|
||||||
{$endif}
|
{$endif}
|
||||||
property WindowOrg: TPoint read GetWindowOrg write SetWindowOrg;
|
property WindowOrg: TPoint read GetWindowOrg write SetWindowOrg;
|
||||||
@ -216,7 +211,7 @@ var
|
|||||||
begin
|
begin
|
||||||
lx := x + FWindowOrg.X;
|
lx := x + FWindowOrg.X;
|
||||||
ly := y + FWindowOrg.Y;
|
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
|
if Clipping and (not FLazClipRegion.IsPointInRegion(lx, ly)) then
|
||||||
Exit;
|
Exit;
|
||||||
if (lx >= 0) and (lx < width) and (ly >= 0) and (ly < height) then
|
if (lx >= 0) and (lx < width) and (ly >= 0) and (ly < height) then
|
||||||
@ -438,7 +433,7 @@ end;
|
|||||||
procedure TLazCanvas.SetLazClipRegion(ARegion: TLazRegion);
|
procedure TLazCanvas.SetLazClipRegion(ARegion: TLazRegion);
|
||||||
begin
|
begin
|
||||||
Clipping := True;
|
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;
|
ClipRect := TLazRegionRect(ARegion.Parts.Items[0]).Rect;
|
||||||
FLazClipRegion := ARegion;
|
FLazClipRegion := ARegion;
|
||||||
{$else}
|
{$else}
|
||||||
@ -690,25 +685,6 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
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;
|
procedure TLazCanvas.FillColor(AColor: TFPColor;
|
||||||
AIgnoreClippingAndWindowOrg: Boolean);
|
AIgnoreClippingAndWindowOrg: Boolean);
|
||||||
var
|
var
|
||||||
|
@ -50,7 +50,7 @@ type
|
|||||||
function IsPointInPart(AX, AY: Integer): Boolean; override;
|
function IsPointInPart(AX, AY: Integer): Boolean; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$if defined(ver2_4) or defined(ver2_5) or defined(ver2_6)}
|
{$if defined(ver2_6)}
|
||||||
TFPCustomRegion = class
|
TFPCustomRegion = class
|
||||||
function GetBoundingRect: TRect; virtual; abstract;
|
function GetBoundingRect: TRect; virtual; abstract;
|
||||||
function IsPointInRegion(AX, AY: Integer): Boolean; virtual; abstract;
|
function IsPointInRegion(AX, AY: Integer): Boolean; virtual; abstract;
|
||||||
|
@ -27,10 +27,8 @@ interface
|
|||||||
uses
|
uses
|
||||||
{$IFDEF Darwin}MacOSAll, {$ENDIF}
|
{$IFDEF Darwin}MacOSAll, {$ENDIF}
|
||||||
{$IFDEF win32}
|
{$IFDEF win32}
|
||||||
{$IFnDEF VER2_4}
|
|
||||||
Win9xWsManager, // Support for Lower/UpperWideStringProc on Win9x, also used by some Utf8 string handling functions
|
Win9xWsManager, // Support for Lower/UpperWideStringProc on Win9x, also used by some Utf8 string handling functions
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
|
||||||
{$IFnDEF WithOldDebugln} LazLogger, {$ENDIF}
|
{$IFnDEF WithOldDebugln} LazLogger, {$ENDIF}
|
||||||
Classes, SysUtils, Math, TypInfo, Types, FPCAdds, AvgLvlTree, FileUtil,
|
Classes, SysUtils, Math, TypInfo, Types, FPCAdds, AvgLvlTree, FileUtil,
|
||||||
LCLStrConsts, LCLType, WSReferences, LazMethodList, LazUTF8;
|
LCLStrConsts, LCLType, WSReferences, LazMethodList, LazUTF8;
|
||||||
|
@ -55,12 +55,7 @@ end;
|
|||||||
|
|
||||||
procedure RegisterDB;
|
procedure RegisterDB;
|
||||||
begin
|
begin
|
||||||
RegisterComponents('Data Access',[TDatasource
|
RegisterComponents('Data Access',[TDatasource,TBufDataset]); // this bites dbflaz
|
||||||
// Only for fpc version 2.4.1 and above
|
|
||||||
{$IFNDEF VER2_4_0}
|
|
||||||
,TBufDataset // this bites dbflaz
|
|
||||||
{$ENDIF}
|
|
||||||
]);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure RegisterSimpleIPC;
|
procedure RegisterSimpleIPC;
|
||||||
|
@ -18,10 +18,6 @@
|
|||||||
MA 02111-1307, USA.
|
MA 02111-1307, USA.
|
||||||
}
|
}
|
||||||
|
|
||||||
{$IFNDEF VER2_4}
|
|
||||||
{$DEFINE HAVESTRICT}
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
unit frmmain;
|
unit frmmain;
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
@ -908,9 +904,6 @@ Var
|
|||||||
S : String;
|
S : String;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{$IFNDEF HAVESTRICT}
|
|
||||||
MIStrict.Visible:=False;
|
|
||||||
{$ENDIF}
|
|
||||||
S:=GetAppConfigFile(false,true);
|
S:=GetAppConfigFile(false,true);
|
||||||
PSMain.IniFileName:=S;
|
PSMain.IniFileName:=S;
|
||||||
S:=ExtractFilePath(S);
|
S:=ExtractFilePath(S);
|
||||||
@ -952,9 +945,7 @@ begin
|
|||||||
try
|
try
|
||||||
P:=TJSONParser.Create(S);
|
P:=TJSONParser.Create(S);
|
||||||
try
|
try
|
||||||
{$IFDEF HAVESTRICT}
|
|
||||||
P.Strict:=FStrict;
|
P.Strict:=FStrict;
|
||||||
{$ENDIF}
|
|
||||||
D:=P.Parse;
|
D:=P.Parse;
|
||||||
finally
|
finally
|
||||||
P.Free;
|
P.Free;
|
||||||
|
Loading…
Reference in New Issue
Block a user