ipc/chromium/src/base/base_drag_source.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/ipc/chromium/src/base/base_drag_source.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     1.4 +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
     1.5 +// Use of this source code is governed by a BSD-style license that can be
     1.6 +// found in the LICENSE file.
     1.7 +
     1.8 +#ifndef BASE_BASE_DRAG_SOURCE_H_
     1.9 +#define BASE_BASE_DRAG_SOURCE_H_
    1.10 +
    1.11 +#include <objidl.h>
    1.12 +
    1.13 +#include "base/basictypes.h"
    1.14 +
    1.15 +///////////////////////////////////////////////////////////////////////////////
    1.16 +//
    1.17 +// BaseDragSource
    1.18 +//
    1.19 +//  A base IDropSource implementation. Handles notifications sent by an active
    1.20 +//  drag-drop operation as the user mouses over other drop targets on their
    1.21 +//  system. This object tells Windows whether or not the drag should continue,
    1.22 +//  and supplies the appropriate cursors.
    1.23 +//
    1.24 +class BaseDragSource : public IDropSource {
    1.25 + public:
    1.26 +  BaseDragSource();
    1.27 +  virtual ~BaseDragSource() { }
    1.28 +
    1.29 +  // IDropSource implementation:
    1.30 +  HRESULT __stdcall QueryContinueDrag(BOOL escape_pressed, DWORD key_state);
    1.31 +  HRESULT __stdcall GiveFeedback(DWORD effect);
    1.32 +
    1.33 +  // IUnknown implementation:
    1.34 +  HRESULT __stdcall QueryInterface(const IID& iid, void** object);
    1.35 +  ULONG __stdcall AddRef();
    1.36 +  ULONG __stdcall Release();
    1.37 +
    1.38 + protected:
    1.39 +  virtual void OnDragSourceCancel() { }
    1.40 +  virtual void OnDragSourceDrop() { }
    1.41 +  virtual void OnDragSourceMove() { }
    1.42 +
    1.43 + private:
    1.44 +  LONG ref_count_;
    1.45 +
    1.46 +  DISALLOW_EVIL_CONSTRUCTORS(BaseDragSource);
    1.47 +};
    1.48 +
    1.49 +#endif  // BASE_BASE_DRAG_SOURCE_H_

mercurial