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

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

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

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

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

示例1: xchat_plugin_init

intxchat_plugin_init (xchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg){	xchat_plugin_get_info (plugin_name, plugin_desc, plugin_version, NULL);	ph = plugin_handle;	if (notify_init ("XChat-GNOME OSD")) {		/* FIXME: multi-head! */		GtkIconTheme *theme = gtk_icon_theme_get_default ();		notify_icon = gtk_icon_theme_load_icon (theme, "xchat-gnome", 48, 0, NULL);		xchat_hook_print (ph, "Channel Msg Hilight",       XCHAT_PRI_NORM, new_msg_cb,     NULL);		xchat_hook_print (ph, "Channel Action Hilight",    XCHAT_PRI_NORM, new_action_cb,  NULL);		xchat_hook_print (ph, "Private Message",           XCHAT_PRI_NORM, private_msg_cb, NULL);		xchat_hook_print (ph, "Private Message to Dialog", XCHAT_PRI_NORM, private_msg_cb, NULL);		xchat_print (ph, _("OSD loaded/n"));		return TRUE;	} else {		xchat_print (ph, _("OSD initialization failed/n"));	}	return FALSE;}
开发者ID:GNOME,项目名称:xchat-gnome,代码行数:25,


示例2: xchat_plugin_init

intxchat_plugin_init (xchat_plugin * plugin_handle, char **plugin_name,						 char **plugin_desc, char **plugin_version, char *arg){	if (initialized != 0) {		xchat_print (plugin_handle, "Perl interface already loaded/n");		return 0;	}	ph = plugin_handle;	initialized = 1;	*plugin_name = "Perl";	*plugin_desc = "Perl scripting interface";	*plugin_version = PACKAGE_VERSION;	xchat_hook_command (ph, "load", XCHAT_PRI_NORM, perl_command_load, 0, 0);	xchat_hook_command (ph, "unload", XCHAT_PRI_NORM, perl_command_unload, 0,							  0);	xchat_hook_command (ph, "reload", XCHAT_PRI_NORM, perl_command_reload, 0,							  0);	xchat_hook_command (ph, "pl_reload", XCHAT_PRI_NORM, perl_command_reload, 0,							  0);	xchat_hook_command (ph, "unloadall", XCHAT_PRI_NORM,							  perl_command_unloadall, 0, 0);	xchat_hook_command (ph, "reloadall", XCHAT_PRI_NORM,							  perl_command_reloadall, 0, 0);	/*perl_init (); */	xchat_hook_timer (ph, 0, perl_auto_load, NULL );	xchat_print (ph, "Perl interface loaded/n");	return 1;}
开发者ID:KhitryyGruzinGivi,项目名称:xchat,代码行数:35,


示例3: XS

/* Xchat::Internal::hook_fd(fd, callback, flags, userdata) */staticXS (XS_Xchat_hook_fd){	int fd;	SV *callback;	int flags;	SV *userdata;	SV *package;	xchat_hook *hook;	HookData *data;	dXSARGS;	if (items != 4) {		xchat_print (ph,						 "Usage: Xchat::Internal::hook_fd(fd, callback, flags, userdata)");	} else {		fd = (int) SvIV (ST (0));		callback = ST (1);		flags = (int) SvIV (ST (2));		userdata = ST (3);		package = ST (4);		data = NULL;#ifdef WIN32		if ((flags & XCHAT_FD_NOTSOCKET) == 0) {			/* this _get_osfhandle if from win32iop.h in the perl distribution,			 *  not the one provided by Windows			 */ 			fd = _get_osfhandle(fd);			if (fd < 0) {				xchat_print(ph, "Invalid file descriptor");				XSRETURN_UNDEF;			}		}#endif		data = malloc (sizeof (HookData));		if (data == NULL) {			XSRETURN_UNDEF;		}		data->callback = newSVsv (callback);		data->userdata = newSVsv (userdata);		data->depth = 0;		data->package = newSVsv (package);		hook = xchat_hook_fd (ph, fd, flags, fd_cb, data);		data->hook = hook;		XSRETURN_IV (PTR2IV (hook));	}}
开发者ID:JordanKinsley,项目名称:hexchat,代码行数:53,


示例4: XS

/* Xchat::print(output) */staticXS (XS_Xchat_print){	char *text = NULL;	dXSARGS;	if (items != 1) {		xchat_print (ph, "Usage: Xchat::Internal::print(text)");	} else {		text = SvPV_nolen (ST (0));		xchat_print (ph, text);	}	XSRETURN_EMPTY;}
开发者ID:KhitryyGruzinGivi,项目名称:xchat,代码行数:16,


示例5: lxc_print

/*  * lua:  xchat.print(text) * desc: Prints some text to the current tab/window. * ret:  none * args:  *       * text (string): the text to print */static int lxc_print(lua_State *L){	const char *txt = luaL_checkstring(L, 1);	// FIXME? const char *txt = lua_tostring(L, 1);	xchat_print(ph, txt);	return 0;}
开发者ID:JordanKinsley,项目名称:hexchat,代码行数:14,


示例6: xchat_plugin_deinit

intxchat_plugin_deinit(void){	xchat_command (ph, "MENU DEL /"Window/Display Current Song (Winamp)/"");	xchat_print (ph, "Winamp plugin unloaded/n");	return 1;}
开发者ID:JordanKinsley,项目名称:hexchat,代码行数:7,


示例7: XS

staticXS (XS_Xchat_get_info){	SV *temp = NULL;	dXSARGS;	if (items != 1) {		xchat_print (ph, "Usage: Xchat::get_info(id)");	} else {		SV *id = ST (0);		const char *RETVAL;		RETVAL = xchat_get_info (ph, SvPV_nolen (id));		if (RETVAL == NULL) {			XSRETURN_UNDEF;		}		if (!strncmp ("win_ptr", SvPV_nolen (id), 7)) {			XSRETURN_IV (PTR2IV (RETVAL));		} else {						if (				!strncmp ("libdirfs", SvPV_nolen (id), 8) ||				!strncmp ("xchatdirfs", SvPV_nolen (id), 10)			) {				XSRETURN_PV (RETVAL);			} else {				temp = newSVpv (RETVAL, 0);				SvUTF8_on (temp);				PUSHMARK (SP);				XPUSHs (sv_2mortal (temp));				PUTBACK;			}		}	}}
开发者ID:hananh,项目名称:xchat-aqua,代码行数:35,


示例8: xchat_plugin_deinit

intxchat_plugin_deinit (void){    xdcc_save ();    xchat_print (ph, "XDCC List saved/n");    return 1;}
开发者ID:arinity,项目名称:gchat,代码行数:7,


示例9: loadThemes

void loadThemes(){    char *hDir, *hFile, *line, *val;	FILE *f;	xchat_print(ph,"loading themes/n");    hDir=(char*)calloc(1024,sizeof(char));    strcpy(hDir,xchat_get_info(ph,"xchatdirfs"));    hFile=str3cat(hDir,"//","mpcInfo.theme.txt");    f = fopen(hFile,"r");    if(f==NULL)	{		xchat_print(ph,"no theme in homedir, checking global theme");		f=fopen("mpcInfo.theme.txt","r");    }	//xchat_printf(ph,"file_desc: %p/n",f);	if (f==NULL) xchat_print(ph, "no theme found, using hardcoded/n");	else {		if (f > 0)		{			line=" ";		} else		{			line="/0";		}		while (line[0]!=0)		{			line=readLine(f);			val=split(line,'=');			printf("line: %s/n",line);			printf("val: %s/n",val);			if (strcmp(toUpper(line),"OFF_LINE")==0) notRunTheme=themeAdd(notRunTheme,val);			if (strcmp(toUpper(line),"TITLE_LINE")==0) titleTheme=themeAdd(titleTheme,val);			if (strcmp(toUpper(line),"MP3_LINE")==0) mp3Theme=themeAdd(mp3Theme,val);			if (strcmp(toUpper(line),"OGG_LINE")==0) mp3Theme=themeAdd(oggTheme,val);		}		fclose(f);		xchat_print(ph, "theme loaded successfull/n");	}	if (notRunTheme.size==0) notRunTheme=themeAdd(notRunTheme,"say Media Player Classic not running");	if (titleTheme.size==0) titleTheme=themeAdd(titleTheme,"say Playing %title in Media Player Classic");	if (mp3Theme.size==0) mp3Theme=themeAdd(mp3Theme,"me listens to %art with %tit from %alb [%gen|%br kbps|%frq kHz|%mode] in Media Player Classic ");	if (oggTheme.size==0) oggTheme=themeAdd(oggTheme,"me listens to %art with %tit from %alb [%gen|%br kbps|%frq kHz|%chan channels] in Media Player Classic ");	//mp3Theme=themeAdd(mp3Theme,"me listens to %art with %tit from %alb [%time|%length|%perc%|%br kbps|%frq kHz|%mode] in Media Player Classic ");}
开发者ID:JordanKinsley,项目名称:hexchat,代码行数:44,


示例10: fd_cb

static intfd_cb (int fd, int flags, void *userdata){	HookData *data = (HookData *) userdata;	int retVal = 0;	int count = 0;	dSP;	ENTER;	SAVETMPS;	PUSHMARK (SP);	XPUSHs (data->userdata);	PUTBACK;	set_current_package (data->package);	count = call_sv (data->callback, G_EVAL);	set_current_package (&PL_sv_undef);	SPAGAIN;	if (SvTRUE (ERRSV)) {		xchat_printf (ph, "Error in fd callback %s", SvPV_nolen (ERRSV));		if (!SvOK (POPs)) {}		  /* remove undef from the top of the stack */		retVal = XCHAT_EAT_ALL;	} else {		if (count != 1) {			xchat_print (ph, "Fd handler should only return 1 value.");			retVal = XCHAT_EAT_NONE;		} else {			retVal = POPi;			if (retVal == 0) {				/* if 0 is returned, the fd is going to get unhooked */				PUSHMARK (SP);				XPUSHs (sv_2mortal (newSViv (PTR2IV (data->hook))));				PUTBACK;				call_pv ("Xchat::unhook", G_EVAL);				SPAGAIN;				SvREFCNT_dec (data->callback);				if (data->userdata) {					SvREFCNT_dec (data->userdata);				}				free (data);			}		}	}	PUTBACK;	FREETMPS;	LEAVE;	return retVal;}
开发者ID:JordanKinsley,项目名称:hexchat,代码行数:56,


示例11: xchat_plugin_deinit

intxchat_plugin_deinit (xchat_plugin * plugin_handle){	perl_end ();	initialized = 0;	xchat_print (plugin_handle, "Perl interface unloaded/n");	return 1;}
开发者ID:KhitryyGruzinGivi,项目名称:xchat,代码行数:10,


示例12: timer_cb

static inttimer_cb (void *userdata){	HookData *data = (HookData *) userdata;	int retVal = 0;	int count = 0;	dSP;	ENTER;	SAVETMPS;	PUSHMARK (SP);	XPUSHs (data->userdata);	PUTBACK;	if (data->ctx) {		xchat_set_context (ph, data->ctx);	}	set_current_package (data->package);	count = call_sv (data->callback, G_EVAL | G_KEEPERR);	set_current_package (&PL_sv_undef);	SPAGAIN;	if (SvTRUE (ERRSV)) {		xchat_printf (ph, "Error in timer callback %s", SvPV_nolen (ERRSV));		if (!SvOK (POPs)) {}		  /* remove undef from the top of the stack */		retVal = XCHAT_EAT_ALL;	} else {		if (count != 1) {			xchat_print (ph, "Timer handler should only return 1 value.");			retVal = XCHAT_EAT_NONE;		} else {			retVal = POPi;			if (retVal == 0) {				/* if 0 is return the timer is going to get unhooked */				PUSHMARK (SP);				XPUSHs (sv_2mortal (newSViv (PTR2IV (data->hook))));				XPUSHs (sv_mortalcopy (data->package));				PUTBACK;				call_pv ("XChat::unhook", G_EVAL);				SPAGAIN;			}		}	}	PUTBACK;	FREETMPS;	LEAVE;	return retVal;}
开发者ID:DoctorWho11,项目名称:pchat,代码行数:54,


示例13: xchat_printf

void xchat_printf(xchat_plugin *ph, const char *format, ...){	va_list args;	char *buf;	va_start(args, format);	buf = g_strdup_vprintf(format, args);	va_end(args);	xchat_print(ph, buf);	g_free(buf);}
开发者ID:wowzaman12,项目名称:libPChat,代码行数:12,


示例14: xchat_print

void ScriptDataList::list(){   xchat_print( the_plugin, PNAME ": -------------------------------------------/n" );   if ( m_head == 0 ) {      xchat_print( the_plugin, PNAME ":    Currently, no module loaded./n" );      return;   }   xchat_print( the_plugin,      PNAME ": Status  Name/n"      PNAME ": ------  ----------------------------------/n" );   ScriptData *mod = m_head;   while( mod != 0 )   {      Falcon::String status = mod->m_bStatus ? "Ok  " : "Error";      xchat_print_falcon( PNAME ": "+ status + "    " + mod->m_module->name() +"/n" );      mod = mod->m_next;   }   xchat_print( the_plugin, PNAME ": ----------------------------------------------/n" );}
开发者ID:falconpl,项目名称:fxchat,代码行数:21,


示例15: static_ruby_xchat_print

static VALUE static_ruby_xchat_print( VALUE klass,                                      VALUE text ){  char *s_text;  Check_Type( text, T_STRING );  s_text = StringValueCStr( text );  xchat_print( static_plugin_handle, s_text );  return Qnil;}
开发者ID:FrostbittenKing,项目名称:XChat-Ruby,代码行数:13,


示例16: timer_showlist

static void timer_showlist(){	GSList *list;	timer *tim;	if (timer_list == nullptr)	{		xchat_print(ph, "No timers installed./n");		xchat_print(ph, HELP);		return;	}							 /*  00000 00000000 0000000 abc */	xchat_print(ph, "/026 Ref#  Seconds  Repeat  Command /026/n");	list = timer_list;	while (list)	{		tim = (timer*)list->data;		xchat_printf(ph, "%5d %8.1f %7d  %s/n", tim->ref, tim->timeout,						  tim->repeat, tim->command);		list = list->next;	}}
开发者ID:wowzaman12,项目名称:libPChat,代码行数:22,


示例17: xchat_plugin_deinit

intxchat_plugin_deinit (xchat_plugin * plugin_handle){	if (reinit_tried) {		reinit_tried--;		return 1;	}	perl_end ();	xchat_print (plugin_handle, "Perl interface unloaded/n");	return 1;}
开发者ID:hananh,项目名称:xchat-aqua,代码行数:14,


示例18: timer_cb

static int timer_cb(char *word[], char *word_eol[], void *userdata){	int repeat = 1;	float timeout;	int offset = 0;	int ref = 0;	int quiet = FALSE;	char *command;	if (!word[2][0])	{		timer_showlist();		return XCHAT_EAT_XCHAT;	}	if (strcasecmp(word[2], "-quiet") == 0)	{		quiet = TRUE;		offset++;	}	if (strcasecmp(word[2 + offset], "-delete") == 0)	{		timer_del_ref(atoi (word[3 + offset]), quiet);		return XCHAT_EAT_XCHAT;	}	if (strcasecmp(word[2 + offset], "-refnum") == 0)	{		ref = atoi(word[3 + offset]);		offset += 2;	}	if (strcasecmp(word[2 + offset], "-repeat") == 0)	{		repeat = atoi(word[3 + offset]);		offset += 2;	}	timeout = atof(word[2 + offset]);	command = word_eol[3 + offset];	if (timeout < 0.1 || !command[0])		xchat_print(ph, HELP);	else		timer_add(ref, timeout, repeat, command);	return XCHAT_EAT_XCHAT;}
开发者ID:wowzaman12,项目名称:libPChat,代码行数:49,


示例19: command_cb

static intcommand_cb (char *word[], char *word_eol[], void *userdata){	HookData *data = (HookData *) userdata;	int retVal = 0;	int count = 0;	dSP;	ENTER;	SAVETMPS;		if (data->depth)		return XCHAT_EAT_NONE;	/*               xchat_printf (ph, "Recieved %d words in command callback", */	/*                               av_len (wd)); */	PUSHMARK (SP);	XPUSHs (newRV_noinc ((SV *) array2av (word)));	XPUSHs (newRV_noinc ((SV *) array2av (word_eol)));	XPUSHs (data->userdata);	PUTBACK;	data->depth++;	set_current_package (data->package);	count = call_sv (data->callback, G_EVAL);	set_current_package (&PL_sv_undef);	data->depth--;	SPAGAIN;	if (SvTRUE (ERRSV)) {		xchat_printf (ph, "Error in command callback %s", SvPV_nolen (ERRSV));		if (!SvOK (POPs)) {}		  /* remove undef from the top of the stack */		retVal = XCHAT_EAT_XCHAT;	} else {		if (count != 1) {			xchat_print (ph, "Command handler should only return 1 value.");			retVal = XCHAT_EAT_NONE;		} else {			retVal = POPi;		}	}	PUTBACK;	FREETMPS;	LEAVE;	return retVal;}
开发者ID:JordanKinsley,项目名称:hexchat,代码行数:48,



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


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