Commit b0f3c1358f4b56b9e5e9a50fe1a5311b302f6fe7
1 parent
400cc160
Exists in
master
and in
1 other branch
Creating standard method to get the action table.
Showing
4 changed files
with
65 additions
and
2 deletions
Show diff stats
client/ipcclient.cbp
... | ... | @@ -42,6 +42,7 @@ |
42 | 42 | </Linker> |
43 | 43 | <Unit filename="../include/config.h.in" /> |
44 | 44 | <Unit filename="src/core/abstract.cc" /> |
45 | + <Unit filename="src/core/actions.cc" /> | |
45 | 46 | <Unit filename="src/core/attribute.cc" /> |
46 | 47 | <Unit filename="src/core/constants.cc" /> |
47 | 48 | <Unit filename="src/core/events.cc" /> | ... | ... |
... | ... | @@ -0,0 +1,55 @@ |
1 | +/* | |
2 | + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | |
3 | + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | |
4 | + * aplicativos mainframe. Registro no INPI sob o nome G3270. | |
5 | + * | |
6 | + * Copyright (C) <2008> <Banco do Brasil S.A.> | |
7 | + * | |
8 | + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | |
9 | + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | |
10 | + * Free Software Foundation. | |
11 | + * | |
12 | + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | |
13 | + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | |
14 | + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | |
15 | + * obter mais detalhes. | |
16 | + * | |
17 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | |
18 | + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | |
19 | + * St, Fifth Floor, Boston, MA 02110-1301 USA | |
20 | + * | |
21 | + * Este programa está nomeado como - e possui - linhas de código. | |
22 | + * | |
23 | + * Contatos: | |
24 | + * | |
25 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | |
26 | + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | |
27 | + * | |
28 | + */ | |
29 | + | |
30 | +/** | |
31 | + * @file src/os/linux/actions.cc | |
32 | + * | |
33 | + * @brief Implements methods for static action management. | |
34 | + * | |
35 | + * @author perry.werneck@gmail.com | |
36 | + * | |
37 | + */ | |
38 | + | |
39 | + #include <lib3270/ipc.h> | |
40 | + #include <lib3270/toggle.h> | |
41 | + | |
42 | +/*---[ Implement ]----------------------------------------------------------------------------------*/ | |
43 | + | |
44 | + std::vector<const LIB3270_ACTION *> TN3270::getActions() { | |
45 | + | |
46 | + std::vector<const LIB3270_ACTION *> actions; | |
47 | + | |
48 | + for(auto action = lib3270_get_actions(); action->name; action++) { | |
49 | + actions.push_back(action); | |
50 | + } | |
51 | + | |
52 | + return actions; | |
53 | + | |
54 | + } | |
55 | + | ... | ... |
client/src/core/linux/attribute.cc
... | ... | @@ -42,7 +42,7 @@ |
42 | 42 | |
43 | 43 | /*---[ Implement ]----------------------------------------------------------------------------------*/ |
44 | 44 | |
45 | - std::vector<const LIB3270_PROPERTY *> TN3270::getAttributes() noexcept { | |
45 | + std::vector<const LIB3270_PROPERTY *> TN3270::getAttributes() { | |
46 | 46 | |
47 | 47 | std::vector<const LIB3270_PROPERTY *> attributes; |
48 | 48 | ... | ... |
client/src/include/lib3270/ipc.h
... | ... | @@ -37,6 +37,7 @@ |
37 | 37 | #include <functional> |
38 | 38 | #include <lib3270.h> |
39 | 39 | #include <lib3270/keyboard.h> |
40 | + #include <lib3270/actions.h> | |
40 | 41 | |
41 | 42 | #if defined(_WIN32) |
42 | 43 | |
... | ... | @@ -90,7 +91,13 @@ |
90 | 91 | * @brief Get list of attributes. |
91 | 92 | * |
92 | 93 | */ |
93 | - TN3270_PUBLIC std::vector<const LIB3270_PROPERTY *> getAttributes() noexcept; | |
94 | + TN3270_PUBLIC std::vector<const LIB3270_PROPERTY *> getAttributes(); | |
95 | + | |
96 | + /** | |
97 | + * @brief Get list of actions. | |
98 | + * | |
99 | + */ | |
100 | + TN3270_PUBLIC std::vector<const LIB3270_ACTION *> getActions(); | |
94 | 101 | |
95 | 102 | class TN3270_PUBLIC Event { |
96 | 103 | public: | ... | ... |