FLTK 1.3.0
|
Functions | |
int | fl_open_uri (const char *uri, char *msg, int msglen) |
Opens the specified Uniform Resource Identifier (URI). |
int fl_open_uri | ( | const char * | uri, |
char * | msg, | ||
int | msglen | ||
) |
Opens the specified Uniform Resource Identifier (URI).
Uses an operating-system dependent program or interface. For URIs using the "ftp", "http", or "https" schemes, the system default web browser is used to open the URI, while "mailto" and "news" URIs are typically opened using the system default mail reader and "file" URIs are opened using the file system navigator.
On success, the (optional) msg buffer is filled with the command that was run to open the URI; on Windows, this will always be "open uri".
On failure, the msg buffer is filled with an English error message.
Example
#include <FL/filename.H> [..] char errmsg[512]; if ( !fl_open_uri("http://google.com/", errmsg, sizeof(errmsg)) ) { char warnmsg[768]; sprintf(warnmsg, "Error: %s", errmsg); fl_alert(warnmsg); }
uri | The URI to open |
msg | Optional buffer which contains the command or error message |
msglen | Length of optional buffer |