NetSurf
cw_helper.h
Go to the documentation of this file.
1/*
2 * Copyright 2019 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 *
22 * Helpers to simplify core use of corewindow.
23 */
24
25#ifndef NETSURF_DESKTOP_CW_HELPER_H_
26#define NETSURF_DESKTOP_CW_HELPER_H_
27
28struct rect;
29struct core_window;
31
32/**
33 * Scroll a core window to make the given rectangle visible.
34 *
35 * \param[in] cw_t The core window callback table to use.
36 * \param[in] cw_h The core window's handle.
37 * \param[in] r The rectangle to make visisble by scrolling.
38 * \return NSERROR_OK on success or appropriate error code
39 */
41 const struct core_window_callback_table *cw_t,
42 struct core_window *cw_h,
43 const struct rect *r);
44
45#endif
nserror cw_helper_scroll_visible(const struct core_window_callback_table *cw_t, struct core_window *cw_h, const struct rect *r)
Scroll a core window to make the given rectangle visible.
Definition: cw_helper.c:34
nserror
Enumeration of error codes.
Definition: errors.h:29
static struct core_window_callback_table cw_t
Declare Core Window Callbacks:
Definition: treeview.c:534
Callbacks to achieve various core window functionality.
Definition: core_window.h:51
Rectangle coordinates.
Definition: types.h:40