diff options
Diffstat (limited to 'shell.h')
-rw-r--r-- | shell.h | 51 |
1 files changed, 44 insertions, 7 deletions
@@ -1,6 +1,6 @@ /* * HardInfo - Displays System Information - * Copyright (C) 2003-2006 Leandro A. F. Pereira <leandro@linuxmag.com.br> + * Copyright (C) 2003-2007 Leandro A. F. Pereira <leandro@linuxmag.com.br> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,11 +24,19 @@ typedef struct _Shell Shell; typedef struct _ShellTree ShellTree; typedef struct _ShellInfoTree ShellInfoTree; +typedef struct _ShellNote ShellNote; typedef struct _ShellModule ShellModule; +typedef struct _ShellModuleMethod ShellModuleMethod; typedef struct _ShellModuleEntry ShellModuleEntry; typedef struct _ShellFieldUpdate ShellFieldUpdate; +typedef struct _ShellFieldUpdateSource ShellFieldUpdateSource; + +typedef enum { + SHELL_ORDER_DESCENDING, + SHELL_ORDER_ASCENDING, +} ShellOrderType; typedef enum { SHELL_PACK_RESIZE = 1 << 0, @@ -39,6 +47,8 @@ typedef enum { SHELL_VIEW_NORMAL, SHELL_VIEW_DUAL, SHELL_VIEW_LOAD_GRAPH, + SHELL_VIEW_PROGRESS, + SHELL_VIEW_N_VIEWS } ShellViewType; typedef enum { @@ -54,6 +64,7 @@ typedef enum { INFO_TREE_COL_VALUE, INFO_TREE_COL_DATA, INFO_TREE_COL_PBUF, + INFO_TREE_COL_PROGRESS, INFO_TREE_NCOL } ShellInfoTreeColumns; @@ -66,6 +77,7 @@ struct _Shell { ShellTree *tree; ShellInfoTree *info, *moreinfo; ShellModuleEntry *selected; + ShellNote *note; LoadGraph *loadgraph; GtkActionGroup *action_group; @@ -74,12 +86,14 @@ struct _Shell { ShellViewType view_type; gint _pulses; + ShellOrderType _order_type; }; struct _ShellTree { GtkWidget *scroll; GtkWidget *view; GtkTreeModel *model; + GtkTreeSelection *selection; GSList *modules; }; @@ -87,42 +101,64 @@ struct _ShellTree { struct _ShellInfoTree { GtkWidget *scroll; GtkWidget *view; - GtkTreeModel *model; + GtkTreeModel *model; + GtkTreeSelection *selection; + + GtkTreeViewColumn *col_progress, *col_value; +}; + +struct _ShellNote { + GtkWidget *frame; + GtkWidget *label; }; struct _ShellModule { gchar *name; GdkPixbuf *icon; GModule *dll; + + guchar weight; GSList *entries; }; +struct _ShellModuleMethod { + gchar *name; + gchar *(*function) (void); +}; + struct _ShellModuleEntry { gchar *name; - gint number; GdkPixbuf *icon; gboolean selected; + gint number; - gchar *(*func) (gint entry); - gchar *(*reloadfunc) (gint entry); + gchar *(*func) (); + void (*scan_func) (); + gchar *(*fieldfunc) (gchar * entry); gchar *(*morefunc) (gchar * entry); + gchar *(*notefunc) (gint entry); }; struct _ShellFieldUpdate { ShellModuleEntry *entry; gchar *field_name; - gboolean loadgraph; }; -void shell_init(void); +struct _ShellFieldUpdateSource { + guint source_id; + ShellFieldUpdate *sfu; +}; + +void shell_init(GSList *modules); void shell_do_reload(void); Shell *shell_get_main_shell(); void shell_action_set_enabled(const gchar *action_name, gboolean setting); +gboolean shell_action_get_enabled(const gchar *action_name); gboolean shell_action_get_active(const gchar *action_name); void shell_action_set_active(const gchar *action_name, gboolean setting); @@ -131,6 +167,7 @@ void shell_action_set_property(const gchar *action_name, gboolean setting); void shell_set_side_pane_visible(gboolean setting); +void shell_set_note_from_entry(ShellModuleEntry *entry); void shell_ui_manager_set_visible(const gchar *path, gboolean setting); |