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