1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD 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 Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 /* 25 * Conversion parameters: 26 * inFile = GtkSourceGutterRenderer.html 27 * outPack = gsv 28 * outFile = SourceGutterRenderer 29 * strct = GtkSourceGutterRenderer 30 * realStrct= 31 * ctorStrct= 32 * clss = SourceGutterRenderer 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = GObject 38 * implements: 39 * prefixes: 40 * - gtk_source_gutter_renderer_ 41 * omit structs: 42 * omit prefixes: 43 * omit code: 44 * omit signals: 45 * imports: 46 * - cairo.Context 47 * - gdk.Event 48 * - gdk.RGBA 49 * - gtk.TextIter 50 * - gtk.TextView 51 * - gtk.Tooltip 52 * structWrap: 53 * - GdkEvent* -> Event 54 * - GdkRGBA* -> RGBA 55 * - GtkSourceGutterRenderer* -> SourceGutterRenderer 56 * - GtkTextIter* -> TextIter 57 * - GtkTextView* -> TextView 58 * - GtkTooltip* -> Tooltip 59 * - cairo_t* -> Context 60 * module aliases: 61 * local aliases: 62 * overrides: 63 */ 64 65 module gsv.SourceGutterRenderer; 66 67 public import gsvc.gsvtypes; 68 69 private import gsvc.gsv; 70 private import glib.ConstructionException; 71 private import gobject.ObjectG; 72 73 private import gobject.Signals; 74 public import gtkc.gdktypes; 75 76 private import cairo.Context; 77 private import gdk.Event; 78 private import gdk.RGBA; 79 private import gtk.TextIter; 80 private import gtk.TextView; 81 private import gtk.Tooltip; 82 83 84 85 private import gobject.ObjectG; 86 87 /** 88 */ 89 public class SourceGutterRenderer : ObjectG 90 { 91 92 /** the main Gtk struct */ 93 protected GtkSourceGutterRenderer* gtkSourceGutterRenderer; 94 95 96 public GtkSourceGutterRenderer* getSourceGutterRendererStruct() 97 { 98 return gtkSourceGutterRenderer; 99 } 100 101 102 /** the main Gtk struct as a void* */ 103 protected override void* getStruct() 104 { 105 return cast(void*)gtkSourceGutterRenderer; 106 } 107 108 /** 109 * Sets our main struct and passes it to the parent class 110 */ 111 public this (GtkSourceGutterRenderer* gtkSourceGutterRenderer) 112 { 113 super(cast(GObject*)gtkSourceGutterRenderer); 114 this.gtkSourceGutterRenderer = gtkSourceGutterRenderer; 115 } 116 117 protected override void setStruct(GObject* obj) 118 { 119 super.setStruct(obj); 120 gtkSourceGutterRenderer = cast(GtkSourceGutterRenderer*)obj; 121 } 122 123 /** 124 */ 125 int[string] connectedSignals; 126 127 void delegate(TextIter, GdkRectangle*, Event, SourceGutterRenderer)[] onActivateListeners; 128 /** 129 * The ::activate signal is emitted when the renderer is 130 * activated. 131 */ 132 void addOnActivate(void delegate(TextIter, GdkRectangle*, Event, SourceGutterRenderer) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 133 { 134 if ( !("activate" in connectedSignals) ) 135 { 136 Signals.connectData( 137 getStruct(), 138 "activate", 139 cast(GCallback)&callBackActivate, 140 cast(void*)this, 141 null, 142 connectFlags); 143 connectedSignals["activate"] = 1; 144 } 145 onActivateListeners ~= dlg; 146 } 147 extern(C) static void callBackActivate(GtkSourceGutterRenderer* rendererStruct, GtkTextIter* iter, GdkRectangle* area, GdkEvent* event, SourceGutterRenderer _sourceGutterRenderer) 148 { 149 foreach ( void delegate(TextIter, GdkRectangle*, Event, SourceGutterRenderer) dlg ; _sourceGutterRenderer.onActivateListeners ) 150 { 151 dlg(ObjectG.getDObject!(TextIter)(iter), area, ObjectG.getDObject!(Event)(event), _sourceGutterRenderer); 152 } 153 } 154 155 bool delegate(TextIter, GdkRectangle*, Event, SourceGutterRenderer)[] onQueryActivatableListeners; 156 /** 157 * The ::query-activatable signal is emitted when the renderer 158 * can possibly be activated. 159 */ 160 void addOnQueryActivatable(bool delegate(TextIter, GdkRectangle*, Event, SourceGutterRenderer) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 161 { 162 if ( !("query-activatable" in connectedSignals) ) 163 { 164 Signals.connectData( 165 getStruct(), 166 "query-activatable", 167 cast(GCallback)&callBackQueryActivatable, 168 cast(void*)this, 169 null, 170 connectFlags); 171 connectedSignals["query-activatable"] = 1; 172 } 173 onQueryActivatableListeners ~= dlg; 174 } 175 extern(C) static gboolean callBackQueryActivatable(GtkSourceGutterRenderer* rendererStruct, GtkTextIter* iter, GdkRectangle* area, GdkEvent* event, SourceGutterRenderer _sourceGutterRenderer) 176 { 177 foreach ( bool delegate(TextIter, GdkRectangle*, Event, SourceGutterRenderer) dlg ; _sourceGutterRenderer.onQueryActivatableListeners ) 178 { 179 if ( dlg(ObjectG.getDObject!(TextIter)(iter), area, ObjectG.getDObject!(Event)(event), _sourceGutterRenderer) ) 180 { 181 return 1; 182 } 183 } 184 185 return 0; 186 } 187 188 void delegate(TextIter, TextIter, GtkSourceGutterRendererState, SourceGutterRenderer)[] onQueryDataListeners; 189 /** 190 * The ::query-data signal is emitted when the renderer needs 191 * to be filled with data just before a cell is drawn. This can 192 * be used by general renderer implementations to allow render 193 * data to be filled in externally. 194 */ 195 void addOnQueryData(void delegate(TextIter, TextIter, GtkSourceGutterRendererState, SourceGutterRenderer) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 196 { 197 if ( !("query-data" in connectedSignals) ) 198 { 199 Signals.connectData( 200 getStruct(), 201 "query-data", 202 cast(GCallback)&callBackQueryData, 203 cast(void*)this, 204 null, 205 connectFlags); 206 connectedSignals["query-data"] = 1; 207 } 208 onQueryDataListeners ~= dlg; 209 } 210 extern(C) static void callBackQueryData(GtkSourceGutterRenderer* rendererStruct, GtkTextIter* start, GtkTextIter* end, GtkSourceGutterRendererState state, SourceGutterRenderer _sourceGutterRenderer) 211 { 212 foreach ( void delegate(TextIter, TextIter, GtkSourceGutterRendererState, SourceGutterRenderer) dlg ; _sourceGutterRenderer.onQueryDataListeners ) 213 { 214 dlg(ObjectG.getDObject!(TextIter)(start), ObjectG.getDObject!(TextIter)(end), state, _sourceGutterRenderer); 215 } 216 } 217 218 bool delegate(TextIter, GdkRectangle*, gint, gint, Tooltip, SourceGutterRenderer)[] onQueryTooltipListeners; 219 /** 220 * The ::query-tooltip signal is emitted when the renderer can 221 * show a tooltip. 222 */ 223 void addOnQueryTooltip(bool delegate(TextIter, GdkRectangle*, gint, gint, Tooltip, SourceGutterRenderer) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 224 { 225 if ( !("query-tooltip" in connectedSignals) ) 226 { 227 Signals.connectData( 228 getStruct(), 229 "query-tooltip", 230 cast(GCallback)&callBackQueryTooltip, 231 cast(void*)this, 232 null, 233 connectFlags); 234 connectedSignals["query-tooltip"] = 1; 235 } 236 onQueryTooltipListeners ~= dlg; 237 } 238 extern(C) static gboolean callBackQueryTooltip(GtkSourceGutterRenderer* rendererStruct, GtkTextIter* iter, GdkRectangle* area, gint x, gint y, GtkTooltip* tooltip, SourceGutterRenderer _sourceGutterRenderer) 239 { 240 foreach ( bool delegate(TextIter, GdkRectangle*, gint, gint, Tooltip, SourceGutterRenderer) dlg ; _sourceGutterRenderer.onQueryTooltipListeners ) 241 { 242 if ( dlg(ObjectG.getDObject!(TextIter)(iter), area, x, y, ObjectG.getDObject!(Tooltip)(tooltip), _sourceGutterRenderer) ) 243 { 244 return 1; 245 } 246 } 247 248 return 0; 249 } 250 251 void delegate(SourceGutterRenderer)[] onQueueDrawListeners; 252 /** 253 * The ::queue-draw signal is emitted when the renderer needs 254 * to be redrawn. Use gtk_source_gutter_renderer_queue_draw() 255 * to emit this signal from an implementation of the 256 * GtkSourceGutterRenderer interface. 257 */ 258 void addOnQueueDraw(void delegate(SourceGutterRenderer) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 259 { 260 if ( !("queue-draw" in connectedSignals) ) 261 { 262 Signals.connectData( 263 getStruct(), 264 "queue-draw", 265 cast(GCallback)&callBackQueueDraw, 266 cast(void*)this, 267 null, 268 connectFlags); 269 connectedSignals["queue-draw"] = 1; 270 } 271 onQueueDrawListeners ~= dlg; 272 } 273 extern(C) static void callBackQueueDraw(GtkSourceGutterRenderer* rendererStruct, SourceGutterRenderer _sourceGutterRenderer) 274 { 275 foreach ( void delegate(SourceGutterRenderer) dlg ; _sourceGutterRenderer.onQueueDrawListeners ) 276 { 277 dlg(_sourceGutterRenderer); 278 } 279 } 280 281 282 /** 283 * Called when drawing a region begins. The region to be drawn is indicated 284 * by start and end. The purpose is to allow the implementation to precompute 285 * some state before the ::draw method is called for each cell. 286 * Params: 287 * cr = a cairo_t 288 * backgroundArea = a GdkRectangle 289 * cellArea = a GdkRectangle 290 * start = a GtkTextIter 291 * end = a GtkTextIter 292 */ 293 public void begin(Context cr, ref Rectangle backgroundArea, ref Rectangle cellArea, TextIter start, TextIter end) 294 { 295 // void gtk_source_gutter_renderer_begin (GtkSourceGutterRenderer *renderer, cairo_t *cr, GdkRectangle *background_area, GdkRectangle *cell_area, GtkTextIter *start, GtkTextIter *end); 296 gtk_source_gutter_renderer_begin(gtkSourceGutterRenderer, (cr is null) ? null : cr.getContextStruct(), &backgroundArea, &cellArea, (start is null) ? null : start.getTextIterStruct(), (end is null) ? null : end.getTextIterStruct()); 297 } 298 299 /** 300 * Main renderering method. Implementations should implement this method to 301 * draw onto the cairo context. The background_area indicates total area of 302 * the cell (without padding or margin) to be drawn. The cell_area indicates 303 * the area where content can be drawn (text, images, etc). 304 * The state argument indicates the current state of the renderer and should 305 * be taken into account to properly draw the different possible states 306 * (cursor, prelit, selected) if appropriate. 307 * Params: 308 * cr = the cairo render context 309 * backgroundArea = a GdkRectangle indicating the total area to be drawn 310 * cellArea = a GdkRectangle indicating the area to draw content 311 * start = a GtkTextIter 312 * end = a GtkTextIter 313 * state = a GtkSourceGutterRendererState 314 */ 315 public void draw(Context cr, ref Rectangle backgroundArea, ref Rectangle cellArea, TextIter start, TextIter end, GtkSourceGutterRendererState state) 316 { 317 // void gtk_source_gutter_renderer_draw (GtkSourceGutterRenderer *renderer, cairo_t *cr, GdkRectangle *background_area, GdkRectangle *cell_area, GtkTextIter *start, GtkTextIter *end, GtkSourceGutterRendererState state); 318 gtk_source_gutter_renderer_draw(gtkSourceGutterRenderer, (cr is null) ? null : cr.getContextStruct(), &backgroundArea, &cellArea, (start is null) ? null : start.getTextIterStruct(), (end is null) ? null : end.getTextIterStruct(), state); 319 } 320 321 /** 322 * Called when drawing a region of lines has ended. 323 */ 324 public void end() 325 { 326 // void gtk_source_gutter_renderer_end (GtkSourceGutterRenderer *renderer); 327 gtk_source_gutter_renderer_end(gtkSourceGutterRenderer); 328 } 329 330 /** 331 * Get the size of the renderer. 332 * Returns: the size of the renderer. 333 */ 334 public int getSize() 335 { 336 // gint gtk_source_gutter_renderer_get_size (GtkSourceGutterRenderer *renderer); 337 return gtk_source_gutter_renderer_get_size(gtkSourceGutterRenderer); 338 } 339 340 /** 341 * Sets the size of the renderer. A value of -1 specifies that the size 342 * is to be determined dynamically. 343 * Params: 344 * size = the size 345 */ 346 public void setSize(int size) 347 { 348 // void gtk_source_gutter_renderer_set_size (GtkSourceGutterRenderer *renderer, gint size); 349 gtk_source_gutter_renderer_set_size(gtkSourceGutterRenderer, size); 350 } 351 352 /** 353 * Set whether the gutter renderer is visible. 354 * Params: 355 * visible = the visibility 356 */ 357 public void setVisible(int visible) 358 { 359 // void gtk_source_gutter_renderer_set_visible (GtkSourceGutterRenderer *renderer, gboolean visible); 360 gtk_source_gutter_renderer_set_visible(gtkSourceGutterRenderer, visible); 361 } 362 363 /** 364 * Get whether the gutter renderer is visible. 365 * Returns: TRUE if the renderer is visible, FALSE otherwise 366 */ 367 public int getVisible() 368 { 369 // gboolean gtk_source_gutter_renderer_get_visible (GtkSourceGutterRenderer *renderer); 370 return gtk_source_gutter_renderer_get_visible(gtkSourceGutterRenderer); 371 } 372 373 /** 374 * Get the x-padding and y-padding of the gutter renderer. 375 * Params: 376 * xpad = return location for the x-padding (can be NULL). [out caller-allocates][allow-none] 377 * ypad = return location for the y-padding (can be NULL). [out caller-allocates][allow-none] 378 */ 379 public void getPadding(out int xpad, out int ypad) 380 { 381 // void gtk_source_gutter_renderer_get_padding (GtkSourceGutterRenderer *renderer, gint *xpad, gint *ypad); 382 gtk_source_gutter_renderer_get_padding(gtkSourceGutterRenderer, &xpad, &ypad); 383 } 384 385 /** 386 * Set the padding of the gutter renderer. Both xpad and ypad can be 387 * -1, which means the values will not be changed (this allows changing only 388 * one of the values). 389 * Params: 390 * xpad = the x-padding 391 * ypad = the y-padding 392 */ 393 public void setPadding(int xpad, int ypad) 394 { 395 // void gtk_source_gutter_renderer_set_padding (GtkSourceGutterRenderer *renderer, gint xpad, gint ypad); 396 gtk_source_gutter_renderer_set_padding(gtkSourceGutterRenderer, xpad, ypad); 397 } 398 399 /** 400 * Get the x-alignment and y-alignment of the gutter renderer. 401 * Params: 402 * xalign = return location for the x-alignment (can be NULL). [out caller-allocates][allow-none] 403 * yalign = return location for the y-alignment (can be NULL). [out caller-allocates][allow-none] 404 */ 405 public void getAlignment(out float xalign, out float yalign) 406 { 407 // void gtk_source_gutter_renderer_get_alignment (GtkSourceGutterRenderer *renderer, gfloat *xalign, gfloat *yalign); 408 gtk_source_gutter_renderer_get_alignment(gtkSourceGutterRenderer, &xalign, &yalign); 409 } 410 411 /** 412 * Set the alignment of the gutter renderer. Both xalign and yalign can be 413 * -1, which means the values will not be changed (this allows changing only 414 * one of the values). 415 * Params: 416 * xalign = the x-alignment 417 * yalign = the y-alignment 418 */ 419 public void setAlignment(float xalign, float yalign) 420 { 421 // void gtk_source_gutter_renderer_set_alignment (GtkSourceGutterRenderer *renderer, gfloat xalign, gfloat yalign); 422 gtk_source_gutter_renderer_set_alignment(gtkSourceGutterRenderer, xalign, yalign); 423 } 424 425 /** 426 * Set the alignment mode. The alignment mode describes the manner in which the 427 * renderer is aligned (see :xalign and :yalign). 428 * Params: 429 * mode = a GtkSourceGutterRendererAlignmentMode 430 */ 431 public void setAlignmentMode(GtkSourceGutterRendererAlignmentMode mode) 432 { 433 // void gtk_source_gutter_renderer_set_alignment_mode (GtkSourceGutterRenderer *renderer, GtkSourceGutterRendererAlignmentMode mode); 434 gtk_source_gutter_renderer_set_alignment_mode(gtkSourceGutterRenderer, mode); 435 } 436 437 /** 438 * Get the GtkTextWindowType associated with the gutter renderer. 439 * Returns: a GtkTextWindowType 440 */ 441 public GtkTextWindowType getWindowType() 442 { 443 // GtkTextWindowType gtk_source_gutter_renderer_get_window_type (GtkSourceGutterRenderer *renderer); 444 return gtk_source_gutter_renderer_get_window_type(gtkSourceGutterRenderer); 445 } 446 447 /** 448 * Get the view associated to the gutter renderer 449 * Returns: a GtkTextView. [transfer none] 450 */ 451 public TextView getView() 452 { 453 // GtkTextView * gtk_source_gutter_renderer_get_view (GtkSourceGutterRenderer *renderer); 454 auto p = gtk_source_gutter_renderer_get_view(gtkSourceGutterRenderer); 455 456 if(p is null) 457 { 458 return null; 459 } 460 461 return ObjectG.getDObject!(TextView)(cast(GtkTextView*) p); 462 } 463 464 /** 465 * Get the alignment mode. The alignment mode describes the manner in which the 466 * renderer is aligned (see :xalign and :yalign). 467 * Returns: a GtkSourceGutterRendererAlignmentMode 468 */ 469 public GtkSourceGutterRendererAlignmentMode getAlignmentMode() 470 { 471 // GtkSourceGutterRendererAlignmentMode gtk_source_gutter_renderer_get_alignment_mode (GtkSourceGutterRenderer *renderer); 472 return gtk_source_gutter_renderer_get_alignment_mode(gtkSourceGutterRenderer); 473 } 474 475 /** 476 * Get the background color of the renderer. 477 * Params: 478 * color = return value for a GdkRGBA. [out caller-allocates][allow-none] 479 * Returns: TRUE if the background color is set, FALSE otherwise 480 */ 481 public int getBackground(RGBA color) 482 { 483 // gboolean gtk_source_gutter_renderer_get_background (GtkSourceGutterRenderer *renderer, GdkRGBA *color); 484 return gtk_source_gutter_renderer_get_background(gtkSourceGutterRenderer, (color is null) ? null : color.getRGBAStruct()); 485 } 486 487 /** 488 * Set the background color of the renderer. If color is set to NULL, the 489 * renderer will not have a background color. 490 * Params: 491 * color = a GdkRGBA or NULL. [allow-none] 492 */ 493 public void setBackground(RGBA color) 494 { 495 // void gtk_source_gutter_renderer_set_background (GtkSourceGutterRenderer *renderer, const GdkRGBA *color); 496 gtk_source_gutter_renderer_set_background(gtkSourceGutterRenderer, (color is null) ? null : color.getRGBAStruct()); 497 } 498 499 /** 500 * Emits the ::activate signal of the renderer. This is called from 501 * GtkSourceGutter and should never have to be called manually. 502 * Params: 503 * iter = a GtkTextIter at the start of the line where the renderer is activated 504 * area = a GdkRectangle of the cell area where the renderer is activated 505 * event = the event that triggered the activation 506 */ 507 public void activate(TextIter iter, ref Rectangle area, Event event) 508 { 509 // void gtk_source_gutter_renderer_activate (GtkSourceGutterRenderer *renderer, GtkTextIter *iter, GdkRectangle *area, GdkEvent *event); 510 gtk_source_gutter_renderer_activate(gtkSourceGutterRenderer, (iter is null) ? null : iter.getTextIterStruct(), &area, (event is null) ? null : event.getEventStruct()); 511 } 512 513 /** 514 * Get whether the renderer is activatable at the location in event. This is 515 * called from GtkSourceGutter to determine whether a renderer is activatable 516 * using the mouse pointer. 517 * Params: 518 * iter = a GtkTextIter at the start of the line to be activated 519 * area = a GdkRectangle of the cell area to be activated 520 * event = the event that triggered the query 521 * Returns: TRUE if the renderer can be activated, FALSE otherwise 522 */ 523 public int queryActivatable(TextIter iter, ref Rectangle area, Event event) 524 { 525 // gboolean gtk_source_gutter_renderer_query_activatable (GtkSourceGutterRenderer *renderer, GtkTextIter *iter, GdkRectangle *area, GdkEvent *event); 526 return gtk_source_gutter_renderer_query_activatable(gtkSourceGutterRenderer, (iter is null) ? null : iter.getTextIterStruct(), &area, (event is null) ? null : event.getEventStruct()); 527 } 528 529 /** 530 * Emits the ::queue-draw signal of the renderer. Call this from an 531 * implementation to inform that the renderer has changed such that it needs 532 * to redraw. 533 */ 534 public void queueDraw() 535 { 536 // void gtk_source_gutter_renderer_queue_draw (GtkSourceGutterRenderer *renderer); 537 gtk_source_gutter_renderer_queue_draw(gtkSourceGutterRenderer); 538 } 539 540 /** 541 * Emits the ::query-tooltip signal. This function is called from 542 * GtkSourceGutter. Implementations can override the default signal handler 543 * or can connect to the signal externally. 544 * Params: 545 * iter = a GtkTextIter. 546 * area = a GdkRectangle. 547 * x = The x position of the tooltip. 548 * y = The y position of the tooltip. 549 * tooltip = a GtkTooltip. 550 * Returns: TRUE if the tooltip has been set, FALSE otherwise 551 */ 552 public int queryTooltip(TextIter iter, ref Rectangle area, int x, int y, Tooltip tooltip) 553 { 554 // gboolean gtk_source_gutter_renderer_query_tooltip (GtkSourceGutterRenderer *renderer, GtkTextIter *iter, GdkRectangle *area, gint x, gint y, GtkTooltip *tooltip); 555 return gtk_source_gutter_renderer_query_tooltip(gtkSourceGutterRenderer, (iter is null) ? null : iter.getTextIterStruct(), &area, x, y, (tooltip is null) ? null : tooltip.getTooltipStruct()); 556 } 557 558 /** 559 * Emit the ::query-data signal. This function is called to query for data 560 * just before rendering a cell. This is called from the GtkSourceGutter. 561 * Implementations can override the default signal handler or can connect 562 * a signal handler externally to the ::query-data signal. 563 * Params: 564 * start = a GtkTextIter. 565 * end = a GtkTextIter. 566 * state = a GtkSourceGutterRendererState. 567 */ 568 public void queryData(TextIter start, TextIter end, GtkSourceGutterRendererState state) 569 { 570 // void gtk_source_gutter_renderer_query_data (GtkSourceGutterRenderer *renderer, GtkTextIter *start, GtkTextIter *end, GtkSourceGutterRendererState state); 571 gtk_source_gutter_renderer_query_data(gtkSourceGutterRenderer, (start is null) ? null : start.getTextIterStruct(), (end is null) ? null : end.getTextIterStruct(), state); 572 } 573 }