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
9308f640
Commit
9308f640
authored
Nov 15, 2000
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 15, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepare switching to unicode of builtin widgets.
parent
b134ed7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
20 deletions
+53
-20
widgets.c
controls/widgets.c
+53
-20
No files found.
controls/widgets.c
View file @
9308f640
...
...
@@ -17,52 +17,73 @@
#include "menu.h"
#include "scroll.h"
#include "static.h"
#include "wine/unicode.h"
/* Built-in classes */
static
WNDCLASSA
WIDGETS_BuiltinClasses
[
BIC32_NB_CLASSES
]
=
typedef
struct
{
BOOL
unicode
;
union
{
WNDCLASSA
A
;
WNDCLASSW
W
;
}
wnd_class
;
}
BUILTINCLASS
;
static
BUILTINCLASS
WIDGETS_BuiltinClasses
[
BIC32_NB_CLASSES
]
=
{
/* BIC32_BUTTON */
{
FALSE
,
{
{
CS_GLOBALCLASS
|
CS_DBLCLKS
|
CS_VREDRAW
|
CS_HREDRAW
|
CS_PARENTDC
,
ButtonWndProc
,
0
,
sizeof
(
BUTTONINFO
),
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
"Button"
},
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
"Button"
}
}}
,
/* BIC32_EDIT */
{
FALSE
,
{
{
CS_GLOBALCLASS
|
CS_DBLCLKS
/*| CS_PARENTDC*/
,
EditWndProc
,
0
,
sizeof
(
void
*
),
0
,
0
,
(
HCURSOR
)
IDC_IBEAMA
,
0
,
0
,
"Edit"
},
(
HCURSOR
)
IDC_IBEAMA
,
0
,
0
,
"Edit"
}
}}
,
/* BIC32_LISTBOX */
{
FALSE
,
{
{
CS_GLOBALCLASS
|
CS_DBLCLKS
/*| CS_PARENTDC*/
,
ListBoxWndProc
,
0
,
sizeof
(
void
*
),
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
"ListBox"
},
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
"ListBox"
}
}}
,
/* BIC32_COMBO */
{
FALSE
,
{
{
CS_GLOBALCLASS
|
CS_PARENTDC
|
CS_DBLCLKS
,
ComboWndProc
,
0
,
sizeof
(
void
*
),
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
"ComboBox"
},
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
"ComboBox"
}
}}
,
/* BIC32_COMBOLB */
{
FALSE
,
{
{
CS_GLOBALCLASS
|
CS_DBLCLKS
|
CS_SAVEBITS
,
ComboLBWndProc
,
0
,
sizeof
(
void
*
),
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
"ComboLBox"
},
0
,
sizeof
(
void
*
),
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
"ComboLBox"
}
}}
,
/* BIC32_POPUPMENU */
{
FALSE
,
{
{
CS_GLOBALCLASS
|
CS_SAVEBITS
,
PopupMenuWndProc
,
0
,
sizeof
(
HMENU
),
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
NULL_BRUSH
,
0
,
POPUPMENU_CLASS_NAME
},
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
NULL_BRUSH
,
0
,
POPUPMENU_CLASS_NAME
}
}}
,
/* BIC32_STATIC */
{
FALSE
,
{
{
CS_GLOBALCLASS
|
CS_DBLCLKS
|
CS_PARENTDC
,
StaticWndProc
,
0
,
sizeof
(
STATICINFO
),
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
"Static"
},
0
,
sizeof
(
STATICINFO
),
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
"Static"
}
}}
,
/* BIC32_SCROLL */
{
FALSE
,
{
{
CS_GLOBALCLASS
|
CS_DBLCLKS
|
CS_VREDRAW
|
CS_HREDRAW
|
CS_PARENTDC
,
ScrollBarWndProc
,
0
,
sizeof
(
SCROLLBAR_INFO
),
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
"ScrollBar"
},
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
"ScrollBar"
}
}}
,
/* BIC32_MDICLIENT */
{
FALSE
,
{
{
CS_GLOBALCLASS
,
MDIClientWndProc
,
0
,
sizeof
(
MDICLIENTINFO
),
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
STOCK_LTGRAY_BRUSH
,
0
,
"MDIClient"
},
0
,
sizeof
(
MDICLIENTINFO
),
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
STOCK_LTGRAY_BRUSH
,
0
,
"MDIClient"
}
}}
,
/* BIC32_DESKTOP */
{
FALSE
,
{
{
CS_GLOBALCLASS
,
DesktopWndProc
,
0
,
sizeof
(
DESKTOP
),
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
DESKTOP_CLASS_NAME
},
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
DESKTOP_CLASS_NAME
}
}}
,
/* BIC32_DIALOG */
{
FALSE
,
{
{
CS_GLOBALCLASS
|
CS_SAVEBITS
,
DefDlgProcA
,
0
,
DLGWINDOWEXTRA
,
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
DIALOG_CLASS_NAME
},
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
DIALOG_CLASS_NAME
}
}}
,
/* BIC32_ICONTITLE */
{
FALSE
,
{
{
CS_GLOBALCLASS
,
IconTitleWndProc
,
0
,
0
,
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
ICONTITLE_CLASS_NAME
}
0
,
0
,
(
HCURSOR
)
IDC_ARROWA
,
0
,
0
,
ICONTITLE_CLASS_NAME
}
}}
};
static
ATOM
bicAtomTable
[
BIC32_NB_CLASSES
];
...
...
@@ -75,18 +96,30 @@ static ATOM bicAtomTable[BIC32_NB_CLASSES];
BOOL
WIDGETS_Init
(
void
)
{
int
i
;
WNDCLASSA
*
cls
=
WIDGETS_BuiltinClasses
;
BUILTINCLASS
*
cls
=
WIDGETS_BuiltinClasses
;
/* Create builtin classes */
for
(
i
=
0
;
i
<
BIC32_NB_CLASSES
;
i
++
,
cls
++
)
{
char
name
[
20
];
/* Just to make sure the string is > 0x10000 */
strcpy
(
name
,
(
char
*
)
cls
->
lpszClassName
);
cls
->
lpszClassName
=
name
;
cls
->
hCursor
=
LoadCursorA
(
0
,
(
LPCSTR
)
cls
->
hCursor
);
if
(
!
(
bicAtomTable
[
i
]
=
RegisterClassA
(
cls
)))
return
FALSE
;
if
(
cls
->
unicode
)
{
WCHAR
nameW
[
20
];
/* Just to make sure the string is > 0x10000 */
strcpyW
(
nameW
,
(
WCHAR
*
)
cls
->
wnd_class
.
W
.
lpszClassName
);
cls
->
wnd_class
.
W
.
lpszClassName
=
nameW
;
cls
->
wnd_class
.
W
.
hCursor
=
LoadCursorW
(
0
,
(
LPCWSTR
)
cls
->
wnd_class
.
W
.
hCursor
);
if
(
!
(
bicAtomTable
[
i
]
=
RegisterClassW
(
&
(
cls
->
wnd_class
.
W
)
)))
return
FALSE
;
}
else
{
char
name
[
20
];
/* Just to make sure the string is > 0x10000 */
strcpy
(
name
,
(
char
*
)
cls
->
wnd_class
.
A
.
lpszClassName
);
cls
->
wnd_class
.
A
.
lpszClassName
=
name
;
cls
->
wnd_class
.
A
.
hCursor
=
LoadCursorA
(
0
,
(
LPCSTR
)
cls
->
wnd_class
.
A
.
hCursor
);
if
(
!
(
bicAtomTable
[
i
]
=
RegisterClassA
(
&
(
cls
->
wnd_class
.
A
)
)))
return
FALSE
;
}
}
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