ipc/chromium/src/base/base_drag_source.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:e9e99d0f97e3
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_BASE_DRAG_SOURCE_H_
6 #define BASE_BASE_DRAG_SOURCE_H_
7
8 #include <objidl.h>
9
10 #include "base/basictypes.h"
11
12 ///////////////////////////////////////////////////////////////////////////////
13 //
14 // BaseDragSource
15 //
16 // A base IDropSource implementation. Handles notifications sent by an active
17 // drag-drop operation as the user mouses over other drop targets on their
18 // system. This object tells Windows whether or not the drag should continue,
19 // and supplies the appropriate cursors.
20 //
21 class BaseDragSource : public IDropSource {
22 public:
23 BaseDragSource();
24 virtual ~BaseDragSource() { }
25
26 // IDropSource implementation:
27 HRESULT __stdcall QueryContinueDrag(BOOL escape_pressed, DWORD key_state);
28 HRESULT __stdcall GiveFeedback(DWORD effect);
29
30 // IUnknown implementation:
31 HRESULT __stdcall QueryInterface(const IID& iid, void** object);
32 ULONG __stdcall AddRef();
33 ULONG __stdcall Release();
34
35 protected:
36 virtual void OnDragSourceCancel() { }
37 virtual void OnDragSourceDrop() { }
38 virtual void OnDragSourceMove() { }
39
40 private:
41 LONG ref_count_;
42
43 DISALLOW_EVIL_CONSTRUCTORS(BaseDragSource);
44 };
45
46 #endif // BASE_BASE_DRAG_SOURCE_H_

mercurial