Prechádzať zdrojové kódy

* Fixed XImage (function pointers are now declared)

sg 25 rokov pred
rodič
commit
bfdb2d88c1
1 zmenil súbory, kde vykonal 22 pridanie a 9 odobranie
  1. 22 9
      packages/x11/xlib.pp

+ 22 - 9
packages/x11/xlib.pp

@@ -299,12 +299,23 @@ uses X;
     {
      * Data structure for "image" data, used by image manipulation routines.
      }
-     { Added the following empty record - needed in Ximage.
-       Fill in later. MVC }
-       Funcsrecord = record
-          dummy : integer; { Just something stupid }
-          end;
-       TXImage = record
+      PXImage = ^TXImage;
+
+      TXImageFunctions = record
+         create_image: function(display: PDisplay; visual: PVisual;
+	   depth: Cardinal; format, offset: LongInt; data: PChar;
+	   width, height: Cardinal;
+	   bitmap_pad, bytes_per_line: Cardinal): PXImage; cdecl;
+	 destroy_image: function(image: PXImage): LongInt; cdecl;
+	 get_pixel: function(image: PXImage; x, y: LongInt): LongInt; cdecl;
+	 put_pixel: function(image: PXImage; x, y: LongInt;
+	   color: Cardinal): LongInt; cdecl;
+	 sub_image: function(image: PXImage; x, y: LongInt;
+	   w, h: Cardinal): PXImage; cdecl;
+	 add_pixel: function(image: PXImage; value: LongInt): LongInt;
+      end;
+
+      TXImage = record
             width : longint;
             height : longint;
             xoffset : longint;
@@ -321,9 +332,8 @@ uses X;
             green_mask : cardinal;
             blue_mask : cardinal;
             obdata : TXPointer;
-            funcs : funcsrecord {Added this. Incorrectly converted}
+            f : TXImageFunctions
          end;
-      PXImage = ^TXImage;
     {
      * Data structure for XReconfigureWindow
      }
@@ -1723,7 +1733,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.1.2.3  2000-10-26 23:13:27  peter
+  Revision 1.1.2.4  2000-10-29 12:33:41  sg
+  * Fixed XImage (function pointers are now declared)
+
+  Revision 1.1.2.3  2000/10/26 23:13:27  peter
     * undo my previous commit
 
   Revision 1.1.2.2  2000/10/26 23:04:42  peter