diff options
| author | Matthias Melcher <git@matthiasm.com> | 2020-01-14 19:22:03 +0100 |
|---|---|---|
| committer | Matthias Melcher <git@matthiasm.com> | 2020-01-14 19:22:03 +0100 |
| commit | afcc79c3f7d5ffd9f9bd2185494688a5d5927aab (patch) | |
| tree | 667156480c4b8c5eef936b47ed5103e3c137565f /src/drivers | |
| parent | ed80d9cef0c321012c65c31104be66dc64bf2fad (diff) | |
| parent | d598f9ea06f610053cd16b51cbe1aa477c8501ef (diff) | |
Merge remote-tracking branch 'refs/remotes/origin/master'
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H | 7 | ||||
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx | 1 | ||||
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H | 6 | ||||
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx | 12 |
4 files changed, 15 insertions, 11 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H index faf5b8520..97dd28a77 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H +++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H @@ -41,6 +41,11 @@ class Fl_Window; class Fl_Input; class Fl_RGB_Image; +#ifdef __OBJC__ +@class NSImage; +#else +class NSImage; +#endif class FL_EXPORT Fl_Cocoa_Screen_Driver : public Fl_Screen_Driver { @@ -54,6 +59,7 @@ protected: static int insertion_point_height; static bool insertion_point_location_is_valid; public: + NSImage *default_icon; Fl_Cocoa_Screen_Driver(); static int next_marked_length; // next length of marked text after current marked text will have been replaced static void breakMacEventLoop(); @@ -100,6 +106,7 @@ public: virtual float scale(int n) {return scale_;} virtual void scale(int n, float f) { scale_ = f;} virtual Fl_RGB_Image *read_win_rectangle(int X, int Y, int w, int h, Fl_Window *win, bool may_capture_subwins, bool *did_capture_subwins); + virtual void default_icons(const Fl_RGB_Image *icons[], int count); private: float scale_; }; diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx index 34e1c80fd..835169e3e 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx +++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx @@ -79,6 +79,7 @@ static Fl_Text_Editor::Key_Binding extra_bindings[] = { Fl_Cocoa_Screen_Driver::Fl_Cocoa_Screen_Driver() { text_editor_extra_key_bindings = extra_bindings; scale_ = 1.; + default_icon = nil; } diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H index 6de52e5db..9ef5d46c9 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H +++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H @@ -33,12 +33,14 @@ class Fl_Window; #ifdef __OBJC__ @class CALayer; @class NSCursor; +@class NSImage; @class FLWindow; @class NSOpenGLContext; @class NSOpenGLPixelFormat; #else class CALayer; class NSCursor; +class NSImage; class FLWindow; class NSOpenGLContext; class NSOpenGLPixelFormat; @@ -153,6 +155,10 @@ public: static void GLcontext_makecurrent(NSOpenGLContext*); // uses Objective-c static void GL_cleardrawable(void); // uses Objective-c static void gl_start(NSOpenGLContext*); // uses Objective-c + + //icons + virtual void icons(const Fl_RGB_Image *icons[], int count); + NSImage *icon_image; }; #endif // FL_COCOA_WINDOW_DRIVER_H diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx index 43ae44664..35daffd22 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx +++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx @@ -52,17 +52,7 @@ Fl_Cocoa_Window_Driver::Fl_Cocoa_Window_Driver(Fl_Window *win) { cursor = nil; window_flags_ = 0; -} - - -Fl_Cocoa_Window_Driver::~Fl_Cocoa_Window_Driver() -{ - if (shape_data_) { - if (shape_data_->mask) { - CGImageRelease(shape_data_->mask); - } - delete shape_data_; - } + icon_image = NULL; } |
