xref: /trunk/main/vcl/inc/aqua/aquavclevents.hxx (revision ebfcd9af)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef INCLUDED_AQUAVCLEVENTS_HXX
24 #define INCLUDED_AQUAVCLEVENTS_HXX
25 
26 #include <premac.h>
27 #include <Carbon/Carbon.h>
28 #include <postmac.h>
29 
30 /* Definition of custom OpenOffice.org events.
31 
32    Avoid conflict with Apple defined event class and type
33    definitions by using uppercase letters. Lowercase
34    letter definitions are reserved for Apple!
35  */
36 enum {
37   cOOoSalUserEventClass = 'OOUE'
38 };
39 
40 enum {
41   cOOoSalEventUser = 'UEVT',
42   cOOoSalEventTimer = 'EVTT',
43   cOOoSalEventData = 'EVTD',
44   cOOoSalEventParamTypePtr = 'EPPT'
45 };
46 
47 /* Definition of all necessary EventTypeSpec's */
48 
49 const EventTypeSpec cWindowBoundsChangedEvent = { kEventClassWindow, kEventWindowBoundsChanged };
50 const EventTypeSpec cWindowCloseEvent = { kEventClassWindow, kEventWindowClose };
51 const EventTypeSpec cOOoSalUserEvent = { cOOoSalUserEventClass, cOOoSalEventUser };
52 const EventTypeSpec cOOoSalTimerEvent = { cOOoSalUserEventClass, cOOoSalEventTimer };
53 const EventTypeSpec cWindowActivatedEvent[] = { { kEventClassWindow, kEventWindowActivated },
54                                                 { kEventClassWindow, kEventWindowDeactivated } };
55 const EventTypeSpec cWindowPaintEvent = { kEventClassWindow, kEventWindowPaint };
56 const EventTypeSpec cWindowDrawContentEvent = { kEventClassWindow, kEventWindowDrawContent };
57 
58 const EventTypeSpec cWindowFocusEvent[] = { { kEventClassWindow, kEventWindowFocusAcquired },
59                                             { kEventClassWindow, kEventWindowFocusRelinquish } };
60 
61 const EventTypeSpec cMouseEnterExitEvent[] = { { kEventClassControl, kEventControlTrackingAreaEntered },
62                                                { kEventClassControl, kEventControlTrackingAreaExited } };
63 
64 const EventTypeSpec cMouseEvent[] = { { kEventClassMouse, kEventMouseDown },
65                                       { kEventClassMouse, kEventMouseUp },
66                                       { kEventClassMouse, kEventMouseMoved },
67                                       { kEventClassMouse, kEventMouseDragged } };
68 const EventTypeSpec cMouseWheelMovedEvent = { kEventClassMouse, kEventMouseWheelMoved };
69 const EventTypeSpec cWindowResizeStarted = { kEventClassWindow, kEventWindowResizeStarted };
70 const EventTypeSpec cWindowResizeCompleted = { kEventClassWindow, kEventWindowResizeCompleted };
71 
72 /* Events for native menus */
73 const EventTypeSpec cCommandProcessEvent = { kEventClassCommand, kEventCommandProcess };
74 const EventTypeSpec cMenuPopulateEvent = { kEventClassMenu, kEventMenuPopulate };
75 const EventTypeSpec cMenuClosedEvent = { kEventClassMenu, kEventMenuClosed };
76 const EventTypeSpec cMenuTargetItemEvent = { kEventClassMenu, kEventMenuTargetItem };
77 
78 /* Events for keyboard */
79 const EventTypeSpec cKeyboardRawKeyEvents[] = { { kEventClassKeyboard, kEventRawKeyDown},
80 						{ kEventClassKeyboard, kEventRawKeyUp},
81 						{ kEventClassKeyboard, kEventRawKeyRepeat},
82 						{ kEventClassKeyboard, kEventRawKeyModifiersChanged} };
83 
84 const EventTypeSpec cTextInputEvents[] = { { kEventClassTextInput, kEventTextInputUpdateActiveInputArea},
85                                            { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent},
86                                            { kEventClassTextInput, kEventTextInputOffsetToPos} };
87 
88 /* Events for scrollbar */
89 
90 const EventTypeSpec cAppearanceScrollbarVariantChangedEvent = { kEventClassAppearance, kEventAppearanceScrollBarVariantChanged };
91 
92 #endif // INCLUDED_AQUAVCLEVENTS_HXX
93