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

📄 window.c

📁 su 的源代码库
💻 C
字号:
/* Copyright (c) Colorado School of Mines, 2006.*//* All rights reserved.                       *//*********************** self documentation **********************//*****************************************************************************WINDOW - Function to create a window in X-windows graphicsxNewWindow	Create a new window and return the window ID******************************************************************************Function Prototype:Window xNewWindow (Display *dpy, int x, int y, int width, int height,	int border, int background, char *name);******************************************************************************Input:dpy		display pointerx		x in pixels of upper left cornery		y in pixels of upper left cornerwidth		width in pixelsheight		height in pixelsborder		border pixelbackground	background pixelname		name of window (also used for icon)******************************************************************************Notes:The parent window is the root window.The border_width is 4 pixels.******************************************************************************Author:		Dave Hale, Colorado School of Mines, 01/06/90*****************************************************************************//**************** end self doc ********************************/#include "xplot.h"WindowxNewWindow (Display *dpy, int x, int y, int width, int height,	int border, int background, char *name)/*****************************************************************************Create a new window and return the window ID******************************************************************************Input:dpy		display pointerx		x in pixels of upper left cornery		y in pixels of upper left cornerwidth		width in pixelsheight		height in pixelsborder		border pixelbackground	background pixelname		name of window (also used for icon)******************************************************************************Notes:The parent window is the root window.The border_width is 4 pixels.******************************************************************************Author:		Dave Hale, Colorado School of Mines, 01/06/90*****************************************************************************/{	Window root,win;	XSizeHints size_hints;	XWMHints wm_hints;	int scr,border_w=4;	/* get screen and root window */	scr = DefaultScreen(dpy);	root = RootWindow(dpy,scr);	/* create window */	win = XCreateSimpleWindow(dpy,root,x,y,width,height,		border_w,border,background);	/* set window properties for window manager */	size_hints.flags = USPosition|USSize;	size_hints.x = x;	size_hints.y = y;	size_hints.width = width;	size_hints.height = height;	XSetStandardProperties(dpy,win,name,name,None,0,0,&size_hints);	wm_hints.flags = InputHint;	wm_hints.input = True;	XSetWMHints(dpy,win,&wm_hints);	/* return window ID */	return win;}

⌨️ 快捷键说明

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