1 /* 2 * This file is part of d-handy. 3 * 4 * d-handy 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 * d-handy 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 d-handy; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 module handy.c.types; 20 21 public import gdk.c.types; 22 public import gio.c.types; 23 public import glib.c.types; 24 public import gobject.c.types; 25 public import gtk.c.types; 26 public import pango.c.types; 27 28 29 public enum HdyCenteringPolicy 30 { 31 /** 32 * Keep the title centered when possible 33 */ 34 LOOSE = 0, 35 /** 36 * Keep the title centered at all cost 37 */ 38 STRICT = 1, 39 } 40 alias HdyCenteringPolicy CenteringPolicy; 41 42 /** 43 * This enumeration value describes the possible transitions between children 44 * in a #HdyDeck widget. 45 * 46 * New values may be added to this enumeration over time. 47 * 48 * Since: 1.0 49 */ 50 public enum HdyDeckTransitionType 51 { 52 /** 53 * Cover the old page or uncover the new page, sliding from or towards the end according to orientation, text direction and children order 54 */ 55 OVER = 0, 56 /** 57 * Uncover the new page or cover the old page, sliding from or towards the start according to orientation, text direction and children order 58 */ 59 UNDER = 1, 60 /** 61 * Slide from left, right, up or down according to the orientation, text direction and the children order 62 */ 63 SLIDE = 2, 64 } 65 alias HdyDeckTransitionType DeckTransitionType; 66 67 /** 68 * This enumeration value describes the child types handled by #HdyHeaderGroup. 69 * 70 * New values may be added to this enumeration over time. 71 * 72 * Since: 1.0 73 */ 74 public enum HdyHeaderGroupChildType 75 { 76 /** 77 * The child is a #HdyHeaderBar 78 */ 79 HEADER_BAR = 0, 80 /** 81 * The child is a #GtkHeaderBar 82 */ 83 GTK_HEADER_BAR = 1, 84 /** 85 * The child is a #HdyHeaderGroup 86 */ 87 HEADER_GROUP = 2, 88 } 89 alias HdyHeaderGroupChildType HeaderGroupChildType; 90 91 /** 92 * This enumeration value describes the possible transitions between modes and 93 * children in a #HdyLeaflet widget. 94 * 95 * New values may be added to this enumeration over time. 96 * 97 * Since: 0.0.12 98 */ 99 public enum HdyLeafletTransitionType 100 { 101 /** 102 * Cover the old page or uncover the new page, sliding from or towards the end according to orientation, text direction and children order 103 */ 104 OVER = 0, 105 /** 106 * Uncover the new page or cover the old page, sliding from or towards the start according to orientation, text direction and children order 107 */ 108 UNDER = 1, 109 /** 110 * Slide from left, right, up or down according to the orientation, text direction and the children order 111 */ 112 SLIDE = 2, 113 } 114 alias HdyLeafletTransitionType LeafletTransitionType; 115 116 /** 117 * Represents direction of a swipe navigation gesture in #HdyDeck and 118 * #HdyLeaflet. 119 * 120 * Since: 1.0 121 */ 122 public enum HdyNavigationDirection 123 { 124 /** 125 * Corresponds to start or top, depending on orientation and text direction 126 */ 127 BACK = 0, 128 /** 129 * Corresponds to end or bottom, depending on orientation and text direction 130 */ 131 FORWARD = 1, 132 } 133 alias HdyNavigationDirection NavigationDirection; 134 135 /** 136 * These enumeration values describe the possible transitions between children 137 * in a #HdySqueezer widget. 138 */ 139 public enum HdySqueezerTransitionType 140 { 141 /** 142 * No transition 143 */ 144 NONE = 0, 145 /** 146 * A cross-fade 147 */ 148 CROSSFADE = 1, 149 } 150 alias HdySqueezerTransitionType SqueezerTransitionType; 151 152 public enum HdyViewSwitcherPolicy 153 { 154 /** 155 * Automatically adapt to the best fitting mode 156 */ 157 AUTO = 0, 158 /** 159 * Force the narrow mode 160 */ 161 NARROW = 1, 162 /** 163 * Force the wide mode 164 */ 165 WIDE = 2, 166 } 167 alias HdyViewSwitcherPolicy ViewSwitcherPolicy; 168 169 struct HdyActionRow 170 { 171 HdyPreferencesRow parentInstance; 172 } 173 174 struct HdyActionRowClass 175 { 176 /** 177 * The parent class 178 */ 179 GtkListBoxRowClass parentClass; 180 /** */ 181 extern(C) void function(HdyActionRow* self) activate; 182 void*[4] padding; 183 } 184 185 struct HdyApplicationWindow 186 { 187 GtkApplicationWindow parentInstance; 188 } 189 190 struct HdyApplicationWindowClass 191 { 192 GtkApplicationWindowClass parentClass; 193 void*[4] padding; 194 } 195 196 struct HdyAvatar; 197 198 struct HdyAvatarClass 199 { 200 GtkDrawingAreaClass parentClass; 201 } 202 203 struct HdyCarousel; 204 205 struct HdyCarouselClass 206 { 207 GtkEventBoxClass parentClass; 208 } 209 210 struct HdyCarouselIndicatorDots; 211 212 struct HdyCarouselIndicatorDotsClass 213 { 214 GtkDrawingAreaClass parentClass; 215 } 216 217 struct HdyCarouselIndicatorLines; 218 219 struct HdyCarouselIndicatorLinesClass 220 { 221 GtkDrawingAreaClass parentClass; 222 } 223 224 struct HdyClamp; 225 226 struct HdyClampClass 227 { 228 GtkBinClass parentClass; 229 } 230 231 struct HdyComboRow 232 { 233 HdyActionRow parentInstance; 234 } 235 236 struct HdyComboRowClass 237 { 238 /** 239 * The parent class 240 */ 241 HdyActionRowClass parentClass; 242 void*[4] padding; 243 } 244 245 struct HdyDeck 246 { 247 GtkContainer parentInstance; 248 } 249 250 struct HdyDeckClass 251 { 252 /** 253 * The parent class 254 */ 255 GtkContainerClass parentClass; 256 void*[4] padding; 257 } 258 259 struct HdyEnumValueObject; 260 261 struct HdyEnumValueObjectClass 262 { 263 GObjectClass parentClass; 264 } 265 266 struct HdyExpanderRow 267 { 268 HdyPreferencesRow parentInstance; 269 } 270 271 struct HdyExpanderRowClass 272 { 273 /** 274 * The parent class 275 */ 276 HdyPreferencesRowClass parentClass; 277 void*[4] padding; 278 } 279 280 struct HdyHeaderBar 281 { 282 GtkContainer parentInstance; 283 } 284 285 struct HdyHeaderBarClass 286 { 287 /** 288 * The parent class 289 */ 290 GtkContainerClass parentClass; 291 void*[4] padding; 292 } 293 294 struct HdyHeaderGroup; 295 296 struct HdyHeaderGroupChild; 297 298 struct HdyHeaderGroupChildClass 299 { 300 GObjectClass parentClass; 301 } 302 303 struct HdyHeaderGroupClass 304 { 305 GObjectClass parentClass; 306 } 307 308 struct HdyKeypad 309 { 310 GtkBin parentInstance; 311 } 312 313 struct HdyKeypadClass 314 { 315 /** 316 * The parent class 317 */ 318 GtkBinClass parentClass; 319 void*[4] padding; 320 } 321 322 struct HdyLeaflet 323 { 324 GtkContainer parentInstance; 325 } 326 327 struct HdyLeafletClass 328 { 329 /** 330 * The parent class 331 */ 332 GtkContainerClass parentClass; 333 void*[4] padding; 334 } 335 336 struct HdyPreferencesGroup 337 { 338 GtkBin parentInstance; 339 } 340 341 struct HdyPreferencesGroupClass 342 { 343 /** 344 * The parent class 345 */ 346 GtkBinClass parentClass; 347 void*[4] padding; 348 } 349 350 struct HdyPreferencesPage 351 { 352 GtkBin parentInstance; 353 } 354 355 struct HdyPreferencesPageClass 356 { 357 /** 358 * The parent class 359 */ 360 GtkBinClass parentClass; 361 void*[4] padding; 362 } 363 364 struct HdyPreferencesRow 365 { 366 GtkListBoxRow parentInstance; 367 } 368 369 struct HdyPreferencesRowClass 370 { 371 /** 372 * The parent class 373 */ 374 GtkListBoxRowClass parentClass; 375 void*[4] padding; 376 } 377 378 struct HdyPreferencesWindow 379 { 380 HdyWindow parentInstance; 381 } 382 383 struct HdyPreferencesWindowClass 384 { 385 /** 386 * The parent class 387 */ 388 HdyWindowClass parentClass; 389 void*[4] padding; 390 } 391 392 struct HdySearchBar 393 { 394 GtkBin parentInstance; 395 } 396 397 struct HdySearchBarClass 398 { 399 GtkBinClass parentClass; 400 void*[4] padding; 401 } 402 403 struct HdySqueezer; 404 405 struct HdySqueezerClass 406 { 407 GtkContainerClass parentClass; 408 } 409 410 struct HdySwipeGroup; 411 412 struct HdySwipeGroupClass 413 { 414 GObjectClass parentClass; 415 } 416 417 struct HdySwipeTracker; 418 419 struct HdySwipeTrackerClass 420 { 421 GObjectClass parentClass; 422 } 423 424 struct HdySwipeable; 425 426 /** 427 * An interface for swipeable widgets. 428 * 429 * Since: 1.0 430 */ 431 struct HdySwipeableInterface 432 { 433 /** 434 * The parent interface. 435 */ 436 GTypeInterface parent; 437 /** */ 438 extern(C) void function(HdySwipeable* self, uint index, long duration) switchChild; 439 /** 440 * 441 * Params: 442 * self = a #HdySwipeable 443 * Returns: the swipe tracker 444 */ 445 extern(C) HdySwipeTracker* function(HdySwipeable* self) getSwipeTracker; 446 /** 447 * 448 * Params: 449 * self = a #HdySwipeable 450 * Returns: the swipe distance in pixels 451 */ 452 extern(C) double function(HdySwipeable* self) getDistance; 453 /** 454 * 455 * Params: 456 * self = a #HdySwipeable 457 * Returns: the snap points of 458 * @self. The array must be freed with g_free(). 459 */ 460 extern(C) double* function(HdySwipeable* self, int* nSnapPoints) getSnapPoints; 461 /** 462 * 463 * Params: 464 * self = a #HdySwipeable 465 * Returns: the current progress, unitless 466 */ 467 extern(C) double function(HdySwipeable* self) getProgress; 468 /** 469 * 470 * Params: 471 * self = a #HdySwipeable 472 * Returns: the cancel progress, unitless 473 */ 474 extern(C) double function(HdySwipeable* self) getCancelProgress; 475 /** */ 476 extern(C) void function(HdySwipeable* self, HdyNavigationDirection navigationDirection, int isDrag, GdkRectangle* rect) getSwipeArea; 477 void*[4] padding; 478 } 479 480 struct HdyTitleBar; 481 482 struct HdyTitleBarClass 483 { 484 GtkBinClass parentClass; 485 } 486 487 struct HdyValueObject; 488 489 struct HdyValueObjectClass 490 { 491 GObjectClass parentClass; 492 } 493 494 struct HdyViewSwitcher; 495 496 struct HdyViewSwitcherBar; 497 498 struct HdyViewSwitcherBarClass 499 { 500 GtkBinClass parentClass; 501 } 502 503 struct HdyViewSwitcherClass 504 { 505 GtkBinClass parentClass; 506 } 507 508 struct HdyViewSwitcherTitle; 509 510 struct HdyViewSwitcherTitleClass 511 { 512 GtkBinClass parentClass; 513 } 514 515 struct HdyWindow 516 { 517 GtkWindow parentInstance; 518 } 519 520 struct HdyWindowClass 521 { 522 GtkWindowClass parentClass; 523 void*[4] padding; 524 } 525 526 struct HdyWindowHandle; 527 528 struct HdyWindowHandleClass 529 { 530 GtkEventBoxClass parentClass; 531 } 532 533 /** 534 * The returned #GdkPixbuf is expected to be square with width and height set 535 * to @size. The image is cropped to a circle without any scaling or transformation. 536 * 537 * Params: 538 * size = the required size of the avatar 539 * userData = user data 540 * 541 * Returns: the #GdkPixbuf to use as a custom avatar 542 * or %NULL to fallback to the generated avatar. 543 */ 544 public alias extern(C) GdkPixbuf* function(int size, void* userData) HdyAvatarImageLoadFunc; 545 546 /** 547 * Called for combo rows that are bound to an enumeration with 548 * hdy_combo_row_set_for_enum() for each value from that enumeration. 549 * 550 * Params: 551 * value = the value from the enum from which to get a name 552 * userData = user data 553 * 554 * Returns: a newly allocated displayable name that represents @value 555 */ 556 public alias extern(C) char* function(HdyEnumValueObject* value, void* userData) HdyComboRowGetEnumValueNameFunc; 557 558 /** 559 * Called for combo rows that are bound to a #GListModel with 560 * hdy_combo_row_bind_name_model() for each item that gets added to the model. 561 * 562 * Params: 563 * item = the item from the model from which to get a name 564 * userData = user data 565 * 566 * Returns: a newly allocated displayable name that represents @item 567 */ 568 public alias extern(C) char* function(void* item, void* userData) HdyComboRowGetNameFunc;