mirror of
https://github.com/fltk/fltk.git
synced 2026-05-22 23:37:02 +08:00
Mark places that need to be refactored with // PORTME:
Searching for __APPLE, WIN32 or X11 did give me many false results. I instead marked most ifdef's that I would like to get rid of with the text // PORTME:, so they can be easily found by a global search. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11155 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+2
-2
@@ -574,7 +574,7 @@ enum Fl_When { // Fl_Widget::when():
|
||||
#define FL_KEY_MASK 0x0000ffff ///< All keys are 16 bit for now
|
||||
// FIXME: Unicode needs 24 bits!
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // look and feel
|
||||
# define FL_COMMAND FL_META ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X
|
||||
# define FL_CONTROL FL_CTRL ///< An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X
|
||||
#elif defined(FL_PORTING)
|
||||
@@ -584,7 +584,7 @@ enum Fl_When { // Fl_Widget::when():
|
||||
#else
|
||||
# define FL_COMMAND FL_CTRL ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X
|
||||
# define FL_CONTROL FL_META ///< An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X
|
||||
#endif // __APPLE__
|
||||
#endif // __APPLE__ look and feel
|
||||
|
||||
/*@}*/ // group: Event States
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ struct Fl_Label;
|
||||
# else
|
||||
# define FL_SOCKET int
|
||||
# endif
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: socket types
|
||||
# define FL_SOCKET int
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: define a type for FL_SOCKET"
|
||||
@@ -199,7 +199,7 @@ public: // should be private!
|
||||
static Fl_Window* grab_;
|
||||
static int compose_state; // used for dead keys (WIN32) or marked text (MacOS)
|
||||
static void call_screen_init(); // recompute screen number and dimensions
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: additional functions
|
||||
static void reset_marked_text(); // resets marked text
|
||||
static void insertion_point_location(int x, int y, int height); // sets window coordinates & height of insertion point
|
||||
#elif defined(WIN32)
|
||||
@@ -907,7 +907,7 @@ int main() {
|
||||
*/
|
||||
static void copy(const char* stuff, int len, int destination = 0, const char *type = Fl::clipboard_plain_text); // platform dependent
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: additional functions
|
||||
// not needed
|
||||
#elif defined(WIN32)
|
||||
// not needed
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
# include <cairo-xlib.h>
|
||||
#elif defined(WIN32)
|
||||
# include <cairo-win32.h>
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
#elif defined(__APPLE_QUARTZ__) // PORTME: Cairo Support
|
||||
# include <cairo-quartz.h>
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: is the Cairo library available on this platform?"
|
||||
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
int width;
|
||||
int height;
|
||||
Fl_Paged_Device *helper;
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform surface driver
|
||||
CFMutableDataRef pdfdata;
|
||||
CGContextRef oldgc;
|
||||
CGContextRef gc;
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
int h() { return height; }
|
||||
};
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform surface driver
|
||||
|
||||
/* Mac class to reimplement Fl_Paged_Device::printable_rect() */
|
||||
class FL_EXPORT Fl_Quartz_Surface_ : public Fl_System_Printer {
|
||||
|
||||
+1
-1
@@ -239,7 +239,7 @@ public:
|
||||
Fl::event_y() to the pixel units used by the OpenGL source code.
|
||||
\version 1.3.4
|
||||
*/
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: additional functionality
|
||||
int pixels_per_unit();
|
||||
#elif defined(WIN32)
|
||||
int pixels_per_unit() { return 1; }
|
||||
|
||||
@@ -51,7 +51,7 @@ typedef void (*Fl_Draw_Image_Cb)(void* data,int x,int y,int w,uchar* buf);
|
||||
#ifdef WIN32
|
||||
typedef int COORD_T;
|
||||
# define XPOINT XPoint
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform specific types
|
||||
typedef float COORD_T;
|
||||
typedef struct { float x; float y; } QPoint;
|
||||
# define XPOINT QPoint
|
||||
|
||||
@@ -49,7 +49,7 @@ private:
|
||||
int width;
|
||||
int height;
|
||||
Fl_Paged_Device *helper;
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform image surface driver
|
||||
#elif defined(WIN32)
|
||||
HDC _sgc;
|
||||
Window _sw;
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
void draw_decorated_window(Fl_Window* win, int delta_x = 0, int delta_y = 0);
|
||||
};
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform surface driver
|
||||
/* Mac class to implement translate()/untranslate() for a flipped bitmap graphics context */
|
||||
class FL_EXPORT Fl_Quartz_Flipped_Surface_ : public Fl_Quartz_Surface_ {
|
||||
public:
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
# include "Fl_Widget.H"
|
||||
# include "Fl_Image.H"
|
||||
|
||||
# if (defined(__APPLE__) || defined(FL_PORTING)) && defined(check)
|
||||
# if (defined(__APPLE__) || defined(FL_PORTING)) && defined(check) // name conflict
|
||||
# undef check
|
||||
# endif
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ typedef void fl_BROWSEINFOW;
|
||||
# include <FL/filename.H> // FL_EXPORT
|
||||
|
||||
// Use Apple's chooser
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: native file chooser support
|
||||
# define MAXFILTERS 80
|
||||
# include <FL/filename.H> // FL_EXPORT
|
||||
|
||||
@@ -192,7 +192,7 @@ private:
|
||||
void clear_filters();
|
||||
void add_filter(const char *, const char *);
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: native file chooser support
|
||||
private:
|
||||
int _btype; // kind-of browser to show()
|
||||
int _options; // general options
|
||||
@@ -244,7 +244,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#if !defined(__APPLE__) && !defined(WIN32) && !defined(FL_PORTING)
|
||||
#if !defined(__APPLE__) && !defined(WIN32) && !defined(FL_PORTING) // PORTME: FLTK file chooser option
|
||||
class FL_EXPORT Fl_FLTK_File_Chooser {
|
||||
friend class Fl_Native_File_Chooser;
|
||||
protected:
|
||||
@@ -328,7 +328,7 @@ private:
|
||||
static int custom_gtk_filter_function(const GtkFileFilterInfo*, Fl_GTK_File_Chooser::pair*);
|
||||
static void free_pair(pair *p);
|
||||
};
|
||||
#endif // !defined(__APPLE__) && !defined(WIN32)
|
||||
#endif // !defined(__APPLE__) && !defined(WIN32) // PORTME: native file chooser option
|
||||
|
||||
#endif /*FL_NATIVE_FILE_CHOOSER_H*/
|
||||
|
||||
|
||||
+3
-3
@@ -199,7 +199,7 @@ class Clip {
|
||||
void draw_image_mono(Fl_Draw_Image_Cb call, void* data, int x,int y, int w, int h, int delta=1);
|
||||
|
||||
void draw(const char* s, int nBytes, int x, int y) {transformed_draw(s,nBytes,x,y); };
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: additional functionality
|
||||
void draw(const char* s, int nBytes, float x, float y) {transformed_draw(s,nBytes,x,y); };
|
||||
#elif defined(WIN32)
|
||||
// not needed
|
||||
@@ -233,7 +233,7 @@ class Clip {
|
||||
two variants of which are usable and allow to specify what page format and layout are desired.
|
||||
*/
|
||||
class FL_EXPORT Fl_PostScript_File_Device : public Fl_Paged_Device {
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform specifics for PostScript
|
||||
CGContextRef gc;
|
||||
#elif defined(WIN32)
|
||||
// not needed
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
void untranslate(void);
|
||||
int end_page (void);
|
||||
void end_job(void);
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform specifics for PostScript
|
||||
void set_current() { fl_gc = gc; Fl_Paged_Device::set_current(); }
|
||||
#elif defined(WIN32)
|
||||
// not needed
|
||||
|
||||
+5
-5
@@ -32,7 +32,7 @@
|
||||
#include <stdio.h>
|
||||
#ifdef WIN32
|
||||
#include <commdlg.h>
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform printer driver
|
||||
// not needed
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: include files needed for printing support"
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <FL/Fl_PostScript.H>
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN)
|
||||
#if defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN) // PORTME: platform printer driver
|
||||
/**
|
||||
Print support under MSWindows and Mac OS.
|
||||
|
||||
@@ -54,7 +54,7 @@ private:
|
||||
/** \brief the printer's graphics context, if there's one, NULL otherwise */
|
||||
void *gc;
|
||||
void set_current(void);
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform printer driver
|
||||
float scale_x;
|
||||
float scale_y;
|
||||
float angle; // rotation angle in radians
|
||||
@@ -88,7 +88,7 @@ public:
|
||||
void untranslate(void);
|
||||
int end_page (void);
|
||||
void end_job (void);
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform printer driver
|
||||
void print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x, int delta_y);
|
||||
#endif
|
||||
/** \brief The destructor */
|
||||
@@ -235,7 +235,7 @@ public:
|
||||
~Fl_Printer(void);
|
||||
|
||||
private:
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: system printer driver
|
||||
Fl_System_Printer *printer;
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: instantiate your own Fl_xxx_Printer here"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "Fl_Menu_Bar.H"
|
||||
#include "x.H"
|
||||
|
||||
#if defined(__APPLE__) || defined(FL_DOXYGEN)
|
||||
#if defined(__APPLE__) || defined(FL_DOXYGEN) // PORTME: system menu bar
|
||||
|
||||
/**
|
||||
A class to create, modify and delete menus that appear on Mac OS X in the menu bar at the top of the screen.
|
||||
@@ -105,7 +105,7 @@ typedef Fl_Menu_Bar Fl_Sys_Menu_Bar;
|
||||
|
||||
typedef Fl_Menu_Bar Fl_Sys_Menu_Bar;
|
||||
|
||||
#endif // defined(__APPLE__) || defined(FL_DOXYGEN)
|
||||
#endif // defined(__APPLE__) || defined(FL_DOXYGEN) // PORTME: system menu bar
|
||||
|
||||
#endif // Fl_Sys_Menu_Bar_H
|
||||
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ public:
|
||||
static int wrap_width() { return 400; }
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: additional functionality?
|
||||
// the unique tooltip window
|
||||
static Fl_Window* current_window(void);
|
||||
#elif defined(WIN32)
|
||||
|
||||
+4
-4
@@ -78,7 +78,7 @@ class FL_EXPORT Fl_Window : public Fl_Group {
|
||||
#ifdef WIN32
|
||||
HICON big_icon;
|
||||
HICON small_icon;
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: per-window icons
|
||||
// not needed
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: define storage for per-window icons here if needed"
|
||||
@@ -105,7 +105,7 @@ protected:
|
||||
int lw_; ///< width of shape image
|
||||
int lh_; ///< height of shape image
|
||||
Fl_Image* shape_; ///< shape image
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: per-window shape information
|
||||
typedef struct CGImage* CGImageRef;
|
||||
CGImageRef mask;
|
||||
#elif defined(WIN32)
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
\see void shape(const Fl_Image* img)
|
||||
*/
|
||||
inline void shape(const Fl_Image& b) { shape(&b); }
|
||||
#if defined(WIN32) || defined(__APPLE__) || defined(FL_DOXYGEN)
|
||||
#if defined(WIN32) || defined(__APPLE__) || defined(FL_DOXYGEN) // PORTME: per-window shape
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: do you need a combine_mask() function in Fl_Window?"
|
||||
#else // X11
|
||||
@@ -456,7 +456,7 @@ public:
|
||||
#ifdef WIN32
|
||||
static void default_icons(HICON big_icon, HICON small_icon);
|
||||
void icons(HICON big_icon, HICON small_icon);
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: per-window icon
|
||||
// not needed
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: define functions to handle window icons here if needed"
|
||||
|
||||
+2
-2
@@ -53,7 +53,7 @@
|
||||
# undef chdir
|
||||
# define chdir _chdir
|
||||
# endif
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: should not be in the header
|
||||
# include <wchar.h>
|
||||
# include <sys/stat.h>
|
||||
# define xchar wchar_t
|
||||
@@ -164,7 +164,7 @@ FL_EXPORT char *fl_utf8_to_locale(const char *s, int len, unsigned int codepage)
|
||||
|
||||
/* OD: Attempt to convert a string in the current locale to UTF-8 */
|
||||
FL_EXPORT char *fl_locale_to_utf8(const char *s, int len, unsigned int codepage);
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform text encoding and conversion
|
||||
// not needed
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: do you want to be able to convert from a local charset to utf8?"
|
||||
|
||||
@@ -54,11 +54,11 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef __APPLE__
|
||||
# ifdef __APPLE__ // PORTME: OpenGL path abstraction
|
||||
# include <OpenGL/gl.h>
|
||||
# else
|
||||
# include <GL/gl.h>
|
||||
# endif // __APPLE__
|
||||
# endif // __APPLE__ // PORTME: OpenGL Path abstraction
|
||||
|
||||
FL_EXPORT void gl_start();
|
||||
FL_EXPORT void gl_finish();
|
||||
@@ -89,7 +89,7 @@ FL_EXPORT void gl_draw(const char*, int n, int x, int y);
|
||||
FL_EXPORT void gl_draw(const char*, int n, float x, float y);
|
||||
FL_EXPORT void gl_draw(const char*, int x, int y, int w, int h, Fl_Align);
|
||||
FL_EXPORT void gl_measure(const char*, int& x, int& y);
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: OpenGL platform texture
|
||||
extern FL_EXPORT void gl_texture_pile_height(int max);
|
||||
extern FL_EXPORT int gl_texture_pile_height();
|
||||
#elif defined(WIN32)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef __APPLE__
|
||||
# ifdef __APPLE__ // PORTME: OpenGL Path abstraction
|
||||
# include <OpenGL/glu.h>
|
||||
# else
|
||||
# include <GL/glu.h>
|
||||
|
||||
@@ -138,7 +138,6 @@ extern NSCursor *fl_default_cursor;
|
||||
// This object contains all mac-specific stuff about a window:
|
||||
// WARNING: this object is highly subject to change!
|
||||
class Fl_X {
|
||||
|
||||
public:
|
||||
Window xid; // pointer to the Cocoa window object (FLWindow*)
|
||||
Fl_Offscreen other_xid; // pointer for offscreen bitmaps (overlay window)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
# ifdef WIN32
|
||||
# include "win32.H"
|
||||
# elif defined(__APPLE__)
|
||||
# elif defined(__APPLE__) // PORTME: Fl_X Window Driver interface
|
||||
# include "mac.H"
|
||||
# elif defined(ANDROID)
|
||||
# pragma message "A clean port requires a driver-style system for Fl_X"
|
||||
|
||||
+20
-20
@@ -60,7 +60,7 @@
|
||||
#endif // DEBUG || DEBUG_WATCH
|
||||
|
||||
#ifdef WIN32
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: window driver and main loop
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: implement global variables for your platform here"
|
||||
#else // X11
|
||||
@@ -73,7 +73,7 @@ HBRUSH fl_brush_action(int action);
|
||||
void fl_cleanup_pens(void);
|
||||
void fl_release_dc(HWND,HDC);
|
||||
void fl_cleanup_dc_list(void);
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform functions
|
||||
extern double fl_mac_flush_and_wait(double time_to_wait);
|
||||
#endif // WIN32
|
||||
|
||||
@@ -159,7 +159,7 @@ bool Fl::cfg_sys_win32 = 0;
|
||||
//
|
||||
// Globals...
|
||||
//
|
||||
#if defined(__APPLE__) || defined(FL_DOXYGEN)
|
||||
#if defined(__APPLE__) || defined(FL_DOXYGEN) // PORTME: platform text
|
||||
const char *Fl_Mac_App_Menu::about = "About %@";
|
||||
const char *Fl_Mac_App_Menu::print = "Print Front Window";
|
||||
const char *Fl_Mac_App_Menu::services = "Services";
|
||||
@@ -167,7 +167,7 @@ const char *Fl_Mac_App_Menu::hide = "Hide %@";
|
||||
const char *Fl_Mac_App_Menu::hide_others = "Hide Others";
|
||||
const char *Fl_Mac_App_Menu::show = "Show All";
|
||||
const char *Fl_Mac_App_Menu::quit = "Quit %@";
|
||||
#endif // __APPLE__
|
||||
#endif // __APPLE__ // PORTME: platform text, system menu
|
||||
#ifndef FL_DOXYGEN
|
||||
Fl_Widget *Fl::belowmouse_,
|
||||
*Fl::pushed_,
|
||||
@@ -341,7 +341,7 @@ int Fl::event_inside(const Fl_Widget *o) /*const*/ {
|
||||
|
||||
// implementation in Fl_win32.cxx
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: core stuff from screen, platform, and window driver
|
||||
|
||||
// implementation in Fl_cocoa.mm (was Fl_mac.cxx)
|
||||
|
||||
@@ -557,7 +557,7 @@ static void run_checks()
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(WIN32) && !defined(__APPLE__)
|
||||
#if !defined(WIN32) && !defined(__APPLE__) // PORTME: ??
|
||||
static char in_idle;
|
||||
#endif
|
||||
|
||||
@@ -644,7 +644,7 @@ double Fl::wait(double time_to_wait) {
|
||||
|
||||
return fl_wait(time_to_wait);
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform fl_wait
|
||||
|
||||
run_checks();
|
||||
return fl_mac_flush_and_wait(time_to_wait);
|
||||
@@ -787,7 +787,7 @@ int Fl::check() {
|
||||
\endcode
|
||||
*/
|
||||
int Fl::ready() {
|
||||
#if defined( WIN32 ) || defined(__APPLE__)
|
||||
#if defined( WIN32 ) || defined(__APPLE__) // PORTME: platform timeouts
|
||||
// not used
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: you may need to handle timers here."
|
||||
@@ -1071,7 +1071,7 @@ void Fl::focus(Fl_Widget *o) {
|
||||
if (!w1) w1 = o->window();
|
||||
while (w1) { win=w1; w1=win->window(); }
|
||||
if (win) {
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform window focus
|
||||
if (fl_xfocus != win) {
|
||||
Fl_X *x = Fl_X::i(win);
|
||||
if (x) x->set_key_window();
|
||||
@@ -1210,7 +1210,7 @@ void fl_fix_focus() {
|
||||
}
|
||||
}
|
||||
|
||||
#if !(defined(WIN32) || defined(__APPLE__))
|
||||
#if !(defined(WIN32) || defined(__APPLE__)) // PORTME: platform selection
|
||||
extern Fl_Widget *fl_selection_requestor; // from Fl_x.cxx
|
||||
#endif
|
||||
|
||||
@@ -1230,7 +1230,7 @@ void fl_throw_focus(Fl_Widget *o) {
|
||||
if (o->contains(Fl::pushed())) Fl::pushed_ = 0;
|
||||
#ifdef WIN32
|
||||
// not used
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform selection
|
||||
// not used
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: platform specific code when deleting a window"
|
||||
@@ -1457,7 +1457,7 @@ int Fl::handle_(int e, Fl_Window* window)
|
||||
if (grab()) wi = grab();
|
||||
{ int ret;
|
||||
Fl_Widget* pbm = belowmouse();
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // bug fix
|
||||
if (fl_mac_os_version < 100500) {
|
||||
// before 10.5, mouse moved events aren't sent to borderless windows such as tooltips
|
||||
Fl_Window *tooltip = Fl_Tooltip::current_window();
|
||||
@@ -1659,7 +1659,7 @@ void Fl_Window::hide() {
|
||||
Fl_X** pp = &Fl_X::first;
|
||||
for (; *pp != ip; pp = &(*pp)->next) if (!*pp) return;
|
||||
*pp = ip->next;
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform pointer handling
|
||||
// MacOS X manages a single pointer per application. Make sure that hiding
|
||||
// a toplevel window will not leave us with some random pointer shape, or
|
||||
// worst case, an invisible pointer
|
||||
@@ -1708,7 +1708,7 @@ void Fl_Window::hide() {
|
||||
if (Fl::cairo_autolink_context()) Fl::cairo_make_current((Fl_Window*) 0);
|
||||
# endif
|
||||
}
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
#elif defined(__APPLE_QUARTZ__) // PORTME: platform window unmapping
|
||||
Fl_X::q_release_context(ip);
|
||||
if ( ip->xid == fl_window )
|
||||
fl_window = 0;
|
||||
@@ -1740,7 +1740,7 @@ void Fl_Window::hide() {
|
||||
}
|
||||
delete[] doit;
|
||||
}
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
#elif defined(__APPLE_QUARTZ__) // PORTME: platform window unmapping
|
||||
ip->destroy();
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: code to destroy a window on screen"
|
||||
@@ -1774,13 +1774,13 @@ int Fl_Window::handle(int ev)
|
||||
else {
|
||||
#if defined(USE_X11) || defined(WIN32)
|
||||
XMapWindow(fl_display, fl_xid(this)); // extra map calls are harmless
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
#elif defined(__APPLE_QUARTZ__) // PORTME: platform window mapping
|
||||
i->map();
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: code to show a window on screen"
|
||||
#else
|
||||
# error unsupported platform
|
||||
#endif // __APPLE__
|
||||
#endif // __APPLE__ // PORTME: platform window mapping
|
||||
}
|
||||
break;
|
||||
case FL_HIDE:
|
||||
@@ -1798,7 +1798,7 @@ int Fl_Window::handle(int ev)
|
||||
}
|
||||
#if defined(USE_X11) || defined(WIN32)
|
||||
XUnmapWindow(fl_display, fl_xid(this));
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
#elif defined(__APPLE_QUARTZ__) // PORTME: platform window unmapping, again
|
||||
i->unmap();
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: code to hide a window from screen"
|
||||
@@ -1966,7 +1966,7 @@ void Fl_Widget::damage(uchar fl, int X, int Y, int W, int H) {
|
||||
Fl_Region R = XRectangleRegion(X, Y, W, H);
|
||||
CombineRgn(i->region, i->region, R, RGN_OR);
|
||||
XDestroyRegion(R);
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
#elif defined(__APPLE_QUARTZ__) // PORTME: platform damage region
|
||||
CGRect arg = fl_cgrectmake_cocoa(X, Y, W, H);
|
||||
int j; // don't add a rectangle totally inside the Fl_Region
|
||||
for(j = 0; j < i->region->count; j++) {
|
||||
@@ -2001,7 +2001,7 @@ void Fl_Window::flush() {
|
||||
|
||||
#ifdef WIN32
|
||||
# include "Fl_win32.cxx"
|
||||
//#elif defined(__APPLE__)
|
||||
//#elif defined(__APPLE__) // nothing here to see
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <FL/Fl.H>
|
||||
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform copy surface
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
|
||||
Fl_Quartz_Surface_::Fl_Quartz_Surface_(int w, int h) : Fl_System_Printer(), width(w), height(h) {
|
||||
@@ -75,7 +75,7 @@ Fl_Copy_Surface::Fl_Copy_Surface(int w, int h) : Fl_Surface_Device(NULL)
|
||||
{
|
||||
width = w;
|
||||
height = h;
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform copy surface
|
||||
helper = new Fl_Quartz_Surface_(width, height);
|
||||
driver(helper->driver());
|
||||
prepare_copy_pdf_and_tiff(w, h);
|
||||
@@ -120,7 +120,7 @@ Fl_Copy_Surface::Fl_Copy_Surface(int w, int h) : Fl_Surface_Device(NULL)
|
||||
*/
|
||||
Fl_Copy_Surface::~Fl_Copy_Surface()
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform copy surface
|
||||
complete_copy_pdf_and_tiff();
|
||||
fl_gc = oldgc;
|
||||
delete (Fl_Quartz_Surface_*)helper;
|
||||
@@ -165,7 +165,7 @@ void Fl_Copy_Surface::draw(Fl_Widget* widget, int delta_x, int delta_y)
|
||||
|
||||
void Fl_Copy_Surface::set_current()
|
||||
{
|
||||
#if defined(__APPLE__) || defined(WIN32)
|
||||
#if defined(__APPLE__) || defined(WIN32) // PORTME: platform copy surface
|
||||
fl_gc = gc;
|
||||
fl_window = (Window)1;
|
||||
Fl_Surface_Device::set_current();
|
||||
@@ -180,7 +180,7 @@ void Fl_Copy_Surface::set_current()
|
||||
}
|
||||
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform copy surface
|
||||
|
||||
size_t Fl_Copy_Surface::MyPutBytes(void* info, const void* buffer, size_t count)
|
||||
{
|
||||
@@ -218,7 +218,7 @@ void Fl_Copy_Surface::prepare_copy_pdf_and_tiff(int w, int h)
|
||||
CGContextSaveGState(gc);
|
||||
}
|
||||
|
||||
#endif // __APPLE__
|
||||
#endif // __APPLE__ // PORTME: platform copy surface
|
||||
|
||||
|
||||
/** Copies a window and its borders and title bar to the clipboard.
|
||||
@@ -232,7 +232,7 @@ void Fl_Copy_Surface::draw_decorated_window(Fl_Window* win, int delta_x, int del
|
||||
}
|
||||
|
||||
#if defined(WIN32)
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform copy surface
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: do you need a helper class for your graphics driver"
|
||||
#elif !defined(FL_DOXYGEN)
|
||||
|
||||
@@ -137,7 +137,7 @@ void Fl_Double_Window::flush(int eraseoverlay) {
|
||||
#if defined(USE_X11) || defined(WIN32)
|
||||
myi->other_xid = fl_create_offscreen(w(), h());
|
||||
clear_damage(FL_DAMAGE_ALL);
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
#elif defined(__APPLE_QUARTZ__) // PORTME: platform double buffering
|
||||
if (force_doublebuffering_) {
|
||||
myi->other_xid = fl_create_offscreen(w(), h());
|
||||
clear_damage(FL_DAMAGE_ALL);
|
||||
@@ -187,7 +187,7 @@ void Fl_Double_Window::flush(int eraseoverlay) {
|
||||
//# if defined(FLTK_USE_CAIRO)
|
||||
//if Fl::cairo_autolink_context() Fl::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
|
||||
//# endif
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform double buffering
|
||||
if ( myi->other_xid ) {
|
||||
fl_begin_offscreen( myi->other_xid );
|
||||
fl_clip_region( 0 );
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// Fl_File_Browser::filter() - Set the filename filter.
|
||||
//
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform file browser
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: implement the internals of your file browser here"
|
||||
#else
|
||||
@@ -62,11 +62,11 @@
|
||||
# include <os2.h>
|
||||
#endif // __EMX__
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform file browser
|
||||
# include <sys/param.h>
|
||||
# include <sys/ucred.h>
|
||||
# include <sys/mount.h>
|
||||
#endif // __APPLE__
|
||||
#endif // __APPLE__ // PORTME: platform file browser
|
||||
|
||||
#if defined(_AIX)
|
||||
extern "C" {
|
||||
@@ -518,7 +518,7 @@ Fl_File_Browser::load(const char *directory,// I - Directory to load
|
||||
|
||||
num_files ++;
|
||||
}
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform file browser
|
||||
// MacOS X and Darwin use getfsstat() system call...
|
||||
int numfs; // Number of file systems
|
||||
struct statfs *fs; // Buffer for file system info
|
||||
@@ -664,7 +664,7 @@ Fl_File_Browser::load(const char *directory,// I - Directory to load
|
||||
// window after requesting filesystem list.
|
||||
add("/", icon);
|
||||
}
|
||||
#endif // WIN32 || __EMX__ || __APPLE__ || _AIX || ...
|
||||
#endif // WIN32 || __EMX__ || __APPLE__ || _AIX || ... // PORTME: platform file browser
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -357,7 +357,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform file browser
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: implement the internals of your filechooser here"
|
||||
#else
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#include <FL/fl_draw.H>
|
||||
#include <FL/filename.H>
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform file browser
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: implement file type interpretation here"
|
||||
#else
|
||||
|
||||
+7
-7
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform font stuff
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: implement font descriptor details here"
|
||||
#else
|
||||
@@ -36,7 +36,7 @@
|
||||
#if USE_XFT
|
||||
typedef struct _XftFont XftFont;
|
||||
#elif defined(WIN32)
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform font stuff
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: do you want to include Xutf8.h?"
|
||||
#else
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
TEXTMETRIC metr;
|
||||
int angle;
|
||||
FL_EXPORT Fl_Font_Descriptor(const char* fontname, Fl_Fontsize size);
|
||||
# elif defined(__APPLE_QUARTZ__)
|
||||
# elif defined(__APPLE_QUARTZ__) // PORTME: platform font stuff
|
||||
FL_EXPORT Fl_Font_Descriptor(const char* fontname, Fl_Fontsize size);
|
||||
ATSUTextLayout layout;
|
||||
# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
|
||||
@@ -84,9 +84,9 @@ public:
|
||||
# endif
|
||||
# if HAVE_GL
|
||||
unsigned int listbase;// base of display list, 0 = none
|
||||
#ifndef __APPLE_QUARTZ__
|
||||
#ifndef __APPLE_QUARTZ__ // PORTME: platform font stuff
|
||||
char glok[64];
|
||||
#endif // __APPLE_QUARTZ__
|
||||
#endif // __APPLE_QUARTZ__ // PORTME: platform font stuff
|
||||
# endif // HAVE_GL
|
||||
|
||||
FL_EXPORT ~Fl_Font_Descriptor();
|
||||
@@ -101,7 +101,7 @@ struct Fl_Fontdesc {
|
||||
char fontname[128]; // "Pretty" font name
|
||||
Fl_Font_Descriptor *first; // linked list of sizes of this style
|
||||
#ifdef WIN32
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform font stuff
|
||||
char **xlist; // matched X font names
|
||||
int n; // size of xlist, negative = don't free xlist!
|
||||
#elif defined(FL_PORTING)
|
||||
@@ -115,7 +115,7 @@ struct Fl_Fontdesc {
|
||||
extern FL_EXPORT Fl_Fontdesc *fl_fonts; // the table
|
||||
|
||||
#ifdef WIN32
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform font stuff
|
||||
// functions for parsing X font names:
|
||||
FL_EXPORT const char* fl_font_word(const char *p, int n);
|
||||
FL_EXPORT char *fl_find_fontsize(char *name);
|
||||
|
||||
+4
-4
@@ -45,7 +45,7 @@
|
||||
#ifndef Fl_Gl_Choice_H
|
||||
#define Fl_Gl_Choice_H
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: add code to list and select OpenGL drawing contexts"
|
||||
#else
|
||||
@@ -56,7 +56,7 @@
|
||||
#ifdef WIN32
|
||||
# include <FL/gl.h>
|
||||
# define GLContext HGLRC
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
#elif defined(__APPLE_QUARTZ__) // PORTME: platform OpenGL management
|
||||
# include <OpenGL/gl.h>
|
||||
#ifdef __OBJC__
|
||||
@class NSOpenGLPixelFormat;
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
#ifdef WIN32
|
||||
int pixelformat; // the visual to use
|
||||
PIXELFORMATDESCRIPTOR pfd; // some wgl calls need this thing
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
#elif defined(__APPLE_QUARTZ__) // PORTME: platform OpenGL management
|
||||
NSOpenGLPixelFormat* pixelformat;
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: define OpenGL pixel format containers"
|
||||
@@ -101,7 +101,7 @@ class Fl_Window;
|
||||
|
||||
GLContext fl_create_gl_context(Fl_Window*, const Fl_Gl_Choice*, int layer=0);
|
||||
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
#elif defined(__APPLE_QUARTZ__) // PORTME: platform OpenGL management
|
||||
|
||||
GLContext fl_create_gl_context(Fl_Window*, const Fl_Gl_Choice*, int layer=0);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
# include "flstring.h"
|
||||
# include <FL/fl_utf8.h>
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: add code to list and select OpenGL drawing contexts"
|
||||
#else
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
# ifdef WIN32
|
||||
void fl_save_dc(HWND, HDC);
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
extern void gl_texture_reset();
|
||||
#endif
|
||||
|
||||
@@ -110,7 +110,7 @@ Fl_Gl_Choice *Fl_Gl_Choice::find(int m, const int *alistp) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
#elif defined(__APPLE_QUARTZ__) // PORTME: platform OpenGL management
|
||||
NSOpenGLPixelFormat* fmt = Fl_X::mode_to_NSOpenGLPixelFormat(m, alistp);
|
||||
if (!fmt) return 0;
|
||||
|
||||
@@ -172,7 +172,7 @@ Fl_Gl_Choice *Fl_Gl_Choice::find(int m, const int *alistp) {
|
||||
# elif defined(WIN32)
|
||||
g->pixelformat = pixelformat;
|
||||
g->pfd = chosen_pfd;
|
||||
# elif defined(__APPLE_QUARTZ__)
|
||||
# elif defined(__APPLE_QUARTZ__) // PORTME: platform OpenGL management
|
||||
g->pixelformat = fmt;
|
||||
# else
|
||||
# error unsupported platform
|
||||
@@ -242,7 +242,7 @@ GLContext fl_create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, int lay
|
||||
return context;
|
||||
}
|
||||
|
||||
# elif defined(__APPLE_QUARTZ__)
|
||||
# elif defined(__APPLE_QUARTZ__) // PORTME: platform OpenGL management
|
||||
|
||||
GLContext fl_create_gl_context(Fl_Window* window, const Fl_Gl_Choice* g, int layer) {
|
||||
GLContext context, shared_ctx = 0;
|
||||
@@ -270,7 +270,7 @@ void fl_set_gl_context(Fl_Window* w, GLContext context) {
|
||||
glXMakeCurrent(fl_display, fl_xid(w), context);
|
||||
# elif defined(WIN32)
|
||||
wglMakeCurrent(Fl_X::i(w)->private_dc, context);
|
||||
# elif defined(__APPLE_QUARTZ__)
|
||||
# elif defined(__APPLE_QUARTZ__) // PORTME: platform OpenGL management
|
||||
Fl_X::GLcontext_makecurrent(context);
|
||||
# else
|
||||
# error unsupported platform
|
||||
@@ -285,7 +285,7 @@ void fl_no_gl_context() {
|
||||
glXMakeCurrent(fl_display, 0, 0);
|
||||
# elif defined(WIN32)
|
||||
wglMakeCurrent(0, 0);
|
||||
# elif defined(__APPLE_QUARTZ__)
|
||||
# elif defined(__APPLE_QUARTZ__) // PORTME: platform OpenGL management
|
||||
Fl_X::GL_cleardrawable();
|
||||
# else
|
||||
# error unsupported platform
|
||||
@@ -298,7 +298,7 @@ void fl_delete_gl_context(GLContext context) {
|
||||
glXDestroyContext(fl_display, context);
|
||||
# elif defined(WIN32)
|
||||
wglDeleteContext(context);
|
||||
# elif defined(__APPLE_QUARTZ__)
|
||||
# elif defined(__APPLE_QUARTZ__) // PORTME: platform OpenGL management
|
||||
Fl_X::GLcontext_release(context);
|
||||
# else
|
||||
# error unsupported platform
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
#include <FL/Fl_RGB_Image.H>
|
||||
#include "FL/Fl.H"
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: implement code to read OpenGL renderings into RGB maps"
|
||||
#else
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
uchar *convert_BGRA_to_RGB(uchar *baseAddress, int w, int h, int mByteWidth)
|
||||
{
|
||||
uchar *newimg = new uchar[3*w*h];
|
||||
@@ -59,7 +59,7 @@ static Fl_RGB_Image* capture_gl_rectangle(Fl_Gl_Window *glw, int x, int y, int w
|
||||
stored from bottom to top.
|
||||
*/
|
||||
{
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
const int bytesperpixel = 4;
|
||||
int factor = glw->pixels_per_unit();
|
||||
if (factor > 1) {
|
||||
@@ -81,14 +81,14 @@ static Fl_RGB_Image* capture_gl_rectangle(Fl_Gl_Window *glw, int x, int y, int w
|
||||
mByteWidth = (mByteWidth + 3) & ~3; // Align to 4 bytes
|
||||
uchar *baseAddress = new uchar[mByteWidth * h];
|
||||
glReadPixels(x, glw->pixel_h() - (y+h), w, h,
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
#else
|
||||
GL_RGB, GL_UNSIGNED_BYTE,
|
||||
#endif
|
||||
baseAddress);
|
||||
glPopClientAttrib();
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
baseAddress = convert_BGRA_to_RGB(baseAddress, w, h, mByteWidth);
|
||||
mByteWidth = 3 * w;
|
||||
#endif
|
||||
@@ -97,7 +97,7 @@ static Fl_RGB_Image* capture_gl_rectangle(Fl_Gl_Window *glw, int x, int y, int w
|
||||
return img;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform OpenGL management
|
||||
static void imgProviderReleaseData (void *info, const void *data, size_t size)
|
||||
{
|
||||
delete (Fl_RGB_Image *)info;
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
Fl_Gl_Window *glw = w->as_gl_window();
|
||||
if (!glw) return 0;
|
||||
Fl_RGB_Image *img = capture_gl_rectangle(glw, 0, 0, glw->w(), glw->h());
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform OpenGL management
|
||||
if (Fl_Surface_Device::surface()->driver()->has_feature(Fl_Graphics_Driver::NATIVE)) {
|
||||
// convert the image to CGImage, and draw it at full res (useful on retina display)
|
||||
CGColorSpaceRef cSpace = CGColorSpaceCreateDeviceRGB();
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <FL/Fl_Gl_Window.H>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: implement OpenGL hardware overlays if they are availbale in a compatible way. This is rarely needed."
|
||||
#else
|
||||
@@ -193,7 +193,7 @@ int Fl_Gl_Window::can_do_overlay() {
|
||||
void Fl_Gl_Window::redraw_overlay() {
|
||||
if (!shown()) return;
|
||||
make_overlay();
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform OpenGL management
|
||||
redraw();
|
||||
#else
|
||||
#ifndef WIN32
|
||||
@@ -207,7 +207,7 @@ void Fl_Gl_Window::redraw_overlay() {
|
||||
|
||||
void Fl_Gl_Window::make_overlay_current() {
|
||||
make_overlay();
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform OpenGL management
|
||||
// this is not very useful, but unfortunately, Apple decided
|
||||
// that front buffer drawing can no longer (OS X 10.4) be
|
||||
// supported on their platforms.
|
||||
|
||||
+22
-22
@@ -25,7 +25,7 @@ extern int fl_gl_load_plugin;
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/x.H>
|
||||
#include "Fl_Gl_Choice.H"
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform OpenGL management
|
||||
#include <FL/gl.h>
|
||||
#include <OpenGL/OpenGL.h>
|
||||
#endif
|
||||
@@ -36,7 +36,7 @@ extern int fl_gl_load_plugin;
|
||||
|
||||
#include "drivers/OpenGL/Fl_OpenGL_Display_Device.h"
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: implement the creation and destruction of OpenGL surfaces"
|
||||
#else
|
||||
@@ -74,7 +74,7 @@ int Fl_Gl_Window::can_do(int a, const int *b) {
|
||||
}
|
||||
|
||||
void Fl_Gl_Window::show() {
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
int need_redraw = 0;
|
||||
#endif
|
||||
if (!shown()) {
|
||||
@@ -90,29 +90,29 @@ void Fl_Gl_Window::show() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
#if !defined(WIN32) && !defined(__APPLE__)
|
||||
#if !defined(WIN32) && !defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
Fl_X::make_xid(this, g->vis, g->colormap);
|
||||
if (overlay && overlay != this) ((Fl_Gl_Window*)overlay)->show();
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
if( ! parent() ) need_redraw=1;
|
||||
#endif
|
||||
}
|
||||
Fl_Window::show();
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform OpenGL management
|
||||
set_visible();
|
||||
if(need_redraw) redraw();//necessary only after creation of a top-level GL window
|
||||
#endif /* __APPLE__ */
|
||||
#endif /* __APPLE__ */ // PORTME: platform OpenGL management
|
||||
}
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
|
||||
int Fl_Gl_Window::pixels_per_unit()
|
||||
{
|
||||
return (fl_mac_os_version >= 100700 && Fl::use_high_res_GL() && Fl_X::i(this) && Fl_X::i(this)->mapped_to_retina()) ? 2 : 1;
|
||||
}
|
||||
|
||||
#endif // __APPLE__
|
||||
#endif // __APPLE__ // PORTME: platform OpenGL management
|
||||
|
||||
/**
|
||||
The invalidate() method turns off valid() and is
|
||||
@@ -131,16 +131,16 @@ void Fl_Gl_Window::invalidate() {
|
||||
|
||||
int Fl_Gl_Window::mode(int m, const int *a) {
|
||||
if (m == mode_ && a == alist) return 0;
|
||||
#ifndef __APPLE__
|
||||
#ifndef __APPLE__ // PORTME: platform OpenGL management
|
||||
int oldmode = mode_;
|
||||
#endif
|
||||
#if defined(__APPLE__) || defined(USE_X11)
|
||||
#if defined(__APPLE__) || defined(USE_X11) // PORTME: platform OpenGL management
|
||||
if (a) { // when the mode is set using the a array of system-dependent values, and if asking for double buffer,
|
||||
// the FL_DOUBLE flag must be set in the mode_ member variable
|
||||
const int *aa = a;
|
||||
while (*aa) {
|
||||
if (*(aa++) ==
|
||||
# if defined(__APPLE__)
|
||||
# if defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
kCGLPFADoubleBuffer
|
||||
# else
|
||||
GLX_DOUBLEBUFFER
|
||||
@@ -148,10 +148,10 @@ int Fl_Gl_Window::mode(int m, const int *a) {
|
||||
) { m |= FL_DOUBLE; break; }
|
||||
}
|
||||
}
|
||||
#endif // !__APPLE__
|
||||
#if !defined(WIN32) && !defined(__APPLE__)
|
||||
#endif // !__APPLE__ // PORTME: platform OpenGL management
|
||||
#if !defined(WIN32) && !defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
Fl_Gl_Choice* oldg = g;
|
||||
#endif // !WIN32 && !__APPLE__
|
||||
#endif // !WIN32 && !__APPLE__ // PORTME: platform OpenGL management
|
||||
context(0);
|
||||
mode_ = m; alist = a;
|
||||
if (shown()) {
|
||||
@@ -168,7 +168,7 @@ int Fl_Gl_Window::mode(int m, const int *a) {
|
||||
hide();
|
||||
show();
|
||||
}
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
#elif defined(__APPLE_QUARTZ__) // PORTME: platform OpenGL management
|
||||
redraw();
|
||||
#else
|
||||
# error unsupported platform
|
||||
@@ -191,7 +191,7 @@ int Fl_Gl_Window::mode(int m, const int *a) {
|
||||
void Fl_Gl_Window::make_current() {
|
||||
// puts("Fl_Gl_Window::make_current()");
|
||||
// printf("make_current: context_=%p\n", context_);
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform OpenGL management
|
||||
// detect if the window was moved between low and high resolution displays
|
||||
if (Fl_X::i(this)->changed_resolution()){
|
||||
Fl_X::i(this)->changed_resolution(false);
|
||||
@@ -256,7 +256,7 @@ void Fl_Gl_Window::swap_buffers() {
|
||||
# else
|
||||
SwapBuffers(Fl_X::i(this)->private_dc);
|
||||
# endif
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
#elif defined(__APPLE_QUARTZ__) // PORTME: platform OpenGL management
|
||||
if(overlay != NULL) {
|
||||
// STR# 2944 [1]
|
||||
// Save matrixmode/proj/modelview/rasterpos before doing overlay.
|
||||
@@ -338,7 +338,7 @@ void Fl_Gl_Window::flush() {
|
||||
glDrawBuffer(GL_BACK);
|
||||
|
||||
if (!SWAP_TYPE) {
|
||||
#if defined (__APPLE_QUARTZ__) || defined (USE_X11)
|
||||
#if defined (__APPLE_QUARTZ__) || defined (USE_X11) // PORTME: platform OpenGL management
|
||||
SWAP_TYPE = COPY;
|
||||
#else
|
||||
SWAP_TYPE = UNDEFINED;
|
||||
@@ -405,7 +405,7 @@ void Fl_Gl_Window::flush() {
|
||||
}
|
||||
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform OpenGL management
|
||||
Fl_X::GLcontext_flushbuffer(context_);
|
||||
#endif
|
||||
|
||||
@@ -435,12 +435,12 @@ void Fl_Gl_Window::resize(int X,int Y,int W,int H) {
|
||||
int is_a_resize = (W != Fl_Widget::w() || H != Fl_Widget::h());
|
||||
if (is_a_resize) valid(0);
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform OpenGL management
|
||||
Fl_X *flx = Fl_X::i(this);
|
||||
if (flx && flx->in_windowDidResize()) Fl_X::GLcontext_update(context_);
|
||||
#endif
|
||||
|
||||
#if ! ( defined(__APPLE__) || defined(WIN32) )
|
||||
#if ! ( defined(__APPLE__) || defined(WIN32) ) // PORTME: platform OpenGL management
|
||||
if (is_a_resize && !resizable() && overlay && overlay != this) {
|
||||
((Fl_Gl_Window*)overlay)->resize(0,0,W,H);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(WIN32)
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform image surface
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: implement image surface handling here"
|
||||
#else
|
||||
@@ -40,7 +40,7 @@ const char *Fl_Image_Surface::class_id = "Fl_Image_Surface";
|
||||
Fl_Image_Surface::Fl_Image_Surface(int w, int h) : Fl_Surface_Device(NULL) {
|
||||
width = w;
|
||||
height = h;
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform image surface
|
||||
offscreen = fl_create_offscreen(w, h);
|
||||
helper = new Fl_Quartz_Flipped_Surface_(width, height);
|
||||
driver(helper->driver());
|
||||
@@ -71,7 +71,7 @@ Fl_Image_Surface::Fl_Image_Surface(int w, int h) : Fl_Surface_Device(NULL) {
|
||||
/** The destructor.
|
||||
*/
|
||||
Fl_Image_Surface::~Fl_Image_Surface() {
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform image surface
|
||||
void *data = CGBitmapContextGetData((CGContextRef)offscreen);
|
||||
free(data);
|
||||
CGContextRelease((CGContextRef)offscreen);
|
||||
@@ -95,7 +95,7 @@ Fl_Image_Surface::~Fl_Image_Surface() {
|
||||
Fl_RGB_Image* Fl_Image_Surface::image()
|
||||
{
|
||||
unsigned char *data;
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform image surface
|
||||
CGContextFlush(offscreen);
|
||||
data = fl_read_image(NULL, 0, 0, width, height, 0);
|
||||
fl_gc = 0;
|
||||
@@ -134,7 +134,7 @@ void Fl_Image_Surface::draw(Fl_Widget *widget, int delta_x, int delta_y)
|
||||
|
||||
void Fl_Image_Surface::set_current()
|
||||
{
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform image surface
|
||||
fl_gc = offscreen; fl_window = 0;
|
||||
Fl_Surface_Device::set_current();
|
||||
#elif defined(WIN32)
|
||||
@@ -157,7 +157,7 @@ void Fl_Image_Surface::set_current()
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform image surface
|
||||
|
||||
Fl_Quartz_Flipped_Surface_::Fl_Quartz_Flipped_Surface_(int w, int h) : Fl_Quartz_Surface_(w, h) {
|
||||
}
|
||||
|
||||
+16
-16
@@ -22,7 +22,7 @@
|
||||
// In theory you can replace this code with another subclass to change
|
||||
// the keybindings.
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform text editor look and feel
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: implement text input specifics here"
|
||||
// current custom code is for OS X keybaord specifics only
|
||||
@@ -365,7 +365,7 @@ int Fl_Input::handle_key() {
|
||||
else replace(position(), del ? position()-del : mark(),
|
||||
Fl::event_text(), Fl::event_length());
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform compose
|
||||
if (Fl::compose_state) {
|
||||
this->mark( this->position() - Fl::compose_state );
|
||||
}
|
||||
@@ -400,7 +400,7 @@ int Fl_Input::handle_key() {
|
||||
return 0; // ignore other combos, pass to parent
|
||||
|
||||
case FL_Delete: {
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // platform text editor look and feel
|
||||
if (mods==0) return kf_delete_char_right(); // Delete (OSX-HIG,TE,SA,WOX)
|
||||
if (mods==FL_CTRL) return kf_delete_char_right(); // Ctrl-Delete (??? TE,!SA,!WOX)
|
||||
if (mods==FL_ALT) return kf_delete_word_right(); // Alt-Delete (OSX-HIG,TE,SA)
|
||||
@@ -418,7 +418,7 @@ int Fl_Input::handle_key() {
|
||||
}
|
||||
|
||||
case FL_Left:
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // platform text editor look and feel
|
||||
if (mods==0) return kf_move_char_left(); // Left (OSX-HIG)
|
||||
if (mods==FL_ALT) return kf_move_word_left(); // Alt-Left (OSX-HIG)
|
||||
if (mods==FL_META) return kf_move_sol(); // Meta-Left (OSX-HIG)
|
||||
@@ -432,7 +432,7 @@ int Fl_Input::handle_key() {
|
||||
#endif
|
||||
|
||||
case FL_Right:
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // platform text editor look and feel
|
||||
if (mods==0) return kf_move_char_right(); // Right (OSX-HIG)
|
||||
if (mods==FL_ALT) return kf_move_word_right(); // Alt-Right (OSX-HIG)
|
||||
if (mods==FL_META) return kf_move_eol(); // Meta-Right (OSX-HIG)
|
||||
@@ -446,7 +446,7 @@ int Fl_Input::handle_key() {
|
||||
#endif
|
||||
|
||||
case FL_Up:
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // platform text editor look and feel
|
||||
if (mods==0) return kf_lines_up(1); // Up (OSX-HIG)
|
||||
if (mods==FL_CTRL) return kf_page_up(); // Ctrl-Up (TE !HIG)
|
||||
if (mods==FL_ALT) return kf_move_up_and_sol(); // Alt-Up (OSX-HIG)
|
||||
@@ -459,7 +459,7 @@ int Fl_Input::handle_key() {
|
||||
#endif
|
||||
|
||||
case FL_Down:
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // platform text editor look and feel
|
||||
if (mods==0) return kf_lines_down(1); // Dn (OSX-HIG)
|
||||
if (mods==FL_CTRL) return kf_page_down(); // Ctrl-Dn (TE !HIG)
|
||||
if (mods==FL_ALT) return kf_move_down_and_eol(); // Alt-Dn (OSX-HIG)
|
||||
@@ -474,7 +474,7 @@ int Fl_Input::handle_key() {
|
||||
case FL_Page_Up:
|
||||
// Fl_Input has no scroll control, so instead we move the cursor by one page
|
||||
// OSX-HIG recommends Alt increase one semantic unit, Meta next higher..
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // platform text editor look and feel
|
||||
if (mods==0) return kf_page_up(); // PgUp (OSX-HIG)
|
||||
if (mods==FL_ALT) return kf_page_up(); // Alt-PageUp (OSX-HIG)
|
||||
if (mods==FL_META) return kf_top(); // Meta-PageUp (OSX-HIG,!TE)
|
||||
@@ -487,7 +487,7 @@ int Fl_Input::handle_key() {
|
||||
#endif
|
||||
|
||||
case FL_Page_Down:
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // platform text editor look and feel
|
||||
// Fl_Input has no scroll control, so instead we move the cursor by one page
|
||||
// OSX-HIG recommends Alt increase one semantic unit, Meta next higher..
|
||||
if (mods==0) return kf_page_down(); // PgDn (OSX-HIG)
|
||||
@@ -502,7 +502,7 @@ int Fl_Input::handle_key() {
|
||||
#endif
|
||||
|
||||
case FL_Home:
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // platform text editor look and feel
|
||||
if (mods==0) return kf_top(); // Home (OSX-HIG)
|
||||
if (mods==FL_ALT) return kf_top(); // Alt-Home (???)
|
||||
return 0; // ignore other combos, pass to parent
|
||||
@@ -513,7 +513,7 @@ int Fl_Input::handle_key() {
|
||||
#endif
|
||||
|
||||
case FL_End:
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // platform text editor look and feel
|
||||
if (mods==0) return kf_bottom(); // End (OSX-HIG)
|
||||
if (mods==FL_ALT) return kf_bottom(); // Alt-End (???)
|
||||
return 0; // ignore other combos, pass to parent
|
||||
@@ -524,7 +524,7 @@ int Fl_Input::handle_key() {
|
||||
#endif
|
||||
|
||||
case FL_BackSpace:
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // platform text editor look and feel
|
||||
if (mods==0) return kf_delete_char_left(); // Backspace (OSX-HIG)
|
||||
if (mods==FL_CTRL) return kf_delete_char_left(); // Ctrl-Backspace (TE/SA)
|
||||
if (mods==FL_ALT) return kf_delete_word_left(); // Alt-Backspace (OSX-HIG)
|
||||
@@ -597,7 +597,7 @@ int Fl_Input::handle(int event) {
|
||||
static int dnd_save_position, dnd_save_mark, drag_start = -1, newpos;
|
||||
static Fl_Widget *dnd_save_focus = NULL;
|
||||
switch (event) {
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: compose text
|
||||
case FL_UNFOCUS:
|
||||
if (Fl::compose_state) {
|
||||
this->mark( this->position() );
|
||||
@@ -686,7 +686,7 @@ int Fl_Input::handle(int event) {
|
||||
dnd_save_focus = this;
|
||||
// drag the data:
|
||||
copy(0);
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: dnd
|
||||
Fl_X::dnd(1);
|
||||
#else
|
||||
Fl::dnd();
|
||||
@@ -753,7 +753,7 @@ int Fl_Input::handle(int event) {
|
||||
Fl::focus(dnd_save_focus);
|
||||
handle(FL_UNFOCUS);
|
||||
}
|
||||
#if !(defined(__APPLE__) || defined(WIN32))
|
||||
#if !(defined(__APPLE__) || defined(WIN32)) // PORTME: cursor
|
||||
Fl::first_window()->cursor(FL_CURSOR_MOVE);
|
||||
#endif
|
||||
dnd_save_focus = NULL;
|
||||
@@ -847,7 +847,7 @@ Fl_Secret_Input::Fl_Secret_Input(int X,int Y,int W,int H,const char *l)
|
||||
|
||||
int Fl_Secret_Input::handle(int event) {
|
||||
int retval = Fl_Input::handle(event);
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: compose
|
||||
if (event == FL_KEYBOARD && Fl::compose_state) {
|
||||
this->mark( this->position() ); // don't underline marked text
|
||||
}
|
||||
|
||||
+5
-5
@@ -27,7 +27,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // platform editor look and feel
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: manage character composing here"
|
||||
#else
|
||||
@@ -346,7 +346,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
|
||||
int offset2;
|
||||
if (pp <= e) x2 = xpos + (float)expandpos(p, pp, buf, &offset2);
|
||||
else offset2 = (int) strlen(buf);
|
||||
#ifdef __APPLE__ // Mac OS: underline marked ( = selected + Fl::compose_state != 0) text
|
||||
#ifdef __APPLE__ // PORTME: Mac OS: underline marked ( = selected + Fl::compose_state != 0) text
|
||||
if (Fl::compose_state) {
|
||||
fl_color(textcolor());
|
||||
}
|
||||
@@ -358,7 +358,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
|
||||
fl_color(fl_contrast(textcolor(), selection_color()));
|
||||
}
|
||||
fl_draw(buf+offset1, offset2-offset1, x1, (float)(Y+ypos+desc));
|
||||
#ifdef __APPLE__ // Mac OS: underline marked ( = selected + Fl::compose_state != 0) text
|
||||
#ifdef __APPLE__ // PORTME: Mac OS: underline marked ( = selected + Fl::compose_state != 0) text
|
||||
if (Fl::compose_state) {
|
||||
fl_color( fl_color_average(textcolor(), color(), 0.6) );
|
||||
float width = fl_width(buf+offset1, offset2-offset1);
|
||||
@@ -380,7 +380,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
|
||||
CONTINUE2:
|
||||
// draw the cursor:
|
||||
if (Fl::focus() == this && (
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: compose
|
||||
Fl::compose_state ||
|
||||
#endif
|
||||
selstart == selend) &&
|
||||
@@ -395,7 +395,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
|
||||
} else {
|
||||
fl_rectf((int)(xpos+curx+0.5), Y+ypos, 2, height);
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: compose
|
||||
Fl::insertion_point_location(xpos+curx, Y+ypos+height, height);
|
||||
#endif
|
||||
}
|
||||
|
||||
+3
-3
@@ -122,7 +122,7 @@ class menuwindow : public Fl_Menu_Window {
|
||||
public:
|
||||
menutitle* title;
|
||||
int handle(int);
|
||||
#if defined (__APPLE__) || defined (USE_X11)
|
||||
#if defined (__APPLE__) || defined (USE_X11) // PORTME: menubar
|
||||
int early_hide_handle(int);
|
||||
#endif
|
||||
int itemheight; // zero == menubar
|
||||
@@ -653,7 +653,7 @@ static int backward(int menu) { // previous item in menu menu if possible
|
||||
}
|
||||
|
||||
int menuwindow::handle(int e) {
|
||||
#if defined (__APPLE__) || defined (USE_X11)
|
||||
#if defined (__APPLE__) || defined (USE_X11) // PORTME: menubar
|
||||
// This off-route takes care of the "detached menu" bug on OS X.
|
||||
// Apple event handler requires that we hide all menu windows right
|
||||
// now, so that Carbon can continue undisturbed with handling window
|
||||
@@ -746,7 +746,7 @@ int menuwindow::early_hide_handle(int e) {
|
||||
}
|
||||
break;
|
||||
case FL_MOVE:
|
||||
#if ! (defined(WIN32) || defined(__APPLE__))
|
||||
#if ! (defined(WIN32) || defined(__APPLE__)) // PORTME: menubar
|
||||
if (pp.state == DONE_STATE) {
|
||||
return 1; // Fix for STR #2619
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "Fl_Native_File_Chooser_WIN32.cxx"
|
||||
|
||||
// Use Apple's chooser
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: native file chooser
|
||||
#include <FL/Fl_Native_File_Chooser.H>
|
||||
|
||||
#elif defined(FL_PORTING)
|
||||
|
||||
@@ -141,7 +141,7 @@ void Fl_Paged_Device::print_window_part(Fl_Window *win, int x, int y, int w, int
|
||||
win->make_current();
|
||||
uchar *image_data;
|
||||
image_data = fl_read_image(NULL, x, y, w, h);
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform paged device
|
||||
Fl_X::q_release_context(); // matches make_current() call above
|
||||
#endif
|
||||
if (save_front != win) save_front->show();
|
||||
@@ -305,11 +305,11 @@ void Fl_Paged_Device::draw_decorated_window(Fl_Window *win, int x_offset, int y_
|
||||
int wsides = left ? left->w() : 0;
|
||||
int toph = top ? top->h() : 0;
|
||||
if (top) {
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform paged device
|
||||
top->draw(x_offset, y_offset); // draw with transparency
|
||||
#else
|
||||
fl_draw_image(top->array, x_offset, y_offset, top->w(), top->h(), top->d());
|
||||
#endif // __APPLE__
|
||||
#endif // __APPLE__ // PORTME: platform paged device
|
||||
delete top;
|
||||
}
|
||||
if (left) {
|
||||
@@ -327,7 +327,7 @@ void Fl_Paged_Device::draw_decorated_window(Fl_Window *win, int x_offset, int y_
|
||||
this->print_widget(win, x_offset + wsides, y_offset + toph);
|
||||
}
|
||||
|
||||
#if !defined(__APPLE__) // Mac OS version in Fl_Cocoa.mm
|
||||
#if !defined(__APPLE__) // PORTME: platform paged device // Mac OS version in Fl_Cocoa.mm
|
||||
void Fl_Paged_Device::print_window(Fl_Window *win, int x_offset, int y_offset)
|
||||
{
|
||||
draw_decorated_window(win, x_offset, y_offset);
|
||||
|
||||
@@ -61,7 +61,7 @@ Fl_PostScript_Graphics_Driver::~Fl_PostScript_Graphics_Driver() {
|
||||
*/
|
||||
Fl_PostScript_File_Device::Fl_PostScript_File_Device(void)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform PostScript
|
||||
gc = fl_gc; // the display context is used by fl_text_extents()
|
||||
#endif
|
||||
Fl_Surface_Device::driver( new Fl_PostScript_Graphics_Driver() );
|
||||
@@ -176,7 +176,7 @@ int Fl_PostScript_Graphics_Driver::clocale_printf(const char *format, ...)
|
||||
|
||||
#ifndef FL_DOXYGEN
|
||||
|
||||
#if ! (defined(__APPLE__) || defined(WIN32) )
|
||||
#if ! (defined(__APPLE__) || defined(WIN32) ) // PORTME: platform PostScript
|
||||
# include "print_panel.cxx"
|
||||
#endif
|
||||
|
||||
@@ -1562,7 +1562,7 @@ void Fl_PostScript_File_Device::end_job (void)
|
||||
|
||||
#endif // FL_DOXYGEN
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform PostScript
|
||||
#elif defined(WIN32)
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: implement postscript printing"
|
||||
@@ -1664,7 +1664,7 @@ int Fl_PostScript_Printer::start_job(int pages, int *firstpage, int *lastpage) {
|
||||
return ps->start_postscript(pages, format, layout); // start printing
|
||||
}
|
||||
|
||||
#endif // ! (defined(__APPLE__) || defined(WIN32) )
|
||||
#endif // ! (defined(__APPLE__) || defined(WIN32) ) // PORTME: platform PostScript
|
||||
|
||||
|
||||
//
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform Preferences
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: implement some file storage in a designated place"
|
||||
#else
|
||||
@@ -43,7 +43,7 @@
|
||||
// on Windows, which is supposed to be POSIX compliant...
|
||||
# define access _access
|
||||
# define mkdir _mkdir
|
||||
#elif defined (__APPLE__)
|
||||
#elif defined (__APPLE__) // PORTME: platform Preferences
|
||||
# include <ApplicationServices/ApplicationServices.h>
|
||||
# include <unistd.h>
|
||||
# include <config.h>
|
||||
@@ -86,7 +86,7 @@ Fl_Preferences *Fl_Preferences::runtimePrefs = 0;
|
||||
* The buffer is overwritten during every call to this function!
|
||||
*/
|
||||
const char *Fl_Preferences::newUUID() {
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform Preferences
|
||||
CFUUIDRef theUUID = CFUUIDCreate(NULL);
|
||||
CFUUIDBytes b = CFUUIDGetUUIDBytes(theUUID);
|
||||
sprintf(uuidBuffer, "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
|
||||
@@ -1026,7 +1026,7 @@ Fl_Preferences::RootNode::RootNode( Fl_Preferences *prefs, Root root, const char
|
||||
snprintf(filename + strlen(filename), sizeof(filename) - strlen(filename),
|
||||
"/%s/%s.prefs", vendor, application);
|
||||
for (char *s = filename; *s; s++) if (*s == '\\') *s = '/';
|
||||
#elif defined ( __APPLE__ )
|
||||
#elif defined ( __APPLE__ ) // PORTME: platform Preferences
|
||||
// TODO: verify that this is the Apple sanctioned way of finding these folders
|
||||
// (On MSWindows, this frequently leads to issues with internationalized systems)
|
||||
// Carbon: err = FindFolder( kLocalDomain, kPreferencesFolderType, 1, &spec.vRefNum, &spec.parID );
|
||||
@@ -1168,7 +1168,7 @@ int Fl_Preferences::RootNode::write() {
|
||||
fprintf( f, "; application: %s\n", application_ );
|
||||
prefs_->node->write( f );
|
||||
fclose( f );
|
||||
#if !(defined(__APPLE__) || defined(WIN32))
|
||||
#if !(defined(__APPLE__) || defined(WIN32)) // PORTME: platform Preferences
|
||||
// unix: make sure that system prefs are user-readable
|
||||
if (strncmp(filename_, "/etc/fltk/", 10) == 0) {
|
||||
char *p;
|
||||
@@ -1197,7 +1197,7 @@ char Fl_Preferences::RootNode::getPath( char *path, int pathlen ) {
|
||||
if ( !s ) return 0;
|
||||
*s = 0;
|
||||
char ret = fl_make_path( path );
|
||||
#if !(defined(__APPLE__) || defined(WIN32))
|
||||
#if !(defined(__APPLE__) || defined(WIN32)) // PORTME: platform Preferences
|
||||
// unix: make sure that system prefs dir. is user-readable
|
||||
if (strncmp(path, "/etc/fltk/", 10) == 0) {
|
||||
fl_chmod(path, 0755); // rwxr-xr-x
|
||||
|
||||
+5
-5
@@ -66,7 +66,7 @@ const char *Fl_Printer::property_cancel = NULL;
|
||||
|
||||
#else
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform printing
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: implement the printer device specifics"
|
||||
#else
|
||||
@@ -116,7 +116,7 @@ const char *Fl_Printer::property_save = "Save";
|
||||
/** [this text may be customized at run-time] */
|
||||
const char *Fl_Printer::property_cancel = "Cancel";
|
||||
|
||||
#if defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN)
|
||||
#if defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN) // PORTME: platform printing
|
||||
const char *Fl_System_Printer::class_id = Fl_Printer::class_id;
|
||||
#endif
|
||||
#if defined(__APPLE__) || defined(WIN32)
|
||||
@@ -126,10 +126,10 @@ const char *Fl_System_Printer::class_id = Fl_Printer::class_id;
|
||||
const char *Fl_PostScript_Printer::class_id = Fl_Printer::class_id;
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) || defined(WIN32)
|
||||
#if defined(__APPLE__) || defined(WIN32) // PORTME: platform printing
|
||||
void Fl_System_Printer::set_current(void)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform printing
|
||||
fl_gc = (CGContextRef)gc;
|
||||
#elif defined(WIN32)
|
||||
fl_gc = (HDC)gc;
|
||||
@@ -145,7 +145,7 @@ void Fl_System_Printer::origin(int *x, int *y)
|
||||
#endif
|
||||
|
||||
Fl_Printer::Fl_Printer(void) {
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform printing
|
||||
printer = new Fl_System_Printer();
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: implement the printer device specifics"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
* Many other calls of the parent class don't work.
|
||||
*/
|
||||
|
||||
#if defined(__APPLE__) || defined(FL_DOXYGEN)
|
||||
#if defined(__APPLE__) || defined(FL_DOXYGEN) // PORTME: platform system menu bar
|
||||
#include <FL/Fl_Menu_Item.H>
|
||||
#include <FL/Fl_Sys_Menu_Bar.H>
|
||||
#include <FL/x.H>
|
||||
@@ -524,7 +524,7 @@ void Fl_Mac_App_Menu::custom_application_menu_items(const Fl_Menu_Item *m)
|
||||
[item release];
|
||||
}
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
#endif /* __APPLE__ */ // PORTME: platform system menu bar
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <FL/Fl_Text_Display.H>
|
||||
#include <FL/Fl_Window.H>
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform editor feel
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: look out for some code that visualizes character composing"
|
||||
#else
|
||||
@@ -2144,7 +2144,7 @@ void Fl_Text_Display::draw_string(int style,
|
||||
|
||||
if (style & PRIMARY_MASK) {
|
||||
if (Fl::focus() == (Fl_Widget*)this) {
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform compose
|
||||
if (Fl::compose_state) background = color();// Mac OS: underline marked text
|
||||
else
|
||||
#endif
|
||||
@@ -2181,18 +2181,18 @@ void Fl_Text_Display::draw_string(int style,
|
||||
if (!(style & BG_ONLY_MASK)) {
|
||||
fl_color( foreground );
|
||||
fl_font( font, fsize );
|
||||
#if !(defined(__APPLE__) || defined(WIN32)) && USE_XFT
|
||||
#if !(defined(__APPLE__) || defined(WIN32)) && USE_XFT // PORTME: platform editor feel
|
||||
// makes sure antialiased ÄÖÜ do not leak on line above
|
||||
fl_push_clip(X, Y, toX - X, mMaxsize);
|
||||
#endif
|
||||
fl_draw( string, nChars, X, Y + mMaxsize - fl_descent());
|
||||
#ifdef __APPLE__ // Mac OS: underline marked (= selected + Fl::compose_state != 0) text
|
||||
#ifdef __APPLE__ // Mac OS: underline marked (= selected + Fl::compose_state != 0) text // PORTME: platform editor feel
|
||||
if (Fl::compose_state && (style & PRIMARY_MASK)) {
|
||||
fl_color( fl_color_average(foreground, background, 0.6) );
|
||||
fl_line(X, Y + mMaxsize - 1, X + fl_width(string, nChars), Y + mMaxsize - 1);
|
||||
}
|
||||
#endif
|
||||
#if !(defined(__APPLE__) || defined(WIN32)) && USE_XFT
|
||||
#if !(defined(__APPLE__) || defined(WIN32)) && USE_XFT // PORTME: platform editor feel
|
||||
fl_pop_clip();
|
||||
#endif
|
||||
}
|
||||
@@ -2277,7 +2277,7 @@ void Fl_Text_Display::draw_cursor( int X, int Y ) {
|
||||
if ( X < text_area.x - 1 || X > text_area.x + text_area.w )
|
||||
return;
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform compose
|
||||
Fl::insertion_point_location(X, bot, fontHeight);
|
||||
#endif
|
||||
/* For cursors other than the block, make them around 2/3 of a character
|
||||
@@ -3703,7 +3703,7 @@ void Fl_Text_Display::draw(void) {
|
||||
int has_selection = buffer()->selection_position(&start, &end);
|
||||
if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE)
|
||||
&& (
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform compose
|
||||
Fl::compose_state ||
|
||||
#endif
|
||||
!has_selection || mCursorPos < start || mCursorPos > end) &&
|
||||
@@ -3881,7 +3881,7 @@ int Fl_Text_Display::handle(int event) {
|
||||
if (dragType==DRAG_START_DND) {
|
||||
if (!Fl::event_is_click() && Fl::dnd_text_ops()) {
|
||||
const char* copy = buffer()->selection_text();
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform compose
|
||||
Fl_X::dnd(1);
|
||||
#else
|
||||
Fl::dnd();
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <FL/Fl_Text_Editor.H>
|
||||
#include <FL/fl_ask.H>
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(WIN32) || defined(__APPLE__) // PORTME: platform editor
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: add common shortcut for your platform here"
|
||||
#else
|
||||
@@ -146,7 +146,7 @@ static struct {
|
||||
{ FL_Insert, FL_SHIFT, Fl_Text_Editor::kf_paste },
|
||||
{ 'a', FL_CTRL, Fl_Text_Editor::kf_select_all },
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform editor feel
|
||||
// Define CMD+key accelerators...
|
||||
{ 'z', FL_COMMAND, Fl_Text_Editor::kf_undo },
|
||||
{ 'x', FL_COMMAND, Fl_Text_Editor::kf_cut },
|
||||
@@ -161,7 +161,7 @@ static struct {
|
||||
{ FL_Right, FL_COMMAND|FL_SHIFT, Fl_Text_Editor::kf_m_s_move },
|
||||
{ FL_Up, FL_COMMAND|FL_SHIFT, Fl_Text_Editor::kf_m_s_move },
|
||||
{ FL_Down, FL_COMMAND|FL_SHIFT, Fl_Text_Editor::kf_m_s_move },
|
||||
#endif // __APPLE__
|
||||
#endif // __APPLE__ // PORTME: platform editor feel
|
||||
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
@@ -543,7 +543,7 @@ int Fl_Text_Editor::handle_key() {
|
||||
if (insert_mode()) insert(Fl::event_text());
|
||||
else overstrike(Fl::event_text());
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform compose
|
||||
if (Fl::compose_state) {
|
||||
int pos = this->insert_position();
|
||||
this->buffer()->select(pos - Fl::compose_state, pos);
|
||||
@@ -586,7 +586,7 @@ int Fl_Text_Editor::handle(int event) {
|
||||
|
||||
case FL_UNFOCUS:
|
||||
show_cursor(mCursorOn); // redraws the cursor
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform compose
|
||||
if (buffer()->selected() && Fl::compose_state) {
|
||||
int pos = insert_position();
|
||||
buffer()->select(pos, pos);
|
||||
|
||||
+2
-2
@@ -75,7 +75,7 @@ Fl_Widget* Fl_Tooltip::widget_ = 0;
|
||||
static Fl_TooltipBox *window = 0;
|
||||
static int Y,H;
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform additonal function
|
||||
// returns the unique tooltip window
|
||||
Fl_Window *Fl_Tooltip::current_window(void)
|
||||
{
|
||||
@@ -156,7 +156,7 @@ static void tooltip_timeout(void*) {
|
||||
if (window) window->hide();
|
||||
} else {
|
||||
int condition = 1;
|
||||
#if !(defined(__APPLE__) || defined(WIN32))
|
||||
#if !(defined(__APPLE__) || defined(WIN32)) // PORTME: platform ??
|
||||
condition = (Fl::grab() == NULL);
|
||||
#endif
|
||||
if ( condition ) {
|
||||
|
||||
@@ -869,7 +869,7 @@ static void draw_item_focus(Fl_Boxtype B, Fl_Color fg, Fl_Color bg, int X, int Y
|
||||
}
|
||||
fl_color(fl_contrast(fg, bg));
|
||||
|
||||
#if defined(USE_X11) || defined(__APPLE_QUARTZ__)
|
||||
#if defined(USE_X11) || defined(__APPLE_QUARTZ__) // PORTME: platform look and feel
|
||||
fl_line_style(FL_DOT);
|
||||
fl_rect(X + Fl::box_dx(B), Y + Fl::box_dy(B),
|
||||
W - Fl::box_dw(B) - 1, H - Fl::box_dh(B) - 1);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
// These can be replaced via prefs.openicon()/closeicon()
|
||||
//
|
||||
static const char * const L_open_xpm[] = {
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform look and feel
|
||||
"11 11 2 1",
|
||||
". c None",
|
||||
"@ c #000000",
|
||||
@@ -43,7 +43,7 @@ static const char * const L_open_xpm[] = {
|
||||
"...@@@.....",
|
||||
"...@@......",
|
||||
"...@......."
|
||||
#else /* __APPLE__ */
|
||||
#else /* __APPLE__ */ // PORTME: platform look and feel
|
||||
"11 11 3 1",
|
||||
". c #fefefe",
|
||||
"# c #444444",
|
||||
@@ -59,12 +59,12 @@ static const char * const L_open_xpm[] = {
|
||||
"#.........#",
|
||||
"#.........#",
|
||||
"###########"
|
||||
#endif /* __APPLE__ */
|
||||
#endif /* __APPLE__ */ // PORTME: platform look and feel
|
||||
};
|
||||
static Fl_Pixmap L_openpixmap(L_open_xpm);
|
||||
|
||||
static const char * const L_close_xpm[] = {
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform look and feel
|
||||
"11 11 2 1",
|
||||
". c None",
|
||||
"@ c #000000",
|
||||
@@ -79,7 +79,7 @@ static const char * const L_close_xpm[] = {
|
||||
".....@.....",
|
||||
"...........",
|
||||
"..........."
|
||||
#else /* __APPLE__ */
|
||||
#else /* __APPLE__ */ // PORTME: platform look and feel
|
||||
"11 11 3 1",
|
||||
". c #fefefe",
|
||||
"# c #444444",
|
||||
@@ -95,7 +95,7 @@ static const char * const L_close_xpm[] = {
|
||||
"#.........#",
|
||||
"#.........#",
|
||||
"###########"
|
||||
#endif /* __APPLE__ */
|
||||
#endif /* __APPLE__ */ // PORTME: platform look and feel
|
||||
};
|
||||
static Fl_Pixmap L_closepixmap(L_close_xpm);
|
||||
|
||||
@@ -157,7 +157,7 @@ Fl_Tree_Prefs::Fl_Tree_Prefs() {
|
||||
_labelfgcolor = FL_BLACK;
|
||||
_labelbgcolor = 0xffffffff; // we use this as 'transparent'
|
||||
_connectorcolor = Fl_Color(43);
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ // PORTME: platform look and feel
|
||||
_connectorstyle = FL_TREE_CONNECTOR_NONE;
|
||||
#else /* __APPLE__ */
|
||||
_connectorstyle = FL_TREE_CONNECTOR_DOTTED;
|
||||
|
||||
+3
-3
@@ -90,7 +90,7 @@ Fl_Window::~Fl_Window() {
|
||||
delete icon_;
|
||||
if (shape_data_) {
|
||||
if (shape_data_->todelete_) delete shape_data_->todelete_;
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) // PORTME: platform window driver
|
||||
if (shape_data_->mask) {
|
||||
CGImageRelease(shape_data_->mask);
|
||||
}
|
||||
@@ -404,7 +404,7 @@ void Fl_Window::free_icons() {
|
||||
}
|
||||
|
||||
|
||||
#ifndef __APPLE__
|
||||
#ifndef __APPLE__ // PORTME: platform window driver
|
||||
/**
|
||||
Waits for the window to be displayed after calling show().
|
||||
|
||||
@@ -482,7 +482,7 @@ void Fl_Window::capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*&
|
||||
#endif
|
||||
|
||||
|
||||
#endif // ! __APPLE__
|
||||
#endif // ! __APPLE__ // PORTME: platform window driver
|
||||
|
||||
//
|
||||
// End of "$Id$".
|
||||
|
||||
@@ -45,7 +45,7 @@ void Fl_Window::border(int b) {
|
||||
#elif defined(WIN32)
|
||||
// not yet implemented, but it's possible
|
||||
// for full fullscreen we have to make the window topmost as well
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
#elif defined(__APPLE_QUARTZ__) // PORTME: platform window driver
|
||||
// warning: not implemented in Quartz/Carbon
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "handle window border setting"
|
||||
|
||||
@@ -49,7 +49,7 @@ void Fl_Window::hotspot(int X, int Y, int offscreen) {
|
||||
top = bottom = GetSystemMetrics(SM_CYFIXEDFRAME);
|
||||
}
|
||||
top += GetSystemMetrics(SM_CYCAPTION);
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform window driver
|
||||
top = 24;
|
||||
left = 2;
|
||||
right = 2;
|
||||
|
||||
@@ -27,7 +27,7 @@ void Fl_Window::iconize() {
|
||||
} else {
|
||||
#ifdef WIN32
|
||||
ShowWindow(i->xid, SW_SHOWMINNOACTIVE);
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) // PORTME: platform window driver
|
||||
i->collapse();
|
||||
#elif defined(FL_PORTING)
|
||||
# pragma message "FL_PORTING: add code to iconify a window"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user