comparison src/scrollbar-gtk.c @ 5178:97eb4942aec8

merge
author Ben Wing <ben@xemacs.org>
date Mon, 29 Mar 2010 21:28:13 -0500
parents 5ddbab03b0e6
children 308d34e9f07d
comparison
equal deleted inserted replaced
5177:b785049378e3 5178:97eb4942aec8
1 /* scrollbar implementation -- GTK interface. 1 /* scrollbar implementation -- GTK interface.
2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. 2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
3 Copyright (C) 1994 Amdhal Corporation. 3 Copyright (C) 1994 Amdhal Corporation.
4 Copyright (C) 1995 Sun Microsystems, Inc. 4 Copyright (C) 1995 Sun Microsystems, Inc.
5 Copyright (C) 1995 Darrell Kindred <dkindred+@cmu.edu>. 5 Copyright (C) 1995 Darrell Kindred <dkindred+@cmu.edu>.
6 Copyright (C) 2010 Ben Wing.
6 7
7 This file is part of XEmacs. 8 This file is part of XEmacs.
8 9
9 XEmacs is free software; you can redistribute it and/or modify it 10 XEmacs is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License as published by the 11 under the terms of the GNU General Public License as published by the
63 gtk_widget_hide_all (SCROLLBAR_GTK_WIDGET (instance)); 64 gtk_widget_hide_all (SCROLLBAR_GTK_WIDGET (instance));
64 gtk_widget_destroy (SCROLLBAR_GTK_WIDGET (instance)); 65 gtk_widget_destroy (SCROLLBAR_GTK_WIDGET (instance));
65 } 66 }
66 67
67 xfree (instance->scrollbar_data); 68 xfree (instance->scrollbar_data);
69 instance->scrollbar_data = 0;
68 } 70 }
69 } 71 }
70 72
71 /* A device method. */ 73 /* A device method. */
72 static void 74 static void
472 XWINDOW_MIRROR (f->root_mirror), 474 XWINDOW_MIRROR (f->root_mirror),
473 0, (GdkWindow *) NULL); 475 0, (GdkWindow *) NULL);
474 } 476 }
475 477
476 #ifdef MEMORY_USAGE_STATS 478 #ifdef MEMORY_USAGE_STATS
477 static int 479 static Bytecount
478 gtk_compute_scrollbar_instance_usage (struct device *UNUSED (d), 480 gtk_compute_scrollbar_instance_usage (struct device *UNUSED (d),
479 struct scrollbar_instance *inst, 481 struct scrollbar_instance *inst,
480 struct overhead_stats *ovstats) 482 struct usage_stats *ustats)
481 { 483 {
482 int total = 0; 484 struct gtk_scrollbar_data *data =
483 485 (struct gtk_scrollbar_data *) inst->scrollbar_data;
484 while (inst) 486
485 { 487 return malloced_storage_size (data, sizeof (*data), ustats);
486 struct gtk_scrollbar_data *data =
487 (struct gtk_scrollbar_data *) inst->scrollbar_data;
488
489 total += malloced_storage_size (data, sizeof (*data), ovstats);
490 inst = inst->next;
491 }
492
493 return total;
494 } 488 }
495 489
496 #endif /* MEMORY_USAGE_STATS */ 490 #endif /* MEMORY_USAGE_STATS */
497 491
498 492