2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
1998-04-14 00:24:54 +04:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* The contents of this file are subject to the Netscape Public License
|
|
|
|
* Version 1.1 (the "License"); you may not use this file except in
|
|
|
|
* compliance with the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/NPL/
|
1998-04-14 00:24:54 +04:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
1998-04-14 00:24:54 +04:00
|
|
|
*
|
1999-11-06 06:40:37 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 06:40:37 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the NPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the NPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1998-04-14 00:24:54 +04:00
|
|
|
|
|
|
|
#ifndef nsGUIEvent_h__
|
|
|
|
#define nsGUIEvent_h__
|
|
|
|
|
|
|
|
#include "nsPoint.h"
|
|
|
|
#include "nsRect.h"
|
2001-07-16 06:40:48 +04:00
|
|
|
#include "nsEvent.h"
|
2001-04-17 09:52:11 +04:00
|
|
|
#include "nsHashtable.h"
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2000-08-18 01:43:26 +04:00
|
|
|
// nsIDOMEvent contains a long enum which includes a member called ERROR,
|
|
|
|
// which conflicts with something that Windows defines somewhere.
|
|
|
|
// So, undefine it:
|
|
|
|
#ifdef WIN32
|
|
|
|
#undef ERROR
|
|
|
|
#endif
|
|
|
|
#include "nsIDOMKeyEvent.h"
|
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
class nsIRenderingContext;
|
1999-09-28 05:31:41 +04:00
|
|
|
class nsIRegion;
|
1998-04-14 00:24:54 +04:00
|
|
|
class nsIWidget;
|
1998-10-07 23:49:36 +04:00
|
|
|
class nsIMenuItem;
|
2001-04-01 05:01:33 +04:00
|
|
|
class nsIAccessible;
|
2001-04-17 14:02:11 +04:00
|
|
|
class nsIContent;
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-04-14 04:31:59 +04:00
|
|
|
/**
|
2001-07-16 06:40:48 +04:00
|
|
|
* Return status for event processors, nsEventStatus, is defined in
|
|
|
|
* nsEvent.h.
|
1998-04-14 00:24:54 +04:00
|
|
|
*/
|
|
|
|
|
2000-03-09 04:54:14 +03:00
|
|
|
/**
|
|
|
|
* sizemode is an adjunct to widget size
|
|
|
|
*/
|
|
|
|
enum nsSizeMode {
|
|
|
|
nsSizeMode_Normal = 0,
|
|
|
|
nsSizeMode_Minimized,
|
|
|
|
nsSizeMode_Maximized
|
|
|
|
};
|
|
|
|
|
2000-04-02 02:08:47 +04:00
|
|
|
/**
|
|
|
|
* different types of (top-level) window z-level positioning
|
|
|
|
*/
|
|
|
|
enum nsWindowZ {
|
|
|
|
nsWindowZTop = 0, // on top
|
|
|
|
nsWindowZBottom, // on bottom
|
|
|
|
nsWindowZRelative // just below some specified widget
|
|
|
|
};
|
|
|
|
|
1998-04-14 04:31:59 +04:00
|
|
|
/**
|
1998-07-23 06:55:33 +04:00
|
|
|
* General event
|
1998-04-14 04:31:59 +04:00
|
|
|
*/
|
|
|
|
|
1998-07-23 06:55:33 +04:00
|
|
|
struct nsEvent {
|
|
|
|
/// See event struct types
|
|
|
|
PRUint8 eventStructType;
|
|
|
|
/// See GUI MESSAGES,
|
1998-04-15 01:33:43 +04:00
|
|
|
PRUint32 message;
|
1999-06-09 11:38:26 +04:00
|
|
|
/// in widget relative coordinates, modified to be relative to current view in layout.
|
1998-07-23 06:55:33 +04:00
|
|
|
nsPoint point;
|
1999-06-09 11:38:26 +04:00
|
|
|
// in widget relative coordinates, not modified by layout code.
|
|
|
|
nsPoint refPoint;
|
1998-07-23 06:55:33 +04:00
|
|
|
/// elapsed time, in milliseconds, from the time the system was started to the time the message was created
|
1999-07-19 23:54:34 +04:00
|
|
|
PRUint32 time;
|
|
|
|
// flags to hold event flow stage and capture/bubble cancellation status
|
|
|
|
PRUint32 flags;
|
2000-06-20 04:44:55 +04:00
|
|
|
// flags for indicating more event state for Mozilla applications.
|
|
|
|
PRUint32 internalAppFlags;
|
2001-04-17 09:52:11 +04:00
|
|
|
// additional type info for user defined events
|
|
|
|
nsHashKey* userType;
|
1998-07-23 06:55:33 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* General graphic user interface event
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct nsGUIEvent : public nsEvent {
|
1998-04-15 01:33:43 +04:00
|
|
|
/// Originator of the event
|
|
|
|
nsIWidget* widget;
|
|
|
|
/// Internal platform specific message.
|
|
|
|
void* nativeMsg;
|
1998-04-14 00:24:54 +04:00
|
|
|
};
|
|
|
|
|
2001-11-02 07:49:07 +03:00
|
|
|
/**
|
|
|
|
* Script error event
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct nsScriptErrorEvent : public nsEvent {
|
|
|
|
PRInt32 lineNr;
|
|
|
|
const PRUnichar* errorMsg;
|
|
|
|
const PRUnichar* fileName;
|
|
|
|
};
|
|
|
|
|
1998-04-14 04:31:59 +04:00
|
|
|
/**
|
|
|
|
* Window resize event
|
|
|
|
*/
|
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
struct nsSizeEvent : public nsGUIEvent {
|
1998-11-05 00:43:47 +03:00
|
|
|
/// x,y width, height in pixels (client area)
|
1998-04-15 01:33:43 +04:00
|
|
|
nsRect *windowSize;
|
1998-11-05 00:43:47 +03:00
|
|
|
/// width of entire window (in pixels)
|
|
|
|
PRInt32 mWinWidth;
|
|
|
|
/// height of entire window (in pixels)
|
|
|
|
PRInt32 mWinHeight;
|
1998-04-14 00:24:54 +04:00
|
|
|
};
|
|
|
|
|
2000-03-09 04:54:14 +03:00
|
|
|
/**
|
|
|
|
* Window size mode event
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct nsSizeModeEvent : public nsGUIEvent {
|
|
|
|
|
|
|
|
nsSizeMode mSizeMode;
|
|
|
|
};
|
|
|
|
|
2000-04-02 02:08:47 +04:00
|
|
|
/**
|
|
|
|
* Window z-level event
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct nsZLevelEvent : public nsGUIEvent {
|
|
|
|
|
|
|
|
nsWindowZ mPlacement;
|
|
|
|
nsIWidget *mReqBelow, // widget we request being below, if any
|
|
|
|
*mActualBelow; // widget to be below, returned by handler
|
|
|
|
PRBool mImmediate, // handler should make changes immediately
|
|
|
|
mAdjusted; // handler changed placement
|
|
|
|
};
|
|
|
|
|
1998-04-14 04:31:59 +04:00
|
|
|
/**
|
|
|
|
* Window repaint event
|
|
|
|
*/
|
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
struct nsPaintEvent : public nsGUIEvent {
|
1998-04-15 01:33:43 +04:00
|
|
|
/// Context to paint in.
|
1998-04-14 00:24:54 +04:00
|
|
|
nsIRenderingContext *renderingContext;
|
1999-09-28 05:31:41 +04:00
|
|
|
/// area to paint (should be used instead of rect)
|
|
|
|
nsIRegion *region;
|
1998-04-15 01:33:43 +04:00
|
|
|
/// x,y, width, height in pixels of area to paint
|
|
|
|
nsRect *rect;
|
1998-04-14 00:24:54 +04:00
|
|
|
};
|
|
|
|
|
1998-04-14 04:31:59 +04:00
|
|
|
/**
|
|
|
|
* Scrollbar event
|
|
|
|
*/
|
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
struct nsScrollbarEvent : public nsGUIEvent {
|
1998-04-15 01:33:43 +04:00
|
|
|
/// ranges between scrollbar 0 and (maxRange - thumbSize). See nsIScrollbar
|
|
|
|
PRUint32 position;
|
1998-04-14 00:24:54 +04:00
|
|
|
};
|
|
|
|
|
2000-06-23 09:15:04 +04:00
|
|
|
struct nsScrollPortEvent : public nsGUIEvent {
|
|
|
|
enum orientType {
|
|
|
|
vertical = 0,
|
|
|
|
horizontal = 1,
|
|
|
|
both = 2
|
|
|
|
};
|
|
|
|
|
|
|
|
orientType orient;
|
|
|
|
};
|
1998-04-17 04:16:11 +04:00
|
|
|
|
1998-06-24 01:54:43 +04:00
|
|
|
struct nsInputEvent : public nsGUIEvent {
|
landing keyEvent_19991004_BRANCH
bugs # see the log of the check in into branch
author/reviewer:
mozilla/layout/base/src/nsRangeList.cpp brade/mjudge
mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp brade/ftang
mozilla/layout/events/src/nsDOMEvent.cpp brade/joki
mozilla/layout/events/src/nsEventStateManager.cpp brade/joki
mozilla/widget/public/nsGUIEvent.h akkana/ftang
mozilla/widget/src/windows/nsWindow.cpp ftang/mjudge
mozilla/widget/src/windows/nsWindow.h ftang/mjudge
mozilla/widget/src/mac/nsTextAreaWidget.cpp brade/ftang
mozilla/widget/src/mac/nsMacEventHandler.cpp brade/simon
mozilla/widget/src/xpwidgets/nsKeyBindMgr.cpp brade/ftang
mozilla/widget/src/gtk/nsGtkEventHandler.cpp akkana/?
mozilla/widget/src/gtk/nsWidget.cpp erik/ftang
mozilla/layout/xul/base/src/nsTreeCellFrame.cpp brade/ftang
mozilla/editor/base/nsEditorEventListeners.cpp brade/akkana
mozilla/editor/base/nsHTMLEditor.cpp brade/akkana
mozilla/rdf/content/src/nsXULKeyListener.cpp ftang/saari
fix the master bug- 15693
fix at least, but not limited to, the following bugs
10158,11956,6053,9333,10901,14348,6449,11845,13016,14410,15657,15307,15842,13856
1999-10-14 22:27:01 +04:00
|
|
|
/// PR_TRUE indicates the shift key is down
|
1998-05-08 18:54:09 +04:00
|
|
|
PRBool isShift;
|
landing keyEvent_19991004_BRANCH
bugs # see the log of the check in into branch
author/reviewer:
mozilla/layout/base/src/nsRangeList.cpp brade/mjudge
mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp brade/ftang
mozilla/layout/events/src/nsDOMEvent.cpp brade/joki
mozilla/layout/events/src/nsEventStateManager.cpp brade/joki
mozilla/widget/public/nsGUIEvent.h akkana/ftang
mozilla/widget/src/windows/nsWindow.cpp ftang/mjudge
mozilla/widget/src/windows/nsWindow.h ftang/mjudge
mozilla/widget/src/mac/nsTextAreaWidget.cpp brade/ftang
mozilla/widget/src/mac/nsMacEventHandler.cpp brade/simon
mozilla/widget/src/xpwidgets/nsKeyBindMgr.cpp brade/ftang
mozilla/widget/src/gtk/nsGtkEventHandler.cpp akkana/?
mozilla/widget/src/gtk/nsWidget.cpp erik/ftang
mozilla/layout/xul/base/src/nsTreeCellFrame.cpp brade/ftang
mozilla/editor/base/nsEditorEventListeners.cpp brade/akkana
mozilla/editor/base/nsHTMLEditor.cpp brade/akkana
mozilla/rdf/content/src/nsXULKeyListener.cpp ftang/saari
fix the master bug- 15693
fix at least, but not limited to, the following bugs
10158,11956,6053,9333,10901,14348,6449,11845,13016,14410,15657,15307,15842,13856
1999-10-14 22:27:01 +04:00
|
|
|
/// PR_TRUE indicates the control key is down
|
1998-05-08 18:54:09 +04:00
|
|
|
PRBool isControl;
|
landing keyEvent_19991004_BRANCH
bugs # see the log of the check in into branch
author/reviewer:
mozilla/layout/base/src/nsRangeList.cpp brade/mjudge
mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp brade/ftang
mozilla/layout/events/src/nsDOMEvent.cpp brade/joki
mozilla/layout/events/src/nsEventStateManager.cpp brade/joki
mozilla/widget/public/nsGUIEvent.h akkana/ftang
mozilla/widget/src/windows/nsWindow.cpp ftang/mjudge
mozilla/widget/src/windows/nsWindow.h ftang/mjudge
mozilla/widget/src/mac/nsTextAreaWidget.cpp brade/ftang
mozilla/widget/src/mac/nsMacEventHandler.cpp brade/simon
mozilla/widget/src/xpwidgets/nsKeyBindMgr.cpp brade/ftang
mozilla/widget/src/gtk/nsGtkEventHandler.cpp akkana/?
mozilla/widget/src/gtk/nsWidget.cpp erik/ftang
mozilla/layout/xul/base/src/nsTreeCellFrame.cpp brade/ftang
mozilla/editor/base/nsEditorEventListeners.cpp brade/akkana
mozilla/editor/base/nsHTMLEditor.cpp brade/akkana
mozilla/rdf/content/src/nsXULKeyListener.cpp ftang/saari
fix the master bug- 15693
fix at least, but not limited to, the following bugs
10158,11956,6053,9333,10901,14348,6449,11845,13016,14410,15657,15307,15842,13856
1999-10-14 22:27:01 +04:00
|
|
|
/// PR_TRUE indicates the alt key is down
|
1998-05-08 18:54:09 +04:00
|
|
|
PRBool isAlt;
|
landing keyEvent_19991004_BRANCH
bugs # see the log of the check in into branch
author/reviewer:
mozilla/layout/base/src/nsRangeList.cpp brade/mjudge
mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp brade/ftang
mozilla/layout/events/src/nsDOMEvent.cpp brade/joki
mozilla/layout/events/src/nsEventStateManager.cpp brade/joki
mozilla/widget/public/nsGUIEvent.h akkana/ftang
mozilla/widget/src/windows/nsWindow.cpp ftang/mjudge
mozilla/widget/src/windows/nsWindow.h ftang/mjudge
mozilla/widget/src/mac/nsTextAreaWidget.cpp brade/ftang
mozilla/widget/src/mac/nsMacEventHandler.cpp brade/simon
mozilla/widget/src/xpwidgets/nsKeyBindMgr.cpp brade/ftang
mozilla/widget/src/gtk/nsGtkEventHandler.cpp akkana/?
mozilla/widget/src/gtk/nsWidget.cpp erik/ftang
mozilla/layout/xul/base/src/nsTreeCellFrame.cpp brade/ftang
mozilla/editor/base/nsEditorEventListeners.cpp brade/akkana
mozilla/editor/base/nsHTMLEditor.cpp brade/akkana
mozilla/rdf/content/src/nsXULKeyListener.cpp ftang/saari
fix the master bug- 15693
fix at least, but not limited to, the following bugs
10158,11956,6053,9333,10901,14348,6449,11845,13016,14410,15657,15307,15842,13856
1999-10-14 22:27:01 +04:00
|
|
|
/// PR_TRUE indicates the meta key is down
|
|
|
|
/// (or, on Mac, the Command key)
|
|
|
|
PRBool isMeta;
|
1998-06-24 01:54:43 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Mouse event
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct nsMouseEvent : public nsInputEvent {
|
1998-05-08 18:54:09 +04:00
|
|
|
/// The number of mouse clicks
|
|
|
|
PRUint32 clickCount;
|
1999-11-11 04:33:48 +03:00
|
|
|
/// Special return code for MOUSE_ACTIVATE to signal
|
|
|
|
/// if the target accepts activation (1), or denies it (0)
|
|
|
|
PRBool acceptActivation;
|
1998-05-08 18:54:09 +04:00
|
|
|
};
|
|
|
|
|
2001-04-01 05:01:33 +04:00
|
|
|
/**
|
|
|
|
* Accessible event
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct nsAccessibleEvent : public nsInputEvent {
|
|
|
|
nsIAccessible* accessible;
|
|
|
|
};
|
|
|
|
|
1998-04-14 04:31:59 +04:00
|
|
|
/**
|
|
|
|
* Keyboard event
|
|
|
|
*/
|
|
|
|
|
1998-06-24 01:54:43 +04:00
|
|
|
struct nsKeyEvent : public nsInputEvent {
|
1998-04-15 01:33:43 +04:00
|
|
|
/// see NS_VK codes
|
|
|
|
PRUint32 keyCode;
|
1999-03-11 03:01:50 +03:00
|
|
|
/// OS translated Unicode char
|
|
|
|
PRUint32 charCode;
|
1999-11-03 10:11:45 +03:00
|
|
|
// indicates whether the event signifies a printable character
|
|
|
|
PRBool isChar;
|
1998-04-14 00:24:54 +04:00
|
|
|
};
|
|
|
|
|
1998-05-18 21:55:34 +04:00
|
|
|
/**
|
1999-06-30 00:31:22 +04:00
|
|
|
* IME Related Events
|
1998-05-18 21:55:34 +04:00
|
|
|
*/
|
1999-06-30 00:31:22 +04:00
|
|
|
struct nsTextRange {
|
|
|
|
PRUint32 mStartOffset;
|
|
|
|
PRUint32 mEndOffset;
|
|
|
|
PRUint32 mRangeType;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct nsTextRange nsTextRange;
|
|
|
|
typedef nsTextRange* nsTextRangeArray;
|
1998-05-18 21:55:34 +04:00
|
|
|
|
1999-08-06 07:14:57 +04:00
|
|
|
struct nsTextEventReply {
|
1999-12-22 10:56:40 +03:00
|
|
|
nsRect mCursorPosition;
|
1999-08-06 07:14:57 +04:00
|
|
|
PRBool mCursorIsCollapsed;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct nsTextEventReply nsTextEventReply;
|
|
|
|
|
1999-03-20 02:36:20 +03:00
|
|
|
struct nsTextEvent : public nsInputEvent {
|
|
|
|
PRUnichar* theText;
|
1999-08-06 07:14:57 +04:00
|
|
|
nsTextEventReply theReply;
|
1999-06-30 00:31:22 +04:00
|
|
|
PRUint32 rangeCount;
|
|
|
|
nsTextRangeArray rangeArray;
|
1999-11-03 10:11:45 +03:00
|
|
|
PRBool isChar;
|
1999-03-20 02:36:20 +03:00
|
|
|
};
|
|
|
|
|
1999-05-04 02:57:48 +04:00
|
|
|
struct nsCompositionEvent : public nsInputEvent {
|
|
|
|
PRUint32 compositionMessage;
|
1999-08-31 05:20:32 +04:00
|
|
|
nsTextEventReply theReply;
|
1999-05-04 02:57:48 +04:00
|
|
|
};
|
|
|
|
|
1999-11-17 09:54:02 +03:00
|
|
|
struct nsMouseScrollEvent : public nsInputEvent {
|
2000-11-13 21:16:43 +03:00
|
|
|
|
|
|
|
enum nsMouseScrollFlags {
|
|
|
|
kIsFullPage = 1 << 0,
|
|
|
|
kIsVertical = 1 << 1,
|
|
|
|
kIsHorizontal = 1 << 2
|
|
|
|
};
|
|
|
|
|
|
|
|
PRInt32 scrollFlags;
|
2000-11-02 08:15:34 +03:00
|
|
|
PRInt32 delta;
|
1999-11-17 09:54:02 +03:00
|
|
|
};
|
|
|
|
|
2000-08-05 01:43:29 +04:00
|
|
|
struct nsReconversionEventReply {
|
|
|
|
PRUnichar *mReconversionString;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct nsReconversionEvent : public nsInputEvent {
|
|
|
|
nsReconversionEventReply theReply;
|
|
|
|
};
|
|
|
|
|
2001-05-17 22:37:50 +04:00
|
|
|
|
1998-05-18 21:55:34 +04:00
|
|
|
|
1998-06-01 21:04:16 +04:00
|
|
|
/**
|
|
|
|
* MenuItem event
|
1998-10-07 23:49:36 +04:00
|
|
|
*
|
|
|
|
* When this event occurs the widget field in nsGUIEvent holds the "target"
|
|
|
|
* for the event
|
1998-06-01 21:04:16 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
struct nsMenuEvent : public nsGUIEvent {
|
1998-10-07 23:49:36 +04:00
|
|
|
nsIMenuItem * mMenuItem;
|
|
|
|
PRUint32 mCommand;
|
1998-06-01 21:04:16 +04:00
|
|
|
};
|
|
|
|
|
2001-04-17 14:02:11 +04:00
|
|
|
/**
|
|
|
|
* Form event
|
|
|
|
*
|
|
|
|
* We hold the originating form control for form submit and reset events.
|
|
|
|
* originator is a weak pointer (does not hold a strong reference).
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct nsFormEvent : public nsEvent {
|
|
|
|
nsIContent *originator;
|
|
|
|
};
|
|
|
|
|
2001-05-18 16:07:42 +04:00
|
|
|
/**
|
|
|
|
* Focus event
|
|
|
|
*/
|
|
|
|
struct nsFocusEvent : public nsGUIEvent {
|
|
|
|
PRBool isMozWindowTakingFocus;
|
|
|
|
};
|
|
|
|
|
1999-03-10 02:50:18 +03:00
|
|
|
|
1999-05-04 02:57:48 +04:00
|
|
|
/**
|
|
|
|
* Event status for D&D Event
|
|
|
|
*/
|
|
|
|
enum nsDragDropEventStatus {
|
|
|
|
/// The event is a enter
|
|
|
|
nsDragDropEventStatus_eDragEntered,
|
|
|
|
/// The event is exit
|
|
|
|
nsDragDropEventStatus_eDragExited,
|
|
|
|
/// The event is drop
|
|
|
|
nsDragDropEventStatus_eDrop
|
|
|
|
};
|
|
|
|
|
2001-05-17 22:37:50 +04:00
|
|
|
|
1998-04-15 01:33:43 +04:00
|
|
|
/**
|
1998-07-23 06:55:33 +04:00
|
|
|
* Event Struct Types
|
|
|
|
*/
|
2000-04-02 02:08:47 +04:00
|
|
|
#define NS_EVENT 1
|
|
|
|
#define NS_GUI_EVENT 2
|
|
|
|
#define NS_SIZE_EVENT 3
|
|
|
|
#define NS_SIZEMODE_EVENT 4
|
|
|
|
#define NS_ZLEVEL_EVENT 5
|
|
|
|
#define NS_PAINT_EVENT 6
|
|
|
|
#define NS_SCROLLBAR_EVENT 7
|
|
|
|
#define NS_INPUT_EVENT 8
|
|
|
|
#define NS_KEY_EVENT 9
|
|
|
|
#define NS_MOUSE_EVENT 10
|
|
|
|
#define NS_MENU_EVENT 11
|
|
|
|
#define NS_DRAGDROP_EVENT 12
|
|
|
|
#define NS_TEXT_EVENT 13
|
|
|
|
#define NS_COMPOSITION_START 14
|
|
|
|
#define NS_COMPOSITION_END 15
|
|
|
|
#define NS_MOUSE_SCROLL_EVENT 16
|
|
|
|
#define NS_COMPOSITION_QUERY 17
|
2000-06-23 09:15:04 +04:00
|
|
|
#define NS_SCROLLPORT_EVENT 18
|
2000-08-05 01:43:29 +04:00
|
|
|
#define NS_RECONVERSION_QUERY 19
|
2001-04-01 05:01:33 +04:00
|
|
|
#define NS_ACCESSIBLE_EVENT 20
|
2001-04-17 14:02:11 +04:00
|
|
|
#define NS_FORM_EVENT 21
|
2001-05-18 16:07:42 +04:00
|
|
|
#define NS_FOCUS_EVENT 22
|
2000-06-07 05:20:13 +04:00
|
|
|
|
1998-07-23 06:55:33 +04:00
|
|
|
/**
|
1998-04-14 00:24:54 +04:00
|
|
|
* GUI MESSAGES
|
|
|
|
*/
|
1998-04-15 01:33:43 +04:00
|
|
|
//@{
|
1998-04-14 00:24:54 +04:00
|
|
|
|
|
|
|
#define NS_WINDOW_START 100
|
1998-04-25 03:09:11 +04:00
|
|
|
|
1998-05-04 23:25:25 +04:00
|
|
|
// Widget is being created
|
1998-04-14 00:24:54 +04:00
|
|
|
#define NS_CREATE (NS_WINDOW_START)
|
1999-12-02 01:35:33 +03:00
|
|
|
// Widget may be destroyed
|
|
|
|
#define NS_XUL_CLOSE (NS_WINDOW_START + 1)
|
1998-05-04 23:25:25 +04:00
|
|
|
// Widget is being destroyed
|
1999-12-02 01:35:33 +03:00
|
|
|
#define NS_DESTROY (NS_WINDOW_START + 2)
|
1998-05-04 23:25:25 +04:00
|
|
|
// Widget was resized
|
1999-12-02 01:35:33 +03:00
|
|
|
#define NS_SIZE (NS_WINDOW_START + 3)
|
2000-03-09 04:54:14 +03:00
|
|
|
// Widget size mode was changed
|
|
|
|
#define NS_SIZEMODE (NS_WINDOW_START + 4)
|
1998-05-04 23:25:25 +04:00
|
|
|
// Widget gained focus
|
2000-03-09 04:54:14 +03:00
|
|
|
#define NS_GOTFOCUS (NS_WINDOW_START + 5)
|
1998-05-04 23:25:25 +04:00
|
|
|
// Widget lost focus
|
2000-03-09 04:54:14 +03:00
|
|
|
#define NS_LOSTFOCUS (NS_WINDOW_START + 6)
|
1999-11-11 04:33:48 +03:00
|
|
|
// Widget got activated
|
2000-03-09 04:54:14 +03:00
|
|
|
#define NS_ACTIVATE (NS_WINDOW_START + 7)
|
1999-11-11 04:33:48 +03:00
|
|
|
// Widget got deactivated
|
2000-03-09 04:54:14 +03:00
|
|
|
#define NS_DEACTIVATE (NS_WINDOW_START + 8)
|
2000-04-02 02:08:47 +04:00
|
|
|
// top-level window z-level change request
|
|
|
|
#define NS_SETZLEVEL (NS_WINDOW_START + 9)
|
1998-05-04 23:25:25 +04:00
|
|
|
// Widget needs to be repainted
|
1998-04-14 00:24:54 +04:00
|
|
|
#define NS_PAINT (NS_WINDOW_START + 30)
|
1998-11-24 10:45:26 +03:00
|
|
|
// Key is pressed within a window
|
|
|
|
#define NS_KEY_PRESS (NS_WINDOW_START + 31)
|
1998-05-04 23:25:25 +04:00
|
|
|
// Key is released within a window
|
1998-07-09 21:04:45 +04:00
|
|
|
#define NS_KEY_UP (NS_WINDOW_START + 32)
|
|
|
|
// Key is pressed within a window
|
1998-04-14 00:24:54 +04:00
|
|
|
#define NS_KEY_DOWN (NS_WINDOW_START + 33)
|
1998-05-04 23:25:25 +04:00
|
|
|
// Window has been moved to a new location.
|
1998-04-25 03:09:11 +04:00
|
|
|
// The events point contains the x, y location in screen coordinates
|
|
|
|
#define NS_MOVE (NS_WINDOW_START + 34)
|
|
|
|
|
1998-05-04 23:25:25 +04:00
|
|
|
// Tab control's selected tab has changed
|
1998-04-25 03:09:11 +04:00
|
|
|
#define NS_TABCHANGE (NS_WINDOW_START + 35)
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1999-08-21 12:41:46 +04:00
|
|
|
|
|
|
|
|
1998-06-01 21:04:16 +04:00
|
|
|
// Menu item selected
|
|
|
|
#define NS_MENU_SELECTED (NS_WINDOW_START + 38)
|
1998-05-04 23:25:25 +04:00
|
|
|
|
1999-05-28 03:53:42 +04:00
|
|
|
// Form control changed: currently == combo box selection changed
|
|
|
|
// but could be expanded to mean textbox, checkbox changed, etc.
|
|
|
|
// This is a GUI specific event that does not necessarily correspond
|
|
|
|
// directly to a mouse click or a key press.
|
|
|
|
#define NS_CONTROL_CHANGE (NS_WINDOW_START + 39)
|
|
|
|
|
1999-10-07 01:54:49 +04:00
|
|
|
// Indicates the display has changed depth
|
|
|
|
#define NS_DISPLAYCHANGED (NS_WINDOW_START + 40)
|
|
|
|
|
2000-04-24 08:41:27 +04:00
|
|
|
// Indicates a script error has occurred
|
|
|
|
#define NS_SCRIPT_ERROR (NS_WINDOW_START + 50)
|
1998-05-04 23:25:25 +04:00
|
|
|
|
2000-05-17 09:27:22 +04:00
|
|
|
#define NS_RESIZE_EVENT (NS_WINDOW_START + 60)
|
2000-05-17 10:53:58 +04:00
|
|
|
#define NS_SCROLL_EVENT (NS_WINDOW_START + 61)
|
2000-05-17 09:27:22 +04:00
|
|
|
|
2000-08-24 08:49:00 +04:00
|
|
|
#define NS_PLUGIN_ACTIVATE (NS_WINDOW_START + 62)
|
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
#define NS_MOUSE_MESSAGE_START 300
|
|
|
|
#define NS_MOUSE_MOVE (NS_MOUSE_MESSAGE_START)
|
|
|
|
#define NS_MOUSE_LEFT_BUTTON_UP (NS_MOUSE_MESSAGE_START + 1)
|
|
|
|
#define NS_MOUSE_LEFT_BUTTON_DOWN (NS_MOUSE_MESSAGE_START + 2)
|
|
|
|
#define NS_MOUSE_MIDDLE_BUTTON_UP (NS_MOUSE_MESSAGE_START + 10)
|
|
|
|
#define NS_MOUSE_MIDDLE_BUTTON_DOWN (NS_MOUSE_MESSAGE_START + 11)
|
|
|
|
#define NS_MOUSE_RIGHT_BUTTON_UP (NS_MOUSE_MESSAGE_START + 20)
|
|
|
|
#define NS_MOUSE_RIGHT_BUTTON_DOWN (NS_MOUSE_MESSAGE_START + 21)
|
|
|
|
#define NS_MOUSE_ENTER (NS_MOUSE_MESSAGE_START + 22)
|
|
|
|
#define NS_MOUSE_EXIT (NS_MOUSE_MESSAGE_START + 23)
|
1998-04-29 23:59:06 +04:00
|
|
|
#define NS_MOUSE_LEFT_DOUBLECLICK (NS_MOUSE_MESSAGE_START + 24)
|
1998-08-01 02:01:42 +04:00
|
|
|
#define NS_MOUSE_MIDDLE_DOUBLECLICK (NS_MOUSE_MESSAGE_START + 25)
|
|
|
|
#define NS_MOUSE_RIGHT_DOUBLECLICK (NS_MOUSE_MESSAGE_START + 26)
|
|
|
|
#define NS_MOUSE_LEFT_CLICK (NS_MOUSE_MESSAGE_START + 27)
|
|
|
|
#define NS_MOUSE_MIDDLE_CLICK (NS_MOUSE_MESSAGE_START + 28)
|
|
|
|
#define NS_MOUSE_RIGHT_CLICK (NS_MOUSE_MESSAGE_START + 29)
|
1999-11-11 04:33:48 +03:00
|
|
|
#define NS_MOUSE_ACTIVATE (NS_MOUSE_MESSAGE_START + 30)
|
2000-04-24 08:41:27 +04:00
|
|
|
#define NS_MOUSE_ENTER_SYNTH (NS_MOUSE_MESSAGE_START + 31)
|
|
|
|
#define NS_MOUSE_EXIT_SYNTH (NS_MOUSE_MESSAGE_START + 32)
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2001-03-23 06:22:56 +03:00
|
|
|
#define NS_CONTEXTMENU_MESSAGE_START 500
|
|
|
|
#define NS_CONTEXTMENU (NS_CONTEXTMENU_MESSAGE_START)
|
2001-05-17 22:37:50 +04:00
|
|
|
#define NS_CONTEXTMENU_KEY (NS_CONTEXTMENU_MESSAGE_START + 1)
|
2001-03-23 06:22:56 +03:00
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
#define NS_SCROLLBAR_MESSAGE_START 1000
|
|
|
|
#define NS_SCROLLBAR_POS (NS_SCROLLBAR_MESSAGE_START)
|
|
|
|
#define NS_SCROLLBAR_PAGE_NEXT (NS_SCROLLBAR_MESSAGE_START + 1)
|
|
|
|
#define NS_SCROLLBAR_PAGE_PREV (NS_SCROLLBAR_MESSAGE_START + 2)
|
|
|
|
#define NS_SCROLLBAR_LINE_NEXT (NS_SCROLLBAR_MESSAGE_START + 3)
|
|
|
|
#define NS_SCROLLBAR_LINE_PREV (NS_SCROLLBAR_MESSAGE_START + 4)
|
1998-07-24 09:07:07 +04:00
|
|
|
|
|
|
|
#define NS_STREAM_EVENT_START 1100
|
|
|
|
#define NS_PAGE_LOAD (NS_STREAM_EVENT_START)
|
|
|
|
#define NS_PAGE_UNLOAD (NS_STREAM_EVENT_START + 1)
|
|
|
|
#define NS_IMAGE_LOAD (NS_STREAM_EVENT_START + 2)
|
|
|
|
#define NS_IMAGE_ABORT (NS_STREAM_EVENT_START + 3)
|
|
|
|
#define NS_IMAGE_ERROR (NS_STREAM_EVENT_START + 4)
|
2001-05-19 05:21:57 +04:00
|
|
|
#define NS_SCRIPT_LOAD (NS_STREAM_EVENT_START + 5)
|
|
|
|
|
1998-08-01 02:01:42 +04:00
|
|
|
#define NS_FORM_EVENT_START 1200
|
|
|
|
#define NS_FORM_SUBMIT (NS_FORM_EVENT_START)
|
|
|
|
#define NS_FORM_RESET (NS_FORM_EVENT_START + 1)
|
1998-11-03 02:05:46 +03:00
|
|
|
#define NS_FORM_CHANGE (NS_FORM_EVENT_START + 2)
|
1999-08-08 03:18:35 +04:00
|
|
|
#define NS_FORM_SELECTED (NS_FORM_EVENT_START + 3)
|
1999-09-22 03:02:35 +04:00
|
|
|
#define NS_FORM_INPUT (NS_FORM_EVENT_START + 4)
|
1999-03-02 22:19:24 +03:00
|
|
|
|
|
|
|
//Need separate focus/blur notifications for non-native widgets
|
|
|
|
#define NS_FOCUS_EVENT_START 1300
|
|
|
|
#define NS_FOCUS_CONTENT (NS_FOCUS_EVENT_START)
|
|
|
|
#define NS_BLUR_CONTENT (NS_FOCUS_EVENT_START + 1)
|
|
|
|
|
1999-04-07 00:24:46 +04:00
|
|
|
|
|
|
|
#define NS_DRAGDROP_EVENT_START 1400
|
|
|
|
#define NS_DRAGDROP_ENTER (NS_DRAGDROP_EVENT_START)
|
|
|
|
#define NS_DRAGDROP_OVER (NS_DRAGDROP_EVENT_START + 1)
|
|
|
|
#define NS_DRAGDROP_EXIT (NS_DRAGDROP_EVENT_START + 2)
|
|
|
|
#define NS_DRAGDROP_DROP (NS_DRAGDROP_EVENT_START + 3)
|
1999-08-19 23:48:58 +04:00
|
|
|
#define NS_DRAGDROP_GESTURE (NS_DRAGDROP_EVENT_START + 4)
|
2000-04-24 08:41:27 +04:00
|
|
|
#define NS_DRAGDROP_OVER_SYNTH (NS_DRAGDROP_EVENT_START + 1)
|
|
|
|
#define NS_DRAGDROP_EXIT_SYNTH (NS_DRAGDROP_EVENT_START + 2)
|
1999-04-07 00:24:46 +04:00
|
|
|
|
1999-06-08 09:08:46 +04:00
|
|
|
// Events for popups
|
2001-08-07 01:49:35 +04:00
|
|
|
#define NS_XUL_EVENT_START 1500
|
|
|
|
#define NS_XUL_POPUP_SHOWING (NS_XUL_EVENT_START)
|
|
|
|
#define NS_XUL_POPUP_SHOWN (NS_XUL_EVENT_START+1)
|
|
|
|
#define NS_XUL_POPUP_HIDING (NS_XUL_EVENT_START+2)
|
|
|
|
#define NS_XUL_POPUP_HIDDEN (NS_XUL_EVENT_START+3)
|
|
|
|
#define NS_XUL_COMMAND (NS_XUL_EVENT_START+4)
|
|
|
|
#define NS_XUL_BROADCAST (NS_XUL_EVENT_START+5)
|
|
|
|
#define NS_XUL_COMMAND_UPDATE (NS_XUL_EVENT_START+6)
|
1998-04-15 01:33:43 +04:00
|
|
|
//@}
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1999-11-17 09:54:02 +03:00
|
|
|
// Scroll events
|
|
|
|
#define NS_MOUSE_SCROLL_START 1600
|
|
|
|
#define NS_MOUSE_SCROLL (NS_MOUSE_SCROLL_START)
|
1998-08-18 07:47:24 +04:00
|
|
|
|
2000-06-23 09:15:04 +04:00
|
|
|
#define NS_SCROLLPORT_START 1700
|
|
|
|
#define NS_SCROLLPORT_UNDERFLOW (NS_SCROLLPORT_START)
|
|
|
|
#define NS_SCROLLPORT_OVERFLOW (NS_SCROLLPORT_START+1)
|
2000-06-28 04:00:18 +04:00
|
|
|
#define NS_SCROLLPORT_OVERFLOWCHANGED (NS_SCROLLPORT_START+2)
|
2000-06-23 09:15:04 +04:00
|
|
|
|
2001-04-17 09:52:11 +04:00
|
|
|
// Mutation events defined elsewhere starting at 1800
|
|
|
|
|
2001-04-01 05:01:33 +04:00
|
|
|
// accessible events
|
2001-04-17 09:52:11 +04:00
|
|
|
#define NS_ACCESSIBLE_START 1900
|
2001-04-01 05:01:33 +04:00
|
|
|
#define NS_GETACCESSIBLE (NS_ACCESSIBLE_START)
|
|
|
|
|
2001-04-17 09:52:11 +04:00
|
|
|
#define NS_USER_DEFINED_EVENT 2000
|
2001-04-01 05:01:33 +04:00
|
|
|
|
1998-08-18 07:47:24 +04:00
|
|
|
#define NS_IS_MOUSE_EVENT(evnt) \
|
|
|
|
(((evnt)->message == NS_MOUSE_LEFT_BUTTON_DOWN) || \
|
|
|
|
((evnt)->message == NS_MOUSE_LEFT_BUTTON_UP) || \
|
1999-03-29 02:27:38 +04:00
|
|
|
((evnt)->message == NS_MOUSE_LEFT_CLICK) || \
|
|
|
|
((evnt)->message == NS_MOUSE_LEFT_DOUBLECLICK) || \
|
1998-08-18 07:47:24 +04:00
|
|
|
((evnt)->message == NS_MOUSE_MIDDLE_BUTTON_DOWN) || \
|
|
|
|
((evnt)->message == NS_MOUSE_MIDDLE_BUTTON_UP) || \
|
1999-03-29 02:27:38 +04:00
|
|
|
((evnt)->message == NS_MOUSE_MIDDLE_CLICK) || \
|
|
|
|
((evnt)->message == NS_MOUSE_MIDDLE_DOUBLECLICK) || \
|
1998-08-18 07:47:24 +04:00
|
|
|
((evnt)->message == NS_MOUSE_RIGHT_BUTTON_DOWN) || \
|
|
|
|
((evnt)->message == NS_MOUSE_RIGHT_BUTTON_UP) || \
|
1999-03-29 02:27:38 +04:00
|
|
|
((evnt)->message == NS_MOUSE_RIGHT_CLICK) || \
|
|
|
|
((evnt)->message == NS_MOUSE_RIGHT_DOUBLECLICK) || \
|
1998-08-18 07:47:24 +04:00
|
|
|
((evnt)->message == NS_MOUSE_ENTER) || \
|
|
|
|
((evnt)->message == NS_MOUSE_EXIT) || \
|
2000-04-24 08:41:27 +04:00
|
|
|
((evnt)->message == NS_MOUSE_ENTER) || \
|
|
|
|
((evnt)->message == NS_MOUSE_EXIT) || \
|
|
|
|
((evnt)->message == NS_MOUSE_ENTER_SYNTH) || \
|
|
|
|
((evnt)->message == NS_MOUSE_EXIT_SYNTH) || \
|
1998-08-18 07:47:24 +04:00
|
|
|
((evnt)->message == NS_MOUSE_MOVE))
|
|
|
|
|
2000-06-21 07:43:40 +04:00
|
|
|
#define NS_IS_DRAG_EVENT(evnt) \
|
|
|
|
(((evnt)->message == NS_DRAGDROP_ENTER) || \
|
|
|
|
((evnt)->message == NS_DRAGDROP_OVER) || \
|
|
|
|
((evnt)->message == NS_DRAGDROP_EXIT) || \
|
|
|
|
((evnt)->message == NS_DRAGDROP_DROP) || \
|
|
|
|
((evnt)->message == NS_DRAGDROP_GESTURE) || \
|
|
|
|
((evnt)->message == NS_DRAGDROP_OVER_SYNTH) || \
|
|
|
|
((evnt)->message == NS_DRAGDROP_EXIT_SYNTH))
|
|
|
|
|
1998-08-18 07:47:24 +04:00
|
|
|
#define NS_IS_KEY_EVENT(evnt) \
|
|
|
|
(((evnt)->message == NS_KEY_DOWN) || \
|
1999-03-29 02:27:38 +04:00
|
|
|
((evnt)->message == NS_KEY_PRESS) || \
|
1998-08-18 07:47:24 +04:00
|
|
|
((evnt)->message == NS_KEY_UP))
|
|
|
|
|
2000-06-07 05:20:13 +04:00
|
|
|
#define NS_IS_IME_EVENT(evnt) \
|
|
|
|
(((evnt)->message == NS_TEXT_EVENT) || \
|
|
|
|
((evnt)->message == NS_COMPOSITION_START) || \
|
|
|
|
((evnt)->message == NS_COMPOSITION_END) || \
|
2000-08-24 06:10:28 +04:00
|
|
|
((evnt)->message == NS_RECONVERSION_QUERY) || \
|
2000-06-07 05:20:13 +04:00
|
|
|
((evnt)->message == NS_COMPOSITION_QUERY))
|
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
/*
|
2000-08-18 01:43:26 +04:00
|
|
|
* Virtual key bindings for keyboard events.
|
|
|
|
* These come from nsIDOMKeyEvent.h, which is generated from MouseKeyEvent.idl.
|
|
|
|
* Really, it would be better if we phased out the NS_VK symbols altogether
|
|
|
|
* in favor of the DOM ones, but at least this way they'll be in sync.
|
1998-04-14 00:24:54 +04:00
|
|
|
*/
|
|
|
|
|
2000-08-18 01:43:26 +04:00
|
|
|
#define NS_VK_CANCEL nsIDOMKeyEvent::DOM_VK_CANCEL
|
|
|
|
#define NS_VK_BACK nsIDOMKeyEvent::DOM_VK_BACK_SPACE
|
|
|
|
#define NS_VK_TAB nsIDOMKeyEvent::DOM_VK_TAB
|
|
|
|
#define NS_VK_CLEAR nsIDOMKeyEvent::DOM_VK_CLEAR
|
|
|
|
#define NS_VK_RETURN nsIDOMKeyEvent::DOM_VK_RETURN
|
|
|
|
#define NS_VK_ENTER nsIDOMKeyEvent::DOM_VK_ENTER
|
|
|
|
#define NS_VK_SHIFT nsIDOMKeyEvent::DOM_VK_SHIFT
|
|
|
|
#define NS_VK_CONTROL nsIDOMKeyEvent::DOM_VK_CONTROL
|
|
|
|
#define NS_VK_ALT nsIDOMKeyEvent::DOM_VK_ALT
|
|
|
|
#define NS_VK_PAUSE nsIDOMKeyEvent::DOM_VK_PAUSE
|
|
|
|
#define NS_VK_CAPS_LOCK nsIDOMKeyEvent::DOM_VK_CAPS_LOCK
|
|
|
|
#define NS_VK_ESCAPE nsIDOMKeyEvent::DOM_VK_ESCAPE
|
|
|
|
#define NS_VK_SPACE nsIDOMKeyEvent::DOM_VK_SPACE
|
|
|
|
#define NS_VK_PAGE_UP nsIDOMKeyEvent::DOM_VK_PAGE_UP
|
|
|
|
#define NS_VK_PAGE_DOWN nsIDOMKeyEvent::DOM_VK_PAGE_DOWN
|
|
|
|
#define NS_VK_END nsIDOMKeyEvent::DOM_VK_END
|
|
|
|
#define NS_VK_HOME nsIDOMKeyEvent::DOM_VK_HOME
|
|
|
|
#define NS_VK_LEFT nsIDOMKeyEvent::DOM_VK_LEFT
|
|
|
|
#define NS_VK_UP nsIDOMKeyEvent::DOM_VK_UP
|
|
|
|
#define NS_VK_RIGHT nsIDOMKeyEvent::DOM_VK_RIGHT
|
|
|
|
#define NS_VK_DOWN nsIDOMKeyEvent::DOM_VK_DOWN
|
|
|
|
#define NS_VK_PRINTSCREEN nsIDOMKeyEvent::DOM_VK_PRINTSCREEN
|
|
|
|
#define NS_VK_INSERT nsIDOMKeyEvent::DOM_VK_INSERT
|
|
|
|
#define NS_VK_DELETE nsIDOMKeyEvent::DOM_VK_DELETE
|
1998-04-14 00:24:54 +04:00
|
|
|
|
|
|
|
// NS_VK_0 - NS_VK_9 match their ascii values
|
2000-08-18 01:43:26 +04:00
|
|
|
#define NS_VK_0 nsIDOMKeyEvent::DOM_VK_0
|
|
|
|
#define NS_VK_1 nsIDOMKeyEvent::DOM_VK_1
|
|
|
|
#define NS_VK_2 nsIDOMKeyEvent::DOM_VK_2
|
|
|
|
#define NS_VK_3 nsIDOMKeyEvent::DOM_VK_3
|
|
|
|
#define NS_VK_4 nsIDOMKeyEvent::DOM_VK_4
|
|
|
|
#define NS_VK_5 nsIDOMKeyEvent::DOM_VK_5
|
|
|
|
#define NS_VK_6 nsIDOMKeyEvent::DOM_VK_6
|
|
|
|
#define NS_VK_7 nsIDOMKeyEvent::DOM_VK_7
|
|
|
|
#define NS_VK_8 nsIDOMKeyEvent::DOM_VK_8
|
|
|
|
#define NS_VK_9 nsIDOMKeyEvent::DOM_VK_9
|
|
|
|
|
|
|
|
#define NS_VK_SEMICOLON nsIDOMKeyEvent::DOM_VK_SEMICOLON
|
|
|
|
#define NS_VK_EQUALS nsIDOMKeyEvent::DOM_VK_EQUALS
|
1998-04-14 00:24:54 +04:00
|
|
|
|
|
|
|
// NS_VK_A - NS_VK_Z match their ascii values
|
2000-08-18 01:43:26 +04:00
|
|
|
#define NS_VK_A nsIDOMKeyEvent::DOM_VK_A
|
|
|
|
#define NS_VK_B nsIDOMKeyEvent::DOM_VK_B
|
|
|
|
#define NS_VK_C nsIDOMKeyEvent::DOM_VK_C
|
|
|
|
#define NS_VK_D nsIDOMKeyEvent::DOM_VK_D
|
|
|
|
#define NS_VK_E nsIDOMKeyEvent::DOM_VK_E
|
|
|
|
#define NS_VK_F nsIDOMKeyEvent::DOM_VK_F
|
|
|
|
#define NS_VK_G nsIDOMKeyEvent::DOM_VK_G
|
|
|
|
#define NS_VK_H nsIDOMKeyEvent::DOM_VK_H
|
|
|
|
#define NS_VK_I nsIDOMKeyEvent::DOM_VK_I
|
|
|
|
#define NS_VK_J nsIDOMKeyEvent::DOM_VK_J
|
|
|
|
#define NS_VK_K nsIDOMKeyEvent::DOM_VK_K
|
|
|
|
#define NS_VK_L nsIDOMKeyEvent::DOM_VK_L
|
|
|
|
#define NS_VK_M nsIDOMKeyEvent::DOM_VK_M
|
|
|
|
#define NS_VK_N nsIDOMKeyEvent::DOM_VK_N
|
|
|
|
#define NS_VK_O nsIDOMKeyEvent::DOM_VK_O
|
|
|
|
#define NS_VK_P nsIDOMKeyEvent::DOM_VK_P
|
|
|
|
#define NS_VK_Q nsIDOMKeyEvent::DOM_VK_Q
|
|
|
|
#define NS_VK_R nsIDOMKeyEvent::DOM_VK_R
|
|
|
|
#define NS_VK_S nsIDOMKeyEvent::DOM_VK_S
|
|
|
|
#define NS_VK_T nsIDOMKeyEvent::DOM_VK_T
|
|
|
|
#define NS_VK_U nsIDOMKeyEvent::DOM_VK_U
|
|
|
|
#define NS_VK_V nsIDOMKeyEvent::DOM_VK_V
|
|
|
|
#define NS_VK_W nsIDOMKeyEvent::DOM_VK_W
|
|
|
|
#define NS_VK_X nsIDOMKeyEvent::DOM_VK_X
|
|
|
|
#define NS_VK_Y nsIDOMKeyEvent::DOM_VK_Y
|
|
|
|
#define NS_VK_Z nsIDOMKeyEvent::DOM_VK_Z
|
|
|
|
|
|
|
|
#define NS_VK_NUMPAD0 nsIDOMKeyEvent::DOM_VK_NUMPAD0
|
|
|
|
#define NS_VK_NUMPAD1 nsIDOMKeyEvent::DOM_VK_NUMPAD1
|
|
|
|
#define NS_VK_NUMPAD2 nsIDOMKeyEvent::DOM_VK_NUMPAD2
|
|
|
|
#define NS_VK_NUMPAD3 nsIDOMKeyEvent::DOM_VK_NUMPAD3
|
|
|
|
#define NS_VK_NUMPAD4 nsIDOMKeyEvent::DOM_VK_NUMPAD4
|
|
|
|
#define NS_VK_NUMPAD5 nsIDOMKeyEvent::DOM_VK_NUMPAD5
|
|
|
|
#define NS_VK_NUMPAD6 nsIDOMKeyEvent::DOM_VK_NUMPAD6
|
|
|
|
#define NS_VK_NUMPAD7 nsIDOMKeyEvent::DOM_VK_NUMPAD7
|
|
|
|
#define NS_VK_NUMPAD8 nsIDOMKeyEvent::DOM_VK_NUMPAD8
|
|
|
|
#define NS_VK_NUMPAD9 nsIDOMKeyEvent::DOM_VK_NUMPAD9
|
|
|
|
#define NS_VK_MULTIPLY nsIDOMKeyEvent::DOM_VK_MULTIPLY
|
|
|
|
#define NS_VK_ADD nsIDOMKeyEvent::DOM_VK_ADD
|
|
|
|
#define NS_VK_SEPARATOR nsIDOMKeyEvent::DOM_VK_SEPARATOR
|
|
|
|
#define NS_VK_SUBTRACT nsIDOMKeyEvent::DOM_VK_SUBTRACT
|
|
|
|
#define NS_VK_DECIMAL nsIDOMKeyEvent::DOM_VK_DECIMAL
|
|
|
|
#define NS_VK_DIVIDE nsIDOMKeyEvent::DOM_VK_DIVIDE
|
|
|
|
#define NS_VK_F1 nsIDOMKeyEvent::DOM_VK_F1
|
|
|
|
#define NS_VK_F2 nsIDOMKeyEvent::DOM_VK_F2
|
|
|
|
#define NS_VK_F3 nsIDOMKeyEvent::DOM_VK_F3
|
|
|
|
#define NS_VK_F4 nsIDOMKeyEvent::DOM_VK_F4
|
|
|
|
#define NS_VK_F5 nsIDOMKeyEvent::DOM_VK_F5
|
|
|
|
#define NS_VK_F6 nsIDOMKeyEvent::DOM_VK_F6
|
|
|
|
#define NS_VK_F7 nsIDOMKeyEvent::DOM_VK_F7
|
|
|
|
#define NS_VK_F8 nsIDOMKeyEvent::DOM_VK_F8
|
|
|
|
#define NS_VK_F9 nsIDOMKeyEvent::DOM_VK_F9
|
|
|
|
#define NS_VK_F10 nsIDOMKeyEvent::DOM_VK_F10
|
|
|
|
#define NS_VK_F11 nsIDOMKeyEvent::DOM_VK_F11
|
|
|
|
#define NS_VK_F12 nsIDOMKeyEvent::DOM_VK_F12
|
|
|
|
#define NS_VK_F13 nsIDOMKeyEvent::DOM_VK_F13
|
|
|
|
#define NS_VK_F14 nsIDOMKeyEvent::DOM_VK_F14
|
|
|
|
#define NS_VK_F15 nsIDOMKeyEvent::DOM_VK_F15
|
|
|
|
#define NS_VK_F16 nsIDOMKeyEvent::DOM_VK_F16
|
|
|
|
#define NS_VK_F17 nsIDOMKeyEvent::DOM_VK_F17
|
|
|
|
#define NS_VK_F18 nsIDOMKeyEvent::DOM_VK_F18
|
|
|
|
#define NS_VK_F19 nsIDOMKeyEvent::DOM_VK_F19
|
|
|
|
#define NS_VK_F20 nsIDOMKeyEvent::DOM_VK_F20
|
|
|
|
#define NS_VK_F21 nsIDOMKeyEvent::DOM_VK_F21
|
|
|
|
#define NS_VK_F22 nsIDOMKeyEvent::DOM_VK_F22
|
|
|
|
#define NS_VK_F23 nsIDOMKeyEvent::DOM_VK_F23
|
|
|
|
#define NS_VK_F24 nsIDOMKeyEvent::DOM_VK_F24
|
|
|
|
|
|
|
|
#define NS_VK_NUM_LOCK nsIDOMKeyEvent::DOM_VK_NUM_LOCK
|
|
|
|
#define NS_VK_SCROLL_LOCK nsIDOMKeyEvent::DOM_VK_SCROLL_LOCK
|
|
|
|
|
|
|
|
#define NS_VK_COMMA nsIDOMKeyEvent::DOM_VK_COMMA
|
|
|
|
#define NS_VK_PERIOD nsIDOMKeyEvent::DOM_VK_PERIOD
|
|
|
|
#define NS_VK_SLASH nsIDOMKeyEvent::DOM_VK_SLASH
|
|
|
|
#define NS_VK_BACK_QUOTE nsIDOMKeyEvent::DOM_VK_BACK_QUOTE
|
|
|
|
#define NS_VK_OPEN_BRACKET nsIDOMKeyEvent::DOM_VK_OPEN_BRACKET
|
|
|
|
#define NS_VK_BACK_SLASH nsIDOMKeyEvent::DOM_VK_BACK_SLASH
|
|
|
|
#define NS_VK_CLOSE_BRACKET nsIDOMKeyEvent::DOM_VK_CLOSE_BRACKET
|
|
|
|
#define NS_VK_QUOTE nsIDOMKeyEvent::DOM_VK_QUOTE
|
|
|
|
|
|
|
|
#define NS_VK_META nsIDOMKeyEvent::DOM_VK_META
|
2000-08-17 04:09:16 +04:00
|
|
|
|
2001-11-07 09:29:29 +03:00
|
|
|
#define NS_EVENT_FLAG_NONE 0x0000
|
|
|
|
#define NS_EVENT_FLAG_INIT 0x0001
|
|
|
|
#define NS_EVENT_FLAG_BUBBLE 0x0002
|
|
|
|
#define NS_EVENT_FLAG_CAPTURE 0x0004
|
|
|
|
#define NS_EVENT_FLAG_STOP_DISPATCH 0x0008
|
|
|
|
#define NS_EVENT_FLAG_NO_DEFAULT 0x0010
|
|
|
|
#define NS_EVENT_FLAG_CANT_CANCEL 0x0020
|
|
|
|
#define NS_EVENT_FLAG_CANT_BUBBLE 0x0040
|
|
|
|
#define NS_PRIV_EVENT_FLAG_SCRIPT 0x0080
|
|
|
|
#define NS_EVENT_FLAG_NO_CONTENT_DISPATCH 0x0100
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2000-06-20 04:44:55 +04:00
|
|
|
#define NS_APP_EVENT_FLAG_NONE 0x0000
|
|
|
|
#define NS_APP_EVENT_FLAG_HANDLED 0x0001 // Similar to NS_EVENT_FLAG_NO_DEFAULT, but it allows focus
|
|
|
|
|
1999-06-30 00:31:22 +04:00
|
|
|
// IME Constants -- keep in synch with nsIDOMTextRange.h
|
1999-07-03 02:21:03 +04:00
|
|
|
#define NS_TEXTRANGE_CARETPOSITION 0x01
|
|
|
|
#define NS_TEXTRANGE_RAWINPUT 0X02
|
|
|
|
#define NS_TEXTRANGE_SELECTEDRAWTEXT 0x03
|
|
|
|
#define NS_TEXTRANGE_CONVERTEDTEXT 0x04
|
|
|
|
#define NS_TEXTRANGE_SELECTEDCONVERTEDTEXT 0x05
|
1999-06-30 00:31:22 +04:00
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
#endif // nsGUIEvent_h__
|
|
|
|
|