Commit graph

35 commits

Author SHA1 Message Date
Benoît Minisini
415de7b257 Update configuration files to autoconf 2.71.
[CONFIGURATION]
* NEW: Update configuration files to autoconf 2.71.
2022-09-03 13:24:51 +02:00
Helmut Grohne
cc50a31fbd Use the host architecture pkg-config
gambas3 fails to cross build from source, because it hard codes the
build architecture pkg-config in various places and thus fails finding
required components that are only installed for the host architecture.

Employ PKG_PROG_PKG_CONFIG to discover the host architecture pkg-config
and let the build proceed quite a bit further.

[GB.NCURSES]
* Use the host architecture pkg-config

[GB.PDF]
* Use the host architecture pkg-config

[GB.QT4]
* Use the host architecture pkg-config

[GB.QT5]
* Use the host architecture pkg-config
2022-03-31 22:40:31 +02:00
Tobias Boege
df5022e383 gb.ncurses: allow stepping out of and into ncurses mode
[GB.NCURSES]
* NEW: Screen.Suspend and Screen.Resume are two new methods which
  allow to temporarily leave ncurses mode, restoring the original
  tty settings, and to come back, restoring ncurses's tty settings
  and screen content.
2021-01-04 17:16:23 +01:00
Tobias Boege
ab26124aa4 Search for wide-character ncurses when configuring
[CONFIGURATION]
* BUG: gb.ncurses now compiles on systems which only provide wide-character versions of ncurses pkg-config files.
2020-04-08 17:58:55 +02:00
Laurent Carlier
f1deb8e330 Remove register keyword, deprecated, now reserved keyword with C++17
Fixes "warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]"
with clang

https://en.cppreference.com/w/cpp/keyword/register
2019-10-30 06:53:09 +00:00
gambas
8d7e08cdfe Handle the new error hook.
[GB.NCURSES]
* BUG: Handle the new error hook.
2019-09-17 10:19:08 +02:00
Tobias Boege
1b66fb3373 gb.ncurses: Fix wrong colors when setting Window.{Pen,Paper}
[GB.NCURSES]
* BUG: Do not OR the window's attr_t into the background chtype in wbkgd(), the background itself has no attributes.
2018-11-14 23:20:13 +01:00
Tobias Boege
0b439f2279 gb.ncurses: Silence compiler warnings
[GB.NCURSES]
* BUG: Silence compiler warnings
2018-11-14 23:19:25 +01:00
bgermann
bb8106cebd Fix local variable conflict for older compilers
[GB.NCURSES]
* Fix local variable conflict for older compilers
2018-08-29 19:50:41 +02:00
Bastian Germann
b6a00614ef Changes to the build system 2018-08-29 01:11:22 +00:00
bgermann
8b4eec26f4 Find 5 components' dependencies via pkg-config
[GB.COMPRESS.ZLIB]
* NEW: Find dependency via pkg-config

[GB.DB.SQLITE2]
* NEW: Find dependency via pkg-config

[GB.NCURSES]
* NEW: Find dependency via pkg-config

[GB.PCRE]
* NEW: Find dependency via pkg-config

[GB.SDL.SOUND]
* NEW: Find dependency via pkg-config
2018-08-24 23:50:47 +02:00
Laurent Carlier
8dc6679530 Remove 'missing' file ,generated by autotools, from the repository 2017-08-13 16:13:06 +02:00
Benoît Minisini
82eddfd5c9 [CONFIGURATION]
* NEW: Remove all 'depcomp' files. Apparently they are not used anymore by autoconf.

[INTERPRETER]
* BUG: Fix some gcc 6 warnings.

[GB.DEBUG]
* BUG: Fix some gcc 6 warnings.

[GB.GTK]
* BUG: Fix some gcc 6 warnings.
* BUG: Fix a ';' mistake in a focus management test.

[GB.GTK3]
* BUG: Fix some gcc 6 warnings.
* BUG: Fix a ';' mistake in a focus management test.

[GB.IMAGE]
* BUG: Fix some gcc 6 warnings.


git-svn-id: svn://localhost/gambas/trunk@8101 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2017-02-18 17:24:01 +00:00
Tobias Boege
1afd7010c6 [GB.NCURSES]
* NEW: Screen.Beep() is a new method which makes an audible beep
* NEW: Screen.Flash() produces a visual flash on the screen
* BUG: Fix Window.ReadLine(): getnstr() doesn't return the input length



git-svn-id: svn://localhost/gambas/trunk@7190 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2015-07-29 19:32:45 +00:00
Tobias Boege
21723bfe69 [GB.NCURSES]
* BUG: Add GB_END_DECLARE to the Input class to not crash anymore (on
  cygwin only?). Reported by Nigel Gerrard.



git-svn-id: svn://localhost/gambas/trunk@6248 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-04-24 11:50:59 +00:00
Benoît Minisini
5e76433eeb [CONFIGURATION]
* NEW: Do not use deprecated autoconf macros anymore.
* NEW: The version information is now located in the 'version.m4' file in
  the source root directory.


git-svn-id: svn://localhost/gambas/trunk@6230 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-04-05 21:22:43 +00:00
Tobias Boege
f24c9c7f3a [GB.NCURSES]
* BUG: Reset the "watched fd" variable when a watch ends.



git-svn-id: svn://localhost/gambas/trunk@6135 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-02-05 16:27:23 +00:00
Tobias Boege
75f6bda782 [GB.NCURSES]
* NEW: Add Key.Esc constant to catch escape key (without needing to know
  that it's ASCII 0x1b).



git-svn-id: svn://localhost/gambas/trunk@6133 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-02-04 20:02:50 +00:00
Tobias Boege
f4c1e52c6d [GB.NCURSES]
* BUG: Initialise the Screen singleton's properties.



git-svn-id: svn://localhost/gambas/trunk@6132 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-02-04 19:42:05 +00:00
Tobias Boege
b598d4d94a [GB.NCURSES]
* BUG: Respect Window.Attributes when changing Window.{Fore,Back}ground.



git-svn-id: svn://localhost/gambas/trunk@6131 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-02-04 18:37:29 +00:00
Tobias Boege
3602e25387 [GB.NCURSES]
* BUG: Window.Ask() now returns the chosen letter (and not its index) as
  it's documented and ought to be (returning the index does not ease
  translation very much but makes program flow much less obvious).

[EXAMPLES]
* NEW: Pong: Update uses of Window.Ask().



git-svn-id: svn://localhost/gambas/trunk@6130 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-02-04 16:48:54 +00:00
Tobias Boege
30944fa8eb [GB.NCURSES]
* BUG: The signature of Screen.Resize() allows arguments now



git-svn-id: svn://localhost/gambas/trunk@5654 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2013-05-12 14:59:07 +00:00
Tobias Boege
587d286f89 [GB.NCURSES]
* NEW: Omitting the optional 'Attr' and 'Pair' parameters to Window.Print()
  now indicates to use the window settings instead of no attributes and
  default colour



git-svn-id: svn://localhost/gambas/trunk@5626 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2013-04-30 11:04:01 +00:00
Tobias Boege
5c640cd4d4 [GB.NCURSES]
* NEW: Allow to apply attributes and colours to a particular
  Window.Print{,Center}()
* NEW: Change Window.Attributes into a bitmask (Integer)
* NEW: .Window.Attrs isn't anymore. The Attr static class now provides
  OR-able constants to assign to Window.Attributes. .Char.Attrs, however,
  remains a virtual object to manage attributes on a per character basis
* NEW: Provide Window.Pair to set the colour pair for all *subsequent*
  writes, as opposed to Foreground and Background which set the colours
  of all that is and will be

[EXAMPLES]
* NEW: Pong: Use gb.ncurses improvements



git-svn-id: svn://localhost/gambas/trunk@5625 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2013-04-30 10:57:44 +00:00
Tobias Boege
cf20462abc [GB.NCURSES]
* BUG: Input: Comment all NoDelay related stuff out
* BUG: Window: PrintCenter() handles empty lines now
* NEW: Pair: Allocate all pairs at initialisation and inhibit any change to
  them. Array accessors can be used to get the pair number for a given
  fore-/background combination
* NEW: Window: Rewrite the Window class
* NEW: Remove the Insert() method
* NEW: Remove .Window.Attrs' Color property
* NEW: BorderFrame is an optional argument to the constructor (default True)
  to specify if there shall be a border frame around the window setting the
  border apart from the content
* NEW: Ask() returns the choice number to ease translation
* NEW: Ask() supports a default choice in upper case
* NEW: Make Read event work
* NEW: Screen: Rewrite it mostly (is a static class again)
* NEW: Remove Read event
* NEW: Make Resize event work
* NEW: Rename .Cols and .Lines to .Width resp. .Height
* NEW: Declare gb.ncurses "Unfinished"
* OPT: Tidy up sources
* OPT: Window: Use werase() instead of wclear() to clear

[EXAMPLES]
* NEW: Add 'Pong' in the Games section



git-svn-id: svn://localhost/gambas/trunk@5543 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2013-02-10 20:06:36 +00:00
Tobias Boege
0a4dd6f9d2 [GB.NCURSES]
* NEW: Add ReadLine() function to Window that does the same as ncurses
  getstr(3X) but usable in all input modes
* NEW: Encapsulate Input, Cursor and Border modes into static objects
* NEW: Tidy up Color class in various places
* NEW: Specifiying color values is now done via floats instead of ints
* NEW: Remove ContainerW and ContainerH (and corresponding long forms)
  properties from Window class. It is always .Width/.Height + 2
* NEW: Rename Input.Repeater to Input.RepeatDelay
* OPT: Remove unnecessary ncurses input mode changes
* OPT: Tidy up Input and Screen code
* OPT: Reduce useless calls to input queue read callback in Screen class
* BUG: Add constant for already implemented "very visible" cursor mode
* BUG: Use opaque input module in Window.Ask()
* BUG: Note that NoDelay and Window/Screen events still not work



git-svn-id: svn://localhost/gambas/trunk@4827 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-06-13 15:47:00 +00:00
Tobias Boege
31cdd37ebd [GB.NCURSES]
* NEW: Move .Buffered and .Refresh() from Window to Screen class as Screen
  reflects better that these routines affect the entire screen
* NEW: Window has a Caption property to display a caption within the border
  frame; only visible when the Window has a border
* NEW: Add NoDelay input mode to Screen class (for use with caution and a
  true tty). This mode lets the programmer artifically set the keyboard
  repeat delay for the program (beware: still broken)
* NEW: Add IsConsole property to check if one can enter NoDelay mode
* NEW: Add Repeater property to Screen to specify keyboard repeat
  delay. This specifies the minimum interval of sucessively risen Read
  events and Window.Read() calls
* NEW: Rename Window.WaitKey() to .Read()
* NEW: Rename Window.Bottom() to .Lower() and .Top() to .Raise()
* NEW: Add very-visible mode for cursor, according to ncurses doc
* NEW: Window class has a new optional parameter to specify the parent
  Screen, if none given, the currently active Screen is used.
* NEW: Window class does not get a default event name anymore. If the Read
  event is risen and the active Window cannot raise events, the parent
  Screen raises it (beware: still broken)
* NEW: Window.Border is an integer, new constants .None, .ASCII, .ACS to
  choose the border look
* NEW: Cursor resides on the new location after Window.Print() now
* OPT: Remove redundant wrapping code in Print function because ncurses
  waddch() does this by itself
* OPT: Stream inheritance entirely useless due to future ReadLine()
  function, hence it was removed
* OPT: Remove NCurses class, it contained only component-global routines
  that were moved to main module
* BUG: Turning off attributes with the Normal attribute now works
* BUG: Changes on color attributes (also on color pairs) are immediately
  visible now
* BUG: Fix string argument handling in Window.Ask(), .Insert(), .Print() and
  .PrintCenter()
* BUG: Newline to Window.Print() really works now and gives the desired
  effect of not returning to x=0 on the next line (like ncurses does)



git-svn-id: svn://localhost/gambas/trunk@4778 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-05-25 21:09:17 +00:00
Benoît Minisini
8ad1afe673 [CONFIGURATION]
* NEW: Print disabled components individually.

[GB.QT4]
* BUG: ComboBox background color is correctly handled now.


git-svn-id: svn://localhost/gambas/trunk@4739 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-05-18 01:19:15 +00:00
Benoît Minisini
e2fac79ffb [CONFIGURATION]
* NEW: Replace the old "INCLUDES" directive by "xxx_CPPFLAGS" in all 
  Makefile.am files.

[GB.XML]
* BUG: Remove debugging flags from compilation flags.


git-svn-id: svn://localhost/gambas/trunk@4714 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-05-04 16:45:14 +00:00
Tobias Boege
492de27fda [GB.NCURSES]
* NEW: Window class now inherits Stream
* NEW: Renamed Window.Flush() to Window.Drain() to not have it confused
  with the stream Flush instruction
* NEW: Window.Background and .Foreground properties now work
* NEW: Window.Attributes.Color changed internal behaviour to interoperate
  with .Background and .Foreground properties
* NEW: Now using ncurses extensions to colour support
* BUG: Corrected typo in ContainerW property name



git-svn-id: svn://localhost/gambas/trunk@4700 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-04-30 20:31:35 +00:00
Tobias Boege
07e789c365 [GB.NCURSES]
* NEW: Added Color static class
* NEW: Added color support to Window class
* NEW: Window class now auto-creates a full-screen window
* NEW: Added Screen class for future use
* NEW: Moved symbols from NCurses to Screen where they belong now
* NEW: Key class supports array accessors as other Key classes do
* OPT: Drawing ASCII border if no alternate charset is supported
* BUG: Window.Print handles multiple lines correctly now
* BUG: Fixed Border problems with full-screen windows
* BUG: Fixed exchanged x,y parameters in resize internal function
* BUG: Fixed cursor mislead in internal function to copy window contents



git-svn-id: svn://localhost/gambas/trunk@4643 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-04-20 20:40:56 +00:00
Benoît Minisini
d04b80c7f5 [GB.NCURSES]
* NEW: Start implementing a Screen static class that is like a Window 
  representing the full screen.


git-svn-id: svn://localhost/gambas/trunk@4636 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-04-15 23:47:38 +00:00
Tobias Boege
e770acc969 [GB.NCURSES]
* NEW: Added Key static class containing key constants
* NEW: Buffered property in Window class to allow buffered output
* NEW: Refresh method in Window class to produce output if Buffered property
  was set
* NEW: Flush method in Window class to clear the input queue
* NEW: Ask method in Window class to prompt the user for specific keys
* NEW: PrintCenter method in Window class to print text in the centre of the
  screen
* NEW: Window array accessors now used to change character attributes
* OPT: Standard input is watched only once
* BUG: Inserted missing return statement when reading Window.Border



git-svn-id: svn://localhost/gambas/trunk@4627 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-04-14 19:42:04 +00:00
Benoît Minisini
643d230193 [GB.NCURSES]
* BUG: Do not call refresh routines when endwin() has already been called.
* NEW: Add an error hook that calls endwin() so that the terminal is reset
  and the error message is visible.


git-svn-id: svn://localhost/gambas/trunk@4622 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-04-13 22:11:24 +00:00
Tobias Boege
572d7aa9e4 [GB.NCURSES]
* NEW: Created gb.ncurses component
* NEW: Added NCurses static class
* NEW: Added Window class



git-svn-id: svn://localhost/gambas/trunk@4621 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-04-13 15:16:23 +00:00