Release 960712
Fri Jul 12 17:43:05 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [controls/scroll.c]
Use Win32 heap functions to allocate scroll-bar info structure.
* [debugger/dbg.y] [debugger/registers.c]
Added support for FS and GS segment registers.
Check that segment registers value are OK before returning from
the signal handler.
* [tools/build.c] [if1632/relay.c] [loader/builtin.c]
Changed relay debugging for Win32 function: the relay code now
passes the entry point address instead of the function name.
* [tools/build.c] [miscemu/*.c]
Added support for data entry points in Win32 DLLs.
Added 'cdecl' function type for Win32.
For 'register' function, the relay code now passes a pointer to
the SIGCONTEXT structure.
* [include/registers.h] [include/wine.h]
Moved SIGCONTEXT structure definition in registers.h.
* [loader/pe_image.c]
Don't die at once if some Win32 entry points cannot be found, but
set them to NULL, just like we do for Win16. This allows some
programs to go further before crashing.
* [loader/task.c] [loader/main.c]
Moved global initializations from InitTask() to MAIN_Init(), as
they no longer need a task context with the new SEGPTR heap functions.
* [memory/string.c]
Added lstrcpynAtoW and lstrcpynWtoA; not real API functions, but
very convenient.
* [windows/graphics.c]
Partially implemented DrawEdge().
* [windows/timer.c] [windows/caret.c]
Implemented Win32 timer handling. Updated caret management to use
Win32 timers (avoids having to use a Win16 callback).
* [windows/win.c]
Prevent programs from setting some style bits with
SetWindowLong(). This should fix some BadMatch crashes.
Link new windows at the end of the linked list.
* [windows/winpos.c]
Don't try to activate a child window in ShowWindow().
* [windows/winproc.c]
Added a 32->32 thunk to support Ansi-Unicode translation.
Wed Jul 10 22:11:12 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/directory.c]
Additional (undocumented) return value for GetTempDrive() added.
* [files/dos_fs.c] [files/file.c] [include/windows.h]
GetTempFileName32* added.
GetShortPathName* added.
* [memory/string.c]
Win16 lstrcpy() can get NULL ptrs as argument and survive.
* [misc/lzexpand.c]
LZOpenFile(): also try opening with compressed filename if normal
open fails.
* [misc/ole2nls.c] [misc/lstr.c] [include/windows.h]
Char* added.
CompareString* added.
Sun Jul 7 01:22:14 1996 Jukka Iivonen <iivonen@cc.helsinki.fi>
* [objects/font.c] [if1632/gdi32.spec]
CreateFontIndirect32A and CreateFontIndirect32W added.
* [misc/ole2nls.c]
GetUserDefaultLCID return values updated for new languages.
Finnish support added for GetLocaleInfoA.
* [object/palette] [gdi32.spec]
RealizePalette32 and SelectPalette32 added.
Sat Jul 6 17:27:30 1996 Ronan Waide <root@waider.ie>
* [misc/shell.c]
Fixup for SHELL_FindExecutable so that File->Run from progman
works once more. Still needs some more fixups - grep for FIXME in
this file.
diff --git a/windows/caret.c b/windows/caret.c
index 902d309..e7f4b65 100644
--- a/windows/caret.c
+++ b/windows/caret.c
@@ -14,16 +14,16 @@
typedef struct
{
- HWND hwnd;
- short hidden;
- BOOL on;
- short x;
- short y;
- short width;
- short height;
- HBRUSH hBrush;
- WORD timeout;
- WORD timerid;
+ HWND32 hwnd;
+ UINT32 hidden;
+ BOOL32 on;
+ INT32 x;
+ INT32 y;
+ INT32 width;
+ INT32 height;
+ HBRUSH16 hBrush;
+ UINT32 timeout;
+ UINT32 timerid;
} CARET;
typedef enum
@@ -33,13 +33,13 @@
CARET_TOGGLE,
} DISPLAY_CARET;
-static CARET Caret = { 0, };
+static CARET Caret;
/*****************************************************************
* CARET_GetHwnd
*/
-HWND CARET_GetHwnd()
+HWND32 CARET_GetHwnd()
{
return Caret.hwnd;
}
@@ -47,10 +47,10 @@
/*****************************************************************
* CARET_DisplayCaret
*/
-void CARET_DisplayCaret(DISPLAY_CARET status)
+static void CARET_DisplayCaret( DISPLAY_CARET status )
{
- HDC hdc;
- HBRUSH hPrevBrush;
+ HDC16 hdc;
+ HBRUSH16 hPrevBrush;
if (Caret.on && (status == CARET_ON)) return;
if (!Caret.on && (status == CARET_OFF)) return;
@@ -69,37 +69,35 @@
/*****************************************************************
* CARET_Callback
*/
-WORD CARET_Callback(HWND hwnd, WORD msg, WORD timerid, LONG ctime)
+static VOID CARET_Callback( HWND32 hwnd, UINT32 msg, UINT32 id, DWORD ctime)
{
dprintf_caret(stddeb,"CARET_Callback: hwnd=%04x, timerid=%d, caret=%d\n",
- hwnd, timerid, Caret.on);
-
+ hwnd, id, Caret.on);
CARET_DisplayCaret(CARET_TOGGLE);
- return 0;
}
/*****************************************************************
* CARET_SetTimer
*/
-void CARET_SetTimer(void)
+static void CARET_SetTimer(void)
{
- if (Caret.timerid) KillSystemTimer((HWND)0, Caret.timerid);
- Caret.timerid = SetSystemTimer((HWND)0, 0, Caret.timeout,
- MODULE_GetWndProcEntry16("CARET_Callback"));
+ if (Caret.timerid) KillSystemTimer32( (HWND32)0, Caret.timerid );
+ Caret.timerid = SetSystemTimer32( (HWND32)0, 0, Caret.timeout,
+ CARET_Callback );
}
/*****************************************************************
* CARET_ResetTimer
*/
-void CARET_ResetTimer(void)
+static void CARET_ResetTimer(void)
{
if (Caret.timerid)
{
- KillSystemTimer((HWND)0, Caret.timerid);
- Caret.timerid = SetSystemTimer((HWND)0, 0, Caret.timeout,
- MODULE_GetWndProcEntry16("CARET_Callback"));
+ KillSystemTimer32( (HWND32)0, Caret.timerid );
+ Caret.timerid = SetSystemTimer32( (HWND32)0, 0, Caret.timeout,
+ CARET_Callback );
}
}
@@ -107,20 +105,20 @@
/*****************************************************************
* CARET_KillTimer
*/
-void CARET_KillTimer(void)
+static void CARET_KillTimer(void)
{
if (Caret.timerid)
{
- KillSystemTimer((HWND)0, Caret.timerid);
+ KillSystemTimer32( (HWND32)0, Caret.timerid );
Caret.timerid = 0;
}
}
/*****************************************************************
- * CreateCaret (USER.163)
+ * CreateCaret (USER.163) (USER32.65)
*/
-BOOL CreateCaret(HWND hwnd, HBITMAP bitmap, INT width, INT height)
+BOOL16 CreateCaret( HWND32 hwnd, HBITMAP32 bitmap, INT32 width, INT32 height )
{
dprintf_caret(stddeb,"CreateCaret: hwnd=%04x\n", hwnd);
@@ -158,10 +156,9 @@
/*****************************************************************
- * DestroyCaret (USER.164)
+ * DestroyCaret (USER.164) (USER32.130)
*/
-
-BOOL DestroyCaret()
+BOOL16 DestroyCaret(void)
{
if (!Caret.hwnd) return FALSE;
@@ -171,20 +168,18 @@
DeleteObject( Caret.hBrush );
CARET_KillTimer();
CARET_DisplayCaret(CARET_OFF);
-
Caret.hwnd = 0;
return TRUE;
}
/*****************************************************************
- * SetCaretPos (USER.165)
+ * SetCaretPos (USER.165) (USER32.465)
*/
-
-void SetCaretPos(short x, short y)
+BOOL16 SetCaretPos( INT32 x, INT32 y)
{
- if (!Caret.hwnd) return;
- if ((x == Caret.x) && (y == Caret.y)) return;
+ if (!Caret.hwnd) return FALSE;
+ if ((x == Caret.x) && (y == Caret.y)) return TRUE;
dprintf_caret(stddeb,"SetCaretPos: x=%d, y=%d\n", x, y);
@@ -197,16 +192,17 @@
CARET_DisplayCaret(CARET_ON);
CARET_SetTimer();
}
+ return TRUE;
}
-/*****************************************************************
- * HideCaret (USER.166)
- */
-void HideCaret(HWND hwnd)
+/*****************************************************************
+ * HideCaret (USER.166) (USER32.316)
+ */
+BOOL16 HideCaret( HWND32 hwnd )
{
- if (!Caret.hwnd) return;
- if (hwnd && (Caret.hwnd != hwnd)) return;
+ if (!Caret.hwnd) return FALSE;
+ if (hwnd && (Caret.hwnd != hwnd)) return FALSE;
dprintf_caret(stddeb,"HideCaret: hwnd=%04x, hidden=%d\n",
hwnd, Caret.hidden);
@@ -214,17 +210,17 @@
CARET_KillTimer();
CARET_DisplayCaret(CARET_OFF);
Caret.hidden++;
+ return TRUE;
}
/*****************************************************************
- * ShowCaret (USER.167)
+ * ShowCaret (USER.167) (USER32.528)
*/
-
-void ShowCaret(HWND hwnd)
+BOOL16 ShowCaret( HWND32 hwnd )
{
- if (!Caret.hwnd) return;
- if (hwnd && (Caret.hwnd != hwnd)) return;
+ if (!Caret.hwnd) return FALSE;
+ if (hwnd && (Caret.hwnd != hwnd)) return FALSE;
dprintf_caret(stddeb,"ShowCaret: hwnd=%04x, hidden=%d\n",
hwnd, Caret.hidden);
@@ -238,61 +234,66 @@
CARET_SetTimer();
}
}
+ return TRUE;
}
/*****************************************************************
- * SetCaretBlinkTime (USER.168)
+ * SetCaretBlinkTime (USER.168) (USER32.464)
*/
-
-void SetCaretBlinkTime(WORD msecs)
+BOOL16 SetCaretBlinkTime( UINT32 msecs )
{
- if (!Caret.hwnd) return;
+ if (!Caret.hwnd) return FALSE;
dprintf_caret(stddeb,"SetCaretBlinkTime: hwnd=%04x, msecs=%d\n",
Caret.hwnd, msecs);
Caret.timeout = msecs;
CARET_ResetTimer();
+ return TRUE;
}
/*****************************************************************
- * GetCaretBlinkTime (USER.169)
+ * GetCaretBlinkTime16 (USER.169)
*/
+UINT16 GetCaretBlinkTime16(void)
+{
+ return (UINT16)GetCaretBlinkTime32();
+}
-WORD GetCaretBlinkTime()
+
+/*****************************************************************
+ * GetCaretBlinkTime32 (USER32.208)
+ */
+UINT32 GetCaretBlinkTime32(void)
{
if (!Caret.hwnd) return 0;
-
- dprintf_caret(stddeb,"GetCaretBlinkTime: hwnd=%04x, msecs=%d\n",
- Caret.hwnd, Caret.timeout);
-
return Caret.timeout;
}
/*****************************************************************
- * GetCaretPos16 (USER.183)
+ * GetCaretPos16 (USER.183)
*/
-void GetCaretPos16( LPPOINT16 pt )
+VOID GetCaretPos16( LPPOINT16 pt )
{
if (!Caret.hwnd || !pt) return;
dprintf_caret(stddeb,"GetCaretPos: hwnd=%04x, pt=%p, x=%d, y=%d\n",
Caret.hwnd, pt, Caret.x, Caret.y);
-
- pt->x = Caret.x;
- pt->y = Caret.y;
+ pt->x = (INT16)Caret.x;
+ pt->y = (INT16)Caret.y;
}
/*****************************************************************
- * GetCaretPos32 (USER32.209)
+ * GetCaretPos32 (USER32.209)
*/
-void GetCaretPos32( LPPOINT32 pt )
+BOOL32 GetCaretPos32( LPPOINT32 pt )
{
- if (!Caret.hwnd || !pt) return;
+ if (!Caret.hwnd || !pt) return FALSE;
pt->x = Caret.x;
pt->y = Caret.y;
+ return TRUE;
}