1 /* 2 * e-proxy-selector.h 3 * 4 * This program is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU Lesser General Public License as published by 6 * the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, but 9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11 * for more details. 12 * 13 * You should have received a copy of the GNU Lesser General Public License 14 * along with this program; if not, see <http://www.gnu.org/licenses/>. 15 * 16 */ 17 18 #if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION) 19 #error "Only <e-util/e-util.h> should be included directly." 20 #endif 21 22 #ifndef E_PROXY_SELECTOR_H 23 #define E_PROXY_SELECTOR_H 24 25 #include <libedataserver/libedataserver.h> 26 27 #include <e-util/e-tree-view-frame.h> 28 29 /* Standard GObject macros */ 30 #define E_TYPE_PROXY_SELECTOR \ 31 (e_proxy_selector_get_type ()) 32 #define E_PROXY_SELECTOR(obj) \ 33 (G_TYPE_CHECK_INSTANCE_CAST \ 34 ((obj), E_TYPE_PROXY_SELECTOR, EProxySelector)) 35 #define E_PROXY_SELECTOR_CLASS(cls) \ 36 (G_TYPE_CHECK_CLASS_CAST \ 37 ((cls), E_TYPE_PROXY_SELECTOR, EProxySelectorClass)) 38 #define E_IS_PROXY_SELECTOR(obj) \ 39 (G_TYPE_CHECK_INSTANCE_TYPE \ 40 ((obj), E_TYPE_PROXY_SELECTOR)) 41 #define E_IS_PROXY_SELECTOR_CLASS(cls) \ 42 (G_TYPE_CHECK_CLASS_TYPE \ 43 ((cls), E_TYPE_PROXY_SELECTOR)) 44 #define E_PROXY_SELECTOR_GET_CLASS(obj) \ 45 (G_TYPE_INSTANCE_GET_CLASS \ 46 ((obj), E_TYPE_PROXY_SELECTOR, EProxySelectorClass)) 47 48 G_BEGIN_DECLS 49 50 typedef struct _EProxySelector EProxySelector; 51 typedef struct _EProxySelectorClass EProxySelectorClass; 52 typedef struct _EProxySelectorPrivate EProxySelectorPrivate; 53 54 /** 55 * EProxySelector: 56 * 57 * Contains only private data that should be read and manipulated using the 58 * functions below. 59 **/ 60 struct _EProxySelector { 61 ETreeViewFrame parent; 62 EProxySelectorPrivate *priv; 63 }; 64 65 struct _EProxySelectorClass { 66 ETreeViewFrameClass parent_class; 67 }; 68 69 GType e_proxy_selector_get_type (void) G_GNUC_CONST; 70 GtkWidget * e_proxy_selector_new (ESourceRegistry *registry); 71 void e_proxy_selector_refresh (EProxySelector *selector); 72 ESourceRegistry * 73 e_proxy_selector_get_registry (EProxySelector *selector); 74 ESource * e_proxy_selector_ref_selected (EProxySelector *selector); 75 gboolean e_proxy_selector_set_selected (EProxySelector *selector, 76 ESource *source); 77 78 G_END_DECLS 79 80 #endif /* E_PROXY_SELECTOR_H */ 81 82