mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 06:56:24 +08:00
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:
@@ -136,7 +136,6 @@ public:
|
|||||||
static void x(Fl_Window* wi, int X) {wi->x(X);}
|
static void x(Fl_Window* wi, int X) {wi->x(X);}
|
||||||
static void y(Fl_Window* wi, int Y) {wi->y(Y);}
|
static void y(Fl_Window* wi, int Y) {wi->y(Y);}
|
||||||
static void activate_window(Window w);
|
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()
|
extern FL_EXPORT char fl_override_redirect; // hack into Fl_X::make_xid()
|
||||||
|
|||||||
+1
-1
@@ -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
|
// 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;
|
if (!data || W <= 0 || H <= 0) return;
|
||||||
delete[] fl_selection_buffer[clipboard];
|
delete[] fl_selection_buffer[clipboard];
|
||||||
fl_selection_buffer[clipboard] = (char *) create_bmp(data,W,H,&fl_selection_length[clipboard]);
|
fl_selection_buffer[clipboard] = (char *) create_bmp(data,W,H,&fl_selection_length[clipboard]);
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
static int ewmh_supported();
|
static int ewmh_supported();
|
||||||
|
static void copy_image(const unsigned char* data, int W, int H, int destination);
|
||||||
// --- display management
|
// --- display management
|
||||||
virtual void display(const char *disp);
|
virtual void display(const char *disp);
|
||||||
virtual int visual(int flags);
|
virtual int visual(int flags);
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include <FL/x.H>
|
#include <FL/x.H>
|
||||||
#include <FL/fl_draw.H>
|
#include <FL/fl_draw.H>
|
||||||
#include "Fl_Translated_Xlib_Graphics_Driver.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 {
|
class Fl_Xlib_Copy_Surface_Driver : public Fl_Copy_Surface_Driver {
|
||||||
friend class 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);
|
unsigned char *data = fl_read_image(NULL,0,0,width,height,0);
|
||||||
fl_window = oldwindow;
|
fl_window = oldwindow;
|
||||||
_ss->set_current();
|
_ss->set_current();
|
||||||
Fl_X::copy_image(data,width,height,1);
|
Fl_X11_Screen_Driver::copy_image(data, width, height, 1);
|
||||||
delete[] data;
|
delete[] data;
|
||||||
fl_delete_offscreen(xid);
|
fl_delete_offscreen(xid);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user