a simple test that runs a Haiku BApplication connecting with Haiku app_server, comes with a script that launches app_server too
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11977 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
SubDir OBOS_TOP src tests servers app ;
|
SubDir OBOS_TOP src tests servers app ;
|
||||||
|
|
||||||
SubInclude OBOS_TOP src tests servers app painter ;
|
SubInclude OBOS_TOP src tests servers app painter ;
|
||||||
|
SubInclude OBOS_TOP src tests servers app windows ;
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
SubDir OBOS_TOP src tests servers app windows ;
|
||||||
|
|
||||||
|
UseHeaders [ FDirName os app ] ;
|
||||||
|
UseHeaders [ FDirName os interface ] ;
|
||||||
|
|
||||||
|
SimpleTest Window :
|
||||||
|
main.cpp
|
||||||
|
: libopenbeos.so ;
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
For the test to run properly on BeOS, you need to make links to some Haiku libs in your ~/config/lib folder. The test itself links to libopenbeos.so, app_server additionally links to libappserver.so, libz.so, libpng.so and libfreetype.so.
|
||||||
|
|
||||||
|
The script "run" launches the Haiku app_server and a second later the test app which connects to it.
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// main.cpp
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "Application.h"
|
||||||
|
#include "View.h"
|
||||||
|
#include "Window.h"
|
||||||
|
|
||||||
|
// main
|
||||||
|
int
|
||||||
|
main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
BApplication* app = new BApplication("application/x.vnd-Haiku.windows_test");
|
||||||
|
|
||||||
|
BRect bounds(50.0, 50.0, 200.0, 150.0);
|
||||||
|
|
||||||
|
BWindow* window = new BWindow(bounds, "Test",
|
||||||
|
B_TITLED_WINDOW,
|
||||||
|
B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE);
|
||||||
|
|
||||||
|
BView* view = new BView(window->Bounds(), "test", B_FOLLOW_ALL, B_WILL_DRAW);
|
||||||
|
|
||||||
|
window->AddChild(view);
|
||||||
|
|
||||||
|
window->Show();
|
||||||
|
app->Run();
|
||||||
|
delete app;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Executable
+5
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
../../../../../distro/x86.R1/beos/system/servers/app_server &
|
||||||
|
sleep 1s
|
||||||
|
../../../../../tests/servers/app/windows/Window
|
||||||
Reference in New Issue
Block a user