Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions | Variables
nsWindow.cpp File Reference
#include "nsDebug.h"
#include "nsWindow.h"
#include "nsIAppShell.h"
#include "nsIFontMetrics.h"
#include "nsFont.h"
#include "nsGUIEvent.h"
#include "nsWidgetsCID.h"
#include "nsIDragService.h"
#include "nsIDragSessionBeOS.h"
#include "nsIDeviceContext.h"
#include "nsRect.h"
#include "nsIRegion.h"
#include "nsTransform2D.h"
#include "nsGfxCIID.h"
#include "resource.h"
#include "prtime.h"
#include "nsReadableUtils.h"
#include "nsVoidArray.h"
#include <Application.h>
#include <InterfaceDefs.h>
#include <Region.h>
#include <ScrollBar.h>
#include <app/Message.h>
#include <support/String.h>
#include <Screen.h>
#include <nsBeOSCursors.h>
#include <Input.h>
#include <InputServerMethod.h>
#include <String.h>
#include "nsIRollupListener.h"
#include "nsIMenuRollup.h"
#include "nsUTF8Utils.h"

Go to the source code of this file.

Classes

struct  nsKeyConverter

Defines

#define kWindowPositionSlop   20
#define kWindowBorderWidth   5
#define kWindowTitleBarHeight   24

Functions

static NS_DEFINE_IID (kIWidgetIID, NS_IWIDGET_IID)
static NS_DEFINE_IID (kRegionCID, NS_REGION_CID)
static NS_DEFINE_IID (kCDragServiceCID, NS_DRAGSERVICE_CID)
static nsVoidArray gCursorArray (21)
static uint32 utf8_str_len (const char *ustring, int32 length)
static int TranslateBeOSKeyCode (int32 bekeycode, bool isnumlock)

Variables

static nsIRollupListenergRollupListener = nsnull
static nsIWidgetgRollupWidget = nsnull
static PRBool gRollupConsumeRollupEvent = PR_FALSE
static BWindow * gLastActiveWindow = NULL

Class Documentation

struct nsKeyConverter

Definition at line 2227 of file nsWindow.cpp.

Collaboration diagram for nsKeyConverter:
Class Members
char bekeycode
unsigned int keysym
int keysym
unsigned long keysym
PRUint32 vkCode
int vkCode

Define Documentation

Definition at line 104 of file nsWindow.cpp.

Definition at line 102 of file nsWindow.cpp.

Definition at line 105 of file nsWindow.cpp.


Function Documentation

static nsVoidArray gCursorArray ( 21  ) [static]
static NS_DEFINE_IID ( kIWidgetIID  ,
NS_IWIDGET_IID   
) [static]
static NS_DEFINE_IID ( kRegionCID  ,
NS_REGION_CID   
) [static]
static NS_DEFINE_IID ( kCDragServiceCID  ,
NS_DRAGSERVICE_CID   
) [static]
static int TranslateBeOSKeyCode ( int32  bekeycode,
bool  isnumlock 
) [static]

Definition at line 2384 of file nsWindow.cpp.

{
#ifdef KB_DEBUG
       printf("TranslateBeOSKeyCode: bekeycode = 0x%x\n",bekeycode);
#endif
       int i;
       int length = sizeof(nsKeycodesBeOS) / sizeof(struct nsKeyConverter);
       int length_numlock = sizeof(nsKeycodesBeOSNumLock) / sizeof(struct nsKeyConverter);
       int length_nonumlock = sizeof(nsKeycodesBeOSNoNumLock) / sizeof(struct nsKeyConverter);

       // key code conversion
       for (i = 0; i < length; i++) {
              if (nsKeycodesBeOS[i].bekeycode == bekeycode)
                     return(nsKeycodesBeOS[i].vkCode);
       }
       // numpad keycode vary with numlock
       if (isnumlock) {
              for (i = 0; i < length_numlock; i++) {
                     if (nsKeycodesBeOSNumLock[i].bekeycode == bekeycode)
                            return(nsKeycodesBeOSNumLock[i].vkCode);
              }
       } else {
              for (i = 0; i < length_nonumlock; i++) {
                     if (nsKeycodesBeOSNoNumLock[i].bekeycode == bekeycode)
                            return(nsKeycodesBeOSNoNumLock[i].vkCode);
              }
       }
#ifdef KB_DEBUG
       printf("TranslateBeOSKeyCode: ####### Translation not Found #######\n");
#endif
       return((int)0);
}

Here is the caller graph for this function:

static uint32 utf8_str_len ( const char *  ustring,
int32  length 
) [inline, static]

Definition at line 110 of file nsWindow.cpp.

{
       CalculateUTF8Length cutf8;
       cutf8.write(ustring, length);
       return cutf8.Length();       
}

Here is the call graph for this function:


Variable Documentation

BWindow* gLastActiveWindow = NULL [static]

Definition at line 94 of file nsWindow.cpp.

Definition at line 92 of file nsWindow.cpp.

Definition at line 90 of file nsWindow.cpp.

Definition at line 91 of file nsWindow.cpp.