Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/proxy/src/lib/util/filesys/net_link.cc @ 9393

Last change on this file since 9393 was 9393, checked in by bensch, 18 years ago

splitup of netdefs

File size: 901 bytes
Line 
1
2
3#include "net_link.h"
4
5
6#include "threading.h"
7void SimpleGameMenu::execURL() const
8{
9  std::string URL = "http://www.orxonox.net";
10  SDL_CreateThread(startURL, (void*)&URL);
11}
12
13#ifdef __OSX__
14#include <ApplicationServices/ApplicationServices.h>
15#elif defined __WIN32__
16//#include <shellapi.h>
17#endif
18
19int SimpleGameMenu::startURL(void* url)
20{
21  std::string URL = *(std::string*)url;
22#ifdef __linux__
23  system ((std::string("firefox ") + URL).c_str());
24#elif defined __OSX__
25  CFURLRef url_handle = CFURLCreateWithBytes (NULL, (UInt8 *)URL.c_str(), URL.size(),
26                                              kCFStringEncodingASCII, NULL);
27  LSOpenCFURLRef (url_handle, NULL);
28  CFRelease (url_handle);
29#elif defined __WIN32__
30  /*  ShellExecute(GetActiveWindow(),
31               "open", URL.c_str(), NULL, NULL, SW_SHOWNORMAL);
32}*/
33#endif
34  PRINTF(3)("loaded external webpage %s\n", URL.c_str());
35}
36
Note: See TracBrowser for help on using the repository browser.