mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 11:29:31 +02:00
* Fixed compilation for gtk2
git-svn-id: trunk@5414 -
This commit is contained in:
parent
05f9bbe917
commit
2d80402433
@ -267,7 +267,12 @@ const
|
||||
type
|
||||
TGdkPixBufBuffer = {$IFDEF Gtk2}Pguchar{$ELSE}PChar{$ENDIF};
|
||||
|
||||
|
||||
|
||||
{$IFDEF GTK2}
|
||||
const
|
||||
GDK_VOIDSYMBOL = $FFFFFF;
|
||||
{$ENDIF}
|
||||
|
||||
// MWE: All the IFDEFs for GTK2 annoyed me so I defined all (most) constants here
|
||||
{$IFNDEF GTK2}
|
||||
{$I gtkkeysyms.inc}
|
||||
@ -569,6 +574,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.59 2004/04/19 09:30:04 marc
|
||||
* Fixed compilation for gtk2
|
||||
|
||||
Revision 1.58 2004/04/18 23:55:39 marc
|
||||
* Applied patch from Ladislav Michl
|
||||
* Changed the way TControl.Text is resolved
|
||||
|
@ -2067,7 +2067,7 @@ function TGtkWidgetSet.GetWindowRawImageDescription(GDKWindow: PGdkWindow;
|
||||
var
|
||||
Visual: PGdkVisual;
|
||||
Width, Height: integer;
|
||||
WindowType: TGdkWindowType;
|
||||
// WindowType: TGdkWindowType;
|
||||
IsGdkBitmap: Boolean;
|
||||
begin
|
||||
Result := false;
|
||||
@ -2084,15 +2084,15 @@ begin
|
||||
If GDKWindow <> nil then begin
|
||||
Visual:=gdk_window_get_visual(GDKWindow);
|
||||
GDK_Window_Get_Size(GDKWindow,@Width,@Height);
|
||||
if Visual=nil then begin
|
||||
WindowType:=gdk_window_get_type(GDKWindow);
|
||||
if WindowType=GDK_WINDOW_PIXMAP then begin
|
||||
// if Visual=nil then begin
|
||||
// WindowType:=gdk_window_get_type(GDKWindow);
|
||||
// if WindowType=GDK_WINDOW_PIXMAP then begin
|
||||
// a pixmap without visual
|
||||
//writeln('TGtkWidgetSet.GetWindowRawImageDescription GdkBitmap Type=',WindowType,' ',Width,',',Height,' ',GDK_WINDOW_PIXMAP);
|
||||
// ToDo: find a test: gdkpixmap or gdkbitmap
|
||||
//if IsBitmap then IsGdkBitmap:=true;
|
||||
end;
|
||||
end;
|
||||
// end;
|
||||
// end;
|
||||
end;
|
||||
if Visual=nil then begin
|
||||
Visual := GDK_Visual_Get_System;
|
||||
@ -9404,6 +9404,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.496 2004/04/19 09:30:04 marc
|
||||
* Fixed compilation for gtk2
|
||||
|
||||
Revision 1.495 2004/04/18 23:55:39 marc
|
||||
* Applied patch from Ladislav Michl
|
||||
* Changed the way TControl.Text is resolved
|
||||
|
@ -4023,11 +4023,6 @@ begin
|
||||
Result := PAcceleratorKey(gtk_object_get_data(PGtkObject(Widget),'AccelKey'));
|
||||
end;
|
||||
|
||||
{$Ifdef GTK2}
|
||||
const
|
||||
GDK_VOIDSYMBOL = $FFFFFF;
|
||||
{$EndIf}
|
||||
|
||||
function SetAccelKey(const Widget: PGtkWidget;
|
||||
Key: guint; Mods: TGdkModifierType; const Signal: string): PAcceleratorKey;
|
||||
begin
|
||||
@ -6747,6 +6742,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.276 2004/04/19 09:30:04 marc
|
||||
* Fixed compilation for gtk2
|
||||
|
||||
Revision 1.275 2004/04/11 18:58:26 micha
|
||||
fix (lm_)setcursor changes for gtk target
|
||||
|
||||
|
@ -28,7 +28,11 @@ interface
|
||||
|
||||
uses
|
||||
// libs
|
||||
{$IFDEF GTK2}
|
||||
GLib2, Gtk2,
|
||||
{$ELSE}
|
||||
GLib, Gtk,
|
||||
{$ENDIF}
|
||||
// LCL
|
||||
Buttons, Classes, LCLType, LMessages, Controls,
|
||||
// widgetset
|
||||
@ -139,7 +143,11 @@ begin
|
||||
end;
|
||||
|
||||
BtnWidget := PGtkButton(AWinControl.Handle);
|
||||
{$IFDEF GTK2}
|
||||
LblWidget := PGtkLabel(PGtkBin(BtnWidget)^.Child);
|
||||
{$ELSE}
|
||||
LblWidget := PGtkLabel(BtnWidget^.Child);
|
||||
{$ENDIF}
|
||||
|
||||
if LblWidget = nil
|
||||
then begin
|
||||
|
@ -27,7 +27,7 @@ unit GtkWSControls;
|
||||
interface
|
||||
|
||||
uses
|
||||
Gtk,
|
||||
{$IFDEF GTK2} Gtk2, {$ELSE} Gtk, {$ENDIF}
|
||||
////////////////////////////////////////////////////
|
||||
// I M P O R T A N T
|
||||
////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user