diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2016-02-10 19:49:35 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2016-02-10 19:49:35 +0000 |
| commit | e83bc2527fd412bc235f1f8743659e31b12bdc31 (patch) | |
| tree | 8c807e8b0c7af5f8ec1c67da1eec8e17bf4ad963 /FL/Fl.H | |
| parent | 478d6336200d18630abd0d77c512e28fb2b931d0 (diff) | |
Basic Screen Driver Structure. LIMBO!
Creating the basic structure for a screen driver system.
OS X works X11 and WinAPI are in limbo and will be fixed in the next hour or so.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11148 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl.H')
| -rw-r--r-- | FL/Fl.H | 67 |
1 files changed, 26 insertions, 41 deletions
@@ -3,7 +3,7 @@ // // Main header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-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 @@ -134,10 +134,16 @@ typedef void (*Fl_Clipboard_Notify_Handler)(int source, void *data); */ class FL_EXPORT Fl { Fl() {}; // no constructor! - + private: + + static class Fl_Screen_Driver *screen_driver_; static int use_high_res_GL_; +public: + + static Fl_Screen_Driver *screen_driver(); + public: // run time information about compile time configuration /** \defgroup cfg_gfx runtime graphics driver configuration */ /** @{ */ @@ -1002,51 +1008,30 @@ int main() { static void selection(Fl_Widget &owner, const char*, int len); static void paste(Fl_Widget &receiver); /** @} */ + + /** \defgroup fl_screen Screen functions fl global screen functions declared in <FL/Fl.H> @{ */ - // screen size: - /** Returns the leftmost x coordinate of the main screen work area. */ - static int x(); // platform dependent - /** Returns the topmost y coordinate of the main screen work area. */ - static int y(); // platform dependent - /** Returns the width in pixels of the main screen work area. */ - static int w(); // platform dependent - /** Returns the height in pixels of the main screen work area. */ - static int h(); // platform dependent + static int x(); // via screen driver + static int y(); // via screen driver + static int w(); // via screen driver + static int h(); // via screen driver // multi-head support: - static int screen_count(); - /** - Gets the bounding box of a screen that contains the mouse pointer. - \param[out] X,Y,W,H the corresponding screen bounding box - \see void screen_xywh(int &x, int &y, int &w, int &h, int mx, int my) - */ - static void screen_xywh(int &X, int &Y, int &W, int &H) { - int x, y; - Fl::get_mouse(x, y); - screen_xywh(X, Y, W, H, x, y); - } - static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my); - static void screen_xywh(int &X, int &Y, int &W, int &H, int n); - static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh); - static int screen_num(int x, int y); - static int screen_num(int x, int y, int w, int h); - static void screen_dpi(float &h, float &v, int n=0); - static void screen_work_area(int &X, int &Y, int &W, int &H, int mx, int my); - static void screen_work_area(int &X, int &Y, int &W, int &H, int n); - /** - Gets the bounding box of the work area of the screen that contains the mouse pointer. - \param[out] X,Y,W,H the work area bounding box - \see void screen_work_area(int &x, int &y, int &w, int &h, int mx, int my) - */ - static void screen_work_area(int &X, int &Y, int &W, int &H) { - int x, y; - Fl::get_mouse(x, y); - screen_work_area(X, Y, W, H, x, y); - } + static int screen_count(); // via screen driver + static void screen_xywh(int &X, int &Y, int &W, int &H); // via screen driver + static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my); // via screen driver + static void screen_xywh(int &X, int &Y, int &W, int &H, int n); // via screen driver + static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh); // via screen driver + static int screen_num(int x, int y); // via screen driver + static int screen_num(int x, int y, int w, int h); // via screen driver + static void screen_dpi(float &h, float &v, int n=0); // via screen driver + static void screen_work_area(int &X, int &Y, int &W, int &H, int mx, int my); // via screen driver + static void screen_work_area(int &X, int &Y, int &W, int &H, int n); // via screen driver + static void screen_work_area(int &X, int &Y, int &W, int &H); // via screen driver +/** @} */ - /** @} */ /** \defgroup fl_attributes Color & Font functions fl global color, font functions. |
