view plugins/crazychat/cc_gtk_gl.h @ 12115:e9790eb93216

[gaim-migrate @ 14415] quoth charkins: " This patch has a few small fixes for the visibility stuff in gtkblist.c. First, tracking of the ICONIFIED state of the blist was removed. This was intended to allow the blist to "remember" if it was minimized between restarts. Unfortunately, this is not possible because the ICONIFIED state gets set when the blist is on a different desktop with many window managers. Second, while talking about the ICONIFIED issue on #gtk@GIMPNet, muntyan_ asked about a bug where the blist would get shown on an account re-connect with 1.5.0. Luke mentioned something about this with cvs as well. This patch introduces a check in gaim_gtk_blist_show() to prevent the window from being shown if it already exists and is visible. Third, sadrul pointed me to a one-line fix for the missing blist on startup. I added a second line to make sure the blist restores its proper size as well. Finally, when the last visibility manager is removed, gaim will now minimize the blist if it was previously hidden, rather than showing it. This could prevent a race condition with out-of-process applets, preventing gaim from maintaining the visibility state properly between restarts. This was 'cvs diff'ed against the last available anon cvs from Friday. Hopefully it'll apply cleanly." it did. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 16 Nov 2005 17:55:26 +0000
parents ed017b9c532d
children fc464a0abccc
line wrap: on
line source

#include <gtk/gtk.h>
#include <gtk/gtkgl.h>

#define DEFAULT_FRAME_DELAY		40

typedef void (gl_init_func) (GtkWidget *widget, void *data);
typedef gboolean (*gl_config_func) (GtkWidget *widget, GdkEventConfigure *event,
		void *data);
typedef gboolean (*gl_draw_func) (GtkWidget *widget, GdkEventExpose *event,
			      void *data);

struct draw_info {
	gboolean timeout;		/* use/not use a timer callback */
	int timer_id;			/* glib timer callback id */
	guint delay_ms;			/* timer callback delay in ms */
	void *data;			/* drawing data */
};

struct window_box {
	GtkWidget *window;
	GtkWidget *vbox;
	GtkWidget *draw_area;
};

/**
 * Initialize the gtkglext framework for all our widgets.
 * @return		0 on success, non-zero on failure
 */
int cc_init_gtk_gl();

/**
 * Create a new OpenGL enabled window
 * @param init		the initialize callback function
 * @param draw		the drawing callback function
 * @param data		drawing metadata
 * @param ret		struct with returned window and vbox
 */
void cc_new_gl_window(gl_init_func init, gl_config_func config,
		gl_draw_func draw, struct draw_info *data,
		struct window_box *ret);

/**
 * Create a new OpenGL enabled drawing area widget.
 * @param init		the initialize callback function
 * @param draw		the drawing callback function
 * @param data		drawing metadata
 * @return 		the drawing widget
 */
GtkWidget *cc_new_gl_area(gl_init_func init, gl_config_func config,
		gl_draw_func draw, struct draw_info *data);