Created
June 5, 2016 23:41
-
-
Save andlabs/1df2f6b3c7a803c8af0a77b440afbb10 to your computer and use it in GitHub Desktop.
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
struct myPopover { | |
GtkWidget *popover; | |
GtkWidget *searchEntry; | |
GMenuModel *items; | |
}; | |
struct myPopover *newPopover(void) | |
{ | |
struct myPopover *p; | |
p = g_new0(struct myPopover, 0); | |
p->items = getMyModel(); | |
p->popover = gtk_popover_menu_new_with_model(p->items); | |
p->searchEntry = gtk_search_entry_new(); | |
// pack the search entry in here | |
g_signal_connect(p->searchEntry, "changed", G_CALLBACK(search), p); | |
// ... | |
return p; | |
} | |
static void search(GtkSearchEntry *e, gpointer data) | |
{ | |
struct myPopover *p = (struct myPopover *) data; | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment