Syntax fixes for ruamoko/gui.

Once aggregate initializers are working, ruamoko/gui will "compile"
(no object files, and still the bogus integer constant into ... warning).
This commit is contained in:
Bill Currie 2011-02-14 22:13:55 +09:00
parent 5fa349927f
commit da3ac388fe
6 changed files with 13 additions and 13 deletions

View file

@ -17,13 +17,13 @@
[super dealloc]; [super dealloc];
} }
- (View []) addView: (View [])aView - (View *) addView: (View *)aView
{ {
[views addObject:aView]; [views addObject:aView];
return aView; return aView;
} }
- (id) addViews: (Array [])viewlist - (id) addViews: (Array *)viewlist
{ {
while ([viewlist count]) { while ([viewlist count]) {
[self addView: [viewlist objectAtIndex: 0]]; [self addView: [viewlist objectAtIndex: 0]];
@ -44,7 +44,7 @@
[views makeObjectsPerformSelector:sel withObject:self]; [views makeObjectsPerformSelector:sel withObject:self];
} }
- (void) setBasePosFromView: (View []) view - (void) setBasePosFromView: (View *) view
{ {
[super setBasePosFromView:view]; [super setBasePosFromView:view];
local SEL sel = @selector (setBasePosFromView:); local SEL sel = @selector (setBasePosFromView:);

View file

@ -3,7 +3,7 @@
#include "gui/Rect.h" #include "gui/Rect.h"
inputline_t (integer lines, integer size, integer prompt) InputLine_Create = #0; inputline_t (integer lines, integer size, integer prompt) InputLine_Create = #0;
void (inputline_t il, void [] data) InputLine_SetUserData = #0; void InputLine_SetUserData (inputline_t il, void *data) = #0;
void (inputline_t il, integer width) InputLine_SetWidth = #0; void (inputline_t il, integer width) InputLine_SetWidth = #0;
void (inputline_t il) InputLine_Destroy = #0; void (inputline_t il) InputLine_Destroy = #0;
void (inputline_t il, integer size) InputLine_Clear = #0; void (inputline_t il, integer size) InputLine_Clear = #0;

View file

@ -50,7 +50,7 @@
yabs = ypos + y; yabs = ypos + y;
} }
- (void) setBasePosFromView: (View []) view - (void) setBasePosFromView: (View *) view
{ {
Point pos = [view basePos]; Point pos = [view basePos];
xabs = xpos + pos.x; xabs = xpos + pos.x;

View file

@ -7,11 +7,11 @@
@interface Group : View @interface Group : View
{ {
Array []views; Array *views;
} }
- (void) dealloc; - (void) dealloc;
- (View[]) addView: (View[])aView; - (View*) addView: (View*)aView;
- (id) addViews: (Array[])viewlist; - (id) addViews: (Array*)viewlist;
- (void) moveTo: (integer)x y:(integer)y; - (void) moveTo: (integer)x y:(integer)y;
- (void) draw; - (void) draw;
@end @end

View file

@ -4,10 +4,10 @@
#include "View.h" #include "View.h"
struct _inputline_t {}; // opaque type :) struct _inputline_t {}; // opaque type :)
typedef struct _inputline_t [] inputline_t; typedef struct _inputline_t *inputline_t;
@extern inputline_t (integer lines, integer size, integer prompt) InputLine_Create; @extern inputline_t (integer lines, integer size, integer prompt) InputLine_Create;
@extern void (inputline_t il, void [] data) InputLine_SetUserData; @extern void InputLine_SetUserData (inputline_t il, void *data);
@extern void (inputline_t il, integer width) InputLine_SetWidth; @extern void (inputline_t il, integer width) InputLine_SetWidth;
@extern void (inputline_t il) InputLine_Destroy; @extern void (inputline_t il) InputLine_Destroy;
@extern void (inputline_t il, integer save) InputLine_Clear; @extern void (inputline_t il, integer save) InputLine_Clear;
@ -44,7 +44,7 @@ struct il_data_t {
@interface InputLineBox: View @interface InputLineBox: View
{ {
InputLine []input_line; InputLine *input_line;
} }
- (id) initWithBounds: (Rect)aRect promptCharacter: (integer)char; - (id) initWithBounds: (Rect)aRect promptCharacter: (integer)char;

View file

@ -10,7 +10,7 @@
integer xpos, ypos; integer xpos, ypos;
integer xlen, ylen; integer xlen, ylen;
integer xabs, yabs; integer xabs, yabs;
View []parent; View *parent;
integer flags; integer flags;
} }
@ -20,7 +20,7 @@
- (id) canFocus: (integer)cf; - (id) canFocus: (integer)cf;
- (integer) canFocus; - (integer) canFocus;
- (void) setBasePos: (integer)x y: (integer)y; - (void) setBasePos: (integer)x y: (integer)y;
- (void) setBasePosFromView: (View[])view; - (void) setBasePosFromView: (View*)view;
- (void) draw; - (void) draw;
- (integer) keyEvent:(integer)key unicode:(integer)unicode down:(integer)down; - (integer) keyEvent:(integer)key unicode:(integer)unicode down:(integer)down;