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
9cfb9435
Commit
9cfb9435
authored
Oct 19, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Oct 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement SetPathWordBreakProc and MirrorIcon.
parent
5d0c01c4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
33 deletions
+72
-33
comboex.c
dlls/comctl32/comboex.c
+3
-31
comctl32.h
dlls/comctl32/comctl32.h
+3
-0
comctl32.spec
dlls/comctl32/comctl32.spec
+2
-2
commctrl.c
dlls/comctl32/commctrl.c
+64
-0
No files found.
dlls/comctl32/comboex.c
View file @
9cfb9435
...
...
@@ -130,8 +130,6 @@ static LRESULT WINAPI
COMBOEX_EditWndProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
static
LRESULT
WINAPI
COMBOEX_ComboWndProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
static
int
CALLBACK
COMBOEX_PathWordBreakProc
(
LPWSTR
lpch
,
int
ichCurrent
,
int
cch
,
int
code
);
static
LRESULT
COMBOEX_Destroy
(
COMBOEX_INFO
*
infoPtr
);
typedef
INT
(
WINAPI
*
cmp_func_t
)(
LPCWSTR
,
LPCWSTR
);
...
...
@@ -674,11 +672,9 @@ COMBOEX_SetExtendedStyle (COMBOEX_INFO *infoPtr, DWORD mask, DWORD style)
infoPtr
->
dwExtStyle
=
style
;
/* see if we need to change the word break proc on the edit */
if
((
infoPtr
->
dwExtStyle
^
dwTemp
)
&
CBES_EX_PATHWORDBREAKPROC
)
{
SendMessageW
(
infoPtr
->
hwndEdit
,
EM_SETWORDBREAKPROC
,
0
,
(
infoPtr
->
dwExtStyle
&
CBES_EX_PATHWORDBREAKPROC
)
?
(
LPARAM
)
COMBOEX_PathWordBreakProc
:
0
);
}
if
((
infoPtr
->
dwExtStyle
^
dwTemp
)
&
CBES_EX_PATHWORDBREAKPROC
)
SetPathWordBreakProc
(
infoPtr
->
hwndEdit
,
(
infoPtr
->
dwExtStyle
&
CBES_EX_PATHWORDBREAKPROC
)
?
TRUE
:
FALSE
);
/* test if the control's appearance has changed */
mask
=
CBES_EX_NOEDITIMAGE
|
CBES_EX_NOEDITIMAGEINDENT
;
...
...
@@ -1650,30 +1646,6 @@ static LRESULT COMBOEX_WindowPosChanging (COMBOEX_INFO *infoPtr, WINDOWPOS *wp)
return
0
;
}
static
inline
int
is_delimiter
(
WCHAR
c
)
{
switch
(
c
)
{
case
'/'
:
case
'\\'
:
case
'.'
:
return
TRUE
;
}
return
FALSE
;
}
static
int
CALLBACK
COMBOEX_PathWordBreakProc
(
LPWSTR
lpch
,
int
ichCurrent
,
int
cch
,
int
code
)
{
if
(
code
==
WB_ISDELIMITER
)
{
return
is_delimiter
(
lpch
[
ichCurrent
]);
}
else
{
int
dir
=
(
code
==
WB_LEFT
)
?
-
1
:
1
;
for
(;
0
<=
ichCurrent
&&
ichCurrent
<
cch
;
ichCurrent
+=
dir
)
if
(
is_delimiter
(
lpch
[
ichCurrent
]))
return
ichCurrent
;
}
return
ichCurrent
;
}
static
LRESULT
WINAPI
COMBOEX_EditWndProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
...
...
dlls/comctl32/comctl32.h
View file @
9cfb9435
...
...
@@ -188,4 +188,7 @@ BOOL WINAPI DPA_Merge (const HDPA, const HDPA, DWORD, PFNDPACOMPARE, PFNDPAMERGE
#define DPA_GetPtrCount(hdpa) (*(INT*)(hdpa))
LRESULT
WINAPI
SetPathWordBreakProc
(
HWND
hwnd
,
BOOL
bSet
);
BOOL
WINAPI
MirrorIcon
(
HICON
*
phicon1
,
HICON
*
phicon2
);
#endif
/* __WINE_COMCTL32_H */
dlls/comctl32/comctl32.spec
View file @
9cfb9435
...
...
@@ -89,7 +89,7 @@
377 stdcall -noname IntlStrEqWorkerW(long wstr wstr long)
382 stdcall -noname SmoothScrollWindow(ptr)
383 stub -noname DoReaderMode
384 st
ub -noname SetPathWordBreakProc
384 st
dcall -noname SetPathWordBreakProc(ptr long)
385 stdcall -noname DPA_EnumCallback(long long long)
386 stdcall -noname DPA_DestroyCallback(ptr ptr long)
387 stdcall -noname DSA_EnumCallback(ptr ptr long)
...
...
@@ -105,7 +105,7 @@
411 stdcall GetWindowSubclass(long ptr long ptr)
412 stdcall RemoveWindowSubclass(long ptr long)
413 stdcall DefSubclassProc(long long long long)
414 st
ub -noname MirrorIcon
414 st
dcall -noname MirrorIcon(ptr ptr)
415 stdcall -noname DrawTextWrap(long wstr long ptr long) user32.DrawTextW
416 stdcall -noname DrawTextExPrivWrap(long wstr long ptr long ptr) user32.DrawTextExW
417 stdcall -noname ExtTextOutWrap(long long long long ptr wstr long ptr) gdi32.ExtTextOutW
...
...
dlls/comctl32/commctrl.c
View file @
9cfb9435
...
...
@@ -1485,3 +1485,67 @@ void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark
SelectObject
(
hDC
,
hOldPen
);
DeleteObject
(
hPen
);
}
/***********************************************************************
* MirrorIcon [COMCTL32.414]
*
* Mirrors an icon so that it will appear correctly on a mirrored DC.
*
* PARAMS
* phicon1 [I/O] Icon.
* phicon2 [I/O] Icon.
*
* RETURNS
* Success: TRUE.
* Failure: FALSE.
*/
BOOL
WINAPI
MirrorIcon
(
HICON
*
phicon1
,
HICON
*
phicon2
)
{
FIXME
(
"(%p, %p): stub
\n
"
,
phicon1
,
phicon2
);
return
FALSE
;
}
static
inline
int
IsDelimiter
(
WCHAR
c
)
{
switch
(
c
)
{
case
'/'
:
case
'\\'
:
case
'.'
:
case
' '
:
return
TRUE
;
}
return
FALSE
;
}
static
int
CALLBACK
PathWordBreakProc
(
LPWSTR
lpch
,
int
ichCurrent
,
int
cch
,
int
code
)
{
if
(
code
==
WB_ISDELIMITER
)
return
IsDelimiter
(
lpch
[
ichCurrent
]);
else
{
int
dir
=
(
code
==
WB_LEFT
)
?
-
1
:
1
;
for
(;
0
<=
ichCurrent
&&
ichCurrent
<
cch
;
ichCurrent
+=
dir
)
if
(
IsDelimiter
(
lpch
[
ichCurrent
]))
return
ichCurrent
;
}
return
ichCurrent
;
}
/***********************************************************************
* SetPathWordBreakProc [COMCTL32.384]
*
* Sets the word break procedure for an edit control to one that understands
* paths so that the user can jump over directories.
*
* PARAMS
* hwnd [I] Handle to edit control.
* bSet [I] If this is TRUE then the word break proc is set, otherwise it is removed.
*
* RETURNS
* Result from EM_SETWORDBREAKPROC message.
*/
LRESULT
WINAPI
SetPathWordBreakProc
(
HWND
hwnd
,
BOOL
bSet
)
{
return
SendMessageW
(
hwnd
,
EM_SETWORDBREAKPROC
,
0
,
(
LPARAM
)(
bSet
?
PathWordBreakProc
:
NULL
));
}
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