~ubuntu-branches/ubuntu/utopic/pcmanfm/utopic

« back to all changes in this revision

Viewing changes to src/ptk/ptk-file-list.h

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Lee
  • Date: 2006-10-16 16:47:04 UTC
  • Revision ID: james.westby@ubuntu.com-20061016164704-w8zobnrvdxc7rvm5
Tags: upstream-0.3.2.1
ImportĀ upstreamĀ versionĀ 0.3.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
*  C Interface: ptk-file-list
 
3
*
 
4
* Description: 
 
5
*
 
6
*
 
7
* Author: Hong Jen Yee (PCMan) <pcman.tw (AT) gmail.com>, (C) 2006
 
8
*
 
9
* Copyright: See COPYING file that comes with this distribution
 
10
*
 
11
*/
 
12
 
 
13
#ifndef _PTK_FILE_LIST_H_
 
14
#define _PTK_FILE_LIST_H_
 
15
 
 
16
#include <gtk/gtk.h>
 
17
#include <glib.h>
 
18
#include <glib-object.h>
 
19
 
 
20
#include <sys/types.h>
 
21
 
 
22
#include "vfs-dir.h"
 
23
 
 
24
G_BEGIN_DECLS
 
25
 
 
26
#define PTK_TYPE_FILE_LIST             (ptk_file_list_get_type())
 
27
#define PTK_FILE_LIST(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),  PTK_TYPE_FILE_LIST, PtkFileList))
 
28
#define PTK_FILE_LIST_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass),  PTK_TYPE_FILE_LIST, PtkFileListClass))
 
29
#define PTK_IS_FILE_LIST(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PTK_TYPE_FILE_LIST))
 
30
#define PTK_IS_FILE_LIST_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass),  PTK_TYPE_FILE_LIST))
 
31
#define PTK_FILE_LIST_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj),  PTK_TYPE_FILE_LIST, PtkFileListClass))
 
32
 
 
33
/* Columns of folder view */
 
34
enum{
 
35
  COL_FILE_BIG_ICON = 0,
 
36
  COL_FILE_SMALL_ICON,
 
37
  COL_FILE_NAME,
 
38
  COL_FILE_SIZE,
 
39
  COL_FILE_DESC,
 
40
  COL_FILE_PERM,
 
41
  COL_FILE_OWNER,
 
42
  COL_FILE_MTIME,
 
43
  COL_FILE_INFO,
 
44
  N_FILE_LIST_COLS
 
45
};
 
46
 
 
47
typedef struct _PtkFileList PtkFileList;
 
48
typedef struct _PtkFileListClass PtkFileListClass;
 
49
 
 
50
struct _PtkFileList
 
51
{
 
52
    GObject parent;
 
53
    /* <private> */
 
54
    VFSDir* dir;
 
55
    GList* files;
 
56
    guint n_files;
 
57
 
 
58
    gboolean show_hidden;
 
59
    int max_thumbnail;
 
60
 
 
61
    int sort_col;
 
62
    GtkSortType sort_order;
 
63
    /* Random integer to check whether an iter belongs to our model */
 
64
    gint stamp;
 
65
};
 
66
 
 
67
struct _PtkFileListClass
 
68
{
 
69
    GObjectClass parent;
 
70
    /* Default signal handlers */
 
71
    void ( *file_created ) ( VFSDir* dir, const char* file_name );
 
72
    void ( *file_deleted ) ( VFSDir* dir, const char* file_name );
 
73
    void ( *file_changed ) ( VFSDir* dir, const char* file_name );
 
74
    void ( *load_complete ) ( VFSDir* dir );
 
75
};
 
76
 
 
77
GType ptk_file_list_get_type (void);
 
78
 
 
79
PtkFileList *ptk_file_list_new ( VFSDir* dir, gboolean show_hidden );
 
80
 
 
81
void ptk_file_list_set_dir( PtkFileList* list, VFSDir* dir );
 
82
 
 
83
void ptk_file_list_show_thumbnails( PtkFileList* list, gboolean big,
 
84
                                    int max_file_size );
 
85
 
 
86
#if 0
 
87
/* I still have doubt if these functions work */
 
88
 
 
89
void ptk_file_list_show_hidden_files( PtkFileList* list );
 
90
 
 
91
void ptk_file_list_hide_hidden_files( PtkFileList* list );
 
92
#endif
 
93
 
 
94
G_END_DECLS
 
95
 
 
96
#endif