realfeet / MainWin.H

#ifndef __INC_MAINWIN_H
#define __INC_MAINWIN_H
/*-------------------------------------------------------------------------*/
typedef struct _S_MAINWINDOW
{
	/* private - DO NOT TOUCH */
   WNDCLASS _classInfo;
   HWND _handle; /* handle of window */
   TCHAR* _caption; /* caption of the window */
   int _width; /* width of window */
   int _height; /* height of window */
   int _top; /* top of window */
   int _left; /* left of window */
   BOOL _visible; /* Specifies if the window is currently visible */
   BOOL _reshow; /* Set to TRUE on first show, so show can see a reshow */
   HMENU _menu; /* stores dynamic menu resource handle for destruction */
   int _clientHeight, _clientWidth; /* client (drawing area) limits */

   /* public - For external use and internal use */
   HWND (*GetHandle)(void*); /* gets the window handle of the window */
   const TCHAR* (*GetCaption)(void*); /* gets the caption of the window */
   const TCHAR* (*SetCaption)(void*, const TCHAR* NewCaption); /* sets the window caption */
   int (*GetWidth)(void*);
   int (*SetWidth)(void*, int NewWidth); /* Sets width, returns old width */
   int (*GetHeight)(void*);
   int (*SetHeight)(void*, int NewHeight); /* sets height, returns old height */
   int (*GetTop)(void*);
   int (*GetLeft)(void*);
   int (*SetTop)(void*, int NewTop);
   int (*SetLeft)(void*, int NewLeft);
   BOOL (*IsVisible)(void*); /* returns _visible */
   BOOL (*Show)(void*); /* shows the window, rets FALSE if already so */
   BOOL (*Hide)(void*); /* hides the window, rets FALSE if not visible */
   void (*Repaint)(void*); /* repaints the window */
   void (*UpdateWindowPos)(void*); /* updates the window's position on the screen, the dimentions should have changed or you'll be wasting time */
   int (*GetClientWidth)(void*); /* returns the drawing area of the window's max X extent +1 */
   int (*GetClientHeight)(void*); /* returns the drawing area of the window's max Y extent +1 */
   void (*RestrictSize)(void*, MINMAXINFO FAR*);
} S_MAINWINDOW, *S_PMAINWINDOW;

#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/

/* manual C constructor/destructor for S_MAINWINDOW objects */
void MainWindow_Construct( S_PMAINWINDOW Pobject);
void MainWindow_Destruct(S_PMAINWINDOW Pobject);
/* hooked members */
HWND MainWindow_GetHandle(void* parent); /* gets the window handle of the window */
const char* MainWindow_GetCaption(void* parent); /* gets the caption of the window */
const char* MainWindow_SetCaption(void* parent, const char* NewCaption); /* sets the window caption */
int MainWindow_GetWidth(void* parent);
int MainWindow_SetWidth(void* parent, int NewWidth); /* Sets width, returns old width */
int MainWindow_GetHeight(void* parent);
int MainWindow_SetHeight(void* parent, int NewHeight); /* sets height, returns old height */
int MainWindow_GetTop(void* parent);
int MainWindow_GetLeft(void* parent);
int MainWindow_SetTop(void* parent, int NewTop);
int MainWindow_SetLeft(void* parent, int NewLeft);
BOOL MainWindow_IsVisible(void* parent); /* returns _visible */
BOOL MainWindow_Show(void* parent); /* shows the window, rets FALSE if already so */
BOOL MainWindow_Hide(void* parent); /* hides the window, rets FALSE if not visible */
void MainWindow_Repaint(void* parent); /* reapaints the window */
void MainWindow_UpdateWindowPos(void* parent); /* The window is positioned and sized to the data members */
int MainWindow_GetClientWidth(void* parent);
int MainWindow_GetClientHeight(void* parent);
void MainWindow_RestrictSize(void* parent, MINMAXINFO FAR* PMinMaxInfo);
/* non-hooked members */
LRESULT CALLBACK MainWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); /* windowing procedure */

#ifdef __cplusplus
} /* end extern "c"s */
#endif /*__cplusplus*/
/*-------------------------------------------------------------------------*/
extern S_MAINWINDOW MainWindow; /* the main window (instance) */
/*-------------------------------------------------------------------------*/
#endif /*__INC_MAINWIN_H*/
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.