Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!vsi1!daver!athsys!jim From: jim@athsys.uucp (Jim Becker) Newsgroups: comp.windows.x Subject: Request for Object-Oriented extension to XEvents (long) Message-ID: <161@tityus.UUCP> Date: 17 Oct 88 18:19:56 GMT Organization: Athena Systems, Inc., Sunnyvale, CA Lines: 91 Intro: Before making this request, I want to state that I understand the current pressure upon the MIT staff to get R3 out and free of problems as quickly as possible. The request that I am making is assumed NOT to be part of the next release of X, but would be a worthwhile addition to the X package in the future. I believe that I am aware of the ramifications of backward-compatability and such, but believe that this future enhancement of X could prove very useful for improving appli- cation event processing throughput. I also assume that this request has been thought of and made, although I have not seen in come across the wire. This request seems rather simple to introduce to the package, and may already be in there somewhere, although I haven't discovered it as of yet. It would greatly help me, and lots of others, that are developing UIMS type packages for the X windows standard. As my clients' needs get more complex, not having this capability will simply slow down my ability to minimize response time. Background & Request: There are a number of user interface packages and Widget sets that are being created for the X windows platform. Most of these are adopting an object oriented approach to the task, OO being the latest buzzword in the industry. The interface system managing the user events currently reads the event stream, interprets the context of the event and dispatches the appropriate software routines to do the han- dling. For each event, the logic must determine the mapping of the "window" field of the XEvent structure to the internal data structures associated with the window. Once this con- nection is made the software routines are dispatched. Mapping of the XEvent window XID to the cooresponding data structures and logic currently must be done within the logic of the interface handling portion of the client program. This normally involves some sort of tablular or linked-list lookup within the resources of the client. Herein lies the overhead of the event processing throughput. More complex interfaces represent more windows and lookup, hence more slowdown in determining the correct object of an event. In certain instances this has led to re-writting of the server or lookup algorithms to optimize this task. (I am thinking of what I know of the DECwindows approach). This lookup is currently within the server, to determine the XID of the event being dispatched, as well as within the client, to map the XID to the client data internals. It would be nice to eliminate the redundancy from the client side of the logic. Elimination of this lookup logic is trivial. If there were the ability for the client to associate a pointer with the XID window resource this pointer could be returned along with the XEvent structure. The pointer would be a generic "UserDa- ta" field, and it was up to the client to define and inter- pret this field. In an object-oriented world the pointer would point to the object of the window, whatever data format that was defined as being. This capability would eliminate the need for additional logic and overhead of the client process. It would improve throughput of X and make it a cleaner/leaner machine to util- ize. And it is pretty easy to add (no flames, please). With the continuing complexity and demands of the software world, this shortcut may help ease the creation of programs and more easily define application interfaces. Simple Statement of Request: I tend to be a little verbose, what I am requesting is simply a new "UserData" field that is settable for an XID window resource. The specified "UserData" would be returned as a field in the XEvent structure for use by the client program. It would be a 32 bit field that was defined and understood by the client only, with the server just passing the value around. Thanks for listening to yet another request. I hope this one can make it in at some time, I think it would greatly help in the fu- ture speed and complexity of X products. -Jim Becker sun!athsys!jim