1 /*
2  * Copyright (c) 2013-2014 Conformal Systems <info@conformal.com>
3  *
4  * This file originated from: http://opensource.conformal.com/
5  *
6  * Permission to use, copy, modify, and distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 static GtkHeaderBar *
toGtkHeaderBar(void * p)20 toGtkHeaderBar(void *p)
21 {
22 	return (GTK_HEADER_BAR(p));
23 }
24 
25 static GtkListBox *
toGtkListBox(void * p)26 toGtkListBox(void *p)
27 {
28 	return (GTK_LIST_BOX(p));
29 }
30 
31 static GtkListBoxRow *
toGtkListBoxRow(void * p)32 toGtkListBoxRow(void *p)
33 {
34 	return (GTK_LIST_BOX_ROW(p));
35 }
36 
37 static GtkRevealer *
toGtkRevealer(void * p)38 toGtkRevealer(void *p)
39 {
40 	return (GTK_REVEALER(p));
41 }
42 
43 static GtkSearchBar *
toGtkSearchBar(void * p)44 toGtkSearchBar(void *p)
45 {
46 	return (GTK_SEARCH_BAR(p));
47 }
48 
49 static GtkStack *
toGtkStack(void * p)50 toGtkStack(void *p)
51 {
52 	return (GTK_STACK(p));
53 }
54 
55 static GtkStackSwitcher *
toGtkStackSwitcher(void * p)56 toGtkStackSwitcher(void *p)
57 {
58 	return (GTK_STACK_SWITCHER(p));
59 }
60 
61 extern gboolean goListBoxFilterFuncs (GtkListBoxRow *row,
62                                     gpointer user_data);
63 
_gtk_list_box_set_filter_func(GtkListBox * box,gpointer user_data)64 static inline void _gtk_list_box_set_filter_func(GtkListBox *box, gpointer user_data) {
65     gtk_list_box_set_filter_func(box, (GtkListBoxFilterFunc)(goListBoxFilterFuncs), user_data, NULL);
66 }
67 
68