Commit d884552292543c5c232f2c390108a4fe895e6c8b

Authored by Perry Werneck
1 parent b6cbd6d6

PF & PA key actions now lives in libv3270.

src/objects/actions/lib3270/pakey.c
@@ -1,103 +0,0 @@ @@ -1,103 +0,0 @@
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 - * @brief Implement GAction "wrapper" for lib3270's PAs.  
32 - *  
33 - */  
34 -  
35 - #include "../private.h"  
36 - #include <v3270.h>  
37 - #include <v3270/actions.h>  
38 -  
39 - #define LIB3270_TYPE_PA_ACTION (Lib3270PaAction_get_type())  
40 - #define LIB3270_PA_ACTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), LIB3270_TYPE_PA_ACTION, Lib3270PaAction))  
41 - #define LIB3270_IS_PA_ACTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), LIB3270_TYPE_PA_ACTION))  
42 -  
43 - typedef struct _Lib3270PaActionClass {  
44 - V3270ActionClass parent_class;  
45 -  
46 - } Lib3270PaActionClass;  
47 -  
48 - typedef struct _Lib3270PaAction {  
49 - V3270Action parent;  
50 - } Lib3270PaAction;  
51 -  
52 - static void Lib3270PaAction_class_init(Lib3270PaActionClass *klass);  
53 - static void Lib3270PaAction_init(Lib3270PaAction *action);  
54 -  
55 - G_DEFINE_TYPE(Lib3270PaAction, Lib3270PaAction, V3270_TYPE_ACTION);  
56 -  
57 - static void activate(GAction *action, GVariant *parameter, GtkWidget *terminal) {  
58 -  
59 - if(action && terminal && parameter) {  
60 -  
61 - H3270 * hSession = v3270_get_session(terminal);  
62 -  
63 - if(g_variant_is_of_type(parameter, G_VARIANT_TYPE_INT32)) {  
64 -  
65 - lib3270_pakey(hSession,(int) g_variant_get_int32(parameter));  
66 -  
67 - } else if(g_variant_is_of_type(parameter, G_VARIANT_TYPE_UINT32)) {  
68 -  
69 - lib3270_pakey(hSession,(int) g_variant_get_uint32(parameter));  
70 -  
71 - } else if(g_variant_is_of_type(parameter, G_VARIANT_TYPE_INT16)) {  
72 -  
73 - lib3270_pakey(hSession,(int) g_variant_get_int16(parameter));  
74 -  
75 - } else if(g_variant_is_of_type(parameter, G_VARIANT_TYPE_UINT16)) {  
76 -  
77 - lib3270_pakey(hSession,(int) g_variant_get_uint16(parameter));  
78 -  
79 - }  
80 -  
81 - }  
82 -  
83 - }  
84 -  
85 - void Lib3270PaAction_class_init(Lib3270PaActionClass G_GNUC_UNUSED(*klass)) {  
86 - }  
87 -  
88 - void Lib3270PaAction_init(Lib3270PaAction *action) {  
89 -  
90 - static const LIB3270_PROPERTY info = {  
91 - .name = "pakey",  
92 - .group = LIB3270_ACTION_GROUP_ONLINE  
93 - };  
94 -  
95 - action->parent.activate = activate;  
96 - action->parent.info = &info;  
97 -  
98 - }  
99 -  
100 - GAction * v3270_pakey_action_new(void) {  
101 - return G_ACTION(g_object_new(LIB3270_TYPE_PA_ACTION, NULL));  
102 - }  
103 -  
src/objects/actions/lib3270/pfkey.c
@@ -1,103 +0,0 @@ @@ -1,103 +0,0 @@
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 - * @brief Implement GAction "wrapper" for lib3270's PFs.  
32 - *  
33 - */  
34 -  
35 - #include "../private.h"  
36 - #include <v3270.h>  
37 - #include <v3270/actions.h>  
38 -  
39 - #define LIB3270_TYPE_PF_ACTION (Lib3270PfAction_get_type())  
40 - #define LIB3270_PF_ACTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), LIB3270_TYPE_PF_ACTION, Lib3270PfAction))  
41 - #define LIB3270_IS_PF_ACTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), LIB3270_TYPE_PF_ACTION))  
42 -  
43 - typedef struct _Lib3270PfActionClass {  
44 - V3270ActionClass parent_class;  
45 -  
46 - } Lib3270PfActionClass;  
47 -  
48 - typedef struct _Lib3270PfAction {  
49 - V3270Action parent;  
50 - } Lib3270PfAction;  
51 -  
52 - static void Lib3270PfAction_class_init(Lib3270PfActionClass *klass);  
53 - static void Lib3270PfAction_init(Lib3270PfAction *action);  
54 -  
55 - G_DEFINE_TYPE(Lib3270PfAction, Lib3270PfAction, V3270_TYPE_ACTION);  
56 -  
57 - static void activate(GAction *action, GVariant *parameter, GtkWidget *terminal) {  
58 -  
59 - if(action && terminal && parameter) {  
60 -  
61 - H3270 * hSession = v3270_get_session(terminal);  
62 -  
63 - if(g_variant_is_of_type(parameter, G_VARIANT_TYPE_INT32)) {  
64 -  
65 - lib3270_pfkey(hSession,(int) g_variant_get_int32(parameter));  
66 -  
67 - } else if(g_variant_is_of_type(parameter, G_VARIANT_TYPE_UINT32)) {  
68 -  
69 - lib3270_pfkey(hSession,(int) g_variant_get_uint32(parameter));  
70 -  
71 - } else if(g_variant_is_of_type(parameter, G_VARIANT_TYPE_INT16)) {  
72 -  
73 - lib3270_pfkey(hSession,(int) g_variant_get_int16(parameter));  
74 -  
75 - } else if(g_variant_is_of_type(parameter, G_VARIANT_TYPE_UINT16)) {  
76 -  
77 - lib3270_pfkey(hSession,(int) g_variant_get_uint16(parameter));  
78 -  
79 - }  
80 -  
81 - }  
82 -  
83 - }  
84 -  
85 - void Lib3270PfAction_class_init(Lib3270PfActionClass G_GNUC_UNUSED(*klass)) {  
86 - }  
87 -  
88 - void Lib3270PfAction_init(Lib3270PfAction *action) {  
89 -  
90 - static const LIB3270_PROPERTY info = {  
91 - .name = "pfkey",  
92 - .group = LIB3270_ACTION_GROUP_ONLINE  
93 - };  
94 -  
95 - action->parent.activate = activate;  
96 - action->parent.info = &info;  
97 -  
98 - }  
99 -  
100 - GAction * v3270_pfkey_action_new(void) {  
101 - return G_ACTION(g_object_new(LIB3270_TYPE_PF_ACTION, NULL));  
102 - }  
103 -  
src/objects/actions/private.h
@@ -51,9 +51,6 @@ @@ -51,9 +51,6 @@
51 /* not really I18N-related, but also a string marker macro */ 51 /* not really I18N-related, but also a string marker macro */
52 #define I_(string) g_intern_static_string (string) 52 #define I_(string) g_intern_static_string (string)
53 53
54 - G_GNUC_INTERNAL GAction * v3270_pfkey_action_new(void);  
55 - G_GNUC_INTERNAL GAction * v3270_pakey_action_new(void);  
56 -  
57 G_GNUC_INTERNAL void pw3270_action_set_name(GAction *object, const gchar *name); 54 G_GNUC_INTERNAL void pw3270_action_set_name(GAction *object, const gchar *name);
58 55
59 G_GNUC_INTERNAL void pw3270_action_notify_enabled(GAction *action); 56 G_GNUC_INTERNAL void pw3270_action_notify_enabled(GAction *action);