summaryrefslogtreecommitdiff
path: root/FL/Fl_Window.H
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-03-10 17:19:34 +0000
committerManolo Gouy <Manolo>2016-03-10 17:19:34 +0000
commitd4768073fa67e7f78872bc80f4dff1dd8aa32f69 (patch)
treee49adba4ced816e851cbb74e5cac4f9a995f4189 /FL/Fl_Window.H
parent79f79d292c8ffe7a172237c614345a7bc667de80 (diff)
Implement non-rectangular windows using the Window Driver mechanism.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11336 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Window.H')
-rw-r--r--FL/Fl_Window.H47
1 files changed, 8 insertions, 39 deletions
diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H
index ce9582475..8884d0b67 100644
--- a/FL/Fl_Window.H
+++ b/FL/Fl_Window.H
@@ -101,42 +101,6 @@ class FL_EXPORT Fl_Window : public Fl_Group {
// cursor stuff
Fl_Cursor cursor_default;
-protected:
- /** Data supporting a non-rectangular window shape */
- struct shape_data_type {
- int lw_; ///< width of shape image
- int lh_; ///< height of shape image
- Fl_Image* shape_; ///< shape image
-#if defined(__APPLE__) // PORTME: Fl_Window_Driver - per-window shape information, move to Fl_X/Fl_Window_Driver
- typedef struct CGImage* CGImageRef;
- CGImageRef mask;
-#elif defined(WIN32)
- // not needed
-#elif defined(FL_PORTING)
-# pragma message "FL_PORTING: define storage for a window mask here if needed"
-#else // X11
- // not needed
-#endif
- Fl_Bitmap *todelete_; ///< auxiliary bitmap image
- };
-
- shape_data_type *shape_data_; ///< non-null means the window has a non-rectangular shape
-private:
- void shape_bitmap_(Fl_Image* b);
- void shape_alpha_(Fl_Image* img, int offset);
- void shape_pixmap_(Fl_Image* pixmap);
-public:
- void shape(const Fl_Image* img);
- /** Set the window's shape with an Fl_Image.
- \see void shape(const Fl_Image* img)
- */
- inline void shape(const Fl_Image& b) { shape(&b); }
-#if defined(WIN32) || defined(__APPLE__) || defined(FL_DOXYGEN) // PORTME: Fl_Window_Driver - per-window shape
-#elif defined(FL_PORTING)
-# pragma message "FL_PORTING: do you need a combine_mask() function in Fl_Window?"
-#else // X11
- void combine_mask(void);
-#endif
private:
void size_range_();
@@ -152,7 +116,7 @@ protected:
/** Stores the last window that was made current. See current() const */
static Fl_Window *current_;
- virtual void draw();
+ void draw();
/** Forces the window to be drawn, this window is also made current and calls draw(). */
virtual void flush();
@@ -180,6 +144,7 @@ protected:
void free_icons();
+ Fl_Window(int x, int y, int w, int h, const char* title, Fl_Window_Driver *driver);
public:
/**
@@ -640,9 +605,13 @@ public:
Fl_Window_Driver *driver() { return pWindowDriver; }
/**
- Return non-null if this is an Fl_Overlay_Window object.
+ Return non-null if this is an Fl_Double_Window object.
*/
- virtual Fl_Double_Window *as_double_window() {return NULL; }
+ virtual Fl_Double_Window *as_double_window() {return NULL;}
+ void shape(const Fl_Image* img);
+ void shape(const Fl_Image& b) ;
+ int is_shaped();
+
};
#endif