mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-15 14:29:31 +02:00
gtk intf: reduced warnings/notes - use -dVerboseLCLTodos and -dVerboseGtkTodos to see them
git-svn-id: trunk@15422 -
This commit is contained in:
parent
80961e1ff9
commit
e3520a6d50
@ -483,11 +483,11 @@ begin
|
||||
ABits := (PB^ shr AShift) and PrecMask;
|
||||
end;
|
||||
16: begin
|
||||
{$note check endian and/or source byte order}
|
||||
{$IFDEF VerboseLCLTodos}{$note check endian and/or source byte order}{$ENDIF}
|
||||
ABits := (PW^ shr AShift) and PrecMask;
|
||||
end;
|
||||
32: begin
|
||||
{$note check endian and/or source byte order}
|
||||
{$IFDEF VerboseLCLTodos}{$note check endian and/or source byte order}{$ENDIF}
|
||||
ABits := (PC^ shr AShift) and PrecMask;
|
||||
end;
|
||||
else
|
||||
@ -535,12 +535,12 @@ begin
|
||||
PB^ := (PB^ and PrecMask) or (ABits shl AShift);
|
||||
end;
|
||||
16: begin
|
||||
{$note check endian and/or source byte order}
|
||||
{$IFDEF VerboseLCLTodos}{$note check endian and/or source byte order}{$ENDIF}
|
||||
PrecMask := not(PrecMask shl AShift);
|
||||
PW^ := (PW^ and PrecMask) or (ABits shl AShift);
|
||||
end;
|
||||
32: begin
|
||||
{$note check endian and/or source byte order}
|
||||
{$IFDEF VerboseLCLTodos}{$note check endian and/or source byte order}{$ENDIF}
|
||||
PrecMask := not(PrecMask shl AShift);
|
||||
PC^ := (PC^ and PrecMask) or (ABits shl AShift);
|
||||
end;
|
||||
@ -1035,7 +1035,7 @@ end;
|
||||
function TRawImage.IsTransparent(ATestPixels: Boolean): Boolean;
|
||||
function CheckAlpha: Boolean;
|
||||
begin
|
||||
{$note TODO: implement CheckAlpha}
|
||||
{$IFDEF VerboseLCLTodos}{$note TODO: implement CheckAlpha}{$ENDIF}
|
||||
Result := True;
|
||||
end;
|
||||
begin
|
||||
|
@ -473,7 +473,7 @@ end;
|
||||
|
||||
function TCustomBitmap.GetTransparent: Boolean;
|
||||
begin
|
||||
{$note add better check for transparency }
|
||||
{$IFDEF VerboseLCLTodos}{$note add better check for transparency }{$ENDIF}
|
||||
// MWE: now tharansparency is set when a maskhandle is assigned, the user can
|
||||
// override this by setting it to false, so no mask is used,
|
||||
// however this meganism ignores the possible alpha channel, so for now 32bit
|
||||
@ -822,7 +822,7 @@ begin
|
||||
try
|
||||
// read image
|
||||
IntfImg := TLazIntfImage.Create(0,0);
|
||||
{$note set pixelformat based on image, not device}
|
||||
{$IFDEF VerboseLCLTodos}{$note set pixelformat based on image, not device}{$ENDIF}
|
||||
// add an extention to the reader, so that we h get called after the header is read
|
||||
// the next will cause that all images are loaded in pfDevice format.
|
||||
// This is incompatible with delphi
|
||||
@ -924,7 +924,7 @@ begin
|
||||
|
||||
if WriterClass=nil
|
||||
then begin
|
||||
{$note todo choose the correct writer}
|
||||
{$IFDEF VerboseLCLTodos}{$note todo choose the correct writer}{$ENDIF}
|
||||
// Bitmaps support alpha. TCustomBitmaps supports more than these 2 formats anyway.
|
||||
// So setting the writer based on a mask is nonsense imo (MWE)
|
||||
|
||||
@ -1181,7 +1181,7 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
|
||||
{$note todo: move to IntfImage}
|
||||
{$IFDEF VerboseLCLTodos}{$note todo: move to IntfImage}{$ENDIF}
|
||||
IntfImage := TLazIntfImage.Create(0, 0);
|
||||
try
|
||||
// load from bitmap needs a mask handle otherwise no mask description is
|
||||
|
@ -35,9 +35,9 @@ type
|
||||
fWindow: TWindow;
|
||||
fScreenID: longint;
|
||||
fTrayParent: TWindow;
|
||||
fOwner: TComponent;
|
||||
//fOwner: TComponent;
|
||||
fEmbedded: Boolean;
|
||||
fMsgCount: Integer;
|
||||
//fMsgCount: Integer;
|
||||
fTrayIcon: TCustomTrayIcon;
|
||||
function GetCanvas: TCanvas;
|
||||
function NotifyExpose(Event: PGdkEventExpose; Widget: PGtkWidget): Boolean; cdecl;
|
||||
|
@ -64,8 +64,8 @@
|
||||
{$info Compiling with gtk2 for X}
|
||||
{$define HasX}
|
||||
{$else}
|
||||
{$note On darwin the native gtk2 widgetset is used. }
|
||||
{$note If you want to use gtk2 for X, define UseX }
|
||||
{$IFDEF VerboseGtkToDos}{$note On darwin the native gtk2 widgetset is used. }{$ENDIF}
|
||||
{$IFDEF VerboseGtkToDos}{$note If you want to use gtk2 for X, define UseX }{$ENDIF}
|
||||
{$endif}
|
||||
{$else}
|
||||
{$define HasX}
|
||||
|
@ -285,7 +285,7 @@ begin
|
||||
FDrawable := AWindow;
|
||||
|
||||
{$IFDEF Gtk1}
|
||||
{$note todo: check if this is still needed} // now gc is a property
|
||||
{$IFDEF VerboseGtkToDos}{$note todo: check if this is still needed}{$ENDIF} // now gc is a property
|
||||
GetGC;
|
||||
{$ELSE}
|
||||
// GC is created on demand
|
||||
|
@ -112,7 +112,7 @@ type
|
||||
{$ifdef unix}
|
||||
FChildSignalHandlers: PChildSignalEventHandler;
|
||||
{$else}
|
||||
{$warning no declaration of FChildSignalHandlers for this OS}
|
||||
{$IFDEF VerboseGtkToDos}{$warning no declaration of FChildSignalHandlers for this OS}{$ENDIF}
|
||||
{$endif}
|
||||
|
||||
{$Ifdef GTK2}
|
||||
|
@ -863,7 +863,7 @@ begin
|
||||
AHandler := nil;
|
||||
end;
|
||||
{$else}
|
||||
{$warning TGtkWidgetSet.RemoveProcessEventHandler and TGtkWidgetSet.AddProcessEventHandler not implemented on this OS}
|
||||
{$IFDEF VerboseGtkToDos}{$warning TGtkWidgetSet.RemoveProcessEventHandler and TGtkWidgetSet.AddProcessEventHandler not implemented on this OS}{$ENDIF}
|
||||
//PChildSignalEventHandler is only defined on unix
|
||||
function TGtkWidgetSet.AddProcessEventHandler(AHandle: THandle;
|
||||
AEventHandler: TChildExitEvent; AData: PtrInt): PProcessEventHandler;
|
||||
|
@ -37,7 +37,7 @@ begin
|
||||
TabWidget := gtk_notebook_get_tab_label(PGtkNoteBook(NotebookWidget),
|
||||
PageWidget);
|
||||
if TabWidget = nil then exit;
|
||||
{$note reimplement}
|
||||
{$IFDEF VerboseGtkToDos}{$note reimplement}{$ENDIF}
|
||||
DrawImageListIconOnWidget(NoteBook.Images, ImageIndex, Widget);
|
||||
end;
|
||||
|
||||
|
@ -280,7 +280,7 @@ begin
|
||||
|
||||
GdkTrapIsSet:=false;
|
||||
|
||||
{$note TODO: enable standard error_log handling}
|
||||
{$IFDEF VerboseGtkToDos}{$note TODO: enable standard error_log handling}{$ENDIF}
|
||||
{$IfDef REPORT_GDK_ERRORS}
|
||||
If (Xerror<>0) then
|
||||
RaiseGDBException('A GDK/X Error occured, this is normally fatal. The error code was : ' + IntToStr(Xerror));
|
||||
@ -1226,7 +1226,7 @@ begin
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
{$note remove when gtk native imagelist will be ready}
|
||||
{$IFDEF VerboseGtkToDos}{$note remove when gtk native imagelist will be ready}{$ENDIF}
|
||||
procedure DrawImageListIconOnWidget(ImgList: TCustomImageList;
|
||||
Index: integer; AEffect: TGraphicsDrawEffect; DestWidget: PGTKWidget;
|
||||
CenterHorizontally, CenterVertically: boolean;
|
||||
@ -3430,7 +3430,7 @@ var
|
||||
FileSelWidget: PGtkFileSelection;
|
||||
LCLHistoryMenu: PGTKWidget;
|
||||
{$IFDEF Gtk1}
|
||||
AFilterEntry: TFileSelFilterEntry;
|
||||
//AFilterEntry: TFileSelFilterEntry;
|
||||
FilterList: TFPList; // list of TFileSelFilterListEntry
|
||||
LCLFilterMenu: PGTKWidget;
|
||||
{$ENDIF}
|
||||
@ -5901,7 +5901,7 @@ begin
|
||||
AEffect := gdeNormal;
|
||||
|
||||
if AImageIndex < AImageList.Count then
|
||||
{$note reimplement}
|
||||
{$IFDEF VerboseGtkToDos}{$note reimplement}{$ENDIF}
|
||||
DrawImageListIconOnWidget(AImageList, AImageIndex, AEffect,
|
||||
Widget, false, false, ALeft, ATop);
|
||||
|
||||
@ -8249,7 +8249,7 @@ var
|
||||
begin
|
||||
Result := nil;
|
||||
|
||||
{$WARNING ToDo LoadDefaultFontDesc: get a working default pango font description}
|
||||
{$IFDEF VerboseGtkToDos}{$WARNING ToDo LoadDefaultFontDesc: get a working default pango font description}{$ENDIF}
|
||||
Result := pango_font_description_from_string('sans 12');
|
||||
|
||||
exit;
|
||||
|
@ -1508,7 +1508,7 @@ var
|
||||
{$ifdef VerboseGdkPixbuf} debugln('DataSourceInitialize B1');{$endif}
|
||||
|
||||
Source := CreatePixbufFromDrawable(Bitmap^.GDIPixmapObject.Image, Bitmap^.Colormap, False, 0, StartScan, 0, 0, Width, StartScan + NumScans);
|
||||
{$note TODO: Apply alpha based on mask when 32bit mode is added}
|
||||
{$IFDEF VerboseGtkToDos}{$note TODO: Apply alpha based on mask when 32bit mode is added}{$ENDIF}
|
||||
|
||||
rowstride := gdk_pixbuf_get_rowstride(Source);
|
||||
Pixels := PByte(gdk_pixbuf_get_pixels(Source));
|
||||
@ -2343,7 +2343,7 @@ var
|
||||
{$ENDIF}
|
||||
|
||||
// calculate ScaleMethod
|
||||
{$note use SetStretchBltMode(dc, mode) here}
|
||||
{$IFDEF VerboseGtkToDos}{$note use SetStretchBltMode(dc, mode) here}{$ENDIF}
|
||||
//GDKPixbuf Scaling is not done in the same way as Windows
|
||||
//but by rights ScaleMethod should really be chosen based
|
||||
//on the destination device's internal flag
|
||||
@ -2661,7 +2661,7 @@ begin
|
||||
' SrcWhole='+dbgs(SrcWholeWidth)+','+dbgs(SrcWholeHeight),
|
||||
'');
|
||||
{$ENDIF}
|
||||
{$note use intersectrect here}
|
||||
{$IFDEF VerboseGtkToDos}{$note use intersectrect here}{$ENDIF}
|
||||
if X >= DstWholeWidth then Exit;
|
||||
if Y >= DstWholeHeight then exit;
|
||||
if X + Width <= 0 then exit;
|
||||
@ -2765,7 +2765,7 @@ begin
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
{$note tode remove, earlier checks require drawable <> nil}
|
||||
{$IFDEF VerboseGtkToDos}{$note tode remove, earlier checks require drawable <> nil}{$ENDIF}
|
||||
if SrcDevContext.Drawable = nil
|
||||
then begin
|
||||
if DstDevContext.Drawable = nil
|
||||
@ -2979,7 +2979,7 @@ procedure TGtkWidgetSet.SetCallbackEx(const AMsg: LongInt;
|
||||
end
|
||||
else if GtkWidgetIsA(PGtkWidget(gObject),gtk_scrolled_window_get_type) then
|
||||
begin
|
||||
DebugLn(['GetAdjustment ',GetWidgetDebugReport(PGtkWidget(gObject))]);
|
||||
//DebugLn(['GetAdjustment ',GetWidgetDebugReport(PGtkWidget(gObject))]);
|
||||
Result := PgtkObject(gtk_scrolled_window_get_hadjustment(
|
||||
PGTKScrolledWindow(gObject)));
|
||||
end else
|
||||
@ -3918,7 +3918,7 @@ end;
|
||||
TGtkWidgetSet ShowHide
|
||||
*Note: Show or hide a widget
|
||||
------------------------------------------------------------------------------}
|
||||
{$note TODO: move to wsclass }
|
||||
{$IFDEF VerboseGtkToDos}{$note TODO: move to wsclass }{$ENDIF}
|
||||
procedure TGtkWidgetSet.ShowHide(Sender : TObject);
|
||||
|
||||
procedure RaiseWrongClass;
|
||||
|
@ -1308,7 +1308,7 @@ begin
|
||||
Result := 0;
|
||||
if not IsValidGDIObject(ACursorInfo^.hbmColor) then Exit;
|
||||
|
||||
{$note TODO: add support for mono cursors}
|
||||
{$IFDEF VerboseGtkToDos}{$note TODO: add support for mono cursors}{$ENDIF}
|
||||
Img := PGDIObject(ACursorInfo^.hbmColor)^.GDIBitmapObject;
|
||||
if (PGDIObject(ACursorInfo^.hbmColor)^.GDIBitmapType = gbPixmap) and
|
||||
(PGDIObject(ACursorInfo^.hbmColor)^.GDIPixmapObject.Mask <> nil) then
|
||||
@ -3330,7 +3330,7 @@ begin
|
||||
end;
|
||||
|
||||
{.$define VerboseEnumFonts}
|
||||
{$note: compare TGtkWidgetSet.EnumFontFamilies with gtkproc.FillScreenFonts}
|
||||
{$IFDEF VerboseGtkToDos}{$note: compare TGtkWidgetSet.EnumFontFamilies with gtkproc.FillScreenFonts}{$ENDIF}
|
||||
function TGtkWidgetSet.EnumFontFamilies(DC: HDC; Family: Pchar;
|
||||
EnumFontFamProc: FontEnumProc; LParam:Lparam):longint;
|
||||
var
|
||||
@ -3363,7 +3363,7 @@ begin
|
||||
{$ifdef HasX}
|
||||
XFonts := XListFonts(gdk_display, pchar(Tmp), 10000, @N);
|
||||
{$else}
|
||||
{$warning implement getting XFonts for this OS}
|
||||
{$IFDEF VerboseGtkToDos}{$warning implement getting XFonts for this OS}{$ENDIF}
|
||||
N:=0;
|
||||
{$endif}
|
||||
try
|
||||
@ -3748,7 +3748,7 @@ begin
|
||||
{$ifdef HasX}
|
||||
XFonts := XListFonts(gdk_display, pchar(Tmp), 10000, @N);
|
||||
{$else}
|
||||
{$warning implement getting XFonts for this OS}
|
||||
{$IFDEF VerboseGtkToDos}{$warning implement getting XFonts for this OS}{$ENDIF}
|
||||
N:=0;
|
||||
{$endif}
|
||||
try
|
||||
|
@ -496,10 +496,11 @@ end;
|
||||
|
||||
class procedure TGtkWSCustomListView.ItemChangeInternal(const ACListWidget: PGtkCList; const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem);
|
||||
var
|
||||
ImageBitmap, MaskBitmap: TBitmap;
|
||||
ImageRect: TRect;
|
||||
Pixmap: PGdkPixmap;
|
||||
Mask: PGdkBitmap;
|
||||
//ImageBitmap: TBitmap;
|
||||
//MaskBitmap: TBitmap;
|
||||
//ImageRect: TRect;
|
||||
//Pixmap: PGdkPixmap;
|
||||
//Mask: PGdkBitmap;
|
||||
n, Count: integer;
|
||||
begin
|
||||
if (TLVHack(ALV).SmallImages <> nil)
|
||||
@ -524,7 +525,7 @@ begin
|
||||
if Mask <> nil
|
||||
then gdk_bitmap_unref(Mask);
|
||||
{$else}
|
||||
{$note implement}
|
||||
{$IFDEF VerboseGtkToDos}{$note implement}{$ENDIF}
|
||||
{$endif}
|
||||
end
|
||||
else begin
|
||||
@ -637,8 +638,9 @@ class procedure TGtkWSCustomListView.ItemSetImage(const ALV: TCustomListView; co
|
||||
var
|
||||
WidgetInfo: PWidgetInfo;
|
||||
CListWidget: PGtkCList;
|
||||
ImageBitmap, MaskBitmap: TBitmap;
|
||||
ImageRect: TRect;
|
||||
//ImageBitmap: TBitmap;
|
||||
//MaskBitmap: TBitmap;
|
||||
//ImageRect: TRect;
|
||||
Pixmap: PGdkPixmap;
|
||||
Mask: PGdkBitmap;
|
||||
Spacing: guint8;
|
||||
@ -676,7 +678,7 @@ begin
|
||||
Mask := nil;
|
||||
end;
|
||||
{$else}
|
||||
{$note implement}
|
||||
{$IFDEF VerboseGtkToDos}{$note implement}{$ENDIF}
|
||||
Pixmap := nil;
|
||||
Mask := nil;
|
||||
{$endif}
|
||||
|
@ -196,7 +196,7 @@ end;
|
||||
class procedure TGtkWSScrollingWinControl.ScrollBy(const AWinControl: TScrollingWinControl;
|
||||
const DeltaX, DeltaY: integer);
|
||||
begin
|
||||
{$note implement me}
|
||||
{$IFDEF VerboseGtkToDos}{$note implement me}{$ENDIF}
|
||||
end;
|
||||
|
||||
class procedure TGtkWSScrollingWinControl.SetColor(
|
||||
|
@ -615,7 +615,7 @@ class function TGtkWSCustomListBox.GetSelected(const ACustomListBox: TCustomList
|
||||
var
|
||||
Handle: HWND;
|
||||
Widget : PGtkWidget; // pointer to gtk-widget (local use when neccessary)
|
||||
GList : pGList; // Only used for listboxes, replace with widget!!!!!
|
||||
//GList : pGList; // Only used for listboxes, replace with widget!!!!!
|
||||
ListItem : PGtkListItem;// currently only used for listboxes
|
||||
begin
|
||||
Result := false; { assume: nothing found }
|
||||
|
@ -892,7 +892,7 @@ begin
|
||||
TLVHack(ALV).SmallImages.GetBitmap(AItem.ImageIndex, BitImage);
|
||||
case PGDIObject(BitImage.handle)^.GDIBitmapType of
|
||||
gbBitmap: Drawable := PGDIObject(BitImage.handle)^.GDIBitmapObject;
|
||||
gbPixmap: Drawable := PGDIObject(BitImage.handle)^.GDIPixmapObject.Image; {$note TODO add alpha mask}
|
||||
gbPixmap: Drawable := PGDIObject(BitImage.handle)^.GDIPixmapObject.Image; {$IFDEF VerboseGtkToDos}{$note TODO add alpha mask}{$ENDIF}
|
||||
else
|
||||
Drawable := nil;
|
||||
end;
|
||||
|
@ -4852,7 +4852,7 @@ begin
|
||||
// force alpha description
|
||||
CheckAlphaDescription(TheImage);
|
||||
|
||||
{$note check if height is also doubled without mask}
|
||||
{$IFDEF VerboseLCLTodos}{$note check if height is also doubled without mask}{$ENDIF}
|
||||
FBFI.biHeight := FBFI.biHeight div 2; { Height field is doubled, to (sort of) accomodate mask }
|
||||
InternalReadBody; { Now read standard bitmap }
|
||||
|
||||
|
@ -1943,7 +1943,7 @@ end;
|
||||
procedure TPostScriptPrinterCanvas.TextRect(ARect: TRect; X, Y: integer;
|
||||
const Text: string; const Style: TTextStyle);
|
||||
begin
|
||||
{$WARNING TPostScriptPrinterCanvas.TextRect is not yet fully implemented!}
|
||||
{$IFDEF VerboseLCLTodos}{$WARNING TPostScriptPrinterCanvas.TextRect is not yet fully implemented!}{$ENDIF}
|
||||
//TODO: clipping, layout, etc.
|
||||
TextOut(X,Y, Text);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user