1997-08-24 18:00:30 +02:00
|
|
|
/*
|
|
|
|
* Updown control
|
|
|
|
*
|
|
|
|
* Copyright 1997 Dimitrie O. Paun
|
|
|
|
*
|
|
|
|
* TODO:
|
|
|
|
* - subclass the buddy window (in UPDOWN_SetBuddy) to process the
|
|
|
|
* arrow keys
|
|
|
|
* - I am not sure about the default values for the Min, Max, Pos
|
|
|
|
* (in the UPDOWN_INFO the fields: MinVal, MaxVal, CurVal)
|
Release 970914
Thu Sep 11 18:24:56 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [objects/dc.c]
In DC_SetupGCForPatBlt, replace R2_NOT by GXxor with (black xor white).
Tue Sep 9 23:04:02 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
* [memory/virtual.c]
Do not write debugging info unconditionally to stderr.
* [files/profile.c]
Call PROFILE_GetSection in PROFILE_GetString for key_name "" too.
* [misc/crtdll.c]
Many new functions.
* [include/windows.h] [windows/winpos.c]
ClientToScreen16 doesn't have a return value.
Sun Sep 7 10:06:39 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [misc/main.c] [AUTHORS]
Update the list of contributors. Please let me know if I forgot
someone.
* [if1632/*.spec] [if1632/builtin.c] [tools/build.c]
Ordinal base for Win32 DLLs is now computed automatically from the
lowest ordinal found.
* [include/wintypes.h]
WINAPI is now defined as attribute((stdcall)). This will require
gcc to compile.
* [if1632/thunk.c]
Removed Win32 thunks (no longer needed with stdcall).
* [if1632/crtdll.spec] [misc/crtdll.c]
Make sure we only reference cdecl functions in the spec file.
* [objects/dc.c]
Use CapNotLast drawing style for 1-pixel wide lines.
* [tools/build.c]
Added 'double' argument type.
Added 'varargs' function type for Win32.
Made CallTo16_xxx functions stdcall.
Fri Sep 5 14:50:49 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [tools/build.c] [windows/win.c] [windows/event.c] [windows/message.c]
More fixes to get message exchange closer to the original.
* [misc/spy.c]
Message logs now contain window names.
* [loader/resource.c] [loader/ne_resource.c] [loader/task.c]
[objects/cursoricon.c] [windows/user.c]
Added some obscure features to fix memory leaks.
Fri Sep 5 00:46:28 1997 Jan Willamowius <jan@janhh.shnet.org>
* [if1632/kernel32.spec] [win32/newfns.c]
Added stub for UTRegister() and UTUnRegister().
Thu Sep 4 12:03:12 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c]
Allow ASCII codes > 127 in WM_CHAR.
Mon Sep 1 17:23:24 1997 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [controls/widgets.c]
In InitCommonControls, remember the name of the class
because lpszClassName was made to point to a local array
Added the ProgressBar to the list of implemented controls.
Call InitCommonControls from WIDGETS_Init to register all
implemented Common Controls.
* [include/commctrl.h]
Added misc decl for the Progress Bar.
* [controls/progress.c] [include/progress.h]
First attempt at implementiong the Progress Bar class.
* [objects/brush.h]
Implementation for GetSysColorBrush[16|32]
* [controls/status.c]
Use DrawEdge to draw the borders and fill the background
* [controls/uitools.c]
Added DrawDiagEdge32 and DrawRectEdge32
* [graphics/painting.c]
Implement DrawEdge[16|32]
Started DrawFrameControl32
Mon Sep 1 10:07:09 1997 Lawson Whitney <lawson_whitney@juno.com>
* [misc/comm.c] [include/windows.h]
SetCommEventMask returns a SEGPTR.
Sun Aug 31 23:28:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][loader/module.c][include/pe_image.h]
[include/module.h]
Cleaned up the whole Win32 library mess (a bit).
* [debugger/stabs.c]
If 'wine' has no absolute path and isn't found, check $PATH too.
* [misc/ole2nls.c]
Some fixes.
* [misc/ver.c]
Added support for PE style version resources.
* [memory/string.c]
Check for NULL pointers to _lstr* functions, just as Windows95 does.
* [multimedia/time.c]
Made list of timers a simple linked list.
* [loader/resource.c]
Netscape 3 seems to pass NEGATIVE resource Ids (in an
unsigned int, yes). Don't know why, fixed it anyway.
* [objects/bitmap.c]
LoadImageW added.
* [include/win.h][windows/win.c]
Change wIDmenu from UINT16 to UINT32 and changed the
SetWindow(Long|Word) accordingly.
Thu Aug 28 19:30:08 1997 Morten Welinder <terra@diku.dk>
* [include/windows.h]
Add a few more colors defined for Win95.
Add a few more brush styles.
* [windows/syscolor.c]
Add error checks for SYSCOLOR_SetColor, SYSCOLOR_Init,
GetSysColor16, GetSysColor32. Add support for above colors.
Sun Aug 24 16:22:57 1997 Andrew Taylor <andrew@riscan.com>
* [multimedia/mmsystem.c]
Changed mmioDescend to use mmio functions for file I/O, neccessary
for memory files.
1997-09-14 19:17:23 +02:00
|
|
|
* - I think I do not handle correctly the WS_BORDER style.
|
1997-08-24 18:00:30 +02:00
|
|
|
* Testing:
|
|
|
|
* Not much. The following have not been tested at all:
|
|
|
|
* - horizontal arrows
|
|
|
|
* - listbox as buddy window
|
|
|
|
* - acceleration
|
|
|
|
* - base 16
|
|
|
|
* - UDS_ALIGNLEFT, ~UDS_WRAP
|
|
|
|
* - integers with thousand separators.
|
|
|
|
* Even though the above list seems rather large, the control seems to
|
|
|
|
* behave very well so I am confident it does work in most (all) of the
|
|
|
|
* untested cases.
|
|
|
|
* Problems:
|
Release 970914
Thu Sep 11 18:24:56 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [objects/dc.c]
In DC_SetupGCForPatBlt, replace R2_NOT by GXxor with (black xor white).
Tue Sep 9 23:04:02 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
* [memory/virtual.c]
Do not write debugging info unconditionally to stderr.
* [files/profile.c]
Call PROFILE_GetSection in PROFILE_GetString for key_name "" too.
* [misc/crtdll.c]
Many new functions.
* [include/windows.h] [windows/winpos.c]
ClientToScreen16 doesn't have a return value.
Sun Sep 7 10:06:39 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [misc/main.c] [AUTHORS]
Update the list of contributors. Please let me know if I forgot
someone.
* [if1632/*.spec] [if1632/builtin.c] [tools/build.c]
Ordinal base for Win32 DLLs is now computed automatically from the
lowest ordinal found.
* [include/wintypes.h]
WINAPI is now defined as attribute((stdcall)). This will require
gcc to compile.
* [if1632/thunk.c]
Removed Win32 thunks (no longer needed with stdcall).
* [if1632/crtdll.spec] [misc/crtdll.c]
Make sure we only reference cdecl functions in the spec file.
* [objects/dc.c]
Use CapNotLast drawing style for 1-pixel wide lines.
* [tools/build.c]
Added 'double' argument type.
Added 'varargs' function type for Win32.
Made CallTo16_xxx functions stdcall.
Fri Sep 5 14:50:49 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [tools/build.c] [windows/win.c] [windows/event.c] [windows/message.c]
More fixes to get message exchange closer to the original.
* [misc/spy.c]
Message logs now contain window names.
* [loader/resource.c] [loader/ne_resource.c] [loader/task.c]
[objects/cursoricon.c] [windows/user.c]
Added some obscure features to fix memory leaks.
Fri Sep 5 00:46:28 1997 Jan Willamowius <jan@janhh.shnet.org>
* [if1632/kernel32.spec] [win32/newfns.c]
Added stub for UTRegister() and UTUnRegister().
Thu Sep 4 12:03:12 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c]
Allow ASCII codes > 127 in WM_CHAR.
Mon Sep 1 17:23:24 1997 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [controls/widgets.c]
In InitCommonControls, remember the name of the class
because lpszClassName was made to point to a local array
Added the ProgressBar to the list of implemented controls.
Call InitCommonControls from WIDGETS_Init to register all
implemented Common Controls.
* [include/commctrl.h]
Added misc decl for the Progress Bar.
* [controls/progress.c] [include/progress.h]
First attempt at implementiong the Progress Bar class.
* [objects/brush.h]
Implementation for GetSysColorBrush[16|32]
* [controls/status.c]
Use DrawEdge to draw the borders and fill the background
* [controls/uitools.c]
Added DrawDiagEdge32 and DrawRectEdge32
* [graphics/painting.c]
Implement DrawEdge[16|32]
Started DrawFrameControl32
Mon Sep 1 10:07:09 1997 Lawson Whitney <lawson_whitney@juno.com>
* [misc/comm.c] [include/windows.h]
SetCommEventMask returns a SEGPTR.
Sun Aug 31 23:28:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][loader/module.c][include/pe_image.h]
[include/module.h]
Cleaned up the whole Win32 library mess (a bit).
* [debugger/stabs.c]
If 'wine' has no absolute path and isn't found, check $PATH too.
* [misc/ole2nls.c]
Some fixes.
* [misc/ver.c]
Added support for PE style version resources.
* [memory/string.c]
Check for NULL pointers to _lstr* functions, just as Windows95 does.
* [multimedia/time.c]
Made list of timers a simple linked list.
* [loader/resource.c]
Netscape 3 seems to pass NEGATIVE resource Ids (in an
unsigned int, yes). Don't know why, fixed it anyway.
* [objects/bitmap.c]
LoadImageW added.
* [include/win.h][windows/win.c]
Change wIDmenu from UINT16 to UINT32 and changed the
SetWindow(Long|Word) accordingly.
Thu Aug 28 19:30:08 1997 Morten Welinder <terra@diku.dk>
* [include/windows.h]
Add a few more colors defined for Win95.
Add a few more brush styles.
* [windows/syscolor.c]
Add error checks for SYSCOLOR_SetColor, SYSCOLOR_Init,
GetSysColor16, GetSysColor32. Add support for above colors.
Sun Aug 24 16:22:57 1997 Andrew Taylor <andrew@riscan.com>
* [multimedia/mmsystem.c]
Changed mmioDescend to use mmio functions for file I/O, neccessary
for memory files.
1997-09-14 19:17:23 +02:00
|
|
|
* I do not like the arrows yet, I'll work more on them later on.
|
1997-08-24 18:00:30 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include "windows.h"
|
|
|
|
#include "winnls.h"
|
|
|
|
#include "sysmetrics.h"
|
|
|
|
#include "updown.h"
|
|
|
|
#include "graphics.h"
|
|
|
|
#include "heap.h"
|
|
|
|
#include "win.h"
|
|
|
|
#include "debug.h"
|
|
|
|
|
|
|
|
/* Control configuration constants */
|
|
|
|
|
|
|
|
#define INITIAL_DELAY 500 /* initial timer until auto-increment kicks in */
|
|
|
|
#define REPEAT_DELAY 50 /* delay between auto-increments */
|
|
|
|
|
Release 970914
Thu Sep 11 18:24:56 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [objects/dc.c]
In DC_SetupGCForPatBlt, replace R2_NOT by GXxor with (black xor white).
Tue Sep 9 23:04:02 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
* [memory/virtual.c]
Do not write debugging info unconditionally to stderr.
* [files/profile.c]
Call PROFILE_GetSection in PROFILE_GetString for key_name "" too.
* [misc/crtdll.c]
Many new functions.
* [include/windows.h] [windows/winpos.c]
ClientToScreen16 doesn't have a return value.
Sun Sep 7 10:06:39 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [misc/main.c] [AUTHORS]
Update the list of contributors. Please let me know if I forgot
someone.
* [if1632/*.spec] [if1632/builtin.c] [tools/build.c]
Ordinal base for Win32 DLLs is now computed automatically from the
lowest ordinal found.
* [include/wintypes.h]
WINAPI is now defined as attribute((stdcall)). This will require
gcc to compile.
* [if1632/thunk.c]
Removed Win32 thunks (no longer needed with stdcall).
* [if1632/crtdll.spec] [misc/crtdll.c]
Make sure we only reference cdecl functions in the spec file.
* [objects/dc.c]
Use CapNotLast drawing style for 1-pixel wide lines.
* [tools/build.c]
Added 'double' argument type.
Added 'varargs' function type for Win32.
Made CallTo16_xxx functions stdcall.
Fri Sep 5 14:50:49 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [tools/build.c] [windows/win.c] [windows/event.c] [windows/message.c]
More fixes to get message exchange closer to the original.
* [misc/spy.c]
Message logs now contain window names.
* [loader/resource.c] [loader/ne_resource.c] [loader/task.c]
[objects/cursoricon.c] [windows/user.c]
Added some obscure features to fix memory leaks.
Fri Sep 5 00:46:28 1997 Jan Willamowius <jan@janhh.shnet.org>
* [if1632/kernel32.spec] [win32/newfns.c]
Added stub for UTRegister() and UTUnRegister().
Thu Sep 4 12:03:12 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c]
Allow ASCII codes > 127 in WM_CHAR.
Mon Sep 1 17:23:24 1997 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [controls/widgets.c]
In InitCommonControls, remember the name of the class
because lpszClassName was made to point to a local array
Added the ProgressBar to the list of implemented controls.
Call InitCommonControls from WIDGETS_Init to register all
implemented Common Controls.
* [include/commctrl.h]
Added misc decl for the Progress Bar.
* [controls/progress.c] [include/progress.h]
First attempt at implementiong the Progress Bar class.
* [objects/brush.h]
Implementation for GetSysColorBrush[16|32]
* [controls/status.c]
Use DrawEdge to draw the borders and fill the background
* [controls/uitools.c]
Added DrawDiagEdge32 and DrawRectEdge32
* [graphics/painting.c]
Implement DrawEdge[16|32]
Started DrawFrameControl32
Mon Sep 1 10:07:09 1997 Lawson Whitney <lawson_whitney@juno.com>
* [misc/comm.c] [include/windows.h]
SetCommEventMask returns a SEGPTR.
Sun Aug 31 23:28:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][loader/module.c][include/pe_image.h]
[include/module.h]
Cleaned up the whole Win32 library mess (a bit).
* [debugger/stabs.c]
If 'wine' has no absolute path and isn't found, check $PATH too.
* [misc/ole2nls.c]
Some fixes.
* [misc/ver.c]
Added support for PE style version resources.
* [memory/string.c]
Check for NULL pointers to _lstr* functions, just as Windows95 does.
* [multimedia/time.c]
Made list of timers a simple linked list.
* [loader/resource.c]
Netscape 3 seems to pass NEGATIVE resource Ids (in an
unsigned int, yes). Don't know why, fixed it anyway.
* [objects/bitmap.c]
LoadImageW added.
* [include/win.h][windows/win.c]
Change wIDmenu from UINT16 to UINT32 and changed the
SetWindow(Long|Word) accordingly.
Thu Aug 28 19:30:08 1997 Morten Welinder <terra@diku.dk>
* [include/windows.h]
Add a few more colors defined for Win95.
Add a few more brush styles.
* [windows/syscolor.c]
Add error checks for SYSCOLOR_SetColor, SYSCOLOR_Init,
GetSysColor16, GetSysColor32. Add support for above colors.
Sun Aug 24 16:22:57 1997 Andrew Taylor <andrew@riscan.com>
* [multimedia/mmsystem.c]
Changed mmioDescend to use mmio functions for file I/O, neccessary
for memory files.
1997-09-14 19:17:23 +02:00
|
|
|
#define DEFAULT_WIDTH 14 /* default width of the ctrl */
|
|
|
|
#define DEFAULT_XSEP 0 /* default separation between buddy and crtl */
|
|
|
|
#define DEFAULT_ADDTOP 0 /* amount to extend above the buddy window */
|
|
|
|
#define DEFAULT_ADDBOT 0 /* amount to extend below the buddy window */
|
1997-08-24 18:00:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* Work constants */
|
|
|
|
|
|
|
|
#define FLAG_INCR 0x01
|
|
|
|
#define FLAG_DECR 0x02
|
|
|
|
#define FLAG_MOUSEIN 0x04
|
|
|
|
#define FLAG_CLICKED (FLAG_INCR | FLAG_DECR)
|
|
|
|
|
|
|
|
#define TIMERID1 1
|
|
|
|
#define TIMERID2 2
|
|
|
|
|
|
|
|
static int accelIndex = -1;
|
|
|
|
|
1998-03-15 21:29:56 +01:00
|
|
|
#define UNKNOWN_PARAM(msg, wParam, lParam) WARN(updown, \
|
1997-08-24 18:00:30 +02:00
|
|
|
"UpDown Ctrl: Unknown parameter(s) for message " #msg \
|
|
|
|
"(%04x): wp=%04x lp=%08lx\n", msg, wParam, lParam);
|
|
|
|
|
|
|
|
#define UPDOWN_GetInfoPtr(wndPtr) ((UPDOWN_INFO *)wndPtr->wExtra)
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* UPDOWN_InBounds
|
|
|
|
* Tests if a given value 'val' is between the Min&Max limits
|
|
|
|
*/
|
|
|
|
static BOOL32 UPDOWN_InBounds(WND *wndPtr, int val)
|
|
|
|
{
|
|
|
|
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
|
|
|
|
|
|
|
|
if(infoPtr->MaxVal > infoPtr->MinVal)
|
|
|
|
return (infoPtr->MinVal <= val) && (val <= infoPtr->MaxVal);
|
|
|
|
else
|
|
|
|
return (infoPtr->MaxVal <= val) && (val <= infoPtr->MinVal);
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* UPDOWN_OffsetVal
|
|
|
|
* Tests if we can change the current value by delta. If so, it changes
|
|
|
|
* it and returns TRUE. Else, it leaves it unchanged and returns FALSE.
|
|
|
|
*/
|
|
|
|
static BOOL32 UPDOWN_OffsetVal(WND *wndPtr, int delta)
|
|
|
|
{
|
|
|
|
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
|
|
|
|
|
|
|
|
/* check if we can do the modification first */
|
|
|
|
if(!UPDOWN_InBounds(wndPtr, infoPtr->CurVal+delta)){
|
|
|
|
if(wndPtr->dwStyle & UDS_WRAP)
|
|
|
|
delta += (delta < 0 ? -1 : 1) *
|
|
|
|
(infoPtr->MaxVal < infoPtr->MinVal ? -1 : 1) *
|
|
|
|
(infoPtr->MinVal - infoPtr->MaxVal) +
|
|
|
|
(delta < 0 ? 1 : -1);
|
|
|
|
else
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
infoPtr->CurVal += delta;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
1998-04-13 14:21:30 +02:00
|
|
|
* UPDOWN_GetArrowRect
|
1997-08-24 18:00:30 +02:00
|
|
|
* wndPtr - pointer to the up-down wnd
|
|
|
|
* rect - will hold the rectangle
|
|
|
|
* incr - TRUE get the "increment" rect (up or right)
|
|
|
|
* FALSE get the "decrement" rect (down or left)
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
static void UPDOWN_GetArrowRect(WND *wndPtr, RECT32 *rect, BOOL32 incr)
|
|
|
|
{
|
|
|
|
int len; /* will hold the width or height */
|
|
|
|
|
|
|
|
GetClientRect32(wndPtr->hwndSelf, rect);
|
|
|
|
|
|
|
|
if (wndPtr->dwStyle & UDS_HORZ) {
|
|
|
|
len = rect->right - rect->left; /* compute the width */
|
|
|
|
if (incr)
|
Release 970914
Thu Sep 11 18:24:56 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [objects/dc.c]
In DC_SetupGCForPatBlt, replace R2_NOT by GXxor with (black xor white).
Tue Sep 9 23:04:02 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
* [memory/virtual.c]
Do not write debugging info unconditionally to stderr.
* [files/profile.c]
Call PROFILE_GetSection in PROFILE_GetString for key_name "" too.
* [misc/crtdll.c]
Many new functions.
* [include/windows.h] [windows/winpos.c]
ClientToScreen16 doesn't have a return value.
Sun Sep 7 10:06:39 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [misc/main.c] [AUTHORS]
Update the list of contributors. Please let me know if I forgot
someone.
* [if1632/*.spec] [if1632/builtin.c] [tools/build.c]
Ordinal base for Win32 DLLs is now computed automatically from the
lowest ordinal found.
* [include/wintypes.h]
WINAPI is now defined as attribute((stdcall)). This will require
gcc to compile.
* [if1632/thunk.c]
Removed Win32 thunks (no longer needed with stdcall).
* [if1632/crtdll.spec] [misc/crtdll.c]
Make sure we only reference cdecl functions in the spec file.
* [objects/dc.c]
Use CapNotLast drawing style for 1-pixel wide lines.
* [tools/build.c]
Added 'double' argument type.
Added 'varargs' function type for Win32.
Made CallTo16_xxx functions stdcall.
Fri Sep 5 14:50:49 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [tools/build.c] [windows/win.c] [windows/event.c] [windows/message.c]
More fixes to get message exchange closer to the original.
* [misc/spy.c]
Message logs now contain window names.
* [loader/resource.c] [loader/ne_resource.c] [loader/task.c]
[objects/cursoricon.c] [windows/user.c]
Added some obscure features to fix memory leaks.
Fri Sep 5 00:46:28 1997 Jan Willamowius <jan@janhh.shnet.org>
* [if1632/kernel32.spec] [win32/newfns.c]
Added stub for UTRegister() and UTUnRegister().
Thu Sep 4 12:03:12 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c]
Allow ASCII codes > 127 in WM_CHAR.
Mon Sep 1 17:23:24 1997 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [controls/widgets.c]
In InitCommonControls, remember the name of the class
because lpszClassName was made to point to a local array
Added the ProgressBar to the list of implemented controls.
Call InitCommonControls from WIDGETS_Init to register all
implemented Common Controls.
* [include/commctrl.h]
Added misc decl for the Progress Bar.
* [controls/progress.c] [include/progress.h]
First attempt at implementiong the Progress Bar class.
* [objects/brush.h]
Implementation for GetSysColorBrush[16|32]
* [controls/status.c]
Use DrawEdge to draw the borders and fill the background
* [controls/uitools.c]
Added DrawDiagEdge32 and DrawRectEdge32
* [graphics/painting.c]
Implement DrawEdge[16|32]
Started DrawFrameControl32
Mon Sep 1 10:07:09 1997 Lawson Whitney <lawson_whitney@juno.com>
* [misc/comm.c] [include/windows.h]
SetCommEventMask returns a SEGPTR.
Sun Aug 31 23:28:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][loader/module.c][include/pe_image.h]
[include/module.h]
Cleaned up the whole Win32 library mess (a bit).
* [debugger/stabs.c]
If 'wine' has no absolute path and isn't found, check $PATH too.
* [misc/ole2nls.c]
Some fixes.
* [misc/ver.c]
Added support for PE style version resources.
* [memory/string.c]
Check for NULL pointers to _lstr* functions, just as Windows95 does.
* [multimedia/time.c]
Made list of timers a simple linked list.
* [loader/resource.c]
Netscape 3 seems to pass NEGATIVE resource Ids (in an
unsigned int, yes). Don't know why, fixed it anyway.
* [objects/bitmap.c]
LoadImageW added.
* [include/win.h][windows/win.c]
Change wIDmenu from UINT16 to UINT32 and changed the
SetWindow(Long|Word) accordingly.
Thu Aug 28 19:30:08 1997 Morten Welinder <terra@diku.dk>
* [include/windows.h]
Add a few more colors defined for Win95.
Add a few more brush styles.
* [windows/syscolor.c]
Add error checks for SYSCOLOR_SetColor, SYSCOLOR_Init,
GetSysColor16, GetSysColor32. Add support for above colors.
Sun Aug 24 16:22:57 1997 Andrew Taylor <andrew@riscan.com>
* [multimedia/mmsystem.c]
Changed mmioDescend to use mmio functions for file I/O, neccessary
for memory files.
1997-09-14 19:17:23 +02:00
|
|
|
rect->left = len/2+1;
|
1997-08-24 18:00:30 +02:00
|
|
|
else
|
|
|
|
rect->right = len/2;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
len = rect->bottom - rect->top; /* compute the height */
|
|
|
|
if (incr)
|
|
|
|
rect->bottom = len/2;
|
|
|
|
else
|
Release 970914
Thu Sep 11 18:24:56 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [objects/dc.c]
In DC_SetupGCForPatBlt, replace R2_NOT by GXxor with (black xor white).
Tue Sep 9 23:04:02 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
* [memory/virtual.c]
Do not write debugging info unconditionally to stderr.
* [files/profile.c]
Call PROFILE_GetSection in PROFILE_GetString for key_name "" too.
* [misc/crtdll.c]
Many new functions.
* [include/windows.h] [windows/winpos.c]
ClientToScreen16 doesn't have a return value.
Sun Sep 7 10:06:39 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [misc/main.c] [AUTHORS]
Update the list of contributors. Please let me know if I forgot
someone.
* [if1632/*.spec] [if1632/builtin.c] [tools/build.c]
Ordinal base for Win32 DLLs is now computed automatically from the
lowest ordinal found.
* [include/wintypes.h]
WINAPI is now defined as attribute((stdcall)). This will require
gcc to compile.
* [if1632/thunk.c]
Removed Win32 thunks (no longer needed with stdcall).
* [if1632/crtdll.spec] [misc/crtdll.c]
Make sure we only reference cdecl functions in the spec file.
* [objects/dc.c]
Use CapNotLast drawing style for 1-pixel wide lines.
* [tools/build.c]
Added 'double' argument type.
Added 'varargs' function type for Win32.
Made CallTo16_xxx functions stdcall.
Fri Sep 5 14:50:49 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [tools/build.c] [windows/win.c] [windows/event.c] [windows/message.c]
More fixes to get message exchange closer to the original.
* [misc/spy.c]
Message logs now contain window names.
* [loader/resource.c] [loader/ne_resource.c] [loader/task.c]
[objects/cursoricon.c] [windows/user.c]
Added some obscure features to fix memory leaks.
Fri Sep 5 00:46:28 1997 Jan Willamowius <jan@janhh.shnet.org>
* [if1632/kernel32.spec] [win32/newfns.c]
Added stub for UTRegister() and UTUnRegister().
Thu Sep 4 12:03:12 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c]
Allow ASCII codes > 127 in WM_CHAR.
Mon Sep 1 17:23:24 1997 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [controls/widgets.c]
In InitCommonControls, remember the name of the class
because lpszClassName was made to point to a local array
Added the ProgressBar to the list of implemented controls.
Call InitCommonControls from WIDGETS_Init to register all
implemented Common Controls.
* [include/commctrl.h]
Added misc decl for the Progress Bar.
* [controls/progress.c] [include/progress.h]
First attempt at implementiong the Progress Bar class.
* [objects/brush.h]
Implementation for GetSysColorBrush[16|32]
* [controls/status.c]
Use DrawEdge to draw the borders and fill the background
* [controls/uitools.c]
Added DrawDiagEdge32 and DrawRectEdge32
* [graphics/painting.c]
Implement DrawEdge[16|32]
Started DrawFrameControl32
Mon Sep 1 10:07:09 1997 Lawson Whitney <lawson_whitney@juno.com>
* [misc/comm.c] [include/windows.h]
SetCommEventMask returns a SEGPTR.
Sun Aug 31 23:28:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][loader/module.c][include/pe_image.h]
[include/module.h]
Cleaned up the whole Win32 library mess (a bit).
* [debugger/stabs.c]
If 'wine' has no absolute path and isn't found, check $PATH too.
* [misc/ole2nls.c]
Some fixes.
* [misc/ver.c]
Added support for PE style version resources.
* [memory/string.c]
Check for NULL pointers to _lstr* functions, just as Windows95 does.
* [multimedia/time.c]
Made list of timers a simple linked list.
* [loader/resource.c]
Netscape 3 seems to pass NEGATIVE resource Ids (in an
unsigned int, yes). Don't know why, fixed it anyway.
* [objects/bitmap.c]
LoadImageW added.
* [include/win.h][windows/win.c]
Change wIDmenu from UINT16 to UINT32 and changed the
SetWindow(Long|Word) accordingly.
Thu Aug 28 19:30:08 1997 Morten Welinder <terra@diku.dk>
* [include/windows.h]
Add a few more colors defined for Win95.
Add a few more brush styles.
* [windows/syscolor.c]
Add error checks for SYSCOLOR_SetColor, SYSCOLOR_Init,
GetSysColor16, GetSysColor32. Add support for above colors.
Sun Aug 24 16:22:57 1997 Andrew Taylor <andrew@riscan.com>
* [multimedia/mmsystem.c]
Changed mmioDescend to use mmio functions for file I/O, neccessary
for memory files.
1997-09-14 19:17:23 +02:00
|
|
|
rect->top = len/2+1;
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* UPDOWN_GetArrowFromPoint
|
|
|
|
* Returns the rectagle (for the up or down arrow) that contains pt.
|
|
|
|
* If it returns the up rect, it returns TRUE.
|
|
|
|
* If it returns the down rect, it returns FALSE.
|
|
|
|
*/
|
|
|
|
static int UPDOWN_GetArrowFromPoint(WND *wndPtr, RECT32 *rect, POINT32 pt)
|
|
|
|
{
|
|
|
|
UPDOWN_GetArrowRect(wndPtr, rect, TRUE);
|
|
|
|
if(PtInRect32(rect, pt))
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
UPDOWN_GetArrowRect(wndPtr, rect, FALSE);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* UPDOWN_GetThousandSep
|
|
|
|
* Returns the thousand sep. If an error occurs, it returns ','.
|
|
|
|
*/
|
|
|
|
static char UPDOWN_GetThousandSep()
|
|
|
|
{
|
|
|
|
char sep[2];
|
|
|
|
|
|
|
|
if(GetLocaleInfo32A(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND,
|
|
|
|
sep, sizeof(sep)) != 1)
|
|
|
|
return ',';
|
|
|
|
|
|
|
|
return sep[0];
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* UPDOWN_GetBuddyInt
|
|
|
|
* Tries to read the pos from the buddy window and if it succeeds,
|
|
|
|
* it stores it in the control's CurVal
|
|
|
|
* returns:
|
|
|
|
* TRUE - if it read the integer from the buddy successfully
|
|
|
|
* FALSE - if an error occured
|
|
|
|
*/
|
|
|
|
static BOOL32 UPDOWN_GetBuddyInt(WND *wndPtr)
|
|
|
|
{
|
|
|
|
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
|
|
|
|
char txt[20], sep, *src, *dst;
|
|
|
|
int newVal;
|
|
|
|
|
|
|
|
if (!IsWindow32(infoPtr->Buddy))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
/*if the buddy is a list window, we must set curr index */
|
|
|
|
if(WIDGETS_IsControl32(WIN_FindWndPtr(infoPtr->Buddy), BIC32_LISTBOX)){
|
|
|
|
newVal = SendMessage32A(infoPtr->Buddy, LB_GETCARETINDEX32, 0, 0);
|
|
|
|
if(newVal < 0)
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
/* we have a regural window, so will get the text */
|
|
|
|
if (!GetWindowText32A(infoPtr->Buddy, txt, sizeof(txt)))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
sep = UPDOWN_GetThousandSep();
|
|
|
|
|
|
|
|
/* now get rid of the separators */
|
|
|
|
for(src = dst = txt; *src; src++)
|
|
|
|
if(*src != sep)
|
|
|
|
*dst++ = *src;
|
|
|
|
*dst = 0;
|
|
|
|
|
|
|
|
/* try to convert the number and validate it */
|
|
|
|
newVal = strtol(txt, &src, infoPtr->Base);
|
|
|
|
if(*src || !UPDOWN_InBounds(wndPtr, newVal))
|
|
|
|
return FALSE;
|
|
|
|
|
1998-03-15 21:29:56 +01:00
|
|
|
TRACE(updown, "new value(%d) read from buddy (old=%d)\n",
|
|
|
|
newVal, infoPtr->CurVal);
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
infoPtr->CurVal = newVal;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* UPDOWN_SetBuddyInt
|
|
|
|
* Tries to set the pos to the buddy window based on current pos
|
|
|
|
* returns:
|
|
|
|
* TRUE - if it set the caption of the buddy successfully
|
|
|
|
* FALSE - if an error occured
|
|
|
|
*/
|
|
|
|
static BOOL32 UPDOWN_SetBuddyInt(WND *wndPtr)
|
|
|
|
{
|
|
|
|
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
|
|
|
|
char txt1[20], sep;
|
|
|
|
int len;
|
|
|
|
|
|
|
|
if (!IsWindow32(infoPtr->Buddy))
|
|
|
|
return FALSE;
|
|
|
|
|
1998-03-15 21:29:56 +01:00
|
|
|
TRACE(updown, "set new value(%d) to buddy.\n",
|
|
|
|
infoPtr->CurVal);
|
1997-08-24 18:00:30 +02:00
|
|
|
|
|
|
|
/*if the buddy is a list window, we must set curr index */
|
|
|
|
if(WIDGETS_IsControl32(WIN_FindWndPtr(infoPtr->Buddy), BIC32_LISTBOX)){
|
|
|
|
SendMessage32A(infoPtr->Buddy, LB_SETCURSEL32, infoPtr->CurVal, 0);
|
|
|
|
}
|
|
|
|
else{ /* Regural window, so set caption to the number */
|
|
|
|
len = sprintf(txt1, (infoPtr->Base==16) ? "%X" : "%d", infoPtr->CurVal);
|
|
|
|
|
|
|
|
sep = UPDOWN_GetThousandSep();
|
|
|
|
|
|
|
|
if (!(wndPtr->dwStyle & UDS_NOTHOUSANDS)) {
|
|
|
|
char txt2[20], *src = txt1, *dst = txt2;
|
|
|
|
if(len%3 > 0){
|
|
|
|
strncpy(dst, src, len%3);
|
|
|
|
dst += len%3;
|
|
|
|
src += len%3;
|
|
|
|
}
|
|
|
|
for(len=0; *src; len++,src++){
|
|
|
|
if(len%3==0)
|
|
|
|
*dst++ = sep;
|
|
|
|
*dst++ = *src++;
|
|
|
|
}
|
|
|
|
*dst = 0; /* null terminate it */
|
|
|
|
strcpy(txt1, txt2); /* move it to the proper place */
|
|
|
|
}
|
|
|
|
SetWindowText32A(infoPtr->Buddy, txt1);
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* UPDOWN_Paint
|
|
|
|
* Draw the arrows. The background need not be erased.
|
|
|
|
*/
|
|
|
|
static void UPDOWN_Paint(WND *wndPtr)
|
|
|
|
{
|
|
|
|
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
|
|
|
|
PAINTSTRUCT32 ps;
|
|
|
|
BOOL32 prssed;
|
|
|
|
RECT32 rect;
|
|
|
|
HDC32 hdc;
|
Release 980104
Sat Jan 3 17:15:56 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/db_disasm.c]
Added cpuid and cmpxchg instructions.
* [if1632/builtin.c] [relay32/builtin32.c]
Fixed broken -dll option with Win32 DLLs.
* [include/heap.h]
Added SYSTEM_LOCK/SYSTEM_UNLOCK macros.
* [configure.in] [misc/lstr.c]
Added check for wctype.h.
Commented out --enable-ipc option (IPC code has been broken for a
long time anyway).
* [scheduler/critsection.c] [scheduler/event.c]
[scheduler/mutex.c] [scheduler/semaphore.c]
Implemented Win32 synchronization objects.
* [scheduler/synchro.c]
Implemented WaitForMultipleObjects and related functions.
* [scheduler/thread.c]
If possible, use clone() in CreateThread().
* [scheduler/thread.c] [scheduler/process.c]
Made thread and process waitable objects.
Thread and process id values are now different from the pointers
they represent.
* [win32/k32obj.c]
Moved to scheduler directory.
Added function table for waiting operations on objects.
* [files/file.c] [memory/virtual.c]
Added new K32OBJ function table.
Sun Jan 1 16:48:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed my patch for GetTempFileName16() as needed.
It was ...Name32A() that didn't work properly, not ...Name16().
* [graphics/x11drv/brush.c]
Fixed a BadMatch error.
* [msdos/int21.c]
Fixed INT21_FindNextFCB() to get correct volume labels e.g.
in "file open" dialog.
* [multimedia/joystick.c] [relay32/winmm.spec]
Stub JoyGetPosEx().
* [scheduler/process.c] [relay32/kernel32.spec]
Implemented RegisterServiceProcess().
Wed Dec 31 11:14:43 1997 Lawson Whitney <lawson_whitney@juno.com>
* [if1632/kernel.spec] [if1632/relay.c]
Define CallProcEx32w - Thanks to Marcus Meissner for his excellent
CallProc32W.
* [loader/module.c]
Take a shot at defining FreeLibrary32W.
Sun Dec 28 12:44:04 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [controls/menu.c]
Menu modification from WM_INITMENUPOPUP message fixed.
Menu items now can have different wID and hSubMenu (Win95 behavior).
* [misc/cpu.c]
Improved IsProcessorFeaturePresent.
Sun Dec 28 03:21:08 1997 Ove Kaaven <ovek@main.arcticnet.no>
* [include/winsock.h] [misc/winsock.c]
Fixed WS_SOL_SOCKET for setsockopt(), and made select() return
empty fd_sets if timeout.
* [objects/palette.c]
AnimatePalette() bailed out if entire palette is animated. Fixed.
* [objects/dib.c]
Added some code to SetDIBitsToDevice() and its helpers to fix
some offseting problems.
* [objects/cursoricon.c]
Made CreateCursor32() convert the instance handle properly. Made
DestroyCursor() return correct success status.
Wed Dec 24 17:56:34 1997 Dimitrie O. Paun <dimi@cs.toronto.edu>
* [windows/syscolor.c]
Added definition of GetSysColorPen16/32. This function does not
exist in the Win32 API but is a very close (and natural) relative
to GetSysColorBrush function. Moreover, it is *very* much used
within Wine since there are a lot of places where we need to draw
lines with the standard colors.
* [controls/button.c] [controls/combo.c] [controls/icontitle.c]
[controls/menu.c] [controls/progress.c] [controls/scroll.c]
[controls/updown.c] [graphics/painting.c] [misc/tweak.c]
[windows/defwnd.c] [windows/graphics.c] [windows/nonclient.c]
Replaced references to sysColorObjects with the appropriate
call to GetSysColorBrush32/GetSysColorPen32. There is no need to
expose the implementation of these functions, even within Wine.
This makes the code easier to understand, debug, maintain.
* [controls/uitools.c]
Modified most of the functions in this file to use the now
standard pens (i.e. GetSysColorPen32). These functions made
*heavy* use of standard pens so I expect a lot less
CreatePen/DeleteObject calls can do only good...:)
Plus some minor modifications (*no* functional changes though).
* [controls/updown.c]
Used the new DrawFrameControl32 function to paint the control.
I also deleted UDDOWN_DrawArrow since it was no longer required.
Tue Dec 23 00:03:33 1997 Steinar Hamre <steinarh@stud.fim.ntnu.no>
* [configure.in]
Added check for -lw.
* [include/wintypes.h] [tools/build.c]
Changes to make the assembly understandable for even sun as.
".ascii" -> ".string", "call %foo" -> "call *%foo",
"pushw/popw %[cdes]s" written out to ".byte 0x66\npushl/popl %[cdes]s".
* [memory/ldt.c]
#ifdef added so <sys/seg.h> will not be included on Solaris.
Mon Dec 22 18:55:19 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [configure.in]
Added XF86DGA check.
* [multimedia/dsound.c][relay32/dsound.spec][include/dsound.h]
Started DirectSound. Only stubs for now.
* [graphics/ddraw.c][include/ddraw.h][relay32/ddraw.spec]
Started to implement DirectDraw. Mostly stubs, some
testcases work. Requires the XF86DGA extension to XFree86.
(check demo/blizdemo.exe from the Diablo CD-ROM).
* [files/drive.c]
Return correct "CDFS" fsname so Diablo is a bit happier.
Sun Dec 21 21:45:48 1997 Kevin Cozens <kcozens@interlog.com>
* [misc/registry.c]
Fixed bugs in the routines which read the Windows '95 registry
files. Added extra information regarding the format of the Windows
'95 registry files.
1998-01-04 18:49:09 +01:00
|
|
|
|
|
|
|
/* start painting the button */
|
1997-08-24 18:00:30 +02:00
|
|
|
hdc = BeginPaint32( wndPtr->hwndSelf, &ps );
|
|
|
|
|
|
|
|
/* Draw the incr button */
|
|
|
|
UPDOWN_GetArrowRect(wndPtr, &rect, TRUE);
|
|
|
|
prssed = (infoPtr->Flags & FLAG_INCR) && (infoPtr->Flags & FLAG_MOUSEIN);
|
Release 980104
Sat Jan 3 17:15:56 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/db_disasm.c]
Added cpuid and cmpxchg instructions.
* [if1632/builtin.c] [relay32/builtin32.c]
Fixed broken -dll option with Win32 DLLs.
* [include/heap.h]
Added SYSTEM_LOCK/SYSTEM_UNLOCK macros.
* [configure.in] [misc/lstr.c]
Added check for wctype.h.
Commented out --enable-ipc option (IPC code has been broken for a
long time anyway).
* [scheduler/critsection.c] [scheduler/event.c]
[scheduler/mutex.c] [scheduler/semaphore.c]
Implemented Win32 synchronization objects.
* [scheduler/synchro.c]
Implemented WaitForMultipleObjects and related functions.
* [scheduler/thread.c]
If possible, use clone() in CreateThread().
* [scheduler/thread.c] [scheduler/process.c]
Made thread and process waitable objects.
Thread and process id values are now different from the pointers
they represent.
* [win32/k32obj.c]
Moved to scheduler directory.
Added function table for waiting operations on objects.
* [files/file.c] [memory/virtual.c]
Added new K32OBJ function table.
Sun Jan 1 16:48:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed my patch for GetTempFileName16() as needed.
It was ...Name32A() that didn't work properly, not ...Name16().
* [graphics/x11drv/brush.c]
Fixed a BadMatch error.
* [msdos/int21.c]
Fixed INT21_FindNextFCB() to get correct volume labels e.g.
in "file open" dialog.
* [multimedia/joystick.c] [relay32/winmm.spec]
Stub JoyGetPosEx().
* [scheduler/process.c] [relay32/kernel32.spec]
Implemented RegisterServiceProcess().
Wed Dec 31 11:14:43 1997 Lawson Whitney <lawson_whitney@juno.com>
* [if1632/kernel.spec] [if1632/relay.c]
Define CallProcEx32w - Thanks to Marcus Meissner for his excellent
CallProc32W.
* [loader/module.c]
Take a shot at defining FreeLibrary32W.
Sun Dec 28 12:44:04 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [controls/menu.c]
Menu modification from WM_INITMENUPOPUP message fixed.
Menu items now can have different wID and hSubMenu (Win95 behavior).
* [misc/cpu.c]
Improved IsProcessorFeaturePresent.
Sun Dec 28 03:21:08 1997 Ove Kaaven <ovek@main.arcticnet.no>
* [include/winsock.h] [misc/winsock.c]
Fixed WS_SOL_SOCKET for setsockopt(), and made select() return
empty fd_sets if timeout.
* [objects/palette.c]
AnimatePalette() bailed out if entire palette is animated. Fixed.
* [objects/dib.c]
Added some code to SetDIBitsToDevice() and its helpers to fix
some offseting problems.
* [objects/cursoricon.c]
Made CreateCursor32() convert the instance handle properly. Made
DestroyCursor() return correct success status.
Wed Dec 24 17:56:34 1997 Dimitrie O. Paun <dimi@cs.toronto.edu>
* [windows/syscolor.c]
Added definition of GetSysColorPen16/32. This function does not
exist in the Win32 API but is a very close (and natural) relative
to GetSysColorBrush function. Moreover, it is *very* much used
within Wine since there are a lot of places where we need to draw
lines with the standard colors.
* [controls/button.c] [controls/combo.c] [controls/icontitle.c]
[controls/menu.c] [controls/progress.c] [controls/scroll.c]
[controls/updown.c] [graphics/painting.c] [misc/tweak.c]
[windows/defwnd.c] [windows/graphics.c] [windows/nonclient.c]
Replaced references to sysColorObjects with the appropriate
call to GetSysColorBrush32/GetSysColorPen32. There is no need to
expose the implementation of these functions, even within Wine.
This makes the code easier to understand, debug, maintain.
* [controls/uitools.c]
Modified most of the functions in this file to use the now
standard pens (i.e. GetSysColorPen32). These functions made
*heavy* use of standard pens so I expect a lot less
CreatePen/DeleteObject calls can do only good...:)
Plus some minor modifications (*no* functional changes though).
* [controls/updown.c]
Used the new DrawFrameControl32 function to paint the control.
I also deleted UDDOWN_DrawArrow since it was no longer required.
Tue Dec 23 00:03:33 1997 Steinar Hamre <steinarh@stud.fim.ntnu.no>
* [configure.in]
Added check for -lw.
* [include/wintypes.h] [tools/build.c]
Changes to make the assembly understandable for even sun as.
".ascii" -> ".string", "call %foo" -> "call *%foo",
"pushw/popw %[cdes]s" written out to ".byte 0x66\npushl/popl %[cdes]s".
* [memory/ldt.c]
#ifdef added so <sys/seg.h> will not be included on Solaris.
Mon Dec 22 18:55:19 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [configure.in]
Added XF86DGA check.
* [multimedia/dsound.c][relay32/dsound.spec][include/dsound.h]
Started DirectSound. Only stubs for now.
* [graphics/ddraw.c][include/ddraw.h][relay32/ddraw.spec]
Started to implement DirectDraw. Mostly stubs, some
testcases work. Requires the XF86DGA extension to XFree86.
(check demo/blizdemo.exe from the Diablo CD-ROM).
* [files/drive.c]
Return correct "CDFS" fsname so Diablo is a bit happier.
Sun Dec 21 21:45:48 1997 Kevin Cozens <kcozens@interlog.com>
* [misc/registry.c]
Fixed bugs in the routines which read the Windows '95 registry
files. Added extra information regarding the format of the Windows
'95 registry files.
1998-01-04 18:49:09 +01:00
|
|
|
DrawFrameControl32(hdc, &rect, DFC_SCROLL,
|
|
|
|
(wndPtr->dwStyle & UDS_HORZ ? DFCS_SCROLLLEFT : DFCS_SCROLLUP) |
|
|
|
|
(prssed ? DFCS_PUSHED : 0) |
|
|
|
|
(wndPtr->dwStyle&WS_DISABLED ? DFCS_INACTIVE : 0) );
|
Release 970914
Thu Sep 11 18:24:56 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [objects/dc.c]
In DC_SetupGCForPatBlt, replace R2_NOT by GXxor with (black xor white).
Tue Sep 9 23:04:02 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
* [memory/virtual.c]
Do not write debugging info unconditionally to stderr.
* [files/profile.c]
Call PROFILE_GetSection in PROFILE_GetString for key_name "" too.
* [misc/crtdll.c]
Many new functions.
* [include/windows.h] [windows/winpos.c]
ClientToScreen16 doesn't have a return value.
Sun Sep 7 10:06:39 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [misc/main.c] [AUTHORS]
Update the list of contributors. Please let me know if I forgot
someone.
* [if1632/*.spec] [if1632/builtin.c] [tools/build.c]
Ordinal base for Win32 DLLs is now computed automatically from the
lowest ordinal found.
* [include/wintypes.h]
WINAPI is now defined as attribute((stdcall)). This will require
gcc to compile.
* [if1632/thunk.c]
Removed Win32 thunks (no longer needed with stdcall).
* [if1632/crtdll.spec] [misc/crtdll.c]
Make sure we only reference cdecl functions in the spec file.
* [objects/dc.c]
Use CapNotLast drawing style for 1-pixel wide lines.
* [tools/build.c]
Added 'double' argument type.
Added 'varargs' function type for Win32.
Made CallTo16_xxx functions stdcall.
Fri Sep 5 14:50:49 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [tools/build.c] [windows/win.c] [windows/event.c] [windows/message.c]
More fixes to get message exchange closer to the original.
* [misc/spy.c]
Message logs now contain window names.
* [loader/resource.c] [loader/ne_resource.c] [loader/task.c]
[objects/cursoricon.c] [windows/user.c]
Added some obscure features to fix memory leaks.
Fri Sep 5 00:46:28 1997 Jan Willamowius <jan@janhh.shnet.org>
* [if1632/kernel32.spec] [win32/newfns.c]
Added stub for UTRegister() and UTUnRegister().
Thu Sep 4 12:03:12 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c]
Allow ASCII codes > 127 in WM_CHAR.
Mon Sep 1 17:23:24 1997 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [controls/widgets.c]
In InitCommonControls, remember the name of the class
because lpszClassName was made to point to a local array
Added the ProgressBar to the list of implemented controls.
Call InitCommonControls from WIDGETS_Init to register all
implemented Common Controls.
* [include/commctrl.h]
Added misc decl for the Progress Bar.
* [controls/progress.c] [include/progress.h]
First attempt at implementiong the Progress Bar class.
* [objects/brush.h]
Implementation for GetSysColorBrush[16|32]
* [controls/status.c]
Use DrawEdge to draw the borders and fill the background
* [controls/uitools.c]
Added DrawDiagEdge32 and DrawRectEdge32
* [graphics/painting.c]
Implement DrawEdge[16|32]
Started DrawFrameControl32
Mon Sep 1 10:07:09 1997 Lawson Whitney <lawson_whitney@juno.com>
* [misc/comm.c] [include/windows.h]
SetCommEventMask returns a SEGPTR.
Sun Aug 31 23:28:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][loader/module.c][include/pe_image.h]
[include/module.h]
Cleaned up the whole Win32 library mess (a bit).
* [debugger/stabs.c]
If 'wine' has no absolute path and isn't found, check $PATH too.
* [misc/ole2nls.c]
Some fixes.
* [misc/ver.c]
Added support for PE style version resources.
* [memory/string.c]
Check for NULL pointers to _lstr* functions, just as Windows95 does.
* [multimedia/time.c]
Made list of timers a simple linked list.
* [loader/resource.c]
Netscape 3 seems to pass NEGATIVE resource Ids (in an
unsigned int, yes). Don't know why, fixed it anyway.
* [objects/bitmap.c]
LoadImageW added.
* [include/win.h][windows/win.c]
Change wIDmenu from UINT16 to UINT32 and changed the
SetWindow(Long|Word) accordingly.
Thu Aug 28 19:30:08 1997 Morten Welinder <terra@diku.dk>
* [include/windows.h]
Add a few more colors defined for Win95.
Add a few more brush styles.
* [windows/syscolor.c]
Add error checks for SYSCOLOR_SetColor, SYSCOLOR_Init,
GetSysColor16, GetSysColor32. Add support for above colors.
Sun Aug 24 16:22:57 1997 Andrew Taylor <andrew@riscan.com>
* [multimedia/mmsystem.c]
Changed mmioDescend to use mmio functions for file I/O, neccessary
for memory files.
1997-09-14 19:17:23 +02:00
|
|
|
|
|
|
|
/* Draw the space between the buttons */
|
|
|
|
rect.top = rect.bottom; rect.bottom++;
|
|
|
|
DrawEdge32(hdc, &rect, 0, BF_MIDDLE);
|
1997-08-24 18:00:30 +02:00
|
|
|
|
|
|
|
/* Draw the decr button */
|
|
|
|
UPDOWN_GetArrowRect(wndPtr, &rect, FALSE);
|
|
|
|
prssed = (infoPtr->Flags & FLAG_DECR) && (infoPtr->Flags & FLAG_MOUSEIN);
|
Release 980104
Sat Jan 3 17:15:56 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [debugger/db_disasm.c]
Added cpuid and cmpxchg instructions.
* [if1632/builtin.c] [relay32/builtin32.c]
Fixed broken -dll option with Win32 DLLs.
* [include/heap.h]
Added SYSTEM_LOCK/SYSTEM_UNLOCK macros.
* [configure.in] [misc/lstr.c]
Added check for wctype.h.
Commented out --enable-ipc option (IPC code has been broken for a
long time anyway).
* [scheduler/critsection.c] [scheduler/event.c]
[scheduler/mutex.c] [scheduler/semaphore.c]
Implemented Win32 synchronization objects.
* [scheduler/synchro.c]
Implemented WaitForMultipleObjects and related functions.
* [scheduler/thread.c]
If possible, use clone() in CreateThread().
* [scheduler/thread.c] [scheduler/process.c]
Made thread and process waitable objects.
Thread and process id values are now different from the pointers
they represent.
* [win32/k32obj.c]
Moved to scheduler directory.
Added function table for waiting operations on objects.
* [files/file.c] [memory/virtual.c]
Added new K32OBJ function table.
Sun Jan 1 16:48:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed my patch for GetTempFileName16() as needed.
It was ...Name32A() that didn't work properly, not ...Name16().
* [graphics/x11drv/brush.c]
Fixed a BadMatch error.
* [msdos/int21.c]
Fixed INT21_FindNextFCB() to get correct volume labels e.g.
in "file open" dialog.
* [multimedia/joystick.c] [relay32/winmm.spec]
Stub JoyGetPosEx().
* [scheduler/process.c] [relay32/kernel32.spec]
Implemented RegisterServiceProcess().
Wed Dec 31 11:14:43 1997 Lawson Whitney <lawson_whitney@juno.com>
* [if1632/kernel.spec] [if1632/relay.c]
Define CallProcEx32w - Thanks to Marcus Meissner for his excellent
CallProc32W.
* [loader/module.c]
Take a shot at defining FreeLibrary32W.
Sun Dec 28 12:44:04 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [controls/menu.c]
Menu modification from WM_INITMENUPOPUP message fixed.
Menu items now can have different wID and hSubMenu (Win95 behavior).
* [misc/cpu.c]
Improved IsProcessorFeaturePresent.
Sun Dec 28 03:21:08 1997 Ove Kaaven <ovek@main.arcticnet.no>
* [include/winsock.h] [misc/winsock.c]
Fixed WS_SOL_SOCKET for setsockopt(), and made select() return
empty fd_sets if timeout.
* [objects/palette.c]
AnimatePalette() bailed out if entire palette is animated. Fixed.
* [objects/dib.c]
Added some code to SetDIBitsToDevice() and its helpers to fix
some offseting problems.
* [objects/cursoricon.c]
Made CreateCursor32() convert the instance handle properly. Made
DestroyCursor() return correct success status.
Wed Dec 24 17:56:34 1997 Dimitrie O. Paun <dimi@cs.toronto.edu>
* [windows/syscolor.c]
Added definition of GetSysColorPen16/32. This function does not
exist in the Win32 API but is a very close (and natural) relative
to GetSysColorBrush function. Moreover, it is *very* much used
within Wine since there are a lot of places where we need to draw
lines with the standard colors.
* [controls/button.c] [controls/combo.c] [controls/icontitle.c]
[controls/menu.c] [controls/progress.c] [controls/scroll.c]
[controls/updown.c] [graphics/painting.c] [misc/tweak.c]
[windows/defwnd.c] [windows/graphics.c] [windows/nonclient.c]
Replaced references to sysColorObjects with the appropriate
call to GetSysColorBrush32/GetSysColorPen32. There is no need to
expose the implementation of these functions, even within Wine.
This makes the code easier to understand, debug, maintain.
* [controls/uitools.c]
Modified most of the functions in this file to use the now
standard pens (i.e. GetSysColorPen32). These functions made
*heavy* use of standard pens so I expect a lot less
CreatePen/DeleteObject calls can do only good...:)
Plus some minor modifications (*no* functional changes though).
* [controls/updown.c]
Used the new DrawFrameControl32 function to paint the control.
I also deleted UDDOWN_DrawArrow since it was no longer required.
Tue Dec 23 00:03:33 1997 Steinar Hamre <steinarh@stud.fim.ntnu.no>
* [configure.in]
Added check for -lw.
* [include/wintypes.h] [tools/build.c]
Changes to make the assembly understandable for even sun as.
".ascii" -> ".string", "call %foo" -> "call *%foo",
"pushw/popw %[cdes]s" written out to ".byte 0x66\npushl/popl %[cdes]s".
* [memory/ldt.c]
#ifdef added so <sys/seg.h> will not be included on Solaris.
Mon Dec 22 18:55:19 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [configure.in]
Added XF86DGA check.
* [multimedia/dsound.c][relay32/dsound.spec][include/dsound.h]
Started DirectSound. Only stubs for now.
* [graphics/ddraw.c][include/ddraw.h][relay32/ddraw.spec]
Started to implement DirectDraw. Mostly stubs, some
testcases work. Requires the XF86DGA extension to XFree86.
(check demo/blizdemo.exe from the Diablo CD-ROM).
* [files/drive.c]
Return correct "CDFS" fsname so Diablo is a bit happier.
Sun Dec 21 21:45:48 1997 Kevin Cozens <kcozens@interlog.com>
* [misc/registry.c]
Fixed bugs in the routines which read the Windows '95 registry
files. Added extra information regarding the format of the Windows
'95 registry files.
1998-01-04 18:49:09 +01:00
|
|
|
DrawFrameControl32(hdc, &rect, DFC_SCROLL,
|
|
|
|
(wndPtr->dwStyle & UDS_HORZ ? DFCS_SCROLLRIGHT : DFCS_SCROLLDOWN) |
|
|
|
|
(prssed ? DFCS_PUSHED : 0) |
|
|
|
|
(wndPtr->dwStyle&WS_DISABLED ? DFCS_INACTIVE : 0) );
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
|
|
|
|
/* clean-up */
|
|
|
|
EndPaint32( wndPtr->hwndSelf, &ps );
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* UPDOWN_SetBuddy
|
|
|
|
* Tests if 'hwndBud' is a valid window handle. If not, returns FALSE.
|
|
|
|
* Else, sets it as a new Buddy.
|
|
|
|
* Then, it should subclass the buddy
|
|
|
|
* If window has the UDS_ARROWKEYS, it subcalsses the buddy window to
|
|
|
|
* process the UP/DOWN arrow keys.
|
|
|
|
* If window has the UDS_ALIGNLEFT or UDS_ALIGNRIGHT style
|
|
|
|
* the size/pos of the buddy and the control are adjusted accordingly.
|
|
|
|
*/
|
|
|
|
static BOOL32 UPDOWN_SetBuddy(WND *wndPtr, HWND32 hwndBud)
|
|
|
|
{
|
|
|
|
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
|
|
|
|
RECT32 budRect; /* new coord for the buddy */
|
|
|
|
int x; /* new x position and width for the up-down */
|
|
|
|
|
|
|
|
/* Is is a valid bud? */
|
|
|
|
if(!IsWindow32(hwndBud))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
if(wndPtr->dwStyle & UDS_ARROWKEYS){
|
1998-03-15 21:29:56 +01:00
|
|
|
FIXME(updown, "we need to subclass the buddy to process the arrow keys.\n");
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* do we need to do any adjustments? */
|
|
|
|
if(!(wndPtr->dwStyle & (UDS_ALIGNLEFT | UDS_ALIGNRIGHT)))
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
/* Get the rect of the buddy relative to its parent */
|
|
|
|
GetWindowRect32(infoPtr->Buddy, &budRect);
|
|
|
|
MapWindowPoints32(HWND_DESKTOP, GetParent32(infoPtr->Buddy),
|
|
|
|
(POINT32 *)(&budRect.left), 2);
|
|
|
|
|
|
|
|
/* now do the positioning */
|
|
|
|
if(wndPtr->dwStyle & UDS_ALIGNRIGHT){
|
|
|
|
budRect.right -= DEFAULT_WIDTH+DEFAULT_XSEP;
|
|
|
|
x = budRect.right+DEFAULT_XSEP;
|
|
|
|
}
|
|
|
|
else{ /* UDS_ALIGNLEFT */
|
|
|
|
x = budRect.left;
|
|
|
|
budRect.left += DEFAULT_WIDTH+DEFAULT_XSEP;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* first adjust the buddy to accomodate the up/down */
|
|
|
|
SetWindowPos32(infoPtr->Buddy, 0, budRect.left, budRect.top,
|
|
|
|
budRect.right - budRect.left, budRect.bottom - budRect.top,
|
|
|
|
SWP_NOACTIVATE|SWP_NOZORDER);
|
|
|
|
|
|
|
|
/* now position the up/down */
|
|
|
|
/* Since the UDS_ALIGN* flags were used, */
|
|
|
|
/* we will pick the position and size of the window. */
|
|
|
|
SetWindowPos32(wndPtr->hwndSelf,0,x,budRect.top-DEFAULT_ADDTOP,DEFAULT_WIDTH,
|
|
|
|
(budRect.bottom-budRect.top)+DEFAULT_ADDTOP+DEFAULT_ADDBOT,
|
|
|
|
SWP_NOACTIVATE|SWP_NOZORDER);
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* UPDOWN_DoAction
|
|
|
|
*
|
|
|
|
* This function increments/decrements the CurVal by the
|
|
|
|
* 'delta' amount according to the 'incr' flag
|
|
|
|
* It notifies the parent as required.
|
|
|
|
* It handles wraping and non-wraping correctly.
|
|
|
|
* It is assumed that delta>0
|
|
|
|
*/
|
|
|
|
static void UPDOWN_DoAction(WND *wndPtr, int delta, BOOL32 incr)
|
|
|
|
{
|
|
|
|
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
|
|
|
|
int old_val = infoPtr->CurVal;
|
|
|
|
NM_UPDOWN ni;
|
|
|
|
|
1998-03-15 21:29:56 +01:00
|
|
|
TRACE(updown, "%s by %d\n", incr ? "inc" : "dec", delta);
|
1997-08-24 18:00:30 +02:00
|
|
|
|
|
|
|
/* check if we can do the modification first */
|
|
|
|
delta *= (incr ? 1 : -1) * (infoPtr->MaxVal < infoPtr->MinVal ? -1 : 1);
|
|
|
|
if(!UPDOWN_OffsetVal(wndPtr, delta))
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* so, if we can do the change, recompute delta and restore old value */
|
|
|
|
delta = infoPtr->CurVal - old_val;
|
|
|
|
infoPtr->CurVal = old_val;
|
|
|
|
|
|
|
|
/* We must notify parent now to obtain permission */
|
|
|
|
ni.iPos = infoPtr->CurVal;
|
|
|
|
ni.iDelta = delta;
|
|
|
|
ni.hdr.hwndFrom = wndPtr->hwndSelf;
|
|
|
|
ni.hdr.idFrom = wndPtr->wIDmenu;
|
|
|
|
ni.hdr.code = UDN_DELTAPOS;
|
|
|
|
if(SendMessage32A(wndPtr->parent->hwndSelf,
|
|
|
|
WM_NOTIFY, wndPtr->wIDmenu, (LPARAM)&ni))
|
|
|
|
return; /* we are not allowed to change */
|
|
|
|
|
|
|
|
/* Now adjust value with (maybe new) delta */
|
|
|
|
if(!UPDOWN_OffsetVal(wndPtr, ni.iDelta))
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* Now take care about our buddy */
|
|
|
|
if(!IsWindow32(infoPtr->Buddy))
|
|
|
|
return; /* Nothing else to do */
|
|
|
|
|
|
|
|
|
|
|
|
if(wndPtr->dwStyle & UDS_SETBUDDYINT)
|
|
|
|
UPDOWN_SetBuddyInt(wndPtr);
|
|
|
|
|
|
|
|
/* Also, notify it */
|
|
|
|
/* FIXME: do we need to send the notification only if
|
|
|
|
we do not have the UDS_SETBUDDYINT style set? */
|
|
|
|
SendMessage32A(infoPtr->Buddy,
|
|
|
|
wndPtr->dwStyle & UDS_HORZ ? WM_HSCROLL : WM_VSCROLL,
|
|
|
|
MAKELONG(incr ? SB_LINEUP : SB_LINEDOWN, infoPtr->CurVal),
|
|
|
|
wndPtr->hwndSelf);
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* UPDOWN_IsEnabled
|
|
|
|
*
|
|
|
|
* Returns TRUE if it is enabled as well as its buddy (if any)
|
|
|
|
* FALSE otherwise
|
|
|
|
*/
|
|
|
|
static BOOL32 UPDOWN_IsEnabled(WND *wndPtr)
|
|
|
|
{
|
|
|
|
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
|
|
|
|
|
|
|
|
if(wndPtr->dwStyle & WS_DISABLED)
|
|
|
|
return FALSE;
|
|
|
|
return IsWindowEnabled32(infoPtr->Buddy);
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* UPDOWN_CancelMode
|
|
|
|
*
|
|
|
|
* Deletes any timers, releases the mouse and does redraw if necessary.
|
|
|
|
* If the control is not in "capture" mode, it does nothing.
|
|
|
|
* If the control was not in cancel mode, it returns FALSE.
|
|
|
|
* If the control was in cancel mode, it returns TRUE.
|
|
|
|
*/
|
|
|
|
static BOOL32 UPDOWN_CancelMode(WND *wndPtr)
|
|
|
|
{
|
|
|
|
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
|
|
|
|
|
|
|
|
/* if not in 'capture' mode, do nothing */
|
|
|
|
if(!(infoPtr->Flags & FLAG_CLICKED))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
KillTimer32(wndPtr->hwndSelf, TIMERID1); /* kill all possible timers */
|
|
|
|
KillTimer32(wndPtr->hwndSelf, TIMERID2);
|
|
|
|
|
|
|
|
if(GetCapture32() == wndPtr->hwndSelf) /* let the mouse go */
|
|
|
|
ReleaseCapture(); /* if we still have it */
|
|
|
|
|
|
|
|
infoPtr->Flags = 0; /* get rid of any flags */
|
|
|
|
UPDOWN_Paint(wndPtr); /* redraw the control just in case */
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* UPDOWN_HandleMouseEvent
|
|
|
|
*
|
|
|
|
* Handle a mouse event for the updown.
|
|
|
|
* 'pt' is the location of the mouse event in client or
|
|
|
|
* windows coordinates.
|
|
|
|
*/
|
|
|
|
static void UPDOWN_HandleMouseEvent(WND *wndPtr, UINT32 msg, POINT32 pt)
|
|
|
|
{
|
|
|
|
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
|
|
|
|
RECT32 rect;
|
|
|
|
int temp;
|
|
|
|
|
|
|
|
switch(msg)
|
|
|
|
{
|
|
|
|
case WM_LBUTTONDOWN: /* Initialise mouse tracking */
|
|
|
|
/* If we are already in the 'clicked' mode, then nothing to do */
|
|
|
|
if(infoPtr->Flags & FLAG_CLICKED)
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* If the buddy is an edit, will set focus to it */
|
|
|
|
if(WIDGETS_IsControl32(WIN_FindWndPtr(infoPtr->Buddy), BIC32_EDIT))
|
|
|
|
SetFocus32(infoPtr->Buddy);
|
|
|
|
|
|
|
|
/* Now see which one is the 'active' arrow */
|
|
|
|
temp = UPDOWN_GetArrowFromPoint(wndPtr, &rect, pt);
|
|
|
|
|
|
|
|
/* Update the CurVal if necessary */
|
|
|
|
if(wndPtr->dwStyle & UDS_SETBUDDYINT)
|
|
|
|
UPDOWN_GetBuddyInt(wndPtr);
|
|
|
|
|
|
|
|
/* Before we proceed, see if we can spin... */
|
|
|
|
if(!(wndPtr->dwStyle & UDS_WRAP))
|
|
|
|
if(( temp && infoPtr->CurVal==infoPtr->MaxVal) ||
|
|
|
|
(!temp && infoPtr->CurVal==infoPtr->MinVal))
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* Set up the correct flags */
|
|
|
|
infoPtr->Flags = 0;
|
|
|
|
infoPtr->Flags |= temp ? FLAG_INCR : FLAG_DECR;
|
|
|
|
infoPtr->Flags |= FLAG_MOUSEIN;
|
|
|
|
|
|
|
|
/* repaint the control */
|
|
|
|
UPDOWN_Paint(wndPtr);
|
|
|
|
|
|
|
|
/* process the click */
|
|
|
|
UPDOWN_DoAction(wndPtr, 1, infoPtr->Flags & FLAG_INCR);
|
|
|
|
|
|
|
|
/* now capture all mouse messages */
|
|
|
|
SetCapture32(wndPtr->hwndSelf);
|
|
|
|
|
|
|
|
/* and startup the first timer */
|
|
|
|
SetTimer32(wndPtr->hwndSelf, TIMERID1, INITIAL_DELAY, 0);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_MOUSEMOVE:
|
|
|
|
/* If we are not in the 'clicked' mode, then nothing to do */
|
|
|
|
if(!(infoPtr->Flags & FLAG_CLICKED))
|
|
|
|
return;
|
|
|
|
|
|
|
|
/* save the flags to see if any got modified */
|
|
|
|
temp = infoPtr->Flags;
|
|
|
|
|
|
|
|
/* Now get the 'active' arrow rectangle */
|
|
|
|
if (infoPtr->Flags & FLAG_INCR)
|
|
|
|
UPDOWN_GetArrowRect(wndPtr, &rect, TRUE);
|
|
|
|
else
|
|
|
|
UPDOWN_GetArrowRect(wndPtr, &rect, FALSE);
|
|
|
|
|
|
|
|
/* Update the flags if we are in/out */
|
|
|
|
if(PtInRect32(&rect, pt))
|
|
|
|
infoPtr->Flags |= FLAG_MOUSEIN;
|
|
|
|
else{
|
|
|
|
infoPtr->Flags &= ~FLAG_MOUSEIN;
|
|
|
|
if(accelIndex != -1) /* if we have accel info */
|
|
|
|
accelIndex = 0; /* reset it */
|
|
|
|
}
|
|
|
|
/* If state changed, redraw the control */
|
|
|
|
if(temp != infoPtr->Flags)
|
|
|
|
UPDOWN_Paint(wndPtr);
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
1998-03-15 21:29:56 +01:00
|
|
|
ERR(updown, "Impossible case!\n");
|
1997-08-24 18:00:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* UpDownWndProc
|
|
|
|
*/
|
|
|
|
LRESULT WINAPI UpDownWindowProc(HWND32 hwnd, UINT32 message, WPARAM32 wParam,
|
Release 970914
Thu Sep 11 18:24:56 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [objects/dc.c]
In DC_SetupGCForPatBlt, replace R2_NOT by GXxor with (black xor white).
Tue Sep 9 23:04:02 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
* [memory/virtual.c]
Do not write debugging info unconditionally to stderr.
* [files/profile.c]
Call PROFILE_GetSection in PROFILE_GetString for key_name "" too.
* [misc/crtdll.c]
Many new functions.
* [include/windows.h] [windows/winpos.c]
ClientToScreen16 doesn't have a return value.
Sun Sep 7 10:06:39 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [misc/main.c] [AUTHORS]
Update the list of contributors. Please let me know if I forgot
someone.
* [if1632/*.spec] [if1632/builtin.c] [tools/build.c]
Ordinal base for Win32 DLLs is now computed automatically from the
lowest ordinal found.
* [include/wintypes.h]
WINAPI is now defined as attribute((stdcall)). This will require
gcc to compile.
* [if1632/thunk.c]
Removed Win32 thunks (no longer needed with stdcall).
* [if1632/crtdll.spec] [misc/crtdll.c]
Make sure we only reference cdecl functions in the spec file.
* [objects/dc.c]
Use CapNotLast drawing style for 1-pixel wide lines.
* [tools/build.c]
Added 'double' argument type.
Added 'varargs' function type for Win32.
Made CallTo16_xxx functions stdcall.
Fri Sep 5 14:50:49 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [tools/build.c] [windows/win.c] [windows/event.c] [windows/message.c]
More fixes to get message exchange closer to the original.
* [misc/spy.c]
Message logs now contain window names.
* [loader/resource.c] [loader/ne_resource.c] [loader/task.c]
[objects/cursoricon.c] [windows/user.c]
Added some obscure features to fix memory leaks.
Fri Sep 5 00:46:28 1997 Jan Willamowius <jan@janhh.shnet.org>
* [if1632/kernel32.spec] [win32/newfns.c]
Added stub for UTRegister() and UTUnRegister().
Thu Sep 4 12:03:12 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c]
Allow ASCII codes > 127 in WM_CHAR.
Mon Sep 1 17:23:24 1997 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [controls/widgets.c]
In InitCommonControls, remember the name of the class
because lpszClassName was made to point to a local array
Added the ProgressBar to the list of implemented controls.
Call InitCommonControls from WIDGETS_Init to register all
implemented Common Controls.
* [include/commctrl.h]
Added misc decl for the Progress Bar.
* [controls/progress.c] [include/progress.h]
First attempt at implementiong the Progress Bar class.
* [objects/brush.h]
Implementation for GetSysColorBrush[16|32]
* [controls/status.c]
Use DrawEdge to draw the borders and fill the background
* [controls/uitools.c]
Added DrawDiagEdge32 and DrawRectEdge32
* [graphics/painting.c]
Implement DrawEdge[16|32]
Started DrawFrameControl32
Mon Sep 1 10:07:09 1997 Lawson Whitney <lawson_whitney@juno.com>
* [misc/comm.c] [include/windows.h]
SetCommEventMask returns a SEGPTR.
Sun Aug 31 23:28:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][loader/module.c][include/pe_image.h]
[include/module.h]
Cleaned up the whole Win32 library mess (a bit).
* [debugger/stabs.c]
If 'wine' has no absolute path and isn't found, check $PATH too.
* [misc/ole2nls.c]
Some fixes.
* [misc/ver.c]
Added support for PE style version resources.
* [memory/string.c]
Check for NULL pointers to _lstr* functions, just as Windows95 does.
* [multimedia/time.c]
Made list of timers a simple linked list.
* [loader/resource.c]
Netscape 3 seems to pass NEGATIVE resource Ids (in an
unsigned int, yes). Don't know why, fixed it anyway.
* [objects/bitmap.c]
LoadImageW added.
* [include/win.h][windows/win.c]
Change wIDmenu from UINT16 to UINT32 and changed the
SetWindow(Long|Word) accordingly.
Thu Aug 28 19:30:08 1997 Morten Welinder <terra@diku.dk>
* [include/windows.h]
Add a few more colors defined for Win95.
Add a few more brush styles.
* [windows/syscolor.c]
Add error checks for SYSCOLOR_SetColor, SYSCOLOR_Init,
GetSysColor16, GetSysColor32. Add support for above colors.
Sun Aug 24 16:22:57 1997 Andrew Taylor <andrew@riscan.com>
* [multimedia/mmsystem.c]
Changed mmioDescend to use mmio functions for file I/O, neccessary
for memory files.
1997-09-14 19:17:23 +02:00
|
|
|
LPARAM lParam)
|
1997-08-24 18:00:30 +02:00
|
|
|
{
|
|
|
|
WND *wndPtr = WIN_FindWndPtr(hwnd);
|
|
|
|
UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(wndPtr);
|
|
|
|
int temp;
|
|
|
|
|
|
|
|
switch(message)
|
|
|
|
{
|
|
|
|
case WM_CREATE:
|
Release 970914
Thu Sep 11 18:24:56 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [objects/dc.c]
In DC_SetupGCForPatBlt, replace R2_NOT by GXxor with (black xor white).
Tue Sep 9 23:04:02 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
* [memory/virtual.c]
Do not write debugging info unconditionally to stderr.
* [files/profile.c]
Call PROFILE_GetSection in PROFILE_GetString for key_name "" too.
* [misc/crtdll.c]
Many new functions.
* [include/windows.h] [windows/winpos.c]
ClientToScreen16 doesn't have a return value.
Sun Sep 7 10:06:39 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [misc/main.c] [AUTHORS]
Update the list of contributors. Please let me know if I forgot
someone.
* [if1632/*.spec] [if1632/builtin.c] [tools/build.c]
Ordinal base for Win32 DLLs is now computed automatically from the
lowest ordinal found.
* [include/wintypes.h]
WINAPI is now defined as attribute((stdcall)). This will require
gcc to compile.
* [if1632/thunk.c]
Removed Win32 thunks (no longer needed with stdcall).
* [if1632/crtdll.spec] [misc/crtdll.c]
Make sure we only reference cdecl functions in the spec file.
* [objects/dc.c]
Use CapNotLast drawing style for 1-pixel wide lines.
* [tools/build.c]
Added 'double' argument type.
Added 'varargs' function type for Win32.
Made CallTo16_xxx functions stdcall.
Fri Sep 5 14:50:49 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [tools/build.c] [windows/win.c] [windows/event.c] [windows/message.c]
More fixes to get message exchange closer to the original.
* [misc/spy.c]
Message logs now contain window names.
* [loader/resource.c] [loader/ne_resource.c] [loader/task.c]
[objects/cursoricon.c] [windows/user.c]
Added some obscure features to fix memory leaks.
Fri Sep 5 00:46:28 1997 Jan Willamowius <jan@janhh.shnet.org>
* [if1632/kernel32.spec] [win32/newfns.c]
Added stub for UTRegister() and UTUnRegister().
Thu Sep 4 12:03:12 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c]
Allow ASCII codes > 127 in WM_CHAR.
Mon Sep 1 17:23:24 1997 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [controls/widgets.c]
In InitCommonControls, remember the name of the class
because lpszClassName was made to point to a local array
Added the ProgressBar to the list of implemented controls.
Call InitCommonControls from WIDGETS_Init to register all
implemented Common Controls.
* [include/commctrl.h]
Added misc decl for the Progress Bar.
* [controls/progress.c] [include/progress.h]
First attempt at implementiong the Progress Bar class.
* [objects/brush.h]
Implementation for GetSysColorBrush[16|32]
* [controls/status.c]
Use DrawEdge to draw the borders and fill the background
* [controls/uitools.c]
Added DrawDiagEdge32 and DrawRectEdge32
* [graphics/painting.c]
Implement DrawEdge[16|32]
Started DrawFrameControl32
Mon Sep 1 10:07:09 1997 Lawson Whitney <lawson_whitney@juno.com>
* [misc/comm.c] [include/windows.h]
SetCommEventMask returns a SEGPTR.
Sun Aug 31 23:28:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][loader/module.c][include/pe_image.h]
[include/module.h]
Cleaned up the whole Win32 library mess (a bit).
* [debugger/stabs.c]
If 'wine' has no absolute path and isn't found, check $PATH too.
* [misc/ole2nls.c]
Some fixes.
* [misc/ver.c]
Added support for PE style version resources.
* [memory/string.c]
Check for NULL pointers to _lstr* functions, just as Windows95 does.
* [multimedia/time.c]
Made list of timers a simple linked list.
* [loader/resource.c]
Netscape 3 seems to pass NEGATIVE resource Ids (in an
unsigned int, yes). Don't know why, fixed it anyway.
* [objects/bitmap.c]
LoadImageW added.
* [include/win.h][windows/win.c]
Change wIDmenu from UINT16 to UINT32 and changed the
SetWindow(Long|Word) accordingly.
Thu Aug 28 19:30:08 1997 Morten Welinder <terra@diku.dk>
* [include/windows.h]
Add a few more colors defined for Win95.
Add a few more brush styles.
* [windows/syscolor.c]
Add error checks for SYSCOLOR_SetColor, SYSCOLOR_Init,
GetSysColor16, GetSysColor32. Add support for above colors.
Sun Aug 24 16:22:57 1997 Andrew Taylor <andrew@riscan.com>
* [multimedia/mmsystem.c]
Changed mmioDescend to use mmio functions for file I/O, neccessary
for memory files.
1997-09-14 19:17:23 +02:00
|
|
|
/* get rid of border, if any */
|
|
|
|
wndPtr->dwStyle &= ~WS_BORDER;
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
/* initialize the info struct */
|
|
|
|
infoPtr->AccelCount=0; infoPtr->AccelVect=0;
|
|
|
|
infoPtr->CurVal=0; infoPtr->MinVal=0; infoPtr->MaxVal=100; /*FIXME*/
|
|
|
|
infoPtr->Base = 10; /* Default to base 10 */
|
|
|
|
infoPtr->Buddy = 0; /* No buddy window yet */
|
|
|
|
infoPtr->Flags = 0; /* And no flags */
|
|
|
|
|
|
|
|
/* Do we pick the buddy win ourselves? */
|
|
|
|
if(wndPtr->dwStyle & UDS_AUTOBUDDY)
|
|
|
|
UPDOWN_SetBuddy(wndPtr, GetWindow32(wndPtr->hwndSelf, GW_HWNDPREV));
|
|
|
|
|
1998-03-15 21:29:56 +01:00
|
|
|
TRACE(updown, "UpDown Ctrl creation, hwnd=%04x\n", hwnd);
|
1997-08-24 18:00:30 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_DESTROY:
|
|
|
|
if(infoPtr->AccelVect)
|
|
|
|
free(infoPtr->AccelVect);
|
1998-03-15 21:29:56 +01:00
|
|
|
TRACE(updown, "UpDown Ctrl destruction, hwnd=%04x\n", hwnd);
|
1997-08-24 18:00:30 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_ENABLE:
|
|
|
|
if(wndPtr->dwStyle & WS_DISABLED)
|
|
|
|
UPDOWN_CancelMode(wndPtr);
|
|
|
|
UPDOWN_Paint(wndPtr);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_TIMER:
|
|
|
|
/* if initial timer, kill it and start the repeat timer */
|
|
|
|
if(wParam == TIMERID1){
|
|
|
|
KillTimer32(hwnd, TIMERID1);
|
|
|
|
/* if no accel info given, used default timer */
|
|
|
|
if(infoPtr->AccelCount==0 || infoPtr->AccelVect==0){
|
|
|
|
accelIndex = -1;
|
|
|
|
temp = REPEAT_DELAY;
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
accelIndex = 0; /* otherwise, use it */
|
|
|
|
temp = infoPtr->AccelVect[accelIndex].nSec * 1000 + 1;
|
|
|
|
}
|
|
|
|
SetTimer32(hwnd, TIMERID2, temp, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* now, if the mouse is above us, do the thing...*/
|
|
|
|
if(infoPtr->Flags & FLAG_MOUSEIN){
|
|
|
|
temp = accelIndex==-1 ? 1 : infoPtr->AccelVect[accelIndex].nInc;
|
|
|
|
UPDOWN_DoAction(wndPtr, temp, infoPtr->Flags & FLAG_INCR);
|
|
|
|
|
|
|
|
if(accelIndex!=-1 && accelIndex < infoPtr->AccelCount-1){
|
|
|
|
KillTimer32(hwnd, TIMERID2);
|
|
|
|
accelIndex++; /* move to the next accel info */
|
|
|
|
temp = infoPtr->AccelVect[accelIndex].nSec * 1000 + 1;
|
|
|
|
/* make sure we have at least 1ms intervals */
|
|
|
|
SetTimer32(hwnd, TIMERID2, temp, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_CANCELMODE:
|
|
|
|
UPDOWN_CancelMode(wndPtr);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_LBUTTONUP:
|
|
|
|
if(!UPDOWN_CancelMode(wndPtr))
|
|
|
|
break;
|
|
|
|
/*If we released the mouse and our buddy is an edit */
|
|
|
|
/* we must select all text in it. */
|
|
|
|
if(WIDGETS_IsControl32(WIN_FindWndPtr(infoPtr->Buddy), BIC32_EDIT))
|
|
|
|
SendMessage32A(infoPtr->Buddy, EM_SETSEL32, 0, MAKELONG(0, -1));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_LBUTTONDOWN:
|
|
|
|
case WM_MOUSEMOVE:
|
|
|
|
if(UPDOWN_IsEnabled(wndPtr)){
|
|
|
|
POINT32 pt;
|
|
|
|
CONV_POINT16TO32( (POINT16 *)&lParam, &pt );
|
|
|
|
UPDOWN_HandleMouseEvent( wndPtr, message, pt );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_KEYDOWN:
|
|
|
|
if((wndPtr->dwStyle & UDS_ARROWKEYS) && UPDOWN_IsEnabled(wndPtr)){
|
|
|
|
switch(wParam){
|
|
|
|
case VK_UP:
|
|
|
|
case VK_DOWN:
|
|
|
|
UPDOWN_GetBuddyInt(wndPtr);
|
|
|
|
UPDOWN_DoAction(wndPtr, 1, wParam==VK_UP);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_PAINT:
|
|
|
|
UPDOWN_Paint(wndPtr);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case UDM_GETACCEL:
|
|
|
|
if (wParam==0 && lParam==0) /*if both zero, */
|
|
|
|
return infoPtr->AccelCount; /*just return the accel count*/
|
|
|
|
if (wParam || lParam){
|
|
|
|
UNKNOWN_PARAM(UDM_GETACCEL, wParam, lParam);
|
|
|
|
return 0;
|
|
|
|
}
|
Release 970914
Thu Sep 11 18:24:56 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
* [objects/dc.c]
In DC_SetupGCForPatBlt, replace R2_NOT by GXxor with (black xor white).
Tue Sep 9 23:04:02 1997 U. Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
* [memory/virtual.c]
Do not write debugging info unconditionally to stderr.
* [files/profile.c]
Call PROFILE_GetSection in PROFILE_GetString for key_name "" too.
* [misc/crtdll.c]
Many new functions.
* [include/windows.h] [windows/winpos.c]
ClientToScreen16 doesn't have a return value.
Sun Sep 7 10:06:39 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [misc/main.c] [AUTHORS]
Update the list of contributors. Please let me know if I forgot
someone.
* [if1632/*.spec] [if1632/builtin.c] [tools/build.c]
Ordinal base for Win32 DLLs is now computed automatically from the
lowest ordinal found.
* [include/wintypes.h]
WINAPI is now defined as attribute((stdcall)). This will require
gcc to compile.
* [if1632/thunk.c]
Removed Win32 thunks (no longer needed with stdcall).
* [if1632/crtdll.spec] [misc/crtdll.c]
Make sure we only reference cdecl functions in the spec file.
* [objects/dc.c]
Use CapNotLast drawing style for 1-pixel wide lines.
* [tools/build.c]
Added 'double' argument type.
Added 'varargs' function type for Win32.
Made CallTo16_xxx functions stdcall.
Fri Sep 5 14:50:49 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [tools/build.c] [windows/win.c] [windows/event.c] [windows/message.c]
More fixes to get message exchange closer to the original.
* [misc/spy.c]
Message logs now contain window names.
* [loader/resource.c] [loader/ne_resource.c] [loader/task.c]
[objects/cursoricon.c] [windows/user.c]
Added some obscure features to fix memory leaks.
Fri Sep 5 00:46:28 1997 Jan Willamowius <jan@janhh.shnet.org>
* [if1632/kernel32.spec] [win32/newfns.c]
Added stub for UTRegister() and UTUnRegister().
Thu Sep 4 12:03:12 1997 Frans van Dorsselaer <dorssel@rulhmpc49.LeidenUniv.nl>
* [controls/edit.c]
Allow ASCII codes > 127 in WM_CHAR.
Mon Sep 1 17:23:24 1997 Dimitrie O. Paun <dimi@mail.cs.toronto.edu>
* [controls/widgets.c]
In InitCommonControls, remember the name of the class
because lpszClassName was made to point to a local array
Added the ProgressBar to the list of implemented controls.
Call InitCommonControls from WIDGETS_Init to register all
implemented Common Controls.
* [include/commctrl.h]
Added misc decl for the Progress Bar.
* [controls/progress.c] [include/progress.h]
First attempt at implementiong the Progress Bar class.
* [objects/brush.h]
Implementation for GetSysColorBrush[16|32]
* [controls/status.c]
Use DrawEdge to draw the borders and fill the background
* [controls/uitools.c]
Added DrawDiagEdge32 and DrawRectEdge32
* [graphics/painting.c]
Implement DrawEdge[16|32]
Started DrawFrameControl32
Mon Sep 1 10:07:09 1997 Lawson Whitney <lawson_whitney@juno.com>
* [misc/comm.c] [include/windows.h]
SetCommEventMask returns a SEGPTR.
Sun Aug 31 23:28:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_image.c][loader/module.c][include/pe_image.h]
[include/module.h]
Cleaned up the whole Win32 library mess (a bit).
* [debugger/stabs.c]
If 'wine' has no absolute path and isn't found, check $PATH too.
* [misc/ole2nls.c]
Some fixes.
* [misc/ver.c]
Added support for PE style version resources.
* [memory/string.c]
Check for NULL pointers to _lstr* functions, just as Windows95 does.
* [multimedia/time.c]
Made list of timers a simple linked list.
* [loader/resource.c]
Netscape 3 seems to pass NEGATIVE resource Ids (in an
unsigned int, yes). Don't know why, fixed it anyway.
* [objects/bitmap.c]
LoadImageW added.
* [include/win.h][windows/win.c]
Change wIDmenu from UINT16 to UINT32 and changed the
SetWindow(Long|Word) accordingly.
Thu Aug 28 19:30:08 1997 Morten Welinder <terra@diku.dk>
* [include/windows.h]
Add a few more colors defined for Win95.
Add a few more brush styles.
* [windows/syscolor.c]
Add error checks for SYSCOLOR_SetColor, SYSCOLOR_Init,
GetSysColor16, GetSysColor32. Add support for above colors.
Sun Aug 24 16:22:57 1997 Andrew Taylor <andrew@riscan.com>
* [multimedia/mmsystem.c]
Changed mmioDescend to use mmio functions for file I/O, neccessary
for memory files.
1997-09-14 19:17:23 +02:00
|
|
|
temp = MIN(infoPtr->AccelCount, wParam);
|
1997-08-24 18:00:30 +02:00
|
|
|
memcpy((void *)lParam, infoPtr->AccelVect, temp*sizeof(UDACCEL));
|
|
|
|
return temp;
|
|
|
|
|
|
|
|
case UDM_SETACCEL:
|
1998-03-15 21:29:56 +01:00
|
|
|
TRACE(updown, "UpDown Ctrl new accel info, hwnd=%04x\n", hwnd);
|
1997-08-24 18:00:30 +02:00
|
|
|
if(infoPtr->AccelVect){
|
|
|
|
free(infoPtr->AccelVect);
|
|
|
|
infoPtr->AccelCount = 0;
|
|
|
|
infoPtr->AccelVect = 0;
|
|
|
|
}
|
|
|
|
if(wParam==0)
|
|
|
|
return TRUE;
|
|
|
|
infoPtr->AccelVect = malloc(wParam*sizeof(UDACCEL));
|
|
|
|
if(infoPtr->AccelVect==0)
|
|
|
|
return FALSE;
|
|
|
|
memcpy(infoPtr->AccelVect, (void*)lParam, wParam*sizeof(UDACCEL));
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
case UDM_GETBASE:
|
|
|
|
if (wParam || lParam)
|
|
|
|
UNKNOWN_PARAM(UDM_GETBASE, wParam, lParam);
|
|
|
|
return infoPtr->Base;
|
|
|
|
|
|
|
|
case UDM_SETBASE:
|
1998-03-15 21:29:56 +01:00
|
|
|
TRACE(updown, "UpDown Ctrl new base(%d), hwnd=%04x\n",
|
1997-08-24 18:00:30 +02:00
|
|
|
wParam, hwnd);
|
|
|
|
if ( !(wParam==10 || wParam==16) || lParam)
|
|
|
|
UNKNOWN_PARAM(UDM_SETBASE, wParam, lParam);
|
|
|
|
if (wParam==10 || wParam==16){
|
|
|
|
temp = infoPtr->Base;
|
|
|
|
infoPtr->Base = wParam;
|
|
|
|
return temp; /* return the prev base */
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case UDM_GETBUDDY:
|
|
|
|
if (wParam || lParam)
|
|
|
|
UNKNOWN_PARAM(UDM_GETBUDDY, wParam, lParam);
|
|
|
|
return infoPtr->Buddy;
|
|
|
|
|
|
|
|
case UDM_SETBUDDY:
|
|
|
|
if (lParam)
|
|
|
|
UNKNOWN_PARAM(UDM_SETBUDDY, wParam, lParam);
|
|
|
|
temp = infoPtr->Buddy;
|
|
|
|
infoPtr->Buddy = wParam;
|
|
|
|
UPDOWN_SetBuddy(wndPtr, wParam);
|
1998-03-15 21:29:56 +01:00
|
|
|
TRACE(updown, "UpDown Ctrl new buddy(%04x), hwnd=%04x\n",
|
1997-08-24 18:00:30 +02:00
|
|
|
infoPtr->Buddy, hwnd);
|
|
|
|
return temp;
|
|
|
|
|
|
|
|
case UDM_GETPOS:
|
|
|
|
if (wParam || lParam)
|
|
|
|
UNKNOWN_PARAM(UDM_GETPOS, wParam, lParam);
|
|
|
|
temp = UPDOWN_GetBuddyInt(wndPtr);
|
|
|
|
return MAKELONG(infoPtr->CurVal, temp ? 0 : 1);
|
|
|
|
|
|
|
|
case UDM_SETPOS:
|
|
|
|
if (wParam || HIWORD(lParam))
|
|
|
|
UNKNOWN_PARAM(UDM_GETPOS, wParam, lParam);
|
|
|
|
temp = SLOWORD(lParam);
|
1998-03-15 21:29:56 +01:00
|
|
|
TRACE(updown, "UpDown Ctrl new value(%d), hwnd=%04x\n",
|
1997-08-24 18:00:30 +02:00
|
|
|
temp, hwnd);
|
|
|
|
if(!UPDOWN_InBounds(wndPtr, temp)){
|
|
|
|
if(temp < infoPtr->MinVal)
|
|
|
|
temp = infoPtr->MinVal;
|
|
|
|
if(temp > infoPtr->MaxVal)
|
|
|
|
temp = infoPtr->MaxVal;
|
|
|
|
}
|
|
|
|
wParam = infoPtr->CurVal; /* save prev value */
|
|
|
|
infoPtr->CurVal = temp; /* set the new value */
|
|
|
|
if(wndPtr->dwStyle & UDS_SETBUDDYINT)
|
|
|
|
UPDOWN_SetBuddyInt(wndPtr);
|
|
|
|
return wParam; /* return prev value */
|
|
|
|
|
|
|
|
case UDM_GETRANGE:
|
|
|
|
if (wParam || lParam)
|
|
|
|
UNKNOWN_PARAM(UDM_GETRANGE, wParam, lParam);
|
|
|
|
return MAKELONG(infoPtr->MaxVal, infoPtr->MinVal);
|
|
|
|
|
|
|
|
case UDM_SETRANGE:
|
|
|
|
if (wParam)
|
|
|
|
UNKNOWN_PARAM(UDM_SETRANGE, wParam, lParam); /* we must have: */
|
|
|
|
infoPtr->MaxVal = SLOWORD(lParam); /* UD_MINVAL <= Max <= UD_MAXVAL */
|
|
|
|
infoPtr->MinVal = SHIWORD(lParam); /* UD_MINVAL <= Min <= UD_MAXVAL */
|
|
|
|
/* |Max-Min| <= UD_MAXVAL */
|
1998-03-15 21:29:56 +01:00
|
|
|
TRACE(updown, "UpDown Ctrl new range(%d to %d), hwnd=%04x\n",
|
1997-08-24 18:00:30 +02:00
|
|
|
infoPtr->MinVal, infoPtr->MaxVal, hwnd);
|
|
|
|
break;
|
|
|
|
|
1998-04-13 14:21:30 +02:00
|
|
|
case UDM_GETRANGE32:
|
|
|
|
if (wParam)
|
|
|
|
*(LPINT32)wParam = infoPtr->MinVal;
|
|
|
|
if (lParam)
|
|
|
|
*(LPINT32)lParam = infoPtr->MaxVal;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case UDM_SETRANGE32:
|
|
|
|
infoPtr->MinVal = (INT32)wParam;
|
|
|
|
infoPtr->MaxVal = (INT32)lParam;
|
|
|
|
if (infoPtr->MaxVal <= infoPtr->MinVal)
|
|
|
|
infoPtr->MaxVal = infoPtr->MinVal + 1;
|
|
|
|
TRACE(updown, "UpDown Ctrl new range(%d to %d), hwnd=%04x\n",
|
|
|
|
infoPtr->MinVal, infoPtr->MaxVal, hwnd);
|
|
|
|
break;
|
|
|
|
|
1997-08-24 18:00:30 +02:00
|
|
|
default:
|
|
|
|
if (message >= WM_USER)
|
1998-03-15 21:29:56 +01:00
|
|
|
WARN(updown, "unknown msg %04x wp=%04x lp=%08lx\n",
|
|
|
|
message, wParam, lParam );
|
1997-08-24 18:00:30 +02:00
|
|
|
return DefWindowProc32A( hwnd, message, wParam, lParam );
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
Release 980517
Sun May 17 16:23:56 1998 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/profile.c]
Fix the return value of PROFILE_GetSection
* [misc/crtdll.c]
Do _getdrive, fix _chdrive.
* [misc/commdlg.c]
First cut at ChooseColor[WA].
* [misc/network.c]
Do something sensible for WNetGetDirectoryType16.
Sun May 17 10:21:35 1998 Andreas Mohr <100.30936@germany.net>
* [controls/menu.c]
Fixed disabled sub menus with MF_BYPOSITION that were not disabled.
* [misc/crtdll.c] [relay32/crtdll.spec] [include/winerror.h]
Implemented fscanf, fsetpos, _access, _fpreset (thanks to Uwe Bonnes),
and _ltoa.
* [loader/task.c]
MakeProcInstance: must use CURRENT_DS if hInst == NULL.
* [misc/shell.c]
SHELL_GetResourceTable, InternalExtractIcon: fixed broken .ICO handling
* [windows/winpos.c]
DeferWindowPos: removed "same parent" requirement.
Which doc states that this is required ?
Sat May 16 20:08:11 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/module.c] [loader/ne/module.c]
More NE module cleanups.
* [loader/task.c]
Fixed SwitchStackBack().
Fri May 15 10:04:27 1998 Marcus Meissner <marcus@jet.franken.de>
* [configure.in][inlcude/acconfig.h]
Fixed broken OSS check, added check for working sigaltstack,
fixed broken statfs checks on some linux systems.
* [files/directory.c][loader/pe_image.c][relay32/builtin.c]
[loader/module.c]
Added handling of win32 module pathnames.
* [relay32/wnaspi32.spec]
New file.
* [misc/lzexpand.c]
LZCopy auto-decompresses LZ compressed files, even if they are not
specially flagged. Fixes some InstallShield problems.
* [misc/registry.c]
Some fixes for RegQueryInfoKey (reference program monkey.exe
from Win32 SDK works now better). Probably still has faults.
Fri May 15 08:58:58 1998 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/mapping.c] [include/dc.h] [include/gdi.h] [objects/dc.c]
Reworked the way world transformations and mapping modes are handled
so that both of these transformations can be computed in a single
step.
* [graphics/painting.c] [graphics/path.c] [include/path.h]
More GDI path support.
* [graphics/x11drv/graphics.c]
Fixed the return value of GRAPH_DrawArc for the zero height /
zero width case to reflect Windows' behaviour.
* [include/windows.h] [relay32/gdi32.spec] [objects/dc.c]
Implemented ModifyWorldTransform and CombineTransform.
Tue May 14 18:03:46 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [controls/commctrl.c][relay32/comctl32.spec]
[controls/*.c][include/*.h]
Implemented InitCommonControlsEx (dll version 4.72 compatible).
InitCommonControls calls ImageCommonControlsEx.
Registering code of the common controls had to be changed
(see XXXX_Register functions).
* [controls/status.c][include/commctrl.h][include/status.h]
Implemented most new features and fixed the look and feel.
* [contols/commctrl.c][include/commctrl.h][relay32/comctl32.spec]
Implemented MenuHelp (incomplete).
* [controls/status.c][controls/progress.c]
Changed allocation strategy for control specific memory.
* [controls/header.c][include/header.h][include/commctrl.h]
First implementation of header control.
* [windows/defwnd.c][windows/syscolors.c]
Fixed default control colors for Win95 look.
* [windows/nonclient.c]
Fixed off by one error for Win95 look. Top border of child windows
should be visible.
* [misc/imagelist.h]
Improved documentation and fixed some bugs.
Thu May 14 15:42:21 1998 Robert Wilhelm <robert@physiol.med.tu-muenchen.de>
* [relay32/crtdll.spec]
Added hypot,j0,j1,jn and ceil.
Wed May 13 19:10:10 1998 Pascal Cuoq <pcuoq@ens-lyon.fr>
* [controls/listbox.c]
Item height is now exactly font height.
Wine listboxes now behave like Windows' when they are
created without WS_VSCROLL but the program subsequently
calls ShowScrollBar or SetScrollInfo.
Wed May 13 18:33:01 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [relay32/relay386.c]
Restore ES also in the non-debug case.
* [windows/event.c]
Bugfix: Blocking TSXNextEvent could deadlock Wine.
* [win32/process.c] [windows/message.c]
Silly stubs for MsgWaitForMultipleObjects / PostThreadMessage
that make some programs run better.
* [windows/winproc.c]
WINPROC_MapMsg32Ato16/16To32A: added WM_NOTIFY.
* [win32/kernel32.c]
Added 16->32 thunking and improved 32->16 thunking functions.
* [tools/build.c]
Added new variant of CallFrom16 stub for use with Win95 thunks.
* [if1632/kernel.spec] [if1632/builtin.c] [win32/kernel32.c]
Added a few undocumented KERNEL functions.
* [loader/ne/module.c] [loader/ne/segment.c]
Call DllEntryPoint for 16-bit DLLs with subsystem >= 4.0.
* [win32/kernel32.spec] [win32/wow32.spec] [win32/ordinals.c]
Use names from the Oct 94 beta release for undoc. functions.
Wed May 13 14:18:26 1998 Matthew Becker <mbecker@glasscity.net>
* [misc/registry.c]
Code cleanup.
* [misc/cpu.c]
Commented out the registry puts temporarily.
* [programs/regtest/*]
New registry testing program.
Tue May 12 22:54:03 1998 Michael Mess <michael@kawo2.rwth-aachen.de>
* [multimedia/audio.c]
ioctl's do not commute in /dev/dsp initialization.
Tue May 12 20:11:42 1998 Karl Garrison <karlos@eznet.net>
* [win32/console.c]
Implemented SetConsoleTextAttribute, FillConsoleOutputCharacter.
Improved cursor positioning.
This allows for text colors in an xterm, rxvt, or console.
Tue May 12 17:57:52 1998 Petter Reinholdtsen <pere@td.org.uit.no>
* [Makefile.in]
Create prefix/{bin|lib} directories if missing during install.
Sun May 10 19:37:51 1998 Jan Willamowius <jan@janhh.shnet.org>
* [multimedia/mmio.c]
Have mmioSetBuffer return success (0), so Corel Draw 4
keeps working. (IO is still unbuffered)
Wed May 6 16:57:55 1998 James Juran <jrj120@psu.edu>
* [Makefile.in] [Make.rules.in]
Changed "make clean" to remove `textedit` backup files (*%)
* [controls/menu.c][graphics/x11drv/xfont.c][include/libres.h]
[loader/main.c][loader/ne/module.c][scheduler/synchro.c]
[win32/time.c][windows/winpos.c][include/windows.h]
Fixed miscellaneous compilation warnings.
* [misc/main.c][miscemu/main.c][include/main.h]
Moved prototypes to new include file main.h, various cleanups.
Tue May 5 21:05:06 1998 Morten Welinder <terra@diku.dk>
* [misc/winsock.c]
Don't refer to __FreeBSD__ when HAVE_STRERROR is meant.
* [misc/debugstr.c]
For debug_dumpstrSend, send strings to stderr.
Tue May 5 21:47:40 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [objects/region.c]
Fix for REGION_RegionOp() if newReg is one of the source regions.
Tue May 5 18:27:32 1998 Jim Peterson <jspeter@roanoke.infi.net>
* [misc/main.c]
Add '-h/-help' option and print WINE_RELEASE_INFO with usage message.
* [misc/spy.c]
Realign trace messages.
Tue May 5 15:46:47 1998 Donnie V. Savage <dsavage@cisco.com>
* [graphics/ddraw.c]
Fixed compile warnings
* [misc/winsock.c]
Warnings should not be errors.
Tue May 5 13:40:42 1998 Jim Peterson <jspeter@roanoke.infi.net>
* [*/*]
Remove many warnings through explicit casts, added #include's,
and corrected printf formats.
Tue May 5 05:18:12 1998 Insomnia (Stea Greene) <insomnia@core.binghamton.edu>
* [graphics/ddraw.c]
Kept unchanged portion of old palette when changing only a few
palette entries. Really should only deallocate the changed cells.
This make StarCraft work almost perfectly (sound overflows still
cause static).
Mon May 4 15:04:57 1998 Alexander V. Lukyanov <lav@long.yar.ru>
* [misc/lstr.c]
FormatMessage: terminate string on %0, undo linefeed strip.
1998-05-17 19:13:43 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* UPDOWN_Register [Internal]
|
|
|
|
*
|
|
|
|
* Registers the updown window class.
|
|
|
|
*/
|
|
|
|
void UPDOWN_Register(void)
|
|
|
|
{
|
|
|
|
WNDCLASS32A wndClass;
|
|
|
|
|
|
|
|
if( GlobalFindAtom32A( UPDOWN_CLASS32A ) ) return;
|
|
|
|
|
|
|
|
ZeroMemory( &wndClass, sizeof( WNDCLASS32A ) );
|
|
|
|
wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW;
|
|
|
|
wndClass.lpfnWndProc = (WNDPROC32)UpDownWindowProc;
|
|
|
|
wndClass.cbClsExtra = 0;
|
|
|
|
wndClass.cbWndExtra = sizeof(UPDOWN_INFO);
|
|
|
|
wndClass.hCursor = LoadCursor32A( 0, IDC_ARROW32A );
|
|
|
|
wndClass.hbrBackground = (HBRUSH32)(COLOR_3DFACE + 1);
|
|
|
|
wndClass.lpszClassName = UPDOWN_CLASS32A;
|
|
|
|
|
|
|
|
RegisterClass32A( &wndClass );
|
|
|
|
}
|
|
|
|
|