Move struct shape_data_type inside Fl_XXX_Window_Driver.
This commit is contained in:
parent
170a9d8e1f
commit
217120c281
@ -56,8 +56,6 @@ private:
|
||||
|
||||
protected:
|
||||
Fl_Window *pWindow;
|
||||
struct shape_data_type;
|
||||
shape_data_type *shape_data_; ///< non-null means the window has a non-rectangular shape
|
||||
void flush_Fl_Window(); // accessor to protected Fl_Window::flush()
|
||||
public:
|
||||
Fl_Window_Driver(Fl_Window *);
|
||||
|
@ -39,7 +39,6 @@ extern void fl_throw_focus(Fl_Widget *o);
|
||||
*/
|
||||
Fl_Window_Driver::Fl_Window_Driver(Fl_Window *win)
|
||||
: pWindow(win) {
|
||||
shape_data_ = NULL;
|
||||
wait_for_expose_value = 0;
|
||||
other_xid = 0;
|
||||
}
|
||||
|
@ -65,11 +65,6 @@ class NSOpenGLPixelFormat;
|
||||
|
||||
? where do we handle the interface between OpenGL/DirectX and Cocoa/Windows/Glx?
|
||||
*/
|
||||
struct Fl_Window_Driver::shape_data_type {
|
||||
Fl_Image* shape_; ///< shape image
|
||||
typedef struct CGImage* CGImageRef;
|
||||
CGImageRef mask;
|
||||
};
|
||||
|
||||
/**
|
||||
\}
|
||||
@ -80,6 +75,11 @@ struct Fl_Window_Driver::shape_data_type {
|
||||
class FL_EXPORT Fl_Cocoa_Window_Driver : public Fl_Window_Driver
|
||||
{
|
||||
private:
|
||||
struct shape_data_type {
|
||||
Fl_Image* shape_; ///< shape image
|
||||
typedef struct CGImage* CGImageRef;
|
||||
CGImageRef mask;
|
||||
} *shape_data_;
|
||||
void shape_bitmap_(Fl_Image* b);
|
||||
void shape_alpha_(Fl_Image* img, int offset);
|
||||
CGRect* subRect_; // makes sure subwindow remains inside its parent window
|
||||
|
@ -35,6 +35,7 @@ Fl_Cocoa_Window_Driver::Fl_Cocoa_Window_Driver(Fl_Window *win)
|
||||
window_flags_ = 0;
|
||||
icon_image = NULL;
|
||||
screen_num_ = 0;
|
||||
shape_data_ = NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -88,6 +89,8 @@ void Fl_Cocoa_Window_Driver::draw_begin()
|
||||
CGContextClipToMask(my_gc, CGRectMake(0,0,w(),h()), shape_data_->mask); // requires Mac OS 10.4
|
||||
}
|
||||
CGContextSaveGState(my_gc);
|
||||
CGAffineTransform mat = CGContextGetCTM(my_gc);
|
||||
printf("mat.a=%g\n",mat.a);
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
@ -42,18 +42,17 @@
|
||||
|
||||
typedef struct _cairo_pattern cairo_pattern_t;
|
||||
|
||||
struct Fl_Window_Driver::shape_data_type {
|
||||
int lw_; ///< width of shape image
|
||||
int lh_; ///< height of shape image
|
||||
Fl_Image* shape_; ///< shape image
|
||||
cairo_pattern_t *mask_pattern_;
|
||||
};
|
||||
|
||||
|
||||
class FL_EXPORT Fl_Wayland_Window_Driver : public Fl_Window_Driver
|
||||
{
|
||||
friend class Fl_X;
|
||||
private:
|
||||
struct shape_data_type {
|
||||
int lw_; ///< width of shape image
|
||||
int lh_; ///< height of shape image
|
||||
Fl_Image* shape_; ///< shape image
|
||||
cairo_pattern_t *mask_pattern_;
|
||||
} *shape_data_;
|
||||
static bool in_flush; // useful for progressive window drawing
|
||||
struct wl_cursor *cursor_;
|
||||
void delete_cursor_();
|
||||
|
@ -63,6 +63,7 @@ void Fl_Wayland_Window_Driver::destroy_double_buffer() {
|
||||
|
||||
Fl_Wayland_Window_Driver::Fl_Wayland_Window_Driver(Fl_Window *win) : Fl_Window_Driver(win)
|
||||
{
|
||||
shape_data_ = NULL;
|
||||
cursor_ = NULL;
|
||||
in_handle_configure = false;
|
||||
screen_num_ = -1;
|
||||
|
@ -42,12 +42,6 @@
|
||||
*/
|
||||
|
||||
|
||||
struct Fl_Window_Driver::shape_data_type {
|
||||
int lw_; ///< width of shape image
|
||||
int lh_; ///< height of shape image
|
||||
Fl_Image* shape_; ///< shape image
|
||||
Fl_Bitmap *effective_bitmap_; ///< auxiliary bitmap image
|
||||
};
|
||||
|
||||
class FL_EXPORT Fl_WinAPI_Window_Driver : public Fl_Window_Driver
|
||||
{
|
||||
@ -58,6 +52,12 @@ class FL_EXPORT Fl_WinAPI_Window_Driver : public Fl_Window_Driver
|
||||
HICON big_icon;
|
||||
HICON small_icon;
|
||||
};
|
||||
struct shape_data_type {
|
||||
int lw_; ///< width of shape image
|
||||
int lh_; ///< height of shape image
|
||||
Fl_Image* shape_; ///< shape image
|
||||
Fl_Bitmap *effective_bitmap_; ///< auxiliary bitmap image
|
||||
} *shape_data_;
|
||||
int screen_num_;
|
||||
private:
|
||||
void shape_bitmap_(Fl_Image* b);
|
||||
|
@ -39,6 +39,7 @@ Fl_WinAPI_Window_Driver::Fl_WinAPI_Window_Driver(Fl_Window *win)
|
||||
: Fl_Window_Driver(win)
|
||||
{
|
||||
icon_ = new icon_data;
|
||||
shape_data_ = NULL;
|
||||
memset(icon_, 0, sizeof(icon_data));
|
||||
cursor = NULL;
|
||||
screen_num_ = -1;
|
||||
|
@ -44,14 +44,6 @@ class Fl_Bitmap;
|
||||
*/
|
||||
|
||||
|
||||
|
||||
struct Fl_Window_Driver::shape_data_type {
|
||||
int lw_; ///< width of shape image
|
||||
int lh_; ///< height of shape image
|
||||
Fl_Image* shape_; ///< shape image
|
||||
Fl_Bitmap *effective_bitmap_; ///< auxiliary bitmap image
|
||||
};
|
||||
|
||||
class FL_EXPORT Fl_X11_Window_Driver : public Fl_Window_Driver
|
||||
{
|
||||
friend class Fl_X;
|
||||
@ -63,6 +55,12 @@ private:
|
||||
Fl_RGB_Image **icons;
|
||||
int count;
|
||||
} *icon_;
|
||||
struct shape_data_type {
|
||||
int lw_; ///< width of shape image
|
||||
int lh_; ///< height of shape image
|
||||
Fl_Image* shape_; ///< shape image
|
||||
Fl_Bitmap *effective_bitmap_; ///< auxiliary bitmap image
|
||||
} *shape_data_;
|
||||
#if USE_XFT
|
||||
// --- support for screen-specific scaling factors
|
||||
struct type_for_resize_window_between_screens {
|
||||
|
@ -48,6 +48,7 @@ Fl_X11_Window_Driver::Fl_X11_Window_Driver(Fl_Window *win)
|
||||
: Fl_Window_Driver(win)
|
||||
{
|
||||
icon_ = new icon_data;
|
||||
shape_data_ = NULL;
|
||||
memset(icon_, 0, sizeof(icon_data));
|
||||
#if USE_XFT
|
||||
screen_num_ = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user