2
* @file ui_itemlist.h item list GUI handling
4
* Copyright (C) 2004-2009 Lars Lindner <lars.lindner@gmail.com>
5
* Copyright (C) 2004-2005 Nathan J. Conrad <t98502@users.sourceforge.net>
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Library General Public
9
* License as published by the Free Software Foundation; either
10
* version 2 of the License, or (at your option) any later version.
12
* This library 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 GNU
15
* Library General Public License for more details.
17
* You should have received a copy of the GNU Library General Public License
18
* along with this library; see the file COPYING.LIB. If not, write to
19
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
* Boston, MA 02111-1307, USA.
23
#ifndef _UI_ITEMLIST_H
24
#define _UI_ITEMLIST_H
30
#include "node_view.h"
33
* Initializes the itemlist. For example, it creates the various
34
* columns and renderers needed to show the list.
36
GtkWidget* ui_itemlist_new (GtkWidget *mainwindow);
39
void ui_itemlist_destroy (void);
42
* Checks wether the given id is currently displayed.
44
* @param id the item id
46
* @returns TRUE if the item is in the tree view
48
gboolean ui_itemlist_contains_item(gulong id);
51
* Changes the sorting type (and direction).
53
* @param sortType new sort type
54
* @param sortReversed TRUE for ascending order
56
void ui_itemlist_set_sort_column (nodeViewSortType sortType, gboolean sortReversed);
58
void ui_itemlist_reset_tree_store(void);
61
* Unselect all items in the list and scroll to top. This is typically
62
* called when changing feed.
64
void ui_itemlist_prefocus(void);
67
* Selects the given item (if it is in the current item list).
69
* @param ip the item to select
71
void ui_itemlist_select(itemPtr ip);
74
* Add an item to the itemlist
76
* @param ip the item to add
78
void ui_itemlist_add_item(itemPtr item);
81
* Remove an item from the itemlist
83
void ui_itemlist_remove_item(itemPtr ip);
86
* Enable the favicon column of the currently displayed itemlist
88
void ui_itemlist_enable_favicon_column(gboolean enabled);
91
* Enable the enclosure column of the currently displayed itemlist
93
void ui_itemlist_enable_encicon_column(gboolean enabled);
96
* Remove the items from the itemlist.
98
void ui_itemlist_clear(void);
102
* When switching tabs, the horizontal scrolling sometimes gets messed
103
* up. This reverses that.
105
void ui_itemlist_scroll_left (void);
108
* @name Callbacks used from interface.c
113
* Callback activated when an item is double-clicked. It opens the URL
114
* of the item in a web browser.
118
on_Itemlist_row_activated (GtkTreeView *treeview,
120
GtkTreeViewColumn *column,
124
* Callback for column selection change.
126
void itemlist_sort_column_changed_cb(GtkTreeSortable *treesortable, gpointer user_data);
129
* Callback for item list selection change.
131
void on_itemlist_selection_changed(GtkTreeSelection *selection, gpointer data);
136
* Toggles the unread status of the selected item. This is called from
139
void on_toggle_unread_status(GtkMenuItem *menuitem, gpointer user_data);
142
* Toggles the flag of the selected item. This is called from a menu.
144
void on_toggle_item_flag(GtkMenuItem *menuitem, gpointer user_data);
147
* Opens the selected item in a browser.
149
void on_popup_launchitem_selected(void);
152
* Opens the selected item in a browser.
154
void on_popup_launchitem_in_tab_selected(void);
157
* Toggles the read status of right-clicked item.
159
void on_popup_toggle_read(void);
162
* Toggles the flag of right-clicked item.
164
void on_popup_toggle_flag(void);
167
* Removes all items from the selected feed.
169
* @param menuitem The menuitem that was selected.
170
* @param user_data Unused.
172
void on_remove_items_activate(GtkMenuItem *menuitem, gpointer user_data);
175
* Removes the selected item from the selected feed.
177
* @param menuitem The menuitem that was selected.
178
* @param user_data Unused.
180
void on_remove_item_activate(GtkMenuItem *menuitem, gpointer user_data);
182
void on_popup_remove_selected(void);
185
* Finds and selects the next unread item starting at the given
186
* item in the current item list according to the current
187
* GtkTreeView sorting order.
189
* @param startId 0 or the item id to start from
191
* @returns item if an unread item was found
193
itemPtr ui_itemlist_find_unread_item(gulong startId);
196
* Searches the displayed feed and then all feeds for an unread
197
* item. If one it found, it is displayed.
199
* @param menuitem The menuitem that was selected.
200
* @param user_data Unused.
202
void on_next_unread_item_activate(GtkMenuItem *menuitem, gpointer user_data);
204
void on_popup_next_unread_item_selected(gpointer callback_data, guint callback_action, GtkWidget *widget);
206
void on_nextbtn_clicked(GtkButton *button, gpointer user_data);
209
* Update a single item of the currently displayed item list.
211
* @param item the item
213
void ui_itemlist_update_item (itemPtr item);
216
* Update all items of the currently displayed item list.
218
void ui_itemlist_update_all_items (void);
220
// FIXME: the following two functions have nothing to do with the "item list"!
223
* Launches the configured link search engine for the given item
225
* @param item the item
227
void ui_itemlist_search_item_link (itemPtr item);
230
* Launches the configured social bookmarking site for the given item
232
* @param item the item
234
void ui_itemlist_add_item_bookmark (itemPtr item);
237
* Copies the selected items URL to the clipboard.
239
void on_popup_copy_URL_clipboard(void);
241
void on_popup_social_bm_item_selected(void);