X and most (all) GUI for that matter don't use vectors: your screen is a matrix of pixel and X uses the address of the position of the cursor (I believe the 0,0 point is officially at the bottom left but some environments use a relative position to achieve something more convenient) The various icons (and for that matter windows) are objects with "properties" (such as having the "focus" i.e. being active) and "methods" (functions for the mathematicien) which react to "events" (such as starting a program when a specific "event" occurs -double click for instance)some of which are caused by the mouse (such as the mouse passing over the object, one of the key being clicked or doubled clicked when over the object etc...) in short it is a bit involved to be answered in a comprehensive fashion here. You would need to have a look at the introduction to an oop (object oriented programming) language to get a better idea The mecanics (getting the address of the pointer etc...) is supplied by the GUI. Information on that might require a bit more time and effort I would try google... Lionel --- Bob Bomar <[EMAIL PROTECTED]> wrote: > I was wondering how X knows when you click on an icon or an application, what > was actually clicked, for lack of better words. I am in a Calculs 3 class in > college and we are working on Vectors in 2D and 3D. I was wondering how X > knows when you click on a certain icon, what application should it run. I was > guessing that since X knows the coordinate of the cursor and the coordinate area > of the icon, that when you click within that area, it runs the application > associated with that area. I was also guessing that X uses the vector to the > cursor and that it knows the vectors that correspond to that icon, so therefor > knows the application to use. In either case, I was wanting to look at that > section of the code and see how it did it. I am a novice programmer with > limited programming experiance with C/C++, Perl, and sh. I appreciate any help > > > Thanks > > Bob > _______________________________________________ > Newbie mailing list > [EMAIL PROTECTED] > *** To unsubscribe , or change message options, see: > http://XFree86.Org/mailman/listinfo/newbie
__________________________________________________ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com _______________________________________________ Newbie mailing list [EMAIL PROTECTED] *** To unsubscribe , or change message options, see: http://XFree86.Org/mailman/listinfo/newbie
