Sweden-Number/DEVELOPERS-HINTS

81 lines
3.3 KiB
Plaintext
Raw Normal View History

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.
1994-02-02 07:48:31 +01:00
This is intend to be a document to help new developers get started.
Existing developers should feel free to add there comments.
RESERVING WINE PROJECT ARES:
If you wish to work on a specific set of API functions. Send
mail to wine-project@amscons.com. The automatic mail handler
will provide you with instructions.
SUBMITTING YOUR WORK:
Submissions of code for inclussion into Wine should be sent to
bob@amscons.com (Bob Amstadt). You MUST provide a suitable
ChangeLog entry for any work that you submit. I prefer new code
to be submitted as diffs off of the latest release. Releases are
every Tuesday evening (approximately 19:00 PST or Wednesday 03:00 GMT).
MEMORY AND SEGMENTS:
NE (Win16) executables consist of multiple segments. The Wine loader
loads each segment into a unique location the Wine processes memory
and assigns a selector to that segment. To make address conversion
simpler, Wine loads the segments in such a way that the segmented
address (16:16) is stored in memory the same way as the 32-bit linear
address. For example, the segmented address 1237:89AB can be at the
address 0x123789AB in the Wine process space.
This also implies that a Win16 program cannot access any arbitrary
memory location. If a pointer needs to be returned to a Win16 program,
then the memory block must be allocated using either GlobalAlloc()
or HEAP_Alloc(). The HEAP_* functions are faster than the Global*
functions but are only capable of managing a 64k memory block. The
HEAP_* functions are used to implement local heaps. Wine should
never call Local* functions. These functions are reserved for use
by Win16 programs only!
The following code fragment should be used to establish a new Wine
local heap:
#include "heap.h"
#define MY_HEAP_SIZE 0x10000 /* Must be <= 64k */
int MyHeapHandle;
void *MyHeapBase;
MDESC *MyHeap;
...
int InitMyHeap()
{
MyHeapHandle = GlobalAlloc(GMEM_FIXED, MY_HEAP_SIZE);
if (MyHeapHandle == 0)
return -1;
MyHeapBase = GlobalLock(MyHeapHandle);
HEAP_Init(&MyHeap, MyHeapBase, MY_HEAP_SIZE);
return 0;
}
Memory blocks greater than 64 kilobytes in length must be allocated
using GlobalAlloc(). Because of our special memory mapping, GlobalLock()
cannot be used to obtain the address of a linearly accessible memory
block that is greater than 64kB in length. Instead GlobalLinearLock()
should be used. The inverse function GlobalLinearUnlock() must be
called before the block can be freed with GlobalFree().
API ENTRY POINTS:
Because Win16 programs use a 16-bit stack and because they can only
call 16:16 addressed functions, all API entry points must be at low
address offsets and must have the arguments translated and moved to
Wines 32-bit stack. This task is handled by the code in the "if1632"
directory. To define a new API entry point handler you must place a
new entry in the appropriate API specification file. These files are
named *.spec. For example, the API specification file for the USER DLL
is contained in the file user.spec. These entries are processed by
the "build" program to create dll_*.s and dll_tab_*.c. The dll_*.s
files contain the entry point code for each API call, and the dll_tab_*.s
files contain tables used by relay.c to translate arguments and transfer
control to the proper handler. The format of the *.spec files is
documented in the file "tools/build-spec.txt".