亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? g2_x11.c

?? RNA二級結構預測程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*******************************************************************************  Copyright (C) 1998-2001  Ljubomir Milanovic & Horst Wagner**  This file is part of the g2 library****  This library is free software; you can redistribute it and/or**  modify it under the terms of the GNU Lesser General Public**  License as published by the Free Software Foundation; either**  version 2.1 of the License, or (at your option) any later version.****  This library is distributed in the hope that it will be useful,**  but WITHOUT ANY WARRANTY; without even the implied warranty of**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU**  Lesser General Public License for more details.****  You should have received a copy of the GNU Lesser General Public**  License along with this library; if not, write to the Free Software**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA******************************************************************************/#include <stdio.h>#include <stdlib.h>#include <stdarg.h>#include <limits.h>#include <math.h>#include <string.h>#include <X11/Xlib.h>#include <X11/Xutil.h>#include "g2.h"#include "g2_device.h"#include "g2_util.h"#include "g2_X11_P.h"#include "g2_X11.h"#include "g2_X11_funix.h"#include "g2_config.h"static int N_X11=0;static g2_X11_device *g2_X11_dev=NULL;/** * \ingroup physdev * \defgroup X11 X11 *//** * * Open a simple X11 window (physical device device). * * \param width window width * \param height window height * \return physical device id * * \ingroup X11 */int g2_open_X11(int width, int height){    return g2_open_X11X(width, height,			10, 10,			NULL, NULL,			NULL, -1, -1);}/** * * Open a X11 window (physical device device). If \a icon_width or \a * icon_height is smaller than 0, the \a icon_data is interpreted as a * file name. * * \param width window width * \param height window height * \param x x position on screen * \param y y position on screen * \param window_name hint for window manager * \param icon_name hint for window manager * \param icon_data icon bitmap (\a icon_width * \a icon_height bits) or file name containing bitmap *                  (if \a icon_width <= 0 or \a icon_height <= 0)  * \param icon_width icon width * \param icon_height icon height * \return physical device id * * \ingroup X11 */int g2_open_X11X(int width, int height,		 int x, int y,		 char *window_name, char *icon_name,		 char *icon_data, int icon_width, int icon_height){    g2_X11_device *xout=NULL;    int pid=-1, i;    char name[32];    int vid;        if(g2_X11_dev==NULL) {	g2_X11_dev=g2_malloc(sizeof(g2_X11_device));	N_X11=1;				  /* first X11 device */	xout=&g2_X11_dev[N_X11-1];	pid=0;    } else {	for(i=0;i<N_X11;i++)			  /* find free place */	    if(g2_X11_dev[i].display==NULL) {		xout=&g2_X11_dev[i];		pid=i;		break;	    }	if(i==N_X11) {	    N_X11++;	    g2_X11_dev=g2_realloc(g2_X11_dev,				  sizeof(g2_X11_device)*N_X11);	    xout=&g2_X11_dev[N_X11-1];	    pid=N_X11-1;	}    }        xout->width=width;			  /* set window size */    xout->height=height;        xout->NofInks=0;			  /* reset inks */    xout->inks=NULL;        vid = g2_register_physical_device(pid, NULL,				      g2_IntCoor, g2_X11_funix,				      1.0, -1.0,				      0.0, height-1);        sprintf(name, "g2: %d", vid);	   /* set window and icon names */    if(window_name==NULL)	window_name=name;    if(icon_name==NULL)	icon_name=name;        g2_X11_init_X11X(pid, width, height,		     x, y,      		     window_name, icon_name,		     icon_data, icon_width, icon_height);        					    /* g2 calls */    g2_allocate_basic_colors(vid);    g2_set_background(vid, 0);    g2_pen(vid, 1);        return vid;}     /* * * Extended version of the InitX11 *                       */int g2_X11_init_X11X(int pid, int width, int height,		     int xposition, int yposition,      		     char *window_name, char *icon_name,		     char *icon_data,		     unsigned int icon_width, unsigned int icon_height){    g2_X11_device *xout=&g2_X11_dev[pid];    Window root;    XSetWindowAttributes wattr;    XEvent event;    Pixmap iconPixmap;    XSizeHints sizehints;    int xhot, yhot, rv;    XColor w_scr, w_exa, r_scr, r_exa;    XClassHint class_hint;    if((xout->display=XOpenDisplay(NULL))==NULL) { 	g2_log(Error, "g2: can't open display\n");	exit(-1);    }    xout->root=RootWindow(xout->display, DefaultScreen(xout->display));    root=xout->root;        wattr.event_mask=ExposureMask;    xout->window=XCreateWindow(xout->display, root,			       xposition, yposition,			       width, height,			       0,			       CopyFromParent, InputOutput, CopyFromParent,			       CWEventMask,			       &wattr);    xout->gc=XCreateGC(xout->display, xout->window,		       0lu, NULL);    xout->colormap=DefaultColormap(xout->display,				   DefaultScreen(xout->display));            XAllocNamedColor(xout->display, xout->colormap,		     "red", &r_scr, &r_exa);    XAllocNamedColor(xout->display, xout->colormap,		     "white", &w_scr, &w_exa);        if(icon_data!=NULL) {	if(icon_width<=0 || icon_height<=0) {	  /* read icon from file */	    rv=XReadBitmapFile(xout->display, xout->window,			       icon_data, &icon_width, &icon_height,			       &iconPixmap, &xhot, &yhot);	} else {				  /* icon is bitmap */	    iconPixmap=XCreatePixmapFromBitmapData(xout->display,						   xout->window,						   icon_data,						   icon_width, icon_height,						   1ul, 0ul, 1);	    rv=BitmapSuccess;	}	switch(rv) {	  case BitmapOpenFailed:	    fputs("g2(OpenXX): bitmap file open failed\n",stderr);	    break;	  case BitmapFileInvalid:	    fputs("g2(OpenXX): bitmap file invalid\n",stderr);	    break;	  case BitmapNoMemory:	    fputs("g2(OpenXX): no enough memeory for bitmap\n",stderr);	    break;	}    } else {					  /* no icon data avail. */	unsigned char bitmapData[] = {	    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,	    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,	    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,	    0x00,0x00,0x00,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0xe0,	    0x0d,0x00,0x00,0x00,0x60,0x0c,0x00,0x00,0x00,0x20,0x18,	    0x00,0x00,0x00,0x00,0x10,0x00,0xf8,0xe3,0x07,0x08,0x00,	    0xfe,0xfa,0x07,0x0c,0x00,0xbf,0x6e,0x07,0x06,0x80,0x0f,	    0xf5,0x00,0x01,0x80,0x05,0x34,0x80,0x09,0xc0,0x03,0x78,	    0xe0,0x18,0x80,0x00,0x70,0xe0,0x1e,0xc0,0x01,0x70,0x70,	    0x1b,0xc0,0x01,0x50,0x00,0x00,0xc0,0x01,0x70,0x00,0x00,	    0xc0,0x00,0x70,0x00,0x00,0x40,0x03,0x38,0x00,0x00,0x80,	    0x05,0x50,0x00,0x00,0x80,0x0a,0x6e,0x00,0x00,0x00,0xfe,	    0x37,0x00,0x00,0x00,0x6a,0x59,0x00,0x00,0x00,0xbc,0x57,	    0x00,0x00,0x00,0xe0,0x50,0x00,0x00,0x00,0x00,0x60,0x00,	    0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,	    0x00,0x7c,0x2b,0x00,0x00,0x00,0xa4,0x1d,0x00,0x00,0x00,	    0xb8,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,	    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,	    0x00,0x00};	iconPixmap=XCreatePixmapFromBitmapData(xout->display, xout->window,					       (char*)bitmapData,					       40u, 40u,					       w_scr.pixel, r_scr.pixel,					       1ul);    }    sizehints.x = xposition;    sizehints.y = yposition;    sizehints.min_width = width;    sizehints.max_width = width;    sizehints.min_height = height;    sizehints.max_height = height;    sizehints.flags = PPosition | PMinSize | PMaxSize;    XSetStandardProperties(xout->display, xout->window,			   window_name, icon_name, iconPixmap,			   (char **)NULL, 0, &sizehints);        class_hint.res_name =  "g2";    class_hint.res_class = "G2";    XSetClassHint(xout->display, xout->window, &class_hint);     XMapRaised(xout->display, xout->window);        /*    XSetWindowBackground(xout->display, xout->window, w_scr.pixel); */    XClearWindow(xout->display,xout->window);        g2_X11_paper(pid, NULL, 0);    g2_X11_set_font_size(pid, NULL, 12);						  /* wait expose event */						  /* (no back. store) */    while(!XCheckWindowEvent(xout->display,xout->window,			     ExposureMask,&event))	;    wattr.event_mask=NoEventMask;		  /* set NoEventMask */    wattr.backing_store=Always;			  /* set backing store */    XChangeWindowAttributes(xout->display, xout->window,			    CWEventMask|CWBackingStore,			    &wattr);    xout->dest = xout->window;    xout->backing_pixmap = None;    if(XDoesBackingStore(XDefaultScreenOfDisplay(xout->display))!=Always) {	if(g2_EmulateBackingStore) {	    g2_log(Warning, "g2: Warning! Backing store is not available. Allocating pixmap instead.\n");	    xout->backing_pixmap = XCreatePixmap(xout->display, xout->window,						 xout->width, xout->height,						 DefaultDepth(xout->display, DefaultScreen(xout->display)));	    XSetWindowBackgroundPixmap(xout->display, xout->window,				       xout->backing_pixmap);	  	    XSetForeground (xout->display, xout->gc, w_scr.pixel);          	    XFillRectangle(xout->display, xout->backing_pixmap, xout->gc,			   0, 0, xout->width, xout->height);	    xout->dest = xout->backing_pixmap;	} else {		g2_log(Warning, "g2: Warning! Backing store is not available.\n");	}    }    XFlush(xout->display);    return 0;}int g2_X11_delete(int pid, void *pdp){    g2_X11_device *xout=&g2_X11_dev[pid];    XUnmapWindow(xout->display, xout->window);    if (xout->backing_pixmap != None)	XFreePixmap(xout->display,xout->backing_pixmap);    XDestroyWindow(xout->display, xout->window);    XDestroyWindow(xout->display, xout->root);    XFreeGC(xout->display, xout->gc);    XFreeColormap(xout->display, xout->colormap);    XCloseDisplay(xout->display);    if(xout->inks!=NULL)	g2_free(xout->inks);    xout->width=xout->height=0;    xout->display=NULL;    return 0;}int g2_X11_clear(int pid, void *pdp){    g2_X11_device *xout=&g2_X11_dev[pid];        if (xout->backing_pixmap == None) {	XClearWindow(xout->display,xout->window);    } else {	XSetForeground (xout->display, xout->gc,			xout->background);	XFillRectangle(xout->display, xout->dest, xout->gc,		       0, 0, xout->width, xout->height);    }    g2_X11_flush(pid, pdp);    return 0;}int g2_X11_flush(int pid, void *pdp){    g2_X11_device *xout=&g2_X11_dev[pid];    if( xout->backing_pixmap != None ) {	XCopyArea(xout->display, xout->dest, xout->window, xout->gc,		  0, 0, xout->width, xout->height, 0, 0);    }    XFlush(xout->display);    return 0;}int g2_X11_ink(int pid, void *pdp,	       double red, double green, double blue){    g2_X11_device *xout=&g2_X11_dev[pid];    XColor color;    color.flags=DoRed|DoGreen|DoBlue;    color.red   = (int)(red   * USHRT_MAX);    color.green = (int)(green * USHRT_MAX);    color.blue  = (int)(blue  * USHRT_MAX);    if(XAllocColor(xout->display,xout->colormap,&color)) {	xout->NofInks++;	if(xout->inks==NULL)	    xout->inks=	      (unsigned long *)g2_malloc(xout->NofInks*sizeof(unsigned long));	else	    xout->inks=	      (unsigned long *)g2_realloc((void *)xout->inks,					  xout->NofInks*sizeof(unsigned long));	if(xout->inks==NULL) {	    fputs("g2: not enough memory\n",stderr);	    return -1;	}	xout->inks[xout->NofInks-1]=color.pixel;	return xout->NofInks-1;    } else {	fputs("g2: color is not available\n",stderr);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区四区五区视频在线观看| 日韩欧美国产三级| 国产美女一区二区三区| 亚洲一级二级三级| 最好看的中文字幕久久| 日本一区二区免费在线| 精品国产伦一区二区三区观看方式 | 播五月开心婷婷综合| 久久丁香综合五月国产三级网站| 一区二区三区久久久| 亚洲欧洲韩国日本视频| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 国产不卡在线一区| 国产成人一级电影| av午夜精品一区二区三区| 国产激情一区二区三区| 国产激情一区二区三区桃花岛亚洲| 麻豆精品新av中文字幕| 激情综合色丁香一区二区| 国产一二精品视频| 成人av片在线观看| 色婷婷激情综合| 99re亚洲国产精品| 欧美少妇xxx| 56国语精品自产拍在线观看| 日韩亚洲国产中文字幕欧美| 2014亚洲片线观看视频免费| 精品久久久久久久久久久久久久久久久| 3d动漫精品啪啪一区二区竹菊| 91精品久久久久久久91蜜桃| 精品国精品自拍自在线| 久久综合久色欧美综合狠狠| 亚洲天堂2014| 亚洲va国产va欧美va观看| 久久精品999| 91麻豆免费视频| 欧美va亚洲va在线观看蝴蝶网| 欧美极品xxx| 日本网站在线观看一区二区三区 | 色综合天天天天做夜夜夜夜做| 欧美在线视频全部完| 精品国产乱码久久久久久蜜臀 | 色综合一个色综合亚洲| 欧美日韩一二三| 日本一区二区三区电影| 香蕉成人啪国产精品视频综合网| 麻豆精品一区二区三区| 91麻豆国产自产在线观看| 日韩欧美自拍偷拍| 一区二区三区在线观看国产| 石原莉奈一区二区三区在线观看| 亚洲欧美另类小说视频| 美腿丝袜亚洲综合| 欧美日韩一区二区欧美激情| 欧美国产精品专区| 韩国精品一区二区| 日韩欧美黄色影院| 日本最新不卡在线| 在线亚洲高清视频| 亚洲欧美日韩中文播放| 国产不卡在线视频| 欧美激情一区二区三区蜜桃视频| 狠狠网亚洲精品| 精品精品欲导航| 国产精品中文字幕日韩精品 | 欧美在线free| 亚洲一区二区免费视频| 色嗨嗨av一区二区三区| 18成人在线观看| 91视频观看视频| 亚洲欧美一区二区三区极速播放| 成人av免费在线| 中文字幕一区二区视频| 91美女片黄在线| 亚洲chinese男男1069| 欧美日韩精品一区二区在线播放 | 亚洲va欧美va人人爽午夜| 欧美日韩日日夜夜| 日韩高清在线观看| 国产肉丝袜一区二区| 成人sese在线| 午夜精品久久久久久久久久久 | 国产一区不卡精品| 久久久精品影视| 在线观看www91| 国产一区二区三区四区五区美女 | 色综合中文字幕国产 | 日韩精品免费视频人成| 久久久精品免费网站| 在线观看视频一区二区| 蜜桃久久精品一区二区| 久久亚洲综合色| 国产精品亚洲第一区在线暖暖韩国| 国产欧美一区二区精品性色超碰 | 欧美日韩第一区日日骚| 久久99九九99精品| 夜夜精品浪潮av一区二区三区| 欧美精品99久久久**| av在线播放成人| 久久99精品久久久久久动态图| 中文子幕无线码一区tr| 日韩一级精品视频在线观看| 成人av先锋影音| 麻豆精品在线看| 日韩专区在线视频| 亚洲精品久久嫩草网站秘色| 欧美精品一区二区三区四区| 欧美精品一区男女天堂| 国产成人精品网址| 国产又粗又猛又爽又黄91精品| 亚洲国产成人porn| 亚洲人成7777| 亚洲欧美激情在线| 最新热久久免费视频| 国产女人水真多18毛片18精品视频| 日韩视频在线你懂得| 欧美高清www午色夜在线视频| 色成年激情久久综合| 99精品视频在线观看| 91在线高清观看| 色狠狠av一区二区三区| 色婷婷精品大视频在线蜜桃视频 | 国产成人啪午夜精品网站男同| 麻豆国产精品777777在线| 日产欧产美韩系列久久99| 亚洲va韩国va欧美va精品| 日本欧美一区二区在线观看| 日韩**一区毛片| 韩国欧美一区二区| 大胆亚洲人体视频| 国产91精品精华液一区二区三区| 国产成人激情av| 欧美在线视频日韩| 日韩一级在线观看| 国产三级久久久| 亚洲综合成人在线| 免费在线观看日韩欧美| 国产不卡高清在线观看视频| 成人免费视频免费观看| 欧美三区在线观看| 亚洲精品一线二线三线| 成人欧美一区二区三区| 亚洲午夜精品网| 成人黄动漫网站免费app| 色婷婷精品大视频在线蜜桃视频| 日韩免费高清av| 亚洲美女精品一区| 国内精品在线播放| 91丨porny丨蝌蚪视频| 日韩午夜中文字幕| 亚洲精品久久7777| 国产在线精品国自产拍免费| 欧美亚洲综合在线| 国产精品久久久久影视| 蜜臀av性久久久久蜜臀av麻豆| 91免费观看在线| 久久尤物电影视频在线观看| 亚洲一级片在线观看| 成人免费视频caoporn| 日韩欧美中文字幕一区| 亚洲午夜成aⅴ人片| 97se亚洲国产综合在线| 国产亚洲精品7777| 精品一区二区三区视频| 欧美一区二区三区在线观看视频| 亚洲狼人国产精品| 99久久99久久精品免费观看| 国产精品免费视频一区| 国产乱国产乱300精品| 精品日韩在线一区| 免费观看91视频大全| 欧美一级午夜免费电影| 免费三级欧美电影| 7777精品伊人久久久大香线蕉经典版下载 | 不卡免费追剧大全电视剧网站| 久久免费视频一区| 成人美女视频在线观看18| 国产精品久久久久影院老司 | 91精品久久久久久久91蜜桃| 一区二区三区在线观看动漫| av在线播放一区二区三区| 国产精品久久久久三级| 懂色av一区二区三区免费看| 日本一区二区三区四区在线视频| 国产一区亚洲一区| 欧美国产精品中文字幕| proumb性欧美在线观看| 一区二区三区.www| 91精品国产综合久久福利软件| 久久精品国产久精国产| 欧美高清在线精品一区| 99久久免费精品高清特色大片| 午夜亚洲国产au精品一区二区| 欧美久久久一区| 不卡一区在线观看| 视频一区国产视频| 亚洲日本一区二区| 69p69国产精品| voyeur盗摄精品| 水蜜桃久久夜色精品一区的特点|