Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

emu6502.h File Reference


Detailed Description

Header file for emu6502.c, contains only local forward and type declarations, not for reuse.

Definition in file emu6502.h.#include "resource.h"
#include "mem.h"
#include "dlluser.h"
#include "usrmsgs.h"

Go to the source code of this file.

Data Structures

struct  _DllMsgList
struct  _PtrList

Typedefs

typedef _PtrList PtrList
 Generic list of pointers.

typedef _DllMsgList DllMsgList
 List of messages and theirs catching dll functions.


Functions

int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
 Entry point of this app.

ATOM MyRegisterClass (HINSTANCE hInstance)
 Registers the main window class.

BOOL InitInstance (HINSTANCE, int)
 Inits & shows the main window.

HWND CreateToolBar (HWND hParentWnd)
 Creates the main toolbar.

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM)
 Main message handling routine.

LRESULT CALLBACK About (HWND, UINT, WPARAM, LPARAM)
 About dialog's DialogProc.

BOOL LoadMemFile (HWND hWnd)
 Loads memory image.

void error (HWND hWnd, UINT uID, TCHAR *name)
 Error reporting proc.

void LoadPlugins (DllMsgList **list, PtrList **InstList)
 Loads plugins named in plugins.txt.

BOOL LoadPlugin (TCHAR *name, DllMsgList **list, PtrList **InstList)
 Loads plugin of given name.

void UnloadPlugins (PtrList *list)
BOOL ForwardDllMessage (UINT message, WPARAM wParam, LPARAM lParam, DllMsgList *list)
 Forwards message to registered plugin OnMessage functions.

void AddDllMsg (DllMsgList **list, UINT message, pForwardDllMsgProc FDMProc)
 Adds message catching dll function to a dll message list.

void AddToPtrList (void *node, PtrList **list)
 Allocates and adds new member to existing or NULL list.

TCHAR * GetNextStrToken (TCHAR **buf)
 Helper function for LoadPlugins.


Typedef Documentation

typedef struct _DllMsgList DllMsgList
 

List of messages and theirs catching dll functions.

See also:
DllFuncNode , ForwardDllMsgProc

Definition at line 34 of file emu6502.h.

typedef struct _PtrList PtrList
 

Generic list of pointers.

Definition at line 22 of file emu6502.h.


Function Documentation

LRESULT CALLBACK About HWND   ,
UINT   ,
WPARAM   ,
LPARAM   
 

About dialog's DialogProc.

Definition at line 198 of file emu6502.c.

void AddDllMsg DllMsgList **    list,
UINT    message,
pForwardDllMsgProc    FDMProc
 

Adds message catching dll function to a dll message list.

Parameters:
list  pointer to a DllMsgList list
message  ID of message to be catched
FDMProc  Function, to which should be the message forwarded Mostly function from plugin-dll.
See also:
ForwardDllMsgProc , DllMsgList

Definition at line 399 of file emu6502.c.

void AddToPtrList void *    node,
PtrList **    list
 

Allocates and adds new member to existing or NULL list.

Definition at line 446 of file emu6502.c.

HWND CreateToolBar HWND    hParentWnd
 

Creates the main toolbar.

Creates main toolbar and adds one Open button to it

Parameters:
hParentWnd  Handle to parent window
Returns :
Hanlde to the toolbar

Definition at line 127 of file emu6502.c.

void error HWND    hWnd,
UINT    uID,
TCHAR *    name
 

Error reporting proc.

Shows a messagebox with given error mesage (from resources). This message can also contain s in this case the parameter name becomes effective and prints on the position of s.

Parameters:
hWnd  Handle of the parent window
uID  Resource ID of the error message
name  Informations to be printed on the s position

Definition at line 268 of file emu6502.c.

BOOL ForwardDllMessage UINT    message,
WPARAM    wParam,
LPARAM    lParam,
DllMsgList   list
 

Forwards message to registered plugin OnMessage functions.

Parameters:
message  ID of forwarded message
wParam  wParam parameter of this message
lParam  lParam parameter of this message
list  List of messages and its catching functions. See DllMsgList
Returns :
TRUE if relevant function found, FALSE otherwise

Definition at line 277 of file emu6502.c.

TCHAR* GetNextStrToken TCHAR **    buf
 

Helper function for LoadPlugins.

Sideeffect - makes buf to point to the next item

Parameters:
buf  TCHAR buffer containing list of items separated by CRLF and ended with \0.
Returns :
first item of the list or NULL if there isn't any more
See also:
LoadPlugins

Definition at line 454 of file emu6502.c.

BOOL InitInstance HINSTANCE   ,
int   
 

Inits & shows the main window.

Creates the main window, sizes it to fit the 256x256 canvas, creates toolbar by calling @CreateToolbar, and then loads plugins by calling LoadPlugins.

See also:
CreateToolbar, LoadPlugins

Definition at line 91 of file emu6502.c.

BOOL LoadMemFile HWND    hWnd
 

Loads memory image.

Stops execution of the CPU, loads memory image, also controls it's length

Definition at line 216 of file emu6502.c.

BOOL LoadPlugin TCHAR *    name,
DllMsgList **    list,
PtrList **    InstList
 

Loads plugin of given name.

Executes his InitDll functions, receives list of messages to be catched in this plugin and attaches it to the DllMsgList list.

Parameters:
name  Name of plugin dll to be loaded.
list  Pointer to a DllMsgList list in which will be message IDs and theirs catching procedures stored.
InstList  List of handles to plugin-dlls loaded
See also:
LoadPlugins, ForwardDllMessage

Definition at line 334 of file emu6502.c.

void LoadPlugins DllMsgList **    list,
PtrList **    InstList
 

Loads plugins named in plugins.txt.

Goes through the plugins.txt file and loads named plugins by calling LoadPlugin procedure.

Parameters:
list  Pointer to a DllMsgList list in which will be message IDs and theirs catching procedures stored.
InstList  List of handles to plugin-dlls loaded
See also:
LoadPlugin, ForwardDllMessage

Definition at line 303 of file emu6502.c.

ATOM MyRegisterClass HINSTANCE    hInstance
 

Registers the main window class.

Definition at line 69 of file emu6502.c.

int APIENTRY WinMain HINSTANCE    hInstance,
HINSTANCE    hPrevInstance,
LPSTR    lpCmdLine,
int    nCmdShow
 

Entry point of this app.

Definition at line 41 of file emu6502.c.

LRESULT CALLBACK WndProc HWND    hWnd,
UINT    message,
WPARAM    wParam,
LPARAM    lParam
 

Main message handling routine.

Todo:
add TBSTYLE_TOOLTIPS

Definition at line 155 of file emu6502.c.


Generated on Fri Sep 6 18:32:15 2002 for Emu6502 by doxygen1.2.17