Up: GEOS SDK TechDocs | Up | Prev: GeoworksMediumID ... | Next: GStringElement ...

GeoWorksVisContentGCNListType

typedef enum {
VCGCNLT_TARGET_NOTIFY_TEXT_PARA_ATTR_CHANGE = 0x4a00,
 PADDING_VCGCNLT_INVALID_ITEM_000
} GeoWorksVisContentGCNListType;

 

GetMaskType

typedef ByteEnum GetMaskType;
#define GMT_ENUM				0
#define GMT_BUFFER				1

 

GetPalType

typedef ByteEnum GetPalType;
#define GPT_ACTIVE				0
#define GPT_CUSTOM				1
#define GPT_DEFAULT				2

 

GFM_info

See GrFontMetrics() .

GOC_POINT macro

#define GOC_POINT(x,y) GOC_SW(x), GOC_SW(y)

This macro is useful when statically declaring GStrings. A GString is basically an array of bytes; this macro takes two word-length values and breaks them up into four comma-seperated bytes. Thus, they help to make GString commands with variable number of point data appear readable. For example:

...
GSDrawPolyline(3),
  GOC_POINT(0,6), GOC_POINT(10,6), GOC_POINT(10,1),
GSFillPolygon(4,ODD_EVEN),
  GOC_POINT(5,1), GOC_POINT(9,0), 
  GOC_POINT(9,5), GOC_POINT(5,6),
...

GOC_SW(), GOC_WORD() macros

#define GOC_SW(a)       GOC_WORD(a)
#define GOC_WORD(a)     ((a)&0xff),(((a)&0xff00)>>8)

These macros are useful when you're statically defining a byte array which contains word-length values. Each macro breaks up a word-length value into two bytes, seperated by a comma.

GraphicPattern

typedef struct { 
PatternType 		HP_type;
byte 		HP_data;
} GraphicPattern;

 

GSControl

typedef WordFlags GSControl;
#define GSC_PARTIAL 				0x0200
#define GSC_ONE 				0x0100
#define GSC_MISC 				0x0080
#define GSC_LABEL 				0x0040
#define GSC_ESCAPE 				0x0020
#define GSC_NEW_PAGE 				0x0010
#define GSC_XFORM 				0x0008
#define GSC_OUTPUT 				0x0004
#define GSC_ATTR 				0x0002
#define GSC_PATH 				0x0001

 

GSRetType

typedef ByteEnum GSRetType;
#define GSRT_COMPLETE				0
#define GSRT_FORM_FEED				1
#define GSRT_ONE 				2
#define GSRT_ESCAPE 				3
#define GSRT_OUTPUT 				4
#define GSRT_ELEMENT 				5
#define GSRT_FAULT 				0xff

 

GState

GStates are always referenced by means of GStateHandles, and are documented there.

GStateHandle

typedef Handle GStateHandle;

GStates, or graphics states, are used to interpret graphics commands. Any graphics command that draws anything takes a GStateHandle as an argument. Each GState is associated with a window, and the graphics system uses the GState to determine which window the command should affect.

The GState also holds considerable information determining how drawing commands will be carried out. For instance, it holds the line color. To draw a green line, first one routine set's the GState's line color to green. From then on (or until the line color is changed again), all lines drawn using that GState will be green. Thus, all commands that set color, pattern, or other drawing attributes take a GStateHandle argument.

GStateHandles are also used when creating bitmaps and graphics strings. In this case, the associated window is fake; all drawing commands passed a GStateHandle representing a bitmap or graphics string will affect the data structure instead of being drawn to screen.

GString

typedef void GString;

A GString (short for "Graphics Strings") represents a string of graphics commands. Each GString is made up of one or more GString elements, each of which corresponds to some standard graphics command.

GStrings may be created by means of drawing to a GStateHandle returned by GrCreateState() , but quite often GStrings are declared explicitly. The GString's data is often set up using macros like GSDrawLine() . These macros will output an opcode (of type GStringElement ) and format their macro arguments into data expected with the opcode.

For instance,

GSDrawLine(72, 144, 216, 288);

...would expand to the data:

(GStringElement)			GR_DRAW_LINE
GOC_SW(72), GOC_SW(144), GOC_SW(216), GOC_SW(288);

...where GOC_SW() is a macro that breaks up a word-length value into two bytes. Fundamentally, a GString is just an array of bytes.

Thus, these macros just represent data, though they look like normal kernel graphics commands.


Up: GEOS SDK TechDocs | Up | Prev: GeoworksMediumID ... | Next: GStringElement ...