ftp.nice.ch/pub/next/developer/objc/api/QuestorAPI.3.2.s.tar.gz#/Questor_API/ExternalFunctions/Source/Demo1/XQ_UserFunction.h

This is XQ_UserFunction.h in view mode; [Download] [Up]

//
//	Xanthus
//	Copyright (c) 1992-95 Bjorn Backlund.  
//	All rights reserved. 
//

#import <time.h>
#import <objc/Object.h>

// private

extern int _convertXLTypeToXQType(int type);

// Questor 3.2 (b)
//
// Return indeces of current cell
//
extern int XQ_GetCurrentCell(void *stackFrame, 
			int *row, 
			int *col);


// Questor 3.2 (a)
//
// Return tag for current sheet
//
extern int XQ_CurrentSheetTag(void *stackFrame);

// Questor 3.2 (a)
//
// Return sheet object with tag <tag>
//
extern id XQ_SheetFromTag(int tag);


// Questor 3.2 (a)
//
// Current Sheet protocol
//
@protocol XQ_CurrentSheet_Protocol

- displayChangedCells;
- recalculate:sender;
- autoRecalculate:sender;
- (BOOL)doesAutorecalc;

@end


//
// API
//
// Argument/value types
//

#define XQ_DOUBLE_ARG		0
#define XQ_STRING_ARG 		1
#define XQ_DATE_ARG		2
#define XQ_ERROR_ARG		4
#define XQ_BOOLEAN_ARG		5
#define XQ_NIL_ARG		6
#define XQ_REF_ARG		7
#define XQ_RANGE_ARG		8

#define XQ_BLANK_CELL		-1

//
// Formals
//

#define XQ_EVAL			0
#define XQ_DONT_EVAL		1

//
// Future: Define also date and time types here
// and error codes
//

extern int XQ_ArgType(void *stackFrame, int anIndex);
extern void XQ_RaiseArgTypeError(void *stackFrame, int argNo, int type);

//
//
//

extern double XQ_GetDateValue(void *stackFrame, int argNo);
extern double XQ_GetDoubleValue(void *stackFrame, int argNo);
extern char *XQ_GetStringValue(void *stackFrame, int argNo);

extern double XQ_GetRangeDateValue(void *stackFrame, int argNo);
extern double XQ_GetRangeDoubleValue(void *stackFrame, int argNo);
extern char *XQ_GetRangeStringValue(void *stackFrame, int argNo);
extern void XQ_GetRangeValues(void *stackFrame, 
			int argNo, 
			int *fromRow, 
			int *fromCol, 
			int *toRow, 
			int *toCol);

char *XQ_GetCellStringValue(void *stackFrame, int row, int col);
double XQ_GetCellDoubleValue(void *stackFrame, int row, int col);
double XQ_GetCellDateValue(void *stackFrame, int row, int col);
int XQ_GetCellType(void *stackFrame, int row, int col);

// Questor 3.2 (b)
// 
// Set value of cell during recalc
//
extern int XQ_setCellValue(void *stackFrame, 
			int row, 
			int col,
			void *value);


// Questor 3.2 (a) 
//
// Add RTF error message
//
extern void XQ_AddErrorMessage(void * stackFrame, const char *format, ...);

// Questor 3.2 (a)
//
// Raise generic error
//
extern void XQ_RaiseError(void *stackFrame);


extern int XQ_ActualsCount(void *stackFrame);

extern void *XQ_CreateDoubleValue(void *stackFrame, double value);
extern void *XQ_CreateStringValueNoMalloc(void *stackFrame, char *value);
extern void *XQ_CreateStringValue(void *stackFrame, char *value);
extern void *XQ_CreateDateValue(void *stackFrame, double value, int type);

extern void *XQ_NilValue();
extern void *XQ_TrueValue();
extern void *XQ_FalseValue();
extern void *XQ_ErrorValue(int error);



//
//
//
//

@interface XQ_UserFunction:Object

+ (const char *)functionName;
+ (const char *)categoryName;
- (const char *)functionName;
- (const char *)argumentNameNo:(int)anIndex;
- (int)formalCount;
- (int)maxArg;
- (int)minArg;
- (const char *)description;
- (int)argType:(int)anIndex;
- (void *)runFunction:(void *)stackFrame;

@end




These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.