Skip to content

Commit b18f968

Browse files
committed
Merge branch 'graphics'
2 parents ead47c0 + 89bddda commit b18f968

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2380
-633
lines changed

make/make-settings.r

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Defines: [
3131
;FORCE_ANSI_ESC_EMULATION_ON_WINDOWS ;-- would not try to use MS' built-in VIRTUAL_TERMINAL_PROCESSING
3232
;EXCLUDE_VECTOR_MATH ;-- don't include vector math support (like: 3 * #[vector! integer! 8 3 [1 2 3]])
3333

34-
;DEBUG_MIDI ;-- prints some of internal traces from MIDI device handler
34+
;DEBUG_MIDI ;-- prints some of internal traces from MIDI device handler
35+
;DEBUG_DRAW_REGIONS ;-- draws clip region frame
3536

3637
]

make/msvc/Make-vs-project.r3

+33-12
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ VS: context [
2020

2121
SourcePath: ""
2222

23-
AdditionalDependencies: "wsock32.lib;comdlg32.lib;"
23+
AdditionalDependencies: rejoin [
24+
"wsock32.lib;comdlg32.lib;"
25+
"winmm.lib;" ;- for MIDI
26+
"Gdi32.lib;Comctl32.lib;UxTheme.lib;" ;- for View
27+
]
2428

2529
Sources: []
2630

@@ -348,6 +352,9 @@ EndGlobal
348352
<PreBuildEvent>
349353
<Command>prebuild64.bat</Command>
350354
</PreBuildEvent>
355+
<Manifest>
356+
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
357+
</Manifest>
351358
<PostBuildEvent>
352359
<Command>COPY /Y "$(TargetDir)$(ProjectName).exe" "$(ProjectDir)..\..\..\build\win-x64\$(ProjectName)_x64.exe"</Command>
353360
<Message>Copy resulted EXE</Message>
@@ -396,7 +403,7 @@ cd %~dp0
396403
pause}
397404

398405
rc-file: {
399-
IDI_APPICON ICON "../../r3.ico"
406+
101 ICON "../../r3.ico"
400407
401408
1 VERSIONINFO
402409
FILEVERSION 3,0,0,0
@@ -424,27 +431,41 @@ END
424431
STRINGTABLE
425432
BEGIN
426433
101 "Rebol 3 (Oldes branch)"
427-
END}
434+
END
435+
}
428436
]
429437

430438

439+
440+
431441
do %../../src/tools/file-base.r
432442

433-
forall core [change core join %../../../src/core/ core/1]
434-
forall os [change os join %../../../src/os/ os/1]
435-
forall os-win32 [change os-win32 join %../../../src/os/win32/ os-win32/1]
436-
core: head core
437-
os: head os
438-
os-win32: head os-win32
443+
forall core [change core join %../../../src/core/ core/1]
444+
forall os [change os join %../../../src/os/ os/1]
445+
forall os-win32 [change os-win32 join %../../../src/os/win32/ os-win32/1]
446+
forall os-win32g [change os-win32g join %../../../src/os/win32/ os-win32g/1]
439447

448+
probe core
440449
vs/Sources: compose/only [
441450
"Source Core Files" (core)
442-
"Source Host Files" (append os os-win32)
451+
"Source Host Files" (union union os os-win32 os-win32g)
443452
]
444453
vs/IncludePath-x86:
445454
vs/IncludePath-x64: "..\..\..\src\include;"
446-
vs/PreprocessorDefinitions-x86: {TO_WIN32;REB_CORE;REB_EXE;ENDIAN_LITTLE;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;USE_LZMA;}
447-
vs/PreprocessorDefinitions-x64: {TO_WIN32_X64;__LLP64__;REB_CORE;REB_EXE;ENDIAN_LITTLE;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;USE_LZMA;}
455+
456+
common-definitions: {REB_EXE;ENDIAN_LITTLE;_CRT_SECURE_NO_WARNINGS;_UNICODE;UNICODE;_FILE_OFFSET_BITS=64;}
457+
optional-components: {USE_MIDI_DEVICE;USE_PNG_CODEC;USE_JPG_CODEC;USE_LZMA;} ;TEST_EXTENSIONS;
458+
vs/PreprocessorDefinitions-x86: rejoin [
459+
common-definitions
460+
{TO_WIN32;}
461+
optional-components
462+
]
463+
vs/PreprocessorDefinitions-x64: rejoin [
464+
common-definitions
465+
{TO_WIN32_X64;__LLP64__;}
466+
optional-components
467+
]
468+
448469
vs/Prebuild-x86: {
449470
set REBOL=..\..\prebuild\r3-make-win.exe
450471
set T=../../../src/tools

make/r3.manifest

+12
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,16 @@
1212
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
1313
</windowsSettings>
1414
</application>
15+
<dependency>
16+
<dependentAssembly>
17+
<assemblyIdentity
18+
type="win32"
19+
name="Microsoft.Windows.Common-Controls"
20+
version="6.0.0.0"
21+
processorArchitecture="*"
22+
publicKeyToken="6595b64144ccf1df"
23+
language="*"
24+
/>
25+
</dependentAssembly>
26+
</dependency>
1527
</assembly>

make/r3.rc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
IDI_APPICON ICON "r3.ico"
1+
101 ICON "r3.ico"
22

33
1 VERSIONINFO
44
FILEVERSION 3,0,0,0
@@ -28,5 +28,5 @@ BEGIN
2828
101 "Rebol 3 (Oldes branch)"
2929
END
3030

31-
2 MANIFEST "r3.manifest"
31+
1 MANIFEST "r3.manifest"
3232

src/boot/graphics.r

+3-26
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
REBOL [
22
System: "REBOL [R3] Language Interpreter and Run-time Environment"
33
Title: "REBOL Graphics"
4+
Author: ["Richard Smolak" "Carl Sassenrath"]
45
Rights: {
56
Copyright 2012 REBOL Technologies
67
REBOL is a trademark of REBOL Technologies
8+
9+
Additional code modifications and improvements Copyright 2012 Saphirion AG
710
}
811
License: {
912
Licensed under the Apache License, Version 2.0.
@@ -16,13 +19,6 @@ REBOL [
1619
]
1720

1821
words: [
19-
;gui-metric
20-
screen-size
21-
border-size
22-
border-fixed
23-
title-size
24-
work-origin
25-
work-size
2622
]
2723

2824
;temp hack - will be removed later
@@ -32,34 +28,20 @@ init-words: command [
3228

3329
init-words words
3430

35-
init: command [
36-
"Initialize graphics subsystem."
37-
gob [gob!] "The screen gob (root gob)"
38-
]
39-
4031
caret-to-offset: command [
4132
"Returns the xy offset (pair) for a specific string position in a graphics object."
4233
gob [gob!]
4334
element [integer! block!] "The position of the string in the richtext block"
4435
position [integer! string!] "The position within the string"
4536
]
4637

47-
cursor: command [
48-
"Changes the mouse cursor image."
49-
image [integer! image! none!]
50-
]
5138

5239
offset-to-caret: command [ ;returns pair! instead of the block..needs to be fixed
5340
"Returns the richtext block at the string position for an XY offset in the graphics object."
5441
gob [gob!]
5542
position [pair!]
5643
]
5744

58-
show: command [
59-
"Display or update a graphical object or block of them."
60-
gob [gob! none!]
61-
]
62-
6345
size-text: command [
6446
"Returns the size of text rendered by a graphics object."
6547
gob [gob!]
@@ -71,11 +53,6 @@ draw: command [
7153
commands [block!] "Draw commands"
7254
]
7355

74-
gui-metric: command [
75-
"Returns specific gui related metric setting."
76-
keyword [word!] "Available keywords: SCREEN-SIZE, BORDER-SIZE, BORDER-FIXED, TITLE-SIZE, WORK-ORIGIN and WORK-SIZE."
77-
]
78-
7956
;#not-yet-used [
8057
;
8158
;effect: command [

src/boot/sysobj.r

+6
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,12 @@ view: context [
403403
scroll-page
404404

405405
drop-file
406+
407+
click
408+
change
409+
focus
410+
unfocus
411+
scroll
406412
]
407413
event-keys: [
408414
; Event types. Order dependent for C and REBOL.

src/boot/window.r

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
REBOL [
2+
System: "REBOL [R3] Language Interpreter and Run-time Environment"
3+
Title: "REBOL Window"
4+
Author: ["Richard Smolak" "Carl Sassenrath" "Oldes"]
5+
Rights: {
6+
Copyright 2012 REBOL Technologies
7+
REBOL is a trademark of REBOL Technologies
8+
9+
Additional code modifications and improvements Copyright 2012 Saphirion AG
10+
}
11+
License: {
12+
Licensed under the Apache License, Version 2.0.
13+
See: http://www.apache.org/licenses/LICENSE-2.0
14+
}
15+
Name: window
16+
Type: extension
17+
Exports: [] ; added by make-host-ext.r
18+
Note: "Run make-host-ext.r to convert"
19+
]
20+
21+
words: [
22+
;- widgets
23+
button
24+
check
25+
radio
26+
field
27+
area
28+
text
29+
text-list
30+
progress
31+
slider
32+
date-time
33+
group-box
34+
opengl
35+
36+
;- gui-metric
37+
border-fixed
38+
border-size
39+
screen-size
40+
virtual-screen-size
41+
log-size
42+
phys-size
43+
screen-dpi
44+
screen-num
45+
screen-origin
46+
title-size
47+
window-min-size
48+
work-origin
49+
work-size
50+
restore
51+
minimize
52+
maximize
53+
activate
54+
]
55+
56+
;temp hack - will be removed later
57+
init-words: command [
58+
words [block!]
59+
]
60+
61+
init-words words
62+
63+
init-top-window: command [
64+
"Initialize window subsystem."
65+
gob [gob!] "The screen gob (root gob)"
66+
]
67+
68+
cursor: command [
69+
"Changes the mouse cursor image."
70+
image [integer! image! none!]
71+
]
72+
73+
show: command [
74+
"Display or update a graphical object or block of them."
75+
gob [gob! none!]
76+
]
77+
78+
gui-metric: command [
79+
"Returns specific gui related metric setting."
80+
keyword [word!] "Available keywords: BORDER-FIXED, BORDER-SIZE, SCREEN-DPI, LOG-SIZE, PHYS-SIZE, SCREEN-SIZE, VIRTUAL-SCREEN-SIZE, TITLE-SIZE, WINDOW-MIN-SIZE, WORK-ORIGIN and WORK-SIZE."
81+
/set
82+
val "Value used to set specific setting(works only on 'writable' keywords)."
83+
/display
84+
idx [integer!] "Display index, starting with 0"
85+
]
86+
87+
show-soft-keyboard: command [
88+
"Display on-screen keyboard for user input."
89+
/attach
90+
gob [gob!] "GOB which should be visible during the input operation"
91+
]
92+

0 commit comments

Comments
 (0)