Continue removing non window-related member-functions from class Fl_X.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11631 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
d3d7597484
commit
d3e2a88c09
1
FL/x.H
1
FL/x.H
@ -136,7 +136,6 @@ public:
|
||||
static void x(Fl_Window* wi, int X) {wi->x(X);}
|
||||
static void y(Fl_Window* wi, int Y) {wi->y(Y);}
|
||||
static void activate_window(Window w);
|
||||
static void copy_image(const unsigned char* data, int W, int H, int destination = 0);
|
||||
};
|
||||
|
||||
extern FL_EXPORT char fl_override_redirect; // hack into Fl_X::make_xid()
|
||||
|
@ -1024,7 +1024,7 @@ static unsigned char *create_bmp(const unsigned char *data, int W, int H, int *r
|
||||
}
|
||||
|
||||
// takes a raw RGB image and puts it in the copy/paste buffer
|
||||
void Fl_X::copy_image(const unsigned char *data, int W, int H, int clipboard){
|
||||
void Fl_X11_Screen_Driver::copy_image(const unsigned char *data, int W, int H, int clipboard){
|
||||
if (!data || W <= 0 || H <= 0) return;
|
||||
delete[] fl_selection_buffer[clipboard];
|
||||
fl_selection_buffer[clipboard] = (char *) create_bmp(data,W,H,&fl_selection_length[clipboard]);
|
||||
|
@ -45,6 +45,7 @@ protected:
|
||||
|
||||
public:
|
||||
static int ewmh_supported();
|
||||
static void copy_image(const unsigned char* data, int W, int H, int destination);
|
||||
// --- display management
|
||||
virtual void display(const char *disp);
|
||||
virtual int visual(int flags);
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <FL/x.H>
|
||||
#include <FL/fl_draw.H>
|
||||
#include "Fl_Translated_Xlib_Graphics_Driver.H"
|
||||
#include "../X11/Fl_X11_Screen_Driver.H"
|
||||
|
||||
class Fl_Xlib_Copy_Surface_Driver : public Fl_Copy_Surface_Driver {
|
||||
friend class Fl_Copy_Surface_Driver;
|
||||
@ -69,7 +70,7 @@ Fl_Xlib_Copy_Surface_Driver::~Fl_Xlib_Copy_Surface_Driver() {
|
||||
unsigned char *data = fl_read_image(NULL,0,0,width,height,0);
|
||||
fl_window = oldwindow;
|
||||
_ss->set_current();
|
||||
Fl_X::copy_image(data,width,height,1);
|
||||
Fl_X11_Screen_Driver::copy_image(data, width, height, 1);
|
||||
delete[] data;
|
||||
fl_delete_offscreen(xid);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user