Skip to content

build/api-examples/Event.cpp

Complete program from the Event API reference. Save it at the path shown above and use the build command in the reference page.

Source files · Download Event.cpp

#include "widgets.hpp"
#include <cstdio>
#include <cstring>

int main()
{
    gaspardos::gui::Widgets widgets(320, 200);
    gaspardos::gui::Event   event = { gaspardos::gui::CloseRequest, 0, 0, 0, 0 };
    return widgets.event(event) == -1 ? 0 : 1;
}