Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
nsWidget.cpp File Reference
#include "nsWidget.h"
#include "nsGtkEventHandler.h"
#include "nsIAppShell.h"
#include "nsIComponentManager.h"
#include "nsIDeviceContext.h"
#include "nsIFontMetrics.h"
#include "nsToolkit.h"
#include "nsWidgetsCID.h"
#include "nsGfxCIID.h"
#include <gdk/gdkx.h>
#include "nsIRollupListener.h"
#include "nsIMenuRollup.h"
#include "nsIServiceManager.h"
#include "nsIDragSessionGTK.h"
#include "nsIDragService.h"
#include "nsGtkUtils.h"
#include "nsIPref.h"

Go to the source code of this file.

Defines

#define CAPS_LOCK_IS_ON   (nsGtkUtils::gdk_keyboard_get_modifiers() & GDK_LOCK_MASK)

Functions

static void ConvertKeyEventToContextMenuEvent (const nsKeyEvent *inKeyEvent, nsMouseEvent *outCMEvent)
static PRBool IsContextMenuKey (const nsKeyEvent &inKeyEvent)
static NS_DEFINE_CID (kRegionCID, NS_REGION_CID)
static NS_DEFINE_IID (kCDragServiceCID, NS_DRAGSERVICE_CID)

Define Documentation

Definition at line 1006 of file nsWidget.cpp.


Function Documentation

static void ConvertKeyEventToContextMenuEvent ( const nsKeyEvent inKeyEvent,
nsMouseEvent outCMEvent 
) [static]

Definition at line 122 of file nsWidget.cpp.

{
  *(nsInputEvent *)outCMEvent = *(nsInputEvent *)inKeyEvent;
  outCMEvent->eventStructType = NS_MOUSE_EVENT;
  outCMEvent->message = NS_CONTEXTMENU_KEY;
  outCMEvent->isShift = outCMEvent->isControl = PR_FALSE;
  outCMEvent->isAlt = outCMEvent->isMeta = PR_FALSE;
  outCMEvent->clickCount = 0;
  outCMEvent->acceptActivation = PR_FALSE;
}

Here is the caller graph for this function:

static PRBool IsContextMenuKey ( const nsKeyEvent inKeyEvent) [inline, static]

Definition at line 141 of file nsWidget.cpp.

{
   enum { kContextMenuKey = NS_VK_F10, kDedicatedContextMenuKey = NS_VK_CONTEXT_MENU };

   return ((inKeyEvent.keyCode == kContextMenuKey && inKeyEvent.isShift &&
            !inKeyEvent.isControl && !inKeyEvent.isMeta && !inKeyEvent.isAlt) ||
           (inKeyEvent.keyCode == kDedicatedContextMenuKey && !inKeyEvent.isShift &&
            !inKeyEvent.isControl && !inKeyEvent.isMeta && !inKeyEvent.isAlt));
}

Here is the caller graph for this function:

static NS_DEFINE_CID ( kRegionCID  ,
NS_REGION_CID   
) [static]
static NS_DEFINE_IID ( kCDragServiceCID  ,
NS_DRAGSERVICE_CID   
) [static]