1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
|
#ifndef __NM_LINUX_B_H__
#define __NM_LINUX_B_H__
/*
Copyright (C) 1998, 1999, 2000 Wabasoft
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA.
*/
/*
Copyright (C) 2000, 2001 SMARTDATA, http://www.smartdata.ch/
More help for porting is include in the file nmport_b.c. Please read it before
porting or modify this port.
Linux port.
===========
*/
/* which GUI to use ? At this time, only GUI_GTK and GUI_PGUI is implemented */
#if defined(GUI_GTK)
# include "ui_gtk.h"
#elif defined(GUI_PGUI)
# include "ui_pgui.h"
#elif defined(GUI_NONE)
# include "ui_none.h"
#else
# error you must define GUI_... to choose a GUI system
#endif
/* globals */
#define NET_NOT_READY_FOR_OPEN 0
#define NET_READY_FOR_OPEN 1
#define NET_IS_OPEN 2
#define NET_OPEN_FAILED 3
/**************** which are needed ? */
extern WObject globalMainWin;
/*
extern int32 globalTimerInterval;
extern int32 globalTimerStart;
extern int classDbCount;
extern ULong appCreatorId;
extern Word globalSocketLibRefNum;
extern int globalNetState;
#ifdef QUICKBIND
extern int32 postEventMethodMapNum;
extern int32 onTimerTickMethodMapNum;
#endif
*/
/*************************************/
/* the size/properties of the MainWindow */
extern int32 hwr_bpp;
extern int32 hwr_width;
extern int32 hwr_height;
extern int isApplication;
#define HELPER
#define PUBLIC
#define WARN_NA(s) printf("### Warning: not implmented: %s\n", #s)
#define MEM_CACHING 0
#define MAX_CLASSPATHS 20
static int numClassPaths = -1;
static char *classPaths[MAX_CLASSPATHS];
static char *classpath = 0;
static int is_ui_inited = 0;
HELPER void * ui_init();
uchar *readFileIntoMemory( char *path, int nullTerminate, uint32 *size );
#ifdef WITH_THREAD
//*** Isao's Multithread implementation START ***
// Thread variables - Isao F. Yamashita 07/25/2000
#define THREAD_LIST_MAX_SIZE 8
typedef struct
{
WClass* tClass;
WObject tObject;
WObject syncObject;
WClassMethod* syncMethod;
int32 runMethodMapNum;
int32 syncMethodMapNum;
uint32 sleepCountSet;
uint32 sleepCountNow;
uchar isSleepCountAlreadySet;
uchar isWaiting;
} WThread;
WThread wThreadList[THREAD_LIST_MAX_SIZE];
uint32 threadListCurrentSize;
uint32 threadProcessIndex;
uint32 threadSynchMethodIndex;
//*** This "_onThreadStart()" method is called from "start()" method.
Var ThreadStart(Var stack[]);
//*** This "_onThreadStop()" method is called from "stop()" method.
Var ThreadStop(Var stack[]);
//*** This "_onThreadSleep()" method is called from "sleep()" method.
Var ThreadSleep(Var stack[]);
//*** This "_onThreadWait()" method is called from "wait()" method.
Var ThreadWaitForSignal(Var stack[]);
Var ThreadSignalAll(Var stack[]);
//*** Isao's Multithread implementation END ***
#endif /* WITH_THREAD */
/* get/set the properties of the main window */
#endif /* __NM_LINUX_B_H__ */
/*
Local Variables:
c-file-style: "smartdata"
End:
*/
|