Skip to content

Commit

Permalink
RT R3 A102 Hostkit for Win32
Browse files Browse the repository at this point in the history
  • Loading branch information
REBOL Technologies authored and earl committed Aug 2, 2010
1 parent d4d77b5 commit 1a270f6
Show file tree
Hide file tree
Showing 22 changed files with 97 additions and 1,022 deletions.
4 changes: 2 additions & 2 deletions info.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
REBOL 3 Host-Kit Source Distribution
From REBOL Technologies in Ukiah, California

Version: 2.100.101.0.0 (alpha)
Updated: 20-Jul-2010/16:04:58-7:00
Version: 2.100.102.0.0 (alpha)
Updated: 29-Jul-2010/15:04:56-7:00

The purpose of the R3 Host-Kit is to provide developers with a method of
building custom versions of REBOL, including built-in extension modules.
Expand Down
Binary file modified lib/r3lib.dll
Binary file not shown.
Binary file modified lib/r3lib.exp
Binary file not shown.
Binary file modified lib/r3lib.lib
Binary file not shown.
4 changes: 2 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#--- REBOL 3.0 Host Makefile - Build A101
#--- Note: this makefile was generated by make-build.r (20-Jul-2010/23:04:58)
#--- REBOL 3.0 Host Makefile - Build A102
#--- Note: this makefile was generated by make-build.r (29-Jul-2010/22:04:56)
#--- This file intentionally kept simple - to work on all platforms.
#--- You will need REBOL 2.6 or 2.7 in your work directory or environment path

Expand Down
Binary file removed rebol.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions src/boot/graphics.r
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ REBOL [
; Run make-host-ext.r to convert to host-ext-graphics.h
]

init-graphics: command [
"Initialize graphics subsystem."
init: command [
"Initialize graphics subsystem (needs to not be exported!)."
gob [gob!] "The screen gob (root gob)"
]

Expand Down
2 changes: 1 addition & 1 deletion src/boot/version.r
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.100.101.3.1
2.100.102.3.1
8 changes: 4 additions & 4 deletions src/include/ext-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
************************************************************************
**
** Title: Extension Types (Isolators)
** Build: A101
** Date: 20-Jul-2010/16:01:51-7:00
** Build: A102
** Date: 29-Jul-2010/15:04:12-7:00
** File: ext-types.h
**
** AUTO-GENERATED FILE - Do not modify. (From: make-boot.r)
Expand Down Expand Up @@ -50,8 +50,8 @@ enum REBOL_Ext_Types
RXT_LIT_PATH, // 29
RXT_BINARY = 40, // 30
RXT_BITSET, // 31
RXT_IMAGE, // 32
RXT_VECTOR, // 33
RXT_VECTOR, // 32
RXT_IMAGE, // 33
RXT_GOB = 47, // 34
RXT_OBJECT = 48, // 35
RXT_MODULE, // 36
Expand Down
35 changes: 0 additions & 35 deletions src/include/host-ext-draw.h

This file was deleted.

29 changes: 0 additions & 29 deletions src/include/host-ext-graphics.h

This file was deleted.

6 changes: 3 additions & 3 deletions src/include/host-lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
************************************************************************
**
** Title: Host Access Library
** Build: A101
** Date: 20-Jul-2010/16:01:51-7:00
** Build: A102
** Date: 29-Jul-2010/15:04:11-7:00
** File: host-lib.h
**
** AUTO-GENERATED FILE - Do not modify. (From: make-os-ext.r)
**
***********************************************************************/


#define HOST_LIB_VER 101
#define HOST_LIB_VER 102
#define HOST_LIB_SUM 5782
#define HOST_LIB_SIZE 30

Expand Down
4 changes: 2 additions & 2 deletions src/include/reb-evtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
************************************************************************
**
** Title: Event Types
** Build: A101
** Date: 20-Jul-2010/16:01:51-7:00
** Build: A102
** Date: 29-Jul-2010/15:04:12-7:00
** File: reb-evtypes.h
**
** AUTO-GENERATED FILE - Do not modify. (From: make-boot.r)
Expand Down
65 changes: 53 additions & 12 deletions src/include/reb-ext-lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
************************************************************************
**
** Title: REBOL Extension API
** Build: A101
** Date: 20-Jul-2010/16:01:51-7:00
** Build: A102
** Date: 29-Jul-2010/15:04:11-7:00
** File: reb-ext-lib.r
**
** AUTO-GENERATED FILE - Do not modify. (From: make-ext-lib.r)
Expand All @@ -21,6 +21,8 @@ typedef struct rebol_ext_api {
int version;
void *(*make_block)(u32 size);
void *(*make_string)(u32 size, int unicode);
void *(*make_image)(u32 width, u32 height);
void (*gc_protect)(REBSER *series, BOOL protect);
int (*get_string)(REBSER *series, u32 index, void **str);
u32 (*map_word)(REBYTE *string);
u32 *(*map_words)(REBSER *series);
Expand Down Expand Up @@ -94,6 +96,44 @@ RXILIB *RXI; // Passed to the Init() function
** However, you can lock strings to prevent deallocation. (?? default)
*/

#define RXI_MAKE_IMAGE(a,b) RXI->make_image(a,b)
/*
** void *RXI_make_image(u32 width, u32 height)
**
** Allocate a new image of the given size.
**
** Returns:
** A pointer to an image series.
** Arguments:
** width - the width of the image in pixels
** height - the height of the image in lines
** Notes:
** Images are allocated with REBOL's internal memory manager.
** Image are automatically garbage collected if there are
** no references to them from REBOL code (C code does nothing.)
*/

#define RXI_GC_PROTECT(a,b) RXI->gc_protect(a,b)
/*
** void RXI_gc_protect(REBSER *series, BOOL protect)
**
** Protect memory from garbage collection.
**
** Returns:
** nothing
** Arguments:
** series - a series to protect (block, string, image, ...)
** protect - TRUE to protect, FALSE to unprotect
** Notes:
** You should only use this function when absolutely necessary,
** because it bypasses garbage collection for the specified series.
** Meaning: if you protect a series, it will never be freed.
** Also, you only need this function if you allocate several series
** such as strings, blocks, images, etc. within the same command
** and you don't store those references somewhere where the GC can
** find them, such as in an existing block or object (variable).
*/

#define RXI_GET_STRING(a,b,c) RXI->get_string(a,b,c)
/*
** int RXI_get_string(REBSER *series, u32 index, void **str)
Expand Down Expand Up @@ -135,12 +175,13 @@ RXILIB *RXI; // Passed to the Init() function
** Given a block of word values, return an array of word ids.
**
** Returns:
** An array of word identifiers (integers), zero terminated. The index of
** each id matches that of its word.
** An array of word identifiers (integers). The [0] value is the size.
** Arguments:
** series - block of words as values (from REBOL blocks, not strings.)
** Note:
** Word identifiers are persistent, and you can use them anytime.
** The block can include any kind of word, including set-words, lit-words, etc.
** If the input block contains non-words, they will be skipped.
** The array is allocated with OS_MAKE and you can OS_FREE it any time.
*/

Expand Down Expand Up @@ -169,12 +210,12 @@ RXILIB *RXI; // Passed to the Init() function
** Given an array of word ids, return the index of the given word.
**
** Returns:
** The index of the given word or zero. (??)
** The index of the given word or zero.
** Arguments:
** words - an array like that returned from MAP_WORDS
** words - a word array like that returned from MAP_WORDS (first element is size)
** word - a word id
** Note:
** Zeroth word? remove this funct?
** The first element of the word array is the length of the array.
*/

#define RXI_SERIES_INFO(a,b) RXI->series_info(a,b)
Expand All @@ -187,11 +228,7 @@ RXILIB *RXI; // Passed to the Init() function
** Returns information related to a series.
** Arguments:
** series - any series pointer (string or block)
** what - indicates what information to return:
** RXI_INFO_TAIL: the length of the series
** RXI_INFO_SIZE: total size of series (in elements)
** RXI_INFO_WIDE: the width in bytes of each element
** RXI_INFO_LEFT: number of unallocated elements available
** what - indicates what information to return (see enum)
*/

#define RXI_GET_CHAR(a,b) RXI->get_char(a,b)
Expand Down Expand Up @@ -307,6 +344,8 @@ RXILIB *RXI; // Passed to the Init() function

extern void *RXI_make_block(u32 size);
extern void *RXI_make_string(u32 size, int unicode);
extern void *RXI_make_image(u32 width, u32 height);
extern void RXI_gc_protect(REBSER *series, BOOL protect);
extern int RXI_get_string(REBSER *series, u32 index, void **str);
extern u32 RXI_map_word(REBYTE *string);
extern u32 *RXI_map_words(REBSER *series);
Expand All @@ -325,6 +364,8 @@ RXILIB Ext_Lib = {
RXI_VERSION,
RXI_make_block,
RXI_make_string,
RXI_make_image,
RXI_gc_protect,
RXI_get_string,
RXI_map_word,
RXI_map_words,
Expand Down
20 changes: 15 additions & 5 deletions src/include/reb-ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ typedef union rxi_arg_val {
REBD32 dec32b;
};
struct {
u32 index;
void *series;
u32 index;
};
struct {
void *image;
int width:16;
int height:16;
};
} RXIARG;

Expand Down Expand Up @@ -64,6 +69,10 @@ typedef int (*RXICAL)(int cmd, RXIFRM *args, void *data);
#define RXA_OBJECT(f,n) (RXA_ARG(f,n).addr)
#define RXA_MODULE(f,n) (RXA_ARG(f,n).addr)
#define RXA_HANDLE(f,n) (RXA_ARG(f,n).addr)
#define RXA_IMAGE(f,n) (RXA_ARG(f,n).image)
#define RXA_IMAGE_BITS(f,n) ((REBYTE *)RXI_SERIES_INFO((RXA_ARG(f,n).image), RXI_SER_DATA))
#define RXA_IMAGE_WIDTH(f,n) (RXA_ARG(f,n).width)
#define RXA_IMAGE_HEIGHT(f,n) (RXA_ARG(f,n).height)


// Command function return values:
Expand All @@ -82,10 +91,11 @@ enum rxi_return {

// Used with RXI_SERIES_INFO:
enum {
RXI_INFO_TAIL, // series tail index
RXI_INFO_SIZE, // size of series (in units)
RXI_INFO_WIDE, // width of series (in bytes)
RXI_INFO_LEFT, // units free in series (past tail)
RXI_SER_TAIL, // series tail index (length of data)
RXI_SER_DATA, // pointer to data
RXI_SER_SIZE, // size of series (in units)
RXI_SER_WIDE, // width of series (in bytes)
RXI_SER_LEFT, // units free in series (past tail)
};

// Include the library interface:
Expand Down
4 changes: 2 additions & 2 deletions src/include/rebol-lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
************************************************************************
**
** Title: REBOL Interface Library
** Build: A100
** Date: 16-Jul-2010/11:35:39-7:00
** Build: A101
** Date: 21-Jul-2010/12:15:34-7:00
** File: rebol-lib.h
**
** AUTO-GENERATED FILE - Do not modify. (From: make-headers.r)
Expand Down
3 changes: 2 additions & 1 deletion src/mezz/view-funcs.r
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ init-view-system: func [
"Initialize the View subsystem."
/local ep
][
init-graphics system/view/screen-gob: make gob! [text: "Top Gob"]
; The init function called here resides in this module
init system/view/screen-gob: make gob! [text: "Top Gob"]

; Already initialized?
if system/view/event-port [exit]
Expand Down
Loading

0 comments on commit 1a270f6

Please sign in to comment.