Jump to content

Recommended Posts

Posted

When I use uGFX, I do not know how to get the "content change event" or "focus event" of the "txtedit" object, for example, when the object is focused, execute some code to display the virtual keyboard.
So I read uGFX source code trying to achieve this function, but I encountered a little problem.

In the "gevent.h" file on the 66th line, there is such a code:

typedef struct GSource_t GSource, * GSourceHandle;

I did not find the structure named GSource_t where the definition, but the compiler can be, can also run, why?

I think this code should be equivalent to the following code:

typedef struct GSource_t{} GSource, * GSourceHandle;

Is this right?

Posted

That line is a "forward definition" and therefore is NOT equivalent to your suggested code. It is (in C++ terms) an abstract object not a reference to an empty structure.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...