mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
adding parameter to nsIWidget::ConstrainPosition. bug 113283r=hyatt,pavlov
This commit is contained in:
parent
7c0adc3167
commit
72d70d876a
@ -352,6 +352,10 @@ class nsIWidget : public nsISupports {
|
||||
* Perform platform-dependent sanity check on a potential window position.
|
||||
* This is guaranteed to work only for top-level windows.
|
||||
*
|
||||
* @param aAllowSlop: if true, allow the window to slop offscreen;
|
||||
* the window should be partially visible. if false,
|
||||
* force the entire window onscreen (or at least
|
||||
* the upper-left corner, if it's too large).
|
||||
* @param aX in: an x position expressed in screen coordinates.
|
||||
* out: the x position constrained to fit on the screen(s).
|
||||
* @param aY in: an y position expressed in screen coordinates.
|
||||
@ -359,7 +363,9 @@ class nsIWidget : public nsISupports {
|
||||
* @return vapid success indication. but see also the parameters.
|
||||
*
|
||||
**/
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY) = 0;
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX,
|
||||
PRInt32 *aY) = 0;
|
||||
|
||||
/**
|
||||
* Move this widget.
|
||||
|
@ -981,7 +981,7 @@ NS_METHOD nsWindow::IsVisible(PRBool & bState)
|
||||
// Sanity check potential move coordinates
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
NS_METHOD nsWindow::ConstrainPosition(PRInt32 *aX, PRInt32 *aY)
|
||||
NS_METHOD nsWindow::ConstrainPosition(PRBool aAllowSlop, PRInt32 *aX, PRInt32 *aY)
|
||||
{
|
||||
NS_WARNING("nsWindow::ConstrainPosition - not implemented");
|
||||
return NS_OK;
|
||||
|
@ -113,7 +113,8 @@ public:
|
||||
NS_IMETHOD CaptureRollupEvents(nsIRollupListener *aListener, PRBool aDoCapture, PRBool aConsumeRollupEvent);
|
||||
NS_IMETHOD IsVisible(PRBool & aState);
|
||||
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD Resize(PRInt32 aWidth,
|
||||
PRInt32 aHeight,
|
||||
|
@ -150,7 +150,8 @@ public:
|
||||
NS_IMETHOD ModalEventFilter(PRBool aRealEvent, void *aEvent,
|
||||
PRBool *aForWindow);
|
||||
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD Resize(PRInt32 aWidth,PRInt32 aHeight, PRBool aRepaint);
|
||||
NS_IMETHOD Resize(PRInt32 aX, PRInt32 aY,PRInt32 aWidth,PRInt32 aHeight, PRBool aRepaint);
|
||||
|
@ -799,7 +799,8 @@ NS_METHOD nsChildView::SetBounds(const nsRect &aRect)
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsChildView::ConstrainPosition(PRInt32 *aX, PRInt32 *aY)
|
||||
NS_IMETHODIMP nsChildView::ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -125,7 +125,8 @@ public:
|
||||
|
||||
virtual void* GetNativeData(PRUint32 aDataType) ;
|
||||
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD PlaceBehind(nsIWidget *aWidget, PRBool aActivate);
|
||||
NS_IMETHOD SetSizeMode(PRInt32 aMode);
|
||||
|
@ -920,7 +920,8 @@ NS_METHOD nsWindow::Restore(void)
|
||||
}
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP nsCocoaWindow::ConstrainPosition(PRInt32 *aX, PRInt32 *aY)
|
||||
NS_IMETHODIMP nsCocoaWindow::ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY)
|
||||
{
|
||||
#if 0
|
||||
if (eWindowType_popup == mWindowType || !mWindowMadeHere)
|
||||
@ -1737,4 +1738,4 @@ void StopResizing ( )
|
||||
printf("did move\n");
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
|
@ -480,7 +480,8 @@ NS_IMETHODIMP nsWidget::IsVisible(PRBool &aState)
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
NS_IMETHODIMP nsWidget::ConstrainPosition(PRInt32 *aX, PRInt32 *aY)
|
||||
NS_IMETHODIMP nsWidget::ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
NS_IMETHOD CaptureRollupEvents(nsIRollupListener *aListener, PRBool aDoCapture, PRBool aConsumeRollupEvent);
|
||||
NS_IMETHOD IsVisible(PRBool &aState);
|
||||
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop, PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD Resize(PRInt32 aWidth, PRInt32 aHeight, PRBool aRepaint);
|
||||
NS_IMETHOD Resize(PRInt32 aX, PRInt32 aY, PRInt32 aWidth,
|
||||
|
@ -86,7 +86,8 @@ public:
|
||||
NS_IMETHOD Show(PRBool aShow);
|
||||
NS_IMETHOD CaptureMouse(PRBool aCapture);
|
||||
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
|
||||
NS_IMETHOD Resize(PRInt32 aWidth, PRInt32 aHeight, PRBool aRepaint);
|
||||
|
@ -119,7 +119,7 @@ nsScrollbar::IsVisible(PRBool & aState)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsScrollbar::ConstrainPosition(PRInt32 *aX, PRInt32 *aY)
|
||||
nsScrollbar::ConstrainPosition(PRBool aAllowSlop, PRInt32 *aX, PRInt32 *aY)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ class nsScrollbar : public nsCommonWidget,
|
||||
nsWidgetInitData *aInitData = nsnull);
|
||||
NS_IMETHOD Destroy(void);
|
||||
NS_IMETHOD IsVisible(PRBool & aState);
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop, PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD Enable(PRBool aState);
|
||||
NS_IMETHOD SetFocus(PRBool aRaise = PR_FALSE);
|
||||
|
@ -194,7 +194,7 @@ nsWindow::IsVisible(PRBool & aState)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindow::ConstrainPosition(PRInt32 *aX, PRInt32 *aY)
|
||||
nsWindow::ConstrainPosition(PRBool aAllowSlop, PRInt32 *aX, PRInt32 *aY)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
@ -63,7 +63,8 @@ class nsWindow : public nsCommonWidget {
|
||||
NS_IMETHOD Destroy(void);
|
||||
NS_IMETHOD SetModal(PRBool aModal);
|
||||
NS_IMETHOD IsVisible(PRBool & aState);
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX,
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX,
|
||||
PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX,
|
||||
PRInt32 aY);
|
||||
|
@ -107,7 +107,8 @@ public:
|
||||
nsNativeWidget aNativeParent = nsnull);
|
||||
|
||||
NS_IMETHOD Show(PRBool aState);
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD PlaceBehind(nsIWidget *aWidget, PRBool aActivate);
|
||||
NS_IMETHOD SetSizeMode(PRInt32 aMode);
|
||||
|
@ -782,7 +782,8 @@ NS_METHOD nsWindow::SetBounds(const nsRect &aRect)
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsWindow::ConstrainPosition(PRInt32 *aX, PRInt32 *aY)
|
||||
NS_IMETHODIMP nsWindow::ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -128,7 +128,8 @@ public:
|
||||
NS_IMETHOD ModalEventFilter(PRBool aRealEvent, void *aEvent,
|
||||
PRBool *aForWindow);
|
||||
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD Resize(PRInt32 aWidth,PRInt32 aHeight, PRBool aRepaint);
|
||||
NS_IMETHOD Resize(PRInt32 aX, PRInt32 aY,PRInt32 aWidth,PRInt32 aHeight, PRBool aRepaint);
|
||||
|
@ -1189,7 +1189,8 @@ NS_METHOD nsWindow::ModalEventFilter(PRBool aRealEvent, void *aEvent,
|
||||
// Constrain a potential move to fit onscreen
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
NS_METHOD nsWindow::ConstrainPosition(PRInt32 *aX, PRInt32 *aY)
|
||||
NS_METHOD nsWindow::ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ class nsWindow : public nsBaseWidget,
|
||||
|
||||
// Physical properties
|
||||
NS_IMETHOD Show( PRBool bState);
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop, PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move( PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD Resize( PRInt32 aWidth,
|
||||
PRInt32 aHeight,
|
||||
|
@ -371,9 +371,10 @@ NS_METHOD nsWidget::IsVisible( PRBool &aState ) {
|
||||
// Constrain a potential move to see if it fits onscreen
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
NS_METHOD nsWidget::ConstrainPosition( PRInt32 *aX, PRInt32 *aY ) {
|
||||
NS_METHOD nsWidget::ConstrainPosition( PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY ) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
|
@ -99,7 +99,7 @@ public:
|
||||
NS_IMETHOD CaptureRollupEvents(nsIRollupListener *aListener, PRBool aDoCapture, PRBool aConsumeRollupEvent);
|
||||
NS_IMETHOD IsVisible(PRBool &aState);
|
||||
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop, PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD Resize(PRInt32 aWidth, PRInt32 aHeight, PRBool aRepaint);
|
||||
NS_IMETHOD Resize(PRInt32 aX, PRInt32 aY, PRInt32 aWidth,
|
||||
|
@ -1107,9 +1107,10 @@ NS_IMETHODIMP nsWindow::CaptureMouse( PRBool aCapture ) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD nsWindow::ConstrainPosition( PRInt32 *aX, PRInt32 *aY ) {
|
||||
NS_METHOD nsWindow::ConstrainPosition( PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY ) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
|
@ -80,7 +80,8 @@ public:
|
||||
NS_IMETHOD SetTitle(const nsString& aTitle);
|
||||
NS_IMETHOD CaptureMouse(PRBool aCapture);
|
||||
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
|
||||
NS_IMETHOD Resize(PRInt32 aWidth, PRInt32 aHeight, PRBool aRepaint);
|
||||
|
@ -244,7 +244,8 @@ NS_METHOD nsWidget::IsVisible(PRBool &aState)
|
||||
//-------------------------------------------------------------------------
|
||||
// Constrain a potential move so that it remains onscreen
|
||||
//-------------------------------------------------------------------------
|
||||
NS_METHOD nsWidget::ConstrainPosition(PRInt32 *aX, PRInt32 *aY)
|
||||
NS_METHOD nsWidget::ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
PRBool aConsumeRollupEvent);
|
||||
NS_IMETHOD IsVisible(PRBool &aState);
|
||||
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop, PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD Resize(PRInt32 aWidth, PRInt32 aHeight, PRBool aRepaint);
|
||||
NS_IMETHOD Resize(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight,
|
||||
|
@ -458,7 +458,8 @@ PRBool nsWindow::OnScroll(nsScrollbarEvent &aEvent, PRUint32 cPos)
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
NS_METHOD nsWindow::ConstrainPosition(PRInt32 *aX, PRInt32 *aY)
|
||||
NS_METHOD nsWindow::ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
NS_IMETHOD SetColorMap(nsColorMap *aColorMap);
|
||||
NS_IMETHOD Scroll(PRInt32 aDx,PRInt32 aDy,nsRect *aClipRect);
|
||||
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX,PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop, PRInt32 *aX,PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX,PRInt32 aY);
|
||||
|
||||
NS_IMETHOD CaptureRollupEvents(nsIRollupListener *aListener,
|
||||
|
@ -247,7 +247,8 @@ public:
|
||||
PRBool *aForWindow);
|
||||
|
||||
NS_IMETHOD CaptureMouse(PRBool aCapture);
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD Resize(PRInt32 aWidth,
|
||||
PRInt32 aHeight,
|
||||
|
@ -385,7 +385,8 @@ NS_IMETHODIMP nsWidget::Destroy()
|
||||
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWidget::ConstrainPosition(PRInt32 *aX, PRInt32 *aY)
|
||||
NS_IMETHODIMP nsWidget::ConstrainPosition(PRBool aAllowSlop,
|
||||
PRInt32 *aX, PRInt32 *aY)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ public:
|
||||
NS_IMETHOD Show(PRBool bState);
|
||||
NS_IMETHOD IsVisible(PRBool &aState);
|
||||
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD ConstrainPosition(PRBool aAllowSlop, PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD Resize(PRInt32 aWidth,
|
||||
PRInt32 aHeight,
|
||||
|
Loading…
Reference in New Issue
Block a user