Back to index

lightning-sunbird  0.9+nobinonly
Classes | Typedefs | Functions
AltWindowHandling.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  RegisteredWindow

Typedefs

typedef struct RegisteredWindow RegisteredWindow

Functions

NS_METHOD AltRegisterWindow (nsIEventHandler *handler, nsPluginPlatformWindowRef window)
NS_METHOD AltUnregisterWindow (nsIEventHandler *handler, nsPluginPlatformWindowRef window)

Typedef Documentation


Function Documentation

Definition at line 67 of file AltWindowHandling.cpp.

{
    theRegisteredWindows = new RegisteredWindow(theRegisteredWindows, handler, window);
    
#ifdef XP_MAC
    // use jGNE to obtain events for registered windows.
    if (!mEventFiltersInstalled) {
        ::InstallEventFilters(&EventFilter, &MenuFilter);
        mEventFiltersInstalled = true;
    }

    // plugin expects the window to be shown and selected at this point.
    
    SInt16 variant = ::GetWVariant(window);
    if (variant == plainDBox) {
        ::ShowHide(window, true);
        ::BringToFront(window);
    } else {
        ::ShowWindow(window);
        ::SelectWindow(window);
    }
#endif

    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 94 of file AltWindowHandling.cpp.

{
    RegisteredWindow** link = GetRegisteredWindow(window);
    if (link != NULL) {
        RegisteredWindow* registeredWindow = *link;
        if (registeredWindow == theActiveWindow)
            theActiveWindow = NULL;
        *link = registeredWindow->mNext;
        delete registeredWindow;
    }

#ifdef XP_MAC
    ::HideWindow(window);

    // if no windows registered, remove the filter.
    if (theRegisteredWindows == NULL) {
        ::RemoveEventFilters();
        mEventFiltersInstalled = false;
    }
#endif

    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function: