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


C++ plugin_register函数代码示例

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


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

示例1: MidiTakePreviewTimer

static void MidiTakePreviewTimer ()
{
	if (g_itemPreviewPlaying)
	{
		#ifdef _WIN32
			EnterCriticalSection(&g_ItemPreview.cs);
		#else
			pthread_mutex_lock(&g_ItemPreview.mutex);
		#endif

		// Have we reached the end?
		if (g_ItemPreview.curpos >= g_ItemPreview.src->GetLength())
		{
			#ifdef _WIN32
				LeaveCriticalSection(&g_ItemPreview.cs);
			#else
				pthread_mutex_unlock(&g_ItemPreview.mutex);
			#endif
			MidiTakePreview(0, NULL, NULL, 0, 0, 0, false);
			plugin_register("-timer",(void*)MidiTakePreviewTimer);
		}
		else
		{
			#ifdef _WIN32
				LeaveCriticalSection(&g_ItemPreview.cs);
			#else
				pthread_mutex_unlock(&g_ItemPreview.mutex);
			#endif
		}
	}
	else
	{
		plugin_register("-timer",(void*)MidiTakePreviewTimer);
	}
}
开发者ID:wolqws,项目名称:sws,代码行数:35,代码来源:BR_MidiEditor.cpp

示例2: RecRedRuler

void RecRedRuler(COMMAND_T*)
{
	g_bRecRedRuler = !g_bRecRedRuler;
	if (g_bRecRedRuler) plugin_register("timer", (void*)ColorTimer);
	else                plugin_register("-timer",(void*)ColorTimer);  
	WritePrivateProfileString(SWS_INI, RECREDRULER_KEY, g_bRecRedRuler ? "1" : "0", get_ini_file());
}
开发者ID:wolqws,项目名称:sws,代码行数:7,代码来源:Color.cpp

示例3: MarkerActionsToggle

void MarkerActionsToggle(COMMAND_T* = NULL)
{
	g_bMAEnabled = !g_bMAEnabled;
	if (g_bMAEnabled) plugin_register("timer", (void*)MarkerActionTimer);
	else              plugin_register("-timer",(void*)MarkerActionTimer);
	WritePrivateProfileString("SWS", "MarkerActionsEnabled", g_bMAEnabled ? "1" : "0", get_ini_file());
	RefreshMAToolbar();
}
开发者ID:Breeder,项目名称:sws,代码行数:8,代码来源:MarkerActions.cpp

示例4: SWSUnregisterCmd

// Returns the COMMAND_T entry (so it can be freed if necessary)
COMMAND_T* SWSUnregisterCmd(int id)
{
	if (COMMAND_T* ct = g_commands.Get(id, NULL))
	{
		plugin_register("-gaccel", &ct->accel);
		plugin_register("-command_id", &id);
		g_commands.Delete(id);
#ifdef ACTION_DEBUG
		g_cmdFiles.Delete(id);
#endif
		return ct;
	}
	return NULL;
}
开发者ID:pottootje1982,项目名称:recorded-midi-cleaner,代码行数:15,代码来源:sws_extension.cpp

示例5: add_contextual_data_module_init

gboolean
add_contextual_data_module_init(GlobalConfig *cfg, CfgArgs *args)
{
  plugin_register(cfg, add_contextual_data_plugins,
                  G_N_ELEMENTS(add_contextual_data_plugins));
  return TRUE;
}
开发者ID:black-perl,项目名称:syslog-ng,代码行数:7,代码来源:add-contextual-data-plugin.c

示例6: dbparser_module_init

gboolean
dbparser_module_init(GlobalConfig *cfg, CfgArgs *args)
{
  pattern_db_global_init();
  plugin_register(cfg, dbparser_plugins, G_N_ELEMENTS(dbparser_plugins));
  return TRUE;
}
开发者ID:Turneliusz,项目名称:syslog-ng-3.5,代码行数:7,代码来源:dbparser-plugin.c

示例7: ProjectMgrInit

int ProjectMgrInit()
{
	SWSRegisterCommands(g_projMgrCmdTable);

	// Save the index of OpenRelatedProject() for later
	g_iORPCmdIndex = -1;
	while (g_projMgrCmdTable[++g_iORPCmdIndex].doCommand != OpenRelatedProject);

	if (!plugin_register("projectconfig",&g_projectconfig))
		return 0;

	if (!plugin_register("hookcustommenu", (void*)menuhook))
		return 0;

	return 1;
}
开发者ID:Breeder,项目名称:sws,代码行数:16,代码来源:ProjectMgr.cpp

示例8: basicfuncs_plus_module_init

gboolean
basicfuncs_plus_module_init(GlobalConfig *cfg, CfgArgs *args)
{
  plugin_register(cfg, basicfuncs_plus_plugins,
                  G_N_ELEMENTS(basicfuncs_plus_plugins));
  return TRUE;
}
开发者ID:ccin2p3,项目名称:syslog-ng-incubator,代码行数:7,代码来源:basic-funcs-plus.c

示例9: syslogformat_module_init

gboolean
syslogformat_module_init(GlobalConfig *cfg, CfgArgs *args)
{
  syslog_format_init();
  plugin_register(cfg, syslog_format_plugins, G_N_ELEMENTS(syslog_format_plugins));
  return TRUE;
}
开发者ID:jbfuzier,项目名称:syslog-ng,代码行数:7,代码来源:syslog-format-plugin.c

示例10: VersionCheckInitExit

int VersionCheckInitExit (bool init)
{
	if (init)
	{
		bool official, beta; unsigned int lastTime;
		GetStartupSearchOptions (&official, &beta, &lastTime);

		if (official || beta)
		{
			// Make sure at least 24 hours have passed since the last search
			unsigned int currentTime = (unsigned int)time(NULL);
			if (currentTime - lastTime >= 86400 || currentTime - lastTime < 0)
			{
				SetStartupSearchOptions(official, beta, currentTime);

				g_searchObject = new (nothrow) BR_SearchObject(true);
				return plugin_register("timer",(void*)StartupSearch); // timer starts only after project gets loaded
			}
		}
	}
	else
	{
		if (g_searchObject)
			delete g_searchObject;
		g_searchObject = NULL;
		StartupSearch();
	}

	return 1;
}
开发者ID:Breeder,项目名称:sws,代码行数:30,代码来源:BR_Update.cpp

示例11: SNM_ProjectInit

int SNM_ProjectInit()
{
  char buf[SNM_MAX_ACTION_CUSTID_LEN]="";
  GetPrivateProfileString("Misc", "GlobalStartupAction", "", buf, sizeof(buf), g_SNM_IniFn.Get());
  g_globalAction.Set(buf);
  return plugin_register("projectconfig", &s_projectconfig);
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:7,代码来源:SnM_Project.cpp

示例12: tfgeoip_module_init

gboolean
tfgeoip_module_init(GlobalConfig *cfg, CfgArgs *args)
{
  tf_geoip_init();
  plugin_register(cfg, tfgeoip_plugins, G_N_ELEMENTS(tfgeoip_plugins));
  return TRUE;
}
开发者ID:Turneliusz,项目名称:syslog-ng-3.5,代码行数:7,代码来源:tfgeoip.c

示例13: redis_module_init

gboolean
redis_module_init(GlobalConfig *cfg, CfgArgs *args)
{
  plugin_register(cfg, &redis_plugin, 1);

  return TRUE;
}
开发者ID:algernon,项目名称:syslog-ng-old,代码行数:7,代码来源:redis.c

示例14: xmsg_plugin_init

int xmsg_plugin_init(int prio)
{
	PLUGIN_CHECK_VER("xmsg");
#ifdef HAVE_INOTIFY
	if ((in_fd = inotify_init()) == -1)
		xerrn("unable to init inotify");
#endif /*HAVE_INOTIFY*/
	
	xdebug("inotify fd = %d", in_fd);
	
	xmsg_plugin.params	= xmsg_plugin_vars;
	xmsg_plugin.priv	= &xmsg_priv;
	plugin_register(&xmsg_plugin, prio);

	query_connect_id(&xmsg_plugin, PROTOCOL_VALIDATE_UID, xmsg_validate_uid, NULL);
	query_connect_id(&xmsg_plugin, EKG_SIGUSR1, xmsg_handle_sigusr, NULL);

#define XMSG_CMDFLAGS SESSION_MUSTBELONG
#define XMSG_CMDFLAGS_TARGET SESSION_MUSTBELONG|COMMAND_ENABLEREQPARAMS|COMMAND_PARAMASTARGET|SESSION_MUSTBECONNECTED
	command_add(&xmsg_plugin, "xmsg:", "?", xmsg_inline_msg, XMSG_CMDFLAGS, NULL);
	command_add(&xmsg_plugin, "xmsg:chat", "!uU !", xmsg_msg, XMSG_CMDFLAGS_TARGET, NULL);
	command_add(&xmsg_plugin, "xmsg:connect", NULL, xmsg_connect, XMSG_CMDFLAGS, NULL);
	command_add(&xmsg_plugin, "xmsg:disconnect", NULL, xmsg_disconnect, XMSG_CMDFLAGS, NULL);
	command_add(&xmsg_plugin, "xmsg:msg", "!uU !", xmsg_msg, XMSG_CMDFLAGS_TARGET, NULL);
	command_add(&xmsg_plugin, "xmsg:reconnect", NULL, xmsg_reconnect, XMSG_CMDFLAGS, NULL);
#undef XMSG_CMDFLAGS_TARGET
#undef XMSG_CMDFLAGS

#ifdef HAVE_INOTIFY
	variable_add(&xmsg_plugin, "max_inotifycount", VAR_INT, 1, &config_maxinotifycount, NULL, NULL, NULL);
	watch_add(&xmsg_plugin, in_fd, WATCH_READ, xmsg_handle_data, NULL);
#endif /*HAVE_INOTIFY*/
	
	return 0;
}
开发者ID:dmilith,项目名称:ekg2-bsd,代码行数:35,代码来源:xmsg.c

示例15: EditCursorInit

int EditCursorInit()
{
	SWSRegisterCommands(g_commandTable);
	if (!plugin_register("projectconfig",&g_projectconfig))
		return 0;
	return 1;
}
开发者ID:AusRedNeck,项目名称:sws,代码行数:7,代码来源:EditCursor.cpp


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