1
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 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/
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.
13
* The Original Code is the Mozilla browser.
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.
20
* Conrad Carlen <ccarlen@netscape.com>
23
#ifndef __EmbedEventHandling__
24
#define __EmbedEventHandling__
26
#include "LAttachment.h"
27
#include "LPeriodical.h"
33
//*****************************************************************************
34
// class CEmbedEventAttachment
36
// Handles events for windows popped up by Gecko which are not LWindows
38
//*****************************************************************************
40
class CEmbedEventAttachment : public LAttachment
44
enum { class_ID = FOUR_CHAR_CODE('GAWA') };
46
CEmbedEventAttachment();
47
virtual ~CEmbedEventAttachment();
50
virtual void ExecuteSelf(MessageT inMessage,
54
Boolean IsAlienGeckoWindow(WindowPtr inMacWindow);
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 ) ;
61
static WindowPtr mLastAlienWindowClicked;
65
//*****************************************************************************
68
// LPeriodical idler which calls Gecko's idling
70
//*****************************************************************************
72
class CEmbedIdler : public LPeriodical
76
virtual ~CEmbedIdler();
79
virtual void SpendTime(const EventRecord& inMacEvent);
83
//*****************************************************************************
84
// class CEmbedRepeater
86
// LPeriodical repeater which calls Gecko's repeaters
88
//*****************************************************************************
90
class CEmbedRepeater : public LPeriodical
94
virtual ~CEmbedRepeater();
97
virtual void SpendTime(const EventRecord& inMacEvent);
101
//*****************************************************************************
102
// Initialization Function - Call at application startup.
103
//*****************************************************************************
105
void InitializeEmbedEventHandling(LApplication* theApplication);
107
#endif // __EmbedEventHandling__