-
Notifications
You must be signed in to change notification settings - Fork 11
/
filebutton.h
71 lines (57 loc) · 2.16 KB
/
filebutton.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#include <sys/stat.h>
#include <Xm/Xm.h>
#include "list.h"
#define DETAIL_SIZE 0
#define DETAIL_COMMENT 1
#define DETAIL_COUNT 2
struct fileinfo_cache;
struct file_button {
/* file info */
char *filename;
char *basename;
unsigned char d_type;
struct stat st;
struct fileinfo *info;
/* Widget + other X11 stuff */
Screen *screen;
Widget widget;
XmString label;
XmString details[DETAIL_COUNT];
Pixmap small,large;
/* lists */
struct list_head global;
struct list_head window;
/* private for file info + icon loader */
struct list_head queue;
int state,y;
struct ida_loader *loader;
void *wdata;
struct ida_image wimg;
struct ida_image simg;
};
void fileinfo_queue(struct file_button *file);
void fileinfo_invalidate(char *filename);
void file_set_icon(struct file_button *file, Pixmap s, Pixmap l);
void file_set_info(struct file_button *file, struct fileinfo *info);
/*----------------------------------------------------------------------*/
void container_detail_cb(Widget widget, XtPointer clientdata,
XtPointer call_data);
void container_spatial_cb(Widget widget, XtPointer clientdata,
XtPointer call_data);
void container_resize_eh(Widget widget, XtPointer clientdata,
XEvent *event, Boolean *d);
void container_convert_cb(Widget widget, XtPointer clientdata,
XtPointer call_data);
void container_traverse_cb(Widget scroll, XtPointer clientdata,
XtPointer call_data);
void container_menu_edit(Widget menu, Widget container,
int cut, int copy, int paste, int del);
void container_menu_view(Widget menu, Widget container);
void container_menu_ops(Widget menu, Widget container);
void container_relayout(Widget container);
void container_setsize(Widget container);
void container_delwidgets(Widget container);
/*----------------------------------------------------------------------*/
int file_cmp_alpha(const struct file_button *aa,
const struct file_button *bb);
int file_createwidgets(Widget parent, struct file_button *file);