[Scummvm-cvs-logs] SF.net SVN: scummvm:[40104] scummvm/trunk/engines/sci

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Apr 24 12:46:20 CEST 2009


Revision: 40104
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40104&view=rev
Author:   fingolfin
Date:     2009-04-24 10:46:20 +0000 (Fri, 24 Apr 2009)

Log Message:
-----------
SCI: Renamed gfxw_widget_t and subtypes to GfxWidget etc.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/game.cpp
    scummvm/trunk/engines/sci/engine/kevent.cpp
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/engine/kmenu.cpp
    scummvm/trunk/engines/sci/engine/kpathing.cpp
    scummvm/trunk/engines/sci/engine/kscripts.cpp
    scummvm/trunk/engines/sci/engine/savegame.cpp
    scummvm/trunk/engines/sci/engine/scriptdebug.cpp
    scummvm/trunk/engines/sci/engine/state.h
    scummvm/trunk/engines/sci/gfx/gfx_gui.cpp
    scummvm/trunk/engines/sci/gfx/gfx_gui.h
    scummvm/trunk/engines/sci/gfx/gfx_state_internal.h
    scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
    scummvm/trunk/engines/sci/gfx/gfx_widgets.h
    scummvm/trunk/engines/sci/gfx/menubar.cpp
    scummvm/trunk/engines/sci/gfx/menubar.h

Modified: scummvm/trunk/engines/sci/engine/game.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/game.cpp	2009-04-24 10:45:09 UTC (rev 40103)
+++ scummvm/trunk/engines/sci/engine/game.cpp	2009-04-24 10:46:20 UTC (rev 40104)
@@ -32,7 +32,7 @@
 #include "sci/engine/kernel.h"
 #include "sci/engine/kernel_types.h"
 #include "sci/gfx/gfx_widgets.h"
-#include "sci/gfx/gfx_state_internal.h"	// required for gfxw_port_t, gfxw_visual_t
+#include "sci/gfx/gfx_state_internal.h"	// required for GfxPort, GfxVisual
 #include "sci/gfx/menubar.h"
 
 namespace Sci {

Modified: scummvm/trunk/engines/sci/engine/kevent.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kevent.cpp	2009-04-24 10:45:09 UTC (rev 40103)
+++ scummvm/trunk/engines/sci/engine/kevent.cpp	2009-04-24 10:46:20 UTC (rev 40104)
@@ -26,7 +26,7 @@
 #include "sci/engine/state.h"
 #include "sci/engine/kernel.h"
 #include "sci/gfx/gfx_widgets.h"
-#include "sci/gfx/gfx_state_internal.h"	// required for gfxw_port_t, gfxw_visual_t
+#include "sci/gfx/gfx_state_internal.h"	// required for GfxPort, GfxVisual
 
 namespace Sci {
 

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-04-24 10:45:09 UTC (rev 40103)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-04-24 10:46:20 UTC (rev 40104)
@@ -30,7 +30,7 @@
 #include "sci/engine/kernel.h"
 #include "sci/gfx/gfx_gui.h"
 #include "sci/gfx/gfx_widgets.h"
-#include "sci/gfx/gfx_state_internal.h"	// required for gfxw_container_t, gfxw_port_t, gfxw_visual_t
+#include "sci/gfx/gfx_state_internal.h"	// required for GfxContainer, GfxPort, GfxVisual
 
 namespace Sci {
 
@@ -137,7 +137,7 @@
 	}
 }
 
-static void reparentize_primary_widget_lists(EngineState *s, gfxw_port_t *newport) {
+static void reparentize_primary_widget_lists(EngineState *s, GfxPort *newport) {
 	if (!newport)
 		newport = s->picture_port;
 
@@ -224,7 +224,7 @@
 
 	while (port_nr > 2 && !(s->port->_flags & GFXW_FLAG_IMMUNE_TO_SNAPSHOTS) && (gfxw_widget_matches_snapshot(*ptr, GFXW(s->port)))) {
 		// This shouldn't ever happen, actually, since windows (ports w/ ID > 2) should all be immune
-		gfxw_port_t *newport = gfxw_find_port(s->visual, port_nr);
+		GfxPort *newport = gfxw_find_port(s->visual, port_nr);
 		SCIkwarn(SCIkERROR, "Port %d is not immune against snapshots!\n", s->port->_ID);
 		port_nr--;
 		if (newport)
@@ -232,7 +232,7 @@
 	}
 
 	if (s->dyn_views && gfxw_widget_matches_snapshot(*ptr, GFXW(s->dyn_views->_parent))) {
-		gfxw_container_t *parent = s->dyn_views->_parent;
+		GfxContainer *parent = s->dyn_views->_parent;
 
 		do {
 			parent = parent->_parent;
@@ -243,7 +243,7 @@
 			BREAKPOINT();
 		}
 
-		reparentize_primary_widget_lists(s, (gfxw_port_t *) parent);
+		reparentize_primary_widget_lists(s, (GfxPort *) parent);
 	}
 
 
@@ -454,8 +454,8 @@
 }
 
 void _k_graph_rebuild_port_with_color(EngineState *s, gfx_color_t newbgcolor) {
-	gfxw_port_t *port = s->port;
-	gfxw_port_t *newport;
+	GfxPort *port = s->port;
+	GfxPort *newport;
 
 	newport = sciw_new_window(s, port->zone, port->font_nr, port->_color, newbgcolor,
 	                          s->titlebar_port->font_nr, s->ega_colors[15], s->ega_colors[8],
@@ -463,7 +463,7 @@
 
 	if (s->dyn_views) {
 		int found = 0;
-		gfxw_container_t *parent = s->dyn_views->_parent;
+		GfxContainer *parent = s->dyn_views->_parent;
 
 		while (parent && !(found |= (GFXW(parent) == GFXW(port))))
 			parent = parent->_parent;
@@ -481,7 +481,7 @@
 
 reg_t kGraph(EngineState *s, int funct_nr, int argc, reg_t *argv) {
 	rect_t area;
-	gfxw_port_t *port = s->port;
+	GfxPort *port = s->port;
 	int redraw_port = 0;
 
 	area = gfx_rect(SKPV(2), SKPV(1) , SKPV(4), SKPV(3));
@@ -771,7 +771,7 @@
 	reg_t obj = argv[0];
 	reg_t cliplist_ref = KP_ALT(1, NULL_REG);
 	List *cliplist = NULL;
-	gfxw_port_t *port = s->picture_port;
+	GfxPort *port = s->picture_port;
 	uint16 signal;
 	int retval;
 
@@ -806,7 +806,7 @@
 
 	if ((illegal_bits & 0x8000) // If we are vulnerable to those views at all...
 	        && s->dyn_views) { // ...check against all stop-updated dynviews
-		gfxw_dyn_view_t *widget = (gfxw_dyn_view_t *) s->dyn_views->contents;
+		GfxDynView *widget = (GfxDynView *) s->dyn_views->contents;
 
 		SCIkdebug(SCIkBRESEN, "Checking vs dynviews:\n");
 
@@ -817,7 +817,7 @@
 				if (collides_with(s, abs_zone, make_reg(widget->_ID, widget->_subID), 1, GASEOUS_VIEW_MASK_ACTIVE, funct_nr, argc, argv))
 					return not_register(s, NULL_REG);
 
-			widget = (gfxw_dyn_view_t *) widget->_next;
+			widget = (GfxDynView *) widget->_next;
 		}
 	}
 
@@ -1700,7 +1700,7 @@
 
 
 static void draw_rect_to_control_map(EngineState *s, Common::Rect abs_zone) {
-	gfxw_box_t *box;
+	GfxBox *box;
 	gfx_color_t color;
 
 	gfxop_set_color(s->gfx_state, &color, -1, -1, -1, -1, -1, 0xf);
@@ -1715,7 +1715,7 @@
 	ADD_TO_CURRENT_PICTURE_PORT(box);
 }
 
-static void draw_obj_to_control_map(EngineState *s, gfxw_dyn_view_t *view) {
+static void draw_obj_to_control_map(EngineState *s, GfxDynView *view) {
 	reg_t obj = make_reg(view->_ID, view->_subID);
 
 	if (!is_object(s, obj))
@@ -1727,8 +1727,8 @@
 	}
 }
 
-static void _k_view_list_do_postdraw(EngineState *s, gfxw_list_t *list) {
-	gfxw_dyn_view_t *widget = (gfxw_dyn_view_t *) list->contents;
+static void _k_view_list_do_postdraw(EngineState *s, GfxList *list) {
+	GfxDynView *widget = (GfxDynView *) list->contents;
 
 	while (widget) {
 		reg_t obj = make_reg(widget->_ID, widget->_subID);
@@ -1776,14 +1776,14 @@
 			*((reg_t *)(widget->signalp)) = make_reg(0, widget->signal & 0xffff); /* Write back signal */
 		}
 
-		widget = (gfxw_dyn_view_t *) widget->_next;
+		widget = (GfxDynView *) widget->_next;
 	}
 }
 
 void _k_view_list_mark_free(EngineState *s, reg_t off) {
 	if (s->dyn_views) {
 
-		gfxw_dyn_view_t *w = (gfxw_dyn_view_t *) s->dyn_views->contents;
+		GfxDynView *w = (GfxDynView *) s->dyn_views->contents;
 
 		while (w) {
 			if (w->_ID == off.segment
@@ -1791,14 +1791,14 @@
 				w->under_bitsp = NULL;
 			}
 
-			w = (gfxw_dyn_view_t *) w->_next;
+			w = (GfxDynView *) w->_next;
 		}
 	}
 }
 
 static int _k_animate_ran = 0;
 
-int _k_view_list_dispose_loop(EngineState *s, List *list, gfxw_dyn_view_t *widget, int funct_nr, int argc, reg_t *argv) {
+int _k_view_list_dispose_loop(EngineState *s, List *list, GfxDynView *widget, int funct_nr, int argc, reg_t *argv) {
 // disposes all list members flagged for disposal; funct_nr is the invoking kfunction
 // returns non-zero IFF views were dropped
 	int signal;
@@ -1809,7 +1809,7 @@
 	if (widget) {
 		int retval;
 		// Recurse:
-		retval = _k_view_list_dispose_loop(s, list, (gfxw_dyn_view_t *) widget->_next, funct_nr, argc, argv);
+		retval = _k_view_list_dispose_loop(s, list, (GfxDynView *) widget->_next, funct_nr, argc, argv);
 
 		if (retval == -1) // Bail out on annihilation, rely on re-start from Animate()
 			return -1;
@@ -1888,7 +1888,7 @@
 #define _K_MAKE_VIEW_LIST_CALC_PRIORITY 2
 #define _K_MAKE_VIEW_LIST_DRAW_TO_CONTROL_MAP 4
 
-static gfxw_dyn_view_t *_k_make_dynview_obj(EngineState *s, reg_t obj, int options, int nr, int funct_nr, int argc, reg_t *argv) {
+static GfxDynView *_k_make_dynview_obj(EngineState *s, reg_t obj, int options, int nr, int funct_nr, int argc, reg_t *argv) {
 	short oldloop, oldcel;
 	int cel, loop, view_nr = GET_SEL32SV(obj, view);
 	int palette;
@@ -1897,7 +1897,7 @@
 	reg_t *under_bitsp, *signalp;
 	Common::Point pos;
 	int z;
-	gfxw_dyn_view_t *widget;
+	GfxDynView *widget;
 
 	SCIkdebug(SCIkGRAPHICS, " - Adding "PREG"\n", PRINT_REG(obj));
 
@@ -1955,7 +1955,7 @@
 	widget = gfxw_new_dyn_view(s->gfx_state, pos, z, view_nr, loop, cel, palette, -1, -1, ALIGN_CENTER, ALIGN_BOTTOM, nr);
 
 	if (widget) {
-		widget = (gfxw_dyn_view_t *) gfxw_set_id(GFXW(widget), obj.segment, obj.offset);
+		widget = (GfxDynView *) gfxw_set_id(GFXW(widget), obj.segment, obj.offset);
 		widget = gfxw_dyn_view_set_params(widget, under_bits.segment, under_bitsp, signal, signalp);
 		widget->_flags |= GFXW_FLAG_IMMUNE_TO_SNAPSHOTS; // Only works the first time 'round'
 
@@ -1966,14 +1966,14 @@
 	}
 }
 
-static void _k_make_view_list(EngineState *s, gfxw_list_t **widget_list, List *list, int options, int funct_nr, int argc, reg_t *argv) {
+static void _k_make_view_list(EngineState *s, GfxList **widget_list, List *list, int options, int funct_nr, int argc, reg_t *argv) {
 /* Creates a view_list from a node list in heap space. Returns the list, stores the
 ** number of list entries in *list_nr. Calls doit for each entry if cycle is set.
 ** argc, argv, funct_nr should be the same as in the calling kernel function.
 */
 	Node *node;
 	int sequence_nr = 0;
-	gfxw_dyn_view_t *widget;
+	GfxDynView *widget;
 
 	if (!*widget_list) {
 		SCIkwarn(SCIkERROR, "make_view_list with widget_list == ()\n");
@@ -1993,7 +1993,7 @@
 	while (node) {
 		reg_t obj = node->value; // The object we're using
 		reg_t next_node;
-		gfxw_dyn_view_t *tempWidget;
+		GfxDynView *tempWidget;
 
 		if (options & _K_MAKE_VIEW_LIST_CYCLE) {
 			unsigned int signal = GET_SEL32V(obj, signal);
@@ -2017,18 +2017,18 @@
 		node = LOOKUP_NODE(next_node); // Next node
 	}
 
-	widget = (gfxw_dyn_view_t *)(*widget_list)->contents;
+	widget = (GfxDynView *)(*widget_list)->contents;
 
 	while (widget) { // Read back widget values
 		if (widget->signalp)
 			widget->signal = ((reg_t *)(widget->signalp))->offset;
 
-		widget = (gfxw_dyn_view_t *) widget->_next;
+		widget = (GfxDynView *) widget->_next;
 	}
 }
 
-static void _k_prepare_view_list(EngineState *s, gfxw_list_t *list, int options) {
-	gfxw_dyn_view_t *view = (gfxw_dyn_view_t *) list->contents;
+static void _k_prepare_view_list(EngineState *s, GfxList *list, int options) {
+	GfxDynView *view = (GfxDynView *) list->contents;
 	while (view) {
 		reg_t obj = make_reg(view->_ID, view->_subID);
 		int priority, _priority;
@@ -2107,13 +2107,13 @@
 			fprintf(stderr, "Unsetting magic StopUpd for view "PREG"\n", PRINT_REG(obj));
 		} */
 
-		view = (gfxw_dyn_view_t *) view->_next;
+		view = (GfxDynView *) view->_next;
 	}
 }
 
-static void _k_update_signals_in_view_list(gfxw_list_t *old_list, gfxw_list_t *new_list) {
+static void _k_update_signals_in_view_list(GfxList *old_list, GfxList *new_list) {
 	// O(n^2)... a bit painful, but much faster than the redraws it helps prevent
-	gfxw_dyn_view_t *old_widget = (gfxw_dyn_view_t *) old_list->contents;
+	GfxDynView *old_widget = (GfxDynView *) old_list->contents;
 
 	/* Traverses all old widgets, updates them with signals from the new widgets.
 	** This is done to avoid evil hacks in widget.c; widgets with unique IDs are
@@ -2122,12 +2122,12 @@
 	*/
 
 	while (old_widget) {
-		gfxw_dyn_view_t *new_widget = (gfxw_dyn_view_t *) new_list->contents;
+		GfxDynView *new_widget = (GfxDynView *) new_list->contents;
 
 		while (new_widget
 		        && (new_widget->_ID != old_widget->_ID
 		            || new_widget->_subID != old_widget->_subID))
-			new_widget = (gfxw_dyn_view_t *) new_widget->_next;
+			new_widget = (GfxDynView *) new_widget->_next;
 
 		if (new_widget) {
 			int carry = old_widget->signal & _K_VIEW_SIG_FLAG_STOPUPD;
@@ -2146,20 +2146,20 @@
 			old_widget->signal = new_widget->signal |= carry;
 		}
 
-		old_widget = (gfxw_dyn_view_t *) old_widget->_next;
+		old_widget = (GfxDynView *) old_widget->_next;
 	}
 }
 
-static void _k_view_list_kryptonize(gfxw_widget_t *v) {
+static void _k_view_list_kryptonize(GfxWidget *v) {
 	if (v) {
 		v->_flags &= ~GFXW_FLAG_IMMUNE_TO_SNAPSHOTS;
 		_k_view_list_kryptonize(v->_next);
 	}
 }
 
-static void _k_raise_topmost_in_view_list(EngineState *s, gfxw_list_t *list, gfxw_dyn_view_t *view) {
+static void _k_raise_topmost_in_view_list(EngineState *s, GfxList *list, GfxDynView *view) {
 	if (view) {
-		gfxw_dyn_view_t *next = (gfxw_dyn_view_t *)view->_next;
+		GfxDynView *next = (GfxDynView *)view->_next;
 
 		// step 11
 		if ((view->signal & (_K_VIEW_SIG_FLAG_NO_UPDATE | _K_VIEW_SIG_FLAG_HIDDEN | _K_VIEW_SIG_FLAG_ALWAYS_UPDATE)) == 0) {
@@ -2184,8 +2184,8 @@
 	}
 }
 
-static void _k_redraw_view_list(EngineState *s, gfxw_list_t *list) {
-	gfxw_dyn_view_t *view = (gfxw_dyn_view_t *) list->contents;
+static void _k_redraw_view_list(EngineState *s, GfxList *list) {
+	GfxDynView *view = (GfxDynView *) list->contents;
 	while (view) {
 
 		SCIkdebug(SCIkGRAPHICS, "  dv["PREG"]: signal %04x\n", make_reg(view->_ID, view->_subID), view->signal);
@@ -2221,7 +2221,7 @@
 
 		SCIkdebug(SCIkGRAPHICS, "    -> signal %04x\n", view->signal);
 
-		view = (gfxw_dyn_view_t *) view->_next;
+		view = (GfxDynView *) view->_next;
 	}
 }
 
@@ -2235,9 +2235,9 @@
 // Draw as picviews
 #define _K_DRAW_VIEW_LIST_PICVIEW 8
 
-void _k_draw_view_list(EngineState *s, gfxw_list_t *list, int flags) {
+void _k_draw_view_list(EngineState *s, GfxList *list, int flags) {
 	// Draws list_nr members of list to s->pic.
-	gfxw_dyn_view_t *widget = (gfxw_dyn_view_t *) list->contents;
+	GfxDynView *widget = (GfxDynView *) list->contents;
 
 	if (GFXWC(s->port) != GFXWC(s->dyn_views->_parent))
 		return; // Return if the pictures are meant for a different port
@@ -2274,20 +2274,20 @@
 			  // disposeables and this one isn't disposeable
 		}
 
-		widget = (gfxw_dyn_view_t *) widget->_next;
+		widget = (GfxDynView *) widget->_next;
 	} // while (widget)
 
 }
 
 reg_t kAddToPic(EngineState *s, int funct_nr, int argc, reg_t *argv) {
-	gfxw_list_t *pic_views;
+	GfxList *pic_views;
 	reg_t list_ref = argv[0];
 
 	assert_primary_widget_lists(s);
 
 	if (argc > 1) {
 		int view, cel, loop, x, y, priority, control;
-		gfxw_widget_t *widget;
+		GfxWidget *widget;
 
 		view = KP_UINT(argv[0]);
 		loop = KP_UINT(argv[1]);
@@ -2308,7 +2308,7 @@
 				Common::Rect abs_zone = nsrect_clip(s, y, calculate_nsrect(s, x, y, view, loop, cel), priority);
 				draw_rect_to_control_map(s, abs_zone);
 			}
-			ADD_TO_CURRENT_PICTURE_PORT(gfxw_picviewize_dynview((gfxw_dyn_view_t *) widget));
+			ADD_TO_CURRENT_PICTURE_PORT(gfxw_picviewize_dynview((GfxDynView *) widget));
 		}
 	} else {
 		List *list;
@@ -2352,7 +2352,7 @@
 	switch (argc) {
 	case 1 : {
 		unsigned int port_nr = SKPV(0);
-		gfxw_port_t *new_port;
+		GfxPort *new_port;
 
 		/* We depart from official semantics here, sorry!
 		   Reasoning: Sierra SCI does not clip ports while we do.
@@ -2408,7 +2408,7 @@
 	int x = SKPV(3);
 	int y = SKPV(4);
 	int priority = SKPV_OR_ALT(5, -1);
-	gfxw_view_t *new_view;
+	GfxView *new_view;
 
 /*
 	if (!view) {
@@ -2435,8 +2435,8 @@
 
 reg_t kDisposeWindow(EngineState *s, int funct_nr, int argc, reg_t *argv) {
 	unsigned int goner_nr = SKPV(0);
-	gfxw_port_t *goner;
-	gfxw_port_t *pred;
+	GfxPort *goner;
+	GfxPort *pred;
 	int id = s->visual->port_refs_nr;
 
 	goner = gfxw_find_port(s->visual, goner_nr);
@@ -2446,7 +2446,7 @@
 	}
 
 	if (s->dyn_views && GFXWC(s->dyn_views->_parent) == GFXWC(goner)) {
-		reparentize_primary_widget_lists(s, (gfxw_port_t *) goner->_parent);
+		reparentize_primary_widget_lists(s, (GfxPort *) goner->_parent);
 	}
 
 	if (s->drop_views && GFXWC(s->drop_views->_parent) == GFXWC(goner))
@@ -2473,7 +2473,7 @@
 }
 
 reg_t kNewWindow(EngineState *s, int funct_nr, int argc, reg_t *argv) {
-	gfxw_port_t *window;
+	GfxPort *window;
 	int x, y, xl, yl, flags;
 	gfx_color_t bgcolor;
 	gfx_color_t fgcolor;
@@ -2998,7 +2998,7 @@
 		reparentize_primary_widget_lists(s, s->port);
 
 	if (cast_list) {
-		gfxw_list_t *templist = gfxw_new_list(s->dyn_views->_bounds, 0);
+		GfxList *templist = gfxw_new_list(s->dyn_views->_bounds, 0);
 
 		_k_make_view_list(s, &(templist), cast_list, (cycle ? _K_MAKE_VIEW_LIST_CYCLE : 0)
 		                  | _K_MAKE_VIEW_LIST_CALC_PRIORITY, funct_nr, argc, argv);
@@ -3028,7 +3028,7 @@
 		_k_update_signals_in_view_list(s->dyn_views, templist);
 		s->dyn_views->tag(GFXW(s->dyn_views));
 
-		_k_raise_topmost_in_view_list(s, s->dyn_views, (gfxw_dyn_view_t *)templist->contents);
+		_k_raise_topmost_in_view_list(s, s->dyn_views, (GfxDynView *)templist->contents);
 
 		templist->widfree(GFXW(templist));
 		s->dyn_views->free_tagged(GFXWC(s->dyn_views)); // Free obsolete dynviews
@@ -3052,7 +3052,7 @@
 		_k_view_list_do_postdraw(s, s->dyn_views);
 
 		// _k_view_list_dispose_loop() returns -1 if it requested a re-start, so we do just that.
-		while ((retval = _k_view_list_dispose_loop(s, cast_list, (gfxw_dyn_view_t *) s->dyn_views->contents, funct_nr, argc, argv) < 0))
+		while ((retval = _k_view_list_dispose_loop(s, cast_list, (GfxDynView *) s->dyn_views->contents, funct_nr, argc, argv) < 0))
 			reparentize = 1;
 
 		if (s->drop_views->contents) {
@@ -3136,7 +3136,7 @@
 	bool save_under = false;
 	gfx_color_t transparent = { PaletteEntry(), 0, -1, -1, 0 };
 	char *text;
-	gfxw_port_t *port = (s->port) ? s->port : s->picture_port;
+	GfxPort *port = (s->port) ? s->port : s->picture_port;
 	bool update_immediately = true;
 
 	gfx_color_t color0, *color1, bg_color;
@@ -3144,7 +3144,7 @@
 	rect_t area = gfx_rect(port->draw_pos.x, port->draw_pos.y, 320 - port->draw_pos.x, 200 - port->draw_pos.y);
 	int gray = port->gray_text;
 	int font_nr = port->font_nr;
-	gfxw_text_t *text_handle;
+	GfxText *text_handle;
 
 	color0 = port->_color;
 	bg_color = port->_bgcolor;

Modified: scummvm/trunk/engines/sci/engine/kmenu.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmenu.cpp	2009-04-24 10:45:09 UTC (rev 40103)
+++ scummvm/trunk/engines/sci/engine/kmenu.cpp	2009-04-24 10:46:20 UTC (rev 40104)
@@ -28,7 +28,7 @@
 #include "sci/engine/kernel.h"
 #include "sci/gfx/gfx_gui.h"
 #include "sci/gfx/menubar.h"
-#include "sci/gfx/gfx_state_internal.h"	// required for gfxw_port_t, gfxw_visual_t
+#include "sci/gfx/gfx_state_internal.h"	// required for GfxPort, GfxVisual
 
 namespace Sci {
 
@@ -184,7 +184,7 @@
 	if (menu_mode) {
 		int old_item;
 		int old_menu;
-		gfxw_port_t *port = NULL;
+		GfxPort *port = NULL;
 
 		item_nr = -1;
 

Modified: scummvm/trunk/engines/sci/engine/kpathing.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kpathing.cpp	2009-04-24 10:45:09 UTC (rev 40103)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp	2009-04-24 10:46:20 UTC (rev 40104)
@@ -26,7 +26,7 @@
 #include "sci/engine/state.h"
 #include "sci/engine/kernel.h"
 #include "sci/gfx/gfx_widgets.h"
-#include "sci/gfx/gfx_state_internal.h"	// required for gfxw_port_t, gfxw_container_t
+#include "sci/gfx/gfx_state_internal.h"	// required for GfxPort, GfxContainer
 
 #include "common/list.h"
 
@@ -319,8 +319,8 @@
 	// Yellow: Contained access
 	int poly_colors[][3] = {{0, 255, 0}, {0, 0, 255}, {255, 0, 0}, {255, 255, 0}};
 	gfx_color_t col;
-	gfxw_list_t *decorations = s->picture_port->decorations;
-	gfxw_primitive_t *line;
+	GfxList *decorations = s->picture_port->decorations;
+	GfxPrimitive *line;
 
 	col.visual = PaletteEntry(poly_colors[type][0], poly_colors[type][1], poly_colors[type][2]);
 	col.alpha = 0;
@@ -332,7 +332,7 @@
 	p2.y += 10;
 
 	line = gfxw_new_line(p1, p2, col, GFX_LINE_MODE_CORRECT, GFX_LINE_STYLE_NORMAL);
-	decorations->add((gfxw_container_t *)decorations, (gfxw_widget_t *)line);
+	decorations->add((GfxContainer *)decorations, (GfxWidget *)line);
 }
 
 static void draw_point(EngineState *s, Common::Point p, int start) {
@@ -341,8 +341,8 @@
 	// Blue: Starting point
 	int point_colors[][3] = {{0, 255, 0}, {0, 0, 255}};
 	gfx_color_t col;
-	gfxw_list_t *decorations = s->picture_port->decorations;
-	gfxw_box_t *box;
+	GfxList *decorations = s->picture_port->decorations;
+	GfxBox *box;
 
 	col.visual = PaletteEntry(point_colors[start][0], point_colors[start][1], point_colors[start][2]);
 	col.alpha = 0;
@@ -351,7 +351,7 @@
 	col.mask = GFX_MASK_VISUAL | GFX_MASK_PRIORITY;
 
 	box = gfxw_new_box(s->gfx_state, gfx_rect(p.x - 1, p.y - 1 + 10, 3, 3), col, col, GFX_BOX_SHADE_FLAT);
-	decorations->add((gfxw_container_t *) decorations, (gfxw_widget_t *) box);
+	decorations->add((GfxContainer *) decorations, (GfxWidget *) box);
 }
 
 static void draw_polygon(EngineState *s, reg_t polygon) {
@@ -1539,7 +1539,7 @@
 	Common::Point start = Common::Point(SKPV(0), SKPV(1));
 
 	if (s->debug_mode & (1 << SCIkAVOIDPATH_NR)) {
-		gfxw_port_t *port = s->picture_port;
+		GfxPort *port = s->picture_port;
 
 		if (!port->decorations) {
 			port->decorations = gfxw_new_list(gfx_rect(0, 0, 320, 200), 0);

Modified: scummvm/trunk/engines/sci/engine/kscripts.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kscripts.cpp	2009-04-24 10:45:09 UTC (rev 40103)
+++ scummvm/trunk/engines/sci/engine/kscripts.cpp	2009-04-24 10:46:20 UTC (rev 40104)
@@ -218,7 +218,7 @@
 	}
 #if 0
 	if (s->dyn_views) {  // Free any widget associated with the clone
-		gfxw_widget_t *widget = gfxw_set_id(gfxw_remove_ID(s->dyn_views, offset), GFXW_NO_ID);
+		GfxWidget *widget = gfxw_set_id(gfxw_remove_ID(s->dyn_views, offset), GFXW_NO_ID);
 
 		if (widget && s->bg_widgets)
 			s->bg_widgets->add(GFXWC(s->bg_widgets), widget);

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2009-04-24 10:45:09 UTC (rev 40103)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2009-04-24 10:46:20 UTC (rev 40104)
@@ -33,7 +33,7 @@
 #include "sci/sci_memory.h"
 #include "sci/gfx/operations.h"
 #include "sci/gfx/menubar.h"
-#include "sci/gfx/gfx_state_internal.h"	// required for gfxw_port_t, gfxw_container_t
+#include "sci/gfx/gfx_state_internal.h"	// required for GfxPort, GfxContainer
 #include "sci/sfx/core.h"
 #include "sci/sfx/iterator.h"
 #include "sci/engine/state.h"

Modified: scummvm/trunk/engines/sci/engine/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-04-24 10:45:09 UTC (rev 40103)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-04-24 10:46:20 UTC (rev 40104)
@@ -34,7 +34,7 @@
 #include "sci/engine/savegame.h"
 #include "sci/gfx/gfx_widgets.h"
 #include "sci/gfx/gfx_gui.h"
-#include "sci/gfx/gfx_state_internal.h"	// required for gfxw_container_t, gfxw_port_t, gfxw_visual_t
+#include "sci/gfx/gfx_state_internal.h"	// required for GfxContainer, GfxPort, GfxVisual
 #include "sci/scicore/resource.h"
 #include "sci/scicore/sciconsole.h"
 #include "sci/scicore/vocabulary.h"
@@ -1669,7 +1669,7 @@
 }
 
 static int c_gfx_print_port(EngineState *s) {
-	gfxw_port_t *port;
+	GfxPort *port;
 
 	if (!_debugstate_valid) {
 		sciprintf("Not in debug state\n");
@@ -1781,7 +1781,7 @@
 }
 
 #ifdef GFXW_DEBUG_WIDGETS
-extern gfxw_widget_t *debug_widgets[];
+extern GfxWidget *debug_widgets[];
 extern int debug_widget_pos;
 
 static int c_gfx_print_widget(EngineState *s) {

Modified: scummvm/trunk/engines/sci/engine/state.h
===================================================================
--- scummvm/trunk/engines/sci/engine/state.h	2009-04-24 10:45:09 UTC (rev 40103)
+++ scummvm/trunk/engines/sci/engine/state.h	2009-04-24 10:46:20 UTC (rev 40104)
@@ -51,10 +51,10 @@
 struct kfunct_sig_pair_t;	// from kernel.h
 
 struct gfx_state_t;
-struct gfxw_port_t;
-struct gfxw_visual_t;
-struct gfxw_container_t;	
-struct gfxw_list_t;
+struct GfxPort;
+struct GfxVisual;
+struct GfxContainer;	
+struct GfxList;
 
 
 class DirSeeker {
@@ -161,25 +161,25 @@
 	int save_mouse_pointer_cel; /* Temporary storage for mouse pointer resource, when the pointer is hidden */
 
 	int port_serial; /* Port serial number, for save/restore */
-	gfxw_port_t *port; /* The currently active port */
+	GfxPort *port; /* The currently active port */
 
 	gfx_color_t ega_colors[16]; /* The 16 EGA colors- for SCI0(1) */
 
-	gfxw_visual_t *visual; /* A visual widget, containing all ports */
+	GfxVisual *visual; /* A visual widget, containing all ports */
 
-	gfxw_port_t *titlebar_port; /* Title bar viewport (0,0,9,319) */
-	gfxw_port_t *wm_port; /* window manager viewport and designated &heap[0] view (10,0,199,319) */
-	gfxw_port_t *picture_port; /* The background picture viewport (10,0,199,319) */
-	gfxw_port_t *iconbar_port; /* Full-screen port used for non-clipped icon bar draw in SCI1 */
+	GfxPort *titlebar_port; /* Title bar viewport (0,0,9,319) */
+	GfxPort *wm_port; /* window manager viewport and designated &heap[0] view (10,0,199,319) */
+	GfxPort *picture_port; /* The background picture viewport (10,0,199,319) */
+	GfxPort *iconbar_port; /* Full-screen port used for non-clipped icon bar draw in SCI1 */
 
 	gfx_map_mask_t pic_visible_map; /* The number of the map to display in update commands */
 	int pic_animate; /* The animation used by Animate() to display the picture */
 
 	int dyn_views_list_serial; /* Used for save/restore */
-	gfxw_list_t *dyn_views; /* Pointers to pic and dynamic view lists */
+	GfxList *dyn_views; /* Pointers to pic and dynamic view lists */
 
 	int drop_views_list_serial; /* Used for save/restore */
-	gfxw_list_t *drop_views; /* A list Animate() can dump dropped dynviews into */
+	GfxList *drop_views; /* A list Animate() can dump dropped dynviews into */
 
 	long animation_delay; /* A delay factor for pic opening animations. Defaults to 500. */
 	int animation_granularity; /* Number of animation steps to perform betwen updates for transition animations */

Modified: scummvm/trunk/engines/sci/gfx/gfx_gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_gui.cpp	2009-04-24 10:45:09 UTC (rev 40103)
+++ scummvm/trunk/engines/sci/gfx/gfx_gui.cpp	2009-04-24 10:46:20 UTC (rev 40104)
@@ -38,7 +38,7 @@
 #define SCI_SPECIAL_CHAR_ARROW_UP 0x18
 #define SCI_SPECIAL_CHAR_ARROW_DOWN 0x19
 
-static void clear_titlebar(gfxw_port_t *titlebar) {
+static void clear_titlebar(GfxPort *titlebar) {
 	if (titlebar->contents) {
 		titlebar->contents->widfree(titlebar->contents);
 		titlebar->contents = NULL;
@@ -46,35 +46,35 @@
 	}
 }
 
-static gfxw_list_t *make_titlebar_list(EngineState *s, rect_t bounds, gfxw_port_t *status_bar) {
+static GfxList *make_titlebar_list(EngineState *s, rect_t bounds, GfxPort *status_bar) {
 	gfx_color_t color = status_bar->_bgcolor;
-	gfxw_list_t *list;
-	gfxw_box_t *bgbox;
+	GfxList *list;
+	GfxBox *bgbox;
 
 
 	list = gfxw_new_list(status_bar->_bounds, 0);
 	bgbox = gfxw_new_box(s->gfx_state, gfx_rect(0, 0, status_bar->_bounds.width, status_bar->_bounds.height - 1),
 	                     color, color, GFX_BOX_SHADE_FLAT);
 
-	list->add((gfxw_container_t *) list, (gfxw_widget_t *) bgbox);
+	list->add((GfxContainer *) list, (GfxWidget *) bgbox);
 
 	return list;
 }
 
-static gfxw_list_t *finish_titlebar_list(EngineState *s, gfxw_list_t *list, gfxw_port_t *status_bar) {
+static GfxList *finish_titlebar_list(EngineState *s, GfxList *list, GfxPort *status_bar) {
 	gfx_color_t black = s->ega_colors[0];
-	gfxw_primitive_t *line;
+	GfxPrimitive *line;
 
 	line = gfxw_new_line(Common::Point(0, status_bar->_bounds.height - 1), Common::Point(status_bar->_bounds.width, status_bar->_bounds.height - 1),
 	                     black, GFX_LINE_MODE_CORRECT, GFX_LINE_STYLE_NORMAL);
-	list->add((gfxw_container_t *)list, (gfxw_widget_t *)line);
+	list->add((GfxContainer *)list, (GfxWidget *)line);
 
 	return list;
 }
 
-void sciw_set_status_bar(EngineState *s, gfxw_port_t *status_bar, const Common::String &text, int fgcolor, int bgcolor) {
+void sciw_set_status_bar(EngineState *s, GfxPort *status_bar, const Common::String &text, int fgcolor, int bgcolor) {
 	gfx_state_t *state;
-	gfxw_list_t *list;
+	GfxList *list;
 	gfx_color_t bg = status_bar->_bgcolor;
 	gfx_color_t fg = status_bar->_color;
 	gfx_color_t black = s->ega_colors[0];
@@ -94,21 +94,21 @@
 	clear_titlebar(status_bar);
 
 	if (!text.empty()) {
-		gfxw_text_t *textw = gfxw_new_text(state, gfx_rect(0, 0, status_bar->_bounds.width, status_bar->_bounds.height),
+		GfxText *textw = gfxw_new_text(state, gfx_rect(0, 0, status_bar->_bounds.width, status_bar->_bounds.height),
 		                                   status_bar->font_nr, text.c_str(), ALIGN_LEFT, ALIGN_CENTER,
 		                                   fg, fg, bg, kFontNoNewlines);
 
 		list = make_titlebar_list(s, status_bar->_bounds, status_bar);
 
-		list->add((gfxw_container_t *)list, (gfxw_widget_t *)textw);
+		list->add((GfxContainer *)list, (GfxWidget *)textw);
 
 	} else {
-		gfxw_box_t *bgbox = gfxw_new_box(state, gfx_rect(0, 0, status_bar->_bounds.width, status_bar->_bounds.height - 1),
+		GfxBox *bgbox = gfxw_new_box(state, gfx_rect(0, 0, status_bar->_bounds.width, status_bar->_bounds.height - 1),
 		                                 black, black, GFX_BOX_SHADE_FLAT);
 
 		list = gfxw_new_list(status_bar->_bounds, 0);
 
-		list->add((gfxw_container_t *)list, (gfxw_widget_t *)bgbox);
+		list->add((GfxContainer *)list, (GfxWidget *)bgbox);
 	}
 
 	list->add(GFXWC(status_bar), GFXW(list));
@@ -118,7 +118,7 @@
 	gfxop_update(state);
 }
 
-static void sciw_make_window_fit(rect_t *rect, gfxw_port_t *parent) {
+static void sciw_make_window_fit(rect_t *rect, GfxPort *parent) {
 	// This window is meant to cover the whole screen, so we allow it to go through.
 	if (rect->width == 319 && rect->height == 189) return;
 
@@ -129,19 +129,19 @@
 		rect->y -= (rect->y + rect->height) - (parent->_bounds.y + parent->_bounds.height) + 2;
 }
 
-gfxw_port_t *sciw_new_window(EngineState *s,
+GfxPort *sciw_new_window(EngineState *s,
 		rect_t area, int font,
 		gfx_color_t color, gfx_color_t bgcolor,
 		int title_font, gfx_color_t title_color, gfx_color_t title_bgcolor,
 		const char *title, int flags) {
-	gfxw_visual_t *visual = s->visual;
+	GfxVisual *visual = s->visual;
 	gfx_state_t *state = s->gfx_state;
 	int shadow_offset = 2;
 	rect_t frame;
 	gfx_color_t black;
 	gfxop_set_color(state, &black, 0, 0, 0, 0, 0, 0);
-	gfxw_port_t *win;
-	gfxw_list_t *decorations;
+	GfxPort *win;
+	GfxList *decorations;
 //	int xextra = !(flags & kWindowNoFrame) ? 1 : 0;
 //	int yextra = !(flags & kWindowNoFrame) ? 2 : 0;
 
@@ -196,9 +196,9 @@
 
 	if (!(flags & kWindowTransparent)) {
 		// Draw window background
-		win->port_bg = (gfxw_widget_t *)gfxw_new_box(state, gfx_rect(1, (flags & kWindowTitle) ? 10 : 1,
+		win->port_bg = (GfxWidget *)gfxw_new_box(state, gfx_rect(1, (flags & kWindowTitle) ? 10 : 1,
 		                        area.width, area.height), bgcolor, bgcolor, GFX_BOX_SHADE_FLAT);
-		decorations->add((gfxw_container_t *) decorations, win->port_bg);
+		decorations->add((GfxContainer *) decorations, win->port_bg);
 		win->_flags |= GFXW_FLAG_OPAQUE;
 	}
 
@@ -206,10 +206,10 @@
 		// Add window title
 		rect_t title_rect = gfx_rect(1, 1, area.width, 8);
 
-		decorations->add((gfxw_container_t *)decorations, (gfxw_widget_t *)
+		decorations->add((GfxContainer *)decorations, (GfxWidget *)
 						gfxw_new_box(state, title_rect, title_bgcolor, title_bgcolor, GFX_BOX_SHADE_FLAT));
 
-		decorations->add((gfxw_container_t *)decorations, (gfxw_widget_t *)
+		decorations->add((GfxContainer *)decorations, (GfxWidget *)
 						gfxw_new_text(state, title_rect, title_font, title, ALIGN_CENTER, ALIGN_CENTER, title_color, title_color,
 						title_bgcolor, kFontNoNewlines));
 	}
@@ -223,11 +223,11 @@
 				return NULL;
 			}
 
-			decorations->add((gfxw_container_t *)decorations, (gfxw_widget_t *)
+			decorations->add((GfxContainer *)decorations, (GfxWidget *)
 			                 gfxw_new_box(state, gfx_rect(shadow_offset + 1, frame.height - 1,
 							 frame.width - 4, shadow_offset), black, black, GFX_BOX_SHADE_FLAT));
 
-			decorations->add((gfxw_container_t *)decorations, (gfxw_widget_t *)
+			decorations->add((GfxContainer *)decorations, (GfxWidget *)
 			                 gfxw_new_box(state, gfx_rect(frame.width - 1, shadow_offset + 1,
 							 shadow_offset, frame.height - 2), black, black, GFX_BOX_SHADE_FLAT));
 		}
@@ -241,14 +241,14 @@
 
 		if (!(flags & kWindowNoDropShadow)) {
 
-			decorations->add((gfxw_container_t *)decorations, (gfxw_widget_t *)
+			decorations->add((GfxContainer *)decorations, (GfxWidget *)
 			                 gfxw_new_rect(gfx_rect(0, 0, frame.width - 1, frame.height - 1), black, GFX_LINE_MODE_FINE, GFX_LINE_STYLE_NORMAL));
 
 			if (flags & kWindowTitle)
-				decorations->add((gfxw_container_t *)decorations, (gfxw_widget_t *)gfxw_new_line(Common::Point(1, 9),
+				decorations->add((GfxContainer *)decorations, (GfxWidget *)gfxw_new_line(Common::Point(1, 9),
 									Common::Point(frame.width - 2, 9), black, GFX_LINE_MODE_CORRECT, GFX_LINE_STYLE_NORMAL));
 		} else {
-			decorations->add((gfxw_container_t *)decorations, (gfxw_widget_t *)
+			decorations->add((GfxContainer *)decorations, (GfxWidget *)
 			                 gfxw_new_rect(gfx_rect(0, 0, frame.width, frame.height),  black, GFX_LINE_MODE_FINE, GFX_LINE_STYLE_NORMAL));
 		}
 	}
@@ -265,7 +265,7 @@
 	return gfx_rect(rect.x + point.x, rect.y + point.y, rect.width + 1, rect.height + yplus);
 }
 
-gfxw_list_t *_sciw_add_text_to_list(gfxw_list_t *list, gfxw_port_t *port, rect_t zone, char *text,
+GfxList *_sciw_add_text_to_list(GfxList *list, GfxPort *port, rect_t zone, char *text,
 	int font, gfx_alignment_t align, char framed, char inverse, int flags, char gray_text) {
 	gfx_color_t *color1, *color2, *bgcolor;
 
@@ -293,9 +293,9 @@
 	return list;
 }
 
-gfxw_list_t *sciw_new_button_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int font, char selected, char inverse, char grayed_out) {
+GfxList *sciw_new_button_control(GfxPort *port, reg_t ID, rect_t zone, char *text, int font, char selected, char inverse, char grayed_out) {
 	gfx_color_t *frame_col = (inverse) ? &(port->_bgcolor) : &(port->_color);
-	gfxw_list_t *list;
+	GfxList *list;
 
 	zone.x--;
 	zone.y--;
@@ -331,9 +331,9 @@
 	return list;
 }
 
-gfxw_list_t *sciw_new_text_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int font,
+GfxList *sciw_new_text_control(GfxPort *port, reg_t ID, rect_t zone, char *text, int font,
 								   gfx_alignment_t align, char framed, char inverse) {
-	gfxw_list_t *list = gfxw_new_list(_move_and_extend_rect(zone, Common::Point(port->zone.x, port->zone.y), 2), 0);
+	GfxList *list = gfxw_new_list(_move_and_extend_rect(zone, Common::Point(port->zone.x, port->zone.y), 2), 0);
 
 	gfxw_set_id(GFXW(list), ID.segment, ID.offset);
 
@@ -343,11 +343,11 @@
 	return _sciw_add_text_to_list(list, port, zone, text, font, align, framed, inverse, 0, port->gray_text);
 }
 
-gfxw_list_t *sciw_new_edit_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int font, unsigned int cursor,
+GfxList *sciw_new_edit_control(GfxPort *port, reg_t ID, rect_t zone, char *text, int font, unsigned int cursor,
 								   char inverse) {
-	gfxw_text_t *text_handle;
+	GfxText *text_handle;
 
-	gfxw_list_t *list;
+	GfxList *list;
 	int cursor_height = gfxop_get_font_height(port->_visual->gfx_state, font);
 
 	zone.x--;
@@ -410,10 +410,10 @@
 	return list;
 }
 
-gfxw_list_t *sciw_new_icon_control(gfxw_port_t *port, reg_t ID, rect_t zone, int view, int loop, int cel,
+GfxList *sciw_new_icon_control(GfxPort *port, reg_t ID, rect_t zone, int view, int loop, int cel,
 	char frame, char inverse) {
-	gfxw_list_t *list = gfxw_new_list(_move_and_extend_rect(zone, Common::Point(port->zone.x, port->zone.y), 1), 0);
-	gfxw_widget_t *icon;
+	GfxList *list = gfxw_new_list(_move_and_extend_rect(zone, Common::Point(port->zone.x, port->zone.y), 1), 0);
+	GfxWidget *icon;
 	gfxw_set_id(GFXW(list), ID.segment, ID.offset);
 
 	if (!port->_visual) {
@@ -439,9 +439,9 @@
 	return list;
 }
 
-gfxw_list_t *sciw_new_list_control(gfxw_port_t *port, reg_t ID, rect_t zone, int font_nr, char **entries_list,
+GfxList *sciw_new_list_control(GfxPort *port, reg_t ID, rect_t zone, int font_nr, char **entries_list,
 	int entries_nr, int list_top, int selection, char inverse) {
-	gfxw_list_t *list;
+	GfxList *list;
 
 	char arr_up[2], arr_down[2];
 	int i;
@@ -526,8 +526,8 @@
 	return list;
 }
 
-void sciw_set_menubar(EngineState *s, gfxw_port_t *status_bar, Menubar *menubar, int selection) {
-	gfxw_list_t *list = make_titlebar_list(s, status_bar->_bounds, status_bar);
+void sciw_set_menubar(EngineState *s, GfxPort *status_bar, Menubar *menubar, int selection) {
+	GfxList *list = make_titlebar_list(s, status_bar->_bounds, status_bar);
 	int offset = MENU_LEFT_BORDER;
 	int i;
 
@@ -554,8 +554,8 @@
 	finish_titlebar_list(s, list, status_bar);
 }
 
-gfxw_port_t *sciw_new_menu(EngineState *s, gfxw_port_t *status_bar, Menubar *menubar, int selection) {
-	gfxw_port_t *retval;
+GfxPort *sciw_new_menu(EngineState *s, GfxPort *status_bar, Menubar *menubar, int selection) {
+	GfxPort *retval;
 	Menu *menu = &menubar->_menus[selection];
 	rect_t area = gfx_rect(MENU_LEFT_BORDER, 10, 0, 0);
 	int i;
@@ -594,10 +594,10 @@
 	return col;
 }
 
-gfxw_widget_t *_make_menu_entry(MenuItem *item, int offset, int width, gfxw_port_t *port, gfx_color_t color, gfx_color_t bgcolor, int ID, int gray) {
+GfxWidget *_make_menu_entry(MenuItem *item, int offset, int width, GfxPort *port, gfx_color_t color, gfx_color_t bgcolor, int ID, int gray) {
 	rect_t area = gfx_rect(MENU_BOX_LEFT_PADDING, 0, width - MENU_BOX_LEFT_PADDING, 10);
 	rect_t list_area = gfx_rect(port->zone.x, area.y + offset + port->zone.y, width, area.height);
-	gfxw_list_t *list = (gfxw_list_t *) gfxw_set_id(GFXW(gfxw_new_list(list_area, 0)), ID, GFXW_NO_ID);
+	GfxList *list = (GfxList *) gfxw_set_id(GFXW(gfxw_new_list(list_area, 0)), ID, GFXW_NO_ID);
 	gfx_color_t xcolor = { PaletteEntry(), 0, 0, 0, 0};
 
 	color = un_prioritize(color);
@@ -618,10 +618,10 @@
 	return GFXW(list);
 }
 
-gfxw_widget_t *_make_menu_hbar(int offset, int width, gfxw_port_t *port, gfx_color_t color, gfx_color_t bgcolor, int ID) {
+GfxWidget *_make_menu_hbar(int offset, int width, GfxPort *port, gfx_color_t color, gfx_color_t bgcolor, int ID) {
 	rect_t area = gfx_rect(0, 0, width, 10);
 	rect_t list_area = gfx_rect(area.x + port->zone.x, area.y + offset + port->zone.y, area.width, area.height);
-	gfxw_list_t *list = (gfxw_list_t *) gfxw_set_id(GFXW(gfxw_new_list(list_area, 0)), ID, GFXW_NO_ID);
+	GfxList *list = (GfxList *) gfxw_set_id(GFXW(gfxw_new_list(list_area, 0)), ID, GFXW_NO_ID);
 
 	color = un_prioritize(color);
 	bgcolor = un_prioritize(bgcolor);
@@ -633,7 +633,7 @@
 	return GFXW(list);
 }
 
-gfxw_port_t *sciw_toggle_item(gfxw_port_t *menu_port, Menu *menu, int selection, bool selected) {
+GfxPort *sciw_toggle_item(GfxPort *menu_port, Menu *menu, int selection, bool selected) {
 	if (selection < 0 || selection >= (int)menu->_items.size())
 		return menu_port;
 

Modified: scummvm/trunk/engines/sci/gfx/gfx_gui.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_gui.h	2009-04-24 10:45:09 UTC (rev 40103)
+++ scummvm/trunk/engines/sci/gfx/gfx_gui.h	2009-04-24 10:46:20 UTC (rev 40104)
@@ -53,15 +53,15 @@
 	kControlStateDitherFramed = 0x1000   // 0001 0000 0000 0000 - widgets surrounded by a dithered frame (used in kgraphics)
 };
 
-void sciw_set_status_bar(EngineState *s, gfxw_port_t *status_bar, const Common::String &text, int fgcolor, int bgcolor);
+void sciw_set_status_bar(EngineState *s, GfxPort *status_bar, const Common::String &text, int fgcolor, int bgcolor);
 /* Sets the contents of a port used as status bar
 ** Parmeters: (EngineState *) s: The affected game state
-**            (gfxw_port_t *) status_bar: The status bar port
+**            (GfxPort *) status_bar: The status bar port
 **            (const char *) text: The text to draw
 ** Returns  : (void)
 */
 
-gfxw_port_t *sciw_new_window(EngineState *s, rect_t area, int font, gfx_color_t color, gfx_color_t bgcolor,
+GfxPort *sciw_new_window(EngineState *s, rect_t area, int font, gfx_color_t color, gfx_color_t bgcolor,
 	int title_font, gfx_color_t title_color, gfx_color_t title_bg_color,
 	const char *title, int flags);
 /* Creates a new SCI style window
@@ -75,16 +75,16 @@
 **             (gfx_color_t) title_bg_color: Color to use for the title bar background
 **             (const char *) title: The text to write into the title bar
 **             (int) flags: Any ORred combination of window flags
-** Returns   : (gfxw_port_t *) A newly allocated port with the requested characteristics
+** Returns   : (GfxPort *) A newly allocated port with the requested characteristics
 */
 
 /*---------------------*/
 /*** Control widgets ***/
 /*---------------------*/
 
-gfxw_list_t *sciw_new_button_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int font, char selected, char inverse, char gray);
+GfxList *sciw_new_button_control(GfxPort *port, reg_t ID, rect_t zone, char *text, int font, char selected, char inverse, char gray);
 /* Creates a new button control list
-** Parameters: (gfxw_port_t *) port: The port containing the color values to use for the
+** Parameters: (GfxPort *) port: The port containing the color values to use for the
 **                                   button (the button is /not/ appended to the port there)
 **             (reg_t) ID: Button's ID
 **             (rect_t) zone: The area occupied by the button
@@ -93,13 +93,13 @@
 **             (char) selected: Whether the button should be marked as being selected by the keyboard focus
 **             (char) inverse: Whether to inverse the color scheme
 **             (char) gray: Whether the button should be grayed out
-** Returns   : (gfxw_list_t *) The button
+** Returns   : (GfxList *) The button
 */
 
-gfxw_list_t *sciw_new_text_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int font,
+GfxList *sciw_new_text_control(GfxPort *port, reg_t ID, rect_t zone, char *text, int font,
 	gfx_alignment_t align, char frame, char inverse);
 /* Creates a new text control list
-** Parameters: (gfxw_port_t *) port: The port containing the color values to use
+** Parameters: (GfxPort *) port: The port containing the color values to use
 **             (reg_t) ID: Text widget ID
 **             (rect_t) zone: Area occupied by the text
 **             (char *) text: The text
@@ -107,38 +107,38 @@
 **             (gfx_alignment_t) align: Horizontal text alignment to use
 **             (char) frame: Whether a dithered frame should surround the text
 **             (char) inverse: Whether the text colors should be inversed
-** Returns   : (gfxw_list_t *) The text control widget list
+** Returns   : (GfxList *) The text control widget list
 */
 
-gfxw_list_t *sciw_new_edit_control(gfxw_port_t *port, reg_t ID, rect_t zone, char *text, int font, unsigned int cursor,
+GfxList *sciw_new_edit_control(GfxPort *port, reg_t ID, rect_t zone, char *text, int font, unsigned int cursor,
 	char inverse);
 /* Creates a new edit control list
-** Parameters: (gfxw_port_t *) port: The port containing the color values to use
+** Parameters: (GfxPort *) port: The port containing the color values to use
 **             (reg_t) ID: Text widget ID
 **             (rect_t) zone: Area occupied by the text
 **             (char *) text: The text
 **             (int) font: The font the text is to be drawn in
 **             (int) cursor: Cursor position
 **             (char) inverse: Whether the edit widget should be reversed
-** Returns   : (gfxw_list_t *) An appropriate widget list
+** Returns   : (GfxList *) An appropriate widget list
 */
 
-gfxw_list_t *sciw_new_icon_control(gfxw_port_t *port, reg_t ID, rect_t zone, int view, int loop, int cel,
+GfxList *sciw_new_icon_control(GfxPort *port, reg_t ID, rect_t zone, int view, int loop, int cel,
 	char frame, char inverse);
 /* Creates a new icon control list
-** Parameters: (gfxw_port_t *) port: The port containing the color values to use
+** Parameters: (GfxPort *) port: The port containing the color values to use
 **             (reg_t) ID: Text widget ID
 **             (rect_t) zone: Area occupied by the text
 **             (int x int x int) view, loop, cel: The cel to display
 **             (char) frame: Whether the widget should be surrounded by a frame
 **             (char) lina inverse: Whether colors should be inversed
-** Returns   : (gfxw_list_t *) An appropriate widget list
+** Returns   : (GfxList *) An appropriate widget list
 */
 
-gfxw_list_t *sciw_new_list_control(gfxw_port_t *port, reg_t ID, rect_t zone, int font_nr, char **entries_list,
+GfxList *sciw_new_list_control(GfxPort *port, reg_t ID, rect_t zone, int font_nr, char **entries_list,
 	int entries_nr, int list_top, int selection, char inverse);
 /* Creates a new list control list
-** Parameters: (gfxw_port_t *) port: The port containing the color values to use
+** Parameters: (GfxPort *) port: The port containing the color values to use
 **             (int) ID: Text widget ID
 **             (rect_t) zone: Area occupied by the text
 **             (int) font_nr: number of the font to use
@@ -147,38 +147,38 @@
 **             (int) list_top: First list item that is visible
 **             (int) selection: The list item that is selected
 **             (char) invserse: The usual meaning
-** Returns   : (gfxw_list_t *) An appropriate widget list
+** Returns   : (GfxList *) An appropriate widget list
 */
 
 /*---------------------*/
 /*** Menubar widgets ***/
 /*---------------------*/
 
-void sciw_set_menubar(EngineState *s, gfxw_port_t *status_bar, Menubar *menubar, int selection);
+void sciw_set_menubar(EngineState *s, GfxPort *status_bar, Menubar *menubar, int selection);
 /* Draws the menu bar
 ** Parameters: (EngineState *) s: The state to operate on
-**             (gfxw_port_t *) status_bar: The status bar port to modify
+**             (GfxPort *) status_bar: The status bar port to modify
 **             (Menubar *) menubar: The menu bar to use
 **             (int) selection: Number of the menu to hightlight, or -1 for 'none'
 ** Returns   : (void)
 */
 
-gfxw_port_t *sciw_new_menu(EngineState *s, gfxw_port_t *status_bar, Menubar *menubar, int selection);
+GfxPort *sciw_new_menu(EngineState *s, GfxPort *status_bar, Menubar *menubar, int selection);
 /* Creates a menu port
 ** Parameters: (EngineState *) s: The state to operate on
-**             (gfxw_port_t *) status_bar: The status bar
+**             (GfxPort *) status_bar: The status bar
 **             (Menubar *) menubar: The menu bar to use
 **             (int) selection: Number of the menu to interpret
-** Returns   : (gfxw_port_t *) The result port
+** Returns   : (GfxPort *) The result port
 */
 
-gfxw_port_t *sciw_toggle_item(gfxw_port_t *menu_port, Menu *menu, int selection, bool selected);
+GfxPort *sciw_toggle_item(GfxPort *menu_port, Menu *menu, int selection, bool selected);
 /* Toggle the selection of a menu item from a menu port
-** Parameters: (gfxw_port_t *) menu_port: The port to modify
+** Parameters: (GfxPort *) menu_port: The port to modify
 **             (Menu *) menu: The menu the menu port corresponds to
 **             (int) selection: Number of the menu entry to unselect, or -1 to do a NOP
 **             (bool) selected: Whether to set the item's state to selected or not
-** Returns   : (gfxw_port_t *) The modified menu
+** Returns   : (GfxPort *) The modified menu
 */
 
 } // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/gfx_state_internal.h
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_state_internal.h	2009-04-24 10:45:09 UTC (rev 40103)
+++ scummvm/trunk/engines/sci/gfx/gfx_state_internal.h	2009-04-24 10:46:20 UTC (rev 40104)
@@ -75,28 +75,28 @@
 
 #define GFXW_NO_ID -1
 
-struct gfxw_widget_t;
-struct gfxw_container_t;
-struct gfxw_visual_t;
-struct gfxw_port_t;
+struct GfxWidget;
+struct GfxContainer;
+struct GfxVisual;
+struct GfxPort;
 
-typedef int gfxw_point_op(gfxw_widget_t *, Common::Point);
-typedef int gfxw_visual_op(gfxw_widget_t *, gfxw_visual_t *);
-typedef int gfxw_op(gfxw_widget_t *);
-typedef int gfxw_op_int(gfxw_widget_t *, int);
-typedef int gfxw_bin_op(gfxw_widget_t *, gfxw_widget_t *);
+typedef int gfxw_point_op(GfxWidget *, Common::Point);
+typedef int gfxw_visual_op(GfxWidget *, GfxVisual *);
+typedef int gfxw_op(GfxWidget *);
+typedef int gfxw_op_int(GfxWidget *, int);
+typedef int gfxw_bin_op(GfxWidget *, GfxWidget *);
 
-struct gfxw_widget_t {
+struct GfxWidget {
 	int _magic; /* Extra check after typecasting */
 	int _serial; /* Serial number */
 	int _flags; /* Widget flags */
 	gfxw_widget_type_t _type;
 	rect_t _bounds; /* Boundaries */
-	gfxw_widget_t *_next; /* Next widget in widget list */
+	GfxWidget *_next; /* Next widget in widget list */
 	int _ID; /* Unique ID or GFXW_NO_ID */
 	int _subID; /* A 'sub-ID', or GFXW_NO_ID */
-	gfxw_container_t *_parent; /* The parent widget, or NULL if not owned */
-	gfxw_visual_t *_visual; /* The owner visual */
+	GfxContainer *_parent; /* The parent widget, or NULL if not owned */
+	GfxVisual *_visual; /* The owner visual */
 	int _widgetPriority; /* Drawing priority, or -1 */
 
 public:
@@ -111,26 +111,26 @@
 	gfxw_bin_op *superarea_of; /* a superarea_of b <=> for each pixel of b there exists an opaque pixel in a at the same location */
 	gfxw_visual_op *set_visual; /* Sets the visual the widget belongs to */
 
-	gfxw_widget_t(gfxw_widget_type_t type);
+	GfxWidget(gfxw_widget_type_t type);
 };
 
 
 #define GFXW_IS_BOX(widget) ((widget)->_type == GFXW_BOX)
-struct gfxw_box_t : public gfxw_widget_t {
+struct GfxBox : public GfxWidget {
 	gfx_color_t _color1, _color2;
 	gfx_box_shade_t _shadeType;
 
-	gfxw_box_t(gfx_state_t *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type);
+	GfxBox(gfx_state_t *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type);
 };
 
 
 #define GFXW_IS_PRIMITIVE(widget) ((widget)->_type == GFXW_RECT || (widget)->_type == GFXW_LINE)
-struct gfxw_primitive_t : public gfxw_widget_t {
+struct GfxPrimitive : public GfxWidget {
 	gfx_color_t _color;
 	gfx_line_mode_t _lineMode;
 	gfx_line_style_t _lineStyle;
 
-	gfxw_primitive_t(rect_t area, gfx_color_t color, gfx_line_mode_t mode,
+	GfxPrimitive(rect_t area, gfx_color_t color, gfx_line_mode_t mode,
 						gfx_line_style_t style, gfxw_widget_type_t type);
 };
 
@@ -138,18 +138,18 @@
 
 #define GFXW_IS_VIEW(widget) ((widget)->_type == GFXW_VIEW || (widget)->_type == GFXW_STATIC_VIEW \
 			      || (widget)->_type == GFXW_DYN_VIEW || (widget)->_type == GFXW_PIC_VIEW)
-struct gfxw_view_t  : public gfxw_widget_t {
-	Common::Point _pos; /* Implies the value of 'bounds' in gfxw_widget_t */
+struct GfxView  : public GfxWidget {
+	Common::Point _pos; /* Implies the value of 'bounds' in GfxWidget */
 	gfx_color_t _color;
 	int _view, _loop, _cel;
 	int _palette;
 
-	gfxw_view_t(gfx_state_t *state, Common::Point pos, int view_nr, int loop, int cel, int palette, int priority, int control,
+	GfxView(gfx_state_t *state, Common::Point pos, int view_nr, int loop, int cel, int palette, int priority, int control,
 		gfx_alignment_t halign, gfx_alignment_t valign, int flags);
 };
 
 #define GFXW_IS_DYN_VIEW(widget) ((widget)->_type == GFXW_DYN_VIEW || (widget)->_type == GFXW_PIC_VIEW)
-struct gfxw_dyn_view_t : public gfxw_view_t {
+struct GfxDynView : public GfxView {
 	/* FIXME: This code is specific to SCI */
 	rect_t draw_bounds; /* The correct position to draw to */
 	void *under_bitsp, *signalp;
@@ -158,14 +158,14 @@
 	int sequence; /* Sequence number: For sorting */
 	int force_precedence; /* Precedence enforcement variable for sorting- defaults to 0 */
 
-	gfxw_dyn_view_t(gfx_state_t *state, Common::Point pos, int z, int view, int loop, int cel, int palette, int priority, int control,
+	GfxDynView(gfx_state_t *state, Common::Point pos, int z, int view, int loop, int cel, int palette, int priority, int control,
 		gfx_alignment_t halign, gfx_alignment_t valign, int sequence);
 };
 
 
 
 #define GFXW_IS_TEXT(widget) ((widget)->_type == GFXW_TEXT)
-struct gfxw_text_t : public gfxw_widget_t {
+struct GfxText : public GfxWidget {
 	int font_nr;
 	int lines_nr, lineheight, lastline_width;
 	char *text;
@@ -175,23 +175,23 @@
 	int width, height; /* Real text width and height */
 	gfx_text_handle_t *text_handle;
 
-	gfxw_text_t(gfx_state_t *state, rect_t area, int font, const char *text, gfx_alignment_t halign,
+	GfxText(gfx_state_t *state, rect_t area, int font, const char *text, gfx_alignment_t halign,
 		gfx_alignment_t valign, gfx_color_t color1, gfx_color_t color2, gfx_color_t bgcolor, int text_flags);
 };
 
 
 /* Container widgets */
 
-typedef int gfxw_unary_container_op(gfxw_container_t *);
-typedef int gfxw_container_op(gfxw_container_t *, gfxw_widget_t *);
-typedef int gfxw_rect_op(gfxw_container_t *, rect_t, int);
+typedef int gfxw_unary_container_op(GfxContainer *);
+typedef int gfxw_container_op(GfxContainer *, GfxWidget *);
+typedef int gfxw_rect_op(GfxContainer *, rect_t, int);
 
 
-struct gfxw_container_t : public gfxw_widget_t {
+struct GfxContainer : public GfxWidget {
 	rect_t zone; /* The writeable zone (absolute) for contained objects */
 	gfx_dirty_rect_t *dirty; /* List of dirty rectangles */
-	gfxw_widget_t *contents;
-	gfxw_widget_t **nextpp; /* Pointer to the 'next' pointer in the last entry in contents */
+	GfxWidget *contents;
+	GfxWidget **nextpp; /* Pointer to the 'next' pointer in the last entry in contents */
 
 public:
 	// TODO: Replace the following with virtual methods
@@ -201,7 +201,7 @@
 	gfxw_rect_op *add_dirty_rel; /* Add a relative dirty rectangle */
 	gfxw_container_op *add;  /* Append widget to an appropriate position (for view and control lists) */
 
-	gfxw_container_t(rect_t area, gfxw_widget_type_t type);
+	GfxContainer(rect_t area, gfxw_widget_type_t type);
 };
 
 
@@ -211,24 +211,24 @@
 #define GFXW_IS_LIST(widget) ((widget)->_type == GFXW_LIST || (widget)->_type == GFXW_SORTED_LIST)
 #define GFXW_IS_SORTED_LIST(widget) ((widget)->_type == GFXW_SORTED_LIST)
 
-struct gfxw_list_t : public gfxw_container_t {
-	gfxw_list_t(rect_t area, bool sorted);
+struct GfxList : public GfxContainer {
+	GfxList(rect_t area, bool sorted);
 };
 
 #define GFXW_IS_VISUAL(widget) ((widget)->_type == GFXW_VISUAL)
-struct gfxw_visual_t : public gfxw_container_t {
-	gfxw_port_t **port_refs; /* References to ports */
+struct GfxVisual : public GfxContainer {
+	GfxPort **port_refs; /* References to ports */
 	int port_refs_nr;
 	int font_nr; /* Default font */
 	gfx_state_t *gfx_state;
 
-	gfxw_visual_t(gfx_state_t *state, int font);
+	GfxVisual(gfx_state_t *state, int font);
 };
 
 #define GFXW_IS_PORT(widget) ((widget)->_type == GFXW_PORT)
-struct gfxw_port_t : public gfxw_container_t {
-	gfxw_list_t *decorations; /* optional window decorations- drawn before the contents */
-	gfxw_widget_t *port_bg; /* Port background widget or NULL */
+struct GfxPort : public GfxContainer {
+	GfxList *decorations; /* optional window decorations- drawn before the contents */
+	GfxWidget *port_bg; /* Port background widget or NULL */
 	gfx_color_t _color, _bgcolor;
 	int font_nr;
 	Common::Point draw_pos; /* Drawing position */
@@ -238,7 +238,7 @@
 	const char *title_text;
 	byte gray_text; /* Whether text is 'grayed out' (dithered) */
 
-	gfxw_port_t(gfxw_visual_t *visual, rect_t area, gfx_color_t fgcolor, gfx_color_t bgcolor);
+	GfxPort(GfxVisual *visual, rect_t area, gfx_color_t fgcolor, gfx_color_t bgcolor);
 };
 
 } // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-04-24 10:45:09 UTC (rev 40103)
+++ scummvm/trunk/engines/sci/gfx/gfx_widgets.cpp	2009-04-24 10:46:20 UTC (rev 40104)
@@ -45,10 +45,10 @@
 
 #ifdef GFXW_DEBUG_WIDGETS
 
-gfxw_widget_t *debug_widgets[GFXW_DEBUG_WIDGETS];
+GfxWidget *debug_widgets[GFXW_DEBUG_WIDGETS];
 int debug_widget_pos = 0;
 
-static void _gfxw_debug_add_widget(gfxw_widget_t *widget) {
+static void _gfxw_debug_add_widget(GfxWidget *widget) {
 	if (debug_widget_pos == GFXW_DEBUG_WIDGETS) {
 		GFXERROR("WIDGET DEBUG: Allocated the maximum number of %d widgets- Aborting!\n", GFXW_DEBUG_WIDGETS);
 		BREAKPOINT();
@@ -56,12 +56,12 @@
 	debug_widgets[debug_widget_pos++] = widget;
 }
 
-static void _gfxw_debug_remove_widget(gfxw_widget_t *widget) {
+static void _gfxw_debug_remove_widget(GfxWidget *widget) {
 	int i;
 	int found = 0;
 	for (i = 0; i < debug_widget_pos; i++) {
 		if (debug_widgets[i] == widget) {
-			memmove(debug_widgets + i, debug_widgets + i + 1, (sizeof(gfxw_widget_t *)) * (debug_widget_pos - i - 1));
+			memmove(debug_widgets + i, debug_widgets + i + 1, (sizeof(GfxWidget *)) * (debug_widget_pos - i - 1));
 			debug_widgets[debug_widget_pos--] = NULL;
 			found++;
 		}
@@ -88,7 +88,7 @@
 		sciprintf("    ");
 }
 
-static void _gfxw_print_widget(gfxw_widget_t *widget, int indentation) {
+static void _gfxw_print_widget(GfxWidget *widget, int indentation) {
 	unsigned int i;
 	char flags_list[] = "VOCDTMI";
 
@@ -122,14 +122,14 @@
 	sciprintf(" ");
 }
 
-static int _gfxwop_print_empty(gfxw_widget_t *widget, int indentation) {
+static int _gfxwop_print_empty(GfxWidget *widget, int indentation) {
 	_gfxw_print_widget(widget, indentation);
 	sciprintf("<untyped #%d>", widget->_type);
 
 	return 0;
 }
 
-gfxw_widget_t::gfxw_widget_t(gfxw_widget_type_t type_) {
+GfxWidget::GfxWidget(gfxw_widget_type_t type_) {
 	_magic = GFXW_MAGIC_VALID;
 
 	_serial = widget_serial_number_counter++;
@@ -158,7 +158,7 @@
 	_gfxw_debug_add_widget(this);
 }
 
-static int verify_widget(gfxw_widget_t *widget) {
+static int verify_widget(GfxWidget *widget) {
 	if (!widget) {
 		GFXERROR("Attempt to use NULL widget\n");
 #ifdef GFXW_DEBUG_WIDGETS
@@ -180,11 +180,11 @@
 }
 
 #define VERIFY_WIDGET(w) \
-	if (verify_widget((gfxw_widget_t *)(w))) { GFXERROR("Error occured while validating widget\n"); }
+	if (verify_widget((GfxWidget *)(w))) { GFXERROR("Error occured while validating widget\n"); }
 
-static void _gfxw_unallocate_widget(gfx_state_t *state, gfxw_widget_t *widget) {
+static void _gfxw_unallocate_widget(gfx_state_t *state, GfxWidget *widget) {
 	if (GFXW_IS_TEXT(widget)) {
-		gfxw_text_t *text = (gfxw_text_t *) widget;
+		GfxText *text = (GfxText *) widget;
 
 		if (text->text_handle) {
 			if (!state) {
@@ -265,7 +265,7 @@
 	return 1;
 }
 
-static int _gfxwop_basic_set_visual(gfxw_widget_t *widget, gfxw_visual_t *visual) {
+static int _gfxwop_basic_set_visual(GfxWidget *widget, GfxVisual *visual) {
 	widget->_visual = visual;
 
 	if (widget->_parent) {
@@ -276,11 +276,11 @@
 	return 0;
 }
 
-static int _gfxwop_basic_should_replace(gfxw_widget_t *widget, gfxw_widget_t *other) {
+static int _gfxwop_basic_should_replace(GfxWidget *widget, GfxWidget *other) {
 	return 0;
 }
 
-static void _gfxw_set_ops(gfxw_widget_t *widget, gfxw_point_op *draw, gfxw_op *free, gfxw_op *tag, gfxw_op_int *print,
+static void _gfxw_set_ops(GfxWidget *widget, gfxw_point_op *draw, gfxw_op *free, gfxw_op *tag, gfxw_op_int *print,
 	gfxw_bin_op *compare_to, gfxw_bin_op *equals, gfxw_bin_op *superarea_of) {
 	widget->draw = draw;
 	widget->widfree = free;
@@ -294,8 +294,8 @@
 	widget->set_visual = _gfxwop_basic_set_visual;
 }
 
-void gfxw_remove_widget_from_container(gfxw_container_t *container, gfxw_widget_t *widget) {
-	gfxw_widget_t **seekerp;
+void gfxw_remove_widget_from_container(GfxContainer *container, GfxWidget *widget) {
+	GfxWidget **seekerp;
 
 	if (!container) {
 		GFXERROR("Attempt to remove widget from NULL container!\n");
@@ -305,8 +305,8 @@
 	seekerp = &(container->contents);
 
 	if (GFXW_IS_LIST(widget) && GFXW_IS_PORT(container)) {
-		gfxw_port_t *port = (gfxw_port_t *) container;
-		if (port->decorations == (gfxw_list_t *) widget) {
+		GfxPort *port = (GfxPort *) container;
+		if (port->decorations == (GfxList *) widget) {
 			port->decorations = NULL;
 			return;
 		}
@@ -333,8 +333,8 @@
 	widget->_next = NULL;
 }
 
-static int _gfxwop_basic_free(gfxw_widget_t *widget) {
-	gfxw_visual_t *visual = widget->_visual;
+static int _gfxwop_basic_free(GfxWidget *widget) {
+	GfxVisual *visual = widget->_visual;
 	gfx_state_t *state = (visual) ? visual->gfx_state : NULL;
 
 	DDIRTY(stderr, "BASIC-FREE: SomeAddDirty\n");
@@ -353,21 +353,21 @@
 	return 0;
 }
 
-static int _gfxwop_basic_tag(gfxw_widget_t *widget) {
+static int _gfxwop_basic_tag(GfxWidget *widget) {
 	widget->_flags |= GFXW_FLAG_TAGGED;
 
 	return 0;
 }
 
-static int _gfxwop_basic_compare_to(gfxw_widget_t *widget, gfxw_widget_t *other) {
+static int _gfxwop_basic_compare_to(GfxWidget *widget, GfxWidget *other) {
 	return 1;
 }
 
-static int _gfxwop_basic_equals(gfxw_widget_t *widget, gfxw_widget_t *other) {
+static int _gfxwop_basic_equals(GfxWidget *widget, GfxWidget *other) {
 	return 0;
 }
 
-static int _gfxwop_basic_superarea_of(gfxw_widget_t *widget, gfxw_widget_t *other) {
+static int _gfxwop_basic_superarea_of(GfxWidget *widget, GfxWidget *other) {
 	return (widget == other);
 }
 
@@ -388,22 +388,22 @@
 	return Common::Point(rect.x + point.x, rect.y + point.y);
 }
 
-static int _gfxwop_box_draw(gfxw_widget_t *widget, Common::Point pos) {
-	gfxw_box_t *box = (gfxw_box_t *) widget;
+static int _gfxwop_box_draw(GfxWidget *widget, Common::Point pos) {
+	GfxBox *box = (GfxBox *) widget;
 	DRAW_ASSERT(widget, GFXW_BOX);
 	GFX_ASSERT(gfxop_draw_box(box->_visual->gfx_state, _move_rect(box->_bounds, pos), box->_color1, box->_color2, box->_shadeType));
 
 	return 0;
 }
 
-static int _gfxwop_box_print(gfxw_widget_t *widget, int indentation) {
+static int _gfxwop_box_print(GfxWidget *widget, int indentation) {
 	_gfxw_print_widget(widget, indentation);
 	sciprintf("BOX");
 	return 0;
 }
 
-static int _gfxwop_box_superarea_of(gfxw_widget_t *widget, gfxw_widget_t *other) {
-	gfxw_box_t *box = (gfxw_box_t *) widget;
+static int _gfxwop_box_superarea_of(GfxWidget *widget, GfxWidget *other) {
+	GfxBox *box = (GfxBox *) widget;
 
 	if (box->_color1.alpha)
 		return 0;
@@ -421,12 +421,12 @@
 	return 1;
 }
 
-static int _gfxwop_box_equals(gfxw_widget_t *widget, gfxw_widget_t *other) {
-	gfxw_box_t *wbox = (gfxw_box_t *)widget, *obox;
+static int _gfxwop_box_equals(GfxWidget *widget, GfxWidget *other) {
+	GfxBox *wbox = (GfxBox *)widget, *obox;
 	if (other->_type != GFXW_BOX)
 		return 0;
 
-	obox = (gfxw_box_t *) other;
+	obox = (GfxBox *) other;
 
 	if (!toCommonRect(wbox->_bounds).equals(toCommonRect(obox->_bounds)))
 		return 0;
@@ -444,7 +444,7 @@
 	return 1;
 }
 
-void _gfxw_set_ops_BOX(gfxw_widget_t *widget) {
+void _gfxw_set_ops_BOX(GfxWidget *widget) {
 	_gfxw_set_ops(GFXW(widget), _gfxwop_box_draw, _gfxwop_basic_free, _gfxwop_basic_tag, _gfxwop_box_print,
 	              _gfxwop_basic_compare_to, _gfxwop_box_equals, _gfxwop_box_superarea_of);
 }
@@ -453,12 +453,12 @@
 	return (color.mask & GFX_MASK_PRIORITY) ? color.priority : -1;
 }
 
-gfxw_box_t *gfxw_new_box(gfx_state_t *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type) {
-	return new gfxw_box_t(state, area, color1, color2, shade_type);
+GfxBox *gfxw_new_box(gfx_state_t *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type) {
+	return new GfxBox(state, area, color1, color2, shade_type);
 }
 
-gfxw_box_t::gfxw_box_t(gfx_state_t *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type)
-	: gfxw_widget_t(GFXW_BOX) {
+GfxBox::GfxBox(gfx_state_t *state, rect_t area, gfx_color_t color1, gfx_color_t color2, gfx_box_shade_t shade_type)
+	: GfxWidget(GFXW_BOX) {
 
 	_widgetPriority = _gfxw_color_get_priority(color1);
 	_bounds = area;
@@ -474,9 +474,9 @@
 	_gfxw_set_ops_BOX(this);
 }
 
-gfxw_primitive_t::gfxw_primitive_t(rect_t area, gfx_color_t color_, gfx_line_mode_t mode,
+GfxPrimitive::GfxPrimitive(rect_t area, gfx_color_t color_, gfx_line_mode_t mode,
 						gfx_line_style_t style, gfxw_widget_type_t type_)
-	: gfxw_widget_t(type_) {
+	: GfxWidget(type_) {
 
 	_widgetPriority = _gfxw_color_get_priority(color_);
 	_bounds = area;
@@ -489,16 +489,16 @@
 
 //*** Rectangles ***
 
-struct gfxw_rect_t : public gfxw_primitive_t {
+struct gfxw_rect_t : public GfxPrimitive {
 	gfxw_rect_t(rect_t rect, gfx_color_t color, gfx_line_mode_t line_mode, gfx_line_style_t line_style);
 };
 
-static int _gfxwop_primitive_equals(gfxw_widget_t *widget, gfxw_widget_t *other) {
-	gfxw_primitive_t *wprim = (gfxw_primitive_t *) widget, *oprim;
+static int _gfxwop_primitive_equals(GfxWidget *widget, GfxWidget *other) {
+	GfxPrimitive *wprim = (GfxPrimitive *) widget, *oprim;
 	if (widget->_type != other->_type)
 		return 0;
 
-	oprim = (gfxw_primitive_t *) other;
+	oprim = (GfxPrimitive *) other;
 
 	// Check if the two primitives are equal (note: the primitives aren't always rectangles, so
 	// the "width" and the "height" here could be negative)
@@ -518,8 +518,8 @@
 	return 1;
 }
 
-static int _gfxwop_rect_draw(gfxw_widget_t *widget, Common::Point pos) {
-	gfxw_primitive_t *rect = (gfxw_primitive_t *) widget;
+static int _gfxwop_rect_draw(GfxWidget *widget, Common::Point pos) {
+	GfxPrimitive *rect = (GfxPrimitive *) widget;
 	DRAW_ASSERT(widget, GFXW_RECT);
 
 	GFX_ASSERT(gfxop_draw_rectangle(rect->_visual->gfx_state, gfx_rect(rect->_bounds.x + pos.x, rect->_bounds.y + pos.y,
@@ -527,24 +527,24 @@
 	return 0;
 }
 
-static int _gfxwop_rect_print(gfxw_widget_t *rect, int indentation) {
+static int _gfxwop_rect_print(GfxWidget *rect, int indentation) {
 	_gfxw_print_widget(GFXW(rect), indentation);
 	sciprintf("RECT");
 
 	return 0;
 }
 
-void _gfxw_set_ops_RECT(gfxw_widget_t *prim) {
+void _gfxw_set_ops_RECT(GfxWidget *prim) {
 	_gfxw_set_ops(GFXW(prim), _gfxwop_rect_draw, _gfxwop_basic_free, _gfxwop_basic_tag, _gfxwop_rect_print,
 	              _gfxwop_basic_compare_to, _gfxwop_primitive_equals, _gfxwop_basic_superarea_of);
 }
 
-gfxw_primitive_t *gfxw_new_rect(rect_t rect, gfx_color_t color, gfx_line_mode_t line_mode, gfx_line_style_t line_style) {
+GfxPrimitive *gfxw_new_rect(rect_t rect, gfx_color_t color, gfx_line_mode_t line_mode, gfx_line_style_t line_style) {
 	return new gfxw_rect_t(rect, color, line_mode, line_style);
 }
 
 gfxw_rect_t::gfxw_rect_t(rect_t rect, gfx_color_t color_, gfx_line_mode_t line_mode_, gfx_line_style_t line_style_)
-	: gfxw_primitive_t(rect, color_, line_mode_, line_style_, GFXW_RECT) {
+	: GfxPrimitive(rect, color_, line_mode_, line_style_, GFXW_RECT) {
 
 	_bounds.width++;
 	_bounds.height++; // Since it is actually one pixel bigger in each direction
@@ -554,12 +554,12 @@
 
 //*** Lines ***
 
-struct gfxw_line_t : public gfxw_primitive_t {
+struct gfxw_line_t : public GfxPrimitive {
 	gfxw_line_t(Common::Point start, Common::Point end, gfx_color_t color, gfx_line_mode_t line_mode, gfx_line_style_t line_style);
 };
 
-static int _gfxwop_line_draw(gfxw_widget_t *widget, Common::Point pos) {
-	gfxw_primitive_t *line = (gfxw_primitive_t *)widget;
+static int _gfxwop_line_draw(GfxWidget *widget, Common::Point pos) {
+	GfxPrimitive *line = (GfxPrimitive *)widget;
 	rect_t linepos = widget->_bounds;
 	Common::Point p1, p2;
 
@@ -573,32 +573,32 @@
 	return 0;
 }
 
-static int _gfxwop_line_print(gfxw_widget_t *widget, int indentation) {
+static int _gfxwop_line_print(GfxWidget *widget, int indentation) {
 	_gfxw_print_widget(widget, indentation);
 
 	return 0;
 }
 
-void _gfxw_set_ops_LINE(gfxw_widget_t *prim) {
+void _gfxw_set_ops_LINE(GfxWidget *prim) {
 	_gfxw_set_ops(GFXW(prim), _gfxwop_line_draw, _gfxwop_basic_free, _gfxwop_basic_tag, _gfxwop_line_print,
 	              _gfxwop_basic_compare_to, _gfxwop_primitive_equals, _gfxwop_basic_superarea_of);
 }
 
-gfxw_primitive_t *gfxw_new_line(Common::Point start, Common::Point end, gfx_color_t color, gfx_line_mode_t line_mode, gfx_line_style_t line_style) {
+GfxPrimitive *gfxw_new_line(Common::Point start, Common::Point end, gfx_color_t color, gfx_line_mode_t line_mode, gfx_line_style_t line_style) {
 	return new gfxw_line_t(start, end, color, line_mode, line_style);
 }
 
 gfxw_line_t::gfxw_line_t(Common::Point start, Common::Point end, gfx_color_t color_, gfx_line_mode_t line_mode_, gfx_line_style_t line_style_)
-	: gfxw_primitive_t(gfx_rect(start.x, start.y, end.x - start.x + 1, end.y - start.y + 1), color_, line_mode_, line_style_, GFXW_LINE) {
+	: GfxPrimitive(gfx_rect(start.x, start.y, end.x - start.x + 1, end.y - start.y + 1), color_, line_mode_, line_style_, GFXW_LINE) {
 	_gfxw_set_ops_LINE(this);
 }
 
 //*** Views and static views ***
 
 
-gfxw_view_t::gfxw_view_t(gfx_state_t *state, Common::Point pos_, int view_, int loop_, int cel_, int palette_, int priority, int control,
+GfxView::GfxView(gfx_state_t *state, Common::Point pos_, int view_, int loop_, int cel_, int palette_, int priority, int control,
 	gfx_alignment_t halign, gfx_alignment_t valign, int flags_)
-	: gfxw_widget_t((flags_ & GFXW_VIEW_FLAG_STATIC) ? GFXW_STATIC_VIEW : GFXW_VIEW) {
+	: GfxWidget((flags_ & GFXW_VIEW_FLAG_STATIC) ? GFXW_STATIC_VIEW : GFXW_VIEW) {
 
 	int width, height;
 	Common::Point offset;
@@ -637,8 +637,8 @@
 	_flags |= GFXW_FLAG_VISIBLE;
 }
 
-int _gfxwop_view_draw(gfxw_widget_t *widget, Common::Point pos) {
-	gfxw_view_t *view = (gfxw_view_t *)widget;
+int _gfxwop_view_draw(GfxWidget *widget, Common::Point pos) {
+	GfxView *view = (GfxView *)widget;
 	DRAW_ASSERT(widget, GFXW_VIEW);
 
 	GFX_ASSERT(gfxop_draw_cel(view->_visual->gfx_state, view->_view, view->_loop, view->_cel,
@@ -647,8 +647,8 @@
 	return 0;
 }
 
-static int _gfxwop_static_view_draw(gfxw_widget_t *widget, Common::Point pos) {
-	gfxw_view_t *view = (gfxw_view_t *)widget;
+static int _gfxwop_static_view_draw(GfxWidget *widget, Common::Point pos) {
+	GfxView *view = (GfxView *)widget;
 	DRAW_ASSERT(widget, GFXW_VIEW);
 
 	GFX_ASSERT(gfxop_draw_cel_static(view->_visual->gfx_state, view->_view, view->_loop,
@@ -657,8 +657,8 @@
 	return 0;
 }
 
-static int _w_gfxwop_view_print(gfxw_widget_t *widget, const char *name, int indentation) {
-	gfxw_view_t *view = (gfxw_view_t *)widget;
+static int _w_gfxwop_view_print(GfxWidget *widget, const char *name, int indentation) {
+	GfxView *view = (GfxView *)widget;
 	_gfxw_print_widget(widget, indentation);
 
 	sciprintf("%s", name);
@@ -669,23 +669,23 @@
 	return 0;
 }
 
-static int _gfxwop_view_print(gfxw_widget_t *widget, int indentation) {
+static int _gfxwop_view_print(GfxWidget *widget, int indentation) {
 	return _w_gfxwop_view_print(widget, "VIEW", indentation);
 }
 
-static int _gfxwop_static_view_print(gfxw_widget_t *widget, int indentation) {
+static int _gfxwop_static_view_print(GfxWidget *widget, int indentation) {
 	return _w_gfxwop_view_print(widget, "PICVIEW", indentation);
 }
 
-void _gfxw_set_ops_VIEW(gfxw_widget_t *view, char stat) {
+void _gfxw_set_ops_VIEW(GfxWidget *view, char stat) {
 	_gfxw_set_ops(GFXW(view), (stat) ? _gfxwop_static_view_draw : _gfxwop_view_draw, _gfxwop_basic_free,
 	              _gfxwop_basic_tag, (stat) ? _gfxwop_static_view_print : _gfxwop_view_print,
 	              _gfxwop_basic_compare_to, _gfxwop_basic_equals, _gfxwop_basic_superarea_of);
 }
 
-gfxw_view_t *gfxw_new_view(gfx_state_t *state, Common::Point pos, int view_nr, int loop, int cel, int palette, int priority, int control,
+GfxView *gfxw_new_view(gfx_state_t *state, Common::Point pos, int view_nr, int loop, int cel, int palette, int priority, int control,
 	gfx_alignment_t halign, gfx_alignment_t valign, int flags) {
-	gfxw_view_t *view;
+	GfxView *view;
 
 	if (flags & GFXW_VIEW_FLAG_DONT_MODIFY_OFFSET) {
 		int foo;
@@ -695,7 +695,7 @@
 		pos.y += offset.y;
 	}
 
-	view = new gfxw_view_t(state, pos, view_nr, loop, cel, palette, priority, control, halign, valign,
+	view = new GfxView(state, pos, view_nr, loop, cel, palette, priority, control, halign, valign,
 	                             (flags & GFXW_VIEW_FLAG_STATIC) ? GFXW_STATIC_VIEW : GFXW_VIEW);
 
 	_gfxw_set_ops_VIEW(view, (char)(flags & GFXW_VIEW_FLAG_STATIC));
@@ -705,8 +705,8 @@
 
 //*** Dynamic Views ***
 
-static int _gfxwop_dyn_view_draw(gfxw_widget_t *widget, Common::Point pos) {
-	gfxw_dyn_view_t *view = (gfxw_dyn_view_t *) widget;
+static int _gfxwop_dyn_view_draw(GfxWidget *widget, Common::Point pos) {
+	GfxDynView *view = (GfxDynView *) widget;
 	DRAW_ASSERT(widget, GFXW_DYN_VIEW);
 
 	GFX_ASSERT(gfxop_draw_cel(view->_visual->gfx_state, view->_view, view->_loop,
@@ -725,12 +725,12 @@
 
 }
 
-static int _gfxwop_draw_nop(gfxw_widget_t *widget, Common::Point pos) {
+static int _gfxwop_draw_nop(GfxWidget *widget, Common::Point pos) {
 	return 0;
 }
 
-static int _gfxwop_pic_view_draw(gfxw_widget_t *widget, Common::Point pos) {
-	gfxw_dyn_view_t *view = (gfxw_dyn_view_t *) widget;
+static int _gfxwop_pic_view_draw(GfxWidget *widget, Common::Point pos) {
+	GfxDynView *view = (GfxDynView *) widget;
 	DRAW_ASSERT(widget, GFXW_PIC_VIEW);
 
 	GFX_ASSERT(gfxop_set_clip_zone(view->_visual->gfx_state, view->_parent->zone));
@@ -747,8 +747,8 @@
 	return 0;
 }
 
-static int _gfxwop_some_view_print(gfxw_widget_t *widget, int indentation, const char *type_string) {
-	gfxw_dyn_view_t *view = (gfxw_dyn_view_t *)widget;
+static int _gfxwop_some_view_print(GfxWidget *widget, int indentation, const char *type_string) {
+	GfxDynView *view = (GfxDynView *)widget;
 
 	_gfxw_print_widget(widget, indentation);
 
@@ -761,20 +761,20 @@
 	return 0;
 }
 
-static int _gfxwop_dyn_view_print(gfxw_widget_t *widget, int indentation) {
+static int _gfxwop_dyn_view_print(GfxWidget *widget, int indentation) {
 	return _gfxwop_some_view_print(widget, indentation, "DYNVIEW");
 }
 
-static int _gfxwop_pic_view_print(gfxw_widget_t *widget, int indentation) {
+static int _gfxwop_pic_view_print(GfxWidget *widget, int indentation) {
 	return _gfxwop_some_view_print(widget, indentation, "PICVIEW");
 }
 
-static int _gfxwop_dyn_view_equals(gfxw_widget_t *widget, gfxw_widget_t *other) {
-	gfxw_dyn_view_t *wview = (gfxw_dyn_view_t *)widget, *oview;
+static int _gfxwop_dyn_view_equals(GfxWidget *widget, GfxWidget *other) {
+	GfxDynView *wview = (GfxDynView *)widget, *oview;
 	if (!GFXW_IS_DYN_VIEW(other))
 		return 0;
 
-	oview = (gfxw_dyn_view_t *)other;
+	oview = (GfxDynView *)other;
 
 	if (wview->_pos.x != oview->_pos.x || wview->_pos.y != oview->_pos.y || wview->_z != oview->_z)
 		return 0;
@@ -791,13 +791,13 @@
 	return 1;
 }
 
-static int _gfxwop_dyn_view_compare_to(gfxw_widget_t *widget, gfxw_widget_t *other) {
+static int _gfxwop_dyn_view_compare_to(GfxWidget *widget, GfxWidget *other) {
 	int retval;
-	gfxw_dyn_view_t *wview = (gfxw_dyn_view_t *) widget, *oview;
+	GfxDynView *wview = (GfxDynView *) widget, *oview;
 	if (!GFXW_IS_DYN_VIEW(other))
 		return 1;
 
-	oview = (gfxw_dyn_view_t *) other;
+	oview = (GfxDynView *) other;
 
 	retval = wview->force_precedence - oview->force_precedence;
 	if (retval)
@@ -814,26 +814,26 @@
 	return -(wview->sequence - oview->sequence);
 }
 
-void _gfxw_set_ops_DYNVIEW(gfxw_widget_t *widget) {
+void _gfxw_set_ops_DYNVIEW(GfxWidget *widget) {
 	_gfxw_set_ops(GFXW(widget), _gfxwop_dyn_view_draw, _gfxwop_basic_free, _gfxwop_basic_tag,
 	              _gfxwop_dyn_view_print, _gfxwop_dyn_view_compare_to, _gfxwop_dyn_view_equals, _gfxwop_basic_superarea_of);
 }
 
-void _gfxw_set_ops_PICVIEW(gfxw_widget_t *widget) {
+void _gfxw_set_ops_PICVIEW(GfxWidget *widget) {
 	_gfxw_set_ops_DYNVIEW(widget);
 	widget->draw = _gfxwop_pic_view_draw;
 	widget->print = _gfxwop_pic_view_print;
 }
 
-gfxw_dyn_view_t *gfxw_new_dyn_view(gfx_state_t *state, Common::Point pos, int z, int view, int loop, int cel, int palette, int priority, int control,
+GfxDynView *gfxw_new_dyn_view(gfx_state_t *state, Common::Point pos, int z, int view, int loop, int cel, int palette, int priority, int control,
 	gfx_alignment_t halign, gfx_alignment_t valign, int sequence) {
 	
-	return new gfxw_dyn_view_t(state, pos, z, view, loop, cel, palette, priority, control, halign, valign, sequence);
+	return new GfxDynView(state, pos, z, view, loop, cel, palette, priority, control, halign, valign, sequence);
 }
 
-gfxw_dyn_view_t::gfxw_dyn_view_t(gfx_state_t *state, Common::Point pos_, int z_, int view_, int loop_, int cel_, int palette_, int priority, int control,
+GfxDynView::GfxDynView(gfx_state_t *state, Common::Point pos_, int z_, int view_, int loop_, int cel_, int palette_, int priority, int control,
 	gfx_alignment_t halign, gfx_alignment_t valign, int sequence_)
-	: gfxw_view_t(state, pos_, view_, loop_, cel_, palette_, priority, control, halign, valign, 0) {
+	: GfxView(state, pos_, view_, loop_, cel_, palette_, priority, control, halign, valign, 0) {
 	int width, height;
 	int xalignmod, yalignmod;
 	Common::Point offset;
@@ -894,15 +894,15 @@
 
 //*** Text ***
 
-static int _gfxwop_text_free(gfxw_widget_t *widget) {
-	gfxw_text_t *text = (gfxw_text_t *)widget;
+static int _gfxwop_text_free(GfxWidget *widget) {
+	GfxText *text = (GfxText *)widget;
 	free(text->text);
 
 	return _gfxwop_basic_free(widget);
 }
 
-static int _gfxwop_text_draw(gfxw_widget_t *widget, Common::Point pos) {
-	gfxw_text_t *text = (gfxw_text_t *)widget;
+static int _gfxwop_text_draw(GfxWidget *widget, Common::Point pos) {
+	GfxText *text = (GfxText *)widget;
 	DRAW_ASSERT(widget, GFXW_TEXT);
 
 	GFX_ASSERT(gfxop_draw_text(text->_visual->gfx_state, text->text_handle, _move_rect(text->_bounds, pos)));
@@ -910,8 +910,8 @@
 	return 0;
 }
 
-static int _gfxwop_text_alloc_and_draw(gfxw_widget_t *widget, Common::Point pos) {
-	gfxw_text_t *text = (gfxw_text_t *)widget;
+static int _gfxwop_text_alloc_and_draw(GfxWidget *widget, Common::Point pos) {
+	GfxText *text = (GfxText *)widget;
 	DRAW_ASSERT(widget, GFXW_TEXT);
 
 	text->text_handle = gfxop_new_text(widget->_visual->gfx_state, text->font_nr, text->text, text->_bounds.width,
@@ -922,19 +922,19 @@
 	return _gfxwop_text_draw(widget, pos);
 }
 
-static int _gfxwop_text_print(gfxw_widget_t *widget, int indentation) {
+static int _gfxwop_text_print(GfxWidget *widget, int indentation) {
 	_gfxw_print_widget(widget, indentation);
-	sciprintf("TEXT:'%s'", ((gfxw_text_t *)widget)->text);
+	sciprintf("TEXT:'%s'", ((GfxText *)widget)->text);
 
 	return 0;
 }
 
-static int _gfxwop_text_equals(gfxw_widget_t *widget, gfxw_widget_t *other) {
-	gfxw_text_t *wtext = (gfxw_text_t *)widget, *otext;
+static int _gfxwop_text_equals(GfxWidget *widget, GfxWidget *other) {
+	GfxText *wtext = (GfxText *)widget, *otext;
 	if (other->_type != GFXW_TEXT)
 		return 0;
 
-	otext = (gfxw_text_t *)other;
+	otext = (GfxText *)other;
 
 	if ((wtext->_bounds.x != otext->_bounds.x) || (wtext->_bounds.y != otext->_bounds.y))
 		return 0;
@@ -955,36 +955,36 @@
 	return 1;
 }
 
-static int _gfxwop_text_should_replace(gfxw_widget_t *widget, gfxw_widget_t *other) {
-	gfxw_text_t *wtext = (gfxw_text_t *)widget, *otext;
+static int _gfxwop_text_should_replace(GfxWidget *widget, GfxWidget *other) {
+	GfxText *wtext = (GfxText *)widget, *otext;
 
 	if (other->_type != GFXW_TEXT)
 		return 0;
 
-	otext = (gfxw_text_t *)other;
+	otext = (GfxText *)other;
 
 	return strcmp(wtext->text, otext->text);
 }
 
-static int _gfxwop_text_compare_to(gfxw_widget_t *widget, gfxw_widget_t *other) {
+static int _gfxwop_text_compare_to(GfxWidget *widget, GfxWidget *other) {
 	return 1;
 }
 
-void _gfxw_set_ops_TEXT(gfxw_widget_t *widget) {
+void _gfxw_set_ops_TEXT(GfxWidget *widget) {
 	_gfxw_set_ops(GFXW(widget), _gfxwop_text_alloc_and_draw, _gfxwop_text_free, _gfxwop_basic_tag,
 	              _gfxwop_text_print, _gfxwop_text_compare_to, _gfxwop_text_equals,
 	              _gfxwop_basic_superarea_of);
 	widget->should_replace = _gfxwop_text_should_replace;
 }
 
-gfxw_text_t *gfxw_new_text(gfx_state_t *state, rect_t area, int font, const char *text, gfx_alignment_t halign,
+GfxText *gfxw_new_text(gfx_state_t *state, rect_t area, int font, const char *text, gfx_alignment_t halign,
 	gfx_alignment_t valign, gfx_color_t color1, gfx_color_t color2, gfx_color_t bgcolor, int text_flags) {
-	return new gfxw_text_t(state, area, font, text, halign, valign, color1, color2, bgcolor, text_flags);
+	return new GfxText(state, area, font, text, halign, valign, color1, color2, bgcolor, text_flags);
 }
 
-gfxw_text_t::gfxw_text_t(gfx_state_t *state, rect_t area, int font, const char *text_, gfx_alignment_t halign_,
+GfxText::GfxText(gfx_state_t *state, rect_t area, int font, const char *text_, gfx_alignment_t halign_,
 	gfx_alignment_t valign_, gfx_color_t color1_, gfx_color_t color2_, gfx_color_t bgcolor_, int text_flags_)
-	: gfxw_widget_t(GFXW_TEXT) {
+	: GfxWidget(GFXW_TEXT) {
 
 	_widgetPriority = _gfxw_color_get_priority(color1_);
 	font_nr = font;
@@ -1019,7 +1019,7 @@
 	_gfxw_set_ops_TEXT(this);
 }
 
-void gfxw_text_info(gfx_state_t *state, gfxw_text_t *text, int *lines, int *lineheight, int *offset) {
+void gfxw_text_info(gfx_state_t *state, GfxText *text, int *lines, int *lineheight, int *offset) {
 	if (lines)
 		*lines = text->lines_nr;
 	if (lineheight)
@@ -1030,12 +1030,12 @@
 
 //-- Container types --
 
-static int _gfxwop_container_add_dirty_rel(gfxw_container_t *cont, rect_t rect, int propagate) {
+static int _gfxwop_container_add_dirty_rel(GfxContainer *cont, rect_t rect, int propagate) {
 	DDIRTY(stderr, "->container_add_dirty_rel(%d,%d,%d,%d, %d)\n", GFX_PRINT_RECT(rect), propagate);
 	return cont->add_dirty_abs(cont, _move_rect(rect, Common::Point(cont->zone.x, cont->zone.y)), propagate);
 }
 
-static void _gfxw_set_container_ops(gfxw_container_t *container, gfxw_point_op *draw, gfxw_op *free, gfxw_op *tag,
+static void _gfxw_set_container_ops(GfxContainer *container, gfxw_point_op *draw, gfxw_op *free, gfxw_op *tag,
 	gfxw_op_int *print, gfxw_bin_op *compare_to, gfxw_bin_op *equals,
 	gfxw_bin_op *superarea_of, gfxw_visual_op *set_visual,
 	gfxw_unary_container_op *free_tagged, gfxw_unary_container_op *free_contents,
@@ -1050,8 +1050,8 @@
 	container->set_visual = set_visual;
 }
 
-static int _w_gfxwop_container_print_contents(const char *name, gfxw_widget_t *widget, int indentation) {
-	gfxw_widget_t *seeker = widget;
+static int _w_gfxwop_container_print_contents(const char *name, GfxWidget *widget, int indentation) {
+	GfxWidget *seeker = widget;
 
 	indent(indentation);
 
@@ -1066,9 +1066,9 @@
 	return 0;
 }
 
-static int _w_gfxwop_container_print(gfxw_widget_t *widget, int indentation) {
+static int _w_gfxwop_container_print(GfxWidget *widget, int indentation) {
 	gfx_dirty_rect_t *dirty;
-	gfxw_container_t *container = (gfxw_container_t *)widget;
+	GfxContainer *container = (GfxContainer *)widget;
 	if (!GFXW_IS_CONTAINER(widget)) {
 		GFXERROR("_w_gfxwop_container_print() called on type %d widget\n", widget->_type);
 		return 1;
@@ -1093,8 +1093,8 @@
 }
 
 
-gfxw_container_t::gfxw_container_t(rect_t area, gfxw_widget_type_t type_)
-	: gfxw_widget_t(type_) {
+GfxContainer::GfxContainer(rect_t area, gfxw_widget_type_t type_)
+	: GfxWidget(type_) {
 	_bounds = zone = area;
 	contents = NULL;
 	nextpp = &contents;
@@ -1123,10 +1123,10 @@
 	return gfx_rects_overlap(bounds, dirty);
 }
 
-static int _gfxwop_container_draw_contents(gfxw_widget_t *widget, gfxw_widget_t *contents) {
-	gfxw_container_t *container = (gfxw_container_t *)widget;
+static int _gfxwop_container_draw_contents(GfxWidget *widget, GfxWidget *contents) {
+	GfxContainer *container = (GfxContainer *)widget;
 	gfx_dirty_rect_t *dirty = container->dirty;
-	gfx_state_t *gfx_state = (widget->_visual) ? widget->_visual->gfx_state : ((gfxw_visual_t *) widget)->gfx_state;
+	gfx_state_t *gfx_state = (widget->_visual) ? widget->_visual->gfx_state : ((GfxVisual *) widget)->gfx_state;
 	int draw_ports;
 	rect_t nullzone = {0, 0, 0, 0};
 
@@ -1134,7 +1134,7 @@
 		return 0;
 
 	while (dirty) {
-		gfxw_widget_t *seeker = contents;
+		GfxWidget *seeker = contents;
 
 		while (seeker) {
 			if (_gfxw_dirty_rect_overlaps_normal_rect(GFXW_IS_CONTAINER(seeker) ? nullzone : container->zone,
@@ -1143,7 +1143,7 @@
 
 				if (GFXW_IS_CONTAINER(seeker)) {// Propagate dirty rectangles /upwards/
 					DDIRTY(stderr, "container_draw_contents: propagate upwards (%d,%d,%d,%d ,0)\n", GFX_PRINT_RECT(dirty->rect));
-					((gfxw_container_t *)seeker)->add_dirty_abs((gfxw_container_t *)seeker, dirty->rect, 0);
+					((GfxContainer *)seeker)->add_dirty_abs((GfxContainer *)seeker, dirty->rect, 0);
 				}
 
 				seeker->_flags |= GFXW_FLAG_DIRTY;
@@ -1160,7 +1160,7 @@
 		dirty = container->dirty;
 
 		while (dirty) {
-			gfxw_widget_t *seeker = contents;
+			GfxWidget *seeker = contents;
 			while (seeker && (draw_ports || !GFXW_IS_PORT(seeker))) {
 				rect_t small_rect;
 				byte draw_noncontainers;
@@ -1193,12 +1193,12 @@
 	return 0;
 }
 
-static int _gfxwop_container_free(gfxw_widget_t *widget) {
-	gfxw_container_t *container = (gfxw_container_t *)widget;
-	gfxw_widget_t *seeker = container->contents;
+static int _gfxwop_container_free(GfxWidget *widget) {
+	GfxContainer *container = (GfxContainer *)widget;
+	GfxWidget *seeker = container->contents;
 
 	while (seeker) {
-		gfxw_widget_t *next = seeker->_next;
+		GfxWidget *next = seeker->_next;
 		seeker->widfree(seeker);
 		seeker = next;
 	}
@@ -1209,9 +1209,9 @@
 	return _gfxwop_basic_free(widget);
 }
 
-static int _gfxwop_container_tag(gfxw_widget_t *widget) {
-	gfxw_container_t *container = (gfxw_container_t *) widget;
-	gfxw_widget_t *seeker = container->contents;
+static int _gfxwop_container_tag(GfxWidget *widget) {
+	GfxContainer *container = (GfxContainer *) widget;
+	GfxWidget *seeker = container->contents;
 
 	while (seeker) {
 		seeker->tag(seeker);
@@ -1221,7 +1221,7 @@
 	return 0;
 }
 
-static int _w_gfxwop_container_set_visual_contents(gfxw_widget_t *contents, gfxw_visual_t *visual) {
+static int _w_gfxwop_container_set_visual_contents(GfxWidget *contents, GfxVisual *visual) {
 	while (contents) {
 		contents->set_visual(contents, visual);
 		contents = contents->_next;
@@ -1229,8 +1229,8 @@
 	return 0;
 }
 
-static int _gfxwop_container_set_visual(gfxw_widget_t *widget, gfxw_visual_t *visual) {
-	gfxw_container_t *container = (gfxw_container_t *) widget;
+static int _gfxwop_container_set_visual(GfxWidget *widget, GfxVisual *visual) {
+	GfxContainer *container = (GfxContainer *) widget;
 
 	container->_visual = visual;
 	if (widget->_parent) {
@@ -1243,11 +1243,11 @@
 	return _w_gfxwop_container_set_visual_contents(container->contents, visual);
 }
 
-static int _gfxwop_container_free_tagged(gfxw_container_t *container) {
-	gfxw_widget_t *seekerp = (container->contents);
+static int _gfxwop_container_free_tagged(GfxContainer *container) {
+	GfxWidget *seekerp = (container->contents);
 
 	while (seekerp) {
-		gfxw_widget_t *redshirt = seekerp;
+		GfxWidget *redshirt = seekerp;
 
 		if (redshirt->_flags & GFXW_FLAG_TAGGED) {
 			seekerp = (redshirt->_next);
@@ -1259,25 +1259,25 @@
 	return 0;
 }
 
-static int _gfxwop_container_free_contents(gfxw_container_t *container) {
-	gfxw_widget_t *seeker = container->contents;
+static int _gfxwop_container_free_contents(GfxContainer *container) {
+	GfxWidget *seeker = container->contents;
 
 	while (seeker) {
-		gfxw_widget_t *next = seeker->_next;
+		GfxWidget *next = seeker->_next;
 		seeker->widfree(seeker);
 		seeker = next;
 	}
 	return 0;
 }
 
-static void _gfxw_dirtify_container(gfxw_container_t *container, gfxw_widget_t *widget) {
+static void _gfxw_dirtify_container(GfxContainer *container, GfxWidget *widget) {
 	if (GFXW_IS_CONTAINER(widget))
 		container->add_dirty_abs(GFXWC(container), widget->_bounds, 1);
 	else
 		container->add_dirty_rel(GFXWC(container), widget->_bounds, 1);
 }
 
-static int _parentize_widget(gfxw_container_t *container, gfxw_widget_t *widget) {
+static int _parentize_widget(GfxContainer *container, GfxWidget *widget) {
 	if (widget->_parent) {
 		GFXERROR("_gfxwop_container_add(): Attempt to give second parent node to widget!\nWidget:");
 		widget->print(GFXW(widget), 3);
@@ -1290,15 +1290,15 @@
 	widget->_parent = GFXWC(container);
 
 	if (GFXW_IS_VISUAL(container))
-		widget->set_visual(widget, (gfxw_visual_t *) container);
+		widget->set_visual(widget, (GfxVisual *) container);
 	else if (container->_visual)
 		widget->set_visual(widget, container->_visual);
 
 	return 0;
 }
 
-static int _gfxw_container_id_equals(gfxw_container_t *container, gfxw_widget_t *widget) {
-	gfxw_widget_t **seekerp = &(container->contents);
+static int _gfxw_container_id_equals(GfxContainer *container, GfxWidget *widget) {
+	GfxWidget **seekerp = &(container->contents);
 
 	if (GFXW_IS_PORT(widget))
 		return 0;
@@ -1323,7 +1323,7 @@
 	}
 }
 
-static int _gfxwop_container_add_dirty(gfxw_container_t *container, rect_t dirty, int propagate) {
+static int _gfxwop_container_add_dirty(GfxContainer *container, rect_t dirty, int propagate) {
 #if 0
 	// This code has been disabled because containers may contain sub-containers with
 	// bounds greater than their own.
@@ -1336,7 +1336,7 @@
 	return 0;
 }
 
-static int _gfxwop_container_add(gfxw_container_t *container, gfxw_widget_t *widget) {
+static int _gfxwop_container_add(GfxContainer *container, GfxWidget *widget) {
 	if (_gfxw_container_id_equals(container, widget))
 		return 0;
 
@@ -1356,10 +1356,10 @@
 
 //*** Lists and sorted lists ***
 
-static int _gfxwop_list_draw(gfxw_widget_t *list, Common::Point pos) {
+static int _gfxwop_list_draw(GfxWidget *list, Common::Point pos) {
 	DRAW_ASSERT(list, GFXW_LIST);
 
-	_gfxwop_container_draw_contents(list, ((gfxw_list_t *)list)->contents);
+	_gfxwop_container_draw_contents(list, ((GfxList *)list)->contents);
 	recursively_free_dirty_rects(GFXWC(list)->dirty);
 	GFXWC(list)->dirty = NULL;
 	list->_flags &= ~GFXW_FLAG_DIRTY;
@@ -1367,34 +1367,34 @@
 	return 0;
 }
 
-static int _gfxwop_sorted_list_draw(gfxw_widget_t *list, Common::Point pos) {
+static int _gfxwop_sorted_list_draw(GfxWidget *list, Common::Point pos) {
 	DRAW_ASSERT(list, GFXW_SORTED_LIST);
 
-	_gfxwop_container_draw_contents(list, ((gfxw_list_t *)list)->contents);
+	_gfxwop_container_draw_contents(list, ((GfxList *)list)->contents);
 	recursively_free_dirty_rects(GFXWC(list)->dirty);
 	GFXWC(list)->dirty = NULL;
 
 	return 0;
 }
 
-static int _w_gfxwop_list_print(gfxw_widget_t *list, const char *name, int indentation) {
+static int _w_gfxwop_list_print(GfxWidget *list, const char *name, int indentation) {
 	_gfxw_print_widget(list, indentation);
 	sciprintf("%s", name);
 
 	return _w_gfxwop_container_print(list, indentation);
 }
 
-static int _gfxwop_list_print(gfxw_widget_t *list, int indentation) {
+static int _gfxwop_list_print(GfxWidget *list, int indentation) {
 	return _w_gfxwop_list_print(list, "LIST", indentation);
 }
 
-static int _gfxwop_sorted_list_print(gfxw_widget_t *list, int indentation) {
+static int _gfxwop_sorted_list_print(GfxWidget *list, int indentation) {
 	return _w_gfxwop_list_print(list, "SORTED_LIST", indentation);
 }
 
-static int _gfxwop_list_equals(gfxw_widget_t *widget, gfxw_widget_t *other) {
+static int _gfxwop_list_equals(GfxWidget *widget, GfxWidget *other) {
 	// Requires identical order of list elements.
-	gfxw_list_t *wlist, *olist;
+	GfxList *wlist, *olist;
 
 	if (widget->_type != other->_type)
 		return 0;
@@ -1406,8 +1406,8 @@
 		return 0;
 	}
 
-	wlist = (gfxw_list_t *)widget;
-	olist = (gfxw_list_t *)other;
+	wlist = (GfxList *)widget;
+	olist = (GfxList *)other;
 
 	if (memcmp(&(wlist->_bounds), &(olist->_bounds), sizeof(rect_t)))
 		return 0;
@@ -1426,7 +1426,7 @@
 	return (!widget && !other); // True if both are finished now
 }
 
-static int _gfxwop_list_add_dirty(gfxw_container_t *container, rect_t dirty, int propagate) {
+static int _gfxwop_list_add_dirty(GfxContainer *container, rect_t dirty, int propagate) {
 	// Lists add dirty boxes to both themselves and their parenting port/visual
 
 	container->_flags |= GFXW_FLAG_DIRTY;
@@ -1441,9 +1441,9 @@
 	return _gfxwop_container_add_dirty(container, dirty, propagate);
 }
 
-int _gfxwop_ordered_add(gfxw_container_t *container, gfxw_widget_t *widget, int compare_all) {
+int _gfxwop_ordered_add(GfxContainer *container, GfxWidget *widget, int compare_all) {
 	// O(n)
-	gfxw_widget_t **seekerp = &(container->contents);
+	GfxWidget **seekerp = &(container->contents);
 
 	if (widget->_next) {
 		GFXERROR("_gfxwop_sorted_list_add(): Attempt to add widget to two lists!\nWidget:");
@@ -1486,13 +1486,13 @@
 	return _parentize_widget(container, widget);
 }
 
-static int _gfxwop_sorted_list_add(gfxw_container_t *container, gfxw_widget_t *widget) {
+static int _gfxwop_sorted_list_add(GfxContainer *container, GfxWidget *widget) {
 	// O(n)
 	return _gfxwop_ordered_add(container, widget, 0);
 }
 
-void _gfxw_set_ops_LIST(gfxw_container_t *list, char sorted) {
-	_gfxw_set_container_ops((gfxw_container_t *)list, sorted ? _gfxwop_sorted_list_draw : _gfxwop_list_draw,
+void _gfxw_set_ops_LIST(GfxContainer *list, char sorted) {
+	_gfxw_set_container_ops((GfxContainer *)list, sorted ? _gfxwop_sorted_list_draw : _gfxwop_list_draw,
 	                        _gfxwop_container_free, _gfxwop_container_tag,
 	                        sorted ? _gfxwop_sorted_list_print : _gfxwop_list_print,
 	                        _gfxwop_basic_compare_to, sorted ? _gfxwop_basic_equals : _gfxwop_list_equals,
@@ -1501,12 +1501,12 @@
 	                        _gfxwop_list_add_dirty, sorted ? _gfxwop_sorted_list_add : _gfxwop_container_add);
 }
 
-gfxw_list_t *gfxw_new_list(rect_t area, int sorted) {
-	return new gfxw_list_t(area, sorted);
+GfxList *gfxw_new_list(rect_t area, int sorted) {
+	return new GfxList(area, sorted);
 }
 
-gfxw_list_t::gfxw_list_t(rect_t area, bool sorted)
-	: gfxw_container_t(area, sorted ? GFXW_SORTED_LIST : GFXW_LIST) {
+GfxList::GfxList(rect_t area, bool sorted)
+	: GfxContainer(area, sorted ? GFXW_SORTED_LIST : GFXW_LIST) {
 
 	_gfxw_set_ops_LIST(this, sorted);
 }
@@ -1515,8 +1515,8 @@
 
 //*** Visuals ***
 
-static int _gfxwop_visual_draw(gfxw_widget_t *widget, Common::Point pos) {
-	gfxw_visual_t *visual = (gfxw_visual_t *) widget;
+static int _gfxwop_visual_draw(GfxWidget *widget, Common::Point pos) {
+	GfxVisual *visual = (GfxVisual *) widget;
 	gfx_dirty_rect_t *dirty = visual->dirty;
 	DRAW_ASSERT(widget, GFXW_VISUAL);
 
@@ -1542,9 +1542,9 @@
 	return 0;
 }
 
-static int _gfxwop_visual_free(gfxw_widget_t *widget) {
-	gfxw_visual_t *visual = (gfxw_visual_t *) widget;
-	gfxw_port_t **portrefs;
+static int _gfxwop_visual_free(GfxWidget *widget) {
+	GfxVisual *visual = (GfxVisual *) widget;
+	GfxPort **portrefs;
 	int retval;
 
 	if (!GFXW_IS_VISUAL(visual)) {
@@ -1562,10 +1562,10 @@
 	return 0;
 }
 
-static int _gfxwop_visual_print(gfxw_widget_t *widget, int indentation) {
+static int _gfxwop_visual_print(GfxWidget *widget, int indentation) {
 	int i;
 	int comma = 0;
-	gfxw_visual_t *visual = (gfxw_visual_t *) widget;
+	GfxVisual *visual = (GfxVisual *) widget;
 
 	if (!GFXW_IS_VISUAL(visual)) {
 		GFXERROR("_gfxwop_visual_print() called on non-visual!Widget was: ");
@@ -1589,7 +1589,7 @@
 	return _w_gfxwop_container_print(widget, indentation);
 }
 
-static int _gfxwop_visual_set_visual(gfxw_widget_t *self, gfxw_visual_t *visual) {
+static int _gfxwop_visual_set_visual(GfxWidget *self, GfxVisual *visual) {
 	if (self != GFXW(visual)) {
 		GFXWARN("Attempt to set a visual's parent visual to something else!\n");
 	} else {
@@ -1599,31 +1599,31 @@
 	return 1;
 }
 
-void _gfxw_set_ops_VISUAL(gfxw_container_t *visual) {
-	_gfxw_set_container_ops((gfxw_container_t *)visual, _gfxwop_visual_draw, _gfxwop_visual_free,
+void _gfxw_set_ops_VISUAL(GfxContainer *visual) {
+	_gfxw_set_container_ops((GfxContainer *)visual, _gfxwop_visual_draw, _gfxwop_visual_free,
 	                        _gfxwop_container_tag, _gfxwop_visual_print, _gfxwop_basic_compare_to,
 	                        _gfxwop_basic_equals, _gfxwop_basic_superarea_of, _gfxwop_visual_set_visual,
 	                        _gfxwop_container_free_tagged, _gfxwop_container_free_contents,
 	                        _gfxwop_container_add_dirty, _gfxwop_container_add);
 }
 
-gfxw_visual_t *gfxw_new_visual(gfx_state_t *state, int font) {
-	return new gfxw_visual_t(state, font);
+GfxVisual *gfxw_new_visual(gfx_state_t *state, int font) {
+	return new GfxVisual(state, font);
 }
 
-gfxw_visual_t::gfxw_visual_t(gfx_state_t *state, int font)
-	: gfxw_container_t(gfx_rect(0, 0, 320, 200), GFXW_VISUAL) {
+GfxVisual::GfxVisual(gfx_state_t *state, int font)
+	: GfxContainer(gfx_rect(0, 0, 320, 200), GFXW_VISUAL) {
 
 	font_nr = font;
 	gfx_state = state;
 
 	port_refs_nr = 16;
-	port_refs = (gfxw_port_t **)sci_calloc(sizeof(gfxw_port_t), port_refs_nr);	// FIXME: Isn't this bogus???
+	port_refs = (GfxPort **)sci_calloc(sizeof(GfxPort), port_refs_nr);	// FIXME: Isn't this bogus???
 
 	_gfxw_set_ops_VISUAL(this);
 }
 
-static int _visual_find_free_ID(gfxw_visual_t *visual) {
+static int _visual_find_free_ID(GfxVisual *visual) {
 	int id = 0;
 	int newports = 16;
 
@@ -1632,14 +1632,14 @@
 
 	if (id == visual->port_refs_nr) { // Out of ports?
 		visual->port_refs_nr += newports;
-		visual->port_refs = (gfxw_port_t**)sci_realloc(visual->port_refs, visual->port_refs_nr);	// FIXME: Isn't this bogus???
-		memset(visual->port_refs + id, 0, newports * sizeof(gfxw_port_t *)); // Clear new port refs
+		visual->port_refs = (GfxPort**)sci_realloc(visual->port_refs, visual->port_refs_nr);	// FIXME: Isn't this bogus???
+		memset(visual->port_refs + id, 0, newports * sizeof(GfxPort *)); // Clear new port refs
 	}
 
 	return id;
 }
 
-static int _gfxwop_add_dirty_rects(gfxw_container_t *dest, gfx_dirty_rect_t *src) {
+static int _gfxwop_add_dirty_rects(GfxContainer *dest, gfx_dirty_rect_t *src) {
 	DDIRTY(stderr, "Adding multiple dirty to #%d\n", dest->_ID);
 	if (src) {
 		dest->dirty = gfxdr_add_dirty(dest->dirty, src->rect, GFXW_DIRTY_STRATEGY);
@@ -1651,8 +1651,8 @@
 
 //*** Ports ***
 
-static int _gfxwop_port_draw(gfxw_widget_t *widget, Common::Point pos) {
-	gfxw_port_t *port = (gfxw_port_t *) widget;
+static int _gfxwop_port_draw(GfxWidget *widget, Common::Point pos) {
+	GfxPort *port = (GfxPort *) widget;
 	DRAW_ASSERT(widget, GFXW_PORT);
 
 	if (port->decorations) {
@@ -1674,11 +1674,11 @@
 	return 0;
 }
 
-static int _gfxwop_port_free(gfxw_widget_t *widget) {
-	gfxw_port_t *port = (gfxw_port_t *) widget;
+static int _gfxwop_port_free(GfxWidget *widget) {
+	GfxPort *port = (GfxPort *) widget;
 
 	if (port->_visual) {
-		gfxw_visual_t *visual = port->_visual;
+		GfxVisual *visual = port->_visual;
 		int ID = port->_ID;
 
 		if (ID < 0 || ID >= visual->port_refs_nr) {
@@ -1699,8 +1699,8 @@
 	return _gfxwop_container_free(widget);
 }
 
-static int _gfxwop_port_print(gfxw_widget_t *widget, int indentation) {
-	gfxw_port_t *port = (gfxw_port_t *)widget;
+static int _gfxwop_port_print(GfxWidget *widget, int indentation) {
+	GfxPort *port = (GfxPort *)widget;
 
 	_gfxw_print_widget(widget, indentation);
 	sciprintf("PORT");
@@ -1712,8 +1712,8 @@
 	return _w_gfxwop_container_print_contents("decorations", GFXW(port->decorations), indentation);
 }
 
-static int _gfxwop_port_superarea_of(gfxw_widget_t *self, gfxw_widget_t *other) {
-	gfxw_port_t *port = (gfxw_port_t *) self;
+static int _gfxwop_port_superarea_of(GfxWidget *self, GfxWidget *other) {
+	GfxPort *port = (GfxPort *) self;
 
 	if (!port->port_bg)
 		return _gfxwop_basic_superarea_of(self, other);
@@ -1721,8 +1721,8 @@
 	return port->port_bg->superarea_of(port->port_bg, other);
 }
 
-static int _gfxwop_port_set_visual(gfxw_widget_t *widget, gfxw_visual_t *visual) {
-	gfxw_list_t *decorations = ((gfxw_port_t *) widget)->decorations;
+static int _gfxwop_port_set_visual(GfxWidget *widget, GfxVisual *visual) {
+	GfxList *decorations = ((GfxPort *) widget)->decorations;
 	widget->_visual = visual;
 
 	if (decorations)
@@ -1735,8 +1735,8 @@
 	return _gfxwop_container_set_visual(widget, visual);
 }
 
-static int _gfxwop_port_add_dirty(gfxw_container_t *widget, rect_t dirty, int propagate) {
-	gfxw_port_t *self = (gfxw_port_t *) widget;
+static int _gfxwop_port_add_dirty(GfxContainer *widget, rect_t dirty, int propagate) {
+	GfxPort *self = (GfxPort *) widget;
 
 	self->_flags |= GFXW_FLAG_DIRTY;
 
@@ -1748,13 +1748,13 @@
 #if 0
 	// FIXME: This is a worthwhile optimization
 	if (self->port_bg) {
-		gfxw_widget_t foo;
+		GfxWidget foo;
 
 		foo.bounds = dirty; // Yeah, sub-elegant, I know
 		foo.bounds.x -= self->zone.x;
 		foo.bounds.y -= self->zone.y;
 		if (self->port_bg->superarea_of(self->port_bg, &foo)) {
-			gfxw_container_t *parent = self->_parent;
+			GfxContainer *parent = self->_parent;
 			while (parent) {
 				fprintf(stderr, "Dirtifying parent id %d\n", parent->_ID);
 				parent->_flags |= GFXW_FLAG_DIRTY;
@@ -1774,24 +1774,24 @@
 	return 0;
 }
 
-static int _gfxwop_port_add(gfxw_container_t *container, gfxw_widget_t *widget) {
+static int _gfxwop_port_add(GfxContainer *container, GfxWidget *widget) {
 	// O(n)
 	return _gfxwop_ordered_add(container, widget, 1);
 }
 
-void _gfxw_set_ops_PORT(gfxw_container_t *widget) {
-	_gfxw_set_container_ops((gfxw_container_t *)widget, _gfxwop_port_draw, _gfxwop_port_free, _gfxwop_container_tag,
+void _gfxw_set_ops_PORT(GfxContainer *widget) {
+	_gfxw_set_container_ops((GfxContainer *)widget, _gfxwop_port_draw, _gfxwop_port_free, _gfxwop_container_tag,
 	                        _gfxwop_port_print, _gfxwop_basic_compare_to, _gfxwop_basic_equals, _gfxwop_port_superarea_of,
 	                        _gfxwop_port_set_visual, _gfxwop_container_free_tagged, _gfxwop_container_free_contents,
 	                        _gfxwop_port_add_dirty, _gfxwop_port_add);
 }
 
-gfxw_port_t *gfxw_new_port(gfxw_visual_t *visual, gfxw_port_t *predecessor, rect_t area, gfx_color_t fgcolor, gfx_color_t bgcolor) {
-	return new gfxw_port_t(visual, area, fgcolor, bgcolor);
+GfxPort *gfxw_new_port(GfxVisual *visual, GfxPort *predecessor, rect_t area, gfx_color_t fgcolor, gfx_color_t bgcolor) {
+	return new GfxPort(visual, area, fgcolor, bgcolor);
 }
 
-gfxw_port_t::gfxw_port_t(gfxw_visual_t *visual_, rect_t area, gfx_color_t fgcolor, gfx_color_t bgcolor_)
-	: gfxw_container_t(area, GFXW_PORT) {
+GfxPort::GfxPort(GfxVisual *visual_, rect_t area, gfx_color_t fgcolor, gfx_color_t bgcolor_)
+	: GfxContainer(area, GFXW_PORT) {
 	VERIFY_WIDGET(visual_);
 
 	port_bg = NULL;
@@ -1809,13 +1809,13 @@
 	_gfxw_set_ops_PORT(this);
 }
 
-void gfxw_port_auto_restore_background(gfxw_visual_t *visual, gfxw_port_t *window, rect_t auto_rect) {

@@ Diff output truncated at 100000 characters. @@

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list