| Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
| Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
| Moderator: | STAR::VATNE |
| Created: | Mon Oct 30 1989 |
| Last Modified: | Mon Dec 31 1990 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 3726 |
| Total number of notes: | 19516 |
Is there any way of finding out the "root name" of an application ? By
this, I mean the name that appears on the front of its resources
(there must be a proper term for this, but I have no idea what it is).
For example, for DECterm, it's DECW$TERMINAL, calendar is DECW$CALENDAR
etc.
Thanks,
Trevor
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 1960.1 | Client name ? | MARVIN::WARWICK | Trevor Warwick | Fri Dec 22 1989 05:30 | 7 |
It may be that the correct term for what I want is the "Client Name". I want it so that I can set up the Motif window manager to have the correct Icons for all the applications that don't conform the the ICCCM standard, and thus end up with no icon pixmap under mwm. Trevor | |||||
| 1960.2 | GOSOX::RYAN | DECwindows Mail | Fri Dec 22 1989 08:14 | 6 | |
What you're looking for is actually the client "class" - since the class is used to construct resource file names to be read in auto-magically by XtInitialize, $DIR DECW$SYSTEM_DEFAULTS:*.DAT should give you a few clues. Mike | |||||
| 1960.3 | WIKKIT::WARWICK | Trevor Warwick | Fri Dec 22 1989 08:43 | 6 | |
What about those applications that don't have a .DAT file ? I was
wondering if there was a program that would, for example, print out the
class names of all the current clients connected to a server.
Trevor
| |||||
| 1960.4 | AITG::DERAMO | Daniel V. {AITG,ZFC}:: D'Eramo | Fri Dec 22 1989 12:59 | 43 | |
I use a program that produces output like that below. It is in the next reply (72 lines). According to its initial comment it /* Walk the window tree. For every window with any of a class hints application class, class hints application name, or name, write the window id and the data found to the standard output. */ I use the window id in another program to change the title, icon, or position, and the class hints application class or name for the defaults file. Dan P.s. sample output: $ run findappls.exe window: 9437200 res_class: DECW$BANNER res_name: Banner name: Banner window: 2097173 res_class: DECW$TERMINAL res_name: decw$terminal name: ZFC window: 13631490 res_class: emacs res_name: name: GNU Emacs window: 11534415 res_class: DECW$MAIL res_name: Mail name: Mail window: 3145755 res_class: Decw$Session res_name: Session Manager name: Daniel V. D'Eramo . . . | |||||
| 1960.5 | findappls.c | AITG::DERAMO | Daniel V. {AITG,ZFC}:: D'Eramo | Fri Dec 22 1989 13:02 | 72 |
/*
Walk the window tree. For every window with any of
a class hints application class, class hints application
name, or name, write the window id and the data found
to the standard output.
*/
/*
Thanks to Dave Burleigh (TBD1::BURLEIGH) for his XTREE.C
which provided the skeleton for this program.
*/
#include <stdio.h>
#include <decw$include/Xlib.h>
#include <decw$include/Xutil.h>
static void WalkWindowTree(); /* recursive */
main(argc, argv)
unsigned int argc;
char *argv[];
{
Display *display;
if (!(display = XOpenDisplay(NULL))) {
fprintf(stderr, "Can't open display\n");
exit(0);
}
WalkWindowTree(display, RootWindow(display, DefaultScreen(display)));
exit(1);
}
static void WalkWindowTree(display, window)
Display *display;
Window window;
{
Window root, parent, *children;
int nchildren;
XClassHint ch;
char *name;
ch.res_name = NULL;
ch.res_class = NULL;
name = NULL;
XGetClassHint(display, window, &ch);
XFetchName(display, window, &name);
if (ch.res_class || ch.res_name || name) {
printf("window: %d\n", window);
if (ch.res_class)
printf(" res_class: %s\n", ch.res_class);
if (ch.res_name)
printf(" res_name: %s\n", ch.res_name);
if (name)
printf(" name: %s\n", name);
if (ch.res_name) XFree(ch.res_name);
if (ch.res_class) XFree(ch.res_class);
if (name) XFree(name);
}
XQueryTree(display, window, &root, &parent, &children, &nchildren);
if (nchildren) {
register int i;
register Window *child;
for (i = 0, child = children; i < nchildren; ++i, ++child)
WalkWindowTree(display, *child);
XFree(children);
}
return;
}
| |||||
| 1960.6 | works fine on Ultrix too | COOKIE::KITTELL | Richard - Architected Info Mgmt | Fri Dec 22 1989 19:16 | 4 |
change the two #include statements to replace decw$include with X11
and it compiles and runs just fine on Ultrix/RISC.
| |||||
| 1960.7 | yes to .6 | AITG::DERAMO | Daniel V. {AITG,ZFC}:: D'Eramo | Sat Dec 23 1989 11:30 | 8 |
>> change the two #include statements to replace decw$include with X11
>> and it compiles and runs just fine on Ultrix/RISC.
Right ... use <X11/...> in the C file and you don't need
those #ifdef VMS's ... just do a "define/user X11 decw$include"
before compiling on VMS.
Dan
| |||||