~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/widget/src/photon/nsClipboard.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 
2
 *
 
3
 * The contents of this file are subject to the Mozilla Public
 
4
 * License Version 1.1 (the "License"); you may not use this file
 
5
 * except in compliance with the License. You may obtain a copy of
 
6
 * the License at http://www.mozilla.org/MPL/
 
7
 * 
 
8
 * Software distributed under the License is distributed on an "AS
 
9
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
10
 * implied. See the License for the specific language governing
 
11
 * rights and limitations under the License.
 
12
 * 
 
13
 * The Original Code is mozilla.org code.
 
14
 * 
 
15
 * The Initial Developer of the Original Code is Netscape
 
16
 * Communications Corporation.  Portions created by Netscape are
 
17
 * Copyright (C) 1999-2000 Netscape Communications Corporation.
 
18
 * All Rights Reserved.
 
19
 * 
 
20
 * Contributor(s):
 
21
 *   Stuart Parmenter <pavlov@netscape.com>
 
22
 *   Mike Pinkerton   <pinkerton@netscape.com>
 
23
 */
 
24
 
 
25
#ifndef nsClipboard_h__
 
26
#define nsClipboard_h__
 
27
 
 
28
#include <Pt.h>
 
29
 
 
30
#include "nsIClipboard.h"
 
31
#include "nsITransferable.h"
 
32
#include "nsIClipboardOwner.h"
 
33
#include <nsCOMPtr.h>
 
34
 
 
35
class nsITransferable;
 
36
class nsIClipboardOwner;
 
37
class nsIWidget;
 
38
 
 
39
/**
 
40
 * Native Clipboard wrapper
 
41
 */
 
42
 
 
43
class nsClipboard : public nsIClipboard
 
44
{
 
45
 
 
46
public:
 
47
  nsClipboard();
 
48
  virtual ~nsClipboard();
 
49
 
 
50
  //nsISupports
 
51
  NS_DECL_ISUPPORTS
 
52
 
 
53
  // nsIClipboard
 
54
  NS_DECL_NSICLIPBOARD
 
55
 
 
56
protected:
 
57
  NS_IMETHOD SetNativeClipboardData(PRInt32 aWhichClipboard);
 
58
  NS_IMETHOD GetNativeClipboardData(nsITransferable * aTransferable, 
 
59
                                    PRInt32 aWhichClipboard );
 
60
nsresult GetFormat(const char* aMimeStr, char *format );
 
61
 
 
62
  PRBool  mIgnoreEmptyNotification;
 
63
        inline nsITransferable *GetTransferable(PRInt32 aWhichClipboard);
 
64
 
 
65
private:
 
66
  nsCOMPtr<nsIClipboardOwner> mSelectionOwner;
 
67
  nsCOMPtr<nsIClipboardOwner> mGlobalOwner;
 
68
  nsCOMPtr<nsITransferable>   mSelectionTransferable;
 
69
  nsCOMPtr<nsITransferable>   mGlobalTransferable;
 
70
 
 
71
  // Used for communicating pasted data
 
72
  // from the asynchronous X routines back to a blocking paste:
 
73
  PRBool mBlocking;
 
74
};
 
75
 
 
76
#endif // nsClipboard_h__