mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-27 21:49:17 +02:00
gtk2: less hints
git-svn-id: trunk@36761 -
This commit is contained in:
parent
07257ec5cd
commit
5b350609ab
@ -854,7 +854,7 @@ procedure UpdateShiftState(const KeyStateList: TFPList; const ShiftState: TShift
|
||||
then KeyStateList.Add({%H-}Pointer(PtrUInt(AVKeyCode)));
|
||||
end
|
||||
else begin
|
||||
KeyStateList.Remove(Pointer(PtrUInt(AVKeyCode)));
|
||||
KeyStateList.Remove({%H-}Pointer(PtrUInt(AVKeyCode)));
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -3060,7 +3060,7 @@ begin
|
||||
else
|
||||
SmallPos := High(SmallPos);
|
||||
|
||||
ScrollBar := HWND(PtrUInt(Range));
|
||||
ScrollBar := HWND({%H-}PtrUInt(Range));
|
||||
ScrollCode := SB_THUMBPOSITION;
|
||||
end;
|
||||
Result := DeliverMessage(AWidgetInfo^.LCLObject, Msg) <> 0;
|
||||
@ -3086,8 +3086,8 @@ var
|
||||
// Check for a toggle
|
||||
// If the remove was successfull, the key was on
|
||||
// else it was off so we should set the toggle flag
|
||||
if KeyStateList.Remove(Pointer(PtrUInt(AVKeyCode or KEYMAP_TOGGLE))) < 0
|
||||
then KeyStateList.Add(Pointer(PtrUInt(AVKeyCode or KEYMAP_TOGGLE)));
|
||||
if KeyStateList.Remove({%H-}Pointer(PtrUInt(AVKeyCode or KEYMAP_TOGGLE))) < 0
|
||||
then KeyStateList.Add({%H-}Pointer(PtrUInt(AVKeyCode or KEYMAP_TOGGLE)));
|
||||
end;
|
||||
|
||||
procedure UpdateList(const AVKeyCode: Integer; const APressed: Boolean);
|
||||
@ -3095,11 +3095,11 @@ var
|
||||
if AVKeyCode = 0 then Exit;
|
||||
if APressed
|
||||
then begin
|
||||
if KeyStateList.IndexOf(Pointer(PtrUInt(AVKeyCode))) < 0
|
||||
then KeyStateList.Add(Pointer(PtrUInt(AVKeyCode)));
|
||||
if KeyStateList.IndexOf({%H-}Pointer(PtrUInt(AVKeyCode))) < 0
|
||||
then KeyStateList.Add({%H-}Pointer(PtrUInt(AVKeyCode)));
|
||||
end
|
||||
else begin
|
||||
KeyStateList.Remove(Pointer(PtrUInt(AVKeyCode)));
|
||||
KeyStateList.Remove({%H-}Pointer(PtrUInt(AVKeyCode)));
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -1052,7 +1052,7 @@ begin
|
||||
gdiPen: Result := SelectPen(AGdiObject);
|
||||
else
|
||||
// we only handle bitmaps here atm
|
||||
Result := {%H-}PGdiObject(GTK2WidgetSet.SelectObject(HDC(Self), HGDIOBJ(AGdiObject)));
|
||||
Result := {%H-}PGdiObject(GTK2WidgetSet.SelectObject(HDC(Self), {%H-}HGDIOBJ(AGdiObject)));
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -741,7 +741,7 @@ begin
|
||||
//Note: Assign/Clear is called inside CreateHandle before Handle is set
|
||||
if FOwner.HandleAllocated then
|
||||
begin
|
||||
WidgetInfo := GetWidgetInfo(Pointer(FOwner.Handle), False);
|
||||
WidgetInfo := GetWidgetInfo({%H-}Pointer(FOwner.Handle), False);
|
||||
Inc(WidgetInfo^.ChangeLock);
|
||||
|
||||
gtk_list_store_clear(FGtkListStore);
|
||||
@ -783,7 +783,7 @@ begin
|
||||
gtk_tree_model_iter_nth_child(FGtkListStore, @ListItem, nil, Index);
|
||||
|
||||
//gtk_list_store_g
|
||||
WidgetInfo := GetWidgetInfo(Pointer(FOwner.Handle));
|
||||
WidgetInfo := GetWidgetInfo({%H-}Pointer(FOwner.Handle));
|
||||
//Lock the widget to avoid trigger events
|
||||
Inc(WidgetInfo^.ChangeLock);
|
||||
gtk_list_store_remove(FGtkListStore, @ListItem);
|
||||
@ -885,7 +885,7 @@ begin
|
||||
//internal index cache becomes out of sync
|
||||
if (FOwner is TCustomComboBox) and FOwner.HandleAllocated then
|
||||
begin
|
||||
LCLIndex := PInteger(GetWidgetInfo(Pointer(FOwner.Handle))^.UserData);
|
||||
LCLIndex := PInteger(GetWidgetInfo({%H-}Pointer(FOwner.Handle))^.UserData);
|
||||
if Index <= LCLIndex^ then
|
||||
Inc(LCLIndex^);
|
||||
end;
|
||||
|
@ -46,29 +46,29 @@ begin
|
||||
dy := 0;
|
||||
|
||||
// rubber band is just a window without a title
|
||||
Result := HWND(gtk_window_new(GTK_WINDOW_POPUP));
|
||||
gtk_window_set_default_size(PGtkWindow(Result), dx, dy);
|
||||
Result := {%H-}HWND(gtk_window_new(GTK_WINDOW_POPUP));
|
||||
gtk_window_set_default_size({%H-}PGtkWindow(Result), dx, dy);
|
||||
gtk_widget_set_uposition(Widget, ARect.Left, ARect.Top);
|
||||
gtk_widget_set_app_paintable(Widget, True);
|
||||
gtk_widget_realize(Widget);
|
||||
gdk_window_set_decorations(Widget^.window, 0);
|
||||
gdk_window_set_functions(Widget^.window, GDK_FUNC_RESIZE or GDK_FUNC_CLOSE);
|
||||
gtk_window_set_opacity(PGtkWindow(Result), 0.25);
|
||||
gtk_window_set_opacity({%H-}PGtkWindow(Result), 0.25);
|
||||
if ABrush = 0 then
|
||||
SetWidgetColor(Widget, clNone, clGradientActiveCaption, [GTK_STATE_NORMAL])
|
||||
else
|
||||
if PGDIObject(ABrush)^.GDIBrushFill = GDK_SOLID then
|
||||
SetWidgetColor(Widget, clNone, PGDIObject(ABrush)^.GDIBrushColor.ColorRef, [GTK_STATE_NORMAL])
|
||||
if {%H-}PGDIObject(ABrush)^.GDIBrushFill = GDK_SOLID then
|
||||
SetWidgetColor(Widget, clNone, {%H-}PGDIObject(ABrush)^.GDIBrushColor.ColorRef, [GTK_STATE_NORMAL])
|
||||
else
|
||||
begin
|
||||
Pixmap := gdk_pixmap_new(Widget^.window, dx, dy, -1);
|
||||
gc := gdk_gc_new(Pixmap);
|
||||
AColor := AllocGDKColor(clWhite);
|
||||
gdk_gc_set_foreground(gc, @AColor);
|
||||
gdk_gc_set_fill(gc, PGDIObject(ABrush)^.GDIBrushFill);
|
||||
case PGDIObject(ABrush)^.GDIBrushFill of
|
||||
GDK_TILED: gdk_gc_set_tile(gc, PGDIObject(ABrush)^.GDIBrushPixMap);
|
||||
GDK_STIPPLED: gdk_gc_set_stipple(gc, PGDIObject(ABrush)^.GDIBrushPixMap);
|
||||
gdk_gc_set_fill(gc, {%H-}PGDIObject(ABrush)^.GDIBrushFill);
|
||||
case {%H-}PGDIObject(ABrush)^.GDIBrushFill of
|
||||
GDK_TILED: gdk_gc_set_tile(gc, {%H-}PGDIObject(ABrush)^.GDIBrushPixMap);
|
||||
GDK_STIPPLED: gdk_gc_set_stipple(gc, {%H-}PGDIObject(ABrush)^.GDIBrushPixMap);
|
||||
end;
|
||||
gdk_draw_rectangle(Pixmap, gc, -1, 0, 0, dx, dy);
|
||||
gdk_gc_unref(gc);
|
||||
@ -81,7 +81,7 @@ end;
|
||||
|
||||
procedure TGtk2WidgetSet.DestroyRubberBand(ARubberBand: HWND);
|
||||
begin
|
||||
gtk_widget_destroy(PGtkWidget(ARubberBand));
|
||||
gtk_widget_destroy({%H-}PGtkWidget(ARubberBand));
|
||||
end;
|
||||
|
||||
procedure TGtk2WidgetSet.DrawDefaultDockImage(AOldRect, ANewRect: TRect;
|
||||
@ -213,7 +213,7 @@ end;
|
||||
function TGtk2WidgetSet.FontIsMonoSpace(Font: HFont): boolean;
|
||||
begin
|
||||
Result:=IsValidGDIObject(Font)
|
||||
and FontIsMonoSpaceFont(PGdiObject(Font)^.GDIFontObject);
|
||||
and FontIsMonoSpaceFont({%H-}PGdiObject(Font)^.GDIFontObject);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -240,11 +240,6 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
function TGtk2WidgetSet.RawImage_CreateBitmaps(const ARawImage: TRawImage;
|
||||
out ABitmap, AMask: HBitmap; ASkipMask: Boolean): boolean;
|
||||
type
|
||||
TFourBytes = packed record
|
||||
B0,B1,B2,B3: Byte;
|
||||
end;
|
||||
|
||||
var
|
||||
GdiObject: PGDIObject absolute ABitmap;
|
||||
GdiMaskObject: PGDIObject absolute AMask;
|
||||
@ -867,12 +862,12 @@ end;
|
||||
function TGtk2WidgetSet.GetLCLOwnerObject(Handle: HWnd): TObject;
|
||||
begin
|
||||
if Handle<>0 then
|
||||
Result:=GetNearestLCLObject(PGtkWidget(Handle))
|
||||
Result:=GetNearestLCLObject({%H-}PGtkWidget(Handle))
|
||||
else
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
function PromptUserBoxClosed(Widget : PGtkWidget; Event : PGdkEvent;
|
||||
function PromptUserBoxClosed(Widget : PGtkWidget; {%H-}Event : PGdkEvent;
|
||||
data: gPointer) : GBoolean; cdecl;
|
||||
var
|
||||
ModalResult : PtrUInt;
|
||||
@ -880,7 +875,7 @@ begin
|
||||
{ We were requested by window manager to close so return EscapeResult}
|
||||
if PInteger(data)^ = 0 then
|
||||
begin
|
||||
ModalResult:= PtrUInt(gtk_object_get_data(PGtkObject(Widget), 'modal_result'));
|
||||
ModalResult:= {%H-}PtrUInt(gtk_object_get_data(PGtkObject(Widget), 'modal_result'));
|
||||
{ Don't allow to close if we don't have a default return value }
|
||||
Result:= (ModalResult = 0);
|
||||
if not Result then PInteger(data)^:= ModalResult
|
||||
@ -890,7 +885,7 @@ end;
|
||||
|
||||
function PromptUserButtonClicked(Widget : PGtkWidget; data: gPointer) : GBoolean; cdecl;
|
||||
begin
|
||||
PInteger(data)^ := PtrUInt(gtk_object_get_data(PGtkObject(Widget), 'modal_result'));
|
||||
PInteger(data)^ := {%H-}PtrUInt(gtk_object_get_data(PGtkObject(Widget), 'modal_result'));
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
@ -934,7 +929,7 @@ var
|
||||
begin
|
||||
if ThemeServices.GetStockImage(AImageHint, BitmapHandle, MaskHandle) then
|
||||
begin
|
||||
GDIObject := PGDIObject(BitmapHandle);
|
||||
GDIObject := {%H-}PGDIObject(BitmapHandle);
|
||||
Mask := nil;
|
||||
Pixbuf := nil;
|
||||
if GDIObject^.GDIBitmapType = gbPixbuf then
|
||||
@ -1054,7 +1049,7 @@ begin
|
||||
|
||||
X := Buttons[BtnIdx].ModalResult;
|
||||
gtk_object_set_data(PGtkObject(Btn), 'modal_result',
|
||||
Pointer(PtrInt(X)));
|
||||
{%H-}Pointer(PtrInt(X)));
|
||||
|
||||
g_signal_connect(PGtkObject(Btn), 'clicked',
|
||||
TGtkSignalFunc(@PromptUserButtonClicked), @ADialogResult);
|
||||
@ -1064,7 +1059,7 @@ begin
|
||||
gtk_dialog_set_default_response(PGtkDialog(Dialog), ResponseID(BtnID));
|
||||
X := Buttons[BtnIdx].ModalResult;
|
||||
gtk_object_set_data(PGtkObject(Dialog), 'modal_result',
|
||||
Pointer(PtrInt(X)));
|
||||
{%H-}Pointer(PtrInt(X)));
|
||||
end;
|
||||
|
||||
inc(BtnIdx);
|
||||
@ -1093,7 +1088,7 @@ begin
|
||||
begin
|
||||
ActiveWindow := GetActiveWindow;
|
||||
if ActiveWindow <> 0 then
|
||||
gtk_window_set_transient_for(PGtkWindow(Dialog), PGtkWindow(ActiveWindow));
|
||||
gtk_window_set_transient_for(PGtkWindow(Dialog), {%H-}PGtkWindow(ActiveWindow));
|
||||
end;
|
||||
gtk_dialog_run(PGtkDialog(Dialog));
|
||||
gtk_widget_destroy(Dialog);
|
||||
@ -1215,7 +1210,7 @@ begin
|
||||
|
||||
X := Buttons[BtnIdx];
|
||||
gtk_object_set_data(PGtkObject(Btn), 'modal_result',
|
||||
Pointer(PtrInt(X)));
|
||||
{%H-}Pointer(PtrInt(X)));
|
||||
|
||||
g_signal_connect(PGtkObject(Btn), 'clicked',
|
||||
TGtkSignalFunc(@PromptUserButtonClicked), @ADialogResult);
|
||||
@ -1225,7 +1220,7 @@ begin
|
||||
gtk_dialog_set_default_response(PGtkDialog(Dialog), ResponseID(Buttons[BtnIdx]));
|
||||
X := Buttons[BtnIdx];
|
||||
gtk_object_set_data(PGtkObject(Dialog), 'modal_result',
|
||||
Pointer(PtrInt(X)));
|
||||
{%H-}Pointer(PtrInt(X)));
|
||||
end;
|
||||
|
||||
inc(BtnIdx);
|
||||
@ -1254,7 +1249,7 @@ begin
|
||||
begin
|
||||
ActiveWindow := GetActiveWindow;
|
||||
if ActiveWindow <> 0 then
|
||||
gtk_window_set_transient_for(PGtkWindow(Dialog), PGtkWindow(ActiveWindow));
|
||||
gtk_window_set_transient_for(PGtkWindow(Dialog), {%H-}PGtkWindow(ActiveWindow));
|
||||
end;
|
||||
gtk_dialog_run(PGtkDialog(Dialog));
|
||||
gtk_widget_destroy(Dialog);
|
||||
@ -1269,7 +1264,7 @@ var
|
||||
Requisition: TGtkRequisition;
|
||||
begin
|
||||
Result:=True;
|
||||
p := GetWidgetInfo(Pointer(Handle), False)^.CoreWidget;
|
||||
p := GetWidgetInfo({%H-}Pointer(Handle), False)^.CoreWidget;
|
||||
|
||||
Menu := PGtkWidget(g_object_get_data(G_OBJECT(p), 'Menu'));
|
||||
if Menu<>nil then begin
|
||||
@ -1285,7 +1280,7 @@ end;
|
||||
//##apiwiz##eps## // Do not remove, no wizard declaration after this line
|
||||
|
||||
|
||||
function waithandle_iocallback(source: PGIOChannel; condition: TGIOCondition;
|
||||
function waithandle_iocallback({%H-}source: PGIOChannel; condition: TGIOCondition;
|
||||
data: gpointer): gboolean; cdecl;
|
||||
var
|
||||
lEventHandler: PWaitHandleEventHandler absolute data;
|
||||
@ -1353,7 +1348,7 @@ end;
|
||||
procedure TGtk2WidgetSet.SetRubberBandRect(const ARubberBand: HWND; const ARect: TRect);
|
||||
begin
|
||||
with ARect do
|
||||
gdk_window_move_resize(PGtkWidget(ARubberBand)^.window, Left,
|
||||
gdk_window_move_resize({%H-}PGtkWidget(ARubberBand)^.window, Left,
|
||||
Top, Right - Left, Bottom - Top);
|
||||
end;
|
||||
|
||||
@ -1375,7 +1370,7 @@ begin
|
||||
lPipeEventInfo^.UserData := AData;
|
||||
lPipeEventInfo^.OnEvent := AEventHandler;
|
||||
lPipeEventInfo^.Handler := AddEventHandler(AHandle, G_IO_IN or G_IO_HUP or G_IO_OUT,
|
||||
@HandlePipeEvent, PtrUInt(lPipeEventInfo));
|
||||
@HandlePipeEvent, {%H-}PtrUInt(lPipeEventInfo));
|
||||
Result := lPipeEventInfo;
|
||||
end;
|
||||
|
||||
|
@ -36,12 +36,12 @@ function AddPipeEventHandler(AHandle: THandle;
|
||||
function AddProcessEventHandler(AHandle: THandle;
|
||||
AEventHandler: TChildExitEvent; AData: PtrInt): PProcessEventHandler; override;
|
||||
function AskUser(const DialogCaption, DialogMessage: string; DialogType:
|
||||
LongInt; Buttons: TDialogButtons; HelpCtx: Longint): LongInt; override;
|
||||
LongInt; Buttons: TDialogButtons; {%H-}HelpCtx: Longint): LongInt; override;
|
||||
|
||||
function CreateStandardCursor(ACursor: SmallInt): hCursor; override;
|
||||
function CreateRubberBand(const ARect: TRect; const ABrush: HBrush = 0): HWND; override;
|
||||
procedure DestroyRubberBand(ARubberBand: HWND); override;
|
||||
procedure DrawDefaultDockImage(AOldRect, ANewRect: TRect; AOperation: TDockImageOperation); override;
|
||||
procedure DrawDefaultDockImage({%H-}AOldRect, ANewRect: TRect; AOperation: TDockImageOperation); override;
|
||||
procedure DrawGrid(DC: HDC; const R: TRect; DX, DY: Integer); override;
|
||||
|
||||
function ExtUTF8Out(DC: HDC; X, Y: Integer; Options: Longint; Rect: PRect;
|
||||
|
@ -46,7 +46,7 @@ end;}
|
||||
|
||||
Handler for draw events of every item in a TGtkListStringList.
|
||||
------------------------------------------------------------------------------}
|
||||
function gtkListItemDrawAfterCB(Widget: PGtkWidget; area: PGDKRectangle;
|
||||
function gtkListItemDrawAfterCB(Widget: PGtkWidget; {%H-}area: PGDKRectangle;
|
||||
data: gPointer): GBoolean; cdecl;
|
||||
var
|
||||
Msg: TLMDrawListItem;
|
||||
@ -96,7 +96,7 @@ begin
|
||||
Include(State,odFocused);
|
||||
|
||||
// create message and deliver
|
||||
FillChar(Msg,SizeOf(Msg),0);
|
||||
FillChar(Msg{%H-},SizeOf(Msg),0);
|
||||
Msg.Msg:=LM_DrawListItem;
|
||||
New(Msg.DrawListItemStruct);
|
||||
try
|
||||
@ -104,12 +104,12 @@ begin
|
||||
with Msg.DrawListItemStruct^ do begin
|
||||
ItemID:=ItemIndex;
|
||||
Area:=AreaRect;
|
||||
DC:=GetDC(HWnd(PtrUInt(Widget)));
|
||||
DC:=GetDC(HWnd({%H-}PtrUInt(Widget)));
|
||||
ItemState:=State;
|
||||
end;
|
||||
//DebugLn('gtkListItemDrawAfterCB ',DbgSName(LCLList.Owner),' Widget=',DbgS(Widget));
|
||||
Result := DeliverMessage(LCLList.Owner, Msg)=0;
|
||||
ReleaseDC(HWnd(PtrUInt(Widget)),Msg.DrawListItemStruct^.DC);
|
||||
ReleaseDC(HWnd({%H-}PtrUInt(Widget)),Msg.DrawListItemStruct^.DC);
|
||||
finally
|
||||
Dispose(Msg.DrawListItemStruct);
|
||||
end;
|
||||
@ -157,7 +157,7 @@ begin
|
||||
// get itemindex and area
|
||||
ItemIndex:=g_list_index(GtkList^.children,Data);
|
||||
|
||||
if LockOnChange(PgtkObject(LCLList.Owner.Handle),0) > 0 then Exit;
|
||||
if LockOnChange({%H-}PgtkObject(LCLList.Owner.Handle),0) > 0 then Exit;
|
||||
|
||||
if GtkWidgetIsA(Widget,gtk_toggle_button_get_type) then begin
|
||||
gtk_object_set_data(PgtkObject(Widget), 'Grayed', nil);
|
||||
@ -224,7 +224,7 @@ begin
|
||||
// get itemindex and area
|
||||
//ItemIndex:=g_list_index(GtkList^.children,Data);
|
||||
|
||||
if LockOnChange(PGtkObject(LCLList.Owner.Handle),0) > 0 then Exit;
|
||||
if LockOnChange({%H-}PGtkObject(LCLList.Owner.Handle),0) > 0 then Exit;
|
||||
|
||||
Mess.Msg := LM_SELCHANGE;
|
||||
Mess.Result := 0;
|
||||
@ -557,7 +557,7 @@ begin
|
||||
// Currently, there's no know bug origined from this flaw.
|
||||
inc(FUpdateCount);
|
||||
if (FUpdateCount=1) and (Owner<>nil) and (Owner.HandleAllocated) then
|
||||
LockOnChange(PGtkObject(Owner.Handle),+1);
|
||||
LockOnChange({%H-}PGtkObject(Owner.Handle),+1);
|
||||
end;
|
||||
|
||||
procedure TGtkListStringList.EndUpdate;
|
||||
@ -565,7 +565,7 @@ begin
|
||||
dec(FUpdateCount);
|
||||
if (FUpdateCount=0) then begin
|
||||
if (Owner<>nil) and (Owner.HandleAllocated) then
|
||||
LockOnChange(PGtkObject(Owner.Handle),-1);
|
||||
LockOnChange({%H-}PGtkObject(Owner.Handle),-1);
|
||||
if (glsItemCacheNeedsUpdate in FStates) then
|
||||
UpdateItemCache;
|
||||
end;
|
||||
@ -786,7 +786,7 @@ begin
|
||||
FCachedCount:=0;
|
||||
//Update the internal Item Index cache
|
||||
if FOwner.HandleAllocated and (FOwner is TCustomComboBox) then
|
||||
PInteger(GetWidgetInfo(Pointer(FOwner.Handle))^.UserData)^ := -1;
|
||||
PInteger(GetWidgetInfo({%H-}Pointer(FOwner.Handle))^.UserData)^ := -1;
|
||||
EndUpdate;
|
||||
{$IFDEF CheckGtkList}
|
||||
ConsistencyCheck;
|
||||
@ -960,7 +960,7 @@ begin
|
||||
//internal index cache becomes out of sync
|
||||
if (FOwner is TCustomComboBox) and FOwner.HandleAllocated then
|
||||
begin
|
||||
LCLIndex := PInteger(GetWidgetInfo(Pointer(FOwner.Handle))^.UserData);
|
||||
LCLIndex := PInteger(GetWidgetInfo({%H-}Pointer(FOwner.Handle))^.UserData);
|
||||
if Index <= LCLIndex^ then
|
||||
Inc(LCLIndex^);
|
||||
end;
|
||||
|
@ -2508,7 +2508,7 @@ end;
|
||||
procedure InitKeyboardTables;
|
||||
|
||||
procedure FindVKeyInfo(const AKeySym: Cardinal; var AVKey: Byte;
|
||||
var AExtended, AHasMultiVK, ASecondKey: Boolean);
|
||||
out AExtended, AHasMultiVK, ASecondKey: Boolean);
|
||||
var
|
||||
ByteKey: Byte;
|
||||
begin
|
||||
@ -9326,7 +9326,7 @@ begin
|
||||
end;
|
||||
|
||||
{$IFDEF HasX}
|
||||
function XGetWorkarea(var ax,ay,awidth,aheight:gint): gint;
|
||||
function XGetWorkarea(out ax,ay,awidth,aheight:gint): gint;
|
||||
|
||||
var
|
||||
XDisplay: PDisplay;
|
||||
@ -9353,6 +9353,11 @@ begin
|
||||
ay:=current_desktop[1];
|
||||
awidth:=current_desktop[2];
|
||||
aheight:=current_desktop[3];
|
||||
end else begin
|
||||
ax:=0;
|
||||
ay:=0;
|
||||
awidth:=0;
|
||||
aheight:=0;
|
||||
end;
|
||||
if current_desktop <> nil then
|
||||
XFree (current_desktop);
|
||||
|
@ -739,7 +739,7 @@ procedure FillScreenFonts(ScreenFonts: TStrings);
|
||||
{$ENDIF}
|
||||
function GetTextHeight(DCTextMetric: TDevContextTextMetric): integer;
|
||||
{$IFDEF HasX}
|
||||
function XGetWorkarea(var ax,ay,awidth,aheight:gint): gint;
|
||||
function XGetWorkarea(out ax,ay,awidth,aheight:gint): gint;
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -89,11 +89,11 @@ function EnableScrollBar(Wnd: HWND; wSBflags, wArrows: Cardinal): Boolean; overr
|
||||
function EnableWindow(hWnd: HWND; bEnable: Boolean): Boolean; override;
|
||||
function EndPaint(Handle : hwnd; var PS : TPaintStruct): Integer; override;
|
||||
procedure EnterCriticalSection(var CritSection: TCriticalSection); override;
|
||||
function EnumDisplayMonitors(hdc: HDC; lprcClip: PRect; lpfnEnum: MonitorEnumProc; dwData: LPARAM): LongBool; override;
|
||||
function EnumDisplayMonitors({%H-}hdc: HDC; {%H-}lprcClip: PRect; lpfnEnum: MonitorEnumProc; dwData: LPARAM): LongBool; override;
|
||||
{$IFDEF GTK2OLDENUMFONTFAMILIES}
|
||||
function EnumFontFamilies(DC: HDC; Family: Pchar; EnumFontFamProc: FontEnumProc; LParam:Lparam):longint; override;
|
||||
{$ENDIF}
|
||||
function EnumFontFamiliesEx(DC: HDC; lpLogFont: PLogFont; Callback: FontEnumExProc; Lparam: LParam; Flags: dword): longint; override;
|
||||
function EnumFontFamiliesEx({%H-}DC: HDC; lpLogFont: PLogFont; Callback: FontEnumExProc; Lparam: LParam; {%H-}Flags: dword): longint; override;
|
||||
function ExcludeClipRect(dc: hdc; Left, Top, Right, Bottom : Integer) : Integer; override;
|
||||
function ExtCreatePen(dwPenStyle, dwWidth: DWord; const lplb: TLogBrush; dwStyleCount: DWord; lpStyle: PDWord): HPEN; override;
|
||||
function ExtSelectClipRGN(dc: hdc; rgn : hrgn; Mode : Longint) : Integer; override;
|
||||
@ -170,13 +170,13 @@ procedure LeaveCriticalSection(var CritSection: TCriticalSection); override;
|
||||
function LineTo(DC: HDC; X, Y: Integer): Boolean; override;
|
||||
function LPtoDP(DC: HDC; var Points; Count: Integer): BOOL; override;
|
||||
|
||||
function MessageBox(hWnd: HWND; lpText, lpCaption: PChar; uType: Cardinal): integer; override;
|
||||
function MessageBox({%H-}hWnd: HWND; lpText, lpCaption: PChar; uType: Cardinal): integer; override;
|
||||
function MoveToEx(DC: HDC; X, Y: Integer; OldPoint: PPoint): Boolean; override;
|
||||
function MoveWindowOrgEx(DC: HDC; dX, dY: Integer): Boolean; override;
|
||||
|
||||
function OffsetRgn(RGN: HRGN; nXOffset, nYOffset: Integer): Integer; override;
|
||||
|
||||
function PeekMessage(var lpMsg : TMsg; Handle : HWND; wMsgFilterMin, wMsgFilterMax,wRemoveMsg : UINT): Boolean; override;
|
||||
function PeekMessage(var lpMsg : TMsg; {%H-}Handle : HWND; {%H-}wMsgFilterMin, {%H-}wMsgFilterMax,wRemoveMsg : UINT): Boolean; override;
|
||||
function PolyBezier(DC: HDC; Points: PPoint; NumPts: Integer; Filled, Continuous: boolean): boolean; override;
|
||||
function Polygon(DC: HDC; Points: PPoint; NumPts: Integer; Winding: boolean): boolean; override;
|
||||
function Polyline(DC: HDC; Points: PPoint; NumPts: Integer): boolean; override;
|
||||
@ -189,17 +189,17 @@ function Rectangle(DC: HDC; X1, Y1, X2, Y2: Integer): Boolean; override;
|
||||
function RectVisible(dc : hdc; const ARect: TRect) : Boolean; override;
|
||||
function RegroupMenuItem(hndMenu: HMENU; GroupIndex: integer): Boolean; override;
|
||||
function ReleaseCapture : Boolean; override;
|
||||
function ReleaseDC(hWnd: HWND; DC: HDC): Integer; override;
|
||||
function ReleaseDC({%H-}hWnd: HWND; DC: HDC): Integer; override;
|
||||
function RemoveProp(Handle: hwnd; Str: PChar): THandle; override;
|
||||
function RestoreDC(DC: HDC; SavedDC: Integer): Boolean; override;
|
||||
function RoundRect(DC : hDC; X1, Y1, X2, Y2: Integer; RX,RY : Integer): Boolean; override;
|
||||
|
||||
function SaveDC(DC: HDC): Integer; override;
|
||||
function ScreenToClient(Handle : HWND; var P : TPoint) : Integer; override;
|
||||
function ScrollWindowEx(hWnd: HWND; dx, dy: Integer; prcScroll, prcClip: PRect; hrgnUpdate: HRGN; prcUpdate: PRect; flags: UINT): Boolean; override;
|
||||
function ScrollWindowEx(hWnd: HWND; dx, dy: Integer; prcScroll, prcClip: PRect; {%H-}hrgnUpdate: HRGN; prcUpdate: PRect; flags: UINT): Boolean; override;
|
||||
function SelectClipRGN(DC : hDC; RGN : HRGN) : Longint; override;
|
||||
function SelectObject(DC: HDC; GDIObj: HGDIOBJ): HGDIOBJ; override;
|
||||
function SelectPalette(DC: HDC; Palette: HPALETTE; ForceBackground: Boolean): HPALETTE; override;
|
||||
function SelectPalette({%H-}DC: HDC; {%H-}Palette: HPALETTE; {%H-}ForceBackground: Boolean): HPALETTE; override;
|
||||
function SendMessage(HandleWnd: HWND; Msg: Cardinal; wParam: WParam; lParam: LParam): LResult; override;
|
||||
function SetActiveWindow(Handle: HWND): HWND; override;
|
||||
function SetBkColor(DC: HDC; Color: TColorRef): TColorRef; override;
|
||||
@ -218,7 +218,7 @@ function SetProp(Handle: hwnd; Str : PChar; Data : Pointer) : Boolean; override;
|
||||
function SetROP2(DC: HDC; Mode: Integer): Integer; override;
|
||||
function SetScrollInfo(Handle : HWND; SBStyle : Integer; ScrollInfo: TScrollInfo; bRedraw : Boolean): Integer; override;
|
||||
function SetSysColors(cElements: Integer; const lpaElements; const lpaRgbValues): Boolean; override;
|
||||
function SetTextCharacterExtra(DC : hdc; nCharExtra : Integer):Integer; override;
|
||||
function SetTextCharacterExtra({%H-}DC : hdc; {%H-}nCharExtra : Integer):Integer; override;
|
||||
function SetTextColor(DC: HDC; Color: TColorRef): TColorRef; override;
|
||||
function SetViewPortExtEx(DC: HDC; XExtent, YExtent : Integer; OldSize: PSize): Boolean; override;
|
||||
function SetViewPortOrgEx(DC: HDC; NewX, NewY: Integer; OldPoint: PPoint): Boolean; override;
|
||||
@ -233,7 +233,7 @@ function ShowScrollBar(Handle: HWND; wBar: Integer; bShow: Boolean): Boolean; ov
|
||||
function ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean; override;
|
||||
function StretchBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; ROp: Cardinal): Boolean; override;
|
||||
function StretchMaskBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; Mask: HBITMAP; XMask, YMask: Integer; Rop: DWORD): Boolean; override;
|
||||
function SystemParametersInfo(uiAction: DWord; uiParam: DWord; pvParam: Pointer; fWinIni: DWord): LongBool; override;
|
||||
function SystemParametersInfo(uiAction: DWord; {%H-}uiParam: DWord; pvParam: Pointer; {%H-}fWinIni: DWord): LongBool; override;
|
||||
|
||||
function TextOut(DC: HDC; X,Y : Integer; Str : Pchar; Count: Integer) : Boolean; override;
|
||||
|
||||
|
@ -143,7 +143,7 @@ procedure MoveRect(var ARect: TRect; x, y: Integer);
|
||||
procedure MoveRectToFit(var ARect: TRect; const MaxRect: TRect);
|
||||
procedure MakeMinMax(var i1, i2: integer);
|
||||
procedure CalculateLeftTopWidthHeight(X1,Y1,X2,Y2: integer;
|
||||
var Left,Top,Width,Height: integer);
|
||||
out Left,Top,Width,Height: integer);
|
||||
|
||||
function DeleteAmpersands(var Str : String) : Longint;
|
||||
function BreakString(const s: string; MaxLineLength, Indent: integer): string;
|
||||
@ -1031,7 +1031,7 @@ begin
|
||||
end;
|
||||
|
||||
procedure CalculateLeftTopWidthHeight(X1, Y1, X2, Y2: integer;
|
||||
var Left, Top, Width, Height: integer);
|
||||
out Left, Top, Width, Height: integer);
|
||||
begin
|
||||
if X1 <= X2 then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user