Hm it depends! If you can write a piece of code that is very generic, you can discuss if it is part of the engine API. But you always have to ask the question "is the engine entirely responsible for this feature?".

A game engine should be in my oppinion as versatile as possible. Bringing some GUI code into the engine set might be a good idea, but when it doesn't fit e.g. other genres, it is not versatile anymore. GUI code for first person shooters like Battlefield or COD is very different to what you need for RTS games like Age of Empires or the Settlers.

So if the engine developer thinks "ok lets do something!" he will end up in a very limited set of functionality that *has* to be extended of course to match your needs, or he is making a super-versatile super-generic piece of code that enables you to make any super-GUI you can wish for .. but at the same time it might be too complex, to much overhead.. so will you end up writing your own wink

In my oppinion, there are always three layers, which shall be independent and are sorted from generic to specific:

1) engine layer
2) framework layer
3) game layer