2
* This file is part of libslab.
4
* Copyright (c) 2006 Novell, Inc.
6
* Libslab is free software; you can redistribute it and/or modify it under the
7
* terms of the GNU Lesser General Public License as published by the Free
8
* Software Foundation; either version 2 of the License, or (at your option)
11
* Libslab is distributed in the hope that it will be useful, but WITHOUT ANY
12
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with libslab; if not, write to the Free Software Foundation, Inc., 51
18
* Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
#ifndef __APP_SHELL_H__
22
#define __APP_SHELL_H__
26
#define GMENU_I_KNOW_THIS_IS_UNSTABLE
27
#include <gmenu-tree.h>
28
#include <libgnome/gnome-desktop-item.h>
30
#include <libslab/slab-section.h>
31
#include <libslab/tile.h>
35
#define CATEGORY_SPACING 0
36
#define GROUP_POSITION_NUMBER_KEY "Unique Group Position Number"
37
#define APP_ACTION_KEY "Unique Application Action Key"
39
/* constants for initial sizing */
40
#define SIZING_SCREEN_WIDTH_LARGE 1024
41
#define SIZING_SCREEN_WIDTH_MEDIUM 800
42
#define SIZING_SCREEN_WIDTH_SMALL 640
43
#define SIZING_SCREEN_WIDTH_LARGE_NUMCOLS 3
44
#define SIZING_SCREEN_WIDTH_MEDIUM_NUMCOLS 2
45
#define SIZING_SCREEN_WIDTH_SMALL_NUMCOLS 1
46
#define SIZING_TILE_WIDTH 230
47
#define SIZING_HEIGHT_PERCENT 0.8
56
typedef struct _AppShellData
59
gint main_app_window_x;
60
gint main_app_window_y;
61
gboolean main_app_window_shown_once;
64
GtkWidget *groups_section;
66
GtkWidget *actions_section;
68
NULL - if the available actions depend on the current tile selected
69
NON-NULL - a list of AppAction that are always shown
71
GSList *static_actions;
73
GtkWidget *filter_section;
75
GdkCursor *busy_cursor;
77
GtkWidget *category_layout;
78
GList *categories_list;
79
GList *cached_tables_list; /* list of currently showing (not filtered out) tables */
80
Tile *last_clicked_launcher;
81
SlabSection *selected_group;
82
GtkIconSize icon_size;
83
const gchar *gconf_prefix;
84
const gchar *menu_name;
85
NewAppConfig *new_apps;
89
guint filter_changed_timeout;
90
gboolean stop_incremental_relayout;
91
GList *incremental_relayout_cat_list;
92
gboolean filtered_out_everything;
93
GtkWidget *filtered_out_everything_widget;
94
GtkLabel *filtered_out_everything_widget_label;
96
gboolean show_tile_generic_name;
97
gboolean exit_on_close;
103
Tile *group_launcher;
105
SlabSection *section;
106
GList *launcher_list;
107
GList *filtered_launcher_list;
113
GnomeDesktopItem *item;
119
GnomeDesktopItem *item;
122
void generate_categories (AppShellData * app_data);
124
/* If new_apps is NULL then the new applications category is not created */
125
AppShellData *appshelldata_new (const gchar * menu_name, NewAppConfig * new_apps,
126
const gchar * gconf_keys_prefix, GtkIconSize icon_size,
127
gboolean show_tile_generic_name, gboolean exit_on_close);
129
void layout_shell (AppShellData * app_data, const gchar * filter_title, const gchar * groups_title,
130
const gchar * actions_title, GSList * actions,
131
void (*actions_handler) (Tile *, TileEvent *, gpointer));
133
gboolean create_main_window (AppShellData * app_data, const gchar * app_name, const gchar * title,
134
const gchar * window_icon, gint width, gint height, gboolean hidden);
136
void hide_shell (AppShellData * app_data);
138
void show_shell (AppShellData * app_data);
141
#endif /* __APP_SHELL_H__ */