本文整理汇总了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);
}
}
示例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());
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例13: redis_module_init
gboolean
redis_module_init(GlobalConfig *cfg, CfgArgs *args)
{
plugin_register(cfg, &redis_plugin, 1);
return TRUE;
}
示例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;
}
示例15: EditCursorInit
int EditCursorInit()
{
SWSRegisterCommands(g_commandTable);
if (!plugin_register("projectconfig",&g_projectconfig))
return 0;
return 1;
}