LibreOffice Module vcl (master) 1
salframeview.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_VCL_INC_OSX_SALFRAMEVIEW_H
21#define INCLUDED_VCL_INC_OSX_SALFRAMEVIEW_H
22
23#include <osx/a11ywrapper.h>
24
25enum class SalEvent;
26
27@interface SalFrameWindow : NSWindow<NSWindowDelegate>
28{
35-(id)initWithSalFrame: (AquaSalFrame*)pFrame;
36-(void)clearLiveResizeTimer;
37-(void)dealloc;
38-(BOOL)canBecomeKeyWindow;
39-(void)displayIfNeeded;
40-(void)windowDidBecomeKey: (NSNotification*)pNotification;
41-(void)windowDidResignKey: (NSNotification*)pNotification;
42-(void)windowDidChangeScreen: (NSNotification*)pNotification;
43-(void)windowDidMove: (NSNotification*)pNotification;
44-(void)windowDidResize: (NSNotification*)pNotification;
45-(void)windowDidMiniaturize: (NSNotification*)pNotification;
46-(void)windowDidDeminiaturize: (NSNotification*)pNotification;
47-(BOOL)windowShouldClose: (NSNotification*)pNotification;
48-(void)windowDidChangeBackingProperties:(NSNotification *)pNotification;
49//-(void)willEncodeRestorableState:(NSCoder*)pCoderState;
50//-(void)didDecodeRestorableState:(NSCoder*)pCoderState;
51//-(void)windowWillEnterVersionBrowser:(NSNotification*)pNotification;
52-(void)dockMenuItemTriggered: (id)sender;
53-(AquaSalFrame*)getSalFrame;
54-(BOOL)containsMouse;
55-(css::uno::Reference < css::accessibility::XAccessibleContext >)accessibleContext;
56
57/* NSDraggingDestination protocol methods
58 */
59-(NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;
60-(NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender;
61-(void)draggingExited:(id <NSDraggingInfo>)sender;
62-(BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;
63-(BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
64-(void)concludeDragOperation:(id <NSDraggingInfo>)sender;
65
66-(void)registerDraggingDestinationHandler:(id)theHandler;
67-(void)unregisterDraggingDestinationHandler:(id)theHandler;
68
69-(void)endExtTextInput;
70-(void)endExtTextInput:(EndExtTextInputFlags)nFlags;
71
72-(void)windowDidResizeWithTimer:(NSTimer *)pTimer;
73
74-(BOOL)isIgnoredWindow;
75
76// NSAccessibilityElement overrides
77-(id)accessibilityApplicationFocusedUIElement;
78-(id)accessibilityFocusedUIElement;
79-(BOOL)accessibilityIsIgnored;
80-(BOOL)isAccessibilityElement;
81
82@end
83
84@interface SalFrameView : NSView <NSTextInputClient>
90 // for NSTextInput/NSTextInputClient
91 NSEvent* mpLastEvent;
95 NSRange mMarkedRange;
101 // #i102807# used by magnify event handler
102 NSTimeInterval mfLastMagnifyTime;
103 float mfMagnifyDeltaSum;
107 NSAttributedString* mpLastMarkedText;
110+(void)unsetMouseFrame: (AquaSalFrame*)pFrame;
111-(id)initWithSalFrame: (AquaSalFrame*)pFrame;
112-(void)dealloc;
113-(AquaSalFrame*)getSalFrame;
114-(BOOL)acceptsFirstResponder;
115-(BOOL)acceptsFirstMouse: (NSEvent *)pEvent;
116-(BOOL)isOpaque;
117-(void)drawRect: (NSRect)aRect;
118-(void)mouseDown: (NSEvent*)pEvent;
119-(void)mouseDragged: (NSEvent*)pEvent;
120-(void)mouseUp: (NSEvent*)pEvent;
121-(void)mouseMoved: (NSEvent*)pEvent;
122-(void)mouseEntered: (NSEvent*)pEvent;
123-(void)mouseExited: (NSEvent*)pEvent;
124-(void)rightMouseDown: (NSEvent*)pEvent;
125-(void)rightMouseDragged: (NSEvent*)pEvent;
126-(void)rightMouseUp: (NSEvent*)pEvent;
127-(void)otherMouseDown: (NSEvent*)pEvent;
128-(void)otherMouseDragged: (NSEvent*)pEvent;
129-(void)otherMouseUp: (NSEvent*)pEvent;
130-(void)scrollWheel: (NSEvent*)pEvent;
131-(void)magnifyWithEvent: (NSEvent*)pEvent;
132-(void)rotateWithEvent: (NSEvent*)pEvent;
133-(void)swipeWithEvent: (NSEvent*)pEvent;
134-(void)keyDown: (NSEvent*)pEvent;
135-(void)flagsChanged: (NSEvent*)pEvent;
136-(void)sendMouseEventToFrame:(NSEvent*)pEvent button:(sal_uInt16)nButton eventtype:(SalEvent)nEvent;
137-(BOOL)sendKeyInputAndReleaseToFrame: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar;
138-(BOOL)sendKeyInputAndReleaseToFrame: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod;
139-(BOOL)sendKeyToFrameDirect: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod;
140-(BOOL)sendSingleCharacter:(NSEvent*)pEvent;
141-(BOOL)handleKeyDownException:(NSEvent*)pEvent;
142-(void)clearLastEvent;
143-(void)clearLastMarkedText;
144/*
145 text action methods
146*/
147-(void)insertText:(id)aString replacementRange:(NSRange)replacementRange;
148-(void)insertTab: (id)aSender;
149-(void)insertBacktab: (id)aSender;
150-(void)moveLeft: (id)aSender;
151-(void)moveLeftAndModifySelection: (id)aSender;
152-(void)moveBackwardAndModifySelection: (id)aSender;
153-(void)moveRight: (id)aSender;
154-(void)moveRightAndModifySelection: (id)aSender;
155-(void)moveForwardAndModifySelection: (id)aSender;
156-(void)moveUp: (id)aSender;
157-(void)moveDown: (id)aSender;
158-(void)moveWordBackward: (id)aSender;
159-(void)moveWordBackwardAndModifySelection: (id)aSender;
160-(void)moveWordLeftAndModifySelection: (id)aSender;
161-(void)moveWordForward: (id)aSender;
162-(void)moveWordForwardAndModifySelection: (id)aSender;
163-(void)moveWordRightAndModifySelection: (id)aSender;
164-(void)moveToEndOfLine: (id)aSender;
165-(void)moveToRightEndOfLine: (id)aSender;
166-(void)moveToLeftEndOfLine: (id)aSender;
167-(void)moveToEndOfLineAndModifySelection: (id)aSender;
168-(void)moveToRightEndOfLineAndModifySelection: (id)aSender;
169-(void)moveToLeftEndOfLineAndModifySelection: (id)aSender;
170-(void)moveToBeginningOfLine: (id)aSender;
171-(void)moveToBeginningOfLineAndModifySelection: (id)aSender;
172-(void)moveToEndOfParagraph: (id)aSender;
173-(void)moveToEndOfParagraphAndModifySelection: (id)aSender;
174-(void)moveToBeginningOfParagraph: (id)aSender;
175-(void)moveToBeginningOfParagraphAndModifySelection: (id)aSender;
176-(void)moveParagraphForward: (id)aSender;
177-(void)moveParagraphForwardAndModifySelection: (id)aSender;
178-(void)moveParagraphBackward: (id)aSender;
179-(void)moveParagraphBackwardAndModifySelection: (id)aSender;
180-(void)moveToEndOfDocument: (id)aSender;
181-(void)scrollToEndOfDocument: (id)aSender;
182-(void)moveToEndOfDocumentAndModifySelection: (id)aSender;
183-(void)moveToBeginningOfDocument: (id)aSender;
184-(void)scrollToBeginningOfDocument: (id)aSender;
185-(void)moveToBeginningOfDocumentAndModifySelection: (id)aSender;
186-(void)insertNewline: (id)aSender;
187-(void)deleteBackward: (id)aSender;
188-(void)deleteForward: (id)aSender;
189-(void)cancelOperation: (id)aSender;
190-(void)deleteBackwardByDecomposingPreviousCharacter: (id)aSender;
191-(void)deleteWordBackward: (id)aSender;
192-(void)deleteWordForward: (id)aSender;
193-(void)deleteToBeginningOfLine: (id)aSender;
194-(void)deleteToEndOfLine: (id)aSender;
195-(void)deleteToBeginningOfParagraph: (id)aSender;
196-(void)deleteToEndOfParagraph: (id)aSender;
197-(void)insertLineBreak: (id)aSender;
198-(void)insertParagraphSeparator: (id)aSender;
199-(void)selectWord: (id)aSender;
200-(void)selectLine: (id)aSender;
201-(void)selectParagraph: (id)aSender;
202-(void)selectAll: (id)aSender;
203-(void)noop: (id)aSender;
204/* set the correct pointer for our view */
205-(void)resetCursorRects;
206-(css::accessibility::XAccessibleContext *)accessibleContext;
207-(id)parentAttribute;
208-(NSWindow*)windowForParent;
209/*
210 Event hook for D&D service.
211
212 A drag operation will be invoked on a NSView using
213 the method 'dragImage'. This method requires the
214 actual mouse event initiating this drag operation.
215 Mouse events can only be received by subclassing
216 NSView and overriding methods like 'mouseDown' etc.
217 hence we implement an event hook here so that the
218 D&D service can register as listener for mouse
219 messages and use the last 'mouseDown' or
220 'mouseDragged' message to initiate the drag
221 operation.
222*/
223-(void)registerMouseEventListener: (id)theListener;
224-(void)unregisterMouseEventListener: (id)theListener;
225
226/* NSDraggingDestination protocol methods
227 */
228-(NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;
229-(NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender;
230-(void)draggingExited:(id <NSDraggingInfo>)sender;
231-(BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;
232-(BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
233-(void)concludeDragOperation:(id <NSDraggingInfo>)sender;
234
235-(void)registerDraggingDestinationHandler:(id)theHandler;
236-(void)unregisterDraggingDestinationHandler:(id)theHandler;
237
238-(void)endExtTextInput;
239-(void)endExtTextInput:(EndExtTextInputFlags)nFlags;
240-(void)deleteTextInputWantsNonRepeatKeyDown;
241
242-(void)insertRegisteredWrapperIntoWrapperRepository;
243-(void)registerWrapper;
244-(void)revokeWrapper;
245
246// NSAccessibilityElement overrides
247-(id)accessibilityAttributeValue:(NSString *)pAttribute;
248-(BOOL)accessibilityIsIgnored;
249-(NSArray *)accessibilityAttributeNames;
250-(BOOL)accessibilityIsAttributeSettable:(NSString *)pAttribute;
251-(NSArray *)accessibilityParameterizedAttributeNames;
252-(BOOL)accessibilitySetOverrideValue:(id)pValue forAttribute:(NSString *)pAttribute;
253-(void)accessibilitySetValue:(id)pValue forAttribute:(NSString *)pAttribute;
254-(id)accessibilityAttributeValue:(NSString *)pAttribute forParameter:(id)pParameter;
255-(id)accessibilityFocusedUIElement;
256-(NSString *)accessibilityActionDescription:(NSString *)pAction;
257-(void)accessibilityPerformAction:(NSString *)pAction;
258-(NSArray *)accessibilityActionNames;
259-(id)accessibilityHitTest:(NSPoint)aPoint;
260-(NSArray *)accessibilityVisibleChildren;
261-(NSArray *)accessibilitySelectedChildren;
262-(NSArray *)accessibilityChildren;
263-(NSArray <id<NSAccessibilityElement>> *)accessibilityChildrenInNavigationOrder;
264
265@end
266
268{
270}
271-(id)initWithParent:(SalFrameView*)pParentView accessibleContext:(::com::sun::star::uno::Reference<::com::sun::star::accessibility::XAccessibleContext>&)rxAccessibleContext;
272-(void)dealloc;
273@end
274
275#endif // INCLUDED_VCL_INC_OSX_SALFRAMEVIEW_H
276
277/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SalFrameView * mpParentView
Definition: salframeview.h:271
BOOL mbNeedChildWrapper
Definition: salframeview.h:90
BOOL mbKeyHandled
Definition: salframeview.h:96
BOOL mbInKeyInput
Definition: salframeview.h:95
AquaSalFrame * mpFrame
Definition: salframeview.h:88
BOOL mbTextInputWantsNonRepeatKeyDown
Definition: salframeview.h:110
id mpMouseEventListener
Definition: salframeview.h:99
float mfMagnifyDeltaSum
Definition: salframeview.h:105
NSAttributedString * mpLastMarkedText
Definition: salframeview.h:109
BOOL mbNeedSpecialKeyHandle
Definition: salframeview.h:94
NSEvent * mpLastSuperEvent
Definition: salframeview.h:101
BOOL mbInEndExtTextInput
Definition: salframeview.h:107
NSRange mSelectedRange
Definition: salframeview.h:98
BOOL mbInCommitMarkedText
Definition: salframeview.h:108
NSTimeInterval mfLastMagnifyTime
Definition: salframeview.h:104
AquaA11yWrapper * mpChildWrapper
Definition: salframeview.h:89
id mDraggingDestinationHandler
Definition: salframeview.h:100
NSRange mMarkedRange
Definition: salframeview.h:97
NSEvent * mpLastEvent
Definition: salframeview.h:93
id mDraggingDestinationHandler
Definition: salframeview.h:31
NSTimer * mpLiveResizeTimer
Definition: salframeview.h:34
BOOL mbInWindowDidResize
Definition: salframeview.h:33
AquaSalFrame * mpFrame
Definition: salframeview.h:30
void SAL_CALL mouseExited(const css::awt::MouseEvent &e) override
void SAL_CALL mouseMoved(const css::awt::MouseEvent &e) override
void SAL_CALL mouseEntered(const css::awt::MouseEvent &e) override
DECL_LISTENERMULTIPLEXER_END void SAL_CALL mouseDragged(const css::awt::MouseEvent &e) override
Reference
const wchar_t *typedef BOOL
SalEvent
Definition: salwtype.hxx:46
sal_uInt16 sal_Unicode
EndExtTextInputFlags
Definition: window.hxx:346