Que as well as what can be an interrogative pronoun, in this case it asks for something completely unknown, "What do you want?", or it can be an interrogative adjective, in this case is asks for properties of something known, "What trouser you like best? The blue ones.", or for an element of a group, "What newspaper do you read? The Herald Tribune". Used as an adjective it competes with which / qual, see 22.3.
As the English what que refers to things. The contexts quem is used is the same in which what can be used.
subject: What is that?
direct object: What do you see?
asking for properties: What kind of person is he?
asking for an element: What day of the week do we have?
In the case it is used as a subject as well as in the case it is used as a direct object we can use the structure "o que" or "o que é que".
The author has no clue where this structure comes from. It resembles a to the French construction "Qu'est-ce que" what would be literally translated "What is that, what..." .
Qu' est-ce que tu vois. => ~What is that what you see?
O que é que tu vês. => ~ (The) what is what you see?
In the Portuguese version only the that is missing, but that's not a big problem, because we don't need it. (Actually the whole structure is not needed. A simple que / what does the job as well.) It is perhaps a heritage of the franconians, a germanic tribe that conquered France after the Roman Empire had fallen into pieces. Actually the franconians never settled on the iberian peninsula, but there are so many similarities between Portuguese and French, that there must exist a link. Perhaps the link are the celtic who possibly influenced both Portuguese and French. The nasal sounds for instance are a celtic invention, see 3.2.
Normative grammars refutes this use and the construction is indeed a little bit strange.
que / o que / o que é
Que você disse?
O que você disse?
O que é que você disse? *
What do you say?
que as a pronoun
Que compraste no mercado?
What did you buy on the market?
Que foi aquilo?
What was that?
Que ocorre aqui dentro?
What happens there inside?
O que você gostaria de beber?
What do you want to drink?
O que eu devo fazer?
What I have to do?
Used as an adjective que asks for properties. We well discuss this issue more in detail in the next chapter, see 22.3.