1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
10 #import <Cocoa/Cocoa.h>
15 class TextInputHandler
;
17 } // namespace mozilla
19 // A protocol with some of the methods that ChildView implements. In the distant
20 // past, this protocol was used by embedders: They would create their own NSView
21 // subclass, implement mozView on it, and then embed a Gecko ChildView by adding
22 // it as a subview of this view. This scenario no longer exists.
23 // Now this protocol is mostly just used by TextInputHandler and mozAccessible
24 // in order to communicate with ChildView without seeing the entire ChildView
25 // interface definition.
28 // aHandler is Gecko's default text input handler: It implements the
29 // NSTextInput protocol to handle key events. Don't make aHandler a
30 // strong reference -- that causes a memory leak.
31 - (void)installTextInputHandler
:(mozilla::widget::TextInputHandler
*)aHandler
;
32 - (void)uninstallTextInputHandler
;
34 // access the nsIWidget associated with this view. DOES NOT ADDREF.
37 // called when our corresponding Gecko view goes away
38 - (void)widgetDestroyed
;
40 - (BOOL
)isDragInProgress
;
42 // Checks whether the view is first responder or not
43 - (BOOL
)isFirstResponder
;
45 // Call when you dispatch an event which may cause to open context menu.
46 - (void)maybeInitContextMenuTracking
;
50 // An informal protocol implemented by the NSWindow of the host application.
52 // It's used to prevent re-entrant calls to -makeKeyAndOrderFront: when gecko
53 // focus/activate events propagate out to the embedder's
54 // nsIEmbeddingSiteWindow::SetFocus implementation.
55 @interface
NSObject (mozWindow
)
57 - (BOOL
)suppressMakeKeyFront
;
58 - (void)setSuppressMakeKeyFront
:(BOOL
)inSuppress
;