@alias(<protoMsg>) <messageDef>;
The @alias keyword is used for messages which take conditional parameters in an assembly handler. For example, if the assembly handler takes a word parameter normally and a dword only if a certain flag is set, you will need to have two C messages with the two different parameters. The @alias keyword allows this. Its arguments are shown below:
protoMsg
messageDef
@message void MSG_MY_MSG(word par); @alias(MSG_MY_MSG) void MSG_MY_SECOND_MSG(dword par);
See Also: @message
<ret> = @call [,<flags>] [{<cast_ret>}] \
<obj>::[{<cast_par>}]<msg>(<param>*);
The @call keyword sends the specified message to the specified object and makes the caller wait until the message is processed before continuing. The arguments of @call are shown below:
ret
flags
cast_ret
obj
cast_par
msg
cast
parameter.
param
The flags allowed with @call are shown below:
forceQueue
must also be passed. Note that due to implementation constraints, events will be checked from last to first rather than from first to last.
checkDuplicate
, above, except that it checks only the last message in the event queue.
checkDuplicate
and
checkLastOnly
by superseding the duplicate (old) event with the new one. The new event will be put in the duplicate's position in the event queue. If a duplicate is found but the
replace
flag is not passed, the duplicate will be dropped and the new event will be put at the end of the queue.
replace
flag.Additionally, @call alows the use of several special expressions in place of the recipient:
@call self::MSG_VIS_DRAW(flags, gstate);
@call process::MSG_HELLO_RESPOND();
attr = @call application::MSG_GEN_GET_ATTRIBUTES();
If you need to send a message to an object's superclass, use the @callsuper keyword rather than @call.
gstate = @call myObj::MSG_META_CUT();
retVal = @call {MSG_MY_MSG} myObj::MSG_OTHER_MSG();
retVal = @call myObj::MSG_MY_MSG(10, param1);
See Also: @send, @callsuper, @message, @method, @object
<ret> = @callsuper [{<cast_ret>}] \
<obj>::<class>::[{<cast_par>}]<msg>(<param>*) [<flags>]+;
@callsuper;
The @callsuper keyword does two things: The most useful is to pass a received message on to the superclass to ensure default behavior is preserved; the second, and less used, acts just like @call but sends the message to the recipient's superclass rather than the recipient's class. This is rarely used but can be used if only default behavior is required of the message. Its arguments are shown below:
ret
obj
cast_ret
.
class
cast_par
.
msg
param
flags
(void) @callsuper myObj::MySupClass::MSG_MY_MSG();
See Also: @call, @send, @message, @method
@chunk <type> <name> [= <init>];
The @chunk keyword declares a resource chunk containing data of some kind. Data can be of any GEOS or C data type or structure, including a string of characters. The chunk must be declared between the resource delimiters @start and @end. Its arguments are described below:
type
name
init
If you will need to access the chunk from another executable file, you must declare it in the other file with @extern. Objects are declared with @object.
typedef struct {
int a;
int b;
} MyStruct;
typedef char MyString[13];
@start MyDataResource, data;
@chunk word MyWordChunk;
@chunk MyStruct MyMSChunk = {5, 10};
@chunk MyString MyStringChunk = "My string";
@end MyDataResource;
See Also: @start, @end, @object, @extern
@chunkArray <stype> <aname> [= {<init>}];
The @chunkArray keyword declares a Chunk Array, a special kind of chunk. Only uniform-element-size chunk arrays may be declared with this keyword. It has the following arguments:
@chunkArray int someints;
@chunkArray dword somedwords = {123456789,
6021023,
31415926};
See Also: @chunk, @elementArray
@class <cname>, <super> [, master [, variant]];
The @class keyword begins a class definition. All instance data and messages for the class are declared between @class and @endc. The arguments of @class are listed below:
cname
super
master
variant
@class MyTriggerClass, GenTriggerClass; @endc
@class MyMasterVarClass, MetaClass, master, variant; @endc
See Also: @endc, @classdecl
@classdecl <cname> [, neverSaved];
The @classdecl keyword defines a given class structure in memory. Every new class that will be used by an application must appear in an @classdecl declaration. The arguments for this keyword are shown below:
cname
neverSaved
@classdecl MyTriggerClass; @classdecl MyProcessClass, neverSaved;
See Also: @class
@instance @composite <iname> = <linkFieldName>;
The @composite keyword appears as a subcommand of @instance. It is a type of instance data--it indicates that an object of this class can have several children and that the @composite instance data field will be an optr to the first of its children. The arguments of the @composite keyword are given below:
iname
linkFieldName@class GenTrigWithKidsClass, GenTriggerClass;
/* GI_link is the GenClass sibling link field. */
@instance @composite GTWKI_comp = GI_link;
@endc
See Also: @instance, @link
<fname> = @default [<op> [~]<attr>]*; /* to use default value of
instance data field */
@default <varRoot> = <super>; /* to specify default superclass of
a variant class */
@default <fname> = <value>; /* to specify a default value for an instance data field defined by a superclass. */
<fname> = @default;
The @default keyword can be used in several ways: to specify the default value of an instance data field, to represent the default value of an object's instance data field, or to specify the default superclass of a variant class. It may also be used when defining a class to specify a default value to use with an instance data field defined by a superclass.
The @default keyword is most commonly used when modifying default instance data values of bitfield-type fields. The defaults are set in the @class definition and may be modified in the @object declaration. The arguments of @default are shown below:
fname
op
attr
@object GenPrimaryClass MyPrimary {
GI_states = @default & ~GENS_MAXIMIZED;
GI_attrs = @default | GENA_TARGETABLE;
}
The @default keyword can also be used to specify the default superclass of a variant class. In this case, it has the following arguments:
To specify a class' default value for an instance data field when that instance data field is defined by a superclass, @default has the following arguments:
To represent an object's default value for an instance data field, @default has the following arguments:
See Also: @object, @instance, @class
@define <mname>[(<pdef>)] <macro>
The @define directive defines a Goc macro. You can define C macros with the #define directive; macros that use Goc operators, keywords, or code must be defined with @define. Similarly, macros defined with @define must be later used with the "@" marker preceeding them; otherwise, the Goc processor will scan over the macro and will not evaluate it. The arguments of @define are listed below:
mname
mname
to invoke the macro.
pdef
macro
@define MyChunk(a) @chunk char[] a = "text"; @define MyText(a,b) @chunk char[] a = "b";
/* You can later use these macros as follows: */
@MyChunk(Text1) @MyText(Text2, newText)
/* This will evaluate to the following: */
@chunk char[] Text1 = "text"; @chunk char[] Text2 = "newText";
@deflib <libName>
Most Goc libraries will have a .goh header file. This file should begin with a @deflib directive. This will see to it that no library header file is included more than once in a given compilation. The file must end with an @endlib directive. The @deflib directive takes the following argument:
@deflib hellolib
See Also: @endlib
@dispatch [noFree] [{<cast>}] <nObj>::<nMsg>::<event>;
The @dispatch keyword sends a previously-encapsulated message to the specified object. This keyword is analogous to @send; use @dispatchcall if the event must be processed immediately. The encapsulated event must have been defined with @record. The arguments of @dispatch are given below:
noFree
cast
nObj
null
.
nMsg
null
.
event
@dispatch null::null::myEvent; @dispatch newObject::null::myEvent; @dispatch null::MSG_NEW_MSG::myEvent;
See Also: @record, @send, @dispatchcall
<ret> = @dispatchcall [noFree] [{<cast>}] <nObj>::<nMsg>::<event>;
The @dispatchcall keyword sends a previously-encapsulated message to the specified object. This keyword is analogous to @call; use @dispatch if the event can be sent with no return values. The encapsulated event must have been defined with @record. The arguments of @dispatchcall are given below:
ret
noFree
cast
nObj
null
.
nMsg
null
.
event
retVal = @dispatchcall null::null::myEvent; retVal = @dispatchcall newObject::null::myEvent; (void) @dispatchcall null::MSG_NEW_MSG::myEvent;
See Also: @record, @send, @dispatchcall
@elementArray <stype> <aname> [= {<init>}];
The @elementArray keyword declares a Element Array, a special kind of Chunk Array. It has the following arguments:
See Also: @chunk, @chunkArray
@end <segname>
The @end keyword denotes the end of a resource block definition that had been started with @start. Its one argument is the name of the resource segment.
@start MenuResource; @end MenuResource;
See Also: @start, @header, @object, @chunk
@endc
The @endc keyword denotes the end of a class definition begun with @class. It has no arguments.
See Also: @class
@endif
The @endif directive denotes the end of a block of conditionally-compiled code. It is used with @if, @ifdef, and @ifndef.
See Also: @if, @ifdef, @ifndef
@endlib
Most Goc libraries will have a .goh header file. This file should end with an @endlib directive. This will see to it that no library header file is included more than once in a given compilation. The file must begin with an @deflib directive.
See Also: @deflib
@exportMessages <expname>, <num>;
The @exportMessages keyword sets aside a number of message spots so the messages may be declared elsewhere. This allows users of the class to declare messages that are guaranteed to be unique across all subclasses. Exported messages are declared with the @importMessage keyword. The arguments of @exportMessages are shown below:
expname
num
@exportMessages MetaUIMessages, 50; @exportMessages MyExportedMessages, 12;
See Also: @importMessage, @reserveMessages, @message
@extern <type> <name>; @extern method <cname>, <manme>+
The @extern keyword allows code in a given compilation session to access objects, chunks, monikers, and methods defined in another compilation session. The compiler will assume the element exists and will be linked by the Glue linker. If Glue is unable to locate and link the external resource element, it will respond with an error. The arguments of @extern are given below:
type
object
,
chunk
,
visMoniker
, or
method
.
name
@extern chunk MyChunk; @extern object MyBlueTrigger; @extern visMoniker GAL_visMoniker;
If @extern is being used to declare a method which is in a different file from the class declaration, it has the following arguments:
Some confusion has arisen about when to use
@extern
. The following notes will hopefully prove useful.
Your class' definition should not be broken up over files. If you wish to keep your class definition in a file separate from your other code, this file should be a .goh file.
If your class is
declared
(@classdecl) in a file other than where it is
defined
(@class), then the declaring file should
@include
the defining file.
Normally the declaring file contains all method definitions for the class. If any method definitions are in another file, then both files will need an
@extern
keyword like so:
In file containing class declaration:
@extern method MyClass, MSG_MY_DO_SOMETHING;
In file containing method code:
@extern method MyClass,
MSG_MY_DO_SOMETHING(word myArg)
{ /* Method code here */ }
All objects declared in a static tree (e.g., your application's generic tree) should be in the same source file. If they are in different files, then they may be joined into a single tree only by dynamically adding objects from one file as children to objects of the other.
Note that if one file contains a tree of objects, then you may incorporate the whole tree by simply dynamically adding the top object in the file to the main tree. You won't have to add each object individually.
If an object declared in one source file will send a message to an object in another source file, you must include an
@extern
line in the source file containing the sending object:
@extern object ReceivingObjectName;
The message itself should be sent in the following manner (with variations possible if you will be using
@call
, passing arguments, or what have you):
optr ROOptr; ROOptr = GeodeGetOptrNS(@ReceivingObjectName); @send ROOptr::MSG_DO_SOMETHING(0, 0);
See Also: @chunk, @object, @visMoniker
gcnList(<manufID>,<lname>) = <oname> [, <oname>]*;
The gcnList keyword, which does not have the keyword marker @ preceeding it, puts the listed objects onto the specified notification list. GCN lists are specified by both manufacturer ID and list type. The arguments of the gcnList keyword are given below:
manufID
lname
oname
@object GenApplicationClass HelloApp = {
GI_comp = HelloPrimary;
gcnList(MANUFACTURER_ID_GEOWORKS, GAGCNLT_WINDOWS) =
HelloPrimary;
}
See Also: @object
@send @genChildren::<msg>(<params>);
Any composite object in a generic object tree (therefore a subclass of
GenClass
) can send a message that will be dispatched at once to all of its children. Note that any message sent with @genChildren as the destination must be dispatched with the
@send
keyword and therefore can have no return value and can not pass pointers in its parameters.
[@send | @call] @genParent::<msg>(<params>);
Any composite object in a generic object tree (therefore a subclass of
GenClass
) can use the @genParent address to send a message to its generic parent. This can be used with either @send or @call.
@gstring <gsname> = {[<command> [, <command>]+]}
The @gstring keyword lets you declare a chunk containing GString data in Goc source code.
GS...()
macros are used to specify the bytes.An example:
@gstring MultPrimContentOneGraphic = {
GSSetGStringBounds(10,10,48,64),
GSSetTextColorIndex(C_VIOLET),
GSSetFont(FID_DTC_URW_SANS, 54.0),
GSSetTextStyle(TS_ITALIC, ~TS_ITALIC),
GSDrawText(10, 10), "1",
GSEndString()
};
The
GSSetGStringBounds()
command has been set up to optimize use of this GString: the programmer has pre-computed the drawing bounds of the GString. The graphics system will use the pre-computed bounds to speed up clipping.
The
GSEndString()
command signals that the GString is done. In all but the rarest cases, all GStrings should end with an end-gstring command.
@header <type> [= <init>];
The @header keyword sets the header of an object or data resource segment to a custom structure. The structure must begin with an LMemBlockHeader or ObjLMemBlockHeader. The arguments of @header are given below:
type
init
typedef struct {
LMemBlockHeader meta;
int a;
int b;
} MyLMemBlockHeader;
@start MyDataResource, data;
@header MyLMemBlockHeader = 10, 12;
@end MyDataResource;
See Also: @start, @end, @object, @chunk
@if (<cond>)
The @if directive denotes the beginning of a conditionally-compiled block of code. If the expression detailed in
cond
equates to
true
, then the code between the @if directive and the first corresponding @endif directive will be compiled with the rest of the code.
cond
@if 0 /* code not compiled */ @endif
@if MyMacro /* code compiled if MyMacro is defined */ @endif
@if defined(MyMacro) || MY_CONDITION /* code compiled either if MyMacro is defined or * if MY_CONDITION is non-zero */ @endif
See Also: @ifdef, @ifndef, @endif
@ifdef <item>
The @ifdef directive is similar to the @if directive in use, except the condition it evaluates is based solely on whether the
item
is defined or not (if
item
is defined, the following code is compiled).
See Also: @if, @ifndef, @endif
@ifndef <item>
The @ifndef directive is similar to the @ifdef directive in use, except the condition it evaluates is based solely on whether
item
is not defined (if
item
is not defined, the following code is compiled).
See Also: @if, @ifdef, @endif
@importMessage <expname>, <messageDef>;
The @importMessage keyword declares a message with a reserved message number set aside earlier by @exportMessages. The arguments of this keyword are given below:
expname
messageDef
@importMessage MyExportedMessages, word MSG_MY_MSG( byte param1, byte param2);
See Also: @exportMessages, @reserveMessages, @message
@include <fname>
The @include directive is used to include Goc files into a code file. It is similar to the #include directive in C. Its only argument is a file name (
fname
) enclosed in either angled brackets or quotation marks. If you use quotation marks, the compiler will look first in the file's own directory; if you use angled brackets, it will look first in the standard include directories.
@include <stdapp.goh> @include "Art/mkrGenDoc"
See Also: @extern
@instance <insType> <iname> = <default>;
The @instance keyword declares an instance data field for a class. This keyword will appear between the class delimeters @class and @endc. Its arguments are shown below:
insType
iname
default
The Goc preprocessor allows the use of several special types of instance data fields. To use these special types, insert the proper keyword (type name) in place of the
insType
argument above and do not include a default value for the field (
default
). The possible special types and their meanings are given in the list below (see the individual keyword entries for more detail):
default
argument in the declaration to be the same as the name of the corresponding @link field. This is important; otherwise, your program will not compile properly.Note that if you want to declare instance data fields for variable-sized data, you should use the @vardata keyword rather than @instance.
@instance int myInteger = 10;
typedef struc {
int a;
int b;
} MyStruc;
@instance MyStruc strucField = {7, 11};
@instance @visMoniker GI_moniker;
@instance @link VI_link; @instance @composite VCI_comp = VI_link;
@instance @kbdAccelerator GI_kbdAcc;
See Also: @vardata, @visMoniker, @link, @composite, @kbdAccelerator
@instance @kbdAccelerator <iname>;
The @kbdAccelerator keyword follows @instance to create an instance data field that will contain a keyboard accelerator. The
iname
argument is the name of the instance data field.
@instance @kbdAccelerator GI_kbdAcc;
See Also: @instance
@instance @link <iname>;
The @link keyword follows @instance to define a link instance data field pointing to the object's next sibling in the object hierarchy. The
iname
argument is the name of the instance data field. Note that the name of the link field must be set as the default value of the corresponding @composite field.
@instance @link GI_link; @instance @composite GI_comp = GI_link;
See Also: @instance, @composite
@localize { <string> <min>-<max> };
@localize { <string> <length> };
@localize { <string> };
@localize <string>;
@localize not;
This keyword is used to specify instructions for translators. When appearing under a
@visMoniker
or
@chunk
construction, this keyword specifies a string which the ResEdit program will show to translators localizing the geode.
For example:
@visMoniker FakeItemMoniker = "Data:";
@localize "This string will appear at the head of the list";
The arguments of this keyword are as follows:
@message <retType> <mname>([@stack] <param>*);
The @message keyword defines a message and its parameters and return values. This keyword will appear within a class definition (i.e., between @class and @endc). The message defined with @message will automatically be valid for the class for which it is defined as well as for subclasses of that class. The arguments of this keyword are shown below:
retType
mname
@stack
from the way they are listed in the declaration.
param*
@message void MSG_TRIGGER_PUSHED(int push1);
@message word MSG_MY_MSG(byte firstParam, word secParam, long thirdParam);
See Also: @method, @reserveMessages, @exportMessages, @importMessage, @record
@method [<hname>,] <cname>, <mname>+ [{<code>}];
The @method keyword begins definition of a method (message handler). Its arguments are listed below:
hname
cname
mname
+@method MyClass, MSG_MY_MSG {
/* method code goes here */
}
@method MyClassMethod, MyClass, MSG_MY_MSG {
/* method code goes here */
}
See Also: @message
@noreloc <iname>;
The @noreloc keyword specifies that an instance data field (defined in the previous program statement) is not relocatable. Normally optr fields are assumed to be relocatable and will be automatically relocated by the system when shutting down and coming back from a shutdown; by means of the @noreloc, this automatic behavior can be turned off for a given field.
@object <class> <name> <flags>* = {
[<fieldName> = <init>;]*
[<varName> [= <init>];]*
}
The @object keyword defines an object in an object resource block. It must appear between @start and @end. Its arguments are defined below:
class
name
flags
ignoreDirty
is supported. When set, this flag indicates that changes to the object should not be saved to a state file.
fieldName
varName
init
Many fields may be specified in the object declaration. Each field reference must be defined in a class in the object's class ancestry. Additionally, not all fields must be set. If a field is not specified within the @object declaration, the field will be set to its default value as defined by the class.
@start MyObjectResource;
@object GenTriggerClass MyTrigger ignoreDirty = {
GI_visMoniker = "MyTrigger's Moniker";
}
@object GenApplicationClass MyApp = {
GI_comp = MyPrimary;
gcnList(MANUFACTURER_ID_GEOWORKS, GAGCNLT_WINDOWS) =
MyPrimary;
}
@object GenPrimaryClass MyPrimary = {
GI_comp = MyMenu, MyInteraction, MyView;
GI_visMoniker = "My Primary's Moniker";
}
@object MyClass NewObject = {
NO_instance1 = 1;
NO_instance6 = `C';
}
@end MyObjectResource;
See Also: @start, @end, @extern, @class, @instance, @vardata
@optimize
This directive may be placed at the top of a .goh file. The directive instructs Goc to generate a specially processed .poh file which contains all the information of the .goh file, but is somewhat faster to compile. This .poh file is automatically regenerated if the corresponding .goh file has been changed since the last compilation.
@protominor <prototypeName>
When creating a new version of an existing library, use the
@protominor
keyword to declare new messages and variable data fields for a class. Suppose your original class declaration looked like so:
@class MyClass, SuperClass; @message void MSG_M_DO_THIS(void); @vardata void TEMP_M_DONE_FLAG; @endc
Having released this version of your class, you wished to release another version in which this class handled another message. You wanted to specify that this new message would only work with this new version of the library. This would be set up like so:
@class MyClass, SuperClass; @message void MSG_M_DO_THIS(void); @vardata void TEMP_M_DONE_FLAG; @endc @protominor MyVersion20 @message void MSG_M_DO_THAT(void);
You would also need to add an "incminor" line to the end of your .gp file:
incminor MyVersion20
To do the equivalent version control with routines, use the
incminor
.gp file directive.
See Also:
@protoreset
@protoreset
The
@protoreset
keyword signals that the rest of a file should ignore any previous
@protominor
statements.
@class MyFirstClass, SuperClass; @message void MSG_M1_DO_THIS(void); @vardata void TEMP_M1_DONE_FLAG; @endc @protominor MyVersion20 @message void MSG_M1_DO_THAT(void); @protoreset
@class MySecondClass, SuperClass; @instance word M2I_token; @vardata void ATTR_M2_IGNORE_TOKEN; @protominor MyVersion20 @vardata word ATTR_M2_ALTERNATE_TOKEN; @endc
@prototype <messageDef>;
The @prototype keyword allows multiple messages to have the same pass and return parameters. Use @prototype to define the pass and return values, then use @message to declare the messages that have these parameters. The messages defined with @message will have different message numbers and will invoke different methods. The
messageDef
argument is a standard message definition.
@prototype word MSG_MY_PROTO(byte param1);
@message(MSG_MY_PROTO) MSG_MY_MSG; @message(MSG_MY_PROTO) MSG_MY_SECOND_MSG;
See Also: @alias, @message
<event> = @record <obj>::<msg>(<param>*);
The @record keyword encapsulates an event for later use with @dispatch or @dispatchcall. The arguments of @record are as follows:
event
obj
null
to indicate that the recipient will be determined when the message is sent.
msg
null
to indicate that the message will be determined when it it sent.
param
myEvent = @record myObj::MSG_VIS_VUP_CREATE_GSTATE();
See Also: @dispatch, @dispatchcall, @call, @send
@reloc <iname>, [(<count>, <struct>)] <ptrType>; @reloc <iname>, <fn>, [(<count>, <struct>)] <ptrType>;
The @reloc keyword designates an instance data field that contains data requiring relocation on startup. Note that this does not include instance fields declared with the @composite and @link fields, but it does include any handle or pointer fields you may have. Note that there are two different formats for the use of @reloc. The first represents a normal instance field; the second represents a variable data instance field (see @vardata). This is not used with @instance or @vardata but stands alone.
The arguments of @reloc are shown below:
iname
count
struct
ptrType
optr
(object pointer),
ptr
(far pointer), or
handle
.
fn
@reloc MO_myHandle, handle; @reloc MO_myVarHandle, 0, handle; @reloc MO_myTable, (10, MyStruct), ptr;
See Also: @instance, @vardata
@method [<hname>,] <cname>, _reloc { <code>};
The _reloc keyword is used to write relocation handlers for classes, if you need to relocate-unrelocate instance data when it's either read in or saved to state.
The arguments of _reloc are show below:
@reserveMessages <number>;
The @reserveMessages keyword reserves the given number of message spots. Messages are numbered sequentially according to the order of their declaration; this keyword allows one or more numbers to be skipped in the numbering process, allowing application upgrades without making earlier versions obsolete. The single argument is the number of message spots to skip.
@reserveMessages 25;
See Also: @exportMessages, @importMessage, @message
@send [<flags>+] [(<cast_ret>)] <obj>::[{<cast_par>}]<msg>(<param>*);
The @send keyword sends a given message to the specified object. The message will be sent and the sender's thread will continue executing without waiting for a response. If return values or synchronization is important, use the @call keyword. The parameters of @send are shown below:
flags
cast_ret
obj
cast_par
msg
cast
argument .
param
The flags allowed with @send are shown below:
forceQueue
must also be passed. Note that due to implementation constraints, events will be checked from last to first rather than from first to last.
checkDuplicate
, above, except that it checks only the last message in the event queue.
checkDuplicate
and
checkLastOnly
by superseding the duplicate (old) event with the new one. The new event will be put in the duplicate's position in the event queue. If a duplicate is found but the
replace
flag is not passed, the duplicate will be dropped and the new event will be put at the end of the queue.
replace
flag.@send, forceQueue MyObj::MSG_MY_MSG(10, x); @send MyObj::MSG_SET_ATTR(attributesParam);
See Also: @call, @callsuper, @message, @method
<fname> = [@specificUI] <mod>* <key>;
The @specificUI keyword is used when setting a keyboard accelerator instance field in an object declaration. It tells the UI to allow the use of the keystrokes specified, even if they are normally reserved for the specific UI. The keyword itself takes no arguments; those shown are for the
GenClass
instance data field
GI_kbdAccelerator
. These are
fname
mod
control
,
ctrl
,
shift
,
alt
.
key
@object MyClass MyObject {
GI_kbdAccelerator = ctrl shift `k';
}
See Also:
GenClass
, @kbdAccelerator, @instance
@message <retType> <mname>([@stack] <param>*);
This keyword may be used if the message might be sent from assembly language code instead of Goc. It indicates that the arguments will be passed on the stack; the handler will pop them off the stack in
reverse order
from the way they are listed in the declaration.
See Also: @message
@start <segname> [, <flag>];
The @start keyword indicates the beginning of a resource block. The end of the block is denoted by the keyword @end. The arguments of @start are listed below:
segname
flags
data
, when set, indicates the block will be a data resource rather than an object resource. The flag
notDetachable
, when set, indicates the block should not be saved to a state file. @start MenuResource; @end MenuResource;
@start MyDialogResource, notDetachable; @end MenuResource;
@start MyStringResource, data; @end MyStringResource;
See Also: @end, @header, @object, @chunk
@uses <class>;
If you know that a variant class will always be resolved to be a subclass of some particular class, you can declare this with the @uses keyword. This will let the variant class define handlers for the "used" superclass. The keyword uses the following argument:
Warnings: You must make sure that the variant class's inheritance is always resolved such that the used class is one of its ancestor classes.
See Also: @class
@vardata <type> <vname>;
The @vardata keyword creates a vardata data type for a class. Each type created with @vardata can be simply the name of the type, or it can have additional data (a single structure). The arguments of @vardata are given @defaultbelow:
type
void
in place of a type.
vname
@vardata dword MY_FIRST_VAR_DATA;
typedef struc {
int a;
int b;
} MyStruc;
@vardata MyStruc MY_SECOND_VAR_DATA; @vardata void MY_THIRD_VAR_DATA;
See Also: @vardataAlias, @instance
@vardataAlias (<origName>) <newType> <newName>;
The @vardataAlias keyword allows you to set up variable data fields with varying amounts of extra data. That is, a single variable data field in the instance chunk could have two different sizes and two different names. The arguments of @vardataAlias are listed below:
origName
newType
void
instead of a type.
newName
/* defined in GenTriggerClass */
@vardata word ATTR_GEN_TRIGGER_ACTION_DATA;
/* A special GenTrigger that uses a different data * type is defined in the application: */
@object GenTriggerClass MyTrigger = {
GTI_actionMsg = MSG_MY_APPS_MESSAGE;
GTI_destination = process;
@vardataAlias (ATTR_GEN_TRIGGER_ACTION_DATA)
dword ATTR_MY_TRIGGER_SPECIAL_DATA;
See Also: @vardata, @instance
@send @visChildren::<msg>(<params>);
Any composite object in a visible object tree (therefore a subclass of
VisCompClass
) can send a message that will be dispatched at once to all of its children. Note that any message sent with @visChildren as the destination must be dispatched with the
@send
keyword and therefore can have no return value.
GEOS SDK TechDocs
|