Commit 6d45259a90ca36c2f8e91f0d1ef2f7a34b38cba2
1 parent
3b31110c
Exists in
master
and in
4 other branches
Implementing abstract action object.
Showing
6 changed files
with
122 additions
and
1 deletions
Show diff stats
@@ -0,0 +1,49 @@ | @@ -0,0 +1,49 @@ | ||
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 | + #include "private.h" | ||
31 | + | ||
32 | + static void pw3270_action_iface_init(GActionInterface *iface); | ||
33 | + static void pw3270_action_class_init(pw3270ActionClass *klass); | ||
34 | + static void pw3270_action_init(pw3270Action *action); | ||
35 | + | ||
36 | + G_DEFINE_TYPE_WITH_CODE(pw3270Action, pw3270_action, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(G_TYPE_ACTION, pw3270_action_iface_init)) | ||
37 | + | ||
38 | + void pw3270_action_iface_init(GActionInterface *iface) { | ||
39 | + | ||
40 | + } | ||
41 | + | ||
42 | + void pw3270_action_class_init(pw3270ActionClass *klass) { | ||
43 | + | ||
44 | + } | ||
45 | + | ||
46 | + void pw3270_action_init(pw3270Action *action) { | ||
47 | + | ||
48 | + } | ||
49 | + |
src/actions/actions.cbp
@@ -39,7 +39,13 @@ | @@ -39,7 +39,13 @@ | ||
39 | <Add option="`pkg-config --libs gio-2.0 glib-2.0 lib3270 libv3270`" /> | 39 | <Add option="`pkg-config --libs gio-2.0 glib-2.0 lib3270 libv3270`" /> |
40 | </Linker> | 40 | </Linker> |
41 | <Unit filename="../include/pw3270/actions.h" /> | 41 | <Unit filename="../include/pw3270/actions.h" /> |
42 | + <Unit filename="abstract.c"> | ||
43 | + <Option compilerVar="CC" /> | ||
44 | + </Unit> | ||
42 | <Unit filename="private.h" /> | 45 | <Unit filename="private.h" /> |
46 | + <Unit filename="testprogram/testprogram.c"> | ||
47 | + <Option compilerVar="CC" /> | ||
48 | + </Unit> | ||
43 | <Extensions> | 49 | <Extensions> |
44 | <code_completion /> | 50 | <code_completion /> |
45 | <envvars /> | 51 | <envvars /> |
src/actions/private.h
@@ -43,4 +43,16 @@ | @@ -43,4 +43,16 @@ | ||
43 | #include <pw3270/actions.h> | 43 | #include <pw3270/actions.h> |
44 | #include <lib3270/log.h> | 44 | #include <lib3270/log.h> |
45 | 45 | ||
46 | + struct _pw3270Action { | ||
47 | + GObject parent; | ||
48 | + | ||
49 | + }; | ||
50 | + | ||
51 | + struct _pw3270ActionClass { | ||
52 | + | ||
53 | + GObject parent_class; | ||
54 | + | ||
55 | + | ||
56 | + }; | ||
57 | + | ||
46 | #endif // PRIVATE_H_INCLUDED | 58 | #endif // PRIVATE_H_INCLUDED |
@@ -0,0 +1,45 @@ | @@ -0,0 +1,45 @@ | ||
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. Registro no INPI sob | ||
5 | + * o nome G3270. | ||
6 | + * | ||
7 | + * Copyright (C) <2008> <Banco do Brasil S.A.> | ||
8 | + * | ||
9 | + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
10 | + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
11 | + * Free Software Foundation. | ||
12 | + * | ||
13 | + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
14 | + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
15 | + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
16 | + * obter mais detalhes. | ||
17 | + * | ||
18 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
19 | + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | ||
20 | + * St, Fifth Floor, Boston, MA 02110-1301 USA | ||
21 | + * | ||
22 | + * Este programa está nomeado como testprogram.c e possui - linhas de código. | ||
23 | + * | ||
24 | + * Contatos: | ||
25 | + * | ||
26 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
27 | + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | ||
28 | + * | ||
29 | + */ | ||
30 | + | ||
31 | + #include <config.h> | ||
32 | + #include <pw3270/actions.h> | ||
33 | + #include <lib3270/log.h> | ||
34 | + | ||
35 | + /*---[ Implement ]----------------------------------------------------------------------------------*/ | ||
36 | + | ||
37 | + int main (int argc, char **argv) { | ||
38 | + | ||
39 | + | ||
40 | + return 0; | ||
41 | + | ||
42 | + } | ||
43 | + | ||
44 | + | ||
45 | + |
src/include/pw3270/actions.h
@@ -42,6 +42,15 @@ | @@ -42,6 +42,15 @@ | ||
42 | 42 | ||
43 | G_BEGIN_DECLS | 43 | G_BEGIN_DECLS |
44 | 44 | ||
45 | + #define PW3270_TYPE_ACTION (pw3270_action_get_type ()) | ||
46 | + | ||
47 | +// #define PW3270_ACTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), PW3270_TYPE_ACTION, pw3270Action)) | ||
48 | +// #define PW3270_IS_ACTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), PW3270_TYPE_ACTION)) | ||
49 | + | ||
50 | + typedef struct _pw3270Action pw3270Action; | ||
51 | + typedef struct _pw3270ActionClass pw3270ActionClass; | ||
52 | + | ||
53 | + GType pw3270_action_get_type(void) G_GNUC_CONST; | ||
45 | 54 | ||
46 | G_END_DECLS | 55 | G_END_DECLS |
47 | 56 |
src/include/pw3270/toolbar.h
@@ -42,7 +42,7 @@ | @@ -42,7 +42,7 @@ | ||
42 | 42 | ||
43 | G_BEGIN_DECLS | 43 | G_BEGIN_DECLS |
44 | 44 | ||
45 | - #define PW3270_TYPE_TOOLBAR (pw3270ToolBar_get_type ()) | 45 | + #define PW3270_TYPE_TOOLBAR (pw3270ToolBar_get_type()) |
46 | #define PW3270_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PW3270_TYPE_TOOLBAR, pw3270ToolBar)) | 46 | #define PW3270_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PW3270_TYPE_TOOLBAR, pw3270ToolBar)) |
47 | #define PW3270_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PW3270_TYPE_TOOLBAR, pw3270ToolBarClass)) | 47 | #define PW3270_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PW3270_TYPE_TOOLBAR, pw3270ToolBarClass)) |
48 | #define PW3270_IS_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PW3270_TYPE_TOOLBAR)) | 48 | #define PW3270_IS_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PW3270_TYPE_TOOLBAR)) |