Gus Wirth wrote:
I've been playing around with some video stuff and became curious about the XvPutVideo function. The function has a man page, and my video card supports the function directly as shown by the output of xvinfo. From the man page:

XvPutVideo(3x)

Name
       XvPutVideo - write video into a drawable

Syntax
       #include <X11/extensions/Xvlib.h>

       XvPutVideo(dpy, port, d, gc, vx, vy, vw, vh, dx, dy, dw, dh)

       Display *dpy;
       XvPortID port;
       Drawable d;
       GC gc;
       int vx, vy, dx, dy;
       unsigned int vw, vh;
       unsigned int dw, dh;


So my question is: How do I find where Display, XvPortID, Drawable, and GC are declared? I have tried to grep through the header files and it is an overwhelming problem. Is there some search technique I can use? Or perhaps build some tiny app and use a debugger to tell me where the stuff comes from?

use ctags, luke...:

find /usr/X11/include/. -name '*.h' -print | xargs ctags
vi -t Display

there is similar support in emacs (using either ctags or etags). possibly other editors support it too.

'man ctags' for an explanation of what it does.
in vim, there are short-cuts to looking up the decleration of the symbol on which you stand, and moving back to where you came from (in a stack-like manner).

there's also a tool called 'cscope' for this - it works in a different mode (it opens the editor, not the other way around).

--guy

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to