C�pia dd jj <[EMAIL PROTECTED]>: > Hello everyone,
Hi, > I hope this is the correct mailing list to post these questions... Could > you please give some comments on them? thanks. > > 1) Now I want to search a button with specific caption, such as "Save" > or "Cancel".. "Ok" on X window (no matter GNOME or KDE) screen. > Can I implement this under different desktop enviroments(KDE,GNOME) with > Xlib programming? Or it's toally impossible? I think there is no standard way of doing it. And, frequently buttons are not even separate windows. Probably in most cases it is only possible to retrieve this kind of information from the same program; Xt based toolkits can use the XEditRes protocol, see the editres program. > As my understanding, > > The button in Gnome is built using GTK but that in KDE is built using > Qt, they are different widgets belong to differen Toolkit, right? But > since GTK and Qt are both based on Xlib, I am wondering whether we can > handle this using lowest level Programming - xlib? You can use Xlib in both toolkits, assuming your program is only mean't to run under X, but you cannot expect reliable behaviour depending on the Xlib functions you call. > Or maybe I can only program using GTK for GNOME, using Qt for KDE > separately for different desktop enviroment? You can use any toolkit uder any desktop. > 2) I tried to use XMoveResizeWindow to move a X window application such > as Xclock, or Xcalc, I parsed the window ID "w" got from xwininfo and > display dsp = XOpenDisplay(NULL) to it like: > > XMoveResizeWindow(dsp, w, 0, 0, 200, 200); > > it doesn't work, but when I creat my own window application using > > XCreateSimpleWindow, then it can work. Seems the display parameter is > different every time when implement: dsp = XOpenDispaly(ULL) ? > > Did I miss something to deal with such existing Application window? Did your program enter an event loop? It is a common mistake to send X requests, but the program exit before they are processed. Normally calling XSync or XFlush before exiting is enough. > Thank you for help me out. > > > > > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software You can see some "low level" information on toolkits and programming with Xlib in the famous Kenton Lee site: http://www.rahul.net/kenton/xsites.framed.html There you can also find some tutorials on X programming. Paulo _______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
