/usr/share/gtk-doc/html/pigment/pigment-PgmEvents.html is in libpigment0.3-dev 0.3.17-1ubuntu1.
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 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PgmEvents</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="Pigment 0.3 Reference Manual">
<link rel="up" href="pigment-core.html" title="Part II. Pigment Core Reference">
<link rel="prev" href="PgmDrawable.html" title="PgmDrawable">
<link rel="next" href="PgmImage.html" title="PgmImage">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="preface" href="introduction.html" title="Introduction">
<link rel="part" href="pigment-overview.html" title="Part I. Pigment Overview">
<link rel="part" href="pigment-core.html" title="Part II. Pigment Core Reference">
<link rel="part" href="pigment-library.html" title="Part III. Pigment Library Reference">
<link rel="index" href="pigment-hierarchy.html" title="Object Hierarchy">
<link rel="index" href="api-index.html" title="Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="PgmDrawable.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="pigment-core.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Pigment 0.3
Reference Manual</th>
<td><a accesskey="n" href="PgmImage.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#pigment-PgmEvents.synopsis" class="shortcut">Top</a>
|
<a href="#pigment-PgmEvents.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" lang="en">
<a name="pigment-PgmEvents"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="pigment-PgmEvents.top_of_page"></a>PgmEvents</span></h2>
<p>PgmEvents — Various structs and functions used for events handling.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="pigment-PgmEvents.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <pgm/pgm.h>
enum <a class="link" href="pigment-PgmEvents.html#PgmEventType" title="enum PgmEventType">PgmEventType</a>;
enum <a class="link" href="pigment-PgmEvents.html#PgmModifierType" title="enum PgmModifierType">PgmModifierType</a>;
enum <a class="link" href="pigment-PgmEvents.html#PgmButtonType" title="enum PgmButtonType">PgmButtonType</a>;
enum <a class="link" href="pigment-PgmEvents.html#PgmScrollDirection" title="enum PgmScrollDirection">PgmScrollDirection</a>;
enum <a class="link" href="pigment-PgmEvents.html#PgmViewportState" title="enum PgmViewportState">PgmViewportState</a>;
union <a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent">PgmEvent</a>;
<a class="link" href="pigment-PgmEvents.html#PgmEventAny" title="PgmEventAny">PgmEventAny</a>;
<a class="link" href="pigment-PgmEvents.html#PgmEventMotion" title="PgmEventMotion">PgmEventMotion</a>;
<a class="link" href="pigment-PgmEvents.html#PgmEventButton" title="PgmEventButton">PgmEventButton</a>;
<a class="link" href="pigment-PgmEvents.html#PgmEventScroll" title="PgmEventScroll">PgmEventScroll</a>;
<a class="link" href="pigment-PgmEvents.html#PgmEventState" title="PgmEventState">PgmEventState</a>;
<a class="link" href="pigment-PgmEvents.html#PgmEventWin32Message" title="PgmEventWin32Message">PgmEventWin32Message</a>;
<a class="link" href="pigment-PgmEvents.html#PgmEventDnd" title="PgmEventDnd">PgmEventDnd</a>;
<a class="link" href="pigment-PgmEvents.html#PgmEventKey" title="PgmEventKey">PgmEventKey</a>;
<a class="link" href="pigment-PgmEvents.html#PgmEventExpose" title="PgmEventExpose">PgmEventExpose</a>;
<a class="link" href="pigment-PgmEvents.html#PgmEventConfigure" title="PgmEventConfigure">PgmEventConfigure</a>;
<a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent">PgmEvent</a> * <a class="link" href="pigment-PgmEvents.html#pgm-event-new" title="pgm_event_new ()">pgm_event_new</a> (<a class="link" href="pigment-PgmEvents.html#PgmEventType" title="enum PgmEventType">PgmEventType</a> type);
<a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent">PgmEvent</a> * <a class="link" href="pigment-PgmEvents.html#pgm-event-copy" title="pgm_event_copy ()">pgm_event_copy</a> (<a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent">PgmEvent</a> *event);
void <a class="link" href="pigment-PgmEvents.html#pgm-event-free" title="pgm_event_free ()">pgm_event_free</a> (<a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent">PgmEvent</a> *event);
<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> <a class="link" href="pigment-PgmEvents.html#pgm-keyval-to-unicode" title="pgm_keyval_to_unicode ()">pgm_keyval_to_unicode</a> (<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> keyval);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="pigment-PgmEvents.description"></a><h2>Description</h2>
<p>
Various structs and functions used by Pigment for events handling.
</p>
<p>
Last reviewed on 2007-04-12 (0.1.5)</p>
<p>
</p>
</div>
<div class="refsect1" lang="en">
<a name="pigment-PgmEvents.details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="PgmEventType"></a><h3>enum PgmEventType</h3>
<pre class="programlisting">typedef enum {
PGM_NOTHING = -1,
PGM_MOTION_NOTIFY = 0,
PGM_BUTTON_PRESS = 1,
PGM_DOUBLE_BUTTON_PRESS = 2,
PGM_TRIPLE_BUTTON_PRESS = 3,
PGM_BUTTON_PRESSURE = 4,
PGM_BUTTON_RELEASE = 5,
PGM_KEY_PRESS = 6,
PGM_KEY_RELEASE = 7,
PGM_EXPOSE = 8,
PGM_CONFIGURE = 9,
PGM_DRAG_MOTION = 10,
PGM_DRAG_DROP = 12,
PGM_DRAG_LEAVE = 13,
PGM_SCROLL = 14,
PGM_STATE = 15,
PGM_DELETE = 16,
PGM_WIN32_MESSAGE = 17
} PgmEventType;
</pre>
<p>
Specifies the type of the event.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="PGM-NOTHING--CAPS"></a><span class="term"><code class="literal">PGM_NOTHING</code></span></p></td>
<td> a special code to indicate a null event.
</td>
</tr>
<tr>
<td><p><a name="PGM-MOTION-NOTIFY--CAPS"></a><span class="term"><code class="literal">PGM_MOTION_NOTIFY</code></span></p></td>
<td> the pointer has entered the window.
</td>
</tr>
<tr>
<td><p><a name="PGM-BUTTON-PRESS--CAPS"></a><span class="term"><code class="literal">PGM_BUTTON_PRESS</code></span></p></td>
<td> a mouse button has been pressed.
</td>
</tr>
<tr>
<td><p><a name="PGM-DOUBLE-BUTTON-PRESS--CAPS"></a><span class="term"><code class="literal">PGM_DOUBLE_BUTTON_PRESS</code></span></p></td>
<td> a mouse button has been clicked 2 times in a short
period of time. Note that each click also generates a <a class="link" href="pigment-PgmEvents.html#PGM-BUTTON-PRESS--CAPS"><code class="literal">PGM_BUTTON_PRESS</code></a>
event.
</td>
</tr>
<tr>
<td><p><a name="PGM-TRIPLE-BUTTON-PRESS--CAPS"></a><span class="term"><code class="literal">PGM_TRIPLE_BUTTON_PRESS</code></span></p></td>
<td> a mouse button has been clicked 3 times in a short
period of time. Note that each click also generates a <a class="link" href="pigment-PgmEvents.html#PGM-BUTTON-PRESS--CAPS"><code class="literal">PGM_BUTTON_PRESS</code></a>
event.
</td>
</tr>
<tr>
<td><p><a name="PGM-BUTTON-PRESSURE--CAPS"></a><span class="term"><code class="literal">PGM_BUTTON_PRESSURE</code></span></p></td>
<td> a mouse button pressure has changed.
</td>
</tr>
<tr>
<td><p><a name="PGM-BUTTON-RELEASE--CAPS"></a><span class="term"><code class="literal">PGM_BUTTON_RELEASE</code></span></p></td>
<td> a mouse button has been released.
</td>
</tr>
<tr>
<td><p><a name="PGM-KEY-PRESS--CAPS"></a><span class="term"><code class="literal">PGM_KEY_PRESS</code></span></p></td>
<td> a key has been pressed.
</td>
</tr>
<tr>
<td><p><a name="PGM-KEY-RELEASE--CAPS"></a><span class="term"><code class="literal">PGM_KEY_RELEASE</code></span></p></td>
<td> a key has been released.
</td>
</tr>
<tr>
<td><p><a name="PGM-EXPOSE--CAPS"></a><span class="term"><code class="literal">PGM_EXPOSE</code></span></p></td>
<td> the window has become visible and needs to be redrawn.
</td>
</tr>
<tr>
<td><p><a name="PGM-CONFIGURE--CAPS"></a><span class="term"><code class="literal">PGM_CONFIGURE</code></span></p></td>
<td> the size or the position of the viewport has changed.
</td>
</tr>
<tr>
<td><p><a name="PGM-DRAG-MOTION--CAPS"></a><span class="term"><code class="literal">PGM_DRAG_MOTION</code></span></p></td>
<td> the mouse has moved in the viewport while a drag is in
progress.
</td>
</tr>
<tr>
<td><p><a name="PGM-DRAG-DROP--CAPS"></a><span class="term"><code class="literal">PGM_DRAG_DROP</code></span></p></td>
<td> the mouse has dropped data onto the viewport.
</td>
</tr>
<tr>
<td><p><a name="PGM-DRAG-LEAVE--CAPS"></a><span class="term"><code class="literal">PGM_DRAG_LEAVE</code></span></p></td>
<td> the mouse has left the viewport while a drag is in progress.
</td>
</tr>
<tr>
<td><p><a name="PGM-SCROLL--CAPS"></a><span class="term"><code class="literal">PGM_SCROLL</code></span></p></td>
<td> the scroll wheel was turned.
</td>
</tr>
<tr>
<td><p><a name="PGM-STATE--CAPS"></a><span class="term"><code class="literal">PGM_STATE</code></span></p></td>
<td> the state of a viewport has changed.
</td>
</tr>
<tr>
<td><p><a name="PGM-DELETE--CAPS"></a><span class="term"><code class="literal">PGM_DELETE</code></span></p></td>
<td> the window manager has requested that the toplevel window be
destroyed, usually when the user clicks on a special icon in the title bar.
</td>
</tr>
<tr>
<td><p><a name="PGM-WIN32-MESSAGE--CAPS"></a><span class="term"><code class="literal">PGM_WIN32_MESSAGE</code></span></p></td>
<td> a Win32 message has been received (Only used on Windows).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmModifierType"></a><h3>enum PgmModifierType</h3>
<pre class="programlisting">typedef enum {
PGM_SHIFT_MASK = (1 << 0),
PGM_CAPSLOCK_MASK = (1 << 1),
PGM_CONTROL_MASK = (1 << 2),
PGM_ALT_MASK = (1 << 3),
PGM_NUMLOCK_MASK = (1 << 4)
} PgmModifierType;
</pre>
<p>
A set of bit-flags to indicate the state of modifier keys. Typical modifier
keys are Shift, Control, Alt and CapsLock.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="PGM-SHIFT-MASK--CAPS"></a><span class="term"><code class="literal">PGM_SHIFT_MASK</code></span></p></td>
<td> the Shift key.
</td>
</tr>
<tr>
<td><p><a name="PGM-CAPSLOCK-MASK--CAPS"></a><span class="term"><code class="literal">PGM_CAPSLOCK_MASK</code></span></p></td>
<td> the Caps Lock.
</td>
</tr>
<tr>
<td><p><a name="PGM-CONTROL-MASK--CAPS"></a><span class="term"><code class="literal">PGM_CONTROL_MASK</code></span></p></td>
<td> the Control key.
</td>
</tr>
<tr>
<td><p><a name="PGM-ALT-MASK--CAPS"></a><span class="term"><code class="literal">PGM_ALT_MASK</code></span></p></td>
<td> the Alt key.
</td>
</tr>
<tr>
<td><p><a name="PGM-NUMLOCK-MASK--CAPS"></a><span class="term"><code class="literal">PGM_NUMLOCK_MASK</code></span></p></td>
<td> the Num Lock.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmButtonType"></a><h3>enum PgmButtonType</h3>
<pre class="programlisting">typedef enum {
PGM_BUTTON_LEFT = (1 << 0),
PGM_BUTTON_MIDDLE = (1 << 1),
PGM_BUTTON_RIGHT = (1 << 2)
} PgmButtonType;
</pre>
<p>
The mouse button type.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="PGM-BUTTON-LEFT--CAPS"></a><span class="term"><code class="literal">PGM_BUTTON_LEFT</code></span></p></td>
<td> the left mouse button.
</td>
</tr>
<tr>
<td><p><a name="PGM-BUTTON-MIDDLE--CAPS"></a><span class="term"><code class="literal">PGM_BUTTON_MIDDLE</code></span></p></td>
<td> the middle mouse button.
</td>
</tr>
<tr>
<td><p><a name="PGM-BUTTON-RIGHT--CAPS"></a><span class="term"><code class="literal">PGM_BUTTON_RIGHT</code></span></p></td>
<td> the right mouse button.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmScrollDirection"></a><h3>enum PgmScrollDirection</h3>
<pre class="programlisting">typedef enum {
PGM_SCROLL_UP,
PGM_SCROLL_DOWN
} PgmScrollDirection;
</pre>
<p>
The mouse wheel scrolling directions.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="PGM-SCROLL-UP--CAPS"></a><span class="term"><code class="literal">PGM_SCROLL_UP</code></span></p></td>
<td> the scrolling in the upward direction.
</td>
</tr>
<tr>
<td><p><a name="PGM-SCROLL-DOWN--CAPS"></a><span class="term"><code class="literal">PGM_SCROLL_DOWN</code></span></p></td>
<td> the scrolling in the downward direction.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmViewportState"></a><h3>enum PgmViewportState</h3>
<pre class="programlisting">typedef enum {
PGM_VIEWPORT_ICONIFIED = (1 << 0)
} PgmViewportState;
</pre>
<p>
Specifies the state of a viewport.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><a name="PGM-VIEWPORT-ICONIFIED--CAPS"></a><span class="term"><code class="literal">PGM_VIEWPORT_ICONIFIED</code></span></p></td>
<td> The viewport is minimized.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmEvent"></a><h3>union PgmEvent</h3>
<pre class="programlisting">union PgmEvent {
PgmEventType type;
PgmEventAny any;
PgmEventMotion motion;
PgmEventButton button;
PgmEventScroll scroll;
PgmEventKey key;
PgmEventExpose expose;
PgmEventConfigure configure;
PgmEventDnd dnd;
PgmEventState state;
#ifdef WIN32
PgmEventWin32Message win32_message;
#endif /* WIN32 */
};
</pre>
<p>
</p>
<p>
The <a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent"><span class="type">PgmEvent</span></a> struct contains a union of all of the event structs,
and allows access to the data fields in a number of ways.
</p>
<p>
</p>
<p>
The event type is always the first field in all of the event structs, and
can always be accessed with the following code, no matter what type of event
it is:
</p>
<div class="informalexample"><pre class="programlisting">
PgmEvent *event;
PgmEventType type;
type = event->type;
</pre></div>
<p>
</p>
<p>
</p>
<p>
To access other fields of the event structs, the pointer to the event can be
cast to the appropriate event struct pointer, or the union member name can be
used. For example if the event type is <a class="link" href="pigment-PgmEvents.html#PGM-BUTTON-PRESS--CAPS"><code class="literal">PGM_BUTTON_PRESS</code></a> then the x coordinate
of the button press can be accessed with:
</p>
<div class="informalexample"><pre class="programlisting">
PgmEvent *event;
gfloat x;
x = ((PgmEventButton*) event)->x;
</pre></div>
<p>
or with:
</p>
<div class="informalexample"><pre class="programlisting">
PgmEvent *event;
gfloat x;
x = event->button.x;
</pre></div>
<p>
</p>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmEventAny"></a><h3>PgmEventAny</h3>
<pre class="programlisting">typedef struct {
PgmEventType type;
guint8 source;
} PgmEventAny;
</pre>
<p>
Contains the fields which are common to all event structs. Any event
pointer can safely be cast to a pointer to a <a class="link" href="pigment-PgmEvents.html#PgmEventAny" title="PgmEventAny"><span class="type">PgmEventAny</span></a> to access these
fields.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="pigment-PgmEvents.html#PgmEventType" title="enum PgmEventType">PgmEventType</a> <em class="structfield"><code>type</code></em>;</span></p></td>
<td> the type of the event.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
>guint8</a> <em class="structfield"><code>source</code></em>;</span></p></td>
<td> the source field that can be filled by applications to indicate the
source of the event (mouse, pen, remote control, etc).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmEventMotion"></a><h3>PgmEventMotion</h3>
<pre class="programlisting">typedef struct {
PgmEventType type;
guint8 source;
guint32 time;
gfloat x, y;
guint32 pressure;
} PgmEventMotion;
</pre>
<p>
Generated when the pointer moves.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="pigment-PgmEvents.html#PgmEventType" title="enum PgmEventType">PgmEventType</a> <em class="structfield"><code>type</code></em>;</span></p></td>
<td> the type of the event.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
>guint8</a> <em class="structfield"><code>source</code></em>;</span></p></td>
<td> the source field that can be filled by applications to indicate the
source of the event (mouse, pen, remote control, etc).
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> <em class="structfield"><code>time</code></em>;</span></p></td>
<td> the time of the event in milliseconds.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> <em class="structfield"><code>x</code></em>;</span></p></td>
<td> the x coordinate of the pointer relative to the window.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> <em class="structfield"><code>y</code></em>;</span></p></td>
<td> the y coordinate of the pointer relative to the window.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> <em class="structfield"><code>pressure</code></em>;</span></p></td>
<td> the pressure force, set to 0 when not used with a touch screen.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmEventButton"></a><h3>PgmEventButton</h3>
<pre class="programlisting">typedef struct {
PgmEventType type;
guint8 source;
guint32 time;
gfloat x, y;
PgmButtonType button;
guint32 pressure;
} PgmEventButton;
</pre>
<p>
Used for button press and button release events.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="pigment-PgmEvents.html#PgmEventType" title="enum PgmEventType">PgmEventType</a> <em class="structfield"><code>type</code></em>;</span></p></td>
<td> the type of the event.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
>guint8</a> <em class="structfield"><code>source</code></em>;</span></p></td>
<td> the source field that can be filled by applications to indicate the
source of the event (mouse, pen, remote control, etc).
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> <em class="structfield"><code>time</code></em>;</span></p></td>
<td> the time of the event in milliseconds.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> <em class="structfield"><code>x</code></em>;</span></p></td>
<td> the x coordinate of the pointer relative to the window.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> <em class="structfield"><code>y</code></em>;</span></p></td>
<td> the y coordinate of the pointer relative to the window.
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="pigment-PgmEvents.html#PgmButtonType" title="enum PgmButtonType">PgmButtonType</a> <em class="structfield"><code>button</code></em>;</span></p></td>
<td> the button which was pressed or released.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> <em class="structfield"><code>pressure</code></em>;</span></p></td>
<td> the pressure force, set to 0 when not used with a touch screen.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmEventScroll"></a><h3>PgmEventScroll</h3>
<pre class="programlisting">typedef struct {
PgmEventType type;
guint8 source;
guint32 time;
gfloat x, y;
PgmScrollDirection direction;
} PgmEventScroll;
</pre>
<p>
Generated when the mouse wheel is turned.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="pigment-PgmEvents.html#PgmEventType" title="enum PgmEventType">PgmEventType</a> <em class="structfield"><code>type</code></em>;</span></p></td>
<td> the type of the event.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
>guint8</a> <em class="structfield"><code>source</code></em>;</span></p></td>
<td> the source field that can be filled by applications to indicate the
source of the event (mouse, pen, remote control, etc).
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> <em class="structfield"><code>time</code></em>;</span></p></td>
<td> the time of the event in milliseconds.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> <em class="structfield"><code>x</code></em>;</span></p></td>
<td> the x coordinate of the pointer relative to the window.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> <em class="structfield"><code>y</code></em>;</span></p></td>
<td> the y coordinate of the pointer relative to the window.
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="pigment-PgmEvents.html#PgmScrollDirection" title="enum PgmScrollDirection">PgmScrollDirection</a> <em class="structfield"><code>direction</code></em>;</span></p></td>
<td> the scroll wheel direction.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmEventState"></a><h3>PgmEventState</h3>
<pre class="programlisting">typedef struct {
PgmEventType type;
guint8 source;
PgmViewportState changed_mask;
PgmViewportState state_mask;
} PgmEventState;
</pre>
<p>
Generated when the state of a viewport changes.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="pigment-PgmEvents.html#PgmEventType" title="enum PgmEventType">PgmEventType</a> <em class="structfield"><code>type</code></em>;</span></p></td>
<td> the type of the event.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
>guint8</a> <em class="structfield"><code>source</code></em>;</span></p></td>
<td> the source field that can be filled by applications to indicate the
source of the event (mouse, pen, remote control, etc).
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="pigment-PgmEvents.html#PgmViewportState" title="enum PgmViewportState">PgmViewportState</a> <em class="structfield"><code>changed_mask</code></em>;</span></p></td>
<td> mask specifying what viewport flags have changed.
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="pigment-PgmEvents.html#PgmViewportState" title="enum PgmViewportState">PgmViewportState</a> <em class="structfield"><code>state_mask</code></em>;</span></p></td>
<td> mask specifying the new viewport flags.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmEventWin32Message"></a><h3>PgmEventWin32Message</h3>
<pre class="programlisting">typedef struct {
PgmEventType type;
guint8 source;
guint32 time;
UINT message;
WPARAM wparam;
LPARAM lparam;
} PgmEventWin32Message;
</pre>
<p>
Describes a Win32 message.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="pigment-PgmEvents.html#PgmEventType" title="enum PgmEventType">PgmEventType</a> <em class="structfield"><code>type</code></em>;</span></p></td>
<td> the type of the event.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
>guint8</a> <em class="structfield"><code>source</code></em>;</span></p></td>
<td> the source field that can be filled by applications to indicate the
source of the event (mouse, pen, remote control, etc).
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> <em class="structfield"><code>time</code></em>;</span></p></td>
<td> the time of the event in milliseconds.
</td>
</tr>
<tr>
<td><p><span class="term">UINT <em class="structfield"><code>message</code></em>;</span></p></td>
<td> the Win32 message value.
</td>
</tr>
<tr>
<td><p><span class="term">WPARAM <em class="structfield"><code>wparam</code></em>;</span></p></td>
<td> additional message information depending on the message value.
</td>
</tr>
<tr>
<td><p><span class="term">LPARAM <em class="structfield"><code>lparam</code></em>;</span></p></td>
<td> additional message information depending on the message value.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmEventDnd"></a><h3>PgmEventDnd</h3>
<pre class="programlisting">typedef struct {
PgmEventType type;
guint8 source;
guint32 time;
gfloat x, y;
gchar **uri;
} PgmEventDnd;
</pre>
<p>
Describes a drag motion, drop, or leave event.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="pigment-PgmEvents.html#PgmEventType" title="enum PgmEventType">PgmEventType</a> <em class="structfield"><code>type</code></em>;</span></p></td>
<td> the type of the event.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
>guint8</a> <em class="structfield"><code>source</code></em>;</span></p></td>
<td> the source field that can be filled by applications to indicate the
source of the event (mouse, pen, remote control, etc).
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> <em class="structfield"><code>time</code></em>;</span></p></td>
<td> the time of the event in milliseconds.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> <em class="structfield"><code>x</code></em>;</span></p></td>
<td> the new x coordinate of the window.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"
>gfloat</a> <em class="structfield"><code>y</code></em>;</span></p></td>
<td> the new y coordinate of the window.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
>gchar</a> **<em class="structfield"><code>uri</code></em>;</span></p></td>
<td> the list of URI as a <span class="type">NULL-terminated</span> array of strings.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmEventKey"></a><h3>PgmEventKey</h3>
<pre class="programlisting">typedef struct {
PgmEventType type;
guint8 source;
guint32 time;
guint modifier;
guint keyval;
guint16 hardware_keycode;
} PgmEventKey;
</pre>
<p>
Describes a key press or key release event.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="pigment-PgmEvents.html#PgmEventType" title="enum PgmEventType">PgmEventType</a> <em class="structfield"><code>type</code></em>;</span></p></td>
<td> the type of the event.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
>guint8</a> <em class="structfield"><code>source</code></em>;</span></p></td>
<td> the source field that can be filled by applications to indicate the
source of the event (mouse, pen, remote control, etc).
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> <em class="structfield"><code>time</code></em>;</span></p></td>
<td> the time of the event in milliseconds.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>modifier</code></em>;</span></p></td>
<td> A bit-mask representing the state of the modifier keys (e.g.
Control, Shift and Alt), see <a class="link" href="pigment-PgmEvents.html#PgmModifierType" title="enum PgmModifierType"><span class="type">PgmModifierType</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>keyval</code></em>;</span></p></td>
<td> the key that was pressed or released. See the pgm/pgmkeysyms.h
header file for a complete list of Pigment key codes.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint16"
>guint16</a> <em class="structfield"><code>hardware_keycode</code></em>;</span></p></td>
<td> the raw code of the key that was pressed or released.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmEventExpose"></a><h3>PgmEventExpose</h3>
<pre class="programlisting">typedef struct {
PgmEventType type;
guint8 source;
} PgmEventExpose;
</pre>
<p>
Generated when a window becomes visible and needs to be redrawn.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="pigment-PgmEvents.html#PgmEventType" title="enum PgmEventType">PgmEventType</a> <em class="structfield"><code>type</code></em>;</span></p></td>
<td> the type of the event.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
>guint8</a> <em class="structfield"><code>source</code></em>;</span></p></td>
<td> the source field that can be filled by applications to indicate the
source of the event (mouse, pen, remote control, etc).
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="PgmEventConfigure"></a><h3>PgmEventConfigure</h3>
<pre class="programlisting">typedef struct {
PgmEventType type;
guint8 source;
gint x, y;
gint width, height;
} PgmEventConfigure;
</pre>
<p>
Generated when a viewport size or position has changed.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="pigment-PgmEvents.html#PgmEventType" title="enum PgmEventType">PgmEventType</a> <em class="structfield"><code>type</code></em>;</span></p></td>
<td> the type of the event.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
>guint8</a> <em class="structfield"><code>source</code></em>;</span></p></td>
<td> the source field that can be filled by applications to indicate the
source of the event (mouse, pen, remote control, etc).
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a> <em class="structfield"><code>x</code></em>;</span></p></td>
<td> the new x coordinate of the window.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a> <em class="structfield"><code>y</code></em>;</span></p></td>
<td> the new y coordinate of the window.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a> <em class="structfield"><code>width</code></em>;</span></p></td>
<td> the new width of the viewport.
</td>
</tr>
<tr>
<td><p><span class="term"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
>gint</a> <em class="structfield"><code>height</code></em>;</span></p></td>
<td> the new height of the viewport.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-event-new"></a><h3>pgm_event_new ()</h3>
<pre class="programlisting"><a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent">PgmEvent</a> * pgm_event_new (<a class="link" href="pigment-PgmEvents.html#PgmEventType" title="enum PgmEventType">PgmEventType</a> type);</pre>
<p>
Creates a new <a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent"><span class="type">PgmEvent</span></a> of the specified type.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td> the type of event.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a new <a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent"><span class="type">PgmEvent</span></a> instance.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-event-copy"></a><h3>pgm_event_copy ()</h3>
<pre class="programlisting"><a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent">PgmEvent</a> * pgm_event_copy (<a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent">PgmEvent</a> *event);</pre>
<p>
Copies <em class="parameter"><code>event</code></em>.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td> a <a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent"><span class="type">PgmEvent</span></a> object.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated <a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent"><span class="type">PgmEvent</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-event-free"></a><h3>pgm_event_free ()</h3>
<pre class="programlisting">void pgm_event_free (<a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent">PgmEvent</a> *event);</pre>
<p>
MT safe.
</p>
<p>
Frees all resources used by <em class="parameter"><code>event</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td> A <a class="link" href="pigment-PgmEvents.html#PgmEvent" title="union PgmEvent"><span class="type">PgmEvent</span></a> object.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="pgm-keyval-to-unicode"></a><h3>pgm_keyval_to_unicode ()</h3>
<pre class="programlisting"><a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"
>guint32</a> pgm_keyval_to_unicode (<a
href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"
>guint</a> keyval);</pre>
<p>
Converts from a Pigment key symbol to the corresponding ISO10646 (Unicode)
character.
</p>
<p>
MT safe.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>keyval</code></em> :</span></p></td>
<td> a Pigment key symbol.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the corresponding unicode character, or 0 if there is no
corresponding one.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.11</div>
</body>
</html>
|