You are misreading it. (Sorry.)
I think you are using the term “brackets” to refer to the
parentheses used to invoke a function call.
Without the parentheses, the function name decomposes into a pointer to the function. This is one part of the language where you can obtain a pointer without explicitly using the
&
operator. That is, the following are identical:
1 2
|
fn_ptr = &some_fn;
fn_ptr = some_fn;
| |
In the code you reference, the
cbEvent
is
not invoked. It is simply used to populate the list of event handlers.
At some point during execution an event occurs, the list of event handlers is traipsed, and
then the event is invoked.
You will need to dig through the code a little more to find where that occurs. When you do, you will see an element of the event list having its
cb
member being invoked with parentheses:
cb( event, info )
.
Google around “C/C++ function pointers” for more introductory reading.
Hope this helps.