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