fltk  1.3.5-source
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X.
  Fossies Dox: fltk-1.3.5-source.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

Fl_Double_Window.cxx
Go to the documentation of this file.
1 //
2 // "$Id$"
3 //
4 // Double-buffered window code for the Fast Light Tool Kit (FLTK).
5 //
6 // Copyright 1998-2012 by Bill Spitzak and others.
7 //
8 // This library is free software. Distribution and use rights are outlined in
9 // the file "COPYING" which should have been included with this file. If this
10 // file is missing or damaged, see the license at:
11 //
12 // http://www.fltk.org/COPYING.php
13 //
14 // Please report all bugs and problems on the following page:
15 //
16 // http://www.fltk.org/str.php
17 //
22 #include <config.h>
23 #include <FL/Fl.H>
24 #include <FL/Fl_Double_Window.H>
25 #include <FL/Fl_Overlay_Window.H>
26 #include <FL/Fl_Printer.H>
27 #include <FL/x.H>
28 #include <FL/fl_draw.H>
29 
30 // On systems that support double buffering "naturally" the base
31 // Fl_Window class will probably do double-buffer and this subclass
32 // does nothing.
33 
34 #if USE_XDBE
35 
36 #include <X11/extensions/Xdbe.h>
37 
38 static int use_xdbe;
39 
40 static int can_xdbe() {
41  static int tried;
42  if (!tried) {
43  tried = 1;
44  int event_base, error_base;
45  if (!XdbeQueryExtension(fl_display, &event_base, &error_base)) return 0;
46  Drawable root = RootWindow(fl_display,fl_screen);
47  int numscreens = 1;
48  XdbeScreenVisualInfo *a = XdbeGetVisualInfo(fl_display,&root,&numscreens);
49  if (!a) return 0;
50  for (int j = 0; j < a->count; j++) {
51  if (a->visinfo[j].visual == fl_visual->visualid
52  /*&& a->visinfo[j].perflevel > 0*/) {
53  use_xdbe = 1; break;
54  }
55  }
56  XdbeFreeVisualInfo(a);
57  }
58  return use_xdbe;
59 }
60 #endif
61 
62 
63 Fl_Double_Window::Fl_Double_Window(int W, int H, const char *l)
64 : Fl_Window(W,H,l),
65  force_doublebuffering_(0)
66 {
68 }
69 
70 
71 Fl_Double_Window::Fl_Double_Window(int X, int Y, int W, int H, const char *l)
72 : Fl_Window(X,Y,W,H,l),
73  force_doublebuffering_(0)
74 {
76 }
77 
78 
81 }
82 
83 
93 #if FLTK_ABI_VERSION >= 10301
94 void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) {
95  fl_graphics_driver->copy_offscreen(x, y, w, h, pixmap, srcx, srcy);
96 }
97 #else
98 void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) {
99 #ifdef WIN32
100  if (fl_graphics_driver->class_name() == Fl_GDI_Graphics_Driver::class_id ||
101  fl_graphics_driver->class_name() == Fl_GDI_Printer_Graphics_Driver::class_id) {
102 #else
104 #endif
105 #ifdef USE_X11
106  ((Fl_Xlib_Graphics_Driver*)fl_graphics_driver)->copy_offscreen(x, y, w, h, pixmap, srcx, srcy);
107 #elif defined(WIN32)
108  ((Fl_GDI_Graphics_Driver*)fl_graphics_driver)->copy_offscreen(x, y, w, h, pixmap, srcx, srcy);
109 #elif defined(__APPLE__)
110  ((Fl_Quartz_Graphics_Driver*)fl_graphics_driver)->copy_offscreen(x, y, w, h, pixmap, srcx, srcy);
111 #endif
112  }
113  else { // when copy is not to the display
114  fl_graphics_driver->copy_offscreen(x, y, w, h, pixmap, srcx, srcy);
115  }
116 }
117 #endif // FLTK_ABI_VERSION
118 
121 void Fl_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy)
122 {
124  uchar *img = fl_read_image(NULL, srcx, srcy, w, h, 0);
126  fl_draw_image(img, x, y, w, h, 3, 0);
127  delete[] img;
128 }
129 
130 #if defined(USE_X11)
131 
132 #if HAVE_XRENDER
133 #include <X11/extensions/Xrender.h>
134 #endif
135 
136 void Fl_Xlib_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy) {
137  XCopyArea(fl_display, pixmap, fl_window, fl_gc, srcx, srcy, w, h, x, y);
138 }
139 
140 void Fl_Xlib_Graphics_Driver::copy_offscreen_with_alpha(int x, int y, int w, int h,
141  Fl_Offscreen pixmap, int srcx, int srcy) {
142 #if HAVE_XRENDER
143  XRenderPictureAttributes srcattr;
144  memset(&srcattr, 0, sizeof(XRenderPictureAttributes));
145  static XRenderPictFormat *srcfmt = XRenderFindStandardFormat(fl_display, PictStandardARGB32);
146  static XRenderPictFormat *dstfmt = XRenderFindStandardFormat(fl_display, PictStandardRGB24);
147 
148  Picture src = XRenderCreatePicture(fl_display, pixmap, srcfmt, 0, &srcattr);
149  Picture dst = XRenderCreatePicture(fl_display, fl_window, dstfmt, 0, &srcattr);
150 
151  if (!src || !dst) {
152  fprintf(stderr, "Failed to create Render pictures (%lu %lu)\n", src, dst);
153  return;
154  }
155 
156  const Fl_Region clipr = fl_clip_region();
157  if (clipr)
158  XRenderSetPictureClipRegion(fl_display, dst, clipr);
159 
160  XRenderComposite(fl_display, PictOpOver, src, None, dst, srcx, srcy, 0, 0,
161  x, y, w, h);
162 
163  XRenderFreePicture(fl_display, src);
164  XRenderFreePicture(fl_display, dst);
165 #endif
166 }
167 
169  return Fl_X::xrender_supported();
170 }
171 #elif defined(WIN32)
172 
173 // Code used to switch output to an off-screen window. See macros in
174 // win32.H which save the old state in local variables.
175 
176 typedef struct { BYTE a; BYTE b; BYTE c; BYTE d; } FL_BLENDFUNCTION;
177 typedef BOOL (WINAPI* fl_alpha_blend_func)
178  (HDC,int,int,int,int,HDC,int,int,int,int,FL_BLENDFUNCTION);
179 static fl_alpha_blend_func fl_alpha_blend = NULL;
180 static FL_BLENDFUNCTION blendfunc = { 0, 0, 255, 1};
181 
182 /*
183  * This function checks if the version of MSWindows that we
184  * curently run on supports alpha blending for bitmap transfers
185  * and finds the required function if so.
186  */
188  static char been_here = 0;
189  static char can_do = 0;
190  // do this test only once
191  if (been_here) return can_do;
192  been_here = 1;
193  // load the library that implements alpha blending
194  HMODULE hMod = LoadLibrary("MSIMG32.DLL");
195  // give up if that doesn't exist (Win95?)
196  if (!hMod) return 0;
197  // now find the blending function inside that dll
198  fl_alpha_blend = (fl_alpha_blend_func)GetProcAddress(hMod, "AlphaBlend");
199  // give up if we can't find it (Win95)
200  if (!fl_alpha_blend) return 0;
201  // we have the call, but does our display support alpha blending?
202  // get the desktop's device context
203  HDC dc = GetDC(0L);
204  if (!dc) return 0;
205  // check the device capabilities flags. However GetDeviceCaps
206  // does not return anything useful, so we have to do it manually:
207 
208  HBITMAP bm = CreateCompatibleBitmap(dc, 1, 1);
209  HDC new_gc = CreateCompatibleDC(dc);
210  int save = SaveDC(new_gc);
211  SelectObject(new_gc, bm);
212  /*COLORREF set = */ SetPixel(new_gc, 0, 0, 0x01010101);
213  BOOL alpha_ok = fl_alpha_blend(dc, 0, 0, 1, 1, new_gc, 0, 0, 1, 1, blendfunc);
214  RestoreDC(new_gc, save);
215  DeleteDC(new_gc);
216  DeleteObject(bm);
217  ReleaseDC(0L, dc);
218 
219  if (alpha_ok) can_do = 1;
220  return can_do;
221 }
222 
223 HDC fl_makeDC(HBITMAP bitmap) {
224  HDC new_gc = CreateCompatibleDC(fl_gc);
225  SetTextAlign(new_gc, TA_BASELINE|TA_LEFT);
226  SetBkMode(new_gc, TRANSPARENT);
227 #if USE_COLORMAP
228  if (fl_palette) SelectPalette(new_gc, fl_palette, FALSE);
229 #endif
230  SelectObject(new_gc, bitmap);
231  return new_gc;
232 }
233 
234 void Fl_GDI_Graphics_Driver::copy_offscreen(int x,int y,int w,int h,HBITMAP bitmap,int srcx,int srcy) {
235  HDC new_gc = CreateCompatibleDC(fl_gc);
236  int save = SaveDC(new_gc);
237  SelectObject(new_gc, bitmap);
238  BitBlt(fl_gc, x, y, w, h, new_gc, srcx, srcy, SRCCOPY);
239  RestoreDC(new_gc, save);
240  DeleteDC(new_gc);
241 }
242 
243 void Fl_GDI_Graphics_Driver::copy_offscreen_with_alpha(int x,int y,int w,int h,HBITMAP bitmap,int srcx,int srcy) {
244  HDC new_gc = CreateCompatibleDC(fl_gc);
245  int save = SaveDC(new_gc);
246  SelectObject(new_gc, bitmap);
247  BOOL alpha_ok = 0;
248  // first try to alpha blend
249  if ( fl_can_do_alpha_blending() ) {
250  alpha_ok = fl_alpha_blend(fl_gc, x, y, w, h, new_gc, srcx, srcy, w, h, blendfunc);
251  }
252  // if that failed (it shouldn't), still copy the bitmap over, but now alpha is 1
253  if (!alpha_ok) {
254  BitBlt(fl_gc, x, y, w, h, new_gc, srcx, srcy, SRCCOPY);
255  }
256  RestoreDC(new_gc, save);
257  DeleteDC(new_gc);
258 }
259 
260 
261 #elif defined(__APPLE_QUARTZ__) || defined(FL_DOXYGEN)
262 
264  return 1;
265 }
266 
267 #if ! defined(FL_DOXYGEN)
268 Fl_Offscreen Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha(int w, int h) {
269  void *data = calloc(w*h,4);
270  CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
271  CGContextRef ctx = CGBitmapContextCreate(
272  data, w, h, 8, w*4, lut, kCGImageAlphaPremultipliedLast);
273  CGColorSpaceRelease(lut);
274  return (Fl_Offscreen)ctx;
275 }
276 #endif
277 
287 Fl_Offscreen fl_create_offscreen(int w, int h) {
288  void *data = calloc(w*h,4);
289  CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
290  CGContextRef ctx = CGBitmapContextCreate(
291  data, w, h, 8, w*4, lut, kCGImageAlphaNoneSkipLast);
292  CGColorSpaceRelease(lut);
293  return (Fl_Offscreen)ctx;
294 }
295 
296 static void bmProviderRelease (void *src, const void *data, size_t size) {
297  CFIndex count = CFGetRetainCount(src);
298  CFRelease(src);
299  if(count == 1) free((void*)data);
300 }
301 
302 void Fl_Quartz_Graphics_Driver::copy_offscreen(int x,int y,int w,int h,Fl_Offscreen osrc,int srcx,int srcy) {
303  CGContextRef src = (CGContextRef)osrc;
304  void *data = CGBitmapContextGetData(src);
305  int sw = CGBitmapContextGetWidth(src);
306  int sh = CGBitmapContextGetHeight(src);
307  CGImageAlphaInfo alpha = CGBitmapContextGetAlphaInfo(src);
308  CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();
309  // when output goes to a Quartz printercontext, release of the bitmap must be
310  // delayed after the end of the print page
311  CFRetain(src);
312  CGDataProviderRef src_bytes = CGDataProviderCreateWithData( src, data, sw*sh*4, bmProviderRelease);
313  CGImageRef img = CGImageCreate( sw, sh, 8, 4*8, 4*sw, lut, alpha,
314  src_bytes, 0L, false, kCGRenderingIntentDefault);
315  // fl_push_clip();
316  CGRect rect = CGRectMake(x, y, w, h);
317  Fl_X::q_begin_image(rect, srcx, srcy, sw, sh);
318  CGContextDrawImage(fl_gc, rect, img);
319  Fl_X::q_end_image();
320  CGImageRelease(img);
321  CGColorSpaceRelease(lut);
322  CGDataProviderRelease(src_bytes);
323 }
324 
329  if (!ctx) return;
330  void *data = CGBitmapContextGetData((CGContextRef)ctx);
331  CFIndex count = CFGetRetainCount(ctx);
332  CGContextRelease((CGContextRef)ctx);
333  if(count == 1) free(data);
334 }
335 
336 const int stack_max = 16;
337 static int stack_ix = 0;
338 static CGContextRef stack_gc[stack_max];
339 static Window stack_window[stack_max];
340 static Fl_Surface_Device *_ss;
341 
348  if (stack_ix<stack_max) {
349  stack_gc[stack_ix] = fl_gc;
350  stack_window[stack_ix] = fl_window;
351  } else
352  fprintf(stderr, "FLTK CGContext Stack overflow error\n");
353  stack_ix++;
354 
355  fl_gc = (CGContextRef)ctx;
356  fl_window = 0;
358  fl_push_no_clip();
359 }
360 
363 void fl_end_offscreen() {
364  fl_pop_clip();
365  CGContextRestoreGState(fl_gc); // matches CGContextSaveGState in fl_begin_offscreen()
367  if (stack_ix>0)
368  stack_ix--;
369  else
370  fprintf(stderr, "FLTK CGContext Stack underflow error\n");
371  if (stack_ix<stack_max) {
372  fl_gc = stack_gc[stack_ix];
373  fl_window = stack_window[stack_ix];
374  }
375  _ss->set_current();
376 }
377 
381 #else
382 # error unsupported platform
383 #endif
384 
389 
398 void Fl_Double_Window::flush(int eraseoverlay) {
399  if (!shown()) return;
400  make_current(); // make sure fl_gc is non-zero
401  Fl_X *myi = Fl_X::i(this);
402  if (!myi) return; // window not yet created
403  if (!myi->other_xid) {
404 #if USE_XDBE
405  if (can_xdbe()) {
406  myi->other_xid = XdbeAllocateBackBufferName(fl_display, fl_xid(this), XdbeCopied);
407  myi->backbuffer_bad = 1;
408  } else
409 #endif
410 #if defined(USE_X11) || defined(WIN32)
411  myi->other_xid = fl_create_offscreen(w(), h());
413 #elif defined(__APPLE_QUARTZ__)
415  myi->other_xid = fl_create_offscreen(w(), h());
417  }
418 #else
419 # error unsupported platform
420 #endif
421  }
422 #if USE_XDBE
423  if (use_xdbe) {
424  if (myi->backbuffer_bad || eraseoverlay) {
425  // Make sure we do a complete redraw...
426  if (myi->region) {XDestroyRegion(myi->region); myi->region = 0;}
428  myi->backbuffer_bad = 0;
429  }
430 
431  // Redraw as needed...
432  if (damage()) {
433  fl_clip_region(myi->region); myi->region = 0;
434  fl_window = myi->other_xid;
435  draw();
436  fl_window = myi->xid;
437  }
438 
439  // Copy contents of back buffer to window...
440  XdbeSwapInfo s;
441  s.swap_window = fl_xid(this);
442  s.swap_action = XdbeCopied;
443  XdbeSwapBuffers(fl_display, &s, 1);
444  return;
445  } else
446 #endif
447  if (damage() & ~FL_DAMAGE_EXPOSE) {
448  fl_clip_region(myi->region); myi->region = 0;
449 #ifdef WIN32
450  HDC _sgc = fl_gc;
451  fl_gc = fl_makeDC(myi->other_xid);
452  int save = SaveDC(fl_gc);
453  fl_restore_clip(); // duplicate region into new gc
454  draw();
455  RestoreDC(fl_gc, save);
456  DeleteDC(fl_gc);
457  fl_gc = _sgc;
458  //# if defined(FLTK_USE_CAIRO)
459  //if Fl::cairo_autolink_context() Fl::cairo_make_current(this); // capture gc changes automatically to update the cairo context adequately
460  //# endif
461 #elif defined(__APPLE__)
462  if ( myi->other_xid ) {
463  fl_begin_offscreen( myi->other_xid );
464  fl_clip_region( 0 );
465  draw();
467  } else {
468  draw();
469  }
470 #else // X:
471  fl_window = myi->other_xid;
472  draw();
473  fl_window = myi->xid;
474 #endif
475  }
476  if (eraseoverlay) fl_clip_region(0);
477  // on Irix (at least) it is faster to reduce the area copied to
478  // the current clip region:
479  int X,Y,W,H; fl_clip_box(0,0,w(),h(),X,Y,W,H);
480  if (myi->other_xid) fl_copy_offscreen(X, Y, W, H, myi->other_xid, X, Y);
481 }
482 
483 void Fl_Double_Window::resize(int X,int Y,int W,int H) {
484  int ow = w();
485  int oh = h();
486  Fl_Window::resize(X,Y,W,H);
487 #if USE_XDBE
488  if (use_xdbe) {
489  Fl_X* myi = Fl_X::i(this);
490  if (myi && myi->other_xid && (ow < w() || oh < h())) {
491  // STR #2152: Deallocate the back buffer to force creation of a new one.
492  XdbeDeallocateBackBufferName(fl_display,myi->other_xid);
493  myi->other_xid = 0;
494  }
495  return;
496  }
497 #endif
498  Fl_X* myi = Fl_X::i(this);
499  if (myi && myi->other_xid && (ow != w() || oh != h())) {
500  fl_delete_offscreen(myi->other_xid);
501  myi->other_xid = 0;
502  }
503 }
504 
506  Fl_X* myi = Fl_X::i(this);
507  if (myi && myi->other_xid) {
508 #if USE_XDBE
509  if (use_xdbe) {
510  XdbeDeallocateBackBufferName(fl_display, myi->other_xid);
511  }
512  else
513 #endif
514  fl_delete_offscreen(myi->other_xid);
515  }
516  Fl_Window::hide();
517 }
518 
525  hide();
526 }
527 
528 
529 Fl_Overlay_Window::Fl_Overlay_Window(int W, int H, const char *l)
530 : Fl_Double_Window(W,H,l)
531 {
532  overlay_ = 0;
534  image(0);
535 }
536 
537 
538 Fl_Overlay_Window::Fl_Overlay_Window(int X, int Y, int W, int H, const char *l)
539 : Fl_Double_Window(X,Y,W,H,l)
540 {
541  overlay_ = 0;
543  image(0);
544 }
545 
546 
547 //
548 // End of "$Id$".
549 //
Fl_Graphics_Driver::copy_offscreen
void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy)
Definition: Fl_Double_Window.cxx:121
Fl_Double_Window::force_doublebuffering_
char force_doublebuffering_
Definition: Fl_Double_Window.H:47
FL_DAMAGE_ALL
Definition: Enumerations.H:1112
Fl.H
Fl_Window::show
virtual void show()
Definition: Fl_win32.cxx:2542
Fl_Graphics_Driver::fl_clip_region
friend Fl_Region fl_clip_region()
Definition: fl_draw.H:140
fl_can_do_alpha_blending
FL_EXPORT char fl_can_do_alpha_blending()
Fl_Double_Window::resize
void resize(int, int, int, int)
Definition: Fl_Double_Window.cxx:483
x.H
Fl_Overlay_Window::overlay_
Fl_Window * overlay_
Definition: Fl_Overlay_Window.H:51
Fl_Surface_Device
Definition: Fl_Device.H:556
free
void free()
H
static int H
Definition: Fl_Tooltip.cxx:76
NULL
#define NULL
Definition: forms.H:34
CGContextRef
struct CGContext * CGContextRef
Definition: mac.H:39
fl_visual
XVisualInfo * fl_visual
Definition: Fl_x.cxx:317
Fl_Xlib_Graphics_Driver::copy_offscreen_with_alpha
void copy_offscreen_with_alpha(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy)
b
long b
Definition: jpegint.h:397
Fl_Xlib_Graphics_Driver
The Xlib-specific graphics class.
Definition: Fl_Device.H:507
Fl_Double_Window.H
CGContextRestoreGState
#define CGContextRestoreGState(a)
Definition: cgdebug.h:195
CGContextFlush
#define CGContextFlush(a)
Definition: cgdebug.h:175
Fl_Graphics_Driver::class_name
virtual const char * class_name()
Definition: Fl_Device.H:384
Fl_Display_Device::display_device
static Fl_Display_Device * display_device()
Definition: Fl_Device.cxx:83
Fl_Xlib_Graphics_Driver::copy_offscreen
void copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy)
Fl_Widget::w
int w() const
Definition: Fl_Widget.H:294
Fl_Surface_Device::driver
void driver(Fl_Graphics_Driver *graphics_driver)
Sets the graphics driver of this drawing surface.
Definition: Fl_Device.H:569
Fl_Graphics_Driver::fl_draw_image
friend void fl_draw_image(const uchar *buf, int X, int Y, int W, int H, int D, int L)
Definition: fl_draw.H:685
Fl_Window::make_current
void make_current()
Definition: Fl_win32.cxx:2590
fl_draw.H
utility header to pull drawing functions together
fl_restore_clip
void fl_restore_clip()
Definition: fl_draw.H:129
fl_clip_box
int fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H)
Definition: fl_draw.H:126
fl_copy_offscreen
void fl_copy_offscreen(int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy)
Definition: Fl_Double_Window.cxx:98
fl_read_image
FL_EXPORT uchar * fl_read_image(uchar *p, int X, int Y, int W, int H, int alpha=0)
Definition: fl_read_image.cxx:152
Fl_Surface_Device::surface
static Fl_Surface_Device * surface()
Definition: Fl_Device.H:574
Fl_Window
Definition: Fl_Window.H:57
Fl_Window::resize
virtual void resize(int X, int Y, int W, int H)
Definition: Fl_win32.cxx:1643
Fl_Double_Window::hide
void hide()
Definition: Fl_Double_Window.cxx:505
CGContextSaveGState
#define CGContextSaveGState(a)
Definition: cgdebug.h:185
pixmap
Fl_Pixmap * pixmap[]
Definition: Fl_Type.cxx:154
Fl_Widget::damage
uchar damage() const
Definition: Fl_Widget.H:917
fl_display
FL_EXPORT HINSTANCE fl_display
END TIMERS.
Definition: Fl_win32.cxx:2147
Fl_Region
struct flCocoaRegion * Fl_Region
Definition: mac.H:38
CGImageRef
struct CGImage * CGImageRef
Definition: mac.H:43
Fl_Printer.H
declaration of classes Fl_Printer, Fl_System_Printer and Fl_PostScript_Printer.
fl_graphics_driver
FL_EXPORT Fl_Graphics_Driver * fl_graphics_driver
Points to the driver that currently receives all graphics requests.
Definition: Fl_Device.cxx:50
fl_delete_offscreen
void fl_delete_offscreen(Fl_Offscreen gWorld)
Fl_Widget::h
int h() const
Definition: Fl_Widget.H:299
Fl_Window::shown
int shown()
Definition: Fl_Window.H:485
Fl_Window::hide
virtual void hide()
Definition: Fl.cxx:1546
Fl_Double_Window::Fl_Double_Window
Fl_Double_Window(int W, int H, const char *l=0)
Definition: Fl_Double_Window.cxx:63
Fl_Surface_Device::set_current
virtual void set_current(void)
Make this surface the current drawing surface. This surface will receive all future graphics requests...
Definition: Fl_Device.cxx:44
fl_palette
HPALETTE fl_palette
Definition: fl_color_win32.cxx:42
Fl_Overlay_Window::Fl_Overlay_Window
Fl_Overlay_Window(int W, int H, const char *l=0)
Definition: Fl_Double_Window.cxx:529
fl_begin_offscreen
void fl_begin_offscreen(Fl_Offscreen gWorld)
fl_pop_clip
void fl_pop_clip()
Definition: fl_draw.H:103
fl_clip_region
void fl_clip_region(Fl_Region r)
Definition: fl_draw.H:136
x
int x
Definition: test.c:73
FL_DAMAGE_EXPOSE
Definition: Enumerations.H:1107
Fl_Widget::clear_damage
void clear_damage(uchar c=0)
Definition: Fl_Widget.H:931
FALSE
Definition: jmorecfg.h:317
Fl_Double_Window
Definition: Fl_Double_Window.H:40
fl_gc
CGContextRef fl_gc
Definition: Fl_win32.cxx:2568
Fl_Window::draw
virtual void draw()
Definition: Fl_Window_shape.cxx:340
y
int y
Definition: test.c:74
calloc
voidp calloc()
fl_end_offscreen
void fl_end_offscreen()
Fl_Widget::type
uchar type() const
Definition: Fl_Widget.H:274
Fl_Offscreen
CGContextRef Fl_Offscreen
Definition: mac.H:45
fl_create_offscreen
Fl_Offscreen fl_create_offscreen(int w, int h)
Y
static int Y
Definition: Fl_Tooltip.cxx:76
Fl_Double_Window::show
void show()
Definition: Fl_Double_Window.cxx:79
rect
void rect(int x, int y, int r, int t)
Definition: gl2opengl.h:30
FL_DOUBLE_WINDOW
#define FL_DOUBLE_WINDOW
double window type id
Definition: Fl_Window.H:34
fl_screen
int fl_screen
Definition: Fl_x.cxx:316
Fl_Double_Window::~Fl_Double_Window
~Fl_Double_Window()
Definition: Fl_Double_Window.cxx:524
Fl_Double_Window::flush
void flush()
Definition: Fl_Double_Window.cxx:388
fl_push_no_clip
void fl_push_no_clip()
Definition: fl_draw.H:95
uchar
unsigned char uchar
Definition: fl_types.h:30
fl_window
FL_EXPORT Window fl_window
Definition: Fl_win32.cxx:2571
fl_makeDC
FL_EXPORT HDC fl_makeDC(HBITMAP)
Window
class FLWindow * Window
Definition: mac.H:32
Fl_Window::Fl_X
friend class Fl_X
Definition: Fl_Window.H:96
fl_xid
Window fl_xid(const Fl_Window *)
Fl_Widget::image
Fl_Image * image()
Definition: Fl_Widget.H:514
Fl_Overlay_Window.H