Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
03f6f6f7
Commit
03f6f6f7
authored
May 25, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved a couple of 16-bit functions to dlls/user/user16.c.
parent
67747801
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
91 deletions
+90
-91
user16.c
dlls/user/user16.c
+90
-0
user.c
windows/user.c
+0
-91
No files found.
dlls/user/user16.c
View file @
03f6f6f7
...
...
@@ -46,6 +46,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(user);
#define IS_MENU_STRING_ITEM(flags) \
(((flags) & (MF_STRING | MF_BITMAP | MF_OWNERDRAW | MF_SEPARATOR)) == MF_STRING)
/* UserSeeUserDo parameters */
#define USUD_LOCALALLOC 0x0001
#define USUD_LOCALFREE 0x0002
#define USUD_LOCALCOMPACT 0x0003
#define USUD_LOCALHEAP 0x0004
#define USUD_FIRSTCLASS 0x0005
WORD
WINAPI
DestroyIcon32
(
HGLOBAL16
,
UINT16
);
...
...
@@ -710,6 +717,41 @@ DWORD WINAPI GetTabbedTextExtent16( HDC16 hdc, LPCSTR lpstr, INT16 count,
}
/***********************************************************************
* UserSeeUserDo (USER.216)
*/
DWORD
WINAPI
UserSeeUserDo16
(
WORD
wReqType
,
WORD
wParam1
,
WORD
wParam2
,
WORD
wParam3
)
{
STACK16FRAME
*
stack16
=
MapSL
((
SEGPTR
)
NtCurrentTeb
()
->
WOW32Reserved
);
HANDLE16
oldDS
=
stack16
->
ds
;
DWORD
ret
=
(
DWORD
)
-
1
;
stack16
->
ds
=
USER_HeapSel
;
switch
(
wReqType
)
{
case
USUD_LOCALALLOC
:
ret
=
LocalAlloc16
(
wParam1
,
wParam3
);
break
;
case
USUD_LOCALFREE
:
ret
=
LocalFree16
(
wParam1
);
break
;
case
USUD_LOCALCOMPACT
:
ret
=
LocalCompact16
(
wParam3
);
break
;
case
USUD_LOCALHEAP
:
ret
=
USER_HeapSel
;
break
;
case
USUD_FIRSTCLASS
:
FIXME
(
"return a pointer to the first window class.
\n
"
);
break
;
default:
WARN
(
"wReqType %04x (unknown)
\n
"
,
wReqType
);
}
stack16
->
ds
=
oldDS
;
return
ret
;
}
/*************************************************************************
* ScrollDC (USER.221)
*/
...
...
@@ -892,6 +934,54 @@ UINT16 WINAPI RealizePalette16( HDC16 hdc )
/***********************************************************************
* GetFreeSystemResources (USER.284)
*/
WORD
WINAPI
GetFreeSystemResources16
(
WORD
resType
)
{
STACK16FRAME
*
stack16
=
MapSL
((
SEGPTR
)
NtCurrentTeb
()
->
WOW32Reserved
);
HANDLE16
oldDS
=
stack16
->
ds
;
HINSTANCE16
gdi_inst
;
WORD
gdi_heap
;
int
userPercent
,
gdiPercent
;
if
((
gdi_inst
=
LoadLibrary16
(
"GDI"
))
<
32
)
return
0
;
gdi_heap
=
gdi_inst
|
7
;
switch
(
resType
)
{
case
GFSR_USERRESOURCES
:
stack16
->
ds
=
USER_HeapSel
;
userPercent
=
(
int
)
LocalCountFree16
()
*
100
/
LocalHeapSize16
();
gdiPercent
=
100
;
stack16
->
ds
=
oldDS
;
break
;
case
GFSR_GDIRESOURCES
:
stack16
->
ds
=
gdi_inst
;
gdiPercent
=
(
int
)
LocalCountFree16
()
*
100
/
LocalHeapSize16
();
userPercent
=
100
;
stack16
->
ds
=
oldDS
;
break
;
case
GFSR_SYSTEMRESOURCES
:
stack16
->
ds
=
USER_HeapSel
;
userPercent
=
(
int
)
LocalCountFree16
()
*
100
/
LocalHeapSize16
();
stack16
->
ds
=
gdi_inst
;
gdiPercent
=
(
int
)
LocalCountFree16
()
*
100
/
LocalHeapSize16
();
stack16
->
ds
=
oldDS
;
break
;
default:
userPercent
=
gdiPercent
=
0
;
break
;
}
FreeLibrary16
(
gdi_inst
);
TRACE
(
"<- userPercent %d, gdiPercent %d
\n
"
,
userPercent
,
gdiPercent
);
return
(
WORD
)
min
(
userPercent
,
gdiPercent
);
}
/***********************************************************************
* GetClipCursor (USER.309)
*/
void
WINAPI
GetClipCursor16
(
RECT16
*
rect
)
...
...
windows/user.c
View file @
03f6f6f7
...
...
@@ -22,18 +22,15 @@
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include "wine/winbase16.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/winuser16.h"
#include "winreg.h"
#include "winternl.h"
#include "tlhelp32.h"
#include "user_private.h"
#include "win.h"
#include "controls.h"
#include "cursoricon.h"
#include "wine/debug.h"
...
...
@@ -60,60 +57,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(user);
#define USIG_PROCESS_RUNNING 0x0500
#define USIG_PROCESS_LOADED 0x0600
/* UserSeeUserDo parameters */
#define USUD_LOCALALLOC 0x0001
#define USUD_LOCALFREE 0x0002
#define USUD_LOCALCOMPACT 0x0003
#define USUD_LOCALHEAP 0x0004
#define USUD_FIRSTCLASS 0x0005
/***********************************************************************
* GetFreeSystemResources (USER.284)
*/
WORD
WINAPI
GetFreeSystemResources16
(
WORD
resType
)
{
STACK16FRAME
*
stack16
=
MapSL
((
SEGPTR
)
NtCurrentTeb
()
->
WOW32Reserved
);
HANDLE16
oldDS
=
stack16
->
ds
;
HINSTANCE16
gdi_inst
;
WORD
gdi_heap
;
int
userPercent
,
gdiPercent
;
if
((
gdi_inst
=
LoadLibrary16
(
"GDI"
))
<
32
)
return
0
;
gdi_heap
=
gdi_inst
|
7
;
switch
(
resType
)
{
case
GFSR_USERRESOURCES
:
stack16
->
ds
=
USER_HeapSel
;
userPercent
=
(
int
)
LocalCountFree16
()
*
100
/
LocalHeapSize16
();
gdiPercent
=
100
;
stack16
->
ds
=
oldDS
;
break
;
case
GFSR_GDIRESOURCES
:
stack16
->
ds
=
gdi_inst
;
gdiPercent
=
(
int
)
LocalCountFree16
()
*
100
/
LocalHeapSize16
();
userPercent
=
100
;
stack16
->
ds
=
oldDS
;
break
;
case
GFSR_SYSTEMRESOURCES
:
stack16
->
ds
=
USER_HeapSel
;
userPercent
=
(
int
)
LocalCountFree16
()
*
100
/
LocalHeapSize16
();
stack16
->
ds
=
gdi_inst
;
gdiPercent
=
(
int
)
LocalCountFree16
()
*
100
/
LocalHeapSize16
();
stack16
->
ds
=
oldDS
;
break
;
default:
userPercent
=
gdiPercent
=
0
;
break
;
}
FreeLibrary16
(
gdi_inst
);
TRACE
(
"<- userPercent %d, gdiPercent %d
\n
"
,
userPercent
,
gdiPercent
);
return
(
WORD
)
min
(
userPercent
,
gdiPercent
);
}
/***********************************************************************
* SignalProc32 (USER.391)
...
...
@@ -546,40 +489,6 @@ BOOL WINAPI EnumDisplayDevicesW(
}
/***********************************************************************
* UserSeeUserDo (USER.216)
*/
DWORD
WINAPI
UserSeeUserDo16
(
WORD
wReqType
,
WORD
wParam1
,
WORD
wParam2
,
WORD
wParam3
)
{
STACK16FRAME
*
stack16
=
MapSL
((
SEGPTR
)
NtCurrentTeb
()
->
WOW32Reserved
);
HANDLE16
oldDS
=
stack16
->
ds
;
DWORD
ret
=
(
DWORD
)
-
1
;
stack16
->
ds
=
USER_HeapSel
;
switch
(
wReqType
)
{
case
USUD_LOCALALLOC
:
ret
=
LocalAlloc16
(
wParam1
,
wParam3
);
break
;
case
USUD_LOCALFREE
:
ret
=
LocalFree16
(
wParam1
);
break
;
case
USUD_LOCALCOMPACT
:
ret
=
LocalCompact16
(
wParam3
);
break
;
case
USUD_LOCALHEAP
:
ret
=
USER_HeapSel
;
break
;
case
USUD_FIRSTCLASS
:
FIXME
(
"return a pointer to the first window class.
\n
"
);
break
;
default:
WARN
(
"wReqType %04x (unknown)
\n
"
,
wReqType
);
}
stack16
->
ds
=
oldDS
;
return
ret
;
}
/***********************************************************************
* SetSystemCursor (USER32.@)
*/
BOOL
WINAPI
SetSystemCursor
(
HCURSOR
hcur
,
DWORD
id
)
...
...
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