Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Enumerations | Functions | Variables
nsNativeAppSupportMac.cpp File Reference
#include "nsNativeAppSupport.h"
#include "nsString.h"
#include <Gestalt.h>
#include <Dialogs.h>
#include <Resources.h>
#include <TextUtils.h>
#include <ControlDefinitions.h>
#include "nsCOMPtr.h"
#include "nsNativeAppSupportBase.h"
#include "nsIAppShellService.h"
#include "nsIAppStartup.h"
#include "nsIBaseWindow.h"
#include "nsICmdLineService.h"
#include "nsIDOMWindowInternal.h"
#include "nsIDocShellTreeItem.h"
#include "nsIDocShellTreeOwner.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIObserver.h"
#include "nsIServiceManager.h"
#include "nsIWebNavigation.h"
#include "nsIWidget.h"
#include "nsIWindowMediator.h"
#include "nsXPFEComponentsCID.h"

Go to the source code of this file.

Classes

class  nsNativeAppSupportMac

Defines

#define rSplashDialog   512

Enumerations

enum  {
  eOSXVersTooOldErrIndex = 1, eOSXVersTooOldExplanationIndex, eContinueButtonTextIndex, eQuitButtonTextIndex,
  eCarbonLibVersTooOldIndex, eCarbonLibVersTooOldExplanationIndex
}

Functions

static Boolean VersGreaterThan4 (const FSSpec *fSpec)
nsresult GetNativeWindowPointerFromDOMWindow (nsIDOMWindowInternal *window, WindowRef *nativeWindow)
nsresult NS_CreateNativeAppSupport (nsINativeAppSupport **aResult)
 Create the nativeappsupport implementation.

Variables

const OSType kNSCreator = 'MOSS'
const OSType kMozCreator = 'MOZZ'
const SInt16 kNSCanRunStrArrayID = 1000
const SInt16 kAnotherVersionStrIndex = 1
const SInt16 kNSOSVersErrsStrArrayID = 1001

Define Documentation

#define rSplashDialog   512

Definition at line 65 of file nsNativeAppSupportMac.cpp.


Enumeration Type Documentation

anonymous enum
Enumerator:
eOSXVersTooOldErrIndex 
eOSXVersTooOldExplanationIndex 
eContinueButtonTextIndex 
eQuitButtonTextIndex 
eCarbonLibVersTooOldIndex 
eCarbonLibVersTooOldExplanationIndex 

Definition at line 79 of file nsNativeAppSupportMac.cpp.


Function Documentation

nsresult GetNativeWindowPointerFromDOMWindow ( nsIDOMWindowInternal window,
WindowRef *  nativeWindow 
)

Create the nativeappsupport implementation.

Note:
XPCOMInit has not happened yet.

Definition at line 430 of file nsNativeAppSupportMac.cpp.

{
  if ( aResult )
  {  
      *aResult = new nsNativeAppSupportMac;
      if ( *aResult )
      {
          NS_ADDREF( *aResult );
          return NS_OK;
      } 
      else
      {
          return NS_ERROR_OUT_OF_MEMORY;
      }
  } 
  else
  {
      return NS_ERROR_NULL_POINTER;
  }
}

Here is the call graph for this function:

static Boolean VersGreaterThan4 ( const FSSpec fSpec) [static]

Definition at line 453 of file nsNativeAppSupportMac.cpp.

{
  Boolean result = false;
  short fRefNum = 0;
  
  ::SetResLoad(false);
  fRefNum = ::FSpOpenResFile(fSpec, fsRdPerm);
  ::SetResLoad(true);
  if (fRefNum != -1)
  {
    Handle  h;
    h = ::Get1Resource('vers', 2);
    if (h && **(unsigned short**)h >= 0x0500)
      result = true;
    ::CloseResFile(fRefNum);
  }
    
  return result;
}

Here is the call graph for this function:


Variable Documentation

Definition at line 72 of file nsNativeAppSupportMac.cpp.

Definition at line 70 of file nsNativeAppSupportMac.cpp.

const SInt16 kNSCanRunStrArrayID = 1000

Definition at line 71 of file nsNativeAppSupportMac.cpp.

Definition at line 69 of file nsNativeAppSupportMac.cpp.

Definition at line 77 of file nsNativeAppSupportMac.cpp.