Index: [thread] [date] [subject] [author]
  From: Tristan Wibberley <twibberley@llamacom.com>
  To  : ggi-develop@eskimo.com
  Date: Sun, 30 Aug 1998 04:39:49 +0000

New function in libggiMisc RFC.

Hi all,

I think something is needed for greater window system support (in X and
eventually berlin).

It would be nice to see sets of widgets that use ggi to draw. I propose
one new call in ggiMisc and some new struct definitions.

The call would do nothing on most targets, but on X you fill in a struct
with some data such as title, geometry, borderstyle and pass that to
this function which the target implements. GGI should not specify the
behaviour but the target should - ie, you need to know what you're
doing, but it's not complicated.

eg: (pseudocode):

#define GGI_WINSTD structsize;

typedef void *ggimisc_win_t;

typedef struct {
	GGI_WINSTD;
	title;
	resizeable;	/* not by default no way, but allows
			   you to resize and check mode on EvExpose */
	geometry;
	winstyleflags;
} ggimisc_xwin;

typedef struct {
	GGI_WINSTD;
	title;
	titleface;
	blah;
} ggimisc_berlin;

void setupwin(gg_visual_t vis)
{
	ggimisc_win_t windata;
	ggimisc_xwin xwindata;

	/* fill the xwindata struct */
	windata = (ggimisc_win_t)(&xwindata);
	ggiSetWinData(windata);	/* copies the data ready for use if mode not
				   set yet, else uses the data */
}



We need a way to tell what target ggiOpen(NULL) has chosen, is that
possible already. A programmer needs to be able to choose how to fill in
the struct for the windowsystem being used.


This definately needs a lot of thought, but I think we should implement
something like this.

--
Tristan

Index: [thread] [date] [subject] [author]