µGFX  2.9
version 2.9
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 (gColor clr)
 Set the default foreground color for all new GWIN windows. More...
 
gColor gwinGetDefaultColor (void)
 Get the default foreground color for all new GWIN windows. More...
 
void gwinSetDefaultBgColor (gColor bgclr)
 Set the default background color for all new GWIN windows. More...
 
gColor gwinGetDefaultBgColor (void)
 Get the default background color for all new GWIN windows. More...
 
void gwinSetDefaultFont (gFont font)
 Set the default font for all new GWIN windows. More...
 
gFont 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, gBool visible)
 Sets whether a window is visible or not. More...
 
gBool gwinGetVisible (GHandle gh)
 Gets the visibility of a window. More...
 
void gwinSetEnabled (GHandle gh, gBool enabled)
 Enable or disable a window. More...
 
gBool gwinGetEnabled (GHandle gh)
 Gets the enabled state of a window. More...
 
void gwinMove (GHandle gh, gCoord x, gCoord y)
 Move a window. More...
 
void gwinResize (GHandle gh, gCoord width, gCoord height)
 Resize a window. More...
 
void gwinRedraw (GHandle gh)
 Redraw a window. More...
 
void gwinRedrawDisplay (GDisplay *g, gBool 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, gBool flash)
 Set a window or widget to flash. More...
 
void gwinSetFont (GHandle gh, gFont font)
 Set the current font for this window. More...
 
void gwinClear (GHandle gh)
 Clear the window. More...
 
void gwinDrawPixel (GHandle gh, gCoord x, gCoord y)
 Set a pixel in the window. More...
 
void gwinDrawLine (GHandle gh, gCoord x0, gCoord y0, gCoord x1, gCoord y1)
 Draw a line in the window. More...
 
void gwinDrawBox (GHandle gh, gCoord x, gCoord y, gCoord cx, gCoord cy)
 Draw a box in the window. More...
 
void gwinFillArea (GHandle gh, gCoord x, gCoord y, gCoord cx, gCoord cy)
 Fill an rectangular area in the window. More...
 
void gwinBlitArea (GHandle gh, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord srcx, gCoord srcy, gCoord srccx, const gPixel *buffer)
 Fill an area in the window using the supplied bitmap. More...
 
void gwinDrawCircle (GHandle gh, gCoord x, gCoord y, gCoord radius)
 Draw a circle in the window. More...
 
void gwinFillCircle (GHandle gh, gCoord x, gCoord y, gCoord radius)
 Draw a filled circle in the window. More...
 
void gwinFillDualCircle (GHandle gh, gCoord x, gCoord y, gCoord radius1, gCoord radius2)
 Draw two filled circles with the same centre in the window. More...
 
void gwinDrawEllipse (GHandle gh, gCoord x, gCoord y, gCoord a, gCoord b)
 Draw an ellipse. More...
 
void gwinFillEllipse (GHandle gh, gCoord x, gCoord y, gCoord a, gCoord b)
 Draw an filled ellipse. More...
 
gColor gwinGetPixelColor (GHandle gh, gCoord x, gCoord y)
 Get the color of a pixel in the window. More...
 
void gwinDrawChar (GHandle gh, gCoord x, gCoord y, char c)
 Draw a text character at the specified position in the window. More...
 
void gwinFillChar (GHandle gh, gCoord x, gCoord y, char c)
 Draw a text character with a filled background at the specified position in the window. More...
 
void gwinDrawString (GHandle gh, gCoord x, gCoord y, const char *str)
 Draw a text string in the window. More...
 
void gwinFillString (GHandle gh, gCoord x, gCoord y, const char *str)
 Draw a text string with a filled background in the window. More...
 
void gwinDrawStringBox (GHandle gh, gCoord x, gCoord y, gCoord cx, gCoord cy, const char *str, gJustify justify)
 Draw a text string verticly centered within the specified box. More...
 
void gwinFillStringBox (GHandle gh, gCoord x, gCoord y, gCoord cx, gCoord cy, const char *str, gJustify justify)
 Draw a text string verticly centered within the specified filled box. More...
 
void gwinDrawPoly (GHandle gh, gCoord tx, gCoord ty, const gPoint *pntarray, unsigned cnt)
 Draw an enclosed polygon (convex, non-convex or complex). More...
 
void gwinFillConvexPoly (GHandle gh, gCoord tx, gCoord ty, const gPoint *pntarray, unsigned cnt)
 Fill a convex polygon. More...
 
void gwinDrawThickLine (GHandle gh, gCoord x0, gCoord y0, gCoord x1, gCoord y1, gCoord width, gBool round)
 Draw a thick line in the window. More...
 
gdispImageError gwinDrawImage (GHandle gh, gImage *img, gCoord x, gCoord y, gCoord cx, gCoord cy, gCoord sx, gCoord 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, gTrue)
 Makes a widget become visible. More...
 
#define gwinHide(gh)   gwinSetVisible(gh, gFalse)
 Makes a widget become invisible. More...
 
#define gwinEnable(gh)   gwinSetEnabled(gh, gTrue)
 Enables a widget. More...
 
#define gwinDisable(gh)   gwinSetEnabled(gh, gFalse)
 Disables a widget. More...
 
#define gwinFlash(gh)   gwinSetFlashing(gh, gTrue)
 Enables flashing of a window or widget. More...
 
#define gwinNoFlash(gh)   gwinSetFlashing(gh, gFalse)
 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

enum  GWindowMinMax
 A window's minimized, maximized or normal size. More...