gdk

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2024 License: MPL-2.0 Imports: 15 Imported by: 25

Documentation

Index

Constants

View Source
const BUTTON_MIDDLE = 2

BUTTON_MIDDLE: middle button.

View Source
const BUTTON_PRIMARY = 1

BUTTON_PRIMARY: primary button. This is typically the left mouse button, or the right button in a left-handed setup.

View Source
const BUTTON_SECONDARY = 3

BUTTON_SECONDARY: secondary button. This is typically the right mouse button, or the left button in a left-handed setup.

View Source
const CURRENT_TIME = 0

CURRENT_TIME represents the current time, and can be used anywhere a time is expected.

View Source
const EVENT_PROPAGATE = false

EVENT_PROPAGATE: use this macro as the return value for continuing the propagation of an event handler.

View Source
const EVENT_STOP = true

EVENT_STOP: use this macro as the return value for stopping the propagation of an event handler.

View Source
const KEY_0 = 48
View Source
const KEY_1 = 49
View Source
const KEY_2 = 50
View Source
const KEY_3 = 51
View Source
const KEY_3270_AltCursor = 64784
View Source
const KEY_3270_Attn = 64782
View Source
const KEY_3270_BackTab = 64773
View Source
const KEY_3270_ChangeScreen = 64793
View Source
const KEY_3270_Copy = 64789
View Source
const KEY_3270_CursorBlink = 64783
View Source
const KEY_3270_CursorSelect = 64796
View Source
const KEY_3270_DeleteWord = 64794
View Source
const KEY_3270_Duplicate = 64769
View Source
const KEY_3270_Enter = 64798
View Source
const KEY_3270_EraseEOF = 64774
View Source
const KEY_3270_EraseInput = 64775
View Source
const KEY_3270_ExSelect = 64795
View Source
const KEY_3270_FieldMark = 64770
View Source
const KEY_3270_Ident = 64787
View Source
const KEY_3270_Jump = 64786
View Source
const KEY_3270_KeyClick = 64785
View Source
const KEY_3270_Left2 = 64772
View Source
const KEY_3270_PA1 = 64778
View Source
const KEY_3270_PA2 = 64779
View Source
const KEY_3270_PA3 = 64780
View Source
const KEY_3270_Play = 64790
View Source
const KEY_3270_PrintScreen = 64797
View Source
const KEY_3270_Quit = 64777
View Source
const KEY_3270_Record = 64792
View Source
const KEY_3270_Reset = 64776
View Source
const KEY_3270_Right2 = 64771
View Source
const KEY_3270_Rule = 64788
View Source
const KEY_3270_Setup = 64791
View Source
const KEY_3270_Test = 64781
View Source
const KEY_4 = 52
View Source
const KEY_5 = 53
View Source
const KEY_6 = 54
View Source
const KEY_7 = 55
View Source
const KEY_8 = 56
View Source
const KEY_9 = 57
View Source
const KEY_A = 65
View Source
const KEY_AE = 198
View Source
const KEY_Aacute = 193
View Source
const KEY_Abelowdot = 16785056
View Source
const KEY_Abreve = 451
View Source
const KEY_Abreveacute = 16785070
View Source
const KEY_Abrevebelowdot = 16785078
View Source
const KEY_Abrevegrave = 16785072
View Source
const KEY_Abrevehook = 16785074
View Source
const KEY_Abrevetilde = 16785076
View Source
const KEY_AccessX_Enable = 65136
View Source
const KEY_AccessX_Feedback_Enable = 65137
View Source
const KEY_Acircumflex = 194
View Source
const KEY_Acircumflexacute = 16785060
View Source
const KEY_Acircumflexbelowdot = 16785068
View Source
const KEY_Acircumflexgrave = 16785062
View Source
const KEY_Acircumflexhook = 16785064
View Source
const KEY_Acircumflextilde = 16785066
View Source
const KEY_AddFavorite = 269025081
View Source
const KEY_Adiaeresis = 196
View Source
const KEY_Agrave = 192
View Source
const KEY_Ahook = 16785058
View Source
const KEY_Alt_L = 65513
View Source
const KEY_Alt_R = 65514
View Source
const KEY_Amacron = 960
View Source
const KEY_Aogonek = 417
View Source
const KEY_ApplicationLeft = 269025104
View Source
const KEY_ApplicationRight = 269025105
View Source
const KEY_Arabic_0 = 16778848
View Source
const KEY_Arabic_1 = 16778849
View Source
const KEY_Arabic_2 = 16778850
View Source
const KEY_Arabic_3 = 16778851
View Source
const KEY_Arabic_4 = 16778852
View Source
const KEY_Arabic_5 = 16778853
View Source
const KEY_Arabic_6 = 16778854
View Source
const KEY_Arabic_7 = 16778855
View Source
const KEY_Arabic_8 = 16778856
View Source
const KEY_Arabic_9 = 16778857
View Source
const KEY_Arabic_ain = 1497
View Source
const KEY_Arabic_alef = 1479
View Source
const KEY_Arabic_alefmaksura = 1513
View Source
const KEY_Arabic_beh = 1480
View Source
const KEY_Arabic_comma = 1452
View Source
const KEY_Arabic_dad = 1494
View Source
const KEY_Arabic_dal = 1487
View Source
const KEY_Arabic_damma = 1519
View Source
const KEY_Arabic_dammatan = 1516
View Source
const KEY_Arabic_ddal = 16778888
View Source
const KEY_Arabic_farsi_yeh = 16778956
View Source
const KEY_Arabic_fatha = 1518
View Source
const KEY_Arabic_fathatan = 1515
View Source
const KEY_Arabic_feh = 1505
View Source
const KEY_Arabic_fullstop = 16778964
View Source
const KEY_Arabic_gaf = 16778927
View Source
const KEY_Arabic_ghain = 1498
View Source
const KEY_Arabic_ha = 1511
View Source
const KEY_Arabic_hah = 1485
View Source
const KEY_Arabic_hamza = 1473
View Source
const KEY_Arabic_hamza_above = 16778836
View Source
const KEY_Arabic_hamza_below = 16778837
View Source
const KEY_Arabic_hamzaonalef = 1475
View Source
const KEY_Arabic_hamzaonwaw = 1476
View Source
const KEY_Arabic_hamzaonyeh = 1478
View Source
const KEY_Arabic_hamzaunderalef = 1477
View Source
const KEY_Arabic_heh = 1511
View Source
const KEY_Arabic_heh_doachashmee = 16778942
View Source
const KEY_Arabic_heh_goal = 16778945
View Source
const KEY_Arabic_jeem = 1484
View Source
const KEY_Arabic_jeh = 16778904
View Source
const KEY_Arabic_kaf = 1507
View Source
const KEY_Arabic_kasra = 1520
View Source
const KEY_Arabic_kasratan = 1517
View Source
const KEY_Arabic_keheh = 16778921
View Source
const KEY_Arabic_khah = 1486
View Source
const KEY_Arabic_lam = 1508
View Source
const KEY_Arabic_madda_above = 16778835
View Source
const KEY_Arabic_maddaonalef = 1474
View Source
const KEY_Arabic_meem = 1509
View Source
const KEY_Arabic_noon = 1510
View Source
const KEY_Arabic_noon_ghunna = 16778938
View Source
const KEY_Arabic_peh = 16778878
View Source
const KEY_Arabic_percent = 16778858
View Source
const KEY_Arabic_qaf = 1506
View Source
const KEY_Arabic_question_mark = 1471
View Source
const KEY_Arabic_ra = 1489
View Source
const KEY_Arabic_rreh = 16778897
View Source
const KEY_Arabic_sad = 1493
View Source
const KEY_Arabic_seen = 1491
View Source
const KEY_Arabic_semicolon = 1467
View Source
const KEY_Arabic_shadda = 1521
View Source
const KEY_Arabic_sheen = 1492
View Source
const KEY_Arabic_sukun = 1522
View Source
const KEY_Arabic_superscript_alef = 16778864
View Source
const KEY_Arabic_switch = 65406
View Source
const KEY_Arabic_tah = 1495
View Source
const KEY_Arabic_tatweel = 1504
View Source
const KEY_Arabic_tcheh = 16778886
View Source
const KEY_Arabic_teh = 1482
View Source
const KEY_Arabic_tehmarbuta = 1481
View Source
const KEY_Arabic_thal = 1488
View Source
const KEY_Arabic_theh = 1483
View Source
const KEY_Arabic_tteh = 16778873
View Source
const KEY_Arabic_veh = 16778916
View Source
const KEY_Arabic_waw = 1512
View Source
const KEY_Arabic_yeh = 1514
View Source
const KEY_Arabic_yeh_baree = 16778962
View Source
const KEY_Arabic_zah = 1496
View Source
const KEY_Arabic_zain = 1490
View Source
const KEY_Aring = 197
View Source
const KEY_Armenian_AT = 16778552
View Source
const KEY_Armenian_AYB = 16778545
View Source
const KEY_Armenian_BEN = 16778546
View Source
const KEY_Armenian_CHA = 16778569
View Source
const KEY_Armenian_DA = 16778548
View Source
const KEY_Armenian_DZA = 16778561
View Source
const KEY_Armenian_E = 16778551
View Source
const KEY_Armenian_FE = 16778582
View Source
const KEY_Armenian_GHAT = 16778562
View Source
const KEY_Armenian_GIM = 16778547
View Source
const KEY_Armenian_HI = 16778565
View Source
const KEY_Armenian_HO = 16778560
View Source
const KEY_Armenian_INI = 16778555
View Source
const KEY_Armenian_JE = 16778571
View Source
const KEY_Armenian_KE = 16778580
View Source
const KEY_Armenian_KEN = 16778559
View Source
const KEY_Armenian_KHE = 16778557
View Source
const KEY_Armenian_LYUN = 16778556
View Source
const KEY_Armenian_MEN = 16778564
View Source
const KEY_Armenian_NU = 16778566
View Source
const KEY_Armenian_O = 16778581
View Source
const KEY_Armenian_PE = 16778570
View Source
const KEY_Armenian_PYUR = 16778579
View Source
const KEY_Armenian_RA = 16778572
View Source
const KEY_Armenian_RE = 16778576
View Source
const KEY_Armenian_SE = 16778573
View Source
const KEY_Armenian_SHA = 16778567
View Source
const KEY_Armenian_TCHE = 16778563
View Source
const KEY_Armenian_TO = 16778553
View Source
const KEY_Armenian_TSA = 16778558
View Source
const KEY_Armenian_TSO = 16778577
View Source
const KEY_Armenian_TYUN = 16778575
View Source
const KEY_Armenian_VEV = 16778574
View Source
const KEY_Armenian_VO = 16778568
View Source
const KEY_Armenian_VYUN = 16778578
View Source
const KEY_Armenian_YECH = 16778549
View Source
const KEY_Armenian_ZA = 16778550
View Source
const KEY_Armenian_ZHE = 16778554
View Source
const KEY_Armenian_accent = 16778587
View Source
const KEY_Armenian_amanak = 16778588
View Source
const KEY_Armenian_apostrophe = 16778586
View Source
const KEY_Armenian_at = 16778600
View Source
const KEY_Armenian_ayb = 16778593
View Source
const KEY_Armenian_ben = 16778594
View Source
const KEY_Armenian_but = 16778589
View Source
const KEY_Armenian_cha = 16778617
View Source
const KEY_Armenian_da = 16778596
View Source
const KEY_Armenian_dza = 16778609
View Source
const KEY_Armenian_e = 16778599
View Source
const KEY_Armenian_exclam = 16778588
View Source
const KEY_Armenian_fe = 16778630
View Source
const KEY_Armenian_full_stop = 16778633
View Source
const KEY_Armenian_ghat = 16778610
View Source
const KEY_Armenian_gim = 16778595
View Source
const KEY_Armenian_hi = 16778613
View Source
const KEY_Armenian_ho = 16778608
View Source
const KEY_Armenian_hyphen = 16778634
View Source
const KEY_Armenian_ini = 16778603
View Source
const KEY_Armenian_je = 16778619
View Source
const KEY_Armenian_ke = 16778628
View Source
const KEY_Armenian_ken = 16778607
View Source
const KEY_Armenian_khe = 16778605
View Source
const KEY_Armenian_ligature_ew = 16778631
View Source
const KEY_Armenian_lyun = 16778604
View Source
const KEY_Armenian_men = 16778612
View Source
const KEY_Armenian_nu = 16778614
View Source
const KEY_Armenian_o = 16778629
View Source
const KEY_Armenian_paruyk = 16778590
View Source
const KEY_Armenian_pe = 16778618
View Source
const KEY_Armenian_pyur = 16778627
View Source
const KEY_Armenian_question = 16778590
View Source
const KEY_Armenian_ra = 16778620
View Source
const KEY_Armenian_re = 16778624
View Source
const KEY_Armenian_se = 16778621
View Source
const KEY_Armenian_separation_mark = 16778589
View Source
const KEY_Armenian_sha = 16778615
View Source
const KEY_Armenian_shesht = 16778587
View Source
const KEY_Armenian_tche = 16778611
View Source
const KEY_Armenian_to = 16778601
View Source
const KEY_Armenian_tsa = 16778606
View Source
const KEY_Armenian_tso = 16778625
View Source
const KEY_Armenian_tyun = 16778623
View Source
const KEY_Armenian_verjaket = 16778633
View Source
const KEY_Armenian_vev = 16778622
View Source
const KEY_Armenian_vo = 16778616
View Source
const KEY_Armenian_vyun = 16778626
View Source
const KEY_Armenian_yech = 16778597
View Source
const KEY_Armenian_yentamna = 16778634
View Source
const KEY_Armenian_za = 16778598
View Source
const KEY_Armenian_zhe = 16778602
View Source
const KEY_Atilde = 195
View Source
const KEY_AudibleBell_Enable = 65146
View Source
const KEY_AudioCycleTrack = 269025179
View Source
const KEY_AudioForward = 269025175
View Source
const KEY_AudioLowerVolume = 269025041
View Source
const KEY_AudioMedia = 269025074
View Source
const KEY_AudioMicMute = 269025202
View Source
const KEY_AudioMute = 269025042
View Source
const KEY_AudioNext = 269025047
View Source
const KEY_AudioPause = 269025073
View Source
const KEY_AudioPlay = 269025044
View Source
const KEY_AudioPreset = 269025206
View Source
const KEY_AudioPrev = 269025046
View Source
const KEY_AudioRaiseVolume = 269025043
View Source
const KEY_AudioRandomPlay = 269025177
View Source
const KEY_AudioRecord = 269025052
View Source
const KEY_AudioRepeat = 269025176
View Source
const KEY_AudioRewind = 269025086
View Source
const KEY_AudioStop = 269025045
View Source
const KEY_Away = 269025165
View Source
const KEY_B = 66
View Source
const KEY_Babovedot = 16784898
View Source
const KEY_Back = 269025062
View Source
const KEY_BackForward = 269025087
View Source
const KEY_BackSpace = 65288
View Source
const KEY_Battery = 269025171
View Source
const KEY_Begin = 65368
View Source
const KEY_Blue = 269025190
View Source
const KEY_Bluetooth = 269025172
View Source
const KEY_Book = 269025106
View Source
const KEY_BounceKeys_Enable = 65140
View Source
const KEY_Break = 65387
View Source
const KEY_BrightnessAdjust = 269025083
View Source
const KEY_Byelorussian_SHORTU = 1726
View Source
const KEY_Byelorussian_shortu = 1710
View Source
const KEY_C = 67
View Source
const KEY_CD = 269025107
View Source
const KEY_CH = 65186
View Source
const KEY_C_H = 65189
View Source
const KEY_C_h = 65188
View Source
const KEY_Cabovedot = 709
View Source
const KEY_Cacute = 454
View Source
const KEY_Calculator = 269025053
View Source
const KEY_Calendar = 269025056
View Source
const KEY_Cancel = 65385
View Source
const KEY_Caps_Lock = 65509
View Source
const KEY_Ccaron = 456
View Source
const KEY_Ccedilla = 199
View Source
const KEY_Ccircumflex = 710
View Source
const KEY_Ch = 65185
View Source
const KEY_Clear = 65291
View Source
const KEY_ClearGrab = 269024801
View Source
const KEY_Close = 269025110
View Source
const KEY_Codeinput = 65335
View Source
const KEY_ColonSign = 16785569
View Source
const KEY_Community = 269025085
View Source
const KEY_ContrastAdjust = 269025058
View Source
const KEY_Control_L = 65507
View Source
const KEY_Control_R = 65508
View Source
const KEY_Copy = 269025111
View Source
const KEY_CruzeiroSign = 16785570
View Source
const KEY_Cut = 269025112
View Source
const KEY_CycleAngle = 269025180
View Source
const KEY_Cyrillic_A = 1761
View Source
const KEY_Cyrillic_BE = 1762
View Source
const KEY_Cyrillic_CHE = 1790
View Source
const KEY_Cyrillic_CHE_descender = 16778422
View Source
const KEY_Cyrillic_CHE_vertstroke = 16778424
View Source
const KEY_Cyrillic_DE = 1764
View Source
const KEY_Cyrillic_DZHE = 1727
View Source
const KEY_Cyrillic_E = 1788
View Source
const KEY_Cyrillic_EF = 1766
View Source
const KEY_Cyrillic_EL = 1772
View Source
const KEY_Cyrillic_EM = 1773
View Source
const KEY_Cyrillic_EN = 1774
View Source
const KEY_Cyrillic_EN_descender = 16778402
View Source
const KEY_Cyrillic_ER = 1778
View Source
const KEY_Cyrillic_ES = 1779
View Source
const KEY_Cyrillic_GHE = 1767
View Source
const KEY_Cyrillic_GHE_bar = 16778386
View Source
const KEY_Cyrillic_HA = 1768
View Source
const KEY_Cyrillic_HARDSIGN = 1791
View Source
const KEY_Cyrillic_HA_descender = 16778418
View Source
const KEY_Cyrillic_I = 1769
View Source
const KEY_Cyrillic_IE = 1765
View Source
const KEY_Cyrillic_IO = 1715
View Source
const KEY_Cyrillic_I_macron = 16778466
View Source
const KEY_Cyrillic_JE = 1720
View Source
const KEY_Cyrillic_KA = 1771
View Source
const KEY_Cyrillic_KA_descender = 16778394
View Source
const KEY_Cyrillic_KA_vertstroke = 16778396
View Source
const KEY_Cyrillic_LJE = 1721
View Source
const KEY_Cyrillic_NJE = 1722
View Source
const KEY_Cyrillic_O = 1775
View Source
const KEY_Cyrillic_O_bar = 16778472
View Source
const KEY_Cyrillic_PE = 1776
View Source
const KEY_Cyrillic_SCHWA = 16778456
View Source
const KEY_Cyrillic_SHA = 1787
View Source
const KEY_Cyrillic_SHCHA = 1789
View Source
const KEY_Cyrillic_SHHA = 16778426
View Source
const KEY_Cyrillic_SHORTI = 1770
View Source
const KEY_Cyrillic_SOFTSIGN = 1784
View Source
const KEY_Cyrillic_TE = 1780
View Source
const KEY_Cyrillic_TSE = 1763
View Source
const KEY_Cyrillic_U = 1781
View Source
const KEY_Cyrillic_U_macron = 16778478
View Source
const KEY_Cyrillic_U_straight = 16778414
View Source
const KEY_Cyrillic_U_straight_bar = 16778416
View Source
const KEY_Cyrillic_VE = 1783
View Source
const KEY_Cyrillic_YA = 1777
View Source
const KEY_Cyrillic_YERU = 1785
View Source
const KEY_Cyrillic_YU = 1760
View Source
const KEY_Cyrillic_ZE = 1786
View Source
const KEY_Cyrillic_ZHE = 1782
View Source
const KEY_Cyrillic_ZHE_descender = 16778390
View Source
const KEY_Cyrillic_a = 1729
View Source
const KEY_Cyrillic_be = 1730
View Source
const KEY_Cyrillic_che = 1758
View Source
const KEY_Cyrillic_che_descender = 16778423
View Source
const KEY_Cyrillic_che_vertstroke = 16778425
View Source
const KEY_Cyrillic_de = 1732
View Source
const KEY_Cyrillic_dzhe = 1711
View Source
const KEY_Cyrillic_e = 1756
View Source
const KEY_Cyrillic_ef = 1734
View Source
const KEY_Cyrillic_el = 1740
View Source
const KEY_Cyrillic_em = 1741
View Source
const KEY_Cyrillic_en = 1742
View Source
const KEY_Cyrillic_en_descender = 16778403
View Source
const KEY_Cyrillic_er = 1746
View Source
const KEY_Cyrillic_es = 1747
View Source
const KEY_Cyrillic_ghe = 1735
View Source
const KEY_Cyrillic_ghe_bar = 16778387
View Source
const KEY_Cyrillic_ha = 1736
View Source
const KEY_Cyrillic_ha_descender = 16778419
View Source
const KEY_Cyrillic_hardsign = 1759
View Source
const KEY_Cyrillic_i = 1737
View Source
const KEY_Cyrillic_i_macron = 16778467
View Source
const KEY_Cyrillic_ie = 1733
View Source
const KEY_Cyrillic_io = 1699
View Source
const KEY_Cyrillic_je = 1704
View Source
const KEY_Cyrillic_ka = 1739
View Source
const KEY_Cyrillic_ka_descender = 16778395
View Source
const KEY_Cyrillic_ka_vertstroke = 16778397
View Source
const KEY_Cyrillic_lje = 1705
View Source
const KEY_Cyrillic_nje = 1706
View Source
const KEY_Cyrillic_o = 1743
View Source
const KEY_Cyrillic_o_bar = 16778473
View Source
const KEY_Cyrillic_pe = 1744
View Source
const KEY_Cyrillic_schwa = 16778457
View Source
const KEY_Cyrillic_sha = 1755
View Source
const KEY_Cyrillic_shcha = 1757
View Source
const KEY_Cyrillic_shha = 16778427
View Source
const KEY_Cyrillic_shorti = 1738
View Source
const KEY_Cyrillic_softsign = 1752
View Source
const KEY_Cyrillic_te = 1748
View Source
const KEY_Cyrillic_tse = 1731
View Source
const KEY_Cyrillic_u = 1749
View Source
const KEY_Cyrillic_u_macron = 16778479
View Source
const KEY_Cyrillic_u_straight = 16778415
View Source
const KEY_Cyrillic_u_straight_bar = 16778417
View Source
const KEY_Cyrillic_ve = 1751
View Source
const KEY_Cyrillic_ya = 1745
View Source
const KEY_Cyrillic_yeru = 1753
View Source
const KEY_Cyrillic_yu = 1728
View Source
const KEY_Cyrillic_ze = 1754
View Source
const KEY_Cyrillic_zhe = 1750
View Source
const KEY_Cyrillic_zhe_descender = 16778391
View Source
const KEY_D = 68
View Source
const KEY_DOS = 269025114
View Source
const KEY_Dabovedot = 16784906
View Source
const KEY_Dcaron = 463
View Source
const KEY_Delete = 65535
View Source
const KEY_Display = 269025113
View Source
const KEY_Documents = 269025115
View Source
const KEY_DongSign = 16785579
View Source
const KEY_Down = 65364
View Source
const KEY_Dstroke = 464
View Source
const KEY_E = 69
View Source
const KEY_ENG = 957
View Source
const KEY_ETH = 208
View Source
const KEY_EZH = 16777655
View Source
const KEY_Eabovedot = 972
View Source
const KEY_Eacute = 201
View Source
const KEY_Ebelowdot = 16785080
View Source
const KEY_Ecaron = 460
View Source
const KEY_Ecircumflex = 202
View Source
const KEY_Ecircumflexacute = 16785086
View Source
const KEY_Ecircumflexbelowdot = 16785094
View Source
const KEY_Ecircumflexgrave = 16785088
View Source
const KEY_Ecircumflexhook = 16785090
View Source
const KEY_Ecircumflextilde = 16785092
View Source
const KEY_EcuSign = 16785568
View Source
const KEY_Ediaeresis = 203
View Source
const KEY_Egrave = 200
View Source
const KEY_Ehook = 16785082
View Source
const KEY_Eisu_Shift = 65327
View Source
const KEY_Eisu_toggle = 65328
View Source
const KEY_Eject = 269025068
View Source
const KEY_Emacron = 938
View Source
const KEY_End = 65367
View Source
const KEY_Eogonek = 458
View Source
const KEY_Escape = 65307
View Source
const KEY_Eth = 208
View Source
const KEY_Etilde = 16785084
View Source
const KEY_EuroSign = 8364
View Source
const KEY_Excel = 269025116
View Source
const KEY_Execute = 65378
View Source
const KEY_Explorer = 269025117
View Source
const KEY_F = 70
View Source
const KEY_F1 = 65470
View Source
const KEY_F10 = 65479
View Source
const KEY_F11 = 65480
View Source
const KEY_F12 = 65481
View Source
const KEY_F13 = 65482
View Source
const KEY_F14 = 65483
View Source
const KEY_F15 = 65484
View Source
const KEY_F16 = 65485
View Source
const KEY_F17 = 65486
View Source
const KEY_F18 = 65487
View Source
const KEY_F19 = 65488
View Source
const KEY_F2 = 65471
View Source
const KEY_F20 = 65489
View Source
const KEY_F21 = 65490
View Source
const KEY_F22 = 65491
View Source
const KEY_F23 = 65492
View Source
const KEY_F24 = 65493
View Source
const KEY_F25 = 65494
View Source
const KEY_F26 = 65495
View Source
const KEY_F27 = 65496
View Source
const KEY_F28 = 65497
View Source
const KEY_F29 = 65498
View Source
const KEY_F3 = 65472
View Source
const KEY_F30 = 65499
View Source
const KEY_F31 = 65500
View Source
const KEY_F32 = 65501
View Source
const KEY_F33 = 65502
View Source
const KEY_F34 = 65503
View Source
const KEY_F35 = 65504
View Source
const KEY_F4 = 65473
View Source
const KEY_F5 = 65474
View Source
const KEY_F6 = 65475
View Source
const KEY_F7 = 65476
View Source
const KEY_F8 = 65477
View Source
const KEY_F9 = 65478
View Source
const KEY_FFrancSign = 16785571
View Source
const KEY_Fabovedot = 16784926
View Source
const KEY_Farsi_0 = 16778992
View Source
const KEY_Farsi_1 = 16778993
View Source
const KEY_Farsi_2 = 16778994
View Source
const KEY_Farsi_3 = 16778995
View Source
const KEY_Farsi_4 = 16778996
View Source
const KEY_Farsi_5 = 16778997
View Source
const KEY_Farsi_6 = 16778998
View Source
const KEY_Farsi_7 = 16778999
View Source
const KEY_Farsi_8 = 16779000
View Source
const KEY_Farsi_9 = 16779001
View Source
const KEY_Farsi_yeh = 16778956
View Source
const KEY_Favorites = 269025072
View Source
const KEY_Finance = 269025084
View Source
const KEY_Find = 65384
View Source
const KEY_First_Virtual_Screen = 65232
View Source
const KEY_Forward = 269025063
View Source
const KEY_FrameBack = 269025181
View Source
const KEY_FrameForward = 269025182
View Source
const KEY_G = 71
View Source
const KEY_Gabovedot = 725
View Source
const KEY_Game = 269025118
View Source
const KEY_Gbreve = 683
View Source
const KEY_Gcaron = 16777702
View Source
const KEY_Gcedilla = 939
View Source
const KEY_Gcircumflex = 728
View Source
const KEY_Georgian_an = 16781520
View Source
const KEY_Georgian_ban = 16781521
View Source
const KEY_Georgian_can = 16781546
View Source
const KEY_Georgian_char = 16781549
View Source
const KEY_Georgian_chin = 16781545
View Source
const KEY_Georgian_cil = 16781548
View Source
const KEY_Georgian_don = 16781523
View Source
const KEY_Georgian_en = 16781524
View Source
const KEY_Georgian_fi = 16781558
View Source
const KEY_Georgian_gan = 16781522
View Source
const KEY_Georgian_ghan = 16781542
View Source
const KEY_Georgian_hae = 16781552
View Source
const KEY_Georgian_har = 16781556
View Source
const KEY_Georgian_he = 16781553
View Source
const KEY_Georgian_hie = 16781554
View Source
const KEY_Georgian_hoe = 16781557
View Source
const KEY_Georgian_in = 16781528
View Source
const KEY_Georgian_jhan = 16781551
View Source
const KEY_Georgian_jil = 16781547
View Source
const KEY_Georgian_kan = 16781529
View Source
const KEY_Georgian_khar = 16781541
View Source
const KEY_Georgian_las = 16781530
View Source
const KEY_Georgian_man = 16781531
View Source
const KEY_Georgian_nar = 16781532
View Source
const KEY_Georgian_on = 16781533
View Source
const KEY_Georgian_par = 16781534
View Source
const KEY_Georgian_phar = 16781540
View Source
const KEY_Georgian_qar = 16781543
View Source
const KEY_Georgian_rae = 16781536
View Source
const KEY_Georgian_san = 16781537
View Source
const KEY_Georgian_shin = 16781544
View Source
const KEY_Georgian_tan = 16781527
View Source
const KEY_Georgian_tar = 16781538
View Source
const KEY_Georgian_un = 16781539
View Source
const KEY_Georgian_vin = 16781525
View Source
const KEY_Georgian_we = 16781555
View Source
const KEY_Georgian_xan = 16781550
View Source
const KEY_Georgian_zen = 16781526
View Source
const KEY_Georgian_zhar = 16781535
View Source
const KEY_Go = 269025119
View Source
const KEY_Greek_ALPHA = 1985
View Source
const KEY_Greek_ALPHAaccent = 1953
View Source
const KEY_Greek_BETA = 1986
View Source
const KEY_Greek_CHI = 2007
View Source
const KEY_Greek_DELTA = 1988
View Source
const KEY_Greek_EPSILON = 1989
View Source
const KEY_Greek_EPSILONaccent = 1954
View Source
const KEY_Greek_ETA = 1991
View Source
const KEY_Greek_ETAaccent = 1955
View Source
const KEY_Greek_GAMMA = 1987
View Source
const KEY_Greek_IOTA = 1993
View Source
const KEY_Greek_IOTAaccent = 1956
View Source
const KEY_Greek_IOTAdiaeresis = 1957
View Source
const KEY_Greek_IOTAdieresis = 1957
View Source
const KEY_Greek_KAPPA = 1994
View Source
const KEY_Greek_LAMBDA = 1995
View Source
const KEY_Greek_LAMDA = 1995
View Source
const KEY_Greek_MU = 1996
View Source
const KEY_Greek_NU = 1997
View Source
const KEY_Greek_OMEGA = 2009
View Source
const KEY_Greek_OMEGAaccent = 1963
View Source
const KEY_Greek_OMICRON = 1999
View Source
const KEY_Greek_OMICRONaccent = 1959
View Source
const KEY_Greek_PHI = 2006
View Source
const KEY_Greek_PI = 2000
View Source
const KEY_Greek_PSI = 2008
View Source
const KEY_Greek_RHO = 2001
View Source
const KEY_Greek_SIGMA = 2002
View Source
const KEY_Greek_TAU = 2004
View Source
const KEY_Greek_THETA = 1992
View Source
const KEY_Greek_UPSILON = 2005
View Source
const KEY_Greek_UPSILONaccent = 1960
View Source
const KEY_Greek_UPSILONdieresis = 1961
View Source
const KEY_Greek_XI = 1998
View Source
const KEY_Greek_ZETA = 1990
View Source
const KEY_Greek_accentdieresis = 1966
View Source
const KEY_Greek_alpha = 2017
View Source
const KEY_Greek_alphaaccent = 1969
View Source
const KEY_Greek_beta = 2018
View Source
const KEY_Greek_chi = 2039
View Source
const KEY_Greek_delta = 2020
View Source
const KEY_Greek_epsilon = 2021
View Source
const KEY_Greek_epsilonaccent = 1970
View Source
const KEY_Greek_eta = 2023
View Source
const KEY_Greek_etaaccent = 1971
View Source
const KEY_Greek_finalsmallsigma = 2035
View Source
const KEY_Greek_gamma = 2019
View Source
const KEY_Greek_horizbar = 1967
View Source
const KEY_Greek_iota = 2025
View Source
const KEY_Greek_iotaaccent = 1972
View Source
const KEY_Greek_iotaaccentdieresis = 1974
View Source
const KEY_Greek_iotadieresis = 1973
View Source
const KEY_Greek_kappa = 2026
View Source
const KEY_Greek_lambda = 2027
View Source
const KEY_Greek_lamda = 2027
View Source
const KEY_Greek_mu = 2028
View Source
const KEY_Greek_nu = 2029
View Source
const KEY_Greek_omega = 2041
View Source
const KEY_Greek_omegaaccent = 1979
View Source
const KEY_Greek_omicron = 2031
View Source
const KEY_Greek_omicronaccent = 1975
View Source
const KEY_Greek_phi = 2038
View Source
const KEY_Greek_pi = 2032
View Source
const KEY_Greek_psi = 2040
View Source
const KEY_Greek_rho = 2033
View Source
const KEY_Greek_sigma = 2034
View Source
const KEY_Greek_switch = 65406
View Source
const KEY_Greek_tau = 2036
View Source
const KEY_Greek_theta = 2024
View Source
const KEY_Greek_upsilon = 2037
View Source
const KEY_Greek_upsilonaccent = 1976
View Source
const KEY_Greek_upsilonaccentdieresis = 1978
View Source
const KEY_Greek_upsilondieresis = 1977
View Source
const KEY_Greek_xi = 2030
View Source
const KEY_Greek_zeta = 2022
View Source
const KEY_Green = 269025188
View Source
const KEY_H = 72
View Source
const KEY_Hangul = 65329
View Source
const KEY_Hangul_A = 3775
View Source
const KEY_Hangul_AE = 3776
View Source
const KEY_Hangul_AraeA = 3830
View Source
const KEY_Hangul_AraeAE = 3831
View Source
const KEY_Hangul_Banja = 65337
View Source
const KEY_Hangul_Cieuc = 3770
View Source
const KEY_Hangul_Codeinput = 65335
View Source
const KEY_Hangul_Dikeud = 3751
View Source
const KEY_Hangul_E = 3780
View Source
const KEY_Hangul_EO = 3779
View Source
const KEY_Hangul_EU = 3793
View Source
const KEY_Hangul_End = 65331
View Source
const KEY_Hangul_Hanja = 65332
View Source
const KEY_Hangul_Hieuh = 3774
View Source
const KEY_Hangul_I = 3795
View Source
const KEY_Hangul_Ieung = 3767
View Source
const KEY_Hangul_J_Cieuc = 3818
View Source
const KEY_Hangul_J_Dikeud = 3802
View Source
const KEY_Hangul_J_Hieuh = 3822
View Source
const KEY_Hangul_J_Ieung = 3816
View Source
const KEY_Hangul_J_Jieuj = 3817
View Source
const KEY_Hangul_J_Khieuq = 3819
View Source
const KEY_Hangul_J_Kiyeog = 3796
View Source
const KEY_Hangul_J_KiyeogSios = 3798
View Source
const KEY_Hangul_J_KkogjiDalrinIeung = 3833
View Source
const KEY_Hangul_J_Mieum = 3811
View Source
const KEY_Hangul_J_Nieun = 3799
View Source
const KEY_Hangul_J_NieunHieuh = 3801
View Source
const KEY_Hangul_J_NieunJieuj = 3800
View Source
const KEY_Hangul_J_PanSios = 3832
View Source
const KEY_Hangul_J_Phieuf = 3821
View Source
const KEY_Hangul_J_Pieub = 3812
View Source
const KEY_Hangul_J_PieubSios = 3813
View Source
const KEY_Hangul_J_Rieul = 3803
View Source
const KEY_Hangul_J_RieulHieuh = 3810
View Source
const KEY_Hangul_J_RieulKiyeog = 3804
View Source
const KEY_Hangul_J_RieulMieum = 3805
View Source
const KEY_Hangul_J_RieulPhieuf = 3809
View Source
const KEY_Hangul_J_RieulPieub = 3806
View Source
const KEY_Hangul_J_RieulSios = 3807
View Source
const KEY_Hangul_J_RieulTieut = 3808
View Source
const KEY_Hangul_J_Sios = 3814
View Source
const KEY_Hangul_J_SsangKiyeog = 3797
View Source
const KEY_Hangul_J_SsangSios = 3815
View Source
const KEY_Hangul_J_Tieut = 3820
View Source
const KEY_Hangul_J_YeorinHieuh = 3834
View Source
const KEY_Hangul_Jamo = 65333
View Source
const KEY_Hangul_Jeonja = 65336
View Source
const KEY_Hangul_Jieuj = 3768
View Source
const KEY_Hangul_Khieuq = 3771
View Source
const KEY_Hangul_Kiyeog = 3745
View Source
const KEY_Hangul_KiyeogSios = 3747
View Source
const KEY_Hangul_KkogjiDalrinIeung = 3827
View Source
const KEY_Hangul_Mieum = 3761
View Source
const KEY_Hangul_MultipleCandidate = 65341
View Source
const KEY_Hangul_Nieun = 3748
View Source
const KEY_Hangul_NieunHieuh = 3750
View Source
const KEY_Hangul_NieunJieuj = 3749
View Source
const KEY_Hangul_O = 3783
View Source
const KEY_Hangul_OE = 3786
View Source
const KEY_Hangul_PanSios = 3826
View Source
const KEY_Hangul_Phieuf = 3773
View Source
const KEY_Hangul_Pieub = 3762
View Source
const KEY_Hangul_PieubSios = 3764
View Source
const KEY_Hangul_PostHanja = 65339
View Source
const KEY_Hangul_PreHanja = 65338
View Source
const KEY_Hangul_PreviousCandidate = 65342
View Source
const KEY_Hangul_Rieul = 3753
View Source
const KEY_Hangul_RieulHieuh = 3760
View Source
const KEY_Hangul_RieulKiyeog = 3754
View Source
const KEY_Hangul_RieulMieum = 3755
View Source
const KEY_Hangul_RieulPhieuf = 3759
View Source
const KEY_Hangul_RieulPieub = 3756
View Source
const KEY_Hangul_RieulSios = 3757
View Source
const KEY_Hangul_RieulTieut = 3758
View Source
const KEY_Hangul_RieulYeorinHieuh = 3823
View Source
const KEY_Hangul_Romaja = 65334
View Source
const KEY_Hangul_SingleCandidate = 65340
View Source
const KEY_Hangul_Sios = 3765
View Source
const KEY_Hangul_Special = 65343
View Source
const KEY_Hangul_SsangDikeud = 3752
View Source
const KEY_Hangul_SsangJieuj = 3769
View Source
const KEY_Hangul_SsangKiyeog = 3746
View Source
const KEY_Hangul_SsangPieub = 3763
View Source
const KEY_Hangul_SsangSios = 3766
View Source
const KEY_Hangul_Start = 65330
View Source
const KEY_Hangul_SunkyeongeumMieum = 3824
View Source
const KEY_Hangul_SunkyeongeumPhieuf = 3828
View Source
const KEY_Hangul_SunkyeongeumPieub = 3825
View Source
const KEY_Hangul_Tieut = 3772
View Source
const KEY_Hangul_U = 3788
View Source
const KEY_Hangul_WA = 3784
View Source
const KEY_Hangul_WAE = 3785
View Source
const KEY_Hangul_WE = 3790
View Source
const KEY_Hangul_WEO = 3789
View Source
const KEY_Hangul_WI = 3791
View Source
const KEY_Hangul_YA = 3777
View Source
const KEY_Hangul_YAE = 3778
View Source
const KEY_Hangul_YE = 3782
View Source
const KEY_Hangul_YEO = 3781
View Source
const KEY_Hangul_YI = 3794
View Source
const KEY_Hangul_YO = 3787
View Source
const KEY_Hangul_YU = 3792
View Source
const KEY_Hangul_YeorinHieuh = 3829
View Source
const KEY_Hangul_switch = 65406
View Source
const KEY_Hankaku = 65321
View Source
const KEY_Hcircumflex = 678
View Source
const KEY_Hebrew_switch = 65406
View Source
const KEY_Help = 65386
View Source
const KEY_Henkan = 65315
View Source
const KEY_Henkan_Mode = 65315
View Source
const KEY_Hibernate = 269025192
View Source
const KEY_Hiragana = 65317
View Source
const KEY_Hiragana_Katakana = 65319
View Source
const KEY_History = 269025079
View Source
const KEY_Home = 65360
View Source
const KEY_HomePage = 269025048
View Source
const KEY_HotLinks = 269025082
View Source
const KEY_Hstroke = 673
View Source
const KEY_Hyper_L = 65517
View Source
const KEY_Hyper_R = 65518
View Source
const KEY_I = 73
View Source
const KEY_ISO_Center_Object = 65075
View Source
const KEY_ISO_Continuous_Underline = 65072
View Source
const KEY_ISO_Discontinuous_Underline = 65073
View Source
const KEY_ISO_Emphasize = 65074
View Source
const KEY_ISO_Enter = 65076
View Source
const KEY_ISO_Fast_Cursor_Down = 65071
View Source
const KEY_ISO_Fast_Cursor_Left = 65068
View Source
const KEY_ISO_Fast_Cursor_Right = 65069
View Source
const KEY_ISO_Fast_Cursor_Up = 65070
View Source
const KEY_ISO_First_Group = 65036
View Source
const KEY_ISO_First_Group_Lock = 65037
View Source
const KEY_ISO_Group_Latch = 65030
View Source
const KEY_ISO_Group_Lock = 65031
View Source
const KEY_ISO_Group_Shift = 65406
View Source
const KEY_ISO_Last_Group = 65038
View Source
const KEY_ISO_Last_Group_Lock = 65039
View Source
const KEY_ISO_Left_Tab = 65056
View Source
const KEY_ISO_Level2_Latch = 65026
View Source
const KEY_ISO_Level3_Latch = 65028
View Source
const KEY_ISO_Level3_Lock = 65029
View Source
const KEY_ISO_Level3_Shift = 65027
View Source
const KEY_ISO_Level5_Latch = 65042
View Source
const KEY_ISO_Level5_Lock = 65043
View Source
const KEY_ISO_Level5_Shift = 65041
View Source
const KEY_ISO_Lock = 65025
View Source
const KEY_ISO_Move_Line_Down = 65058
View Source
const KEY_ISO_Move_Line_Up = 65057
View Source
const KEY_ISO_Next_Group = 65032
View Source
const KEY_ISO_Next_Group_Lock = 65033
View Source
const KEY_ISO_Partial_Line_Down = 65060
View Source
const KEY_ISO_Partial_Line_Up = 65059
View Source
const KEY_ISO_Partial_Space_Left = 65061
View Source
const KEY_ISO_Partial_Space_Right = 65062
View Source
const KEY_ISO_Prev_Group = 65034
View Source
const KEY_ISO_Prev_Group_Lock = 65035
View Source
const KEY_ISO_Release_Both_Margins = 65067
View Source
const KEY_ISO_Release_Margin_Left = 65065
View Source
const KEY_ISO_Release_Margin_Right = 65066
View Source
const KEY_ISO_Set_Margin_Left = 65063
View Source
const KEY_ISO_Set_Margin_Right = 65064
View Source
const KEY_Iabovedot = 681
View Source
const KEY_Iacute = 205
View Source
const KEY_Ibelowdot = 16785098
View Source
const KEY_Ibreve = 16777516
View Source
const KEY_Icircumflex = 206
View Source
const KEY_Idiaeresis = 207
View Source
const KEY_Igrave = 204
View Source
const KEY_Ihook = 16785096
View Source
const KEY_Imacron = 975
View Source
const KEY_Insert = 65379
View Source
const KEY_Iogonek = 967
View Source
const KEY_Itilde = 933
View Source
const KEY_J = 74
View Source
const KEY_Jcircumflex = 684
View Source
const KEY_K = 75
View Source
const KEY_KP_0 = 65456
View Source
const KEY_KP_1 = 65457
View Source
const KEY_KP_2 = 65458
View Source
const KEY_KP_3 = 65459
View Source
const KEY_KP_4 = 65460
View Source
const KEY_KP_5 = 65461
View Source
const KEY_KP_6 = 65462
View Source
const KEY_KP_7 = 65463
View Source
const KEY_KP_8 = 65464
View Source
const KEY_KP_9 = 65465
View Source
const KEY_KP_Add = 65451
View Source
const KEY_KP_Begin = 65437
View Source
const KEY_KP_Decimal = 65454
View Source
const KEY_KP_Delete = 65439
View Source
const KEY_KP_Divide = 65455
View Source
const KEY_KP_Down = 65433
View Source
const KEY_KP_End = 65436
View Source
const KEY_KP_Enter = 65421
View Source
const KEY_KP_Equal = 65469
View Source
const KEY_KP_F1 = 65425
View Source
const KEY_KP_F2 = 65426
View Source
const KEY_KP_F3 = 65427
View Source
const KEY_KP_F4 = 65428
View Source
const KEY_KP_Home = 65429
View Source
const KEY_KP_Insert = 65438
View Source
const KEY_KP_Left = 65430
View Source
const KEY_KP_Multiply = 65450
View Source
const KEY_KP_Next = 65435
View Source
const KEY_KP_Page_Down = 65435
View Source
const KEY_KP_Page_Up = 65434
View Source
const KEY_KP_Prior = 65434
View Source
const KEY_KP_Right = 65432
View Source
const KEY_KP_Separator = 65452
View Source
const KEY_KP_Space = 65408
View Source
const KEY_KP_Subtract = 65453
View Source
const KEY_KP_Tab = 65417
View Source
const KEY_KP_Up = 65431
View Source
const KEY_Kana_Lock = 65325
View Source
const KEY_Kana_Shift = 65326
View Source
const KEY_Kanji = 65313
View Source
const KEY_Kanji_Bangou = 65335
View Source
const KEY_Katakana = 65318
View Source
const KEY_KbdBrightnessDown = 269025030
View Source
const KEY_KbdBrightnessUp = 269025029
View Source
const KEY_KbdLightOnOff = 269025028
View Source
const KEY_Kcedilla = 979
View Source
const KEY_Keyboard = 269025203
View Source
const KEY_Korean_Won = 3839
View Source
const KEY_L = 76
View Source
const KEY_L1 = 65480
View Source
const KEY_L10 = 65489
View Source
const KEY_L2 = 65481
View Source
const KEY_L3 = 65482
View Source
const KEY_L4 = 65483
View Source
const KEY_L5 = 65484
View Source
const KEY_L6 = 65485
View Source
const KEY_L7 = 65486
View Source
const KEY_L8 = 65487
View Source
const KEY_L9 = 65488
View Source
const KEY_Lacute = 453
View Source
const KEY_Last_Virtual_Screen = 65236
View Source
const KEY_Launch0 = 269025088
View Source
const KEY_Launch1 = 269025089
View Source
const KEY_Launch2 = 269025090
View Source
const KEY_Launch3 = 269025091
View Source
const KEY_Launch4 = 269025092
View Source
const KEY_Launch5 = 269025093
View Source
const KEY_Launch6 = 269025094
View Source
const KEY_Launch7 = 269025095
View Source
const KEY_Launch8 = 269025096
View Source
const KEY_Launch9 = 269025097
View Source
const KEY_LaunchA = 269025098
View Source
const KEY_LaunchB = 269025099
View Source
const KEY_LaunchC = 269025100
View Source
const KEY_LaunchD = 269025101
View Source
const KEY_LaunchE = 269025102
View Source
const KEY_LaunchF = 269025103
View Source
const KEY_Lbelowdot = 16784950
View Source
const KEY_Lcaron = 421
View Source
const KEY_Lcedilla = 934
View Source
const KEY_Left = 65361
View Source
const KEY_LightBulb = 269025077
View Source
const KEY_Linefeed = 65290
View Source
const KEY_LiraSign = 16785572
View Source
const KEY_LogGrabInfo = 269024805
View Source
const KEY_LogOff = 269025121
View Source
const KEY_LogWindowTree = 269024804
View Source
const KEY_Lstroke = 419
View Source
const KEY_M = 77
View Source
const KEY_Mabovedot = 16784960
View Source
const KEY_Macedonia_DSE = 1717
View Source
const KEY_Macedonia_GJE = 1714
View Source
const KEY_Macedonia_KJE = 1724
View Source
const KEY_Macedonia_dse = 1701
View Source
const KEY_Macedonia_gje = 1698
View Source
const KEY_Macedonia_kje = 1708
View Source
const KEY_Mae_Koho = 65342
View Source
const KEY_Mail = 269025049
View Source
const KEY_MailForward = 269025168
View Source
const KEY_Market = 269025122
View Source
const KEY_Massyo = 65324
View Source
const KEY_Meeting = 269025123
View Source
const KEY_Memo = 269025054
View Source
const KEY_Menu = 65383
View Source
const KEY_MenuKB = 269025125
View Source
const KEY_MenuPB = 269025126
View Source
const KEY_Messenger = 269025166
View Source
const KEY_Meta_L = 65511
View Source
const KEY_Meta_R = 65512
View Source
const KEY_MillSign = 16785573
View Source
const KEY_ModeLock = 269025025
View Source
const KEY_Mode_switch = 65406
View Source
const KEY_MonBrightnessDown = 269025027
View Source
const KEY_MonBrightnessUp = 269025026
View Source
const KEY_MouseKeys_Accel_Enable = 65143
View Source
const KEY_MouseKeys_Enable = 65142
View Source
const KEY_Muhenkan = 65314
View Source
const KEY_Multi_key = 65312
View Source
const KEY_MultipleCandidate = 65341
View Source
const KEY_Music = 269025170
View Source
const KEY_MyComputer = 269025075
View Source
const KEY_MySites = 269025127
View Source
const KEY_N = 78
View Source
const KEY_Nacute = 465
View Source
const KEY_NairaSign = 16785574
View Source
const KEY_Ncaron = 466
View Source
const KEY_Ncedilla = 977
View Source
const KEY_New = 269025128
View Source
const KEY_NewSheqelSign = 16785578
View Source
const KEY_News = 269025129
View Source
const KEY_Next = 65366
View Source
const KEY_Next_VMode = 269024802
View Source
const KEY_Next_Virtual_Screen = 65234
View Source
const KEY_Ntilde = 209
View Source
const KEY_Num_Lock = 65407
View Source
const KEY_O = 79
View Source
const KEY_OE = 5052
View Source
const KEY_Oacute = 211
View Source
const KEY_Obarred = 16777631
View Source
const KEY_Obelowdot = 16785100
View Source
const KEY_Ocaron = 16777681
View Source
const KEY_Ocircumflex = 212
View Source
const KEY_Ocircumflexacute = 16785104
View Source
const KEY_Ocircumflexbelowdot = 16785112
View Source
const KEY_Ocircumflexgrave = 16785106
View Source
const KEY_Ocircumflexhook = 16785108
View Source
const KEY_Ocircumflextilde = 16785110
View Source
const KEY_Odiaeresis = 214
View Source
const KEY_Odoubleacute = 469
View Source
const KEY_OfficeHome = 269025130
View Source
const KEY_Ograve = 210
View Source
const KEY_Ohook = 16785102
View Source
const KEY_Ohorn = 16777632
View Source
const KEY_Ohornacute = 16785114
View Source
const KEY_Ohornbelowdot = 16785122
View Source
const KEY_Ohorngrave = 16785116
View Source
const KEY_Ohornhook = 16785118
View Source
const KEY_Ohorntilde = 16785120
View Source
const KEY_Omacron = 978
View Source
const KEY_Ooblique = 216
View Source
const KEY_Open = 269025131
View Source
const KEY_OpenURL = 269025080
View Source
const KEY_Option = 269025132
View Source
const KEY_Oslash = 216
View Source
const KEY_Otilde = 213
View Source
const KEY_Overlay1_Enable = 65144
View Source
const KEY_Overlay2_Enable = 65145
View Source
const KEY_P = 80
View Source
const KEY_Pabovedot = 16784982
View Source
const KEY_Page_Down = 65366
View Source
const KEY_Page_Up = 65365
View Source
const KEY_Paste = 269025133
View Source
const KEY_Pause = 65299
View Source
const KEY_PesetaSign = 16785575
View Source
const KEY_Phone = 269025134
View Source
const KEY_Pictures = 269025169
View Source
const KEY_Pointer_Accelerate = 65274
View Source
const KEY_Pointer_Button1 = 65257
View Source
const KEY_Pointer_Button2 = 65258
View Source
const KEY_Pointer_Button3 = 65259
View Source
const KEY_Pointer_Button4 = 65260
View Source
const KEY_Pointer_Button5 = 65261
View Source
const KEY_Pointer_Button_Dflt = 65256
View Source
const KEY_Pointer_DblClick1 = 65263
View Source
const KEY_Pointer_DblClick2 = 65264
View Source
const KEY_Pointer_DblClick3 = 65265
View Source
const KEY_Pointer_DblClick4 = 65266
View Source
const KEY_Pointer_DblClick5 = 65267
View Source
const KEY_Pointer_DblClick_Dflt = 65262
View Source
const KEY_Pointer_DfltBtnNext = 65275
View Source
const KEY_Pointer_DfltBtnPrev = 65276
View Source
const KEY_Pointer_Down = 65251
View Source
const KEY_Pointer_DownLeft = 65254
View Source
const KEY_Pointer_DownRight = 65255
View Source
const KEY_Pointer_Drag1 = 65269
View Source
const KEY_Pointer_Drag2 = 65270
View Source
const KEY_Pointer_Drag3 = 65271
View Source
const KEY_Pointer_Drag4 = 65272
View Source
const KEY_Pointer_Drag5 = 65277
View Source
const KEY_Pointer_Drag_Dflt = 65268
View Source
const KEY_Pointer_EnableKeys = 65273
View Source
const KEY_Pointer_Left = 65248
View Source
const KEY_Pointer_Right = 65249
View Source
const KEY_Pointer_Up = 65250
View Source
const KEY_Pointer_UpLeft = 65252
View Source
const KEY_Pointer_UpRight = 65253
View Source
const KEY_PowerDown = 269025057
View Source
const KEY_PowerOff = 269025066
View Source
const KEY_Prev_VMode = 269024803
View Source
const KEY_Prev_Virtual_Screen = 65233
View Source
const KEY_PreviousCandidate = 65342
View Source
const KEY_Print = 65377
View Source
const KEY_Prior = 65365
View Source
const KEY_Q = 81
View Source
const KEY_R = 82
View Source
const KEY_R1 = 65490
View Source
const KEY_R10 = 65499
View Source
const KEY_R11 = 65500
View Source
const KEY_R12 = 65501
View Source
const KEY_R13 = 65502
View Source
const KEY_R14 = 65503
View Source
const KEY_R15 = 65504
View Source
const KEY_R2 = 65491
View Source
const KEY_R3 = 65492
View Source
const KEY_R4 = 65493
View Source
const KEY_R5 = 65494
View Source
const KEY_R6 = 65495
View Source
const KEY_R7 = 65496
View Source
const KEY_R8 = 65497
View Source
const KEY_R9 = 65498
View Source
const KEY_RFKill = 269025205
View Source
const KEY_Racute = 448
View Source
const KEY_Rcaron = 472
View Source
const KEY_Rcedilla = 931
View Source
const KEY_Red = 269025187
View Source
const KEY_Redo = 65382
View Source
const KEY_Refresh = 269025065
View Source
const KEY_Reload = 269025139
View Source
const KEY_RepeatKeys_Enable = 65138
View Source
const KEY_Reply = 269025138
View Source
const KEY_Return = 65293
View Source
const KEY_Right = 65363
View Source
const KEY_RockerDown = 269025060
View Source
const KEY_RockerEnter = 269025061
View Source
const KEY_RockerUp = 269025059
View Source
const KEY_Romaji = 65316
View Source
const KEY_RotateWindows = 269025140
View Source
const KEY_RotationKB = 269025142
View Source
const KEY_RotationPB = 269025141
View Source
const KEY_RupeeSign = 16785576
View Source
const KEY_S = 83
View Source
const KEY_SCHWA = 16777615
View Source
const KEY_Sabovedot = 16784992
View Source
const KEY_Sacute = 422
View Source
const KEY_Save = 269025143
View Source
const KEY_Scaron = 425
View Source
const KEY_Scedilla = 426
View Source
const KEY_Scircumflex = 734
View Source
const KEY_ScreenSaver = 269025069
View Source
const KEY_ScrollClick = 269025146
View Source
const KEY_ScrollDown = 269025145
View Source
const KEY_ScrollUp = 269025144
View Source
const KEY_Scroll_Lock = 65300
View Source
const KEY_Search = 269025051
View Source
const KEY_Select = 65376
View Source
const KEY_SelectButton = 269025184
View Source
const KEY_Send = 269025147
View Source
const KEY_Serbian_DJE = 1713
View Source
const KEY_Serbian_DZE = 1727
View Source
const KEY_Serbian_JE = 1720
View Source
const KEY_Serbian_LJE = 1721
View Source
const KEY_Serbian_NJE = 1722
View Source
const KEY_Serbian_TSHE = 1723
View Source
const KEY_Serbian_dje = 1697
View Source
const KEY_Serbian_dze = 1711
View Source
const KEY_Serbian_je = 1704
View Source
const KEY_Serbian_lje = 1705
View Source
const KEY_Serbian_nje = 1706
View Source
const KEY_Serbian_tshe = 1707
View Source
const KEY_Shift_L = 65505
View Source
const KEY_Shift_Lock = 65510
View Source
const KEY_Shift_R = 65506
View Source
const KEY_Shop = 269025078
View Source
const KEY_SingleCandidate = 65340
View Source
const KEY_Sinh_a = 16780677
View Source
const KEY_Sinh_aa = 16780678
View Source
const KEY_Sinh_aa2 = 16780751
View Source
const KEY_Sinh_ae = 16780679
View Source
const KEY_Sinh_ae2 = 16780752
View Source
const KEY_Sinh_aee = 16780680
View Source
const KEY_Sinh_aee2 = 16780753
View Source
const KEY_Sinh_ai = 16780691
View Source
const KEY_Sinh_ai2 = 16780763
View Source
const KEY_Sinh_al = 16780746
View Source
const KEY_Sinh_au = 16780694
View Source
const KEY_Sinh_au2 = 16780766
View Source
const KEY_Sinh_ba = 16780726
View Source
const KEY_Sinh_bha = 16780727
View Source
const KEY_Sinh_ca = 16780704
View Source
const KEY_Sinh_cha = 16780705
View Source
const KEY_Sinh_dda = 16780713
View Source
const KEY_Sinh_ddha = 16780714
View Source
const KEY_Sinh_dha = 16780719
View Source
const KEY_Sinh_dhha = 16780720
View Source
const KEY_Sinh_e = 16780689
View Source
const KEY_Sinh_e2 = 16780761
View Source
const KEY_Sinh_ee = 16780690
View Source
const KEY_Sinh_ee2 = 16780762
View Source
const KEY_Sinh_fa = 16780742
View Source
const KEY_Sinh_ga = 16780700
View Source
const KEY_Sinh_gha = 16780701
View Source
const KEY_Sinh_h2 = 16780675
View Source
const KEY_Sinh_ha = 16780740
View Source
const KEY_Sinh_i = 16780681
View Source
const KEY_Sinh_i2 = 16780754
View Source
const KEY_Sinh_ii = 16780682
View Source
const KEY_Sinh_ii2 = 16780755
View Source
const KEY_Sinh_ja = 16780706
View Source
const KEY_Sinh_jha = 16780707
View Source
const KEY_Sinh_jnya = 16780709
View Source
const KEY_Sinh_ka = 16780698
View Source
const KEY_Sinh_kha = 16780699
View Source
const KEY_Sinh_kunddaliya = 16780788
View Source
const KEY_Sinh_la = 16780733
View Source
const KEY_Sinh_lla = 16780741
View Source
const KEY_Sinh_lu = 16780687
View Source
const KEY_Sinh_lu2 = 16780767
View Source
const KEY_Sinh_luu = 16780688
View Source
const KEY_Sinh_luu2 = 16780787
View Source
const KEY_Sinh_ma = 16780728
View Source
const KEY_Sinh_mba = 16780729
View Source
const KEY_Sinh_na = 16780721
View Source
const KEY_Sinh_ndda = 16780716
View Source
const KEY_Sinh_ndha = 16780723
View Source
const KEY_Sinh_ng = 16780674
View Source
const KEY_Sinh_ng2 = 16780702
View Source
const KEY_Sinh_nga = 16780703
View Source
const KEY_Sinh_nja = 16780710
View Source
const KEY_Sinh_nna = 16780715
View Source
const KEY_Sinh_nya = 16780708
View Source
const KEY_Sinh_o = 16780692
View Source
const KEY_Sinh_o2 = 16780764
View Source
const KEY_Sinh_oo = 16780693
View Source
const KEY_Sinh_oo2 = 16780765
View Source
const KEY_Sinh_pa = 16780724
View Source
const KEY_Sinh_pha = 16780725
View Source
const KEY_Sinh_ra = 16780731
View Source
const KEY_Sinh_ri = 16780685
View Source
const KEY_Sinh_rii = 16780686
View Source
const KEY_Sinh_ru2 = 16780760
View Source
const KEY_Sinh_ruu2 = 16780786
View Source
const KEY_Sinh_sa = 16780739
View Source
const KEY_Sinh_sha = 16780737
View Source
const KEY_Sinh_ssha = 16780738
View Source
const KEY_Sinh_tha = 16780717
View Source
const KEY_Sinh_thha = 16780718
View Source
const KEY_Sinh_tta = 16780711
View Source
const KEY_Sinh_ttha = 16780712
View Source
const KEY_Sinh_u = 16780683
View Source
const KEY_Sinh_u2 = 16780756
View Source
const KEY_Sinh_uu = 16780684
View Source
const KEY_Sinh_uu2 = 16780758
View Source
const KEY_Sinh_va = 16780736
View Source
const KEY_Sinh_ya = 16780730
View Source
const KEY_Sleep = 269025071
View Source
const KEY_SlowKeys_Enable = 65139
View Source
const KEY_Spell = 269025148
View Source
const KEY_SplitScreen = 269025149
View Source
const KEY_Standby = 269025040
View Source
const KEY_Start = 269025050
View Source
const KEY_StickyKeys_Enable = 65141
View Source
const KEY_Stop = 269025064
View Source
const KEY_Subtitle = 269025178
View Source
const KEY_Super_L = 65515
View Source
const KEY_Super_R = 65516
View Source
const KEY_Support = 269025150
View Source
const KEY_Suspend = 269025191
View Source
const KEY_Switch_VT_1 = 269024769
View Source
const KEY_Switch_VT_10 = 269024778
View Source
const KEY_Switch_VT_11 = 269024779
View Source
const KEY_Switch_VT_12 = 269024780
View Source
const KEY_Switch_VT_2 = 269024770
View Source
const KEY_Switch_VT_3 = 269024771
View Source
const KEY_Switch_VT_4 = 269024772
View Source
const KEY_Switch_VT_5 = 269024773
View Source
const KEY_Switch_VT_6 = 269024774
View Source
const KEY_Switch_VT_7 = 269024775
View Source
const KEY_Switch_VT_8 = 269024776
View Source
const KEY_Switch_VT_9 = 269024777
View Source
const KEY_Sys_Req = 65301
View Source
const KEY_T = 84
View Source
const KEY_THORN = 222
View Source
const KEY_Tab = 65289
View Source
const KEY_Tabovedot = 16785002
View Source
const KEY_TaskPane = 269025151
View Source
const KEY_Tcaron = 427
View Source
const KEY_Tcedilla = 478
View Source
const KEY_Terminal = 269025152
View Source
const KEY_Terminate_Server = 65237
View Source
const KEY_Thai_baht = 3551
View Source
const KEY_Thai_bobaimai = 3514
View Source
const KEY_Thai_chochan = 3496
View Source
const KEY_Thai_chochang = 3498
View Source
const KEY_Thai_choching = 3497
View Source
const KEY_Thai_chochoe = 3500
View Source
const KEY_Thai_dochada = 3502
View Source
const KEY_Thai_dodek = 3508
View Source
const KEY_Thai_fofa = 3517
View Source
const KEY_Thai_fofan = 3519
View Source
const KEY_Thai_hohip = 3531
View Source
const KEY_Thai_honokhuk = 3534
View Source
const KEY_Thai_khokhai = 3490
View Source
const KEY_Thai_khokhon = 3493
View Source
const KEY_Thai_khokhuat = 3491
View Source
const KEY_Thai_khokhwai = 3492
View Source
const KEY_Thai_khorakhang = 3494
View Source
const KEY_Thai_kokai = 3489
View Source
const KEY_Thai_lakkhangyao = 3557
View Source
const KEY_Thai_lekchet = 3575
View Source
const KEY_Thai_lekha = 3573
View Source
const KEY_Thai_lekhok = 3574
View Source
const KEY_Thai_lekkao = 3577
View Source
const KEY_Thai_leknung = 3569
View Source
const KEY_Thai_lekpaet = 3576
View Source
const KEY_Thai_leksam = 3571
View Source
const KEY_Thai_leksi = 3572
View Source
const KEY_Thai_leksong = 3570
View Source
const KEY_Thai_leksun = 3568
View Source
const KEY_Thai_lochula = 3532
View Source
const KEY_Thai_loling = 3525
View Source
const KEY_Thai_lu = 3526
View Source
const KEY_Thai_maichattawa = 3563
View Source
const KEY_Thai_maiek = 3560
View Source
const KEY_Thai_maihanakat = 3537
View Source
const KEY_Thai_maihanakat_maitho = 3550
View Source
const KEY_Thai_maitaikhu = 3559
View Source
const KEY_Thai_maitho = 3561
View Source
const KEY_Thai_maitri = 3562
View Source
const KEY_Thai_maiyamok = 3558
View Source
const KEY_Thai_moma = 3521
View Source
const KEY_Thai_ngongu = 3495
View Source
const KEY_Thai_nikhahit = 3565
View Source
const KEY_Thai_nonen = 3507
View Source
const KEY_Thai_nonu = 3513
View Source
const KEY_Thai_oang = 3533
View Source
const KEY_Thai_paiyannoi = 3535
View Source
const KEY_Thai_phinthu = 3546
View Source
const KEY_Thai_phophan = 3518
View Source
const KEY_Thai_phophung = 3516
View Source
const KEY_Thai_phosamphao = 3520
View Source
const KEY_Thai_popla = 3515
View Source
const KEY_Thai_rorua = 3523
View Source
const KEY_Thai_ru = 3524
View Source
const KEY_Thai_saraa = 3536
View Source
const KEY_Thai_saraaa = 3538
View Source
const KEY_Thai_saraae = 3553
View Source
const KEY_Thai_saraaimaimalai = 3556
View Source
const KEY_Thai_saraaimaimuan = 3555
View Source
const KEY_Thai_saraam = 3539
View Source
const KEY_Thai_sarae = 3552
View Source
const KEY_Thai_sarai = 3540
View Source
const KEY_Thai_saraii = 3541
View Source
const KEY_Thai_sarao = 3554
View Source
const KEY_Thai_sarau = 3544
View Source
const KEY_Thai_saraue = 3542
View Source
const KEY_Thai_sarauee = 3543
View Source
const KEY_Thai_sarauu = 3545
View Source
const KEY_Thai_sorusi = 3529
View Source
const KEY_Thai_sosala = 3528
View Source
const KEY_Thai_soso = 3499
View Source
const KEY_Thai_sosua = 3530
View Source
const KEY_Thai_thanthakhat = 3564
View Source
const KEY_Thai_thonangmontho = 3505
View Source
const KEY_Thai_thophuthao = 3506
View Source
const KEY_Thai_thothahan = 3511
View Source
const KEY_Thai_thothan = 3504
View Source
const KEY_Thai_thothong = 3512
View Source
const KEY_Thai_thothung = 3510
View Source
const KEY_Thai_topatak = 3503
View Source
const KEY_Thai_totao = 3509
View Source
const KEY_Thai_wowaen = 3527
View Source
const KEY_Thai_yoyak = 3522
View Source
const KEY_Thai_yoying = 3501
View Source
const KEY_Thorn = 222
View Source
const KEY_Time = 269025183
View Source
const KEY_ToDoList = 269025055
View Source
const KEY_Tools = 269025153
View Source
const KEY_TopMenu = 269025186
View Source
const KEY_TouchpadOff = 269025201
View Source
const KEY_TouchpadOn = 269025200
View Source
const KEY_TouchpadToggle = 269025193
View Source
const KEY_Touroku = 65323
View Source
const KEY_Travel = 269025154
View Source
const KEY_Tslash = 940
View Source
const KEY_U = 85
View Source
const KEY_UWB = 269025174
View Source
const KEY_Uacute = 218
View Source
const KEY_Ubelowdot = 16785124
View Source
const KEY_Ubreve = 733
View Source
const KEY_Ucircumflex = 219
View Source
const KEY_Udiaeresis = 220
View Source
const KEY_Udoubleacute = 475
View Source
const KEY_Ugrave = 217
View Source
const KEY_Uhook = 16785126
View Source
const KEY_Uhorn = 16777647
View Source
const KEY_Uhornacute = 16785128
View Source
const KEY_Uhornbelowdot = 16785136
View Source
const KEY_Uhorngrave = 16785130
View Source
const KEY_Uhornhook = 16785132
View Source
const KEY_Uhorntilde = 16785134
View Source
const KEY_Ukrainian_GHE_WITH_UPTURN = 1725
View Source
const KEY_Ukrainian_I = 1718
View Source
const KEY_Ukrainian_IE = 1716
View Source
const KEY_Ukrainian_YI = 1719
View Source
const KEY_Ukrainian_ghe_with_upturn = 1709
View Source
const KEY_Ukrainian_i = 1702
View Source
const KEY_Ukrainian_ie = 1700
View Source
const KEY_Ukrainian_yi = 1703
View Source
const KEY_Ukranian_I = 1718
View Source
const KEY_Ukranian_JE = 1716
View Source
const KEY_Ukranian_YI = 1719
View Source
const KEY_Ukranian_i = 1702
View Source
const KEY_Ukranian_je = 1700
View Source
const KEY_Ukranian_yi = 1703
View Source
const KEY_Umacron = 990
View Source
const KEY_Undo = 65381
View Source
const KEY_Ungrab = 269024800
View Source
const KEY_Uogonek = 985
View Source
const KEY_Up = 65362
View Source
const KEY_Uring = 473
View Source
const KEY_User1KB = 269025157
View Source
const KEY_User2KB = 269025158
View Source
const KEY_UserPB = 269025156
View Source
const KEY_Utilde = 989
View Source
const KEY_V = 86
View Source
const KEY_VendorHome = 269025076
View Source
const KEY_Video = 269025159
View Source
const KEY_View = 269025185
View Source
const KEY_VoidSymbol = 16777215
View Source
const KEY_W = 87
View Source
const KEY_WLAN = 269025173
View Source
const KEY_WWAN = 269025204
View Source
const KEY_WWW = 269025070
View Source
const KEY_Wacute = 16785026
View Source
const KEY_WakeUp = 269025067
View Source
const KEY_Wcircumflex = 16777588
View Source
const KEY_Wdiaeresis = 16785028
View Source
const KEY_WebCam = 269025167
View Source
const KEY_Wgrave = 16785024
View Source
const KEY_WheelButton = 269025160
View Source
const KEY_WindowClear = 269025109
View Source
const KEY_WonSign = 16785577
View Source
const KEY_Word = 269025161
View Source
const KEY_X = 88
View Source
const KEY_Xabovedot = 16785034
View Source
const KEY_Xfer = 269025162
View Source
const KEY_Y = 89
View Source
const KEY_Yacute = 221
View Source
const KEY_Ybelowdot = 16785140
View Source
const KEY_Ycircumflex = 16777590
View Source
const KEY_Ydiaeresis = 5054
View Source
const KEY_Yellow = 269025189
View Source
const KEY_Ygrave = 16785138
View Source
const KEY_Yhook = 16785142
View Source
const KEY_Ytilde = 16785144
View Source
const KEY_Z = 90
View Source
const KEY_Zabovedot = 431
View Source
const KEY_Zacute = 428
View Source
const KEY_Zcaron = 430
View Source
const KEY_Zen_Koho = 65341
View Source
const KEY_Zenkaku = 65320
View Source
const KEY_Zenkaku_Hankaku = 65322
View Source
const KEY_ZoomIn = 269025163
View Source
const KEY_ZoomOut = 269025164
View Source
const KEY_Zstroke = 16777653
View Source
const KEY_a = 97
View Source
const KEY_aacute = 225
View Source
const KEY_abelowdot = 16785057
View Source
const KEY_abovedot = 511
View Source
const KEY_abreve = 483
View Source
const KEY_abreveacute = 16785071
View Source
const KEY_abrevebelowdot = 16785079
View Source
const KEY_abrevegrave = 16785073
View Source
const KEY_abrevehook = 16785075
View Source
const KEY_abrevetilde = 16785077
View Source
const KEY_acircumflex = 226
View Source
const KEY_acircumflexacute = 16785061
View Source
const KEY_acircumflexbelowdot = 16785069
View Source
const KEY_acircumflexgrave = 16785063
View Source
const KEY_acircumflexhook = 16785065
View Source
const KEY_acircumflextilde = 16785067
View Source
const KEY_acute = 180
View Source
const KEY_adiaeresis = 228
View Source
const KEY_ae = 230
View Source
const KEY_agrave = 224
View Source
const KEY_ahook = 16785059
View Source
const KEY_amacron = 992
View Source
const KEY_ampersand = 38
View Source
const KEY_aogonek = 433
View Source
const KEY_apostrophe = 39
View Source
const KEY_approxeq = 16785992
View Source
const KEY_approximate = 2248
View Source
const KEY_aring = 229
View Source
const KEY_asciicircum = 94
View Source
const KEY_asciitilde = 126
View Source
const KEY_asterisk = 42
View Source
const KEY_at = 64
View Source
const KEY_atilde = 227
View Source
const KEY_b = 98
View Source
const KEY_babovedot = 16784899
View Source
const KEY_backslash = 92
View Source
const KEY_ballotcross = 2804
View Source
const KEY_bar = 124
View Source
const KEY_because = 16785973
View Source
const KEY_blank = 2527
View Source
const KEY_botintegral = 2213
View Source
const KEY_botleftparens = 2220
View Source
const KEY_botleftsqbracket = 2216
View Source
const KEY_botleftsummation = 2226
View Source
const KEY_botrightparens = 2222
View Source
const KEY_botrightsqbracket = 2218
View Source
const KEY_botrightsummation = 2230
View Source
const KEY_bott = 2550
View Source
const KEY_botvertsummationconnector = 2228
View Source
const KEY_braceleft = 123
View Source
const KEY_braceright = 125
View Source
const KEY_bracketleft = 91
View Source
const KEY_bracketright = 93
View Source
const KEY_braille_blank = 16787456
View Source
const KEY_braille_dot_1 = 65521
View Source
const KEY_braille_dot_10 = 65530
View Source
const KEY_braille_dot_2 = 65522
View Source
const KEY_braille_dot_3 = 65523
View Source
const KEY_braille_dot_4 = 65524
View Source
const KEY_braille_dot_5 = 65525
View Source
const KEY_braille_dot_6 = 65526
View Source
const KEY_braille_dot_7 = 65527
View Source
const KEY_braille_dot_8 = 65528
View Source
const KEY_braille_dot_9 = 65529
View Source
const KEY_braille_dots_1 = 16787457
View Source
const KEY_braille_dots_12 = 16787459
View Source
const KEY_braille_dots_123 = 16787463
View Source
const KEY_braille_dots_1234 = 16787471
View Source
const KEY_braille_dots_12345 = 16787487
View Source
const KEY_braille_dots_123456 = 16787519
View Source
const KEY_braille_dots_1234567 = 16787583
View Source
const KEY_braille_dots_12345678 = 16787711
View Source
const KEY_braille_dots_1234568 = 16787647
View Source
const KEY_braille_dots_123457 = 16787551
View Source
const KEY_braille_dots_1234578 = 16787679
View Source
const KEY_braille_dots_123458 = 16787615
View Source
const KEY_braille_dots_12346 = 16787503
View Source
const KEY_braille_dots_123467 = 16787567
View Source
const KEY_braille_dots_1234678 = 16787695
View Source
const KEY_braille_dots_123468 = 16787631
View Source
const KEY_braille_dots_12347 = 16787535
View Source
const KEY_braille_dots_123478 = 16787663
View Source
const KEY_braille_dots_12348 = 16787599
View Source
const KEY_braille_dots_1235 = 16787479
View Source
const KEY_braille_dots_12356 = 16787511
View Source
const KEY_braille_dots_123567 = 16787575
View Source
const KEY_braille_dots_1235678 = 16787703
View Source
const KEY_braille_dots_123568 = 16787639
View Source
const KEY_braille_dots_12357 = 16787543
View Source
const KEY_braille_dots_123578 = 16787671
View Source
const KEY_braille_dots_12358 = 16787607
View Source
const KEY_braille_dots_1236 = 16787495
View Source
const KEY_braille_dots_12367 = 16787559
View Source
const KEY_braille_dots_123678 = 16787687
View Source
const KEY_braille_dots_12368 = 16787623
View Source
const KEY_braille_dots_1237 = 16787527
View Source
const KEY_braille_dots_12378 = 16787655
View Source
const KEY_braille_dots_1238 = 16787591
View Source
const KEY_braille_dots_124 = 16787467
View Source
const KEY_braille_dots_1245 = 16787483
View Source
const KEY_braille_dots_12456 = 16787515
View Source
const KEY_braille_dots_124567 = 16787579
View Source
const KEY_braille_dots_1245678 = 16787707
View Source
const KEY_braille_dots_124568 = 16787643
View Source
const KEY_braille_dots_12457 = 16787547
View Source
const KEY_braille_dots_124578 = 16787675
View Source
const KEY_braille_dots_12458 = 16787611
View Source
const KEY_braille_dots_1246 = 16787499
View Source
const KEY_braille_dots_12467 = 16787563
View Source
const KEY_braille_dots_124678 = 16787691
View Source
const KEY_braille_dots_12468 = 16787627
View Source
const KEY_braille_dots_1247 = 16787531
View Source
const KEY_braille_dots_12478 = 16787659
View Source
const KEY_braille_dots_1248 = 16787595
View Source
const KEY_braille_dots_125 = 16787475
View Source
const KEY_braille_dots_1256 = 16787507
View Source
const KEY_braille_dots_12567 = 16787571
View Source
const KEY_braille_dots_125678 = 16787699
View Source
const KEY_braille_dots_12568 = 16787635
View Source
const KEY_braille_dots_1257 = 16787539
View Source
const KEY_braille_dots_12578 = 16787667
View Source
const KEY_braille_dots_1258 = 16787603
View Source
const KEY_braille_dots_126 = 16787491
View Source
const KEY_braille_dots_1267 = 16787555
View Source
const KEY_braille_dots_12678 = 16787683
View Source
const KEY_braille_dots_1268 = 16787619
View Source
const KEY_braille_dots_127 = 16787523
View Source
const KEY_braille_dots_1278 = 16787651
View Source
const KEY_braille_dots_128 = 16787587
View Source
const KEY_braille_dots_13 = 16787461
View Source
const KEY_braille_dots_134 = 16787469
View Source
const KEY_braille_dots_1345 = 16787485
View Source
const KEY_braille_dots_13456 = 16787517
View Source
const KEY_braille_dots_134567 = 16787581
View Source
const KEY_braille_dots_1345678 = 16787709
View Source
const KEY_braille_dots_134568 = 16787645
View Source
const KEY_braille_dots_13457 = 16787549
View Source
const KEY_braille_dots_134578 = 16787677
View Source
const KEY_braille_dots_13458 = 16787613
View Source
const KEY_braille_dots_1346 = 16787501
View Source
const KEY_braille_dots_13467 = 16787565
View Source
const KEY_braille_dots_134678 = 16787693
View Source
const KEY_braille_dots_13468 = 16787629
View Source
const KEY_braille_dots_1347 = 16787533
View Source
const KEY_braille_dots_13478 = 16787661
View Source
const KEY_braille_dots_1348 = 16787597
View Source
const KEY_braille_dots_135 = 16787477
View Source
const KEY_braille_dots_1356 = 16787509
View Source
const KEY_braille_dots_13567 = 16787573
View Source
const KEY_braille_dots_135678 = 16787701
View Source
const KEY_braille_dots_13568 = 16787637
View Source
const KEY_braille_dots_1357 = 16787541
View Source
const KEY_braille_dots_13578 = 16787669
View Source
const KEY_braille_dots_1358 = 16787605
View Source
const KEY_braille_dots_136 = 16787493
View Source
const KEY_braille_dots_1367 = 16787557
View Source
const KEY_braille_dots_13678 = 16787685
View Source
const KEY_braille_dots_1368 = 16787621
View Source
const KEY_braille_dots_137 = 16787525
View Source
const KEY_braille_dots_1378 = 16787653
View Source
const KEY_braille_dots_138 = 16787589
View Source
const KEY_braille_dots_14 = 16787465
View Source
const KEY_braille_dots_145 = 16787481
View Source
const KEY_braille_dots_1456 = 16787513
View Source
const KEY_braille_dots_14567 = 16787577
View Source
const KEY_braille_dots_145678 = 16787705
View Source
const KEY_braille_dots_14568 = 16787641
View Source
const KEY_braille_dots_1457 = 16787545
View Source
const KEY_braille_dots_14578 = 16787673
View Source
const KEY_braille_dots_1458 = 16787609
View Source
const KEY_braille_dots_146 = 16787497
View Source
const KEY_braille_dots_1467 = 16787561
View Source
const KEY_braille_dots_14678 = 16787689
View Source
const KEY_braille_dots_1468 = 16787625
View Source
const KEY_braille_dots_147 = 16787529
View Source
const KEY_braille_dots_1478 = 16787657
View Source
const KEY_braille_dots_148 = 16787593
View Source
const KEY_braille_dots_15 = 16787473
View Source
const KEY_braille_dots_156 = 16787505
View Source
const KEY_braille_dots_1567 = 16787569
View Source
const KEY_braille_dots_15678 = 16787697
View Source
const KEY_braille_dots_1568 = 16787633
View Source
const KEY_braille_dots_157 = 16787537
View Source
const KEY_braille_dots_1578 = 16787665
View Source
const KEY_braille_dots_158 = 16787601
View Source
const KEY_braille_dots_16 = 16787489
View Source
const KEY_braille_dots_167 = 16787553
View Source
const KEY_braille_dots_1678 = 16787681
View Source
const KEY_braille_dots_168 = 16787617
View Source
const KEY_braille_dots_17 = 16787521
View Source
const KEY_braille_dots_178 = 16787649
View Source
const KEY_braille_dots_18 = 16787585
View Source
const KEY_braille_dots_2 = 16787458
View Source
const KEY_braille_dots_23 = 16787462
View Source
const KEY_braille_dots_234 = 16787470
View Source
const KEY_braille_dots_2345 = 16787486
View Source
const KEY_braille_dots_23456 = 16787518
View Source
const KEY_braille_dots_234567 = 16787582
View Source
const KEY_braille_dots_2345678 = 16787710
View Source
const KEY_braille_dots_234568 = 16787646
View Source
const KEY_braille_dots_23457 = 16787550
View Source
const KEY_braille_dots_234578 = 16787678
View Source
const KEY_braille_dots_23458 = 16787614
View Source
const KEY_braille_dots_2346 = 16787502
View Source
const KEY_braille_dots_23467 = 16787566
View Source
const KEY_braille_dots_234678 = 16787694
View Source
const KEY_braille_dots_23468 = 16787630
View Source
const KEY_braille_dots_2347 = 16787534
View Source
const KEY_braille_dots_23478 = 16787662
View Source
const KEY_braille_dots_2348 = 16787598
View Source
const KEY_braille_dots_235 = 16787478
View Source
const KEY_braille_dots_2356 = 16787510
View Source
const KEY_braille_dots_23567 = 16787574
View Source
const KEY_braille_dots_235678 = 16787702
View Source
const KEY_braille_dots_23568 = 16787638
View Source
const KEY_braille_dots_2357 = 16787542
View Source
const KEY_braille_dots_23578 = 16787670
View Source
const KEY_braille_dots_2358 = 16787606
View Source
const KEY_braille_dots_236 = 16787494
View Source
const KEY_braille_dots_2367 = 16787558
View Source
const KEY_braille_dots_23678 = 16787686
View Source
const KEY_braille_dots_2368 = 16787622
View Source
const KEY_braille_dots_237 = 16787526
View Source
const KEY_braille_dots_2378 = 16787654
View Source
const KEY_braille_dots_238 = 16787590
View Source
const KEY_braille_dots_24 = 16787466
View Source
const KEY_braille_dots_245 = 16787482
View Source
const KEY_braille_dots_2456 = 16787514
View Source
const KEY_braille_dots_24567 = 16787578
View Source
const KEY_braille_dots_245678 = 16787706
View Source
const KEY_braille_dots_24568 = 16787642
View Source
const KEY_braille_dots_2457 = 16787546
View Source
const KEY_braille_dots_24578 = 16787674
View Source
const KEY_braille_dots_2458 = 16787610
View Source
const KEY_braille_dots_246 = 16787498
View Source
const KEY_braille_dots_2467 = 16787562
View Source
const KEY_braille_dots_24678 = 16787690
View Source
const KEY_braille_dots_2468 = 16787626
View Source
const KEY_braille_dots_247 = 16787530
View Source
const KEY_braille_dots_2478 = 16787658
View Source
const KEY_braille_dots_248 = 16787594
View Source
const KEY_braille_dots_25 = 16787474
View Source
const KEY_braille_dots_256 = 16787506
View Source
const KEY_braille_dots_2567 = 16787570
View Source
const KEY_braille_dots_25678 = 16787698
View Source
const KEY_braille_dots_2568 = 16787634
View Source
const KEY_braille_dots_257 = 16787538
View Source
const KEY_braille_dots_2578 = 16787666
View Source
const KEY_braille_dots_258 = 16787602
View Source
const KEY_braille_dots_26 = 16787490
View Source
const KEY_braille_dots_267 = 16787554
View Source
const KEY_braille_dots_2678 = 16787682
View Source
const KEY_braille_dots_268 = 16787618
View Source
const KEY_braille_dots_27 = 16787522
View Source
const KEY_braille_dots_278 = 16787650
View Source
const KEY_braille_dots_28 = 16787586
View Source
const KEY_braille_dots_3 = 16787460
View Source
const KEY_braille_dots_34 = 16787468
View Source
const KEY_braille_dots_345 = 16787484
View Source
const KEY_braille_dots_3456 = 16787516
View Source
const KEY_braille_dots_34567 = 16787580
View Source
const KEY_braille_dots_345678 = 16787708
View Source
const KEY_braille_dots_34568 = 16787644
View Source
const KEY_braille_dots_3457 = 16787548
View Source
const KEY_braille_dots_34578 = 16787676
View Source
const KEY_braille_dots_3458 = 16787612
View Source
const KEY_braille_dots_346 = 16787500
View Source
const KEY_braille_dots_3467 = 16787564
View Source
const KEY_braille_dots_34678 = 16787692
View Source
const KEY_braille_dots_3468 = 16787628
View Source
const KEY_braille_dots_347 = 16787532
View Source
const KEY_braille_dots_3478 = 16787660
View Source
const KEY_braille_dots_348 = 16787596
View Source
const KEY_braille_dots_35 = 16787476
View Source
const KEY_braille_dots_356 = 16787508
View Source
const KEY_braille_dots_3567 = 16787572
View Source
const KEY_braille_dots_35678 = 16787700
View Source
const KEY_braille_dots_3568 = 16787636
View Source
const KEY_braille_dots_357 = 16787540
View Source
const KEY_braille_dots_3578 = 16787668
View Source
const KEY_braille_dots_358 = 16787604
View Source
const KEY_braille_dots_36 = 16787492
View Source
const KEY_braille_dots_367 = 16787556
View Source
const KEY_braille_dots_3678 = 16787684
View Source
const KEY_braille_dots_368 = 16787620
View Source
const KEY_braille_dots_37 = 16787524
View Source
const KEY_braille_dots_378 = 16787652
View Source
const KEY_braille_dots_38 = 16787588
View Source
const KEY_braille_dots_4 = 16787464
View Source
const KEY_braille_dots_45 = 16787480
View Source
const KEY_braille_dots_456 = 16787512
View Source
const KEY_braille_dots_4567 = 16787576
View Source
const KEY_braille_dots_45678 = 16787704
View Source
const KEY_braille_dots_4568 = 16787640
View Source
const KEY_braille_dots_457 = 16787544
View Source
const KEY_braille_dots_4578 = 16787672
View Source
const KEY_braille_dots_458 = 16787608
View Source
const KEY_braille_dots_46 = 16787496
View Source
const KEY_braille_dots_467 = 16787560
View Source
const KEY_braille_dots_4678 = 16787688
View Source
const KEY_braille_dots_468 = 16787624
View Source
const KEY_braille_dots_47 = 16787528
View Source
const KEY_braille_dots_478 = 16787656
View Source
const KEY_braille_dots_48 = 16787592
View Source
const KEY_braille_dots_5 = 16787472
View Source
const KEY_braille_dots_56 = 16787504
View Source
const KEY_braille_dots_567 = 16787568
View Source
const KEY_braille_dots_5678 = 16787696
View Source
const KEY_braille_dots_568 = 16787632
View Source
const KEY_braille_dots_57 = 16787536
View Source
const KEY_braille_dots_578 = 16787664
View Source
const KEY_braille_dots_58 = 16787600
View Source
const KEY_braille_dots_6 = 16787488
View Source
const KEY_braille_dots_67 = 16787552
View Source
const KEY_braille_dots_678 = 16787680
View Source
const KEY_braille_dots_68 = 16787616
View Source
const KEY_braille_dots_7 = 16787520
View Source
const KEY_braille_dots_78 = 16787648
View Source
const KEY_braille_dots_8 = 16787584
View Source
const KEY_breve = 418
View Source
const KEY_brokenbar = 166
View Source
const KEY_c = 99
View Source
const KEY_c_h = 65187
View Source
const KEY_cabovedot = 741
View Source
const KEY_cacute = 486
View Source
const KEY_careof = 2744
View Source
const KEY_caret = 2812
View Source
const KEY_caron = 439
View Source
const KEY_ccaron = 488
View Source
const KEY_ccedilla = 231
View Source
const KEY_ccircumflex = 742
View Source
const KEY_cedilla = 184
View Source
const KEY_cent = 162
View Source
const KEY_ch = 65184
View Source
const KEY_checkerboard = 2529
View Source
const KEY_checkmark = 2803
View Source
const KEY_circle = 3023
View Source
const KEY_club = 2796
View Source
const KEY_colon = 58
View Source
const KEY_comma = 44
View Source
const KEY_containsas = 16785931
View Source
const KEY_copyright = 169
View Source
const KEY_cr = 2532
View Source
const KEY_crossinglines = 2542
View Source
const KEY_cuberoot = 16785947
View Source
const KEY_currency = 164
View Source
const KEY_cursor = 2815
View Source
const KEY_d = 100
View Source
const KEY_dabovedot = 16784907
View Source
const KEY_dagger = 2801
View Source
const KEY_dcaron = 495
View Source
const KEY_dead_A = 65153
View Source
const KEY_dead_E = 65155
View Source
const KEY_dead_I = 65157
View Source
const KEY_dead_O = 65159
View Source
const KEY_dead_U = 65161
View Source
const KEY_dead_a = 65152
View Source
const KEY_dead_abovecomma = 65124
View Source
const KEY_dead_abovedot = 65110
View Source
const KEY_dead_abovereversedcomma = 65125
View Source
const KEY_dead_abovering = 65112
View Source
const KEY_dead_aboveverticalline = 65169
View Source
const KEY_dead_acute = 65105
View Source
const KEY_dead_belowbreve = 65131
View Source
const KEY_dead_belowcircumflex = 65129
View Source
const KEY_dead_belowcomma = 65134
View Source
const KEY_dead_belowdiaeresis = 65132
View Source
const KEY_dead_belowdot = 65120
View Source
const KEY_dead_belowmacron = 65128
View Source
const KEY_dead_belowring = 65127
View Source
const KEY_dead_belowtilde = 65130
View Source
const KEY_dead_belowverticalline = 65170
View Source
const KEY_dead_breve = 65109
View Source
const KEY_dead_capital_schwa = 65163
View Source
const KEY_dead_caron = 65114
View Source
const KEY_dead_cedilla = 65115
View Source
const KEY_dead_circumflex = 65106
View Source
const KEY_dead_currency = 65135
View Source
const KEY_dead_dasia = 65125
View Source
const KEY_dead_diaeresis = 65111
View Source
const KEY_dead_doubleacute = 65113
View Source
const KEY_dead_doublegrave = 65126
View Source
const KEY_dead_e = 65154
View Source
const KEY_dead_grave = 65104
View Source
const KEY_dead_greek = 65164
View Source
const KEY_dead_hook = 65121
View Source
const KEY_dead_horn = 65122
View Source
const KEY_dead_i = 65156
View Source
const KEY_dead_invertedbreve = 65133
View Source
const KEY_dead_iota = 65117
View Source
const KEY_dead_longsolidusoverlay = 65171
View Source
const KEY_dead_lowline = 65168
View Source
const KEY_dead_macron = 65108
View Source
const KEY_dead_o = 65158
View Source
const KEY_dead_ogonek = 65116
View Source
const KEY_dead_perispomeni = 65107
View Source
const KEY_dead_psili = 65124
View Source
const KEY_dead_semivoiced_sound = 65119
View Source
const KEY_dead_small_schwa = 65162
View Source
const KEY_dead_stroke = 65123
View Source
const KEY_dead_tilde = 65107
View Source
const KEY_dead_u = 65160
View Source
const KEY_dead_voiced_sound = 65118
View Source
const KEY_decimalpoint = 2749
View Source
const KEY_degree = 176
View Source
const KEY_diaeresis = 168
View Source
const KEY_diamond = 2797
View Source
const KEY_digitspace = 2725
View Source
const KEY_dintegral = 16785964
View Source
const KEY_division = 247
View Source
const KEY_dollar = 36
View Source
const KEY_doubbaselinedot = 2735
View Source
const KEY_doubleacute = 445
View Source
const KEY_doubledagger = 2802
View Source
const KEY_doublelowquotemark = 2814
View Source
const KEY_downarrow = 2302
View Source
const KEY_downcaret = 2984
View Source
const KEY_downshoe = 3030
View Source
const KEY_downstile = 3012
View Source
const KEY_downtack = 3010
View Source
const KEY_dstroke = 496
View Source
const KEY_e = 101
View Source
const KEY_eabovedot = 1004
View Source
const KEY_eacute = 233
View Source
const KEY_ebelowdot = 16785081
View Source
const KEY_ecaron = 492
View Source
const KEY_ecircumflex = 234
View Source
const KEY_ecircumflexacute = 16785087
View Source
const KEY_ecircumflexbelowdot = 16785095
View Source
const KEY_ecircumflexgrave = 16785089
View Source
const KEY_ecircumflexhook = 16785091
View Source
const KEY_ecircumflextilde = 16785093
View Source
const KEY_ediaeresis = 235
View Source
const KEY_egrave = 232
View Source
const KEY_ehook = 16785083
View Source
const KEY_eightsubscript = 16785544
View Source
const KEY_eightsuperior = 16785528
View Source
const KEY_elementof = 16785928
View Source
const KEY_ellipsis = 2734
View Source
const KEY_em3space = 2723
View Source
const KEY_em4space = 2724
View Source
const KEY_emacron = 954
View Source
const KEY_emdash = 2729
View Source
const KEY_emfilledcircle = 2782
View Source
const KEY_emfilledrect = 2783
View Source
const KEY_emopencircle = 2766
View Source
const KEY_emopenrectangle = 2767
View Source
const KEY_emptyset = 16785925
View Source
const KEY_emspace = 2721
View Source
const KEY_endash = 2730
View Source
const KEY_enfilledcircbullet = 2790
View Source
const KEY_enfilledsqbullet = 2791
View Source
const KEY_eng = 959
View Source
const KEY_enopencircbullet = 2784
View Source
const KEY_enopensquarebullet = 2785
View Source
const KEY_enspace = 2722
View Source
const KEY_eogonek = 490
View Source
const KEY_equal = 61
View Source
const KEY_eth = 240
View Source
const KEY_etilde = 16785085
View Source
const KEY_exclam = 33
View Source
const KEY_exclamdown = 161
View Source
const KEY_ezh = 16777874
View Source
const KEY_f = 102
View Source
const KEY_fabovedot = 16784927
View Source
const KEY_femalesymbol = 2808
View Source
const KEY_ff = 2531
View Source
const KEY_figdash = 2747
View Source
const KEY_filledlefttribullet = 2780
View Source
const KEY_filledrectbullet = 2779
View Source
const KEY_filledrighttribullet = 2781
View Source
const KEY_filledtribulletdown = 2793
View Source
const KEY_filledtribulletup = 2792
View Source
const KEY_fiveeighths = 2757
View Source
const KEY_fivesixths = 2743
View Source
const KEY_fivesubscript = 16785541
View Source
const KEY_fivesuperior = 16785525
View Source
const KEY_fourfifths = 2741
View Source
const KEY_foursubscript = 16785540
View Source
const KEY_foursuperior = 16785524
View Source
const KEY_fourthroot = 16785948
View Source
const KEY_function = 2294
View Source
const KEY_g = 103
View Source
const KEY_gabovedot = 757
View Source
const KEY_gbreve = 699
View Source
const KEY_gcaron = 16777703
View Source
const KEY_gcedilla = 955
View Source
const KEY_gcircumflex = 760
View Source
const KEY_grave = 96
View Source
const KEY_greater = 62
View Source
const KEY_greaterthanequal = 2238
View Source
const KEY_guillemotleft = 171
View Source
const KEY_guillemotright = 187
View Source
const KEY_h = 104
View Source
const KEY_hairspace = 2728
View Source
const KEY_hcircumflex = 694
View Source
const KEY_heart = 2798
View Source
const KEY_hebrew_aleph = 3296
View Source
const KEY_hebrew_ayin = 3314
View Source
const KEY_hebrew_bet = 3297
View Source
const KEY_hebrew_beth = 3297
View Source
const KEY_hebrew_chet = 3303
View Source
const KEY_hebrew_dalet = 3299
View Source
const KEY_hebrew_daleth = 3299
View Source
const KEY_hebrew_doublelowline = 3295
View Source
const KEY_hebrew_finalkaph = 3306
View Source
const KEY_hebrew_finalmem = 3309
View Source
const KEY_hebrew_finalnun = 3311
View Source
const KEY_hebrew_finalpe = 3315
View Source
const KEY_hebrew_finalzade = 3317
View Source
const KEY_hebrew_finalzadi = 3317
View Source
const KEY_hebrew_gimel = 3298
View Source
const KEY_hebrew_gimmel = 3298
View Source
const KEY_hebrew_he = 3300
View Source
const KEY_hebrew_het = 3303
View Source
const KEY_hebrew_kaph = 3307
View Source
const KEY_hebrew_kuf = 3319
View Source
const KEY_hebrew_lamed = 3308
View Source
const KEY_hebrew_mem = 3310
View Source
const KEY_hebrew_nun = 3312
View Source
const KEY_hebrew_pe = 3316
View Source
const KEY_hebrew_qoph = 3319
View Source
const KEY_hebrew_resh = 3320
View Source
const KEY_hebrew_samech = 3313
View Source
const KEY_hebrew_samekh = 3313
View Source
const KEY_hebrew_shin = 3321
View Source
const KEY_hebrew_taf = 3322
View Source
const KEY_hebrew_taw = 3322
View Source
const KEY_hebrew_tet = 3304
View Source
const KEY_hebrew_teth = 3304
View Source
const KEY_hebrew_waw = 3301
View Source
const KEY_hebrew_yod = 3305
View Source
const KEY_hebrew_zade = 3318
View Source
const KEY_hebrew_zadi = 3318
View Source
const KEY_hebrew_zain = 3302
View Source
const KEY_hebrew_zayin = 3302
View Source
const KEY_hexagram = 2778
View Source
const KEY_horizconnector = 2211
View Source
const KEY_horizlinescan1 = 2543
View Source
const KEY_horizlinescan3 = 2544
View Source
const KEY_horizlinescan5 = 2545
View Source
const KEY_horizlinescan7 = 2546
View Source
const KEY_horizlinescan9 = 2547
View Source
const KEY_hstroke = 689
View Source
const KEY_ht = 2530
View Source
const KEY_hyphen = 173
View Source
const KEY_i = 105
View Source
const KEY_iTouch = 269025120
View Source
const KEY_iacute = 237
View Source
const KEY_ibelowdot = 16785099
View Source
const KEY_ibreve = 16777517
View Source
const KEY_icircumflex = 238
View Source
const KEY_identical = 2255
View Source
const KEY_idiaeresis = 239
View Source
const KEY_idotless = 697
View Source
const KEY_ifonlyif = 2253
View Source
const KEY_igrave = 236
View Source
const KEY_ihook = 16785097
View Source
const KEY_imacron = 1007
View Source
const KEY_implies = 2254
View Source
const KEY_includedin = 2266
View Source
const KEY_includes = 2267
View Source
const KEY_infinity = 2242
View Source
const KEY_integral = 2239
View Source
const KEY_intersection = 2268
View Source
const KEY_iogonek = 999
View Source
const KEY_itilde = 949
View Source
const KEY_j = 106
View Source
const KEY_jcircumflex = 700
View Source
const KEY_jot = 3018
View Source
const KEY_k = 107
View Source
const KEY_kana_A = 1201
View Source
const KEY_kana_CHI = 1217
View Source
const KEY_kana_E = 1204
View Source
const KEY_kana_FU = 1228
View Source
const KEY_kana_HA = 1226
View Source
const KEY_kana_HE = 1229
View Source
const KEY_kana_HI = 1227
View Source
const KEY_kana_HO = 1230
View Source
const KEY_kana_HU = 1228
View Source
const KEY_kana_I = 1202
View Source
const KEY_kana_KA = 1206
View Source
const KEY_kana_KE = 1209
View Source
const KEY_kana_KI = 1207
View Source
const KEY_kana_KO = 1210
View Source
const KEY_kana_KU = 1208
View Source
const KEY_kana_MA = 1231
View Source
const KEY_kana_ME = 1234
View Source
const KEY_kana_MI = 1232
View Source
const KEY_kana_MO = 1235
View Source
const KEY_kana_MU = 1233
View Source
const KEY_kana_N = 1245
View Source
const KEY_kana_NA = 1221
View Source
const KEY_kana_NE = 1224
View Source
const KEY_kana_NI = 1222
View Source
const KEY_kana_NO = 1225
View Source
const KEY_kana_NU = 1223
View Source
const KEY_kana_O = 1205
View Source
const KEY_kana_RA = 1239
View Source
const KEY_kana_RE = 1242
View Source
const KEY_kana_RI = 1240
View Source
const KEY_kana_RO = 1243
View Source
const KEY_kana_RU = 1241
View Source
const KEY_kana_SA = 1211
View Source
const KEY_kana_SE = 1214
View Source
const KEY_kana_SHI = 1212
View Source
const KEY_kana_SO = 1215
View Source
const KEY_kana_SU = 1213
View Source
const KEY_kana_TA = 1216
View Source
const KEY_kana_TE = 1219
View Source
const KEY_kana_TI = 1217
View Source
const KEY_kana_TO = 1220
View Source
const KEY_kana_TSU = 1218
View Source
const KEY_kana_TU = 1218
View Source
const KEY_kana_U = 1203
View Source
const KEY_kana_WA = 1244
View Source
const KEY_kana_WO = 1190
View Source
const KEY_kana_YA = 1236
View Source
const KEY_kana_YO = 1238
View Source
const KEY_kana_YU = 1237
View Source
const KEY_kana_a = 1191
View Source
const KEY_kana_closingbracket = 1187
View Source
const KEY_kana_comma = 1188
View Source
const KEY_kana_conjunctive = 1189
View Source
const KEY_kana_e = 1194
View Source
const KEY_kana_fullstop = 1185
View Source
const KEY_kana_i = 1192
View Source
const KEY_kana_middledot = 1189
View Source
const KEY_kana_o = 1195
View Source
const KEY_kana_openingbracket = 1186
View Source
const KEY_kana_switch = 65406
View Source
const KEY_kana_tsu = 1199
View Source
const KEY_kana_tu = 1199
View Source
const KEY_kana_u = 1193
View Source
const KEY_kana_ya = 1196
View Source
const KEY_kana_yo = 1198
View Source
const KEY_kana_yu = 1197
View Source
const KEY_kappa = 930
View Source
const KEY_kcedilla = 1011
View Source
const KEY_kra = 930
View Source
const KEY_l = 108
View Source
const KEY_lacute = 485
View Source
const KEY_latincross = 2777
View Source
const KEY_lbelowdot = 16784951
View Source
const KEY_lcaron = 437
View Source
const KEY_lcedilla = 950
View Source
const KEY_leftanglebracket = 2748
View Source
const KEY_leftarrow = 2299
View Source
const KEY_leftcaret = 2979
View Source
const KEY_leftdoublequotemark = 2770
View Source
const KEY_leftmiddlecurlybrace = 2223
View Source
const KEY_leftopentriangle = 2764
View Source
const KEY_leftpointer = 2794
View Source
const KEY_leftradical = 2209
View Source
const KEY_leftshoe = 3034
View Source
const KEY_leftsinglequotemark = 2768
View Source
const KEY_leftt = 2548
View Source
const KEY_lefttack = 3036
View Source
const KEY_less = 60
View Source
const KEY_lessthanequal = 2236
View Source
const KEY_lf = 2533
View Source
const KEY_logicaland = 2270
View Source
const KEY_logicalor = 2271
View Source
const KEY_lowleftcorner = 2541
View Source
const KEY_lowrightcorner = 2538
View Source
const KEY_lstroke = 435
View Source
const KEY_m = 109
View Source
const KEY_mabovedot = 16784961
View Source
const KEY_macron = 175
View Source
const KEY_malesymbol = 2807
View Source
const KEY_maltesecross = 2800
View Source
const KEY_marker = 2751
View Source
const KEY_masculine = 186
View Source
const KEY_minus = 45
View Source
const KEY_minutes = 2774
View Source
const KEY_mu = 181
View Source
const KEY_multiply = 215
View Source
const KEY_musicalflat = 2806
View Source
const KEY_musicalsharp = 2805
View Source
const KEY_n = 110
View Source
const KEY_nabla = 2245
View Source
const KEY_nacute = 497
View Source
const KEY_ncaron = 498
View Source
const KEY_ncedilla = 1009
View Source
const KEY_ninesubscript = 16785545
View Source
const KEY_ninesuperior = 16785529
View Source
const KEY_nl = 2536
View Source
const KEY_nobreakspace = 160
View Source
const KEY_notapproxeq = 16785991
View Source
const KEY_notelementof = 16785929
View Source
const KEY_notequal = 2237
View Source
const KEY_notidentical = 16786018
View Source
const KEY_notsign = 172
View Source
const KEY_ntilde = 241
View Source
const KEY_numbersign = 35
View Source
const KEY_numerosign = 1712
View Source
const KEY_o = 111
View Source
const KEY_oacute = 243
View Source
const KEY_obarred = 16777845
View Source
const KEY_obelowdot = 16785101
View Source
const KEY_ocaron = 16777682
View Source
const KEY_ocircumflex = 244
View Source
const KEY_ocircumflexacute = 16785105
View Source
const KEY_ocircumflexbelowdot = 16785113
View Source
const KEY_ocircumflexgrave = 16785107
View Source
const KEY_ocircumflexhook = 16785109
View Source
const KEY_ocircumflextilde = 16785111
View Source
const KEY_odiaeresis = 246
View Source
const KEY_odoubleacute = 501
View Source
const KEY_oe = 5053
View Source
const KEY_ogonek = 434
View Source
const KEY_ograve = 242
View Source
const KEY_ohook = 16785103
View Source
const KEY_ohorn = 16777633
View Source
const KEY_ohornacute = 16785115
View Source
const KEY_ohornbelowdot = 16785123
View Source
const KEY_ohorngrave = 16785117
View Source
const KEY_ohornhook = 16785119
View Source
const KEY_ohorntilde = 16785121
View Source
const KEY_omacron = 1010
View Source
const KEY_oneeighth = 2755
View Source
const KEY_onefifth = 2738
View Source
const KEY_onehalf = 189
View Source
const KEY_onequarter = 188
View Source
const KEY_onesixth = 2742
View Source
const KEY_onesubscript = 16785537
View Source
const KEY_onesuperior = 185
View Source
const KEY_onethird = 2736
View Source
const KEY_ooblique = 248
View Source
const KEY_openrectbullet = 2786
View Source
const KEY_openstar = 2789
View Source
const KEY_opentribulletdown = 2788
View Source
const KEY_opentribulletup = 2787
View Source
const KEY_ordfeminine = 170
View Source
const KEY_oslash = 248
View Source
const KEY_otilde = 245
View Source
const KEY_overbar = 3008
View Source
const KEY_overline = 1150
View Source
const KEY_p = 112
View Source
const KEY_pabovedot = 16784983
View Source
const KEY_paragraph = 182
View Source
const KEY_parenleft = 40
View Source
const KEY_parenright = 41
View Source
const KEY_partdifferential = 16785922
View Source
const KEY_partialderivative = 2287
View Source
const KEY_percent = 37
View Source
const KEY_period = 46
View Source
const KEY_periodcentered = 183
View Source
const KEY_permille = 2773
View Source
const KEY_phonographcopyright = 2811
View Source
const KEY_plus = 43
View Source
const KEY_plusminus = 177
View Source
const KEY_prescription = 2772
View Source
const KEY_prolongedsound = 1200
View Source
const KEY_punctspace = 2726
View Source
const KEY_q = 113
View Source
const KEY_quad = 3020
View Source
const KEY_question = 63
View Source
const KEY_questiondown = 191
View Source
const KEY_quotedbl = 34
View Source
const KEY_quoteleft = 96
View Source
const KEY_quoteright = 39
View Source
const KEY_r = 114
View Source
const KEY_racute = 480
View Source
const KEY_radical = 2262
View Source
const KEY_rcaron = 504
View Source
const KEY_rcedilla = 947
View Source
const KEY_registered = 174
View Source
const KEY_rightanglebracket = 2750
View Source
const KEY_rightarrow = 2301
View Source
const KEY_rightcaret = 2982
View Source
const KEY_rightdoublequotemark = 2771
View Source
const KEY_rightmiddlecurlybrace = 2224
View Source
const KEY_rightmiddlesummation = 2231
View Source
const KEY_rightopentriangle = 2765
View Source
const KEY_rightpointer = 2795
View Source
const KEY_rightshoe = 3032
View Source
const KEY_rightsinglequotemark = 2769
View Source
const KEY_rightt = 2549
View Source
const KEY_righttack = 3068
View Source
const KEY_s = 115
View Source
const KEY_sabovedot = 16784993
View Source
const KEY_sacute = 438
View Source
const KEY_scaron = 441
View Source
const KEY_scedilla = 442
View Source
const KEY_schwa = 16777817
View Source
const KEY_scircumflex = 766
View Source
const KEY_script_switch = 65406
View Source
const KEY_seconds = 2775
View Source
const KEY_section = 167
View Source
const KEY_semicolon = 59
View Source
const KEY_semivoicedsound = 1247
View Source
const KEY_seveneighths = 2758
View Source
const KEY_sevensubscript = 16785543
View Source
const KEY_sevensuperior = 16785527
View Source
const KEY_signaturemark = 2762
View Source
const KEY_signifblank = 2732
View Source
const KEY_similarequal = 2249
View Source
const KEY_singlelowquotemark = 2813
View Source
const KEY_sixsubscript = 16785542
View Source
const KEY_sixsuperior = 16785526
View Source
const KEY_slash = 47
View Source
const KEY_soliddiamond = 2528
View Source
const KEY_space = 32
View Source
const KEY_squareroot = 16785946
View Source
const KEY_ssharp = 223
View Source
const KEY_sterling = 163
View Source
const KEY_stricteq = 16786019
View Source
const KEY_t = 116
View Source
const KEY_tabovedot = 16785003
View Source
const KEY_tcaron = 443
View Source
const KEY_tcedilla = 510
View Source
const KEY_telephone = 2809
View Source
const KEY_telephonerecorder = 2810
View Source
const KEY_therefore = 2240
View Source
const KEY_thinspace = 2727
View Source
const KEY_thorn = 254
View Source
const KEY_threeeighths = 2756
View Source
const KEY_threefifths = 2740
View Source
const KEY_threequarters = 190
View Source
const KEY_threesubscript = 16785539
View Source
const KEY_threesuperior = 179
View Source
const KEY_tintegral = 16785965
View Source
const KEY_topintegral = 2212
View Source
const KEY_topleftparens = 2219
View Source
const KEY_topleftradical = 2210
View Source
const KEY_topleftsqbracket = 2215
View Source
const KEY_topleftsummation = 2225
View Source
const KEY_toprightparens = 2221
View Source
const KEY_toprightsqbracket = 2217
View Source
const KEY_toprightsummation = 2229
View Source
const KEY_topt = 2551
View Source
const KEY_topvertsummationconnector = 2227
View Source
const KEY_trademark = 2761
View Source
const KEY_trademarkincircle = 2763
View Source
const KEY_tslash = 956
View Source
const KEY_twofifths = 2739
View Source
const KEY_twosubscript = 16785538
View Source
const KEY_twosuperior = 178
View Source
const KEY_twothirds = 2737
View Source
const KEY_u = 117
View Source
const KEY_uacute = 250
View Source
const KEY_ubelowdot = 16785125
View Source
const KEY_ubreve = 765
View Source
const KEY_ucircumflex = 251
View Source
const KEY_udiaeresis = 252
View Source
const KEY_udoubleacute = 507
View Source
const KEY_ugrave = 249
View Source
const KEY_uhook = 16785127
View Source
const KEY_uhorn = 16777648
View Source
const KEY_uhornacute = 16785129
View Source
const KEY_uhornbelowdot = 16785137
View Source
const KEY_uhorngrave = 16785131
View Source
const KEY_uhornhook = 16785133
View Source
const KEY_uhorntilde = 16785135
View Source
const KEY_umacron = 1022
View Source
const KEY_underbar = 3014
View Source
const KEY_underscore = 95
View Source
const KEY_union = 2269
View Source
const KEY_uogonek = 1017
View Source
const KEY_uparrow = 2300
View Source
const KEY_upcaret = 2985
View Source
const KEY_upleftcorner = 2540
View Source
const KEY_uprightcorner = 2539
View Source
const KEY_upshoe = 3011
View Source
const KEY_upstile = 3027
View Source
const KEY_uptack = 3022
View Source
const KEY_uring = 505
View Source
const KEY_utilde = 1021
View Source
const KEY_v = 118
View Source
const KEY_variation = 2241
View Source
const KEY_vertbar = 2552
View Source
const KEY_vertconnector = 2214
View Source
const KEY_voicedsound = 1246
View Source
const KEY_vt = 2537
View Source
const KEY_w = 119
View Source
const KEY_wacute = 16785027
View Source
const KEY_wcircumflex = 16777589
View Source
const KEY_wdiaeresis = 16785029
View Source
const KEY_wgrave = 16785025
View Source
const KEY_x = 120
View Source
const KEY_xabovedot = 16785035
View Source
const KEY_y = 121
View Source
const KEY_yacute = 253
View Source
const KEY_ybelowdot = 16785141
View Source
const KEY_ycircumflex = 16777591
View Source
const KEY_ydiaeresis = 255
View Source
const KEY_yen = 165
View Source
const KEY_ygrave = 16785139
View Source
const KEY_yhook = 16785143
View Source
const KEY_ytilde = 16785145
View Source
const KEY_z = 122
View Source
const KEY_zabovedot = 447
View Source
const KEY_zacute = 444
View Source
const KEY_zcaron = 446
View Source
const KEY_zerosubscript = 16785536
View Source
const KEY_zerosuperior = 16785520
View Source
const KEY_zstroke = 16777654
View Source
const MAJOR_VERSION = 3
View Source
const MAX_TIMECOORD_AXES = 128
View Source
const MICRO_VERSION = 27
View Source
const MINOR_VERSION = 24
View Source
const PARENT_RELATIVE = 1

PARENT_RELATIVE: special value, indicating that the background for a window should be inherited from the parent window.

View Source
const PRIORITY_REDRAW = 120

PRIORITY_REDRAW: this is the priority that the idle handler processing window updates is given in the [GLib Main Loop][glib-The-Main-Event-Loop].

Variables

View Source
var (
	GTypeAxisUse              = coreglib.Type(C.gdk_axis_use_get_type())
	GTypeByteOrder            = coreglib.Type(C.gdk_byte_order_get_type())
	GTypeCrossingMode         = coreglib.Type(C.gdk_crossing_mode_get_type())
	GTypeCursorType           = coreglib.Type(C.gdk_cursor_type_get_type())
	GTypeDevicePadFeature     = coreglib.Type(C.gdk_device_pad_feature_get_type())
	GTypeDeviceToolType       = coreglib.Type(C.gdk_device_tool_type_get_type())
	GTypeDeviceType           = coreglib.Type(C.gdk_device_type_get_type())
	GTypeDragCancelReason     = coreglib.Type(C.gdk_drag_cancel_reason_get_type())
	GTypeDragProtocol         = coreglib.Type(C.gdk_drag_protocol_get_type())
	GTypeEventType            = coreglib.Type(C.gdk_event_type_get_type())
	GTypeFilterReturn         = coreglib.Type(C.gdk_filter_return_get_type())
	GTypeFullscreenMode       = coreglib.Type(C.gdk_fullscreen_mode_get_type())
	GTypeGLError              = coreglib.Type(C.gdk_gl_error_get_type())
	GTypeGrabOwnership        = coreglib.Type(C.gdk_grab_ownership_get_type())
	GTypeGrabStatus           = coreglib.Type(C.gdk_grab_status_get_type())
	GTypeGravity              = coreglib.Type(C.gdk_gravity_get_type())
	GTypeInputMode            = coreglib.Type(C.gdk_input_mode_get_type())
	GTypeInputSource          = coreglib.Type(C.gdk_input_source_get_type())
	GTypeModifierIntent       = coreglib.Type(C.gdk_modifier_intent_get_type())
	GTypeNotifyType           = coreglib.Type(C.gdk_notify_type_get_type())
	GTypeOwnerChange          = coreglib.Type(C.gdk_owner_change_get_type())
	GTypePropMode             = coreglib.Type(C.gdk_prop_mode_get_type())
	GTypePropertyState        = coreglib.Type(C.gdk_property_state_get_type())
	GTypeScrollDirection      = coreglib.Type(C.gdk_scroll_direction_get_type())
	GTypeSettingAction        = coreglib.Type(C.gdk_setting_action_get_type())
	GTypeStatus               = coreglib.Type(C.gdk_status_get_type())
	GTypeSubpixelLayout       = coreglib.Type(C.gdk_subpixel_layout_get_type())
	GTypeTouchpadGesturePhase = coreglib.Type(C.gdk_touchpad_gesture_phase_get_type())
	GTypeVisibilityState      = coreglib.Type(C.gdk_visibility_state_get_type())
	GTypeVisualType           = coreglib.Type(C.gdk_visual_type_get_type())
	GTypeWindowEdge           = coreglib.Type(C.gdk_window_edge_get_type())
	GTypeWindowType           = coreglib.Type(C.gdk_window_type_get_type())
	GTypeWindowTypeHint       = coreglib.Type(C.gdk_window_type_hint_get_type())
	GTypeWindowWindowClass    = coreglib.Type(C.gdk_window_window_class_get_type())
	GTypeAnchorHints          = coreglib.Type(C.gdk_anchor_hints_get_type())
	GTypeAxisFlags            = coreglib.Type(C.gdk_axis_flags_get_type())
	GTypeDragAction           = coreglib.Type(C.gdk_drag_action_get_type())
	GTypeEventMask            = coreglib.Type(C.gdk_event_mask_get_type())
	GTypeFrameClockPhase      = coreglib.Type(C.gdk_frame_clock_phase_get_type())
	GTypeModifierType         = coreglib.Type(C.gdk_modifier_type_get_type())
	GTypeSeatCapabilities     = coreglib.Type(C.gdk_seat_capabilities_get_type())
	GTypeWMDecoration         = coreglib.Type(C.gdk_wm_decoration_get_type())
	GTypeWMFunction           = coreglib.Type(C.gdk_wm_function_get_type())
	GTypeWindowAttributesType = coreglib.Type(C.gdk_window_attributes_type_get_type())
	GTypeWindowHints          = coreglib.Type(C.gdk_window_hints_get_type())
	GTypeWindowState          = coreglib.Type(C.gdk_window_state_get_type())
	GTypeDevicePad            = coreglib.Type(C.gdk_device_pad_get_type())
	GTypeAppLaunchContext     = coreglib.Type(C.gdk_app_launch_context_get_type())
	GTypeCursor               = coreglib.Type(C.gdk_cursor_get_type())
	GTypeDevice               = coreglib.Type(C.gdk_device_get_type())
	GTypeDeviceManager        = coreglib.Type(C.gdk_device_manager_get_type())
	GTypeDeviceTool           = coreglib.Type(C.gdk_device_tool_get_type())
	GTypeDisplay              = coreglib.Type(C.gdk_display_get_type())
	GTypeDisplayManager       = coreglib.Type(C.gdk_display_manager_get_type())
	GTypeDragContext          = coreglib.Type(C.gdk_drag_context_get_type())
	GTypeDrawingContext       = coreglib.Type(C.gdk_drawing_context_get_type())
	GTypeFrameClock           = coreglib.Type(C.gdk_frame_clock_get_type())
	GTypeGLContext            = coreglib.Type(C.gdk_gl_context_get_type())
	GTypeKeymap               = coreglib.Type(C.gdk_keymap_get_type())
	GTypeMonitor              = coreglib.Type(C.gdk_monitor_get_type())
	GTypeScreen               = coreglib.Type(C.gdk_screen_get_type())
	GTypeSeat                 = coreglib.Type(C.gdk_seat_get_type())
	GTypeVisual               = coreglib.Type(C.gdk_visual_get_type())
	GTypeWindow               = coreglib.Type(C.gdk_window_get_type())
	GTypeColor                = coreglib.Type(C.gdk_color_get_type())
	GTypeEventSequence        = coreglib.Type(C.gdk_event_sequence_get_type())
	GTypeFrameTimings         = coreglib.Type(C.gdk_frame_timings_get_type())
	GTypeRGBA                 = coreglib.Type(C.gdk_rgba_get_type())
	GTypeRectangle            = coreglib.Type(C.gdk_rectangle_get_type())
	GTypeEvent                = coreglib.Type(C.gdk_event_get_type())
)

GType values.

Functions

func AddOptionEntriesLibgtkOnly deprecated

func AddOptionEntriesLibgtkOnly(group *glib.OptionGroup)

AddOptionEntriesLibgtkOnly appends gdk option entries to the passed in option group. This is not public API and must not be used by applications.

Deprecated: This symbol was never meant to be used outside of GTK+.

The function takes the following parameters:

  • group: option group.

func Beep

func Beep()

Beep emits a short beep on the default display.

func CairoCreate deprecated

func CairoCreate(window Windower) *cairo.Context

CairoCreate creates a Cairo context for drawing to window.

Note that calling cairo_reset_clip() on the resulting #cairo_t will produce undefined results, so avoid it at all costs.

Typically, this function is used to draw on a Window out of the paint cycle of the toolkit; this should be avoided, as it breaks various assumptions and optimizations.

If you are drawing on a native Window in response to a GDK_EXPOSE event you should use gdk_window_begin_draw_frame() and gdk_drawing_context_get_cairo_context() instead. GTK will automatically do this for you when drawing a widget.

Deprecated: Use gdk_window_begin_draw_frame() and gdk_drawing_context_get_cairo_context() instead.

The function takes the following parameters:

  • window: Window.

The function returns the following values:

  • context: newly created Cairo context. Free with cairo_destroy() when you are done drawing.

func CairoDrawFromGL

func CairoDrawFromGL(cr *cairo.Context, window Windower, source, sourceType, bufferScale, x, y, width, height int)

CairoDrawFromGL: this is the main way to draw GL content in GTK+. It takes a render buffer ID (source_type == RENDERBUFFER) or a texture id (source_type == TEXTURE) and draws it onto cr with an OVER operation, respecting the current clip. The top left corner of the rectangle specified by x, y, width and height will be drawn at the current (0,0) position of the cairo_t.

This will work for *all* cairo_t, as long as window is realized, but the fallback implementation that reads back the pixels from the buffer may be used in the general case. In the case of direct drawing to a window with no special effects applied to cr it will however use a more efficient approach.

For RENDERBUFFER the code will always fall back to software for buffers with alpha components, so make sure you use TEXTURE if using alpha.

Calling this may change the current GL context.

The function takes the following parameters:

  • cr: cairo context.
  • window we're rendering for (not necessarily into).
  • source: GL ID of the source buffer.
  • sourceType: type of the source.
  • bufferScale: scale-factor that the source buffer is allocated for.
  • x: source x position in source to start copying from in GL coordinates.
  • y: source y position in source to start copying from in GL coordinates.
  • width of the region to draw.
  • height of the region to draw.

func CairoRectangle

func CairoRectangle(cr *cairo.Context, rectangle *Rectangle)

CairoRectangle adds the given rectangle to the current path of cr.

The function takes the following parameters:

  • cr: cairo context.
  • rectangle: Rectangle.

func CairoRegion

func CairoRegion(cr *cairo.Context, region *cairo.Region)

CairoRegion adds the given region to the current path of cr.

The function takes the following parameters:

  • cr: cairo context.
  • region: #cairo_region_t.

func CairoRegionCreateFromSurface

func CairoRegionCreateFromSurface(surface *cairo.Surface) *cairo.Region

CairoRegionCreateFromSurface creates region that describes covers the area where the given surface is more than 50% opaque.

This function takes into account device offsets that might be set with cairo_surface_set_device_offset().

The function takes the following parameters:

  • surface: cairo surface.

The function returns the following values:

  • region must be freed with cairo_region_destroy().

func CairoSetSourceColor deprecated

func CairoSetSourceColor(cr *cairo.Context, color *Color)

CairoSetSourceColor sets the specified Color as the source color of cr.

Deprecated: Use gdk_cairo_set_source_rgba() instead.

The function takes the following parameters:

  • cr: cairo context.
  • color: Color.

func CairoSetSourcePixbuf

func CairoSetSourcePixbuf(cr *cairo.Context, pixbuf *gdkpixbuf.Pixbuf, pixbufX, pixbufY float64)

CairoSetSourcePixbuf sets the given pixbuf as the source pattern for cr.

The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of pixbuf is pixbuf_x, pixbuf_y.

The function takes the following parameters:

  • cr: cairo context.
  • pixbuf: Pixbuf.
  • pixbufX: x coordinate of location to place upper left corner of pixbuf.
  • pixbufY: y coordinate of location to place upper left corner of pixbuf.

func CairoSetSourceRGBA

func CairoSetSourceRGBA(cr *cairo.Context, rgba *RGBA)

CairoSetSourceRGBA sets the specified RGBA as the source color of cr.

The function takes the following parameters:

  • cr: cairo context.
  • rgba: RGBA.

func CairoSetSourceWindow

func CairoSetSourceWindow(cr *cairo.Context, window Windower, x, y float64)

CairoSetSourceWindow sets the given window as the source pattern for cr.

The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of window is x, y. The window contains all its subwindows when rendering.

Note that the contents of window are undefined outside of the visible part of window, so use this function with care.

The function takes the following parameters:

  • cr: cairo context.
  • window: Window.
  • x: x coordinate of location to place upper left corner of window.
  • y: y coordinate of location to place upper left corner of window.

func CairoSurfaceCreateFromPixbuf

func CairoSurfaceCreateFromPixbuf(pixbuf *gdkpixbuf.Pixbuf, scale int, forWindow Windower) *cairo.Surface

CairoSurfaceCreateFromPixbuf creates an image surface with the same contents as the pixbuf.

The function takes the following parameters:

  • pixbuf: Pixbuf.
  • scale of the new surface, or 0 to use same as window.
  • forWindow (optional): window this will be drawn to, or NULL.

The function returns the following values:

  • surface: new cairo surface, must be freed with cairo_surface_destroy().

func DisableMultidevice

func DisableMultidevice()

DisableMultidevice disables multidevice support in GDK. This call must happen prior to gdk_display_open(), gtk_init(), gtk_init_with_args() or gtk_init_check() in order to take effect.

Most common GTK+ applications won’t ever need to call this. Only applications that do mixed GDK/Xlib calls could want to disable multidevice support if such Xlib code deals with input devices in any way and doesn’t observe the presence of XInput 2.

func DragAbort

func DragAbort(context *DragContext, time_ uint32)

DragAbort aborts a drag without dropping.

This function is called by the drag source.

This function does not need to be called in managed drag and drop operations. See gdk_drag_context_manage_dnd() for more information.

The function takes the following parameters:

  • context: DragContext.
  • time_: timestamp for this operation.

func DragDrop

func DragDrop(context *DragContext, time_ uint32)

DragDrop drops on the current destination.

This function is called by the drag source.

This function does not need to be called in managed drag and drop operations. See gdk_drag_context_manage_dnd() for more information.

The function takes the following parameters:

  • context: DragContext.
  • time_: timestamp for this operation.

func DragDropDone

func DragDropDone(context *DragContext, success bool)

DragDropDone: inform GDK if the drop ended successfully. Passing FALSE for success may trigger a drag cancellation animation.

This function is called by the drag source, and should be the last call before dropping the reference to the context.

The DragContext will only take the first gdk_drag_drop_done() call as effective, if this function is called multiple times, all subsequent calls will be ignored.

The function takes the following parameters:

  • context: DragContext.
  • success: whether the drag was ultimatively successful.

func DragDropSucceeded

func DragDropSucceeded(context *DragContext) bool

DragDropSucceeded returns whether the dropped data has been successfully transferred. This function is intended to be used while handling a GDK_DROP_FINISHED event, its return value is meaningless at other times.

The function takes the following parameters:

  • context: DragContext.

The function returns the following values:

  • ok: TRUE if the drop was successful.

func DragFindWindowForScreen

func DragFindWindowForScreen(context *DragContext, dragWindow Windower, screen *Screen, xRoot, yRoot int) (Windower, DragProtocol)

DragFindWindowForScreen finds the destination window and DND protocol to use at the given pointer position.

This function is called by the drag source to obtain the dest_window and protocol parameters for gdk_drag_motion().

The function takes the following parameters:

  • context: DragContext.
  • dragWindow: window which may be at the pointer position, but should be ignored, since it is put up by the drag source as an icon.
  • screen where the destination window is sought.
  • xRoot: x position of the pointer in root coordinates.
  • yRoot: y position of the pointer in root coordinates.

The function returns the following values:

  • destWindow: location to store the destination window in.
  • protocol: location to store the DND protocol in.

func DragMotion

func DragMotion(context *DragContext, destWindow Windower, protocol DragProtocol, xRoot, yRoot int, suggestedAction, possibleActions DragAction, time_ uint32) bool

DragMotion updates the drag context when the pointer moves or the set of actions changes.

This function is called by the drag source.

This function does not need to be called in managed drag and drop operations. See gdk_drag_context_manage_dnd() for more information.

The function takes the following parameters:

  • context: DragContext.
  • destWindow: new destination window, obtained by gdk_drag_find_window().
  • protocol: DND protocol in use, obtained by gdk_drag_find_window().
  • xRoot: x position of the pointer in root coordinates.
  • yRoot: y position of the pointer in root coordinates.
  • suggestedAction: suggested action.
  • possibleActions: possible actions.
  • time_: timestamp for this operation.

The function returns the following values:

func DragStatus

func DragStatus(context *DragContext, action DragAction, time_ uint32)

DragStatus selects one of the actions offered by the drag source.

This function is called by the drag destination in response to gdk_drag_motion() called by the drag source.

The function takes the following parameters:

  • context: DragContext.
  • action: selected action which will be taken when a drop happens, or 0 to indicate that a drop will not be accepted.
  • time_: timestamp for this operation.

func DropFinish

func DropFinish(context *DragContext, success bool, time_ uint32)

DropFinish ends the drag operation after a drop.

This function is called by the drag destination.

The function takes the following parameters:

  • context: DragContext.
  • success: TRUE if the data was successfully received.
  • time_: timestamp for this operation.

func DropReply

func DropReply(context *DragContext, accepted bool, time_ uint32)

DropReply accepts or rejects a drop.

This function is called by the drag destination in response to a drop initiated by the drag source.

The function takes the following parameters:

  • context: DragContext.
  • accepted: TRUE if the drop is accepted.
  • time_: timestamp for this operation.

func ErrorTrapPop

func ErrorTrapPop() int

ErrorTrapPop removes an error trap pushed with gdk_error_trap_push(). May block until an error has been definitively received or not received from the X server. gdk_error_trap_pop_ignored() is preferred if you don’t need to know whether an error occurred, because it never has to block. If you don't need the return value of gdk_error_trap_pop(), use gdk_error_trap_pop_ignored().

Prior to GDK 3.0, this function would not automatically sync for you, so you had to gdk_flush() if your last call to Xlib was not a blocking round trip.

The function returns the following values:

  • gint: x error code or 0 on success.

func ErrorTrapPopIgnored

func ErrorTrapPopIgnored()

ErrorTrapPopIgnored removes an error trap pushed with gdk_error_trap_push(), but without bothering to wait and see whether an error occurred. If an error arrives later asynchronously that was triggered while the trap was pushed, that error will be ignored.

func ErrorTrapPush

func ErrorTrapPush()

ErrorTrapPush: this function allows X errors to be trapped instead of the normal behavior of exiting the application. It should only be used if it is not possible to avoid the X error in any other way. Errors are ignored on all Display currently known to the DisplayManager. If you don’t care which error happens and just want to ignore everything, pop with gdk_error_trap_pop_ignored(). If you need the error code, use gdk_error_trap_pop() which may have to block and wait for the error to arrive from the X server.

This API exists on all platforms but only does anything on X.

You can use gdk_x11_display_error_trap_push() to ignore errors on only a single display.

Trapping an X error

gdk_error_trap_push ();

 // ... Call the X function which may cause an error here ...

if (gdk_error_trap_pop ())
 {
   // ... Handle the error here ...
 }.

func EventHandlerSet

func EventHandlerSet(fn EventFunc)

EventHandlerSet sets the function to call to handle all events from GDK.

Note that GTK+ uses this to install its own event handler, so it is usually not useful for GTK+ applications. (Although an application can call this function then call gtk_main_do_event() to pass events to GTK+.).

The function takes the following parameters:

  • fn: function to call to handle events from GDK.

func EventRequestMotions

func EventRequestMotions(event *EventMotion)

EventRequestMotions: request more motion notifies if event is a motion notify hint event.

This function should be used instead of gdk_window_get_pointer() to request further motion notifies, because it also works for extension events where motion notifies are provided for devices other than the core pointer. Coordinate extraction, processing and requesting more motion events from a GDK_MOTION_NOTIFY event usually works like this:

{
  // motion_event handler
  x = motion_event->x;
  y = motion_event->y;
  // handle (x,y) motion
  gdk_event_request_motions (motion_event); // handles is_hint events
}.

The function takes the following parameters:

  • event: valid Event.

func EventsGetAngle

func EventsGetAngle(event1, event2 *Event) (float64, bool)

EventsGetAngle: if both events contain X/Y information, this function will return TRUE and return in angle the relative angle from event1 to event2. The rotation direction for positive angles is from the positive X axis towards the positive Y axis.

The function takes the following parameters:

  • event1: first Event.
  • event2: second Event.

The function returns the following values:

  • angle: return location for the relative angle between both events.
  • ok: TRUE if the angle could be calculated.

func EventsGetCenter

func EventsGetCenter(event1, event2 *Event) (x, y float64, ok bool)

EventsGetCenter: if both events contain X/Y information, the center of both coordinates will be returned in x and y.

The function takes the following parameters:

  • event1: first Event.
  • event2: second Event.

The function returns the following values:

  • x: return location for the X coordinate of the center.
  • y: return location for the Y coordinate of the center.
  • ok: TRUE if the center could be calculated.

func EventsGetDistance

func EventsGetDistance(event1, event2 *Event) (float64, bool)

EventsGetDistance: if both events have X/Y information, the distance between both coordinates (as in a straight line going from event1 to event2) will be returned.

The function takes the following parameters:

  • event1: first Event.
  • event2: second Event.

The function returns the following values:

  • distance: return location for the distance.
  • ok: TRUE if the distance could be calculated.

func EventsPending

func EventsPending() bool

EventsPending checks if any events are ready to be processed for any display.

The function returns the following values:

  • ok: TRUE if any events are pending.

func Flush

func Flush()

Flush flushes the output buffers of all display connections and waits until all requests have been processed. This is rarely needed by applications.

func GLContextClearCurrent

func GLContextClearCurrent()

GLContextClearCurrent clears the current GLContext.

Any OpenGL call after this function returns will be ignored until gdk_gl_context_make_current() is called.

func GLErrorQuark

func GLErrorQuark() glib.Quark

The function returns the following values:

func GetDisplay deprecated

func GetDisplay() string

GetDisplay gets the name of the display, which usually comes from the DISPLAY environment variable or the --display command line option.

Deprecated: Call gdk_display_get_name (gdk_display_get_default ())) instead.

The function returns the following values:

  • utf8: name of the display.

func GetDisplayArgName

func GetDisplayArgName() string

GetDisplayArgName gets the display name specified in the command line arguments passed to gdk_init() or gdk_parse_args(), if any.

The function returns the following values:

  • utf8 (optional): display name, if specified explicitly, otherwise NULL this string is owned by GTK+ and must not be modified or freed.

func GetProgramClass

func GetProgramClass() string

GetProgramClass gets the program class. Unless the program class has explicitly been set with gdk_set_program_class() or with the --class commandline option, the default value is the program name (determined with g_get_prgname()) with the first character converted to uppercase.

The function returns the following values:

  • utf8: program class.

func GetShowEvents

func GetShowEvents() bool

GetShowEvents gets whether event debugging output is enabled.

The function returns the following values:

  • ok: TRUE if event debugging output is enabled.

func KeyboardUngrab deprecated

func KeyboardUngrab(time_ uint32)

KeyboardUngrab ungrabs the keyboard on the default display, if it is grabbed by this application.

Deprecated: Use gdk_device_ungrab(), together with gdk_device_grab() instead.

The function takes the following parameters:

  • time_: timestamp from a Event, or GDK_CURRENT_TIME if no timestamp is available.

func KeyvalConvertCase

func KeyvalConvertCase(symbol uint) (lower, upper uint)

KeyvalConvertCase obtains the upper- and lower-case versions of the keyval symbol. Examples of keyvals are K_KEY_a, K_KEY_Enter, K_KEY_F1, etc.

The function takes the following parameters:

  • symbol: keyval.

The function returns the following values:

  • lower: return location for lowercase version of symbol.
  • upper: return location for uppercase version of symbol.

func KeyvalFromName

func KeyvalFromName(keyvalName string) uint

KeyvalFromName converts a key name to a key value.

The names are the same as those in the gdk/gdkkeysyms.h header file but without the leading “GDK_KEY_”.

The function takes the following parameters:

  • keyvalName: key name.

The function returns the following values:

  • guint: corresponding key value, or GDK_KEY_VoidSymbol if the key name is not a valid key.

func KeyvalIsLower

func KeyvalIsLower(keyval uint) bool

KeyvalIsLower returns TRUE if the given key value is in lower case.

The function takes the following parameters:

  • keyval: key value.

The function returns the following values:

  • ok: TRUE if keyval is in lower case, or if keyval is not subject to case conversion.

func KeyvalIsUpper

func KeyvalIsUpper(keyval uint) bool

KeyvalIsUpper returns TRUE if the given key value is in upper case.

The function takes the following parameters:

  • keyval: key value.

The function returns the following values:

  • ok: TRUE if keyval is in upper case, or if keyval is not subject to case conversion.

func KeyvalName

func KeyvalName(keyval uint) string

KeyvalName converts a key value into a symbolic name.

The names are the same as those in the gdk/gdkkeysyms.h header file but without the leading “GDK_KEY_”.

The function takes the following parameters:

  • keyval: key value.

The function returns the following values:

  • utf8 (optional): string containing the name of the key, or NULL if keyval is not a valid key. The string should not be modified.

func KeyvalToLower

func KeyvalToLower(keyval uint) uint

KeyvalToLower converts a key value to lower case, if applicable.

The function takes the following parameters:

  • keyval: key value.

The function returns the following values:

  • guint: lower case form of keyval, or keyval itself if it is already in lower case or it is not subject to case conversion.

func KeyvalToUnicode

func KeyvalToUnicode(keyval uint) uint32

KeyvalToUnicode: convert from a GDK key symbol to the corresponding ISO10646 (Unicode) character.

The function takes the following parameters:

  • keyval: GDK key symbol.

The function returns the following values:

  • guint32: corresponding unicode character, or 0 if there is no corresponding character.

func KeyvalToUpper

func KeyvalToUpper(keyval uint) uint

KeyvalToUpper converts a key value to upper case, if applicable.

The function takes the following parameters:

  • keyval: key value.

The function returns the following values:

  • guint: upper case form of keyval, or keyval itself if it is already in upper case or it is not subject to case conversion.

func NotifyStartupComplete

func NotifyStartupComplete()

NotifyStartupComplete indicates to the GUI environment that the application has finished loading. If the applications opens windows, this function is normally called after opening the application’s initial set of windows.

GTK+ will call this function automatically after opening the first Window unless gtk_window_set_auto_startup_notification() is called to disable that feature.

func NotifyStartupCompleteWithID

func NotifyStartupCompleteWithID(startupId string)

NotifyStartupCompleteWithID indicates to the GUI environment that the application has finished loading, using a given identifier.

GTK+ will call this function automatically for Window with custom startup-notification identifier unless gtk_window_set_auto_startup_notification() is called to disable that feature.

The function takes the following parameters:

  • startupId: startup-notification identifier, for which notification process should be completed.

func OffscreenWindowGetSurface

func OffscreenWindowGetSurface(window Windower) *cairo.Surface

OffscreenWindowGetSurface gets the offscreen surface that an offscreen window renders into. If you need to keep this around over window resizes, you need to add a reference to it.

The function takes the following parameters:

  • window: Window.

The function returns the following values:

  • surface (optional): offscreen surface, or NULL if not offscreen.

func OffscreenWindowSetEmbedder

func OffscreenWindowSetEmbedder(window, embedder Windower)

OffscreenWindowSetEmbedder sets window to be embedded in embedder.

To fully embed an offscreen window, in addition to calling this function, it is also necessary to handle the Window::pick-embedded-child signal on the embedder and the Window::to-embedder and Window::from-embedder signals on window.

The function takes the following parameters:

  • window: Window.
  • embedder that window gets embedded in.

func PangoContextGet

func PangoContextGet() *pango.Context

PangoContextGet creates a Context for the default GDK screen.

The context must be freed when you’re finished with it.

When using GTK+, normally you should use gtk_widget_get_pango_context() instead of this function, to get the appropriate context for the widget you intend to render text onto.

The newly created context will have the default font options (see #cairo_font_options_t) for the default screen; if these options change it will not be updated. Using gtk_widget_get_pango_context() is more convenient if you want to keep a context around and track changes to the screen’s font rendering settings.

The function returns the following values:

  • context: new Context for the default display.

func PangoContextGetForDisplay

func PangoContextGetForDisplay(display *Display) *pango.Context

PangoContextGetForDisplay creates a Context for display.

The context must be freed when you’re finished with it.

When using GTK+, normally you should use gtk_widget_get_pango_context() instead of this function, to get the appropriate context for the widget you intend to render text onto.

The newly created context will have the default font options (see #cairo_font_options_t) for the display; if these options change it will not be updated. Using gtk_widget_get_pango_context() is more convenient if you want to keep a context around and track changes to the font rendering settings.

The function takes the following parameters:

  • display for which the context is to be created.

The function returns the following values:

  • context: new Context for display.

func PangoContextGetForScreen

func PangoContextGetForScreen(screen *Screen) *pango.Context

PangoContextGetForScreen creates a Context for screen.

The context must be freed when you’re finished with it.

When using GTK+, normally you should use gtk_widget_get_pango_context() instead of this function, to get the appropriate context for the widget you intend to render text onto.

The newly created context will have the default font options (see #cairo_font_options_t) for the screen; if these options change it will not be updated. Using gtk_widget_get_pango_context() is more convenient if you want to keep a context around and track changes to the screen’s font rendering settings.

The function takes the following parameters:

  • screen for which the context is to be created.

The function returns the following values:

  • context: new Context for screen.

func PixbufGetFromSurface

func PixbufGetFromSurface(surface *cairo.Surface, srcX, srcY, width, height int) *gdkpixbuf.Pixbuf

PixbufGetFromSurface transfers image data from a #cairo_surface_t and converts it to an RGB(A) representation inside a Pixbuf. This allows you to efficiently read individual pixels from cairo surfaces. For Windows, use gdk_pixbuf_get_from_window() instead.

This function will create an RGB pixbuf with 8 bits per channel. The pixbuf will contain an alpha channel if the surface contains one.

The function takes the following parameters:

  • surface to copy from.
  • srcX: source X coordinate within surface.
  • srcY: source Y coordinate within surface.
  • width: width in pixels of region to get.
  • height: height in pixels of region to get.

The function returns the following values:

  • pixbuf (optional): newly-created pixbuf with a reference count of 1, or NULL on error.

func PixbufGetFromWindow

func PixbufGetFromWindow(window Windower, srcX, srcY, width, height int) *gdkpixbuf.Pixbuf

PixbufGetFromWindow transfers image data from a Window and converts it to an RGB(A) representation inside a Pixbuf. In other words, copies image data from a server-side drawable to a client-side RGB(A) buffer. This allows you to efficiently read individual pixels on the client side.

This function will create an RGB pixbuf with 8 bits per channel with the size specified by the width and height arguments scaled by the scale factor of window. The pixbuf will contain an alpha channel if the window contains one.

If the window is off the screen, then there is no image data in the obscured/offscreen regions to be placed in the pixbuf. The contents of portions of the pixbuf corresponding to the offscreen region are undefined.

If the window you’re obtaining data from is partially obscured by other windows, then the contents of the pixbuf areas corresponding to the obscured regions are undefined.

If the window is not mapped (typically because it’s iconified/minimized or not on the current workspace), then NULL will be returned.

If memory can’t be allocated for the return value, NULL will be returned instead.

(In short, there are several ways this function can fail, and if it fails it returns NULL; so check the return value.).

The function takes the following parameters:

  • window: source window.
  • srcX: source X coordinate within window.
  • srcY: source Y coordinate within window.
  • width: width in pixels of region to get.
  • height: height in pixels of region to get.

The function returns the following values:

  • pixbuf (optional): newly-created pixbuf with a reference count of 1, or NULL on error.

func PointerIsGrabbed deprecated

func PointerIsGrabbed() bool

PointerIsGrabbed returns TRUE if the pointer on the default display is currently grabbed by this application.

Note that this does not take the inmplicit pointer grab on button presses into account.

Deprecated: Use gdk_display_device_is_grabbed() instead.

The function returns the following values:

  • ok: TRUE if the pointer is currently grabbed by this application.

func PointerUngrab deprecated

func PointerUngrab(time_ uint32)

PointerUngrab ungrabs the pointer on the default display, if it is grabbed by this application.

Deprecated: Use gdk_device_ungrab(), together with gdk_device_grab() instead.

The function takes the following parameters:

  • time_: timestamp from a Event, or GDK_CURRENT_TIME if no timestamp is available.

func PreParseLibgtkOnly deprecated

func PreParseLibgtkOnly()

PreParseLibgtkOnly: prepare for parsing command line arguments for GDK. This is not public API and should not be used in application code.

Deprecated: This symbol was never meant to be used outside of GTK+.

func QueryDepths deprecated

func QueryDepths() []int

QueryDepths: this function returns the available bit depths for the default screen. It’s equivalent to listing the visuals (gdk_list_visuals()) and then looking at the depth field in each visual, removing duplicates.

The array returned by this function should not be freed.

Deprecated: Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual().

The function returns the following values:

  • depths: return location for available depths.

func ScreenHeight deprecated

func ScreenHeight() int

ScreenHeight gets the height of the default screen in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see gdk_screen_get_monitor_scale_factor()).

Deprecated: Use per-monitor information.

The function returns the following values:

  • gint: height of the default screen in pixels.

func ScreenHeightMm deprecated

func ScreenHeightMm() int

ScreenHeightMm returns the height of the default screen in millimeters. Note that on many X servers this value will not be correct.

Deprecated: Use per-monitor information.

The function returns the following values:

  • gint: height of the default screen in millimeters, though it is not always correct.

func ScreenWidth deprecated

func ScreenWidth() int

ScreenWidth gets the width of the default screen in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see gdk_screen_get_monitor_scale_factor()).

Deprecated: Use per-monitor information.

The function returns the following values:

  • gint: width of the default screen in pixels.

func ScreenWidthMm deprecated

func ScreenWidthMm() int

ScreenWidthMm returns the width of the default screen in millimeters. Note that on many X servers this value will not be correct.

Deprecated: Use per-monitor information.

The function returns the following values:

  • gint: width of the default screen in millimeters, though it is not always correct.

func SetAllowedBackends

func SetAllowedBackends(backends string)

SetAllowedBackends sets a list of backends that GDK should try to use.

This can be be useful if your application does not work with certain GDK backends.

By default, GDK tries all included backends.

For example,

gdk_set_allowed_backends ("wayland,quartz,*");

instructs GDK to try the Wayland backend first, followed by the Quartz backend, and then all others.

If the GDK_BACKEND environment variable is set, it determines what backends are tried in what order, while still respecting the set of allowed backends that are specified by this function.

The possible backend names are x11, win32, quartz, broadway, wayland. You can also include a * in the list to try all remaining backends.

This call must happen prior to gdk_display_open(), gtk_init(), gtk_init_with_args() or gtk_init_check() in order to take effect.

The function takes the following parameters:

  • backends: comma-separated list of backends.

func SetDoubleClickTime

func SetDoubleClickTime(msec uint)

SetDoubleClickTime: set the double click time for the default display. See gdk_display_set_double_click_time(). See also gdk_display_set_double_click_distance(). Applications should not set this, it is a global user-configured setting.

The function takes the following parameters:

  • msec: double click time in milliseconds (thousandths of a second).

func SetProgramClass

func SetProgramClass(programClass string)

SetProgramClass sets the program class. The X11 backend uses the program class to set the class name part of the WM_CLASS property on toplevel windows; see the ICCCM.

The program class can still be overridden with the --class command line option.

The function takes the following parameters:

  • programClass: string.

func SetShowEvents

func SetShowEvents(showEvents bool)

SetShowEvents sets whether a trace of received events is output. Note that GTK+ must be compiled with debugging (that is, configured using the --enable-debug option) to use this option.

The function takes the following parameters:

  • showEvents: TRUE to output event debugging information.

func SettingGet

func SettingGet(name string, value *coreglib.Value) bool

SettingGet obtains a desktop-wide setting, such as the double-click time, for the default screen. See gdk_screen_get_setting().

The function takes the following parameters:

  • name of the setting.
  • value: location to store the value of the setting.

The function returns the following values:

  • ok: TRUE if the setting existed and a value was stored in value, FALSE otherwise.

func TestRenderSync

func TestRenderSync(window Windower)

TestRenderSync retrieves a pixel from window to force the windowing system to carry out any pending rendering commands.

This function is intended to be used to synchronize with rendering pipelines, to benchmark windowing system rendering operations.

The function takes the following parameters:

  • window: mapped Window.

func TestSimulateButton

func TestSimulateButton(window Windower, x, y int, button uint, modifiers ModifierType, buttonPressrelease EventType) bool

TestSimulateButton: this function is intended to be used in GTK+ test programs. It will warp the mouse pointer to the given (x,y) coordinates within window and simulate a button press or release event. Because the mouse pointer needs to be warped to the target location, use of this function outside of test programs that run in their own virtual windowing system (e.g. Xvfb) is not recommended.

Also, gdk_test_simulate_button() is a fairly low level function, for most testing purposes, gtk_test_widget_click() is the right function to call which will generate a button press event followed by its accompanying button release event.

The function takes the following parameters:

  • window to simulate a button event for.
  • x coordinate within window for the button event.
  • y coordinate within window for the button event.
  • button: number of the pointer button for the event, usually 1, 2 or 3.
  • modifiers: keyboard modifiers the event is setup with.
  • buttonPressrelease: either GDK_BUTTON_PRESS or GDK_BUTTON_RELEASE.

The function returns the following values:

  • ok: whether all actions necessary for a button event simulation were carried out successfully.

func TestSimulateKey

func TestSimulateKey(window Windower, x, y int, keyval uint, modifiers ModifierType, keyPressrelease EventType) bool

TestSimulateKey: this function is intended to be used in GTK+ test programs. If (x,y) are > (-1,-1), it will warp the mouse pointer to the given (x,y) coordinates within window and simulate a key press or release event.

When the mouse pointer is warped to the target location, use of this function outside of test programs that run in their own virtual windowing system (e.g. Xvfb) is not recommended. If (x,y) are passed as (-1,-1), the mouse pointer will not be warped and window origin will be used as mouse pointer location for the event.

Also, gdk_test_simulate_key() is a fairly low level function, for most testing purposes, gtk_test_widget_send_key() is the right function to call which will generate a key press event followed by its accompanying key release event.

The function takes the following parameters:

  • window to simulate a key event for.
  • x coordinate within window for the key event.
  • y coordinate within window for the key event.
  • keyval: GDK keyboard value.
  • modifiers: keyboard modifiers the event is setup with.
  • keyPressrelease: either GDK_KEY_PRESS or GDK_KEY_RELEASE.

The function returns the following values:

  • ok: whether all actions necessary for a key event simulation were carried out successfully.

func ThreadsAddIdle

func ThreadsAddIdle(priority int, function glib.SourceFunc) uint

ThreadsAddIdle adds a function to be called whenever there are no higher priority events pending. If the function returns FALSE it is automatically removed from the list of event sources and will not be called again.

This variant of g_idle_add_full() calls function with the GDK lock held. It can be thought of a MT-safe version for GTK+ widgets for the following use case, where you have to worry about idle_callback() running in thread A and accessing self after it has been finalized in thread B:

static gboolean
idle_callback (gpointer data)
{
   // gdk_threads_enter(); would be needed for g_idle_add()

   SomeWidget *self = data;
   // do stuff with self

   self->idle_id = 0;

   // gdk_threads_leave(); would be needed for g_idle_add()
   return FALSE;
}

static void
some_widget_do_stuff_later (SomeWidget *self)
{
   self->idle_id = gdk_threads_add_idle (idle_callback, self)
   // using g_idle_add() here would require thread protection in the callback
}

static void
some_widget_finalize (GObject *object)
{
   SomeWidget *self = SOME_WIDGET (object);
   if (self->idle_id)
     g_source_remove (self->idle_id);
   G_OBJECT_CLASS (parent_class)->finalize (object);
}.

The function takes the following parameters:

  • priority of the idle source. Typically this will be in the range between PRIORITY_DEFAULT_IDLE and PRIORITY_HIGH_IDLE.
  • function to call.

The function returns the following values:

  • guint: ID (greater than 0) of the event source.

func ThreadsAddTimeout

func ThreadsAddTimeout(priority int, interval uint, function glib.SourceFunc) uint

ThreadsAddTimeout sets a function to be called at regular intervals holding the GDK lock, with the given priority. The function is called repeatedly until it returns FALSE, at which point the timeout is automatically destroyed and the function will not be called again. The notify function is called when the timeout is destroyed. The first call to the function will be at the end of the first interval.

Note that timeout functions may be delayed, due to the processing of other event sources. Thus they should not be relied on for precise timing. After each call to the timeout function, the time of the next timeout is recalculated based on the current time and the given interval (it does not try to “catch up” time lost in delays).

This variant of g_timeout_add_full() can be thought of a MT-safe version for GTK+ widgets for the following use case:

static gboolean timeout_callback (gpointer data)
{
   SomeWidget *self = data;

   // do stuff with self

   self->timeout_id = 0;

   return G_SOURCE_REMOVE;
}

static void some_widget_do_stuff_later (SomeWidget *self)
{
   self->timeout_id = g_timeout_add (timeout_callback, self)
}

static void some_widget_finalize (GObject *object)
{
   SomeWidget *self = SOME_WIDGET (object);

   if (self->timeout_id)
     g_source_remove (self->timeout_id);

   G_OBJECT_CLASS (parent_class)->finalize (object);
}.

The function takes the following parameters:

  • priority of the timeout source. Typically this will be in the range between PRIORITY_DEFAULT_IDLE and PRIORITY_HIGH_IDLE.
  • interval: time between calls to the function, in milliseconds (1/1000ths of a second).
  • function to call.

The function returns the following values:

  • guint: ID (greater than 0) of the event source.

func ThreadsAddTimeoutSeconds

func ThreadsAddTimeoutSeconds(priority int, interval uint, function glib.SourceFunc) uint

ThreadsAddTimeoutSeconds: variant of gdk_threads_add_timeout_full() with second-granularity. See g_timeout_add_seconds_full() for a discussion of why it is a good idea to use this function if you don’t need finer granularity.

The function takes the following parameters:

  • priority of the timeout source. Typically this will be in the range between PRIORITY_DEFAULT_IDLE and PRIORITY_HIGH_IDLE.
  • interval: time between calls to the function, in seconds.
  • function to call.

The function returns the following values:

  • guint: ID (greater than 0) of the event source.

func ThreadsEnter deprecated

func ThreadsEnter()

ThreadsEnter: this function marks the beginning of a critical section in which GDK and GTK+ functions can be called safely and without causing race conditions. Only one thread at a time can be in such a critial section.

Deprecated: All GDK and GTK+ calls should be made from the main thread.

func ThreadsInit deprecated

func ThreadsInit()

ThreadsInit initializes GDK so that it can be used from multiple threads in conjunction with gdk_threads_enter() and gdk_threads_leave().

This call must be made before any use of the main loop from GTK+; to be safe, call it before gtk_init().

Deprecated: All GDK and GTK+ calls should be made from the main thread.

func ThreadsLeave deprecated

func ThreadsLeave()

ThreadsLeave leaves a critical region begun with gdk_threads_enter().

Deprecated: All GDK and GTK+ calls should be made from the main thread.

func UTF8ToStringTarget

func UTF8ToStringTarget(str string) string

UTF8ToStringTarget converts an UTF-8 string into the best possible representation as a STRING. The representation of characters not in STRING is not specified; it may be as pseudo-escape sequences \x{ABCD}, or it may be in some other form of approximation.

The function takes the following parameters:

  • str: UTF-8 string.

The function returns the following values:

  • utf8 (optional): newly-allocated string, or NULL if the conversion failed. (It should not fail for any properly formed UTF-8 string unless system limits like memory or file descriptors are exceeded.).

func UnicodeToKeyval

func UnicodeToKeyval(wc uint32) uint

UnicodeToKeyval: convert from a ISO10646 character to a key symbol.

The function takes the following parameters:

  • wc: ISO10646 encoded character.

The function returns the following values:

  • guint: corresponding GDK key symbol, if one exists. or, if there is no corresponding symbol, wc | 0x01000000.

func VisualGetBestDepth deprecated

func VisualGetBestDepth() int

VisualGetBestDepth: get the best available depth for the default GDK screen. “Best” means “largest,” i.e. 32 preferred over 24 preferred over 8 bits per pixel.

Deprecated: Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual().

The function returns the following values:

  • gint: best available depth.

func WindowConstrainSize

func WindowConstrainSize(geometry *Geometry, flags WindowHints, width, height int) (newWidth, newHeight int)

WindowConstrainSize constrains a desired width and height according to a set of geometry hints (such as minimum and maximum size).

The function takes the following parameters:

  • geometry: Geometry structure.
  • flags: mask indicating what portions of geometry are set.
  • width: desired width of window.
  • height: desired height of the window.

The function returns the following values:

  • newWidth: location to store resulting width.
  • newHeight: location to store resulting height.

func WindowProcessAllUpdates deprecated

func WindowProcessAllUpdates()

WindowProcessAllUpdates calls gdk_window_process_updates() for all windows (see Window) in the application.

Deprecated: since version 3.22.

func WindowSetDebugUpdates deprecated

func WindowSetDebugUpdates(setting bool)

WindowSetDebugUpdates: with update debugging enabled, calls to gdk_window_invalidate_region() clear the invalidated region of the screen to a noticeable color, and GDK pauses for a short time before sending exposes to windows during gdk_window_process_updates(). The net effect is that you can see the invalid region for each window and watch redraws as they occur. This allows you to diagnose inefficiencies in your application.

In essence, because the GDK rendering model prevents all flicker, if you are redrawing the same region 400 times you may never notice, aside from noticing a speed problem. Enabling update debugging causes GTK to flicker slowly and noticeably, so you can see exactly what’s being redrawn when, in what order.

The --gtk-debug=updates command line option passed to GTK+ programs enables this debug option at application startup time. That's usually more useful than calling gdk_window_set_debug_updates() yourself, though you might want to use this function to enable updates sometime after application startup time.

Deprecated: since version 3.22.

The function takes the following parameters:

  • setting: TRUE to turn on update debugging.

Types

type AnchorHints

type AnchorHints C.guint

AnchorHints: positioning hints for aligning a window relative to a rectangle.

These hints determine how the window should be positioned in the case that the window would fall off-screen if placed in its ideal position.

For example, GDK_ANCHOR_FLIP_X will replace GDK_GRAVITY_NORTH_WEST with GDK_GRAVITY_NORTH_EAST and vice versa if the window extends beyond the left or right edges of the monitor.

If GDK_ANCHOR_SLIDE_X is set, the window can be shifted horizontally to fit on-screen. If GDK_ANCHOR_RESIZE_X is set, the window can be shrunken horizontally to fit.

In general, when multiple flags are set, flipping should take precedence over sliding, which should take precedence over resizing.

const (
	// AnchorFlipX: allow flipping anchors horizontally.
	AnchorFlipX AnchorHints = 0b1
	// AnchorFlipY: allow flipping anchors vertically.
	AnchorFlipY AnchorHints = 0b10
	// AnchorSlideX: allow sliding window horizontally.
	AnchorSlideX AnchorHints = 0b100
	// AnchorSlideY: allow sliding window vertically.
	AnchorSlideY AnchorHints = 0b1000
	// AnchorResizeX: allow resizing window horizontally.
	AnchorResizeX AnchorHints = 0b10000
	// AnchorResizeY: allow resizing window vertically.
	AnchorResizeY AnchorHints = 0b100000
	// AnchorFlip: allow flipping anchors on both axes.
	AnchorFlip AnchorHints = 0b11
	// AnchorSlide: allow sliding window on both axes.
	AnchorSlide AnchorHints = 0b1100
	// AnchorResize: allow resizing window on both axes.
	AnchorResize AnchorHints = 0b110000
)

func (AnchorHints) Has

func (a AnchorHints) Has(other AnchorHints) bool

Has returns true if a contains other.

func (AnchorHints) String

func (a AnchorHints) String() string

String returns the names in string for AnchorHints.

type AppLaunchContext

type AppLaunchContext struct {
	gio.AppLaunchContext
	// contains filtered or unexported fields
}

AppLaunchContext is an implementation of LaunchContext that handles launching an application in a graphical context. It provides startup notification and allows to launch applications on a specific screen or workspace.

Launching an application

GdkAppLaunchContext *context;

context = gdk_display_get_app_launch_context (display);

gdk_app_launch_context_set_screen (screen);
gdk_app_launch_context_set_timestamp (event->time);

if (!g_app_info_launch_default_for_uri ("http://www.gtk.org", context, &error))
  g_warning ("Launching failed: s\n", error->message);

g_object_unref (context);.

func NewAppLaunchContext deprecated

func NewAppLaunchContext() *AppLaunchContext

NewAppLaunchContext creates a new AppLaunchContext.

Deprecated: Use gdk_display_get_app_launch_context() instead.

The function returns the following values:

  • appLaunchContext: new AppLaunchContext.

func (*AppLaunchContext) SetDesktop

func (context *AppLaunchContext) SetDesktop(desktop int)

SetDesktop sets the workspace on which applications will be launched when using this context when running under a window manager that supports multiple workspaces, as described in the Extended Window Manager Hints (http://www.freedesktop.org/Standards/wm-spec).

When the workspace is not specified or desktop is set to -1, it is up to the window manager to pick one, typically it will be the current workspace.

The function takes the following parameters:

  • desktop: number of a workspace, or -1.

func (*AppLaunchContext) SetDisplay deprecated

func (context *AppLaunchContext) SetDisplay(display *Display)

SetDisplay sets the display on which applications will be launched when using this context. See also gdk_app_launch_context_set_screen().

Deprecated: Use gdk_display_get_app_launch_context() instead.

The function takes the following parameters:

  • display: Display.

func (*AppLaunchContext) SetIcon

func (context *AppLaunchContext) SetIcon(icon gio.Iconner)

SetIcon sets the icon for applications that are launched with this context.

Window Managers can use this information when displaying startup notification.

See also gdk_app_launch_context_set_icon_name().

The function takes the following parameters:

  • icon (optional) or NULL.

func (*AppLaunchContext) SetIconName

func (context *AppLaunchContext) SetIconName(iconName string)

SetIconName sets the icon for applications that are launched with this context. The icon_name will be interpreted in the same way as the Icon field in desktop files. See also gdk_app_launch_context_set_icon().

If both icon and icon_name are set, the icon_name takes priority. If neither icon or icon_name is set, the icon is taken from either the file that is passed to launched application or from the Info for the launched application itself.

The function takes the following parameters:

  • iconName (optional): icon name, or NULL.

func (*AppLaunchContext) SetScreen

func (context *AppLaunchContext) SetScreen(screen *Screen)

SetScreen sets the screen on which applications will be launched when using this context. See also gdk_app_launch_context_set_display().

If both screen and display are set, the screen takes priority. If neither screen or display are set, the default screen and display are used.

The function takes the following parameters:

  • screen: Screen.

func (*AppLaunchContext) SetTimestamp

func (context *AppLaunchContext) SetTimestamp(timestamp uint32)

SetTimestamp sets the timestamp of context. The timestamp should ideally be taken from the event that triggered the launch.

Window managers can use this information to avoid moving the focus to the newly launched application when the user is busy typing in another window. This is also known as 'focus stealing prevention'.

The function takes the following parameters:

  • timestamp: timestamp.

type AxisFlags

type AxisFlags C.guint

AxisFlags flags describing the current capabilities of a device/tool.

const (
	// AxisFlagX: x axis is present.
	AxisFlagX AxisFlags = 0b10
	// AxisFlagY: y axis is present.
	AxisFlagY AxisFlags = 0b100
	// AxisFlagPressure: pressure axis is present.
	AxisFlagPressure AxisFlags = 0b1000
	// AxisFlagXtilt: x tilt axis is present.
	AxisFlagXtilt AxisFlags = 0b10000
	// AxisFlagYtilt: y tilt axis is present.
	AxisFlagYtilt AxisFlags = 0b100000
	// AxisFlagWheel: wheel axis is present.
	AxisFlagWheel AxisFlags = 0b1000000
	// AxisFlagDistance: distance axis is present.
	AxisFlagDistance AxisFlags = 0b10000000
	// AxisFlagRotation z-axis rotation is present.
	AxisFlagRotation AxisFlags = 0b100000000
	// AxisFlagSlider: slider axis is present.
	AxisFlagSlider AxisFlags = 0b1000000000
)

func (AxisFlags) Has

func (a AxisFlags) Has(other AxisFlags) bool

Has returns true if a contains other.

func (AxisFlags) String

func (a AxisFlags) String() string

String returns the names in string for AxisFlags.

type AxisUse

type AxisUse C.gint

AxisUse: enumeration describing the way in which a device axis (valuator) maps onto the predefined valuator types that GTK+ understands.

Note that the X and Y axes are not really needed; pointer devices report their location via the x/y members of events regardless. Whether X and Y are present as axes depends on the GDK backend.

const (
	// AxisIgnore axis is ignored.
	AxisIgnore AxisUse = iota
	// AxisX axis is used as the x axis.
	AxisX
	// AxisY axis is used as the y axis.
	AxisY
	// AxisPressure axis is used for pressure information.
	AxisPressure
	// AxisXtilt axis is used for x tilt information.
	AxisXtilt
	// AxisYtilt axis is used for y tilt information.
	AxisYtilt
	// AxisWheel axis is used for wheel information.
	AxisWheel
	// AxisDistance axis is used for pen/tablet distance information. (Since:
	// 3.22).
	AxisDistance
	// AxisRotation axis is used for pen rotation information. (Since: 3.22).
	AxisRotation
	// AxisSlider axis is used for pen slider information. (Since: 3.22).
	AxisSlider
	// AxisLast: constant equal to the numerically highest axis value.
	AxisLast
)

func (AxisUse) String

func (a AxisUse) String() string

String returns the name in string for AxisUse.

type ByteOrder

type ByteOrder C.gint

ByteOrder: set of values describing the possible byte-orders for storing pixel values in memory.

const (
	// LsbFirst values are stored with the least-significant byte first. For
	// instance, the 32-bit value 0xffeecc would be stored in memory as 0xcc,
	// 0xee, 0xff, 0x00.
	LsbFirst ByteOrder = iota
	// MsbFirst values are stored with the most-significant byte first. For
	// instance, the 32-bit value 0xffeecc would be stored in memory as 0x00,
	// 0xff, 0xee, 0xcc.
	MsbFirst
)

func (ByteOrder) String

func (b ByteOrder) String() string

String returns the name in string for ByteOrder.

type Color deprecated

type Color struct {
	// contains filtered or unexported fields
}

Color is used to describe a color, similar to the XColor struct used in the X11 drawing API.

Deprecated: Use RGBA.

An instance of this type is always passed by reference.

func ColorParse deprecated

func ColorParse(spec string) (*Color, bool)

ColorParse parses a textual specification of a color and fill in the red, green, and blue fields of a Color.

The string can either one of a large set of standard names (taken from the X11 rgb.txt file), or it can be a hexadecimal value in the form “\#rgb” “\#rrggbb”, “\#rrrgggbbb” or “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits of the red, green, and blue components of the color, respectively. (White in the four forms is “\#fff”, “\#ffffff”, “\#fffffffff” and “\#ffffffffffff”).

Deprecated: Use RGBA.

The function takes the following parameters:

  • spec: string specifying the color.

The function returns the following values:

  • color to fill in.
  • ok: TRUE if the parsing succeeded.

func NewColor

func NewColor(pixel uint32, red, green, blue uint16) Color

NewColor creates a new Color instance from the given fields. Beware that this function allocates on the Go heap; be careful when using it!

func (*Color) Blue

func (c *Color) Blue() uint16

Blue: blue component of the color.

func (*Color) Copy deprecated

func (color *Color) Copy() *Color

Copy makes a copy of a Color.

The result must be freed using gdk_color_free().

Deprecated: Use RGBA.

The function returns the following values:

  • ret: copy of color.

func (*Color) Equal deprecated

func (colora *Color) Equal(colorb *Color) bool

Equal compares two colors.

Deprecated: Use RGBA.

The function takes the following parameters:

  • colorb: another Color.

The function returns the following values:

  • ok: TRUE if the two colors compare equal.

func (*Color) Green

func (c *Color) Green() uint16

Green: green component of the color.

func (*Color) Hash deprecated

func (color *Color) Hash() uint

Hash: hash function suitable for using for a hash table that stores Colors.

Deprecated: Use RGBA.

The function returns the following values:

  • guint: hash function applied to color.

func (*Color) Pixel

func (c *Color) Pixel() uint32

Pixel: for allocated colors, the pixel value used to draw this color on the screen. Not used anymore.

func (*Color) Red

func (c *Color) Red() uint16

Red: red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity.

func (*Color) SetBlue

func (c *Color) SetBlue(blue uint16)

Blue: blue component of the color.

func (*Color) SetGreen

func (c *Color) SetGreen(green uint16)

Green: green component of the color.

func (*Color) SetPixel

func (c *Color) SetPixel(pixel uint32)

Pixel: for allocated colors, the pixel value used to draw this color on the screen. Not used anymore.

func (*Color) SetRed

func (c *Color) SetRed(red uint16)

Red: red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity.

func (*Color) String deprecated

func (color *Color) String() string

String returns a textual specification of color in the hexadecimal form “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits representing the red, green and blue components respectively.

The returned string can be parsed by gdk_color_parse().

Deprecated: Use RGBA.

The function returns the following values:

  • utf8: newly-allocated text string.

type CrossingMode

type CrossingMode C.gint

CrossingMode specifies the crossing mode for EventCrossing.

const (
	// CrossingNormal: crossing because of pointer motion.
	CrossingNormal CrossingMode = iota
	// CrossingGrab: crossing because a grab is activated.
	CrossingGrab
	// CrossingUngrab: crossing because a grab is deactivated.
	CrossingUngrab
	// CrossingGTKGrab: crossing because a GTK+ grab is activated.
	CrossingGTKGrab
	// CrossingGTKUngrab: crossing because a GTK+ grab is deactivated.
	CrossingGTKUngrab
	// CrossingStateChanged: crossing because a GTK+ widget changed state (e.g.
	// sensitivity).
	CrossingStateChanged
	// CrossingTouchBegin: crossing because a touch sequence has begun, this
	// event is synthetic as the pointer might have not left the window.
	CrossingTouchBegin
	// CrossingTouchEnd: crossing because a touch sequence has ended, this event
	// is synthetic as the pointer might have not left the window.
	CrossingTouchEnd
	// CrossingDeviceSwitch: crossing because of a device switch (i.e.
	// a mouse taking control of the pointer after a touch device), this event
	// is synthetic as the pointer didn’t leave the window.
	CrossingDeviceSwitch
)

func (CrossingMode) String

func (c CrossingMode) String() string

String returns the name in string for CrossingMode.

type Cursor

type Cursor struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Cursor represents a cursor. Its contents are private.

func BaseCursor

func BaseCursor(obj Cursorrer) *Cursor

BaseCursor returns the underlying base object.

func NewCursor deprecated

func NewCursor(cursorType CursorType) *Cursor

NewCursor creates a new cursor from the set of builtin cursors for the default display. See gdk_cursor_new_for_display().

To make the cursor invisible, use GDK_BLANK_CURSOR.

Deprecated: Use gdk_cursor_new_for_display() instead.

The function takes the following parameters:

  • cursorType: cursor to create.

The function returns the following values:

  • cursor: new Cursor.

func NewCursorForDisplay

func NewCursorForDisplay(display *Display, cursorType CursorType) *Cursor

NewCursorForDisplay creates a new cursor from the set of builtin cursors.

The function takes the following parameters:

  • display for which the cursor will be created.
  • cursorType: cursor to create.

The function returns the following values:

  • cursor (optional): new Cursor, or NULL on failure.

func NewCursorFromName

func NewCursorFromName(display *Display, name string) *Cursor

NewCursorFromName creates a new cursor by looking up name in the current cursor theme.

A recommended set of cursor names that will work across different platforms can be found in the CSS specification:

- "none"

- ! (default_cursor.png) "default"

- ! (help_cursor.png) "help"

- ! (pointer_cursor.png) "pointer"

- ! (context_menu_cursor.png) "context-menu"

- ! (progress_cursor.png) "progress"

- ! (wait_cursor.png) "wait"

- ! (cell_cursor.png) "cell"

- ! (crosshair_cursor.png) "crosshair"

- ! (text_cursor.png) "text"

- ! (vertical_text_cursor.png) "vertical-text"

- ! (alias_cursor.png) "alias"

- ! (copy_cursor.png) "copy"

- ! (no_drop_cursor.png) "no-drop"

- ! (move_cursor.png) "move"

- ! (not_allowed_cursor.png) "not-allowed"

- ! (grab_cursor.png) "grab"

- ! (grabbing_cursor.png) "grabbing"

- ! (all_scroll_cursor.png) "all-scroll"

- ! (col_resize_cursor.png) "col-resize"

- ! (row_resize_cursor.png) "row-resize"

- ! (n_resize_cursor.png) "n-resize"

- ! (e_resize_cursor.png) "e-resize"

- ! (s_resize_cursor.png) "s-resize"

- ! (w_resize_cursor.png) "w-resize"

- ! (ne_resize_cursor.png) "ne-resize"

- ! (nw_resize_cursor.png) "nw-resize"

- ! (sw_resize_cursor.png) "sw-resize"

- ! (se_resize_cursor.png) "se-resize"

- ! (ew_resize_cursor.png) "ew-resize"

- ! (ns_resize_cursor.png) "ns-resize"

- ! (nesw_resize_cursor.png) "nesw-resize"

- ! (nwse_resize_cursor.png) "nwse-resize"

- ! (zoom_in_cursor.png) "zoom-in"

- ! (zoom_out_cursor.png) "zoom-out".

The function takes the following parameters:

  • display for which the cursor will be created.
  • name of the cursor.

The function returns the following values:

  • cursor (optional): new Cursor, or NULL if there is no cursor with the given name.

func NewCursorFromPixbuf

func NewCursorFromPixbuf(display *Display, pixbuf *gdkpixbuf.Pixbuf, x, y int) *Cursor

NewCursorFromPixbuf creates a new cursor from a pixbuf.

Not all GDK backends support RGBA cursors. If they are not supported, a monochrome approximation will be displayed. The functions gdk_display_supports_cursor_alpha() and gdk_display_supports_cursor_color() can be used to determine whether RGBA cursors are supported; gdk_display_get_default_cursor_size() and gdk_display_get_maximal_cursor_size() give information about cursor sizes.

If x or y are -1, the pixbuf must have options named “x_hot” and “y_hot”, resp., containing integer values between 0 and the width resp. height of the pixbuf. (Since: 3.0)

On the X backend, support for RGBA cursors requires a sufficently new version of the X Render extension.

The function takes the following parameters:

  • display for which the cursor will be created.
  • pixbuf containing the cursor image.
  • x: horizontal offset of the “hotspot” of the cursor.
  • y: vertical offset of the “hotspot” of the cursor.

The function returns the following values:

  • cursor: new Cursor.

func NewCursorFromSurface

func NewCursorFromSurface(display *Display, surface *cairo.Surface, x, y float64) *Cursor

NewCursorFromSurface creates a new cursor from a cairo image surface.

Not all GDK backends support RGBA cursors. If they are not supported, a monochrome approximation will be displayed. The functions gdk_display_supports_cursor_alpha() and gdk_display_supports_cursor_color() can be used to determine whether RGBA cursors are supported; gdk_display_get_default_cursor_size() and gdk_display_get_maximal_cursor_size() give information about cursor sizes.

On the X backend, support for RGBA cursors requires a sufficently new version of the X Render extension.

The function takes the following parameters:

  • display for which the cursor will be created.
  • surface: cairo image surface containing the cursor pixel data.
  • x: horizontal offset of the “hotspot” of the cursor.
  • y: vertical offset of the “hotspot” of the cursor.

The function returns the following values:

  • cursor: new Cursor.

func (*Cursor) CursorType

func (cursor *Cursor) CursorType() CursorType

CursorType returns the cursor type for this cursor.

The function returns the following values:

  • cursorType: CursorType.

func (*Cursor) Display

func (cursor *Cursor) Display() *Display

Display returns the display on which the Cursor is defined.

The function returns the following values:

  • display associated to cursor.

func (*Cursor) Image

func (cursor *Cursor) Image() *gdkpixbuf.Pixbuf

Image returns a Pixbuf with the image used to display the cursor.

Note that depending on the capabilities of the windowing system and on the cursor, GDK may not be able to obtain the image data. In this case, NULL is returned.

The function returns the following values:

  • pixbuf (optional) representing cursor, or NULL.

func (*Cursor) Surface

func (cursor *Cursor) Surface() (xHot, yHot float64, surface *cairo.Surface)

Surface returns a cairo image surface with the image used to display the cursor.

Note that depending on the capabilities of the windowing system and on the cursor, GDK may not be able to obtain the image data. In this case, NULL is returned.

The function returns the following values:

  • xHot (optional): location to store the hotspot x position, or NULL.
  • yHot (optional): location to store the hotspot y position, or NULL.
  • surface (optional): #cairo_surface_t representing cursor, or NULL.

type CursorType

type CursorType C.gint

CursorType: predefined cursors.

Note that these IDs are directly taken from the X cursor font, and many of these cursors are either not useful, or are not available on other platforms.

The recommended way to create cursors is to use gdk_cursor_new_from_name().

const (
	// XCursor: ! (X_cursor.png).
	XCursor CursorType = 0
	// Arrow: ! (arrow.png).
	Arrow CursorType = 2
	// BasedArrowDown: ! (based_arrow_down.png).
	BasedArrowDown CursorType = 4
	// BasedArrowUp: ! (based_arrow_up.png).
	BasedArrowUp CursorType = 6
	// Boat: ! (boat.png).
	Boat CursorType = 8
	// Bogosity: ! (bogosity.png).
	Bogosity CursorType = 10
	// BottomLeftCorner: ! (bottom_left_corner.png).
	BottomLeftCorner CursorType = 12
	// BottomRightCorner: ! (bottom_right_corner.png).
	BottomRightCorner CursorType = 14
	// BottomSide: ! (bottom_side.png).
	BottomSide CursorType = 16
	// BottomTee: ! (bottom_tee.png).
	BottomTee CursorType = 18
	// BoxSpiral: ! (box_spiral.png).
	BoxSpiral CursorType = 20
	// CenterPtr: ! (center_ptr.png).
	CenterPtr CursorType = 22
	// Circle: ! (circle.png).
	Circle CursorType = 24
	// Clock: ! (clock.png).
	Clock CursorType = 26
	// CoffeeMug: ! (coffee_mug.png).
	CoffeeMug CursorType = 28
	// Cross: ! (cross.png).
	Cross CursorType = 30
	// CrossReverse: ! (cross_reverse.png).
	CrossReverse CursorType = 32
	// Crosshair: ! (crosshair.png).
	Crosshair CursorType = 34
	// DiamondCross: ! (diamond_cross.png).
	DiamondCross CursorType = 36
	// Dot: ! (dot.png).
	Dot CursorType = 38
	// Dotbox: ! (dotbox.png).
	Dotbox CursorType = 40
	// DoubleArrow: ! (double_arrow.png).
	DoubleArrow CursorType = 42
	// DraftLarge: ! (draft_large.png).
	DraftLarge CursorType = 44
	// DraftSmall: ! (draft_small.png).
	DraftSmall CursorType = 46
	// DrapedBox: ! (draped_box.png).
	DrapedBox CursorType = 48
	// Exchange: ! (exchange.png).
	Exchange CursorType = 50
	// Fleur: ! (fleur.png).
	Fleur CursorType = 52
	// Gobbler: ! (gobbler.png).
	Gobbler CursorType = 54
	// Gumby: ! (gumby.png).
	Gumby CursorType = 56
	// Hand1: ! (hand1.png).
	Hand1 CursorType = 58
	// Hand2: ! (hand2.png).
	Hand2 CursorType = 60
	// Heart: ! (heart.png).
	Heart CursorType = 62
	// Icon: ! (icon.png).
	Icon CursorType = 64
	// IronCross: ! (iron_cross.png).
	IronCross CursorType = 66
	// LeftPtr: ! (left_ptr.png).
	LeftPtr CursorType = 68
	// LeftSide: ! (left_side.png).
	LeftSide CursorType = 70
	// LeftTee: ! (left_tee.png).
	LeftTee CursorType = 72
	// Leftbutton: ! (leftbutton.png).
	Leftbutton CursorType = 74
	// LlAngle: ! (ll_angle.png).
	LlAngle CursorType = 76
	// LrAngle: ! (lr_angle.png).
	LrAngle CursorType = 78
	// Man: ! (man.png).
	Man CursorType = 80
	// Middlebutton: ! (middlebutton.png).
	Middlebutton CursorType = 82
	// Mouse: ! (mouse.png).
	Mouse CursorType = 84
	// Pencil: ! (pencil.png).
	Pencil CursorType = 86
	// Pirate: ! (pirate.png).
	Pirate CursorType = 88
	// Plus: ! (plus.png).
	Plus CursorType = 90
	// QuestionArrow: ! (question_arrow.png).
	QuestionArrow CursorType = 92
	// RightPtr: ! (right_ptr.png).
	RightPtr CursorType = 94
	// RightSide: ! (right_side.png).
	RightSide CursorType = 96
	// RightTee: ! (right_tee.png).
	RightTee CursorType = 98
	// Rightbutton: ! (rightbutton.png).
	Rightbutton CursorType = 100
	RTLLogo CursorType = 102
	// Sailboat: ! (sailboat.png).
	Sailboat CursorType = 104
	// SbDownArrow: ! (sb_down_arrow.png).
	SbDownArrow CursorType = 106
	// SbHDoubleArrow: ! (sb_h_double_arrow.png).
	SbHDoubleArrow CursorType = 108
	// SbLeftArrow: ! (sb_left_arrow.png).
	SbLeftArrow CursorType = 110
	// SbRightArrow: ! (sb_right_arrow.png).
	SbRightArrow CursorType = 112
	// SbUpArrow: ! (sb_up_arrow.png).
	SbUpArrow CursorType = 114
	// SbVDoubleArrow: ! (sb_v_double_arrow.png).
	SbVDoubleArrow CursorType = 116
	// Shuttle: ! (shuttle.png).
	Shuttle CursorType = 118
	// Sizing: ! (sizing.png).
	Sizing CursorType = 120
	// Spider: ! (spider.png).
	Spider CursorType = 122
	// Spraycan: ! (spraycan.png).
	Spraycan CursorType = 124
	// Star: ! (star.png).
	Star CursorType = 126
	// Target: ! (target.png).
	Target CursorType = 128
	// Tcross: ! (tcross.png).
	Tcross CursorType = 130
	// TopLeftArrow: ! (top_left_arrow.png).
	TopLeftArrow CursorType = 132
	// TopLeftCorner: ! (top_left_corner.png).
	TopLeftCorner CursorType = 134
	// TopRightCorner: ! (top_right_corner.png).
	TopRightCorner CursorType = 136
	// TopSide: ! (top_side.png).
	TopSide CursorType = 138
	// TopTee: ! (top_tee.png).
	TopTee CursorType = 140
	// Trek: ! (trek.png).
	Trek CursorType = 142
	// UlAngle: ! (ul_angle.png).
	UlAngle CursorType = 144
	// Umbrella: ! (umbrella.png).
	Umbrella CursorType = 146
	// UrAngle: ! (ur_angle.png).
	UrAngle CursorType = 148
	// Watch: ! (watch.png).
	Watch CursorType = 150
	// Xterm: ! (xterm.png).
	Xterm CursorType = 152
	// LastCursor: last cursor type.
	LastCursor CursorType = 153
	// BlankCursor: blank cursor. Since 2.16.
	BlankCursor CursorType = -2
	// CursorIsPixmap: type of cursors constructed with
	// gdk_cursor_new_from_pixbuf().
	CursorIsPixmap CursorType = -1
)

func (CursorType) String

func (c CursorType) String() string

String returns the name in string for CursorType.

type Cursorrer

type Cursorrer interface {
	coreglib.Objector
	// contains filtered or unexported methods
}

Cursorrer describes types inherited from class Cursor.

To get the original type, the caller must assert this to an interface or another type.

type Device

type Device struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Device object represents a single input device, such as a keyboard, a mouse, a touchpad, etc.

See the DeviceManager documentation for more information about the various kinds of master and slave devices, and their relationships.

func BaseDevice

func BaseDevice(obj Devicer) *Device

BaseDevice returns the underlying base object.

func (*Device) AssociatedDevice

func (device *Device) AssociatedDevice() Devicer

AssociatedDevice returns the associated device to device, if device is of type GDK_DEVICE_TYPE_MASTER, it will return the paired pointer or keyboard.

If device is of type GDK_DEVICE_TYPE_SLAVE, it will return the master device to which device is attached to.

If device is of type GDK_DEVICE_TYPE_FLOATING, NULL will be returned, as there is no associated device.

The function returns the following values:

  • ret (optional): associated device, or NULL.

func (*Device) Axes

func (device *Device) Axes() AxisFlags

Axes returns the axes currently available on the device.

The function returns the following values:

func (*Device) AxisUse

func (device *Device) AxisUse(index_ uint) AxisUse

AxisUse returns the axis use for index_.

The function takes the following parameters:

  • index_: index of the axis.

The function returns the following values:

  • axisUse specifying how the axis is used.

func (*Device) ConnectChanged

func (device *Device) ConnectChanged(f func()) coreglib.SignalHandle

ConnectChanged signal is emitted either when the Device has changed the number of either axes or keys. For example In X this will normally happen when the slave device routing events through the master device changes (for example, user switches from the USB mouse to a tablet), in that case the master device will change to reflect the new slave device axes and keys.

func (*Device) ConnectToolChanged

func (device *Device) ConnectToolChanged(f func(tool *DeviceTool)) coreglib.SignalHandle

ConnectToolChanged signal is emitted on pen/eraser Devices whenever tools enter or leave proximity.

func (*Device) DeviceType

func (device *Device) DeviceType() DeviceType

DeviceType returns the device type for device.

The function returns the following values:

  • deviceType for device.

func (*Device) Display

func (device *Device) Display() *Display

Display returns the Display to which device pertains.

The function returns the following values:

  • display This memory is owned by GTK+, and must not be freed or unreffed.

func (*Device) Grab deprecated

func (device *Device) Grab(window Windower, grabOwnership GrabOwnership, ownerEvents bool, eventMask EventMask, cursor Cursorrer, time_ uint32) GrabStatus

Grab grabs the device so that all events coming from this device are passed to this application until the device is ungrabbed with gdk_device_ungrab(), or the window becomes unviewable. This overrides any previous grab on the device by this client.

Note that device and window need to be on the same display.

Device grabs are used for operations which need complete control over the given device events (either pointer or keyboard). For example in GTK+ this is used for Drag and Drop operations, popup menus and such.

Note that if the event mask of an X window has selected both button press and button release events, then a button press event will cause an automatic pointer grab until the button is released. X does this automatically since most applications expect to receive button press and release events in pairs. It is equivalent to a pointer grab on the window with owner_events set to TRUE.

If you set up anything at the time you take the grab that needs to be cleaned up when the grab ends, you should handle the EventGrabBroken events that are emitted when the grab ends unvoluntarily.

Deprecated: Use gdk_seat_grab() instead.

The function takes the following parameters:

  • window which will own the grab (the grab window).
  • grabOwnership specifies the grab ownership.
  • ownerEvents: if FALSE then all device events are reported with respect to window and are only reported if selected by event_mask. If TRUE then pointer events for this application are reported as normal, but pointer events outside this application are reported with respect to window and only if selected by event_mask. In either mode, unreported events are discarded.
  • eventMask specifies the event mask, which is used in accordance with owner_events.
  • cursor (optional) to display while the grab is active if the device is a pointer. If this is NULL then the normal cursors are used for window and its descendants, and the cursor for window is used elsewhere.
  • time_: timestamp of the event which led to this pointer grab. This usually comes from the Event struct, though GDK_CURRENT_TIME can be used if the time isn’t known.

The function returns the following values:

  • grabStatus: GDK_GRAB_SUCCESS if the grab was successful.

func (*Device) HasCursor

func (device *Device) HasCursor() bool

HasCursor determines whether the pointer follows device motion. This is not meaningful for keyboard devices, which don't have a pointer.

The function returns the following values:

  • ok: TRUE if the pointer follows device motion.

func (*Device) Key

func (device *Device) Key(index_ uint) (uint, ModifierType, bool)

Key: if index_ has a valid keyval, this function will return TRUE and fill in keyval and modifiers with the keyval settings.

The function takes the following parameters:

  • index_: index of the macro button to get.

The function returns the following values:

  • keyval: return value for the keyval.
  • modifiers: return value for modifiers.
  • ok: TRUE if keyval is set for index.

func (*Device) LastEventWindow

func (device *Device) LastEventWindow() Windower

LastEventWindow gets information about which window the given pointer device is in, based on events that have been received so far from the display server. If another application has a pointer grab, or this application has a grab with owner_events = FALSE, NULL may be returned even if the pointer is physically over one of this application's windows.

The function returns the following values:

  • window (optional): last window the device.

func (*Device) ListSlaveDevices

func (device *Device) ListSlaveDevices() []Devicer

ListSlaveDevices: if the device if of type GDK_DEVICE_TYPE_MASTER, it will return the list of slave devices attached to it, otherwise it will return NULL.

The function returns the following values:

  • list (optional): the list of slave devices, or NULL. The list must be freed with g_list_free(), the contents of the list are owned by GTK+ and should not be freed.

func (*Device) Mode

func (device *Device) Mode() InputMode

Mode determines the mode of the device.

The function returns the following values:

  • inputMode: InputSource.

func (*Device) NAxes

func (device *Device) NAxes() int

NAxes returns the number of axes the device currently has.

The function returns the following values:

  • gint: number of axes.

func (*Device) NKeys

func (device *Device) NKeys() int

NKeys returns the number of keys the device currently has.

The function returns the following values:

  • gint: number of keys.

func (*Device) Name

func (device *Device) Name() string

Name determines the name of the device.

The function returns the following values:

  • utf8: name.

func (*Device) Position

func (device *Device) Position() (screen *Screen, x, y int)

Position gets the current location of device. As a slave device coordinates are those of its master pointer, This function may not be called on devices of type GDK_DEVICE_TYPE_SLAVE, unless there is an ongoing grab on them, see gdk_device_grab().

The function returns the following values:

  • screen (optional): location to store the Screen the device is on, or NULL.
  • x (optional): location to store root window X coordinate of device, or NULL.
  • y (optional): location to store root window Y coordinate of device, or NULL.

func (*Device) PositionDouble

func (device *Device) PositionDouble() (screen *Screen, x, y float64)

PositionDouble gets the current location of device in double precision. As a slave device's coordinates are those of its master pointer, this function may not be called on devices of type GDK_DEVICE_TYPE_SLAVE, unless there is an ongoing grab on them. See gdk_device_grab().

The function returns the following values:

  • screen (optional): location to store the Screen the device is on, or NULL.
  • x (optional): location to store root window X coordinate of device, or NULL.
  • y (optional): location to store root window Y coordinate of device, or NULL.

func (*Device) ProductID

func (device *Device) ProductID() string

ProductID returns the product ID of this device, or NULL if this information couldn't be obtained. This ID is retrieved from the device, and is thus constant for it. See gdk_device_get_vendor_id() for more information.

The function returns the following values:

  • utf8 (optional): product ID, or NULL.

func (*Device) Seat

func (device *Device) Seat() Seater

Seat returns the Seat the device belongs to.

The function returns the following values:

  • seat This memory is owned by GTK+ and must not be freed.

func (*Device) SetAxisUse

func (device *Device) SetAxisUse(index_ uint, use AxisUse)

SetAxisUse specifies how an axis of a device is used.

The function takes the following parameters:

  • index_: index of the axis.
  • use specifies how the axis is used.

func (*Device) SetKey

func (device *Device) SetKey(index_, keyval uint, modifiers ModifierType)

SetKey specifies the X key event to generate when a macro button of a device is pressed.

The function takes the following parameters:

  • index_: index of the macro button to set.
  • keyval to generate.
  • modifiers to set.

func (*Device) SetMode

func (device *Device) SetMode(mode InputMode) bool

SetMode sets a the mode of an input device. The mode controls if the device is active and whether the device’s range is mapped to the entire screen or to a single window.

Note: This is only meaningful for floating devices, master devices (and slaves connected to these) drive the pointer cursor, which is not limited by the input mode.

The function takes the following parameters:

  • mode: input mode.

The function returns the following values:

  • ok: TRUE if the mode was successfully changed.

func (*Device) Source

func (device *Device) Source() InputSource

Source determines the type of the device.

The function returns the following values:

  • inputSource: InputSource.

func (*Device) Ungrab deprecated

func (device *Device) Ungrab(time_ uint32)

Ungrab: release any grab on device.

Deprecated: Use gdk_seat_ungrab() instead.

The function takes the following parameters:

  • time_: timestap (e.g. GDK_CURRENT_TIME).

func (*Device) VendorID

func (device *Device) VendorID() string

VendorID returns the vendor ID of this device, or NULL if this information couldn't be obtained. This ID is retrieved from the device, and is thus constant for it.

This function, together with gdk_device_get_product_id(), can be used to eg. compose #GSettings paths to store settings for this device.

static GSettings *
get_device_settings (GdkDevice *device)
{
  const gchar *vendor, *product;
  GSettings *settings;
  GdkDevice *device;
  gchar *path;

  vendor = gdk_device_get_vendor_id (device);
  product = gdk_device_get_product_id (device);

  path = g_strdup_printf ("/org/example/app/devices/s:s/", vendor, product);
  settings = g_settings_new_with_path (DEVICE_SCHEMA, path);
  g_free (path);

  return settings;
}.

The function returns the following values:

  • utf8 (optional): vendor ID, or NULL.

func (*Device) Warp

func (device *Device) Warp(screen *Screen, x, y int)

Warp warps device in display to the point x,y on the screen screen, unless the device is confined to a window by a grab, in which case it will be moved as far as allowed by the grab. Warping the pointer creates events as if the user had moved the mouse instantaneously to the destination.

Note that the pointer should normally be under the control of the user. This function was added to cover some rare use cases like keyboard navigation support for the color picker in the ColorSelectionDialog.

The function takes the following parameters:

  • screen to warp device to.
  • x: x coordinate of the destination.
  • y: y coordinate of the destination.

func (*Device) WindowAtPosition

func (device *Device) WindowAtPosition() (winX, winY int, window Windower)

WindowAtPosition obtains the window underneath device, returning the location of the device in win_x and win_y. Returns NULL if the window tree under device is not known to GDK (for example, belongs to another application).

As a slave device coordinates are those of its master pointer, This function may not be called on devices of type GDK_DEVICE_TYPE_SLAVE, unless there is an ongoing grab on them, see gdk_device_grab().

The function returns the following values:

  • winX (optional): return location for the X coordinate of the device location, relative to the window origin, or NULL.
  • winY (optional): return location for the Y coordinate of the device location, relative to the window origin, or NULL.
  • window (optional) under the device position, or NULL.

func (*Device) WindowAtPositionDouble

func (device *Device) WindowAtPositionDouble() (winX, winY float64, window Windower)

WindowAtPositionDouble obtains the window underneath device, returning the location of the device in win_x and win_y in double precision. Returns NULL if the window tree under device is not known to GDK (for example, belongs to another application).

As a slave device coordinates are those of its master pointer, This function may not be called on devices of type GDK_DEVICE_TYPE_SLAVE, unless there is an ongoing grab on them, see gdk_device_grab().

The function returns the following values:

  • winX (optional): return location for the X coordinate of the device location, relative to the window origin, or NULL.
  • winY (optional): return location for the Y coordinate of the device location, relative to the window origin, or NULL.
  • window (optional) under the device position, or NULL.

type DeviceManager

type DeviceManager struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

DeviceManager: in addition to a single pointer and keyboard for user interface input, GDK contains support for a variety of input devices, including graphics tablets, touchscreens and multiple pointers/keyboards interacting simultaneously with the user interface. Such input devices often have additional features, such as sub-pixel positioning information and additional device-dependent information.

In order to query the device hierarchy and be aware of changes in the device hierarchy (such as virtual devices being created or removed, or physical devices being plugged or unplugged), GDK provides DeviceManager.

By default, and if the platform supports it, GDK is aware of multiple keyboard/pointer pairs and multitouch devices. This behavior can be changed by calling gdk_disable_multidevice() before gdk_display_open(). There should rarely be a need to do that though, since GDK defaults to a compatibility mode in which it will emit just one enter/leave event pair for all devices on a window. To enable per-device enter/leave events and other multi-pointer interaction features, gdk_window_set_support_multidevice() must be called on Windows (or gtk_widget_set_support_multidevice() on widgets). window. See the gdk_window_set_support_multidevice() documentation for more information.

On X11, multi-device support is implemented through XInput 2. Unless gdk_disable_multidevice() is called, the XInput 2 DeviceManager implementation will be used as the input source. Otherwise either the core or XInput 1 implementations will be used.

For simple applications that don’t have any special interest in input devices, the so-called “client pointer” provides a reasonable approximation to a simple setup with a single pointer and keyboard. The device that has been set as the client pointer can be accessed via gdk_device_manager_get_client_pointer().

Conceptually, in multidevice mode there are 2 device types. Virtual devices (or master devices) are represented by the pointer cursors and keyboard foci that are seen on the screen. Physical devices (or slave devices) represent the hardware that is controlling the virtual devices, and thus have no visible cursor on the screen.

Virtual devices are always paired, so there is a keyboard device for every pointer device. Associations between devices may be inspected through gdk_device_get_associated_device().

There may be several virtual devices, and several physical devices could be controlling each of these virtual devices. Physical devices may also be “floating”, which means they are not attached to any virtual device.

Master and slave devices

carlossacarino:~$ xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Wacom ISDv4 E6 Pen stylus                 id=10   [slave  pointer  (2)]
⎜   ↳ Wacom ISDv4 E6 Finger touch               id=11   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=13   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=14   [slave  pointer  (2)]
⎜   ↳ Wacom ISDv4 E6 Pen eraser                 id=16   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ Integrated Camera                         id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=15   [slave  keyboard (3)]

By default, GDK will automatically listen for events coming from all master devices, setting the Device for all events coming from input devices. Events containing device information are K_MOTION_NOTIFY, K_BUTTON_PRESS, K_2BUTTON_PRESS, K_3BUTTON_PRESS, K_BUTTON_RELEASE, K_SCROLL, K_KEY_PRESS, K_KEY_RELEASE, K_ENTER_NOTIFY, K_LEAVE_NOTIFY, K_FOCUS_CHANGE, K_PROXIMITY_IN, K_PROXIMITY_OUT, K_DRAG_ENTER, K_DRAG_LEAVE, K_DRAG_MOTION, K_DRAG_STATUS, K_DROP_START, K_DROP_FINISHED and K_GRAB_BROKEN. When dealing with an event on a master device, it is possible to get the source (slave) device that the event originated from via gdk_event_get_source_device().

On a standard session, all physical devices are connected by default to the "Virtual Core Pointer/Keyboard" master devices, hence routing all events through these. This behavior is only modified by device grabs, where the slave device is temporarily detached for as long as the grab is held, and more permanently by user modifications to the device hierarchy.

On certain application specific setups, it may make sense to detach a physical device from its master pointer, and mapping it to an specific window. This can be achieved by the combination of gdk_device_grab() and gdk_device_set_mode().

In order to listen for events coming from devices other than a virtual device, gdk_window_set_device_events() must be called. Generally, this function can be used to modify the event mask for any given device.

Input devices may also provide additional information besides X/Y. For example, graphics tablets may also provide pressure and X/Y tilt information. This information is device-dependent, and may be queried through gdk_device_get_axis(). In multidevice mode, virtual devices will change axes in order to always represent the physical device that is routing events through it. Whenever the physical device changes, the Device:n-axes property will be notified, and gdk_device_list_axes() will return the new device axes.

Devices may also have associated “keys” or macro buttons. Such keys can be globally set to map into normal X keyboard events. The mapping is set using gdk_device_set_key().

In GTK+ 3.20, a new Seat object has been introduced that supersedes DeviceManager and should be preferred in newly written code.

func BaseDeviceManager

func BaseDeviceManager(obj DeviceManagerer) *DeviceManager

BaseDeviceManager returns the underlying base object.

func (*DeviceManager) ClientPointer deprecated

func (deviceManager *DeviceManager) ClientPointer() Devicer

ClientPointer returns the client pointer, that is, the master pointer that acts as the core pointer for this application. In X11, window managers may change this depending on the interaction pattern under the presence of several pointers.

You should use this function seldomly, only in code that isn’t triggered by a Event and there aren’t other means to get a meaningful Device to operate on.

Deprecated: Use gdk_seat_get_pointer() instead.

The function returns the following values:

  • device: client pointer. This memory is owned by GDK and must not be freed or unreferenced.

func (*DeviceManager) ConnectDeviceAdded

func (deviceManager *DeviceManager) ConnectDeviceAdded(f func(device Devicer)) coreglib.SignalHandle

ConnectDeviceAdded signal is emitted either when a new master pointer is created, or when a slave (Hardware) input device is plugged in.

func (*DeviceManager) ConnectDeviceChanged

func (deviceManager *DeviceManager) ConnectDeviceChanged(f func(device Devicer)) coreglib.SignalHandle

ConnectDeviceChanged signal is emitted whenever a device has changed in the hierarchy, either slave devices being disconnected from their master device or connected to another one, or master devices being added or removed a slave device.

If a slave device is detached from all master devices (gdk_device_get_associated_device() returns NULL), its DeviceType will change to GDK_DEVICE_TYPE_FLOATING, if it's attached, it will change to GDK_DEVICE_TYPE_SLAVE.

func (*DeviceManager) ConnectDeviceRemoved

func (deviceManager *DeviceManager) ConnectDeviceRemoved(f func(device Devicer)) coreglib.SignalHandle

ConnectDeviceRemoved signal is emitted either when a master pointer is removed, or when a slave (Hardware) input device is unplugged.

func (*DeviceManager) Display

func (deviceManager *DeviceManager) Display() *Display

Display gets the Display associated to device_manager.

The function returns the following values:

  • display (optional) to which device_manager is associated to, or NULL. This memory is owned by GDK and must not be freed or unreferenced.

func (*DeviceManager) ListDevices deprecated

func (deviceManager *DeviceManager) ListDevices(typ DeviceType) []Devicer

ListDevices returns the list of devices of type type currently attached to device_manager.

Deprecated: , use gdk_seat_get_pointer(), gdk_seat_get_keyboard() and gdk_seat_get_slaves() instead.

The function takes the following parameters:

  • typ: device type to get.

The function returns the following values:

  • list of Devices. The returned list must be freed with g_list_free (). The list elements are owned by GTK+ and must not be freed or unreffed.

type DeviceManagerer

type DeviceManagerer interface {
	coreglib.Objector
	// contains filtered or unexported methods
}

DeviceManagerer describes types inherited from class DeviceManager.

To get the original type, the caller must assert this to an interface or another type.

type DevicePad

type DevicePad struct {
	Device
	// contains filtered or unexported fields
}

DevicePad is an interface implemented by devices of type GDK_SOURCE_TABLET_PAD, it allows querying the features provided by the pad device.

Tablet pads may contain one or more groups, each containing a subset of the buttons/rings/strips available. gdk_device_pad_get_n_groups() can be used to obtain the number of groups, gdk_device_pad_get_n_features() and gdk_device_pad_get_feature_group() can be combined to find out the number of buttons/rings/strips the device has, and how are they grouped.

Each of those groups have different modes, which may be used to map each individual pad feature to multiple actions. Only one mode is effective (current) for each given group, different groups may have different current modes. The number of available modes in a group can be found out through gdk_device_pad_get_group_n_modes(), and the current mode for a given group will be notified through the EventPadGroupMode event.

DevicePad wraps an interface. This means the user can get the underlying type by calling Cast().

func (*DevicePad) FeatureGroup

func (pad *DevicePad) FeatureGroup(feature DevicePadFeature, featureIdx int) int

FeatureGroup returns the group the given feature and idx belong to, or -1 if feature/index do not exist in pad.

The function takes the following parameters:

  • feature type to get the group from.
  • featureIdx: index of the feature to get the group from.

The function returns the following values:

  • gint: group number of the queried pad feature.

func (*DevicePad) GroupNModes

func (pad *DevicePad) GroupNModes(groupIdx int) int

GroupNModes returns the number of modes that group may have.

The function takes the following parameters:

  • groupIdx: group to get the number of available modes from.

The function returns the following values:

  • gint: number of modes available in group.

func (*DevicePad) NFeatures

func (pad *DevicePad) NFeatures(feature DevicePadFeature) int

NFeatures returns the number of features a tablet pad has.

The function takes the following parameters:

  • feature: pad feature.

The function returns the following values:

  • gint: amount of elements of type feature that this pad has.

func (*DevicePad) NGroups

func (pad *DevicePad) NGroups() int

NGroups returns the number of groups this pad device has. Pads have at least one group. A pad group is a subcollection of buttons/strip/rings that is affected collectively by a same current mode.

The function returns the following values:

  • gint: number of button/ring/strip groups in the pad.

type DevicePadFeature

type DevicePadFeature C.gint

DevicePadFeature: pad feature.

const (
	// DevicePadFeatureButton: button.
	DevicePadFeatureButton DevicePadFeature = iota
	// DevicePadFeatureRing: ring-shaped interactive area.
	DevicePadFeatureRing
	// DevicePadFeatureStrip: straight interactive area.
	DevicePadFeatureStrip
)

func (DevicePadFeature) String

func (d DevicePadFeature) String() string

String returns the name in string for DevicePadFeature.

type DevicePadder

type DevicePadder interface {
	coreglib.Objector

	// FeatureGroup returns the group the given feature and idx belong to,
	// or -1 if feature/index do not exist in pad.
	FeatureGroup(feature DevicePadFeature, featureIdx int) int
	// GroupNModes returns the number of modes that group may have.
	GroupNModes(groupIdx int) int
	// NFeatures returns the number of features a tablet pad has.
	NFeatures(feature DevicePadFeature) int
	// NGroups returns the number of groups this pad device has.
	NGroups() int
}

DevicePadder describes DevicePad's interface methods.

type DeviceTool

type DeviceTool struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

func (*DeviceTool) HardwareID

func (tool *DeviceTool) HardwareID() uint64

HardwareID gets the hardware ID of this tool, or 0 if it's not known. When non-zero, the identificator is unique for the given tool model, meaning that two identical tools will share the same hardware_id, but will have different serial numbers (see gdk_device_tool_get_serial()).

This is a more concrete (and device specific) method to identify a DeviceTool than gdk_device_tool_get_tool_type(), as a tablet may support multiple devices with the same DeviceToolType, but having different hardware identificators.

The function returns the following values:

  • guint64: hardware identificator of this tool.

func (*DeviceTool) Serial

func (tool *DeviceTool) Serial() uint64

Serial gets the serial of this tool, this value can be used to identify a physical tool (eg. a tablet pen) across program executions.

The function returns the following values:

  • guint64: serial ID for this tool.

func (*DeviceTool) ToolType

func (tool *DeviceTool) ToolType() DeviceToolType

ToolType gets the DeviceToolType of the tool.

The function returns the following values:

  • deviceToolType: physical type for this tool. This can be used to figure out what sort of pen is being used, such as an airbrush or a pencil.

type DeviceToolType

type DeviceToolType C.gint

DeviceToolType indicates the specific type of tool being used being a tablet. Such as an airbrush, pencil, etc.

const (
	// DeviceToolTypeUnknown: tool is of an unknown type.
	DeviceToolTypeUnknown DeviceToolType = iota
	// DeviceToolTypePen: tool is a standard tablet stylus.
	DeviceToolTypePen
	// DeviceToolTypeEraser: tool is standard tablet eraser.
	DeviceToolTypeEraser
	// DeviceToolTypeBrush: tool is a brush stylus.
	DeviceToolTypeBrush
	// DeviceToolTypePencil: tool is a pencil stylus.
	DeviceToolTypePencil
	// DeviceToolTypeAirbrush: tool is an airbrush stylus.
	DeviceToolTypeAirbrush
	// DeviceToolTypeMouse: tool is a mouse.
	DeviceToolTypeMouse
	// DeviceToolTypeLens: tool is a lens cursor.
	DeviceToolTypeLens
)

func (DeviceToolType) String

func (d DeviceToolType) String() string

String returns the name in string for DeviceToolType.

type DeviceType

type DeviceType C.gint

DeviceType indicates the device type. See [above][GdkDeviceManager.description] for more information about the meaning of these device types.

const (
	// DeviceTypeMaster: device is a master (or virtual) device. There will be
	// an associated focus indicator on the screen.
	DeviceTypeMaster DeviceType = iota
	// DeviceTypeSlave: device is a slave (or physical) device.
	DeviceTypeSlave
	// DeviceTypeFloating: device is a physical device, currently not attached
	// to any virtual device.
	DeviceTypeFloating
)

func (DeviceType) String

func (d DeviceType) String() string

String returns the name in string for DeviceType.

type Devicer

type Devicer interface {
	coreglib.Objector
	// contains filtered or unexported methods
}

Devicer describes types inherited from class Device.

To get the original type, the caller must assert this to an interface or another type.

type Display

type Display struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Display objects purpose are two fold:

- To manage and provide information about input devices (pointers and keyboards)

- To manage and provide information about the available Screens

GdkDisplay objects are the GDK representation of an X Display, which can be described as a workstation consisting of a keyboard, a pointing device (such as a mouse) and one or more screens. It is used to open and keep track of various GdkScreen objects currently instantiated by the application. It is also used to access the keyboard(s) and mouse pointer(s) of the display.

Most of the input device handling has been factored out into the separate DeviceManager object. Every display has a device manager, which you can obtain using gdk_display_get_device_manager().

func DisplayGetDefault

func DisplayGetDefault() *Display

DisplayGetDefault gets the default Display. This is a convenience function for: gdk_display_manager_get_default_display (gdk_display_manager_get ()).

The function returns the following values:

  • display (optional) or NULL if there is no default display.

func DisplayOpen

func DisplayOpen(displayName string) *Display

DisplayOpen opens a display.

The function takes the following parameters:

  • displayName: name of the display to open.

The function returns the following values:

  • display (optional) or NULL if the display could not be opened.

func DisplayOpenDefaultLibgtkOnly deprecated

func DisplayOpenDefaultLibgtkOnly() *Display

DisplayOpenDefaultLibgtkOnly opens the default display specified by command line arguments or environment variables, sets it as the default display, and returns it. gdk_parse_args() must have been called first. If the default display has previously been set, simply returns that. An internal function that should not be used by applications.

Deprecated: This symbol was never meant to be used outside of GTK+.

The function returns the following values:

  • display (optional): default display, if it could be opened, otherwise NULL.

func (*Display) AppLaunchContext

func (display *Display) AppLaunchContext() *AppLaunchContext

AppLaunchContext returns a AppLaunchContext suitable for launching applications on the given display.

The function returns the following values:

  • appLaunchContext: new AppLaunchContext for display. Free with g_object_unref() when done.

func (*Display) Beep

func (display *Display) Beep()

Beep emits a short beep on display.

func (*Display) Close

func (display *Display) Close()

Close closes the connection to the windowing system for the given display, and cleans up associated resources.

func (*Display) ConnectClosed

func (display *Display) ConnectClosed(f func(isError bool)) coreglib.SignalHandle

ConnectClosed signal is emitted when the connection to the windowing system for display is closed.

func (*Display) ConnectMonitorAdded

func (display *Display) ConnectMonitorAdded(f func(monitor *Monitor)) coreglib.SignalHandle

ConnectMonitorAdded signal is emitted whenever a monitor is added.

func (*Display) ConnectMonitorRemoved

func (display *Display) ConnectMonitorRemoved(f func(monitor *Monitor)) coreglib.SignalHandle

ConnectMonitorRemoved signal is emitted whenever a monitor is removed.

func (*Display) ConnectOpened

func (display *Display) ConnectOpened(f func()) coreglib.SignalHandle

ConnectOpened signal is emitted when the connection to the windowing system for display is opened.

func (*Display) ConnectSeatAdded

func (display *Display) ConnectSeatAdded(f func(seat Seater)) coreglib.SignalHandle

ConnectSeatAdded signal is emitted whenever a new seat is made known to the windowing system.

func (*Display) ConnectSeatRemoved

func (display *Display) ConnectSeatRemoved(f func(seat Seater)) coreglib.SignalHandle

ConnectSeatRemoved signal is emitted whenever a seat is removed by the windowing system.

func (*Display) DefaultCursorSize

func (display *Display) DefaultCursorSize() uint

DefaultCursorSize returns the default size to use for cursors on display.

The function returns the following values:

  • guint: default cursor size.

func (*Display) DefaultGroup

func (display *Display) DefaultGroup() Windower

DefaultGroup returns the default group leader window for all toplevel windows on display. This window is implicitly created by GDK. See gdk_window_set_group().

The function returns the following values:

  • window: default group leader window for display.

func (*Display) DefaultScreen

func (display *Display) DefaultScreen() *Screen

DefaultScreen: get the default Screen for display.

The function returns the following values:

  • screen: default Screen object for display.

func (*Display) DefaultSeat

func (display *Display) DefaultSeat() Seater

DefaultSeat returns the default Seat for this display.

The function returns the following values:

  • seat: default seat.

func (*Display) DeviceIsGrabbed

func (display *Display) DeviceIsGrabbed(device Devicer) bool

DeviceIsGrabbed returns TRUE if there is an ongoing grab on device for display.

The function takes the following parameters:

  • device: Device.

The function returns the following values:

  • ok: TRUE if there is a grab in effect for device.

func (*Display) DeviceManager deprecated

func (display *Display) DeviceManager() DeviceManagerer

DeviceManager returns the DeviceManager associated to display.

Deprecated: Use gdk_display_get_default_seat() and Seat operations.

The function returns the following values:

  • deviceManager (optional) or NULL. This memory is owned by GDK and must not be freed or unreferenced.

func (*Display) Event

func (display *Display) Event() *Event

Event gets the next Event to be processed for display, fetching events from the windowing system if necessary.

The function returns the following values:

  • event (optional): next Event to be processed, or NULL if no events are pending. The returned Event should be freed with gdk_event_free().

func (*Display) Flush

func (display *Display) Flush()

Flush flushes any requests queued for the windowing system; this happens automatically when the main loop blocks waiting for new events, but if your application is drawing without returning control to the main loop, you may need to call this function explicitly. A common case where this function needs to be called is when an application is executing drawing commands from a thread other than the thread where the main loop is running.

This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.

func (*Display) HasPending

func (display *Display) HasPending() bool

HasPending returns whether the display has events that are waiting to be processed.

The function returns the following values:

  • ok: TRUE if there are events ready to be processed.

func (*Display) IsClosed

func (display *Display) IsClosed() bool

IsClosed finds out if the display has been closed.

The function returns the following values:

  • ok: TRUE if the display is closed.

func (*Display) KeyboardUngrab deprecated

func (display *Display) KeyboardUngrab(time_ uint32)

KeyboardUngrab: release any keyboard grab

Deprecated: Use gdk_device_ungrab(), together with gdk_device_grab() instead.

The function takes the following parameters:

  • time_: timestap (e.g K_CURRENT_TIME).

func (*Display) ListDevices deprecated

func (display *Display) ListDevices() []Devicer

ListDevices returns the list of available input devices attached to display. The list is statically allocated and should not be freed.

Deprecated: Use gdk_device_manager_list_devices() instead.

The function returns the following values:

  • list: a list of Device.

func (*Display) ListSeats

func (display *Display) ListSeats() []Seater

ListSeats returns the list of seats known to display.

The function returns the following values:

  • list: the list of seats known to the Display.

func (*Display) MaximalCursorSize

func (display *Display) MaximalCursorSize() (width, height uint)

MaximalCursorSize gets the maximal size to use for cursors on display.

The function returns the following values:

  • width: return location for the maximal cursor width.
  • height: return location for the maximal cursor height.

func (*Display) Monitor

func (display *Display) Monitor(monitorNum int) *Monitor

Monitor gets a monitor associated with this display.

The function takes the following parameters:

  • monitorNum: number of the monitor.

The function returns the following values:

  • monitor (optional) or NULL if monitor_num is not a valid monitor number.

func (*Display) MonitorAtPoint

func (display *Display) MonitorAtPoint(x, y int) *Monitor

MonitorAtPoint gets the monitor in which the point (x, y) is located, or a nearby monitor if the point is not in any monitor.

The function takes the following parameters:

  • x coordinate of the point.
  • y coordinate of the point.

The function returns the following values:

  • monitor containing the point.

func (*Display) MonitorAtWindow

func (display *Display) MonitorAtWindow(window Windower) *Monitor

MonitorAtWindow gets the monitor in which the largest area of window resides, or a monitor close to window if it is outside of all monitors.

The function takes the following parameters:

  • window: Window.

The function returns the following values:

  • monitor with the largest overlap with window.

func (*Display) NMonitors

func (display *Display) NMonitors() int

NMonitors gets the number of monitors that belong to display.

The returned number is valid until the next emission of the Display::monitor-added or Display::monitor-removed signal.

The function returns the following values:

  • gint: number of monitors.

func (*Display) NScreens deprecated

func (display *Display) NScreens() int

NScreens gets the number of screen managed by the display.

Deprecated: The number of screens is always 1.

The function returns the following values:

  • gint: number of screens.

func (*Display) Name

func (display *Display) Name() string

Name gets the name of the display.

The function returns the following values:

  • utf8: string representing the display name. This string is owned by GDK and should not be modified or freed.

func (*Display) NotifyStartupComplete

func (display *Display) NotifyStartupComplete(startupId string)

NotifyStartupComplete indicates to the GUI environment that the application has finished loading, using a given identifier.

GTK+ will call this function automatically for Window with custom startup-notification identifier unless gtk_window_set_auto_startup_notification() is called to disable that feature.

The function takes the following parameters:

  • startupId: startup-notification identifier, for which notification process should be completed.

func (*Display) PeekEvent

func (display *Display) PeekEvent() *Event

PeekEvent gets a copy of the first Event in the display’s event queue, without removing the event from the queue. (Note that this function will not get more events from the windowing system. It only checks the events that have already been moved to the GDK event queue.).

The function returns the following values:

  • event (optional): copy of the first Event on the event queue, or NULL if no events are in the queue. The returned Event should be freed with gdk_event_free().

func (*Display) Pointer deprecated

func (display *Display) Pointer() (screen *Screen, x, y int, mask ModifierType)

Pointer gets the current location of the pointer and the current modifier mask for a given display.

Deprecated: Use gdk_device_get_position() instead.

The function returns the following values:

  • screen (optional): location to store the screen that the cursor is on, or NULL.
  • x (optional): location to store root window X coordinate of pointer, or NULL.
  • y (optional): location to store root window Y coordinate of pointer, or NULL.
  • mask (optional): location to store current modifier mask, or NULL.

func (*Display) PointerIsGrabbed deprecated

func (display *Display) PointerIsGrabbed() bool

PointerIsGrabbed: test if the pointer is grabbed.

Deprecated: Use gdk_display_device_is_grabbed() instead.

The function returns the following values:

  • ok: TRUE if an active X pointer grab is in effect.

func (*Display) PointerUngrab deprecated

func (display *Display) PointerUngrab(time_ uint32)

PointerUngrab: release any pointer grab.

Deprecated: Use gdk_device_ungrab(), together with gdk_device_grab() instead.

The function takes the following parameters:

  • time_: timestap (e.g. GDK_CURRENT_TIME).

func (*Display) PrimaryMonitor

func (display *Display) PrimaryMonitor() *Monitor

PrimaryMonitor gets the primary monitor for the display.

The primary monitor is considered the monitor where the “main desktop” lives. While normal application windows typically allow the window manager to place the windows, specialized desktop applications such as panels should place themselves on the primary monitor.

The function returns the following values:

  • monitor (optional): primary monitor, or NULL if no primary monitor is configured by the user.

func (*Display) PutEvent

func (display *Display) PutEvent(event *Event)

PutEvent appends a copy of the given event onto the front of the event queue for display.

The function takes the following parameters:

  • event: Event.

func (*Display) Screen deprecated

func (display *Display) Screen(screenNum int) *Screen

Screen returns a screen object for one of the screens of the display.

Deprecated: There is only one screen; use gdk_display_get_default_screen() to get it.

The function takes the following parameters:

  • screenNum: screen number.

The function returns the following values:

  • screen: Screen object.

func (*Display) SetDoubleClickDistance

func (display *Display) SetDoubleClickDistance(distance uint)

SetDoubleClickDistance sets the double click distance (two clicks within this distance count as a double click and result in a K_2BUTTON_PRESS event). See also gdk_display_set_double_click_time(). Applications should not set this, it is a global user-configured setting.

The function takes the following parameters:

  • distance in pixels.

func (*Display) SetDoubleClickTime

func (display *Display) SetDoubleClickTime(msec uint)

SetDoubleClickTime sets the double click time (two clicks within this time interval count as a double click and result in a K_2BUTTON_PRESS event). Applications should not set this, it is a global user-configured setting.

The function takes the following parameters:

  • msec: double click time in milliseconds (thousandths of a second).

func (*Display) SupportsClipboardPersistence

func (display *Display) SupportsClipboardPersistence() bool

SupportsClipboardPersistence returns whether the speicifed display supports clipboard persistance; i.e. if it’s possible to store the clipboard data after an application has quit. On X11 this checks if a clipboard daemon is running.

The function returns the following values:

  • ok: TRUE if the display supports clipboard persistance.

func (*Display) SupportsComposite deprecated

func (display *Display) SupportsComposite() bool

SupportsComposite returns TRUE if gdk_window_set_composited() can be used to redirect drawing on the window using compositing.

Currently this only works on X11 with XComposite and XDamage extensions available.

Deprecated: Compositing is an outdated technology that only ever worked on X11.

The function returns the following values:

  • ok: TRUE if windows may be composited.

func (*Display) SupportsCursorAlpha

func (display *Display) SupportsCursorAlpha() bool

SupportsCursorAlpha returns TRUE if cursors can use an 8bit alpha channel on display. Otherwise, cursors are restricted to bilevel alpha (i.e. a mask).

The function returns the following values:

  • ok: whether cursors can have alpha channels.

func (*Display) SupportsCursorColor

func (display *Display) SupportsCursorColor() bool

SupportsCursorColor returns TRUE if multicolored cursors are supported on display. Otherwise, cursors have only a forground and a background color.

The function returns the following values:

  • ok: whether cursors can have multiple colors.

func (*Display) SupportsInputShapes

func (display *Display) SupportsInputShapes() bool

SupportsInputShapes returns TRUE if gdk_window_input_shape_combine_mask() can be used to modify the input shape of windows on display.

The function returns the following values:

  • ok: TRUE if windows with modified input shape are supported.

func (*Display) SupportsSelectionNotification

func (display *Display) SupportsSelectionNotification() bool

SupportsSelectionNotification returns whether EventOwnerChange events will be sent when the owner of a selection changes.

The function returns the following values:

  • ok: whether EventOwnerChange events will be sent.

func (*Display) SupportsShapes

func (display *Display) SupportsShapes() bool

SupportsShapes returns TRUE if gdk_window_shape_combine_mask() can be used to create shaped windows on display.

The function returns the following values:

  • ok: TRUE if shaped windows are supported.

func (*Display) Sync

func (display *Display) Sync()

Sync flushes any requests queued for the windowing system and waits until all requests have been handled. This is often used for making sure that the display is synchronized with the current state of the program. Calling gdk_display_sync() before gdk_error_trap_pop() makes sure that any errors generated from earlier requests are handled before the error trap is removed.

This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.

func (*Display) WarpPointer deprecated

func (display *Display) WarpPointer(screen *Screen, x, y int)

WarpPointer warps the pointer of display to the point x,y on the screen screen, unless the pointer is confined to a window by a grab, in which case it will be moved as far as allowed by the grab. Warping the pointer creates events as if the user had moved the mouse instantaneously to the destination.

Note that the pointer should normally be under the control of the user. This function was added to cover some rare use cases like keyboard navigation support for the color picker in the ColorSelectionDialog.

Deprecated: Use gdk_device_warp() instead.

The function takes the following parameters:

  • screen of display to warp the pointer to.
  • x coordinate of the destination.
  • y coordinate of the destination.

func (*Display) WindowAtPointer deprecated

func (display *Display) WindowAtPointer() (winX, winY int, window Windower)

WindowAtPointer obtains the window underneath the mouse pointer, returning the location of the pointer in that window in win_x, win_y for screen. Returns NULL if the window under the mouse pointer is not known to GDK (for example, belongs to another application).

Deprecated: Use gdk_device_get_window_at_position() instead.

The function returns the following values:

  • winX (optional): return location for x coordinate of the pointer location relative to the window origin, or NULL.
  • winY (optional): return location for y coordinate of the pointer location relative & to the window origin, or NULL.
  • window (optional) under the mouse pointer, or NULL.

type DisplayManager

type DisplayManager struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

DisplayManager: purpose of the DisplayManager singleton object is to offer notification when displays appear or disappear or the default display changes.

You can use gdk_display_manager_get() to obtain the DisplayManager singleton, but that should be rarely necessary. Typically, initializing GTK+ opens a display that you can work with without ever accessing the DisplayManager.

The GDK library can be built with support for multiple backends. The DisplayManager object determines which backend is used at runtime.

When writing backend-specific code that is supposed to work with multiple GDK backends, you have to consider both compile time and runtime. At compile time, use the K_WINDOWING_X11, K_WINDOWING_WIN32 macros, etc. to find out which backends are present in the GDK library you are building your application against. At runtime, use type-check macros like GDK_IS_X11_DISPLAY() to find out which backend is in use:

Backend-specific code

#ifdef GDK_WINDOWING_X11
  if (GDK_IS_X11_DISPLAY (display))
    {
      // make X11-specific calls here
    }
  else
#endif
#ifdef GDK_WINDOWING_QUARTZ
  if (GDK_IS_QUARTZ_DISPLAY (display))
    {
      // make Quartz-specific calls here
    }
  else
#endif
  g_error ("Unsupported GDK backend");.

func DisplayManagerGet

func DisplayManagerGet() *DisplayManager

DisplayManagerGet gets the singleton DisplayManager object.

When called for the first time, this function consults the GDK_BACKEND environment variable to find out which of the supported GDK backends to use (in case GDK has been compiled with multiple backends). Applications can use gdk_set_allowed_backends() to limit what backends can be used.

The function returns the following values:

  • displayManager: global DisplayManager singleton; gdk_parse_args(), gdk_init(), or gdk_init_check() must have been called first.

func (*DisplayManager) ConnectDisplayOpened

func (manager *DisplayManager) ConnectDisplayOpened(f func(display *Display)) coreglib.SignalHandle

ConnectDisplayOpened signal is emitted when a display is opened.

func (*DisplayManager) DefaultDisplay

func (manager *DisplayManager) DefaultDisplay() *Display

DefaultDisplay gets the default Display.

The function returns the following values:

  • display (optional) or NULL if there is no default display.

func (*DisplayManager) ListDisplays

func (manager *DisplayManager) ListDisplays() []*Display

ListDisplays: list all currently open displays.

The function returns the following values:

  • sList: newly allocated List of Display objects. Free with g_slist_free() when you are done with it.

func (*DisplayManager) OpenDisplay

func (manager *DisplayManager) OpenDisplay(name string) *Display

OpenDisplay opens a display.

The function takes the following parameters:

  • name of the display to open.

The function returns the following values:

  • display (optional) or NULL if the display could not be opened.

func (*DisplayManager) SetDefaultDisplay

func (manager *DisplayManager) SetDefaultDisplay(display *Display)

SetDefaultDisplay sets display as the default display.

The function takes the following parameters:

  • display: Display.

type DragAction

type DragAction C.guint

DragAction: used in DragContext to indicate what the destination should do with the dropped data.

const (
	// ActionDefault means nothing, and should not be used.
	ActionDefault DragAction = 0b1
	// ActionCopy: copy the data.
	ActionCopy DragAction = 0b10
	// ActionMove: move the data, i.e. first copy it, then delete it from the
	// source using the DELETE target of the X selection protocol.
	ActionMove DragAction = 0b100
	// ActionLink: add a link to the data. Note that this is only useful if
	// source and destination agree on what it means.
	ActionLink DragAction = 0b1000
	// ActionPrivate: special action which tells the source that the destination
	// will do something that the source doesn’t understand.
	ActionPrivate DragAction = 0b10000
	// ActionAsk: ask the user what to do with the data.
	ActionAsk DragAction = 0b100000
)

func (DragAction) Has

func (d DragAction) Has(other DragAction) bool

Has returns true if d contains other.

func (DragAction) String

func (d DragAction) String() string

String returns the names in string for DragAction.

type DragCancelReason

type DragCancelReason C.gint

DragCancelReason: used in DragContext to the reason of a cancelled DND operation.

const (
	// DragCancelNoTarget: there is no suitable drop target.
	DragCancelNoTarget DragCancelReason = iota
	// DragCancelUserCancelled: drag cancelled by the user.
	DragCancelUserCancelled
	// DragCancelError: unspecified error.
	DragCancelError
)

func (DragCancelReason) String

func (d DragCancelReason) String() string

String returns the name in string for DragCancelReason.

type DragContext

type DragContext struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

func (*DragContext) Actions

func (context *DragContext) Actions() DragAction

Actions determines the bitmask of actions proposed by the source if gdk_drag_context_get_suggested_action() returns GDK_ACTION_ASK.

The function returns the following values:

  • dragAction: DragAction flags.

func (*DragContext) ConnectActionChanged

func (context *DragContext) ConnectActionChanged(f func(action DragAction)) coreglib.SignalHandle

ConnectActionChanged: new action is being chosen for the drag and drop operation.

This signal will only be emitted if the DragContext manages the drag and drop operation. See gdk_drag_context_manage_dnd() for more information.

func (*DragContext) ConnectCancel

func (context *DragContext) ConnectCancel(f func(reason DragCancelReason)) coreglib.SignalHandle

ConnectCancel: drag and drop operation was cancelled.

This signal will only be emitted if the DragContext manages the drag and drop operation. See gdk_drag_context_manage_dnd() for more information.

func (*DragContext) ConnectDNDFinished

func (context *DragContext) ConnectDNDFinished(f func()) coreglib.SignalHandle

ConnectDNDFinished: drag and drop operation was finished, the drag destination finished reading all data. The drag source can now free all miscellaneous data.

This signal will only be emitted if the DragContext manages the drag and drop operation. See gdk_drag_context_manage_dnd() for more information.

func (*DragContext) ConnectDropPerformed

func (context *DragContext) ConnectDropPerformed(f func(time int)) coreglib.SignalHandle

ConnectDropPerformed: drag and drop operation was performed on an accepting client.

This signal will only be emitted if the DragContext manages the drag and drop operation. See gdk_drag_context_manage_dnd() for more information.

func (*DragContext) DestWindow

func (context *DragContext) DestWindow() Windower

DestWindow returns the destination window for the DND operation.

The function returns the following values:

  • window: Window.

func (*DragContext) Device

func (context *DragContext) Device() Devicer

Device returns the Device associated to the drag context.

The function returns the following values:

  • device associated to context.

func (*DragContext) DragWindow

func (context *DragContext) DragWindow() Windower

DragWindow returns the window on which the drag icon should be rendered during the drag operation. Note that the window may not be available until the drag operation has begun. GDK will move the window in accordance with the ongoing drag operation. The window is owned by context and will be destroyed when the drag operation is over.

The function returns the following values:

  • window (optional): drag window, or NULL.

func (*DragContext) ManageDND

func (context *DragContext) ManageDND(ipcWindow Windower, actions DragAction) bool

ManageDND requests the drag and drop operation to be managed by context. When a drag and drop operation becomes managed, the DragContext will internally handle all input and source-side EventDND events as required by the windowing system.

Once the drag and drop operation is managed, the drag context will emit the following signals:

- The DragContext::action-changed signal whenever the final action to be performed by the drag and drop operation changes.

- The DragContext::drop-performed signal after the user performs the drag and drop gesture (typically by releasing the mouse button).

- The DragContext::dnd-finished signal after the drag and drop operation concludes (after all Selection transfers happen).

- The DragContext::cancel signal if the drag and drop operation is finished but doesn't happen over an accepting destination, or is cancelled through other means.

The function takes the following parameters:

  • ipcWindow: window to use for IPC messaging/events.
  • actions supported by the drag source.

The function returns the following values:

  • ok if the drag and drop operation is managed.

func (*DragContext) Protocol

func (context *DragContext) Protocol() DragProtocol

Protocol returns the drag protocol that is used by this context.

The function returns the following values:

  • dragProtocol: drag protocol.

func (*DragContext) SelectedAction

func (context *DragContext) SelectedAction() DragAction

SelectedAction determines the action chosen by the drag destination.

The function returns the following values:

  • dragAction: DragAction value.

func (*DragContext) SetDevice

func (context *DragContext) SetDevice(device Devicer)

SetDevice associates a Device to context, so all Drag and Drop events for context are emitted as if they came from this device.

The function takes the following parameters:

  • device: Device.

func (*DragContext) SetHotspot

func (context *DragContext) SetHotspot(hotX, hotY int)

SetHotspot sets the position of the drag window that will be kept under the cursor hotspot. Initially, the hotspot is at the top left corner of the drag window.

The function takes the following parameters:

  • hotX: x coordinate of the drag window hotspot.
  • hotY: y coordinate of the drag window hotspot.

func (*DragContext) SourceWindow

func (context *DragContext) SourceWindow() Windower

SourceWindow returns the Window where the DND operation started.

The function returns the following values:

  • window: Window.

func (*DragContext) SuggestedAction

func (context *DragContext) SuggestedAction() DragAction

SuggestedAction determines the suggested drag action of the context.

The function returns the following values:

  • dragAction: DragAction value.

type DragProtocol

type DragProtocol C.gint

DragProtocol: used in DragContext to indicate the protocol according to which DND is done.

const (
	// DragProtoNone: no protocol.
	DragProtoNone DragProtocol = iota
	// DragProtoMotif: motif DND protocol. No longer supported.
	DragProtoMotif
	// DragProtoXdnd: xdnd protocol.
	DragProtoXdnd
	// DragProtoRootwin: extension to the Xdnd protocol for unclaimed root
	// window drops.
	DragProtoRootwin
	// DragProtoWin32Dropfiles: simple WM_DROPFILES protocol.
	DragProtoWin32Dropfiles
	// DragProtoOle2: complex OLE2 DND protocol (not implemented).
	DragProtoOle2
	// DragProtoLocal: intra-application DND.
	DragProtoLocal
	// DragProtoWayland: wayland DND protocol.
	DragProtoWayland
)

func (DragProtocol) String

func (d DragProtocol) String() string

String returns the name in string for DragProtocol.

type DrawingContext

type DrawingContext struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

DrawingContext is an object that represents the current drawing state of a Window.

It's possible to use a DrawingContext to draw on a Window via rendering API like Cairo or OpenGL.

A DrawingContext can only be created by calling gdk_window_begin_draw_frame() and will be valid until a call to gdk_window_end_draw_frame().

DrawingContext is available since GDK 3.22.

func CairoGetDrawingContext

func CairoGetDrawingContext(cr *cairo.Context) *DrawingContext

CairoGetDrawingContext retrieves the DrawingContext that created the Cairo context cr.

The function takes the following parameters:

  • cr: cairo context.

The function returns the following values:

  • drawingContext (optional) if any is set.

func (*DrawingContext) CairoContext

func (context *DrawingContext) CairoContext() *cairo.Context

CairoContext retrieves a Cairo context to be used to draw on the Window that created the DrawingContext.

The returned context is guaranteed to be valid as long as the DrawingContext is valid, that is between a call to gdk_window_begin_draw_frame() and gdk_window_end_draw_frame().

The function returns the following values:

  • ret: cairo context to be used to draw the contents of the Window. The context is owned by the DrawingContext and should not be destroyed.

func (*DrawingContext) Clip

func (context *DrawingContext) Clip() *cairo.Region

Clip retrieves a copy of the clip region used when creating the context.

The function returns the following values:

  • region (optional): cairo region.

func (*DrawingContext) IsValid

func (context *DrawingContext) IsValid() bool

IsValid checks whether the given DrawingContext is valid.

The function returns the following values:

  • ok: TRUE if the context is valid.

func (*DrawingContext) Window

func (context *DrawingContext) Window() Windower

Window retrieves the window that created the drawing context.

The function returns the following values:

  • window: Window.

type Event

type Event struct {
	// contains filtered or unexported fields
}

Event contains a union of all of the event types, and allows access to the data fields in a number of ways.

The event type is always the first field in all of the event types, and can always be accessed with the following code, no matter what type of event it is:

GdkEvent *event;
gdouble x;

x = event->button.x;.

func CopyEventer

func CopyEventer(e Eventer) *Event

CopyEventer copies any type that belongs to a Event union into a new Event instance. To see supported types, refer to Eventer's documentation.

func EventGet

func EventGet() *Event

EventGet checks all open displays for a Event to process,to be processed on, fetching events from the windowing system if necessary. See gdk_display_get_event().

The function returns the following values:

  • event (optional): next Event to be processed, or NULL if no events are pending. The returned Event should be freed with gdk_event_free().

func EventPeek

func EventPeek() *Event

EventPeek: if there is an event waiting in the event queue of some open display, returns a copy of it. See gdk_display_peek_event().

The function returns the following values:

  • event (optional): copy of the first Event on some event queue, or NULL if no events are in any queues. The returned Event should be freed with gdk_event_free().

func (*Event) AsAny

func (e *Event) AsAny() *EventAny

AsAny returns a copy of e as the struct *EventAny. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsButton

func (e *Event) AsButton() *EventButton

AsButton returns a copy of e as the struct *EventButton. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsConfigure

func (e *Event) AsConfigure() *EventConfigure

AsConfigure returns a copy of e as the struct *EventConfigure. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsCrossing

func (e *Event) AsCrossing() *EventCrossing

AsCrossing returns a copy of e as the struct *EventCrossing. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsDND

func (e *Event) AsDND() *EventDND

AsDND returns a copy of e as the struct *EventDND. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsExpose

func (e *Event) AsExpose() *EventExpose

AsExpose returns a copy of e as the struct *EventExpose. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsFocusChange

func (e *Event) AsFocusChange() *EventFocus

AsFocusChange returns a copy of e as the struct *EventFocus. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsGrabBroken

func (e *Event) AsGrabBroken() *EventGrabBroken

AsGrabBroken returns a copy of e as the struct *EventGrabBroken. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsKey

func (e *Event) AsKey() *EventKey

AsKey returns a copy of e as the struct *EventKey. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsMotion

func (e *Event) AsMotion() *EventMotion

AsMotion returns a copy of e as the struct *EventMotion. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsOwnerChange

func (e *Event) AsOwnerChange() *EventOwnerChange

AsOwnerChange returns a copy of e as the struct *EventOwnerChange. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsPadAxis

func (e *Event) AsPadAxis() *EventPadAxis

AsPadAxis returns a copy of e as the struct *EventPadAxis. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsPadButton

func (e *Event) AsPadButton() *EventPadButton

AsPadButton returns a copy of e as the struct *EventPadButton. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsPadGroupMode

func (e *Event) AsPadGroupMode() *EventPadGroupMode

AsPadGroupMode returns a copy of e as the struct *EventPadGroupMode. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsProperty

func (e *Event) AsProperty() *EventProperty

AsProperty returns a copy of e as the struct *EventProperty. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsProximity

func (e *Event) AsProximity() *EventProximity

AsProximity returns a copy of e as the struct *EventProximity. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsScroll

func (e *Event) AsScroll() *EventScroll

AsScroll returns a copy of e as the struct *EventScroll. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsSelection

func (e *Event) AsSelection() *EventSelection

AsSelection returns a copy of e as the struct *EventSelection. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsSetting

func (e *Event) AsSetting() *EventSetting

AsSetting returns a copy of e as the struct *EventSetting. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsTouch

func (e *Event) AsTouch() *EventTouch

AsTouch returns a copy of e as the struct *EventTouch. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsTouchpadPinch

func (e *Event) AsTouchpadPinch() *EventTouchpadPinch

AsTouchpadPinch returns a copy of e as the struct *EventTouchpadPinch. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsTouchpadSwipe

func (e *Event) AsTouchpadSwipe() *EventTouchpadSwipe

AsTouchpadSwipe returns a copy of e as the struct *EventTouchpadSwipe. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsType

func (e *Event) AsType() EventType

AsType returns a copy of e as the struct EventType. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsVisibility

func (e *Event) AsVisibility() *EventVisibility

AsVisibility returns a copy of e as the struct *EventVisibility. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

func (*Event) AsWindowState

func (e *Event) AsWindowState() *EventWindowState

AsWindowState returns a copy of e as the struct *EventWindowState. It does this without any knowledge on the actual type of the value, so the caller must take care of type-checking beforehand.

type EventAny

type EventAny struct {
	// contains filtered or unexported fields
}

EventAny contains the fields which are common to all event structs. Any event pointer can safely be cast to a pointer to a EventAny to access these fields.

An instance of this type is always passed by reference.

func (*EventAny) SendEvent

func (e *EventAny) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventAny) SetSendEvent

func (e *EventAny) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventAny) Type

func (e *EventAny) Type() EventType

Type: type of the event.

func (*EventAny) Window

func (e *EventAny) Window() Windower

Window: window which received the event.

type EventButton

type EventButton struct {
	// contains filtered or unexported fields
}

EventButton: used for button press and button release events. The type field will be one of GDK_BUTTON_PRESS, GDK_2BUTTON_PRESS, GDK_3BUTTON_PRESS or GDK_BUTTON_RELEASE,

Double and triple-clicks result in a sequence of events being received. For double-clicks the order of events will be:

- GDK_BUTTON_PRESS

- GDK_BUTTON_RELEASE

- GDK_BUTTON_PRESS

- GDK_2BUTTON_PRESS

- GDK_BUTTON_RELEASE

Note that the first click is received just like a normal button press, while the second click results in a GDK_2BUTTON_PRESS being received just after the GDK_BUTTON_PRESS.

Triple-clicks are very similar to double-clicks, except that GDK_3BUTTON_PRESS is inserted after the third click. The order of the events is:

- GDK_BUTTON_PRESS

- GDK_BUTTON_RELEASE

- GDK_BUTTON_PRESS

- GDK_2BUTTON_PRESS

- GDK_BUTTON_RELEASE

- GDK_BUTTON_PRESS

- GDK_3BUTTON_PRESS

- GDK_BUTTON_RELEASE

For a double click to occur, the second button press must occur within 1/4 of a second of the first. For a triple click to occur, the third button press must also occur within 1/2 second of the first button press.

An instance of this type is always passed by reference.

func (*EventButton) Axes

func (e *EventButton) Axes() *float64

Axes: x, y translated to the axes of device, or NULL if device is the mouse.

func (*EventButton) Button

func (e *EventButton) Button() uint

Button: button which was pressed or released, numbered from 1 to 5. Normally button 1 is the left mouse button, 2 is the middle button, and 3 is the right button. On 2-button mice, the middle button can often be simulated by pressing both mouse buttons together.

func (*EventButton) Device

func (e *EventButton) Device() Devicer

Device: master device that the event originated from. Use gdk_event_get_source_device() to get the slave device.

func (*EventButton) SendEvent

func (e *EventButton) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventButton) SetButton

func (e *EventButton) SetButton(button uint)

Button: button which was pressed or released, numbered from 1 to 5. Normally button 1 is the left mouse button, 2 is the middle button, and 3 is the right button. On 2-button mice, the middle button can often be simulated by pressing both mouse buttons together.

func (*EventButton) SetSendEvent

func (e *EventButton) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventButton) SetTime

func (e *EventButton) SetTime(time uint32)

Time: time of the event in milliseconds.

func (*EventButton) SetX

func (e *EventButton) SetX(x float64)

X: x coordinate of the pointer relative to the window.

func (*EventButton) SetXRoot

func (e *EventButton) SetXRoot(xRoot float64)

XRoot: x coordinate of the pointer relative to the root of the screen.

func (*EventButton) SetY

func (e *EventButton) SetY(y float64)

Y: y coordinate of the pointer relative to the window.

func (*EventButton) SetYRoot

func (e *EventButton) SetYRoot(yRoot float64)

YRoot: y coordinate of the pointer relative to the root of the screen.

func (*EventButton) State

func (e *EventButton) State() ModifierType

State: bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See ModifierType.

func (*EventButton) Time

func (e *EventButton) Time() uint32

Time: time of the event in milliseconds.

func (*EventButton) Type

func (e *EventButton) Type() EventType

Type: type of the event (GDK_BUTTON_PRESS, GDK_2BUTTON_PRESS, GDK_3BUTTON_PRESS or GDK_BUTTON_RELEASE).

func (*EventButton) Window

func (e *EventButton) Window() Windower

Window: window which received the event.

func (*EventButton) X

func (e *EventButton) X() float64

X: x coordinate of the pointer relative to the window.

func (*EventButton) XRoot

func (e *EventButton) XRoot() float64

XRoot: x coordinate of the pointer relative to the root of the screen.

func (*EventButton) Y

func (e *EventButton) Y() float64

Y: y coordinate of the pointer relative to the window.

func (*EventButton) YRoot

func (e *EventButton) YRoot() float64

YRoot: y coordinate of the pointer relative to the root of the screen.

type EventConfigure

type EventConfigure struct {
	// contains filtered or unexported fields
}

EventConfigure: generated when a window size or position has changed.

An instance of this type is always passed by reference.

func (*EventConfigure) Height

func (e *EventConfigure) Height() int

Height: new height of the window.

func (*EventConfigure) SendEvent

func (e *EventConfigure) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventConfigure) SetHeight

func (e *EventConfigure) SetHeight(height int)

Height: new height of the window.

func (*EventConfigure) SetSendEvent

func (e *EventConfigure) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventConfigure) SetWidth

func (e *EventConfigure) SetWidth(width int)

Width: new width of the window.

func (*EventConfigure) SetX

func (e *EventConfigure) SetX(x int)

X: new x coordinate of the window, relative to its parent.

func (*EventConfigure) SetY

func (e *EventConfigure) SetY(y int)

Y: new y coordinate of the window, relative to its parent.

func (*EventConfigure) Type

func (e *EventConfigure) Type() EventType

Type: type of the event (GDK_CONFIGURE).

func (*EventConfigure) Width

func (e *EventConfigure) Width() int

Width: new width of the window.

func (*EventConfigure) Window

func (e *EventConfigure) Window() Windower

Window: window which received the event.

func (*EventConfigure) X

func (e *EventConfigure) X() int

X: new x coordinate of the window, relative to its parent.

func (*EventConfigure) Y

func (e *EventConfigure) Y() int

Y: new y coordinate of the window, relative to its parent.

type EventCrossing

type EventCrossing struct {
	// contains filtered or unexported fields
}

EventCrossing: generated when the pointer enters or leaves a window.

An instance of this type is always passed by reference.

func (*EventCrossing) Detail

func (e *EventCrossing) Detail() NotifyType

Detail: kind of crossing that happened (GDK_NOTIFY_INFERIOR, GDK_NOTIFY_ANCESTOR, GDK_NOTIFY_VIRTUAL, GDK_NOTIFY_NONLINEAR or GDK_NOTIFY_NONLINEAR_VIRTUAL).

func (*EventCrossing) Focus

func (e *EventCrossing) Focus() bool

Focus: TRUE if window is the focus window or an inferior.

func (*EventCrossing) Mode

func (e *EventCrossing) Mode() CrossingMode

Mode: crossing mode (GDK_CROSSING_NORMAL, GDK_CROSSING_GRAB, GDK_CROSSING_UNGRAB, GDK_CROSSING_GTK_GRAB, GDK_CROSSING_GTK_UNGRAB or GDK_CROSSING_STATE_CHANGED). GDK_CROSSING_GTK_GRAB, GDK_CROSSING_GTK_UNGRAB, and GDK_CROSSING_STATE_CHANGED were added in 2.14 and are always synthesized, never native.

func (*EventCrossing) SendEvent

func (e *EventCrossing) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventCrossing) SetFocus

func (e *EventCrossing) SetFocus(focus bool)

Focus: TRUE if window is the focus window or an inferior.

func (*EventCrossing) SetSendEvent

func (e *EventCrossing) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventCrossing) SetTime

func (e *EventCrossing) SetTime(time uint32)

Time: time of the event in milliseconds.

func (*EventCrossing) SetX

func (e *EventCrossing) SetX(x float64)

X: x coordinate of the pointer relative to the window.

func (*EventCrossing) SetXRoot

func (e *EventCrossing) SetXRoot(xRoot float64)

XRoot: x coordinate of the pointer relative to the root of the screen.

func (*EventCrossing) SetY

func (e *EventCrossing) SetY(y float64)

Y: y coordinate of the pointer relative to the window.

func (*EventCrossing) SetYRoot

func (e *EventCrossing) SetYRoot(yRoot float64)

YRoot: y coordinate of the pointer relative to the root of the screen.

func (*EventCrossing) State

func (e *EventCrossing) State() ModifierType

State: bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See ModifierType.

func (*EventCrossing) Subwindow

func (e *EventCrossing) Subwindow() Windower

Subwindow: window that was entered or left.

func (*EventCrossing) Time

func (e *EventCrossing) Time() uint32

Time: time of the event in milliseconds.

func (*EventCrossing) Type

func (e *EventCrossing) Type() EventType

Type: type of the event (GDK_ENTER_NOTIFY or GDK_LEAVE_NOTIFY).

func (*EventCrossing) Window

func (e *EventCrossing) Window() Windower

Window: window which received the event.

func (*EventCrossing) X

func (e *EventCrossing) X() float64

X: x coordinate of the pointer relative to the window.

func (*EventCrossing) XRoot

func (e *EventCrossing) XRoot() float64

XRoot: x coordinate of the pointer relative to the root of the screen.

func (*EventCrossing) Y

func (e *EventCrossing) Y() float64

Y: y coordinate of the pointer relative to the window.

func (*EventCrossing) YRoot

func (e *EventCrossing) YRoot() float64

YRoot: y coordinate of the pointer relative to the root of the screen.

type EventDND

type EventDND struct {
	// contains filtered or unexported fields
}

EventDND: generated during DND operations.

An instance of this type is always passed by reference.

func (*EventDND) Context

func (e *EventDND) Context() *DragContext

Context for the current DND operation.

func (*EventDND) SendEvent

func (e *EventDND) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventDND) SetSendEvent

func (e *EventDND) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventDND) SetTime

func (e *EventDND) SetTime(time uint32)

Time: time of the event in milliseconds.

func (*EventDND) SetXRoot

func (e *EventDND) SetXRoot(xRoot int16)

XRoot: x coordinate of the pointer relative to the root of the screen, only set for GDK_DRAG_MOTION and GDK_DROP_START.

func (*EventDND) SetYRoot

func (e *EventDND) SetYRoot(yRoot int16)

YRoot: y coordinate of the pointer relative to the root of the screen, only set for GDK_DRAG_MOTION and GDK_DROP_START.

func (*EventDND) Time

func (e *EventDND) Time() uint32

Time: time of the event in milliseconds.

func (*EventDND) Type

func (e *EventDND) Type() EventType

Type: type of the event (GDK_DRAG_ENTER, GDK_DRAG_LEAVE, GDK_DRAG_MOTION, GDK_DRAG_STATUS, GDK_DROP_START or GDK_DROP_FINISHED).

func (*EventDND) Window

func (e *EventDND) Window() Windower

Window: window which received the event.

func (*EventDND) XRoot

func (e *EventDND) XRoot() int16

XRoot: x coordinate of the pointer relative to the root of the screen, only set for GDK_DRAG_MOTION and GDK_DROP_START.

func (*EventDND) YRoot

func (e *EventDND) YRoot() int16

YRoot: y coordinate of the pointer relative to the root of the screen, only set for GDK_DRAG_MOTION and GDK_DROP_START.

type EventExpose

type EventExpose struct {
	// contains filtered or unexported fields
}

EventExpose: generated when all or part of a window becomes visible and needs to be redrawn.

An instance of this type is always passed by reference.

func (*EventExpose) Area

func (e *EventExpose) Area() *Rectangle

Area: bounding box of region.

func (*EventExpose) Count

func (e *EventExpose) Count() int

Count: number of contiguous GDK_EXPOSE events following this one. The only use for this is “exposure compression”, i.e. handling all contiguous GDK_EXPOSE events in one go, though GDK performs some exposure compression so this is not normally needed.

func (*EventExpose) Region

func (e *EventExpose) Region() *cairo.Region

Region: region that needs to be redrawn.

func (*EventExpose) SendEvent

func (e *EventExpose) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventExpose) SetCount

func (e *EventExpose) SetCount(count int)

Count: number of contiguous GDK_EXPOSE events following this one. The only use for this is “exposure compression”, i.e. handling all contiguous GDK_EXPOSE events in one go, though GDK performs some exposure compression so this is not normally needed.

func (*EventExpose) SetSendEvent

func (e *EventExpose) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventExpose) Type

func (e *EventExpose) Type() EventType

Type: type of the event (GDK_EXPOSE or GDK_DAMAGE).

func (*EventExpose) Window

func (e *EventExpose) Window() Windower

Window: window which received the event.

type EventFocus

type EventFocus struct {
	// contains filtered or unexported fields
}

EventFocus describes a change of keyboard focus.

An instance of this type is always passed by reference.

func (*EventFocus) In

func (e *EventFocus) In() int16

In: TRUE if the window has gained the keyboard focus, FALSE if it has lost the focus.

func (*EventFocus) SendEvent

func (e *EventFocus) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventFocus) SetIn

func (e *EventFocus) SetIn(in int16)

In: TRUE if the window has gained the keyboard focus, FALSE if it has lost the focus.

func (*EventFocus) SetSendEvent

func (e *EventFocus) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventFocus) Type

func (e *EventFocus) Type() EventType

Type: type of the event (GDK_FOCUS_CHANGE).

func (*EventFocus) Window

func (e *EventFocus) Window() Windower

Window: window which received the event.

type EventFunc

type EventFunc func(event *Event)

EventFunc specifies the type of function passed to gdk_event_handler_set() to handle all GDK events.

type EventGrabBroken

type EventGrabBroken struct {
	// contains filtered or unexported fields
}

EventGrabBroken: generated when a pointer or keyboard grab is broken. On X11, this happens when the grab window becomes unviewable (i.e. it or one of its ancestors is unmapped), or if the same application grabs the pointer or keyboard again. Note that implicit grabs (which are initiated by button presses) can also cause EventGrabBroken events.

An instance of this type is always passed by reference.

func (*EventGrabBroken) GrabWindow

func (e *EventGrabBroken) GrabWindow() Windower

GrabWindow: if this event is caused by another grab in the same application, grab_window contains the new grab window. Otherwise grab_window is NULL.

func (*EventGrabBroken) Implicit

func (e *EventGrabBroken) Implicit() bool

Implicit: TRUE if the broken grab was implicit.

func (*EventGrabBroken) Keyboard

func (e *EventGrabBroken) Keyboard() bool

Keyboard: TRUE if a keyboard grab was broken, FALSE if a pointer grab was broken.

func (*EventGrabBroken) SendEvent

func (e *EventGrabBroken) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventGrabBroken) SetImplicit

func (e *EventGrabBroken) SetImplicit(implicit bool)

Implicit: TRUE if the broken grab was implicit.

func (*EventGrabBroken) SetKeyboard

func (e *EventGrabBroken) SetKeyboard(keyboard bool)

Keyboard: TRUE if a keyboard grab was broken, FALSE if a pointer grab was broken.

func (*EventGrabBroken) SetSendEvent

func (e *EventGrabBroken) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventGrabBroken) Type

func (e *EventGrabBroken) Type() EventType

Type: type of the event (GDK_GRAB_BROKEN).

func (*EventGrabBroken) Window

func (e *EventGrabBroken) Window() Windower

Window: window which received the event, i.e. the window that previously owned the grab.

type EventKey

type EventKey struct {
	// contains filtered or unexported fields
}

EventKey describes a key press or key release event.

An instance of this type is always passed by reference.

func (*EventKey) Group

func (e *EventKey) Group() byte

Group: keyboard group.

func (*EventKey) HardwareKeycode

func (e *EventKey) HardwareKeycode() uint16

HardwareKeycode: raw code of the key that was pressed or released.

func (*EventKey) Keyval

func (e *EventKey) Keyval() uint

Keyval: key that was pressed or released. See the gdk/gdkkeysyms.h header file for a complete list of GDK key codes.

func (*EventKey) Length

func (e *EventKey) Length() int

Length: length of string.

func (*EventKey) SendEvent

func (e *EventKey) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventKey) SetGroup

func (e *EventKey) SetGroup(group byte)

Group: keyboard group.

func (*EventKey) SetHardwareKeycode

func (e *EventKey) SetHardwareKeycode(hardwareKeycode uint16)

HardwareKeycode: raw code of the key that was pressed or released.

func (*EventKey) SetKeyval

func (e *EventKey) SetKeyval(keyval uint)

Keyval: key that was pressed or released. See the gdk/gdkkeysyms.h header file for a complete list of GDK key codes.

func (*EventKey) SetLength

func (e *EventKey) SetLength(length int)

Length: length of string.

func (*EventKey) SetSendEvent

func (e *EventKey) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventKey) SetTime

func (e *EventKey) SetTime(time uint32)

Time: time of the event in milliseconds.

func (*EventKey) State

func (e *EventKey) State() ModifierType

State: bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See ModifierType.

func (*EventKey) String

func (e *EventKey) String() string

String: string containing an approximation of the text that would result from this keypress. The only correct way to handle text input of text is using input methods (see IMContext), so this field is deprecated and should never be used. (gdk_unicode_to_keyval() provides a non-deprecated way of getting an approximate translation for a key.) The string is encoded in the encoding of the current locale (Note: this for backwards compatibility: strings in GTK+ and GDK are typically in UTF-8.) and NUL-terminated. In some cases, the translation of the key code will be a single NUL byte, in which case looking at length is necessary to distinguish it from the an empty translation.

func (*EventKey) Time

func (e *EventKey) Time() uint32

Time: time of the event in milliseconds.

func (*EventKey) Type

func (e *EventKey) Type() EventType

Type: type of the event (GDK_KEY_PRESS or GDK_KEY_RELEASE).

func (*EventKey) Window

func (e *EventKey) Window() Windower

Window: window which received the event.

type EventMask

type EventMask C.guint

EventMask: set of bit-flags to indicate which events a window is to receive. Most of these masks map onto one or more of the EventType event types above.

See the [input handling overview][chap-input-handling] for details of [event masks][event-masks] and [event propagation][event-propagation].

GDK_POINTER_MOTION_HINT_MASK is deprecated. It is a special mask to reduce the number of GDK_MOTION_NOTIFY events received. When using GDK_POINTER_MOTION_HINT_MASK, fewer GDK_MOTION_NOTIFY events will be sent, some of which are marked as a hint (the is_hint member is TRUE). To receive more motion events after a motion hint event, the application needs to asks for more, by calling gdk_event_request_motions().

Since GTK 3.8, motion events are already compressed by default, independent of this mechanism. This compression can be disabled with gdk_window_set_event_compression(). See the documentation of that function for details.

If GDK_TOUCH_MASK is enabled, the window will receive touch events from touch-enabled devices. Those will come as sequences of EventTouch with type GDK_TOUCH_UPDATE, enclosed by two events with type GDK_TOUCH_BEGIN and GDK_TOUCH_END (or GDK_TOUCH_CANCEL). gdk_event_get_event_sequence() returns the event sequence for these events, so different sequences may be distinguished.

const (
	// ExposureMask: receive expose events.
	ExposureMask EventMask = 0b10
	// PointerMotionMask: receive all pointer motion events.
	PointerMotionMask EventMask = 0b100
	// PointerMotionHintMask: deprecated. see the explanation above.
	PointerMotionHintMask EventMask = 0b1000
	// ButtonMotionMask: receive pointer motion events while any button is
	// pressed.
	ButtonMotionMask EventMask = 0b10000
	// Button1MotionMask: receive pointer motion events while 1 button is
	// pressed.
	Button1MotionMask EventMask = 0b100000
	// Button2MotionMask: receive pointer motion events while 2 button is
	// pressed.
	Button2MotionMask EventMask = 0b1000000
	// Button3MotionMask: receive pointer motion events while 3 button is
	// pressed.
	Button3MotionMask EventMask = 0b10000000
	// ButtonPressMask: receive button press events.
	ButtonPressMask EventMask = 0b100000000
	// ButtonReleaseMask: receive button release events.
	ButtonReleaseMask EventMask = 0b1000000000
	// KeyPressMask: receive key press events.
	KeyPressMask EventMask = 0b10000000000
	// KeyReleaseMask: receive key release events.
	KeyReleaseMask EventMask = 0b100000000000
	// EnterNotifyMask: receive window enter events.
	EnterNotifyMask EventMask = 0b1000000000000
	// LeaveNotifyMask: receive window leave events.
	LeaveNotifyMask EventMask = 0b10000000000000
	// FocusChangeMask: receive focus change events.
	FocusChangeMask EventMask = 0b100000000000000
	// StructureMask: receive events about window configuration change.
	StructureMask EventMask = 0b1000000000000000
	// PropertyChangeMask: receive property change events.
	PropertyChangeMask EventMask = 0b10000000000000000
	// VisibilityNotifyMask: receive visibility change events.
	VisibilityNotifyMask EventMask = 0b100000000000000000
	// ProximityInMask: receive proximity in events.
	ProximityInMask EventMask = 0b1000000000000000000
	// ProximityOutMask: receive proximity out events.
	ProximityOutMask EventMask = 0b10000000000000000000
	// SubstructureMask: receive events about window configuration changes of
	// child windows.
	SubstructureMask EventMask = 0b100000000000000000000
	// ScrollMask: receive scroll events.
	ScrollMask EventMask = 0b1000000000000000000000
	// TouchMask: receive touch events. Since 3.4.
	TouchMask EventMask = 0b10000000000000000000000
	// SmoothScrollMask: receive smooth scrolling events. Since 3.4.
	SmoothScrollMask EventMask = 0b100000000000000000000000
	// TouchpadGestureMask: receive touchpad gesture events. Since 3.18.
	TouchpadGestureMask EventMask = 0b1000000000000000000000000
	// TabletPadMask: receive tablet pad events. Since 3.22.
	TabletPadMask EventMask = 0b10000000000000000000000000
	// AllEventsMask: combination of all the above event masks.
	AllEventsMask EventMask = 0b11111111111111111111111110
)

func (EventMask) Has

func (e EventMask) Has(other EventMask) bool

Has returns true if e contains other.

func (EventMask) String

func (e EventMask) String() string

String returns the names in string for EventMask.

type EventMotion

type EventMotion struct {
	// contains filtered or unexported fields
}

EventMotion: generated when the pointer moves.

An instance of this type is always passed by reference.

func (*EventMotion) Axes

func (e *EventMotion) Axes() *float64

Axes: x, y translated to the axes of device, or NULL if device is the mouse.

func (*EventMotion) Device

func (e *EventMotion) Device() Devicer

Device: master device that the event originated from. Use gdk_event_get_source_device() to get the slave device.

func (*EventMotion) IsHint

func (e *EventMotion) IsHint() int16

IsHint: set to 1 if this event is just a hint, see the GDK_POINTER_MOTION_HINT_MASK value of EventMask.

func (*EventMotion) SendEvent

func (e *EventMotion) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventMotion) SetIsHint

func (e *EventMotion) SetIsHint(isHint int16)

IsHint: set to 1 if this event is just a hint, see the GDK_POINTER_MOTION_HINT_MASK value of EventMask.

func (*EventMotion) SetSendEvent

func (e *EventMotion) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventMotion) SetTime

func (e *EventMotion) SetTime(time uint32)

Time: time of the event in milliseconds.

func (*EventMotion) SetX

func (e *EventMotion) SetX(x float64)

X: x coordinate of the pointer relative to the window.

func (*EventMotion) SetXRoot

func (e *EventMotion) SetXRoot(xRoot float64)

XRoot: x coordinate of the pointer relative to the root of the screen.

func (*EventMotion) SetY

func (e *EventMotion) SetY(y float64)

Y: y coordinate of the pointer relative to the window.

func (*EventMotion) SetYRoot

func (e *EventMotion) SetYRoot(yRoot float64)

YRoot: y coordinate of the pointer relative to the root of the screen.

func (*EventMotion) State

func (e *EventMotion) State() ModifierType

State: bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See ModifierType.

func (*EventMotion) Time

func (e *EventMotion) Time() uint32

Time: time of the event in milliseconds.

func (*EventMotion) Type

func (e *EventMotion) Type() EventType

Type: type of the event.

func (*EventMotion) Window

func (e *EventMotion) Window() Windower

Window: window which received the event.

func (*EventMotion) X

func (e *EventMotion) X() float64

X: x coordinate of the pointer relative to the window.

func (*EventMotion) XRoot

func (e *EventMotion) XRoot() float64

XRoot: x coordinate of the pointer relative to the root of the screen.

func (*EventMotion) Y

func (e *EventMotion) Y() float64

Y: y coordinate of the pointer relative to the window.

func (*EventMotion) YRoot

func (e *EventMotion) YRoot() float64

YRoot: y coordinate of the pointer relative to the root of the screen.

type EventOwnerChange

type EventOwnerChange struct {
	// contains filtered or unexported fields
}

EventOwnerChange: generated when the owner of a selection changes. On X11, this information is only available if the X server supports the XFIXES extension.

An instance of this type is always passed by reference.

type EventPadAxis

type EventPadAxis struct {
	// contains filtered or unexported fields
}

EventPadAxis: generated during GDK_SOURCE_TABLET_PAD interaction with tactile sensors.

An instance of this type is always passed by reference.

func (*EventPadAxis) Group

func (e *EventPadAxis) Group() uint

Group: pad group the ring/strip belongs to. A GDK_SOURCE_TABLET_PAD device may have one or more groups containing a set of buttons/rings/strips each.

func (*EventPadAxis) Index

func (e *EventPadAxis) Index() uint

Index: number of strip/ring that was interacted. This number is 0-indexed.

func (*EventPadAxis) Mode

func (e *EventPadAxis) Mode() uint

Mode: current mode of group. Different groups in a GDK_SOURCE_TABLET_PAD device may have different current modes.

func (*EventPadAxis) SendEvent

func (e *EventPadAxis) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventPadAxis) SetGroup

func (e *EventPadAxis) SetGroup(group uint)

Group: pad group the ring/strip belongs to. A GDK_SOURCE_TABLET_PAD device may have one or more groups containing a set of buttons/rings/strips each.

func (*EventPadAxis) SetIndex

func (e *EventPadAxis) SetIndex(index uint)

Index: number of strip/ring that was interacted. This number is 0-indexed.

func (*EventPadAxis) SetMode

func (e *EventPadAxis) SetMode(mode uint)

Mode: current mode of group. Different groups in a GDK_SOURCE_TABLET_PAD device may have different current modes.

func (*EventPadAxis) SetSendEvent

func (e *EventPadAxis) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventPadAxis) SetTime

func (e *EventPadAxis) SetTime(time uint32)

Time: time of the event in milliseconds.

func (*EventPadAxis) SetValue

func (e *EventPadAxis) SetValue(value float64)

Value: current value for the given axis.

func (*EventPadAxis) Time

func (e *EventPadAxis) Time() uint32

Time: time of the event in milliseconds.

func (*EventPadAxis) Type

func (e *EventPadAxis) Type() EventType

Type: type of the event (GDK_PAD_RING or GDK_PAD_STRIP).

func (*EventPadAxis) Value

func (e *EventPadAxis) Value() float64

Value: current value for the given axis.

func (*EventPadAxis) Window

func (e *EventPadAxis) Window() Windower

Window: window which received the event.

type EventPadButton

type EventPadButton struct {
	// contains filtered or unexported fields
}

EventPadButton: generated during GDK_SOURCE_TABLET_PAD button presses and releases.

An instance of this type is always passed by reference.

func (*EventPadButton) Button

func (e *EventPadButton) Button() uint

Button: pad button that was pressed.

func (*EventPadButton) Group

func (e *EventPadButton) Group() uint

Group: pad group the button belongs to. A GDK_SOURCE_TABLET_PAD device may have one or more groups containing a set of buttons/rings/strips each.

func (*EventPadButton) Mode

func (e *EventPadButton) Mode() uint

Mode: current mode of group. Different groups in a GDK_SOURCE_TABLET_PAD device may have different current modes.

func (*EventPadButton) SendEvent

func (e *EventPadButton) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventPadButton) SetButton

func (e *EventPadButton) SetButton(button uint)

Button: pad button that was pressed.

func (*EventPadButton) SetGroup

func (e *EventPadButton) SetGroup(group uint)

Group: pad group the button belongs to. A GDK_SOURCE_TABLET_PAD device may have one or more groups containing a set of buttons/rings/strips each.

func (*EventPadButton) SetMode

func (e *EventPadButton) SetMode(mode uint)

Mode: current mode of group. Different groups in a GDK_SOURCE_TABLET_PAD device may have different current modes.

func (*EventPadButton) SetSendEvent

func (e *EventPadButton) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventPadButton) SetTime

func (e *EventPadButton) SetTime(time uint32)

Time: time of the event in milliseconds.

func (*EventPadButton) Time

func (e *EventPadButton) Time() uint32

Time: time of the event in milliseconds.

func (*EventPadButton) Type

func (e *EventPadButton) Type() EventType

Type: type of the event (GDK_PAD_BUTTON_PRESS or GDK_PAD_BUTTON_RELEASE).

func (*EventPadButton) Window

func (e *EventPadButton) Window() Windower

Window: window which received the event.

type EventPadGroupMode

type EventPadGroupMode struct {
	// contains filtered or unexported fields
}

EventPadGroupMode: generated during GDK_SOURCE_TABLET_PAD mode switches in a group.

An instance of this type is always passed by reference.

func (*EventPadGroupMode) Group

func (e *EventPadGroupMode) Group() uint

Group: pad group that is switching mode. A GDK_SOURCE_TABLET_PAD device may have one or more groups containing a set of buttons/rings/strips each.

func (*EventPadGroupMode) Mode

func (e *EventPadGroupMode) Mode() uint

Mode: new mode of group. Different groups in a GDK_SOURCE_TABLET_PAD device may have different current modes.

func (*EventPadGroupMode) SendEvent

func (e *EventPadGroupMode) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventPadGroupMode) SetGroup

func (e *EventPadGroupMode) SetGroup(group uint)

Group: pad group that is switching mode. A GDK_SOURCE_TABLET_PAD device may have one or more groups containing a set of buttons/rings/strips each.

func (*EventPadGroupMode) SetMode

func (e *EventPadGroupMode) SetMode(mode uint)

Mode: new mode of group. Different groups in a GDK_SOURCE_TABLET_PAD device may have different current modes.

func (*EventPadGroupMode) SetSendEvent

func (e *EventPadGroupMode) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventPadGroupMode) SetTime

func (e *EventPadGroupMode) SetTime(time uint32)

Time: time of the event in milliseconds.

func (*EventPadGroupMode) Time

func (e *EventPadGroupMode) Time() uint32

Time: time of the event in milliseconds.

func (*EventPadGroupMode) Type

func (e *EventPadGroupMode) Type() EventType

Type: type of the event (GDK_PAD_GROUP_MODE).

func (*EventPadGroupMode) Window

func (e *EventPadGroupMode) Window() Windower

Window: window which received the event.

type EventProperty

type EventProperty struct {
	// contains filtered or unexported fields
}

EventProperty describes a property change on a window.

An instance of this type is always passed by reference.

type EventProximity

type EventProximity struct {
	// contains filtered or unexported fields
}

EventProximity: proximity events are generated when using GDK’s wrapper for the XInput extension. The XInput extension is an add-on for standard X that allows you to use nonstandard devices such as graphics tablets. A proximity event indicates that the stylus has moved in or out of contact with the tablet, or perhaps that the user’s finger has moved in or out of contact with a touch screen.

This event type will be used pretty rarely. It only is important for XInput aware programs that are drawing their own cursor.

An instance of this type is always passed by reference.

func (*EventProximity) Device

func (e *EventProximity) Device() Devicer

Device: master device that the event originated from. Use gdk_event_get_source_device() to get the slave device.

func (*EventProximity) SendEvent

func (e *EventProximity) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventProximity) SetSendEvent

func (e *EventProximity) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventProximity) SetTime

func (e *EventProximity) SetTime(time uint32)

Time: time of the event in milliseconds.

func (*EventProximity) Time

func (e *EventProximity) Time() uint32

Time: time of the event in milliseconds.

func (*EventProximity) Type

func (e *EventProximity) Type() EventType

Type: type of the event (GDK_PROXIMITY_IN or GDK_PROXIMITY_OUT).

func (*EventProximity) Window

func (e *EventProximity) Window() Windower

Window: window which received the event.

type EventScroll

type EventScroll struct {
	// contains filtered or unexported fields
}

EventScroll: generated from button presses for the buttons 4 to 7. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned.

Some GDK backends can also generate “smooth” scroll events, which can be recognized by the GDK_SCROLL_SMOOTH scroll direction. For these, the scroll deltas can be obtained with gdk_event_get_scroll_deltas().

An instance of this type is always passed by reference.

func (*EventScroll) DeltaX

func (e *EventScroll) DeltaX() float64

DeltaX: x coordinate of the scroll delta.

func (*EventScroll) DeltaY

func (e *EventScroll) DeltaY() float64

DeltaY: y coordinate of the scroll delta.

func (*EventScroll) Device

func (e *EventScroll) Device() Devicer

Device: master device that the event originated from. Use gdk_event_get_source_device() to get the slave device.

func (*EventScroll) Direction

func (e *EventScroll) Direction() ScrollDirection

Direction: direction to scroll to (one of GDK_SCROLL_UP, GDK_SCROLL_DOWN, GDK_SCROLL_LEFT, GDK_SCROLL_RIGHT or GDK_SCROLL_SMOOTH).

func (*EventScroll) SendEvent

func (e *EventScroll) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventScroll) SetDeltaX

func (e *EventScroll) SetDeltaX(deltaX float64)

DeltaX: x coordinate of the scroll delta.

func (*EventScroll) SetDeltaY

func (e *EventScroll) SetDeltaY(deltaY float64)

DeltaY: y coordinate of the scroll delta.

func (*EventScroll) SetSendEvent

func (e *EventScroll) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventScroll) SetTime

func (e *EventScroll) SetTime(time uint32)

Time: time of the event in milliseconds.

func (*EventScroll) SetX

func (e *EventScroll) SetX(x float64)

X: x coordinate of the pointer relative to the window.

func (*EventScroll) SetXRoot

func (e *EventScroll) SetXRoot(xRoot float64)

XRoot: x coordinate of the pointer relative to the root of the screen.

func (*EventScroll) SetY

func (e *EventScroll) SetY(y float64)

Y: y coordinate of the pointer relative to the window.

func (*EventScroll) SetYRoot

func (e *EventScroll) SetYRoot(yRoot float64)

YRoot: y coordinate of the pointer relative to the root of the screen.

func (*EventScroll) State

func (e *EventScroll) State() ModifierType

State: bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See ModifierType.

func (*EventScroll) Time

func (e *EventScroll) Time() uint32

Time: time of the event in milliseconds.

func (*EventScroll) Type

func (e *EventScroll) Type() EventType

Type: type of the event (GDK_SCROLL).

func (*EventScroll) Window

func (e *EventScroll) Window() Windower

Window: window which received the event.

func (*EventScroll) X

func (e *EventScroll) X() float64

X: x coordinate of the pointer relative to the window.

func (*EventScroll) XRoot

func (e *EventScroll) XRoot() float64

XRoot: x coordinate of the pointer relative to the root of the screen.

func (*EventScroll) Y

func (e *EventScroll) Y() float64

Y: y coordinate of the pointer relative to the window.

func (*EventScroll) YRoot

func (e *EventScroll) YRoot() float64

YRoot: y coordinate of the pointer relative to the root of the screen.

type EventSelection

type EventSelection struct {
	// contains filtered or unexported fields
}

EventSelection: generated when a selection is requested or ownership of a selection is taken over by another client application.

An instance of this type is always passed by reference.

type EventSequence

type EventSequence struct {
	// contains filtered or unexported fields
}

EventSequence: instance of this type is always passed by reference.

type EventSetting

type EventSetting struct {
	// contains filtered or unexported fields
}

EventSetting: generated when a setting is modified.

An instance of this type is always passed by reference.

func (*EventSetting) Action

func (e *EventSetting) Action() SettingAction

Action: what happened to the setting (GDK_SETTING_ACTION_NEW, GDK_SETTING_ACTION_CHANGED or GDK_SETTING_ACTION_DELETED).

func (*EventSetting) Name

func (e *EventSetting) Name() string

Name: name of the setting.

func (*EventSetting) SendEvent

func (e *EventSetting) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventSetting) SetSendEvent

func (e *EventSetting) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventSetting) Type

func (e *EventSetting) Type() EventType

Type: type of the event (GDK_SETTING).

func (*EventSetting) Window

func (e *EventSetting) Window() Windower

Window: window which received the event.

type EventTouch

type EventTouch struct {
	// contains filtered or unexported fields
}

EventTouch: used for touch events. type field will be one of GDK_TOUCH_BEGIN, GDK_TOUCH_UPDATE, GDK_TOUCH_END or GDK_TOUCH_CANCEL.

Touch events are grouped into sequences by means of the sequence field, which can also be obtained with gdk_event_get_event_sequence(). Each sequence begins with a GDK_TOUCH_BEGIN event, followed by any number of GDK_TOUCH_UPDATE events, and ends with a GDK_TOUCH_END (or GDK_TOUCH_CANCEL) event. With multitouch devices, there may be several active sequences at the same time.

An instance of this type is always passed by reference.

func (*EventTouch) Axes

func (e *EventTouch) Axes() *float64

Axes: x, y translated to the axes of device, or NULL if device is the mouse.

func (*EventTouch) Device

func (e *EventTouch) Device() Devicer

Device: master device that the event originated from. Use gdk_event_get_source_device() to get the slave device.

func (*EventTouch) EmulatingPointer

func (e *EventTouch) EmulatingPointer() bool

EmulatingPointer: whether the event should be used for emulating pointer event.

func (*EventTouch) SendEvent

func (e *EventTouch) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventTouch) Sequence

func (e *EventTouch) Sequence() *EventSequence

Sequence: event sequence that the event belongs to.

func (*EventTouch) SetEmulatingPointer

func (e *EventTouch) SetEmulatingPointer(emulatingPointer bool)

EmulatingPointer: whether the event should be used for emulating pointer event.

func (*EventTouch) SetSendEvent

func (e *EventTouch) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventTouch) SetTime

func (e *EventTouch) SetTime(time uint32)

Time: time of the event in milliseconds.

func (*EventTouch) SetX

func (e *EventTouch) SetX(x float64)

X: x coordinate of the pointer relative to the window.

func (*EventTouch) SetXRoot

func (e *EventTouch) SetXRoot(xRoot float64)

XRoot: x coordinate of the pointer relative to the root of the screen.

func (*EventTouch) SetY

func (e *EventTouch) SetY(y float64)

Y: y coordinate of the pointer relative to the window.

func (*EventTouch) SetYRoot

func (e *EventTouch) SetYRoot(yRoot float64)

YRoot: y coordinate of the pointer relative to the root of the screen.

func (*EventTouch) State

func (e *EventTouch) State() ModifierType

State: bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See ModifierType.

func (*EventTouch) Time

func (e *EventTouch) Time() uint32

Time: time of the event in milliseconds.

func (*EventTouch) Type

func (e *EventTouch) Type() EventType

Type: type of the event (GDK_TOUCH_BEGIN, GDK_TOUCH_UPDATE, GDK_TOUCH_END, GDK_TOUCH_CANCEL).

func (*EventTouch) Window

func (e *EventTouch) Window() Windower

Window: window which received the event.

func (*EventTouch) X

func (e *EventTouch) X() float64

X: x coordinate of the pointer relative to the window.

func (*EventTouch) XRoot

func (e *EventTouch) XRoot() float64

XRoot: x coordinate of the pointer relative to the root of the screen.

func (*EventTouch) Y

func (e *EventTouch) Y() float64

Y: y coordinate of the pointer relative to the window.

func (*EventTouch) YRoot

func (e *EventTouch) YRoot() float64

YRoot: y coordinate of the pointer relative to the root of the screen.

type EventTouchpadPinch

type EventTouchpadPinch struct {
	// contains filtered or unexported fields
}

EventTouchpadPinch: generated during touchpad swipe gestures.

An instance of this type is always passed by reference.

func (*EventTouchpadPinch) AngleDelta

func (e *EventTouchpadPinch) AngleDelta() float64

AngleDelta: angle change in radians, negative angles denote counter-clockwise movements.

func (*EventTouchpadPinch) Dx

func (e *EventTouchpadPinch) Dx() float64

Dx: movement delta in the X axis of the swipe focal point.

func (*EventTouchpadPinch) Dy

func (e *EventTouchpadPinch) Dy() float64

Dy: movement delta in the Y axis of the swipe focal point.

func (*EventTouchpadPinch) NFingers

func (e *EventTouchpadPinch) NFingers() int8

NFingers: number of fingers triggering the pinch.

func (*EventTouchpadPinch) Phase

func (e *EventTouchpadPinch) Phase() int8

Phase: current phase of the gesture.

func (*EventTouchpadPinch) Scale

func (e *EventTouchpadPinch) Scale() float64

Scale: current scale, relative to that at the time of the corresponding GDK_TOUCHPAD_GESTURE_PHASE_BEGIN event.

func (*EventTouchpadPinch) SendEvent

func (e *EventTouchpadPinch) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventTouchpadPinch) SetAngleDelta

func (e *EventTouchpadPinch) SetAngleDelta(angleDelta float64)

AngleDelta: angle change in radians, negative angles denote counter-clockwise movements.

func (*EventTouchpadPinch) SetDx

func (e *EventTouchpadPinch) SetDx(dx float64)

Dx: movement delta in the X axis of the swipe focal point.

func (*EventTouchpadPinch) SetDy

func (e *EventTouchpadPinch) SetDy(dy float64)

Dy: movement delta in the Y axis of the swipe focal point.

func (*EventTouchpadPinch) SetNFingers

func (e *EventTouchpadPinch) SetNFingers(nFingers int8)

NFingers: number of fingers triggering the pinch.

func (*EventTouchpadPinch) SetPhase

func (e *EventTouchpadPinch) SetPhase(phase int8)

Phase: current phase of the gesture.

func (*EventTouchpadPinch) SetScale

func (e *EventTouchpadPinch) SetScale(scale float64)

Scale: current scale, relative to that at the time of the corresponding GDK_TOUCHPAD_GESTURE_PHASE_BEGIN event.

func (*EventTouchpadPinch) SetSendEvent

func (e *EventTouchpadPinch) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventTouchpadPinch) SetTime

func (e *EventTouchpadPinch) SetTime(time uint32)

Time: time of the event in milliseconds.

func (*EventTouchpadPinch) SetX

func (e *EventTouchpadPinch) SetX(x float64)

X coordinate of the pointer.

func (*EventTouchpadPinch) SetXRoot

func (e *EventTouchpadPinch) SetXRoot(xRoot float64)

XRoot: x coordinate of the pointer, relative to the root of the screen.

func (*EventTouchpadPinch) SetY

func (e *EventTouchpadPinch) SetY(y float64)

Y coordinate of the pointer.

func (*EventTouchpadPinch) SetYRoot

func (e *EventTouchpadPinch) SetYRoot(yRoot float64)

YRoot: y coordinate of the pointer, relative to the root of the screen.

func (*EventTouchpadPinch) State

func (e *EventTouchpadPinch) State() ModifierType

State: bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See ModifierType.

func (*EventTouchpadPinch) Time

func (e *EventTouchpadPinch) Time() uint32

Time: time of the event in milliseconds.

func (*EventTouchpadPinch) Type

func (e *EventTouchpadPinch) Type() EventType

Type: type of the event (GDK_TOUCHPAD_PINCH).

func (*EventTouchpadPinch) Window

func (e *EventTouchpadPinch) Window() Windower

Window: window which received the event.

func (*EventTouchpadPinch) X

func (e *EventTouchpadPinch) X() float64

X coordinate of the pointer.

func (*EventTouchpadPinch) XRoot

func (e *EventTouchpadPinch) XRoot() float64

XRoot: x coordinate of the pointer, relative to the root of the screen.

func (*EventTouchpadPinch) Y

func (e *EventTouchpadPinch) Y() float64

Y coordinate of the pointer.

func (*EventTouchpadPinch) YRoot

func (e *EventTouchpadPinch) YRoot() float64

YRoot: y coordinate of the pointer, relative to the root of the screen.

type EventTouchpadSwipe

type EventTouchpadSwipe struct {
	// contains filtered or unexported fields
}

EventTouchpadSwipe: generated during touchpad swipe gestures.

An instance of this type is always passed by reference.

func (*EventTouchpadSwipe) Dx

func (e *EventTouchpadSwipe) Dx() float64

Dx: movement delta in the X axis of the swipe focal point.

func (*EventTouchpadSwipe) Dy

func (e *EventTouchpadSwipe) Dy() float64

Dy: movement delta in the Y axis of the swipe focal point.

func (*EventTouchpadSwipe) NFingers

func (e *EventTouchpadSwipe) NFingers() int8

NFingers: number of fingers triggering the swipe.

func (*EventTouchpadSwipe) Phase

func (e *EventTouchpadSwipe) Phase() int8

Phase: current phase of the gesture.

func (*EventTouchpadSwipe) SendEvent

func (e *EventTouchpadSwipe) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventTouchpadSwipe) SetDx

func (e *EventTouchpadSwipe) SetDx(dx float64)

Dx: movement delta in the X axis of the swipe focal point.

func (*EventTouchpadSwipe) SetDy

func (e *EventTouchpadSwipe) SetDy(dy float64)

Dy: movement delta in the Y axis of the swipe focal point.

func (*EventTouchpadSwipe) SetNFingers

func (e *EventTouchpadSwipe) SetNFingers(nFingers int8)

NFingers: number of fingers triggering the swipe.

func (*EventTouchpadSwipe) SetPhase

func (e *EventTouchpadSwipe) SetPhase(phase int8)

Phase: current phase of the gesture.

func (*EventTouchpadSwipe) SetSendEvent

func (e *EventTouchpadSwipe) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventTouchpadSwipe) SetTime

func (e *EventTouchpadSwipe) SetTime(time uint32)

Time: time of the event in milliseconds.

func (*EventTouchpadSwipe) SetX

func (e *EventTouchpadSwipe) SetX(x float64)

X coordinate of the pointer.

func (*EventTouchpadSwipe) SetXRoot

func (e *EventTouchpadSwipe) SetXRoot(xRoot float64)

XRoot: x coordinate of the pointer, relative to the root of the screen.

func (*EventTouchpadSwipe) SetY

func (e *EventTouchpadSwipe) SetY(y float64)

Y coordinate of the pointer.

func (*EventTouchpadSwipe) SetYRoot

func (e *EventTouchpadSwipe) SetYRoot(yRoot float64)

YRoot: y coordinate of the pointer, relative to the root of the screen.

func (*EventTouchpadSwipe) State

func (e *EventTouchpadSwipe) State() ModifierType

State: bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See ModifierType.

func (*EventTouchpadSwipe) Time

func (e *EventTouchpadSwipe) Time() uint32

Time: time of the event in milliseconds.

func (*EventTouchpadSwipe) Type

func (e *EventTouchpadSwipe) Type() EventType

Type: type of the event (GDK_TOUCHPAD_SWIPE).

func (*EventTouchpadSwipe) Window

func (e *EventTouchpadSwipe) Window() Windower

Window: window which received the event.

func (*EventTouchpadSwipe) X

func (e *EventTouchpadSwipe) X() float64

X coordinate of the pointer.

func (*EventTouchpadSwipe) XRoot

func (e *EventTouchpadSwipe) XRoot() float64

XRoot: x coordinate of the pointer, relative to the root of the screen.

func (*EventTouchpadSwipe) Y

func (e *EventTouchpadSwipe) Y() float64

Y coordinate of the pointer.

func (*EventTouchpadSwipe) YRoot

func (e *EventTouchpadSwipe) YRoot() float64

YRoot: y coordinate of the pointer, relative to the root of the screen.

type EventType

type EventType C.gint

EventType specifies the type of the event.

Do not confuse these events with the signals that GTK+ widgets emit. Although many of these events result in corresponding signals being emitted, the events are often transformed or filtered along the way.

In some language bindings, the values GDK_2BUTTON_PRESS and GDK_3BUTTON_PRESS would translate into something syntactically invalid (eg Gdk.EventType.2ButtonPress, where a symbol is not allowed to start with a number). In that case, the aliases GDK_DOUBLE_BUTTON_PRESS and GDK_TRIPLE_BUTTON_PRESS can be used instead.

const (
	// NothingType: special code to indicate a null event.
	NothingType EventType = -1
	// DeleteType: window manager has requested that the toplevel window be
	// hidden or destroyed, usually when the user clicks on a special icon in
	// the title bar.
	DeleteType EventType = 0
	// DestroyType: window has been destroyed.
	DestroyType EventType = 1
	// ExposeType: all or part of the window has become visible and needs to be
	// redrawn.
	ExposeType EventType = 2
	// MotionNotifyType: pointer (usually a mouse) has moved.
	MotionNotifyType EventType = 3
	// ButtonPressType: mouse button has been pressed.
	ButtonPressType EventType = 4
	// TwoButtonPressType: mouse button has been double-clicked (clicked twice
	// within a short period of time). Note that each click also generates a
	// GDK_BUTTON_PRESS event.
	TwoButtonPressType EventType = 5
	// DoubleButtonPressType alias for GDK_2BUTTON_PRESS, added in 3.6.
	DoubleButtonPressType EventType = 5
	// ThreeButtonPressType: mouse button has been clicked 3 times in a short
	// period of time. Note that each click also generates a GDK_BUTTON_PRESS
	// event.
	ThreeButtonPressType EventType = 6
	// TripleButtonPressType alias for GDK_3BUTTON_PRESS, added in 3.6.
	TripleButtonPressType EventType = 6
	// ButtonReleaseType: mouse button has been released.
	ButtonReleaseType EventType = 7
	// KeyPressType: key has been pressed.
	KeyPressType EventType = 8
	// KeyReleaseType: key has been released.
	KeyReleaseType EventType = 9
	// EnterNotifyType: pointer has entered the window.
	EnterNotifyType EventType = 10
	// LeaveNotifyType: pointer has left the window.
	LeaveNotifyType EventType = 11
	// FocusChangeType: keyboard focus has entered or left the window.
	FocusChangeType EventType = 12
	// ConfigureType: size, position or stacking order of the window has
	// changed. Note that GTK+ discards these events for GDK_WINDOW_CHILD
	// windows.
	ConfigureType EventType = 13
	// MapType: window has been mapped.
	MapType EventType = 14
	// UnmapType: window has been unmapped.
	UnmapType EventType = 15
	// PropertyNotifyType: property on the window has been changed or deleted.
	PropertyNotifyType EventType = 16
	// SelectionClearType: application has lost ownership of a selection.
	SelectionClearType EventType = 17
	// SelectionRequestType: another application has requested a selection.
	SelectionRequestType EventType = 18
	// SelectionNotifyType: selection has been received.
	SelectionNotifyType EventType = 19
	// ProximityInType: input device has moved into contact with a sensing
	// surface (e.g. a touchscreen or graphics tablet).
	ProximityInType EventType = 20
	// ProximityOutType: input device has moved out of contact with a sensing
	// surface.
	ProximityOutType EventType = 21
	// DragEnterType: mouse has entered the window while a drag is in progress.
	DragEnterType EventType = 22
	// DragLeaveType: mouse has left the window while a drag is in progress.
	DragLeaveType EventType = 23
	// DragMotionType: mouse has moved in the window while a drag is in
	// progress.
	DragMotionType EventType = 24
	// DragStatusType status of the drag operation initiated by the window has
	// changed.
	DragStatusType EventType = 25
	// DropStartType: drop operation onto the window has started.
	DropStartType EventType = 26
	// DropFinishedType: drop operation initiated by the window has completed.
	DropFinishedType EventType = 27
	// ClientEventType: message has been received from another application.
	ClientEventType EventType = 28
	// VisibilityNotifyType: window visibility status has changed.
	VisibilityNotifyType EventType = 29
	// ScrollType: scroll wheel was turned.
	ScrollType EventType = 31
	// WindowStateType: state of a window has changed. See WindowState for the
	// possible window states.
	WindowStateType EventType = 32
	// SettingType: setting has been modified.
	SettingType EventType = 33
	// OwnerChangeType: owner of a selection has changed. This event type was
	// added in 2.6.
	OwnerChangeType EventType = 34
	// GrabBrokenType: pointer or keyboard grab was broken. This event type was
	// added in 2.8.
	GrabBrokenType EventType = 35
	// DamageType: content of the window has been changed. This event type was
	// added in 2.14.
	DamageType EventType = 36
	// TouchBeginType: new touch event sequence has just started. This event
	// type was added in 3.4.
	TouchBeginType EventType = 37
	// TouchUpdateType: touch event sequence has been updated. This event type
	// was added in 3.4.
	TouchUpdateType EventType = 38
	// TouchEndType: touch event sequence has finished. This event type was
	// added in 3.4.
	TouchEndType EventType = 39
	// TouchCancelType: touch event sequence has been canceled. This event type
	// was added in 3.4.
	TouchCancelType EventType = 40
	// TouchpadSwipeType: touchpad swipe gesture event, the current state is
	// determined by its phase field. This event type was added in 3.18.
	TouchpadSwipeType EventType = 41
	// TouchpadPinchType: touchpad pinch gesture event, the current state is
	// determined by its phase field. This event type was added in 3.18.
	TouchpadPinchType EventType = 42
	// PadButtonPressType: tablet pad button press event. This event type was
	// added in 3.22.
	PadButtonPressType EventType = 43
	// PadButtonReleaseType: tablet pad button release event. This event type
	// was added in 3.22.
	PadButtonReleaseType EventType = 44
	// PadRingType: tablet pad axis event from a "ring". This event type was
	// added in 3.22.
	PadRingType EventType = 45
	// PadStripType: tablet pad axis event from a "strip". This event type was
	// added in 3.22.
	PadStripType EventType = 46
	// PadGroupModeType: tablet pad group mode change. This event type was added
	// in 3.22.
	PadGroupModeType EventType = 47
	// EventLastType marks the end of the GdkEventType enumeration. Added in
	// 2.18.
	EventLastType EventType = 48
)

func (EventType) String

func (e EventType) String() string

String returns the name in string for EventType.

type EventVisibility deprecated

type EventVisibility struct {
	// contains filtered or unexported fields
}

EventVisibility: generated when the window visibility status has changed.

Deprecated: Modern composited windowing systems with pervasive transparency make it impossible to track the visibility of a window reliably, so this event can not be guaranteed to provide useful information.

An instance of this type is always passed by reference.

func (*EventVisibility) SendEvent

func (e *EventVisibility) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventVisibility) SetSendEvent

func (e *EventVisibility) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventVisibility) State

func (e *EventVisibility) State() VisibilityState

State: new visibility state (GDK_VISIBILITY_FULLY_OBSCURED, GDK_VISIBILITY_PARTIAL or GDK_VISIBILITY_UNOBSCURED).

func (*EventVisibility) Type

func (e *EventVisibility) Type() EventType

Type: type of the event (GDK_VISIBILITY_NOTIFY).

func (*EventVisibility) Window

func (e *EventVisibility) Window() Windower

Window: window which received the event.

type EventWindowState

type EventWindowState struct {
	// contains filtered or unexported fields
}

EventWindowState: generated when the state of a toplevel window changes.

An instance of this type is always passed by reference.

func (*EventWindowState) ChangedMask

func (e *EventWindowState) ChangedMask() WindowState

ChangedMask: mask specifying what flags have changed.

func (*EventWindowState) NewWindowState

func (e *EventWindowState) NewWindowState() WindowState

NewWindowState: new window state, a combination of WindowState bits.

func (*EventWindowState) SendEvent

func (e *EventWindowState) SendEvent() int8

SendEvent: TRUE if the event was sent explicitly.

func (*EventWindowState) SetSendEvent

func (e *EventWindowState) SetSendEvent(sendEvent int8)

SendEvent: TRUE if the event was sent explicitly.

func (*EventWindowState) Type

func (e *EventWindowState) Type() EventType

Type: type of the event (GDK_WINDOW_STATE).

func (*EventWindowState) Window

func (e *EventWindowState) Window() Windower

Window: window which received the event.

type Eventer

type Eventer interface {
	// contains filtered or unexported methods
}

Eventer is used for all functions that accept any kind of Event.

type FilterReturn

type FilterReturn C.gint

FilterReturn specifies the result of applying a FilterFunc to a native event.

const (
	// FilterContinue: event not handled, continue processing.
	FilterContinue FilterReturn = iota
	// FilterTranslate: native event translated into a GDK event and stored in
	// the event structure that was passed in.
	FilterTranslate
	// FilterRemove: event handled, terminate processing.
	FilterRemove
)

func (FilterReturn) String

func (f FilterReturn) String() string

String returns the name in string for FilterReturn.

type FrameClock

type FrameClock struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

FrameClock tells the application when to update and repaint a window. This may be synced to the vertical refresh rate of the monitor, for example. Even when the frame clock uses a simple timer rather than a hardware-based vertical sync, the frame clock helps because it ensures everything paints at the same time (reducing the total number of frames). The frame clock can also automatically stop painting when it knows the frames will not be visible, or scale back animation framerates.

FrameClock is designed to be compatible with an OpenGL-based implementation or with mozRequestAnimationFrame in Firefox, for example.

A frame clock is idle until someone requests a frame with gdk_frame_clock_request_phase(). At some later point that makes sense for the synchronization being implemented, the clock will process a frame and emit signals for each phase that has been requested. (See the signals of the FrameClock class for documentation of the phases. GDK_FRAME_CLOCK_PHASE_UPDATE and the FrameClock::update signal are most interesting for application writers, and are used to update the animations, using the frame time given by gdk_frame_clock_get_frame_time().

The frame time is reported in microseconds and generally in the same timescale as g_get_monotonic_time(), however, it is not the same as g_get_monotonic_time(). The frame time does not advance during the time a frame is being painted, and outside of a frame, an attempt is made so that all calls to gdk_frame_clock_get_frame_time() that are called at a “similar” time get the same value. This means that if different animations are timed by looking at the difference in time between an initial value from gdk_frame_clock_get_frame_time() and the value inside the FrameClock::update signal of the clock, they will stay exactly synchronized.

func BaseFrameClock

func BaseFrameClock(obj FrameClocker) *FrameClock

BaseFrameClock returns the underlying base object.

func (*FrameClock) BeginUpdating

func (frameClock *FrameClock) BeginUpdating()

BeginUpdating starts updates for an animation. Until a matching call to gdk_frame_clock_end_updating() is made, the frame clock will continually request a new frame with the GDK_FRAME_CLOCK_PHASE_UPDATE phase. This function may be called multiple times and frames will be requested until gdk_frame_clock_end_updating() is called the same number of times.

func (*FrameClock) ConnectAfterPaint

func (frameClock *FrameClock) ConnectAfterPaint(f func()) coreglib.SignalHandle

ConnectAfterPaint: this signal ends processing of the frame. Applications should generally not handle this signal.

func (*FrameClock) ConnectBeforePaint

func (frameClock *FrameClock) ConnectBeforePaint(f func()) coreglib.SignalHandle

ConnectBeforePaint: this signal begins processing of the frame. Applications should generally not handle this signal.

func (*FrameClock) ConnectFlushEvents

func (frameClock *FrameClock) ConnectFlushEvents(f func()) coreglib.SignalHandle

ConnectFlushEvents: this signal is used to flush pending motion events that are being batched up and compressed together. Applications should not handle this signal.

func (*FrameClock) ConnectLayout

func (frameClock *FrameClock) ConnectLayout(f func()) coreglib.SignalHandle

ConnectLayout: this signal is emitted as the second step of toolkit and application processing of the frame. Any work to update sizes and positions of application elements should be performed. GTK+ normally handles this internally.

func (*FrameClock) ConnectPaint

func (frameClock *FrameClock) ConnectPaint(f func()) coreglib.SignalHandle

ConnectPaint: this signal is emitted as the third step of toolkit and application processing of the frame. The frame is repainted. GDK normally handles this internally and produces expose events, which are turned into GTK+ Widget::draw signals.

func (*FrameClock) ConnectResumeEvents

func (frameClock *FrameClock) ConnectResumeEvents(f func()) coreglib.SignalHandle

ConnectResumeEvents: this signal is emitted after processing of the frame is finished, and is handled internally by GTK+ to resume normal event processing. Applications should not handle this signal.

func (*FrameClock) ConnectUpdate

func (frameClock *FrameClock) ConnectUpdate(f func()) coreglib.SignalHandle

ConnectUpdate: this signal is emitted as the first step of toolkit and application processing of the frame. Animations should be updated using gdk_frame_clock_get_frame_time(). Applications can connect directly to this signal, or use gtk_widget_add_tick_callback() as a more convenient interface.

func (*FrameClock) CurrentTimings

func (frameClock *FrameClock) CurrentTimings() *FrameTimings

CurrentTimings gets the frame timings for the current frame.

The function returns the following values:

  • frameTimings (optional) for the frame currently being processed, or even no frame is being processed, for the previous frame. Before any frames have been processed, returns NULL.

func (*FrameClock) EndUpdating

func (frameClock *FrameClock) EndUpdating()

EndUpdating stops updates for an animation. See the documentation for gdk_frame_clock_begin_updating().

func (*FrameClock) FrameCounter

func (frameClock *FrameClock) FrameCounter() int64

FrameCounter maintains a 64-bit counter that increments for each frame drawn.

The function returns the following values:

  • gint64: inside frame processing, the value of the frame counter for the current frame. Outside of frame processing, the frame counter for the last frame.

func (*FrameClock) FrameTime

func (frameClock *FrameClock) FrameTime() int64

FrameTime gets the time that should currently be used for animations. Inside the processing of a frame, it’s the time used to compute the animation position of everything in a frame. Outside of a frame, it's the time of the conceptual “previous frame,” which may be either the actual previous frame time, or if that’s too old, an updated time.

The function returns the following values:

  • gint64: timestamp in microseconds, in the timescale of of g_get_monotonic_time().

func (*FrameClock) HistoryStart

func (frameClock *FrameClock) HistoryStart() int64

HistoryStart internally keeps a history of FrameTimings objects for recent frames that can be retrieved with gdk_frame_clock_get_timings(). The set of stored frames is the set from the counter values given by gdk_frame_clock_get_history_start() and gdk_frame_clock_get_frame_counter(), inclusive.

The function returns the following values:

  • gint64: frame counter value for the oldest frame that is available in the internal frame history of the FrameClock.

func (*FrameClock) RefreshInfo

func (frameClock *FrameClock) RefreshInfo(baseTime int64) (refreshIntervalReturn, presentationTimeReturn int64)

RefreshInfo: using the frame history stored in the frame clock, finds the last known presentation time and refresh interval, and assuming that presentation times are separated by the refresh interval, predicts a presentation time that is a multiple of the refresh interval after the last presentation time, and later than base_time.

The function takes the following parameters:

  • baseTime: base time for determining a presentaton time.

The function returns the following values:

  • refreshIntervalReturn (optional): location to store the determined refresh interval, or NULL. A default refresh interval of 1/60th of a second will be stored if no history is present.
  • presentationTimeReturn: location to store the next candidate presentation time after the given base time. 0 will be will be stored if no history is present.

func (*FrameClock) RequestPhase

func (frameClock *FrameClock) RequestPhase(phase FrameClockPhase)

RequestPhase asks the frame clock to run a particular phase. The signal corresponding the requested phase will be emitted the next time the frame clock processes. Multiple calls to gdk_frame_clock_request_phase() will be combined together and only one frame processed. If you are displaying animated content and want to continually request the GDK_FRAME_CLOCK_PHASE_UPDATE phase for a period of time, you should use gdk_frame_clock_begin_updating() instead, since this allows GTK+ to adjust system parameters to get maximally smooth animations.

The function takes the following parameters:

  • phase that is requested.

func (*FrameClock) Timings

func (frameClock *FrameClock) Timings(frameCounter int64) *FrameTimings

Timings retrieves a FrameTimings object holding timing information for the current frame or a recent frame. The FrameTimings object may not yet be complete: see gdk_frame_timings_get_complete().

The function takes the following parameters:

  • frameCounter: frame counter value identifying the frame to be received.

The function returns the following values:

  • frameTimings (optional) object for the specified frame, or NULL if it is not available. See gdk_frame_clock_get_history_start().

type FrameClockPhase

type FrameClockPhase C.guint

FrameClockPhase is used to represent the different paint clock phases that can be requested. The elements of the enumeration correspond to the signals of FrameClock.

const (
	// FrameClockPhaseNone: no phase.
	FrameClockPhaseNone FrameClockPhase = 0b0
	// FrameClockPhaseFlushEvents corresponds to GdkFrameClock::flush-events.
	// Should not be handled by applications.
	FrameClockPhaseFlushEvents FrameClockPhase = 0b1
	// FrameClockPhaseBeforePaint corresponds to GdkFrameClock::before-paint.
	// Should not be handled by applications.
	FrameClockPhaseBeforePaint FrameClockPhase = 0b10
	// FrameClockPhaseUpdate corresponds to GdkFrameClock::update.
	FrameClockPhaseUpdate FrameClockPhase = 0b100
	// FrameClockPhaseLayout corresponds to GdkFrameClock::layout.
	FrameClockPhaseLayout FrameClockPhase = 0b1000
	// FrameClockPhasePaint corresponds to GdkFrameClock::paint.
	FrameClockPhasePaint FrameClockPhase = 0b10000
	// FrameClockPhaseResumeEvents corresponds to GdkFrameClock::resume-events.
	// Should not be handled by applications.
	FrameClockPhaseResumeEvents FrameClockPhase = 0b100000
	// FrameClockPhaseAfterPaint corresponds to GdkFrameClock::after-paint.
	// Should not be handled by applications.
	FrameClockPhaseAfterPaint FrameClockPhase = 0b1000000
)

func (FrameClockPhase) Has

func (f FrameClockPhase) Has(other FrameClockPhase) bool

Has returns true if f contains other.

func (FrameClockPhase) String

func (f FrameClockPhase) String() string

String returns the names in string for FrameClockPhase.

type FrameClocker

type FrameClocker interface {
	coreglib.Objector
	// contains filtered or unexported methods
}

FrameClocker describes types inherited from class FrameClock.

To get the original type, the caller must assert this to an interface or another type.

type FrameTimings

type FrameTimings struct {
	// contains filtered or unexported fields
}

FrameTimings object holds timing information for a single frame of the application’s displays. To retrieve FrameTimings objects, use gdk_frame_clock_get_timings() or gdk_frame_clock_get_current_timings(). The information in FrameTimings is useful for precise synchronization of video with the event or audio streams, and for measuring quality metrics for the application’s display, such as latency and jitter.

An instance of this type is always passed by reference.

func (*FrameTimings) Complete

func (timings *FrameTimings) Complete() bool

Complete: timing information in a FrameTimings is filled in incrementally as the frame as drawn and passed off to the window system for processing and display to the user. The accessor functions for FrameTimings can return 0 to indicate an unavailable value for two reasons: either because the information is not yet available, or because it isn't available at all. Once gdk_frame_timings_get_complete() returns TRUE for a frame, you can be certain that no further values will become available and be stored in the FrameTimings.

The function returns the following values:

  • ok: TRUE if all information that will be available for the frame has been filled in.

func (*FrameTimings) FrameCounter

func (timings *FrameTimings) FrameCounter() int64

FrameCounter gets the frame counter value of the FrameClock when this this frame was drawn.

The function returns the following values:

  • gint64: frame counter value for this frame.

func (*FrameTimings) FrameTime

func (timings *FrameTimings) FrameTime() int64

FrameTime returns the frame time for the frame. This is the time value that is typically used to time animations for the frame. See gdk_frame_clock_get_frame_time().

The function returns the following values:

  • gint64: frame time for the frame, in the timescale of g_get_monotonic_time().

func (*FrameTimings) PredictedPresentationTime

func (timings *FrameTimings) PredictedPresentationTime() int64

PredictedPresentationTime gets the predicted time at which this frame will be displayed. Although no predicted time may be available, if one is available, it will be available while the frame is being generated, in contrast to gdk_frame_timings_get_presentation_time(), which is only available after the frame has been presented. In general, if you are simply animating, you should use gdk_frame_clock_get_frame_time() rather than this function, but this function is useful for applications that want exact control over latency. For example, a movie player may want this information for Audio/Video synchronization.

The function returns the following values:

  • gint64: predicted time at which the frame will be presented, in the timescale of g_get_monotonic_time(), or 0 if no predicted presentation time is available.

func (*FrameTimings) PresentationTime

func (timings *FrameTimings) PresentationTime() int64

PresentationTime reurns the presentation time. This is the time at which the frame became visible to the user.

The function returns the following values:

  • gint64: time the frame was displayed to the user, in the timescale of g_get_monotonic_time(), or 0 if no presentation time is available. See gdk_frame_timings_get_complete().

func (*FrameTimings) RefreshInterval

func (timings *FrameTimings) RefreshInterval() int64

RefreshInterval gets the natural interval between presentation times for the display that this frame was displayed on. Frame presentation usually happens during the “vertical blanking interval”.

The function returns the following values:

  • gint64: refresh interval of the display, in microseconds, or 0 if the refresh interval is not available. See gdk_frame_timings_get_complete().

type FullscreenMode

type FullscreenMode C.gint

FullscreenMode indicates which monitor (in a multi-head setup) a window should span over when in fullscreen mode.

const (
	// FullscreenOnCurrentMonitor: fullscreen on current monitor only.
	FullscreenOnCurrentMonitor FullscreenMode = iota
	// FullscreenOnAllMonitors: span across all monitors when fullscreen.
	FullscreenOnAllMonitors
)

func (FullscreenMode) String

func (f FullscreenMode) String() string

String returns the name in string for FullscreenMode.

type GLContext

type GLContext struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

GLContext is an object representing the platform-specific OpenGL drawing context.

GLContexts are created for a Window using gdk_window_create_gl_context(), and the context will match the Visual of the window.

A GLContext is not tied to any particular normal framebuffer. For instance, it cannot draw to the Window back buffer. The GDK repaint system is in full control of the painting to that. Instead, you can create render buffers or textures and use gdk_cairo_draw_from_gl() in the draw function of your widget to draw them. Then GDK will handle the integration of your rendering with that of other widgets.

Support for GLContext is platform-specific, context creation can fail, returning NULL context.

A GLContext has to be made "current" in order to start using it, otherwise any OpenGL call will be ignored.

Creating a new OpenGL context ##

In order to create a new GLContext instance you need a Window, which you typically get during the realize call of a widget.

A GLContext is not realized until either gdk_gl_context_make_current(), or until it is realized using gdk_gl_context_realize(). It is possible to specify details of the GL context like the OpenGL version to be used, or whether the GL context should have extra state validation enabled after calling gdk_window_create_gl_context() by calling gdk_gl_context_realize(). If the realization fails you have the option to change the settings of the GLContext and try again.

Using a GdkGLContext ##

You will need to make the GLContext the current context before issuing OpenGL calls; the system sends OpenGL commands to whichever context is current. It is possible to have multiple contexts, so you always need to ensure that the one which you want to draw with is the current one before issuing commands:

gdk_gl_context_make_current (context);

You can now perform your drawing using OpenGL commands.

You can check which GLContext is the current one by using gdk_gl_context_get_current(); you can also unset any GLContext that is currently set by calling gdk_gl_context_clear_current().

func BaseGLContext

func BaseGLContext(obj GLContexter) *GLContext

BaseGLContext returns the underlying base object.

func (*GLContext) DebugEnabled

func (context *GLContext) DebugEnabled() bool

DebugEnabled retrieves the value set using gdk_gl_context_set_debug_enabled().

The function returns the following values:

  • ok: TRUE if debugging is enabled.

func (*GLContext) Display

func (context *GLContext) Display() *Display

Display retrieves the Display the context is created for.

The function returns the following values:

  • display (optional) or NULL.

func (*GLContext) ForwardCompatible

func (context *GLContext) ForwardCompatible() bool

ForwardCompatible retrieves the value set using gdk_gl_context_set_forward_compatible().

The function returns the following values:

  • ok: TRUE if the context should be forward compatible.

func (*GLContext) IsLegacy

func (context *GLContext) IsLegacy() bool

IsLegacy: whether the GLContext is in legacy mode or not.

The GLContext must be realized before calling this function.

When realizing a GL context, GDK will try to use the OpenGL 3.2 core profile; this profile removes all the OpenGL API that was deprecated prior to the 3.2 version of the specification. If the realization is successful, this function will return FALSE.

If the underlying OpenGL implementation does not support core profiles, GDK will fall back to a pre-3.2 compatibility profile, and this function will return TRUE.

You can use the value returned by this function to decide which kind of OpenGL API to use, or whether to do extension discovery, or what kind of shader programs to load.

The function returns the following values:

  • ok: TRUE if the GL context is in legacy mode.

func (*GLContext) MakeCurrent

func (context *GLContext) MakeCurrent()

MakeCurrent makes the context the current one.

func (*GLContext) Realize

func (context *GLContext) Realize() error

Realize realizes the given GLContext.

It is safe to call this function on a realized GLContext.

func (*GLContext) RequiredVersion

func (context *GLContext) RequiredVersion() (major, minor int)

RequiredVersion retrieves the major and minor version requested by calling gdk_gl_context_set_required_version().

The function returns the following values:

  • major (optional): return location for the major version to request.
  • minor (optional): return location for the minor version to request.

func (*GLContext) SetDebugEnabled

func (context *GLContext) SetDebugEnabled(enabled bool)

SetDebugEnabled sets whether the GLContext should perform extra validations and run time checking. This is useful during development, but has additional overhead.

The GLContext must not be realized or made current prior to calling this function.

The function takes the following parameters:

  • enabled: whether to enable debugging in the context.

func (*GLContext) SetForwardCompatible

func (context *GLContext) SetForwardCompatible(compatible bool)

SetForwardCompatible sets whether the GLContext should be forward compatible.

Forward compatibile contexts must not support OpenGL functionality that has been marked as deprecated in the requested version; non-forward compatible contexts, on the other hand, must support both deprecated and non deprecated functionality.

The GLContext must not be realized or made current prior to calling this function.

The function takes the following parameters:

  • compatible: whether the context should be forward compatible.

func (*GLContext) SetRequiredVersion

func (context *GLContext) SetRequiredVersion(major, minor int)

SetRequiredVersion sets the major and minor version of OpenGL to request.

Setting major and minor to zero will use the default values.

The GLContext must not be realized or made current prior to calling this function.

The function takes the following parameters:

  • major version to request.
  • minor version to request.

func (*GLContext) SetUseES

func (context *GLContext) SetUseES(useEs int)

SetUseES requests that GDK create a OpenGL ES context instead of an OpenGL one, if the platform and windowing system allows it.

The context must not have been realized.

By default, GDK will attempt to automatically detect whether the underlying GL implementation is OpenGL or OpenGL ES once the context is realized.

You should check the return value of gdk_gl_context_get_use_es() after calling gdk_gl_context_realize() to decide whether to use the OpenGL or OpenGL ES API, extensions, or shaders.

The function takes the following parameters:

  • useEs: whether the context should use OpenGL ES instead of OpenGL, or -1 to allow auto-detection.

func (*GLContext) SharedContext

func (context *GLContext) SharedContext() GLContexter

SharedContext retrieves the GLContext that this context share data with.

The function returns the following values:

  • glContext (optional) or NULL.

func (*GLContext) UseES

func (context *GLContext) UseES() bool

UseES checks whether the context is using an OpenGL or OpenGL ES profile.

The function returns the following values:

  • ok: TRUE if the GLContext is using an OpenGL ES profile.

func (*GLContext) Version

func (context *GLContext) Version() (major, minor int)

Version retrieves the OpenGL version of the context.

The context must be realized prior to calling this function.

The function returns the following values:

  • major: return location for the major version.
  • minor: return location for the minor version.

func (*GLContext) Window

func (context *GLContext) Window() Windower

Window retrieves the Window used by the context.

The function returns the following values:

  • window (optional) or NULL.

type GLContexter

type GLContexter interface {
	coreglib.Objector
	// contains filtered or unexported methods
}

GLContexter describes types inherited from class GLContext.

To get the original type, the caller must assert this to an interface or another type.

func GLContextGetCurrent

func GLContextGetCurrent() GLContexter

GLContextGetCurrent retrieves the current GLContext.

The function returns the following values:

  • glContext (optional): current GLContext, or NULL.

type GLError

type GLError C.gint

GLError: error enumeration for GLContext.

const (
	// GLErrorNotAvailable: openGL support is not available.
	GLErrorNotAvailable GLError = iota
	// GLErrorUnsupportedFormat: requested visual format is not supported.
	GLErrorUnsupportedFormat
	// GLErrorUnsupportedProfile: requested profile is not supported.
	GLErrorUnsupportedProfile
)

func (GLError) String

func (g GLError) String() string

String returns the name in string for GLError.

type Geometry

type Geometry struct {
	// contains filtered or unexported fields
}

Geometry struct gives the window manager information about a window’s geometry constraints. Normally you would set these on the GTK+ level using gtk_window_set_geometry_hints(). Window then sets the hints on the Window it creates.

gdk_window_set_geometry_hints() expects the hints to be fully valid already and simply passes them to the window manager; in contrast, gtk_window_set_geometry_hints() performs some interpretation. For example, Window will apply the hints to the geometry widget instead of the toplevel window, if you set a geometry widget. Also, the min_width/min_height/max_width/max_height fields may be set to -1, and Window will substitute the size request of the window or geometry widget. If the minimum size hint is not provided, Window will use its requisition as the minimum size. If the minimum size is provided and a geometry widget is set, Window will take the minimum size as the minimum size of the geometry widget rather than the entire window. The base size is treated similarly.

The canonical use-case for gtk_window_set_geometry_hints() is to get a terminal widget to resize properly. Here, the terminal text area should be the geometry widget; Window will then automatically set the base size to the size of other widgets in the terminal window, such as the menubar and scrollbar. Then, the width_inc and height_inc fields should be set to the size of one character in the terminal. Finally, the base size should be set to the size of one character. The net effect is that the minimum size of the terminal will have a 1x1 character terminal area, and only terminal sizes on the “character grid” will be allowed.

Here’s an example of how the terminal example would be implemented, assuming a terminal area widget called “terminal” and a toplevel window “toplevel”:

	GdkGeometry hints;

	hints.base_width = terminal->char_width;
        hints.base_height = terminal->char_height;
        hints.min_width = terminal->char_width;
        hints.min_height = terminal->char_height;
        hints.width_inc = terminal->char_width;
        hints.height_inc = terminal->char_height;

 gtk_window_set_geometry_hints (GTK_WINDOW (toplevel),
                                GTK_WIDGET (terminal),
                                &hints,
                                GDK_HINT_RESIZE_INC |
                                GDK_HINT_MIN_SIZE |
                                GDK_HINT_BASE_SIZE);

The other useful fields are the min_aspect and max_aspect fields; these contain a width/height ratio as a floating point number. If a geometry widget is set, the aspect applies to the geometry widget rather than the entire window. The most common use of these hints is probably to set min_aspect and max_aspect to the same value, thus forcing the window to keep a constant aspect ratio.

An instance of this type is always passed by reference.

func (*Geometry) BaseHeight

func (g *Geometry) BaseHeight() int

BaseHeight: allowed window widths are base_height + height_inc * N where N is any integer (-1 allowed with Window).

func (*Geometry) BaseWidth

func (g *Geometry) BaseWidth() int

BaseWidth: allowed window widths are base_width + width_inc * N where N is any integer (-1 allowed with Window).

func (*Geometry) HeightInc

func (g *Geometry) HeightInc() int

HeightInc: height resize increment.

func (*Geometry) MaxAspect

func (g *Geometry) MaxAspect() float64

MaxAspect: maximum width/height ratio.

func (*Geometry) MaxHeight

func (g *Geometry) MaxHeight() int

MaxHeight: maximum height of window (or -1 to use requisition, with Window only).

func (*Geometry) MaxWidth

func (g *Geometry) MaxWidth() int

MaxWidth: maximum width of window (or -1 to use requisition, with Window only).

func (*Geometry) MinAspect

func (g *Geometry) MinAspect() float64

MinAspect: minimum width/height ratio.

func (*Geometry) MinHeight

func (g *Geometry) MinHeight() int

MinHeight: minimum height of window (or -1 to use requisition, with Window only).

func (*Geometry) MinWidth

func (g *Geometry) MinWidth() int

MinWidth: minimum width of window (or -1 to use requisition, with Window only).

func (*Geometry) SetBaseHeight

func (g *Geometry) SetBaseHeight(baseHeight int)

BaseHeight: allowed window widths are base_height + height_inc * N where N is any integer (-1 allowed with Window).

func (*Geometry) SetBaseWidth

func (g *Geometry) SetBaseWidth(baseWidth int)

BaseWidth: allowed window widths are base_width + width_inc * N where N is any integer (-1 allowed with Window).

func (*Geometry) SetHeightInc

func (g *Geometry) SetHeightInc(heightInc int)

HeightInc: height resize increment.

func (*Geometry) SetMaxAspect

func (g *Geometry) SetMaxAspect(maxAspect float64)

MaxAspect: maximum width/height ratio.

func (*Geometry) SetMaxHeight

func (g *Geometry) SetMaxHeight(maxHeight int)

MaxHeight: maximum height of window (or -1 to use requisition, with Window only).

func (*Geometry) SetMaxWidth

func (g *Geometry) SetMaxWidth(maxWidth int)

MaxWidth: maximum width of window (or -1 to use requisition, with Window only).

func (*Geometry) SetMinAspect

func (g *Geometry) SetMinAspect(minAspect float64)

MinAspect: minimum width/height ratio.

func (*Geometry) SetMinHeight

func (g *Geometry) SetMinHeight(minHeight int)

MinHeight: minimum height of window (or -1 to use requisition, with Window only).

func (*Geometry) SetMinWidth

func (g *Geometry) SetMinWidth(minWidth int)

MinWidth: minimum width of window (or -1 to use requisition, with Window only).

func (*Geometry) SetWidthInc

func (g *Geometry) SetWidthInc(widthInc int)

WidthInc: width resize increment.

func (*Geometry) WidthInc

func (g *Geometry) WidthInc() int

WidthInc: width resize increment.

func (*Geometry) WinGravity

func (g *Geometry) WinGravity() Gravity

WinGravity: window gravity, see gtk_window_set_gravity().

type GrabOwnership

type GrabOwnership C.gint

GrabOwnership defines how device grabs interact with other devices.

const (
	// OwnershipNone: all other devices’ events are allowed.
	OwnershipNone GrabOwnership = iota
	// OwnershipWindow: other devices’ events are blocked for the grab window.
	OwnershipWindow
	// OwnershipApplication: other devices’ events are blocked for the whole
	// application.
	OwnershipApplication
)

func (GrabOwnership) String

func (g GrabOwnership) String() string

String returns the name in string for GrabOwnership.

type GrabStatus

type GrabStatus C.gint

GrabStatus: returned by gdk_device_grab(), gdk_pointer_grab() and gdk_keyboard_grab() to indicate success or the reason for the failure of the grab attempt.

const (
	// GrabSuccess: resource was successfully grabbed.
	GrabSuccess GrabStatus = iota
	// GrabAlreadyGrabbed: resource is actively grabbed by another client.
	GrabAlreadyGrabbed
	// GrabInvalidTime: resource was grabbed more recently than the specified
	// time.
	GrabInvalidTime
	// GrabNotViewable: grab window or the confine_to window are not viewable.
	GrabNotViewable
	// GrabFrozen: resource is frozen by an active grab of another client.
	GrabFrozen
	// GrabFailed: grab failed for some other reason. Since 3.16.
	GrabFailed
)

func KeyboardGrab deprecated

func KeyboardGrab(window Windower, ownerEvents bool, time_ uint32) GrabStatus

KeyboardGrab grabs the keyboard so that all events are passed to this application until the keyboard is ungrabbed with gdk_keyboard_ungrab(). This overrides any previous keyboard grab by this client.

If you set up anything at the time you take the grab that needs to be cleaned up when the grab ends, you should handle the EventGrabBroken events that are emitted when the grab ends unvoluntarily.

Deprecated: Use gdk_device_grab() instead.

The function takes the following parameters:

  • window which will own the grab (the grab window).
  • ownerEvents: if FALSE then all keyboard events are reported with respect to window. If TRUE then keyboard events for this application are reported as normal, but keyboard events outside this application are reported with respect to window. Both key press and key release events are always reported, independant of the event mask set by the application.
  • time_: timestamp from a Event, or GDK_CURRENT_TIME if no timestamp is available.

The function returns the following values:

  • grabStatus: GDK_GRAB_SUCCESS if the grab was successful.

func PointerGrab deprecated

func PointerGrab(window Windower, ownerEvents bool, eventMask EventMask, confineTo Windower, cursor Cursorrer, time_ uint32) GrabStatus

PointerGrab grabs the pointer (usually a mouse) so that all events are passed to this application until the pointer is ungrabbed with gdk_pointer_ungrab(), or the grab window becomes unviewable. This overrides any previous pointer grab by this client.

Pointer grabs are used for operations which need complete control over mouse events, even if the mouse leaves the application. For example in GTK+ it is used for Drag and Drop, for dragging the handle in the HPaned and VPaned widgets.

Note that if the event mask of an X window has selected both button press and button release events, then a button press event will cause an automatic pointer grab until the button is released. X does this automatically since most applications expect to receive button press and release events in pairs. It is equivalent to a pointer grab on the window with owner_events set to TRUE.

If you set up anything at the time you take the grab that needs to be cleaned up when the grab ends, you should handle the EventGrabBroken events that are emitted when the grab ends unvoluntarily.

Deprecated: Use gdk_device_grab() instead.

The function takes the following parameters:

  • window which will own the grab (the grab window).
  • ownerEvents: if FALSE then all pointer events are reported with respect to window and are only reported if selected by event_mask. If TRUE then pointer events for this application are reported as normal, but pointer events outside this application are reported with respect to window and only if selected by event_mask. In either mode, unreported events are discarded.
  • eventMask specifies the event mask, which is used in accordance with owner_events. Note that only pointer events (i.e. button and motion events) may be selected.
  • confineTo (optional): if non-NULL, the pointer will be confined to this window during the grab. If the pointer is outside confine_to, it will automatically be moved to the closest edge of confine_to and enter and leave events will be generated as necessary.
  • cursor (optional) to display while the grab is active. If this is NULL then the normal cursors are used for window and its descendants, and the cursor for window is used for all other windows.
  • time_: timestamp of the event which led to this pointer grab. This usually comes from a EventButton struct, though GDK_CURRENT_TIME can be used if the time isn’t known.

The function returns the following values:

  • grabStatus: GDK_GRAB_SUCCESS if the grab was successful.

func (GrabStatus) String

func (g GrabStatus) String() string

String returns the name in string for GrabStatus.

type Gravity

type Gravity C.gint

Gravity defines the reference point of a window and the meaning of coordinates passed to gtk_window_move(). See gtk_window_move() and the "implementation notes" section of the Extended Window Manager Hints (http://www.freedesktop.org/Standards/wm-spec) specification for more details.

const (
	// GravityNorthWest: reference point is at the top left corner.
	GravityNorthWest Gravity = 1
	// GravityNorth: reference point is in the middle of the top edge.
	GravityNorth Gravity = 2
	// GravityNorthEast: reference point is at the top right corner.
	GravityNorthEast Gravity = 3
	// GravityWest: reference point is at the middle of the left edge.
	GravityWest Gravity = 4
	// GravityCenter: reference point is at the center of the window.
	GravityCenter Gravity = 5
	// GravityEast: reference point is at the middle of the right edge.
	GravityEast Gravity = 6
	// GravitySouthWest: reference point is at the lower left corner.
	GravitySouthWest Gravity = 7
	// GravitySouth: reference point is at the middle of the lower edge.
	GravitySouth Gravity = 8
	// GravitySouthEast: reference point is at the lower right corner.
	GravitySouthEast Gravity = 9
	// GravityStatic: reference point is at the top left corner of the window
	// itself, ignoring window manager decorations.
	GravityStatic Gravity = 10
)

func (Gravity) String

func (g Gravity) String() string

String returns the name in string for Gravity.

type InputMode

type InputMode C.gint

InputMode: enumeration that describes the mode of an input device.

const (
	// ModeDisabled: device is disabled and will not report any events.
	ModeDisabled InputMode = iota
	// ModeScreen: device is enabled. The device’s coordinate space maps to the
	// entire screen.
	ModeScreen
	// ModeWindow: device is enabled. The device’s coordinate space is mapped to
	// a single window. The manner in which this window is chosen is undefined,
	// but it will typically be the same way in which the focus window for key
	// events is determined.
	ModeWindow
)

func (InputMode) String

func (i InputMode) String() string

String returns the name in string for InputMode.

type InputSource

type InputSource C.gint

InputSource: enumeration describing the type of an input device in general terms.

const (
	// SourceMouse: device is a mouse. (This will be reported for the core
	// pointer, even if it is something else, such as a trackball.).
	SourceMouse InputSource = iota
	// SourcePen: device is a stylus of a graphics tablet or similar device.
	SourcePen
	// SourceEraser: device is an eraser. Typically, this would be the other end
	// of a stylus on a graphics tablet.
	SourceEraser
	// SourceCursor: device is a graphics tablet “puck” or similar device.
	SourceCursor
	// SourceKeyboard: device is a keyboard.
	SourceKeyboard
	// SourceTouchscreen: device is a direct-input touch device, such as a
	// touchscreen or tablet. This device type has been added in 3.4.
	SourceTouchscreen
	// SourceTouchpad: device is an indirect touch device, such as a touchpad.
	// This device type has been added in 3.4.
	SourceTouchpad
	// SourceTrackpoint: device is a trackpoint. This device type has been added
	// in 3.22.
	SourceTrackpoint
	// SourceTabletPad: device is a "pad", a collection of buttons, rings and
	// strips found in drawing tablets. This device type has been added in 3.22.
	SourceTabletPad
)

func (InputSource) String

func (i InputSource) String() string

String returns the name in string for InputSource.

type Keymap

type Keymap struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Keymap defines the translation from keyboard state (including a hardware key, a modifier mask, and active keyboard group) to a keyval. This translation has two phases. The first phase is to determine the effective keyboard group and level for the keyboard state; the second phase is to look up the keycode/group/level triplet in the keymap and see what keyval it corresponds to.

func KeymapGetDefault deprecated

func KeymapGetDefault() *Keymap

KeymapGetDefault returns the Keymap attached to the default display.

Deprecated: Use gdk_keymap_get_for_display() instead.

The function returns the following values:

  • keymap attached to the default display.

func KeymapGetForDisplay

func KeymapGetForDisplay(display *Display) *Keymap

KeymapGetForDisplay returns the Keymap attached to display.

The function takes the following parameters:

  • display: Display.

The function returns the following values:

  • keymap attached to display.

func (*Keymap) CapsLockState

func (keymap *Keymap) CapsLockState() bool

CapsLockState returns whether the Caps Lock modifer is locked.

The function returns the following values:

  • ok: TRUE if Caps Lock is on.

func (*Keymap) ConnectDirectionChanged

func (keymap *Keymap) ConnectDirectionChanged(f func()) coreglib.SignalHandle

ConnectDirectionChanged signal gets emitted when the direction of the keymap changes.

func (*Keymap) ConnectKeysChanged

func (keymap *Keymap) ConnectKeysChanged(f func()) coreglib.SignalHandle

ConnectKeysChanged signal is emitted when the mapping represented by keymap changes.

func (*Keymap) ConnectStateChanged

func (keymap *Keymap) ConnectStateChanged(f func()) coreglib.SignalHandle

ConnectStateChanged signal is emitted when the state of the keyboard changes, e.g when Caps Lock is turned on or off. See gdk_keymap_get_caps_lock_state().

func (*Keymap) Direction

func (keymap *Keymap) Direction() pango.Direction

Direction returns the direction of effective layout of the keymap.

The function returns the following values:

  • direction: PANGO_DIRECTION_LTR or PANGO_DIRECTION_RTL if it can determine the direction. PANGO_DIRECTION_NEUTRAL otherwise.

func (*Keymap) EntriesForKeycode

func (keymap *Keymap) EntriesForKeycode(hardwareKeycode uint) ([]KeymapKey, []uint, bool)

EntriesForKeycode returns the keyvals bound to hardware_keycode. The Nth KeymapKey in keys is bound to the Nth keyval in keyvals. Free the returned arrays with g_free(). When a keycode is pressed by the user, the keyval from this list of entries is selected by considering the effective keyboard group and level. See gdk_keymap_translate_keyboard_state().

The function takes the following parameters:

  • hardwareKeycode: keycode.

The function returns the following values:

  • keys (optional): return location for array of KeymapKey, or NULL.
  • keyvals (optional): return location for array of keyvals, or NULL.
  • ok: TRUE if there were any entries.

func (*Keymap) EntriesForKeyval

func (keymap *Keymap) EntriesForKeyval(keyval uint) ([]KeymapKey, bool)

EntriesForKeyval obtains a list of keycode/group/level combinations that will generate keyval. Groups and levels are two kinds of keyboard mode; in general, the level determines whether the top or bottom symbol on a key is used, and the group determines whether the left or right symbol is used. On US keyboards, the shift key changes the keyboard level, and there are no groups. A group switch key might convert a keyboard between Hebrew to English modes, for example. EventKey contains a group field that indicates the active keyboard group. The level is computed from the modifier mask. The returned array should be freed with g_free().

The function takes the following parameters:

  • keyval: keyval, such as GDK_KEY_a, GDK_KEY_Up, GDK_KEY_Return, etc.

The function returns the following values:

  • keys: return location for an array of KeymapKey.
  • ok: TRUE if keys were found and returned.

func (*Keymap) HaveBidiLayouts

func (keymap *Keymap) HaveBidiLayouts() bool

HaveBidiLayouts determines if keyboard layouts for both right-to-left and left-to-right languages are in use.

The function returns the following values:

  • ok: TRUE if there are layouts in both directions, FALSE otherwise.

func (*Keymap) LookupKey

func (keymap *Keymap) LookupKey(key *KeymapKey) uint

LookupKey looks up the keyval mapped to a keycode/group/level triplet. If no keyval is bound to key, returns 0. For normal user input, you want to use gdk_keymap_translate_keyboard_state() instead of this function, since the effective group/level may not be the same as the current keyboard state.

The function takes the following parameters:

  • key with keycode, group, and level initialized.

The function returns the following values:

  • guint: keyval, or 0 if none was mapped to the given key.

func (*Keymap) ModifierMask

func (keymap *Keymap) ModifierMask(intent ModifierIntent) ModifierType

ModifierMask returns the modifier mask the keymap’s windowing system backend uses for a particular purpose.

Note that this function always returns real hardware modifiers, not virtual ones (e.g. it will return K_MOD1_MASK rather than K_META_MASK if the backend maps MOD1 to META), so there are use cases where the return value of this function has to be transformed by gdk_keymap_add_virtual_modifiers() in order to contain the expected result.

The function takes the following parameters:

  • intent: use case for the modifier mask.

The function returns the following values:

  • modifierType: modifier mask used for intent.

func (*Keymap) ModifierState

func (keymap *Keymap) ModifierState() uint

ModifierState returns the current modifier state.

The function returns the following values:

  • guint: current modifier state.

func (*Keymap) NumLockState

func (keymap *Keymap) NumLockState() bool

NumLockState returns whether the Num Lock modifer is locked.

The function returns the following values:

  • ok: TRUE if Num Lock is on.

func (*Keymap) ScrollLockState

func (keymap *Keymap) ScrollLockState() bool

ScrollLockState returns whether the Scroll Lock modifer is locked.

The function returns the following values:

  • ok: TRUE if Scroll Lock is on.

func (*Keymap) TranslateKeyboardState

func (keymap *Keymap) TranslateKeyboardState(hardwareKeycode uint, state ModifierType, group int) (keyval uint, effectiveGroup, level int, consumedModifiers ModifierType, ok bool)

TranslateKeyboardState translates the contents of a EventKey into a keyval, effective group, and level. Modifiers that affected the translation and are thus unavailable for application use are returned in consumed_modifiers. See [Groups][key-group-explanation] for an explanation of groups and levels. The effective_group is the group that was actually used for the translation; some keys such as Enter are not affected by the active keyboard group. The level is derived from state. For convenience, EventKey already contains the translated keyval, so this function isn’t as useful as you might think.

consumed_modifiers gives modifiers that should be masked outfrom state when comparing this key press to a hot key. For instance, on a US keyboard, the plus symbol is shifted, so when comparing a key press to a <Control>plus accelerator <Shift> should be masked out.

// XXX Don’t do this XXX
if (keyval == accel_keyval &&
    (event->state & ~consumed & ALL_ACCELS_MASK) == (accel_mods & ~consumed))
  // Accelerator was pressed

However, this did not work if multi-modifier combinations were used in the keymap, since, for instance, <Control> would be masked out even if only <Control><Alt> was used in the keymap. To support this usage as well as well as possible, all single modifier combinations that could affect the key for any combination of modifiers will be returned in consumed_modifiers; multi-modifier combinations are returned only when actually found in state. When you store accelerators, you should always store them with consumed modifiers removed. Store <Control>plus, not <Control><Shift>plus,.

The function takes the following parameters:

  • hardwareKeycode: keycode.
  • state: modifier state.
  • group: active keyboard group.

The function returns the following values:

  • keyval (optional): return location for keyval, or NULL.
  • effectiveGroup (optional): return location for effective group, or NULL.
  • level (optional): return location for level, or NULL.
  • consumedModifiers (optional): return location for modifiers that were used to determine the group or level, or NULL.
  • ok: TRUE if there was a keyval bound to the keycode/state/group.

type KeymapKey

type KeymapKey struct {
	// contains filtered or unexported fields
}

KeymapKey is a hardware key that can be mapped to a keyval.

An instance of this type is always passed by reference.

func NewKeymapKey

func NewKeymapKey(keycode uint, group, level int) KeymapKey

NewKeymapKey creates a new KeymapKey instance from the given fields. Beware that this function allocates on the Go heap; be careful when using it!

func (*KeymapKey) Group

func (k *KeymapKey) Group() int

Group indicates movement in a horizontal direction. Usually groups are used for two different languages. In group 0, a key might have two English characters, and in group 1 it might have two Hebrew characters. The Hebrew characters will be printed on the key next to the English characters.

func (*KeymapKey) Keycode

func (k *KeymapKey) Keycode() uint

Keycode: hardware keycode. This is an identifying number for a physical key.

func (*KeymapKey) Level

func (k *KeymapKey) Level() int

Level indicates which symbol on the key will be used, in a vertical direction. So on a standard US keyboard, the key with the number “1” on it also has the exclamation point ("!") character on it. The level indicates whether to use the “1” or the “!” symbol. The letter keys are considered to have a lowercase letter at level 0, and an uppercase letter at level 1, though only the uppercase letter is printed.

func (*KeymapKey) SetGroup

func (k *KeymapKey) SetGroup(group int)

Group indicates movement in a horizontal direction. Usually groups are used for two different languages. In group 0, a key might have two English characters, and in group 1 it might have two Hebrew characters. The Hebrew characters will be printed on the key next to the English characters.

func (*KeymapKey) SetKeycode

func (k *KeymapKey) SetKeycode(keycode uint)

Keycode: hardware keycode. This is an identifying number for a physical key.

func (*KeymapKey) SetLevel

func (k *KeymapKey) SetLevel(level int)

Level indicates which symbol on the key will be used, in a vertical direction. So on a standard US keyboard, the key with the number “1” on it also has the exclamation point ("!") character on it. The level indicates whether to use the “1” or the “!” symbol. The letter keys are considered to have a lowercase letter at level 0, and an uppercase letter at level 1, though only the uppercase letter is printed.

type ModifierIntent

type ModifierIntent C.gint

ModifierIntent: this enum is used with gdk_keymap_get_modifier_mask() in order to determine what modifiers the currently used windowing system backend uses for particular purposes. For example, on X11/Windows, the Control key is used for invoking menu shortcuts (accelerators), whereas on Apple computers it’s the Command key (which correspond to GDK_CONTROL_MASK and GDK_MOD2_MASK, respectively).

const (
	// ModifierIntentPrimaryAccelerator: primary modifier used to invoke menu
	// accelerators.
	ModifierIntentPrimaryAccelerator ModifierIntent = iota
	// ModifierIntentContextMenu: modifier used to invoke context menus. Note
	// that mouse button 3 always triggers context menus. When this modifier is
	// not 0, it additionally triggers context menus when used with mouse button
	// 1.
	ModifierIntentContextMenu
	// ModifierIntentExtendSelection: modifier used to extend selections using
	// modifier-click or modifier-cursor-key.
	ModifierIntentExtendSelection
	// ModifierIntentModifySelection: modifier used to modify selections,
	// which in most cases means toggling the clicked item into or out of the
	// selection.
	ModifierIntentModifySelection
	// ModifierIntentNoTextInput: when any of these modifiers is pressed,
	// the key event cannot produce a symbol directly. This is meant to be used
	// for input methods, and for use cases like typeahead search.
	ModifierIntentNoTextInput
	// ModifierIntentShiftGroup: modifier that switches between keyboard groups
	// (AltGr on X11/Windows and Option/Alt on OS X).
	ModifierIntentShiftGroup
	// ModifierIntentDefaultModMask: set of modifier masks accepted as
	// modifiers in accelerators. Needed because Command is mapped to
	// MOD2 on OSX, which is widely used, but on X11 MOD2 is NumLock
	// and using that for a mod key is problematic at best. Ref:
	// https://bugzilla.gnome.org/show_bug.cgi?id=736125.
	ModifierIntentDefaultModMask
)

func (ModifierIntent) String

func (m ModifierIntent) String() string

String returns the name in string for ModifierIntent.

type ModifierType

type ModifierType C.guint

ModifierType: set of bit-flags to indicate the state of modifier keys and mouse buttons in various event types. Typical modifier keys are Shift, Control, Meta, Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.

Like the X Window System, GDK supports 8 modifier keys and 5 mouse buttons.

Since 2.10, GDK recognizes which of the Meta, Super or Hyper keys are mapped to Mod2 - Mod5, and indicates this by setting GDK_SUPER_MASK, GDK_HYPER_MASK or GDK_META_MASK in the state field of key events.

Note that GDK may add internal values to events which include reserved values such as GDK_MODIFIER_RESERVED_13_MASK. Your code should preserve and ignore them. You can use GDK_MODIFIER_MASK to remove all reserved values.

Also note that the GDK X backend interprets button press events for button 4-7 as scroll events, so GDK_BUTTON4_MASK and GDK_BUTTON5_MASK will never be set.

const (
	// ShiftMask: shift key.
	ShiftMask ModifierType = 0b1
	// LockMask: lock key (depending on the modifier mapping of the X server
	// this may either be CapsLock or ShiftLock).
	LockMask ModifierType = 0b10
	// ControlMask: control key.
	ControlMask ModifierType = 0b100
	// Mod1Mask: fourth modifier key (it depends on the modifier mapping of the
	// X server which key is interpreted as this modifier, but normally it is
	// the Alt key).
	Mod1Mask ModifierType = 0b1000
	// Mod2Mask: fifth modifier key (it depends on the modifier mapping of the X
	// server which key is interpreted as this modifier).
	Mod2Mask ModifierType = 0b10000
	// Mod3Mask: sixth modifier key (it depends on the modifier mapping of the X
	// server which key is interpreted as this modifier).
	Mod3Mask ModifierType = 0b100000
	// Mod4Mask: seventh modifier key (it depends on the modifier mapping of the
	// X server which key is interpreted as this modifier).
	Mod4Mask ModifierType = 0b1000000
	// Mod5Mask: eighth modifier key (it depends on the modifier mapping of the
	// X server which key is interpreted as this modifier).
	Mod5Mask ModifierType = 0b10000000
	// Button1Mask: first mouse button.
	Button1Mask ModifierType = 0b100000000
	// Button2Mask: second mouse button.
	Button2Mask ModifierType = 0b1000000000
	// Button3Mask: third mouse button.
	Button3Mask ModifierType = 0b10000000000
	// Button4Mask: fourth mouse button.
	Button4Mask ModifierType = 0b100000000000
	// Button5Mask: fifth mouse button.
	Button5Mask ModifierType = 0b1000000000000
	// ModifierReserved13Mask: reserved bit flag; do not use in your own code.
	ModifierReserved13Mask ModifierType = 0b10000000000000
	// ModifierReserved14Mask: reserved bit flag; do not use in your own code.
	ModifierReserved14Mask ModifierType = 0b100000000000000
	// ModifierReserved15Mask: reserved bit flag; do not use in your own code.
	ModifierReserved15Mask ModifierType = 0b1000000000000000
	// ModifierReserved16Mask: reserved bit flag; do not use in your own code.
	ModifierReserved16Mask ModifierType = 0b10000000000000000
	// ModifierReserved17Mask: reserved bit flag; do not use in your own code.
	ModifierReserved17Mask ModifierType = 0b100000000000000000
	// ModifierReserved18Mask: reserved bit flag; do not use in your own code.
	ModifierReserved18Mask ModifierType = 0b1000000000000000000
	// ModifierReserved19Mask: reserved bit flag; do not use in your own code.
	ModifierReserved19Mask ModifierType = 0b10000000000000000000
	// ModifierReserved20Mask: reserved bit flag; do not use in your own code.
	ModifierReserved20Mask ModifierType = 0b100000000000000000000
	// ModifierReserved21Mask: reserved bit flag; do not use in your own code.
	ModifierReserved21Mask ModifierType = 0b1000000000000000000000
	// ModifierReserved22Mask: reserved bit flag; do not use in your own code.
	ModifierReserved22Mask ModifierType = 0b10000000000000000000000
	// ModifierReserved23Mask: reserved bit flag; do not use in your own code.
	ModifierReserved23Mask ModifierType = 0b100000000000000000000000
	// ModifierReserved24Mask: reserved bit flag; do not use in your own code.
	ModifierReserved24Mask ModifierType = 0b1000000000000000000000000
	// ModifierReserved25Mask: reserved bit flag; do not use in your own code.
	ModifierReserved25Mask ModifierType = 0b10000000000000000000000000
	// SuperMask: super modifier. Since 2.10.
	SuperMask ModifierType = 0b100000000000000000000000000
	// HyperMask: hyper modifier. Since 2.10.
	HyperMask ModifierType = 0b1000000000000000000000000000
	// MetaMask: meta modifier. Since 2.10.
	MetaMask ModifierType = 0b10000000000000000000000000000
	// ModifierReserved29Mask: reserved bit flag; do not use in your own code.
	ModifierReserved29Mask ModifierType = 0b100000000000000000000000000000
	// ReleaseMask: not used in GDK itself. GTK+ uses it to differentiate
	// between (keyval, modifiers) pairs from key press and release events.
	ReleaseMask ModifierType = 0b1000000000000000000000000000000
	// ModifierMask: mask covering all modifier types.
	ModifierMask ModifierType = 0b1011100000000000001111111111111
)

func (ModifierType) Has

func (m ModifierType) Has(other ModifierType) bool

Has returns true if m contains other.

func (ModifierType) String

func (m ModifierType) String() string

String returns the names in string for ModifierType.

type Monitor

type Monitor struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Monitor objects represent the individual outputs that are associated with a Display. GdkDisplay has APIs to enumerate monitors with gdk_display_get_n_monitors() and gdk_display_get_monitor(), and to find particular monitors with gdk_display_get_primary_monitor() or gdk_display_get_monitor_at_window().

GdkMonitor was introduced in GTK+ 3.22 and supersedes earlier APIs in GdkScreen to obtain monitor-related information.

func (*Monitor) ConnectInvalidate

func (monitor *Monitor) ConnectInvalidate(f func()) coreglib.SignalHandle

func (*Monitor) Display

func (monitor *Monitor) Display() *Display

Display gets the display that this monitor belongs to.

The function returns the following values:

  • display: display.

func (*Monitor) Geometry

func (monitor *Monitor) Geometry() *Rectangle

Geometry retrieves the size and position of an individual monitor within the display coordinate space. The returned geometry is in ”application pixels”, not in ”device pixels” (see gdk_monitor_get_scale_factor()).

The function returns the following values:

  • geometry to be filled with the monitor geometry.

func (*Monitor) HeightMm

func (monitor *Monitor) HeightMm() int

HeightMm gets the height in millimeters of the monitor.

The function returns the following values:

  • gint: physical height of the monitor.

func (*Monitor) IsPrimary

func (monitor *Monitor) IsPrimary() bool

IsPrimary gets whether this monitor should be considered primary (see gdk_display_get_primary_monitor()).

The function returns the following values:

  • ok: TRUE if monitor is primary.

func (*Monitor) Manufacturer

func (monitor *Monitor) Manufacturer() string

Manufacturer gets the name or PNP ID of the monitor's manufacturer, if available.

Note that this value might also vary depending on actual display backend.

PNP ID registry is located at https://uefi.org/pnp_id_list.

The function returns the following values:

  • utf8 (optional): name of the manufacturer, or NULL.

func (*Monitor) Model

func (monitor *Monitor) Model() string

Model gets the a string identifying the monitor model, if available.

The function returns the following values:

  • utf8 (optional): monitor model, or NULL.

func (*Monitor) RefreshRate

func (monitor *Monitor) RefreshRate() int

RefreshRate gets the refresh rate of the monitor, if available.

The value is in milli-Hertz, so a refresh rate of 60Hz is returned as 60000.

The function returns the following values:

  • gint: refresh rate in milli-Hertz, or 0.

func (*Monitor) ScaleFactor

func (monitor *Monitor) ScaleFactor() int

ScaleFactor gets the internal scale factor that maps from monitor coordinates to the actual device pixels. On traditional systems this is 1, but on very high density outputs this can be a higher value (often 2).

This can be used if you want to create pixel based data for a particular monitor, but most of the time you’re drawing to a window where it is better to use gdk_window_get_scale_factor() instead.

The function returns the following values:

  • gint: scale factor.

func (*Monitor) SubpixelLayout

func (monitor *Monitor) SubpixelLayout() SubpixelLayout

SubpixelLayout gets information about the layout of red, green and blue primaries for each pixel in this monitor, if available.

The function returns the following values:

  • subpixelLayout: subpixel layout.

func (*Monitor) WidthMm

func (monitor *Monitor) WidthMm() int

WidthMm gets the width in millimeters of the monitor.

The function returns the following values:

  • gint: physical width of the monitor.

func (*Monitor) Workarea

func (monitor *Monitor) Workarea() *Rectangle

Workarea retrieves the size and position of the “work area” on a monitor within the display coordinate space. The returned geometry is in ”application pixels”, not in ”device pixels” (see gdk_monitor_get_scale_factor()).

The work area should be considered when positioning menus and similar popups, to avoid placing them below panels, docks or other desktop components.

Note that not all backends may have a concept of workarea. This function will return the monitor geometry if a workarea is not available, or does not apply.

The function returns the following values:

  • workarea to be filled with the monitor workarea.

type NotifyType

type NotifyType C.gint

NotifyType specifies the kind of crossing for EventCrossing.

See the X11 protocol specification of LeaveNotify for full details of crossing event generation.

const (
	// NotifyAncestor: window is entered from an ancestor or left towards an
	// ancestor.
	NotifyAncestor NotifyType = iota
	// NotifyVirtual: pointer moves between an ancestor and an inferior of the
	// window.
	NotifyVirtual
	// NotifyInferior: window is entered from an inferior or left towards an
	// inferior.
	NotifyInferior
	// NotifyNonlinear: window is entered from or left towards a window which is
	// neither an ancestor nor an inferior.
	NotifyNonlinear
	// NotifyNonlinearVirtual: pointer moves between two windows which are not
	// ancestors of each other and the window is part of the ancestor chain
	// between one of these windows and their least common ancestor.
	NotifyNonlinearVirtual
	// NotifyUnknown: unknown type of enter/leave event occurred.
	NotifyUnknown
)

func (NotifyType) String

func (n NotifyType) String() string

String returns the name in string for NotifyType.

type OwnerChange

type OwnerChange C.gint

OwnerChange specifies why a selection ownership was changed.

const (
	// OwnerChangeNewOwner: some other app claimed the ownership.
	OwnerChangeNewOwner OwnerChange = iota
	// OwnerChangeDestroy: window was destroyed.
	OwnerChangeDestroy
	// OwnerChangeClose: client was closed.
	OwnerChangeClose
)

func (OwnerChange) String

func (o OwnerChange) String() string

String returns the name in string for OwnerChange.

type Point

type Point struct {
	// contains filtered or unexported fields
}

Point defines the x and y coordinates of a point.

An instance of this type is always passed by reference.

func NewPoint

func NewPoint(x, y int) Point

NewPoint creates a new Point instance from the given fields. Beware that this function allocates on the Go heap; be careful when using it!

func (*Point) SetX

func (p *Point) SetX(x int)

X: x coordinate of the point.

func (*Point) SetY

func (p *Point) SetY(y int)

Y: y coordinate of the point.

func (*Point) X

func (p *Point) X() int

X: x coordinate of the point.

func (*Point) Y

func (p *Point) Y() int

Y: y coordinate of the point.

type PropMode

type PropMode C.gint

PropMode describes how existing data is combined with new data when using gdk_property_change().

const (
	// PropModeReplace: new data replaces the existing data.
	PropModeReplace PropMode = iota
	// PropModePrepend: new data is prepended to the existing data.
	PropModePrepend
	// PropModeAppend: new data is appended to the existing data.
	PropModeAppend
)

func (PropMode) String

func (p PropMode) String() string

String returns the name in string for PropMode.

type PropertyState

type PropertyState C.gint

PropertyState specifies the type of a property change for a EventProperty.

const (
	// PropertyNewValue: property value was changed.
	PropertyNewValue PropertyState = iota
	// PropertyDelete: property was deleted.
	PropertyDelete
)

func (PropertyState) String

func (p PropertyState) String() string

String returns the name in string for PropertyState.

type RGBA

type RGBA struct {
	// contains filtered or unexported fields
}

RGBA is used to represent a (possibly translucent) color, in a way that is compatible with cairo’s notion of color.

An instance of this type is always passed by reference.

func NewRGBA

func NewRGBA(red, green, blue, alpha float64) RGBA

NewRGBA creates a new RGBA instance from the given fields. Beware that this function allocates on the Go heap; be careful when using it!

func (*RGBA) Alpha

func (r *RGBA) Alpha() float64

Alpha: opacity of the color from 0.0 for completely translucent to 1.0 for opaque.

func (*RGBA) Blue

func (r *RGBA) Blue() float64

Blue: intensity of the blue channel from 0.0 to 1.0 inclusive.

func (*RGBA) Copy

func (rgba *RGBA) Copy() *RGBA

Copy makes a copy of a RGBA.

The result must be freed through gdk_rgba_free().

The function returns the following values:

  • rgbA: newly allocated RGBA, with the same contents as rgba.

func (*RGBA) Equal

func (p1 *RGBA) Equal(p2 *RGBA) bool

Equal compares two RGBA colors.

The function takes the following parameters:

  • p2: another RGBA pointer.

The function returns the following values:

  • ok: TRUE if the two colors compare equal.

func (*RGBA) Green

func (r *RGBA) Green() float64

Green: intensity of the green channel from 0.0 to 1.0 inclusive.

func (*RGBA) Hash

func (p *RGBA) Hash() uint

Hash: hash function suitable for using for a hash table that stores RGBAs.

The function returns the following values:

  • guint: hash value for p.

func (*RGBA) Parse

func (rgba *RGBA) Parse(spec string) bool

Parse parses a textual representation of a color, filling in the red, green, blue and alpha fields of the rgba RGBA.

The string can be either one of:

- A standard name (Taken from the X11 rgb.txt file).

- A hexadecimal value in the form “\#rgb”, “\#rrggbb”, “\#rrrgggbbb” or ”\#rrrrggggbbbb”

- A RGB color in the form “rgb(r,g,b)” (In this case the color will have full opacity)

- A RGBA color in the form “rgba(r,g,b,a)”

Where “r”, “g”, “b” and “a” are respectively the red, green, blue and alpha color values. In the last two cases, “r”, “g”, and “b” are either integers in the range 0 to 255 or percentage values in the range 0% to 100%, and a is a floating point value in the range 0 to 1.

The function takes the following parameters:

  • spec: string specifying the color.

The function returns the following values:

  • ok: TRUE if the parsing succeeded.

func (*RGBA) Red

func (r *RGBA) Red() float64

Red: intensity of the red channel from 0.0 to 1.0 inclusive.

func (*RGBA) SetAlpha

func (r *RGBA) SetAlpha(alpha float64)

Alpha: opacity of the color from 0.0 for completely translucent to 1.0 for opaque.

func (*RGBA) SetBlue

func (r *RGBA) SetBlue(blue float64)

Blue: intensity of the blue channel from 0.0 to 1.0 inclusive.

func (*RGBA) SetGreen

func (r *RGBA) SetGreen(green float64)

Green: intensity of the green channel from 0.0 to 1.0 inclusive.

func (*RGBA) SetRed

func (r *RGBA) SetRed(red float64)

Red: intensity of the red channel from 0.0 to 1.0 inclusive.

func (*RGBA) String

func (rgba *RGBA) String() string

String returns a textual specification of rgba in the form rgb(r,g,b) or rgba(r g,b,a), where “r”, “g”, “b” and “a” represent the red, green, blue and alpha values respectively. “r”, “g”, and “b” are represented as integers in the range 0 to 255, and “a” is represented as a floating point value in the range 0 to 1.

These string forms are string forms that are supported by the CSS3 colors module, and can be parsed by gdk_rgba_parse().

Note that this string representation may lose some precision, since “r”, “g” and “b” are represented as 8-bit integers. If this is a concern, you should use a different representation.

The function returns the following values:

  • utf8: newly allocated text string.

type Rectangle

type Rectangle struct {
	// contains filtered or unexported fields
}

Rectangle defines the position and size of a rectangle. It is identical to #cairo_rectangle_int_t.

An instance of this type is always passed by reference.

func CairoGetClipRectangle

func CairoGetClipRectangle(cr *cairo.Context) (*Rectangle, bool)

CairoGetClipRectangle: this is a convenience function around cairo_clip_extents(). It rounds the clip extents to integer coordinates and returns a boolean indicating if a clip area exists.

The function takes the following parameters:

  • cr: cairo context.

The function returns the following values:

  • rect (optional): return location for the clip, or NULL.
  • ok: TRUE if a clip rectangle exists, FALSE if all of cr is clipped and all drawing can be skipped.

func NewRectangle

func NewRectangle(x, y, width, height int) Rectangle

NewRectangle creates a new Rectangle instance from the given fields. Beware that this function allocates on the Go heap; be careful when using it!

func (*Rectangle) Equal

func (rect1 *Rectangle) Equal(rect2 *Rectangle) bool

Equal checks if the two given rectangles are equal.

The function takes the following parameters:

  • rect2: Rectangle.

The function returns the following values:

  • ok: TRUE if the rectangles are equal.

func (*Rectangle) Height

func (r *Rectangle) Height() int

func (*Rectangle) Intersect

func (src1 *Rectangle) Intersect(src2 *Rectangle) (*Rectangle, bool)

Intersect calculates the intersection of two rectangles. It is allowed for dest to be the same as either src1 or src2. If the rectangles do not intersect, dest’s width and height is set to 0 and its x and y values are undefined. If you are only interested in whether the rectangles intersect, but not in the intersecting area itself, pass NULL for dest.

The function takes the following parameters:

  • src2: Rectangle.

The function returns the following values:

  • dest (optional): return location for the intersection of src1 and src2, or NULL.
  • ok: TRUE if the rectangles intersect.

func (*Rectangle) SetHeight

func (r *Rectangle) SetHeight(height int)

func (*Rectangle) SetWidth

func (r *Rectangle) SetWidth(width int)

func (*Rectangle) SetX

func (r *Rectangle) SetX(x int)

func (*Rectangle) SetY

func (r *Rectangle) SetY(y int)

func (*Rectangle) Union

func (src1 *Rectangle) Union(src2 *Rectangle) *Rectangle

Union calculates the union of two rectangles. The union of rectangles src1 and src2 is the smallest rectangle which includes both src1 and src2 within it. It is allowed for dest to be the same as either src1 or src2.

Note that this function does not ignore 'empty' rectangles (ie. with zero width or height).

The function takes the following parameters:

  • src2: Rectangle.

The function returns the following values:

  • dest: return location for the union of src1 and src2.

func (*Rectangle) Width

func (r *Rectangle) Width() int

func (*Rectangle) X

func (r *Rectangle) X() int

func (*Rectangle) Y

func (r *Rectangle) Y() int

type Screen

type Screen struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Screen objects are the GDK representation of the screen on which windows can be displayed and on which the pointer moves. X originally identified screens with physical screens, but nowadays it is more common to have a single Screen which combines several physical monitors (see gdk_screen_get_n_monitors()).

GdkScreen is used throughout GDK and GTK+ to specify which screen the top level windows are to be displayed on. it is also used to query the screen specification and default settings such as the default visual (gdk_screen_get_system_visual()), the dimensions of the physical monitors (gdk_screen_get_monitor_geometry()), etc.

func ScreenGetDefault

func ScreenGetDefault() *Screen

ScreenGetDefault gets the default screen for the default display. (See gdk_display_get_default ()).

The function returns the following values:

  • screen (optional) or NULL if there is no default display.

func (*Screen) ActiveWindow deprecated

func (screen *Screen) ActiveWindow() Windower

ActiveWindow returns the screen’s currently active window.

On X11, this is done by inspecting the _NET_ACTIVE_WINDOW property on the root window, as described in the Extended Window Manager Hints (http://www.freedesktop.org/Standards/wm-spec). If there is no currently currently active window, or the window manager does not support the _NET_ACTIVE_WINDOW hint, this function returns NULL.

On other platforms, this function may return NULL, depending on whether it is implementable on that platform.

The returned window should be unrefed using g_object_unref() when no longer needed.

Deprecated: since version 3.22.

The function returns the following values:

  • window (optional): currently active window, or NULL.

func (*Screen) ConnectCompositedChanged

func (screen *Screen) ConnectCompositedChanged(f func()) coreglib.SignalHandle

ConnectCompositedChanged signal is emitted when the composited status of the screen changes.

func (*Screen) ConnectMonitorsChanged

func (screen *Screen) ConnectMonitorsChanged(f func()) coreglib.SignalHandle

ConnectMonitorsChanged signal is emitted when the number, size or position of the monitors attached to the screen change.

Only for X11 and OS X for now. A future implementation for Win32 may be a possibility.

func (*Screen) ConnectSizeChanged

func (screen *Screen) ConnectSizeChanged(f func()) coreglib.SignalHandle

ConnectSizeChanged signal is emitted when the pixel width or height of a screen changes.

func (*Screen) Display

func (screen *Screen) Display() *Display

Display gets the display to which the screen belongs.

The function returns the following values:

  • display to which screen belongs.

func (*Screen) FontOptions

func (screen *Screen) FontOptions() *cairo.FontOptions

FontOptions gets any options previously set with gdk_screen_set_font_options().

The function returns the following values:

  • fontOptions (optional): current font options, or NULL if no default font options have been set.

func (*Screen) Height deprecated

func (screen *Screen) Height() int

Height gets the height of screen in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see gdk_screen_get_monitor_scale_factor()).

Deprecated: Use per-monitor information instead.

The function returns the following values:

  • gint: height of screen in pixels.

func (*Screen) HeightMm deprecated

func (screen *Screen) HeightMm() int

HeightMm returns the height of screen in millimeters.

Note that this value is somewhat ill-defined when the screen has multiple monitors of different resolution. It is recommended to use the monitor dimensions instead.

Deprecated: Use per-monitor information instead.

The function returns the following values:

  • gint: heigth of screen in millimeters.

func (*Screen) IsComposited

func (screen *Screen) IsComposited() bool

IsComposited returns whether windows with an RGBA visual can reasonably be expected to have their alpha channel drawn correctly on the screen.

On X11 this function returns whether a compositing manager is compositing screen.

The function returns the following values:

  • ok: whether windows with RGBA visuals can reasonably be expected to have their alpha channels drawn correctly on the screen.

func (*Screen) ListVisuals

func (screen *Screen) ListVisuals() []*Visual

ListVisuals lists the available visuals for the specified screen. A visual describes a hardware image data format. For example, a visual might support 24-bit color, or 8-bit color, and might expect pixels to be in a certain format.

Call g_list_free() on the return value when you’re finished with it.

The function returns the following values:

  • list: a list of visuals; the list must be freed, but not its contents.

func (*Screen) MakeDisplayName deprecated

func (screen *Screen) MakeDisplayName() string

MakeDisplayName determines the name to pass to gdk_display_open() to get a Display with this screen as the default screen.

Deprecated: since version 3.22.

The function returns the following values:

  • utf8: newly allocated string, free with g_free().

func (*Screen) MonitorAtPoint deprecated

func (screen *Screen) MonitorAtPoint(x, y int) int

MonitorAtPoint returns the monitor number in which the point (x,y) is located.

Deprecated: Use gdk_display_get_monitor_at_point() instead.

The function takes the following parameters:

  • x coordinate in the virtual screen.
  • y coordinate in the virtual screen.

The function returns the following values:

  • gint: monitor number in which the point (x,y) lies, or a monitor close to (x,y) if the point is not in any monitor.

func (*Screen) MonitorAtWindow deprecated

func (screen *Screen) MonitorAtWindow(window Windower) int

MonitorAtWindow returns the number of the monitor in which the largest area of the bounding rectangle of window resides.

Deprecated: Use gdk_display_get_monitor_at_window() instead.

The function takes the following parameters:

  • window: Window.

The function returns the following values:

  • gint: monitor number in which most of window is located, or if window does not intersect any monitors, a monitor, close to window.

func (*Screen) MonitorGeometry deprecated

func (screen *Screen) MonitorGeometry(monitorNum int) *Rectangle

MonitorGeometry retrieves the Rectangle representing the size and position of the individual monitor within the entire screen area. The returned geometry is in ”application pixels”, not in ”device pixels” (see gdk_screen_get_monitor_scale_factor()).

Monitor numbers start at 0. To obtain the number of monitors of screen, use gdk_screen_get_n_monitors().

Note that the size of the entire screen area can be retrieved via gdk_screen_get_width() and gdk_screen_get_height().

Deprecated: Use gdk_monitor_get_geometry() instead.

The function takes the following parameters:

  • monitorNum: monitor number.

The function returns the following values:

  • dest (optional) to be filled with the monitor geometry.

func (*Screen) MonitorHeightMm deprecated

func (screen *Screen) MonitorHeightMm(monitorNum int) int

MonitorHeightMm gets the height in millimeters of the specified monitor.

Deprecated: Use gdk_monitor_get_height_mm() instead.

The function takes the following parameters:

  • monitorNum: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen).

The function returns the following values:

  • gint: height of the monitor, or -1 if not available.

func (*Screen) MonitorPlugName deprecated

func (screen *Screen) MonitorPlugName(monitorNum int) string

MonitorPlugName returns the output name of the specified monitor. Usually something like VGA, DVI, or TV, not the actual product name of the display device.

Deprecated: Use gdk_monitor_get_model() instead.

The function takes the following parameters:

  • monitorNum: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen).

The function returns the following values:

  • utf8 (optional): newly-allocated string containing the name of the monitor, or NULL if the name cannot be determined.

func (*Screen) MonitorScaleFactor deprecated

func (screen *Screen) MonitorScaleFactor(monitorNum int) int

MonitorScaleFactor returns the internal scale factor that maps from monitor coordinates to the actual device pixels. On traditional systems this is 1, but on very high density outputs this can be a higher value (often 2).

This can be used if you want to create pixel based data for a particular monitor, but most of the time you’re drawing to a window where it is better to use gdk_window_get_scale_factor() instead.

Deprecated: Use gdk_monitor_get_scale_factor() instead.

The function takes the following parameters:

  • monitorNum: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen).

The function returns the following values:

  • gint: scale factor.

func (*Screen) MonitorWidthMm deprecated

func (screen *Screen) MonitorWidthMm(monitorNum int) int

MonitorWidthMm gets the width in millimeters of the specified monitor, if available.

Deprecated: Use gdk_monitor_get_width_mm() instead.

The function takes the following parameters:

  • monitorNum: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen).

The function returns the following values:

  • gint: width of the monitor, or -1 if not available.

func (*Screen) MonitorWorkarea deprecated

func (screen *Screen) MonitorWorkarea(monitorNum int) *Rectangle

MonitorWorkarea retrieves the Rectangle representing the size and position of the “work area” on a monitor within the entire screen area. The returned geometry is in ”application pixels”, not in ”device pixels” (see gdk_screen_get_monitor_scale_factor()).

The work area should be considered when positioning menus and similar popups, to avoid placing them below panels, docks or other desktop components.

Note that not all backends may have a concept of workarea. This function will return the monitor geometry if a workarea is not available, or does not apply.

Monitor numbers start at 0. To obtain the number of monitors of screen, use gdk_screen_get_n_monitors().

Deprecated: Use gdk_monitor_get_workarea() instead.

The function takes the following parameters:

  • monitorNum: monitor number.

The function returns the following values:

  • dest (optional) to be filled with the monitor workarea.

func (*Screen) NMonitors deprecated

func (screen *Screen) NMonitors() int

NMonitors returns the number of monitors which screen consists of.

Deprecated: Use gdk_display_get_n_monitors() instead.

The function returns the following values:

  • gint: number of monitors which screen consists of.

func (*Screen) Number deprecated

func (screen *Screen) Number() int

Number gets the index of screen among the screens in the display to which it belongs. (See gdk_screen_get_display())

Deprecated: since version 3.22.

The function returns the following values:

  • gint: index.

func (*Screen) PrimaryMonitor deprecated

func (screen *Screen) PrimaryMonitor() int

PrimaryMonitor gets the primary monitor for screen. The primary monitor is considered the monitor where the “main desktop” lives. While normal application windows typically allow the window manager to place the windows, specialized desktop applications such as panels should place themselves on the primary monitor.

If no primary monitor is configured by the user, the return value will be 0, defaulting to the first monitor.

Deprecated: Use gdk_display_get_primary_monitor() instead.

The function returns the following values:

  • gint: integer index for the primary monitor, or 0 if none is configured.

func (*Screen) RGBAVisual

func (screen *Screen) RGBAVisual() *Visual

RGBAVisual gets a visual to use for creating windows with an alpha channel. The windowing system on which GTK+ is running may not support this capability, in which case NULL will be returned. Even if a non-NULL value is returned, its possible that the window’s alpha channel won’t be honored when displaying the window on the screen: in particular, for X an appropriate windowing manager and compositing manager must be running to provide appropriate display.

This functionality is not implemented in the Windows backend.

For setting an overall opacity for a top-level window, see gdk_window_set_opacity().

The function returns the following values:

  • visual (optional) to use for windows with an alpha channel or NULL if the capability is not available.

func (*Screen) Resolution

func (screen *Screen) Resolution() float64

Resolution gets the resolution for font handling on the screen; see gdk_screen_set_resolution() for full details.

The function returns the following values:

  • gdouble: current resolution, or -1 if no resolution has been set.

func (*Screen) RootWindow

func (screen *Screen) RootWindow() Windower

RootWindow gets the root window of screen.

The function returns the following values:

  • window: root window.

func (*Screen) SetFontOptions

func (screen *Screen) SetFontOptions(options *cairo.FontOptions)

SetFontOptions sets the default font options for the screen. These options will be set on any Context’s newly created with gdk_pango_context_get_for_screen(). Changing the default set of font options does not affect contexts that have already been created.

The function takes the following parameters:

  • options (optional) or NULL to unset any previously set default font options.

func (*Screen) SetResolution

func (screen *Screen) SetResolution(dpi float64)

SetResolution sets the resolution for font handling on the screen. This is a scale factor between points specified in a FontDescription and cairo units. The default value is 96, meaning that a 10 point font will be 13 units high. (10 * 96. / 72. = 13.3).

The function takes the following parameters:

  • dpi: resolution in “dots per inch”. (Physical inches aren’t actually involved; the terminology is conventional.).

func (*Screen) Setting

func (screen *Screen) Setting(name string, value *coreglib.Value) bool

Setting retrieves a desktop-wide setting such as double-click time for the Screen screen.

FIXME needs a list of valid settings here, or a link to more information.

The function takes the following parameters:

  • name of the setting.
  • value: location to store the value of the setting.

The function returns the following values:

  • ok: TRUE if the setting existed and a value was stored in value, FALSE otherwise.

func (*Screen) SystemVisual

func (screen *Screen) SystemVisual() *Visual

SystemVisual: get the system’s default visual for screen. This is the visual for the root window of the display. The return value should not be freed.

The function returns the following values:

  • visual: system visual.

func (*Screen) ToplevelWindows

func (screen *Screen) ToplevelWindows() []Windower

ToplevelWindows obtains a list of all toplevel windows known to GDK on the screen screen. A toplevel window is a child of the root window (see gdk_get_default_root_window()).

The returned list should be freed with g_list_free(), but its elements need not be freed.

The function returns the following values:

  • list: list of toplevel windows, free with g_list_free().

func (*Screen) Width deprecated

func (screen *Screen) Width() int

Width gets the width of screen in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see gdk_screen_get_monitor_scale_factor()).

Deprecated: Use per-monitor information instead.

The function returns the following values:

  • gint: width of screen in pixels.

func (*Screen) WidthMm deprecated

func (screen *Screen) WidthMm() int

WidthMm gets the width of screen in millimeters.

Note that this value is somewhat ill-defined when the screen has multiple monitors of different resolution. It is recommended to use the monitor dimensions instead.

Deprecated: Use per-monitor information instead.

The function returns the following values:

  • gint: width of screen in millimeters.

func (*Screen) WindowStack

func (screen *Screen) WindowStack() []Windower

WindowStack returns a #GList of Windows representing the current window stack.

On X11, this is done by inspecting the _NET_CLIENT_LIST_STACKING property on the root window, as described in the Extended Window Manager Hints (http://www.freedesktop.org/Standards/wm-spec). If the window manager does not support the _NET_CLIENT_LIST_STACKING hint, this function returns NULL.

On other platforms, this function may return NULL, depending on whether it is implementable on that platform.

The returned list is newly allocated and owns references to the windows it contains, so it should be freed using g_list_free() and its windows unrefed using g_object_unref() when no longer needed.

The function returns the following values:

  • list (optional): a list of Windows for the current window stack, or NULL.

type ScrollDirection

type ScrollDirection C.gint

ScrollDirection specifies the direction for EventScroll.

const (
	// ScrollUp: window is scrolled up.
	ScrollUp ScrollDirection = iota
	// ScrollDown: window is scrolled down.
	ScrollDown
	// ScrollLeft: window is scrolled to the left.
	ScrollLeft
	// ScrollRight: window is scrolled to the right.
	ScrollRight
	// ScrollSmooth: scrolling is determined by the delta values in EventScroll.
	// See gdk_event_get_scroll_deltas(). Since: 3.4.
	ScrollSmooth
)

func (ScrollDirection) String

func (s ScrollDirection) String() string

String returns the name in string for ScrollDirection.

type Seat

type Seat struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Seat object represents a collection of input devices that belong to a user.

func BaseSeat

func BaseSeat(obj Seater) *Seat

BaseSeat returns the underlying base object.

func (*Seat) Capabilities

func (seat *Seat) Capabilities() SeatCapabilities

Capabilities returns the capabilities this Seat currently has.

The function returns the following values:

  • seatCapabilities: seat capabilities.

func (*Seat) ConnectDeviceAdded

func (seat *Seat) ConnectDeviceAdded(f func(device Devicer)) coreglib.SignalHandle

ConnectDeviceAdded signal is emitted when a new input device is related to this seat.

func (*Seat) ConnectDeviceRemoved

func (seat *Seat) ConnectDeviceRemoved(f func(device Devicer)) coreglib.SignalHandle

ConnectDeviceRemoved signal is emitted when an input device is removed (e.g. unplugged).

func (*Seat) ConnectToolAdded

func (seat *Seat) ConnectToolAdded(f func(tool *DeviceTool)) coreglib.SignalHandle

ConnectToolAdded signal is emitted whenever a new tool is made known to the seat. The tool may later be assigned to a device (i.e. on proximity with a tablet). The device will emit the Device::tool-changed signal accordingly.

A same tool may be used by several devices.

func (*Seat) ConnectToolRemoved

func (seat *Seat) ConnectToolRemoved(f func(tool *DeviceTool)) coreglib.SignalHandle

ConnectToolRemoved: this signal is emitted whenever a tool is no longer known to this seat.

func (*Seat) Display

func (seat *Seat) Display() *Display

Display returns the Display this seat belongs to.

The function returns the following values:

  • display This object is owned by GTK+ and must not be freed.

func (*Seat) Grab

func (seat *Seat) Grab(window Windower, capabilities SeatCapabilities, ownerEvents bool, cursor Cursorrer, event *Event, prepareFunc SeatGrabPrepareFunc) GrabStatus

Grab grabs the seat so that all events corresponding to the given capabilities are passed to this application until the seat is ungrabbed with gdk_seat_ungrab(), or the window becomes hidden. This overrides any previous grab on the seat by this client.

As a rule of thumb, if a grab is desired over GDK_SEAT_CAPABILITY_POINTER, all other "pointing" capabilities (eg. GDK_SEAT_CAPABILITY_TOUCH) should be grabbed too, so the user is able to interact with all of those while the grab holds, you should thus use GDK_SEAT_CAPABILITY_ALL_POINTING most commonly.

Grabs are used for operations which need complete control over the events corresponding to the given capabilities. For example in GTK+ this is used for Drag and Drop operations, popup menus and such.

Note that if the event mask of a Window has selected both button press and button release events, or touch begin and touch end, then a press event will cause an automatic grab until the button is released, equivalent to a grab on the window with owner_events set to TRUE. This is done because most applications expect to receive paired press and release events.

If you set up anything at the time you take the grab that needs to be cleaned up when the grab ends, you should handle the EventGrabBroken events that are emitted when the grab ends unvoluntarily.

The function takes the following parameters:

  • window which will own the grab.
  • capabilities that will be grabbed.
  • ownerEvents: if FALSE then all device events are reported with respect to window and are only reported if selected by event_mask. If TRUE then pointer events for this application are reported as normal, but pointer events outside this application are reported with respect to window and only if selected by event_mask. In either mode, unreported events are discarded.
  • cursor (optional) to display while the grab is active. If this is NULL then the normal cursors are used for window and its descendants, and the cursor for window is used elsewhere.
  • event (optional) that is triggering the grab, or NULL if none is available.
  • prepareFunc (optional): function to prepare the window to be grabbed, it can be NULL if window is visible before this call.

The function returns the following values:

  • grabStatus: GDK_GRAB_SUCCESS if the grab was successful.

func (*Seat) Keyboard

func (seat *Seat) Keyboard() Devicer

Keyboard returns the master device that routes keyboard events.

The function returns the following values:

  • device (optional): master Device with keyboard capabilities. This object is owned by GTK+ and must not be freed.

func (*Seat) Pointer

func (seat *Seat) Pointer() Devicer

Pointer returns the master device that routes pointer events.

The function returns the following values:

  • device (optional): master Device with pointer capabilities. This object is owned by GTK+ and must not be freed.

func (*Seat) Slaves

func (seat *Seat) Slaves(capabilities SeatCapabilities) []Devicer

Slaves returns the slave devices that match the given capabilities.

The function takes the following parameters:

  • capabilities to get devices for.

The function returns the following values:

  • list of Devices. The list must be freed with g_list_free(), the elements are owned by GDK and must not be freed.

func (*Seat) Ungrab

func (seat *Seat) Ungrab()

Ungrab releases a grab added through gdk_seat_grab().

type SeatCapabilities

type SeatCapabilities C.guint

SeatCapabilities flags describing the seat capabilities.

const (
	// SeatCapabilityNone: no input capabilities.
	SeatCapabilityNone SeatCapabilities = 0b0
	// SeatCapabilityPointer: seat has a pointer (e.g. mouse).
	SeatCapabilityPointer SeatCapabilities = 0b1
	// SeatCapabilityTouch: seat has touchscreen(s) attached.
	SeatCapabilityTouch SeatCapabilities = 0b10
	// SeatCapabilityTabletStylus: seat has drawing tablet(s) attached.
	SeatCapabilityTabletStylus SeatCapabilities = 0b100
	// SeatCapabilityKeyboard: seat has keyboard(s) attached.
	SeatCapabilityKeyboard SeatCapabilities = 0b1000
	// SeatCapabilityAllPointing: union of all pointing capabilities.
	SeatCapabilityAllPointing SeatCapabilities = 0b111
	// SeatCapabilityAll: union of all capabilities.
	SeatCapabilityAll SeatCapabilities = 0b1111
)

func (SeatCapabilities) Has

func (s SeatCapabilities) Has(other SeatCapabilities) bool

Has returns true if s contains other.

func (SeatCapabilities) String

func (s SeatCapabilities) String() string

String returns the names in string for SeatCapabilities.

type SeatGrabPrepareFunc

type SeatGrabPrepareFunc func(seat Seater, window Windower)

SeatGrabPrepareFunc: type of the callback used to set up window so it can be grabbed. A typical action would be ensuring the window is visible, although there's room for other initialization actions.

type Seater

type Seater interface {
	coreglib.Objector
	// contains filtered or unexported methods
}

Seater describes types inherited from class Seat.

To get the original type, the caller must assert this to an interface or another type.

type SettingAction

type SettingAction C.gint

SettingAction specifies the kind of modification applied to a setting in a EventSetting.

const (
	// NewSettingAction: setting was added.
	NewSettingAction SettingAction = iota
	// SettingActionChanged: setting was changed.
	SettingActionChanged
	// SettingActionDeleted: setting was deleted.
	SettingActionDeleted
)

func (SettingAction) String

func (s SettingAction) String() string

String returns the name in string for SettingAction.

type Status

type Status C.gint
const (
	OK         Status = 0
	Error      Status = -1
	ErrorParam Status = -2
	ErrorFile  Status = -3
	ErrorMem   Status = -4
)

func (Status) String

func (s Status) String() string

String returns the name in string for Status.

type SubpixelLayout

type SubpixelLayout C.gint

SubpixelLayout: this enumeration describes how the red, green and blue components of physical pixels on an output device are laid out.

const (
	// SubpixelLayoutUnknown: layout is not known.
	SubpixelLayoutUnknown SubpixelLayout = iota
	// SubpixelLayoutNone: not organized in this way.
	SubpixelLayoutNone
	// SubpixelLayoutHorizontalRGB: layout is horizontal, the order is RGB.
	SubpixelLayoutHorizontalRGB
	// SubpixelLayoutHorizontalBGR: layout is horizontal, the order is BGR.
	SubpixelLayoutHorizontalBGR
	// SubpixelLayoutVerticalRGB: layout is vertical, the order is RGB.
	SubpixelLayoutVerticalRGB
	// SubpixelLayoutVerticalBGR: layout is vertical, the order is BGR.
	SubpixelLayoutVerticalBGR
)

func (SubpixelLayout) String

func (s SubpixelLayout) String() string

String returns the name in string for SubpixelLayout.

type TimeCoord

type TimeCoord struct {
	// contains filtered or unexported fields
}

TimeCoord stores a single event in a motion history.

An instance of this type is always passed by reference.

func (*TimeCoord) Axes

func (t *TimeCoord) Axes() [128]float64

Axes values of the device’s axes.

func (*TimeCoord) SetTime

func (t *TimeCoord) SetTime(time uint32)

Time: timestamp for this event.

func (*TimeCoord) Time

func (t *TimeCoord) Time() uint32

Time: timestamp for this event.

type TouchpadGesturePhase

type TouchpadGesturePhase C.gint

TouchpadGesturePhase specifies the current state of a touchpad gesture. All gestures are guaranteed to begin with an event with phase GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, followed by 0 or several events with phase GDK_TOUCHPAD_GESTURE_PHASE_UPDATE.

A finished gesture may have 2 possible outcomes, an event with phase GDK_TOUCHPAD_GESTURE_PHASE_END will be emitted when the gesture is considered successful, this should be used as the hint to perform any permanent changes.

Cancelled gestures may be so for a variety of reasons, due to hardware or the compositor, or due to the gesture recognition layers hinting the gesture did not finish resolutely (eg. a 3rd finger being added during a pinch gesture). In these cases, the last event will report the phase GDK_TOUCHPAD_GESTURE_PHASE_CANCEL, this should be used as a hint to undo any visible/permanent changes that were done throughout the progress of the gesture.

See also EventTouchpadSwipe and EventTouchpadPinch.

const (
	// TouchpadGesturePhaseBegin: gesture has begun.
	TouchpadGesturePhaseBegin TouchpadGesturePhase = iota
	// TouchpadGesturePhaseUpdate: gesture has been updated.
	TouchpadGesturePhaseUpdate
	// TouchpadGesturePhaseEnd: gesture was finished, changes should be
	// permanently applied.
	TouchpadGesturePhaseEnd
	// TouchpadGesturePhaseCancel: gesture was cancelled, all changes should be
	// undone.
	TouchpadGesturePhaseCancel
)

func (TouchpadGesturePhase) String

func (t TouchpadGesturePhase) String() string

String returns the name in string for TouchpadGesturePhase.

type VisibilityState

type VisibilityState C.gint

VisibilityState specifies the visiblity status of a window for a EventVisibility.

const (
	// VisibilityUnobscured: window is completely visible.
	VisibilityUnobscured VisibilityState = iota
	// VisibilityPartial: window is partially visible.
	VisibilityPartial
	// VisibilityFullyObscured: window is not visible at all.
	VisibilityFullyObscured
)

func (VisibilityState) String

func (v VisibilityState) String() string

String returns the name in string for VisibilityState.

type Visual

type Visual struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

Visual contains information about a particular visual.

func ListVisuals deprecated

func ListVisuals() []*Visual

ListVisuals lists the available visuals for the default screen. (See gdk_screen_list_visuals()) A visual describes a hardware image data format. For example, a visual might support 24-bit color, or 8-bit color, and might expect pixels to be in a certain format.

Call g_list_free() on the return value when you’re finished with it.

Deprecated: Use gdk_screen_list_visuals (gdk_screen_get_default ()).

The function returns the following values:

  • list: a list of visuals; the list must be freed, but not its contents.

func VisualGetBest deprecated

func VisualGetBest() *Visual

VisualGetBest: get the visual with the most available colors for the default GDK screen. The return value should not be freed.

Deprecated: Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual().

The function returns the following values:

  • visual: best visual.

func VisualGetBestWithBoth deprecated

func VisualGetBestWithBoth(depth int, visualType VisualType) *Visual

VisualGetBestWithBoth combines gdk_visual_get_best_with_depth() and gdk_visual_get_best_with_type().

Deprecated: Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual().

The function takes the following parameters:

  • depth: bit depth.
  • visualType: visual type.

The function returns the following values:

  • visual (optional): best visual with both depth and visual_type, or NULL if none.

func VisualGetBestWithDepth deprecated

func VisualGetBestWithDepth(depth int) *Visual

VisualGetBestWithDepth: get the best visual with depth depth for the default GDK screen. Color visuals and visuals with mutable colormaps are preferred over grayscale or fixed-colormap visuals. The return value should not be freed. NULL may be returned if no visual supports depth.

Deprecated: Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual().

The function takes the following parameters:

  • depth: bit depth.

The function returns the following values:

  • visual: best visual for the given depth.

func VisualGetBestWithType deprecated

func VisualGetBestWithType(visualType VisualType) *Visual

VisualGetBestWithType: get the best visual of the given visual_type for the default GDK screen. Visuals with higher color depths are considered better. The return value should not be freed. NULL may be returned if no visual has type visual_type.

Deprecated: Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual().

The function takes the following parameters:

  • visualType: visual type.

The function returns the following values:

  • visual: best visual of the given type.

func VisualGetSystem deprecated

func VisualGetSystem() *Visual

VisualGetSystem: get the system’s default visual for the default GDK screen. This is the visual for the root window of the display. The return value should not be freed.

Deprecated: Use gdk_screen_get_system_visual (gdk_screen_get_default ()).

The function returns the following values:

  • visual: system visual.

func (*Visual) BitsPerRGB deprecated

func (visual *Visual) BitsPerRGB() int

BitsPerRGB returns the number of significant bits per red, green and blue value.

Not all GDK backend provide a meaningful value for this function.

Deprecated: Use gdk_visual_get_red_pixel_details() and its variants to learn about the pixel layout of TrueColor and DirectColor visuals.

The function returns the following values:

  • gint: number of significant bits per color value for visual.

func (*Visual) BluePixelDetails

func (visual *Visual) BluePixelDetails() (mask uint32, shift, precision int)

BluePixelDetails obtains values that are needed to calculate blue pixel values in TrueColor and DirectColor. The “mask” is the significant bits within the pixel. The “shift” is the number of bits left we must shift a primary for it to be in position (according to the "mask"). Finally, "precision" refers to how much precision the pixel value contains for a particular primary.

The function returns the following values:

  • mask (optional): pointer to a #guint32 to be filled in, or NULL.
  • shift (optional): pointer to a #gint to be filled in, or NULL.
  • precision (optional): pointer to a #gint to be filled in, or NULL.

func (*Visual) ByteOrder deprecated

func (visual *Visual) ByteOrder() ByteOrder

ByteOrder returns the byte order of this visual.

The information returned by this function is only relevant when working with XImages, and not all backends return meaningful information for this.

Deprecated: This information is not useful.

The function returns the following values:

  • byteOrder stating the byte order of visual.

func (*Visual) ColormapSize deprecated

func (visual *Visual) ColormapSize() int

ColormapSize returns the size of a colormap for this visual.

You have to use platform-specific APIs to manipulate colormaps.

Deprecated: This information is not useful, since GDK does not provide APIs to operate on colormaps.

The function returns the following values:

  • gint: size of a colormap that is suitable for visual.

func (*Visual) Depth

func (visual *Visual) Depth() int

Depth returns the bit depth of this visual.

The function returns the following values:

  • gint: bit depth of this visual.

func (*Visual) GreenPixelDetails

func (visual *Visual) GreenPixelDetails() (mask uint32, shift, precision int)

GreenPixelDetails obtains values that are needed to calculate green pixel values in TrueColor and DirectColor. The “mask” is the significant bits within the pixel. The “shift” is the number of bits left we must shift a primary for it to be in position (according to the "mask"). Finally, "precision" refers to how much precision the pixel value contains for a particular primary.

The function returns the following values:

  • mask (optional): pointer to a #guint32 to be filled in, or NULL.
  • shift (optional): pointer to a #gint to be filled in, or NULL.
  • precision (optional): pointer to a #gint to be filled in, or NULL.

func (*Visual) RedPixelDetails

func (visual *Visual) RedPixelDetails() (mask uint32, shift, precision int)

RedPixelDetails obtains values that are needed to calculate red pixel values in TrueColor and DirectColor. The “mask” is the significant bits within the pixel. The “shift” is the number of bits left we must shift a primary for it to be in position (according to the "mask"). Finally, "precision" refers to how much precision the pixel value contains for a particular primary.

The function returns the following values:

  • mask (optional): pointer to a #guint32 to be filled in, or NULL.
  • shift (optional): pointer to a #gint to be filled in, or NULL.
  • precision (optional): pointer to a #gint to be filled in, or NULL.

func (*Visual) Screen

func (visual *Visual) Screen() *Screen

Screen gets the screen to which this visual belongs.

The function returns the following values:

  • screen to which this visual belongs.

func (*Visual) VisualType

func (visual *Visual) VisualType() VisualType

VisualType returns the type of visual this is (PseudoColor, TrueColor, etc).

The function returns the following values:

  • visualType stating the type of visual.

type VisualType

type VisualType C.gint

VisualType: set of values that describe the manner in which the pixel values for a visual are converted into RGB values for display.

const (
	// VisualStaticGray: each pixel value indexes a grayscale value directly.
	VisualStaticGray VisualType = iota
	// VisualGrayscale: each pixel is an index into a color map that maps
	// pixel values into grayscale values. The color map can be changed by an
	// application.
	VisualGrayscale
	// VisualStaticColor: each pixel value is an index into a predefined,
	// unmodifiable color map that maps pixel values into RGB values.
	VisualStaticColor
	// VisualPseudoColor: each pixel is an index into a color map that maps
	// pixel values into rgb values. The color map can be changed by an
	// application.
	VisualPseudoColor
	// VisualTrueColor: each pixel value directly contains red, green, and
	// blue components. Use gdk_visual_get_red_pixel_details(), etc, to obtain
	// information about how the components are assembled into a pixel value.
	VisualTrueColor
	// VisualDirectColor: each pixel value contains red, green, and blue
	// components as for GDK_VISUAL_TRUE_COLOR, but the components are mapped
	// via a color table into the final output table instead of being converted
	// directly.
	VisualDirectColor
)

func QueryVisualTypes deprecated

func QueryVisualTypes() []VisualType

QueryVisualTypes: this function returns the available visual types for the default screen. It’s equivalent to listing the visuals (gdk_list_visuals()) and then looking at the type field in each visual, removing duplicates.

The array returned by this function should not be freed.

Deprecated: Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual().

The function returns the following values:

  • visualTypes: return location for the available visual types.

func VisualGetBestType deprecated

func VisualGetBestType() VisualType

VisualGetBestType: return the best available visual type for the default GDK screen.

Deprecated: Visual selection should be done using gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual().

The function returns the following values:

  • visualType: best visual type.

func (VisualType) String

func (v VisualType) String() string

String returns the name in string for VisualType.

type WMDecoration

type WMDecoration C.guint

WMDecoration: these are hints originally defined by the Motif toolkit. The window manager can use them when determining how to decorate the window. The hint must be set before mapping the window.

const (
	// DecorAll: all decorations should be applied.
	DecorAll WMDecoration = 0b1
	// DecorBorder: frame should be drawn around the window.
	DecorBorder WMDecoration = 0b10
	// DecorResizeh: frame should have resize handles.
	DecorResizeh WMDecoration = 0b100
	// DecorTitle: titlebar should be placed above the window.
	DecorTitle WMDecoration = 0b1000
	// DecorMenu: button for opening a menu should be included.
	DecorMenu WMDecoration = 0b10000
	// DecorMinimize: minimize button should be included.
	DecorMinimize WMDecoration = 0b100000
	// DecorMaximize: maximize button should be included.
	DecorMaximize WMDecoration = 0b1000000
)

func (WMDecoration) Has

func (w WMDecoration) Has(other WMDecoration) bool

Has returns true if w contains other.

func (WMDecoration) String

func (w WMDecoration) String() string

String returns the names in string for WMDecoration.

type WMFunction

type WMFunction C.guint

WMFunction: these are hints originally defined by the Motif toolkit. The window manager can use them when determining the functions to offer for the window. The hint must be set before mapping the window.

const (
	// FuncAll: all functions should be offered.
	FuncAll WMFunction = 0b1
	// FuncResize: window should be resizable.
	FuncResize WMFunction = 0b10
	// FuncMove: window should be movable.
	FuncMove WMFunction = 0b100
	// FuncMinimize: window should be minimizable.
	FuncMinimize WMFunction = 0b1000
	// FuncMaximize: window should be maximizable.
	FuncMaximize WMFunction = 0b10000
	// FuncClose: window should be closable.
	FuncClose WMFunction = 0b100000
)

func (WMFunction) Has

func (w WMFunction) Has(other WMFunction) bool

Has returns true if w contains other.

func (WMFunction) String

func (w WMFunction) String() string

String returns the names in string for WMFunction.

type Window

type Window struct {
	*coreglib.Object
	// contains filtered or unexported fields
}

func BaseWindow

func BaseWindow(obj Windower) *Window

BaseWindow returns the underlying base object.

func NewWindow

func NewWindow(parent Windower, attributes *WindowAttr, attributesMask WindowAttributesType) *Window

NewWindow creates a new Window using the attributes from attributes. See WindowAttr and WindowAttributesType for more details. Note: to use this on displays other than the default display, parent must be specified.

The function takes the following parameters:

  • parent (optional) or NULL to create the window as a child of the default root window for the default display.
  • attributes of the new window.
  • attributesMask: mask indicating which fields in attributes are valid.

The function returns the following values:

  • window: new Window.

func (*Window) AcceptFocus

func (window *Window) AcceptFocus() bool

AcceptFocus determines whether or not the desktop environment shuld be hinted that the window does not want to receive input focus.

The function returns the following values:

  • ok: whether or not the window should receive input focus.

func (*Window) BackgroundPattern deprecated

func (window *Window) BackgroundPattern() *cairo.Pattern

BackgroundPattern gets the pattern used to clear the background on window.

Deprecated: Don't use this function.

The function returns the following values:

  • pattern (optional) to use for the background or NULL if there is no background.

func (*Window) Beep

func (window *Window) Beep()

Beep emits a short beep associated to window in the appropriate display, if supported. Otherwise, emits a short beep on the display just as gdk_display_beep().

func (*Window) BeginDrawFrame

func (window *Window) BeginDrawFrame(region *cairo.Region) *DrawingContext

BeginDrawFrame indicates that you are beginning the process of redrawing region on window, and provides you with a DrawingContext.

If window is a top level Window, backed by a native window implementation, a backing store (offscreen buffer) large enough to contain region will be created. The backing store will be initialized with the background color or background surface for window. Then, all drawing operations performed on window will be diverted to the backing store. When you call gdk_window_end_frame(), the contents of the backing store will be copied to window, making it visible on screen. Only the part of window contained in region will be modified; that is, drawing operations are clipped to region.

The net result of all this is to remove flicker, because the user sees the finished product appear all at once when you call gdk_window_end_draw_frame(). If you draw to window directly without calling gdk_window_begin_draw_frame(), the user may see flicker as individual drawing operations are performed in sequence.

When using GTK+, the widget system automatically places calls to gdk_window_begin_draw_frame() and gdk_window_end_draw_frame() around emissions of the GtkWidget::draw signal. That is, if you’re drawing the contents of the widget yourself, you can assume that the widget has a cleared background, is already set as the clip region, and already has a backing store. Therefore in most cases, application code in GTK does not need to call gdk_window_begin_draw_frame() explicitly.

The function takes the following parameters:

  • region: cairo region.

The function returns the following values:

  • drawingContext context that should be used to draw the contents of the window; the returned context is owned by GDK.

func (*Window) BeginMoveDrag

func (window *Window) BeginMoveDrag(button, rootX, rootY int, timestamp uint32)

BeginMoveDrag begins a window move operation (for a toplevel window).

This function assumes that the drag is controlled by the client pointer device, use gdk_window_begin_move_drag_for_device() to begin a drag with a different device.

The function takes the following parameters:

  • button being used to drag, or 0 for a keyboard-initiated drag.
  • rootX: root window X coordinate of mouse click that began the drag.
  • rootY: root window Y coordinate of mouse click that began the drag.
  • timestamp of mouse click that began the drag.

func (*Window) BeginMoveDragForDevice

func (window *Window) BeginMoveDragForDevice(device Devicer, button, rootX, rootY int, timestamp uint32)

BeginMoveDragForDevice begins a window move operation (for a toplevel window). You might use this function to implement a “window move grip,” for example. The function works best with window managers that support the Extended Window Manager Hints (http://www.freedesktop.org/Standards/wm-spec) but has a fallback implementation for other window managers.

The function takes the following parameters:

  • device used for the operation.
  • button being used to drag, or 0 for a keyboard-initiated drag.
  • rootX: root window X coordinate of mouse click that began the drag.
  • rootY: root window Y coordinate of mouse click that began the drag.
  • timestamp of mouse click that began the drag.

func (*Window) BeginPaintRect deprecated

func (window *Window) BeginPaintRect(rectangle *Rectangle)

BeginPaintRect: convenience wrapper around gdk_window_begin_paint_region() which creates a rectangular region for you. See gdk_window_begin_paint_region() for details.

Deprecated: Use gdk_window_begin_draw_frame() instead.

The function takes the following parameters:

  • rectangle you intend to draw to.

func (*Window) BeginPaintRegion deprecated

func (window *Window) BeginPaintRegion(region *cairo.Region)

BeginPaintRegion indicates that you are beginning the process of redrawing region. A backing store (offscreen buffer) large enough to contain region will be created. The backing store will be initialized with the background color or background surface for window. Then, all drawing operations performed on window will be diverted to the backing store. When you call gdk_window_end_paint(), the backing store will be copied to window, making it visible onscreen. Only the part of window contained in region will be modified; that is, drawing operations are clipped to region.

The net result of all this is to remove flicker, because the user sees the finished product appear all at once when you call gdk_window_end_paint(). If you draw to window directly without calling gdk_window_begin_paint_region(), the user may see flicker as individual drawing operations are performed in sequence. The clipping and background-initializing features of gdk_window_begin_paint_region() are conveniences for the programmer, so you can avoid doing that work yourself.

When using GTK+, the widget system automatically places calls to gdk_window_begin_paint_region() and gdk_window_end_paint() around emissions of the expose_event signal. That is, if you’re writing an expose event handler, you can assume that the exposed area in EventExpose has already been cleared to the window background, is already set as the clip region, and already has a backing store. Therefore in most cases, application code need not call gdk_window_begin_paint_region(). (You can disable the automatic calls around expose events on a widget-by-widget basis by calling gtk_widget_set_double_buffered().)

If you call this function multiple times before calling the matching gdk_window_end_paint(), the backing stores are pushed onto a stack. gdk_window_end_paint() copies the topmost backing store onscreen, subtracts the topmost region from all other regions in the stack, and pops the stack. All drawing operations affect only the topmost backing store in the stack. One matching call to gdk_window_end_paint() is required for each call to gdk_window_begin_paint_region().

Deprecated: Use gdk_window_begin_draw_frame() instead.

The function takes the following parameters:

  • region you intend to draw to.

func (*Window) BeginResizeDrag

func (window *Window) BeginResizeDrag(edge WindowEdge, button, rootX, rootY int, timestamp uint32)

BeginResizeDrag begins a window resize operation (for a toplevel window).

This function assumes that the drag is controlled by the client pointer device, use gdk_window_begin_resize_drag_for_device() to begin a drag with a different device.

The function takes the following parameters:

  • edge or corner from which the drag is started.
  • button being used to drag, or 0 for a keyboard-initiated drag.
  • rootX: root window X coordinate of mouse click that began the drag.
  • rootY: root window Y coordinate of mouse click that began the drag.
  • timestamp of mouse click that began the drag (use gdk_event_get_time()).

func (*Window) BeginResizeDragForDevice

func (window *Window) BeginResizeDragForDevice(edge WindowEdge, device Devicer, button, rootX, rootY int, timestamp uint32)

BeginResizeDragForDevice begins a window resize operation (for a toplevel window). You might use this function to implement a “window resize grip,” for example; in fact Statusbar uses it. The function works best with window managers that support the Extended Window Manager Hints (http://www.freedesktop.org/Standards/wm-spec) but has a fallback implementation for other window managers.

The function takes the following parameters:

  • edge or corner from which the drag is started.
  • device used for the operation.
  • button being used to drag, or 0 for a keyboard-initiated drag.
  • rootX: root window X coordinate of mouse click that began the drag.
  • rootY: root window Y coordinate of mouse click that began the drag.
  • timestamp of mouse click that began the drag (use gdk_event_get_time()).

func (*Window) Children

func (window *Window) Children() []Windower

Children gets the list of children of window known to GDK. This function only returns children created via GDK, so for example it’s useless when used with the root window; it only returns windows an application created itself.

The returned list must be freed, but the elements in the list need not be.

The function returns the following values:

  • list: list of child windows inside window.

func (*Window) ChildrenWithUserData

func (window *Window) ChildrenWithUserData(userData unsafe.Pointer) []Windower

ChildrenWithUserData gets the list of children of window known to GDK with a particular user_data set on it.

The returned list must be freed, but the elements in the list need not be.

The list is returned in (relative) stacking order, i.e. the lowest window is first.

The function takes the following parameters:

  • userData (optional): user data to look for.

The function returns the following values:

  • list: list of child windows inside window.

func (*Window) ClipRegion

func (window *Window) ClipRegion() *cairo.Region

ClipRegion computes the region of a window that potentially can be written to by drawing primitives. This region may not take into account other factors such as if the window is obscured by other windows, but no area outside of this region will be affected by drawing primitives.

The function returns the following values:

  • region This must be freed with cairo_region_destroy() when you are done.

func (*Window) Composited deprecated

func (window *Window) Composited() bool

Composited determines whether window is composited.

See gdk_window_set_composited().

Deprecated: Compositing is an outdated technology that only ever worked on X11.

The function returns the following values:

  • ok: TRUE if the window is composited.

func (*Window) ConfigureFinished deprecated

func (window *Window) ConfigureFinished()

ConfigureFinished does nothing, present only for compatiblity.

Deprecated: this function is no longer needed.

func (*Window) ConnectCreateSurface

func (window *Window) ConnectCreateSurface(f func(width, height int) (surface *cairo.Surface)) coreglib.SignalHandle

ConnectCreateSurface signal is emitted when an offscreen window needs its surface (re)created, which happens either when the window is first drawn to, or when the window is being resized. The first signal handler that returns a non-NULL surface will stop any further signal emission, and its surface will be used.

Note that it is not possible to access the window's previous surface from within any callback of this signal. Calling gdk_offscreen_window_get_surface() will lead to a crash.

func (*Window) ConnectMovedToRect

func (window *Window) ConnectMovedToRect(f func(flippedRect, finalRect unsafe.Pointer, flippedX, flippedY bool)) coreglib.SignalHandle

ConnectMovedToRect is emitted when the position of window is finalized after being moved to a destination rectangle.

window might be flipped over the destination rectangle in order to keep it on-screen, in which case flipped_x and flipped_y will be set to TRUE accordingly.

flipped_rect is the ideal position of window after any possible flipping, but before any possible sliding. final_rect is flipped_rect, but possibly translated in the case that flipping is still ineffective in keeping window on-screen.

func (*Window) ConnectPickEmbeddedChild

func (window *Window) ConnectPickEmbeddedChild(f func(x, y float64) (window Windower)) coreglib.SignalHandle

ConnectPickEmbeddedChild signal is emitted to find an embedded child at the given position.

func (*Window) CoordsFromParent

func (window *Window) CoordsFromParent(parentX, parentY float64) (x, y float64)

CoordsFromParent transforms window coordinates from a parent window to a child window, where the parent window is the normal parent as returned by gdk_window_get_parent() for normal windows, and the window's embedder as returned by gdk_offscreen_window_get_embedder() for offscreen windows.

For normal windows, calling this function is equivalent to subtracting the return values of gdk_window_get_position() from the parent coordinates. For offscreen windows however (which can be arbitrarily transformed), this function calls the GdkWindow::from-embedder: signal to translate the coordinates.

You should always use this function when writing generic code that walks down a window hierarchy.

See also: gdk_window_coords_to_parent().

The function takes the following parameters:

  • parentX: x coordinate in parent’s coordinate system.
  • parentY: y coordinate in parent’s coordinate system.

The function returns the following values:

  • x (optional): return location for X coordinate in child’s coordinate system.
  • y (optional): return location for Y coordinate in child’s coordinate system.

func (*Window) CoordsToParent

func (window *Window) CoordsToParent(x, y float64) (parentX, parentY float64)

CoordsToParent transforms window coordinates from a child window to its parent window, where the parent window is the normal parent as returned by gdk_window_get_parent() for normal windows, and the window's embedder as returned by gdk_offscreen_window_get_embedder() for offscreen windows.

For normal windows, calling this function is equivalent to adding the return values of gdk_window_get_position() to the child coordinates. For offscreen windows however (which can be arbitrarily transformed), this function calls the GdkWindow::to-embedder: signal to translate the coordinates.

You should always use this function when writing generic code that walks up a window hierarchy.

See also: gdk_window_coords_from_parent().

The function takes the following parameters:

  • x: x coordinate in child’s coordinate system.
  • y: y coordinate in child’s coordinate system.

The function returns the following values:

  • parentX (optional): return location for X coordinate in parent’s coordinate system, or NULL.
  • parentY (optional): return location for Y coordinate in parent’s coordinate system, or NULL.

func (*Window) CreateGLContext

func (window *Window) CreateGLContext() (GLContexter, error)

CreateGLContext creates a new GLContext matching the framebuffer format to the visual of the Window. The context is disconnected from any particular window or surface.

If the creation of the GLContext failed, error will be set.

Before using the returned GLContext, you will need to call gdk_gl_context_make_current() or gdk_gl_context_realize().

The function returns the following values:

  • glContext: newly created GLContext, or NULL on error.

func (*Window) CreateSimilarImageSurface

func (window *Window) CreateSimilarImageSurface(format cairo.Format, width, height, scale int) *cairo.Surface

CreateSimilarImageSurface: create a new image surface that is efficient to draw on the given window.

Initially the surface contents are all 0 (transparent if contents have transparency, black otherwise.)

The width and height of the new surface are not affected by the scaling factor of the window, or by the scale argument; they are the size of the surface in device pixels. If you wish to create an image surface capable of holding the contents of window you can use:

int scale = gdk_window_get_scale_factor (window);
int width = gdk_window_get_width (window) * scale;
int height = gdk_window_get_height (window) * scale;

// format is set elsewhere
cairo_surface_t *surface =
  gdk_window_create_similar_image_surface (window,
                                           format,
                                           width, height,
                                           scale);

Note that unlike cairo_surface_create_similar_image(), the new surface's device scale is set to scale, or to the scale factor of window if scale is 0.

The function takes the following parameters:

  • format for the new surface.
  • width of the new surface.
  • height of the new surface.
  • scale of the new surface, or 0 to use same as window.

The function returns the following values:

  • surface: pointer to the newly allocated surface. The caller owns the surface and should call cairo_surface_destroy() when done with it.

    This function always returns a valid pointer, but it will return a pointer to a “nil” surface if other is already in an error state or any other error occurs.

func (*Window) CreateSimilarSurface

func (window *Window) CreateSimilarSurface(content cairo.Content, width, height int) *cairo.Surface

CreateSimilarSurface: create a new surface that is as compatible as possible with the given window. For example the new surface will have the same fallback resolution and font options as window. Generally, the new surface will also use the same backend as window, unless that is not possible for some reason. The type of the returned surface may be examined with cairo_surface_get_type().

Initially the surface contents are all 0 (transparent if contents have transparency, black otherwise.).

The function takes the following parameters:

  • content for the new surface.
  • width of the new surface.
  • height of the new surface.

The function returns the following values:

  • surface: pointer to the newly allocated surface. The caller owns the surface and should call cairo_surface_destroy() when done with it.

    This function always returns a valid pointer, but it will return a pointer to a “nil” surface if other is already in an error state or any other error occurs.

func (*Window) Cursor

func (window *Window) Cursor() Cursorrer

Cursor retrieves a Cursor pointer for the cursor currently set on the specified Window, or NULL. If the return value is NULL then there is no custom cursor set on the specified window, and it is using the cursor for its parent window.

The function returns the following values:

  • cursor (optional) or NULL. The returned object is owned by the Window and should not be unreferenced directly. Use gdk_window_set_cursor() to unset the cursor of the window.

func (*Window) Decorations

func (window *Window) Decorations() (WMDecoration, bool)

Decorations returns the decorations set on the GdkWindow with gdk_window_set_decorations().

The function returns the following values:

  • decorations: window decorations will be written here.
  • ok: TRUE if the window has decorations set, FALSE otherwise.

func (*Window) Deiconify

func (window *Window) Deiconify()

Deiconify: attempt to deiconify (unminimize) window. On X11 the window manager may choose to ignore the request to deiconify. When using GTK+, use gtk_window_deiconify() instead of the Window variant. Or better yet, you probably want to use gtk_window_present_with_time(), which raises the window, focuses it, unminimizes it, and puts it on the current desktop.

func (*Window) Destroy

func (window *Window) Destroy()

Destroy destroys the window system resources associated with window and decrements window's reference count. The window system resources for all children of window are also destroyed, but the children’s reference counts are not decremented.

Note that a window will not be destroyed automatically when its reference count reaches zero. You must call this function yourself before that happens.

func (*Window) DeviceCursor

func (window *Window) DeviceCursor(device Devicer) Cursorrer

DeviceCursor retrieves a Cursor pointer for the device currently set on the specified Window, or NULL. If the return value is NULL then there is no custom cursor set on the specified window, and it is using the cursor for its parent window.

The function takes the following parameters:

  • device: master, pointer Device.

The function returns the following values:

  • cursor (optional) or NULL. The returned object is owned by the Window and should not be unreferenced directly. Use gdk_window_set_cursor() to unset the cursor of the window.

func (*Window) DeviceEvents

func (window *Window) DeviceEvents(device Devicer) EventMask

DeviceEvents returns the event mask for window corresponding to an specific device.

The function takes the following parameters:

  • device: Device.

The function returns the following values:

  • eventMask: device event mask for window.

func (*Window) DevicePosition

func (window *Window) DevicePosition(device Devicer) (x, y int, mask ModifierType, ret Windower)

DevicePosition obtains the current device position and modifier state. The position is given in coordinates relative to the upper left corner of window.

Use gdk_window_get_device_position_double() if you need subpixel precision.

The function takes the following parameters:

  • device: pointer Device to query to.

The function returns the following values:

  • x (optional): return location for the X coordinate of device, or NULL.
  • y (optional): return location for the Y coordinate of device, or NULL.
  • mask (optional): return location for the modifier mask, or NULL.
  • ret (optional): window underneath device (as with gdk_device_get_window_at_position()), or NULL if the window is not known to GDK.

func (*Window) DevicePositionDouble

func (window *Window) DevicePositionDouble(device Devicer) (x, y float64, mask ModifierType, ret Windower)

DevicePositionDouble obtains the current device position in doubles and modifier state. The position is given in coordinates relative to the upper left corner of window.

The function takes the following parameters:

  • device: pointer Device to query to.

The function returns the following values:

  • x (optional): return location for the X coordinate of device, or NULL.
  • y (optional): return location for the Y coordinate of device, or NULL.
  • mask (optional): return location for the modifier mask, or NULL.
  • ret (optional): window underneath device (as with gdk_device_get_window_at_position()), or NULL if the window is not known to GDK.

func (*Window) Display

func (window *Window) Display() *Display

Display gets the Display associated with a Window.

The function returns the following values:

  • display associated with window.

func (*Window) DragProtocol

func (window *Window) DragProtocol() (Windower, DragProtocol)

DragProtocol finds out the DND protocol supported by a window.

The function returns the following values:

  • target (optional): location of the window where the drop should happen. This may be window or a proxy window, or NULL if window does not support Drag and Drop.
  • dragProtocol: supported DND protocol.

func (*Window) EffectiveParent

func (window *Window) EffectiveParent() Windower

EffectiveParent obtains the parent of window, as known to GDK. Works like gdk_window_get_parent() for normal windows, but returns the window’s embedder for offscreen windows.

See also: gdk_offscreen_window_get_embedder().

The function returns the following values:

  • ret: effective parent of window.

func (*Window) EffectiveToplevel

func (window *Window) EffectiveToplevel() Windower

EffectiveToplevel gets the toplevel window that’s an ancestor of window.

Works like gdk_window_get_toplevel(), but treats an offscreen window's embedder as its parent, using gdk_window_get_effective_parent().

See also: gdk_offscreen_window_get_embedder().

The function returns the following values:

  • ret: effective toplevel window containing window.

func (*Window) EnableSynchronizedConfigure deprecated

func (window *Window) EnableSynchronizedConfigure()

EnableSynchronizedConfigure does nothing, present only for compatiblity.

Deprecated: this function is no longer needed.

func (*Window) EndDrawFrame

func (window *Window) EndDrawFrame(context *DrawingContext)

EndDrawFrame indicates that the drawing of the contents of window started with gdk_window_begin_frame() has been completed.

This function will take care of destroying the DrawingContext.

It is an error to call this function without a matching gdk_window_begin_frame() first.

The function takes the following parameters:

  • context created by gdk_window_begin_draw_frame().

func (*Window) EndPaint

func (window *Window) EndPaint()

EndPaint indicates that the backing store created by the most recent call to gdk_window_begin_paint_region() should be copied onscreen and deleted, leaving the next-most-recent backing store or no backing store at all as the active paint region. See gdk_window_begin_paint_region() for full details.

It is an error to call this function without a matching gdk_window_begin_paint_region() first.

func (*Window) EnsureNative

func (window *Window) EnsureNative() bool

EnsureNative tries to ensure that there is a window-system native window for this GdkWindow. This may fail in some situations, returning FALSE.

Offscreen window and children of them can never have native windows.

Some backends may not support native child windows.

The function returns the following values:

  • ok: TRUE if the window has a native window, FALSE otherwise.

func (*Window) EventCompression

func (window *Window) EventCompression() bool

EventCompression: get the current event compression setting for this window.

The function returns the following values:

  • ok: TRUE if motion events will be compressed.

func (*Window) Events

func (window *Window) Events() EventMask

Events gets the event mask for window for all master input devices. See gdk_window_set_events().

The function returns the following values:

  • eventMask: event mask for window.

func (*Window) Flush deprecated

func (window *Window) Flush()

Flush: this function does nothing.

Deprecated: since version 3.14.

func (*Window) Focus

func (window *Window) Focus(timestamp uint32)

Focus sets keyboard focus to window. In most cases, gtk_window_present_with_time() should be used on a Window, rather than calling this function.

The function takes the following parameters:

  • timestamp of the event triggering the window focus.

func (*Window) FocusOnMap

func (window *Window) FocusOnMap() bool

FocusOnMap determines whether or not the desktop environment should be hinted that the window does not want to receive input focus when it is mapped.

The function returns the following values:

  • ok: whether or not the window wants to receive input focus when it is mapped.

func (*Window) FrameClock

func (window *Window) FrameClock() FrameClocker

FrameClock gets the frame clock for the window. The frame clock for a window never changes unless the window is reparented to a new toplevel window.

The function returns the following values:

  • frameClock: frame clock.

func (*Window) FrameExtents

func (window *Window) FrameExtents() *Rectangle

FrameExtents obtains the bounding box of the window, including window manager titlebar/borders if any. The frame position is given in root window coordinates. To get the position of the window itself (rather than the frame) in root window coordinates, use gdk_window_get_origin().

The function returns the following values:

  • rect: rectangle to fill with bounding box of the window frame.

func (*Window) FreezeToplevelUpdatesLibgtkOnly deprecated

func (window *Window) FreezeToplevelUpdatesLibgtkOnly()

FreezeToplevelUpdatesLibgtkOnly: temporarily freezes a window and all its descendants such that it won't receive expose events. The window will begin receiving expose events again when gdk_window_thaw_toplevel_updates_libgtk_only() is called. If gdk_window_freeze_toplevel_updates_libgtk_only() has been called more than once, gdk_window_thaw_toplevel_updates_libgtk_only() must be called an equal number of times to begin processing exposes.

This function is not part of the GDK public API and is only for use by GTK+.

Deprecated: This symbol was never meant to be used outside of GTK+.

func (*Window) FreezeUpdates

func (window *Window) FreezeUpdates()

FreezeUpdates: temporarily freezes a window such that it won’t receive expose events. The window will begin receiving expose events again when gdk_window_thaw_updates() is called. If gdk_window_freeze_updates() has been called more than once, gdk_window_thaw_updates() must be called an equal number of times to begin processing exposes.

func (*Window) Fullscreen

func (window *Window) Fullscreen()

Fullscreen moves the window into fullscreen mode. This means the window covers the entire screen and is above any panels or task bars.

If the window was already fullscreen, then this function does nothing.

On X11, asks the window manager to put window in a fullscreen state, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don’t have a concept of “fullscreen”; so you can’t rely on the fullscreenification actually happening. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.

func (*Window) FullscreenMode

func (window *Window) FullscreenMode() FullscreenMode

FullscreenMode obtains the FullscreenMode of the window.

The function returns the following values:

  • fullscreenMode applied to the window when fullscreen.

func (*Window) FullscreenOnMonitor

func (window *Window) FullscreenOnMonitor(monitor int)

FullscreenOnMonitor moves the window into fullscreen mode on the given monitor. This means the window covers the entire screen and is above any panels or task bars.

If the window was already fullscreen, then this function does nothing.

The function takes the following parameters:

  • monitor: which monitor to display fullscreen on.

func (*Window) Geometry

func (window *Window) Geometry() (x, y, width, height int)

Geometry: any of the return location arguments to this function may be NULL, if you aren’t interested in getting the value of that field.

The X and Y coordinates returned are relative to the parent window of window, which for toplevels usually means relative to the window decorations (titlebar, etc.) rather than relative to the root window (screen-size background window).

On the X11 platform, the geometry is obtained from the X server, so reflects the latest position of window; this may be out-of-sync with the position of window delivered in the most-recently-processed EventConfigure. gdk_window_get_position() in contrast gets the position from the most recent configure event.

Note: If window is not a toplevel, it is much better to call gdk_window_get_position(), gdk_window_get_width() and gdk_window_get_height() instead, because it avoids the roundtrip to the X server and because these functions support the full 32-bit coordinate space, whereas gdk_window_get_geometry() is restricted to the 16-bit coordinates of X11.

The function returns the following values:

  • x (optional): return location for X coordinate of window (relative to its parent).
  • y (optional): return location for Y coordinate of window (relative to its parent).
  • width (optional): return location for width of window.
  • height (optional): return location for height of window.

func (*Window) GeometryChanged

func (window *Window) GeometryChanged()

GeometryChanged: this function informs GDK that the geometry of an embedded offscreen window has changed. This is necessary for GDK to keep track of which offscreen window the pointer is in.

func (*Window) Group

func (window *Window) Group() Windower

Group returns the group leader window for window. See gdk_window_set_group().

The function returns the following values:

  • ret: group leader window for window.

func (*Window) HasNative

func (window *Window) HasNative() bool

HasNative checks whether the window has a native window or not. Note that you can use gdk_window_ensure_native() if a native window is needed.

The function returns the following values:

  • ok: TRUE if the window has a native window, FALSE otherwise.

func (*Window) Height

func (window *Window) Height() int

Height returns the height of the given window.

On the X11 platform the returned size is the size reported in the most-recently-processed configure event, rather than the current size on the X server.

The function returns the following values:

  • gint: height of window.

func (*Window) Hide

func (window *Window) Hide()

Hide: for toplevel windows, withdraws them, so they will no longer be known to the window manager; for all windows, unmaps them, so they won’t be displayed. Normally done automatically as part of gtk_widget_hide().

func (*Window) Iconify

func (window *Window) Iconify()

Iconify asks to iconify (minimize) window. The window manager may choose to ignore the request, but normally will honor it. Using gtk_window_iconify() is preferred, if you have a Window widget.

This function only makes sense when window is a toplevel window.

func (*Window) InputShapeCombineRegion

func (window *Window) InputShapeCombineRegion(shapeRegion *cairo.Region, offsetX, offsetY int)

InputShapeCombineRegion: like gdk_window_shape_combine_region(), but the shape applies only to event handling. Mouse events which happen while the pointer position corresponds to an unset bit in the mask will be passed on the window below window.

An input shape is typically used with RGBA windows. The alpha channel of the window defines which pixels are invisible and allows for nicely antialiased borders, and the input shape controls where the window is “clickable”.

On the X11 platform, this requires version 1.1 of the shape extension.

On the Win32 platform, this functionality is not present and the function does nothing.

The function takes the following parameters:

  • shapeRegion: region of window to be non-transparent.
  • offsetX: x position of shape_region in window coordinates.
  • offsetY: y position of shape_region in window coordinates.

func (*Window) InvalidateMaybeRecurse

func (window *Window) InvalidateMaybeRecurse(region *cairo.Region, childFunc WindowChildFunc)

InvalidateMaybeRecurse adds region to the update area for window. The update area is the region that needs to be redrawn, or “dirty region.” The call gdk_window_process_updates() sends one or more expose events to the window, which together cover the entire update area. An application would normally redraw the contents of window in response to those expose events.

GDK will call gdk_window_process_all_updates() on your behalf whenever your program returns to the main loop and becomes idle, so normally there’s no need to do that manually, you just need to invalidate regions that you know should be redrawn.

The child_func parameter controls whether the region of each child window that intersects region will also be invalidated. Only children for which child_func returns UE will have the area invalidated.

The function takes the following parameters:

  • region: #cairo_region_t.
  • childFunc (optional): function to use to decide if to recurse to a child, NULL means never recurse.

func (*Window) InvalidateRect

func (window *Window) InvalidateRect(rect *Rectangle, invalidateChildren bool)

InvalidateRect: convenience wrapper around gdk_window_invalidate_region() which invalidates a rectangular region. See gdk_window_invalidate_region() for details.

The function takes the following parameters:

  • rect (optional): rectangle to invalidate or NULL to invalidate the whole window.
  • invalidateChildren: whether to also invalidate child windows.

func (*Window) InvalidateRegion

func (window *Window) InvalidateRegion(region *cairo.Region, invalidateChildren bool)

InvalidateRegion adds region to the update area for window. The update area is the region that needs to be redrawn, or “dirty region.” The call gdk_window_process_updates() sends one or more expose events to the window, which together cover the entire update area. An application would normally redraw the contents of window in response to those expose events.

GDK will call gdk_window_process_all_updates() on your behalf whenever your program returns to the main loop and becomes idle, so normally there’s no need to do that manually, you just need to invalidate regions that you know should be redrawn.

The invalidate_children parameter controls whether the region of each child window that intersects region will also be invalidated. If FALSE, then the update area for child windows will remain unaffected. See gdk_window_invalidate_maybe_recurse if you need fine grained control over which children are invalidated.

The function takes the following parameters:

  • region: #cairo_region_t.
  • invalidateChildren: TRUE to also invalidate child windows.

func (*Window) IsDestroyed

func (window *Window) IsDestroyed() bool

IsDestroyed: check to see if a window is destroyed..

The function returns the following values:

  • ok: TRUE if the window is destroyed.

func (*Window) IsInputOnly

func (window *Window) IsInputOnly() bool

IsInputOnly determines whether or not the window is an input only window.

The function returns the following values:

  • ok: TRUE if window is input only.

func (*Window) IsShaped

func (window *Window) IsShaped() bool

IsShaped determines whether or not the window is shaped.

The function returns the following values:

  • ok: TRUE if window is shaped.

func (*Window) IsViewable

func (window *Window) IsViewable() bool

IsViewable: check if the window and all ancestors of the window are mapped. (This is not necessarily "viewable" in the X sense, since we only check as far as we have GDK window parents, not to the root window.).

The function returns the following values:

  • ok: TRUE if the window is viewable.

func (*Window) IsVisible

func (window *Window) IsVisible() bool

IsVisible checks whether the window has been mapped (with gdk_window_show() or gdk_window_show_unraised()).

The function returns the following values:

  • ok: TRUE if the window is mapped.

func (*Window) Lower

func (window *Window) Lower()

Lower lowers window to the bottom of the Z-order (stacking order), so that other windows with the same parent window appear above window. This is true whether or not the other windows are visible.

If window is a toplevel, the window manager may choose to deny the request to move the window in the Z-order, gdk_window_lower() only requests the restack, does not guarantee it.

Note that gdk_window_show() raises the window again, so don’t call this function before gdk_window_show(). (Try gdk_window_show_unraised().).

func (*Window) MarkPaintFromClip

func (window *Window) MarkPaintFromClip(cr *cairo.Context)

MarkPaintFromClip: if you call this during a paint (e.g. between gdk_window_begin_paint_region() and gdk_window_end_paint() then GDK will mark the current clip region of the window as being drawn. This is required when mixing GL rendering via gdk_cairo_draw_from_gl() and cairo rendering, as otherwise GDK has no way of knowing when something paints over the GL-drawn regions.

This is typically called automatically by GTK+ and you don't need to care about this.

The function takes the following parameters:

  • cr: #cairo_t.

func (*Window) Maximize

func (window *Window) Maximize()

Maximize maximizes the window. If the window was already maximized, then this function does nothing.

On X11, asks the window manager to maximize window, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don’t have a concept of “maximized”; so you can’t rely on the maximization actually happening. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.

On Windows, reliably maximizes the window.

func (*Window) MergeChildInputShapes

func (window *Window) MergeChildInputShapes()

MergeChildInputShapes merges the input shape masks for any child windows into the input shape mask for window. i.e. the union of all input masks for window and its children will become the new input mask for window. See gdk_window_input_shape_combine_region().

This function is distinct from gdk_window_set_child_input_shapes() because it includes window’s input shape mask in the set of shapes to be merged.

func (*Window) MergeChildShapes

func (window *Window) MergeChildShapes()

MergeChildShapes merges the shape masks for any child windows into the shape mask for window. i.e. the union of all masks for window and its children will become the new mask for window. See gdk_window_shape_combine_region().

This function is distinct from gdk_window_set_child_shapes() because it includes window’s shape mask in the set of shapes to be merged.

func (*Window) ModalHint

func (window *Window) ModalHint() bool

ModalHint determines whether or not the window manager is hinted that window has modal behaviour.

The function returns the following values:

  • ok: whether or not the window has the modal hint set.

func (*Window) Move

func (window *Window) Move(x, y int)

Move repositions a window relative to its parent window. For toplevel windows, window managers may ignore or modify the move; you should probably use gtk_window_move() on a Window widget anyway, instead of using GDK functions. For child windows, the move will reliably succeed.

If you’re also planning to resize the window, use gdk_window_move_resize() to both move and resize simultaneously, for a nicer visual effect.

The function takes the following parameters:

  • x: x coordinate relative to window’s parent.
  • y: y coordinate relative to window’s parent.

func (*Window) MoveRegion

func (window *Window) MoveRegion(region *cairo.Region, dx, dy int)

MoveRegion: move the part of window indicated by region by dy pixels in the Y direction and dx pixels in the X direction. The portions of region that not covered by the new position of region are invalidated.

Child windows are not moved.

The function takes the following parameters:

  • region to move.
  • dx: amount to move in the X direction.
  • dy: amount to move in the Y direction.

func (*Window) MoveResize

func (window *Window) MoveResize(x, y, width, height int)

MoveResize: equivalent to calling gdk_window_move() and gdk_window_resize(), except that both operations are performed at once, avoiding strange visual effects. (i.e. the user may be able to see the window first move, then resize, if you don’t use gdk_window_move_resize().).

The function takes the following parameters:

  • x: new X position relative to window’s parent.
  • y: new Y position relative to window’s parent.
  • width: new width.
  • height: new height.

func (*Window) MoveToRect

func (window *Window) MoveToRect(rect *Rectangle, rectAnchor, windowAnchor Gravity, anchorHints AnchorHints, rectAnchorDx, rectAnchorDy int)

MoveToRect moves window to rect, aligning their anchor points.

rect is relative to the top-left corner of the window that window is transient for. rect_anchor and window_anchor determine anchor points on rect and window to pin together. rect's anchor point can optionally be offset by rect_anchor_dx and rect_anchor_dy, which is equivalent to offsetting the position of window.

anchor_hints determines how window will be moved if the anchor points cause it to move off-screen. For example, GDK_ANCHOR_FLIP_X will replace GDK_GRAVITY_NORTH_WEST with GDK_GRAVITY_NORTH_EAST and vice versa if window extends beyond the left or right edges of the monitor.

Connect to the Window::moved-to-rect signal to find out how it was actually positioned.

The function takes the following parameters:

  • rect: destination Rectangle to align window with.
  • rectAnchor: point on rect to align with window's anchor point.
  • windowAnchor: point on window to align with rect's anchor point.
  • anchorHints: positioning hints to use when limited on space.
  • rectAnchorDx: horizontal offset to shift window, i.e. rect's anchor point.
  • rectAnchorDy: vertical offset to shift window, i.e. rect's anchor point.

func (*Window) Origin

func (window *Window) Origin() (x, y, gint int)

Origin obtains the position of a window in root window coordinates. (Compare with gdk_window_get_position() and gdk_window_get_geometry() which return the position of a window relative to its parent window.).

The function returns the following values:

  • x (optional): return location for X coordinate.
  • y (optional): return location for Y coordinate.
  • gint: not meaningful, ignore.

func (*Window) Parent

func (window *Window) Parent() Windower

Parent obtains the parent of window, as known to GDK. Does not query the X server; thus this returns the parent as passed to gdk_window_new(), not the actual parent. This should never matter unless you’re using Xlib calls mixed with GDK calls on the X11 platform. It may also matter for toplevel windows, because the window manager may choose to reparent them.

Note that you should use gdk_window_get_effective_parent() when writing generic code that walks up a window hierarchy, because gdk_window_get_parent() will most likely not do what you expect if there are offscreen windows in the hierarchy.

The function returns the following values:

  • ret: parent of window.

func (*Window) PassThrough

func (window *Window) PassThrough() bool

PassThrough returns whether input to the window is passed through to the window below.

See gdk_window_set_pass_through() for details.

The function returns the following values:

func (*Window) PeekChildren

func (window *Window) PeekChildren() []Windower

PeekChildren: like gdk_window_get_children(), but does not copy the list of children, so the list does not need to be freed.

The function returns the following values:

  • list: a reference to the list of child windows in window.

func (*Window) Pointer deprecated

func (window *Window) Pointer() (x, y int, mask ModifierType, ret Windower)

Pointer obtains the current pointer position and modifier state. The position is given in coordinates relative to the upper left corner of window.

Deprecated: Use gdk_window_get_device_position() instead.

The function returns the following values:

  • x (optional): return location for X coordinate of pointer or NULL to not return the X coordinate.
  • y (optional): return location for Y coordinate of pointer or NULL to not return the Y coordinate.
  • mask (optional): return location for modifier mask or NULL to not return the modifier mask.
  • ret (optional): window containing the pointer (as with gdk_window_at_pointer()), or NULL if the window containing the pointer isn’t known to GDK.

func (*Window) Position

func (window *Window) Position() (x, y int)

Position obtains the position of the window as reported in the most-recently-processed EventConfigure. Contrast with gdk_window_get_geometry() which queries the X server for the current window position, regardless of which events have been received or processed.

The position coordinates are relative to the window’s parent window.

The function returns the following values:

  • x (optional): x coordinate of window.
  • y (optional): y coordinate of window.

func (*Window) ProcessUpdates deprecated

func (window *Window) ProcessUpdates(updateChildren bool)

ProcessUpdates sends one or more expose events to window. The areas in each expose event will cover the entire update area for the window (see gdk_window_invalidate_region() for details). Normally GDK calls gdk_window_process_all_updates() on your behalf, so there’s no need to call this function unless you want to force expose events to be delivered immediately and synchronously (vs. the usual case, where GDK delivers them in an idle handler). Occasionally this is useful to produce nicer scrolling behavior, for example.

Deprecated: since version 3.22.

The function takes the following parameters:

  • updateChildren: whether to also process updates for child windows.

func (*Window) Raise

func (window *Window) Raise()

Raise raises window to the top of the Z-order (stacking order), so that other windows with the same parent window appear below window. This is true whether or not the windows are visible.

If window is a toplevel, the window manager may choose to deny the request to move the window in the Z-order, gdk_window_raise() only requests the restack, does not guarantee it.

func (*Window) RegisterDND

func (window *Window) RegisterDND()

RegisterDND registers a window as a potential drop destination.

func (*Window) Reparent

func (window *Window) Reparent(newParent Windower, x, y int)

Reparent reparents window into the given new_parent. The window being reparented will be unmapped as a side effect.

The function takes the following parameters:

  • newParent: new parent to move window into.
  • x: x location inside the new parent.
  • y: y location inside the new parent.

func (*Window) Resize

func (window *Window) Resize(width, height int)

Resize resizes window; for toplevel windows, asks the window manager to resize the window. The window manager may not allow the resize. When using GTK+, use gtk_window_resize() instead of this low-level GDK function.

Windows may not be resized below 1x1.

If you’re also planning to move the window, use gdk_window_move_resize() to both move and resize simultaneously, for a nicer visual effect.

The function takes the following parameters:

  • width: new width of the window.
  • height: new height of the window.

func (*Window) Restack

func (window *Window) Restack(sibling Windower, above bool)

Restack changes the position of window in the Z-order (stacking order), so that it is above sibling (if above is TRUE) or below sibling (if above is FALSE).

If sibling is NULL, then this either raises (if above is TRUE) or lowers the window.

If window is a toplevel, the window manager may choose to deny the request to move the window in the Z-order, gdk_window_restack() only requests the restack, does not guarantee it.

The function takes the following parameters:

  • sibling (optional) that is a sibling of window, or NULL.
  • above: boolean.

func (*Window) RootCoords

func (window *Window) RootCoords(x, y int) (rootX, rootY int)

RootCoords obtains the position of a window position in root window coordinates. This is similar to gdk_window_get_origin() but allows you to pass in any position in the window, not just the origin.

The function takes the following parameters:

  • x: x coordinate in window.
  • y: y coordinate in window.

The function returns the following values:

  • rootX: return location for X coordinate.
  • rootY: return location for Y coordinate.

func (*Window) RootOrigin

func (window *Window) RootOrigin() (x, y int)

RootOrigin obtains the top-left corner of the window manager frame in root window coordinates.

The function returns the following values:

  • x: return location for X position of window frame.
  • y: return location for Y position of window frame.

func (*Window) ScaleFactor

func (window *Window) ScaleFactor() int

ScaleFactor returns the internal scale factor that maps from window coordiantes to the actual device pixels. On traditional systems this is 1, but on very high density outputs this can be a higher value (often 2).

A higher value means that drawing is automatically scaled up to a higher resolution, so any code doing drawing will automatically look nicer. However, if you are supplying pixel-based data the scale value can be used to determine whether to use a pixel resource with higher resolution data.

The scale of a window may change during runtime, if this happens a configure event will be sent to the toplevel window.

The function returns the following values:

  • gint: scale factor.

func (*Window) Screen

func (window *Window) Screen() *Screen

Screen gets the Screen associated with a Window.

The function returns the following values:

  • screen associated with window.

func (*Window) Scroll

func (window *Window) Scroll(dx, dy int)

Scroll the contents of window, both pixels and children, by the given amount. window itself does not move. Portions of the window that the scroll operation brings in from offscreen areas are invalidated. The invalidated region may be bigger than what would strictly be necessary.

For X11, a minimum area will be invalidated if the window has no subwindows, or if the edges of the window’s parent do not extend beyond the edges of the window. In other cases, a multi-step process is used to scroll the window which may produce temporary visual artifacts and unnecessary invalidations.

The function takes the following parameters:

  • dx: amount to scroll in the X direction.
  • dy: amount to scroll in the Y direction.

func (*Window) SetAcceptFocus

func (window *Window) SetAcceptFocus(acceptFocus bool)

SetAcceptFocus: setting accept_focus to FALSE hints the desktop environment that the window doesn’t want to receive input focus.

On X, it is the responsibility of the window manager to interpret this hint. ICCCM-compliant window manager usually respect it.

The function takes the following parameters:

  • acceptFocus: TRUE if the window should receive input focus.

func (*Window) SetBackground deprecated

func (window *Window) SetBackground(color *Color)

SetBackground sets the background color of window.

However, when using GTK+, influence the background of a widget using a style class or CSS — if you’re an application — or with gtk_style_context_set_background() — if you're implementing a custom widget.

Deprecated: Don't use this function.

The function takes the following parameters:

  • color: Color.

func (*Window) SetBackgroundPattern deprecated

func (window *Window) SetBackgroundPattern(pattern *cairo.Pattern)

SetBackgroundPattern sets the background of window.

A background of NULL means that the window won't have any background. On the X11 backend it's also possible to inherit the background from the parent window using gdk_x11_get_parent_relative_pattern().

The windowing system will normally fill a window with its background when the window is obscured then exposed.

Deprecated: Don't use this function.

The function takes the following parameters:

  • pattern (optional) to use, or NULL.

func (*Window) SetBackgroundRGBA deprecated

func (window *Window) SetBackgroundRGBA(rgba *RGBA)

SetBackgroundRGBA sets the background color of window.

See also gdk_window_set_background_pattern().

Deprecated: Don't use this function.

The function takes the following parameters:

  • rgba: RGBA color.

func (*Window) SetChildInputShapes

func (window *Window) SetChildInputShapes()

SetChildInputShapes sets the input shape mask of window to the union of input shape masks for all children of window, ignoring the input shape mask of window itself. Contrast with gdk_window_merge_child_input_shapes() which includes the input shape mask of window in the masks to be merged.

func (*Window) SetChildShapes

func (window *Window) SetChildShapes()

SetChildShapes sets the shape mask of window to the union of shape masks for all children of window, ignoring the shape mask of window itself. Contrast with gdk_window_merge_child_shapes() which includes the shape mask of window in the masks to be merged.

func (*Window) SetComposited deprecated

func (window *Window) SetComposited(composited bool)

SetComposited sets a Window as composited, or unsets it. Composited windows do not automatically have their contents drawn to the screen. Drawing is redirected to an offscreen buffer and an expose event is emitted on the parent of the composited window. It is the responsibility of the parent’s expose handler to manually merge the off-screen content onto the screen in whatever way it sees fit.

It only makes sense for child windows to be composited; see gdk_window_set_opacity() if you need translucent toplevel windows.

An additional effect of this call is that the area of this window is no longer clipped from regions marked for invalidation on its parent. Draws done on the parent window are also no longer clipped by the child.

This call is only supported on some systems (currently, only X11 with new enough Xcomposite and Xdamage extensions). You must call gdk_display_supports_composite() to check if setting a window as composited is supported before attempting to do so.

Deprecated: Compositing is an outdated technology that only ever worked on X11.

The function takes the following parameters:

  • composited: TRUE to set the window as composited.

func (*Window) SetCursor

func (window *Window) SetCursor(cursor Cursorrer)

SetCursor sets the default mouse pointer for a Window.

Note that cursor must be for the same display as window.

Use gdk_cursor_new_for_display() or gdk_cursor_new_from_pixbuf() to create the cursor. To make the cursor invisible, use GDK_BLANK_CURSOR. Passing NULL for the cursor argument to gdk_window_set_cursor() means that window will use the cursor of its parent window. Most windows should use this default.

The function takes the following parameters:

  • cursor (optional): cursor.

func (*Window) SetDecorations

func (window *Window) SetDecorations(decorations WMDecoration)

SetDecorations: “Decorations” are the features the window manager adds to a toplevel Window. This function sets the traditional Motif window manager hints that tell the window manager which decorations you would like your window to have. Usually you should use gtk_window_set_decorated() on a Window instead of using the GDK function directly.

The decorations argument is the logical OR of the fields in the WMDecoration enumeration. If K_DECOR_ALL is included in the mask, the other bits indicate which decorations should be turned off. If K_DECOR_ALL is not included, then the other bits indicate which decorations should be turned on.

Most window managers honor a decorations hint of 0 to disable all decorations, but very few honor all possible combinations of bits.

The function takes the following parameters:

  • decorations: decoration hint mask.

func (*Window) SetDeviceCursor

func (window *Window) SetDeviceCursor(device Devicer, cursor Cursorrer)

SetDeviceCursor sets a specific Cursor for a given device when it gets inside window. Use gdk_cursor_new_for_display() or gdk_cursor_new_from_pixbuf() to create the cursor. To make the cursor invisible, use GDK_BLANK_CURSOR. Passing NULL for the cursor argument to gdk_window_set_cursor() means that window will use the cursor of its parent window. Most windows should use this default.

The function takes the following parameters:

  • device: master, pointer Device.
  • cursor: Cursor.

func (*Window) SetDeviceEvents

func (window *Window) SetDeviceEvents(device Devicer, eventMask EventMask)

SetDeviceEvents sets the event mask for a given device (Normally a floating device, not attached to any visible pointer) to window. For example, an event mask including K_BUTTON_PRESS_MASK means the window should report button press events. The event mask is the bitwise OR of values from the EventMask enumeration.

See the [input handling overview][event-masks] for details.

The function takes the following parameters:

  • device to enable events for.
  • eventMask: event mask for window.

func (*Window) SetEventCompression

func (window *Window) SetEventCompression(eventCompression bool)

SetEventCompression determines whether or not extra unprocessed motion events in the event queue can be discarded. If TRUE only the most recent event will be delivered.

Some types of applications, e.g. paint programs, need to see all motion events and will benefit from turning off event compression.

By default, event compression is enabled.

The function takes the following parameters:

  • eventCompression: TRUE if motion events should be compressed.

func (*Window) SetEvents

func (window *Window) SetEvents(eventMask EventMask)

SetEvents: event mask for a window determines which events will be reported for that window from all master input devices. For example, an event mask including K_BUTTON_PRESS_MASK means the window should report button press events. The event mask is the bitwise OR of values from the EventMask enumeration.

See the [input handling overview][event-masks] for details.

The function takes the following parameters:

  • eventMask: event mask for window.

func (*Window) SetFocusOnMap

func (window *Window) SetFocusOnMap(focusOnMap bool)

SetFocusOnMap: setting focus_on_map to FALSE hints the desktop environment that the window doesn’t want to receive input focus when it is mapped. focus_on_map should be turned off for windows that aren’t triggered interactively (such as popups from network activity).

On X, it is the responsibility of the window manager to interpret this hint. Window managers following the freedesktop.org window manager extension specification should respect it.

The function takes the following parameters:

  • focusOnMap: TRUE if the window should receive input focus when mapped.

func (*Window) SetFullscreenMode

func (window *Window) SetFullscreenMode(mode FullscreenMode)

SetFullscreenMode specifies whether the window should span over all monitors (in a multi-head setup) or only the current monitor when in fullscreen mode.

The mode argument is from the FullscreenMode enumeration. If K_FULLSCREEN_ON_ALL_MONITORS is specified, the fullscreen window will span over all monitors from the Screen.

On X11, searches through the list of monitors from the Screen the ones which delimit the 4 edges of the entire Screen and will ask the window manager to span the window over these monitors.

If the XINERAMA extension is not available or not usable, this function has no effect.

Not all window managers support this, so you can’t rely on the fullscreen window to span over the multiple monitors when K_FULLSCREEN_ON_ALL_MONITORS is specified.

The function takes the following parameters:

  • mode: fullscreen mode.

func (*Window) SetFunctions

func (window *Window) SetFunctions(functions WMFunction)

SetFunctions sets hints about the window management functions to make available via buttons on the window frame.

On the X backend, this function sets the traditional Motif window manager hint for this purpose. However, few window managers do anything reliable or interesting with this hint. Many ignore it entirely.

The functions argument is the logical OR of values from the WMFunction enumeration. If the bitmask includes K_FUNC_ALL, then the other bits indicate which functions to disable; if it doesn’t include K_FUNC_ALL, it indicates which functions to enable.

The function takes the following parameters:

  • functions: bitmask of operations to allow on window.

func (*Window) SetGeometryHints

func (window *Window) SetGeometryHints(geometry *Geometry, geomMask WindowHints)

SetGeometryHints sets the geometry hints for window. Hints flagged in geom_mask are set, hints not flagged in geom_mask are unset. To unset all hints, use a geom_mask of 0 and a geometry of NULL.

This function provides hints to the windowing system about acceptable sizes for a toplevel window. The purpose of this is to constrain user resizing, but the windowing system will typically (but is not required to) also constrain the current size of the window to the provided values and constrain programatic resizing via gdk_window_resize() or gdk_window_move_resize().

Note that on X11, this effect has no effect on windows of type GDK_WINDOW_TEMP or windows where override redirect has been turned on via gdk_window_set_override_redirect() since these windows are not resizable by the user.

Since you can’t count on the windowing system doing the constraints for programmatic resizes, you should generally call gdk_window_constrain_size() yourself to determine appropriate sizes.

The function takes the following parameters:

  • geometry hints.
  • geomMask: bitmask indicating fields of geometry to pay attention to.

func (*Window) SetGroup

func (window *Window) SetGroup(leader Windower)

SetGroup sets the group leader window for window. By default, GDK sets the group leader for all toplevel windows to a global window implicitly created by GDK. With this function you can override this default.

The group leader window allows the window manager to distinguish all windows that belong to a single application. It may for example allow users to minimize/unminimize all windows belonging to an application at once. You should only set a non-default group window if your application pretends to be multiple applications.

The function takes the following parameters:

  • leader (optional): group leader window, or NULL to restore the default group leader window.

func (*Window) SetIconList

func (window *Window) SetIconList(pixbufs []*gdkpixbuf.Pixbuf)

SetIconList sets a list of icons for the window. One of these will be used to represent the window when it has been iconified. The icon is usually shown in an icon box or some sort of task bar. Which icon size is shown depends on the window manager. The window manager can scale the icon but setting several size icons can give better image quality since the window manager may only need to scale the icon by a small amount or not at all.

Note that some platforms don't support window icons.

The function takes the following parameters:

  • pixbufs: A list of pixbufs, of different sizes.

func (*Window) SetIconName

func (window *Window) SetIconName(name string)

SetIconName windows may have a name used while minimized, distinct from the name they display in their titlebar. Most of the time this is a bad idea from a user interface standpoint. But you can set such a name with this function, if you like.

After calling this with a non-NULL name, calls to gdk_window_set_title() will not update the icon title.

Using NULL for name unsets the icon title; further calls to gdk_window_set_title() will again update the icon title as well.

Note that some platforms don't support window icons.

The function takes the following parameters:

  • name (optional) of window while iconified (minimized).

func (*Window) SetKeepAbove

func (window *Window) SetKeepAbove(setting bool)

SetKeepAbove: set if window must be kept above other windows. If the window was already above, then this function does nothing.

On X11, asks the window manager to keep window above, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don’t have a concept of “keep above”; so you can’t rely on the window being kept above. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.

The function takes the following parameters:

  • setting: whether to keep window above other windows.

func (*Window) SetKeepBelow

func (window *Window) SetKeepBelow(setting bool)

SetKeepBelow: set if window must be kept below other windows. If the window was already below, then this function does nothing.

On X11, asks the window manager to keep window below, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don’t have a concept of “keep below”; so you can’t rely on the window being kept below. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.

The function takes the following parameters:

  • setting: whether to keep window below other windows.

func (*Window) SetModalHint

func (window *Window) SetModalHint(modal bool)

SetModalHint: application can use this hint to tell the window manager that a certain window has modal behaviour. The window manager can use this information to handle modal windows in a special way.

You should only use this on windows for which you have previously called gdk_window_set_transient_for().

The function takes the following parameters:

  • modal: TRUE if the window is modal, FALSE otherwise.

func (*Window) SetOpacity

func (window *Window) SetOpacity(opacity float64)

SetOpacity: set window to render as partially transparent, with opacity 0 being fully transparent and 1 fully opaque. (Values of the opacity parameter are clamped to the [0,1] range.)

For toplevel windows this depends on support from the windowing system that may not always be there. For instance, On X11, this works only on X screens with a compositing manager running. On Wayland, there is no per-window opacity value that the compositor would apply. Instead, use gdk_window_set_opaque_region (window, NULL) to tell the compositor that the entire window is (potentially) non-opaque, and draw your content with alpha, or use gtk_widget_set_opacity() to set an overall opacity for your widgets.

For child windows this function only works for non-native windows.

For setting up per-pixel alpha topelevels, see gdk_screen_get_rgba_visual(), and for non-toplevels, see gdk_window_set_composited().

Support for non-toplevel windows was added in 3.8.

The function takes the following parameters:

  • opacity: opacity.

func (*Window) SetOpaqueRegion

func (window *Window) SetOpaqueRegion(region *cairo.Region)

SetOpaqueRegion: for optimisation purposes, compositing window managers may like to not draw obscured regions of windows, or turn off blending during for these regions. With RGB windows with no transparency, this is just the shape of the window, but with ARGB32 windows, the compositor does not know what regions of the window are transparent or not.

This function only works for toplevel windows.

GTK+ will update this property automatically if the window background is opaque, as we know where the opaque regions are. If your window background is not opaque, please update this property in your Widget::style-updated handler.

The function takes the following parameters:

  • region (optional): region, or NULL.

func (*Window) SetOverrideRedirect

func (window *Window) SetOverrideRedirect(overrideRedirect bool)

SetOverrideRedirect: override redirect window is not under the control of the window manager. This means it won’t have a titlebar, won’t be minimizable, etc. - it will be entirely under the control of the application. The window manager can’t see the override redirect window at all.

Override redirect should only be used for short-lived temporary windows, such as popup menus. Menu uses an override redirect window in its implementation, for example.

The function takes the following parameters:

  • overrideRedirect: TRUE if window should be override redirect.

func (*Window) SetPassThrough

func (window *Window) SetPassThrough(passThrough bool)

SetPassThrough sets whether input to the window is passed through to the window below.

The default value of this is FALSE, which means that pointer events that happen inside the window are send first to the window, but if the event is not selected by the event mask then the event is sent to the parent window, and so on up the hierarchy.

If pass_through is TRUE then such pointer events happen as if the window wasn't there at all, and thus will be sent first to any windows below window. This is useful if the window is used in a transparent fashion. In the terminology of the web this would be called "pointer-events: none".

Note that a window with pass_through TRUE can still have a subwindow without pass through, so you can get events on a subset of a window. And in that cases you would get the in-between related events such as the pointer enter/leave events on its way to the destination window.

The function takes the following parameters:

  • passThrough: boolean.

func (*Window) SetRole

func (window *Window) SetRole(role string)

SetRole: when using GTK+, typically you should use gtk_window_set_role() instead of this low-level function.

The window manager and session manager use a window’s role to distinguish it from other kinds of window in the same application. When an application is restarted after being saved in a previous session, all windows with the same title and role are treated as interchangeable. So if you have two windows with the same title that should be distinguished for session management purposes, you should set the role on those windows. It doesn’t matter what string you use for the role, as long as you have a different role for each non-interchangeable kind of window.

The function takes the following parameters:

  • role: string indicating its role.

func (*Window) SetShadowWidth

func (window *Window) SetShadowWidth(left, right, top, bottom int)

SetShadowWidth: newer GTK+ windows using client-side decorations use extra geometry around their frames for effects like shadows and invisible borders. Window managers that want to maximize windows or snap to edges need to know where the extents of the actual frame lie, so that users don’t feel like windows are snapping against random invisible edges.

Note that this property is automatically updated by GTK+, so this function should only be used by applications which do not use GTK+ to create toplevel windows.

The function takes the following parameters:

  • left extent.
  • right extent.
  • top extent.
  • bottom extent.

func (*Window) SetSkipPagerHint

func (window *Window) SetSkipPagerHint(skipsPager bool)

SetSkipPagerHint toggles whether a window should appear in a pager (workspace switcher, or other desktop utility program that displays a small thumbnail representation of the windows on the desktop). If a window’s semantic type as specified with gdk_window_set_type_hint() already fully describes the window, this function should not be called in addition, instead you should allow the window to be treated according to standard policy for its semantic type.

The function takes the following parameters:

  • skipsPager: TRUE to skip the pager.

func (*Window) SetSkipTaskbarHint

func (window *Window) SetSkipTaskbarHint(skipsTaskbar bool)

SetSkipTaskbarHint toggles whether a window should appear in a task list or window list. If a window’s semantic type as specified with gdk_window_set_type_hint() already fully describes the window, this function should not be called in addition, instead you should allow the window to be treated according to standard policy for its semantic type.

The function takes the following parameters:

  • skipsTaskbar: TRUE to skip the taskbar.

func (*Window) SetSourceEvents

func (window *Window) SetSourceEvents(source InputSource, eventMask EventMask)

SetSourceEvents sets the event mask for any floating device (i.e. not attached to any visible pointer) that has the source defined as source. This event mask will be applied both to currently existing, newly added devices after this call, and devices being attached/detached.

The function takes the following parameters:

  • source to define the source class.
  • eventMask: event mask for window.

func (*Window) SetStartupID

func (window *Window) SetStartupID(startupId string)

SetStartupID: when using GTK+, typically you should use gtk_window_set_startup_id() instead of this low-level function.

The function takes the following parameters:

  • startupId: string with startup-notification identifier.

func (*Window) SetStaticGravities deprecated

func (window *Window) SetStaticGravities(useStatic bool) bool

SetStaticGravities: used to set the bit gravity of the given window to static, and flag it so all children get static subwindow gravity. This is used if you are implementing scary features that involve deep knowledge of the windowing system. Don’t worry about it.

Deprecated: static gravities haven't worked on anything but X11 for a long time.

The function takes the following parameters:

  • useStatic: TRUE to turn on static gravity.

The function returns the following values:

  • ok: FALSE.

func (*Window) SetSupportMultidevice

func (window *Window) SetSupportMultidevice(supportMultidevice bool)

SetSupportMultidevice: this function will enable multidevice features in window.

Multidevice aware windows will need to handle properly multiple, per device enter/leave events, device grabs and grab ownerships.

The function takes the following parameters:

  • supportMultidevice: TRUE to enable multidevice support in window.

func (*Window) SetTitle

func (window *Window) SetTitle(title string)

SetTitle sets the title of a toplevel window, to be displayed in the titlebar. If you haven’t explicitly set the icon name for the window (using gdk_window_set_icon_name()), the icon name will be set to title as well. title must be in UTF-8 encoding (as with all user-readable strings in GDK/GTK+). title may not be NULL.

The function takes the following parameters:

  • title of window.

func (*Window) SetTransientFor

func (window *Window) SetTransientFor(parent Windower)

SetTransientFor indicates to the window manager that window is a transient dialog associated with the application window parent. This allows the window manager to do things like center window on parent and keep window above parent.

See gtk_window_set_transient_for() if you’re using Window or Dialog.

The function takes the following parameters:

  • parent: another toplevel Window.

func (*Window) SetTypeHint

func (window *Window) SetTypeHint(hint WindowTypeHint)

SetTypeHint: application can use this call to provide a hint to the window manager about the functionality of a window. The window manager can use this information when determining the decoration and behaviour of the window.

The hint must be set before the window is mapped.

The function takes the following parameters:

  • hint of the function this window will have.

func (*Window) SetUrgencyHint

func (window *Window) SetUrgencyHint(urgent bool)

SetUrgencyHint toggles whether a window needs the user's urgent attention.

The function takes the following parameters:

  • urgent: TRUE if the window is urgent.

func (*Window) SetUserData

func (window *Window) SetUserData(userData *coreglib.Object)

SetUserData: for most purposes this function is deprecated in favor of g_object_set_data(). However, for historical reasons GTK+ stores the Widget that owns a Window as user data on the Window. So, custom widget implementations should use this function for that. If GTK+ receives an event for a Window, and the user data for the window is non-NULL, GTK+ will assume the user data is a Widget, and forward the event to that widget.

The function takes the following parameters:

  • userData (optional): user data.

func (*Window) ShapeCombineRegion

func (window *Window) ShapeCombineRegion(shapeRegion *cairo.Region, offsetX, offsetY int)

ShapeCombineRegion makes pixels in window outside shape_region be transparent, so that the window may be nonrectangular.

If shape_region is NULL, the shape will be unset, so the whole window will be opaque again. offset_x and offset_y are ignored if shape_region is NULL.

On the X11 platform, this uses an X server extension which is widely available on most common platforms, but not available on very old X servers, and occasionally the implementation will be buggy. On servers without the shape extension, this function will do nothing.

This function works on both toplevel and child windows.

The function takes the following parameters:

  • shapeRegion (optional): region of window to be non-transparent.
  • offsetX: x position of shape_region in window coordinates.
  • offsetY: y position of shape_region in window coordinates.

func (*Window) Show

func (window *Window) Show()

Show: like gdk_window_show_unraised(), but also raises the window to the top of the window stack (moves the window to the front of the Z-order).

This function maps a window so it’s visible onscreen. Its opposite is gdk_window_hide().

When implementing a Widget, you should call this function on the widget's Window as part of the “map” method.

func (*Window) ShowUnraised

func (window *Window) ShowUnraised()

ShowUnraised shows a Window onscreen, but does not modify its stacking order. In contrast, gdk_window_show() will raise the window to the top of the window stack.

On the X11 platform, in Xlib terms, this function calls XMapWindow() (it also updates some internal GDK state, which means that you can’t really use XMapWindow() directly on a GDK window).

func (*Window) ShowWindowMenu

func (window *Window) ShowWindowMenu(event *Event) bool

ShowWindowMenu asks the windowing system to show the window menu. The window menu is the menu shown when right-clicking the titlebar on traditional windows managed by the window manager. This is useful for windows using client-side decorations, activating it with a right-click on the window decorations.

The function takes the following parameters:

  • event to show the menu for.

The function returns the following values:

  • ok: TRUE if the window menu was shown and FALSE otherwise.

func (*Window) SourceEvents

func (window *Window) SourceEvents(source InputSource) EventMask

SourceEvents returns the event mask for window corresponding to the device class specified by source.

The function takes the following parameters:

  • source to define the source class.

The function returns the following values:

  • eventMask: source event mask for window.

func (*Window) State

func (window *Window) State() WindowState

State gets the bitwise OR of the currently active window state flags, from the WindowState enumeration.

The function returns the following values:

  • windowState: window state bitfield.

func (*Window) Stick

func (window *Window) Stick()

Stick: “Pins” a window such that it’s on all workspaces and does not scroll with viewports, for window managers that have scrollable viewports. (When using Window, gtk_window_stick() may be more useful.)

On the X11 platform, this function depends on window manager support, so may have no effect with many window managers. However, GDK will do the best it can to convince the window manager to stick the window. For window managers that don’t support this operation, there’s nothing you can do to force it to happen.

func (*Window) SupportMultidevice

func (window *Window) SupportMultidevice() bool

SupportMultidevice returns TRUE if the window is aware of the existence of multiple devices.

The function returns the following values:

  • ok: TRUE if the window handles multidevice features.

func (*Window) ThawToplevelUpdatesLibgtkOnly deprecated

func (window *Window) ThawToplevelUpdatesLibgtkOnly()

ThawToplevelUpdatesLibgtkOnly thaws a window frozen with gdk_window_freeze_toplevel_updates_libgtk_only().

This function is not part of the GDK public API and is only for use by GTK+.

Deprecated: This symbol was never meant to be used outside of GTK+.

func (*Window) ThawUpdates

func (window *Window) ThawUpdates()

ThawUpdates thaws a window frozen with gdk_window_freeze_updates().

func (*Window) Toplevel

func (window *Window) Toplevel() Windower

Toplevel gets the toplevel window that’s an ancestor of window.

Any window type but GDK_WINDOW_CHILD is considered a toplevel window, as is a GDK_WINDOW_CHILD window that has a root window as parent.

Note that you should use gdk_window_get_effective_toplevel() when you want to get to a window’s toplevel as seen on screen, because gdk_window_get_toplevel() will most likely not do what you expect if there are offscreen windows in the hierarchy.

The function returns the following values:

  • ret: toplevel window containing window.

func (*Window) TypeHint

func (window *Window) TypeHint() WindowTypeHint

TypeHint: this function returns the type hint set for a window.

The function returns the following values:

  • windowTypeHint: type hint set for window.

func (*Window) Unfullscreen

func (window *Window) Unfullscreen()

Unfullscreen moves the window out of fullscreen mode. If the window was not fullscreen, does nothing.

On X11, asks the window manager to move window out of the fullscreen state, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don’t have a concept of “fullscreen”; so you can’t rely on the unfullscreenification actually happening. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.

func (*Window) Unmaximize

func (window *Window) Unmaximize()

Unmaximize unmaximizes the window. If the window wasn’t maximized, then this function does nothing.

On X11, asks the window manager to unmaximize window, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don’t have a concept of “maximized”; so you can’t rely on the unmaximization actually happening. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.

On Windows, reliably unmaximizes the window.

func (*Window) Unstick

func (window *Window) Unstick()

Unstick: reverse operation for gdk_window_stick(); see gdk_window_stick(), and gtk_window_unstick().

func (*Window) UpdateArea

func (window *Window) UpdateArea() *cairo.Region

UpdateArea transfers ownership of the update area from window to the caller of the function. That is, after calling this function, window will no longer have an invalid/dirty region; the update area is removed from window and handed to you. If a window has no update area, gdk_window_get_update_area() returns NULL. You are responsible for calling cairo_region_destroy() on the returned region if it’s non-NULL.

The function returns the following values:

  • region: update area for window.

func (*Window) UserData

func (window *Window) UserData() unsafe.Pointer

UserData retrieves the user data for window, which is normally the widget that window belongs to. See gdk_window_set_user_data().

The function returns the following values:

  • data (optional): return location for user data.

func (*Window) VisibleRegion

func (window *Window) VisibleRegion() *cairo.Region

VisibleRegion computes the region of the window that is potentially visible. This does not necessarily take into account if the window is obscured by other windows, but no area outside of this region is visible.

The function returns the following values:

  • region This must be freed with cairo_region_destroy() when you are done.

func (*Window) Visual

func (window *Window) Visual() *Visual

Visual gets the Visual describing the pixel format of window.

The function returns the following values:

  • visual: Visual.

func (*Window) Width

func (window *Window) Width() int

Width returns the width of the given window.

On the X11 platform the returned size is the size reported in the most-recently-processed configure event, rather than the current size on the X server.

The function returns the following values:

  • gint: width of window.

func (*Window) WindowType

func (window *Window) WindowType() WindowType

WindowType gets the type of the window. See WindowType.

The function returns the following values:

  • windowType: type of window.

func (*Window) Withdraw

func (window *Window) Withdraw()

Withdraw withdraws a window (unmaps it and asks the window manager to forget about it). This function is not really useful as gdk_window_hide() automatically withdraws toplevel windows before hiding them.

type WindowAttr

type WindowAttr struct {
	// contains filtered or unexported fields
}

WindowAttr attributes to use for a newly-created window.

An instance of this type is always passed by reference.

func (*WindowAttr) Cursor

func (w *WindowAttr) Cursor() Cursorrer

Cursor: cursor for the window (see gdk_window_set_cursor()).

func (*WindowAttr) EventMask

func (w *WindowAttr) EventMask() int

EventMask: event mask (see gdk_window_set_events()).

func (*WindowAttr) Height

func (w *WindowAttr) Height() int

Height: height of window.

func (*WindowAttr) OverrideRedirect

func (w *WindowAttr) OverrideRedirect() bool

OverrideRedirect: TRUE to bypass the window manager.

func (*WindowAttr) SetEventMask

func (w *WindowAttr) SetEventMask(eventMask int)

EventMask: event mask (see gdk_window_set_events()).

func (*WindowAttr) SetHeight

func (w *WindowAttr) SetHeight(height int)

Height: height of window.

func (*WindowAttr) SetOverrideRedirect

func (w *WindowAttr) SetOverrideRedirect(overrideRedirect bool)

OverrideRedirect: TRUE to bypass the window manager.

func (*WindowAttr) SetWidth

func (w *WindowAttr) SetWidth(width int)

Width: width of window.

func (*WindowAttr) SetX

func (w *WindowAttr) SetX(x int)

X coordinate relative to parent window (see gdk_window_move()).

func (*WindowAttr) SetY

func (w *WindowAttr) SetY(y int)

Y coordinate relative to parent window (see gdk_window_move()).

func (*WindowAttr) Title

func (w *WindowAttr) Title() string

Title: title of the window (for toplevel windows).

func (*WindowAttr) TypeHint

func (w *WindowAttr) TypeHint() WindowTypeHint

TypeHint: hint of the function of the window.

func (*WindowAttr) Visual

func (w *WindowAttr) Visual() *Visual

Visual for window.

func (*WindowAttr) Wclass

func (w *WindowAttr) Wclass() WindowWindowClass

Wclass (normal window) or K_INPUT_ONLY (invisible window that receives events).

func (*WindowAttr) Width

func (w *WindowAttr) Width() int

Width: width of window.

func (*WindowAttr) WindowType

func (w *WindowAttr) WindowType() WindowType

WindowType: type of window.

func (*WindowAttr) WmclassClass

func (w *WindowAttr) WmclassClass() string

WmclassClass: don’t use (see gtk_window_set_wmclass()).

func (*WindowAttr) WmclassName

func (w *WindowAttr) WmclassName() string

WmclassName: don’t use (see gtk_window_set_wmclass()).

func (*WindowAttr) X

func (w *WindowAttr) X() int

X coordinate relative to parent window (see gdk_window_move()).

func (*WindowAttr) Y

func (w *WindowAttr) Y() int

Y coordinate relative to parent window (see gdk_window_move()).

type WindowAttributesType

type WindowAttributesType C.guint

WindowAttributesType: used to indicate which fields in the WindowAttr struct should be honored. For example, if you filled in the “cursor” and “x” fields of WindowAttr, pass “GDK_WA_X | GDK_WA_CURSOR” to gdk_window_new(). Fields in WindowAttr not covered by a bit in this enum are required; for example, the width/height, wclass, and window_type fields are required, they have no corresponding flag in WindowAttributesType.

const (
	// WaTitle: honor the title field.
	WaTitle WindowAttributesType = 0b10
	// WaX: honor the X coordinate field.
	WaX WindowAttributesType = 0b100
	// WaY: honor the Y coordinate field.
	WaY WindowAttributesType = 0b1000
	// WaCursor: honor the cursor field.
	WaCursor WindowAttributesType = 0b10000
	// WaVisual: honor the visual field.
	WaVisual WindowAttributesType = 0b100000
	// WaWmclass: honor the wmclass_class and wmclass_name fields.
	WaWmclass WindowAttributesType = 0b1000000
	// WaNoredir: honor the override_redirect field.
	WaNoredir WindowAttributesType = 0b10000000
	// WaTypeHint: honor the type_hint field.
	WaTypeHint WindowAttributesType = 0b100000000
)

func (WindowAttributesType) Has

Has returns true if w contains other.

func (WindowAttributesType) String

func (w WindowAttributesType) String() string

String returns the names in string for WindowAttributesType.

type WindowChildFunc

type WindowChildFunc func(window Windower) (ok bool)

WindowChildFunc: function of this type is passed to gdk_window_invalidate_maybe_recurse(). It gets called for each child of the window to determine whether to recursively invalidate it or now.

type WindowClass added in v0.0.5

type WindowClass struct {
	// contains filtered or unexported fields
}

WindowClass: instance of this type is always passed by reference.

type WindowEdge

type WindowEdge C.gint

WindowEdge determines a window edge or corner.

const (
	// WindowEdgeNorthWest: top left corner.
	WindowEdgeNorthWest WindowEdge = iota
	// WindowEdgeNorth: top edge.
	WindowEdgeNorth
	// WindowEdgeNorthEast: top right corner.
	WindowEdgeNorthEast
	// WindowEdgeWest: left edge.
	WindowEdgeWest
	// WindowEdgeEast: right edge.
	WindowEdgeEast
	// WindowEdgeSouthWest: lower left corner.
	WindowEdgeSouthWest
	// WindowEdgeSouth: lower edge.
	WindowEdgeSouth
	// WindowEdgeSouthEast: lower right corner.
	WindowEdgeSouthEast
)

func (WindowEdge) String

func (w WindowEdge) String() string

String returns the name in string for WindowEdge.

type WindowHints

type WindowHints C.guint

WindowHints: used to indicate which fields of a Geometry struct should be paid attention to. Also, the presence/absence of GDK_HINT_POS, GDK_HINT_USER_POS, and GDK_HINT_USER_SIZE is significant, though they don't directly refer to Geometry fields. GDK_HINT_USER_POS will be set automatically by Window if you call gtk_window_move(). GDK_HINT_USER_POS and GDK_HINT_USER_SIZE should be set if the user specified a size/position using a --geometry command-line argument; gtk_window_parse_geometry() automatically sets these flags.

const (
	// HintPos indicates that the program has positioned the window.
	HintPos WindowHints = 0b1
	// HintMinSize: min size fields are set.
	HintMinSize WindowHints = 0b10
	// HintMaxSize: max size fields are set.
	HintMaxSize WindowHints = 0b100
	// HintBaseSize: base size fields are set.
	HintBaseSize WindowHints = 0b1000
	// HintAspect: aspect ratio fields are set.
	HintAspect WindowHints = 0b10000
	// HintResizeInc: resize increment fields are set.
	HintResizeInc WindowHints = 0b100000
	// HintWinGravity: window gravity field is set.
	HintWinGravity WindowHints = 0b1000000
	// HintUserPos indicates that the window’s position was explicitly set by
	// the user.
	HintUserPos WindowHints = 0b10000000
	// HintUserSize indicates that the window’s size was explicitly set by the
	// user.
	HintUserSize WindowHints = 0b100000000
)

func (WindowHints) Has

func (w WindowHints) Has(other WindowHints) bool

Has returns true if w contains other.

func (WindowHints) String

func (w WindowHints) String() string

String returns the names in string for WindowHints.

type WindowOverrides added in v0.0.5

type WindowOverrides struct {
	// The function takes the following parameters:
	//
	//   - width
	//   - height
	//
	// The function returns the following values:
	//
	CreateSurface func(width, height int) *cairo.Surface
	// The function takes the following parameters:
	//
	//   - embedderX
	//   - embedderY
	//   - offscreenX
	//   - offscreenY
	//
	FromEmbedder func(embedderX, embedderY float64, offscreenX, offscreenY *float64)
	// The function takes the following parameters:
	//
	//   - offscreenX
	//   - offscreenY
	//   - embedderX
	//   - embedderY
	//
	ToEmbedder func(offscreenX, offscreenY float64, embedderX, embedderY *float64)
}

WindowOverrides contains methods that are overridable.

type WindowState

type WindowState C.guint

WindowState specifies the state of a toplevel window.

const (
	// WindowStateWithdrawn: window is not shown.
	WindowStateWithdrawn WindowState = 0b1
	// WindowStateIconified: window is minimized.
	WindowStateIconified WindowState = 0b10
	// WindowStateMaximized: window is maximized.
	WindowStateMaximized WindowState = 0b100
	// WindowStateSticky: window is sticky.
	WindowStateSticky WindowState = 0b1000
	// WindowStateFullscreen: window is maximized without decorations.
	WindowStateFullscreen WindowState = 0b10000
	// WindowStateAbove: window is kept above other windows.
	WindowStateAbove WindowState = 0b100000
	// WindowStateBelow: window is kept below other windows.
	WindowStateBelow WindowState = 0b1000000
	// WindowStateFocused: window is presented as focused (with active
	// decorations).
	WindowStateFocused WindowState = 0b10000000
	// WindowStateTiled: window is in a tiled state, Since 3.10. Since 3.22.23,
	// this is deprecated in favor of per-edge information.
	WindowStateTiled WindowState = 0b100000000
	// WindowStateTopTiled: whether the top edge is tiled, Since 3.22.23.
	WindowStateTopTiled WindowState = 0b1000000000
	// WindowStateTopResizable: whether the top edge is resizable, Since
	// 3.22.23.
	WindowStateTopResizable WindowState = 0b10000000000
	// WindowStateRightTiled: whether the right edge is tiled, Since 3.22.23.
	WindowStateRightTiled WindowState = 0b100000000000
	// WindowStateRightResizable: whether the right edge is resizable, Since
	// 3.22.23.
	WindowStateRightResizable WindowState = 0b1000000000000
	// WindowStateBottomTiled: whether the bottom edge is tiled, Since 3.22.23.
	WindowStateBottomTiled WindowState = 0b10000000000000
	// WindowStateBottomResizable: whether the bottom edge is resizable,
	// Since 3.22.23.
	WindowStateBottomResizable WindowState = 0b100000000000000
	// WindowStateLeftTiled: whether the left edge is tiled, Since 3.22.23.
	WindowStateLeftTiled WindowState = 0b1000000000000000
	// WindowStateLeftResizable: whether the left edge is resizable, Since
	// 3.22.23.
	WindowStateLeftResizable WindowState = 0b10000000000000000
)

func (WindowState) Has

func (w WindowState) Has(other WindowState) bool

Has returns true if w contains other.

func (WindowState) String

func (w WindowState) String() string

String returns the names in string for WindowState.

type WindowType

type WindowType C.gint

WindowType describes the kind of window.

const (
	// WindowRoot: root window; this window has no parent, covers the entire
	// screen, and is created by the window system.
	WindowRoot WindowType = iota
	// WindowToplevel: toplevel window (used to implement Window).
	WindowToplevel
	// WindowChild: child window (used to implement e.g. Entry).
	WindowChild
	// WindowTemp: override redirect temporary window (used to implement Menu).
	WindowTemp
	// WindowForeign: foreign window (see gdk_window_foreign_new()).
	WindowForeign
	// WindowOffscreen: offscreen window (see [Offscreen
	// Windows][OFFSCREEN-WINDOWS]). Since 2.18.
	WindowOffscreen
	// WindowSubsurface: subsurface-based window; This window is visually tied
	// to a toplevel, and is moved/stacked with it. Currently this window type
	// is only implemented in Wayland. Since 3.14.
	WindowSubsurface
)

func (WindowType) String

func (w WindowType) String() string

String returns the name in string for WindowType.

type WindowTypeHint

type WindowTypeHint C.gint

WindowTypeHint: these are hints for the window manager that indicate what type of function the window has. The window manager can use this when determining decoration and behaviour of the window. The hint must be set before mapping the window.

See the Extended Window Manager Hints (http://www.freedesktop.org/Standards/wm-spec) specification for more details about window types.

const (
	// WindowTypeHintNormal: normal toplevel window.
	WindowTypeHintNormal WindowTypeHint = iota
	// WindowTypeHintDialog: dialog window.
	WindowTypeHintDialog
	// WindowTypeHintMenu: window used to implement a menu; GTK+ uses this hint
	// only for torn-off menus, see TearoffMenuItem.
	WindowTypeHintMenu
	// WindowTypeHintToolbar: window used to implement toolbars.
	WindowTypeHintToolbar
	// WindowTypeHintSplashscreen: window used to display a splash screen during
	// application startup.
	WindowTypeHintSplashscreen
	// WindowTypeHintUtility: utility windows which are not detached toolbars or
	// dialogs.
	WindowTypeHintUtility
	// WindowTypeHintDock: used for creating dock or panel windows.
	WindowTypeHintDock
	// WindowTypeHintDesktop: used for creating the desktop background window.
	WindowTypeHintDesktop
	// WindowTypeHintDropdownMenu: menu that belongs to a menubar.
	WindowTypeHintDropdownMenu
	// WindowTypeHintPopupMenu: menu that does not belong to a menubar, e.g.
	// a context menu.
	WindowTypeHintPopupMenu
	// WindowTypeHintTooltip: tooltip.
	WindowTypeHintTooltip
	// WindowTypeHintNotification: notification - typically a “bubble” that
	// belongs to a status icon.
	WindowTypeHintNotification
	// WindowTypeHintCombo: popup from a combo box.
	WindowTypeHintCombo
	// WindowTypeHintDND: window that is used to implement a DND cursor.
	WindowTypeHintDND
)

func (WindowTypeHint) String

func (w WindowTypeHint) String() string

String returns the name in string for WindowTypeHint.

type WindowWindowClass

type WindowWindowClass C.gint

WindowWindowClass: GDK_INPUT_OUTPUT windows are the standard kind of window you might expect. Such windows receive events and are also displayed on screen. GDK_INPUT_ONLY windows are invisible; they are usually placed above other windows in order to trap or filter the events. You can’t draw on GDK_INPUT_ONLY windows.

const (
	// InputOutput: window for graphics and events.
	InputOutput WindowWindowClass = iota
	// InputOnly: window for events only.
	InputOnly
)

func (WindowWindowClass) String

func (w WindowWindowClass) String() string

String returns the name in string for WindowWindowClass.

type Windower

type Windower interface {
	coreglib.Objector
	// contains filtered or unexported methods
}

Windower describes types inherited from class Window.

To get the original type, the caller must assert this to an interface or another type.

func DeviceGrabInfoLibgtkOnly deprecated

func DeviceGrabInfoLibgtkOnly(display *Display, device Devicer) (grabWindow Windower, ownerEvents, ok bool)

DeviceGrabInfoLibgtkOnly determines information about the current keyboard grab. This is not public API and must not be used by applications.

Deprecated: The symbol was never meant to be used outside of GTK+.

The function takes the following parameters:

  • display for which to get the grab information.
  • device to get the grab information from.

The function returns the following values:

  • grabWindow: location to store current grab window.
  • ownerEvents: location to store boolean indicating whether the owner_events flag to gdk_keyboard_grab() or gdk_pointer_grab() was TRUE.
  • ok: TRUE if this application currently has the keyboard grabbed.

func GetDefaultRootWindow

func GetDefaultRootWindow() Windower

GetDefaultRootWindow obtains the root window (parent all other windows are inside) for the default display and screen.

The function returns the following values:

  • window: default root window.

func OffscreenWindowGetEmbedder

func OffscreenWindowGetEmbedder(window Windower) Windower

OffscreenWindowGetEmbedder gets the window that window is embedded in.

The function takes the following parameters:

  • window: Window.

The function returns the following values:

  • ret (optional): embedding Window, or NULL if window is not an mbedded offscreen window.

func WindowAtPointer deprecated

func WindowAtPointer() (winX, winY int, window Windower)

WindowAtPointer obtains the window underneath the mouse pointer, returning the location of that window in win_x, win_y. Returns NULL if the window under the mouse pointer is not known to GDK (if the window belongs to another application and a Window hasn’t been created for it with gdk_window_foreign_new())

NOTE: For multihead-aware widgets or applications use gdk_display_get_window_at_pointer() instead.

Deprecated: Use gdk_device_get_window_at_position() instead.

The function returns the following values:

  • winX (optional): return location for origin of the window under the pointer.
  • winY (optional): return location for origin of the window under the pointer.
  • window under the mouse pointer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL