当前位置: 首页>>代码示例>>C++>>正文


C++ RemoveEventHandler函数代码示例

本文整理汇总了C++中RemoveEventHandler函数的典型用法代码示例。如果您正苦于以下问题:C++ RemoveEventHandler函数的具体用法?C++ RemoveEventHandler怎么用?C++ RemoveEventHandler使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了RemoveEventHandler函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: unloadPlayerWin

bool unloadPlayerWin()
{
    ControlRef cRef;
    ControlID cID;
    OSStatus iErr;

    cID.signature = FOUR_CHAR_CODE('volu');
    cID.id = 6;
    if (noErr != (iErr = GetControlByID(g_refPlayerWin, &cID, &cRef)))
    {
        /* We don't return false here since this is always called on the way out. */
        fprintf(stderr, "unloadPlayerWin() - GetControlByID() failed, returning %lu!\n", (unsigned long) iErr);
    }
    else
    {
        SetControlAction(cRef, (ControlActionUPP) -1);        
    }
    
    HideWindow(g_refPlayerWin);
    RemoveEventHandler(g_refSeekHdlr);
    RemoveEventHandler(g_refPlayerHdlr);
    DisposeWindow(g_refPlayerWin);
    DisposeEventHandlerUPP(g_lpfnPlayerProc);
    DisposeControlActionUPP(g_lpfnVolumeProc);

    return true;
}
开发者ID:ullerrm,项目名称:frogg,代码行数:27,代码来源:PlayerWin.cpp

示例2: RemoveEventHandler

IGraphicsCarbon::~IGraphicsCarbon()
{
  if (mTextEntryView)
  {
    RemoveEventHandler(mTextEntryHandler);
    mTextEntryHandler = 0;

    #if USE_MLTE
    TXNFocus(mTextEntryView, false);
    TXNClear(mTextEntryView);
    TXNDeleteObject(mTextEntryView);
    #else
    HIViewRemoveFromSuperview(mTextEntryView);
    #endif

    mTextEntryView = 0;
    mEdControl = 0;
    mEdParam = 0;
  }

  RemoveEventLoopTimer(mTimer);
  RemoveEventHandler(mControlHandler);
  RemoveEventHandler(mWindowHandler);
  mTimer = 0;
  mView = 0;
//  DisposeRgn(mRgn);
}
开发者ID:Brado231,项目名称:Faderport_XT,代码行数:27,代码来源:IGraphicsCarbon.cpp

示例3: RemoveEventHandler

void
EventListenerManager::SetEventHandler(OnErrorEventHandlerNonNull* aHandler)
{
  if (mIsMainThreadELM) {
    if (!aHandler) {
      RemoveEventHandler(nsGkAtoms::onerror, EmptyString());
      return;
    }

    // Untrusted events are always permitted for non-chrome script
    // handlers.
    SetEventHandlerInternal(JS::NullPtr(), nsGkAtoms::onerror,
                            EmptyString(), nsEventHandler(aHandler),
                            !nsContentUtils::IsCallerChrome());
  } else {
    if (!aHandler) {
      RemoveEventHandler(nullptr, NS_LITERAL_STRING("error"));
      return;
    }

    // Untrusted events are always permitted.
    SetEventHandlerInternal(JS::NullPtr(), nullptr,
                            NS_LITERAL_STRING("error"),
                            nsEventHandler(aHandler), true);
  }
}
开发者ID:jwwang,项目名称:gecko-dev-openh264,代码行数:26,代码来源:EventListenerManager.cpp

示例4: GetId

// Close out the console log windows along with the main emu window.
// Note: This event only happens after a close event has occurred and was *not* veto'd.  Ie,
// it means it's time to provide an unconditional closure of said window.
//
void MainEmuFrame::OnCloseWindow(wxCloseEvent& evt)
{
	if( IsBeingDeleted() ) return;

	CoreThread.Suspend();

	bool isClosing = false;

	if( !evt.CanVeto() )
	{
		// Mandatory destruction...
		isClosing = true;
	}
	else
	{
		// TODO : Add confirmation prior to exit here!
		// Problem: Suspend is often slow because it needs to wait until the current EE frame
		// has finished processing (if the GS or logging has incurred severe overhead this makes
		// closing PCSX2 difficult).  A non-blocking suspend with modal dialog might suffice
		// however. --air

		//evt.Veto( true );

	}

	sApp.OnMainFrameClosed( GetId() );

	if( m_menubar.FindItem(MenuId_IsoSelector) )
		m_menuCDVD.Remove(MenuId_IsoSelector);

	RemoveEventHandler( &wxGetApp().GetRecentIsoManager() );
	wxGetApp().PostIdleAppMethod( &Pcsx2App::PrepForExit );

	evt.Skip();
}
开发者ID:aseptilena,项目名称:pcsx2,代码行数:39,代码来源:MainFrame.cpp

示例5: RemoveEventHandler

void wxApp::DoCleanUp()
{
    if (!sm_isEmbedded)
        RemoveEventHandler( (EventHandlerRef)(wxTheApp->m_macEventHandler) );

    if (!sm_isEmbedded)
    {
        AERemoveEventHandler( kCoreEventClass , kAEOpenDocuments ,
                               sODocHandler , FALSE ) ;
        AERemoveEventHandler( kInternetEventClass, kAEGetURL,
                               sGURLHandler , FALSE ) ;
        AERemoveEventHandler( kCoreEventClass , kAEOpenApplication ,
                               sOAppHandler , FALSE ) ;
        AERemoveEventHandler( kCoreEventClass , kAEPrintDocuments ,
                               sPDocHandler , FALSE ) ;
        AERemoveEventHandler( kCoreEventClass , kAEReopenApplication ,
                               sRAppHandler , FALSE ) ;
        AERemoveEventHandler( kCoreEventClass , kAEQuitApplication ,
                               sQuitHandler , FALSE ) ;

        DisposeAEEventHandlerUPP( sODocHandler ) ;
        DisposeAEEventHandlerUPP( sGURLHandler ) ;
        DisposeAEEventHandlerUPP( sOAppHandler ) ;
        DisposeAEEventHandlerUPP( sPDocHandler ) ;
        DisposeAEEventHandlerUPP( sRAppHandler ) ;
        DisposeAEEventHandlerUPP( sQuitHandler ) ;
    }
}
开发者ID:zhchbin,项目名称:wxWidgets,代码行数:28,代码来源:app.cpp

示例6: endEdit

//------------------------------------------------------------------------
void cBitmapFontEditable::looseFocus(CDrawContext *pContext) { 
  // Call this yet to avoid recursive call
	endEdit();
	if(getFrame()->getFocusView() == this) {
		getFrame()->setFocusView(0);
  }
  
#if WINDOWS
//	char newText[255];
//	GetWindowText((HWND)platformControl, newText, 255);
//	strcpy (text, newText);
  
	DestroyWindow ((HWND)platformControl);
#elif MAC
	if(gEventHandler) {
		RemoveEventHandler(gEventHandler);
	}
  gEventHandler = 0;
#endif
  
  m_editing = false;
  setDirty(true);
  if(listener) {
    listener->valueChanged(pContext, this);
  }
  
  CControl::looseFocus(pContext);
}
开发者ID:Epitek,项目名称:KickMaker,代码行数:29,代码来源:cBitmapFontEditable.cpp

示例7: unloadInfoWin

bool unloadInfoWin()
{
    DataBrowserCallbacks dbc;
    ControlRef cRef;
    ControlID cID;

    cID.signature = FOUR_CHAR_CODE('tags');
    cID.id = 16;
    if (noErr == GetControlByID(g_refInfoWin, &cID, &cRef))
    {
        dbc.version = kDataBrowserLatestCallbacks;
        if (noErr == InitDataBrowserCallbacks(&dbc))
        {
            SetDataBrowserCallbacks(cRef, &dbc);
        }
    }

    clearInfoWin();

    HideWindow(g_refInfoWin);
    RemoveEventHandler(g_refInfoHdlr);
    DisposeWindow(g_refInfoWin);
    DisposeEventHandlerUPP(g_lpfnInfoProc);
    DisposeDataBrowserItemDataUPP(g_lpfnGSIDProc);

    /* Clean up any previous contents */
    
    return true;
}
开发者ID:ullerrm,项目名称:frogg,代码行数:29,代码来源:InfoWin.cpp

示例8: destroyCGLFullscreen

//-------------------------------------------------------------------------------------------------//
void OSXCarbonWindow::destroy(void)
{
    if(!mCreated)
        return;
    
	if(mIsFullScreen)
    {
        // Handle fullscreen destruction
		destroyCGLFullscreen();
    }
    else
    {
        // Handle windowed destruction
        
        // Destroy the Ogre context
        delete mContext;
        
        if(!mIsExternal)
        {
            // Remove the window from the Window listener
            WindowEventUtilities::_removeRenderWindow( this );
            
            // Remove our event handler
            if(mEventHandlerRef)
                RemoveEventHandler(mEventHandlerRef);        
        }
    }

	mActive = false;
    mClosed = true;
    mCreated = false;
}
开发者ID:jjiezheng,项目名称:pap_full,代码行数:33,代码来源:OgreOSXCarbonWindow.cpp

示例9: setup_menu_event_handler

static void
setup_menu_event_handler (void)
{
  static gboolean is_setup = FALSE;

  EventHandlerUPP menu_event_handler_upp;
  EventHandlerRef menu_event_handler_ref;
  const EventTypeSpec menu_events[] = {
    { kEventClassCommand, kEventCommandProcess },
    { kEventClassMenu, kEventMenuTargetItem },
    { kEventClassMenu, kEventMenuOpening },
    { kEventClassMenu, kEventMenuClosed }
  };

  if (is_setup)
    return;

  /* FIXME: We might have to install one per window? */

  menu_event_handler_upp = NewEventHandlerUPP (menu_event_handler_func);
  InstallEventHandler (GetApplicationEventTarget (), menu_event_handler_upp,
		       GetEventTypeCount (menu_events), menu_events, 0,
		       &menu_event_handler_ref);

#if 0
  /* FIXME: Remove the handler with: */
  RemoveEventHandler(menu_event_handler_ref);
  DisposeEventHandlerUPP(menu_event_handler_upp);
#endif

  is_setup = TRUE;
}
开发者ID:WilfR,项目名称:Gimp-Matting,代码行数:32,代码来源:ige-mac-menu.c

示例10: RemoveEventHandler

wxTaskBarIcon::~wxTaskBarIcon()
{
    //clean up event handler
    RemoveEventHandler((EventHandlerRef&)m_pEventHandlerRef);

    //restore old icon and menu to the dock
    RemoveIcon();    
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:8,代码来源:taskbar.cpp

示例11: unloadAboutWin

bool unloadAboutWin()
{
    HideWindow(g_refAboutWin);
    RemoveEventHandler(g_refAboutHdlr);
    DisposeWindow(g_refAboutWin);
    DisposeEventHandlerUPP(g_lpfnAboutProc);
    return true;
}
开发者ID:ullerrm,项目名称:frogg,代码行数:8,代码来源:AboutWin.cpp

示例12: CFRelease

void wxApp::CleanUp()
{
#if wxUSE_TOOLTIPS
    wxToolTip::RemoveToolTips() ;
#endif

#ifdef __WXMAC_OSX__
    if (m_macEventPosted)
    {
        CFRelease(m_macEventPosted);
    }
    m_macEventPosted = NULL;
#endif

    // One last chance for pending objects to be cleaned up
    wxTheApp->DeletePendingObjects();

    wxMacDestroyNotifierTable() ;

#ifndef __DARWIN__
#  if __option(profile)
    ProfilerDump( (StringPtr)"\papp.prof" ) ;
    ProfilerTerm() ;
#  endif
#endif

    UMACleanupToolbox() ;
    if (s_macCursorRgn) {
        ::DisposeRgn((RgnHandle)s_macCursorRgn);
    }

    if (!sm_isEmbedded)
    {
        RemoveEventHandler( (EventHandlerRef)(wxTheApp->m_macEventHandler) );
    }
	
    if (!sm_isEmbedded)
    {
        AERemoveEventHandler( kCoreEventClass , kAEOpenDocuments ,
                               sODocHandler , FALSE ) ;
        AERemoveEventHandler( kCoreEventClass , kAEOpenApplication ,
                               sOAppHandler , FALSE ) ;
        AERemoveEventHandler( kCoreEventClass , kAEPrintDocuments ,
                               sPDocHandler , FALSE ) ;
        AERemoveEventHandler( kCoreEventClass , kAEReopenApplication ,
                               sRAppHandler , FALSE ) ;
        AERemoveEventHandler( kCoreEventClass , kAEQuitApplication ,
                               sQuitHandler , FALSE ) ;
                               
        DisposeAEEventHandlerUPP( sODocHandler ) ;
        DisposeAEEventHandlerUPP( sOAppHandler ) ;
        DisposeAEEventHandlerUPP( sPDocHandler ) ;
        DisposeAEEventHandlerUPP( sRAppHandler ) ;
        DisposeAEEventHandlerUPP( sQuitHandler ) ;
    }

    wxAppBase::CleanUp();
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:58,代码来源:app.cpp

示例13: RemoveEventHandler

//-----------------------------------------------------------------------------
// wxDockTaskBarIcon Destructor
//
// Cleans up mac events and restores the old icon to the dock
//-----------------------------------------------------------------------------
wxDockTaskBarIcon::~wxDockTaskBarIcon()
{
    // clean up event handler and event UPP
    RemoveEventHandler(m_eventHandlerRef);
    DisposeEventHandlerUPP(m_eventupp);

    // restore old icon and menu to the dock
    RemoveIcon();
}
开发者ID:jonntd,项目名称:dynamica,代码行数:14,代码来源:taskbar.cpp

示例14: RemoveEventHandler

TabbedWindow::~TabbedWindow( void )
{
    
    // remove the event handler
    RemoveEventHandler( fHandler );
    
    // dispose of the window
    DisposeWindow( fWindowRef );
}
开发者ID:fruitsamples,项目名称:InkSample,代码行数:9,代码来源:TabbedWindow.cpp

示例15: NPServerDialog

bool8 NPServerDialog (void)
{
	OSStatus	err;
	IBNibRef	nibRef;

	npserver.dialogcancel = true;

	err = CreateNibReference(kMacS9XCFString, &nibRef);
	if (err == noErr)
	{
		WindowRef	tWindowRef;

		err = CreateWindowFromNib(nibRef, CFSTR("ClientList"), &tWindowRef);
		if (err == noErr)
		{
			EventHandlerRef		eref;
			EventLoopTimerRef	tref;
			EventHandlerUPP		eventUPP;
			EventLoopTimerUPP	timerUPP;
			EventTypeSpec		windowEvents[] = { { kEventClassCommand, kEventCommandProcess      },
												   { kEventClassCommand, kEventCommandUpdateStatus } };
			HIViewRef			ctl;
			HIViewID			cid = { 'Chse', 0 };

			npserver.dialogprocess = kNPSDialogInit;

			eventUPP = NewEventHandlerUPP(NPServerDialogEventHandler);
			err = InstallWindowEventHandler(tWindowRef, eventUPP, GetEventTypeCount(windowEvents), windowEvents, (void *) tWindowRef, &eref);

			timerUPP = NewEventLoopTimerUPP(NPServerDialogTimerHandler);
			err = InstallEventLoopTimer(GetCurrentEventLoop(), 0.0f, 0.1f, timerUPP, (void *) tWindowRef, &tref);

			HIViewFindByID(HIViewGetRoot(tWindowRef), cid, &ctl);
			HIViewSetVisible(ctl, false);

			MoveWindowPosition(tWindowRef, kWindowServer, false);
			ShowWindow(tWindowRef);
			err = RunAppModalLoopForWindow(tWindowRef);
			HideWindow(tWindowRef);
			SaveWindowPosition(tWindowRef, kWindowServer);

			err = RemoveEventLoopTimer(tref);
			DisposeEventLoopTimerUPP(timerUPP);

			err = RemoveEventHandler(eref);
			DisposeEventHandlerUPP(eventUPP);

			CFRelease(tWindowRef);
		}

		DisposeNibReference(nibRef);
	}

	return (!npserver.dialogcancel);
}
开发者ID:OV2,项目名称:snes9x-libsnes,代码行数:55,代码来源:mac-server.cpp


注:本文中的RemoveEventHandler函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。