您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ EventType函数代码示例

51自学网 2021-06-01 20:39:16
  C++
这篇教程C++ EventType函数代码示例写得很实用,希望能帮到您。

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

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

示例1: HideText

void CDisplayText::HideText(bool bHide){    Ui::CWindow*    pw;    Ui::CGroup*     pg;    Ui::CLabel*     pl;    Ui::CButton*    pb;    int         i;    m_bHide = bHide;    pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW2));    if ( pw == 0 )  return;    for ( i=0 ; i<MAXDTLINE ; i++ )    {        pg = static_cast<Ui::CGroup*>(pw->SearchControl(EventType(EVENT_DT_GROUP0+i)));        if ( pg != 0 )        {            pg->SetState(STATE_VISIBLE, !bHide);        }        pl = static_cast<Ui::CLabel*>(pw->SearchControl(EventType(EVENT_DT_LABEL0+i)));        if ( pl != 0 )        {            pl->SetState(STATE_VISIBLE, !bHide);        }        pb = static_cast<CButton*>(pw->SearchControl(EventType(EVENT_DT_VISIT0+i)));        if ( pb != 0 )        {            pb->SetState(STATE_VISIBLE, !bHide);        }    }}
开发者ID:Insolita,项目名称:colobot,代码行数:34,


示例2: RestoreRegisterEvent

void RestoreRegisterEvent(int event_type, const char *name, TimedCallback callback){	if (event_type >= (int) event_types.size())		event_types.resize(event_type + 1, EventType(AntiCrashCallback, "INVALID EVENT"));	event_types[event_type] = EventType(callback, name);}
开发者ID:ChrisAldama,项目名称:ppsspp,代码行数:7,


示例3: EventType

// ----------------------------------------------------------------------void EventInputQueue::push_KeyboardSpecialEventCallback(OSObject* target,                                                        unsigned int eventType,                                                        unsigned int flags,                                                        unsigned int key,                                                        unsigned int flavor,                                                        UInt64 guid,                                                        bool repeat,                                                        AbsoluteTime ts,                                                        OSObject* sender,                                                        void* refcon) {  GlobalLock::ScopedLock lk;  if (!lk) return;  Params_KeyboardSpecialEventCallback::log(true, EventType(eventType), Flags(flags), ConsumerKeyCode(key), flavor, guid, repeat);  // ------------------------------------------------------------  Params_KeyboardSpecialEventCallback params(EventType(eventType),                                             Flags(flags),                                             ConsumerKeyCode(key),                                             flavor, guid, repeat);  // ------------------------------------------------------------  IOHIKeyboard* device = OSDynamicCast(IOHIKeyboard, sender);  if (!device) return;  ListHookedConsumer::Item* item = static_cast<ListHookedConsumer::Item*>(ListHookedConsumer::instance().get(device));  if (!item) return;  // ------------------------------------------------------------  // Device Hacks  // Drop events if "Disable an internal keyboard while external keyboards are connected" is enabled.  if (Config::get_essential_config(BRIDGE_ESSENTIAL_CONFIG_INDEX_general_disable_internal_keyboard_if_external_keyboard_exsits)) {    if (item->isInternalDevice() &&        ListHookedKeyboard::instance().isExternalDevicesConnected()) {      return;    }  }  // ------------------------------------------------------------  CommonData::setcurrent_ts(ts);  // ------------------------------------------------------------  // Because we handle the key repeat ourself, drop the key repeat by hardware.  if (repeat) return;  // ------------------------------------------------------------  bool retainFlagStatusTemporaryCount = false;  enqueue_(params, retainFlagStatusTemporaryCount, item->getDeviceIdentifier());  setTimer();}
开发者ID:piaowenjie,项目名称:Karabiner,代码行数:53,


示例4: ClearText

void CDisplayText::ClearText(){    Ui::CWindow* pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW2));    for (int i = 0; i < MAXDTLINE; i++)    {        if (pw != nullptr)        {            pw->DeleteControl(EventType(EVENT_DT_GROUP0+i));            pw->DeleteControl(EventType(EVENT_DT_LABEL0+i));            pw->DeleteControl(EventType(EVENT_DT_VISIT0+i));        }        m_textLines[i] = TextLine();    }}
开发者ID:colobot,项目名称:colobot,代码行数:16,


示例5: wxCHECK_RET

void CDownloadQueue::AddDownload(CPartFile* file, bool paused, uint8 category){	wxCHECK_RET(!IsFileExisting(file->GetFileHash()), wxT("Adding duplicate part-file"));	if (file->GetStatus(true) == PS_ALLOCATING) {		file->PauseFile();	} else if (paused && GetFileCount()) {		file->StopFile();	}	{		wxMutexLocker lock(m_mutex);		m_filelist.push_back( file );		DoSortByPriority();	}	NotifyObservers( EventType( EventType::INSERTED, file ) );	if (category < theApp->glob_prefs->GetCatCount()) {		file->SetCategory(category);	} else {		AddDebugLogLineN( logDownloadQueue, wxT("Tried to add download into invalid category.") );	}	Notify_DownloadCtrlAddFile( file );	theApp->searchlist->UpdateSearchFileByHash(file->GetFileHash()); 	// Update file in the search dialog if it's still open	AddLogLineC(CFormat(_("Downloading %s")) % file->GetFileName() );}
开发者ID:windreamer,项目名称:amule-dlp,代码行数:26,


示例6: _

void CServerList::RemoveServer(CServer* in_server){	if (in_server == theApp->serverconnect->GetCurrentServer()) {		theApp->ShowAlert(_("You are connected to the server you are trying to delete. please disconnect first."), _("Info"), wxOK);		} else {		CInternalList::iterator it = std::find(m_servers.begin(), m_servers.end(), in_server);		if ( it != m_servers.end() ) {			if (theApp->downloadqueue->GetUDPServer() == in_server) {				theApp->downloadqueue->SetUDPServer( 0 );			}							NotifyObservers( EventType( EventType::REMOVED, in_server ) );					if (m_serverpos == it) {				++m_serverpos;			}			if (m_statserverpos == it) {				++m_statserverpos;			}			m_servers.erase(it);			theStats::DeleteServer();						Notify_ServerRemove(in_server);			delete in_server;		}	}}
开发者ID:donkey4u,项目名称:donkeyseed,代码行数:27,


示例7: applyConfiguration

void RuleWidget::applyConfiguration(void){	try	{		Rule *rule=nullptr;		unsigned count, i;		startConfiguration<Rule>();		rule=dynamic_cast<Rule *>(this->object);		rule->setEventType(EventType(event_cmb->currentText()));		rule->setExecutionType(ExecutionType(exec_type_cmb->currentText()));		rule->setConditionalExpression(cond_expr_txt->toPlainText().toUtf8());		rule->removeCommands();		count=commands_tab->getRowCount();		for(i=0; i < count; i++)			rule->addCommand(commands_tab->getCellText(i,0).toUtf8());		BaseObjectWidget::applyConfiguration();		finishConfiguration();	}	catch(Exception &e)	{		cancelConfiguration();		throw Exception(e.getErrorMessage(),e.getErrorType(),__PRETTY_FUNCTION__,__FILE__,__LINE__, &e);	}}
开发者ID:inghumberto,项目名称:pgmodeler,代码行数:29,


示例8: DoState

void DoState(PointerWrap &p){	std::lock_guard<std::recursive_mutex> lk(externalEventSection);	auto s = p.Section("CoreTiming", 1, 2);	if (!s)		return;	int n = (int) event_types.size();	p.Do(n);	// These (should) be filled in later by the modules.	event_types.resize(n, EventType(AntiCrashCallback, "INVALID EVENT"));	p.DoLinkedList<BaseEvent, GetNewEvent, FreeEvent, Event_DoState>(first, (Event **) NULL);	p.DoLinkedList<BaseEvent, GetNewTsEvent, FreeTsEvent, Event_DoState>(tsFirst, &tsLast);	p.Do(CPU_HZ);	p.Do(slicelength);	p.Do(globalTimer);	p.Do(idledCycles);	if (s >= 2) {		p.Do(lastGlobalTimeTicks);		p.Do(lastGlobalTimeUs);	} else {		lastGlobalTimeTicks = 0;		lastGlobalTimeUs = 0;	}}
开发者ID:18859966862,项目名称:ppsspp,代码行数:29,


示例9: GetTracepointEventTypes

static const std::vector<EventType> GetTracepointEventTypes() {  std::vector<EventType> result;  const std::string tracepoint_dirname = "/sys/kernel/debug/tracing/events";  std::vector<std::string> system_dirs;  GetEntriesInDir(tracepoint_dirname, nullptr, &system_dirs);  for (auto& system_name : system_dirs) {    std::string system_path = tracepoint_dirname + "/" + system_name;    std::vector<std::string> event_dirs;    GetEntriesInDir(system_path, nullptr, &event_dirs);    for (auto& event_name : event_dirs) {      std::string id_path = system_path + "/" + event_name + "/id";      std::string id_content;      if (!android::base::ReadFileToString(id_path, &id_content)) {        continue;      }      char* endptr;      uint64_t id = strtoull(id_content.c_str(), &endptr, 10);      if (endptr == id_content.c_str()) {        LOG(DEBUG) << "unexpected id '" << id_content << "' in " << id_path;        continue;      }      result.push_back(EventType(system_name + ":" + event_name, PERF_TYPE_TRACEPOINT, id));    }  }  std::sort(result.begin(), result.end(),            [](const EventType& type1, const EventType& type2) { return type1.name < type2.name; });  return result;}
开发者ID:AOSP-JF-MM,项目名称:platform_system_extras,代码行数:28,


示例10: setType

void MidiEventBase::read(Xml& xml){	setType(Note);	a = 0;	b = 0;	c = 0;	int dataLen = 0;	for (;;)	{		Xml::Token token = xml.parse();		const QString& tag = xml.s1();		switch (token)		{			case Xml::Error:			case Xml::End:				return;			case Xml::TagStart:				xml.unknown("Event");				break;			case Xml::Text:			{				QByteArray ba = tag.toLatin1();				const char*s = ba.constData();				edata.data = new unsigned char[dataLen];				edata.dataLen = dataLen;				unsigned char* d = edata.data;				for (int i = 0; i < dataLen; ++i)				{					char* endp;					*d++ = strtol(s, &endp, 16);					s = endp;				}			}				break;			case Xml::Attribut:				if (tag == "tick")					setTick(xml.s2().toInt());				else if (tag == "type")					setType(EventType(xml.s2().toInt()));				else if (tag == "len")					setLenTick(xml.s2().toInt());				else if (tag == "a")					a = xml.s2().toInt();				else if (tag == "b")					b = xml.s2().toInt();				else if (tag == "c")					c = xml.s2().toInt();				else if (tag == "datalen")					dataLen = xml.s2().toInt();				break;			case Xml::TagEnd:				if (tag == "event")					return;			default:				break;		}	}}
开发者ID:87maxi,项目名称:oom,代码行数:59,


示例11: RemoveLocalServerRequest

void CDownloadQueue::RemoveFile(CPartFile* file){	RemoveLocalServerRequest( file );	NotifyObservers( EventType( EventType::REMOVED, file ) );	wxMutexLocker lock( m_mutex );	EraseValue( m_filelist, file );}
开发者ID:dreamerc,项目名称:amule,代码行数:10,


示例12: NotifyObservers

void CServerList::ObserverAdded( ObserverType* o ){	CObservableQueue<CServer*>::ObserverAdded( o );	EventType::ValueList ilist;	ilist.reserve( m_servers.size() );	ilist.assign( m_servers.begin(), m_servers.end() );	NotifyObservers( EventType( EventType::INITIAL, &ilist ), o );}
开发者ID:donkey4u,项目名称:donkeyseed,代码行数:10,


示例13: compute

   /** Method that computes the result for the smoothing. */	void compute( Measurement::Timestamp t )	{		if( !m_init ){			m_mean = *( m_inPort.get() );			m_init = true;		}		else			m_mean = (  m_alpha * ( *( m_inPort.get() ) )  ) + ( ( 1. - m_alpha ) * m_mean );					LOG4CPP_TRACE( logger, "exponential smoothing: " << m_mean );		m_outPort.send( EventType( t, m_mean ) );	}
开发者ID:Killerregenwurm,项目名称:utcomponents,代码行数:13,


示例14: ClearText

void CDisplayText::ClearText(){    Ui::CWindow*    pw;    int         i;    pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW2));    for ( i=0 ; i<MAXDTLINE ; i++ )    {        if ( pw != 0 )        {            pw->DeleteControl(EventType(EVENT_DT_GROUP0+i));            pw->DeleteControl(EventType(EVENT_DT_LABEL0+i));            pw->DeleteControl(EventType(EVENT_DT_VISIT0+i));        }        m_bExist[i] = false;        m_visitGoal[i] = Math::Vector(0.0f, 0.0f, 0.0f);        m_visitDist[i] = 0.0f;        m_visitHeight[i] = 0.0f;        m_time[i] = 0.0f;    }}
开发者ID:Insolita,项目名称:colobot,代码行数:22,


示例15: lock

void CDownloadQueue::ObserverAdded( ObserverType* o ){	CObservableQueue<CPartFile*>::ObserverAdded( o );		EventType::ValueList list;	{		wxMutexLocker lock(m_mutex);		list.reserve( m_filelist.size() );		list.insert( list.begin(), m_filelist.begin(), m_filelist.end() );	}	NotifyObservers( EventType( EventType::INITIAL, &list ), o );}
开发者ID:windreamer,项目名称:amule-dlp,代码行数:14,


示例16: al_create_timer

void AllegroFlasher::run(){    const int zero = 0;    timer = al_create_timer(1.0 / FPS.at(zero));    display = al_create_display(width, height);    event_queue = al_create_event_queue();    al_register_event_source(event_queue, al_get_display_event_source(display));    al_register_event_source(event_queue, al_get_timer_event_source(timer));    al_register_event_source(event_queue, al_get_keyboard_event_source());	al_register_event_source(event_queue, al_get_mouse_event_source());    al_start_timer(timer);		        // Start the timer    int counter = 0;    while(!done)                        // Main loop    {        EVENT Event = EventType();      // Wait for an event to occur        if (Event == ESCAPE) {			// Quit the program            counter = frames.at(zero);             break;        }        else if (Event == UPDATE) {     // A timer event             if(useBlankStart && counter < frames.at(zero)/2)                displayBlankScreen();   // Simply display a black screen            else                updateDisplay();            counter++;        }        else if (Event == UP) {            moveBlock(UP);        }        else if (Event == DOWN) {            moveBlock(DOWN);        }        else if (Event == LEFT) {            moveBlock(LEFT);        }        else if (Event == RIGHT) {            moveBlock(RIGHT);        }        if(counter == frames.at(zero))            done = true;    }    al_destroy_timer(timer);	al_destroy_display(display);    al_destroy_event_queue(event_queue);    done = false;                       // Set again for the next time}
开发者ID:ELEN4002-Lab-Project-2012,项目名称:ELEN4002-Lab-Project,代码行数:50,


示例17: RemoveLocalServerRequest

void CDownloadQueue::RemoveFile(CPartFile* file, bool keepAsCompleted){	RemoveLocalServerRequest( file );	NotifyObservers( EventType( EventType::REMOVED, file ) );	wxMutexLocker lock( m_mutex );	EraseValue( m_filelist, file );	if (keepAsCompleted) {		m_completedDownloads.push_back(file);	}}
开发者ID:windreamer,项目名称:amule-dlp,代码行数:14,


示例18: IsVisit

bool CDisplayText::IsVisit(EventType event){    Ui::CWindow*    pw;    Ui::CButton*    pb;    int         i;    i = event-EVENT_DT_VISIT0;    if ( i < 0 || i >= MAXDTLINE )  return false;    pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW2));    if ( pw == 0 )  return false;    pb = static_cast<CButton*>(pw->SearchControl(EventType(EVENT_DT_VISIT0+i)));    if ( pb == 0 )  return false;    return (pb->GetIcon() == 48);  // > ?}
开发者ID:Insolita,项目名称:colobot,代码行数:15,


示例19: SetVisit

void CDisplayText::SetVisit(EventType event){    Ui::CWindow*    pw;    Ui::CButton*    pb;    int         i;    i = event-EVENT_DT_VISIT0;    if ( i < 0 || i >= MAXDTLINE )  return;    pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW2));    if ( pw == nullptr )  return;    pb = static_cast<CButton*>(pw->SearchControl(EventType(EVENT_DT_VISIT0+i)));    if ( pb == nullptr )  return;    pb->SetIcon(48);  // >}
开发者ID:colobot,项目名称:colobot,代码行数:15,


示例20: SINGLETONINSTANCE

void Engine::StartUp(){	SINGLETONINSTANCE(Profiler)->StartUp();	SINGLETONINSTANCE(Profiler)->Begin("StartUp");	lastTime = Time::GetCurrentMS();	m_Window = new Window();	m_Window->StartUp();	m_SettingsManager = new SettingsManager();	m_SettingsManager->StartUp();	m_EventManager = new EventManager();	m_EventManager->StartUp("Global event manager", true);	//Register useful event types.	m_EventManager->AddRegisteredEventType( EventType ("keydownEvent") );		m_EventManager->AddRegisteredEventType( EventType ("mouseClickPositionEvent") );	m_EventManager->AddRegisteredEventType( EventType ("mouseClickHUDEvent") );	//IMPORTANT: Call this before m_Graphics->StartUp()	m_Physics = SINGLETONINSTANCE(PhysicsSystem);	m_Physics->StartUp();	m_Graphics = new GraphicsSystem();	m_Graphics->StartUp();	m_FPSCalculator = new FPSCalculator();	m_FPSCalculator->StartUp();	m_SingleFrameAllocator = new StackAllocator(MB(100));	m_Running = false;	SINGLETONINSTANCE(Profiler)->End("StartUp");}
开发者ID:gnub,项目名称:itugameengine,代码行数:36,


示例21: ClearVisit

void CDisplayText::ClearVisit(){    Ui::CWindow*    pw;    Ui::CButton*    pb;    int         i;    pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW2));    if ( pw == 0 )  return;    for ( i=0 ; i<MAXDTLINE ; i++ )    {        pb = static_cast<CButton*>(pw->SearchControl(EventType(EVENT_DT_VISIT0+i)));        if ( pb == 0 )  break;        pb->SetIcon(14);  // eyes    }}
开发者ID:Insolita,项目名称:colobot,代码行数:16,


示例22: DoState

void DoState(PointerWrap &p){	std::lock_guard<std::recursive_mutex> lk(externalEventSection);	int n = (int) event_types.size();	p.Do(n);	// These (should) be filled in later by the modules.	event_types.resize(n, EventType(AntiCrashCallback, "INVALID EVENT"));	p.DoLinkedList<BaseEvent, GetNewEvent, FreeEvent, Event_DoState>(first, (Event **) NULL);	p.DoLinkedList<BaseEvent, GetNewTsEvent, FreeTsEvent, Event_DoState>(tsFirst, &tsLast);	p.Do(CPU_HZ);	p.Do(downcount);	p.Do(slicelength);	p.Do(globalTimer);	p.Do(idledCycles);	p.DoMarker("CoreTiming");}
开发者ID:ChrisAldama,项目名称:ppsspp,代码行数:19,


示例23: EventType

  // ----------------------------------------------------------------------  void  EventInputQueue::push_KeyboardSpecialEventCallback(OSObject* target,                                                     unsigned int eventType,                                                     unsigned int flags,                                                     unsigned int key,                                                     unsigned int flavor,                                                     UInt64 guid,                                                     bool repeat,                                                     AbsoluteTime ts,                                                     OSObject* sender,                                                     void* refcon)  {    GlobalLock::ScopedLock lk;    if (! lk) return;    Params_KeyboardSpecialEventCallback::log(true, EventType(eventType), Flags(flags), ConsumerKeyCode(key), flavor, guid, repeat);    // ------------------------------------------------------------    Params_KeyboardSpecialEventCallback::auto_ptr ptr(Params_KeyboardSpecialEventCallback::alloc(EventType(eventType), Flags(flags), ConsumerKeyCode(key),                                                                                                 flavor, guid, repeat));    if (! ptr) return;    Params_KeyboardSpecialEventCallback& params = *ptr;    // ------------------------------------------------------------    IOHIKeyboard* device = OSDynamicCast(IOHIKeyboard, sender);    if (! device) return;    ListHookedConsumer::Item* item = static_cast<ListHookedConsumer::Item*>(ListHookedConsumer::instance().get(device));    if (! item) return;    // ------------------------------------------------------------    CommonData::setcurrent_ts(ts);    // ------------------------------------------------------------    // Because we handle the key repeat ourself, drop the key repeat by hardware.    if (repeat) return;    // ------------------------------------------------------------    bool retainFlagStatusTemporaryCount = false;    enqueue_(params, retainFlagStatusTemporaryCount, item->getDeviceIdentifier());    setTimer();  }
开发者ID:selflearner,项目名称:KeyRemap4MacBook,代码行数:44,


示例24: ClearLastText

bool CDisplayText::ClearLastText(){    Ui::CWindow     *pw;    Ui::CButton     *pb1, *pb2;    Ui::CGroup      *pg1, *pg2;    Ui::CLabel      *pl1, *pl2;    int         i;    pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW2));    if ( pw == 0 )  return false;    pb2 = static_cast<CButton*>(pw->SearchControl(EVENT_DT_VISIT0));    if ( pb2 == 0 )  return false;  // same not of first-line    pg2 = static_cast<CGroup*>(pw->SearchControl(EVENT_DT_GROUP0));    if ( pg2 == 0 )  return false;    pl2 = static_cast<CLabel*>(pw->SearchControl(EVENT_DT_LABEL0));    if ( pl2 == 0 )  return false;    for ( i=0 ; i<MAXDTLINE-1 ; i++ )    {        pb1 = pb2;        pg1 = pg2;        pl1 = pl2;        pb2 = static_cast<CButton*>(pw->SearchControl(EventType(EVENT_DT_VISIT0+i+1)));        if ( pb2 == 0 )  break;        pg2 = static_cast<CGroup*>(pw->SearchControl(EventType(EVENT_DT_GROUP0+i+1)));        if ( pg2 == 0 )  break;        pl2 = static_cast<CLabel*>(pw->SearchControl(EventType(EVENT_DT_LABEL0+i+1)));        if ( pl2 == 0 )  break;        pb1->SetState(STATE_ENABLE, pb2->TestState(STATE_ENABLE));        pg1->SetIcon(pg2->GetIcon());        pl1->SetName(pl2->GetName());        m_time[i]        = m_time[i+1];        m_visitGoal[i]   = m_visitGoal[i+1];        m_visitDist[i]   = m_visitDist[i+1];        m_visitHeight[i] = m_visitHeight[i+1];  // shift    }    pw->DeleteControl(EventType(EVENT_DT_VISIT0+i));    pw->DeleteControl(EventType(EVENT_DT_GROUP0+i));    pw->DeleteControl(EventType(EVENT_DT_LABEL0+i));    m_bExist[i] = false;    return true;}
开发者ID:Insolita,项目名称:colobot,代码行数:49,


示例25: EventType

#include "ActorId.hpp"#include "TransactionFailEvent.hpp"#include "EventType.hpp"/* Initialize the event type of ActorMovedEvent using the address of the * event_type static member variable */const EventType TransactionFailEvent::event_type =  EventType(&TransactionFailEvent::event_type);TransactionFailEvent::TransactionFailEvent() :  EventInterface(),  ship_id(0),  port_id(0),  ship_gold(0),  ship_rum(0),  port_rum(0),  fail_reason(BUY_EXCEEDS_MAX_SHIP_INVENTORY){}TransactionFailEvent::TransactionFailEvent(ActorId ship_id,					   ActorId port_id,					   unsigned int ship_gold,					   unsigned int ship_rum,					   unsigned int port_rum,					   FailReason fail_reason)  : EventInterface(),    ship_id(ship_id),    port_id(port_id),    ship_gold(ship_gold),    ship_rum(ship_rum),
开发者ID:fenaren,项目名称:cs420-game,代码行数:31,


示例26: RegisterEvent

int RegisterEvent(const char *name, TimedCallback callback){	event_types.push_back(EventType(callback, name));	return (int)event_types.size() - 1;}
开发者ID:ChrisAldama,项目名称:ppsspp,代码行数:5,


示例27: return

{	event_types.push_back(EventType(callback, name));	return (int)event_types.size() - 1;}void AntiCrashCallback(u64 userdata, int cyclesLate){	ERROR_LOG(TIME, "Savestate broken: an unregistered event was called.");	Core_Halt("invalid timing events");}void RestoreRegisterEvent(int event_type, const char *name, TimedCallback callback){	_assert_msg_(CORETIMING, event_type >= 0, "Invalid event type %d", event_type)	if (event_type >= (int) event_types.size())		event_types.resize(event_type + 1, EventType(AntiCrashCallback, "INVALID EVENT"));	event_types[event_type] = EventType(callback, name);}void UnregisterAllEvents(){	if (first)		PanicAlert("Cannot unregister events with events pending");	event_types.clear();}void Init(){	currentMIPS->downcount = INITIAL_SLICE_LENGTH;	slicelength = INITIAL_SLICE_LENGTH;
开发者ID:FTPiano,项目名称:ppsspp,代码行数:31,


示例28: EventType

namespace KJSEmbed {JSEventMapper *JSEventMapper::m_inst = 0;/** Used internally for the event handler table. */struct EventType{    EventType( KJS::Identifier _id, QEvent::Type _type ) :            id(_id), type(_type) {;}    const KJS::Identifier id;    const QEvent::Type type;};/*Qt4 events as of Qt 4.0        None = 0,                               // invalid event        Timer = 1,                              // timer event        MouseButtonPress = 2,                   // mouse button pressed        MouseButtonRelease = 3,                 // mouse button released        MouseButtonDblClick = 4,                // mouse button double click        MouseMove = 5,                          // mouse move        KeyPress = 6,                           // key pressed        KeyRelease = 7,                         // key released        FocusIn = 8,                            // keyboard focus received        FocusOut = 9,                           // keyboard focus lost        Enter = 10,                             // mouse enters widget        Leave = 11,                             // mouse leaves widget        Paint = 12,                             // paint widget        Move = 13,                              // move widget        Resize = 14,                            // resize widget        Create = 15,                            // after widget creation        Destroy = 16,                           // during widget destruction        Show = 17,                              // widget is shown        Hide = 18,                              // widget is hidden        Close = 19,                             // request to close widget        Quit = 20,                              // request to quit application        ParentChange = 21,                      // widget has been reparented        ParentAboutToChange = 131,              // sent just before the parent change is done        ThreadChange = 22,                      // object has changed threads        WindowActivate = 24,                    // window was activated        WindowDeactivate = 25,                  // window was deactivated        ShowToParent = 26,                      // widget is shown to parent        HideToParent = 27,                      // widget is hidden to parent        Wheel = 31,                             // wheel event        WindowTitleChange = 33,                 // window title changed        WindowIconChange = 34,                  // icon changed        ApplicationWindowIconChange = 35,       // application icon changed        ApplicationFontChange = 36,             // application font changed        ApplicationLayoutDirectionChange = 37,  // application layout direction changed        ApplicationPaletteChange = 38,          // application palette changed        PaletteChange = 39,                     // widget palette changed        Clipboard = 40,                         // internal clipboard event        Speech = 42,                            // reserved for speech input        MetaCall =  43,                         // meta call event        SockAct = 50,                           // socket activation        WinEventAct = 123,                      // win event activation        DeferredDelete = 52,                    // deferred delete event        DragEnter = 60,                         // drag moves into widget        DragMove = 61,                          // drag moves in widget        DragLeave = 62,                         // drag leaves or is canceled        Drop = 63,                              // actual drop        DragResponse = 64,                      // drag accepted/rejected        ChildAdded = 68,                        // new child widget        ChildPolished = 69,                     // polished child widget        ChildRemoved = 71,                      // deleted child widget        ShowWindowRequest = 73,                 // widget's window should be mapped        PolishRequest = 74,                     // widget should be polished        Polish = 75,                            // widget is polished        LayoutRequest = 76,                     // widget should be relayouted        UpdateRequest = 77,                     // widget should be repainted        EmbeddingControl = 79,                  // ActiveX embedding        ActivateControl = 80,                   // ActiveX activation        DeactivateControl = 81,                 // ActiveX deactivation        ContextMenu = 82,                       // context popup menu        InputMethod = 83,                       // input method        AccessibilityPrepare = 86,              // accessibility information is requested        TabletMove = 87,                        // Wacom tablet event        LocaleChange = 88,                      // the system locale changed        LanguageChange = 89,                    // the application language changed        LayoutDirectionChange = 90,             // the layout direction changed        Style = 91,                             // internal style event        TabletPress = 92,                       // tablet press        TabletRelease = 93,                     // tablet release        OkRequest = 94,                         // CE (Ok) button pressed        HelpRequest = 95,                       // CE (?)  button pressed        IconDrag = 96,                          // proxy icon dragged        FontChange = 97,                        // font has changed        EnabledChange = 98,                     // enabled state has changed        ActivationChange = 99,                  // window activation has changed        StyleChange = 100,                      // style has changed        IconTextChange = 101,                   // icon text has changed        ModifiedChange = 102,                   // modified state has changed        MouseTrackingChange = 109,              // mouse tracking state has changed        WindowBlocked = 103,                    // window is about to be blocked modally        WindowUnblocked = 104,                  // windows modal blocking has ended        WindowStateChange = 105,        ToolTip = 110,        WhatsThis = 111,        StatusTip = 112,        ActionChanged = 113,//.........这里部分代码省略.........
开发者ID:vasi,项目名称:kdelibs,代码行数:101,



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


C++ Event_init函数代码示例
C++ EventPlayerDroppedFlag函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。