⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setattributes.c

📁 Nxlib,一个模拟xlib的程序。使用microwindows的库来运行需要xlib支持的程序。
💻 C
字号:
#include "nxlib.h"intXChangeWindowAttributes(Display * display, Window w, unsigned long valuemask,			XSetWindowAttributes * attributes){printf("XChangeWindowAttributes: valuemask 0x%X\n", valuemask);	if (valuemask & CWBackPixel)		XSetWindowBackground(display, w, attributes->background_pixel);	if (valuemask & CWBorderPixel)		XSetWindowBorder(display, w, attributes->border_pixel);	if (valuemask & CWEventMask)		XSelectInput(display, w, attributes->event_mask);	if (valuemask & CWOverrideRedirect) {		GR_WM_PROPERTIES props;		GrGetWMProperties(w, &props);		if (props.title)			free(props.title);		props.flags = GR_WM_FLAGS_PROPS;		if (attributes->override_redirect)			props.props |= GR_WM_PROPS_NODECORATE;		else props.props &= ~GR_WM_PROPS_NODECORATE;		GrSetWMProperties(w, &props);	}	// FIXME handle additional attributes	return 1;}intXSetLineAttributes(Display * display, GC gc, unsigned int line_width,		   int line_style, int cap_style, int join_style){	unsigned long ls;	switch (line_style) {	case LineOnOffDash:	case LineDoubleDash:		/*ls = GR_LINE_DOUBLE_DASH;*/ /* nyi*/		ls = GR_LINE_ONOFF_DASH;		break;	default:		ls = GR_LINE_SOLID;		break;	}	if (line_width > 1)		printf("XSetLineAttributes: width %d\n", line_width);	if (join_style != JoinMiter)		printf("XSetLineAttributes: We don't support join style yet\n");	GrSetGCLineAttributes(gc->gid, ls);	return 1;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -