mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Made comments DOC++ compatible
This commit is contained in:
parent
a3dbbe2d9a
commit
534205ffca
@ -30,9 +30,12 @@ class nsIWidget;
|
||||
*/
|
||||
|
||||
enum nsEventStatus {
|
||||
nsEventStatus_eIgnore, // The event is ignored, do default processing
|
||||
nsEventStatus_eConsumeNoDefault, // The event is consumed, don't do default processing
|
||||
nsEventStatus_eConsumeDoDefault // The event is consumed, but do default processing
|
||||
/// The event is ignored, do default processing
|
||||
nsEventStatus_eIgnore,
|
||||
/// The event is consumed, don't do default processing
|
||||
nsEventStatus_eConsumeNoDefault,
|
||||
/// The event is consumed, but do default processing
|
||||
nsEventStatus_eConsumeDoDefault
|
||||
};
|
||||
|
||||
/**
|
||||
@ -40,13 +43,16 @@ enum nsEventStatus {
|
||||
*/
|
||||
|
||||
struct nsGUIEvent {
|
||||
PRUint32 message; // see GUI MESSAGES
|
||||
nsIWidget* widget; // Originator of the event
|
||||
nsPoint point; // in widget relative coordinates
|
||||
PRUint32 time; // elapsed time, in milliseconds, from the
|
||||
// time the system was started to the time
|
||||
// the message was created
|
||||
void* nativeMsg; // Internal platform specific mesasge.
|
||||
/// See GUI MESSAGES,
|
||||
PRUint32 message;
|
||||
/// Originator of the event
|
||||
nsIWidget* widget;
|
||||
/// in widget relative coordinates
|
||||
nsPoint point;
|
||||
/// elapsed time, in milliseconds, from the time the system was started to the time the message was created
|
||||
PRUint32 time;
|
||||
/// Internal platform specific message.
|
||||
void* nativeMsg;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -54,7 +60,8 @@ struct nsGUIEvent {
|
||||
*/
|
||||
|
||||
struct nsSizeEvent : public nsGUIEvent {
|
||||
nsRect *windowSize; // x,y width, height in pixels
|
||||
/// x,y width, height in pixels
|
||||
nsRect *windowSize;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -62,8 +69,10 @@ struct nsSizeEvent : public nsGUIEvent {
|
||||
*/
|
||||
|
||||
struct nsPaintEvent : public nsGUIEvent {
|
||||
/// Context to paint in.
|
||||
nsIRenderingContext *renderingContext;
|
||||
nsRect *rect; // x,y, width, height in pixels of area to paint
|
||||
/// x,y, width, height in pixels of area to paint
|
||||
nsRect *rect;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -71,9 +80,8 @@ struct nsPaintEvent : public nsGUIEvent {
|
||||
*/
|
||||
|
||||
struct nsScrollbarEvent : public nsGUIEvent {
|
||||
PRUint32 position; // ranges between scrollbar 0
|
||||
// and (maxRange - thumbSize)
|
||||
// see nsIScrollbar.h
|
||||
/// ranges between scrollbar 0 and (maxRange - thumbSize). See nsIScrollbar
|
||||
PRUint32 position;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -81,16 +89,21 @@ struct nsScrollbarEvent : public nsGUIEvent {
|
||||
*/
|
||||
|
||||
struct nsKeyEvent : public nsGUIEvent {
|
||||
PRUint32 keyCode; // @see NS_VK codes
|
||||
PRBool isShift; // indicates whether the shift key in down
|
||||
PRBool isControl; // indicates whether the control key in down
|
||||
PRBool isAlt; // indicates whether the alt key in down
|
||||
/// see NS_VK codes
|
||||
PRUint32 keyCode;
|
||||
/// PR_TRUE indicates the shift key in down
|
||||
PRBool isShift;
|
||||
/// PR_TRUE indicates the control key in down
|
||||
PRBool isControl;
|
||||
/// PR_TRUE indicates the alt key in down
|
||||
PRBool isAlt;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
/**
|
||||
* GUI MESSAGES
|
||||
*/
|
||||
//@{
|
||||
|
||||
#define NS_WINDOW_START 100
|
||||
#define NS_CREATE (NS_WINDOW_START)
|
||||
@ -120,7 +133,7 @@ struct nsKeyEvent : public nsGUIEvent {
|
||||
#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)
|
||||
|
||||
//@}
|
||||
|
||||
/*
|
||||
* Virtual key bindings for keyboard events
|
||||
|
@ -27,7 +27,7 @@
|
||||
{ 0x961085f6, 0xbd28, 0x11d1, { 0x97, 0xef, 0x0, 0x60, 0x97, 0x3, 0xc1, 0x4e } };
|
||||
|
||||
/**
|
||||
* Single selection drop down list. @see nsIListWidget for capabilities
|
||||
* Single selection drop down list. See nsIListWidget for capabilities
|
||||
*/
|
||||
|
||||
class nsIComboBox : public nsIListWidget {
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "nsGUIEvent.h"
|
||||
|
||||
/*
|
||||
/**
|
||||
* Event listener interface.
|
||||
* Alternative to a callback for recieving events.
|
||||
*/
|
||||
@ -33,7 +33,7 @@ public:
|
||||
/**
|
||||
* Processes all events.
|
||||
* If a mouse listener is registered this method will not process mouse events.
|
||||
* @param anEvent the event to process. @see nsGUIEvent.h for event types.
|
||||
* @param anEvent the event to process. See nsGUIEvent.h for event types.
|
||||
*/
|
||||
|
||||
virtual nsEventStatus ProcessEvent(const nsGUIEvent & anEvent) = 0;
|
||||
|
@ -27,10 +27,14 @@
|
||||
|
||||
|
||||
/**
|
||||
* File selector mode { load | save }
|
||||
* File selector mode
|
||||
*/
|
||||
|
||||
enum nsMode { eMode_load, eMode_save };
|
||||
enum nsMode {
|
||||
/// Load a file or directory
|
||||
eMode_load,
|
||||
/// Save a file or directory
|
||||
eMode_save };
|
||||
|
||||
/**
|
||||
* File selector widget.
|
||||
@ -72,7 +76,7 @@ public:
|
||||
/**
|
||||
* Show File Dialog. The dialog is displayed modally.
|
||||
*
|
||||
* @return PR_TRUE if user selects <OK>, PR_FALSE if <CANCEL> is selected
|
||||
* @return PR_TRUE if user selects OK, PR_FALSE if user selects CANCEL
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -35,7 +35,7 @@ class nsIListBox : public nsIListWidget {
|
||||
public:
|
||||
|
||||
/**
|
||||
* Set the ListBox to be multi-select.
|
||||
* Set the listbox to be multi-select.
|
||||
* @param aMultiple PR_TRUE can have multiple selections. PR_FALSE single
|
||||
* selections only.
|
||||
* @return void
|
||||
|
@ -34,30 +34,30 @@ class nsIMouseListener {
|
||||
|
||||
/**
|
||||
* Processes a mouse pressed event
|
||||
* @param aMouseEvent @see nsGUIEvent.h
|
||||
* @return whether the event was consumed or ignored. @see nsEventStatus
|
||||
* @param aMouseEvent See nsGUIEvent.h
|
||||
* @return whether the event was consumed or ignored. See nsEventStatus
|
||||
*/
|
||||
virtual nsEventStatus MousePressed(const nsGUIEvent & aMouseEvent) = 0;
|
||||
|
||||
/**
|
||||
* Processes a mouse release event
|
||||
* @param aMouseEvent @see nsGUIEvent.h
|
||||
* @return whether the event was consumed or ignored. @see nsEventStatus
|
||||
* @param aMouseEvent See nsGUIEvent.h
|
||||
* @return whether the event was consumed or ignored. See nsEventStatus
|
||||
*/
|
||||
virtual nsEventStatus MouseReleased(const nsGUIEvent & aMouseEvent) = 0;
|
||||
|
||||
/**
|
||||
* Processes a mouse clicked event
|
||||
* @param aMouseEvent @see nsGUIEvent.h
|
||||
* @return whether the event was consumed or ignored. @see nsEventStatus
|
||||
* @param aMouseEvent See nsGUIEvent.h
|
||||
* @return whether the event was consumed or ignored. See nsEventStatus
|
||||
*
|
||||
*/
|
||||
virtual nsEventStatus MouseClicked(const nsGUIEvent & aMouseEvent) = 0;
|
||||
|
||||
/**
|
||||
* Processes a mouse moved event
|
||||
* @param aMouseEvent @see nsGUIEvent.h
|
||||
* @return whether the event was consumed or ignored. @see nsEventStatus
|
||||
* @param aMouseEvent See nsGUIEvent.h
|
||||
* @return whether the event was consumed or ignored. See nsEventStatus
|
||||
*/
|
||||
virtual nsEventStatus MouseMoved(const nsGUIEvent & aMouseEvent) = 0;
|
||||
|
||||
|
@ -29,9 +29,8 @@
|
||||
|
||||
/**
|
||||
*
|
||||
* Scrollbar.
|
||||
* Converts mouse input into values that can be used
|
||||
* to shift the contents of a window
|
||||
* Scrollbar, converts mouse input into values that can be used
|
||||
* to shift the contents of a window.
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
/**
|
||||
* Multi-line text editor.
|
||||
* @see nsITextWidget for capabilities.
|
||||
* See nsITextWidget for capabilities.
|
||||
* Displays a scrollbar when the text content exceeds the number of lines
|
||||
* displayed.
|
||||
*/
|
||||
|
@ -50,8 +50,8 @@ class nsITextWidget : public nsIWidget
|
||||
/**
|
||||
* Set the text of this component.
|
||||
*
|
||||
* @param nsString, the text to set, must be null terminated
|
||||
* @return PRUint32, the number of chars in the text string
|
||||
* @param aTextBuffer on return it contains the text contents.
|
||||
* @return the number of chars in the text string
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -39,7 +39,7 @@ struct nsRect;
|
||||
struct nsFont;
|
||||
|
||||
/**
|
||||
* Callback function that deals with events.
|
||||
* Callback function that processes events.
|
||||
* The argument is actually a subtype (subclass) of nsEvent which carries
|
||||
* platform specific information about the event. Platform specific code knows
|
||||
* how to deal with it.
|
||||
@ -50,7 +50,7 @@ typedef nsEventStatus (*PR_CALLBACK EVENT_CALLBACK)(nsGUIEvent *event);
|
||||
|
||||
/**
|
||||
* Flags for the getNativeData function.
|
||||
* @see getNativeData()
|
||||
* See getNativeData()
|
||||
*/
|
||||
#define NS_NATIVE_WINDOW 0
|
||||
#define NS_NATIVE_GRAPHIC 1
|
||||
@ -70,15 +70,15 @@ typedef void* nsNativeWindow;
|
||||
|
||||
/**
|
||||
* Cursor types.
|
||||
* eCursor_standard (normal cursor, usually rendered as an arrow)
|
||||
* eCursor_wait (system is busy, usually rendered as a hourglass or watch)
|
||||
* eCursor_select (Selecting something, usually rendered as an IBeam)
|
||||
* eCursor_hyperlink (can hyper-link, usually rendered as a human hand)
|
||||
*/
|
||||
|
||||
enum nsCursor { eCursor_standard,
|
||||
enum nsCursor { ///(normal cursor, usually rendered as an arrow)
|
||||
eCursor_standard,
|
||||
///(system is busy, usually rendered as a hourglass or watch)
|
||||
eCursor_wait,
|
||||
///(Selecting something, usually rendered as an IBeam)
|
||||
eCursor_select,
|
||||
///(can hyper-link, usually rendered as a human hand)
|
||||
eCursor_hyperlink };
|
||||
|
||||
/**
|
||||
@ -272,7 +272,7 @@ class nsIWidget : public nsISupports {
|
||||
/**
|
||||
* Set the font for this widget
|
||||
*
|
||||
* @param aFont font to display. @see nsFont for allowable fonts
|
||||
* @param aFont font to display. See nsFont for allowable fonts
|
||||
*/
|
||||
|
||||
virtual void SetFont(const nsFont &aFont) = 0;
|
||||
@ -315,7 +315,7 @@ class nsIWidget : public nsISupports {
|
||||
/**
|
||||
* Return the widget's toolkit
|
||||
*
|
||||
* @return the toolkit this widget was created in. @see nsToolkit.
|
||||
* @return the toolkit this widget was created in. See nsToolkit.
|
||||
*/
|
||||
|
||||
virtual nsIToolkit* GetToolkit() = 0;
|
||||
@ -340,36 +340,17 @@ class nsIWidget : public nsISupports {
|
||||
|
||||
virtual void Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect) = 0;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Internal methods
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal Method
|
||||
*/
|
||||
//@{
|
||||
virtual void AddChild(nsIWidget* aChild) = 0;
|
||||
|
||||
/**
|
||||
* Internal Method
|
||||
*/
|
||||
virtual void RemoveChild(nsIWidget* aChild) = 0;
|
||||
|
||||
/**
|
||||
* Internal Method
|
||||
*/
|
||||
virtual void* GetNativeData(PRUint32 aDataType) = 0;
|
||||
|
||||
/**
|
||||
* Internal Method
|
||||
*/
|
||||
virtual nsIRenderingContext* GetRenderingContext() = 0;
|
||||
|
||||
/**
|
||||
* Internal Method
|
||||
*/
|
||||
virtual nsIDeviceContext* GetDeviceContext() = 0;
|
||||
|
||||
|
||||
//@}
|
||||
};
|
||||
|
||||
#endif // nsIWidget_h__
|
||||
|
Loading…
Reference in New Issue
Block a user