34# error "Never use <FL/mac.H> directly; include <FL/x.H> instead."
39typedef void* Fl_Offscreen;
40typedef void* Fl_Bitmask;
42#include <AvailabilityMacros.h>
43#ifndef MAC_OS_X_VERSION_10_3
44#define MAC_OS_X_VERSION_10_3 1030
46#ifndef MAC_OS_X_VERSION_10_4
47#define MAC_OS_X_VERSION_10_4 1040
49#ifndef MAC_OS_X_VERSION_10_5
50#define MAC_OS_X_VERSION_10_5 1050
52#ifndef MAC_OS_X_VERSION_10_6
53#define MAC_OS_X_VERSION_10_6 1060
56#if !(defined(FL_LIBRARY) || defined(FL_INTERNALS))
58typedef void* Fl_Region;
59typedef void* Fl_CGContextRef;
60typedef void* Fl_PMPrintSettings;
61typedef void* Fl_PMPageFormat;
62typedef void* Fl_PMPrintSession;
67#include <ApplicationServices/ApplicationServices.h>
70typedef CGContextRef Fl_CGContextRef;
71typedef PMPrintSettings Fl_PMPrintSettings;
72typedef PMPageFormat Fl_PMPageFormat;
73typedef PMPrintSession Fl_PMPrintSession;
75typedef struct flCocoaRegion {
80# include "Fl_Window.H"
83struct XPoint {
int x, y; };
84struct XRectangle {
int x, y, width, height;};
85#ifndef CGFLOAT_DEFINED
86#if defined(__LP64__) && __LP64__
87typedef double CGFloat;
93extern CGRect fl_cgrectmake_cocoa(
int x,
int y,
int w,
int h);
94inline Fl_Region XRectangleRegion(
int x,
int y,
int w,
int h) {
95 Fl_Region R = (Fl_Region)malloc(
sizeof(*R));
97 R->rects = (CGRect *)malloc(
sizeof(CGRect));
98 *(R->rects) = fl_cgrectmake_cocoa(x, y, w, h);
101inline void XDestroyRegion(Fl_Region r) {
107extern void *fl_system_menu;
108extern void *fl_default_cursor;
116 Fl_Offscreen other_xid;
121 Fl_X *xidChildren, *xidNext;
125 static Fl_X* i(
const Fl_Window* w) {
return w->i;}
126 static int fake_X_wm(
const Fl_Window*,
int&,
int&,
int&,
int&,
int&);
131 static void q_fill_context();
132 static void q_clear_clipping();
133 static void q_release_context(Fl_X *x=0);
134 static void q_begin_image(CGRect&,
int x,
int y,
int w,
int h);
135 static void q_end_image();
140 int unlink(Fl_X* start = NULL);
142 WindowRef window_ref(
void);
143 void set_key_window(
void);
145 static CGImageRef CGImage_from_window_rect(
Fl_Window *win,
int x,
int y,
int w,
int h);
146 static unsigned char *bitmap_from_window_rect(
Fl_Window *win,
int x,
int y,
int w,
int h,
int *bytesPerPixel);
147 static Fl_Region intersect_region_and_rect(Fl_Region current,
int x,
int y,
int w,
int h);
148 static CGContextRef watch_cursor_image(
void);
149 static CGContextRef help_cursor_image(
void);
150 static CGContextRef nesw_cursor_image(
void);
151 static CGContextRef nwse_cursor_image(
void);
152 static CGContextRef none_cursor_image(
void);
153 static void *get_carbon_function(
const char *name);
159extern struct Fl_XMap {
163extern FL_EXPORT Window fl_window;
167extern FL_EXPORT Fl_CGContextRef fl_gc;
173extern FL_EXPORT Fl_Bitmask fl_create_bitmask(
int w,
int h,
const uchar *data);
174extern FL_EXPORT Fl_Bitmask fl_create_alphamask(
int w,
int h,
int d,
int ld,
const uchar *data);
175extern FL_EXPORT
void fl_delete_bitmask(Fl_Bitmask bm);
182extern FL_EXPORT
int fl_parse_color(
const char* p,
uchar& r,
uchar& g,
uchar& b);
183extern void fl_open_display();
Fl_Cursor
The following constants define the mouse cursors that are available in FLTK.
Definition: Enumerations.H:879
This widget produces an actual window.
Definition: Fl_Window.H:58
unsigned char uchar
unsigned char
Definition: fl_types.h:39
unsigned long ulong
unsigned long
Definition: fl_types.h:41
void fl_begin_offscreen(Fl_Offscreen ctx)
Send all subsequent drawing commands to this offscreen buffer.
Definition: Fl_Double_Window.cxx:258
Fl_Offscreen fl_create_offscreen(int w, int h)
Creation of an offscreen graphics buffer.
Definition: Fl_Double_Window.cxx:200
void fl_delete_offscreen(Fl_Offscreen ctx)
Deletion of an offscreen graphics buffer.
Definition: Fl_Double_Window.cxx:241
void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy)
Copy a rectangular area of the given offscreen buffer into the current drawing destination.
Definition: Fl_Double_Window.cxx:58
void fl_clip_region(Fl_Region r)
Replaces the top of the clipping stack with a clipping region of any shape.
Definition: fl_draw.H:145
void fl_end_offscreen()
Quit sending drawing commands to the current offscreen buffer.
Definition: Fl_Double_Window.cxx:276
void fl_open_callback(void(*cb)(const char *))
Register a function called for each file dropped onto an application icon.
int fl_mac_os_version
The version number of the running Mac OS X (e.g., 100604 for 10.6.4)
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.