NetSurf
dirlist.h
Go to the documentation of this file.
1/*
2 * Copyright 2010 Michael Drake <tlsa@netsurf-browser.org>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19/**
20 * \file
21 * interface to generate HTML content for displaying directory listings.
22 *
23 * These functions should in general be called via the content interface.
24 */
25
26#ifndef NETSURF_CONTENT_DIRLIST_H_
27#define NETSURF_CONTENT_DIRLIST_H_
28
29#include <stdbool.h>
30
31#define DIRLIST_NO_NAME_COLUMN 1
32#define DIRLIST_NO_TYPE_COLUMN 1 << 1
33#define DIRLIST_NO_SIZE_COLUMN 1 << 2
34#define DIRLIST_NO_DATE_COLUMN 1 << 3
35#define DIRLIST_NO_TIME_COLUMN 1 << 4
36
37struct nsurl;
38
39bool dirlist_generate_top(char *buffer, int buffer_length);
40bool dirlist_generate_hide_columns(int flags, char *buffer, int buffer_length);
41bool dirlist_generate_title(const char *title, char *buffer, int buffer_length);
42bool dirlist_generate_parent_link(const char *parent, char *buffer,
43 int buffer_length);
44bool dirlist_generate_headings(char *buffer, int buffer_length);
45bool dirlist_generate_row(bool even, bool directory, struct nsurl *url,
46 char *name, const char *mimetype, long long size, char *date,
47 char *time, char *buffer, int buffer_length);
48bool dirlist_generate_bottom(char *buffer, int buffer_length);
49
50#endif
static osspriteop_area * buffer
The buffer characteristics.
Definition: buffer.c:55
wimp_w parent
Definition: dialog.c:88
bool dirlist_generate_row(bool even, bool directory, struct nsurl *url, char *name, const char *mimetype, long long size, char *date, char *time, char *buffer, int buffer_length)
Generates the part of an HTML directory listing page that displays a row in the directory contents ta...
Definition: dirlist.c:289
bool dirlist_generate_bottom(char *buffer, int buffer_length)
Generates the bottom part of an HTML directory listing page.
Definition: dirlist.c:344
bool dirlist_generate_title(const char *title, char *buffer, int buffer_length)
Generates the part of an HTML directory listing page that contains the title.
Definition: dirlist.c:143
bool dirlist_generate_parent_link(const char *parent, char *buffer, int buffer_length)
Generates the part of an HTML directory listing page that links to the parent directory.
Definition: dirlist.c:202
bool dirlist_generate_top(char *buffer, int buffer_length)
Generates the top part of an HTML directory listing page.
Definition: dirlist.c:61
bool dirlist_generate_hide_columns(int flags, char *buffer, int buffer_length)
Generates the part of an HTML directory listing page that can suppress particular columns.
Definition: dirlist.c:100
bool dirlist_generate_headings(char *buffer, int buffer_length)
Generates the part of an HTML directory listing page that displays the column headings.
Definition: dirlist.c:237
struct nsurl nsurl
NetSurf URL object.
Definition: nsurl.h:31