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

« back to all changes in this revision

Viewing changes to mozilla/embedding/browser/powerplant/source/EmbedEventHandling.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: IDL; tab-width: 4; 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 the Mozilla browser.
 
14
 * 
 
15
 * The Initial Developer of the Original Code is Netscape
 
16
 * Communications, Inc.  Portions created by Netscape are
 
17
 * Copyright (C) 1999, Mozilla.  All Rights Reserved.
 
18
 * 
 
19
 * Contributor(s):
 
20
 *   Conrad Carlen <ccarlen@netscape.com>
 
21
 */
 
22
 
 
23
#ifndef __EmbedEventHandling__
 
24
#define __EmbedEventHandling__
 
25
 
 
26
#include "LAttachment.h"
 
27
#include "LPeriodical.h"
 
28
 
 
29
class nsIWidget;
 
30
class nsIEventSink;
 
31
 
 
32
 
 
33
//*****************************************************************************
 
34
// class CEmbedEventAttachment
 
35
//
 
36
// Handles events for windows popped up by Gecko which are not LWindows
 
37
//
 
38
//*****************************************************************************   
 
39
 
 
40
class   CEmbedEventAttachment : public LAttachment
 
41
{
 
42
public:
 
43
 
 
44
        enum { class_ID = FOUR_CHAR_CODE('GAWA') };
 
45
                                
 
46
                                                        CEmbedEventAttachment();        
 
47
        virtual                                 ~CEmbedEventAttachment();
 
48
        
 
49
        // LAttachment
 
50
        virtual void                ExecuteSelf(MessageT                inMessage,
 
51
                                            void*                       ioParam);
 
52
                                                                                              
 
53
protected:
 
54
    Boolean                     IsAlienGeckoWindow(WindowPtr inMacWindow);
 
55
  
 
56
    // utility routines for getting the toplevel widget and event sink
 
57
    // stashed in the properties of gecko windows.
 
58
    static void GetWindowEventSink ( WindowPtr aWindow, nsIEventSink** outSink ) ;
 
59
    static void GetTopWidget ( WindowPtr aWindow, nsIWidget** outWidget ) ;
 
60
 
 
61
    static WindowPtr            mLastAlienWindowClicked;
 
62
};
 
63
 
 
64
 
 
65
//*****************************************************************************
 
66
// class CEmbedIdler
 
67
//
 
68
// LPeriodical idler which calls Gecko's idling
 
69
//
 
70
//*****************************************************************************   
 
71
 
 
72
class CEmbedIdler : public LPeriodical
 
73
{
 
74
public:
 
75
                                CEmbedIdler();
 
76
    virtual                     ~CEmbedIdler();
 
77
  
 
78
  // LPeriodical                      
 
79
        virtual void                    SpendTime(const EventRecord& inMacEvent);
 
80
};
 
81
 
 
82
 
 
83
//*****************************************************************************
 
84
// class CEmbedRepeater
 
85
//
 
86
// LPeriodical repeater which calls Gecko's repeaters
 
87
//
 
88
//*****************************************************************************   
 
89
 
 
90
class CEmbedRepeater : public LPeriodical
 
91
{
 
92
public:
 
93
                                CEmbedRepeater();
 
94
    virtual                     ~CEmbedRepeater();
 
95
  
 
96
  // LPeriodical                      
 
97
        virtual void                    SpendTime(const EventRecord& inMacEvent);
 
98
};
 
99
 
 
100
 
 
101
//*****************************************************************************
 
102
// Initialization Function - Call at application startup. 
 
103
//*****************************************************************************
 
104
 
 
105
void InitializeEmbedEventHandling(LApplication* theApplication);   
 
106
 
 
107
#endif // __EmbedEventHandling__