This file is indexed.

/usr/share/gtk-doc/html/cogl-2.0-experimental/cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html is in libcogl-doc 1.16.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CoglOnscreen: The Onscreen Framebuffer Interface</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Cogl 2.0 Reference Manual">
<link rel="up" href="cogl-framebuffer-apis.html" title="Framebuffers">
<link rel="prev" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html" title="CoglFramebuffer: The Framebuffer Interface">
<link rel="next" href="cogl-2.0-experimental-Offscreen-Framebuffers.html" title="Offscreen Framebuffers">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="cogl-framebuffer-apis.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Cogl 2.0 Reference Manual</th>
<td><a accesskey="n" href="cogl-2.0-experimental-Offscreen-Framebuffers.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.top_of_page"></a>CoglOnscreen: The Onscreen Framebuffer Interface</span></h2>
<p>CoglOnscreen: The Onscreen Framebuffer Interface</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">                    <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen">CoglOnscreen</a>;
<a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>            <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-is-onscreen" title="cogl_is_onscreen ()">cogl_is_onscreen</a>                    (<em class="parameter"><code><span class="type">void</span> *object</code></em>);
#define             <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#COGL-ONSCREEN:CAPS" title="COGL_ONSCREEN()">COGL_ONSCREEN</a>                       (X)

<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="returnvalue">CoglOnscreen</span></a> *      <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-new" title="cogl_onscreen_new ()">cogl_onscreen_new</a>                   (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Top-Level-Context.html#CoglContext" title="CoglContext"><span class="type">CoglContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>);

<span class="returnvalue">void</span>                (<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenX11MaskCallback" title="CoglOnscreenX11MaskCallback ()">*CoglOnscreenX11MaskCallback</a>)      (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><span class="type">uint32_t</span> event_mask</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-x11-onscreen-set-foreign-window-xid" title="cogl_x11_onscreen_set_foreign_window_xid ()">cogl_x11_onscreen_set_foreign_window_xid</a>
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><span class="type">uint32_t</span> xid</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenX11MaskCallback" title="CoglOnscreenX11MaskCallback ()"><span class="type">CoglOnscreenX11MaskCallback</span></a> update</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);
<span class="returnvalue">uint32_t</span>            <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-x11-onscreen-get-window-xid" title="cogl_x11_onscreen_get_window_xid ()">cogl_x11_onscreen_get_window_xid</a>    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>);
<span class="returnvalue">uint32_t</span>            <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-x11-onscreen-get-visual-xid" title="cogl_x11_onscreen_get_visual_xid ()">cogl_x11_onscreen_get_visual_xid</a>    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-win32-onscreen-set-foreign-window" title="cogl_win32_onscreen_set_foreign_window ()">cogl_win32_onscreen_set_foreign_window</a>
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><span class="type">HWND</span> hwnd</code></em>);
<span class="returnvalue">HWND</span>                <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-win32-onscreen-get-window" title="cogl_win32_onscreen_get_window ()">cogl_win32_onscreen_get_window</a>      (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-show" title="cogl_onscreen_show ()">cogl_onscreen_show</a>                  (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-hide" title="cogl_onscreen_hide ()">cogl_onscreen_hide</a>                  (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>);

<span class="returnvalue">void</span>                (<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglFrameCallback" title="CoglFrameCallback ()">*CoglFrameCallback</a>)                (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><span class="type">CoglFrameEvent</span> event</code></em>,
                                                         <em class="parameter"><code><span class="type">CoglFrameInfo</span> *info</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);
typedef             <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglFrameClosure" title="CoglFrameClosure">CoglFrameClosure</a>;
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglFrameClosure" title="CoglFrameClosure"><span class="returnvalue">CoglFrameClosure</span></a> *  <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-frame-callback" title="cogl_onscreen_add_frame_callback ()">cogl_onscreen_add_frame_callback</a>    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglFrameCallback" title="CoglFrameCallback ()"><span class="type">CoglFrameCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#CoglUserDataDestroyCallback" title="CoglUserDataDestroyCallback"><span class="type">CoglUserDataDestroyCallback</span></a> destroy</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-remove-frame-callback" title="cogl_onscreen_remove_frame_callback ()">cogl_onscreen_remove_frame_callback</a> (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglFrameClosure" title="CoglFrameClosure"><span class="type">CoglFrameClosure</span></a> *closure</code></em>);

struct              <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyInfo" title="struct CoglOnscreenDirtyInfo">CoglOnscreenDirtyInfo</a>;
<span class="returnvalue">void</span>                (<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyCallback" title="CoglOnscreenDirtyCallback ()">*CoglOnscreenDirtyCallback</a>)        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyInfo" title="struct CoglOnscreenDirtyInfo"><span class="type">CoglOnscreenDirtyInfo</span></a> *info</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);
typedef             <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyClosure" title="CoglOnscreenDirtyClosure">CoglOnscreenDirtyClosure</a>;
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyClosure" title="CoglOnscreenDirtyClosure"><span class="returnvalue">CoglOnscreenDirtyClosure</span></a> * <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-dirty-callback" title="cogl_onscreen_add_dirty_callback ()">cogl_onscreen_add_dirty_callback</a>
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyCallback" title="CoglOnscreenDirtyCallback ()"><span class="type">CoglOnscreenDirtyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#CoglUserDataDestroyCallback" title="CoglUserDataDestroyCallback"><span class="type">CoglUserDataDestroyCallback</span></a> destroy</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-remove-dirty-callback" title="cogl_onscreen_remove_dirty_callback ()">cogl_onscreen_remove_dirty_callback</a> (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyClosure" title="CoglOnscreenDirtyClosure"><span class="type">CoglOnscreenDirtyClosure</span></a> *closure</code></em>);

<span class="returnvalue">void</span>                (<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenResizeCallback" title="CoglOnscreenResizeCallback ()">*CoglOnscreenResizeCallback</a>)       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);
typedef             <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenResizeClosure" title="CoglOnscreenResizeClosure">CoglOnscreenResizeClosure</a>;
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenResizeClosure" title="CoglOnscreenResizeClosure"><span class="returnvalue">CoglOnscreenResizeClosure</span></a> * <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-resize-callback" title="cogl_onscreen_add_resize_callback ()">cogl_onscreen_add_resize_callback</a>
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenResizeCallback" title="CoglOnscreenResizeCallback ()"><span class="type">CoglOnscreenResizeCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#CoglUserDataDestroyCallback" title="CoglUserDataDestroyCallback"><span class="type">CoglUserDataDestroyCallback</span></a> destroy</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-remove-resize-callback" title="cogl_onscreen_remove_resize_callback ()">cogl_onscreen_remove_resize_callback</a>
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenResizeClosure" title="CoglOnscreenResizeClosure"><span class="type">CoglOnscreenResizeClosure</span></a> *closure</code></em>);

<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-swap-buffers" title="cogl_onscreen_swap_buffers ()">cogl_onscreen_swap_buffers</a>          (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-swap-buffers-with-damage" title="cogl_onscreen_swap_buffers_with_damage ()">cogl_onscreen_swap_buffers_with_damage</a>
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code>const <span class="type">int</span> *rectangles</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> n_rectangles</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-swap-region" title="cogl_onscreen_swap_region ()">cogl_onscreen_swap_region</a>           (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code>const <span class="type">int</span> *rectangles</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> n_rectangles</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-set-swap-throttled" title="cogl_onscreen_set_swap_throttled ()">cogl_onscreen_set_swap_throttled</a>    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="type">CoglBool</span></a> throttled</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglSwapBuffersNotify" title="CoglSwapBuffersNotify ()">*CoglSwapBuffersNotify</a>)            (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);
unsigned <span class="returnvalue">int</span>        <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-swap-buffers-callback" title="cogl_onscreen_add_swap_buffers_callback ()">cogl_onscreen_add_swap_buffers_callback</a>
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglSwapBuffersNotify" title="CoglSwapBuffersNotify ()"><span class="type">CoglSwapBuffersNotify</span></a> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-remove-swap-buffers-callback" title="cogl_onscreen_remove_swap_buffers_callback ()">cogl_onscreen_remove_swap_buffers_callback</a>
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code>unsigned <span class="type">int</span> id</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="CoglOnscreen"></a><h3>CoglOnscreen</h3>
<pre class="programlisting">typedef struct _CoglOnscreen CoglOnscreen;</pre>
</div>
<hr>
<div class="refsect2">
<a name="cogl-is-onscreen"></a><h3>cogl_is_onscreen ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="returnvalue">CoglBool</span></a>            cogl_is_onscreen                    (<em class="parameter"><code><span class="type">void</span> *object</code></em>);</pre>
<p>
Gets whether the given object references a <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#CoglObject" title="CoglObject"><span class="type">CoglObject</span></a> pointer</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if the object references a <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a>
and <code class="literal">FALSE</code> otherwise.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.10</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-ONSCREEN:CAPS"></a><h3>COGL_ONSCREEN()</h3>
<pre class="programlisting">#define COGL_ONSCREEN(X) ((CoglOnscreen *)(X))
</pre>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-new"></a><h3>cogl_onscreen_new ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="returnvalue">CoglOnscreen</span></a> *      cogl_onscreen_new                   (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Top-Level-Context.html#CoglContext" title="CoglContext"><span class="type">CoglContext</span></a> *context</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>);</pre>
<p>
Instantiates an "unallocated" <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer that may be
configured before later being allocated, either implicitly when
it is first used or explicitly via <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-allocate" title="cogl_framebuffer_allocate ()"><code class="function">cogl_framebuffer_allocate()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-The-Top-Level-Context.html#CoglContext" title="CoglContext"><span class="type">CoglContext</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>The desired framebuffer width</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td>The desired framebuffer height</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly instantiated <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.8</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglOnscreenX11MaskCallback"></a><h3>CoglOnscreenX11MaskCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*CoglOnscreenX11MaskCallback)      (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><span class="type">uint32_t</span> event_mask</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cogl-x11-onscreen-set-foreign-window-xid"></a><h3>cogl_x11_onscreen_set_foreign_window_xid ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_x11_onscreen_set_foreign_window_xid
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><span class="type">uint32_t</span> xid</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenX11MaskCallback" title="CoglOnscreenX11MaskCallback ()"><span class="type">CoglOnscreenX11MaskCallback</span></a> update</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
<p>
Ideally we would recommend that you let Cogl be responsible for
creating any X window required to back an onscreen framebuffer but
if you really need to target a window created manually this
function can be called before <em class="parameter"><code>onscreen</code></em> has been allocated to set a
foreign XID for your existing X window.
</p>
<p>
Since Cogl needs, for example, to track changes to the size of an X
window it requires that certain events be selected for via the core
X protocol. This requirement may also be changed asynchronously so
you must pass in an <em class="parameter"><code>update</code></em> callback to inform you of Cogl's
required event mask.
</p>
<p>
For example if you are using Xlib you could use this API roughly
as follows:
[{
static void
my_update_cogl_x11_event_mask (CoglOnscreen *onscreen,
                               uint32_t event_mask,
                               void *user_data)
{
  XSetWindowAttributes attrs;
  MyData *data = user_data;
  attrs.event_mask = event_mask | data-&gt;my_event_mask;
  XChangeWindowAttributes (data-&gt;xdpy,
                           data-&gt;xwin,
                           CWEventMask,
                           &amp;attrs);
}
</p>
<p>
{
  *snip*
  cogl_x11_onscreen_set_foreign_window_xid (onscreen,
                                            data-&gt;xwin,
                                            my_update_cogl_x11_event_mask,
                                            data);
  *snip*
}
}]
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>The unallocated framebuffer to associated with an X
window.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xid</code></em> :</span></p></td>
<td>The XID of an existing X window</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>update</code></em> :</span></p></td>
<td>A callback that notifies of updates to what Cogl requires
to be in the core X protocol event mask.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data passed to <em class="parameter"><code>update</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.0</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-x11-onscreen-get-window-xid"></a><h3>cogl_x11_onscreen_get_window_xid ()</h3>
<pre class="programlisting"><span class="returnvalue">uint32_t</span>            cogl_x11_onscreen_get_window_xid    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>);</pre>
<p>
Assuming you know the given <em class="parameter"><code>onscreen</code></em> framebuffer is based on an x11 window
this queries the XID of that window. If
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-x11-onscreen-set-foreign-window-xid" title="cogl_x11_onscreen_set_foreign_window_xid ()"><code class="function">cogl_x11_onscreen_set_foreign_window_xid()</code></a> was previously called then it
will return that same XID otherwise it will be the XID of a window Cogl
created internally. If the window has not been allocated yet and a foreign
xid has not been set then it's undefined what value will be returned.
</p>
<p>
It's undefined what this function does if called when not using an x11 based
renderer.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.10</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-x11-onscreen-get-visual-xid"></a><h3>cogl_x11_onscreen_get_visual_xid ()</h3>
<pre class="programlisting"><span class="returnvalue">uint32_t</span>            cogl_x11_onscreen_get_visual_xid    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cogl-win32-onscreen-set-foreign-window"></a><h3>cogl_win32_onscreen_set_foreign_window ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_win32_onscreen_set_foreign_window
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><span class="type">HWND</span> hwnd</code></em>);</pre>
<p>
Ideally we would recommend that you let Cogl be responsible for
creating any window required to back an onscreen framebuffer but
if you really need to target a window created manually this
function can be called before <em class="parameter"><code>onscreen</code></em> has been allocated to set a
foreign XID for your existing X window.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hwnd</code></em> :</span></p></td>
<td>A win32 window handle</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.10</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-win32-onscreen-get-window"></a><h3>cogl_win32_onscreen_get_window ()</h3>
<pre class="programlisting"><span class="returnvalue">HWND</span>                cogl_win32_onscreen_get_window      (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>);</pre>
<p>
Queries the internally created window HWND backing the given <em class="parameter"><code>onscreen</code></em>
framebuffer.  If <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-win32-onscreen-set-foreign-window" title="cogl_win32_onscreen_set_foreign_window ()"><code class="function">cogl_win32_onscreen_set_foreign_window()</code></a> has been used then
it will return the same handle set with that API.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.10</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-show"></a><h3>cogl_onscreen_show ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_onscreen_show                  (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>);</pre>
<p>
This requests to make <em class="parameter"><code>onscreen</code></em> visible to the user.
</p>
<p>
Actually the precise semantics of this function depend on the
window system currently in use, and if you don't have a
multi-windowining system this function may in-fact do nothing.
</p>
<p>
This function will implicitly allocate the given <em class="parameter"><code>onscreen</code></em>
framebuffer before showing it if it hasn't already been allocated.
</p>
<p>
When using the Wayland winsys calling this will set the surface to
a toplevel type which will make it appear. If the application wants
to set a different type for the surface, it can avoid calling
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-show" title="cogl_onscreen_show ()"><code class="function">cogl_onscreen_show()</code></a> and set its own type directly with the Wayland
client API via <code class="function">cogl_wayland_onscreen_get_surface()</code>.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>Since Cogl doesn't explicitly track the visibility status of
onscreen framebuffers it wont try to avoid redundant window system
requests e.g. to show an already visible window. This also means
that it's acceptable to alternatively use native APIs to show and
hide windows without confusing Cogl.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>The onscreen framebuffer to make visible</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.0</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-hide"></a><h3>cogl_onscreen_hide ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_onscreen_hide                  (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>);</pre>
<p>
This requests to make <em class="parameter"><code>onscreen</code></em> invisible to the user.
</p>
<p>
Actually the precise semantics of this function depend on the
window system currently in use, and if you don't have a
multi-windowining system this function may in-fact do nothing.
</p>
<p>
This function does not implicitly allocate the given <em class="parameter"><code>onscreen</code></em>
framebuffer before hiding it.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>Since Cogl doesn't explicitly track the visibility status of
onscreen framebuffers it wont try to avoid redundant window system
requests e.g. to show an already visible window. This also means
that it's acceptable to alternatively use native APIs to show and
hide windows without confusing Cogl.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>The onscreen framebuffer to make invisible</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.0</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglFrameCallback"></a><h3>CoglFrameCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*CoglFrameCallback)                (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><span class="type">CoglFrameEvent</span> event</code></em>,
                                                         <em class="parameter"><code><span class="type">CoglFrameInfo</span> *info</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
<p>
Is a callback that can be registered via
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-frame-callback" title="cogl_onscreen_add_frame_callback ()"><code class="function">cogl_onscreen_add_frame_callback()</code></a> to be called when a frame
progresses in some notable way.
</p>
<p>
Please see the documentation for <span class="type">CoglFrameEvent</span> and
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-frame-callback" title="cogl_onscreen_add_frame_callback ()"><code class="function">cogl_onscreen_add_frame_callback()</code></a> for more details about what
events can be notified.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>The onscreen that the frame is associated with</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>A <span class="type">CoglFrameEvent</span> notifying how the frame has progressed</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
<td>The meta information, such as timing information, about
the frame that has progressed.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The user pointer passed to
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-frame-callback" title="cogl_onscreen_add_frame_callback ()"><code class="function">cogl_onscreen_add_frame_callback()</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.14</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglFrameClosure"></a><h3>CoglFrameClosure</h3>
<pre class="programlisting">typedef struct _CoglClosure CoglFrameClosure;
</pre>
<p>
An opaque type that tracks a <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglFrameCallback" title="CoglFrameCallback ()"><span class="type">CoglFrameCallback</span></a> and associated user
data. A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglFrameClosure" title="CoglFrameClosure"><span class="type">CoglFrameClosure</span></a> pointer will be returned from
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-frame-callback" title="cogl_onscreen_add_frame_callback ()"><code class="function">cogl_onscreen_add_frame_callback()</code></a> and it allows you to remove a
callback later using <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-remove-frame-callback" title="cogl_onscreen_remove_frame_callback ()"><code class="function">cogl_onscreen_remove_frame_callback()</code></a>.
</p>
<p class="since">Since 1.14</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-add-frame-callback"></a><h3>cogl_onscreen_add_frame_callback ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglFrameClosure" title="CoglFrameClosure"><span class="returnvalue">CoglFrameClosure</span></a> *  cogl_onscreen_add_frame_callback    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglFrameCallback" title="CoglFrameCallback ()"><span class="type">CoglFrameCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#CoglUserDataDestroyCallback" title="CoglUserDataDestroyCallback"><span class="type">CoglUserDataDestroyCallback</span></a> destroy</code></em>);</pre>
<p>
Installs a <em class="parameter"><code>callback</code></em> function that will be called for significant
events relating to the given <em class="parameter"><code>onscreen</code></em> framebuffer.
</p>
<p>
The <em class="parameter"><code>callback</code></em> will be used to notify when the system compositor is
ready for this application to render a new frame. In this case
<code class="literal">COGL_FRAME_EVENT_SYNC</code> will be passed as the event argument to the
given <em class="parameter"><code>callback</code></em> in addition to the <span class="type">CoglFrameInfo</span> corresponding to
the frame beeing acknowledged by the compositor.
</p>
<p>
The <em class="parameter"><code>callback</code></em> will also be called to notify when the frame has
ended. In this case <code class="literal">COGL_FRAME_EVENT_COMPLETE</code> will be passed as
the event argument to the given <em class="parameter"><code>callback</code></em> in addition to the
<span class="type">CoglFrameInfo</span> corresponding to the newly presented frame.  The
meaning of "ended" here simply means that no more timing
information will be collected within the corresponding
<span class="type">CoglFrameInfo</span> and so this is a good opportunity to analyse the
given info. It does not necessarily mean that the GPU has finished
rendering the corresponding frame.
</p>
<p>
We highly recommend throttling your application according to
<code class="literal">COGL_FRAME_EVENT_SYNC</code> events so that your application can avoid
wasting resources, drawing more frames than your system compositor
can display.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>A callback function to call for frame events. <span class="annotation">[<acronym title="The callback is valid until the GDestroyNotify argument is called."><span class="acronym">scope notified</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>A private pointer to be passed to <em class="parameter"><code>callback</code></em>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td>An optional callback to destroy <em class="parameter"><code>user_data</code></em>
when the <em class="parameter"><code>callback</code></em> is removed or <em class="parameter"><code>onscreen</code></em> is freed. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglFrameClosure" title="CoglFrameClosure"><span class="type">CoglFrameClosure</span></a> pointer that can be used to
remove the callback and associated <em class="parameter"><code>user_data</code></em> later.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.14</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-remove-frame-callback"></a><h3>cogl_onscreen_remove_frame_callback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_onscreen_remove_frame_callback (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglFrameClosure" title="CoglFrameClosure"><span class="type">CoglFrameClosure</span></a> *closure</code></em>);</pre>
<p>
Removes a callback and associated user data that were previously
registered using <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-frame-callback" title="cogl_onscreen_add_frame_callback ()"><code class="function">cogl_onscreen_add_frame_callback()</code></a>.
</p>
<p>
If a destroy callback was passed to
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-frame-callback" title="cogl_onscreen_add_frame_callback ()"><code class="function">cogl_onscreen_add_frame_callback()</code></a> to destroy the user data then
this will get called.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>closure</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglFrameClosure" title="CoglFrameClosure"><span class="type">CoglFrameClosure</span></a> returned from
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-frame-callback" title="cogl_onscreen_add_frame_callback ()"><code class="function">cogl_onscreen_add_frame_callback()</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.14</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglOnscreenDirtyInfo"></a><h3>struct CoglOnscreenDirtyInfo</h3>
<pre class="programlisting">struct CoglOnscreenDirtyInfo {
  int x, y;
  int width, height;
};
</pre>
<p>
A structure passed to callbacks registered using
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-dirty-callback" title="cogl_onscreen_add_dirty_callback ()"><code class="function">cogl_onscreen_add_dirty_callback()</code></a>. The members describe a
rectangle within the onscreen buffer that should be redrawn.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><span class="type">int</span> <em class="structfield"><code><a name="CoglOnscreenDirtyInfo.x"></a>x</code></em>;</span></p></td>
<td>Left edge of the dirty rectangle</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">int</span> <em class="structfield"><code><a name="CoglOnscreenDirtyInfo.y"></a>y</code></em>;</span></p></td>
<td>Top edge of the dirty rectangle, measured from the top of the window</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">int</span> <em class="structfield"><code><a name="CoglOnscreenDirtyInfo.width"></a>width</code></em>;</span></p></td>
<td>Width of the dirty rectangle</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">int</span> <em class="structfield"><code><a name="CoglOnscreenDirtyInfo.height"></a>height</code></em>;</span></p></td>
<td>Height of the dirty rectangle</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.16</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglOnscreenDirtyCallback"></a><h3>CoglOnscreenDirtyCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*CoglOnscreenDirtyCallback)        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyInfo" title="struct CoglOnscreenDirtyInfo"><span class="type">CoglOnscreenDirtyInfo</span></a> *info</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
<p>
Is a callback that can be registered via
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-dirty-callback" title="cogl_onscreen_add_dirty_callback ()"><code class="function">cogl_onscreen_add_dirty_callback()</code></a> to be called when the windowing
system determines that a region of the onscreen window has been
lost and the application should redraw it.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>The onscreen that the frame is associated with</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyInfo" title="struct CoglOnscreenDirtyInfo"><span class="type">CoglOnscreenDirtyInfo</span></a> struct containing the details of the
dirty area</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The user pointer passed to
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-frame-callback" title="cogl_onscreen_add_frame_callback ()"><code class="function">cogl_onscreen_add_frame_callback()</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.16</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglOnscreenDirtyClosure"></a><h3>CoglOnscreenDirtyClosure</h3>
<pre class="programlisting">typedef struct _CoglClosure CoglOnscreenDirtyClosure;
</pre>
<p>
An opaque type that tracks a <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyCallback" title="CoglOnscreenDirtyCallback ()"><span class="type">CoglOnscreenDirtyCallback</span></a> and associated
user data. A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyClosure" title="CoglOnscreenDirtyClosure"><span class="type">CoglOnscreenDirtyClosure</span></a> pointer will be returned from
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-dirty-callback" title="cogl_onscreen_add_dirty_callback ()"><code class="function">cogl_onscreen_add_dirty_callback()</code></a> and it allows you to remove a
callback later using <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-remove-dirty-callback" title="cogl_onscreen_remove_dirty_callback ()"><code class="function">cogl_onscreen_remove_dirty_callback()</code></a>.
</p>
<p class="since">Since 1.16</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-add-dirty-callback"></a><h3>cogl_onscreen_add_dirty_callback ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyClosure" title="CoglOnscreenDirtyClosure"><span class="returnvalue">CoglOnscreenDirtyClosure</span></a> * cogl_onscreen_add_dirty_callback
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyCallback" title="CoglOnscreenDirtyCallback ()"><span class="type">CoglOnscreenDirtyCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#CoglUserDataDestroyCallback" title="CoglUserDataDestroyCallback"><span class="type">CoglUserDataDestroyCallback</span></a> destroy</code></em>);</pre>
<p>
Installs a <em class="parameter"><code>callback</code></em> function that will be called whenever the
window system has lost the contents of a region of the onscreen
buffer and the application should redraw it to repair the buffer.
For example this may happen in a window system without a compositor
if a window that was previously covering up the onscreen window has
been moved causing a region of the onscreen to be exposed.
</p>
<p>
The <em class="parameter"><code>callback</code></em> will be passed a <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyInfo" title="struct CoglOnscreenDirtyInfo"><span class="type">CoglOnscreenDirtyInfo</span></a> struct which
decribes a rectangle containing the newly dirtied region. Note that
this may be called multiple times to describe a non-rectangular
region composed of multiple smaller rectangles.
</p>
<p>
The dirty events are separate from <code class="literal">COGL_FRAME_EVENT_SYNC</code> events so
the application should also listen for this event before rendering
the dirty region to ensure that the framebuffer is actually ready
for rendering.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>A callback function to call for dirty events. <span class="annotation">[<acronym title="The callback is valid until the GDestroyNotify argument is called."><span class="acronym">scope notified</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>A private pointer to be passed to <em class="parameter"><code>callback</code></em>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td>An optional callback to destroy <em class="parameter"><code>user_data</code></em> when the
<em class="parameter"><code>callback</code></em> is removed or <em class="parameter"><code>onscreen</code></em> is freed. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyClosure" title="CoglOnscreenDirtyClosure"><span class="type">CoglOnscreenDirtyClosure</span></a> pointer that can be used to
remove the callback and associated <em class="parameter"><code>user_data</code></em> later.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.16</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-remove-dirty-callback"></a><h3>cogl_onscreen_remove_dirty_callback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_onscreen_remove_dirty_callback (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyClosure" title="CoglOnscreenDirtyClosure"><span class="type">CoglOnscreenDirtyClosure</span></a> *closure</code></em>);</pre>
<p>
Removes a callback and associated user data that were previously
registered using <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-dirty-callback" title="cogl_onscreen_add_dirty_callback ()"><code class="function">cogl_onscreen_add_dirty_callback()</code></a>.
</p>
<p>
If a destroy callback was passed to
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-dirty-callback" title="cogl_onscreen_add_dirty_callback ()"><code class="function">cogl_onscreen_add_dirty_callback()</code></a> to destroy the user data then
this will also get called.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>closure</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenDirtyClosure" title="CoglOnscreenDirtyClosure"><span class="type">CoglOnscreenDirtyClosure</span></a> returned from
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-dirty-callback" title="cogl_onscreen_add_dirty_callback ()"><code class="function">cogl_onscreen_add_dirty_callback()</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.16</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglOnscreenResizeCallback"></a><h3>CoglOnscreenResizeCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*CoglOnscreenResizeCallback)       (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> width</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> height</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
<p>
Is a callback type used with the
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-resize-callback" title="cogl_onscreen_add_resize_callback ()"><code class="function">cogl_onscreen_add_resize_callback()</code></a> allowing applications to be
notified whenever an <em class="parameter"><code>onscreen</code></em> framebuffer is resized.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>Cogl automatically updates the viewport of an <em class="parameter"><code>onscreen</code></em>
framebuffer that is resized so this callback is also an indication
that the viewport has been modified too</div>
<p>
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>A resize callback will only ever be called while dispatching
Cogl events from the system mainloop; so for example during
<a class="link" href="cogl-2.0-experimental-Main-loop-integration.html#cogl-poll-renderer-dispatch" title="cogl_poll_renderer_dispatch ()"><code class="function">cogl_poll_renderer_dispatch()</code></a>. This is so that callbacks shouldn't
occur while an application might have arbitrary locks held for
example.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer that was resized</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>width</code></em> :</span></p></td>
<td>The new width of <em class="parameter"><code>onscreen</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>height</code></em> :</span></p></td>
<td>The new height of <em class="parameter"><code>onscreen</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The private passed to
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-resize-callback" title="cogl_onscreen_add_resize_callback ()"><code class="function">cogl_onscreen_add_resize_callback()</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglOnscreenResizeClosure"></a><h3>CoglOnscreenResizeClosure</h3>
<pre class="programlisting">typedef struct _CoglClosure CoglOnscreenResizeClosure;
</pre>
<p>
An opaque type that tracks a <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenResizeCallback" title="CoglOnscreenResizeCallback ()"><span class="type">CoglOnscreenResizeCallback</span></a> and
associated user data. A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenResizeClosure" title="CoglOnscreenResizeClosure"><span class="type">CoglOnscreenResizeClosure</span></a> pointer will be
returned from <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-resize-callback" title="cogl_onscreen_add_resize_callback ()"><code class="function">cogl_onscreen_add_resize_callback()</code></a> and it allows you
to remove a callback later using
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-remove-resize-callback" title="cogl_onscreen_remove_resize_callback ()"><code class="function">cogl_onscreen_remove_resize_callback()</code></a>.
</p>
<p class="since">Since 2.0</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-add-resize-callback"></a><h3>cogl_onscreen_add_resize_callback ()</h3>
<pre class="programlisting"><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenResizeClosure" title="CoglOnscreenResizeClosure"><span class="returnvalue">CoglOnscreenResizeClosure</span></a> * cogl_onscreen_add_resize_callback
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenResizeCallback" title="CoglOnscreenResizeCallback ()"><span class="type">CoglOnscreenResizeCallback</span></a> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-The-Object-Interface.html#CoglUserDataDestroyCallback" title="CoglUserDataDestroyCallback"><span class="type">CoglUserDataDestroyCallback</span></a> destroy</code></em>);</pre>
<p>
Registers a <em class="parameter"><code>callback</code></em> with <em class="parameter"><code>onscreen</code></em> that will be called whenever
the <em class="parameter"><code>onscreen</code></em> framebuffer changes size.
</p>
<p>
The <em class="parameter"><code>callback</code></em> can be removed using
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-remove-resize-callback" title="cogl_onscreen_remove_resize_callback ()"><code class="function">cogl_onscreen_remove_resize_callback()</code></a> passing the returned closure
pointer.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>Since Cogl automatically updates the viewport of an <em class="parameter"><code>onscreen</code></em>
framebuffer that is resized, a resize callback can also be used to
track when the viewport has been changed automatically by Cogl in
case your application needs more specialized control over the
viewport.</div>
<p>
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>A resize callback will only ever be called while dispatching
Cogl events from the system mainloop; so for example during
<a class="link" href="cogl-2.0-experimental-Main-loop-integration.html#cogl-poll-renderer-dispatch" title="cogl_poll_renderer_dispatch ()"><code class="function">cogl_poll_renderer_dispatch()</code></a>. This is so that callbacks shouldn't
occur while an application might have arbitrary locks held for
example.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenResizeCallback" title="CoglOnscreenResizeCallback ()"><span class="type">CoglOnscreenResizeCallback</span></a> to call when
the <em class="parameter"><code>onscreen</code></em> changes size. <span class="annotation">[<acronym title="The callback is valid until the GDestroyNotify argument is called."><span class="acronym">scope notified</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>Private data to be passed to <em class="parameter"><code>callback</code></em>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td>An optional callback to destroy <em class="parameter"><code>user_data</code></em>
when the <em class="parameter"><code>callback</code></em> is removed or <em class="parameter"><code>onscreen</code></em> is freed. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenResizeClosure" title="CoglOnscreenResizeClosure"><span class="type">CoglOnscreenResizeClosure</span></a> pointer that can be used to
remove the callback and associated <em class="parameter"><code>user_data</code></em> later.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-remove-resize-callback"></a><h3>cogl_onscreen_remove_resize_callback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_onscreen_remove_resize_callback
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreenResizeClosure" title="CoglOnscreenResizeClosure"><span class="type">CoglOnscreenResizeClosure</span></a> *closure</code></em>);</pre>
<p>
Removes a resize <em class="parameter"><code>callback</code></em> and <em class="parameter"><code>user_data</code></em> pair that were previously
associated with <em class="parameter"><code>onscreen</code></em> via <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-resize-callback" title="cogl_onscreen_add_resize_callback ()"><code class="function">cogl_onscreen_add_resize_callback()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>closure</code></em> :</span></p></td>
<td>An identifier returned from <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-resize-callback" title="cogl_onscreen_add_resize_callback ()"><code class="function">cogl_onscreen_add_resize_callback()</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-swap-buffers"></a><h3>cogl_onscreen_swap_buffers ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_onscreen_swap_buffers          (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>);</pre>
<p>
Swaps the current back buffer being rendered too, to the front for display.
</p>
<p>
This function also implicitly discards the contents of the color, depth and
stencil buffers as if <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-discard-buffers" title="cogl_framebuffer_discard_buffers ()"><code class="function">cogl_framebuffer_discard_buffers()</code></a> were used. The
significance of the discard is that you should not expect to be able to
start a new frame that incrementally builds on the contents of the previous
frame.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>It is highly recommended that applications use
<a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-swap-buffers-with-damage" title="cogl_onscreen_swap_buffers_with_damage ()"><code class="function">cogl_onscreen_swap_buffers_with_damage()</code></a> instead whenever possible
and also use the <code class="function">cogl_onscreen_get_buffer_age()</code> api so they can
perform incremental updates to older buffers instead of having to
render a full buffer for every frame.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.10</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-swap-buffers-with-damage"></a><h3>cogl_onscreen_swap_buffers_with_damage ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_onscreen_swap_buffers_with_damage
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code>const <span class="type">int</span> *rectangles</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> n_rectangles</code></em>);</pre>
<p>
Swaps the current back buffer being rendered too, to the front for
display and provides information to any system compositor about
what regions of the buffer have changed (damage) with respect to
the last swapped buffer.
</p>
<p>
This function has the same semantics as
<code class="function">cogl_framebuffer_swap_buffers()</code> except that it additionally allows
applications to pass a list of damaged rectangles which may be
passed on to a compositor so that it can minimize how much of the
screen is redrawn in response to this applications newly swapped
front buffer.
</p>
<p>
For example if your application is only animating a small object in
the corner of the screen and everything else is remaining static
then it can help the compositor to know that only the bottom right
corner of your newly swapped buffer has really changed with respect
to your previously swapped front buffer.
</p>
<p>
If <em class="parameter"><code>n_rectangles</code></em> is 0 then the whole buffer will implicitly be
reported as damaged as if <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-swap-buffers" title="cogl_onscreen_swap_buffers ()"><code class="function">cogl_onscreen_swap_buffers()</code></a> had been
called.
</p>
<p>
This function also implicitly discards the contents of the color,
depth and stencil buffers as if <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-discard-buffers" title="cogl_framebuffer_discard_buffers ()"><code class="function">cogl_framebuffer_discard_buffers()</code></a>
were used. The significance of the discard is that you should not
expect to be able to start a new frame that incrementally builds on
the contents of the previous frame. If you want to perform
incremental updates to older back buffers then please refer to the
<code class="function">cogl_onscreen_get_buffer_age()</code> api.
</p>
<p>
Whenever possible it is recommended that applications use this
function instead of <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-swap-buffers" title="cogl_onscreen_swap_buffers ()"><code class="function">cogl_onscreen_swap_buffers()</code></a> to improve
performance when running under a compositor.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>It is highly recommended to use this API in conjunction with
the <code class="function">cogl_onscreen_get_buffer_age()</code> api so that your application can
perform incremental rendering based on old back buffers.</div>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rectangles</code></em> :</span></p></td>
<td>An array of integer 4-tuples representing damaged
rectangles as (x, y, width, height) tuples.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_rectangles</code></em> :</span></p></td>
<td>The number of 4-tuples to be read from <em class="parameter"><code>rectangles</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.16</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-swap-region"></a><h3>cogl_onscreen_swap_region ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_onscreen_swap_region           (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code>const <span class="type">int</span> *rectangles</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> n_rectangles</code></em>);</pre>
<p>
Swaps a region of the back buffer being rendered too, to the front for
display.  <em class="parameter"><code>rectangles</code></em> represents the region as array of <em class="parameter"><code>n_rectangles</code></em> each
defined by 4 sequential (x, y, width, height) integers.
</p>
<p>
This function also implicitly discards the contents of the color, depth and
stencil buffers as if <a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#cogl-framebuffer-discard-buffers" title="cogl_framebuffer_discard_buffers ()"><code class="function">cogl_framebuffer_discard_buffers()</code></a> were used. The
significance of the discard is that you should not expect to be able to
start a new frame that incrementally builds on the contents of the previous
frame.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>rectangles</code></em> :</span></p></td>
<td>An array of integer 4-tuples representing rectangles as
(x, y, width, height) tuples.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_rectangles</code></em> :</span></p></td>
<td>The number of 4-tuples to be read from <em class="parameter"><code>rectangles</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.10</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-set-swap-throttled"></a><h3>cogl_onscreen_set_swap_throttled ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_onscreen_set_swap_throttled    (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-Common-Types.html#CoglBool" title="CoglBool"><span class="type">CoglBool</span></a> throttled</code></em>);</pre>
<p>
Requests that the given <em class="parameter"><code>onscreen</code></em> framebuffer should have swap buffer
requests (made using <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-swap-buffers" title="cogl_onscreen_swap_buffers ()"><code class="function">cogl_onscreen_swap_buffers()</code></a>) throttled either by a
displays vblank period or perhaps some other mechanism in a composited
environment.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>throttled</code></em> :</span></p></td>
<td>Whether swap throttling is wanted or not.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.8</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="CoglSwapBuffersNotify"></a><h3>CoglSwapBuffersNotify ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*CoglSwapBuffersNotify)            (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglFramebuffer---The-Framebuffer-Interface.html#CoglFramebuffer" title="CoglFramebuffer"><span class="type">CoglFramebuffer</span></a> *framebuffer</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-add-swap-buffers-callback"></a><h3>cogl_onscreen_add_swap_buffers_callback ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">int</span>        cogl_onscreen_add_swap_buffers_callback
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglSwapBuffersNotify" title="CoglSwapBuffersNotify ()"><span class="type">CoglSwapBuffersNotify</span></a> callback</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_onscreen_add_swap_buffers_callback</code> has been deprecated since version 1.14 and should not be used in newly-written code. Use <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-frame-callback" title="cogl_onscreen_add_frame_callback ()"><code class="function">cogl_onscreen_add_frame_callback()</code></a> instead</p>
</div>
<p>
Installs a <em class="parameter"><code>callback</code></em> function that should be called whenever a swap buffers
request (made using <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-swap-buffers" title="cogl_onscreen_swap_buffers ()"><code class="function">cogl_onscreen_swap_buffers()</code></a>) for the given
<em class="parameter"><code>onscreen</code></em> completes.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>Applications should check for the <a class="link" href="cogl-2.0-experimental-The-Top-Level-Context.html#COGL-FEATURE-ID-SWAP-BUFFERS-EVENT:CAPS"><code class="literal">COGL_FEATURE_ID_SWAP_BUFFERS_EVENT</code></a>
feature before using this API. It's currently undefined when and if
registered callbacks will be called if this feature is not supported.</div>
<p>
</p>
<p>
We recommend using this mechanism when available to manually throttle your
applications (in conjunction with  <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-set-swap-throttled" title="cogl_onscreen_set_swap_throttled ()"><code class="function">cogl_onscreen_set_swap_throttled()</code></a>) so
your application will be able to avoid long blocks in the driver caused by
throttling when you request to swap buffers too quickly.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>A callback function to call when a swap
has completed. <span class="annotation">[<acronym title="The callback is valid until the GDestroyNotify argument is called."><span class="acronym">scope notified</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>A private pointer to be passed to <em class="parameter"><code>callback</code></em>. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a unique identifier that can be used to remove to remove
the callback later.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.10</p>
<p class="stability">Stability Level: Unstable</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-onscreen-remove-swap-buffers-callback"></a><h3>cogl_onscreen_remove_swap_buffers_callback ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                cogl_onscreen_remove_swap_buffers_callback
                                                        (<em class="parameter"><code><a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> *onscreen</code></em>,
                                                         <em class="parameter"><code>unsigned <span class="type">int</span> id</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">cogl_onscreen_remove_swap_buffers_callback</code> has been deprecated since version 1.14 and should not be used in newly-written code. Use <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-remove-frame-callback" title="cogl_onscreen_remove_frame_callback ()"><code class="function">cogl_onscreen_remove_frame_callback()</code></a> instead</p>
</div>
<p>
Removes a callback that was previously registered
using <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-swap-buffers-callback" title="cogl_onscreen_add_swap_buffers_callback ()"><code class="function">cogl_onscreen_add_swap_buffers_callback()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>onscreen</code></em> :</span></p></td>
<td>A <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#CoglOnscreen" title="CoglOnscreen"><span class="type">CoglOnscreen</span></a> framebuffer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>An identifier returned from <a class="link" href="cogl-2.0-experimental-CoglOnscreen---The-Onscreen-Framebuffer-Interface.html#cogl-onscreen-add-swap-buffers-callback" title="cogl_onscreen_add_swap_buffers_callback ()"><code class="function">cogl_onscreen_add_swap_buffers_callback()</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.10</p>
<p class="stability">Stability Level: Unstable</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.19</div>
</body>
</html>