xref: /trunk/main/vcl/inc/aqua/aquavclevents.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef INCLUDED_AQUAVCLEVENTS_HXX
28 #define INCLUDED_AQUAVCLEVENTS_HXX
29 
30 #include <premac.h>
31 #include <Carbon/Carbon.h>
32 #include <postmac.h>
33 
34 /* Definition of custom OpenOffice.org events.
35 
36    Avoid conflict with Apple defined event class and type
37    definitions by using uppercase letters. Lowercase
38    letter definitions are reserved for Apple!
39  */
40 enum {
41   cOOoSalUserEventClass = 'OOUE'
42 };
43 
44 enum {
45   cOOoSalEventUser = 'UEVT',
46   cOOoSalEventTimer = 'EVTT',
47   cOOoSalEventData = 'EVTD',
48   cOOoSalEventParamTypePtr = 'EPPT'
49 };
50 
51 /* Definition of all necessary EventTypeSpec's */
52 
53 const EventTypeSpec cWindowBoundsChangedEvent = { kEventClassWindow, kEventWindowBoundsChanged };
54 const EventTypeSpec cWindowCloseEvent = { kEventClassWindow, kEventWindowClose };
55 const EventTypeSpec cOOoSalUserEvent = { cOOoSalUserEventClass, cOOoSalEventUser };
56 const EventTypeSpec cOOoSalTimerEvent = { cOOoSalUserEventClass, cOOoSalEventTimer };
57 const EventTypeSpec cWindowActivatedEvent[] = { { kEventClassWindow, kEventWindowActivated },
58                                                 { kEventClassWindow, kEventWindowDeactivated } };
59 const EventTypeSpec cWindowPaintEvent = { kEventClassWindow, kEventWindowPaint };
60 const EventTypeSpec cWindowDrawContentEvent = { kEventClassWindow, kEventWindowDrawContent };
61 
62 const EventTypeSpec cWindowFocusEvent[] = { { kEventClassWindow, kEventWindowFocusAcquired },
63                                             { kEventClassWindow, kEventWindowFocusRelinquish } };
64 
65 const EventTypeSpec cMouseEnterExitEvent[] = { { kEventClassControl, kEventControlTrackingAreaEntered },
66                                                { kEventClassControl, kEventControlTrackingAreaExited } };
67 
68 const EventTypeSpec cMouseEvent[] = { { kEventClassMouse, kEventMouseDown },
69                                       { kEventClassMouse, kEventMouseUp },
70                                       { kEventClassMouse, kEventMouseMoved },
71                                       { kEventClassMouse, kEventMouseDragged } };
72 const EventTypeSpec cMouseWheelMovedEvent = { kEventClassMouse, kEventMouseWheelMoved };
73 const EventTypeSpec cWindowResizeStarted = { kEventClassWindow, kEventWindowResizeStarted };
74 const EventTypeSpec cWindowResizeCompleted = { kEventClassWindow, kEventWindowResizeCompleted };
75 
76 /* Events for native menus */
77 const EventTypeSpec cCommandProcessEvent = { kEventClassCommand, kEventCommandProcess };
78 const EventTypeSpec cMenuPopulateEvent = { kEventClassMenu, kEventMenuPopulate };
79 const EventTypeSpec cMenuClosedEvent = { kEventClassMenu, kEventMenuClosed };
80 const EventTypeSpec cMenuTargetItemEvent = { kEventClassMenu, kEventMenuTargetItem };
81 
82 /* Events for keyboard */
83 const EventTypeSpec cKeyboardRawKeyEvents[] = { { kEventClassKeyboard, kEventRawKeyDown},
84 						{ kEventClassKeyboard, kEventRawKeyUp},
85 						{ kEventClassKeyboard, kEventRawKeyRepeat},
86 						{ kEventClassKeyboard, kEventRawKeyModifiersChanged} };
87 
88 const EventTypeSpec cTextInputEvents[] = { { kEventClassTextInput, kEventTextInputUpdateActiveInputArea},
89                                            { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent},
90                                            { kEventClassTextInput, kEventTextInputOffsetToPos} };
91 
92 /* Events for scrollbar */
93 
94 const EventTypeSpec cAppearanceScrollbarVariantChangedEvent = { kEventClassAppearance, kEventAppearanceScrollBarVariantChanged };
95 
96 #endif // INCLUDED_AQUAVCLEVENTS_HXX
97