Mercurial > pidgin.yaz
annotate plugins/crazychat/cc_gtk_gl.h @ 13591:dcfda39ad547
[gaim-migrate @ 15977]
I know this just generates some c code that no one is actually supposed to
look at, but I did one time and the lack of indentation hurt me. This should
fix it and not break anything.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Fri, 07 Apr 2006 01:05:48 +0000 |
parents | fc464a0abccc |
children |
rev | line source |
---|---|
11218 | 1 #include <gtk/gtk.h> |
2 #include <gtk/gtkgl.h> | |
3 | |
4 #define DEFAULT_FRAME_DELAY 40 | |
5 | |
6 typedef void (gl_init_func) (GtkWidget *widget, void *data); | |
7 typedef gboolean (*gl_config_func) (GtkWidget *widget, GdkEventConfigure *event, | |
8 void *data); | |
9 typedef gboolean (*gl_draw_func) (GtkWidget *widget, GdkEventExpose *event, | |
10 void *data); | |
11 | |
12 struct draw_info { | |
13 gboolean timeout; /* use/not use a timer callback */ | |
14 int timer_id; /* glib timer callback id */ | |
15 guint delay_ms; /* timer callback delay in ms */ | |
16 void *data; /* drawing data */ | |
17 }; | |
18 | |
19 struct window_box { | |
20 GtkWidget *window; | |
21 GtkWidget *vbox; | |
22 GtkWidget *draw_area; | |
23 }; | |
24 | |
25 /** | |
26 * Initialize the gtkglext framework for all our widgets. | |
27 * @return 0 on success, non-zero on failure | |
28 */ | |
12323
fc464a0abccc
[gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents:
11218
diff
changeset
|
29 int cc_init_gtk_gl(void); |
11218 | 30 |
31 /** | |
32 * Create a new OpenGL enabled window | |
33 * @param init the initialize callback function | |
34 * @param draw the drawing callback function | |
35 * @param data drawing metadata | |
36 * @param ret struct with returned window and vbox | |
37 */ | |
38 void cc_new_gl_window(gl_init_func init, gl_config_func config, | |
39 gl_draw_func draw, struct draw_info *data, | |
40 struct window_box *ret); | |
41 | |
42 /** | |
43 * Create a new OpenGL enabled drawing area widget. | |
44 * @param init the initialize callback function | |
45 * @param draw the drawing callback function | |
46 * @param data drawing metadata | |
47 * @return the drawing widget | |
48 */ | |
49 GtkWidget *cc_new_gl_area(gl_init_func init, gl_config_func config, | |
50 gl_draw_func draw, struct draw_info *data); |