Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions | Variables
nsWidgetFactory.cpp File Reference
#include "nsIGenericFactory.h"
#include "nsWidgetsCID.h"
#include "nsAppShell.h"
#include "nsBaseWidget.h"
#include "nsLookAndFeel.h"
#include "nsWindow.h"
#include "nsTransferable.h"
#include "nsClipboardHelper.h"
#include "nsHTMLFormatConverter.h"
#include "nsClipboard.h"
#include "nsDragService.h"
#include "nsFilePicker.h"
#include "nsSound.h"
#include "nsBidiKeyboard.h"
#include "nsNativeKeyBindings.h"
#include "nsIPrefService.h"
#include "nsIPrefBranch.h"
#include "nsIComponentRegistrar.h"
#include "nsComponentManagerUtils.h"
#include "nsAutoPtr.h"
#include <gtk/gtk.h>

Go to the source code of this file.

Defines

#define XULFILEPICKER_CID

Functions

static NS_DEFINE_CID (kXULFilePickerCID, XULFILEPICKER_CID)
static NS_DEFINE_CID (kNativeFilePickerCID, NS_FILEPICKER_CID)
static NS_IMETHODIMP nsFilePickerConstructor (nsISupports *aOuter, REFNSIID aIID, void **aResult)
static NS_IMETHODIMP nsNativeKeyBindingsConstructor (nsISupports *aOuter, REFNSIID aIID, void **aResult, NativeKeyBindingsType aKeyBindingsType)
static NS_IMETHODIMP nsNativeKeyBindingsInputConstructor (nsISupports *aOuter, REFNSIID aIID, void **aResult)
static NS_IMETHODIMP nsNativeKeyBindingsTextAreaConstructor (nsISupports *aOuter, REFNSIID aIID, void **aResult)
 nsWidgetGtk2ModuleDtor (nsIModule *aSelf)

Variables

static const nsModuleComponentInfo components []

Define Documentation

Value:
{ 0x54ae32f8, 0x1dd2, 0x11b2, \
    { 0xa2, 0x09, 0xdf, 0x7c, 0x50, 0x53, 0x70, 0xf8} }

Definition at line 63 of file nsWidgetFactory.cpp.


Function Documentation

static NS_DEFINE_CID ( kXULFilePickerCID  ,
XULFILEPICKER_CID   
) [static]
static NS_DEFINE_CID ( kNativeFilePickerCID  ,
NS_FILEPICKER_CID   
) [static]
static NS_IMETHODIMP nsFilePickerConstructor ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
) [static]

Definition at line 82 of file nsWidgetFactory.cpp.

{
  *aResult = nsnull;
  if (aOuter != nsnull) {
    return NS_ERROR_NO_AGGREGATION;
  }

  PRBool allowPlatformPicker = PR_TRUE;
  nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
  if (prefs) {
    PRBool prefAllow;
    nsresult rv = prefs->GetBoolPref("ui.allow_platform_file_picker",
                                     &prefAllow);
    if (NS_SUCCEEDED(rv)) {
        allowPlatformPicker = prefAllow;
    }
  }

  nsCOMPtr<nsIFilePicker> picker;
  if (allowPlatformPicker && gtk_check_version(2,6,3) == NULL) {
    picker = new nsFilePicker;
  } else {
    picker = do_CreateInstance(kXULFilePickerCID);
  }

  if (!picker) {
    return NS_ERROR_OUT_OF_MEMORY;
  }

  return picker->QueryInterface(aIID, aResult);
}

Here is the call graph for this function:

static NS_IMETHODIMP nsNativeKeyBindingsConstructor ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult,
NativeKeyBindingsType  aKeyBindingsType 
) [static]

Definition at line 116 of file nsWidgetFactory.cpp.

{
    nsresult rv;

    nsNativeKeyBindings *inst;

    *aResult = NULL;
    if (NULL != aOuter) {
        rv = NS_ERROR_NO_AGGREGATION;
        return rv;
    }

    NS_NEWXPCOM(inst, nsNativeKeyBindings);
    if (NULL == inst) {
        rv = NS_ERROR_OUT_OF_MEMORY;
        return rv;
    }
    NS_ADDREF(inst);
    inst->Init(aKeyBindingsType);
    rv = inst->QueryInterface(aIID, aResult);
    NS_RELEASE(inst);

    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static NS_IMETHODIMP nsNativeKeyBindingsInputConstructor ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
) [static]

Definition at line 144 of file nsWidgetFactory.cpp.

Here is the call graph for this function:

static NS_IMETHODIMP nsNativeKeyBindingsTextAreaConstructor ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
) [static]

Definition at line 152 of file nsWidgetFactory.cpp.

Here is the call graph for this function:

Definition at line 224 of file nsWidgetFactory.cpp.

Here is the call graph for this function:


Variable Documentation

Definition at line 159 of file nsWidgetFactory.cpp.