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
7e49205d
Commit
7e49205d
authored
Dec 17, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed 16-bit USER Enum* functions to not use thunks, now that 16-bit
Winelib is no longer supported.
parent
9ec81d16
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
156 additions
and
128 deletions
+156
-128
.cvsignore
dlls/user/.cvsignore
+9
-3
Makefile.in
dlls/user/Makefile.in
+3
-2
property.c
dlls/user/property.c
+5
-2
text.c
dlls/user/text.c
+25
-2
thunk.c
dlls/user/thunk.c
+0
-101
user.spec
dlls/user/user.spec
+4
-4
wnd16.c
dlls/user/wnd16.c
+59
-0
.cvsignore
windows/.cvsignore
+1
-0
Makefile.in
windows/Makefile.in
+4
-2
painting.c
windows/painting.c
+46
-0
win.c
windows/win.c
+0
-12
No files found.
dlls/user/.cvsignore
View file @
7e49205d
*.spec.c
*.spec.glue.s
Makefile
thunk.glue.c
ddeml.spec.c
display.spec.c
keyboard.spec.c
mouse.spec.c
property.glue.c
text.glue.c
user.spec.c
user32.spec.c
wnd16.glue.c
dlls/user/Makefile.in
View file @
7e49205d
...
...
@@ -27,7 +27,6 @@ C_SRCS = \
property.c
\
resource.c
\
text.c
\
thunk.c
\
user_main.c
\
wnd16.c
\
wsprintf.c
...
...
@@ -42,7 +41,9 @@ RC_SRCS16 = \
GLUE
=
\
dde/ddeml16.c
\
thunk.c
property.c
\
text.c
\
wnd16.c
EXTRA_OBJS
=
\
$(TOPOBJDIR)
/controls/controls.o
\
...
...
dlls/user/property.c
View file @
7e49205d
...
...
@@ -15,6 +15,9 @@
/* size of buffer needed to store an atom string */
#define ATOM_BUFFER_SIZE 256
/* ### start build ### */
extern
WORD
CALLBACK
PROP_CallTo16_word_wlw
(
PROPENUMPROC16
,
WORD
,
LONG
,
WORD
);
/* ### stop build ### */
/***********************************************************************
* get_properties
...
...
@@ -292,10 +295,10 @@ INT16 WINAPI EnumProps16( HWND16 hwnd, PROPENUMPROC16 func )
if
(
list
[
i
].
string
)
/* it was a string originally */
{
if
(
!
GlobalGetAtomNameA
(
list
[
i
].
atom
,
string
,
ATOM_BUFFER_SIZE
))
continue
;
ret
=
func
(
hwnd
,
SEGPTR_GET
(
string
),
list
[
i
].
handle
);
ret
=
PROP_CallTo16_word_wlw
(
func
,
hwnd
,
SEGPTR_GET
(
string
),
list
[
i
].
handle
);
}
else
ret
=
func
(
hwnd
,
list
[
i
].
atom
,
list
[
i
].
handle
);
ret
=
PROP_CallTo16_word_wlw
(
func
,
hwnd
,
list
[
i
].
atom
,
list
[
i
].
handle
);
if
(
!
ret
)
break
;
}
SEGPTR_FREE
(
string
);
...
...
dlls/user/text.c
View file @
7e49205d
...
...
@@ -42,6 +42,24 @@ static int tabwidth;
static
int
spacewidth
;
static
int
prefix_offset
;
/* ### start build ### */
extern
WORD
CALLBACK
TEXT_CallTo16_word_wlw
(
GRAYSTRINGPROC16
,
WORD
,
LONG
,
WORD
);
/* ### stop build ### */
struct
gray_string_info
{
GRAYSTRINGPROC16
proc
;
LPARAM
param
;
};
/* callback for 16-bit gray string proc */
static
BOOL
CALLBACK
gray_string_callback
(
HDC
hdc
,
LPARAM
param
,
INT
len
)
{
const
struct
gray_string_info
*
info
=
(
struct
gray_string_info
*
)
param
;
return
TEXT_CallTo16_word_wlw
(
info
->
proc
,
hdc
,
info
->
param
,
len
);
}
/*********************************************************************
* Return next line of text from a string.
*
...
...
@@ -585,8 +603,13 @@ BOOL16 WINAPI GrayString16( HDC16 hdc, HBRUSH16 hbr, GRAYSTRINGPROC16 gsprc,
LPARAM
lParam
,
INT16
cch
,
INT16
x
,
INT16
y
,
INT16
cx
,
INT16
cy
)
{
return
TEXT_GrayString
(
hdc
,
hbr
,
(
GRAYSTRINGPROC
)
gsprc
,
lParam
,
cch
,
x
,
y
,
cx
,
cy
,
FALSE
,
FALSE
);
struct
gray_string_info
info
;
if
(
!
gsprc
)
return
TEXT_GrayString
(
hdc
,
hbr
,
NULL
,
lParam
,
cch
,
x
,
y
,
cx
,
cy
,
FALSE
,
FALSE
);
info
.
proc
=
gsprc
;
info
.
param
=
lParam
;
return
TEXT_GrayString
(
hdc
,
hbr
,
gray_string_callback
,
(
LPARAM
)
&
info
,
cch
,
x
,
y
,
cx
,
cy
,
FALSE
,
FALSE
);
}
...
...
dlls/user/thunk.c
deleted
100644 → 0
View file @
9ec81d16
/*
* USER 16-bit thunks
*
* Copyright 1996, 1997 Alexandre Julliard
* Copyright 1998 Ulrich Weigand
*/
#include "windef.h"
#include "wingdi.h"
#include "wine/winuser16.h"
#include "win.h"
#include "callback.h"
/* ### start build ### */
extern
WORD
CALLBACK
THUNK_CallTo16_word_wl
(
FARPROC16
,
WORD
,
LONG
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_wlw
(
FARPROC16
,
WORD
,
LONG
,
WORD
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_wlwww
(
FARPROC16
,
WORD
,
LONG
,
WORD
,
WORD
,
WORD
);
/* ### stop build ### */
/*******************************************************************
* EnumWindows (USER.54)
*/
BOOL16
WINAPI
EnumWindows16
(
WNDENUMPROC16
func
,
LPARAM
lParam
)
{
DECL_THUNK
(
thunk
,
func
,
THUNK_CallTo16_word_wl
);
return
EnumWindows
(
(
WNDENUMPROC
)
&
thunk
,
lParam
);
}
/**********************************************************************
* EnumChildWindows (USER.55)
*/
BOOL16
WINAPI
EnumChildWindows16
(
HWND16
parent
,
WNDENUMPROC16
func
,
LPARAM
lParam
)
{
DECL_THUNK
(
thunk
,
func
,
THUNK_CallTo16_word_wl
);
return
EnumChildWindows
(
WIN_Handle32
(
parent
),
(
WNDENUMPROC
)
&
thunk
,
lParam
);
}
/**********************************************************************
* EnumTaskWindows (USER.225)
*/
BOOL16
WINAPI
THUNK_EnumTaskWindows16
(
HTASK16
hTask
,
WNDENUMPROC16
func
,
LPARAM
lParam
)
{
DECL_THUNK
(
thunk
,
func
,
THUNK_CallTo16_word_wl
);
return
EnumTaskWindows16
(
hTask
,
(
WNDENUMPROC16
)
&
thunk
,
lParam
);
}
/***********************************************************************
* EnumProps (USER.27)
*/
INT16
WINAPI
THUNK_EnumProps16
(
HWND16
hwnd
,
PROPENUMPROC16
func
)
{
DECL_THUNK
(
thunk
,
func
,
THUNK_CallTo16_word_wlw
);
return
EnumProps16
(
hwnd
,
(
PROPENUMPROC16
)
&
thunk
);
}
/***********************************************************************
* GrayString (USER.185)
*/
BOOL16
WINAPI
THUNK_GrayString16
(
HDC16
hdc
,
HBRUSH16
hbr
,
GRAYSTRINGPROC16
func
,
LPARAM
lParam
,
INT16
cch
,
INT16
x
,
INT16
y
,
INT16
cx
,
INT16
cy
)
{
DECL_THUNK
(
thunk
,
func
,
THUNK_CallTo16_word_wlw
);
if
(
!
func
)
return
GrayString16
(
hdc
,
hbr
,
NULL
,
lParam
,
cch
,
x
,
y
,
cx
,
cy
);
else
return
GrayString16
(
hdc
,
hbr
,
(
GRAYSTRINGPROC16
)
&
thunk
,
lParam
,
cch
,
x
,
y
,
cx
,
cy
);
}
/**********************************************************************
* DrawState (USER.449)
*/
BOOL16
WINAPI
DrawState16
(
HDC16
hdc
,
HBRUSH16
hbr
,
DRAWSTATEPROC16
func
,
LPARAM
ldata
,
WPARAM16
wdata
,
INT16
x
,
INT16
y
,
INT16
cx
,
INT16
cy
,
UINT16
flags
)
{
UINT
opcode
=
flags
&
0xf
;
DECL_THUNK
(
thunk
,
func
,
THUNK_CallTo16_word_wlwww
);
if
(
opcode
==
DST_TEXT
||
opcode
==
DST_PREFIXTEXT
)
{
/* make sure DrawStateA doesn't try to use ldata as a pointer */
if
(
!
wdata
)
wdata
=
strlen
(
MapSL
(
ldata
)
);
if
(
!
cx
||
!
cy
)
{
SIZE
s
;
if
(
!
GetTextExtentPoint32A
(
hdc
,
MapSL
(
ldata
),
wdata
,
&
s
))
return
FALSE
;
if
(
!
cx
)
cx
=
s
.
cx
;
if
(
!
cy
)
cy
=
s
.
cy
;
}
}
return
DrawStateA
(
hdc
,
hbr
,
(
DRAWSTATEPROC
)
&
thunk
,
ldata
,
wdata
,
x
,
y
,
cx
,
cy
,
flags
);
}
dlls/user/user.spec
View file @
7e49205d
...
...
@@ -30,7 +30,7 @@ rsrc resources/version16.res
24 pascal16 RemoveProp(word ptr) RemoveProp16
25 pascal16 GetProp(word str) GetProp16
26 pascal16 SetProp(word str word) SetProp16
27 pascal16 EnumProps(word segptr)
THUNK_
EnumProps16
27 pascal16 EnumProps(word segptr) EnumProps16
28 pascal16 ClientToScreen(word ptr) ClientToScreen16
29 pascal16 ScreenToClient(word ptr) ScreenToClient16
30 pascal16 WindowFromPoint(long) WindowFromPoint16
...
...
@@ -189,7 +189,7 @@ rsrc resources/version16.res
182 pascal16 KillSystemTimer(word word) KillSystemTimer16 # BEAR182
183 pascal16 GetCaretPos(ptr) GetCaretPos16
184 stub QuerySendMessage # W1.1, W2.0: SYSHASKANJI
185 pascal16 GrayString(word word segptr segptr s_word s_word s_word s_word s_word)
THUNK_
GrayString16
185 pascal16 GrayString(word word segptr segptr s_word s_word s_word s_word s_word) GrayString16
186 pascal16 SwapMouseButton(word) SwapMouseButton16
187 pascal16 EndMenu() EndMenu
188 pascal16 SetSysModalWindow(word) SetSysModalWindow16
...
...
@@ -231,7 +231,7 @@ rsrc resources/version16.res
222 pascal16 GetKeyboardState(ptr) GetKeyboardState
223 pascal16 SetKeyboardState(ptr) SetKeyboardState
224 pascal16 GetWindowTask(word) GetWindowTask16
225 pascal16 EnumTaskWindows(word segptr long)
THUNK_
EnumTaskWindows16
225 pascal16 EnumTaskWindows(word segptr long) EnumTaskWindows16
226 stub LockInput # not in W2.0
227 pascal16 GetNextDlgGroupItem(word word word) GetNextDlgGroupItem16
228 pascal16 GetNextDlgTabItem(word word word) GetNextDlgTabItem16
...
...
@@ -510,7 +510,7 @@ rsrc resources/version16.res
606 pascal16 FormatMessage(long segptr word word ptr word ptr) FormatMessage16
608 pascal16 GetForegroundWindow() GetForegroundWindow16
609 pascal16 SetForegroundWindow(word) SetForegroundWindow16
610 pascal16 DestroyIcon32(word word)
CURSORICON_Destroy
610 pascal16 DestroyIcon32(word word)
DestroyIcon32
620 pascal ChangeDisplaySettings(ptr long) ChangeDisplaySettings16
621 pascal16 EnumDisplaySettings(str long ptr) EnumDisplaySettings16
640 pascal MsgWaitForMultipleObjects(long ptr long long long) MsgWaitForMultipleObjects16
...
...
dlls/user/wnd16.c
View file @
7e49205d
...
...
@@ -7,10 +7,28 @@
#include "wine/winuser16.h"
#include "user.h"
#include "win.h"
#include "task.h"
#include "stackframe.h"
static
HWND16
hwndSysModal
;
/* ### start build ### */
extern
WORD
CALLBACK
WIN_CallTo16_word_wl
(
WNDENUMPROC16
,
WORD
,
LONG
);
/* ### stop build ### */
struct
wnd_enum_info
{
WNDENUMPROC16
proc
;
LPARAM
param
;
};
/* callback for 16-bit window enumeration functions */
static
BOOL
CALLBACK
wnd_enum_callback
(
HWND
hwnd
,
LPARAM
param
)
{
const
struct
wnd_enum_info
*
info
=
(
struct
wnd_enum_info
*
)
param
;
return
WIN_CallTo16_word_wl
(
info
->
proc
,
hwnd
,
info
->
param
);
}
/* convert insert after window handle to 32-bit */
inline
static
HWND
full_insert_after_hwnd
(
HWND16
hwnd
)
{
...
...
@@ -338,6 +356,32 @@ BOOL16 WINAPI DestroyWindow16( HWND16 hwnd )
}
/*******************************************************************
* EnumWindows (USER.54)
*/
BOOL16
WINAPI
EnumWindows16
(
WNDENUMPROC16
func
,
LPARAM
lParam
)
{
struct
wnd_enum_info
info
;
info
.
proc
=
func
;
info
.
param
=
lParam
;
return
EnumWindows
(
wnd_enum_callback
,
(
LPARAM
)
&
info
);
}
/**********************************************************************
* EnumChildWindows (USER.55)
*/
BOOL16
WINAPI
EnumChildWindows16
(
HWND16
parent
,
WNDENUMPROC16
func
,
LPARAM
lParam
)
{
struct
wnd_enum_info
info
;
info
.
proc
=
func
;
info
.
param
=
lParam
;
return
EnumChildWindows
(
WIN_Handle32
(
parent
),
wnd_enum_callback
,
(
LPARAM
)
&
info
);
}
/**************************************************************************
* MoveWindow (USER.56)
*/
...
...
@@ -915,6 +959,21 @@ INT16 WINAPI DlgDirListComboBox16( HWND16 hDlg, LPSTR spec, INT16 idCBox,
}
/**********************************************************************
* EnumTaskWindows (USER.225)
*/
BOOL16
WINAPI
EnumTaskWindows16
(
HTASK16
hTask
,
WNDENUMPROC16
func
,
LPARAM
lParam
)
{
struct
wnd_enum_info
info
;
TDB
*
tdb
=
TASK_GetPtr
(
hTask
);
if
(
!
tdb
)
return
FALSE
;
info
.
proc
=
func
;
info
.
param
=
lParam
;
return
EnumThreadWindows
(
(
DWORD
)
tdb
->
teb
->
tid
,
wnd_enum_callback
,
(
LPARAM
)
&
info
);
}
/**************************************************************************
* GetNextDlgGroupItem (USER.227)
*/
...
...
windows/.cvsignore
View file @
7e49205d
Makefile
driver.glue.c
hook.glue.c
painting.glue.c
windows/Makefile.in
View file @
7e49205d
...
...
@@ -41,8 +41,10 @@ C_SRCS = \
winpos.c
\
winproc.c
GLUE
=
hook.c
\
driver.c
GLUE
=
\
driver.c
\
hook.c
\
painting.c
all
:
$(MODULE).o
...
...
windows/painting.c
View file @
7e49205d
...
...
@@ -43,6 +43,24 @@ DECLARE_DEBUG_CHANNEL(nonclient);
#define COLOR_MAX COLOR_GRADIENTINACTIVECAPTION
/* ### start build ### */
extern
WORD
CALLBACK
PAINTING_CallTo16_word_wlwww
(
DRAWSTATEPROC16
,
WORD
,
LONG
,
WORD
,
WORD
,
WORD
);
/* ### stop build ### */
struct
draw_state_info
{
DRAWSTATEPROC16
proc
;
LPARAM
param
;
};
/* callback for 16-bit DrawState functions */
static
BOOL
CALLBACK
draw_state_callback
(
HDC
hdc
,
LPARAM
lparam
,
WPARAM
wparam
,
int
cx
,
int
cy
)
{
const
struct
draw_state_info
*
info
=
(
struct
draw_state_info
*
)
lparam
;
return
PAINTING_CallTo16_word_wlwww
(
info
->
proc
,
hdc
,
info
->
param
,
wparam
,
cx
,
cy
);
}
/***********************************************************************
* add_paint_count
*
...
...
@@ -1335,6 +1353,34 @@ BOOL WINAPI DrawStateW(HDC hdc, HBRUSH hbr,
return
PAINTING_DrawState
(
hdc
,
hbr
,
func
,
ldata
,
wdata
,
x
,
y
,
cx
,
cy
,
flags
,
TRUE
);
}
/**********************************************************************
* DrawState (USER.449)
*/
BOOL16
WINAPI
DrawState16
(
HDC16
hdc
,
HBRUSH16
hbr
,
DRAWSTATEPROC16
func
,
LPARAM
ldata
,
WPARAM16
wdata
,
INT16
x
,
INT16
y
,
INT16
cx
,
INT16
cy
,
UINT16
flags
)
{
struct
draw_state_info
info
;
UINT
opcode
=
flags
&
0xf
;
if
(
opcode
==
DST_TEXT
||
opcode
==
DST_PREFIXTEXT
)
{
/* make sure DrawStateA doesn't try to use ldata as a pointer */
if
(
!
wdata
)
wdata
=
strlen
(
MapSL
(
ldata
)
);
if
(
!
cx
||
!
cy
)
{
SIZE
s
;
if
(
!
GetTextExtentPoint32A
(
hdc
,
MapSL
(
ldata
),
wdata
,
&
s
))
return
FALSE
;
if
(
!
cx
)
cx
=
s
.
cx
;
if
(
!
cy
)
cy
=
s
.
cy
;
}
}
info
.
proc
=
func
;
info
.
param
=
ldata
;
return
DrawStateA
(
hdc
,
hbr
,
draw_state_callback
,
(
LPARAM
)
&
info
,
wdata
,
x
,
y
,
cx
,
cy
,
flags
);
}
/***********************************************************************
* SelectPalette (USER.282)
*/
...
...
windows/win.c
View file @
7e49205d
...
...
@@ -2903,18 +2903,6 @@ BOOL WINAPI EnumWindows( WNDENUMPROC lpEnumFunc, LPARAM lParam )
/**********************************************************************
* EnumTaskWindows16 (USER.225)
*/
BOOL16
WINAPI
EnumTaskWindows16
(
HTASK16
hTask
,
WNDENUMPROC16
func
,
LPARAM
lParam
)
{
TDB
*
tdb
=
TASK_GetPtr
(
hTask
);
if
(
!
tdb
)
return
FALSE
;
return
EnumThreadWindows
(
(
DWORD
)
tdb
->
teb
->
tid
,
(
WNDENUMPROC
)
func
,
lParam
);
}
/**********************************************************************
* EnumThreadWindows (USER32.@)
*/
BOOL
WINAPI
EnumThreadWindows
(
DWORD
id
,
WNDENUMPROC
func
,
LPARAM
lParam
)
...
...
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