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
9fbd676b
Commit
9fbd676b
authored
Oct 21, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Implement CreateDXGIFactory().
parent
6a517b78
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
199 additions
and
3 deletions
+199
-3
Makefile.in
dlls/dxgi/Makefile.in
+3
-2
dxgi.spec
dlls/dxgi/dxgi.spec
+1
-1
dxgi_main.c
dlls/dxgi/dxgi_main.c
+25
-0
dxgi_private.h
dlls/dxgi/dxgi_private.h
+8
-0
factory.c
dlls/dxgi/factory.c
+162
-0
No files found.
dlls/dxgi/Makefile.in
View file @
9fbd676b
...
...
@@ -4,10 +4,11 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
dxgi.dll
IMPORTLIB
=
dxgi
IMPORTS
=
kernel32
IMPORTS
=
dxguid uuid
kernel32
C_SRCS
=
\
dxgi_main.c
dxgi_main.c
\
factory.c
RC_SRCS
=
version.rc
...
...
dlls/dxgi/dxgi.spec
View file @
9fbd676b
@ st
ub CreateDXGIFactory
@ st
dcall CreateDXGIFactory(ptr ptr)
dlls/dxgi/dxgi_main.c
View file @
9fbd676b
...
...
@@ -37,3 +37,28 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
return
TRUE
;
}
HRESULT
WINAPI
CreateDXGIFactory
(
REFIID
riid
,
void
**
factory
)
{
struct
dxgi_factory
*
object
;
HRESULT
hr
;
FIXME
(
"riid %s, factory %p partial stub!
\n
"
,
debugstr_guid
(
riid
),
factory
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate DXGI factory object memory
\n
"
);
return
E_OUTOFMEMORY
;
}
object
->
vtbl
=
&
dxgi_factory_vtbl
;
object
->
refcount
=
1
;
TRACE
(
"Created IDXGIFactory %p
\n
"
,
object
);
hr
=
IDXGIFactory_QueryInterface
((
IDXGIFactory
*
)
object
,
riid
,
factory
);
IDXGIFactory_Release
((
IDXGIFactory
*
)
object
);
return
hr
;
}
dlls/dxgi/dxgi_private.h
View file @
9fbd676b
...
...
@@ -28,4 +28,12 @@
#include "dxgi.h"
/* IDXGIFactory */
extern
const
struct
IDXGIFactoryVtbl
dxgi_factory_vtbl
;
struct
dxgi_factory
{
const
struct
IDXGIFactoryVtbl
*
vtbl
;
LONG
refcount
;
};
#endif
/* __WINE_DXGI_PRIVATE_H */
dlls/dxgi/factory.c
0 → 100644
View file @
9fbd676b
/*
* Copyright 2008 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
*/
#include "config.h"
#include "wine/port.h"
#include "dxgi_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dxgi
);
/* IUnknown methods */
HRESULT
STDMETHODCALLTYPE
dxgi_factory_QueryInterface
(
IDXGIFactory
*
iface
,
REFIID
riid
,
void
**
object
)
{
TRACE
(
"iface %p, riid %s, object %p
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IDXGIObject
)
||
IsEqualGUID
(
riid
,
&
IID_IDXGIFactory
))
{
IUnknown_AddRef
(
iface
);
*
object
=
iface
;
return
S_OK
;
}
WARN
(
"%s not implemented, returning E_NOINTERFACE
\n
"
,
debugstr_guid
(
riid
));
*
object
=
NULL
;
return
E_NOINTERFACE
;
}
ULONG
STDMETHODCALLTYPE
dxgi_factory_AddRef
(
IDXGIFactory
*
iface
)
{
struct
dxgi_factory
*
This
=
(
struct
dxgi_factory
*
)
iface
;
ULONG
refcount
=
InterlockedIncrement
(
&
This
->
refcount
);
TRACE
(
"%p increasing refcount to %u
\n
"
,
This
,
refcount
);
return
refcount
;
}
ULONG
STDMETHODCALLTYPE
dxgi_factory_Release
(
IDXGIFactory
*
iface
)
{
struct
dxgi_factory
*
This
=
(
struct
dxgi_factory
*
)
iface
;
ULONG
refcount
=
InterlockedDecrement
(
&
This
->
refcount
);
TRACE
(
"%p decreasing refcount to %u
\n
"
,
This
,
refcount
);
if
(
!
refcount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
refcount
;
}
/* IDXGIObject methods */
HRESULT
STDMETHODCALLTYPE
dxgi_factory_SetPrivateData
(
IDXGIFactory
*
iface
,
REFGUID
guid
,
UINT
data_size
,
const
void
*
data
)
{
FIXME
(
"iface %p, guid %s, data_size %u, data %p stub!
\n
"
,
iface
,
debugstr_guid
(
guid
),
data_size
,
data
);
return
E_NOTIMPL
;
}
HRESULT
STDMETHODCALLTYPE
dxgi_factory_SetPrivateDataInterface
(
IDXGIFactory
*
iface
,
REFGUID
guid
,
const
IUnknown
*
object
)
{
FIXME
(
"iface %p, guid %s, object %p stub!
\n
"
,
iface
,
debugstr_guid
(
guid
),
object
);
return
E_NOTIMPL
;
}
HRESULT
STDMETHODCALLTYPE
dxgi_factory_GetPrivateData
(
IDXGIFactory
*
iface
,
REFGUID
guid
,
UINT
*
data_size
,
void
*
data
)
{
FIXME
(
"iface %p, guid %s, data_size %p, data %p stub!
\n
"
,
iface
,
debugstr_guid
(
guid
),
data_size
,
data
);
return
E_NOTIMPL
;
}
HRESULT
STDMETHODCALLTYPE
dxgi_factory_GetParent
(
IDXGIFactory
*
iface
,
REFIID
riid
,
void
**
parent
)
{
FIXME
(
"iface %p, riid %s, parent %p stub!
\n
"
,
iface
,
debugstr_guid
(
riid
),
parent
);
return
E_NOTIMPL
;
}
/* IDXGIFactory methods */
HRESULT
STDMETHODCALLTYPE
dxgi_factory_EnumAdapters
(
IDXGIFactory
*
iface
,
UINT
adapter_idx
,
IDXGIAdapter
**
adapter
)
{
FIXME
(
"iface %p, adapter_idx %u, adapter %p stub!
\n
"
,
iface
,
adapter_idx
,
adapter
);
return
E_NOTIMPL
;
}
HRESULT
STDMETHODCALLTYPE
dxgi_factory_MakeWindowAssociation
(
IDXGIFactory
*
iface
,
HWND
window
,
UINT
flags
)
{
FIXME
(
"iface %p, window %p, flags %#x stub!
\n\n
"
,
iface
,
window
,
flags
);
return
E_NOTIMPL
;
}
HRESULT
STDMETHODCALLTYPE
dxgi_factory_GetWindowAssociation
(
IDXGIFactory
*
iface
,
HWND
*
window
)
{
FIXME
(
"iface %p, window %p stub!
\n
"
,
iface
,
window
);
return
E_NOTIMPL
;
}
HRESULT
STDMETHODCALLTYPE
dxgi_factory_CreateSwapChain
(
IDXGIFactory
*
iface
,
IUnknown
*
device
,
DXGI_SWAP_CHAIN_DESC
*
desc
,
IDXGISwapChain
**
swapchain
)
{
FIXME
(
"iface %p, device %p, desc %p, swapchain %p stub!
\n
"
,
iface
,
device
,
desc
,
swapchain
);
return
E_NOTIMPL
;
}
HRESULT
STDMETHODCALLTYPE
dxgi_factory_CreateSoftwareAdapter
(
IDXGIFactory
*
iface
,
HMODULE
swrast
,
IDXGIAdapter
**
adapter
)
{
FIXME
(
"iface %p, swrast %p, adapter %p stub!
\n
"
,
iface
,
swrast
,
adapter
);
return
E_NOTIMPL
;
}
const
struct
IDXGIFactoryVtbl
dxgi_factory_vtbl
=
{
/* IUnknown methods */
dxgi_factory_QueryInterface
,
dxgi_factory_AddRef
,
dxgi_factory_Release
,
/* IDXGIObject methods */
dxgi_factory_SetPrivateData
,
dxgi_factory_SetPrivateDataInterface
,
dxgi_factory_GetPrivateData
,
dxgi_factory_GetParent
,
/* IDXGIFactory methods */
dxgi_factory_EnumAdapters
,
dxgi_factory_MakeWindowAssociation
,
dxgi_factory_GetWindowAssociation
,
dxgi_factory_CreateSwapChain
,
dxgi_factory_CreateSoftwareAdapter
,
};
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