-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added LifereaNodeSourceActivatable interface to allow plugins impleme…
…nting new node source types. (for Github #18)
- v1.15.9
- v1.15.8
- v1.15.7
- v1.15.6
- v1.15.5
- v1.15.4
- v1.15.3
- v1.15.2
- v1.15.1
- v1.15.0
- v1.14.6
- v1.14.5
- v1.14.4
- v1.14.3
- v1.14.2
- v1.14.1
- v1.14.0
- v1.14-RC3
- v1.14-RC2
- v1.14-RC1
- v1.13.9
- v1.13.8
- v1.13.7
- v1.13.6
- v1.13.5
- v1.13.4
- v1.13.3
- v1.13.2
- v1.13.1
- v1.13.0
- v1.12.10
- v1.12.9
- v1.12.8
- v1.12.7
- v1.12.6
- v1.12.5
- v1.12.4
- v1.12.3
- v1.12.2
- v1.12.1
- v1.12.0
- v1.12-rc3
- v1.12-rc2
- v1.12-rc1
- v1.11.7
- v1.11.6
- v1.11.5
- v1.11.4
- v1.11.3
Showing
11 changed files
with
186 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* @file node_type_activatable.c Node Source Plugin Type | ||
* | ||
* Copyright (C) 2015 Lars Windolf <lars.windolf@gmx.de> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program 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 for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
*/ | ||
|
||
#include "node_source_activatable.h" | ||
|
||
/** | ||
* SECTION:node_source_activatable | ||
* @short_description: Interface for activatable extensions providing a new node source type | ||
* @see_also: #PeasExtensionSet | ||
* | ||
* #LifereaNodeSourceActivatable is an interface which should be implemented by | ||
* extensions that want to a new node source type (usually online news aggregators) | ||
**/ | ||
G_DEFINE_INTERFACE (LifereaNodeSourceActivatable, liferea_node_source_activatable, G_TYPE_OBJECT) | ||
|
||
void | ||
liferea_node_source_activatable_default_init (LifereaNodeSourceActivatableInterface *iface) | ||
{ | ||
/* No properties yet */ | ||
} | ||
|
||
void | ||
liferea_node_source_activatable_activate (LifereaNodeSourceActivatable * activatable) | ||
{ | ||
LifereaNodeSourceActivatableInterface *iface; | ||
|
||
g_return_if_fail (IS_LIFEREA_NODE_SOURCE_ACTIVATABLE (activatable)); | ||
|
||
iface = LIFEREA_NODE_SOURCE_ACTIVATABLE_GET_IFACE (activatable); | ||
if (iface->activate) | ||
iface->activate (activatable); | ||
} | ||
|
||
void | ||
liferea_node_source_activatable_deactivate (LifereaNodeSourceActivatable * activatable) | ||
{ | ||
LifereaNodeSourceActivatableInterface *iface; | ||
|
||
g_return_if_fail (IS_LIFEREA_NODE_SOURCE_ACTIVATABLE (activatable)); | ||
|
||
iface = LIFEREA_NODE_SOURCE_ACTIVATABLE_GET_IFACE (activatable); | ||
if (iface->deactivate) | ||
iface->deactivate (activatable); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* @file node_source_activatable.h Node Source Plugin Type | ||
* | ||
* Copyright (C) 2015 Lars Windolf <lars.windolf@gmx.de> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program 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 for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
*/ | ||
|
||
#ifndef _LIFEREA_NODE_SOURCE_ACTIVATABLE_H__ | ||
#define _LIFEREA_NODE_SOURCE_ACTIVATABLE_H__ | ||
|
||
#include <glib-object.h> | ||
#include <gtk/gtk.h> | ||
|
||
G_BEGIN_DECLS | ||
|
||
#define LIFEREA_NODE_SOURCE_ACTIVATABLE_TYPE (liferea_node_source_activatable_get_type ()) | ||
#define LIFEREA_NODE_SOURCE_ACTIVATABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIFEREA_NODE_SOURCE_ACTIVATABLE_TYPE, LifereaNodeSourceActivatable)) | ||
#define LIFEREA_NODE_SOURCE_ACTIVATABLE_IFACE(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), LIFEREA_NODE_SOURCE_ACTIVATABLE_TYPE, LifereaNodeSourceActivatableInterface)) | ||
#define IS_LIFEREA_NODE_SOURCE_ACTIVATABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIFEREA_NODE_SOURCE_ACTIVATABLE_TYPE)) | ||
#define LIFEREA_NODE_SOURCE_ACTIVATABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), LIFEREA_NODE_SOURCE_ACTIVATABLE_TYPE, LifereaNodeSourceActivatableInterface)) | ||
|
||
typedef struct _LifereaNodeSourceActivatable LifereaNodeSourceActivatable; | ||
typedef struct _LifereaNodeSourceActivatableInterface LifereaNodeSourceActivatableInterface; | ||
|
||
struct _LifereaNodeSourceActivatableInterface | ||
{ | ||
GTypeInterface g_iface; | ||
|
||
void (*activate) (LifereaNodeSourceActivatable * activatable); | ||
void (*deactivate) (LifereaNodeSourceActivatable * activatable); | ||
}; | ||
|
||
GType liferea_node_source_activatable_get_type (void) G_GNUC_CONST; | ||
|
||
void liferea_node_source_activatable_activate (LifereaNodeSourceActivatable *activatable); | ||
|
||
void liferea_node_source_activatable_deactivate (LifereaNodeSourceActivatable *activatable); | ||
|
||
G_END_DECLS | ||
|
||
#endif /* __LIFEREA_NODE_SOURCE_ACTIVATABLE_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters