bump product version to 6.4.0.3
[LibreOffice.git] / vcl / inc / osx / salframeview.h
blob36537f3db9587129667c6e3efcfc75f53ba26d1b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_VCL_INC_OSX_SALFRAMEVIEW_H
21 #define INCLUDED_VCL_INC_OSX_SALFRAMEVIEW_H
23 #include <osx/a11ywrapper.h>
25 enum class SalEvent;
27 @interface SalFrameWindow : NSWindow<NSWindowDelegate>
29 AquaSalFrame* mpFrame;
30 id mDraggingDestinationHandler;
32 -(id)initWithSalFrame: (AquaSalFrame*)pFrame;
33 -(BOOL)canBecomeKeyWindow;
34 -(void)displayIfNeeded;
35 -(void)windowDidBecomeKey: (NSNotification*)pNotification;
36 -(void)windowDidResignKey: (NSNotification*)pNotification;
37 -(void)windowDidChangeScreen: (NSNotification*)pNotification;
38 -(void)windowDidMove: (NSNotification*)pNotification;
39 -(void)windowDidResize: (NSNotification*)pNotification;
40 -(void)windowDidMiniaturize: (NSNotification*)pNotification;
41 -(void)windowDidDeminiaturize: (NSNotification*)pNotification;
42 -(BOOL)windowShouldClose: (NSNotification*)pNotification;
43 //-(void)willEncodeRestorableState:(NSCoder*)pCoderState;
44 //-(void)didDecodeRestorableState:(NSCoder*)pCoderState;
45 //-(void)windowWillEnterVersionBrowser:(NSNotification*)pNotification;
46 -(void)dockMenuItemTriggered: (id)sender;
47 -(AquaSalFrame*)getSalFrame;
48 -(BOOL)containsMouse;
49 -(css::uno::Reference < css::accessibility::XAccessibleContext >)accessibleContext;
51 /* NSDraggingDestination protocol methods
53 -(NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;
54 -(NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender;
55 -(void)draggingExited:(id <NSDraggingInfo>)sender;
56 -(BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;
57 -(BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
58 -(void)concludeDragOperation:(id <NSDraggingInfo>)sender;
60 -(void)registerDraggingDestinationHandler:(id)theHandler;
61 -(void)unregisterDraggingDestinationHandler:(id)theHandler;
62 @end
64 @interface SalFrameView : AquaA11yWrapper <NSTextInputClient>
66 AquaSalFrame* mpFrame;
68 // for NSTextInput/NSTextInputClient
69 NSEvent* mpLastEvent;
70 BOOL mbNeedSpecialKeyHandle;
71 BOOL mbInKeyInput;
72 BOOL mbKeyHandled;
73 NSRange mMarkedRange;
74 NSRange mSelectedRange;
75 id mpMouseEventListener;
76 id mDraggingDestinationHandler;
77 NSEvent* mpLastSuperEvent;
79 // #i102807# used by magnify event handler
80 NSTimeInterval mfLastMagnifyTime;
81 float mfMagnifyDeltaSum;
83 +(void)unsetMouseFrame: (AquaSalFrame*)pFrame;
84 -(id)initWithSalFrame: (AquaSalFrame*)pFrame;
85 -(AquaSalFrame*)getSalFrame;
86 -(BOOL)acceptsFirstResponder;
87 -(BOOL)acceptsFirstMouse: (NSEvent *)pEvent;
88 -(BOOL)isOpaque;
89 -(void)drawRect: (NSRect)aRect;
90 -(void)mouseDown: (NSEvent*)pEvent;
91 -(void)mouseDragged: (NSEvent*)pEvent;
92 -(void)mouseUp: (NSEvent*)pEvent;
93 -(void)mouseMoved: (NSEvent*)pEvent;
94 -(void)mouseEntered: (NSEvent*)pEvent;
95 -(void)mouseExited: (NSEvent*)pEvent;
96 -(void)rightMouseDown: (NSEvent*)pEvent;
97 -(void)rightMouseDragged: (NSEvent*)pEvent;
98 -(void)rightMouseUp: (NSEvent*)pEvent;
99 -(void)otherMouseDown: (NSEvent*)pEvent;
100 -(void)otherMouseDragged: (NSEvent*)pEvent;
101 -(void)otherMouseUp: (NSEvent*)pEvent;
102 -(void)scrollWheel: (NSEvent*)pEvent;
103 -(void)magnifyWithEvent: (NSEvent*)pEvent;
104 -(void)rotateWithEvent: (NSEvent*)pEvent;
105 -(void)swipeWithEvent: (NSEvent*)pEvent;
106 -(void)keyDown: (NSEvent*)pEvent;
107 -(void)flagsChanged: (NSEvent*)pEvent;
108 -(void)sendMouseEventToFrame:(NSEvent*)pEvent button:(sal_uInt16)nButton eventtype:(SalEvent)nEvent;
109 -(BOOL)sendKeyInputAndReleaseToFrame: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar;
110 -(BOOL)sendKeyInputAndReleaseToFrame: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod;
111 -(BOOL)sendKeyToFrameDirect: (sal_uInt16)nKeyCode character: (sal_Unicode)aChar modifiers: (unsigned int)nMod;
112 -(BOOL)sendSingleCharacter:(NSEvent*)pEvent;
113 -(BOOL)handleKeyDownException:(NSEvent*)pEvent;
114 -(void)clearLastEvent;
116 text action methods
118 -(void)insertText:(id)aString replacementRange:(NSRange)replacementRange;
119 -(void)insertTab: (id)aSender;
120 -(void)insertBacktab: (id)aSender;
121 -(void)moveLeft: (id)aSender;
122 -(void)moveLeftAndModifySelection: (id)aSender;
123 -(void)moveBackwardAndModifySelection: (id)aSender;
124 -(void)moveRight: (id)aSender;
125 -(void)moveRightAndModifySelection: (id)aSender;
126 -(void)moveForwardAndModifySelection: (id)aSender;
127 -(void)moveUp: (id)aSender;
128 -(void)moveDown: (id)aSender;
129 -(void)moveWordBackward: (id)aSender;
130 -(void)moveWordBackwardAndModifySelection: (id)aSender;
131 -(void)moveWordLeftAndModifySelection: (id)aSender;
132 -(void)moveWordForward: (id)aSender;
133 -(void)moveWordForwardAndModifySelection: (id)aSender;
134 -(void)moveWordRightAndModifySelection: (id)aSender;
135 -(void)moveToEndOfLine: (id)aSender;
136 -(void)moveToRightEndOfLine: (id)aSender;
137 -(void)moveToLeftEndOfLine: (id)aSender;
138 -(void)moveToEndOfLineAndModifySelection: (id)aSender;
139 -(void)moveToRightEndOfLineAndModifySelection: (id)aSender;
140 -(void)moveToLeftEndOfLineAndModifySelection: (id)aSender;
141 -(void)moveToBeginningOfLine: (id)aSender;
142 -(void)moveToBeginningOfLineAndModifySelection: (id)aSender;
143 -(void)moveToEndOfParagraph: (id)aSender;
144 -(void)moveToEndOfParagraphAndModifySelection: (id)aSender;
145 -(void)moveToBeginningOfParagraph: (id)aSender;
146 -(void)moveToBeginningOfParagraphAndModifySelection: (id)aSender;
147 -(void)moveParagraphForward: (id)aSender;
148 -(void)moveParagraphForwardAndModifySelection: (id)aSender;
149 -(void)moveParagraphBackward: (id)aSender;
150 -(void)moveParagraphBackwardAndModifySelection: (id)aSender;
151 -(void)moveToEndOfDocument: (id)aSender;
152 -(void)scrollToEndOfDocument: (id)aSender;
153 -(void)moveToEndOfDocumentAndModifySelection: (id)aSender;
154 -(void)moveToBeginningOfDocument: (id)aSender;
155 -(void)scrollToBeginningOfDocument: (id)aSender;
156 -(void)moveToBeginningOfDocumentAndModifySelection: (id)aSender;
157 -(void)insertNewline: (id)aSender;
158 -(void)deleteBackward: (id)aSender;
159 -(void)deleteForward: (id)aSender;
160 -(void)cancelOperation: (id)aSender;
161 -(void)deleteBackwardByDecomposingPreviousCharacter: (id)aSender;
162 -(void)deleteWordBackward: (id)aSender;
163 -(void)deleteWordForward: (id)aSender;
164 -(void)deleteToBeginningOfLine: (id)aSender;
165 -(void)deleteToEndOfLine: (id)aSender;
166 -(void)deleteToBeginningOfParagraph: (id)aSender;
167 -(void)deleteToEndOfParagraph: (id)aSender;
168 -(void)insertLineBreak: (id)aSender;
169 -(void)insertParagraphSeparator: (id)aSender;
170 -(void)selectWord: (id)aSender;
171 -(void)selectLine: (id)aSender;
172 -(void)selectParagraph: (id)aSender;
173 -(void)selectAll: (id)aSender;
174 -(void)noop: (id)aSender;
175 /* set the correct pointer for our view */
176 -(void)resetCursorRects;
177 -(css::accessibility::XAccessibleContext *)accessibleContext;
178 -(id)parentAttribute;
179 -(NSWindow*)windowForParent;
181 Event hook for D&D service.
183 A drag operation will be invoked on a NSView using
184 the method 'dragImage'. This method requires the
185 actual mouse event initiating this drag operation.
186 Mouse events can only be received by subclassing
187 NSView and overriding methods like 'mouseDown' etc.
188 hence we implement an event hook here so that the
189 D&D service can register as listener for mouse
190 messages and use the last 'mouseDown' or
191 'mouseDragged' message to initiate the drag
192 operation.
194 -(void)registerMouseEventListener: (id)theListener;
195 -(void)unregisterMouseEventListener: (id)theListener;
197 /* NSDraggingDestination protocol methods
199 -(NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;
200 -(NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender;
201 -(void)draggingExited:(id <NSDraggingInfo>)sender;
202 -(BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;
203 -(BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
204 -(void)concludeDragOperation:(id <NSDraggingInfo>)sender;
206 -(void)registerDraggingDestinationHandler:(id)theHandler;
207 -(void)unregisterDraggingDestinationHandler:(id)theHandler;
209 @end
211 #endif // INCLUDED_VCL_INC_OSX_SALFRAMEVIEW_H
213 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */