version 2.8
gwin.h File Reference
#include "../../gfx.h"
#include "gwin_widget.h"
#include "gwin_container.h"
#include "gwin_console.h"
#include "gwin_graph.h"
#include "gwin_image.h"
#include "gwin_gl3d.h"

Go to the source code of this file.

Data Structures

struct  GWindowObject
 A window object structure. More...
 
struct  GWindowInit
 The structure to initialise a GWIN. More...
 

Functions

void gwinSetWindowManager (struct GWindowManager *gwm)
 Set the window manager for the GWIN system. More...
 
void gwinClearInit (GWindowInit *pwi)
 Clear a GWindowInit structure to all zero's. More...
 
void gwinSetDefaultColor (color_t clr)
 Set the default foreground color for all new GWIN windows. More...
 
color_t gwinGetDefaultColor (void)
 Get the default foreground color for all new GWIN windows. More...
 
void gwinSetDefaultBgColor (color_t bgclr)
 Set the default background color for all new GWIN windows. More...
 
color_t gwinGetDefaultBgColor (void)
 Get the default background color for all new GWIN windows. More...
 
void gwinSetDefaultFont (font_t font)
 Set the default font for all new GWIN windows. More...
 
font_t gwinGetDefaultFont (void)
 Get the current default font. More...
 
GHandle gwinGWindowCreate (GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit)
 Create a basic window. More...
 
void gwinDestroy (GHandle gh)
 Destroy a window (of any type). Releases any dynamically allocated memory. More...
 
const char * gwinGetClassName (GHandle gh)
 Get the real class name of the GHandle. More...
 
void gwinSetVisible (GHandle gh, bool_t visible)
 Sets whether a window is visible or not. More...
 
bool_t gwinGetVisible (GHandle gh)
 Gets the visibility of a window. More...
 
void gwinSetEnabled (GHandle gh, bool_t enabled)
 Enable or disable a window. More...
 
bool_t gwinGetEnabled (GHandle gh)
 Gets the enabled state of a window. More...
 
void gwinMove (GHandle gh, coord_t x, coord_t y)
 Move a window. More...
 
void gwinResize (GHandle gh, coord_t width, coord_t height)
 Resize a window. More...
 
void gwinRedraw (GHandle gh)
 Redraw a window. More...
 
void gwinRedrawDisplay (GDisplay *g, bool_t preserve)
 Redraw a display. More...
 
void gwinSetMinMax (GHandle gh, GWindowMinMax minmax)
 Minimize, Maximize or Restore a window. More...
 
GWindowMinMax gwinGetMinMax (GHandle gh)
 Get the Minimized/Maximized state of a window. More...
 
void gwinRaise (GHandle gh)
 Raise a window to the top of the z-order. More...
 
GHandle gwinGetNextWindow (GHandle gh)
 Get the next window in the z-order. More...
 
void gwinSetFlashing (GHandle gh, bool_t flash)
 Set a window or widget to flash. More...
 
void gwinSetFont (GHandle gh, font_t font)
 Set the current font for this window. More...
 
void gwinClear (GHandle gh)
 Clear the window. More...
 
void gwinDrawPixel (GHandle gh, coord_t x, coord_t y)
 Set a pixel in the window. More...
 
void gwinDrawLine (GHandle gh, coord_t x0, coord_t y0, coord_t x1, coord_t y1)
 Draw a line in the window. More...
 
void gwinDrawBox (GHandle gh, coord_t x, coord_t y, coord_t cx, coord_t cy)
 Draw a box in the window. More...
 
void gwinFillArea (GHandle gh, coord_t x, coord_t y, coord_t cx, coord_t cy)
 Fill an rectangular area in the window. More...
 
void gwinBlitArea (GHandle gh, coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t srcx, coord_t srcy, coord_t srccx, const pixel_t *buffer)
 Fill an area in the window using the supplied bitmap. More...
 
void gwinDrawCircle (GHandle gh, coord_t x, coord_t y, coord_t radius)
 Draw a circle in the window. More...
 
void gwinFillCircle (GHandle gh, coord_t x, coord_t y, coord_t radius)
 Draw a filled circle in the window. More...
 
void gwinFillDualCircle (GHandle gh, coord_t x, coord_t y, coord_t radius1, coord_t radius2)
 Draw two filled circles with the same centre in the window. More...
 
void gwinDrawEllipse (GHandle gh, coord_t x, coord_t y, coord_t a, coord_t b)
 Draw an ellipse. More...
 
void gwinFillEllipse (GHandle gh, coord_t x, coord_t y, coord_t a, coord_t b)
 Draw an filled ellipse. More...
 
color_t gwinGetPixelColor (GHandle gh, coord_t x, coord_t y)
 Get the color of a pixel in the window. More...
 
void gwinDrawChar (GHandle gh, coord_t x, coord_t y, char c)
 Draw a text character at the specified position in the window. More...
 
void gwinFillChar (GHandle gh, coord_t x, coord_t y, char c)
 Draw a text character with a filled background at the specified position in the window. More...
 
void gwinDrawString (GHandle gh, coord_t x, coord_t y, const char *str)
 Draw a text string in the window. More...
 
void gwinFillString (GHandle gh, coord_t x, coord_t y, const char *str)
 Draw a text string with a filled background in the window. More...
 
void gwinDrawStringBox (GHandle gh, coord_t x, coord_t y, coord_t cx, coord_t cy, const char *str, justify_t justify)
 Draw a text string verticly centered within the specified box. More...
 
void gwinFillStringBox (GHandle gh, coord_t x, coord_t y, coord_t cx, coord_t cy, const char *str, justify_t justify)
 Draw a text string verticly centered within the specified filled box. More...
 
void gwinDrawPoly (GHandle gh, coord_t tx, coord_t ty, const point *pntarray, unsigned cnt)
 Draw an enclosed polygon (convex, non-convex or complex). More...
 
void gwinFillConvexPoly (GHandle gh, coord_t tx, coord_t ty, const point *pntarray, unsigned cnt)
 Fill a convex polygon. More...
 
void gwinDrawThickLine (GHandle gh, coord_t x0, coord_t y0, coord_t x1, coord_t y1, coord_t width, bool_t round)
 Draw a thick line in the window. More...
 
gdispImageError gwinDrawImage (GHandle gh, gdispImage *img, coord_t x, coord_t y, coord_t cx, coord_t cy, coord_t sx, coord_t sy)
 Draw the image. More...
 

Macros

#define gwinGetClassID(gh)   ((void *)((gh)->vmt))
 Get an ID that uniquely describes the class of the GHandle. More...
 
#define gwinGetScreenX(gh)   ((gh)->x)
 Get the X coordinate of the window. More...
 
#define gwinGetScreenY(gh)   ((gh)->y)
 Get the Y coordinate of the window. More...
 
#define gwinGetWidth(gh)   ((gh)->width)
 Get the width of the window. More...
 
#define gwinGetHeight(gh)   ((gh)->height)
 Get the height of the window. More...
 
#define gwinSetColor(gh, clr)   (gh)->color = (clr)
 Set foreground color. More...
 
#define gwinSetBgColor(gh, bgclr)   (gh)->bgcolor = (bgclr)
 Set background color. More...
 
#define gwinGetColor(gh)   (gh)->color
 Get the foreground color of a window. More...
 
#define gwinGetBgColor(gh)   (gh)->bgcolor
 Get the background color of a window. More...
 
#define gwinShow(gh)   gwinSetVisible(gh, TRUE)
 Makes a widget become visible. More...
 
#define gwinHide(gh)   gwinSetVisible(gh, FALSE)
 Makes a widget become invisible. More...
 
#define gwinEnable(gh)   gwinSetEnabled(gh, TRUE)
 Enables a widget. More...
 
#define gwinDisable(gh)   gwinSetEnabled(gh, FALSE)
 Disables a widget. More...
 
#define gwinFlash(gh)   gwinSetFlashing(gh, TRUE)
 Enables flashing of a window or widget. More...
 
#define gwinNoFlash(gh)   gwinSetFlashing(gh, FALSE)
 Disables a widget. More...
 

Typedefs

typedef struct GWindowObject GWindowObject
 A window object structure. More...
 
typedef struct GWindowInit GWindowInit
 The structure to initialise a GWIN. More...
 

Enumerations