Re: how to attach windows' ids?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Yes, sorry, I'm talking about the window manager, why? and why don't you think a xml configuration file ok?

I'm not a proper programmer or something like that, but I've used xml, toghether with a dtd, so don't have to spend time writting code for parsing an validating a config file, that's the kind of things xml is for, isn't? (appart from the documentation process itself)

I'm trying now to make use of Xft, been reading this:

http://www.keithp.com/~keithp/render/Xft.tutorial

But cannot get to render text as the doc says it should be.

Been trying to render a rect and text over it, but even when the server seems to properly access to the font, it doesn't render it.

Here goes the relevant piece of code:

  pat = XftNameParse ("adobe-myriad:size=16:normal");
  match = XftFontMatch(display, DefaultScreen(display), pat, &status);
  result = XftFontOpenPattern(display, match);
  if ((result == 0) && match) {
    printf("no\n");
    XftPatternDestroy(match);
  } else {
    printf("yes\n");
  }

  d = XftDrawCreate (display, win, visual, colmap);

  color.red=65355;
  color.blue=65355;
  color.green=65355;
  color.alpha=0xffff;

  if( !(XftColorAllocValue (display, &visual, colmap, &color, &out)) )
    exit(0);

  XftDrawRect (d, &out, 0, 0, 180, 180);
  XftColorFree (display, &visual, colmap, &out);

  color.red=0;
  color.blue=0;
  color.green=0;
  color.alpha=0xffff;

  if( !(XftColorAllocValue (display, &visual, colmap, &color, &out)) )
    exit(0);

  string = "afasdfasdf";
  XftDrawStr ing8(d, &out, result, 25, 25, string, strlen(string) );

  XftColorFree (display, &visual, colmap, &out);
  XftDrawDestroy (d);
  XftPatternDestroy(match);
  return 0;
}

And well, I know this font is working cose is exactly the same I'm using on my desktop's taskbar. But tried with others as well with no results.

Been looking on the internet (there's no much documentation for newbies on this), and been looking on the xterm sources, from where I've borrowed some code before getting lost on it, but don't exaclty know what I'm doing wrong.

Once again, any comments would be much apreciated.

Kind regards,

Josip Deanovic <djosip@xxxxxxxxxxxxxx> wrote:
chinlu chinawa writes:

> Hello,
>
> Many thanks, will try it.
>
> It's a desktop manager based on a xml config-file (libxml2), and
> which I'll be hopefully merging onto Icewm (desktop manager), so the
> user can have different sets of icons for different virtual desktops
> (whether he/she wants so).

When you say "desktop manager" you are really talking about window
manager?

> And it's actually for an embedded live system for trainning/education
> I'm in development of. Good idea, isn't it?

Yes, except xml configuration. :-)

--
Josip Deanovic
_______________________________________________

Devel@xxxxxxxxxxx
http://XFree86.Org/mailman/listinfo/devel


To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [X Forum]     [XFree86]     [XFree86 Newbie]     [X.Org]     [IETF Annouce]     [Security]     [Fontconfig]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux