File: nsIDragSessionOS2.h

package info (click to toggle)
wine-gecko-2.24 2.24%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 740,092 kB
  • ctags: 688,789
  • sloc: cpp: 3,160,639; ansic: 1,619,153; python: 164,084; java: 128,022; asm: 114,527; xml: 69,863; sh: 55,281; makefile: 49,648; perl: 20,454; objc: 2,344; yacc: 2,066; pascal: 995; lex: 982; exp: 449; php: 244; lisp: 228; awk: 211; sed: 61; csh: 21; ada: 16; ruby: 3
file content (70 lines) | stat: -rw-r--r-- 2,953 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/**
 * nsIDragSessionOS2 encapsulates support for OS/2 dragover/drop events,
 * i.e. operations where Mozilla is the target of a drag (nsIDragService
 * handles source operations).  Its public methods correspond to the d&d
 * messages a PM window receives.  Its protected methods recast native
 * data as nsITransferable flavors during drag-enter and drop events.
 *
 * nsIDragSessionOS2 supports these native formats:  WPS Url objects,
 * files, the contents of files (Alt-drop), and text from DragText.
 * Data is presented to Mozilla as URI-text, HTML, and/or plain-text.
 * Only single-item native drops are supported.  If the dropped file
 * or text does not exist yet, nsIDragSessionOS2 will have the source
 * render the data asynchronously.
 */

#ifndef nsIDragSessionOS2_h__
#define nsIDragSessionOS2_h__

#include "nsISupports.h"

#define INCL_PM
#include <os2.h>

#define NS_IDRAGSESSIONOS2_IID_STR "bc4258b8-33ce-4624-adcb-4b62bb5164c0"
#define NS_IDRAGSESSIONOS2_IID \
  { 0xbc4258b8, 0x33ce, 0x4624, { 0xad, 0xcb, 0x4b, 0x62, 0xbb, 0x51, 0x64, 0xc0 } }

class nsIDragSessionOS2 : public nsISupports
{
public:
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDRAGSESSIONOS2_IID)

  /** the dragFlags returned by most public methods fall into two groups */

  /** Mozilla's dragover status */
  enum { DND_NONE       = 0 };                                     
  enum { DND_NATIVEDRAG = 1 };                                     
  enum { DND_MOZDRAG    = 2 };                                     
  enum { DND_INDROP     = 4 };                                     
  enum { DND_DRAGSTATUS = DND_NATIVEDRAG | DND_MOZDRAG | DND_INDROP };

  /** tasks the caller should perform */
  enum { DND_DISPATCHENTEREVENT = 16 };
  enum { DND_DISPATCHEVENT      = 32 };
  enum { DND_GETDRAGOVERRESULT  = 64 };
  enum { DND_EXITSESSION        = 128 };

  NS_IMETHOD DragOverMsg(PDRAGINFO pdinfo, MRESULT &mr, uint32_t* dragFlags) = 0;
  NS_IMETHOD GetDragoverResult(MRESULT& mr) = 0;
  NS_IMETHOD DragLeaveMsg(PDRAGINFO pdinfo, uint32_t* dragFlags) = 0;
  NS_IMETHOD DropHelpMsg(PDRAGINFO pdinfo, uint32_t* dragFlags) = 0;
  NS_IMETHOD ExitSession(uint32_t* dragFlags) = 0;
  NS_IMETHOD DropMsg(PDRAGINFO pdinfo, HWND hwnd, uint32_t* dragFlags) = 0;
  NS_IMETHOD RenderCompleteMsg(PDRAGTRANSFER pdxfer, USHORT usResult, uint32_t* dragFlags) = 0;

protected:
  NS_IMETHOD NativeDragEnter(PDRAGINFO pdinfo) = 0;
  NS_IMETHOD NativeDrop(PDRAGINFO pdinfo, HWND hwnd, bool* rendering) = 0;
  NS_IMETHOD NativeRenderComplete(PDRAGTRANSFER pdxfer, USHORT usResult) = 0;
  NS_IMETHOD NativeDataToTransferable( PCSZ pszText, PCSZ pszTitle, bool isUrl) = 0;
};

NS_DEFINE_STATIC_IID_ACCESSOR(nsIDragSessionOS2, NS_IDRAGSESSIONOS2_IID)

#endif  // nsIDragSessionOS2_h__