Backed out changeset 8517afe50156 (bug 540456) for reftest failures.
[gecko.git] / widget / windows / nsColorPicker.h
blobe0d6efc6c6372984f09002baed68e4c48c423858
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsColorPicker_h__
8 #define nsColorPicker_h__
10 #include <windows.h>
11 #include <commdlg.h>
13 #include "nsCOMPtr.h"
14 #include "nsIColorPicker.h"
15 #include "nsString.h"
16 #include "nsThreadUtils.h"
18 class nsIWidget;
20 class AsyncColorChooser :
21 public nsRunnable
23 public:
24 AsyncColorChooser(DWORD aInitialColor, nsIWidget* aParentWidget, nsIColorPickerShownCallback* aCallback);
25 NS_IMETHOD Run() MOZ_OVERRIDE;
27 private:
28 DWORD mInitialColor;
29 nsCOMPtr<nsIWidget> mParentWidget;
30 nsCOMPtr<nsIColorPickerShownCallback> mCallback;
31 nsString mColor;
34 class nsColorPicker :
35 public nsIColorPicker
37 public:
38 nsColorPicker();
39 virtual ~nsColorPicker();
41 NS_DECL_ISUPPORTS
43 NS_IMETHOD Init(nsIDOMWindow* parent, const nsAString& title, const nsAString& aInitialColor);
44 NS_IMETHOD Open(nsIColorPickerShownCallback* aCallback);
46 protected:
47 DWORD mInitialColor;
48 nsCOMPtr<nsIWidget> mParentWidget;
51 #endif // nsColorPicker_h__