Browse Source

* fixed some variant issues
* improved type declarations

florian 22 năm trước cách đây
mục cha
commit
b6abfdae09
5 tập tin đã thay đổi với 104 bổ sung14 xóa
  1. 4 2
      rtl/inc/systemh.inc
  2. 24 7
      rtl/inc/varianth.inc
  3. 2 2
      rtl/win32/Makefile
  4. 1 1
      rtl/win32/Makefile.fpc
  5. 73 2
      rtl/win32/wininc/messages.inc

+ 4 - 2
rtl/inc/systemh.inc

@@ -241,6 +241,7 @@ Type
   PError              = ^Error;
 {$ifdef HASVARIANT}
   PVariant            = ^Variant;
+  POleVariant         = ^OleVariant;
 {$endif HASVARIANT}
 
 {$ifdef HASWIDECHAR}
@@ -698,8 +699,9 @@ const
 
 {
   $Log$
-  Revision 1.73  2003-10-06 23:52:53  florian
-    * some data types cleaned up
+  Revision 1.74  2003-10-08 16:24:47  florian
+    * fixed some variant issues
+    * improved type declarations
 
   Revision 1.72  2003/09/04 16:07:31  florian
     * fixed qword_to_double conversion on powerpc

+ 24 - 7
rtl/inc/varianth.inc

@@ -145,11 +145,16 @@ type
       varfromint64 : procedure(var dest : variant;const source : int64);
       varfromword64 : procedure(var dest : variant;const source : qword);
       varfromreal : procedure(var dest : variant;const source : extended);
-      varfrompstr: procedure(var dest: variant; const source: ShortString);
-      varfromlstr: procedure(var dest: variant; const source: ansistring);
-      varfromwstr: procedure(var dest: variant; const source: WideString);
-
-      {!!!!!!!}
+      varfrompstr: procedure(var dest : variant; const source : ShortString);
+      varfromlstr: procedure(var dest : variant; const source : ansistring);
+      varfromwstr: procedure(var dest : variant; const source : WideString);
+      varfromintf: procedure(var dest : variant;const source : iinterface);
+      varfromdisp: procedure(var dest : variant;const source : idispatch);
+      varfromdynarray: procedure(var dest : variant;const source : pointer; typeinfo: pointer);
+      olevarfrompstr: procedure(var dest : olevariant; const source : shortstring);
+      olevarfromlstr: procedure(var dest : olevariant; const source : ansistring);
+      olevarfromvar: procedure(var dest : olevariant; const source : variant);
+      olevarfromint: procedure(var dest : olevariant; const source : longint;const range : shortint);
 
       { operators }
       varop : procedure(var left : variant;const right : variant;opcode : tvarop);
@@ -163,9 +168,17 @@ type
       varaddref : procedure(var v : variant);
       varcopy : procedure(var dest : variant;const source : variant);
       varcast : procedure(var dest : variant;const source : variant;vartype : longint);
+      varcastole : procedure(var dest : variant; const source : variant;vartype : longint);
+
+      dispinvoke: procedure(dest : pvardata;const source : tvardata;
+        calldesc : pcalldesc;params : pointer);cdecl;
 
+      vararrayredim : procedure(var a : variant;highbound : SizeInt);
+      vararrayget : function(var a : variant;indexcount : SizeInt;indices : SizeInt) : variant;cdecl;
+      vararrayput: procedure(var a : variant; const value : variant;
+        indexcount : SizeInt;indices : SizeInt);cdecl;
       writevariant : function(var t : text;const v : variant;width : longint) : Pointer;
-      write0Variant : function(var t : text;const v : Variant): Pointer;
+      write0Variant : function(var t : text;const v : Variant) : Pointer;
    end;
    pvariantmanager = ^tvariantmanager;
 
@@ -282,7 +295,11 @@ operator <=(const op1,op2 : variant) dest : boolean;
 
 {
   $Log$
-  Revision 1.12  2003-10-04 23:40:42  florian
+  Revision 1.13  2003-10-08 16:24:47  florian
+    * fixed some variant issues
+    * improved type declarations
+
+  Revision 1.12  2003/10/04 23:40:42  florian
     * write helper comproc for variants fixed
 
   Revision 1.11  2002/10/10 19:24:28  florian

+ 2 - 2
rtl/win32/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 1.1 [2003/10/05]
+# Don't edit, this file is generated by FPCMake Version 1.1 [2003/10/04]
 #
 default: all
 MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom
@@ -1342,7 +1342,7 @@ strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
 		   $(SYSTEMUNIT)$(PPUEXT)
 windows$(PPUEXT) : windows.pp $(WINDOWS_SOURCE_FILES) $(SYSTEMUNIT)$(PPUEXT)
 	$(COMPILER) -I$(WININC) windows.pp
-messages$(PPUEXT): messages.pp $(SYSTEMUNIT)$(PPUEXT)
+messages$(PPUEXT): messages.pp $(WININC)/messages.inc $(SYSTEMUNIT)$(PPUEXT)
 	$(COMPILER) -I$(WININC) messages.pp
 ole2$(PPUEXT) : ole2.pp windows$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
 activex$(PPUEXT) : activex.pp $(WININC)/objbase.inc windows$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) types$(PPUEXT)

+ 1 - 1
rtl/win32/Makefile.fpc

@@ -124,7 +124,7 @@ strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
 windows$(PPUEXT) : windows.pp $(WINDOWS_SOURCE_FILES) $(SYSTEMUNIT)$(PPUEXT)
         $(COMPILER) -I$(WININC) windows.pp
 
-messages$(PPUEXT): messages.pp $(SYSTEMUNIT)$(PPUEXT)
+messages$(PPUEXT): messages.pp $(WININC)/messages.inc $(SYSTEMUNIT)$(PPUEXT)
         $(COMPILER) -I$(WININC) messages.pp
 
 ole2$(PPUEXT) : ole2.pp windows$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)

+ 73 - 2
rtl/win32/wininc/messages.inc

@@ -1190,17 +1190,88 @@ Type
 
     TWMSize = packed record
       Msg: Cardinal;
-      SizeType: LongInt;
+      SizeType : LongInt;
       Width : Word;
       Height : Word;
       Result : LongInt;
     End;
 
+    TWMNoParams = packed record
+      Msg : Cardinal;
+      Unused : array[0..3] of Word;
+      Result : Longint;
+    end;
+
+    TWMGetDlgCode = TWMNoParams;
+    TWMFontChange = TWMNoParams;
+    TWMGetFont = TWMNoParams;
+
+    TWMScroll = record
+      Msg : Cardinal;
+      ScrollCode : SmallInt;
+      Pos : SmallInt;
+      ScrollBar : HWND;
+      Result : LongInt;
+    end;
+
+    TWMHScroll = TWMScroll;
+    TWMVScroll = TWMScroll;
+
+    TWMGetText = packed record
+      Msg : Cardinal;
+      TextMax : LongInt;
+      Text : PChar;
+      Result : LongInt;
+    end;
+
+    TWMGetTextLength = TWMNoParams;
+
+    TWMKillFocus = packed record
+       Msg : Cardinal;
+       FocusedWnd : HWND;
+       UnUsed : LongInt;
+       Result : LongInt;
+    End;
+
+    TWMSetCursor = packed record
+      Msg : Cardinal;
+      CursorWnd : HWND;
+      HitTest : Word;
+      MouseMsg : Word;
+      Result : LongInt;
+    end;
+
+    TWMSetFocus = packed record
+      Msg : Cardinal;
+      FocusedWnd : HWND;
+      Unused : LongInt;
+      Result : LongInt;
+    end;
+
+    TWMSetFont = packed record
+      Msg : Cardinal;
+      Font : HFONT;
+      Redraw : WordBool;
+      Unused : Word;
+      Result : LongInt;
+    end;
+
+    TWMShowWindow = packed record
+      Msg : Cardinal;
+      Show : BOOL;
+      Status : LongInt;
+      Result : LongInt;
+    end;
+
 {$endif read_interface}
 
 {
   $Log$
-  Revision 1.6  2003-10-06 23:52:53  florian
+  Revision 1.7  2003-10-08 16:24:47  florian
+    * fixed some variant issues
+    * improved type declarations
+
+  Revision 1.6  2003/10/06 23:52:53  florian
     * some data types cleaned up
 
   Revision 1.5  2003/01/02 22:07:00  peter