From: ol.sc Date: Mon, 16 Jan 2012 22:32:58 +0000 (+0000) Subject: Added articles in last chapter. X-Git-Tag: V2.13.3~61 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4837be9fbd0c3e5b96bfeef0deca9a4b45664c4d;p=cc65 Added articles in last chapter. git-svn-id: svn://svn.cc65.org/cc65/trunk@5404 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/doc/geos.sgml b/doc/geos.sgml index 17d72575a..a9b6f58f3 100644 --- a/doc/geos.sgml +++ b/doc/geos.sgml @@ -1353,20 +1353,20 @@ definitions of the returned values. Library Structures

To simplify usage and optimize passing parameters to functions I have declared several structures -which describe most common objects. Some of these structures are bound to static addresses in -GEOS data space (Graphics Structures pixel

-One simple structure describing a point on the screen. +A simple structure describing a point on the screen. fontdesc

-This structure describes a font in one pointsize. There is current font - window

-This widely used structure holds description of a region of the screen. It describes top-left and +This widely used structure holds the description of a region of the screen. It describes the top-left and bottom-right corners of a window. iconpic

Maybe the name isn't the best - it has nothing with icondef

-This is the definition of a single click box. Please see icontab

-This is toplevel description of icons to be placed and enabled on the screen. This structure -has following fields: +This is the toplevel description of icons to be placed and enabled on the screen. This structure +has the following fields: @@ -1411,36 +1411,36 @@ has following fields: tr_se

-This simple structure holds track and sector number of something. Do not expect the track to be +This simple structure holds the track and sector number of something. Do not expect the track to be in range 1-35, as GEOS can support many various and weird devices. For example my C128 256K -expansion is utilized as RAMDisk with layout of 4 tracks 128 sectors each. However assuming that -track number equal to 0 is illegal might be wise. +expansion is utilized as RAMDisk with a layout of 4 tracks of 128 sectors each. However assuming that +a track number equal to 0 is illegal might be wise. f_date

-This is placeholder for file datestamp. This structure is also present in filehandle

-This is main file descriptor. It is either entry in the directory (returned from file functions) +This is the main file descriptor. It is either an entry in the directory (returned from file functions) or its copy in fileheader

-This structure holds fileheader description. You can load file's header into System Structures s_date

This structure is defined only for You should declare a table of that type to prepare data for Few thing in detail... +A few things in detail...

GEOSLib uses cc65 non-ANSI extensions to easily initialize data in memory. This is done with a -kind of array of unspecified length and unspecified type. Here is how it goes: +kind of array of unspecified length and unspecified type. Here is how it works: void example = { (char)3, (unsigned)3, (char)0 }; @@ -1474,20 +1474,20 @@ cast each member to proper type. DoMenu structure

-Menu is described by two types of data - menu descriptors and menu items. Descriptor contains -information about following menu items, and items are containing names of entries and either +A menu is described by two types of data - menu descriptors and menu items. A descriptor contains +information about the following menu items, and items contain names of entries and either pointers to functions to execute or, in case of nested menus, pointers to submenu descriptors. Note that submenu descriptor can be top-level descriptor, there's no difference in structure, just in the content.

-Here is how single descriptor looks like: +Here is how a single descriptor looks like: void myMenu = { (char)top, (char)bottom, // this is the size of the menubox - (unsigned)left, (unsigned)right, // counting all items in current descriptor + (unsigned)left, (unsigned)right, // counting all items in the current descriptor (char)number_of_items | type_of_menu, // number of following items ORed with // type of this menu, it can be either // HORIZONTAL or VERTICAL if you will have also bit 6 set then menu won't be closed @@ -1505,32 +1505,32 @@ This is followed by - Both of them can be ORed with For creating nested menus (you can have at most 8 levels of submenus) you need to declare such -structure for each submenu and top level menu. +a structure for each submenu and top level menu. DoDlgBox command string

(window size and position) (commands and parameters) NULL -There is custom type defined for the command string: Size and position

-The first element can be specified in two ways - by using default size and position or specifying -own. The first case results in +The first element can be specified in two ways - by using the default size and position or specifying +your own. The first case results in const dlgBoxStr example = { DB_DEFPOS (pattern_of_shadow), @@ -1547,23 +1547,23 @@ const dlgBoxStr example = { Commands

-The next element of ... DB_ICON(OK, DBI_X_0, DBI_Y_0), ... Note that the position is counted from top left corner of window, not entire screen and that the 'x' -position is counted in cards (8-pixel) and not in pixels. This is true also for all following commands. - - char text = "foo"; @@ -1573,37 +1573,37 @@ char text = "foo"; DB_VARSTR (TXT_LN_X, TXT_LN_1_Y, &r15), ... -will cause to appear the word ``foo'' in the window, but you may store the pointer to any text in - - - - - - - -GraphicsString command string

- Here is an example for clearing the screen: @@ -1616,8 +1616,8 @@ const graphicStr example = { InitRam table

-This type of data is used to initialize one or more bytes in many places at once. The format is -as following: +This type of data is used to initialize one or more bytes in different locations at once. The format is +the following: void example = { (unsigned)address_to_store_values_at, @@ -1630,7 +1630,7 @@ void example = { Intercepting system vectors

-It is possible to intercept and hook in the GEOS Kernal using vectors. Here is a little example: +It is possible to intercept events and hook into the GEOS Kernal using vectors. Here is a little example: void_func oldVector; @@ -1649,12 +1649,12 @@ void remove_hook(void) { }

-In your @@ -1667,10 +1667,10 @@ That little example above intercepts -