Skip to content

Instantly share code, notes, and snippets.

@ghedo
Created March 29, 2011 20:11
Show Gist options
  • Save ghedo/893137 to your computer and use it in GitHub Desktop.
Save ghedo/893137 to your computer and use it in GitHub Desktop.
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