/usr/include/d/gtkd-3/atk/TableT.d is in libgtkd-3-dev 3.7.5-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 | /*
* This file is part of gtkD.
*
* gtkD is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version, with
* some exceptions, please read the COPYING file.
*
* gtkD 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with gtkD; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
*/
// generated automatically - do not change
// find conversion definition on APILookup.txt
// implement new conversion functionalities on the wrap.utils pakage
module atk.TableT;
public import atk.ObjectAtk;
public import atk.c.functions;
public import atk.c.types;
public import glib.Str;
public import gobject.ObjectG;
public import gobject.Signals;
public import gtkc.atktypes;
public import std.algorithm;
/**
* #AtkTable should be implemented by components which present
* elements ordered via rows and columns. It may also be used to
* present tree-structured information if the nodes of the trees can
* be said to contain multiple "columns". Individual elements of an
* #AtkTable are typically referred to as "cells". Those cells should
* implement the interface #AtkTableCell, but #Atk doesn't require
* them to be direct children of the current #AtkTable. They can be
* grand-children, grand-grand-children etc. #AtkTable provides the
* API needed to get a individual cell based on the row and column
* numbers.
*
* Children of #AtkTable are frequently "lightweight" objects, that
* is, they may not have backing widgets in the host UI toolkit. They
* are therefore often transient.
*
* Since tables are often very complex, #AtkTable includes provision
* for offering simplified summary information, as well as row and
* column headers and captions. Headers and captions are #AtkObjects
* which may implement other interfaces (#AtkText, #AtkImage, etc.) as
* appropriate. #AtkTable summaries may themselves be (simplified)
* #AtkTables, etc.
*
* Note for implementors: in the past, #AtkTable required that all the
* cells should be direct children of #AtkTable, and provided some
* index based methods to request the cells. The practice showed that
* that forcing made #AtkTable implementation complex, and hard to
* expose other kind of children, like rows or captions. Right now,
* index-based methods are deprecated.
*/
public template TableT(TStruct)
{
/** Get the main Gtk struct */
public AtkTable* getTableStruct(bool transferOwnership = false)
{
if (transferOwnership)
ownedRef = false;
return cast(AtkTable*)getStruct();
}
/**
* Adds the specified @column to the selection.
*
* Params:
* column = a #gint representing a column in @table
*
* Returns: a gboolean representing if the column was successfully added to
* the selection, or 0 if value does not implement this interface.
*/
public bool addColumnSelection(int column)
{
return atk_table_add_column_selection(getTableStruct(), column) != 0;
}
/**
* Adds the specified @row to the selection.
*
* Params:
* row = a #gint representing a row in @table
*
* Returns: a gboolean representing if row was successfully added to selection,
* or 0 if value does not implement this interface.
*/
public bool addRowSelection(int row)
{
return atk_table_add_row_selection(getTableStruct(), row) != 0;
}
/**
* Gets the caption for the @table.
*
* Returns: a AtkObject* representing the
* table caption, or %NULL if value does not implement this interface.
*/
public ObjectAtk getCaption()
{
auto p = atk_table_get_caption(getTableStruct());
if(p is null)
{
return null;
}
return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p);
}
/**
* Gets a #gint representing the column at the specified @index_.
*
* Deprecated: Since 2.12.
*
* Params:
* index = a #gint representing an index in @table
*
* Returns: a gint representing the column at the specified index,
* or -1 if the table does not implement this method.
*/
public int getColumnAtIndex(int index)
{
return atk_table_get_column_at_index(getTableStruct(), index);
}
/**
* Gets the description text of the specified @column in the table
*
* Params:
* column = a #gint representing a column in @table
*
* Returns: a gchar* representing the column description, or %NULL
* if value does not implement this interface.
*/
public string getColumnDescription(int column)
{
return Str.toString(atk_table_get_column_description(getTableStruct(), column));
}
/**
* Gets the number of columns occupied by the accessible object
* at the specified @row and @column in the @table.
*
* Params:
* row = a #gint representing a row in @table
* column = a #gint representing a column in @table
*
* Returns: a gint representing the column extent at specified position, or 0
* if value does not implement this interface.
*/
public int getColumnExtentAt(int row, int column)
{
return atk_table_get_column_extent_at(getTableStruct(), row, column);
}
/**
* Gets the column header of a specified column in an accessible table.
*
* Params:
* column = a #gint representing a column in the table
*
* Returns: a AtkObject* representing the
* specified column header, or %NULL if value does not implement this
* interface.
*/
public ObjectAtk getColumnHeader(int column)
{
auto p = atk_table_get_column_header(getTableStruct(), column);
if(p is null)
{
return null;
}
return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p);
}
/**
* Gets a #gint representing the index at the specified @row and
* @column.
*
* Deprecated: Since 2.12. Use atk_table_ref_at() in order to get the
* accessible that represents the cell at (@row, @column)
*
* Params:
* row = a #gint representing a row in @table
* column = a #gint representing a column in @table
*
* Returns: a #gint representing the index at specified position.
* The value -1 is returned if the object at row,column is not a child
* of table or table does not implement this interface.
*/
public int getIndexAt(int row, int column)
{
return atk_table_get_index_at(getTableStruct(), row, column);
}
/**
* Gets the number of columns in the table.
*
* Returns: a gint representing the number of columns, or 0
* if value does not implement this interface.
*/
public int getNColumns()
{
return atk_table_get_n_columns(getTableStruct());
}
/**
* Gets the number of rows in the table.
*
* Returns: a gint representing the number of rows, or 0
* if value does not implement this interface.
*/
public int getNRows()
{
return atk_table_get_n_rows(getTableStruct());
}
/**
* Gets a #gint representing the row at the specified @index_.
*
* Deprecated: since 2.12.
*
* Params:
* index = a #gint representing an index in @table
*
* Returns: a gint representing the row at the specified index,
* or -1 if the table does not implement this method.
*/
public int getRowAtIndex(int index)
{
return atk_table_get_row_at_index(getTableStruct(), index);
}
/**
* Gets the description text of the specified row in the table
*
* Params:
* row = a #gint representing a row in @table
*
* Returns: a gchar* representing the row description, or
* %NULL if value does not implement this interface.
*/
public string getRowDescription(int row)
{
return Str.toString(atk_table_get_row_description(getTableStruct(), row));
}
/**
* Gets the number of rows occupied by the accessible object
* at a specified @row and @column in the @table.
*
* Params:
* row = a #gint representing a row in @table
* column = a #gint representing a column in @table
*
* Returns: a gint representing the row extent at specified position, or 0
* if value does not implement this interface.
*/
public int getRowExtentAt(int row, int column)
{
return atk_table_get_row_extent_at(getTableStruct(), row, column);
}
/**
* Gets the row header of a specified row in an accessible table.
*
* Params:
* row = a #gint representing a row in the table
*
* Returns: a AtkObject* representing the
* specified row header, or %NULL if value does not implement this
* interface.
*/
public ObjectAtk getRowHeader(int row)
{
auto p = atk_table_get_row_header(getTableStruct(), row);
if(p is null)
{
return null;
}
return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p);
}
/**
* Gets the selected columns of the table by initializing **selected with
* the selected column numbers. This array should be freed by the caller.
*
* Params:
* selected = a #gint** that is to contain the selected columns numbers
*
* Returns: a gint representing the number of selected columns,
* or %0 if value does not implement this interface.
*/
public int getSelectedColumns(int** selected)
{
return atk_table_get_selected_columns(getTableStruct(), selected);
}
/**
* Gets the selected rows of the table by initializing **selected with
* the selected row numbers. This array should be freed by the caller.
*
* Params:
* selected = a #gint** that is to contain the selected row numbers
*
* Returns: a gint representing the number of selected rows,
* or zero if value does not implement this interface.
*/
public int getSelectedRows(int** selected)
{
return atk_table_get_selected_rows(getTableStruct(), selected);
}
/**
* Gets the summary description of the table.
*
* Returns: a AtkObject* representing a summary description
* of the table, or zero if value does not implement this interface.
*/
public ObjectAtk getSummary()
{
auto p = atk_table_get_summary(getTableStruct());
if(p is null)
{
return null;
}
return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p, true);
}
/**
* Gets a boolean value indicating whether the specified @column
* is selected
*
* Params:
* column = a #gint representing a column in @table
*
* Returns: a gboolean representing if the column is selected, or 0
* if value does not implement this interface.
*/
public bool isColumnSelected(int column)
{
return atk_table_is_column_selected(getTableStruct(), column) != 0;
}
/**
* Gets a boolean value indicating whether the specified @row
* is selected
*
* Params:
* row = a #gint representing a row in @table
*
* Returns: a gboolean representing if the row is selected, or 0
* if value does not implement this interface.
*/
public bool isRowSelected(int row)
{
return atk_table_is_row_selected(getTableStruct(), row) != 0;
}
/**
* Gets a boolean value indicating whether the accessible object
* at the specified @row and @column is selected
*
* Params:
* row = a #gint representing a row in @table
* column = a #gint representing a column in @table
*
* Returns: a gboolean representing if the cell is selected, or 0
* if value does not implement this interface.
*/
public bool isSelected(int row, int column)
{
return atk_table_is_selected(getTableStruct(), row, column) != 0;
}
/**
* Get a reference to the table cell at @row, @column. This cell
* should implement the interface #AtkTableCell
*
* Params:
* row = a #gint representing a row in @table
* column = a #gint representing a column in @table
*
* Returns: an #AtkObject representing the referred
* to accessible
*/
public ObjectAtk refAt(int row, int column)
{
auto p = atk_table_ref_at(getTableStruct(), row, column);
if(p is null)
{
return null;
}
return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p, true);
}
/**
* Adds the specified @column to the selection.
*
* Params:
* column = a #gint representing a column in @table
*
* Returns: a gboolean representing if the column was successfully removed from
* the selection, or 0 if value does not implement this interface.
*/
public bool removeColumnSelection(int column)
{
return atk_table_remove_column_selection(getTableStruct(), column) != 0;
}
/**
* Removes the specified @row from the selection.
*
* Params:
* row = a #gint representing a row in @table
*
* Returns: a gboolean representing if the row was successfully removed from
* the selection, or 0 if value does not implement this interface.
*/
public bool removeRowSelection(int row)
{
return atk_table_remove_row_selection(getTableStruct(), row) != 0;
}
/**
* Sets the caption for the table.
*
* Params:
* caption = a #AtkObject representing the caption to set for @table
*/
public void setCaption(ObjectAtk caption)
{
atk_table_set_caption(getTableStruct(), (caption is null) ? null : caption.getObjectAtkStruct());
}
/**
* Sets the description text for the specified @column of the @table.
*
* Params:
* column = a #gint representing a column in @table
* description = a #gchar representing the description text
* to set for the specified @column of the @table
*/
public void setColumnDescription(int column, string description)
{
atk_table_set_column_description(getTableStruct(), column, Str.toStringz(description));
}
/**
* Sets the specified column header to @header.
*
* Params:
* column = a #gint representing a column in @table
* header = an #AtkTable
*/
public void setColumnHeader(int column, ObjectAtk header)
{
atk_table_set_column_header(getTableStruct(), column, (header is null) ? null : header.getObjectAtkStruct());
}
/**
* Sets the description text for the specified @row of @table.
*
* Params:
* row = a #gint representing a row in @table
* description = a #gchar representing the description text
* to set for the specified @row of @table
*/
public void setRowDescription(int row, string description)
{
atk_table_set_row_description(getTableStruct(), row, Str.toStringz(description));
}
/**
* Sets the specified row header to @header.
*
* Params:
* row = a #gint representing a row in @table
* header = an #AtkTable
*/
public void setRowHeader(int row, ObjectAtk header)
{
atk_table_set_row_header(getTableStruct(), row, (header is null) ? null : header.getObjectAtkStruct());
}
/**
* Sets the summary description of the table.
*
* Params:
* accessible = an #AtkObject representing the summary description
* to set for @table
*/
public void setSummary(ObjectAtk accessible)
{
atk_table_set_summary(getTableStruct(), (accessible is null) ? null : accessible.getObjectAtkStruct());
}
protected class OnColumnDeletedDelegateWrapper
{
void delegate(int, int, TableIF) dlg;
gulong handlerId;
this(void delegate(int, int, TableIF) dlg)
{
this.dlg = dlg;
onColumnDeletedListeners ~= this;
}
void remove(OnColumnDeletedDelegateWrapper source)
{
foreach(index, wrapper; onColumnDeletedListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onColumnDeletedListeners[index] = null;
onColumnDeletedListeners = std.algorithm.remove(onColumnDeletedListeners, index);
break;
}
}
}
}
OnColumnDeletedDelegateWrapper[] onColumnDeletedListeners;
/**
* The "column-deleted" signal is emitted by an object which
* implements the AtkTable interface when a column is deleted.
*
* Params:
* arg1 = The index of the first column deleted.
* arg2 = The number of columns deleted.
*/
gulong addOnColumnDeleted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnColumnDeletedDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"column-deleted",
cast(GCallback)&callBackColumnDeleted,
cast(void*)wrapper,
cast(GClosureNotify)&callBackColumnDeletedDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackColumnDeleted(AtkTable* tableStruct, int arg1, int arg2, OnColumnDeletedDelegateWrapper wrapper)
{
wrapper.dlg(arg1, arg2, wrapper.outer);
}
extern(C) static void callBackColumnDeletedDestroy(OnColumnDeletedDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
protected class OnColumnInsertedDelegateWrapper
{
void delegate(int, int, TableIF) dlg;
gulong handlerId;
this(void delegate(int, int, TableIF) dlg)
{
this.dlg = dlg;
onColumnInsertedListeners ~= this;
}
void remove(OnColumnInsertedDelegateWrapper source)
{
foreach(index, wrapper; onColumnInsertedListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onColumnInsertedListeners[index] = null;
onColumnInsertedListeners = std.algorithm.remove(onColumnInsertedListeners, index);
break;
}
}
}
}
OnColumnInsertedDelegateWrapper[] onColumnInsertedListeners;
/**
* The "column-inserted" signal is emitted by an object which
* implements the AtkTable interface when a column is inserted.
*
* Params:
* arg1 = The index of the column inserted.
* arg2 = The number of colums inserted.
*/
gulong addOnColumnInserted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnColumnInsertedDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"column-inserted",
cast(GCallback)&callBackColumnInserted,
cast(void*)wrapper,
cast(GClosureNotify)&callBackColumnInsertedDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackColumnInserted(AtkTable* tableStruct, int arg1, int arg2, OnColumnInsertedDelegateWrapper wrapper)
{
wrapper.dlg(arg1, arg2, wrapper.outer);
}
extern(C) static void callBackColumnInsertedDestroy(OnColumnInsertedDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
protected class OnColumnReorderedDelegateWrapper
{
void delegate(TableIF) dlg;
gulong handlerId;
this(void delegate(TableIF) dlg)
{
this.dlg = dlg;
onColumnReorderedListeners ~= this;
}
void remove(OnColumnReorderedDelegateWrapper source)
{
foreach(index, wrapper; onColumnReorderedListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onColumnReorderedListeners[index] = null;
onColumnReorderedListeners = std.algorithm.remove(onColumnReorderedListeners, index);
break;
}
}
}
}
OnColumnReorderedDelegateWrapper[] onColumnReorderedListeners;
/**
* The "column-reordered" signal is emitted by an object which
* implements the AtkTable interface when the columns are
* reordered.
*/
gulong addOnColumnReordered(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnColumnReorderedDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"column-reordered",
cast(GCallback)&callBackColumnReordered,
cast(void*)wrapper,
cast(GClosureNotify)&callBackColumnReorderedDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackColumnReordered(AtkTable* tableStruct, OnColumnReorderedDelegateWrapper wrapper)
{
wrapper.dlg(wrapper.outer);
}
extern(C) static void callBackColumnReorderedDestroy(OnColumnReorderedDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
protected class OnModelChangedDelegateWrapper
{
void delegate(TableIF) dlg;
gulong handlerId;
this(void delegate(TableIF) dlg)
{
this.dlg = dlg;
onModelChangedListeners ~= this;
}
void remove(OnModelChangedDelegateWrapper source)
{
foreach(index, wrapper; onModelChangedListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onModelChangedListeners[index] = null;
onModelChangedListeners = std.algorithm.remove(onModelChangedListeners, index);
break;
}
}
}
}
OnModelChangedDelegateWrapper[] onModelChangedListeners;
/**
* The "model-changed" signal is emitted by an object which
* implements the AtkTable interface when the model displayed by
* the table changes.
*/
gulong addOnModelChanged(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnModelChangedDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"model-changed",
cast(GCallback)&callBackModelChanged,
cast(void*)wrapper,
cast(GClosureNotify)&callBackModelChangedDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackModelChanged(AtkTable* tableStruct, OnModelChangedDelegateWrapper wrapper)
{
wrapper.dlg(wrapper.outer);
}
extern(C) static void callBackModelChangedDestroy(OnModelChangedDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
protected class OnRowDeletedDelegateWrapper
{
void delegate(int, int, TableIF) dlg;
gulong handlerId;
this(void delegate(int, int, TableIF) dlg)
{
this.dlg = dlg;
onRowDeletedListeners ~= this;
}
void remove(OnRowDeletedDelegateWrapper source)
{
foreach(index, wrapper; onRowDeletedListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onRowDeletedListeners[index] = null;
onRowDeletedListeners = std.algorithm.remove(onRowDeletedListeners, index);
break;
}
}
}
}
OnRowDeletedDelegateWrapper[] onRowDeletedListeners;
/**
* The "row-deleted" signal is emitted by an object which
* implements the AtkTable interface when a row is deleted.
*
* Params:
* arg1 = The index of the first row deleted.
* arg2 = The number of rows deleted.
*/
gulong addOnRowDeleted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnRowDeletedDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"row-deleted",
cast(GCallback)&callBackRowDeleted,
cast(void*)wrapper,
cast(GClosureNotify)&callBackRowDeletedDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackRowDeleted(AtkTable* tableStruct, int arg1, int arg2, OnRowDeletedDelegateWrapper wrapper)
{
wrapper.dlg(arg1, arg2, wrapper.outer);
}
extern(C) static void callBackRowDeletedDestroy(OnRowDeletedDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
protected class OnRowInsertedDelegateWrapper
{
void delegate(int, int, TableIF) dlg;
gulong handlerId;
this(void delegate(int, int, TableIF) dlg)
{
this.dlg = dlg;
onRowInsertedListeners ~= this;
}
void remove(OnRowInsertedDelegateWrapper source)
{
foreach(index, wrapper; onRowInsertedListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onRowInsertedListeners[index] = null;
onRowInsertedListeners = std.algorithm.remove(onRowInsertedListeners, index);
break;
}
}
}
}
OnRowInsertedDelegateWrapper[] onRowInsertedListeners;
/**
* The "row-inserted" signal is emitted by an object which
* implements the AtkTable interface when a row is inserted.
*
* Params:
* arg1 = The index of the first row inserted.
* arg2 = The number of rows inserted.
*/
gulong addOnRowInserted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnRowInsertedDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"row-inserted",
cast(GCallback)&callBackRowInserted,
cast(void*)wrapper,
cast(GClosureNotify)&callBackRowInsertedDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackRowInserted(AtkTable* tableStruct, int arg1, int arg2, OnRowInsertedDelegateWrapper wrapper)
{
wrapper.dlg(arg1, arg2, wrapper.outer);
}
extern(C) static void callBackRowInsertedDestroy(OnRowInsertedDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
protected class OnRowReorderedDelegateWrapper
{
void delegate(TableIF) dlg;
gulong handlerId;
this(void delegate(TableIF) dlg)
{
this.dlg = dlg;
onRowReorderedListeners ~= this;
}
void remove(OnRowReorderedDelegateWrapper source)
{
foreach(index, wrapper; onRowReorderedListeners)
{
if (wrapper.handlerId == source.handlerId)
{
onRowReorderedListeners[index] = null;
onRowReorderedListeners = std.algorithm.remove(onRowReorderedListeners, index);
break;
}
}
}
}
OnRowReorderedDelegateWrapper[] onRowReorderedListeners;
/**
* The "row-reordered" signal is emitted by an object which
* implements the AtkTable interface when the rows are
* reordered.
*/
gulong addOnRowReordered(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
auto wrapper = new OnRowReorderedDelegateWrapper(dlg);
wrapper.handlerId = Signals.connectData(
this,
"row-reordered",
cast(GCallback)&callBackRowReordered,
cast(void*)wrapper,
cast(GClosureNotify)&callBackRowReorderedDestroy,
connectFlags);
return wrapper.handlerId;
}
extern(C) static void callBackRowReordered(AtkTable* tableStruct, OnRowReorderedDelegateWrapper wrapper)
{
wrapper.dlg(wrapper.outer);
}
extern(C) static void callBackRowReorderedDestroy(OnRowReorderedDelegateWrapper wrapper, GClosure* closure)
{
wrapper.remove(wrapper);
}
}
|