FLTK 1.4.4

Loading...
Searching...
No Matches
Mac OS X-specific symbols

Mac OS X-specific symbols declared in <FL/platform.H> More...

## Classes
class | Fl_Mac_App_Menu

## Functions
Fl_Window * | fl_mac_find (FLWindow *)
| Returns the Fl_Window corresponding to the given macOS-specific window reference.
CGContextRef | fl_mac_gc ()
| Returns the macOS-specific graphics context for the current window.
void | fl_mac_set_about (Fl_Callback *cb, void *user_data, int shortcut=0)
| Attaches a callback to the "About myprog" item of the system application menu.
FLWindow * | fl_mac_xid (const Fl_Window *win)
| Returns the macOS-specific window reference corresponding to the given Fl_Window object.
void | fl_open_callback (void(*cb)(const char *))
| Register a function called for each file dropped onto an application icon.

## Variables
int | fl_mac_os_version
| The version number of the running Mac OS X (e.g., 100604 for 10.6.4, 101300 for 10.13, 140102 for 14.1.2).

## Detailed Description

Mac OS X-specific symbols declared in <FL/platform.H>

See also
  The Apple OS X Interface

## Function Documentation

## ◆ fl_mac_set_about()

void fl_mac_set_about | ( | Fl_Callback * | cb,
|  | void * | user_data,
|  | int | shortcut = 0 )

Attaches a callback to the "About myprog" item of the system application menu.

For back-compatibility. Equivalent to Fl_Sys_Menu_Bar::about(Fl_Callback *cb, void *user_data).

## ◆ fl_open_callback()

void fl_open_callback | ( | void(* | cb )(const char *) | ) |

Register a function called for each file dropped onto an application icon.

This function is effective only on the Mac OS X platform. `cb` will be called with a single Unix-style file name and path. If multiple files were dropped, `cb` will be called multiple times.

This function should be called before `fl_open_display()` is called, either directly or indirectly (this happens at the first `show()` of a window), to be effective for files dropped on the application icon at launch time. It can also be called at any point to change the function used to open dropped files. A call with a NULL argument, after a previous call, makes the app ignore files dropped later.

## Variable Documentation

## ◆ fl_mac_os_version

int fl_mac_os_version
| extern

The version number of the running Mac OS X (e.g., 100604 for 10.6.4, 101300 for 10.13, 140102 for 14.1.2).

FLTK initializes this global variable before main() begins running. If the value is needed in a static initializer, a previous call to Fl::system_driver() makes sure fl_mac_os_version has been initialized.