changes related to temperature and layout
[monky] / lua / libcairo.c
1 /*
2 ** Lua binding: cairo
3 ** Generated automatically by tolua++-1.0.93 on Thu Mar 25 13:31:24 2010.
4 */
5
6 #ifndef __cplusplus
7 #include "stdlib.h"
8 #endif
9 #include "string.h"
10
11 #include "tolua++.h"
12
13 /* Exported function */
14 TOLUA_API int  tolua_cairo_open (lua_State* tolua_S);
15
16 #include <cairo-features.h>
17 #include <cairo-deprecated.h>
18 #include <cairo.h>
19 #include <cairo-xlib.h>
20 #include <X11/Xlib.h>
21 #include "libcairo-helper.h"
22
23 /* function to release collected object via destructor */
24 #ifdef __cplusplus
25
26 static int tolua_collect_cairo_user_scaled_font_render_glyph_func_t (lua_State* tolua_S)
27 {
28  cairo_user_scaled_font_render_glyph_func_t* self = (cairo_user_scaled_font_render_glyph_func_t*) tolua_tousertype(tolua_S,1,0);
29         Mtolua_delete(self);
30         return 0;
31 }
32
33 static int tolua_collect_Drawable (lua_State* tolua_S)
34 {
35  Drawable* self = (Drawable*) tolua_tousertype(tolua_S,1,0);
36         Mtolua_delete(self);
37         return 0;
38 }
39
40 static int tolua_collect_cairo_user_scaled_font_init_func_t (lua_State* tolua_S)
41 {
42  cairo_user_scaled_font_init_func_t* self = (cairo_user_scaled_font_init_func_t*) tolua_tousertype(tolua_S,1,0);
43         Mtolua_delete(self);
44         return 0;
45 }
46
47 static int tolua_collect_cairo_user_scaled_font_text_to_glyphs_func_t (lua_State* tolua_S)
48 {
49  cairo_user_scaled_font_text_to_glyphs_func_t* self = (cairo_user_scaled_font_text_to_glyphs_func_t*) tolua_tousertype(tolua_S,1,0);
50         Mtolua_delete(self);
51         return 0;
52 }
53
54 static int tolua_collect_cairo_user_scaled_font_unicode_to_glyph_func_t (lua_State* tolua_S)
55 {
56  cairo_user_scaled_font_unicode_to_glyph_func_t* self = (cairo_user_scaled_font_unicode_to_glyph_func_t*) tolua_tousertype(tolua_S,1,0);
57         Mtolua_delete(self);
58         return 0;
59 }
60 #endif
61
62
63 /* function to register type */
64 static void tolua_reg_types (lua_State* tolua_S)
65 {
66  tolua_usertype(tolua_S,"cairo_text_cluster_t");
67  tolua_usertype(tolua_S,"cairo_user_scaled_font_init_func_t");
68  tolua_usertype(tolua_S,"Screen");
69  tolua_usertype(tolua_S,"cairo_read_func_t");
70  tolua_usertype(tolua_S,"cairo_write_func_t");
71  tolua_usertype(tolua_S,"_cairo_surface");
72  tolua_usertype(tolua_S,"Drawable");
73  tolua_usertype(tolua_S,"_cairo_font_options");
74  tolua_usertype(tolua_S,"cairo_path_t");
75  tolua_usertype(tolua_S,"cairo_user_scaled_font_unicode_to_glyph_func_t");
76  tolua_usertype(tolua_S,"_cairo_pattern");
77  tolua_usertype(tolua_S,"cairo_destroy_func_t");
78  tolua_usertype(tolua_S,"Visual");
79  tolua_usertype(tolua_S,"cairo_text_extents_t");
80  tolua_usertype(tolua_S,"_cairo_path_data_t");
81  tolua_usertype(tolua_S,"cairo_user_scaled_font_render_glyph_func_t");
82  tolua_usertype(tolua_S,"_cairo_scaled_font");
83  tolua_usertype(tolua_S,"_cairo_font_face");
84  tolua_usertype(tolua_S,"cairo_user_scaled_font_text_to_glyphs_func_t");
85  tolua_usertype(tolua_S,"cairo_rectangle_list_t");
86  tolua_usertype(tolua_S,"Pixmap");
87  tolua_usertype(tolua_S,"cairo_font_extents_t");
88  tolua_usertype(tolua_S,"_cairo");
89  tolua_usertype(tolua_S,"cairo_rectangle_t");
90  tolua_usertype(tolua_S,"Display");
91  tolua_usertype(tolua_S,"cairo_user_data_key_t");
92  tolua_usertype(tolua_S,"cairo_matrix_t");
93  tolua_usertype(tolua_S,"cairo_glyph_t");
94 }
95
96 /* get function: xx of class  cairo_matrix_t */
97 #ifndef TOLUA_DISABLE_tolua_get_cairo_matrix_t_xx
98 static int tolua_get_cairo_matrix_t_xx(lua_State* tolua_S)
99 {
100   cairo_matrix_t* self = (cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0);
101 #ifndef TOLUA_RELEASE
102   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'xx'",NULL);
103 #endif
104   tolua_pushnumber(tolua_S,(lua_Number)self->xx);
105  return 1;
106 }
107 #endif //#ifndef TOLUA_DISABLE
108
109 /* set function: xx of class  cairo_matrix_t */
110 #ifndef TOLUA_DISABLE_tolua_set_cairo_matrix_t_xx
111 static int tolua_set_cairo_matrix_t_xx(lua_State* tolua_S)
112 {
113   cairo_matrix_t* self = (cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0);
114 #ifndef TOLUA_RELEASE
115   tolua_Error tolua_err;
116   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'xx'",NULL);
117   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
118    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
119 #endif
120   self->xx = ((double)  tolua_tonumber(tolua_S,2,0))
121 ;
122  return 0;
123 }
124 #endif //#ifndef TOLUA_DISABLE
125
126 /* get function: yx of class  cairo_matrix_t */
127 #ifndef TOLUA_DISABLE_tolua_get_cairo_matrix_t_yx
128 static int tolua_get_cairo_matrix_t_yx(lua_State* tolua_S)
129 {
130   cairo_matrix_t* self = (cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0);
131 #ifndef TOLUA_RELEASE
132   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'yx'",NULL);
133 #endif
134   tolua_pushnumber(tolua_S,(lua_Number)self->yx);
135  return 1;
136 }
137 #endif //#ifndef TOLUA_DISABLE
138
139 /* set function: yx of class  cairo_matrix_t */
140 #ifndef TOLUA_DISABLE_tolua_set_cairo_matrix_t_yx
141 static int tolua_set_cairo_matrix_t_yx(lua_State* tolua_S)
142 {
143   cairo_matrix_t* self = (cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0);
144 #ifndef TOLUA_RELEASE
145   tolua_Error tolua_err;
146   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'yx'",NULL);
147   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
148    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
149 #endif
150   self->yx = ((double)  tolua_tonumber(tolua_S,2,0))
151 ;
152  return 0;
153 }
154 #endif //#ifndef TOLUA_DISABLE
155
156 /* get function: xy of class  cairo_matrix_t */
157 #ifndef TOLUA_DISABLE_tolua_get_cairo_matrix_t_xy
158 static int tolua_get_cairo_matrix_t_xy(lua_State* tolua_S)
159 {
160   cairo_matrix_t* self = (cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0);
161 #ifndef TOLUA_RELEASE
162   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'xy'",NULL);
163 #endif
164   tolua_pushnumber(tolua_S,(lua_Number)self->xy);
165  return 1;
166 }
167 #endif //#ifndef TOLUA_DISABLE
168
169 /* set function: xy of class  cairo_matrix_t */
170 #ifndef TOLUA_DISABLE_tolua_set_cairo_matrix_t_xy
171 static int tolua_set_cairo_matrix_t_xy(lua_State* tolua_S)
172 {
173   cairo_matrix_t* self = (cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0);
174 #ifndef TOLUA_RELEASE
175   tolua_Error tolua_err;
176   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'xy'",NULL);
177   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
178    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
179 #endif
180   self->xy = ((double)  tolua_tonumber(tolua_S,2,0))
181 ;
182  return 0;
183 }
184 #endif //#ifndef TOLUA_DISABLE
185
186 /* get function: yy of class  cairo_matrix_t */
187 #ifndef TOLUA_DISABLE_tolua_get_cairo_matrix_t_yy
188 static int tolua_get_cairo_matrix_t_yy(lua_State* tolua_S)
189 {
190   cairo_matrix_t* self = (cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0);
191 #ifndef TOLUA_RELEASE
192   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'yy'",NULL);
193 #endif
194   tolua_pushnumber(tolua_S,(lua_Number)self->yy);
195  return 1;
196 }
197 #endif //#ifndef TOLUA_DISABLE
198
199 /* set function: yy of class  cairo_matrix_t */
200 #ifndef TOLUA_DISABLE_tolua_set_cairo_matrix_t_yy
201 static int tolua_set_cairo_matrix_t_yy(lua_State* tolua_S)
202 {
203   cairo_matrix_t* self = (cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0);
204 #ifndef TOLUA_RELEASE
205   tolua_Error tolua_err;
206   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'yy'",NULL);
207   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
208    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
209 #endif
210   self->yy = ((double)  tolua_tonumber(tolua_S,2,0))
211 ;
212  return 0;
213 }
214 #endif //#ifndef TOLUA_DISABLE
215
216 /* get function: x0 of class  cairo_matrix_t */
217 #ifndef TOLUA_DISABLE_tolua_get_cairo_matrix_t_x0
218 static int tolua_get_cairo_matrix_t_x0(lua_State* tolua_S)
219 {
220   cairo_matrix_t* self = (cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0);
221 #ifndef TOLUA_RELEASE
222   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x0'",NULL);
223 #endif
224   tolua_pushnumber(tolua_S,(lua_Number)self->x0);
225  return 1;
226 }
227 #endif //#ifndef TOLUA_DISABLE
228
229 /* set function: x0 of class  cairo_matrix_t */
230 #ifndef TOLUA_DISABLE_tolua_set_cairo_matrix_t_x0
231 static int tolua_set_cairo_matrix_t_x0(lua_State* tolua_S)
232 {
233   cairo_matrix_t* self = (cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0);
234 #ifndef TOLUA_RELEASE
235   tolua_Error tolua_err;
236   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x0'",NULL);
237   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
238    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
239 #endif
240   self->x0 = ((double)  tolua_tonumber(tolua_S,2,0))
241 ;
242  return 0;
243 }
244 #endif //#ifndef TOLUA_DISABLE
245
246 /* get function: y0 of class  cairo_matrix_t */
247 #ifndef TOLUA_DISABLE_tolua_get_cairo_matrix_t_y0
248 static int tolua_get_cairo_matrix_t_y0(lua_State* tolua_S)
249 {
250   cairo_matrix_t* self = (cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0);
251 #ifndef TOLUA_RELEASE
252   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y0'",NULL);
253 #endif
254   tolua_pushnumber(tolua_S,(lua_Number)self->y0);
255  return 1;
256 }
257 #endif //#ifndef TOLUA_DISABLE
258
259 /* set function: y0 of class  cairo_matrix_t */
260 #ifndef TOLUA_DISABLE_tolua_set_cairo_matrix_t_y0
261 static int tolua_set_cairo_matrix_t_y0(lua_State* tolua_S)
262 {
263   cairo_matrix_t* self = (cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0);
264 #ifndef TOLUA_RELEASE
265   tolua_Error tolua_err;
266   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y0'",NULL);
267   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
268    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
269 #endif
270   self->y0 = ((double)  tolua_tonumber(tolua_S,2,0))
271 ;
272  return 0;
273 }
274 #endif //#ifndef TOLUA_DISABLE
275
276 /* method: create_cairo_matrix_t of class  cairo_matrix_t */
277 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_matrix_t_create00
278 static int tolua_cairo_cairo_matrix_t_create00(lua_State* tolua_S)
279 {
280 #ifndef TOLUA_RELEASE
281  tolua_Error tolua_err;
282  if (
283      !tolua_isusertable(tolua_S,1,"cairo_matrix_t",0,&tolua_err) ||
284      !tolua_isnoobj(tolua_S,2,&tolua_err)
285  )
286   goto tolua_lerror;
287  else
288 #endif
289  {
290   {
291    tolua_outside cairo_matrix_t* tolua_ret = (tolua_outside cairo_matrix_t*)  create_cairo_matrix_t();
292     tolua_pushusertype(tolua_S,(void*)tolua_ret,"cairo_matrix_t");
293   }
294  }
295  return 1;
296 #ifndef TOLUA_RELEASE
297  tolua_lerror:
298  tolua_error(tolua_S,"#ferror in function 'create'.",&tolua_err);
299  return 0;
300 #endif
301 }
302 #endif //#ifndef TOLUA_DISABLE
303
304 /* get function: unused of class  cairo_user_data_key_t */
305 #ifndef TOLUA_DISABLE_tolua_get_cairo_user_data_key_t_unused
306 static int tolua_get_cairo_user_data_key_t_unused(lua_State* tolua_S)
307 {
308   cairo_user_data_key_t* self = (cairo_user_data_key_t*)  tolua_tousertype(tolua_S,1,0);
309 #ifndef TOLUA_RELEASE
310   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'unused'",NULL);
311 #endif
312   tolua_pushnumber(tolua_S,(lua_Number)self->unused);
313  return 1;
314 }
315 #endif //#ifndef TOLUA_DISABLE
316
317 /* set function: unused of class  cairo_user_data_key_t */
318 #ifndef TOLUA_DISABLE_tolua_set_cairo_user_data_key_t_unused
319 static int tolua_set_cairo_user_data_key_t_unused(lua_State* tolua_S)
320 {
321   cairo_user_data_key_t* self = (cairo_user_data_key_t*)  tolua_tousertype(tolua_S,1,0);
322 #ifndef TOLUA_RELEASE
323   tolua_Error tolua_err;
324   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'unused'",NULL);
325   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
326    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
327 #endif
328   self->unused = ((int)  tolua_tonumber(tolua_S,2,0))
329 ;
330  return 0;
331 }
332 #endif //#ifndef TOLUA_DISABLE
333
334 /* function: cairo_xlib_surface_create */
335 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_xlib_surface_create00
336 static int tolua_cairo_cairo_xlib_surface_create00(lua_State* tolua_S)
337 {
338 #ifndef TOLUA_RELEASE
339  tolua_Error tolua_err;
340  if (
341      !tolua_isusertype(tolua_S,1,"Display",0,&tolua_err) ||
342      (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Drawable",0,&tolua_err)) ||
343      !tolua_isusertype(tolua_S,3,"Visual",0,&tolua_err) ||
344      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
345      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
346      !tolua_isnoobj(tolua_S,6,&tolua_err)
347  )
348   goto tolua_lerror;
349  else
350 #endif
351  {
352   Display* dpy = ((Display*)  tolua_tousertype(tolua_S,1,0));
353   Drawable drawable = *((Drawable*)  tolua_tousertype(tolua_S,2,0));
354   Visual* visual = ((Visual*)  tolua_tousertype(tolua_S,3,0));
355   int width = ((int)  tolua_tonumber(tolua_S,4,0));
356   int height = ((int)  tolua_tonumber(tolua_S,5,0));
357   {
358    struct _cairo_surface* tolua_ret = ( struct _cairo_surface*)  cairo_xlib_surface_create(dpy,drawable,visual,width,height);
359     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_surface");
360   }
361  }
362  return 1;
363 #ifndef TOLUA_RELEASE
364  tolua_lerror:
365  tolua_error(tolua_S,"#ferror in function 'cairo_xlib_surface_create'.",&tolua_err);
366  return 0;
367 #endif
368 }
369 #endif //#ifndef TOLUA_DISABLE
370
371 /* function: cairo_xlib_surface_create_for_bitmap */
372 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_xlib_surface_create_for_bitmap00
373 static int tolua_cairo_cairo_xlib_surface_create_for_bitmap00(lua_State* tolua_S)
374 {
375 #ifndef TOLUA_RELEASE
376  tolua_Error tolua_err;
377  if (
378      !tolua_isusertype(tolua_S,1,"Display",0,&tolua_err) ||
379      (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Pixmap",0,&tolua_err)) ||
380      !tolua_isusertype(tolua_S,3,"Screen",0,&tolua_err) ||
381      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
382      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
383      !tolua_isnoobj(tolua_S,6,&tolua_err)
384  )
385   goto tolua_lerror;
386  else
387 #endif
388  {
389   Display* dpy = ((Display*)  tolua_tousertype(tolua_S,1,0));
390   Pixmap bitmap = *((Pixmap*)  tolua_tousertype(tolua_S,2,0));
391   Screen* screen = ((Screen*)  tolua_tousertype(tolua_S,3,0));
392   int width = ((int)  tolua_tonumber(tolua_S,4,0));
393   int height = ((int)  tolua_tonumber(tolua_S,5,0));
394   {
395    struct _cairo_surface* tolua_ret = ( struct _cairo_surface*)  cairo_xlib_surface_create_for_bitmap(dpy,bitmap,screen,width,height);
396     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_surface");
397   }
398  }
399  return 1;
400 #ifndef TOLUA_RELEASE
401  tolua_lerror:
402  tolua_error(tolua_S,"#ferror in function 'cairo_xlib_surface_create_for_bitmap'.",&tolua_err);
403  return 0;
404 #endif
405 }
406 #endif //#ifndef TOLUA_DISABLE
407
408 /* function: cairo_xlib_surface_set_size */
409 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_xlib_surface_set_size00
410 static int tolua_cairo_cairo_xlib_surface_set_size00(lua_State* tolua_S)
411 {
412 #ifndef TOLUA_RELEASE
413  tolua_Error tolua_err;
414  if (
415      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
416      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
417      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
418      !tolua_isnoobj(tolua_S,4,&tolua_err)
419  )
420   goto tolua_lerror;
421  else
422 #endif
423  {
424   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
425   int width = ((int)  tolua_tonumber(tolua_S,2,0));
426   int height = ((int)  tolua_tonumber(tolua_S,3,0));
427   {
428    cairo_xlib_surface_set_size(surface,width,height);
429   }
430  }
431  return 0;
432 #ifndef TOLUA_RELEASE
433  tolua_lerror:
434  tolua_error(tolua_S,"#ferror in function 'cairo_xlib_surface_set_size'.",&tolua_err);
435  return 0;
436 #endif
437 }
438 #endif //#ifndef TOLUA_DISABLE
439
440 /* function: cairo_xlib_surface_set_drawable */
441 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_xlib_surface_set_drawable00
442 static int tolua_cairo_cairo_xlib_surface_set_drawable00(lua_State* tolua_S)
443 {
444 #ifndef TOLUA_RELEASE
445  tolua_Error tolua_err;
446  if (
447      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
448      (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"Drawable",0,&tolua_err)) ||
449      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
450      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
451      !tolua_isnoobj(tolua_S,5,&tolua_err)
452  )
453   goto tolua_lerror;
454  else
455 #endif
456  {
457   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
458   Drawable drawable = *((Drawable*)  tolua_tousertype(tolua_S,2,0));
459   int width = ((int)  tolua_tonumber(tolua_S,3,0));
460   int height = ((int)  tolua_tonumber(tolua_S,4,0));
461   {
462    cairo_xlib_surface_set_drawable(surface,drawable,width,height);
463   }
464  }
465  return 0;
466 #ifndef TOLUA_RELEASE
467  tolua_lerror:
468  tolua_error(tolua_S,"#ferror in function 'cairo_xlib_surface_set_drawable'.",&tolua_err);
469  return 0;
470 #endif
471 }
472 #endif //#ifndef TOLUA_DISABLE
473
474 /* function: cairo_xlib_surface_get_display */
475 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_xlib_surface_get_display00
476 static int tolua_cairo_cairo_xlib_surface_get_display00(lua_State* tolua_S)
477 {
478 #ifndef TOLUA_RELEASE
479  tolua_Error tolua_err;
480  if (
481      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
482      !tolua_isnoobj(tolua_S,2,&tolua_err)
483  )
484   goto tolua_lerror;
485  else
486 #endif
487  {
488   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
489   {
490    Display* tolua_ret = (Display*)  cairo_xlib_surface_get_display(surface);
491     tolua_pushusertype(tolua_S,(void*)tolua_ret,"Display");
492   }
493  }
494  return 1;
495 #ifndef TOLUA_RELEASE
496  tolua_lerror:
497  tolua_error(tolua_S,"#ferror in function 'cairo_xlib_surface_get_display'.",&tolua_err);
498  return 0;
499 #endif
500 }
501 #endif //#ifndef TOLUA_DISABLE
502
503 /* function: cairo_xlib_surface_get_drawable */
504 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_xlib_surface_get_drawable00
505 static int tolua_cairo_cairo_xlib_surface_get_drawable00(lua_State* tolua_S)
506 {
507 #ifndef TOLUA_RELEASE
508  tolua_Error tolua_err;
509  if (
510      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
511      !tolua_isnoobj(tolua_S,2,&tolua_err)
512  )
513   goto tolua_lerror;
514  else
515 #endif
516  {
517   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
518   {
519    Drawable tolua_ret = (Drawable)  cairo_xlib_surface_get_drawable(surface);
520    {
521 #ifdef __cplusplus
522     void* tolua_obj = Mtolua_new((Drawable)(tolua_ret));
523      tolua_pushusertype(tolua_S,tolua_obj,"Drawable");
524     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
525 #else
526     void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(Drawable));
527      tolua_pushusertype(tolua_S,tolua_obj,"Drawable");
528     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
529 #endif
530    }
531   }
532  }
533  return 1;
534 #ifndef TOLUA_RELEASE
535  tolua_lerror:
536  tolua_error(tolua_S,"#ferror in function 'cairo_xlib_surface_get_drawable'.",&tolua_err);
537  return 0;
538 #endif
539 }
540 #endif //#ifndef TOLUA_DISABLE
541
542 /* function: cairo_xlib_surface_get_screen */
543 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_xlib_surface_get_screen00
544 static int tolua_cairo_cairo_xlib_surface_get_screen00(lua_State* tolua_S)
545 {
546 #ifndef TOLUA_RELEASE
547  tolua_Error tolua_err;
548  if (
549      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
550      !tolua_isnoobj(tolua_S,2,&tolua_err)
551  )
552   goto tolua_lerror;
553  else
554 #endif
555  {
556   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
557   {
558    Screen* tolua_ret = (Screen*)  cairo_xlib_surface_get_screen(surface);
559     tolua_pushusertype(tolua_S,(void*)tolua_ret,"Screen");
560   }
561  }
562  return 1;
563 #ifndef TOLUA_RELEASE
564  tolua_lerror:
565  tolua_error(tolua_S,"#ferror in function 'cairo_xlib_surface_get_screen'.",&tolua_err);
566  return 0;
567 #endif
568 }
569 #endif //#ifndef TOLUA_DISABLE
570
571 /* function: cairo_xlib_surface_get_visual */
572 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_xlib_surface_get_visual00
573 static int tolua_cairo_cairo_xlib_surface_get_visual00(lua_State* tolua_S)
574 {
575 #ifndef TOLUA_RELEASE
576  tolua_Error tolua_err;
577  if (
578      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
579      !tolua_isnoobj(tolua_S,2,&tolua_err)
580  )
581   goto tolua_lerror;
582  else
583 #endif
584  {
585   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
586   {
587    Visual* tolua_ret = (Visual*)  cairo_xlib_surface_get_visual(surface);
588     tolua_pushusertype(tolua_S,(void*)tolua_ret,"Visual");
589   }
590  }
591  return 1;
592 #ifndef TOLUA_RELEASE
593  tolua_lerror:
594  tolua_error(tolua_S,"#ferror in function 'cairo_xlib_surface_get_visual'.",&tolua_err);
595  return 0;
596 #endif
597 }
598 #endif //#ifndef TOLUA_DISABLE
599
600 /* function: cairo_xlib_surface_get_depth */
601 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_xlib_surface_get_depth00
602 static int tolua_cairo_cairo_xlib_surface_get_depth00(lua_State* tolua_S)
603 {
604 #ifndef TOLUA_RELEASE
605  tolua_Error tolua_err;
606  if (
607      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
608      !tolua_isnoobj(tolua_S,2,&tolua_err)
609  )
610   goto tolua_lerror;
611  else
612 #endif
613  {
614   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
615   {
616    int tolua_ret = (int)  cairo_xlib_surface_get_depth(surface);
617    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
618   }
619  }
620  return 1;
621 #ifndef TOLUA_RELEASE
622  tolua_lerror:
623  tolua_error(tolua_S,"#ferror in function 'cairo_xlib_surface_get_depth'.",&tolua_err);
624  return 0;
625 #endif
626 }
627 #endif //#ifndef TOLUA_DISABLE
628
629 /* function: cairo_xlib_surface_get_width */
630 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_xlib_surface_get_width00
631 static int tolua_cairo_cairo_xlib_surface_get_width00(lua_State* tolua_S)
632 {
633 #ifndef TOLUA_RELEASE
634  tolua_Error tolua_err;
635  if (
636      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
637      !tolua_isnoobj(tolua_S,2,&tolua_err)
638  )
639   goto tolua_lerror;
640  else
641 #endif
642  {
643   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
644   {
645    int tolua_ret = (int)  cairo_xlib_surface_get_width(surface);
646    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
647   }
648  }
649  return 1;
650 #ifndef TOLUA_RELEASE
651  tolua_lerror:
652  tolua_error(tolua_S,"#ferror in function 'cairo_xlib_surface_get_width'.",&tolua_err);
653  return 0;
654 #endif
655 }
656 #endif //#ifndef TOLUA_DISABLE
657
658 /* function: cairo_xlib_surface_get_height */
659 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_xlib_surface_get_height00
660 static int tolua_cairo_cairo_xlib_surface_get_height00(lua_State* tolua_S)
661 {
662 #ifndef TOLUA_RELEASE
663  tolua_Error tolua_err;
664  if (
665      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
666      !tolua_isnoobj(tolua_S,2,&tolua_err)
667  )
668   goto tolua_lerror;
669  else
670 #endif
671  {
672   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
673   {
674    int tolua_ret = (int)  cairo_xlib_surface_get_height(surface);
675    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
676   }
677  }
678  return 1;
679 #ifndef TOLUA_RELEASE
680  tolua_lerror:
681  tolua_error(tolua_S,"#ferror in function 'cairo_xlib_surface_get_height'.",&tolua_err);
682  return 0;
683 #endif
684 }
685 #endif //#ifndef TOLUA_DISABLE
686
687 /* function: cairo_version */
688 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_version00
689 static int tolua_cairo_cairo_version00(lua_State* tolua_S)
690 {
691 #ifndef TOLUA_RELEASE
692  tolua_Error tolua_err;
693  if (
694      !tolua_isnoobj(tolua_S,1,&tolua_err)
695  )
696   goto tolua_lerror;
697  else
698 #endif
699  {
700   {
701    int tolua_ret = (int)  cairo_version();
702    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
703   }
704  }
705  return 1;
706 #ifndef TOLUA_RELEASE
707  tolua_lerror:
708  tolua_error(tolua_S,"#ferror in function 'cairo_version'.",&tolua_err);
709  return 0;
710 #endif
711 }
712 #endif //#ifndef TOLUA_DISABLE
713
714 /* function: cairo_version_string */
715 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_version_string00
716 static int tolua_cairo_cairo_version_string00(lua_State* tolua_S)
717 {
718 #ifndef TOLUA_RELEASE
719  tolua_Error tolua_err;
720  if (
721      !tolua_isnoobj(tolua_S,1,&tolua_err)
722  )
723   goto tolua_lerror;
724  else
725 #endif
726  {
727   {
728    const char* tolua_ret = (const char*)  cairo_version_string();
729    tolua_pushstring(tolua_S,(const char*)tolua_ret);
730   }
731  }
732  return 1;
733 #ifndef TOLUA_RELEASE
734  tolua_lerror:
735  tolua_error(tolua_S,"#ferror in function 'cairo_version_string'.",&tolua_err);
736  return 0;
737 #endif
738 }
739 #endif //#ifndef TOLUA_DISABLE
740
741 /* function: cairo_create */
742 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_create00
743 static int tolua_cairo_cairo_create00(lua_State* tolua_S)
744 {
745 #ifndef TOLUA_RELEASE
746  tolua_Error tolua_err;
747  if (
748      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
749      !tolua_isnoobj(tolua_S,2,&tolua_err)
750  )
751   goto tolua_lerror;
752  else
753 #endif
754  {
755   struct _cairo_surface* target = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
756   {
757    struct _cairo* tolua_ret = ( struct _cairo*)  cairo_create(target);
758     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo");
759   }
760  }
761  return 1;
762 #ifndef TOLUA_RELEASE
763  tolua_lerror:
764  tolua_error(tolua_S,"#ferror in function 'cairo_create'.",&tolua_err);
765  return 0;
766 #endif
767 }
768 #endif //#ifndef TOLUA_DISABLE
769
770 /* function: cairo_reference */
771 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_reference00
772 static int tolua_cairo_cairo_reference00(lua_State* tolua_S)
773 {
774 #ifndef TOLUA_RELEASE
775  tolua_Error tolua_err;
776  if (
777      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
778      !tolua_isnoobj(tolua_S,2,&tolua_err)
779  )
780   goto tolua_lerror;
781  else
782 #endif
783  {
784   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
785   {
786    struct _cairo* tolua_ret = ( struct _cairo*)  cairo_reference(cr);
787     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo");
788   }
789  }
790  return 1;
791 #ifndef TOLUA_RELEASE
792  tolua_lerror:
793  tolua_error(tolua_S,"#ferror in function 'cairo_reference'.",&tolua_err);
794  return 0;
795 #endif
796 }
797 #endif //#ifndef TOLUA_DISABLE
798
799 /* function: cairo_destroy */
800 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_destroy00
801 static int tolua_cairo_cairo_destroy00(lua_State* tolua_S)
802 {
803 #ifndef TOLUA_RELEASE
804  tolua_Error tolua_err;
805  if (
806      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
807      !tolua_isnoobj(tolua_S,2,&tolua_err)
808  )
809   goto tolua_lerror;
810  else
811 #endif
812  {
813   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
814   {
815    cairo_destroy(cr);
816   }
817  }
818  return 0;
819 #ifndef TOLUA_RELEASE
820  tolua_lerror:
821  tolua_error(tolua_S,"#ferror in function 'cairo_destroy'.",&tolua_err);
822  return 0;
823 #endif
824 }
825 #endif //#ifndef TOLUA_DISABLE
826
827 /* function: cairo_get_reference_count */
828 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_reference_count00
829 static int tolua_cairo_cairo_get_reference_count00(lua_State* tolua_S)
830 {
831 #ifndef TOLUA_RELEASE
832  tolua_Error tolua_err;
833  if (
834      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
835      !tolua_isnoobj(tolua_S,2,&tolua_err)
836  )
837   goto tolua_lerror;
838  else
839 #endif
840  {
841   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
842   {
843    unsigned int tolua_ret = (unsigned int)  cairo_get_reference_count(cr);
844    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
845   }
846  }
847  return 1;
848 #ifndef TOLUA_RELEASE
849  tolua_lerror:
850  tolua_error(tolua_S,"#ferror in function 'cairo_get_reference_count'.",&tolua_err);
851  return 0;
852 #endif
853 }
854 #endif //#ifndef TOLUA_DISABLE
855
856 /* function: cairo_get_user_data */
857 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_user_data00
858 static int tolua_cairo_cairo_get_user_data00(lua_State* tolua_S)
859 {
860 #ifndef TOLUA_RELEASE
861  tolua_Error tolua_err;
862  if (
863      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
864      !tolua_isusertype(tolua_S,2,"const cairo_user_data_key_t",0,&tolua_err) ||
865      !tolua_isnoobj(tolua_S,3,&tolua_err)
866  )
867   goto tolua_lerror;
868  else
869 #endif
870  {
871   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
872   const cairo_user_data_key_t* key = ((const cairo_user_data_key_t*)  tolua_tousertype(tolua_S,2,0));
873   {
874    void* tolua_ret = (void*)  cairo_get_user_data(cr,key);
875    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
876   }
877  }
878  return 1;
879 #ifndef TOLUA_RELEASE
880  tolua_lerror:
881  tolua_error(tolua_S,"#ferror in function 'cairo_get_user_data'.",&tolua_err);
882  return 0;
883 #endif
884 }
885 #endif //#ifndef TOLUA_DISABLE
886
887 /* function: cairo_set_user_data */
888 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_user_data00
889 static int tolua_cairo_cairo_set_user_data00(lua_State* tolua_S)
890 {
891 #ifndef TOLUA_RELEASE
892  tolua_Error tolua_err;
893  if (
894      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
895      !tolua_isusertype(tolua_S,2,"const cairo_user_data_key_t",0,&tolua_err) ||
896      !tolua_isuserdata(tolua_S,3,0,&tolua_err) ||
897      (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"cairo_destroy_func_t",0,&tolua_err)) ||
898      !tolua_isnoobj(tolua_S,5,&tolua_err)
899  )
900   goto tolua_lerror;
901  else
902 #endif
903  {
904   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
905   const cairo_user_data_key_t* key = ((const cairo_user_data_key_t*)  tolua_tousertype(tolua_S,2,0));
906   void* user_data = ((void*)  tolua_touserdata(tolua_S,3,0));
907   cairo_destroy_func_t destroy = *((cairo_destroy_func_t*)  tolua_tousertype(tolua_S,4,0));
908   {
909    cairo_status_t tolua_ret = (cairo_status_t)  cairo_set_user_data(cr,key,user_data,destroy);
910    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
911   }
912  }
913  return 1;
914 #ifndef TOLUA_RELEASE
915  tolua_lerror:
916  tolua_error(tolua_S,"#ferror in function 'cairo_set_user_data'.",&tolua_err);
917  return 0;
918 #endif
919 }
920 #endif //#ifndef TOLUA_DISABLE
921
922 /* function: cairo_save */
923 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_save00
924 static int tolua_cairo_cairo_save00(lua_State* tolua_S)
925 {
926 #ifndef TOLUA_RELEASE
927  tolua_Error tolua_err;
928  if (
929      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
930      !tolua_isnoobj(tolua_S,2,&tolua_err)
931  )
932   goto tolua_lerror;
933  else
934 #endif
935  {
936   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
937   {
938    cairo_save(cr);
939   }
940  }
941  return 0;
942 #ifndef TOLUA_RELEASE
943  tolua_lerror:
944  tolua_error(tolua_S,"#ferror in function 'cairo_save'.",&tolua_err);
945  return 0;
946 #endif
947 }
948 #endif //#ifndef TOLUA_DISABLE
949
950 /* function: cairo_restore */
951 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_restore00
952 static int tolua_cairo_cairo_restore00(lua_State* tolua_S)
953 {
954 #ifndef TOLUA_RELEASE
955  tolua_Error tolua_err;
956  if (
957      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
958      !tolua_isnoobj(tolua_S,2,&tolua_err)
959  )
960   goto tolua_lerror;
961  else
962 #endif
963  {
964   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
965   {
966    cairo_restore(cr);
967   }
968  }
969  return 0;
970 #ifndef TOLUA_RELEASE
971  tolua_lerror:
972  tolua_error(tolua_S,"#ferror in function 'cairo_restore'.",&tolua_err);
973  return 0;
974 #endif
975 }
976 #endif //#ifndef TOLUA_DISABLE
977
978 /* function: cairo_push_group */
979 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_push_group00
980 static int tolua_cairo_cairo_push_group00(lua_State* tolua_S)
981 {
982 #ifndef TOLUA_RELEASE
983  tolua_Error tolua_err;
984  if (
985      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
986      !tolua_isnoobj(tolua_S,2,&tolua_err)
987  )
988   goto tolua_lerror;
989  else
990 #endif
991  {
992   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
993   {
994    cairo_push_group(cr);
995   }
996  }
997  return 0;
998 #ifndef TOLUA_RELEASE
999  tolua_lerror:
1000  tolua_error(tolua_S,"#ferror in function 'cairo_push_group'.",&tolua_err);
1001  return 0;
1002 #endif
1003 }
1004 #endif //#ifndef TOLUA_DISABLE
1005
1006 /* function: cairo_push_group_with_content */
1007 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_push_group_with_content00
1008 static int tolua_cairo_cairo_push_group_with_content00(lua_State* tolua_S)
1009 {
1010 #ifndef TOLUA_RELEASE
1011  tolua_Error tolua_err;
1012  if (
1013      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1014      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1015      !tolua_isnoobj(tolua_S,3,&tolua_err)
1016  )
1017   goto tolua_lerror;
1018  else
1019 #endif
1020  {
1021   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1022   cairo_content_t content = ((cairo_content_t) (int)  tolua_tonumber(tolua_S,2,0));
1023   {
1024    cairo_push_group_with_content(cr,content);
1025   }
1026  }
1027  return 0;
1028 #ifndef TOLUA_RELEASE
1029  tolua_lerror:
1030  tolua_error(tolua_S,"#ferror in function 'cairo_push_group_with_content'.",&tolua_err);
1031  return 0;
1032 #endif
1033 }
1034 #endif //#ifndef TOLUA_DISABLE
1035
1036 /* function: cairo_pop_group */
1037 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pop_group00
1038 static int tolua_cairo_cairo_pop_group00(lua_State* tolua_S)
1039 {
1040 #ifndef TOLUA_RELEASE
1041  tolua_Error tolua_err;
1042  if (
1043      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1044      !tolua_isnoobj(tolua_S,2,&tolua_err)
1045  )
1046   goto tolua_lerror;
1047  else
1048 #endif
1049  {
1050   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1051   {
1052    struct _cairo_pattern* tolua_ret = ( struct _cairo_pattern*)  cairo_pop_group(cr);
1053     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_pattern");
1054   }
1055  }
1056  return 1;
1057 #ifndef TOLUA_RELEASE
1058  tolua_lerror:
1059  tolua_error(tolua_S,"#ferror in function 'cairo_pop_group'.",&tolua_err);
1060  return 0;
1061 #endif
1062 }
1063 #endif //#ifndef TOLUA_DISABLE
1064
1065 /* function: cairo_pop_group_to_source */
1066 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pop_group_to_source00
1067 static int tolua_cairo_cairo_pop_group_to_source00(lua_State* tolua_S)
1068 {
1069 #ifndef TOLUA_RELEASE
1070  tolua_Error tolua_err;
1071  if (
1072      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1073      !tolua_isnoobj(tolua_S,2,&tolua_err)
1074  )
1075   goto tolua_lerror;
1076  else
1077 #endif
1078  {
1079   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1080   {
1081    cairo_pop_group_to_source(cr);
1082   }
1083  }
1084  return 0;
1085 #ifndef TOLUA_RELEASE
1086  tolua_lerror:
1087  tolua_error(tolua_S,"#ferror in function 'cairo_pop_group_to_source'.",&tolua_err);
1088  return 0;
1089 #endif
1090 }
1091 #endif //#ifndef TOLUA_DISABLE
1092
1093 /* function: cairo_set_operator */
1094 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_operator00
1095 static int tolua_cairo_cairo_set_operator00(lua_State* tolua_S)
1096 {
1097 #ifndef TOLUA_RELEASE
1098  tolua_Error tolua_err;
1099  if (
1100      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1101      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1102      !tolua_isnoobj(tolua_S,3,&tolua_err)
1103  )
1104   goto tolua_lerror;
1105  else
1106 #endif
1107  {
1108   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1109   cairo_operator_t op = ((cairo_operator_t) (int)  tolua_tonumber(tolua_S,2,0));
1110   {
1111    cairo_set_operator(cr,op);
1112   }
1113  }
1114  return 0;
1115 #ifndef TOLUA_RELEASE
1116  tolua_lerror:
1117  tolua_error(tolua_S,"#ferror in function 'cairo_set_operator'.",&tolua_err);
1118  return 0;
1119 #endif
1120 }
1121 #endif //#ifndef TOLUA_DISABLE
1122
1123 /* function: cairo_set_source */
1124 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_source00
1125 static int tolua_cairo_cairo_set_source00(lua_State* tolua_S)
1126 {
1127 #ifndef TOLUA_RELEASE
1128  tolua_Error tolua_err;
1129  if (
1130      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1131      !tolua_isusertype(tolua_S,2,"_cairo_pattern",0,&tolua_err) ||
1132      !tolua_isnoobj(tolua_S,3,&tolua_err)
1133  )
1134   goto tolua_lerror;
1135  else
1136 #endif
1137  {
1138   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1139   struct _cairo_pattern* source = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,2,0));
1140   {
1141    cairo_set_source(cr,source);
1142   }
1143  }
1144  return 0;
1145 #ifndef TOLUA_RELEASE
1146  tolua_lerror:
1147  tolua_error(tolua_S,"#ferror in function 'cairo_set_source'.",&tolua_err);
1148  return 0;
1149 #endif
1150 }
1151 #endif //#ifndef TOLUA_DISABLE
1152
1153 /* function: cairo_set_source_rgb */
1154 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_source_rgb00
1155 static int tolua_cairo_cairo_set_source_rgb00(lua_State* tolua_S)
1156 {
1157 #ifndef TOLUA_RELEASE
1158  tolua_Error tolua_err;
1159  if (
1160      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1161      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1162      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1163      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
1164      !tolua_isnoobj(tolua_S,5,&tolua_err)
1165  )
1166   goto tolua_lerror;
1167  else
1168 #endif
1169  {
1170   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1171   double red = ((double)  tolua_tonumber(tolua_S,2,0));
1172   double green = ((double)  tolua_tonumber(tolua_S,3,0));
1173   double blue = ((double)  tolua_tonumber(tolua_S,4,0));
1174   {
1175    cairo_set_source_rgb(cr,red,green,blue);
1176   }
1177  }
1178  return 0;
1179 #ifndef TOLUA_RELEASE
1180  tolua_lerror:
1181  tolua_error(tolua_S,"#ferror in function 'cairo_set_source_rgb'.",&tolua_err);
1182  return 0;
1183 #endif
1184 }
1185 #endif //#ifndef TOLUA_DISABLE
1186
1187 /* function: cairo_set_source_rgba */
1188 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_source_rgba00
1189 static int tolua_cairo_cairo_set_source_rgba00(lua_State* tolua_S)
1190 {
1191 #ifndef TOLUA_RELEASE
1192  tolua_Error tolua_err;
1193  if (
1194      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1195      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1196      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1197      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
1198      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
1199      !tolua_isnoobj(tolua_S,6,&tolua_err)
1200  )
1201   goto tolua_lerror;
1202  else
1203 #endif
1204  {
1205   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1206   double red = ((double)  tolua_tonumber(tolua_S,2,0));
1207   double green = ((double)  tolua_tonumber(tolua_S,3,0));
1208   double blue = ((double)  tolua_tonumber(tolua_S,4,0));
1209   double alpha = ((double)  tolua_tonumber(tolua_S,5,0));
1210   {
1211    cairo_set_source_rgba(cr,red,green,blue,alpha);
1212   }
1213  }
1214  return 0;
1215 #ifndef TOLUA_RELEASE
1216  tolua_lerror:
1217  tolua_error(tolua_S,"#ferror in function 'cairo_set_source_rgba'.",&tolua_err);
1218  return 0;
1219 #endif
1220 }
1221 #endif //#ifndef TOLUA_DISABLE
1222
1223 /* function: cairo_set_source_surface */
1224 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_source_surface00
1225 static int tolua_cairo_cairo_set_source_surface00(lua_State* tolua_S)
1226 {
1227 #ifndef TOLUA_RELEASE
1228  tolua_Error tolua_err;
1229  if (
1230      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1231      !tolua_isusertype(tolua_S,2,"_cairo_surface",0,&tolua_err) ||
1232      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1233      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
1234      !tolua_isnoobj(tolua_S,5,&tolua_err)
1235  )
1236   goto tolua_lerror;
1237  else
1238 #endif
1239  {
1240   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1241   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,2,0));
1242   double x = ((double)  tolua_tonumber(tolua_S,3,0));
1243   double y = ((double)  tolua_tonumber(tolua_S,4,0));
1244   {
1245    cairo_set_source_surface(cr,surface,x,y);
1246   }
1247  }
1248  return 0;
1249 #ifndef TOLUA_RELEASE
1250  tolua_lerror:
1251  tolua_error(tolua_S,"#ferror in function 'cairo_set_source_surface'.",&tolua_err);
1252  return 0;
1253 #endif
1254 }
1255 #endif //#ifndef TOLUA_DISABLE
1256
1257 /* function: cairo_set_tolerance */
1258 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_tolerance00
1259 static int tolua_cairo_cairo_set_tolerance00(lua_State* tolua_S)
1260 {
1261 #ifndef TOLUA_RELEASE
1262  tolua_Error tolua_err;
1263  if (
1264      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1265      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1266      !tolua_isnoobj(tolua_S,3,&tolua_err)
1267  )
1268   goto tolua_lerror;
1269  else
1270 #endif
1271  {
1272   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1273   double tolerance = ((double)  tolua_tonumber(tolua_S,2,0));
1274   {
1275    cairo_set_tolerance(cr,tolerance);
1276   }
1277  }
1278  return 0;
1279 #ifndef TOLUA_RELEASE
1280  tolua_lerror:
1281  tolua_error(tolua_S,"#ferror in function 'cairo_set_tolerance'.",&tolua_err);
1282  return 0;
1283 #endif
1284 }
1285 #endif //#ifndef TOLUA_DISABLE
1286
1287 /* function: cairo_set_antialias */
1288 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_antialias00
1289 static int tolua_cairo_cairo_set_antialias00(lua_State* tolua_S)
1290 {
1291 #ifndef TOLUA_RELEASE
1292  tolua_Error tolua_err;
1293  if (
1294      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1295      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1296      !tolua_isnoobj(tolua_S,3,&tolua_err)
1297  )
1298   goto tolua_lerror;
1299  else
1300 #endif
1301  {
1302   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1303   cairo_antialias_t antialias = ((cairo_antialias_t) (int)  tolua_tonumber(tolua_S,2,0));
1304   {
1305    cairo_set_antialias(cr,antialias);
1306   }
1307  }
1308  return 0;
1309 #ifndef TOLUA_RELEASE
1310  tolua_lerror:
1311  tolua_error(tolua_S,"#ferror in function 'cairo_set_antialias'.",&tolua_err);
1312  return 0;
1313 #endif
1314 }
1315 #endif //#ifndef TOLUA_DISABLE
1316
1317 /* function: cairo_set_fill_rule */
1318 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_fill_rule00
1319 static int tolua_cairo_cairo_set_fill_rule00(lua_State* tolua_S)
1320 {
1321 #ifndef TOLUA_RELEASE
1322  tolua_Error tolua_err;
1323  if (
1324      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1325      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1326      !tolua_isnoobj(tolua_S,3,&tolua_err)
1327  )
1328   goto tolua_lerror;
1329  else
1330 #endif
1331  {
1332   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1333   cairo_fill_rule_t fill_rule = ((cairo_fill_rule_t) (int)  tolua_tonumber(tolua_S,2,0));
1334   {
1335    cairo_set_fill_rule(cr,fill_rule);
1336   }
1337  }
1338  return 0;
1339 #ifndef TOLUA_RELEASE
1340  tolua_lerror:
1341  tolua_error(tolua_S,"#ferror in function 'cairo_set_fill_rule'.",&tolua_err);
1342  return 0;
1343 #endif
1344 }
1345 #endif //#ifndef TOLUA_DISABLE
1346
1347 /* function: cairo_set_line_width */
1348 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_line_width00
1349 static int tolua_cairo_cairo_set_line_width00(lua_State* tolua_S)
1350 {
1351 #ifndef TOLUA_RELEASE
1352  tolua_Error tolua_err;
1353  if (
1354      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1355      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1356      !tolua_isnoobj(tolua_S,3,&tolua_err)
1357  )
1358   goto tolua_lerror;
1359  else
1360 #endif
1361  {
1362   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1363   double width = ((double)  tolua_tonumber(tolua_S,2,0));
1364   {
1365    cairo_set_line_width(cr,width);
1366   }
1367  }
1368  return 0;
1369 #ifndef TOLUA_RELEASE
1370  tolua_lerror:
1371  tolua_error(tolua_S,"#ferror in function 'cairo_set_line_width'.",&tolua_err);
1372  return 0;
1373 #endif
1374 }
1375 #endif //#ifndef TOLUA_DISABLE
1376
1377 /* function: cairo_set_line_cap */
1378 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_line_cap00
1379 static int tolua_cairo_cairo_set_line_cap00(lua_State* tolua_S)
1380 {
1381 #ifndef TOLUA_RELEASE
1382  tolua_Error tolua_err;
1383  if (
1384      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1385      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1386      !tolua_isnoobj(tolua_S,3,&tolua_err)
1387  )
1388   goto tolua_lerror;
1389  else
1390 #endif
1391  {
1392   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1393   cairo_line_cap_t line_cap = ((cairo_line_cap_t) (int)  tolua_tonumber(tolua_S,2,0));
1394   {
1395    cairo_set_line_cap(cr,line_cap);
1396   }
1397  }
1398  return 0;
1399 #ifndef TOLUA_RELEASE
1400  tolua_lerror:
1401  tolua_error(tolua_S,"#ferror in function 'cairo_set_line_cap'.",&tolua_err);
1402  return 0;
1403 #endif
1404 }
1405 #endif //#ifndef TOLUA_DISABLE
1406
1407 /* function: cairo_set_line_join */
1408 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_line_join00
1409 static int tolua_cairo_cairo_set_line_join00(lua_State* tolua_S)
1410 {
1411 #ifndef TOLUA_RELEASE
1412  tolua_Error tolua_err;
1413  if (
1414      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1415      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1416      !tolua_isnoobj(tolua_S,3,&tolua_err)
1417  )
1418   goto tolua_lerror;
1419  else
1420 #endif
1421  {
1422   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1423   cairo_line_join_t line_join = ((cairo_line_join_t) (int)  tolua_tonumber(tolua_S,2,0));
1424   {
1425    cairo_set_line_join(cr,line_join);
1426   }
1427  }
1428  return 0;
1429 #ifndef TOLUA_RELEASE
1430  tolua_lerror:
1431  tolua_error(tolua_S,"#ferror in function 'cairo_set_line_join'.",&tolua_err);
1432  return 0;
1433 #endif
1434 }
1435 #endif //#ifndef TOLUA_DISABLE
1436
1437 /* function: cairo_set_dash */
1438 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_dash00
1439 static int tolua_cairo_cairo_set_dash00(lua_State* tolua_S)
1440 {
1441 #ifndef TOLUA_RELEASE
1442  tolua_Error tolua_err;
1443  if (
1444      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1445      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1446      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1447      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
1448      !tolua_isnoobj(tolua_S,5,&tolua_err)
1449  )
1450   goto tolua_lerror;
1451  else
1452 #endif
1453  {
1454   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1455   const double dashes = ((const double)  tolua_tonumber(tolua_S,2,0));
1456   int num_dashes = ((int)  tolua_tonumber(tolua_S,3,0));
1457   double offset = ((double)  tolua_tonumber(tolua_S,4,0));
1458   {
1459    cairo_set_dash(cr,&dashes,num_dashes,offset);
1460    tolua_pushnumber(tolua_S,(lua_Number)dashes);
1461   }
1462  }
1463  return 1;
1464 #ifndef TOLUA_RELEASE
1465  tolua_lerror:
1466  tolua_error(tolua_S,"#ferror in function 'cairo_set_dash'.",&tolua_err);
1467  return 0;
1468 #endif
1469 }
1470 #endif //#ifndef TOLUA_DISABLE
1471
1472 /* function: cairo_set_miter_limit */
1473 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_miter_limit00
1474 static int tolua_cairo_cairo_set_miter_limit00(lua_State* tolua_S)
1475 {
1476 #ifndef TOLUA_RELEASE
1477  tolua_Error tolua_err;
1478  if (
1479      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1480      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1481      !tolua_isnoobj(tolua_S,3,&tolua_err)
1482  )
1483   goto tolua_lerror;
1484  else
1485 #endif
1486  {
1487   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1488   double limit = ((double)  tolua_tonumber(tolua_S,2,0));
1489   {
1490    cairo_set_miter_limit(cr,limit);
1491   }
1492  }
1493  return 0;
1494 #ifndef TOLUA_RELEASE
1495  tolua_lerror:
1496  tolua_error(tolua_S,"#ferror in function 'cairo_set_miter_limit'.",&tolua_err);
1497  return 0;
1498 #endif
1499 }
1500 #endif //#ifndef TOLUA_DISABLE
1501
1502 /* function: cairo_translate */
1503 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_translate00
1504 static int tolua_cairo_cairo_translate00(lua_State* tolua_S)
1505 {
1506 #ifndef TOLUA_RELEASE
1507  tolua_Error tolua_err;
1508  if (
1509      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1510      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1511      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1512      !tolua_isnoobj(tolua_S,4,&tolua_err)
1513  )
1514   goto tolua_lerror;
1515  else
1516 #endif
1517  {
1518   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1519   double tx = ((double)  tolua_tonumber(tolua_S,2,0));
1520   double ty = ((double)  tolua_tonumber(tolua_S,3,0));
1521   {
1522    cairo_translate(cr,tx,ty);
1523   }
1524  }
1525  return 0;
1526 #ifndef TOLUA_RELEASE
1527  tolua_lerror:
1528  tolua_error(tolua_S,"#ferror in function 'cairo_translate'.",&tolua_err);
1529  return 0;
1530 #endif
1531 }
1532 #endif //#ifndef TOLUA_DISABLE
1533
1534 /* function: cairo_scale */
1535 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scale00
1536 static int tolua_cairo_cairo_scale00(lua_State* tolua_S)
1537 {
1538 #ifndef TOLUA_RELEASE
1539  tolua_Error tolua_err;
1540  if (
1541      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1542      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1543      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1544      !tolua_isnoobj(tolua_S,4,&tolua_err)
1545  )
1546   goto tolua_lerror;
1547  else
1548 #endif
1549  {
1550   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1551   double sx = ((double)  tolua_tonumber(tolua_S,2,0));
1552   double sy = ((double)  tolua_tonumber(tolua_S,3,0));
1553   {
1554    cairo_scale(cr,sx,sy);
1555   }
1556  }
1557  return 0;
1558 #ifndef TOLUA_RELEASE
1559  tolua_lerror:
1560  tolua_error(tolua_S,"#ferror in function 'cairo_scale'.",&tolua_err);
1561  return 0;
1562 #endif
1563 }
1564 #endif //#ifndef TOLUA_DISABLE
1565
1566 /* function: cairo_rotate */
1567 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_rotate00
1568 static int tolua_cairo_cairo_rotate00(lua_State* tolua_S)
1569 {
1570 #ifndef TOLUA_RELEASE
1571  tolua_Error tolua_err;
1572  if (
1573      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1574      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1575      !tolua_isnoobj(tolua_S,3,&tolua_err)
1576  )
1577   goto tolua_lerror;
1578  else
1579 #endif
1580  {
1581   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1582   double angle = ((double)  tolua_tonumber(tolua_S,2,0));
1583   {
1584    cairo_rotate(cr,angle);
1585   }
1586  }
1587  return 0;
1588 #ifndef TOLUA_RELEASE
1589  tolua_lerror:
1590  tolua_error(tolua_S,"#ferror in function 'cairo_rotate'.",&tolua_err);
1591  return 0;
1592 #endif
1593 }
1594 #endif //#ifndef TOLUA_DISABLE
1595
1596 /* function: cairo_transform */
1597 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_transform00
1598 static int tolua_cairo_cairo_transform00(lua_State* tolua_S)
1599 {
1600 #ifndef TOLUA_RELEASE
1601  tolua_Error tolua_err;
1602  if (
1603      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1604      !tolua_isusertype(tolua_S,2,"cairo_matrix_t",0,&tolua_err) ||
1605      !tolua_isnoobj(tolua_S,3,&tolua_err)
1606  )
1607   goto tolua_lerror;
1608  else
1609 #endif
1610  {
1611   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1612   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,2,0));
1613   {
1614    cairo_transform(cr,matrix);
1615   }
1616  }
1617  return 0;
1618 #ifndef TOLUA_RELEASE
1619  tolua_lerror:
1620  tolua_error(tolua_S,"#ferror in function 'cairo_transform'.",&tolua_err);
1621  return 0;
1622 #endif
1623 }
1624 #endif //#ifndef TOLUA_DISABLE
1625
1626 /* function: cairo_set_matrix */
1627 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_matrix00
1628 static int tolua_cairo_cairo_set_matrix00(lua_State* tolua_S)
1629 {
1630 #ifndef TOLUA_RELEASE
1631  tolua_Error tolua_err;
1632  if (
1633      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1634      !tolua_isusertype(tolua_S,2,"cairo_matrix_t",0,&tolua_err) ||
1635      !tolua_isnoobj(tolua_S,3,&tolua_err)
1636  )
1637   goto tolua_lerror;
1638  else
1639 #endif
1640  {
1641   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1642   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,2,0));
1643   {
1644    cairo_set_matrix(cr,matrix);
1645   }
1646  }
1647  return 0;
1648 #ifndef TOLUA_RELEASE
1649  tolua_lerror:
1650  tolua_error(tolua_S,"#ferror in function 'cairo_set_matrix'.",&tolua_err);
1651  return 0;
1652 #endif
1653 }
1654 #endif //#ifndef TOLUA_DISABLE
1655
1656 /* function: cairo_identity_matrix */
1657 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_identity_matrix00
1658 static int tolua_cairo_cairo_identity_matrix00(lua_State* tolua_S)
1659 {
1660 #ifndef TOLUA_RELEASE
1661  tolua_Error tolua_err;
1662  if (
1663      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1664      !tolua_isnoobj(tolua_S,2,&tolua_err)
1665  )
1666   goto tolua_lerror;
1667  else
1668 #endif
1669  {
1670   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1671   {
1672    cairo_identity_matrix(cr);
1673   }
1674  }
1675  return 0;
1676 #ifndef TOLUA_RELEASE
1677  tolua_lerror:
1678  tolua_error(tolua_S,"#ferror in function 'cairo_identity_matrix'.",&tolua_err);
1679  return 0;
1680 #endif
1681 }
1682 #endif //#ifndef TOLUA_DISABLE
1683
1684 /* function: cairo_user_to_device */
1685 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_user_to_device00
1686 static int tolua_cairo_cairo_user_to_device00(lua_State* tolua_S)
1687 {
1688 #ifndef TOLUA_RELEASE
1689  tolua_Error tolua_err;
1690  if (
1691      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1692      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1693      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1694      !tolua_isnoobj(tolua_S,4,&tolua_err)
1695  )
1696   goto tolua_lerror;
1697  else
1698 #endif
1699  {
1700   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1701   double x = ((double)  tolua_tonumber(tolua_S,2,0));
1702   double y = ((double)  tolua_tonumber(tolua_S,3,0));
1703   {
1704    cairo_user_to_device(cr,&x,&y);
1705    tolua_pushnumber(tolua_S,(lua_Number)x);
1706    tolua_pushnumber(tolua_S,(lua_Number)y);
1707   }
1708  }
1709  return 2;
1710 #ifndef TOLUA_RELEASE
1711  tolua_lerror:
1712  tolua_error(tolua_S,"#ferror in function 'cairo_user_to_device'.",&tolua_err);
1713  return 0;
1714 #endif
1715 }
1716 #endif //#ifndef TOLUA_DISABLE
1717
1718 /* function: cairo_user_to_device_distance */
1719 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_user_to_device_distance00
1720 static int tolua_cairo_cairo_user_to_device_distance00(lua_State* tolua_S)
1721 {
1722 #ifndef TOLUA_RELEASE
1723  tolua_Error tolua_err;
1724  if (
1725      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1726      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1727      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1728      !tolua_isnoobj(tolua_S,4,&tolua_err)
1729  )
1730   goto tolua_lerror;
1731  else
1732 #endif
1733  {
1734   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1735   double dx = ((double)  tolua_tonumber(tolua_S,2,0));
1736   double dy = ((double)  tolua_tonumber(tolua_S,3,0));
1737   {
1738    cairo_user_to_device_distance(cr,&dx,&dy);
1739    tolua_pushnumber(tolua_S,(lua_Number)dx);
1740    tolua_pushnumber(tolua_S,(lua_Number)dy);
1741   }
1742  }
1743  return 2;
1744 #ifndef TOLUA_RELEASE
1745  tolua_lerror:
1746  tolua_error(tolua_S,"#ferror in function 'cairo_user_to_device_distance'.",&tolua_err);
1747  return 0;
1748 #endif
1749 }
1750 #endif //#ifndef TOLUA_DISABLE
1751
1752 /* function: cairo_device_to_user */
1753 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_device_to_user00
1754 static int tolua_cairo_cairo_device_to_user00(lua_State* tolua_S)
1755 {
1756 #ifndef TOLUA_RELEASE
1757  tolua_Error tolua_err;
1758  if (
1759      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1760      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1761      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1762      !tolua_isnoobj(tolua_S,4,&tolua_err)
1763  )
1764   goto tolua_lerror;
1765  else
1766 #endif
1767  {
1768   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1769   double x = ((double)  tolua_tonumber(tolua_S,2,0));
1770   double y = ((double)  tolua_tonumber(tolua_S,3,0));
1771   {
1772    cairo_device_to_user(cr,&x,&y);
1773    tolua_pushnumber(tolua_S,(lua_Number)x);
1774    tolua_pushnumber(tolua_S,(lua_Number)y);
1775   }
1776  }
1777  return 2;
1778 #ifndef TOLUA_RELEASE
1779  tolua_lerror:
1780  tolua_error(tolua_S,"#ferror in function 'cairo_device_to_user'.",&tolua_err);
1781  return 0;
1782 #endif
1783 }
1784 #endif //#ifndef TOLUA_DISABLE
1785
1786 /* function: cairo_device_to_user_distance */
1787 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_device_to_user_distance00
1788 static int tolua_cairo_cairo_device_to_user_distance00(lua_State* tolua_S)
1789 {
1790 #ifndef TOLUA_RELEASE
1791  tolua_Error tolua_err;
1792  if (
1793      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1794      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1795      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1796      !tolua_isnoobj(tolua_S,4,&tolua_err)
1797  )
1798   goto tolua_lerror;
1799  else
1800 #endif
1801  {
1802   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1803   double dx = ((double)  tolua_tonumber(tolua_S,2,0));
1804   double dy = ((double)  tolua_tonumber(tolua_S,3,0));
1805   {
1806    cairo_device_to_user_distance(cr,&dx,&dy);
1807    tolua_pushnumber(tolua_S,(lua_Number)dx);
1808    tolua_pushnumber(tolua_S,(lua_Number)dy);
1809   }
1810  }
1811  return 2;
1812 #ifndef TOLUA_RELEASE
1813  tolua_lerror:
1814  tolua_error(tolua_S,"#ferror in function 'cairo_device_to_user_distance'.",&tolua_err);
1815  return 0;
1816 #endif
1817 }
1818 #endif //#ifndef TOLUA_DISABLE
1819
1820 /* function: cairo_new_path */
1821 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_new_path00
1822 static int tolua_cairo_cairo_new_path00(lua_State* tolua_S)
1823 {
1824 #ifndef TOLUA_RELEASE
1825  tolua_Error tolua_err;
1826  if (
1827      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1828      !tolua_isnoobj(tolua_S,2,&tolua_err)
1829  )
1830   goto tolua_lerror;
1831  else
1832 #endif
1833  {
1834   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1835   {
1836    cairo_new_path(cr);
1837   }
1838  }
1839  return 0;
1840 #ifndef TOLUA_RELEASE
1841  tolua_lerror:
1842  tolua_error(tolua_S,"#ferror in function 'cairo_new_path'.",&tolua_err);
1843  return 0;
1844 #endif
1845 }
1846 #endif //#ifndef TOLUA_DISABLE
1847
1848 /* function: cairo_move_to */
1849 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_move_to00
1850 static int tolua_cairo_cairo_move_to00(lua_State* tolua_S)
1851 {
1852 #ifndef TOLUA_RELEASE
1853  tolua_Error tolua_err;
1854  if (
1855      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1856      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1857      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1858      !tolua_isnoobj(tolua_S,4,&tolua_err)
1859  )
1860   goto tolua_lerror;
1861  else
1862 #endif
1863  {
1864   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1865   double x = ((double)  tolua_tonumber(tolua_S,2,0));
1866   double y = ((double)  tolua_tonumber(tolua_S,3,0));
1867   {
1868    cairo_move_to(cr,x,y);
1869   }
1870  }
1871  return 0;
1872 #ifndef TOLUA_RELEASE
1873  tolua_lerror:
1874  tolua_error(tolua_S,"#ferror in function 'cairo_move_to'.",&tolua_err);
1875  return 0;
1876 #endif
1877 }
1878 #endif //#ifndef TOLUA_DISABLE
1879
1880 /* function: cairo_new_sub_path */
1881 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_new_sub_path00
1882 static int tolua_cairo_cairo_new_sub_path00(lua_State* tolua_S)
1883 {
1884 #ifndef TOLUA_RELEASE
1885  tolua_Error tolua_err;
1886  if (
1887      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1888      !tolua_isnoobj(tolua_S,2,&tolua_err)
1889  )
1890   goto tolua_lerror;
1891  else
1892 #endif
1893  {
1894   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1895   {
1896    cairo_new_sub_path(cr);
1897   }
1898  }
1899  return 0;
1900 #ifndef TOLUA_RELEASE
1901  tolua_lerror:
1902  tolua_error(tolua_S,"#ferror in function 'cairo_new_sub_path'.",&tolua_err);
1903  return 0;
1904 #endif
1905 }
1906 #endif //#ifndef TOLUA_DISABLE
1907
1908 /* function: cairo_line_to */
1909 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_line_to00
1910 static int tolua_cairo_cairo_line_to00(lua_State* tolua_S)
1911 {
1912 #ifndef TOLUA_RELEASE
1913  tolua_Error tolua_err;
1914  if (
1915      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1916      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1917      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1918      !tolua_isnoobj(tolua_S,4,&tolua_err)
1919  )
1920   goto tolua_lerror;
1921  else
1922 #endif
1923  {
1924   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1925   double x = ((double)  tolua_tonumber(tolua_S,2,0));
1926   double y = ((double)  tolua_tonumber(tolua_S,3,0));
1927   {
1928    cairo_line_to(cr,x,y);
1929   }
1930  }
1931  return 0;
1932 #ifndef TOLUA_RELEASE
1933  tolua_lerror:
1934  tolua_error(tolua_S,"#ferror in function 'cairo_line_to'.",&tolua_err);
1935  return 0;
1936 #endif
1937 }
1938 #endif //#ifndef TOLUA_DISABLE
1939
1940 /* function: cairo_curve_to */
1941 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_curve_to00
1942 static int tolua_cairo_cairo_curve_to00(lua_State* tolua_S)
1943 {
1944 #ifndef TOLUA_RELEASE
1945  tolua_Error tolua_err;
1946  if (
1947      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1948      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1949      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1950      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
1951      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
1952      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
1953      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
1954      !tolua_isnoobj(tolua_S,8,&tolua_err)
1955  )
1956   goto tolua_lerror;
1957  else
1958 #endif
1959  {
1960   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
1961   double x1 = ((double)  tolua_tonumber(tolua_S,2,0));
1962   double y1 = ((double)  tolua_tonumber(tolua_S,3,0));
1963   double x2 = ((double)  tolua_tonumber(tolua_S,4,0));
1964   double y2 = ((double)  tolua_tonumber(tolua_S,5,0));
1965   double x3 = ((double)  tolua_tonumber(tolua_S,6,0));
1966   double y3 = ((double)  tolua_tonumber(tolua_S,7,0));
1967   {
1968    cairo_curve_to(cr,x1,y1,x2,y2,x3,y3);
1969   }
1970  }
1971  return 0;
1972 #ifndef TOLUA_RELEASE
1973  tolua_lerror:
1974  tolua_error(tolua_S,"#ferror in function 'cairo_curve_to'.",&tolua_err);
1975  return 0;
1976 #endif
1977 }
1978 #endif //#ifndef TOLUA_DISABLE
1979
1980 /* function: cairo_arc */
1981 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_arc00
1982 static int tolua_cairo_cairo_arc00(lua_State* tolua_S)
1983 {
1984 #ifndef TOLUA_RELEASE
1985  tolua_Error tolua_err;
1986  if (
1987      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
1988      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1989      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1990      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
1991      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
1992      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
1993      !tolua_isnoobj(tolua_S,7,&tolua_err)
1994  )
1995   goto tolua_lerror;
1996  else
1997 #endif
1998  {
1999   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2000   double xc = ((double)  tolua_tonumber(tolua_S,2,0));
2001   double yc = ((double)  tolua_tonumber(tolua_S,3,0));
2002   double radius = ((double)  tolua_tonumber(tolua_S,4,0));
2003   double angle1 = ((double)  tolua_tonumber(tolua_S,5,0));
2004   double angle2 = ((double)  tolua_tonumber(tolua_S,6,0));
2005   {
2006    cairo_arc(cr,xc,yc,radius,angle1,angle2);
2007   }
2008  }
2009  return 0;
2010 #ifndef TOLUA_RELEASE
2011  tolua_lerror:
2012  tolua_error(tolua_S,"#ferror in function 'cairo_arc'.",&tolua_err);
2013  return 0;
2014 #endif
2015 }
2016 #endif //#ifndef TOLUA_DISABLE
2017
2018 /* function: cairo_arc_negative */
2019 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_arc_negative00
2020 static int tolua_cairo_cairo_arc_negative00(lua_State* tolua_S)
2021 {
2022 #ifndef TOLUA_RELEASE
2023  tolua_Error tolua_err;
2024  if (
2025      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2026      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2027      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2028      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2029      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
2030      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
2031      !tolua_isnoobj(tolua_S,7,&tolua_err)
2032  )
2033   goto tolua_lerror;
2034  else
2035 #endif
2036  {
2037   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2038   double xc = ((double)  tolua_tonumber(tolua_S,2,0));
2039   double yc = ((double)  tolua_tonumber(tolua_S,3,0));
2040   double radius = ((double)  tolua_tonumber(tolua_S,4,0));
2041   double angle1 = ((double)  tolua_tonumber(tolua_S,5,0));
2042   double angle2 = ((double)  tolua_tonumber(tolua_S,6,0));
2043   {
2044    cairo_arc_negative(cr,xc,yc,radius,angle1,angle2);
2045   }
2046  }
2047  return 0;
2048 #ifndef TOLUA_RELEASE
2049  tolua_lerror:
2050  tolua_error(tolua_S,"#ferror in function 'cairo_arc_negative'.",&tolua_err);
2051  return 0;
2052 #endif
2053 }
2054 #endif //#ifndef TOLUA_DISABLE
2055
2056 /* function: cairo_rel_move_to */
2057 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_rel_move_to00
2058 static int tolua_cairo_cairo_rel_move_to00(lua_State* tolua_S)
2059 {
2060 #ifndef TOLUA_RELEASE
2061  tolua_Error tolua_err;
2062  if (
2063      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2064      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2065      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2066      !tolua_isnoobj(tolua_S,4,&tolua_err)
2067  )
2068   goto tolua_lerror;
2069  else
2070 #endif
2071  {
2072   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2073   double dx = ((double)  tolua_tonumber(tolua_S,2,0));
2074   double dy = ((double)  tolua_tonumber(tolua_S,3,0));
2075   {
2076    cairo_rel_move_to(cr,dx,dy);
2077   }
2078  }
2079  return 0;
2080 #ifndef TOLUA_RELEASE
2081  tolua_lerror:
2082  tolua_error(tolua_S,"#ferror in function 'cairo_rel_move_to'.",&tolua_err);
2083  return 0;
2084 #endif
2085 }
2086 #endif //#ifndef TOLUA_DISABLE
2087
2088 /* function: cairo_rel_line_to */
2089 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_rel_line_to00
2090 static int tolua_cairo_cairo_rel_line_to00(lua_State* tolua_S)
2091 {
2092 #ifndef TOLUA_RELEASE
2093  tolua_Error tolua_err;
2094  if (
2095      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2096      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2097      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2098      !tolua_isnoobj(tolua_S,4,&tolua_err)
2099  )
2100   goto tolua_lerror;
2101  else
2102 #endif
2103  {
2104   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2105   double dx = ((double)  tolua_tonumber(tolua_S,2,0));
2106   double dy = ((double)  tolua_tonumber(tolua_S,3,0));
2107   {
2108    cairo_rel_line_to(cr,dx,dy);
2109   }
2110  }
2111  return 0;
2112 #ifndef TOLUA_RELEASE
2113  tolua_lerror:
2114  tolua_error(tolua_S,"#ferror in function 'cairo_rel_line_to'.",&tolua_err);
2115  return 0;
2116 #endif
2117 }
2118 #endif //#ifndef TOLUA_DISABLE
2119
2120 /* function: cairo_rel_curve_to */
2121 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_rel_curve_to00
2122 static int tolua_cairo_cairo_rel_curve_to00(lua_State* tolua_S)
2123 {
2124 #ifndef TOLUA_RELEASE
2125  tolua_Error tolua_err;
2126  if (
2127      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2128      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2129      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2130      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2131      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
2132      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
2133      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
2134      !tolua_isnoobj(tolua_S,8,&tolua_err)
2135  )
2136   goto tolua_lerror;
2137  else
2138 #endif
2139  {
2140   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2141   double dx1 = ((double)  tolua_tonumber(tolua_S,2,0));
2142   double dy1 = ((double)  tolua_tonumber(tolua_S,3,0));
2143   double dx2 = ((double)  tolua_tonumber(tolua_S,4,0));
2144   double dy2 = ((double)  tolua_tonumber(tolua_S,5,0));
2145   double dx3 = ((double)  tolua_tonumber(tolua_S,6,0));
2146   double dy3 = ((double)  tolua_tonumber(tolua_S,7,0));
2147   {
2148    cairo_rel_curve_to(cr,dx1,dy1,dx2,dy2,dx3,dy3);
2149   }
2150  }
2151  return 0;
2152 #ifndef TOLUA_RELEASE
2153  tolua_lerror:
2154  tolua_error(tolua_S,"#ferror in function 'cairo_rel_curve_to'.",&tolua_err);
2155  return 0;
2156 #endif
2157 }
2158 #endif //#ifndef TOLUA_DISABLE
2159
2160 /* function: cairo_rectangle */
2161 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_rectangle00
2162 static int tolua_cairo_cairo_rectangle00(lua_State* tolua_S)
2163 {
2164 #ifndef TOLUA_RELEASE
2165  tolua_Error tolua_err;
2166  if (
2167      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2168      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2169      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2170      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2171      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
2172      !tolua_isnoobj(tolua_S,6,&tolua_err)
2173  )
2174   goto tolua_lerror;
2175  else
2176 #endif
2177  {
2178   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2179   double x = ((double)  tolua_tonumber(tolua_S,2,0));
2180   double y = ((double)  tolua_tonumber(tolua_S,3,0));
2181   double width = ((double)  tolua_tonumber(tolua_S,4,0));
2182   double height = ((double)  tolua_tonumber(tolua_S,5,0));
2183   {
2184    cairo_rectangle(cr,x,y,width,height);
2185   }
2186  }
2187  return 0;
2188 #ifndef TOLUA_RELEASE
2189  tolua_lerror:
2190  tolua_error(tolua_S,"#ferror in function 'cairo_rectangle'.",&tolua_err);
2191  return 0;
2192 #endif
2193 }
2194 #endif //#ifndef TOLUA_DISABLE
2195
2196 /* function: cairo_close_path */
2197 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_close_path00
2198 static int tolua_cairo_cairo_close_path00(lua_State* tolua_S)
2199 {
2200 #ifndef TOLUA_RELEASE
2201  tolua_Error tolua_err;
2202  if (
2203      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2204      !tolua_isnoobj(tolua_S,2,&tolua_err)
2205  )
2206   goto tolua_lerror;
2207  else
2208 #endif
2209  {
2210   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2211   {
2212    cairo_close_path(cr);
2213   }
2214  }
2215  return 0;
2216 #ifndef TOLUA_RELEASE
2217  tolua_lerror:
2218  tolua_error(tolua_S,"#ferror in function 'cairo_close_path'.",&tolua_err);
2219  return 0;
2220 #endif
2221 }
2222 #endif //#ifndef TOLUA_DISABLE
2223
2224 /* function: cairo_path_extents */
2225 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_path_extents00
2226 static int tolua_cairo_cairo_path_extents00(lua_State* tolua_S)
2227 {
2228 #ifndef TOLUA_RELEASE
2229  tolua_Error tolua_err;
2230  if (
2231      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2232      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2233      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2234      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2235      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
2236      !tolua_isnoobj(tolua_S,6,&tolua_err)
2237  )
2238   goto tolua_lerror;
2239  else
2240 #endif
2241  {
2242   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2243   double x1 = ((double)  tolua_tonumber(tolua_S,2,0));
2244   double y1 = ((double)  tolua_tonumber(tolua_S,3,0));
2245   double x2 = ((double)  tolua_tonumber(tolua_S,4,0));
2246   double y2 = ((double)  tolua_tonumber(tolua_S,5,0));
2247   {
2248    cairo_path_extents(cr,&x1,&y1,&x2,&y2);
2249    tolua_pushnumber(tolua_S,(lua_Number)x1);
2250    tolua_pushnumber(tolua_S,(lua_Number)y1);
2251    tolua_pushnumber(tolua_S,(lua_Number)x2);
2252    tolua_pushnumber(tolua_S,(lua_Number)y2);
2253   }
2254  }
2255  return 4;
2256 #ifndef TOLUA_RELEASE
2257  tolua_lerror:
2258  tolua_error(tolua_S,"#ferror in function 'cairo_path_extents'.",&tolua_err);
2259  return 0;
2260 #endif
2261 }
2262 #endif //#ifndef TOLUA_DISABLE
2263
2264 /* function: cairo_paint */
2265 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_paint00
2266 static int tolua_cairo_cairo_paint00(lua_State* tolua_S)
2267 {
2268 #ifndef TOLUA_RELEASE
2269  tolua_Error tolua_err;
2270  if (
2271      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2272      !tolua_isnoobj(tolua_S,2,&tolua_err)
2273  )
2274   goto tolua_lerror;
2275  else
2276 #endif
2277  {
2278   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2279   {
2280    cairo_paint(cr);
2281   }
2282  }
2283  return 0;
2284 #ifndef TOLUA_RELEASE
2285  tolua_lerror:
2286  tolua_error(tolua_S,"#ferror in function 'cairo_paint'.",&tolua_err);
2287  return 0;
2288 #endif
2289 }
2290 #endif //#ifndef TOLUA_DISABLE
2291
2292 /* function: cairo_paint_with_alpha */
2293 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_paint_with_alpha00
2294 static int tolua_cairo_cairo_paint_with_alpha00(lua_State* tolua_S)
2295 {
2296 #ifndef TOLUA_RELEASE
2297  tolua_Error tolua_err;
2298  if (
2299      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2300      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2301      !tolua_isnoobj(tolua_S,3,&tolua_err)
2302  )
2303   goto tolua_lerror;
2304  else
2305 #endif
2306  {
2307   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2308   double alpha = ((double)  tolua_tonumber(tolua_S,2,0));
2309   {
2310    cairo_paint_with_alpha(cr,alpha);
2311   }
2312  }
2313  return 0;
2314 #ifndef TOLUA_RELEASE
2315  tolua_lerror:
2316  tolua_error(tolua_S,"#ferror in function 'cairo_paint_with_alpha'.",&tolua_err);
2317  return 0;
2318 #endif
2319 }
2320 #endif //#ifndef TOLUA_DISABLE
2321
2322 /* function: cairo_mask */
2323 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_mask00
2324 static int tolua_cairo_cairo_mask00(lua_State* tolua_S)
2325 {
2326 #ifndef TOLUA_RELEASE
2327  tolua_Error tolua_err;
2328  if (
2329      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2330      !tolua_isusertype(tolua_S,2,"_cairo_pattern",0,&tolua_err) ||
2331      !tolua_isnoobj(tolua_S,3,&tolua_err)
2332  )
2333   goto tolua_lerror;
2334  else
2335 #endif
2336  {
2337   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2338   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,2,0));
2339   {
2340    cairo_mask(cr,pattern);
2341   }
2342  }
2343  return 0;
2344 #ifndef TOLUA_RELEASE
2345  tolua_lerror:
2346  tolua_error(tolua_S,"#ferror in function 'cairo_mask'.",&tolua_err);
2347  return 0;
2348 #endif
2349 }
2350 #endif //#ifndef TOLUA_DISABLE
2351
2352 /* function: cairo_mask_surface */
2353 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_mask_surface00
2354 static int tolua_cairo_cairo_mask_surface00(lua_State* tolua_S)
2355 {
2356 #ifndef TOLUA_RELEASE
2357  tolua_Error tolua_err;
2358  if (
2359      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2360      !tolua_isusertype(tolua_S,2,"_cairo_surface",0,&tolua_err) ||
2361      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2362      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2363      !tolua_isnoobj(tolua_S,5,&tolua_err)
2364  )
2365   goto tolua_lerror;
2366  else
2367 #endif
2368  {
2369   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2370   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,2,0));
2371   double surface_x = ((double)  tolua_tonumber(tolua_S,3,0));
2372   double surface_y = ((double)  tolua_tonumber(tolua_S,4,0));
2373   {
2374    cairo_mask_surface(cr,surface,surface_x,surface_y);
2375   }
2376  }
2377  return 0;
2378 #ifndef TOLUA_RELEASE
2379  tolua_lerror:
2380  tolua_error(tolua_S,"#ferror in function 'cairo_mask_surface'.",&tolua_err);
2381  return 0;
2382 #endif
2383 }
2384 #endif //#ifndef TOLUA_DISABLE
2385
2386 /* function: cairo_stroke */
2387 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_stroke00
2388 static int tolua_cairo_cairo_stroke00(lua_State* tolua_S)
2389 {
2390 #ifndef TOLUA_RELEASE
2391  tolua_Error tolua_err;
2392  if (
2393      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2394      !tolua_isnoobj(tolua_S,2,&tolua_err)
2395  )
2396   goto tolua_lerror;
2397  else
2398 #endif
2399  {
2400   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2401   {
2402    cairo_stroke(cr);
2403   }
2404  }
2405  return 0;
2406 #ifndef TOLUA_RELEASE
2407  tolua_lerror:
2408  tolua_error(tolua_S,"#ferror in function 'cairo_stroke'.",&tolua_err);
2409  return 0;
2410 #endif
2411 }
2412 #endif //#ifndef TOLUA_DISABLE
2413
2414 /* function: cairo_stroke_preserve */
2415 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_stroke_preserve00
2416 static int tolua_cairo_cairo_stroke_preserve00(lua_State* tolua_S)
2417 {
2418 #ifndef TOLUA_RELEASE
2419  tolua_Error tolua_err;
2420  if (
2421      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2422      !tolua_isnoobj(tolua_S,2,&tolua_err)
2423  )
2424   goto tolua_lerror;
2425  else
2426 #endif
2427  {
2428   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2429   {
2430    cairo_stroke_preserve(cr);
2431   }
2432  }
2433  return 0;
2434 #ifndef TOLUA_RELEASE
2435  tolua_lerror:
2436  tolua_error(tolua_S,"#ferror in function 'cairo_stroke_preserve'.",&tolua_err);
2437  return 0;
2438 #endif
2439 }
2440 #endif //#ifndef TOLUA_DISABLE
2441
2442 /* function: cairo_fill */
2443 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_fill00
2444 static int tolua_cairo_cairo_fill00(lua_State* tolua_S)
2445 {
2446 #ifndef TOLUA_RELEASE
2447  tolua_Error tolua_err;
2448  if (
2449      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2450      !tolua_isnoobj(tolua_S,2,&tolua_err)
2451  )
2452   goto tolua_lerror;
2453  else
2454 #endif
2455  {
2456   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2457   {
2458    cairo_fill(cr);
2459   }
2460  }
2461  return 0;
2462 #ifndef TOLUA_RELEASE
2463  tolua_lerror:
2464  tolua_error(tolua_S,"#ferror in function 'cairo_fill'.",&tolua_err);
2465  return 0;
2466 #endif
2467 }
2468 #endif //#ifndef TOLUA_DISABLE
2469
2470 /* function: cairo_fill_preserve */
2471 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_fill_preserve00
2472 static int tolua_cairo_cairo_fill_preserve00(lua_State* tolua_S)
2473 {
2474 #ifndef TOLUA_RELEASE
2475  tolua_Error tolua_err;
2476  if (
2477      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2478      !tolua_isnoobj(tolua_S,2,&tolua_err)
2479  )
2480   goto tolua_lerror;
2481  else
2482 #endif
2483  {
2484   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2485   {
2486    cairo_fill_preserve(cr);
2487   }
2488  }
2489  return 0;
2490 #ifndef TOLUA_RELEASE
2491  tolua_lerror:
2492  tolua_error(tolua_S,"#ferror in function 'cairo_fill_preserve'.",&tolua_err);
2493  return 0;
2494 #endif
2495 }
2496 #endif //#ifndef TOLUA_DISABLE
2497
2498 /* function: cairo_copy_page */
2499 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_copy_page00
2500 static int tolua_cairo_cairo_copy_page00(lua_State* tolua_S)
2501 {
2502 #ifndef TOLUA_RELEASE
2503  tolua_Error tolua_err;
2504  if (
2505      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2506      !tolua_isnoobj(tolua_S,2,&tolua_err)
2507  )
2508   goto tolua_lerror;
2509  else
2510 #endif
2511  {
2512   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2513   {
2514    cairo_copy_page(cr);
2515   }
2516  }
2517  return 0;
2518 #ifndef TOLUA_RELEASE
2519  tolua_lerror:
2520  tolua_error(tolua_S,"#ferror in function 'cairo_copy_page'.",&tolua_err);
2521  return 0;
2522 #endif
2523 }
2524 #endif //#ifndef TOLUA_DISABLE
2525
2526 /* function: cairo_show_page */
2527 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_show_page00
2528 static int tolua_cairo_cairo_show_page00(lua_State* tolua_S)
2529 {
2530 #ifndef TOLUA_RELEASE
2531  tolua_Error tolua_err;
2532  if (
2533      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2534      !tolua_isnoobj(tolua_S,2,&tolua_err)
2535  )
2536   goto tolua_lerror;
2537  else
2538 #endif
2539  {
2540   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2541   {
2542    cairo_show_page(cr);
2543   }
2544  }
2545  return 0;
2546 #ifndef TOLUA_RELEASE
2547  tolua_lerror:
2548  tolua_error(tolua_S,"#ferror in function 'cairo_show_page'.",&tolua_err);
2549  return 0;
2550 #endif
2551 }
2552 #endif //#ifndef TOLUA_DISABLE
2553
2554 /* function: cairo_in_stroke */
2555 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_in_stroke00
2556 static int tolua_cairo_cairo_in_stroke00(lua_State* tolua_S)
2557 {
2558 #ifndef TOLUA_RELEASE
2559  tolua_Error tolua_err;
2560  if (
2561      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2562      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2563      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2564      !tolua_isnoobj(tolua_S,4,&tolua_err)
2565  )
2566   goto tolua_lerror;
2567  else
2568 #endif
2569  {
2570   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2571   double x = ((double)  tolua_tonumber(tolua_S,2,0));
2572   double y = ((double)  tolua_tonumber(tolua_S,3,0));
2573   {
2574     int tolua_ret = (  int)  cairo_in_stroke(cr,x,y);
2575    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2576   }
2577  }
2578  return 1;
2579 #ifndef TOLUA_RELEASE
2580  tolua_lerror:
2581  tolua_error(tolua_S,"#ferror in function 'cairo_in_stroke'.",&tolua_err);
2582  return 0;
2583 #endif
2584 }
2585 #endif //#ifndef TOLUA_DISABLE
2586
2587 /* function: cairo_in_fill */
2588 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_in_fill00
2589 static int tolua_cairo_cairo_in_fill00(lua_State* tolua_S)
2590 {
2591 #ifndef TOLUA_RELEASE
2592  tolua_Error tolua_err;
2593  if (
2594      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2595      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2596      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2597      !tolua_isnoobj(tolua_S,4,&tolua_err)
2598  )
2599   goto tolua_lerror;
2600  else
2601 #endif
2602  {
2603   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2604   double x = ((double)  tolua_tonumber(tolua_S,2,0));
2605   double y = ((double)  tolua_tonumber(tolua_S,3,0));
2606   {
2607     int tolua_ret = (  int)  cairo_in_fill(cr,x,y);
2608    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2609   }
2610  }
2611  return 1;
2612 #ifndef TOLUA_RELEASE
2613  tolua_lerror:
2614  tolua_error(tolua_S,"#ferror in function 'cairo_in_fill'.",&tolua_err);
2615  return 0;
2616 #endif
2617 }
2618 #endif //#ifndef TOLUA_DISABLE
2619
2620 /* function: cairo_stroke_extents */
2621 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_stroke_extents00
2622 static int tolua_cairo_cairo_stroke_extents00(lua_State* tolua_S)
2623 {
2624 #ifndef TOLUA_RELEASE
2625  tolua_Error tolua_err;
2626  if (
2627      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2628      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2629      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2630      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2631      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
2632      !tolua_isnoobj(tolua_S,6,&tolua_err)
2633  )
2634   goto tolua_lerror;
2635  else
2636 #endif
2637  {
2638   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2639   double x1 = ((double)  tolua_tonumber(tolua_S,2,0));
2640   double y1 = ((double)  tolua_tonumber(tolua_S,3,0));
2641   double x2 = ((double)  tolua_tonumber(tolua_S,4,0));
2642   double y2 = ((double)  tolua_tonumber(tolua_S,5,0));
2643   {
2644    cairo_stroke_extents(cr,&x1,&y1,&x2,&y2);
2645    tolua_pushnumber(tolua_S,(lua_Number)x1);
2646    tolua_pushnumber(tolua_S,(lua_Number)y1);
2647    tolua_pushnumber(tolua_S,(lua_Number)x2);
2648    tolua_pushnumber(tolua_S,(lua_Number)y2);
2649   }
2650  }
2651  return 4;
2652 #ifndef TOLUA_RELEASE
2653  tolua_lerror:
2654  tolua_error(tolua_S,"#ferror in function 'cairo_stroke_extents'.",&tolua_err);
2655  return 0;
2656 #endif
2657 }
2658 #endif //#ifndef TOLUA_DISABLE
2659
2660 /* function: cairo_fill_extents */
2661 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_fill_extents00
2662 static int tolua_cairo_cairo_fill_extents00(lua_State* tolua_S)
2663 {
2664 #ifndef TOLUA_RELEASE
2665  tolua_Error tolua_err;
2666  if (
2667      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2668      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2669      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2670      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2671      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
2672      !tolua_isnoobj(tolua_S,6,&tolua_err)
2673  )
2674   goto tolua_lerror;
2675  else
2676 #endif
2677  {
2678   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2679   double x1 = ((double)  tolua_tonumber(tolua_S,2,0));
2680   double y1 = ((double)  tolua_tonumber(tolua_S,3,0));
2681   double x2 = ((double)  tolua_tonumber(tolua_S,4,0));
2682   double y2 = ((double)  tolua_tonumber(tolua_S,5,0));
2683   {
2684    cairo_fill_extents(cr,&x1,&y1,&x2,&y2);
2685    tolua_pushnumber(tolua_S,(lua_Number)x1);
2686    tolua_pushnumber(tolua_S,(lua_Number)y1);
2687    tolua_pushnumber(tolua_S,(lua_Number)x2);
2688    tolua_pushnumber(tolua_S,(lua_Number)y2);
2689   }
2690  }
2691  return 4;
2692 #ifndef TOLUA_RELEASE
2693  tolua_lerror:
2694  tolua_error(tolua_S,"#ferror in function 'cairo_fill_extents'.",&tolua_err);
2695  return 0;
2696 #endif
2697 }
2698 #endif //#ifndef TOLUA_DISABLE
2699
2700 /* function: cairo_reset_clip */
2701 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_reset_clip00
2702 static int tolua_cairo_cairo_reset_clip00(lua_State* tolua_S)
2703 {
2704 #ifndef TOLUA_RELEASE
2705  tolua_Error tolua_err;
2706  if (
2707      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2708      !tolua_isnoobj(tolua_S,2,&tolua_err)
2709  )
2710   goto tolua_lerror;
2711  else
2712 #endif
2713  {
2714   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2715   {
2716    cairo_reset_clip(cr);
2717   }
2718  }
2719  return 0;
2720 #ifndef TOLUA_RELEASE
2721  tolua_lerror:
2722  tolua_error(tolua_S,"#ferror in function 'cairo_reset_clip'.",&tolua_err);
2723  return 0;
2724 #endif
2725 }
2726 #endif //#ifndef TOLUA_DISABLE
2727
2728 /* function: cairo_clip */
2729 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_clip00
2730 static int tolua_cairo_cairo_clip00(lua_State* tolua_S)
2731 {
2732 #ifndef TOLUA_RELEASE
2733  tolua_Error tolua_err;
2734  if (
2735      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2736      !tolua_isnoobj(tolua_S,2,&tolua_err)
2737  )
2738   goto tolua_lerror;
2739  else
2740 #endif
2741  {
2742   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2743   {
2744    cairo_clip(cr);
2745   }
2746  }
2747  return 0;
2748 #ifndef TOLUA_RELEASE
2749  tolua_lerror:
2750  tolua_error(tolua_S,"#ferror in function 'cairo_clip'.",&tolua_err);
2751  return 0;
2752 #endif
2753 }
2754 #endif //#ifndef TOLUA_DISABLE
2755
2756 /* function: cairo_clip_preserve */
2757 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_clip_preserve00
2758 static int tolua_cairo_cairo_clip_preserve00(lua_State* tolua_S)
2759 {
2760 #ifndef TOLUA_RELEASE
2761  tolua_Error tolua_err;
2762  if (
2763      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2764      !tolua_isnoobj(tolua_S,2,&tolua_err)
2765  )
2766   goto tolua_lerror;
2767  else
2768 #endif
2769  {
2770   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2771   {
2772    cairo_clip_preserve(cr);
2773   }
2774  }
2775  return 0;
2776 #ifndef TOLUA_RELEASE
2777  tolua_lerror:
2778  tolua_error(tolua_S,"#ferror in function 'cairo_clip_preserve'.",&tolua_err);
2779  return 0;
2780 #endif
2781 }
2782 #endif //#ifndef TOLUA_DISABLE
2783
2784 /* function: cairo_clip_extents */
2785 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_clip_extents00
2786 static int tolua_cairo_cairo_clip_extents00(lua_State* tolua_S)
2787 {
2788 #ifndef TOLUA_RELEASE
2789  tolua_Error tolua_err;
2790  if (
2791      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
2792      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
2793      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
2794      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
2795      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
2796      !tolua_isnoobj(tolua_S,6,&tolua_err)
2797  )
2798   goto tolua_lerror;
2799  else
2800 #endif
2801  {
2802   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
2803   double x1 = ((double)  tolua_tonumber(tolua_S,2,0));
2804   double y1 = ((double)  tolua_tonumber(tolua_S,3,0));
2805   double x2 = ((double)  tolua_tonumber(tolua_S,4,0));
2806   double y2 = ((double)  tolua_tonumber(tolua_S,5,0));
2807   {
2808    cairo_clip_extents(cr,&x1,&y1,&x2,&y2);
2809    tolua_pushnumber(tolua_S,(lua_Number)x1);
2810    tolua_pushnumber(tolua_S,(lua_Number)y1);
2811    tolua_pushnumber(tolua_S,(lua_Number)x2);
2812    tolua_pushnumber(tolua_S,(lua_Number)y2);
2813   }
2814  }
2815  return 4;
2816 #ifndef TOLUA_RELEASE
2817  tolua_lerror:
2818  tolua_error(tolua_S,"#ferror in function 'cairo_clip_extents'.",&tolua_err);
2819  return 0;
2820 #endif
2821 }
2822 #endif //#ifndef TOLUA_DISABLE
2823
2824 /* get function: x of class  cairo_rectangle_t */
2825 #ifndef TOLUA_DISABLE_tolua_get_cairo_rectangle_t_x
2826 static int tolua_get_cairo_rectangle_t_x(lua_State* tolua_S)
2827 {
2828   cairo_rectangle_t* self = (cairo_rectangle_t*)  tolua_tousertype(tolua_S,1,0);
2829 #ifndef TOLUA_RELEASE
2830   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL);
2831 #endif
2832   tolua_pushnumber(tolua_S,(lua_Number)self->x);
2833  return 1;
2834 }
2835 #endif //#ifndef TOLUA_DISABLE
2836
2837 /* set function: x of class  cairo_rectangle_t */
2838 #ifndef TOLUA_DISABLE_tolua_set_cairo_rectangle_t_x
2839 static int tolua_set_cairo_rectangle_t_x(lua_State* tolua_S)
2840 {
2841   cairo_rectangle_t* self = (cairo_rectangle_t*)  tolua_tousertype(tolua_S,1,0);
2842 #ifndef TOLUA_RELEASE
2843   tolua_Error tolua_err;
2844   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL);
2845   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
2846    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
2847 #endif
2848   self->x = ((double)  tolua_tonumber(tolua_S,2,0))
2849 ;
2850  return 0;
2851 }
2852 #endif //#ifndef TOLUA_DISABLE
2853
2854 /* get function: y of class  cairo_rectangle_t */
2855 #ifndef TOLUA_DISABLE_tolua_get_cairo_rectangle_t_y
2856 static int tolua_get_cairo_rectangle_t_y(lua_State* tolua_S)
2857 {
2858   cairo_rectangle_t* self = (cairo_rectangle_t*)  tolua_tousertype(tolua_S,1,0);
2859 #ifndef TOLUA_RELEASE
2860   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL);
2861 #endif
2862   tolua_pushnumber(tolua_S,(lua_Number)self->y);
2863  return 1;
2864 }
2865 #endif //#ifndef TOLUA_DISABLE
2866
2867 /* set function: y of class  cairo_rectangle_t */
2868 #ifndef TOLUA_DISABLE_tolua_set_cairo_rectangle_t_y
2869 static int tolua_set_cairo_rectangle_t_y(lua_State* tolua_S)
2870 {
2871   cairo_rectangle_t* self = (cairo_rectangle_t*)  tolua_tousertype(tolua_S,1,0);
2872 #ifndef TOLUA_RELEASE
2873   tolua_Error tolua_err;
2874   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL);
2875   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
2876    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
2877 #endif
2878   self->y = ((double)  tolua_tonumber(tolua_S,2,0))
2879 ;
2880  return 0;
2881 }
2882 #endif //#ifndef TOLUA_DISABLE
2883
2884 /* get function: width of class  cairo_rectangle_t */
2885 #ifndef TOLUA_DISABLE_tolua_get_cairo_rectangle_t_width
2886 static int tolua_get_cairo_rectangle_t_width(lua_State* tolua_S)
2887 {
2888   cairo_rectangle_t* self = (cairo_rectangle_t*)  tolua_tousertype(tolua_S,1,0);
2889 #ifndef TOLUA_RELEASE
2890   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'width'",NULL);
2891 #endif
2892   tolua_pushnumber(tolua_S,(lua_Number)self->width);
2893  return 1;
2894 }
2895 #endif //#ifndef TOLUA_DISABLE
2896
2897 /* set function: width of class  cairo_rectangle_t */
2898 #ifndef TOLUA_DISABLE_tolua_set_cairo_rectangle_t_width
2899 static int tolua_set_cairo_rectangle_t_width(lua_State* tolua_S)
2900 {
2901   cairo_rectangle_t* self = (cairo_rectangle_t*)  tolua_tousertype(tolua_S,1,0);
2902 #ifndef TOLUA_RELEASE
2903   tolua_Error tolua_err;
2904   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'width'",NULL);
2905   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
2906    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
2907 #endif
2908   self->width = ((double)  tolua_tonumber(tolua_S,2,0))
2909 ;
2910  return 0;
2911 }
2912 #endif //#ifndef TOLUA_DISABLE
2913
2914 /* get function: height of class  cairo_rectangle_t */
2915 #ifndef TOLUA_DISABLE_tolua_get_cairo_rectangle_t_height
2916 static int tolua_get_cairo_rectangle_t_height(lua_State* tolua_S)
2917 {
2918   cairo_rectangle_t* self = (cairo_rectangle_t*)  tolua_tousertype(tolua_S,1,0);
2919 #ifndef TOLUA_RELEASE
2920   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'height'",NULL);
2921 #endif
2922   tolua_pushnumber(tolua_S,(lua_Number)self->height);
2923  return 1;
2924 }
2925 #endif //#ifndef TOLUA_DISABLE
2926
2927 /* set function: height of class  cairo_rectangle_t */
2928 #ifndef TOLUA_DISABLE_tolua_set_cairo_rectangle_t_height
2929 static int tolua_set_cairo_rectangle_t_height(lua_State* tolua_S)
2930 {
2931   cairo_rectangle_t* self = (cairo_rectangle_t*)  tolua_tousertype(tolua_S,1,0);
2932 #ifndef TOLUA_RELEASE
2933   tolua_Error tolua_err;
2934   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'height'",NULL);
2935   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
2936    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
2937 #endif
2938   self->height = ((double)  tolua_tonumber(tolua_S,2,0))
2939 ;
2940  return 0;
2941 }
2942 #endif //#ifndef TOLUA_DISABLE
2943
2944 /* get function: status of class  cairo_rectangle_list_t */
2945 #ifndef TOLUA_DISABLE_tolua_get_cairo_rectangle_list_t_status
2946 static int tolua_get_cairo_rectangle_list_t_status(lua_State* tolua_S)
2947 {
2948   cairo_rectangle_list_t* self = (cairo_rectangle_list_t*)  tolua_tousertype(tolua_S,1,0);
2949 #ifndef TOLUA_RELEASE
2950   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'status'",NULL);
2951 #endif
2952   tolua_pushnumber(tolua_S,(lua_Number)self->status);
2953  return 1;
2954 }
2955 #endif //#ifndef TOLUA_DISABLE
2956
2957 /* set function: status of class  cairo_rectangle_list_t */
2958 #ifndef TOLUA_DISABLE_tolua_set_cairo_rectangle_list_t_status
2959 static int tolua_set_cairo_rectangle_list_t_status(lua_State* tolua_S)
2960 {
2961   cairo_rectangle_list_t* self = (cairo_rectangle_list_t*)  tolua_tousertype(tolua_S,1,0);
2962 #ifndef TOLUA_RELEASE
2963   tolua_Error tolua_err;
2964   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'status'",NULL);
2965   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
2966    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
2967 #endif
2968   self->status = ((cairo_status_t) (int)  tolua_tonumber(tolua_S,2,0))
2969 ;
2970  return 0;
2971 }
2972 #endif //#ifndef TOLUA_DISABLE
2973
2974 /* get function: rectangles of class  cairo_rectangle_list_t */
2975 #ifndef TOLUA_DISABLE_tolua_get_cairo_rectangle_list_t_rectangles_ptr
2976 static int tolua_get_cairo_rectangle_list_t_rectangles_ptr(lua_State* tolua_S)
2977 {
2978   cairo_rectangle_list_t* self = (cairo_rectangle_list_t*)  tolua_tousertype(tolua_S,1,0);
2979 #ifndef TOLUA_RELEASE
2980   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rectangles'",NULL);
2981 #endif
2982    tolua_pushusertype(tolua_S,(void*)self->rectangles,"cairo_rectangle_t");
2983  return 1;
2984 }
2985 #endif //#ifndef TOLUA_DISABLE
2986
2987 /* set function: rectangles of class  cairo_rectangle_list_t */
2988 #ifndef TOLUA_DISABLE_tolua_set_cairo_rectangle_list_t_rectangles_ptr
2989 static int tolua_set_cairo_rectangle_list_t_rectangles_ptr(lua_State* tolua_S)
2990 {
2991   cairo_rectangle_list_t* self = (cairo_rectangle_list_t*)  tolua_tousertype(tolua_S,1,0);
2992 #ifndef TOLUA_RELEASE
2993   tolua_Error tolua_err;
2994   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'rectangles'",NULL);
2995   if (!tolua_isusertype(tolua_S,2,"cairo_rectangle_t",0,&tolua_err))
2996    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
2997 #endif
2998   self->rectangles = ((cairo_rectangle_t*)  tolua_tousertype(tolua_S,2,0))
2999 ;
3000  return 0;
3001 }
3002 #endif //#ifndef TOLUA_DISABLE
3003
3004 /* get function: num_rectangles of class  cairo_rectangle_list_t */
3005 #ifndef TOLUA_DISABLE_tolua_get_cairo_rectangle_list_t_num_rectangles
3006 static int tolua_get_cairo_rectangle_list_t_num_rectangles(lua_State* tolua_S)
3007 {
3008   cairo_rectangle_list_t* self = (cairo_rectangle_list_t*)  tolua_tousertype(tolua_S,1,0);
3009 #ifndef TOLUA_RELEASE
3010   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'num_rectangles'",NULL);
3011 #endif
3012   tolua_pushnumber(tolua_S,(lua_Number)self->num_rectangles);
3013  return 1;
3014 }
3015 #endif //#ifndef TOLUA_DISABLE
3016
3017 /* set function: num_rectangles of class  cairo_rectangle_list_t */
3018 #ifndef TOLUA_DISABLE_tolua_set_cairo_rectangle_list_t_num_rectangles
3019 static int tolua_set_cairo_rectangle_list_t_num_rectangles(lua_State* tolua_S)
3020 {
3021   cairo_rectangle_list_t* self = (cairo_rectangle_list_t*)  tolua_tousertype(tolua_S,1,0);
3022 #ifndef TOLUA_RELEASE
3023   tolua_Error tolua_err;
3024   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'num_rectangles'",NULL);
3025   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3026    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3027 #endif
3028   self->num_rectangles = ((int)  tolua_tonumber(tolua_S,2,0))
3029 ;
3030  return 0;
3031 }
3032 #endif //#ifndef TOLUA_DISABLE
3033
3034 /* function: cairo_copy_clip_rectangle_list */
3035 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_copy_clip_rectangle_list00
3036 static int tolua_cairo_cairo_copy_clip_rectangle_list00(lua_State* tolua_S)
3037 {
3038 #ifndef TOLUA_RELEASE
3039  tolua_Error tolua_err;
3040  if (
3041      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
3042      !tolua_isnoobj(tolua_S,2,&tolua_err)
3043  )
3044   goto tolua_lerror;
3045  else
3046 #endif
3047  {
3048   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
3049   {
3050    cairo_rectangle_list_t* tolua_ret = (cairo_rectangle_list_t*)  cairo_copy_clip_rectangle_list(cr);
3051     tolua_pushusertype(tolua_S,(void*)tolua_ret,"cairo_rectangle_list_t");
3052   }
3053  }
3054  return 1;
3055 #ifndef TOLUA_RELEASE
3056  tolua_lerror:
3057  tolua_error(tolua_S,"#ferror in function 'cairo_copy_clip_rectangle_list'.",&tolua_err);
3058  return 0;
3059 #endif
3060 }
3061 #endif //#ifndef TOLUA_DISABLE
3062
3063 /* function: cairo_rectangle_list_destroy */
3064 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_rectangle_list_destroy00
3065 static int tolua_cairo_cairo_rectangle_list_destroy00(lua_State* tolua_S)
3066 {
3067 #ifndef TOLUA_RELEASE
3068  tolua_Error tolua_err;
3069  if (
3070      !tolua_isusertype(tolua_S,1,"cairo_rectangle_list_t",0,&tolua_err) ||
3071      !tolua_isnoobj(tolua_S,2,&tolua_err)
3072  )
3073   goto tolua_lerror;
3074  else
3075 #endif
3076  {
3077   cairo_rectangle_list_t* rectangle_list = ((cairo_rectangle_list_t*)  tolua_tousertype(tolua_S,1,0));
3078   {
3079    cairo_rectangle_list_destroy(rectangle_list);
3080   }
3081  }
3082  return 0;
3083 #ifndef TOLUA_RELEASE
3084  tolua_lerror:
3085  tolua_error(tolua_S,"#ferror in function 'cairo_rectangle_list_destroy'.",&tolua_err);
3086  return 0;
3087 #endif
3088 }
3089 #endif //#ifndef TOLUA_DISABLE
3090
3091 /* get function: index of class  cairo_glyph_t */
3092 #ifndef TOLUA_DISABLE_tolua_get_cairo_glyph_t_unsigned_index
3093 static int tolua_get_cairo_glyph_t_unsigned_index(lua_State* tolua_S)
3094 {
3095   cairo_glyph_t* self = (cairo_glyph_t*)  tolua_tousertype(tolua_S,1,0);
3096 #ifndef TOLUA_RELEASE
3097   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'index'",NULL);
3098 #endif
3099   tolua_pushnumber(tolua_S,(lua_Number)self->index);
3100  return 1;
3101 }
3102 #endif //#ifndef TOLUA_DISABLE
3103
3104 /* set function: index of class  cairo_glyph_t */
3105 #ifndef TOLUA_DISABLE_tolua_set_cairo_glyph_t_unsigned_index
3106 static int tolua_set_cairo_glyph_t_unsigned_index(lua_State* tolua_S)
3107 {
3108   cairo_glyph_t* self = (cairo_glyph_t*)  tolua_tousertype(tolua_S,1,0);
3109 #ifndef TOLUA_RELEASE
3110   tolua_Error tolua_err;
3111   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'index'",NULL);
3112   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3113    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3114 #endif
3115   self->index = ((unsigned long)  tolua_tonumber(tolua_S,2,0))
3116 ;
3117  return 0;
3118 }
3119 #endif //#ifndef TOLUA_DISABLE
3120
3121 /* get function: x of class  cairo_glyph_t */
3122 #ifndef TOLUA_DISABLE_tolua_get_cairo_glyph_t_x
3123 static int tolua_get_cairo_glyph_t_x(lua_State* tolua_S)
3124 {
3125   cairo_glyph_t* self = (cairo_glyph_t*)  tolua_tousertype(tolua_S,1,0);
3126 #ifndef TOLUA_RELEASE
3127   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL);
3128 #endif
3129   tolua_pushnumber(tolua_S,(lua_Number)self->x);
3130  return 1;
3131 }
3132 #endif //#ifndef TOLUA_DISABLE
3133
3134 /* set function: x of class  cairo_glyph_t */
3135 #ifndef TOLUA_DISABLE_tolua_set_cairo_glyph_t_x
3136 static int tolua_set_cairo_glyph_t_x(lua_State* tolua_S)
3137 {
3138   cairo_glyph_t* self = (cairo_glyph_t*)  tolua_tousertype(tolua_S,1,0);
3139 #ifndef TOLUA_RELEASE
3140   tolua_Error tolua_err;
3141   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL);
3142   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3143    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3144 #endif
3145   self->x = ((double)  tolua_tonumber(tolua_S,2,0))
3146 ;
3147  return 0;
3148 }
3149 #endif //#ifndef TOLUA_DISABLE
3150
3151 /* get function: y of class  cairo_glyph_t */
3152 #ifndef TOLUA_DISABLE_tolua_get_cairo_glyph_t_y
3153 static int tolua_get_cairo_glyph_t_y(lua_State* tolua_S)
3154 {
3155   cairo_glyph_t* self = (cairo_glyph_t*)  tolua_tousertype(tolua_S,1,0);
3156 #ifndef TOLUA_RELEASE
3157   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL);
3158 #endif
3159   tolua_pushnumber(tolua_S,(lua_Number)self->y);
3160  return 1;
3161 }
3162 #endif //#ifndef TOLUA_DISABLE
3163
3164 /* set function: y of class  cairo_glyph_t */
3165 #ifndef TOLUA_DISABLE_tolua_set_cairo_glyph_t_y
3166 static int tolua_set_cairo_glyph_t_y(lua_State* tolua_S)
3167 {
3168   cairo_glyph_t* self = (cairo_glyph_t*)  tolua_tousertype(tolua_S,1,0);
3169 #ifndef TOLUA_RELEASE
3170   tolua_Error tolua_err;
3171   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL);
3172   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3173    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3174 #endif
3175   self->y = ((double)  tolua_tonumber(tolua_S,2,0))
3176 ;
3177  return 0;
3178 }
3179 #endif //#ifndef TOLUA_DISABLE
3180
3181 /* function: cairo_glyph_allocate */
3182 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_glyph_allocate00
3183 static int tolua_cairo_cairo_glyph_allocate00(lua_State* tolua_S)
3184 {
3185 #ifndef TOLUA_RELEASE
3186  tolua_Error tolua_err;
3187  if (
3188      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
3189      !tolua_isnoobj(tolua_S,2,&tolua_err)
3190  )
3191   goto tolua_lerror;
3192  else
3193 #endif
3194  {
3195   int num_glyphs = ((int)  tolua_tonumber(tolua_S,1,0));
3196   {
3197    cairo_glyph_t* tolua_ret = (cairo_glyph_t*)  cairo_glyph_allocate(num_glyphs);
3198     tolua_pushusertype(tolua_S,(void*)tolua_ret,"cairo_glyph_t");
3199   }
3200  }
3201  return 1;
3202 #ifndef TOLUA_RELEASE
3203  tolua_lerror:
3204  tolua_error(tolua_S,"#ferror in function 'cairo_glyph_allocate'.",&tolua_err);
3205  return 0;
3206 #endif
3207 }
3208 #endif //#ifndef TOLUA_DISABLE
3209
3210 /* function: cairo_glyph_free */
3211 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_glyph_free00
3212 static int tolua_cairo_cairo_glyph_free00(lua_State* tolua_S)
3213 {
3214 #ifndef TOLUA_RELEASE
3215  tolua_Error tolua_err;
3216  if (
3217      !tolua_isusertype(tolua_S,1,"cairo_glyph_t",0,&tolua_err) ||
3218      !tolua_isnoobj(tolua_S,2,&tolua_err)
3219  )
3220   goto tolua_lerror;
3221  else
3222 #endif
3223  {
3224   cairo_glyph_t* glyphs = ((cairo_glyph_t*)  tolua_tousertype(tolua_S,1,0));
3225   {
3226    cairo_glyph_free(glyphs);
3227   }
3228  }
3229  return 0;
3230 #ifndef TOLUA_RELEASE
3231  tolua_lerror:
3232  tolua_error(tolua_S,"#ferror in function 'cairo_glyph_free'.",&tolua_err);
3233  return 0;
3234 #endif
3235 }
3236 #endif //#ifndef TOLUA_DISABLE
3237
3238 /* get function: num_bytes of class  cairo_text_cluster_t */
3239 #ifndef TOLUA_DISABLE_tolua_get_cairo_text_cluster_t_num_bytes
3240 static int tolua_get_cairo_text_cluster_t_num_bytes(lua_State* tolua_S)
3241 {
3242   cairo_text_cluster_t* self = (cairo_text_cluster_t*)  tolua_tousertype(tolua_S,1,0);
3243 #ifndef TOLUA_RELEASE
3244   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'num_bytes'",NULL);
3245 #endif
3246   tolua_pushnumber(tolua_S,(lua_Number)self->num_bytes);
3247  return 1;
3248 }
3249 #endif //#ifndef TOLUA_DISABLE
3250
3251 /* set function: num_bytes of class  cairo_text_cluster_t */
3252 #ifndef TOLUA_DISABLE_tolua_set_cairo_text_cluster_t_num_bytes
3253 static int tolua_set_cairo_text_cluster_t_num_bytes(lua_State* tolua_S)
3254 {
3255   cairo_text_cluster_t* self = (cairo_text_cluster_t*)  tolua_tousertype(tolua_S,1,0);
3256 #ifndef TOLUA_RELEASE
3257   tolua_Error tolua_err;
3258   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'num_bytes'",NULL);
3259   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3260    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3261 #endif
3262   self->num_bytes = ((int)  tolua_tonumber(tolua_S,2,0))
3263 ;
3264  return 0;
3265 }
3266 #endif //#ifndef TOLUA_DISABLE
3267
3268 /* get function: num_glyphs of class  cairo_text_cluster_t */
3269 #ifndef TOLUA_DISABLE_tolua_get_cairo_text_cluster_t_num_glyphs
3270 static int tolua_get_cairo_text_cluster_t_num_glyphs(lua_State* tolua_S)
3271 {
3272   cairo_text_cluster_t* self = (cairo_text_cluster_t*)  tolua_tousertype(tolua_S,1,0);
3273 #ifndef TOLUA_RELEASE
3274   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'num_glyphs'",NULL);
3275 #endif
3276   tolua_pushnumber(tolua_S,(lua_Number)self->num_glyphs);
3277  return 1;
3278 }
3279 #endif //#ifndef TOLUA_DISABLE
3280
3281 /* set function: num_glyphs of class  cairo_text_cluster_t */
3282 #ifndef TOLUA_DISABLE_tolua_set_cairo_text_cluster_t_num_glyphs
3283 static int tolua_set_cairo_text_cluster_t_num_glyphs(lua_State* tolua_S)
3284 {
3285   cairo_text_cluster_t* self = (cairo_text_cluster_t*)  tolua_tousertype(tolua_S,1,0);
3286 #ifndef TOLUA_RELEASE
3287   tolua_Error tolua_err;
3288   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'num_glyphs'",NULL);
3289   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3290    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3291 #endif
3292   self->num_glyphs = ((int)  tolua_tonumber(tolua_S,2,0))
3293 ;
3294  return 0;
3295 }
3296 #endif //#ifndef TOLUA_DISABLE
3297
3298 /* function: cairo_text_cluster_allocate */
3299 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_text_cluster_allocate00
3300 static int tolua_cairo_cairo_text_cluster_allocate00(lua_State* tolua_S)
3301 {
3302 #ifndef TOLUA_RELEASE
3303  tolua_Error tolua_err;
3304  if (
3305      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
3306      !tolua_isnoobj(tolua_S,2,&tolua_err)
3307  )
3308   goto tolua_lerror;
3309  else
3310 #endif
3311  {
3312   int num_clusters = ((int)  tolua_tonumber(tolua_S,1,0));
3313   {
3314    cairo_text_cluster_t* tolua_ret = (cairo_text_cluster_t*)  cairo_text_cluster_allocate(num_clusters);
3315     tolua_pushusertype(tolua_S,(void*)tolua_ret,"cairo_text_cluster_t");
3316   }
3317  }
3318  return 1;
3319 #ifndef TOLUA_RELEASE
3320  tolua_lerror:
3321  tolua_error(tolua_S,"#ferror in function 'cairo_text_cluster_allocate'.",&tolua_err);
3322  return 0;
3323 #endif
3324 }
3325 #endif //#ifndef TOLUA_DISABLE
3326
3327 /* function: cairo_text_cluster_free */
3328 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_text_cluster_free00
3329 static int tolua_cairo_cairo_text_cluster_free00(lua_State* tolua_S)
3330 {
3331 #ifndef TOLUA_RELEASE
3332  tolua_Error tolua_err;
3333  if (
3334      !tolua_isusertype(tolua_S,1,"cairo_text_cluster_t",0,&tolua_err) ||
3335      !tolua_isnoobj(tolua_S,2,&tolua_err)
3336  )
3337   goto tolua_lerror;
3338  else
3339 #endif
3340  {
3341   cairo_text_cluster_t* clusters = ((cairo_text_cluster_t*)  tolua_tousertype(tolua_S,1,0));
3342   {
3343    cairo_text_cluster_free(clusters);
3344   }
3345  }
3346  return 0;
3347 #ifndef TOLUA_RELEASE
3348  tolua_lerror:
3349  tolua_error(tolua_S,"#ferror in function 'cairo_text_cluster_free'.",&tolua_err);
3350  return 0;
3351 #endif
3352 }
3353 #endif //#ifndef TOLUA_DISABLE
3354
3355 /* get function: x_bearing of class  cairo_text_extents_t */
3356 #ifndef TOLUA_DISABLE_tolua_get_cairo_text_extents_t_x_bearing
3357 static int tolua_get_cairo_text_extents_t_x_bearing(lua_State* tolua_S)
3358 {
3359   cairo_text_extents_t* self = (cairo_text_extents_t*)  tolua_tousertype(tolua_S,1,0);
3360 #ifndef TOLUA_RELEASE
3361   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_bearing'",NULL);
3362 #endif
3363   tolua_pushnumber(tolua_S,(lua_Number)self->x_bearing);
3364  return 1;
3365 }
3366 #endif //#ifndef TOLUA_DISABLE
3367
3368 /* set function: x_bearing of class  cairo_text_extents_t */
3369 #ifndef TOLUA_DISABLE_tolua_set_cairo_text_extents_t_x_bearing
3370 static int tolua_set_cairo_text_extents_t_x_bearing(lua_State* tolua_S)
3371 {
3372   cairo_text_extents_t* self = (cairo_text_extents_t*)  tolua_tousertype(tolua_S,1,0);
3373 #ifndef TOLUA_RELEASE
3374   tolua_Error tolua_err;
3375   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_bearing'",NULL);
3376   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3377    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3378 #endif
3379   self->x_bearing = ((double)  tolua_tonumber(tolua_S,2,0))
3380 ;
3381  return 0;
3382 }
3383 #endif //#ifndef TOLUA_DISABLE
3384
3385 /* get function: y_bearing of class  cairo_text_extents_t */
3386 #ifndef TOLUA_DISABLE_tolua_get_cairo_text_extents_t_y_bearing
3387 static int tolua_get_cairo_text_extents_t_y_bearing(lua_State* tolua_S)
3388 {
3389   cairo_text_extents_t* self = (cairo_text_extents_t*)  tolua_tousertype(tolua_S,1,0);
3390 #ifndef TOLUA_RELEASE
3391   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_bearing'",NULL);
3392 #endif
3393   tolua_pushnumber(tolua_S,(lua_Number)self->y_bearing);
3394  return 1;
3395 }
3396 #endif //#ifndef TOLUA_DISABLE
3397
3398 /* set function: y_bearing of class  cairo_text_extents_t */
3399 #ifndef TOLUA_DISABLE_tolua_set_cairo_text_extents_t_y_bearing
3400 static int tolua_set_cairo_text_extents_t_y_bearing(lua_State* tolua_S)
3401 {
3402   cairo_text_extents_t* self = (cairo_text_extents_t*)  tolua_tousertype(tolua_S,1,0);
3403 #ifndef TOLUA_RELEASE
3404   tolua_Error tolua_err;
3405   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_bearing'",NULL);
3406   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3407    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3408 #endif
3409   self->y_bearing = ((double)  tolua_tonumber(tolua_S,2,0))
3410 ;
3411  return 0;
3412 }
3413 #endif //#ifndef TOLUA_DISABLE
3414
3415 /* get function: width of class  cairo_text_extents_t */
3416 #ifndef TOLUA_DISABLE_tolua_get_cairo_text_extents_t_width
3417 static int tolua_get_cairo_text_extents_t_width(lua_State* tolua_S)
3418 {
3419   cairo_text_extents_t* self = (cairo_text_extents_t*)  tolua_tousertype(tolua_S,1,0);
3420 #ifndef TOLUA_RELEASE
3421   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'width'",NULL);
3422 #endif
3423   tolua_pushnumber(tolua_S,(lua_Number)self->width);
3424  return 1;
3425 }
3426 #endif //#ifndef TOLUA_DISABLE
3427
3428 /* set function: width of class  cairo_text_extents_t */
3429 #ifndef TOLUA_DISABLE_tolua_set_cairo_text_extents_t_width
3430 static int tolua_set_cairo_text_extents_t_width(lua_State* tolua_S)
3431 {
3432   cairo_text_extents_t* self = (cairo_text_extents_t*)  tolua_tousertype(tolua_S,1,0);
3433 #ifndef TOLUA_RELEASE
3434   tolua_Error tolua_err;
3435   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'width'",NULL);
3436   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3437    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3438 #endif
3439   self->width = ((double)  tolua_tonumber(tolua_S,2,0))
3440 ;
3441  return 0;
3442 }
3443 #endif //#ifndef TOLUA_DISABLE
3444
3445 /* get function: height of class  cairo_text_extents_t */
3446 #ifndef TOLUA_DISABLE_tolua_get_cairo_text_extents_t_height
3447 static int tolua_get_cairo_text_extents_t_height(lua_State* tolua_S)
3448 {
3449   cairo_text_extents_t* self = (cairo_text_extents_t*)  tolua_tousertype(tolua_S,1,0);
3450 #ifndef TOLUA_RELEASE
3451   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'height'",NULL);
3452 #endif
3453   tolua_pushnumber(tolua_S,(lua_Number)self->height);
3454  return 1;
3455 }
3456 #endif //#ifndef TOLUA_DISABLE
3457
3458 /* set function: height of class  cairo_text_extents_t */
3459 #ifndef TOLUA_DISABLE_tolua_set_cairo_text_extents_t_height
3460 static int tolua_set_cairo_text_extents_t_height(lua_State* tolua_S)
3461 {
3462   cairo_text_extents_t* self = (cairo_text_extents_t*)  tolua_tousertype(tolua_S,1,0);
3463 #ifndef TOLUA_RELEASE
3464   tolua_Error tolua_err;
3465   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'height'",NULL);
3466   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3467    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3468 #endif
3469   self->height = ((double)  tolua_tonumber(tolua_S,2,0))
3470 ;
3471  return 0;
3472 }
3473 #endif //#ifndef TOLUA_DISABLE
3474
3475 /* get function: x_advance of class  cairo_text_extents_t */
3476 #ifndef TOLUA_DISABLE_tolua_get_cairo_text_extents_t_x_advance
3477 static int tolua_get_cairo_text_extents_t_x_advance(lua_State* tolua_S)
3478 {
3479   cairo_text_extents_t* self = (cairo_text_extents_t*)  tolua_tousertype(tolua_S,1,0);
3480 #ifndef TOLUA_RELEASE
3481   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_advance'",NULL);
3482 #endif
3483   tolua_pushnumber(tolua_S,(lua_Number)self->x_advance);
3484  return 1;
3485 }
3486 #endif //#ifndef TOLUA_DISABLE
3487
3488 /* set function: x_advance of class  cairo_text_extents_t */
3489 #ifndef TOLUA_DISABLE_tolua_set_cairo_text_extents_t_x_advance
3490 static int tolua_set_cairo_text_extents_t_x_advance(lua_State* tolua_S)
3491 {
3492   cairo_text_extents_t* self = (cairo_text_extents_t*)  tolua_tousertype(tolua_S,1,0);
3493 #ifndef TOLUA_RELEASE
3494   tolua_Error tolua_err;
3495   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x_advance'",NULL);
3496   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3497    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3498 #endif
3499   self->x_advance = ((double)  tolua_tonumber(tolua_S,2,0))
3500 ;
3501  return 0;
3502 }
3503 #endif //#ifndef TOLUA_DISABLE
3504
3505 /* get function: y_advance of class  cairo_text_extents_t */
3506 #ifndef TOLUA_DISABLE_tolua_get_cairo_text_extents_t_y_advance
3507 static int tolua_get_cairo_text_extents_t_y_advance(lua_State* tolua_S)
3508 {
3509   cairo_text_extents_t* self = (cairo_text_extents_t*)  tolua_tousertype(tolua_S,1,0);
3510 #ifndef TOLUA_RELEASE
3511   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_advance'",NULL);
3512 #endif
3513   tolua_pushnumber(tolua_S,(lua_Number)self->y_advance);
3514  return 1;
3515 }
3516 #endif //#ifndef TOLUA_DISABLE
3517
3518 /* set function: y_advance of class  cairo_text_extents_t */
3519 #ifndef TOLUA_DISABLE_tolua_set_cairo_text_extents_t_y_advance
3520 static int tolua_set_cairo_text_extents_t_y_advance(lua_State* tolua_S)
3521 {
3522   cairo_text_extents_t* self = (cairo_text_extents_t*)  tolua_tousertype(tolua_S,1,0);
3523 #ifndef TOLUA_RELEASE
3524   tolua_Error tolua_err;
3525   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y_advance'",NULL);
3526   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3527    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3528 #endif
3529   self->y_advance = ((double)  tolua_tonumber(tolua_S,2,0))
3530 ;
3531  return 0;
3532 }
3533 #endif //#ifndef TOLUA_DISABLE
3534
3535 /* method: create_cairo_text_extents_t of class  cairo_text_extents_t */
3536 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_text_extents_t_create00
3537 static int tolua_cairo_cairo_text_extents_t_create00(lua_State* tolua_S)
3538 {
3539 #ifndef TOLUA_RELEASE
3540  tolua_Error tolua_err;
3541  if (
3542      !tolua_isusertable(tolua_S,1,"cairo_text_extents_t",0,&tolua_err) ||
3543      !tolua_isnoobj(tolua_S,2,&tolua_err)
3544  )
3545   goto tolua_lerror;
3546  else
3547 #endif
3548  {
3549   {
3550    tolua_outside cairo_text_extents_t* tolua_ret = (tolua_outside cairo_text_extents_t*)  create_cairo_text_extents_t();
3551     tolua_pushusertype(tolua_S,(void*)tolua_ret,"cairo_text_extents_t");
3552   }
3553  }
3554  return 1;
3555 #ifndef TOLUA_RELEASE
3556  tolua_lerror:
3557  tolua_error(tolua_S,"#ferror in function 'create'.",&tolua_err);
3558  return 0;
3559 #endif
3560 }
3561 #endif //#ifndef TOLUA_DISABLE
3562
3563 /* get function: ascent of class  cairo_font_extents_t */
3564 #ifndef TOLUA_DISABLE_tolua_get_cairo_font_extents_t_ascent
3565 static int tolua_get_cairo_font_extents_t_ascent(lua_State* tolua_S)
3566 {
3567   cairo_font_extents_t* self = (cairo_font_extents_t*)  tolua_tousertype(tolua_S,1,0);
3568 #ifndef TOLUA_RELEASE
3569   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ascent'",NULL);
3570 #endif
3571   tolua_pushnumber(tolua_S,(lua_Number)self->ascent);
3572  return 1;
3573 }
3574 #endif //#ifndef TOLUA_DISABLE
3575
3576 /* set function: ascent of class  cairo_font_extents_t */
3577 #ifndef TOLUA_DISABLE_tolua_set_cairo_font_extents_t_ascent
3578 static int tolua_set_cairo_font_extents_t_ascent(lua_State* tolua_S)
3579 {
3580   cairo_font_extents_t* self = (cairo_font_extents_t*)  tolua_tousertype(tolua_S,1,0);
3581 #ifndef TOLUA_RELEASE
3582   tolua_Error tolua_err;
3583   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'ascent'",NULL);
3584   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3585    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3586 #endif
3587   self->ascent = ((double)  tolua_tonumber(tolua_S,2,0))
3588 ;
3589  return 0;
3590 }
3591 #endif //#ifndef TOLUA_DISABLE
3592
3593 /* get function: descent of class  cairo_font_extents_t */
3594 #ifndef TOLUA_DISABLE_tolua_get_cairo_font_extents_t_descent
3595 static int tolua_get_cairo_font_extents_t_descent(lua_State* tolua_S)
3596 {
3597   cairo_font_extents_t* self = (cairo_font_extents_t*)  tolua_tousertype(tolua_S,1,0);
3598 #ifndef TOLUA_RELEASE
3599   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'descent'",NULL);
3600 #endif
3601   tolua_pushnumber(tolua_S,(lua_Number)self->descent);
3602  return 1;
3603 }
3604 #endif //#ifndef TOLUA_DISABLE
3605
3606 /* set function: descent of class  cairo_font_extents_t */
3607 #ifndef TOLUA_DISABLE_tolua_set_cairo_font_extents_t_descent
3608 static int tolua_set_cairo_font_extents_t_descent(lua_State* tolua_S)
3609 {
3610   cairo_font_extents_t* self = (cairo_font_extents_t*)  tolua_tousertype(tolua_S,1,0);
3611 #ifndef TOLUA_RELEASE
3612   tolua_Error tolua_err;
3613   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'descent'",NULL);
3614   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3615    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3616 #endif
3617   self->descent = ((double)  tolua_tonumber(tolua_S,2,0))
3618 ;
3619  return 0;
3620 }
3621 #endif //#ifndef TOLUA_DISABLE
3622
3623 /* get function: height of class  cairo_font_extents_t */
3624 #ifndef TOLUA_DISABLE_tolua_get_cairo_font_extents_t_height
3625 static int tolua_get_cairo_font_extents_t_height(lua_State* tolua_S)
3626 {
3627   cairo_font_extents_t* self = (cairo_font_extents_t*)  tolua_tousertype(tolua_S,1,0);
3628 #ifndef TOLUA_RELEASE
3629   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'height'",NULL);
3630 #endif
3631   tolua_pushnumber(tolua_S,(lua_Number)self->height);
3632  return 1;
3633 }
3634 #endif //#ifndef TOLUA_DISABLE
3635
3636 /* set function: height of class  cairo_font_extents_t */
3637 #ifndef TOLUA_DISABLE_tolua_set_cairo_font_extents_t_height
3638 static int tolua_set_cairo_font_extents_t_height(lua_State* tolua_S)
3639 {
3640   cairo_font_extents_t* self = (cairo_font_extents_t*)  tolua_tousertype(tolua_S,1,0);
3641 #ifndef TOLUA_RELEASE
3642   tolua_Error tolua_err;
3643   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'height'",NULL);
3644   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3645    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3646 #endif
3647   self->height = ((double)  tolua_tonumber(tolua_S,2,0))
3648 ;
3649  return 0;
3650 }
3651 #endif //#ifndef TOLUA_DISABLE
3652
3653 /* get function: max_x_advance of class  cairo_font_extents_t */
3654 #ifndef TOLUA_DISABLE_tolua_get_cairo_font_extents_t_max_x_advance
3655 static int tolua_get_cairo_font_extents_t_max_x_advance(lua_State* tolua_S)
3656 {
3657   cairo_font_extents_t* self = (cairo_font_extents_t*)  tolua_tousertype(tolua_S,1,0);
3658 #ifndef TOLUA_RELEASE
3659   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'max_x_advance'",NULL);
3660 #endif
3661   tolua_pushnumber(tolua_S,(lua_Number)self->max_x_advance);
3662  return 1;
3663 }
3664 #endif //#ifndef TOLUA_DISABLE
3665
3666 /* set function: max_x_advance of class  cairo_font_extents_t */
3667 #ifndef TOLUA_DISABLE_tolua_set_cairo_font_extents_t_max_x_advance
3668 static int tolua_set_cairo_font_extents_t_max_x_advance(lua_State* tolua_S)
3669 {
3670   cairo_font_extents_t* self = (cairo_font_extents_t*)  tolua_tousertype(tolua_S,1,0);
3671 #ifndef TOLUA_RELEASE
3672   tolua_Error tolua_err;
3673   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'max_x_advance'",NULL);
3674   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3675    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3676 #endif
3677   self->max_x_advance = ((double)  tolua_tonumber(tolua_S,2,0))
3678 ;
3679  return 0;
3680 }
3681 #endif //#ifndef TOLUA_DISABLE
3682
3683 /* get function: max_y_advance of class  cairo_font_extents_t */
3684 #ifndef TOLUA_DISABLE_tolua_get_cairo_font_extents_t_max_y_advance
3685 static int tolua_get_cairo_font_extents_t_max_y_advance(lua_State* tolua_S)
3686 {
3687   cairo_font_extents_t* self = (cairo_font_extents_t*)  tolua_tousertype(tolua_S,1,0);
3688 #ifndef TOLUA_RELEASE
3689   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'max_y_advance'",NULL);
3690 #endif
3691   tolua_pushnumber(tolua_S,(lua_Number)self->max_y_advance);
3692  return 1;
3693 }
3694 #endif //#ifndef TOLUA_DISABLE
3695
3696 /* set function: max_y_advance of class  cairo_font_extents_t */
3697 #ifndef TOLUA_DISABLE_tolua_set_cairo_font_extents_t_max_y_advance
3698 static int tolua_set_cairo_font_extents_t_max_y_advance(lua_State* tolua_S)
3699 {
3700   cairo_font_extents_t* self = (cairo_font_extents_t*)  tolua_tousertype(tolua_S,1,0);
3701 #ifndef TOLUA_RELEASE
3702   tolua_Error tolua_err;
3703   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'max_y_advance'",NULL);
3704   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
3705    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
3706 #endif
3707   self->max_y_advance = ((double)  tolua_tonumber(tolua_S,2,0))
3708 ;
3709  return 0;
3710 }
3711 #endif //#ifndef TOLUA_DISABLE
3712
3713 /* method: create_cairo_font_extents_t of class  cairo_font_extents_t */
3714 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_extents_t_create00
3715 static int tolua_cairo_cairo_font_extents_t_create00(lua_State* tolua_S)
3716 {
3717 #ifndef TOLUA_RELEASE
3718  tolua_Error tolua_err;
3719  if (
3720      !tolua_isusertable(tolua_S,1,"cairo_font_extents_t",0,&tolua_err) ||
3721      !tolua_isnoobj(tolua_S,2,&tolua_err)
3722  )
3723   goto tolua_lerror;
3724  else
3725 #endif
3726  {
3727   {
3728    tolua_outside cairo_font_extents_t* tolua_ret = (tolua_outside cairo_font_extents_t*)  create_cairo_font_extents_t();
3729     tolua_pushusertype(tolua_S,(void*)tolua_ret,"cairo_font_extents_t");
3730   }
3731  }
3732  return 1;
3733 #ifndef TOLUA_RELEASE
3734  tolua_lerror:
3735  tolua_error(tolua_S,"#ferror in function 'create'.",&tolua_err);
3736  return 0;
3737 #endif
3738 }
3739 #endif //#ifndef TOLUA_DISABLE
3740
3741 /* function: cairo_font_options_create */
3742 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_create00
3743 static int tolua_cairo_cairo_font_options_create00(lua_State* tolua_S)
3744 {
3745 #ifndef TOLUA_RELEASE
3746  tolua_Error tolua_err;
3747  if (
3748      !tolua_isnoobj(tolua_S,1,&tolua_err)
3749  )
3750   goto tolua_lerror;
3751  else
3752 #endif
3753  {
3754   {
3755    struct _cairo_font_options* tolua_ret = ( struct _cairo_font_options*)  cairo_font_options_create();
3756     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_font_options");
3757   }
3758  }
3759  return 1;
3760 #ifndef TOLUA_RELEASE
3761  tolua_lerror:
3762  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_create'.",&tolua_err);
3763  return 0;
3764 #endif
3765 }
3766 #endif //#ifndef TOLUA_DISABLE
3767
3768 /* function: cairo_font_options_copy */
3769 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_copy00
3770 static int tolua_cairo_cairo_font_options_copy00(lua_State* tolua_S)
3771 {
3772 #ifndef TOLUA_RELEASE
3773  tolua_Error tolua_err;
3774  if (
3775      !tolua_isusertype(tolua_S,1,"_cairo_font_options",0,&tolua_err) ||
3776      !tolua_isnoobj(tolua_S,2,&tolua_err)
3777  )
3778   goto tolua_lerror;
3779  else
3780 #endif
3781  {
3782   struct _cairo_font_options* original = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,1,0));
3783   {
3784    struct _cairo_font_options* tolua_ret = ( struct _cairo_font_options*)  cairo_font_options_copy(original);
3785     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_font_options");
3786   }
3787  }
3788  return 1;
3789 #ifndef TOLUA_RELEASE
3790  tolua_lerror:
3791  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_copy'.",&tolua_err);
3792  return 0;
3793 #endif
3794 }
3795 #endif //#ifndef TOLUA_DISABLE
3796
3797 /* function: cairo_font_options_destroy */
3798 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_destroy00
3799 static int tolua_cairo_cairo_font_options_destroy00(lua_State* tolua_S)
3800 {
3801 #ifndef TOLUA_RELEASE
3802  tolua_Error tolua_err;
3803  if (
3804      !tolua_isusertype(tolua_S,1,"_cairo_font_options",0,&tolua_err) ||
3805      !tolua_isnoobj(tolua_S,2,&tolua_err)
3806  )
3807   goto tolua_lerror;
3808  else
3809 #endif
3810  {
3811   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,1,0));
3812   {
3813    cairo_font_options_destroy(options);
3814   }
3815  }
3816  return 0;
3817 #ifndef TOLUA_RELEASE
3818  tolua_lerror:
3819  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_destroy'.",&tolua_err);
3820  return 0;
3821 #endif
3822 }
3823 #endif //#ifndef TOLUA_DISABLE
3824
3825 /* function: cairo_font_options_status */
3826 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_status00
3827 static int tolua_cairo_cairo_font_options_status00(lua_State* tolua_S)
3828 {
3829 #ifndef TOLUA_RELEASE
3830  tolua_Error tolua_err;
3831  if (
3832      !tolua_isusertype(tolua_S,1,"_cairo_font_options",0,&tolua_err) ||
3833      !tolua_isnoobj(tolua_S,2,&tolua_err)
3834  )
3835   goto tolua_lerror;
3836  else
3837 #endif
3838  {
3839   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,1,0));
3840   {
3841    cairo_status_t tolua_ret = (cairo_status_t)  cairo_font_options_status(options);
3842    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
3843   }
3844  }
3845  return 1;
3846 #ifndef TOLUA_RELEASE
3847  tolua_lerror:
3848  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_status'.",&tolua_err);
3849  return 0;
3850 #endif
3851 }
3852 #endif //#ifndef TOLUA_DISABLE
3853
3854 /* function: cairo_font_options_merge */
3855 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_merge00
3856 static int tolua_cairo_cairo_font_options_merge00(lua_State* tolua_S)
3857 {
3858 #ifndef TOLUA_RELEASE
3859  tolua_Error tolua_err;
3860  if (
3861      !tolua_isusertype(tolua_S,1,"_cairo_font_options",0,&tolua_err) ||
3862      !tolua_isusertype(tolua_S,2,"_cairo_font_options",0,&tolua_err) ||
3863      !tolua_isnoobj(tolua_S,3,&tolua_err)
3864  )
3865   goto tolua_lerror;
3866  else
3867 #endif
3868  {
3869   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,1,0));
3870   struct _cairo_font_options* other = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,2,0));
3871   {
3872    cairo_font_options_merge(options,other);
3873   }
3874  }
3875  return 0;
3876 #ifndef TOLUA_RELEASE
3877  tolua_lerror:
3878  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_merge'.",&tolua_err);
3879  return 0;
3880 #endif
3881 }
3882 #endif //#ifndef TOLUA_DISABLE
3883
3884 /* function: cairo_font_options_equal */
3885 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_equal00
3886 static int tolua_cairo_cairo_font_options_equal00(lua_State* tolua_S)
3887 {
3888 #ifndef TOLUA_RELEASE
3889  tolua_Error tolua_err;
3890  if (
3891      !tolua_isusertype(tolua_S,1,"_cairo_font_options",0,&tolua_err) ||
3892      !tolua_isusertype(tolua_S,2,"_cairo_font_options",0,&tolua_err) ||
3893      !tolua_isnoobj(tolua_S,3,&tolua_err)
3894  )
3895   goto tolua_lerror;
3896  else
3897 #endif
3898  {
3899   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,1,0));
3900   struct _cairo_font_options* other = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,2,0));
3901   {
3902     int tolua_ret = (  int)  cairo_font_options_equal(options,other);
3903    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
3904   }
3905  }
3906  return 1;
3907 #ifndef TOLUA_RELEASE
3908  tolua_lerror:
3909  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_equal'.",&tolua_err);
3910  return 0;
3911 #endif
3912 }
3913 #endif //#ifndef TOLUA_DISABLE
3914
3915 /* function: cairo_font_options_hash */
3916 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_hash00
3917 static int tolua_cairo_cairo_font_options_hash00(lua_State* tolua_S)
3918 {
3919 #ifndef TOLUA_RELEASE
3920  tolua_Error tolua_err;
3921  if (
3922      !tolua_isusertype(tolua_S,1,"_cairo_font_options",0,&tolua_err) ||
3923      !tolua_isnoobj(tolua_S,2,&tolua_err)
3924  )
3925   goto tolua_lerror;
3926  else
3927 #endif
3928  {
3929   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,1,0));
3930   {
3931    unsigned long tolua_ret = (unsigned long)  cairo_font_options_hash(options);
3932    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
3933   }
3934  }
3935  return 1;
3936 #ifndef TOLUA_RELEASE
3937  tolua_lerror:
3938  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_hash'.",&tolua_err);
3939  return 0;
3940 #endif
3941 }
3942 #endif //#ifndef TOLUA_DISABLE
3943
3944 /* function: cairo_font_options_set_antialias */
3945 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_set_antialias00
3946 static int tolua_cairo_cairo_font_options_set_antialias00(lua_State* tolua_S)
3947 {
3948 #ifndef TOLUA_RELEASE
3949  tolua_Error tolua_err;
3950  if (
3951      !tolua_isusertype(tolua_S,1,"_cairo_font_options",0,&tolua_err) ||
3952      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
3953      !tolua_isnoobj(tolua_S,3,&tolua_err)
3954  )
3955   goto tolua_lerror;
3956  else
3957 #endif
3958  {
3959   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,1,0));
3960   cairo_antialias_t antialias = ((cairo_antialias_t) (int)  tolua_tonumber(tolua_S,2,0));
3961   {
3962    cairo_font_options_set_antialias(options,antialias);
3963   }
3964  }
3965  return 0;
3966 #ifndef TOLUA_RELEASE
3967  tolua_lerror:
3968  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_set_antialias'.",&tolua_err);
3969  return 0;
3970 #endif
3971 }
3972 #endif //#ifndef TOLUA_DISABLE
3973
3974 /* function: cairo_font_options_get_antialias */
3975 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_get_antialias00
3976 static int tolua_cairo_cairo_font_options_get_antialias00(lua_State* tolua_S)
3977 {
3978 #ifndef TOLUA_RELEASE
3979  tolua_Error tolua_err;
3980  if (
3981      !tolua_isusertype(tolua_S,1,"_cairo_font_options",0,&tolua_err) ||
3982      !tolua_isnoobj(tolua_S,2,&tolua_err)
3983  )
3984   goto tolua_lerror;
3985  else
3986 #endif
3987  {
3988   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,1,0));
3989   {
3990    cairo_antialias_t tolua_ret = (cairo_antialias_t)  cairo_font_options_get_antialias(options);
3991    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
3992   }
3993  }
3994  return 1;
3995 #ifndef TOLUA_RELEASE
3996  tolua_lerror:
3997  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_get_antialias'.",&tolua_err);
3998  return 0;
3999 #endif
4000 }
4001 #endif //#ifndef TOLUA_DISABLE
4002
4003 /* function: cairo_font_options_set_subpixel_order */
4004 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_set_subpixel_order00
4005 static int tolua_cairo_cairo_font_options_set_subpixel_order00(lua_State* tolua_S)
4006 {
4007 #ifndef TOLUA_RELEASE
4008  tolua_Error tolua_err;
4009  if (
4010      !tolua_isusertype(tolua_S,1,"_cairo_font_options",0,&tolua_err) ||
4011      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
4012      !tolua_isnoobj(tolua_S,3,&tolua_err)
4013  )
4014   goto tolua_lerror;
4015  else
4016 #endif
4017  {
4018   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,1,0));
4019   cairo_subpixel_order_t subpixel_order = ((cairo_subpixel_order_t) (int)  tolua_tonumber(tolua_S,2,0));
4020   {
4021    cairo_font_options_set_subpixel_order(options,subpixel_order);
4022   }
4023  }
4024  return 0;
4025 #ifndef TOLUA_RELEASE
4026  tolua_lerror:
4027  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_set_subpixel_order'.",&tolua_err);
4028  return 0;
4029 #endif
4030 }
4031 #endif //#ifndef TOLUA_DISABLE
4032
4033 /* function: cairo_font_options_get_subpixel_order */
4034 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_get_subpixel_order00
4035 static int tolua_cairo_cairo_font_options_get_subpixel_order00(lua_State* tolua_S)
4036 {
4037 #ifndef TOLUA_RELEASE
4038  tolua_Error tolua_err;
4039  if (
4040      !tolua_isusertype(tolua_S,1,"_cairo_font_options",0,&tolua_err) ||
4041      !tolua_isnoobj(tolua_S,2,&tolua_err)
4042  )
4043   goto tolua_lerror;
4044  else
4045 #endif
4046  {
4047   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,1,0));
4048   {
4049    cairo_subpixel_order_t tolua_ret = (cairo_subpixel_order_t)  cairo_font_options_get_subpixel_order(options);
4050    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4051   }
4052  }
4053  return 1;
4054 #ifndef TOLUA_RELEASE
4055  tolua_lerror:
4056  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_get_subpixel_order'.",&tolua_err);
4057  return 0;
4058 #endif
4059 }
4060 #endif //#ifndef TOLUA_DISABLE
4061
4062 /* function: cairo_font_options_set_hint_style */
4063 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_set_hint_style00
4064 static int tolua_cairo_cairo_font_options_set_hint_style00(lua_State* tolua_S)
4065 {
4066 #ifndef TOLUA_RELEASE
4067  tolua_Error tolua_err;
4068  if (
4069      !tolua_isusertype(tolua_S,1,"_cairo_font_options",0,&tolua_err) ||
4070      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
4071      !tolua_isnoobj(tolua_S,3,&tolua_err)
4072  )
4073   goto tolua_lerror;
4074  else
4075 #endif
4076  {
4077   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,1,0));
4078   cairo_hint_style_t hint_style = ((cairo_hint_style_t) (int)  tolua_tonumber(tolua_S,2,0));
4079   {
4080    cairo_font_options_set_hint_style(options,hint_style);
4081   }
4082  }
4083  return 0;
4084 #ifndef TOLUA_RELEASE
4085  tolua_lerror:
4086  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_set_hint_style'.",&tolua_err);
4087  return 0;
4088 #endif
4089 }
4090 #endif //#ifndef TOLUA_DISABLE
4091
4092 /* function: cairo_font_options_get_hint_style */
4093 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_get_hint_style00
4094 static int tolua_cairo_cairo_font_options_get_hint_style00(lua_State* tolua_S)
4095 {
4096 #ifndef TOLUA_RELEASE
4097  tolua_Error tolua_err;
4098  if (
4099      !tolua_isusertype(tolua_S,1,"_cairo_font_options",0,&tolua_err) ||
4100      !tolua_isnoobj(tolua_S,2,&tolua_err)
4101  )
4102   goto tolua_lerror;
4103  else
4104 #endif
4105  {
4106   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,1,0));
4107   {
4108    cairo_hint_style_t tolua_ret = (cairo_hint_style_t)  cairo_font_options_get_hint_style(options);
4109    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4110   }
4111  }
4112  return 1;
4113 #ifndef TOLUA_RELEASE
4114  tolua_lerror:
4115  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_get_hint_style'.",&tolua_err);
4116  return 0;
4117 #endif
4118 }
4119 #endif //#ifndef TOLUA_DISABLE
4120
4121 /* function: cairo_font_options_set_hint_metrics */
4122 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_set_hint_metrics00
4123 static int tolua_cairo_cairo_font_options_set_hint_metrics00(lua_State* tolua_S)
4124 {
4125 #ifndef TOLUA_RELEASE
4126  tolua_Error tolua_err;
4127  if (
4128      !tolua_isusertype(tolua_S,1,"_cairo_font_options",0,&tolua_err) ||
4129      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
4130      !tolua_isnoobj(tolua_S,3,&tolua_err)
4131  )
4132   goto tolua_lerror;
4133  else
4134 #endif
4135  {
4136   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,1,0));
4137   cairo_hint_metrics_t hint_metrics = ((cairo_hint_metrics_t) (int)  tolua_tonumber(tolua_S,2,0));
4138   {
4139    cairo_font_options_set_hint_metrics(options,hint_metrics);
4140   }
4141  }
4142  return 0;
4143 #ifndef TOLUA_RELEASE
4144  tolua_lerror:
4145  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_set_hint_metrics'.",&tolua_err);
4146  return 0;
4147 #endif
4148 }
4149 #endif //#ifndef TOLUA_DISABLE
4150
4151 /* function: cairo_font_options_get_hint_metrics */
4152 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_options_get_hint_metrics00
4153 static int tolua_cairo_cairo_font_options_get_hint_metrics00(lua_State* tolua_S)
4154 {
4155 #ifndef TOLUA_RELEASE
4156  tolua_Error tolua_err;
4157  if (
4158      !tolua_isusertype(tolua_S,1,"_cairo_font_options",0,&tolua_err) ||
4159      !tolua_isnoobj(tolua_S,2,&tolua_err)
4160  )
4161   goto tolua_lerror;
4162  else
4163 #endif
4164  {
4165   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,1,0));
4166   {
4167    cairo_hint_metrics_t tolua_ret = (cairo_hint_metrics_t)  cairo_font_options_get_hint_metrics(options);
4168    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4169   }
4170  }
4171  return 1;
4172 #ifndef TOLUA_RELEASE
4173  tolua_lerror:
4174  tolua_error(tolua_S,"#ferror in function 'cairo_font_options_get_hint_metrics'.",&tolua_err);
4175  return 0;
4176 #endif
4177 }
4178 #endif //#ifndef TOLUA_DISABLE
4179
4180 /* function: cairo_select_font_face */
4181 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_select_font_face00
4182 static int tolua_cairo_cairo_select_font_face00(lua_State* tolua_S)
4183 {
4184 #ifndef TOLUA_RELEASE
4185  tolua_Error tolua_err;
4186  if (
4187      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4188      !tolua_isstring(tolua_S,2,0,&tolua_err) ||
4189      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
4190      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
4191      !tolua_isnoobj(tolua_S,5,&tolua_err)
4192  )
4193   goto tolua_lerror;
4194  else
4195 #endif
4196  {
4197   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4198   const char* family = ((const char*)  tolua_tostring(tolua_S,2,0));
4199   cairo_font_slant_t slant = ((cairo_font_slant_t) (int)  tolua_tonumber(tolua_S,3,0));
4200   cairo_font_weight_t weight = ((cairo_font_weight_t) (int)  tolua_tonumber(tolua_S,4,0));
4201   {
4202    cairo_select_font_face(cr,family,slant,weight);
4203   }
4204  }
4205  return 0;
4206 #ifndef TOLUA_RELEASE
4207  tolua_lerror:
4208  tolua_error(tolua_S,"#ferror in function 'cairo_select_font_face'.",&tolua_err);
4209  return 0;
4210 #endif
4211 }
4212 #endif //#ifndef TOLUA_DISABLE
4213
4214 /* function: cairo_set_font_size */
4215 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_font_size00
4216 static int tolua_cairo_cairo_set_font_size00(lua_State* tolua_S)
4217 {
4218 #ifndef TOLUA_RELEASE
4219  tolua_Error tolua_err;
4220  if (
4221      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4222      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
4223      !tolua_isnoobj(tolua_S,3,&tolua_err)
4224  )
4225   goto tolua_lerror;
4226  else
4227 #endif
4228  {
4229   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4230   double size = ((double)  tolua_tonumber(tolua_S,2,0));
4231   {
4232    cairo_set_font_size(cr,size);
4233   }
4234  }
4235  return 0;
4236 #ifndef TOLUA_RELEASE
4237  tolua_lerror:
4238  tolua_error(tolua_S,"#ferror in function 'cairo_set_font_size'.",&tolua_err);
4239  return 0;
4240 #endif
4241 }
4242 #endif //#ifndef TOLUA_DISABLE
4243
4244 /* function: cairo_set_font_matrix */
4245 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_font_matrix00
4246 static int tolua_cairo_cairo_set_font_matrix00(lua_State* tolua_S)
4247 {
4248 #ifndef TOLUA_RELEASE
4249  tolua_Error tolua_err;
4250  if (
4251      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4252      !tolua_isusertype(tolua_S,2,"cairo_matrix_t",0,&tolua_err) ||
4253      !tolua_isnoobj(tolua_S,3,&tolua_err)
4254  )
4255   goto tolua_lerror;
4256  else
4257 #endif
4258  {
4259   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4260   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,2,0));
4261   {
4262    cairo_set_font_matrix(cr,matrix);
4263   }
4264  }
4265  return 0;
4266 #ifndef TOLUA_RELEASE
4267  tolua_lerror:
4268  tolua_error(tolua_S,"#ferror in function 'cairo_set_font_matrix'.",&tolua_err);
4269  return 0;
4270 #endif
4271 }
4272 #endif //#ifndef TOLUA_DISABLE
4273
4274 /* function: cairo_get_font_matrix */
4275 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_font_matrix00
4276 static int tolua_cairo_cairo_get_font_matrix00(lua_State* tolua_S)
4277 {
4278 #ifndef TOLUA_RELEASE
4279  tolua_Error tolua_err;
4280  if (
4281      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4282      !tolua_isusertype(tolua_S,2,"cairo_matrix_t",0,&tolua_err) ||
4283      !tolua_isnoobj(tolua_S,3,&tolua_err)
4284  )
4285   goto tolua_lerror;
4286  else
4287 #endif
4288  {
4289   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4290   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,2,0));
4291   {
4292    cairo_get_font_matrix(cr,matrix);
4293   }
4294  }
4295  return 0;
4296 #ifndef TOLUA_RELEASE
4297  tolua_lerror:
4298  tolua_error(tolua_S,"#ferror in function 'cairo_get_font_matrix'.",&tolua_err);
4299  return 0;
4300 #endif
4301 }
4302 #endif //#ifndef TOLUA_DISABLE
4303
4304 /* function: cairo_set_font_options */
4305 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_font_options00
4306 static int tolua_cairo_cairo_set_font_options00(lua_State* tolua_S)
4307 {
4308 #ifndef TOLUA_RELEASE
4309  tolua_Error tolua_err;
4310  if (
4311      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4312      !tolua_isusertype(tolua_S,2,"_cairo_font_options",0,&tolua_err) ||
4313      !tolua_isnoobj(tolua_S,3,&tolua_err)
4314  )
4315   goto tolua_lerror;
4316  else
4317 #endif
4318  {
4319   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4320   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,2,0));
4321   {
4322    cairo_set_font_options(cr,options);
4323   }
4324  }
4325  return 0;
4326 #ifndef TOLUA_RELEASE
4327  tolua_lerror:
4328  tolua_error(tolua_S,"#ferror in function 'cairo_set_font_options'.",&tolua_err);
4329  return 0;
4330 #endif
4331 }
4332 #endif //#ifndef TOLUA_DISABLE
4333
4334 /* function: cairo_get_font_options */
4335 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_font_options00
4336 static int tolua_cairo_cairo_get_font_options00(lua_State* tolua_S)
4337 {
4338 #ifndef TOLUA_RELEASE
4339  tolua_Error tolua_err;
4340  if (
4341      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4342      !tolua_isusertype(tolua_S,2,"_cairo_font_options",0,&tolua_err) ||
4343      !tolua_isnoobj(tolua_S,3,&tolua_err)
4344  )
4345   goto tolua_lerror;
4346  else
4347 #endif
4348  {
4349   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4350   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,2,0));
4351   {
4352    cairo_get_font_options(cr,options);
4353   }
4354  }
4355  return 0;
4356 #ifndef TOLUA_RELEASE
4357  tolua_lerror:
4358  tolua_error(tolua_S,"#ferror in function 'cairo_get_font_options'.",&tolua_err);
4359  return 0;
4360 #endif
4361 }
4362 #endif //#ifndef TOLUA_DISABLE
4363
4364 /* function: cairo_set_font_face */
4365 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_font_face00
4366 static int tolua_cairo_cairo_set_font_face00(lua_State* tolua_S)
4367 {
4368 #ifndef TOLUA_RELEASE
4369  tolua_Error tolua_err;
4370  if (
4371      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4372      !tolua_isusertype(tolua_S,2,"_cairo_font_face",0,&tolua_err) ||
4373      !tolua_isnoobj(tolua_S,3,&tolua_err)
4374  )
4375   goto tolua_lerror;
4376  else
4377 #endif
4378  {
4379   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4380   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,2,0));
4381   {
4382    cairo_set_font_face(cr,font_face);
4383   }
4384  }
4385  return 0;
4386 #ifndef TOLUA_RELEASE
4387  tolua_lerror:
4388  tolua_error(tolua_S,"#ferror in function 'cairo_set_font_face'.",&tolua_err);
4389  return 0;
4390 #endif
4391 }
4392 #endif //#ifndef TOLUA_DISABLE
4393
4394 /* function: cairo_get_font_face */
4395 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_font_face00
4396 static int tolua_cairo_cairo_get_font_face00(lua_State* tolua_S)
4397 {
4398 #ifndef TOLUA_RELEASE
4399  tolua_Error tolua_err;
4400  if (
4401      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4402      !tolua_isnoobj(tolua_S,2,&tolua_err)
4403  )
4404   goto tolua_lerror;
4405  else
4406 #endif
4407  {
4408   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4409   {
4410    struct _cairo_font_face* tolua_ret = ( struct _cairo_font_face*)  cairo_get_font_face(cr);
4411     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_font_face");
4412   }
4413  }
4414  return 1;
4415 #ifndef TOLUA_RELEASE
4416  tolua_lerror:
4417  tolua_error(tolua_S,"#ferror in function 'cairo_get_font_face'.",&tolua_err);
4418  return 0;
4419 #endif
4420 }
4421 #endif //#ifndef TOLUA_DISABLE
4422
4423 /* function: cairo_set_scaled_font */
4424 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_set_scaled_font00
4425 static int tolua_cairo_cairo_set_scaled_font00(lua_State* tolua_S)
4426 {
4427 #ifndef TOLUA_RELEASE
4428  tolua_Error tolua_err;
4429  if (
4430      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4431      !tolua_isusertype(tolua_S,2,"_cairo_scaled_font",0,&tolua_err) ||
4432      !tolua_isnoobj(tolua_S,3,&tolua_err)
4433  )
4434   goto tolua_lerror;
4435  else
4436 #endif
4437  {
4438   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4439   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,2,0));
4440   {
4441    cairo_set_scaled_font(cr,scaled_font);
4442   }
4443  }
4444  return 0;
4445 #ifndef TOLUA_RELEASE
4446  tolua_lerror:
4447  tolua_error(tolua_S,"#ferror in function 'cairo_set_scaled_font'.",&tolua_err);
4448  return 0;
4449 #endif
4450 }
4451 #endif //#ifndef TOLUA_DISABLE
4452
4453 /* function: cairo_get_scaled_font */
4454 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_scaled_font00
4455 static int tolua_cairo_cairo_get_scaled_font00(lua_State* tolua_S)
4456 {
4457 #ifndef TOLUA_RELEASE
4458  tolua_Error tolua_err;
4459  if (
4460      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4461      !tolua_isnoobj(tolua_S,2,&tolua_err)
4462  )
4463   goto tolua_lerror;
4464  else
4465 #endif
4466  {
4467   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4468   {
4469    struct _cairo_scaled_font* tolua_ret = ( struct _cairo_scaled_font*)  cairo_get_scaled_font(cr);
4470     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_scaled_font");
4471   }
4472  }
4473  return 1;
4474 #ifndef TOLUA_RELEASE
4475  tolua_lerror:
4476  tolua_error(tolua_S,"#ferror in function 'cairo_get_scaled_font'.",&tolua_err);
4477  return 0;
4478 #endif
4479 }
4480 #endif //#ifndef TOLUA_DISABLE
4481
4482 /* function: cairo_show_text */
4483 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_show_text00
4484 static int tolua_cairo_cairo_show_text00(lua_State* tolua_S)
4485 {
4486 #ifndef TOLUA_RELEASE
4487  tolua_Error tolua_err;
4488  if (
4489      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4490      !tolua_isstring(tolua_S,2,0,&tolua_err) ||
4491      !tolua_isnoobj(tolua_S,3,&tolua_err)
4492  )
4493   goto tolua_lerror;
4494  else
4495 #endif
4496  {
4497   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4498   const char* utf8 = ((const char*)  tolua_tostring(tolua_S,2,0));
4499   {
4500    cairo_show_text(cr,utf8);
4501   }
4502  }
4503  return 0;
4504 #ifndef TOLUA_RELEASE
4505  tolua_lerror:
4506  tolua_error(tolua_S,"#ferror in function 'cairo_show_text'.",&tolua_err);
4507  return 0;
4508 #endif
4509 }
4510 #endif //#ifndef TOLUA_DISABLE
4511
4512 /* function: cairo_show_glyphs */
4513 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_show_glyphs00
4514 static int tolua_cairo_cairo_show_glyphs00(lua_State* tolua_S)
4515 {
4516 #ifndef TOLUA_RELEASE
4517  tolua_Error tolua_err;
4518  if (
4519      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4520      !tolua_isusertype(tolua_S,2,"const cairo_glyph_t",0,&tolua_err) ||
4521      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
4522      !tolua_isnoobj(tolua_S,4,&tolua_err)
4523  )
4524   goto tolua_lerror;
4525  else
4526 #endif
4527  {
4528   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4529   const cairo_glyph_t* glyphs = ((const cairo_glyph_t*)  tolua_tousertype(tolua_S,2,0));
4530   int num_glyphs = ((int)  tolua_tonumber(tolua_S,3,0));
4531   {
4532    cairo_show_glyphs(cr,glyphs,num_glyphs);
4533   }
4534  }
4535  return 0;
4536 #ifndef TOLUA_RELEASE
4537  tolua_lerror:
4538  tolua_error(tolua_S,"#ferror in function 'cairo_show_glyphs'.",&tolua_err);
4539  return 0;
4540 #endif
4541 }
4542 #endif //#ifndef TOLUA_DISABLE
4543
4544 /* function: cairo_show_text_glyphs */
4545 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_show_text_glyphs00
4546 static int tolua_cairo_cairo_show_text_glyphs00(lua_State* tolua_S)
4547 {
4548 #ifndef TOLUA_RELEASE
4549  tolua_Error tolua_err;
4550  if (
4551      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4552      !tolua_isstring(tolua_S,2,0,&tolua_err) ||
4553      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
4554      !tolua_isusertype(tolua_S,4,"const cairo_glyph_t",0,&tolua_err) ||
4555      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
4556      !tolua_isusertype(tolua_S,6,"const cairo_text_cluster_t",0,&tolua_err) ||
4557      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
4558      !tolua_isnumber(tolua_S,8,0,&tolua_err) ||
4559      !tolua_isnoobj(tolua_S,9,&tolua_err)
4560  )
4561   goto tolua_lerror;
4562  else
4563 #endif
4564  {
4565   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4566   const char* utf8 = ((const char*)  tolua_tostring(tolua_S,2,0));
4567   int utf8_len = ((int)  tolua_tonumber(tolua_S,3,0));
4568   const cairo_glyph_t* glyphs = ((const cairo_glyph_t*)  tolua_tousertype(tolua_S,4,0));
4569   int num_glyphs = ((int)  tolua_tonumber(tolua_S,5,0));
4570   const cairo_text_cluster_t* clusters = ((const cairo_text_cluster_t*)  tolua_tousertype(tolua_S,6,0));
4571   int num_clusters = ((int)  tolua_tonumber(tolua_S,7,0));
4572   cairo_text_cluster_flags_t cluster_flags = ((cairo_text_cluster_flags_t) (int)  tolua_tonumber(tolua_S,8,0));
4573   {
4574    cairo_show_text_glyphs(cr,utf8,utf8_len,glyphs,num_glyphs,clusters,num_clusters,cluster_flags);
4575   }
4576  }
4577  return 0;
4578 #ifndef TOLUA_RELEASE
4579  tolua_lerror:
4580  tolua_error(tolua_S,"#ferror in function 'cairo_show_text_glyphs'.",&tolua_err);
4581  return 0;
4582 #endif
4583 }
4584 #endif //#ifndef TOLUA_DISABLE
4585
4586 /* function: cairo_text_path */
4587 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_text_path00
4588 static int tolua_cairo_cairo_text_path00(lua_State* tolua_S)
4589 {
4590 #ifndef TOLUA_RELEASE
4591  tolua_Error tolua_err;
4592  if (
4593      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4594      !tolua_isstring(tolua_S,2,0,&tolua_err) ||
4595      !tolua_isnoobj(tolua_S,3,&tolua_err)
4596  )
4597   goto tolua_lerror;
4598  else
4599 #endif
4600  {
4601   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4602   const char* utf8 = ((const char*)  tolua_tostring(tolua_S,2,0));
4603   {
4604    cairo_text_path(cr,utf8);
4605   }
4606  }
4607  return 0;
4608 #ifndef TOLUA_RELEASE
4609  tolua_lerror:
4610  tolua_error(tolua_S,"#ferror in function 'cairo_text_path'.",&tolua_err);
4611  return 0;
4612 #endif
4613 }
4614 #endif //#ifndef TOLUA_DISABLE
4615
4616 /* function: cairo_glyph_path */
4617 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_glyph_path00
4618 static int tolua_cairo_cairo_glyph_path00(lua_State* tolua_S)
4619 {
4620 #ifndef TOLUA_RELEASE
4621  tolua_Error tolua_err;
4622  if (
4623      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4624      !tolua_isusertype(tolua_S,2,"const cairo_glyph_t",0,&tolua_err) ||
4625      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
4626      !tolua_isnoobj(tolua_S,4,&tolua_err)
4627  )
4628   goto tolua_lerror;
4629  else
4630 #endif
4631  {
4632   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4633   const cairo_glyph_t* glyphs = ((const cairo_glyph_t*)  tolua_tousertype(tolua_S,2,0));
4634   int num_glyphs = ((int)  tolua_tonumber(tolua_S,3,0));
4635   {
4636    cairo_glyph_path(cr,glyphs,num_glyphs);
4637   }
4638  }
4639  return 0;
4640 #ifndef TOLUA_RELEASE
4641  tolua_lerror:
4642  tolua_error(tolua_S,"#ferror in function 'cairo_glyph_path'.",&tolua_err);
4643  return 0;
4644 #endif
4645 }
4646 #endif //#ifndef TOLUA_DISABLE
4647
4648 /* function: cairo_text_extents */
4649 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_text_extents00
4650 static int tolua_cairo_cairo_text_extents00(lua_State* tolua_S)
4651 {
4652 #ifndef TOLUA_RELEASE
4653  tolua_Error tolua_err;
4654  if (
4655      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4656      !tolua_isstring(tolua_S,2,0,&tolua_err) ||
4657      !tolua_isusertype(tolua_S,3,"cairo_text_extents_t",0,&tolua_err) ||
4658      !tolua_isnoobj(tolua_S,4,&tolua_err)
4659  )
4660   goto tolua_lerror;
4661  else
4662 #endif
4663  {
4664   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4665   const char* utf8 = ((const char*)  tolua_tostring(tolua_S,2,0));
4666   cairo_text_extents_t* extents = ((cairo_text_extents_t*)  tolua_tousertype(tolua_S,3,0));
4667   {
4668    cairo_text_extents(cr,utf8,extents);
4669   }
4670  }
4671  return 0;
4672 #ifndef TOLUA_RELEASE
4673  tolua_lerror:
4674  tolua_error(tolua_S,"#ferror in function 'cairo_text_extents'.",&tolua_err);
4675  return 0;
4676 #endif
4677 }
4678 #endif //#ifndef TOLUA_DISABLE
4679
4680 /* function: cairo_glyph_extents */
4681 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_glyph_extents00
4682 static int tolua_cairo_cairo_glyph_extents00(lua_State* tolua_S)
4683 {
4684 #ifndef TOLUA_RELEASE
4685  tolua_Error tolua_err;
4686  if (
4687      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4688      !tolua_isusertype(tolua_S,2,"const cairo_glyph_t",0,&tolua_err) ||
4689      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
4690      !tolua_isusertype(tolua_S,4,"cairo_text_extents_t",0,&tolua_err) ||
4691      !tolua_isnoobj(tolua_S,5,&tolua_err)
4692  )
4693   goto tolua_lerror;
4694  else
4695 #endif
4696  {
4697   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4698   const cairo_glyph_t* glyphs = ((const cairo_glyph_t*)  tolua_tousertype(tolua_S,2,0));
4699   int num_glyphs = ((int)  tolua_tonumber(tolua_S,3,0));
4700   cairo_text_extents_t* extents = ((cairo_text_extents_t*)  tolua_tousertype(tolua_S,4,0));
4701   {
4702    cairo_glyph_extents(cr,glyphs,num_glyphs,extents);
4703   }
4704  }
4705  return 0;
4706 #ifndef TOLUA_RELEASE
4707  tolua_lerror:
4708  tolua_error(tolua_S,"#ferror in function 'cairo_glyph_extents'.",&tolua_err);
4709  return 0;
4710 #endif
4711 }
4712 #endif //#ifndef TOLUA_DISABLE
4713
4714 /* function: cairo_font_extents */
4715 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_extents00
4716 static int tolua_cairo_cairo_font_extents00(lua_State* tolua_S)
4717 {
4718 #ifndef TOLUA_RELEASE
4719  tolua_Error tolua_err;
4720  if (
4721      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
4722      !tolua_isusertype(tolua_S,2,"cairo_font_extents_t",0,&tolua_err) ||
4723      !tolua_isnoobj(tolua_S,3,&tolua_err)
4724  )
4725   goto tolua_lerror;
4726  else
4727 #endif
4728  {
4729   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
4730   cairo_font_extents_t* extents = ((cairo_font_extents_t*)  tolua_tousertype(tolua_S,2,0));
4731   {
4732    cairo_font_extents(cr,extents);
4733   }
4734  }
4735  return 0;
4736 #ifndef TOLUA_RELEASE
4737  tolua_lerror:
4738  tolua_error(tolua_S,"#ferror in function 'cairo_font_extents'.",&tolua_err);
4739  return 0;
4740 #endif
4741 }
4742 #endif //#ifndef TOLUA_DISABLE
4743
4744 /* function: cairo_font_face_reference */
4745 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_face_reference00
4746 static int tolua_cairo_cairo_font_face_reference00(lua_State* tolua_S)
4747 {
4748 #ifndef TOLUA_RELEASE
4749  tolua_Error tolua_err;
4750  if (
4751      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
4752      !tolua_isnoobj(tolua_S,2,&tolua_err)
4753  )
4754   goto tolua_lerror;
4755  else
4756 #endif
4757  {
4758   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
4759   {
4760    struct _cairo_font_face* tolua_ret = ( struct _cairo_font_face*)  cairo_font_face_reference(font_face);
4761     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_font_face");
4762   }
4763  }
4764  return 1;
4765 #ifndef TOLUA_RELEASE
4766  tolua_lerror:
4767  tolua_error(tolua_S,"#ferror in function 'cairo_font_face_reference'.",&tolua_err);
4768  return 0;
4769 #endif
4770 }
4771 #endif //#ifndef TOLUA_DISABLE
4772
4773 /* function: cairo_font_face_destroy */
4774 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_face_destroy00
4775 static int tolua_cairo_cairo_font_face_destroy00(lua_State* tolua_S)
4776 {
4777 #ifndef TOLUA_RELEASE
4778  tolua_Error tolua_err;
4779  if (
4780      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
4781      !tolua_isnoobj(tolua_S,2,&tolua_err)
4782  )
4783   goto tolua_lerror;
4784  else
4785 #endif
4786  {
4787   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
4788   {
4789    cairo_font_face_destroy(font_face);
4790   }
4791  }
4792  return 0;
4793 #ifndef TOLUA_RELEASE
4794  tolua_lerror:
4795  tolua_error(tolua_S,"#ferror in function 'cairo_font_face_destroy'.",&tolua_err);
4796  return 0;
4797 #endif
4798 }
4799 #endif //#ifndef TOLUA_DISABLE
4800
4801 /* function: cairo_font_face_get_reference_count */
4802 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_face_get_reference_count00
4803 static int tolua_cairo_cairo_font_face_get_reference_count00(lua_State* tolua_S)
4804 {
4805 #ifndef TOLUA_RELEASE
4806  tolua_Error tolua_err;
4807  if (
4808      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
4809      !tolua_isnoobj(tolua_S,2,&tolua_err)
4810  )
4811   goto tolua_lerror;
4812  else
4813 #endif
4814  {
4815   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
4816   {
4817    unsigned int tolua_ret = (unsigned int)  cairo_font_face_get_reference_count(font_face);
4818    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4819   }
4820  }
4821  return 1;
4822 #ifndef TOLUA_RELEASE
4823  tolua_lerror:
4824  tolua_error(tolua_S,"#ferror in function 'cairo_font_face_get_reference_count'.",&tolua_err);
4825  return 0;
4826 #endif
4827 }
4828 #endif //#ifndef TOLUA_DISABLE
4829
4830 /* function: cairo_font_face_status */
4831 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_face_status00
4832 static int tolua_cairo_cairo_font_face_status00(lua_State* tolua_S)
4833 {
4834 #ifndef TOLUA_RELEASE
4835  tolua_Error tolua_err;
4836  if (
4837      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
4838      !tolua_isnoobj(tolua_S,2,&tolua_err)
4839  )
4840   goto tolua_lerror;
4841  else
4842 #endif
4843  {
4844   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
4845   {
4846    cairo_status_t tolua_ret = (cairo_status_t)  cairo_font_face_status(font_face);
4847    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4848   }
4849  }
4850  return 1;
4851 #ifndef TOLUA_RELEASE
4852  tolua_lerror:
4853  tolua_error(tolua_S,"#ferror in function 'cairo_font_face_status'.",&tolua_err);
4854  return 0;
4855 #endif
4856 }
4857 #endif //#ifndef TOLUA_DISABLE
4858
4859 /* function: cairo_font_face_get_type */
4860 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_face_get_type00
4861 static int tolua_cairo_cairo_font_face_get_type00(lua_State* tolua_S)
4862 {
4863 #ifndef TOLUA_RELEASE
4864  tolua_Error tolua_err;
4865  if (
4866      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
4867      !tolua_isnoobj(tolua_S,2,&tolua_err)
4868  )
4869   goto tolua_lerror;
4870  else
4871 #endif
4872  {
4873   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
4874   {
4875    cairo_font_type_t tolua_ret = (cairo_font_type_t)  cairo_font_face_get_type(font_face);
4876    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4877   }
4878  }
4879  return 1;
4880 #ifndef TOLUA_RELEASE
4881  tolua_lerror:
4882  tolua_error(tolua_S,"#ferror in function 'cairo_font_face_get_type'.",&tolua_err);
4883  return 0;
4884 #endif
4885 }
4886 #endif //#ifndef TOLUA_DISABLE
4887
4888 /* function: cairo_font_face_get_user_data */
4889 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_face_get_user_data00
4890 static int tolua_cairo_cairo_font_face_get_user_data00(lua_State* tolua_S)
4891 {
4892 #ifndef TOLUA_RELEASE
4893  tolua_Error tolua_err;
4894  if (
4895      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
4896      !tolua_isusertype(tolua_S,2,"const cairo_user_data_key_t",0,&tolua_err) ||
4897      !tolua_isnoobj(tolua_S,3,&tolua_err)
4898  )
4899   goto tolua_lerror;
4900  else
4901 #endif
4902  {
4903   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
4904   const cairo_user_data_key_t* key = ((const cairo_user_data_key_t*)  tolua_tousertype(tolua_S,2,0));
4905   {
4906    void* tolua_ret = (void*)  cairo_font_face_get_user_data(font_face,key);
4907    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
4908   }
4909  }
4910  return 1;
4911 #ifndef TOLUA_RELEASE
4912  tolua_lerror:
4913  tolua_error(tolua_S,"#ferror in function 'cairo_font_face_get_user_data'.",&tolua_err);
4914  return 0;
4915 #endif
4916 }
4917 #endif //#ifndef TOLUA_DISABLE
4918
4919 /* function: cairo_font_face_set_user_data */
4920 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_font_face_set_user_data00
4921 static int tolua_cairo_cairo_font_face_set_user_data00(lua_State* tolua_S)
4922 {
4923 #ifndef TOLUA_RELEASE
4924  tolua_Error tolua_err;
4925  if (
4926      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
4927      !tolua_isusertype(tolua_S,2,"const cairo_user_data_key_t",0,&tolua_err) ||
4928      !tolua_isuserdata(tolua_S,3,0,&tolua_err) ||
4929      (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"cairo_destroy_func_t",0,&tolua_err)) ||
4930      !tolua_isnoobj(tolua_S,5,&tolua_err)
4931  )
4932   goto tolua_lerror;
4933  else
4934 #endif
4935  {
4936   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
4937   const cairo_user_data_key_t* key = ((const cairo_user_data_key_t*)  tolua_tousertype(tolua_S,2,0));
4938   void* user_data = ((void*)  tolua_touserdata(tolua_S,3,0));
4939   cairo_destroy_func_t destroy = *((cairo_destroy_func_t*)  tolua_tousertype(tolua_S,4,0));
4940   {
4941    cairo_status_t tolua_ret = (cairo_status_t)  cairo_font_face_set_user_data(font_face,key,user_data,destroy);
4942    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
4943   }
4944  }
4945  return 1;
4946 #ifndef TOLUA_RELEASE
4947  tolua_lerror:
4948  tolua_error(tolua_S,"#ferror in function 'cairo_font_face_set_user_data'.",&tolua_err);
4949  return 0;
4950 #endif
4951 }
4952 #endif //#ifndef TOLUA_DISABLE
4953
4954 /* function: cairo_scaled_font_create */
4955 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_create00
4956 static int tolua_cairo_cairo_scaled_font_create00(lua_State* tolua_S)
4957 {
4958 #ifndef TOLUA_RELEASE
4959  tolua_Error tolua_err;
4960  if (
4961      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
4962      !tolua_isusertype(tolua_S,2,"cairo_matrix_t",0,&tolua_err) ||
4963      !tolua_isusertype(tolua_S,3,"cairo_matrix_t",0,&tolua_err) ||
4964      !tolua_isusertype(tolua_S,4,"_cairo_font_options",0,&tolua_err) ||
4965      !tolua_isnoobj(tolua_S,5,&tolua_err)
4966  )
4967   goto tolua_lerror;
4968  else
4969 #endif
4970  {
4971   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
4972   cairo_matrix_t* font_matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,2,0));
4973   cairo_matrix_t* ctm = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,3,0));
4974   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,4,0));
4975   {
4976    struct _cairo_scaled_font* tolua_ret = ( struct _cairo_scaled_font*)  cairo_scaled_font_create(font_face,font_matrix,ctm,options);
4977     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_scaled_font");
4978   }
4979  }
4980  return 1;
4981 #ifndef TOLUA_RELEASE
4982  tolua_lerror:
4983  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_create'.",&tolua_err);
4984  return 0;
4985 #endif
4986 }
4987 #endif //#ifndef TOLUA_DISABLE
4988
4989 /* function: cairo_scaled_font_reference */
4990 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_reference00
4991 static int tolua_cairo_cairo_scaled_font_reference00(lua_State* tolua_S)
4992 {
4993 #ifndef TOLUA_RELEASE
4994  tolua_Error tolua_err;
4995  if (
4996      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
4997      !tolua_isnoobj(tolua_S,2,&tolua_err)
4998  )
4999   goto tolua_lerror;
5000  else
5001 #endif
5002  {
5003   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5004   {
5005    struct _cairo_scaled_font* tolua_ret = ( struct _cairo_scaled_font*)  cairo_scaled_font_reference(scaled_font);
5006     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_scaled_font");
5007   }
5008  }
5009  return 1;
5010 #ifndef TOLUA_RELEASE
5011  tolua_lerror:
5012  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_reference'.",&tolua_err);
5013  return 0;
5014 #endif
5015 }
5016 #endif //#ifndef TOLUA_DISABLE
5017
5018 /* function: cairo_scaled_font_destroy */
5019 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_destroy00
5020 static int tolua_cairo_cairo_scaled_font_destroy00(lua_State* tolua_S)
5021 {
5022 #ifndef TOLUA_RELEASE
5023  tolua_Error tolua_err;
5024  if (
5025      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5026      !tolua_isnoobj(tolua_S,2,&tolua_err)
5027  )
5028   goto tolua_lerror;
5029  else
5030 #endif
5031  {
5032   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5033   {
5034    cairo_scaled_font_destroy(scaled_font);
5035   }
5036  }
5037  return 0;
5038 #ifndef TOLUA_RELEASE
5039  tolua_lerror:
5040  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_destroy'.",&tolua_err);
5041  return 0;
5042 #endif
5043 }
5044 #endif //#ifndef TOLUA_DISABLE
5045
5046 /* function: cairo_scaled_font_get_reference_count */
5047 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_get_reference_count00
5048 static int tolua_cairo_cairo_scaled_font_get_reference_count00(lua_State* tolua_S)
5049 {
5050 #ifndef TOLUA_RELEASE
5051  tolua_Error tolua_err;
5052  if (
5053      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5054      !tolua_isnoobj(tolua_S,2,&tolua_err)
5055  )
5056   goto tolua_lerror;
5057  else
5058 #endif
5059  {
5060   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5061   {
5062    unsigned int tolua_ret = (unsigned int)  cairo_scaled_font_get_reference_count(scaled_font);
5063    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
5064   }
5065  }
5066  return 1;
5067 #ifndef TOLUA_RELEASE
5068  tolua_lerror:
5069  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_get_reference_count'.",&tolua_err);
5070  return 0;
5071 #endif
5072 }
5073 #endif //#ifndef TOLUA_DISABLE
5074
5075 /* function: cairo_scaled_font_status */
5076 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_status00
5077 static int tolua_cairo_cairo_scaled_font_status00(lua_State* tolua_S)
5078 {
5079 #ifndef TOLUA_RELEASE
5080  tolua_Error tolua_err;
5081  if (
5082      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5083      !tolua_isnoobj(tolua_S,2,&tolua_err)
5084  )
5085   goto tolua_lerror;
5086  else
5087 #endif
5088  {
5089   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5090   {
5091    cairo_status_t tolua_ret = (cairo_status_t)  cairo_scaled_font_status(scaled_font);
5092    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
5093   }
5094  }
5095  return 1;
5096 #ifndef TOLUA_RELEASE
5097  tolua_lerror:
5098  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_status'.",&tolua_err);
5099  return 0;
5100 #endif
5101 }
5102 #endif //#ifndef TOLUA_DISABLE
5103
5104 /* function: cairo_scaled_font_get_type */
5105 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_get_type00
5106 static int tolua_cairo_cairo_scaled_font_get_type00(lua_State* tolua_S)
5107 {
5108 #ifndef TOLUA_RELEASE
5109  tolua_Error tolua_err;
5110  if (
5111      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5112      !tolua_isnoobj(tolua_S,2,&tolua_err)
5113  )
5114   goto tolua_lerror;
5115  else
5116 #endif
5117  {
5118   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5119   {
5120    cairo_font_type_t tolua_ret = (cairo_font_type_t)  cairo_scaled_font_get_type(scaled_font);
5121    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
5122   }
5123  }
5124  return 1;
5125 #ifndef TOLUA_RELEASE
5126  tolua_lerror:
5127  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_get_type'.",&tolua_err);
5128  return 0;
5129 #endif
5130 }
5131 #endif //#ifndef TOLUA_DISABLE
5132
5133 /* function: cairo_scaled_font_get_user_data */
5134 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_get_user_data00
5135 static int tolua_cairo_cairo_scaled_font_get_user_data00(lua_State* tolua_S)
5136 {
5137 #ifndef TOLUA_RELEASE
5138  tolua_Error tolua_err;
5139  if (
5140      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5141      !tolua_isusertype(tolua_S,2,"const cairo_user_data_key_t",0,&tolua_err) ||
5142      !tolua_isnoobj(tolua_S,3,&tolua_err)
5143  )
5144   goto tolua_lerror;
5145  else
5146 #endif
5147  {
5148   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5149   const cairo_user_data_key_t* key = ((const cairo_user_data_key_t*)  tolua_tousertype(tolua_S,2,0));
5150   {
5151    void* tolua_ret = (void*)  cairo_scaled_font_get_user_data(scaled_font,key);
5152    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
5153   }
5154  }
5155  return 1;
5156 #ifndef TOLUA_RELEASE
5157  tolua_lerror:
5158  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_get_user_data'.",&tolua_err);
5159  return 0;
5160 #endif
5161 }
5162 #endif //#ifndef TOLUA_DISABLE
5163
5164 /* function: cairo_scaled_font_set_user_data */
5165 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_set_user_data00
5166 static int tolua_cairo_cairo_scaled_font_set_user_data00(lua_State* tolua_S)
5167 {
5168 #ifndef TOLUA_RELEASE
5169  tolua_Error tolua_err;
5170  if (
5171      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5172      !tolua_isusertype(tolua_S,2,"const cairo_user_data_key_t",0,&tolua_err) ||
5173      !tolua_isuserdata(tolua_S,3,0,&tolua_err) ||
5174      (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"cairo_destroy_func_t",0,&tolua_err)) ||
5175      !tolua_isnoobj(tolua_S,5,&tolua_err)
5176  )
5177   goto tolua_lerror;
5178  else
5179 #endif
5180  {
5181   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5182   const cairo_user_data_key_t* key = ((const cairo_user_data_key_t*)  tolua_tousertype(tolua_S,2,0));
5183   void* user_data = ((void*)  tolua_touserdata(tolua_S,3,0));
5184   cairo_destroy_func_t destroy = *((cairo_destroy_func_t*)  tolua_tousertype(tolua_S,4,0));
5185   {
5186    cairo_status_t tolua_ret = (cairo_status_t)  cairo_scaled_font_set_user_data(scaled_font,key,user_data,destroy);
5187    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
5188   }
5189  }
5190  return 1;
5191 #ifndef TOLUA_RELEASE
5192  tolua_lerror:
5193  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_set_user_data'.",&tolua_err);
5194  return 0;
5195 #endif
5196 }
5197 #endif //#ifndef TOLUA_DISABLE
5198
5199 /* function: cairo_scaled_font_extents */
5200 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_extents00
5201 static int tolua_cairo_cairo_scaled_font_extents00(lua_State* tolua_S)
5202 {
5203 #ifndef TOLUA_RELEASE
5204  tolua_Error tolua_err;
5205  if (
5206      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5207      !tolua_isusertype(tolua_S,2,"cairo_font_extents_t",0,&tolua_err) ||
5208      !tolua_isnoobj(tolua_S,3,&tolua_err)
5209  )
5210   goto tolua_lerror;
5211  else
5212 #endif
5213  {
5214   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5215   cairo_font_extents_t* extents = ((cairo_font_extents_t*)  tolua_tousertype(tolua_S,2,0));
5216   {
5217    cairo_scaled_font_extents(scaled_font,extents);
5218   }
5219  }
5220  return 0;
5221 #ifndef TOLUA_RELEASE
5222  tolua_lerror:
5223  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_extents'.",&tolua_err);
5224  return 0;
5225 #endif
5226 }
5227 #endif //#ifndef TOLUA_DISABLE
5228
5229 /* function: cairo_scaled_font_text_extents */
5230 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_text_extents00
5231 static int tolua_cairo_cairo_scaled_font_text_extents00(lua_State* tolua_S)
5232 {
5233 #ifndef TOLUA_RELEASE
5234  tolua_Error tolua_err;
5235  if (
5236      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5237      !tolua_isstring(tolua_S,2,0,&tolua_err) ||
5238      !tolua_isusertype(tolua_S,3,"cairo_text_extents_t",0,&tolua_err) ||
5239      !tolua_isnoobj(tolua_S,4,&tolua_err)
5240  )
5241   goto tolua_lerror;
5242  else
5243 #endif
5244  {
5245   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5246   const char* utf8 = ((const char*)  tolua_tostring(tolua_S,2,0));
5247   cairo_text_extents_t* extents = ((cairo_text_extents_t*)  tolua_tousertype(tolua_S,3,0));
5248   {
5249    cairo_scaled_font_text_extents(scaled_font,utf8,extents);
5250   }
5251  }
5252  return 0;
5253 #ifndef TOLUA_RELEASE
5254  tolua_lerror:
5255  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_text_extents'.",&tolua_err);
5256  return 0;
5257 #endif
5258 }
5259 #endif //#ifndef TOLUA_DISABLE
5260
5261 /* function: cairo_scaled_font_glyph_extents */
5262 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_glyph_extents00
5263 static int tolua_cairo_cairo_scaled_font_glyph_extents00(lua_State* tolua_S)
5264 {
5265 #ifndef TOLUA_RELEASE
5266  tolua_Error tolua_err;
5267  if (
5268      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5269      !tolua_isusertype(tolua_S,2,"const cairo_glyph_t",0,&tolua_err) ||
5270      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5271      !tolua_isusertype(tolua_S,4,"cairo_text_extents_t",0,&tolua_err) ||
5272      !tolua_isnoobj(tolua_S,5,&tolua_err)
5273  )
5274   goto tolua_lerror;
5275  else
5276 #endif
5277  {
5278   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5279   const cairo_glyph_t* glyphs = ((const cairo_glyph_t*)  tolua_tousertype(tolua_S,2,0));
5280   int num_glyphs = ((int)  tolua_tonumber(tolua_S,3,0));
5281   cairo_text_extents_t* extents = ((cairo_text_extents_t*)  tolua_tousertype(tolua_S,4,0));
5282   {
5283    cairo_scaled_font_glyph_extents(scaled_font,glyphs,num_glyphs,extents);
5284   }
5285  }
5286  return 0;
5287 #ifndef TOLUA_RELEASE
5288  tolua_lerror:
5289  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_glyph_extents'.",&tolua_err);
5290  return 0;
5291 #endif
5292 }
5293 #endif //#ifndef TOLUA_DISABLE
5294
5295 /* function: cairo_scaled_font_text_to_glyphs */
5296 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_text_to_glyphs00
5297 static int tolua_cairo_cairo_scaled_font_text_to_glyphs00(lua_State* tolua_S)
5298 {
5299 #ifndef TOLUA_RELEASE
5300  tolua_Error tolua_err;
5301  if (
5302      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5303      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5304      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5305      !tolua_isstring(tolua_S,4,0,&tolua_err) ||
5306      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
5307      !tolua_isusertype(tolua_S,6,"cairo_glyph_t",0,&tolua_err) ||
5308      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
5309      !tolua_isusertype(tolua_S,8,"cairo_text_cluster_t",0,&tolua_err) ||
5310      !tolua_isnumber(tolua_S,9,0,&tolua_err) ||
5311      !tolua_isnumber(tolua_S,10,0,&tolua_err) ||
5312      !tolua_isnoobj(tolua_S,11,&tolua_err)
5313  )
5314   goto tolua_lerror;
5315  else
5316 #endif
5317  {
5318   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5319   double x = ((double)  tolua_tonumber(tolua_S,2,0));
5320   double y = ((double)  tolua_tonumber(tolua_S,3,0));
5321   const char* utf8 = ((const char*)  tolua_tostring(tolua_S,4,0));
5322   int utf8_len = ((int)  tolua_tonumber(tolua_S,5,0));
5323   cairo_glyph_t* glyphs = ((cairo_glyph_t*)  tolua_tousertype(tolua_S,6,0));
5324   int num_glyphs = ((int)  tolua_tonumber(tolua_S,7,0));
5325   cairo_text_cluster_t* clusters = ((cairo_text_cluster_t*)  tolua_tousertype(tolua_S,8,0));
5326   int num_clusters = ((int)  tolua_tonumber(tolua_S,9,0));
5327   cairo_text_cluster_flags_t cluster_flags = ((cairo_text_cluster_flags_t) (int)  tolua_tonumber(tolua_S,10,0));
5328   {
5329    cairo_status_t tolua_ret = (cairo_status_t)  cairo_scaled_font_text_to_glyphs(scaled_font,x,y,utf8,utf8_len,&glyphs,&num_glyphs,&clusters,&num_clusters,&cluster_flags);
5330    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
5331     tolua_pushusertype(tolua_S,(void*)glyphs,"cairo_glyph_t");
5332    tolua_pushnumber(tolua_S,(lua_Number)num_glyphs);
5333     tolua_pushusertype(tolua_S,(void*)clusters,"cairo_text_cluster_t");
5334    tolua_pushnumber(tolua_S,(lua_Number)num_clusters);
5335    tolua_pushnumber(tolua_S,(lua_Number)cluster_flags);
5336   }
5337  }
5338  return 6;
5339 #ifndef TOLUA_RELEASE
5340  tolua_lerror:
5341  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_text_to_glyphs'.",&tolua_err);
5342  return 0;
5343 #endif
5344 }
5345 #endif //#ifndef TOLUA_DISABLE
5346
5347 /* function: cairo_scaled_font_get_font_face */
5348 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_get_font_face00
5349 static int tolua_cairo_cairo_scaled_font_get_font_face00(lua_State* tolua_S)
5350 {
5351 #ifndef TOLUA_RELEASE
5352  tolua_Error tolua_err;
5353  if (
5354      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5355      !tolua_isnoobj(tolua_S,2,&tolua_err)
5356  )
5357   goto tolua_lerror;
5358  else
5359 #endif
5360  {
5361   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5362   {
5363    struct _cairo_font_face* tolua_ret = ( struct _cairo_font_face*)  cairo_scaled_font_get_font_face(scaled_font);
5364     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_font_face");
5365   }
5366  }
5367  return 1;
5368 #ifndef TOLUA_RELEASE
5369  tolua_lerror:
5370  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_get_font_face'.",&tolua_err);
5371  return 0;
5372 #endif
5373 }
5374 #endif //#ifndef TOLUA_DISABLE
5375
5376 /* function: cairo_scaled_font_get_font_matrix */
5377 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_get_font_matrix00
5378 static int tolua_cairo_cairo_scaled_font_get_font_matrix00(lua_State* tolua_S)
5379 {
5380 #ifndef TOLUA_RELEASE
5381  tolua_Error tolua_err;
5382  if (
5383      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5384      !tolua_isusertype(tolua_S,2,"cairo_matrix_t",0,&tolua_err) ||
5385      !tolua_isnoobj(tolua_S,3,&tolua_err)
5386  )
5387   goto tolua_lerror;
5388  else
5389 #endif
5390  {
5391   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5392   cairo_matrix_t* font_matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,2,0));
5393   {
5394    cairo_scaled_font_get_font_matrix(scaled_font,font_matrix);
5395   }
5396  }
5397  return 0;
5398 #ifndef TOLUA_RELEASE
5399  tolua_lerror:
5400  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_get_font_matrix'.",&tolua_err);
5401  return 0;
5402 #endif
5403 }
5404 #endif //#ifndef TOLUA_DISABLE
5405
5406 /* function: cairo_scaled_font_get_ctm */
5407 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_get_ctm00
5408 static int tolua_cairo_cairo_scaled_font_get_ctm00(lua_State* tolua_S)
5409 {
5410 #ifndef TOLUA_RELEASE
5411  tolua_Error tolua_err;
5412  if (
5413      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5414      !tolua_isusertype(tolua_S,2,"cairo_matrix_t",0,&tolua_err) ||
5415      !tolua_isnoobj(tolua_S,3,&tolua_err)
5416  )
5417   goto tolua_lerror;
5418  else
5419 #endif
5420  {
5421   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5422   cairo_matrix_t* ctm = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,2,0));
5423   {
5424    cairo_scaled_font_get_ctm(scaled_font,ctm);
5425   }
5426  }
5427  return 0;
5428 #ifndef TOLUA_RELEASE
5429  tolua_lerror:
5430  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_get_ctm'.",&tolua_err);
5431  return 0;
5432 #endif
5433 }
5434 #endif //#ifndef TOLUA_DISABLE
5435
5436 /* function: cairo_scaled_font_get_scale_matrix */
5437 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_get_scale_matrix00
5438 static int tolua_cairo_cairo_scaled_font_get_scale_matrix00(lua_State* tolua_S)
5439 {
5440 #ifndef TOLUA_RELEASE
5441  tolua_Error tolua_err;
5442  if (
5443      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5444      !tolua_isusertype(tolua_S,2,"cairo_matrix_t",0,&tolua_err) ||
5445      !tolua_isnoobj(tolua_S,3,&tolua_err)
5446  )
5447   goto tolua_lerror;
5448  else
5449 #endif
5450  {
5451   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5452   cairo_matrix_t* scale_matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,2,0));
5453   {
5454    cairo_scaled_font_get_scale_matrix(scaled_font,scale_matrix);
5455   }
5456  }
5457  return 0;
5458 #ifndef TOLUA_RELEASE
5459  tolua_lerror:
5460  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_get_scale_matrix'.",&tolua_err);
5461  return 0;
5462 #endif
5463 }
5464 #endif //#ifndef TOLUA_DISABLE
5465
5466 /* function: cairo_scaled_font_get_font_options */
5467 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_scaled_font_get_font_options00
5468 static int tolua_cairo_cairo_scaled_font_get_font_options00(lua_State* tolua_S)
5469 {
5470 #ifndef TOLUA_RELEASE
5471  tolua_Error tolua_err;
5472  if (
5473      !tolua_isusertype(tolua_S,1,"_cairo_scaled_font",0,&tolua_err) ||
5474      !tolua_isusertype(tolua_S,2,"_cairo_font_options",0,&tolua_err) ||
5475      !tolua_isnoobj(tolua_S,3,&tolua_err)
5476  )
5477   goto tolua_lerror;
5478  else
5479 #endif
5480  {
5481   struct _cairo_scaled_font* scaled_font = (( struct _cairo_scaled_font*)  tolua_tousertype(tolua_S,1,0));
5482   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,2,0));
5483   {
5484    cairo_scaled_font_get_font_options(scaled_font,options);
5485   }
5486  }
5487  return 0;
5488 #ifndef TOLUA_RELEASE
5489  tolua_lerror:
5490  tolua_error(tolua_S,"#ferror in function 'cairo_scaled_font_get_font_options'.",&tolua_err);
5491  return 0;
5492 #endif
5493 }
5494 #endif //#ifndef TOLUA_DISABLE
5495
5496 /* function: cairo_toy_font_face_create */
5497 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_toy_font_face_create00
5498 static int tolua_cairo_cairo_toy_font_face_create00(lua_State* tolua_S)
5499 {
5500 #ifndef TOLUA_RELEASE
5501  tolua_Error tolua_err;
5502  if (
5503      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
5504      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
5505      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
5506      !tolua_isnoobj(tolua_S,4,&tolua_err)
5507  )
5508   goto tolua_lerror;
5509  else
5510 #endif
5511  {
5512   const char* family = ((const char*)  tolua_tostring(tolua_S,1,0));
5513   cairo_font_slant_t slant = ((cairo_font_slant_t) (int)  tolua_tonumber(tolua_S,2,0));
5514   cairo_font_weight_t weight = ((cairo_font_weight_t) (int)  tolua_tonumber(tolua_S,3,0));
5515   {
5516    struct _cairo_font_face* tolua_ret = ( struct _cairo_font_face*)  cairo_toy_font_face_create(family,slant,weight);
5517     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_font_face");
5518   }
5519  }
5520  return 1;
5521 #ifndef TOLUA_RELEASE
5522  tolua_lerror:
5523  tolua_error(tolua_S,"#ferror in function 'cairo_toy_font_face_create'.",&tolua_err);
5524  return 0;
5525 #endif
5526 }
5527 #endif //#ifndef TOLUA_DISABLE
5528
5529 /* function: cairo_toy_font_face_get_family */
5530 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_toy_font_face_get_family00
5531 static int tolua_cairo_cairo_toy_font_face_get_family00(lua_State* tolua_S)
5532 {
5533 #ifndef TOLUA_RELEASE
5534  tolua_Error tolua_err;
5535  if (
5536      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
5537      !tolua_isnoobj(tolua_S,2,&tolua_err)
5538  )
5539   goto tolua_lerror;
5540  else
5541 #endif
5542  {
5543   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
5544   {
5545    const char* tolua_ret = (const char*)  cairo_toy_font_face_get_family(font_face);
5546    tolua_pushstring(tolua_S,(const char*)tolua_ret);
5547   }
5548  }
5549  return 1;
5550 #ifndef TOLUA_RELEASE
5551  tolua_lerror:
5552  tolua_error(tolua_S,"#ferror in function 'cairo_toy_font_face_get_family'.",&tolua_err);
5553  return 0;
5554 #endif
5555 }
5556 #endif //#ifndef TOLUA_DISABLE
5557
5558 /* function: cairo_toy_font_face_get_slant */
5559 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_toy_font_face_get_slant00
5560 static int tolua_cairo_cairo_toy_font_face_get_slant00(lua_State* tolua_S)
5561 {
5562 #ifndef TOLUA_RELEASE
5563  tolua_Error tolua_err;
5564  if (
5565      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
5566      !tolua_isnoobj(tolua_S,2,&tolua_err)
5567  )
5568   goto tolua_lerror;
5569  else
5570 #endif
5571  {
5572   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
5573   {
5574    cairo_font_slant_t tolua_ret = (cairo_font_slant_t)  cairo_toy_font_face_get_slant(font_face);
5575    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
5576   }
5577  }
5578  return 1;
5579 #ifndef TOLUA_RELEASE
5580  tolua_lerror:
5581  tolua_error(tolua_S,"#ferror in function 'cairo_toy_font_face_get_slant'.",&tolua_err);
5582  return 0;
5583 #endif
5584 }
5585 #endif //#ifndef TOLUA_DISABLE
5586
5587 /* function: cairo_toy_font_face_get_weight */
5588 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_toy_font_face_get_weight00
5589 static int tolua_cairo_cairo_toy_font_face_get_weight00(lua_State* tolua_S)
5590 {
5591 #ifndef TOLUA_RELEASE
5592  tolua_Error tolua_err;
5593  if (
5594      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
5595      !tolua_isnoobj(tolua_S,2,&tolua_err)
5596  )
5597   goto tolua_lerror;
5598  else
5599 #endif
5600  {
5601   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
5602   {
5603    cairo_font_weight_t tolua_ret = (cairo_font_weight_t)  cairo_toy_font_face_get_weight(font_face);
5604    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
5605   }
5606  }
5607  return 1;
5608 #ifndef TOLUA_RELEASE
5609  tolua_lerror:
5610  tolua_error(tolua_S,"#ferror in function 'cairo_toy_font_face_get_weight'.",&tolua_err);
5611  return 0;
5612 #endif
5613 }
5614 #endif //#ifndef TOLUA_DISABLE
5615
5616 /* function: cairo_user_font_face_create */
5617 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_user_font_face_create00
5618 static int tolua_cairo_cairo_user_font_face_create00(lua_State* tolua_S)
5619 {
5620 #ifndef TOLUA_RELEASE
5621  tolua_Error tolua_err;
5622  if (
5623      !tolua_isnoobj(tolua_S,1,&tolua_err)
5624  )
5625   goto tolua_lerror;
5626  else
5627 #endif
5628  {
5629   {
5630    struct _cairo_font_face* tolua_ret = ( struct _cairo_font_face*)  cairo_user_font_face_create();
5631     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_font_face");
5632   }
5633  }
5634  return 1;
5635 #ifndef TOLUA_RELEASE
5636  tolua_lerror:
5637  tolua_error(tolua_S,"#ferror in function 'cairo_user_font_face_create'.",&tolua_err);
5638  return 0;
5639 #endif
5640 }
5641 #endif //#ifndef TOLUA_DISABLE
5642
5643 /* function: cairo_user_font_face_set_init_func */
5644 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_user_font_face_set_init_func00
5645 static int tolua_cairo_cairo_user_font_face_set_init_func00(lua_State* tolua_S)
5646 {
5647 #ifndef TOLUA_RELEASE
5648  tolua_Error tolua_err;
5649  if (
5650      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
5651      (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cairo_user_scaled_font_init_func_t",0,&tolua_err)) ||
5652      !tolua_isnoobj(tolua_S,3,&tolua_err)
5653  )
5654   goto tolua_lerror;
5655  else
5656 #endif
5657  {
5658   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
5659   cairo_user_scaled_font_init_func_t init_func = *((cairo_user_scaled_font_init_func_t*)  tolua_tousertype(tolua_S,2,0));
5660   {
5661    cairo_user_font_face_set_init_func(font_face,init_func);
5662   }
5663  }
5664  return 0;
5665 #ifndef TOLUA_RELEASE
5666  tolua_lerror:
5667  tolua_error(tolua_S,"#ferror in function 'cairo_user_font_face_set_init_func'.",&tolua_err);
5668  return 0;
5669 #endif
5670 }
5671 #endif //#ifndef TOLUA_DISABLE
5672
5673 /* function: cairo_user_font_face_set_render_glyph_func */
5674 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_user_font_face_set_render_glyph_func00
5675 static int tolua_cairo_cairo_user_font_face_set_render_glyph_func00(lua_State* tolua_S)
5676 {
5677 #ifndef TOLUA_RELEASE
5678  tolua_Error tolua_err;
5679  if (
5680      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
5681      (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cairo_user_scaled_font_render_glyph_func_t",0,&tolua_err)) ||
5682      !tolua_isnoobj(tolua_S,3,&tolua_err)
5683  )
5684   goto tolua_lerror;
5685  else
5686 #endif
5687  {
5688   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
5689   cairo_user_scaled_font_render_glyph_func_t render_glyph_func = *((cairo_user_scaled_font_render_glyph_func_t*)  tolua_tousertype(tolua_S,2,0));
5690   {
5691    cairo_user_font_face_set_render_glyph_func(font_face,render_glyph_func);
5692   }
5693  }
5694  return 0;
5695 #ifndef TOLUA_RELEASE
5696  tolua_lerror:
5697  tolua_error(tolua_S,"#ferror in function 'cairo_user_font_face_set_render_glyph_func'.",&tolua_err);
5698  return 0;
5699 #endif
5700 }
5701 #endif //#ifndef TOLUA_DISABLE
5702
5703 /* function: cairo_user_font_face_set_text_to_glyphs_func */
5704 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_user_font_face_set_text_to_glyphs_func00
5705 static int tolua_cairo_cairo_user_font_face_set_text_to_glyphs_func00(lua_State* tolua_S)
5706 {
5707 #ifndef TOLUA_RELEASE
5708  tolua_Error tolua_err;
5709  if (
5710      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
5711      (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cairo_user_scaled_font_text_to_glyphs_func_t",0,&tolua_err)) ||
5712      !tolua_isnoobj(tolua_S,3,&tolua_err)
5713  )
5714   goto tolua_lerror;
5715  else
5716 #endif
5717  {
5718   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
5719   cairo_user_scaled_font_text_to_glyphs_func_t text_to_glyphs_func = *((cairo_user_scaled_font_text_to_glyphs_func_t*)  tolua_tousertype(tolua_S,2,0));
5720   {
5721    cairo_user_font_face_set_text_to_glyphs_func(font_face,text_to_glyphs_func);
5722   }
5723  }
5724  return 0;
5725 #ifndef TOLUA_RELEASE
5726  tolua_lerror:
5727  tolua_error(tolua_S,"#ferror in function 'cairo_user_font_face_set_text_to_glyphs_func'.",&tolua_err);
5728  return 0;
5729 #endif
5730 }
5731 #endif //#ifndef TOLUA_DISABLE
5732
5733 /* function: cairo_user_font_face_set_unicode_to_glyph_func */
5734 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_user_font_face_set_unicode_to_glyph_func00
5735 static int tolua_cairo_cairo_user_font_face_set_unicode_to_glyph_func00(lua_State* tolua_S)
5736 {
5737 #ifndef TOLUA_RELEASE
5738  tolua_Error tolua_err;
5739  if (
5740      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
5741      (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cairo_user_scaled_font_unicode_to_glyph_func_t",0,&tolua_err)) ||
5742      !tolua_isnoobj(tolua_S,3,&tolua_err)
5743  )
5744   goto tolua_lerror;
5745  else
5746 #endif
5747  {
5748   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
5749   cairo_user_scaled_font_unicode_to_glyph_func_t unicode_to_glyph_func = *((cairo_user_scaled_font_unicode_to_glyph_func_t*)  tolua_tousertype(tolua_S,2,0));
5750   {
5751    cairo_user_font_face_set_unicode_to_glyph_func(font_face,unicode_to_glyph_func);
5752   }
5753  }
5754  return 0;
5755 #ifndef TOLUA_RELEASE
5756  tolua_lerror:
5757  tolua_error(tolua_S,"#ferror in function 'cairo_user_font_face_set_unicode_to_glyph_func'.",&tolua_err);
5758  return 0;
5759 #endif
5760 }
5761 #endif //#ifndef TOLUA_DISABLE
5762
5763 /* function: cairo_user_font_face_get_init_func */
5764 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_user_font_face_get_init_func00
5765 static int tolua_cairo_cairo_user_font_face_get_init_func00(lua_State* tolua_S)
5766 {
5767 #ifndef TOLUA_RELEASE
5768  tolua_Error tolua_err;
5769  if (
5770      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
5771      !tolua_isnoobj(tolua_S,2,&tolua_err)
5772  )
5773   goto tolua_lerror;
5774  else
5775 #endif
5776  {
5777   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
5778   {
5779    cairo_user_scaled_font_init_func_t tolua_ret = (cairo_user_scaled_font_init_func_t)  cairo_user_font_face_get_init_func(font_face);
5780    {
5781 #ifdef __cplusplus
5782     void* tolua_obj = Mtolua_new((cairo_user_scaled_font_init_func_t)(tolua_ret));
5783      tolua_pushusertype(tolua_S,tolua_obj,"cairo_user_scaled_font_init_func_t");
5784     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
5785 #else
5786     void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(cairo_user_scaled_font_init_func_t));
5787      tolua_pushusertype(tolua_S,tolua_obj,"cairo_user_scaled_font_init_func_t");
5788     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
5789 #endif
5790    }
5791   }
5792  }
5793  return 1;
5794 #ifndef TOLUA_RELEASE
5795  tolua_lerror:
5796  tolua_error(tolua_S,"#ferror in function 'cairo_user_font_face_get_init_func'.",&tolua_err);
5797  return 0;
5798 #endif
5799 }
5800 #endif //#ifndef TOLUA_DISABLE
5801
5802 /* function: cairo_user_font_face_get_render_glyph_func */
5803 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_user_font_face_get_render_glyph_func00
5804 static int tolua_cairo_cairo_user_font_face_get_render_glyph_func00(lua_State* tolua_S)
5805 {
5806 #ifndef TOLUA_RELEASE
5807  tolua_Error tolua_err;
5808  if (
5809      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
5810      !tolua_isnoobj(tolua_S,2,&tolua_err)
5811  )
5812   goto tolua_lerror;
5813  else
5814 #endif
5815  {
5816   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
5817   {
5818    cairo_user_scaled_font_render_glyph_func_t tolua_ret = (cairo_user_scaled_font_render_glyph_func_t)  cairo_user_font_face_get_render_glyph_func(font_face);
5819    {
5820 #ifdef __cplusplus
5821     void* tolua_obj = Mtolua_new((cairo_user_scaled_font_render_glyph_func_t)(tolua_ret));
5822      tolua_pushusertype(tolua_S,tolua_obj,"cairo_user_scaled_font_render_glyph_func_t");
5823     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
5824 #else
5825     void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(cairo_user_scaled_font_render_glyph_func_t));
5826      tolua_pushusertype(tolua_S,tolua_obj,"cairo_user_scaled_font_render_glyph_func_t");
5827     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
5828 #endif
5829    }
5830   }
5831  }
5832  return 1;
5833 #ifndef TOLUA_RELEASE
5834  tolua_lerror:
5835  tolua_error(tolua_S,"#ferror in function 'cairo_user_font_face_get_render_glyph_func'.",&tolua_err);
5836  return 0;
5837 #endif
5838 }
5839 #endif //#ifndef TOLUA_DISABLE
5840
5841 /* function: cairo_user_font_face_get_text_to_glyphs_func */
5842 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_user_font_face_get_text_to_glyphs_func00
5843 static int tolua_cairo_cairo_user_font_face_get_text_to_glyphs_func00(lua_State* tolua_S)
5844 {
5845 #ifndef TOLUA_RELEASE
5846  tolua_Error tolua_err;
5847  if (
5848      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
5849      !tolua_isnoobj(tolua_S,2,&tolua_err)
5850  )
5851   goto tolua_lerror;
5852  else
5853 #endif
5854  {
5855   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
5856   {
5857    cairo_user_scaled_font_text_to_glyphs_func_t tolua_ret = (cairo_user_scaled_font_text_to_glyphs_func_t)  cairo_user_font_face_get_text_to_glyphs_func(font_face);
5858    {
5859 #ifdef __cplusplus
5860     void* tolua_obj = Mtolua_new((cairo_user_scaled_font_text_to_glyphs_func_t)(tolua_ret));
5861      tolua_pushusertype(tolua_S,tolua_obj,"cairo_user_scaled_font_text_to_glyphs_func_t");
5862     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
5863 #else
5864     void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(cairo_user_scaled_font_text_to_glyphs_func_t));
5865      tolua_pushusertype(tolua_S,tolua_obj,"cairo_user_scaled_font_text_to_glyphs_func_t");
5866     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
5867 #endif
5868    }
5869   }
5870  }
5871  return 1;
5872 #ifndef TOLUA_RELEASE
5873  tolua_lerror:
5874  tolua_error(tolua_S,"#ferror in function 'cairo_user_font_face_get_text_to_glyphs_func'.",&tolua_err);
5875  return 0;
5876 #endif
5877 }
5878 #endif //#ifndef TOLUA_DISABLE
5879
5880 /* function: cairo_user_font_face_get_unicode_to_glyph_func */
5881 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_user_font_face_get_unicode_to_glyph_func00
5882 static int tolua_cairo_cairo_user_font_face_get_unicode_to_glyph_func00(lua_State* tolua_S)
5883 {
5884 #ifndef TOLUA_RELEASE
5885  tolua_Error tolua_err;
5886  if (
5887      !tolua_isusertype(tolua_S,1,"_cairo_font_face",0,&tolua_err) ||
5888      !tolua_isnoobj(tolua_S,2,&tolua_err)
5889  )
5890   goto tolua_lerror;
5891  else
5892 #endif
5893  {
5894   struct _cairo_font_face* font_face = (( struct _cairo_font_face*)  tolua_tousertype(tolua_S,1,0));
5895   {
5896    cairo_user_scaled_font_unicode_to_glyph_func_t tolua_ret = (cairo_user_scaled_font_unicode_to_glyph_func_t)  cairo_user_font_face_get_unicode_to_glyph_func(font_face);
5897    {
5898 #ifdef __cplusplus
5899     void* tolua_obj = Mtolua_new((cairo_user_scaled_font_unicode_to_glyph_func_t)(tolua_ret));
5900      tolua_pushusertype(tolua_S,tolua_obj,"cairo_user_scaled_font_unicode_to_glyph_func_t");
5901     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
5902 #else
5903     void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(cairo_user_scaled_font_unicode_to_glyph_func_t));
5904      tolua_pushusertype(tolua_S,tolua_obj,"cairo_user_scaled_font_unicode_to_glyph_func_t");
5905     tolua_register_gc(tolua_S,lua_gettop(tolua_S));
5906 #endif
5907    }
5908   }
5909  }
5910  return 1;
5911 #ifndef TOLUA_RELEASE
5912  tolua_lerror:
5913  tolua_error(tolua_S,"#ferror in function 'cairo_user_font_face_get_unicode_to_glyph_func'.",&tolua_err);
5914  return 0;
5915 #endif
5916 }
5917 #endif //#ifndef TOLUA_DISABLE
5918
5919 /* function: cairo_get_operator */
5920 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_operator00
5921 static int tolua_cairo_cairo_get_operator00(lua_State* tolua_S)
5922 {
5923 #ifndef TOLUA_RELEASE
5924  tolua_Error tolua_err;
5925  if (
5926      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
5927      !tolua_isnoobj(tolua_S,2,&tolua_err)
5928  )
5929   goto tolua_lerror;
5930  else
5931 #endif
5932  {
5933   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
5934   {
5935    cairo_operator_t tolua_ret = (cairo_operator_t)  cairo_get_operator(cr);
5936    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
5937   }
5938  }
5939  return 1;
5940 #ifndef TOLUA_RELEASE
5941  tolua_lerror:
5942  tolua_error(tolua_S,"#ferror in function 'cairo_get_operator'.",&tolua_err);
5943  return 0;
5944 #endif
5945 }
5946 #endif //#ifndef TOLUA_DISABLE
5947
5948 /* function: cairo_get_source */
5949 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_source00
5950 static int tolua_cairo_cairo_get_source00(lua_State* tolua_S)
5951 {
5952 #ifndef TOLUA_RELEASE
5953  tolua_Error tolua_err;
5954  if (
5955      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
5956      !tolua_isnoobj(tolua_S,2,&tolua_err)
5957  )
5958   goto tolua_lerror;
5959  else
5960 #endif
5961  {
5962   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
5963   {
5964    struct _cairo_pattern* tolua_ret = ( struct _cairo_pattern*)  cairo_get_source(cr);
5965     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_pattern");
5966   }
5967  }
5968  return 1;
5969 #ifndef TOLUA_RELEASE
5970  tolua_lerror:
5971  tolua_error(tolua_S,"#ferror in function 'cairo_get_source'.",&tolua_err);
5972  return 0;
5973 #endif
5974 }
5975 #endif //#ifndef TOLUA_DISABLE
5976
5977 /* function: cairo_get_tolerance */
5978 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_tolerance00
5979 static int tolua_cairo_cairo_get_tolerance00(lua_State* tolua_S)
5980 {
5981 #ifndef TOLUA_RELEASE
5982  tolua_Error tolua_err;
5983  if (
5984      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
5985      !tolua_isnoobj(tolua_S,2,&tolua_err)
5986  )
5987   goto tolua_lerror;
5988  else
5989 #endif
5990  {
5991   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
5992   {
5993    double tolua_ret = (double)  cairo_get_tolerance(cr);
5994    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
5995   }
5996  }
5997  return 1;
5998 #ifndef TOLUA_RELEASE
5999  tolua_lerror:
6000  tolua_error(tolua_S,"#ferror in function 'cairo_get_tolerance'.",&tolua_err);
6001  return 0;
6002 #endif
6003 }
6004 #endif //#ifndef TOLUA_DISABLE
6005
6006 /* function: cairo_get_antialias */
6007 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_antialias00
6008 static int tolua_cairo_cairo_get_antialias00(lua_State* tolua_S)
6009 {
6010 #ifndef TOLUA_RELEASE
6011  tolua_Error tolua_err;
6012  if (
6013      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6014      !tolua_isnoobj(tolua_S,2,&tolua_err)
6015  )
6016   goto tolua_lerror;
6017  else
6018 #endif
6019  {
6020   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6021   {
6022    cairo_antialias_t tolua_ret = (cairo_antialias_t)  cairo_get_antialias(cr);
6023    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6024   }
6025  }
6026  return 1;
6027 #ifndef TOLUA_RELEASE
6028  tolua_lerror:
6029  tolua_error(tolua_S,"#ferror in function 'cairo_get_antialias'.",&tolua_err);
6030  return 0;
6031 #endif
6032 }
6033 #endif //#ifndef TOLUA_DISABLE
6034
6035 /* function: cairo_has_current_point */
6036 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_has_current_point00
6037 static int tolua_cairo_cairo_has_current_point00(lua_State* tolua_S)
6038 {
6039 #ifndef TOLUA_RELEASE
6040  tolua_Error tolua_err;
6041  if (
6042      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6043      !tolua_isnoobj(tolua_S,2,&tolua_err)
6044  )
6045   goto tolua_lerror;
6046  else
6047 #endif
6048  {
6049   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6050   {
6051     int tolua_ret = (  int)  cairo_has_current_point(cr);
6052    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6053   }
6054  }
6055  return 1;
6056 #ifndef TOLUA_RELEASE
6057  tolua_lerror:
6058  tolua_error(tolua_S,"#ferror in function 'cairo_has_current_point'.",&tolua_err);
6059  return 0;
6060 #endif
6061 }
6062 #endif //#ifndef TOLUA_DISABLE
6063
6064 /* function: cairo_get_current_point */
6065 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_current_point00
6066 static int tolua_cairo_cairo_get_current_point00(lua_State* tolua_S)
6067 {
6068 #ifndef TOLUA_RELEASE
6069  tolua_Error tolua_err;
6070  if (
6071      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6072      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6073      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6074      !tolua_isnoobj(tolua_S,4,&tolua_err)
6075  )
6076   goto tolua_lerror;
6077  else
6078 #endif
6079  {
6080   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6081   double x = ((double)  tolua_tonumber(tolua_S,2,0));
6082   double y = ((double)  tolua_tonumber(tolua_S,3,0));
6083   {
6084    cairo_get_current_point(cr,&x,&y);
6085    tolua_pushnumber(tolua_S,(lua_Number)x);
6086    tolua_pushnumber(tolua_S,(lua_Number)y);
6087   }
6088  }
6089  return 2;
6090 #ifndef TOLUA_RELEASE
6091  tolua_lerror:
6092  tolua_error(tolua_S,"#ferror in function 'cairo_get_current_point'.",&tolua_err);
6093  return 0;
6094 #endif
6095 }
6096 #endif //#ifndef TOLUA_DISABLE
6097
6098 /* function: cairo_get_fill_rule */
6099 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_fill_rule00
6100 static int tolua_cairo_cairo_get_fill_rule00(lua_State* tolua_S)
6101 {
6102 #ifndef TOLUA_RELEASE
6103  tolua_Error tolua_err;
6104  if (
6105      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6106      !tolua_isnoobj(tolua_S,2,&tolua_err)
6107  )
6108   goto tolua_lerror;
6109  else
6110 #endif
6111  {
6112   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6113   {
6114    cairo_fill_rule_t tolua_ret = (cairo_fill_rule_t)  cairo_get_fill_rule(cr);
6115    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6116   }
6117  }
6118  return 1;
6119 #ifndef TOLUA_RELEASE
6120  tolua_lerror:
6121  tolua_error(tolua_S,"#ferror in function 'cairo_get_fill_rule'.",&tolua_err);
6122  return 0;
6123 #endif
6124 }
6125 #endif //#ifndef TOLUA_DISABLE
6126
6127 /* function: cairo_get_line_width */
6128 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_line_width00
6129 static int tolua_cairo_cairo_get_line_width00(lua_State* tolua_S)
6130 {
6131 #ifndef TOLUA_RELEASE
6132  tolua_Error tolua_err;
6133  if (
6134      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6135      !tolua_isnoobj(tolua_S,2,&tolua_err)
6136  )
6137   goto tolua_lerror;
6138  else
6139 #endif
6140  {
6141   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6142   {
6143    double tolua_ret = (double)  cairo_get_line_width(cr);
6144    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6145   }
6146  }
6147  return 1;
6148 #ifndef TOLUA_RELEASE
6149  tolua_lerror:
6150  tolua_error(tolua_S,"#ferror in function 'cairo_get_line_width'.",&tolua_err);
6151  return 0;
6152 #endif
6153 }
6154 #endif //#ifndef TOLUA_DISABLE
6155
6156 /* function: cairo_get_line_cap */
6157 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_line_cap00
6158 static int tolua_cairo_cairo_get_line_cap00(lua_State* tolua_S)
6159 {
6160 #ifndef TOLUA_RELEASE
6161  tolua_Error tolua_err;
6162  if (
6163      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6164      !tolua_isnoobj(tolua_S,2,&tolua_err)
6165  )
6166   goto tolua_lerror;
6167  else
6168 #endif
6169  {
6170   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6171   {
6172    cairo_line_cap_t tolua_ret = (cairo_line_cap_t)  cairo_get_line_cap(cr);
6173    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6174   }
6175  }
6176  return 1;
6177 #ifndef TOLUA_RELEASE
6178  tolua_lerror:
6179  tolua_error(tolua_S,"#ferror in function 'cairo_get_line_cap'.",&tolua_err);
6180  return 0;
6181 #endif
6182 }
6183 #endif //#ifndef TOLUA_DISABLE
6184
6185 /* function: cairo_get_line_join */
6186 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_line_join00
6187 static int tolua_cairo_cairo_get_line_join00(lua_State* tolua_S)
6188 {
6189 #ifndef TOLUA_RELEASE
6190  tolua_Error tolua_err;
6191  if (
6192      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6193      !tolua_isnoobj(tolua_S,2,&tolua_err)
6194  )
6195   goto tolua_lerror;
6196  else
6197 #endif
6198  {
6199   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6200   {
6201    cairo_line_join_t tolua_ret = (cairo_line_join_t)  cairo_get_line_join(cr);
6202    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6203   }
6204  }
6205  return 1;
6206 #ifndef TOLUA_RELEASE
6207  tolua_lerror:
6208  tolua_error(tolua_S,"#ferror in function 'cairo_get_line_join'.",&tolua_err);
6209  return 0;
6210 #endif
6211 }
6212 #endif //#ifndef TOLUA_DISABLE
6213
6214 /* function: cairo_get_miter_limit */
6215 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_miter_limit00
6216 static int tolua_cairo_cairo_get_miter_limit00(lua_State* tolua_S)
6217 {
6218 #ifndef TOLUA_RELEASE
6219  tolua_Error tolua_err;
6220  if (
6221      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6222      !tolua_isnoobj(tolua_S,2,&tolua_err)
6223  )
6224   goto tolua_lerror;
6225  else
6226 #endif
6227  {
6228   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6229   {
6230    double tolua_ret = (double)  cairo_get_miter_limit(cr);
6231    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6232   }
6233  }
6234  return 1;
6235 #ifndef TOLUA_RELEASE
6236  tolua_lerror:
6237  tolua_error(tolua_S,"#ferror in function 'cairo_get_miter_limit'.",&tolua_err);
6238  return 0;
6239 #endif
6240 }
6241 #endif //#ifndef TOLUA_DISABLE
6242
6243 /* function: cairo_get_dash_count */
6244 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_dash_count00
6245 static int tolua_cairo_cairo_get_dash_count00(lua_State* tolua_S)
6246 {
6247 #ifndef TOLUA_RELEASE
6248  tolua_Error tolua_err;
6249  if (
6250      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6251      !tolua_isnoobj(tolua_S,2,&tolua_err)
6252  )
6253   goto tolua_lerror;
6254  else
6255 #endif
6256  {
6257   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6258   {
6259    int tolua_ret = (int)  cairo_get_dash_count(cr);
6260    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6261   }
6262  }
6263  return 1;
6264 #ifndef TOLUA_RELEASE
6265  tolua_lerror:
6266  tolua_error(tolua_S,"#ferror in function 'cairo_get_dash_count'.",&tolua_err);
6267  return 0;
6268 #endif
6269 }
6270 #endif //#ifndef TOLUA_DISABLE
6271
6272 /* function: cairo_get_dash */
6273 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_dash00
6274 static int tolua_cairo_cairo_get_dash00(lua_State* tolua_S)
6275 {
6276 #ifndef TOLUA_RELEASE
6277  tolua_Error tolua_err;
6278  if (
6279      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6280      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6281      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6282      !tolua_isnoobj(tolua_S,4,&tolua_err)
6283  )
6284   goto tolua_lerror;
6285  else
6286 #endif
6287  {
6288   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6289   double dashes = ((double)  tolua_tonumber(tolua_S,2,0));
6290   double offset = ((double)  tolua_tonumber(tolua_S,3,0));
6291   {
6292    cairo_get_dash(cr,&dashes,&offset);
6293    tolua_pushnumber(tolua_S,(lua_Number)dashes);
6294    tolua_pushnumber(tolua_S,(lua_Number)offset);
6295   }
6296  }
6297  return 2;
6298 #ifndef TOLUA_RELEASE
6299  tolua_lerror:
6300  tolua_error(tolua_S,"#ferror in function 'cairo_get_dash'.",&tolua_err);
6301  return 0;
6302 #endif
6303 }
6304 #endif //#ifndef TOLUA_DISABLE
6305
6306 /* function: cairo_get_matrix */
6307 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_matrix00
6308 static int tolua_cairo_cairo_get_matrix00(lua_State* tolua_S)
6309 {
6310 #ifndef TOLUA_RELEASE
6311  tolua_Error tolua_err;
6312  if (
6313      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6314      !tolua_isusertype(tolua_S,2,"cairo_matrix_t",0,&tolua_err) ||
6315      !tolua_isnoobj(tolua_S,3,&tolua_err)
6316  )
6317   goto tolua_lerror;
6318  else
6319 #endif
6320  {
6321   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6322   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,2,0));
6323   {
6324    cairo_get_matrix(cr,matrix);
6325   }
6326  }
6327  return 0;
6328 #ifndef TOLUA_RELEASE
6329  tolua_lerror:
6330  tolua_error(tolua_S,"#ferror in function 'cairo_get_matrix'.",&tolua_err);
6331  return 0;
6332 #endif
6333 }
6334 #endif //#ifndef TOLUA_DISABLE
6335
6336 /* function: cairo_get_target */
6337 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_target00
6338 static int tolua_cairo_cairo_get_target00(lua_State* tolua_S)
6339 {
6340 #ifndef TOLUA_RELEASE
6341  tolua_Error tolua_err;
6342  if (
6343      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6344      !tolua_isnoobj(tolua_S,2,&tolua_err)
6345  )
6346   goto tolua_lerror;
6347  else
6348 #endif
6349  {
6350   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6351   {
6352    struct _cairo_surface* tolua_ret = ( struct _cairo_surface*)  cairo_get_target(cr);
6353     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_surface");
6354   }
6355  }
6356  return 1;
6357 #ifndef TOLUA_RELEASE
6358  tolua_lerror:
6359  tolua_error(tolua_S,"#ferror in function 'cairo_get_target'.",&tolua_err);
6360  return 0;
6361 #endif
6362 }
6363 #endif //#ifndef TOLUA_DISABLE
6364
6365 /* function: cairo_get_group_target */
6366 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_get_group_target00
6367 static int tolua_cairo_cairo_get_group_target00(lua_State* tolua_S)
6368 {
6369 #ifndef TOLUA_RELEASE
6370  tolua_Error tolua_err;
6371  if (
6372      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6373      !tolua_isnoobj(tolua_S,2,&tolua_err)
6374  )
6375   goto tolua_lerror;
6376  else
6377 #endif
6378  {
6379   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6380   {
6381    struct _cairo_surface* tolua_ret = ( struct _cairo_surface*)  cairo_get_group_target(cr);
6382     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_surface");
6383   }
6384  }
6385  return 1;
6386 #ifndef TOLUA_RELEASE
6387  tolua_lerror:
6388  tolua_error(tolua_S,"#ferror in function 'cairo_get_group_target'.",&tolua_err);
6389  return 0;
6390 #endif
6391 }
6392 #endif //#ifndef TOLUA_DISABLE
6393
6394 /* get function: status of class  cairo_path_t */
6395 #ifndef TOLUA_DISABLE_tolua_get_cairo_path_t_status
6396 static int tolua_get_cairo_path_t_status(lua_State* tolua_S)
6397 {
6398   cairo_path_t* self = (cairo_path_t*)  tolua_tousertype(tolua_S,1,0);
6399 #ifndef TOLUA_RELEASE
6400   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'status'",NULL);
6401 #endif
6402   tolua_pushnumber(tolua_S,(lua_Number)self->status);
6403  return 1;
6404 }
6405 #endif //#ifndef TOLUA_DISABLE
6406
6407 /* set function: status of class  cairo_path_t */
6408 #ifndef TOLUA_DISABLE_tolua_set_cairo_path_t_status
6409 static int tolua_set_cairo_path_t_status(lua_State* tolua_S)
6410 {
6411   cairo_path_t* self = (cairo_path_t*)  tolua_tousertype(tolua_S,1,0);
6412 #ifndef TOLUA_RELEASE
6413   tolua_Error tolua_err;
6414   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'status'",NULL);
6415   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
6416    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
6417 #endif
6418   self->status = ((cairo_status_t) (int)  tolua_tonumber(tolua_S,2,0))
6419 ;
6420  return 0;
6421 }
6422 #endif //#ifndef TOLUA_DISABLE
6423
6424 /* get function: data of class  cairo_path_t */
6425 #ifndef TOLUA_DISABLE_tolua_get_cairo_path_t_data_ptr
6426 static int tolua_get_cairo_path_t_data_ptr(lua_State* tolua_S)
6427 {
6428   cairo_path_t* self = (cairo_path_t*)  tolua_tousertype(tolua_S,1,0);
6429 #ifndef TOLUA_RELEASE
6430   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'data'",NULL);
6431 #endif
6432    tolua_pushusertype(tolua_S,(void*)self->data,"_cairo_path_data_t");
6433  return 1;
6434 }
6435 #endif //#ifndef TOLUA_DISABLE
6436
6437 /* set function: data of class  cairo_path_t */
6438 #ifndef TOLUA_DISABLE_tolua_set_cairo_path_t_data_ptr
6439 static int tolua_set_cairo_path_t_data_ptr(lua_State* tolua_S)
6440 {
6441   cairo_path_t* self = (cairo_path_t*)  tolua_tousertype(tolua_S,1,0);
6442 #ifndef TOLUA_RELEASE
6443   tolua_Error tolua_err;
6444   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'data'",NULL);
6445   if (!tolua_isusertype(tolua_S,2,"_cairo_path_data_t",0,&tolua_err))
6446    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
6447 #endif
6448   self->data = (( union _cairo_path_data_t*)  tolua_tousertype(tolua_S,2,0))
6449 ;
6450  return 0;
6451 }
6452 #endif //#ifndef TOLUA_DISABLE
6453
6454 /* get function: num_data of class  cairo_path_t */
6455 #ifndef TOLUA_DISABLE_tolua_get_cairo_path_t_num_data
6456 static int tolua_get_cairo_path_t_num_data(lua_State* tolua_S)
6457 {
6458   cairo_path_t* self = (cairo_path_t*)  tolua_tousertype(tolua_S,1,0);
6459 #ifndef TOLUA_RELEASE
6460   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'num_data'",NULL);
6461 #endif
6462   tolua_pushnumber(tolua_S,(lua_Number)self->num_data);
6463  return 1;
6464 }
6465 #endif //#ifndef TOLUA_DISABLE
6466
6467 /* set function: num_data of class  cairo_path_t */
6468 #ifndef TOLUA_DISABLE_tolua_set_cairo_path_t_num_data
6469 static int tolua_set_cairo_path_t_num_data(lua_State* tolua_S)
6470 {
6471   cairo_path_t* self = (cairo_path_t*)  tolua_tousertype(tolua_S,1,0);
6472 #ifndef TOLUA_RELEASE
6473   tolua_Error tolua_err;
6474   if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'num_data'",NULL);
6475   if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
6476    tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
6477 #endif
6478   self->num_data = ((int)  tolua_tonumber(tolua_S,2,0))
6479 ;
6480  return 0;
6481 }
6482 #endif //#ifndef TOLUA_DISABLE
6483
6484 /* function: cairo_copy_path */
6485 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_copy_path00
6486 static int tolua_cairo_cairo_copy_path00(lua_State* tolua_S)
6487 {
6488 #ifndef TOLUA_RELEASE
6489  tolua_Error tolua_err;
6490  if (
6491      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6492      !tolua_isnoobj(tolua_S,2,&tolua_err)
6493  )
6494   goto tolua_lerror;
6495  else
6496 #endif
6497  {
6498   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6499   {
6500    cairo_path_t* tolua_ret = (cairo_path_t*)  cairo_copy_path(cr);
6501     tolua_pushusertype(tolua_S,(void*)tolua_ret,"cairo_path_t");
6502   }
6503  }
6504  return 1;
6505 #ifndef TOLUA_RELEASE
6506  tolua_lerror:
6507  tolua_error(tolua_S,"#ferror in function 'cairo_copy_path'.",&tolua_err);
6508  return 0;
6509 #endif
6510 }
6511 #endif //#ifndef TOLUA_DISABLE
6512
6513 /* function: cairo_copy_path_flat */
6514 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_copy_path_flat00
6515 static int tolua_cairo_cairo_copy_path_flat00(lua_State* tolua_S)
6516 {
6517 #ifndef TOLUA_RELEASE
6518  tolua_Error tolua_err;
6519  if (
6520      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6521      !tolua_isnoobj(tolua_S,2,&tolua_err)
6522  )
6523   goto tolua_lerror;
6524  else
6525 #endif
6526  {
6527   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6528   {
6529    cairo_path_t* tolua_ret = (cairo_path_t*)  cairo_copy_path_flat(cr);
6530     tolua_pushusertype(tolua_S,(void*)tolua_ret,"cairo_path_t");
6531   }
6532  }
6533  return 1;
6534 #ifndef TOLUA_RELEASE
6535  tolua_lerror:
6536  tolua_error(tolua_S,"#ferror in function 'cairo_copy_path_flat'.",&tolua_err);
6537  return 0;
6538 #endif
6539 }
6540 #endif //#ifndef TOLUA_DISABLE
6541
6542 /* function: cairo_append_path */
6543 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_append_path00
6544 static int tolua_cairo_cairo_append_path00(lua_State* tolua_S)
6545 {
6546 #ifndef TOLUA_RELEASE
6547  tolua_Error tolua_err;
6548  if (
6549      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6550      !tolua_isusertype(tolua_S,2,"const cairo_path_t",0,&tolua_err) ||
6551      !tolua_isnoobj(tolua_S,3,&tolua_err)
6552  )
6553   goto tolua_lerror;
6554  else
6555 #endif
6556  {
6557   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6558   const cairo_path_t* path = ((const cairo_path_t*)  tolua_tousertype(tolua_S,2,0));
6559   {
6560    cairo_append_path(cr,path);
6561   }
6562  }
6563  return 0;
6564 #ifndef TOLUA_RELEASE
6565  tolua_lerror:
6566  tolua_error(tolua_S,"#ferror in function 'cairo_append_path'.",&tolua_err);
6567  return 0;
6568 #endif
6569 }
6570 #endif //#ifndef TOLUA_DISABLE
6571
6572 /* function: cairo_path_destroy */
6573 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_path_destroy00
6574 static int tolua_cairo_cairo_path_destroy00(lua_State* tolua_S)
6575 {
6576 #ifndef TOLUA_RELEASE
6577  tolua_Error tolua_err;
6578  if (
6579      !tolua_isusertype(tolua_S,1,"cairo_path_t",0,&tolua_err) ||
6580      !tolua_isnoobj(tolua_S,2,&tolua_err)
6581  )
6582   goto tolua_lerror;
6583  else
6584 #endif
6585  {
6586   cairo_path_t* path = ((cairo_path_t*)  tolua_tousertype(tolua_S,1,0));
6587   {
6588    cairo_path_destroy(path);
6589   }
6590  }
6591  return 0;
6592 #ifndef TOLUA_RELEASE
6593  tolua_lerror:
6594  tolua_error(tolua_S,"#ferror in function 'cairo_path_destroy'.",&tolua_err);
6595  return 0;
6596 #endif
6597 }
6598 #endif //#ifndef TOLUA_DISABLE
6599
6600 /* function: cairo_status */
6601 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_status00
6602 static int tolua_cairo_cairo_status00(lua_State* tolua_S)
6603 {
6604 #ifndef TOLUA_RELEASE
6605  tolua_Error tolua_err;
6606  if (
6607      !tolua_isusertype(tolua_S,1,"_cairo",0,&tolua_err) ||
6608      !tolua_isnoobj(tolua_S,2,&tolua_err)
6609  )
6610   goto tolua_lerror;
6611  else
6612 #endif
6613  {
6614   struct _cairo* cr = (( struct _cairo*)  tolua_tousertype(tolua_S,1,0));
6615   {
6616    cairo_status_t tolua_ret = (cairo_status_t)  cairo_status(cr);
6617    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6618   }
6619  }
6620  return 1;
6621 #ifndef TOLUA_RELEASE
6622  tolua_lerror:
6623  tolua_error(tolua_S,"#ferror in function 'cairo_status'.",&tolua_err);
6624  return 0;
6625 #endif
6626 }
6627 #endif //#ifndef TOLUA_DISABLE
6628
6629 /* function: cairo_status_to_string */
6630 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_status_to_string00
6631 static int tolua_cairo_cairo_status_to_string00(lua_State* tolua_S)
6632 {
6633 #ifndef TOLUA_RELEASE
6634  tolua_Error tolua_err;
6635  if (
6636      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
6637      !tolua_isnoobj(tolua_S,2,&tolua_err)
6638  )
6639   goto tolua_lerror;
6640  else
6641 #endif
6642  {
6643   cairo_status_t status = ((cairo_status_t) (int)  tolua_tonumber(tolua_S,1,0));
6644   {
6645    const char* tolua_ret = (const char*)  cairo_status_to_string(status);
6646    tolua_pushstring(tolua_S,(const char*)tolua_ret);
6647   }
6648  }
6649  return 1;
6650 #ifndef TOLUA_RELEASE
6651  tolua_lerror:
6652  tolua_error(tolua_S,"#ferror in function 'cairo_status_to_string'.",&tolua_err);
6653  return 0;
6654 #endif
6655 }
6656 #endif //#ifndef TOLUA_DISABLE
6657
6658 /* function: cairo_surface_create_similar */
6659 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_create_similar00
6660 static int tolua_cairo_cairo_surface_create_similar00(lua_State* tolua_S)
6661 {
6662 #ifndef TOLUA_RELEASE
6663  tolua_Error tolua_err;
6664  if (
6665      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
6666      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
6667      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
6668      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
6669      !tolua_isnoobj(tolua_S,5,&tolua_err)
6670  )
6671   goto tolua_lerror;
6672  else
6673 #endif
6674  {
6675   struct _cairo_surface* other = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
6676   cairo_content_t content = ((cairo_content_t) (int)  tolua_tonumber(tolua_S,2,0));
6677   int width = ((int)  tolua_tonumber(tolua_S,3,0));
6678   int height = ((int)  tolua_tonumber(tolua_S,4,0));
6679   {
6680    struct _cairo_surface* tolua_ret = ( struct _cairo_surface*)  cairo_surface_create_similar(other,content,width,height);
6681     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_surface");
6682   }
6683  }
6684  return 1;
6685 #ifndef TOLUA_RELEASE
6686  tolua_lerror:
6687  tolua_error(tolua_S,"#ferror in function 'cairo_surface_create_similar'.",&tolua_err);
6688  return 0;
6689 #endif
6690 }
6691 #endif //#ifndef TOLUA_DISABLE
6692
6693 /* function: cairo_surface_reference */
6694 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_reference00
6695 static int tolua_cairo_cairo_surface_reference00(lua_State* tolua_S)
6696 {
6697 #ifndef TOLUA_RELEASE
6698  tolua_Error tolua_err;
6699  if (
6700      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
6701      !tolua_isnoobj(tolua_S,2,&tolua_err)
6702  )
6703   goto tolua_lerror;
6704  else
6705 #endif
6706  {
6707   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
6708   {
6709    struct _cairo_surface* tolua_ret = ( struct _cairo_surface*)  cairo_surface_reference(surface);
6710     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_surface");
6711   }
6712  }
6713  return 1;
6714 #ifndef TOLUA_RELEASE
6715  tolua_lerror:
6716  tolua_error(tolua_S,"#ferror in function 'cairo_surface_reference'.",&tolua_err);
6717  return 0;
6718 #endif
6719 }
6720 #endif //#ifndef TOLUA_DISABLE
6721
6722 /* function: cairo_surface_finish */
6723 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_finish00
6724 static int tolua_cairo_cairo_surface_finish00(lua_State* tolua_S)
6725 {
6726 #ifndef TOLUA_RELEASE
6727  tolua_Error tolua_err;
6728  if (
6729      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
6730      !tolua_isnoobj(tolua_S,2,&tolua_err)
6731  )
6732   goto tolua_lerror;
6733  else
6734 #endif
6735  {
6736   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
6737   {
6738    cairo_surface_finish(surface);
6739   }
6740  }
6741  return 0;
6742 #ifndef TOLUA_RELEASE
6743  tolua_lerror:
6744  tolua_error(tolua_S,"#ferror in function 'cairo_surface_finish'.",&tolua_err);
6745  return 0;
6746 #endif
6747 }
6748 #endif //#ifndef TOLUA_DISABLE
6749
6750 /* function: cairo_surface_destroy */
6751 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_destroy00
6752 static int tolua_cairo_cairo_surface_destroy00(lua_State* tolua_S)
6753 {
6754 #ifndef TOLUA_RELEASE
6755  tolua_Error tolua_err;
6756  if (
6757      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
6758      !tolua_isnoobj(tolua_S,2,&tolua_err)
6759  )
6760   goto tolua_lerror;
6761  else
6762 #endif
6763  {
6764   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
6765   {
6766    cairo_surface_destroy(surface);
6767   }
6768  }
6769  return 0;
6770 #ifndef TOLUA_RELEASE
6771  tolua_lerror:
6772  tolua_error(tolua_S,"#ferror in function 'cairo_surface_destroy'.",&tolua_err);
6773  return 0;
6774 #endif
6775 }
6776 #endif //#ifndef TOLUA_DISABLE
6777
6778 /* function: cairo_surface_get_reference_count */
6779 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_get_reference_count00
6780 static int tolua_cairo_cairo_surface_get_reference_count00(lua_State* tolua_S)
6781 {
6782 #ifndef TOLUA_RELEASE
6783  tolua_Error tolua_err;
6784  if (
6785      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
6786      !tolua_isnoobj(tolua_S,2,&tolua_err)
6787  )
6788   goto tolua_lerror;
6789  else
6790 #endif
6791  {
6792   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
6793   {
6794    unsigned int tolua_ret = (unsigned int)  cairo_surface_get_reference_count(surface);
6795    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6796   }
6797  }
6798  return 1;
6799 #ifndef TOLUA_RELEASE
6800  tolua_lerror:
6801  tolua_error(tolua_S,"#ferror in function 'cairo_surface_get_reference_count'.",&tolua_err);
6802  return 0;
6803 #endif
6804 }
6805 #endif //#ifndef TOLUA_DISABLE
6806
6807 /* function: cairo_surface_status */
6808 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_status00
6809 static int tolua_cairo_cairo_surface_status00(lua_State* tolua_S)
6810 {
6811 #ifndef TOLUA_RELEASE
6812  tolua_Error tolua_err;
6813  if (
6814      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
6815      !tolua_isnoobj(tolua_S,2,&tolua_err)
6816  )
6817   goto tolua_lerror;
6818  else
6819 #endif
6820  {
6821   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
6822   {
6823    cairo_status_t tolua_ret = (cairo_status_t)  cairo_surface_status(surface);
6824    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6825   }
6826  }
6827  return 1;
6828 #ifndef TOLUA_RELEASE
6829  tolua_lerror:
6830  tolua_error(tolua_S,"#ferror in function 'cairo_surface_status'.",&tolua_err);
6831  return 0;
6832 #endif
6833 }
6834 #endif //#ifndef TOLUA_DISABLE
6835
6836 /* function: cairo_surface_get_type */
6837 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_get_type00
6838 static int tolua_cairo_cairo_surface_get_type00(lua_State* tolua_S)
6839 {
6840 #ifndef TOLUA_RELEASE
6841  tolua_Error tolua_err;
6842  if (
6843      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
6844      !tolua_isnoobj(tolua_S,2,&tolua_err)
6845  )
6846   goto tolua_lerror;
6847  else
6848 #endif
6849  {
6850   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
6851   {
6852    cairo_surface_type_t tolua_ret = (cairo_surface_type_t)  cairo_surface_get_type(surface);
6853    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6854   }
6855  }
6856  return 1;
6857 #ifndef TOLUA_RELEASE
6858  tolua_lerror:
6859  tolua_error(tolua_S,"#ferror in function 'cairo_surface_get_type'.",&tolua_err);
6860  return 0;
6861 #endif
6862 }
6863 #endif //#ifndef TOLUA_DISABLE
6864
6865 /* function: cairo_surface_get_content */
6866 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_get_content00
6867 static int tolua_cairo_cairo_surface_get_content00(lua_State* tolua_S)
6868 {
6869 #ifndef TOLUA_RELEASE
6870  tolua_Error tolua_err;
6871  if (
6872      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
6873      !tolua_isnoobj(tolua_S,2,&tolua_err)
6874  )
6875   goto tolua_lerror;
6876  else
6877 #endif
6878  {
6879   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
6880   {
6881    cairo_content_t tolua_ret = (cairo_content_t)  cairo_surface_get_content(surface);
6882    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6883   }
6884  }
6885  return 1;
6886 #ifndef TOLUA_RELEASE
6887  tolua_lerror:
6888  tolua_error(tolua_S,"#ferror in function 'cairo_surface_get_content'.",&tolua_err);
6889  return 0;
6890 #endif
6891 }
6892 #endif //#ifndef TOLUA_DISABLE
6893
6894 /* function: cairo_surface_write_to_png */
6895 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_write_to_png00
6896 static int tolua_cairo_cairo_surface_write_to_png00(lua_State* tolua_S)
6897 {
6898 #ifndef TOLUA_RELEASE
6899  tolua_Error tolua_err;
6900  if (
6901      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
6902      !tolua_isstring(tolua_S,2,0,&tolua_err) ||
6903      !tolua_isnoobj(tolua_S,3,&tolua_err)
6904  )
6905   goto tolua_lerror;
6906  else
6907 #endif
6908  {
6909   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
6910   const char* filename = ((const char*)  tolua_tostring(tolua_S,2,0));
6911   {
6912    cairo_status_t tolua_ret = (cairo_status_t)  cairo_surface_write_to_png(surface,filename);
6913    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6914   }
6915  }
6916  return 1;
6917 #ifndef TOLUA_RELEASE
6918  tolua_lerror:
6919  tolua_error(tolua_S,"#ferror in function 'cairo_surface_write_to_png'.",&tolua_err);
6920  return 0;
6921 #endif
6922 }
6923 #endif //#ifndef TOLUA_DISABLE
6924
6925 /* function: cairo_surface_write_to_png_stream */
6926 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_write_to_png_stream00
6927 static int tolua_cairo_cairo_surface_write_to_png_stream00(lua_State* tolua_S)
6928 {
6929 #ifndef TOLUA_RELEASE
6930  tolua_Error tolua_err;
6931  if (
6932      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
6933      (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"cairo_write_func_t",0,&tolua_err)) ||
6934      !tolua_isuserdata(tolua_S,3,0,&tolua_err) ||
6935      !tolua_isnoobj(tolua_S,4,&tolua_err)
6936  )
6937   goto tolua_lerror;
6938  else
6939 #endif
6940  {
6941   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
6942   cairo_write_func_t write_func = *((cairo_write_func_t*)  tolua_tousertype(tolua_S,2,0));
6943   void* closure = ((void*)  tolua_touserdata(tolua_S,3,0));
6944   {
6945    cairo_status_t tolua_ret = (cairo_status_t)  cairo_surface_write_to_png_stream(surface,write_func,closure);
6946    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
6947   }
6948  }
6949  return 1;
6950 #ifndef TOLUA_RELEASE
6951  tolua_lerror:
6952  tolua_error(tolua_S,"#ferror in function 'cairo_surface_write_to_png_stream'.",&tolua_err);
6953  return 0;
6954 #endif
6955 }
6956 #endif //#ifndef TOLUA_DISABLE
6957
6958 /* function: cairo_surface_get_user_data */
6959 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_get_user_data00
6960 static int tolua_cairo_cairo_surface_get_user_data00(lua_State* tolua_S)
6961 {
6962 #ifndef TOLUA_RELEASE
6963  tolua_Error tolua_err;
6964  if (
6965      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
6966      !tolua_isusertype(tolua_S,2,"const cairo_user_data_key_t",0,&tolua_err) ||
6967      !tolua_isnoobj(tolua_S,3,&tolua_err)
6968  )
6969   goto tolua_lerror;
6970  else
6971 #endif
6972  {
6973   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
6974   const cairo_user_data_key_t* key = ((const cairo_user_data_key_t*)  tolua_tousertype(tolua_S,2,0));
6975   {
6976    void* tolua_ret = (void*)  cairo_surface_get_user_data(surface,key);
6977    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
6978   }
6979  }
6980  return 1;
6981 #ifndef TOLUA_RELEASE
6982  tolua_lerror:
6983  tolua_error(tolua_S,"#ferror in function 'cairo_surface_get_user_data'.",&tolua_err);
6984  return 0;
6985 #endif
6986 }
6987 #endif //#ifndef TOLUA_DISABLE
6988
6989 /* function: cairo_surface_set_user_data */
6990 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_set_user_data00
6991 static int tolua_cairo_cairo_surface_set_user_data00(lua_State* tolua_S)
6992 {
6993 #ifndef TOLUA_RELEASE
6994  tolua_Error tolua_err;
6995  if (
6996      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
6997      !tolua_isusertype(tolua_S,2,"const cairo_user_data_key_t",0,&tolua_err) ||
6998      !tolua_isuserdata(tolua_S,3,0,&tolua_err) ||
6999      (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"cairo_destroy_func_t",0,&tolua_err)) ||
7000      !tolua_isnoobj(tolua_S,5,&tolua_err)
7001  )
7002   goto tolua_lerror;
7003  else
7004 #endif
7005  {
7006   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7007   const cairo_user_data_key_t* key = ((const cairo_user_data_key_t*)  tolua_tousertype(tolua_S,2,0));
7008   void* user_data = ((void*)  tolua_touserdata(tolua_S,3,0));
7009   cairo_destroy_func_t destroy = *((cairo_destroy_func_t*)  tolua_tousertype(tolua_S,4,0));
7010   {
7011    cairo_status_t tolua_ret = (cairo_status_t)  cairo_surface_set_user_data(surface,key,user_data,destroy);
7012    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
7013   }
7014  }
7015  return 1;
7016 #ifndef TOLUA_RELEASE
7017  tolua_lerror:
7018  tolua_error(tolua_S,"#ferror in function 'cairo_surface_set_user_data'.",&tolua_err);
7019  return 0;
7020 #endif
7021 }
7022 #endif //#ifndef TOLUA_DISABLE
7023
7024 /* function: cairo_surface_get_font_options */
7025 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_get_font_options00
7026 static int tolua_cairo_cairo_surface_get_font_options00(lua_State* tolua_S)
7027 {
7028 #ifndef TOLUA_RELEASE
7029  tolua_Error tolua_err;
7030  if (
7031      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7032      !tolua_isusertype(tolua_S,2,"_cairo_font_options",0,&tolua_err) ||
7033      !tolua_isnoobj(tolua_S,3,&tolua_err)
7034  )
7035   goto tolua_lerror;
7036  else
7037 #endif
7038  {
7039   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7040   struct _cairo_font_options* options = (( struct _cairo_font_options*)  tolua_tousertype(tolua_S,2,0));
7041   {
7042    cairo_surface_get_font_options(surface,options);
7043   }
7044  }
7045  return 0;
7046 #ifndef TOLUA_RELEASE
7047  tolua_lerror:
7048  tolua_error(tolua_S,"#ferror in function 'cairo_surface_get_font_options'.",&tolua_err);
7049  return 0;
7050 #endif
7051 }
7052 #endif //#ifndef TOLUA_DISABLE
7053
7054 /* function: cairo_surface_flush */
7055 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_flush00
7056 static int tolua_cairo_cairo_surface_flush00(lua_State* tolua_S)
7057 {
7058 #ifndef TOLUA_RELEASE
7059  tolua_Error tolua_err;
7060  if (
7061      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7062      !tolua_isnoobj(tolua_S,2,&tolua_err)
7063  )
7064   goto tolua_lerror;
7065  else
7066 #endif
7067  {
7068   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7069   {
7070    cairo_surface_flush(surface);
7071   }
7072  }
7073  return 0;
7074 #ifndef TOLUA_RELEASE
7075  tolua_lerror:
7076  tolua_error(tolua_S,"#ferror in function 'cairo_surface_flush'.",&tolua_err);
7077  return 0;
7078 #endif
7079 }
7080 #endif //#ifndef TOLUA_DISABLE
7081
7082 /* function: cairo_surface_mark_dirty */
7083 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_mark_dirty00
7084 static int tolua_cairo_cairo_surface_mark_dirty00(lua_State* tolua_S)
7085 {
7086 #ifndef TOLUA_RELEASE
7087  tolua_Error tolua_err;
7088  if (
7089      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7090      !tolua_isnoobj(tolua_S,2,&tolua_err)
7091  )
7092   goto tolua_lerror;
7093  else
7094 #endif
7095  {
7096   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7097   {
7098    cairo_surface_mark_dirty(surface);
7099   }
7100  }
7101  return 0;
7102 #ifndef TOLUA_RELEASE
7103  tolua_lerror:
7104  tolua_error(tolua_S,"#ferror in function 'cairo_surface_mark_dirty'.",&tolua_err);
7105  return 0;
7106 #endif
7107 }
7108 #endif //#ifndef TOLUA_DISABLE
7109
7110 /* function: cairo_surface_mark_dirty_rectangle */
7111 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_mark_dirty_rectangle00
7112 static int tolua_cairo_cairo_surface_mark_dirty_rectangle00(lua_State* tolua_S)
7113 {
7114 #ifndef TOLUA_RELEASE
7115  tolua_Error tolua_err;
7116  if (
7117      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7118      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
7119      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
7120      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
7121      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
7122      !tolua_isnoobj(tolua_S,6,&tolua_err)
7123  )
7124   goto tolua_lerror;
7125  else
7126 #endif
7127  {
7128   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7129   int x = ((int)  tolua_tonumber(tolua_S,2,0));
7130   int y = ((int)  tolua_tonumber(tolua_S,3,0));
7131   int width = ((int)  tolua_tonumber(tolua_S,4,0));
7132   int height = ((int)  tolua_tonumber(tolua_S,5,0));
7133   {
7134    cairo_surface_mark_dirty_rectangle(surface,x,y,width,height);
7135   }
7136  }
7137  return 0;
7138 #ifndef TOLUA_RELEASE
7139  tolua_lerror:
7140  tolua_error(tolua_S,"#ferror in function 'cairo_surface_mark_dirty_rectangle'.",&tolua_err);
7141  return 0;
7142 #endif
7143 }
7144 #endif //#ifndef TOLUA_DISABLE
7145
7146 /* function: cairo_surface_set_device_offset */
7147 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_set_device_offset00
7148 static int tolua_cairo_cairo_surface_set_device_offset00(lua_State* tolua_S)
7149 {
7150 #ifndef TOLUA_RELEASE
7151  tolua_Error tolua_err;
7152  if (
7153      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7154      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
7155      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
7156      !tolua_isnoobj(tolua_S,4,&tolua_err)
7157  )
7158   goto tolua_lerror;
7159  else
7160 #endif
7161  {
7162   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7163   double x_offset = ((double)  tolua_tonumber(tolua_S,2,0));
7164   double y_offset = ((double)  tolua_tonumber(tolua_S,3,0));
7165   {
7166    cairo_surface_set_device_offset(surface,x_offset,y_offset);
7167   }
7168  }
7169  return 0;
7170 #ifndef TOLUA_RELEASE
7171  tolua_lerror:
7172  tolua_error(tolua_S,"#ferror in function 'cairo_surface_set_device_offset'.",&tolua_err);
7173  return 0;
7174 #endif
7175 }
7176 #endif //#ifndef TOLUA_DISABLE
7177
7178 /* function: cairo_surface_get_device_offset */
7179 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_get_device_offset00
7180 static int tolua_cairo_cairo_surface_get_device_offset00(lua_State* tolua_S)
7181 {
7182 #ifndef TOLUA_RELEASE
7183  tolua_Error tolua_err;
7184  if (
7185      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7186      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
7187      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
7188      !tolua_isnoobj(tolua_S,4,&tolua_err)
7189  )
7190   goto tolua_lerror;
7191  else
7192 #endif
7193  {
7194   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7195   double x_offset = ((double)  tolua_tonumber(tolua_S,2,0));
7196   double y_offset = ((double)  tolua_tonumber(tolua_S,3,0));
7197   {
7198    cairo_surface_get_device_offset(surface,&x_offset,&y_offset);
7199    tolua_pushnumber(tolua_S,(lua_Number)x_offset);
7200    tolua_pushnumber(tolua_S,(lua_Number)y_offset);
7201   }
7202  }
7203  return 2;
7204 #ifndef TOLUA_RELEASE
7205  tolua_lerror:
7206  tolua_error(tolua_S,"#ferror in function 'cairo_surface_get_device_offset'.",&tolua_err);
7207  return 0;
7208 #endif
7209 }
7210 #endif //#ifndef TOLUA_DISABLE
7211
7212 /* function: cairo_surface_set_fallback_resolution */
7213 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_set_fallback_resolution00
7214 static int tolua_cairo_cairo_surface_set_fallback_resolution00(lua_State* tolua_S)
7215 {
7216 #ifndef TOLUA_RELEASE
7217  tolua_Error tolua_err;
7218  if (
7219      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7220      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
7221      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
7222      !tolua_isnoobj(tolua_S,4,&tolua_err)
7223  )
7224   goto tolua_lerror;
7225  else
7226 #endif
7227  {
7228   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7229   double x_pixels_per_inch = ((double)  tolua_tonumber(tolua_S,2,0));
7230   double y_pixels_per_inch = ((double)  tolua_tonumber(tolua_S,3,0));
7231   {
7232    cairo_surface_set_fallback_resolution(surface,x_pixels_per_inch,y_pixels_per_inch);
7233   }
7234  }
7235  return 0;
7236 #ifndef TOLUA_RELEASE
7237  tolua_lerror:
7238  tolua_error(tolua_S,"#ferror in function 'cairo_surface_set_fallback_resolution'.",&tolua_err);
7239  return 0;
7240 #endif
7241 }
7242 #endif //#ifndef TOLUA_DISABLE
7243
7244 /* function: cairo_surface_get_fallback_resolution */
7245 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_get_fallback_resolution00
7246 static int tolua_cairo_cairo_surface_get_fallback_resolution00(lua_State* tolua_S)
7247 {
7248 #ifndef TOLUA_RELEASE
7249  tolua_Error tolua_err;
7250  if (
7251      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7252      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
7253      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
7254      !tolua_isnoobj(tolua_S,4,&tolua_err)
7255  )
7256   goto tolua_lerror;
7257  else
7258 #endif
7259  {
7260   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7261   double x_pixels_per_inch = ((double)  tolua_tonumber(tolua_S,2,0));
7262   double y_pixels_per_inch = ((double)  tolua_tonumber(tolua_S,3,0));
7263   {
7264    cairo_surface_get_fallback_resolution(surface,&x_pixels_per_inch,&y_pixels_per_inch);
7265    tolua_pushnumber(tolua_S,(lua_Number)x_pixels_per_inch);
7266    tolua_pushnumber(tolua_S,(lua_Number)y_pixels_per_inch);
7267   }
7268  }
7269  return 2;
7270 #ifndef TOLUA_RELEASE
7271  tolua_lerror:
7272  tolua_error(tolua_S,"#ferror in function 'cairo_surface_get_fallback_resolution'.",&tolua_err);
7273  return 0;
7274 #endif
7275 }
7276 #endif //#ifndef TOLUA_DISABLE
7277
7278 /* function: cairo_surface_copy_page */
7279 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_copy_page00
7280 static int tolua_cairo_cairo_surface_copy_page00(lua_State* tolua_S)
7281 {
7282 #ifndef TOLUA_RELEASE
7283  tolua_Error tolua_err;
7284  if (
7285      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7286      !tolua_isnoobj(tolua_S,2,&tolua_err)
7287  )
7288   goto tolua_lerror;
7289  else
7290 #endif
7291  {
7292   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7293   {
7294    cairo_surface_copy_page(surface);
7295   }
7296  }
7297  return 0;
7298 #ifndef TOLUA_RELEASE
7299  tolua_lerror:
7300  tolua_error(tolua_S,"#ferror in function 'cairo_surface_copy_page'.",&tolua_err);
7301  return 0;
7302 #endif
7303 }
7304 #endif //#ifndef TOLUA_DISABLE
7305
7306 /* function: cairo_surface_show_page */
7307 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_show_page00
7308 static int tolua_cairo_cairo_surface_show_page00(lua_State* tolua_S)
7309 {
7310 #ifndef TOLUA_RELEASE
7311  tolua_Error tolua_err;
7312  if (
7313      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7314      !tolua_isnoobj(tolua_S,2,&tolua_err)
7315  )
7316   goto tolua_lerror;
7317  else
7318 #endif
7319  {
7320   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7321   {
7322    cairo_surface_show_page(surface);
7323   }
7324  }
7325  return 0;
7326 #ifndef TOLUA_RELEASE
7327  tolua_lerror:
7328  tolua_error(tolua_S,"#ferror in function 'cairo_surface_show_page'.",&tolua_err);
7329  return 0;
7330 #endif
7331 }
7332 #endif //#ifndef TOLUA_DISABLE
7333
7334 /* function: cairo_surface_has_show_text_glyphs */
7335 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_surface_has_show_text_glyphs00
7336 static int tolua_cairo_cairo_surface_has_show_text_glyphs00(lua_State* tolua_S)
7337 {
7338 #ifndef TOLUA_RELEASE
7339  tolua_Error tolua_err;
7340  if (
7341      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7342      !tolua_isnoobj(tolua_S,2,&tolua_err)
7343  )
7344   goto tolua_lerror;
7345  else
7346 #endif
7347  {
7348   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7349   {
7350     int tolua_ret = (  int)  cairo_surface_has_show_text_glyphs(surface);
7351    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
7352   }
7353  }
7354  return 1;
7355 #ifndef TOLUA_RELEASE
7356  tolua_lerror:
7357  tolua_error(tolua_S,"#ferror in function 'cairo_surface_has_show_text_glyphs'.",&tolua_err);
7358  return 0;
7359 #endif
7360 }
7361 #endif //#ifndef TOLUA_DISABLE
7362
7363 /* function: cairo_image_surface_create */
7364 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_image_surface_create00
7365 static int tolua_cairo_cairo_image_surface_create00(lua_State* tolua_S)
7366 {
7367 #ifndef TOLUA_RELEASE
7368  tolua_Error tolua_err;
7369  if (
7370      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
7371      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
7372      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
7373      !tolua_isnoobj(tolua_S,4,&tolua_err)
7374  )
7375   goto tolua_lerror;
7376  else
7377 #endif
7378  {
7379   cairo_format_t format = ((cairo_format_t) (int)  tolua_tonumber(tolua_S,1,0));
7380   int width = ((int)  tolua_tonumber(tolua_S,2,0));
7381   int height = ((int)  tolua_tonumber(tolua_S,3,0));
7382   {
7383    struct _cairo_surface* tolua_ret = ( struct _cairo_surface*)  cairo_image_surface_create(format,width,height);
7384     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_surface");
7385   }
7386  }
7387  return 1;
7388 #ifndef TOLUA_RELEASE
7389  tolua_lerror:
7390  tolua_error(tolua_S,"#ferror in function 'cairo_image_surface_create'.",&tolua_err);
7391  return 0;
7392 #endif
7393 }
7394 #endif //#ifndef TOLUA_DISABLE
7395
7396 /* function: cairo_format_stride_for_width */
7397 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_format_stride_for_width00
7398 static int tolua_cairo_cairo_format_stride_for_width00(lua_State* tolua_S)
7399 {
7400 #ifndef TOLUA_RELEASE
7401  tolua_Error tolua_err;
7402  if (
7403      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
7404      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
7405      !tolua_isnoobj(tolua_S,3,&tolua_err)
7406  )
7407   goto tolua_lerror;
7408  else
7409 #endif
7410  {
7411   cairo_format_t format = ((cairo_format_t) (int)  tolua_tonumber(tolua_S,1,0));
7412   int width = ((int)  tolua_tonumber(tolua_S,2,0));
7413   {
7414    int tolua_ret = (int)  cairo_format_stride_for_width(format,width);
7415    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
7416   }
7417  }
7418  return 1;
7419 #ifndef TOLUA_RELEASE
7420  tolua_lerror:
7421  tolua_error(tolua_S,"#ferror in function 'cairo_format_stride_for_width'.",&tolua_err);
7422  return 0;
7423 #endif
7424 }
7425 #endif //#ifndef TOLUA_DISABLE
7426
7427 /* function: cairo_image_surface_create_for_data */
7428 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_image_surface_create_for_data00
7429 static int tolua_cairo_cairo_image_surface_create_for_data00(lua_State* tolua_S)
7430 {
7431 #ifndef TOLUA_RELEASE
7432  tolua_Error tolua_err;
7433  if (
7434      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
7435      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
7436      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
7437      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
7438      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
7439      !tolua_isnoobj(tolua_S,6,&tolua_err)
7440  )
7441   goto tolua_lerror;
7442  else
7443 #endif
7444  {
7445   unsigned char* data = ((unsigned char*)  tolua_tostring(tolua_S,1,0));
7446   cairo_format_t format = ((cairo_format_t) (int)  tolua_tonumber(tolua_S,2,0));
7447   int width = ((int)  tolua_tonumber(tolua_S,3,0));
7448   int height = ((int)  tolua_tonumber(tolua_S,4,0));
7449   int stride = ((int)  tolua_tonumber(tolua_S,5,0));
7450   {
7451    struct _cairo_surface* tolua_ret = ( struct _cairo_surface*)  cairo_image_surface_create_for_data(data,format,width,height,stride);
7452     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_surface");
7453   }
7454  }
7455  return 1;
7456 #ifndef TOLUA_RELEASE
7457  tolua_lerror:
7458  tolua_error(tolua_S,"#ferror in function 'cairo_image_surface_create_for_data'.",&tolua_err);
7459  return 0;
7460 #endif
7461 }
7462 #endif //#ifndef TOLUA_DISABLE
7463
7464 /* function: cairo_image_surface_get_data */
7465 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_image_surface_get_data00
7466 static int tolua_cairo_cairo_image_surface_get_data00(lua_State* tolua_S)
7467 {
7468 #ifndef TOLUA_RELEASE
7469  tolua_Error tolua_err;
7470  if (
7471      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7472      !tolua_isnoobj(tolua_S,2,&tolua_err)
7473  )
7474   goto tolua_lerror;
7475  else
7476 #endif
7477  {
7478   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7479   {
7480    unsigned char* tolua_ret = (unsigned char*)  cairo_image_surface_get_data(surface);
7481    tolua_pushstring(tolua_S,(const char*)tolua_ret);
7482   }
7483  }
7484  return 1;
7485 #ifndef TOLUA_RELEASE
7486  tolua_lerror:
7487  tolua_error(tolua_S,"#ferror in function 'cairo_image_surface_get_data'.",&tolua_err);
7488  return 0;
7489 #endif
7490 }
7491 #endif //#ifndef TOLUA_DISABLE
7492
7493 /* function: cairo_image_surface_get_format */
7494 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_image_surface_get_format00
7495 static int tolua_cairo_cairo_image_surface_get_format00(lua_State* tolua_S)
7496 {
7497 #ifndef TOLUA_RELEASE
7498  tolua_Error tolua_err;
7499  if (
7500      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7501      !tolua_isnoobj(tolua_S,2,&tolua_err)
7502  )
7503   goto tolua_lerror;
7504  else
7505 #endif
7506  {
7507   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7508   {
7509    cairo_format_t tolua_ret = (cairo_format_t)  cairo_image_surface_get_format(surface);
7510    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
7511   }
7512  }
7513  return 1;
7514 #ifndef TOLUA_RELEASE
7515  tolua_lerror:
7516  tolua_error(tolua_S,"#ferror in function 'cairo_image_surface_get_format'.",&tolua_err);
7517  return 0;
7518 #endif
7519 }
7520 #endif //#ifndef TOLUA_DISABLE
7521
7522 /* function: cairo_image_surface_get_width */
7523 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_image_surface_get_width00
7524 static int tolua_cairo_cairo_image_surface_get_width00(lua_State* tolua_S)
7525 {
7526 #ifndef TOLUA_RELEASE
7527  tolua_Error tolua_err;
7528  if (
7529      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7530      !tolua_isnoobj(tolua_S,2,&tolua_err)
7531  )
7532   goto tolua_lerror;
7533  else
7534 #endif
7535  {
7536   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7537   {
7538    int tolua_ret = (int)  cairo_image_surface_get_width(surface);
7539    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
7540   }
7541  }
7542  return 1;
7543 #ifndef TOLUA_RELEASE
7544  tolua_lerror:
7545  tolua_error(tolua_S,"#ferror in function 'cairo_image_surface_get_width'.",&tolua_err);
7546  return 0;
7547 #endif
7548 }
7549 #endif //#ifndef TOLUA_DISABLE
7550
7551 /* function: cairo_image_surface_get_height */
7552 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_image_surface_get_height00
7553 static int tolua_cairo_cairo_image_surface_get_height00(lua_State* tolua_S)
7554 {
7555 #ifndef TOLUA_RELEASE
7556  tolua_Error tolua_err;
7557  if (
7558      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7559      !tolua_isnoobj(tolua_S,2,&tolua_err)
7560  )
7561   goto tolua_lerror;
7562  else
7563 #endif
7564  {
7565   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7566   {
7567    int tolua_ret = (int)  cairo_image_surface_get_height(surface);
7568    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
7569   }
7570  }
7571  return 1;
7572 #ifndef TOLUA_RELEASE
7573  tolua_lerror:
7574  tolua_error(tolua_S,"#ferror in function 'cairo_image_surface_get_height'.",&tolua_err);
7575  return 0;
7576 #endif
7577 }
7578 #endif //#ifndef TOLUA_DISABLE
7579
7580 /* function: cairo_image_surface_get_stride */
7581 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_image_surface_get_stride00
7582 static int tolua_cairo_cairo_image_surface_get_stride00(lua_State* tolua_S)
7583 {
7584 #ifndef TOLUA_RELEASE
7585  tolua_Error tolua_err;
7586  if (
7587      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7588      !tolua_isnoobj(tolua_S,2,&tolua_err)
7589  )
7590   goto tolua_lerror;
7591  else
7592 #endif
7593  {
7594   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7595   {
7596    int tolua_ret = (int)  cairo_image_surface_get_stride(surface);
7597    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
7598   }
7599  }
7600  return 1;
7601 #ifndef TOLUA_RELEASE
7602  tolua_lerror:
7603  tolua_error(tolua_S,"#ferror in function 'cairo_image_surface_get_stride'.",&tolua_err);
7604  return 0;
7605 #endif
7606 }
7607 #endif //#ifndef TOLUA_DISABLE
7608
7609 /* function: cairo_image_surface_create_from_png */
7610 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_image_surface_create_from_png00
7611 static int tolua_cairo_cairo_image_surface_create_from_png00(lua_State* tolua_S)
7612 {
7613 #ifndef TOLUA_RELEASE
7614  tolua_Error tolua_err;
7615  if (
7616      !tolua_isstring(tolua_S,1,0,&tolua_err) ||
7617      !tolua_isnoobj(tolua_S,2,&tolua_err)
7618  )
7619   goto tolua_lerror;
7620  else
7621 #endif
7622  {
7623   const char* filename = ((const char*)  tolua_tostring(tolua_S,1,0));
7624   {
7625    struct _cairo_surface* tolua_ret = ( struct _cairo_surface*)  cairo_image_surface_create_from_png(filename);
7626     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_surface");
7627   }
7628  }
7629  return 1;
7630 #ifndef TOLUA_RELEASE
7631  tolua_lerror:
7632  tolua_error(tolua_S,"#ferror in function 'cairo_image_surface_create_from_png'.",&tolua_err);
7633  return 0;
7634 #endif
7635 }
7636 #endif //#ifndef TOLUA_DISABLE
7637
7638 /* function: cairo_image_surface_create_from_png_stream */
7639 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_image_surface_create_from_png_stream00
7640 static int tolua_cairo_cairo_image_surface_create_from_png_stream00(lua_State* tolua_S)
7641 {
7642 #ifndef TOLUA_RELEASE
7643  tolua_Error tolua_err;
7644  if (
7645      (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"cairo_read_func_t",0,&tolua_err)) ||
7646      !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
7647      !tolua_isnoobj(tolua_S,3,&tolua_err)
7648  )
7649   goto tolua_lerror;
7650  else
7651 #endif
7652  {
7653   cairo_read_func_t read_func = *((cairo_read_func_t*)  tolua_tousertype(tolua_S,1,0));
7654   void* closure = ((void*)  tolua_touserdata(tolua_S,2,0));
7655   {
7656    struct _cairo_surface* tolua_ret = ( struct _cairo_surface*)  cairo_image_surface_create_from_png_stream(read_func,closure);
7657     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_surface");
7658   }
7659  }
7660  return 1;
7661 #ifndef TOLUA_RELEASE
7662  tolua_lerror:
7663  tolua_error(tolua_S,"#ferror in function 'cairo_image_surface_create_from_png_stream'.",&tolua_err);
7664  return 0;
7665 #endif
7666 }
7667 #endif //#ifndef TOLUA_DISABLE
7668
7669 /* function: cairo_pattern_create_rgb */
7670 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_create_rgb00
7671 static int tolua_cairo_cairo_pattern_create_rgb00(lua_State* tolua_S)
7672 {
7673 #ifndef TOLUA_RELEASE
7674  tolua_Error tolua_err;
7675  if (
7676      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
7677      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
7678      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
7679      !tolua_isnoobj(tolua_S,4,&tolua_err)
7680  )
7681   goto tolua_lerror;
7682  else
7683 #endif
7684  {
7685   double red = ((double)  tolua_tonumber(tolua_S,1,0));
7686   double green = ((double)  tolua_tonumber(tolua_S,2,0));
7687   double blue = ((double)  tolua_tonumber(tolua_S,3,0));
7688   {
7689    struct _cairo_pattern* tolua_ret = ( struct _cairo_pattern*)  cairo_pattern_create_rgb(red,green,blue);
7690     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_pattern");
7691   }
7692  }
7693  return 1;
7694 #ifndef TOLUA_RELEASE
7695  tolua_lerror:
7696  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_create_rgb'.",&tolua_err);
7697  return 0;
7698 #endif
7699 }
7700 #endif //#ifndef TOLUA_DISABLE
7701
7702 /* function: cairo_pattern_create_rgba */
7703 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_create_rgba00
7704 static int tolua_cairo_cairo_pattern_create_rgba00(lua_State* tolua_S)
7705 {
7706 #ifndef TOLUA_RELEASE
7707  tolua_Error tolua_err;
7708  if (
7709      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
7710      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
7711      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
7712      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
7713      !tolua_isnoobj(tolua_S,5,&tolua_err)
7714  )
7715   goto tolua_lerror;
7716  else
7717 #endif
7718  {
7719   double red = ((double)  tolua_tonumber(tolua_S,1,0));
7720   double green = ((double)  tolua_tonumber(tolua_S,2,0));
7721   double blue = ((double)  tolua_tonumber(tolua_S,3,0));
7722   double alpha = ((double)  tolua_tonumber(tolua_S,4,0));
7723   {
7724    struct _cairo_pattern* tolua_ret = ( struct _cairo_pattern*)  cairo_pattern_create_rgba(red,green,blue,alpha);
7725     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_pattern");
7726   }
7727  }
7728  return 1;
7729 #ifndef TOLUA_RELEASE
7730  tolua_lerror:
7731  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_create_rgba'.",&tolua_err);
7732  return 0;
7733 #endif
7734 }
7735 #endif //#ifndef TOLUA_DISABLE
7736
7737 /* function: cairo_pattern_create_for_surface */
7738 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_create_for_surface00
7739 static int tolua_cairo_cairo_pattern_create_for_surface00(lua_State* tolua_S)
7740 {
7741 #ifndef TOLUA_RELEASE
7742  tolua_Error tolua_err;
7743  if (
7744      !tolua_isusertype(tolua_S,1,"_cairo_surface",0,&tolua_err) ||
7745      !tolua_isnoobj(tolua_S,2,&tolua_err)
7746  )
7747   goto tolua_lerror;
7748  else
7749 #endif
7750  {
7751   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,1,0));
7752   {
7753    struct _cairo_pattern* tolua_ret = ( struct _cairo_pattern*)  cairo_pattern_create_for_surface(surface);
7754     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_pattern");
7755   }
7756  }
7757  return 1;
7758 #ifndef TOLUA_RELEASE
7759  tolua_lerror:
7760  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_create_for_surface'.",&tolua_err);
7761  return 0;
7762 #endif
7763 }
7764 #endif //#ifndef TOLUA_DISABLE
7765
7766 /* function: cairo_pattern_create_linear */
7767 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_create_linear00
7768 static int tolua_cairo_cairo_pattern_create_linear00(lua_State* tolua_S)
7769 {
7770 #ifndef TOLUA_RELEASE
7771  tolua_Error tolua_err;
7772  if (
7773      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
7774      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
7775      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
7776      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
7777      !tolua_isnoobj(tolua_S,5,&tolua_err)
7778  )
7779   goto tolua_lerror;
7780  else
7781 #endif
7782  {
7783   double x0 = ((double)  tolua_tonumber(tolua_S,1,0));
7784   double y0 = ((double)  tolua_tonumber(tolua_S,2,0));
7785   double x1 = ((double)  tolua_tonumber(tolua_S,3,0));
7786   double y1 = ((double)  tolua_tonumber(tolua_S,4,0));
7787   {
7788    struct _cairo_pattern* tolua_ret = ( struct _cairo_pattern*)  cairo_pattern_create_linear(x0,y0,x1,y1);
7789     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_pattern");
7790   }
7791  }
7792  return 1;
7793 #ifndef TOLUA_RELEASE
7794  tolua_lerror:
7795  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_create_linear'.",&tolua_err);
7796  return 0;
7797 #endif
7798 }
7799 #endif //#ifndef TOLUA_DISABLE
7800
7801 /* function: cairo_pattern_create_radial */
7802 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_create_radial00
7803 static int tolua_cairo_cairo_pattern_create_radial00(lua_State* tolua_S)
7804 {
7805 #ifndef TOLUA_RELEASE
7806  tolua_Error tolua_err;
7807  if (
7808      !tolua_isnumber(tolua_S,1,0,&tolua_err) ||
7809      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
7810      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
7811      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
7812      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
7813      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
7814      !tolua_isnoobj(tolua_S,7,&tolua_err)
7815  )
7816   goto tolua_lerror;
7817  else
7818 #endif
7819  {
7820   double cx0 = ((double)  tolua_tonumber(tolua_S,1,0));
7821   double cy0 = ((double)  tolua_tonumber(tolua_S,2,0));
7822   double radius0 = ((double)  tolua_tonumber(tolua_S,3,0));
7823   double cx1 = ((double)  tolua_tonumber(tolua_S,4,0));
7824   double cy1 = ((double)  tolua_tonumber(tolua_S,5,0));
7825   double radius1 = ((double)  tolua_tonumber(tolua_S,6,0));
7826   {
7827    struct _cairo_pattern* tolua_ret = ( struct _cairo_pattern*)  cairo_pattern_create_radial(cx0,cy0,radius0,cx1,cy1,radius1);
7828     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_pattern");
7829   }
7830  }
7831  return 1;
7832 #ifndef TOLUA_RELEASE
7833  tolua_lerror:
7834  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_create_radial'.",&tolua_err);
7835  return 0;
7836 #endif
7837 }
7838 #endif //#ifndef TOLUA_DISABLE
7839
7840 /* function: cairo_pattern_reference */
7841 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_reference00
7842 static int tolua_cairo_cairo_pattern_reference00(lua_State* tolua_S)
7843 {
7844 #ifndef TOLUA_RELEASE
7845  tolua_Error tolua_err;
7846  if (
7847      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
7848      !tolua_isnoobj(tolua_S,2,&tolua_err)
7849  )
7850   goto tolua_lerror;
7851  else
7852 #endif
7853  {
7854   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
7855   {
7856    struct _cairo_pattern* tolua_ret = ( struct _cairo_pattern*)  cairo_pattern_reference(pattern);
7857     tolua_pushusertype(tolua_S,(void*)tolua_ret,"_cairo_pattern");
7858   }
7859  }
7860  return 1;
7861 #ifndef TOLUA_RELEASE
7862  tolua_lerror:
7863  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_reference'.",&tolua_err);
7864  return 0;
7865 #endif
7866 }
7867 #endif //#ifndef TOLUA_DISABLE
7868
7869 /* function: cairo_pattern_destroy */
7870 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_destroy00
7871 static int tolua_cairo_cairo_pattern_destroy00(lua_State* tolua_S)
7872 {
7873 #ifndef TOLUA_RELEASE
7874  tolua_Error tolua_err;
7875  if (
7876      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
7877      !tolua_isnoobj(tolua_S,2,&tolua_err)
7878  )
7879   goto tolua_lerror;
7880  else
7881 #endif
7882  {
7883   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
7884   {
7885    cairo_pattern_destroy(pattern);
7886   }
7887  }
7888  return 0;
7889 #ifndef TOLUA_RELEASE
7890  tolua_lerror:
7891  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_destroy'.",&tolua_err);
7892  return 0;
7893 #endif
7894 }
7895 #endif //#ifndef TOLUA_DISABLE
7896
7897 /* function: cairo_pattern_get_reference_count */
7898 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_get_reference_count00
7899 static int tolua_cairo_cairo_pattern_get_reference_count00(lua_State* tolua_S)
7900 {
7901 #ifndef TOLUA_RELEASE
7902  tolua_Error tolua_err;
7903  if (
7904      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
7905      !tolua_isnoobj(tolua_S,2,&tolua_err)
7906  )
7907   goto tolua_lerror;
7908  else
7909 #endif
7910  {
7911   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
7912   {
7913    unsigned int tolua_ret = (unsigned int)  cairo_pattern_get_reference_count(pattern);
7914    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
7915   }
7916  }
7917  return 1;
7918 #ifndef TOLUA_RELEASE
7919  tolua_lerror:
7920  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_get_reference_count'.",&tolua_err);
7921  return 0;
7922 #endif
7923 }
7924 #endif //#ifndef TOLUA_DISABLE
7925
7926 /* function: cairo_pattern_status */
7927 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_status00
7928 static int tolua_cairo_cairo_pattern_status00(lua_State* tolua_S)
7929 {
7930 #ifndef TOLUA_RELEASE
7931  tolua_Error tolua_err;
7932  if (
7933      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
7934      !tolua_isnoobj(tolua_S,2,&tolua_err)
7935  )
7936   goto tolua_lerror;
7937  else
7938 #endif
7939  {
7940   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
7941   {
7942    cairo_status_t tolua_ret = (cairo_status_t)  cairo_pattern_status(pattern);
7943    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
7944   }
7945  }
7946  return 1;
7947 #ifndef TOLUA_RELEASE
7948  tolua_lerror:
7949  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_status'.",&tolua_err);
7950  return 0;
7951 #endif
7952 }
7953 #endif //#ifndef TOLUA_DISABLE
7954
7955 /* function: cairo_pattern_get_user_data */
7956 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_get_user_data00
7957 static int tolua_cairo_cairo_pattern_get_user_data00(lua_State* tolua_S)
7958 {
7959 #ifndef TOLUA_RELEASE
7960  tolua_Error tolua_err;
7961  if (
7962      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
7963      !tolua_isusertype(tolua_S,2,"const cairo_user_data_key_t",0,&tolua_err) ||
7964      !tolua_isnoobj(tolua_S,3,&tolua_err)
7965  )
7966   goto tolua_lerror;
7967  else
7968 #endif
7969  {
7970   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
7971   const cairo_user_data_key_t* key = ((const cairo_user_data_key_t*)  tolua_tousertype(tolua_S,2,0));
7972   {
7973    void* tolua_ret = (void*)  cairo_pattern_get_user_data(pattern,key);
7974    tolua_pushuserdata(tolua_S,(void*)tolua_ret);
7975   }
7976  }
7977  return 1;
7978 #ifndef TOLUA_RELEASE
7979  tolua_lerror:
7980  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_get_user_data'.",&tolua_err);
7981  return 0;
7982 #endif
7983 }
7984 #endif //#ifndef TOLUA_DISABLE
7985
7986 /* function: cairo_pattern_set_user_data */
7987 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_set_user_data00
7988 static int tolua_cairo_cairo_pattern_set_user_data00(lua_State* tolua_S)
7989 {
7990 #ifndef TOLUA_RELEASE
7991  tolua_Error tolua_err;
7992  if (
7993      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
7994      !tolua_isusertype(tolua_S,2,"const cairo_user_data_key_t",0,&tolua_err) ||
7995      !tolua_isuserdata(tolua_S,3,0,&tolua_err) ||
7996      (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"cairo_destroy_func_t",0,&tolua_err)) ||
7997      !tolua_isnoobj(tolua_S,5,&tolua_err)
7998  )
7999   goto tolua_lerror;
8000  else
8001 #endif
8002  {
8003   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8004   const cairo_user_data_key_t* key = ((const cairo_user_data_key_t*)  tolua_tousertype(tolua_S,2,0));
8005   void* user_data = ((void*)  tolua_touserdata(tolua_S,3,0));
8006   cairo_destroy_func_t destroy = *((cairo_destroy_func_t*)  tolua_tousertype(tolua_S,4,0));
8007   {
8008    cairo_status_t tolua_ret = (cairo_status_t)  cairo_pattern_set_user_data(pattern,key,user_data,destroy);
8009    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
8010   }
8011  }
8012  return 1;
8013 #ifndef TOLUA_RELEASE
8014  tolua_lerror:
8015  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_set_user_data'.",&tolua_err);
8016  return 0;
8017 #endif
8018 }
8019 #endif //#ifndef TOLUA_DISABLE
8020
8021 /* function: cairo_pattern_get_type */
8022 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_get_type00
8023 static int tolua_cairo_cairo_pattern_get_type00(lua_State* tolua_S)
8024 {
8025 #ifndef TOLUA_RELEASE
8026  tolua_Error tolua_err;
8027  if (
8028      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8029      !tolua_isnoobj(tolua_S,2,&tolua_err)
8030  )
8031   goto tolua_lerror;
8032  else
8033 #endif
8034  {
8035   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8036   {
8037    cairo_pattern_type_t tolua_ret = (cairo_pattern_type_t)  cairo_pattern_get_type(pattern);
8038    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
8039   }
8040  }
8041  return 1;
8042 #ifndef TOLUA_RELEASE
8043  tolua_lerror:
8044  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_get_type'.",&tolua_err);
8045  return 0;
8046 #endif
8047 }
8048 #endif //#ifndef TOLUA_DISABLE
8049
8050 /* function: cairo_pattern_add_color_stop_rgb */
8051 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_add_color_stop_rgb00
8052 static int tolua_cairo_cairo_pattern_add_color_stop_rgb00(lua_State* tolua_S)
8053 {
8054 #ifndef TOLUA_RELEASE
8055  tolua_Error tolua_err;
8056  if (
8057      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8058      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8059      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
8060      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
8061      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
8062      !tolua_isnoobj(tolua_S,6,&tolua_err)
8063  )
8064   goto tolua_lerror;
8065  else
8066 #endif
8067  {
8068   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8069   double offset = ((double)  tolua_tonumber(tolua_S,2,0));
8070   double red = ((double)  tolua_tonumber(tolua_S,3,0));
8071   double green = ((double)  tolua_tonumber(tolua_S,4,0));
8072   double blue = ((double)  tolua_tonumber(tolua_S,5,0));
8073   {
8074    cairo_pattern_add_color_stop_rgb(pattern,offset,red,green,blue);
8075   }
8076  }
8077  return 0;
8078 #ifndef TOLUA_RELEASE
8079  tolua_lerror:
8080  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_add_color_stop_rgb'.",&tolua_err);
8081  return 0;
8082 #endif
8083 }
8084 #endif //#ifndef TOLUA_DISABLE
8085
8086 /* function: cairo_pattern_add_color_stop_rgba */
8087 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_add_color_stop_rgba00
8088 static int tolua_cairo_cairo_pattern_add_color_stop_rgba00(lua_State* tolua_S)
8089 {
8090 #ifndef TOLUA_RELEASE
8091  tolua_Error tolua_err;
8092  if (
8093      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8094      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8095      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
8096      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
8097      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
8098      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
8099      !tolua_isnoobj(tolua_S,7,&tolua_err)
8100  )
8101   goto tolua_lerror;
8102  else
8103 #endif
8104  {
8105   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8106   double offset = ((double)  tolua_tonumber(tolua_S,2,0));
8107   double red = ((double)  tolua_tonumber(tolua_S,3,0));
8108   double green = ((double)  tolua_tonumber(tolua_S,4,0));
8109   double blue = ((double)  tolua_tonumber(tolua_S,5,0));
8110   double alpha = ((double)  tolua_tonumber(tolua_S,6,0));
8111   {
8112    cairo_pattern_add_color_stop_rgba(pattern,offset,red,green,blue,alpha);
8113   }
8114  }
8115  return 0;
8116 #ifndef TOLUA_RELEASE
8117  tolua_lerror:
8118  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_add_color_stop_rgba'.",&tolua_err);
8119  return 0;
8120 #endif
8121 }
8122 #endif //#ifndef TOLUA_DISABLE
8123
8124 /* function: cairo_pattern_set_matrix */
8125 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_set_matrix00
8126 static int tolua_cairo_cairo_pattern_set_matrix00(lua_State* tolua_S)
8127 {
8128 #ifndef TOLUA_RELEASE
8129  tolua_Error tolua_err;
8130  if (
8131      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8132      !tolua_isusertype(tolua_S,2,"cairo_matrix_t",0,&tolua_err) ||
8133      !tolua_isnoobj(tolua_S,3,&tolua_err)
8134  )
8135   goto tolua_lerror;
8136  else
8137 #endif
8138  {
8139   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8140   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,2,0));
8141   {
8142    cairo_pattern_set_matrix(pattern,matrix);
8143   }
8144  }
8145  return 0;
8146 #ifndef TOLUA_RELEASE
8147  tolua_lerror:
8148  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_set_matrix'.",&tolua_err);
8149  return 0;
8150 #endif
8151 }
8152 #endif //#ifndef TOLUA_DISABLE
8153
8154 /* function: cairo_pattern_get_matrix */
8155 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_get_matrix00
8156 static int tolua_cairo_cairo_pattern_get_matrix00(lua_State* tolua_S)
8157 {
8158 #ifndef TOLUA_RELEASE
8159  tolua_Error tolua_err;
8160  if (
8161      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8162      !tolua_isusertype(tolua_S,2,"cairo_matrix_t",0,&tolua_err) ||
8163      !tolua_isnoobj(tolua_S,3,&tolua_err)
8164  )
8165   goto tolua_lerror;
8166  else
8167 #endif
8168  {
8169   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8170   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,2,0));
8171   {
8172    cairo_pattern_get_matrix(pattern,matrix);
8173   }
8174  }
8175  return 0;
8176 #ifndef TOLUA_RELEASE
8177  tolua_lerror:
8178  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_get_matrix'.",&tolua_err);
8179  return 0;
8180 #endif
8181 }
8182 #endif //#ifndef TOLUA_DISABLE
8183
8184 /* function: cairo_pattern_set_extend */
8185 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_set_extend00
8186 static int tolua_cairo_cairo_pattern_set_extend00(lua_State* tolua_S)
8187 {
8188 #ifndef TOLUA_RELEASE
8189  tolua_Error tolua_err;
8190  if (
8191      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8192      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8193      !tolua_isnoobj(tolua_S,3,&tolua_err)
8194  )
8195   goto tolua_lerror;
8196  else
8197 #endif
8198  {
8199   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8200   cairo_extend_t extend = ((cairo_extend_t) (int)  tolua_tonumber(tolua_S,2,0));
8201   {
8202    cairo_pattern_set_extend(pattern,extend);
8203   }
8204  }
8205  return 0;
8206 #ifndef TOLUA_RELEASE
8207  tolua_lerror:
8208  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_set_extend'.",&tolua_err);
8209  return 0;
8210 #endif
8211 }
8212 #endif //#ifndef TOLUA_DISABLE
8213
8214 /* function: cairo_pattern_get_extend */
8215 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_get_extend00
8216 static int tolua_cairo_cairo_pattern_get_extend00(lua_State* tolua_S)
8217 {
8218 #ifndef TOLUA_RELEASE
8219  tolua_Error tolua_err;
8220  if (
8221      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8222      !tolua_isnoobj(tolua_S,2,&tolua_err)
8223  )
8224   goto tolua_lerror;
8225  else
8226 #endif
8227  {
8228   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8229   {
8230    cairo_extend_t tolua_ret = (cairo_extend_t)  cairo_pattern_get_extend(pattern);
8231    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
8232   }
8233  }
8234  return 1;
8235 #ifndef TOLUA_RELEASE
8236  tolua_lerror:
8237  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_get_extend'.",&tolua_err);
8238  return 0;
8239 #endif
8240 }
8241 #endif //#ifndef TOLUA_DISABLE
8242
8243 /* function: cairo_pattern_set_filter */
8244 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_set_filter00
8245 static int tolua_cairo_cairo_pattern_set_filter00(lua_State* tolua_S)
8246 {
8247 #ifndef TOLUA_RELEASE
8248  tolua_Error tolua_err;
8249  if (
8250      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8251      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8252      !tolua_isnoobj(tolua_S,3,&tolua_err)
8253  )
8254   goto tolua_lerror;
8255  else
8256 #endif
8257  {
8258   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8259   cairo_filter_t filter = ((cairo_filter_t) (int)  tolua_tonumber(tolua_S,2,0));
8260   {
8261    cairo_pattern_set_filter(pattern,filter);
8262   }
8263  }
8264  return 0;
8265 #ifndef TOLUA_RELEASE
8266  tolua_lerror:
8267  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_set_filter'.",&tolua_err);
8268  return 0;
8269 #endif
8270 }
8271 #endif //#ifndef TOLUA_DISABLE
8272
8273 /* function: cairo_pattern_get_filter */
8274 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_get_filter00
8275 static int tolua_cairo_cairo_pattern_get_filter00(lua_State* tolua_S)
8276 {
8277 #ifndef TOLUA_RELEASE
8278  tolua_Error tolua_err;
8279  if (
8280      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8281      !tolua_isnoobj(tolua_S,2,&tolua_err)
8282  )
8283   goto tolua_lerror;
8284  else
8285 #endif
8286  {
8287   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8288   {
8289    cairo_filter_t tolua_ret = (cairo_filter_t)  cairo_pattern_get_filter(pattern);
8290    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
8291   }
8292  }
8293  return 1;
8294 #ifndef TOLUA_RELEASE
8295  tolua_lerror:
8296  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_get_filter'.",&tolua_err);
8297  return 0;
8298 #endif
8299 }
8300 #endif //#ifndef TOLUA_DISABLE
8301
8302 /* function: cairo_pattern_get_rgba */
8303 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_get_rgba00
8304 static int tolua_cairo_cairo_pattern_get_rgba00(lua_State* tolua_S)
8305 {
8306 #ifndef TOLUA_RELEASE
8307  tolua_Error tolua_err;
8308  if (
8309      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8310      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8311      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
8312      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
8313      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
8314      !tolua_isnoobj(tolua_S,6,&tolua_err)
8315  )
8316   goto tolua_lerror;
8317  else
8318 #endif
8319  {
8320   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8321   double red = ((double)  tolua_tonumber(tolua_S,2,0));
8322   double green = ((double)  tolua_tonumber(tolua_S,3,0));
8323   double blue = ((double)  tolua_tonumber(tolua_S,4,0));
8324   double alpha = ((double)  tolua_tonumber(tolua_S,5,0));
8325   {
8326    cairo_status_t tolua_ret = (cairo_status_t)  cairo_pattern_get_rgba(pattern,&red,&green,&blue,&alpha);
8327    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
8328    tolua_pushnumber(tolua_S,(lua_Number)red);
8329    tolua_pushnumber(tolua_S,(lua_Number)green);
8330    tolua_pushnumber(tolua_S,(lua_Number)blue);
8331    tolua_pushnumber(tolua_S,(lua_Number)alpha);
8332   }
8333  }
8334  return 5;
8335 #ifndef TOLUA_RELEASE
8336  tolua_lerror:
8337  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_get_rgba'.",&tolua_err);
8338  return 0;
8339 #endif
8340 }
8341 #endif //#ifndef TOLUA_DISABLE
8342
8343 /* function: cairo_pattern_get_surface */
8344 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_get_surface00
8345 static int tolua_cairo_cairo_pattern_get_surface00(lua_State* tolua_S)
8346 {
8347 #ifndef TOLUA_RELEASE
8348  tolua_Error tolua_err;
8349  if (
8350      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8351      !tolua_isusertype(tolua_S,2,"_cairo_surface",0,&tolua_err) ||
8352      !tolua_isnoobj(tolua_S,3,&tolua_err)
8353  )
8354   goto tolua_lerror;
8355  else
8356 #endif
8357  {
8358   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8359   struct _cairo_surface* surface = (( struct _cairo_surface*)  tolua_tousertype(tolua_S,2,0));
8360   {
8361    cairo_status_t tolua_ret = (cairo_status_t)  cairo_pattern_get_surface(pattern,&surface);
8362    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
8363     tolua_pushusertype(tolua_S,(void*)surface,"_cairo_surface");
8364   }
8365  }
8366  return 2;
8367 #ifndef TOLUA_RELEASE
8368  tolua_lerror:
8369  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_get_surface'.",&tolua_err);
8370  return 0;
8371 #endif
8372 }
8373 #endif //#ifndef TOLUA_DISABLE
8374
8375 /* function: cairo_pattern_get_color_stop_rgba */
8376 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_get_color_stop_rgba00
8377 static int tolua_cairo_cairo_pattern_get_color_stop_rgba00(lua_State* tolua_S)
8378 {
8379 #ifndef TOLUA_RELEASE
8380  tolua_Error tolua_err;
8381  if (
8382      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8383      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8384      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
8385      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
8386      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
8387      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
8388      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
8389      !tolua_isnoobj(tolua_S,8,&tolua_err)
8390  )
8391   goto tolua_lerror;
8392  else
8393 #endif
8394  {
8395   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8396   int index = ((int)  tolua_tonumber(tolua_S,2,0));
8397   double offset = ((double)  tolua_tonumber(tolua_S,3,0));
8398   double red = ((double)  tolua_tonumber(tolua_S,4,0));
8399   double green = ((double)  tolua_tonumber(tolua_S,5,0));
8400   double blue = ((double)  tolua_tonumber(tolua_S,6,0));
8401   double alpha = ((double)  tolua_tonumber(tolua_S,7,0));
8402   {
8403    cairo_status_t tolua_ret = (cairo_status_t)  cairo_pattern_get_color_stop_rgba(pattern,index,&offset,&red,&green,&blue,&alpha);
8404    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
8405    tolua_pushnumber(tolua_S,(lua_Number)offset);
8406    tolua_pushnumber(tolua_S,(lua_Number)red);
8407    tolua_pushnumber(tolua_S,(lua_Number)green);
8408    tolua_pushnumber(tolua_S,(lua_Number)blue);
8409    tolua_pushnumber(tolua_S,(lua_Number)alpha);
8410   }
8411  }
8412  return 6;
8413 #ifndef TOLUA_RELEASE
8414  tolua_lerror:
8415  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_get_color_stop_rgba'.",&tolua_err);
8416  return 0;
8417 #endif
8418 }
8419 #endif //#ifndef TOLUA_DISABLE
8420
8421 /* function: cairo_pattern_get_color_stop_count */
8422 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_get_color_stop_count00
8423 static int tolua_cairo_cairo_pattern_get_color_stop_count00(lua_State* tolua_S)
8424 {
8425 #ifndef TOLUA_RELEASE
8426  tolua_Error tolua_err;
8427  if (
8428      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8429      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8430      !tolua_isnoobj(tolua_S,3,&tolua_err)
8431  )
8432   goto tolua_lerror;
8433  else
8434 #endif
8435  {
8436   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8437   int count = ((int)  tolua_tonumber(tolua_S,2,0));
8438   {
8439    cairo_status_t tolua_ret = (cairo_status_t)  cairo_pattern_get_color_stop_count(pattern,&count);
8440    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
8441    tolua_pushnumber(tolua_S,(lua_Number)count);
8442   }
8443  }
8444  return 2;
8445 #ifndef TOLUA_RELEASE
8446  tolua_lerror:
8447  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_get_color_stop_count'.",&tolua_err);
8448  return 0;
8449 #endif
8450 }
8451 #endif //#ifndef TOLUA_DISABLE
8452
8453 /* function: cairo_pattern_get_linear_points */
8454 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_get_linear_points00
8455 static int tolua_cairo_cairo_pattern_get_linear_points00(lua_State* tolua_S)
8456 {
8457 #ifndef TOLUA_RELEASE
8458  tolua_Error tolua_err;
8459  if (
8460      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8461      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8462      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
8463      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
8464      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
8465      !tolua_isnoobj(tolua_S,6,&tolua_err)
8466  )
8467   goto tolua_lerror;
8468  else
8469 #endif
8470  {
8471   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8472   double x0 = ((double)  tolua_tonumber(tolua_S,2,0));
8473   double y0 = ((double)  tolua_tonumber(tolua_S,3,0));
8474   double x1 = ((double)  tolua_tonumber(tolua_S,4,0));
8475   double y1 = ((double)  tolua_tonumber(tolua_S,5,0));
8476   {
8477    cairo_status_t tolua_ret = (cairo_status_t)  cairo_pattern_get_linear_points(pattern,&x0,&y0,&x1,&y1);
8478    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
8479    tolua_pushnumber(tolua_S,(lua_Number)x0);
8480    tolua_pushnumber(tolua_S,(lua_Number)y0);
8481    tolua_pushnumber(tolua_S,(lua_Number)x1);
8482    tolua_pushnumber(tolua_S,(lua_Number)y1);
8483   }
8484  }
8485  return 5;
8486 #ifndef TOLUA_RELEASE
8487  tolua_lerror:
8488  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_get_linear_points'.",&tolua_err);
8489  return 0;
8490 #endif
8491 }
8492 #endif //#ifndef TOLUA_DISABLE
8493
8494 /* function: cairo_pattern_get_radial_circles */
8495 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_pattern_get_radial_circles00
8496 static int tolua_cairo_cairo_pattern_get_radial_circles00(lua_State* tolua_S)
8497 {
8498 #ifndef TOLUA_RELEASE
8499  tolua_Error tolua_err;
8500  if (
8501      !tolua_isusertype(tolua_S,1,"_cairo_pattern",0,&tolua_err) ||
8502      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8503      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
8504      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
8505      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
8506      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
8507      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
8508      !tolua_isnoobj(tolua_S,8,&tolua_err)
8509  )
8510   goto tolua_lerror;
8511  else
8512 #endif
8513  {
8514   struct _cairo_pattern* pattern = (( struct _cairo_pattern*)  tolua_tousertype(tolua_S,1,0));
8515   double x0 = ((double)  tolua_tonumber(tolua_S,2,0));
8516   double y0 = ((double)  tolua_tonumber(tolua_S,3,0));
8517   double r0 = ((double)  tolua_tonumber(tolua_S,4,0));
8518   double x1 = ((double)  tolua_tonumber(tolua_S,5,0));
8519   double y1 = ((double)  tolua_tonumber(tolua_S,6,0));
8520   double r1 = ((double)  tolua_tonumber(tolua_S,7,0));
8521   {
8522    cairo_status_t tolua_ret = (cairo_status_t)  cairo_pattern_get_radial_circles(pattern,&x0,&y0,&r0,&x1,&y1,&r1);
8523    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
8524    tolua_pushnumber(tolua_S,(lua_Number)x0);
8525    tolua_pushnumber(tolua_S,(lua_Number)y0);
8526    tolua_pushnumber(tolua_S,(lua_Number)r0);
8527    tolua_pushnumber(tolua_S,(lua_Number)x1);
8528    tolua_pushnumber(tolua_S,(lua_Number)y1);
8529    tolua_pushnumber(tolua_S,(lua_Number)r1);
8530   }
8531  }
8532  return 7;
8533 #ifndef TOLUA_RELEASE
8534  tolua_lerror:
8535  tolua_error(tolua_S,"#ferror in function 'cairo_pattern_get_radial_circles'.",&tolua_err);
8536  return 0;
8537 #endif
8538 }
8539 #endif //#ifndef TOLUA_DISABLE
8540
8541 /* function: cairo_matrix_init */
8542 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_matrix_init00
8543 static int tolua_cairo_cairo_matrix_init00(lua_State* tolua_S)
8544 {
8545 #ifndef TOLUA_RELEASE
8546  tolua_Error tolua_err;
8547  if (
8548      !tolua_isusertype(tolua_S,1,"cairo_matrix_t",0,&tolua_err) ||
8549      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8550      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
8551      !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
8552      !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
8553      !tolua_isnumber(tolua_S,6,0,&tolua_err) ||
8554      !tolua_isnumber(tolua_S,7,0,&tolua_err) ||
8555      !tolua_isnoobj(tolua_S,8,&tolua_err)
8556  )
8557   goto tolua_lerror;
8558  else
8559 #endif
8560  {
8561   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0));
8562   double xx = ((double)  tolua_tonumber(tolua_S,2,0));
8563   double yx = ((double)  tolua_tonumber(tolua_S,3,0));
8564   double xy = ((double)  tolua_tonumber(tolua_S,4,0));
8565   double yy = ((double)  tolua_tonumber(tolua_S,5,0));
8566   double x0 = ((double)  tolua_tonumber(tolua_S,6,0));
8567   double y0 = ((double)  tolua_tonumber(tolua_S,7,0));
8568   {
8569    cairo_matrix_init(matrix,xx,yx,xy,yy,x0,y0);
8570   }
8571  }
8572  return 0;
8573 #ifndef TOLUA_RELEASE
8574  tolua_lerror:
8575  tolua_error(tolua_S,"#ferror in function 'cairo_matrix_init'.",&tolua_err);
8576  return 0;
8577 #endif
8578 }
8579 #endif //#ifndef TOLUA_DISABLE
8580
8581 /* function: cairo_matrix_init_identity */
8582 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_matrix_init_identity00
8583 static int tolua_cairo_cairo_matrix_init_identity00(lua_State* tolua_S)
8584 {
8585 #ifndef TOLUA_RELEASE
8586  tolua_Error tolua_err;
8587  if (
8588      !tolua_isusertype(tolua_S,1,"cairo_matrix_t",0,&tolua_err) ||
8589      !tolua_isnoobj(tolua_S,2,&tolua_err)
8590  )
8591   goto tolua_lerror;
8592  else
8593 #endif
8594  {
8595   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0));
8596   {
8597    cairo_matrix_init_identity(matrix);
8598   }
8599  }
8600  return 0;
8601 #ifndef TOLUA_RELEASE
8602  tolua_lerror:
8603  tolua_error(tolua_S,"#ferror in function 'cairo_matrix_init_identity'.",&tolua_err);
8604  return 0;
8605 #endif
8606 }
8607 #endif //#ifndef TOLUA_DISABLE
8608
8609 /* function: cairo_matrix_init_translate */
8610 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_matrix_init_translate00
8611 static int tolua_cairo_cairo_matrix_init_translate00(lua_State* tolua_S)
8612 {
8613 #ifndef TOLUA_RELEASE
8614  tolua_Error tolua_err;
8615  if (
8616      !tolua_isusertype(tolua_S,1,"cairo_matrix_t",0,&tolua_err) ||
8617      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8618      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
8619      !tolua_isnoobj(tolua_S,4,&tolua_err)
8620  )
8621   goto tolua_lerror;
8622  else
8623 #endif
8624  {
8625   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0));
8626   double tx = ((double)  tolua_tonumber(tolua_S,2,0));
8627   double ty = ((double)  tolua_tonumber(tolua_S,3,0));
8628   {
8629    cairo_matrix_init_translate(matrix,tx,ty);
8630   }
8631  }
8632  return 0;
8633 #ifndef TOLUA_RELEASE
8634  tolua_lerror:
8635  tolua_error(tolua_S,"#ferror in function 'cairo_matrix_init_translate'.",&tolua_err);
8636  return 0;
8637 #endif
8638 }
8639 #endif //#ifndef TOLUA_DISABLE
8640
8641 /* function: cairo_matrix_init_scale */
8642 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_matrix_init_scale00
8643 static int tolua_cairo_cairo_matrix_init_scale00(lua_State* tolua_S)
8644 {
8645 #ifndef TOLUA_RELEASE
8646  tolua_Error tolua_err;
8647  if (
8648      !tolua_isusertype(tolua_S,1,"cairo_matrix_t",0,&tolua_err) ||
8649      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8650      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
8651      !tolua_isnoobj(tolua_S,4,&tolua_err)
8652  )
8653   goto tolua_lerror;
8654  else
8655 #endif
8656  {
8657   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0));
8658   double sx = ((double)  tolua_tonumber(tolua_S,2,0));
8659   double sy = ((double)  tolua_tonumber(tolua_S,3,0));
8660   {
8661    cairo_matrix_init_scale(matrix,sx,sy);
8662   }
8663  }
8664  return 0;
8665 #ifndef TOLUA_RELEASE
8666  tolua_lerror:
8667  tolua_error(tolua_S,"#ferror in function 'cairo_matrix_init_scale'.",&tolua_err);
8668  return 0;
8669 #endif
8670 }
8671 #endif //#ifndef TOLUA_DISABLE
8672
8673 /* function: cairo_matrix_init_rotate */
8674 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_matrix_init_rotate00
8675 static int tolua_cairo_cairo_matrix_init_rotate00(lua_State* tolua_S)
8676 {
8677 #ifndef TOLUA_RELEASE
8678  tolua_Error tolua_err;
8679  if (
8680      !tolua_isusertype(tolua_S,1,"cairo_matrix_t",0,&tolua_err) ||
8681      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8682      !tolua_isnoobj(tolua_S,3,&tolua_err)
8683  )
8684   goto tolua_lerror;
8685  else
8686 #endif
8687  {
8688   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0));
8689   double radians = ((double)  tolua_tonumber(tolua_S,2,0));
8690   {
8691    cairo_matrix_init_rotate(matrix,radians);
8692   }
8693  }
8694  return 0;
8695 #ifndef TOLUA_RELEASE
8696  tolua_lerror:
8697  tolua_error(tolua_S,"#ferror in function 'cairo_matrix_init_rotate'.",&tolua_err);
8698  return 0;
8699 #endif
8700 }
8701 #endif //#ifndef TOLUA_DISABLE
8702
8703 /* function: cairo_matrix_translate */
8704 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_matrix_translate00
8705 static int tolua_cairo_cairo_matrix_translate00(lua_State* tolua_S)
8706 {
8707 #ifndef TOLUA_RELEASE
8708  tolua_Error tolua_err;
8709  if (
8710      !tolua_isusertype(tolua_S,1,"cairo_matrix_t",0,&tolua_err) ||
8711      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8712      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
8713      !tolua_isnoobj(tolua_S,4,&tolua_err)
8714  )
8715   goto tolua_lerror;
8716  else
8717 #endif
8718  {
8719   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0));
8720   double tx = ((double)  tolua_tonumber(tolua_S,2,0));
8721   double ty = ((double)  tolua_tonumber(tolua_S,3,0));
8722   {
8723    cairo_matrix_translate(matrix,tx,ty);
8724   }
8725  }
8726  return 0;
8727 #ifndef TOLUA_RELEASE
8728  tolua_lerror:
8729  tolua_error(tolua_S,"#ferror in function 'cairo_matrix_translate'.",&tolua_err);
8730  return 0;
8731 #endif
8732 }
8733 #endif //#ifndef TOLUA_DISABLE
8734
8735 /* function: cairo_matrix_scale */
8736 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_matrix_scale00
8737 static int tolua_cairo_cairo_matrix_scale00(lua_State* tolua_S)
8738 {
8739 #ifndef TOLUA_RELEASE
8740  tolua_Error tolua_err;
8741  if (
8742      !tolua_isusertype(tolua_S,1,"cairo_matrix_t",0,&tolua_err) ||
8743      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8744      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
8745      !tolua_isnoobj(tolua_S,4,&tolua_err)
8746  )
8747   goto tolua_lerror;
8748  else
8749 #endif
8750  {
8751   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0));
8752   double sx = ((double)  tolua_tonumber(tolua_S,2,0));
8753   double sy = ((double)  tolua_tonumber(tolua_S,3,0));
8754   {
8755    cairo_matrix_scale(matrix,sx,sy);
8756   }
8757  }
8758  return 0;
8759 #ifndef TOLUA_RELEASE
8760  tolua_lerror:
8761  tolua_error(tolua_S,"#ferror in function 'cairo_matrix_scale'.",&tolua_err);
8762  return 0;
8763 #endif
8764 }
8765 #endif //#ifndef TOLUA_DISABLE
8766
8767 /* function: cairo_matrix_rotate */
8768 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_matrix_rotate00
8769 static int tolua_cairo_cairo_matrix_rotate00(lua_State* tolua_S)
8770 {
8771 #ifndef TOLUA_RELEASE
8772  tolua_Error tolua_err;
8773  if (
8774      !tolua_isusertype(tolua_S,1,"cairo_matrix_t",0,&tolua_err) ||
8775      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8776      !tolua_isnoobj(tolua_S,3,&tolua_err)
8777  )
8778   goto tolua_lerror;
8779  else
8780 #endif
8781  {
8782   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0));
8783   double radians = ((double)  tolua_tonumber(tolua_S,2,0));
8784   {
8785    cairo_matrix_rotate(matrix,radians);
8786   }
8787  }
8788  return 0;
8789 #ifndef TOLUA_RELEASE
8790  tolua_lerror:
8791  tolua_error(tolua_S,"#ferror in function 'cairo_matrix_rotate'.",&tolua_err);
8792  return 0;
8793 #endif
8794 }
8795 #endif //#ifndef TOLUA_DISABLE
8796
8797 /* function: cairo_matrix_invert */
8798 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_matrix_invert00
8799 static int tolua_cairo_cairo_matrix_invert00(lua_State* tolua_S)
8800 {
8801 #ifndef TOLUA_RELEASE
8802  tolua_Error tolua_err;
8803  if (
8804      !tolua_isusertype(tolua_S,1,"cairo_matrix_t",0,&tolua_err) ||
8805      !tolua_isnoobj(tolua_S,2,&tolua_err)
8806  )
8807   goto tolua_lerror;
8808  else
8809 #endif
8810  {
8811   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0));
8812   {
8813    cairo_status_t tolua_ret = (cairo_status_t)  cairo_matrix_invert(matrix);
8814    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
8815   }
8816  }
8817  return 1;
8818 #ifndef TOLUA_RELEASE
8819  tolua_lerror:
8820  tolua_error(tolua_S,"#ferror in function 'cairo_matrix_invert'.",&tolua_err);
8821  return 0;
8822 #endif
8823 }
8824 #endif //#ifndef TOLUA_DISABLE
8825
8826 /* function: cairo_matrix_multiply */
8827 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_matrix_multiply00
8828 static int tolua_cairo_cairo_matrix_multiply00(lua_State* tolua_S)
8829 {
8830 #ifndef TOLUA_RELEASE
8831  tolua_Error tolua_err;
8832  if (
8833      !tolua_isusertype(tolua_S,1,"cairo_matrix_t",0,&tolua_err) ||
8834      !tolua_isusertype(tolua_S,2,"cairo_matrix_t",0,&tolua_err) ||
8835      !tolua_isusertype(tolua_S,3,"cairo_matrix_t",0,&tolua_err) ||
8836      !tolua_isnoobj(tolua_S,4,&tolua_err)
8837  )
8838   goto tolua_lerror;
8839  else
8840 #endif
8841  {
8842   cairo_matrix_t* result = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0));
8843   cairo_matrix_t* a = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,2,0));
8844   cairo_matrix_t* b = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,3,0));
8845   {
8846    cairo_matrix_multiply(result,a,b);
8847   }
8848  }
8849  return 0;
8850 #ifndef TOLUA_RELEASE
8851  tolua_lerror:
8852  tolua_error(tolua_S,"#ferror in function 'cairo_matrix_multiply'.",&tolua_err);
8853  return 0;
8854 #endif
8855 }
8856 #endif //#ifndef TOLUA_DISABLE
8857
8858 /* function: cairo_matrix_transform_distance */
8859 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_matrix_transform_distance00
8860 static int tolua_cairo_cairo_matrix_transform_distance00(lua_State* tolua_S)
8861 {
8862 #ifndef TOLUA_RELEASE
8863  tolua_Error tolua_err;
8864  if (
8865      !tolua_isusertype(tolua_S,1,"cairo_matrix_t",0,&tolua_err) ||
8866      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8867      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
8868      !tolua_isnoobj(tolua_S,4,&tolua_err)
8869  )
8870   goto tolua_lerror;
8871  else
8872 #endif
8873  {
8874   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0));
8875   double dx = ((double)  tolua_tonumber(tolua_S,2,0));
8876   double dy = ((double)  tolua_tonumber(tolua_S,3,0));
8877   {
8878    cairo_matrix_transform_distance(matrix,&dx,&dy);
8879    tolua_pushnumber(tolua_S,(lua_Number)dx);
8880    tolua_pushnumber(tolua_S,(lua_Number)dy);
8881   }
8882  }
8883  return 2;
8884 #ifndef TOLUA_RELEASE
8885  tolua_lerror:
8886  tolua_error(tolua_S,"#ferror in function 'cairo_matrix_transform_distance'.",&tolua_err);
8887  return 0;
8888 #endif
8889 }
8890 #endif //#ifndef TOLUA_DISABLE
8891
8892 /* function: cairo_matrix_transform_point */
8893 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_matrix_transform_point00
8894 static int tolua_cairo_cairo_matrix_transform_point00(lua_State* tolua_S)
8895 {
8896 #ifndef TOLUA_RELEASE
8897  tolua_Error tolua_err;
8898  if (
8899      !tolua_isusertype(tolua_S,1,"cairo_matrix_t",0,&tolua_err) ||
8900      !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
8901      !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
8902      !tolua_isnoobj(tolua_S,4,&tolua_err)
8903  )
8904   goto tolua_lerror;
8905  else
8906 #endif
8907  {
8908   cairo_matrix_t* matrix = ((cairo_matrix_t*)  tolua_tousertype(tolua_S,1,0));
8909   double x = ((double)  tolua_tonumber(tolua_S,2,0));
8910   double y = ((double)  tolua_tonumber(tolua_S,3,0));
8911   {
8912    cairo_matrix_transform_point(matrix,&x,&y);
8913    tolua_pushnumber(tolua_S,(lua_Number)x);
8914    tolua_pushnumber(tolua_S,(lua_Number)y);
8915   }
8916  }
8917  return 2;
8918 #ifndef TOLUA_RELEASE
8919  tolua_lerror:
8920  tolua_error(tolua_S,"#ferror in function 'cairo_matrix_transform_point'.",&tolua_err);
8921  return 0;
8922 #endif
8923 }
8924 #endif //#ifndef TOLUA_DISABLE
8925
8926 /* function: cairo_debug_reset_static_data */
8927 #ifndef TOLUA_DISABLE_tolua_cairo_cairo_debug_reset_static_data00
8928 static int tolua_cairo_cairo_debug_reset_static_data00(lua_State* tolua_S)
8929 {
8930 #ifndef TOLUA_RELEASE
8931  tolua_Error tolua_err;
8932  if (
8933      !tolua_isnoobj(tolua_S,1,&tolua_err)
8934  )
8935   goto tolua_lerror;
8936  else
8937 #endif
8938  {
8939   {
8940    cairo_debug_reset_static_data();
8941   }
8942  }
8943  return 0;
8944 #ifndef TOLUA_RELEASE
8945  tolua_lerror:
8946  tolua_error(tolua_S,"#ferror in function 'cairo_debug_reset_static_data'.",&tolua_err);
8947  return 0;
8948 #endif
8949 }
8950 #endif //#ifndef TOLUA_DISABLE
8951
8952 /* Open function */
8953 TOLUA_API int tolua_cairo_open (lua_State* tolua_S)
8954 {
8955  tolua_open(tolua_S);
8956  tolua_reg_types(tolua_S);
8957  tolua_module(tolua_S,NULL,0);
8958  tolua_beginmodule(tolua_S,NULL);
8959   tolua_constant(tolua_S,"CAIRO_ANTIALIAS_DEFAULT",CAIRO_ANTIALIAS_DEFAULT);
8960   tolua_constant(tolua_S,"CAIRO_ANTIALIAS_NONE",CAIRO_ANTIALIAS_NONE);
8961   tolua_constant(tolua_S,"CAIRO_ANTIALIAS_GRAY",CAIRO_ANTIALIAS_GRAY);
8962   tolua_constant(tolua_S,"CAIRO_ANTIALIAS_SUBPIXEL",CAIRO_ANTIALIAS_SUBPIXEL);
8963   tolua_cclass(tolua_S,"cairo_matrix_t","cairo_matrix_t","",NULL);
8964   tolua_beginmodule(tolua_S,"cairo_matrix_t");
8965    tolua_variable(tolua_S,"xx",tolua_get_cairo_matrix_t_xx,tolua_set_cairo_matrix_t_xx);
8966    tolua_variable(tolua_S,"yx",tolua_get_cairo_matrix_t_yx,tolua_set_cairo_matrix_t_yx);
8967    tolua_variable(tolua_S,"xy",tolua_get_cairo_matrix_t_xy,tolua_set_cairo_matrix_t_xy);
8968    tolua_variable(tolua_S,"yy",tolua_get_cairo_matrix_t_yy,tolua_set_cairo_matrix_t_yy);
8969    tolua_variable(tolua_S,"x0",tolua_get_cairo_matrix_t_x0,tolua_set_cairo_matrix_t_x0);
8970    tolua_variable(tolua_S,"y0",tolua_get_cairo_matrix_t_y0,tolua_set_cairo_matrix_t_y0);
8971    tolua_function(tolua_S,"create",tolua_cairo_cairo_matrix_t_create00);
8972   tolua_endmodule(tolua_S);
8973   tolua_cclass(tolua_S,"cairo_user_data_key_t","cairo_user_data_key_t","",NULL);
8974   tolua_beginmodule(tolua_S,"cairo_user_data_key_t");
8975    tolua_variable(tolua_S,"unused",tolua_get_cairo_user_data_key_t_unused,tolua_set_cairo_user_data_key_t_unused);
8976   tolua_endmodule(tolua_S);
8977   tolua_constant(tolua_S,"CAIRO_STATUS_SUCCESS",CAIRO_STATUS_SUCCESS);
8978   tolua_constant(tolua_S,"CAIRO_STATUS_NO_MEMORY",CAIRO_STATUS_NO_MEMORY);
8979   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_RESTORE",CAIRO_STATUS_INVALID_RESTORE);
8980   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_POP_GROUP",CAIRO_STATUS_INVALID_POP_GROUP);
8981   tolua_constant(tolua_S,"CAIRO_STATUS_NO_CURRENT_POINT",CAIRO_STATUS_NO_CURRENT_POINT);
8982   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_MATRIX",CAIRO_STATUS_INVALID_MATRIX);
8983   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_STATUS",CAIRO_STATUS_INVALID_STATUS);
8984   tolua_constant(tolua_S,"CAIRO_STATUS_NULL_POINTER",CAIRO_STATUS_NULL_POINTER);
8985   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_STRING",CAIRO_STATUS_INVALID_STRING);
8986   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_PATH_DATA",CAIRO_STATUS_INVALID_PATH_DATA);
8987   tolua_constant(tolua_S,"CAIRO_STATUS_READ_ERROR",CAIRO_STATUS_READ_ERROR);
8988   tolua_constant(tolua_S,"CAIRO_STATUS_WRITE_ERROR",CAIRO_STATUS_WRITE_ERROR);
8989   tolua_constant(tolua_S,"CAIRO_STATUS_SURFACE_FINISHED",CAIRO_STATUS_SURFACE_FINISHED);
8990   tolua_constant(tolua_S,"CAIRO_STATUS_SURFACE_TYPE_MISMATCH",CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
8991   tolua_constant(tolua_S,"CAIRO_STATUS_PATTERN_TYPE_MISMATCH",CAIRO_STATUS_PATTERN_TYPE_MISMATCH);
8992   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_CONTENT",CAIRO_STATUS_INVALID_CONTENT);
8993   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_FORMAT",CAIRO_STATUS_INVALID_FORMAT);
8994   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_VISUAL",CAIRO_STATUS_INVALID_VISUAL);
8995   tolua_constant(tolua_S,"CAIRO_STATUS_FILE_NOT_FOUND",CAIRO_STATUS_FILE_NOT_FOUND);
8996   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_DASH",CAIRO_STATUS_INVALID_DASH);
8997   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_DSC_COMMENT",CAIRO_STATUS_INVALID_DSC_COMMENT);
8998   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_INDEX",CAIRO_STATUS_INVALID_INDEX);
8999   tolua_constant(tolua_S,"CAIRO_STATUS_CLIP_NOT_REPRESENTABLE",CAIRO_STATUS_CLIP_NOT_REPRESENTABLE);
9000   tolua_constant(tolua_S,"CAIRO_STATUS_TEMP_FILE_ERROR",CAIRO_STATUS_TEMP_FILE_ERROR);
9001   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_STRIDE",CAIRO_STATUS_INVALID_STRIDE);
9002   tolua_constant(tolua_S,"CAIRO_STATUS_FONT_TYPE_MISMATCH",CAIRO_STATUS_FONT_TYPE_MISMATCH);
9003   tolua_constant(tolua_S,"CAIRO_STATUS_USER_FONT_IMMUTABLE",CAIRO_STATUS_USER_FONT_IMMUTABLE);
9004   tolua_constant(tolua_S,"CAIRO_STATUS_USER_FONT_ERROR",CAIRO_STATUS_USER_FONT_ERROR);
9005   tolua_constant(tolua_S,"CAIRO_STATUS_NEGATIVE_COUNT",CAIRO_STATUS_NEGATIVE_COUNT);
9006   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_CLUSTERS",CAIRO_STATUS_INVALID_CLUSTERS);
9007   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_SLANT",CAIRO_STATUS_INVALID_SLANT);
9008   tolua_constant(tolua_S,"CAIRO_STATUS_INVALID_WEIGHT",CAIRO_STATUS_INVALID_WEIGHT);
9009   tolua_constant(tolua_S,"CAIRO_CONTENT_COLOR",CAIRO_CONTENT_COLOR);
9010   tolua_constant(tolua_S,"CAIRO_CONTENT_ALPHA",CAIRO_CONTENT_ALPHA);
9011   tolua_constant(tolua_S,"CAIRO_CONTENT_COLOR_ALPHA",CAIRO_CONTENT_COLOR_ALPHA);
9012   tolua_constant(tolua_S,"CAIRO_OPERATOR_CLEAR",CAIRO_OPERATOR_CLEAR);
9013   tolua_constant(tolua_S,"CAIRO_OPERATOR_SOURCE",CAIRO_OPERATOR_SOURCE);
9014   tolua_constant(tolua_S,"CAIRO_OPERATOR_OVER",CAIRO_OPERATOR_OVER);
9015   tolua_constant(tolua_S,"CAIRO_OPERATOR_IN",CAIRO_OPERATOR_IN);
9016   tolua_constant(tolua_S,"CAIRO_OPERATOR_OUT",CAIRO_OPERATOR_OUT);
9017   tolua_constant(tolua_S,"CAIRO_OPERATOR_ATOP",CAIRO_OPERATOR_ATOP);
9018   tolua_constant(tolua_S,"CAIRO_OPERATOR_DEST",CAIRO_OPERATOR_DEST);
9019   tolua_constant(tolua_S,"CAIRO_OPERATOR_DEST_OVER",CAIRO_OPERATOR_DEST_OVER);
9020   tolua_constant(tolua_S,"CAIRO_OPERATOR_DEST_IN",CAIRO_OPERATOR_DEST_IN);
9021   tolua_constant(tolua_S,"CAIRO_OPERATOR_DEST_OUT",CAIRO_OPERATOR_DEST_OUT);
9022   tolua_constant(tolua_S,"CAIRO_OPERATOR_DEST_ATOP",CAIRO_OPERATOR_DEST_ATOP);
9023   tolua_constant(tolua_S,"CAIRO_OPERATOR_XOR",CAIRO_OPERATOR_XOR);
9024   tolua_constant(tolua_S,"CAIRO_OPERATOR_ADD",CAIRO_OPERATOR_ADD);
9025   tolua_constant(tolua_S,"CAIRO_OPERATOR_SATURATE",CAIRO_OPERATOR_SATURATE);
9026   tolua_constant(tolua_S,"CAIRO_FILTER_FAST",CAIRO_FILTER_FAST);
9027   tolua_constant(tolua_S,"CAIRO_FILTER_GOOD",CAIRO_FILTER_GOOD);
9028   tolua_constant(tolua_S,"CAIRO_FILTER_BEST",CAIRO_FILTER_BEST);
9029   tolua_constant(tolua_S,"CAIRO_FILTER_NEAREST",CAIRO_FILTER_NEAREST);
9030   tolua_constant(tolua_S,"CAIRO_FILTER_BILINEAR",CAIRO_FILTER_BILINEAR);
9031   tolua_constant(tolua_S,"CAIRO_FILTER_GAUSSIAN",CAIRO_FILTER_GAUSSIAN);
9032   tolua_function(tolua_S,"cairo_xlib_surface_create",tolua_cairo_cairo_xlib_surface_create00);
9033   tolua_function(tolua_S,"cairo_xlib_surface_create_for_bitmap",tolua_cairo_cairo_xlib_surface_create_for_bitmap00);
9034   tolua_function(tolua_S,"cairo_xlib_surface_set_size",tolua_cairo_cairo_xlib_surface_set_size00);
9035   tolua_function(tolua_S,"cairo_xlib_surface_set_drawable",tolua_cairo_cairo_xlib_surface_set_drawable00);
9036   tolua_function(tolua_S,"cairo_xlib_surface_get_display",tolua_cairo_cairo_xlib_surface_get_display00);
9037   tolua_function(tolua_S,"cairo_xlib_surface_get_drawable",tolua_cairo_cairo_xlib_surface_get_drawable00);
9038   tolua_function(tolua_S,"cairo_xlib_surface_get_screen",tolua_cairo_cairo_xlib_surface_get_screen00);
9039   tolua_function(tolua_S,"cairo_xlib_surface_get_visual",tolua_cairo_cairo_xlib_surface_get_visual00);
9040   tolua_function(tolua_S,"cairo_xlib_surface_get_depth",tolua_cairo_cairo_xlib_surface_get_depth00);
9041   tolua_function(tolua_S,"cairo_xlib_surface_get_width",tolua_cairo_cairo_xlib_surface_get_width00);
9042   tolua_function(tolua_S,"cairo_xlib_surface_get_height",tolua_cairo_cairo_xlib_surface_get_height00);
9043   tolua_function(tolua_S,"cairo_version",tolua_cairo_cairo_version00);
9044   tolua_function(tolua_S,"cairo_version_string",tolua_cairo_cairo_version_string00);
9045   tolua_function(tolua_S,"cairo_create",tolua_cairo_cairo_create00);
9046   tolua_function(tolua_S,"cairo_reference",tolua_cairo_cairo_reference00);
9047   tolua_function(tolua_S,"cairo_destroy",tolua_cairo_cairo_destroy00);
9048   tolua_function(tolua_S,"cairo_get_reference_count",tolua_cairo_cairo_get_reference_count00);
9049   tolua_function(tolua_S,"cairo_get_user_data",tolua_cairo_cairo_get_user_data00);
9050   tolua_function(tolua_S,"cairo_set_user_data",tolua_cairo_cairo_set_user_data00);
9051   tolua_function(tolua_S,"cairo_save",tolua_cairo_cairo_save00);
9052   tolua_function(tolua_S,"cairo_restore",tolua_cairo_cairo_restore00);
9053   tolua_function(tolua_S,"cairo_push_group",tolua_cairo_cairo_push_group00);
9054   tolua_function(tolua_S,"cairo_push_group_with_content",tolua_cairo_cairo_push_group_with_content00);
9055   tolua_function(tolua_S,"cairo_pop_group",tolua_cairo_cairo_pop_group00);
9056   tolua_function(tolua_S,"cairo_pop_group_to_source",tolua_cairo_cairo_pop_group_to_source00);
9057   tolua_function(tolua_S,"cairo_set_operator",tolua_cairo_cairo_set_operator00);
9058   tolua_function(tolua_S,"cairo_set_source",tolua_cairo_cairo_set_source00);
9059   tolua_function(tolua_S,"cairo_set_source_rgb",tolua_cairo_cairo_set_source_rgb00);
9060   tolua_function(tolua_S,"cairo_set_source_rgba",tolua_cairo_cairo_set_source_rgba00);
9061   tolua_function(tolua_S,"cairo_set_source_surface",tolua_cairo_cairo_set_source_surface00);
9062   tolua_function(tolua_S,"cairo_set_tolerance",tolua_cairo_cairo_set_tolerance00);
9063   tolua_function(tolua_S,"cairo_set_antialias",tolua_cairo_cairo_set_antialias00);
9064   tolua_constant(tolua_S,"CAIRO_FILL_RULE_WINDING",CAIRO_FILL_RULE_WINDING);
9065   tolua_constant(tolua_S,"CAIRO_FILL_RULE_EVEN_ODD",CAIRO_FILL_RULE_EVEN_ODD);
9066   tolua_function(tolua_S,"cairo_set_fill_rule",tolua_cairo_cairo_set_fill_rule00);
9067   tolua_function(tolua_S,"cairo_set_line_width",tolua_cairo_cairo_set_line_width00);
9068   tolua_constant(tolua_S,"CAIRO_LINE_CAP_BUTT",CAIRO_LINE_CAP_BUTT);
9069   tolua_constant(tolua_S,"CAIRO_LINE_CAP_ROUND",CAIRO_LINE_CAP_ROUND);
9070   tolua_constant(tolua_S,"CAIRO_LINE_CAP_SQUARE",CAIRO_LINE_CAP_SQUARE);
9071   tolua_function(tolua_S,"cairo_set_line_cap",tolua_cairo_cairo_set_line_cap00);
9072   tolua_constant(tolua_S,"CAIRO_LINE_JOIN_MITER",CAIRO_LINE_JOIN_MITER);
9073   tolua_constant(tolua_S,"CAIRO_LINE_JOIN_ROUND",CAIRO_LINE_JOIN_ROUND);
9074   tolua_constant(tolua_S,"CAIRO_LINE_JOIN_BEVEL",CAIRO_LINE_JOIN_BEVEL);
9075   tolua_function(tolua_S,"cairo_set_line_join",tolua_cairo_cairo_set_line_join00);
9076   tolua_function(tolua_S,"cairo_set_dash",tolua_cairo_cairo_set_dash00);
9077   tolua_function(tolua_S,"cairo_set_miter_limit",tolua_cairo_cairo_set_miter_limit00);
9078   tolua_function(tolua_S,"cairo_translate",tolua_cairo_cairo_translate00);
9079   tolua_function(tolua_S,"cairo_scale",tolua_cairo_cairo_scale00);
9080   tolua_function(tolua_S,"cairo_rotate",tolua_cairo_cairo_rotate00);
9081   tolua_function(tolua_S,"cairo_transform",tolua_cairo_cairo_transform00);
9082   tolua_function(tolua_S,"cairo_set_matrix",tolua_cairo_cairo_set_matrix00);
9083   tolua_function(tolua_S,"cairo_identity_matrix",tolua_cairo_cairo_identity_matrix00);
9084   tolua_function(tolua_S,"cairo_user_to_device",tolua_cairo_cairo_user_to_device00);
9085   tolua_function(tolua_S,"cairo_user_to_device_distance",tolua_cairo_cairo_user_to_device_distance00);
9086   tolua_function(tolua_S,"cairo_device_to_user",tolua_cairo_cairo_device_to_user00);
9087   tolua_function(tolua_S,"cairo_device_to_user_distance",tolua_cairo_cairo_device_to_user_distance00);
9088   tolua_function(tolua_S,"cairo_new_path",tolua_cairo_cairo_new_path00);
9089   tolua_function(tolua_S,"cairo_move_to",tolua_cairo_cairo_move_to00);
9090   tolua_function(tolua_S,"cairo_new_sub_path",tolua_cairo_cairo_new_sub_path00);
9091   tolua_function(tolua_S,"cairo_line_to",tolua_cairo_cairo_line_to00);
9092   tolua_function(tolua_S,"cairo_curve_to",tolua_cairo_cairo_curve_to00);
9093   tolua_function(tolua_S,"cairo_arc",tolua_cairo_cairo_arc00);
9094   tolua_function(tolua_S,"cairo_arc_negative",tolua_cairo_cairo_arc_negative00);
9095   tolua_function(tolua_S,"cairo_rel_move_to",tolua_cairo_cairo_rel_move_to00);
9096   tolua_function(tolua_S,"cairo_rel_line_to",tolua_cairo_cairo_rel_line_to00);
9097   tolua_function(tolua_S,"cairo_rel_curve_to",tolua_cairo_cairo_rel_curve_to00);
9098   tolua_function(tolua_S,"cairo_rectangle",tolua_cairo_cairo_rectangle00);
9099   tolua_function(tolua_S,"cairo_close_path",tolua_cairo_cairo_close_path00);
9100   tolua_function(tolua_S,"cairo_path_extents",tolua_cairo_cairo_path_extents00);
9101   tolua_function(tolua_S,"cairo_paint",tolua_cairo_cairo_paint00);
9102   tolua_function(tolua_S,"cairo_paint_with_alpha",tolua_cairo_cairo_paint_with_alpha00);
9103   tolua_function(tolua_S,"cairo_mask",tolua_cairo_cairo_mask00);
9104   tolua_function(tolua_S,"cairo_mask_surface",tolua_cairo_cairo_mask_surface00);
9105   tolua_function(tolua_S,"cairo_stroke",tolua_cairo_cairo_stroke00);
9106   tolua_function(tolua_S,"cairo_stroke_preserve",tolua_cairo_cairo_stroke_preserve00);
9107   tolua_function(tolua_S,"cairo_fill",tolua_cairo_cairo_fill00);
9108   tolua_function(tolua_S,"cairo_fill_preserve",tolua_cairo_cairo_fill_preserve00);
9109   tolua_function(tolua_S,"cairo_copy_page",tolua_cairo_cairo_copy_page00);
9110   tolua_function(tolua_S,"cairo_show_page",tolua_cairo_cairo_show_page00);
9111   tolua_function(tolua_S,"cairo_in_stroke",tolua_cairo_cairo_in_stroke00);
9112   tolua_function(tolua_S,"cairo_in_fill",tolua_cairo_cairo_in_fill00);
9113   tolua_function(tolua_S,"cairo_stroke_extents",tolua_cairo_cairo_stroke_extents00);
9114   tolua_function(tolua_S,"cairo_fill_extents",tolua_cairo_cairo_fill_extents00);
9115   tolua_function(tolua_S,"cairo_reset_clip",tolua_cairo_cairo_reset_clip00);
9116   tolua_function(tolua_S,"cairo_clip",tolua_cairo_cairo_clip00);
9117   tolua_function(tolua_S,"cairo_clip_preserve",tolua_cairo_cairo_clip_preserve00);
9118   tolua_function(tolua_S,"cairo_clip_extents",tolua_cairo_cairo_clip_extents00);
9119   tolua_cclass(tolua_S,"cairo_rectangle_t","cairo_rectangle_t","",NULL);
9120   tolua_beginmodule(tolua_S,"cairo_rectangle_t");
9121    tolua_variable(tolua_S,"x",tolua_get_cairo_rectangle_t_x,tolua_set_cairo_rectangle_t_x);
9122    tolua_variable(tolua_S,"y",tolua_get_cairo_rectangle_t_y,tolua_set_cairo_rectangle_t_y);
9123    tolua_variable(tolua_S,"width",tolua_get_cairo_rectangle_t_width,tolua_set_cairo_rectangle_t_width);
9124    tolua_variable(tolua_S,"height",tolua_get_cairo_rectangle_t_height,tolua_set_cairo_rectangle_t_height);
9125   tolua_endmodule(tolua_S);
9126   tolua_cclass(tolua_S,"cairo_rectangle_list_t","cairo_rectangle_list_t","",NULL);
9127   tolua_beginmodule(tolua_S,"cairo_rectangle_list_t");
9128    tolua_variable(tolua_S,"status",tolua_get_cairo_rectangle_list_t_status,tolua_set_cairo_rectangle_list_t_status);
9129    tolua_variable(tolua_S,"rectangles",tolua_get_cairo_rectangle_list_t_rectangles_ptr,tolua_set_cairo_rectangle_list_t_rectangles_ptr);
9130    tolua_variable(tolua_S,"num_rectangles",tolua_get_cairo_rectangle_list_t_num_rectangles,tolua_set_cairo_rectangle_list_t_num_rectangles);
9131   tolua_endmodule(tolua_S);
9132   tolua_function(tolua_S,"cairo_copy_clip_rectangle_list",tolua_cairo_cairo_copy_clip_rectangle_list00);
9133   tolua_function(tolua_S,"cairo_rectangle_list_destroy",tolua_cairo_cairo_rectangle_list_destroy00);
9134   tolua_cclass(tolua_S,"cairo_glyph_t","cairo_glyph_t","",NULL);
9135   tolua_beginmodule(tolua_S,"cairo_glyph_t");
9136    tolua_variable(tolua_S,"index",tolua_get_cairo_glyph_t_unsigned_index,tolua_set_cairo_glyph_t_unsigned_index);
9137    tolua_variable(tolua_S,"x",tolua_get_cairo_glyph_t_x,tolua_set_cairo_glyph_t_x);
9138    tolua_variable(tolua_S,"y",tolua_get_cairo_glyph_t_y,tolua_set_cairo_glyph_t_y);
9139   tolua_endmodule(tolua_S);
9140   tolua_function(tolua_S,"cairo_glyph_allocate",tolua_cairo_cairo_glyph_allocate00);
9141   tolua_function(tolua_S,"cairo_glyph_free",tolua_cairo_cairo_glyph_free00);
9142   tolua_cclass(tolua_S,"cairo_text_cluster_t","cairo_text_cluster_t","",NULL);
9143   tolua_beginmodule(tolua_S,"cairo_text_cluster_t");
9144    tolua_variable(tolua_S,"num_bytes",tolua_get_cairo_text_cluster_t_num_bytes,tolua_set_cairo_text_cluster_t_num_bytes);
9145    tolua_variable(tolua_S,"num_glyphs",tolua_get_cairo_text_cluster_t_num_glyphs,tolua_set_cairo_text_cluster_t_num_glyphs);
9146   tolua_endmodule(tolua_S);
9147   tolua_function(tolua_S,"cairo_text_cluster_allocate",tolua_cairo_cairo_text_cluster_allocate00);
9148   tolua_function(tolua_S,"cairo_text_cluster_free",tolua_cairo_cairo_text_cluster_free00);
9149   tolua_constant(tolua_S,"CAIRO_TEXT_CLUSTER_FLAG_BACKWARD",CAIRO_TEXT_CLUSTER_FLAG_BACKWARD);
9150   tolua_cclass(tolua_S,"cairo_text_extents_t","cairo_text_extents_t","",NULL);
9151   tolua_beginmodule(tolua_S,"cairo_text_extents_t");
9152    tolua_variable(tolua_S,"x_bearing",tolua_get_cairo_text_extents_t_x_bearing,tolua_set_cairo_text_extents_t_x_bearing);
9153    tolua_variable(tolua_S,"y_bearing",tolua_get_cairo_text_extents_t_y_bearing,tolua_set_cairo_text_extents_t_y_bearing);
9154    tolua_variable(tolua_S,"width",tolua_get_cairo_text_extents_t_width,tolua_set_cairo_text_extents_t_width);
9155    tolua_variable(tolua_S,"height",tolua_get_cairo_text_extents_t_height,tolua_set_cairo_text_extents_t_height);
9156    tolua_variable(tolua_S,"x_advance",tolua_get_cairo_text_extents_t_x_advance,tolua_set_cairo_text_extents_t_x_advance);
9157    tolua_variable(tolua_S,"y_advance",tolua_get_cairo_text_extents_t_y_advance,tolua_set_cairo_text_extents_t_y_advance);
9158    tolua_function(tolua_S,"create",tolua_cairo_cairo_text_extents_t_create00);
9159   tolua_endmodule(tolua_S);
9160   tolua_cclass(tolua_S,"cairo_font_extents_t","cairo_font_extents_t","",NULL);
9161   tolua_beginmodule(tolua_S,"cairo_font_extents_t");
9162    tolua_variable(tolua_S,"ascent",tolua_get_cairo_font_extents_t_ascent,tolua_set_cairo_font_extents_t_ascent);
9163    tolua_variable(tolua_S,"descent",tolua_get_cairo_font_extents_t_descent,tolua_set_cairo_font_extents_t_descent);
9164    tolua_variable(tolua_S,"height",tolua_get_cairo_font_extents_t_height,tolua_set_cairo_font_extents_t_height);
9165    tolua_variable(tolua_S,"max_x_advance",tolua_get_cairo_font_extents_t_max_x_advance,tolua_set_cairo_font_extents_t_max_x_advance);
9166    tolua_variable(tolua_S,"max_y_advance",tolua_get_cairo_font_extents_t_max_y_advance,tolua_set_cairo_font_extents_t_max_y_advance);
9167    tolua_function(tolua_S,"create",tolua_cairo_cairo_font_extents_t_create00);
9168   tolua_endmodule(tolua_S);
9169   tolua_constant(tolua_S,"CAIRO_FONT_SLANT_NORMAL",CAIRO_FONT_SLANT_NORMAL);
9170   tolua_constant(tolua_S,"CAIRO_FONT_SLANT_ITALIC",CAIRO_FONT_SLANT_ITALIC);
9171   tolua_constant(tolua_S,"CAIRO_FONT_SLANT_OBLIQUE",CAIRO_FONT_SLANT_OBLIQUE);
9172   tolua_constant(tolua_S,"CAIRO_FONT_WEIGHT_NORMAL",CAIRO_FONT_WEIGHT_NORMAL);
9173   tolua_constant(tolua_S,"CAIRO_FONT_WEIGHT_BOLD",CAIRO_FONT_WEIGHT_BOLD);
9174   tolua_constant(tolua_S,"CAIRO_SUBPIXEL_ORDER_DEFAULT",CAIRO_SUBPIXEL_ORDER_DEFAULT);
9175   tolua_constant(tolua_S,"CAIRO_SUBPIXEL_ORDER_RGB",CAIRO_SUBPIXEL_ORDER_RGB);
9176   tolua_constant(tolua_S,"CAIRO_SUBPIXEL_ORDER_BGR",CAIRO_SUBPIXEL_ORDER_BGR);
9177   tolua_constant(tolua_S,"CAIRO_SUBPIXEL_ORDER_VRGB",CAIRO_SUBPIXEL_ORDER_VRGB);
9178   tolua_constant(tolua_S,"CAIRO_SUBPIXEL_ORDER_VBGR",CAIRO_SUBPIXEL_ORDER_VBGR);
9179   tolua_constant(tolua_S,"CAIRO_HINT_STYLE_DEFAULT",CAIRO_HINT_STYLE_DEFAULT);
9180   tolua_constant(tolua_S,"CAIRO_HINT_STYLE_NONE",CAIRO_HINT_STYLE_NONE);
9181   tolua_constant(tolua_S,"CAIRO_HINT_STYLE_SLIGHT",CAIRO_HINT_STYLE_SLIGHT);
9182   tolua_constant(tolua_S,"CAIRO_HINT_STYLE_MEDIUM",CAIRO_HINT_STYLE_MEDIUM);
9183   tolua_constant(tolua_S,"CAIRO_HINT_STYLE_FULL",CAIRO_HINT_STYLE_FULL);
9184   tolua_constant(tolua_S,"CAIRO_HINT_METRICS_DEFAULT",CAIRO_HINT_METRICS_DEFAULT);
9185   tolua_constant(tolua_S,"CAIRO_HINT_METRICS_OFF",CAIRO_HINT_METRICS_OFF);
9186   tolua_constant(tolua_S,"CAIRO_HINT_METRICS_ON",CAIRO_HINT_METRICS_ON);
9187   tolua_function(tolua_S,"cairo_font_options_create",tolua_cairo_cairo_font_options_create00);
9188   tolua_function(tolua_S,"cairo_font_options_copy",tolua_cairo_cairo_font_options_copy00);
9189   tolua_function(tolua_S,"cairo_font_options_destroy",tolua_cairo_cairo_font_options_destroy00);
9190   tolua_function(tolua_S,"cairo_font_options_status",tolua_cairo_cairo_font_options_status00);
9191   tolua_function(tolua_S,"cairo_font_options_merge",tolua_cairo_cairo_font_options_merge00);
9192   tolua_function(tolua_S,"cairo_font_options_equal",tolua_cairo_cairo_font_options_equal00);
9193   tolua_function(tolua_S,"cairo_font_options_hash",tolua_cairo_cairo_font_options_hash00);
9194   tolua_function(tolua_S,"cairo_font_options_set_antialias",tolua_cairo_cairo_font_options_set_antialias00);
9195   tolua_function(tolua_S,"cairo_font_options_get_antialias",tolua_cairo_cairo_font_options_get_antialias00);
9196   tolua_function(tolua_S,"cairo_font_options_set_subpixel_order",tolua_cairo_cairo_font_options_set_subpixel_order00);
9197   tolua_function(tolua_S,"cairo_font_options_get_subpixel_order",tolua_cairo_cairo_font_options_get_subpixel_order00);
9198   tolua_function(tolua_S,"cairo_font_options_set_hint_style",tolua_cairo_cairo_font_options_set_hint_style00);
9199   tolua_function(tolua_S,"cairo_font_options_get_hint_style",tolua_cairo_cairo_font_options_get_hint_style00);
9200   tolua_function(tolua_S,"cairo_font_options_set_hint_metrics",tolua_cairo_cairo_font_options_set_hint_metrics00);
9201   tolua_function(tolua_S,"cairo_font_options_get_hint_metrics",tolua_cairo_cairo_font_options_get_hint_metrics00);
9202   tolua_function(tolua_S,"cairo_select_font_face",tolua_cairo_cairo_select_font_face00);
9203   tolua_function(tolua_S,"cairo_set_font_size",tolua_cairo_cairo_set_font_size00);
9204   tolua_function(tolua_S,"cairo_set_font_matrix",tolua_cairo_cairo_set_font_matrix00);
9205   tolua_function(tolua_S,"cairo_get_font_matrix",tolua_cairo_cairo_get_font_matrix00);
9206   tolua_function(tolua_S,"cairo_set_font_options",tolua_cairo_cairo_set_font_options00);
9207   tolua_function(tolua_S,"cairo_get_font_options",tolua_cairo_cairo_get_font_options00);
9208   tolua_function(tolua_S,"cairo_set_font_face",tolua_cairo_cairo_set_font_face00);
9209   tolua_function(tolua_S,"cairo_get_font_face",tolua_cairo_cairo_get_font_face00);
9210   tolua_function(tolua_S,"cairo_set_scaled_font",tolua_cairo_cairo_set_scaled_font00);
9211   tolua_function(tolua_S,"cairo_get_scaled_font",tolua_cairo_cairo_get_scaled_font00);
9212   tolua_function(tolua_S,"cairo_show_text",tolua_cairo_cairo_show_text00);
9213   tolua_function(tolua_S,"cairo_show_glyphs",tolua_cairo_cairo_show_glyphs00);
9214   tolua_function(tolua_S,"cairo_show_text_glyphs",tolua_cairo_cairo_show_text_glyphs00);
9215   tolua_function(tolua_S,"cairo_text_path",tolua_cairo_cairo_text_path00);
9216   tolua_function(tolua_S,"cairo_glyph_path",tolua_cairo_cairo_glyph_path00);
9217   tolua_function(tolua_S,"cairo_text_extents",tolua_cairo_cairo_text_extents00);
9218   tolua_function(tolua_S,"cairo_glyph_extents",tolua_cairo_cairo_glyph_extents00);
9219   tolua_function(tolua_S,"cairo_font_extents",tolua_cairo_cairo_font_extents00);
9220   tolua_function(tolua_S,"cairo_font_face_reference",tolua_cairo_cairo_font_face_reference00);
9221   tolua_function(tolua_S,"cairo_font_face_destroy",tolua_cairo_cairo_font_face_destroy00);
9222   tolua_function(tolua_S,"cairo_font_face_get_reference_count",tolua_cairo_cairo_font_face_get_reference_count00);
9223   tolua_function(tolua_S,"cairo_font_face_status",tolua_cairo_cairo_font_face_status00);
9224   tolua_constant(tolua_S,"CAIRO_FONT_TYPE_TOY",CAIRO_FONT_TYPE_TOY);
9225   tolua_constant(tolua_S,"CAIRO_FONT_TYPE_FT",CAIRO_FONT_TYPE_FT);
9226   tolua_constant(tolua_S,"CAIRO_FONT_TYPE_WIN32",CAIRO_FONT_TYPE_WIN32);
9227   tolua_constant(tolua_S,"CAIRO_FONT_TYPE_QUARTZ",CAIRO_FONT_TYPE_QUARTZ);
9228   tolua_constant(tolua_S,"CAIRO_FONT_TYPE_USER",CAIRO_FONT_TYPE_USER);
9229   tolua_function(tolua_S,"cairo_font_face_get_type",tolua_cairo_cairo_font_face_get_type00);
9230   tolua_function(tolua_S,"cairo_font_face_get_user_data",tolua_cairo_cairo_font_face_get_user_data00);
9231   tolua_function(tolua_S,"cairo_font_face_set_user_data",tolua_cairo_cairo_font_face_set_user_data00);
9232   tolua_function(tolua_S,"cairo_scaled_font_create",tolua_cairo_cairo_scaled_font_create00);
9233   tolua_function(tolua_S,"cairo_scaled_font_reference",tolua_cairo_cairo_scaled_font_reference00);
9234   tolua_function(tolua_S,"cairo_scaled_font_destroy",tolua_cairo_cairo_scaled_font_destroy00);
9235   tolua_function(tolua_S,"cairo_scaled_font_get_reference_count",tolua_cairo_cairo_scaled_font_get_reference_count00);
9236   tolua_function(tolua_S,"cairo_scaled_font_status",tolua_cairo_cairo_scaled_font_status00);
9237   tolua_function(tolua_S,"cairo_scaled_font_get_type",tolua_cairo_cairo_scaled_font_get_type00);
9238   tolua_function(tolua_S,"cairo_scaled_font_get_user_data",tolua_cairo_cairo_scaled_font_get_user_data00);
9239   tolua_function(tolua_S,"cairo_scaled_font_set_user_data",tolua_cairo_cairo_scaled_font_set_user_data00);
9240   tolua_function(tolua_S,"cairo_scaled_font_extents",tolua_cairo_cairo_scaled_font_extents00);
9241   tolua_function(tolua_S,"cairo_scaled_font_text_extents",tolua_cairo_cairo_scaled_font_text_extents00);
9242   tolua_function(tolua_S,"cairo_scaled_font_glyph_extents",tolua_cairo_cairo_scaled_font_glyph_extents00);
9243   tolua_function(tolua_S,"cairo_scaled_font_text_to_glyphs",tolua_cairo_cairo_scaled_font_text_to_glyphs00);
9244   tolua_function(tolua_S,"cairo_scaled_font_get_font_face",tolua_cairo_cairo_scaled_font_get_font_face00);
9245   tolua_function(tolua_S,"cairo_scaled_font_get_font_matrix",tolua_cairo_cairo_scaled_font_get_font_matrix00);
9246   tolua_function(tolua_S,"cairo_scaled_font_get_ctm",tolua_cairo_cairo_scaled_font_get_ctm00);
9247   tolua_function(tolua_S,"cairo_scaled_font_get_scale_matrix",tolua_cairo_cairo_scaled_font_get_scale_matrix00);
9248   tolua_function(tolua_S,"cairo_scaled_font_get_font_options",tolua_cairo_cairo_scaled_font_get_font_options00);
9249   tolua_function(tolua_S,"cairo_toy_font_face_create",tolua_cairo_cairo_toy_font_face_create00);
9250   tolua_function(tolua_S,"cairo_toy_font_face_get_family",tolua_cairo_cairo_toy_font_face_get_family00);
9251   tolua_function(tolua_S,"cairo_toy_font_face_get_slant",tolua_cairo_cairo_toy_font_face_get_slant00);
9252   tolua_function(tolua_S,"cairo_toy_font_face_get_weight",tolua_cairo_cairo_toy_font_face_get_weight00);
9253   tolua_function(tolua_S,"cairo_user_font_face_create",tolua_cairo_cairo_user_font_face_create00);
9254   tolua_function(tolua_S,"cairo_user_font_face_set_init_func",tolua_cairo_cairo_user_font_face_set_init_func00);
9255   tolua_function(tolua_S,"cairo_user_font_face_set_render_glyph_func",tolua_cairo_cairo_user_font_face_set_render_glyph_func00);
9256   tolua_function(tolua_S,"cairo_user_font_face_set_text_to_glyphs_func",tolua_cairo_cairo_user_font_face_set_text_to_glyphs_func00);
9257   tolua_function(tolua_S,"cairo_user_font_face_set_unicode_to_glyph_func",tolua_cairo_cairo_user_font_face_set_unicode_to_glyph_func00);
9258   tolua_function(tolua_S,"cairo_user_font_face_get_init_func",tolua_cairo_cairo_user_font_face_get_init_func00);
9259   tolua_function(tolua_S,"cairo_user_font_face_get_render_glyph_func",tolua_cairo_cairo_user_font_face_get_render_glyph_func00);
9260   tolua_function(tolua_S,"cairo_user_font_face_get_text_to_glyphs_func",tolua_cairo_cairo_user_font_face_get_text_to_glyphs_func00);
9261   tolua_function(tolua_S,"cairo_user_font_face_get_unicode_to_glyph_func",tolua_cairo_cairo_user_font_face_get_unicode_to_glyph_func00);
9262   tolua_function(tolua_S,"cairo_get_operator",tolua_cairo_cairo_get_operator00);
9263   tolua_function(tolua_S,"cairo_get_source",tolua_cairo_cairo_get_source00);
9264   tolua_function(tolua_S,"cairo_get_tolerance",tolua_cairo_cairo_get_tolerance00);
9265   tolua_function(tolua_S,"cairo_get_antialias",tolua_cairo_cairo_get_antialias00);
9266   tolua_function(tolua_S,"cairo_has_current_point",tolua_cairo_cairo_has_current_point00);
9267   tolua_function(tolua_S,"cairo_get_current_point",tolua_cairo_cairo_get_current_point00);
9268   tolua_function(tolua_S,"cairo_get_fill_rule",tolua_cairo_cairo_get_fill_rule00);
9269   tolua_function(tolua_S,"cairo_get_line_width",tolua_cairo_cairo_get_line_width00);
9270   tolua_function(tolua_S,"cairo_get_line_cap",tolua_cairo_cairo_get_line_cap00);
9271   tolua_function(tolua_S,"cairo_get_line_join",tolua_cairo_cairo_get_line_join00);
9272   tolua_function(tolua_S,"cairo_get_miter_limit",tolua_cairo_cairo_get_miter_limit00);
9273   tolua_function(tolua_S,"cairo_get_dash_count",tolua_cairo_cairo_get_dash_count00);
9274   tolua_function(tolua_S,"cairo_get_dash",tolua_cairo_cairo_get_dash00);
9275   tolua_function(tolua_S,"cairo_get_matrix",tolua_cairo_cairo_get_matrix00);
9276   tolua_function(tolua_S,"cairo_get_target",tolua_cairo_cairo_get_target00);
9277   tolua_function(tolua_S,"cairo_get_group_target",tolua_cairo_cairo_get_group_target00);
9278   tolua_constant(tolua_S,"CAIRO_PATH_MOVE_TO",CAIRO_PATH_MOVE_TO);
9279   tolua_constant(tolua_S,"CAIRO_PATH_LINE_TO",CAIRO_PATH_LINE_TO);
9280   tolua_constant(tolua_S,"CAIRO_PATH_CURVE_TO",CAIRO_PATH_CURVE_TO);
9281   tolua_constant(tolua_S,"CAIRO_PATH_CLOSE_PATH",CAIRO_PATH_CLOSE_PATH);
9282   tolua_cclass(tolua_S,"cairo_path_t","cairo_path_t","",NULL);
9283   tolua_beginmodule(tolua_S,"cairo_path_t");
9284    tolua_variable(tolua_S,"status",tolua_get_cairo_path_t_status,tolua_set_cairo_path_t_status);
9285    tolua_variable(tolua_S,"data",tolua_get_cairo_path_t_data_ptr,tolua_set_cairo_path_t_data_ptr);
9286    tolua_variable(tolua_S,"num_data",tolua_get_cairo_path_t_num_data,tolua_set_cairo_path_t_num_data);
9287   tolua_endmodule(tolua_S);
9288   tolua_function(tolua_S,"cairo_copy_path",tolua_cairo_cairo_copy_path00);
9289   tolua_function(tolua_S,"cairo_copy_path_flat",tolua_cairo_cairo_copy_path_flat00);
9290   tolua_function(tolua_S,"cairo_append_path",tolua_cairo_cairo_append_path00);
9291   tolua_function(tolua_S,"cairo_path_destroy",tolua_cairo_cairo_path_destroy00);
9292   tolua_function(tolua_S,"cairo_status",tolua_cairo_cairo_status00);
9293   tolua_function(tolua_S,"cairo_status_to_string",tolua_cairo_cairo_status_to_string00);
9294   tolua_function(tolua_S,"cairo_surface_create_similar",tolua_cairo_cairo_surface_create_similar00);
9295   tolua_function(tolua_S,"cairo_surface_reference",tolua_cairo_cairo_surface_reference00);
9296   tolua_function(tolua_S,"cairo_surface_finish",tolua_cairo_cairo_surface_finish00);
9297   tolua_function(tolua_S,"cairo_surface_destroy",tolua_cairo_cairo_surface_destroy00);
9298   tolua_function(tolua_S,"cairo_surface_get_reference_count",tolua_cairo_cairo_surface_get_reference_count00);
9299   tolua_function(tolua_S,"cairo_surface_status",tolua_cairo_cairo_surface_status00);
9300   tolua_constant(tolua_S,"CAIRO_SURFACE_TYPE_IMAGE",CAIRO_SURFACE_TYPE_IMAGE);
9301   tolua_constant(tolua_S,"CAIRO_SURFACE_TYPE_PDF",CAIRO_SURFACE_TYPE_PDF);
9302   tolua_constant(tolua_S,"CAIRO_SURFACE_TYPE_PS",CAIRO_SURFACE_TYPE_PS);
9303   tolua_constant(tolua_S,"CAIRO_SURFACE_TYPE_XLIB",CAIRO_SURFACE_TYPE_XLIB);
9304   tolua_constant(tolua_S,"CAIRO_SURFACE_TYPE_XCB",CAIRO_SURFACE_TYPE_XCB);
9305   tolua_constant(tolua_S,"CAIRO_SURFACE_TYPE_GLITZ",CAIRO_SURFACE_TYPE_GLITZ);
9306   tolua_constant(tolua_S,"CAIRO_SURFACE_TYPE_QUARTZ",CAIRO_SURFACE_TYPE_QUARTZ);
9307   tolua_constant(tolua_S,"CAIRO_SURFACE_TYPE_WIN32",CAIRO_SURFACE_TYPE_WIN32);
9308   tolua_constant(tolua_S,"CAIRO_SURFACE_TYPE_BEOS",CAIRO_SURFACE_TYPE_BEOS);
9309   tolua_constant(tolua_S,"CAIRO_SURFACE_TYPE_DIRECTFB",CAIRO_SURFACE_TYPE_DIRECTFB);
9310   tolua_constant(tolua_S,"CAIRO_SURFACE_TYPE_SVG",CAIRO_SURFACE_TYPE_SVG);
9311   tolua_constant(tolua_S,"CAIRO_SURFACE_TYPE_OS2",CAIRO_SURFACE_TYPE_OS2);
9312   tolua_constant(tolua_S,"CAIRO_SURFACE_TYPE_WIN32_PRINTING",CAIRO_SURFACE_TYPE_WIN32_PRINTING);
9313   tolua_constant(tolua_S,"CAIRO_SURFACE_TYPE_QUARTZ_IMAGE",CAIRO_SURFACE_TYPE_QUARTZ_IMAGE);
9314   tolua_function(tolua_S,"cairo_surface_get_type",tolua_cairo_cairo_surface_get_type00);
9315   tolua_function(tolua_S,"cairo_surface_get_content",tolua_cairo_cairo_surface_get_content00);
9316   tolua_function(tolua_S,"cairo_surface_write_to_png",tolua_cairo_cairo_surface_write_to_png00);
9317   tolua_function(tolua_S,"cairo_surface_write_to_png_stream",tolua_cairo_cairo_surface_write_to_png_stream00);
9318   tolua_function(tolua_S,"cairo_surface_get_user_data",tolua_cairo_cairo_surface_get_user_data00);
9319   tolua_function(tolua_S,"cairo_surface_set_user_data",tolua_cairo_cairo_surface_set_user_data00);
9320   tolua_function(tolua_S,"cairo_surface_get_font_options",tolua_cairo_cairo_surface_get_font_options00);
9321   tolua_function(tolua_S,"cairo_surface_flush",tolua_cairo_cairo_surface_flush00);
9322   tolua_function(tolua_S,"cairo_surface_mark_dirty",tolua_cairo_cairo_surface_mark_dirty00);
9323   tolua_function(tolua_S,"cairo_surface_mark_dirty_rectangle",tolua_cairo_cairo_surface_mark_dirty_rectangle00);
9324   tolua_function(tolua_S,"cairo_surface_set_device_offset",tolua_cairo_cairo_surface_set_device_offset00);
9325   tolua_function(tolua_S,"cairo_surface_get_device_offset",tolua_cairo_cairo_surface_get_device_offset00);
9326   tolua_function(tolua_S,"cairo_surface_set_fallback_resolution",tolua_cairo_cairo_surface_set_fallback_resolution00);
9327   tolua_function(tolua_S,"cairo_surface_get_fallback_resolution",tolua_cairo_cairo_surface_get_fallback_resolution00);
9328   tolua_function(tolua_S,"cairo_surface_copy_page",tolua_cairo_cairo_surface_copy_page00);
9329   tolua_function(tolua_S,"cairo_surface_show_page",tolua_cairo_cairo_surface_show_page00);
9330   tolua_function(tolua_S,"cairo_surface_has_show_text_glyphs",tolua_cairo_cairo_surface_has_show_text_glyphs00);
9331   tolua_constant(tolua_S,"CAIRO_FORMAT_ARGB32",CAIRO_FORMAT_ARGB32);
9332   tolua_constant(tolua_S,"CAIRO_FORMAT_RGB24",CAIRO_FORMAT_RGB24);
9333   tolua_constant(tolua_S,"CAIRO_FORMAT_A8",CAIRO_FORMAT_A8);
9334   tolua_constant(tolua_S,"CAIRO_FORMAT_A1",CAIRO_FORMAT_A1);
9335   tolua_function(tolua_S,"cairo_image_surface_create",tolua_cairo_cairo_image_surface_create00);
9336   tolua_function(tolua_S,"cairo_format_stride_for_width",tolua_cairo_cairo_format_stride_for_width00);
9337   tolua_function(tolua_S,"cairo_image_surface_create_for_data",tolua_cairo_cairo_image_surface_create_for_data00);
9338   tolua_function(tolua_S,"cairo_image_surface_get_data",tolua_cairo_cairo_image_surface_get_data00);
9339   tolua_function(tolua_S,"cairo_image_surface_get_format",tolua_cairo_cairo_image_surface_get_format00);
9340   tolua_function(tolua_S,"cairo_image_surface_get_width",tolua_cairo_cairo_image_surface_get_width00);
9341   tolua_function(tolua_S,"cairo_image_surface_get_height",tolua_cairo_cairo_image_surface_get_height00);
9342   tolua_function(tolua_S,"cairo_image_surface_get_stride",tolua_cairo_cairo_image_surface_get_stride00);
9343   tolua_function(tolua_S,"cairo_image_surface_create_from_png",tolua_cairo_cairo_image_surface_create_from_png00);
9344   tolua_function(tolua_S,"cairo_image_surface_create_from_png_stream",tolua_cairo_cairo_image_surface_create_from_png_stream00);
9345   tolua_function(tolua_S,"cairo_pattern_create_rgb",tolua_cairo_cairo_pattern_create_rgb00);
9346   tolua_function(tolua_S,"cairo_pattern_create_rgba",tolua_cairo_cairo_pattern_create_rgba00);
9347   tolua_function(tolua_S,"cairo_pattern_create_for_surface",tolua_cairo_cairo_pattern_create_for_surface00);
9348   tolua_function(tolua_S,"cairo_pattern_create_linear",tolua_cairo_cairo_pattern_create_linear00);
9349   tolua_function(tolua_S,"cairo_pattern_create_radial",tolua_cairo_cairo_pattern_create_radial00);
9350   tolua_function(tolua_S,"cairo_pattern_reference",tolua_cairo_cairo_pattern_reference00);
9351   tolua_function(tolua_S,"cairo_pattern_destroy",tolua_cairo_cairo_pattern_destroy00);
9352   tolua_function(tolua_S,"cairo_pattern_get_reference_count",tolua_cairo_cairo_pattern_get_reference_count00);
9353   tolua_function(tolua_S,"cairo_pattern_status",tolua_cairo_cairo_pattern_status00);
9354   tolua_function(tolua_S,"cairo_pattern_get_user_data",tolua_cairo_cairo_pattern_get_user_data00);
9355   tolua_function(tolua_S,"cairo_pattern_set_user_data",tolua_cairo_cairo_pattern_set_user_data00);
9356   tolua_constant(tolua_S,"CAIRO_PATTERN_TYPE_SOLID",CAIRO_PATTERN_TYPE_SOLID);
9357   tolua_constant(tolua_S,"CAIRO_PATTERN_TYPE_SURFACE",CAIRO_PATTERN_TYPE_SURFACE);
9358   tolua_constant(tolua_S,"CAIRO_PATTERN_TYPE_LINEAR",CAIRO_PATTERN_TYPE_LINEAR);
9359   tolua_constant(tolua_S,"CAIRO_PATTERN_TYPE_RADIAL",CAIRO_PATTERN_TYPE_RADIAL);
9360   tolua_function(tolua_S,"cairo_pattern_get_type",tolua_cairo_cairo_pattern_get_type00);
9361   tolua_function(tolua_S,"cairo_pattern_add_color_stop_rgb",tolua_cairo_cairo_pattern_add_color_stop_rgb00);
9362   tolua_function(tolua_S,"cairo_pattern_add_color_stop_rgba",tolua_cairo_cairo_pattern_add_color_stop_rgba00);
9363   tolua_function(tolua_S,"cairo_pattern_set_matrix",tolua_cairo_cairo_pattern_set_matrix00);
9364   tolua_function(tolua_S,"cairo_pattern_get_matrix",tolua_cairo_cairo_pattern_get_matrix00);
9365   tolua_constant(tolua_S,"CAIRO_EXTEND_NONE",CAIRO_EXTEND_NONE);
9366   tolua_constant(tolua_S,"CAIRO_EXTEND_REPEAT",CAIRO_EXTEND_REPEAT);
9367   tolua_constant(tolua_S,"CAIRO_EXTEND_REFLECT",CAIRO_EXTEND_REFLECT);
9368   tolua_constant(tolua_S,"CAIRO_EXTEND_PAD",CAIRO_EXTEND_PAD);
9369   tolua_function(tolua_S,"cairo_pattern_set_extend",tolua_cairo_cairo_pattern_set_extend00);
9370   tolua_function(tolua_S,"cairo_pattern_get_extend",tolua_cairo_cairo_pattern_get_extend00);
9371   tolua_function(tolua_S,"cairo_pattern_set_filter",tolua_cairo_cairo_pattern_set_filter00);
9372   tolua_function(tolua_S,"cairo_pattern_get_filter",tolua_cairo_cairo_pattern_get_filter00);
9373   tolua_function(tolua_S,"cairo_pattern_get_rgba",tolua_cairo_cairo_pattern_get_rgba00);
9374   tolua_function(tolua_S,"cairo_pattern_get_surface",tolua_cairo_cairo_pattern_get_surface00);
9375   tolua_function(tolua_S,"cairo_pattern_get_color_stop_rgba",tolua_cairo_cairo_pattern_get_color_stop_rgba00);
9376   tolua_function(tolua_S,"cairo_pattern_get_color_stop_count",tolua_cairo_cairo_pattern_get_color_stop_count00);
9377   tolua_function(tolua_S,"cairo_pattern_get_linear_points",tolua_cairo_cairo_pattern_get_linear_points00);
9378   tolua_function(tolua_S,"cairo_pattern_get_radial_circles",tolua_cairo_cairo_pattern_get_radial_circles00);
9379   tolua_function(tolua_S,"cairo_matrix_init",tolua_cairo_cairo_matrix_init00);
9380   tolua_function(tolua_S,"cairo_matrix_init_identity",tolua_cairo_cairo_matrix_init_identity00);
9381   tolua_function(tolua_S,"cairo_matrix_init_translate",tolua_cairo_cairo_matrix_init_translate00);
9382   tolua_function(tolua_S,"cairo_matrix_init_scale",tolua_cairo_cairo_matrix_init_scale00);
9383   tolua_function(tolua_S,"cairo_matrix_init_rotate",tolua_cairo_cairo_matrix_init_rotate00);
9384   tolua_function(tolua_S,"cairo_matrix_translate",tolua_cairo_cairo_matrix_translate00);
9385   tolua_function(tolua_S,"cairo_matrix_scale",tolua_cairo_cairo_matrix_scale00);
9386   tolua_function(tolua_S,"cairo_matrix_rotate",tolua_cairo_cairo_matrix_rotate00);
9387   tolua_function(tolua_S,"cairo_matrix_invert",tolua_cairo_cairo_matrix_invert00);
9388   tolua_function(tolua_S,"cairo_matrix_multiply",tolua_cairo_cairo_matrix_multiply00);
9389   tolua_function(tolua_S,"cairo_matrix_transform_distance",tolua_cairo_cairo_matrix_transform_distance00);
9390   tolua_function(tolua_S,"cairo_matrix_transform_point",tolua_cairo_cairo_matrix_transform_point00);
9391   tolua_function(tolua_S,"cairo_debug_reset_static_data",tolua_cairo_cairo_debug_reset_static_data00);
9392  tolua_endmodule(tolua_S);
9393  return 1;
9394 }
9395
9396
9397 #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
9398  TOLUA_API int luaopen_cairo (lua_State* tolua_S) {
9399  return tolua_cairo_open(tolua_S);
9400 };
9401 #endif
9402