| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- //
- // "$Id: mac.H 12575 2017-12-02 16:20:30Z manolo $"
- //
- // Mac header file for the Fast Light Tool Kit (FLTK).
- //
- // Copyright 1998-2017 by Bill Spitzak and others.
- //
- // This library is free software. Distribution and use rights are outlined in
- // the file "COPYING" which should have been included with this file. If this
- // file is missing or damaged, see the license at:
- //
- // http://www.fltk.org/COPYING.php
- //
- // Please report all bugs and problems on the following page:
- //
- // http://www.fltk.org/str.php
- //
- // Do not directly include this file, instead use <FL/x.H>. It will
- // include this file if "__APPLE__" is defined. This is to encourage
- // portability of even the system-specific code...
- #ifndef FL_DOXYGEN
- #if !defined(Fl_X_H)
- # error "Never use <FL/mac.H> directly; include <FL/x.H> instead."
- #endif // !Fl_X_H
- #ifdef __OBJC__
- @class FLWindow; // a subclass of the NSWindow Cocoa class
- typedef FLWindow *Window;
- #else
- typedef class FLWindow *Window; // pointer to the FLWindow objective-c class
- #endif // __OBJC__
- #include <FL/Fl_Widget.H> // for Fl_Callback
- #if (defined(FL_LIBRARY) || defined(FL_INTERNALS)) // this part must be compiled when building the FLTK libraries
- // Standard MacOS C/C++ includes...
- #include <ApplicationServices/ApplicationServices.h>
- #undef check // because of Fl::check()
- #ifndef MAC_OS_X_VERSION_10_4
- #define MAC_OS_X_VERSION_10_4 1040
- #endif
- #ifndef MAC_OS_X_VERSION_10_5
- #define MAC_OS_X_VERSION_10_5 1050
- #endif
- #ifndef MAC_OS_X_VERSION_10_6
- #define MAC_OS_X_VERSION_10_6 1060
- #endif
- #ifndef MAC_OS_X_VERSION_10_7
- #define MAC_OS_X_VERSION_10_7 1070
- #endif
- #ifndef MAC_OS_X_VERSION_10_8
- #define MAC_OS_X_VERSION_10_8 1080
- #endif
- #ifndef MAC_OS_X_VERSION_10_9
- #define MAC_OS_X_VERSION_10_9 1090
- #endif
- #ifndef MAC_OS_X_VERSION_10_10
- #define MAC_OS_X_VERSION_10_10 101000
- #endif
- #ifndef MAC_OS_X_VERSION_10_11
- #define MAC_OS_X_VERSION_10_11 101100
- #endif
- #ifndef MAC_OS_X_VERSION_10_12
- #define MAC_OS_X_VERSION_10_12 101200
- #endif
- #ifndef NSINTEGER_DEFINED // appears with 10.5 in NSObjCRuntime.h
- #if defined(__LP64__) && __LP64__
- typedef long NSInteger;
- typedef unsigned long NSUInteger;
- #else
- typedef int NSInteger;
- typedef unsigned int NSUInteger;
- #endif
- #endif
- #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4
- typedef CGImageAlphaInfo CGBitmapInfo;
- #endif
- struct flCocoaRegion {
- int count;
- CGRect *rects;
- }; // a region is the union of a series of rectangles
- #ifndef CGFLOAT_DEFINED //appears with 10.5 in CGBase.h
- #if defined(__LP64__) && __LP64__
- typedef double CGFloat;
- #else
- typedef float CGFloat;
- #endif
- #endif // CGFLOAT_DEFINED
- #else
- typedef struct CGContext* CGContextRef;
- #endif // FL_LIBRARY || FL_INTERNALS
- extern CGContextRef fl_gc;
- #endif // FL_DOXYGEN
- /** \file
- Mac OS X-specific symbols.
- */
- /** \defgroup group_macosx Mac OS X-specific symbols
- Mac OS X-specific symbols declared in <FL/x.H> or <FL/gl.h>
- \sa \ref osissues_macos
- @{ */
- /** \brief The version number of the running Mac OS X (e.g., 100604 for 10.6.4)
- */
- extern int fl_mac_os_version;
- /** The system menu bar.
- */
- //extern class Fl_Sys_Menu_Bar *fl_sys_menu_bar;
- struct Fl_Menu_Item;
- class Fl_Mac_App_Menu {
- public:
- /** Localizable text for the "About xxx" application menu item */
- static const char *about;
- /** Localizable text for the "Print Front Window" application menu item.
- This menu item won't be displayed if Fl_Mac_App_Menu::print
- is set to an empty string.
- */
- static const char *print;
- /** Localizable text for the "Services" application menu item */
- static const char *services;
- /** Localizable text for the "Hide xxx" application menu item */
- static const char *hide;
- /** Localizable text for the "Hide Others" application menu item */
- static const char *hide_others;
- /** Localizable text for the "Show All" application menu item */
- static const char *show;
- /** Localizable text for the "Quit xxx" application menu item */
- static const char *quit;
- static void custom_application_menu_items(const Fl_Menu_Item *m);
- };
- /** @} */
- //
- // End of "$Id: mac.H 12575 2017-12-02 16:20:30Z manolo $".
- //
|