diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-11-07 06:49:40 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-11-07 06:49:40 +0100 |
| commit | 37bf3835b0b3ce7f4c80924f40735698f057ef6f (patch) | |
| tree | 5862a10eef97cf3575bfe55b2f29fc5a79ae3270 /src/Fl_Screen_Driver.H | |
| parent | b663e272e7f39063a5c1bf744038ded0a7566990 (diff) | |
Create class Fl_Unix_Screen_Driver used by X11 and Wayland platforms
Diffstat (limited to 'src/Fl_Screen_Driver.H')
| -rw-r--r-- | src/Fl_Screen_Driver.H | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/src/Fl_Screen_Driver.H b/src/Fl_Screen_Driver.H index 3047aedc5..7ccbc67e9 100644 --- a/src/Fl_Screen_Driver.H +++ b/src/Fl_Screen_Driver.H @@ -70,12 +70,40 @@ public: static char bg2_set; static char fg_set; static Fl_System_Driver *system_driver; + // These flags are useful after calling XParseGeometry(). They indicate which of its + // arguments contain meaningful data upon return. + static const int fl_NoValue; + static const int fl_WidthValue; + static const int fl_HeightValue; + static const int fl_XValue; + static const int fl_YValue; + static const int fl_XNegative; + static const int fl_YNegative; + // key_table and key_table_size are used in fl_shortcut to translate key names + struct Keyname { + unsigned int key; + const char* name; + } *key_table; + int key_table_size; virtual float scale(int) { return 1; } virtual void scale(int /*n*/, float /*f*/) {} static Fl_Screen_Driver *newScreenDriver(); - // --- display management - virtual void display(const char *disp); + // implement to process the -display argument and support the DISPLAY env var + virtual void display(const char *) { } + // default implementation should be enough + virtual int XParseGeometry(const char* string, int* x, int* y, unsigned int* width, unsigned int* height); + // the default implementation is most probably enough + virtual void own_colormap() {} + // the default implementation of shortcut_add_key_name() is in src/fl_shortcut.cxx + virtual const char *shortcut_add_key_name(unsigned key, char *p, char *buf, const char **); + // whether a platform uses additional code in Fl_Menu::handle_part1(int e) + virtual int need_menu_handle_part1_extra() {return 0;} + // whether a platform uses additional code in Fl_Menu::handle(int e) + virtual int need_menu_handle_part2() {return 0;} + // implement functions telling whether a key is pressed + virtual int event_key(int) {return 0;} + virtual int get_key(int) {return 0;} virtual int visual(int flags); // --- screen configuration virtual void init() {} |
