예제 #1
0
파일: x.c 프로젝트: Limsik/e17
Win
ECreateWinFromXwin(Window xwin)
{
   Win                 win;
   Window              rr;
   int                 x, y;
   unsigned int        w, h, bw, depth;

   if (!XGetGeometry(disp, xwin, &rr, &x, &y, &w, &h, &bw, &depth))
      return NULL;

   win = EXidCreate();
   if (!win)
      return NULL;

   win->xwin = xwin;
   win->x = x;
   win->y = y;
   win->w = w;
   win->h = h;
   win->depth = depth;
   win->visual = WinGetVisual(VROOT);
   win->cmap = WinGetCmap(VROOT);
#if DEBUG_XWIN
   Eprintf("EXidWFX: %p %#lx\n", win, win->xwin);
#endif

   return win;
}
예제 #2
0
파일: text_xft.c 프로젝트: burzumishi/e16
void
_xft_FdcSetColor(TextState * ts, unsigned int color)
{
   FontCtxXft         *fdc = (FontCtxXft *) ts->fdc;
   XRenderColor        xrc;

   COLOR32_TO_ARGB16(color, xrc.alpha, xrc.red, xrc.green, xrc.blue);

   XftColorAllocValue(disp, WinGetVisual(fdc->win), WinGetCmap(fdc->win),
		      &xrc, &(fdc->xftc));
}
예제 #3
0
파일: text_xft.c 프로젝트: burzumishi/e16
int
_xft_FdcInit(TextState * ts, Win win, EX_Drawable draw)
{
   FontCtxXft         *fdc = (FontCtxXft *) ts->fdc;

   fdc->win = win;
   fdc->draw = draw;

   fdc->xftd = XftDrawCreate(disp, draw, WinGetVisual(win), WinGetCmap(win));
   if (!fdc->xftd)
      return -1;
   return 0;
}