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
f7eeac6f
Commit
f7eeac6f
authored
Aug 21, 2006
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 22, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleview: Added typedef handling to idl viewer.
parent
0bd611ce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
0 deletions
+67
-0
typelib.c
programs/oleview/typelib.c
+67
-0
No files found.
programs/oleview/typelib.c
View file @
f7eeac6f
...
...
@@ -755,6 +755,49 @@ void CreateInterfaceInfo(ITypeInfo *pTypeInfo, int cImplTypes, WCHAR *wszName,
AddToStrW
(
pTLData
->
wszInsertAfter
,
wszNewLine
);
}
void
CreateTypedefHeader
(
ITypeInfo
*
pTypeInfo
,
TYPEATTR
*
pTypeAttr
,
TYPELIB_DATA
*
pTLData
)
{
BOOL
bFirst
=
TRUE
;
WCHAR
wszGuid
[
MAX_LOAD_STRING
];
const
WCHAR
wszTypedef
[]
=
{
't'
,
'y'
,
'p'
,
'e'
,
'd'
,
'e'
,
'f'
,
' '
,
'\0'
};
const
WCHAR
wszPublic
[]
=
{
'p'
,
'u'
,
'b'
,
'l'
,
'i'
,
'c'
,
'\0'
};
AddToTLDataStrW
(
pTLData
,
wszTypedef
);
if
(
memcmp
(
&
pTypeAttr
->
guid
,
&
GUID_NULL
,
sizeof
(
GUID
)))
{
if
(
bFirst
)
AddToTLDataStrW
(
pTLData
,
wszOpenBrackets1
);
else
{
AddToTLDataStrW
(
pTLData
,
wszComa
);
AddToTLDataStrW
(
pTLData
,
wszSpace
);
}
bFirst
=
FALSE
;
AddToTLDataStrW
(
pTLData
,
wszUUID
);
AddToTLDataStrW
(
pTLData
,
wszOpenBrackets2
);
StringFromGUID2
(
&
(
pTypeAttr
->
guid
),
wszGuid
,
MAX_LOAD_STRING
);
wszGuid
[
lstrlenW
(
wszGuid
)
-
1
]
=
'\0'
;
AddToTLDataStrW
(
pTLData
,
&
wszGuid
[
1
]);
AddToTLDataStrW
(
pTLData
,
wszCloseBrackets2
);
}
if
(
pTypeAttr
->
typekind
==
TKIND_ALIAS
)
{
if
(
bFirst
)
AddToTLDataStrW
(
pTLData
,
wszOpenBrackets1
);
else
{
AddToTLDataStrW
(
pTLData
,
wszComa
);
AddToTLDataStrW
(
pTLData
,
wszSpace
);
}
bFirst
=
FALSE
;
AddToTLDataStrW
(
pTLData
,
wszPublic
);
}
if
(
!
bFirst
)
{
AddToTLDataStrW
(
pTLData
,
wszCloseBrackets1
);
AddToTLDataStrW
(
pTLData
,
wszNewLine
);
}
}
int
PopulateTree
(
void
)
{
TVINSERTSTRUCT
tvis
;
...
...
@@ -883,6 +926,23 @@ int PopulateTree(void)
case
TKIND_ENUM
:
AddToStrW
(
wszText
,
wszTKIND_ENUM
);
AddToStrW
(
wszText
,
bstrName
);
CreateTypedefHeader
(
pTypeInfo
,
pTypeAttr
,
(
TYPELIB_DATA
*
)(
U
(
tvis
).
item
.
lParam
));
AddToTLDataStrW
((
TYPELIB_DATA
*
)(
U
(
tvis
).
item
.
lParam
),
&
wszTKIND_ENUM
[
lstrlenW
(
wszTKIND_ALIAS
)]);
AddToTLDataStrW
((
TYPELIB_DATA
*
)(
U
(
tvis
).
item
.
lParam
),
wszOpenBrackets3
);
AddToTLDataStrW
((
TYPELIB_DATA
*
)(
U
(
tvis
).
item
.
lParam
),
wszNewLine
);
AddToStrW
(((
TYPELIB_DATA
*
)(
U
(
tvis
).
item
.
lParam
))
->
wszInsertAfter
,
wszCloseBrackets3
);
AddToStrW
(((
TYPELIB_DATA
*
)(
U
(
tvis
).
item
.
lParam
))
->
wszInsertAfter
,
wszSpace
);
AddToStrW
(((
TYPELIB_DATA
*
)(
U
(
tvis
).
item
.
lParam
))
->
wszInsertAfter
,
bstrName
);
AddToStrW
(((
TYPELIB_DATA
*
)(
U
(
tvis
).
item
.
lParam
))
->
wszInsertAfter
,
wszSemicolon
);
AddToStrW
(((
TYPELIB_DATA
*
)(
U
(
tvis
).
item
.
lParam
))
->
wszInsertAfter
,
wszNewLine
);
break
;
case
TKIND_RECORD
:
AddToTLDataStrW
((
TYPELIB_DATA
*
)(
U
(
tvis
).
item
.
lParam
),
wszTKIND_RECORD
);
...
...
@@ -961,6 +1021,13 @@ int PopulateTree(void)
AddToStrW
(
wszText
,
wszSpace
);
AddToStrW
(
wszText
,
bstrName
);
AddToStrW
(
wszText
,
wszAfter
);
CreateTypedefHeader
(
pTypeInfo
,
pTypeAttr
,
(
TYPELIB_DATA
*
)(
U
(
tvis
).
item
.
lParam
));
AddToTLDataStrW
((
TYPELIB_DATA
*
)(
U
(
tvis
).
item
.
lParam
),
&
wszText
[
lstrlenW
(
wszTKIND_ALIAS
)]);
AddToTLDataStrW
((
TYPELIB_DATA
*
)(
U
(
tvis
).
item
.
lParam
),
wszSemicolon
);
AddToTLDataStrW
((
TYPELIB_DATA
*
)(
U
(
tvis
).
item
.
lParam
),
wszNewLine
);
break
;
default:
lstrcpyW
(
wszText
,
bstrName
);
...
...
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