info-xnee
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Info-xnee] Re: flow of functions in cnee !!


From: Henrik Sandklef
Subject: [Info-xnee] Re: flow of functions in cnee !!
Date: Wed, 07 May 2008 14:33:27 +0200
User-agent: Mozilla-Thunderbird 2.0.0.12 (X11/20080420)

answers below...

sridhar wrote:
> Hello Friend,
> 
> the following is the partial flow of execution i traced while reading the
> source code
> of xnee
> 
> * xd = xnee_new_xnee_data();
>   ..
>  . ..
> ret = xnee_parse_args (xd, argc, argv);---parsing
> ....
> .....
> xnee_parse_cnee_option(xd, &argv[i], &args_used);
> .....
> ......
> xnee_parse_option_impl(xnee_data *xd, char **opt_and_args, int *args_used,
> int syntax_mode);
> ...
> ...
> ret = xnee_start(xd); //defined in xnee.c
> ..
>  ret = xnee_prepare(xd);
> ....
> ret = xnee_grab_all_keys (xd)
> ........
>          ***** how about the following function ..what it is doing ???
> XGrabKey (xd->grab,
> xd->grab_keys->action_keys[i].key,
>             AnyModifier,            window,                   True,
>             GrabModeSync,            GrabModeSync );
> *...
> after this the following function is called
> *xnee_record_print_record_range (xnee_data *xd, /address@hidden@*/ FILE* out) 
> ;
> ..............
> .............
> xnee_setup_recording(xnee_data *xd);
> ........
> ret = xnee_print_sys_info(xd, xnee_get_out_file (xd));
>        XNEE_RETURN_IF_ERR (ret);
> 
>    xnee_print_xnee_settings (xd, xnee_get_out_file (xd)) ;
>   xnee_record_print_record_range (xd, xnee_get_out_file (xd)) ;//defined in
> print.c
> ...........
> .................
> at last
> xnee_record_async...()     *mark
> 
> this is the abstract flow of functions, i got it while working on cnee,
> from which function exactly the events/request/replies are printed in file
> as you said already to me ... the following is the function prints the
> information :
> *xnee_record_handle_event_printer()
> 
> but i could not trace out at what step it is called ?? after the **mark ??

In a function call (xnee_record.c):

   ret = XRecordEnableContext(xd->data,
                              xd->record_setup->rContext,
                              xd->rec_callback,
                              (XPointer) (xd) /* closure passed to Dispatch */);

we say that RECORD extension should call the function pointed to by the
variable xd->rec_callback. The variable xd->rec_callback is set by
default to the function xnee_record_dispatch

Once that function is registred, RECORD calls back for every copy of X11
data we get, so if we've registered to record MotionNotify events the
function xnee_record_dispatch gets callbacked every time we move the mouse.




> the things which i understood is :  setting memory, parsing, grabbing the
> display , after this
> how it is recording iam unable to grasp... so can you tell....
> looking forward for your reply  !!
> **
> 
> *--
> SrIDhAr M.tech(AI)
> Univ of Hyderabad
> ------------------------------------------------
> Life is pleasant. Death is peaceful. It's the transition that's troublesome.
> ------------------------------------------------
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]