Skip to content

Instantly share code, notes, and snippets.

@ghedo
Created Mar 29, 2011
Embed
What would you like to do?
Haiku demo app
#include "Demo.h"
#include <StringView.h>
#include <Window.h>
Demo::Demo(void) : BApplication("application/x-vnd.Demo") {
BRect rect(150, 150, 500, 500);
BWindow *win = new BWindow(
rect, "Demo",
B_TITLED_WINDOW,
B_QUIT_ON_WINDOW_CLOSE
);
win -> Show();
}
int main(void) {
Demo *app = new Demo();
app -> Run();
delete app;
return 0;
}
#include <Application.h>
class Demo : public BApplication {
public:
Demo(void);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment