Back to index

lightning-sunbird  0.9+nobinonly
Typedefs | Functions
EventFilter.h File Reference
#include <Events.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef Boolean(* EventFilterProcPtr )(EventRecord *event)
typedef Boolean(* MenuFilterProcPtr )(long menuSelection)

Functions

OSStatus InstallEventFilters (EventFilterProcPtr eventFilter, MenuFilterProcPtr menuFilter)
OSStatus RemoveEventFilters ()

Typedef Documentation

typedef Boolean(* EventFilterProcPtr)(EventRecord *event)

Definition at line 52 of file EventFilter.h.

typedef Boolean(* MenuFilterProcPtr)(long menuSelection)

Definition at line 53 of file EventFilter.h.


Function Documentation

Definition at line 113 of file EventFilter.cpp.

{
       if (theEventFilter == NULL) {
              theEventFilter = eventFilter;
              theMenuFilter = menuFilter;

              // Patch WNE, which will be used to filter events.
              WaitNextEventPatch.Install();
              
              // Patch MenuSelect, which will be used to filter menu selections.
              MenuSelectPatch.Install();

              return noErr;
       }
       return paramErr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 130 of file EventFilter.cpp.

{
       if (theEventFilter != NULL) {
              WaitNextEventPatch.Remove();
              MenuSelectPatch.Remove();
              
              theEventFilter = NULL;
              theMenuFilter = NULL;
              
              return noErr;
       }
       return paramErr;
}

Here is the call graph for this function:

Here is the caller graph for this function: