-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwinbinder.php
More file actions
1753 lines (1640 loc) · 50.9 KB
/
winbinder.php
File metadata and controls
1753 lines (1640 loc) · 50.9 KB
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
<?php
/**
* Stub file - DO NOT INCLUDE! = For PHPStorm to analyse.
*/
/**
* Begin constants.
*/
define('AppWindow', 1); // A fixed-size application window.
define('ModalDialog', 2); // A modal dialog box (requires to be closed before continuing to other tasks).
define('ModelessDialog', 3); // A modeless dialog box (other tasks can be performed while it is open).
define('NakedWindow', 4); // A fixed-size application window with no border and no title bar.
define('PopupWindow', 5); // A fixed-size application window that cannot be minimized.
define('ResizableWindow', 6); // A normal application window with a resizable border.
define('ToolDialog', 7); // A modeless dialog box with a small caption.
define('Accel', 8);
define('Calendar', 9);
define('CheckBox', 10);
define('ComboBox', 11);
define('EditBox', 12);
define('Frame', 13);
define('Gauge', 14);
define('HTMLControl', 15);
define('HyperLink', 16);
define('ImageButton', 17);
define('InvisibleArea', 18);
define('Label', 19);
define('ListBox', 20);
define('ListView', 21);
define('Menu', 22);
define('PushButton', 23);
define('RTFEditBox', 24);
define('RadioButton', 25);
define('ScrollBar', 26);
define('Slider', 27);
define('Spinner', 28);
define('StatusBar', 29);
define('TabControl', 30);
define('ToolBar', 31);
define('TreeView', 32);
define('Timer', Timer); // Doesnt really exist - Added for IDE help
//define('PopupMenu', PopupMenu); // Doesnt really exist - Added for IDE help
define('WBC_VERSION', '2010.10.14');
define('WBC_BORDER', 8);
define('WBC_BOTTOM', 8192);
define('WBC_CENTER', 2048);
define('WBC_CHECKBOXES', 65536);
define('WBC_CUSTOMDRAW', 268435456);
define('WBC_DEFAULTPOS', -2147483648);
define('WBC_DISABLED', 2);
define('WBC_ELLIPSIS', 131072);
define('WBC_ENABLED', 0);
define('WBC_GROUP', 524288);
define('WBC_IMAGE', 4);
define('WBC_INVISIBLE', 1);
define('WBC_LEFT', 0);
define('WBC_LINES', 128);
define('WBC_MASKED', 256);
define('WBC_MIDDLE', 0);
define('WBC_MULTILINE', 128);
define('WBC_NOTIFY', 16);
define('WBC_NUMBER', 1024);
define('WBC_READONLY', 64);
define('WBC_RIGHT', 32);
define('WBC_SINGLE', 1048576);
define('WBC_SORT', 262144);
define('WBC_TASKBAR', 512);
define('WBC_AUTOREPEAT', 512);
define('WBC_TOP', 4096);
define('WBC_VISIBLE', 0);
define('WBC_TRANSPARENT', 536870912);
define('WBC_DEFAULT', 8);
define('WBC_MULTISELECT', 1073741824);
define('WBC_NOHEADER', 268435456);
define('WBC_DBLCLICK', 64);
define('WBC_MOUSEMOVE', 128);
define('WBC_MOUSEDOWN', 256);
define('WBC_MOUSEUP', 512);
define('WBC_KEYDOWN', 1024);
define('WBC_KEYUP', 2048);
define('WBC_GETFOCUS', 4096);
define('WBC_RESIZE', 8192);
define('WBC_REDRAW', 16384);
define('WBC_HEADERSEL', 32768);
define('WBC_ALT', 32);
define('WBC_CONTROL', 8);
define('WBC_SHIFT', 4);
define('WBC_LBUTTON', 1);
define('WBC_MBUTTON', 16);
define('WBC_RBUTTON', 2);
define('WBC_BEEP', -1);
define('WBC_INFO', 64);
define('WBC_OK', 0);
define('WBC_OKCANCEL', 33);
define('WBC_QUESTION', 32);
define('WBC_STOP', 16);
define('WBC_WARNING', 48);
define('WBC_YESNO', 36);
define('WBC_YESNOCANCEL', 35);
define('WBC_MAXIMIZED', 2);
define('WBC_MINIMIZED', 1);
define('WBC_NORMAL', 0);
define('WBC_MINSIZE', 2);
define('WBC_MAXSIZE', 3);
define('WBC_TITLE', 1);
define('WBC_RTF_TEXT', 1);
define('IDABORT', 3);
define('IDCANCEL', 2);
define('IDCLOSE', 8);
define('IDDEFAULT', 0);
define('IDHELP', 9);
define('IDIGNORE', 5);
define('IDNO', 7);
define('IDOK', 1);
define('IDRETRY', 4);
define('IDYES', 6);
define('FTA_BOLD', 1);
define('FTA_ITALIC', 2);
define('FTA_NORMAL', 0);
define('FTA_REGULAR', 0);
define('FTA_STRIKEOUT', 8);
define('FTA_UNDERLINE', 4);
define('BLACK', 0);
define('BLUE', 16711680);
define('CYAN', 16776960);
define('DARKBLUE', 8388608);
define('DARKCYAN', 8421376);
define('DARKGRAY', 8421504);
define('DARKGREEN', 32768);
define('DARKMAGENTA', 8388736);
define('DARKRED', 128);
define('DARKYELLOW', 32896);
define('GREEN', 65280);
define('LIGHTGRAY', 12632256);
define('MAGENTA', 16711935);
define('RED', 255);
define('WHITE', 16777215);
define('YELLOW', 65535);
define('NOCOLOR', -1);
define('bgrBLACK', 0);
define('bgrBLUE', 255);
define('bgrCYAN', 65535);
define('bgrDARKBLUE', 128);
define('bgrDARKCYAN', 32896);
define('bgrDARKGRAY', 8421504);
define('bgrDARKGREEN', 32768);
define('bgrDARKMAGENTA', 8388736);
define('bgrDARKRED', 8388608);
define('bgrDARKYELLOW', 8421376);
define('bgrGREEN', 65280);
define('bgrLIGHTGRAY', 12632256);
define('bgrMAGENTA', 16711935);
define('bgrRED', 16711680);
define('bgrWHITE', 16777215);
define('bgrYELLOW', 16776960);
define('bgrNOCOLOR', -1);
// New @Wagy constants
define('WBC_LV_NONE', 0);
define('WBC_LV_FORE', 1);
define('WBC_LV_BACK', 2);
define('WBC_LV_DEFAULT', 0);
define('WBC_LV_DRAW', 1);
define('WBC_LV_COLUMNS', 2);
/**
* Begin functions.
*/
/**
* Enters the Windows main loop.
* This function must be called if the application has a window.
* The call to wb_main_loop() must be the last executable statement of the PHP script:
* All statements after it will be ignored.
* The return value is used for debugging purposes only and may be ignored.
* @return void - For debugging
*/
function wb_main_loop() {}
/**
* Looks for a file in the Windows and System directories, in this order.
* If the file exists, return the complete path to it.
* If not, return filename.
*
* @param $filename
*
* @return string
*/
function wb_find_file($filename) {}
/**
* Creates and displays a message box under the style supplied and returns a value according to the button pressed.
*
* Value for style & What is displayed
*
* WBC_OK (the default) - An OK button.
*
* WBC_INFO - An information icon and an OK button.
*
* WBC_WARNING - An exclamation point icon and an OK button.
*
* WBC_STOP - A stop icon and an OK button.
*
* WBC_QUESTION - A question mark icon and an OK button.
*
* WBC_OKCANCEL - A question mark icon, an OK button and a Cancel button.
*
* WBC_YESNO - A question mark icon, a Yes button and a No button.
*
* WBC_YESNOCANCEL - A question mark icon, a Yes button, a No button and a Cancel button.
*
* @param $parent
* @param $message
* @param null $title
* @param null $style
*
* @return int
*/
function wb_message_box($parent, $message, $title = null, $style = null) {}
/**
* Loads and plays a sound file or system sound.
* Parameter source may be a sound file name or a system sound constant.
* Parameter command may be used used to play a WAV sound synchronously or in a loop.
* A synchronous sound stops the currently playing sound and suspends the application control until it finishes.
* A MIDI soundtrack always stops any currently playing MIDI soundtrack.
* To stop one or more sounds, use function wb_stop_sound().
*
* Value of $source:
* MIDI file name - Load and play the specified MIDI file.
*
* WBC_OK - Default system sound
*
* WBC_INFO - System information sound
*
* WBC_WARNING - Warning sound
*
* WBC_STOP - Error sound
*
* WBC_QUESTION - Question sound
*
* WBC_BEEP - Default beep (via the computer speaker)
*
* Value of $command:
* null or empty - Load and play the specified WAV sound file.
*
* 'sync' - Load and play the specified WAV sound file synchronously.
*
* 'loop' - Load and loop the specified WAV sound file.
*
* Returns TRUE on success or FALSE otherwise.
*
* @param $source
* @param null $command
*
* @return bool
*/
function wb_play_sound($source, $command = null) {}
/**
* Stops one or more sounds that were started with wb_play_sound().
*
* null, empty or 'all' - Stop all sounds.
*
* 'wav' or 'wave' - Stop all WAV sounds.
*
* 'mid' or 'midi' - Stop all MIDI sounds.
*
* Returns TRUE on success or FALSE otherwise.
*
* @param null $command
*
* @return bool
*/
function wb_stop_sound($command = null) {}
/**
* Opens or executes a command. The string passed to this function can be one of the following:.
*
* A WinBinder script.
* An executable file.
* A non-executable file associated with an application.
* A folder name. Passing a null or empty string opens the current folder.
* A help file or help file topic.
* An URL, e-mail, newsgroup, or another Internet client application.
*
* Optional parameters can be passed to the command or application through the variable param.
*
* @param $command
* @param null $param
*
* @return bool
*/
function wb_exec($command, $param = null) {}
/**
* Returns information about the current system and application, according to the string info.
*
* The parameter info is not case-sensitive.
*
* "appmemory" The total memory used by the application¹
* "backgroundcolor" The main face color for Windows dialog boxes and controls
* "colordepth" The current color depth in bits per pixel
* "commandline" The original Windows command line including the executable file
* "computername" The name of the computer inside the network
* "consolemode" 1 indicates that console mode (DOS box) is active, 0 otherwise
* "diskdrives" The list of all available disk drives
* "exepath" The path to the main executable (PHP.EXE)
* "fontpath" The current font path
* "freememory" The available physical memory
* "gdiobjects" The number of currently allocated GDI handles
* "instance" The instance identifier of the current application
* "osnumber" The numeric OS version number
* "ospath" The current OS path
* "osversion" The complete OS version name
* "pgmpath" The default OS application path
* "screenarea" The total area (x, y, width, height) of the screen, in pixels
* "systemfont" The common (default) system font for dialog boxes
* "systempath" The OS system path
* "temppath" The path used by the OS to hold temporary files
* "totalmemory" The total physical memory installed
* "username" The name of the currently logged user
* "userobjects" The number of currently allocated USER handles
* "workarea" The valid area (x, y, width, height) of the screen, in pixels
*
* @param $info
*
* @return mixed
*/
function wb_get_system_info($info) {}
/**
* Reads a string or integer value from the Windows registry item referenced by key, subkey and entry.
* The subkey may contain forward or reverse slashes.
* If entry is an empty string, a NULL value or is not supplied, the function retrieves the default value for the subkey.
*
* Values are always returned as strings.
* If the requested entry is an empty string, an empty string is returned.
* If the key does not exist in the registry, the function returns NULL.
*
* @param $key
* @param $subkey
* @param null $entry
*
* @return string|null
*/
function wb_get_registry_key($key, $subkey, $entry = null) {}
/**
* Reads a string or integer value from the Windows registry item referenced by key, subkey and entry.
* The subkey may contain forward or reverse slashes.
* If entry is an empty string, a NULL value or is not supplied, the function retrieves the default value for the subkey.
*
* Values are always returned as strings.
* If the requested entry is an empty string, an empty string is returned.
* If the key does not exist in the registry, the function returns NULL.
*
* @param $key
* @param $subkey
* @param null $entry
* @param null $value
*
* @return bool
*/
function wb_set_registry_key($key, $subkey, $entry = null, $value = null) {}
/**
* Creates a timer in the specified window.
* The timer must be given an integer id that must be unique to all timers and controls.
* interval specifies the time-out value in milliseconds.
* Timer events are passed to and processed by the window callback function.
* A call to wb_destroy_timer() destroys the timer.
*
* Low resolution and high resolution timers
*
* This function supports both conventional (low-resolution) and multimedia (high-resolution) timers.
* Use a non-negative id to specify a low-resolution timer or a negative id to specify a high-resolution timer.
* Hi-res timers have a 10:1 increase in speed (resolution can go down to 1 ms opposed to 10 ms of a conventional timer) and much higher precision.
*
* NOTE: Only one high-resolution timer is allowed per application and it must be on the main window.
*
* @param $window
* @param $id
* @param $interval
*
* @return int
*/
function wb_create_timer($window, $id, $interval) {}
/**
* This function creates a delay and verifies if mouse buttons are pressed and/or the keyboard state.
* This function is useful for lengthy operations.
* In this case, wb_wait guarantees that the message control is sent back to the main loop, avoiding an unpleasant "freezing" effect.
* Using this function also provides an way to easily exit lengthy operations by constantly monitoring the keyboard and mouse.
*
* Parameters:
* WBC_MOUSEDOWN
* WBC_MOUSEUP
* WBC_KEYDOWN
* WBC_KEYUP
*
* @param null $window
* @param null $pause
* @param null $flags
*
* @return int
*/
function wb_wait($window = null, $pause = null, $flags = null) {}
/**
* Destroys a timer created with wb_create_timer().
* The window and the id parameters must be the same that were passed to wb_create_timer() when the timer was created.
*
* @param $window
* @param $id
*
* @return bool
*/
function wb_destroy_timer($window, $id) {}
/**
* Loads the image, icon or cursor file filename from disk and returns a handle to it.
* If filename is an icon library, index specifies the index of the image inside the file. Default index is 0.
*
* If source is an icon or a cursor, if param is 0 (the default), the function returns a large icon or cursor
* if param is 1, it returns a small icon or cursor; if param is -1, the function returns the default icon or cursor.
*
* NOTE: The resulting image must be destroyed by a call to wb_destroy_image().
*
* @param $filename
* @param null $index
* @param null $param
*
* @return int
*/
function wb_load_image($filename, $index = null, $param = null) {}
/**
* Saves the bitmap image to file filename.
* The image handle must have been obtained with wb_create_image(), wb_create_mask() or wb_load_image().
*
* Returns TRUE on success or FALSE if an error occurs.
*
* @param $image
* @param $filename
*
* @return bool
*/
function wb_save_image($image, $filename) {}
/**
* Creates a true-color image measuring width by height pixels.
*
* NOTE: The resulting image must be destroyed by a call to wb_destroy_image().
*
* @param int $width
* @param int $height
* @param null $dibbmi
* @param null $dibbits
*
* @return int
*/
function wb_create_image($width = 0, $height = 0, $dibbmi = null, $dibbits = null) {}
/**
* Creates a transparency mask of a true-color bitmap.
* The mask returned is also a bitmap. The transparent color is set by transparent_color.
*
* NOTE: The resulting image must be destroyed by a call to wb_destroy_image().
*
* @param $bitmap
* @param $transparent_color
*
* @return int
*/
function wb_create_mask($bitmap, $transparent_color) {}
/**
* Destroys an image created by wb_create_image(), wb_create_mask() or wb_load_image().
*
* @param $image
*
* @return bool
*/
function wb_destroy_image($image) {}
/**
* Returns a string of data containing a copy of the internal true-color representation of the given image.
* If compress4to3 is TRUE, every fourth byte of the original 32-bit data is skipped, yielding a RGB (24-bit) data string.
* This is required for image libraries such as FreeImage.
*
* @param $image
* @param $compress4to3
*
* @return int
*/
function wb_get_image_data($image, $compress4to3) {}
/**
* Returns the RGB color value of the pixel at the given coordinates. The first parameter, source, may be a WinBinder object, a window handle, a drawing surface or a bitmap.
*
* Returns NOCOLOR if an error occurs.
*
* @param $source
* @param $xpos
* @param $ypos
*
* @return int
*/
function wb_get_pixel($source, $xpos, $ypos) {}
/**
* Draws a point of color, setting the RGB color value of the pixel that exists at the given coordinates.
* The first parameter, source, may be a WinBinder object, a window handle, a drawing surface or a bitmap.
*
* Returns TRUE on success or FALSE if an error occurs.
*
* @param $source
* @param $xpos
* @param $ypos
* @param $color
*
* @return bool
*/
function wb_draw_point($source, $xpos, $ypos, $color) {}
/**
* Draws a straight line. The first parameter, target, may be a WinBinder object, a window handle, a drawing surface or a bitmap.
*
* The start and end points of the line are (x0, y0) and (x1, y1) respectively, in pixels.
* color is a RGB color value and linewidth is the width of the line, in pixels.
* A linewidth of zero sets the width to 1 pixel. Parameter linestyle accepts the values specified in the table below.
*
* 0 Solid line (the default style)
* 1 Dotted line
* 2-7 Dashed lines with increasing lengths
* 8 Line with alternating dashes and dots
* 9 Line with alternating dashes and double dots
*
* Returns TRUE on success or FALSE if an error occurs.
*
* @param $target
* @param $x0
* @param $y0
* @param $x1
* @param $y1
* @param $color
* @param null $linewidth
* @param null $linestyle
*
* @return bool
*/
function wb_draw_line($target, $x0, $y0, $x1, $y1, $color, $linewidth = null, $linestyle = null) {}
/**
* Draws a filled or hollow rectangle.
* The first parameter, target, may be a WinBinder object, a window handle, a drawing surface or a bitmap.
*
* xpos and ypos are the coordinates of the upper-left corner of the rectangle, in pixels.
* width and height are the dimensions of the rectangle. color is a RGB color value.
* Set filled to FALSE to draw a border.
* A linewidth of zero sets the width to 1 pixel.
*
* Returns TRUE on success or FALSE if an error occurs.
*
* @param $target
* @param $xpos
* @param $ypos
* @param $width
* @param $height
* @param $color
* @param null $filled
* @param null $linewidth
* @param null $linestyle
*
* @return bool
*/
function wb_draw_rect($target, $xpos, $ypos, $width, $height, $color, $filled = null, $linewidth = null, $linestyle = null) {}
/**
* Draws a filled or hollow rectangle.
* The first parameter, target, may be a WinBinder object, a window handle, a drawing surface or a bitmap.
*
* xpos and ypos are the coordinates of the upper-left corner of the rectangle, in pixels.
* width and height are the dimensions of the rectangle. color is a RGB color value.
* Set filled to FALSE to draw a border. In this case, linewidth sets the width of the border, in pixels.
* A linewidth of zero sets the width to 1 pixel.
*
* Returns TRUE on success or FALSE if an error occurs.
*
* @param $target
* @param $xpos
* @param $ypos
* @param $width
* @param $height
* @param $color
* @param null $filled
* @param null $linewidth
* @param null $linestyle
*
* @return bool
*/
function wb_draw_ellipse($target, $xpos, $ypos, $width, $height, $color, $filled = null, $linewidth = null, $linestyle = null) {}
/**
* Draws a string. The first parameter, target, may be a WinBinder object, a window handle, a drawing surface or a bitmap.
*
* The text parameter is the string to be drawn.
* xpos and ypos are the coordinates of the upper-left corner, in pixels.
* width and height optionally provide a limit to the drawing area.
* If they are not provided or zero, there is no limit to the drawing area.
* To use a specific font, an identifier created with wb_create_font() must be used as the font argument.
* If font is NULL, negative or not given, the most recently created font is used.
*
* NOTE: To use the simplified call syntax (no width, no height) you must supply 4 or 5 parameters.
*
* @param $target
* @param $text
* @param $xpos
* @param $ypos
* @param null $width
* @param null $height
* @param null $font
* @param null $flags
*
* @return int
*/
function wb_draw_text($target, $text, $xpos, $ypos, $width = null, $height = null, $font = null, $flags = null) {}
/**
* Draws a bitmap. The first parameter, target, may be a WinBinder object, a window handle, a drawing surface or another bitmap.
*
* xpos and ypos are the coordinates of the upper-left corner, in pixels.
* These parameters default to zero. width and height are the dimensions of the rectangle.
* These parameters also default to zero. In this case the bitmap is drawn with its original size.
* The parameter transparentcolor may be used to indicate which color is to be made transparent.
* If is set to NOCOLOR (the default), no transparency is used and the image is opaque.
* Parameters xoffset and yoffset are optionally used to specify where the image will be drawn.
*
* Returns TRUE on success or FALSE if an error occurs.
*
* @param $target
* @param $bitmap
* @param int $xpos
* @param int $ypos
* @param null $width
* @param null $height
* @param null $transparentcolor
* @param null $xoffset
* @param null $yoffset
*
* @return bool
*/
function wb_draw_image($target, $bitmap, $xpos = 0, $ypos = 0, $width = null, $height = null, $transparentcolor = null, $xoffset = null, $yoffset = null) {}
/**
* Destroys a control created by wb_create_control().
*
* Returns TRUE on success or FALSE if an error occurs.
*
* Tip
* It is often preferable to hide a control instead of destroying it. To hide a window, use wb_set_visible() with parameter visible set to FALSE.
*
* @param $control
*
* @return bool
*/
function wb_destroy_control($control) {}
/**
* Retrieves the value of a control or control item. The item and subitem parameters are set to -1 if absent.
*
* @param null $wbobject
* @param int $item
* @param int $subitem
*
* @return mixed
*/
function wb_get_value($wbobject, $item = -1, $subitem = -1) {}
/**
* Refreshes or redraws the WinBinder object wbobject, forcing an immediate redraw if the parameter now is TRUE (the default).
* If now is FALSE, the redraw command is posted to the Windows message queue.
*
* Optional parameters xpos, ypos, width and height will make the function invalidate and redraw only the specified part of the screen or control.
*
* Returns TRUE on success or FALSE if an error occurs.
*
* @param $wbobject
* @param null $now
* @param null $xpos
* @param null $ypos
* @param null $width
* @param null $height
*
* @return int
*/
function wb_refresh($wbobject, $now = null, $xpos = null, $ypos = null, $width = null, $height = null) {}
/**
* Enables or disables control according to the value of enabled.
*
* Returns TRUE on success or FALSE if an error occurs.
*
* @param $control
* @param $enabled
*
* @return bool
*/
function wb_set_enabled($control, $enabled) {}
/**
* Assigns the image source to the WinBinder object wbobject.
* Parameter source can be either an image, icon or cursor handle or a path to an image file name.
* If a handle, it must have been obtained with wb_create_image(), wb_create_mask() or wb_load_image().
* The optional parameter transparentcolor tells the function which color is to be considered transparent.
* The default is NOCOLOR (no transparency).
* index is used to select a specific image from a multi-image file (such as a DLL or executable).
*
* If source is an icon or a cursor, if param is 0 (the default), the function sets a large icon or cursor.
* if param is 1, it sets a small icon or cursor; if param is -1, the function sets the default icon or cursor.
* For minimized windows, this function will also change the icon that is displayed on the task bar.
*
* Returns TRUE on success or FALSE if an error occurs.
*
* @param $wbobject
* @param $source
* @param null $transparentcolor
* @param null $index
* @param null $param
*
* @return bool
*/
function wb_set_image($wbobject, $source, $transparentcolor = null, $index = null, $param = null) {}
/**
* Retrieves a portion of the image already assigned to a control and assigns it to a item (and optional subitem).
* The image must be previously assigned with wb_set_image(). The portion which is assigned is specified by index.
*
* Returns TRUE on success or FALSE if an error occurs.
*
* @param $wbobject
* @param $index
* @param null $item
* @param null $subitem
*
* @return bool
*/
function wb_set_item_image($wbobject, $index, $item = null, $subitem = null) {}
/**
* Deletes an item, a range of items, or all items from a control. Returns TRUE on success or FALSE if an error occurs.
* Control classes.
*
* This function applies to the following control classes: ListBox, ComboBox, ListView and TreeView.
*
* $items can be:
* integer Deletes the specified item.
* array of integers Deletes the specified items.
* zero Deletes item zero.
* null Deletes all items.
*
* @param $ctrl
* @param null $items
*
* @return bool
*/
function wb_delete_items($ctrl, $items = null) {}
/**
* Returns an integer that corresponds to the class of the object (control, window or menu) passed as the parameter.
* The class is passed as a parameter to functions wb_create_control() and wb_create_window().
*
* @param $wbobject
*
* @return int
*/
function wb_get_class($wbobject) {}
/**
* Returns an integer handle that corresponds to the WinBinder object (control, toolbar item or menu item) wbobject that has the supplied identifier id.
* This function is typically used to retrieve the handle of a child control in a dialog box or in a menu item.
*
* @param $wbobject
* @param $id
*
* @return int
*/
function wb_get_control($wbobject, $id) {}
/**
* Returns TRUE if wbobject is enabled or FALSE otherwise.
*
* @param $wbobject
*
* @return bool
*/
function wb_get_enabled($wbobject) {}
/**
* Returns a handle to the window or control that has the keyboard focus.
*
* @return int
*/
function wb_get_focus() {}
/**
* Returns the integer identifier of the wbobject control.
*
* @param $wbobject
*
* @return int
*/
function wb_get_id($wbobject) {}
/**
* Returns the number of items of wbobject.
*
* ComboBox The number of items
* ListBox The number of items
* ListView The number of rows
*
* @param $wbobject
*
* @return int
*/
function wb_get_item_count($wbobject) {}
/**
* Returns the handle of the control parent if item specifies a control, or the node parent if item specifies a treeview node.
*
* @param $wbobject
* @param null $item
*
* @return int
*/
function wb_get_parent($wbobject, $item = null) {}
/**
* Returns a value or array with the indices or identifiers of the selected elements or items in wbobject.
*
* Retrieves:
*
* ComboBox The index of the currently selected item.
* ListBox The index of the currently selected item. If multiselected only the last on will be returned (use getText for all items text)
* ListView An array with the indices of the selected items. ¹
* TabControl The index of the selected tab page.
* TreeView The handle of the currently selected node.
* Window 0 (zero).
* Other controls 0 (zero).
*
* @param $wbobject
*
* @return mixed
*/
function wb_get_selected($wbobject) {}
/**
* Retrieves an integer representing the current state of a control item.
* Retrieving states.
*
* This function currently returns the expanded or collapsed state of a treeview node indicated by item.
* It returns TRUE if the node is expanded and FALSE if it is collapsed.
*
* @param $wbobject
* @param null $item
*
* @return bool
*/
function wb_get_state($wbobject, $item = null) {}
/**
* Tells whether an object is visible. Returns TRUE if wbobject is visible and FALSE otherwise.
*
* @param $wbobject
*
* @return bool
*/
function wb_get_visible($wbobject) {}
/**
* Set or change the mouse cursor shape of a window, control, a whole class or application-wide. *
* The cursor can be set for any window class and for control classes ImageButton, InvisibleArea (deprecated), HyperLink and EditBox.
*
* The source parameter can be a cursor handle from function wb_load_image() or one of the preset system cursors:
* arrow, cross, finger, forbidden, help, ibeam, null (no cursor), sizeall, sizenesw, sizens, sizenwse, sizewe, uparrow, wait and waitarrow.
*
* @param $wbobject
* @param $source
*
* @return bool
*/
function wb_set_cursor($wbobject, $source) {}
/**
* Assigns the keyboard focus to wbobject. Returns TRUE on success or FALSE if an error occurs.
*
* @param $wbobject
*
* @return bool
*/
function wb_set_focus($wbobject) {}
/**
* Assigns the callback function fn_handler to window.
* The handler function may be a regular PHP function or class method that is used to process events for this particular window.
* wb_set_handler() must be called whenever the window needs to process messages and events from its controls.
*
* To specify a function as the handler, pass the function name in fn_handler.
* If the handler is a class method, fn_handler must be an array which first element is the name of the object and the second one is the method name.
*
* For additional information, see callback functions and window handlers.
*
* @param $window
* @param $fn_handler
*
* @return bool|null
*/
function wb_set_handler($window, $fn_handler) {}
/**
* Sets the location of an HTMLControl or sends a special command to it.
*
* Returns TRUE on success or FALSE if an error occurs (except when using "cmd:busy" as explained below).
*
* "cmd:back" Go to previously visited page.
* "cmd:forward" Go to a page previously viewed before issuing the back command.
* "cmd:refresh" Redraw the current page.
* "cmd:stop" Stop the current action, like loading a page.
* "cmd:busy" Return TRUE if the browser is busy or FALSE if idle.
* "cmd:blank" Clear the page.
*
* @param $wbobject
* @param $location
*
* @return bool
*/
function wb_set_location($wbobject, $location) {}
/**
* Sets the valid range of values (vmin and vmax) of a control. Valid classes are Gauge, ScrollBar, Slider and Spinner.
*
* Returns TRUE on success or FALSE if an error occurs.
*
* @param $control
* @param $vmin
* @param $vmax
*
* @return bool
*/
function wb_set_range($control, $vmin, $vmax) {}
/**
* Sets the state of a control item (a treeview node). Returns TRUE on success or FALSE if an error occurs.
*
* Setting states:
* This function can currently set the expanded or collapsed state of the treeview node indicated by item.
* Set state to TRUE to expand the node or FALSE to collapse it.
*
* @param $wbobject
* @param $item
* @param $state
*
* @return bool
*/
function wb_set_state($wbobject, $item, $state) {}
/**
* Sets or resets one or more styles of the WinBinder object wbobject.
* Only a limited set of styles is supported due to Windows limitations.
*
* AppWindow
* ResizableWindow
* PopupWindow
* NakedWindow WBC_TOP Make the window a topmost window.
*
* ListView WBC_LINES Display grid lines around items
* ListView WBC_CHECKBOXES Display check boxes in the first column of all items
* Slider WBC_LINES Show tick marks. The control must be created with the WBC_LINES style
* TreeView WBC_LINES Draw dotted lines linking children objects to their parents
*
* @param $wbobject
* @param $style
* @param $set
*
* @return bool
*/
function wb_set_style($wbobject, $style, $set) {}
/**
* Shows or hides the WinBinder object wbobject according to the value of visible.
*
* Returns TRUE on success or FALSE if an error occurs.
*
* @param $wbobject
* @param $visible
*
* @return bool