2004-12-09 13:30:44 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2004 Richard Wilson <not_ginger_matt@users.sourceforge.net>
|
2010-10-05 23:14:46 +04:00
|
|
|
* Copyright 2009 Paul Blokus <paul_pl@users.sourceforge.net>
|
2007-08-08 20:16:03 +04:00
|
|
|
*
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
*
|
|
|
|
* NetSurf is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* NetSurf is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2004-12-09 13:30:44 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
/** \file
|
2013-09-03 01:58:18 +04:00
|
|
|
* deprecated compatibility layer for new treeview modules. Do not use.
|
2004-12-09 13:30:44 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2014-10-13 14:56:31 +04:00
|
|
|
|
|
|
|
#include "utils/log.h"
|
|
|
|
#include "utils/messages.h"
|
|
|
|
#include "utils/utils.h"
|
2010-10-05 23:14:46 +04:00
|
|
|
#include "content/content.h"
|
|
|
|
#include "content/hlcache.h"
|
2010-12-13 01:37:51 +03:00
|
|
|
#include "css/utils.h"
|
2014-10-13 14:56:31 +04:00
|
|
|
#include "utils/nsoption.h"
|
|
|
|
|
2010-10-05 23:14:46 +04:00
|
|
|
#include "desktop/browser.h"
|
2007-05-31 02:39:54 +04:00
|
|
|
#include "desktop/tree.h"
|
2010-10-05 23:14:46 +04:00
|
|
|
|
|
|
|
struct tree {
|
2013-09-02 19:19:16 +04:00
|
|
|
unsigned int flags; /* Tree flags */
|
2010-10-05 23:14:46 +04:00
|
|
|
tree_drag_type drag;
|
|
|
|
const struct treeview_table *callbacks;
|
2013-09-02 19:19:16 +04:00
|
|
|
void *client_data; /* User assigned data for the callbacks */
|
2010-10-05 23:14:46 +04:00
|
|
|
};
|
2004-12-09 13:30:44 +03:00
|
|
|
|
2013-05-31 13:11:22 +04:00
|
|
|
#include "desktop/treeview.h"
|
2013-08-15 22:19:24 +04:00
|
|
|
#include "desktop/hotlist.h"
|
2013-07-26 17:48:26 +04:00
|
|
|
#include "desktop/cookie_manager.h"
|
2013-05-31 13:11:22 +04:00
|
|
|
#include "desktop/global_history.h"
|
2013-08-12 13:32:54 +04:00
|
|
|
#include "desktop/sslcert_viewer.h"
|
2013-05-31 13:11:22 +04:00
|
|
|
|
2013-08-18 20:17:41 +04:00
|
|
|
struct sslcert_session_data *ssl_current_session = NULL;
|
|
|
|
const char *tree_hotlist_path = NULL;
|
2013-07-26 17:48:26 +04:00
|
|
|
int treeview_inits;
|
|
|
|
|
2013-08-30 14:38:02 +04:00
|
|
|
static void treeview_test_redraw_request(struct core_window *cw,
|
|
|
|
const struct rect *r)
|
2013-05-31 13:11:22 +04:00
|
|
|
{
|
2013-06-01 00:02:56 +04:00
|
|
|
struct tree *tree = (struct tree *)cw;
|
2013-05-31 20:57:28 +04:00
|
|
|
|
2013-08-30 14:38:02 +04:00
|
|
|
tree->callbacks->redraw_request(r->x0, r->y0,
|
|
|
|
r->x1 - r->x0, r->y1 - r->y0,
|
2013-05-31 20:57:28 +04:00
|
|
|
tree->client_data);
|
2013-05-31 13:11:22 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
static void treeview_test_update_size(struct core_window *cw,
|
|
|
|
int width, int height)
|
|
|
|
{
|
2013-06-30 20:54:08 +04:00
|
|
|
struct tree *tree = (struct tree *)cw;
|
|
|
|
|
|
|
|
tree->callbacks->resized(tree, width, height, tree->client_data);
|
2013-05-31 13:11:22 +04:00
|
|
|
}
|
|
|
|
|
2013-08-30 14:38:02 +04:00
|
|
|
static void treeview_test_scroll_visible(struct core_window *cw,
|
|
|
|
const struct rect *r)
|
2013-05-31 13:11:22 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static void treeview_test_get_window_dimensions(struct core_window *cw,
|
2013-07-01 18:10:45 +04:00
|
|
|
int *width, int *height)
|
2013-05-31 13:11:22 +04:00
|
|
|
{
|
2013-08-19 17:04:20 +04:00
|
|
|
struct tree *tree = (struct tree *)cw;
|
|
|
|
|
|
|
|
tree->callbacks->get_window_dimensions(width, height,
|
|
|
|
tree->client_data);
|
2013-05-31 13:11:22 +04:00
|
|
|
}
|
|
|
|
|
2013-07-01 18:10:45 +04:00
|
|
|
static void treeview_test_drag_status(struct core_window *cw,
|
|
|
|
core_window_drag_status ds)
|
|
|
|
{
|
|
|
|
struct tree *tree = (struct tree *)cw;
|
|
|
|
|
|
|
|
switch (ds) {
|
|
|
|
case CORE_WINDOW_DRAG_NONE:
|
|
|
|
tree->drag = TREE_NO_DRAG;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case CORE_WINDOW_DRAG_SELECTION:
|
|
|
|
tree->drag = TREE_SELECT_DRAG;
|
|
|
|
break;
|
2013-08-16 23:03:18 +04:00
|
|
|
|
|
|
|
case CORE_WINDOW_DRAG_MOVE:
|
|
|
|
tree->drag = TREE_MOVE_DRAG;
|
2013-09-04 18:13:53 +04:00
|
|
|
break;
|
2013-08-21 16:54:00 +04:00
|
|
|
|
|
|
|
case CORE_WINDOW_DRAG_TEXT_SELECTION:
|
|
|
|
tree->drag = TREE_TEXTAREA_DRAG;
|
2013-08-16 23:03:18 +04:00
|
|
|
break;
|
|
|
|
|
2013-07-01 18:10:45 +04:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-31 13:11:22 +04:00
|
|
|
struct core_window_callback_table cw_t = {
|
|
|
|
.redraw_request = treeview_test_redraw_request,
|
|
|
|
.update_size = treeview_test_update_size,
|
|
|
|
.scroll_visible = treeview_test_scroll_visible,
|
2013-07-01 18:10:45 +04:00
|
|
|
.get_window_dimensions = treeview_test_get_window_dimensions,
|
|
|
|
.drag_status = treeview_test_drag_status
|
2013-05-31 13:11:22 +04:00
|
|
|
};
|
|
|
|
|
2013-07-01 17:07:25 +04:00
|
|
|
static bool treeview_test_init(struct tree *tree)
|
2013-05-31 13:11:22 +04:00
|
|
|
{
|
|
|
|
nserror err;
|
|
|
|
|
2013-07-26 17:48:26 +04:00
|
|
|
treeview_inits++;
|
|
|
|
|
|
|
|
if (treeview_inits == 1)
|
2013-09-09 16:11:36 +04:00
|
|
|
treeview_init(0);
|
2013-07-26 17:48:26 +04:00
|
|
|
|
2013-09-04 18:13:53 +04:00
|
|
|
switch (tree->flags) {
|
|
|
|
case TREE_COOKIES:
|
2014-01-06 17:27:34 +04:00
|
|
|
assert(ssl_current_session == NULL &&
|
|
|
|
"Call sslcert_viewer_init directly, "
|
|
|
|
"this compat. layer can't cope with simultanious "
|
|
|
|
"sslcert viewers");
|
2013-07-26 17:48:26 +04:00
|
|
|
err = cookie_manager_init(&cw_t, (struct core_window *)tree);
|
2013-09-04 18:13:53 +04:00
|
|
|
if (err != NSERROR_OK)
|
2013-07-26 17:48:26 +04:00
|
|
|
warn_user("Couldn't init new cookie manager.", 0);
|
2013-09-04 18:13:53 +04:00
|
|
|
break;
|
|
|
|
case TREE_HISTORY:
|
2013-07-26 17:48:26 +04:00
|
|
|
err = global_history_init(&cw_t, (struct core_window *)tree);
|
2013-09-04 18:13:53 +04:00
|
|
|
if (err != NSERROR_OK)
|
2013-07-26 17:48:26 +04:00
|
|
|
warn_user("Couldn't init new global history.", 0);
|
2013-09-04 18:13:53 +04:00
|
|
|
break;
|
|
|
|
case TREE_HOTLIST:
|
2013-08-15 22:19:24 +04:00
|
|
|
err = hotlist_init(&cw_t, (struct core_window *)tree,
|
|
|
|
tree_hotlist_path);
|
2013-09-04 18:13:53 +04:00
|
|
|
if (err != NSERROR_OK)
|
2013-08-15 22:19:24 +04:00
|
|
|
warn_user("Couldn't init new hotlist.", 0);
|
2013-09-04 18:13:53 +04:00
|
|
|
break;
|
|
|
|
case TREE_SSLCERT:
|
|
|
|
err = sslcert_viewer_init(&cw_t, (struct core_window *)tree,
|
|
|
|
ssl_current_session);
|
|
|
|
if (err != NSERROR_OK)
|
|
|
|
warn_user("Couldn't init new sslcert viewer.", 0);
|
|
|
|
break;
|
2013-08-15 22:19:24 +04:00
|
|
|
}
|
2013-07-01 17:07:25 +04:00
|
|
|
|
|
|
|
return true;
|
2013-05-31 13:11:22 +04:00
|
|
|
}
|
|
|
|
|
2013-07-01 17:07:25 +04:00
|
|
|
static bool treeview_test_fini(struct tree *tree)
|
2013-05-31 13:11:22 +04:00
|
|
|
{
|
|
|
|
nserror err;
|
|
|
|
|
2013-09-04 18:13:53 +04:00
|
|
|
switch (tree->flags) {
|
|
|
|
case TREE_COOKIES:
|
2013-07-26 17:48:26 +04:00
|
|
|
err = cookie_manager_fini();
|
2013-09-04 18:13:53 +04:00
|
|
|
if (err != NSERROR_OK)
|
2013-07-26 17:48:26 +04:00
|
|
|
warn_user("Couldn't finalise cookie manager.", 0);
|
2013-09-04 18:13:53 +04:00
|
|
|
break;
|
|
|
|
case TREE_HISTORY:
|
2013-07-26 17:48:26 +04:00
|
|
|
err = global_history_fini();
|
2013-09-04 18:13:53 +04:00
|
|
|
if (err != NSERROR_OK)
|
2013-07-26 17:48:26 +04:00
|
|
|
warn_user("Couldn't finalise cookie manager.", 0);
|
2013-09-04 18:13:53 +04:00
|
|
|
break;
|
|
|
|
case TREE_HOTLIST:
|
2013-08-15 22:19:24 +04:00
|
|
|
err = hotlist_fini(tree_hotlist_path);
|
2013-09-04 18:13:53 +04:00
|
|
|
if (err != NSERROR_OK)
|
2013-08-15 22:19:24 +04:00
|
|
|
warn_user("Couldn't finalise hotlist.", 0);
|
2013-09-04 18:13:53 +04:00
|
|
|
break;
|
|
|
|
case TREE_SSLCERT:
|
2014-01-06 17:27:34 +04:00
|
|
|
assert(ssl_current_session != NULL &&
|
|
|
|
"Can't use sslcert window after sslcert_viewer_fini()");
|
2013-09-04 18:13:53 +04:00
|
|
|
err = sslcert_viewer_fini(ssl_current_session);
|
2014-01-06 17:27:34 +04:00
|
|
|
ssl_current_session = NULL;
|
2013-09-04 18:13:53 +04:00
|
|
|
if (err != NSERROR_OK)
|
|
|
|
warn_user("Couldn't finalise sslcert viewer.", 0);
|
|
|
|
break;
|
2013-08-15 22:19:24 +04:00
|
|
|
}
|
2013-07-26 17:48:26 +04:00
|
|
|
|
|
|
|
if (treeview_inits == 1)
|
|
|
|
treeview_fini();
|
|
|
|
treeview_inits--;
|
2013-07-01 17:07:25 +04:00
|
|
|
|
|
|
|
return true;
|
2013-05-31 13:11:22 +04:00
|
|
|
}
|
|
|
|
|
2013-07-01 17:07:25 +04:00
|
|
|
static bool treeview_test_redraw(struct tree *tree, int x, int y,
|
2013-05-31 13:11:22 +04:00
|
|
|
int clip_x, int clip_y, int clip_width, int clip_height,
|
|
|
|
const struct redraw_context *ctx)
|
|
|
|
{
|
|
|
|
struct rect clip;
|
2013-07-01 17:07:25 +04:00
|
|
|
|
2013-05-31 13:11:22 +04:00
|
|
|
clip.x0 = clip_x;
|
|
|
|
clip.y0 = clip_y;
|
|
|
|
clip.x1 = clip_x + clip_width;
|
|
|
|
clip.y1 = clip_y + clip_height;
|
2013-06-03 23:10:19 +04:00
|
|
|
|
2013-09-04 18:13:53 +04:00
|
|
|
switch (tree->flags) {
|
|
|
|
case TREE_SSLCERT:
|
2014-07-21 14:54:21 +04:00
|
|
|
if (ssl_current_session != NULL) {
|
|
|
|
sslcert_viewer_redraw(ssl_current_session, x, y, &clip, ctx);
|
|
|
|
}
|
2013-08-13 17:09:15 +04:00
|
|
|
return true;
|
2013-09-04 18:13:53 +04:00
|
|
|
case TREE_COOKIES:
|
2013-07-26 17:48:26 +04:00
|
|
|
cookie_manager_redraw(x, y, &clip, ctx);
|
|
|
|
return true;
|
2013-09-04 18:13:53 +04:00
|
|
|
case TREE_HISTORY:
|
2013-07-26 17:48:26 +04:00
|
|
|
global_history_redraw(x, y, &clip, ctx);
|
|
|
|
return true;
|
2013-09-04 18:13:53 +04:00
|
|
|
case TREE_HOTLIST:
|
2013-08-15 22:19:24 +04:00
|
|
|
hotlist_redraw(x, y, &clip, ctx);
|
|
|
|
return true;
|
|
|
|
}
|
2013-07-01 17:07:25 +04:00
|
|
|
|
2013-07-26 17:48:26 +04:00
|
|
|
return false;
|
2013-05-31 13:11:22 +04:00
|
|
|
}
|
|
|
|
|
2013-07-01 17:07:25 +04:00
|
|
|
static bool treeview_test_mouse_action(struct tree *tree,
|
2013-05-31 16:26:14 +04:00
|
|
|
browser_mouse_state mouse, int x, int y)
|
|
|
|
{
|
2013-09-04 18:13:53 +04:00
|
|
|
switch (tree->flags) {
|
|
|
|
case TREE_SSLCERT:
|
2014-01-06 17:27:34 +04:00
|
|
|
assert(ssl_current_session != NULL &&
|
|
|
|
"Can't use sslcert window after sslcert_viewer_fini()");
|
2013-08-13 17:09:15 +04:00
|
|
|
sslcert_viewer_mouse_action(ssl_current_session, mouse, x, y);
|
|
|
|
return true;
|
2013-09-04 18:13:53 +04:00
|
|
|
case TREE_COOKIES:
|
2013-07-26 17:48:26 +04:00
|
|
|
cookie_manager_mouse_action(mouse, x, y);
|
|
|
|
return true;
|
2013-09-04 18:13:53 +04:00
|
|
|
case TREE_HISTORY:
|
2013-07-26 17:48:26 +04:00
|
|
|
global_history_mouse_action(mouse, x, y);
|
|
|
|
return true;
|
2013-09-04 18:13:53 +04:00
|
|
|
case TREE_HOTLIST:
|
2013-08-15 22:19:24 +04:00
|
|
|
hotlist_mouse_action(mouse, x, y);
|
|
|
|
return true;
|
|
|
|
}
|
2013-07-01 17:07:25 +04:00
|
|
|
|
2013-07-26 17:48:26 +04:00
|
|
|
return false;
|
2013-05-31 16:26:14 +04:00
|
|
|
}
|
|
|
|
|
2013-07-01 17:07:25 +04:00
|
|
|
static bool treeview_test_keypress(struct tree *tree, uint32_t key)
|
2013-07-01 14:49:14 +04:00
|
|
|
{
|
2013-09-04 18:13:53 +04:00
|
|
|
switch (tree->flags) {
|
|
|
|
case TREE_SSLCERT:
|
2014-01-06 17:27:34 +04:00
|
|
|
assert(ssl_current_session != NULL &&
|
|
|
|
"Can't use sslcert window after sslcert_viewer_fini()");
|
2013-08-13 17:09:15 +04:00
|
|
|
sslcert_viewer_keypress(ssl_current_session, key);
|
|
|
|
return true;
|
2013-09-04 18:13:53 +04:00
|
|
|
case TREE_COOKIES:
|
2013-07-26 17:48:26 +04:00
|
|
|
cookie_manager_keypress(key);
|
|
|
|
return true;
|
2013-09-04 18:13:53 +04:00
|
|
|
case TREE_HISTORY:
|
2013-07-26 17:48:26 +04:00
|
|
|
global_history_keypress(key);
|
|
|
|
return true;
|
2013-09-04 18:13:53 +04:00
|
|
|
case TREE_HOTLIST:
|
2013-08-15 22:19:24 +04:00
|
|
|
hotlist_keypress(key);
|
|
|
|
return true;
|
|
|
|
}
|
2013-07-01 17:07:25 +04:00
|
|
|
|
2013-07-26 17:48:26 +04:00
|
|
|
return false;
|
2013-07-01 14:49:14 +04:00
|
|
|
}
|
|
|
|
|
2013-09-02 19:19:16 +04:00
|
|
|
/* -------------------------------------------------------------------------- */
|
2013-05-31 13:11:22 +04:00
|
|
|
|
2013-09-03 01:58:18 +04:00
|
|
|
/** deprecated compatibility layer for new treeview modules. Do not use. */
|
2010-10-05 23:14:46 +04:00
|
|
|
struct tree *tree_create(unsigned int flags,
|
|
|
|
const struct treeview_table *callbacks, void *client_data)
|
|
|
|
{
|
|
|
|
struct tree *tree;
|
|
|
|
|
|
|
|
tree = calloc(sizeof(struct tree), 1);
|
|
|
|
if (tree == NULL) {
|
2015-05-28 18:08:46 +03:00
|
|
|
LOG("calloc failed");
|
2013-05-04 00:17:11 +04:00
|
|
|
warn_user(messages_get_errorcode(NSERROR_NOMEM), 0);
|
2010-10-05 23:14:46 +04:00
|
|
|
return NULL;
|
|
|
|
}
|
2004-12-09 13:30:44 +03:00
|
|
|
|
2010-10-05 23:14:46 +04:00
|
|
|
tree->flags = flags;
|
|
|
|
tree->drag = TREE_NO_DRAG;
|
|
|
|
tree->callbacks = callbacks;
|
|
|
|
tree->client_data = client_data;
|
|
|
|
|
2013-07-26 17:48:26 +04:00
|
|
|
treeview_test_init(tree);
|
2013-05-31 13:11:22 +04:00
|
|
|
|
2010-10-05 23:14:46 +04:00
|
|
|
return tree;
|
2004-12-09 13:30:44 +03:00
|
|
|
}
|
|
|
|
|
2013-09-03 01:58:18 +04:00
|
|
|
/** deprecated compatibility layer for new treeview modules. Do not use. */
|
2013-09-02 19:19:16 +04:00
|
|
|
void tree_delete(struct tree *tree)
|
2010-10-05 23:14:46 +04:00
|
|
|
{
|
2013-09-02 19:19:16 +04:00
|
|
|
treeview_test_fini(tree);
|
|
|
|
free(tree);
|
2004-12-09 13:30:44 +03:00
|
|
|
}
|
|
|
|
|
2013-09-03 01:58:18 +04:00
|
|
|
/** deprecated compatibility layer for new treeview modules. Do not use. */
|
2013-09-02 19:19:16 +04:00
|
|
|
void tree_draw(struct tree *tree, int x, int y,
|
|
|
|
int clip_x, int clip_y, int clip_width, int clip_height,
|
|
|
|
const struct redraw_context *ctx)
|
2010-10-05 23:14:46 +04:00
|
|
|
{
|
|
|
|
assert(tree != NULL);
|
|
|
|
|
2013-09-02 19:19:16 +04:00
|
|
|
treeview_test_redraw(tree, x, y, clip_x, clip_y,
|
|
|
|
clip_width, clip_height, ctx);
|
2010-10-05 23:14:46 +04:00
|
|
|
}
|
2004-12-09 13:30:44 +03:00
|
|
|
|
2013-09-03 01:58:18 +04:00
|
|
|
/** deprecated compatibility layer for new treeview modules. Do not use. */
|
2013-09-02 19:19:16 +04:00
|
|
|
bool tree_mouse_action(struct tree *tree, browser_mouse_state mouse, int x,
|
|
|
|
int y)
|
2010-10-05 23:14:46 +04:00
|
|
|
{
|
2012-10-11 17:06:48 +04:00
|
|
|
assert(tree != NULL);
|
2010-10-05 23:14:46 +04:00
|
|
|
|
2013-09-02 19:19:16 +04:00
|
|
|
if (treeview_test_mouse_action(tree, mouse, x, y)) {
|
|
|
|
return true;
|
2010-10-05 23:14:46 +04:00
|
|
|
}
|
|
|
|
|
2013-09-02 19:19:16 +04:00
|
|
|
return false;
|
2004-12-09 13:30:44 +03:00
|
|
|
}
|
|
|
|
|
2013-09-03 01:58:18 +04:00
|
|
|
/** deprecated compatibility layer for new treeview modules. Do not use. */
|
2013-09-02 19:19:16 +04:00
|
|
|
void tree_drag_end(struct tree *tree, browser_mouse_state mouse, int x0, int y0,
|
|
|
|
int x1, int y1)
|
2010-10-05 23:14:46 +04:00
|
|
|
{
|
2013-09-02 19:19:16 +04:00
|
|
|
assert(tree != NULL);
|
2004-12-09 13:30:44 +03:00
|
|
|
|
2013-09-02 19:19:16 +04:00
|
|
|
treeview_test_mouse_action(tree, BROWSER_MOUSE_HOVER, x1, y1);
|
2004-12-09 13:30:44 +03:00
|
|
|
}
|
|
|
|
|
2013-09-03 01:58:18 +04:00
|
|
|
/** deprecated compatibility layer for new treeview modules. Do not use. */
|
2013-09-02 19:19:16 +04:00
|
|
|
bool tree_keypress(struct tree *tree, uint32_t key)
|
2010-10-05 23:14:46 +04:00
|
|
|
{
|
2013-09-02 19:19:16 +04:00
|
|
|
if (treeview_test_keypress(tree, key)) {
|
|
|
|
return true;
|
2011-06-05 00:46:08 +04:00
|
|
|
}
|
2010-10-05 23:14:46 +04:00
|
|
|
|
2013-09-02 19:19:16 +04:00
|
|
|
return false;
|
2004-12-13 16:48:56 +03:00
|
|
|
}
|
|
|
|
|
2013-09-03 01:58:18 +04:00
|
|
|
/** deprecated compatibility layer for new treeview modules. Do not use. */
|
2013-09-02 19:19:16 +04:00
|
|
|
tree_drag_type tree_drag_status(struct tree *tree)
|
2010-10-05 23:14:46 +04:00
|
|
|
{
|
|
|
|
assert(tree != NULL);
|
2010-10-29 21:40:36 +04:00
|
|
|
return tree->drag;
|
|
|
|
}
|