зеркало из https://github.com/mozilla/pjs.git
make sure all headers have an include guard, standardize include guards, remove some unnecessary includes, remove some unnecessary non-cairo code, standardize usage of #import vs. #includes, the rule is now to use #import for Apple frameworks and #include for everything else. b=367273 r=kreeger
This commit is contained in:
Родитель
7751c24072
Коммит
1a71aaaa9b
|
@ -35,6 +35,9 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef mozView_h_
|
||||
#define mozView_h_
|
||||
|
||||
#undef DARWIN
|
||||
#import <Cocoa/Cocoa.h>
|
||||
class nsIWidget;
|
||||
|
@ -90,3 +93,5 @@ class nsIWidget;
|
|||
- (void)setSuppressMakeKeyFront:(BOOL)inSuppress;
|
||||
|
||||
@end
|
||||
|
||||
#endif // mozView_h_
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
* Gecko events.
|
||||
*/
|
||||
|
||||
#ifndef nsAppShell_h__
|
||||
#define nsAppShell_h__
|
||||
#ifndef nsAppShell_h_
|
||||
#define nsAppShell_h_
|
||||
|
||||
#include "nsBaseAppShell.h"
|
||||
|
||||
|
@ -81,4 +81,4 @@ protected:
|
|||
PRPackedBool mTerminated;
|
||||
};
|
||||
|
||||
#endif // nsAppShell_h__
|
||||
#endif // nsAppShell_h_
|
||||
|
|
|
@ -38,8 +38,9 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef __nsBidiKeyboard
|
||||
#define __nsBidiKeyboard
|
||||
#ifndef nsBidiKeyboard_h_
|
||||
#define nsBidiKeyboard_h_
|
||||
|
||||
#include "nsIBidiKeyboard.h"
|
||||
|
||||
class nsBidiKeyboard : public nsIBidiKeyboard
|
||||
|
@ -53,4 +54,4 @@ public:
|
|||
};
|
||||
|
||||
|
||||
#endif // __nsBidiKeyboard
|
||||
#endif // nsBidiKeyboard_h_
|
||||
|
|
|
@ -39,7 +39,8 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsBidiKeyboard.h"
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
#import <Carbon/Carbon.h>
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsBidiKeyboard, nsIBidiKeyboard)
|
||||
|
||||
|
|
|
@ -35,14 +35,14 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsChildView_h__
|
||||
#define nsChildView_h__
|
||||
#ifndef nsChildView_h_
|
||||
#define nsChildView_h_
|
||||
|
||||
// formal protocols
|
||||
#import "mozView.h"
|
||||
#include "mozView.h"
|
||||
#ifdef ACCESSIBILITY
|
||||
#include "nsIAccessible.h"
|
||||
#import "mozAccessibleProtocol.h"
|
||||
#include "mozAccessibleProtocol.h"
|
||||
#endif
|
||||
|
||||
#include "nsAutoPtr.h"
|
||||
|
@ -64,7 +64,7 @@
|
|||
#include "nsIMenuBar.h"
|
||||
|
||||
#include "nsplugindefs.h"
|
||||
#include <Quickdraw.h>
|
||||
#import <Quickdraw.h>
|
||||
|
||||
class gfxASurface;
|
||||
|
||||
|
@ -326,4 +326,4 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
#endif // nsChildView_h__
|
||||
#endif // nsChildView_h_
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsClipboard_h__
|
||||
#define nsClipboard_h__
|
||||
#ifndef nsClipboard_h_
|
||||
#define nsClipboard_h_
|
||||
|
||||
#include "nsBaseClipboard.h"
|
||||
|
||||
|
@ -62,4 +62,4 @@ protected:
|
|||
|
||||
};
|
||||
|
||||
#endif // nsClipboard_h__
|
||||
#endif // nsClipboard_h_
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#include "nsMemory.h"
|
||||
#include "nsIImage.h"
|
||||
|
||||
#include <Cocoa/Cocoa.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
nsClipboard::nsClipboard() : nsBaseClipboard()
|
||||
{
|
||||
|
|
|
@ -35,8 +35,9 @@
|
|||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#ifndef MacWindow_h__
|
||||
#define MacWindow_h__
|
||||
|
||||
#ifndef nsCocoaWindow_h_
|
||||
#define nsCocoaWindow_h_
|
||||
|
||||
#undef DARWIN
|
||||
|
||||
|
@ -179,4 +180,4 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
#endif // MacWindow_h__
|
||||
#endif // nsCocoaWindow_h_
|
||||
|
|
|
@ -33,9 +33,12 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsCursorManager_h_
|
||||
#define nsCursorManager_h_
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "nsIWidget.h"
|
||||
#import "nsMacCursor.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsMacCursor.h"
|
||||
|
||||
/*! @class nsCursorManager
|
||||
@abstract Singleton service provides access to all cursors available in the application.
|
||||
|
@ -71,3 +74,5 @@
|
|||
*/
|
||||
+ (void) dispose;
|
||||
@end
|
||||
|
||||
#endif // nsCursorManager_h_
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import "nsCursorManager.h"
|
||||
#import "math.h"
|
||||
#include "nsCursorManager.h"
|
||||
#include <math.h>
|
||||
|
||||
static nsCursorManager *gInstance;
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsDeviceContextSpecX_h___
|
||||
#define nsDeviceContextSpecX_h___
|
||||
#ifndef nsDeviceContextSpecX_h_
|
||||
#define nsDeviceContextSpecX_h_
|
||||
|
||||
#include "nsIDeviceContextSpec.h"
|
||||
#include "nsIPrintingContext.h"
|
||||
|
@ -45,9 +45,6 @@
|
|||
#include <PMApplication.h>
|
||||
|
||||
class nsDeviceContextSpecX : public nsIDeviceContextSpec
|
||||
#ifndef MOZ_CAIRO_GFX
|
||||
, public nsIPrintingContext
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -57,14 +54,12 @@ public:
|
|||
nsDeviceContextSpecX();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
#ifdef MOZ_CAIRO_GFX
|
||||
NS_IMETHOD GetSurfaceForPrinter(gfxASurface **surface);
|
||||
NS_IMETHOD BeginDocument(PRUnichar* aTitle,
|
||||
PRUnichar* aPrintToFileName,
|
||||
PRInt32 aStartPage,
|
||||
PRInt32 aEndPage) { return NS_ERROR_NOT_IMPLEMENTED; }
|
||||
NS_IMETHOD EndDocument() { return NS_ERROR_NOT_IMPLEMENTED; }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Initialize the nsDeviceContextSpecX for use. This will allocate a printrecord for use
|
||||
|
@ -95,21 +90,6 @@ public:
|
|||
*/
|
||||
NS_IMETHOD ClosePrintManager();
|
||||
|
||||
#ifndef MOZ_CAIRO_GFX
|
||||
NS_IMETHOD BeginDocument(PRUnichar* aTitle,
|
||||
PRUnichar* aPrintToFileName,
|
||||
PRInt32 aStartPage,
|
||||
PRInt32 aEndPage);
|
||||
|
||||
NS_IMETHOD EndDocument();
|
||||
|
||||
NS_IMETHOD AbortDocument();
|
||||
|
||||
NS_IMETHOD BeginPage();
|
||||
|
||||
NS_IMETHOD EndPage();
|
||||
#endif
|
||||
|
||||
NS_IMETHOD GetPrinterResolution(double* aResolution);
|
||||
|
||||
NS_IMETHOD GetPageRect(double* aTop, double* aLeft, double* aBottom, double* aRight);
|
||||
|
@ -129,4 +109,4 @@ protected:
|
|||
PRBool mBeganPrinting;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // nsDeviceContextSpecX_h_
|
||||
|
|
|
@ -49,10 +49,8 @@
|
|||
#include "nsIPrintOptions.h"
|
||||
#include "nsIPrintSettingsX.h"
|
||||
|
||||
#ifdef MOZ_CAIRO_GFX
|
||||
#include "gfxQuartzSurface.h"
|
||||
#include "gfxQuartzPDFSurface.h"
|
||||
#endif
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Construct the nsDeviceContextSpecX
|
||||
|
@ -78,11 +76,8 @@ nsDeviceContextSpecX::~nsDeviceContextSpecX()
|
|||
ClosePrintManager();
|
||||
}
|
||||
|
||||
#ifdef MOZ_CAIRO_GFX
|
||||
NS_IMPL_ISUPPORTS1(nsDeviceContextSpecX, nsIDeviceContextSpec)
|
||||
#else
|
||||
NS_IMPL_ISUPPORTS2(nsDeviceContextSpecX, nsIDeviceContextSpec, nsIPrintingContext)
|
||||
#endif
|
||||
|
||||
/** -------------------------------------------------------
|
||||
* Initialize the nsDeviceContextSpecMac
|
||||
* @update dc 12/02/98
|
||||
|
@ -132,73 +127,6 @@ NS_IMETHODIMP nsDeviceContextSpecX::ClosePrintManager()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifndef MOZ_CAIRO_GFX
|
||||
NS_IMETHODIMP nsDeviceContextSpecX::BeginDocument(PRUnichar* aTitle,
|
||||
PRUnichar* aPrintToFileName,
|
||||
PRInt32 aStartPage,
|
||||
PRInt32 aEndPage)
|
||||
{
|
||||
if (aTitle) {
|
||||
CFStringRef cfString = ::CFStringCreateWithCharacters(NULL, aTitle, nsCRT::strlen(aTitle));
|
||||
if (cfString) {
|
||||
::PMSetJobNameCFString(mPrintSettings, cfString);
|
||||
::CFRelease(cfString);
|
||||
}
|
||||
}
|
||||
|
||||
OSStatus status;
|
||||
status = ::PMSetFirstPage(mPrintSettings, aStartPage, false);
|
||||
NS_ASSERTION(status == noErr, "PMSetFirstPage failed");
|
||||
status = ::PMSetLastPage(mPrintSettings, aEndPage, false);
|
||||
NS_ASSERTION(status == noErr, "PMSetLastPage failed");
|
||||
|
||||
status = ::PMSessionBeginDocument(mPrintSession, mPrintSettings, mPageFormat);
|
||||
if (status != noErr) return NS_ERROR_ABORT;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecX::EndDocument()
|
||||
{
|
||||
::PMSessionEndDocument(mPrintSession);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecX::AbortDocument()
|
||||
{
|
||||
return EndDocument();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecX::BeginPage()
|
||||
{
|
||||
OSStatus status = ::PMSessionBeginPage(mPrintSession, mPageFormat, NULL);
|
||||
if (status != noErr) return NS_ERROR_ABORT;
|
||||
|
||||
#ifndef MOZ_CAIRO_GFX
|
||||
::GetPort(&mSavedPort);
|
||||
void *graphicsContext;
|
||||
status = ::PMSessionGetGraphicsContext(mPrintSession, kPMGraphicsContextQuickdraw, &graphicsContext);
|
||||
if (status != noErr)
|
||||
return NS_ERROR_ABORT;
|
||||
::SetPort((CGrafPtr)graphicsContext);
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecX::EndPage()
|
||||
{
|
||||
OSStatus status = ::PMSessionEndPage(mPrintSession);
|
||||
if (mSavedPort)
|
||||
{
|
||||
::SetPort(mSavedPort);
|
||||
mSavedPort = 0;
|
||||
}
|
||||
if (status != noErr)
|
||||
return NS_ERROR_ABORT;
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP nsDeviceContextSpecX::GetPrinterResolution(double* aResolution)
|
||||
{
|
||||
PMPrinter printer;
|
||||
|
@ -224,7 +152,6 @@ NS_IMETHODIMP nsDeviceContextSpecX::GetPageRect(double* aTop, double* aLeft, dou
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef MOZ_CAIRO_GFX
|
||||
NS_IMETHODIMP nsDeviceContextSpecX::GetSurfaceForPrinter(gfxASurface **surface)
|
||||
{
|
||||
// PDF surface -- prints to file and then uses cups to spool
|
||||
|
@ -248,4 +175,3 @@ NS_IMETHODIMP nsDeviceContextSpecX::GetSurfaceForPrinter(gfxASurface **surface)
|
|||
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsDragService_h__
|
||||
#define nsDragService_h__
|
||||
#ifndef nsDragService_h_
|
||||
#define nsDragService_h_
|
||||
|
||||
#include "nsBaseDragService.h"
|
||||
|
||||
|
@ -65,4 +65,4 @@ private:
|
|||
|
||||
};
|
||||
|
||||
#endif // nsDragService_h__
|
||||
#endif // nsDragService_h_
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
#include "nsIView.h"
|
||||
#include "nsIRegion.h"
|
||||
|
||||
#include <Cocoa/Cocoa.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
extern NSPasteboard* globalDragPboard;
|
||||
extern NSView* globalDragView;
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsFilePicker_h__
|
||||
#define nsFilePicker_h__
|
||||
#ifndef nsFilePicker_h_
|
||||
#define nsFilePicker_h_
|
||||
|
||||
#include "nsBaseFilePicker.h"
|
||||
#include "nsString.h"
|
||||
|
@ -110,4 +110,4 @@ protected:
|
|||
|
||||
};
|
||||
|
||||
#endif // nsFilePicker_h__
|
||||
#endif // nsFilePicker_h_
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
// so we can use CFURLGetFSRef.
|
||||
|
||||
#undef DARWIN
|
||||
#include <Cocoa/Cocoa.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#define DARWIN
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef __nsLookAndFeel
|
||||
#define __nsLookAndFeel
|
||||
#ifndef nsLookAndFeel_h_
|
||||
#define nsLookAndFeel_h_
|
||||
#include "nsXPLookAndFeel.h"
|
||||
|
||||
class nsLookAndFeel: public nsXPLookAndFeel {
|
||||
|
@ -72,4 +72,4 @@ typedef enum {
|
|||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // nsLookAndFeel_h_
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsMacCursor_h_
|
||||
#define nsMacCursor_h_
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <Carbon/Carbon.h>
|
||||
|
||||
|
@ -119,4 +122,7 @@
|
|||
@result YES if the cursor is animated (has more than one frame), NO if it is a simple static cursor.
|
||||
*/
|
||||
- (BOOL) isAnimated;
|
||||
|
||||
@end
|
||||
|
||||
#endif // nsMacCursor_h_
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import "nsMacCursor.h"
|
||||
#import "nsDebug.h"
|
||||
#include "nsMacCursor.h"
|
||||
#include "nsDebug.h"
|
||||
|
||||
/*! @category nsMacCursor (PrivateMethods)
|
||||
@abstract Private methods internal to the nsMacCursor class.
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsMenuBarX_h__
|
||||
#define nsMenuBarX_h__
|
||||
#ifndef nsMenuBarX_h_
|
||||
#define nsMenuBarX_h_
|
||||
|
||||
#include "nsIMenuBar.h"
|
||||
#include "nsIMenuListener.h"
|
||||
|
@ -169,4 +169,4 @@ protected:
|
|||
static EventHandlerUPP sCommandEventHandler; // carbon event handler for commands, shared
|
||||
};
|
||||
|
||||
#endif // nsMenuBarX_h__
|
||||
#endif // nsMenuBarX_h_
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsMenuItemX_h__
|
||||
#define nsMenuItemX_h__
|
||||
#ifndef nsMenuItemX_h_
|
||||
#define nsMenuItemX_h_
|
||||
|
||||
#include "nsIMenuItem.h"
|
||||
#include "nsString.h"
|
||||
|
@ -46,7 +46,7 @@
|
|||
#include "nsWeakReference.h"
|
||||
#include "nsIWidget.h"
|
||||
|
||||
#include <Cocoa/Cocoa.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
class nsIMenu;
|
||||
|
||||
|
@ -124,4 +124,4 @@ protected:
|
|||
EMenuItemType mMenuType;
|
||||
};
|
||||
|
||||
#endif // nsMenuItem_h__
|
||||
#endif // nsMenuItemX_h_
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsMenuX_h__
|
||||
#define nsMenuX_h__
|
||||
#ifndef nsMenuX_h_
|
||||
#define nsMenuX_h_
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIMenu.h"
|
||||
|
@ -162,4 +162,4 @@ protected:
|
|||
PRPackedBool mVisible; // are we visible to the user?
|
||||
};
|
||||
|
||||
#endif // nsMenuX_h__
|
||||
#endif // nsMenuX_h_
|
||||
|
|
|
@ -1,139 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla 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/MPL/
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* 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 MPL, 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 ***** */
|
||||
|
||||
|
||||
#ifndef nsNativeScrollbar_h__
|
||||
#define nsNativeScrollbar_h__
|
||||
|
||||
#import <Carbon/Carbon.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#include "mozView.h"
|
||||
#include "nsChildView.h"
|
||||
|
||||
#include "nsINativeScrollbar.h"
|
||||
#include "nsIContent.h"
|
||||
|
||||
class nsIScrollbarMediator;
|
||||
|
||||
@class NativeScrollbarView;
|
||||
|
||||
//
|
||||
// nsNativeScrollbar
|
||||
//
|
||||
// A wrapper around a MacOS native scrollbar that knows how to work
|
||||
// with a stub gecko frame to scroll in the GFXScrollFrame mechanism
|
||||
//
|
||||
|
||||
class nsNativeScrollbar : public nsChildView, public nsINativeScrollbar
|
||||
{
|
||||
private:
|
||||
typedef nsChildView Inherited;
|
||||
|
||||
public:
|
||||
nsNativeScrollbar();
|
||||
virtual ~nsNativeScrollbar();
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSINATIVESCROLLBAR
|
||||
|
||||
// called from the NativeScrollbarView when someone hits a part
|
||||
// of the scrollbar.
|
||||
void DoScroll(NSScrollerPart inPart);
|
||||
|
||||
protected:
|
||||
|
||||
// nsWindow Interface
|
||||
virtual PRBool DispatchMouseEvent(nsMouseEvent &aEvent);
|
||||
NS_IMETHOD Enable(PRBool aState);
|
||||
NS_IMETHOD IsEnabled(PRBool* outState);
|
||||
|
||||
NSScroller* GetControl() { return (NSScroller*)mView; }
|
||||
|
||||
void UpdateContentPosition(PRUint32 inNewPos);
|
||||
|
||||
void RecreateHorizontalScrollbar();
|
||||
|
||||
virtual NSView* CreateCocoaView(NSRect inFrame);
|
||||
|
||||
void UpdateScroller();
|
||||
|
||||
NativeScrollbarView* ScrollbarView() const { return (NativeScrollbarView*)mView; }
|
||||
|
||||
// DATA
|
||||
private:
|
||||
|
||||
nsIContent* mContent; // the content node that affects the scrollbar's value
|
||||
nsIScrollbarMediator* mMediator; // for scrolling with outliners
|
||||
nsISupports* mScrollbar; // for calling into the mediator
|
||||
|
||||
PRUint32 mValue;
|
||||
PRUint32 mMaxValue;
|
||||
PRUint32 mVisibleImageSize;
|
||||
PRUint32 mLineIncrement;
|
||||
PRBool mIsEnabled;
|
||||
};
|
||||
|
||||
|
||||
@interface NativeScrollbarView : NSScroller<mozView>
|
||||
{
|
||||
// Our window [WEAK]
|
||||
NSWindow* mWindow;
|
||||
|
||||
// the nsNativeScrollbar that created this view. It retains this NSView, so
|
||||
// the link back to it must be weak. [WEAK]
|
||||
nsNativeScrollbar* mGeckoChild;
|
||||
|
||||
// YES when we're in a tracking loop
|
||||
BOOL mInTracking;
|
||||
|
||||
// rects that were invalidated during a draw, so have pending drawing
|
||||
NSMutableArray* mPendingDirtyRects;
|
||||
BOOL mPendingFullDisplay;
|
||||
}
|
||||
|
||||
// default initializer
|
||||
- (id)initWithFrame:(NSRect)frameRect geckoChild:(nsNativeScrollbar*)inChild;
|
||||
// overridden parent class initializer
|
||||
- (id)initWithFrame:(NSRect)frameRect;
|
||||
|
||||
- (IBAction)scroll:(NSScroller*)sender;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
#endif // nsNativeScrollbar_
|
|
@ -35,7 +35,10 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <Carbon/Carbon.h>
|
||||
#ifndef nsNativeThemeCocoa_h_
|
||||
#define nsNativeThemeCocoa_h_
|
||||
|
||||
#import <Carbon/Carbon.h>
|
||||
|
||||
#include "nsITheme.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
@ -123,3 +126,5 @@ protected:
|
|||
const HIRect& inBoxRect, PRBool inChecked,
|
||||
PRBool inDisabled, PRInt32 inState);
|
||||
};
|
||||
|
||||
#endif // nsNativeThemeCocoa_h_
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#include "nsIRenderingContext.h"
|
||||
#include "nsRect.h"
|
||||
#include "nsSize.h"
|
||||
#include "nsTransform2D.h"
|
||||
#include "nsThemeConstants.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsPresContext.h"
|
||||
|
@ -53,7 +52,6 @@
|
|||
#include "nsINameSpaceManager.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsILookAndFeel.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsWidgetAtoms.h"
|
||||
|
||||
#include "gfxContext.h"
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsPrintOptionsX_h__
|
||||
#define nsPrintOptionsX_h__
|
||||
#ifndef nsPrintOptionsX_h_
|
||||
#define nsPrintOptionsX_h_
|
||||
|
||||
#include "nsPrintOptionsImpl.h"
|
||||
|
||||
|
@ -64,4 +64,4 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
#endif /* nsPrintOptionsX_h__ */
|
||||
#endif // nsPrintOptionsX_h_
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <PMApplication.h>
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsPrintOptionsX.h"
|
||||
|
@ -48,21 +46,16 @@
|
|||
#include "prmem.h"
|
||||
|
||||
|
||||
/** ---------------------------------------------------
|
||||
*/
|
||||
nsPrintOptionsX::nsPrintOptionsX()
|
||||
{
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------
|
||||
*/
|
||||
|
||||
nsPrintOptionsX::~nsPrintOptionsX()
|
||||
{
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* See documentation in nsPrintOptionsImpl.h
|
||||
*/
|
||||
|
||||
nsresult nsPrintOptionsX::_CreatePrintSettings(nsIPrintSettings **_retval)
|
||||
{
|
||||
nsresult rv;
|
||||
|
@ -84,17 +77,16 @@ nsresult nsPrintOptionsX::_CreatePrintSettings(nsIPrintSettings **_retval)
|
|||
return rv;
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrintOptionsX::ShowPrintSetupDialog(nsIPrintSettings *aThePrintSettings)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* [noscript] voidPtr GetNativeData (in short aDataType); */
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPrintOptionsX::GetNativeData(PRInt16 aDataType, void * *_retval)
|
||||
nsPrintOptionsX::GetNativeData(PRInt16 aDataType, void **_retval)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
*_retval = nsnull;
|
||||
|
@ -102,8 +94,10 @@ nsPrintOptionsX::GetNativeData(PRInt16 aDataType, void * *_retval)
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
|
||||
|
||||
nsresult
|
||||
nsPrintOptionsX::ReadPrefs(nsIPrintSettings* aPS, const nsAString& aPrinterName, PRUint32 aFlags)
|
||||
{
|
||||
|
@ -121,6 +115,7 @@ nsPrintOptionsX::ReadPrefs(nsIPrintSettings* aPS, const nsAString& aPrinterName,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsPrintOptionsX::WritePrefs(nsIPrintSettings* aPS, const nsAString& aPrinterName, PRUint32 aFlags)
|
||||
{
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsPrintSessionX_h__
|
||||
#define nsPrintSessionX_h__
|
||||
#ifndef nsPrintSessionX_h_
|
||||
#define nsPrintSessionX_h_
|
||||
|
||||
#include "nsPrintSession.h"
|
||||
#include "nsIPrintSessionX.h"
|
||||
|
@ -62,4 +62,4 @@ protected:
|
|||
PMPrintSession mSession;
|
||||
};
|
||||
|
||||
#endif // nsPrintSessionX_h__
|
||||
#endif // nsPrintSessionX_h_
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsPrintSettingsX_h__
|
||||
#define nsPrintSettingsX_h__
|
||||
#ifndef nsPrintSettingsX_h_
|
||||
#define nsPrintSettingsX_h_
|
||||
|
||||
#include "nsPrintSettingsImpl.h"
|
||||
#include "nsIPrintSettingsX.h"
|
||||
|
@ -73,4 +73,4 @@ protected:
|
|||
PMPrintSettings mPrintSettings;
|
||||
};
|
||||
|
||||
#endif /* nsPrintSettingsX_h__ */
|
||||
#endif // nsPrintSettingsX_h_
|
||||
|
|
|
@ -36,10 +36,10 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef NS_SCREEN_COCOA_H_
|
||||
#define NS_SCREEN_COCOA_H_
|
||||
#ifndef nsScreenCocoa_h_
|
||||
#define nsScreenCocoa_h_
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#include "nsIScreen.h"
|
||||
|
||||
|
@ -59,4 +59,4 @@ private:
|
|||
NSScreen *mScreen;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // nsScreenCocoa_h_
|
||||
|
|
|
@ -36,10 +36,10 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef NS_SCREEN_MANAGER_COCOA_H_
|
||||
#define NS_SCREEN_MANAGER_COCOA_H_
|
||||
#ifndef nsScreenManagerCocoa_h_
|
||||
#define nsScreenManagerCocoa_h_
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#include "nsCOMArray.h"
|
||||
|
||||
|
@ -64,4 +64,4 @@ private:
|
|||
nsCOMArray<nsScreenCocoa> mScreenList;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // nsScreenManagerCocoa_h_
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef NSSOUND_H_
|
||||
#define NSSOUND_H_
|
||||
#ifndef nsSound_h_
|
||||
#define nsSound_h_
|
||||
|
||||
#include "nsISound.h"
|
||||
#include "nsIStreamLoader.h"
|
||||
|
@ -57,4 +57,4 @@ public:
|
|||
NS_DECL_NSISTREAMLOADEROBSERVER
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // nsSound_h_
|
||||
|
|
|
@ -40,9 +40,7 @@
|
|||
|
||||
#include "nsSound.h"
|
||||
|
||||
#include <Foundation/NSData.h>
|
||||
#include <AppKit/NSSound.h>
|
||||
#include <AppKit/AppKit.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
|
|
@ -36,9 +36,12 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsToolkit_h_
|
||||
#define nsToolkit_h_
|
||||
|
||||
#include "nsIToolkit.h"
|
||||
|
||||
#include <IOKit/IOKitLib.h>
|
||||
#import <IOKit/IOKitLib.h>
|
||||
|
||||
/**
|
||||
* The toolkit abstraction is necessary because the message pump must
|
||||
|
@ -95,3 +98,5 @@ protected:
|
|||
};
|
||||
|
||||
extern nsToolkit* NS_CreateToolkitInstance();
|
||||
|
||||
#endif // nsToolkit_h_
|
||||
|
|
|
@ -47,12 +47,9 @@
|
|||
#include <mach/mach_interface.h>
|
||||
#include <mach/mach_init.h>
|
||||
|
||||
#include <IOKit/pwr_mgt/IOPMLib.h>
|
||||
#include <IOKit/IOMessage.h>
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <Carbon/Carbon.h>
|
||||
#include <Gestalt.h>
|
||||
#import <Carbon/Carbon.h>
|
||||
#import <IOKit/pwr_mgt/IOPMLib.h>
|
||||
#import <IOKit/IOMessage.h>
|
||||
|
||||
#include "nsWidgetAtoms.h"
|
||||
|
||||
|
|
|
@ -36,7 +36,10 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#ifndef nsWindowMap_h_
|
||||
#define nsWindowMap_h_
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
//
|
||||
// WindowDataMap
|
||||
|
@ -88,3 +91,4 @@
|
|||
|
||||
@end
|
||||
|
||||
#endif // nsWindowMap_h_
|
||||
|
|
|
@ -37,10 +37,10 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#import "nsWindowMap.h"
|
||||
#include "nsWindowMap.h"
|
||||
|
||||
#import "nsChildView.h"
|
||||
#import "nsCocoaWindow.h"
|
||||
#include "nsChildView.h"
|
||||
#include "nsCocoaWindow.h"
|
||||
|
||||
@interface WindowDataMap(Private)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче