فهرست منبع

* gtk2 gboolean changed to boolean32. Change is relative small due to new
type, and put undef ifdef use define noboolean32 to undo.
Requires only one lazarus change that is backwards compat.
Fixes Mantis #17400

git-svn-id: trunk@17923 -

marco 14 سال پیش
والد
کامیت
3d9c83715c
3فایلهای تغییر یافته به همراه10 افزوده شده و 2 حذف شده
  1. 5 1
      packages/gtk2/src/glib/gmacros.inc
  2. 4 0
      packages/gtk2/src/glib/gtypes.inc
  3. 1 1
      packages/gtk2/src/gtk2x11/include/gdkx.inc

+ 5 - 1
packages/gtk2/src/glib/gmacros.inc

@@ -13,9 +13,13 @@
 {$IFDEF read_interface_rest}
 const
   NULL = nil;
+{$ifdef noboolean32}
   gTRUE = 1;
   gFALSE = 0;
-
+{$else}
+  gTRUE = boolean32(true);
+  gFALSE = boolean32(false);
+{$endif}
 function CLAMP(x, MinX, MaxX: integer): integer;
 // Macros by analogy to GINT_TO_POINTER, GPOINTER_TO_INT
 function GPOINTER_TO_SIZE(p: GPointer): GSize;

+ 4 - 0
packages/gtk2/src/glib/gtypes.inc

@@ -32,7 +32,11 @@
    gint  = cint;
 
    Pgboolean = ^gboolean;
+{$ifdef noboolean32}
    gboolean  = longbool;
+{$else}
+   gboolean  = boolean32;
+{$endif}
 
    Pguchar = ^guchar;
    PPguchar = ^Pguchar;

+ 1 - 1
packages/gtk2/src/gtk2x11/include/gdkx.inc

@@ -211,7 +211,7 @@ var
    if_local1 : TGC;
 begin
    if_local1:=(PGdkGCX11(gc))^.xgc;
-   if (GDK_GC_X11(gc))^.dirty_mask=gTRUE then begin
+   if (GDK_GC_X11(gc))^.dirty_mask=longint(gTRUE) then begin
      //if_local1:=_gdk_x11_gc_flush(gc)
    end;
    GDK_GC_GET_XGC:=if_local1;