enum {
  typeHICommand = 1
};

enum {
kEventParamHICommand =1
};


#define InstallApplicationEventHandler( a,b, c, d, e ) \
InstallEventHandler( GetApplicationEventTarget(), a, b, c, d, e )



#define InstallWindowEventHandler( a, b, c, d, e, f ) \
       InstallEventHandler( GetWindowEventTarget( a ), (b), (c), (d), (e), (f ))


#define SendEventToApplication( a ) \
        SendEventToEventTarget( (a), GetApplicationEventTarget() )


#define InstallControlEventHandler( a, b, c, d, e, f ) \
        InstallEventHandler( GetControlEventTarget( a ), (b), (c), (d), (e), (f) )

#define HIViewInstallEventHandler(a, b, c, d, e, f ) \
                                                      InstallEventHandler( HIObjectGetEventTarget( (HIObjectRef) (a) ),\
                                                      (b), (c), (d),(e),(f) )

#define DEFINE_ONE_SHOT_HANDLER_GETTER( a )       \
EventHandlerUPP Get ## a ## UPP()             \
{                                             \
  static EventHandlerUPP  sHandler = NULL;    \
                                              \
  if ( sHandler == NULL )                     \
      sHandler = NewEventHandlerUPP( a );     \
                                              \
  return sHandler;                            \
}


#define SendEventToWindow( a, b ) \
        SendEventToEventTarget( (a), GetWindowEventTarget( b) )

#define SendEventToControl(a,b ) \
     SendEventToEventTarget( (a), GetControlEventTarget( b ) )

#define InstallMenuEventHandler(a, b,c, d, e, f ) \
      InstallEventHandler( GetMenuEventTarget(a ), (b), (c), (d), (e), (f) )


enum {
kEventControlInvalidateForSizeChange =1
};