Release 940201
Tue Feb 1 21:14:47 1994 Bob Amstadt (bob@pooh)
* [loader/selector.c]
Added function CreateNewSegments(). Modified IPCCopySelector
to allow aliasing to any arbitrary memory space.
* [memory/global.c]
Fixed potential bug in GlobalGetFreeSegments().
* [memory/linear.c]
Created functions GlobalLinearLock() and GlobalLinearUnlock().
Tue Feb 1 05:51:43 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [controls/widgets.c]
Removed CAPTION window class.
* [loader/cursor.c]
Bug fix in LoadCursor(): don't allocate memory every time for
built-in cursors.
* [windows/clipping.c]
Invalidate child windows in InvalidateRgn().
* [windows/defwnd.c]
Added repaint of the caption when changing window text.
* [windows/event.c]
Modified SetCapture() to allow keyboard events while capturing.
* [windows/message.c]
New function MSG_GetHardwareMessage(), to do mouse tracking
without returning control to the Windows program.
* [windows/nonclient.c]
A couple of changes in frame drawing for DLGMODALFRAME windows.
Rewritten window moving code, to use MSG_GetHardwareMessage()
instead of non-client mouse events (this is the way Windows
does it), and to send WM_ENTERSIZEMOVE messages.
Removed WM_NCBUTTONUP and WM_NCMOUSEMOVE handlers.
* [windows/win.c]
Allocate temporary structures on the USER heap instead of
using GlobalAlloc().
* [windows/winpos.c]
Added function WINPOS_GetMinMaxInfo() to get sizing informations.
Jan 31, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/nonclient.c]
Call to StdDrawScrollBar() during NC's drawing.
Call to NC_ScrollBarButtonDown() on NC mouse events WM_LBUTTONDOWN.
Call to NC_ScrollBarButtonUp() on NC mouse events WM_LBUTTONUP.
Call to NC_ScrollBarMouseMove() on NC mouse events WM_MOUSEMOVE.
* [controls/menu.c]
New GetSubMenu() function.
Move GetMenu() & SetMenu() functions from 'windows/win.c'.
* [controls/listbox.c]
Start changes to satisfy recent changes in scrollbars/windows.
* [loader/resource.c]
Put some code in LoadAccelerators() stub.
New TranslateAccelerator() function.
* [windows/win.c]
Remove GetMenu() & SetMenu() functions.
Call to NC_CreateScrollBars() if required by CreateWindow().
Mon Jan 24 10:40:10 EST 1994 John Richardson (jrichard@cs.uml.edu)
* [window/win.c]
Added functions EnumWindows, EnumChildWindows, and helper
WIN_EnumChildWin. EnumWindows won't list all wine windows
because GetDesktopWindow isn't complete. However, the code
is in place for it to work correctly and only needs
GetDesktopWindow to do so.
Tue Jan 25 05:51:47 1994 julliard@di.epfl.ch (Alexandre Julliard)
* [windows/defwnd.c]
Added handling of activation messages (WM_ACTIVATE,
WM_NCACTIVATE, WM_MOUSEACTIVATE)
* [windows/event.c]
De-activate the window when losing input focus.
* [windows/focus.c]
Bug fix in SetFocus().
* [windows/message.c]
Added activation of the window on mouse-clicks.
* [windows/nonclient.c]
Changed non-client area painting to use the correct colors
depending upon the activation state.
Added WM_NCACTIVATE message handling.
Fixed a couple of bugs in window moving and resizing.
* [windows/winpos.c]
Implemented Get/SetActiveWindow().
Implemented SWP_NOACTIVATE flag in SetWindowPos().
Jan 17, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [misc/message.c]
MessageBox has a CaptionBar for his title except for
MB_SYSTEMMODAL with MB_ICONHAND.
* [windows/nonclient.c]
Call to NC_TrackSysMenu on SysMenu button mouse click.
* [windows/defwnd.c]
Call to NC_TrackSysMenu on Alt key (VK_MENU).
* [controls/menu.c]
New GetSystemMenu() function.
New CopySystemMenu() internal function.
New NC_TrackSysMenu() internal function.
* [include/windows.h]
New WM_INITMENU, WM_INITMENUPOPUP, WM_MENUSELECT & WM_MENUCHAR defines.
diff --git a/misc/Imakefile b/misc/Imakefile
index 53eda76..b628e2e 100644
--- a/misc/Imakefile
+++ b/misc/Imakefile
@@ -3,37 +3,45 @@
MODULE = misc
SRCS = \
- kernel.c \
- user.c \
- rect.c \
- file.c \
- sound.c \
+ comm.c \
+ dos.c \
+ dos_fs.c \
emulate.c \
- keyboard.c \
- profile.c \
- lstr.c \
exec.c \
- message.c \
+ file.c \
int1a.c \
int21.c \
- dos_fs.c \
+ kernel.c \
+ keyboard.c \
+ lstr.c \
+ main.c \
+ message.c \
+ profile.c \
+ rect.c \
+ sound.c \
+ spy.c \
+ user.c \
xt.c
OBJS = \
- kernel.o \
- user.o \
- rect.o \
- file.o \
- sound.o \
+ comm.o \
+ dos.o \
+ dos_fs.o \
emulate.o \
- keyboard.o \
- profile.o \
- lstr.o \
exec.o \
- message.o \
+ file.o \
int1a.o \
int21.o \
- dos_fs.o \
+ kernel.o \
+ keyboard.o \
+ lstr.o \
+ main.o \
+ message.o \
+ profile.o \
+ rect.o \
+ sound.o \
+ spy.o \
+ user.o \
xt.o
WineRelocatableTarget($(TOP)/$(MODULE),,$(OBJS))
diff --git a/misc/comm.c b/misc/comm.c
index ca65c0d..d9f5344 100644
--- a/misc/comm.c
+++ b/misc/comm.c
@@ -8,7 +8,7 @@
#include <fcntl.h>
#include <string.h>
#include <sys/stat.h>
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__FreeBSD__)
#include <errno.h>
#include <sys/ioctl.h>
#endif
diff --git a/misc/dos_fs.c b/misc/dos_fs.c
index b8f052e..3840972 100644
--- a/misc/dos_fs.c
+++ b/misc/dos_fs.c
@@ -13,7 +13,7 @@
#ifdef __linux__
#include <sys/vfs.h>
#endif
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__FreeBSD__)
#include <sys/types.h>
#include <sys/mount.h>
#endif
diff --git a/misc/int21.c b/misc/int21.c
index 4d1ae70..6caaa7c 100644
--- a/misc/int21.c
+++ b/misc/int21.c
@@ -1,7 +1,9 @@
#include <time.h>
#include <fcntl.h>
#include <errno.h>
+#ifndef __STDC__
#include <malloc.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
diff --git a/misc/message.c b/misc/message.c
index f6fb52f..364b460 100644
--- a/misc/message.c
+++ b/misc/message.c
@@ -6,7 +6,14 @@
static char Copyright[] = "Copyright Martin Ayotte, 1993";
-#include "windows.h"
+#define DEBUG_MSGBOX
+
+#include <windows.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include "prototypes.h"
#include "heap.h"
#include "win.h"
@@ -26,7 +33,6 @@
} MSGBOX;
typedef MSGBOX FAR* LPMSGBOX;
-
LONG SystemMessageBoxProc(HWND hwnd, WORD message, WORD wParam, LONG lParam);
/**************************************************************************
@@ -40,8 +46,11 @@
WNDCLASS wndClass;
MSG msg;
MSGBOX mb;
+ DWORD dwStyle;
wndPtr = WIN_FindWndPtr(hWnd);
+#ifdef DEBUG_MSGBOX
printf( "MessageBox: '%s'\n", str );
+#endif
wndClass.style = CS_HREDRAW | CS_VREDRAW ;
wndClass.lpfnWndProc = (WNDPROC)SystemMessageBoxProc;
wndClass.cbClsExtra = 0;
@@ -58,8 +67,9 @@
mb.Str = str;
mb.wType = type;
mb.ActiveFlg = TRUE;
- hDlg = CreateWindow("MESSAGEBOX", title,
- WS_POPUP | WS_DLGFRAME | WS_VISIBLE, 100, 150, 400, 120,
+ dwStyle = WS_POPUP | WS_DLGFRAME | WS_VISIBLE;
+ if ((type & (MB_SYSTEMMODAL | MB_TASKMODAL)) == 0) dwStyle |= WS_CAPTION;
+ hDlg = CreateWindow("MESSAGEBOX", title, dwStyle, 100, 150, 400, 120,
(HWND)NULL, (HMENU)NULL, wndPtr->hInstance, (LPSTR)&mb);
if (hDlg == 0) return 0;
while(TRUE) {
@@ -68,8 +78,10 @@
TranslateMessage(&msg);
DispatchMessage(&msg);
}
- printf( "after MessageBox !\n");
if (!UnregisterClass("MESSAGEBOX", wndPtr->hInstance)) return 0;
+#ifdef DEBUG_MSGBOX
+ printf( "MessageBox return %04X !\n", mb.wRetVal);
+#endif
return(mb.wRetVal);
}
@@ -219,7 +231,9 @@
EndPaint(hWnd, &ps);
break;
case WM_DESTROY:
+#ifdef DEBUG_MSGBOX
printf("MessageBox WM_DESTROY !\n");
+#endif
ReleaseCapture();
lpmb = MsgBoxGetStorageHeader(hWnd);
lpmb->ActiveFlg = FALSE;
@@ -227,6 +241,9 @@
if (lpmb->hWndYes) DestroyWindow(lpmb->hWndYes);
if (lpmb->hWndNo) DestroyWindow(lpmb->hWndNo);
if (lpmb->hWndCancel) DestroyWindow(lpmb->hWndCancel);
+#ifdef DEBUG_MSGBOX
+ printf("MessageBox WM_DESTROY end !\n");
+#endif
break;
case WM_COMMAND:
lpmb = MsgBoxGetStorageHeader(hWnd);
@@ -257,17 +274,41 @@
HFONT hOldFont;
RECT rect;
BITMAP bm;
- char C[80];
int X;
- static HBITMAP hBitMap;
+ OFSTRUCT ofstruct;
+ static LPSTR ptr;
+ static char str[256];
+ static HBITMAP hBitMap = 0;
+ static BOOL CreditMode;
+ static HANDLE hFile = 0;
switch (msg) {
case WM_INITDIALOG:
- strcpy(C, "WINELOGO");
- hBitMap = LoadBitmap((HINSTANCE)NULL, (LPSTR)C);
+ CreditMode = FALSE;
+ strcpy(str, "WINELOGO");
+ hBitMap = LoadBitmap((HINSTANCE)NULL, (LPSTR)str);
+/* getcwd(str, 256);
+ strcat(str, ";");
+ strcat(str, getenv("HOME"));
+ strcat(str, ";");
+ strcat(str, getenv("WINEPATH")); */
+ strcpy(str, "PROPOSED_LICENSE");
+ printf("str = '%s'\n", str);
+ hFile = KERNEL_OpenFile((LPSTR)str, &ofstruct, OF_READ);
+ ptr = (LPSTR)malloc(2048);
+ lseek(hFile, 0L, SEEK_SET);
+ KERNEL__lread(hFile, ptr, 2000L);
+ close(hFile);
return TRUE;
case WM_PAINT:
hDC = BeginPaint(hDlg, &ps);
GetClientRect(hDlg, &rect);
+ if (CreditMode) {
+ FillRect(hDC, &rect, GetStockObject(WHITE_BRUSH));
+ InflateRect(&rect, -8, -8);
+ DrawText(hDC, ptr, -1, &rect, DT_LEFT | DT_WORDBREAK);
+ EndPaint(hDlg, &ps);
+ return TRUE;
+ }
FillRect(hDC, &rect, GetStockObject(GRAY_BRUSH));
InflateRect(&rect, -3, -3);
FrameRect(hDC, &rect, GetStockObject(BLACK_BRUSH));
@@ -283,8 +324,26 @@
case WM_COMMAND:
switch (wParam)
{
+ case IDYES:
+ if (!CreditMode) {
+ SetWindowPos(hDlg, (HWND)NULL, 0, 0, 640, 480,
+ SWP_NOMOVE | SWP_NOZORDER);
+ }
+ else {
+ SetWindowPos(hDlg, (HWND)NULL, 0, 0, 320, 250,
+ SWP_NOMOVE | SWP_NOZORDER);
+ }
+ CreditMode = !CreditMode;
+ ShowWindow(GetDlgItem(hDlg, IDYES), CreditMode ? SW_HIDE : SW_SHOW);
+ ShowWindow(GetDlgItem(hDlg, IDOK), CreditMode ? SW_HIDE : SW_SHOW);
+ InvalidateRect(hDlg, (LPRECT)NULL, TRUE);
+ UpdateWindow(hDlg);
+ return TRUE;
+ case IDCANCEL:
case IDOK:
-CloseDLG: EndDialog(hDlg, TRUE);
+CloseDLG: if (hBitMap != 0 ) DeleteObject(hBitMap);
+ if (ptr != NULL) free(ptr);
+ EndDialog(hDlg, TRUE);
return TRUE;
default:
return TRUE;