Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ingr!b11!doyle From: doyle@b11.ingr.com (Doyle Davidson) Newsgroups: comp.windows.x,ingr.x Subject: Re: Retrieving Application Class and Name Keywords: Application Class and Name Message-ID: <9359@b11.ingr.com> Date: 9 Nov 90 16:56:02 GMT References: <9352@b11.ingr.com> Organization: Intergraph Corp. Huntsville, AL Lines: 40 In article <9352@b11.ingr.com>, gja@b11.ingr.com (Gerry Attilio) writes: > > Is there any way to retrieve the application class and name that was > specified to XtDisplayInitialize. Our investigation led us to believe that > these values are managed internally within the Xt toolkit and access to the > pertinent data is restricted to Xt. One way I know of is through the ICCCM convenience functions: XGetClassHint(Display *, Window, XClassHint *) Also, the info is stored in the ApplicationShell (created by XtInitialize) in the xrm_class and/or class fields. You could probably cheat by: XrmClass c; char *class; ApplicationShellWidget a; a = (ApplicationShellWidget) XtInialize(...) c = a->application.xrm_class; class = a->application.class; ... I would suggest something like: toplevel = XtInitialize(...); XGetClassHint(XtDisplay(toplevel), XtWindow(toplevel), &classHint); Or maybe.... Doyle (Then again maybe I don't know what I'm talking about) Davidson ------------------------------------------------------------------ Doyle C. Davidson | Intergraph Corp. | These comments are... Third Party Software | Product Development | \\ / (205) 730-2000 | \\/ | /\\ clusively my own. ..!b23b!doyled!doyle -or- | / \\ ..!uunet!ingr!doyle | ------------------------------------------------------------------