1 /*
2  * applications-search-provider: Search provider for searching installed
3  *                               applications
4  *
5  * Copyright 2012-2020 Stephan Haller <nomad@froevel.de>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20  * MA 02110-1301, USA.
21  *
22  *
23  */
24 
25 #ifndef __LIBXFDASHBOARD_APPLICATIONS_SEARCH_PROVIDER__
26 #define __LIBXFDASHBOARD_APPLICATIONS_SEARCH_PROVIDER__
27 
28 #if !defined(__LIBXFDASHBOARD_H_INSIDE__) && !defined(LIBXFDASHBOARD_COMPILATION)
29 #error "Only <libxfdashboard/libxfdashboard.h> can be included directly."
30 #endif
31 
32 #include <libxfdashboard/search-provider.h>
33 
34 G_BEGIN_DECLS
35 
36 /* Public definitions */
37 typedef enum /*< flags,prefix=XFDASHBOARD_APPLICATIONS_SEARCH_PROVIDER_SORT_MODE >*/
38 {
39 	XFDASHBOARD_APPLICATIONS_SEARCH_PROVIDER_SORT_MODE_NONE=0,
40 
41 	XFDASHBOARD_APPLICATIONS_SEARCH_PROVIDER_SORT_MODE_NAMES=1 << 0,
42 	XFDASHBOARD_APPLICATIONS_SEARCH_PROVIDER_SORT_MODE_MOST_USED=1 << 1,
43 } XfdashboardApplicationsSearchProviderSortMode;
44 
45 
46 /* Object declaration */
47 #define XFDASHBOARD_TYPE_APPLICATIONS_SEARCH_PROVIDER				(xfdashboard_applications_search_provider_get_type())
48 #define XFDASHBOARD_APPLICATIONS_SEARCH_PROVIDER(obj)				(G_TYPE_CHECK_INSTANCE_CAST((obj), XFDASHBOARD_TYPE_APPLICATIONS_SEARCH_PROVIDER, XfdashboardApplicationsSearchProvider))
49 #define XFDASHBOARD_IS_APPLICATIONS_SEARCH_PROVIDER(obj)			(G_TYPE_CHECK_INSTANCE_TYPE((obj), XFDASHBOARD_TYPE_APPLICATIONS_SEARCH_PROVIDER))
50 #define XFDASHBOARD_APPLICATIONS_SEARCH_PROVIDER_CLASS(klass)		(G_TYPE_CHECK_CLASS_CAST((klass), XFDASHBOARD_TYPE_APPLICATIONS_SEARCH_PROVIDER, XfdashboardApplicationsSearchProviderClass))
51 #define XFDASHBOARD_IS_APPLICATIONS_SEARCH_PROVIDER_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE((klass), XFDASHBOARD_TYPE_APPLICATIONS_SEARCH_PROVIDER))
52 #define XFDASHBOARD_APPLICATIONS_SEARCH_PROVIDER_GET_CLASS(obj)		(G_TYPE_INSTANCE_GET_CLASS((obj), XFDASHBOARD_TYPE_APPLICATIONS_SEARCH_PROVIDER, XfdashboardApplicationsSearchProviderClass))
53 
54 typedef struct _XfdashboardApplicationsSearchProvider				XfdashboardApplicationsSearchProvider;
55 typedef struct _XfdashboardApplicationsSearchProviderPrivate		XfdashboardApplicationsSearchProviderPrivate;
56 typedef struct _XfdashboardApplicationsSearchProviderClass			XfdashboardApplicationsSearchProviderClass;
57 
58 struct _XfdashboardApplicationsSearchProvider
59 {
60 	/*< private >*/
61 	/* Parent instance */
62 	XfdashboardSearchProvider						parent_instance;
63 
64 	/* Private structure */
65 	XfdashboardApplicationsSearchProviderPrivate	*priv;
66 };
67 
68 struct _XfdashboardApplicationsSearchProviderClass
69 {
70 	/*< private >*/
71 	/* Parent class */
72 	XfdashboardSearchProviderClass					parent_class;
73 
74 	/*< public >*/
75 	/* Virtual functions */
76 };
77 
78 
79 /* Public API */
80 GType xfdashboard_applications_search_provider_get_type(void) G_GNUC_CONST;
81 
82 XfdashboardApplicationsSearchProviderSortMode xfdashboard_applications_search_provider_get_sort_mode(XfdashboardApplicationsSearchProvider *self);
83 void xfdashboard_applications_search_provider_set_sort_mode(XfdashboardApplicationsSearchProvider *self, const XfdashboardApplicationsSearchProviderSortMode inMode);
84 
85 G_END_DECLS
86 
87 #endif	/* __LIBXFDASHBOARD_APPLICATIONS_SEARCH_PROVIDER__ */
88