Use intptr_t to represent window IDs on all platforms.
Previously void* was used on windows which makes it harder to work with the IDs in cross-platform code. R=alexeypa@chromium.org Review URL: https://webrtc-codereview.appspot.com/1672004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4237 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
508a84b255
commit
a590b41c9a
@ -22,11 +22,7 @@ namespace webrtc {
|
|||||||
|
|
||||||
class WindowCapturer : public DesktopCapturer {
|
class WindowCapturer : public DesktopCapturer {
|
||||||
public:
|
public:
|
||||||
#if defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
|
typedef intptr_t WindowId;
|
||||||
typedef unsigned int WindowId;
|
|
||||||
#elif defined(WEBRTC_WIN)
|
|
||||||
typedef void* WindowId;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct Window {
|
struct Window {
|
||||||
WindowId id;
|
WindowId id;
|
||||||
|
@ -64,7 +64,7 @@ BOOL CALLBACK WindowsEnumerationHandler(HWND hwnd, LPARAM param) {
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
WindowCapturer::Window window;
|
WindowCapturer::Window window;
|
||||||
window.id = hwnd;
|
window.id = reinterpret_cast<WindowCapturer::WindowId>(hwnd);
|
||||||
|
|
||||||
const size_t kTitleLength = 500;
|
const size_t kTitleLength = 500;
|
||||||
WCHAR window_title[kTitleLength];
|
WCHAR window_title[kTitleLength];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user