build: add the SIBO SDK
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
/* EHBWIN.C */
|
||||
|
||||
#include <ehello.g>
|
||||
#include <ehello.rsg>
|
||||
#include <hwim.h>
|
||||
|
||||
LOCAL_C VOID LaunchDialog(INT class,INT resid,VOID *rbuf)
|
||||
{
|
||||
DL_DATA dld;
|
||||
|
||||
dld.id=resid;
|
||||
dld.rbuf=rbuf;
|
||||
dld.pdlg=NULL;
|
||||
hLaunchDial(CAT_EHELLO_EHELLO,class,&dld);
|
||||
}
|
||||
|
||||
#pragma METHOD_CALL
|
||||
|
||||
METHOD VOID ehbwin_wn_init(PR_EHBWIN *self)
|
||||
{
|
||||
W_WINDATA wd;
|
||||
IN_EDWIN_X initx;
|
||||
struct
|
||||
{
|
||||
IN_EDWIN e;
|
||||
TEXT rest[21];
|
||||
} init;
|
||||
|
||||
wd.extent.width=240-50; /* extent calculation presupposes S3 screen */
|
||||
wd.extent.height=3+10+5; /* matches flags set for bwin below */
|
||||
wd.extent.tl.x=0;
|
||||
wd.extent.tl.y=31; /* centred vertically */
|
||||
p_send5(self,O_WN_CONNECT,NULL,W_WIN_EXTENT,&wd);
|
||||
hLoadResBuf(EHSTR_INIT,&init.e.contents[0]);
|
||||
init.e.vulen=240-50-3-1-5-1; /* one extra pixel clearance each end */
|
||||
init.e.maxlen=50;
|
||||
init.e.flags=IN_EDWIN_VULEN_PIXELS|IN_EDWIN_POSITION_SUPPLIED;
|
||||
initx.pos.x=3+1;
|
||||
initx.pos.y=3;
|
||||
self->ehbwin.edwin=f_newsend(CAT_EHELLO_HWIM,C_EDWIN,O_WN_INIT,
|
||||
&init,self,&initx);
|
||||
self->win.flags=IN_BWIN_SHADOW_2|IN_BWIN_CUSHION;
|
||||
p_send3(self,O_WN_EMPHASISE,TRUE);
|
||||
hInitVis(self);
|
||||
}
|
||||
|
||||
METHOD VOID ehbwin_wn_emphasise(PR_EHBWIN *self,INT flag)
|
||||
{
|
||||
p_supersend3(self,O_WN_EMPHASISE,flag);
|
||||
p_send3(self->ehbwin.edwin,O_WN_EMPHASISE,flag);
|
||||
}
|
||||
|
||||
METHOD VOID ehbwin_wn_draw(PR_EHBWIN *self)
|
||||
{
|
||||
p_supersend2(self,O_WN_DRAW);
|
||||
p_send2(self->ehbwin.edwin,O_WN_DRAW);
|
||||
}
|
||||
|
||||
METHOD VOID ehbwin_wn_key(PR_EHBWIN *self,INT keycode,INT mods)
|
||||
{
|
||||
SE_EDWIN sense;
|
||||
|
||||
if (keycode!=W_KEY_RETURN)
|
||||
p_send4(self->ehbwin.edwin,O_WN_KEY,keycode,mods);
|
||||
else
|
||||
{
|
||||
p_send3(self->ehbwin.edwin,O_WN_SENSE,&sense);
|
||||
LaunchDialog(C_EHDLG,EHDLG,sense.buf);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
/* EHDLG.C */
|
||||
|
||||
#include <ehello.g>
|
||||
#include <hwim.h>
|
||||
|
||||
#pragma METHOD_CALL
|
||||
|
||||
METHOD VOID ehdlg_dl_dyn_init(PR_DLGBOX *self)
|
||||
{
|
||||
hDlgSetText(1,self->dlgbox.rbuf);
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
ehello.pic
|
||||
ehello.rzc
|
||||
@@ -0,0 +1,29 @@
|
||||
IMAGE ehello
|
||||
|
||||
EXTERNAL olib
|
||||
EXTERNAL hwim
|
||||
|
||||
INCLUDE hwimman.g
|
||||
INCLUDE edwin.g
|
||||
|
||||
CLASS ehwserv wserv
|
||||
{
|
||||
REPLACE ws_dyn_init
|
||||
}
|
||||
|
||||
CLASS ehbwin bwin
|
||||
{
|
||||
REPLACE wn_init
|
||||
REPLACE wn_emphasise
|
||||
REPLACE wn_key
|
||||
REPLACE wn_draw
|
||||
PROPERTY
|
||||
{
|
||||
PR_EDWIN *edwin;
|
||||
}
|
||||
}
|
||||
|
||||
CLASS ehdlg dlgbox
|
||||
{
|
||||
REPLACE dl_dyn_init
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
#system epoc img
|
||||
#set epocinit=iplib
|
||||
#model small jpi
|
||||
|
||||
#compile ehello.cat
|
||||
|
||||
#if %remake #or (ehello.rg #older ehello.re) #or (ehello.rg #older ehello.g) #then
|
||||
#run "re ehello" no_window no_abort
|
||||
#endif
|
||||
|
||||
#if (ehello.rsg #older ehello.rss) #or (ehello.rsg #older ehello.rg) #then
|
||||
#run "rs ehello" no_window no_abort
|
||||
#endif
|
||||
|
||||
#if ehello.rzc #older ehello.rsg #then
|
||||
#run "rch ehello" no_window no_abort
|
||||
#file delete ehello.img
|
||||
#endif
|
||||
|
||||
#compile ehmain.c
|
||||
#compile ehwserv.c
|
||||
#compile ehbwin.c
|
||||
#compile ehdlg.c
|
||||
|
||||
#if (ehello.img #older ehello.afl) #or (ehello.img #older ehello.pic) #then
|
||||
#file delete ehello.img
|
||||
#endif
|
||||
|
||||
#pragma link(hwim.lib)
|
||||
|
||||
#link ehello.img
|
||||
@@ -0,0 +1,3 @@
|
||||
#include <comman.g>
|
||||
|
||||
_O_COM_EXIT
|
||||
@@ -0,0 +1,54 @@
|
||||
/* EHELLO.RSS */
|
||||
|
||||
#include <hwim.rh>
|
||||
#include <hwim.rg>
|
||||
#include <ehello.rg>
|
||||
|
||||
RESOURCE WSERV_INFO ehello_accs
|
||||
{
|
||||
menbar_id=ehello_mbar;
|
||||
first_com=O_COM_EXIT;
|
||||
accel={'x'};
|
||||
}
|
||||
|
||||
RESOURCE MENU_BAR ehello_mbar
|
||||
{
|
||||
items =
|
||||
{
|
||||
MENU_BAR_ITEM
|
||||
{
|
||||
menu_id=special_menu;
|
||||
mb_item="Special";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
RESOURCE MENU special_menu
|
||||
{
|
||||
items =
|
||||
{
|
||||
MENU_ITEM
|
||||
{
|
||||
com_id=O_COM_EXIT;
|
||||
mn_item="Exit";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
RESOURCE DIALOG ehdlg
|
||||
{
|
||||
title="Edit window";
|
||||
flags=DLGBOX_RBUF_FILLED;
|
||||
controls=
|
||||
{
|
||||
CONTROL
|
||||
{
|
||||
class=C_TEXTWIN;
|
||||
flags=DLGBOX_ITEM_DEAD;
|
||||
prompt="Current text";
|
||||
info=TXTMESS { str="*";}; /* placeholder */
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
RESOURCE STRING ehstr_init { str="Hello world"; }
|
||||
@@ -0,0 +1,17 @@
|
||||
/* EHMAIN.C */
|
||||
|
||||
#include <ehello.g>
|
||||
|
||||
GLDEF_C VOID main(VOID)
|
||||
{
|
||||
IN_HWIMMAN app;
|
||||
IN_WSERV wserv;
|
||||
|
||||
p_linklib(0);
|
||||
app.flags=FLG_APPMAN_RSCFILE|FLG_APPMAN_SRSCFILE|FLG_APPMAN_CLEAN;
|
||||
app.wserv_cat=p_getlibh(CAT_EHELLO_EHELLO);
|
||||
app.wserv_class=C_EHWSERV;
|
||||
wserv.com_cat=p_getlibh(CAT_EHELLO_HWIM);
|
||||
wserv.com_class=C_COMMAN;
|
||||
p_send4(p_new(CAT_EHELLO_HWIM,C_HWIMMAN),O_AM_INIT,&app,&wserv);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
ehrel.prj ! releases source files
|
||||
ehello.pr ! TS project file
|
||||
make.bat ! makes EHELLO.IMG
|
||||
!
|
||||
ehello.cat ! category file
|
||||
ehello.re ! resource externals file
|
||||
ehello.rss ! resource script
|
||||
!
|
||||
ehbwin.c ! client window
|
||||
ehdlg.c ! dialog
|
||||
ehmain.c ! main
|
||||
ehwserv.c ! window server subclass
|
||||
!
|
||||
ehello.afl ! add file list
|
||||
ehello.pic ! icon
|
||||
@@ -0,0 +1,11 @@
|
||||
/* EHWSERV.C */
|
||||
|
||||
#include <ehello.g>
|
||||
|
||||
#pragma METHOD_CALL
|
||||
|
||||
METHOD VOID ehwserv_ws_dyn_init(PR_EHWSERV *self)
|
||||
{
|
||||
wsEnable();
|
||||
self->wserv.cli=f_newsend(CAT_EHELLO_EHELLO,C_EHBWIN,O_WN_INIT);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
tscx /m ehello
|
||||
tscx /m ehello
|
||||
Reference in New Issue
Block a user