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