Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8199 → Rev 8252

/programs/demos/life2/include/kolibri.h
8,7 → 8,7
namespace Kolibri // All kolibri functions, types and data are nested in the (Kolibri) namespace.
{
const char *DebugPrefix = "User program: ";
char CommandLine[257];
char CommandLine[2048];
 
struct TWindowData // Data for drawing a window.
{
510,31 → 510,6
}
}
 
#else // def __KOLIBRI__
 
namespace Kolibri
{
struct TMutex
{
unsigned int mut;
 
TMutex();
~TMutex();
};
#undef KOLIBRI_MUTEX_INIT
#define KOLIBRI_MUTEX_INIT TMutex()
 
struct TRecMutex
{
unsigned int mut;
 
TRecMutex();
~TRecMutex();
};
#undef KOLIBRI_REC_MUTEX_INIT
#define KOLIBRI_REC_MUTEX_INIT TRecMutex()
}
 
#endif // else: def __KOLIBRI__
 
#endif // ndef __KOLIBRI_H_INCLUDED_
/programs/demos/life2/include/kos_func.inc
84,9 → 84,6
cmp esp,eax
cmova esp,eax
and esp,not 3
if defined @Kolibri@CommandLine
mov byte [@Kolibri@CommandLine+256], 0
end if
xor eax,eax
cld
mov edi,@Kolibri@_ThreadTable
389,8 → 386,9
dec esi
jz .window_defined
mov eax,SF_DRAW_TEXT
mov ebx,0x00070007
mov ebx,0x00070005
mov ecx,[ebp+KOLIBRI_THREAD_DATA_C_TITLE*4]
or ecx,1 shl 28 ;make big font
int 0x40
.window_defined:
.redraw_picture:
/programs/demos/life2/include/kos_start.inc
4,12 → 4,24
dd 1
dd @Kolibri@Main$qv
dd I_END
dd U_END+STACKSIZE+HEAPSIZE
dd U_END+STACKSIZE ;+HEAPSIZE
dd U_END+STACKSIZE
dd @Kolibri@CommandLine,0
if defined @Kolibri@CommandLine
dd @Kolibri@CommandLine
else
dd 0
end if
if defined @Kolibri@CurrentDirectoryPath
dd @Kolibri@CurrentDirectoryPath
else
dd 0
end if
 
include "..\..\KOSfuncs.inc"
include "..\..\proc32.inc"
include "..\..\macros.inc"
include "..\..\dll.inc"
include "..\..\load_lib.mac"
 
ptr equ
offset equ
/programs/demos/life2/include/l_proc_lib.h
0,0 → 1,62
#ifndef __L_PROC_LIB_H_INCLUDED_
#define __L_PROC_LIB_H_INCLUDED_
//
// proc_lib.obj
//
 
struct od_filter
{
long size; //size = len(#ext) + sizeof(long)
char ext[25];
};
 
struct OpenDialog_data{
long type;
void* procinfo; //
char* com_area_name;
void* com_area; //
char* opendir_path;
char* dir_default_path;
char* start_path;
void (__stdcall* draw_window)();
long status;
char* openfile_path;
char* filename_area;
od_filter* filter_area;
short int x_size; // Window X size
short int x_start; // Window X position
short int y_size; // Window y size
short int y_start; // Window Y position
};
 
struct ColorDialog_data{
long type;
void* procinfo; //
char* com_area_name;
void* com_area; //
char* start_path;
void (__stdcall* draw_window)();
long status;
short int x_size; // Window X size
short int x_start; // Window X position
short int y_size; // Window y size
short int y_start; // Window Y position
long color_type; // 0- RGB, 1 or other - reserved
long color; // Selected color
};
 
//
// proc_lib - import table
//
void (__stdcall* import_proc_lib)() = (void (__stdcall*)())&"lib_init";
void (__stdcall* OpenDialog_Init)(OpenDialog_data* odd) = (void (__stdcall*)(OpenDialog_data*))&"OpenDialog_init";
void (__stdcall* OpenDialog_Start)(OpenDialog_data* odd) = (void (__stdcall*)(OpenDialog_data*))&"OpenDialog_start";
void (__stdcall* OpenDialog_SetFileName)(OpenDialog_data* odd, char* name) = (void (__stdcall*)(OpenDialog_data*, char*))&"OpenDialog_set_file_name";
void (__stdcall* OpenDialog_SetFileExt)(OpenDialog_data* odd, char* ext) = (void (__stdcall*)(OpenDialog_data*, char*))&"OpenDialog_set_file_ext";
void (__stdcall* ColorDialog_Init)(ColorDialog_data* cdd) = (void (__stdcall*)(ColorDialog_data*))&"ColorDialog_init";
void (__stdcall* ColorDialog_Start)(ColorDialog_data* cdd) = (void (__stdcall*)(ColorDialog_data*))&"ColorDialog_start";
asm{
dd 0,0
}
 
#endif
/programs/demos/life2/include/load_lib.h
0,0 → 1,18
#ifndef __LOAD_LIB_H_LINCLUDED_
#define __LOAD_LIB_H_INCLUDED_
 
// macros '@use_library' and 'load_library' defined in file 'load_lib.mac'
 
asm{
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
}
 
bool LoadLibrary(const char* lib_name, char* lib_path, const char* system_path, void* myimport)
{
asm{
load_library [ebp+8], [ebp+12], [ebp+16], [ebp+20]
}
return true;
}
 
#endif