Mercurial > octave
annotate libinterp/corefcn/display.h @ 29960:939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
In files with both OCTAVE_NAMESPACE_BEGIN/END and "namespace octave"
blocks, merge adjacent blocks. Use the macros in place of "namespace
octave" in affected files and the corresponding header files.
Files affected: call-stack.cc, call-stack.h, defaults.cc, defaults.h,
defun-int.h, display.cc, display.h, environment.cc, environment.h,
error.cc, error.h, event-manager.cc, event-manager.h, fcn-info.cc,
fcn-info.h, help.cc, help.h, input.cc, input.h, interpreter.cc,
interpreter.h, load-path.cc, load-path.h, load-save.cc, load-save.h,
oct-hist.cc, oct-hist.h, pager.cc, pager.h, settings.cc, settings.h,
sighandlers.cc, sighandlers.h, symtab.cc, symtab.h, sysdep.cc,
sysdep.h, utils.cc, utils.h, __ode15__.cc, gzip.cc, ov-fcn-handle.cc,
ov-fcn-handle.h, ov-java.cc, ov-java.h, ov-typeinfo.cc, ov-typeinfo.h,
ov.cc, ov.h, octave.cc, octave.h, lex.ll, oct-parse.yy, profiler.cc,
profiler.h, pt-eval.cc, and pt-eval.h.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 14 Aug 2021 21:50:26 -0400 |
parents | 0a5b15007766 |
children | 796f54d4ddbf |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
29358
0a5b15007766
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
3 // Copyright (C) 2009-2021 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
8561
66165de2cc42
add new files for previous changeset
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
26 #if ! defined (octave_display_h) |
8561
66165de2cc42
add new files for previous changeset
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
27 #define octave_display_h 1 |
66165de2cc42
add new files for previous changeset
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20947
diff
changeset
|
29 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20947
diff
changeset
|
30 |
20947
ecb95c6384f2
backout changeset e74e617060cf
John W. Eaton <jwe@octave.org>
parents:
20924
diff
changeset
|
31 #include <string> |
17828
6b787e274eb1
make -q suppress no graphical display startup message (bug #38937)
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
32 |
20947
ecb95c6384f2
backout changeset e74e617060cf
John W. Eaton <jwe@octave.org>
parents:
20924
diff
changeset
|
33 class Matrix; |
8561
66165de2cc42
add new files for previous changeset
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
34 |
29960
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
35 OCTAVE_NAMESPACE_BEGIN |
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
36 |
27266
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
37 class display_info |
17828
6b787e274eb1
make -q suppress no graphical display startup message (bug #38937)
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
38 { |
23746
7f176909ab86
move display_info class inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
39 public: |
7f176909ab86
move display_info class inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
40 |
27266
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
41 // Create object with default values. To be useful, you must call |
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
42 // initialize to find the actual system parameters for the given |
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
43 // display. |
23746
7f176909ab86
move display_info class inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
44 |
27266
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
45 display_info (void) |
27275
1565c39aa940
don't show display warning in display_info initialization (bug #56651)
John W. Eaton <jwe@octave.org>
parents:
27266
diff
changeset
|
46 : m_rx (72), m_ry (72), m_ht (1), m_wd (1), m_dp (0), |
1565c39aa940
don't show display warning in display_info initialization (bug #56651)
John W. Eaton <jwe@octave.org>
parents:
27266
diff
changeset
|
47 m_dpy_avail (false), m_msg () |
27266
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
48 { } |
13983
7dd7cccf0757
clean up memory allocated for singletons before exit
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
49 |
27266
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
50 ~display_info (void) = default; |
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
51 |
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
52 display_info (const display_info&) = default; |
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
53 |
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
54 display_info& operator = (const display_info&) = default; |
23746
7f176909ab86
move display_info class inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
55 |
27266
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
56 void initialize (void); |
8561
66165de2cc42
add new files for previous changeset
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
57 |
27266
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
58 double x_dpi (void) const { return m_rx; } |
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
59 |
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
60 double y_dpi (void) const { return m_ry; } |
8561
66165de2cc42
add new files for previous changeset
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
61 |
27266
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
62 int height (void) const { return m_ht; } |
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
63 |
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
64 int width (void) const { return m_wd; } |
15160
973296940c89
don't start GUI if display is not available
John W. Eaton <jwe@octave.org>
parents:
15096
diff
changeset
|
65 |
27266
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
66 int depth (void) const { return m_dp; } |
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
67 |
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
68 bool display_available (void) const { return m_dpy_avail; } |
17828
6b787e274eb1
make -q suppress no graphical display startup message (bug #38937)
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
69 |
27275
1565c39aa940
don't show display warning in display_info initialization (bug #56651)
John W. Eaton <jwe@octave.org>
parents:
27266
diff
changeset
|
70 std::string message (void) const { return m_msg; } |
1565c39aa940
don't show display warning in display_info initialization (bug #56651)
John W. Eaton <jwe@octave.org>
parents:
27266
diff
changeset
|
71 |
23746
7f176909ab86
move display_info class inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
72 private: |
7f176909ab86
move display_info class inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
73 |
27266
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
74 // X- and Y- Resolution of the display in dots (pixels) per inch. |
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
75 double m_rx; |
596312d4f25d
don't use singleton pattern for display_info class
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
76 double m_ry; |
8561
66165de2cc42
add new files for previous changeset
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
77 |
23746
7f176909ab86
move display_info class inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
78 // Height, width, and depth of the display. |
7f176909ab86
move display_info class inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
79 int m_ht; |
7f176909ab86
move display_info class inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
80 int m_wd; |
7f176909ab86
move display_info class inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
81 int m_dp; |
8561
66165de2cc42
add new files for previous changeset
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
82 |
23746
7f176909ab86
move display_info class inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
83 bool m_dpy_avail; |
27275
1565c39aa940
don't show display warning in display_info initialization (bug #56651)
John W. Eaton <jwe@octave.org>
parents:
27266
diff
changeset
|
84 |
1565c39aa940
don't show display warning in display_info initialization (bug #56651)
John W. Eaton <jwe@octave.org>
parents:
27266
diff
changeset
|
85 // Message associated with any initiailization failure. Set if |
1565c39aa940
don't show display warning in display_info initialization (bug #56651)
John W. Eaton <jwe@octave.org>
parents:
27266
diff
changeset
|
86 // m_dpy_avail is false. |
1565c39aa940
don't show display warning in display_info initialization (bug #56651)
John W. Eaton <jwe@octave.org>
parents:
27266
diff
changeset
|
87 std::string m_msg; |
23746
7f176909ab86
move display_info class inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23220
diff
changeset
|
88 }; |
29960
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
89 |
939bef0b66e0
merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
90 OCTAVE_NAMESPACE_END |
8561
66165de2cc42
add new files for previous changeset
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
91 |
66165de2cc42
add new files for previous changeset
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
92 #endif |