HDTenEightyP/NetNews huggingface dataset:
From: as@chopper.b11.ingr.com (Anirudha Sahoo)
Subject: Limitattions of Callback routines
Keywords: 
   I have a xclient that uses Xt. It has two event (infinite) loops. One is in the
Organization: Intergraph Corp. Huntsville, AL
Date: Mon, 4 Jan 1993 23:22:26 GMT

main routine and the other is in the Callback routine. I think it's definitely a 
bad programming style, but is it *allowed* by X standard? I am not very much
familiar with Xt programming.
    Let me briefly explain what the application does. It Initializes Toolkit.
Creates a command widget. Then registers a callback routine. Then realizes the
toplevel shell. Then it has a infinite event loop. (That was the main routine). 
In the callback routine, it creates
a popup shell. Then it maps it through a call to XtPopup(). Then it has a infinite
event loop.
 
  So is it *legal* to have two event loops, one in main function and other in the 
callback routine. This application core dumps inside Xt after couple of click on 
the pop up widget.
Xref: sparky comp.windows.x.intrinsics:719 comp.windows.x.motif:8377
From: buzz@bear.com (Buzz Moschetti)
Newsgroups: comp.windows.x.intrinsics,comp.windows.x.motif
Subject: Attach data to widget *other* than via XmNuserData?
Date: 6 Jan 93 21:47:23 GMT
Reply-To: buzz@bear.com (Buzz Moschetti)
Organization: Bear, Stearns & Co. - FAST

Arbitrary data of size <= sizeof(XtPointer) can by attached to a widget
through the XmNuserData resource.  Fine.

Is there any other facility to attached data to a widget?  For example,
in XView, there is the XV_KEY_DATA resource as well as PANEL_CLIENT_DATA.
PANEL_CLIENT_DATA works just like XmNuserData:

	My_Data thing;
	xv_set(xview_obj, PANEL_CLIENT_DATA, &thing, NULL);

but XV_KEY_DATA permits you attach an unlimited (sort of) number of
datums, each addressed through a keyval:

	xv_set(xview_obj, XV_KEY_DATA, keyval, &thing, NULL);

keyval is of type unsigned long and can be hardcoded or generated 
at runtime through xv_unique_key():

	keyval = xv_unique_key();

	xv_set(xview_obj, XV_KEY_DATA, keyval, &thing, NULL);
	thing *p = (thing *) xv_get(xview_obj, XV_KEY_DATA, keyval);

Any clues?
From: drand@spinner.osf.org (Douglas S. Rand)
Subject: Re: Validity of having two event loops in Xt
Organization: Open Software Foundation
Date: 5 Jan 93 11:28:10

In article <1993Jan5.151025.4055@b11.b11.ingr.com> as@chopper.b11.ingr.com (Anirudha Sahoo) writes:

     My last posting was garbled, that's why I am posting it again.

      I have a xclient that uses Xt. It has two event (infinite) loops. One is in 
   the main routine and the other is in the Callback routine. I think it's 
   definitely a bad programming style, but is it *allowed* by X standard? I am not 
   very much familiar with Xt programming.

You might also consider shorter lines :)

You do not generally need more than one event loop in a proper
X Toolkit program.  There are definitely problems with trying to
call XtDispatchEvent within a callback.  I don't think the code
is reentrant (This is all best of recollection,  I haven't looked
at it in awhile).

You should consider one of the books on programming with the toolkit
in order to gain some coding guidelines.  I did find them quite useful
when I was starting on the toolkit.

--
Douglas S. Rand <drand@osf.org>		OSF/Motif Dev.
Snail:         11 Cambridge Center,  Cambridge,  MA  02142
Disclaimer:    I don't know if OSF agrees with me... let's vote on it.
Amateur Radio: KC1KJ
Newsgroups: comp.windows.x.intrinsics
From: ware@oboe.cis.ohio-state.edu (Peter Ware)
Subject: Re: Creating a shell widget other than defult depth ..
Originator: ware@oboe.cis.ohio-state.edu
Organization: Ohio State Computer Science
Date: Thu, 7 Jan 1993 13:34:49 GMT

In article <C0G17r.3y3@ulowell.ulowell.edu> vprasad@cs.ulowell.edu (V G Prasad) writes:

   Is it possible to open a shell widget to have a depth other
   than the default depth ??.
   In FAQ Q7 it is mentioned that the shell gets Defaultdepthofscreen
   if it is an applicationShellWidgetClass.

Look at the answer to FAQ Q5 where it arranges for a non-default
visual to be used.  You can use XMatchVisualInfo() instead of relying
on a command line argument to find a visual with the depth you desire.

--pete
--
Pete Ware					ware@cis.ohio-state.edu
CIS Dept, Ohio State University			w/ (614) 292-7318
228 Bolz Hall, 2036 Neil Ave.			h/ (614) 538-0965
Columbus, OH 43210
Welcome William Patrick Ware to the world!  Born 10/21/92, 8lbs 6.2oz (3.83kg)
Newsgroups: comp.windows.x.intrinsics
From: eillihca@drizzle.StanFord.EDU ( Achille Hui, the Day Dreamer )
Subject: Re: Book on Athena widget set
X-Transfer-Agent: nntp.stanford.edu (NNTP)
Organization: Dept. of Physics, Stanford University.
Date: 09 Jan 93 02:40:33 GMT

cs911046@ariel.yorku.ca (PETER E REISSNER) writes: 

>to me.  I noticed a book in a Books in Print reference cat. by McCormack
>published by Silicon Press called "X toolkit and Athena widgets" or 
>something close to that.  I'd like to know if anyone has it and could
>comment on it.  If it's good, then I'll order it.

I have McCormack's book. It is not suitable for learning the Athena widget
sets because everything is very dense.  However, if you have a little idea
of how things are organized under Xaw, this book serve as a excellent
reference when you are actually writing codes.

>My main problem seems to be that I have no idea how to convert programs
>for the HP X widget set using Xw headers to programs using Athena widgets.
>The HP X widgets need the Xw.h header file, and the motif widgets need
>the Xm.h header file.  BUT, Athena doesn't have any Xaw.h header file.

Unlike Motif (not sure about Xw), Xaw doesn't bundle everything under a 
single gigantic header. A typical Xaw based program contains the standard
Xt headers:

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>

followed by the headers of the Xaw widgets you actually used. For example,
suppose you want to use the Xaw label widget, then you include the header:

#include <X11/Xaw/Label.h>

>What do I do?  How can I try to convert these programs to athena?
>Will the book I mentioned do me good?  Any other suggestions?
>

Yes, but you should learn Xaw from other books instead. Borrow Vol. 4 
(X Toolkit Intrinsics Programming Manual) of the X-window series by
O'Reiley & Associates, Inc. from library, read the first few chapters
to get an overall idea. Return it and use McCormack's book to start
actual programing.

Hopefully this helps....
------------------------------------achille (eillihca@drizzle.stanford.edu)
JAXU -- Just Another X User.


Newsgroups: comp.windows.x.intrinsics
From: kalkan@ramz.ing.tu-bs.de (Ove Kalkan)
Subject: Problem with Viewport-Widgets
Organization: Mechanikzentrum, Technische Universitaet Braunschweig, Germany
Date: Wed, 6 Jan 1993 13:05:01 GMT

Hello,

I have following problem:

In my application I am using a viewport-widget with a box-widget as children.
The box-widgets contains several formwigets which a placed in the default
orientation.
For the viewport-widget I have set all scrollbar resources, because there are often
many form-widgets within the box.
Unfortunatly the scrollable region becomes larger than needed, but only in
vertical direction.

Does anybody know the reason or better a solution?

Thanks in advance, Ove
---------------------------------<o>------------------------------
Ove Kalkan, TU Braunschweig,              kalkan@ramz.ing.tu-bs.de

"Der Mensch ist ein primitives Tier und kein Mensch"
---------------------------------<o>------------------------------
From: faedi@loria.fr (Faedi Joel)
Newsgroups: comp.windows.x.intrinsics
Subject: Alarm and screen-saver
Date: 11 Jan 93 11:56:15 GMT
Organization: CRIN (CNRS) Nancy - INRIA Lorraine

Hello,

I'm writing a program under X11R4 and Motif.
It must raise alarms on the X terminal. But there is a problem
when the screen saver is on : my red blinking alarm window can
never be seen ! 

A friend told me that there was a solution here about a year ago.
Could anybody help me ?

Tanks in advance

------------------------------------------------------------------------
Faedi Joel                                        faedi@isial.u-nancy.fr
                                                  faedi@loria.fr

Newsgroups: comp.windows.x.intrinsics
From: phil@cfmu.eurocontrol.be (Phil Day)
Subject: Re: Attach data to widget *other* than via XmNuserData?
Date: Fri, 8 Jan 93 14:31:16 GMT
Organization: Eurocontrol - Central Flow Management Unit

In article <3998@creatures.cs.vt.edu> ramakris@csgrad.cs.vt.edu (S.Ramakrishnan) writes:
>In article <1993Jan7.180147.13806@cfmu.eurocontrol.be> phil@cfmu.eurocontrol.be (Phil Day) writes:
>  >If you don't mind going down a level to Xlib, then have a look
>  >at the Context Manager routines:
>  >
>  >	XDeleteContext
>  >	XFindContext
>  >	XSaveContext
>  >	XUniqueContext
>  >
>  >which allow you to associated untyped data with a window (on the client side)
>
>On the client side ? You mean not in the server ?
> 
>   [...storing/retrieving userdata using Xlib functions...]
>  
>
>Comments:
>
>  1. Since the X*Context() functions require the (Display *) _and_
>     (Window) arguments, I think the user's data is stored with the
>     server just as properties are. If that's the case, every
>     fetch/retrieve wil be a roundtrip request to server.
>     If the server is on a congested network, the program will suffer.
>
>     Unless the user data is meant to be shared with other processes
>     sharing the display/window, why should the data be stored with the
>     server ? Why the overheadd ?
>     
>  >(NB: Your widgets must be realized before using these routines !)
>
>  2. A widget may be realized; it may still not have a window (slow
>     network, moody window manager, etc). You must then install 
>     an XmNexposeCallback or XmNmapCallback as appropriate
>     to make sure.
>
> If the user data is private to the program, why not keep it within
> the program ? You can simply store the address of any complicate 
> structure as XmNuserData.
>
>---
>S Ramakrishnan, CS Dept, McBryde Hall, VaTech

1.  The Xlib documentation I have (O'Reilly Vol 1&2) says

	"The Context Manager lets you associate data with a window locally in Xlib,
     rather than in the server as properites" (Vol 1, 13.6.1).  

    A quick check of Vol 0 dosn't show any messages for Context, so I think I was
    right about the Context manager being on the client Side.

2. Are you sure about that ? I thought after XtRealize you were guarenteed to have
   a valid result from XtWindowofObject.  (Sure it might not be on the screen yet,
   but that's not important here).  I don't see how a moody window manager can affect
   things since it's the server which creates the windows, not the window manager. 


3. I thought the question was how to store data *other* then using XmNuserData (eg
   if something else is already using it, or you have a non-Motif widget, etc).

---
Phil.
Newsgroups: comp.windows.x.intrinsics
From: fineman@tatertot.arc.nasa.gov (Charles Fineman)
Subject: Font resources not freeable???
Organization: NASA/ARC Information Sciences Division
Distribution: comp
Date: Wed, 13 Jan 1993 00:15:25 GMT


I have an X application that manages several views which can be opened
and closed at any time. The widgets are created when they opened and
destroyed when they are closed (I have a reason for not mapping and
unmapping, we eventually may want to support multiple displays.)

I have an font resource that I resolve each time the view is created
(using XtGetApplicationResources). When it comes time to close the
view, I was freeing the retuned font struct. This seems to cause
problems though... I get "Bad Font" messages the next time I open the
view. 

Is the toolkit managing these font structures on the client side to
minimize traffic to the server? Does this mean that the font structure
is automatically freed when the last widget to use this font struct is
destroyed?

	Memory pinchers want to know!


		Chuck

--
From: ramakris@csgrad.cs.vt.edu (S.Ramakrishnan)
Newsgroups: comp.windows.x.intrinsics
Subject: Re: Attach data to widget *other* than via XmNuserData?
Date: 8 Jan 93 17:43:26 GMT
Organization: VPI&SU Computer Science Department, Blacksburg, VA

In article <3998@creatures.cs.vt.edu> ramakris@csgrad.cs.vt.edu (S.Ramakrishnan) writes:

  >  1. Since the X*Context() functions require the (Display *) _and_
  >     (Window) arguments, I think the user's data is stored with the
  >     server just as properties are. If that's the case, every
  >     fetch/retrieve wil be a roundtrip request to server.
  >     If the server is on a congested network, the program will suffer.
  >
  >     Unless the user data is meant to be shared with other processes
  >     sharing the display/window, why should the data be stored with the
  >     server ? Why the overheadd ?


Thanx to all those who corrected me about the mechanism of X*Context data.
Apparently its stored as a sparse matrix on client side and not with the
server.

However, as long as XmNuserData Motif resource is available, I think its
still easier to use that rather than this.

---
S Ramakrishnan, CS Dept, McBryde Hall, VaTech
Newsgroups: comp.windows.x.intrinsics,comp.windows.x,comp.lang.c++
From: drand@spinner.osf.org (Douglas S. Rand)
Subject: Re: Mixing Xt and a C++ String class library !? 
Organization: Open Software Foundation
Date: 6 Jan 93 17:00:25

In article <LARRY.93Jan5161544@shark.mitra.com> larry@shark.mitra.com (Larry Williamson) writes:

   ...
   The obvious answer is to not include both String.h and Intrinsic.h in
   one module, but that is not so easy, given the application. But I will
   if I must.

   We are using X11R5 patch 19, g++ 2.3.2 and libg++ 2.3(.2?)

   Any suggestions?

Here's a very easy method which used to work well for me.  Surround
the Xt include files with:

#define String XtStringType

include files

#undef String

This does exactly what you want.  It leaves String free to be an
identifier in libg++ or NIH or whatever.

Doug


--
Douglas S. Rand <drand@osf.org>		OSF/Motif Dev.
Snail:         11 Cambridge Center,  Cambridge,  MA  02142
Disclaimer:    I don't know if OSF agrees with me... let's vote on it.
Amateur Radio: KC1KJ
Newsgroups: comp.windows.x.intrinsics,comp.windows.x,comp.lang.c++
From: larry@shark.mitra.com (Larry Williamson)
Subject: Mixing Xt and a C++ String class library !? 
Organization: Mitra Imaging Inc.
Date: Tue, 5 Jan 1993 21:15:44 GMT


Anyone who has tried to mix X11 Intrinsics (Xt) and a C++ string class
library will be familiar with the problem I am faced with.

The FAQ suggests I should find a workaround. So far I have not found
one that is very satisfactory. In particular, if one source module
includes both <X11/Intrinsic.h> and a string class header <String.h>
(from libg++ version 2.3), then we have trouble.

I have modified Intrinsic.h so that the Xt String typedef is instead a
#define when using C++.  Now X11/Intrinsic.h must be included after
<String.h> so the C++ String class is defined properly, but the
#define in Intrinsic.h trashes any subsequent attempt to use the
String class in the source module.

The obvious answer is to not include both String.h and Intrinsic.h in
one module, but that is not so easy, given the application. But I will
if I must.

We are using X11R5 patch 19, g++ 2.3.2 and libg++ 2.3(.2?)

Any suggestions?

Kind regards, 

-Larry
From: stanonik@nprdc.navy.mil (Ron Stanonik)
Newsgroups: comp.windows.x.intrinsics
Subject: code in libXt.sa
Date: 1 Jan 93 18:07:35 GMT
Distribution: world
Organization: Navy Personnel R&D Center

Why is there code (eg, XtToolkitInitialize) in the libXt.sa?

Apparently these routines just call the real routines in the
libXt.so; eg, XtToolkitInitialize in libXt.sa calls
_XtToolkitInitialize in the libXt.so.  Must be a good reason
for this.  Efficiency?  Adaptability?

We stumbled upon this when an application wouldn't compile
in sunos4.1.2, which seems to more strictly check for
resolution of undefined references than earlier sunos's.

The sun documentation about shared libraries only seems
to mention putting initialized data into .sa's; ie, an
implicit prohibition of putting code there?

Thanks,

-- 
Ron Stanonik
stanonik@nprdc.navy.mil
ucsd!nprdc!stanonik
Newsgroups: comp.windows.x.intrinsics
From: horner@media-lab.mit.edu (Chris Horner)
Subject: Athena Text Widget Resize
Organization: MIT Media Laboratory
Date: Thu, 7 Jan 1993 23:43:35 GMT

I have a bunch of athena text widgets which are created and managed by
a composite widget, which I've subclassed to act as a bulletin board.
The trouble is that regardless of how much text is in the widgets, they 
always come up the default size, only one line tall.

By moving the pointer across the widget's border, it grows one line at
a time.  How can I get it to fully resize itself automatically though?
The resize resource only controls the direction of resizing, not whether
it gets done automatically.

Thanks!
-chris
Newsgroups: comp.windows.x
From: cindy@kolob.NoSubdomain.NoDomain (Cindy Lee)
Subject: Using XtCreatePopupShell with transient and topLevel shell class
Organization: Bellcore
Date: Tue, 5 Jan 93 22:49:18 GMT

Hi folks,
I'm trying to create an application with 2 shells that will enable
the following 2 window manager functions:
1) bringing either window forward in front of the other one
2) iconifying BOTH windows

I'm fiddling with XtCreatePopupShell with class types of
transientShellWidgetClass and topLevelShellWidgetClass.
The transient satisfies requirement #2 but not #1.
The topLevel satisfies requirement #1 but not #2.

Anyone know of a way to get either of these types of shells to 
satisfy both #1 and #2?

Thanks a billion!
Any information would be helpful.


Thanks
Cindy

SEND REPLY TO: cnorman@bellcore.com
(ignore the bogus return address that my crummy news 
 reader has attached above!)

Xref: sparky comp.windows.x:20738 comp.windows.x.motif:8322
From: handeli@phoenix.ocf.llnl.gov (David I Handeli)
Newsgroups: comp.windows.x,comp.windows.x.motif
Subject: SUIT
Keywords: Motif like, Cray, X
Date: 5 Jan 93 00:01:48 GMT
Followup-To: comp.windows.x
Organization: Lawrence Livermore National Laboratory


I just received a copy of SUIT, the Simple User Interface Toolkit,
from the University of Virginia. First, has anyone had any good or
bad experiences? Secondly, has anyone ported to UNICOS? Thanks.



Newsgroups: comp.windows.x
From: kaskubar@mayo.edu (Bruce Kaskubar)
Subject: Pen-based computing
Organization: Mayo Foundation, Rochester MN. Campus
Distribution: usa
Date: Thu, 7 Jan 93 00:12:21 GMT

Can X use pens for...
 - capturing ink (e.g., hand writing or drawings)?
 - character recognition?

Bruce Kaskubar
kaskubar@mayo.edu
From: ggh@reef.cis.ufl.edu (Greg Huey - Aymer deGregory)
Newsgroups: comp.windows.x.pex
Subject: HLHSR with PEX-SI
Date: 7 Jan 93 22:43:18 GMT
Distribution: comp.windows.x.pex
Organization: Univ. of Florida CIS Dept.

Im using PEX to draw a number of 3D objects with "Fill Area Sets".
The 'top' primative in the display is merely the last one
traversed in the structure tree, rather than the one closest to the
Front plane. I tried to get Pex to do HLHSR to fix this. In the
Top structure, I have the line:
pset_hlhsr_id(PHIGS_HLHSR_ID_ON);

and after opening the workstation with:
popen_ws(GME_PXS_WSID, (char *)&connid, phigs_ws_type_x_drawable);

Im trying to tell it to use Zbuffering to do HLHSR with the call:
pset_hlhsr_mode(GME_PXS_WSID, PHIGS_HLHSR_MODE_ZBUFF);

Now, the workstation Im using doesnt have Z buffering hardware. In this
case, the docs for the pset_hlhsr_mode function say it will turn on
software implementation of z buffer HLHSR. Instead, I get the message:
PHIGS error 111 in SET HLHSR MODE: Ignoring function, the specified HLHSR
mode is not available on the specified workstation

So whats the deal? Why won't PEX do software-emmulated Z buff HLHSR?
Is there some other method that would atleast reduce this problem?

Greg

ggh@reef.cis.ufl.edu
ggh@qtp.ufl.edu
From: joern@imf.unit.no (Joern Amundsen)
Newsgroups: comp.windows.x.pex
Subject: Re: what is PEX5 in MIT-X11R5 patch 19
Date: 6 Jan 93 08:17:36 GMT
	<1993Jan4.183530.15840@mintaka.lcs.mit.edu>
	<1ibpgeINNo8i@nz12.rz.uni-karlsruhe.de>
	<hersh.726258733@xenon.lcs.mit.edu>
Organization: The Norwegian Institute of Technology, Trondheim, Norway.


   From: hersh@expo.lcs.mit.edu (Jay Hersh)

	   If you look at Tom Gaskins PEXlib book there are some example
	   programs that are publicly ftp-able from someplace. I don't
	   recall where, but it is listed in the book.

``Someplace'' is
	ftp.uu.net (192.48.96.9), directory published/oreilly/xbook/pexlib :-)

-joern
--
  +---------------------------------------+----------------------------+
  | Joern Amundsen                        | email                      |
  | SINTEF Industrial Mathematics         |  - joern@sima.sintef.no    |
  | Department of Mathematical Sciences   |  - joern@imf.unit.no       |
  | The Norwegian Institute of Technology | phone +47-7-59-2092        |
  | N-7034 Trondheim, Norway              | fax   +47-7-59-2971 / 3524 |
  +---------------------------------------+----------------------------+
Newsgroups: comp.windows.x.pex
From: mor@xenon.lcs.mit.edu (Ralph Mor)
Subject: Re: what is PEX5 in MIT-X11R5 patch 19
Organization: MIT Laboratory for Computer Science
Date: Mon, 4 Jan 1993 18:35:30 GMT

In article <1i9lhdINN52r@nz12.rz.uni-karlsruhe.de>, schmidt@rpksun1.mach.uni-karlsruhe.de (Martin Schmidt) writes:
|> Hi experts,
|> 
|> I using the PEX-SI server and the phigs API from MIT X11R5
|> on my SparcII. As you know the PEX-SI server does not support
|> 
|>    - HLHSR_MODE
|>    - no monochrome screens
|>    - ..
|> 
|> Since some days we have installed MIT-X11R5 patch ..,19,20,21.
|> In patch 19 a new PEX library is included (PEXlib or PEX5 called).
|> 
|> 1. Question:
|> How can I use that library ? What are the new features ?
|> Is there a PHIGS API available to this implementation ?
|> Does patch 19 changes my PEX server (or are there now 2 servers) ????
|>

You seem to think that PEXlib might add some new features to PEX.
No.  PEXlib is a new API that gives you complete access to the
PEX protocol.  Some of its advantages over PHIGS is that it is
policy free, provides immediate mode capablities, and it integrates
very cleanly with your Xlib and toolkit applications.

If you want to learn more about PEXlib, you can ftp the PEXlib
specification document from MIT (ftp export.lcs.mit.edu, look for
/pub/DOCS/PEXlib/PEXlib.ps.tar.Z).  Also, Tom Gaskins has written
an excellent book on PEXlib (as part of the O'Reilly series on X).
I suggest Tom's book over reading the spec.

 
|> 2. Question:
|> I am using PEX-SI and MIT-X11R5 phigs in an C++ environment 
|> (on the top of InterViews [this is another problem. but now I 
|> have a first version of a PEXGlyph]. To use the phigs-functions I
|> need function prototypes. For MIT-X11R5 phigs I found no prototypes.
|> Therefore I edited the file mit/extensions/lib/PEX/c_binding.
|> Is there s.th. similar for the new library (better for an API) ??
|> 

The PEXlib-SI has function prototypes for all of the API functions.
The prototypes can be found in the header file PEXlib.h.


Ralph
Newsgroups: comp.windows.x.pex
From: cegarcia@athena.mit.edu (Carlos E Garcia)
Subject: HELP: phigs compiling
Organization: Massachusetts Institute of Technology
Date: Sun, 10 Jan 1993 02:00:11 GMT

I'm getting compiling errors saying "PFLAG_ALWAYS", "Pint_style", and other
variables are undefined.  The code is an example from the Phigs Programming
Manual.  I've included phigs.h, and i've greped for these terms in all the 
.h files and .a files in the locker.  Where are these variables defined?


			Carlos Garcia
			cegarcia@athena.mit.edu