Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
946a4448
Commit
946a4448
authored
Jul 30, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up a few USER dependencies.
parent
e3b353e2
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
53 additions
and
56 deletions
+53
-56
thunk.c
if1632/thunk.c
+4
-0
callback.h
include/callback.h
+6
-0
keyboard.h
include/keyboard.h
+0
-1
dosvm.c
loader/dos/dosvm.c
+1
-1
main.c
misc/main.c
+2
-21
bitmap.c
objects/bitmap.c
+5
-4
dib.c
objects/dib.c
+9
-4
palette.c
objects/palette.c
+15
-22
keyboard.c
windows/keyboard.c
+11
-3
No files found.
if1632/thunk.c
View file @
946a4448
...
@@ -190,6 +190,10 @@ void THUNK_InitCallout(void)
...
@@ -190,6 +190,10 @@ void THUNK_InitCallout(void)
GETADDR
(
DispatchMessageA
);
GETADDR
(
DispatchMessageA
);
GETADDR
(
RedrawWindow
);
GETADDR
(
RedrawWindow
);
GETADDR
(
WaitForInputIdle
);
GETADDR
(
WaitForInputIdle
);
GETADDR
(
MsgWaitForMultipleObjects
);
GETADDR
(
WindowFromDC
);
GETADDR
(
GetForegroundWindow
);
GETADDR
(
IsChild
);
GETADDR
(
MessageBoxA
);
GETADDR
(
MessageBoxA
);
GETADDR
(
MessageBoxW
);
GETADDR
(
MessageBoxW
);
#undef GETADDR
#undef GETADDR
...
...
include/callback.h
View file @
946a4448
...
@@ -100,6 +100,12 @@ typedef struct
...
@@ -100,6 +100,12 @@ typedef struct
void
WINAPI
(
*
UserYield16
)(
void
);
void
WINAPI
(
*
UserYield16
)(
void
);
WORD
WINAPI
(
*
DestroyIcon32
)(
HGLOBAL16
handle
,
UINT16
flags
);
WORD
WINAPI
(
*
DestroyIcon32
)(
HGLOBAL16
handle
,
UINT16
flags
);
DWORD
WINAPI
(
*
WaitForInputIdle
)(
HANDLE
hProcess
,
DWORD
dwTimeOut
);
DWORD
WINAPI
(
*
WaitForInputIdle
)(
HANDLE
hProcess
,
DWORD
dwTimeOut
);
DWORD
WINAPI
(
*
MsgWaitForMultipleObjects
)(
DWORD
nCount
,
HANDLE
*
pHandles
,
BOOL
fWaitAll
,
DWORD
dwMilliseconds
,
DWORD
dwWakeMask
);
HWND
WINAPI
(
*
WindowFromDC
)(
HDC
hDC
);
HWND
WINAPI
(
*
GetForegroundWindow
)(
void
);
BOOL
WINAPI
(
*
IsChild
)(
HWND
parent
,
HWND
child
);
INT
WINAPI
(
*
MessageBoxA
)(
HWND
hWnd
,
LPCSTR
text
,
LPCSTR
title
,
UINT
type
);
INT
WINAPI
(
*
MessageBoxA
)(
HWND
hWnd
,
LPCSTR
text
,
LPCSTR
title
,
UINT
type
);
INT
WINAPI
(
*
MessageBoxW
)(
HWND
hwnd
,
LPCWSTR
text
,
LPCWSTR
title
,
UINT
type
);
INT
WINAPI
(
*
MessageBoxW
)(
HWND
hwnd
,
LPCWSTR
text
,
LPCWSTR
title
,
UINT
type
);
...
...
include/keyboard.h
View file @
946a4448
...
@@ -31,7 +31,6 @@ VOID WINAPI KEYBOARD_Disable(VOID);
...
@@ -31,7 +31,6 @@ VOID WINAPI KEYBOARD_Disable(VOID);
extern
BOOL
KEYBOARD_GetBeepActive
(
void
);
extern
BOOL
KEYBOARD_GetBeepActive
(
void
);
extern
void
KEYBOARD_SetBeepActive
(
BOOL
bActivate
);
extern
void
KEYBOARD_SetBeepActive
(
BOOL
bActivate
);
extern
void
KEYBOARD_Beep
(
void
);
extern
void
KEYBOARD_SendEvent
(
BYTE
bVk
,
BYTE
bScan
,
DWORD
dwFlags
,
DWORD
posX
,
DWORD
posY
,
DWORD
time
);
extern
void
KEYBOARD_SendEvent
(
BYTE
bVk
,
BYTE
bScan
,
DWORD
dwFlags
,
DWORD
posX
,
DWORD
posY
,
DWORD
time
);
...
...
loader/dos/dosvm.c
View file @
946a4448
...
@@ -431,7 +431,7 @@ void DOSVM_Wait( int read_pipe, HANDLE hObject )
...
@@ -431,7 +431,7 @@ void DOSVM_Wait( int read_pipe, HANDLE hObject )
break
;
break
;
}
}
/* nothing yet, block while waiting for something to do */
/* nothing yet, block while waiting for something to do */
waitret
=
MsgWaitForMultipleObjects
(
objc
,
objs
,
FALSE
,
INFINITE
,
QS_ALLINPUT
);
waitret
=
Callout
.
MsgWaitForMultipleObjects
(
objc
,
objs
,
FALSE
,
INFINITE
,
QS_ALLINPUT
);
if
(
waitret
==
(
DWORD
)
-
1
)
{
if
(
waitret
==
(
DWORD
)
-
1
)
{
ERR_
(
module
)(
"dosvm wait error=%ld
\n
"
,
GetLastError
());
ERR_
(
module
)(
"dosvm wait error=%ld
\n
"
,
GetLastError
());
}
}
...
...
misc/main.c
View file @
946a4448
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include "winnls.h"
#include "winnls.h"
#include "console.h"
#include "console.h"
#include "monitor.h"
#include "monitor.h"
#include "keyboard.h"
#include "gdi.h"
#include "gdi.h"
#include "user.h"
#include "user.h"
#include "windef.h"
#include "windef.h"
...
@@ -586,31 +585,13 @@ void MAIN_WineInit(void)
...
@@ -586,31 +585,13 @@ void MAIN_WineInit(void)
}
}
/***********************************************************************
/***********************************************************************
* MessageBeep16 (USER.104)
*/
void
WINAPI
MessageBeep16
(
UINT16
i
)
{
MessageBeep
(
i
);
}
/***********************************************************************
* MessageBeep (USER32.390)
*/
BOOL
WINAPI
MessageBeep
(
UINT
i
)
{
KEYBOARD_Beep
();
return
TRUE
;
}
/***********************************************************************
* Beep (KERNEL32.11)
* Beep (KERNEL32.11)
*/
*/
BOOL
WINAPI
Beep
(
DWORD
dwFreq
,
DWORD
dwDur
)
BOOL
WINAPI
Beep
(
DWORD
dwFreq
,
DWORD
dwDur
)
{
{
static
char
beep
=
'\a'
;
/* dwFreq and dwDur are ignored by Win95 */
/* dwFreq and dwDur are ignored by Win95 */
KEYBOARD_Beep
(
);
if
(
isatty
(
2
))
write
(
2
,
&
beep
,
1
);
return
TRUE
;
return
TRUE
;
}
}
...
...
objects/bitmap.c
View file @
946a4448
...
@@ -16,11 +16,9 @@
...
@@ -16,11 +16,9 @@
#include "global.h"
#include "global.h"
#include "cursoricon.h"
#include "cursoricon.h"
#include "debugtools.h"
#include "debugtools.h"
#include "monitor.h"
#include "wine/winuser16.h"
#include "wine/winuser16.h"
DEFAULT_DEBUG_CHANNEL
(
bitmap
)
DEFAULT_DEBUG_CHANNEL
(
bitmap
);
DECLARE_DEBUG_CHANNEL
(
resource
)
BITMAP_DRIVER
*
BITMAP_Driver
=
NULL
;
BITMAP_DRIVER
*
BITMAP_Driver
=
NULL
;
...
@@ -74,7 +72,10 @@ HBITMAP16 WINAPI CreateUserBitmap16( INT16 width, INT16 height, UINT16 planes,
...
@@ -74,7 +72,10 @@ HBITMAP16 WINAPI CreateUserBitmap16( INT16 width, INT16 height, UINT16 planes,
HBITMAP16
WINAPI
CreateUserDiscardableBitmap16
(
WORD
dummy
,
HBITMAP16
WINAPI
CreateUserDiscardableBitmap16
(
WORD
dummy
,
INT16
width
,
INT16
height
)
INT16
width
,
INT16
height
)
{
{
return
CreateUserBitmap16
(
width
,
height
,
1
,
MONITOR_GetDepth
(
&
MONITOR_PrimaryMonitor
),
NULL
);
HDC
hdc
=
CreateDCA
(
"DISPLAY"
,
NULL
,
NULL
,
NULL
);
HBITMAP16
ret
=
CreateCompatibleBitmap16
(
hdc
,
width
,
height
);
DeleteDC
(
hdc
);
return
ret
;
}
}
...
...
objects/dib.c
View file @
946a4448
...
@@ -10,10 +10,9 @@
...
@@ -10,10 +10,9 @@
#include "callback.h"
#include "callback.h"
#include "dc.h"
#include "dc.h"
#include "debugtools.h"
#include "debugtools.h"
#include "monitor.h"
#include "palette.h"
#include "palette.h"
DEFAULT_DEBUG_CHANNEL
(
bitmap
)
DEFAULT_DEBUG_CHANNEL
(
bitmap
)
;
/***********************************************************************
/***********************************************************************
* DIB_GetDIBWidthBytes
* DIB_GetDIBWidthBytes
...
@@ -849,8 +848,14 @@ HBITMAP WINAPI CreateDIBitmap( HDC hdc, const BITMAPINFOHEADER *header,
...
@@ -849,8 +848,14 @@ HBITMAP WINAPI CreateDIBitmap( HDC hdc, const BITMAPINFOHEADER *header,
/* Now create the bitmap */
/* Now create the bitmap */
handle
=
fColor
?
CreateBitmap
(
width
,
height
,
1
,
MONITOR_GetDepth
(
&
MONITOR_PrimaryMonitor
),
NULL
)
:
if
(
fColor
)
CreateBitmap
(
width
,
height
,
1
,
1
,
NULL
);
{
HDC
tmpdc
=
CreateDCA
(
"DISPLAY"
,
NULL
,
NULL
,
NULL
);
handle
=
CreateCompatibleBitmap
(
tmpdc
,
width
,
height
);
DeleteDC
(
tmpdc
);
}
else
handle
=
CreateBitmap
(
width
,
height
,
1
,
1
,
NULL
);
if
(
!
handle
)
return
0
;
if
(
!
handle
)
return
0
;
if
(
init
==
CBM_INIT
)
if
(
init
==
CBM_INIT
)
...
...
objects/palette.c
View file @
946a4448
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include "color.h"
#include "color.h"
#include "palette.h"
#include "palette.h"
#include "debugtools.h"
#include "debugtools.h"
#include "callback.h"
#include "winerror.h"
#include "winerror.h"
DEFAULT_DEBUG_CHANNEL
(
palette
)
DEFAULT_DEBUG_CHANNEL
(
palette
)
...
@@ -766,25 +767,17 @@ HPALETTE WINAPI SelectPalette(
...
@@ -766,25 +767,17 @@ HPALETTE WINAPI SelectPalette(
HPALETTE
hPal
,
/* [in] Handle of logical color palette */
HPALETTE
hPal
,
/* [in] Handle of logical color palette */
BOOL
bForceBackground
)
/* [in] Foreground/background mode */
BOOL
bForceBackground
)
/* [in] Foreground/background mode */
{
{
WORD
wBkgPalette
=
1
;
WORD
wBkgPalette
=
1
;
PALETTEOBJ
*
lpt
=
(
PALETTEOBJ
*
)
GDI_GetObjPtr
(
hPal
,
PALETTE_MAGIC
);
TRACE
(
"dc=%04x,pal=%04x,force=%i
\n
"
,
hDC
,
hPal
,
bForceBackground
);
if
(
!
bForceBackground
&&
(
hPal
!=
STOCK_DEFAULT_PALETTE
))
if
(
!
lpt
)
return
0
;
TRACE
(
" entries = %d
\n
"
,
lpt
->
logpalette
.
palNumEntries
);
GDI_HEAP_UNLOCK
(
hPal
);
if
(
hPal
!=
STOCK_DEFAULT_PALETTE
)
{
{
HWND
hWnd
=
WindowFromDC
(
hDC
);
HWND
hwnd
=
Callout
.
WindowFromDC
(
hDC
);
HWND
hActive
=
GetActiveWindow
();
if
(
hwnd
)
{
/* set primary palette if it's related to current active */
HWND
hForeground
=
Callout
.
GetForegroundWindow
();
/* set primary palette if it's related to current active */
if
((
!
hWnd
||
(
hActive
==
hWnd
||
IsChild16
(
hActive
,
hWnd
)))
&&
if
(
hForeground
==
hwnd
||
Callout
.
IsChild
(
hForeground
,
hwnd
))
wBkgPalette
=
0
;
!
bForceBackground
)
}
wBkgPalette
=
0
;
}
}
return
GDISelectPalette16
(
hDC
,
hPal
,
wBkgPalette
);
return
GDISelectPalette16
(
hDC
,
hPal
,
wBkgPalette
);
}
}
...
@@ -824,8 +817,8 @@ UINT WINAPI RealizePalette(
...
@@ -824,8 +817,8 @@ UINT WINAPI RealizePalette(
/* Send palette change notification */
/* Send palette change notification */
HWND
hWnd
;
HWND
hWnd
;
if
(
(
hWnd
=
WindowFromDC
(
hDC
))
)
if
(
(
hWnd
=
Callout
.
WindowFromDC
(
hDC
))
)
SendMessage16
(
HWND_BROADCAST
,
WM_PALETTECHANGED
,
hWnd
,
0L
);
Callout
.
SendMessageA
(
HWND_BROADCAST
,
WM_PALETTECHANGED
,
hWnd
,
0L
);
}
}
GDI_HEAP_UNLOCK
(
hDC
);
GDI_HEAP_UNLOCK
(
hDC
);
...
@@ -843,13 +836,13 @@ INT16 WINAPI UpdateColors16( HDC16 hDC )
...
@@ -843,13 +836,13 @@ INT16 WINAPI UpdateColors16( HDC16 hDC )
if
(
!
(
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hDC
,
DC_MAGIC
)))
return
0
;
if
(
!
(
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hDC
,
DC_MAGIC
)))
return
0
;
hWnd
=
WindowFromDC
(
hDC
);
hWnd
=
Callout
.
WindowFromDC
(
hDC
);
/* Docs say that we have to remap current drawable pixel by pixel
/* Docs say that we have to remap current drawable pixel by pixel
* but it would take forever given the speed of XGet/PutPixel.
* but it would take forever given the speed of XGet/PutPixel.
*/
*/
if
(
hWnd
&&
dc
->
w
.
devCaps
->
sizePalette
)
if
(
hWnd
&&
dc
->
w
.
devCaps
->
sizePalette
)
InvalidateRect
(
hWnd
,
NULL
,
FALS
E
);
Callout
.
RedrawWindow
(
hWnd
,
NULL
,
0
,
RDW_INVALIDAT
E
);
GDI_HEAP_UNLOCK
(
hDC
);
GDI_HEAP_UNLOCK
(
hDC
);
...
...
windows/keyboard.c
View file @
946a4448
...
@@ -274,10 +274,18 @@ void KEYBOARD_SetBeepActive(BOOL bActivate)
...
@@ -274,10 +274,18 @@ void KEYBOARD_SetBeepActive(BOOL bActivate)
}
}
/***********************************************************************
/***********************************************************************
*
KEYBOARD_Beep
*
MessageBeep16 (USER.104)
*/
*/
void
KEYBOARD_Beep
(
void
)
void
WINAPI
MessageBeep16
(
UINT16
i
)
{
{
USER_Driver
->
pBeep
(
);
MessageBeep
(
i
);
}
}
/***********************************************************************
* MessageBeep (USER32.390)
*/
BOOL
WINAPI
MessageBeep
(
UINT
i
)
{
USER_Driver
->
pBeep
();
return
TRUE
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment