diff options
| author | Manolo Gouy <Manolo> | 2016-09-11 14:24:36 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-09-11 14:24:36 +0000 |
| commit | 70194e154a3ac57e9b4ac177ef1dd3cf15dbffe9 (patch) | |
| tree | 0185085cefbf8000df203f3d93f79f75b42ee0ab /FL | |
| parent | e1f1b3898f73388620d634af9f98970e6ee6965b (diff) | |
Change FL/porting.H after having rewritten x.H and platform_types.h under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11932 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/porting.H | 56 |
1 files changed, 9 insertions, 47 deletions
diff --git a/FL/porting.H b/FL/porting.H index 3a257807d..3cb08a1f1 100644 --- a/FL/porting.H +++ b/FL/porting.H @@ -1,9 +1,9 @@ // // "$Id$" // -// Mac header file for the Fast Light Tool Kit (FLTK). +// Template header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2015 by Bill Spitzak and others. +// Copyright 2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -18,59 +18,21 @@ // Do not directly include this file, instead use <FL/x.H>. -// This file can be used as a template when porting FLTK to a new platform +// These types and variables give access to internal, platform-specific data through the public API. +// They require to include x.H (in contrast to types defined in platform_types.h) #if !defined(Fl_X_H) # error "Never use <FL/porting.H> directly; include <FL/x.H> instead." #endif // !Fl_X_H -typedef void *Window; - -#if !(defined(FL_LIBRARY) || defined(FL_INTERNALS)) // this part is used when compiling an application program -# include <FL/Fl_Widget.H> - -typedef void *Fl_Region; -typedef void *Fl_Offscreen; - -#else // this part must be compiled when building the FLTK libraries - -typedef void *Fl_Region; -typedef void *Fl_Offscreen; - -# include "Fl_Window.H" - -// Some random X equivalents -struct XPoint { int x, y; }; -struct XRectangle {int x, y, width, height;}; - -inline void fl_open_callback(void (*)(const char *)) {} - -extern Window fl_window; - -#endif // FL_LIBRARY || FL_INTERNALS - -typedef void *Fl_Bitmask; +typedef void *Window; // used by fl_find(), fl_xid() and class Fl_X +/* Reference to the current device context + For back-compatibility only. The preferred procedure to get this reference is + Fl_Surface_Device::surface()->driver()->gc(). + */ extern void *fl_gc; -extern Window fl_xid(const Fl_Window*); -extern Fl_Window* fl_find(Window xid); -void fl_clip_region(Fl_Region); - -extern Fl_Bitmask fl_create_bitmask(int w, int h, const uchar *data); -extern Fl_Bitmask fl_create_alphamask(int w, int h, int d, int ld, const uchar *data); -extern void fl_delete_bitmask(Fl_Bitmask bm); -extern Fl_Offscreen fl_create_offscreen(int w, int h); -extern void fl_copy_offscreen(int x,int y,int w,int h, Fl_Offscreen gWorld, int srcx,int srcy); -extern void fl_delete_offscreen(Fl_Offscreen gWorld); -extern void fl_begin_offscreen(Fl_Offscreen gWorld); -extern void fl_end_offscreen(); - -extern int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b); -extern void fl_open_display(); - - // // End of "$Id$". // - |
