From 347ab41628cd47e996663d47244749d2d9fa1ea7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 13 Jan 2012 16:48:52 +0100 Subject: Moving things into a shared header --- tests/dummy-indicator-entry-func.h | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/dummy-indicator-entry-func.h (limited to 'tests/dummy-indicator-entry-func.h') diff --git a/tests/dummy-indicator-entry-func.h b/tests/dummy-indicator-entry-func.h new file mode 100644 index 0000000..1134ee7 --- /dev/null +++ b/tests/dummy-indicator-entry-func.h @@ -0,0 +1,52 @@ +/* +Test for libindicator + +Copyright 2012 Canonical Ltd. + +Authors: + Ted Gould + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +version 3.0 as published by the Free Software Foundation. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License version 3.0 for more details. + +You should have received a copy of the GNU General Public +License along with this library. If not, see +. +*/ + +#ifndef __DUMMY_INDICATOR_ENTRY_FUNC__ +#define __DUMMY_INDICATOR_ENTRY_FUNC__ + +#include +#include + +#include "libindicator/indicator.h" +#include "libindicator/indicator-object.h" + +G_BEGIN_DECLS + +#define DUMMY_INDICATOR_ENTRY_FUNC_TYPE (dummy_indicator_entry_func_get_type ()) +#define DUMMY_INDICATOR_ENTRY_FUNC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DUMMY_INDICATOR_ENTRY_FUNC_TYPE, DummyIndicatorEntryFunc)) +#define DUMMY_INDICATOR_ENTRY_FUNC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DUMMY_INDICATOR_ENTRY_FUNC_TYPE, DummyIndicatorEntryFuncClass)) +#define IS_DUMMY_INDICATOR_ENTRY_FUNC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DUMMY_INDICATOR_ENTRY_FUNC_TYPE)) +#define IS_DUMMY_INDICATOR_ENTRY_FUNC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DUMMY_INDICATOR_ENTRY_FUNC_TYPE)) +#define DUMMY_INDICATOR_ENTRY_FUNC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DUMMY_INDICATOR_ENTRY_FUNC_TYPE, DummyIndicatorEntryFuncClass)) + +typedef struct _DummyIndicatorEntryFunc DummyIndicatorEntryFunc; +typedef struct _DummyIndicatorEntryFuncClass DummyIndicatorEntryFuncClass; + +struct _DummyIndicatorEntryFuncClass { + IndicatorObjectClass parent_class; +}; + +struct _DummyIndicatorEntryFunc { + IndicatorObject parent; +}; + +#endif /* __DUMMY_INDICATOR_ENTRY_FUNC__ */ -- cgit v1.2.3 From 530b2112773545b4449879ef45118e1469946a22 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 13 Jan 2012 16:52:42 +0100 Subject: Adding some public values to know if functions were called --- tests/dummy-indicator-entry-func.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/dummy-indicator-entry-func.h') diff --git a/tests/dummy-indicator-entry-func.h b/tests/dummy-indicator-entry-func.h index 1134ee7..f5c8264 100644 --- a/tests/dummy-indicator-entry-func.h +++ b/tests/dummy-indicator-entry-func.h @@ -47,6 +47,10 @@ struct _DummyIndicatorEntryFuncClass { struct _DummyIndicatorEntryFunc { IndicatorObject parent; + + gboolean entry_activate_called; + gboolean entry_activate_window_called; + gboolean entry_close_called; }; #endif /* __DUMMY_INDICATOR_ENTRY_FUNC__ */ -- cgit v1.2.3 From 2dfe3fff249cd22eea6a993dc5ec50b129d961f1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sat, 14 Jan 2012 10:51:55 +0100 Subject: Add a function to swap out the window entry handler --- tests/dummy-indicator-entry-func.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/dummy-indicator-entry-func.h') diff --git a/tests/dummy-indicator-entry-func.h b/tests/dummy-indicator-entry-func.h index f5c8264..d22abed 100644 --- a/tests/dummy-indicator-entry-func.h +++ b/tests/dummy-indicator-entry-func.h @@ -53,4 +53,6 @@ struct _DummyIndicatorEntryFunc { gboolean entry_close_called; }; +void dummy_indicator_entry_func_support_window(DummyIndicatorEntryFunc * ind, gboolean different); + #endif /* __DUMMY_INDICATOR_ENTRY_FUNC__ */ -- cgit v1.2.3 From 6a0f41aaa53cb79e03520a8214cc2c9305821496 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 16 Jan 2012 03:59:29 +0100 Subject: Moving the function into the tester to making linking simpler --- tests/dummy-indicator-entry-func.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests/dummy-indicator-entry-func.h') diff --git a/tests/dummy-indicator-entry-func.h b/tests/dummy-indicator-entry-func.h index d22abed..f5c8264 100644 --- a/tests/dummy-indicator-entry-func.h +++ b/tests/dummy-indicator-entry-func.h @@ -53,6 +53,4 @@ struct _DummyIndicatorEntryFunc { gboolean entry_close_called; }; -void dummy_indicator_entry_func_support_window(DummyIndicatorEntryFunc * ind, gboolean different); - #endif /* __DUMMY_INDICATOR_ENTRY_FUNC__ */ -- cgit v1.2.3